PageSourceSearch

https://app.betrybe.com/static/js/4.8e884329.chunk.js

js betrybe.com collected 2026-09-24 18:30:57 UTC 465,222 bytes, 2 lines download raw bytes

1/*! For license information please see 4.8e884329.chunk.js.LICENSE.txt */
2(this["webpackJsonp@betrybe/student-journey-web"]=this["webpackJsonp@betrybe/student-journey-web"]||[]).push([[4],{1247:function(module,exports,__webpack_require__){(function(Buffer,process,global){var factory;factory=function(){return(()=>{var __webpack_modules__=[,(e,t,r)=>{"use strict";function n(e){return n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.StatTimer=t.RenderingCancelledException=t.PixelsPerInch=t.PageViewport=t.PDFDateString=t.LinkTarget=t.DOMStandardFontDataFactory=t.DOMSVGFactory=t.DOMCanvasFactory=t.DOMCMapReaderFactory=void 0,t.addLinkAttributes=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.url,n=t.target,a=t.rel,o=t.enabled,s=void 0===o||o;(0,i.assert)(r&&"string"===typeof r,'addLinkAttributes: A valid "url" parameter must provided.');var u=(0,i.removeNullCharacters)(r);s?e.href=e.title=u:(e.href="",e.title="Disabled: ".concat(u),e.onclick=function(){return!1});var l="";switch(n){case E.NONE:break;case E.SELF:l="_self";break;case E.BLANK:l="_blank";break;case E.PARENT:l="_parent";break;case E.TOP:l="_top"}e.target=l,e.rel="string"===typeof a?a:_},t.deprecated=function(e){console.log("Deprecated API usage: "+e)},t.getFilenameFromUrl=function(e){var t=e.indexOf("#"),r=e.indexOf("?"),n=Math.min(t>0?t:e.length,r>0?r:e.length);return e.substring(e.lastIndexOf("/",n)+1,n)},t.getPdfFilenameFromUrl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!==typeof e)return t;if(O(e))return(0,i.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;var r=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,n=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,a=r.exec(e),o=n.exec(a[1])||n.exec(a[2])||n.exec(a[3]);if(o&&(o=o[0]).includes("%"))try{o=n.exec(decodeURIComponent(o))[0]}catch(s){}return o||t},t.getXfaPageViewport=function(e,t){var r=t.scale,n=void 0===r?1:r,a=t.rotation,o=void 0===a?0:a,i=e.attributes.style,s=i.width,u=i.height,l=[0,0,parseInt(s),parseInt(u)];return new T({viewBox:l,scale:n,rotation:o})},t.isDataScheme=O,t.isPdfFile=function(e){return"string"===typeof e&&/\.pdf$/i.test(e)},t.isValidFetchUrl=j,t.loadScript=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise((function(r,n){var a=document.createElement("script");a.src=e,a.onload=function(e){t&&a.remove(),r(e)},a.onerror=function(){n(new Error("Cannot load script at: ".concat(a.src)))},(document.head||document.documentElement).appendChild(a)}))};var a,o=(a=r(2))&&a.__esModule?a:{default:a},i=r(4),s=r(135);function u(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"===typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(l){return void r(l)}s.done?t(u):Promise.resolve(u).then(n,a)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){c(o,n,a,i,s,"next",e)}function s(e){c(o,n,a,i,s,"throw",e)}i(void 0)}))}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),e}function v(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}
2function y(e,t){return y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},y(e,t)}function m(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=b(e);if(t){var a=b(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return g(this,r)}}function g(e,t){if(t&&("object"===n(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}var _="noopener noreferrer nofollow",S={CSS:96,PDF:72,get PDF_TO_CSS_UNITS(){return(0,i.shadow)(this,"PDF_TO_CSS_UNITS",this.CSS/this.PDF)}};t.PixelsPerInch=S;var A=function(e){v(r,e);var t=m(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=n.ownerDocument,o=void 0===a?globalThis.document:a;return d(this,r),(e=t.call(this))._document=o,e}return p(r,[{key:"_createCanvas",value:function(e,t){var r=this._document.createElement("canvas");return r.width=e,r.height=t,r}}]),r}(s.BaseCanvasFactory);function w(e){return k.apply(this,arguments)}function k(){return k=f(o.default.mark((function e(t){var r,n,a=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=a.length>1&&void 0!==a[1]&&a[1],!j(t,document.baseURI)){e.next=21;break}return e.next=4,fetch(t);case 4:if((n=e.sent).ok){e.next=7;break}throw new Error(n.statusText);case 7:if(!r){e.next=15;break}return e.t1=Uint8Array,e.next=11,n.arrayBuffer();case 11:e.t2=e.sent,e.t0=new e.t1(e.t2),e.next=20;break;case 15:return e.t3=i.stringToBytes,e.next=18,n.text();case 18:e.t4=e.sent,e.t0=(0,e.t3)(e.t4);case 20:return e.abrupt("return",e.t0);case 21:return e.abrupt("return",new Promise((function(e,n){var a=new XMLHttpRequest;a.open("GET",t,!0),r&&(a.responseType="arraybuffer"),a.onreadystatechange=function(){if(a.readyState===XMLHttpRequest.DONE){var t;if((200===a.status||0===a.status)&&(r&&a.response?t=new Uint8Array(a.response):!r&&a.responseText&&(t=(0,i.stringToBytes)(a.responseText)),t))return void e(t);n(new Error(a.statusText))}},a.send(null)})));case 22:case"end":return e.stop()}}),e)}))),k.apply(this,arguments)}t.DOMCanvasFactory=A;var x=function(e){v(r,e);var t=m(r);function r(){return d(this,r),t.apply(this,arguments)}return p(r,[{key:"_fetchData",value:function(e,t){return w(e,this.isCompressed).then((function(e){return{cMapData:e,compressionType:t}}))}}]),r}(s.BaseCMapReaderFactory);t.DOMCMapReaderFactory=x;var P=function(e){v(r,e);var t=m(r);function r(){return d(this,r),t.apply(this,arguments)}return p(r,[{key:"_fetchData",value:function(e){return w(e,!0)}}]),r}(s.BaseStandardFontDataFactory);t.DOMStandardFontDataFactory=P;var C=function(e){v(r,e);var t=m(r);function r(){return d(this,r),t.apply(this,arguments)}return p(r,[{key:"_createSVG",value:function(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}}]),r}(s.BaseSVGFactory);t.DOMSVGFactory=C;var T=function(){function e(t){var r=t.viewBox,n=t.scale,a=t.rotation,o=t.offsetX,i=void 0===o?0:o,s=t.offsetY,u=void 0===s?0:s,l=t.dontFlip,c=void 0!==l&&l;d(this,e),this.viewBox=r,this.scale=n,this.rotation=a,this.offsetX=i,this.offsetY=u;var f,h,p,v,y,m,g,b,_=(r[2]+r[0])/2,S=(r[3]+r[1])/2;switch((a%=360)<0&&(a+=360),a){case 180:f=-1,h=0,p=0,v=1;break;case 90:f=0,h=1,p=1,v=0;break;case 270:f=0,h=-1,p=-1,v=0;break;case 0:f=1,h=0,p=0,v=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}c&&(p=-p,v=-v),0===f?(y=Math.abs(S-r[1])*n+i,m=Math.abs(_-r[0])*n+u,g=Math.abs(r[3]-r[1])*n,b=Math.abs(r[2]-r[0])*n):(y=Math.abs(_-r[0])*n+i,m=Math.abs(S-r[1])*n+u,g=Math.abs(r[2]-r[0])*n,b=Math.abs(r[3]-r[1])*n),this.transform=[f*n,h*n,p*n,v*n,y-f*n*_-p*n*S,m-h*n*_-v*n*S],this.width=g,this.height=b}return p(e,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.scale,n=void 0===r?this.scale:r,a=t.rotation,o=void 0===a?this.rotation:a,i=t.offsetX,s=void 0===i?this.offsetX:i,u=t.offsetY,l=void 0===u?this.offsetY:u,c=t.dontFlip,f=void 0!==c&&c;return new e({viewBox:this.viewBox.slice(),scale:n,rotation:o,offsetX:s,offsetY:l,dontFlip:f})}},{key:"convertToViewportPoint",value:function(e,t){return i.Util.applyTransform([e,t],this.transform)}},{key:"convertToViewportRectangle",value:function(e){var t=i.Util.applyTransform([e[0],e[1]],this.transform),r=i.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],r[0],r[1]]}},{key:"convertToPdfPoint",value:function(e,t){return i.Util.applyInverseTransform([e,t],this.transform)}}]),e}();t.PageViewport=T;var R=function(e){v(r,e);var t=m(r);function r(e,n){var a;return d(this,r),(a=t.call(this,e,"RenderingCancelledException")).type=n,a}return r}(i.BaseException);t.RenderingCancelledException=R;var E={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};function O(e){for(var t=e.length,r=0;r<t&&""===e[r].trim();)r++;return"data:"===e.substring(r,r+5).toLowerCase()}t.LinkTarget=E;var F,I=function(){function e(){d(this,e),this.started=Object.create(null),this.times=[]}return p(e,[{key:"time",value:function(e){e in this.started&&(0,i.warn)("Timer is already running for ".concat(e)),this.started[e]=Date.now()}},{key:"timeEnd",value:function(e){e in this.started||(0,i.warn)("Timer has not been started for ".concat(e)),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}},{key:"toString",value:function(){var e,t=[],r=0,n=u(this.times);try{for(n.s();!(e=n.n()).done;){var a=e.value.name;a.length>r&&(r=a.length)}}catch(c){n.e(c)}finally{n.f()}var o,i=u(this.times);try{for(i.s();!(o=i.n()).done;){var s=o.value,l=s.end-s.start;t.push("".concat(s.name.padEnd(r)," ").concat(l,"ms\n"))}}catch(c){i.e(c)}finally{i.f()}return t.join("")}}]),e}();function j(e,t){try{var r=(t?new URL(e,t):new URL(e)).protocol;return"http:"===r||"https:"===r}catch(n){return!1}}t.StatTimer=I;var M=function(){function e(){d(this,e)}return p(e,null,[{key:"toDateObject",value:function(e){if(!e||!(0,i.isString)(e))return null;F||(F=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var t=F.exec(e);if(!t)return null;var r=parseInt(t[1],10),n=parseInt(t[2],10);n=n>=1&&n<=12?n-1:0;var a=parseInt(t[3],10);a=a>=1&&a<=31?a:1;var o=parseInt(t[4],10);o=o>=0&&o<=23?o:0;var s=parseInt(t[5],10);s=s>=0&&s<=59?s:0;var u=parseInt(t[6],10);u=u>=0&&u<=59?u:0;var l=t[7]||"Z",c=parseInt(t[8],10);c=c>=0&&c<=23?c:0;var f=parseInt(t[9],10)||0;return f=f>=0&&f<=59?f:0,"-"===l?(o+=c,s+=f):"+"===l&&(o-=c,s-=f),new Date(Date.UTC(r,n,a,o,s,u))}}]),e}();t.PDFDateString=M},(e,t,r)=>{"use strict";e.exports=r(3)},(e,t,r)=>{"use strict";function n(e){return n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var a=function(e){var t,r=Object.prototype,a=r.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}
vendor: 4,193 bytes, line 2
2try{l({},"")}catch(F){l=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof m?t:m,o=Object.create(a.prototype),i=new R(n||[]);return o._invoke=function(e,t,r){var n=d;return function(a,o){if(n===p)throw new Error("Generator is already running");if(n===v){if("throw"===a)throw o;return O()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var s=P(i,r);if(s){if(s===y)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===d)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=f(e,t,r);if("normal"===u.type){if(n=r.done?v:h,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=v,r.method="throw",r.arg=u.arg)}}}(e,r,i),o}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(F){return{type:"throw",arg:F}}}e.wrap=c;var d="suspendedStart",h="suspendedYield",p="executing",v="completed",y={};function m(){}function g(){}function b(){}var _={};l(_,i,(function(){return this}));var S=Object.getPrototypeOf,A=S&&S(S(E([])));A&&A!==r&&a.call(A,i)&&(_=A);var w=b.prototype=m.prototype=Object.create(_);function k(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function r(o,i,s,u){var l=f(e[o],e,i);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"===n(d)&&a.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(d).then((function(e){c.value=e,s(c)}),(function(e){return r("throw",e,s,u)}))}u(l.arg)}var o;this._invoke=function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}}function P(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var a=f(n,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function E(e){if(e){var r=e[i];if(r)return r.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function r(){for(;++n<e.length;)if(a.call(e,n))return r.value=e[n],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}return{next:O}}function O(){return{value:t,done:!0}}return g.prototype=b,l(w,"constructor",b),l(b,"constructor",g),g.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},k(x.prototype),l(x.prototype,s,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(c(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(w),l(w,u,"Generator"),l(w,i,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=E,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;
2var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,a){return s.type="throw",s.arg=e,r.next=n,a&&(r.method="next",r.arg=t),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),l=a.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;T(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:E(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}("object"===n(e=r.nmd(e))?e.exports:{});try{regeneratorRuntime=a}catch(o){"object"===("undefined"===typeof globalThis?"undefined":n(globalThis))?globalThis.regeneratorRuntime=a:Function("r","regeneratorRuntime = r")(a)}},(e,t,r)=>{"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||o(e)||function(){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 o(e,t){if(e){if("string"===typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e){return s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}function c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(e,t)}function f(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=h(e);if(t){var a=h(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return d(this,r)}}function d(e,t){if(t&&("object"===s(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}
2function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.VerbosityLevel=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.UNSUPPORTED_FEATURES=t.TextRenderingMode=t.StreamType=t.RenderingIntentFlag=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.PageActionEventType=t.OPS=t.MissingPDFException=t.IsLittleEndianCached=t.IsEvalSupportedCached=t.InvalidPDFException=t.ImageKind=t.IDENTITY_MATRIX=t.FormatError=t.FontType=t.FONT_IDENTITY_MATRIX=t.DocumentActionEventType=t.CMapCompressionType=t.BaseException=t.AnnotationType=t.AnnotationStateModelType=t.AnnotationReviewState=t.AnnotationReplyType=t.AnnotationMode=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.AnnotationActionEventType=t.AbortException=void 0,t.arrayByteLength=F,t.arraysToBytes=function(e){var t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];for(var r=0,n=0;n<t;n++)r+=F(e[n]);for(var a=0,o=new Uint8Array(r),i=0;i<t;i++){var s=e[i];s instanceof Uint8Array||(s="string"===typeof s?O(s):new Uint8Array(s));var u=s.byteLength;o.set(s,a),a+=u}return o},t.assert=g,t.bytesToString=function(e){g(null!==e&&"object"===s(e)&&void 0!==e.length,"Invalid argument for bytesToString");var t=e.length,r=8192;if(t<r)return String.fromCharCode.apply(null,e);for(var n=[],a=0;a<t;a+=r){var o=Math.min(a+r,t),i=e.subarray(a,o);n.push(String.fromCharCode.apply(null,i))}return n.join("")},t.createObjectURL=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(URL.createObjectURL&&"undefined"!==typeof Blob&&!r)return URL.createObjectURL(new Blob([e],{type:t}));for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a="data:".concat(t,";base64,"),o=0,i=e.length;o<i;o+=3){var s=255&e[o],u=255&e[o+1],l=255&e[o+2],c=s>>2,f=(3&s)<<4|u>>4,d=o+1<i?(15&u)<<2|l>>6:64,h=o+2<i?63&l:64;a+=n[c]+n[f]+n[d]+n[h]}return a},t.createPromiseCapability=function(){var e=Object.create(null),t=!1;return Object.defineProperty(e,"settled",{get:function(){return t}}),e.promise=new Promise((function(r,n){e.resolve=function(e){t=!0,r(e)},e.reject=function(e){t=!0,n(e)}})),e},t.createValidAbsoluteUrl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e)return null;try{if(r&&"string"===typeof e){if(r.addDefaultProtocol&&e.startsWith("www.")){var n=e.match(/\./g);n&&n.length>=2&&(e="http://".concat(e))}if(r.tryConvertEncoding)try{e=N(e)}catch(o){}}var a=t?new URL(e,t):new URL(e);if(b(a))return a}catch(o){}return null},t.escapeString=function(e){return e.replace(/([()\\\n\r])/g,(function(e){return"\n"===e?"\\n":"\r"===e?"\\r":"\\".concat(e)}))},t.getModificationDate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")];return t.join("")},t.getVerbosityLevel=function(){return v},t.info=function(e){v>=p.INFOS&&console.log("Info: ".concat(e))},t.isArrayBuffer=function(e){return"object"===s(e)&&null!==e&&void 0!==e.byteLength},t.isArrayEqual=function(e,t){if(e.length!==t.length)return!1;for(var r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0},t.isAscii=function(e){return/^[\x00-\x7F]*$/.test(e)},t.isBool=function(e){return"boolean"===typeof e},t.isNum=function(e){return"number"===typeof e},t.isSameOrigin=function(e,t){var r;try{if(!(r=new URL(e)).origin||"null"===r.origin)return!1}catch(a){return!1}var n=new URL(t,r);return r.origin===n.origin},t.isString=function(e){return"string"===typeof e},t.objectFromMap=function(e){var t,r,n,a=Object.create(null),i=function(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=o(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,s=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,i=e}
2,f:function(){try{s||null==r.return||r.return()}finally{if(u)throw i}}}}(e);try{for(i.s();!(t=i.n()).done;){var s=(r=t.value,n=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){s=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(r,n)||o(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=s[0],l=s[1];a[u]=l}}catch(c){i.e(c)}finally{i.f()}return a},t.objectSize=function(e){return Object.keys(e).length},t.removeNullCharacters=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"string"!==typeof e?(y("The argument for removeNullCharacters must be a string."),e):(t&&(e=e.replace(E," ")),e.replace(R,""))},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(v=e)},t.shadow=_,t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=O,t.stringToPDFString=function(e){var t=e.length,r=[];if("\xfe"===e[0]&&"\xff"===e[1])for(var n=2;n<t;n+=2)r.push(String.fromCharCode(e.charCodeAt(n)<<8|e.charCodeAt(n+1)));else if("\xff"===e[0]&&"\xfe"===e[1])for(var a=2;a<t;a+=2)r.push(String.fromCharCode(e.charCodeAt(a+1)<<8|e.charCodeAt(a)));else for(var o=0;o<t;++o){var i=L[e.charCodeAt(o)];r.push(i?String.fromCharCode(i):e.charAt(o))}return r.join("")},t.stringToUTF16BEString=function(e){for(var t=["\xfe\xff"],r=0,n=e.length;r<n;r++){var a=e.charCodeAt(r);t.push(String.fromCharCode(a>>8&255),String.fromCharCode(255&a))}return t.join("")},t.stringToUTF8String=N,t.unreachable=m,t.utf8StringToString=function(e){return unescape(encodeURIComponent(e))},t.warn=y,r(5),t.IDENTITY_MATRIX=[1,0,0,1,0,0],t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],t.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},t.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},t.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},t.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},t.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},t.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},t.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"},t.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"},t.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"},t.AnnotationReplyType={GROUP:"Group",REPLY:"R"},t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},t.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864},t.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},t.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},t.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},t.PageActionEventType={O:"PageOpen",C:"PageClose"},t.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"},t.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1STANDARD:"TYPE1STANDARD",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};var p={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=p,t.CMapCompressionType={NONE:0,BINARY:1,STREAM:2}
2,t.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,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},t.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",signatures:"signatures",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",errorFontBuildPath:"errorFontBuildPath",errorFontGetPath:"errorFontGetPath",errorMarkedContent:"errorMarkedContent",errorContentSubStream:"errorContentSubStream"},t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var v=p.WARNINGS;function y(e){v>=p.WARNINGS&&console.log("Warning: ".concat(e))}function m(e){throw new Error(e)}function g(e,t){e||m(t)}function b(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function _(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}var S=function(){function e(t,r){this.constructor===e&&m("Cannot initialize BaseException."),this.message=t,this.name=r}return e.prototype=new Error,e.constructor=e,e}();t.BaseException=S;var A=function(e){l(r,e);var t=f(r);function r(e,n){var a;return u(this,r),(a=t.call(this,e,"PasswordException")).code=n,a}return r}(S);t.PasswordException=A;var w=function(e){l(r,e);var t=f(r);function r(e,n){var a;return u(this,r),(a=t.call(this,e,"UnknownErrorException")).details=n,a}return r}(S);t.UnknownErrorException=w;var k=function(e){l(r,e);var t=f(r);function r(e){return u(this,r),t.call(this,e,"InvalidPDFException")}return r}(S);t.InvalidPDFException=k;var x=function(e){l(r,e);var t=f(r);function r(e){return u(this,r),t.call(this,e,"MissingPDFException")}return r}(S);t.MissingPDFException=x;var P=function(e){l(r,e);var t=f(r);function r(e,n){var a;return u(this,r),(a=t.call(this,e,"UnexpectedResponseException")).status=n,a}return r}(S);t.UnexpectedResponseException=P;var C=function(e){l(r,e);var t=f(r);function r(e){return u(this,r),t.call(this,e,"FormatError")}return r}(S);t.FormatError=C;var T=function(e){l(r,e);var t=f(r);function r(e){return u(this,r),t.call(this,e,"AbortException")}return r}(S);t.AbortException=T;var R=/\x00+/g,E=/[\x01-\x1F]/g;function O(e){g("string"===typeof e,"Invalid argument for stringToBytes");for(var t=e.length,r=new Uint8Array(t),n=0;n<t;++n)r[n]=255&e.charCodeAt(n);return r}function F(e){return void 0!==e.length?e.length:(g(void 0!==e.byteLength,"arrayByteLength - invalid argument."),e.byteLength)}var I={get value(){return _(this,"value",function(){var e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]}())}};t.IsLittleEndianCached=I;var j={get value(){return _(this,"value",function(){try{return new Function(""),!0}catch(e){return!1}}())}};t.IsEvalSupportedCached=j;var M=a(Array(256).keys()).map((function(e){return e.toString(16).padStart(2,"0")})),D=function(){function e(){u(this,e)}var t,r,o;return t=e,o=[{key:"makeHexColor",value:function(e,t,r){return"#".concat(M[e]).concat(M[t]).concat(M[r])}},{key:"transform",value:function(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}},{key:"applyTransform",value:function(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}},{key:"applyInverseTransform",value:function(e,t){var r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]}},{key:"getAxialAlignedBoundingBox",value:function(t,r){var n=e.applyTransform(t,r),a=e.applyTransform(t.slice(2,4),r),o=e.applyTransform([t[0],t[3]],r),i=e.applyTransform([t[2],t[1]],r);return[Math.min(n[0],a[0],o[0],i[0]),Math.min(n[1],a[1],o[1],i[1]),Math.max(n[0],a[0],o[0],i[0]),Math.max(n[1],a[1],o[1],i[1])]}},{key:"inverseTransform",value:function(e){var t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}},{key:"apply3dTransform",value:function(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]]}},{key:"singularValueDecompose2dScale",value:function(e){var t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],n=e[0]*t[1]+e[1]*t[3],a=e[2]*t[0]+e[3]*t[2],o=e[2]*t[1]+e[3]*t[3],i=(r+o)/2,s=Math.sqrt(Math.pow(r+o,2)-4*(r*o-a
2*n))/2,u=i+s||1,l=i-s||1;return[Math.sqrt(u),Math.sqrt(l)]}},{key:"normalizeRect",value:function(e){var t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}},{key:"intersect",value:function(t,r){function n(e,t){return e-t}var a=[t[0],t[2],r[0],r[2]].sort(n),o=[t[1],t[3],r[1],r[3]].sort(n),i=[];return t=e.normalizeRect(t),r=e.normalizeRect(r),a[0]===t[0]&&a[1]===r[0]||a[0]===r[0]&&a[1]===t[0]?(i[0]=a[1],i[2]=a[2],o[0]===t[1]&&o[1]===r[1]||o[0]===r[1]&&o[1]===t[1]?(i[1]=o[1],i[3]=o[2],i):null):null}},{key:"bezierBoundingBox",value:function(e,t,r,n,o,i,s,u){for(var l,c,f,d,h,p,v,y,m=[],g=[[],[]],b=0;b<2;++b)if(0===b?(c=6*e-12*r+6*o,l=-3*e+9*r-9*o+3*s,f=3*r-3*e):(c=6*t-12*n+6*i,l=-3*t+9*n-9*i+3*u,f=3*n-3*t),Math.abs(l)<1e-12){if(Math.abs(c)<1e-12)continue;0<(d=-f/c)&&d<1&&m.push(d)}else v=c*c-4*f*l,y=Math.sqrt(v),v<0||(0<(h=(-c+y)/(2*l))&&h<1&&m.push(h),0<(p=(-c-y)/(2*l))&&p<1&&m.push(p));for(var _,S=m.length,A=S;S--;)_=1-(d=m[S]),g[0][S]=_*_*_*e+3*_*_*d*r+3*_*d*d*o+d*d*d*s,g[1][S]=_*_*_*t+3*_*_*d*n+3*_*d*d*i+d*d*d*u;return g[0][A]=e,g[1][A]=t,g[0][A+1]=s,g[1][A+1]=u,g[0].length=g[1].length=A+2,[Math.min.apply(Math,a(g[0])),Math.min.apply(Math,a(g[1])),Math.max.apply(Math,a(g[0])),Math.max.apply(Math,a(g[1]))]}}],(r=null)&&n(t.prototype,r),o&&n(t,o),e}();t.Util=D;var L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function N(e){return decodeURIComponent(escape(e))}},(e,t,r)=>{"use strict";var n=r(6);"undefined"!==typeof globalThis&&globalThis._pdfjsCompatibilityChecked||("undefined"!==typeof globalThis&&globalThis.Math===Math||(globalThis=r(7)),globalThis._pdfjsCompatibilityChecked=!0,!globalThis.btoa&&n.isNodeJS&&(globalThis.btoa=function(e){return Buffer.from(e,"binary").toString("base64")}),!globalThis.atob&&n.isNodeJS&&(globalThis.atob=function(e){return Buffer.from(e,"base64").toString("binary")}),!globalThis.DOMMatrix&&n.isNodeJS&&(globalThis.DOMMatrix=r(69)),Object.fromEntries||r(70),globalThis.Promise.allSettled||(globalThis.Promise=r(97)),!globalThis.ReadableStream&&n.isNodeJS&&(globalThis.ReadableStream=r(134).ReadableStream))},(e,t)=>{"use strict";function r(e){return r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeJS=void 0;var n="object"===("undefined"===typeof process?"undefined":r(process))&&process+""==="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&"browser"!==process.type);t.isNodeJS=n},(e,t,r)=>{r(8),e.exports=r(10)},(e,t,r)=>{r(9)({global:!0},{globalThis:r(10)})},(e,t,r)=>{var n=r(10),a=r(11).f,o=r(47),i=r(50),s=r(41),u=r(57),l=r(68);e.exports=function(e,t){var r,c,f,d,h,p=e.target,v=e.global,y=e.stat;if(r=v?n:y?n[p]||s(p,{}):(n[p]||{}).prototype)for(c in t){if(d=t[c],f=e.noTargetGet?(h=a(r,c))&&h.value:r[c],!l(v?c:p+(y?".":"#")+c,e.forced)&&void 0!==f){if(typeof d==typeof f)continue;u(d,f)}(e.sham||f&&f.sham)&&o(d,"sham",!0),i(r,c,d,e)}}},e=>{var t=function(e){return e&&e.Math==Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof global&&global)||function(){return this}()||Function("return this")()},(e,t,r)=>{var n=r(12),a=r(14),o=r(15),i=r(16),s=r(17),u=r(22),l=r(42),c=r(45),f=Object.getOwnPropertyDescriptor;t.f=n?f:function(e,t){if(e=s(e),t=u(t),c)try{return f(e,t)}catch(r){}if(l(e,t))return i(!a(o.f,e,t),e[t])}},(e,t,r)=>{var n=r(13);e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},e=>{e.exports=function(e){try{return!!e()}catch(t){return!0}}},e=>{var t=Function.prototype.call;e.exports=t.bind?t.bind(t):function(){return t.apply(t,arguments)}},(e,t)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,a=n&&!r.call({1:2},1);t.f=a?function(e){var t=n(this,e);return!!t&&t.enumerable}:r},e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},(e,t,r)=>{var n=r(18),a=r(21);e.exports=function(e){return n(a(e))}},(e,t,r)=>{var n=r(10),a=r(19),o=r(13),i=r(20),s=n.Object,u=a("".split);e.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?u(e,""):s(e)}:s},e=>{var t=Function.prototype,r=t.bind,n=t.call,a=r&&r.bind(n);e.exports=r?function(e){return e&&a(n,e)}:function(e){return e&&function(){return n.apply(e,arguments)}}},(e,t,r)=>{var n=r(19),a=n({}.toString),o=n("".slice);e.exports=function(e){return o(a(e),8,-1)}},(e,t,r)=>{var n=r(10).TypeError;e.exports=function(e){if(void 0==e)throw n("Can't call method on "+e);return e}},(e,t,r)=>{var n=r(23),a=r(26);e.exports=function(e){var t=n(e,"string");return a(t)?t:t+""}},(e,t,r)=>{var n=r(10),a=r(14),o=r(24),i=r(26),s=r(33),u=r(36),l=r(37),c=n.TypeError,f=l("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var r,n=s(e,f);if(n){if(void 0===t&&(t="default"),r=a(n,e,t),!o(r)||i(r))return r;throw c("Can't convert object to primitive value")}return void 0===t&&(t="number"),u(e,t)}},(e,t,r)=>{var n=r(25);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},e=>{e.exports=function(e){return"function"==typeof e}},(e,t,r)=>{var n=r(10),a=r(27),o=r(25),i=r(28),s=r(29),u=n.Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=a("Symbol");return o(t)&&i(t.prototype,u(e))}},(e,t,r)=>{var n=r(10),a=r(25),o=function(e){return a(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?o(n[e]):n[e]&&n[e][t]}},(e,t,r)=>{var n=r(19);e.exports=n({}.isPrototypeOf)},(e,t,r)=>{var n=r(30);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(e,t,r)=>{var n=r(31),a=r(13);e.exports=!!Object.getOwnPropertySymbols&&!a((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},(e,t,r)=>
vendor: 5,292 bytes, line 2
2{var n,a,o=r(10),i=r(32),s=o.process,u=o.Deno,l=s&&s.versions||u&&u.version,c=l&&l.v8;c&&(a=(n=c.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!a&&i&&(!(n=i.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=i.match(/Chrome\/(\d+)/))&&(a=+n[1]),e.exports=a},(e,t,r)=>{var n=r(27);e.exports=n("navigator","userAgent")||""},(e,t,r)=>{var n=r(34);e.exports=function(e,t){var r=e[t];return null==r?void 0:n(r)}},(e,t,r)=>{var n=r(10),a=r(25),o=r(35),i=n.TypeError;e.exports=function(e){if(a(e))return e;throw i(o(e)+" is not a function")}},(e,t,r)=>{var n=r(10).String;e.exports=function(e){try{return n(e)}catch(t){return"Object"}}},(e,t,r)=>{var n=r(10),a=r(14),o=r(25),i=r(24),s=n.TypeError;e.exports=function(e,t){var r,n;if("string"===t&&o(r=e.toString)&&!i(n=a(r,e)))return n;if(o(r=e.valueOf)&&!i(n=a(r,e)))return n;if("string"!==t&&o(r=e.toString)&&!i(n=a(r,e)))return n;throw s("Can't convert object to primitive value")}},(e,t,r)=>{var n=r(10),a=r(38),o=r(42),i=r(44),s=r(30),u=r(29),l=a("wks"),c=n.Symbol,f=c&&c.for,d=u?c:c&&c.withoutSetter||i;e.exports=function(e){if(!o(l,e)||!s&&"string"!=typeof l[e]){var t="Symbol."+e;s&&o(c,e)?l[e]=c[e]:l[e]=u&&f?f(t):d(t)}return l[e]}},(e,t,r)=>{var n=r(39),a=r(40);(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.3",mode:n?"pure":"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})},e=>{e.exports=!1},(e,t,r)=>{var n=r(10),a=r(41),o="__core-js_shared__",i=n[o]||a(o,{});e.exports=i},(e,t,r)=>{var n=r(10),a=Object.defineProperty;e.exports=function(e,t){try{a(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},(e,t,r)=>{var n=r(19),a=r(43),o=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(a(e),t)}},(e,t,r)=>{var n=r(10),a=r(21),o=n.Object;e.exports=function(e){return o(a(e))}},(e,t,r)=>{var n=r(19),a=0,o=Math.random(),i=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++a+o,36)}},(e,t,r)=>{var n=r(12),a=r(13),o=r(46);e.exports=!n&&!a((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},(e,t,r)=>{var n=r(10),a=r(24),o=n.document,i=a(o)&&a(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},(e,t,r)=>{var n=r(12),a=r(48),o=r(16);e.exports=n?function(e,t,r){return a.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},(e,t,r)=>{var n=r(10),a=r(12),o=r(45),i=r(49),s=r(22),u=n.TypeError,l=Object.defineProperty;t.f=a?l:function(e,t,r){if(i(e),t=s(t),i(r),o)try{return l(e,t,r)}catch(n){}if("get"in r||"set"in r)throw u("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},(e,t,r)=>{var n=r(10),a=r(24),o=n.String,i=n.TypeError;e.exports=function(e){if(a(e))return e;throw i(o(e)+" is not an object")}},(e,t,r)=>{var n=r(10),a=r(25),o=r(42),i=r(47),s=r(41),u=r(51),l=r(52),c=r(56).CONFIGURABLE,f=l.get,d=l.enforce,h=String(String).split("String");(e.exports=function(e,t,r,u){var l,f=!!u&&!!u.unsafe,p=!!u&&!!u.enumerable,v=!!u&&!!u.noTargetGet,y=u&&void 0!==u.name?u.name:t;a(r)&&("Symbol("===String(y).slice(0,7)&&(y="["+String(y).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!o(r,"name")||c&&r.name!==y)&&i(r,"name",y),(l=d(r)).source||(l.source=h.join("string"==typeof y?y:""))),e!==n?(f?!v&&e[t]&&(p=!0):delete e[t],p?e[t]=r:i(e,t,r)):p?e[t]=r:s(t,r)})(Function.prototype,"toString",(function(){return a(this)&&f(this).source||u(this)}))},(e,t,r)=>{var n=r(19),a=r(25),o=r(40),i=n(Function.toString);a(o.inspectSource)||(o.inspectSource=function(e){return i(e)}),e.exports=o.inspectSource},(e,t,r)=>{var n,a,o,i=r(53),s=r(10),u=r(19),l=r(24),c=r(47),f=r(42),d=r(40),h=r(54),p=r(55),v="Object already initialized",y=s.TypeError,m=s.WeakMap;if(i||d.state){var g=d.state||(d.state=new m),b=u(g.get),_=u(g.has),S=u(g.set);n=function(e,t){if(_(g,e))throw new y(v);return t.facade=e,S(g,e,t),t},a=function(e){return b(g,e)||{}},o=function(e){return _(g,e)}}else{var A=h("state");p[A]=!0,n=function(e,t){if(f(e,A))throw new y(v);return t.facade=e,c(e,A,t),t},a=function(e){return f(e,A)?e[A]:{}},o=function(e){return f(e,A)}}e.exports={set:n,get:a,has:o,enforce:function(e){return o(e)?a(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!l(t)||(r=a(t)).type!==e)throw y("Incompatible receiver, "+e+" required");return r}}}},(e,t,r)=>{var n=r(10),a=r(25),o=r(51),i=n.WeakMap;e.exports=a(i)&&/native code/.test(o(i))},(e,t,r)=>{var n=r(38),a=r(44),o=n("keys");e.exports=function(e){return o[e]||(o[e]=a(e))}},e=>{e.exports={}},(e,t,r)=>{var n=r(12),a=r(42),o=Function.prototype,i=n&&Object.getOwnPropertyDescriptor,s=a(o,"name"),u=s&&"something"===function(){}.name,l=s&&(!n||n&&i(o,"name").configurable);e.exports={EXISTS:s,PROPER:u,CONFIGURABLE:l}},(e,t,r)=>{var n=r(42),a=r(58),o=r(11),i=r(48);e.exports=function(e,t){for(var r=a(t),s=i.f,u=o.f,l=0;l<r.length;l++){var c=r[l];n(e,c)||s(e,c,u(t,c))}}},(e,t,r)=>{var n=r(27),a=r(19),o=r(59),i=r(67),s=r(49),u=a([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=o.f(s(e)),r=i.f;return r?u(t,r(e)):t}},(e,t,r)=>{var n=r(60),a=r(66).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,a)}},(e,t,r)=>{var n=r(19),a=r(42),o=r(17),i=r(61).indexOf,s=r(55),u=n([].push);e.exports=function(e,t){var r,n=o(e),l=0,c=[];for(r in n)!a(s,r)&&a(n,r)&&u(c,r);for(;t.length>l;
2)a(n,r=t[l++])&&(~i(c,r)||u(c,r));return c}},(e,t,r)=>{var n=r(17),a=r(62),o=r(64),i=function(e){return function(t,r,i){var s,u=n(t),l=o(u),c=a(i,l);if(e&&r!=r){for(;l>c;)if((s=u[c++])!=s)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===r)return e||c||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},(e,t,r)=>{var n=r(63),a=Math.max,o=Math.min;e.exports=function(e,t){var r=n(e);return r<0?a(r+t,0):o(r,t)}},e=>{var t=Math.ceil,r=Math.floor;e.exports=function(e){var n=+e;return n!==n||0===n?0:(n>0?r:t)(n)}},(e,t,r)=>{var n=r(65);e.exports=function(e){return n(e.length)}},(e,t,r)=>{var n=r(63),a=Math.min;e.exports=function(e){return e>0?a(n(e),9007199254740991):0}},e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(e,t)=>{t.f=Object.getOwnPropertySymbols},(e,t,r)=>{var n=r(13),a=r(25),o=/#|\.prototype\./,i=function(e,t){var r=u[s(e)];return r==c||r!=l&&(a(t)?n(t):!!t)},s=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},u=i.data={},l=i.NATIVE="N",c=i.POLYFILL="P";e.exports=i},(e,t,r)=>{"use strict";var n,a,o;function i(e){return i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}o=function(){function e(e){var t=new f,r=Array.from(e);if(!r.every((function(e){return!Number.isNaN(e)})))throw TypeError('CSSMatrix: "'+e+'" must only have numbers.');if(16===r.length){var n=r[0],a=r[1],o=r[2],i=r[3],s=r[4],u=r[5],l=r[6],c=r[7],d=r[8],h=r[9],p=r[10],v=r[11],y=r[12],m=r[13],g=r[14],b=r[15];t.m11=n,t.a=n,t.m21=s,t.c=s,t.m31=d,t.m41=y,t.e=y,t.m12=a,t.b=a,t.m22=u,t.d=u,t.m32=h,t.m42=m,t.f=m,t.m13=o,t.m23=l,t.m33=p,t.m43=g,t.m14=i,t.m24=c,t.m34=v,t.m44=b}else{if(6!==r.length)throw new TypeError("CSSMatrix: expecting an Array of 6/16 values.");var _=r[0],S=r[1],A=r[2],w=r[3],k=r[4],x=r[5];t.m11=_,t.a=_,t.m12=S,t.b=S,t.m21=A,t.c=A,t.m22=w,t.d=w,t.m41=k,t.e=k,t.m42=x,t.f=x}return t}function t(t){var r=Object.keys(new f);if("object"===i(t)&&r.every((function(e){return e in t})))return e([t.m11,t.m12,t.m13,t.m14,t.m21,t.m22,t.m23,t.m24,t.m31,t.m32,t.m33,t.m34,t.m41,t.m42,t.m43,t.m44]);throw TypeError('CSSMatrix: "'+t+'" is not a DOMMatrix / CSSMatrix / JSON compatible object.')}function r(t){if("string"!==typeof t)throw TypeError('CSSMatrix: "'+t+'" is not a string.');
2var r=String(t).replace(/\s/g,""),n=new f,a='CSSMatrix: invalid transform string "'+t+'"';return r.split(")").filter((function(e){return e})).forEach((function(t){var r=t.split("("),o=r[0],i=r[1];if(!i)throw TypeError(a);var s=i.split(",").map((function(e){return e.includes("rad")?parseFloat(e)*(180/Math.PI):parseFloat(e)})),u=s[0],l=s[1],c=s[2],f=s[3],d=[u,l,c],h=[u,l,c,f];if("perspective"===o&&u&&[l,c].every((function(e){return void 0===e})))n.m34=-1/u;else if(o.includes("matrix")&&[6,16].includes(s.length)&&s.every((function(e){return!Number.isNaN(+e)}))){var p=s.map((function(e){return Math.abs(e)<1e-6?0:e}));n=n.multiply(e(p))}else if("translate3d"===o&&d.every((function(e){return!Number.isNaN(+e)})))n=n.translate(u,l,c);else if("translate"===o&&u&&void 0===c)n=n.translate(u,l||0,0);else if("rotate3d"===o&&h.every((function(e){return!Number.isNaN(+e)}))&&f)n=n.rotateAxisAngle(u,l,c,f);else if("rotate"===o&&u&&[l,c].every((function(e){return void 0===e})))n=n.rotate(0,0,u);else if("scale3d"===o&&d.every((function(e){return!Number.isNaN(+e)}))&&d.some((function(e){return 1!==e})))n=n.scale(u,l,c);else if("scale"!==o||Number.isNaN(u)||1===u||void 0!==c)if("skew"===o&&u&&void 0===c)n=n.skewX(u),n=l?n.skewY(l):n;else{if(!(/[XYZ]/.test(o)&&u&&[l,c].every((function(e){return void 0===e}))&&["translate","rotate","scale","skew"].some((function(e){return o.includes(e)}))))throw TypeError(a);if(["skewX","skewY"].includes(o))n=n[o](u);else{var v=o.replace(/[XYZ]/,""),y=o.replace(v,""),m=["X","Y","Z"].indexOf(y),g=[0===m?u:0,1===m?u:0,2===m?u:0];n=n[v].apply(n,g)}}else{var b=Number.isNaN(+l)?u:l;n=n.scale(u,b,1)}})),n}function n(e,t,r){var n=new f;return n.m41=e,n.e=e,n.m42=t,n.f=t,n.m43=r,n}function a(e,t,r){var n=new f,a=Math.PI/180,o=e*a,i=t*a,s=r*a,u=Math.cos(o),l=-Math.sin(o),c=Math.cos(i),d=-Math.sin(i),h=Math.cos(s),p=-Math.sin(s),v=c*h,y=-c*p;n.m11=v,n.a=v,n.m12=y,n.b=y,n.m13=d;var m=l*d*h+u*p;n.m21=m,n.c=m;var g=u*h-l*d*p;return n.m22=g,n.d=g,n.m23=-l*c,n.m31=l*p-u*d*h,n.m32=l*h+u*d*p,n.m33=u*c,n}function o(e,t,r,n){var a=new f,o=n*(Math.PI/360),i=Math.sin(o),s=Math.cos(o),u=i*i,l=Math.sqrt(e*e+t*t+r*r),c=e,d=t,h=r;0===l?(c=0,d=0,h=1):(c/=l,d/=l,h/=l);var p=c*c,v=d*d,y=h*h,m=1-2*(v+y)*u;a.m11=m,a.a=m;var g=2*(c*d*u+h*i*s);a.m12=g,a.b=g,a.m13=2*(c*h*u-d*i*s);var b=2*(d*c*u-h*i*s);a.m21=b,a.c=b;var _=1-2*(y+p)*u;return a.m22=_,a.d=_,a.m23=2*(d*h*u+c*i*s),a.m31=2*(h*c*u+d*i*s),a.m32=2*(h*d*u-c*i*s),a.m33=1-2*(p+v)*u,a}function s(e,t,r){var n=new f;return n.m11=e,n.a=e,n.m22=t,n.d=t,n.m33=r,n}function u(e){var t=new f,r=e*Math.PI/180,n=Math.tan(r);return t.m21=n,t.c=n,t}function l(e){var t=new f,r=e*Math.PI/180,n=Math.tan(r);return t.m12=n,t.b=n,t}function c(t,r){return e([r.m11*t.m11+r.m12*t.m21+r.m13*t.m31+r.m14*t.m41,r.m11*t.m12+r.m12*t.m22+r.m13*t.m32+r.m14*t.m42,r.m11*t.m13+r.m12*t.m23+r.m13*t.m33+r.m14*t.m43,r.m11*t.m14+r.m12*t.m24+r.m13*t.m34+r.m14*t.m44,r.m21*t.m11+r.m22*t.m21+r.m23*t.m31+r.m24*t.m41,r.m21*t.m12+r.m22*t.m22+r.m23*t.m32+r.m24*t.m42,r.m21*t.m13+r.m22*t.m23+r.m23*t.m33+r.m24*t.m43,r.m21*t.m14+r.m22*t.m24+r.m23*t.m34+r.m24*t.m44,r.m31*t.m11+r.m32*t.m21+r.m33*t.m31+r.m34*t.m41,r.m31*t.m12+r.m32*t.m22+r.m33*t.m32+r.m34*t.m42,r.m31*t.m13+r.m32*t.m23+r.m33*t.m33+r.m34*t.m43,r.m31*t.m14+r.m32*t.m24+r.m33*t.m34+r.m34*t.m44,r.m41*t.m11+r.m42*t.m21+r.m43*t.m31+r.m44*t.m41,r.m41*t.m12+r.m42*t.m22+r.m43*t.m32+r.m44*t.m42,r.m41*t.m13+r.m42*t.m23+r.m43*t.m33+r.m44*t.m43,r.m41*t.m14+r.m42*t.m24+r.m43*t.m34+r.m44*t.m44])}var f=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=this;if(r.a=1,r.b=0,r.c=0,r.d=1,r.e=0,r.f=0,r.m11=1,r.m12=0,r.m13=0,r.m14=0,r.m21=0,r.m22=1,r.m23=0,r.m24=0,r.m31=0,r.m32=0,r.m33=1,r.m34=0,r.m41=0,r.m42=0,r.m43=0,r.m44=1,e&&e.length){var n=[16,6].some((function(t){return t===e.length}))?e:e[0];
2return r.setMatrixValue(n)}return r},d={isIdentity:{configurable:!0},is2D:{configurable:!0}};return d.isIdentity.set=function(e){this.isIdentity=e},d.isIdentity.get=function(){var e=this;return 1===e.m11&&0===e.m12&&0===e.m13&&0===e.m14&&0===e.m21&&1===e.m22&&0===e.m23&&0===e.m24&&0===e.m31&&0===e.m32&&1===e.m33&&0===e.m34&&0===e.m41&&0===e.m42&&0===e.m43&&1===e.m44},d.is2D.get=function(){var e=this;return 0===e.m31&&0===e.m32&&1===e.m33&&0===e.m34&&0===e.m43&&1===e.m44},d.is2D.set=function(e){this.is2D=e},f.prototype.setMatrixValue=function(n){return[Array,Float64Array,Float32Array].some((function(e){return n instanceof e}))?e(n):"string"===typeof n&&n.length&&"none"!==n?r(n):"object"===i(n)?t(n):this},f.prototype.toArray=function(){var e=this,t=Math.pow(10,6);return(e.is2D?[e.a,e.b,e.c,e.d,e.e,e.f]:[e.m11,e.m12,e.m13,e.m14,e.m21,e.m22,e.m23,e.m24,e.m31,e.m32,e.m33,e.m34,e.m41,e.m42,e.m43,e.m44]).map((function(e){return Math.abs(e)<1e-6?0:(e*t>>0)/t}))},f.prototype.toString=function(){var e=this.toArray();return(this.is2D?"matrix":"matrix3d")+"("+e+")"},f.prototype.toJSON=function(){var e=this,t=e.is2D,r=e.isIdentity;return Object.assign({},e,{is2D:t,isIdentity:r})},f.prototype.multiply=function(e){return c(this,e)},f.prototype.translate=function(e,t,r){var a=t,o=r;return void 0===o&&(o=0),void 0===a&&(a=0),c(this,n(e,a,o))},f.prototype.scale=function(e,t,r){var n=t,a=r;return void 0===n&&(n=e),void 0===a&&(a=1),c(this,s(e,n,a))},f.prototype.rotate=function(e,t,r){var n=e,o=t,i=r;return void 0===o&&(o=0),void 0===i&&(i=n,n=0),c(this,a(n,o,i))},f.prototype.rotateAxisAngle=function(e,t,r,n){if([e,t,r,n].some((function(e){return Number.isNaN(e)})))throw new TypeError("CSSMatrix: expecting 4 values");return c(this,o(e,t,r,n))},f.prototype.skewX=function(e){return c(this,u(e))},f.prototype.skewY=function(e){return c(this,l(e))},f.prototype.transformPoint=function(e){var t=n(e.x,e.y,e.z);return t.m44=e.w||1,{x:(t=this.multiply(t)).m41,y:t.m42,z:t.m43,w:t.m44}},f.prototype.transform=function(e){var t=this,r=t.m11*e.x+t.m12*e.y+t.m13*e.z+t.m14*e.w,n=t.m21*e.x+t.m22*e.y+t.m23*e.z+t.m24*e.w,a=t.m31*e.x+t.m32*e.y+t.m33*e.z+t.m34*e.w,o=t.m41*e.x+t.m42*e.y+t.m43*e.z+t.m44*e.w;return{x:r/o,y:n/o,z:a/o,w:o}},Object.defineProperties(f.prototype,d),Object.assign(f,{Translate:n,Rotate:a,RotateAxisAngle:o,Scale:s,SkewX:u,SkewY:l,Multiply:c,fromArray:e,fromMatrix:t,fromString:r}),Object.assign(f,{Version:"0.0.24"}),f},"object"===i(t)?e.exports=o():void 0===(a="function"===typeof(n=o)?n.call(t,r,t,e):n)||(e.exports=a)},(e,t,r)=>{r(71),r(86);var n=r(96);e.exports=n.Object.fromEntries},(e,t,r)=>{"use strict";var n=r(17),a=r(72),o=r(77),i=r(52),s=r(78),u="Array Iterator",l=i.set,c=i.getterFor(u);e.exports=s(Array,"Array",(function(e,t){l(this,{type:u,target:n(e),index:0,kind:t})}),(function(){var e=c(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values"),o.Arguments=o.Array,a("keys"),a("values"),a("entries")},(e,t,r)=>{var n=r(37),a=r(73),o=r(48),i=n("unscopables"),s=Array.prototype;void 0==s[i]&&o.f(s,i,{configurable:!0,value:a(null)}),e.exports=function(e){s[i][e]=!0}},(e,t,r)=>{var n,a=r(49),o=r(74),i=r(66),s=r(55),u=r(76),l=r(46),c=r(54),f=c("IE_PROTO"),d=function(){},h=function(e){return"<script>"+e+"<\/script>"},p=function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t},v=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}v="undefined"!=typeof document?document.domain&&n?p(n):function(){var e,t=l("iframe");return t.style.display="none",u.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F}():p(n);for(var e=i.length;e--;)delete v.prototype[i[e]];return v()};s[f]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(d.prototype=a(e),r=new d,d.prototype=null,r[f]=e):r=v(),void 0===t?r:o(r,t)}},(e,t,r)=>{var n=r(12),a=r(48),o=r(49),i=r(17),s=r(75);e.exports=n?Object.defineProperties:function(e,t){o(e);for(var r,n=i(t),u=s(t),l=u.length,c=0;l>c;)a.f(e,r=u[c++],n[r]);return e}},(e,t,r)=>{var n=r(60),a=r(66);e.exports=Object.keys||function(e){return n(e,a)}},(e,t,r)=>{var n=r(27);e.exports=n("document","documentElement")},e=>{e.exports={}},(e,t,r)=>{"use strict";var n=r(9),a=r(14),o=r(39),i=r(56),s=r(25),u=r(79),l=r(81),c=r(84),f=r(83),d=r(47),h=r(50),p=r(37),v=r(77),y=r(80),m=i.PROPER,g=i.CONFIGURABLE,b=y.IteratorPrototype,_=y.BUGGY_SAFARI_ITERATORS,S=p("iterator"),A="keys",w="values",k="entries",x=function(){return this};
vendor: 1,902 bytes, line 2
2e.exports=function(e,t,r,i,p,y,P){u(r,t,i);var C,T,R,E=function(e){if(e===p&&M)return M;if(!_&&e in I)return I[e];switch(e){case A:case w:case k:return function(){return new r(this,e)}}return function(){return new r(this)}},O=t+" Iterator",F=!1,I=e.prototype,j=I[S]||I["@@iterator"]||p&&I[p],M=!_&&j||E(p),D="Array"==t&&I.entries||j;if(D&&(C=l(D.call(new e)))!==Object.prototype&&C.next&&(o||l(C)===b||(c?c(C,b):s(C[S])||h(C,S,x)),f(C,O,!0,!0),o&&(v[O]=x)),m&&p==w&&j&&j.name!==w&&(!o&&g?d(I,"name",w):(F=!0,M=function(){return a(j,this)})),p)if(T={values:E(w),keys:y?M:E(A),entries:E(k)},P)for(R in T)(_||F||!(R in I))&&h(I,R,T[R]);else n({target:t,proto:!0,forced:_||F},T);return o&&!P||I[S]===M||h(I,S,M,{name:p}),v[t]=M,T}},(e,t,r)=>{"use strict";var n=r(80).IteratorPrototype,a=r(73),o=r(16),i=r(83),s=r(77),u=function(){return this};e.exports=function(e,t,r,l){var c=t+" Iterator";return e.prototype=a(n,{next:o(+!l,r)}),i(e,c,!1,!0),s[c]=u,e}},(e,t,r)=>{"use strict";var n,a,o,i=r(13),s=r(25),u=r(73),l=r(81),c=r(50),f=r(37),d=r(39),h=f("iterator"),p=!1;[].keys&&("next"in(o=[].keys())?(a=l(l(o)))!==Object.prototype&&(n=a):p=!0),void 0==n||i((function(){var e={};return n[h].call(e)!==e}))?n={}:d&&(n=u(n)),s(n[h])||c(n,h,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:p}},(e,t,r)=>{var n=r(10),a=r(42),o=r(25),i=r(43),s=r(54),u=r(82),l=s("IE_PROTO"),c=n.Object,f=c.prototype;e.exports=u?c.getPrototypeOf:function(e){var t=i(e);if(a(t,l))return t[l];var r=t.constructor;return o(r)&&t instanceof r?r.prototype:t instanceof c?f:null}},(e,t,r)=>{var n=r(13);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},(e,t,r)=>{var n=r(48).f,a=r(42),o=r(37)("toStringTag");e.exports=function(e,t,r){e&&!a(e=r?e:e.prototype,o)&&n(e,o,{configurable:!0,value:t})}},(e,t,r)=>{var n=r(19),a=r(49),o=r(85);
2e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(i){}return function(r,n){return a(r),o(n),t?e(r,n):r.__proto__=n,r}}():void 0)},(e,t,r)=>{var n=r(10),a=r(25),o=n.String,i=n.TypeError;e.exports=function(e){if("object"==typeof e||a(e))return e;throw i("Can't set "+o(e)+" as a prototype")}},(e,t,r)=>{var n=r(9),a=r(87),o=r(95);n({target:"Object",stat:!0},{fromEntries:function(e){var t={};return a(e,(function(e,r){o(t,e,r)}),{AS_ENTRIES:!0}),t}})},(e,t,r)=>{var n=r(10),a=r(88),o=r(14),i=r(49),s=r(35),u=r(89),l=r(64),c=r(28),f=r(90),d=r(91),h=r(94),p=n.TypeError,v=function(e,t){this.stopped=e,this.result=t},y=v.prototype;e.exports=function(e,t,r){var n,m,g,b,_,S,A,w=r&&r.that,k=!(!r||!r.AS_ENTRIES),x=!(!r||!r.IS_ITERATOR),P=!(!r||!r.INTERRUPTED),C=a(t,w),T=function(e){return n&&h(n,"normal",e),new v(!0,e)},R=function(e){return k?(i(e),P?C(e[0],e[1],T):C(e[0],e[1])):P?C(e,T):C(e)};if(x)n=e;else{if(!(m=d(e)))throw p(s(e)+" is not iterable");if(u(m)){for(g=0,b=l(e);b>g;g++)if((_=R(e[g]))&&c(y,_))return _;return new v(!1)}n=f(e,m)}for(S=n.next;!(A=o(S,n)).done;){try{_=R(A.value)}catch(E){h(n,"throw",E)}if("object"==typeof _&&_&&c(y,_))return _}return new v(!1)}},(e,t,r)=>{var n=r(19),a=r(34),o=n(n.bind);e.exports=function(e,t){return a(e),void 0===t?e:o?o(e,t):function(){return e.apply(t,arguments)}}},(e,t,r)=>{var n=r(37),a=r(77),o=n("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(a.Array===e||i[o]===e)}},(e,t,r)=>{var n=r(10),a=r(14),o=r(34),i=r(49),s=r(35),u=r(91),l=n.TypeError;e.exports=function(e,t){var r=arguments.length<2?u(e):t;if(o(r))return i(a(r,e));throw l(s(e)+" is not iterable")}},(e,t,r)=>{var n=r(92),a=r(33),o=r(77),i=r(37)("iterator");e.exports=function(e){if(void 0!=e)return a(e,i)||a(e,"@@iterator")||o[n(e)]}},(e,t,r)=>{var n=r(10),a=r(93),o=r(25),i=r(20),s=r(37)("toStringTag"),u=n.Object,l="Arguments"==i(function(){return arguments}());e.exports=a?i:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(r){}}(t=u(e),s))?r:l?i(t):"Object"==(n=i(t))&&o(t.callee)?"Arguments":n}},(e,t,r)=>{var n={};n[r(37)("toStringTag")]="z",e.exports="[object z]"===String(n)},(e,t,r)=>{var n=r(14),a=r(49),o=r(33);e.exports=function(e,t,r){var i,s;a(e);try{if(!(i=o(e,"return"))){if("throw"===t)throw r;return r}i=n(i,e)}catch(u){s=!0,i=u}if("throw"===t)throw r;if(s)throw i;return a(i),r}},(e,t,r)=>{"use strict";var n=r(22),a=r(48),o=r(16);e.exports=function(e,t,r){var i=n(t);i in e?a.f(e,i,o(0,r)):e[i]=r}},(e,t,r)=>{var n=r(10);e.exports=n},(e,t,r)=>{r(98),r(71),r(105),r(107),r(129),r(130),r(131),r(132);var n=r(96);e.exports=n.Promise},(e,t,r)=>{"use strict";var n=r(9),a=r(10),o=r(28),i=r(81),s=r(84),u=r(57),l=r(73),c=r(47),f=r(16),d=r(99),h=r(101),p=r(87),v=r(102),y=r(37),m=r(104),g=y("toStringTag"),b=a.Error,_=[].push,S=function(e,t){var r,n=arguments.length>2?arguments[2]:void 0,a=o(A,this);s?r=s(new b(void 0),a?i(this):A):(r=a?this:l(A),c(r,g,"Error")),c(r,"message",v(t,"")),m&&c(r,"stack",d(r.stack,1)),h(r,n);var u=[];return p(e,_,{that:u}),c(r,"errors",u),r};s?s(S,b):u(S,b);var A=S.prototype=l(b.prototype,{constructor:f(1,S),message:f(1,""),name:f(1,"AggregateError")});n({global:!0},{AggregateError:S})},(e,t,r)=>{var n=r(19),a=r(100),o=n("".replace),i=n("".split),s=n([].join),u=String(Error("zxcasd").stack),l=/\n\s*at [^:]*:[^\n]*/,c=l.test(u),f=/@[^\n]*\n/.test(u)&&!/zxcasd/.test(u);e.exports=function(e,t){if("string"!=typeof e)return e;if(c)for(;t--;)e=o(e,l,"");else if(f)return s(a(i(e,"\n"),t),"\n");return e}},(e,t,r)=>{var n=r(10),a=r(62),o=r(64),i=r(95),s=n.Array,u=Math.max;e.exports=function(e,t,r){for(var n=o(e),l=a(t,n),c=a(void 0===r?n:r,n),f=s(u(c-l,0)),d=0;l<c;l++,d++)i(f,d,e[l]);return f.length=d,f}},(e,t,r)=>{var n=r(24),a=r(47);e.exports=function(e,t){n(t)&&"cause"in t&&a(e,"cause",t.cause)}},(e,t,r)=>{var n=r(103);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:n(e)}},(e,t,r)=>
vendor: 11,396 bytes, line 2
2{var n=r(10),a=r(92),o=n.String;e.exports=function(e){if("Symbol"===a(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},(e,t,r)=>{var n=r(13),a=r(16);e.exports=!n((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",a(1,7)),7!==e.stack)}))},(e,t,r)=>{var n=r(93),a=r(50),o=r(106);n||a(Object.prototype,"toString",o,{unsafe:!0})},(e,t,r)=>{"use strict";var n=r(93),a=r(92);e.exports=n?{}.toString:function(){return"[object "+a(this)+"]"}},(e,t,r)=>{"use strict";var n,a,o,i,s=r(9),u=r(39),l=r(10),c=r(27),f=r(14),d=r(108),h=r(50),p=r(109),v=r(84),y=r(83),m=r(110),g=r(34),b=r(25),_=r(24),S=r(111),A=r(51),w=r(87),k=r(112),x=r(113),P=r(116).set,C=r(121),T=r(124),R=r(126),E=r(125),O=r(127),F=r(52),I=r(68),j=r(37),M=r(128),D=r(120),L=r(31),N=j("species"),q="Promise",B=F.getterFor(q),W=F.set,U=F.getterFor(q),G=d&&d.prototype,z=d,H=G,V=l.TypeError,X=l.document,Y=l.process,K=E.f,Q=K,J=!!(X&&X.createEvent&&l.dispatchEvent),$=b(l.PromiseRejectionEvent),Z="unhandledrejection",ee=!1,te=I(q,(function(){var e=A(z),t=e!==String(z);if(!t&&66===L)return!0;if(u&&!H.finally)return!0;if(L>=51&&/native code/.test(e))return!1;var r=new z((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[N]=n,!(ee=r.then((function(){}))instanceof n)||!t&&M&&!$})),re=te||!k((function(e){z.all(e).catch((function(){}))})),ne=function(e){var t;return!(!_(e)||!b(t=e.then))&&t},ae=function(e,t){if(!e.notified){e.notified=!0;var r=e.reactions;C((function(){for(var n=e.value,a=1==e.state,o=0;r.length>o;){var i,s,u,l=r[o++],c=a?l.ok:l.fail,d=l.resolve,h=l.reject,p=l.domain;try{c?(a||(2===e.rejection&&ue(e),e.rejection=1),!0===c?i=n:(p&&p.enter(),i=c(n),p&&(p.exit(),u=!0)),i===l.promise?h(V("Promise-chain cycle")):(s=ne(i))?f(s,i,d,h):d(i)):h(n)}catch(v){p&&!u&&p.exit(),h(v)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&ie(e)}))}},oe=function(e,t,r){var n,a;J?((n=X.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),l.dispatchEvent(n)):n={promise:t,reason:r},!$&&(a=l["on"+e])?a(n):e===Z&&R("Unhandled promise rejection",r)},ie=function(e){f(P,l,(function(){var t,r=e.facade,n=e.value;if(se(e)&&(t=O((function(){D?Y.emit("unhandledRejection",n,r):oe(Z,r,n)})),e.rejection=D||se(e)?2:1,t.error))throw t.value}))},se=function(e){return 1!==e.rejection&&!e.parent},ue=function(e){f(P,l,(function(){var t=e.facade;D?Y.emit("rejectionHandled",t):oe("rejectionhandled",t,e.value)}))},le=function(e,t,r){return function(n){e(t,n,r)}},ce=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,ae(e,!0))},fe=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw V("Promise can't be resolved itself");var n=ne(t);n?C((function(){var r={done:!1};try{f(n,t,le(fe,r,e),le(ce,r,e))}catch(a){ce(r,a,e)}})):(e.value=t,e.state=1,ae(e,!1))}catch(a){ce({done:!1},a,e)}}};if(te&&(H=(z=function(e){S(this,H),g(e),f(n,this);var t=B(this);try{e(le(fe,t),le(ce,t))}catch(r){ce(t,r)}}).prototype,(n=function(e){W(this,{type:q,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=p(H,{then:function(e,t){var r=U(this),n=r.reactions,a=K(x(this,z));return a.ok=!b(e)||e,a.fail=b(t)&&t,a.domain=D?Y.domain:void 0,r.parent=!0,n[n.length]=a,0!=r.state&&ae(r,!1),a.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new n,t=B(e);this.promise=e,this.resolve=le(fe,t),this.reject=le(ce,t)},E.f=K=function(e){return e===z||e===o?new a(e):Q(e)},!u&&b(d)&&G!==Object.prototype)){i=G.then,ee||(h(G,"then",(function(e,t){var r=this;return new z((function(e,t){f(i,r,e,t)})).then(e,t)}),{unsafe:!0}),h(G,"catch",H.catch,{unsafe:!0}));try{delete G.constructor}catch(de){}v&&v(G,H)}s({global:!0,wrap:!0,forced:te},{Promise:z}),y(z,q,!1,!0),m(q),o=c(q),s({target:q,stat:!0,forced:te},{reject:function(e){var t=K(this);return f(t.reject,void 0,e),t.promise}}),s({target:q,stat:!0,forced:u||te},{resolve:function(e){return T(u&&this===o?z:this,e)}}),s({target:q,stat:!0,forced:re},{all:function(e){var t=this,r=K(t),n=r.resolve,a=r.reject,o=O((function(){var r=g(t.resolve),o=[],i=0,s=1;w(e,(function(e){var u=i++,l=!1;s++,f(r,t,e).then((function(e){l||(l=!0,o[u]=e,--s||n(o))}),a)})),--s||n(o)}));return o.error&&a(o.value),r.promise},race:function(e){var t=this,r=K(t),n=r.reject,a=O((function(){var a=g(t.resolve);w(e,(function(e){f(a,t,e).then(r.resolve,n)}))}));return a.error&&n(a.value),r.promise}})},(e,t,r)=>{var n=r(10);e.exports=n.Promise},(e,t,r)=>{var n=r(50);e.exports=function(e,t,r){for(var a in t)n(e,a,t[a],r);return e}},(e,t,r)=>{"use strict";var n=r(27),a=r(48),o=r(37),i=r(12),s=o("species");e.exports=function(e){var t=n(e),r=a.f;i&&t&&!t[s]&&r(t,s,{configurable:!0,get:function(){return this}})}},(e,t,r)=>{var n=r(10),a=r(28),o=n.TypeError;e.exports=function(e,t){if(a(t,e))return e;throw o("Incorrect invocation")}},(e,t,r)=>{var n=r(37)("iterator"),a=!1;try{var o=0,i={next:function(){return{done:!!o++}},return:function(){a=!0}};i[n]=function(){return this},Array.from(i,(function(){throw 2}))}catch(s){}e.exports=function(e,t){if(!t&&!a)return!1;var r=!1;try{var o={};o[n]=function(){return{next:function(){return{done:r=!0}}}},e(o)}catch(s){}return r}},(e,t,r)=>{var n=r(49),a=r(114),o=r(37)("species");e.exports=function(e,t){var r,i=n(e).constructor;return void 0===i||void 0==(r=n(i)[o])?t:a(r)}},(e,t,r)=>{var n=r(10),a=r(115),o=r(35),i=n.TypeError;e.exports=function(e){if(a(e))return e;throw i(o(e)+" is not a constructor")}},(e,t,r)=>{var n=r(19),a=r(13),o=r(25),i=r(92),s=r(27),u=r(51),l=function(){},c=[],f=s("Reflect","construct"),d=/^\s*(?:class|function)\b/,h=n(d.exec),p=!d.exec(l),v=function(e){if(!o(e))return!1;try{return f(l,c,e),!0}catch(t){return!1}};e.exports=!f||a((function(){var e;return v(v.call)||!v(Object)||!v((function(){e=!0}))||e}))?function(e){if(!o(e))return!1;switch(i(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return p||!!h(d,u(e))}:v},(e,t,r)=>{var n,a,o,i,s=r(10),u=r(117),l=r(88),c=r(25),f=r(42),d=r(13),h=r(76),p=r(118),v=r(46),y=r(119),m=r(120),g=s.setImmediate,b=s.clearImmediate,_=s.process,S=s.Dispatch,A=s.Function,w=s.MessageChannel,k=s.String,x=0,P={},C="onreadystatechange";try{n=s.location}catch(F){}var T=function(e){if(f(P,e)){var t=P[e];delete P[e],t()}},R=function(e){return function(){T(e)}},E=function(e){T(e.data)},O=function(e){s.postMessage(k(e),n.protocol+"//"+n.host)};g&&b||(g=function(e){var t=p(arguments,1);return P[++x]=function(){u(c(e)?e:A(e),void 0,t)},a(x),x},b=function(e){delete P[e]},m?a=function(e){_.nextTick(R(e))}:S&&S.now?a=function(e){S.now(R(e))}:w&&!y?(i=(o=new w).port2,o.port1.onmessage=E,a=l(i.postMessage,i)):s.addEventListener&&c(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!d(O)?(a=O,s.addEventListener("message",E,!1)):a=C in v("script")?function(e){h.appendChild(v("script")).onreadystatechange=function(){h.removeChild(this),T(e)}}:function(e){setTimeout(R(e),0)}),e.exports={set:g,clear:b}},e=>{var t=Function.prototype,r=t.apply,n=t.bind,a=t.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(r):function(){return a.apply(r,arguments)})},(e,t,r)=>{var n=r(19);e.exports=n([].slice)},(e,t,r)=>{var n=r(32);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},(e,t,r)=>{var n=r(20),a=r(10);e.exports="process"==n(a.process)},(e,t,r)=>{var n,a,o,i,s,u,l,c,f=r(10),d=r(88),h=r(11).f,p=r(116).set,v=r(119),y=r(122),m=r(123),g=r(120),b=f.MutationObserver||f.WebKitMutationObserver,_=f.document,S=f.process,A=f.Promise,w=h(f,"queueMicrotask"),k=w&&w.value;k||(n=function(){var e,t;for(g&&(e=S.domain)&&e.exit();a;){t=a.fn,a=a.next;try{t()}catch(r){throw a?i():o=void 0,r}}o=void 0,e&&e.enter()},v||g||m||!b||!_?!y&&A&&A.resolve?((l=A.resolve(void 0)).constructor=A,c=d(l.then,l),i=function(){c(n)}):g?i=function(){S.nextTick(n)}:(p=d(p,f),i=function(){p(n)}):(s=!0,u=_.createTextNode(""),new b(n).observe(u,{characterData:!0}),i=function(){u.data=s=!s})),e.exports=k||function(e){var t={fn:e,next:void 0};o&&(o.next=t),a||(a=t,i()),o=t}},(e,t,r)=>{var n=r(32),a=r(10);e.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==a.Pebble},(e,t,r)=>{var n=r(32);e.exports=/web0s(?!.*chrome)/i.test(n)},(e,t,r)=>{var n=r(49),a=r(24),o=r(125);e.exports=function(e,t){if(n(e),a(t)&&t.constructor===e)return t;var r=o.f(e);return(0,r.resolve)(t),r.promise}},(e,t,r)=>{"use strict";var n=r(34),a=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=n(t),this.reject=n(r)};e.exports.f=function(e){return new a(e)}},(e,t,r)=>{var n=r(10);e.exports=function(e,t){var r=n.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}},e=>{e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},e=>{e.exports="object"==typeof window},(e,t,r)=>{"use strict";var n=r(9),a=r(14),o=r(34),i=r(125),s=r(127),u=r(87);n({target:"Promise",stat:!0},{allSettled:function(e){var t=this,r=i.f(t),n=r.resolve,l=r.reject,c=s((function(){var r=o(t.resolve),i=[],s=0,l=1;u(e,(function(e){var o=s++,u=!1;l++,a(r,t,e).then((function(e){u||(u=!0,i[o]={status:"fulfilled",value:e},--l||n(i))}),(function(e){u||(u=!0,i[o]={status:"rejected",reason:e},--l||n(i))}))})),--l||n(i)}));return c.error&&l(c.value),r.promise}})},(e,t,r)=>{"use strict";var n=r(9),a=r(34),o=r(27),i=r(14),s=r(125),u=r(127),l=r(87),c="No one promise resolved";n({target:"Promise",stat:!0},{any:function(e){var t=this,r=o("AggregateError"),n=s.f(t),f=n.resolve,d=n.reject,h=u((function(){var n=a(t.resolve),o=[],s=0,u=1,h=!1;l(e,(function(e){var a=s++,l=!1;u++,i(n,t,e).then((function(e){l||h||(h=!0,f(e))}),(function(e){l||h||(l=!0,o[a]=e,--u||d(new r(o,c)))}))})),--u||d(new r(o,c))}));return h.error&&d(h.value),n.promise}})},(e,t,r)=>{"use strict";var n=r(9),a=r(39),o=r(108),i=r(13),s=r(27),u=r(25),l=r(113),c=r(124),f=r(50);if(n({target:"Promise",proto:!0,real:!0,forced:!!o&&i((function(){o.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=l(this,s("Promise")),r=u(e);return this.then(r?function(r){return c(t,e()).then((function(){return r}))}:e,r?function(r){return c(t,e()).then((function(){throw r}))}:e)}}),!a&&u(o)){var d=s("Promise").prototype.finally;o.prototype.finally!==d&&f(o.prototype,"finally",d,{unsafe:!0})}},(e,t,r)=>{"use strict";var n=r(133).charAt,a=r(103),o=r(52),i=r(78),s="String Iterator",u=o.set,l=o.getterFor(s);i(String,"String",(function(e){u(this,{type:s,string:a(e),index:0})}),(function(){var e,t=l(this),r=t.string,a=t.index;return a>=r.length?{value:void 0,done:!0}:(e=n(r,a),t.index+=e.length,{value:e,done:!1})}))},(e,t,r)=>{var n=r(19),a=r(63),o=r(103),i=r(21),s=n("".charAt),u=n("".charCodeAt),l=n("".slice),c=function(e){return function(t,r){var n,c,f=o(i(t)),d=a(r),h=f.length;return d<0||d>=h?e?"":void 0:(n=u(f,d))<55296||n>56319||d+1===h||(c=u(f,d+1))<56320||c>57343?e?s(f,d):n:e?l(f,d,d+2):c-56320+(n-55296<<10)+65536}};e.exports={codeAt:c(!1),charAt:c(!0)}},function(e,t){var r;r=function(e){"use strict";var t="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol:function(e){return"Symbol("+e+")"};function r(){}var n="undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof global?global:void 0;function a(e){return"object"===typeof e&&null!==e||"function"===typeof e}
2var o=r,i=Promise,s=Promise.prototype.then,u=Promise.resolve.bind(i),l=Promise.reject.bind(i);function c(e){return new i(e)}function f(e){return u(e)}function d(e){return l(e)}function h(e,t,r){return s.call(e,t,r)}function p(e,t,r){h(h(e,t,r),void 0,o)}function v(e,t){p(e,t)}function y(e,t){p(e,void 0,t)}function m(e,t,r){return h(e,t,r)}function g(e){h(e,void 0,o)}var b=function(){var e=n&&n.queueMicrotask;if("function"===typeof e)return e;var t=f(void 0);return function(e){return h(t,e)}}();function _(e,t,r){if("function"!==typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function S(e,t,r){try{return f(_(e,t,r))}catch(n){return d(n)}}var A=function(){function e(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}return Object.defineProperty(e.prototype,"length",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.push=function(e){var t=this._back,r=t;16383===t._elements.length&&(r={_elements:[],_next:void 0}),t._elements.push(e),r!==t&&(this._back=r,t._next=r),++this._size},e.prototype.shift=function(){var e=this._front,t=e,r=this._cursor,n=r+1,a=e._elements,o=a[r];return 16384===n&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),a[r]=void 0,o},e.prototype.forEach=function(e){for(var t=this._cursor,r=this._front,n=r._elements;(t!==n.length||void 0!==r._next)&&(t!==n.length||(t=0,0!==(n=(r=r._next)._elements).length));)e(n[t]),++t},e.prototype.peek=function(){var e=this._front,t=this._cursor;return e._elements[t]},e}();function w(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?C(e):"closed"===t._state?function(e){C(e),E(e)}(e):T(e,t._storedError)}function k(e,t){return wr(e._ownerReadableStream,t)}function x(e){"readable"===e._ownerReadableStream._state?R(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e,t){T(e,t)}(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function P(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function C(e){e._closedPromise=c((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r}))}function T(e,t){C(e),R(e,t)}function R(e,t){void 0!==e._closedPromise_reject&&(g(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function E(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}var O=t("[[AbortSteps]]"),F=t("[[ErrorSteps]]"),I=t("[[CancelSteps]]"),j=t("[[PullSteps]]"),M=Number.isFinite||function(e){return"number"===typeof e&&isFinite(e)},D=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function L(e,t){if(void 0!==e&&"object"!==typeof(r=e)&&"function"!==typeof r)throw new TypeError(t+" is not an object.");var r}function N(e,t){if("function"!==typeof e)throw new TypeError(t+" is not a function.")}function q(e,t){if(!function(e){return"object"===typeof e&&null!==e||"function"===typeof e}(e))throw new TypeError(t+" is not an object.")}function B(e,t,r){if(void 0===e)throw new TypeError("Parameter "+t+" is required in '"+r+"'.")}function W(e,t,r){if(void 0===e)throw new TypeError(t+" is required in '"+r+"'.")}function U(e){return Number(e)}function G(e){return 0===e?0:e}function z(e,t){var r=Number.MAX_SAFE_INTEGER,n=Number(e);if(n=G(n),!M(n))throw new TypeError(t+" is not a finite number");if((n=function(e){return G(D(e))}(n))<0||n>r)throw new TypeError(t+" is outside the accepted range of 0 to "+r+", inclusive");return M(n)&&0!==n?n:0}function H(e,t){if(!Sr(e))throw new TypeError(t+" is not a ReadableStream.")}function V(e){return new Z(e)}function X(e,t){e._reader._readRequests.push(t)}function Y(e,t,r){var n=e._reader._readRequests.shift();r?n._closeSteps():n._chunkSteps(t)}function K(e){return e._reader._readRequests.length}function Q(e){var t=e._reader;return void 0!==t&&!!ee(t)}var J,$,Z=function(){function e(e){if(B(e,1,"ReadableStreamDefaultReader"),H(e,"First parameter"),Ar(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");w(this,e),this._readRequests=new A}return Object.defineProperty(e.prototype,"closed",{get:function(){return ee(this)?this._closedPromise:d(re("closed"))}
2,enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),ee(this)?void 0===this._ownerReadableStream?d(P("cancel")):k(this,e):d(re("cancel"))},e.prototype.read=function(){if(!ee(this))return d(re("read"));if(void 0===this._ownerReadableStream)return d(P("read from"));var e,t,r=c((function(r,n){e=r,t=n}));return te(this,{_chunkSteps:function(t){return e({value:t,done:!1})},_closeSteps:function(){return e({value:void 0,done:!0})},_errorSteps:function(e){return t(e)}}),r},e.prototype.releaseLock=function(){if(!ee(this))throw re("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");x(this)}},e}();function ee(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")&&e instanceof Z}function te(e,t){var r=e._ownerReadableStream;r._disturbed=!0,"closed"===r._state?t._closeSteps():"errored"===r._state?t._errorSteps(r._storedError):r._readableStreamController[j](t)}function re(e){return new TypeError("ReadableStreamDefaultReader.prototype."+e+" can only be used on a ReadableStreamDefaultReader")}Object.defineProperties(Z.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"===typeof t.toStringTag&&Object.defineProperty(Z.prototype,t.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0}),"symbol"===typeof t.asyncIterator&&((J={})[t.asyncIterator]=function(){return this},$=J,Object.defineProperty($,t.asyncIterator,{enumerable:!1}));var ne=function(){function e(e,t){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=e,this._preventCancel=t}return e.prototype.next=function(){var e=this,t=function(){return e._nextSteps()};return this._ongoingPromise=this._ongoingPromise?m(this._ongoingPromise,t,t):t(),this._ongoingPromise},e.prototype.return=function(e){var t=this,r=function(){return t._returnSteps(e)};return this._ongoingPromise?m(this._ongoingPromise,r,r):r()},e.prototype._nextSteps=function(){var e=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var t,r,n=this._reader;if(void 0===n._ownerReadableStream)return d(P("iterate"));var a=c((function(e,n){t=e,r=n}));return te(n,{_chunkSteps:function(r){e._ongoingPromise=void 0,b((function(){return t({value:r,done:!1})}))},_closeSteps:function(){e._ongoingPromise=void 0,e._isFinished=!0,x(n),t({value:void 0,done:!0})},_errorSteps:function(t){e._ongoingPromise=void 0,e._isFinished=!0,x(n),r(t)}}),a},e.prototype._returnSteps=function(e){if(this._isFinished)return Promise.resolve({value:e,done:!0});this._isFinished=!0;var t=this._reader;if(void 0===t._ownerReadableStream)return d(P("finish iterating"));if(!this._preventCancel){var r=k(t,e);return x(t),m(r,(function(){return{value:e,done:!0}}))}return x(t),f({value:e,done:!0})},e}(),ae={next:function(){return oe(this)?this._asyncIteratorImpl.next():d(ie("next"))},return:function(e){return oe(this)?this._asyncIteratorImpl.return(e):d(ie("return"))}};function oe(e){if(!a(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof ne}catch(J){return!1}}function ie(e){return new TypeError("ReadableStreamAsyncIterator."+e+" can only be used on a ReadableSteamAsyncIterator")}void 0!==$&&Object.setPrototypeOf(ae,$);var se=Number.isNaN||function(e){return e!==e};function ue(e){return e.slice()}function le(e,t,r,n,a){new Uint8Array(e).set(new Uint8Array(r,n,a),t)}function ce(e,t,r){if(e.slice)return e.slice(t,r);var n=r-t,a=new ArrayBuffer(n);return le(a,0,e,t,n),a}function fe(e){var t=ce(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}function de(e){var t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function he(e,t,r){if("number"!==typeof(n=r)||se(n)||n<0||r===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");var n;e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function pe(e){e._queue=new A,e._queueTotalSize=0}var ve=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"view",{get:function(){if(!ge(this))throw Be("view");return this._view}
2,enumerable:!1,configurable:!0}),e.prototype.respond=function(e){if(!ge(this))throw Be("respond");if(B(e,1,"respond"),e=z(e,"First parameter"),void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");this._view.buffer,Le(this._associatedReadableByteStreamController,e)},e.prototype.respondWithNewView=function(e){if(!ge(this))throw Be("respondWithNewView");if(B(e,1,"respondWithNewView"),!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");e.buffer,Ne(this._associatedReadableByteStreamController,e)},e}();Object.defineProperties(ve.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),"symbol"===typeof t.toStringTag&&Object.defineProperty(ve.prototype,t.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var ye=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"byobRequest",{get:function(){if(!me(this))throw We("byobRequest");return Me(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!me(this))throw We("desiredSize");return De(this)},enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!me(this))throw We("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed");Fe(this)},e.prototype.enqueue=function(e){if(!me(this))throw We("enqueue");if(B(e,1,"enqueue"),!ArrayBuffer.isView(e))throw new TypeError("chunk must be an array buffer view");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");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 enqueued to");Ie(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!me(this))throw We("error");je(this,e)},e.prototype[I]=function(e){_e(this),pe(this);var t=this._cancelAlgorithm(e);return Oe(this),t},e.prototype[j]=function(e){var t=this._controlledReadableByteStream;if(this._queueTotalSize>0){var r=this._queue.shift();this._queueTotalSize-=r.byteLength,Pe(this);var n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);e._chunkSteps(n)}else{var a=this._autoAllocateChunkSize;if(void 0!==a){var o=void 0;try{o=new ArrayBuffer(a)}catch(s){return void e._errorSteps(s)}var i={buffer:o,bufferByteLength:a,byteOffset:0,byteLength:a,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(i)}X(t,e),be(this)}},e}();function me(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")&&e instanceof ye}function ge(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")&&e instanceof ve}function be(e){var t=function(e){var t=e._controlledReadableByteStream;return"readable"===t._state&&!e._closeRequested&&!!e._started&&(!!(Q(t)&&K(t)>0)||!!(He(t)&&ze(t)>0)||De(e)>0)}(e);t&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,p(e._pullAlgorithm(),(function(){e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,be(e))}),(function(t){je(e,t)}))))}function _e(e){Ce(e),e._pendingPullIntos=new A}function Se(e,t){var r=!1;"closed"===e._state&&(r=!0);var n=Ae(t);"default"===t.readerType?Y(e,n,r):function(e,t,r){var n=e._reader._readIntoRequests.shift();r?n._closeSteps(t):n._chunkSteps(t)}(e,n,r)}function Ae(e){var t=e.bytesFilled,r=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function we(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function ke(e,t){var r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,a=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),o=t.bytesFilled+a,i=o-o%r,s=a,u=!1;i>n&&(s=i-t.bytesFilled,u=!0);for(var l=e._queue;s>0;){var c=l.peek(),f=Math.min(s,c.byteLength),d=t.byteOffset+t.bytesFilled;le(t.buffer,d,c.buffer,c.byteOffset,f),c.byteLength===f?l.shift():(c.byteOffset+=f,c.byteLength-=f),e._queueTotalSize-=f,xe(0,f,t),s-=f}return u}function xe(e,t,r){r.bytesFilled+=t}function Pe(e){0===e._queueTotalSize&&e._closeRequested?(Oe(e),kr(e._controlledReadableByteStream)):be(e)}function Ce(e){null!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function Te(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos.peek();ke(e,t)&&(Ee(e),Se(e._controlledReadableByteStream,t))}}function Re(e,t){var r=e._pendingPullIntos.peek();Ce(e),"closed"===e._controlledReadableByteStream._state?function(e,t){var r=e._controlledReadableByteStream;if(He(r))for(;ze(r)>0;)Se(r,Ee(e))}(e):function(e,t,r){if(xe(0,t,r),!(r.bytesFilled<r.elementSize)){Ee(e);var n=r.bytesFilled%r.elementSize;if(n>0){var a=r.byteOffset+r.bytesFilled,o=ce(r.buffer,a-n,a);we(e,o,0,o.byteLength)}r.bytesFilled-=n,Se(e._controlledReadableByteStream,r),Te(e)}}(e,t,r),be(e)}function Ee(e){return e._pendingPullIntos.shift()}function Oe(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function Fe(e){var t=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===t._state)if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0&&e._pendingPullIntos.peek().bytesFilled>0){var r=new TypeError("Insufficient bytes to fill elements in the given buffer");throw je(e,r),r}Oe(e),kr(t)}}function Ie(e,t){var r=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===r._state){var n=t.buffer,a=t.byteOffset,o=t.byteLength,i=n;if(e._pendingPullIntos.length>0){var s=e._pendingPullIntos.peek();s.buffer,s.buffer=s.buffer}Ce(e),Q(r)?0===K(r)?we(e,i,a,o):(e._pendingPullIntos.length>0&&Ee(e),Y(r,new Uint8Array(i,a,o),!1)):He(r)?(we(e,i,a,o),Te(e)):we(e,i,a,o),be(e)}}function je(e,t){var r=e._controlledReadableByteStream;"readable"===r._state&&(_e(e),pe(e),Oe(e),xr(r,t))}function Me(e){if(null===e._byobRequest&&e._pendingPullIntos.length>
20){var t=e._pendingPullIntos.peek(),r=new Uint8Array(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),n=Object.create(ve.prototype);!function(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}(n,e,r),e._byobRequest=n}return e._byobRequest}function De(e){var t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Le(e,t){var r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(0===t)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range")}r.buffer=r.buffer,Re(e,t)}function Ne(e,t){var r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t.byteLength)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(0===t.byteLength)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.bufferByteLength!==t.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(r.bytesFilled+t.byteLength>r.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");var n=t.byteLength;r.buffer=t.buffer,Re(e,n)}function qe(e,t,r,n,a,o,i){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,pe(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=o,t._pullAlgorithm=n,t._cancelAlgorithm=a,t._autoAllocateChunkSize=i,t._pendingPullIntos=new A,e._readableStreamController=t,p(f(r()),(function(){t._started=!0,be(t)}),(function(e){je(t,e)}))}function Be(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function We(e){return new TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}function Ue(e){return new Ve(e)}function Ge(e,t){e._reader._readIntoRequests.push(t)}function ze(e){return e._reader._readIntoRequests.length}function He(e){var t=e._reader;return void 0!==t&&!!Xe(t)}Object.defineProperties(ye.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"===typeof t.toStringTag&&Object.defineProperty(ye.prototype,t.toStringTag,{value:"ReadableByteStreamController",configurable:!0});var Ve=function(){function e(e){if(B(e,1,"ReadableStreamBYOBReader"),H(e,"First parameter"),Ar(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!me(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");w(this,e),this._readIntoRequests=new A}return Object.defineProperty(e.prototype,"closed",{get:function(){return Xe(this)?this._closedPromise:d(Ke("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),Xe(this)?void 0===this._ownerReadableStream?d(P("cancel")):k(this,e):d(Ke("cancel"))},e.prototype.read=function(e){if(!Xe(this))return d(Ke("read"));if(!ArrayBuffer.isView(e))return d(new TypeError("view must be an array buffer view"));if(0===e.byteLength)return d(new TypeError("view must have non-zero byteLength"));if(0===e.buffer.byteLength)return d(new TypeError("view's buffer must have non-zero byteLength"));if(e.buffer,void 0===this._ownerReadableStream)return d(P("read from"));var t,r,n=c((function(e,n){t=e,r=n}));return Ye(this,e,{_chunkSteps:function(e){return t({value:e,done:!1})},_closeSteps:function(e){return t({value:e,done:!0})},_errorSteps:function(e){return r(e)}}),n},e.prototype.releaseLock=function(){if(!Xe(this))throw Ke("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");x(this)}},e}();function Xe(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")&&e instanceof Ve}function Ye(e,t,r){var n=e._ownerReadableStream;n._disturbed=!0,"errored"===n._state?r._errorSteps(n._storedError):function(e,t,r){var n=e._controlledReadableByteStream,a=1;
2t.constructor!==DataView&&(a=t.constructor.BYTES_PER_ELEMENT);var o=t.constructor,i=t.buffer,s={buffer:i,bufferByteLength:i.byteLength,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:a,viewConstructor:o,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(s),void Ge(n,r);if("closed"!==n._state){if(e._queueTotalSize>0){if(ke(e,s)){var u=Ae(s);return Pe(e),void r._chunkSteps(u)}if(e._closeRequested){var l=new TypeError("Insufficient bytes to fill elements in the given buffer");return je(e,l),void r._errorSteps(l)}}e._pendingPullIntos.push(s),Ge(n,r),be(e)}else{var c=new o(s.buffer,s.byteOffset,0);r._closeSteps(c)}}(n._readableStreamController,t,r)}function Ke(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}function Qe(e,t){var r=e.highWaterMark;if(void 0===r)return t;if(se(r)||r<0)throw new RangeError("Invalid highWaterMark");return r}function Je(e){var t=e.size;return t||function(){return 1}}function $e(e,t){L(e,t);var r=null===e||void 0===e?void 0:e.highWaterMark,n=null===e||void 0===e?void 0:e.size;return{highWaterMark:void 0===r?void 0:U(r),size:void 0===n?void 0:Ze(n,t+" has member 'size' that")}}function Ze(e,t){return N(e,t),function(t){return U(e(t))}}function et(e,t,r){return N(e,r),function(r){return S(e,t,[r])}}function tt(e,t,r){return N(e,r),function(){return S(e,t,[])}}function rt(e,t,r){return N(e,r),function(r){return _(e,t,[r])}}function nt(e,t,r){return N(e,r),function(r,n){return S(e,t,[r,n])}}function at(e,t){if(!lt(e))throw new TypeError(t+" is not a WritableStream.")}Object.defineProperties(Ve.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"===typeof t.toStringTag&&Object.defineProperty(Ve.prototype,t.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});var ot="function"===typeof AbortController,it=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),void 0===e?e=null:q(e,"First parameter");var r=$e(t,"Second parameter"),n=function(e,t){L(e,t);var r=null===e||void 0===e?void 0:e.abort,n=null===e||void 0===e?void 0:e.close,a=null===e||void 0===e?void 0:e.start,o=null===e||void 0===e?void 0:e.type,i=null===e||void 0===e?void 0:e.write;return{abort:void 0===r?void 0:et(r,e,t+" has member 'abort' that"),close:void 0===n?void 0:tt(n,e,t+" has member 'close' that"),start:void 0===a?void 0:rt(a,e,t+" has member 'start' that"),write:void 0===i?void 0:nt(i,e,t+" has member 'write' that"),type:o}}(e,"First parameter");if(ut(this),void 0!==n.type)throw new RangeError("Invalid type is specified");var a=Je(r);!function(e,t,r,n){var a=Object.create(Ct.prototype),o=function(){},i=function(){return f(void 0)},s=function(){return f(void 0)},u=function(){return f(void 0)};void 0!==t.start&&(o=function(){return t.start(a)}),void 0!==t.write&&(i=function(e){return t.write(e,a)}),void 0!==t.close&&(s=function(){return t.close()}),void 0!==t.abort&&(u=function(e){return t.abort(e)}),Rt(e,a,o,i,s,u,r,n)}(this,n,Qe(r,1),a)}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!lt(this))throw Dt("locked");return ct(this)},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){return void 0===e&&(e=void 0),lt(this)?ct(this)?d(new TypeError("Cannot abort a stream that already has a writer")):ft(this,e):d(Dt("abort"))},e.prototype.close=function(){return lt(this)?ct(this)?d(new TypeError("Cannot close a stream that already has a writer")):yt(this)?d(new TypeError("Cannot close an already-closing stream")):dt(this):d(Dt("close"))},e.prototype.getWriter=function(){if(!lt(this))throw Dt("getWriter");return st(this)},e}();function st(e){return new bt(e)}function ut(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new A,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function lt(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")&&e instanceof it}function ct(e){return void 0!==e._writer}function ft(e,t){var r;if("closed"===e._state||"errored"===e._state)return f(void 0);e._writableStreamController._abortReason=t,null===(r=e._writableStreamController._abortController)||void 0===r||r.abort();var n=e._state;if("closed"===n||"errored"===n)return f(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;var a=!1;"erroring"===n&&(a=!0,t=void 0);var o=c((function(r,n){e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:n,_reason:t,_wasAlreadyErroring:a}}));return e._pendingAbortRequest._promise=o,a||pt(e,t),o}function dt(e){var t=e._state;if("closed"===t||"errored"===t)return d(new TypeError("The stream (in "+t+" state) is not in the writable state and cannot be closed"));var r,n=c((function(t,r){var n={_resolve:t,_reject:r};e._closeRequest=n})),a=e._writer;return void 0!==a&&e._backpressure&&"writable"===t&&Yt(a),he(r=e._writableStreamController,Pt,0),Ft(r),n}function ht(e,t){"writable"!==e._state?vt(e):pt(e,t)}function pt(e,t){var r=e._writableStreamController;e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&wt(n,t),!function(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}(e)&&r._started&&vt(e)}function vt(e){e._state="errored",e._writableStreamController[F]();var t=e._storedError;
vendor: 4,538 bytes, line 2
2if(e._writeRequests.forEach((function(e){e._reject(t)})),e._writeRequests=new A,void 0!==e._pendingAbortRequest){var r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring)return r._reject(t),void mt(e);p(e._writableStreamController[O](r._reason),(function(){r._resolve(),mt(e)}),(function(t){r._reject(t),mt(e)}))}else mt(e)}function yt(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function mt(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);var t=e._writer;void 0!==t&&Ut(t,e._storedError)}function gt(e,t){var r=e._writer;void 0!==r&&t!==e._backpressure&&(t?function(e){zt(e)}(r):Yt(r)),e._backpressure=t}Object.defineProperties(it.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),"symbol"===typeof t.toStringTag&&Object.defineProperty(it.prototype,t.toStringTag,{value:"WritableStream",configurable:!0});var bt=function(){function e(e){if(B(e,1,"WritableStreamDefaultWriter"),at(e,"First parameter"),ct(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;var t,r=e._state;if("writable"===r)!yt(e)&&e._backpressure?zt(this):Vt(this),Bt(this);else if("erroring"===r)Ht(this,e._storedError),Bt(this);else if("closed"===r)Vt(this),Bt(t=this),Gt(t);else{var n=e._storedError;Ht(this,n),Wt(this,n)}}return Object.defineProperty(e.prototype,"closed",{get:function(){return _t(this)?this._closedPromise:d(Nt("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!_t(this))throw Nt("desiredSize");if(void 0===this._ownerWritableStream)throw qt("desiredSize");return function(e){var t=e._ownerWritableStream,r=t._state;return"errored"===r||"erroring"===r?null:"closed"===r?0:Ot(t._writableStreamController)}(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return _t(this)?this._readyPromise:d(Nt("ready"))},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){return void 0===e&&(e=void 0),_t(this)?void 0===this._ownerWritableStream?d(qt("abort")):function(e,t){return ft(e._ownerWritableStream,t)}(this,e):d(Nt("abort"))},e.prototype.close=function(){if(!_t(this))return d(Nt("close"));var e=this._ownerWritableStream;return void 0===e?d(qt("close")):yt(e)?d(new TypeError("Cannot close an already-closing stream")):St(this)},e.prototype.releaseLock=function(){if(!_t(this))throw Nt("releaseLock");void 0!==this._ownerWritableStream&&kt(this)},e.prototype.write=function(e){return void 0===e&&(e=void 0),_t(this)?void 0===this._ownerWritableStream?d(qt("write to")):xt(this,e):d(Nt("write"))},e}();function _t(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")&&e instanceof bt}function St(e){return dt(e._ownerWritableStream)}function At(e,t){"pending"===e._closedPromiseState?Ut(e,t):function(e,t){Wt(e,t)}(e,t)}function wt(e,t){"pending"===e._readyPromiseState?Xt(e,t):function(e,t){Ht(e,t)}(e,t)}function kt(e){var t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");wt(e,r),At(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function xt(e,t){var r=e._ownerWritableStream,n=r._writableStreamController,a=function(e,t){try{return e._strategySizeAlgorithm(t)}catch(r){return It(e,r),1}}(n,t);if(r!==e._ownerWritableStream)return d(qt("write to"));var o=r._state;if("errored"===o)return d(r._storedError);if(yt(r)||"closed"===o)return d(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===o)return d(r._storedError);var i=function(e){return c((function(t,r){var n={_resolve:t,_reject:r};e._writeRequests.push(n)}))}(r);return function(e,t,r){try{he(e,t,r)}catch(a){return void It(e,a)}var n=e._controlledWritableStream;yt(n)||"writable"!==n._state||gt(n,jt(e)),Ft(e)}(n,t,a),i}Object.defineProperties(bt.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),"symbol"===typeof t.toStringTag&&Object.defineProperty(bt.prototype,t.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});var Pt={},Ct=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"abortReason",{get:function(){if(!Tt(this))throw Lt("abortReason");return this._abortReason}
2,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"signal",{get:function(){if(!Tt(this))throw Lt("signal");if(void 0===this._abortController)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal},enumerable:!1,configurable:!0}),e.prototype.error=function(e){if(void 0===e&&(e=void 0),!Tt(this))throw Lt("error");"writable"===this._controlledWritableStream._state&&Mt(this,e)},e.prototype[O]=function(e){var t=this._abortAlgorithm(e);return Et(this),t},e.prototype[F]=function(){pe(this)},e}();function Tt(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")&&e instanceof Ct}function Rt(e,t,r,n,a,o,i,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,pe(t),t._abortReason=void 0,t._abortController=function(){if(ot)return new AbortController}(),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=i,t._writeAlgorithm=n,t._closeAlgorithm=a,t._abortAlgorithm=o;var u=jt(t);gt(e,u),p(f(r()),(function(){t._started=!0,Ft(t)}),(function(r){t._started=!0,ht(e,r)}))}function Et(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Ot(e){return e._strategyHWM-e._queueTotalSize}function Ft(e){var t=e._controlledWritableStream;if(e._started&&void 0===t._inFlightWriteRequest)if("erroring"!==t._state){if(0!==e._queue.length){var r=e._queue.peek().value;r===Pt?function(e){var t=e._controlledWritableStream;(function(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),de(e);var r=e._closeAlgorithm();Et(e),p(r,(function(){!function(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var t=e._writer;void 0!==t&&Gt(t)}(t)}),(function(e){!function(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),ht(e,t)}(t,e)}))}(e):function(e,t){var r=e._controlledWritableStream;(function(e){e._inFlightWriteRequest=e._writeRequests.shift()})(r),p(e._writeAlgorithm(t),(function(){!function(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(r);var t=r._state;if(de(e),!yt(r)&&"writable"===t){var n=jt(e);gt(r,n)}Ft(e)}),(function(t){"writable"===r._state&&Et(e),function(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,ht(e,t)}(r,t)}))}(e,r)}}else vt(t)}function It(e,t){"writable"===e._controlledWritableStream._state&&Mt(e,t)}function jt(e){return Ot(e)<=0}function Mt(e,t){var r=e._controlledWritableStream;Et(e),pt(r,t)}function Dt(e){return new TypeError("WritableStream.prototype."+e+" can only be used on a WritableStream")}function Lt(e){return new TypeError("WritableStreamDefaultController.prototype."+e+" can only be used on a WritableStreamDefaultController")}function Nt(e){return new TypeError("WritableStreamDefaultWriter.prototype."+e+" can only be used on a WritableStreamDefaultWriter")}function qt(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function Bt(e){e._closedPromise=c((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function Wt(e,t){Bt(e),Ut(e,t)}function Ut(e,t){void 0!==e._closedPromise_reject&&(g(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function Gt(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function zt(e){e._readyPromise=c((function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}function Ht(e,t){zt(e),Xt(e,t)}function Vt(e){zt(e),Yt(e)}function Xt(e,t){void 0!==e._readyPromise_reject&&(g(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function Yt(e){void 0!==e._readyPromise_resolve&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}Object.defineProperties(Ct.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),"symbol"===typeof t.toStringTag&&Object.defineProperty(Ct.prototype,t.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});var Kt="undefined"!==typeof DOMException?DOMException:void 0,Qt=function(e){if("function"!==typeof e&&"object"!==typeof e)return!1;try{return new e,!0}catch(J){return!1}}(Kt)?Kt:function(){var e=function(e,t){this.message=e||"",this.name=t||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}();function Jt(e,t,n,a,o,i){var s=V(e),u=st(t);e._disturbed=!0;var l=!1,m=f(void 0);return c((function(b,_){var S,A,w,k;if(void 0!==i){if(S=function(){var r=new Qt("Aborted","AbortError"),n=[];a||n.push((function(){return"writable"===t._state?ft(t,r):f(void 0)})),o||n.push((function(){return"readable"===e._state?wr(e,r):f(void 0)})),R((function(){return Promise.all(n.map((function(e){return e()})))}),!0,r)},i.aborted)return void S();i.addEventListener("abort",S)}if(T(e,s._closedPromise,(function(e){a?E(!0,e):R((function(){return ft(t,e)}),!0,e)})),T(t,u._closedPromise,(function(t){o?E(!0,t):R((function(){return wr(e,t)}),!0,t)})),A=e,w=s._closedPromise,k=function(){n?E():R((function(){return function(e){var t=e._ownerWritableStream,r=t._state;return yt(t)||"closed"===r?f(void 0):"errored"===r?d(t._storedError):St(e)}(u)}))},"closed"===A._state?k():v(w,k),yt(t)||"closed"===t._state){var P=new TypeError("the destination writable stream closed before all data could be piped to it");o?E(!0,P):R((function(){return wr(e,P)}),!0,P)}function C(){var e=m;return h(m,(function(){return e!==m?C():void 0}))}function T(e,t,r){"errored"===e._state?r(e._storedError):y(t,r)}function R(e,r,n){function a(){p(e(),(function(){return O(r,n)}),(function(e){return O(!0,e)}))}l||(l=!0,"writable"!==t._state||yt(t)?a():v(C(),a))}function E(e,r){l||(l=!0,"writable"!==t._state||yt(t)?O(e,r):v(C(),(function(){return O(e,r)})))}function O(e,t){kt(u),x(s),void 0!==i&&i.removeEventListener("abort",S),e?_(t):b(void 0)}g(c((function(e,t){!function n(a){a?e():h(l?f(!0):h(u._readyPromise,(function(){return c((function(e,t){te(s,{_chunkSteps:function(t){m=h(xt(u,t),void 0,r),e(!1)},_closeSteps:function(){return e(!0)},_errorSteps:t})}))})),n,t)}(!1)})))}))}var $t=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Zt(this))throw lr("desiredSize");return ir(this)}
vendor: 5,158 bytes, line 2
2,enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!Zt(this))throw lr("close");if(!sr(this))throw new TypeError("The stream is not in a state that permits close");nr(this)},e.prototype.enqueue=function(e){if(void 0===e&&(e=void 0),!Zt(this))throw lr("enqueue");if(!sr(this))throw new TypeError("The stream is not in a state that permits enqueue");return ar(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!Zt(this))throw lr("error");or(this,e)},e.prototype[I]=function(e){pe(this);var t=this._cancelAlgorithm(e);return rr(this),t},e.prototype[j]=function(e){var t=this._controlledReadableStream;if(this._queue.length>0){var r=de(this);this._closeRequested&&0===this._queue.length?(rr(this),kr(t)):er(this),e._chunkSteps(r)}else X(t,e),er(this)},e}();function Zt(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")&&e instanceof $t}function er(e){tr(e)&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,p(e._pullAlgorithm(),(function(){e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,er(e))}),(function(t){or(e,t)}))))}function tr(e){var t=e._controlledReadableStream;return!!sr(e)&&!!e._started&&(!!(Ar(t)&&K(t)>0)||ir(e)>0)}function rr(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function nr(e){if(sr(e)){var t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(rr(e),kr(t))}}function ar(e,t){if(sr(e)){var r=e._controlledReadableStream;if(Ar(r)&&K(r)>0)Y(r,t,!1);else{var n=void 0;try{n=e._strategySizeAlgorithm(t)}catch(a){throw or(e,a),a}try{he(e,t,n)}catch(o){throw or(e,o),o}}er(e)}}function or(e,t){var r=e._controlledReadableStream;"readable"===r._state&&(pe(e),rr(e),xr(r,t))}function ir(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function sr(e){var t=e._controlledReadableStream._state;return!e._closeRequested&&"readable"===t}function ur(e,t,r,n,a,o,i){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,pe(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=i,t._strategyHWM=o,t._pullAlgorithm=n,t._cancelAlgorithm=a,e._readableStreamController=t,p(f(r()),(function(){t._started=!0,er(t)}),(function(e){or(t,e)}))}function lr(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function cr(e,t){return me(e._readableStreamController)?function(e){var t,r,n,a,o,i=V(e),s=!1,u=!1,l=!1,d=!1,h=!1,p=c((function(e){o=e}));function v(e){y(e._closedPromise,(function(t){e===i&&(je(n._readableStreamController,t),je(a._readableStreamController,t),d&&h||o(void 0))}))}function m(){Xe(i)&&(x(i),v(i=V(e))),te(i,{_chunkSteps:function(t){b((function(){u=!1,l=!1;var r=t,i=t;if(!d&&!h)try{i=fe(t)}catch(c){return je(n._readableStreamController,c),je(a._readableStreamController,c),void o(wr(e,c))}d||Ie(n._readableStreamController,r),h||Ie(a._readableStreamController,i),s=!1,u?_():l&&S()}))},_closeSteps:function(){s=!1,d||Fe(n._readableStreamController),h||Fe(a._readableStreamController),n._readableStreamController._pendingPullIntos.length>0&&Le(n._readableStreamController,0),a._readableStreamController._pendingPullIntos.length>0&&Le(a._readableStreamController,0),d&&h||o(void 0)},_errorSteps:function(){s=!1}})}function g(t,r){ee(i)&&(x(i),v(i=Ue(e)));var c=r?a:n,f=r?n:a;Ye(i,t,{_chunkSteps:function(t){b((function(){u=!1,l=!1;var n=r?h:d;if(r?d:h)n||Ne(c._readableStreamController,t);else{var a=void 0;try{a=fe(t)}catch(i){return je(c._readableStreamController,i),je(f._readableStreamController,i),void o(wr(e,i))}n||Ne(c._readableStreamController,t),Ie(f._readableStreamController,a)}s=!1,u?_():l&&S()}))},_closeSteps:function(e){s=!1;var t=r?h:d,n=r?d:h;t||Fe(c._readableStreamController),n||Fe(f._readableStreamController),void 0!==e&&(t||Ne(c._readableStreamController,e),!n&&f._readableStreamController._pendingPullIntos.length>0&&Le(f._readableStreamController,0)),t&&n||o(void 0)},_errorSteps:function(){s=!1}})}function _(){if(s)return u=!0,f(void 0);s=!0;var e=Me(n._readableStreamController);return null===e?m():g(e._view,!1),f(void 0)}function S(){if(s)return l=!0,f(void 0);s=!0;var e=Me(a._readableStreamController);return null===e?m():g(e._view,!0),f(void 0)}function A(n){if(d=!0,t=n,h){var a=ue([t,r]),i=wr(e,a);o(i)}return p}function w(n){if(h=!0,r=n,d){var a=ue([t,r]),i=wr(e,a);o(i)}return p}function k(){}return n=br(k,_,A),a=br(k,S,w),v(i),[n,a]}(e):function(e,t){var r,n,a,o,i,s=V(e),u=!1,l=!1,d=!1,h=!1,p=c((function(e){i=e}));function v(){return u?(l=!0,f(void 0)):(u=!0,te(s,{_chunkSteps:function(e){b((function(){l=!1;var t=e,r=e;d||ar(a._readableStreamController,t),h||ar(o._readableStreamController,r),u=!1,l&&v()}))},_closeSteps:function(){u=!1,d||nr(a._readableStreamController),h||nr(o._readableStreamController),d&&h||i(void 0)},_errorSteps:function(){u=!1}}),f(void 0))}function m(t){if(d=!0,r=t,h){var a=ue([r,n]),o=wr(e,a);i(o)}return p}function g(t){if(h=!0,n=t,d){var a=ue([r,n]),o=wr(e,a);i(o)}return p}function _(){}return a=gr(_,v,m),o=gr(_,v,g),y(s._closedPromise,(function(e){or
2(a._readableStreamController,e),or(o._readableStreamController,e),d&&h||i(void 0)})),[a,o]}(e)}function fr(e,t,r){return N(e,r),function(r){return S(e,t,[r])}}function dr(e,t,r){return N(e,r),function(r){return S(e,t,[r])}}function hr(e,t,r){return N(e,r),function(r){return _(e,t,[r])}}function pr(e,t){if("bytes"!==(e=""+e))throw new TypeError(t+" '"+e+"' is not a valid enumeration value for ReadableStreamType");return e}function vr(e,t){if("byob"!==(e=""+e))throw new TypeError(t+" '"+e+"' is not a valid enumeration value for ReadableStreamReaderMode");return e}function yr(e,t){L(e,t);var r=null===e||void 0===e?void 0:e.preventAbort,n=null===e||void 0===e?void 0:e.preventCancel,a=null===e||void 0===e?void 0:e.preventClose,o=null===e||void 0===e?void 0:e.signal;return void 0!==o&&function(e,t){if(!function(e){if("object"!==typeof e||null===e)return!1;try{return"boolean"===typeof e.aborted}catch(J){return!1}}(e))throw new TypeError(t+" is not an AbortSignal.")}(o,t+" has member 'signal' that"),{preventAbort:Boolean(r),preventCancel:Boolean(n),preventClose:Boolean(a),signal:o}}Object.defineProperties($t.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"===typeof t.toStringTag&&Object.defineProperty($t.prototype,t.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});var mr=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),void 0===e?e=null:q(e,"First parameter");var r=$e(t,"Second parameter"),n=function(e,t){L(e,t);var r=e,n=null===r||void 0===r?void 0:r.autoAllocateChunkSize,a=null===r||void 0===r?void 0:r.cancel,o=null===r||void 0===r?void 0:r.pull,i=null===r||void 0===r?void 0:r.start,s=null===r||void 0===r?void 0:r.type;return{autoAllocateChunkSize:void 0===n?void 0:z(n,t+" has member 'autoAllocateChunkSize' that"),cancel:void 0===a?void 0:fr(a,r,t+" has member 'cancel' that"),pull:void 0===o?void 0:dr(o,r,t+" has member 'pull' that"),start:void 0===i?void 0:hr(i,r,t+" has member 'start' that"),type:void 0===s?void 0:pr(s,t+" has member 'type' that")}}(e,"First parameter");if(_r(this),"bytes"===n.type){if(void 0!==r.size)throw new RangeError("The strategy for a byte stream cannot have a size function");!function(e,t,r){var n=Object.create(ye.prototype),a=function(){},o=function(){return f(void 0)},i=function(){return f(void 0)};void 0!==t.start&&(a=function(){return t.start(n)}),void 0!==t.pull&&(o=function(){return t.pull(n)}),void 0!==t.cancel&&(i=function(e){return t.cancel(e)});var s=t.autoAllocateChunkSize;if(0===s)throw new TypeError("autoAllocateChunkSize must be greater than 0");qe(e,n,a,o,i,r,s)}(this,n,Qe(r,0))}else{var a=Je(r);!function(e,t,r,n){var a=Object.create($t.prototype),o=function(){},i=function(){return f(void 0)},s=function(){return f(void 0)};void 0!==t.start&&(o=function(){return t.start(a)}),void 0!==t.pull&&(i=function(){return t.pull(a)}),void 0!==t.cancel&&(s=function(e){return t.cancel(e)}),ur(e,a,o,i,s,r,n)}(this,n,Qe(r,1),a)}}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!Sr(this))throw Pr("locked");return Ar(this)},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),Sr(this)?Ar(this)?d(new TypeError("Cannot cancel a stream that already has a reader")):wr(this,e):d(Pr("cancel"))},e.prototype.getReader=function(e){if(void 0===e&&(e=void 0),!Sr(this))throw Pr("getReader");return void 0===function(e,t){L(e,t);var r=null===e||void 0===e?void 0:e.mode;return{mode:void 0===r?void 0:vr(r,t+" has member 'mode' that")}}(e,"First parameter").mode?V(this):Ue(this)},e.prototype.pipeThrough=function(e,t){if(void 0===t&&(t={}),!Sr(this))throw Pr("pipeThrough");B(e,1,"pipeThrough");var r=function(e,t){L(e,t);var r=null===e||void 0===e?void 0:e.readable;W(r,"readable","ReadableWritablePair"),H(r,t+" has member 'readable' that");var n=null===e||void 0===e?void 0:e.writable;return W(n,"writable","ReadableWritablePair"),at(n,t+" has member 'writable' that"),{readable:r,writable:n}}(e,"First parameter"),n=yr(t,"Second parameter");if(Ar(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(ct(r.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return g(Jt(this,r.writable,n.preventClose,n.preventAbort,n.preventCancel,n.signal)),r.readable},e.prototype.pipeTo=function(e,t){if(void 0===t&&(t={}),!Sr(this))return d(Pr("pipeTo"));if(void 0===e)return d("Parameter 1 is required in 'pipeTo'.");if(!lt(e))return d(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var r;try{r=yr(t,"Second parameter")}catch(n){return d(n)}return Ar(this)?d(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):ct(e)?d(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Jt(this,e,r.preventClose,r.preventAbort,r.preventCancel,r.signal)},e.prototype.tee=function(){if(!Sr(this))throw Pr("tee");return ue(cr(this))},e.prototype.values=function(e){if(void 0===e&&(e=void 0),!Sr(this))throw Pr("values");return function(e,t){var r=V(e),n=new ne(r,t),a=Object.create(ae);return a._asyncIteratorImpl=n,a}(this,function(e,t){L(e,t);var r=null===e||void 0===e?void 0:e.preventCancel;return{preventCancel:Boolean(r)}}(e,"First parameter").preventCancel)},e}();function gr(e,t,r,n,a){void 0===n&&(n=1),void 0===a&&(a=function(){return 1});var o=Object.create(mr.prototype);return _r(o),ur(o,Object.create($t.prototype),e,t,r,n,a),o}function br(e,t,r){var n=Object.create(mr.prototype);return _r(n),qe(n,Object.create(ye.prototype),e,t,r,0,void 0),n}function _r(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function Sr(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")&&e instanceof mr}function Ar(e){return void 0!==e._reader}function wr(e,t){if(e._disturbed=!0,"closed"===e._state)return f(void 0);if("errored"===e._state)return d(e._storedError);kr(e);var n=e._reader;
2return void 0!==n&&Xe(n)&&(n._readIntoRequests.forEach((function(e){e._closeSteps(void 0)})),n._readIntoRequests=new A),m(e._readableStreamController[I](t),r)}function kr(e){e._state="closed";var t=e._reader;void 0!==t&&(E(t),ee(t)&&(t._readRequests.forEach((function(e){e._closeSteps()})),t._readRequests=new A))}function xr(e,t){e._state="errored",e._storedError=t;var r=e._reader;void 0!==r&&(R(r,t),ee(r)?(r._readRequests.forEach((function(e){e._errorSteps(t)})),r._readRequests=new A):(r._readIntoRequests.forEach((function(e){e._errorSteps(t)})),r._readIntoRequests=new A))}function Pr(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}function Cr(e,t){L(e,t);var r=null===e||void 0===e?void 0:e.highWaterMark;return W(r,"highWaterMark","QueuingStrategyInit"),{highWaterMark:U(r)}}Object.defineProperties(mr.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),"symbol"===typeof t.toStringTag&&Object.defineProperty(mr.prototype,t.toStringTag,{value:"ReadableStream",configurable:!0}),"symbol"===typeof t.asyncIterator&&Object.defineProperty(mr.prototype,t.asyncIterator,{value:mr.prototype.values,writable:!0,configurable:!0});var Tr=function(e){return e.byteLength};Object.defineProperty(Tr,"name",{value:"size",configurable:!0});var Rr=function(){function e(e){B(e,1,"ByteLengthQueuingStrategy"),e=Cr(e,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=e.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!Or(this))throw Er("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!Or(this))throw Er("size");return Tr},enumerable:!1,configurable:!0}),e}();function Er(e){return new TypeError("ByteLengthQueuingStrategy.prototype."+e+" can only be used on a ByteLengthQueuingStrategy")}function Or(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")&&e instanceof Rr}Object.defineProperties(Rr.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"===typeof t.toStringTag&&Object.defineProperty(Rr.prototype,t.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});var Fr=function(){return 1};Object.defineProperty(Fr,"name",{value:"size",configurable:!0});var Ir=function(){function e(e){B(e,1,"CountQueuingStrategy"),e=Cr(e,"First parameter"),this._countQueuingStrategyHighWaterMark=e.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!Mr(this))throw jr("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!Mr(this))throw jr("size");return Fr},enumerable:!1,configurable:!0}),e}();function jr(e){return new TypeError("CountQueuingStrategy.prototype."+e+" can only be used on a CountQueuingStrategy")}function Mr(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")&&e instanceof Ir}function Dr(e,t,r){return N(e,r),function(r){return S(e,t,[r])}}function Lr(e,t,r){return N(e,r),function(r){return _(e,t,[r])}}function Nr(e,t,r){return N(e,r),function(r,n){return S(e,t,[r,n])}}Object.defineProperties(Ir.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"===typeof t.toStringTag&&Object.defineProperty(Ir.prototype,t.toStringTag,{value:"CountQueuingStrategy",configurable:!0});var qr=function(){function e(e,t,r){void 0===e&&(e={}),void 0===t&&(t={}),void 0===r&&(r={}),void 0===e&&(e=null);var n=$e(t,"Second parameter"),a=$e(r,"Third parameter"),o=function(e,t){L(e,t);var r=null===e||void 0===e?void 0:e.flush,n=null===e||void 0===e?void 0:e.readableType,a=null===e||void 0===e?void 0:e.start,o=null===e||void 0===e?void 0:e.transform,i=null===e||void 0===e?void 0:e.writableType;return{flush:void 0===r?void 0:Dr(r,e,t+" has member 'flush' that"),readableType:n,start:void 0===a?void 0:Lr(a,e,t+" has member 'start' that"),transform:void 0===o?void 0:Nr(o,e,t+" has member 'transform' that"),writableType:i}}(e,"First parameter");if(void 0!==o.readableType)throw new RangeError("Invalid readableType specified");if(void 0!==o.writableType)throw new RangeError("Invalid writableType specified");var i,s=Qe(a,0),u=Je(a),l=Qe(n,1),h=Je(n);!function(e,t,r,n,a,o){function i(){return t}function s(t){return function(e,t){var r=e._transformStreamController;return e._backpressure?m(e._backpressureChangePromise,(function(){var n=e._writable;if("erroring"===n._state)throw n._storedError;return Yr(r,t)})):Yr(r,t)}(e,t)}function u(t){return function(e,t){return Wr(e,t),f(void 0)}(e,t)}function l(){return function(e){var t=e._readable,r=e._transformStreamController,n=r._flushAlgorithm();return Vr(r),m(n,(function(){if("errored"===t._state)throw t._storedError;nr(t._readableStreamController)}),(function(r){throw Wr(e,r),t._storedError}))}(e)}function c(){return function(e){return Gr(e,!1),e._backpressureChangePromise}(e)}function d(t){return Ur(e,t),f(void 0)}e._writable=function(e,t,r,n,a,o){void 0===a&&(a=1),void 0===o&&(o=function(){return 1});var i=Object.create(it.prototype);return ut(i),Rt(i,Object.create(Ct.prototype),e,t,r,n,a,o),i}(i,s,l,u,r,n),e._readable=gr(i,c,d,a,o),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Gr(e,!0),e._transformStreamController=void 0}(this,c((function(e){i=e})),l,h,s,u),function(e,t){var r=Object.create(zr.prototype),n=function(e){try{return Xr(r,e),f(void 0)}catch(t){return d(t)}},a=function(){return f(void 0)};void 0!==t.transform&&(n=function(e){return t.transform(e,r)}),void 0!==t.flush&&(a=function(){return t.flush(r)}),function(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}(e,r,n,a)}(this,o),void 0!==o.start?i(o.start(this._transformStreamController)):i(void 0)}return Object.defineProperty(e.prototype,"readable",{get:function(){if(!Br(this))throw Qr("readable");return this._readable}
2,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"writable",{get:function(){if(!Br(this))throw Qr("writable");return this._writable},enumerable:!1,configurable:!0}),e}();function Br(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")&&e instanceof qr}function Wr(e,t){or(e._readable._readableStreamController,t),Ur(e,t)}function Ur(e,t){Vr(e._transformStreamController),It(e._writable._writableStreamController,t),e._backpressure&&Gr(e,!1)}function Gr(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=c((function(t){e._backpressureChangePromise_resolve=t})),e._backpressure=t}Object.defineProperties(qr.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"===typeof t.toStringTag&&Object.defineProperty(qr.prototype,t.toStringTag,{value:"TransformStream",configurable:!0});var zr=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Hr(this))throw Kr("desiredSize");return ir(this._controlledTransformStream._readable._readableStreamController)},enumerable:!1,configurable:!0}),e.prototype.enqueue=function(e){if(void 0===e&&(e=void 0),!Hr(this))throw Kr("enqueue");Xr(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!Hr(this))throw Kr("error");var t;t=e,Wr(this._controlledTransformStream,t)},e.prototype.terminate=function(){if(!Hr(this))throw Kr("terminate");!function(e){var t=e._controlledTransformStream;nr(t._readable._readableStreamController);var r=new TypeError("TransformStream terminated");Ur(t,r)}(this)},e}();function Hr(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")&&e instanceof zr}function Vr(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0}function Xr(e,t){var r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!sr(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{ar(n,t)}catch(o){throw Ur(r,o),r._readable._storedError}var a=function(e){return!tr(e)}(n);a!==r._backpressure&&Gr(r,!0)}function Yr(e,t){return m(e._transformAlgorithm(t),void 0,(function(t){throw Wr(e._controlledTransformStream,t),t}))}function Kr(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function Qr(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}Object.defineProperties(zr.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"===typeof t.toStringTag&&Object.defineProperty(zr.prototype,t.toStringTag,{value:"TransformStreamDefaultController",configurable:!0}),e.ByteLengthQueuingStrategy=Rr,e.CountQueuingStrategy=Ir,e.ReadableByteStreamController=ye,e.ReadableStream=mr,e.ReadableStreamBYOBReader=Ve,e.ReadableStreamBYOBRequest=ve,e.ReadableStreamDefaultController=$t,e.ReadableStreamDefaultReader=Z,e.TransformStream=qr,e.TransformStreamDefaultController=zr,e.WritableStream=it,e.WritableStreamDefaultController=Ct,e.WritableStreamDefaultWriter=bt,Object.defineProperty(e,"__esModule",{value:!0})},r(t)},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseStandardFontDataFactory=t.BaseSVGFactory=t.BaseCanvasFactory=t.BaseCMapReaderFactory=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},o=r(4);function i(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(l){return void r(l)}s.done?t(u):Promise.resolve(u).then(n,a)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function s(e){i(o,n,a,s,u,"next",e)}function u(e){i(o,n,a,s,u,"throw",e)}s(void 0)}))}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),e}var f=function(){function e(){u(this,e),this.constructor===e&&(0,o.unreachable)("Cannot initialize BaseCanvasFactory.")}return c(e,[{key:"create",value:function(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");var r=this._createCanvas(e,t);return{canvas:r,context:r.getContext("2d")}}},{key:"reset",value:function(e,t,r){if(!e.canvas)throw new Error("Canvas is not specified");if(t<=0||r<=0)throw new Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=r}},{key:"destroy",value:function(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}},{key:"_createCanvas",value:function(e,t){(0,o.unreachable)("Abstract method `_createCanvas` called.")}}]),e}();t.BaseCanvasFactory=f;var d=function(){function e(t){var r=t.baseUrl,n=void 0===r?null:r,a=t.isCompressed,i=void 0!==a&&a;u(this,e),this.constructor===e&&(0,o.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=n,this.isCompressed=i}return c(e,[{key:"fetch",value:function(){var e=s(a.default.mark((function e(t){var r,n,i,s=this;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.name,this.baseUrl){e.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){e.next=5;break}throw new Error("CMap name must be specified.");case 5:return n=this.baseUrl+r+(this.isCompressed?".bcmap":""),i=this.isCompressed?o.CMapCompressionType.BINARY:o.CMapCompressionType.NONE,e.abrupt("return",this._fetchData(n,i).catch((function(e){throw new Error("Unable to load ".concat(s.isCompressed?"binary ":"","CMap at: ").concat(n))})));case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_fetchData",value:function(e,t){(0,o.unreachable)("Abstract method `_fetchData` called.")}}]),e}();t.BaseCMapReaderFactory=d;var h=function(){function e(t){var r=t.baseUrl,n=void 0===r?null:r;u(this,e),this.constructor===e&&(0,o.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=n}return c(e,[{key:"fetch",value:function(){var e=s(a.default.mark((function e(t){var r,n;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.filename,this.baseUrl){e.next=3;break}throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');case 3:if(r){e.next=5;break}throw new Error("Font filename must be specified.");case 5:return n="".concat(this.baseUrl).concat(r),e.abrupt("return",this._fetchData(n).catch((function(e){throw new Error("Unable to load font data at: ".concat(n))})));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_fetchData",value:function(e){(0,o.unreachable)("Abstract method `_fetchData` called.")}}]),e}();t.BaseStandardFontDataFactory=h;var p=function(){function e(){u(this,e),this.constructor===e&&(0,o.unreachable)("Cannot initialize BaseSVGFactory.")}return c(e,[{key:"create",value:function(e,t){if(e<=0||t<=0)throw new Error("Invalid SVG dimensions");var r=this._createSVG("svg:svg");return r.setAttribute("version","1.1"),r.setAttribute("width","".concat(e,"px")),r.setAttribute("height","".concat(t,"px")),r.setAttribute("preserveAspectRatio","none"),r.setAttribute("viewBox","0 0 ".concat(e," ").concat(t)),r}},{key:"createElement",value:function(e){if("string"!==typeof e)throw new Error("Invalid SVG element type");return this._createSVG(e)}},{key:"_createSVG",value:function(e){(0,o.unreachable)("Abstract method `_createSVG` called.")}}]),e}();t.BaseSVGFactory=p},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.build=exports.RenderTask=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0,exports.getDocument=getDocument,exports.setPDFNetworkStreamFactory=setPDFNetworkStreamFactory,exports.version=void 0;var _regenerator=_interopRequireDefault(__w_pdfjs_require__(2)),_util=__w_pdfjs_require__(4),_display_utils=__w_pdfjs_require__(1),_font_loader=__w_pdfjs_require__(137),_node_utils=__w_pdfjs_require__(138),_annotation_storage=__w_pdfjs_require__(139),_canvas=__w_pdfjs_require__(140),_worker_options=__w_pdfjs_require__(142),_is_node=__w_pdfjs_require__(6),_message_handler=__w_pdfjs_require__(143),_metadata=__w_pdfjs_require__(144),_optional_content_config=__w_pdfjs_require__(145),_transport_stream=__w_pdfjs_require__(146),_xfa_text=__w_pdfjs_require__(147);
2function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classPrivateFieldInitSpec(e,t,r){_checkPrivateRedeclaration(e,t),t.set(e,r)}function _checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(e,t,r){return _classApplyDescriptorSet(e,_classExtractFieldDescriptor(e,t,"set"),r),r}function _classApplyDescriptorSet(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}function _classPrivateFieldGet(e,t){return _classApplyDescriptorGet(e,_classExtractFieldDescriptor(e,t,"get"))}function _classExtractFieldDescriptor(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function _classApplyDescriptorGet(e,t){return t.get?t.get.call(e):t.value}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_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(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _createForOfIteratorHelper(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function asyncGeneratorStep(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(l){return void r(l)}s.done?t(u):Promise.resolve(u).then(n,a)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){asyncGeneratorStep(o,n,a,i,s,"next",e)}function s(e){asyncGeneratorStep(o,n,a,i,s,"throw",e)}i(void 0)}))}}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_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(e,t){if(e){if("string"===typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){s=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _typeof(e){return _typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}var DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DefaultCanvasFactory=_is_node.isNodeJS?_node_utils.NodeCanvasFactory:_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;var DefaultCMapReaderFactory=_is_node.isNodeJS?_node_utils.NodeCMapReaderFactory:_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;var DefaultStandardFontDataFactory=_is_node.isNodeJS?_node_utils.NodeStandardFontDataFactory:_display_utils.DOMStandardFontDataFactory,createPDFNetworkStream;function setPDFNetworkStreamFactory(e){createPDFNetworkStream=e}function getDocument(e){var t,r=new PDFDocumentLoadingTask;if("string"===typeof e||e instanceof URL)t={url:e};else if((0,_util.isArrayBuffer)(e))t={data:e};else if(e instanceof PDFDataRangeTransport)t={range:e};else{if("object"!==_typeof(e))throw new Error("Invalid parameter in getDocument, need either string, URL, Uint8Array, or parameter object.");if(!e.url&&!e.data&&!e.range)throw new Error("Invalid parameter object: need either .data, .range or .url");t=e}var n=Object.create(null),a=null,o=null;for(var i in t){var s=t[i];switch(i){case"url":if("undefined"!==typeof window)try{n[i]=new URL(s,window.location).href;continue}catch(c){(0,_util.warn)('Cannot create valid URL: "'.concat(c,'".'))}else if("string"===typeof s||s instanceof URL){n[i]=s.toString();continue}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.");case"range":a=s;continue;case"worker":o=s;continue;case"data":if(_is_node.isNodeJS&&"undefined"!==typeof Buffer&&s instanceof Buffer)n[i]=new Uint8Array(s);else{if(s instanceof Uint8Array)break;if("string"===typeof s)n[i]=(0,_util.stringToBytes)(s);else if("object"!==_typeof(s)||null===s||isNaN(s.length)){if(!(0,_util.isArrayBuffer)(s))throw new Error("Invalid PDF binary data: either typed array, string, or array-like object is expected in the data property.");n[i]=new Uint8Array(s)}else n[i]=new Uint8Array(s)}continue}n[i]=s}if(n.rangeChunkSize=n.rangeChunkSize||DEFAULT_RANGE_CHUNK_SIZE,n.CM
2apReaderFactory=n.CMapReaderFactory||DefaultCMapReaderFactory,n.StandardFontDataFactory=n.StandardFontDataFactory||DefaultStandardFontDataFactory,n.ignoreErrors=!0!==n.stopAtErrors,n.fontExtraProperties=!0===n.fontExtraProperties,n.pdfBug=!0===n.pdfBug,n.enableXfa=!0===n.enableXfa,("string"!==typeof n.docBaseUrl||(0,_display_utils.isDataScheme)(n.docBaseUrl))&&(n.docBaseUrl=null),Number.isInteger(n.maxImageSize)||(n.maxImageSize=-1),"boolean"!==typeof n.useWorkerFetch&&(n.useWorkerFetch=n.CMapReaderFactory===_display_utils.DOMCMapReaderFactory&&n.StandardFontDataFactory===_display_utils.DOMStandardFontDataFactory),"boolean"!==typeof n.isEvalSupported&&(n.isEvalSupported=!0),"boolean"!==typeof n.disableFontFace&&(n.disableFontFace=_is_node.isNodeJS),"boolean"!==typeof n.useSystemFonts&&(n.useSystemFonts=!_is_node.isNodeJS&&!n.disableFontFace),"undefined"===typeof n.ownerDocument&&(n.ownerDocument=globalThis.document),"boolean"!==typeof n.disableRange&&(n.disableRange=!1),"boolean"!==typeof n.disableStream&&(n.disableStream=!1),"boolean"!==typeof n.disableAutoFetch&&(n.disableAutoFetch=!1),(0,_util.setVerbosityLevel)(n.verbosity),!o){var u={verbosity:n.verbosity,port:_worker_options.GlobalWorkerOptions.workerPort};o=u.port?PDFWorker.fromPort(u):new PDFWorker(u),r._worker=o}var l=r.docId;return o.promise.then((function(){if(r.destroyed)throw new Error("Loading aborted");var e=_fetchDocument(o,n,a,l),t=new Promise((function(e){var t;a?t=new _transport_stream.PDFDataTransportStream({length:n.length,initialData:n.initialData,progressiveDone:n.progressiveDone,contentDispositionFilename:n.contentDispositionFilename,disableRange:n.disableRange,disableStream:n.disableStream},a):n.data||(t=createPDFNetworkStream({url:n.url,length:n.length,httpHeaders:n.httpHeaders,withCredentials:n.withCredentials,rangeChunkSize:n.rangeChunkSize,disableRange:n.disableRange,disableStream:n.disableStream})),e(t)}));return Promise.all([e,t]).then((function(e){var t=_slicedToArray(e,2),a=t[0],i=t[1];if(r.destroyed)throw new Error("Loading aborted");var s=new _message_handler.MessageHandler(l,a,o.port),u=new WorkerTransport(s,r,i,n);r._transport=u,s.send("Ready",null)}))})).catch(r._capability.reject),r}function _fetchDocument(e,t,r,n){return _fetchDocument2.apply(this,arguments)}function _fetchDocument2(){return(_fetchDocument2=_asyncToGenerator(_regenerator.default.mark((function e(t,r,n,a){var o;return _regenerator.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.destroyed){e.next=2;break}throw new Error("Worker was destroyed");case 2:return n&&(r.length=n.length,r.initialData=n.initialData,r.progressiveDone=n.progressiveDone,r.contentDispositionFilename=n.contentDispositionFilename),e.next=5,t.messageHandler.sendWithPromise("GetDocRequest",{docId:a,apiVersion:"2.12.313",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,docBaseUrl:r.docBaseUrl,ignoreErrors:r.ignoreErrors,isEvalSupported:r.isEvalSupported,fontExtraProperties:r.fontExtraProperties,enableXfa:r.enableXfa,useSystemFonts:r.useSystemFonts,cMapUrl:r.useWorkerFetch?r.cMapUrl:null,standardFontDataUrl:r.useWorkerFetch?r.standardFontDataUrl:null});case 5:if(o=e.sent,!t.destroyed){e.next=8;break}throw new Error("Worker was destroyed");case 8:return e.abrupt("return",o);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory;var PDFDocumentLoadingTask=function(){function e(){_classCallCheck(this,e),this._capability=(0,_util.createPromiseCapability)(),this._transport=null,this._worker=null,this.docId="d".concat(e.idCounters.doc++),this.destroyed=!1,this.onPassword=null,this.onProgress=null,this.onUnsupportedFeature=null}return _createClass(e,[{key:"promise",get:function(){return this._capability.promise}},{key:"destroy",value:function(){var e=_asyncToGenerator(_regenerator.default.mark((function e(){var t;return _regenerator.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.destroyed=!0,e.next=3,null===(t=this._transport)||void 0===t?void 0:t.destroy();case 3:this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}],[{key:"idCounters",get:function(){return(0,_util.shadow)(this,"idCounters",{doc:0})}}]),e}();exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;var PDFDataRangeTransport=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;_classCallCheck(this,e),this.length=t,this.initialData=r,this.progressiveDone=n,this.contentDispositionFilename=a,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,_util.createPromiseCapability)()}return _createClass(e,[{key:"addRangeListener",value:function(e){this._rangeListeners.push(e)}},{key:"addProgressListener",value:function(e){this._progressListeners.push(e)}},{key:"addProgressiveReadListener",value:function(e){this._progressiveReadListeners.push(e)}},{key:"addProgressiveDoneListener",value:function(e){this._progressiveDoneListeners.push(e)}},{key:"onDataRange",value:function(e,t){var r,n=_createForOfIteratorHelper(this._rangeListeners);try{for(n.s();!(r=n.n()).done;)(0,r.value)(e,t)}catch(a){n.e(a)}finally{n.f()}}},{key:"onDataProgress",value:function(e,t){var r=this;this._readyCapability.promise.then((function(){var n,a=_createForOfIteratorHelper(r._progressListeners);try{for(a.s();!(n=a.n()).done;)(0,n.value)(e,t)}catch(o){a.e(o)}finally{a.f()}}))}},{key:"onDataProgressiveRead",value:function(e){var t=this;this._readyCapability.promise.then((function(){var r,n=_createForOfIteratorHelper(t._progressiveReadListeners);try{for(n.s();!(r=n.n()).done;)(0,r.value)(e)}catch(a){n.e(a)}finally{n.f()}}))}},{key:"onDataProgressiveDone",value:function(){var e=this;this._readyCapability.promise.then((function(){var t,r=_createForOfIteratorHelper(e._progressiveDoneListeners);try{for(r.s();!(t=r.n()).done;)(0,t.value)()}catch(n){r.e(n)}finally{r.f()}}))}},{key:"transportReady",value:function(){this._readyCapability.resolve()}},{key:"requestDataRange",value:function(e,t){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}},{key:"abort",value:function(){}}]),e}();exports.PDFDataRangeTransport=PDFDataRangeTransport;var PDFDocumentProxy=function(){function e(t,r){var n=this;_classCallCheck(this,e),this._pdfInfo=t,this._transport=r,Object.defineProperty(this,"fingerprint",{get:function(){return(0,_display_utils.deprecated)("`PDFDocumentProxy.fingerprint`, please use `PDFDocumentProxy.fingerprints` instead."),this.fingerprints[0]}}),Object.defineProperty(this,"getStats",{value:function(){var e=_asyncToGenerator(_regenerator.default.mark((function e(){return _regenerator.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(0,_display_utils.deprecated)("`PDFDocumentProxy.getStats`, please use the `PDFDocumentProxy.stats`-getter instead."),e.abrupt("return",n.stats||{streamTypes:{},fontTypes:{}});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()})}return _createClass(e,[{key:"annotationStorage",get:function(){return this._transport.annotationStorage}},{key:"numPages",get:function(){return this._pdfInfo.numPages}},{key:"fingerprints",get:function(){return this._pdfInfo.fingerprints}},{key:"stats",get:function(){return this._transport.stats}},{key:"isPureXfa",get:function(){return!!this._transport._htmlForXfa}},{key:"allXfaHtml",get:function(){return this._transport._htmlForXfa}},{key:"getPage",value:function(e){return this._transport.getPage(e)}},{key:"getPageIndex",value:function(e){return this._transport.getPageIndex(e)}},{key:"getDestinations",value:function(){return this._transport.getDestinations()}},{key:"getDestination",value:function(e){return this._transport.getDestination(e)}},{key:"getPageLabels",value:function(){return this._transport.getPageLabels()}},{key:"getPageLayout",value:function(){return this._transport.getPageLayout()}},{key:"getPageMode",value:function(){return this._transport.getPageMode()}},{key:"getViewerPreferences",value:function(){return this._transport.getViewerPreferences()}},{key:"getOpenAction",value:function(){return this._transport.getOpenAction()}},{key:"getAttachments",value:function(){return this._transport.getAttachments()}},{key:"getJavaScript",value:function(){return this._transport.getJavaScript()}},{key:"getJSActions",value:function(){return this._transport.getDocJSActions()}},{key:"getOutline",value:function(){return this._transport.getOutline()}},{key:"getOptionalContentConfig",value:function(){return this._transport.getOptionalContentConfig()}},{key:"getPermissions",value:function(){return this._transport.getPermissions()}},{key:"getMetadata",value:function(){return this._transport.getMetadata()}},{key:"getMarkInfo",value:function(){return this._transport.getMarkInfo()}},{key:"getData",value:function(){return this._transport.getData()}},{key:"getDownloadInfo",value:function(){return this._transport.downloadInfoCapability.promise}},{key:"cleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._transport.startCleanup(e||this.isPureXfa)}},{key:"destroy",value:function(){return this.loadingTask.destroy()}},{key:"loadingParams",get:function(){return this._transport.loadingParams}},{key:"loadingTask",get:function(){return this._transport.loadingTask}},{key:"saveDocument",value:function(){return this._transport.annotationStorage.size<=0&&(0,_display_utils.deprecated)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead."),this._transport.saveDocument()}},{key:"getFieldObjects",value:function(){return this._transport.getFieldObjects()}},{key:"hasJSActions",value:function(){return this._transport.hasJSActions()}},{key:"getCalculationOrderIds",value:function(){return this._transport.getCalculationOrderIds()}}]),e}();exports.PDFDocumentProxy=PDFDocumentProxy;var PDFPageProxy=function(){function e(t,r,n,a){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];_classCallCheck(this,e),this._pageIndex=t,this._pageInfo=r,this._ownerDocument=a,this._transport=n,this._stats=o?new _display_utils.StatTimer:null,this._pdfBug=o,this.commonObjs=n.commonObjs,this.objs=new PDFObjects,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this._intentStates=new Map,this._annotationPromises=new Map,this.destroyed=!1}return _createClass(e,[{key:"pageNumber",get:function(){return this._pageIndex+1}},{key:"rotate",get:function(){return this._pageInfo.rotate}},{key:"ref",get:function(){return this._pageInfo.ref}},{key:"userUnit",get:function(){return this._pageInfo.userUnit}},{key:"view",get:function(){return this._pageInfo.view}},{key:"getViewport",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.scale,r=e.rotation,n=void 0===r?this.rotate:r,a=e.offsetX,o=void 0===a?0:a,i=e.offsetY,s=void 0===i?0:i,u=e.dontFlip,l=void 0!==u&&u;return new _display_utils.PageViewport({viewBox:this.view,scale:t,rotation:n,offsetX:o,offsetY:s,dontFlip:l})}},{key:"getAnnotations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.intent,r=void 0===t?"display":t,n=this._transport.getRenderingIntent
2(r),a=this._annotationPromises.get(n.cacheKey);return a||(a=this._transport.getAnnotations(this._pageIndex,n.renderingIntent),this._annotationPromises.set(n.cacheKey,a),a=a.then((function(e){var t,r=_createForOfIteratorHelper(e);try{var n=function(){var e=t.value;void 0!==e.titleObj&&Object.defineProperty(e,"title",{get:function(){return(0,_display_utils.deprecated)("`title`-property on annotation, please use `titleObj` instead."),e.titleObj.str}}),void 0!==e.contentsObj&&Object.defineProperty(e,"contents",{get:function(){return(0,_display_utils.deprecated)("`contents`-property on annotation, please use `contentsObj` instead."),e.contentsObj.str}})};for(r.s();!(t=r.n()).done;)n()}catch(a){r.e(a)}finally{r.f()}return e}))),a}},{key:"getJSActions",value:function(){return this._jsActionsPromise||(this._jsActionsPromise=this._transport.getPageJSActions(this._pageIndex))}},{key:"getXfa",value:function(){var e=_asyncToGenerator(_regenerator.default.mark((function e(){var t;return _regenerator.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(null===(t=this._transport._htmlForXfa)||void 0===t?void 0:t.children[this._pageIndex])||null);case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(e){var t,r,n,a=this,o=e.canvasContext,i=e.viewport,s=e.intent,u=void 0===s?"display":s,l=e.annotationMode,c=void 0===l?_util.AnnotationMode.ENABLE:l,f=e.transform,d=void 0===f?null:f,h=e.imageLayer,p=void 0===h?null:h,v=e.canvasFactory,y=void 0===v?null:v,m=e.background,g=void 0===m?null:m,b=e.optionalContentConfigPromise,_=void 0===b?null:b,S=e.annotationCanvasMap,A=void 0===S?null:S;void 0!==(null===(t=arguments[0])||void 0===t?void 0:t.renderInteractiveForms)&&((0,_display_utils.deprecated)("render no longer accepts the `renderInteractiveForms`-option, please use the `annotationMode`-option instead."),!0===arguments[0].renderInteractiveForms&&c===_util.AnnotationMode.ENABLE&&(c=_util.AnnotationMode.ENABLE_FORMS)),void 0!==(null===(r=arguments[0])||void 0===r?void 0:r.includeAnnotationStorage)&&((0,_display_utils.deprecated)("render no longer accepts the `includeAnnotationStorage`-option, please use the `annotationMode`-option instead."),!0===arguments[0].includeAnnotationStorage&&c===_util.AnnotationMode.ENABLE&&(c=_util.AnnotationMode.ENABLE_STORAGE)),this._stats&&this._stats.time("Overall");var w=this._transport.getRenderingIntent(u,c);this.pendingCleanup=!1,_||(_=this._transport.getOptionalContentConfig());var k=this._intentStates.get(w.cacheKey);k||(k=Object.create(null),this._intentStates.set(w.cacheKey,k)),k.streamReaderCancelTimeout&&(clearTimeout(k.streamReaderCancelTimeout),k.streamReaderCancelTimeout=null);var x=y||new DefaultCanvasFactory({ownerDocument:this._ownerDocument}),P=!!(w.renderingIntent&_util.RenderingIntentFlag.PRINT);k.displayReadyCapability||(k.displayReadyCapability=(0,_util.createPromiseCapability)(),k.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList(w));var C=function(e){k.renderTasks.delete(T),(a.cleanupAfterRender||P)&&(a.pendingCleanup=!0),a._tryCleanup(),e?(T.capability.reject(e),a._abortOperatorList({intentState:k,reason:e instanceof Error?e:new Error(e)})):T.capability.resolve(),a._stats&&(a._stats.timeEnd("Rendering"),a._stats.timeEnd("Overall"))},T=new InternalRenderTask({callback:C,params:{canvasContext:o,viewport:i,transform:d,imageLayer:p,background:g},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:A,operatorList:k.operatorList,pageIndex:this._pageIndex,canvasFactory:x,useRequestAnimationFrame:!P,pdfBug:this._pdfBug});((n=k).renderTasks||(n.renderTasks=new Set)).add(T);var R=T.task;return Promise.all([k.displayReadyCapability.promise,_]).then((function(e){var t=_slicedToArray(e,2),r=t[0],n=t[1];a.pendingCleanup?C():(a._stats&&a._stats.time("Rendering"),T.initializeGraphics({transparency:r,optionalContentConfig:n}),T.operatorListChanged())})).catch(C),R}},{key:"getOperatorList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.intent,r=void 0===t?"display":t,n=e.annotationMode,a=void 0===n?_util.AnnotationMode.ENABLE:n;function o(){l.operatorList.lastChunk&&(l.opListReadCapability.resolve(l.operatorList),l.renderTasks.delete(i))}
2var i,s,u=this._transport.getRenderingIntent(r,a,!0),l=this._intentStates.get(u.cacheKey);return l||(l=Object.create(null),this._intentStates.set(u.cacheKey,l)),l.opListReadCapability||((i=Object.create(null)).operatorListChanged=o,l.opListReadCapability=(0,_util.createPromiseCapability)(),((s=l).renderTasks||(s.renderTasks=new Set)).add(i),l.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList(u)),l.opListReadCapability.promise}},{key:"streamTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.normalizeWhitespace,r=void 0!==t&&t,n=e.disableCombineTextItems,a=void 0!==n&&n,o=e.includeMarkedContent,i=void 0!==o&&o,s=100;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,normalizeWhitespace:!0===r,combineTextItems:!0!==a,includeMarkedContent:!0===i},{highWaterMark:s,size:function(e){return e.items.length}})}},{key:"getTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then((function(e){return _xfa_text.XfaText.textContent(e)}));var t=this.streamTextContent(e);return new Promise((function(e,r){var n=t.getReader(),a={items:[],styles:Object.create(null)};!function t(){n.read().then((function(r){var n,o=r.value;r.done?e(a):(Object.assign(a.styles,o.styles),(n=a.items).push.apply(n,_toConsumableArray(o.items)),t())}),r)}()}))}},{key:"getStructTree",value:function(){return this._structTreePromise||(this._structTreePromise=this._transport.getStructTree(this._pageIndex))}},{key:"_destroy",value:function(){this.destroyed=!0;var e,t=[],r=_createForOfIteratorHelper(this._intentStates.values());try{for(r.s();!(e=r.n()).done;){var n=e.value;if(this._abortOperatorList({intentState:n,reason:new Error("Page was destroyed."),force:!0}),!n.opListReadCapability){var a,o=_createForOfIteratorHelper(n.renderTasks);try{for(o.s();!(a=o.n()).done;){var i=a.value;t.push(i.completed),i.cancel()}}catch(s){o.e(s)}finally{o.f()}}}}catch(s){r.e(s)}finally{r.f()}return this.objs.clear(),this._annotationPromises.clear(),this._jsActionsPromise=null,this._structTreePromise=null,this.pendingCleanup=!1,Promise.all(t)}},{key:"cleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.pendingCleanup=!0,this._tryCleanup(e)}},{key:"_tryCleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.pendingCleanup)return!1;var t,r=_createForOfIteratorHelper(this._intentStates.values());try{for(r.s();!(t=r.n()).done;){var n=t.value,a=n.renderTasks,o=n.operatorList;if(a.size>0||!o.lastChunk)return!1}}catch(i){r.e(i)}finally{r.f()}return this._intentStates.clear(),this.objs.clear(),this._annotationPromises.clear(),this._jsActionsPromise=null,this._structTreePromise=null,e&&this._stats&&(this._stats=new _display_utils.StatTimer),this.pendingCleanup=!1,!0}},{key:"_startRenderPage",value:function(e,t){var r=this._intentStates.get(t);r&&(this._stats&&this._stats.timeEnd("Page Request"),r.displayReadyCapability&&r.displayReadyCapability.resolve(e))}},{key:"_renderPageChunk",value:function(e,t){for(var r=0,n=e.length;r<n;r++)t.operatorList.fnArray.push(e.fnArray[r]),t.operatorList.argsArray.push(e.argsArray[r]);t.operatorList.lastChunk=e.lastChunk;var a,o=_createForOfIteratorHelper(t.renderTasks);try{for(o.s();!(a=o.n()).done;)a.value.operatorListChanged()}catch(i){o.e(i)}finally{o.f()}e.lastChunk&&this._tryCleanup()}},{key:"_pumpOperatorList",value:function(e){var t=this,r=e.renderingIntent,n=e.cacheKey,a=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:r,cacheKey:n,annotationStorage:r&_util.RenderingIntentFlag.ANNOTATIONS_STORAGE?this._transport.annotationStorage.serializable:null}).getReader(),o=this._intentStates.get(n);o.streamReader=a,function e(){a.read().then((function(r){var n=r.value;r.done?o.streamReader=null:t._transport.destroyed||(t._renderPageChunk(n,o),e())}
2),(function(e){if(o.streamReader=null,!t._transport.destroyed){if(o.operatorList){o.operatorList.lastChunk=!0;var r,n=_createForOfIteratorHelper(o.renderTasks);try{for(n.s();!(r=n.n()).done;)r.value.operatorListChanged()}catch(a){n.e(a)}finally{n.f()}t._tryCleanup()}if(o.displayReadyCapability)o.displayReadyCapability.reject(e);else{if(!o.opListReadCapability)throw e;o.opListReadCapability.reject(e)}}}))}()}},{key:"_abortOperatorList",value:function(e){var t=this,r=e.intentState,n=e.reason,a=e.force,o=void 0!==a&&a;if(r.streamReader){if(!o){if(r.renderTasks.size>0)return;if(n instanceof _display_utils.RenderingCancelledException)return void(r.streamReaderCancelTimeout=setTimeout((function(){t._abortOperatorList({intentState:r,reason:n,force:!0}),r.streamReaderCancelTimeout=null}),RENDERING_CANCELLED_TIMEOUT))}if(r.streamReader.cancel(new _util.AbortException(n.message)).catch((function(){})),r.streamReader=null,!this._transport.destroyed){var i,s=_createForOfIteratorHelper(this._intentStates);try{for(s.s();!(i=s.n()).done;){var u=_slicedToArray(i.value,2),l=u[0];if(u[1]===r){this._intentStates.delete(l);break}}}catch(c){s.e(c)}finally{s.f()}this.cleanup()}}}},{key:"stats",get:function(){return this._stats}}]),e}();exports.PDFPageProxy=PDFPageProxy;var LoopbackPort=function(){function e(){_classCallCheck(this,e),this._listeners=[],this._deferred=Promise.resolve()}return _createClass(e,[{key:"postMessage",value:function(e,t){var r=this,n={data:function(e){if(globalThis.structuredClone)return globalThis.structuredClone(e,t);var r=new WeakMap;return function e(n){if("function"===typeof n||"symbol"===_typeof(n)||n instanceof URL)throw new Error("LoopbackPort.postMessage - cannot clone: ".concat(null===n||void 0===n?void 0:n.toString()));if("object"!==_typeof(n)||null===n)return n;if(r.has(n))return r.get(n);var a,o;if((a=n.buffer)&&(0,_util.isArrayBuffer)(a))return o=null!==t&&void 0!==t&&t.includes(a)?new n.constructor(a,n.byteOffset,n.byteLength):new n.constructor(n),r.set(n,o),o;if(n instanceof Map){o=new Map,r.set(n,o);var i,s=_createForOfIteratorHelper(n);try{for(s.s();!(i=s.n()).done;){var u=_slicedToArray(i.value,2),l=u[0],c=u[1];o.set(l,e(c))}}catch(g){s.e(g)}finally{s.f()}return o}if(n instanceof Set){o=new Set,r.set(n,o);var f,d=_createForOfIteratorHelper(n);try{for(d.s();!(f=d.n()).done;){var h=f.value;o.add(e(h))}}catch(g){d.e(g)}finally{d.f()}return o}for(var p in o=Array.isArray(n)?[]:Object.create(null),r.set(n,o),n){for(var v,y=void 0,m=n;!(y=Object.getOwnPropertyDescriptor(m,p));)m=Object.getPrototypeOf(m);"undefined"!==typeof y.value&&("function"!==typeof y.value||null!==(v=n.hasOwnProperty)&&void 0!==v&&v.call(n,p))&&(o[p]=e(y.value))}return o}(e)}(e)};this._deferred.then((function(){var e,t=_createForOfIteratorHelper(r._listeners);try{for(t.s();!(e=t.n()).done;)e.value.call(r,n)}catch(a){t.e(a)}finally{t.f()}}))}},{key:"addEventListener",value:function(e,t){this._listeners.push(t)}},{key:"removeEventListener",value:function(e,t){var r=this._listeners.indexOf(t);this._listeners.splice(r,1)}},{key:"terminate",value:function(){this._listeners.length=0}}]),e}();exports.LoopbackPort=LoopbackPort;var PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};if(_is_node.isNodeJS)PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if("object"===("undefined"===typeof document?"undefined":_typeof(document))){var _document,_document$currentScri,pdfjsFilePath=null===(_document=document)||void 0===_document||null===(_document$currentScri=_document.currentScript)||void 0===_document$currentScri?void 0:_document$currentScri.src;pdfjsFilePath&&(PDFWorkerUtil.fallbackWorkerSrc=pdfjsFilePath.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.createCDNWrapper=function(e){var t='importScripts("'.concat(e,'");');return URL.createObjectURL(new Blob([t]))};var PDFWorker=function(){function PDFWorker(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,r=void 0===t?null:t,n=e.port,a=void 0===n?null:n,o=e.verbosity,i=void 0===o?(0,_util.getVerbosityLevel)():o;if(_classCallCheck(this,PDFWorker),a&&PDFWorker._workerPorts.has(a))throw new Error("Cannot use more than one PDFWorker per port.");if(this.name=r,this.destroyed=!1,this.verbosity=i,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,a)return PDFWorker._workerPorts.set(a,this),void this._initializeFromPort(a);this._initialize()}return _createClass(PDFWorker,[{key:"promise",get:function(){return this._readyCapability.promise}},{key:"port",get:function(){return this._port}},{key:"messageHandler",get:function(){return this._messageHandler}},{key:"_initializeFromPort",value:function(e){this._port=e,this._messageHandler=new _message_handler.MessageHandler("main","worker",e),this._messageHandler.on("ready",(function(){})),this._readyCapability.resolve()}},{key:"_initialize",value:function(){var e=this;if("undefined"!==typeof Worker&&!PDFWorkerUtil.isWorkerDisabled&&!PDFWorker._mainThreadWorkerMessageHandler){var t=PDFWorker.workerSrc;try{(0,_util.isSameOrigin)(window.location.href,t)||(t=PDFWorkerUtil.createCDNWrapper(new URL(t,window.location).href));var r=new Worker(t),n=new _message_handler.MessageHandler("main","worker",r),a=function(){r.removeEventListener("error",o),n.destroy(),r.terminate(),e.destroyed?e._readyCapability.reject(new Error("Worker was destroyed")):e._setupFakeWorker()},o=function(){e._webWorker||a()};r.addEventListener("error",o),n.on("test",(function(t){r.removeEventListener("error",o),e.destroyed?a():t?(e._messageHandler=n,e._port=r,e._webWorker=r,e._readyCapability.resolve(),n.send("configure",{verbosity:e.verbosity})):(e._setupFakeWorker(),n.destroy(),r.terminate())})),n.on("ready",(function(t){if(r.removeEventListener("error",o),e.destroyed)a();else try{i()}catch(n){e._setupFakeWorker()}}));var i=function(){var e=new Uint8Array([255]);try{n.send("test",e,[e.buffer])}catch(t){(0,_util.warn)("Cannot use postMessage transfers."),e[0]=0,n.send("test",e)}};return void i()}catch(s){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}},{key:"_setupFakeWorker",value:function(){var e=this;PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),PDFWorker._setupFakeWorkerGlobal.then((function(t){if(e.destroyed)e._readyCapability.reject(new Error("Worker was destroyed"));else{var r=new LoopbackPort;e._port=r;var n="fake".concat(PDFWorkerUtil.fakeWorkerId++),a=new _message_handler.MessageHandler(n+"_worker",n,r);t.setup(a,r);var o=new _message_handler.MessageHandler(n,n+"_worker",r);e._messageHandler=o,e._readyCapability.resolve(),o.send("configure",{verbosity:e.verbosity})}})).catch((function(t){e._readyCapability.reject(new Error('Setting up fake worker failed: "'.concat(t.message,'".')))}))}},{key:"destroy",value:function(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),PDFWorker._workerPorts.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}}],[{key:"_workerPorts",get:function(){return(0,_util.shadow)(this,"_workerPorts",new WeakMap)}},{key:"fromPort",value:function(e){if(null===e||void 0===e||!e.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return this._workerPorts.has(e.port)?this._workerPorts.get(e.port):new PDFWorker(e)}},{key:"workerSrc",get:function(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(null!==PDFWorkerUtil.fallbackWorkerSrc)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}},{key:"_mainThreadWorkerMessageHandler",get:function(){try{var e;return(null===(e=globalThis.pdfjsWorker)||void 0===e?void 0:e.WorkerMessageHandler)||null}catch(t){return null}}},{key:"_setupFakeWorkerGlobal",get:function get(){var _this11=this,loader=function(){var _ref15=_asyncToGenerator(_regenerator.default.mark((function _callee4(){var mainWorkerMessageHandler,worker;return _regenerator.default.wrap((function _callee4$(_context4){for(;;)switch(_context4.prev=_context4.next){case 0:if(mainWorkerMessageHandler=_this11._mainThreadWorkerMessageHandler,!mainWorkerMessageHandler){_context4.next=3;break}return _context4.abrupt("return",mainWorkerMessageHandler);case 3:if(!_is_node.isNodeJS){_context4.next=6;break}return worker=eval("require")(_this11.workerSrc),_context4.abrupt("return",worker.WorkerMessageHandler);case 6:return _context4.next=8,(0,_display_utils.loadScript)(_this11.workerSrc);case 8:return _context4.abrupt("return",window.pdfjsWorker.WorkerMessageHandler);case 9:case"end":return _context4.stop()}}),_callee4)})));return function(){return _ref15.apply(this,arguments)}}();return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}}]),PDFWorker}();exports.PDFWorker=PDFWorker,PDFWorker.getWorkerSrc=function(){return(0,_display_utils.deprecated)("`PDFWorker.getWorkerSrc()`, please use `PDFWorker.workerSrc` instead."),this.workerSrc};var _docStats=new WeakMap,_pageCache=new WeakMap,_pagePromises=new WeakMap,_metadataPromise=new WeakMap,WorkerTransport=function(){function e(t,r,n,a){_classCallCheck(this,e),_classPrivateFieldInitSpec(this,_docStats,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,_pageCache,{writable:!0,value:new Map}),_classPrivateFieldInitSpec(this,_pagePromises,{writable:!0,value:new Map}),_classPrivateFieldInitSpec(this,_metadataPromise,{writable:!0,value:null}),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:a.ownerDocument,styleElement:a.styleElement}),this._params=a,a.useWorkerFetch||(this.CMapReaderFactory=new a.CMapReaderFactory({baseUrl:a.cMapUrl,isCompressed:a.cMapPacked}),this.StandardFontDataFactory=new a.StandardFontDataFactory({baseUrl:a.standardFontDataUrl})),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=n,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}return _createClass(e,[{key:"annotationStorage",get:function(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}},{key:"stats",get:function(){return _classPrivateFieldGet(this,_docStats)}},{key:"getRenderingIntent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_util.AnnotationMode.ENABLE,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=_util.RenderingIntentFlag.DISPLAY,a="";switch(e){case"any":n=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":n=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)("getRenderingIntent - invalid intent: ".concat(e))}switch(t){case _util.AnnotationMode.DISABLE:n+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:n+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:n+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,a=this.annotationStorage.lastModified;break;default:(0,_util.warn)("getRenderingIntent - invalid annotationMode: ".concat(t))}return r&&(n+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:n,cacheKey:"".concat(n,"_").concat(a)}}},{key:"destroy",value:function(){var e=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 t,r=[],n=_createForOfIteratorHelper(_classPrivateFieldGet(this,_pageCache).values());try{for(n.s();!(t=n.n()).done;){var a=t.value;r.push(a._destroy())}}catch(i){n.e(i)}finally{n.f()}_classPrivateFieldGet(this,_pageCache).clear(),_classPrivateFieldGet(this,_pagePromises).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();
2var o=this.messageHandler.sendWithPromise("Terminate",null);return r.push(o),Promise.all(r).then((function(){e.commonObjs.clear(),e.fontLoader.clear(),_classPrivateFieldSet(e,_metadataPromise,null),e._getFieldObjectsPromise=null,e._hasJSActionsPromise=null,e._networkStream&&e._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),e.messageHandler&&(e.messageHandler.destroy(),e.messageHandler=null),e.destroyCapability.resolve()}),this.destroyCapability.reject),this.destroyCapability.promise}},{key:"setupMessageHandler",value:function(){var e=this,t=this.messageHandler,r=this.loadingTask;t.on("GetReader",(function(t,r){(0,_util.assert)(e._networkStream,"GetReader - no `IPDFStream` instance available."),e._fullReader=e._networkStream.getFullReader(),e._fullReader.onProgress=function(t){e._lastProgress={loaded:t.loaded,total:t.total}},r.onPull=function(){e._fullReader.read().then((function(e){var t=e.value;e.done?r.close():((0,_util.assert)((0,_util.isArrayBuffer)(t),"GetReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(t),1,[t]))})).catch((function(e){r.error(e)}))},r.onCancel=function(t){e._fullReader.cancel(t),r.ready.catch((function(t){if(!e.destroyed)throw t}))}})),t.on("ReaderHeadersReady",(function(t){var n=(0,_util.createPromiseCapability)(),a=e._fullReader;return a.headersReady.then((function(){var t;a.isStreamingSupported&&a.isRangeSupported||(e._lastProgress&&(null===(t=r.onProgress)||void 0===t||t.call(r,e._lastProgress)),a.onProgress=function(e){var t;null===(t=r.onProgress)||void 0===t||t.call(r,{loaded:e.loaded,total:e.total})});n.resolve({isStreamingSupported:a.isStreamingSupported,isRangeSupported:a.isRangeSupported,contentLength:a.contentLength})}),n.reject),n.promise})),t.on("GetRangeReader",(function(t,r){(0,_util.assert)(e._networkStream,"GetRangeReader - no `IPDFStream` instance available.");var n=e._networkStream.getRangeReader(t.begin,t.end);n?(r.onPull=function(){n.read().then((function(e){var t=e.value;e.done?r.close():((0,_util.assert)((0,_util.isArrayBuffer)(t),"GetRangeReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(t),1,[t]))})).catch((function(e){r.error(e)}))},r.onCancel=function(t){n.cancel(t),r.ready.catch((function(t){if(!e.destroyed)throw t}))}):r.close()})),t.on("GetDoc",(function(t){var n=t.pdfInfo;e._numPages=n.numPages,e._htmlForXfa=n.htmlForXfa,delete n.htmlForXfa,r._capability.resolve(new PDFDocumentProxy(n,e))})),t.on("DocException",(function(e){var t;switch(e.name){case"PasswordException":t=new _util.PasswordException(e.message,e.code);break;case"InvalidPDFException":t=new _util.InvalidPDFException(e.message);break;case"MissingPDFException":t=new _util.MissingPDFException(e.message);break;case"UnexpectedResponseException":t=new _util.UnexpectedResponseException(e.message,e.status);break;case"UnknownErrorException":t=new _util.UnknownErrorException(e.message,e.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}r._capability.reject(t)})),t.on("PasswordRequest",(function(t){if(e._passwordCapability=(0,_util.createPromiseCapability)(),r.onPassword)try{r.onPassword((function(t){e._passwordCapability.resolve({password:t})}),t.code)}catch(n){e._passwordCapability.reject(n)}else e._passwordCapability.reject(new _util.PasswordException(t.message,t.code));return e._passwordCapability.promise})),t.on("DataLoaded",(function(t){var n;null===(n=r.onProgress)||void 0===n||n.call(r,{loaded:t.length,total:t.length}),e.downloadInfoCapability.resolve(t)})),t.on("StartRenderPage",(function(t){e.destroyed||_classPrivateFieldGet(e,_pageCache).get(t.pageIndex)._startRenderPage(t.transparency,t.cacheKey)})),t.on("commonobj",(function(r){var n,a=_slicedToArray(r,3),o=a[0],i=a[1],s=a[2];if(!e.destroyed&&!e.commonObjs.has(o))switch(i){case"Font":var u=e._params;if("error"in s){var l=s.error;(0,_util.warn)("Error during font loading: ".concat(l)),e.commonObjs.resolve(o,l);break}var c=null;u.pdfBug&&null!==(n=globalThis.FontInspector)&&void 0!==n&&n.enabled&&(c={registerFont:function(e,t){globalThis.FontInspector.fontAdded(e,t)}});var f=new _font_loader.FontFaceObject(s,{isEvalSupported:u.isEvalSupported,disableFontFace:u.disableFontFace,ignoreErrors:u.ignoreErrors,onUnsupportedFeature:e._onUnsupportedFeature.bind(e),fontRegistry:c});
2e.fontLoader.bind(f).catch((function(e){return t.sendWithPromise("FontFallback",{id:o})})).finally((function(){!u.fontExtraProperties&&f.data&&(f.data=null),e.commonObjs.resolve(o,f)}));break;case"FontPath":case"Image":e.commonObjs.resolve(o,s);break;default:throw new Error("Got unknown common object type ".concat(i))}})),t.on("obj",(function(t){var r,n=_slicedToArray(t,4),a=n[0],o=n[1],i=n[2],s=n[3];if(!e.destroyed){var u=_classPrivateFieldGet(e,_pageCache).get(o);if(!u.objs.has(a))switch(i){case"Image":u.objs.resolve(a,s),(null===s||void 0===s||null===(r=s.data)||void 0===r?void 0:r.length)>8e6&&(u.cleanupAfterRender=!0);break;case"Pattern":u.objs.resolve(a,s);break;default:throw new Error("Got unknown object type ".concat(i))}}})),t.on("DocProgress",(function(t){var n;e.destroyed||null===(n=r.onProgress)||void 0===n||n.call(r,{loaded:t.loaded,total:t.total})})),t.on("DocStats",(function(t){e.destroyed||_classPrivateFieldSet(e,_docStats,Object.freeze({streamTypes:Object.freeze(t.streamTypes),fontTypes:Object.freeze(t.fontTypes)}))})),t.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),t.on("FetchBuiltInCMap",(function(t){return e.destroyed?Promise.reject(new Error("Worker was destroyed.")):e.CMapReaderFactory?e.CMapReaderFactory.fetch(t):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))})),t.on("FetchStandardFontData",(function(t){return e.destroyed?Promise.reject(new Error("Worker was destroyed.")):e.StandardFontDataFactory?e.StandardFontDataFactory.fetch(t):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))}))}},{key:"_onUnsupportedFeature",value:function(e){var t,r,n=e.featureId;this.destroyed||null===(t=(r=this.loadingTask).onUnsupportedFeature)||void 0===t||t.call(r,n)}},{key:"getData",value:function(){return this.messageHandler.sendWithPromise("GetData",null)}},{key:"getPage",value:function(e){var t=this;if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request"));var r=e-1,n=_classPrivateFieldGet(this,_pagePromises).get(r);if(n)return n;var a=this.messageHandler.sendWithPromise("GetPage",{pageIndex:r}).then((function(e){if(t.destroyed)throw new Error("Transport destroyed");var n=new PDFPageProxy(r,e,t,t._params.ownerDocument,t._params.pdfBug);return _classPrivateFieldGet(t,_pageCache).set(r,n),n}));return _classPrivateFieldGet(this,_pagePromises).set(r,a),a}},{key:"getPageIndex",value:function(e){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:e})}},{key:"getAnnotations",value:function(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}},{key:"saveDocument",value:function(){var e,t,r=this;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:this.annotationStorage.serializable,filename:null!==(e=null===(t=this._fullReader)||void 0===t?void 0:t.filename)&&void 0!==e?e:null}).finally((function(){r.annotationStorage.resetModified()}))}},{key:"getFieldObjects",value:function(){return this._getFieldObjectsPromise||(this._getFieldObjectsPromise=this.messageHandler.sendWithPromise("GetFieldObjects",null))}},{key:"hasJSActions",value:function(){return this._hasJSActionsPromise||(this._hasJSActionsPromise=this.messageHandler.sendWithPromise("HasJSActions",null))}},{key:"getCalculationOrderIds",value:function(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}},{key:"getDestinations",value:function(){return this.messageHandler.sendWithPromise("GetDestinations",null)}},{key:"getDestination",value:function(e){return"string"!==typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}},{key:"getPageLabels",value:function(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}},{key:"getPageLayout",value:function(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}},{key:"getPageMode",value:function(){return this.messageHandler.sendWithProm
2ise("GetPageMode",null)}},{key:"getViewerPreferences",value:function(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}},{key:"getOpenAction",value:function(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}},{key:"getAttachments",value:function(){return this.messageHandler.sendWithPromise("GetAttachments",null)}},{key:"getJavaScript",value:function(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}},{key:"getDocJSActions",value:function(){return this.messageHandler.sendWithPromise("GetDocJSActions",null)}},{key:"getPageJSActions",value:function(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}},{key:"getStructTree",value:function(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}},{key:"getOutline",value:function(){return this.messageHandler.sendWithPromise("GetOutline",null)}},{key:"getOptionalContentConfig",value:function(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then((function(e){return new _optional_content_config.OptionalContentConfig(e)}))}},{key:"getPermissions",value:function(){return this.messageHandler.sendWithPromise("GetPermissions",null)}},{key:"getMetadata",value:function(){var e=this;return _classPrivateFieldGet(this,_metadataPromise)||_classPrivateFieldSet(this,_metadataPromise,this.messageHandler.sendWithPromise("GetMetadata",null).then((function(t){var r,n,a,o;return{info:t[0],metadata:t[1]?new _metadata.Metadata(t[1]):null,contentDispositionFilename:null!==(r=null===(n=e._fullReader)||void 0===n?void 0:n.filename)&&void 0!==r?r:null,contentLength:null!==(a=null===(o=e._fullReader)||void 0===o?void 0:o.contentLength)&&void 0!==a?a:null}})))}},{key:"getMarkInfo",value:function(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}},{key:"startCleanup",value:function(){var e=_asyncToGenerator(_regenerator.default.mark((function e(){var t,r,n,a,o=arguments;return _regenerator.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]&&o[0],e.next=3,this.messageHandler.sendWithPromise("Cleanup",null);case 3:if(!this.destroyed){e.next=5;break}return e.abrupt("return");case 5:r=_createForOfIteratorHelper(_classPrivateFieldGet(this,_pageCache).values()),e.prev=6,r.s();case 8:if((n=r.n()).done){e.next=15;break}if((a=n.value).cleanup()){e.next=13;break}throw new Error("startCleanup: Page ".concat(a.pageNumber," is currently rendering."));case 13:e.next=8;break;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(6),r.e(e.t0);case 20:return e.prev=20,r.f(),e.finish(20);case 23:this.commonObjs.clear(),t||this.fontLoader.clear(),_classPrivateFieldSet(this,_metadataPromise,null),this._getFieldObjectsPromise=null,this._hasJSActionsPromise=null;case 28:case"end":return e.stop()}}),e,this,[[6,17,20,23]])})));return function(){return e.apply(this,arguments)}}()},{key:"loadingParams",get:function(){var e=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:e.disableAutoFetch,enableXfa:e.enableXfa})}}]),e}(),PDFObjects=function(){function e(){_classCallCheck(this,e),this._objs=Object.create(null)}return _createClass(e,[{key:"_ensureObj",value:function(e){return this._objs[e]?this._objs[e]:this._objs[e]={capability:(0,_util.createPromiseCapability)(),data:null,resolved:!1}}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return this._ensureObj(e).capability.promise.then(t),null;var r=this._objs[e];if(!r||!r.resolved)throw new Error("Requesting object that isn't resolved yet ".concat(e,"."));return r.data}},{key:"has",value:function(e){var t=this._objs[e];return(null===t||void 0===t?void 0:t.resolved)||!1}},{key:"resolve",value:function(e,t){var r=this._ensureObj(e);r.resolved=!0,r.data=t,r.capability.resolve(t)}},{key:"clear",value:function(){this._objs=Object.create(null)}}]),e}(),RenderTask=function(){function e(t){_classCallCheck(this,e),this._internalRenderTask=t,this.onContinue=null}return _createClass(e,[{key:"promise",get:function(){return this._internalRenderTask.capability.promise}},{key:"cancel",value:function(){this._internalRenderTask.cancel()}}]),e}();exports.RenderTask=RenderTask;var InternalRenderTask=function(){function e(t){var r=t.callback,n=t.params,a=t.objs,o=t.commonObjs,i=t.annotationCanvasMap,s=t.o
2peratorList,u=t.pageIndex,l=t.canvasFactory,c=t.useRequestAnimationFrame,f=void 0!==c&&c,d=t.pdfBug,h=void 0!==d&&d;_classCallCheck(this,e),this.callback=r,this.params=n,this.objs=a,this.commonObjs=o,this.annotationCanvasMap=i,this.operatorListIdx=null,this.operatorList=s,this._pageIndex=u,this.canvasFactory=l,this._pdfBug=h,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===f&&"undefined"!==typeof window,this.cancelled=!1,this.capability=(0,_util.createPromiseCapability)(),this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=n.canvasContext.canvas}return _createClass(e,[{key:"completed",get:function(){return this.capability.promise.catch((function(){}))}},{key:"initializeGraphics",value:function(t){var r,n=t.transparency,a=void 0!==n&&n,o=t.optionalContentConfig;if(!this.cancelled){if(this._canvas){if(e.canvasInUse.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");e.canvasInUse.add(this._canvas)}this._pdfBug&&null!==(r=globalThis.StepperManager)&&void 0!==r&&r.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());var i=this.params,s=i.canvasContext,u=i.viewport,l=i.transform,c=i.imageLayer,f=i.background;this.gfx=new _canvas.CanvasGraphics(s,this.commonObjs,this.objs,this.canvasFactory,c,o,this.annotationCanvasMap),this.gfx.beginDrawing({transform:l,viewport:u,transparency:a,background:f}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.running=!1,this.cancelled=!0,this.gfx&&this.gfx.endDrawing(),this._canvas&&e.canvasInUse.delete(this._canvas),this.callback(t||new _display_utils.RenderingCancelledException("Rendering cancelled, page ".concat(this._pageIndex+1),"canvas"))}},{key:"operatorListChanged",value:function(){this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}},{key:"_continue",value:function(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}},{key:"_scheduleNext",value:function(){var e=this;this._useRequestAnimationFrame?window.requestAnimationFrame((function(){e._nextBound().catch(e._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}},{key:"_next",value:function(){var t=_asyncToGenerator(_regenerator.default.mark((function t(){return _regenerator.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.cancelled){t.next=2;break}return t.abrupt("return");case 2:this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),this._canvas&&e.canvasInUse.delete(this._canvas),this.callback()));case 4:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()}],[{key:"canvasInUse",get:function(){return(0,_util.shadow)(this,"canvasInUse",new WeakSet)}}]),e}(),version="2.12.313";exports.version=version;var build="a2ae56f39";exports.build=build},(e,t,r)=>{"use strict";function n(e){return n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var a,o=(a=r(2))&&a.__esModule?a:{default:a},i=r(4);
2function s(e,t){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}function u(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=c(e);if(t){var a=c(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return l(this,r)}}function l(e,t){if(t&&("object"===n(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function f(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(l){return void r(l)}s.done?t(u):Promise.resolve(u).then(n,a)}function d(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"===typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),e}var m,g=function(){function e(t){var r=t.docId,n=t.onUnsupportedFeature,a=t.ownerDocument,o=void 0===a?globalThis.document:a;t.styleElement,p(this,e),this.constructor===e&&(0,i.unreachable)("Cannot initialize BaseFontLoader."),this.docId=r,this._onUnsupportedFeature=n,this._document=o,this.nativeFontFaces=[],this.styleElement=null}return y(e,[{key:"addNativeFontFace",value:function(e){this.nativeFontFaces.push(e),this._document.fonts.add(e)}},{key:"insertRule",value:function(e){var t=this.styleElement;t||((t=this.styleElement=this._document.createElement("style")).id="PDFJS_FONT_STYLE_TAG_".concat(this.docId),this._document.documentElement.getElementsByTagName("head")[0].appendChild(t));var r=t.sheet;r.insertRule(e,r.cssRules.length)}},{key:"clear",value:function(){var e,t=d(this.nativeFontFaces);try{for(t.s();!(e=t.n()).done;){var r=e.value;this._document.fonts.delete(r)}}catch(n){t.e(n)}finally{t.f()}this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}},{key:"bind",value:function(){var e,t=(e=o.default.mark((function e(t){var r,n,a=this;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.attached&&!t.missingFile){e.next=2;break}return e.abrupt("return");case 2:if(t.attached=!0,!this.isFontLoadingAPISupported){e.next=19;break}if(!(r=t.createNativeFontFace())){e.next=18;break}return this.addNativeFontFace(r),e.prev=7,e.next=10,r.loaded;case 10:e.next=18;break;case 12:throw e.prev=12,e.t0=e.catch(7),this._onUnsupportedFeature({featureId:i.UNSUPPORTED_FEATURES.errorFontLoadNative}),(0,i.warn)("Failed to load font '".concat(r.family,"': '").concat(e.t0,"'.")),t.disableFontFace=!0,e.t0;case 18:return e.abrupt("return");case 19:if(!(n=t.createFontFaceRule())){e.next=26;break}if(this.insertRule(n),!this.isSyncFontLoadingSupported){e.next=24;break}return e.abrupt("return");case 24:return e.next=26,new Promise((function(e){var r=a._queueLoadingCallback(e);a._prepareFontLoadEvent([n],[t],r)}));case 26:case"end":return e.stop()}}),e,this,[[7,12]])})),function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){f(o,n,a,i,s,"next",e)}function s(e){f(o,n,a,i,s,"throw",e)}i(void 0)}))});return function(e){return t.apply(this,arguments)}}()},{key:"_queueLoadingCallback",value:function(e){(0,i.unreachable)("Abstract method `_queueLoadingCallback`.")}},{key:"isFontLoadingAPISupported",get:function(){var e,t=!(null===(e=this._document)||void 0===e||!e.fonts);return(0,i.shadow)(this,"isFontLoadingAPISupported",t)}},{key:"isSyncFontLoadingSupported",get:function(){(0,i.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}},{key:"_loadTestFont",get:function(){(0,i.unreachable)("Abstract method `_loadTestFont`.")}},{key:"_prepareFontLoadEvent",value:function(e,t,r){(0,i.unreachable)("Abstract method `_prepareFontLoadEvent`.")}}]),e}();t.FontLoader=m,t.FontLoader=m=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(r,e);var t=u(r);function r(e){var n;return p(this,r),(n=t.call(this,e)).loadingContext={requests:[],nextRequestId:0},n.loadTestFontId=0,n}return y(r,[{key:"isSyncFontLoadingSupported",get:function(){var e=!1;if("undefined"===typeof navigator)e=!0;else{var t=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);(null===t||void 0===t?void 0:t[1])>=14&&(e=!0)}return(0,i.shadow)(this,"isSyncFontLoadingSupported",e)}},{key:"_queueLoadingCallback",value:function(e){var t=this.loadingContext,r={id:"pdfjs-font-loading-".concat(t.nextRequestId++),done:!1,complete:function(){for((0,i.assert)(!r.done,"completeRequest() cannot be called twice."),r.done=!0;t.requests.length>0&&t.requests[0].done;){var e=t.requests.shift();setTimeout(e.callback,0)}},callback:e};return t.requests.push(r),r}},{key:"_loadTestFont",get:function(){return(0,i.shadow)(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}},{key:"_prepareFontLoadEvent",value:function(e,t,r){function n(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function a(e,t,r,n){return e.substring(0,t)+n+e.substring(t+r)}var o,s,u=this._document.createElement("canvas");u.width=1,u.height=1;var l=u.getContext("2d"),c=0,f="lt".concat(Date.now()).concat(this.loadTestFontId++),h=this._loadTestFont,p=1482184792,v=n(h=a(h,976,f.length,f),16);for(o=0,s=f.length-3;o<s;o+=4)v=v-p+n(f,o)|0;o<f.length&&(v=v-p+n(f+"XXX",o)|0),h=a(h,16,4,(0,i.string32)(v));var y="url(data:font/opentype;base64,".concat(btoa(h),");"),m='@font-face {font-family:"'.concat(f,'";src:').concat(y,"}");this.insertRule(m);var g,b=[],_=d(t);try{for(_.s();!(g=_.n()).done;){var S=g.value;b.push(S.loadedName)}}catch(C){_.e(C)}finally{_.f()}b.push(f);var A=this._document.createElement("div");A.style.visibility="hidden",A.style.width=A.style.height="10px",A.style.position="absolute",A.style.top=A.style.left="0px";for(var w=0,k=b;w<k.length;w++){var x=k[w],P=this._document.createElement("span");P.textContent="Hi",P.style.fontFamily=x,A.appendChild(P)}this._document.body.appendChild(A),function e(t,r){if(++c>30)return(0,i.warn)("Load test font never loaded."),void r();l.font="30px "+t,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0?r():setTimeout(e.bind(null,t,r))}(f,(function(){A.remove(),r.complete()}
2))}}]),r}(g);var b=function(){function e(t,r){var n=r.isEvalSupported,a=void 0===n||n,o=r.disableFontFace,i=void 0!==o&&o,s=r.ignoreErrors,u=void 0!==s&&s,l=r.onUnsupportedFeature,c=r.fontRegistry,f=void 0===c?null:c;for(var d in p(this,e),this.compiledGlyphs=Object.create(null),t)this[d]=t[d];this.isEvalSupported=!1!==a,this.disableFontFace=!0===i,this.ignoreErrors=!0===u,this._onUnsupportedFeature=l,this.fontRegistry=f}return y(e,[{key:"createNativeFontFace",value:function(){if(!this.data||this.disableFontFace)return null;var e;if(this.cssFontInfo){var t={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(t.style="oblique ".concat(this.cssFontInfo.italicAngle,"deg")),e=new FontFace(this.cssFontInfo.fontFamily,this.data,t)}else e=new FontFace(this.loadedName,this.data,{});return this.fontRegistry&&this.fontRegistry.registerFont(this),e}},{key:"createFontFaceRule",value:function(){if(!this.data||this.disableFontFace)return null;var e,t=(0,i.bytesToString)(this.data),r="url(data:".concat(this.mimetype,";base64,").concat(btoa(t),");");if(this.cssFontInfo){var n="font-weight: ".concat(this.cssFontInfo.fontWeight,";");this.cssFontInfo.italicAngle&&(n+="font-style: oblique ".concat(this.cssFontInfo.italicAngle,"deg;")),e='@font-face {font-family:"'.concat(this.cssFontInfo.fontFamily,'";').concat(n,"src:").concat(r,"}")}else e='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(r,"}");return this.fontRegistry&&this.fontRegistry.registerFont(this,r),e}},{key:"getPathGenerator",value:function(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];var r;try{r=e.get(this.loadedName+"_path_"+t)}catch(l){if(!this.ignoreErrors)throw l;return this._onUnsupportedFeature({featureId:i.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,i.warn)('getPathGenerator - ignoring character: "'.concat(l,'".')),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&i.IsEvalSupportedCached.value){var n,a=[],o=d(r);try{for(o.s();!(n=o.n()).done;){var s=n.value,u=void 0!==s.args?s.args.join(","):"";a.push("c.",s.cmd,"(",u,");\n")}}catch(c){o.e(c)}finally{o.f()}return this.compiledGlyphs[t]=new Function("c","size",a.join(""))}return this.compiledGlyphs[t]=function(e,t){var n,a=d(r);try{for(a.s();!(n=a.n()).done;){var o=n.value;"scale"===o.cmd&&(o.args=[t,-t]),e[o.cmd].apply(e,o.args)}}catch(c){a.e(c)}finally{a.f()}}}}]),e}();t.FontFaceObject=b},(e,t,r)=>{"use strict";function n(e){return n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.NodeStandardFontDataFactory=t.NodeCanvasFactory=t.NodeCMapReaderFactory=void 0;var a=r(135),o=r(6),i=r(4);function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),e}function l(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}function c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(e,t)}function f(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=h(e);if(t){var a=h(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return d(this,r)}}function d(e,t){if(t&&("object"===n(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}
2function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var v=function e(){p(this,e),(0,i.unreachable)("Not implemented: NodeCanvasFactory")};t.NodeCanvasFactory=v;var y=function e(){p(this,e),(0,i.unreachable)("Not implemented: NodeCMapReaderFactory")};t.NodeCMapReaderFactory=y;var m=function e(){p(this,e),(0,i.unreachable)("Not implemented: NodeStandardFontDataFactory")};if(t.NodeStandardFontDataFactory=m,o.isNodeJS){var g=function(e){return new Promise((function(t,r){__webpack_require__(1264).readFile(e,(function(e,n){!e&&n?t(new Uint8Array(n)):r(new Error(e))}))}))};t.NodeCanvasFactory=v=function(e){l(r,e);var t=f(r);function r(){return p(this,r),t.apply(this,arguments)}return u(r,[{key:"_createCanvas",value:function(e,t){return __webpack_require__(1287).createCanvas(e,t)}}]),r}(a.BaseCanvasFactory),t.NodeCMapReaderFactory=y=function(e){l(r,e);var t=f(r);function r(){return p(this,r),t.apply(this,arguments)}return u(r,[{key:"_fetchData",value:function(e,t){return g(e).then((function(e){return{cMapData:e,compressionType:t}}))}}]),r}(a.BaseCMapReaderFactory),t.NodeStandardFontDataFactory=m=function(e){l(r,e);var t=f(r);function r(){return p(this,r),t.apply(this,arguments)}return u(r,[{key:"_fetchData",value:function(e){return g(e)}}]),r}(a.BaseStandardFontDataFactory)}},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationStorage=void 0;var n=r(4);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){s=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"===typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){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 o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._storage=new Map,this._timeStamp=Date.now(),this._modified=!1,this.onSetModified=null,this.onResetModified=null}var t,r,o;return t=e,(r=[{key:"getValue",value:function(e,t){var r=this._storage.get(e);return void 0===r?t:Object.assign(t,r)}},{key:"setValue",value:function(e,t){var r=this._storage.get(e),n=!1;if(void 0!==r)for(var o=0,i=Object.entries(t);o<i.length;o++){var s=a(i[o],2),u=s[0],l=s[1];r[u]!==l&&(n=!0,r[u]=l)}else n=!0,this._storage.set(e,t);n&&(this._timeStamp=Date.now(),this._setModified())}},{key:"getAll",value:function(){return this._storage.size>0?(0,n.objectFromMap)(this._storage):null}},{key:"size",get:function(){return this._storage.size}},{key:"_setModified",value:function(){this._modified||(this._modified=!0,"function"===typeof this.onSetModified&&this.onSetModified())}},{key:"resetModified",value:function(){this._modified&&(this._modified=!1,"function"===typeof this.onResetModified&&this.onResetModified())}},{key:"serializable",get:function(){return this._storage.size>0?this._storage:null}},{key:"lastModified",get:function(){return this._timeStamp.toString()}}])&&i(t.prototype,r),o&&i(t,o),e}();t.AnnotationStorage=s},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var n=r(4),a=r(141),o=r(1);function i(e){return i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function s(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=d(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){s=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to de
2structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"===typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var p=4096,v=16;function y(e){if(!e.mozCurrentTransform){e._originalSave=e.save,e._originalRestore=e.restore,e._originalRotate=e.rotate,e._originalScale=e.scale,e._originalTranslate=e.translate,e._originalTransform=e.transform,e._originalSetTransform=e.setTransform,e._originalResetTransform=e.resetTransform,e._transformMatrix=e._transformMatrix||[1,0,0,1,0,0],e._transformStack=[];try{var t=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"lineWidth");e._setLineWidth=t.set,e._getLineWidth=t.get,Object.defineProperty(e,"lineWidth",{set:function(e){this._setLineWidth(1.000001*e)},get:function(){return this._getLineWidth()}})}catch(r){}Object.defineProperty(e,"mozCurrentTransform",{get:function(){return this._transformMatrix}}),Object.defineProperty(e,"mozCurrentTransformInverse",{get:function(){var e=f(this._transformMatrix,6),t=e[0],r=e[1],n=e[2],a=e[3],o=e[4],i=e[5],s=t*a-r*n,u=r*n-t*a;return[a/s,r/u,n/u,t/s,(a*o-n*i)/u,(r*o-t*i)/s]}}),e.save=function(){var e=this._transformMatrix;this._transformStack.push(e),this._transformMatrix=e.slice(0,6),this._originalSave()},e.restore=function(){var e=this._transformStack.pop();e&&(this._transformMatrix=e,this._originalRestore())},e.translate=function(e,t){var r=this._transformMatrix;r[4]=r[0]*e+r[2]*t+r[4],r[5]=r[1]*e+r[3]*t+r[5],this._originalTranslate(e,t)},e.scale=function(e,t){var r=this._transformMatrix;r[0]*=e,r[1]*=e,r[2]*=t,r[3]*=t,this._originalScale(e,t)},e.transform=function(t,r,n,a,o,i){var s=this._transformMatrix;this._transformMatrix=[s[0]*t+s[2]*r,s[1]*t+s[3]*r,s[0]*n+s[2]*a,s[1]*n+s[3]*a,s[0]*o+s[2]*i+s[4],s[1]*o+s[3]*i+s[5]],e._originalTransform(t,r,n,a,o,i)},e.setTransform=function(t,r,n,a,o,i){this._transformMatrix=[t,r,n,a,o,i],e._originalSetTransform(t,r,n,a,o,i)},e.resetTransform=function(){this._transformMatrix=[1,0,0,1,0,0],e._originalResetTransform()},e.rotate=function(e){var t=Math.cos(e),r=Math.sin(e),n=this._transformMatrix;this._transformMatrix=[n[0]*t+n[2]*r,n[1]*t+n[3]*r,n[0]*-r+n[2]*t,n[1]*-r+n[3]*t,n[4],n[5]],this._originalRotate(e)}}}var m=function(){function e(t){u(this,e),this.canvasFactory=t,this.cache=Object.create(null)}return c(e,[{key:"getCanvas",value:function(e,t,r,n){var a;return void 0!==this.cache[e]?(a=this.cache[e],this.canvasFactory.reset(a,t,r),a.context.setTransform(1,0,0,1,0,0)):(a=this.canvasFactory.create(t,r),this.cache[e]=a),n&&y(a.context),a}},{key:"clear",value:function(){for(var e in this.cache){var t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}}]),e}(),g=function(){function e(t,r){u(this,e),this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=n.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=n.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=n.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps=null,this.startNewPathAndClipBox([0,0,t,r])}return c(e,[{key:"clone",value:function(){var e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}},{key:"setCurrentPoint",value:function(e,t){this.x=e,this.y=t}},{key:"updatePathMinMax",value:function(e,t,r){var a=f(n.Util.applyTransform([t,r],e),2);t=a[0],r=a[1],this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,r),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,r)}},{key:"updateCurvePathMinMax",value:function(e,t,r,a,o,i,s,u,l){var c=n.Util.bezierBoundingBox(t,r,a,o,i,s,u,l);this.updatePathMinMax(e,c[0],c[1]),this.updatePathMinMax(e,c[2],c[3])}},{key:"getPathBoundingBox",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.PathType.FILL,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=[this.minX,this.minY,this.maxX,this.maxY];if(e===a.PathType.STROKE){t||(0,n.unreachable)("Stroke bounding box must include transform.");var o=n.Util.singularValueDecompose2dScale(t),i=o[0]*this.lineWidth/2,s=o[1]
2*this.lineWidth/2;r[0]-=i,r[1]-=s,r[2]+=i,r[3]+=s}return r}},{key:"updateClipFromPath",value:function(){var e=n.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}},{key:"startNewPathAndClipBox",value:function(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}},{key:"getClippedPathBoundingBox",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.PathType.FILL,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return n.Util.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}]),e}();function b(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("undefined"!==typeof ImageData&&t instanceof ImageData)e.putImageData(t,0,0);else{var a,o,i,s,u,l,c,f,d,h=t.height,p=t.width,y=h%v,m=(h-y)/v,g=0===y?m:m+1,b=e.createImageData(p,v),_=0,S=t.data,A=b.data;if(r)switch(r.length){case 1:l=r[0],c=r[0],f=r[0],d=r[0];break;case 4:l=r[0],c=r[1],f=r[2],d=r[3]}if(t.kind===n.ImageKind.GRAYSCALE_1BPP){var w=S.byteLength,k=new Uint32Array(A.buffer,0,A.byteLength>>2),x=k.length,P=p+7>>3,C=4294967295,T=n.IsLittleEndianCached.value?4278190080:255;if(d&&255===d[0]&&0===d[255]){var R=[T,C];C=R[0],T=R[1]}for(o=0;o<g;o++){for(s=o<m?v:y,a=0,i=0;i<s;i++){for(var E=w-_,O=0,F=E>P?p:8*E-7,I=-8&F,j=0,M=0;O<I;O+=8)M=S[_++],k[a++]=128&M?C:T,k[a++]=64&M?C:T,k[a++]=32&M?C:T,k[a++]=16&M?C:T,k[a++]=8&M?C:T,k[a++]=4&M?C:T,k[a++]=2&M?C:T,k[a++]=1&M?C:T;for(;O<F;O++)0===j&&(M=S[_++],j=128),k[a++]=M&j?C:T,j>>=1}for(;a<x;)k[a++]=0;e.putImageData(b,0,o*v)}}else if(t.kind===n.ImageKind.RGBA_32BPP){var D=!!(l||c||f);for(i=0,u=p*v*4,o=0;o<m;o++){if(A.set(S.subarray(_,_+u)),_+=u,D)for(var L=0;L<u;L+=4)l&&(A[L+0]=l[A[L+0]]),c&&(A[L+1]=c[A[L+1]]),f&&(A[L+2]=f[A[L+2]]);e.putImageData(b,0,i),i+=v}if(o<g){if(u=p*y*4,A.set(S.subarray(_,_+u)),D)for(var N=0;N<u;N+=4)l&&(A[N+0]=l[A[N+0]]),c&&(A[N+1]=c[A[N+1]]),f&&(A[N+2]=f[A[N+2]]);e.putImageData(b,0,i)}}else{if(t.kind!==n.ImageKind.RGB_24BPP)throw new Error("bad image kind: ".concat(t.kind));var q=!!(l||c||f);for(u=p*(s=v),o=0;o<g;o++){for(o>=m&&(u=p*(s=y)),a=0,i=u;i--;)A[a++]=S[_++],A[a++]=S[_++],A[a++]=S[_++],A[a++]=255;if(q)for(var B=0;B<a;B+=4)l&&(A[B+0]=l[A[B+0]]),c&&(A[B+1]=c[A[B+1]]),f&&(A[B+2]=f[A[B+2]]);e.putImageData(b,0,o*v)}}}}function _(e,t){for(var r=t.height,n=t.width,a=r%v,o=(r-a)/v,i=0===a?o:o+1,s=e.createImageData(n,v),u=0,l=t.data,c=s.data,f=0;f<i;f++){for(var d=f<o?v:a,h=3,p=0;p<d;p++)for(var y=void 0,m=0,g=0;g<n;g++)m||(y=l[u++],m=128),c[h]=y&m?0:255,h+=4,m>>=1;e.putImageData(s,0,f*v)}}function S(e,t){for(var r=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],n=0,a=r.length;n<a;n++){var o=r[n];void 0!==e[o]&&(t[o]=e[o])}void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function A(e){e.strokeStyle="#000000",e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",void 0!==e.setLineDash&&(e.setLineDash([]),e.lineDashOffset=0)}function w(e,t,r,n){for(var a=e.length,o=3;o<a;o+=4){var i=e[o];if(0===i)e[o-3]=t,e[o-2]=r,e[o-1]=n;else if(i<255){var s=255-i;e[o-3]=e[o-3]*i+t*s>>8,e[o-2]=e[o-2]*i+r*s>>8,e[o-1]=e[o-1]*i+n*s>>8}}}function k(e,t,r){for(var n=e.length,a=3;a<n;a+=4){var o=r?r[e[a]]:e[a];t[a]=t[a]*o*.00392156862745098|0}}function x(e,t,r){for(var n=e.length,a=3;a<n;a+=4){var o=77*e[a-3]+152*e[a-2]+28*e[a-1];t[a]=r?t[a]*r[o>>8]>>8:t[a]*o>>16}}function P(e,t,r,n){var a=n[0],o=n[1],i=n[2]-a,s=n[3]-o;0!==i&&0!==s&&(function(e,t,r,n,a,o,i,s,u,l,c){var f,d=!!o,h=d?o[0]:0,p=d?o[1]:0,v=d?o[2]:0;f="Luminosity"===a?x:k;for(var y=Math.min(n,Math.ceil(1048576/r)),m=0;m<n;m+=y){var g=Math.min(y,n-m),b=e.getImageData(s-l,m+(u-c),r,g),_=t.getImageData(s,m+u,r,g);d&&w(b.data,h,p,v),f(b.data,_.data,i),t.putImageData(_,s,m+u)}}(t.context,r,i,s,t.subtype,t.backdrop,t.transferMap,a,o,t.offsetX,t.offsetY),e.save(),e.globalAlpha=1,e.globalCompositeOperation="source-over",e.setTransform(1,0,0,1,0,0),e.drawImage(r.canvas,0,0),e.restore(
2))}function C(e,t){var r=n.Util.singularValueDecompose2dScale(e);r[0]=Math.fround(r[0]),r[1]=Math.fround(r[1]);var a=Math.fround((globalThis.devicePixelRatio||1)*o.PixelsPerInch.PDF_TO_CSS_UNITS);return void 0!==t?t:r[0]<=a||r[1]<=a}var T=["butt","round","square"],R=["miter","round","bevel"],E={},O={},F=function(){function e(t,r,n,a,o,i,s){u(this,e),this.ctx=t,this.current=new g(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=r,this.objs=n,this.canvasFactory=a,this.imageLayer=o,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=[],this.optionalContentConfig=i,this.cachedCanvases=new m(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=s,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,t&&y(t),this._cachedGetSinglePixelWidth=null}return c(e,[{key:"beginDrawing",value:function(e){var t=e.transform,r=e.viewport,n=e.transparency,a=void 0!==n&&n,o=e.background,i=void 0===o?null:o,s=this.ctx.canvas.width,u=this.ctx.canvas.height;if(this.ctx.save(),this.ctx.fillStyle=i||"rgb(255, 255, 255)",this.ctx.fillRect(0,0,s,u),this.ctx.restore(),a){var l=this.cachedCanvases.getCanvas("transparent",s,u,!0);this.compositeCtx=this.ctx,this.transparentCanvas=l.canvas,this.ctx=l.context,this.ctx.save(),this.ctx.transform.apply(this.ctx,this.compositeCtx.mozCurrentTransform)}this.ctx.save(),A(this.ctx),t&&(this.ctx.transform.apply(this.ctx,t),this.outputScaleX=t[0],this.outputScaleY=t[0]),this.ctx.transform.apply(this.ctx,r.transform),this.viewportScale=r.scale,this.baseTransform=this.ctx.mozCurrentTransform.slice(),this._combinedScaleFactor=Math.hypot(this.baseTransform[0],this.baseTransform[2]),this.imageLayer&&this.imageLayer.beginLayout()}},{key:"executeOperatorList",value:function(e,t,r,a){var o=e.argsArray,i=e.fnArray,u=t||0,l=o.length;if(l===u)return u;for(var c,f=l-u>10&&"function"===typeof r,d=f?Date.now()+15:0,h=0,p=this.commonObjs,v=this.objs;;){if(void 0!==a&&u===a.nextBreakPoint)return a.breakIt(u,r),u;if((c=i[u])!==n.OPS.dependency)this[c].apply(this,o[u]);else{var y,m=s(o[u]);try{for(m.s();!(y=m.n()).done;){var g=y.value,b=g.startsWith("g_")?p:v;if(!b.has(g))return b.get(g,r),u}}catch(_){m.e(_)}finally{m.f()}}if(++u===l)return u;if(f&&++h>10){if(Date.now()>d)return r(),u;h=0}}}},{key:"endDrawing",value:function(){for(;this.stateStack.length||null!==this.current.activeSMask;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null),this.cachedCanvases.clear(),this.cachedPatterns.clear(),this.imageLayer&&this.imageLayer.endLayout()}},{key:"_scaleImage",value:function(e,t){for(var r,n,a=e.width,o=e.height,i=Math.max(Math.hypot(t[0],t[1]),1),s=Math.max(Math.hypot(t[2],t[3]),1),u=a,l=o,c="prescale1";i>2&&u>1||s>2&&l>1;){var f=u,d=l;i>2&&u>1&&(i/=u/(f=Math.ceil(u/2))),s>2&&l>1&&(s/=l/(d=Math.ceil(l/2))),(n=(r=this.cachedCanvases.getCanvas(c,f,d)).context).clearRect(0,0,f,d),n.drawImage(e,0,0,u,l,0,0,f,d),e=r.canvas,u=f,l=d,c="prescale1"===c?"prescale2":"prescale1"}return{img:e,paintWidth:u,paintHeight:l}}},{key:"_createMaskCanvas",value:function(e){var t=this.ctx,r=e.width,o=e.height,i=this.current.fillColor,s=this.current.patternFill,u=this.cachedCanvases.getCanvas("maskCanvas",r,o);_(u.context,e);var l=t.mozCurrentTransform,c=n.Util.transform(l,[1/r,0,0,-1/o,0,0]);c=n.Util.transform(c,[1,0,0,1,0,-o]);var f=n.Util.applyTransform([0,0],c),d=n.Util.applyTransform([r,o],c),h=n.Util.normalizeRect([f[0],f[1],d[0],d[1]]),p=Math.ceil(h[2]-h[0]),v=Math.ceil(h[3]-h[1]),y=this.cachedCanvases.getCanvas("fillCanvas",p,v,!0),m=y.context,g=Math.min(f[0],d[0]),b=Math.min(f[1],d[1]);m.translate(-g,-b),m.transform.apply(m,c);var S=this._scaleImage(u.canvas,m.mozCurrentTransformInverse);m.imageSmoothingEnabled=C(m.mozCurrentTransform,e.interpolate),m.drawImage(S.img,0,0,S.img.width,S.img.height,0,0,r,o),m.globalCompositeOperation="source-in";var A=n.Util.transform(m.mozCurrentTransformInverse,[1,0,0,1,-g,-b]);return m.fillStyle=s?i.getPattern(t,this,A,a.PathType.FILL):i,m.fillRect(0,0,r,o),{canvas:y.canvas,offsetX:Math.round(g),offsetY:Math.round(b)}}},{key:"setLineWidth",value:function(e){this.current.lineWidth=e,this.ctx.lineWidth=e}},{key:"setLineCap",value:function(e){this.ctx.lineCap=T[e]}},{key:"setLineJoin",value:function(e){this.ctx.lineJoin=R[e]}},{key:"setMiterLimit",value:function(e){this.ctx.miterLimit=e}},{key:"setDash",value:function(e,t){var r=this.ctx;void 0!==r.setLineDash&&(r.setLineDash(e),r.lineDashOffset=t)}},{key:"setRenderingIntent",value:function(e){}},{key:"setFlatness",value:function(e){}},{key:"setGState",value:function(e){for(var t=0,r=e.length;t<r;t++){var n=e[t],a=n[0],o=n[1];switch(a){case"LW":this.setLineWidth(o);break;case"LC":this.setLineCap(o);break;case"LJ":this.setLineJoin(o);break;case"ML":this.setMiterLimit(o);break;case"D":this.setDash(o[0],o[1]);break;
2case"RI":this.setRenderingIntent(o);break;case"FL":this.setFlatness(o);break;case"Font":this.setFont(o[0],o[1]);break;case"CA":this.current.strokeAlpha=n[1];break;case"ca":this.current.fillAlpha=n[1],this.ctx.globalAlpha=n[1];break;case"BM":this.ctx.globalCompositeOperation=o;break;case"SMask":this.current.activeSMask=o?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.current.transferMaps=o}}}},{key:"checkSMaskState",value:function(){var e=!!this.suspendedCtx;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}},{key:"beginSMaskMode",value:function(){if(this.suspendedCtx)throw new Error("beginSMaskMode called while already in smask mode");var e=this.ctx.canvas.width,t=this.ctx.canvas.height,r="smaskGroupAt"+this.groupLevel,n=this.cachedCanvases.getCanvas(r,e,t,!0);this.suspendedCtx=this.ctx,this.ctx=n.context;var a=this.ctx;a.setTransform.apply(a,this.suspendedCtx.mozCurrentTransform),S(this.suspendedCtx,a),function(e,t){if(e._removeMirroring)throw new Error("Context is already forwarding operations.");e.__originalSave=e.save,e.__originalRestore=e.restore,e.__originalRotate=e.rotate,e.__originalScale=e.scale,e.__originalTranslate=e.translate,e.__originalTransform=e.transform,e.__originalSetTransform=e.setTransform,e.__originalResetTransform=e.resetTransform,e.__originalClip=e.clip,e.__originalMoveTo=e.moveTo,e.__originalLineTo=e.lineTo,e.__originalBezierCurveTo=e.bezierCurveTo,e.__originalRect=e.rect,e.__originalClosePath=e.closePath,e.__originalBeginPath=e.beginPath,e._removeMirroring=function(){e.save=e.__originalSave,e.restore=e.__originalRestore,e.rotate=e.__originalRotate,e.scale=e.__originalScale,e.translate=e.__originalTranslate,e.transform=e.__originalTransform,e.setTransform=e.__originalSetTransform,e.resetTransform=e.__originalResetTransform,e.clip=e.__originalClip,e.moveTo=e.__originalMoveTo,e.lineTo=e.__originalLineTo,e.bezierCurveTo=e.__originalBezierCurveTo,e.rect=e.__originalRect,e.closePath=e.__originalClosePath,e.beginPath=e.__originalBeginPath,delete e._removeMirroring},e.save=function(){t.save(),this.__originalSave()},e.restore=function(){t.restore(),this.__originalRestore()},e.translate=function(e,r){t.translate(e,r),this.__originalTranslate(e,r)},e.scale=function(e,r){t.scale(e,r),this.__originalScale(e,r)},e.transform=function(e,r,n,a,o,i){t.transform(e,r,n,a,o,i),this.__originalTransform(e,r,n,a,o,i)},e.setTransform=function(e,r,n,a,o,i){t.setTransform(e,r,n,a,o,i),this.__originalSetTransform(e,r,n,a,o,i)},e.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},e.rotate=function(e){t.rotate(e),this.__originalRotate(e)},e.clip=function(e){t.clip(e),this.__originalClip(e)},e.moveTo=function(e,r){t.moveTo(e,r),this.__originalMoveTo(e,r)},e.lineTo=function(e,r){t.lineTo(e,r),this.__originalLineTo(e,r)},e.bezierCurveTo=function(e,r,n,a,o,i){t.bezierCurveTo(e,r,n,a,o,i),this.__originalBezierCurveTo(e,r,n,a,o,i)},e.rect=function(e,r,n,a){t.rect(e,r,n,a),this.__originalRect(e,r,n,a)},e.closePath=function(){t.closePath(),this.__originalClosePath()},e.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}(a,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}},{key:"endSMaskMode",value:function(){if(!this.suspendedCtx)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),S(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.current.activeSMask=null,this.suspendedCtx=null}},{key:"compose",value:function(e){if(this.current.activeSMask){e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];var t=this.current.activeSMask;P(this.suspendedCtx,t,this.ctx,e),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}}},{key:"save",value:function(){this.ctx.save();var e=this.current;this.stateStack.push(e),this.current=e.clone()}},{key:"restore",value:function(){0===this.stateStack.length&&this.current.activeSMask&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.ctx.restore(
2),this.checkSMaskState(),this.pendingClip=null,this._cachedGetSinglePixelWidth=null)}},{key:"transform",value:function(e,t,r,n,a,o){this.ctx.transform(e,t,r,n,a,o),this._cachedGetSinglePixelWidth=null}},{key:"constructPath",value:function(e,t){for(var r,a,o=this.ctx,i=this.current,s=i.x,u=i.y,l=0,c=0,f=e.length;l<f;l++)switch(0|e[l]){case n.OPS.rectangle:s=t[c++],u=t[c++];var d=t[c++],h=t[c++],p=s+d,v=u+h;o.moveTo(s,u),0===d||0===h?o.lineTo(p,v):(o.lineTo(p,u),o.lineTo(p,v),o.lineTo(s,v)),i.updatePathMinMax(o.mozCurrentTransform,s,u),i.updatePathMinMax(o.mozCurrentTransform,p,v),o.closePath();break;case n.OPS.moveTo:s=t[c++],u=t[c++],o.moveTo(s,u),i.updatePathMinMax(o.mozCurrentTransform,s,u);break;case n.OPS.lineTo:s=t[c++],u=t[c++],o.lineTo(s,u),i.updatePathMinMax(o.mozCurrentTransform,s,u);break;case n.OPS.curveTo:r=s,a=u,s=t[c+4],u=t[c+5],o.bezierCurveTo(t[c],t[c+1],t[c+2],t[c+3],s,u),i.updateCurvePathMinMax(o.mozCurrentTransform,r,a,t[c],t[c+1],t[c+2],t[c+3],s,u),c+=6;break;case n.OPS.curveTo2:r=s,a=u,o.bezierCurveTo(s,u,t[c],t[c+1],t[c+2],t[c+3]),i.updateCurvePathMinMax(o.mozCurrentTransform,r,a,s,u,t[c],t[c+1],t[c+2],t[c+3]),s=t[c+2],u=t[c+3],c+=4;break;case n.OPS.curveTo3:r=s,a=u,s=t[c+2],u=t[c+3],o.bezierCurveTo(t[c],t[c+1],s,u,s,u),i.updateCurvePathMinMax(o.mozCurrentTransform,r,a,t[c],t[c+1],s,u,s,u),c+=4;break;case n.OPS.closePath:o.closePath()}i.setCurrentPoint(s,u)}},{key:"closePath",value:function(){this.ctx.closePath()}},{key:"stroke",value:function(e){e="undefined"===typeof e||e;var t=this.ctx,r=this.current.strokeColor;if(t.globalAlpha=this.current.strokeAlpha,this.contentVisible)if("object"===i(r)&&null!==r&&void 0!==r&&r.getPattern){var n=this.getSinglePixelWidth();t.save(),t.strokeStyle=r.getPattern(t,this,t.mozCurrentTransformInverse,a.PathType.STROKE),t.lineWidth=Math.max(n,this.current.lineWidth),t.stroke(),t.restore()}else{var o=this.getSinglePixelWidth();o<0&&-o>=this.current.lineWidth?(t.save(),t.resetTransform(),t.lineWidth=Math.round(this._combinedScaleFactor),t.stroke(),t.restore()):(t.lineWidth=Math.max(o,this.current.lineWidth),t.stroke())}e&&this.consumePath(this.current.getClippedPathBoundingBox()),t.globalAlpha=this.current.fillAlpha}},{key:"closeStroke",value:function(){this.closePath(),this.stroke()}},{key:"fill",value:function(e){e="undefined"===typeof e||e;var t=this.ctx,r=this.current.fillColor,n=!1;this.current.patternFill&&(t.save(),t.fillStyle=r.getPattern(t,this,t.mozCurrentTransformInverse,a.PathType.FILL),n=!0);var o=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==o&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),n&&t.restore(),e&&this.consumePath(o)}},{key:"eoFill",value:function(){this.pendingEOFill=!0,this.fill()}},{key:"fillStroke",value:function(){this.fill(!1),this.stroke(!1),this.consumePath()}},{key:"eoFillStroke",value:function(){this.pendingEOFill=!0,this.fillStroke()}},{key:"closeFillStroke",value:function(){this.closePath(),this.fillStroke()}},{key:"closeEOFillStroke",value:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}},{key:"endPath",value:function(){this.consumePath()}},{key:"clip",value:function(){this.pendingClip=E}},{key:"eoClip",value:function(){this.pendingClip=O}},{key:"beginText",value:function(){this.current.textMatrix=n.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}},{key:"endText",value:function(){var e=this.pendingTextPaths,t=this.ctx;if(void 0!==e){t.save(),t.beginPath();for(var r=0;r<e.length;r++){var n=e[r];t.setTransform.apply(t,n.transform),t.translate(n.x,n.y),n.addToPath(t,n.fontSize)}t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else t.beginPath()}},{key:"setCharSpacing",value:function(e){this.current.charSpacing=e}},{key:"setWordSpacing",value:function(e){this.current.wordSpacing=e}},{key:"setHScale",value:function(e){this.current.textHScale=e/100}},{key:"setLeading",value:function(e){this.current.leading=-e}},{key:"setFont",value:function(e,t){var r=this.commonObjs.get(e),a=this.current;if(!r)throw new Error("Can't find font for ".concat(e));if(a.fontMatrix=r.fontMatrix||n.FONT_IDENTITY_MATRIX,0!==a.fontMatrix[0]&&0!==a.fontMatrix[3]||(0,n.warn)("Invalid font matrix for font "+e),t<0?(t=-t,a.fontDirection=-1):a.fontDirection=1,this.current.font=r,this.current.fontSize=t,!r.isType3Font){var o=r.loadedName||"sans-serif",i="normal";r.black?i="900":r.bold&&(i="bold");var s=r.italic?"italic":"normal",u='"'.concat(o,'", ').concat(r.fallbackName),l=t;t<16?l=16:t>100&&(l=100),this.current.fontSizeScale=t/l,this.ctx.font="".concat(s," ").concat(i," ").concat(l,"px ").concat(u)}}},{key:"setTextRenderingMode",value:function(e){this.current.textRenderingMode=e}},{key:"setTextRise",value:function(e){this.current.textRise=e}},{key:"moveText",value:function(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}},{key:"setLeadingMoveText",value:function(e,t){this.setLeading(-t),this.moveText(e,t)}},{key:"setTextMatrix",value:function(e,t,r,n,a,o){this.current.textMatrix=[e,t,r,n,a,o],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}},{key:"nextLine",value:function(){this.moveText(0,this.current.leading)}},{key:"paintChar",value:function(e,t,r,a,o){var i,s=this.ctx,u=this.current,l=u.font,c=u.textRenderingMode,f=u.fontSize/u.fontSizeScale,d=c&n.TextRenderingMode.FILL_STROKE_MASK,h=!!(c&n.TextRenderingMode.ADD_TO_PATH_FLAG),p=u.patternFill&&!l.missingFile;(l.disableFontFace||h||p)&&(i=l.getPathGenerator(this.commonObjs,e)),l.disableFontFace||p?(s.save(),s.translate(t,r),s.beginPath(),i(s,f),a&&s.setTransform.apply(s,a),d!==n.TextRenderingMode.FILL&&d!==n.TextRenderingMode.FILL_STROKE||s.fill(),d!==n.TextRenderingMode.STROKE&&d!==n.TextRenderingMode.FILL_STROKE||(o&&
2(s.resetTransform(),s.lineWidth=Math.round(this._combinedScaleFactor)),s.stroke()),s.restore()):(d!==n.TextRenderingMode.FILL&&d!==n.TextRenderingMode.FILL_STROKE||s.fillText(e,t,r),d!==n.TextRenderingMode.STROKE&&d!==n.TextRenderingMode.FILL_STROKE||(o?(s.save(),s.moveTo(t,r),s.resetTransform(),s.lineWidth=Math.round(this._combinedScaleFactor),s.strokeText(e,0,0),s.restore()):s.strokeText(e,t,r))),h&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:s.mozCurrentTransform,x:t,y:r,fontSize:f,addToPath:i})}},{key:"isFontSubpixelAAEnabled",get:function(){var e=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10).context;e.scale(1.5,1),e.fillText("I",0,10);for(var t=e.getImageData(0,0,10,10).data,r=!1,a=3;a<t.length;a+=4)if(t[a]>0&&t[a]<255){r=!0;break}return(0,n.shadow)(this,"isFontSubpixelAAEnabled",r)}},{key:"showText",value:function(e){var t=this.current,r=t.font;if(r.isType3Font)return this.showType3Text(e);var o=t.fontSize;if(0!==o){var i,s=this.ctx,u=t.fontSizeScale,l=t.charSpacing,c=t.wordSpacing,f=t.fontDirection,d=t.textHScale*f,h=e.length,p=r.vertical,v=p?1:-1,y=r.defaultVMetrics,m=o*t.fontMatrix[0],g=t.textRenderingMode===n.TextRenderingMode.FILL&&!r.disableFontFace&&!t.patternFill;if(s.save(),s.transform.apply(s,t.textMatrix),s.translate(t.x,t.y+t.textRise),f>0?s.scale(d,-1):s.scale(d,1),t.patternFill){s.save();var b=t.fillColor.getPattern(s,this,s.mozCurrentTransformInverse,a.PathType.FILL);i=s.mozCurrentTransform,s.restore(),s.fillStyle=b}var _=t.lineWidth,S=!1,A=t.textMatrixScale;if(0===A||0===_){var w=t.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;w!==n.TextRenderingMode.STROKE&&w!==n.TextRenderingMode.FILL_STROKE||(this._cachedGetSinglePixelWidth=null,S=(_=this.getSinglePixelWidth())<0)}else _/=A;1!==u&&(s.scale(u,u),_/=u),s.lineWidth=_;var k,x=0;for(k=0;k<h;++k){var P=e[k];if((0,n.isNum)(P))x+=v*P*o/1e3;else{var C=!1,T=(P.isSpace?c:0)+l,R=P.fontChar,E=P.accent,O=void 0,F=void 0,I=P.width;if(p){var j=P.vmetric||y,M=-(P.vmetric?j[1]:.5*I)*m,D=j[2]*m;I=j?-j[0]:I,O=M/u,F=(x+D)/u}else O=x/u,F=0;if(r.remeasure&&I>0){var L=1e3*s.measureText(R).width/o*u;if(I<L&&this.isFontSubpixelAAEnabled){var N=I/L;C=!0,s.save(),s.scale(N,1),O/=N}else I!==L&&(O+=(I-L)/2e3*o/u)}if(this.contentVisible&&(P.isInFont||r.missingFile))if(g&&!E)s.fillText(R,O,F);else if(this.paintChar(R,O,F,i,S),E){var q=O+o*E.offset.x/u,B=F-o*E.offset.y/u;this.paintChar(E.fontChar,q,B,i,S)}x+=p?I*m-T*f:I*m+T*f,C&&s.restore()}}p?t.y-=x:t.x+=x*d,s.restore(),this.compose()}}},{key:"showType3Text",value:function(e){var t,r,a,o,i=this.ctx,s=this.current,u=s.font,l=s.fontSize,c=s.fontDirection,f=u.vertical?1:-1,d=s.charSpacing,h=s.wordSpacing,p=s.textHScale*c,v=s.fontMatrix||n.FONT_IDENTITY_MATRIX,y=e.length;if(s.textRenderingMode!==n.TextRenderingMode.INVISIBLE&&0!==l){for(this._cachedGetSinglePixelWidth=null,i.save(),i.transform.apply(i,s.textMatrix),i.translate(s.x,s.y),i.scale(p,c),t=0;t<y;++t)if(r=e[t],(0,n.isNum)(r))o=f*r*l/1e3,this.ctx.translate(o,0),s.x+=o*p;else{var m=(r.isSpace?h:0)+d,g=u.charProcOperatorList[r.operatorListId];g?(this.contentVisible&&(this.processingType3=r,this.save(),i.scale(l,l),i.transform.apply(i,v),this.executeOperatorList(g),this.restore()),a=n.Util.applyTransform([r.width,0],v)[0]*l+m,i.translate(a,0),s.x+=a*p):(0,n.warn)('Type3 character "'.concat(r.operatorListId,'" is not available.'))}i.restore(),this.processingType3=null}}},{key:"setCharWidth",value:function(e,t){}},{key:"setCharWidthAndBounds",value:function(e,t,r,n,a,o){this.ctx.rect(r,n,a-r,o-n),this.clip(),this.endPath()}},{key:"getColorN_Pattern",value:function(t){var r,n=this;if("TilingPattern"===t[0]){var o=t[1],i=this.baseTransform||this.ctx.mozCurrentTransform.slice(),s={createCanvasGraphics:function(t){return new e(t,n.commonObjs,n.objs,n.canvasFactory)}};r=new a.TilingPattern(t,o,this.ctx,s,i)}else r=this._getPattern(t[1],t[2]);return r}},{key:"setStrokeColorN",value:function(){this.current.strokeColor=this.getColorN_Pattern(arguments)}},{key:"setFillColorN",value:function(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}},{key:"setStrokeRGBColor",value:function(e,t,r){var a=n.Util.makeHexColor(e,t,r);this.ctx.strokeStyle=a,this.current.strokeColor=a}},{key:"setFillRGBColor",value:function(e,t,r){var a=n.Util.makeHexColor(e,t,r);this.ctx.fillStyle=a,this.current.fillColor=a,this.current.patternFill=!1}},{key:"_getPattern",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.cachedPatterns.has(e)?t=this.cachedPatterns.get(e):(t=(0,a.getShadingPattern)(this.objs.get(e)),this.cachedPatterns.set(e,t)),r&&(t.matrix=r),t}},{key:"shadingFill",value:function(e){if(this.contentVisible){var t=this.ctx;this.save();var r=this._getPattern(e);t.fillStyle=r.getPattern(t,this,t.mozCurrentTransformInverse,a.PathType.SHADING);var o=t.mozCurrentTransformInverse;if(o){var i=t.canvas,s=i.width,u=i.height,l=n.Util.applyTransform([0,0],o),c=n.Util.applyTransform([0,u],o),f=n.Util.applyTransform([s,0],o),d=n.Util.applyTransform([s,u],o),h=Math.min(l[0],c[0],f[0],d[0]),p=Math.min(l[1],c[1],f[1],d[1]),v=Math.max(l[0],c[0],f[0],d[0]),y=Math.max(l[1],c[1],f[1],d[1]);this.ctx.fillRect(h,p,v-h,y-p)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore(
2)}}},{key:"beginInlineImage",value:function(){(0,n.unreachable)("Should not call beginInlineImage")}},{key:"beginImageData",value:function(){(0,n.unreachable)("Should not call beginImageData")}},{key:"paintFormXObjectBegin",value:function(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(e)&&6===e.length&&this.transform.apply(this,e),this.baseTransform=this.ctx.mozCurrentTransform,t)){var r=t[2]-t[0],n=t[3]-t[1];this.ctx.rect(t[0],t[1],r,n),this.current.updatePathMinMax(this.ctx.mozCurrentTransform,t[0],t[1]),this.current.updatePathMinMax(this.ctx.mozCurrentTransform,t[2],t[3]),this.clip(),this.endPath()}}},{key:"paintFormXObjectEnd",value:function(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}},{key:"beginGroup",value:function(e){if(this.contentVisible){this.save();var t=this.suspendedCtx;this.current.activeSMask&&(this.suspendedCtx=null,this.current.activeSMask=null);var r=this.ctx;e.isolated||(0,n.info)("TODO: Support non-isolated groups."),e.knockout&&(0,n.warn)("Knockout groups not supported.");var a=r.mozCurrentTransform;if(e.matrix&&r.transform.apply(r,e.matrix),!e.bbox)throw new Error("Bounding box is required.");var o=n.Util.getAxialAlignedBoundingBox(e.bbox,r.mozCurrentTransform),i=[0,0,r.canvas.width,r.canvas.height];o=n.Util.intersect(o,i)||[0,0,0,0];var s=Math.floor(o[0]),u=Math.floor(o[1]),l=Math.max(Math.ceil(o[2])-s,1),c=Math.max(Math.ceil(o[3])-u,1),f=1,d=1;l>p&&(f=l/p,l=p),c>p&&(d=c/p,c=p),this.current.startNewPathAndClipBox([0,0,l,c]);var h="groupAt"+this.groupLevel;e.smask&&(h+="_smask_"+this.smaskCounter++%2);var v=this.cachedCanvases.getCanvas(h,l,c,!0),y=v.context;y.scale(1/f,1/d),y.translate(-s,-u),y.transform.apply(y,a),e.smask?this.smaskStack.push({canvas:v.canvas,context:y,offsetX:s,offsetY:u,scaleX:f,scaleY:d,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(r.setTransform(1,0,0,1,0,0),r.translate(s,u),r.scale(f,d),r.save()),S(r,y),this.ctx=y,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push({ctx:r,suspendedCtx:t}),this.groupLevel++}}},{key:"endGroup",value:function(e){if(this.contentVisible){this.groupLevel--;var t=this.ctx,r=this.groupStack.pop(),a=r.ctx,o=r.suspendedCtx;if(this.ctx=a,this.ctx.imageSmoothingEnabled=!1,o&&(this.suspendedCtx=o),e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();var i=this.ctx.mozCurrentTransform;this.restore(),this.ctx.save(),this.ctx.setTransform.apply(this.ctx,i);var s=n.Util.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],i);this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(s)}}}},{key:"beginAnnotations",value:function(){this.save(),this.baseTransform&&this.ctx.setTransform.apply(this.ctx,this.baseTransform)}},{key:"endAnnotations",value:function(){this.restore()}},{key:"beginAnnotation",value:function(e,t,r,a,o){if(this.save(),Array.isArray(t)&&4===t.length){var i=t[2]-t[0],s=t[3]-t[1];if(o&&this.annotationCanvasMap){(r=r.slice())[4]-=t[0],r[5]-=t[1],(t=t.slice())[0]=t[1]=0,t[2]=i,t[3]=s;var u=f(n.Util.singularValueDecompose2dScale(this.ctx.mozCurrentTransform),2),l=u[0],c=u[1],d=this.viewportScale,h=Math.ceil(i*this.outputScaleX*d),p=Math.ceil(s*this.outputScaleY*d);this.annotationCanvas=this.canvasFactory.create(h,p);var v=this.annotationCanvas,m=v.canvas,b=v.context;m.style.width="calc(".concat(i,"px * var(--viewport-scale-factor))"),m.style.height="calc(".concat(s,"px * var(--viewport-scale-factor))"),this.annotationCanvasMap.set(e,m),this.annotationCanvas.savedCtx=this.ctx,this.ctx=b,this.ctx.setTransform(l,0,0,-c,0,s*c),y(this.ctx),A(this.ctx)}else A(this.ctx),this.ctx.rect(t[0],t[1],i,s),this.clip(),this.endPath()}this.current=new g(this.ctx.canvas.width,this.ctx.canvas.height),this.transform.apply(this,r),this.transform.apply(this,a)}},{key:"endAnnotation",value:function(){this.annotationCanvas&&(this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas),this.restore(
2)}},{key:"paintImageMaskXObject",value:function(e){if(this.contentVisible){var t=this.ctx,r=e.width,n=e.height,a=this.processingType3;if(a&&void 0===a.compiled&&(a.compiled=r<=1e3&&n<=1e3?function(e){var t,r,n,a,o=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),i=e.width,s=e.height,u=i+1,l=new Uint8Array(u*(s+1)),c=i+7&-8,f=e.data,d=new Uint8Array(c*s),h=0;for(t=0,r=f.length;t<r;t++)for(var p=f[t],v=128;v>0;)d[h++]=p&v?0:255,v>>=1;var y=0;for(0!==d[h=0]&&(l[0]=1,++y),n=1;n<i;n++)d[h]!==d[h+1]&&(l[n]=d[h]?2:1,++y),h++;for(0!==d[h]&&(l[n]=2,++y),t=1;t<s;t++){a=t*u,d[(h=t*c)-c]!==d[h]&&(l[a]=d[h]?1:8,++y);var m=(d[h]?4:0)+(d[h-c]?8:0);for(n=1;n<i;n++)o[m=(m>>2)+(d[h+1]?4:0)+(d[h-c+1]?8:0)]&&(l[a+n]=o[m],++y),h++;if(d[h-c]!==d[h]&&(l[a+n]=d[h]?2:4,++y),y>1e3)return null}for(a=t*u,0!==d[h=c*(s-1)]&&(l[a]=8,++y),n=1;n<i;n++)d[h]!==d[h+1]&&(l[a+n]=d[h]?4:8,++y),h++;if(0!==d[h]&&(l[a+n]=4,++y),y>1e3)return null;var g=new Int32Array([0,u,-1,0,-u,0,0,0,1]),b=[];for(t=0;y&&t<=s;t++){for(var _=t*u,S=_+i;_<S&&!l[_];)_++;if(_!==S){var A=[_%u,t],w=_,k=l[_];do{var x=g[k];do{_+=x}while(!l[_]);var P=l[_];5!==P&&10!==P?(k=P,l[_]=0):(k=P&51*k>>4,l[_]&=k>>2|k<<2),A.push(_%u,_/u|0),l[_]||--y}while(w!==_);b.push(A),--t}}return function(e){e.save(),e.scale(1/i,-1/s),e.translate(0,-s),e.beginPath();for(var t=0,r=b.length;t<r;t++){var n=b[t];e.moveTo(n[0],n[1]);for(var a=2,o=n.length;a<o;a+=2)e.lineTo(n[a],n[a+1])}e.fill(),e.beginPath(),e.restore()}}({data:e.data,width:r,height:n}):null),null!==a&&void 0!==a&&a.compiled)a.compiled(t);else{var o=this._createMaskCanvas(e),i=o.canvas;t.save(),t.setTransform(1,0,0,1,0,0),t.drawImage(i,o.offsetX,o.offsetY),t.restore(),this.compose()}}}},{key:"paintImageMaskXObjectRepeat",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0;if(this.contentVisible){var s=this.ctx;s.save();var u=s.mozCurrentTransform;s.transform(t,r,a,o,0,0);var l=this._createMaskCanvas(e);s.setTransform(1,0,0,1,0,0);for(var c=0,d=i.length;c<d;c+=2){var h=n.Util.transform(u,[t,r,a,o,i[c],i[c+1]]),p=n.Util.applyTransform([0,0],h),v=f(p,2),y=v[0],m=v[1];s.drawImage(l.canvas,y,m)}s.restore(),this.compose()}}},{key:"paintImageMaskXObjectGroup",value:function(e){if(this.contentVisible){for(var t=this.ctx,r=this.current.fillColor,n=this.current.patternFill,o=0,i=e.length;o<i;o++){var s=e[o],u=s.width,l=s.height,c=this.cachedCanvases.getCanvas("maskCanvas",u,l),f=c.context;f.save(),_(f,s),f.globalCompositeOperation="source-in",f.fillStyle=n?r.getPattern(f,this,t.mozCurrentTransformInverse,a.PathType.FILL):r,f.fillRect(0,0,u,l),f.restore(),t.save(),t.transform.apply(t,s.transform),t.scale(1,-1),t.drawImage(c.canvas,0,0,u,l,0,-1,1,1),t.restore()}this.compose()}}},{key:"paintImageXObject",value:function(e){if(this.contentVisible){var t=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);t?this.paintInlineImageXObject(t):(0,n.warn)("Dependent image isn't ready yet")}}},{key:"paintImageXObjectRepeat",value:function(e,t,r,a){if(this.contentVisible){var o=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);if(o){for(var i=o.width,s=o.height,u=[],l=0,c=a.length;l<c;l+=2)u.push({transform:[t,0,0,r,a[l],a[l+1]],x:0,y:0,w:i,h:s});this.paintInlineImageXObjectGroup(o,u)}else(0,n.warn)("Dependent image isn't ready yet")}}},{key:"paintInlineImageXObject",value:function(e){if(this.contentVisible){var t,r=e.width,n=e.height,a=this.ctx;if(this.save(),a.scale(1/r,-1/n),"function"===typeof HTMLElement&&e instanceof HTMLElement||!e.data)t=e;else{var o=this.cachedCanvases.getCanvas("inlineImage",r,n);b(o.context,e,this.current.transferMaps),t=o.canvas}var i=this._scaleImage(t,a.mozCurrentTransformInverse);if(a.imageSmoothingEnabled=C(a.mozCurrentTransform,e.interpolate),a.drawImage(i.img,0,0,i.paintWidth,i.paintHeight,0,-n,r,n),this.imageLayer){var s=this.getCanvasPosition(0,-n);this.imageLayer.appendImage({imgData:e,left:s[0],top:s[1],width:r/a.mozCurrentTransformInverse[0],height:n/a.mozCurrentTransformInverse[3]}
2)}this.compose(),this.restore()}}},{key:"paintInlineImageXObjectGroup",value:function(e,t){if(this.contentVisible){var r=this.ctx,n=e.width,a=e.height,o=this.cachedCanvases.getCanvas("inlineImage",n,a);b(o.context,e,this.current.transferMaps);for(var i=0,s=t.length;i<s;i++){var u=t[i];if(r.save(),r.transform.apply(r,u.transform),r.scale(1,-1),r.drawImage(o.canvas,u.x,u.y,u.w,u.h,0,-1,1,1),this.imageLayer){var l=this.getCanvasPosition(u.x,u.y);this.imageLayer.appendImage({imgData:e,left:l[0],top:l[1],width:n,height:a})}r.restore()}this.compose()}}},{key:"paintSolidColorImageMask",value:function(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}},{key:"markPoint",value:function(e){}},{key:"markPointProps",value:function(e,t){}},{key:"beginMarkedContent",value:function(e){this.markedContentStack.push({visible:!0})}},{key:"beginMarkedContentProps",value:function(e,t){"OC"===e?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(t)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}},{key:"endMarkedContent",value:function(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}},{key:"beginCompat",value:function(){}},{key:"endCompat",value:function(){}},{key:"consumePath",value:function(e){this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(e);var t=this.ctx;this.pendingClip&&(this.pendingClip===O?t.clip("evenodd"):t.clip(),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),t.beginPath()}},{key:"getSinglePixelWidth",value:function(){if(null===this._cachedGetSinglePixelWidth){var e=this.ctx.mozCurrentTransform,t=Math.abs(e[0]*e[3]-e[2]*e[1]),r=Math.pow(e[0],2)+Math.pow(e[2],2),n=Math.pow(e[1],2)+Math.pow(e[3],2),a=Math.sqrt(Math.max(r,n))/t;r!==n&&this._combinedScaleFactor*a>1?this._cachedGetSinglePixelWidth=-this._combinedScaleFactor*a:t>Number.EPSILON?this._cachedGetSinglePixelWidth=a:this._cachedGetSinglePixelWidth=1}return this._cachedGetSinglePixelWidth}},{key:"getCanvasPosition",value:function(e,t){var r=this.ctx.mozCurrentTransform;return[r[0]*e+r[2]*t+r[4],r[1]*e+r[3]*t+r[5]]}},{key:"isContentVisible",value:function(){for(var e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}}]),e}();for(var I in t.CanvasGraphics=F,n.OPS)void 0!==F.prototype[I]&&(F.prototype[n.OPS[I]]=F.prototype[I])},(e,t,r)=>{"use strict";function n(e){return n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.TilingPattern=t.PathType=void 0,t.getShadingPattern=function(e){switch(e[0]){case"RadialAxial":return new g(e);case"Mesh":return new S(e);case"Dummy":return new A}throw new Error("Unknown IR type: ".concat(e[0]))};var a=r(4);function o(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"===typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 o,s=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw o}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function l(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=f(e);if(t){var a=f(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return c(this,r)}}function c(e,t){if(t&&("object"===n(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),e}var v={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function y(e,t){if(t&&"undefined"!==typeof Path2D){var r=t[2]-t[0],n=t[3]-t[1],a=new Path2D;a.rect(t[0],t[1],r,n),e.clip(a)}}t.PathType=v;var m=function(){function e(){d(this,e),this.constructor===e&&(0,a.unreachable)("Cannot initialize BaseShadingPattern.")}return p(e,[{key:"getPattern",value:function(){(0,a.unreachable)("Abstract method `getPattern` called.")}}]),e}(),g=function(e){s(r,e);var t=l(r);function r(e){var n;return d(this,r),(n=t.call(this))._type=e[1],n._bbox=e[2],n._colorStops=e[3],n._p0=e[4],n._p1=e[5],n._r0=e[6],n._r1=e[7],n.matrix=null,n}return p(r,[{key:"_createGradient",value:function(e){var t;"axial"===this._type?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));var r,n=o(this._colorStops);try{for(n.s();!(r=n.n()).done;){var a=r.value;t.addColorStop(a[0],a[1])}}catch(i){n.e(i)}finally{n.f()}return t}},{key:"getPattern",value:function(e,t,r,n){var o;if(n===v.STROKE||n===v.FILL){var i=t.current.getClippedPathBoundingBox(n,e.mozCurrentTransform)||[0,0,0,0],s=Math.ceil(i[2]-i[0])||1,u=Math.ceil(i[3]-i[1])||1,l=t.cachedCanvases.getCanvas("pattern",s,u,!0),c=l.context;c.clearRect(0,0,c.canvas.width,c.canvas.height),c.beginPath(),c.rect(0,0,c.canvas.width,c.canvas.height),c.translate(-i[0],-i[1]),r=a.Util.transform(r,[1,0,0,1,i[0],i[1]]),c.transform.apply(c,t.baseTransform),this.matrix&&c.transform.apply(c,this.matrix
2),y(c,this._bbox),c.fillStyle=this._createGradient(c),c.fill(),o=e.createPattern(l.canvas,"no-repeat");var f=new DOMMatrix(r);try{o.setTransform(f)}catch(d){(0,a.warn)('RadialAxialShadingPattern.getPattern: "'.concat(null===d||void 0===d?void 0:d.message,'".'))}}else y(e,this._bbox),o=this._createGradient(e);return o}}]),r}(m);function b(e,t,r,n,a,o,i,s){var u,l=t.coords,c=t.colors,f=e.data,d=4*e.width;l[r+1]>l[n+1]&&(u=r,r=n,n=u,u=o,o=i,i=u),l[n+1]>l[a+1]&&(u=n,n=a,a=u,u=i,i=s,s=u),l[r+1]>l[n+1]&&(u=r,r=n,n=u,u=o,o=i,i=u);var h=(l[r]+t.offsetX)*t.scaleX,p=(l[r+1]+t.offsetY)*t.scaleY,v=(l[n]+t.offsetX)*t.scaleX,y=(l[n+1]+t.offsetY)*t.scaleY,m=(l[a]+t.offsetX)*t.scaleX,g=(l[a+1]+t.offsetY)*t.scaleY;if(!(p>=g))for(var b,_,S,A,w,k,x,P,C=c[o],T=c[o+1],R=c[o+2],E=c[i],O=c[i+1],F=c[i+2],I=c[s],j=c[s+1],M=c[s+2],D=Math.round(p),L=Math.round(g),N=D;N<=L;N++){if(N<y){var q=void 0;b=h-(h-v)*(q=N<p?0:(p-N)/(p-y)),_=C-(C-E)*q,S=T-(T-O)*q,A=R-(R-F)*q}else{var B=void 0;b=v-(v-m)*(B=N>g?1:y===g?0:(y-N)/(y-g)),_=E-(E-I)*B,S=O-(O-j)*B,A=F-(F-M)*B}var W=void 0;w=h-(h-m)*(W=N<p?0:N>g?1:(p-N)/(p-g)),k=C-(C-I)*W,x=T-(T-j)*W,P=R-(R-M)*W;for(var U=Math.round(Math.min(b,w)),G=Math.round(Math.max(b,w)),z=d*N+4*U,H=U;H<=G;H++)(W=(b-H)/(b-w))<0?W=0:W>1&&(W=1),f[z++]=_-(_-k)*W|0,f[z++]=S-(S-x)*W|0,f[z++]=A-(A-P)*W|0,f[z++]=255}}function _(e,t,r){var n,a,o=t.coords,i=t.colors;switch(t.type){case"lattice":var s=t.verticesPerRow,u=Math.floor(o.length/s)-1,l=s-1;for(n=0;n<u;n++)for(var c=n*s,f=0;f<l;f++,c++)b(e,r,o[c],o[c+1],o[c+s],i[c],i[c+1],i[c+s]),b(e,r,o[c+s+1],o[c+1],o[c+s],i[c+s+1],i[c+1],i[c+s]);break;case"triangles":for(n=0,a=o.length;n<a;n+=3)b(e,r,o[n],o[n+1],o[n+2],i[n],i[n+1],i[n+2]);break;default:throw new Error("illegal figure")}}var S=function(e){s(r,e);var t=l(r);function r(e){var n;return d(this,r),(n=t.call(this))._coords=e[2],n._colors=e[3],n._figures=e[4],n._bounds=e[5],n._bbox=e[7],n._background=e[8],n.matrix=null,n}return p(r,[{key:"_createMeshCanvas",value:function(e,t,r){var n=Math.floor(this._bounds[0]),a=Math.floor(this._bounds[1]),i=Math.ceil(this._bounds[2])-n,s=Math.ceil(this._bounds[3])-a,u=Math.min(Math.ceil(Math.abs(i*e[0]*1.1)),3e3),l=Math.min(Math.ceil(Math.abs(s*e[1]*1.1)),3e3),c=i/u,f=s/l,d={coords:this._coords,colors:this._colors,offsetX:-n,offsetY:-a,scaleX:1/c,scaleY:1/f},h=u+4,p=l+4,v=r.getCanvas("mesh",h,p,!1),y=v.context,m=y.createImageData(u,l);if(t)for(var g=m.data,b=0,S=g.length;b<S;b+=4)g[b]=t[0],g[b+1]=t[1],g[b+2]=t[2],g[b+3]=255;var A,w=o(this._figures);try{for(w.s();!(A=w.n()).done;)_(m,A.value,d)}catch(k){w.e(k)}finally{w.f()}return y.putImageData(m,2,2),{canvas:v.canvas,offsetX:n-2*c,offsetY:a-2*f,scaleX:c,scaleY:f}}},{key:"getPattern",value:function(e,t,r,n){var o;if(y(e,this._bbox),n===v.SHADING)o=a.Util.singularValueDecompose2dScale(e.mozCurrentTransform);else if(o=a.Util.singularValueDecompose2dScale(t.baseTransform),this.matrix){var i=a.Util.singularValueDecompose2dScale(this.matrix);o=[o[0]*i[0],o[1]*i[1]]}var s=this._createMeshCanvas(o,n===v.SHADING?null:this._background,t.cachedCanvases);return n!==v.SHADING&&(e.setTransform.apply(e,t.baseTransform),this.matrix&&e.transform.apply(e,this.matrix)),e.translate(s.offsetX,s.offsetY),e.scale(s.scaleX,s.scaleY),e.createPattern(s.canvas,"no-repeat")}}]),r}(m),A=function(e){s(r,e);var t=l(r);function r(){return d(this,r),t.apply(this,arguments)}return p(r,[{key:"getPattern",value:function(){return"hotpink"}}]),r}(m),w=1,k=2,x=function(){function e(t,r,n,a,o){d(this,e),this.operatorList=t[2],this.matrix=t[3]||[1,0,0,1,0,0],this.bbox=t[4],this.xstep=t[5],this.ystep=t[6],this.paintType=t[7],this.tilingType=t[8],this.color=r,this.ctx=n,this.canvasGraphicsFactory=a,this.baseTransform=o}return p(e,[{key:"createPatternCanvas",value:function(e){var t=this.operatorList,r=this.bbox,n=this.xstep,o=this.ystep,i=this.paintType,s=this.tilingType,u=this.color,l=this.canvasGraphicsFactory;(0,a.info)("TilingType: "+s);var c=r[0],f=r[1],d=r[2],h=r[3],p=a.Util.singularValueDecompose2dScale(this.matrix),v=a.Util.singularValueDecompose2dScale(this.baseTransform),y=[p[0]*v[0],p[1]*v[1]],m=this.getSizeAndScale(n,this.ctx.canvas.width,y[0]),g=this.getSizeAndScale(o,this.ctx.canvas.height,y[1]),b=e.cachedCanvases.getCanvas("pattern",m.size,g.size,!0),_=b.context,S=l.createCanvasGraphics(_);S.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(S,i,u);var A=c,w=f,k=d,x=h;return c<0&&(A=0,k+=Math.abs(c)),f<0&&(w=0,x+=Math.abs(f)),_.translate(-m.scale*A,-g.scale*w),S.transform(m.scale,0,0,g.scale,0,0),this.clipBbox(S,A,w,k,x),S.baseTransform=S.ctx.mozCurrentTransform.slice(),S.executeOperatorList(t),S.endDrawing(),{canvas:b.canvas,scaleX:m.scale,scaleY:g.scale,offsetX:A,offsetY:w}}},{key:"getSizeAndScale",value:function(t,r,n){t=Math.abs(t);var a=Math.max(e.MAX_PATTERN_SIZE,r),o=Math.ceil(t*n);return o>=a?o=a:n=o/t,{scale:n,size:o}}},{key:"clipBbox",value:function(e,t,r,n,a){var o=n-t,i=a-r;e.ctx.rect(t,r,o,i),e.clip(),e.endPath()}},{key:"setFillAndStrokeStyleToContext",value:function(e,t,r){var n=e.ctx,o=e.current;switch(t){case w:var i=this.ctx;n.fillStyle=i.fillStyle,n.strokeStyle=i.strokeStyle,o.fillColor=i.fillStyle,o.strokeColor=i.strokeStyle;break;case k:var s=a.Util.makeHexColor(r[0],r[1],r[2]);n.fillStyle=s,n.strokeStyle=s,o.fillColor=s,o.strokeColor=s;break;default:throw new a.FormatError("Unsupported paint type: ".concat(t))}}},{key:"getPattern",value:function(e,t,r,n){var o=r;n!==v.SHADING&&(o=a.Util.transform(o,t.baseTransform),this.matrix&&(o=a.Util.transform(o,this.matrix
2)));var i=this.createPatternCanvas(t),s=new DOMMatrix(o);s=(s=s.translate(i.offsetX,i.offsetY)).scale(1/i.scaleX,1/i.scaleY);var u=e.createPattern(i.canvas,"repeat");try{u.setTransform(s)}catch(l){(0,a.warn)('TilingPattern.getPattern: "'.concat(null===l||void 0===l?void 0:l.message,'".'))}return u}}],[{key:"MAX_PATTERN_SIZE",get:function(){return(0,a.shadow)(this,"MAX_PATTERN_SIZE",3e3)}}]),e}();t.TilingPattern=x},(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;var r=Object.create(null);t.GlobalWorkerOptions=r,r.workerPort=void 0===r.workerPort?null:r.workerPort,r.workerSrc=void 0===r.workerSrc?"":r.workerSrc},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},o=r(4);function i(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(l){return void r(l)}s.done?t(u):Promise.resolve(u).then(n,a)}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e){return u="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}var l=1,c=2,f=1,d=2,h=3,p=4,v=5,y=6,m=7,g=8;function b(e){if(!(e instanceof Error||"object"===u(e)&&null!==e))return(0,o.warn)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e;switch(e.name){case"AbortException":return new o.AbortException(e.message);case"MissingPDFException":return new o.MissingPDFException(e.message);case"PasswordException":return new o.PasswordException(e.message,e.code);case"UnexpectedResponseException":return new o.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new o.UnknownErrorException(e.message,e.details);default:return new o.UnknownErrorException(e.message,e.toString())}}var _=function(){function e(t,r,n){var a=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourceName=t,this.targetName=r,this.comObj=n,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=function(e){var t=e.data;if(t.targetName===a.sourceName)if(t.stream)a._processStreamMessage(t);else if(t.callback){var r=t.callbackId,o=a.callbackCapabilities[r];if(!o)throw new Error("Cannot resolve callback ".concat(r));if(delete a.callbackCapabilities[r],t.callback===l)o.resolve(t.data);else{if(t.callback!==c)throw new Error("Unexpected callback case");o.reject(b(t.reason))}}else{var i=a.actionHandler[t.action];if(!i)throw new Error("Unknown action from worker: ".concat(t.action));if(t.callbackId){var s=a.sourceName,u=t.sourceName;new Promise((function(e){e(i(t.data))})).then((function(e){n.postMessage({sourceName:s,targetName:u,callback:l,callbackId:t.callbackId,data:e})}),(function(e){n.postMessage({sourceName:s,targetName:u,callback:c,callbackId:t.callbackId,reason:b(e)})}))}else t.streamId?a._createStreamSink(t):i(t.data)}},n.addEventListener("message",this._onComObjOnMessage)}var t,r,n;return t=e,r=[{key:"on",value:function(e,t){var r=this.actionHandler;if(r[e])throw new Error('There is already an actionName called "'.concat(e,'"'));r[e]=t}},{key:"send",value:function(e,t,r){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},r)}},{key:"sendWithPromise",value:function(e,t,r){var n=this.callbackId++,a=(0,o.createPromiseCapability)();this.callbackCapabilities[n]=a;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:n,data:t},r)}catch(i){a.reject(i)}return a.promise}},{key:"sendWithStream",value:function(e,t,r,n){var a=this,i=this.streamId++,s=this.sourceName,u=this.targetName,l=this.comObj;return new ReadableStream({start:function(r){var c=(0,o.createPromiseCapability)();return a.streamControllers[i]={controller:r,startCall:c,pullCall:null,cancelCall:null,isClosed:!1}
2,l.postMessage({sourceName:s,targetName:u,action:e,streamId:i,data:t,desiredSize:r.desiredSize},n),c.promise},pull:function(e){var t=(0,o.createPromiseCapability)();return a.streamControllers[i].pullCall=t,l.postMessage({sourceName:s,targetName:u,stream:y,streamId:i,desiredSize:e.desiredSize}),t.promise},cancel:function(e){(0,o.assert)(e instanceof Error,"cancel must have a valid reason");var t=(0,o.createPromiseCapability)();return a.streamControllers[i].cancelCall=t,a.streamControllers[i].isClosed=!0,l.postMessage({sourceName:s,targetName:u,stream:f,streamId:i,reason:b(e)}),t.promise}},r)}},{key:"_createStreamSink",value:function(e){var t=e.streamId,r=this.sourceName,n=e.sourceName,a=this.comObj,i=this,s=this.actionHandler[e.action],u={enqueue:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,s=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var u=this.desiredSize;this.desiredSize-=i,u>0&&this.desiredSize<=0&&(this.sinkCapability=(0,o.createPromiseCapability)(),this.ready=this.sinkCapability.promise),a.postMessage({sourceName:r,targetName:n,stream:p,streamId:t,chunk:e},s)}},close:function(){this.isCancelled||(this.isCancelled=!0,a.postMessage({sourceName:r,targetName:n,stream:h,streamId:t}),delete i.streamSinks[t])},error:function(e){(0,o.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,a.postMessage({sourceName:r,targetName:n,stream:v,streamId:t,reason:b(e)}))},sinkCapability:(0,o.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};u.sinkCapability.resolve(),u.ready=u.sinkCapability.promise,this.streamSinks[t]=u,new Promise((function(t){t(s(e.data,u))})).then((function(){a.postMessage({sourceName:r,targetName:n,stream:g,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:g,streamId:t,reason:b(e)})}))}},{key:"_processStreamMessage",value:function(e){var t=e.streamId,r=this.sourceName,n=e.sourceName,a=this.comObj,i=this.streamControllers[t],s=this.streamSinks[t];switch(e.stream){case g:e.success?i.startCall.resolve():i.startCall.reject(b(e.reason));break;case m:e.success?i.pullCall.resolve():i.pullCall.reject(b(e.reason));break;case y:if(!s){a.postMessage({sourceName:r,targetName:n,stream:m,streamId:t,success:!0});break}s.desiredSize<=0&&e.desiredSize>0&&s.sinkCapability.resolve(),s.desiredSize=e.desiredSize,new Promise((function(e){e(s.onPull&&s.onPull())})).then((function(){a.postMessage({sourceName:r,targetName:n,stream:m,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:m,streamId:t,reason:b(e)})}));break;case p:if((0,o.assert)(i,"enqueue should have stream controller"),i.isClosed)break;i.controller.enqueue(e.chunk);break;case h:if((0,o.assert)(i,"close should have stream controller"),i.isClosed)break;i.isClosed=!0,i.controller.close(),this._deleteStreamController(i,t);break;case v:(0,o.assert)(i,"error should have stream controller"),i.controller.error(b(e.reason)),this._deleteStreamController(i,t);break;case d:e.success?i.cancelCall.resolve():i.cancelCall.reject(b(e.reason)),this._deleteStreamController(i,t);break;case f:if(!s)break;new Promise((function(t){t(s.onCancel&&s.onCancel(b(e.reason)))})).then((function(){a.postMessage({sourceName:r,targetName:n,stream:d,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:d,streamId:t,reason:b(e)})})),s.sinkCapability.reject(b(e.reason)),s.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}},{key:"_deleteStreamController",value:function(){var e,t=(e=a.default.mark((function e(t,r){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.allSettled([t.startCall&&t.startCall.promise,t.pullCall&&t.pullCall.promise,t.cancelCall&&t.cancelCall.promise]);case 2:delete this.streamControllers[r];case 3:case"end":return e.stop()}}),e,this)})),function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function s(e){i(o,n,a,s,u,"next",e)}function u(e){i(o,n,a,s,u,"throw",e)}s(void 0)}))});return function(e,r){return t.apply(this,arguments)}}()},{key:"destroy",value:function(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}],r&&s(t.prototype,r),n&&s(t,n),e}();t.MessageHandler=_},(e,t,r)=>{"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var n=r(4);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function i(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,u(e,t,"get"))}function s(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,u(e,t,"set"),r),r}function u(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var l=new WeakMap,c=new WeakMap,f=function(){function e(t){var r=t.parsedData,n=t.rawData;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,l,{writable:!0,value:void 0}),o(this,c,{writable:!0,value:void 0}),s(this,l,r),s(this,c,n)}var t,r,u;return t=e,(r=[{key:"getRaw",value:function(){return i(this,c)}},{key:"get",value:function(e){var t;return null!==(t=i(this,l).get(e))&&void 0!==t?t:null}},{key:"getAll",value:function(){return(0,n.objectFromMap)(i(this,l))}},{key:"has",value:function(e){return i(this,l).has(e)}}])&&a(t.prototype,r),u&&a(t,u),e}();t.Metadata=f},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalContentConfig=void 0;var n=r(4);function a(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"===typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,s=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw i}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var u=function e(t,r){s(this,e),this.visible=!0,this.name=t,this.intent=r},l=function(){function e(t){if(s(this,e),this.name=null,this.creator=null,this._order=null,this._groups=new Map,null!==t){this.name=t.name,this.creator=t.creator,this._order=t.order;var r,n=a(t.groups);try{for(n.s();!(r=n.n()).done;){var o=r.value;this._groups.set(o.id,new u(o.name,o.intent))}}catch(y){n.e(y)}finally{n.f()}if("OFF"===t.baseState){var i,l=a(this._groups);try{for(l.s();!(i=l.n()).done;)i.value.visible=!1}catch(y){l.e(y)}finally{l.f()}}var c,f=a(t.on);try{for(f.s();!(c=f.n()).done;){var d=c.value;this._groups.get(d).visible=!0}}catch(y){f.e(y)}finally{f.f()}var h,p=a(t.off);try{for(p.s();!(h=p.n()).done;){var v=h.value;this._groups.get(v).visible=!1}}catch(y){p.e(y)}finally{p.f()}}}var t,r,o;return t=e,r=[{key:"_evaluateVisibilityExpression",value:function(e){var t=e.length;if(t<2)return!0;for(var r=e[0],a=1;a<t;a++){var o=e[a],i=void 0;if(Array.isArray(o))i=this._evaluateVisibilityExpression(o);else{if(!this._groups.has(o))return(0,n.warn)("Optional content group not found: ".concat(o)),!0;i=this._groups.get(o).visible}switch(r){case"And":if(!i)return!1;break;case"Or":if(i)return!0;break;case"Not":return!i;default:return!0}}return"And"===r}},{key:"isVisible",value:function(e){if(0===this._groups.size)return!0;
2if(!e)return(0,n.warn)("Optional content group not defined."),!0;if("OCG"===e.type)return this._groups.has(e.id)?this._groups.get(e.id).visible:((0,n.warn)("Optional content group not found: ".concat(e.id)),!0);if("OCMD"===e.type){if(e.expression)return this._evaluateVisibilityExpression(e.expression);if(!e.policy||"AnyOn"===e.policy){var t,r=a(e.ids);try{for(r.s();!(t=r.n()).done;){var o=t.value;if(!this._groups.has(o))return(0,n.warn)("Optional content group not found: ".concat(o)),!0;if(this._groups.get(o).visible)return!0}}catch(v){r.e(v)}finally{r.f()}return!1}if("AllOn"===e.policy){var i,s=a(e.ids);try{for(s.s();!(i=s.n()).done;){var u=i.value;if(!this._groups.has(u))return(0,n.warn)("Optional content group not found: ".concat(u)),!0;if(!this._groups.get(u).visible)return!1}}catch(v){s.e(v)}finally{s.f()}return!0}if("AnyOff"===e.policy){var l,c=a(e.ids);try{for(c.s();!(l=c.n()).done;){var f=l.value;if(!this._groups.has(f))return(0,n.warn)("Optional content group not found: ".concat(f)),!0;if(!this._groups.get(f).visible)return!0}}catch(v){c.e(v)}finally{c.f()}return!1}if("AllOff"===e.policy){var d,h=a(e.ids);try{for(h.s();!(d=h.n()).done;){var p=d.value;if(!this._groups.has(p))return(0,n.warn)("Optional content group not found: ".concat(p)),!0;if(this._groups.get(p).visible)return!1}}catch(v){h.e(v)}finally{h.f()}return!0}return(0,n.warn)("Unknown optional content policy ".concat(e.policy,".")),!0}return(0,n.warn)("Unknown group type ".concat(e.type,".")),!0}},{key:"setVisibility",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this._groups.has(e)?this._groups.get(e).visible=!!t:(0,n.warn)("Optional content group not found: ".concat(e))}},{key:"getOrder",value:function(){return this._groups.size?this._order?this._order.slice():Array.from(this._groups.keys()):null}},{key:"getGroups",value:function(){return this._groups.size>0?(0,n.objectFromMap)(this._groups):null}},{key:"getGroup",value:function(e){return this._groups.get(e)||null}}],r&&i(t.prototype,r),o&&i(t,o),e}();t.OptionalContentConfig=l},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}
2),t.PDFDataTransportStream=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},o=r(4),i=r(1);function s(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(l){return void r(l)}s.done?t(u):Promise.resolve(u).then(n,a)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){s(o,n,a,i,u,"next",e)}function u(e){s(o,n,a,i,u,"throw",e)}i(void 0)}))}}function l(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"===typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),e}var p=function(){function e(t,r){var n=this;f(this,e),(0,o.assert)(r,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=t.progressiveDone||!1,this._contentDispositionFilename=t.contentDispositionFilename||null;var a=t.initialData;if((null===a||void 0===a?void 0:a.length)>0){var i=new Uint8Array(a).buffer;this._queuedChunks.push(i)}this._pdfDataRangeTransport=r,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._contentLength=t.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((function(e,t){n._onReceiveData({begin:e,chunk:t})})),this._pdfDataRangeTransport.addProgressListener((function(e,t){n._onProgress({loaded:e,total:t})})),this._pdfDataRangeTransport.addProgressiveReadListener((function(e){n._onReceiveData({chunk:e})})),this._pdfDataRangeTransport.addProgressiveDoneListener((function(){n._onProgressiveDone()})),this._pdfDataRangeTransport.transportReady()}return h(e,[{key:"_onReceiveData",value:function(e){var t=new Uint8Array(e.chunk).buffer;if(void 0===e.begin)this._fullRequestReader?this._fullRequestReader._enqueue(t):this._queuedChunks.push(t);else{var r=this._rangeReaders.some((function(r){return r._begin===e.begin&&(r._enqueue(t),!0)}));(0,o.assert)(r,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}},{key:"_progressiveDataLength",get:function(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}},{key:"_onProgress",value:function(e){if(void 0===e.total){var t=this._rangeReaders[0];null!==t&&void 0!==t&&t.onProgress&&t.onProgress({loaded:e.loaded})}else{var r=this._fullRequestReader;null!==r&&void 0!==r&&r.onProgress&&r.onProgress({loaded:e.loaded,total:e.total})}}},{key:"_onProgressiveDone",value:function(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}},{key:"_removeRangeReader",value:function(e){var t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}},{key:"getFullReader",value:function(){(0,o.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");var e=this._queuedChunks;return this._queuedChunks=null,new v(this,e,this._progressiveDone,this._contentDispositionFilename)}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=new y(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);var t,r=l(this._rangeReaders.slice(0));try{for(r.s();!(t=r.n()).done;)t.value.cancel(e)}catch(n){r.e(n)}finally{r.f()}this._pdfDataRangeTransport.abort()}}]),e}();t.PDFDataTransportStream=p;var v=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;f(this,e),this._stream=t,this._done=n||!1,this._filename=(0,i.isPdfFile)(a)?a:null,this._queuedChunks=r||[],this._loaded=0;var o,s=l(this._queuedChunks);try{for(s.s();!(o=s.n()).done;){var u=o.value;this._loaded+=u.byteLength}}catch(c){s.e(c)}finally{s.f()}
2this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}return h(e,[{key:"_enqueue",value:function(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength)}},{key:"headersReady",get:function(){return this._headersReady}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._stream._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._stream._isStreamingSupported}},{key:"contentLength",get:function(){return this._stream._contentLength}},{key:"read",value:function(){var e=u(a.default.mark((function e(){var t,r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this._queuedChunks.length>0)){e.next=3;break}return t=this._queuedChunks.shift(),e.abrupt("return",{value:t,done:!1});case 3:if(!this._done){e.next=5;break}return e.abrupt("return",{value:void 0,done:!0});case 5:return r=(0,o.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._done=!0;var t,r=l(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(n){r.e(n)}finally{r.f()}this._requests.length=0}},{key:"progressiveDone",value:function(){this._done||(this._done=!0)}}]),e}(),y=function(){function e(t,r,n){f(this,e),this._stream=t,this._begin=r,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}return h(e,[{key:"_enqueue",value:function(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});var t,r=l(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(n){r.e(n)}finally{r.f()}this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}},{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:function(){var e=u(a.default.mark((function e(){var t,r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._queuedChunk){e.next=4;break}return t=this._queuedChunk,this._queuedChunk=null,e.abrupt("return",{value:t,done:!1});case 4:if(!this._done){e.next=6;break}return e.abrupt("return",{value:void 0,done:!0});case 6:return r=(0,o.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._done=!0;var t,r=l(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(n){r.e(n)}finally{r.f()}this._requests.length=0,this._stream._removeRangeReader(this)}}]),e}()},(e,t)=>{"use strict";function r(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"===typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var a=0,o=function(){};return{s:o,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw i}}}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}
2Object.defineProperty(t,"__esModule",{value:!0}),t.XfaText=void 0;var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,o;return t=e,o=[{key:"textContent",value:function(t){var n=[],a={items:n,styles:Object.create(null)};return function t(a){var o;if(a){var i=null,s=a.name;if("#text"===s)i=a.value;else{if(!e.shouldBuildText(s))return;null!==a&&void 0!==a&&null!==(o=a.attributes)&&void 0!==o&&o.textContent?i=a.attributes.textContent:a.value&&(i=a.value)}if(null!==i&&n.push({str:i}),a.children){var u,l=r(a.children);try{for(l.s();!(u=l.n()).done;)t(u.value)}catch(c){l.e(c)}finally{l.f()}}}}(t),a}},{key:"shouldBuildText",value:function(e){return!("textarea"===e||"input"===e||"option"===e||"select"===e)}}],(n=null)&&a(t.prototype,n),o&&a(t,o),e}();t.XfaText=o},(e,t,r)=>{"use strict";function n(e){return n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationLayer=void 0;var a=r(4),o=r(1),i=r(139),s=r(149),u=r(150);function l(e,t,r){return function(e,t){if(e!==t)throw new TypeError("Private static access of wrong provenance")}(e,t),r}function c(e,t,r){return c="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(r):a.value}},c(e,t,r||e)}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e){return function(e){if(Array.isArray(e))return A(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||S(e)||function(){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 h(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}function p(e,t){return p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},p(e,t)}function v(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=g(e);if(t){var a=g(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return y(this,r)}}function y(e,t){if(t&&("object"===n(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function b(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=S(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){s=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(e,t)||S(e,t)||function(){throw new TypeError("Invalid attempt to de
2structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){if(e){if("string"===typeof e)return A(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?A(e,t):void 0}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function x(e,t,r){return t&&k(e.prototype,t),r&&k(e,r),e}var P=1e3,C=new WeakSet,T=function(){function e(){w(this,e)}return x(e,null,[{key:"create",value:function(e){switch(e.data.annotationType){case a.AnnotationType.LINK:return new E(e);case a.AnnotationType.TEXT:return new O(e);case a.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new I(e);case"Btn":return e.data.radioButton?new M(e):e.data.checkBox?new j(e):new D(e);case"Ch":return new L(e)}return new F(e);case a.AnnotationType.POPUP:return new N(e);case a.AnnotationType.FREETEXT:return new B(e);case a.AnnotationType.LINE:return new W(e);case a.AnnotationType.SQUARE:return new U(e);case a.AnnotationType.CIRCLE:return new G(e);case a.AnnotationType.POLYLINE:return new z(e);case a.AnnotationType.CARET:return new V(e);case a.AnnotationType.INK:return new X(e);case a.AnnotationType.POLYGON:return new H(e);case a.AnnotationType.HIGHLIGHT:return new Y(e);case a.AnnotationType.UNDERLINE:return new K(e);case a.AnnotationType.SQUIGGLY:return new Q(e);case a.AnnotationType.STRIKEOUT:return new J(e);case a.AnnotationType.STAMP:return new $(e);case a.AnnotationType.FILEATTACHMENT:return new Z(e);default:return new R(e)}}}]),e}(),R=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.isRenderable,a=void 0!==n&&n,o=r.ignoreBorder,i=void 0!==o&&o,s=r.createQuadrilaterals,u=void 0!==s&&s;w(this,e),this.isRenderable=a,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.renderForms=t.renderForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,this.enableScripting=t.enableScripting,this.hasJSActions=t.hasJSActions,this._fieldObjects=t.fieldObjects,this._mouseState=t.mouseState,a&&(this.container=this._createContainer(i)),u&&(this.quadrilaterals=this._createQuadrilaterals(i))}return x(e,[{key:"_createContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.data,r=this.page,n=this.viewport,o=document.createElement("section"),i=t.rect[2]-t.rect[0],s=t.rect[3]-t.rect[1];o.setAttribute("data-annotation-id",t.id);var u=a.Util.normalizeRect([t.rect[0],r.view[3]-t.rect[1]+r.view[1],t.rect[2],r.view[3]-t.rect[3]+r.view[1]]);if(t.hasOwnCanvas){var l=n.transform.slice(),c=a.Util.singularValueDecompose2dScale(l),f=_(c,2),d=f[0],h=f[1];i=Math.ceil(i*d),s=Math.ceil(s*h),u[0]*=d,u[1]*=h;for(var p=0;p<4;p++)l[p]=Math.sign(l[p]);o.style.transform="matrix(".concat(l.join(","),")")}else o.style.transform="matrix(".concat(n.transform.join(","),")");if(o.style.transformOrigin="".concat(-u[0],"px ").concat(-u[1],"px"),!e&&t.borderStyle.width>0){o.style.borderWidth="".concat(t.borderStyle.width,"px"),t.borderStyle.style!==a.AnnotationBorderStyleType.UNDERLINE&&(i-=2*t.borderStyle.width,s-=2*t.borderStyle.width);var v=t.borderStyle.horizontalCornerRadius,y=t.borderStyle.verticalCornerRadius;if(v>0||y>0){var m="".concat(v,"px / ").concat(y,"px");o.style.borderRadius=m}switch(t.borderStyle.style){case a.AnnotationBorderStyleType.SOLID:o.style.borderStyle="solid";break;case a.AnnotationBorderStyleType.DASHED:o.style.borderStyle="dashed";break;case a.AnnotationBorderStyleType.BEVELED:(0,a.warn)("Unimplemented border style: beveled");break;case a.AnnotationBorderStyleType.INSET:(0,a.warn)("Unimplemented border style: inset");break;case a.AnnotationBorderStyleType.UNDERLINE:o.style.borderBottomStyle="solid"}var g=t.borderColor||t.color||null;g?o.style.borderColor=a.Util.makeHexColor(0|t.color[0],0|t.color[1],0|t.color[2]):o.style.borderWidth=0}return o.style.left="".concat(u[0],"px"),o.style.top="".concat(u[1],"px"),t.hasOwnCanvas?o.style.width=o.style.height="auto":(o.style.width="".concat(i,"px"),o.style.height="".concat(s,"px")),o}},{key:"_createQuadrilaterals",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.data.quadPoints)return null;var t,r=[],n=this.data.rect,a=b(this.data.quadPoints);try{for(a.s();!(t=a.n()).done;){var o=t.value;this.data.rect=[o[2].x,o[2].y,o[1].x,o[1].y],r.push(this._createContainer(e))}}catch(i){a.e(i)}finally{a.f()}return this.data.rect=n,r}},{key:"_createPopup",value:function(e,t){var r=this.container;this.quadrilaterals&&(e=e||this.quadrilaterals,r=this.quadrilaterals[0]),e||((e=document.createElement("div")).style.height=r.style.height,e.style.width=r.style.width,r.appendChild(e));var n=new q({container:r,trigger:e,color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,hideWrapper:!0}).render();n.style.left=r.style.width,r.appendChild(n)}},{key:"_renderQuadrilaterals",value:function(e){var t,r=b(this.quadrilaterals);try{for(r.s();!(t=r.n()).done;)t.value.className=e}catch(n){r.e(n)}finally{r.f()}return this.quadrilaterals}},{key:"render",value:function(){(0,a.unreachable)("Abstract method `AnnotationElement.render` called")}},{key:"_getElementsByName",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=[];if(this._fieldObjects){var n=this._fieldObjects[e];if(n){var o,i=b(n);try{for(i.s();!(o=i.n()).done;){var s=o.value,u=s.page,l=s.id,c=s.exportValues;if(-1!==u&&l!==t){var f="string"===typeof c?c:null,d=document.getElementById(l);!d||C.has(d)?r.push({id:l,exportValue:f,domElement:d}):(0,a.warn)("_getElementsByName - element not allowed: ".concat(l))}}}catch(g){i.e(g)}finally{i.f()}}return r}var h,p=b(document.getElementsByName(e));try{for(p.s();!(h=p.n()).done;
2){var v=h.value,y=v.id,m=v.exportValue;y!==t&&C.has(v)&&r.push({id:y,exportValue:m,domElement:v})}}catch(g){p.e(g)}finally{p.f()}return r}}],[{key:"platform",get:function(){var e="undefined"!==typeof navigator?navigator.platform:"";return(0,a.shadow)(this,"platform",{isWin:e.includes("Win"),isMac:e.includes("Mac")})}}]),e}(),E=function(e){h(r,e);var t=v(r);function r(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;w(this,r);var a=!!(e.data.url||e.data.dest||e.data.action||e.data.isTooltipOnly||e.data.resetForm||e.data.actions&&(e.data.actions.Action||e.data.actions["Mouse Up"]||e.data.actions["Mouse Down"]));return t.call(this,e,{isRenderable:a,ignoreBorder:!(null===n||void 0===n||!n.ignoreBorder),createQuadrilaterals:!0})}return x(r,[{key:"render",value:function(){var e,t=this.data,r=this.linkService,n=document.createElement("a");if(t.url)r.addLinkAttributes||(0,a.warn)("LinkAnnotationElement.render - missing `addLinkAttributes`-method on the `linkService`-instance."),null===(e=r.addLinkAttributes)||void 0===e||e.call(r,n,t.url,t.newWindow);else if(t.action)this._bindNamedAction(n,t.action);else if(t.dest)this._bindLink(n,t.dest);else{var o=!1;t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(o=!0,this._bindJSAction(n,t)),t.resetForm?this._bindResetFormAction(n,t.resetForm):o||this._bindLink(n,"")}return this.quadrilaterals?this._renderQuadrilaterals("linkAnnotation").map((function(e,t){var r=0===t?n:n.cloneNode();return e.appendChild(r),e})):(this.container.className="linkAnnotation",this.container.appendChild(n),this.container)}},{key:"_bindLink",value:function(e,t){var r=this;e.href=this.linkService.getDestinationHash(t),e.onclick=function(){return t&&r.linkService.goToDestination(t),!1},(t||""===t)&&(e.className="internalLink")}},{key:"_bindNamedAction",value:function(e,t){var r=this;e.href=this.linkService.getAnchorUrl(""),e.onclick=function(){return r.linkService.executeNamedAction(t),!1},e.className="internalLink"}},{key:"_bindJSAction",value:function(e,t){var r=this;e.href=this.linkService.getAnchorUrl("");for(var n=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]),a=function(){var a=i[o],s=n.get(a);if(!s)return"continue";e[s]=function(){var e;return null===(e=r.linkService.eventBus)||void 0===e||e.dispatch("dispatcheventinsandbox",{source:r,detail:{id:t.id,name:a}}),!1}},o=0,i=Object.keys(t.actions);o<i.length;o++)a();e.onclick||(e.onclick=function(){return!1}),e.className="internalLink"}},{key:"_bindResetFormAction",value:function(e,t){var r=this,n=e.onclick;if(n||(e.href=this.linkService.getAnchorUrl("")),e.className="internalLink",!this._fieldObjects)return(0,a.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),void(n||(e.onclick=function(){return!1}));e.onclick=function(){n&&n();var e=t.fields,a=t.refs,o=t.include,i=[];if(0!==e.length||0!==a.length){var s,u=new Set(a),l=b(e);try{for(l.s();!(s=l.n()).done;){var c,f=s.value,h=b(r._fieldObjects[f]||[]);try{for(h.s();!(c=h.n()).done;){var p=c.value.id;u.add(p)}}catch(D){h.e(D)}finally{h.f()}}}catch(D){l.e(D)}finally{l.f()}for(var v=0,y=Object.values(r._fieldObjects);v<y.length;v++){var m,g=b(y[v]);try{for(g.s();!(m=g.n()).done;){var _=m.value;u.has(_.id)===o&&i.push(_)}}catch(D){g.e(D)}finally{g.f()}}}else for(var S=0,A=Object.values(r._fieldObjects);S<A.length;S++){var w=A[S];i.push.apply(i,d(w))}for(var k,x=r.annotationStorage,P=[],T=0,R=i;
2T<R.length;T++){var E=R[T],O=E.id;switch(P.push(O),E.type){case"text":var F=E.defaultValue||"";x.setValue(O,{value:F,valueAsString:F});break;case"checkbox":case"radiobutton":var I=E.defaultValue===E.exportValues;x.setValue(O,{value:I});break;case"combobox":case"listbox":var j=E.defaultValue||"";x.setValue(O,{value:j});break;default:continue}var M=document.getElementById(O);M&&C.has(M)&&M.dispatchEvent(new Event("resetform"))}return r.enableScripting&&(null===(k=r.linkService.eventBus)||void 0===k||k.dispatch("dispatcheventinsandbox",{source:r,detail:{id:"app",ids:P,name:"ResetForm"}})),!1}}}]),r}(R),O=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;w(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i})}return x(r,[{key:"render",value:function(){this.container.className="textAnnotation";var e=document.createElement("img");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.alt="[{{type}} Annotation]",e.dataset.l10nId="text_annotation_type",e.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup(e,this.data),this.container.appendChild(e),this.container}}]),r}(R),F=function(e){h(r,e);var t=v(r);function r(){return w(this,r),t.apply(this,arguments)}return x(r,[{key:"render",value:function(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}},{key:"_getKeyModifier",value:function(e){var t=R.platform,r=t.isWin,n=t.isMac;return r&&e.ctrlKey||n&&e.metaKey}},{key:"_setEventListener",value:function(e,t,r,n){var a=this;t.includes("mouse")?e.addEventListener(t,(function(e){var t;null===(t=a.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:a,detail:{id:a.data.id,name:r,value:n(e),shift:e.shiftKey,modifier:a._getKeyModifier(e)}})})):e.addEventListener(t,(function(e){var t;null===(t=a.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:a,detail:{id:a.data.id,name:r,value:e.target.checked}})}))}},{key:"_setEventListeners",value:function(e,t,r){var n,a=b(t);try{for(a.s();!(n=a.n()).done;){var o,i=_(n.value,2),s=i[0],u=i[1];("Action"===u||null!==(o=this.data.actions)&&void 0!==o&&o[u])&&this._setEventListener(e,s,u,r)}}catch(l){a.e(l)}finally{a.f()}}},{key:"_setBackgroundColor",value:function(e){var t=this.data.backgroundColor||null;e.style.backgroundColor=null===t?"transparent":a.Util.makeHexColor(t[0],t[1],t[2])}},{key:"_dispatchEventFromSandbox",value:function(e,t){for(var r=this,n=function(e,t,r){var n=r.detail[e];r.target.style[t]=s.ColorConverters["".concat(n[0],"_HTML")](n.slice(1))},a={display:function(e){var t=e.detail.display%2===1;e.target.style.visibility=t?"hidden":"visible",r.annotationStorage.setValue(r.data.id,{hidden:t,print:0===e.detail.display||3===e.detail.display})},print:function(e){r.annotationStorage.setValue(r.data.id,{print:e.detail.print})},hidden:function(e){e.target.style.visibility=e.detail.hidden?"hidden":"visible",r.annotationStorage.setValue(r.data.id,{hidden:e.detail.hidden})},focus:function(e){setTimeout((function(){return e.target.focus({preventScroll:!1})}),0)},userName:function(e){e.target.title=e.detail.userName},readonly:function(e){e.detail.readonly?e.target.setAttribute("readonly",""):e.target.removeAttribute("readonly")},required:function(e){e.detail.required?e.target.setAttribute("required",""):e.target.removeAttribute("required")},bgColor:function(e){n("bgColor","backgroundColor",e)},fillColor:function(e){n("fillColor","backgroundColor",e)},fgColor:function(e){n("fgColor","color",e)},textColor:function(e){n("textColor","color",e)},borderColor:function(e){n("borderColor","borderColor",e)},strokeColor:function(e){n("strokeColor","borderColor",e)}},o=0,i=Object.keys(t.detail);o<i.length;o++){var u=i[o],l=e[u]||a[u];l&&l(t)}}}]),r}(R),I=function(e){h(r,e);var t=v(r);function r(e){w(this,r);var n=e.renderForms||!e.data.hasAppearance&&!!e.data.fieldValue;return t.call(this,e,{isRenderable:n})}return x(r,[{key:"setPropertyOnSiblings",value:function(e,t,r,n){var a,o=this.annotationStorage,i=b(this._getElementsByName(e.name,e.id));try{for(i.s();!(a=i.n()).done;){var s=a.value;s.domElement&&(s.domElement[t]=r),o.setValue(s.id,f({},n,r))}}catch(u){i.e(u)}finally{i.f()}}},{key:"render",value:function(){var e=this,t=this.annotationStorage,r=this.data.id;this.container.className="textWidgetAnnotation";var n=null;if(this.renderForms){var a=t.getValue(r,{value:this.data.fieldValue,valueAsString:this.data.fieldValue}),o=a.valueAsString||a.value||"",i={userValue:null,formattedValue:null,beforeInputSelectionRange:null,beforeInputValue:null};this.data.multiLine?(n=document.createElement("textarea")).textContent=o:((n=document.createElement("input")).type="text",n.setAttribute("value",o)),C.add(n),n.disabled=this.data.readOnly,n.name=this.data.fieldName,n.tabIndex=P,i.userValue=o,n.setAttribute("id",r),n.addEventListener("input",(function(a){t.setValue(r,{value:a.target.value}),e.setPropertyOnSiblings(n,"value",a.target.value,"value")})),n.addEventListener("resetform",(function(t){var r=e.data.defaultFieldValue||"";n.value=i.userValue=r,delete i.formattedValue}));var s=function(e){i.formattedValue&&(e.target.value=i.formattedValue),e.target.scrollLeft=0,i.beforeInputSelectionRange=null};if(this.enableScripting&&this.hasJSActions){var u;n.addEventListener("focus",(function(e){i.userValue&&(e.target.value=i.userValue)})),n.addEventListener("updatefromsandbox",(function(n){var a={value:function(e){i.userValue=e.detail.value||"",t.setValue(r,{value:i.userValue.toString()}),i.formattedValue||(e.target.value=i.userValue)},valueAsString:function(e){i.formattedValue=e.detail.valueAsString||"",e.target!==document.activeElement&&(e.target.value=i.formattedValue),t.setValue(r,{formattedValue:i.formattedValue})},selRange:function(e){var t=_(e.detail.selRange,2),r=t[0],n=t[1];r>=0&&n<e.target.value.length&&e.target.setSelectionRange(r,n)}};e._dispatchEventFromSandbox(a,n)})),n.addEventListener("keydown",(function(t){var n;i.beforeInputValue=t.target.value;var a=-1;"Escape"===t.key?a=0:"Enter"===t.key?a=2:"Tab"===t.key&&(a=3),-1!==a&&(i.userValue=t.target.value,null===(n=e.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:e,detail:{id:r,name:"Keystroke",value:t.target.value,willC
2ommit:!0,commitKey:a,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}}))}));var l=s;s=null,n.addEventListener("blur",(function(t){var n;e._mouseState.isDown&&(i.userValue=t.target.value,null===(n=e.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:e,detail:{id:r,name:"Keystroke",value:t.target.value,willCommit:!0,commitKey:1,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}})),l(t)})),n.addEventListener("mousedown",(function(e){i.beforeInputValue=e.target.value,i.beforeInputSelectionRange=null})),n.addEventListener("keyup",(function(e){e.target.selectionStart===e.target.selectionEnd&&(i.beforeInputSelectionRange=null)})),n.addEventListener("select",(function(e){i.beforeInputSelectionRange=[e.target.selectionStart,e.target.selectionEnd]})),null!==(u=this.data.actions)&&void 0!==u&&u.Keystroke&&n.addEventListener("input",(function(t){var n,a=-1,o=-1;if(i.beforeInputSelectionRange){var s=_(i.beforeInputSelectionRange,2);a=s[0],o=s[1]}null===(n=e.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:e,detail:{id:r,name:"Keystroke",value:i.beforeInputValue,change:t.data,willCommit:!1,selStart:a,selEnd:o}})})),this._setEventListeners(n,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(e){return e.target.value}))}if(s&&n.addEventListener("blur",s),null!==this.data.maxLen&&(n.maxLength=this.data.maxLen),this.data.comb){var c=(this.data.rect[2]-this.data.rect[0])/this.data.maxLen;n.classList.add("comb"),n.style.letterSpacing="calc(".concat(c,"px - 1ch)")}}else(n=document.createElement("div")).textContent=this.data.fieldValue,n.style.verticalAlign="middle",n.style.display="table-cell";return this._setTextStyle(n),this._setBackgroundColor(n),this.container.appendChild(n),this.container}},{key:"_setTextStyle",value:function(e){var t=this.data.defaultAppearanceData,r=t.fontSize,n=t.fontColor,o=e.style;r&&(o.fontSize="".concat(r,"px")),o.color=a.Util.makeHexColor(n[0],n[1],n[2]),null!==this.data.textAlignment&&(o.textAlign=["left","center","right"][this.data.textAlignment])}}]),r}(F),j=function(e){h(r,e);var t=v(r);function r(e){return w(this,r),t.call(this,e,{isRenderable:e.renderForms})}return x(r,[{key:"render",value:function(){var e=this,t=this.annotationStorage,r=this.data,n=r.id,a=t.getValue(n,{value:r.exportValue===r.fieldValue}).value;"string"===typeof a&&(a="Off"!==a,t.setValue(n,{value:a})),this.container.className="buttonWidgetAnnotation checkBox";var o=document.createElement("input");return C.add(o),o.disabled=r.readOnly,o.type="checkbox",o.name=r.fieldName,a&&o.setAttribute("checked",!0),o.setAttribute("id",n),o.setAttribute("exportValue",r.exportValue),o.tabIndex=P,o.addEventListener("change",(function(a){var o,i=a.target,s=i.name,u=i.checked,l=b(e._getElementsByName(s,n));try{for(l.s();!(o=l.n()).done;){var c=o.value,f=u&&c.exportValue===r.exportValue;c.domElement&&(c.domElement.checked=f),t.setValue(c.id,{value:f})}}catch(d){l.e(d)}finally{l.f()}t.setValue(n,{value:u})})),o.addEventListener("resetform",(function(e){var t=r.defaultFieldValue||"Off";e.target.checked=t===r.exportValue})),this.enableScripting&&this.hasJSActions&&(o.addEventListener("updatefromsandbox",(function(r){var a={value:function(e){e.target.checked="Off"!==e.detail.value,t.setValue(n,{value:e.target.checked})}};e._dispatchEventFromSandbox(a,r)})),this._setEventListeners(o,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(e){return e.target.checked}))),this._setBackgroundColor(o),this.container.appendChild(o),this.container}}]),r}(F),M=function(e){h(r,e);var t=v(r);function r(e){return w(this,r),t.call(this,e,{isRenderable:e.renderForms})}return x(r,[{key:"render",value:function(){var e=this;this.container.className="buttonWidgetAnnotation radioButton";var t=this.annotationStorage,r=this.data,n=r.id,a=t.getValue(n,{value:r.fieldValue===r.buttonValue}).value;"string"===typeof a&&(a=a!==r.buttonValue,t.setValue(n,{value:a}));var o=document.createElement("input");if(C.add(o),o.disabled=r.readOnly,o.type="radio",o.name=r.fieldName,a&&o.setAttribute("checked",!0),o.setAttribute("id",n),o.tabIndex=P,o.addEventListener("change",(function(r){var a,o=r.target,i=o.name,s=o.checked,u=b(e._getElementsByName(i,n));try{for(u.s();!(a=u.n()).done;){var l=a.value;t.setValue(l.id,{value:!1})}}catch(c){u.e(c)}finally{u.f()}t.setValue(n,{value:s})}
2)),o.addEventListener("resetform",(function(e){var t=r.defaultFieldValue;e.target.checked=null!==t&&void 0!==t&&t===r.buttonValue})),this.enableScripting&&this.hasJSActions){var i=r.buttonValue;o.addEventListener("updatefromsandbox",(function(r){var a={value:function(r){var a,o=i===r.detail.value,s=b(e._getElementsByName(r.target.name));try{for(s.s();!(a=s.n()).done;){var u=a.value,l=o&&u.id===n;u.domElement&&(u.domElement.checked=l),t.setValue(u.id,{value:l})}}catch(c){s.e(c)}finally{s.f()}}};e._dispatchEventFromSandbox(a,r)})),this._setEventListeners(o,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(e){return e.target.checked}))}return this._setBackgroundColor(o),this.container.appendChild(o),this.container}}]),r}(F),D=function(e){h(r,e);var t=v(r);function r(e){return w(this,r),t.call(this,e,{ignoreBorder:e.data.hasAppearance})}return x(r,[{key:"render",value:function(){var e=c(g(r.prototype),"render",this).call(this);return e.className="buttonWidgetAnnotation pushButton",this.data.alternativeText&&(e.title=this.data.alternativeText),e}}]),r}(E),L=function(e){h(r,e);var t=v(r);function r(e){return w(this,r),t.call(this,e,{isRenderable:e.renderForms})}return x(r,[{key:"render",value:function(){var e=this;this.container.className="choiceWidgetAnnotation";var t=this.annotationStorage,r=this.data.id;t.getValue(r,{value:this.data.fieldValue.length>0?this.data.fieldValue[0]:void 0});var n=this.data.defaultAppearanceData.fontSize;n||(n=9);var a="calc(".concat(n,"px * var(--zoom-factor))"),o=document.createElement("select");C.add(o),o.disabled=this.data.readOnly,o.name=this.data.fieldName,o.setAttribute("id",r),o.tabIndex=P,o.style.fontSize="".concat(n,"px"),this.data.combo||(o.size=this.data.options.length,this.data.multiSelect&&(o.multiple=!0)),o.addEventListener("resetform",(function(t){var r,n=e.data.defaultFieldValue,a=b(o.options);try{for(a.s();!(r=a.n()).done;){var i=r.value;i.selected=i.value===n}}catch(s){a.e(s)}finally{a.f()}}));var i,s=b(this.data.options);try{for(s.s();!(i=s.n()).done;){var u=i.value,l=document.createElement("option");l.textContent=u.displayValue,l.value=u.exportValue,this.data.combo&&(l.style.fontSize=a),this.data.fieldValue.includes(u.exportValue)&&l.setAttribute("selected",!0),o.appendChild(l)}}catch(d){s.e(d)}finally{s.f()}var c=function(e,t){var r=t?"value":"textContent",n=e.target.options;return e.target.multiple?Array.prototype.filter.call(n,(function(e){return e.selected})).map((function(e){return e[r]})):-1===n.selectedIndex?null:n[n.selectedIndex][r]},f=function(e){var t=e.target.options;return Array.prototype.map.call(t,(function(e){return{displayValue:e.textContent,exportValue:e.value}}))};return this.enableScripting&&this.hasJSActions?(o.addEventListener("updatefromsandbox",(function(n){var a={value:function(e){var n,a=e.detail.value,i=new Set(Array.isArray(a)?a:[a]),s=b(o.options);try{for(s.s();!(n=s.n()).done;){var u=n.value;u.selected=i.has(u.value)}}catch(d){s.e(d)}finally{s.f()}t.setValue(r,{value:c(e,!0)})},multipleSelection:function(e){o.multiple=!0},remove:function(e){var n=o.options,a=e.detail.remove;if(n[a].selected=!1,o.remove(a),n.length>0){var i=Array.prototype.findIndex.call(n,(function(e){return e.selected}));-1===i&&(n[0].selected=!0)}t.setValue(r,{value:c(e,!0),items:f(e)})},clear:function(e){for(;0!==o.length;)o.remove(0);t.setValue(r,{value:null,items:[]})},insert:function(e){var n=e.detail.insert,a=n.index,i=n.displayValue,s=n.exportValue,u=document.createElement("option");u.textContent=i,u.value=s,o.insertBefore(u,o.children[a]),t.setValue(r,{value:c(e,!0),items:f(e)})},items:function(e){for(var n=e.detail.items;0!==o.length;)o.remove(0);var a,i=b(n);try{for(i.s();!(a=i.n()).done;){var s=a.value,u=s.displayValue,l=s.exportValue,h=document.createElement("option");h.textContent=u,h.value=l,o.appendChild(h)}}catch(d){i.e(d)}finally{i.f()}o.options.length>0&&(o.options[0].selected=!0),t.setValue(r,{value:c(e,!0),items:f(e)})},indices:function(e){var n,a=new Set(e.detail.indices),o=b(e.target.options);try{for(o.s();!(n=o.n()).done;){var i=n.value;i.selected=a.has(i.index)}}catch(d){o.e(d)}finally{o.f()}t.setValue(r,{value:c(e,!0)})},editable:function(e){e.target.disabled=!e.detail.editable}};e._dispatchEventFromSandbox(a,n)})),o.addEventListener("input",(function(n){var a,o=c(n,!0),i=c(n,!1);t.setValue(r,{value:o}),null===(a=e.linkService.eventBus)||void 0===a||a.dispatch("dispatcheventinsandbox",{source:e,detail:{id:r,name:"Keystroke",value:i,changeEx:o,willCommit:!0,
2commitKey:1,keyDown:!1}})})),this._setEventListeners(o,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"]],(function(e){return e.target.checked}))):o.addEventListener("input",(function(e){t.setValue(r,{value:c(e)})})),this._setBackgroundColor(o),this.container.appendChild(o),this.container}}]),r}(F),N=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;w(this,r);var i=!!(null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i})}return x(r,[{key:"render",value:function(){if(this.container.className="popupAnnotation",["Line","Square","Circle","PolyLine","Polygon","Ink"].includes(this.data.parentType))return this.container;var e='[data-annotation-id="'.concat(this.data.parentId,'"]'),t=this.layer.querySelectorAll(e);if(0===t.length)return this.container;var r=new q({container:this.container,trigger:Array.from(t),color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText}),n=this.page,o=a.Util.normalizeRect([this.data.parentRect[0],n.view[3]-this.data.parentRect[1]+n.view[1],this.data.parentRect[2],n.view[3]-this.data.parentRect[3]+n.view[1]]),i=o[0]+this.data.parentRect[2]-this.data.parentRect[0],s=o[1];return this.container.style.transformOrigin="".concat(-i,"px ").concat(-s,"px"),this.container.style.left="".concat(i,"px"),this.container.style.top="".concat(s,"px"),this.container.appendChild(r.render()),this.container}}]),r}(R),q=function(){function e(t){w(this,e),this.container=t.container,this.trigger=t.trigger,this.color=t.color,this.titleObj=t.titleObj,this.modificationDate=t.modificationDate,this.contentsObj=t.contentsObj,this.richText=t.richText,this.hideWrapper=t.hideWrapper||!1,this.pinned=!1}return x(e,[{key:"render",value:function(){var e,t,r=document.createElement("div");r.className="popupWrapper",this.hideElement=this.hideWrapper?r:this.container,this.hideElement.hidden=!0;var n=document.createElement("div");n.className="popup";var i=this.color;if(i){var s=.7*(255-i[0])+i[0],l=.7*(255-i[1])+i[1],c=.7*(255-i[2])+i[2];n.style.backgroundColor=a.Util.makeHexColor(0|s,0|l,0|c)}var f=document.createElement("h1");f.dir=this.titleObj.dir,f.textContent=this.titleObj.str,n.appendChild(f);var d=o.PDFDateString.toDateObject(this.modificationDate);if(d){var h=document.createElement("span");h.className="popupDate",h.textContent="{{date}}, {{time}}",h.dataset.l10nId="annotation_date_string",h.dataset.l10nArgs=JSON.stringify({date:d.toLocaleDateString(),time:d.toLocaleTimeString()}),n.appendChild(h)}if(null===(e=this.richText)||void 0===e||!e.str||null!==(t=this.contentsObj)&&void 0!==t&&t.str&&this.contentsObj.str!==this.richText.str){var p=this._formatContents(this.contentsObj);n.appendChild(p)}else u.XfaLayer.render({xfaHtml:this.richText.html,intent:"richText",div:n}),n.lastChild.className="richText popupContent";Array.isArray(this.trigger)||(this.trigger=[this.trigger]);var v,y=b(this.trigger);try{for(y.s();!(v=y.n()).done;){var m=v.value;m.addEventListener("click",this._toggle.bind(this)),m.addEventListener("mouseover",this._show.bind(this,!1)),m.addEventListener("mouseout",this._hide.bind(this,!1))}}catch(g){y.e(g)}finally{y.f()}return n.addEventListener("click",this._hide.bind(this,!0)),r.appendChild(n),r}},{key:"_formatContents",value:function(e){var t=e.str,r=e.dir,n=document.createElement("p");n.className="popupContent",n.dir=r;for(var a=t.split(/(?:\r\n?|\n)/),o=0,i=a.length;o<i;++o){var s=a[o];n.appendChild(document.createTextNode(s)),o<i-1&&n.appendChild(document.createElement("br"))}return n}},{key:"_toggle",value:function(){this.pinned?this._hide(!0):this._show(!0)}},{key:"_show",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&(this.pinned=!0),this.hideElement.hidden&&(this.hideElement.hidden=!1,this.container.style.zIndex+=1)}},{key:"_hide",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e&&(this.pinned=!1),this.hideElement.hidden||this.pinned||(this.hideElement.hidden=!0,this.container.style.zIndex-=1)}}]),e}(),B=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;w(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return x(r,[{key:"render",value:function(){return this.container.className="freeTextAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}
2]),r}(R),W=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;w(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return x(r,[{key:"render",value:function(){this.container.className="lineAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],n=this.svgFactory.create(t,r),a=this.svgFactory.createElement("svg:line");return a.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),a.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),a.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),a.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),a.setAttribute("stroke-width",e.borderStyle.width||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),n.appendChild(a),this.container.append(n),this._createPopup(a,e),this.container}}]),r}(R),U=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;w(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return x(r,[{key:"render",value:function(){this.container.className="squareAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],n=this.svgFactory.create(t,r),a=e.borderStyle.width,o=this.svgFactory.createElement("svg:rect");return o.setAttribute("x",a/2),o.setAttribute("y",a/2),o.setAttribute("width",t-a),o.setAttribute("height",r-a),o.setAttribute("stroke-width",a||1),o.setAttribute("stroke","transparent"),o.setAttribute("fill","transparent"),n.appendChild(o),this.container.append(n),this._createPopup(o,e),this.container}}]),r}(R),G=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;w(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return x(r,[{key:"render",value:function(){this.container.className="circleAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],n=this.svgFactory.create(t,r),a=e.borderStyle.width,o=this.svgFactory.createElement("svg:ellipse");return o.setAttribute("cx",t/2),o.setAttribute("cy",r/2),o.setAttribute("rx",t/2-a/2),o.setAttribute("ry",r/2-a/2),o.setAttribute("stroke-width",a||1),o.setAttribute("stroke","transparent"),o.setAttribute("fill","transparent"),n.appendChild(o),this.container.append(n),this._createPopup(o,e),this.container}}]),r}(R),z=function(e){h(r,e);var t=v(r);function r(e){var n,a,o,i;w(this,r);var s=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return(i=t.call(this,e,{isRenderable:s,ignoreBorder:!0})).containerClassName="polylineAnnotation",i.svgElementName="svg:polyline",i}return x(r,[{key:"render",value:function(){this.container.className=this.containerClassName;var e,t=this.data,r=t.rect[2]-t.rect[0],n=t.rect[3]-t.rect[1],a=this.svgFactory.create(r,n),o=[],i=b(t.vertices);try{for(i.s();!(e=i.n()).done;){var s=e.value,u=s.x-t.rect[0],l=t.rect[3]-s.y;o.push(u+","+l)}}catch(f){i.e(f)}finally{i.f()}o=o.join(" ");var c=this.svgFactory.createElement(this.svgElementName);return c.setAttribute("points",o),c.setAttribute("stroke-width",t.borderStyle.width||1),c.setAttribute("stroke","transparent"),c.setAttribute("fill","transparent"),a.appendChild(c),this.container.append(a),this._createPopup(c,t),this.container}}]),r}(R),H=function(e){h(r,e);var t=v(r);function r(e){var n;return w(this,r),(n=t.call(this,e)).containerClassName="polygonAnnotation",n.svgElementName="svg:polygon",n}return r}(z),V=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;w(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return x(r,[{key:"render",value:function(){return this.container.className="
2caretAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),r}(R),X=function(e){h(r,e);var t=v(r);function r(e){var n,a,o,i;w(this,r);var s=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return(i=t.call(this,e,{isRenderable:s,ignoreBorder:!0})).containerClassName="inkAnnotation",i.svgElementName="svg:polyline",i}return x(r,[{key:"render",value:function(){this.container.className=this.containerClassName;var e,t=this.data,r=t.rect[2]-t.rect[0],n=t.rect[3]-t.rect[1],a=this.svgFactory.create(r,n),o=b(t.inkLists);try{for(o.s();!(e=o.n()).done;){var i,s=e.value,u=[],l=b(s);try{for(l.s();!(i=l.n()).done;){var c=i.value,f=c.x-t.rect[0],d=t.rect[3]-c.y;u.push("".concat(f,",").concat(d))}}catch(p){l.e(p)}finally{l.f()}u=u.join(" ");var h=this.svgFactory.createElement(this.svgElementName);h.setAttribute("points",u),h.setAttribute("stroke-width",t.borderStyle.width||1),h.setAttribute("stroke","transparent"),h.setAttribute("fill","transparent"),this._createPopup(h,t),a.appendChild(h)}}catch(p){o.e(p)}finally{o.f()}return this.container.append(a),this.container}}]),r}(R),Y=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;w(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0,createQuadrilaterals:!0})}return x(r,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("highlightAnnotation"):(this.container.className="highlightAnnotation",this.container)}}]),r}(R),K=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;w(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0,createQuadrilaterals:!0})}return x(r,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("underlineAnnotation"):(this.container.className="underlineAnnotation",this.container)}}]),r}(R),Q=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;w(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0,createQuadrilaterals:!0})}return x(r,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("squigglyAnnotation"):(this.container.className="squigglyAnnotation",this.container)}}]),r}(R),J=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;w(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0,createQuadrilaterals:!0})}return x(r,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("strikeoutAnnotation"):(this.container.className="strikeoutAnnotation",this.container)}}]),r}(R),$=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;w(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return x(r,[{key:"render",value:function(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),r}(R),Z=function(e){h(r,e);var t=v(r);function r(e){var n,i;w(this,r);var s=(i=t.call(this,e,{isRenderable:!0})).data.file,u=s.filename,l=s.content;return i.filename=(0,o.getFilenameFromUrl)(u),i.content=l,null===(n=i.linkService.eventBus)||void 0===n||n.dispatch("fileattachmentannotation",{source:m(i),id:(0,a.stringToPDFString)(u),filename:u,content:l}),i}return x(r,[{key:"render",value:function(){var e,t;this.container.className="fileAttachmentAnnotation";var r=document.createElement("div");return r.style.height=this.container.style.height,r.style.width=this.container.style.width,r.addEventListener("dblclick",this._download.bind(this)),!this.data.hasPopup&&(null!==(e=this.data.titleObj)&&void 0!==e&&e.str||null!==(t=this.data.contentsObj)&&void 0!==t&&t.str||this.data.richText)&&this._createPopup(r,this.data),this.container.appendChild(r),this.container}}
2,{key:"_download",value:function(){var e;null===(e=this.downloadManager)||void 0===e||e.openOrDownloadData(this.container,this.content,this.filename)}}]),r}(R),ee=function(){function e(){w(this,e)}return x(e,null,[{key:"render",value:function(t){var r,n=[],s=[],u=b(t.annotations);try{for(u.s();!(r=u.n()).done;){var c=r.value;c&&(c.annotationType!==a.AnnotationType.POPUP?n.push(c):s.push(c))}}catch(S){u.e(S)}finally{u.f()}s.length&&n.push.apply(n,s);for(var f=t.div,d=0,h=n;d<h.length;d++){var p=h[d],v=T.create({data:p,layer:f,page:t.page,viewport:t.viewport,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:!1!==t.renderForms,svgFactory:new o.DOMSVGFactory,annotationStorage:t.annotationStorage||new i.AnnotationStorage,enableScripting:t.enableScripting,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,mouseState:t.mouseState||{isDown:!1}});if(v.isRenderable){var y=v.render();if(p.hidden&&(y.style.visibility="hidden"),Array.isArray(y)){var m,g=b(y);try{for(g.s();!(m=g.n()).done;){var _=m.value;f.appendChild(_)}}catch(S){g.e(S)}finally{g.f()}}else v instanceof N?f.prepend(y):f.appendChild(y)}}l(this,e,te).call(this,f,t.annotationCanvasMap)}},{key:"update",value:function(t){var r,n,o,i=t.page,s=t.viewport,u=t.annotations,c=t.annotationCanvasMap,f=t.div,d=s.transform,h="matrix(".concat(d.join(","),")"),p=b(u);try{for(p.s();!(o=p.n()).done;){var v=o.value,y=f.querySelectorAll('[data-annotation-id="'.concat(v.id,'"]'));if(y){var m,g=b(y);try{for(g.s();!(m=g.n()).done;){var _=m.value;if(v.hasOwnCanvas){var S=a.Util.normalizeRect([v.rect[0],i.view[3]-v.rect[1]+i.view[1],v.rect[2],i.view[3]-v.rect[3]+i.view[1]]);if(!n){r=Math.abs(d[0]||d[1]);for(var A=d.slice(),w=0;w<4;w++)A[w]=Math.sign(A[w]);n="matrix(".concat(A.join(","),")")}var k=S[0]*r,x=S[1]*r;_.style.left="".concat(k,"px"),_.style.top="".concat(x,"px"),_.style.transformOrigin="".concat(-k,"px ").concat(-x,"px"),_.style.transform=n}else _.style.transform=h}}catch(P){g.e(P)}finally{g.f()}}}}catch(P){p.e(P)}finally{p.f()}l(this,e,te).call(this,f,c),f.hidden=!1}}]),e}();function te(e,t){if(t){var r,n=b(t);try{for(n.s();!(r=n.n()).done;){var a=_(r.value,2),o=a[0],i=a[1],s=e.querySelector('[data-annotation-id="'.concat(o,'"]'));if(s){var u=s.firstChild;"CANVAS"===u.nodeName?s.replaceChild(i,u):s.insertBefore(i,u)}}}catch(l){n.e(l)}finally{n.f()}t.clear()}}t.AnnotationLayer=ee},(e,t)=>{"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){s=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"===typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e,t)||function(){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 n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e){return Math.floor(255*Math.max(0,Math.min(1,e))).toString(16).padStart(2,"0")}Object.defineProperty(t,"__esModule",{value:!0}),t.ColorConverters=void 0;var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,i=[{key:"CMYK_G",value:function(e){var t=r(e,4),n=t[0],a=t[1],o=t[2],i=t[3];return["G",1-Math.min(1,.3*n+.59*o+.11*a+i)]}},{key:"G_CMYK",value:function(e){return["CMYK",0,0,0,1-r(e,1)[0]]}},{key:"G_RGB",value:function(e){var t=r(e,1)[0];return["RGB",t,t,t]}},{key:"G_HTML",value:function(e){var t=o(r(e,1)[0]);return"#".concat(t).concat(t).concat(t)}},{key:"RGB_G",value:function(e){var t=r(e,3);return["G",.3*t[0]+.59*t[1]+.11*t[2]]}},{key:"RGB_HTML",value:function(e){var t=r(e,3),n=t[0],a=t[1],i=t[2],s=o(n),u=o(a),l=o(i);
2return"#".concat(s).concat(u).concat(l)}},{key:"T_HTML",value:function(){return"#00000000"}},{key:"CMYK_RGB",value:function(e){var t=r(e,4),n=t[0],a=t[1],o=t[2],i=t[3];return["RGB",1-Math.min(1,n+i),1-Math.min(1,o+i),1-Math.min(1,a+i)]}},{key:"CMYK_HTML",value:function(e){return this.RGB_HTML(this.CMYK_RGB(e))}},{key:"RGB_CMYK",value:function(e){var t=r(e,3),n=1-t[0],a=1-t[1],o=1-t[2];return["CMYK",n,a,o,Math.min(n,a,o)]}}],(n=null)&&a(t.prototype,n),i&&a(t,i),e}();t.ColorConverters=i},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XfaLayer=void 0;var n=r(4),a=r(147);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){s=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(e,t)||s(e,t)||function(){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 i(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 o,i=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){u=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw o}}}}function s(e,t){if(e){if("string"===typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var c=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,s;return t=e,s=[{key:"setupStorage",value:function(e,t,r,n,a){var o=n.getValue(t,{value:null});switch(r.name){case"textarea":if(null!==o.value&&(e.textContent=o.value),"print"===a)break;e.addEventListener("input",(function(e){n.setValue(t,{value:e.target.value})}));break;case"input":if("radio"===r.attributes.type||"checkbox"===r.attributes.type){if(o.value===r.attributes.xfaOn?e.setAttribute("checked",!0):o.value===r.attributes.xfaOff&&e.removeAttribute("checked"),"print"===a)break;e.addEventListener("change",(function(e){n.setValue(t,{value:e.target.checked?e.target.getAttribute("xfaOn"):e.target.getAttribute("xfaOff")})}))}else{if(null!==o.value&&e.setAttribute("value",o.value),"print"===a)break;e.addEventListener("input",(function(e){n.setValue(t,{value:e.target.value})}))}break;case"select":if(null!==o.value){var s,u=i(r.children);try{for(u.s();!(s=u.n()).done;){var l=s.value;l.attributes.value===o.value&&(l.attributes.selected=!0)}}catch(c){u.e(c)}finally{u.f()}}e.addEventListener("input",(function(e){var r=e.target.options,a=-1===r.selectedIndex?"":r[r.selectedIndex].value;n.setValue(t,{value:a})}))}}},{key:"setAttributes",value:function(e){var t,r=e.html,a=e.element,i=e.storage,s=void 0===i?null:i,u=e.intent,l=e.linkService,c=a.attributes,f=r instanceof HTMLAnchorElement;"radio"===c.type&&(c.name="".concat(c.name,"-").concat(u));for(var d=0,h=Object.entries(c);d<h.length;d++){var p=o(h[d],2),v=p[0],y=p[1];if(null!==y&&void 0!==y&&"dataId"!==v)if("style"!==v)if("textContent"===v)r.textContent=y;else if("class"===v)y.length&&r.setAttribute(v,y.join(" "));else{if(f&&("href"===v||"newWindow"===v))continue;r.setAttribute(v,y)}else Object.assign(r.style,y)}f&&(l.addLinkAttributes||(0,n.warn)("XfaLayer.setAttribute - missing `addLinkAttributes`-method on the `linkService`-instance."),null===(t=l.addLinkAttributes)||void 0===t||t.call(l,r,c.href,c.newWindow)),s&&c.dataId&&this.setupStorage(r,c.dataId,a,s)}},{key:"render",value:function(e){var t=e.annotationStorage,r=e.linkService,n=e.xfaHtml,s=e.intent||"display",u=document.createElement(n.name);n.attributes&&this.setAttributes({html:u,element:n,intent:s,linkService:r});var l=[[n,-1,u]],c=e.div;if(c.appendChild(u),e.viewport){var f="matrix(".concat(e.viewport.transform.join(","),")");c.style.transform=f}"richText"!==s&&c.setAttribute("class","xfaLayer xfaFont");for(var d=[];l.length>0;){var h,p=o(l[l.length-1],3),v=p[0],y=p[1],m=p[2];if(y+1!==v.children.length){var g=v.children[++l[l.length-1][1]];if(null!==g){var b=g.name;if("#text"!==b){var _=void 0;if(_=null!==g&&void 0!==g&&null!==(h=g.attributes)&&void 0!==h&&h.xmlns?document.createElementNS(g.attributes.xmlns,b):document.createElement(b),m.appendChild(_),g.attributes&&this.setAttributes({html:_,element:g,storage:t,intent:s,linkService:r}),g.children&&g.children.length>0)l.push([g,-1,_]);else if(g.value){var S=document.createTextNode(g.value);a.XfaText.shouldBuildText(b)&&d.push(S),_.appendChild(S)}}else{var A=document.createTextNode(g.value);d.push(A),m.appendChild(A)}}}else l.pop()}var w,k=i(c.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"));try{for(k.s();!(w=k.n()).done;)w.value.setAttribute("readOnly",!0)}catch(x){k.e(x)}finally{k.f()}return{textDivs:d}}},{key:"update",value:function(e){var t="matrix(".concat(e.viewport.transform.join(","),")");e.div.style.transform=t,e.div.hidden=!1}}],(r=null)&&l(t.prototype,r),s&&l(t,s),e}();t.XfaLayer=c},(e,t,r)=>{"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.renderTextLayer=function(e){var t=new v({textContent:e.textContent,textContentStream:e.textContentStream,container:e.container,viewport:e.viewport,textDivs:e.textDivs,textContentItemsStr:e.textContentItemsStr,enhanceTextSelection:e.enhanceTextSelection});return t._render(e.timeout),t};var n=r(4);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"===typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 o,s=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw o}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var s=30,u=new Map,l=/^\s+$/g;function c(e,t,r,a){var o=document.createElement("span"),i=e._enhanceTextSelection?{angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1}:{angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL};e._textDivs.push(o);var c=n.Util.transform(e._viewport.transform,t.transform),f=Math.atan2(c[1],c[0]),d=r[t.fontName];d.vertical&&(f+=Math.PI/2);var h,p,v=Math.hypot(c[2],c[3]),y=v*function(e,t){var r=u.get(e);if(r)return r;t.save(),t.font="".concat(s,"px ").concat(e);var n=t.measureText(""),a=n.fontBoundingBoxAscent,o=Math.abs(n.fontBoundingBoxDescent);if(a){t.restore();var i=a/(a+o);return u.set(e,i),i}t.strokeStyle="red",t.clearRect(0,0,s,s),t.strokeText("g",0,0);var l=t.getImageData(0,0,s,s).data;o=0;for(var c=l.length-1-3;c>=0;c-=4)if(l[c]>0){o=Math.ceil(c/4/s);break}t.clearRect(0,0,s,s),t.strokeText("A",0,s),a=0;for(var f=0,d=(l=t.getImageData(0,0,s,s).data).length;f<d;f+=4)if(l[f]>0){a=s-Math.floor(f/4/s);break}if(t.restore(),a){var h=a/(a+o);return u.set(e,h),h}return u.set(e,.8),.8}(d.fontFamily,a);0===f?(h=c[4],p=c[5]-y):(h=c[4]+y*Math.sin(f),p=c[5]-y*Math.cos(f)),o.style.left="".concat(h,"px"),o.style.top="".concat(p,"px"),o.style.fontSize="".concat(v,"px"),o.style.fontFamily=d.fontFamily,o.setAttribute("role","presentation"),o.textContent=t.str,o.dir=t.dir,e._fontInspectorEnabled&&(o.dataset.fontName=t.fontName),0!==f&&(i.angle=f*(180/Math.PI));var m=!1;if(t.str.length>1||e._enhanceTextSelection&&l.test(t.str))m=!0;else if(" "!==t.str&&t.transform[0]!==t.transform[3]){var g=Math.abs(t.transform[0]),b=Math.abs(t.transform[3]);g!==b&&Math.max(g,b)/Math.min(g,b)>1.5&&(m=!0)}if(m&&(d.vertical?i.canvasWidth=t.height*e._viewport.scale:i.canvasWidth=t.width*e._viewport.scale),e._textDivProperties.set(o,i),e._textContentStream&&e._layoutText(o),e._enhanceTextSelection&&i.hasText){var _=1,S=0;0!==f&&(_=Math.cos(f),S=Math.sin(f));var A,w,k=(d.vertical?t.height:t.width)*e._viewport.scale,x=v;0!==f?(A=[_,S,-S,_,h,p],w=n.Util.getAxialAlignedBoundingBox([0,0,k,x],A)):w=[h,p,h+k,p+x],e._bounds.push({left:w[0],top:w[1],right:w[2],bottom:w[3],div:o,size:[k,x],m:A})}}function f(e){if(!e._canceled){var t=e._textDivs,r=e._capability,n=t.length;if(n>1e5)return e._renderingDone=!0,void r.resolve();if(!e._textContentStream)for(var a=0;a<n;a++)e._layoutText(t[a]);e._renderingDone=!0,r.resolve()}}function d(e,t,r){for(var n=0,a=0;a<r;a++){var o=e[t++];o>0&&(n=n?Math.min(o,n):o)}return n}function h(e){for(var t=e._bounds,r=e._viewport,a=function(e,t,r){var n=r.map((function(e,t){return{x1:e.left,y1:e.top,x2:e.right,y2:e.bottom,index:t,x1New:void 0,x2New:void 0}}));p(e,n);var a,i=new Array(r.length),s=o(n);try{for(s.s();!(a=s.n()).done;){var u=a.value,l=u.index;i[l]={left:u.x1New,top:0,right:u.x2New,bottom:0}}}catch(v){s.e(v)}finally{s.f()}r.map((function(t,r){var a=i[r],o=n[r];
2o.x1=t.top,o.y1=e-a.right,o.x2=t.bottom,o.y2=e-a.left,o.index=r,o.x1New=void 0,o.x2New=void 0})),p(t,n);var c,f=o(n);try{for(f.s();!(c=f.n()).done;){var d=c.value,h=d.index;i[h].top=d.x1New,i[h].bottom=d.x2New}}catch(v){f.e(v)}finally{f.f()}return i}(r.width,r.height,t),i=0;i<a.length;i++){var s=t[i].div,u=e._textDivProperties.get(s);if(0!==u.angle){for(var l=a[i],c=t[i],f=c.m,h=f[0],v=f[1],y=[[0,0],[0,c.size[1]],[c.size[0],0],c.size],m=new Float64Array(64),g=0,b=y.length;g<b;g++){var _=n.Util.applyTransform(y[g],f);m[g+0]=h&&(l.left-_[0])/h,m[g+4]=v&&(l.top-_[1])/v,m[g+8]=h&&(l.right-_[0])/h,m[g+12]=v&&(l.bottom-_[1])/v,m[g+16]=v&&(l.left-_[0])/-v,m[g+20]=h&&(l.top-_[1])/h,m[g+24]=v&&(l.right-_[0])/-v,m[g+28]=h&&(l.bottom-_[1])/h,m[g+32]=h&&(l.left-_[0])/-h,m[g+36]=v&&(l.top-_[1])/-v,m[g+40]=h&&(l.right-_[0])/-h,m[g+44]=v&&(l.bottom-_[1])/-v,m[g+48]=v&&(l.left-_[0])/v,m[g+52]=h&&(l.top-_[1])/-h,m[g+56]=v&&(l.right-_[0])/v,m[g+60]=h&&(l.bottom-_[1])/-h}var S=1+Math.min(Math.abs(h),Math.abs(v));u.paddingLeft=d(m,32,16)/S,u.paddingTop=d(m,48,16)/S,u.paddingRight=d(m,0,16)/S,u.paddingBottom=d(m,16,16)/S,e._textDivProperties.set(s,u)}else u.paddingLeft=t[i].left-a[i].left,u.paddingTop=t[i].top-a[i].top,u.paddingRight=a[i].right-t[i].right,u.paddingBottom=a[i].bottom-t[i].bottom,e._textDivProperties.set(s,u)}}function p(e,t){t.sort((function(e,t){return e.x1-t.x1||e.index-t.index}));var r,n=[{start:-1/0,end:1/0,boundary:{x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0}}],a=o(t);try{for(a.s();!(r=a.n()).done;){for(var i=r.value,s=0;s<n.length&&n[s].end<=i.y1;)s++;for(var u=n.length-1;u>=0&&n[u].start>=i.y2;)u--;var l=void 0,c=void 0,f=void 0,d=void 0,h=-1/0;for(f=s;f<=u;f++){c=(l=n[f]).boundary;var p=void 0;(p=c.x2>i.x1?c.index>i.index?c.x1New:i.x1:void 0===c.x2New?(c.x2+i.x1)/2:c.x2New)>h&&(h=p)}for(i.x1New=h,f=s;f<=u;f++)void 0===(c=(l=n[f]).boundary).x2New?c.x2>i.x1?c.index>i.index&&(c.x2New=c.x2):c.x2New=h:c.x2New>h&&(c.x2New=Math.max(h,c.x2));var v=[],y=null;for(f=s;f<=u;f++){var m=(c=(l=n[f]).boundary).x2>i.x2?c:i;y===m?v[v.length-1].end=l.end:(v.push({start:l.start,end:l.end,boundary:m}),y=m)}for(n[s].start<i.y1&&(v[0].start=i.y1,v.unshift({start:n[s].start,end:i.y1,boundary:n[s].boundary})),i.y2<n[u].end&&(v[v.length-1].end=i.y2,v.push({start:i.y2,end:n[u].end,boundary:n[u].boundary})),f=s;f<=u;f++)if(void 0===(c=(l=n[f]).boundary).x2New){var g=!1;for(d=s-1;!g&&d>=0&&n[d].start>=c.y1;d--)g=n[d].boundary===c;for(d=u+1;!g&&d<n.length&&n[d].end<=c.y2;d++)g=n[d].boundary===c;for(d=0;!g&&d<v.length;d++)g=v[d].boundary===c;g||(c.x2New=h)}Array.prototype.splice.apply(n,[s,u-s+1].concat(v))}}catch(A){a.e(A)}finally{a.f()}for(var b=0,_=n;b<_.length;b++){var S=_[b].boundary;void 0===S.x2New&&(S.x2New=Math.max(e,S.x2))}}var v=function(){function e(t){var r,a=this,o=t.textContent,i=t.textContentStream,s=t.container,u=t.viewport,l=t.textDivs,c=t.textContentItemsStr,f=t.enhanceTextSelection;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._textContent=o,this._textContentStream=i,this._container=s,this._document=s.ownerDocument,this._viewport=u,this._textDivs=l||[],this._textContentItemsStr=c||[],this._enhanceTextSelection=!!f,this._fontInspectorEnabled=!(null===(r=globalThis.FontInspector)||void 0===r||!r.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,n.createPromiseCapability)(),this._renderTimer=null,this._bounds=[],this._capability.promise.finally((function(){a._enhanceTextSelection||(a._textDivProperties=null),a._layoutTextCtx&&(a._layoutTextCtx.canvas.width=0,a._layoutTextCtx.canvas.height=0,a._layoutTextCtx=null)})).catch((function(){}))}var t,r,o;return t=e,r=[{key:"promise",get:function(){return this._capability.promise}},{key:"cancel",value:function(){this._canceled=!0,this._reader&&(this._reader.cancel(new n.AbortException("TextLayer task cancelled.")).catch((function(){})),this._reader=null),null!==this._renderTimer&&(clearTimeout(this._renderTimer),this._renderTimer=null),this._capability.reject(new Error("TextLayer task cancelled."))}},{key:"_processItems",value:function(e,t){for(var r=0,n=e.length;r<n;r++)if(void 0!==e[r].str)this._textContentItemsStr.push(e[r].str),c(this,e[r],t,this._layoutTextCtx);else if("beginMarkedContentProps"===e[r].type||"beginMarkedContent"===e[r].type){var a=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),null!==e[r].id&&this._container.setAttribute("id","".concat(e[r].id)),a.appendChild(this._container)}else"endMarkedContent"===e[r].type&&(this._container=this._container.parentNode)}},{key:"_layoutText",value:function(e){var t=this._textDivProperties.get(e),r="";if(0!==t.canvasWidth&&t.hasText){var n=e.style,a=n.fontSize,o=n.fontFamily;a===this._layoutTextLastFontSize&&o===this._layoutTextLastFontFamily||(this._layoutTextCtx.font="".concat(a," ").concat(o),this._layoutTextLastFontSize=a,this._layoutTextLastFontFamily=o);var i=this._layoutTextCtx.measureText(e.textContent).width;if(i>0){var s=t.canvasWidth/i;this._enhanceTextSelection&&(t.scale=s),r="scaleX(".concat(s,")")}}if(0!==t.angle&&(r="rotate(".concat(t.angle,"deg) ").concat(r)),r.length>0&&(this._enhanceTextSelection&&(t.originalTransform=r),e.style.transform=r),t.hasText&&this._container.appendChild(e),t.hasEOL){var u=document.createElement("br");u.setAttribute("role","presentation"),this._container.appendChild(u)}}},{key:"_render",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=(0,n.createPromiseCapability)(),a=Object.create(null),o=this._document.createElement("canvas");if(o.height=o.width=s,o.mozOpaque=!0,this._layoutTextCtx=o.getContext("2d",{alpha:!1}),this._textContent){var i=this._textContent.items,u=this._textContent.styles;this._processItems(i,u),r.resolve()}else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');var l=function t(){e._reader.read().then((function(n){var o=n.value;n.done?r.resolve():(Object.assign(a,o.styles),e._processItems(o.items,a),t())}),r.reject)};this._reader=this._textContentStream.getReader(),l()}r.promise.then((function(){a=null,t?e._renderTimer=setTimeout((function(){f(e),e._renderTimer=null}),t):f(e)}),this._capability.reject)}},{key:"expandTextDivs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._enhanceTextSelection&&this._renderingDone){null!==this._bounds&&(h(this),this._bounds=null);for(var t=[],r=[],n=0,a=this._textDivs.length;n<a;n++){var o=this._textDivs[n],i=this._textDivProperties.get(o);i.hasText&&(e?(t.length=0,r.length=0,i.originalTransform&&t.push(i.originalTransform),i.paddingTop>0?(r.push("".concat(i.paddingTop,"px")),t.push("translateY(".concat(-i.paddingTop,"px)"))):r.push(0),i.paddingRight>0?r.push("".concat(i.paddingRight/i.scale,"px")):r.push(0),i.paddingBottom>0?r.push("".concat(i.paddingBottom,"px")):r.push(0),i.paddingLeft>0?(r.push("".concat(i.paddingLeft/i.scale,"px")),t.push("translateX(".concat(-i.paddingLeft/i.scale,"px)"))):r.push(0),o.style.padding=r.join(" "),t.length&&(o.style.transform=t.join(" "))):(o.style.padding=null,o.style.transform=i.originalTransform))}}}}],r&&a(t.prototype,r),o&&a(t,o),e}()},(e,t,r)=>{"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var n=r(4),a=r(1),o=r(6);function i(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){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 s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){s=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(e,t)||l(e,t)||function(){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 u(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function l(e,t){if(e){if("string"===typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),e}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=function e(){h(this,e),(0,n.unreachable)("Not implemented: SVGGraphics")};t.SVGGraphics=p;var v=function(e){if(Number.isInteger(e))return e.toString();var t=e.toFixed(10),r=t.length-1;if("0"!==t[r])return t;do{r--}while("0"===t[r]);return t.substring(0,"."===t[r]?r:r+1)},y=function(e){if(0===e[4]&&0===e[5]){if(0===e[1]&&0===e[2])return 1===e[0]&&1===e[3]?"":"scale(".concat(v(e[0])," ").concat(v(e[3]),")");if(e[0]===e[3]&&e[1]===-e[2]){var t=180*Math.acos(e[0])/Math.PI;return"rotate(".concat(v(t),")")}}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return"translate(".concat(v(e[4])," ").concat(v(e[5]),")");return"matrix(".concat(v(e[0])," ").concat(v(e[1])," ").concat(v(e[2])," ").concat(v(e[3])," ").concat(v(e[4])," ")+"".concat(v(e[5]),")")},m={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},g=["butt","round","square"],b=["miter","round","bevel"],_=function(){for(var e=new Uint8Array([137,80,78,71,13,10,26,10]),t=new Int32Array(256),r=0;r<256;r++){for(var a=r,i=0;i<8;i++)a=1&a?3988292384^a>>1&2147483647:a>>1&2147483647;t[r]=a}function s(e,r,n,a){var o=a,i=r.length;n[o]=i>>24&255,n[o+1]=i>>16&255,n[o+2]=i>>8&255,n[o+3]=255&i,n[o+=4]=255&e.charCodeAt(0),n[o+1]=255&e.charCodeAt(1),n[o+2]=255&e.charCodeAt(2),n[o+3]=255&e.charCodeAt(3),o+=4,n.set(r,o);var s=function(e,r,n){for(var a=-1,o=r;o<n;o++){var i=255&(a^e[o]);a=a>>>8^t[i]}return-1^a}(n,a+4,o+=r.length);n[o]=s>>24&255,n[o+1]=s>>16&255,n[o+2]=s>>8&255,n[o+3]=255&s}function u(e){var t=e.length,r=65535,n=Math.ceil(t/r),a=new Uint8Array(2+t+5*n+4),o=0;a[o++]=120,a[o++]=156;for(var i=0;t>r;)a[o++]=0,a[o++]=255,a[o++]=255,a[o++]=0,a[o++]=0,a.set(e.subarray(i,i+r),o),o+=r,i+=r,t-=r;a[o++]=1,a[o++]=255&t,a[o++]=t>>8&255,a[o++]=255&~t,a[o++]=(65535&~t)>>8&255,a.set(e.subarray(i),o),o+=e.length-i;var s=function(e,t,r){for(var n=1,a=0,o=t;o<r;++o)a=(a+(n=(n+(255&e[o]))%65521))%65521;return a<<16|n}(e,0,e.length);return a[o++]=s>>24&255,a[o++]=s>>16&255,a[o++]=s>>8&255,a[o++]=255&s,a}function l(t,r,a,i){var l,c,f,d=t.width,h=t.height,p=t.data;switch(r){case n.ImageKind.GRAYSCALE_1BPP:c=0,l=1,f=d+7>>3;break;case n.ImageKind.RGB_24BPP:c=2,l=8,f=3*d;break;case n.ImageKind.RGBA_32BPP:c=6,l=8,f=4*d;break;default:throw new Error("invalid format")}for(var v=new Uint8Array((1+f)*h),y=0,m=0,g=0;g<h;++g)v[y++]=0,v.set(p.subarray(m,m+f),y),m+=f,y+=f;if(r===n.ImageKind.GRAYSCALE_1BPP&&i){y=0;for(var b=0;b<h;b++){y++;for(var _=0;_<f;_++)v[y++]^=255}}var S=new Uint8Array([d>>24&255,d>>16&255,d>>8&255,255&d,h>>24&255,h>>16&255,h>>8&255,255&h,l,c,0,0,0]),A=function(e){if(!o.isNodeJS)return u(e);try{var t;t=parseInt(process.versions.node)>=8?e:Buffer.from(e);var r=__webpack_require__(1288).deflateSync(t,{level:9});return r instanceof Uint8Array?r:new Uint8Array(r)}catch(a){(0,n.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+a)}return u(e)}(v),w=e.length+36+S.length+A.length,k=new Uint8Array(w),x=0;return k.set(e,x),s("IHDR",S,k,x+=e.length),s("IDATA",A,k,x+=12+S.length),x+=12+A.length,s("IEND",new Uint8Array(0),k,x),(0,n.createObjectURL)(k,"image/png",a)}return function(e,t,r){return l(e,void 0===e.kind?n.ImageKind.GRAYSCALE_1BPP:e.kind,t,r)}}(),S=function(){function e(){h(this,e),this.fontSizeScale=1,this.fontWeight=m.fontWeight,this.fontSize=0,this.textMatrix=n.IDENTITY_MATRIX,this.fontMatrix=n.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=n.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=m.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=""}return d(e,[{key:"clone",value:function(){return Object.create(this)}},{key:"setCurrentPoint",value:function(e,t){this.x=e,this.y=t}}]),e}(),A=0,w=0,k=0;t.SVGGraphics=p=function(){function e(t,r){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var i in h(this,e),this.svgFactory=new a.DOMSVGFactory,this.current=ne
2w S,this.transformMatrix=n.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=!!o,this._operatorIdMapping=[],n.OPS)this._operatorIdMapping[n.OPS[i]]=i}return d(e,[{key:"save",value:function(){this.transformStack.push(this.transformMatrix);var e=this.current;this.extraStack.push(e),this.current=e.clone()}},{key:"restore",value:function(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}},{key:"group",value:function(e){this.save(),this.executeOpTree(e),this.restore()}},{key:"loadDependencies",value:function(e){for(var t=this,r=e.fnArray,a=e.argsArray,o=0,i=r.length;o<i;o++)if(r[o]===n.OPS.dependency){var s,l=u(a[o]);try{var c=function(){var e=s.value,r=e.startsWith("g_")?t.commonObjs:t.objs,n=new Promise((function(t){r.get(e,t)}));t.current.dependencies.push(n)};for(l.s();!(s=l.n()).done;)c()}catch(f){l.e(f)}finally{l.f()}}return Promise.all(this.current.dependencies)}},{key:"transform",value:function(e,t,r,a,o,i){var s=[e,t,r,a,o,i];this.transformMatrix=n.Util.transform(this.transformMatrix,s),this.tgrp=null}},{key:"getSVG",value:function(e,t){var r=this;this.viewport=t;var a=this._initialize(t);return this.loadDependencies(e).then((function(){return r.transformMatrix=n.IDENTITY_MATRIX,r.executeOpTree(r.convertOpList(e)),a}))}},{key:"convertOpList",value:function(e){for(var t=this._operatorIdMapping,r=e.argsArray,n=e.fnArray,a=[],o=0,i=n.length;o<i;o++){var s=n[o];a.push({fnId:s,fn:t[s],args:r[o]})}return function(e){var t,r=[],n=[],a=u(e);try{for(a.s();!(t=a.n()).done;){var o=t.value;"save"!==o.fn?"restore"===o.fn?r=n.pop():r.push(o):(r.push({fnId:92,fn:"group",items:[]}),n.push(r),r=r[r.length-1].items)}}catch(i){a.e(i)}finally{a.f()}return r}(a)}},{key:"executeOpTree",value:function(e){var t,r=u(e);try{for(r.s();!(t=r.n()).done;){var a=t.value,o=a.fn,i=a.fnId,s=a.args;switch(0|i){case n.OPS.beginText:this.beginText();break;case n.OPS.dependency:break;case n.OPS.setLeading:this.setLeading(s);break;case n.OPS.setLeadingMoveText:this.setLeadingMoveText(s[0],s[1]);break;case n.OPS.setFont:this.setFont(s);break;case n.OPS.showText:case n.OPS.showSpacedText:this.showText(s[0]);break;case n.OPS.endText:this.endText();break;case n.OPS.moveText:this.moveText(s[0],s[1]);break;case n.OPS.setCharSpacing:this.setCharSpacing(s[0]);break;case n.OPS.setWordSpacing:this.setWordSpacing(s[0]);break;case n.OPS.setHScale:this.setHScale(s[0]);break;case n.OPS.setTextMatrix:this.setTextMatrix(s[0],s[1],s[2],s[3],s[4],s[5]);break;case n.OPS.setTextRise:this.setTextRise(s[0]);break;case n.OPS.setTextRenderingMode:this.setTextRenderingMode(s[0]);break;case n.OPS.setLineWidth:this.setLineWidth(s[0]);break;case n.OPS.setLineJoin:this.setLineJoin(s[0]);break;case n.OPS.setLineCap:this.setLineCap(s[0]);break;case n.OPS.setMiterLimit:this.setMiterLimit(s[0]);break;case n.OPS.setFillRGBColor:this.setFillRGBColor(s[0],s[1],s[2]);break;case n.OPS.setStrokeRGBColor:this.setStrokeRGBColor(s[0],s[1],s[2]);break;case n.OPS.setStrokeColorN:this.setStrokeColorN(s);break;case n.OPS.setFillColorN:this.setFillColorN(s);break;case n.OPS.shadingFill:this.shadingFill(s[0]);break;case n.OPS.setDash:this.setDash(s[0],s[1]);break;case n.OPS.setRenderingIntent:this.setRenderingIntent(s[0]);break;case n.OPS.setFlatness:this.setFlatness(s[0]);break;case n.OPS.setGState:this.setGState(s[0]);break;case n.OPS.fill:this.fill();break;case n.OPS.eoFill:this.eoFill();break;case n.OPS.stroke:this.stroke();break;case n.OPS.fillStroke:this.fillStroke();break;case n.OPS.eoFillStroke:this.eoFillStroke();break;case n.OPS.clip:this.clip("nonzero");break;case n.OPS.eoClip:this.clip("evenodd");break;case n.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case n.OPS.paintImageXObject:this.paintImageXObject(s[0]);break;case n.OPS.paintInlineImageXObject:this.paintInlineImageXObject(s[0]);break;case n.OPS.paintImageMaskXObject:this.paintImageMaskXObject(s[0]);break;case n.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(s[0],s[1]);break;case n.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case n.OPS.closePath:this.closePath();break;case n.OPS.closeStroke:this.closeStroke();break;case n.OPS.closeFillStroke:this.closeFillStroke();break;case n.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case n.OPS.nextLine:this.nextLine();break;case n.OPS.transform:this.transform(s[0],s[1],s[2],s[3],s[4],s[5]);break;case n.OPS.constructPath:this.constructPath(s[0],s[1]);break;case n.OPS.endPath:this.endPath();break;case 92:this.group(a.items);break;default:(0,n.warn)("Unimplemented operator ".concat(o))}}}catch(l){r.e(l)}finally{r.f()}}},{key:"setWordSpacing",value:function(e){this.current.wordSpacing=e}},{key:"setCharSpacing",value:function(e){this.current.charSpacing=e}},{key:"nextLine",value:function(){this.moveText(0,this.current.leading)}},{key:"setTextMatrix",value:function(e,t,r,n,a,o){var i=this.current;i.textMatrix=i.lineMatrix=[e,t,r,n,a,o],i.textMatrixScale=Math.hypot(e,t),i.x=i.lineX=0,i.y=i.lineY=0,i.xcoords=[],i.ycoords=[],i.tspan=this.svgFactory.createElement("svg:tspan"),i.tspan.setAttributeNS(null,"font-family",
2i.fontFamily),i.tspan.setAttributeNS(null,"font-size","".concat(v(i.fontSize),"px")),i.tspan.setAttributeNS(null,"y",v(-i.y)),i.txtElement=this.svgFactory.createElement("svg:text"),i.txtElement.appendChild(i.tspan)}},{key:"beginText",value:function(){var e=this.current;e.x=e.lineX=0,e.y=e.lineY=0,e.textMatrix=n.IDENTITY_MATRIX,e.lineMatrix=n.IDENTITY_MATRIX,e.textMatrixScale=1,e.tspan=this.svgFactory.createElement("svg:tspan"),e.txtElement=this.svgFactory.createElement("svg:text"),e.txtgrp=this.svgFactory.createElement("svg:g"),e.xcoords=[],e.ycoords=[]}},{key:"moveText",value:function(e,t){var r=this.current;r.x=r.lineX+=e,r.y=r.lineY+=t,r.xcoords=[],r.ycoords=[],r.tspan=this.svgFactory.createElement("svg:tspan"),r.tspan.setAttributeNS(null,"font-family",r.fontFamily),r.tspan.setAttributeNS(null,"font-size","".concat(v(r.fontSize),"px")),r.tspan.setAttributeNS(null,"y",v(-r.y))}},{key:"showText",value:function(e){var t=this.current,r=t.font,a=t.fontSize;if(0!==a){var o,i=t.fontSizeScale,s=t.charSpacing,l=t.wordSpacing,c=t.fontDirection,f=t.textHScale*c,d=r.vertical,h=d?1:-1,p=r.defaultVMetrics,g=a*t.fontMatrix[0],b=0,_=u(e);try{for(_.s();!(o=_.n()).done;){var S=o.value;if(null!==S)if((0,n.isNum)(S))b+=h*S*a/1e3;else{var A=(S.isSpace?l:0)+s,w=S.fontChar,k=void 0,x=void 0,P=S.width;if(d){var C=void 0,T=S.vmetric||p;C=-(C=S.vmetric?T[1]:.5*P)*g;var R=T[2]*g;P=T?-T[0]:P,k=C/i,x=(b+R)/i}else k=b/i,x=0;(S.isInFont||r.missingFile)&&(t.xcoords.push(t.x+k),d&&t.ycoords.push(-t.y+x),t.tspan.textContent+=w),b+=d?P*g-A*c:P*g+A*c}else b+=c*l}}catch(I){_.e(I)}finally{_.f()}t.tspan.setAttributeNS(null,"x",t.xcoords.map(v).join(" ")),d?t.tspan.setAttributeNS(null,"y",t.ycoords.map(v).join(" ")):t.tspan.setAttributeNS(null,"y",v(-t.y)),d?t.y-=b:t.x+=b*f,t.tspan.setAttributeNS(null,"font-family",t.fontFamily),t.tspan.setAttributeNS(null,"font-size","".concat(v(t.fontSize),"px")),t.fontStyle!==m.fontStyle&&t.tspan.setAttributeNS(null,"font-style",t.fontStyle),t.fontWeight!==m.fontWeight&&t.tspan.setAttributeNS(null,"font-weight",t.fontWeight);var E=t.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;if(E===n.TextRenderingMode.FILL||E===n.TextRenderingMode.FILL_STROKE?(t.fillColor!==m.fillColor&&t.tspan.setAttributeNS(null,"fill",t.fillColor),t.fillAlpha<1&&t.tspan.setAttributeNS(null,"fill-opacity",t.fillAlpha)):t.textRenderingMode===n.TextRenderingMode.ADD_TO_PATH?t.tspan.setAttributeNS(null,"fill","transparent"):t.tspan.setAttributeNS(null,"fill","none"),E===n.TextRenderingMode.STROKE||E===n.TextRenderingMode.FILL_STROKE){var O=1/(t.textMatrixScale||1);this._setStrokeAttributes(t.tspan,O)}var F=t.textMatrix;0!==t.textRise&&((F=F.slice())[5]+=t.textRise),t.txtElement.setAttributeNS(null,"transform","".concat(y(F)," scale(").concat(v(f),", -1)")),t.txtElement.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.txtElement.appendChild(t.tspan),t.txtgrp.appendChild(t.txtElement),this._ensureTransformGroup().appendChild(t.txtElement)}}},{key:"setLeadingMoveText",value:function(e,t){this.setLeading(-t),this.moveText(e,t)}},{key:"addFontStyle",value:function(e){if(!e.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.appendChild(this.cssStyle));var t=(0,n.createObjectURL)(e.data,e.mimetype,this.forceDataSchema);this.cssStyle.textContent+='@font-face { font-family: "'.concat(e.loadedName,'";')+" src: url(".concat(t,"); }\n")}},{key:"setFont",value:function(e){var t=this.current,r=this.commonObjs.get(e[0]),a=e[1];t.font=r,!this.embedFonts||r.missingFile||this.embeddedFonts[r.loadedName]||(this.addFontStyle(r),this.embeddedFonts[r.loadedName]=r),t.fontMatrix=r.fontMatrix||n.FONT_IDENTITY_MATRIX;var o="normal";r.black?o="900":r.bold&&(o="bold");var i=r.italic?"italic":"normal";a<0?(a=-a,t.fontDirection=-1):t.fontDirection=1,t.fontSize=a,t.fontFamily=r.loadedName,t.fontWeight=o,t.fontStyle=i,t.tspan=this.svgFactory.createElement("svg:tspan"),t.tspan.setAttributeNS(null,"y",v(-t.y)),t.xcoords=[],t.ycoords=[]}},{key:"endText",value:function(){var e,t=this.current;t.textRenderingMode&n.TextRenderingMode.ADD_TO_PATH_FLAG&&null!==(e=t.txtElement)&&void 0!==e&&e.hasChildNodes()&&(t.element=t.txtElement,this.clip("nonzero"),this.endPath())}},{key:"setLineWidth",value:function(e){e>0&&(this.current.lineWidth=e)}},{key:"setLineCap",value:function(e){this.current.lineCap=g[e]}},{key:"setLineJoin",value:function(e){this.current.lineJoin=b[e]}},{key:"setMiterLimit",value:function(e){this.current.miterLimit=e}},{key:"setStrokeAlpha",value:function(e){this.current.strokeAlpha=e}},{key:"setStrokeRGBColor",value:function(e,t,r){this.current.strokeColor=n.Util.makeHexColor(e,t,r)}},{key:"setFillAlpha",value:function(e){this.current.fillAlpha=e}},{key:"setFillRGBColor",value:function(e,t,r){this.current.fillColor=n.Util.makeHexColor(e,t,r),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}},{key:"setStrokeColorN",value:function(e){this.current.strokeColor=this._makeColorN_Pattern(e)}},{key:"setFillColorN",value:function(e){this.current.fillColor=this._makeColorN_Pattern(e)}},{key:"shadingFill",value:function(e){var t=this.viewport.width,r=this.viewport.height,a=n.Util.inverseTransform(this.transformMatrix),o=n.Util.applyTransform([0,0],a),i=n.Util.applyTransform([0,r],a),s=n.Util.applyTransform([t,0],a),u=n.Util.applyTransform([t,r],a),l=Math.min(o[0],i[0],s[0],u[0]),c=Math.min(o[1],i[1],s[1],u[1]),f=Math.max(o[0],i[0],s[0],u[0]),d=Math.max(o[1],i[1],s[1],u[1]),h=this.svgFactory.createElement("svg:rect");h.setAttributeNS(null,"x",l),h.setAttributeNS(null,"y",c),h.setAttributeNS(null,"width",f-l),h.setAttributeNS(null,"height",d-c),h.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this.current.fillAlpha<1&&h.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().appendChild(h)}},{key:"_makeColorN_Pattern",value:function(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}},{key:"_makeTilingPattern",value:function(e){var t=e[1],r=e[2],a=e[3]||n.IDENTITY_MATRIX,o=s(e[4],4),u=o[0],l=o[1],c=o[2],f=o[3],d=e[5],h=e[6],p=e[7],v="shading".concat(k++),y=s(n.Util.normalizeRect([].
2concat(i(n.Util.applyTransform([u,l],a)),i(n.Util.applyTransform([c,f],a)))),4),m=y[0],g=y[1],b=y[2],_=y[3],S=s(n.Util.singularValueDecompose2dScale(a),2),A=d*S[0],w=h*S[1],x=this.svgFactory.createElement("svg:pattern");x.setAttributeNS(null,"id",v),x.setAttributeNS(null,"patternUnits","userSpaceOnUse"),x.setAttributeNS(null,"width",A),x.setAttributeNS(null,"height",w),x.setAttributeNS(null,"x","".concat(m)),x.setAttributeNS(null,"y","".concat(g));var P=this.svg,C=this.transformMatrix,T=this.current.fillColor,R=this.current.strokeColor,E=this.svgFactory.create(b-m,_-g);if(this.svg=E,this.transformMatrix=a,2===p){var O=n.Util.makeHexColor.apply(n.Util,i(t));this.current.fillColor=O,this.current.strokeColor=O}return this.executeOpTree(this.convertOpList(r)),this.svg=P,this.transformMatrix=C,this.current.fillColor=T,this.current.strokeColor=R,x.appendChild(E.childNodes[0]),this.defs.appendChild(x),"url(#".concat(v,")")}},{key:"_makeShadingPattern",value:function(e){switch("string"===typeof e&&(e=this.objs.get(e)),e[0]){case"RadialAxial":var t,r="shading".concat(k++),a=e[3];switch(e[1]){case"axial":var o=e[4],i=e[5];(t=this.svgFactory.createElement("svg:linearGradient")).setAttributeNS(null,"id",r),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"x1",o[0]),t.setAttributeNS(null,"y1",o[1]),t.setAttributeNS(null,"x2",i[0]),t.setAttributeNS(null,"y2",i[1]);break;case"radial":var s=e[4],l=e[5],c=e[6],f=e[7];(t=this.svgFactory.createElement("svg:radialGradient")).setAttributeNS(null,"id",r),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"cx",l[0]),t.setAttributeNS(null,"cy",l[1]),t.setAttributeNS(null,"r",f),t.setAttributeNS(null,"fx",s[0]),t.setAttributeNS(null,"fy",s[1]),t.setAttributeNS(null,"fr",c);break;default:throw new Error("Unknown RadialAxial type: ".concat(e[1]))}var d,h=u(a);try{for(h.s();!(d=h.n()).done;){var p=d.value,v=this.svgFactory.createElement("svg:stop");v.setAttributeNS(null,"offset",p[0]),v.setAttributeNS(null,"stop-color",p[1]),t.appendChild(v)}}catch(y){h.e(y)}finally{h.f()}return this.defs.appendChild(t),"url(#".concat(r,")");case"Mesh":return(0,n.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: ".concat(e[0]))}}},{key:"setDash",value:function(e,t){this.current.dashArray=e,this.current.dashPhase=t}},{key:"constructPath",value:function(e,t){var r,a=this.current,o=a.x,i=a.y,s=[],l=0,c=u(e);try{for(c.s();!(r=c.n()).done;)switch(0|r.value){case n.OPS.rectangle:o=t[l++],i=t[l++];var f=t[l++],d=t[l++],h=o+f,p=i+d;s.push("M",v(o),v(i),"L",v(h),v(i),"L",v(h),v(p),"L",v(o),v(p),"Z");break;case n.OPS.moveTo:o=t[l++],i=t[l++],s.push("M",v(o),v(i));break;case n.OPS.lineTo:o=t[l++],i=t[l++],s.push("L",v(o),v(i));break;case n.OPS.curveTo:o=t[l+4],i=t[l+5],s.push("C",v(t[l]),v(t[l+1]),v(t[l+2]),v(t[l+3]),v(o),v(i)),l+=6;break;case n.OPS.curveTo2:s.push("C",v(o),v(i),v(t[l]),v(t[l+1]),v(t[l+2]),v(t[l+3])),o=t[l+2],i=t[l+3],l+=4;break;case n.OPS.curveTo3:o=t[l+2],i=t[l+3],s.push("C",v(t[l]),v(t[l+1]),v(o),v(i),v(o),v(i)),l+=4;break;case n.OPS.closePath:s.push("Z")}}catch(y){c.e(y)}finally{c.f()}s=s.join(" "),a.path&&e.length>0&&e[0]!==n.OPS.rectangle&&e[0]!==n.OPS.moveTo?s=a.path.getAttributeNS(null,"d")+s:(a.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().appendChild(a.path)),a.path.setAttributeNS(null,"d",s),a.path.setAttributeNS(null,"fill","none"),a.element=a.path,a.setCurrentPoint(o,i)}},{key:"endPath",value:function(){var e=this.current;if(e.path=null,this.pendingClip)if(e.element){var t="clippath".concat(A++),r=this.svgFactory.createElement("svg:clipPath");r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"transform",y(this.transformMatrix));var n=e.element.cloneNode(!0);if("evenodd"===this.pendingClip?n.setAttributeNS(null,"clip-rule","evenodd"):n.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,r.appendChild(n),this.defs.appendChild(r),e.activeClipUrl){e.clipGroup=null;var a,o=u(this.extraStack);try{for(o.s();!(a=o.n()).done;)a.value.clipGroup=null}catch(i){o.e(i)}finally{o.f()}r.setAttributeNS(null,"clip-path",e.activeClipUrl)}e.activeClipUrl="url(#".concat(t,")"),this.tgrp=null}else this.pendingClip=null}},{key:"clip",value:function(e){this.pendingClip=e}},{key:"closePath",value:function(){var e=this.current;if(e.path){var t="".concat(e.path.getAttributeNS(null,"d"),"Z");e.path.setAttributeNS(null,"d",t)}}},{key:"setLeading",value:function(e){this.current.leading=-e}},{key:"setTextRise",value:function(e){this.current.textRise=e}},{key:"setTextRenderingMode",value:function(e){this.current.textRenderingMode=e}},{key:"setHScale",value:function(e){this.current.textHScale=e/100}},{key:"setRenderingIntent",value:function(e){}},{key:"setFlatness",value:function(e){}},{key:"setGState",value:function(e){var t,r=u(e);try{for(r.s();!(t=r.n()).done;){var a=s(t.value,2),o=a[0],i=a[1];switch(o){case"LW":this.setLineWidth(i);break;case"LC":this.setLineCap(i);break;case"LJ":this.setLineJoin(i);break;case"ML":this.setMiterLimit(i);break;case"D":this.setDash(i[0],i[1]);break;
2case"RI":this.setRenderingIntent(i);break;case"FL":this.setFlatness(i);break;case"Font":this.setFont(i);break;case"CA":this.setStrokeAlpha(i);break;case"ca":this.setFillAlpha(i);break;default:(0,n.warn)("Unimplemented graphic state operator ".concat(o))}}}catch(l){r.e(l)}finally{r.f()}}},{key:"fill",value:function(){var e=this.current;e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}},{key:"stroke",value:function(){var e=this.current;e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}},{key:"_setStrokeAttributes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=this.current,n=r.dashArray;1!==t&&n.length>0&&(n=n.map((function(e){return t*e}))),e.setAttributeNS(null,"stroke",r.strokeColor),e.setAttributeNS(null,"stroke-opacity",r.strokeAlpha),e.setAttributeNS(null,"stroke-miterlimit",v(r.miterLimit)),e.setAttributeNS(null,"stroke-linecap",r.lineCap),e.setAttributeNS(null,"stroke-linejoin",r.lineJoin),e.setAttributeNS(null,"stroke-width",v(t*r.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",n.map(v).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",v(t*r.dashPhase)+"px")}},{key:"eoFill",value:function(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}},{key:"fillStroke",value:function(){this.stroke(),this.fill()}},{key:"eoFillStroke",value:function(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}},{key:"closeStroke",value:function(){this.closePath(),this.stroke()}},{key:"closeFillStroke",value:function(){this.closePath(),this.fillStroke()}},{key:"closeEOFillStroke",value:function(){this.closePath(),this.eoFillStroke()}},{key:"paintSolidColorImageMask",value:function(){var e=this.svgFactory.createElement("svg:rect");e.setAttributeNS(null,"x","0"),e.setAttributeNS(null,"y","0"),e.setAttributeNS(null,"width","1px"),e.setAttributeNS(null,"height","1px"),e.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().appendChild(e)}},{key:"paintImageXObject",value:function(e){var t=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);t?this.paintInlineImageXObject(t):(0,n.warn)("Dependent image with object ID ".concat(e," is not ready yet"))}},{key:"paintInlineImageXObject",value:function(e,t){var r=e.width,n=e.height,a=_(e,this.forceDataSchema,!!t),o=this.svgFactory.createElement("svg:rect");o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y","0"),o.setAttributeNS(null,"width",v(r)),o.setAttributeNS(null,"height",v(n)),this.current.element=o,this.clip("nonzero");var i=this.svgFactory.createElement("svg:image");i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a),i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y",v(-n)),i.setAttributeNS(null,"width",v(r)+"px"),i.setAttributeNS(null,"height",v(n)+"px"),i.setAttributeNS(null,"transform","scale(".concat(v(1/r)," ").concat(v(-1/n),")")),t?t.appendChild(i):this._ensureTransformGroup().appendChild(i)}},{key:"paintImageMaskXObject",value:function(e){var t=this.current,r=e.width,n=e.height,a=t.fillColor;t.maskId="mask".concat(w++);var o=this.svgFactory.createElement("svg:mask");o.setAttributeNS(null,"id",t.maskId);var i=this.svgFactory.createElement("svg:rect");i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y","0"),i.setAttributeNS(null,"width",v(r)),i.setAttributeNS(null,"height",v(n)),i.setAttributeNS(null,"fill",a),i.setAttributeNS(null,"mask","url(#".concat(t.maskId,")")),this.defs.appendChild(o),this._ensureTransformGroup().appendChild(i),this.paintInlineImageXObject(e,o)}},{key:"paintFormXObjectBegin",value:function(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){var r=t[2]-t[0],n=t[3]-t[1],a=this.svgFactory.createElement("svg:rect");a.setAttributeNS(null,"x",t[0]),a.setAttributeNS(null,"y",t[1]),a.setAttributeNS(null,"width",v(r)),a.setAttributeNS(null,"height",v(n)),this.current.element=a,this.clip("nonzero"),this.endPath()}}},{key:"paintFormXObjectEnd",value:function(){}},{key:"_initialize",value:function(e){var t=this.svgFactory.create(e.width,e.height),r=this.svgFactory.createElement("svg:defs");t.appendChild(r),this.defs=r;var n=this.svgFactory.createElement("svg:g");return n.setAttributeNS(null,"transform",y(e.transform)),t.appendChild(n),this.svg=n,t}},{key:"_ensureClipGroup",value:function(){if(!this.current.clipGroup){var e=this.svgFactory.createElement("svg:g");e.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.appendChild(e),this.current.clipGroup=e}return this.current.clipGroup}},{key:"_ensureTransformGroup",value:function(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",y(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}}]),e}()},(e,t,r)=>{"use strict";function n(e){return n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}
2Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var a,o=(a=r(2))&&a.__esModule?a:{default:a},i=r(4),s=r(154);function u(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function c(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d(e);if(t){var a=d(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return f(this,r)}}function f(e,t){if(t&&("object"===n(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(l){return void r(l)}s.done?t(u):Promise.resolve(u).then(n,a)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){h(o,n,a,i,s,"next",e)}function s(e){h(o,n,a,i,s,"throw",e)}i(void 0)}))}}function v(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"===typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function b(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),e}var _=__webpack_require__(1264),S=__webpack_require__(1289),A=__webpack_require__(1290),w=__webpack_require__(1291),k=/^file:\/\/\/[a-zA-Z]:\//,x=function(){function e(t){m(this,e),this.source=t,this.url=function(e){var t=w.parse(e);return"file:"===t.protocol||t.host?t:/^[a-z]:[/\\]/i.test(e)?w.parse("file:///".concat(e)):(t.host||(t.protocol="file:"),t)}(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=[]}return b(e,[{key:"_progressiveDataLength",get:function(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}},{key:"getFullReader",value:function(){return(0,i.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new O(this):new R(this),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=this.isFsUrl?new F(this,e,t):new E(this,e,t);return this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);var t,r=v(this._rangeRequestReaders.slice(0));try{for(r.s();!(t=r.n()).done;)t.value.cancel(e)}catch(n){r.e(n)}finally{r.f()}}}]),e}();t.PDFNodeStream=x;var P=function(){function e(t){m(this,e),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)()}return b(e,[{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:function(){var e=p(o.default.mark((function e(){var t,r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:if(!this._done){e.next=4;break}return e.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){e.next=6;break}throw this._storedError;case 6:if(null!==(t=this._readableStream.read())){e.next=10;break}return this._readCapability=(0,i.createPromiseCapability)(),e.abrupt("return",this.read());case 10:return this._loaded+=t.length,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}
2),r=new Uint8Array(t).buffer,e.abrupt("return",{value:r,done:!1});case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}},{key:"_error",value:function(e){this._storedError=e,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(e){var t=this;this._readableStream=e,e.on("readable",(function(){t._readCapability.resolve()})),e.on("end",(function(){e.destroy(),t._done=!0,t._readCapability.resolve()})),e.on("error",(function(e){t._error(e)})),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new i.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}]),e}(),C=function(){function e(t){m(this,e),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}return b(e,[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:function(){var e=p(o.default.mark((function e(){var t,r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:if(!this._done){e.next=4;break}return e.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){e.next=6;break}throw this._storedError;case 6:if(null!==(t=this._readableStream.read())){e.next=10;break}return this._readCapability=(0,i.createPromiseCapability)(),e.abrupt("return",this.read());case 10:return this._loaded+=t.length,this.onProgress&&this.onProgress({loaded:this._loaded}),r=new Uint8Array(t).buffer,e.abrupt("return",{value:r,done:!1});case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}},{key:"_error",value:function(e){this._storedError=e,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(e){var t=this;this._readableStream=e,e.on("readable",(function(){t._readCapability.resolve()})),e.on("end",(function(){e.destroy(),t._done=!0,t._readCapability.resolve()})),e.on("error",(function(e){t._error(e)})),this._storedError&&this._readableStream.destroy(this._storedError)}}]),e}();function T(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}var R=function(e){u(r,e);var t=c(r);function r(e){var n;m(this,r);var a=function(t){if(404===t.statusCode){var r=new i.MissingPDFException('Missing PDF "'.concat(n._url,'".'));return n._storedError=r,void n._headersCapability.reject(r)}n._headersCapability.resolve(),n._setReadableStream(t);var a=function(e){return n._readableStream.headers[e.toLowerCase()]},o=(0,s.validateRangeRequestCapabilities)({getResponseHeader:a,isHttp:e.isHttp,rangeChunkSize:n._rangeChunkSize,disableRange:n._disableRange}),u=o.allowRangeRequests,l=o.suggestedLength;n._isRangeSupported=u,n._contentLength=l||n._contentLength,n._filename=(0,s.extractFilenameFromHeader)(a)};return(n=t.call(this,e))._request=null,"http:"===n._url.protocol?n._request=S.request(T(n._url,e.httpHeaders),a):n._request=A.request(T(n._url,e.httpHeaders),a),n._request.on("error",(function(e){n._storedError=e,n._headersCapability.reject(e)})),n._request.end(),n}return r}(P),E=function(e){u(r,e);var t=c(r);function r(e,n,a){var o;for(var s in m(this,r),(o=t.call(this,e))._httpHeaders={},e.httpHeaders){var u=e.httpHeaders[s];"undefined"!==typeof u&&(o._httpHeaders[s]=u)}o._httpHeaders.Range="bytes=".concat(n,"-").concat(a-1);var l=function(e){if(404!==e.statusCode)o._setReadableStream(e);else{var t=new i.MissingPDFException('Missing PDF "'.concat(o._url,'".'));o._storedError=t}};return o._request=null,"http:"===o._url.protocol?o._request=S.request(T(o._url,o._httpHeaders),l):o._request=A.request(T(o._url,o._httpHeaders),l),o._request.on("error",(function(e){o._storedError=e})),o._request.end(),o}return r}(C),O=function(e){u(r,e);var t=c(r);function r(e){var n;m(this,r),n=t.call(this,e);var a=decodeURIComponent(n._url.path);return k.test(n._url.href)&&(a=a.replace(/^\//,"")),_.lstat(a,(function(e,t){if(e)return"ENOENT"===e.code&&(e=new i.MissingPDFException('Missing PDF "'.concat(a,'".'))),n._storedError=e,void n._headersCapability.reject(e);n._contentLength=t.size,n._setReadableStream(_.createReadStream(a)),n._headersCapability.resolve()})),n}return r}(P),F=function(e){u(r,e);var t=c(r);function r(e,n,a){var o;m(this,r),o=t.call(this,e);var i=decodeURIComponent(o._url.path);return k.test(o._url.href)&&(i=i.replace(/^\//,"")),o._setReadableStream(_.createReadStream(i,{start:n,end:a-1})),o}return r}(C)},(e,t,r)=>{"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.createResponseStatusError=function(e,t){return 404===e||0===e&&t.startsWith("file:")?new n.MissingPDFException('Missing PDF "'+t+'".'):new n.UnexpectedResponseException("Unexpected server response (".concat(e,') while retrieving PDF "').concat(t,'".'),e)},t.extractFilenameFromHeader=function(e){var t=e("Content-Disposition");if(t){var r=(0,a.getFilenameFromContentDispositionHeader)(t);if(r.includes("%"))try{r=decodeURIComponent(r)}catch(n){}if((0,o.isPdfFile)(r))return r}return null},t.validateRangeRequestCapabilities=function(e){var t=e.getResponseHeader,r=e.isHttp,a=e.rangeChunkSize,o=e.disableRange;(0,n.assert)(a>0,"Range chunk size must be larger than zero");var i={allowRangeRequests:!1,suggestedLength:void 0},s=parseInt(t("Content-Length"),10);return Number.isInteger(s)?(i.suggestedLength=s,s<=2*a||o||!r||"bytes"!==t("Accept-Ranges")||"identity"!==(t("Content-Encoding")||"identity")||(i.allowRangeRequests=!0),i):i},t.validateResponseStatus=function(e){return 200===e||206===e};var n=r(4),a=r(155),o=r(1)},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=function(e){var t=!0,r=s("filename\\*","i").exec(e);if(r){var o=c(r=r[1]);return l(o=d(o=f(o=unescape(o))))}if(r=function(e){for(var t,r=[],n=s("filename\\*((?!0\\d)\\d+)(\\*?)","ig");null!==(t=n.exec(e));){var o=a(t,4),i=o[1],u=o[2],l=o[3];if((i=parseInt(i,10))in r){if(0===i)break}else r[i]=[u,l]}for(var d=[],h=0;h<r.length&&h in r;++h){var p=a(r[h],2),v=p[0],y=p[1];y=c(y),v&&(y=unescape(y),0===h&&(y=f(y))),d.push(y)}return d.join("")}(e))return l(d(r));if(r=s("filename","i").exec(e)){var i=c(r=r[1]);return l(i=d(i))}function s(e,t){return new RegExp("(?:^|;)\\s*"+e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',t)}function u(e,r){if(e){if(!/^[\x00-\xFF]+$/.test(r))return r;try{var a=new TextDecoder(e,{fatal:!0}),o=(0,n.stringToBytes)(r);r=a.decode(o),t=!1}catch(i){if(/^utf-?8$/i.test(e))try{r=decodeURIComponent(escape(r)),t=!1}catch(s){}}}return r}function l(e){return t&&/[\x80-\xff]/.test(e)&&(e=u("utf-8",e),t&&(e=u("iso-8859-1",e))),e}function c(e){if(e.startsWith('"')){for(var t=e.slice(1).split('\\"'),r=0;r<t.length;++r){var n=t[r].indexOf('"');-1!==n&&(t[r]=t[r].slice(0,n),t.length=r+1),t[r]=t[r].replace(/\\(.)/g,"$1")}e=t.join('"')}return e}function f(e){var t=e.indexOf("'");return-1===t?e:u(e.slice(0,t),e.slice(t+1).replace(/^[^']*'/,""))}function d(e){return!e.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(e)?e:e.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(e,t,r,n){if("q"===r||"Q"===r)return u(t,n=(n=n.replace(/_/g," ")).replace(/=([0-9a-fA-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt(t,16))})));try{n=atob(n)}catch(a){}return u(t,n)}))}return""};var n=r(4);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){s=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"===typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){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 o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNetworkStream=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},o=r(4),i=r(154);function s(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(l){return void r(l)}s.done?t(u):Promise.resolve(u).then(n,a)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){s(o,n,a,i,u,"next",e)}function u(e){s(o,n,a,i,u,"throw",e)}i(void 0)}))}}function l(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"===typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),e}var p=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f(this,e),this.url=t,this.isHttp=/^https?:/i.test(t),this.httpHeaders=this.isHttp&&r.httpHeaders||Object.create(null),this.withCredentials=r.withCredentials||!1,this.getXhr=r.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}return h(e,[{key:"requestRange",value:function(e,t,r){var n={begin:e,end:t};for(var a in r)n[a]=r[a];return this.request(n)}},{key:"requestFull",value:function(e){return this.request(e)}},{key:"request",value:function(e){var t=this.getXhr(),r=this.currXhrId++,n=this.pendingRequests[r]={x
2hr:t};for(var a in t.open("GET",this.url),t.withCredentials=this.withCredentials,this.httpHeaders){var o=this.httpHeaders[a];"undefined"!==typeof o&&t.setRequestHeader(a,o)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range","bytes=".concat(e.begin,"-").concat(e.end-1)),n.expectedStatus=206):n.expectedStatus=200,t.responseType="arraybuffer",e.onError&&(t.onerror=function(r){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,r),t.onprogress=this.onProgress.bind(this,r),n.onHeadersReceived=e.onHeadersReceived,n.onDone=e.onDone,n.onError=e.onError,n.onProgress=e.onProgress,t.send(null),r}},{key:"onProgress",value:function(e,t){var r,n=this.pendingRequests[e];n&&(null===(r=n.onProgress)||void 0===r||r.call(n,t))}},{key:"onStateChange",value:function(e,t){var r=this.pendingRequests[e];if(r){var n=r.xhr;if(n.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),4===n.readyState&&e in this.pendingRequests)if(delete this.pendingRequests[e],0===n.status&&this.isHttp){var a;null===(a=r.onError)||void 0===a||a.call(r,n.status)}else{var i=n.status||200;
2if(200===i&&206===r.expectedStatus||i===r.expectedStatus){var s=function(e){var t=e.response;return"string"!==typeof t?t:(0,o.stringToBytes)(t).buffer}(n);if(206===i){var u=n.getResponseHeader("Content-Range"),l=/bytes (\d+)-(\d+)\/(\d+)/.exec(u);r.onDone({begin:parseInt(l[1],10),chunk:s})}else if(s)r.onDone({begin:0,chunk:s});else{var c;null===(c=r.onError)||void 0===c||c.call(r,n.status)}}else{var f;null===(f=r.onError)||void 0===f||f.call(r,n.status)}}}}},{key:"getRequestXhr",value:function(e){return this.pendingRequests[e].xhr}},{key:"isPendingRequest",value:function(e){return e in this.pendingRequests}},{key:"abortRequest",value:function(e){var t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}]),e}(),v=function(){function e(t){f(this,e),this._source=t,this._manager=new p(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials}),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}return h(e,[{key:"_onRangeRequestReaderClosed",value:function(e){var t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}},{key:"getFullReader",value:function(){return(0,o.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new y(this._manager,this._source),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){var r=new m(this._manager,e,t);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){var t;null===(t=this._fullRequestReader)||void 0===t||t.cancel(e);var r,n=l(this._rangeRequestReaders.slice(0));try{for(n.s();!(r=n.n()).done;)r.value.cancel(e)}catch(a){n.e(a)}finally{n.f()}}}]),e}();t.PDFNetworkStream=v;var y=function(){function e(t,r){f(this,e),this._manager=t;var n={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(n),this._headersReceivedCapability=(0,o.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}return h(e,[{key:"_onHeadersReceived",value:function(){var e=this._fullRequestId,t=this._manager.getRequestXhr(e),r=function(e){return t.getResponseHeader(e)},n=(0,i.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),a=n.allowRangeRequests,o=n.suggestedLength;a&&(this._isRangeSupported=!0),this._contentLength=o||this._contentLength,this._filename=(0,i.extractFilenameFromHeader)(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}},{key:"_onDone",value:function(e){if(e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,!(this._cachedChunks.length>0)){var t,r=l(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(n){r.e(n)}finally{r.f()}this._requests.length=0}}},{key:"_onError",value:function(e){this._storedError=(0,i.createResponseStatusError)(e,this._url),this._headersReceivedCapability.reject(this._storedError);var t,r=l(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.reject(this._storedError)}catch(n){r.e(n)}finally{r.f()}this._requests.length=0,this._cachedChunks.length=0}},{key:"_onProgress",value:function(e){var t;null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"contentLength",get:function(){return this._contentLength}},{key:"headersReady",get:function(){return this._headersReceivedCapability.promise}},{key:"read",value:function(){var e=u(a.default.mark((function e(){var t,r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._storedError){e.next=2;break}throw this._storedError;case 2:if(!(this._cachedChunks.length>0)){e.next=5;break}return t=this._cachedChunks.shift(),e.abrupt("return",{value:t,done:!1});case 5:if(!this._done){e.next=7;break}return e.abrupt("return",{value:void 0,done:!0});case 7:return r=(0,o.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._done=!0,this._headersReceivedCapability.reject(e);var t,r=l(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(n){r.e(n)}finally{r.f()}this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest
2(this._fullRequestId),this._fullRequestReader=null}}]),e}(),m=function(){function e(t,r,n){f(this,e),this._manager=t;var a={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._requestId=t.requestRange(r,n,a),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}return h(e,[{key:"_close",value:function(){var e;null===(e=this.onClosed)||void 0===e||e.call(this,this)}},{key:"_onDone",value:function(e){var t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0;var r,n=l(this._requests);try{for(n.s();!(r=n.n()).done;)r.value.resolve({value:void 0,done:!0})}catch(a){n.e(a)}finally{n.f()}this._requests.length=0,this._close()}},{key:"_onError",value:function(e){this._storedError=(0,i.createResponseStatusError)(e,this._url);var t,r=l(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.reject(this._storedError)}catch(n){r.e(n)}finally{r.f()}this._requests.length=0,this._queuedChunk=null}},{key:"_onProgress",value:function(e){var t;this.isStreamingSupported||null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:e.loaded})}},{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:function(){var e=u(a.default.mark((function e(){var t,r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._storedError){e.next=2;break}throw this._storedError;case 2:if(null===this._queuedChunk){e.next=6;break}return t=this._queuedChunk,this._queuedChunk=null,e.abrupt("return",{value:t,done:!1});case 6:if(!this._done){e.next=8;break}return e.abrupt("return",{value:void 0,done:!0});case 8:return r=(0,o.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._done=!0;var t,r=l(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(n){r.e(n)}finally{r.f()}this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}]),e}()},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},o=r(4),i=r(154);function s(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(l){return void r(l)}s.done?t(u):Promise.resolve(u).then(n,a)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){s(o,n,a,i,u,"next",e)}function u(e){s(o,n,a,i,u,"throw",e)}i(void 0)}))}}function l(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"===typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),e}function p(e,t,r){return{method:"GET",headers:e,signal:null===r||void 0===r?void 0:r.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function v(e){var t=new Headers;for(var r in e){var n=e[r];"undefined"!==typeof n&&t.append(r,n)}return t}var y=function(){function e(t){f(this,e),this.source=t,this.isHttp=/^https?:/i.test(t.url),this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}return h(e,[{key:"_progressiveDataLength",get:function(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}},{key:"getFullReader",value:function(){return(0,o.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new m(this),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=new g(this,e,t);return this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);var t,r=l(this._rangeRequestReaders.slice(0));try{for(r.s();!(t=r.n()).done;)t.value.cancel(e)}catch(n){r.e(n)}finally{r.f()}}}]),e}();t.PDFFetchStream=y;var m=function(){function e(t){var r=this;f(this,e),this._stream=t,this._reader=null,this._loaded=0,this._filename=null;var n=t.source;this._withCredentials=n.withCredentials||!1,this._contentLength=n.length,this._headersCapability=(0,o.createPromiseCapability)(),this._disableRange=n.disableRange||!1,this._rangeChunkSize=n.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),"undefined"!==typeof AbortController&&(this._abortController=new AbortController),this._isStreamingSupported=!n.disableStream,this._isRangeSupported=!n.disableRange,this._headers=v(this._stream.httpHeaders);var a=n.url;fetch(a,p(this._headers,this._withCredentials,this._abortController)).then((function(e){if(!(0,i.validateResponseStatus)(e.status))throw(0,i.createResponseStatusError)(e.status,a);r._reader=e.body.getReader(),r._headersCapability.resolve();var t=function(t){return e.headers.get(t)},n=(0,i.validateRangeRequestCapabilities)({getResponseHeader:t,isHttp:r._stream.isHttp,rangeChunkSize:r._rangeChunkSize,disableRange:r._disableRange}),s=n.allowRangeRequests,u=n.suggestedLength;r._isRangeSupported=s,r._contentLength=u||r._contentLength,r._filename=(0,i.extractFilenameFromHeader)(t),!r._isStreamingSupported&&r._isRangeSupported&&r.cancel(new o.AbortException("Streaming is disabled."))})).catch(this._headersCapability.reject),this.onProgress=null}return h(e,[{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:function(){var e=u(a.default.mark((function e(){var t,r,n,o;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._headersCapability.promise;case 2:return e.next=4,this._reader.read();case 4:if(t=e.sent,r=t.value,!(n=t.done)){e.next=9;break}return e.abrupt("return",{value:r,done:n});case 9:return this._loaded+=r.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),o=new Uint8Array(r).buffer,e.abrupt("return",{value:o,done:!1});case 13:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}}]),e}(),g=function(){function e(t,r,n){var a=this;f(this,e),this._stream=t,this._reader=null,this._loaded=0;var s=t.source;this._withCredentials=s.withCredentials||!1,this._readCapability=(0,o.createPromiseCapability)(),this._isStreamingSupported=!s.disableStream,"undefined"!==typeof AbortController&&(this._abortController=new AbortController),this._headers=v(this._stream.httpHeaders),this._headers.append("Range","bytes=".concat(r,"-").concat(n-1));var u=s.url;fetch(u,p(this._headers,this._withCredentials,this._abortController)).then((function(e){if(!(0,i.validateResponseStatus)(e.status))throw(0,i.createResponseStatusError)(e.status,u);a._readCapability.resolve(),a._reader=e.body.getReader()})).catch(this._readCapability.reject),this.onProgress=null}return h(e,[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:function(){var e=u(a.default.mark((function e(){var t,r,n,o;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:return e.next=4,this._reader.read();case 4:if(t=e.sent,r=t.value,!(n=t.done)){e.next=9;break}return e.abrupt("return",{value:r,done:n});case 9:return this._loaded+=r.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded}),o=new Uint8Array(r).buffer,e.abrupt("return",{value:o,done:!1});case 13:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}}]),e}()}],__webpack_module_cache__={};function __w_pdfjs_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};
2return __webpack_modules__[e].call(r.exports,r,r.exports,__w_pdfjs_require__),r.loaded=!0,r.exports}__w_pdfjs_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};return(()=>{"use strict";var e=__webpack_exports__;Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AnnotationLayer",{enumerable:!0,get:function(){return a.AnnotationLayer}}),Object.defineProperty(e,"AnnotationMode",{enumerable:!0,get:function(){return r.AnnotationMode}}),Object.defineProperty(e,"CMapCompressionType",{enumerable:!0,get:function(){return r.CMapCompressionType}}),Object.defineProperty(e,"GlobalWorkerOptions",{enumerable:!0,get:function(){return o.GlobalWorkerOptions}}),Object.defineProperty(e,"InvalidPDFException",{enumerable:!0,get:function(){return r.InvalidPDFException}}),Object.defineProperty(e,"LinkTarget",{enumerable:!0,get:function(){return t.LinkTarget}}),Object.defineProperty(e,"LoopbackPort",{enumerable:!0,get:function(){return n.LoopbackPort}}),Object.defineProperty(e,"MissingPDFException",{enumerable:!0,get:function(){return r.MissingPDFException}}),Object.defineProperty(e,"OPS",{enumerable:!0,get:function(){return r.OPS}}),Object.defineProperty(e,"PDFDataRangeTransport",{enumerable:!0,get:function(){return n.PDFDataRangeTransport}}),Object.defineProperty(e,"PDFDateString",{enumerable:!0,get:function(){return t.PDFDateString}}),Object.defineProperty(e,"PDFWorker",{enumerable:!0,get:function(){return n.PDFWorker}}),Object.defineProperty(e,"PasswordResponses",{enumerable:!0,get:function(){return r.PasswordResponses}}),Object.defineProperty(e,"PermissionFlag",{enumerable:!0,get:function(){return r.PermissionFlag}}),Object.defineProperty(e,"PixelsPerInch",{enumerable:!0,get:function(){return t.PixelsPerInch}}),Object.defineProperty(e,"RenderingCancelledException",{enumerable:!0,get:function(){return t.RenderingCancelledException}}),Object.defineProperty(e,"SVGGraphics",{enumerable:!0,get:function(){return u.SVGGraphics}}),Object.defineProperty(e,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return r.UNSUPPORTED_FEATURES}}),Object.defineProperty(e,"UnexpectedResponseException",{enumerable:!0,get:function(){return r.UnexpectedResponseException}}),Object.defineProperty(e,"Util",{enumerable:!0,get:function(){return r.Util}}),Object.defineProperty(e,"VerbosityLevel",{enumerable:!0,get:function(){return r.VerbosityLevel}}),Object.defineProperty(e,"XfaLayer",{enumerable:!0,get:function(){return l.XfaLayer}}),Object.defineProperty(e,"addLinkAttributes",{enumerable:!0,get:function(){return t.addLinkAttributes}}),Object.defineProperty(e,"build",{enumerable:!0,get:function(){return n.build}}),Object.defineProperty(e,"createObjectURL",{enumerable:!0,get:function(){return r.createObjectURL}}),Object.defineProperty(e,"createPromiseCapability",{enumerable:!0,get:function(){return r.createPromiseCapability}}),Object.defineProperty(e,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return r.createValidAbsoluteUrl}}),Object.defineProperty(e,"getDocument",{enumerable:!0,get:function(){return n.getDocument}}),Object.defineProperty(e,"getFilenameFromUrl",{enumerable:!0,get:function(){return t.getFilenameFromUrl}}),Object.defineProperty(e,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return t.getPdfFilenameFromUrl}}),Object.defineProperty(e,"getXfaPageViewport",{enumerable:!0,get:function(){return t.getXfaPageViewport}}),Object.defineProperty(e,"isPdfFile",{enumerable:!0,get:function(){return t.isPdfFile}}),Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return t.loadScript}}),Object.defineProperty(e,"removeNullCharacters",{enumerable:!0,get:function(){return r.removeNullCharacters}}),Object.defineProperty(e,"renderTextLayer",{enumerable:!0,get:function(){return s.renderTextLayer}}),Object.defineProperty(e,"shadow",{enumerable:!0,get:function(){return r.shadow}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return n.version}});var t=__w_pdfjs_require__(1),r=__w_pdfjs_require__(4),n=__w_pdfjs_require__(136),a=__w_pdfjs_require__(148),o=__w_pdfjs_require__(142),i=__w_pdfjs_require__(6),s=__w_pdfjs_require__(151),u=__w_pdfjs_require__(152),l=__w_pdfjs_require__(150);if(i.isNodeJS){var c=__w_pdfjs_require__(153).PDFNodeStream;(0,n.setPDFNetworkStreamFactory)((function(e){return new c(e)}))}else{var f=__w_pdfjs_require__(156).PDFNetworkStream,d=__w_pdfjs_require__(157).PDFFetchStream;(0,n.setPDFNetworkStreamFactory)((function(e){return(0,t.isValidFetchUrl)(e.url)?new d(e):new f(e)}))}})(),__webpack_exports__})()},module.exports=factory()}).call(this,__webpack_require__(547).Buffer,__webpack_require__(170),__webpack_require__(98))},1297:function(e,t,r){"use strict";r.d(t,"c",(function(){return n})),r.d(t,"a",(function(){return pe})),r.d(t,"b",(function(){return Qe}));var n=r(1247),a=r(64),o=r(184);function i(e,t){if(null==e)return{};var r,n,a=Object(o.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var d=r(436);function h(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}
2),t&&Object(d.a)(e,t)}function p(e,t){if(t&&("object"===s(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var m=r(0),g=r.n(m),b=r(61),_=r.n(b),S=["onKeyDown","onKeyPress","onKeyUp"],A=["onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"],w=["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],k=[].concat(["onCopy","onCut","onPaste"],["onCompositionEnd","onCompositionStart","onCompositionUpdate"],S,["onFocus","onBlur"],["onChange","onInput","onInvalid","onReset","onSubmit"],["onError","onLoad"],A,["onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut"],["onSelect"],w,["onScroll"],["onWheel"],["onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting"],["onLoad","onError"],["onAnimationStart","onAnimationEnd","onAnimationIteration"],["onTransitionEnd"],["onToggle"]),x=function(e,t){var r={};return k.forEach((function(n){n in e&&(r[n]=t?function(r){return e[n](r,t(n))}:e[n])})),r};function P(e){var t=!1,r=new Promise((function(r,n){e.then((function(){return!t&&r.apply(void 0,arguments)})).catch((function(e){return!t&&n(e)}))}));return{promise:r,cancel:function(){t=!0}}}function C(){return Array.prototype.slice.call(arguments).reduce((function(e,t){return e.concat(t)}),[]).filter((function(e){return"string"===typeof e})).join(" ")}var T=r(130),R=r(319),E=Object(m.createContext)(null);function O(e){var t=e.children,r=e.type;return g.a.createElement("div",{className:"react-pdf__message react-pdf__message--".concat(r)},t)}O.propTypes={children:_.a.node,type:_.a.oneOf(["error","loading","no-data"]).isRequired};var F=function(){function e(){u(this,e),this.externalLinkTarget=null,this.externalLinkRel=null}return c(e,[{key:"setDocument",value:function(e){this.pdfDocument=e}},{key:"setViewer",value:function(e){this.pdfViewer=e}},{key:"setExternalLinkRel",value:function(e){this.externalLinkRel=e}},{key:"setExternalLinkTarget",value:function(e){this.externalLinkTarget=e}},{key:"setHistory",value:function(){}},{key:"pagesCount",get:function(){return this.pdfDocument?this.pdfDocument.numPages:0}},{key:"page",get:function(){return this.pdfViewer.currentPageNumber},set:function(e){this.pdfViewer.currentPageNumber=e}},{key:"rotation",get:function(){return 0},set:function(e){}},{key:"goToDestination",value:function(e){var t=this;new Promise((function(r){"string"===typeof e?t.pdfDocument.getDestination(e).then(r):Array.isArray(e)?r(e):e.then(r)})).then((function(r){Object(T.a)(Array.isArray(r),'"'.concat(r,'" is not a valid destination array.'));var n=r[0];new Promise((function(e){n instanceof Object?t.pdfDocument.getPageIndex(n).then((function(t){e(t)})).catch((function(){Object(T.a)(!1,'"'.concat(n,'" is not a valid page reference.'))})):"number"===typeof n?e(n):Object(T.a)(!1,'"'.concat(n,'" is not a valid destination reference.'))})).then((function(r){var n=r+1;Object(T.a)(n>=1&&n<=t.pagesCount,'"'.concat(n,'" is not a valid page number.')),t.pdfViewer.scrollPageIntoView({dest:e,pageIndex:r,pageNumber:n})}))}))}},{key:"navigateTo",value:function(e){this.goToDestination(e)}},{key:"goToPage",value:function(){}},{key:"addLinkAttributes",value:function(e,t,r){e.href=t,e.rel=this.externalLinkRel||"noopener noreferrer nofollow",e.target=r?"_blank":this.externalLinkTarget||""}},{key:"getDestinationHash",value:function(){return"#"}},{key:"getAnchorUrl",value:function(){return"#"}},{key:"setHash",value:function(){}},{key:"executeNamedAction",value:function(){}},{key:"cachePageRef",value:function(){}},{key:"isPageVisible",value:function(){return!0}},{key:"isPageCached",value:function(){return!0}}]),e}(),I={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function M(e,t){if(e){if("string"===typeof e)return j(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?j(e,t):void 0}}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(u){s=!0,a=u}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(e,t)||M(e,t)||function(){throw new TypeError("Invalid attempt to de
2structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var L="undefined"!==typeof window,N=L&&"file:"===window.location.protocol;function q(e){return"undefined"!==typeof e}function B(e){return q(e)&&null!==e}function W(e){return e instanceof ArrayBuffer}function U(e){return Object(T.a)(L,"isBlob can only be used in a browser environment"),e instanceof Blob}function G(e){return Object(T.a)(L,"isFile can only be used in a browser environment"),e instanceof File}function z(e){return"string"===typeof e&&/^data:/.test(e)}function H(e){Object(T.a)(z(e),"Invalid data URI.");var t=D(e.split(","),2),r=t[0],n=t[1];return-1!==r.split(";").indexOf("base64")?atob(n):unescape(n)}var V="On Chromium based browsers, you can use --allow-file-access-from-files flag for debugging purposes.";function X(){Object(R.a)(!N,"Loading PDF as base64 strings/URLs may not work on protocols other than HTTP/HTTPS. ".concat(V))}function Y(e){e&&e.cancel&&e.cancel()}function K(e,t){return Object.defineProperty(e,"width",{get:function(){return this.view[2]*t},configurable:!0}),Object.defineProperty(e,"height",{get:function(){return this.view[3]*t},configurable:!0}),Object.defineProperty(e,"originalWidth",{get:function(){return this.view[2]},configurable:!0}),Object.defineProperty(e,"originalHeight",{get:function(){return this.view[3]},configurable:!0}),e}
2function Q(e){return"RenderingCancelledException"===e.name}function J(e){return new Promise((function(t,r){var n=new FileReader;return n.onload=function(){return t(new Uint8Array(n.result))},n.onerror=function(e){switch(e.target.error.code){case e.target.error.NOT_FOUND_ERR:return r(new Error("Error while reading a file: File not found."));case e.target.error.NOT_READABLE_ERR:return r(new Error("Error while reading a file: File not readable."));case e.target.error.SECURITY_ERR:return r(new Error("Error while reading a file: Security error."));case e.target.error.ABORT_ERR:return r(new Error("Error while reading a file: Aborted."));default:return r(new Error("Error while reading a file."))}},n.readAsArrayBuffer(e),null}))}function $(e){return function(e){if(Array.isArray(e))return j(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||M(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Z=function(){var e={};return[].concat($(A),$(w),$(S)).forEach((function(t){e[t]=_.a.func})),e}(),ee=[_.a.string,_.a.instanceOf(ArrayBuffer),_.a.shape({data:_.a.oneOfType([_.a.object,_.a.string]),httpHeaders:_.a.object,range:_.a.object,url:_.a.string,withCredentials:_.a.bool})];"undefined"!==typeof File&&ee.push(_.a.instanceOf(File)),"undefined"!==typeof Blob&&ee.push(_.a.instanceOf(Blob));var te=_.a.oneOfType([_.a.string,_.a.arrayOf(_.a.string)]),re=_.a.oneOfType(ee),ne=_.a.instanceOf(F),ae=(_.a.oneOf(["_self","_blank","_parent","_top"]),_.a.shape({_transport:_.a.shape({fontLoader:_.a.object.isRequired}).isRequired,commonObjs:_.a.shape({_objs:_.a.object.isRequired}).isRequired,getAnnotations:_.a.func.isRequired,getTextContent:_.a.func.isRequired,getViewport:_.a.func.isRequired,render:_.a.func.isRequired})),oe=_.a.oneOfType([_.a.shape({getDestination:_.a.func.isRequired,getOutline:_.a.func.isRequired,getPage:_.a.func.isRequired,numPages:_.a.number.isRequired}),_.a.bool]),ie=_.a.oneOfType([_.a.func,_.a.shape({current:_.a.any})]),se=_.a.oneOf(["canvas","none","svg"]),ue=_.a.oneOf([0,90,180,270]),le=["url"];function ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function fe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(r),!0).forEach((function(t){y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ce(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function de(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=v(e);if(t){var a=v(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return p(this,r)}}var he=n.PDFDataRangeTransport,pe=function(e){h(r,e);var t=de(r);function r(){var e;u(this,r);for(var a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l];return y(f(e=t.call.apply(t,[this].concat(o))),"state",{pdf:null}),y(f(e),"viewer",{scrollPageIntoView:function(t){var r=t.dest,n=t.pageIndex,a=t.pageNumber,o=e.props.onItemClick;if(o)o({dest:r,pageIndex:n,pageNumber:a});else{var i=e.pages[n];i?i.scrollIntoView():Object(R.a)(!1,"An internal link leading to page ".concat(a," was clicked, but neither <Document> was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to <Document> and handle navigating by yourself or ensure that all pages are rendered within <Document>."))}}}),y(f(e),"linkService",new F),y(f(e),"loadDocument",(function(){Y(e.runningTask),e.loadingTask&&e.loadingTask.destroy();var t=P(e.findDocumentSource());e.runningTask=t,t.promise.then((function(t){if(e.onSourceSuccess(),t){e.setState((function(e){return e.pdf?{pdf:null}:null}));var r=e.props,a=r.options,o=r.onLoadProgress,i=r.onPassword;e.loadingTask=n.getDocument(fe(fe({},t),a)),e.loadingTask.onPassword=i,o&&(e.loadingTask.onProgress=o);var s=P(e.loadingTask.promise);e.runningTask=s,s.promise.then((function(t){e.setState((function(e){return e.pdf&&e.pdf.fingerprint===t.fingerprint?null:{pdf:t}}),e.onLoadSuccess)})).catch((function(t){e.onLoadError(t)}))}})).catch((function(t){e.onSourceError(t)}))}
2)),y(f(e),"setupLinkService",(function(){var t=e.props,r=t.externalLinkRel,n=t.externalLinkTarget;e.linkService.setViewer(e.viewer),e.linkService.setExternalLinkRel(r),e.linkService.setExternalLinkTarget(n)})),y(f(e),"onSourceSuccess",(function(){var t=e.props.onSourceSuccess;t&&t()})),y(f(e),"onSourceError",(function(t){Object(R.a)(t);var r=e.props.onSourceError;r&&r(t)})),y(f(e),"onLoadSuccess",(function(){var t=e.props.onLoadSuccess,r=e.state.pdf;t&&t(r),e.pages=new Array(r.numPages),e.linkService.setDocument(r)})),y(f(e),"onLoadError",(function(t){e.setState({pdf:!1}),Object(R.a)(t);var r=e.props.onLoadError;r&&r(t)})),y(f(e),"findDocumentSource",(function(){return new Promise((function(t){var r=e.props.file;if(r||t(null),"string"===typeof r){if(z(r)){var n=H(r);t({data:n})}X(),t({url:r})}if(r instanceof he&&t({range:r}),W(r)&&t({data:r}),L&&(U(r)||G(r)))J(r).then((function(e){t({data:e})}));else{if(Object(T.a)("object"===s(r),"Invalid parameter in file, need either Uint8Array, string or a parameter object"),Object(T.a)(r.url||r.data||r.range,"Invalid parameter object: need either .data, .range or .url"),"string"===typeof r.url){if(z(r.url)){var a=r.url,o=i(r,le),u=H(a);t(fe({data:u},o))}X()}t(r)}}))})),y(f(e),"registerPage",(function(t,r){e.pages[t]=r})),y(f(e),"unregisterPage",(function(t){delete e.pages[t]})),e}return c(r,[{key:"componentDidMount",value:function(){this.loadDocument(),this.setupLinkService()}},{key:"componentDidUpdate",value:function(e){this.props.file!==e.file&&this.loadDocument()}},{key:"componentWillUnmount",value:function(){Y(this.runningTask),this.loadingTask&&this.loadingTask.destroy()}},{key:"childContext",get:function(){var e=this.linkService,t=this.registerPage,r=this.unregisterPage,n=this.props,a=n.imageResourcesPath,o=n.renderMode,i=n.rotate;return{imageResourcesPath:a,linkService:e,pdf:this.state.pdf,registerPage:t,renderMode:o,rotate:i,unregisterPage:r}}},{key:"eventProps",get:function(){var e=this;return x(this.props,(function(){return e.state.pdf}))}},{key:"renderChildren",value:function(){var e=this.props.children;return g.a.createElement(E.Provider,{value:this.childContext},e)}},{key:"renderContent",value:function(){var e=this.props.file,t=this.state.pdf;if(!e){var r=this.props.noData;return g.a.createElement(O,{type:"no-data"},"function"===typeof r?r():r)}if(null===t){var n=this.props.loading;return g.a.createElement(O,{type:"loading"},"function"===typeof n?n():n)}if(!1===t){var a=this.props.error;return g.a.createElement(O,{type:"error"},"function"===typeof a?a():a)}return this.renderChildren()}},{key:"render",value:function(){var e=this.props,t=e.className,r=e.inputRef;return g.a.createElement("div",Object(a.a)({className:C("react-pdf__Document",t),ref:r},this.eventProps),this.renderContent())}}]),r}(m.PureComponent);pe.defaultProps={error:"Failed to load PDF file.",loading:"Loading PDF\u2026",noData:"No PDF file specified.",onPassword:function(e,t){switch(t){case I.NEED_PASSWORD:e(prompt("Enter the password to open this PDF file."));break;case I.INCORRECT_PASSWORD:e(prompt("Invalid password. Please try again."))}}};var ve=_.a.oneOfType([_.a.func,_.a.node]);pe.propTypes=fe(fe({},Z),{},{children:_.a.node,className:te,error:ve,externalLinkRel:_.a.string,externalLinkTarget:_.a.string,file:re,imageResourcesPath:_.a.string,inputRef:ie,loading:ve,noData:ve,onItemClick:_.a.func,onLoadError:_.a.func,onLoadProgress:_.a.func,onLoadSuccess:_.a.func,onPassword:_.a.func,onSourceError:_.a.func,onSourceSuccess:_.a.func,rotate:_.a.number});var ye=Object(m.createContext)(null),me=function(){function e(t){var r=t.num,n=t.gen;u(this,e),this.num=r,this.gen=n}return c(e,[{key:"toString",value:function(){var e="".concat(this.num,"R");return 0!==this.gen&&(e+=this.gen),e}}]),e}(),ge=["item"];function be(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=v(e);if(t){var a=v(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return p(this,r)}}var _e=function(e){h(r,e);var t=be(r);function r(){var e;u(this,r);for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return y(f(e=t.call.apply(t,[this].concat(a))),"getDestination",(function(){return new Promise((function(t,r){var n=e.props,a=n.item,o=n.pdf;return q(e.destination)||("string"===typeof a.dest?o.getDestination(a.dest).then(t).cat
2ch(r):t(a.dest)),e.destination})).then((function(t){return e.destination=t,t}))})),y(f(e),"getPageIndex",(function(){return new Promise((function(t,r){var n=e.props.pdf;q(e.pageIndex)&&t(e.pageIndex),e.getDestination().then((function(e){if(e){var a=D(e,1)[0];n.getPageIndex(new me(a)).then(t).catch(r)}}))})).then((function(t){return e.pageIndex=t,e.pageIndex}))})),y(f(e),"getPageNumber",(function(){return new Promise((function(t,r){q(e.pageNumber)&&t(e.pageNumber),e.getPageIndex().then((function(e){t(e+1)})).catch(r)})).then((function(t){return e.pageNumber=t,t}))})),y(f(e),"onClick",(function(t){var r=e.props.onClick;return t.preventDefault(),!!r&&Promise.all([e.getDestination(),e.getPageIndex(),e.getPageNumber()]).then((function(e){var t=D(e,3),n=t[0],a=t[1],o=t[2];r({dest:n,pageIndex:a,pageNumber:o})}))})),e}return c(r,[{key:"renderSubitems",value:function(){var e=this.props,t=e.item,n=i(e,ge);if(!t.items||!t.items.length)return null;var o=t.items;return g.a.createElement("ul",null,o.map((function(e,t){return g.a.createElement(r,Object(a.a)({key:"string"===typeof e.destination?e.destination:t,item:e},n))})))}},{key:"render",value:function(){var e=this.props.item;return g.a.createElement("li",null,g.a.createElement("a",{href:"#",onClick:this.onClick},e.title),this.renderSubitems())}}]),r}(m.PureComponent),Se=_.a.oneOfType([_.a.string,_.a.arrayOf(_.a.any)]);_e.propTypes={item:_.a.shape({dest:Se,items:_.a.arrayOf(_.a.shape({dest:Se,title:_.a.string})),title:_.a.string}).isRequired,onClick:_.a.func,pdf:oe.isRequired};var Ae=function(e){return g.a.createElement(E.Consumer,null,(function(t){return g.a.createElement(ye.Consumer,null,(function(r){return g.a.createElement(_e,Object(a.a)({},t,r,e))}))}))};function we(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ke(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=v(e);if(t){var a=v(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return p(this,r)}}var xe=function(e){h(r,e);var t=ke(r);function r(){var e;u(this,r);for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return y(f(e=t.call.apply(t,[this].concat(a))),"state",{outline:null}),y(f(e),"loadOutline",(function(){var t=e.props.pdf;e.setState((function(e){return e.outline?{outline:null}:null}));var r=P(t.getOutline());e.runningTask=r,r.promise.then((function(t){e.setState({outline:t},e.onLoadSuccess)})).catch((function(t){e.onLoadError(t)}))})),y(f(e),"onLoadSuccess",(function(){var t=e.props.onLoadSuccess,r=e.state.outline;t&&t(r)})),y(f(e),"onLoadError",(function(t){e.setState({outline:!1}),Object(R.a)(t);var r=e.props.onLoadError;r&&r(t)})),y(f(e),"onItemClick",(function(t){var r=t.dest,n=t.pageIndex,a=t.pageNumber,o=e.props.onItemClick;o&&o({dest:r,pageIndex:n,pageNumber:a})})),e}return c(r,[{key:"componentDidMount",value:function(){var e=this.props.pdf;Object(T.a)(e,"Attempted to load an outline, but no document was specified."),this.loadOutline()}},{key:"componentDidUpdate",value:function(e){var t=this.props.pdf;e.pdf&&t!==e.pdf&&this.loadOutline()}},{key:"componentWillUnmount",value:function(){Y(this.runningTask)}},{key:"childContext",get:function(){return{onClick:this.onItemClick}}},{key:"eventProps",get:function(){var e=this;return x(this.props,(function(){return e.state.outline}))}},{key:"renderOutline",value:function(){var e=this.state.outline;return g.a.createElement("ul",null,e.map((function(e,t){return g.a.createElement(Ae,{key:"string"===typeof e.destination?e.destination:t,item:e})})))}},{key:"render",value:function(){var e=this.props.pdf,t=this.state.outline;if(!e||!t)return null;var r=this.props,n=r.className,o=r.inputRef;return g.a.createElement("div",Object(a.a)({className:C("react-pdf__Outline",n
2),ref:o},this.eventProps),g.a.createElement(ye.Provider,{value:this.childContext},this.renderOutline()))}}]),r}(m.PureComponent);xe.propTypes=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?we(Object(r),!0).forEach((function(t){y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):we(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({className:te,inputRef:ie,onItemClick:_.a.func,onLoadError:_.a.func,onLoadSuccess:_.a.func,pdf:oe},Z);function Pe(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.filter(Boolean);return n.length<=1?n[0]:function(e){n.forEach((function(t){"function"===typeof t?t(e):t.current=e}))}}var Ce=Object(m.createContext)(null);function Te(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=v(e);if(t){var a=v(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return p(this,r)}}var Re=n.AnnotationMode,Ee=function(e){h(r,e);var t=Te(r);function r(){var e;u(this,r);for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return y(f(e=t.call.apply(t,[this].concat(a))),"canvasElement",Object(m.createRef)()),y(f(e),"onRenderSuccess",(function(){e.renderer=null;var t=e.props,r=t.onRenderSuccess,n=t.page,a=t.scale;r&&r(K(n,a))})),y(f(e),"onRenderError",(function(t){if(!Q(t)){Object(R.a)(t);var r=e.props.onRenderError;r&&r(t)}})),y(f(e),"drawPageOnCanvas",(function(){var t=e.canvasElement.current;if(!t)return null;var r=f(e),n=r.renderViewport,a=r.viewport,o=e.props,i=o.canvasBackground,s=o.page,u=o.renderForms;t.width=n.width,t.height=n.height,t.style.width="".concat(Math.floor(a.width),"px"),t.style.height="".concat(Math.floor(a.height),"px");var l={annotationMode:u?Re.ENABLE_FORMS:Re.ENABLE,get canvasContext(){return t.getContext("2d")},viewport:n};return i&&(l.background=i),e.cancelRenderingTask(),e.renderer=s.render(l),e.renderer.promise.then(e.onRenderSuccess).catch(e.onRenderError)})),e}return c(r,[{key:"componentDidMount",value:function(){this.drawPageOnCanvas()}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.canvasBackground,n=t.page,a=t.renderForms;r===e.canvasBackground&&a===e.renderForms||(n.cleanup(),this.drawPageOnCanvas())}},{key:"componentWillUnmount",value:function(){this.cancelRenderingTask();var e=this.canvasElement.current;e&&(e.width=0,e.height=0)}},{key:"cancelRenderingTask",value:function(){this.renderer&&(this.renderer.cancel(),this.renderer=null)}},{key:"renderViewport",get:function(){var e=this.props,t=e.page,r=e.rotate,n=e.scale,a=L&&window.devicePixelRatio||1;return t.getViewport({scale:n*a,rotation:r})}},{key:"viewport",get:function(){var e=this.props,t=e.page,r=e.rotate,n=e.scale;return t.getViewport({scale:n,rotation:r})}},{key:"render",value:function(){var e=this.props.canvasRef;return g.a.createElement("canvas",{className:"react-pdf__Page__canvas",dir:"ltr",ref:Pe(e,this.canvasElement),style:{display:"block",userSelect:"none"}})}}]),r}(m.PureComponent);function Oe(e){return g.a.createElement(Ce.Consumer,null,(function(t){return g.a.createElement(Ee,Object(a.a)({},t,e))}))}function Fe(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=v(e);if(t){var a=v(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return p(this,r)}}Ee.propTypes={canvasBackground:_.a.string,canvasRef:ie,onRenderError:_.a.func,onRenderSuccess:_.a.func,page:ae.isRequired,renderForms:_.a.bool,rotate:ue,scale:_.a.number.isRequired};var Ie=function(e){h(r,e);var t=Fe(r);function r(){var e;u(this,r);for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return y(f(e=t.call.apply(t,[this].concat(o))),"state",{svg:null}),y(f(e),"onRenderSuccess",(function(){e.renderer=null;var t=e.props,r=t.onRenderSuccess,n=t.page,a=t.scale;r&&r(K(n,a))})),y(f(e),"onRenderError",(function(t){if(!Q(t)){Object(R.a)(t);var r=e.props.onRenderError;r&&r(t)}})),y(f(e),"renderSVG",(function(){var t=e.props.page;return e.renderer=t.getOperatorList(),e.renderer.then((function(r){var a=new n.SVGGraphics(t.commonObjs,t.objs);e.renderer=a.getSVG(r,e.viewport).then((function(t){e.setState({svg:t},e.onRenderSuccess)})).catch(e.onRenderError)}
2)).catch(e.onRenderError)})),y(f(e),"drawPageOnContainer",(function(t){var r=e.state.svg;if(t&&r){t.firstElementChild||t.appendChild(r);var n=e.viewport,a=n.width,o=n.height;r.setAttribute("width",a),r.setAttribute("height",o)}})),e}return c(r,[{key:"componentDidMount",value:function(){this.renderSVG()}},{key:"viewport",get:function(){var e=this.props,t=e.page,r=e.rotate,n=e.scale;return t.getViewport({scale:n,rotation:r})}},{key:"render",value:function(){var e=this,t=this.viewport,r=t.width,n=t.height;return g.a.createElement("div",{className:"react-pdf__Page__svg",ref:function(t){return e.drawPageOnContainer(t)},style:{display:"block",backgroundColor:"white",overflow:"hidden",width:r,height:n,userSelect:"none"}})}}]),r}(m.PureComponent);function je(e){return g.a.createElement(Ce.Consumer,null,(function(t){return g.a.createElement(Ie,Object(a.a)({},t,e))}))}function Me(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=v(e);if(t){var a=v(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return p(this,r)}}Ie.propTypes={onRenderError:_.a.func,onRenderSuccess:_.a.func,page:ae.isRequired,rotate:ue,scale:_.a.number.isRequired};var De=function(e){h(r,e);var t=Me(r);function r(){var e;u(this,r);for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return y(f(e=t.call.apply(t,[this].concat(a))),"itemElement",Object(m.createRef)()),y(f(e),"getElementWidth",(function(t){var r=f(e).sideways;return t.getBoundingClientRect()[r?"height":"width"]})),e}return c(r,[{key:"componentDidMount",value:function(){this.alignTextItem()}},{key:"componentDidUpdate",value:function(){this.alignTextItem()}},{key:"unrotatedViewport",get:function(){var e=this.props,t=e.page,r=e.scale;return t.getViewport({scale:r})}},{key:"rotate",get:function(){var e=this.props,t=e.page;return e.rotate-t.rotate}},{key:"sideways",get:function(){return this.rotate%180!==0}},{key:"defaultSideways",get:function(){return this.unrotatedViewport.rotation%180!==0}},{key:"fontSize",get:function(){var e=this.props.transform,t=this.defaultSideways,r=D(e,2),n=r[0],a=r[1];return t?a:n}},{key:"top",get:function(){var e=this.props.transform,t=this.unrotatedViewport,r=this.defaultSideways,n=D(e,6),a=n[2],o=n[3],i=n[4],s=n[5],u=D(t.viewBox,4),l=u[1],c=u[3];return r?i+a+l:c-(s+o)}},{key:"left",get:function(){var e=this.props.transform,t=this.unrotatedViewport,r=this.defaultSideways,n=D(e,6),a=n[4],o=n[5],i=D(t.viewBox,1)[0];return r?o-i:a-i}},{key:"getFontData",value:function(e){var t=this.props.page;return new Promise((function(r){t.commonObjs.get(e,r)}))}},{key:"alignTextItem",value:function(){var e=this,t=this.itemElement.current;if(t){t.style.transform="";var r=this.props,n=r.fontName,a=r.scale,o=r.width;t.style.fontFamily="".concat(n,", sans-serif"),this.getFontData(n).then((function(r){var i=r?r.fallbackName:"sans-serif";t.style.fontFamily="".concat(n,", ").concat(i);var s=o*a,u=e.getElementWidth(t),l="scaleX(".concat(s/u,")"),c=r?r.ascent:0;c&&(l+=" translateY(".concat(100*(1-c),"%)")),t.style.transform=l,t.style.WebkitTransform=l}))}}},{key:"render",value:function(){var e=this.fontSize,t=this.top,r=this.left,n=this.props,a=n.customTextRenderer,o=n.scale,i=n.str;return g.a.createElement("span",{ref:this.itemElement,style:{height:"1em",fontFamily:"sans-serif",fontSize:"".concat(e*o,"px"),position:"absolute",top:"".concat(t*o,"px"),left:"".concat(r*o,"px"),transformOrigin:"left bottom",whiteSpace:"pre",pointerEvents:"all"}},a?a(this.props):i)}}]),r}(m.PureComponent);function Le(e){return g.a.createElement(Ce.Consumer,null,(function(t){return g.a.createElement(De,Object(a.a)({},t,e))}))}function Ne(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=v(e);if(t){var a=v(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return p(this,r)}}
2De.propTypes={customTextRenderer:_.a.func,fontName:_.a.string.isRequired,itemIndex:_.a.number.isRequired,page:ae.isRequired,rotate:ue,scale:_.a.number,str:_.a.string.isRequired,transform:_.a.arrayOf(_.a.number).isRequired,width:_.a.number.isRequired};var qe=function(e){h(r,e);var t=Ne(r);function r(){var e;u(this,r);for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return y(f(e=t.call.apply(t,[this].concat(a))),"state",{textItems:null}),y(f(e),"loadTextItems",(function(){var t=P(e.props.page.getTextContent());e.runningTask=t,t.promise.then((function(t){var r=t.items;e.setState({textItems:r},e.onLoadSuccess)})).catch((function(t){e.onLoadError(t)}))})),y(f(e),"onLoadSuccess",(function(){var t=e.props.onGetTextSuccess,r=e.state.textItems;t&&t(r)})),y(f(e),"onLoadError",(function(t){e.setState({textItems:!1}),Object(R.a)(t);var r=e.props.onGetTextError;r&&r(t)})),e}return c(r,[{key:"componentDidMount",value:function(){var e=this.props.page;Object(T.a)(e,"Attempted to load page text content, but no page was specified."),this.loadTextItems()}},{key:"componentDidUpdate",value:function(e){var t=this.props.page;e.page&&t!==e.page&&this.loadTextItems()}},{key:"componentWillUnmount",value:function(){Y(this.runningTask)}},{key:"unrotatedViewport",get:function(){var e=this.props,t=e.page,r=e.scale;return t.getViewport({scale:r})}},{key:"rotate",get:function(){var e=this.props,t=e.page;return e.rotate-t.rotate}},{key:"renderTextItems",value:function(){var e=this.state.textItems;return e?e.map((function(e,t){return g.a.createElement(Le,Object(a.a)({key:t,itemIndex:t},e))})):null}},{key:"render",value:function(){var e=this.unrotatedViewport,t=this.rotate;return g.a.createElement("div",{className:"react-pdf__Page__textContent",style:{position:"absolute",top:"50%",left:"50%",width:"".concat(e.width,"px"),height:"".concat(e.height,"px"),color:"transparent",transform:"translate(-50%, -50%) rotate(".concat(t,"deg)"),WebkitTransform:"translate(-50%, -50%) rotate(".concat(t,"deg)"),pointerEvents:"none"}},this.renderTextItems())}}]),r}(m.PureComponent);function Be(e){return g.a.createElement(Ce.Consumer,null,(function(t){return g.a.createElement(qe,Object(a.a)({},t,e))}))}function We(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=v(e);if(t){var a=v(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return p(this,r)}}qe.propTypes={onGetTextError:_.a.func,onGetTextSuccess:_.a.func,page:ae.isRequired,rotate:ue,scale:_.a.number};var Ue=function(e){h(r,e);var t=We(r);function r(){var e;u(this,r);for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return y(f(e=t.call.apply(t,[this].concat(a))),"state",{annotations:null}),y(f(e),"layerElement",Object(m.createRef)()),y(f(e),"loadAnnotations",(function(){var t=P(e.props.page.getAnnotations());e.runningTask=t,t.promise.then((function(t){e.setState({annotations:t},e.onLoadSuccess)})).catch((function(t){e.onLoadError(t)}))})),y(f(e),"onLoadSuccess",(function(){var t=e.props.onGetAnnotationsSuccess,r=e.state.annotations;t&&t(r)})),y(f(e),"onLoadError",(function(t){e.setState({annotations:!1}),Object(R.a)(t);var r=e.props.onGetAnnotationsError;r&&r(t)})),y(f(e),"onRenderSuccess",(function(){var t=e.props.onRenderAnnotationLayerSuccess;t&&t()})),y(f(e),"onRenderError",(function(t){Object(R.a)(t);var r=e.props.onRenderAnnotationLayerError;r&&r(t)})),e}return c(r,[{key:"componentDidMount",value:function(){var e=this.props.page;Object(T.a)(e,"Attempted to load page annotations, but no page was specified."),this.loadAnnotations()}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.page,n=t.renderForms;(e.page&&r!==e.page||n!==e.renderForms)&&this.loadAnnotations()}},{key:"componentWillUnmount",value:function(){Y(this.runningTask)}},{key:"viewport",get:function(){var e=this.props,t=e.page,r=e.rotate,n=e.scale;return t.getViewport({scale:n,rotation:r})}},{key:"renderAnnotationLayer",value:function(){var e=this.state.annotations;if(e){var t=this.props,r=t.imageResourcesPath,a=t.linkService,o=t.page,i=t.renderForms,s=this.viewport.clone({dontFlip:!0}),u={annotations:e,div:this.layerElement.current,imageResourcesPath:r,linkService:a,page:o,renderForms:i,viewport:s};this.layerElement.current.innerHTML="";try{n.AnnotationLayer.render(u),this.onRenderSuccess()}catch(l){this.onRenderError(l)}}}}
2,{key:"render",value:function(){return g.a.createElement("div",{className:"react-pdf__Page__annotations annotationLayer",ref:this.layerElement},this.renderAnnotationLayer())}}]),r}(m.PureComponent);Ue.propTypes={imageResourcesPath:_.a.string,linkService:ne.isRequired,onGetAnnotationsError:_.a.func,onGetAnnotationsSuccess:_.a.func,onRenderAnnotationLayerError:_.a.func,onRenderAnnotationLayerSuccess:_.a.func,page:ae,renderForms:_.a.bool,rotate:ue,scale:_.a.number};var Ge=function(e){return g.a.createElement(E.Consumer,null,(function(t){return g.a.createElement(Ce.Consumer,null,(function(r){return g.a.createElement(Ue,Object(a.a)({},t,r,e))}))}))};function ze(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function He(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(r),!0).forEach((function(t){y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ze(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ve(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=v(e);if(t){var a=v(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return p(this,r)}}var Xe=function(e){h(r,e);var t=Ve(r);function r(){var e;u(this,r);for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return y(f(e=t.call.apply(t,[this].concat(a))),"state",{page:null}),y(f(e),"pageElement",Object(m.createRef)()),y(f(e),"onLoadSuccess",(function(){var t=e.props,r=t.onLoadSuccess,n=t.registerPage,a=e.state.page;r&&r(K(a,e.scale)),n&&n(e.pageIndex,e.pageElement.current)})),y(f(e),"onLoadError",(function(t){e.setState({page:!1}),Object(R.a)(t);var r=e.props.onLoadError;r&&r(t)})),y(f(e),"loadPage",(function(){var t=e.props.pdf,r=e.getPageNumber();if(r){e.setState((function(e){return e.page?{page:null}:null}));var n=P(t.getPage(r));e.runningTask=n,n.promise.then((function(t){e.setState({page:t},e.onLoadSuccess)})).catch((function(t){e.onLoadError(t)}))}})),e}return c(r,[{key:"componentDidMount",value:function(){var e=this.props.pdf;Object(T.a)(e,"Attempted to load a page, but no document was specified."),this.loadPage()}},{key:"componentDidUpdate",value:function(e){var t=this.props.pdf;if(e.pdf&&t!==e.pdf||this.getPageNumber()!==this.getPageNumber(e)){var r=this.props.unregisterPage;r&&r(this.getPageIndex(e)),this.loadPage()}}},{key:"componentWillUnmount",value:function(){var e=this.props.unregisterPage;e&&e(this.pageIndex),Y(this.runningTask)}},{key:"childContext",get:function(){var e=this.state.page;if(!e)return{};var t=this.props,r=t.canvasBackground,n=t.customTextRenderer,a=t.onGetAnnotationsError,o=t.onGetAnnotationsSuccess,i=t.onGetTextError,s=t.onGetTextSuccess,u=t.onRenderAnnotationLayerError,l=t.onRenderAnnotationLayerSuccess,c=t.onRenderError,f=t.onRenderSuccess,d=t.renderForms,h=t.renderInteractiveForms;return{canvasBackground:r,customTextRenderer:n,onGetAnnotationsError:a,onGetAnnotationsSuccess:o,onGetTextError:i,onGetTextSuccess:s,onRenderAnnotationLayerError:u,onRenderAnnotationLayerSuccess:l,onRenderError:c,onRenderSuccess:f,page:e,renderForms:null!==d&&void 0!==d?d:h,rotate:this.rotate,scale:this.scale}}},{key:"getPageIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return B(e.pageNumber)?e.pageNumber-1:B(e.pageIndex)?e.pageIndex:null}},{key:"getPageNumber",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return B(e.pageNumber)?e.pageNumber:B(e.pageIndex)?e.pageIndex+1:null}},{key:"pageIndex",get:function(){return this.getPageIndex()}},{key:"pageNumber",get:function(){return this.getPageNumber()}},{key:"rotate",get:function(){var e=this.props.rotate;if(B(e))return e;var t=this.state.page;return t?t.rotate:null}},{key:"scale",get:function(){var e=this.state.page;if(!e)return null;var t=this.props,r=t.scale,n=t.width,a=t.height,o=this.rotate,i=1,s=null===r?1:r;if(n||a){var u=e.getViewport({scale:1,rotation:o});i=n?n/u.width:a/u.height}return s*i}},{key:"eventProps",get:function(){var e=this;return x(this.props,(function(){var t=e.state.page;return t?K(t,e.scale):t}))}},{key:"pageKey",get:function(){var e=this.state.page;return"".concat(e.pageIndex,"@").concat(this.scale,"/").concat(this.rotate)}},{key:"pageKeyNoScale",get:function(){var e=this.state.page;return"".concat(e.pageIndex,"/").concat(this.rotate)}},{key:"renderMainLayer",value:function(){var e=this.props,t=e.canvasRef;switch(e.renderMode){case"none":return null;
2case"svg":return g.a.createElement(je,{key:"".concat(this.pageKeyNoScale,"_svg")});default:return g.a.createElement(Oe,{key:"".concat(this.pageKey,"_canvas"),canvasRef:t})}}},{key:"renderTextLayer",value:function(){var e=this.props.renderTextLayer;return e?g.a.createElement(Be,{key:"".concat(this.pageKey,"_text")}):null}},{key:"renderAnnotationLayer",value:function(){var e=this.props.renderAnnotationLayer;return e?g.a.createElement(Ge,{key:"".concat(this.pageKey,"_annotations")}):null}},{key:"renderChildren",value:function(){var e=this.props.children;return g.a.createElement(Ce.Provider,{value:this.childContext},this.renderMainLayer(),this.renderTextLayer(),this.renderAnnotationLayer(),e)}},{key:"renderContent",value:function(){var e=this.pageNumber,t=this.props.pdf,r=this.state.page;if(!e){var n=this.props.noData;return g.a.createElement(O,{type:"no-data"},"function"===typeof n?n():n)}if(null===t||null===r){var a=this.props.loading;return g.a.createElement(O,{type:"loading"},"function"===typeof a?a():a)}if(!1===t||!1===r){var o=this.props.error;return g.a.createElement(O,{type:"error"},"function"===typeof o?o():o)}return this.renderChildren()}},{key:"render",value:function(){var e=this.pageNumber,t=this.props,r=t.className,n=t.inputRef;return g.a.createElement("div",Object(a.a)({className:C("react-pdf__Page",r),"data-page-number":e,ref:Pe(n,this.pageElement),style:{position:"relative"}},this.eventProps),this.renderContent())}}]),r}(m.PureComponent);Xe.defaultProps={error:"Failed to load the page.",loading:"Loading page\u2026",noData:"No page specified.",renderAnnotationLayer:!0,renderForms:!1,renderMode:"canvas",renderTextLayer:!0,scale:1};var Ye=_.a.oneOfType([_.a.func,_.a.node]);function Ke(e,t){return g.a.createElement(E.Consumer,null,(function(r){return g.a.createElement(Xe,Object(a.a)({ref:t},r,e))}))}Xe.propTypes=He(He({},Z),{},{canvasBackground:_.a.string,children:_.a.node,className:te,customTextRenderer:_.a.func,error:Ye,height:_.a.number,imageResourcesPath:_.a.string,inputRef:ie,loading:Ye,noData:Ye,onGetTextError:_.a.func,onGetTextSuccess:_.a.func,onLoadError:_.a.func,onLoadSuccess:_.a.func,onRenderError:_.a.func,onRenderSuccess:_.a.func,pageIndex:function(e,t,r){var n=e[t],a=e.pageNumber,o=e.pdf;if(!q(o))return null;if(q(n)){if("number"!==typeof n)return new Error("`".concat(t,"` of type `").concat(s(n),"` supplied to `").concat(r,"`, expected `number`."));if(n<0)return new Error("Expected `".concat(t,"` to be greater or equal to 0."));var i=o.numPages;if(n+1>i)return new Error("Expected `".concat(t,"` to be less or equal to ").concat(i-1,"."))}else if(!q(a))return new Error("`".concat(t,"` not supplied. Either pageIndex or pageNumber must be supplied to `").concat(r,"`."));return null},pageNumber:function(e,t,r){var n=e[t],a=e.pageIndex,o=e.pdf;if(!q(o))return null;if(q(n)){if("number"!==typeof n)return new Error("`".concat(t,"` of type `").concat(s(n),"` supplied to `").concat(r,"`, expected `number`."));if(n<1)return new Error("Expected `".concat(t,"` to be greater or equal to 1."));var i=o.numPages;if(n>i)return new Error("Expected `".concat(t,"` to be less or equal to ").concat(i,"."))}else if(!q(a))return new Error("`".concat(t,"` not supplied. Either pageIndex or pageNumber must be supplied to `").concat(r,"`."));return null},pdf:oe,registerPage:_.a.func,renderAnnotationLayer:_.a.bool,renderForms:_.a.bool,renderInteractiveForms:_.a.bool,renderMode:se,renderTextLayer:_.a.bool,rotate:ue,scale:_.a.number,unregisterPage:_.a.func,width:_.a.number});var Qe=g.a.forwardRef(Ke);Object(R.a)(!N,"Loading PDF.js worker may not work on protocols other than HTTP/HTTPS. ".concat(V)),n.GlobalWorkerOptions.workerSrc="pdf.worker.js"},319:function(e,t,r){"use strict";t.a=function(e,t){}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.