text: /**
   * @licstart The following is the entire license notice for the
   * Javascript code in this page
   *
   * Copyright 2020 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?module.exports=r():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf",[],r):"object"==typeof exports?exports["pdfjs-dist/build/pdf"]=r():t["pdfjs-dist/build/pdf"]=t.pdfjsLib=r()}(this,(function(){return function(t){var r={};function __w_pdfjs_require__(a){if(r[a])return r[a].exports;var o=r[a]={i:a,l:!1,exports:{}};t[a].call(o.exports,o,o.exports,__w_pdfjs_require__);o.l=!0;return o.exports}__w_pdfjs_require__.m=t;__w_pdfjs_require__.c=r;__w_pdfjs_require__.d=function(t,r,a){__w_pdfjs_require__.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:a})};__w_pdfjs_require__.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});Object.defineProperty(t,"__esModule",{value:!0})};__w_pdfjs_require__.t=function(t,r){1&r&&(t=__w_pdfjs_require__(t));if(8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);__w_pdfjs_require__.r(a);Object.defineProperty(a,"default",{enumerable:!0,value:t});if(2&r&&"string"!=typeof t)for(var o in t)__w_pdfjs_require__.d(a,o,function(r){return t[r]}.bind(null,o));return a};__w_pdfjs_require__.n=function(t){var r=t&&t.__esModule?function getDefault(){return t.default}:function getModuleExports(){return t};__w_pdfjs_require__.d(r,"a",r);return r};__w_pdfjs_require__.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)};__w_pdfjs_require__.p="";return __w_pdfjs_require__(__w_pdfjs_require__.s=0)}([function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});Object.defineProperty(r,"addLinkAttributes",{enumerable:!0,get:function get(){return o.addLinkAttributes}});Object.defineProperty(r,"getFilenameFromUrl",{enumerable:!0,get:function get(){return o.getFilenameFromUrl}});Object.defineProperty(r,"LinkTarget",{enumerable:!0,get:function get(){return o.LinkTarget}});Object.defineProperty(r,"loadScript",{enumerable:!0,get:function get(){return o.loadScript}});Object.defineProperty(r,"PDFDateString",{enumerable:!0,get:function get(){return o.PDFDateString}});Object.defineProperty(r,"RenderingCancelledException",{enumerable:!0,get:function get(){return o.RenderingCancelledException}});Object.defineProperty(r,"build",{enumerable:!0,get:function get(){return i.build}});Object.defineProperty(r,"getDocument",{enumerable:!0,get:function get(){return i.getDocument}});Object.defineProperty(r,"LoopbackPort",{enumerable:!0,get:function get(){return i.LoopbackPort}});Object.defineProperty(r,"PDFDataRangeTransport",{enumerable:!0,get:function get(){return i.PDFDataRangeTransport}});Object.defineProperty(r,"PDFWorker",{enumerable:!0,get:function get(){return i.PDFWorker}});Object.defineProperty(r,"version",{enumerable:!0,get:function get(){return i.version}});Object.defineProperty(r,"CMapCompressionType",{enumerable:!0,get:function get(){return l.CMapCompressionType}});Object.defineProperty(r,"createObjectURL",{enumerable:!0,get:function get(){return l.createObjectURL}});Object.defineProperty(r,"createPromiseCapability",{enumerable:!0,get:function get(){return l.createPromiseCapability}});Object.defineProperty(r,"createValidAbsoluteUrl",{enumerable:!0,get:function get(){return l.createValidAbsoluteUrl}});Object.defineProperty(r,"InvalidPDFException",{enumerable:!0,get:function get(){return l.InvalidPDFException}});Object.defineProperty(r,"MissingPDFException",{enumerable:!0,get:function get(){return l.MissingPDFException}});Object.defineProperty(r,"OPS",{enumerable:!0,get:function get(){return l.OPS}});Object.defineProperty(r,"PasswordResponses",{enumerable:!0,get:function get(){return l.PasswordResponses}});Object.defineProperty(r,"PermissionFlag",{enumerable:!0,get:function get(){return l.PermissionFlag}});Object.defineProperty(r,"removeNullCharacters",{enumerable:!0,get:function get(){return l.removeNullCharacters}});Object.defineProperty(r,"shadow",{enumerable:!0,get:function get(){return l.shadow}});Object.defineProperty(r,"UnexpectedResponseException",{enumerable:!0,get:function get(){return l.UnexpectedResponseException}});Object.defineProperty(r,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function get(){return l.UNSUPPORTED_FEATURES}});Object.defineProperty(r,"Util",{enumerable:!0,get:function get(){return l.Util}});Object.defineProperty(r,"VerbosityLevel",{enumerable:!0,get:function get(){return l.VerbosityLevel}});Object.defineProperty(r,"AnnotationLayer",{enumerable:!0,get:function get(){return c.AnnotationLayer}});Object.defineProperty(r,"apiCompatibilityParams",{enumerable:!0,get:function get(){return u.apiCompatibilityParams}});Object.defineProperty(r,"GlobalWorkerOptions",{enumerable:!0,get:function get(){return d.GlobalWorkerOptions}});Object.defineProperty(r,"renderTextLayer",{enumerable:!0,get:function get(){return h.renderTextLayer}});Object.defineProperty(r,"SVGGraphics",{enumerable:!0,get:function get(){return p.SVGGraphics}});var o=a(1),i=a(202),l=a(5),c=a(216),u=a(206),d=a(209),h=a(217),p=a(218);if(a(7).isNodeJS){var m=a(219).PDFNodeStream;(0,i.setPDFNetworkStreamFactory)((function(t){return new m(t)}))}else{var v,g=a(222).PDFNetworkStream;(0,o.isFetchSupported)()&&(v=a(223).PDFFetchStream);(0,i.setPDFNetworkStreamFactory)((function(t){return v&&(0,o.isValidFetchUrl)(t.url)?new v(t):new g(t)}))}},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.addLinkAttributes=function addLinkAttributes(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=r.url,o=r.target,l=r.rel,c=r.enabled,u=void 0===c||c;(0,i.assert)(a&&"string"==typeof a,'addLinkAttributes: A valid "url" parameter must provided.');var d=(0,i.removeNullCharacters)(a);if(u)t.href=t.title=d;else{t.href="";t.title="Disabled: ".concat(d);t.onclick=function(){return!1}}var h="";switch(o){case g.NONE:break;case g.SELF:h="_self";break;case g.BLANK:h="_blank";break;case g.PARENT:h="_parent";break;case g.TOP:h="_top"}t.target=h;t.rel="string"==typeof l?l:"noopener noreferrer nofollow"};r.getFilenameFromUrl=function getFilenameFromUrl(t){var r=t.indexOf("#"),a=t.indexOf("?"),o=Math.min(r>0?r:t.length,a>0?a:t.length);return t.substring(t.lastIndexOf("/",o)+1,o)};r.isFetchSupported=isFetchSupported;r.isValidFetchUrl=isValidFetchUrl;r.loadScript=function loadScript(t){return new Promise((function(r,a){var o=document.createElement("script");o.src=t;o.onload=r;o.onerror=function(){a(new Error("Cannot load script at: ".concat(o.src)))};(document.head||document.documentElement).appendChild(o)}))};r.deprecated=function deprecated(t){console.log("Deprecated API usage: "+t)};r.PDFDateString=r.StatTimer=r.DOMSVGFactory=r.DOMCMapReaderFactory=r.BaseCMapReaderFactory=r.DOMCanvasFactory=r.BaseCanvasFactory=r.DEFAULT_LINK_REL=r.LinkTarget=r.RenderingCancelledException=r.PageViewport=void 0;var o=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(2)),i=a(5);function _createForOfIteratorHelper(t,r){var a;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){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 o=0,i=function F(){};return{s:i,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:i}}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=t[Symbol.iterator]()},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,o=new Array(r);a<r;a++)o[a]=t[a];return o}function asyncGeneratorStep(t,r,a,o,i,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(o,i)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(o,i){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,o,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,o,i,_next,_throw,"throw",t)}_next(void 0)}))}}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(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}});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t})(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{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,o=_getPrototypeOf(t);if(r){var i=_getPrototypeOf(this).constructor;a=Reflect.construct(o,arguments,i)}else a=o.apply(this,arguments);return _possibleConstructorReturn(this,a)}}function _possibleConstructorReturn(t,r){return!r||"object"!==_typeof(r)&&"function"!=typeof r?function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):r}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)})(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 o=r[a];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);return t}r.DEFAULT_LINK_REL="noopener noreferrer nofollow";var l="http://www.w3.org/2000/svg",c=function(){function BaseCanvasFactory(){_classCallCheck(this,BaseCanvasFactory);this.constructor===BaseCanvasFactory&&(0,i.unreachable)("Cannot initialize BaseCanvasFactory.")}_createClass(BaseCanvasFactory,[{key:"create",value:function create(t,r){(0,i.unreachable)("Abstract method `create` called.")}},{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}}]);return BaseCanvasFactory}();r.BaseCanvasFactory=c;var u=function(t){_inherits(DOMCanvasFactory,t);var r=_createSuper(DOMCanvasFactory);function DOMCanvasFactory(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.ownerDocument,i=void 0===o?globalThis.document:o;_classCallCheck(this,DOMCanvasFactory);(t=r.call(this))._document=i;return t}_createClass(DOMCanvasFactory,[{key:"create",value:function create(t,r){if(t<=0||r<=0)throw new Error("Invalid canvas size");var a=this._document.createElement("canvas"),o=a.getContext("2d");a.width=t;a.height=r;return{canvas:a,context:o}}}]);return DOMCanvasFactory}(c);r.DOMCanvasFactory=u;var d=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(o.default.mark((function _callee(t){var r,a,l,c=this;return o.default.wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:r=t.name;if(this.baseUrl){o.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){o.next=5;break}throw new Error("CMap name must be specified.");case 5:a=this.baseUrl+r+(this.isCompressed?".bcmap":"");l=this.isCompressed?i.CMapCompressionType.BINARY:i.CMapCompressionType.NONE;return o.abrupt("return",this._fetchData(a,l).catch((function(t){throw new Error("Unable to load ".concat(c.isCompressed?"binary ":"","CMap at: ").concat(a))})));case 8:case"end":return o.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=d;var h=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){var a=this;return isFetchSupported()&&isValidFetchUrl(t,document.baseURI)?fetch(t).then(function(){var t=_asyncToGenerator(o.default.mark((function _callee2(t){var l;return o.default.wrap((function _callee2$(o){for(;;)switch(o.prev=o.next){case 0:if(t.ok){o.next=2;break}throw new Error(t.statusText);case 2:if(!a.isCompressed){o.next=10;break}o.t0=Uint8Array;o.next=6;return t.arrayBuffer();case 6:o.t1=o.sent;l=new o.t0(o.t1);o.next=15;break;case 10:o.t2=i.stringToBytes;o.next=13;return t.text();case 13:o.t3=o.sent;l=(0,o.t2)(o.t3);case 15:return o.abrupt("return",{cMapData:l,compressionType:r});case 16:case"end":return o.stop()}}),_callee2)})));return function(r){return t.apply(this,arguments)}}()):new Promise((function(o,l){var c=new XMLHttpRequest;c.open("GET",t,!0);a.isCompressed&&(c.responseType="arraybuffer");c.onreadystatechange=function(){if(c.readyState===XMLHttpRequest.DONE){if(200===c.status||0===c.status){var t;a.isCompressed&&c.response?t=new Uint8Array(c.response):!a.isCompressed&&c.responseText&&(t=(0,i.stringToBytes)(c.responseText));if(t){o({cMapData:t,compressionType:r});return}}l(new Error(c.statusText))}};c.send(null)}))}}]);return DOMCMapReaderFactory}(d);r.DOMCMapReaderFactory=h;var p=function(){function DOMSVGFactory(){_classCallCheck(this,DOMSVGFactory)}_createClass(DOMSVGFactory,[{key:"create",value:function create(t,r){(0,i.assert)(t>0&&r>0,"Invalid SVG dimensions");var a=document.createElementNS(l,"svg:svg");a.setAttribute("version","1.1");a.setAttribute("width",t+"px");a.setAttribute("height",r+"px");a.setAttribute("preserveAspectRatio","none");a.setAttribute("viewBox","0 0 "+t+" "+r);return a}},{key:"createElement",value:function createElement(t){(0,i.assert)("string"==typeof t,"Invalid SVG element type");return document.createElementNS(l,t)}}]);return DOMSVGFactory}();r.DOMSVGFactory=p;var m=function(){function PageViewport(t){var r=t.viewBox,a=t.scale,o=t.rotation,i=t.offsetX,l=void 0===i?0:i,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=o;this.offsetX=l;this.offsetY=u;var p,m,v,g,y,b,_,S,C=(r[2]+r[0])/2,A=(r[3]+r[1])/2;switch(o=(o%=360)<0?o+360:o){case 180:p=-1;m=0;v=0;g=1;break;case 90:p=0;m=1;v=1;g=0;break;case 270:p=0;m=-1;v=-1;g=0;break;case 0:p=1;m=0;v=0;g=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}if(h){v=-v;g=-g}if(0===p){y=Math.abs(A-r[1])*a+l;b=Math.abs(C-r[0])*a+u;_=Math.abs(r[3]-r[1])*a;S=Math.abs(r[2]-r[0])*a}else{y=Math.abs(C-r[0])*a+l;b=Math.abs(A-r[1])*a+u;_=Math.abs(r[2]-r[0])*a;S=Math.abs(r[3]-r[1])*a}this.transform=[p*a,m*a,v*a,g*a,y-p*a*C-v*a*A,b-m*a*C-g*a*A];this.width=_;this.height=S}_createClass(PageViewport,[{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,o=t.rotation,i=void 0===o?this.rotation:o,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:i,offsetX:c,offsetY:d,dontFlip:p})}},{key:"convertToViewportPoint",value:function convertToViewportPoint(t,r){return i.Util.applyTransform([t,r],this.transform)}},{key:"convertToViewportRectangle",value:function convertToViewportRectangle(t){var r=i.Util.applyTransform([t[0],t[1]],this.transform),a=i.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 i.Util.applyInverseTransform([t,r],this.transform)}}]);return PageViewport}();r.PageViewport=m;var v=function(t){_inherits(RenderingCancelledException,t);var r=_createSuper(RenderingCancelledException);function RenderingCancelledException(t,a){var o;_classCallCheck(this,RenderingCancelledException);(o=r.call(this,t)).type=a;return o}return RenderingCancelledException}(i.BaseException);r.RenderingCancelledException=v;var g={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};r.LinkTarget=g;var y,b=function(){function StatTimer(){_classCallCheck(this,StatTimer);this.started=Object.create(null);this.times=[]}_createClass(StatTimer,[{key:"time",value:function time(t){t in this.started&&(0,i.warn)("Timer is already running for ".concat(t));this.started[t]=Date.now()}},{key:"timeEnd",value:function timeEnd(t){t in this.started||(0,i.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,o=_createForOfIteratorHelper(this.times);try{for(o.s();!(t=o.n()).done;){var i=t.value.name;i.length>a&&(a=i.length)}}catch(t){o.e(t)}finally{o.f()}var l,c=_createForOfIteratorHelper(this.times);try{for(c.s();!(l=c.n()).done;){var u=l.value,d=u.end-u.start;r.push("".concat(u.name.padEnd(a)," ").concat(d,"ms\n"))}}catch(t){c.e(t)}finally{c.f()}return r.join("")}}]);return StatTimer}();r.StatTimer=b;function isFetchSupported(){return"undefined"!=typeof fetch&&"undefined"!=typeof Response&&"body"in Response.prototype&&"undefined"!=typeof ReadableStream}function isValidFetchUrl(t,r){try{var a=(r?new URL(t,r):new URL(t)).protocol;return"http:"===a||"https:"===a}catch(t){return!1}}var _=function(){function PDFDateString(){_classCallCheck(this,PDFDateString)}_createClass(PDFDateString,null,[{key:"toDateObject",value:function toDateObject(t){if(!t||!(0,i.isString)(t))return null;y||(y=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var r=y.exec(t);if(!r)return null;var a=parseInt(r[1],10),o=parseInt(r[2],10);o=o>=1&&o<=12?o-1:0;var l=parseInt(r[3],10);l=l>=1&&l<=31?l:1;var c=parseInt(r[4],10);c=c>=0&&c<=23?c:0;var u=parseInt(r[5],10);u=u>=0&&u<=59?u:0;var d=parseInt(r[6],10);d=d>=0&&d<=59?d:0;var h=r[7]||"Z",p=parseInt(r[8],10);p=p>=0&&p<=23?p:0;var m=parseInt(r[9],10)||0;m=m>=0&&m<=59?m:0;if("-"===h){c+=p;u+=m}else if("+"===h){c-=p;u-=m}return new Date(Date.UTC(a,o,l,c,u,d))}}]);return PDFDateString}();r.PDFDateString=_},function(t,r,a){"use strict";t.exports=a(3)},function(t,r,a){"use strict";(function(t){function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r=function(t){var r=Object.prototype,a=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,a){Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0});return t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,o){var i=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(i.prototype),c=new Context(o||[]);l._invoke=function makeInvokeMethod(t,r,a){var o="suspendedStart";return function invoke(i,l){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===i)throw l;return doneResult()}a.method=i;a.arg=l;for(;;){var c=a.delegate;if(c){var d=maybeInvokeDelegate(c,a);if(d){if(d===u)continue;return d}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===o){o="completed";throw a.arg}a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);o="executing";var h=tryCatch(t,r,a);if("normal"===h.type){o=a.done?"completed":"suspendedYield";if(h.arg===u)continue;return{value:h.arg,done:a.done}}if("throw"===h.type){o="completed";a.method="throw";a.arg=h.arg}}}}(t,a,c);return l}t.wrap=wrap;function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}var u={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};d[i]=function(){return this};var h=Object.getPrototypeOf,p=h&&h(h(values([])));p&&p!==r&&a.call(p,i)&&(d=p);var m=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);GeneratorFunction.prototype=m.constructor=GeneratorFunctionPrototype;GeneratorFunctionPrototype.constructor=GeneratorFunction;GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction");function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))};t.mark=function(t){if(Object.setPrototypeOf)Object.setPrototypeOf(t,GeneratorFunctionPrototype);else{t.__proto__=GeneratorFunctionPrototype;define(t,c,"GeneratorFunction")}t.prototype=Object.create(m);return t};t.awrap=function(t){return{__await:t}};function AsyncIterator(t,r){var o;this._invoke=function enqueue(i,l){function callInvokeWithMethodAndArg(){return new r((function(o,c){!function invoke(o,i,l,c){var u=tryCatch(t[o],t,i);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)}(i,l,o,c)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}defineIteratorMethods(AsyncIterator.prototype);AsyncIterator.prototype[l]=function(){return this};t.AsyncIterator=AsyncIterator;t.async=function(r,a,o,i,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(r,a,o,i),l);return t.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))};function maybeInvokeDelegate(t,r){var a=t.iterator[r.method];if(void 0===a){r.delegate=null;if("throw"===r.method){if(t.iterator.return){r.method="return";r.arg=void 0;maybeInvokeDelegate(t,r);if("throw"===r.method)return u}r.method="throw";r.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type){r.method="throw";r.arg=o.arg;r.delegate=null;return u}var i=o.arg;if(!i){r.method="throw";r.arg=new TypeError("iterator result is not an object");r.delegate=null;return u}if(!i.done)return i;r[t.resultName]=i.value;r.next=t.nextLoc;if("return"!==r.method){r.method="next";r.arg=void 0}r.delegate=null;return u}defineIteratorMethods(m);define(m,c,"Generator");m[i]=function(){return this};m.toString=function(){return"[object Generator]"};function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]);if(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)}t.keys=function(t){var r=[];for(var a in t)r.push(a);r.reverse();return function next(){for(;r.length;){var a=r.pop();if(a in t){next.value=a;next.done=!1;return next}}next.done=!0;return next}};function values(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,l=function next(){for(;++o<t.length;)if(a.call(t,o)){next.value=t[o];next.done=!1;return next}next.value=void 0;next.done=!0;return next};return l.next=l}}return{next:doneResult}}t.values=values;function doneResult(){return{value:void 0,done:!0}}Context.prototype={constructor:Context,reset:function reset(t){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);if(!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,o){l.type="throw";l.arg=t;r.next=a;if(o){r.method="next";r.arg=void 0}return!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],l=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),u=a.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o];if(i.tryLoc<=this.prev&&a.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var l=i;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};c.type=t;c.arg=r;if(l){this.method="next";this.next=l.finallyLoc;return u}return this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;if("break"===t.type||"continue"===t.type)this.next=t.arg;else if("return"===t.type){this.rval=this.arg=t.arg;this.method="return";this.next="end"}else"normal"===t.type&&r&&(this.next=r);return u},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t){this.complete(a.completion,a.afterLoc);resetTryEntry(a);return u}}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var o=a.completion;if("throw"===o.type){var i=o.arg;resetTryEntry(a)}return i}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,a){this.delegate={iterator:values(t),resultName:r,nextLoc:a};"next"===this.method&&(this.arg=void 0);return u}};return t}("object"===_typeof(t)?t.exports:{});try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}}).call(this,a(4)(t))},function(t,r,a){"use strict";t.exports=function(t){if(!t.webpackPolyfill){t.deprecate=function(){};t.paths=[];t.children||(t.children=[]);Object.defineProperty(t,"loaded",{enumerable:!0,get:function get(){return t.l}});Object.defineProperty(t,"id",{enumerable:!0,get:function get(){return t.i}});t.webpackPolyfill=1}return t}},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.arrayByteLength=arrayByteLength;r.arraysToBytes=function arraysToBytes(t){var r=t.length;if(1===r&&t[0]instanceof Uint8Array)return t[0];for(var a=0,o=0;o<r;o++)a+=arrayByteLength(t[o]);for(var i=0,l=new Uint8Array(a),c=0;c<r;c++){var u=t[c];u instanceof Uint8Array||(u="string"==typeof u?stringToBytes(u):new Uint8Array(u));var d=u.byteLength;l.set(u,i);i+=d}return l};r.assert=assert;r.bytesToString=function bytesToString(t){assert(null!==t&&"object"===_typeof(t)&&void 0!==t.length,"Invalid argument for bytesToString");var r=t.length;if(r<8192)return String.fromCharCode.apply(null,t);for(var a=[],o=0;o<r;o+=8192){var i=Math.min(o+8192,r),l=t.subarray(o,i);a.push(String.fromCharCode.apply(null,l))}return a.join("")};r.createPromiseCapability=function createPromiseCapability(){var t=Object.create(null),r=!1;Object.defineProperty(t,"settled",{get:function get(){return r}});t.promise=new Promise((function(a,o){t.resolve=function(t){r=!0;a(t)};t.reject=function(t){r=!0;o(t)}}));return t};r.escapeString=function escapeString(t){return t.replace(/([\(\)\\])/g,"\\$1")};r.getModificationDate=function getModificationDate(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date(Date.now()),r=[t.getUTCFullYear().toString(),(t.getUTCMonth()+1).toString().padStart(2,"0"),(t.getUTCDate()+1).toString().padStart(2,"0"),t.getUTCHours().toString().padStart(2,"0"),t.getUTCMinutes().toString().padStart(2,"0"),t.getUTCSeconds().toString().padStart(2,"0")];return r.join("")};r.getVerbosityLevel=function getVerbosityLevel(){return i};r.info=function info(t){i>=o.INFOS&&console.log("Info: ".concat(t))};r.isArrayBuffer=function isArrayBuffer(t){return"object"===_typeof(t)&&null!==t&&void 0!==t.byteLength};r.isArrayEqual=function isArrayEqual(t,r){if(t.length!==r.length)return!1;return t.every((function(t,a){return t===r[a]}))};r.isBool=function isBool(t){return"boolean"==typeof t};r.isNum=function isNum(t){return"number"==typeof t};r.isString=function isString(t){return"string"==typeof t};r.isSameOrigin=function isSameOrigin(t,r){var a;try{if(!(a=new URL(t)).origin||"null"===a.origin)return!1}catch(t){return!1}var o=new URL(r,a);return a.origin===o.origin};r.createValidAbsoluteUrl=function createValidAbsoluteUrl(t,r){if(!t)return null;try{var a=r?new URL(t,r):new URL(t);if(function _isValidProtocol(t){if(!t)return!1;switch(t.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(a))return a}catch(t){}return null};r.removeNullCharacters=function removeNullCharacters(t){if("string"!=typeof t){warn("The argument for removeNullCharacters must be a string.");return t}return t.replace(g,"")};r.setVerbosityLevel=function setVerbosityLevel(t){Number.isInteger(t)&&(i=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){var r=t.length,a=[];if("þ"===t[0]&&"ÿ"===t[1])for(var o=2;o<r;o+=2)a.push(String.fromCharCode(t.charCodeAt(o)<<8|t.charCodeAt(o+1)));else if("ÿ"===t[0]&&"þ"===t[1])for(var i=2;i<r;i+=2)a.push(String.fromCharCode(t.charCodeAt(i+1)<<8|t.charCodeAt(i)));else for(var l=0;l<r;++l){var c=C[t.charCodeAt(l)];a.push(c?String.fromCharCode(c):t.charAt(l))}return a.join("")};r.stringToUTF8String=function stringToUTF8String(t){return decodeURIComponent(escape(t))};r.utf8StringToString=function utf8StringToString(t){return unescape(encodeURIComponent(t))};r.warn=warn;r.unreachable=unreachable;r.IsEvalSupportedCached=r.IsLittleEndianCached=r.createObjectURL=r.FormatError=r.Util=r.UnknownErrorException=r.UnexpectedResponseException=r.TextRenderingMode=r.StreamType=r.PermissionFlag=r.PasswordResponses=r.PasswordException=r.MissingPDFException=r.InvalidPDFException=r.AbortException=r.CMapCompressionType=r.ImageKind=r.FontType=r.AnnotationType=r.AnnotationStateModelType=r.AnnotationReviewState=r.AnnotationReplyType=r.AnnotationMarkedState=r.AnnotationFlag=r.AnnotationFieldFlag=r.AnnotationBorderStyleType=r.UNSUPPORTED_FEATURES=r.VerbosityLevel=r.OPS=r.IDENTITY_MATRIX=r.FONT_IDENTITY_MATRIX=r.BaseException=void 0;a(6);function _defineProperties(t,r){for(var a=0;a<r.length;a++){var o=r[a];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(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}});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t})(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{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,o=_getPrototypeOf(t);if(r){var i=_getPrototypeOf(this).constructor;a=Reflect.construct(o,arguments,i)}else a=o.apply(this,arguments);return _possibleConstructorReturn(this,a)}}function _possibleConstructorReturn(t,r){return!r||"object"!==_typeof(r)&&"function"!=typeof r?function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):r}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.IDENTITY_MATRIX=[1,0,0,1,0,0];r.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0];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.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"};r.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"};r.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"};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.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"};r.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};var o={ERRORS:0,WARNINGS:1,INFOS:5};r.VerbosityLevel=o;r.CMapCompressionType={NONE:0,BINARY:1,STREAM:2};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,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};r.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font",errorTilingPattern:"errorTilingPattern",errorExtGState:"errorExtGState",errorXObject:"errorXObject",errorFontLoadType3:"errorFontLoadType3",errorFontState:"errorFontState",errorFontMissing:"errorFontMissing",errorFontTranslate:"errorFontTranslate",errorColorSpace:"errorColorSpace",errorOperatorList:"errorOperatorList",errorFontToUnicode:"errorFontToUnicode",errorFontLoadNative:"errorFontLoadNative",errorFontGetPath:"errorFontGetPath",errorMarkedContent:"errorMarkedContent"};r.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var i=o.WARNINGS;function warn(t){i>=o.WARNINGS&&console.log("Warning: ".concat(t))}function unreachable(t){throw new Error(t)}function assert(t,r){t||unreachable(r)}function shadow(t,r,a){Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!1});return a}var l=function BaseExceptionClosure(){function BaseException(t){this.constructor===BaseException&&unreachable("Cannot initialize BaseException.");this.message=t;this.name=this.constructor.name}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();r.BaseException=l;var c=function(t){_inherits(PasswordException,t);var r=_createSuper(PasswordException);function PasswordException(t,a){var o;_classCallCheck(this,PasswordException);(o=r.call(this,t)).code=a;return o}return PasswordException}(l);r.PasswordException=c;var u=function(t){_inherits(UnknownErrorException,t);var r=_createSuper(UnknownErrorException);function UnknownErrorException(t,a){var o;_classCallCheck(this,UnknownErrorException);(o=r.call(this,t)).details=a;return o}return UnknownErrorException}(l);r.UnknownErrorException=u;var d=function(t){_inherits(InvalidPDFException,t);var r=_createSuper(InvalidPDFException);function InvalidPDFException(){_classCallCheck(this,InvalidPDFException);return r.apply(this,arguments)}return InvalidPDFException}(l);r.InvalidPDFException=d;var h=function(t){_inherits(MissingPDFException,t);var r=_createSuper(MissingPDFException);function MissingPDFException(){_classCallCheck(this,MissingPDFException);return r.apply(this,arguments)}return MissingPDFException}(l);r.MissingPDFException=h;var p=function(t){_inherits(UnexpectedResponseException,t);var r=_createSuper(UnexpectedResponseException);function UnexpectedResponseException(t,a){var o;_classCallCheck(this,UnexpectedResponseException);(o=r.call(this,t)).status=a;return o}return UnexpectedResponseException}(l);r.UnexpectedResponseException=p;var m=function(t){_inherits(FormatError,t);var r=_createSuper(FormatError);function FormatError(){_classCallCheck(this,FormatError);return r.apply(this,arguments)}return FormatError}(l);r.FormatError=m;var v=function(t){_inherits(AbortException,t);var r=_createSuper(AbortException);function AbortException(){_classCallCheck(this,AbortException);return r.apply(this,arguments)}return AbortException}(l);r.AbortException=v;var g=/\x00/g;function stringToBytes(t){assert("string"==typeof t,"Invalid argument for stringToBytes");for(var r=t.length,a=new Uint8Array(r),o=0;o<r;++o)a[o]=255&t.charCodeAt(o);return a}function arrayByteLength(t){if(void 0!==t.length)return t.length;assert(void 0!==t.byteLength,"arrayByteLength - invalid argument.");return t.byteLength}var y={get value(){return shadow(this,"value",function isLittleEndian(){var t=new Uint8Array(4);t[0]=1;return 1===new Uint32Array(t.buffer,0,1)[0]}())}};r.IsLittleEndianCached=y;var b={get value(){return shadow(this,"value",function isEvalSupported(){try{new Function("");return!0}catch(t){return!1}}())}};r.IsEvalSupportedCached=b;var _=["rgb(",0,",",0,",",0,")"],S=function(){function Util(){_classCallCheck(this,Util)}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);return t}(Util,null,[{key:"makeCssRgb",value:function makeCssRgb(t,r,a){_[1]=t;_[3]=r;_[5]=a;return _.join("")}},{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=Util.applyTransform(t,r),o=Util.applyTransform(t.slice(2,4),r),i=Util.applyTransform([t[0],t[3]],r),l=Util.applyTransform([t[2],t[1]],r);return[Math.min(a[0],o[0],i[0],l[0]),Math.min(a[1],o[1],i[1],l[1]),Math.max(a[0],o[0],i[0],l[0]),Math.max(a[1],o[1],i[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:"apply3dTransform",value:function apply3dTransform(t,r){return[t[0]*r[0]+t[1]*r[1]+t[2]*r[2],t[3]*r[0]+t[4]*r[1]+t[5]*r[2],t[6]*r[0]+t[7]*r[1]+t[8]*r[2]]}},{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],o=t[0]*r[1]+t[1]*r[3],i=t[2]*r[0]+t[3]*r[2],l=t[2]*r[1]+t[3]*r[3],c=(a+l)/2,u=Math.sqrt((a+l)*(a+l)-4*(a*l-i*o))/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){function compare(t,r){return t-r}var a=[t[0],t[2],r[0],r[2]].sort(compare),o=[t[1],t[3],r[1],r[3]].sort(compare),i=[];t=Util.normalizeRect(t);r=Util.normalizeRect(r);if(!(a[0]===t[0]&&a[1]===r[0]||a[0]===r[0]&&a[1]===t[0]))return null;i[0]=a[1];i[2]=a[2];if(!(o[0]===t[1]&&o[1]===r[1]||o[0]===r[1]&&o[1]===t[1]))return null;i[1]=o[1];i[3]=o[2];return i}}]);return Util}();r.Util=S;var C=[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];var A=function createObjectURLClosure(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function createObjectURL(r,a){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!o&&URL.createObjectURL){var i=new Blob([r],{type:a});return URL.createObjectURL(i)}for(var l="data:".concat(a,";base64,"),c=0,u=r.length;c<u;c+=3){var d=255&r[c],h=255&r[c+1],p=255&r[c+2],m=d>>2,v=(3&d)<<4|h>>4,g=c+1<u?(15&h)<<2|p>>6:64,y=c+2<u?63&p:64;l+=t[m]+t[v]+t[g]+t[y]}return l}}();r.createObjectURL=A},function(t,r,a){"use strict";var o=a(7);function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}if("undefined"==typeof globalThis||!globalThis._pdfjsCompatibilityChecked){"undefined"!=typeof globalThis&&globalThis.Math===Math||(globalThis=a(8));globalThis._pdfjsCompatibilityChecked=!0;var i="object"===("undefined"==typeof window?"undefined":_typeof(window))&&"object"===("undefined"==typeof document?"undefined":_typeof(document)),l="undefined"!=typeof navigator&&navigator.userAgent||"",c=/Trident/.test(l);!function checkNodeBtoa(){!globalThis.btoa&&o.isNodeJS&&(globalThis.btoa=function(t){return Buffer.from(t,"binary").toString("base64")})}();!function checkNodeAtob(){!globalThis.atob&&o.isNodeJS&&(globalThis.atob=function(t){return Buffer.from(t,"base64").toString("binary")})}();!function checkChildNodeRemove(){i&&void 0===Element.prototype.remove&&(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)})}();!function checkDOMTokenListAddRemove(){if(i&&!o.isNodeJS){var t=document.createElement("div");t.classList.add("testOne","testTwo");if(!0!==t.classList.contains("testOne")||!0!==t.classList.contains("testTwo")){var r=DOMTokenList.prototype.add,a=DOMTokenList.prototype.remove;DOMTokenList.prototype.add=function(){for(var t=arguments.length,a=new Array(t),o=0;o<t;o++)a[o]=arguments[o];for(var i=0,l=a;i<l.length;i++){var c=l[i];r.call(this,c)}};DOMTokenList.prototype.remove=function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];for(var i=0,l=r;i<l.length;i++){var c=l[i];a.call(this,c)}}}}}();!function checkDOMTokenListToggle(){if(i&&!o.isNodeJS){!1!==document.createElement("div").classList.toggle("test",0)&&(DOMTokenList.prototype.toggle=function(t){var r=arguments.length>1?!!arguments[1]:!this.contains(t);return this[r?"add":"remove"](t),r})}}();!function checkWindowHistoryPushStateReplaceState(){if(i&&c){var t=window.history.pushState,r=window.history.replaceState;window.history.pushState=function(r,a,o){var i=void 0===o?[r,a]:[r,a,o];t.apply(this,i)};window.history.replaceState=function(t,a,o){var i=void 0===o?[t,a]:[t,a,o];r.apply(this,i)}}}();!function checkStringStartsWith(){String.prototype.startsWith||a(53)}();!function checkStringEndsWith(){String.prototype.endsWith||a(64)}();!function checkStringIncludes(){String.prototype.includes||a(66)}();!function checkArrayIncludes(){Array.prototype.includes||a(68)}();!function checkArrayFrom(){Array.from||a(76)}();!function checkObjectAssign(){Object.assign||a(98)}();!function checkObjectFromEntries(){Object.fromEntries||a(101)}();!function checkMathLog2(){Math.log2||(Math.log2=a(105))}();!function checkNumberIsNaN(){Number.isNaN||(Number.isNaN=a(107))}();!function checkNumberIsInteger(){Number.isInteger||(Number.isInteger=a(109))}();!function checkTypedArraySlice(){Uint8Array.prototype.slice||a(112)}();!function checkPromise(){globalThis.Promise&&globalThis.Promise.allSettled||(globalThis.Promise=a(117))}();!function checkURL(){globalThis.URL=a(138)}();!function checkReadableStream(){var t=!1;if("undefined"!=typeof ReadableStream)try{new ReadableStream({start:function start(t){t.close()}});t=!0}catch(t){}t||(globalThis.ReadableStream=a(145).ReadableStream)}();!function checkMapEntries(){globalThis.Map&&globalThis.Map.prototype.entries||(globalThis.Map=a(146))}();!function checkSetEntries(){globalThis.Set&&globalThis.Set.prototype.entries||(globalThis.Set=a(153))}();!function checkWeakMap(){globalThis.WeakMap||(globalThis.WeakMap=a(155))}();!function checkWeakSet(){globalThis.WeakSet||(globalThis.WeakSet=a(161))}();!function checkStringCodePointAt(){String.prototype.codePointAt||a(163)}();!function checkStringFromCodePoint(){String.fromCodePoint||(String.fromCodePoint=a(165))}();!function checkSymbol(){globalThis.Symbol||a(167)}();!function checkStringPadStart(){String.prototype.padStart||a(190)}();!function checkStringPadEnd(){String.prototype.padEnd||a(195)}();!function checkObjectValues(){Object.values||(Object.values=a(197))}();!function checkObjectEntries(){Object.entries||(Object.entries=a(200))}()}},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.isNodeJS=void 0;function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=!("object"!==("undefined"==typeof process?"undefined":_typeof(process))||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);r.isNodeJS=o},function(t,r,a){a(9);t.exports=a(11)},function(t,r,a){a(10)({global:!0},{globalThis:a(11)})},function(t,r,a){var o=a(11),i=a(12).f,l=a(26),c=a(29),u=a(30),d=a(40),h=a(52);t.exports=function(t,r){var a,p,m,v,g,y=t.target,b=t.global,_=t.stat;if(a=b?o:_?o[y]||u(y,{}):(o[y]||{}).prototype)for(p in r){v=r[p];m=t.noTargetGet?(g=i(a,p))&&g.value:a[p];if(!h(b?p:y+(_?".":"#")+p,t.forced)&&void 0!==m){if(typeof v==typeof m)continue;d(v,m)}(t.sham||m&&m.sham)&&l(v,"sham",!0);c(a,p,v,t)}}},function(t,r){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")()},function(t,r,a){var o=a(13),i=a(15),l=a(16),c=a(17),u=a(21),d=a(23),h=a(24),p=Object.getOwnPropertyDescriptor;r.f=o?p:function getOwnPropertyDescriptor(t,r){t=c(t);r=u(r,!0);if(h)try{return p(t,r)}catch(t){}if(d(t,r))return l(!i.f.call(t,r),t[r])}},function(t,r,a){var o=a(14);t.exports=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,r){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,r,a){"use strict";var o={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,l=i&&!o.call({1:2},1);r.f=l?function propertyIsEnumerable(t){var r=i(this,t);return!!r&&r.enumerable}:o},function(t,r){t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},function(t,r,a){var o=a(18),i=a(20);t.exports=function(t){return o(i(t))}},function(t,r,a){var o=a(14),i=a(19),l="".split;t.exports=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?l.call(t,""):Object(t)}:Object},function(t,r){var a={}.toString;t.exports=function(t){return a.call(t).slice(8,-1)}},function(t,r){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,r,a){var o=a(22);t.exports=function(t,r){if(!o(t))return t;var a,i;if(r&&"function"==typeof(a=t.toString)&&!o(i=a.call(t)))return i;if("function"==typeof(a=t.valueOf)&&!o(i=a.call(t)))return i;if(!r&&"function"==typeof(a=t.toString)&&!o(i=a.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,r){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,r){var a={}.hasOwnProperty;t.exports=function(t,r){return a.call(t,r)}},function(t,r,a){var o=a(13),i=a(14),l=a(25);t.exports=!o&&!i((function(){return 7!=Object.defineProperty(l("div"),"a",{get:function(){return 7}}).a}))},function(t,r,a){var o=a(11),i=a(22),l=o.document,c=i(l)&&i(l.createElement);t.exports=function(t){return c?l.createElement(t):{}}},function(t,r,a){var o=a(13),i=a(27),l=a(16);t.exports=o?function(t,r,a){return i.f(t,r,l(1,a))}:function(t,r,a){t[r]=a;return t}},function(t,r,a){var o=a(13),i=a(24),l=a(28),c=a(21),u=Object.defineProperty;r.f=o?u:function defineProperty(t,r,a){l(t);r=c(r,!0);l(a);if(i)try{return u(t,r,a)}catch(t){}if("get"in a||"set"in a)throw TypeError("Accessors not supported");"value"in a&&(t[r]=a.value);return t}},function(t,r,a){var o=a(22);t.exports=function(t){if(!o(t))throw TypeError(String(t)+" is not an object");return t}},function(t,r,a){var o=a(11),i=a(26),l=a(23),c=a(30),u=a(31),d=a(33),h=d.get,p=d.enforce,m=String(String).split("String");(t.exports=function(t,r,a,u){var d=!!u&&!!u.unsafe,h=!!u&&!!u.enumerable,v=!!u&&!!u.noTargetGet;if("function"==typeof a){"string"!=typeof r||l(a,"name")||i(a,"name",r);p(a).source=m.join("string"==typeof r?r:"")}if(t!==o){d?!v&&t[r]&&(h=!0):delete t[r];h?t[r]=a:i(t,r,a)}else h?t[r]=a:c(r,a)})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&h(this).source||u(this)}))},function(t,r,a){var o=a(11),i=a(26);t.exports=function(t,r){try{i(o,t,r)}catch(a){o[t]=r}return r}},function(t,r,a){var o=a(32),i=Function.toString;"function"!=typeof o.inspectSource&&(o.inspectSource=function(t){return i.call(t)});t.exports=o.inspectSource},function(t,r,a){var o=a(11),i=a(30),l=o["__core-js_shared__"]||i("__core-js_shared__",{});t.exports=l},function(t,r,a){var o,i,l,c=a(34),u=a(11),d=a(22),h=a(26),p=a(23),m=a(35),v=a(39),g=u.WeakMap;if(c){var y=new g,b=y.get,_=y.has,S=y.set;o=function(t,r){S.call(y,t,r);return r};i=function(t){return b.call(y,t)||{}};l=function(t){return _.call(y,t)}}else{var C=m("state");v[C]=!0;o=function(t,r){h(t,C,r);return r};i=function(t){return p(t,C)?t[C]:{}};l=function(t){return p(t,C)}}t.exports={set:o,get:i,has:l,enforce:function(t){return l(t)?i(t):o(t,{})},getterFor:function(t){return function(r){var a;if(!d(r)||(a=i(r)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return a}}}},function(t,r,a){var o=a(11),i=a(31),l=o.WeakMap;t.exports="function"==typeof l&&/native code/.test(i(l))},function(t,r,a){var o=a(36),i=a(38),l=o("keys");t.exports=function(t){return l[t]||(l[t]=i(t))}},function(t,r,a){var o=a(37),i=a(32);(t.exports=function(t,r){return i[t]||(i[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.6.5",mode:o?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(t,r){t.exports=!1},function(t,r){var a=0,o=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++a+o).toString(36)}},function(t,r){t.exports={}},function(t,r,a){var o=a(23),i=a(41),l=a(12),c=a(27);t.exports=function(t,r){for(var a=i(r),u=c.f,d=l.f,h=0;h<a.length;h++){var p=a[h];o(t,p)||u(t,p,d(r,p))}}},function(t,r,a){var o=a(42),i=a(44),l=a(51),c=a(28);t.exports=o("Reflect","ownKeys")||function ownKeys(t){var r=i.f(c(t)),a=l.f;return a?r.concat(a(t)):r}},function(t,r,a){var o=a(43),i=a(11),aFunction=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,r){return arguments.length<2?aFunction(o[t])||aFunction(i[t]):o[t]&&o[t][r]||i[t]&&i[t][r]}},function(t,r,a){var o=a(11);t.exports=o},function(t,r,a){var o=a(45),i=a(50).concat("length","prototype");r.f=Object.getOwnPropertyNames||function getOwnPropertyNames(t){return o(t,i)}},function(t,r,a){var o=a(23),i=a(17),l=a(46).indexOf,c=a(39);t.exports=function(t,r){var a,u=i(t),d=0,h=[];for(a in u)!o(c,a)&&o(u,a)&&h.push(a);for(;r.length>d;)o(u,a=r[d++])&&(~l(h,a)||h.push(a));return h}},function(t,r,a){var o=a(17),i=a(47),l=a(49),createMethod=function(t){return function(r,a,c){var u,d=o(r),h=i(d.length),p=l(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)}},function(t,r,a){var o=a(48),i=Math.min;t.exports=function(t){return t>0?i(o(t),9007199254740991):0}},function(t,r){var a=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?o:a)(t)}},function(t,r,a){var o=a(48),i=Math.max,l=Math.min;t.exports=function(t,r){var a=o(t);return a<0?i(a+r,0):l(a,r)}},function(t,r){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,r){r.f=Object.getOwnPropertySymbols},function(t,r,a){var o=a(14),i=/#|\.prototype\./,isForced=function(t,r){var a=c[l(t)];return a==d||a!=u&&("function"==typeof r?o(r):!!r)},l=isForced.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=isForced.data={},u=isForced.NATIVE="N",d=isForced.POLYFILL="P";t.exports=isForced},function(t,r,a){a(54);var o=a(61);t.exports=o("String","startsWith")},function(t,r,a){"use strict";var o,i=a(10),l=a(12).f,c=a(47),u=a(55),d=a(20),h=a(60),p=a(37),m="".startsWith,v=Math.min,g=h("startsWith");i({target:"String",proto:!0,forced:!(!p&&!g&&!!(o=l(String.prototype,"startsWith"),o&&!o.writable))&&!g},{startsWith:function startsWith(t){var r=String(d(this));u(t);var a=c(v(arguments.length>1?arguments[1]:void 0,r.length)),o=String(t);return m?m.call(r,o,a):r.slice(a,a+o.length)===o}})},function(t,r,a){var o=a(56);t.exports=function(t){if(o(t))throw TypeError("The method doesn't accept regular expressions");return t}},function(t,r,a){var o=a(22),i=a(19),l=a(57)("match");t.exports=function(t){var r;return o(t)&&(void 0!==(r=t[l])?!!r:"RegExp"==i(t))}},function(t,r,a){var o=a(11),i=a(36),l=a(23),c=a(38),u=a(58),d=a(59),h=i("wks"),p=o.Symbol,m=d?p:p&&p.withoutSetter||c;t.exports=function(t){l(h,t)||(u&&l(p,t)?h[t]=p[t]:h[t]=m("Symbol."+t));return h[t]}},function(t,r,a){var o=a(14);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){return!String(Symbol())}))},function(t,r,a){var o=a(58);t.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,r,a){var o=a(57)("match");t.exports=function(t){var r=/./;try{"/./"[t](r)}catch(a){try{r[o]=!1;return"/./"[t](r)}catch(t){}}return!1}},function(t,r,a){var o=a(11),i=a(62),l=Function.call;t.exports=function(t,r,a){return i(l,o[t].prototype[r],a)}},function(t,r,a){var o=a(63);t.exports=function(t,r,a){o(t);if(void 0===r)return t;switch(a){case 0:return function(){return t.call(r)};case 1:return function(a){return t.call(r,a)};case 2:return function(a,o){return t.call(r,a,o)};case 3:return function(a,o,i){return t.call(r,a,o,i)}}return function(){return t.apply(r,arguments)}}},function(t,r){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,r,a){a(65);var o=a(61);t.exports=o("String","endsWith")},function(t,r,a){"use strict";var o,i=a(10),l=a(12).f,c=a(47),u=a(55),d=a(20),h=a(60),p=a(37),m="".endsWith,v=Math.min,g=h("endsWith");i({target:"String",proto:!0,forced:!(!p&&!g&&!!(o=l(String.prototype,"endsWith"),o&&!o.writable))&&!g},{endsWith:function endsWith(t){var r=String(d(this));u(t);var a=arguments.length>1?arguments[1]:void 0,o=c(r.length),i=void 0===a?o:v(c(a),o),l=String(t);return m?m.call(r,l,i):r.slice(i-l.length,i)===l}})},function(t,r,a){a(67);var o=a(61);t.exports=o("String","includes")},function(t,r,a){"use strict";var o=a(10),i=a(55),l=a(20);o({target:"String",proto:!0,forced:!a(60)("includes")},{includes:function includes(t){return!!~String(l(this)).indexOf(i(t),arguments.length>1?arguments[1]:void 0)}})},function(t,r,a){a(69);var o=a(61);t.exports=o("Array","includes")},function(t,r,a){"use strict";var o=a(10),i=a(46).includes,l=a(70);o({target:"Array",proto:!0,forced:!a(75)("indexOf",{ACCESSORS:!0,1:0})},{includes:function includes(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}});l("includes")},function(t,r,a){var o=a(57),i=a(71),l=a(27),c=o("unscopables"),u=Array.prototype;null==u[c]&&l.f(u,c,{configurable:!0,value:i(null)});t.exports=function(t){u[c][t]=!0}},function(t,r,a){var o,i=a(28),l=a(72),c=a(50),u=a(39),d=a(74),h=a(25),p=a(35),m=p("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<script>"+t+"<\/script>"},NullProtoObject=function(){try{o=document.domain&&new ActiveXObject("htmlfile")}catch(t){}NullProtoObject=o?function(t){t.write(scriptTag(""));t.close();var r=t.parentWindow.Object;t=null;return r}(o):function(){var t,r=h("iframe");r.style.display="none";d.appendChild(r);r.src=String("javascript:");(t=r.contentWindow.document).open();t.write(scriptTag("document.F=Object"));t.close();return t.F}();for(var t=c.length;t--;)delete NullProtoObject.prototype[c[t]];return NullProtoObject()};u[m]=!0;t.exports=Object.create||function create(t,r){var a;if(null!==t){EmptyConstructor.prototype=i(t);a=new EmptyConstructor;EmptyConstructor.prototype=null;a[m]=t}else a=NullProtoObject();return void 0===r?a:l(a,r)}},function(t,r,a){var o=a(13),i=a(27),l=a(28),c=a(73);t.exports=o?Object.defineProperties:function defineProperties(t,r){l(t);for(var a,o=c(r),u=o.length,d=0;u>d;)i.f(t,a=o[d++],r[a]);return t}},function(t,r,a){var o=a(45),i=a(50);t.exports=Object.keys||function keys(t){return o(t,i)}},function(t,r,a){var o=a(42);t.exports=o("document","documentElement")},function(t,r,a){var o=a(13),i=a(14),l=a(23),c=Object.defineProperty,u={},thrower=function(t){throw t};t.exports=function(t,r){if(l(u,t))return u[t];r||(r={});var a=[][t],d=!!l(r,"ACCESSORS")&&r.ACCESSORS,h=l(r,0)?r[0]:thrower,p=l(r,1)?r[1]:void 0;return u[t]=!!a&&!i((function(){if(d&&!o)return!0;var t={length:-1};d?c(t,1,{enumerable:!0,get:thrower}):t[1]=1;a.call(t,h,p)}))}},function(t,r,a){a(77);a(89);var o=a(43);t.exports=o.Array.from},function(t,r,a){"use strict";var o=a(78).charAt,i=a(33),l=a(79),c=i.set,u=i.getterFor("String Iterator");l(String,"String",(function(t){c(this,{type:"String Iterator",string:String(t),index:0})}),(function next(){var t,r=u(this),a=r.string,i=r.index;if(i>=a.length)return{value:void 0,done:!0};t=o(a,i);r.index+=t.length;return{value:t,done:!1}}))},function(t,r,a){var o=a(48),i=a(20),createMethod=function(t){return function(r,a){var l,c,u=String(i(r)),d=o(a),h=u.length;return d<0||d>=h?t?"":void 0:(l=u.charCodeAt(d))<55296||l>56319||d+1===h||(c=u.charCodeAt(d+1))<56320||c>57343?t?u.charAt(d):l:t?u.slice(d,d+2):c-56320+(l-55296<<10)+65536}};t.exports={codeAt:createMethod(!1),charAt:createMethod(!0)}},function(t,r,a){"use strict";var o=a(10),i=a(80),l=a(82),c=a(87),u=a(85),d=a(26),h=a(29),p=a(57),m=a(37),v=a(86),g=a(81),y=g.IteratorPrototype,b=g.BUGGY_SAFARI_ITERATORS,_=p("iterator"),returnThis=function(){return this};t.exports=function(t,r,a,p,g,S,C){i(a,r,p);var A,R,k,getIterationMethod=function(t){if(t===g&&E)return E;if(!b&&t in x)return x[t];switch(t){case"keys":return function keys(){return new a(this,t)};case"values":return function values(){return new a(this,t)};case"entries":return function entries(){return new a(this,t)}}return function(){return new a(this)}},w=r+" Iterator",P=!1,x=t.prototype,T=x[_]||x["@@iterator"]||g&&x[g],E=!b&&T||getIterationMethod(g),O="Array"==r&&x.entries||T;if(O){A=l(O.call(new t));if(y!==Object.prototype&&A.next){m||l(A)===y||(c?c(A,y):"function"!=typeof A[_]&&d(A,_,returnThis));u(A,w,!0,!0);m&&(v[w]=returnThis)}}if("values"==g&&T&&"values"!==T.name){P=!0;E=function values(){return T.call(this)}}m&&!C||x[_]===E||d(x,_,E);v[r]=E;if(g){R={values:getIterationMethod("values"),keys:S?E:getIterationMethod("keys"),entries:getIterationMethod("entries")};if(C)for(k in R)(b||P||!(k in x))&&h(x,k,R[k]);else o({target:r,proto:!0,forced:b||P},R)}return R}},function(t,r,a){"use strict";var o=a(81).IteratorPrototype,i=a(71),l=a(16),c=a(85),u=a(86),returnThis=function(){return this};t.exports=function(t,r,a){var d=r+" Iterator";t.prototype=i(o,{next:l(1,a)});c(t,d,!1,!0);u[d]=returnThis;return t}},function(t,r,a){"use strict";var o,i,l,c=a(82),u=a(26),d=a(23),h=a(57),p=a(37),m=h("iterator"),v=!1;[].keys&&("next"in(l=[].keys())?(i=c(c(l)))!==Object.prototype&&(o=i):v=!0);null==o&&(o={});p||d(o,m)||u(o,m,(function(){return this}));t.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:v}},function(t,r,a){var o=a(23),i=a(83),l=a(35),c=a(84),u=l("IE_PROTO"),d=Object.prototype;t.exports=c?Object.getPrototypeOf:function(t){t=i(t);return o(t,u)?t[u]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?d:null}},function(t,r,a){var o=a(20);t.exports=function(t){return Object(o(t))}},function(t,r,a){var o=a(14);t.exports=!o((function(){function F(){}F.prototype.constructor=null;return Object.getPrototypeOf(new F)!==F.prototype}))},function(t,r,a){var o=a(27).f,i=a(23),l=a(57)("toStringTag");t.exports=function(t,r,a){t&&!i(t=a?t:t.prototype,l)&&o(t,l,{configurable:!0,value:r})}},function(t,r){t.exports={}},function(t,r,a){var o=a(28),i=a(88);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,a={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(a,[]);r=a instanceof Array}catch(t){}return function setPrototypeOf(a,l){o(a);i(l);r?t.call(a,l):a.__proto__=l;return a}}():void 0)},function(t,r,a){var o=a(22);t.exports=function(t){if(!o(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},function(t,r,a){var o=a(10),i=a(90);o({target:"Array",stat:!0,forced:!a(97)((function(t){Array.from(t)}))},{from:i})},function(t,r,a){"use strict";var o=a(62),i=a(83),l=a(91),c=a(92),u=a(47),d=a(93),h=a(94);t.exports=function from(t){var r,a,p,m,v,g,y=i(t),b="function"==typeof this?this:Array,_=arguments.length,S=_>1?arguments[1]:void 0,C=void 0!==S,A=h(y),R=0;C&&(S=o(S,_>2?arguments[2]:void 0,2));if(null==A||b==Array&&c(A)){a=new b(r=u(y.length));for(;r>R;R++){g=C?S(y[R],R):y[R];d(a,R,g)}}else{v=(m=A.call(y)).next;a=new b;for(;!(p=v.call(m)).done;R++){g=C?l(m,S,[p.value,R],!0):p.value;d(a,R,g)}}a.length=R;return a}},function(t,r,a){var o=a(28);t.exports=function(t,r,a,i){try{return i?r(o(a)[0],a[1]):r(a)}catch(r){var l=t.return;void 0!==l&&o(l.call(t));throw r}}},function(t,r,a){var o=a(57),i=a(86),l=o("iterator"),c=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||c[l]===t)}},function(t,r,a){"use strict";var o=a(21),i=a(27),l=a(16);t.exports=function(t,r,a){var c=o(r);c in t?i.f(t,c,l(0,a)):t[c]=a}},function(t,r,a){var o=a(95),i=a(86),l=a(57)("iterator");t.exports=function(t){if(null!=t)return t[l]||t["@@iterator"]||i[o(t)]}},function(t,r,a){var o=a(96),i=a(19),l=a(57)("toStringTag"),c="Arguments"==i(function(){return arguments}());t.exports=o?i:function(t){var r,a,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(a=function(t,r){try{return t[r]}catch(t){}}(r=Object(t),l))?a:c?i(r):"Object"==(o=i(r))&&"function"==typeof r.callee?"Arguments":o}},function(t,r,a){var o={};o[a(57)("toStringTag")]="z";t.exports="[object z]"===String(o)},function(t,r,a){var o=a(57)("iterator"),i=!1;try{var l=0,c={next:function(){return{done:!!l++}},return:function(){i=!0}};c[o]=function(){return this};Array.from(c,(function(){throw 2}))}catch(t){}t.exports=function(t,r){if(!r&&!i)return!1;var a=!1;try{var l={};l[o]=function(){return{next:function(){return{done:a=!0}}}};t(l)}catch(t){}return a}},function(t,r,a){a(99);var o=a(43);t.exports=o.Object.assign},function(t,r,a){var o=a(10),i=a(100);o({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},function(t,r,a){"use strict";var o=a(13),i=a(14),l=a(73),c=a(51),u=a(15),d=a(83),h=a(18),p=Object.assign,m=Object.defineProperty;t.exports=!p||i((function(){if(o&&1!==p({b:1},p(m({},"a",{enumerable:!0,get:function(){m(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},r={},a=Symbol();t[a]=7;"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t}));return 7!=p({},t)[a]||"abcdefghijklmnopqrst"!=l(p({},r)).join("")}))?function assign(t,r){for(var a=d(t),i=arguments.length,p=1,m=c.f,v=u.f;i>p;)for(var g,y=h(arguments[p++]),b=m?l(y).concat(m(y)):l(y),_=b.length,S=0;_>S;){g=b[S++];o&&!v.call(y,g)||(a[g]=y[g])}return a}:p},function(t,r,a){a(102);a(103);var o=a(43);t.exports=o.Object.fromEntries},function(t,r,a){"use strict";var o=a(17),i=a(70),l=a(86),c=a(33),u=a(79),d=c.set,h=c.getterFor("Array Iterator");t.exports=u(Array,"Array",(function(t,r){d(this,{type:"Array Iterator",target:o(t),index:0,kind:r})}),(function(){var t=h(this),r=t.target,a=t.kind,o=t.index++;if(!r||o>=r.length){t.target=void 0;return{value:void 0,done:!0}}return"keys"==a?{value:o,done:!1}:"values"==a?{value:r[o],done:!1}:{value:[o,r[o]],done:!1}}),"values");l.Arguments=l.Array;i("keys");i("values");i("entries")},function(t,r,a){var o=a(10),i=a(104),l=a(93);o({target:"Object",stat:!0},{fromEntries:function fromEntries(t){var r={};i(t,(function(t,a){l(r,t,a)}),void 0,!0);return r}})},function(t,r,a){var o=a(28),i=a(92),l=a(47),c=a(62),u=a(94),d=a(91),Result=function(t,r){this.stopped=t;this.result=r};(t.exports=function(t,r,a,h,p){var m,v,g,y,b,_,S,C=c(r,a,h?2:1);if(p)m=t;else{if("function"!=typeof(v=u(t)))throw TypeError("Target is not iterable");if(i(v)){for(g=0,y=l(t.length);y>g;g++)if((b=h?C(o(S=t[g])[0],S[1]):C(t[g]))&&b instanceof Result)return b;return new Result(!1)}m=v.call(t)}_=m.next;for(;!(S=_.call(m)).done;)if("object"==typeof(b=d(m,C,S.value,h))&&b&&b instanceof Result)return b;return new Result(!1)}).stop=function(t){return new Result(!0,t)}},function(t,r,a){a(106);var o=a(43);t.exports=o.Math.log2},function(t,r,a){var o=a(10),i=Math.log,l=Math.LN2;o({target:"Math",stat:!0},{log2:function log2(t){return i(t)/l}})},function(t,r,a){a(108);var o=a(43);t.exports=o.Number.isNaN},function(t,r,a){a(10)({target:"Number",stat:!0},{isNaN:function isNaN(t){return t!=t}})},function(t,r,a){a(110);var o=a(43);t.exports=o.Number.isInteger},function(t,r,a){a(10)({target:"Number",stat:!0},{isInteger:a(111)})},function(t,r,a){var o=a(22),i=Math.floor;t.exports=function isInteger(t){return!o(t)&&isFinite(t)&&i(t)===t}},function(t,r,a){a(113)},function(t,r,a){"use strict";var o=a(114),i=a(116),l=a(14),c=o.aTypedArray,u=o.aTypedArrayConstructor,d=o.exportTypedArrayMethod,h=[].slice;d("slice",(function slice(t,r){for(var a=h.call(c(this),t,r),o=i(this,this.constructor),l=0,d=a.length,p=new(u(o))(d);d>l;)p[l]=a[l++];return p}),l((function(){new Int8Array(1).slice()})))},function(t,r,a){"use strict";var o,i=a(115),l=a(13),c=a(11),u=a(22),d=a(23),h=a(95),p=a(26),m=a(29),v=a(27).f,g=a(82),y=a(87),b=a(57),_=a(38),S=c.Int8Array,C=S&&S.prototype,A=c.Uint8ClampedArray,R=A&&A.prototype,k=S&&g(S),w=C&&g(C),P=Object.prototype,x=P.isPrototypeOf,T=b("toStringTag"),E=_("TYPED_ARRAY_TAG"),O=i&&!!y&&"Opera"!==h(c.opera),I=!1,D={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},isTypedArray=function(t){return u(t)&&d(D,h(t))};for(o in D)c[o]||(O=!1);if(!O||"function"!=typeof k||k===Function.prototype){k=function TypedArray(){throw TypeError("Incorrect invocation")};if(O)for(o in D)c[o]&&y(c[o],k)}if(!O||!w||w===P){w=k.prototype;if(O)for(o in D)c[o]&&y(c[o].prototype,w)}O&&g(R)!==w&&y(R,w);if(l&&!d(w,T)){I=!0;v(w,T,{get:function(){return u(this)?this[E]:void 0}});for(o in D)c[o]&&p(c[o],E,o)}t.exports={NATIVE_ARRAY_BUFFER_VIEWS:O,TYPED_ARRAY_TAG:I&&E,aTypedArray:function(t){if(isTypedArray(t))return t;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(t){if(y){if(x.call(k,t))return t}else for(var r in D)if(d(D,o)){var a=c[r];if(a&&(t===a||x.call(a,t)))return t}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(t,r,a){if(l){if(a)for(var o in D){var i=c[o];i&&d(i.prototype,t)&&delete i.prototype[t]}w[t]&&!a||m(w,t,a?r:O&&C[t]||r)}},exportTypedArrayStaticMethod:function(t,r,a){var o,i;if(l){if(y){if(a)for(o in D)(i=c[o])&&d(i,t)&&delete i[t];if(k[t]&&!a)return;try{return m(k,t,a?r:O&&S[t]||r)}catch(t){}}for(o in D)!(i=c[o])||i[t]&&!a||m(i,t,r)}},isView:function isView(t){var r=h(t);return"DataView"===r||d(D,r)},isTypedArray:isTypedArray,TypedArray:k,TypedArrayPrototype:w}},function(t,r){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(t,r,a){var o=a(28),i=a(63),l=a(57)("species");t.exports=function(t,r){var a,c=o(t).constructor;return void 0===c||null==(a=o(c)[l])?r:i(a)}},function(t,r,a){a(118);a(77);a(120);a(122);a(136);a(137);var o=a(43);t.exports=o.Promise},function(t,r,a){var o=a(96),i=a(29),l=a(119);o||i(Object.prototype,"toString",l,{unsafe:!0})},function(t,r,a){"use strict";var o=a(96),i=a(95);t.exports=o?{}.toString:function toString(){return"[object "+i(this)+"]"}},function(t,r,a){var o=a(11),i=a(121),l=a(102),c=a(26),u=a(57),d=u("iterator"),h=u("toStringTag"),p=l.values;for(var m in i){var v=o[m],g=v&&v.prototype;if(g){if(g[d]!==p)try{c(g,d,p)}catch(t){g[d]=p}g[h]||c(g,h,m);if(i[m])for(var y in l)if(g[y]!==l[y])try{c(g,y,l[y])}catch(t){g[y]=l[y]}}}},function(t,r){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}},function(t,r,a){"use strict";var o,i,l,c,u=a(10),d=a(37),h=a(11),p=a(42),m=a(123),v=a(29),g=a(124),y=a(85),b=a(125),_=a(22),S=a(63),C=a(126),A=a(19),R=a(31),k=a(104),w=a(97),P=a(116),x=a(127).set,T=a(130),E=a(131),O=a(133),I=a(132),D=a(134),L=a(33),M=a(52),W=a(57),j=a(135),N=W("species"),B="Promise",q=L.get,G=L.set,U=L.getterFor(B),z=m,H=h.TypeError,V=h.document,Y=h.process,X=p("fetch"),Q=I.f,K=Q,J="process"==A(Y),$=!!(V&&V.createEvent&&h.dispatchEvent),Z=M(B,(function(){if(!(R(z)!==String(z))){if(66===j)return!0;if(!J&&"function"!=typeof PromiseRejectionEvent)return!0}if(d&&!z.prototype.finally)return!0;if(j>=51&&/native code/.test(z))return!1;var t=z.resolve(1),FakePromise=function(t){t((function(){}),(function(){}))};(t.constructor={})[N]=FakePromise;return!(t.then((function(){}))instanceof FakePromise)})),ee=Z||!w((function(t){z.all(t).catch((function(){}))})),isThenable=function(t){var r;return!(!_(t)||"function"!=typeof(r=t.then))&&r},notify=function(t,r,a){if(!r.notified){r.notified=!0;var o=r.reactions;T((function(){for(var i=r.value,l=1==r.state,c=0;o.length>c;){var u,d,h,p=o[c++],m=l?p.ok:p.fail,v=p.resolve,g=p.reject,y=p.domain;try{if(m){if(!l){2===r.rejection&&onHandleUnhandled(t,r);r.rejection=1}if(!0===m)u=i;else{y&&y.enter();u=m(i);if(y){y.exit();h=!0}}u===p.promise?g(H("Promise-chain cycle")):(d=isThenable(u))?d.call(u,v,g):v(u)}else g(i)}catch(t){y&&!h&&y.exit();g(t)}}r.reactions=[];r.notified=!1;a&&!r.rejection&&onUnhandled(t,r)}))}},dispatchEvent=function(t,r,a){var o,i;if($){(o=V.createEvent("Event")).promise=r;o.reason=a;o.initEvent(t,!1,!0);h.dispatchEvent(o)}else o={promise:r,reason:a};(i=h["on"+t])?i(o):"unhandledrejection"===t&&O("Unhandled promise rejection",a)},onUnhandled=function(t,r){x.call(h,(function(){var a,o=r.value;if(isUnhandled(r)){a=D((function(){J?Y.emit("unhandledRejection",o,t):dispatchEvent("unhandledrejection",t,o)}));r.rejection=J||isUnhandled(r)?2:1;if(a.error)throw a.value}}))},isUnhandled=function(t){return 1!==t.rejection&&!t.parent},onHandleUnhandled=function(t,r){x.call(h,(function(){J?Y.emit("rejectionHandled",t):dispatchEvent("rejectionhandled",t,r.value)}))},bind=function(t,r,a,o){return function(i){t(r,a,i,o)}},internalReject=function(t,r,a,o){if(!r.done){r.done=!0;o&&(r=o);r.value=a;r.state=2;notify(t,r,!0)}},internalResolve=function(t,r,a,o){if(!r.done){r.done=!0;o&&(r=o);try{if(t===a)throw H("Promise can't be resolved itself");var i=isThenable(a);if(i)T((function(){var o={done:!1};try{i.call(a,bind(internalResolve,t,o,r),bind(internalReject,t,o,r))}catch(a){internalReject(t,o,a,r)}}));else{r.value=a;r.state=1;notify(t,r,!1)}}catch(a){internalReject(t,{done:!1},a,r)}}};if(Z){z=function Promise(t){C(this,z,B);S(t);o.call(this);var r=q(this);try{t(bind(internalResolve,this,r),bind(internalReject,this,r))}catch(t){internalReject(this,r,t)}};(o=function Promise(t){G(this,{type:B,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=g(z.prototype,{then:function then(t,r){var a=U(this),o=Q(P(this,z));o.ok="function"!=typeof t||t;o.fail="function"==typeof r&&r;o.domain=J?Y.domain:void 0;a.parent=!0;a.reactions.push(o);0!=a.state&&notify(this,a,!1);return o.promise},catch:function(t){return this.then(void 0,t)}});i=function(){var t=new o,r=q(t);this.promise=t;this.resolve=bind(internalResolve,t,r);this.reject=bind(internalReject,t,r)};I.f=Q=function(t){return t===z||t===l?new i(t):K(t)};if(!d&&"function"==typeof m){c=m.prototype.then;v(m.prototype,"then",(function then(t,r){var a=this;return new z((function(t,r){c.call(a,t,r)})).then(t,r)}),{unsafe:!0});"function"==typeof X&&u({global:!0,enumerable:!0,forced:!0},{fetch:function fetch(t){return E(z,X.apply(h,arguments))}})}}u({global:!0,wrap:!0,forced:Z},{Promise:z});y(z,B,!1,!0);b(B);l=p(B);u({target:B,stat:!0,forced:Z},{reject:function reject(t){var r=Q(this);r.reject.call(void 0,t);return r.promise}});u({target:B,stat:!0,forced:d||Z},{resolve:function resolve(t){return E(d&&this===l?z:this,t)}});u({target:B,stat:!0,forced:ee},{all:function all(t){var r=this,a=Q(r),o=a.resolve,i=a.reject,l=D((function(){var a=S(r.resolve),l=[],c=0,u=1;k(t,(function(t){var d=c++,h=!1;l.push(void 0);u++;a.call(r,t).then((function(t){if(!h){h=!0;l[d]=t;--u||o(l)}}),i)}));--u||o(l)}));l.error&&i(l.value);return a.promise},race:function race(t){var r=this,a=Q(r),o=a.reject,i=D((function(){var i=S(r.resolve);k(t,(function(t){i.call(r,t).then(a.resolve,o)}))}));i.error&&o(i.value);return a.promise}})},function(t,r,a){var o=a(11);t.exports=o.Promise},function(t,r,a){var o=a(29);t.exports=function(t,r,a){for(var i in r)o(t,i,r[i],a);return t}},function(t,r,a){"use strict";var o=a(42),i=a(27),l=a(57),c=a(13),u=l("species");t.exports=function(t){var r=o(t),a=i.f;c&&r&&!r[u]&&a(r,u,{configurable:!0,get:function(){return this}})}},function(t,r){t.exports=function(t,r,a){if(!(t instanceof r))throw TypeError("Incorrect "+(a?a+" ":"")+"invocation");return t}},function(t,r,a){var o,i,l,c=a(11),u=a(14),d=a(19),h=a(62),p=a(74),m=a(25),v=a(128),g=c.location,y=c.setImmediate,b=c.clearImmediate,_=c.process,S=c.MessageChannel,C=c.Dispatch,A=0,R={},run=function(t){if(R.hasOwnProperty(t)){var r=R[t];delete R[t];r()}},runner=function(t){return function(){run(t)}},listener=function(t){run(t.data)},post=function(t){c.postMessage(t+"",g.protocol+"//"+g.host)};if(!y||!b){y=function setImmediate(t){for(var r=[],a=1;arguments.length>a;)r.push(arguments[a++]);R[++A]=function(){("function"==typeof t?t:Function(t)).apply(void 0,r)};o(A);return A};b=function clearImmediate(t){delete R[t]};if("process"==d(_))o=function(t){_.nextTick(runner(t))};else if(C&&C.now)o=function(t){C.now(runner(t))};else if(S&&!v){l=(i=new S).port2;i.port1.onmessage=listener;o=h(l.postMessage,l,1)}else if(!c.addEventListener||"function"!=typeof postMessage||c.importScripts||u(post)||"file:"===g.protocol)o="onreadystatechange"in m("script")?function(t){p.appendChild(m("script")).onreadystatechange=function(){p.removeChild(this);run(t)}}:function(t){setTimeout(runner(t),0)};else{o=post;c.addEventListener("message",listener,!1)}}t.exports={set:y,clear:b}},function(t,r,a){var o=a(129);t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(o)},function(t,r,a){var o=a(42);t.exports=o("navigator","userAgent")||""},function(t,r,a){var o,i,l,c,u,d,h,p,m=a(11),v=a(12).f,g=a(19),y=a(127).set,b=a(128),_=m.MutationObserver||m.WebKitMutationObserver,S=m.process,C=m.Promise,A="process"==g(S),R=v(m,"queueMicrotask"),k=R&&R.value;if(!k){o=function(){var t,r;A&&(t=S.domain)&&t.exit();for(;i;){r=i.fn;i=i.next;try{r()}catch(t){i?c():l=void 0;throw t}}l=void 0;t&&t.enter()};if(A)c=function(){S.nextTick(o)};else if(_&&!b){u=!0;d=document.createTextNode("");new _(o).observe(d,{characterData:!0});c=function(){d.data=u=!u}}else if(C&&C.resolve){h=C.resolve(void 0);p=h.then;c=function(){p.call(h,o)}}else c=function(){y.call(m,o)}}t.exports=k||function(t){var r={fn:t,next:void 0};l&&(l.next=r);if(!i){i=r;c()}l=r}},function(t,r,a){var o=a(28),i=a(22),l=a(132);t.exports=function(t,r){o(t);if(i(r)&&r.constructor===t)return r;var a=l.f(t);(0,a.resolve)(r);return a.promise}},function(t,r,a){"use strict";var o=a(63),PromiseCapability=function(t){var r,a;this.promise=new t((function(t,o){if(void 0!==r||void 0!==a)throw TypeError("Bad Promise constructor");r=t;a=o}));this.resolve=o(r);this.reject=o(a)};t.exports.f=function(t){return new PromiseCapability(t)}},function(t,r,a){var o=a(11);t.exports=function(t,r){var a=o.console;a&&a.error&&(1===arguments.length?a.error(t):a.error(t,r))}},function(t,r){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,r,a){var o,i,l=a(11),c=a(129),u=l.process,d=u&&u.versions,h=d&&d.v8;h?i=(o=h.split("."))[0]+o[1]:c&&(!(o=c.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=c.match(/Chrome\/(\d+)/))&&(i=o[1]);t.exports=i&&+i},function(t,r,a){"use strict";var o=a(10),i=a(63),l=a(132),c=a(134),u=a(104);o({target:"Promise",stat:!0},{allSettled:function allSettled(t){var r=this,a=l.f(r),o=a.resolve,d=a.reject,h=c((function(){var a=i(r.resolve),l=[],c=0,d=1;u(t,(function(t){var i=c++,u=!1;l.push(void 0);d++;a.call(r,t).then((function(t){if(!u){u=!0;l[i]={status:"fulfilled",value:t};--d||o(l)}}),(function(t){if(!u){u=!0;l[i]={status:"rejected",reason:t};--d||o(l)}}))}));--d||o(l)}));h.error&&d(h.value);return a.promise}})},function(t,r,a){"use strict";var o=a(10),i=a(37),l=a(123),c=a(14),u=a(42),d=a(116),h=a(131),p=a(29);o({target:"Promise",proto:!0,real:!0,forced:!!l&&c((function(){l.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var r=d(this,u("Promise")),a="function"==typeof t;return this.then(a?function(a){return h(r,t()).then((function(){return a}))}:t,a?function(a){return h(r,t()).then((function(){throw a}))}:t)}});i||"function"!=typeof l||l.prototype.finally||p(l.prototype,"finally",u("Promise").prototype.finally)},function(t,r,a){a(139);a(144);a(142);var o=a(43);t.exports=o.URL},function(t,r,a){"use strict";a(77);var o,i=a(10),l=a(13),c=a(140),u=a(11),d=a(72),h=a(29),p=a(126),m=a(23),v=a(100),g=a(90),y=a(78).codeAt,b=a(141),_=a(85),S=a(142),C=a(33),A=u.URL,R=S.URLSearchParams,k=S.getState,w=C.set,P=C.getterFor("URL"),x=Math.floor,T=Math.pow,E=/[A-Za-z]/,O=/[\d+-.A-Za-z]/,I=/\d/,D=/^(0x|0X)/,L=/^[0-7]+$/,M=/^\d+$/,W=/^[\dA-Fa-f]+$/,j=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,N=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,B=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,q=/[\u0009\u000A\u000D]/g,parseHost=function(t,r){var a,o,i;if("["==r.charAt(0)){if("]"!=r.charAt(r.length-1))return"Invalid host";if(!(a=parseIPv6(r.slice(1,-1))))return"Invalid host";t.host=a}else if(isSpecial(t)){r=b(r);if(j.test(r))return"Invalid host";if(null===(a=parseIPv4(r)))return"Invalid host";t.host=a}else{if(N.test(r))return"Invalid host";a="";o=g(r);for(i=0;i<o.length;i++)a+=percentEncode(o[i],G);t.host=a}},parseIPv4=function(t){var r,a,o,i,l,c,u,d=t.split(".");d.length&&""==d[d.length-1]&&d.pop();if((r=d.length)>4)return t;a=[];for(o=0;o<r;o++){if(""==(i=d[o]))return t;l=10;if(i.length>1&&"0"==i.charAt(0)){l=D.test(i)?16:8;i=i.slice(8==l?1:2)}if(""===i)c=0;else{if(!(10==l?M:8==l?L:W).test(i))return t;c=parseInt(i,l)}a.push(c)}for(o=0;o<r;o++){c=a[o];if(o==r-1){if(c>=T(256,5-r))return null}else if(c>255)return null}u=a.pop();for(o=0;o<a.length;o++)u+=a[o]*T(256,3-o);return u},parseIPv6=function(t){var r,a,o,i,l,c,u,d=[0,0,0,0,0,0,0,0],h=0,p=null,m=0,char=function(){return t.charAt(m)};if(":"==char()){if(":"!=t.charAt(1))return;m+=2;p=++h}for(;char();){if(8==h)return;if(":"!=char()){r=a=0;for(;a<4&&W.test(char());){r=16*r+parseInt(char(),16);m++;a++}if("."==char()){if(0==a)return;m-=a;if(h>6)return;o=0;for(;char();){i=null;if(o>0){if(!("."==char()&&o<4))return;m++}if(!I.test(char()))return;for(;I.test(char());){l=parseInt(char(),10);if(null===i)i=l;else{if(0==i)return;i=10*i+l}if(i>255)return;m++}d[h]=256*d[h]+i;2!=++o&&4!=o||h++}if(4!=o)return;break}if(":"==char()){m++;if(!char())return}else if(char())return;d[h++]=r}else{if(null!==p)return;m++;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},serializeHost=function(t){var r,a,o,i;if("number"==typeof t){r=[];for(a=0;a<4;a++){r.unshift(t%256);t=x(t/256)}return r.join(".")}if("object"==typeof t){r="";o=function(t){for(var r=null,a=1,o=null,i=0,l=0;l<8;l++)if(0!==t[l]){if(i>a){r=o;a=i}o=null;i=0}else{null===o&&(o=l);++i}if(i>a){r=o;a=i}return r}(t);for(a=0;a<8;a++)if(!i||0!==t[a]){i&&(i=!1);if(o===a){r+=a?":":"::";i=!0}else{r+=t[a].toString(16);a<7&&(r+=":")}}return"["+r+"]"}return t},G={},U=v({},G,{" ":1,'"':1,"<":1,">":1,"`":1}),z=v({},U,{"#":1,"?":1,"{":1,"}":1}),H=v({},z,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(t,r){var a=y(t,0);return a>32&&a<127&&!m(r,t)?t:encodeURIComponent(t)},V={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isSpecial=function(t){return m(V,t.scheme)},includesCredentials=function(t){return""!=t.username||""!=t.password},cannotHaveUsernamePasswordPort=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},isWindowsDriveLetter=function(t,r){var a;return 2==t.length&&E.test(t.charAt(0))&&(":"==(a=t.charAt(1))||!r&&"|"==a)},startsWithWindowsDriveLetter=function(t){var r;return t.length>1&&isWindowsDriveLetter(t.slice(0,2))&&(2==t.length||"/"===(r=t.charAt(2))||"\\"===r||"?"===r||"#"===r)},shortenURLsPath=function(t){var r=t.path,a=r.length;!a||"file"==t.scheme&&1==a&&isWindowsDriveLetter(r[0],!0)||r.pop()},isSingleDot=function(t){return"."===t||"%2e"===t.toLowerCase()},Y={},X={},Q={},K={},J={},$={},Z={},ee={},te={},re={},ne={},ae={},oe={},ie={},se={},le={},ce={},ue={},fe={},de={},he={},parseURL=function(t,r,a,i){var l,c,u,d,h,p=a||Y,v=0,y="",b=!1,_=!1,S=!1;if(!a){t.scheme="";t.username="";t.password="";t.host=null;t.port=null;t.path=[];t.query=null;t.fragment=null;t.cannotBeABaseURL=!1;r=r.replace(B,"")}r=r.replace(q,"");l=g(r);for(;v<=l.length;){c=l[v];switch(p){case Y:if(!c||!E.test(c)){if(a)return"Invalid scheme";p=Q;continue}y+=c.toLowerCase();p=X;break;case X:if(c&&(O.test(c)||"+"==c||"-"==c||"."==c))y+=c.toLowerCase();else{if(":"!=c){if(a)return"Invalid scheme";y="";p=Q;v=0;continue}if(a&&(isSpecial(t)!=m(V,y)||"file"==y&&(includesCredentials(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;t.scheme=y;if(a){isSpecial(t)&&V[t.scheme]==t.port&&(t.port=null);return}y="";if("file"==t.scheme)p=ie;else if(isSpecial(t)&&i&&i.scheme==t.scheme)p=K;else if(isSpecial(t))p=ee;else if("/"==l[v+1]){p=J;v++}else{t.cannotBeABaseURL=!0;t.path.push("");p=fe}}break;case Q:if(!i||i.cannotBeABaseURL&&"#"!=c)return"Invalid scheme";if(i.cannotBeABaseURL&&"#"==c){t.scheme=i.scheme;t.path=i.path.slice();t.query=i.query;t.fragment="";t.cannotBeABaseURL=!0;p=he;break}p="file"==i.scheme?ie:$;continue;case K:if("/"!=c||"/"!=l[v+1]){p=$;continue}p=te;v++;break;case J:if("/"==c){p=re;break}p=ue;continue;case $:t.scheme=i.scheme;if(c==o){t.username=i.username;t.password=i.password;t.host=i.host;t.port=i.port;t.path=i.path.slice();t.query=i.query}else if("/"==c||"\\"==c&&isSpecial(t))p=Z;else if("?"==c){t.username=i.username;t.password=i.password;t.host=i.host;t.port=i.port;t.path=i.path.slice();t.query="";p=de}else{if("#"!=c){t.username=i.username;t.password=i.password;t.host=i.host;t.port=i.port;t.path=i.path.slice();t.path.pop();p=ue;continue}t.username=i.username;t.password=i.password;t.host=i.host;t.port=i.port;t.path=i.path.slice();t.query=i.query;t.fragment="";p=he}break;case Z:if(!isSpecial(t)||"/"!=c&&"\\"!=c){if("/"!=c){t.username=i.username;t.password=i.password;t.host=i.host;t.port=i.port;p=ue;continue}p=re}else p=te;break;case ee:p=te;if("/"!=c||"/"!=y.charAt(v+1))continue;v++;break;case te:if("/"!=c&&"\\"!=c){p=re;continue}break;case re:if("@"==c){b&&(y="%40"+y);b=!0;u=g(y);for(var C=0;C<u.length;C++){var A=u[C];if(":"!=A||S){var R=percentEncode(A,H);S?t.password+=R:t.username+=R}else S=!0}y=""}else if(c==o||"/"==c||"?"==c||"#"==c||"\\"==c&&isSpecial(t)){if(b&&""==y)return"Invalid authority";v-=g(y).length+1;y="";p=ne}else y+=c;break;case ne:case ae:if(a&&"file"==t.scheme){p=le;continue}if(":"!=c||_){if(c==o||"/"==c||"?"==c||"#"==c||"\\"==c&&isSpecial(t)){if(isSpecial(t)&&""==y)return"Invalid host";if(a&&""==y&&(includesCredentials(t)||null!==t.port))return;if(d=parseHost(t,y))return d;y="";p=ce;if(a)return;continue}"["==c?_=!0:"]"==c&&(_=!1);y+=c}else{if(""==y)return"Invalid host";if(d=parseHost(t,y))return d;y="";p=oe;if(a==ae)return}break;case oe:if(!I.test(c)){if(c==o||"/"==c||"?"==c||"#"==c||"\\"==c&&isSpecial(t)||a){if(""!=y){var k=parseInt(y,10);if(k>65535)return"Invalid port";t.port=isSpecial(t)&&k===V[t.scheme]?null:k;y=""}if(a)return;p=ce;continue}return"Invalid port"}y+=c;break;case ie:t.scheme="file";if("/"==c||"\\"==c)p=se;else{if(!i||"file"!=i.scheme){p=ue;continue}if(c==o){t.host=i.host;t.path=i.path.slice();t.query=i.query}else if("?"==c){t.host=i.host;t.path=i.path.slice();t.query="";p=de}else{if("#"!=c){if(!startsWithWindowsDriveLetter(l.slice(v).join(""))){t.host=i.host;t.path=i.path.slice();shortenURLsPath(t)}p=ue;continue}t.host=i.host;t.path=i.path.slice();t.query=i.query;t.fragment="";p=he}}break;case se:if("/"==c||"\\"==c){p=le;break}i&&"file"==i.scheme&&!startsWithWindowsDriveLetter(l.slice(v).join(""))&&(isWindowsDriveLetter(i.path[0],!0)?t.path.push(i.path[0]):t.host=i.host);p=ue;continue;case le:if(c==o||"/"==c||"\\"==c||"?"==c||"#"==c){if(!a&&isWindowsDriveLetter(y))p=ue;else if(""==y){t.host="";if(a)return;p=ce}else{if(d=parseHost(t,y))return d;"localhost"==t.host&&(t.host="");if(a)return;y="";p=ce}continue}y+=c;break;case ce:if(isSpecial(t)){p=ue;if("/"!=c&&"\\"!=c)continue}else if(a||"?"!=c)if(a||"#"!=c){if(c!=o){p=ue;if("/"!=c)continue}}else{t.fragment="";p=he}else{t.query="";p=de}break;case ue:if(c==o||"/"==c||"\\"==c&&isSpecial(t)||!a&&("?"==c||"#"==c)){if(".."===(h=(h=y).toLowerCase())||"%2e."===h||".%2e"===h||"%2e%2e"===h){shortenURLsPath(t);"/"==c||"\\"==c&&isSpecial(t)||t.path.push("")}else if(isSingleDot(y))"/"==c||"\\"==c&&isSpecial(t)||t.path.push("");else{if("file"==t.scheme&&!t.path.length&&isWindowsDriveLetter(y)){t.host&&(t.host="");y=y.charAt(0)+":"}t.path.push(y)}y="";if("file"==t.scheme&&(c==o||"?"==c||"#"==c))for(;t.path.length>1&&""===t.path[0];)t.path.shift();if("?"==c){t.query="";p=de}else if("#"==c){t.fragment="";p=he}}else y+=percentEncode(c,z);break;case fe:if("?"==c){t.query="";p=de}else if("#"==c){t.fragment="";p=he}else c!=o&&(t.path[0]+=percentEncode(c,G));break;case de:if(a||"#"!=c)c!=o&&("'"==c&&isSpecial(t)?t.query+="%27":t.query+="#"==c?"%23":percentEncode(c,G));else{t.fragment="";p=he}break;case he:c!=o&&(t.fragment+=percentEncode(c,U))}v++}},pe=function URL(t){var r,a,o=p(this,pe,"URL"),i=arguments.length>1?arguments[1]:void 0,c=String(t),u=w(o,{type:"URL"});if(void 0!==i)if(i instanceof pe)r=P(i);else if(a=parseURL(r={},String(i)))throw TypeError(a);if(a=parseURL(u,c,null,r))throw TypeError(a);var d=u.searchParams=new R,h=k(d);h.updateSearchParams(u.query);h.updateURL=function(){u.query=String(d)||null};if(!l){o.href=serializeURL.call(o);o.origin=getOrigin.call(o);o.protocol=getProtocol.call(o);o.username=getUsername.call(o);o.password=getPassword.call(o);o.host=getHost.call(o);o.hostname=getHostname.call(o);o.port=getPort.call(o);o.pathname=getPathname.call(o);o.search=getSearch.call(o);o.searchParams=getSearchParams.call(o);o.hash=getHash.call(o)}},me=pe.prototype,serializeURL=function(){var t=P(this),r=t.scheme,a=t.username,o=t.password,i=t.host,l=t.port,c=t.path,u=t.query,d=t.fragment,h=r+":";if(null!==i){h+="//";includesCredentials(t)&&(h+=a+(o?":"+o:"")+"@");h+=serializeHost(i);null!==l&&(h+=":"+l)}else"file"==r&&(h+="//");h+=t.cannotBeABaseURL?c[0]:c.length?"/"+c.join("/"):"";null!==u&&(h+="?"+u);null!==d&&(h+="#"+d);return h},getOrigin=function(){var t=P(this),r=t.scheme,a=t.port;if("blob"==r)try{return new URL(r.path[0]).origin}catch(t){return"null"}return"file"!=r&&isSpecial(t)?r+"://"+serializeHost(t.host)+(null!==a?":"+a:""):"null"},getProtocol=function(){return P(this).scheme+":"},getUsername=function(){return P(this).username},getPassword=function(){return P(this).password},getHost=function(){var t=P(this),r=t.host,a=t.port;return null===r?"":null===a?serializeHost(r):serializeHost(r)+":"+a},getHostname=function(){var t=P(this).host;return null===t?"":serializeHost(t)},getPort=function(){var t=P(this).port;return null===t?"":String(t)},getPathname=function(){var t=P(this),r=t.path;return t.cannotBeABaseURL?r[0]:r.length?"/"+r.join("/"):""},getSearch=function(){var t=P(this).query;return t?"?"+t:""},getSearchParams=function(){return P(this).searchParams},getHash=function(){var t=P(this).fragment;return t?"#"+t:""},accessorDescriptor=function(t,r){return{get:t,set:r,configurable:!0,enumerable:!0}};l&&d(me,{href:accessorDescriptor(serializeURL,(function(t){var r=P(this),a=String(t),o=parseURL(r,a);if(o)throw TypeError(o);k(r.searchParams).updateSearchParams(r.query)})),origin:accessorDescriptor(getOrigin),protocol:accessorDescriptor(getProtocol,(function(t){var r=P(this);parseURL(r,String(t)+":",Y)})),username:accessorDescriptor(getUsername,(function(t){var r=P(this),a=g(String(t));if(!cannotHaveUsernamePasswordPort(r)){r.username="";for(var o=0;o<a.length;o++)r.username+=percentEncode(a[o],H)}})),password:accessorDescriptor(getPassword,(function(t){var r=P(this),a=g(String(t));if(!cannotHaveUsernamePasswordPort(r)){r.password="";for(var o=0;o<a.length;o++)r.password+=percentEncode(a[o],H)}})),host:accessorDescriptor(getHost,(function(t){var r=P(this);r.cannotBeABaseURL||parseURL(r,String(t),ne)})),hostname:accessorDescriptor(getHostname,(function(t){var r=P(this);r.cannotBeABaseURL||parseURL(r,String(t),ae)})),port:accessorDescriptor(getPort,(function(t){var r=P(this);cannotHaveUsernamePasswordPort(r)||(""==(t=String(t))?r.port=null:parseURL(r,t,oe))})),pathname:accessorDescriptor(getPathname,(function(t){var r=P(this);if(!r.cannotBeABaseURL){r.path=[];parseURL(r,t+"",ce)}})),search:accessorDescriptor(getSearch,(function(t){var r=P(this);if(""==(t=String(t)))r.query=null;else{"?"==t.charAt(0)&&(t=t.slice(1));r.query="";parseURL(r,t,de)}k(r.searchParams).updateSearchParams(r.query)})),searchParams:accessorDescriptor(getSearchParams),hash:accessorDescriptor(getHash,(function(t){var r=P(this);if(""!=(t=String(t))){"#"==t.charAt(0)&&(t=t.slice(1));r.fragment="";parseURL(r,t,he)}else r.fragment=null}))});h(me,"toJSON",(function toJSON(){return serializeURL.call(this)}),{enumerable:!0});h(me,"toString",(function toString(){return serializeURL.call(this)}),{enumerable:!0});if(A){var ve=A.createObjectURL,ge=A.revokeObjectURL;ve&&h(pe,"createObjectURL",(function createObjectURL(t){return ve.apply(A,arguments)}));ge&&h(pe,"revokeObjectURL",(function revokeObjectURL(t){return ge.apply(A,arguments)}))}_(pe,"URL");i({global:!0,forced:!c,sham:!l},{URL:pe})},function(t,r,a){var o=a(14),i=a(57),l=a(37),c=i("iterator");t.exports=!o((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),r=t.searchParams,a="";t.pathname="c%20d";r.forEach((function(t,o){r.delete("b");a+=o+t}));return l&&!t.toJSON||!r.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==r.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!r[c]||"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"!==a||"x"!==new URL("http://x",void 0).host}))},function(t,r,a){"use strict";var o=/[^\0-\u007E]/,i=/[.\u3002\uFF0E\uFF61]/g,l="Overflow: input needs wider integers to process",c=Math.floor,u=String.fromCharCode,digitToBasic=function(t){return t+22+75*(t<26)},adapt=function(t,r,a){var o=0;t=a?c(t/700):t>>1;t+=c(t/r);for(;t>455;o+=36)t=c(t/35);return c(o+36*t/(t+38))},encode=function(t){var r,a,o=[],i=(t=function(t){for(var r=[],a=0,o=t.length;a<o;){var i=t.charCodeAt(a++);if(i>=55296&&i<=56319&&a<o){var l=t.charCodeAt(a++);if(56320==(64512&l))r.push(((1023&i)<<10)+(1023&l)+65536);else{r.push(i);a--}}else r.push(i)}return r}(t)).length,d=128,h=0,p=72;for(r=0;r<t.length;r++)(a=t[r])<128&&o.push(u(a));var m=o.length,v=m;m&&o.push("-");for(;v<i;){var g=2147483647;for(r=0;r<t.length;r++)(a=t[r])>=d&&a<g&&(g=a);var y=v+1;if(g-d>c((2147483647-h)/y))throw RangeError(l);h+=(g-d)*y;d=g;for(r=0;r<t.length;r++){if((a=t[r])<d&&++h>2147483647)throw RangeError(l);if(a==d){for(var b=h,_=36;;_+=36){var S=_<=p?1:_>=p+26?26:_-p;if(b<S)break;var C=b-S,A=36-S;o.push(u(digitToBasic(S+C%A)));b=c(C/A)}o.push(u(digitToBasic(b)));p=adapt(h,y,v==m);h=0;++v}}++h;++d}return o.join("")};t.exports=function(t){var r,a,l=[],c=t.toLowerCase().replace(i,".").split(".");for(r=0;r<c.length;r++){a=c[r];l.push(o.test(a)?"xn--"+encode(a):a)}return l.join(".")}},function(t,r,a){"use strict";a(102);var o=a(10),i=a(42),l=a(140),c=a(29),u=a(124),d=a(85),h=a(80),p=a(33),m=a(126),v=a(23),g=a(62),y=a(95),b=a(28),_=a(22),S=a(71),C=a(16),A=a(143),R=a(94),k=a(57),w=i("fetch"),P=i("Headers"),x=k("iterator"),T=p.set,E=p.getterFor("URLSearchParams"),O=p.getterFor("URLSearchParamsIterator"),I=/\+/g,D=Array(4),percentSequence=function(t){return D[t-1]||(D[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},percentDecode=function(t){try{return decodeURIComponent(t)}catch(r){return t}},deserialize=function(t){var r=t.replace(I," "),a=4;try{return decodeURIComponent(r)}catch(t){for(;a;)r=r.replace(percentSequence(a--),percentDecode);return r}},L=/[!'()~]|%20/g,M={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(t){return M[t]},serialize=function(t){return encodeURIComponent(t).replace(L,replacer)},parseSearchParams=function(t,r){if(r)for(var a,o,i=r.split("&"),l=0;l<i.length;)if((a=i[l++]).length){o=a.split("=");t.push({key:deserialize(o.shift()),value:deserialize(o.join("="))})}},updateSearchParams=function(t){this.entries.length=0;parseSearchParams(this.entries,t)},validateArgumentsLength=function(t,r){if(t<r)throw TypeError("Not enough arguments")},W=h((function Iterator(t,r){T(this,{type:"URLSearchParamsIterator",iterator:A(E(t).entries),kind:r})}),"Iterator",(function next(){var t=O(this),r=t.kind,a=t.iterator.next(),o=a.value;a.done||(a.value="keys"===r?o.key:"values"===r?o.value:[o.key,o.value]);return a})),j=function URLSearchParams(){m(this,j,"URLSearchParams");var t,r,a,o,i,l,c,u,d,h=arguments.length>0?arguments[0]:void 0,p=this,g=[];T(p,{type:"URLSearchParams",entries:g,updateURL:function(){},updateSearchParams:updateSearchParams});if(void 0!==h)if(_(h))if("function"==typeof(t=R(h))){a=(r=t.call(h)).next;for(;!(o=a.call(r)).done;){if((c=(l=(i=A(b(o.value))).next).call(i)).done||(u=l.call(i)).done||!l.call(i).done)throw TypeError("Expected sequence with length 2");g.push({key:c.value+"",value:u.value+""})}}else for(d in h)v(h,d)&&g.push({key:d,value:h[d]+""});else parseSearchParams(g,"string"==typeof h?"?"===h.charAt(0)?h.slice(1):h:h+"")},N=j.prototype;u(N,{append:function append(t,r){validateArgumentsLength(arguments.length,2);var a=E(this);a.entries.push({key:t+"",value:r+""});a.updateURL()},delete:function(t){validateArgumentsLength(arguments.length,1);for(var r=E(this),a=r.entries,o=t+"",i=0;i<a.length;)a[i].key===o?a.splice(i,1):i++;r.updateURL()},get:function get(t){validateArgumentsLength(arguments.length,1);for(var r=E(this).entries,a=t+"",o=0;o<r.length;o++)if(r[o].key===a)return r[o].value;return null},getAll:function getAll(t){validateArgumentsLength(arguments.length,1);for(var r=E(this).entries,a=t+"",o=[],i=0;i<r.length;i++)r[i].key===a&&o.push(r[i].value);return o},has:function has(t){validateArgumentsLength(arguments.length,1);for(var r=E(this).entries,a=t+"",o=0;o<r.length;)if(r[o++].key===a)return!0;return!1},set:function set(t,r){validateArgumentsLength(arguments.length,1);for(var a,o=E(this),i=o.entries,l=!1,c=t+"",u=r+"",d=0;d<i.length;d++)if((a=i[d]).key===c)if(l)i.splice(d--,1);else{l=!0;a.value=u}l||i.push({key:c,value:u});o.updateURL()},sort:function sort(){var t,r,a,o=E(this),i=o.entries,l=i.slice();i.length=0;for(a=0;a<l.length;a++){t=l[a];for(r=0;r<a;r++)if(i[r].key>t.key){i.splice(r,0,t);break}r===a&&i.push(t)}o.updateURL()},forEach:function forEach(t){for(var r,a=E(this).entries,o=g(t,arguments.length>1?arguments[1]:void 0,3),i=0;i<a.length;)o((r=a[i++]).value,r.key,this)},keys:function keys(){return new W(this,"keys")},values:function values(){return new W(this,"values")},entries:function entries(){return new W(this,"entries")}},{enumerable:!0});c(N,x,N.entries);c(N,"toString",(function toString(){for(var t,r=E(this).entries,a=[],o=0;o<r.length;){t=r[o++];a.push(serialize(t.key)+"="+serialize(t.value))}return a.join("&")}),{enumerable:!0});d(j,"URLSearchParams");o({global:!0,forced:!l},{URLSearchParams:j});l||"function"!=typeof w||"function"!=typeof P||o({global:!0,enumerable:!0,forced:!0},{fetch:function fetch(t){var r,a,o,i=[t];if(arguments.length>1){if(_(r=arguments[1])){a=r.body;if("URLSearchParams"===y(a)){(o=r.headers?new P(r.headers):new P).has("content-type")||o.set("content-type","application/x-www-form-urlencoded;charset=UTF-8");r=S(r,{body:C(0,String(a)),headers:C(0,o)})}}i.push(r)}return w.apply(this,i)}});t.exports={URLSearchParams:j,getState:E}},function(t,r,a){var o=a(28),i=a(94);t.exports=function(t){var r=i(t);if("function"!=typeof r)throw TypeError(String(t)+" is not iterable");return o(r.call(t))}},function(t,r,a){"use strict";a(10)({target:"URL",proto:!0,enumerable:!0},{toJSON:function toJSON(){return URL.prototype.toString.call(this)}})},function(t,r,a){!function(t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:function(t){return"Symbol("+t+")"};function noop(){}var a=Number.isNaN||function(t){return t!=t},o=noop;function typeIsObject(t){return"object"==typeof t&&null!==t||"function"==typeof t}function createArrayFromList(t){return t.slice()}function IsFiniteNonNegativeNumber(t){return!1!==function IsNonNegativeNumber(t){return"number"==typeof t&&(!a(t)&&!(t<0))}(t)&&t!==1/0}function Call(t,r,a){if("function"!=typeof t)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(t,r,a)}function CreateAlgorithmFromUnderlyingMethod(t,r,a,o){var i=t[r];if(void 0!==i){if("function"!=typeof i)throw new TypeError(i+" is not a method");switch(a){case 0:return function(){return PromiseCall(i,t,o)};case 1:return function(r){var a=[r].concat(o);return PromiseCall(i,t,a)}}}return function(){return promiseResolvedWith(void 0)}}function InvokeOrNoop(t,r,a){var o=t[r];if(void 0!==o)return Call(o,t,a)}function PromiseCall(t,r,a){try{return promiseResolvedWith(Call(t,r,a))}catch(t){return promiseRejectedWith(t)}}function ValidateAndNormalizeHighWaterMark(t){t=Number(t);if(a(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function MakeSizeAlgorithmFromSizeFunction(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new TypeError("size property of a queuing strategy must be a function");return function(r){return t(r)}}var i=Promise,l=Promise.prototype.then,c=Promise.resolve.bind(i),u=Promise.reject.bind(i);function newPromise(t){return new i(t)}function promiseResolvedWith(t){return c(t)}function promiseRejectedWith(t){return u(t)}function PerformPromiseThen(t,r,a){return l.call(t,r,a)}function uponPromise(t,r,a){PerformPromiseThen(PerformPromiseThen(t,r,a),void 0,o)}function uponFulfillment(t,r){uponPromise(t,r)}function uponRejection(t,r){uponPromise(t,void 0,r)}function transformPromiseWith(t,r,a){return PerformPromiseThen(t,r,a)}function setPromiseIsHandledToTrue(t){PerformPromiseThen(t,void 0,o)}var d=function(){function SimpleQueue(){this._cursor=0;this._size=0;this._front={_elements:[],_next:void 0};this._back=this._front;this._cursor=0;this._size=0}Object.defineProperty(SimpleQueue.prototype,"length",{get:function(){return this._size},enumerable:!0,configurable:!0});SimpleQueue.prototype.push=function(t){var r=this._back,a=r;16383===r._elements.length&&(a={_elements:[],_next:void 0});r._elements.push(t);if(a!==r){this._back=a;r._next=a}++this._size};SimpleQueue.prototype.shift=function(){var t=this._front,r=t,a=this._cursor,o=a+1,i=t._elements,l=i[a];if(16384===o){r=t._next;o=0}--this._size;this._cursor=o;t!==r&&(this._front=r);i[a]=void 0;return l};SimpleQueue.prototype.forEach=function(t){for(var r=this._cursor,a=this._front,o=a._elements;r!==o.length||void 0!==a._next;){if(r===o.length){r=0;if(0===(o=(a=a._next)._elements).length)break}t(o[r]);++r}};SimpleQueue.prototype.peek=function(){var t=this._front,r=this._cursor;return t._elements[r]};return SimpleQueue}();function ReadableStreamCreateReadResult(t,r,a){var o=null;!0===a&&(o=Object.prototype);var i=Object.create(o);i.value=t;i.done=r;return i}function ReadableStreamReaderGenericInitialize(t,r){t._forAuthorCode=!0;t._ownerReadableStream=r;r._reader=t;"readable"===r._state?defaultReaderClosedPromiseInitialize(t):"closed"===r._state?function defaultReaderClosedPromiseInitializeAsResolved(t){defaultReaderClosedPromiseInitialize(t);defaultReaderClosedPromiseResolve(t)}(t):defaultReaderClosedPromiseInitializeAsRejected(t,r._storedError)}function ReadableStreamReaderGenericCancel(t,r){return ReadableStreamCancel(t._ownerReadableStream,r)}function ReadableStreamReaderGenericRelease(t){"readable"===t._ownerReadableStream._state?defaultReaderClosedPromiseReject(t,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function defaultReaderClosedPromiseResetToRejected(t,r){defaultReaderClosedPromiseInitializeAsRejected(t,r)}(t,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness"));t._ownerReadableStream._reader=void 0;t._ownerReadableStream=void 0}function readerLockException(t){return new TypeError("Cannot "+t+" a stream using a released reader")}function defaultReaderClosedPromiseInitialize(t){t._closedPromise=newPromise((function(r,a){t._closedPromise_resolve=r;t._closedPromise_reject=a}))}function defaultReaderClosedPromiseInitializeAsRejected(t,r){defaultReaderClosedPromiseInitialize(t);defaultReaderClosedPromiseReject(t,r)}function defaultReaderClosedPromiseReject(t,r){setPromiseIsHandledToTrue(t._closedPromise);t._closedPromise_reject(r);t._closedPromise_resolve=void 0;t._closedPromise_reject=void 0}function defaultReaderClosedPromiseResolve(t){t._closedPromise_resolve(void 0);t._closedPromise_resolve=void 0;t._closedPromise_reject=void 0}var h=r("[[CancelSteps]]"),p=r("[[PullSteps]]");function AcquireReadableStreamDefaultReader(t,r){void 0===r&&(r=!1);var a=new g(t);a._forAuthorCode=r;return a}function ReadableStreamAddReadRequest(t){return newPromise((function(r,a){var o={_resolve:r,_reject:a};t._reader._readRequests.push(o)}))}function ReadableStreamFulfillReadRequest(t,r,a){var o=t._reader;o._readRequests.shift()._resolve(ReadableStreamCreateReadResult(r,a,o._forAuthorCode))}function ReadableStreamGetNumReadRequests(t){return t._reader._readRequests.length}function ReadableStreamHasDefaultReader(t){var r=t._reader;return void 0!==r&&!!IsReadableStreamDefaultReader(r)}var m,v,g=function(){function ReadableStreamDefaultReader(t){if(!1===IsReadableStream(t))throw new TypeError("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===IsReadableStreamLocked(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");ReadableStreamReaderGenericInitialize(this,t);this._readRequests=new d}Object.defineProperty(ReadableStreamDefaultReader.prototype,"closed",{get:function(){return IsReadableStreamDefaultReader(this)?this._closedPromise:promiseRejectedWith(defaultReaderBrandCheckException("closed"))},enumerable:!0,configurable:!0});ReadableStreamDefaultReader.prototype.cancel=function(t){return IsReadableStreamDefaultReader(this)?void 0===this._ownerReadableStream?promiseRejectedWith(readerLockException("cancel")):ReadableStreamReaderGenericCancel(this,t):promiseRejectedWith(defaultReaderBrandCheckException("cancel"))};ReadableStreamDefaultReader.prototype.read=function(){return IsReadableStreamDefaultReader(this)?void 0===this._ownerReadableStream?promiseRejectedWith(readerLockException("read from")):ReadableStreamDefaultReaderRead(this):promiseRejectedWith(defaultReaderBrandCheckException("read"))};ReadableStreamDefaultReader.prototype.releaseLock=function(){if(!IsReadableStreamDefaultReader(this))throw defaultReaderBrandCheckException("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");ReadableStreamReaderGenericRelease(this)}};return ReadableStreamDefaultReader}();function IsReadableStreamDefaultReader(t){return!!typeIsObject(t)&&!!Object.prototype.hasOwnProperty.call(t,"_readRequests")}function ReadableStreamDefaultReaderRead(t){var r=t._ownerReadableStream;r._disturbed=!0;return"closed"===r._state?promiseResolvedWith(ReadableStreamCreateReadResult(void 0,!0,t._forAuthorCode)):"errored"===r._state?promiseRejectedWith(r._storedError):r._readableStreamController[p]()}function defaultReaderBrandCheckException(t){return new TypeError("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}if("symbol"==typeof r.asyncIterator){v=((m={})[r.asyncIterator]=function(){return this},m);Object.defineProperty(v,r.asyncIterator,{enumerable:!1})}var y={next:function(){if(!1===IsReadableStreamAsyncIterator(this))return promiseRejectedWith(streamAsyncIteratorBrandCheckException("next"));var t=this._asyncIteratorReader;return void 0===t._ownerReadableStream?promiseRejectedWith(readerLockException("iterate")):transformPromiseWith(ReadableStreamDefaultReaderRead(t),(function(r){var a=r.done;a&&ReadableStreamReaderGenericRelease(t);return ReadableStreamCreateReadResult(r.value,a,!0)}))},return:function(t){if(!1===IsReadableStreamAsyncIterator(this))return promiseRejectedWith(streamAsyncIteratorBrandCheckException("next"));var r=this._asyncIteratorReader;if(void 0===r._ownerReadableStream)return promiseRejectedWith(readerLockException("finish iterating"));if(r._readRequests.length>0)return promiseRejectedWith(new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this._preventCancel){var a=ReadableStreamReaderGenericCancel(r,t);ReadableStreamReaderGenericRelease(r);return transformPromiseWith(a,(function(){return ReadableStreamCreateReadResult(t,!0,!0)}))}ReadableStreamReaderGenericRelease(r);return promiseResolvedWith(ReadableStreamCreateReadResult(t,!0,!0))}};void 0!==v&&Object.setPrototypeOf(y,v);Object.defineProperty(y,"next",{enumerable:!1});Object.defineProperty(y,"return",{enumerable:!1});function IsReadableStreamAsyncIterator(t){return!!typeIsObject(t)&&!!Object.prototype.hasOwnProperty.call(t,"_asyncIteratorReader")}function streamAsyncIteratorBrandCheckException(t){return new TypeError("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function DequeueValue(t){var r=t._queue.shift();t._queueTotalSize-=r.size;t._queueTotalSize<0&&(t._queueTotalSize=0);return r.value}function EnqueueValueWithSize(t,r,a){if(!IsFiniteNonNegativeNumber(a=Number(a)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t._queue.push({value:r,size:a});t._queueTotalSize+=a}function ResetQueue(t){t._queue=new d;t._queueTotalSize=0}var b=r("[[AbortSteps]]"),_=r("[[ErrorSteps]]"),S=function(){function WritableStream(t,r){void 0===t&&(t={});void 0===r&&(r={});InitializeWritableStream(this);var a=r.size,o=r.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var i=MakeSizeAlgorithmFromSizeFunction(a);void 0===o&&(o=1);!function SetUpWritableStreamDefaultControllerFromUnderlyingSink(t,r,a,o){var i=Object.create(A.prototype),l=CreateAlgorithmFromUnderlyingMethod(r,"write",1,[i]),c=CreateAlgorithmFromUnderlyingMethod(r,"close",0,[]),u=CreateAlgorithmFromUnderlyingMethod(r,"abort",1,[]);SetUpWritableStreamDefaultController(t,i,(function startAlgorithm(){return InvokeOrNoop(r,"start",[i])}),l,c,u,a,o)}(this,t,o=ValidateAndNormalizeHighWaterMark(o),i)}Object.defineProperty(WritableStream.prototype,"locked",{get:function(){if(!1===IsWritableStream(this))throw streamBrandCheckException("locked");return IsWritableStreamLocked(this)},enumerable:!0,configurable:!0});WritableStream.prototype.abort=function(t){return!1===IsWritableStream(this)?promiseRejectedWith(streamBrandCheckException("abort")):!0===IsWritableStreamLocked(this)?promiseRejectedWith(new TypeError("Cannot abort a stream that already has a writer")):WritableStreamAbort(this,t)};WritableStream.prototype.close=function(){return!1===IsWritableStream(this)?promiseRejectedWith(streamBrandCheckException("close")):!0===IsWritableStreamLocked(this)?promiseRejectedWith(new TypeError("Cannot close a stream that already has a writer")):!0===WritableStreamCloseQueuedOrInFlight(this)?promiseRejectedWith(new TypeError("Cannot close an already-closing stream")):WritableStreamClose(this)};WritableStream.prototype.getWriter=function(){if(!1===IsWritableStream(this))throw streamBrandCheckException("getWriter");return AcquireWritableStreamDefaultWriter(this)};return WritableStream}();function AcquireWritableStreamDefaultWriter(t){return new C(t)}function InitializeWritableStream(t){t._state="writable";t._storedError=void 0;t._writer=void 0;t._writableStreamController=void 0;t._writeRequests=new d;t._inFlightWriteRequest=void 0;t._closeRequest=void 0;t._inFlightCloseRequest=void 0;t._pendingAbortRequest=void 0;t._backpressure=!1}function IsWritableStream(t){return!!typeIsObject(t)&&!!Object.prototype.hasOwnProperty.call(t,"_writableStreamController")}function IsWritableStreamLocked(t){return void 0!==t._writer}function WritableStreamAbort(t,r){var a=t._state;if("closed"===a||"errored"===a)return promiseResolvedWith(void 0);if(void 0!==t._pendingAbortRequest)return t._pendingAbortRequest._promise;var o=!1;if("erroring"===a){o=!0;r=void 0}var i=newPromise((function(a,i){t._pendingAbortRequest={_promise:void 0,_resolve:a,_reject:i,_reason:r,_wasAlreadyErroring:o}}));t._pendingAbortRequest._promise=i;!1===o&&WritableStreamStartErroring(t,r);return i}function WritableStreamClose(t){var r=t._state;if("closed"===r||"errored"===r)return promiseRejectedWith(new TypeError("The stream (in "+r+" state) is not in the writable state and cannot be closed"));var a=newPromise((function(r,a){var o={_resolve:r,_reject:a};t._closeRequest=o})),o=t._writer;void 0!==o&&!0===t._backpressure&&"writable"===r&&defaultWriterReadyPromiseResolve(o);!function WritableStreamDefaultControllerClose(t){EnqueueValueWithSize(t,"close",0);WritableStreamDefaultControllerAdvanceQueueIfNeeded(t)}(t._writableStreamController);return a}function WritableStreamDealWithRejection(t,r){"writable"!==t._state?WritableStreamFinishErroring(t):WritableStreamStartErroring(t,r)}function WritableStreamStartErroring(t,r){var a=t._writableStreamController;t._state="erroring";t._storedError=r;var o=t._writer;void 0!==o&&WritableStreamDefaultWriterEnsureReadyPromiseRejected(o,r);!1===function WritableStreamHasOperationMarkedInFlight(t){return void 0!==t._inFlightWriteRequest||void 0!==t._inFlightCloseRequest}(t)&&!0===a._started&&WritableStreamFinishErroring(t)}function WritableStreamFinishErroring(t){t._state="errored";t._writableStreamController[_]();var r=t._storedError;t._writeRequests.forEach((function(t){t._reject(r)}));t._writeRequests=new d;if(void 0!==t._pendingAbortRequest){var a=t._pendingAbortRequest;t._pendingAbortRequest=void 0;if(!0!==a._wasAlreadyErroring)uponPromise(t._writableStreamController[b](a._reason),(function(){a._resolve();WritableStreamRejectCloseAndClosedPromiseIfNeeded(t)}),(function(r){a._reject(r);WritableStreamRejectCloseAndClosedPromiseIfNeeded(t)}));else{a._reject(r);WritableStreamRejectCloseAndClosedPromiseIfNeeded(t)}}else WritableStreamRejectCloseAndClosedPromiseIfNeeded(t)}function WritableStreamCloseQueuedOrInFlight(t){return void 0!==t._closeRequest||void 0!==t._inFlightCloseRequest}function WritableStreamRejectCloseAndClosedPromiseIfNeeded(t){if(void 0!==t._closeRequest){t._closeRequest._reject(t._storedError);t._closeRequest=void 0}var r=t._writer;void 0!==r&&defaultWriterClosedPromiseReject(r,t._storedError)}function WritableStreamUpdateBackpressure(t,r){var a=t._writer;void 0!==a&&r!==t._backpressure&&(!0===r?function defaultWriterReadyPromiseReset(t){defaultWriterReadyPromiseInitialize(t)}(a):defaultWriterReadyPromiseResolve(a));t._backpressure=r}var C=function(){function WritableStreamDefaultWriter(t){if(!1===IsWritableStream(t))throw new TypeError("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===IsWritableStreamLocked(t))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=t;t._writer=this;var r=t._state;if("writable"===r){!1===WritableStreamCloseQueuedOrInFlight(t)&&!0===t._backpressure?defaultWriterReadyPromiseInitialize(this):defaultWriterReadyPromiseInitializeAsResolved(this);defaultWriterClosedPromiseInitialize(this)}else if("erroring"===r){defaultWriterReadyPromiseInitializeAsRejected(this,t._storedError);defaultWriterClosedPromiseInitialize(this)}else if("closed"===r){defaultWriterReadyPromiseInitializeAsResolved(this);!function defaultWriterClosedPromiseInitializeAsResolved(t){defaultWriterClosedPromiseInitialize(t);defaultWriterClosedPromiseResolve(t)}(this)}else{var a=t._storedError;defaultWriterReadyPromiseInitializeAsRejected(this,a);defaultWriterClosedPromiseInitializeAsRejected(this,a)}}Object.defineProperty(WritableStreamDefaultWriter.prototype,"closed",{get:function(){return!1===IsWritableStreamDefaultWriter(this)?promiseRejectedWith(defaultWriterBrandCheckException("closed")):this._closedPromise},enumerable:!0,configurable:!0});Object.defineProperty(WritableStreamDefaultWriter.prototype,"desiredSize",{get:function(){if(!1===IsWritableStreamDefaultWriter(this))throw defaultWriterBrandCheckException("desiredSize");if(void 0===this._ownerWritableStream)throw defaultWriterLockException("desiredSize");return function WritableStreamDefaultWriterGetDesiredSize(t){var r=t._ownerWritableStream,a=r._state;return"errored"===a||"erroring"===a?null:"closed"===a?0:WritableStreamDefaultControllerGetDesiredSize(r._writableStreamController)}(this)},enumerable:!0,configurable:!0});Object.defineProperty(WritableStreamDefaultWriter.prototype,"ready",{get:function(){return!1===IsWritableStreamDefaultWriter(this)?promiseRejectedWith(defaultWriterBrandCheckException("ready")):this._readyPromise},enumerable:!0,configurable:!0});WritableStreamDefaultWriter.prototype.abort=function(t){return!1===IsWritableStreamDefaultWriter(this)?promiseRejectedWith(defaultWriterBrandCheckException("abort")):void 0===this._ownerWritableStream?promiseRejectedWith(defaultWriterLockException("abort")):function WritableStreamDefaultWriterAbort(t,r){return WritableStreamAbort(t._ownerWritableStream,r)}(this,t)};WritableStreamDefaultWriter.prototype.close=function(){if(!1===IsWritableStreamDefaultWriter(this))return promiseRejectedWith(defaultWriterBrandCheckException("close"));var t=this._ownerWritableStream;return void 0===t?promiseRejectedWith(defaultWriterLockException("close")):!0===WritableStreamCloseQueuedOrInFlight(t)?promiseRejectedWith(new TypeError("Cannot close an already-closing stream")):WritableStreamDefaultWriterClose(this)};WritableStreamDefaultWriter.prototype.releaseLock=function(){if(!1===IsWritableStreamDefaultWriter(this))throw defaultWriterBrandCheckException("releaseLock");void 0!==this._ownerWritableStream&&WritableStreamDefaultWriterRelease(this)};WritableStreamDefaultWriter.prototype.write=function(t){return!1===IsWritableStreamDefaultWriter(this)?promiseRejectedWith(defaultWriterBrandCheckException("write")):void 0===this._ownerWritableStream?promiseRejectedWith(defaultWriterLockException("write to")):WritableStreamDefaultWriterWrite(this,t)};return WritableStreamDefaultWriter}();function IsWritableStreamDefaultWriter(t){return!!typeIsObject(t)&&!!Object.prototype.hasOwnProperty.call(t,"_ownerWritableStream")}function WritableStreamDefaultWriterClose(t){return WritableStreamClose(t._ownerWritableStream)}function WritableStreamDefaultWriterEnsureClosedPromiseRejected(t,r){"pending"===t._closedPromiseState?defaultWriterClosedPromiseReject(t,r):function defaultWriterClosedPromiseResetToRejected(t,r){defaultWriterClosedPromiseInitializeAsRejected(t,r)}(t,r)}function WritableStreamDefaultWriterEnsureReadyPromiseRejected(t,r){"pending"===t._readyPromiseState?defaultWriterReadyPromiseReject(t,r):function defaultWriterReadyPromiseResetToRejected(t,r){defaultWriterReadyPromiseInitializeAsRejected(t,r)}(t,r)}function WritableStreamDefaultWriterRelease(t){var r=t._ownerWritableStream,a=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");WritableStreamDefaultWriterEnsureReadyPromiseRejected(t,a);WritableStreamDefaultWriterEnsureClosedPromiseRejected(t,a);r._writer=void 0;t._ownerWritableStream=void 0}function WritableStreamDefaultWriterWrite(t,r){var a=t._ownerWritableStream,o=a._writableStreamController,i=function WritableStreamDefaultControllerGetChunkSize(t,r){try{return t._strategySizeAlgorithm(r)}catch(r){WritableStreamDefaultControllerErrorIfNeeded(t,r);return 1}}(o,r);if(a!==t._ownerWritableStream)return promiseRejectedWith(defaultWriterLockException("write to"));var l=a._state;if("errored"===l)return promiseRejectedWith(a._storedError);if(!0===WritableStreamCloseQueuedOrInFlight(a)||"closed"===l)return promiseRejectedWith(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===l)return promiseRejectedWith(a._storedError);var c=function WritableStreamAddWriteRequest(t){return newPromise((function(r,a){var o={_resolve:r,_reject:a};t._writeRequests.push(o)}))}(a);!function WritableStreamDefaultControllerWrite(t,r,a){var o={chunk:r};try{EnqueueValueWithSize(t,o,a)}catch(r){WritableStreamDefaultControllerErrorIfNeeded(t,r);return}var i=t._controlledWritableStream;if(!1===WritableStreamCloseQueuedOrInFlight(i)&&"writable"===i._state){var l=WritableStreamDefaultControllerGetBackpressure(t);WritableStreamUpdateBackpressure(i,l)}WritableStreamDefaultControllerAdvanceQueueIfNeeded(t)}(o,r,i);return c}var A=function(){function WritableStreamDefaultController(){throw new TypeError("WritableStreamDefaultController cannot be constructed explicitly")}WritableStreamDefaultController.prototype.error=function(t){if(!1===function IsWritableStreamDefaultController(t){return!!typeIsObject(t)&&!!Object.prototype.hasOwnProperty.call(t,"_controlledWritableStream")}(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&WritableStreamDefaultControllerError(this,t)};WritableStreamDefaultController.prototype[b]=function(t){var r=this._abortAlgorithm(t);WritableStreamDefaultControllerClearAlgorithms(this);return r};WritableStreamDefaultController.prototype[_]=function(){ResetQueue(this)};return WritableStreamDefaultController}();function SetUpWritableStreamDefaultController(t,r,a,o,i,l,c,u){r._controlledWritableStream=t;t._writableStreamController=r;r._queue=void 0;r._queueTotalSize=void 0;ResetQueue(r);r._started=!1;r._strategySizeAlgorithm=u;r._strategyHWM=c;r._writeAlgorithm=o;r._closeAlgorithm=i;r._abortAlgorithm=l;var d=WritableStreamDefaultControllerGetBackpressure(r);WritableStreamUpdateBackpressure(t,d);uponPromise(promiseResolvedWith(a()),(function(){r._started=!0;WritableStreamDefaultControllerAdvanceQueueIfNeeded(r)}),(function(a){r._started=!0;WritableStreamDealWithRejection(t,a)}))}function WritableStreamDefaultControllerClearAlgorithms(t){t._writeAlgorithm=void 0;t._closeAlgorithm=void 0;t._abortAlgorithm=void 0;t._strategySizeAlgorithm=void 0}function WritableStreamDefaultControllerGetDesiredSize(t){return t._strategyHWM-t._queueTotalSize}function WritableStreamDefaultControllerAdvanceQueueIfNeeded(t){var r=t._controlledWritableStream;if(!1!==t._started&&void 0===r._inFlightWriteRequest)if("erroring"!==r._state){if(0!==t._queue.length){var a=function PeekQueueValue(t){return t._queue.peek().value}(t);"close"===a?function WritableStreamDefaultControllerProcessClose(t){var r=t._controlledWritableStream;!function WritableStreamMarkCloseRequestInFlight(t){t._inFlightCloseRequest=t._closeRequest;t._closeRequest=void 0}(r);DequeueValue(t);var a=t._closeAlgorithm();WritableStreamDefaultControllerClearAlgorithms(t);uponPromise(a,(function(){!function WritableStreamFinishInFlightClose(t){t._inFlightCloseRequest._resolve(void 0);t._inFlightCloseRequest=void 0;if("erroring"===t._state){t._storedError=void 0;if(void 0!==t._pendingAbortRequest){t._pendingAbortRequest._resolve();t._pendingAbortRequest=void 0}}t._state="closed";var r=t._writer;void 0!==r&&defaultWriterClosedPromiseResolve(r)}(r)}),(function(t){!function WritableStreamFinishInFlightCloseWithError(t,r){t._inFlightCloseRequest._reject(r);t._inFlightCloseRequest=void 0;if(void 0!==t._pendingAbortRequest){t._pendingAbortRequest._reject(r);t._pendingAbortRequest=void 0}WritableStreamDealWithRejection(t,r)}(r,t)}))}(t):function WritableStreamDefaultControllerProcessWrite(t,r){var a=t._controlledWritableStream;!function WritableStreamMarkFirstWriteRequestInFlight(t){t._inFlightWriteRequest=t._writeRequests.shift()}(a);uponPromise(t._writeAlgorithm(r),(function(){!function WritableStreamFinishInFlightWrite(t){t._inFlightWriteRequest._resolve(void 0);t._inFlightWriteRequest=void 0}(a);var r=a._state;DequeueValue(t);if(!1===WritableStreamCloseQueuedOrInFlight(a)&&"writable"===r){var o=WritableStreamDefaultControllerGetBackpressure(t);WritableStreamUpdateBackpressure(a,o)}WritableStreamDefaultControllerAdvanceQueueIfNeeded(t)}),(function(r){"writable"===a._state&&WritableStreamDefaultControllerClearAlgorithms(t);!function WritableStreamFinishInFlightWriteWithError(t,r){t._inFlightWriteRequest._reject(r);t._inFlightWriteRequest=void 0;WritableStreamDealWithRejection(t,r)}(a,r)}))}(t,a.chunk)}}else WritableStreamFinishErroring(r)}function WritableStreamDefaultControllerErrorIfNeeded(t,r){"writable"===t._controlledWritableStream._state&&WritableStreamDefaultControllerError(t,r)}function WritableStreamDefaultControllerGetBackpressure(t){return WritableStreamDefaultControllerGetDesiredSize(t)<=0}function WritableStreamDefaultControllerError(t,r){var a=t._controlledWritableStream;WritableStreamDefaultControllerClearAlgorithms(t);WritableStreamStartErroring(a,r)}function streamBrandCheckException(t){return new TypeError("WritableStream.prototype."+t+" can only be used on a WritableStream")}function defaultWriterBrandCheckException(t){return new TypeError("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function defaultWriterLockException(t){return new TypeError("Cannot "+t+" a stream using a released writer")}function defaultWriterClosedPromiseInitialize(t){t._closedPromise=newPromise((function(r,a){t._closedPromise_resolve=r;t._closedPromise_reject=a;t._closedPromiseState="pending"}))}function defaultWriterClosedPromiseInitializeAsRejected(t,r){defaultWriterClosedPromiseInitialize(t);defaultWriterClosedPromiseReject(t,r)}function defaultWriterClosedPromiseReject(t,r){setPromiseIsHandledToTrue(t._closedPromise);t._closedPromise_reject(r);t._closedPromise_resolve=void 0;t._closedPromise_reject=void 0;t._closedPromiseState="rejected"}function defaultWriterClosedPromiseResolve(t){t._closedPromise_resolve(void 0);t._closedPromise_resolve=void 0;t._closedPromise_reject=void 0;t._closedPromiseState="resolved"}function defaultWriterReadyPromiseInitialize(t){t._readyPromise=newPromise((function(r,a){t._readyPromise_resolve=r;t._readyPromise_reject=a}));t._readyPromiseState="pending"}function defaultWriterReadyPromiseInitializeAsRejected(t,r){defaultWriterReadyPromiseInitialize(t);defaultWriterReadyPromiseReject(t,r)}function defaultWriterReadyPromiseInitializeAsResolved(t){defaultWriterReadyPromiseInitialize(t);defaultWriterReadyPromiseResolve(t)}function defaultWriterReadyPromiseReject(t,r){setPromiseIsHandledToTrue(t._readyPromise);t._readyPromise_reject(r);t._readyPromise_resolve=void 0;t._readyPromise_reject=void 0;t._readyPromiseState="rejected"}function defaultWriterReadyPromiseResolve(t){t._readyPromise_resolve(void 0);t._readyPromise_resolve=void 0;t._readyPromise_reject=void 0;t._readyPromiseState="fulfilled"}function isAbortSignal(t){if("object"!=typeof t||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var R="undefined"!=typeof DOMException?DOMException:void 0,k=function isDOMExceptionConstructor(t){if("function"!=typeof t&&"object"!=typeof t)return!1;try{new t;return!0}catch(t){return!1}}(R)?R:function createDOMExceptionPolyfill(){var t=function DOMException(t,r){this.message=t||"";this.name=r||"Error";Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};t.prototype=Object.create(Error.prototype);Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,configurable:!0});return t}();function ReadableStreamPipeTo(t,r,a,o,i,l){var c=AcquireReadableStreamDefaultReader(t),u=AcquireWritableStreamDefaultWriter(r);t._disturbed=!0;var d=!1,h=promiseResolvedWith(void 0);return newPromise((function(p,m){var v;if(void 0!==l){v=function(){var a=new k("Aborted","AbortError"),l=[];!1===o&&l.push((function(){return"writable"===r._state?WritableStreamAbort(r,a):promiseResolvedWith(void 0)}));!1===i&&l.push((function(){return"readable"===t._state?ReadableStreamCancel(t,a):promiseResolvedWith(void 0)}));shutdownWithAction((function(){return Promise.all(l.map((function(t){return t()})))}),!0,a)};if(!0===l.aborted){v();return}l.addEventListener("abort",v)}isOrBecomesErrored(t,c._closedPromise,(function(t){!1===o?shutdownWithAction((function(){return WritableStreamAbort(r,t)}),!0,t):shutdown(!0,t)}));isOrBecomesErrored(r,u._closedPromise,(function(r){!1===i?shutdownWithAction((function(){return ReadableStreamCancel(t,r)}),!0,r):shutdown(!0,r)}));!function isOrBecomesClosed(t,r,a){"closed"===t._state?a():uponFulfillment(r,a)}(t,c._closedPromise,(function(){!1===a?shutdownWithAction((function(){return function WritableStreamDefaultWriterCloseWithErrorPropagation(t){var r=t._ownerWritableStream,a=r._state;return!0===WritableStreamCloseQueuedOrInFlight(r)||"closed"===a?promiseResolvedWith(void 0):"errored"===a?promiseRejectedWith(r._storedError):WritableStreamDefaultWriterClose(t)}(u)})):shutdown()}));if(!0===WritableStreamCloseQueuedOrInFlight(r)||"closed"===r._state){var g=new TypeError("the destination writable stream closed before all data could be piped to it");!1===i?shutdownWithAction((function(){return ReadableStreamCancel(t,g)}),!0,g):shutdown(!0,g)}setPromiseIsHandledToTrue(function pipeLoop(){return newPromise((function(t,r){!function next(a){a?t():PerformPromiseThen(function pipeStep(){return!0===d?promiseResolvedWith(!0):PerformPromiseThen(u._readyPromise,(function(){return PerformPromiseThen(ReadableStreamDefaultReaderRead(c),(function(t){if(!0===t.done)return!0;h=PerformPromiseThen(WritableStreamDefaultWriterWrite(u,t.value),void 0,noop);return!1}))}))}(),next,r)}(!1)}))}());function waitForWritesToFinish(){var t=h;return PerformPromiseThen(h,(function(){return t!==h?waitForWritesToFinish():void 0}))}function isOrBecomesErrored(t,r,a){"errored"===t._state?a(t._storedError):uponRejection(r,a)}function shutdownWithAction(t,a,o){if(!0!==d){d=!0;"writable"===r._state&&!1===WritableStreamCloseQueuedOrInFlight(r)?uponFulfillment(waitForWritesToFinish(),doTheRest):doTheRest()}function doTheRest(){uponPromise(t(),(function(){return finalize(a,o)}),(function(t){return finalize(!0,t)}))}}function shutdown(t,a){if(!0!==d){d=!0;"writable"===r._state&&!1===WritableStreamCloseQueuedOrInFlight(r)?uponFulfillment(waitForWritesToFinish(),(function(){return finalize(t,a)})):finalize(t,a)}}function finalize(t,r){WritableStreamDefaultWriterRelease(u);ReadableStreamReaderGenericRelease(c);void 0!==l&&l.removeEventListener("abort",v);t?m(r):p(void 0)}}))}var w=function(){function ReadableStreamDefaultController(){throw new TypeError}Object.defineProperty(ReadableStreamDefaultController.prototype,"desiredSize",{get:function(){if(!1===IsReadableStreamDefaultController(this))throw defaultControllerBrandCheckException("desiredSize");return ReadableStreamDefaultControllerGetDesiredSize(this)},enumerable:!0,configurable:!0});ReadableStreamDefaultController.prototype.close=function(){if(!1===IsReadableStreamDefaultController(this))throw defaultControllerBrandCheckException("close");if(!1===ReadableStreamDefaultControllerCanCloseOrEnqueue(this))throw new TypeError("The stream is not in a state that permits close");ReadableStreamDefaultControllerClose(this)};ReadableStreamDefaultController.prototype.enqueue=function(t){if(!1===IsReadableStreamDefaultController(this))throw defaultControllerBrandCheckException("enqueue");if(!1===ReadableStreamDefaultControllerCanCloseOrEnqueue(this))throw new TypeError("The stream is not in a state that permits enqueue");return ReadableStreamDefaultControllerEnqueue(this,t)};ReadableStreamDefaultController.prototype.error=function(t){if(!1===IsReadableStreamDefaultController(this))throw defaultControllerBrandCheckException("error");ReadableStreamDefaultControllerError(this,t)};ReadableStreamDefaultController.prototype[h]=function(t){ResetQueue(this);var r=this._cancelAlgorithm(t);ReadableStreamDefaultControllerClearAlgorithms(this);return r};ReadableStreamDefaultController.prototype[p]=function(){var t=this._controlledReadableStream;if(this._queue.length>0){var r=DequeueValue(this);if(!0===this._closeRequested&&0===this._queue.length){ReadableStreamDefaultControllerClearAlgorithms(this);ReadableStreamClose(t)}else ReadableStreamDefaultControllerCallPullIfNeeded(this);return promiseResolvedWith(ReadableStreamCreateReadResult(r,!1,t._reader._forAuthorCode))}var a=ReadableStreamAddReadRequest(t);ReadableStreamDefaultControllerCallPullIfNeeded(this);return a};return ReadableStreamDefaultController}();function IsReadableStreamDefaultController(t){return!!typeIsObject(t)&&!!Object.prototype.hasOwnProperty.call(t,"_controlledReadableStream")}function ReadableStreamDefaultControllerCallPullIfNeeded(t){if(!1!==ReadableStreamDefaultControllerShouldCallPull(t))if(!0!==t._pulling){t._pulling=!0;uponPromise(t._pullAlgorithm(),(function(){t._pulling=!1;if(!0===t._pullAgain){t._pullAgain=!1;ReadableStreamDefaultControllerCallPullIfNeeded(t)}}),(function(r){ReadableStreamDefaultControllerError(t,r)}))}else t._pullAgain=!0}function ReadableStreamDefaultControllerShouldCallPull(t){var r=t._controlledReadableStream;return!1!==ReadableStreamDefaultControllerCanCloseOrEnqueue(t)&&!1!==t._started&&(!0===IsReadableStreamLocked(r)&&ReadableStreamGetNumReadRequests(r)>0||ReadableStreamDefaultControllerGetDesiredSize(t)>0)}function ReadableStreamDefaultControllerClearAlgorithms(t){t._pullAlgorithm=void 0;t._cancelAlgorithm=void 0;t._strategySizeAlgorithm=void 0}function ReadableStreamDefaultControllerClose(t){var r=t._controlledReadableStream;t._closeRequested=!0;if(0===t._queue.length){ReadableStreamDefaultControllerClearAlgorithms(t);ReadableStreamClose(r)}}function ReadableStreamDefaultControllerEnqueue(t,r){var a=t._controlledReadableStream;if(!0===IsReadableStreamLocked(a)&&ReadableStreamGetNumReadRequests(a)>0)ReadableStreamFulfillReadRequest(a,r,!1);else{var o=void 0;try{o=t._strategySizeAlgorithm(r)}catch(r){ReadableStreamDefaultControllerError(t,r);throw r}try{EnqueueValueWithSize(t,r,o)}catch(r){ReadableStreamDefaultControllerError(t,r);throw r}}ReadableStreamDefaultControllerCallPullIfNeeded(t)}function ReadableStreamDefaultControllerError(t,r){var a=t._controlledReadableStream;if("readable"===a._state){ResetQueue(t);ReadableStreamDefaultControllerClearAlgorithms(t);ReadableStreamError(a,r)}}function ReadableStreamDefaultControllerGetDesiredSize(t){var r=t._controlledReadableStream._state;return"errored"===r?null:"closed"===r?0:t._strategyHWM-t._queueTotalSize}function ReadableStreamDefaultControllerCanCloseOrEnqueue(t){var r=t._controlledReadableStream._state;return!1===t._closeRequested&&"readable"===r}function SetUpReadableStreamDefaultController(t,r,a,o,i,l,c){r._controlledReadableStream=t;r._queue=void 0;r._queueTotalSize=void 0;ResetQueue(r);r._started=!1;r._closeRequested=!1;r._pullAgain=!1;r._pulling=!1;r._strategySizeAlgorithm=c;r._strategyHWM=l;r._pullAlgorithm=o;r._cancelAlgorithm=i;t._readableStreamController=r;uponPromise(promiseResolvedWith(a()),(function(){r._started=!0;ReadableStreamDefaultControllerCallPullIfNeeded(r)}),(function(t){ReadableStreamDefaultControllerError(r,t)}))}function defaultControllerBrandCheckException(t){return new TypeError("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var P=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},x=function(){function ReadableStreamBYOBRequest(){throw new TypeError("ReadableStreamBYOBRequest cannot be used directly")}Object.defineProperty(ReadableStreamBYOBRequest.prototype,"view",{get:function(){if(!1===IsReadableStreamBYOBRequest(this))throw byobRequestBrandCheckException("view");return this._view},enumerable:!0,configurable:!0});ReadableStreamBYOBRequest.prototype.respond=function(t){if(!1===IsReadableStreamBYOBRequest(this))throw byobRequestBrandCheckException("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");this._view.buffer;!function ReadableByteStreamControllerRespond(t,r){if(!1===IsFiniteNonNegativeNumber(r=Number(r)))throw new RangeError("bytesWritten must be a finite");ReadableByteStreamControllerRespondInternal(t,r)}(this._associatedReadableByteStreamController,t)};ReadableStreamBYOBRequest.prototype.respondWithNewView=function(t){if(!1===IsReadableStreamBYOBRequest(this))throw byobRequestBrandCheckException("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new TypeError("You can only respond with array buffer views");t.buffer;!function ReadableByteStreamControllerRespondWithNewView(t,r){var a=t._pendingPullIntos.peek();if(a.byteOffset+a.bytesFilled!==r.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(a.byteLength!==r.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");a.buffer=r.buffer;ReadableByteStreamControllerRespondInternal(t,r.byteLength)}(this._associatedReadableByteStreamController,t)};return ReadableStreamBYOBRequest}(),T=function(){function ReadableByteStreamController(){throw new TypeError("ReadableByteStreamController constructor cannot be used directly")}Object.defineProperty(ReadableByteStreamController.prototype,"byobRequest",{get:function(){if(!1===IsReadableByteStreamController(this))throw byteStreamControllerBrandCheckException("byobRequest");if(void 0===this._byobRequest&&this._pendingPullIntos.length>0){var t=this._pendingPullIntos.peek(),r=new Uint8Array(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),a=Object.create(x.prototype);!function SetUpReadableStreamBYOBRequest(t,r,a){t._associatedReadableByteStreamController=r;t._view=a}(a,this,r);this._byobRequest=a}return this._byobRequest},enumerable:!0,configurable:!0});Object.defineProperty(ReadableByteStreamController.prototype,"desiredSize",{get:function(){if(!1===IsReadableByteStreamController(this))throw byteStreamControllerBrandCheckException("desiredSize");return ReadableByteStreamControllerGetDesiredSize(this)},enumerable:!0,configurable:!0});ReadableByteStreamController.prototype.close=function(){if(!1===IsReadableByteStreamController(this))throw byteStreamControllerBrandCheckException("close");if(!0===this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function ReadableByteStreamControllerClose(t){var r=t._controlledReadableByteStream;if(t._queueTotalSize>0)t._closeRequested=!0;else{if(t._pendingPullIntos.length>0&&t._pendingPullIntos.peek().bytesFilled>0){var a=new TypeError("Insufficient bytes to fill elements in the given buffer");ReadableByteStreamControllerError(t,a);throw a}ReadableByteStreamControllerClearAlgorithms(t);ReadableStreamClose(r)}}(this)};ReadableByteStreamController.prototype.enqueue=function(t){if(!1===IsReadableByteStreamController(this))throw byteStreamControllerBrandCheckException("enqueue");if(!0===this._closeRequested)throw new TypeError("stream is closed or draining");var r=this._controlledReadableByteStream._state;if("readable"!==r)throw new TypeError("The stream (in "+r+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new TypeError("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer;!function ReadableByteStreamControllerEnqueue(t,r){var a=t._controlledReadableByteStream,o=r.buffer,i=r.byteOffset,l=r.byteLength,c=o;if(!0===ReadableStreamHasDefaultReader(a))if(0===ReadableStreamGetNumReadRequests(a))ReadableByteStreamControllerEnqueueChunkToQueue(t,c,i,l);else{var u=new Uint8Array(c,i,l);ReadableStreamFulfillReadRequest(a,u,!1)}else if(!0===ReadableStreamHasBYOBReader(a)){ReadableByteStreamControllerEnqueueChunkToQueue(t,c,i,l);ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(t)}else ReadableByteStreamControllerEnqueueChunkToQueue(t,c,i,l);ReadableByteStreamControllerCallPullIfNeeded(t)}(this,t)};ReadableByteStreamController.prototype.error=function(t){if(!1===IsReadableByteStreamController(this))throw byteStreamControllerBrandCheckException("error");ReadableByteStreamControllerError(this,t)};ReadableByteStreamController.prototype[h]=function(t){this._pendingPullIntos.length>0&&(this._pendingPullIntos.peek().bytesFilled=0);ResetQueue(this);var r=this._cancelAlgorithm(t);ReadableByteStreamControllerClearAlgorithms(this);return r};ReadableByteStreamController.prototype[p]=function(){var t=this._controlledReadableByteStream;if(this._queueTotalSize>0){var r=this._queue.shift();this._queueTotalSize-=r.byteLength;ReadableByteStreamControllerHandleQueueDrain(this);var a=void 0;try{a=new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}catch(t){return promiseRejectedWith(t)}return promiseResolvedWith(ReadableStreamCreateReadResult(a,!1,t._reader._forAuthorCode))}var o=this._autoAllocateChunkSize;if(void 0!==o){var i=void 0;try{i=new ArrayBuffer(o)}catch(t){return promiseRejectedWith(t)}var l={buffer:i,byteOffset:0,byteLength:o,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(l)}var c=ReadableStreamAddReadRequest(t);ReadableByteStreamControllerCallPullIfNeeded(this);return c};return ReadableByteStreamController}();function IsReadableByteStreamController(t){return!!typeIsObject(t)&&!!Object.prototype.hasOwnProperty.call(t,"_controlledReadableByteStream")}function IsReadableStreamBYOBRequest(t){return!!typeIsObject(t)&&!!Object.prototype.hasOwnProperty.call(t,"_associatedReadableByteStreamController")}function ReadableByteStreamControllerCallPullIfNeeded(t){if(!1!==function ReadableByteStreamControllerShouldCallPull(t){var r=t._controlledReadableByteStream;return"readable"===r._state&&(!0!==t._closeRequested&&(!1!==t._started&&(!0===ReadableStreamHasDefaultReader(r)&&ReadableStreamGetNumReadRequests(r)>0||(!0===ReadableStreamHasBYOBReader(r)&&ReadableStreamGetNumReadIntoRequests(r)>0||ReadableByteStreamControllerGetDesiredSize(t)>0))))}(t))if(!0!==t._pulling){t._pulling=!0;uponPromise(t._pullAlgorithm(),(function(){t._pulling=!1;if(!0===t._pullAgain){t._pullAgain=!1;ReadableByteStreamControllerCallPullIfNeeded(t)}}),(function(r){ReadableByteStreamControllerError(t,r)}))}else t._pullAgain=!0}function ReadableByteStreamControllerCommitPullIntoDescriptor(t,r){var a=!1;"closed"===t._state&&(a=!0);var o=ReadableByteStreamControllerConvertPullIntoDescriptor(r);"default"===r.readerType?ReadableStreamFulfillReadRequest(t,o,a):function ReadableStreamFulfillReadIntoRequest(t,r,a){var o=t._reader;o._readIntoRequests.shift()._resolve(ReadableStreamCreateReadResult(r,a,o._forAuthorCode))}(t,o,a)}function ReadableByteStreamControllerConvertPullIntoDescriptor(t){var r=t.bytesFilled,a=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,r/a)}function ReadableByteStreamControllerEnqueueChunkToQueue(t,r,a,o){t._queue.push({buffer:r,byteOffset:a,byteLength:o});t._queueTotalSize+=o}function ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(t,r){var a=r.elementSize,o=r.bytesFilled-r.bytesFilled%a,i=Math.min(t._queueTotalSize,r.byteLength-r.bytesFilled),l=r.bytesFilled+i,c=l-l%a,u=i,d=!1;if(c>o){u=c-r.bytesFilled;d=!0}for(var h,p,m,v,g,y=t._queue;u>0;){var b=y.peek(),_=Math.min(u,b.byteLength),S=r.byteOffset+r.bytesFilled;h=r.buffer,p=S,m=b.buffer,v=b.byteOffset,g=_,new Uint8Array(h).set(new Uint8Array(m,v,g),p);if(b.byteLength===_)y.shift();else{b.byteOffset+=_;b.byteLength-=_}t._queueTotalSize-=_;ReadableByteStreamControllerFillHeadPullIntoDescriptor(t,_,r);u-=_}return d}function ReadableByteStreamControllerFillHeadPullIntoDescriptor(t,r,a){ReadableByteStreamControllerInvalidateBYOBRequest(t);a.bytesFilled+=r}function ReadableByteStreamControllerHandleQueueDrain(t){if(0===t._queueTotalSize&&!0===t._closeRequested){ReadableByteStreamControllerClearAlgorithms(t);ReadableStreamClose(t._controlledReadableByteStream)}else ReadableByteStreamControllerCallPullIfNeeded(t)}function ReadableByteStreamControllerInvalidateBYOBRequest(t){if(void 0!==t._byobRequest){t._byobRequest._associatedReadableByteStreamController=void 0;t._byobRequest._view=void 0;t._byobRequest=void 0}}function ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(t){for(;t._pendingPullIntos.length>0;){if(0===t._queueTotalSize)return;var r=t._pendingPullIntos.peek();if(!0===ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(t,r)){ReadableByteStreamControllerShiftPendingPullInto(t);ReadableByteStreamControllerCommitPullIntoDescriptor(t._controlledReadableByteStream,r)}}}function ReadableByteStreamControllerRespondInternal(t,r){var a=t._pendingPullIntos.peek();if("closed"===t._controlledReadableByteStream._state){if(0!==r)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");!function ReadableByteStreamControllerRespondInClosedState(t,r){r.buffer=r.buffer;var a=t._controlledReadableByteStream;if(!0===ReadableStreamHasBYOBReader(a))for(;ReadableStreamGetNumReadIntoRequests(a)>0;)ReadableByteStreamControllerCommitPullIntoDescriptor(a,ReadableByteStreamControllerShiftPendingPullInto(t))}(t,a)}else!function ReadableByteStreamControllerRespondInReadableState(t,r,a){if(a.bytesFilled+r>a.byteLength)throw new RangeError("bytesWritten out of range");ReadableByteStreamControllerFillHeadPullIntoDescriptor(t,r,a);if(!(a.bytesFilled<a.elementSize)){ReadableByteStreamControllerShiftPendingPullInto(t);var o=a.bytesFilled%a.elementSize;if(o>0){var i=a.byteOffset+a.bytesFilled,l=a.buffer.slice(i-o,i);ReadableByteStreamControllerEnqueueChunkToQueue(t,l,0,l.byteLength)}a.buffer=a.buffer;a.bytesFilled-=o;ReadableByteStreamControllerCommitPullIntoDescriptor(t._controlledReadableByteStream,a);ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(t)}}(t,r,a);ReadableByteStreamControllerCallPullIfNeeded(t)}function ReadableByteStreamControllerShiftPendingPullInto(t){var r=t._pendingPullIntos.shift();ReadableByteStreamControllerInvalidateBYOBRequest(t);return r}function ReadableByteStreamControllerClearAlgorithms(t){t._pullAlgorithm=void 0;t._cancelAlgorithm=void 0}function ReadableByteStreamControllerError(t,r){var a=t._controlledReadableByteStream;if("readable"===a._state){!function ReadableByteStreamControllerClearPendingPullIntos(t){ReadableByteStreamControllerInvalidateBYOBRequest(t);t._pendingPullIntos=new d}(t);ResetQueue(t);ReadableByteStreamControllerClearAlgorithms(t);ReadableStreamError(a,r)}}function ReadableByteStreamControllerGetDesiredSize(t){var r=t._controlledReadableByteStream._state;return"errored"===r?null:"closed"===r?0:t._strategyHWM-t._queueTotalSize}function SetUpReadableByteStreamControllerFromUnderlyingSource(t,r,a){var o=Object.create(T.prototype),i=CreateAlgorithmFromUnderlyingMethod(r,"pull",0,[o]),l=CreateAlgorithmFromUnderlyingMethod(r,"cancel",1,[]),c=r.autoAllocateChunkSize;if(void 0!==c){c=Number(c);if(!1===P(c)||c<=0)throw new RangeError("autoAllocateChunkSize must be a positive integer")}!function SetUpReadableByteStreamController(t,r,a,o,i,l,c){r._controlledReadableByteStream=t;r._pullAgain=!1;r._pulling=!1;r._byobRequest=void 0;r._queue=r._queueTotalSize=void 0;ResetQueue(r);r._closeRequested=!1;r._started=!1;r._strategyHWM=ValidateAndNormalizeHighWaterMark(l);r._pullAlgorithm=o;r._cancelAlgorithm=i;r._autoAllocateChunkSize=c;r._pendingPullIntos=new d;t._readableStreamController=r;uponPromise(promiseResolvedWith(a()),(function(){r._started=!0;ReadableByteStreamControllerCallPullIfNeeded(r)}),(function(t){ReadableByteStreamControllerError(r,t)}))}(t,o,(function startAlgorithm(){return InvokeOrNoop(r,"start",[o])}),i,l,a,c)}function byobRequestBrandCheckException(t){return new TypeError("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function byteStreamControllerBrandCheckException(t){return new TypeError("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function ReadableStreamAddReadIntoRequest(t){return newPromise((function(r,a){var o={_resolve:r,_reject:a};t._reader._readIntoRequests.push(o)}))}function ReadableStreamGetNumReadIntoRequests(t){return t._reader._readIntoRequests.length}function ReadableStreamHasBYOBReader(t){var r=t._reader;return void 0!==r&&!!IsReadableStreamBYOBReader(r)}var E=function(){function ReadableStreamBYOBReader(t){if(!IsReadableStream(t))throw new TypeError("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===IsReadableByteStreamController(t._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(IsReadableStreamLocked(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");ReadableStreamReaderGenericInitialize(this,t);this._readIntoRequests=new d}Object.defineProperty(ReadableStreamBYOBReader.prototype,"closed",{get:function(){return IsReadableStreamBYOBReader(this)?this._closedPromise:promiseRejectedWith(byobReaderBrandCheckException("closed"))},enumerable:!0,configurable:!0});ReadableStreamBYOBReader.prototype.cancel=function(t){return IsReadableStreamBYOBReader(this)?void 0===this._ownerReadableStream?promiseRejectedWith(readerLockException("cancel")):ReadableStreamReaderGenericCancel(this,t):promiseRejectedWith(byobReaderBrandCheckException("cancel"))};ReadableStreamBYOBReader.prototype.read=function(t){if(!IsReadableStreamBYOBReader(this))return promiseRejectedWith(byobReaderBrandCheckException("read"));if(void 0===this._ownerReadableStream)return promiseRejectedWith(readerLockException("read from"));if(!ArrayBuffer.isView(t))return promiseRejectedWith(new TypeError("view must be an array buffer view"));t.buffer;return 0===t.byteLength?promiseRejectedWith(new TypeError("view must have non-zero byteLength")):function ReadableStreamBYOBReaderRead(t,r){var a=t._ownerReadableStream;a._disturbed=!0;return"errored"===a._state?promiseRejectedWith(a._storedError):function ReadableByteStreamControllerPullInto(t,r){var a=t._controlledReadableByteStream,o=1;r.constructor!==DataView&&(o=r.constructor.BYTES_PER_ELEMENT);var i=r.constructor,l={buffer:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength,bytesFilled:0,elementSize:o,ctor:i,readerType:"byob"};if(t._pendingPullIntos.length>0){t._pendingPullIntos.push(l);return ReadableStreamAddReadIntoRequest(a)}if("closed"===a._state)return promiseResolvedWith(ReadableStreamCreateReadResult(new i(l.buffer,l.byteOffset,0),!0,a._reader._forAuthorCode));if(t._queueTotalSize>0){if(!0===ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(t,l)){var c=ReadableByteStreamControllerConvertPullIntoDescriptor(l);ReadableByteStreamControllerHandleQueueDrain(t);return promiseResolvedWith(ReadableStreamCreateReadResult(c,!1,a._reader._forAuthorCode))}if(!0===t._closeRequested){var u=new TypeError("Insufficient bytes to fill elements in the given buffer");ReadableByteStreamControllerError(t,u);return promiseRejectedWith(u)}}t._pendingPullIntos.push(l);var d=ReadableStreamAddReadIntoRequest(a);ReadableByteStreamControllerCallPullIfNeeded(t);return d}(a._readableStreamController,r)}(this,t)};ReadableStreamBYOBReader.prototype.releaseLock=function(){if(!IsReadableStreamBYOBReader(this))throw byobReaderBrandCheckException("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");ReadableStreamReaderGenericRelease(this)}};return ReadableStreamBYOBReader}();function IsReadableStreamBYOBReader(t){return!!typeIsObject(t)&&!!Object.prototype.hasOwnProperty.call(t,"_readIntoRequests")}function byobReaderBrandCheckException(t){return new TypeError("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var O=function(){function ReadableStream(t,r){void 0===t&&(t={});void 0===r&&(r={});InitializeReadableStream(this);var a=r.size,o=r.highWaterMark,i=t.type;if("bytes"===String(i)){if(void 0!==a)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===o&&(o=0);SetUpReadableByteStreamControllerFromUnderlyingSource(this,t,o=ValidateAndNormalizeHighWaterMark(o))}else{if(void 0!==i)throw new RangeError("Invalid type is specified");var l=MakeSizeAlgorithmFromSizeFunction(a);void 0===o&&(o=1);!function SetUpReadableStreamDefaultControllerFromUnderlyingSource(t,r,a,o){var i=Object.create(w.prototype),l=CreateAlgorithmFromUnderlyingMethod(r,"pull",0,[i]),c=CreateAlgorithmFromUnderlyingMethod(r,"cancel",1,[]);SetUpReadableStreamDefaultController(t,i,(function startAlgorithm(){return InvokeOrNoop(r,"start",[i])}),l,c,a,o)}(this,t,o=ValidateAndNormalizeHighWaterMark(o),l)}}Object.defineProperty(ReadableStream.prototype,"locked",{get:function(){if(!1===IsReadableStream(this))throw streamBrandCheckException$1("locked");return IsReadableStreamLocked(this)},enumerable:!0,configurable:!0});ReadableStream.prototype.cancel=function(t){return!1===IsReadableStream(this)?promiseRejectedWith(streamBrandCheckException$1("cancel")):!0===IsReadableStreamLocked(this)?promiseRejectedWith(new TypeError("Cannot cancel a stream that already has a reader")):ReadableStreamCancel(this,t)};ReadableStream.prototype.getReader=function(t){var r=(void 0===t?{}:t).mode;if(!1===IsReadableStream(this))throw streamBrandCheckException$1("getReader");if(void 0===r)return AcquireReadableStreamDefaultReader(this,!0);if("byob"===(r=String(r)))return function AcquireReadableStreamBYOBReader(t,r){void 0===r&&(r=!1);var a=new E(t);a._forAuthorCode=r;return a}(this,!0);throw new RangeError("Invalid mode is specified")};ReadableStream.prototype.pipeThrough=function(t,r){var a=t.writable,o=t.readable,i=void 0===r?{}:r,l=i.preventClose,c=i.preventAbort,u=i.preventCancel,d=i.signal;if(!1===IsReadableStream(this))throw streamBrandCheckException$1("pipeThrough");if(!1===IsWritableStream(a))throw new TypeError("writable argument to pipeThrough must be a WritableStream");if(!1===IsReadableStream(o))throw new TypeError("readable argument to pipeThrough must be a ReadableStream");l=Boolean(l);c=Boolean(c);u=Boolean(u);if(void 0!==d&&!isAbortSignal(d))throw new TypeError("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===IsReadableStreamLocked(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===IsWritableStreamLocked(a))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");setPromiseIsHandledToTrue(ReadableStreamPipeTo(this,a,l,c,u,d));return o};ReadableStream.prototype.pipeTo=function(t,r){var a=void 0===r?{}:r,o=a.preventClose,i=a.preventAbort,l=a.preventCancel,c=a.signal;if(!1===IsReadableStream(this))return promiseRejectedWith(streamBrandCheckException$1("pipeTo"));if(!1===IsWritableStream(t))return promiseRejectedWith(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));o=Boolean(o);i=Boolean(i);l=Boolean(l);return void 0===c||isAbortSignal(c)?!0===IsReadableStreamLocked(this)?promiseRejectedWith(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===IsWritableStreamLocked(t)?promiseRejectedWith(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):ReadableStreamPipeTo(this,t,o,i,l,c):promiseRejectedWith(new TypeError("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal"))};ReadableStream.prototype.tee=function(){if(!1===IsReadableStream(this))throw streamBrandCheckException$1("tee");var t=function ReadableStreamTee(t,r){var a,o,i,l,c,u=AcquireReadableStreamDefaultReader(t),d=!1,h=!1,p=!1,m=newPromise((function(t){c=t}));function pullAlgorithm(){if(!0===d)return promiseResolvedWith(void 0);d=!0;setPromiseIsHandledToTrue(transformPromiseWith(ReadableStreamDefaultReaderRead(u),(function(t){d=!1;if(!0!==t.done){var r=t.value,a=r,o=r;!1===h&&ReadableStreamDefaultControllerEnqueue(i._readableStreamController,a);!1===p&&ReadableStreamDefaultControllerEnqueue(l._readableStreamController,o)}else{!1===h&&ReadableStreamDefaultControllerClose(i._readableStreamController);!1===p&&ReadableStreamDefaultControllerClose(l._readableStreamController)}})));return promiseResolvedWith(void 0)}function startAlgorithm(){}i=CreateReadableStream(startAlgorithm,pullAlgorithm,(function cancel1Algorithm(r){h=!0;a=r;if(!0===p){var i=createArrayFromList([a,o]),l=ReadableStreamCancel(t,i);c(l)}return m}));l=CreateReadableStream(startAlgorithm,pullAlgorithm,(function cancel2Algorithm(r){p=!0;o=r;if(!0===h){var i=createArrayFromList([a,o]),l=ReadableStreamCancel(t,i);c(l)}return m}));uponRejection(u._closedPromise,(function(t){ReadableStreamDefaultControllerError(i._readableStreamController,t);ReadableStreamDefaultControllerError(l._readableStreamController,t)}));return[i,l]}(this);return createArrayFromList(t)};ReadableStream.prototype.getIterator=function(t){var r=(void 0===t?{}:t).preventCancel,a=void 0!==r&&r;if(!1===IsReadableStream(this))throw streamBrandCheckException$1("getIterator");return function AcquireReadableStreamAsyncIterator(t,r){void 0===r&&(r=!1);var a=AcquireReadableStreamDefaultReader(t),o=Object.create(y);o._asyncIteratorReader=a;o._preventCancel=Boolean(r);return o}(this,a)};return ReadableStream}();"symbol"==typeof r.asyncIterator&&Object.defineProperty(O.prototype,r.asyncIterator,{value:O.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});function CreateReadableStream(t,r,a,o,i){void 0===o&&(o=1);void 0===i&&(i=function(){return 1});var l=Object.create(O.prototype);InitializeReadableStream(l);SetUpReadableStreamDefaultController(l,Object.create(w.prototype),t,r,a,o,i);return l}function InitializeReadableStream(t){t._state="readable";t._reader=void 0;t._storedError=void 0;t._disturbed=!1}function IsReadableStream(t){return!!typeIsObject(t)&&!!Object.prototype.hasOwnProperty.call(t,"_readableStreamController")}function IsReadableStreamLocked(t){return void 0!==t._reader}function ReadableStreamCancel(t,r){t._disturbed=!0;if("closed"===t._state)return promiseResolvedWith(void 0);if("errored"===t._state)return promiseRejectedWith(t._storedError);ReadableStreamClose(t);return transformPromiseWith(t._readableStreamController[h](r),noop)}function ReadableStreamClose(t){t._state="closed";var r=t._reader;if(void 0!==r){if(IsReadableStreamDefaultReader(r)){r._readRequests.forEach((function(t){t._resolve(ReadableStreamCreateReadResult(void 0,!0,r._forAuthorCode))}));r._readRequests=new d}defaultReaderClosedPromiseResolve(r)}}function ReadableStreamError(t,r){t._state="errored";t._storedError=r;var a=t._reader;if(void 0!==a){if(IsReadableStreamDefaultReader(a)){a._readRequests.forEach((function(t){t._reject(r)}));a._readRequests=new d}else{a._readIntoRequests.forEach((function(t){t._reject(r)}));a._readIntoRequests=new d}defaultReaderClosedPromiseReject(a,r)}}function streamBrandCheckException$1(t){return new TypeError("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}var I=function(){function ByteLengthQueuingStrategy(t){var r=t.highWaterMark;this.highWaterMark=r}ByteLengthQueuingStrategy.prototype.size=function(t){return t.byteLength};return ByteLengthQueuingStrategy}(),D=function(){function CountQueuingStrategy(t){var r=t.highWaterMark;this.highWaterMark=r}CountQueuingStrategy.prototype.size=function(){return 1};return CountQueuingStrategy}(),L=function(){function TransformStream(t,r,a){void 0===t&&(t={});void 0===r&&(r={});void 0===a&&(a={});var o=r.size,i=r.highWaterMark,l=a.size,c=a.highWaterMark;if(void 0!==t.writableType)throw new RangeError("Invalid writable type specified");var u=MakeSizeAlgorithmFromSizeFunction(o);void 0===i&&(i=1);i=ValidateAndNormalizeHighWaterMark(i);if(void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var d,h=MakeSizeAlgorithmFromSizeFunction(l);void 0===c&&(c=0);c=ValidateAndNormalizeHighWaterMark(c);!function InitializeTransformStream(t,r,a,o,i,l){function startAlgorithm(){return r}t._writable=function CreateWritableStream(t,r,a,o,i,l){void 0===i&&(i=1);void 0===l&&(l=function(){return 1});var c=Object.create(S.prototype);InitializeWritableStream(c);SetUpWritableStreamDefaultController(c,Object.create(A.prototype),t,r,a,o,i,l);return c}(startAlgorithm,(function writeAlgorithm(r){return function TransformStreamDefaultSinkWriteAlgorithm(t,r){var a=t._transformStreamController;return!0===t._backpressure?transformPromiseWith(t._backpressureChangePromise,(function(){var o=t._writable;if("erroring"===o._state)throw o._storedError;return TransformStreamDefaultControllerPerformTransform(a,r)})):TransformStreamDefaultControllerPerformTransform(a,r)}(t,r)}),(function closeAlgorithm(){return function TransformStreamDefaultSinkCloseAlgorithm(t){var r=t._readable,a=t._transformStreamController,o=a._flushAlgorithm();TransformStreamDefaultControllerClearAlgorithms(a);return transformPromiseWith(o,(function(){if("errored"===r._state)throw r._storedError;var t=r._readableStreamController;!0===ReadableStreamDefaultControllerCanCloseOrEnqueue(t)&&ReadableStreamDefaultControllerClose(t)}),(function(a){TransformStreamError(t,a);throw r._storedError}))}(t)}),(function abortAlgorithm(r){return function TransformStreamDefaultSinkAbortAlgorithm(t,r){TransformStreamError(t,r);return promiseResolvedWith(void 0)}(t,r)}),a,o);t._readable=CreateReadableStream(startAlgorithm,(function pullAlgorithm(){return function TransformStreamDefaultSourcePullAlgorithm(t){TransformStreamSetBackpressure(t,!1);return t._backpressureChangePromise}(t)}),(function cancelAlgorithm(r){TransformStreamErrorWritableAndUnblockWrite(t,r);return promiseResolvedWith(void 0)}),i,l);t._backpressure=void 0;t._backpressureChangePromise=void 0;t._backpressureChangePromise_resolve=void 0;TransformStreamSetBackpressure(t,!0);t._transformStreamController=void 0}(this,newPromise((function(t){d=t})),i,u,c,h);!function SetUpTransformStreamDefaultControllerFromTransformer(t,r){var a=Object.create(M.prototype),transformAlgorithm=function(t){try{TransformStreamDefaultControllerEnqueue(a,t);return promiseResolvedWith(void 0)}catch(t){return promiseRejectedWith(t)}},o=r.transform;if(void 0!==o){if("function"!=typeof o)throw new TypeError("transform is not a method");transformAlgorithm=function(t){return PromiseCall(o,r,[t,a])}}var i=CreateAlgorithmFromUnderlyingMethod(r,"flush",0,[a]);!function SetUpTransformStreamDefaultController(t,r,a,o){r._controlledTransformStream=t;t._transformStreamController=r;r._transformAlgorithm=a;r._flushAlgorithm=o}(t,a,transformAlgorithm,i)}(this,t);var p=InvokeOrNoop(t,"start",[this._transformStreamController]);d(p)}Object.defineProperty(TransformStream.prototype,"readable",{get:function(){if(!1===IsTransformStream(this))throw streamBrandCheckException$2("readable");return this._readable},enumerable:!0,configurable:!0});Object.defineProperty(TransformStream.prototype,"writable",{get:function(){if(!1===IsTransformStream(this))throw streamBrandCheckException$2("writable");return this._writable},enumerable:!0,configurable:!0});return TransformStream}();function IsTransformStream(t){return!!typeIsObject(t)&&!!Object.prototype.hasOwnProperty.call(t,"_transformStreamController")}function TransformStreamError(t,r){ReadableStreamDefaultControllerError(t._readable._readableStreamController,r);TransformStreamErrorWritableAndUnblockWrite(t,r)}function TransformStreamErrorWritableAndUnblockWrite(t,r){TransformStreamDefaultControllerClearAlgorithms(t._transformStreamController);WritableStreamDefaultControllerErrorIfNeeded(t._writable._writableStreamController,r);!0===t._backpressure&&TransformStreamSetBackpressure(t,!1)}function TransformStreamSetBackpressure(t,r){void 0!==t._backpressureChangePromise&&t._backpressureChangePromise_resolve();t._backpressureChangePromise=newPromise((function(r){t._backpressureChangePromise_resolve=r}));t._backpressure=r}var M=function(){function TransformStreamDefaultController(){throw new TypeError("TransformStreamDefaultController instances cannot be created directly")}Object.defineProperty(TransformStreamDefaultController.prototype,"desiredSize",{get:function(){if(!1===IsTransformStreamDefaultController(this))throw defaultControllerBrandCheckException$1("desiredSize");return ReadableStreamDefaultControllerGetDesiredSize(this._controlledTransformStream._readable._readableStreamController)},enumerable:!0,configurable:!0});TransformStreamDefaultController.prototype.enqueue=function(t){if(!1===IsTransformStreamDefaultController(this))throw defaultControllerBrandCheckException$1("enqueue");TransformStreamDefaultControllerEnqueue(this,t)};TransformStreamDefaultController.prototype.error=function(t){if(!1===IsTransformStreamDefaultController(this))throw defaultControllerBrandCheckException$1("error");!function TransformStreamDefaultControllerError(t,r){TransformStreamError(t._controlledTransformStream,r)}(this,t)};TransformStreamDefaultController.prototype.terminate=function(){if(!1===IsTransformStreamDefaultController(this))throw defaultControllerBrandCheckException$1("terminate");!function TransformStreamDefaultControllerTerminate(t){var r=t._controlledTransformStream,a=r._readable._readableStreamController;!0===ReadableStreamDefaultControllerCanCloseOrEnqueue(a)&&ReadableStreamDefaultControllerClose(a);var o=new TypeError("TransformStream terminated");TransformStreamErrorWritableAndUnblockWrite(r,o)}(this)};return TransformStreamDefaultController}();function IsTransformStreamDefaultController(t){return!!typeIsObject(t)&&!!Object.prototype.hasOwnProperty.call(t,"_controlledTransformStream")}function TransformStreamDefaultControllerClearAlgorithms(t){t._transformAlgorithm=void 0;t._flushAlgorithm=void 0}function TransformStreamDefaultControllerEnqueue(t,r){var a=t._controlledTransformStream,o=a._readable._readableStreamController;if(!1===ReadableStreamDefaultControllerCanCloseOrEnqueue(o))throw new TypeError("Readable side is not in a state that permits enqueue");try{ReadableStreamDefaultControllerEnqueue(o,r)}catch(t){TransformStreamErrorWritableAndUnblockWrite(a,t);throw a._readable._storedError}(function ReadableStreamDefaultControllerHasBackpressure(t){return!0!==ReadableStreamDefaultControllerShouldCallPull(t)})(o)!==a._backpressure&&TransformStreamSetBackpressure(a,!0)}function TransformStreamDefaultControllerPerformTransform(t,r){return transformPromiseWith(t._transformAlgorithm(r),void 0,(function(r){TransformStreamError(t._controlledTransformStream,r);throw r}))}function defaultControllerBrandCheckException$1(t){return new TypeError("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function streamBrandCheckException$2(t){return new TypeError("TransformStream.prototype."+t+" can only be used on a TransformStream")}t.ByteLengthQueuingStrategy=I;t.CountQueuingStrategy=D;t.ReadableStream=O;t.TransformStream=L;t.WritableStream=S;Object.defineProperty(t,"__esModule",{value:!0})}(r)},function(t,r,a){a(147);a(118);a(77);a(120);var o=a(43);t.exports=o.Map},function(t,r,a){"use strict";var o=a(148),i=a(152);t.exports=o("Map",(function(t){return function Map(){return t(this,arguments.length?arguments[0]:void 0)}}),i)},function(t,r,a){"use strict";var o=a(10),i=a(11),l=a(52),c=a(29),u=a(149),d=a(104),h=a(126),p=a(22),m=a(14),v=a(97),g=a(85),y=a(151);t.exports=function(t,r,a){var b=-1!==t.indexOf("Map"),_=-1!==t.indexOf("Weak"),S=b?"set":"add",C=i[t],A=C&&C.prototype,R=C,k={},fixMethod=function(t){var r=A[t];c(A,t,"add"==t?function add(t){r.call(this,0===t?0:t);return this}:"delete"==t?function(t){return!(_&&!p(t))&&r.call(this,0===t?0:t)}:"get"==t?function get(t){return _&&!p(t)?void 0:r.call(this,0===t?0:t)}:"has"==t?function has(t){return!(_&&!p(t))&&r.call(this,0===t?0:t)}:function set(t,a){r.call(this,0===t?0:t,a);return this})};if(l(t,"function"!=typeof C||!(_||A.forEach&&!m((function(){(new C).entries().next()}))))){R=a.getConstructor(r,t,b,S);u.REQUIRED=!0}else if(l(t,!0)){var w=new R,P=w[S](_?{}:-0,1)!=w,x=m((function(){w.has(1)})),T=v((function(t){new C(t)})),E=!_&&m((function(){for(var t=new C,r=5;r--;)t[S](r,r);return!t.has(-0)}));if(!T){(R=r((function(r,a){h(r,R,t);var o=y(new C,r,R);null!=a&&d(a,o[S],o,b);return o}))).prototype=A;A.constructor=R}if(x||E){fixMethod("delete");fixMethod("has");b&&fixMethod("get")}(E||P)&&fixMethod(S);_&&A.clear&&delete A.clear}k[t]=R;o({global:!0,forced:R!=C},k);g(R,t);_||a.setStrong(R,t,b);return R}},function(t,r,a){var o=a(39),i=a(22),l=a(23),c=a(27).f,u=a(38),d=a(150),h=u("meta"),p=0,m=Object.isExtensible||function(){return!0},setMetadata=function(t){c(t,h,{value:{objectID:"O"+ ++p,weakData:{}}})},v=t.exports={REQUIRED:!1,fastKey:function(t,r){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!l(t,h)){if(!m(t))return"F";if(!r)return"E";setMetadata(t)}return t[h].objectID},getWeakData:function(t,r){if(!l(t,h)){if(!m(t))return!0;if(!r)return!1;setMetadata(t)}return t[h].weakData},onFreeze:function(t){d&&v.REQUIRED&&m(t)&&!l(t,h)&&setMetadata(t);return t}};o[h]=!0},function(t,r,a){var o=a(14);t.exports=!o((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,r,a){var o=a(22),i=a(87);t.exports=function(t,r,a){var l,c;i&&"function"==typeof(l=r.constructor)&&l!==a&&o(c=l.prototype)&&c!==a.prototype&&i(t,c);return t}},function(t,r,a){"use strict";var o=a(27).f,i=a(71),l=a(124),c=a(62),u=a(126),d=a(104),h=a(79),p=a(125),m=a(13),v=a(149).fastKey,g=a(33),y=g.set,b=g.getterFor;t.exports={getConstructor:function(t,r,a,h){var p=t((function(t,o){u(t,p,r);y(t,{type:r,index:i(null),first:void 0,last:void 0,size:0});m||(t.size=0);null!=o&&d(o,t[h],t,a)})),g=b(r),define=function(t,r,a){var o,i,l=g(t),c=getEntry(t,r);if(c)c.value=a;else{l.last=c={index:i=v(r,!0),key:r,value:a,previous:o=l.last,next:void 0,removed:!1};l.first||(l.first=c);o&&(o.next=c);m?l.size++:t.size++;"F"!==i&&(l.index[i]=c)}return t},getEntry=function(t,r){var a,o=g(t),i=v(r);if("F"!==i)return o.index[i];for(a=o.first;a;a=a.next)if(a.key==r)return a};l(p.prototype,{clear:function clear(){for(var t=g(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;m?t.size=0:this.size=0},delete:function(t){var r=g(this),a=getEntry(this,t);if(a){var o=a.next,i=a.previous;delete r.index[a.index];a.removed=!0;i&&(i.next=o);o&&(o.previous=i);r.first==a&&(r.first=o);r.last==a&&(r.last=i);m?r.size--:this.size--}return!!a},forEach:function forEach(t){for(var r,a=g(this),o=c(t,arguments.length>1?arguments[1]:void 0,3);r=r?r.next:a.first;){o(r.value,r.key,this);for(;r&&r.removed;)r=r.previous}},has:function has(t){return!!getEntry(this,t)}});l(p.prototype,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)}});m&&o(p.prototype,"size",{get:function(){return g(this).size}});return p},setStrong:function(t,r,a){var o=r+" Iterator",i=b(r),l=b(o);h(t,r,(function(t,r){y(this,{type:o,target:t,state:i(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{value:void 0,done:!0}}return"keys"==r?{value:a.key,done:!1}:"values"==r?{value:a.value,done:!1}:{value:[a.key,a.value],done:!1}}),a?"entries":"values",!a,!0);p(r)}}},function(t,r,a){a(154);a(118);a(77);a(120);var o=a(43);t.exports=o.Set},function(t,r,a){"use strict";var o=a(148),i=a(152);t.exports=o("Set",(function(t){return function Set(){return t(this,arguments.length?arguments[0]:void 0)}}),i)},function(t,r,a){a(118);a(156);a(120);var o=a(43);t.exports=o.WeakMap},function(t,r,a){"use strict";var o,i=a(11),l=a(124),c=a(149),u=a(148),d=a(157),h=a(22),p=a(33).enforce,m=a(34),v=!i.ActiveXObject&&"ActiveXObject"in i,g=Object.isExtensible,wrapper=function(t){return function WeakMap(){return t(this,arguments.length?arguments[0]:void 0)}},y=t.exports=u("WeakMap",wrapper,d);if(m&&v){o=d.getConstructor(wrapper,"WeakMap",!0);c.REQUIRED=!0;var b=y.prototype,_=b.delete,S=b.has,C=b.get,A=b.set;l(b,{delete:function(t){if(h(t)&&!g(t)){var r=p(this);r.frozen||(r.frozen=new o);return _.call(this,t)||r.frozen.delete(t)}return _.call(this,t)},has:function has(t){if(h(t)&&!g(t)){var r=p(this);r.frozen||(r.frozen=new o);return S.call(this,t)||r.frozen.has(t)}return S.call(this,t)},get:function get(t){if(h(t)&&!g(t)){var r=p(this);r.frozen||(r.frozen=new o);return S.call(this,t)?C.call(this,t):r.frozen.get(t)}return C.call(this,t)},set:function set(t,r){if(h(t)&&!g(t)){var a=p(this);a.frozen||(a.frozen=new o);S.call(this,t)?A.call(this,t,r):a.frozen.set(t,r)}else A.call(this,t,r);return this}})}},function(t,r,a){"use strict";var o=a(124),i=a(149).getWeakData,l=a(28),c=a(22),u=a(126),d=a(104),h=a(158),p=a(23),m=a(33),v=m.set,g=m.getterFor,y=h.find,b=h.findIndex,_=0,uncaughtFrozenStore=function(t){return t.frozen||(t.frozen=new UncaughtFrozenStore)},UncaughtFrozenStore=function(){this.entries=[]},findUncaughtFrozen=function(t,r){return y(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=b(this.entries,(function(r){return r[0]===t}));~r&&this.entries.splice(r,1);return!!~r}};t.exports={getConstructor:function(t,r,a,h){var m=t((function(t,o){u(t,m,r);v(t,{type:r,id:_++,frozen:void 0});null!=o&&d(o,t[h],t,a)})),y=g(r),define=function(t,r,a){var o=y(t),c=i(l(r),!0);!0===c?uncaughtFrozenStore(o).set(r,a):c[o.id]=a;return t};o(m.prototype,{delete:function(t){var r=y(this);if(!c(t))return!1;var a=i(t);return!0===a?uncaughtFrozenStore(r).delete(t):a&&p(a,r.id)&&delete a[r.id]},has:function has(t){var r=y(this);if(!c(t))return!1;var a=i(t);return!0===a?uncaughtFrozenStore(r).has(t):a&&p(a,r.id)}});o(m.prototype,a?{get:function get(t){var r=y(this);if(c(t)){var a=i(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 m}}},function(t,r,a){var o=a(62),i=a(18),l=a(83),c=a(47),u=a(159),d=[].push,createMethod=function(t){var r=1==t,a=2==t,h=3==t,p=4==t,m=6==t,v=5==t||m;return function(g,y,b,_){for(var S,C,A=l(g),R=i(A),k=o(y,b,3),w=c(R.length),P=0,x=_||u,T=r?x(g,w):a?x(g,0):void 0;w>P;P++)if(v||P in R){C=k(S=R[P],P,A);if(t)if(r)T[P]=C;else if(C)switch(t){case 3:return!0;case 5:return S;case 6:return P;case 2:d.call(T,S)}else if(p)return!1}return m?-1:h||p?p:T}};t.exports={forEach:createMethod(0),map:createMethod(1),filter:createMethod(2),some:createMethod(3),every:createMethod(4),find:createMethod(5),findIndex:createMethod(6)}},function(t,r,a){var o=a(22),i=a(160),l=a(57)("species");t.exports=function(t,r){var a;i(t)&&("function"!=typeof(a=t.constructor)||a!==Array&&!i(a.prototype)?o(a)&&null===(a=a[l])&&(a=void 0):a=void 0);return new(void 0===a?Array:a)(0===r?0:r)}},function(t,r,a){var o=a(19);t.exports=Array.isArray||function isArray(t){return"Array"==o(t)}},function(t,r,a){a(118);a(162);a(120);var o=a(43);t.exports=o.WeakSet},function(t,r,a){"use strict";a(148)("WeakSet",(function(t){return function WeakSet(){return t(this,arguments.length?arguments[0]:void 0)}}),a(157))},function(t,r,a){a(164);var o=a(61);t.exports=o("String","codePointAt")},function(t,r,a){"use strict";var o=a(10),i=a(78).codeAt;o({target:"String",proto:!0},{codePointAt:function codePointAt(t){return i(this,t)}})},function(t,r,a){a(166);var o=a(43);t.exports=o.String.fromCodePoint},function(t,r,a){var o=a(10),i=a(49),l=String.fromCharCode,c=String.fromCodePoint;o({target:"String",stat:!0,forced:!!c&&1!=c.length},{fromCodePoint:function fromCodePoint(t){for(var r,a=[],o=arguments.length,c=0;o>c;){r=+arguments[c++];if(i(r,1114111)!==r)throw RangeError(r+" is not a valid code point");a.push(r<65536?l(r):l(55296+((r-=65536)>>10),r%1024+56320))}return a.join("")}})},function(t,r,a){a(168);a(118);a(170);a(174);a(175);a(176);a(177);a(178);a(179);a(180);a(181);a(182);a(183);a(184);a(185);a(186);a(187);a(188);a(189);var o=a(43);t.exports=o.Symbol},function(t,r,a){"use strict";var o=a(10),i=a(14),l=a(160),c=a(22),u=a(83),d=a(47),h=a(93),p=a(159),m=a(169),v=a(57),g=a(135),y=v("isConcatSpreadable"),b=g>=51||!i((function(){var t=[];t[y]=!1;return t.concat()[0]!==t})),_=m("concat"),isConcatSpreadable=function(t){if(!c(t))return!1;var r=t[y];return void 0!==r?!!r:l(t)};o({target:"Array",proto:!0,forced:!b||!_},{concat:function concat(t){var r,a,o,i,l,c=u(this),m=p(c,0),v=0;for(r=-1,o=arguments.length;r<o;r++)if(isConcatSpreadable(l=-1===r?c:arguments[r])){if(v+(i=d(l.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(a=0;a<i;a++,v++)a in l&&h(m,v,l[a])}else{if(v>=9007199254740991)throw TypeError("Maximum allowed index exceeded");h(m,v++,l)}m.length=v;return m}})},function(t,r,a){var o=a(14),i=a(57),l=a(135),c=i("species");t.exports=function(t){return l>=51||!o((function(){var r=[];(r.constructor={})[c]=function(){return{foo:1}};return 1!==r[t](Boolean).foo}))}},function(t,r,a){"use strict";var o=a(10),i=a(11),l=a(42),c=a(37),u=a(13),d=a(58),h=a(59),p=a(14),m=a(23),v=a(160),g=a(22),y=a(28),b=a(83),_=a(17),S=a(21),C=a(16),A=a(71),R=a(73),k=a(44),w=a(171),P=a(51),x=a(12),T=a(27),E=a(15),O=a(26),I=a(29),D=a(36),L=a(35),M=a(39),W=a(38),j=a(57),N=a(172),B=a(173),q=a(85),G=a(33),U=a(158).forEach,z=L("hidden"),H=j("toPrimitive"),V=G.set,Y=G.getterFor("Symbol"),X=Object.prototype,Q=i.Symbol,K=l("JSON","stringify"),J=x.f,$=T.f,Z=w.f,ee=E.f,te=D("symbols"),re=D("op-symbols"),ne=D("string-to-symbol-registry"),ae=D("symbol-to-string-registry"),oe=D("wks"),ie=i.QObject,se=!ie||!ie.prototype||!ie.prototype.findChild,le=u&&p((function(){return 7!=A($({},"a",{get:function(){return $(this,"a",{value:7}).a}})).a}))?function(t,r,a){var o=J(X,r);o&&delete X[r];$(t,r,a);o&&t!==X&&$(X,r,o)}:$,wrap=function(t,r){var a=te[t]=A(Q.prototype);V(a,{type:"Symbol",tag:t,description:r});u||(a.description=r);return a},ce=h?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof Q},ue=function defineProperty(t,r,a){t===X&&ue(re,r,a);y(t);var o=S(r,!0);y(a);if(m(te,o)){if(a.enumerable){m(t,z)&&t[z][o]&&(t[z][o]=!1);a=A(a,{enumerable:C(0,!1)})}else{m(t,z)||$(t,z,C(1,{}));t[z][o]=!0}return le(t,o,a)}return $(t,o,a)},fe=function defineProperties(t,r){y(t);var a=_(r),o=R(a).concat(me(a));U(o,(function(r){u&&!de.call(a,r)||ue(t,r,a[r])}));return t},de=function propertyIsEnumerable(t){var r=S(t,!0),a=ee.call(this,r);return!(this===X&&m(te,r)&&!m(re,r))&&(!(a||!m(this,r)||!m(te,r)||m(this,z)&&this[z][r])||a)},he=function getOwnPropertyDescriptor(t,r){var a=_(t),o=S(r,!0);if(a!==X||!m(te,o)||m(re,o)){var i=J(a,o);!i||!m(te,o)||m(a,z)&&a[z][o]||(i.enumerable=!0);return i}},pe=function getOwnPropertyNames(t){var r=Z(_(t)),a=[];U(r,(function(t){m(te,t)||m(M,t)||a.push(t)}));return a},me=function getOwnPropertySymbols(t){var r=t===X,a=Z(r?re:_(t)),o=[];U(a,(function(t){!m(te,t)||r&&!m(X,t)||o.push(te[t])}));return o};if(!d){I((Q=function Symbol(){if(this instanceof Q)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,r=W(t),setter=function(t){this===X&&setter.call(re,t);m(this,z)&&m(this[z],r)&&(this[z][r]=!1);le(this,r,C(1,t))};u&&se&&le(X,r,{configurable:!0,set:setter});return wrap(r,t)}).prototype,"toString",(function toString(){return Y(this).tag}));I(Q,"withoutSetter",(function(t){return wrap(W(t),t)}));E.f=de;T.f=ue;x.f=he;k.f=w.f=pe;P.f=me;N.f=function(t){return wrap(j(t),t)};if(u){$(Q.prototype,"description",{configurable:!0,get:function description(){return Y(this).description}});c||I(X,"propertyIsEnumerable",de,{unsafe:!0})}}o({global:!0,wrap:!0,forced:!d,sham:!d},{Symbol:Q});U(R(oe),(function(t){B(t)}));o({target:"Symbol",stat:!0,forced:!d},{for:function(t){var r=String(t);if(m(ne,r))return ne[r];var a=Q(r);ne[r]=a;ae[a]=r;return a},keyFor:function keyFor(t){if(!ce(t))throw TypeError(t+" is not a symbol");if(m(ae,t))return ae[t]},useSetter:function(){se=!0},useSimple:function(){se=!1}});o({target:"Object",stat:!0,forced:!d,sham:!u},{create:function create(t,r){return void 0===r?A(t):fe(A(t),r)},defineProperty:ue,defineProperties:fe,getOwnPropertyDescriptor:he});o({target:"Object",stat:!0,forced:!d},{getOwnPropertyNames:pe,getOwnPropertySymbols:me});o({target:"Object",stat:!0,forced:p((function(){P.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(t){return P.f(b(t))}});if(K){o({target:"JSON",stat:!0,forced:!d||p((function(){var t=Q();return"[null]"!=K([t])||"{}"!=K({a:t})||"{}"!=K(Object(t))}))},{stringify:function stringify(t,r,a){for(var o,i=[t],l=1;arguments.length>l;)i.push(arguments[l++]);o=r;if((g(r)||void 0!==t)&&!ce(t)){v(r)||(r=function(t,r){"function"==typeof o&&(r=o.call(this,t,r));if(!ce(r))return r});i[1]=r;return K.apply(null,i)}}})}Q.prototype[H]||O(Q.prototype,H,Q.prototype.valueOf);q(Q,"Symbol");M[z]=!0},function(t,r,a){var o=a(17),i=a(44).f,l={}.toString,c="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function getOwnPropertyNames(t){return c&&"[object Window]"==l.call(t)?function(t){try{return i(t)}catch(t){return c.slice()}}(t):i(o(t))}},function(t,r,a){var o=a(57);r.f=o},function(t,r,a){var o=a(43),i=a(23),l=a(172),c=a(27).f;t.exports=function(t){var r=o.Symbol||(o.Symbol={});i(r,t)||c(r,t,{value:l.f(t)})}},function(t,r,a){a(173)("asyncIterator")},function(t,r,a){"use strict";var o=a(10),i=a(13),l=a(11),c=a(23),u=a(22),d=a(27).f,h=a(40),p=l.Symbol;if(i&&"function"==typeof p&&(!("description"in p.prototype)||void 0!==p().description)){var m={},v=function Symbol(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),r=this instanceof v?new p(t):void 0===t?p():p(t);""===t&&(m[r]=!0);return r};h(v,p);var g=v.prototype=p.prototype;g.constructor=v;var y=g.toString,b="Symbol(test)"==String(p("test")),_=/^Symbol\((.*)\)[^)]+$/;d(g,"description",{configurable:!0,get:function description(){var t=u(this)?this.valueOf():this,r=y.call(t);if(c(m,t))return"";var a=b?r.slice(7,-1):r.replace(_,"$1");return""===a?void 0:a}});o({global:!0,forced:!0},{Symbol:v})}},function(t,r,a){a(173)("hasInstance")},function(t,r,a){a(173)("isConcatSpreadable")},function(t,r,a){a(173)("iterator")},function(t,r,a){a(173)("match")},function(t,r,a){a(173)("matchAll")},function(t,r,a){a(173)("replace")},function(t,r,a){a(173)("search")},function(t,r,a){a(173)("species")},function(t,r,a){a(173)("split")},function(t,r,a){a(173)("toPrimitive")},function(t,r,a){a(173)("toStringTag")},function(t,r,a){a(173)("unscopables")},function(t,r,a){a(85)(Math,"Math",!0)},function(t,r,a){var o=a(11);a(85)(o.JSON,"JSON",!0)},function(t,r,a){a(191);var o=a(61);t.exports=o("String","padStart")},function(t,r,a){"use strict";var o=a(10),i=a(192).start;o({target:"String",proto:!0,forced:a(194)},{padStart:function padStart(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,r,a){var o=a(47),i=a(193),l=a(20),c=Math.ceil,createMethod=function(t){return function(r,a,u){var d,h,p=String(l(r)),m=p.length,v=void 0===u?" ":String(u),g=o(a);if(g<=m||""==v)return p;d=g-m;(h=i.call(v,c(d/v.length))).length>d&&(h=h.slice(0,d));return t?p+h:h+p}};t.exports={start:createMethod(!1),end:createMethod(!0)}},function(t,r,a){"use strict";var o=a(48),i=a(20);t.exports="".repeat||function repeat(t){var r=String(i(this)),a="",l=o(t);if(l<0||l==1/0)throw RangeError("Wrong number of repetitions");for(;l>0;(l>>>=1)&&(r+=r))1&l&&(a+=r);return a}},function(t,r,a){var o=a(129);t.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o)},function(t,r,a){a(196);var o=a(61);t.exports=o("String","padEnd")},function(t,r,a){"use strict";var o=a(10),i=a(192).end;o({target:"String",proto:!0,forced:a(194)},{padEnd:function padEnd(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,r,a){a(198);var o=a(43);t.exports=o.Object.values},function(t,r,a){var o=a(10),i=a(199).values;o({target:"Object",stat:!0},{values:function values(t){return i(t)}})},function(t,r,a){var o=a(13),i=a(73),l=a(17),c=a(15).f,createMethod=function(t){return function(r){for(var a,u=l(r),d=i(u),h=d.length,p=0,m=[];h>p;){a=d[p++];o&&!c.call(u,a)||m.push(t?[a,u[a]]:u[a])}return m}};t.exports={entries:createMethod(!0),values:createMethod(!1)}},function(t,r,a){a(201);var o=a(43);t.exports=o.Object.entries},function(t,r,a){var o=a(10),i=a(199).entries;o({target:"Object",stat:!0},{entries:function entries(t){return i(t)}})},function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.getDocument=getDocument;exports.setPDFNetworkStreamFactory=setPDFNetworkStreamFactory;exports.build=exports.version=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFWorker=exports.PDFDataRangeTransport=exports.LoopbackPort=void 0;var _regenerator=_interopRequireDefault(__w_pdfjs_require__(2)),_util=__w_pdfjs_require__(5),_display_utils=__w_pdfjs_require__(1),_font_loader=__w_pdfjs_require__(203),_node_utils=__w_pdfjs_require__(204),_annotation_storage=__w_pdfjs_require__(205),_api_compatibility=__w_pdfjs_require__(206),_canvas=__w_pdfjs_require__(207),_worker_options=__w_pdfjs_require__(209),_is_node=__w_pdfjs_require__(7),_message_handler=__w_pdfjs_require__(210),_metadata=__w_pdfjs_require__(211),_optional_content_config=__w_pdfjs_require__(213),_transport_stream=__w_pdfjs_require__(214),_webgl=__w_pdfjs_require__(215);function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function asyncGeneratorStep(t,r,a,o,i,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(o,i)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(o,i){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,o,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,o,i,_next,_throw,"throw",t)}_next(void 0)}))}}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&&Symbol.iterator in Object(t))return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _createForOfIteratorHelper(t,r){var a;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var o=0,i=function F(){};return{s:i,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:i}}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=t[Symbol.iterator]()},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 _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 o=r[a];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);return t}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,o=new Array(r);a<r;a++)o[a]=t[a];return o}function _iterableToArrayLimit(t,r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var a=[],o=!0,i=!1,l=void 0;try{for(var c,u=t[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){a.push(c.value);if(r&&a.length===r)break}}catch(t){i=!0;l=t}finally{try{o||null==u.return||u.return()}finally{if(i)throw l}}return a}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DefaultCanvasFactory=_is_node.isNodeJS?_node_utils.NodeCanvasFactory:_display_utils.DOMCanvasFactory,DefaultCMapReaderFactory=_is_node.isNodeJS?_node_utils.NodeCMapReaderFactory:_display_utils.DOMCMapReaderFactory,createPDFNetworkStream;function setPDFNetworkStreamFactory(t){createPDFNetworkStream=t}function getDocument(t){var r,a=new PDFDocumentLoadingTask;if("string"==typeof t)r={url:t};else if((0,_util.isArrayBuffer)(t))r={data:t};else if(t instanceof PDFDataRangeTransport)r={range:t};else{if("object"!==_typeof(t))throw new Error("Invalid parameter in getDocument, need either Uint8Array, string or a parameter object");if(!t.url&&!t.data&&!t.range)throw new Error("Invalid parameter object: need either .data, .range or .url");r=t}var o=Object.create(null),i=null,l=null;for(var c in r)if("url"!==c||"undefined"==typeof window)if("range"!==c)if("worker"!==c)if("data"!==c||r[c]instanceof Uint8Array)o[c]=r[c];else{var u=r[c];if("string"==typeof u)o[c]=(0,_util.stringToBytes)(u);else if("object"!==_typeof(u)||null===u||isNaN(u.length)){if(!(0,_util.isArrayBuffer)(u))throw new Error("Invalid PDF binary data: either typed array, string or array-like object is expected in the data property.");o[c]=new Uint8Array(u)}else o[c]=new Uint8Array(u)}else l=r[c];else i=r[c];else o[c]=new URL(r[c],window.location).href;o.rangeChunkSize=o.rangeChunkSize||DEFAULT_RANGE_CHUNK_SIZE;o.CMapReaderFactory=o.CMapReaderFactory||DefaultCMapReaderFactory;o.ignoreErrors=!0!==o.stopAtErrors;o.fontExtraProperties=!0===o.fontExtraProperties;o.pdfBug=!0===o.pdfBug;Number.isInteger(o.maxImageSize)||(o.maxImageSize=-1);"boolean"!=typeof o.isEvalSupported&&(o.isEvalSupported=!0);"boolean"!=typeof o.disableFontFace&&(o.disableFontFace=_api_compatibility.apiCompatibilityParams.disableFontFace||!1);void 0===o.ownerDocument&&(o.ownerDocument=globalThis.document);"boolean"!=typeof o.disableRange&&(o.disableRange=!1);"boolean"!=typeof o.disableStream&&(o.disableStream=!1);"boolean"!=typeof o.disableAutoFetch&&(o.disableAutoFetch=!1);(0,_util.setVerbosityLevel)(o.verbosity);if(!l){var d={verbosity:o.verbosity,port:_worker_options.GlobalWorkerOptions.workerPort};l=d.port?PDFWorker.fromPort(d):new PDFWorker(d);a._worker=l}var h=a.docId;l.promise.then((function(){if(a.destroyed)throw new Error("Loading aborted");var t=_fetchDocument(l,o,i,h),r=new Promise((function(t){var r;i?r=new _transport_stream.PDFDataTransportStream({length:o.length,initialData:o.initialData,progressiveDone:o.progressiveDone,disableRange:o.disableRange,disableStream:o.disableStream},i):o.data||(r=createPDFNetworkStream({url:o.url,length:o.length,httpHeaders:o.httpHeaders,withCredentials:o.withCredentials,rangeChunkSize:o.rangeChunkSize,disableRange:o.disableRange,disableStream:o.disableStream}));t(r)}));return Promise.all([t,r]).then((function(t){var r=_slicedToArray(t,2),i=r[0],c=r[1];if(a.destroyed)throw new Error("Loading aborted");var u=new _message_handler.MessageHandler(h,i,l.port);u.postMessageTransfers=l.postMessageTransfers;var d=new WorkerTransport(u,a,c,o);a._transport=d;u.send("Ready",null)}))})).catch(a._capability.reject);return a}function _fetchDocument(t,r,a,o){if(t.destroyed)return Promise.reject(new Error("Worker was destroyed"));if(a){r.length=a.length;r.initialData=a.initialData;r.progressiveDone=a.progressiveDone}return t.messageHandler.sendWithPromise("GetDocRequest",{docId:o,apiVersion:"2.6.347",source:{data:r.data,url:r.url,password:r.password,disableAutoFetch:r.disableAutoFetch,rangeChunkSize:r.rangeChunkSize,length:r.length},maxImageSize:r.maxImageSize,disableFontFace:r.disableFontFace,postMessageTransfers:t.postMessageTransfers,docBaseUrl:r.docBaseUrl,ignoreErrors:r.ignoreErrors,isEvalSupported:r.isEvalSupported,fontExtraProperties:r.fontExtraProperties}).then((function(r){if(t.destroyed)throw new Error("Worker was destroyed");return r}))}var PDFDocumentLoadingTask=function PDFDocumentLoadingTaskClosure(){var t=0;return function(){function PDFDocumentLoadingTask(){_classCallCheck(this,PDFDocumentLoadingTask);this._capability=(0,_util.createPromiseCapability)();this._transport=null;this._worker=null;this.docId="d"+t++;this.destroyed=!1;this.onPassword=null;this.onProgress=null;this.onUnsupportedFeature=null}_createClass(PDFDocumentLoadingTask,[{key:"destroy",value:function destroy(){var t=this;this.destroyed=!0;return(this._transport?this._transport.destroy():Promise.resolve()).then((function(){t._transport=null;if(t._worker){t._worker.destroy();t._worker=null}}))}},{key:"promise",get:function get(){return this._capability.promise}}]);return PDFDocumentLoadingTask}()}(),PDFDataRangeTransport=function(){function PDFDataRangeTransport(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];_classCallCheck(this,PDFDataRangeTransport);this.length=t;this.initialData=r;this.progressiveDone=a;this._rangeListeners=[];this._progressListeners=[];this._progressiveReadListeners=[];this._progressiveDoneListeners=[];this._readyCapability=(0,_util.createPromiseCapability)()}_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,o=_createForOfIteratorHelper(this._rangeListeners);try{for(o.s();!(a=o.n()).done;){(0,a.value)(t,r)}}catch(t){o.e(t)}finally{o.f()}}},{key:"onDataProgress",value:function onDataProgress(t,r){var a=this;this._readyCapability.promise.then((function(){var o,i=_createForOfIteratorHelper(a._progressListeners);try{for(i.s();!(o=i.n()).done;){(0,o.value)(t,r)}}catch(t){i.e(t)}finally{i.f()}}))}},{key:"onDataProgressiveRead",value:function onDataProgressiveRead(t){var r=this;this._readyCapability.promise.then((function(){var a,o=_createForOfIteratorHelper(r._progressiveReadListeners);try{for(o.s();!(a=o.n()).done;){(0,a.value)(t)}}catch(t){o.e(t)}finally{o.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){_classCallCheck(this,PDFDocumentProxy);this._pdfInfo=t;this._transport=r}_createClass(PDFDocumentProxy,[{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:"getJavaScript",value:function getJavaScript(){return this._transport.getJavaScript()}},{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:"getData",value:function getData(){return this._transport.getData()}},{key:"getDownloadInfo",value:function getDownloadInfo(){return this._transport.downloadInfoCapability.promise}},{key:"getStats",value:function getStats(){return this._transport.getStats()}},{key:"cleanup",value:function cleanup(){return this._transport.startCleanup()}},{key:"destroy",value:function destroy(){return this.loadingTask.destroy()}},{key:"saveDocument",value:function saveDocument(t){return this._transport.saveDocument(t)}},{key:"annotationStorage",get:function get(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}},{key:"numPages",get:function get(){return this._pdfInfo.numPages}},{key:"fingerprint",get:function get(){return this._pdfInfo.fingerprint}},{key:"loadingParams",get:function get(){return this._transport.loadingParams}},{key:"loadingTask",get:function get(){return this._transport.loadingTask}}]);return PDFDocumentProxy}();exports.PDFDocumentProxy=PDFDocumentProxy;var PDFPageProxy=function(){function PDFPageProxy(t,r,a,o){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];_classCallCheck(this,PDFPageProxy);this._pageIndex=t;this._pageInfo=r;this._ownerDocument=o;this._transport=a;this._stats=i?new _display_utils.StatTimer:null;this._pdfBug=i;this.commonObjs=a.commonObjs;this.objs=new PDFObjects;this.cleanupAfterRender=!1;this.pendingCleanup=!1;this._intentStates=new Map;this.destroyed=!1}_createClass(PDFPageProxy,[{key:"getViewport",value:function getViewport(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.scale,a=t.rotation,o=void 0===a?this.rotate:a,i=t.offsetX,l=void 0===i?0:i,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:o,offsetX:l,offsetY:u,dontFlip:h})}},{key:"getAnnotations",value:function getAnnotations(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.intent,a=void 0===r?null:r;if(!this.annotationsPromise||this.annotationsIntent!==a){this.annotationsPromise=this._transport.getAnnotations(this._pageIndex,a);this.annotationsIntent=a}return this.annotationsPromise}},{key:"render",value:function render(t){var r=this,a=t.canvasContext,o=t.viewport,i=t.intent,l=void 0===i?"display":i,c=t.enableWebGL,u=void 0!==c&&c,d=t.renderInteractiveForms,h=void 0!==d&&d,p=t.transform,m=void 0===p?null:p,v=t.imageLayer,g=void 0===v?null:v,y=t.canvasFactory,b=void 0===y?null:y,_=t.background,S=void 0===_?null:_,C=t.annotationStorage,A=void 0===C?null:C,R=t.optionalContentConfigPromise,k=void 0===R?null:R;this._stats&&this._stats.time("Overall");var w="print"===l?"print":"display";this.pendingCleanup=!1;k||(k=this._transport.getOptionalContentConfig());var P=this._intentStates.get(w);if(!P){P=Object.create(null);this._intentStates.set(w,P)}if(P.streamReaderCancelTimeout){clearTimeout(P.streamReaderCancelTimeout);P.streamReaderCancelTimeout=null}var x=b||new DefaultCanvasFactory({ownerDocument:this._ownerDocument}),T=new _webgl.WebGLContext({enable:u});if(!P.displayReadyCapability){P.displayReadyCapability=(0,_util.createPromiseCapability)();P.operatorList={fnArray:[],argsArray:[],lastChunk:!1};this._stats&&this._stats.time("Page Request");this._pumpOperatorList({pageIndex:this._pageIndex,intent:w,renderInteractiveForms:!0===h,annotationStorage:A&&A.getAll()||null})}var E=function complete(t){var a=P.renderTasks.indexOf(O);a>=0&&P.renderTasks.splice(a,1);(r.cleanupAfterRender||"print"===w)&&(r.pendingCleanup=!0);r._tryCleanup();if(t){O.capability.reject(t);r._abortOperatorList({intentState:P,reason:t})}else O.capability.resolve();if(r._stats){r._stats.timeEnd("Rendering");r._stats.timeEnd("Overall")}},O=new InternalRenderTask({callback:E,params:{canvasContext:a,viewport:o,transform:m,imageLayer:g,background:S},objs:this.objs,commonObjs:this.commonObjs,operatorList:P.operatorList,pageIndex:this._pageIndex,canvasFactory:x,webGLContext:T,useRequestAnimationFrame:"print"!==w,pdfBug:this._pdfBug});P.renderTasks||(P.renderTasks=[]);P.renderTasks.push(O);var I=O.task;Promise.all([P.displayReadyCapability.promise,k]).then((function(t){var a=_slicedToArray(t,2),o=a[0],i=a[1];if(r.pendingCleanup)E();else{r._stats&&r._stats.time("Rendering");O.initializeGraphics({transparency:o,optionalContentConfig:i});O.operatorListChanged()}})).catch(E);return I}},{key:"getOperatorList",value:function getOperatorList(){var t,r=this._intentStates.get("oplist");if(!r){r=Object.create(null);this._intentStates.set("oplist",r)}if(!r.opListReadCapability){(t=Object.create(null)).operatorListChanged=function operatorListChanged(){if(r.operatorList.lastChunk){r.opListReadCapability.resolve(r.operatorList);var a=r.renderTasks.indexOf(t);a>=0&&r.renderTasks.splice(a,1)}};r.opListReadCapability=(0,_util.createPromiseCapability)();r.renderTasks=[];r.renderTasks.push(t);r.operatorList={fnArray:[],argsArray:[],lastChunk:!1};this._stats&&this._stats.time("Page Request");this._pumpOperatorList({pageIndex:this._pageIndex,intent:"oplist"})}return r.opListReadCapability.promise}},{key:"streamTextContent",value:function streamTextContent(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.normalizeWhitespace,a=void 0!==r&&r,o=t.disableCombineTextItems,i=void 0!==o&&o,l=100;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,normalizeWhitespace:!0===a,combineTextItems:!0!==i},{highWaterMark:l,size:function size(t){return t.items.length}})}},{key:"getTextContent",value:function getTextContent(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=this.streamTextContent(t);return new Promise((function(t,a){var o=r.getReader(),i={items:[],styles:Object.create(null)};!function pump(){o.read().then((function(r){var a,o=r.value;if(r.done)t(i);else{Object.assign(i.styles,o.styles);(a=i.items).push.apply(a,_toConsumableArray(o.items));pump()}}),a)}()}))}},{key:"_destroy",value:function _destroy(){this.destroyed=!0;this._transport.pageCache[this._pageIndex]=null;var t,r=[],a=_createForOfIteratorHelper(this._intentStates);try{for(a.s();!(t=a.n()).done;){var o=_slicedToArray(t.value,2),i=o[0],l=o[1];this._abortOperatorList({intentState:l,reason:new Error("Page was destroyed."),force:!0});if("oplist"!==i){var c,u=_createForOfIteratorHelper(l.renderTasks);try{for(u.s();!(c=u.n()).done;){var d=c.value;r.push(d.completed);d.cancel()}}catch(t){u.e(t)}finally{u.f()}}}}catch(t){a.e(t)}finally{a.f()}this.objs.clear();this.annotationsPromise=null;this.pendingCleanup=!1;return Promise.all(r)}},{key:"cleanup",value:function cleanup(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.pendingCleanup=!0;return this._tryCleanup(t)}},{key:"_tryCleanup",value:function _tryCleanup(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.pendingCleanup)return!1;var r,a=_createForOfIteratorHelper(this._intentStates.values());try{for(a.s();!(r=a.n()).done;){var o=r.value,i=o.renderTasks,l=o.operatorList;if(0!==i.length||!l.lastChunk)return!1}}catch(t){a.e(t)}finally{a.f()}this._intentStates.clear();this.objs.clear();this.annotationsPromise=null;t&&this._stats&&(this._stats=new _display_utils.StatTimer);this.pendingCleanup=!1;return!0}},{key:"_startRenderPage",value:function _startRenderPage(t,r){var a=this._intentStates.get(r);if(a){this._stats&&this._stats.timeEnd("Page Request");a.displayReadyCapability&&a.displayReadyCapability.resolve(t)}}},{key:"_renderPageChunk",value:function _renderPageChunk(t,r){for(var a=0,o=t.length;a<o;a++){r.operatorList.fnArray.push(t.fnArray[a]);r.operatorList.argsArray.push(t.argsArray[a])}r.operatorList.lastChunk=t.lastChunk;for(var i=0;i<r.renderTasks.length;i++)r.renderTasks[i].operatorListChanged();t.lastChunk&&this._tryCleanup()}},{key:"_pumpOperatorList",value:function _pumpOperatorList(t){var r=this;(0,_util.assert)(t.intent,'PDFPageProxy._pumpOperatorList: Expected "intent" argument.');var a=this._transport.messageHandler.sendWithStream("GetOperatorList",t).getReader(),o=this._intentStates.get(t.intent);o.streamReader=a;!function pump(){a.read().then((function(t){var a=t.value;if(t.done)o.streamReader=null;else if(!r._transport.destroyed){r._renderPageChunk(a,o);pump()}}),(function(t){o.streamReader=null;if(!r._transport.destroyed){if(o.operatorList){o.operatorList.lastChunk=!0;for(var a=0;a<o.renderTasks.length;a++)o.renderTasks[a].operatorListChanged();r._tryCleanup()}if(o.displayReadyCapability)o.displayReadyCapability.reject(t);else{if(!o.opListReadCapability)throw t;o.opListReadCapability.reject(t)}}}))}()}},{key:"_abortOperatorList",value:function _abortOperatorList(t){var r=this,a=t.intentState,o=t.reason,i=t.force,l=void 0!==i&&i;(0,_util.assert)(o instanceof Error||"object"===_typeof(o)&&null!==o,'PDFPageProxy._abortOperatorList: Expected "reason" argument.');if(a.streamReader){if(!l){if(0!==a.renderTasks.length)return;if(o instanceof _display_utils.RenderingCancelledException){a.streamReaderCancelTimeout=setTimeout((function(){r._abortOperatorList({intentState:a,reason:o,force:!0});a.streamReaderCancelTimeout=null}),RENDERING_CANCELLED_TIMEOUT);return}}a.streamReader.cancel(new _util.AbortException(o&&o.message));a.streamReader=null;if(!this._transport.destroyed){var c,u=_createForOfIteratorHelper(this._intentStates);try{for(u.s();!(c=u.n()).done;){var d=_slicedToArray(c.value,2),h=d[0];if(d[1]===a){this._intentStates.delete(h);break}}}catch(t){u.e(t)}finally{u.f()}this.cleanup()}}}},{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:"stats",get:function get(){return this._stats}}]);return PDFPageProxy}();exports.PDFPageProxy=PDFPageProxy;var LoopbackPort=function(){function LoopbackPort(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];_classCallCheck(this,LoopbackPort);this._listeners=[];this._defer=t;this._deferred=Promise.resolve(void 0)}_createClass(LoopbackPort,[{key:"postMessage",value:function postMessage(t,r){var a=this;if(this._defer){var o=new WeakMap,i={data:function cloneValue(t){if("object"!==_typeof(t)||null===t)return t;if(o.has(t))return o.get(t);var a,i;if((a=t.buffer)&&(0,_util.isArrayBuffer)(a)){i=r&&r.includes(a)?new t.constructor(a,t.byteOffset,t.byteLength):new t.constructor(t);o.set(t,i);return i}i=Array.isArray(t)?[]:{};o.set(t,i);for(var l in t){for(var c=void 0,u=t;!(c=Object.getOwnPropertyDescriptor(u,l));)u=Object.getPrototypeOf(u);if(void 0!==c.value)if("function"!=typeof c.value)i[l]=cloneValue(c.value);else if(t.hasOwnProperty&&t.hasOwnProperty(l))throw new Error("LoopbackPort.postMessage - cannot clone: ".concat(t[l]))}return i}(t)};this._deferred.then((function(){a._listeners.forEach((function(t){t.call(a,i)}))}))}else this._listeners.forEach((function(r){r.call(a,{data:t})}))}},{key:"addEventListener",value:function addEventListener(t,r){this._listeners.push(r)}},{key:"removeEventListener",value:function removeEventListener(t,r){var a=this._listeners.indexOf(r);this._listeners.splice(a,1)}},{key:"terminate",value:function terminate(){this._listeners.length=0}}]);return LoopbackPort}();exports.LoopbackPort=LoopbackPort;var PDFWorker=function PDFWorkerClosure(){var pdfWorkerPorts=new WeakMap,isWorkerDisabled=!1,fallbackWorkerSrc,nextFakeWorkerId=0,fakeWorkerCapability;if(_is_node.isNodeJS&&"function"==typeof require){isWorkerDisabled=!0;fallbackWorkerSrc="./pdf.worker.js"}else if("object"===("undefined"==typeof document?"undefined":_typeof(document))&&"currentScript"in document){var pdfjsFilePath=document.currentScript&&document.currentScript.src;pdfjsFilePath&&(fallbackWorkerSrc=pdfjsFilePath.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}function _getWorkerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(void 0!==fallbackWorkerSrc){_is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.');return fallbackWorkerSrc}throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}function getMainThreadWorkerMessageHandler(){var t;try{t=globalThis.pdfjsWorker&&globalThis.pdfjsWorker.WorkerMessageHandler}catch(t){}return t||null}function setupFakeWorkerGlobal(){if(fakeWorkerCapability)return fakeWorkerCapability.promise;fakeWorkerCapability=(0,_util.createPromiseCapability)();var loader=function(){var _ref12=_asyncToGenerator(_regenerator.default.mark((function _callee(){var mainWorkerMessageHandler,worker;return _regenerator.default.wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:mainWorkerMessageHandler=getMainThreadWorkerMessageHandler();if(!mainWorkerMessageHandler){_context.next=3;break}return _context.abrupt("return",mainWorkerMessageHandler);case 3:if(!_is_node.isNodeJS||"function"!=typeof require){_context.next=6;break}worker=eval("require")(_getWorkerSrc());return _context.abrupt("return",worker.WorkerMessageHandler);case 6:_context.next=8;return(0,_display_utils.loadScript)(_getWorkerSrc());case 8:return _context.abrupt("return",window.pdfjsWorker.WorkerMessageHandler);case 9:case"end":return _context.stop()}}),_callee)})));return function loader(){return _ref12.apply(this,arguments)}}();loader().then(fakeWorkerCapability.resolve,fakeWorkerCapability.reject);return fakeWorkerCapability.promise}function createCDNWrapper(t){var r="importScripts('"+t+"');";return URL.createObjectURL(new Blob([r]))}var PDFWorker=function(){function PDFWorker(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.name,a=void 0===r?null:r,o=t.port,i=void 0===o?null:o,l=t.verbosity,c=void 0===l?(0,_util.getVerbosityLevel)():l;_classCallCheck(this,PDFWorker);if(i&&pdfWorkerPorts.has(i))throw new Error("Cannot use more than one PDFWorker per port");this.name=a;this.destroyed=!1;this.postMessageTransfers=!0;this.verbosity=c;this._readyCapability=(0,_util.createPromiseCapability)();this._port=null;this._webWorker=null;this._messageHandler=null;if(i){pdfWorkerPorts.set(i,this);this._initializeFromPort(i)}else this._initialize()}_createClass(PDFWorker,[{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()}},{key:"_initialize",value:function _initialize(){var t=this;if("undefined"!=typeof Worker&&!isWorkerDisabled&&!getMainThreadWorkerMessageHandler()){var r=_getWorkerSrc();try{(0,_util.isSameOrigin)(window.location.href,r)||(r=createCDNWrapper(new URL(r,window.location).href));var a=new Worker(r),o=new _message_handler.MessageHandler("main","worker",a),i=function terminateEarly(){a.removeEventListener("error",l);o.destroy();a.terminate();t.destroyed?t._readyCapability.reject(new Error("Worker was destroyed")):t._setupFakeWorker()},l=function onWorkerError(){t._webWorker||i()};a.addEventListener("error",l);o.on("test",(function(r){a.removeEventListener("error",l);if(t.destroyed)i();else if(r){t._messageHandler=o;t._port=a;t._webWorker=a;r.supportTransfers||(t.postMessageTransfers=!1);t._readyCapability.resolve();o.send("configure",{verbosity:t.verbosity})}else{t._setupFakeWorker();o.destroy();a.terminate()}}));o.on("ready",(function(r){a.removeEventListener("error",l);if(t.destroyed)i();else try{c()}catch(r){t._setupFakeWorker()}}));var c=function sendTest(){var r=new Uint8Array([t.postMessageTransfers?255:0]);try{o.send("test",r,[r.buffer])}catch(t){(0,_util.warn)("Cannot use postMessage transfers.");r[0]=0;o.send("test",r)}};c();return}catch(t){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}},{key:"_setupFakeWorker",value:function _setupFakeWorker(){var t=this;if(!isWorkerDisabled){(0,_util.warn)("Setting up fake worker.");isWorkerDisabled=!0}setupFakeWorkerGlobal().then((function(r){if(t.destroyed)t._readyCapability.reject(new Error("Worker was destroyed"));else{var a=new LoopbackPort;t._port=a;var o="fake"+nextFakeWorkerId++,i=new _message_handler.MessageHandler(o+"_worker",o,a);r.setup(i,a);var l=new _message_handler.MessageHandler(o,o+"_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(){this.destroyed=!0;if(this._webWorker){this._webWorker.terminate();this._webWorker=null}pdfWorkerPorts.delete(this._port);this._port=null;if(this._messageHandler){this._messageHandler.destroy();this._messageHandler=null}}},{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:"fromPort",value:function fromPort(t){if(!t||!t.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return pdfWorkerPorts.has(t.port)?pdfWorkerPorts.get(t.port):new PDFWorker(t)}},{key:"getWorkerSrc",value:function getWorkerSrc(){return _getWorkerSrc()}}]);return PDFWorker}();return PDFWorker}();exports.PDFWorker=PDFWorker;var WorkerTransport=function(){function WorkerTransport(t,r,a,o){_classCallCheck(this,WorkerTransport);this.messageHandler=t;this.loadingTask=r;this.commonObjs=new PDFObjects;this.fontLoader=new _font_loader.FontLoader({docId:r.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),ownerDocument:o.ownerDocument});this._params=o;this.CMapReaderFactory=new o.CMapReaderFactory({baseUrl:o.cMapUrl,isCompressed:o.cMapPacked});this.destroyed=!1;this.destroyCapability=null;this._passwordCapability=null;this._networkStream=a;this._fullReader=null;this._lastProgress=null;this.pageCache=[];this.pagePromises=[];this.downloadInfoCapability=(0,_util.createPromiseCapability)();this.setupMessageHandler()}_createClass(WorkerTransport,[{key:"destroy",value:function destroy(){var t=this;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0;this.destroyCapability=(0,_util.createPromiseCapability)();this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));var r=[];this.pageCache.forEach((function(t){t&&r.push(t._destroy())}));this.pageCache.length=0;this.pagePromises.length=0;var a=this.messageHandler.sendWithPromise("Terminate",null);r.push(a);Promise.all(r).then((function(){t.fontLoader.clear();t._networkStream&&t._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated."));if(t.messageHandler){t.messageHandler.destroy();t.messageHandler=null}t.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)((0,_util.isArrayBuffer)(r),"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 o=(0,_util.createPromiseCapability)(),i=t._fullReader;i.headersReady.then((function(){if(!i.isStreamingSupported||!i.isRangeSupported){t._lastProgress&&a.onProgress&&a.onProgress(t._lastProgress);i.onProgress=function(t){a.onProgress&&a.onProgress({loaded:t.loaded,total:t.total})}}o.resolve({isStreamingSupported:i.isStreamingSupported,isRangeSupported:i.isRangeSupported,contentLength:i.contentLength})}),o.reject);return o.promise}));r.on("GetRangeReader",(function(r,a){(0,_util.assert)(t._networkStream,"GetRangeReader - no `IPDFStream` instance available.");var o=t._networkStream.getRangeReader(r.begin,r.end);if(o){a.onPull=function(){o.read().then((function(t){var r=t.value;if(t.done)a.close();else{(0,_util.assert)((0,_util.isArrayBuffer)(r),"GetRangeReader - expected an ArrayBuffer.");a.enqueue(new Uint8Array(r),1,[r])}})).catch((function(t){a.error(t)}))};a.onCancel=function(r){o.cancel(r);a.ready.catch((function(r){if(!t.destroyed)throw r}))}}else a.close()}));r.on("GetDoc",(function(r){var o=r.pdfInfo;t._numPages=o.numPages;a._capability.resolve(new PDFDocumentProxy(o,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)}if(!(r instanceof Error)){(0,_util.warn)("DocException - expected a valid Error.")}a._capability.reject(r)}));r.on("PasswordRequest",(function(r){t._passwordCapability=(0,_util.createPromiseCapability)();if(a.onPassword){try{a.onPassword((function updatePassword(r){t._passwordCapability.resolve({password:r})}),r.code)}catch(r){t._passwordCapability.reject(r)}}else t._passwordCapability.reject(new _util.PasswordException(r.message,r.code));return t._passwordCapability.promise}));r.on("DataLoaded",(function(r){a.onProgress&&a.onProgress({loaded:r.length,total:r.length});t.downloadInfoCapability.resolve(r)}));r.on("StartRenderPage",(function(r){if(!t.destroyed){t.pageCache[r.pageIndex]._startRenderPage(r.transparency,r.intent)}}));r.on("commonobj",(function(a){if(!t.destroyed){var o=_slicedToArray(a,3),i=o[0],l=o[1],c=o[2];if(!t.commonObjs.has(i))switch(l){case"Font":var u=t._params;if("error"in c){var d=c.error;(0,_util.warn)("Error during font loading: ".concat(d));t.commonObjs.resolve(i,d);break}var h=null;u.pdfBug&&globalThis.FontInspector&&globalThis.FontInspector.enabled&&(h={registerFont:function registerFont(t,r){globalThis.FontInspector.fontAdded(t,r)}});var p=new _font_loader.FontFaceObject(c,{isEvalSupported:u.isEvalSupported,disableFontFace:u.disableFontFace,ignoreErrors:u.ignoreErrors,onUnsupportedFeature:t._onUnsupportedFeature.bind(t),fontRegistry:h});t.fontLoader.bind(p).catch((function(t){return r.sendWithPromise("FontFallback",{id:i})})).finally((function(){!u.fontExtraProperties&&p.data&&(p.data=null);t.commonObjs.resolve(i,p)}));break;case"FontPath":case"Image":t.commonObjs.resolve(i,c);break;default:throw new Error("Got unknown common object type ".concat(l))}}}));r.on("obj",(function(r){if(!t.destroyed){var a=_slicedToArray(r,4),o=a[0],i=a[1],l=a[2],c=a[3],u=t.pageCache[i];if(!u.objs.has(o))switch(l){case"Image":u.objs.resolve(o,c);c&&"data"in c&&c.data.length>8e6&&(u.cleanupAfterRender=!0);break;default:throw new Error("Got unknown object type ".concat(l))}}}));r.on("DocProgress",(function(r){t.destroyed||a.onProgress&&a.onProgress({loaded:r.loaded,total:r.total})}));r.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this));r.on("FetchBuiltInCMap",(function(r,a){if(t.destroyed)a.error(new Error("Worker was destroyed"));else{var o=!1;a.onPull=function(){if(o)a.close();else{o=!0;t.CMapReaderFactory.fetch(r).then((function(t){a.enqueue(t,1,[t.cMapData.buffer])})).catch((function(t){a.error(t)}))}}}}))}},{key:"_onUnsupportedFeature",value:function _onUnsupportedFeature(t){var r=t.featureId;this.destroyed||this.loadingTask.onUnsupportedFeature&&this.loadingTask.onUnsupportedFeature(r)}},{key:"getData",value:function getData(){return this.messageHandler.sendWithPromise("GetData",null)}},{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;if(a in this.pagePromises)return this.pagePromises[a];var o=this.messageHandler.sendWithPromise("GetPage",{pageIndex:a}).then((function(t){if(r.destroyed)throw new Error("Transport destroyed");var o=new PDFPageProxy(a,t,r,r._params.ownerDocument,r._params.pdfBug);r.pageCache[a]=o;return o}));this.pagePromises[a]=o;return o}},{key:"getPageIndex",value:function getPageIndex(t){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:t}).catch((function(t){return Promise.reject(new Error(t))}))}},{key:"getAnnotations",value:function getAnnotations(t,r){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:r})}},{key:"saveDocument",value:function saveDocument(t){return this.messageHandler.sendWithPromise("SaveDocument",{numPages:this._numPages,annotationStorage:t&&t.getAll()||null,filename:this._fullReader?this._fullReader.filename:null}).finally((function(){t&&t.resetModified()}))}},{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:"getJavaScript",value:function getJavaScript(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}},{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;return this.messageHandler.sendWithPromise("GetMetadata",null).then((function(r){return{info:r[0],metadata:r[1]?new _metadata.Metadata(r[1]):null,contentDispositionFilename:t._fullReader?t._fullReader.filename:null}}))}},{key:"getStats",value:function getStats(){return this.messageHandler.sendWithPromise("GetStats",null)}},{key:"startCleanup",value:function startCleanup(){var t=this;return this.messageHandler.sendWithPromise("Cleanup",null).then((function(){for(var r=0,a=t.pageCache.length;r<a;r++){var o=t.pageCache[r];if(o){if(!o.cleanup())throw new Error("startCleanup: Page ".concat(r+1," is currently rendering."))}}t.commonObjs.clear();t.fontLoader.clear()}))}},{key:"loadingParams",get:function get(){var t=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:t.disableAutoFetch,disableFontFace:t.disableFontFace})}}]);return WorkerTransport}(),PDFObjects=function(){function PDFObjects(){_classCallCheck(this,PDFObjects);this._objs=Object.create(null)}_createClass(PDFObjects,[{key:"_ensureObj",value:function _ensureObj(t){return this._objs[t]?this._objs[t]:this._objs[t]={capability:(0,_util.createPromiseCapability)(),data:null,resolved:!1}}},{key:"get",value:function get(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(r){this._ensureObj(t).capability.promise.then(r);return null}var a=this._objs[t];if(!a||!a.resolved)throw new Error("Requesting object that isn't resolved yet ".concat(t,"."));return a.data}},{key:"has",value:function has(t){var r=this._objs[t];return!!r&&r.resolved}},{key:"resolve",value:function resolve(t,r){var a=this._ensureObj(t);a.resolved=!0;a.data=r;a.capability.resolve(r)}},{key:"clear",value:function clear(){this._objs=Object.create(null)}}]);return PDFObjects}(),RenderTask=function(){function RenderTask(t){_classCallCheck(this,RenderTask);this._internalRenderTask=t;this.onContinue=null}_createClass(RenderTask,[{key:"cancel",value:function cancel(){this._internalRenderTask.cancel()}},{key:"promise",get:function get(){return this._internalRenderTask.capability.promise}}]);return RenderTask}(),InternalRenderTask=function InternalRenderTaskClosure(){var t=new WeakSet;return function(){function InternalRenderTask(t){var r=t.callback,a=t.params,o=t.objs,i=t.commonObjs,l=t.operatorList,c=t.pageIndex,u=t.canvasFactory,d=t.webGLContext,h=t.useRequestAnimationFrame,p=void 0!==h&&h,m=t.pdfBug,v=void 0!==m&&m;_classCallCheck(this,InternalRenderTask);this.callback=r;this.params=a;this.objs=o;this.commonObjs=i;this.operatorListIdx=null;this.operatorList=l;this._pageIndex=c;this.canvasFactory=u;this.webGLContext=d;this._pdfBug=v;this.running=!1;this.graphicsReadyCallback=null;this.graphicsReady=!1;this._useRequestAnimationFrame=!0===p&&"undefined"!=typeof window;this.cancelled=!1;this.capability=(0,_util.createPromiseCapability)();this.task=new RenderTask(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:"initializeGraphics",value:function initializeGraphics(r){var a=r.transparency,o=void 0!==a&&a,i=r.optionalContentConfig;if(!this.cancelled){if(this._canvas){if(t.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.");t.add(this._canvas)}if(this._pdfBug&&globalThis.StepperManager&&globalThis.StepperManager.enabled){this.stepper=globalThis.StepperManager.create(this._pageIndex);this.stepper.init(this.operatorList);this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint()}var l=this.params,c=l.canvasContext,u=l.viewport,d=l.transform,h=l.imageLayer,p=l.background;this.gfx=new _canvas.CanvasGraphics(c,this.commonObjs,this.objs,this.canvasFactory,this.webGLContext,h,i);this.gfx.beginDrawing({transform:d,viewport:u,transparency:o,background:p});this.operatorListIdx=0;this.graphicsReady=!0;this.graphicsReadyCallback&&this.graphicsReadyCallback()}}},{key:"cancel",value:function cancel(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.running=!1;this.cancelled=!0;this.gfx&&this.gfx.endDrawing();this._canvas&&t.delete(this._canvas);this.callback(r||new _display_utils.RenderingCancelledException("Rendering cancelled, page ".concat(this._pageIndex+1),"canvas"))}},{key:"operatorListChanged",value:function operatorListChanged(){if(this.graphicsReady){this.stepper&&this.stepper.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;this._useRequestAnimationFrame?window.requestAnimationFrame((function(){t._nextBound().catch(t.cancel.bind(t))})):Promise.resolve().then(this._nextBound).catch(this.cancel.bind(this))}},{key:"_next",value:(r=_asyncToGenerator(_regenerator.default.mark((function _callee2(){return _regenerator.default.wrap((function _callee2$(r){for(;;)switch(r.prev=r.next){case 0:if(!this.cancelled){r.next=2;break}return r.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._canvas&&t.delete(this._canvas);this.callback()}}case 4:case"end":return r.stop()}}),_callee2,this)}))),function _next(){return r.apply(this,arguments)})},{key:"completed",get:function get(){return this.capability.promise.catch((function(){}))}}]);var r;return InternalRenderTask}()}(),version="2.6.347";exports.version=version;var build="3be9c65f";exports.build=build},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.FontLoader=r.FontFaceObject=void 0;var o=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(2)),i=a(5);function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _setPrototypeOf(t,r){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t})(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{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,o=_getPrototypeOf(t);if(r){var i=_getPrototypeOf(this).constructor;a=Reflect.construct(o,arguments,i)}else a=o.apply(this,arguments);return _possibleConstructorReturn(this,a)}}function _possibleConstructorReturn(t,r){return!r||"object"!==_typeof(r)&&"function"!=typeof r?function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):r}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function asyncGeneratorStep(t,r,a,o,i,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(o,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 o=r[a];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);return t}var l,c=function(){function BaseFontLoader(t){var r=t.docId,a=t.onUnsupportedFeature,o=t.ownerDocument,l=void 0===o?globalThis.document:o;_classCallCheck(this,BaseFontLoader);this.constructor===BaseFontLoader&&(0,i.unreachable)("Cannot initialize BaseFontLoader.");this.docId=r;this._onUnsupportedFeature=a;this._document=l;this.nativeFontFaces=[];this.styleElement=null}_createClass(BaseFontLoader,[{key:"addNativeFontFace",value:function addNativeFontFace(t){this.nativeFontFaces.push(t);this._document.fonts.add(t)}},{key:"insertRule",value:function insertRule(t){var r=this.styleElement;if(!r){(r=this.styleElement=this._document.createElement("style")).id="PDFJS_FONT_STYLE_TAG_".concat(this.docId);this._document.documentElement.getElementsByTagName("head")[0].appendChild(r)}var a=r.sheet;a.insertRule(t,a.cssRules.length)}},{key:"clear",value:function clear(){var t=this;this.nativeFontFaces.forEach((function(r){t._document.fonts.delete(r)}));this.nativeFontFaces.length=0;if(this.styleElement){this.styleElement.remove();this.styleElement=null}}},{key:"bind",value:(t=function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(o,i){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,o,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,o,i,_next,_throw,"throw",t)}_next(void 0)}))}}(o.default.mark((function _callee(t){var r,a,l=this;return o.default.wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:if(!t.attached&&!t.missingFile){o.next=2;break}return o.abrupt("return");case 2:t.attached=!0;if(!this.isFontLoadingAPISupported){o.next=19;break}if(!(r=t.createNativeFontFace())){o.next=18;break}this.addNativeFontFace(r);o.prev=7;o.next=10;return r.loaded;case 10:o.next=18;break;case 12:o.prev=12;o.t0=o.catch(7);this._onUnsupportedFeature({featureId:i.UNSUPPORTED_FEATURES.errorFontLoadNative});(0,i.warn)("Failed to load font '".concat(r.family,"': '").concat(o.t0,"'."));t.disableFontFace=!0;throw o.t0;case 18:return o.abrupt("return");case 19:if(!(a=t.createFontFaceRule())){o.next=26;break}this.insertRule(a);if(!this.isSyncFontLoadingSupported){o.next=24;break}return o.abrupt("return");case 24:o.next=26;return new Promise((function(r){var o=l._queueLoadingCallback(r);l._prepareFontLoadEvent([a],[t],o)}));case 26:case"end":return o.stop()}}),_callee,this,[[7,12]])}))),function bind(r){return t.apply(this,arguments)})},{key:"_queueLoadingCallback",value:function _queueLoadingCallback(t){(0,i.unreachable)("Abstract method `_queueLoadingCallback`.")}},{key:"_prepareFontLoadEvent",value:function _prepareFontLoadEvent(t,r,a){(0,i.unreachable)("Abstract method `_prepareFontLoadEvent`.")}},{key:"isFontLoadingAPISupported",get:function get(){var t=void 0!==this._document&&!!this._document.fonts;return(0,i.shadow)(this,"isFontLoadingAPISupported",t)}},{key:"isSyncFontLoadingSupported",get:function get(){(0,i.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}},{key:"_loadTestFont",get:function get(){(0,i.unreachable)("Abstract method `_loadTestFont`.")}}]);var t;return BaseFontLoader}();r.FontLoader=l;r.FontLoader=l=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}});r&&_setPrototypeOf(t,r)}(GenericFontLoader,t);var r=_createSuper(GenericFontLoader);function GenericFontLoader(t){var a;_classCallCheck(this,GenericFontLoader);(a=r.call(this,t)).loadingContext={requests:[],nextRequestId:0};a.loadTestFontId=0;return a}_createClass(GenericFontLoader,[{key:"_queueLoadingCallback",value:function _queueLoadingCallback(t){var r=this.loadingContext,a={id:"pdfjs-font-loading-".concat(r.nextRequestId++),done:!1,complete:function completeRequest(){(0,i.assert)(!a.done,"completeRequest() cannot be called twice.");a.done=!0;for(;r.requests.length>0&&r.requests[0].done;){var t=r.requests.shift();setTimeout(t.callback,0)}},callback:t};r.requests.push(a);return a}},{key:"_prepareFontLoadEvent",value:function _prepareFontLoadEvent(t,r,a){var o,l,c=this;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,o){return t.substring(0,r)+o+t.substring(r+a)}var u=this._document.createElement("canvas");u.width=1;u.height=1;var d=u.getContext("2d"),h=0;var p="lt".concat(Date.now()).concat(this.loadTestFontId++),m=this._loadTestFont,v=int32(m=spliceString(m,976,p.length,p),16);for(o=0,l=p.length-3;o<l;o+=4)v=v-1482184792+int32(p,o)|0;o<p.length&&(v=v-1482184792+int32(p+"XXX",o)|0);m=spliceString(m,16,4,(0,i.string32)(v));var g="url(data:font/opentype;base64,".concat(btoa(m),");"),y='@font-face {font-family:"'.concat(p,'";src:').concat(g,"}");this.insertRule(y);var b=[];for(o=0,l=r.length;o<l;o++)b.push(r[o].loadedName);b.push(p);var _=this._document.createElement("div");_.style.visibility="hidden";_.style.width=_.style.height="10px";_.style.position="absolute";_.style.top=_.style.left="0px";for(o=0,l=b.length;o<l;++o){var S=this._document.createElement("span");S.textContent="Hi";S.style.fontFamily=b[o];_.appendChild(S)}this._document.body.appendChild(_);!function isFontReady(t,r){if(++h>30){(0,i.warn)("Load test font never loaded.");r()}else{d.font="30px "+t;d.fillText(".",0,20);d.getImageData(0,0,1,1).data[3]>0?r():setTimeout(isFontReady.bind(null,t,r))}}(p,(function(){c._document.body.removeChild(_);a.complete()}))}},{key:"isSyncFontLoadingSupported",get:function get(){var t=!1;if("undefined"==typeof navigator)t=!0;else{var r=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);r&&r[1]>=14&&(t=!0)}return(0,i.shadow)(this,"isSyncFontLoadingSupported",t)}},{key:"_loadTestFont",get:function get(){return(0,i.shadow)(this,"_loadTestFont",function getLoadTestFont(){return atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==")}())}}]);return GenericFontLoader}(c);var u=function(){function FontFaceObject(t,r){var a=r.isEvalSupported,o=void 0===a||a,i=r.disableFontFace,l=void 0!==i&&i,c=r.ignoreErrors,u=void 0!==c&&c,d=r.onUnsupportedFeature,h=void 0===d?null:d,p=r.fontRegistry,m=void 0===p?null:p;_classCallCheck(this,FontFaceObject);this.compiledGlyphs=Object.create(null);for(var v in t)this[v]=t[v];this.isEvalSupported=!1!==o;this.disableFontFace=!0===l;this.ignoreErrors=!0===u;this._onUnsupportedFeature=h;this.fontRegistry=m}_createClass(FontFaceObject,[{key:"createNativeFontFace",value:function createNativeFontFace(){if(!this.data||this.disableFontFace)return null;var t=new FontFace(this.loadedName,this.data,{});this.fontRegistry&&this.fontRegistry.registerFont(this);return t}},{key:"createFontFaceRule",value:function createFontFaceRule(){if(!this.data||this.disableFontFace)return null;var t=(0,i.bytesToString)(new Uint8Array(this.data)),r="url(data:".concat(this.mimetype,";base64,").concat(btoa(t),");"),a='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(r,"}");this.fontRegistry&&this.fontRegistry.registerFont(this,r);return a}},{key:"getPathGenerator",value:function getPathGenerator(t,r){if(void 0!==this.compiledGlyphs[r])return this.compiledGlyphs[r];var a,o;try{a=t.get(this.loadedName+"_path_"+r)}catch(t){if(!this.ignoreErrors)throw t;this._onUnsupportedFeature&&this._onUnsupportedFeature({featureId:i.UNSUPPORTED_FEATURES.errorFontGetPath});(0,i.warn)('getPathGenerator - ignoring character: "'.concat(t,'".'));return this.compiledGlyphs[r]=function(t,r){}}if(this.isEvalSupported&&i.IsEvalSupportedCached.value){for(var l,c="",u=0,d=a.length;u<d;u++){l=void 0!==(o=a[u]).args?o.args.join(","):"";c+="c."+o.cmd+"("+l+");\n"}return this.compiledGlyphs[r]=new Function("c","size",c)}return this.compiledGlyphs[r]=function(t,r){for(var i=0,l=a.length;i<l;i++){"scale"===(o=a[i]).cmd&&(o.args=[r,-r]);t[o.cmd].apply(t,o.args)}}}}]);return FontFaceObject}();r.FontFaceObject=u},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.NodeCMapReaderFactory=r.NodeCanvasFactory=void 0;var o=a(1),i=a(7),l=a(5);function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var o=r[a];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);return 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}});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t})(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{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,o=_getPrototypeOf(t);if(r){var i=_getPrototypeOf(this).constructor;a=Reflect.construct(o,arguments,i)}else a=o.apply(this,arguments);return _possibleConstructorReturn(this,a)}}function _possibleConstructorReturn(t,r){return!r||"object"!==_typeof(r)&&"function"!=typeof r?function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):r}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}var c=function NodeCanvasFactory(){_classCallCheck(this,NodeCanvasFactory);(0,l.unreachable)("Not implemented: NodeCanvasFactory")};r.NodeCanvasFactory=c;var u=function NodeCMapReaderFactory(){_classCallCheck(this,NodeCMapReaderFactory);(0,l.unreachable)("Not implemented: NodeCMapReaderFactory")};r.NodeCMapReaderFactory=u;if(i.isNodeJS){r.NodeCanvasFactory=c=function(t){_inherits(NodeCanvasFactory,t);var r=_createSuper(NodeCanvasFactory);function NodeCanvasFactory(){_classCallCheck(this,NodeCanvasFactory);return r.apply(this,arguments)}_createClass(NodeCanvasFactory,[{key:"create",value:function create(t,r){if(t<=0||r<=0)throw new Error("Invalid canvas size");var a=require("canvas").createCanvas(t,r);return{canvas:a,context:a.getContext("2d")}}}]);return NodeCanvasFactory}(o.BaseCanvasFactory);r.NodeCMapReaderFactory=u=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 new Promise((function(a,o){require("fs").readFile(t,(function(t,i){!t&&i?a({cMapData:new Uint8Array(i),compressionType:r}):o(new Error(t))}))}))}}]);return NodeCMapReaderFactory}(o.BaseCMapReaderFactory)}},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.AnnotationStorage=void 0;function _defineProperties(t,r){for(var a=0;a<r.length;a++){var o=r[a];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}var o=function(){function AnnotationStorage(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,AnnotationStorage);this._storage=new Map;this._modified=!1;this.onSetModified=null;this.onResetModified=null}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);return t}(AnnotationStorage,[{key:"getOrCreateValue",value:function getOrCreateValue(t,r){if(this._storage.has(t))return this._storage.get(t);this._storage.set(t,r);return r}},{key:"setValue",value:function setValue(t,r){this._storage.get(t)!==r&&this._setModified();this._storage.set(t,r)}},{key:"getAll",value:function getAll(){return 0===this._storage.size?null:Object.fromEntries(this._storage)}},{key:"_setModified",value:function _setModified(){if(!this._modified){this._modified=!0;"function"==typeof this.onSetModified&&this.onSetModified()}}},{key:"resetModified",value:function resetModified(){if(this._modified){this._modified=!1;"function"==typeof this.onResetModified&&this.onResetModified()}}},{key:"size",get:function get(){return this._storage.size}}]);return AnnotationStorage}();r.AnnotationStorage=o},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.apiCompatibilityParams=void 0;var o=a(7),i=Object.create(null);!function checkFontFace(){o.isNodeJS&&(i.disableFontFace=!0)}();var l=Object.freeze(i);r.apiCompatibilityParams=l},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.CanvasGraphics=void 0;var o=a(5),i=a(208);function _createForOfIteratorHelper(t,r){var a;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){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 o=0,i=function F(){};return{s:i,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:i}}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=t[Symbol.iterator]()},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,o=new Array(r);a<r;a++)o[a]=t[a];return o}function addContextCurrentTransform(t){if(!t.mozCurrentTransform){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._transformMatrix=t._transformMatrix||[1,0,0,1,0,0];t._transformStack=[];Object.defineProperty(t,"mozCurrentTransform",{get:function getCurrentTransform(){return this._transformMatrix}});Object.defineProperty(t,"mozCurrentTransformInverse",{get:function getCurrentTransformInverse(){var t=this._transformMatrix,r=t[0],a=t[1],o=t[2],i=t[3],l=t[4],c=t[5],u=r*i-a*o,d=a*o-r*i;return[i/u,a/d,o/d,r/u,(i*l-o*c)/d,(a*l-r*c)/u]}});t.save=function ctxSave(){var t=this._transformMatrix;this._transformStack.push(t);this._transformMatrix=t.slice(0,6);this._originalSave()};t.restore=function ctxRestore(){var t=this._transformStack.pop();if(t){this._transformMatrix=t;this._originalRestore()}};t.translate=function ctxTranslate(t,r){var a=this._transformMatrix;a[4]=a[0]*t+a[2]*r+a[4];a[5]=a[1]*t+a[3]*r+a[5];this._originalTranslate(t,r)};t.scale=function ctxScale(t,r){var a=this._transformMatrix;a[0]=a[0]*t;a[1]=a[1]*t;a[2]=a[2]*r;a[3]=a[3]*r;this._originalScale(t,r)};t.transform=function ctxTransform(r,a,o,i,l,c){var u=this._transformMatrix;this._transformMatrix=[u[0]*r+u[2]*a,u[1]*r+u[3]*a,u[0]*o+u[2]*i,u[1]*o+u[3]*i,u[0]*l+u[2]*c+u[4],u[1]*l+u[3]*c+u[5]];t._originalTransform(r,a,o,i,l,c)};t.setTransform=function ctxSetTransform(r,a,o,i,l,c){this._transformMatrix=[r,a,o,i,l,c];t._originalSetTransform(r,a,o,i,l,c)};t.rotate=function ctxRotate(t){var r=Math.cos(t),a=Math.sin(t),o=this._transformMatrix;this._transformMatrix=[o[0]*r+o[2]*a,o[1]*r+o[3]*a,o[0]*-a+o[2]*r,o[1]*-a+o[3]*r,o[4],o[5]];this._originalRotate(t)}}}var l=function CachedCanvasesClosure(){function CachedCanvases(t){this.canvasFactory=t;this.cache=Object.create(null)}CachedCanvases.prototype={getCanvas:function CachedCanvases_getCanvas(t,r,a,o){var i;if(void 0!==this.cache[t]){i=this.cache[t];this.canvasFactory.reset(i,r,a);i.context.setTransform(1,0,0,1,0,0)}else{i=this.canvasFactory.create(r,a);this.cache[t]=i}o&&addContextCurrentTransform(i.context);return i},clear:function clear(){for(var t in this.cache){var r=this.cache[t];this.canvasFactory.destroy(r);delete this.cache[t]}}};return CachedCanvases}();var c=function CanvasExtraStateClosure(){function CanvasExtraState(){this.alphaIsShape=!1;this.fontSize=0;this.fontSizeScale=1;this.textMatrix=o.IDENTITY_MATRIX;this.textMatrixScale=1;this.fontMatrix=o.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=o.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.resumeSMaskCtx=null;this.transferMaps=null}CanvasExtraState.prototype={clone:function CanvasExtraState_clone(){return Object.create(this)},setCurrentPoint:function CanvasExtraState_setCurrentPoint(t,r){this.x=t;this.y=r}};return CanvasExtraState}(),u=function CanvasGraphicsClosure(){function CanvasGraphics(t,r,a,o,i,u,d){this.ctx=t;this.current=new c;this.stateStack=[];this.pendingClip=null;this.pendingEOFill=!1;this.res=null;this.xobjs=null;this.commonObjs=r;this.objs=a;this.canvasFactory=o;this.webGLContext=i;this.imageLayer=u;this.groupStack=[];this.processingType3=null;this.baseTransform=null;this.baseTransformStack=[];this.groupLevel=0;this.smaskStack=[];this.smaskCounter=0;this.tempSMask=null;this.contentVisible=!0;this.markedContentStack=[];this.optionalContentConfig=d;this.cachedCanvases=new l(this.canvasFactory);t&&addContextCurrentTransform(t);this._cachedGetSinglePixelWidth=null}function putBinaryImageData(t,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("undefined"!=typeof ImageData&&r instanceof ImageData)t.putImageData(r,0,0);else{var i,l,c,u,d,h,p,m,v,g=r.height,y=r.width,b=g%16,_=(g-b)/16,S=0===b?_:_+1,C=t.createImageData(y,16),A=0,R=r.data,k=C.data;if(a)switch(a.length){case 1:h=a[0];p=a[0];m=a[0];v=a[0];break;case 4:h=a[0];p=a[1];m=a[2];v=a[3]}if(r.kind===o.ImageKind.GRAYSCALE_1BPP){var w=R.byteLength,P=new Uint32Array(k.buffer,0,k.byteLength>>2),x=P.length,T=y+7>>3,E=4294967295,O=o.IsLittleEndianCached.value?4278190080:255;if(v&&255===v[0]&&0===v[255]){var I=[O,E];E=I[0];O=I[1]}for(l=0;l<S;l++){u=l<_?16:b;i=0;for(c=0;c<u;c++){for(var D=w-A,L=0,M=D>T?y:8*D-7,W=-8&M,j=0,N=0;L<W;L+=8){N=R[A++];P[i++]=128&N?E:O;P[i++]=64&N?E:O;P[i++]=32&N?E:O;P[i++]=16&N?E:O;P[i++]=8&N?E:O;P[i++]=4&N?E:O;P[i++]=2&N?E:O;P[i++]=1&N?E:O}for(;L<M;L++){if(0===j){N=R[A++];j=128}P[i++]=N&j?E:O;j>>=1}}for(;i<x;)P[i++]=0;t.putImageData(C,0,16*l)}}else if(r.kind===o.ImageKind.RGBA_32BPP){var B=!!(h||p||m);c=0;d=16*y*4;for(l=0;l<_;l++){k.set(R.subarray(A,A+d));A+=d;if(B)for(var q=0;q<d;q+=4){h&&(k[q+0]=h[k[q+0]]);p&&(k[q+1]=p[k[q+1]]);m&&(k[q+2]=m[k[q+2]])}t.putImageData(C,0,c);c+=16}if(l<S){d=y*b*4;k.set(R.subarray(A,A+d));if(B)for(var G=0;G<d;G+=4){h&&(k[G+0]=h[k[G+0]]);p&&(k[G+1]=p[k[G+1]]);m&&(k[G+2]=m[k[G+2]])}t.putImageData(C,0,c)}}else{if(r.kind!==o.ImageKind.RGB_24BPP)throw new Error("bad image kind: ".concat(r.kind));var U=!!(h||p||m);d=y*(u=16);for(l=0;l<S;l++){l>=_&&(d=y*(u=b));i=0;for(c=d;c--;){k[i++]=R[A++];k[i++]=R[A++];k[i++]=R[A++];k[i++]=255}if(U)for(var z=0;z<i;z+=4){h&&(k[z+0]=h[k[z+0]]);p&&(k[z+1]=p[k[z+1]]);m&&(k[z+2]=m[k[z+2]])}t.putImageData(C,0,16*l)}}}}function putBinaryImageMask(t,r){for(var a=r.height,o=r.width,i=a%16,l=(a-i)/16,c=0===i?l:l+1,u=t.createImageData(o,16),d=0,h=r.data,p=u.data,m=0;m<c;m++){for(var v=m<l?16:i,g=3,y=0;y<v;y++)for(var b=0,_=0;_<o;_++){if(!b){var S=h[d++];b=128}p[g]=S&b?0:255;g+=4;b>>=1}t.putImageData(u,0,16*m)}}function copyCtxState(t,r){for(var a=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],o=0,i=a.length;o<i;o++){var l=a[o];void 0!==t[l]&&(r[l]=t[l])}if(void 0!==t.setLineDash){r.setLineDash(t.getLineDash());r.lineDashOffset=t.lineDashOffset}}function resetCtxToDefault(t){t.strokeStyle="#000000";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}}function composeSMaskBackdrop(t,r,a,o){for(var i=t.length,l=3;l<i;l+=4){var c=t[l];if(0===c){t[l-3]=r;t[l-2]=a;t[l-1]=o}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+o*u>>8}}}function composeSMaskAlpha(t,r,a){for(var o=t.length,i=3;i<o;i+=4){var l=a?a[t[i]]:t[i];r[i]=r[i]*l*(1/255)|0}}function composeSMaskLuminosity(t,r,a){for(var o=t.length,i=3;i<o;i+=4){var l=77*t[i-3]+152*t[i-2]+28*t[i-1];r[i]=a?r[i]*a[l>>8]>>8:r[i]*l>>16}}function composeSMask(t,r,a,o){var i=r.canvas,l=r.context;t.setTransform(r.scaleX,0,0,r.scaleY,r.offsetX,r.offsetY);var c=r.backdrop||null;if(r.transferMap||!o.isEnabled){!function genericComposeSMask(t,r,a,o,i,l,c){var u,d=!!l,h=d?l[0]:0,p=d?l[1]:0,m=d?l[2]:0;u="Luminosity"===i?composeSMaskLuminosity:composeSMaskAlpha;for(var v=Math.min(o,Math.ceil(1048576/a)),g=0;g<o;g+=v){var y=Math.min(v,o-g),b=t.getImageData(0,g,a,y),_=r.getImageData(0,g,a,y);d&&composeSMaskBackdrop(b.data,h,p,m);u(b.data,_.data,c);t.putImageData(_,0,g)}}(l,a,i.width,i.height,r.subtype,c,r.transferMap);t.drawImage(i,0,0)}else{var u=o.composeSMask({layer:a.canvas,mask:i,properties:{subtype:r.subtype,backdrop:c}});t.setTransform(1,0,0,1,0,0);t.drawImage(u,r.offsetX,r.offsetY)}}var t=["butt","round","square"],r=["miter","round","bevel"],a={},u={};CanvasGraphics.prototype={beginDrawing:function beginDrawing(t){var r=t.transform,a=t.viewport,o=t.transparency,i=void 0!==o&&o,l=t.background,c=void 0===l?null:l,u=this.ctx.canvas.width,d=this.ctx.canvas.height;this.ctx.save();this.ctx.fillStyle=c||"rgb(255, 255, 255)";this.ctx.fillRect(0,0,u,d);this.ctx.restore();if(i){var h=this.cachedCanvases.getCanvas("transparent",u,d,!0);this.compositeCtx=this.ctx;this.transparentCanvas=h.canvas;this.ctx=h.context;this.ctx.save();this.ctx.transform.apply(this.ctx,this.compositeCtx.mozCurrentTransform)}this.ctx.save();resetCtxToDefault(this.ctx);r&&this.ctx.transform.apply(this.ctx,r);this.ctx.transform.apply(this.ctx,a.transform);this.baseTransform=this.ctx.mozCurrentTransform.slice();this.imageLayer&&this.imageLayer.beginLayout()},executeOperatorList:function CanvasGraphics_executeOperatorList(t,r,a,i){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,m=p?Date.now()+15:0,v=0,g=this.commonObjs,y=this.objs;;){if(void 0!==i&&u===i.nextBreakPoint){i.breakIt(u,a);return u}if((h=c[u])!==o.OPS.dependency)this[h].apply(this,l[u]);else{var b,_=_createForOfIteratorHelper(l[u]);try{for(_.s();!(b=_.n()).done;){var S=b.value,C=S.startsWith("g_")?g:y;if(!C.has(S)){C.get(S,a);return u}}}catch(t){_.e(t)}finally{_.f()}}if(++u===d)return u;if(p&&++v>10){if(Date.now()>m){a();return u}v=0}}},endDrawing:function CanvasGraphics_endDrawing(){null!==this.current.activeSMask&&this.endSMaskGroup();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}this.cachedCanvases.clear();this.webGLContext.clear();this.imageLayer&&this.imageLayer.endLayout()},setLineWidth:function CanvasGraphics_setLineWidth(t){this.current.lineWidth=t;this.ctx.lineWidth=t},setLineCap:function CanvasGraphics_setLineCap(r){this.ctx.lineCap=t[r]},setLineJoin:function CanvasGraphics_setLineJoin(t){this.ctx.lineJoin=r[t]},setMiterLimit:function CanvasGraphics_setMiterLimit(t){this.ctx.miterLimit=t},setDash:function CanvasGraphics_setDash(t,r){var a=this.ctx;if(void 0!==a.setLineDash){a.setLineDash(t);a.lineDashOffset=r}},setRenderingIntent:function setRenderingIntent(t){},setFlatness:function setFlatness(t){},setGState:function CanvasGraphics_setGState(t){for(var r=0,a=t.length;r<a;r++){var o=t[r],i=o[0],l=o[1];switch(i){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=o[1];break;case"ca":this.current.fillAlpha=o[1];this.ctx.globalAlpha=o[1];break;case"BM":this.ctx.globalCompositeOperation=l;break;case"SMask":this.current.activeSMask&&(this.stateStack.length>0&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask?this.suspendSMaskGroup():this.endSMaskGroup());this.current.activeSMask=l?this.tempSMask:null;this.current.activeSMask&&this.beginSMaskGroup();this.tempSMask=null;break;case"TR":this.current.transferMaps=l}}},beginSMaskGroup:function CanvasGraphics_beginSMaskGroup(){var t=this.current.activeSMask,r=t.canvas.width,a=t.canvas.height,o="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(o,r,a,!0),l=this.ctx,c=l.mozCurrentTransform;this.ctx.save();var u=i.context;u.scale(1/t.scaleX,1/t.scaleY);u.translate(-t.offsetX,-t.offsetY);u.transform.apply(u,c);t.startTransformInverse=u.mozCurrentTransformInverse;copyCtxState(l,u);this.ctx=u;this.setGState([["BM","source-over"],["ca",1],["CA",1]]);this.groupStack.push(l);this.groupLevel++},suspendSMaskGroup:function CanvasGraphics_endSMaskGroup(){var t=this.ctx;this.groupLevel--;this.ctx=this.groupStack.pop();composeSMask(this.ctx,this.current.activeSMask,t,this.webGLContext);this.ctx.restore();this.ctx.save();copyCtxState(t,this.ctx);this.current.resumeSMaskCtx=t;var r=o.Util.transform(this.current.activeSMask.startTransformInverse,t.mozCurrentTransform);this.ctx.transform.apply(this.ctx,r);t.save();t.setTransform(1,0,0,1,0,0);t.clearRect(0,0,t.canvas.width,t.canvas.height);t.restore()},resumeSMaskGroup:function CanvasGraphics_endSMaskGroup(){var t=this.current.resumeSMaskCtx,r=this.ctx;this.ctx=t;this.groupStack.push(r);this.groupLevel++},endSMaskGroup:function CanvasGraphics_endSMaskGroup(){var t=this.ctx;this.groupLevel--;this.ctx=this.groupStack.pop();composeSMask(this.ctx,this.current.activeSMask,t,this.webGLContext);this.ctx.restore();copyCtxState(t,this.ctx);var r=o.Util.transform(this.current.activeSMask.startTransformInverse,t.mozCurrentTransform);this.ctx.transform.apply(this.ctx,r)},save:function CanvasGraphics_save(){this.ctx.save();var t=this.current;this.stateStack.push(t);this.current=t.clone();this.current.resumeSMaskCtx=null},restore:function CanvasGraphics_restore(){this.current.resumeSMaskCtx&&this.resumeSMaskGroup();null===this.current.activeSMask||0!==this.stateStack.length&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask||this.endSMaskGroup();if(0!==this.stateStack.length){this.current=this.stateStack.pop();this.ctx.restore();this.pendingClip=null;this._cachedGetSinglePixelWidth=null}},transform:function CanvasGraphics_transform(t,r,a,o,i,l){this.ctx.transform(t,r,a,o,i,l);this._cachedGetSinglePixelWidth=null},constructPath:function CanvasGraphics_constructPath(t,r){for(var a=this.ctx,i=this.current,l=i.x,c=i.y,u=0,d=0,h=t.length;u<h;u++)switch(0|t[u]){case o.OPS.rectangle:l=r[d++];c=r[d++];var p=r[d++],m=r[d++];0===p&&a.lineWidth<this.getSinglePixelWidth()&&(p=this.getSinglePixelWidth());0===m&&a.lineWidth<this.getSinglePixelWidth()&&(m=this.getSinglePixelWidth());var v=l+p,g=c+m;a.moveTo(l,c);a.lineTo(v,c);a.lineTo(v,g);a.lineTo(l,g);a.lineTo(l,c);a.closePath();break;case o.OPS.moveTo:l=r[d++];c=r[d++];a.moveTo(l,c);break;case o.OPS.lineTo:l=r[d++];c=r[d++];a.lineTo(l,c);break;case o.OPS.curveTo:l=r[d+4];c=r[d+5];a.bezierCurveTo(r[d],r[d+1],r[d+2],r[d+3],l,c);d+=6;break;case o.OPS.curveTo2:a.bezierCurveTo(l,c,r[d],r[d+1],r[d+2],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];a.bezierCurveTo(r[d],r[d+1],l,c,l,c);d+=4;break;case o.OPS.closePath:a.closePath()}i.setCurrentPoint(l,c)},closePath:function CanvasGraphics_closePath(){this.ctx.closePath()},stroke:function CanvasGraphics_stroke(t){t=void 0===t||t;var r=this.ctx,a=this.current.strokeColor;r.globalAlpha=this.current.strokeAlpha;if(this.contentVisible)if(a&&a.hasOwnProperty("type")&&"Pattern"===a.type){r.save();var i=r.mozCurrentTransform,l=o.Util.singularValueDecompose2dScale(i)[0];r.strokeStyle=a.getPattern(r,this);r.lineWidth=Math.max(.65*this.getSinglePixelWidth(),this.current.lineWidth*l);r.stroke();r.restore()}else{r.lineWidth=Math.max(.65*this.getSinglePixelWidth(),this.current.lineWidth);r.stroke()}t&&this.consumePath();r.globalAlpha=this.current.fillAlpha},closeStroke:function CanvasGraphics_closeStroke(){this.closePath();this.stroke()},fill:function CanvasGraphics_fill(t){t=void 0===t||t;var r=this.ctx,a=this.current.fillColor,o=!1;if(this.current.patternFill){r.save();this.baseTransform&&r.setTransform.apply(r,this.baseTransform);r.fillStyle=a.getPattern(r,this);o=!0}if(this.contentVisible)if(this.pendingEOFill){r.fill("evenodd");this.pendingEOFill=!1}else r.fill();o&&r.restore();t&&this.consumePath()},eoFill:function CanvasGraphics_eoFill(){this.pendingEOFill=!0;this.fill()},fillStroke:function CanvasGraphics_fillStroke(){this.fill(!1);this.stroke(!1);this.consumePath()},eoFillStroke:function CanvasGraphics_eoFillStroke(){this.pendingEOFill=!0;this.fillStroke()},closeFillStroke:function CanvasGraphics_closeFillStroke(){this.closePath();this.fillStroke()},closeEOFillStroke:function CanvasGraphics_closeEOFillStroke(){this.pendingEOFill=!0;this.closePath();this.fillStroke()},endPath:function CanvasGraphics_endPath(){this.consumePath()},clip:function CanvasGraphics_clip(){this.pendingClip=a},eoClip:function CanvasGraphics_eoClip(){this.pendingClip=u},beginText:function CanvasGraphics_beginText(){this.current.textMatrix=o.IDENTITY_MATRIX;this.current.textMatrixScale=1;this.current.x=this.current.lineX=0;this.current.y=this.current.lineY=0},endText:function CanvasGraphics_endText(){var t=this.pendingTextPaths,r=this.ctx;if(void 0!==t){r.save();r.beginPath();for(var a=0;a<t.length;a++){var o=t[a];r.setTransform.apply(r,o.transform);r.translate(o.x,o.y);o.addToPath(r,o.fontSize)}r.restore();r.clip();r.beginPath();delete this.pendingTextPaths}else r.beginPath()},setCharSpacing:function CanvasGraphics_setCharSpacing(t){this.current.charSpacing=t},setWordSpacing:function CanvasGraphics_setWordSpacing(t){this.current.wordSpacing=t},setHScale:function CanvasGraphics_setHScale(t){this.current.textHScale=t/100},setLeading:function CanvasGraphics_setLeading(t){this.current.leading=-t},setFont:function CanvasGraphics_setFont(t,r){var a=this.commonObjs.get(t),i=this.current;if(!a)throw new Error("Can't find font for ".concat(t));i.fontMatrix=a.fontMatrix?a.fontMatrix:o.FONT_IDENTITY_MATRIX;0!==i.fontMatrix[0]&&0!==i.fontMatrix[3]||(0,o.warn)("Invalid font matrix for font "+t);if(r<0){r=-r;i.fontDirection=-1}else i.fontDirection=1;this.current.font=a;this.current.fontSize=r;if(!a.isType3Font){var l=a.loadedName||"sans-serif",c="normal";a.black?c="900":a.bold&&(c="bold");var u=a.italic?"italic":"normal",d='"'.concat(l,'", ').concat(a.fallbackName),h=r;r<16?h=16:r>100&&(h=100);this.current.fontSizeScale=r/h;this.ctx.font="".concat(u," ").concat(c," ").concat(h,"px ").concat(d)}},setTextRenderingMode:function CanvasGraphics_setTextRenderingMode(t){this.current.textRenderingMode=t},setTextRise:function CanvasGraphics_setTextRise(t){this.current.textRise=t},moveText:function CanvasGraphics_moveText(t,r){this.current.x=this.current.lineX+=t;this.current.y=this.current.lineY+=r},setLeadingMoveText:function CanvasGraphics_setLeadingMoveText(t,r){this.setLeading(-r);this.moveText(t,r)},setTextMatrix:function CanvasGraphics_setTextMatrix(t,r,a,o,i,l){this.current.textMatrix=[t,r,a,o,i,l];this.current.textMatrixScale=Math.sqrt(t*t+r*r);this.current.x=this.current.lineX=0;this.current.y=this.current.lineY=0},nextLine:function CanvasGraphics_nextLine(){this.moveText(0,this.current.leading)},paintChar:function paintChar(t,r,a,i){var l,c=this.ctx,u=this.current,d=u.font,h=u.textRenderingMode,p=u.fontSize/u.fontSizeScale,m=h&o.TextRenderingMode.FILL_STROKE_MASK,v=!!(h&o.TextRenderingMode.ADD_TO_PATH_FLAG),g=u.patternFill&&!d.missingFile;(d.disableFontFace||v||g)&&(l=d.getPathGenerator(this.commonObjs,t));if(d.disableFontFace||g){c.save();c.translate(r,a);c.beginPath();l(c,p);i&&c.setTransform.apply(c,i);m!==o.TextRenderingMode.FILL&&m!==o.TextRenderingMode.FILL_STROKE||c.fill();m!==o.TextRenderingMode.STROKE&&m!==o.TextRenderingMode.FILL_STROKE||c.stroke();c.restore()}else{m!==o.TextRenderingMode.FILL&&m!==o.TextRenderingMode.FILL_STROKE||c.fillText(t,r,a);m!==o.TextRenderingMode.STROKE&&m!==o.TextRenderingMode.FILL_STROKE||c.strokeText(t,r,a)}if(v){(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:c.mozCurrentTransform,x:r,y:a,fontSize:p,addToPath:l})}},get isFontSubpixelAAEnabled(){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,i=3;i<r.length;i+=4)if(r[i]>0&&r[i]<255){a=!0;break}return(0,o.shadow)(this,"isFontSubpixelAAEnabled",a)},showText:function CanvasGraphics_showText(t){var r=this.current,a=r.font;if(a.isType3Font)return this.showType3Text(t);var i=r.fontSize;if(0!==i){var l,c=this.ctx,u=r.fontSizeScale,d=r.charSpacing,h=r.wordSpacing,p=r.fontDirection,m=r.textHScale*p,v=t.length,g=a.vertical,y=g?1:-1,b=a.defaultVMetrics,_=i*r.fontMatrix[0],S=r.textRenderingMode===o.TextRenderingMode.FILL&&!a.disableFontFace&&!r.patternFill;c.save();if(r.patternFill){c.save();var C=r.fillColor.getPattern(c,this);l=c.mozCurrentTransform;c.restore();c.fillStyle=C}c.transform.apply(c,r.textMatrix);c.translate(r.x,r.y+r.textRise);p>0?c.scale(m,-1):c.scale(m,1);var A=r.lineWidth,R=r.textMatrixScale;if(0===R||0===A){var k=r.textRenderingMode&o.TextRenderingMode.FILL_STROKE_MASK;if(k===o.TextRenderingMode.STROKE||k===o.TextRenderingMode.FILL_STROKE){this._cachedGetSinglePixelWidth=null;A=.65*this.getSinglePixelWidth()}}else A/=R;if(1!==u){c.scale(u,u);A/=u}c.lineWidth=A;var w,P=0;for(w=0;w<v;++w){var x=t[w];if((0,o.isNum)(x))P+=y*x*i/1e3;else{var T,E,O,I,D=!1,L=(x.isSpace?h:0)+d,M=x.fontChar,W=x.accent,j=x.width;if(g){var N,B,q;N=x.vmetric||b;B=-(B=x.vmetric?N[1]:.5*j)*_;q=N[2]*_;j=N?-N[0]:j;T=B/u;E=(P+q)/u}else{T=P/u;E=0}if(a.remeasure&&j>0){var G=1e3*c.measureText(M).width/i*u;if(j<G&&this.isFontSubpixelAAEnabled){var U=j/G;D=!0;c.save();c.scale(U,1);T/=U}else j!==G&&(T+=(j-G)/2e3*i/u)}if(this.contentVisible&&(x.isInFont||a.missingFile))if(S&&!W)c.fillText(M,T,E);else{this.paintChar(M,T,E,l);if(W){O=T+i*W.offset.x/u;I=E-i*W.offset.y/u;this.paintChar(W.fontChar,O,I,l)}}P+=g?j*_-L*p:j*_+L*p;D&&c.restore()}}g?r.y-=P:r.x+=P*m;c.restore()}},showType3Text:function CanvasGraphics_showType3Text(t){var r,a,i,l,c=this.ctx,u=this.current,d=u.font,h=u.fontSize,p=u.fontDirection,m=d.vertical?1:-1,v=u.charSpacing,g=u.wordSpacing,y=u.textHScale*p,b=u.fontMatrix||o.FONT_IDENTITY_MATRIX,_=t.length;if(!(u.textRenderingMode===o.TextRenderingMode.INVISIBLE)&&0!==h){this._cachedGetSinglePixelWidth=null;c.save();c.transform.apply(c,u.textMatrix);c.translate(u.x,u.y);c.scale(y,p);for(r=0;r<_;++r){a=t[r];if((0,o.isNum)(a)){l=m*a*h/1e3;this.ctx.translate(l,0);u.x+=l*y}else{var S=(a.isSpace?g:0)+v,C=d.charProcOperatorList[a.operatorListId];if(C){if(this.contentVisible){this.processingType3=a;this.save();c.scale(h,h);c.transform.apply(c,b);this.executeOperatorList(C);this.restore()}i=o.Util.applyTransform([a.width,0],b)[0]*h+S;c.translate(i,0);u.x+=i*y}else(0,o.warn)('Type3 character "'.concat(a.operatorListId,'" is not available.'))}}c.restore();this.processingType3=null}},setCharWidth:function CanvasGraphics_setCharWidth(t,r){},setCharWidthAndBounds:function CanvasGraphics_setCharWidthAndBounds(t,r,a,o,i,l){this.ctx.rect(a,o,i-a,l-o);this.clip();this.endPath()},getColorN_Pattern:function CanvasGraphics_getColorN_Pattern(t){var r,a=this;if("TilingPattern"===t[0]){var o=t[1],l=this.baseTransform||this.ctx.mozCurrentTransform.slice(),c={createCanvasGraphics:function createCanvasGraphics(t){return new CanvasGraphics(t,a.commonObjs,a.objs,a.canvasFactory,a.webGLContext)}};r=new i.TilingPattern(t,o,this.ctx,c,l)}else r=(0,i.getShadingPatternFromIR)(t);return r},setStrokeColorN:function CanvasGraphics_setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)},setFillColorN:function CanvasGraphics_setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments);this.current.patternFill=!0},setStrokeRGBColor:function CanvasGraphics_setStrokeRGBColor(t,r,a){var i=o.Util.makeCssRgb(t,r,a);this.ctx.strokeStyle=i;this.current.strokeColor=i},setFillRGBColor:function CanvasGraphics_setFillRGBColor(t,r,a){var i=o.Util.makeCssRgb(t,r,a);this.ctx.fillStyle=i;this.current.fillColor=i;this.current.patternFill=!1},shadingFill:function CanvasGraphics_shadingFill(t){if(this.contentVisible){var r=this.ctx;this.save();var a=(0,i.getShadingPatternFromIR)(t);r.fillStyle=a.getPattern(r,this,!0);var l=r.mozCurrentTransformInverse;if(l){var c=r.canvas,u=c.width,d=c.height,h=o.Util.applyTransform([0,0],l),p=o.Util.applyTransform([0,d],l),m=o.Util.applyTransform([u,0],l),v=o.Util.applyTransform([u,d],l),g=Math.min(h[0],p[0],m[0],v[0]),y=Math.min(h[1],p[1],m[1],v[1]),b=Math.max(h[0],p[0],m[0],v[0]),_=Math.max(h[1],p[1],m[1],v[1]);this.ctx.fillRect(g,y,b-g,_-y)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.restore()}},beginInlineImage:function CanvasGraphics_beginInlineImage(){(0,o.unreachable)("Should not call beginInlineImage")},beginImageData:function CanvasGraphics_beginImageData(){(0,o.unreachable)("Should not call beginImageData")},paintFormXObjectBegin:function CanvasGraphics_paintFormXObjectBegin(t,r){if(this.contentVisible){this.save();this.baseTransformStack.push(this.baseTransform);Array.isArray(t)&&6===t.length&&this.transform.apply(this,t);this.baseTransform=this.ctx.mozCurrentTransform;if(r){var a=r[2]-r[0],o=r[3]-r[1];this.ctx.rect(r[0],r[1],a,o);this.clip();this.endPath()}}},paintFormXObjectEnd:function CanvasGraphics_paintFormXObjectEnd(){if(this.contentVisible){this.restore();this.baseTransform=this.baseTransformStack.pop()}},beginGroup:function CanvasGraphics_beginGroup(t){if(this.contentVisible){this.save();var r=this.ctx;t.isolated||(0,o.info)("TODO: Support non-isolated groups.");t.knockout&&(0,o.warn)("Knockout groups not supported.");var a=r.mozCurrentTransform;t.matrix&&r.transform.apply(r,t.matrix);if(!t.bbox)throw new Error("Bounding box is required.");var i=o.Util.getAxialAlignedBoundingBox(t.bbox,r.mozCurrentTransform),l=[0,0,r.canvas.width,r.canvas.height];i=o.Util.intersect(i,l)||[0,0,0,0];var c=Math.floor(i[0]),u=Math.floor(i[1]),d=Math.max(Math.ceil(i[2])-c,1),h=Math.max(Math.ceil(i[3])-u,1),p=1,m=1;if(d>4096){p=d/4096;d=4096}if(h>4096){m=h/4096;h=4096}var v="groupAt"+this.groupLevel;t.smask&&(v+="_smask_"+this.smaskCounter++%2);var g=this.cachedCanvases.getCanvas(v,d,h,!0),y=g.context;y.scale(1/p,1/m);y.translate(-c,-u);y.transform.apply(y,a);if(t.smask)this.smaskStack.push({canvas:g.canvas,context:y,offsetX:c,offsetY:u,scaleX:p,scaleY:m,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(c,u);r.scale(p,m)}copyCtxState(r,y);this.ctx=y;this.setGState([["BM","source-over"],["ca",1],["CA",1]]);this.groupStack.push(r);this.groupLevel++;this.current.activeSMask=null}},endGroup:function CanvasGraphics_endGroup(t){if(this.contentVisible){this.groupLevel--;var r=this.ctx;this.ctx=this.groupStack.pop();void 0!==this.ctx.imageSmoothingEnabled?this.ctx.imageSmoothingEnabled=!1:this.ctx.mozImageSmoothingEnabled=!1;t.smask?this.tempSMask=this.smaskStack.pop():this.ctx.drawImage(r.canvas,0,0);this.restore()}},beginAnnotations:function CanvasGraphics_beginAnnotations(){this.save();this.baseTransform&&this.ctx.setTransform.apply(this.ctx,this.baseTransform)},endAnnotations:function CanvasGraphics_endAnnotations(){this.restore()},beginAnnotation:function CanvasGraphics_beginAnnotation(t,r,a){this.save();resetCtxToDefault(this.ctx);this.current=new c;if(Array.isArray(t)&&4===t.length){var o=t[2]-t[0],i=t[3]-t[1];this.ctx.rect(t[0],t[1],o,i);this.clip();this.endPath()}this.transform.apply(this,r);this.transform.apply(this,a)},endAnnotation:function CanvasGraphics_endAnnotation(){this.restore()},paintImageMaskXObject:function CanvasGraphics_paintImageMaskXObject(t){if(this.contentVisible){var r=this.ctx,a=t.width,o=t.height,i=this.current.fillColor,l=this.current.patternFill,c=this.processingType3;c&&void 0===c.compiled&&(c.compiled=a<=1e3&&o<=1e3?function compileType3Glyph(t){var r,a,o,i,l=t.width,c=t.height,u=l+1,d=new Uint8Array(u*(c+1)),h=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),p=l+7&-8,m=t.data,v=new Uint8Array(p*c),g=0;for(r=0,i=m.length;r<i;r++)for(var y=128,b=m[r];y>0;){v[g++]=b&y?0:255;y>>=1}var _=0;if(0!==v[g=0]){d[0]=1;++_}for(a=1;a<l;a++){if(v[g]!==v[g+1]){d[a]=v[g]?2:1;++_}g++}if(0!==v[g]){d[a]=2;++_}for(r=1;r<c;r++){o=r*u;if(v[(g=r*p)-p]!==v[g]){d[o]=v[g]?1:8;++_}var S=(v[g]?4:0)+(v[g-p]?8:0);for(a=1;a<l;a++){if(h[S=(S>>2)+(v[g+1]?4:0)+(v[g-p+1]?8:0)]){d[o+a]=h[S];++_}g++}if(v[g-p]!==v[g]){d[o+a]=v[g]?2:4;++_}if(_>1e3)return null}o=r*u;if(0!==v[g=p*(c-1)]){d[o]=8;++_}for(a=1;a<l;a++){if(v[g]!==v[g+1]){d[o+a]=v[g]?4:8;++_}g++}if(0!==v[g]){d[o+a]=4;++_}if(_>1e3)return null;var C=new Int32Array([0,u,-1,0,-u,0,0,0,1]),A=[];for(r=0;_&&r<=c;r++){for(var R=r*u,k=R+l;R<k&&!d[R];)R++;if(R!==k){var w,P=[R%u,r],x=d[R],T=R;do{var E=C[x];do{R+=E}while(!d[R]);if(5!==(w=d[R])&&10!==w){x=w;d[R]=0}else{x=w&51*x>>4;d[R]&=x>>2|x<<2}P.push(R%u);P.push(R/u|0);d[R]||--_}while(T!==R);A.push(P);--r}}return function drawOutline(t){t.save();t.scale(1/l,-1/c);t.translate(0,-c);t.beginPath();for(var r=0,a=A.length;r<a;r++){var o=A[r];t.moveTo(o[0],o[1]);for(var i=2,u=o.length;i<u;i+=2)t.lineTo(o[i],o[i+1])}t.fill();t.beginPath();t.restore()}}({data:t.data,width:a,height:o}):null);if(c&&c.compiled)c.compiled(r);else{var u=this.cachedCanvases.getCanvas("maskCanvas",a,o),d=u.context;d.save();putBinaryImageMask(d,t);d.globalCompositeOperation="source-in";d.fillStyle=l?i.getPattern(d,this):i;d.fillRect(0,0,a,o);d.restore();this.paintInlineImageXObject(u.canvas)}}},paintImageMaskXObjectRepeat:function paintImageMaskXObjectRepeat(t,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4?arguments[4]:void 0,l=arguments.length>5?arguments[5]:void 0;if(this.contentVisible){var c=t.width,u=t.height,d=this.current.fillColor,h=this.current.patternFill,p=this.cachedCanvases.getCanvas("maskCanvas",c,u),m=p.context;m.save();putBinaryImageMask(m,t);m.globalCompositeOperation="source-in";m.fillStyle=h?d.getPattern(m,this):d;m.fillRect(0,0,c,u);m.restore();for(var v=this.ctx,g=0,y=l.length;g<y;g+=2){v.save();v.transform(r,a,o,i,l[g],l[g+1]);v.scale(1,-1);v.drawImage(p.canvas,0,0,c,u,0,-1,1,1);v.restore()}}},paintImageMaskXObjectGroup:function CanvasGraphics_paintImageMaskXObjectGroup(t){if(this.contentVisible)for(var r=this.ctx,a=this.current.fillColor,o=this.current.patternFill,i=0,l=t.length;i<l;i++){var c=t[i],u=c.width,d=c.height,h=this.cachedCanvases.getCanvas("maskCanvas",u,d),p=h.context;p.save();putBinaryImageMask(p,c);p.globalCompositeOperation="source-in";p.fillStyle=o?a.getPattern(p,this):a;p.fillRect(0,0,u,d);p.restore();r.save();r.transform.apply(r,c.transform);r.scale(1,-1);r.drawImage(h.canvas,0,0,u,d,0,-1,1,1);r.restore()}},paintImageXObject:function CanvasGraphics_paintImageXObject(t){if(this.contentVisible){var r=t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t);r?this.paintInlineImageXObject(r):(0,o.warn)("Dependent image isn't ready yet")}},paintImageXObjectRepeat:function CanvasGraphics_paintImageXObjectRepeat(t,r,a,i){if(this.contentVisible){var l=t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t);if(l){for(var c=l.width,u=l.height,d=[],h=0,p=i.length;h<p;h+=2)d.push({transform:[r,0,0,a,i[h],i[h+1]],x:0,y:0,w:c,h:u});this.paintInlineImageXObjectGroup(l,d)}else(0,o.warn)("Dependent image isn't ready yet")}},paintInlineImageXObject:function CanvasGraphics_paintInlineImageXObject(t){if(this.contentVisible){var r=t.width,a=t.height,o=this.ctx;this.save();o.scale(1/r,-1/a);var i,l,c=o.mozCurrentTransformInverse,u=c[0],d=c[1],h=Math.max(Math.sqrt(u*u+d*d),1),p=c[2],m=c[3],v=Math.max(Math.sqrt(p*p+m*m),1);if("function"==typeof HTMLElement&&t instanceof HTMLElement||!t.data)i=t;else{var g=(l=this.cachedCanvases.getCanvas("inlineImage",r,a)).context;putBinaryImageData(g,t,this.current.transferMaps);i=l.canvas}for(var y=r,b=a,_="prescale1";h>2&&y>1||v>2&&b>1;){var S=y,C=b;h>2&&y>1&&(h/=y/(S=Math.ceil(y/2)));v>2&&b>1&&(v/=b/(C=Math.ceil(b/2)));(g=(l=this.cachedCanvases.getCanvas(_,S,C)).context).clearRect(0,0,S,C);g.drawImage(i,0,0,y,b,0,0,S,C);i=l.canvas;y=S;b=C;_="prescale1"===_?"prescale2":"prescale1"}o.drawImage(i,0,0,y,b,0,-a,r,a);if(this.imageLayer){var A=this.getCanvasPosition(0,-a);this.imageLayer.appendImage({imgData:t,left:A[0],top:A[1],width:r/c[0],height:a/c[3]})}this.restore()}},paintInlineImageXObjectGroup:function CanvasGraphics_paintInlineImageXObjectGroup(t,r){if(this.contentVisible){var a=this.ctx,o=t.width,i=t.height,l=this.cachedCanvases.getCanvas("inlineImage",o,i);putBinaryImageData(l.context,t,this.current.transferMaps);for(var c=0,u=r.length;c<u;c++){var d=r[c];a.save();a.transform.apply(a,d.transform);a.scale(1,-1);a.drawImage(l.canvas,d.x,d.y,d.w,d.h,0,-1,1,1);if(this.imageLayer){var h=this.getCanvasPosition(d.x,d.y);this.imageLayer.appendImage({imgData:t,left:h[0],top:h[1],width:o,height:i})}a.restore()}}},paintSolidColorImageMask:function CanvasGraphics_paintSolidColorImageMask(){this.contentVisible&&this.ctx.fillRect(0,0,1,1)},markPoint:function CanvasGraphics_markPoint(t){},markPointProps:function CanvasGraphics_markPointProps(t,r){},beginMarkedContent:function CanvasGraphics_beginMarkedContent(t){this.markedContentStack.push({visible:!0})},beginMarkedContentProps:function CanvasGraphics_beginMarkedContentProps(t,r){"OC"===t?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(r)}):this.markedContentStack.push({visible:!0});this.contentVisible=this.isContentVisible()},endMarkedContent:function CanvasGraphics_endMarkedContent(){this.markedContentStack.pop();this.contentVisible=this.isContentVisible()},beginCompat:function CanvasGraphics_beginCompat(){},endCompat:function CanvasGraphics_endCompat(){},consumePath:function CanvasGraphics_consumePath(){var t=this.ctx;if(this.pendingClip){this.pendingClip===u?t.clip("evenodd"):t.clip();this.pendingClip=null}t.beginPath()},getSinglePixelWidth:function getSinglePixelWidth(t){if(null===this._cachedGetSinglePixelWidth){var r=this.ctx.mozCurrentTransformInverse;this._cachedGetSinglePixelWidth=Math.sqrt(Math.max(r[0]*r[0]+r[1]*r[1],r[2]*r[2]+r[3]*r[3]))}return this._cachedGetSinglePixelWidth},getCanvasPosition:function CanvasGraphics_getCanvasPosition(t,r){var a=this.ctx.mozCurrentTransform;return[a[0]*t+a[2]*r+a[4],a[1]*t+a[3]*r+a[5]]},isContentVisible:function CanvasGraphics_isContentVisible(){for(var t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}};for(var d in o.OPS)CanvasGraphics.prototype[o.OPS[d]]=CanvasGraphics.prototype[d];return CanvasGraphics}();r.CanvasGraphics=u},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.getShadingPatternFromIR=function getShadingPatternFromIR(t){var r=i[t[0]];if(!r)throw new Error("Unknown IR type: ".concat(t[0]));return r.fromIR(t)};r.TilingPattern=void 0;var o=a(5),i={};function applyBoundingBox(t,r){if(r&&"undefined"!=typeof Path2D){var a=r[2]-r[0],o=r[3]-r[1],i=new Path2D;i.rect(r[0],r[1],a,o);t.clip(i)}}i.RadialAxial={fromIR:function RadialAxial_fromIR(t){var r=t[1],a=t[2],o=t[3],i=t[4],l=t[5],c=t[6],u=t[7];return{type:"Pattern",getPattern:function RadialAxial_getPattern(t){applyBoundingBox(t,a);var d;"axial"===r?d=t.createLinearGradient(i[0],i[1],l[0],l[1]):"radial"===r&&(d=t.createRadialGradient(i[0],i[1],c,l[0],l[1],u));for(var h=0,p=o.length;h<p;++h){var m=o[h];d.addColorStop(m[0],m[1])}return d}}}};var l=function createMeshCanvasClosure(){function drawTriangle(t,r,a,o,i,l,c,u){var d,h=r.coords,p=r.colors,m=t.data,v=4*t.width;if(h[a+1]>h[o+1]){d=a;a=o;o=d;d=l;l=c;c=d}if(h[o+1]>h[i+1]){d=o;o=i;i=d;d=c;c=u;u=d}if(h[a+1]>h[o+1]){d=a;a=o;o=d;d=l;l=c;c=d}var g=(h[a]+r.offsetX)*r.scaleX,y=(h[a+1]+r.offsetY)*r.scaleY,b=(h[o]+r.offsetX)*r.scaleX,_=(h[o+1]+r.offsetY)*r.scaleY,S=(h[i]+r.offsetX)*r.scaleX,C=(h[i+1]+r.offsetY)*r.scaleY;if(!(y>=C))for(var A,R,k,w,P,x,T,E,O=p[l],I=p[l+1],D=p[l+2],L=p[c],M=p[c+1],W=p[c+2],j=p[u],N=p[u+1],B=p[u+2],q=Math.round(y),G=Math.round(C),U=q;U<=G;U++){if(U<_){var z=void 0;A=g-(g-b)*(z=U<y?0:y===_?1:(y-U)/(y-_));R=O-(O-L)*z;k=I-(I-M)*z;w=D-(D-W)*z}else{var H=void 0;A=b-(b-S)*(H=U>C?1:_===C?0:(_-U)/(_-C));R=L-(L-j)*H;k=M-(M-N)*H;w=W-(W-B)*H}var V=void 0;P=g-(g-S)*(V=U<y?0:U>C?1:(y-U)/(y-C));x=O-(O-j)*V;T=I-(I-N)*V;E=D-(D-B)*V;for(var Y=Math.round(Math.min(A,P)),X=Math.round(Math.max(A,P)),Q=v*U+4*Y,K=Y;K<=X;K++){(V=(A-K)/(A-P))<0?V=0:V>1&&(V=1);m[Q++]=R-(R-x)*V|0;m[Q++]=k-(k-T)*V|0;m[Q++]=w-(w-E)*V|0;m[Q++]=255}}}function drawFigure(t,r,a){var o,i,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(o=0;o<d;o++)for(var p=o*u,m=0;m<h;m++,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(o=0,i=l.length;o<i;o+=3)drawTriangle(t,a,l[o],l[o+1],l[o+2],c[o],c[o+1],c[o+2]);break;default:throw new Error("illegal figure")}}return function createMeshCanvas(t,r,a,o,i,l,c,u){var d,h,p,m,v=Math.floor(t[0]),g=Math.floor(t[1]),y=Math.ceil(t[2])-v,b=Math.ceil(t[3])-g,_=Math.min(Math.ceil(Math.abs(y*r[0]*1.1)),3e3),S=Math.min(Math.ceil(Math.abs(b*r[1]*1.1)),3e3),C=y/_,A=b/S,R={coords:a,colors:o,offsetX:-v,offsetY:-g,scaleX:1/C,scaleY:1/A},k=_+4,w=S+4;if(u.isEnabled){d=u.drawFigures({width:_,height:S,backgroundColor:l,figures:i,context:R});(h=c.getCanvas("mesh",k,w,!1)).context.drawImage(d,2,2);d=h.canvas}else{var P=(h=c.getCanvas("mesh",k,w,!1)).context,x=P.createImageData(_,S);if(l){var T=x.data;for(p=0,m=T.length;p<m;p+=4){T[p]=l[0];T[p+1]=l[1];T[p+2]=l[2];T[p+3]=255}}for(p=0;p<i.length;p++)drawFigure(x,i[p],R);P.putImageData(x,2,2);d=h.canvas}return{canvas:d,offsetX:v-2*C,offsetY:g-2*A,scaleX:C,scaleY:A}}}();i.Mesh={fromIR:function Mesh_fromIR(t){var r=t[2],a=t[3],i=t[4],c=t[5],u=t[6],d=t[7],h=t[8];return{type:"Pattern",getPattern:function Mesh_getPattern(t,p,m){applyBoundingBox(t,d);var v;if(m)v=o.Util.singularValueDecompose2dScale(t.mozCurrentTransform);else{v=o.Util.singularValueDecompose2dScale(p.baseTransform);if(u){var g=o.Util.singularValueDecompose2dScale(u);v=[v[0]*g[0],v[1]*g[1]]}}var y=l(c,v,r,a,i,m?null:h,p.cachedCanvases,p.webGLContext);if(!m){t.setTransform.apply(t,p.baseTransform);u&&t.transform.apply(t,u)}t.translate(y.offsetX,y.offsetY);t.scale(y.scaleX,y.scaleY);return t.createPattern(y.canvas,"no-repeat")}}}};i.Dummy={fromIR:function Dummy_fromIR(){return{type:"Pattern",getPattern:function Dummy_fromIR_getPattern(){return"hotpink"}}}};var c=function TilingPatternClosure(){var t=1,r=2;function TilingPattern(t,r,a,o,i){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.canvasGraphicsFactory=o;this.baseTransform=i;this.type="Pattern";this.ctx=a}TilingPattern.prototype={createPatternCanvas:function TilinPattern_createPatternCanvas(t){var r=this.operatorList,a=this.bbox,i=this.xstep,l=this.ystep,c=this.paintType,u=this.tilingType,d=this.color,h=this.canvasGraphicsFactory;(0,o.info)("TilingType: "+u);var p=a[0],m=a[1],v=a[2],g=a[3],y=o.Util.singularValueDecompose2dScale(this.matrix),b=o.Util.singularValueDecompose2dScale(this.baseTransform),_=[y[0]*b[0],y[1]*b[1]],S=this.getSizeAndScale(i,this.ctx.canvas.width,_[0]),C=this.getSizeAndScale(l,this.ctx.canvas.height,_[1]),A=t.cachedCanvases.getCanvas("pattern",S.size,C.size,!0),R=A.context,k=h.createCanvasGraphics(R);k.groupLevel=t.groupLevel;this.setFillAndStrokeStyleToContext(k,c,d);k.transform(S.scale,0,0,C.scale,0,0);k.transform(1,0,0,1,-p,-m);this.clipBbox(k,a,p,m,v,g);k.executeOperatorList(r);this.ctx.transform(1,0,0,1,p,m);this.ctx.scale(1/S.scale,1/C.scale);return A.canvas},getSizeAndScale:function TilingPattern_getSizeAndScale(t,r,a){t=Math.abs(t);var o=Math.max(3e3,r),i=Math.ceil(t*a);i>=o?i=o:a=i/t;return{scale:a,size:i}},clipBbox:function clipBbox(t,r,a,o,i,l){if(Array.isArray(r)&&4===r.length){var c=i-a,u=l-o;t.ctx.rect(a,o,c,u);t.clip();t.endPath()}},setFillAndStrokeStyleToContext:function setFillAndStrokeStyleToContext(a,i,l){var c=a.ctx,u=a.current;switch(i){case t:var d=this.ctx;c.fillStyle=d.fillStyle;c.strokeStyle=d.strokeStyle;u.fillColor=d.fillStyle;u.strokeColor=d.strokeStyle;break;case r:var h=o.Util.makeCssRgb(l[0],l[1],l[2]);c.fillStyle=h;c.strokeStyle=h;u.fillColor=h;u.strokeColor=h;break;default:throw new o.FormatError("Unsupported paint type: ".concat(i))}},getPattern:function TilingPattern_getPattern(t,r){(t=this.ctx).setTransform.apply(t,this.baseTransform);t.transform.apply(t,this.matrix);var a=this.createPatternCanvas(r);return t.createPattern(a,"repeat")}};return TilingPattern}();r.TilingPattern=c},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.GlobalWorkerOptions=void 0;var o=Object.create(null);r.GlobalWorkerOptions=o;o.workerPort=void 0===o.workerPort?null:o.workerPort;o.workerSrc=void 0===o.workerSrc?"":o.workerSrc},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.MessageHandler=void 0;var o=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(2)),i=a(5);function asyncGeneratorStep(t,r,a,o,i,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(o,i)}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var o=r[a];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var l=1,c=2,u=1,d=2,h=3,p=4,m=5,v=6,g=7,y=8;function wrapReason(t){if("object"!==_typeof(t)||null===t)return t;switch(t.name){case"AbortException":return new i.AbortException(t.message);case"MissingPDFException":return new i.MissingPDFException(t.message);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 b=function(){function MessageHandler(t,r,a){var o=this;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,MessageHandler);this.sourceName=t;this.targetName=r;this.comObj=a;this.callbackId=1;this.streamId=1;this.postMessageTransfers=!0;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===o.sourceName)if(r.stream)o._processStreamMessage(r);else if(r.callback){var i=r.callbackId,u=o.callbackCapabilities[i];if(!u)throw new Error("Cannot resolve callback ".concat(i));delete o.callbackCapabilities[i];if(r.callback===l)u.resolve(r.data);else{if(r.callback!==c)throw new Error("Unexpected callback case");u.reject(wrapReason(r.reason))}}else{var d=o.actionHandler[r.action];if(!d)throw new Error("Unknown action from worker: ".concat(r.action));if(r.callbackId){var h=o.sourceName,p=r.sourceName;new Promise((function(t){t(d(r.data))})).then((function(t){a.postMessage({sourceName:h,targetName:p,callback:l,callbackId:r.callbackId,data:t})}),(function(t){a.postMessage({sourceName:h,targetName:p,callback:c,callbackId:r.callbackId,reason:wrapReason(t)})}))}else r.streamId?o._createStreamSink(r):d(r.data)}};a.addEventListener("message",this._onComObjOnMessage)}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);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._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=(0,i.createPromiseCapability)();this.callbackCapabilities[o]=l;try{this._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,c=this.streamId++,d=this.sourceName,h=this.targetName,p=this.comObj;return new ReadableStream({start:function start(a){var u=(0,i.createPromiseCapability)();l.streamControllers[c]={controller:a,startCall:u,pullCall:null,cancelCall:null,isClosed:!1};l._postMessage({sourceName:d,targetName:h,action:t,streamId:c,data:r,desiredSize:a.desiredSize},o);return u.promise},pull:function pull(t){var r=(0,i.createPromiseCapability)();l.streamControllers[c].pullCall=r;p.postMessage({sourceName:d,targetName:h,stream:v,streamId:c,desiredSize:t.desiredSize});return r.promise},cancel:function cancel(t){(0,i.assert)(t instanceof Error,"cancel must have a valid reason");var r=(0,i.createPromiseCapability)();l.streamControllers[c].cancelCall=r;l.streamControllers[c].isClosed=!0;p.postMessage({sourceName:d,targetName:h,stream:u,streamId:c,reason:wrapReason(t)});return r.promise}},a)}},{key:"_createStreamSink",value:function _createStreamSink(t){var r=this,a=this.actionHandler[t.action],o=t.streamId,l=this.sourceName,c=t.sourceName,u=this.comObj,d={enqueue:function enqueue(t){var a=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-=a;if(d>0&&this.desiredSize<=0){this.sinkCapability=(0,i.createPromiseCapability)();this.ready=this.sinkCapability.promise}r._postMessage({sourceName:l,targetName:c,stream:p,streamId:o,chunk:t},u)}},close:function close(){if(!this.isCancelled){this.isCancelled=!0;u.postMessage({sourceName:l,targetName:c,stream:h,streamId:o});delete r.streamSinks[o]}},error:function error(t){(0,i.assert)(t instanceof Error,"error must have a valid reason");if(!this.isCancelled){this.isCancelled=!0;u.postMessage({sourceName:l,targetName:c,stream:m,streamId:o,reason:wrapReason(t)})}},sinkCapability:(0,i.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};d.sinkCapability.resolve();d.ready=d.sinkCapability.promise;this.streamSinks[o]=d;new Promise((function(r){r(a(t.data,d))})).then((function(){u.postMessage({sourceName:l,targetName:c,stream:y,streamId:o,success:!0})}),(function(t){u.postMessage({sourceName:l,targetName:c,stream:y,streamId:o,reason:wrapReason(t)})}))}},{key:"_processStreamMessage",value:function _processStreamMessage(t){var r=t.streamId,a=this.sourceName,o=t.sourceName,l=this.comObj;switch(t.stream){case y:t.success?this.streamControllers[r].startCall.resolve():this.streamControllers[r].startCall.reject(wrapReason(t.reason));break;case g:t.success?this.streamControllers[r].pullCall.resolve():this.streamControllers[r].pullCall.reject(wrapReason(t.reason));break;case v:if(!this.streamSinks[r]){l.postMessage({sourceName:a,targetName:o,stream:g,streamId:r,success:!0});break}this.streamSinks[r].desiredSize<=0&&t.desiredSize>0&&this.streamSinks[r].sinkCapability.resolve();this.streamSinks[r].desiredSize=t.desiredSize;var c=this.streamSinks[t.streamId].onPull;new Promise((function(t){t(c&&c())})).then((function(){l.postMessage({sourceName:a,targetName:o,stream:g,streamId:r,success:!0})}),(function(t){l.postMessage({sourceName:a,targetName:o,stream:g,streamId:r,reason:wrapReason(t)})}));break;case p:(0,i.assert)(this.streamControllers[r],"enqueue should have stream controller");if(this.streamControllers[r].isClosed)break;this.streamControllers[r].controller.enqueue(t.chunk);break;case h:(0,i.assert)(this.streamControllers[r],"close should have stream controller");if(this.streamControllers[r].isClosed)break;this.streamControllers[r].isClosed=!0;this.streamControllers[r].controller.close();this._deleteStreamController(r);break;case m:(0,i.assert)(this.streamControllers[r],"error should have stream controller");this.streamControllers[r].controller.error(wrapReason(t.reason));this._deleteStreamController(r);break;case d:t.success?this.streamControllers[r].cancelCall.resolve():this.streamControllers[r].cancelCall.reject(wrapReason(t.reason));this._deleteStreamController(r);break;case u:if(!this.streamSinks[r])break;var b=this.streamSinks[t.streamId].onCancel;new Promise((function(r){r(b&&b(wrapReason(t.reason)))})).then((function(){l.postMessage({sourceName:a,targetName:o,stream:d,streamId:r,success:!0})}),(function(t){l.postMessage({sourceName:a,targetName:o,stream:d,streamId:r,reason:wrapReason(t)})}));this.streamSinks[r].sinkCapability.reject(wrapReason(t.reason));this.streamSinks[r].isCancelled=!0;delete this.streamSinks[r];break;default:throw new Error("Unexpected stream case")}}},{key:"_deleteStreamController",value:(t=function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(o,i){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,o,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,o,i,_next,_throw,"throw",t)}_next(void 0)}))}}(o.default.mark((function _callee(t){return o.default.wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:r.next=2;return Promise.allSettled([this.streamControllers[t].startCall,this.streamControllers[t].pullCall,this.streamControllers[t].cancelCall].map((function(t){return t&&t.promise})));case 2:delete this.streamControllers[t];case 3:case"end":return r.stop()}}),_callee,this)}))),function _deleteStreamController(r){return t.apply(this,arguments)})},{key:"_postMessage",value:function _postMessage(t,r){r&&this.postMessageTransfers?this.comObj.postMessage(t,r):this.comObj.postMessage(t)}},{key:"destroy",value:function destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}]);var t;return MessageHandler}();r.MessageHandler=b},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.Metadata=void 0;var o=a(5),i=a(212);function _defineProperties(t,r){for(var a=0;a<r.length;a++){var o=r[a];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}var l=function(){function Metadata(t){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,Metadata);(0,o.assert)("string"==typeof t,"Metadata: input is not a string");t=this._repair(t);var r=(new i.SimpleXMLParser).parseFromString(t);this._metadataMap=new Map;r&&this._parse(r)}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);return t}(Metadata,[{key:"_repair",value:function _repair(t){return t.replace(/^[^<]+/,"").replace(/>\\376\\377([^<]+)/g,(function(t,r){for(var a=r.replace(/\\([0-3])([0-7])([0-7])/g,(function(t,r,a,o){return String.fromCharCode(64*r+8*a+1*o)})).replace(/&(amp|apos|gt|lt|quot);/g,(function(t,r){switch(r){case"amp":return"&";case"apos":return"'";case"gt":return">";case"lt":return"<";case"quot":return'"'}throw new Error("_repair: ".concat(r," isn't defined."))})),o="",i=0,l=a.length;i<l;i+=2){var c=256*a.charCodeAt(i)+a.charCodeAt(i+1);o+=c>=32&&c<127&&60!==c&&62!==c&&38!==c?String.fromCharCode(c):"&#x"+(65536+c).toString(16).substring(1)+";"}return">"+o}))}},{key:"_parse",value:function _parse(t){var r=t.documentElement;if("rdf:rdf"!==r.nodeName.toLowerCase()){r=r.firstChild;for(;r&&"rdf:rdf"!==r.nodeName.toLowerCase();)r=r.nextSibling}var a=r?r.nodeName.toLowerCase():null;if(r&&"rdf:rdf"===a&&r.hasChildNodes())for(var o=r.childNodes,i=0,l=o.length;i<l;i++){var c=o[i];if("rdf:description"===c.nodeName.toLowerCase())for(var u=0,d=c.childNodes.length;u<d;u++)if("#text"!==c.childNodes[u].nodeName.toLowerCase()){var h=c.childNodes[u],p=h.nodeName.toLowerCase();this._metadataMap.set(p,h.textContent.trim())}}}},{key:"get",value:function get(t){return this._metadataMap.has(t)?this._metadataMap.get(t):null}},{key:"getAll",value:function getAll(){return Object.fromEntries(this._metadataMap)}},{key:"has",value:function has(t){return this._metadataMap.has(t)}}]);return Metadata}();r.Metadata=l},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.SimpleXMLParser=void 0;function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var a=[],o=!0,i=!1,l=void 0;try{for(var c,u=t[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){a.push(c.value);if(r&&a.length===r)break}}catch(t){i=!0;l=t}finally{try{o||null==u.return||u.return()}finally{if(i)throw l}}return a}(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,o=new Array(r);a<r;a++)o[a]=t[a];return o}function _get(t,r,a){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function _get(t,r,a){var o=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=_getPrototypeOf(t)););return t}(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(a):i.value}})(t,r,a||t)}function _setPrototypeOf(t,r){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t})(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{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,o=_getPrototypeOf(t);if(r){var i=_getPrototypeOf(this).constructor;a=Reflect.construct(o,arguments,i)}else a=o.apply(this,arguments);return _possibleConstructorReturn(this,a)}}function _possibleConstructorReturn(t,r){return!r||"object"!==_typeof(r)&&"function"!=typeof r?function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):r}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)})(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 o=r[a];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);return t}var o=0,i=-2,l=-3,c=-4,u=-5,d=-6,h=-9;function isWhitespace(t,r){var a=t[r];return" "===a||"\n"===a||"\r"===a||"\t"===a}var p=function(){function XMLParserBase(){_classCallCheck(this,XMLParserBase)}_createClass(XMLParserBase,[{key:"_resolveEntities",value:function _resolveEntities(t){var r=this;return t.replace(/&([^;]+);/g,(function(t,a){if("#x"===a.substring(0,2))return String.fromCharCode(parseInt(a.substring(2),16));if("#"===a.substring(0,1))return String.fromCharCode(parseInt(a.substring(1),10));switch(a){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return'"'}return r.onResolveEntity(a)}))}},{key:"_parseContent",value:function _parseContent(t,r){var a=[],o=r;function skipWs(){for(;o<t.length&&isWhitespace(t,o);)++o}for(;o<t.length&&!isWhitespace(t,o)&&">"!==t[o]&&"/"!==t[o];)++o;var i=t.substring(r,o);skipWs();for(;o<t.length&&">"!==t[o]&&"/"!==t[o]&&"?"!==t[o];){skipWs();for(var l,c="";o<t.length&&!isWhitespace(t,o)&&"="!==t[o];){c+=t[o];++o}skipWs();if("="!==t[o])return null;++o;skipWs();var u=t[o];if('"'!==u&&"'"!==u)return null;var d=t.indexOf(u,++o);if(d<0)return null;l=t.substring(o,d);a.push({name:c,value:this._resolveEntities(l)});o=d+1;skipWs()}return{name:i,attributes:a,parsed:o-r}}},{key:"_parseProcessingInstruction",value:function _parseProcessingInstruction(t,r){var a=r;for(;a<t.length&&!isWhitespace(t,a)&&">"!==t[a]&&"/"!==t[a];)++a;var o=t.substring(r,a);!function skipWs(){for(;a<t.length&&isWhitespace(t,a);)++a}();for(var i=a;a<t.length&&("?"!==t[a]||">"!==t[a+1]);)++a;return{name:o,value:t.substring(i,a),parsed:a-r}}},{key:"parseXml",value:function parseXml(t){for(var r=0;r<t.length;){var a=r;if("<"===t[r]){var o=void 0;switch(t[++a]){case"/":++a;if((o=t.indexOf(">",a))<0){this.onError(h);return}this.onEndElement(t.substring(a,o));a=o+1;break;case"?":++a;var p=this._parseProcessingInstruction(t,a);if("?>"!==t.substring(a+p.parsed,a+p.parsed+2)){this.onError(l);return}this.onPi(p.name,p.value);a+=p.parsed+2;break;case"!":if("--"===t.substring(a+1,a+3)){if((o=t.indexOf("--\x3e",a+3))<0){this.onError(u);return}this.onComment(t.substring(a+3,o));a=o+3}else if("[CDATA["===t.substring(a+1,a+8)){if((o=t.indexOf("]]>",a+8))<0){this.onError(i);return}this.onCdata(t.substring(a+8,o));a=o+3}else{if("DOCTYPE"!==t.substring(a+1,a+8)){this.onError(d);return}var m=t.indexOf("[",a+8),v=!1;if((o=t.indexOf(">",a+8))<0){this.onError(c);return}if(m>0&&o>m){if((o=t.indexOf("]>",a+8))<0){this.onError(c);return}v=!0}var g=t.substring(a+8,o+(v?1:0));this.onDoctype(g);a=o+(v?2:1)}break;default:var y=this._parseContent(t,a);if(null===y){this.onError(d);return}var b=!1;if("/>"===t.substring(a+y.parsed,a+y.parsed+2))b=!0;else if(">"!==t.substring(a+y.parsed,a+y.parsed+1)){this.onError(h);return}this.onBeginElement(y.name,y.attributes,b);a+=y.parsed+(b?2:1)}}else{for(;a<t.length&&"<"!==t[a];)a++;var _=t.substring(r,a);this.onText(this._resolveEntities(_))}r=a}}},{key:"onResolveEntity",value:function onResolveEntity(t){return"&".concat(t,";")}},{key:"onPi",value:function onPi(t,r){}},{key:"onComment",value:function onComment(t){}},{key:"onCdata",value:function onCdata(t){}},{key:"onDoctype",value:function onDoctype(t){}},{key:"onText",value:function onText(t){}},{key:"onBeginElement",value:function onBeginElement(t,r,a){}},{key:"onEndElement",value:function onEndElement(t){}},{key:"onError",value:function onError(t){}}]);return XMLParserBase}(),m=function(){function SimpleDOMNode(t,r){_classCallCheck(this,SimpleDOMNode);this.nodeName=t;this.nodeValue=r;Object.defineProperty(this,"parentNode",{value:null,writable:!0})}_createClass(SimpleDOMNode,[{key:"hasChildNodes",value:function hasChildNodes(){return this.childNodes&&this.childNodes.length>0}},{key:"firstChild",get:function get(){return this.childNodes&&this.childNodes[0]}},{key:"nextSibling",get:function get(){var t=this.parentNode.childNodes;if(t){var r=t.indexOf(this);if(-1!==r)return t[r+1]}}},{key:"textContent",get:function get(){return this.childNodes?this.childNodes.map((function(t){return t.textContent})).join(""):this.nodeValue||""}}]);return SimpleDOMNode}(),v=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}});r&&_setPrototypeOf(t,r)}(SimpleXMLParser,t);var r=_createSuper(SimpleXMLParser);function SimpleXMLParser(){var t;_classCallCheck(this,SimpleXMLParser);(t=r.call(this))._currentFragment=null;t._stack=null;t._errorCode=o;return t}_createClass(SimpleXMLParser,[{key:"parseFromString",value:function parseFromString(t){this._currentFragment=[];this._stack=[];this._errorCode=o;this.parseXml(t);if(this._errorCode===o){var r=_slicedToArray(this._currentFragment,1)[0];if(r)return{documentElement:r}}}},{key:"onResolveEntity",value:function onResolveEntity(t){switch(t){case"apos":return"'"}return _get(_getPrototypeOf(SimpleXMLParser.prototype),"onResolveEntity",this).call(this,t)}},{key:"onText",value:function onText(t){if(!function isWhitespaceString(t){for(var r=0,a=t.length;r<a;r++)if(!isWhitespace(t,r))return!1;return!0}(t)){var r=new m("#text",t);this._currentFragment.push(r)}}},{key:"onCdata",value:function onCdata(t){var r=new m("#text",t);this._currentFragment.push(r)}},{key:"onBeginElement",value:function onBeginElement(t,r,a){var o=new m(t);o.childNodes=[];this._currentFragment.push(o);if(!a){this._stack.push(this._currentFragment);this._currentFragment=o.childNodes}}},{key:"onEndElement",value:function onEndElement(t){this._currentFragment=this._stack.pop()||[];var r=this._currentFragment[this._currentFragment.length-1];if(r)for(var a=0,o=r.childNodes.length;a<o;a++)r.childNodes[a].parentNode=r}},{key:"onError",value:function onError(t){this._errorCode=t}}]);return SimpleXMLParser}(p);r.SimpleXMLParser=v},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.OptionalContentConfig=void 0;var o=a(5);function _createForOfIteratorHelper(t,r){var a;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){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 o=0,i=function F(){};return{s:i,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:i}}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=t[Symbol.iterator]()},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,o=new Array(r);a<r;a++)o[a]=t[a];return o}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var o=r[a];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}var i=function OptionalContentGroup(t,r){_classCallCheck(this,OptionalContentGroup);this.visible=!0;this.name=t;this.intent=r},l=function(){function OptionalContentConfig(t){_classCallCheck(this,OptionalContentConfig);this.name=null;this.creator=null;this._order=null;this._groups=new Map;if(null!==t){this.name=t.name;this.creator=t.creator;this._order=t.order;var r,a=_createForOfIteratorHelper(t.groups);try{for(a.s();!(r=a.n()).done;){var o=r.value;this._groups.set(o.id,new i(o.name,o.intent))}}catch(t){a.e(t)}finally{a.f()}if("OFF"===t.baseState){var l,c=_createForOfIteratorHelper(this._groups);try{for(c.s();!(l=c.n()).done;){l.value.visible=!1}}catch(t){c.e(t)}finally{c.f()}}var u,d=_createForOfIteratorHelper(t.on);try{for(d.s();!(u=d.n()).done;){var h=u.value;this._groups.get(h).visible=!0}}catch(t){d.e(t)}finally{d.f()}var p,m=_createForOfIteratorHelper(t.off);try{for(m.s();!(p=m.n()).done;){var v=p.value;this._groups.get(v).visible=!1}}catch(t){m.e(t)}finally{m.f()}}}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);return t}(OptionalContentConfig,[{key:"isVisible",value:function isVisible(t){if("OCG"===t.type){if(!this._groups.has(t.id)){(0,o.warn)("Optional content group not found: ".concat(t.id));return!0}return this._groups.get(t.id).visible}if("OCMD"===t.type){t.expression&&(0,o.warn)("Visibility expression not supported yet.");if(!t.policy||"AnyOn"===t.policy){var r,a=_createForOfIteratorHelper(t.ids);try{for(a.s();!(r=a.n()).done;){var i=r.value;if(!this._groups.has(i)){(0,o.warn)("Optional content group not found: ".concat(i));return!0}if(this._groups.get(i).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(!this._groups.has(u)){(0,o.warn)("Optional content group not found: ".concat(u));return!0}if(!this._groups.get(u).visible)return!1}}catch(t){c.e(t)}finally{c.f()}return!0}if("AnyOff"===t.policy){var d,h=_createForOfIteratorHelper(t.ids);try{for(h.s();!(d=h.n()).done;){var p=d.value;if(!this._groups.has(p)){(0,o.warn)("Optional content group not found: ".concat(p));return!0}if(!this._groups.get(p).visible)return!0}}catch(t){h.e(t)}finally{h.f()}return!1}if("AllOff"===t.policy){var m,v=_createForOfIteratorHelper(t.ids);try{for(v.s();!(m=v.n()).done;){var g=m.value;if(!this._groups.has(g)){(0,o.warn)("Optional content group not found: ".concat(g));return!0}if(this._groups.get(g).visible)return!1}}catch(t){v.e(t)}finally{v.f()}return!0}(0,o.warn)("Unknown optional content policy ".concat(t.policy,"."));return!0}(0,o.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];this._groups.has(t)?this._groups.get(t).visible=!!r:(0,o.warn)("Optional content group not found: ".concat(t))}},{key:"getOrder",value:function getOrder(){return this._groups.size?this._order?this._order.slice():Array.from(this._groups.keys()):null}},{key:"getGroups",value:function getGroups(){return this._groups.size?Object.fromEntries(this._groups):null}},{key:"getGroup",value:function getGroup(t){return this._groups.get(t)||null}}]);return OptionalContentConfig}();r.OptionalContentConfig=l},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.PDFDataTransportStream=void 0;var o=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(2)),i=a(5);function asyncGeneratorStep(t,r,a,o,i,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(o,i)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(o,i){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,o,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,o,i,_next,_throw,"throw",t)}_next(void 0)}))}}function _createForOfIteratorHelper(t,r){var a;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){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 o=0,i=function F(){};return{s:i,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:i}}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=t[Symbol.iterator]()},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,o=new Array(r);a<r;a++)o[a]=t[a];return o}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 o=r[a];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);return t}var l=function(){function PDFDataTransportStream(t,r){var a=this;_classCallCheck(this,PDFDataTransportStream);(0,i.assert)(r,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');this._queuedChunks=[];this._progressiveDone=t.progressiveDone||!1;var o=t.initialData;if(o&&o.length>0){var l=new Uint8Array(o).buffer;this._queuedChunks.push(l)}this._pdfDataRangeTransport=r;this._isStreamingSupported=!t.disableStream;this._isRangeSupported=!t.disableRange;this._contentLength=t.length;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=new Uint8Array(t.chunk).buffer;if(void 0===t.begin)this._fullRequestReader?this._fullRequestReader._enqueue(r):this._queuedChunks.push(r);else{var a=this._rangeReaders.some((function(a){if(a._begin!==t.begin)return!1;a._enqueue(r);return!0}));(0,i.assert)(a,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}},{key:"_onProgress",value:function _onProgress(t){if(void 0===t.total){var r=this._rangeReaders[0];r&&r.onProgress&&r.onProgress({loaded:t.loaded})}else{var a=this._fullRequestReader;a&&a.onProgress&&a.onProgress({loaded:t.loaded,total:t.total})}}},{key:"_onProgressiveDone",value:function _onProgressiveDone(){this._fullRequestReader&&this._fullRequestReader.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)}},{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){this._fullRequestReader&&this._fullRequestReader.cancel(t);this._rangeReaders.slice(0).forEach((function(r){r.cancel(t)}));this._pdfDataRangeTransport.abort()}},{key:"_progressiveDataLength",get:function get(){return this._fullRequestReader?this._fullRequestReader._loaded:0}}]);return PDFDataTransportStream}();r.PDFDataTransportStream=l;var c=function(){function PDFDataTransportStreamReader(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];_classCallCheck(this,PDFDataTransportStreamReader);this._stream=t;this._done=a||!1;this._filename=null;this._queuedChunks=r||[];this._loaded=0;var o,i=_createForOfIteratorHelper(this._queuedChunks);try{for(i.s();!(o=i.n()).done;){var l=o.value;this._loaded+=l.byteLength}}catch(t){i.e(t)}finally{i.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:"read",value:(t=_asyncToGenerator(o.default.mark((function _callee(){var t,r;return o.default.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=(0,i.createPromiseCapability)();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;this._requests.forEach((function(t){t.resolve({value:void 0,done:!0})}));this._requests=[]}},{key:"progressiveDone",value:function progressiveDone(){this._done||(this._done=!0)}},{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}}]);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});this._requests.forEach((function(t){t.resolve({value:void 0,done:!0})}));this._requests=[]}this._done=!0;this._stream._removeRangeReader(this)}}},{key:"read",value:(t=_asyncToGenerator(o.default.mark((function _callee2(){var t,r;return o.default.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=(0,i.createPromiseCapability)();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;this._requests.forEach((function(t){t.resolve({value:void 0,done:!0})}));this._requests=[];this._stream._removeRangeReader(this)}},{key:"isStreamingSupported",get:function get(){return!1}}]);var t;return PDFDataTransportStreamRangeReader}()},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.WebGLContext=void 0;var o=a(5);function _defineProperties(t,r){for(var a=0;a<r.length;a++){var o=r[a];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}var i=function(){function WebGLContext(t){var r=t.enable,a=void 0!==r&&r;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,WebGLContext);this._enabled=!0===a}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);return t}(WebGLContext,[{key:"composeSMask",value:function composeSMask(t){var r=t.layer,a=t.mask,o=t.properties;return l.composeSMask(r,a,o)}},{key:"drawFigures",value:function drawFigures(t){var r=t.width,a=t.height,o=t.backgroundColor,i=t.figures,c=t.context;return l.drawFigures(r,a,o,i,c)}},{key:"clear",value:function clear(){l.cleanup()}},{key:"isEnabled",get:function get(){var t=this._enabled;t&&(t=l.tryInitGL());return(0,o.shadow)(this,"isEnabled",t)}}]);return WebGLContext}();r.WebGLContext=i;var l=function WebGLUtilsClosure(){function loadShader(t,r,a){var o=t.createShader(a);t.shaderSource(o,r);t.compileShader(o);if(!t.getShaderParameter(o,t.COMPILE_STATUS)){var i=t.getShaderInfoLog(o);throw new Error("Error during shader compilation: "+i)}return o}function createVertexShader(t,r){return loadShader(t,r,t.VERTEX_SHADER)}function createFragmentShader(t,r){return loadShader(t,r,t.FRAGMENT_SHADER)}function createProgram(t,r){for(var a=t.createProgram(),o=0,i=r.length;o<i;++o)t.attachShader(a,r[o]);t.linkProgram(a);if(!t.getProgramParameter(a,t.LINK_STATUS)){var l=t.getProgramInfoLog(a);throw new Error("Error during program linking: "+l)}return a}function createTexture(t,r,a){t.activeTexture(a);var o=t.createTexture();t.bindTexture(t.TEXTURE_2D,o);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST);t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,r);return o}var t,r;function generateGL(){if(!t){r=document.createElement("canvas");t=r.getContext("webgl",{premultipliedalpha:!1})}}var a=null;var o=null;return{tryInitGL:function tryInitGL(){try{generateGL();return!!t}catch(t){}return!1},composeSMask:function composeSMask(o,i,l){var c=o.width,u=o.height;a||function initSmaskGL(){var o,i;generateGL();o=r;r=null;i=t;t=null;var l=createProgram(i,[createVertexShader(i,"  attribute vec2 a_position;                                      attribute vec2 a_texCoord;                                                                                                      uniform vec2 u_resolution;                                                                                                      varying vec2 v_texCoord;                                                                                                        void main() {                                                     vec2 clipSpace = (a_position / u_resolution) * 2.0 - 1.0;       gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1);                                                                              v_texCoord = a_texCoord;                                      }                                                             "),createFragmentShader(i,"  precision mediump float;                                                                                                        uniform vec4 u_backdrop;                                        uniform int u_subtype;                                          uniform sampler2D u_image;                                      uniform sampler2D u_mask;                                                                                                       varying vec2 v_texCoord;                                                                                                        void main() {                                                     vec4 imageColor = texture2D(u_image, v_texCoord);               vec4 maskColor = texture2D(u_mask, v_texCoord);                 if (u_backdrop.a > 0.0) {                                         maskColor.rgb = maskColor.rgb * maskColor.a +                                   u_backdrop.rgb * (1.0 - maskColor.a);         }                                                               float lum;                                                      if (u_subtype == 0) {                                             lum = maskColor.a;                                            } else {                                                          lum = maskColor.r * 0.3 + maskColor.g * 0.59 +                        maskColor.b * 0.11;                                     }                                                               imageColor.a *= lum;                                            imageColor.rgb *= imageColor.a;                                 gl_FragColor = imageColor;                                    }                                                             ")]);i.useProgram(l);var c={};c.gl=i;c.canvas=o;c.resolutionLocation=i.getUniformLocation(l,"u_resolution");c.positionLocation=i.getAttribLocation(l,"a_position");c.backdropLocation=i.getUniformLocation(l,"u_backdrop");c.subtypeLocation=i.getUniformLocation(l,"u_subtype");var u=i.getAttribLocation(l,"a_texCoord"),d=i.getUniformLocation(l,"u_image"),h=i.getUniformLocation(l,"u_mask"),p=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,p);i.bufferData(i.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),i.STATIC_DRAW);i.enableVertexAttribArray(u);i.vertexAttribPointer(u,2,i.FLOAT,!1,0,0);i.uniform1i(d,0);i.uniform1i(h,1);a=c}();var d=a,h=d.canvas,p=d.gl;h.width=c;h.height=u;p.viewport(0,0,p.drawingBufferWidth,p.drawingBufferHeight);p.uniform2f(d.resolutionLocation,c,u);l.backdrop?p.uniform4f(d.resolutionLocation,l.backdrop[0],l.backdrop[1],l.backdrop[2],1):p.uniform4f(d.resolutionLocation,0,0,0,0);p.uniform1i(d.subtypeLocation,"Luminosity"===l.subtype?1:0);var m=createTexture(p,o,p.TEXTURE0),v=createTexture(p,i,p.TEXTURE1),g=p.createBuffer();p.bindBuffer(p.ARRAY_BUFFER,g);p.bufferData(p.ARRAY_BUFFER,new Float32Array([0,0,c,0,0,u,0,u,c,0,c,u]),p.STATIC_DRAW);p.enableVertexAttribArray(d.positionLocation);p.vertexAttribPointer(d.positionLocation,2,p.FLOAT,!1,0,0);p.clearColor(0,0,0,0);p.enable(p.BLEND);p.blendFunc(p.ONE,p.ONE_MINUS_SRC_ALPHA);p.clear(p.COLOR_BUFFER_BIT);p.drawArrays(p.TRIANGLES,0,6);p.flush();p.deleteTexture(m);p.deleteTexture(v);p.deleteBuffer(g);return h},drawFigures:function drawFigures(a,i,l,c,u){o||function initFiguresGL(){var a,i;generateGL();a=r;r=null;i=t;t=null;var l=createProgram(i,[createVertexShader(i,"  attribute vec2 a_position;                                      attribute vec3 a_color;                                                                                                         uniform vec2 u_resolution;                                      uniform vec2 u_scale;                                           uniform vec2 u_offset;                                                                                                          varying vec4 v_color;                                                                                                           void main() {                                                     vec2 position = (a_position + u_offset) * u_scale;              vec2 clipSpace = (position / u_resolution) * 2.0 - 1.0;         gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1);                                                                              v_color = vec4(a_color / 255.0, 1.0);                         }                                                             "),createFragmentShader(i,"  precision mediump float;                                                                                                        varying vec4 v_color;                                                                                                           void main() {                                                     gl_FragColor = v_color;                                       }                                                             ")]);i.useProgram(l);var c={};c.gl=i;c.canvas=a;c.resolutionLocation=i.getUniformLocation(l,"u_resolution");c.scaleLocation=i.getUniformLocation(l,"u_scale");c.offsetLocation=i.getUniformLocation(l,"u_offset");c.positionLocation=i.getAttribLocation(l,"a_position");c.colorLocation=i.getAttribLocation(l,"a_color");o=c}();var d=o,h=d.canvas,p=d.gl;h.width=a;h.height=i;p.viewport(0,0,p.drawingBufferWidth,p.drawingBufferHeight);p.uniform2f(d.resolutionLocation,a,i);var m,v,g,y=0;for(m=0,v=c.length;m<v;m++)switch(c[m].type){case"lattice":y+=((g=c[m].coords.length/c[m].verticesPerRow|0)-1)*(c[m].verticesPerRow-1)*6;break;case"triangles":y+=c[m].coords.length}var b=new Float32Array(2*y),_=new Uint8Array(3*y),S=u.coords,C=u.colors,A=0,R=0;for(m=0,v=c.length;m<v;m++){var k=c[m],w=k.coords,P=k.colors;switch(k.type){case"lattice":var x=k.verticesPerRow;g=w.length/x|0;for(var T=1;T<g;T++)for(var E=T*x+1,O=1;O<x;O++,E++){b[A]=S[w[E-x-1]];b[A+1]=S[w[E-x-1]+1];b[A+2]=S[w[E-x]];b[A+3]=S[w[E-x]+1];b[A+4]=S[w[E-1]];b[A+5]=S[w[E-1]+1];_[R]=C[P[E-x-1]];_[R+1]=C[P[E-x-1]+1];_[R+2]=C[P[E-x-1]+2];_[R+3]=C[P[E-x]];_[R+4]=C[P[E-x]+1];_[R+5]=C[P[E-x]+2];_[R+6]=C[P[E-1]];_[R+7]=C[P[E-1]+1];_[R+8]=C[P[E-1]+2];b[A+6]=b[A+2];b[A+7]=b[A+3];b[A+8]=b[A+4];b[A+9]=b[A+5];b[A+10]=S[w[E]];b[A+11]=S[w[E]+1];_[R+9]=_[R+3];_[R+10]=_[R+4];_[R+11]=_[R+5];_[R+12]=_[R+6];_[R+13]=_[R+7];_[R+14]=_[R+8];_[R+15]=C[P[E]];_[R+16]=C[P[E]+1];_[R+17]=C[P[E]+2];A+=12;R+=18}break;case"triangles":for(var I=0,D=w.length;I<D;I++){b[A]=S[w[I]];b[A+1]=S[w[I]+1];_[R]=C[P[I]];_[R+1]=C[P[I]+1];_[R+2]=C[P[I]+2];A+=2;R+=3}}}l?p.clearColor(l[0]/255,l[1]/255,l[2]/255,1):p.clearColor(0,0,0,0);p.clear(p.COLOR_BUFFER_BIT);var L=p.createBuffer();p.bindBuffer(p.ARRAY_BUFFER,L);p.bufferData(p.ARRAY_BUFFER,b,p.STATIC_DRAW);p.enableVertexAttribArray(d.positionLocation);p.vertexAttribPointer(d.positionLocation,2,p.FLOAT,!1,0,0);var M=p.createBuffer();p.bindBuffer(p.ARRAY_BUFFER,M);p.bufferData(p.ARRAY_BUFFER,_,p.STATIC_DRAW);p.enableVertexAttribArray(d.colorLocation);p.vertexAttribPointer(d.colorLocation,3,p.UNSIGNED_BYTE,!1,0,0);p.uniform2f(d.scaleLocation,u.scaleX,u.scaleY);p.uniform2f(d.offsetLocation,u.offsetX,u.offsetY);p.drawArrays(p.TRIANGLES,0,y);p.flush();p.deleteBuffer(L);p.deleteBuffer(M);return h},cleanup:function cleanup(){if(a&&a.canvas){a.canvas.width=0;a.canvas.height=0}if(o&&o.canvas){o.canvas.width=0;o.canvas.height=0}a=null;o=null}}}()},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.AnnotationLayer=void 0;var o=a(1),i=a(5),l=a(205);function _get(t,r,a){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function _get(t,r,a){var o=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=_getPrototypeOf(t)););return t}(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(a):i.value}})(t,r,a||t)}function _createForOfIteratorHelper(t,r){var a;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){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 o=0,i=function F(){};return{s:i,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:i}}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=t[Symbol.iterator]()},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,o=new Array(r);a<r;a++)o[a]=t[a];return o}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(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}});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t})(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{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,o=_getPrototypeOf(t);if(r){var i=_getPrototypeOf(this).constructor;a=Reflect.construct(o,arguments,i)}else a=o.apply(this,arguments);return _possibleConstructorReturn(this,a)}}function _possibleConstructorReturn(t,r){return!r||"object"!==_typeof(r)&&"function"!=typeof r?_assertThisInitialized(t):r}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){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)})(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 o=r[a];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);return t}var c=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 d(t);case i.AnnotationType.TEXT:return new h(t);case i.AnnotationType.WIDGET:switch(t.data.fieldType){case"Tx":return new m(t);case"Btn":return t.data.radioButton?new g(t):t.data.checkBox?new v(t):new y(t);case"Ch":return new b(t)}return new p(t);case i.AnnotationType.POPUP:return new _(t);case i.AnnotationType.FREETEXT:return new C(t);case i.AnnotationType.LINE:return new A(t);case i.AnnotationType.SQUARE:return new R(t);case i.AnnotationType.CIRCLE:return new k(t);case i.AnnotationType.POLYLINE:return new w(t);case i.AnnotationType.CARET:return new x(t);case i.AnnotationType.INK:return new T(t);case i.AnnotationType.POLYGON:return new P(t);case i.AnnotationType.HIGHLIGHT:return new E(t);case i.AnnotationType.UNDERLINE:return new O(t);case i.AnnotationType.SQUIGGLY:return new I(t);case i.AnnotationType.STRIKEOUT:return new D(t);case i.AnnotationType.STAMP:return new L(t);case i.AnnotationType.FILEATTACHMENT:return new M(t);default:return new u(t)}}}]);return AnnotationElementFactory}(),u=function(){function AnnotationElement(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];_classCallCheck(this,AnnotationElement);this.isRenderable=r;this.data=t.data;this.layer=t.layer;this.page=t.page;this.viewport=t.viewport;this.linkService=t.linkService;this.downloadManager=t.downloadManager;this.imageResourcesPath=t.imageResourcesPath;this.renderInteractiveForms=t.renderInteractiveForms;this.svgFactory=t.svgFactory;this.annotationStorage=t.annotationStorage;r&&(this.container=this._createContainer(a))}_createClass(AnnotationElement,[{key:"_createContainer",value:function _createContainer(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=this.data,a=this.page,o=this.viewport,l=document.createElement("section"),c=r.rect[2]-r.rect[0],u=r.rect[3]-r.rect[1];l.setAttribute("data-annotation-id",r.id);var d=i.Util.normalizeRect([r.rect[0],a.view[3]-r.rect[1]+a.view[1],r.rect[2],a.view[3]-r.rect[3]+a.view[1]]);l.style.transform="matrix(".concat(o.transform.join(","),")");l.style.transformOrigin="-".concat(d[0],"px -").concat(d[1],"px");if(!t&&r.borderStyle.width>0){l.style.borderWidth="".concat(r.borderStyle.width,"px");if(r.borderStyle.style!==i.AnnotationBorderStyleType.UNDERLINE){c-=2*r.borderStyle.width;u-=2*r.borderStyle.width}var h=r.borderStyle.horizontalCornerRadius,p=r.borderStyle.verticalCornerRadius;if(h>0||p>0){var m="".concat(h,"px / ").concat(p,"px");l.style.borderRadius=m}switch(r.borderStyle.style){case i.AnnotationBorderStyleType.SOLID:l.style.borderStyle="solid";break;case i.AnnotationBorderStyleType.DASHED:l.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:l.style.borderBottomStyle="solid"}r.color?l.style.borderColor=i.Util.makeCssRgb(0|r.color[0],0|r.color[1],0|r.color[2]):l.style.borderWidth=0}l.style.left="".concat(d[0],"px");l.style.top="".concat(d[1],"px");l.style.width="".concat(c,"px");l.style.height="".concat(u,"px");return l}},{key:"_createPopup",value:function _createPopup(t,r,a){if(!r){(r=document.createElement("div")).style.height=t.style.height;r.style.width=t.style.width;t.appendChild(r)}var o=new S({container:t,trigger:r,color:a.color,title:a.title,modificationDate:a.modificationDate,contents:a.contents,hideWrapper:!0}).render();o.style.left=t.style.width;t.appendChild(o)}},{key:"render",value:function render(){(0,i.unreachable)("Abstract method `AnnotationElement.render` called")}}]);return AnnotationElement}(),d=function(t){_inherits(LinkAnnotationElement,t);var r=_createSuper(LinkAnnotationElement);function LinkAnnotationElement(t){_classCallCheck(this,LinkAnnotationElement);var a=!!(t.data.url||t.data.dest||t.data.action);return r.call(this,t,a)}_createClass(LinkAnnotationElement,[{key:"render",value:function render(){this.container.className="linkAnnotation";var t=this.data,r=this.linkService,a=document.createElement("a");t.url?(0,o.addLinkAttributes)(a,{url:t.url,target:t.newWindow?o.LinkTarget.BLANK:r.externalLinkTarget,rel:r.externalLinkRel,enabled:r.externalLinkEnabled}):t.action?this._bindNamedAction(a,t.action):this._bindLink(a,t.dest);this.container.appendChild(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.navigateTo(r);return!1};r&&(t.className="internalLink")}},{key:"_bindNamedAction",value:function _bindNamedAction(t,r){var a=this;t.href=this.linkService.getAnchorUrl("");t.onclick=function(){a.linkService.executeNamedAction(r);return!1};t.className="internalLink"}}]);return LinkAnnotationElement}(u),h=function(t){_inherits(TextAnnotationElement,t);var r=_createSuper(TextAnnotationElement);function TextAnnotationElement(t){_classCallCheck(this,TextAnnotationElement);var a=!!(t.data.hasPopup||t.data.title||t.data.contents);return r.call(this,t,a)}_createClass(TextAnnotationElement,[{key:"render",value:function render(){this.container.className="textAnnotation";var t=document.createElement("img");t.style.height=this.container.style.height;t.style.width=this.container.style.width;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.hasPopup||this._createPopup(this.container,t,this.data);this.container.appendChild(t);return this.container}}]);return TextAnnotationElement}(u),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(){return this.container}}]);return WidgetAnnotationElement}(u),m=function(t){_inherits(TextWidgetAnnotationElement,t);var r=_createSuper(TextWidgetAnnotationElement);function TextWidgetAnnotationElement(t){_classCallCheck(this,TextWidgetAnnotationElement);var a=t.renderInteractiveForms||!t.data.hasAppearance&&!!t.data.fieldValue;return r.call(this,t,a)}_createClass(TextWidgetAnnotationElement,[{key:"render",value:function render(){var t=this.annotationStorage,r=this.data.id;this.container.className="textWidgetAnnotation";var a=null;if(this.renderInteractiveForms){var o=t.getOrCreateValue(r,this.data.fieldValue);if(this.data.multiLine)(a=document.createElement("textarea")).textContent=o;else{(a=document.createElement("input")).type="text";a.setAttribute("value",o)}a.addEventListener("input",(function(a){t.setValue(r,a.target.value)}));a.disabled=this.data.readOnly;a.name=this.data.fieldName;null!==this.data.maxLen&&(a.maxLength=this.data.maxLen);if(this.data.comb){var i=(this.data.rect[2]-this.data.rect[0])/this.data.maxLen;a.classList.add("comb");a.style.letterSpacing="calc(".concat(i,"px - 1ch)")}}else{(a=document.createElement("div")).textContent=this.data.fieldValue;a.style.verticalAlign="middle";a.style.display="table-cell";var l=null;this.data.fontRefName&&this.page.commonObjs.has(this.data.fontRefName)&&(l=this.page.commonObjs.get(this.data.fontRefName));this._setTextStyle(a,l)}null!==this.data.textAlignment&&(a.style.textAlign=["left","center","right"][this.data.textAlignment]);this.container.appendChild(a);return this.container}},{key:"_setTextStyle",value:function _setTextStyle(t,r){var a=t.style;a.fontSize="".concat(this.data.fontSize,"px");a.direction=this.data.fontDirection<0?"rtl":"ltr";if(r){var o="normal";r.black?o="900":r.bold&&(o="bold");a.fontWeight=o;a.fontStyle=r.italic?"italic":"normal";var i=r.loadedName?'"'.concat(r.loadedName,'", '):"",l=r.fallbackName||"Helvetica, sans-serif";a.fontFamily=i+l}}}]);return TextWidgetAnnotationElement}(p),v=function(t){_inherits(CheckboxWidgetAnnotationElement,t);var r=_createSuper(CheckboxWidgetAnnotationElement);function CheckboxWidgetAnnotationElement(t){_classCallCheck(this,CheckboxWidgetAnnotationElement);return r.call(this,t,t.renderInteractiveForms)}_createClass(CheckboxWidgetAnnotationElement,[{key:"render",value:function render(){var t=this.annotationStorage,r=this.data,a=r.id,o=t.getOrCreateValue(a,r.fieldValue&&"Off"!==r.fieldValue);this.container.className="buttonWidgetAnnotation checkBox";var i=document.createElement("input");i.disabled=r.readOnly;i.type="checkbox";i.name=this.data.fieldName;o&&i.setAttribute("checked",!0);i.addEventListener("change",(function(r){t.setValue(a,r.target.checked)}));this.container.appendChild(i);return this.container}}]);return CheckboxWidgetAnnotationElement}(p),g=function(t){_inherits(RadioButtonWidgetAnnotationElement,t);var r=_createSuper(RadioButtonWidgetAnnotationElement);function RadioButtonWidgetAnnotationElement(t){_classCallCheck(this,RadioButtonWidgetAnnotationElement);return r.call(this,t,t.renderInteractiveForms)}_createClass(RadioButtonWidgetAnnotationElement,[{key:"render",value:function render(){this.container.className="buttonWidgetAnnotation radioButton";var t=this.annotationStorage,r=this.data,a=r.id,o=t.getOrCreateValue(a,r.fieldValue===r.buttonValue),i=document.createElement("input");i.disabled=r.readOnly;i.type="radio";i.name=r.fieldName;o&&i.setAttribute("checked",!0);i.addEventListener("change",(function(r){var o,i=r.target.name,l=_createForOfIteratorHelper(document.getElementsByName(i));try{for(l.s();!(o=l.n()).done;){var c=o.value;c!==r.target&&t.setValue(c.parentNode.getAttribute("data-annotation-id"),!1)}}catch(t){l.e(t)}finally{l.f()}t.setValue(a,r.target.checked)}));this.container.appendChild(i);return this.container}}]);return RadioButtonWidgetAnnotationElement}(p),y=function(t){_inherits(PushButtonWidgetAnnotationElement,t);var r=_createSuper(PushButtonWidgetAnnotationElement);function PushButtonWidgetAnnotationElement(){_classCallCheck(this,PushButtonWidgetAnnotationElement);return r.apply(this,arguments)}_createClass(PushButtonWidgetAnnotationElement,[{key:"render",value:function render(){var t=_get(_getPrototypeOf(PushButtonWidgetAnnotationElement.prototype),"render",this).call(this);t.className="buttonWidgetAnnotation pushButton";return t}}]);return PushButtonWidgetAnnotationElement}(d),b=function(t){_inherits(ChoiceWidgetAnnotationElement,t);var r=_createSuper(ChoiceWidgetAnnotationElement);function ChoiceWidgetAnnotationElement(t){_classCallCheck(this,ChoiceWidgetAnnotationElement);return r.call(this,t,t.renderInteractiveForms)}_createClass(ChoiceWidgetAnnotationElement,[{key:"render",value:function render(){this.container.className="choiceWidgetAnnotation";var t=this.annotationStorage,r=this.data.id;t.getOrCreateValue(r,this.data.fieldValue.length>0?this.data.fieldValue[0]:null);var a=document.createElement("select");a.disabled=this.data.readOnly;a.name=this.data.fieldName;if(!this.data.combo){a.size=this.data.options.length;this.data.multiSelect&&(a.multiple=!0)}var o,i=_createForOfIteratorHelper(this.data.options);try{for(i.s();!(o=i.n()).done;){var l=o.value,c=document.createElement("option");c.textContent=l.displayValue;c.value=l.exportValue;this.data.fieldValue.includes(l.exportValue)&&c.setAttribute("selected",!0);a.appendChild(c)}}catch(t){i.e(t)}finally{i.f()}a.addEventListener("input",(function(a){var o=a.target.options,i=o[o.selectedIndex].value;t.setValue(r,i)}));this.container.appendChild(a);return this.container}}]);return ChoiceWidgetAnnotationElement}(p),_=function(t){_inherits(PopupAnnotationElement,t);var r=_createSuper(PopupAnnotationElement);function PopupAnnotationElement(t){_classCallCheck(this,PopupAnnotationElement);var a=!(!t.data.title&&!t.data.contents);return r.call(this,t,a)}_createClass(PopupAnnotationElement,[{key:"render",value:function render(){this.container.className="popupAnnotation";if(["Line","Square","Circle","PolyLine","Polygon","Ink"].includes(this.data.parentType))return this.container;var t='[data-annotation-id="'.concat(this.data.parentId,'"]'),r=this.layer.querySelector(t);if(!r)return this.container;var a=new S({container:this.container,trigger:r,color:this.data.color,title:this.data.title,modificationDate:this.data.modificationDate,contents:this.data.contents}),o=parseFloat(r.style.left),i=parseFloat(r.style.width);this.container.style.transformOrigin="-".concat(o+i,"px -").concat(r.style.top);this.container.style.left="".concat(o+i,"px");this.container.appendChild(a.render());return this.container}}]);return PopupAnnotationElement}(u),S=function(){function PopupElement(t){_classCallCheck(this,PopupElement);this.container=t.container;this.trigger=t.trigger;this.color=t.color;this.title=t.title;this.modificationDate=t.modificationDate;this.contents=t.contents;this.hideWrapper=t.hideWrapper||!1;this.pinned=!1}_createClass(PopupElement,[{key:"render",value:function render(){var t=document.createElement("div");t.className="popupWrapper";this.hideElement=this.hideWrapper?t:this.container;this.hideElement.setAttribute("hidden",!0);var r=document.createElement("div");r.className="popup";var a=this.color;if(a){var l=.7*(255-a[0])+a[0],c=.7*(255-a[1])+a[1],u=.7*(255-a[2])+a[2];r.style.backgroundColor=i.Util.makeCssRgb(0|l,0|c,0|u)}var d=document.createElement("h1");d.textContent=this.title;r.appendChild(d);var h=o.PDFDateString.toDateObject(this.modificationDate);if(h){var p=document.createElement("span");p.textContent="{{date}}, {{time}}";p.dataset.l10nId="annotation_date_string";p.dataset.l10nArgs=JSON.stringify({date:h.toLocaleDateString(),time:h.toLocaleTimeString()});r.appendChild(p)}var m=this._formatContents(this.contents);r.appendChild(m);this.trigger.addEventListener("click",this._toggle.bind(this));this.trigger.addEventListener("mouseover",this._show.bind(this,!1));this.trigger.addEventListener("mouseout",this._hide.bind(this,!1));r.addEventListener("click",this._hide.bind(this,!0));t.appendChild(r);return t}},{key:"_formatContents",value:function _formatContents(t){for(var r=document.createElement("p"),a=t.split(/(?:\r\n?|\n)/),o=0,i=a.length;o<i;++o){var l=a[o];r.appendChild(document.createTextNode(l));o<i-1&&r.appendChild(document.createElement("br"))}return r}},{key:"_toggle",value:function _toggle(){this.pinned?this._hide(!0):this._show(!0)}},{key:"_show",value:function _show(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t&&(this.pinned=!0);if(this.hideElement.hasAttribute("hidden")){this.hideElement.removeAttribute("hidden");this.container.style.zIndex+=1}}},{key:"_hide",value:function _hide(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t&&(this.pinned=!1);if(!this.hideElement.hasAttribute("hidden")&&!this.pinned){this.hideElement.setAttribute("hidden",!0);this.container.style.zIndex-=1}}}]);return PopupElement}(),C=function(t){_inherits(FreeTextAnnotationElement,t);var r=_createSuper(FreeTextAnnotationElement);function FreeTextAnnotationElement(t){_classCallCheck(this,FreeTextAnnotationElement);var a=!!(t.data.hasPopup||t.data.title||t.data.contents);return r.call(this,t,a,!0)}_createClass(FreeTextAnnotationElement,[{key:"render",value:function render(){this.container.className="freeTextAnnotation";this.data.hasPopup||this._createPopup(this.container,null,this.data);return this.container}}]);return FreeTextAnnotationElement}(u),A=function(t){_inherits(LineAnnotationElement,t);var r=_createSuper(LineAnnotationElement);function LineAnnotationElement(t){_classCallCheck(this,LineAnnotationElement);var a=!!(t.data.hasPopup||t.data.title||t.data.contents);return r.call(this,t,a,!0)}_createClass(LineAnnotationElement,[{key:"render",value:function render(){this.container.className="lineAnnotation";var t=this.data,r=t.rect[2]-t.rect[0],a=t.rect[3]-t.rect[1],o=this.svgFactory.create(r,a),i=this.svgFactory.createElement("svg:line");i.setAttribute("x1",t.rect[2]-t.lineCoordinates[0]);i.setAttribute("y1",t.rect[3]-t.lineCoordinates[1]);i.setAttribute("x2",t.rect[2]-t.lineCoordinates[2]);i.setAttribute("y2",t.rect[3]-t.lineCoordinates[3]);i.setAttribute("stroke-width",t.borderStyle.width||1);i.setAttribute("stroke","transparent");o.appendChild(i);this.container.append(o);this._createPopup(this.container,i,t);return this.container}}]);return LineAnnotationElement}(u),R=function(t){_inherits(SquareAnnotationElement,t);var r=_createSuper(SquareAnnotationElement);function SquareAnnotationElement(t){_classCallCheck(this,SquareAnnotationElement);var a=!!(t.data.hasPopup||t.data.title||t.data.contents);return r.call(this,t,a,!0)}_createClass(SquareAnnotationElement,[{key:"render",value:function render(){this.container.className="squareAnnotation";var t=this.data,r=t.rect[2]-t.rect[0],a=t.rect[3]-t.rect[1],o=this.svgFactory.create(r,a),i=t.borderStyle.width,l=this.svgFactory.createElement("svg:rect");l.setAttribute("x",i/2);l.setAttribute("y",i/2);l.setAttribute("width",r-i);l.setAttribute("height",a-i);l.setAttribute("stroke-width",i||1);l.setAttribute("stroke","transparent");l.setAttribute("fill","none");o.appendChild(l);this.container.append(o);this._createPopup(this.container,l,t);return this.container}}]);return SquareAnnotationElement}(u),k=function(t){_inherits(CircleAnnotationElement,t);var r=_createSuper(CircleAnnotationElement);function CircleAnnotationElement(t){_classCallCheck(this,CircleAnnotationElement);var a=!!(t.data.hasPopup||t.data.title||t.data.contents);return r.call(this,t,a,!0)}_createClass(CircleAnnotationElement,[{key:"render",value:function render(){this.container.className="circleAnnotation";var t=this.data,r=t.rect[2]-t.rect[0],a=t.rect[3]-t.rect[1],o=this.svgFactory.create(r,a),i=t.borderStyle.width,l=this.svgFactory.createElement("svg:ellipse");l.setAttribute("cx",r/2);l.setAttribute("cy",a/2);l.setAttribute("rx",r/2-i/2);l.setAttribute("ry",a/2-i/2);l.setAttribute("stroke-width",i||1);l.setAttribute("stroke","transparent");l.setAttribute("fill","none");o.appendChild(l);this.container.append(o);this._createPopup(this.container,l,t);return this.container}}]);return CircleAnnotationElement}(u),w=function(t){_inherits(PolylineAnnotationElement,t);var r=_createSuper(PolylineAnnotationElement);function PolylineAnnotationElement(t){var a;_classCallCheck(this,PolylineAnnotationElement);var o=!!(t.data.hasPopup||t.data.title||t.data.contents);(a=r.call(this,t,o,!0)).containerClassName="polylineAnnotation";a.svgElementName="svg:polyline";return a}_createClass(PolylineAnnotationElement,[{key:"render",value:function render(){this.container.className=this.containerClassName;var t,r=this.data,a=r.rect[2]-r.rect[0],o=r.rect[3]-r.rect[1],i=this.svgFactory.create(a,o),l=[],c=_createForOfIteratorHelper(r.vertices);try{for(c.s();!(t=c.n()).done;){var u=t.value,d=u.x-r.rect[0],h=r.rect[3]-u.y;l.push(d+","+h)}}catch(t){c.e(t)}finally{c.f()}l=l.join(" ");var p=this.svgFactory.createElement(this.svgElementName);p.setAttribute("points",l);p.setAttribute("stroke-width",r.borderStyle.width||1);p.setAttribute("stroke","transparent");p.setAttribute("fill","none");i.appendChild(p);this.container.append(i);this._createPopup(this.container,p,r);return this.container}}]);return PolylineAnnotationElement}(u),P=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 PolygonAnnotationElement}(w),x=function(t){_inherits(CaretAnnotationElement,t);var r=_createSuper(CaretAnnotationElement);function CaretAnnotationElement(t){_classCallCheck(this,CaretAnnotationElement);var a=!!(t.data.hasPopup||t.data.title||t.data.contents);return r.call(this,t,a,!0)}_createClass(CaretAnnotationElement,[{key:"render",value:function render(){this.container.className="caretAnnotation";this.data.hasPopup||this._createPopup(this.container,null,this.data);return this.container}}]);return CaretAnnotationElement}(u),T=function(t){_inherits(InkAnnotationElement,t);var r=_createSuper(InkAnnotationElement);function InkAnnotationElement(t){var a;_classCallCheck(this,InkAnnotationElement);var o=!!(t.data.hasPopup||t.data.title||t.data.contents);(a=r.call(this,t,o,!0)).containerClassName="inkAnnotation";a.svgElementName="svg:polyline";return a}_createClass(InkAnnotationElement,[{key:"render",value:function render(){this.container.className=this.containerClassName;var t,r=this.data,a=r.rect[2]-r.rect[0],o=r.rect[3]-r.rect[1],i=this.svgFactory.create(a,o),l=_createForOfIteratorHelper(r.inkLists);try{for(l.s();!(t=l.n()).done;){var c,u=t.value,d=[],h=_createForOfIteratorHelper(u);try{for(h.s();!(c=h.n()).done;){var p=c.value,m=p.x-r.rect[0],v=r.rect[3]-p.y;d.push("".concat(m,",").concat(v))}}catch(t){h.e(t)}finally{h.f()}d=d.join(" ");var g=this.svgFactory.createElement(this.svgElementName);g.setAttribute("points",d);g.setAttribute("stroke-width",r.borderStyle.width||1);g.setAttribute("stroke","transparent");g.setAttribute("fill","none");this._createPopup(this.container,g,r);i.appendChild(g)}}catch(t){l.e(t)}finally{l.f()}this.container.append(i);return this.container}}]);return InkAnnotationElement}(u),E=function(t){_inherits(HighlightAnnotationElement,t);var r=_createSuper(HighlightAnnotationElement);function HighlightAnnotationElement(t){_classCallCheck(this,HighlightAnnotationElement);var a=!!(t.data.hasPopup||t.data.title||t.data.contents);return r.call(this,t,a,!0)}_createClass(HighlightAnnotationElement,[{key:"render",value:function render(){this.container.className="highlightAnnotation";this.data.hasPopup||this._createPopup(this.container,null,this.data);return this.container}}]);return HighlightAnnotationElement}(u),O=function(t){_inherits(UnderlineAnnotationElement,t);var r=_createSuper(UnderlineAnnotationElement);function UnderlineAnnotationElement(t){_classCallCheck(this,UnderlineAnnotationElement);var a=!!(t.data.hasPopup||t.data.title||t.data.contents);return r.call(this,t,a,!0)}_createClass(UnderlineAnnotationElement,[{key:"render",value:function render(){this.container.className="underlineAnnotation";this.data.hasPopup||this._createPopup(this.container,null,this.data);return this.container}}]);return UnderlineAnnotationElement}(u),I=function(t){_inherits(SquigglyAnnotationElement,t);var r=_createSuper(SquigglyAnnotationElement);function SquigglyAnnotationElement(t){_classCallCheck(this,SquigglyAnnotationElement);var a=!!(t.data.hasPopup||t.data.title||t.data.contents);return r.call(this,t,a,!0)}_createClass(SquigglyAnnotationElement,[{key:"render",value:function render(){this.container.className="squigglyAnnotation";this.data.hasPopup||this._createPopup(this.container,null,this.data);return this.container}}]);return SquigglyAnnotationElement}(u),D=function(t){_inherits(StrikeOutAnnotationElement,t);var r=_createSuper(StrikeOutAnnotationElement);function StrikeOutAnnotationElement(t){_classCallCheck(this,StrikeOutAnnotationElement);var a=!!(t.data.hasPopup||t.data.title||t.data.contents);return r.call(this,t,a,!0)}_createClass(StrikeOutAnnotationElement,[{key:"render",value:function render(){this.container.className="strikeoutAnnotation";this.data.hasPopup||this._createPopup(this.container,null,this.data);return this.container}}]);return StrikeOutAnnotationElement}(u),L=function(t){_inherits(StampAnnotationElement,t);var r=_createSuper(StampAnnotationElement);function StampAnnotationElement(t){_classCallCheck(this,StampAnnotationElement);var a=!!(t.data.hasPopup||t.data.title||t.data.contents);return r.call(this,t,a,!0)}_createClass(StampAnnotationElement,[{key:"render",value:function render(){this.container.className="stampAnnotation";this.data.hasPopup||this._createPopup(this.container,null,this.data);return this.container}}]);return StampAnnotationElement}(u),M=function(t){_inherits(FileAttachmentAnnotationElement,t);var r=_createSuper(FileAttachmentAnnotationElement);function FileAttachmentAnnotationElement(t){var a;_classCallCheck(this,FileAttachmentAnnotationElement);var l=(a=r.call(this,t,!0)).data.file,c=l.filename,u=l.content;a.filename=(0,o.getFilenameFromUrl)(c);a.content=u;a.linkService.eventBus&&a.linkService.eventBus.dispatch("fileattachmentannotation",{source:_assertThisInitialized(a),id:(0,i.stringToPDFString)(c),filename:c,content:u});return a}_createClass(FileAttachmentAnnotationElement,[{key:"render",value:function render(){this.container.className="fileAttachmentAnnotation";var t=document.createElement("div");t.style.height=this.container.style.height;t.style.width=this.container.style.width;t.addEventListener("dblclick",this._download.bind(this));this.data.hasPopup||!this.data.title&&!this.data.contents||this._createPopup(this.container,t,this.data);this.container.appendChild(t);return this.container}},{key:"_download",value:function _download(){this.downloadManager?this.downloadManager.downloadData(this.content,this.filename,""):(0,i.warn)("Download cannot be started due to unavailable download manager")}}]);return FileAttachmentAnnotationElement}(u),W=function(){function AnnotationLayer(){_classCallCheck(this,AnnotationLayer)}_createClass(AnnotationLayer,null,[{key:"render",value:function render(t){var r,a=[],u=[],d=_createForOfIteratorHelper(t.annotations);try{for(d.s();!(r=d.n()).done;){var h=r.value;h&&(h.annotationType!==i.AnnotationType.POPUP?a.push(h):u.push(h))}}catch(t){d.e(t)}finally{d.f()}u.length&&a.push.apply(a,u);for(var p=0,m=a;p<m.length;p++){var v=m[p],g=c.create({data:v,layer:t.div,page:t.page,viewport:t.viewport,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderInteractiveForms:"boolean"!=typeof t.renderInteractiveForms||t.renderInteractiveForms,svgFactory:new o.DOMSVGFactory,annotationStorage:t.annotationStorage||new l.AnnotationStorage});g.isRenderable&&t.div.appendChild(g.render())}}},{key:"update",value:function update(t){var r,a=_createForOfIteratorHelper(t.annotations);try{for(a.s();!(r=a.n()).done;){var o=r.value,i=t.div.querySelector('[data-annotation-id="'.concat(o.id,'"]'));i&&(i.style.transform="matrix(".concat(t.viewport.transform.join(","),")"))}}catch(t){a.e(t)}finally{a.f()}t.div.removeAttribute("hidden")}}]);return AnnotationLayer}();r.AnnotationLayer=W},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.renderTextLayer=void 0;var o=a(5),i=function renderTextLayerClosure(){var t=/\S/;function appendText(r,a,i){var l=document.createElement("span"),c={angle:0,canvasWidth:0,isWhitespace:!1,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1};r._textDivs.push(l);if(function isAllWhitespace(r){return!t.test(r)}(a.str)){c.isWhitespace=!0;r._textDivProperties.set(l,c)}else{var u=o.Util.transform(r._viewport.transform,a.transform),d=Math.atan2(u[1],u[0]),h=i[a.fontName];h.vertical&&(d+=Math.PI/2);var p,m,v=Math.sqrt(u[2]*u[2]+u[3]*u[3]),g=v;h.ascent?g=h.ascent*g:h.descent&&(g=(1+h.descent)*g);if(0===d){p=u[4];m=u[5]-g}else{p=u[4]+g*Math.sin(d);m=u[5]-g*Math.cos(d)}l.style.left="".concat(p,"px");l.style.top="".concat(m,"px");l.style.fontSize="".concat(v,"px");l.style.fontFamily=h.fontFamily;l.textContent=a.str;r._fontInspectorEnabled&&(l.dataset.fontName=a.fontName);0!==d&&(c.angle=d*(180/Math.PI));var y=!1;if(a.str.length>1)y=!0;else if(a.transform[0]!==a.transform[3]){var b=Math.abs(a.transform[0]),_=Math.abs(a.transform[3]);b!==_&&Math.max(b,_)/Math.min(b,_)>1.5&&(y=!0)}y&&(h.vertical?c.canvasWidth=a.height*r._viewport.scale:c.canvasWidth=a.width*r._viewport.scale);r._textDivProperties.set(l,c);r._textContentStream&&r._layoutText(l);if(r._enhanceTextSelection){var S=1,C=0;if(0!==d){S=Math.cos(d);C=Math.sin(d)}var A,R,k=(h.vertical?a.height:a.width)*r._viewport.scale,w=v;if(0!==d){A=[S,C,-C,S,p,m];R=o.Util.getAxialAlignedBoundingBox([0,0,k,w],A)}else R=[p,m,p+k,m+w];r._bounds.push({left:R[0],top:R[1],right:R[2],bottom:R[3],div:l,size:[k,w],m:A})}}}function render(t){if(!t._canceled){var r=t._textDivs,a=t._capability,o=r.length;if(o>1e5){t._renderingDone=!0;a.resolve()}else{if(!t._textContentStream)for(var i=0;i<o;i++)t._layoutText(r[i]);t._renderingDone=!0;a.resolve()}}}function findPositiveMin(t,r,a){for(var o=0,i=0;i<a;i++){var l=t[r++];l>0&&(o=o?Math.min(l,o):l)}return o}function expand(t){for(var r=t._bounds,a=t._viewport,i=function expandBounds(t,r,a){var o=a.map((function(t,r){return{x1:t.left,y1:t.top,x2:t.right,y2:t.bottom,index:r,x1New:void 0,x2New:void 0}}));expandBoundsLTR(t,o);var i=new Array(a.length);o.forEach((function(t){var r=t.index;i[r]={left:t.x1New,top:0,right:t.x2New,bottom:0}}));a.map((function(r,a){var l=i[a],c=o[a];c.x1=r.top;c.y1=t-l.right;c.x2=r.bottom;c.y2=t-l.left;c.index=a;c.x1New=void 0;c.x2New=void 0}));expandBoundsLTR(r,o);o.forEach((function(t){var r=t.index;i[r].top=t.x1New;i[r].bottom=t.x2New}));return i}(a.width,a.height,r),l=0;l<i.length;l++){var c=r[l].div,u=t._textDivProperties.get(c);if(0!==u.angle){var d=i[l],h=r[l],p=h.m,m=p[0],v=p[1],g=[[0,0],[0,h.size[1]],[h.size[0],0],h.size],y=new Float64Array(64);g.forEach((function(t,r){var a=o.Util.applyTransform(t,p);y[r+0]=m&&(d.left-a[0])/m;y[r+4]=v&&(d.top-a[1])/v;y[r+8]=m&&(d.right-a[0])/m;y[r+12]=v&&(d.bottom-a[1])/v;y[r+16]=v&&(d.left-a[0])/-v;y[r+20]=m&&(d.top-a[1])/m;y[r+24]=v&&(d.right-a[0])/-v;y[r+28]=m&&(d.bottom-a[1])/m;y[r+32]=m&&(d.left-a[0])/-m;y[r+36]=v&&(d.top-a[1])/-v;y[r+40]=m&&(d.right-a[0])/-m;y[r+44]=v&&(d.bottom-a[1])/-v;y[r+48]=v&&(d.left-a[0])/v;y[r+52]=m&&(d.top-a[1])/-m;y[r+56]=v&&(d.right-a[0])/v;y[r+60]=m&&(d.bottom-a[1])/-m}));var b=1+Math.min(Math.abs(m),Math.abs(v));u.paddingLeft=findPositiveMin(y,32,16)/b;u.paddingTop=findPositiveMin(y,48,16)/b;u.paddingRight=findPositiveMin(y,0,16)/b;u.paddingBottom=findPositiveMin(y,16,16)/b;t._textDivProperties.set(c,u)}else{u.paddingLeft=r[l].left-i[l].left;u.paddingTop=r[l].top-i[l].top;u.paddingRight=i[l].right-r[l].right;u.paddingBottom=i[l].bottom-r[l].bottom;t._textDivProperties.set(c,u)}}}function expandBoundsLTR(t,r){r.sort((function(t,r){return t.x1-r.x1||t.index-r.index}));var a=[{start:-1/0,end:1/0,boundary:{x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0}}];r.forEach((function(t){for(var r=0;r<a.length&&a[r].end<=t.y1;)r++;for(var o,i,l=a.length-1;l>=0&&a[l].start>=t.y2;)l--;var c,u,d=-1/0;for(c=r;c<=l;c++){var h;(h=(i=(o=a[c]).boundary).x2>t.x1?i.index>t.index?i.x1New:t.x1:void 0===i.x2New?(i.x2+t.x1)/2:i.x2New)>d&&(d=h)}t.x1New=d;for(c=r;c<=l;c++)void 0===(i=(o=a[c]).boundary).x2New?i.x2>t.x1?i.index>t.index&&(i.x2New=i.x2):i.x2New=d:i.x2New>d&&(i.x2New=Math.max(d,i.x2));var p=[],m=null;for(c=r;c<=l;c++){var v=(i=(o=a[c]).boundary).x2>t.x2?i:t;if(m===v)p[p.length-1].end=o.end;else{p.push({start:o.start,end:o.end,boundary:v});m=v}}if(a[r].start<t.y1){p[0].start=t.y1;p.unshift({start:a[r].start,end:t.y1,boundary:a[r].boundary})}if(t.y2<a[l].end){p[p.length-1].end=t.y2;p.push({start:t.y2,end:a[l].end,boundary:a[l].boundary})}for(c=r;c<=l;c++)if(void 0===(i=(o=a[c]).boundary).x2New){var g=!1;for(u=r-1;!g&&u>=0&&a[u].start>=i.y1;u--)g=a[u].boundary===i;for(u=l+1;!g&&u<a.length&&a[u].end<=i.y2;u++)g=a[u].boundary===i;for(u=0;!g&&u<p.length;u++)g=p[u].boundary===i;g||(i.x2New=d)}Array.prototype.splice.apply(a,[r,l-r+1].concat(p))}));a.forEach((function(r){var a=r.boundary;void 0===a.x2New&&(a.x2New=Math.max(t,a.x2))}))}function TextLayerRenderTask(t){var r=this,a=t.textContent,i=t.textContentStream,l=t.container,c=t.viewport,u=t.textDivs,d=t.textContentItemsStr,h=t.enhanceTextSelection;this._textContent=a;this._textContentStream=i;this._container=l;this._document=l.ownerDocument;this._viewport=c;this._textDivs=u||[];this._textContentItemsStr=d||[];this._enhanceTextSelection=!!h;this._fontInspectorEnabled=!(!globalThis.FontInspector||!globalThis.FontInspector.enabled);this._reader=null;this._layoutTextLastFontSize=null;this._layoutTextLastFontFamily=null;this._layoutTextCtx=null;this._textDivProperties=new WeakMap;this._renderingDone=!1;this._canceled=!1;this._capability=(0,o.createPromiseCapability)();this._renderTimer=null;this._bounds=[];this._capability.promise.finally((function(){if(r._layoutTextCtx){r._layoutTextCtx.canvas.width=0;r._layoutTextCtx.canvas.height=0;r._layoutTextCtx=null}})).catch((function(){}))}TextLayerRenderTask.prototype={get promise(){return this._capability.promise},cancel:function TextLayer_cancel(){this._canceled=!0;if(this._reader){this._reader.cancel(new o.AbortException("TextLayer task cancelled."));this._reader=null}if(null!==this._renderTimer){clearTimeout(this._renderTimer);this._renderTimer=null}this._capability.reject(new Error("TextLayer task cancelled."))},_processItems:function _processItems(t,r){for(var a=0,o=t.length;a<o;a++){this._textContentItemsStr.push(t[a].str);appendText(this,t[a],r)}},_layoutText:function _layoutText(t){var r=this._textDivProperties.get(t);if(!r.isWhitespace){var a="";if(0!==r.canvasWidth){var o=t.style,i=o.fontSize,l=o.fontFamily;if(i!==this._layoutTextLastFontSize||l!==this._layoutTextLastFontFamily){this._layoutTextCtx.font="".concat(i," ").concat(l);this._layoutTextLastFontSize=i;this._layoutTextLastFontFamily=l}var c=this._layoutTextCtx.measureText(t.textContent).width;if(c>0){r.scale=r.canvasWidth/c;a="scaleX(".concat(r.scale,")")}}0!==r.angle&&(a="rotate(".concat(r.angle,"deg) ").concat(a));if(a.length>0){this._enhanceTextSelection&&(r.originalTransform=a);t.style.transform=a}this._textDivProperties.set(t,r);this._container.appendChild(t)}},_render:function TextLayer_render(t){var r=this,a=(0,o.createPromiseCapability)(),i=Object.create(null),l=this._document.createElement("canvas");l.mozOpaque=!0;this._layoutTextCtx=l.getContext("2d",{alpha:!1});if(this._textContent){var c=this._textContent.items,u=this._textContent.styles;this._processItems(c,u);a.resolve()}else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');this._reader=this._textContentStream.getReader();!function pump(){r._reader.read().then((function(t){var o=t.value;if(t.done)a.resolve();else{Object.assign(i,o.styles);r._processItems(o.items,i);pump()}}),a.reject)}()}a.promise.then((function(){i=null;t?r._renderTimer=setTimeout((function(){render(r);r._renderTimer=null}),t):render(r)}),this._capability.reject)},expandTextDivs:function TextLayer_expandTextDivs(t){if(this._enhanceTextSelection&&this._renderingDone){if(null!==this._bounds){expand(this);this._bounds=null}for(var r=[],a=[],o=0,i=this._textDivs.length;o<i;o++){var l=this._textDivs[o],c=this._textDivProperties.get(l);if(!c.isWhitespace)if(t){r.length=0;a.length=0;c.originalTransform&&r.push(c.originalTransform);if(c.paddingTop>0){a.push("".concat(c.paddingTop,"px"));r.push("translateY(".concat(-c.paddingTop,"px)"))}else a.push(0);c.paddingRight>0?a.push("".concat(c.paddingRight/c.scale,"px")):a.push(0);c.paddingBottom>0?a.push("".concat(c.paddingBottom,"px")):a.push(0);if(c.paddingLeft>0){a.push("".concat(c.paddingLeft/c.scale,"px"));r.push("translateX(".concat(-c.paddingLeft/c.scale,"px)"))}else a.push(0);l.style.padding=a.join(" ");r.length&&(l.style.transform=r.join(" "))}else{l.style.padding=null;l.style.transform=c.originalTransform}}}}};return function renderTextLayer(t){var r=new TextLayerRenderTask({textContent:t.textContent,textContentStream:t.textContentStream,container:t.container,viewport:t.viewport,textDivs:t.textDivs,textContentItemsStr:t.textContentItemsStr,enhanceTextSelection:t.enhanceTextSelection});r._render(t.timeout);return r}}();r.renderTextLayer=i},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.SVGGraphics=void 0;var o=a(5),i=a(1),l=a(7);function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))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){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var a=[],o=!0,i=!1,l=void 0;try{for(var c,u=t[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){a.push(c.value);if(r&&a.length===r)break}}catch(t){i=!0;l=t}finally{try{o||null==u.return||u.return()}finally{if(i)throw l}}return a}(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;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var o=0,i=function F(){};return{s:i,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:i}}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=t[Symbol.iterator]()},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,o=new Array(r);a<r;a++)o[a]=t[a];return o}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 o=r[a];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);return t}var c=function SVGGraphics(){throw new Error("Not implemented: SVGGraphics")};r.SVGGraphics=c;var u=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)},d=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(u(t[0])," ").concat(u(t[3]),")");if(t[0]===t[3]&&t[1]===-t[2]){var r=180*Math.acos(t[0])/Math.PI;return"rotate(".concat(u(r),")")}}else if(1===t[0]&&0===t[1]&&0===t[2]&&1===t[3])return"translate(".concat(u(t[4])," ").concat(u(t[5]),")");return"matrix(".concat(u(t[0])," ").concat(u(t[1])," ").concat(u(t[2])," ").concat(u(t[3])," ").concat(u(t[4])," ")+"".concat(u(t[5]),")")},h={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},p=["butt","round","square"],m=["miter","round","bevel"],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,c=0;c<8;c++)i=1&i?3988292384^i>>1&2147483647:i>>1&2147483647;r[a]=i}function writePngChunk(t,a,o,i){var l=i,c=a.length;o[l]=c>>24&255;o[l+1]=c>>16&255;o[l+2]=c>>8&255;o[l+3]=255&c;o[l+=4]=255&t.charCodeAt(0);o[l+1]=255&t.charCodeAt(1);o[l+2]=255&t.charCodeAt(2);o[l+3]=255&t.charCodeAt(3);l+=4;o.set(a,l);var u=function crc32(t,a,o){for(var i=-1,l=a;l<o;l++){var c=255&(i^t[l]);i=i>>>8^r[c]}return-1^i}(o,i+4,l+=a.length);o[l]=u>>24&255;o[l+1]=u>>16&255;o[l+2]=u>>8&255;o[l+3]=255&u}function deflateSyncUncompressed(t){var r=t.length,a=Math.ceil(r/65535),o=new Uint8Array(2+r+5*a+4),i=0;o[i++]=120;o[i++]=156;for(var l=0;r>65535;){o[i++]=0;o[i++]=255;o[i++]=255;o[i++]=0;o[i++]=0;o.set(t.subarray(l,l+65535),i);i+=65535;l+=65535;r-=65535}o[i++]=1;o[i++]=255&r;o[i++]=r>>8&255;o[i++]=255&~r;o[i++]=(65535&~r)>>8&255;o.set(t.subarray(l),i);i+=t.length-l;var c=function adler32(t,r,a){for(var o=1,i=0,l=r;l<a;++l)i=(i+(o=(o+(255&t[l]))%65521))%65521;return i<<16|o}(t,0,t.length);o[i++]=c>>24&255;o[i++]=c>>16&255;o[i++]=c>>8&255;o[i++]=255&c;return o}function encode(r,a,i,c){var u,d,h,p=r.width,m=r.height,v=r.data;switch(a){case o.ImageKind.GRAYSCALE_1BPP:d=0;u=1;h=p+7>>3;break;case o.ImageKind.RGB_24BPP:d=2;u=8;h=3*p;break;case o.ImageKind.RGBA_32BPP:d=6;u=8;h=4*p;break;default:throw new Error("invalid format")}for(var g=new Uint8Array((1+h)*m),y=0,b=0,_=0;_<m;++_){g[y++]=0;g.set(v.subarray(b,b+h),y);b+=h;y+=h}if(a===o.ImageKind.GRAYSCALE_1BPP&&c){y=0;for(var S=0;S<m;S++){y++;for(var C=0;C<h;C++)g[y++]^=255}}var A=new Uint8Array([p>>24&255,p>>16&255,p>>8&255,255&p,m>>24&255,m>>16&255,m>>8&255,255&m,u,d,0,0,0]),R=function deflateSync(t){if(!l.isNodeJS)return deflateSyncUncompressed(t);try{var r;r=parseInt(process.versions.node)>=8?t:Buffer.from(t);var 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)}(g),k=t.length+36+A.length+R.length,w=new Uint8Array(k),P=0;w.set(t,P);writePngChunk("IHDR",A,w,P+=t.length);writePngChunk("IDATA",R,w,P+=12+A.length);P+=12+R.length;writePngChunk("IEND",new Uint8Array(0),w,P);return(0,o.createObjectURL)(w,"image/png",i)}return function convertImgDataToPng(t,r,a){return encode(t,void 0===t.kind?o.ImageKind.GRAYSCALE_1BPP:t.kind,r,a)}}(),g=function(){function SVGExtraState(){_classCallCheck(this,SVGExtraState);this.fontSizeScale=1;this.fontWeight=h.fontWeight;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=h.fillColor;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}(),y=0,b=0,_=0;r.SVGGraphics=c=function(){function SVGGraphics(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];_classCallCheck(this,SVGGraphics);this.svgFactory=new i.DOMSVGFactory;this.current=new g;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:"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,o=new Promise((function(r){a.get(t,r)}));r.current.dependencies.push(o)};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,o=t.fnArray,i=[],l=0,c=o.length;l<c;l++){var u=o[l];i.push({fnId:u,fn:r[u],args:a[l]})}return function opListToTree(t){var r,a=[],o=[],i=_createForOfIteratorHelper(t);try{for(i.s();!(r=i.n()).done;){var l=r.value;if("save"!==l.fn)"restore"===l.fn?a=o.pop():a.push(l);else{a.push({fnId:92,fn:"group",items:[]});o.push(a);a=a[a.length-1].items}}}catch(t){i.e(t)}finally{i.f()}return a}(i)}},{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,o,i,l){var c=this.current;c.textMatrix=c.lineMatrix=[t,r,a,o,i,l];c.textMatrixScale=Math.sqrt(t*t+r*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(u(c.fontSize),"px"));c.tspan.setAttributeNS(null,"y",u(-c.y));c.txtElement=this.svgFactory.createElement("svg:text");c.txtElement.appendChild(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(u(a.fontSize),"px"));a.tspan.setAttributeNS(null,"y",u(-a.y))}},{key:"showText",value:function showText(t){var r=this.current,a=r.font,i=r.fontSize;if(0!==i){var l,c=r.fontSizeScale,p=r.charSpacing,m=r.wordSpacing,v=r.fontDirection,g=r.textHScale*v,y=a.vertical,b=y?1:-1,_=a.defaultVMetrics,S=i*r.fontMatrix[0],C=0,A=_createForOfIteratorHelper(t);try{for(A.s();!(l=A.n()).done;){var R=l.value;if(null!==R)if((0,o.isNum)(R))C+=b*R*i/1e3;else{var k=(R.isSpace?m:0)+p,w=R.fontChar,P=void 0,x=void 0,T=R.width;if(y){var E=void 0,O=R.vmetric||_;E=-(E=R.vmetric?O[1]:.5*T)*S;var I=O[2]*S;T=O?-O[0]:T;P=E/c;x=(C+I)/c}else{P=C/c;x=0}if(R.isInFont||a.missingFile){r.xcoords.push(r.x+P);y&&r.ycoords.push(-r.y+x);r.tspan.textContent+=w}C+=y?T*S-k*v:T*S+k*v}else C+=v*m}}catch(t){A.e(t)}finally{A.f()}r.tspan.setAttributeNS(null,"x",r.xcoords.map(u).join(" "));y?r.tspan.setAttributeNS(null,"y",r.ycoords.map(u).join(" ")):r.tspan.setAttributeNS(null,"y",u(-r.y));y?r.y-=C:r.x+=C*g;r.tspan.setAttributeNS(null,"font-family",r.fontFamily);r.tspan.setAttributeNS(null,"font-size","".concat(u(r.fontSize),"px"));r.fontStyle!==h.fontStyle&&r.tspan.setAttributeNS(null,"font-style",r.fontStyle);r.fontWeight!==h.fontWeight&&r.tspan.setAttributeNS(null,"font-weight",r.fontWeight);var D=r.textRenderingMode&o.TextRenderingMode.FILL_STROKE_MASK;if(D===o.TextRenderingMode.FILL||D===o.TextRenderingMode.FILL_STROKE){r.fillColor!==h.fillColor&&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(D===o.TextRenderingMode.STROKE||D===o.TextRenderingMode.FILL_STROKE){var L=1/(r.textMatrixScale||1);this._setStrokeAttributes(r.tspan,L)}var M=r.textMatrix;0!==r.textRise&&((M=M.slice())[5]+=r.textRise);r.txtElement.setAttributeNS(null,"transform","".concat(d(M)," scale(").concat(u(g),", -1)"));r.txtElement.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve");r.txtElement.appendChild(r.tspan);r.txtgrp.appendChild(r.txtElement);this._ensureTransformGroup().appendChild(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.appendChild(this.cssStyle)}var r=(0,o.createObjectURL)(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?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",u(-r.y));r.xcoords=[];r.ycoords=[]}},{key:"endText",value:function endText(){var t=this.current;if(t.textRenderingMode&o.TextRenderingMode.ADD_TO_PATH_FLAG&&t.txtElement&&t.txtElement.hasChildNodes()){t.element=t.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=p[t]}},{key:"setLineJoin",value:function setLineJoin(t){this.current.lineJoin=m[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.makeCssRgb(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.makeCssRgb(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.width,a=this.viewport.height,i=o.Util.inverseTransform(this.transformMatrix),l=o.Util.applyTransform([0,0],i),c=o.Util.applyTransform([0,a],i),u=o.Util.applyTransform([r,0],i),d=o.Util.applyTransform([r,a],i),h=Math.min(l[0],c[0],u[0],d[0]),p=Math.min(l[1],c[1],u[1],d[1]),m=Math.max(l[0],c[0],u[0],d[0]),v=Math.max(l[1],c[1],u[1],d[1]),g=this.svgFactory.createElement("svg:rect");g.setAttributeNS(null,"x",h);g.setAttributeNS(null,"y",p);g.setAttributeNS(null,"width",m-h);g.setAttributeNS(null,"height",v-p);g.setAttributeNS(null,"fill",this._makeShadingPattern(t));this.current.fillAlpha<1&&g.setAttributeNS(null,"fill-opacity",this.current.fillAlpha);this._ensureTransformGroup().appendChild(g)}},{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],m=t[6],v=t[7],g="shading".concat(_++),y=_slicedToArray(o.Util.applyTransform([c,u],i),2),b=y[0],S=y[1],C=_slicedToArray(o.Util.applyTransform([d,h],i),2),A=C[0],R=C[1],k=_slicedToArray(o.Util.singularValueDecompose2dScale(i),2),w=p*k[0],P=m*k[1],x=this.svgFactory.createElement("svg:pattern");x.setAttributeNS(null,"id",g);x.setAttributeNS(null,"patternUnits","userSpaceOnUse");x.setAttributeNS(null,"width",w);x.setAttributeNS(null,"height",P);x.setAttributeNS(null,"x","".concat(b));x.setAttributeNS(null,"y","".concat(S));var T=this.svg,E=this.transformMatrix,O=this.current.fillColor,I=this.current.strokeColor,D=this.svgFactory.create(A-b,R-S);this.svg=D;this.transformMatrix=i;if(2===v){var L=o.Util.makeCssRgb.apply(o.Util,_toConsumableArray(r));this.current.fillColor=L;this.current.strokeColor=L}this.executeOpTree(this.convertOpList(a));this.svg=T;this.transformMatrix=E;this.current.fillColor=O;this.current.strokeColor=I;x.appendChild(D.childNodes[0]);this.defs.appendChild(x);return"url(#".concat(g,")")}},{key:"_makeShadingPattern",value:function _makeShadingPattern(t){switch(t[0]){case"RadialAxial":var r,a="shading".concat(_++),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 m,v=_createForOfIteratorHelper(i);try{for(v.s();!(m=v.n()).done;){var g=m.value,y=this.svgFactory.createElement("svg:stop");y.setAttributeNS(null,"offset",g[0]);y.setAttributeNS(null,"stop-color",g[1]);r.appendChild(y)}}catch(t){v.e(t)}finally{v.f()}this.defs.appendChild(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,d=[],h=0,p=_createForOfIteratorHelper(t);try{for(p.s();!(a=p.n()).done;){switch(0|a.value){case o.OPS.rectangle:l=r[h++];c=r[h++];var m=r[h++],v=r[h++],g=l+m,y=c+v;d.push("M",u(l),u(c),"L",u(g),u(c),"L",u(g),u(y),"L",u(l),u(y),"Z");break;case o.OPS.moveTo:l=r[h++];c=r[h++];d.push("M",u(l),u(c));break;case o.OPS.lineTo:l=r[h++];c=r[h++];d.push("L",u(l),u(c));break;case o.OPS.curveTo:l=r[h+4];c=r[h+5];d.push("C",u(r[h]),u(r[h+1]),u(r[h+2]),u(r[h+3]),u(l),u(c));h+=6;break;case o.OPS.curveTo2:d.push("C",u(l),u(c),u(r[h]),u(r[h+1]),u(r[h+2]),u(r[h+3]));l=r[h+2];c=r[h+3];h+=4;break;case o.OPS.curveTo3:l=r[h+2];c=r[h+3];d.push("C",u(r[h]),u(r[h+1]),u(l),u(c),u(l),u(c));h+=4;break;case o.OPS.closePath:d.push("Z")}}}catch(t){p.e(t)}finally{p.f()}d=d.join(" ");if(i.path&&t.length>0&&t[0]!==o.OPS.rectangle&&t[0]!==o.OPS.moveTo)d=i.path.getAttributeNS(null,"d")+d;else{i.path=this.svgFactory.createElement("svg:path");this._ensureTransformGroup().appendChild(i.path)}i.path.setAttributeNS(null,"d",d);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(y++),a=this.svgFactory.createElement("svg:clipPath");a.setAttributeNS(null,"id",r);a.setAttributeNS(null,"transform",d(this.transformMatrix));var o=t.element.cloneNode(!0);"evenodd"===this.pendingClip?o.setAttributeNS(null,"clip-rule","evenodd"):o.setAttributeNS(null,"clip-rule","nonzero");this.pendingClip=null;a.appendChild(o);this.defs.appendChild(a);if(t.activeClipUrl){t.clipGroup=null;this.extraStack.forEach((function(t){t.clipGroup=null}));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,o=a.dashArray;1!==r&&o.length>0&&(o=o.map((function(t){return r*t})));t.setAttributeNS(null,"stroke",a.strokeColor);t.setAttributeNS(null,"stroke-opacity",a.strokeAlpha);t.setAttributeNS(null,"stroke-miterlimit",u(a.miterLimit));t.setAttributeNS(null,"stroke-linecap",a.lineCap);t.setAttributeNS(null,"stroke-linejoin",a.lineJoin);t.setAttributeNS(null,"stroke-width",u(r*a.lineWidth)+"px");t.setAttributeNS(null,"stroke-dasharray",o.map(u).join(" "));t.setAttributeNS(null,"stroke-dashoffset",u(r*a.dashPhase)+"px")}},{key:"eoFill",value:function eoFill(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd");this.fill()}},{key:"fillStroke",value:function fillStroke(){this.stroke();this.fill()}},{key:"eoFillStroke",value:function eoFillStroke(){this.current.element&&this.current.element.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().appendChild(t)}},{key:"paintImageXObject",value:function paintImageXObject(t){var r=t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(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,o=t.height,i=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",u(a));l.setAttributeNS(null,"height",u(o));this.current.element=l;this.clip("nonzero");var c=this.svgFactory.createElement("svg:image");c.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);c.setAttributeNS(null,"x","0");c.setAttributeNS(null,"y",u(-o));c.setAttributeNS(null,"width",u(a)+"px");c.setAttributeNS(null,"height",u(o)+"px");c.setAttributeNS(null,"transform","scale(".concat(u(1/a)," ").concat(u(-1/o),")"));r?r.appendChild(c):this._ensureTransformGroup().appendChild(c)}},{key:"paintImageMaskXObject",value:function paintImageMaskXObject(t){var r=this.current,a=t.width,o=t.height,i=r.fillColor;r.maskId="mask".concat(b++);var l=this.svgFactory.createElement("svg:mask");l.setAttributeNS(null,"id",r.maskId);var c=this.svgFactory.createElement("svg:rect");c.setAttributeNS(null,"x","0");c.setAttributeNS(null,"y","0");c.setAttributeNS(null,"width",u(a));c.setAttributeNS(null,"height",u(o));c.setAttributeNS(null,"fill",i);c.setAttributeNS(null,"mask","url(#".concat(r.maskId,")"));this.defs.appendChild(l);this._ensureTransformGroup().appendChild(c);this.paintInlineImageXObject(t,l)}},{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],o=r[3]-r[1],i=this.svgFactory.createElement("svg:rect");i.setAttributeNS(null,"x",r[0]);i.setAttributeNS(null,"y",r[1]);i.setAttributeNS(null,"width",u(a));i.setAttributeNS(null,"height",u(o));this.current.element=i;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.appendChild(a);this.defs=a;var o=this.svgFactory.createElement("svg:g");o.setAttributeNS(null,"transform",d(t.transform));r.appendChild(o);this.svg=o;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.appendChild(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",d(this.transformMatrix));this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)}return this.tgrp}}]);return SVGGraphics}()},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.PDFNodeStream=void 0;var o=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(2)),i=a(5),l=a(220);function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(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}});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t})(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{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,o=_getPrototypeOf(t);if(r){var i=_getPrototypeOf(this).constructor;a=Reflect.construct(o,arguments,i)}else a=o.apply(this,arguments);return _possibleConstructorReturn(this,a)}}function _possibleConstructorReturn(t,r){return!r||"object"!==_typeof(r)&&"function"!=typeof r?function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):r}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function asyncGeneratorStep(t,r,a,o,i,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(o,i)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(o,i){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,o,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,o,i,_next,_throw,"throw",t)}_next(void 0)}))}}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 o=r[a];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);return t}var c=require("fs"),u=require("http"),d=require("https"),h=require("url"),p=/^file:\/\/\/[a-zA-Z]:\//;var m=function(){function PDFNodeStream(t){_classCallCheck(this,PDFNodeStream);this.source=t;this.url=function parseUrl(t){var r=h.parse(t);if("file:"===r.protocol||r.host)return r;if(/^[a-z]:[/\\]/i.test(t))return h.parse("file:///".concat(t));r.host||(r.protocol="file:");return r}(t.url);this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol;this.isFsUrl="file:"===this.url.protocol;this.httpHeaders=this.isHttp&&t.httpHeaders||{};this._fullRequestReader=null;this._rangeRequestReaders=[]}_createClass(PDFNodeStream,[{key:"getFullReader",value:function getFullReader(){(0,i.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once.");this._fullRequestReader=this.isFsUrl?new _(this):new y(this);return this._fullRequestReader}},{key:"getRangeReader",value:function getRangeReader(t,r){if(r<=this._progressiveDataLength)return null;var a=this.isFsUrl?new S(this,t,r):new b(this,t,r);this._rangeRequestReaders.push(a);return a}},{key:"cancelAllRequests",value:function cancelAllRequests(t){this._fullRequestReader&&this._fullRequestReader.cancel(t);this._rangeRequestReaders.slice(0).forEach((function(r){r.cancel(t)}))}},{key:"_progressiveDataLength",get:function get(){return this._fullRequestReader?this._fullRequestReader._loaded:0}}]);return PDFNodeStream}();r.PDFNodeStream=m;var v=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=(0,i.createPromiseCapability)();this._headersCapability=(0,i.createPromiseCapability)()}_createClass(BaseFullReader,[{key:"read",value:(t=_asyncToGenerator(o.default.mark((function _callee(){var t,r;return o.default.wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:a.next=2;return this._readCapability.promise;case 2:if(!this._done){a.next=4;break}return a.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){a.next=6;break}throw this._storedError;case 6:if(null!==(t=this._readableStream.read())){a.next=10;break}this._readCapability=(0,i.createPromiseCapability)();return a.abrupt("return",this.read());case 10:this._loaded+=t.length;this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength});r=new Uint8Array(t).buffer;return a.abrupt("return",{value:r,done:!1});case 14:case"end":return a.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)}},{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}}]);var t;return BaseFullReader}(),g=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=(0,i.createPromiseCapability)();var r=t.source;this._isStreamingSupported=!r.disableStream}_createClass(BaseRangeReader,[{key:"read",value:(t=_asyncToGenerator(o.default.mark((function _callee2(){var t,r;return o.default.wrap((function _callee2$(a){for(;;)switch(a.prev=a.next){case 0:a.next=2;return this._readCapability.promise;case 2:if(!this._done){a.next=4;break}return a.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){a.next=6;break}throw this._storedError;case 6:if(null!==(t=this._readableStream.read())){a.next=10;break}this._readCapability=(0,i.createPromiseCapability)();return a.abrupt("return",this.read());case 10:this._loaded+=t.length;this.onProgress&&this.onProgress({loaded:this._loaded});r=new Uint8Array(t).buffer;return a.abrupt("return",{value:r,done:!1});case 14:case"end":return a.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)}},{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}}]);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 y=function(t){_inherits(PDFNodeStreamFullReader,t);var r=_createSuper(PDFNodeStreamFullReader);function PDFNodeStreamFullReader(t){var a;_classCallCheck(this,PDFNodeStreamFullReader);var o=function handleResponse(r){if(404!==r.statusCode){a._headersCapability.resolve();a._setReadableStream(r);var o=function getResponseHeader(t){return a._readableStream.headers[t.toLowerCase()]},c=(0,l.validateRangeRequestCapabilities)({getResponseHeader:o,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,l.extractFilenameFromHeader)(o)}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;"http:"===a._url.protocol?a._request=u.request(createRequestOptions(a._url,t.httpHeaders),o):a._request=d.request(createRequestOptions(a._url,t.httpHeaders),o);a._request.on("error",(function(t){a._storedError=t;a._headersCapability.reject(t)}));a._request.end();return a}return PDFNodeStreamFullReader}(v),b=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 h=t.httpHeaders[c];void 0!==h&&(l._httpHeaders[c]=h)}l._httpHeaders.Range="bytes=".concat(a,"-").concat(o-1);var p=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;"http:"===l._url.protocol?l._request=u.request(createRequestOptions(l._url,l._httpHeaders),p):l._request=d.request(createRequestOptions(l._url,l._httpHeaders),p);l._request.on("error",(function(t){l._storedError=t}));l._request.end();return l}return PDFNodeStreamRangeReader}(g),_=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);p.test(a._url.href)&&(o=o.replace(/^\//,""));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 PDFNodeStreamFsFullReader}(v),S=function(t){_inherits(PDFNodeStreamFsRangeReader,t);var r=_createSuper(PDFNodeStreamFsRangeReader);function PDFNodeStreamFsRangeReader(t,a,o){var i;_classCallCheck(this,PDFNodeStreamFsRangeReader);i=r.call(this,t);var l=decodeURIComponent(i._url.path);p.test(i._url.href)&&(l=l.replace(/^\//,""));i._setReadableStream(c.createReadStream(l,{start:a,end:o-1}));return i}return PDFNodeStreamFsRangeReader}(g)},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.createResponseStatusError=function createResponseStatusError(t,r){if(404===t||0===t&&r.startsWith("file:"))return new o.MissingPDFException('Missing PDF "'+r+'".');return new o.UnexpectedResponseException("Unexpected server response ("+t+') while retrieving PDF "'+r+'".',t)};r.extractFilenameFromHeader=function extractFilenameFromHeader(t){var r=t("Content-Disposition");if(r){var a=(0,i.getFilenameFromContentDispositionHeader)(r);if(a.includes("%"))try{a=decodeURIComponent(a)}catch(t){}if(/\.pdf$/i.test(a))return a}return null};r.validateRangeRequestCapabilities=function validateRangeRequestCapabilities(t){var r=t.getResponseHeader,a=t.isHttp,i=t.rangeChunkSize,l=t.disableRange;(0,o.assert)(i>0,"Range chunk size must be larger than zero");var c={allowRangeRequests:!1,suggestedLength:void 0},u=parseInt(r("Content-Length"),10);if(!Number.isInteger(u))return c;c.suggestedLength=u;if(u<=2*i)return c;if(l||!a)return c;if("bytes"!==r("Accept-Ranges"))return c;if("identity"!==(r("Content-Encoding")||"identity"))return c;c.allowRangeRequests=!0;return c};r.validateResponseStatus=function validateResponseStatus(t){return 200===t||206===t};var o=a(5),i=a(221)},function(t,r,a){"use strict";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=[],o=toParamRegExp("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(r=o.exec(t));){var i=_slicedToArray(r,4),l=i[1],c=i[2],u=i[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),m=p[0],v=p[1];v=rfc2616unquote(v);if(m){v=unescape(v);0===h&&(v=rfc5987decode(v))}d.push(v)}return d.join("")}(t)){return fixupEncoding(rfc2047decode(a))}if(a=toParamRegExp("filename","i").exec(t)){var i=rfc2616unquote(a=a[1]);return fixupEncoding(i=rfc2047decode(i))}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}),i=Array.from(a,(function(t){return 255&t.charCodeAt(0)}));a=o.decode(new Uint8Array(i));r=!1}catch(o){if(/^utf-?8$/i.test(t))try{a=decodeURIComponent(escape(a));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 o=r[a].indexOf('"');if(-1!==o){r[a]=r[a].slice(0,o);r.length=a+1}r[a]=r[a].replace(/\\(.)/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.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(t,r,a,o){if("q"===a||"Q"===a)return textdecode(r,o=(o=o.replace(/_/g," ")).replace(/=([0-9a-fA-F]{2})/g,(function(t,r){return String.fromCharCode(parseInt(r,16))})));try{o=atob(o)}catch(t){}return textdecode(r,o)}))}return""};function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var a=[],o=!0,i=!1,l=void 0;try{for(var c,u=t[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){a.push(c.value);if(r&&a.length===r)break}}catch(t){i=!0;l=t}finally{try{o||null==u.return||u.return()}finally{if(i)throw l}}return a}(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,o=new Array(r);a<r;a++)o[a]=t[a];return o}},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.PDFNetworkStream=void 0;var o=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(2)),i=a(5),l=a(220);function asyncGeneratorStep(t,r,a,o,i,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(o,i)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(o,i){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,o,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,o,i,_next,_throw,"throw",t)}_next(void 0)}))}}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 o=r[a];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);return t}var c=function(){function NetworkManager(t,r){_classCallCheck(this,NetworkManager);this.url=t;r=r||{};this.isHttp=/^https?:/i.test(t);this.httpHeaders=this.isHttp&&r.httpHeaders||{};this.withCredentials=r.withCredentials||!1;this.getXhr=r.getXhr||function NetworkManager_getXhr(){return new XMLHttpRequest};this.currXhrId=0;this.pendingRequests=Object.create(null)}_createClass(NetworkManager,[{key:"requestRange",value:function requestRange(t,r,a){var o={begin:t,end:r};for(var i in a)o[i]=a[i];return this.request(o)}},{key:"requestFull",value:function requestFull(t){return this.request(t)}},{key:"request",value:function request(t){var r=this.getXhr(),a=this.currXhrId++,o=this.pendingRequests[a]={xhr:r};r.open("GET",this.url);r.withCredentials=this.withCredentials;for(var i in this.httpHeaders){var l=this.httpHeaders[i];void 0!==l&&r.setRequestHeader(i,l)}if(this.isHttp&&"begin"in t&&"end"in t){r.setRequestHeader("Range","bytes=".concat(t.begin,"-").concat(t.end-1));o.expectedStatus=206}else o.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);o.onHeadersReceived=t.onHeadersReceived;o.onDone=t.onDone;o.onError=t.onError;o.onProgress=t.onProgress;r.send(null);return a}},{key:"onProgress",value:function onProgress(t,r){var a=this.pendingRequests[t];a&&a.onProgress&&a.onProgress(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)a.onError&&a.onError(o.status);else{var l=o.status||200;if(200===l&&206===a.expectedStatus||l===a.expectedStatus){var c=function getArrayBuffer(t){var r=t.response;return"string"!=typeof r?r:(0,i.stringToBytes)(r).buffer}(o);if(206===l){var u=o.getResponseHeader("Content-Range"),d=/bytes (\d+)-(\d+)\/(\d+)/.exec(u);a.onDone({begin:parseInt(d[1],10),chunk:c})}else c?a.onDone({begin:0,chunk:c}):a.onError&&a.onError(o.status)}else a.onError&&a.onError(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}(),u=function(){function PDFNetworkStream(t){_classCallCheck(this,PDFNetworkStream);this._source=t;this._manager=new c(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 d(this._manager,this._source);return this._fullRequestReader}},{key:"getRangeReader",value:function getRangeReader(t,r){var a=new h(this._manager,t,r);a.onClosed=this._onRangeRequestReaderClosed.bind(this);this._rangeRequestReaders.push(a);return a}},{key:"cancelAllRequests",value:function cancelAllRequests(t){this._fullRequestReader&&this._fullRequestReader.cancel(t);this._rangeRequestReaders.slice(0).forEach((function(r){r.cancel(t)}))}}]);return PDFNetworkStream}();r.PDFNetworkStream=u;var d=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=(0,i.createPromiseCapability)();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)},o=(0,l.validateRangeRequestCapabilities)({getResponseHeader:a,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),i=o.allowRangeRequests,c=o.suggestedLength;i&&(this._isRangeSupported=!0);this._contentLength=c||this._contentLength;this._filename=(0,l.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)){this._requests.forEach((function(t){t.resolve({value:void 0,done:!0})}));this._requests=[]}}},{key:"_onError",value:function _onError(t){var r=this._url,a=(0,l.createResponseStatusError)(t,r);this._storedError=a;this._headersReceivedCapability.reject(a);this._requests.forEach((function(t){t.reject(a)}));this._requests=[];this._cachedChunks=[]}},{key:"_onProgress",value:function _onProgress(t){this.onProgress&&this.onProgress({loaded:t.loaded,total:t.lengthComputable?t.total:this._contentLength})}},{key:"read",value:(t=_asyncToGenerator(o.default.mark((function _callee(){var t,r;return o.default.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=(0,i.createPromiseCapability)();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);this._requests.forEach((function(t){t.resolve({value:void 0,done:!0})}));this._requests=[];this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId);this._fullRequestReader=null}},{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}}]);var t;return PDFNetworkStreamFullRequestReader}(),h=function(){function PDFNetworkStreamRangeRequestReader(t,r,a){_classCallCheck(this,PDFNetworkStreamRangeRequestReader);this._manager=t;var o={onDone:this._onDone.bind(this),onProgress:this._onProgress.bind(this)};this._requestId=t.requestRange(r,a,o);this._requests=[];this._queuedChunk=null;this._done=!1;this.onProgress=null;this.onClosed=null}_createClass(PDFNetworkStreamRangeRequestReader,[{key:"_close",value:function _close(){this.onClosed&&this.onClosed(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;this._requests.forEach((function(t){t.resolve({value:void 0,done:!0})}));this._requests=[];this._close()}},{key:"_onProgress",value:function _onProgress(t){!this.isStreamingSupported&&this.onProgress&&this.onProgress({loaded:t.loaded})}},{key:"read",value:(t=_asyncToGenerator(o.default.mark((function _callee2(){var t,r;return o.default.wrap((function _callee2$(a){for(;;)switch(a.prev=a.next){case 0:if(null===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=(0,i.createPromiseCapability)();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;this._requests.forEach((function(t){t.resolve({value:void 0,done:!0})}));this._requests=[];this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId);this._close()}},{key:"isStreamingSupported",get:function get(){return!1}}]);var t;return PDFNetworkStreamRangeRequestReader}()},function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.PDFFetchStream=void 0;var o=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(2)),i=a(5),l=a(220);function asyncGeneratorStep(t,r,a,o,i,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(o,i)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(o,i){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,o,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,o,i,_next,_throw,"throw",t)}_next(void 0)}))}}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 o=r[a];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);return t}function createFetchOptions(t,r,a){return{method:"GET",headers:t,signal:a&&a.signal,mode:"cors",credentials:r?"include":"same-origin",redirect:"follow"}}function createHeaders(t){var r=new Headers;for(var a in t){var o=t[a];void 0!==o&&r.append(a,o)}return r}var c=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:"getFullReader",value:function getFullReader(){(0,i.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once.");this._fullRequestReader=new u(this);return this._fullRequestReader}},{key:"getRangeReader",value:function getRangeReader(t,r){if(r<=this._progressiveDataLength)return null;var a=new d(this,t,r);this._rangeRequestReaders.push(a);return a}},{key:"cancelAllRequests",value:function cancelAllRequests(t){this._fullRequestReader&&this._fullRequestReader.cancel(t);this._rangeRequestReaders.slice(0).forEach((function(r){r.cancel(t)}))}},{key:"_progressiveDataLength",get:function get(){return this._fullRequestReader?this._fullRequestReader._loaded:0}}]);return PDFFetchStream}();r.PDFFetchStream=c;var u=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=(0,i.createPromiseCapability)();this._disableRange=a.disableRange||!1;this._rangeChunkSize=a.rangeChunkSize;this._rangeChunkSize||this._disableRange||(this._disableRange=!0);"undefined"!=typeof AbortController&&(this._abortController=new AbortController);this._isStreamingSupported=!a.disableStream;this._isRangeSupported=!a.disableRange;this._headers=createHeaders(this._stream.httpHeaders);var o=a.url;fetch(o,createFetchOptions(this._headers,this._withCredentials,this._abortController)).then((function(t){if(!(0,l.validateResponseStatus)(t.status))throw(0,l.createResponseStatusError)(t.status,o);r._reader=t.body.getReader();r._headersCapability.resolve();var a=function getResponseHeader(r){return t.headers.get(r)},c=(0,l.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,l.extractFilenameFromHeader)(a);!r._isStreamingSupported&&r._isRangeSupported&&r.cancel(new i.AbortException("Streaming is disabled."))})).catch(this._headersCapability.reject);this.onProgress=null}_createClass(PDFFetchStreamReader,[{key:"read",value:(t=_asyncToGenerator(o.default.mark((function _callee(){var t,r,a,i;return o.default.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:t=o.sent;r=t.value;if(!(a=t.done)){o.next=9;break}return o.abrupt("return",{value:r,done:a});case 9:this._loaded+=r.byteLength;this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength});i=new Uint8Array(r).buffer;return o.abrupt("return",{value:i,done:!1});case 13:case"end":return o.stop()}}),_callee,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._reader&&this._reader.cancel(t);this._abortController&&this._abortController.abort()}},{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}}]);var t;return PDFFetchStreamReader}(),d=function(){function PDFFetchStreamRangeReader(t,r,a){var o=this;_classCallCheck(this,PDFFetchStreamRangeReader);this._stream=t;this._reader=null;this._loaded=0;var c=t.source;this._withCredentials=c.withCredentials||!1;this._readCapability=(0,i.createPromiseCapability)();this._isStreamingSupported=!c.disableStream;"undefined"!=typeof AbortController&&(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,l.validateResponseStatus)(t.status))throw(0,l.createResponseStatusError)(t.status,u);o._readCapability.resolve();o._reader=t.body.getReader()})).catch((function(t){if(!t||"AbortError"!==t.name)throw t}));this.onProgress=null}_createClass(PDFFetchStreamRangeReader,[{key:"read",value:(t=_asyncToGenerator(o.default.mark((function _callee2(){var t,r,a,i;return o.default.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:t=o.sent;r=t.value;if(!(a=t.done)){o.next=9;break}return o.abrupt("return",{value:r,done:a});case 9:this._loaded+=r.byteLength;this.onProgress&&this.onProgress({loaded:this._loaded});i=new Uint8Array(r).buffer;return o.abrupt("return",{value:i,done:!1});case 13:case"end":return o.stop()}}),_callee2,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._reader&&this._reader.cancel(t);this._abortController&&this._abortController.abort()}},{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}}]);var t;return PDFFetchStreamRangeReader}()}])}));