filesbox/web/dist/pdfjs/build/pdf.js
2024-07-26 14:10:54 +08:00

37 lines
422 KiB
JavaScript

(function(a,t){typeof exports=="object"&&typeof module=="object"?module.exports=t():typeof define=="function"&&define.amd?define("pdfjs-dist/build/pdf",[],t):typeof exports=="object"?exports["pdfjs-dist/build/pdf"]=t():a["pdfjs-dist/build/pdf"]=a.pdfjsLib=t()})(this,function(){return(()=>{var __webpack_modules__=[,(y,a,t)=>{"use strict";function r(S){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?r=function(s){return typeof s}:r=function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},r(S)}Object.defineProperty(a,"__esModule",{value:!0}),a.StatTimer=a.RenderingCancelledException=a.PixelsPerInch=a.PageViewport=a.PDFDateString=a.LinkTarget=a.DOMStandardFontDataFactory=a.DOMSVGFactory=a.DOMCanvasFactory=a.DOMCMapReaderFactory=void 0,a.addLinkAttributes=q,a.deprecated=be,a.getFilenameFromUrl=A,a.getPdfFilenameFromUrl=E,a.getXfaPageViewport=Me,a.isDataScheme=R,a.isPdfFile=h,a.isValidFetchUrl=te,a.loadScript=Y;var i=_(t(2)),f=t(4),m=t(135);function _(S){return S&&S.__esModule?S:{default:S}}function D(S,w){var s=typeof Symbol!="undefined"&&S[Symbol.iterator]||S["@@iterator"];if(!s){if(Array.isArray(S)||(s=L(S))||w&&S&&typeof S.length=="number"){s&&(S=s);var o=0,k=function(){};return{s:k,n:function(){return o>=S.length?{done:!0}:{done:!1,value:S[o++]}},e:function(ve){throw ve},f:k}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var N=!0,W=!1,re;return{s:function(){s=s.call(S)},n:function(){var ve=s.next();return N=ve.done,ve},e:function(ve){W=!0,re=ve},f:function(){try{!N&&s.return!=null&&s.return()}finally{if(W)throw re}}}}function L(S,w){if(!!S){if(typeof S=="string")return $(S,w);var s=Object.prototype.toString.call(S).slice(8,-1);if(s==="Object"&&S.constructor&&(s=S.constructor.name),s==="Map"||s==="Set")return Array.from(S);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return $(S,w)}}function $(S,w){(w==null||w>S.length)&&(w=S.length);for(var s=0,o=new Array(w);s<w;s++)o[s]=S[s];return o}function j(S,w,s,o,k,N,W){try{var re=S[N](W),fe=re.value}catch(ve){s(ve);return}re.done?w(fe):Promise.resolve(fe).then(o,k)}function V(S){return function(){var w=this,s=arguments;return new Promise(function(o,k){var N=S.apply(w,s);function W(fe){j(N,o,k,W,re,"next",fe)}function re(fe){j(N,o,k,W,re,"throw",fe)}W(void 0)})}}function O(S,w){if(!(S instanceof w))throw new TypeError("Cannot call a class as a function")}function P(S,w){for(var s=0;s<w.length;s++){var o=w[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(S,o.key,o)}}function F(S,w,s){return w&&P(S.prototype,w),s&&P(S,s),S}function x(S,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");S.prototype=Object.create(w&&w.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),w&&I(S,w)}function I(S,w){return I=Object.setPrototypeOf||function(o,k){return o.__proto__=k,o},I(S,w)}function g(S){var w=l();return function(){var o=u(S),k;if(w){var N=u(this).constructor;k=Reflect.construct(o,arguments,N)}else k=o.apply(this,arguments);return B(this,k)}}function B(S,w){if(w&&(r(w)==="object"||typeof w=="function"))return w;if(w!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return p(S)}function p(S){if(S===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S}function l(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(S){return!1}}function u(S){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},u(S)}var v="noopener noreferrer nofollow",d="http://www.w3.org/2000/svg",c={CSS:96,PDF:72,get PDF_TO_CSS_UNITS(){return(0,f.shadow)(this,"PDF_TO_CSS_UNITS",this.CSS/this.PDF)}};a.PixelsPerInch=c;var b=function(S){x(s,S);var w=g(s);function s(){var o,k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},N=k.ownerDocument,W=N===void 0?globalThis.document:N;return O(this,s),o=w.call(this),o._document=W,o}return F(s,[{key:"_createCanvas",value:function(k,N){var W=this._document.createElement("canvas");return W.width=k,W.height=N,W}}]),s}(m.BaseCanvasFactory);a.DOMCanvasFactory=b;function T(S){return U.apply(this,arguments)}function U(){return U=V(i.default.mark(function S(w){var s,o,k=arguments;return i.default.wrap(function(W){for(;;)switch(W.prev=W.next){case 0:if(s=k.length>1&&k[1]!==void 0?k[1]:!1,!te(w,document.baseURI)){W.next=21;break}return W.next=4,fetch(w);case 4:if(o=W.sent,o.ok){W.next=7;break}throw new Error(o.statusText);case 7:if(!s){W.next=15;break}return W.t1=Uint8Array,W.next=11,o.arrayBuffer();case 11:W.t2=W.sent,W.t0=new W.t1(W.t2),W.next=20;break;case 15:return W.t3=f.stringToBytes,W.next=18,o.text();case 18:W.t4=W.sent,W.t0=(0,W.t3)(W.t4);case 20:return W.abrupt("return",W.t0);case 21:return W.abrupt("return",new Promise(function(re,fe){var ve=new XMLHttpRequest;ve.open("GET",w,!0),s&&(ve.responseType="arraybuffer"),ve.onreadystatechange=function(){if(ve.readyState===XMLHttpRequest.DONE){if(ve.status===200||ve.status===0){var me;if(s&&ve.response?me=new Uint8Array(ve.response):!s&&ve.responseText&&(me=(0,f.stringToBytes)(ve.responseText)),me){re(me);return}}fe(new Error(ve.statusText))}},ve.send(null)}));case 22:case"end":return W.stop()}},S)})),U.apply(this,arguments)}var M=function(S){x(s,S);var w=g(s);function s(){return O(this,s),w.apply(this,arguments)}return F(s,[{key:"_fetchData",value:function(k,N){return T(k,this.isCompressed).then(function(W){return{cMapData:W,compressionType:N}})}}]),s}(m.BaseCMapReaderFactory);a.DOMCMapReaderFactory=M;var G=function(S){x(s,S);var w=g(s);function s(){return O(this,s),w.apply(this,arguments)}return F(s,[{key:"_fetchData",value:function(k){return T(k,!0)}}]),s}(m.BaseStandardFontDataFactory);a.DOMStandardFontDataFactory=G;var Z=function(S){x(s,S);var w=g(s);function s(){return O(this,s),w.apply(this,arguments)}return F(s,[{key:"_createSVG",value:function(k){return document.createElementNS(d,k)}}]),s}(m.BaseSVGFactory);a.DOMSVGFactory=Z;var J=function(){function S(w){var s=w.viewBox,o=w.scale,k=w.rotation,N=w.offsetX,W=N===void 0?0:N,re=w.offsetY,fe=re===void 0?0:re,ve=w.dontFlip,me=ve===void 0?!1:ve;O(this,S),this.viewBox=s,this.scale=o,this.rotation=k,this.offsetX=W,this.offsetY=fe;var pe=(s[2]+s[0])/2,Ae=(s[3]+s[1])/2,Pe,_e,We,Le;switch(k%=360,k<0&&(k+=360),k){case 180:Pe=-1,_e=0,We=0,Le=1;break;case 90:Pe=0,_e=1,We=1,Le=0;break;case 270:Pe=0,_e=-1,We=-1,Le=0;break;case 0:Pe=1,_e=0,We=0,Le=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}me&&(We=-We,Le=-Le);var je,le,he,z;Pe===0?(je=Math.abs(Ae-s[1])*o+W,le=Math.abs(pe-s[0])*o+fe,he=Math.abs(s[3]-s[1])*o,z=Math.abs(s[2]-s[0])*o):(je=Math.abs(pe-s[0])*o+W,le=Math.abs(Ae-s[1])*o+fe,he=Math.abs(s[2]-s[0])*o,z=Math.abs(s[3]-s[1])*o),this.transform=[Pe*o,_e*o,We*o,Le*o,je-Pe*o*pe-We*o*Ae,le-_e*o*pe-Le*o*Ae],this.width=he,this.height=z}return F(S,[{key:"clone",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=s.scale,k=o===void 0?this.scale:o,N=s.rotation,W=N===void 0?this.rotation:N,re=s.offsetX,fe=re===void 0?this.offsetX:re,ve=s.offsetY,me=ve===void 0?this.offsetY:ve,pe=s.dontFlip,Ae=pe===void 0?!1:pe;return new S({viewBox:this.viewBox.slice(),scale:k,rotation:W,offsetX:fe,offsetY:me,dontFlip:Ae})}},{key:"convertToViewportPoint",value:function(s,o){return f.Util.applyTransform([s,o],this.transform)}},{key:"convertToViewportRectangle",value:function(s){var o=f.Util.applyTransform([s[0],s[1]],this.transform),k=f.Util.applyTransform([s[2],s[3]],this.transform);return[o[0],o[1],k[0],k[1]]}},{key:"convertToPdfPoint",value:function(s,o){return f.Util.applyInverseTransform([s,o],this.transform)}}]),S}();a.PageViewport=J;var ie=function(S){x(s,S);var w=g(s);function s(o,k){var N;return O(this,s),N=w.call(this,o,"RenderingCancelledException"),N.type=k,N}return s}(f.BaseException);a.RenderingCancelledException=ie;var H={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};a.LinkTarget=H;function q(S){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=w.url,o=w.target,k=w.rel,N=w.enabled,W=N===void 0?!0:N;(0,f.assert)(s&&typeof s=="string",'addLinkAttributes: A valid "url" parameter must provided.');var re=(0,f.removeNullCharacters)(s);W?S.href=S.title=re:(S.href="",S.title="Disabled: ".concat(re),S.onclick=function(){return!1});var fe="";switch(o){case H.NONE:break;case H.SELF:fe="_self";break;case H.BLANK:fe="_blank";break;case H.PARENT:fe="_parent";break;case H.TOP:fe="_top";break}S.target=fe,S.rel=typeof k=="string"?k:v}function R(S){for(var w=S.length,s=0;s<w&&S[s].trim()==="";)s++;return S.substring(s,s+5).toLowerCase()==="data:"}function h(S){return typeof S=="string"&&/\.pdf$/i.test(S)}function A(S){var w=S.indexOf("#"),s=S.indexOf("?"),o=Math.min(w>0?w:S.length,s>0?s:S.length);return S.substring(S.lastIndexOf("/",o)+1,o)}function E(S){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"document.pdf";if(typeof S!="string")return w;if(R(S))return(0,f.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),w;var s=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,o=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,k=s.exec(S),N=o.exec(k[1])||o.exec(k[2])||o.exec(k[3]);if(N&&(N=N[0],N.includes("%")))try{N=o.exec(decodeURIComponent(N))[0]}catch(W){}return N||w}var K=function(){function S(){O(this,S),this.started=Object.create(null),this.times=[]}return F(S,[{key:"time",value:function(s){s in this.started&&(0,f.warn)("Timer is already running for ".concat(s)),this.started[s]=Date.now()}},{key:"timeEnd",value:function(s){s in this.started||(0,f.warn)("Timer has not been started for ".concat(s)),this.times.push({name:s,start:this.started[s],end:Date.now()}),delete this.started[s]}},{key:"toString",value:function(){var s=[],o=0,k=D(this.times),N;try{for(k.s();!(N=k.n()).done;){var W=N.value,re=W.name;re.length>o&&(o=re.length)}}catch(Ae){k.e(Ae)}finally{k.f()}var fe=D(this.times),ve;try{for(fe.s();!(ve=fe.n()).done;){var me=ve.value,pe=me.end-me.start;s.push("".concat(me.name.padEnd(o)," ").concat(pe,`ms
`))}}catch(Ae){fe.e(Ae)}finally{fe.f()}return s.join("")}}]),S}();a.StatTimer=K;function te(S,w){try{var s=w?new URL(S,w):new URL(S),o=s.protocol;return o==="http:"||o==="https:"}catch(k){return!1}}function Y(S){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return new Promise(function(s,o){var k=document.createElement("script");k.src=S,k.onload=function(N){w&&k.remove(),s(N)},k.onerror=function(){o(new Error("Cannot load script at: ".concat(k.src)))},(document.head||document.documentElement).appendChild(k)})}function be(S){console.log("Deprecated API usage: "+S)}var Ce,we=function(){function S(){O(this,S)}return F(S,null,[{key:"toDateObject",value:function(s){if(!s||!(0,f.isString)(s))return null;Ce||(Ce=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var o=Ce.exec(s);if(!o)return null;var k=parseInt(o[1],10),N=parseInt(o[2],10);N=N>=1&&N<=12?N-1:0;var W=parseInt(o[3],10);W=W>=1&&W<=31?W:1;var re=parseInt(o[4],10);re=re>=0&&re<=23?re:0;var fe=parseInt(o[5],10);fe=fe>=0&&fe<=59?fe:0;var ve=parseInt(o[6],10);ve=ve>=0&&ve<=59?ve:0;var me=o[7]||"Z",pe=parseInt(o[8],10);pe=pe>=0&&pe<=23?pe:0;var Ae=parseInt(o[9],10)||0;return Ae=Ae>=0&&Ae<=59?Ae:0,me==="-"?(re+=pe,fe+=Ae):me==="+"&&(re-=pe,fe-=Ae),new Date(Date.UTC(k,N,W,re,fe,ve))}}]),S}();a.PDFDateString=we;function Me(S,w){var s=w.scale,o=s===void 0?1:s,k=w.rotation,N=k===void 0?0:k,W=S.attributes.style,re=W.width,fe=W.height,ve=[0,0,parseInt(re),parseInt(fe)];return new J({viewBox:ve,scale:o,rotation:N})}},(y,a,t)=>{"use strict";y.exports=t(3)},(y,a,t)=>{"use strict";y=t.nmd(y);function r(f){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?r=function(_){return typeof _}:r=function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},r(f)}var i=function(f){"use strict";var m=Object.prototype,_=m.hasOwnProperty,D,L=typeof Symbol=="function"?Symbol:{},$=L.iterator||"@@iterator",j=L.asyncIterator||"@@asyncIterator",V=L.toStringTag||"@@toStringTag";function O(h,A,E){return Object.defineProperty(h,A,{value:E,enumerable:!0,configurable:!0,writable:!0}),h[A]}try{O({},"")}catch(h){O=function(E,K,te){return E[K]=te}}function P(h,A,E,K){var te=A&&A.prototype instanceof l?A:l,Y=Object.create(te.prototype),be=new H(K||[]);return Y._invoke=G(h,E,be),Y}f.wrap=P;function F(h,A,E){try{return{type:"normal",arg:h.call(A,E)}}catch(K){return{type:"throw",arg:K}}}var x="suspendedStart",I="suspendedYield",g="executing",B="completed",p={};function l(){}function u(){}function v(){}var d={};O(d,$,function(){return this});var c=Object.getPrototypeOf,b=c&&c(c(q([])));b&&b!==m&&_.call(b,$)&&(d=b);var T=v.prototype=l.prototype=Object.create(d);u.prototype=v,O(T,"constructor",v),O(v,"constructor",u),u.displayName=O(v,V,"GeneratorFunction");function U(h){["next","throw","return"].forEach(function(A){O(h,A,function(E){return this._invoke(A,E)})})}f.isGeneratorFunction=function(h){var A=typeof h=="function"&&h.constructor;return A?A===u||(A.displayName||A.name)==="GeneratorFunction":!1},f.mark=function(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,v):(h.__proto__=v,O(h,V,"GeneratorFunction")),h.prototype=Object.create(T),h},f.awrap=function(h){return{__await:h}};function M(h,A){function E(Y,be,Ce,we){var Me=F(h[Y],h,be);if(Me.type==="throw")we(Me.arg);else{var S=Me.arg,w=S.value;return w&&r(w)==="object"&&_.call(w,"__await")?A.resolve(w.__await).then(function(s){E("next",s,Ce,we)},function(s){E("throw",s,Ce,we)}):A.resolve(w).then(function(s){S.value=s,Ce(S)},function(s){return E("throw",s,Ce,we)})}}var K;function te(Y,be){function Ce(){return new A(function(we,Me){E(Y,be,we,Me)})}return K=K?K.then(Ce,Ce):Ce()}this._invoke=te}U(M.prototype),O(M.prototype,j,function(){return this}),f.AsyncIterator=M,f.async=function(h,A,E,K,te){te===void 0&&(te=Promise);var Y=new M(P(h,A,E,K),te);return f.isGeneratorFunction(A)?Y:Y.next().then(function(be){return be.done?be.value:Y.next()})};function G(h,A,E){var K=x;return function(Y,be){if(K===g)throw new Error("Generator is already running");if(K===B){if(Y==="throw")throw be;return R()}for(E.method=Y,E.arg=be;;){var Ce=E.delegate;if(Ce){var we=Z(Ce,E);if(we){if(we===p)continue;return we}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(K===x)throw K=B,E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);K=g;var Me=F(h,A,E);if(Me.type==="normal"){if(K=E.done?B:I,Me.arg===p)continue;return{value:Me.arg,done:E.done}}else Me.type==="throw"&&(K=B,E.method="throw",E.arg=Me.arg)}}}function Z(h,A){var E=h.iterator[A.method];if(E===D){if(A.delegate=null,A.method==="throw"){if(h.iterator.return&&(A.method="return",A.arg=D,Z(h,A),A.method==="throw"))return p;A.method="throw",A.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var K=F(E,h.iterator,A.arg);if(K.type==="throw")return A.method="throw",A.arg=K.arg,A.delegate=null,p;var te=K.arg;if(!te)return A.method="throw",A.arg=new TypeError("iterator result is not an object"),A.delegate=null,p;if(te.done)A[h.resultName]=te.value,A.next=h.nextLoc,A.method!=="return"&&(A.method="next",A.arg=D);else return te;return A.delegate=null,p}U(T),O(T,V,"Generator"),O(T,$,function(){return this}),O(T,"toString",function(){return"[object Generator]"});function J(h){var A={tryLoc:h[0]};1 in h&&(A.catchLoc=h[1]),2 in h&&(A.finallyLoc=h[2],A.afterLoc=h[3]),this.tryEntries.push(A)}function ie(h){var A=h.completion||{};A.type="normal",delete A.arg,h.completion=A}function H(h){this.tryEntries=[{tryLoc:"root"}],h.forEach(J,this),this.reset(!0)}f.keys=function(h){var A=[];for(var E in h)A.push(E);return A.reverse(),function K(){for(;A.length;){var te=A.pop();if(te in h)return K.value=te,K.done=!1,K}return K.done=!0,K}};function q(h){if(h){var A=h[$];if(A)return A.call(h);if(typeof h.next=="function")return h;if(!isNaN(h.length)){var E=-1,K=function te(){for(;++E<h.length;)if(_.call(h,E))return te.value=h[E],te.done=!1,te;return te.value=D,te.done=!0,te};return K.next=K}}return{next:R}}f.values=q;function R(){return{value:D,done:!0}}return H.prototype={constructor:H,reset:function(A){if(this.prev=0,this.next=0,this.sent=this._sent=D,this.done=!1,this.delegate=null,this.method="next",this.arg=D,this.tryEntries.forEach(ie),!A)for(var E in this)E.charAt(0)==="t"&&_.call(this,E)&&!isNaN(+E.slice(1))&&(this[E]=D)},stop:function(){this.done=!0;var A=this.tryEntries[0],E=A.completion;if(E.type==="throw")throw E.arg;return this.rval},dispatchException:function(A){if(this.done)throw A;var E=this;function K(Me,S){return be.type="throw",be.arg=A,E.next=Me,S&&(E.method="next",E.arg=D),!!S}for(var te=this.tryEntries.length-1;te>=0;--te){var Y=this.tryEntries[te],be=Y.completion;if(Y.tryLoc==="root")return K("end");if(Y.tryLoc<=this.prev){var Ce=_.call(Y,"catchLoc"),we=_.call(Y,"finallyLoc");if(Ce&&we){if(this.prev<Y.catchLoc)return K(Y.catchLoc,!0);if(this.prev<Y.finallyLoc)return K(Y.finallyLoc)}else if(Ce){if(this.prev<Y.catchLoc)return K(Y.catchLoc,!0)}else if(we){if(this.prev<Y.finallyLoc)return K(Y.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(A,E){for(var K=this.tryEntries.length-1;K>=0;--K){var te=this.tryEntries[K];if(te.tryLoc<=this.prev&&_.call(te,"finallyLoc")&&this.prev<te.finallyLoc){var Y=te;break}}Y&&(A==="break"||A==="continue")&&Y.tryLoc<=E&&E<=Y.finallyLoc&&(Y=null);var be=Y?Y.completion:{};return be.type=A,be.arg=E,Y?(this.method="next",this.next=Y.finallyLoc,p):this.complete(be)},complete:function(A,E){if(A.type==="throw")throw A.arg;return A.type==="break"||A.type==="continue"?this.next=A.arg:A.type==="return"?(this.rval=this.arg=A.arg,this.method="return",this.next="end"):A.type==="normal"&&E&&(this.next=E),p},finish:function(A){for(var E=this.tryEntries.length-1;E>=0;--E){var K=this.tryEntries[E];if(K.finallyLoc===A)return this.complete(K.completion,K.afterLoc),ie(K),p}},catch:function(A){for(var E=this.tryEntries.length-1;E>=0;--E){var K=this.tryEntries[E];if(K.tryLoc===A){var te=K.completion;if(te.type==="throw"){var Y=te.arg;ie(K)}return Y}}throw new Error("illegal catch attempt")},delegateYield:function(A,E,K){return this.delegate={iterator:q(A),resultName:E,nextLoc:K},this.method==="next"&&(this.arg=D),p}},f}(r(y)==="object"?y.exports:{});try{regeneratorRuntime=i}catch(f){(typeof globalThis=="undefined"?"undefined":r(globalThis))==="object"?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.VerbosityLevel=a.Util=a.UnknownErrorException=a.UnexpectedResponseException=a.UNSUPPORTED_FEATURES=a.TextRenderingMode=a.StreamType=a.RenderingIntentFlag=a.PermissionFlag=a.PasswordResponses=a.PasswordException=a.PageActionEventType=a.OPS=a.MissingPDFException=a.IsLittleEndianCached=a.IsEvalSupportedCached=a.InvalidPDFException=a.ImageKind=a.IDENTITY_MATRIX=a.FormatError=a.FontType=a.FONT_IDENTITY_MATRIX=a.DocumentActionEventType=a.CMapCompressionType=a.BaseException=a.AnnotationType=a.AnnotationStateModelType=a.AnnotationReviewState=a.AnnotationReplyType=a.AnnotationMode=a.AnnotationMarkedState=a.AnnotationFlag=a.AnnotationFieldFlag=a.AnnotationBorderStyleType=a.AnnotationActionEventType=a.AbortException=void 0,a.arrayByteLength=ce,a.arraysToBytes=Se,a.assert=ve,a.bytesToString=Q,a.createObjectURL=wt,a.createPromiseCapability=At,a.createValidAbsoluteUrl=Ae,a.escapeString=Ze,a.getModificationDate=Yt,a.getVerbosityLevel=N,a.info=W,a.isArrayBuffer=xt,a.isArrayEqual=Ft,a.isAscii=rt,a.isBool=Pt,a.isNum=Xt,a.isSameOrigin=me,a.isString=Ot,a.objectFromMap=De,a.objectSize=Fe,a.removeNullCharacters=ne,a.setVerbosityLevel=k,a.shadow=Pe,a.string32=Ee,a.stringToBytes=de,a.stringToPDFString=Ye,a.stringToUTF16BEString=it,a.stringToUTF8String=yt,a.unreachable=fe,a.utf8StringToString=ht,a.warn=re,t(5);function r(ue,ke){for(var se=0;se<ke.length;se++){var ye=ke[se];ye.enumerable=ye.enumerable||!1,ye.configurable=!0,"value"in ye&&(ye.writable=!0),Object.defineProperty(ue,ye.key,ye)}}function i(ue,ke,se){return ke&&r(ue.prototype,ke),se&&r(ue,se),ue}function f(ue){return D(ue)||_(ue)||P(ue)||m()}function m(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _(ue){if(typeof Symbol!="undefined"&&ue[Symbol.iterator]!=null||ue["@@iterator"]!=null)return Array.from(ue)}function D(ue){if(Array.isArray(ue))return F(ue)}function L(ue,ke){return V(ue)||j(ue,ke)||P(ue,ke)||$()}function $(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j(ue,ke){var se=ue==null?null:typeof Symbol!="undefined"&&ue[Symbol.iterator]||ue["@@iterator"];if(se!=null){var ye=[],Ge=!0,ze=!1,$e,qe;try{for(se=se.call(ue);!(Ge=($e=se.next()).done)&&(ye.push($e.value),!(ke&&ye.length===ke));Ge=!0);}catch(nt){ze=!0,qe=nt}finally{try{!Ge&&se.return!=null&&se.return()}finally{if(ze)throw qe}}return ye}}function V(ue){if(Array.isArray(ue))return ue}function O(ue,ke){var se=typeof Symbol!="undefined"&&ue[Symbol.iterator]||ue["@@iterator"];if(!se){if(Array.isArray(ue)||(se=P(ue))||ke&&ue&&typeof ue.length=="number"){se&&(ue=se);var ye=0,Ge=function(){};return{s:Ge,n:function(){return ye>=ue.length?{done:!0}:{done:!1,value:ue[ye++]}},e:function(ot){throw ot},f:Ge}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ze=!0,$e=!1,qe;return{s:function(){se=se.call(ue)},n:function(){var ot=se.next();return ze=ot.done,ot},e:function(ot){$e=!0,qe=ot},f:function(){try{!ze&&se.return!=null&&se.return()}finally{if($e)throw qe}}}}function P(ue,ke){if(!!ue){if(typeof ue=="string")return F(ue,ke);var se=Object.prototype.toString.call(ue).slice(8,-1);if(se==="Object"&&ue.constructor&&(se=ue.constructor.name),se==="Map"||se==="Set")return Array.from(ue);if(se==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(se))return F(ue,ke)}}function F(ue,ke){(ke==null||ke>ue.length)&&(ke=ue.length);for(var se=0,ye=new Array(ke);se<ke;se++)ye[se]=ue[se];return ye}function x(ue){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?x=function(se){return typeof se}:x=function(se){return se&&typeof Symbol=="function"&&se.constructor===Symbol&&se!==Symbol.prototype?"symbol":typeof se},x(ue)}function I(ue,ke){if(!(ue instanceof ke))throw new TypeError("Cannot call a class as a function")}function g(ue,ke){if(typeof ke!="function"&&ke!==null)throw new TypeError("Super expression must either be null or a function");ue.prototype=Object.create(ke&&ke.prototype,{constructor:{value:ue,writable:!0,configurable:!0}}),ke&&B(ue,ke)}function B(ue,ke){return B=Object.setPrototypeOf||function(ye,Ge){return ye.__proto__=Ge,ye},B(ue,ke)}function p(ue){var ke=v();return function(){var ye=d(ue),Ge;if(ke){var ze=d(this).constructor;Ge=Reflect.construct(ye,arguments,ze)}else Ge=ye.apply(this,arguments);return l(this,Ge)}}function l(ue,ke){if(ke&&(x(ke)==="object"||typeof ke=="function"))return ke;if(ke!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return u(ue)}function u(ue){if(ue===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ue}function v(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(ue){return!1}}function d(ue){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(se){return se.__proto__||Object.getPrototypeOf(se)},d(ue)}var c=[1,0,0,1,0,0];a.IDENTITY_MATRIX=c;var b=[.001,0,0,.001,0,0];a.FONT_IDENTITY_MATRIX=b;var T={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256};a.RenderingIntentFlag=T;var U={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3};a.AnnotationMode=U;var M={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};a.PermissionFlag=M;var G={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};a.TextRenderingMode=G;var Z={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};a.ImageKind=Z;var J={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};a.AnnotationType=J;var ie={MARKED:"Marked",REVIEW:"Review"};a.AnnotationStateModelType=ie;var H={MARKED:"Marked",UNMARKED:"Unmarked"};a.AnnotationMarkedState=H;var q={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"};a.AnnotationReviewState=q;var R={GROUP:"Group",REPLY:"R"};a.AnnotationReplyType=R;var h={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};a.AnnotationFlag=h;var A={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};a.AnnotationFieldFlag=A;var E={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};a.AnnotationBorderStyleType=E;var K={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"};a.AnnotationActionEventType=K;var te={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"};a.DocumentActionEventType=te;var Y={O:"PageOpen",C:"PageClose"};a.PageActionEventType=Y;var be={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"};a.StreamType=be;var Ce={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1STANDARD:"TYPE1STANDARD",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};a.FontType=Ce;var we={ERRORS:0,WARNINGS:1,INFOS:5};a.VerbosityLevel=we;var Me={NONE:0,BINARY:1,STREAM:2};a.CMapCompressionType=Me;var S={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};a.OPS=S;var w={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"};a.UNSUPPORTED_FEATURES=w;var s={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};a.PasswordResponses=s;var o=we.WARNINGS;function k(ue){Number.isInteger(ue)&&(o=ue)}function N(){return o}function W(ue){o>=we.INFOS&&console.log("Info: ".concat(ue))}function re(ue){o>=we.WARNINGS&&console.log("Warning: ".concat(ue))}function fe(ue){throw new Error(ue)}function ve(ue,ke){ue||fe(ke)}function me(ue,ke){var se;try{if(se=new URL(ue),!se.origin||se.origin==="null")return!1}catch(Ge){return!1}var ye=new URL(ke,se);return se.origin===ye.origin}function pe(ue){if(!ue)return!1;switch(ue.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function Ae(ue){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!ue)return null;try{if(se&&typeof ue=="string"){if(se.addDefaultProtocol&&ue.startsWith("www.")){var ye=ue.match(/\./g);ye&&ye.length>=2&&(ue="http://".concat(ue))}if(se.tryConvertEncoding)try{ue=yt(ue)}catch(ze){}}var Ge=ke?new URL(ue,ke):new URL(ue);if(pe(Ge))return Ge}catch(ze){}return null}function Pe(ue,ke,se){return Object.defineProperty(ue,ke,{value:se,enumerable:!0,configurable:!0,writable:!1}),se}var _e=function(){function ke(se,ye){this.constructor===ke&&fe("Cannot initialize BaseException."),this.message=se,this.name=ye}return ke.prototype=new Error,ke.constructor=ke,ke}();a.BaseException=_e;var We=function(ue){g(se,ue);var ke=p(se);function se(ye,Ge){var ze;return I(this,se),ze=ke.call(this,ye,"PasswordException"),ze.code=Ge,ze}return se}(_e);a.PasswordException=We;var Le=function(ue){g(se,ue);var ke=p(se);function se(ye,Ge){var ze;return I(this,se),ze=ke.call(this,ye,"UnknownErrorException"),ze.details=Ge,ze}return se}(_e);a.UnknownErrorException=Le;var je=function(ue){g(se,ue);var ke=p(se);function se(ye){return I(this,se),ke.call(this,ye,"InvalidPDFException")}return se}(_e);a.InvalidPDFException=je;var le=function(ue){g(se,ue);var ke=p(se);function se(ye){return I(this,se),ke.call(this,ye,"MissingPDFException")}return se}(_e);a.MissingPDFException=le;var he=function(ue){g(se,ue);var ke=p(se);function se(ye,Ge){var ze;return I(this,se),ze=ke.call(this,ye,"UnexpectedResponseException"),ze.status=Ge,ze}return se}(_e);a.UnexpectedResponseException=he;var z=function(ue){g(se,ue);var ke=p(se);function se(ye){return I(this,se),ke.call(this,ye,"FormatError")}return se}(_e);a.FormatError=z;var ee=function(ue){g(se,ue);var ke=p(se);function se(ye){return I(this,se),ke.call(this,ye,"AbortException")}return se}(_e);a.AbortException=ee;var X=/\x00+/g,oe=/[\x01-\x1F]/g;function ne(ue){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return typeof ue!="string"?(re("The argument for removeNullCharacters must be a string."),ue):(ke&&(ue=ue.replace(oe," ")),ue.replace(X,""))}function Q(ue){ve(ue!==null&&x(ue)==="object"&&ue.length!==void 0,"Invalid argument for bytesToString");var ke=ue.length,se=8192;if(ke<se)return String.fromCharCode.apply(null,ue);for(var ye=[],Ge=0;Ge<ke;Ge+=se){var ze=Math.min(Ge+se,ke),$e=ue.subarray(Ge,ze);ye.push(String.fromCharCode.apply(null,$e))}return ye.join("")}function de(ue){ve(typeof ue=="string","Invalid argument for stringToBytes");for(var ke=ue.length,se=new Uint8Array(ke),ye=0;ye<ke;++ye)se[ye]=ue.charCodeAt(ye)&255;return se}function ce(ue){return ue.length!==void 0?ue.length:(ve(ue.byteLength!==void 0,"arrayByteLength - invalid argument."),ue.byteLength)}function Se(ue){var ke=ue.length;if(ke===1&&ue[0]instanceof Uint8Array)return ue[0];for(var se=0,ye=0;ye<ke;ye++)se+=ce(ue[ye]);for(var Ge=0,ze=new Uint8Array(se),$e=0;$e<ke;$e++){var qe=ue[$e];qe instanceof Uint8Array||(typeof qe=="string"?qe=de(qe):qe=new Uint8Array(qe));var nt=qe.byteLength;ze.set(qe,Ge),Ge+=nt}return ze}function Ee(ue){return String.fromCharCode(ue>>24&255,ue>>16&255,ue>>8&255,ue&255)}function Fe(ue){return Object.keys(ue).length}function De(ue){var ke=Object.create(null),se=O(ue),ye;try{for(se.s();!(ye=se.n()).done;){var Ge=L(ye.value,2),ze=Ge[0],$e=Ge[1];ke[ze]=$e}}catch(qe){se.e(qe)}finally{se.f()}return ke}function Re(){var ue=new Uint8Array(4);ue[0]=1;var ke=new Uint32Array(ue.buffer,0,1);return ke[0]===1}var Ne={get value(){return Pe(this,"value",Re())}};a.IsLittleEndianCached=Ne;function Oe(){try{return new Function(""),!0}catch(ue){return!1}}var xe={get value(){return Pe(this,"value",Oe())}};a.IsEvalSupportedCached=xe;var Be=f(Array(256).keys()).map(function(ue){return ue.toString(16).padStart(2,"0")}),Ue=function(){function ue(){I(this,ue)}return i(ue,null,[{key:"makeHexColor",value:function(se,ye,Ge){return"#".concat(Be[se]).concat(Be[ye]).concat(Be[Ge])}},{key:"transform",value:function(se,ye){return[se[0]*ye[0]+se[2]*ye[1],se[1]*ye[0]+se[3]*ye[1],se[0]*ye[2]+se[2]*ye[3],se[1]*ye[2]+se[3]*ye[3],se[0]*ye[4]+se[2]*ye[5]+se[4],se[1]*ye[4]+se[3]*ye[5]+se[5]]}},{key:"applyTransform",value:function(se,ye){var Ge=se[0]*ye[0]+se[1]*ye[2]+ye[4],ze=se[0]*ye[1]+se[1]*ye[3]+ye[5];return[Ge,ze]}},{key:"applyInverseTransform",value:function(se,ye){var Ge=ye[0]*ye[3]-ye[1]*ye[2],ze=(se[0]*ye[3]-se[1]*ye[2]+ye[2]*ye[5]-ye[4]*ye[3])/Ge,$e=(-se[0]*ye[1]+se[1]*ye[0]+ye[4]*ye[1]-ye[5]*ye[0])/Ge;return[ze,$e]}},{key:"getAxialAlignedBoundingBox",value:function(se,ye){var Ge=ue.applyTransform(se,ye),ze=ue.applyTransform(se.slice(2,4),ye),$e=ue.applyTransform([se[0],se[3]],ye),qe=ue.applyTransform([se[2],se[1]],ye);return[Math.min(Ge[0],ze[0],$e[0],qe[0]),Math.min(Ge[1],ze[1],$e[1],qe[1]),Math.max(Ge[0],ze[0],$e[0],qe[0]),Math.max(Ge[1],ze[1],$e[1],qe[1])]}},{key:"inverseTransform",value:function(se){var ye=se[0]*se[3]-se[1]*se[2];return[se[3]/ye,-se[1]/ye,-se[2]/ye,se[0]/ye,(se[2]*se[5]-se[4]*se[3])/ye,(se[4]*se[1]-se[5]*se[0])/ye]}},{key:"apply3dTransform",value:function(se,ye){return[se[0]*ye[0]+se[1]*ye[1]+se[2]*ye[2],se[3]*ye[0]+se[4]*ye[1]+se[5]*ye[2],se[6]*ye[0]+se[7]*ye[1]+se[8]*ye[2]]}},{key:"singularValueDecompose2dScale",value:function(se){var ye=[se[0],se[2],se[1],se[3]],Ge=se[0]*ye[0]+se[1]*ye[2],ze=se[0]*ye[1]+se[1]*ye[3],$e=se[2]*ye[0]+se[3]*ye[2],qe=se[2]*ye[1]+se[3]*ye[3],nt=(Ge+qe)/2,ot=Math.sqrt(Math.pow(Ge+qe,2)-4*(Ge*qe-$e*ze))/2,vt=nt+ot||1,ft=nt-ot||1;return[Math.sqrt(vt),Math.sqrt(ft)]}},{key:"normalizeRect",value:function(se){var ye=se.slice(0);return se[0]>se[2]&&(ye[0]=se[2],ye[2]=se[0]),se[1]>se[3]&&(ye[1]=se[3],ye[3]=se[1]),ye}},{key:"intersect",value:function(se,ye){function Ge(nt,ot){return nt-ot}var ze=[se[0],se[2],ye[0],ye[2]].sort(Ge),$e=[se[1],se[3],ye[1],ye[3]].sort(Ge),qe=[];if(se=ue.normalizeRect(se),ye=ue.normalizeRect(ye),ze[0]===se[0]&&ze[1]===ye[0]||ze[0]===ye[0]&&ze[1]===se[0])qe[0]=ze[1],qe[2]=ze[2];else return null;if($e[0]===se[1]&&$e[1]===ye[1]||$e[0]===ye[1]&&$e[1]===se[1])qe[1]=$e[1],qe[3]=$e[2];else return null;return qe}},{key:"bezierBoundingBox",value:function(se,ye,Ge,ze,$e,qe,nt,ot){for(var vt=[],ft=[[],[]],_t,gt,It,at,Gt,jt,nr,qt,zt=0;zt<2;++zt){if(zt===0?(gt=6*se-12*Ge+6*$e,_t=-3*se+9*Ge-9*$e+3*nt,It=3*Ge-3*se):(gt=6*ye-12*ze+6*qe,_t=-3*ye+9*ze-9*qe+3*ot,It=3*ze-3*ye),Math.abs(_t)<1e-12){if(Math.abs(gt)<1e-12)continue;at=-It/gt,0<at&&at<1&&vt.push(at);continue}nr=gt*gt-4*It*_t,qt=Math.sqrt(nr),!(nr<0)&&(Gt=(-gt+qt)/(2*_t),0<Gt&&Gt<1&&vt.push(Gt),jt=(-gt-qt)/(2*_t),0<jt&&jt<1&&vt.push(jt))}for(var mt=vt.length,ut,Mt=mt;mt--;)at=vt[mt],ut=1-at,ft[0][mt]=ut*ut*ut*se+3*ut*ut*at*Ge+3*ut*at*at*$e+at*at*at*nt,ft[1][mt]=ut*ut*ut*ye+3*ut*ut*at*ze+3*ut*at*at*qe+at*at*at*ot;return ft[0][Mt]=se,ft[1][Mt]=ye,ft[0][Mt+1]=nt,ft[1][Mt+1]=ot,ft[0].length=ft[1].length=Mt+2,[Math.min.apply(Math,f(ft[0])),Math.min.apply(Math,f(ft[1])),Math.max.apply(Math,f(ft[0])),Math.max.apply(Math,f(ft[1]))]}}]),ue}();a.Util=Ue;var He=[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 Ye(ue){var ke=ue.length,se=[];if(ue[0]==="\xFE"&&ue[1]==="\xFF")for(var ye=2;ye<ke;ye+=2)se.push(String.fromCharCode(ue.charCodeAt(ye)<<8|ue.charCodeAt(ye+1)));else if(ue[0]==="\xFF"&&ue[1]==="\xFE")for(var Ge=2;Ge<ke;Ge+=2)se.push(String.fromCharCode(ue.charCodeAt(Ge+1)<<8|ue.charCodeAt(Ge)));else for(var ze=0;ze<ke;++ze){var $e=He[ue.charCodeAt(ze)];se.push($e?String.fromCharCode($e):ue.charAt(ze))}return se.join("")}function Ze(ue){return ue.replace(/([()\\\n\r])/g,function(ke){return ke===`
`?"\\n":ke==="\r"?"\\r":"\\".concat(ke)})}function rt(ue){return/^[\x00-\x7F]*$/.test(ue)}function it(ue){for(var ke=["\xFE\xFF"],se=0,ye=ue.length;se<ye;se++){var Ge=ue.charCodeAt(se);ke.push(String.fromCharCode(Ge>>8&255),String.fromCharCode(Ge&255))}return ke.join("")}function yt(ue){return decodeURIComponent(escape(ue))}function ht(ue){return unescape(encodeURIComponent(ue))}function Pt(ue){return typeof ue=="boolean"}function Xt(ue){return typeof ue=="number"}function Ot(ue){return typeof ue=="string"}function xt(ue){return x(ue)==="object"&&ue!==null&&ue.byteLength!==void 0}function Ft(ue,ke){if(ue.length!==ke.length)return!1;for(var se=0,ye=ue.length;se<ye;se++)if(ue[se]!==ke[se])return!1;return!0}function Yt(){var ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Date,ke=[ue.getUTCFullYear().toString(),(ue.getUTCMonth()+1).toString().padStart(2,"0"),ue.getUTCDate().toString().padStart(2,"0"),ue.getUTCHours().toString().padStart(2,"0"),ue.getUTCMinutes().toString().padStart(2,"0"),ue.getUTCSeconds().toString().padStart(2,"0")];return ke.join("")}function At(){var ue=Object.create(null),ke=!1;return Object.defineProperty(ue,"settled",{get:function(){return ke}}),ue.promise=new Promise(function(se,ye){ue.resolve=function(Ge){ke=!0,se(Ge)},ue.reject=function(Ge){ke=!0,ye(Ge)}}),ue}function wt(ue){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(URL.createObjectURL&&typeof Blob!="undefined"&&!se)return URL.createObjectURL(new Blob([ue],{type:ke}));for(var ye="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Ge="data:".concat(ke,";base64,"),ze=0,$e=ue.length;ze<$e;ze+=3){var qe=ue[ze]&255,nt=ue[ze+1]&255,ot=ue[ze+2]&255,vt=qe>>2,ft=(qe&3)<<4|nt>>4,_t=ze+1<$e?(nt&15)<<2|ot>>6:64,gt=ze+2<$e?ot&63:64;Ge+=ye[vt]+ye[ft]+ye[_t]+ye[gt]}return Ge}},(y,a,t)=>{"use strict";var r=t(6);(typeof globalThis=="undefined"||!globalThis._pdfjsCompatibilityChecked)&&((typeof globalThis=="undefined"||globalThis.Math!==Math)&&(globalThis=t(7)),globalThis._pdfjsCompatibilityChecked=!0,function(){globalThis.btoa||!r.isNodeJS||(globalThis.btoa=function(f){return Buffer.from(f,"binary").toString("base64")})}(),function(){globalThis.atob||!r.isNodeJS||(globalThis.atob=function(f){return Buffer.from(f,"base64").toString("binary")})}(),function(){globalThis.DOMMatrix||!r.isNodeJS||(globalThis.DOMMatrix=t(69))}(),function(){Object.fromEntries||t(70)}(),function(){globalThis.Promise.allSettled||(globalThis.Promise=t(97))}(),function(){globalThis.ReadableStream||!r.isNodeJS||(globalThis.ReadableStream=t(134).ReadableStream)}())},(y,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.isNodeJS=void 0;function t(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(m){return typeof m}:t=function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},t(i)}var r=(typeof process=="undefined"?"undefined":t(process))==="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser");a.isNodeJS=r},(y,a,t)=>{t(8),y.exports=t(10)},(y,a,t)=>{var r=t(9),i=t(10);r({global:!0},{globalThis:i})},(y,a,t)=>{var r=t(10),i=t(11).f,f=t(47),m=t(50),_=t(41),D=t(57),L=t(68);y.exports=function($,j){var V=$.target,O=$.global,P=$.stat,F,x,I,g,B,p;if(O?x=r:P?x=r[V]||_(V,{}):x=(r[V]||{}).prototype,x)for(I in j){if(B=j[I],$.noTargetGet?(p=i(x,I),g=p&&p.value):g=x[I],F=L(O?I:V+(P?".":"#")+I,$.forced),!F&&g!==void 0){if(typeof B==typeof g)continue;D(B,g)}($.sham||g&&g.sham)&&f(B,"sham",!0),m(x,I,B,$)}}},y=>{var a=function(t){return t&&t.Math==Math&&t};y.exports=a(typeof globalThis=="object"&&globalThis)||a(typeof window=="object"&&window)||a(typeof self=="object"&&self)||a(typeof global=="object"&&global)||function(){return this}()||Function("return this")()},(y,a,t)=>{var r=t(12),i=t(14),f=t(15),m=t(16),_=t(17),D=t(22),L=t(42),$=t(45),j=Object.getOwnPropertyDescriptor;a.f=r?j:function(O,P){if(O=_(O),P=D(P),$)try{return j(O,P)}catch(F){}if(L(O,P))return m(!i(f.f,O,P),O[P])}},(y,a,t)=>{var r=t(13);y.exports=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},y=>{y.exports=function(a){try{return!!a()}catch(t){return!0}}},y=>{var a=Function.prototype.call;y.exports=a.bind?a.bind(a):function(){return a.apply(a,arguments)}},(y,a)=>{"use strict";var t={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!t.call({1:2},1);a.f=i?function(m){var _=r(this,m);return!!_&&_.enumerable}:t},y=>{y.exports=function(a,t){return{enumerable:!(a&1),configurable:!(a&2),writable:!(a&4),value:t}}},(y,a,t)=>{var r=t(18),i=t(21);y.exports=function(f){return r(i(f))}},(y,a,t)=>{var r=t(10),i=t(19),f=t(13),m=t(20),_=r.Object,D=i("".split);y.exports=f(function(){return!_("z").propertyIsEnumerable(0)})?function(L){return m(L)=="String"?D(L,""):_(L)}:_},y=>{var a=Function.prototype,t=a.bind,r=a.call,i=t&&t.bind(r);y.exports=t?function(f){return f&&i(r,f)}:function(f){return f&&function(){return r.apply(f,arguments)}}},(y,a,t)=>{var r=t(19),i=r({}.toString),f=r("".slice);y.exports=function(m){return f(i(m),8,-1)}},(y,a,t)=>{var r=t(10),i=r.TypeError;y.exports=function(f){if(f==null)throw i("Can't call method on "+f);return f}},(y,a,t)=>{var r=t(23),i=t(26);y.exports=function(f){var m=r(f,"string");return i(m)?m:m+""}},(y,a,t)=>{var r=t(10),i=t(14),f=t(24),m=t(26),_=t(33),D=t(36),L=t(37),$=r.TypeError,j=L("toPrimitive");y.exports=function(V,O){if(!f(V)||m(V))return V;var P=_(V,j),F;if(P){if(O===void 0&&(O="default"),F=i(P,V,O),!f(F)||m(F))return F;throw $("Can't convert object to primitive value")}return O===void 0&&(O="number"),D(V,O)}},(y,a,t)=>{var r=t(25);y.exports=function(i){return typeof i=="object"?i!==null:r(i)}},y=>{y.exports=function(a){return typeof a=="function"}},(y,a,t)=>{var r=t(10),i=t(27),f=t(25),m=t(28),_=t(29),D=r.Object;y.exports=_?function(L){return typeof L=="symbol"}:function(L){var $=i("Symbol");return f($)&&m($.prototype,D(L))}},(y,a,t)=>{var r=t(10),i=t(25),f=function(m){return i(m)?m:void 0};y.exports=function(m,_){return arguments.length<2?f(r[m]):r[m]&&r[m][_]}},(y,a,t)=>{var r=t(19);y.exports=r({}.isPrototypeOf)},(y,a,t)=>{var r=t(30);y.exports=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},(y,a,t)=>{var r=t(31),i=t(13);y.exports=!!Object.getOwnPropertySymbols&&!i(function(){var f=Symbol();return!String(f)||!(Object(f)instanceof Symbol)||!Symbol.sham&&r&&r<41})},(y,a,t)=>{var r=t(10),i=t(32),f=r.process,m=r.Deno,_=f&&f.versions||m&&m.version,D=_&&_.v8,L,$;D&&(L=D.split("."),$=L[0]>0&&L[0]<4?1:+(L[0]+L[1])),!$&&i&&(L=i.match(/Edge\/(\d+)/),(!L||L[1]>=74)&&(L=i.match(/Chrome\/(\d+)/),L&&($=+L[1]))),y.exports=$},(y,a,t)=>{var r=t(27);y.exports=r("navigator","userAgent")||""},(y,a,t)=>{var r=t(34);y.exports=function(i,f){var m=i[f];return m==null?void 0:r(m)}},(y,a,t)=>{var r=t(10),i=t(25),f=t(35),m=r.TypeError;y.exports=function(_){if(i(_))return _;throw m(f(_)+" is not a function")}},(y,a,t)=>{var r=t(10),i=r.String;y.exports=function(f){try{return i(f)}catch(m){return"Object"}}},(y,a,t)=>{var r=t(10),i=t(14),f=t(25),m=t(24),_=r.TypeError;y.exports=function(D,L){var $,j;if(L==="string"&&f($=D.toString)&&!m(j=i($,D))||f($=D.valueOf)&&!m(j=i($,D))||L!=="string"&&f($=D.toString)&&!m(j=i($,D)))return j;throw _("Can't convert object to primitive value")}},(y,a,t)=>{var r=t(10),i=t(38),f=t(42),m=t(44),_=t(30),D=t(29),L=i("wks"),$=r.Symbol,j=$&&$.for,V=D?$:$&&$.withoutSetter||m;y.exports=function(O){if(!f(L,O)||!(_||typeof L[O]=="string")){var P="Symbol."+O;_&&f($,O)?L[O]=$[O]:D&&j?L[O]=j(P):L[O]=V(P)}return L[O]}},(y,a,t)=>{var r=t(39),i=t(40);(y.exports=function(f,m){return i[f]||(i[f]=m!==void 0?m:{})})("versions",[]).push({version:"3.19.3",mode:r?"pure":"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})},y=>{y.exports=!1},(y,a,t)=>{var r=t(10),i=t(41),f="__core-js_shared__",m=r[f]||i(f,{});y.exports=m},(y,a,t)=>{var r=t(10),i=Object.defineProperty;y.exports=function(f,m){try{i(r,f,{value:m,configurable:!0,writable:!0})}catch(_){r[f]=m}return m}},(y,a,t)=>{var r=t(19),i=t(43),f=r({}.hasOwnProperty);y.exports=Object.hasOwn||function(_,D){return f(i(_),D)}},(y,a,t)=>{var r=t(10),i=t(21),f=r.Object;y.exports=function(m){return f(i(m))}},(y,a,t)=>{var r=t(19),i=0,f=Math.random(),m=r(1 .toString);y.exports=function(_){return"Symbol("+(_===void 0?"":_)+")_"+m(++i+f,36)}},(y,a,t)=>{var r=t(12),i=t(13),f=t(46);y.exports=!r&&!i(function(){return Object.defineProperty(f("div"),"a",{get:function(){return 7}}).a!=7})},(y,a,t)=>{var r=t(10),i=t(24),f=r.document,m=i(f)&&i(f.createElement);y.exports=function(_){return m?f.createElement(_):{}}},(y,a,t)=>{var r=t(12),i=t(48),f=t(16);y.exports=r?function(m,_,D){return i.f(m,_,f(1,D))}:function(m,_,D){return m[_]=D,m}},(y,a,t)=>{var r=t(10),i=t(12),f=t(45),m=t(49),_=t(22),D=r.TypeError,L=Object.defineProperty;a.f=i?L:function(j,V,O){if(m(j),V=_(V),m(O),f)try{return L(j,V,O)}catch(P){}if("get"in O||"set"in O)throw D("Accessors not supported");return"value"in O&&(j[V]=O.value),j}},(y,a,t)=>{var r=t(10),i=t(24),f=r.String,m=r.TypeError;y.exports=function(_){if(i(_))return _;throw m(f(_)+" is not an object")}},(y,a,t)=>{var r=t(10),i=t(25),f=t(42),m=t(47),_=t(41),D=t(51),L=t(52),$=t(56).CONFIGURABLE,j=L.get,V=L.enforce,O=String(String).split("String");(y.exports=function(P,F,x,I){var g=I?!!I.unsafe:!1,B=I?!!I.enumerable:!1,p=I?!!I.noTargetGet:!1,l=I&&I.name!==void 0?I.name:F,u;if(i(x)&&(String(l).slice(0,7)==="Symbol("&&(l="["+String(l).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!f(x,"name")||$&&x.name!==l)&&m(x,"name",l),u=V(x),u.source||(u.source=O.join(typeof l=="string"?l:""))),P===r){B?P[F]=x:_(F,x);return}else g?!p&&P[F]&&(B=!0):delete P[F];B?P[F]=x:m(P,F,x)})(Function.prototype,"toString",function(){return i(this)&&j(this).source||D(this)})},(y,a,t)=>{var r=t(19),i=t(25),f=t(40),m=r(Function.toString);i(f.inspectSource)||(f.inspectSource=function(_){return m(_)}),y.exports=f.inspectSource},(y,a,t)=>{var r=t(53),i=t(10),f=t(19),m=t(24),_=t(47),D=t(42),L=t(40),$=t(54),j=t(55),V="Object already initialized",O=i.TypeError,P=i.WeakMap,F,x,I,g=function(c){return I(c)?x(c):F(c,{})},B=function(c){return function(b){var T;if(!m(b)||(T=x(b)).type!==c)throw O("Incompatible receiver, "+c+" required");return T}};if(r||L.state){var p=L.state||(L.state=new P),l=f(p.get),u=f(p.has),v=f(p.set);F=function(c,b){if(u(p,c))throw new O(V);return b.facade=c,v(p,c,b),b},x=function(c){return l(p,c)||{}},I=function(c){return u(p,c)}}else{var d=$("state");j[d]=!0,F=function(c,b){if(D(c,d))throw new O(V);return b.facade=c,_(c,d,b),b},x=function(c){return D(c,d)?c[d]:{}},I=function(c){return D(c,d)}}y.exports={set:F,get:x,has:I,enforce:g,getterFor:B}},(y,a,t)=>{var r=t(10),i=t(25),f=t(51),m=r.WeakMap;y.exports=i(m)&&/native code/.test(f(m))},(y,a,t)=>{var r=t(38),i=t(44),f=r("keys");y.exports=function(m){return f[m]||(f[m]=i(m))}},y=>{y.exports={}},(y,a,t)=>{var r=t(12),i=t(42),f=Function.prototype,m=r&&Object.getOwnPropertyDescriptor,_=i(f,"name"),D=_&&function(){}.name==="something",L=_&&(!r||r&&m(f,"name").configurable);y.exports={EXISTS:_,PROPER:D,CONFIGURABLE:L}},(y,a,t)=>{var r=t(42),i=t(58),f=t(11),m=t(48);y.exports=function(_,D){for(var L=i(D),$=m.f,j=f.f,V=0;V<L.length;V++){var O=L[V];r(_,O)||$(_,O,j(D,O))}}},(y,a,t)=>{var r=t(27),i=t(19),f=t(59),m=t(67),_=t(49),D=i([].concat);y.exports=r("Reflect","ownKeys")||function($){var j=f.f(_($)),V=m.f;return V?D(j,V($)):j}},(y,a,t)=>{var r=t(60),i=t(66),f=i.concat("length","prototype");a.f=Object.getOwnPropertyNames||function(_){return r(_,f)}},(y,a,t)=>{var r=t(19),i=t(42),f=t(17),m=t(61).indexOf,_=t(55),D=r([].push);y.exports=function(L,$){var j=f(L),V=0,O=[],P;for(P in j)!i(_,P)&&i(j,P)&&D(O,P);for(;$.length>V;)i(j,P=$[V++])&&(~m(O,P)||D(O,P));return O}},(y,a,t)=>{var r=t(17),i=t(62),f=t(64),m=function(_){return function(D,L,$){var j=r(D),V=f(j),O=i($,V),P;if(_&&L!=L){for(;V>O;)if(P=j[O++],P!=P)return!0}else for(;V>O;O++)if((_||O in j)&&j[O]===L)return _||O||0;return!_&&-1}};y.exports={includes:m(!0),indexOf:m(!1)}},(y,a,t)=>{var r=t(63),i=Math.max,f=Math.min;y.exports=function(m,_){var D=r(m);return D<0?i(D+_,0):f(D,_)}},y=>{var a=Math.ceil,t=Math.floor;y.exports=function(r){var i=+r;return i!==i||i===0?0:(i>0?t:a)(i)}},(y,a,t)=>{var r=t(65);y.exports=function(i){return r(i.length)}},(y,a,t)=>{var r=t(63),i=Math.min;y.exports=function(f){return f>0?i(r(f),9007199254740991):0}},y=>{y.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(y,a)=>{a.f=Object.getOwnPropertySymbols},(y,a,t)=>{var r=t(13),i=t(25),f=/#|\.prototype\./,m=function(j,V){var O=D[_(j)];return O==$?!0:O==L?!1:i(V)?r(V):!!V},_=m.normalize=function(j){return String(j).replace(f,".").toLowerCase()},D=m.data={},L=m.NATIVE="N",$=m.POLYFILL="P";y.exports=m},(y,a,t)=>{"use strict";var r,i;function f(m){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(D){return typeof D}:f=function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},f(m)}(function(m,_){f(a)==="object"?y.exports=_():(r=_,i=typeof r=="function"?r.call(a,t,a,y):r,i!==void 0&&(y.exports=i))})(void 0,function(){"use strict";function m(p){var l=new x,u=Array.from(p);if(!u.every(function(we){return!Number.isNaN(we)}))throw TypeError('CSSMatrix: "'+p+'" must only have numbers.');if(u.length===16){var v=u[0],d=u[1],c=u[2],b=u[3],T=u[4],U=u[5],M=u[6],G=u[7],Z=u[8],J=u[9],ie=u[10],H=u[11],q=u[12],R=u[13],h=u[14],A=u[15];l.m11=v,l.a=v,l.m21=T,l.c=T,l.m31=Z,l.m41=q,l.e=q,l.m12=d,l.b=d,l.m22=U,l.d=U,l.m32=J,l.m42=R,l.f=R,l.m13=c,l.m23=M,l.m33=ie,l.m43=h,l.m14=b,l.m24=G,l.m34=H,l.m44=A}else if(u.length===6){var E=u[0],K=u[1],te=u[2],Y=u[3],be=u[4],Ce=u[5];l.m11=E,l.a=E,l.m12=K,l.b=K,l.m21=te,l.c=te,l.m22=Y,l.d=Y,l.m41=be,l.e=be,l.m42=Ce,l.f=Ce}else throw new TypeError("CSSMatrix: expecting an Array of 6/16 values.");return l}function _(p){var l=Object.keys(new x);if(f(p)==="object"&&l.every(function(u){return u in p}))return m([p.m11,p.m12,p.m13,p.m14,p.m21,p.m22,p.m23,p.m24,p.m31,p.m32,p.m33,p.m34,p.m41,p.m42,p.m43,p.m44]);throw TypeError('CSSMatrix: "'+p+'" is not a DOMMatrix / CSSMatrix / JSON compatible object.')}function D(p){if(typeof p!="string")throw TypeError('CSSMatrix: "'+p+'" is not a string.');var l=String(p).replace(/\s/g,""),u=new x,v='CSSMatrix: invalid transform string "'+p+'"';return l.split(")").filter(function(d){return d}).forEach(function(d){var c=d.split("("),b=c[0],T=c[1];if(!T)throw TypeError(v);var U=T.split(",").map(function(Y){return Y.includes("rad")?parseFloat(Y)*(180/Math.PI):parseFloat(Y)}),M=U[0],G=U[1],Z=U[2],J=U[3],ie=[M,G,Z],H=[M,G,Z,J];if(b==="perspective"&&M&&[G,Z].every(function(Y){return Y===void 0}))u.m34=-1/M;else if(b.includes("matrix")&&[6,16].includes(U.length)&&U.every(function(Y){return!Number.isNaN(+Y)})){var q=U.map(function(Y){return Math.abs(Y)<1e-6?0:Y});u=u.multiply(m(q))}else if(b==="translate3d"&&ie.every(function(Y){return!Number.isNaN(+Y)}))u=u.translate(M,G,Z);else if(b==="translate"&&M&&Z===void 0)u=u.translate(M,G||0,0);else if(b==="rotate3d"&&H.every(function(Y){return!Number.isNaN(+Y)})&&J)u=u.rotateAxisAngle(M,G,Z,J);else if(b==="rotate"&&M&&[G,Z].every(function(Y){return Y===void 0}))u=u.rotate(0,0,M);else if(b==="scale3d"&&ie.every(function(Y){return!Number.isNaN(+Y)})&&ie.some(function(Y){return Y!==1}))u=u.scale(M,G,Z);else if(b==="scale"&&!Number.isNaN(M)&&M!==1&&Z===void 0){var R=Number.isNaN(+G),h=R?M:G;u=u.scale(M,h,1)}else if(b==="skew"&&M&&Z===void 0)u=u.skewX(M),u=G?u.skewY(G):u;else if(/[XYZ]/.test(b)&&M&&[G,Z].every(function(Y){return Y===void 0})&&["translate","rotate","scale","skew"].some(function(Y){return b.includes(Y)}))if(["skewX","skewY"].includes(b))u=u[b](M);else{var A=b.replace(/[XYZ]/,""),E=b.replace(A,""),K=["X","Y","Z"].indexOf(E),te=[K===0?M:0,K===1?M:0,K===2?M:0];u=u[A].apply(u,te)}else throw TypeError(v)}),u}function L(p,l,u){var v=new x;return v.m41=p,v.e=p,v.m42=l,v.f=l,v.m43=u,v}function $(p,l,u){var v=new x,d=Math.PI/180,c=p*d,b=l*d,T=u*d,U=Math.cos(c),M=-Math.sin(c),G=Math.cos(b),Z=-Math.sin(b),J=Math.cos(T),ie=-Math.sin(T),H=G*J,q=-G*ie;v.m11=H,v.a=H,v.m12=q,v.b=q,v.m13=Z;var R=M*Z*J+U*ie;v.m21=R,v.c=R;var h=U*J-M*Z*ie;return v.m22=h,v.d=h,v.m23=-M*G,v.m31=M*ie-U*Z*J,v.m32=M*J+U*Z*ie,v.m33=U*G,v}function j(p,l,u,v){var d=new x,c=v*(Math.PI/360),b=Math.sin(c),T=Math.cos(c),U=b*b,M=Math.sqrt(p*p+l*l+u*u),G=p,Z=l,J=u;M===0?(G=0,Z=0,J=1):(G/=M,Z/=M,J/=M);var ie=G*G,H=Z*Z,q=J*J,R=1-2*(H+q)*U;d.m11=R,d.a=R;var h=2*(G*Z*U+J*b*T);d.m12=h,d.b=h,d.m13=2*(G*J*U-Z*b*T);var A=2*(Z*G*U-J*b*T);d.m21=A,d.c=A;var E=1-2*(q+ie)*U;return d.m22=E,d.d=E,d.m23=2*(Z*J*U+G*b*T),d.m31=2*(J*G*U+Z*b*T),d.m32=2*(J*Z*U-G*b*T),d.m33=1-2*(ie+H)*U,d}function V(p,l,u){var v=new x;return v.m11=p,v.a=p,v.m22=l,v.d=l,v.m33=u,v}function O(p){var l=new x,u=p*Math.PI/180,v=Math.tan(u);return l.m21=v,l.c=v,l}function P(p){var l=new x,u=p*Math.PI/180,v=Math.tan(u);return l.m12=v,l.b=v,l}function F(p,l){var u=l.m11*p.m11+l.m12*p.m21+l.m13*p.m31+l.m14*p.m41,v=l.m11*p.m12+l.m12*p.m22+l.m13*p.m32+l.m14*p.m42,d=l.m11*p.m13+l.m12*p.m23+l.m13*p.m33+l.m14*p.m43,c=l.m11*p.m14+l.m12*p.m24+l.m13*p.m34+l.m14*p.m44,b=l.m21*p.m11+l.m22*p.m21+l.m23*p.m31+l.m24*p.m41,T=l.m21*p.m12+l.m22*p.m22+l.m23*p.m32+l.m24*p.m42,U=l.m21*p.m13+l.m22*p.m23+l.m23*p.m33+l.m24*p.m43,M=l.m21*p.m14+l.m22*p.m24+l.m23*p.m34+l.m24*p.m44,G=l.m31*p.m11+l.m32*p.m21+l.m33*p.m31+l.m34*p.m41,Z=l.m31*p.m12+l.m32*p.m22+l.m33*p.m32+l.m34*p.m42,J=l.m31*p.m13+l.m32*p.m23+l.m33*p.m33+l.m34*p.m43,ie=l.m31*p.m14+l.m32*p.m24+l.m33*p.m34+l.m34*p.m44,H=l.m41*p.m11+l.m42*p.m21+l.m43*p.m31+l.m44*p.m41,q=l.m41*p.m12+l.m42*p.m22+l.m43*p.m32+l.m44*p.m42,R=l.m41*p.m13+l.m42*p.m23+l.m43*p.m33+l.m44*p.m43,h=l.m41*p.m14+l.m42*p.m24+l.m43*p.m34+l.m44*p.m44;return m([u,v,d,c,b,T,U,M,G,Z,J,ie,H,q,R,h])}var x=function(){for(var l=[],u=arguments.length;u--;)l[u]=arguments[u];var v=this;if(v.a=1,v.b=0,v.c=0,v.d=1,v.e=0,v.f=0,v.m11=1,v.m12=0,v.m13=0,v.m14=0,v.m21=0,v.m22=1,v.m23=0,v.m24=0,v.m31=0,v.m32=0,v.m33=1,v.m34=0,v.m41=0,v.m42=0,v.m43=0,v.m44=1,l&&l.length){var d=[16,6].some(function(c){return c===l.length})?l:l[0];return v.setMatrixValue(d)}return v},I={isIdentity:{configurable:!0},is2D:{configurable:!0}};I.isIdentity.set=function(p){this.isIdentity=p},I.isIdentity.get=function(){var p=this;return p.m11===1&&p.m12===0&&p.m13===0&&p.m14===0&&p.m21===0&&p.m22===1&&p.m23===0&&p.m24===0&&p.m31===0&&p.m32===0&&p.m33===1&&p.m34===0&&p.m41===0&&p.m42===0&&p.m43===0&&p.m44===1},I.is2D.get=function(){var p=this;return p.m31===0&&p.m32===0&&p.m33===1&&p.m34===0&&p.m43===0&&p.m44===1},I.is2D.set=function(p){this.is2D=p},x.prototype.setMatrixValue=function(l){var u=this;return[Array,Float64Array,Float32Array].some(function(v){return l instanceof v})?m(l):typeof l=="string"&&l.length&&l!=="none"?D(l):f(l)==="object"?_(l):u},x.prototype.toArray=function(){var l=this,u=Math.pow(10,6),v;return l.is2D?v=[l.a,l.b,l.c,l.d,l.e,l.f]:v=[l.m11,l.m12,l.m13,l.m14,l.m21,l.m22,l.m23,l.m24,l.m31,l.m32,l.m33,l.m34,l.m41,l.m42,l.m43,l.m44],v.map(function(d){return Math.abs(d)<1e-6?0:(d*u>>0)/u})},x.prototype.toString=function(){var l=this,u=l.toArray(),v=l.is2D?"matrix":"matrix3d";return v+"("+u+")"},x.prototype.toJSON=function(){var l=this,u=l.is2D,v=l.isIdentity;return Object.assign({},l,{is2D:u,isIdentity:v})},x.prototype.multiply=function(l){return F(this,l)},x.prototype.translate=function(l,u,v){var d=l,c=u,b=v;return b===void 0&&(b=0),c===void 0&&(c=0),F(this,L(d,c,b))},x.prototype.scale=function(l,u,v){var d=l,c=u,b=v;return c===void 0&&(c=l),b===void 0&&(b=1),F(this,V(d,c,b))},x.prototype.rotate=function(l,u,v){var d=l,c=u,b=v;return c===void 0&&(c=0),b===void 0&&(b=d,d=0),F(this,$(d,c,b))},x.prototype.rotateAxisAngle=function(l,u,v,d){if([l,u,v,d].some(function(c){return Number.isNaN(c)}))throw new TypeError("CSSMatrix: expecting 4 values");return F(this,j(l,u,v,d))},x.prototype.skewX=function(l){return F(this,O(l))},x.prototype.skewY=function(l){return F(this,P(l))},x.prototype.transformPoint=function(l){var u=this,v=L(l.x,l.y,l.z);return v.m44=l.w||1,v=u.multiply(v),{x:v.m41,y:v.m42,z:v.m43,w:v.m44}},x.prototype.transform=function(l){var u=this,v=u.m11*l.x+u.m12*l.y+u.m13*l.z+u.m14*l.w,d=u.m21*l.x+u.m22*l.y+u.m23*l.z+u.m24*l.w,c=u.m31*l.x+u.m32*l.y+u.m33*l.z+u.m34*l.w,b=u.m41*l.x+u.m42*l.y+u.m43*l.z+u.m44*l.w;return{x:v/b,y:d/b,z:c/b,w:b}},Object.defineProperties(x.prototype,I),Object.assign(x,{Translate:L,Rotate:$,RotateAxisAngle:j,Scale:V,SkewX:O,SkewY:P,Multiply:F,fromArray:m,fromMatrix:_,fromString:D});var g="0.0.24",B=g;return Object.assign(x,{Version:B}),x})},(y,a,t)=>{t(71),t(86);var r=t(96);y.exports=r.Object.fromEntries},(y,a,t)=>{"use strict";var r=t(17),i=t(72),f=t(77),m=t(52),_=t(78),D="Array Iterator",L=m.set,$=m.getterFor(D);y.exports=_(Array,"Array",function(j,V){L(this,{type:D,target:r(j),index:0,kind:V})},function(){var j=$(this),V=j.target,O=j.kind,P=j.index++;return!V||P>=V.length?(j.target=void 0,{value:void 0,done:!0}):O=="keys"?{value:P,done:!1}:O=="values"?{value:V[P],done:!1}:{value:[P,V[P]],done:!1}},"values"),f.Arguments=f.Array,i("keys"),i("values"),i("entries")},(y,a,t)=>{var r=t(37),i=t(73),f=t(48),m=r("unscopables"),_=Array.prototype;_[m]==null&&f.f(_,m,{configurable:!0,value:i(null)}),y.exports=function(D){_[m][D]=!0}},(y,a,t)=>{var r=t(49),i=t(74),f=t(66),m=t(55),_=t(76),D=t(46),L=t(54),$=">",j="<",V="prototype",O="script",P=L("IE_PROTO"),F=function(){},x=function(l){return j+O+$+l+j+"/"+O+$},I=function(l){l.write(x("")),l.close();var u=l.parentWindow.Object;return l=null,u},g=function(){var l=D("iframe"),u="java"+O+":",v;return l.style.display="none",_.appendChild(l),l.src=String(u),v=l.contentWindow.document,v.open(),v.write(x("document.F=Object")),v.close(),v.F},B,p=function(){try{B=new ActiveXObject("htmlfile")}catch(u){}p=typeof document!="undefined"?document.domain&&B?I(B):g():I(B);for(var l=f.length;l--;)delete p[V][f[l]];return p()};m[P]=!0,y.exports=Object.create||function(u,v){var d;return u!==null?(F[V]=r(u),d=new F,F[V]=null,d[P]=u):d=p(),v===void 0?d:i(d,v)}},(y,a,t)=>{var r=t(12),i=t(48),f=t(49),m=t(17),_=t(75);y.exports=r?Object.defineProperties:function(L,$){f(L);for(var j=m($),V=_($),O=V.length,P=0,F;O>P;)i.f(L,F=V[P++],j[F]);return L}},(y,a,t)=>{var r=t(60),i=t(66);y.exports=Object.keys||function(m){return r(m,i)}},(y,a,t)=>{var r=t(27);y.exports=r("document","documentElement")},y=>{y.exports={}},(y,a,t)=>{"use strict";var r=t(9),i=t(14),f=t(39),m=t(56),_=t(25),D=t(79),L=t(81),$=t(84),j=t(83),V=t(47),O=t(50),P=t(37),F=t(77),x=t(80),I=m.PROPER,g=m.CONFIGURABLE,B=x.IteratorPrototype,p=x.BUGGY_SAFARI_ITERATORS,l=P("iterator"),u="keys",v="values",d="entries",c=function(){return this};y.exports=function(b,T,U,M,G,Z,J){D(U,T,M);var ie=function(be){if(be===G&&A)return A;if(!p&&be in R)return R[be];switch(be){case u:return function(){return new U(this,be)};case v:return function(){return new U(this,be)};case d:return function(){return new U(this,be)}}return function(){return new U(this)}},H=T+" Iterator",q=!1,R=b.prototype,h=R[l]||R["@@iterator"]||G&&R[G],A=!p&&h||ie(G),E=T=="Array"&&R.entries||h,K,te,Y;if(E&&(K=L(E.call(new b)),K!==Object.prototype&&K.next&&(!f&&L(K)!==B&&($?$(K,B):_(K[l])||O(K,l,c)),j(K,H,!0,!0),f&&(F[H]=c))),I&&G==v&&h&&h.name!==v&&(!f&&g?V(R,"name",v):(q=!0,A=function(){return i(h,this)})),G)if(te={values:ie(v),keys:Z?A:ie(u),entries:ie(d)},J)for(Y in te)(p||q||!(Y in R))&&O(R,Y,te[Y]);else r({target:T,proto:!0,forced:p||q},te);return(!f||J)&&R[l]!==A&&O(R,l,A,{name:G}),F[T]=A,te}},(y,a,t)=>{"use strict";var r=t(80).IteratorPrototype,i=t(73),f=t(16),m=t(83),_=t(77),D=function(){return this};y.exports=function(L,$,j,V){var O=$+" Iterator";return L.prototype=i(r,{next:f(+!V,j)}),m(L,O,!1,!0),_[O]=D,L}},(y,a,t)=>{"use strict";var r=t(13),i=t(25),f=t(73),m=t(81),_=t(50),D=t(37),L=t(39),$=D("iterator"),j=!1,V,O,P;[].keys&&(P=[].keys(),"next"in P?(O=m(m(P)),O!==Object.prototype&&(V=O)):j=!0);var F=V==null||r(function(){var x={};return V[$].call(x)!==x});F?V={}:L&&(V=f(V)),i(V[$])||_(V,$,function(){return this}),y.exports={IteratorPrototype:V,BUGGY_SAFARI_ITERATORS:j}},(y,a,t)=>{var r=t(10),i=t(42),f=t(25),m=t(43),_=t(54),D=t(82),L=_("IE_PROTO"),$=r.Object,j=$.prototype;y.exports=D?$.getPrototypeOf:function(V){var O=m(V);if(i(O,L))return O[L];var P=O.constructor;return f(P)&&O instanceof P?P.prototype:O instanceof $?j:null}},(y,a,t)=>{var r=t(13);y.exports=!r(function(){function i(){}return i.prototype.constructor=null,Object.getPrototypeOf(new i)!==i.prototype})},(y,a,t)=>{var r=t(48).f,i=t(42),f=t(37),m=f("toStringTag");y.exports=function(_,D,L){_&&!i(_=L?_:_.prototype,m)&&r(_,m,{configurable:!0,value:D})}},(y,a,t)=>{var r=t(19),i=t(49),f=t(85);y.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var m=!1,_={},D;try{D=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),D(_,[]),m=_ instanceof Array}catch(L){}return function($,j){return i($),f(j),m?D($,j):$.__proto__=j,$}}():void 0)},(y,a,t)=>{var r=t(10),i=t(25),f=r.String,m=r.TypeError;y.exports=function(_){if(typeof _=="object"||i(_))return _;throw m("Can't set "+f(_)+" as a prototype")}},(y,a,t)=>{var r=t(9),i=t(87),f=t(95);r({target:"Object",stat:!0},{fromEntries:function(_){var D={};return i(_,function(L,$){f(D,L,$)},{AS_ENTRIES:!0}),D}})},(y,a,t)=>{var r=t(10),i=t(88),f=t(14),m=t(49),_=t(35),D=t(89),L=t(64),$=t(28),j=t(90),V=t(91),O=t(94),P=r.TypeError,F=function(I,g){this.stopped=I,this.result=g},x=F.prototype;y.exports=function(I,g,B){var p=B&&B.that,l=!!(B&&B.AS_ENTRIES),u=!!(B&&B.IS_ITERATOR),v=!!(B&&B.INTERRUPTED),d=i(g,p),c,b,T,U,M,G,Z,J=function(H){return c&&O(c,"normal",H),new F(!0,H)},ie=function(H){return l?(m(H),v?d(H[0],H[1],J):d(H[0],H[1])):v?d(H,J):d(H)};if(u)c=I;else{if(b=V(I),!b)throw P(_(I)+" is not iterable");if(D(b)){for(T=0,U=L(I);U>T;T++)if(M=ie(I[T]),M&&$(x,M))return M;return new F(!1)}c=j(I,b)}for(G=c.next;!(Z=f(G,c)).done;){try{M=ie(Z.value)}catch(H){O(c,"throw",H)}if(typeof M=="object"&&M&&$(x,M))return M}return new F(!1)}},(y,a,t)=>{var r=t(19),i=t(34),f=r(r.bind);y.exports=function(m,_){return i(m),_===void 0?m:f?f(m,_):function(){return m.apply(_,arguments)}}},(y,a,t)=>{var r=t(37),i=t(77),f=r("iterator"),m=Array.prototype;y.exports=function(_){return _!==void 0&&(i.Array===_||m[f]===_)}},(y,a,t)=>{var r=t(10),i=t(14),f=t(34),m=t(49),_=t(35),D=t(91),L=r.TypeError;y.exports=function($,j){var V=arguments.length<2?D($):j;if(f(V))return m(i(V,$));throw L(_($)+" is not iterable")}},(y,a,t)=>{var r=t(92),i=t(33),f=t(77),m=t(37),_=m("iterator");y.exports=function(D){if(D!=null)return i(D,_)||i(D,"@@iterator")||f[r(D)]}},(y,a,t)=>{var r=t(10),i=t(93),f=t(25),m=t(20),_=t(37),D=_("toStringTag"),L=r.Object,$=m(function(){return arguments}())=="Arguments",j=function(V,O){try{return V[O]}catch(P){}};y.exports=i?m:function(V){var O,P,F;return V===void 0?"Undefined":V===null?"Null":typeof(P=j(O=L(V),D))=="string"?P:$?m(O):(F=m(O))=="Object"&&f(O.callee)?"Arguments":F}},(y,a,t)=>{var r=t(37),i=r("toStringTag"),f={};f[i]="z",y.exports=String(f)==="[object z]"},(y,a,t)=>{var r=t(14),i=t(49),f=t(33);y.exports=function(m,_,D){var L,$;i(m);try{if(L=f(m,"return"),!L){if(_==="throw")throw D;return D}L=r(L,m)}catch(j){$=!0,L=j}if(_==="throw")throw D;if($)throw L;return i(L),D}},(y,a,t)=>{"use strict";var r=t(22),i=t(48),f=t(16);y.exports=function(m,_,D){var L=r(_);L in m?i.f(m,L,f(0,D)):m[L]=D}},(y,a,t)=>{var r=t(10);y.exports=r},(y,a,t)=>{t(98),t(71),t(105),t(107),t(129),t(130),t(131),t(132);var r=t(96);y.exports=r.Promise},(y,a,t)=>{"use strict";var r=t(9),i=t(10),f=t(28),m=t(81),_=t(84),D=t(57),L=t(73),$=t(47),j=t(16),V=t(99),O=t(101),P=t(87),F=t(102),x=t(37),I=t(104),g=x("toStringTag"),B=i.Error,p=[].push,l=function(d,c){var b=arguments.length>2?arguments[2]:void 0,T=f(u,this),U;_?U=_(new B(void 0),T?m(this):u):(U=T?this:L(u),$(U,g,"Error")),$(U,"message",F(c,"")),I&&$(U,"stack",V(U.stack,1)),O(U,b);var M=[];return P(d,p,{that:M}),$(U,"errors",M),U};_?_(l,B):D(l,B);var u=l.prototype=L(B.prototype,{constructor:j(1,l),message:j(1,""),name:j(1,"AggregateError")});r({global:!0},{AggregateError:l})},(y,a,t)=>{var r=t(19),i=t(100),f=r("".replace),m=r("".split),_=r([].join),D=function(V){return String(Error(V).stack)}("zxcasd"),L=/\n\s*at [^:]*:[^\n]*/,$=L.test(D),j=/@[^\n]*\n/.test(D)&&!/zxcasd/.test(D);y.exports=function(V,O){if(typeof V!="string")return V;if($)for(;O--;)V=f(V,L,"");else if(j)return _(i(m(V,`
`),O),`
`);return V}},(y,a,t)=>{var r=t(10),i=t(62),f=t(64),m=t(95),_=r.Array,D=Math.max;y.exports=function(L,$,j){for(var V=f(L),O=i($,V),P=i(j===void 0?V:j,V),F=_(D(P-O,0)),x=0;O<P;O++,x++)m(F,x,L[O]);return F.length=x,F}},(y,a,t)=>{var r=t(24),i=t(47);y.exports=function(f,m){r(m)&&"cause"in m&&i(f,"cause",m.cause)}},(y,a,t)=>{var r=t(103);y.exports=function(i,f){return i===void 0?arguments.length<2?"":f:r(i)}},(y,a,t)=>{var r=t(10),i=t(92),f=r.String;y.exports=function(m){if(i(m)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return f(m)}},(y,a,t)=>{var r=t(13),i=t(16);y.exports=!r(function(){var f=Error("a");return"stack"in f?(Object.defineProperty(f,"stack",i(1,7)),f.stack!==7):!0})},(y,a,t)=>{var r=t(93),i=t(50),f=t(106);r||i(Object.prototype,"toString",f,{unsafe:!0})},(y,a,t)=>{"use strict";var r=t(93),i=t(92);y.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},(y,a,t)=>{"use strict";var r=t(9),i=t(39),f=t(10),m=t(27),_=t(14),D=t(108),L=t(50),$=t(109),j=t(84),V=t(83),O=t(110),P=t(34),F=t(25),x=t(24),I=t(111),g=t(51),B=t(87),p=t(112),l=t(113),u=t(116).set,v=t(121),d=t(124),c=t(126),b=t(125),T=t(127),U=t(52),M=t(68),G=t(37),Z=t(128),J=t(120),ie=t(31),H=G("species"),q="Promise",R=U.getterFor(q),h=U.set,A=U.getterFor(q),E=D&&D.prototype,K=D,te=E,Y=f.TypeError,be=f.document,Ce=f.process,we=b.f,Me=we,S=!!(be&&be.createEvent&&f.dispatchEvent),w=F(f.PromiseRejectionEvent),s="unhandledrejection",o="rejectionhandled",k=0,N=1,W=2,re=1,fe=2,ve=!1,me,pe,Ae,Pe,_e=M(q,function(){var Q=g(K),de=Q!==String(K);if(!de&&ie===66||i&&!te.finally)return!0;if(ie>=51&&/native code/.test(Q))return!1;var ce=new K(function(Fe){Fe(1)}),Se=function(Fe){Fe(function(){},function(){})},Ee=ce.constructor={};return Ee[H]=Se,ve=ce.then(function(){})instanceof Se,ve?!de&&Z&&!w:!0}),We=_e||!p(function(Q){K.all(Q).catch(function(){})}),Le=function(Q){var de;return x(Q)&&F(de=Q.then)?de:!1},je=function(Q,de){if(!Q.notified){Q.notified=!0;var ce=Q.reactions;v(function(){for(var Se=Q.value,Ee=Q.state==N,Fe=0;ce.length>Fe;){var De=ce[Fe++],Re=Ee?De.ok:De.fail,Ne=De.resolve,Oe=De.reject,xe=De.domain,Be,Ue,He;try{Re?(Ee||(Q.rejection===fe&&ee(Q),Q.rejection=re),Re===!0?Be=Se:(xe&&xe.enter(),Be=Re(Se),xe&&(xe.exit(),He=!0)),Be===De.promise?Oe(Y("Promise-chain cycle")):(Ue=Le(Be))?_(Ue,Be,Ne,Oe):Ne(Be)):Oe(Se)}catch(Ye){xe&&!He&&xe.exit(),Oe(Ye)}}Q.reactions=[],Q.notified=!1,de&&!Q.rejection&&he(Q)})}},le=function(Q,de,ce){var Se,Ee;S?(Se=be.createEvent("Event"),Se.promise=de,Se.reason=ce,Se.initEvent(Q,!1,!0),f.dispatchEvent(Se)):Se={promise:de,reason:ce},!w&&(Ee=f["on"+Q])?Ee(Se):Q===s&&c("Unhandled promise rejection",ce)},he=function(Q){_(u,f,function(){var de=Q.facade,ce=Q.value,Se=z(Q),Ee;if(Se&&(Ee=T(function(){J?Ce.emit("unhandledRejection",ce,de):le(s,de,ce)}),Q.rejection=J||z(Q)?fe:re,Ee.error))throw Ee.value})},z=function(Q){return Q.rejection!==re&&!Q.parent},ee=function(Q){_(u,f,function(){var de=Q.facade;J?Ce.emit("rejectionHandled",de):le(o,de,Q.value)})},X=function(Q,de,ce){return function(Se){Q(de,Se,ce)}},oe=function(Q,de,ce){Q.done||(Q.done=!0,ce&&(Q=ce),Q.value=de,Q.state=W,je(Q,!0))},ne=function(Q,de,ce){if(!Q.done){Q.done=!0,ce&&(Q=ce);try{if(Q.facade===de)throw Y("Promise can't be resolved itself");var Se=Le(de);Se?v(function(){var Ee={done:!1};try{_(Se,de,X(ne,Ee,Q),X(oe,Ee,Q))}catch(Fe){oe(Ee,Fe,Q)}}):(Q.value=de,Q.state=N,je(Q,!1))}catch(Ee){oe({done:!1},Ee,Q)}}};if(_e&&(K=function(de){I(this,te),P(de),_(me,this);var ce=R(this);try{de(X(ne,ce),X(oe,ce))}catch(Se){oe(ce,Se)}},te=K.prototype,me=function(de){h(this,{type:q,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:k,value:void 0})},me.prototype=$(te,{then:function(de,ce){var Se=A(this),Ee=Se.reactions,Fe=we(l(this,K));return Fe.ok=F(de)?de:!0,Fe.fail=F(ce)&&ce,Fe.domain=J?Ce.domain:void 0,Se.parent=!0,Ee[Ee.length]=Fe,Se.state!=k&&je(Se,!1),Fe.promise},catch:function(Q){return this.then(void 0,Q)}}),pe=function(){var Q=new me,de=R(Q);this.promise=Q,this.resolve=X(ne,de),this.reject=X(oe,de)},b.f=we=function(Q){return Q===K||Q===Ae?new pe(Q):Me(Q)},!i&&F(D)&&E!==Object.prototype)){Pe=E.then,ve||(L(E,"then",function(de,ce){var Se=this;return new K(function(Ee,Fe){_(Pe,Se,Ee,Fe)}).then(de,ce)},{unsafe:!0}),L(E,"catch",te.catch,{unsafe:!0}));try{delete E.constructor}catch(Q){}j&&j(E,te)}r({global:!0,wrap:!0,forced:_e},{Promise:K}),V(K,q,!1,!0),O(q),Ae=m(q),r({target:q,stat:!0,forced:_e},{reject:function(de){var ce=we(this);return _(ce.reject,void 0,de),ce.promise}}),r({target:q,stat:!0,forced:i||_e},{resolve:function(de){return d(i&&this===Ae?K:this,de)}}),r({target:q,stat:!0,forced:We},{all:function(de){var ce=this,Se=we(ce),Ee=Se.resolve,Fe=Se.reject,De=T(function(){var Re=P(ce.resolve),Ne=[],Oe=0,xe=1;B(de,function(Be){var Ue=Oe++,He=!1;xe++,_(Re,ce,Be).then(function(Ye){He||(He=!0,Ne[Ue]=Ye,--xe||Ee(Ne))},Fe)}),--xe||Ee(Ne)});return De.error&&Fe(De.value),Se.promise},race:function(de){var ce=this,Se=we(ce),Ee=Se.reject,Fe=T(function(){var De=P(ce.resolve);B(de,function(Re){_(De,ce,Re).then(Se.resolve,Ee)})});return Fe.error&&Ee(Fe.value),Se.promise}})},(y,a,t)=>{var r=t(10);y.exports=r.Promise},(y,a,t)=>{var r=t(50);y.exports=function(i,f,m){for(var _ in f)r(i,_,f[_],m);return i}},(y,a,t)=>{"use strict";var r=t(27),i=t(48),f=t(37),m=t(12),_=f("species");y.exports=function(D){var L=r(D),$=i.f;m&&L&&!L[_]&&$(L,_,{configurable:!0,get:function(){return this}})}},(y,a,t)=>{var r=t(10),i=t(28),f=r.TypeError;y.exports=function(m,_){if(i(_,m))return m;throw f("Incorrect invocation")}},(y,a,t)=>{var r=t(37),i=r("iterator"),f=!1;try{var m=0,_={next:function(){return{done:!!m++}},return:function(){f=!0}};_[i]=function(){return this},Array.from(_,function(){throw 2})}catch(D){}y.exports=function(D,L){if(!L&&!f)return!1;var $=!1;try{var j={};j[i]=function(){return{next:function(){return{done:$=!0}}}},D(j)}catch(V){}return $}},(y,a,t)=>{var r=t(49),i=t(114),f=t(37),m=f("species");y.exports=function(_,D){var L=r(_).constructor,$;return L===void 0||($=r(L)[m])==null?D:i($)}},(y,a,t)=>{var r=t(10),i=t(115),f=t(35),m=r.TypeError;y.exports=function(_){if(i(_))return _;throw m(f(_)+" is not a constructor")}},(y,a,t)=>{var r=t(19),i=t(13),f=t(25),m=t(92),_=t(27),D=t(51),L=function(){},$=[],j=_("Reflect","construct"),V=/^\s*(?:class|function)\b/,O=r(V.exec),P=!V.exec(L),F=function(I){if(!f(I))return!1;try{return j(L,$,I),!0}catch(g){return!1}},x=function(I){if(!f(I))return!1;switch(m(I)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return P||!!O(V,D(I))};y.exports=!j||i(function(){var I;return F(F.call)||!F(Object)||!F(function(){I=!0})||I})?x:F},(y,a,t)=>{var r=t(10),i=t(117),f=t(88),m=t(25),_=t(42),D=t(13),L=t(76),$=t(118),j=t(46),V=t(119),O=t(120),P=r.setImmediate,F=r.clearImmediate,x=r.process,I=r.Dispatch,g=r.Function,B=r.MessageChannel,p=r.String,l=0,u={},v="onreadystatechange",d,c,b,T;try{d=r.location}catch(J){}var U=function(J){if(_(u,J)){var ie=u[J];delete u[J],ie()}},M=function(J){return function(){U(J)}},G=function(J){U(J.data)},Z=function(J){r.postMessage(p(J),d.protocol+"//"+d.host)};(!P||!F)&&(P=function(ie){var H=$(arguments,1);return u[++l]=function(){i(m(ie)?ie:g(ie),void 0,H)},c(l),l},F=function(ie){delete u[ie]},O?c=function(J){x.nextTick(M(J))}:I&&I.now?c=function(J){I.now(M(J))}:B&&!V?(b=new B,T=b.port2,b.port1.onmessage=G,c=f(T.postMessage,T)):r.addEventListener&&m(r.postMessage)&&!r.importScripts&&d&&d.protocol!=="file:"&&!D(Z)?(c=Z,r.addEventListener("message",G,!1)):v in j("script")?c=function(J){L.appendChild(j("script"))[v]=function(){L.removeChild(this),U(J)}}:c=function(J){setTimeout(M(J),0)}),y.exports={set:P,clear:F}},y=>{var a=Function.prototype,t=a.apply,r=a.bind,i=a.call;y.exports=typeof Reflect=="object"&&Reflect.apply||(r?i.bind(t):function(){return i.apply(t,arguments)})},(y,a,t)=>{var r=t(19);y.exports=r([].slice)},(y,a,t)=>{var r=t(32);y.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},(y,a,t)=>{var r=t(20),i=t(10);y.exports=r(i.process)=="process"},(y,a,t)=>{var r=t(10),i=t(88),f=t(11).f,m=t(116).set,_=t(119),D=t(122),L=t(123),$=t(120),j=r.MutationObserver||r.WebKitMutationObserver,V=r.document,O=r.process,P=r.Promise,F=f(r,"queueMicrotask"),x=F&&F.value,I,g,B,p,l,u,v,d;x||(I=function(){var c,b;for($&&(c=O.domain)&&c.exit();g;){b=g.fn,g=g.next;try{b()}catch(T){throw g?p():B=void 0,T}}B=void 0,c&&c.enter()},!_&&!$&&!L&&j&&V?(l=!0,u=V.createTextNode(""),new j(I).observe(u,{characterData:!0}),p=function(){u.data=l=!l}):!D&&P&&P.resolve?(v=P.resolve(void 0),v.constructor=P,d=i(v.then,v),p=function(){d(I)}):$?p=function(){O.nextTick(I)}:(m=i(m,r),p=function(){m(I)})),y.exports=x||function(c){var b={fn:c,next:void 0};B&&(B.next=b),g||(g=b,p()),B=b}},(y,a,t)=>{var r=t(32),i=t(10);y.exports=/ipad|iphone|ipod/i.test(r)&&i.Pebble!==void 0},(y,a,t)=>{var r=t(32);y.exports=/web0s(?!.*chrome)/i.test(r)},(y,a,t)=>{var r=t(49),i=t(24),f=t(125);y.exports=function(m,_){if(r(m),i(_)&&_.constructor===m)return _;var D=f.f(m),L=D.resolve;return L(_),D.promise}},(y,a,t)=>{"use strict";var r=t(34),i=function(f){var m,_;this.promise=new f(function(D,L){if(m!==void 0||_!==void 0)throw TypeError("Bad Promise constructor");m=D,_=L}),this.resolve=r(m),this.reject=r(_)};y.exports.f=function(f){return new i(f)}},(y,a,t)=>{var r=t(10);y.exports=function(i,f){var m=r.console;m&&m.error&&(arguments.length==1?m.error(i):m.error(i,f))}},y=>{y.exports=function(a){try{return{error:!1,value:a()}}catch(t){return{error:!0,value:t}}}},y=>{y.exports=typeof window=="object"},(y,a,t)=>{"use strict";var r=t(9),i=t(14),f=t(34),m=t(125),_=t(127),D=t(87);r({target:"Promise",stat:!0},{allSettled:function($){var j=this,V=m.f(j),O=V.resolve,P=V.reject,F=_(function(){var x=f(j.resolve),I=[],g=0,B=1;D($,function(p){var l=g++,u=!1;B++,i(x,j,p).then(function(v){u||(u=!0,I[l]={status:"fulfilled",value:v},--B||O(I))},function(v){u||(u=!0,I[l]={status:"rejected",reason:v},--B||O(I))})}),--B||O(I)});return F.error&&P(F.value),V.promise}})},(y,a,t)=>{"use strict";var r=t(9),i=t(34),f=t(27),m=t(14),_=t(125),D=t(127),L=t(87),$="No one promise resolved";r({target:"Promise",stat:!0},{any:function(V){var O=this,P=f("AggregateError"),F=_.f(O),x=F.resolve,I=F.reject,g=D(function(){var B=i(O.resolve),p=[],l=0,u=1,v=!1;L(V,function(d){var c=l++,b=!1;u++,m(B,O,d).then(function(T){b||v||(v=!0,x(T))},function(T){b||v||(b=!0,p[c]=T,--u||I(new P(p,$)))})}),--u||I(new P(p,$))});return g.error&&I(g.value),F.promise}})},(y,a,t)=>{"use strict";var r=t(9),i=t(39),f=t(108),m=t(13),_=t(27),D=t(25),L=t(113),$=t(124),j=t(50),V=!!f&&m(function(){f.prototype.finally.call({then:function(){}},function(){})});if(r({target:"Promise",proto:!0,real:!0,forced:V},{finally:function(P){var F=L(this,_("Promise")),x=D(P);return this.then(x?function(I){return $(F,P()).then(function(){return I})}:P,x?function(I){return $(F,P()).then(function(){throw I})}:P)}}),!i&&D(f)){var O=_("Promise").prototype.finally;f.prototype.finally!==O&&j(f.prototype,"finally",O,{unsafe:!0})}},(y,a,t)=>{"use strict";var r=t(133).charAt,i=t(103),f=t(52),m=t(78),_="String Iterator",D=f.set,L=f.getterFor(_);m(String,"String",function($){D(this,{type:_,string:i($),index:0})},function(){var j=L(this),V=j.string,O=j.index,P;return O>=V.length?{value:void 0,done:!0}:(P=r(V,O),j.index+=P.length,{value:P,done:!1})})},(y,a,t)=>{var r=t(19),i=t(63),f=t(103),m=t(21),_=r("".charAt),D=r("".charCodeAt),L=r("".slice),$=function(j){return function(V,O){var P=f(m(V)),F=i(O),x=P.length,I,g;return F<0||F>=x?j?"":void 0:(I=D(P,F),I<55296||I>56319||F+1===x||(g=D(P,F+1))<56320||g>57343?j?_(P,F):I:j?L(P,F,F+2):(I-55296<<10)+(g-56320)+65536)}};y.exports={codeAt:$(!1),charAt:$(!0)}},function(y,a){(function(t,r){r(a)})(this,function(t){"use strict";var r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:function(e){return"Symbol("+e+")"};function i(){}function f(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global}var m=f();function _(e){return typeof e=="object"&&e!==null||typeof e=="function"}var D=i,L=Promise,$=Promise.prototype.then,j=Promise.resolve.bind(L),V=Promise.reject.bind(L);function O(e){return new L(e)}function P(e){return j(e)}function F(e){return V(e)}function x(e,n,C){return $.call(e,n,C)}function I(e,n,C){x(x(e,n,C),void 0,D)}function g(e,n){I(e,n)}function B(e,n){I(e,void 0,n)}function p(e,n,C){return x(e,n,C)}function l(e){x(e,void 0,D)}var u=function(){var e=m&&m.queueMicrotask;if(typeof e=="function")return e;var n=P(void 0);return function(C){return x(n,C)}}();function v(e,n,C){if(typeof e!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,n,C)}function d(e,n,C){try{return P(v(e,n,C))}catch(ae){return F(ae)}}var c=16384,b=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(n){var C=this._back,ae=C;C._elements.length===c-1&&(ae={_elements:[],_next:void 0}),C._elements.push(n),ae!==C&&(this._back=ae,C._next=ae),++this._size},e.prototype.shift=function(){var n=this._front,C=n,ae=this._cursor,ge=ae+1,Te=n._elements,Ie=Te[ae];return ge===c&&(C=n._next,ge=0),--this._size,this._cursor=ge,n!==C&&(this._front=C),Te[ae]=void 0,Ie},e.prototype.forEach=function(n){for(var C=this._cursor,ae=this._front,ge=ae._elements;(C!==ge.length||ae._next!==void 0)&&!(C===ge.length&&(ae=ae._next,ge=ae._elements,C=0,ge.length===0));)n(ge[C]),++C},e.prototype.peek=function(){var n=this._front,C=this._cursor;return n._elements[C]},e}();function T(e,n){e._ownerReadableStream=n,n._reader=e,n._state==="readable"?Z(e):n._state==="closed"?ie(e):J(e,n._storedError)}function U(e,n){var C=e._ownerReadableStream;return bt(C,n)}function M(e){e._ownerReadableStream._state==="readable"?H(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):q(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 G(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function Z(e){e._closedPromise=O(function(n,C){e._closedPromise_resolve=n,e._closedPromise_reject=C})}function J(e,n){Z(e),H(e,n)}function ie(e){Z(e),R(e)}function H(e,n){e._closedPromise_reject!==void 0&&(l(e._closedPromise),e._closedPromise_reject(n),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function q(e,n){J(e,n)}function R(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}var h=r("[[AbortSteps]]"),A=r("[[ErrorSteps]]"),E=r("[[CancelSteps]]"),K=r("[[PullSteps]]"),te=Number.isFinite||function(e){return typeof e=="number"&&isFinite(e)},Y=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function be(e){return typeof e=="object"||typeof e=="function"}function Ce(e,n){if(e!==void 0&&!be(e))throw new TypeError(n+" is not an object.")}function we(e,n){if(typeof e!="function")throw new TypeError(n+" is not a function.")}function Me(e){return typeof e=="object"&&e!==null||typeof e=="function"}function S(e,n){if(!Me(e))throw new TypeError(n+" is not an object.")}function w(e,n,C){if(e===void 0)throw new TypeError("Parameter "+n+" is required in '"+C+"'.")}function s(e,n,C){if(e===void 0)throw new TypeError(n+" is required in '"+C+"'.")}function o(e){return Number(e)}function k(e){return e===0?0:e}function N(e){return k(Y(e))}function W(e,n){var C=0,ae=Number.MAX_SAFE_INTEGER,ge=Number(e);if(ge=k(ge),!te(ge))throw new TypeError(n+" is not a finite number");if(ge=N(ge),ge<C||ge>ae)throw new TypeError(n+" is outside the accepted range of "+C+" to "+ae+", inclusive");return!te(ge)||ge===0?0:ge}function re(e,n){if(!Nt(e))throw new TypeError(n+" is not a ReadableStream.")}function fe(e){return new Pe(e)}function ve(e,n){e._reader._readRequests.push(n)}function me(e,n,C){var ae=e._reader,ge=ae._readRequests.shift();C?ge._closeSteps():ge._chunkSteps(n)}function pe(e){return e._reader._readRequests.length}function Ae(e){var n=e._reader;return!(n===void 0||!_e(n))}var Pe=function(){function e(n){if(w(n,1,"ReadableStreamDefaultReader"),re(n,"First parameter"),Bt(n))throw new TypeError("This stream has already been locked for exclusive reading by another reader");T(this,n),this._readRequests=new b}return Object.defineProperty(e.prototype,"closed",{get:function(){return _e(this)?this._closedPromise:F(Le("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(n){return n===void 0&&(n=void 0),_e(this)?this._ownerReadableStream===void 0?F(G("cancel")):U(this,n):F(Le("cancel"))},e.prototype.read=function(){if(!_e(this))return F(Le("read"));if(this._ownerReadableStream===void 0)return F(G("read from"));var n,C,ae=O(function(Te,Ie){n=Te,C=Ie}),ge={_chunkSteps:function(Te){return n({value:Te,done:!1})},_closeSteps:function(){return n({value:void 0,done:!0})},_errorSteps:function(Te){return C(Te)}};return We(this,ge),ae},e.prototype.releaseLock=function(){if(!_e(this))throw Le("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");M(this)}},e}();Object.defineProperties(Pe.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Pe.prototype,r.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function _e(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_readRequests")?!1:e instanceof Pe}function We(e,n){var C=e._ownerReadableStream;C._disturbed=!0,C._state==="closed"?n._closeSteps():C._state==="errored"?n._errorSteps(C._storedError):C._readableStreamController[K](n)}function Le(e){return new TypeError("ReadableStreamDefaultReader.prototype."+e+" can only be used on a ReadableStreamDefaultReader")}var je,le;typeof r.asyncIterator=="symbol"&&(le=(je={},je[r.asyncIterator]=function(){return this},je),Object.defineProperty(le,r.asyncIterator,{enumerable:!1}));var he=function(){function e(n,C){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=n,this._preventCancel=C}return e.prototype.next=function(){var n=this,C=function(){return n._nextSteps()};return this._ongoingPromise=this._ongoingPromise?p(this._ongoingPromise,C,C):C(),this._ongoingPromise},e.prototype.return=function(n){var C=this,ae=function(){return C._returnSteps(n)};return this._ongoingPromise?p(this._ongoingPromise,ae,ae):ae()},e.prototype._nextSteps=function(){var n=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var C=this._reader;if(C._ownerReadableStream===void 0)return F(G("iterate"));var ae,ge,Te=O(function(Ve,Ke){ae=Ve,ge=Ke}),Ie={_chunkSteps:function(Ve){n._ongoingPromise=void 0,u(function(){return ae({value:Ve,done:!1})})},_closeSteps:function(){n._ongoingPromise=void 0,n._isFinished=!0,M(C),ae({value:void 0,done:!0})},_errorSteps:function(Ve){n._ongoingPromise=void 0,n._isFinished=!0,M(C),ge(Ve)}};return We(C,Ie),Te},e.prototype._returnSteps=function(n){if(this._isFinished)return Promise.resolve({value:n,done:!0});this._isFinished=!0;var C=this._reader;if(C._ownerReadableStream===void 0)return F(G("finish iterating"));if(!this._preventCancel){var ae=U(C,n);return M(C),p(ae,function(){return{value:n,done:!0}})}return M(C),P({value:n,done:!0})},e}(),z={next:function(){return X(this)?this._asyncIteratorImpl.next():F(oe("next"))},return:function(e){return X(this)?this._asyncIteratorImpl.return(e):F(oe("return"))}};le!==void 0&&Object.setPrototypeOf(z,le);function ee(e,n){var C=fe(e),ae=new he(C,n),ge=Object.create(z);return ge._asyncIteratorImpl=ae,ge}function X(e){if(!_(e)||!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof he}catch(n){return!1}}function oe(e){return new TypeError("ReadableStreamAsyncIterator."+e+" can only be used on a ReadableSteamAsyncIterator")}var ne=Number.isNaN||function(e){return e!==e};function Q(e){return e.slice()}function de(e,n,C,ae,ge){new Uint8Array(e).set(new Uint8Array(C,ae,ge),n)}function ce(e){return e}function Se(e){return!1}function Ee(e,n,C){if(e.slice)return e.slice(n,C);var ae=C-n,ge=new ArrayBuffer(ae);return de(ge,0,e,n,ae),ge}function Fe(e){return!(typeof e!="number"||ne(e)||e<0)}function De(e){var n=Ee(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(n)}function Re(e){var n=e._queue.shift();return e._queueTotalSize-=n.size,e._queueTotalSize<0&&(e._queueTotalSize=0),n.value}function Ne(e,n,C){if(!Fe(C)||C===Infinity)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:n,size:C}),e._queueTotalSize+=C}function Oe(e){var n=e._queue.peek();return n.value}function xe(e){e._queue=new b,e._queueTotalSize=0}var Be=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"view",{get:function(){if(!Ye(this))throw It("view");return this._view},enumerable:!1,configurable:!0}),e.prototype.respond=function(n){if(!Ye(this))throw It("respond");if(w(n,1,"respond"),n=W(n,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Se(this._view.buffer),ot(this._associatedReadableByteStreamController,n)},e.prototype.respondWithNewView=function(n){if(!Ye(this))throw It("respondWithNewView");if(w(n,1,"respondWithNewView"),!ArrayBuffer.isView(n))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Se(n.buffer),vt(this._associatedReadableByteStreamController,n)},e}();Object.defineProperties(Be.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Be.prototype,r.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var Ue=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"byobRequest",{get:function(){if(!He(this))throw at("byobRequest");return qe(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!He(this))throw at("desiredSize");return nt(this)},enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!He(this))throw at("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var n=this._controlledReadableByteStream._state;if(n!=="readable")throw new TypeError("The stream (in "+n+" state) is not in the readable state and cannot be closed");Ge(this)},e.prototype.enqueue=function(n){if(!He(this))throw at("enqueue");if(w(n,1,"enqueue"),!ArrayBuffer.isView(n))throw new TypeError("chunk must be an array buffer view");if(n.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(n.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");var C=this._controlledReadableByteStream._state;if(C!=="readable")throw new TypeError("The stream (in "+C+" state) is not in the readable state and cannot be enqueued to");ze(this,n)},e.prototype.error=function(n){if(n===void 0&&(n=void 0),!He(this))throw at("error");$e(this,n)},e.prototype[E]=function(n){rt(this),xe(this);var C=this._cancelAlgorithm(n);return ye(this),C},e.prototype[K]=function(n){var C=this._controlledReadableByteStream;if(this._queueTotalSize>0){var ae=this._queue.shift();this._queueTotalSize-=ae.byteLength,Ot(this);var ge=new Uint8Array(ae.buffer,ae.byteOffset,ae.byteLength);n._chunkSteps(ge);return}var Te=this._autoAllocateChunkSize;if(Te!==void 0){var Ie=void 0;try{Ie=new ArrayBuffer(Te)}catch(Ke){n._errorSteps(Ke);return}var Ve={buffer:Ie,bufferByteLength:Te,byteOffset:0,byteLength:Te,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(Ve)}ve(C,n),Ze(this)},e}();Object.defineProperties(Ue.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ue.prototype,r.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function He(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")?!1:e instanceof Ue}function Ye(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")?!1:e instanceof Be}function Ze(e){var n=se(e);if(!!n){if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;var C=e._pullAlgorithm();I(C,function(){e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Ze(e))},function(ae){$e(e,ae)})}}function rt(e){xt(e),e._pendingPullIntos=new b}function it(e,n){var C=!1;e._state==="closed"&&(C=!0);var ae=yt(n);n.readerType==="default"?me(e,ae,C):nr(e,ae,C)}function yt(e){var n=e.bytesFilled,C=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,n/C)}function ht(e,n,C,ae){e._queue.push({buffer:n,byteOffset:C,byteLength:ae}),e._queueTotalSize+=ae}function Pt(e,n){var C=n.elementSize,ae=n.bytesFilled-n.bytesFilled%C,ge=Math.min(e._queueTotalSize,n.byteLength-n.bytesFilled),Te=n.bytesFilled+ge,Ie=Te-Te%C,Ve=ge,Ke=!1;Ie>ae&&(Ve=Ie-n.bytesFilled,Ke=!0);for(var Qe=e._queue;Ve>0;){var Je=Qe.peek(),et=Math.min(Ve,Je.byteLength),ct=n.byteOffset+n.bytesFilled;de(n.buffer,ct,Je.buffer,Je.byteOffset,et),Je.byteLength===et?Qe.shift():(Je.byteOffset+=et,Je.byteLength-=et),e._queueTotalSize-=et,Xt(e,et,n),Ve-=et}return Ke}function Xt(e,n,C){C.bytesFilled+=n}function Ot(e){e._queueTotalSize===0&&e._closeRequested?(ye(e),cr(e._controlledReadableByteStream)):Ze(e)}function xt(e){e._byobRequest!==null&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function Ft(e){for(;e._pendingPullIntos.length>0;){if(e._queueTotalSize===0)return;var n=e._pendingPullIntos.peek();Pt(e,n)&&(ke(e),it(e._controlledReadableByteStream,n))}}function Yt(e,n,C){var ae=e._controlledReadableByteStream,ge=1;n.constructor!==DataView&&(ge=n.constructor.BYTES_PER_ELEMENT);var Te=n.constructor,Ie=ce(n.buffer),Ve={buffer:Ie,bufferByteLength:Ie.byteLength,byteOffset:n.byteOffset,byteLength:n.byteLength,bytesFilled:0,elementSize:ge,viewConstructor:Te,readerType:"byob"};if(e._pendingPullIntos.length>0){e._pendingPullIntos.push(Ve),jt(ae,C);return}if(ae._state==="closed"){var Ke=new Te(Ve.buffer,Ve.byteOffset,0);C._closeSteps(Ke);return}if(e._queueTotalSize>0){if(Pt(e,Ve)){var Qe=yt(Ve);Ot(e),C._chunkSteps(Qe);return}if(e._closeRequested){var Je=new TypeError("Insufficient bytes to fill elements in the given buffer");$e(e,Je),C._errorSteps(Je);return}}e._pendingPullIntos.push(Ve),jt(ae,C),Ze(e)}function At(e,n){var C=e._controlledReadableByteStream;if(zt(C))for(;qt(C)>0;){var ae=ke(e);it(C,ae)}}function wt(e,n,C){if(Xt(e,n,C),!(C.bytesFilled<C.elementSize)){ke(e);var ae=C.bytesFilled%C.elementSize;if(ae>0){var ge=C.byteOffset+C.bytesFilled,Te=Ee(C.buffer,ge-ae,ge);ht(e,Te,0,Te.byteLength)}C.bytesFilled-=ae,it(e._controlledReadableByteStream,C),Ft(e)}}function ue(e,n){var C=e._pendingPullIntos.peek();xt(e);var ae=e._controlledReadableByteStream._state;ae==="closed"?At(e):wt(e,n,C),Ze(e)}function ke(e){var n=e._pendingPullIntos.shift();return n}function se(e){var n=e._controlledReadableByteStream;if(n._state!=="readable"||e._closeRequested||!e._started)return!1;if(Ae(n)&&pe(n)>0||zt(n)&&qt(n)>0)return!0;var C=nt(e);return C>0}function ye(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function Ge(e){var n=e._controlledReadableByteStream;if(!(e._closeRequested||n._state!=="readable")){if(e._queueTotalSize>0){e._closeRequested=!0;return}if(e._pendingPullIntos.length>0){var C=e._pendingPullIntos.peek();if(C.bytesFilled>0){var ae=new TypeError("Insufficient bytes to fill elements in the given buffer");throw $e(e,ae),ae}}ye(e),cr(n)}}function ze(e,n){var C=e._controlledReadableByteStream;if(!(e._closeRequested||C._state!=="readable")){var ae=n.buffer,ge=n.byteOffset,Te=n.byteLength,Ie=ce(ae);if(e._pendingPullIntos.length>0){var Ve=e._pendingPullIntos.peek();Se(Ve.buffer),Ve.buffer=ce(Ve.buffer)}if(xt(e),Ae(C))if(pe(C)===0)ht(e,Ie,ge,Te);else{e._pendingPullIntos.length>0&&ke(e);var Ke=new Uint8Array(Ie,ge,Te);me(C,Ke,!1)}else zt(C)?(ht(e,Ie,ge,Te),Ft(e)):ht(e,Ie,ge,Te);Ze(e)}}function $e(e,n){var C=e._controlledReadableByteStream;C._state==="readable"&&(rt(e),xe(e),ye(e),bn(C,n))}function qe(e){if(e._byobRequest===null&&e._pendingPullIntos.length>0){var n=e._pendingPullIntos.peek(),C=new Uint8Array(n.buffer,n.byteOffset+n.bytesFilled,n.byteLength-n.bytesFilled),ae=Object.create(Be.prototype);gt(ae,e,C),e._byobRequest=ae}return e._byobRequest}function nt(e){var n=e._controlledReadableByteStream._state;return n==="errored"?null:n==="closed"?0:e._strategyHWM-e._queueTotalSize}function ot(e,n){var C=e._pendingPullIntos.peek(),ae=e._controlledReadableByteStream._state;if(ae==="closed"){if(n!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(n===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(C.bytesFilled+n>C.byteLength)throw new RangeError("bytesWritten out of range")}C.buffer=ce(C.buffer),ue(e,n)}function vt(e,n){var C=e._pendingPullIntos.peek(),ae=e._controlledReadableByteStream._state;if(ae==="closed"){if(n.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(n.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(C.byteOffset+C.bytesFilled!==n.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(C.bufferByteLength!==n.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(C.bytesFilled+n.byteLength>C.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");var ge=n.byteLength;C.buffer=ce(n.buffer),ue(e,ge)}function ft(e,n,C,ae,ge,Te,Ie){n._controlledReadableByteStream=e,n._pullAgain=!1,n._pulling=!1,n._byobRequest=null,n._queue=n._queueTotalSize=void 0,xe(n),n._closeRequested=!1,n._started=!1,n._strategyHWM=Te,n._pullAlgorithm=ae,n._cancelAlgorithm=ge,n._autoAllocateChunkSize=Ie,n._pendingPullIntos=new b,e._readableStreamController=n;var Ve=C();I(P(Ve),function(){n._started=!0,Ze(n)},function(Ke){$e(n,Ke)})}function _t(e,n,C){var ae=Object.create(Ue.prototype),ge=function(){},Te=function(){return P(void 0)},Ie=function(){return P(void 0)};n.start!==void 0&&(ge=function(){return n.start(ae)}),n.pull!==void 0&&(Te=function(){return n.pull(ae)}),n.cancel!==void 0&&(Ie=function(Ke){return n.cancel(Ke)});var Ve=n.autoAllocateChunkSize;if(Ve===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");ft(e,ae,ge,Te,Ie,C,Ve)}function gt(e,n,C){e._associatedReadableByteStreamController=n,e._view=C}function It(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function at(e){return new TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}function Gt(e){return new mt(e)}function jt(e,n){e._reader._readIntoRequests.push(n)}function nr(e,n,C){var ae=e._reader,ge=ae._readIntoRequests.shift();C?ge._closeSteps(n):ge._chunkSteps(n)}function qt(e){return e._reader._readIntoRequests.length}function zt(e){var n=e._reader;return!(n===void 0||!ut(n))}var mt=function(){function e(n){if(w(n,1,"ReadableStreamBYOBReader"),re(n,"First parameter"),Bt(n))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!He(n._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");T(this,n),this._readIntoRequests=new b}return Object.defineProperty(e.prototype,"closed",{get:function(){return ut(this)?this._closedPromise:F(hr("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(n){return n===void 0&&(n=void 0),ut(this)?this._ownerReadableStream===void 0?F(G("cancel")):U(this,n):F(hr("cancel"))},e.prototype.read=function(n){if(!ut(this))return F(hr("read"));if(!ArrayBuffer.isView(n))return F(new TypeError("view must be an array buffer view"));if(n.byteLength===0)return F(new TypeError("view must have non-zero byteLength"));if(n.buffer.byteLength===0)return F(new TypeError("view's buffer must have non-zero byteLength"));if(Se(n.buffer),this._ownerReadableStream===void 0)return F(G("read from"));var C,ae,ge=O(function(Ie,Ve){C=Ie,ae=Ve}),Te={_chunkSteps:function(Ie){return C({value:Ie,done:!1})},_closeSteps:function(Ie){return C({value:Ie,done:!0})},_errorSteps:function(Ie){return ae(Ie)}};return Mt(this,n,Te),ge},e.prototype.releaseLock=function(){if(!ut(this))throw hr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");M(this)}},e}();Object.defineProperties(mt.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(mt.prototype,r.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function ut(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")?!1:e instanceof mt}function Mt(e,n,C){var ae=e._ownerReadableStream;ae._disturbed=!0,ae._state==="errored"?C._errorSteps(ae._storedError):Yt(ae._readableStreamController,n,C)}function hr(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}function ar(e,n){var C=e.highWaterMark;if(C===void 0)return n;if(ne(C)||C<0)throw new RangeError("Invalid highWaterMark");return C}function vr(e){var n=e.size;return n||function(){return 1}}function pr(e,n){Ce(e,n);var C=e==null?void 0:e.highWaterMark,ae=e==null?void 0:e.size;return{highWaterMark:C===void 0?void 0:o(C),size:ae===void 0?void 0:In(ae,n+" has member 'size' that")}}function In(e,n){return we(e,n),function(C){return o(e(C))}}function Mn(e,n){Ce(e,n);var C=e==null?void 0:e.abort,ae=e==null?void 0:e.close,ge=e==null?void 0:e.start,Te=e==null?void 0:e.type,Ie=e==null?void 0:e.write;return{abort:C===void 0?void 0:Dn(C,e,n+" has member 'abort' that"),close:ae===void 0?void 0:Ln(ae,e,n+" has member 'close' that"),start:ge===void 0?void 0:Nn(ge,e,n+" has member 'start' that"),write:Ie===void 0?void 0:Bn(Ie,e,n+" has member 'write' that"),type:Te}}function Dn(e,n,C){return we(e,C),function(ae){return d(e,n,[ae])}}function Ln(e,n,C){return we(e,C),function(){return d(e,n,[])}}function Nn(e,n,C){return we(e,C),function(ae){return v(e,n,[ae])}}function Bn(e,n,C){return we(e,C),function(ae,ge){return d(e,n,[ae,ge])}}function Kr(e,n){if(!Kt(e))throw new TypeError(n+" is not a WritableStream.")}function Wn(e){if(typeof e!="object"||e===null)return!1;try{return typeof e.aborted=="boolean"}catch(n){return!1}}var Un=typeof AbortController=="function";function Gn(){if(Un)return new AbortController}var ir=function(){function e(n,C){n===void 0&&(n={}),C===void 0&&(C={}),n===void 0?n=null:S(n,"First parameter");var ae=pr(C,"Second parameter"),ge=Mn(n,"First parameter");Jr(this);var Te=ge.type;if(Te!==void 0)throw new RangeError("Invalid type is specified");var Ie=vr(ae),Ve=ar(ae,1);ta(this,ge,Ve,Ie)}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!Kt(this))throw Sr("locked");return Qt(this)},enumerable:!1,configurable:!0}),e.prototype.abort=function(n){return n===void 0&&(n=void 0),Kt(this)?Qt(this)?F(new TypeError("Cannot abort a stream that already has a writer")):yr(this,n):F(Sr("abort"))},e.prototype.close=function(){return Kt(this)?Qt(this)?F(new TypeError("Cannot close a stream that already has a writer")):kt(this)?F(new TypeError("Cannot close an already-closing stream")):Zr(this):F(Sr("close"))},e.prototype.getWriter=function(){if(!Kt(this))throw Sr("getWriter");return Qr(this)},e}();Object.defineProperties(ir.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ir.prototype,r.toStringTag,{value:"WritableStream",configurable:!0});function Qr(e){return new or(e)}function jn(e,n,C,ae,ge,Te){ge===void 0&&(ge=1),Te===void 0&&(Te=function(){return 1});var Ie=Object.create(ir.prototype);Jr(Ie);var Ve=Object.create(Jt.prototype);return on(Ie,Ve,e,n,C,ae,ge,Te),Ie}function Jr(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new b,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function Kt(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")?!1:e instanceof ir}function Qt(e){return e._writer!==void 0}function yr(e,n){var C;if(e._state==="closed"||e._state==="errored")return P(void 0);e._writableStreamController._abortReason=n,(C=e._writableStreamController._abortController)===null||C===void 0||C.abort();var ae=e._state;if(ae==="closed"||ae==="errored")return P(void 0);if(e._pendingAbortRequest!==void 0)return e._pendingAbortRequest._promise;var ge=!1;ae==="erroring"&&(ge=!0,n=void 0);var Te=O(function(Ie,Ve){e._pendingAbortRequest={_promise:void 0,_resolve:Ie,_reject:Ve,_reason:n,_wasAlreadyErroring:ge}});return e._pendingAbortRequest._promise=Te,ge||Lr(e,n),Te}function Zr(e){var n=e._state;if(n==="closed"||n==="errored")return F(new TypeError("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var C=O(function(ge,Te){var Ie={_resolve:ge,_reject:Te};e._closeRequest=Ie}),ae=e._writer;return ae!==void 0&&e._backpressure&&n==="writable"&&Vr(ae),ra(e._writableStreamController),C}function zn(e){var n=O(function(C,ae){var ge={_resolve:C,_reject:ae};e._writeRequests.push(ge)});return n}function Dr(e,n){var C=e._state;if(C==="writable"){Lr(e,n);return}Nr(e)}function Lr(e,n){var C=e._writableStreamController;e._state="erroring",e._storedError=n;var ae=e._writer;ae!==void 0&&tn(ae,n),!Yn(e)&&C._started&&Nr(e)}function Nr(e){e._state="errored",e._writableStreamController[A]();var n=e._storedError;if(e._writeRequests.forEach(function(ge){ge._reject(n)}),e._writeRequests=new b,e._pendingAbortRequest===void 0){gr(e);return}var C=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,C._wasAlreadyErroring){C._reject(n),gr(e);return}var ae=e._writableStreamController[h](C._reason);I(ae,function(){C._resolve(),gr(e)},function(ge){C._reject(ge),gr(e)})}function Hn(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function Vn(e,n){e._inFlightWriteRequest._reject(n),e._inFlightWriteRequest=void 0,Dr(e,n)}function $n(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0;var n=e._state;n==="erroring"&&(e._storedError=void 0,e._pendingAbortRequest!==void 0&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var C=e._writer;C!==void 0&&cn(C)}function Xn(e,n){e._inFlightCloseRequest._reject(n),e._inFlightCloseRequest=void 0,e._pendingAbortRequest!==void 0&&(e._pendingAbortRequest._reject(n),e._pendingAbortRequest=void 0),Dr(e,n)}function kt(e){return!(e._closeRequest===void 0&&e._inFlightCloseRequest===void 0)}function Yn(e){return!(e._inFlightWriteRequest===void 0&&e._inFlightCloseRequest===void 0)}function qn(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function Kn(e){e._inFlightWriteRequest=e._writeRequests.shift()}function gr(e){e._closeRequest!==void 0&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);var n=e._writer;n!==void 0&&zr(n,e._storedError)}function Br(e,n){var C=e._writer;C!==void 0&&n!==e._backpressure&&(n?ua(C):Vr(C)),e._backpressure=n}var or=function(){function e(n){if(w(n,1,"WritableStreamDefaultWriter"),Kr(n,"First parameter"),Qt(n))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=n,n._writer=this;var C=n._state;if(C==="writable")!kt(n)&&n._backpressure?_r(this):fn(this),Ar(this);else if(C==="erroring")Hr(this,n._storedError),Ar(this);else if(C==="closed")fn(this),sa(this);else{var ae=n._storedError;Hr(this,ae),un(this,ae)}}return Object.defineProperty(e.prototype,"closed",{get:function(){return Ht(this)?this._closedPromise:F(Vt("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Ht(this))throw Vt("desiredSize");if(this._ownerWritableStream===void 0)throw sr("desiredSize");return ea(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return Ht(this)?this._readyPromise:F(Vt("ready"))},enumerable:!1,configurable:!0}),e.prototype.abort=function(n){return n===void 0&&(n=void 0),Ht(this)?this._ownerWritableStream===void 0?F(sr("abort")):Qn(this,n):F(Vt("abort"))},e.prototype.close=function(){if(!Ht(this))return F(Vt("close"));var n=this._ownerWritableStream;return n===void 0?F(sr("close")):kt(n)?F(new TypeError("Cannot close an already-closing stream")):en(this)},e.prototype.releaseLock=function(){if(!Ht(this))throw Vt("releaseLock");var n=this._ownerWritableStream;n!==void 0&&rn(this)},e.prototype.write=function(n){return n===void 0&&(n=void 0),Ht(this)?this._ownerWritableStream===void 0?F(sr("write to")):nn(this,n):F(Vt("write"))},e}();Object.defineProperties(or.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(or.prototype,r.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Ht(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")?!1:e instanceof or}function Qn(e,n){var C=e._ownerWritableStream;return yr(C,n)}function en(e){var n=e._ownerWritableStream;return Zr(n)}function Jn(e){var n=e._ownerWritableStream,C=n._state;return kt(n)||C==="closed"?P(void 0):C==="errored"?F(n._storedError):en(e)}function Zn(e,n){e._closedPromiseState==="pending"?zr(e,n):la(e,n)}function tn(e,n){e._readyPromiseState==="pending"?dn(e,n):ca(e,n)}function ea(e){var n=e._ownerWritableStream,C=n._state;return C==="errored"||C==="erroring"?null:C==="closed"?0:sn(n._writableStreamController)}function rn(e){var n=e._ownerWritableStream,C=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");tn(e,C),Zn(e,C),n._writer=void 0,e._ownerWritableStream=void 0}function nn(e,n){var C=e._ownerWritableStream,ae=C._writableStreamController,ge=na(ae,n);if(C!==e._ownerWritableStream)return F(sr("write to"));var Te=C._state;if(Te==="errored")return F(C._storedError);if(kt(C)||Te==="closed")return F(new TypeError("The stream is closing or closed and cannot be written to"));if(Te==="erroring")return F(C._storedError);var Ie=zn(C);return aa(ae,n,ge),Ie}var an={},Jt=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"abortReason",{get:function(){if(!Wr(this))throw jr("abortReason");return this._abortReason},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"signal",{get:function(){if(!Wr(this))throw jr("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal},enumerable:!1,configurable:!0}),e.prototype.error=function(n){if(n===void 0&&(n=void 0),!Wr(this))throw jr("error");var C=this._controlledWritableStream._state;C==="writable"&&ln(this,n)},e.prototype[h]=function(n){var C=this._abortAlgorithm(n);return mr(this),C},e.prototype[A]=function(){xe(this)},e}();Object.defineProperties(Jt.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Jt.prototype,r.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Wr(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")?!1:e instanceof Jt}function on(e,n,C,ae,ge,Te,Ie,Ve){n._controlledWritableStream=e,e._writableStreamController=n,n._queue=void 0,n._queueTotalSize=void 0,xe(n),n._abortReason=void 0,n._abortController=Gn(),n._started=!1,n._strategySizeAlgorithm=Ve,n._strategyHWM=Ie,n._writeAlgorithm=ae,n._closeAlgorithm=ge,n._abortAlgorithm=Te;var Ke=Gr(n);Br(e,Ke);var Qe=C(),Je=P(Qe);I(Je,function(){n._started=!0,br(n)},function(et){n._started=!0,Dr(e,et)})}function ta(e,n,C,ae){var ge=Object.create(Jt.prototype),Te=function(){},Ie=function(){return P(void 0)},Ve=function(){return P(void 0)},Ke=function(){return P(void 0)};n.start!==void 0&&(Te=function(){return n.start(ge)}),n.write!==void 0&&(Ie=function(Qe){return n.write(Qe,ge)}),n.close!==void 0&&(Ve=function(){return n.close()}),n.abort!==void 0&&(Ke=function(Qe){return n.abort(Qe)}),on(e,ge,Te,Ie,Ve,Ke,C,ae)}function mr(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function ra(e){Ne(e,an,0),br(e)}function na(e,n){try{return e._strategySizeAlgorithm(n)}catch(C){return Ur(e,C),1}}function sn(e){return e._strategyHWM-e._queueTotalSize}function aa(e,n,C){try{Ne(e,n,C)}catch(Te){Ur(e,Te);return}var ae=e._controlledWritableStream;if(!kt(ae)&&ae._state==="writable"){var ge=Gr(e);Br(ae,ge)}br(e)}function br(e){var n=e._controlledWritableStream;if(!!e._started&&n._inFlightWriteRequest===void 0){var C=n._state;if(C==="erroring"){Nr(n);return}if(e._queue.length!==0){var ae=Oe(e);ae===an?ia(e):oa(e,ae)}}}function Ur(e,n){e._controlledWritableStream._state==="writable"&&ln(e,n)}function ia(e){var n=e._controlledWritableStream;qn(n),Re(e);var C=e._closeAlgorithm();mr(e),I(C,function(){$n(n)},function(ae){Xn(n,ae)})}function oa(e,n){var C=e._controlledWritableStream;Kn(C);var ae=e._writeAlgorithm(n);I(ae,function(){Hn(C);var ge=C._state;if(Re(e),!kt(C)&&ge==="writable"){var Te=Gr(e);Br(C,Te)}br(e)},function(ge){C._state==="writable"&&mr(e),Vn(C,ge)})}function Gr(e){var n=sn(e);return n<=0}function ln(e,n){var C=e._controlledWritableStream;mr(e),Lr(C,n)}function Sr(e){return new TypeError("WritableStream.prototype."+e+" can only be used on a WritableStream")}function jr(e){return new TypeError("WritableStreamDefaultController.prototype."+e+" can only be used on a WritableStreamDefaultController")}function Vt(e){return new TypeError("WritableStreamDefaultWriter.prototype."+e+" can only be used on a WritableStreamDefaultWriter")}function sr(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function Ar(e){e._closedPromise=O(function(n,C){e._closedPromise_resolve=n,e._closedPromise_reject=C,e._closedPromiseState="pending"})}function un(e,n){Ar(e),zr(e,n)}function sa(e){Ar(e),cn(e)}function zr(e,n){e._closedPromise_reject!==void 0&&(l(e._closedPromise),e._closedPromise_reject(n),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function la(e,n){un(e,n)}function cn(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function _r(e){e._readyPromise=O(function(n,C){e._readyPromise_resolve=n,e._readyPromise_reject=C}),e._readyPromiseState="pending"}function Hr(e,n){_r(e),dn(e,n)}function fn(e){_r(e),Vr(e)}function dn(e,n){e._readyPromise_reject!==void 0&&(l(e._readyPromise),e._readyPromise_reject(n),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function ua(e){_r(e)}function ca(e,n){Hr(e,n)}function Vr(e){e._readyPromise_resolve!==void 0&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}var hn=typeof DOMException!="undefined"?DOMException:void 0;function fa(e){if(!(typeof e=="function"||typeof e=="object"))return!1;try{return new e,!0}catch(n){return!1}}function da(){var e=function(C,ae){this.message=C||"",this.name=ae||"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}var ha=fa(hn)?hn:da();function vn(e,n,C,ae,ge,Te){var Ie=fe(e),Ve=Qr(n);e._disturbed=!0;var Ke=!1,Qe=P(void 0);return O(function(Je,et){var ct;if(Te!==void 0){if(ct=function(){var Xe=new ha("Aborted","AbortError"),tt=[];ae||tt.push(function(){return n._state==="writable"?yr(n,Xe):P(void 0)}),ge||tt.push(function(){return e._state==="readable"?bt(e,Xe):P(void 0)}),pt(function(){return Promise.all(tt.map(function(lt){return lt()}))},!0,Xe)},Te.aborted){ct();return}Te.addEventListener("abort",ct)}function St(){return O(function(Xe,tt){function lt(Rt){Rt?Xe():x(tr(),lt,tt)}lt(!1)})}function tr(){return Ke?P(!0):x(Ve._readyPromise,function(){return O(function(Xe,tt){We(Ie,{_chunkSteps:function(lt){Qe=x(nn(Ve,lt),void 0,i),Xe(!1)},_closeSteps:function(){return Xe(!0)},_errorSteps:tt})})})}if(dt(e,Ie._closedPromise,function(Xe){ae?Et(!0,Xe):pt(function(){return yr(n,Xe)},!0,Xe)}),dt(n,Ve._closedPromise,function(Xe){ge?Et(!0,Xe):pt(function(){return bt(e,Xe)},!0,Xe)}),Tt(e,Ie._closedPromise,function(){C?Et():pt(function(){return Jn(Ve)})}),kt(n)||n._state==="closed"){var Wt=new TypeError("the destination writable stream closed before all data could be piped to it");ge?Et(!0,Wt):pt(function(){return bt(e,Wt)},!0,Wt)}l(St());function Ct(){var Xe=Qe;return x(Qe,function(){return Xe!==Qe?Ct():void 0})}function dt(Xe,tt,lt){Xe._state==="errored"?lt(Xe._storedError):B(tt,lt)}function Tt(Xe,tt,lt){Xe._state==="closed"?lt():g(tt,lt)}function pt(Xe,tt,lt){if(Ke)return;Ke=!0,n._state==="writable"&&!kt(n)?g(Ct(),Rt):Rt();function Rt(){I(Xe(),function(){return st(tt,lt)},function(Ut){return st(!0,Ut)})}}function Et(Xe,tt){Ke||(Ke=!0,n._state==="writable"&&!kt(n)?g(Ct(),function(){return st(Xe,tt)}):st(Xe,tt))}function st(Xe,tt){rn(Ve),M(Ie),Te!==void 0&&Te.removeEventListener("abort",ct),Xe?et(tt):Je(void 0)}})}var Zt=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!kr(this))throw Rr("desiredSize");return $r(this)},enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!kr(this))throw Rr("close");if(!er(this))throw new TypeError("The stream is not in a state that permits close");ur(this)},e.prototype.enqueue=function(n){if(n===void 0&&(n=void 0),!kr(this))throw Rr("enqueue");if(!er(this))throw new TypeError("The stream is not in a state that permits enqueue");return Tr(this,n)},e.prototype.error=function(n){if(n===void 0&&(n=void 0),!kr(this))throw Rr("error");Dt(this,n)},e.prototype[E]=function(n){xe(this);var C=this._cancelAlgorithm(n);return Cr(this),C},e.prototype[K]=function(n){var C=this._controlledReadableStream;if(this._queue.length>0){var ae=Re(this);this._closeRequested&&this._queue.length===0?(Cr(this),cr(C)):lr(this),n._chunkSteps(ae)}else ve(C,n),lr(this)},e}();Object.defineProperties(Zt.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Zt.prototype,r.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function kr(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")?!1:e instanceof Zt}function lr(e){var n=pn(e);if(!!n){if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;var C=e._pullAlgorithm();I(C,function(){e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,lr(e))},function(ae){Dt(e,ae)})}}function pn(e){var n=e._controlledReadableStream;if(!er(e)||!e._started)return!1;if(Bt(n)&&pe(n)>0)return!0;var C=$r(e);return C>0}function Cr(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function ur(e){if(!!er(e)){var n=e._controlledReadableStream;e._closeRequested=!0,e._queue.length===0&&(Cr(e),cr(n))}}function Tr(e,n){if(!!er(e)){var C=e._controlledReadableStream;if(Bt(C)&&pe(C)>0)me(C,n,!1);else{var ae=void 0;try{ae=e._strategySizeAlgorithm(n)}catch(ge){throw Dt(e,ge),ge}try{Ne(e,n,ae)}catch(ge){throw Dt(e,ge),ge}}lr(e)}}function Dt(e,n){var C=e._controlledReadableStream;C._state==="readable"&&(xe(e),Cr(e),bn(C,n))}function $r(e){var n=e._controlledReadableStream._state;return n==="errored"?null:n==="closed"?0:e._strategyHWM-e._queueTotalSize}function va(e){return!pn(e)}function er(e){var n=e._controlledReadableStream._state;return!e._closeRequested&&n==="readable"}function yn(e,n,C,ae,ge,Te,Ie){n._controlledReadableStream=e,n._queue=void 0,n._queueTotalSize=void 0,xe(n),n._started=!1,n._closeRequested=!1,n._pullAgain=!1,n._pulling=!1,n._strategySizeAlgorithm=Ie,n._strategyHWM=Te,n._pullAlgorithm=ae,n._cancelAlgorithm=ge,e._readableStreamController=n;var Ve=C();I(P(Ve),function(){n._started=!0,lr(n)},function(Ke){Dt(n,Ke)})}function pa(e,n,C,ae){var ge=Object.create(Zt.prototype),Te=function(){},Ie=function(){return P(void 0)},Ve=function(){return P(void 0)};n.start!==void 0&&(Te=function(){return n.start(ge)}),n.pull!==void 0&&(Ie=function(){return n.pull(ge)}),n.cancel!==void 0&&(Ve=function(Ke){return n.cancel(Ke)}),yn(e,ge,Te,Ie,Ve,C,ae)}function Rr(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function ya(e,n){return He(e._readableStreamController)?ma(e):ga(e)}function ga(e,n){var C=fe(e),ae=!1,ge=!1,Te=!1,Ie=!1,Ve,Ke,Qe,Je,et,ct=O(function(dt){et=dt});function St(){if(ae)return ge=!0,P(void 0);ae=!0;var dt={_chunkSteps:function(Tt){u(function(){ge=!1;var pt=Tt,Et=Tt;Te||Tr(Qe._readableStreamController,pt),Ie||Tr(Je._readableStreamController,Et),ae=!1,ge&&St()})},_closeSteps:function(){ae=!1,Te||ur(Qe._readableStreamController),Ie||ur(Je._readableStreamController),(!Te||!Ie)&&et(void 0)},_errorSteps:function(){ae=!1}};return We(C,dt),P(void 0)}function tr(dt){if(Te=!0,Ve=dt,Ie){var Tt=Q([Ve,Ke]),pt=bt(e,Tt);et(pt)}return ct}function Wt(dt){if(Ie=!0,Ke=dt,Te){var Tt=Q([Ve,Ke]),pt=bt(e,Tt);et(pt)}return ct}function Ct(){}return Qe=Xr(Ct,St,tr),Je=Xr(Ct,St,Wt),B(C._closedPromise,function(dt){Dt(Qe._readableStreamController,dt),Dt(Je._readableStreamController,dt),(!Te||!Ie)&&et(void 0)}),[Qe,Je]}function ma(e){var n=fe(e),C=!1,ae=!1,ge=!1,Te=!1,Ie=!1,Ve,Ke,Qe,Je,et,ct=O(function(st){et=st});function St(st){B(st._closedPromise,function(Xe){st===n&&($e(Qe._readableStreamController,Xe),$e(Je._readableStreamController,Xe),(!Te||!Ie)&&et(void 0))})}function tr(){ut(n)&&(M(n),n=fe(e),St(n));var st={_chunkSteps:function(Xe){u(function(){ae=!1,ge=!1;var tt=Xe,lt=Xe;if(!Te&&!Ie)try{lt=De(Xe)}catch(Rt){$e(Qe._readableStreamController,Rt),$e(Je._readableStreamController,Rt),et(bt(e,Rt));return}Te||ze(Qe._readableStreamController,tt),Ie||ze(Je._readableStreamController,lt),C=!1,ae?Ct():ge&&dt()})},_closeSteps:function(){C=!1,Te||Ge(Qe._readableStreamController),Ie||Ge(Je._readableStreamController),Qe._readableStreamController._pendingPullIntos.length>0&&ot(Qe._readableStreamController,0),Je._readableStreamController._pendingPullIntos.length>0&&ot(Je._readableStreamController,0),(!Te||!Ie)&&et(void 0)},_errorSteps:function(){C=!1}};We(n,st)}function Wt(st,Xe){_e(n)&&(M(n),n=Gt(e),St(n));var tt=Xe?Je:Qe,lt=Xe?Qe:Je,Rt={_chunkSteps:function(Ut){u(function(){ae=!1,ge=!1;var rr=Xe?Ie:Te,dr=Xe?Te:Ie;if(dr)rr||vt(tt._readableStreamController,Ut);else{var Fn=void 0;try{Fn=De(Ut)}catch(qr){$e(tt._readableStreamController,qr),$e(lt._readableStreamController,qr),et(bt(e,qr));return}rr||vt(tt._readableStreamController,Ut),ze(lt._readableStreamController,Fn)}C=!1,ae?Ct():ge&&dt()})},_closeSteps:function(Ut){C=!1;var rr=Xe?Ie:Te,dr=Xe?Te:Ie;rr||Ge(tt._readableStreamController),dr||Ge(lt._readableStreamController),Ut!==void 0&&(rr||vt(tt._readableStreamController,Ut),!dr&&lt._readableStreamController._pendingPullIntos.length>0&&ot(lt._readableStreamController,0)),(!rr||!dr)&&et(void 0)},_errorSteps:function(){C=!1}};Mt(n,st,Rt)}function Ct(){if(C)return ae=!0,P(void 0);C=!0;var st=qe(Qe._readableStreamController);return st===null?tr():Wt(st._view,!1),P(void 0)}function dt(){if(C)return ge=!0,P(void 0);C=!0;var st=qe(Je._readableStreamController);return st===null?tr():Wt(st._view,!0),P(void 0)}function Tt(st){if(Te=!0,Ve=st,Ie){var Xe=Q([Ve,Ke]),tt=bt(e,Xe);et(tt)}return ct}function pt(st){if(Ie=!0,Ke=st,Te){var Xe=Q([Ve,Ke]),tt=bt(e,Xe);et(tt)}return ct}function Et(){}return Qe=mn(Et,Ct,Tt),Je=mn(Et,dt,pt),St(n),[Qe,Je]}function ba(e,n){Ce(e,n);var C=e,ae=C==null?void 0:C.autoAllocateChunkSize,ge=C==null?void 0:C.cancel,Te=C==null?void 0:C.pull,Ie=C==null?void 0:C.start,Ve=C==null?void 0:C.type;return{autoAllocateChunkSize:ae===void 0?void 0:W(ae,n+" has member 'autoAllocateChunkSize' that"),cancel:ge===void 0?void 0:Sa(ge,C,n+" has member 'cancel' that"),pull:Te===void 0?void 0:Aa(Te,C,n+" has member 'pull' that"),start:Ie===void 0?void 0:_a(Ie,C,n+" has member 'start' that"),type:Ve===void 0?void 0:ka(Ve,n+" has member 'type' that")}}function Sa(e,n,C){return we(e,C),function(ae){return d(e,n,[ae])}}function Aa(e,n,C){return we(e,C),function(ae){return d(e,n,[ae])}}function _a(e,n,C){return we(e,C),function(ae){return v(e,n,[ae])}}function ka(e,n){if(e=""+e,e!=="bytes")throw new TypeError(n+" '"+e+"' is not a valid enumeration value for ReadableStreamType");return e}function Ca(e,n){Ce(e,n);var C=e==null?void 0:e.mode;return{mode:C===void 0?void 0:Ta(C,n+" has member 'mode' that")}}function Ta(e,n){if(e=""+e,e!=="byob")throw new TypeError(n+" '"+e+"' is not a valid enumeration value for ReadableStreamReaderMode");return e}function Ra(e,n){Ce(e,n);var C=e==null?void 0:e.preventCancel;return{preventCancel:Boolean(C)}}function gn(e,n){Ce(e,n);var C=e==null?void 0:e.preventAbort,ae=e==null?void 0:e.preventCancel,ge=e==null?void 0:e.preventClose,Te=e==null?void 0:e.signal;return Te!==void 0&&Pa(Te,n+" has member 'signal' that"),{preventAbort:Boolean(C),preventCancel:Boolean(ae),preventClose:Boolean(ge),signal:Te}}function Pa(e,n){if(!Wn(e))throw new TypeError(n+" is not an AbortSignal.")}function wa(e,n){Ce(e,n);var C=e==null?void 0:e.readable;s(C,"readable","ReadableWritablePair"),re(C,n+" has member 'readable' that");var ae=e==null?void 0:e.writable;return s(ae,"writable","ReadableWritablePair"),Kr(ae,n+" has member 'writable' that"),{readable:C,writable:ae}}var Lt=function(){function e(n,C){n===void 0&&(n={}),C===void 0&&(C={}),n===void 0?n=null:S(n,"First parameter");var ae=pr(C,"Second parameter"),ge=ba(n,"First parameter");if(Yr(this),ge.type==="bytes"){if(ae.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");var Te=ar(ae,0);_t(this,ge,Te)}else{var Ie=vr(ae),Te=ar(ae,1);pa(this,ge,Te,Ie)}}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!Nt(this))throw $t("locked");return Bt(this)},enumerable:!1,configurable:!0}),e.prototype.cancel=function(n){return n===void 0&&(n=void 0),Nt(this)?Bt(this)?F(new TypeError("Cannot cancel a stream that already has a reader")):bt(this,n):F($t("cancel"))},e.prototype.getReader=function(n){if(n===void 0&&(n=void 0),!Nt(this))throw $t("getReader");var C=Ca(n,"First parameter");return C.mode===void 0?fe(this):Gt(this)},e.prototype.pipeThrough=function(n,C){if(C===void 0&&(C={}),!Nt(this))throw $t("pipeThrough");w(n,1,"pipeThrough");var ae=wa(n,"First parameter"),ge=gn(C,"Second parameter");if(Bt(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Qt(ae.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");var Te=vn(this,ae.writable,ge.preventClose,ge.preventAbort,ge.preventCancel,ge.signal);return l(Te),ae.readable},e.prototype.pipeTo=function(n,C){if(C===void 0&&(C={}),!Nt(this))return F($t("pipeTo"));if(n===void 0)return F("Parameter 1 is required in 'pipeTo'.");if(!Kt(n))return F(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var ae;try{ae=gn(C,"Second parameter")}catch(ge){return F(ge)}return Bt(this)?F(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Qt(n)?F(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):vn(this,n,ae.preventClose,ae.preventAbort,ae.preventCancel,ae.signal)},e.prototype.tee=function(){if(!Nt(this))throw $t("tee");var n=ya(this);return Q(n)},e.prototype.values=function(n){if(n===void 0&&(n=void 0),!Nt(this))throw $t("values");var C=Ra(n,"First parameter");return ee(this,C.preventCancel)},e}();Object.defineProperties(Lt.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Lt.prototype,r.toStringTag,{value:"ReadableStream",configurable:!0}),typeof r.asyncIterator=="symbol"&&Object.defineProperty(Lt.prototype,r.asyncIterator,{value:Lt.prototype.values,writable:!0,configurable:!0});function Xr(e,n,C,ae,ge){ae===void 0&&(ae=1),ge===void 0&&(ge=function(){return 1});var Te=Object.create(Lt.prototype);Yr(Te);var Ie=Object.create(Zt.prototype);return yn(Te,Ie,e,n,C,ae,ge),Te}function mn(e,n,C){var ae=Object.create(Lt.prototype);Yr(ae);var ge=Object.create(Ue.prototype);return ft(ae,ge,e,n,C,0,void 0),ae}function Yr(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function Nt(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")?!1:e instanceof Lt}function Bt(e){return e._reader!==void 0}function bt(e,n){if(e._disturbed=!0,e._state==="closed")return P(void 0);if(e._state==="errored")return F(e._storedError);cr(e);var C=e._reader;C!==void 0&&ut(C)&&(C._readIntoRequests.forEach(function(ge){ge._closeSteps(void 0)}),C._readIntoRequests=new b);var ae=e._readableStreamController[E](n);return p(ae,i)}function cr(e){e._state="closed";var n=e._reader;n!==void 0&&(R(n),_e(n)&&(n._readRequests.forEach(function(C){C._closeSteps()}),n._readRequests=new b))}function bn(e,n){e._state="errored",e._storedError=n;var C=e._reader;C!==void 0&&(H(C,n),_e(C)?(C._readRequests.forEach(function(ae){ae._errorSteps(n)}),C._readRequests=new b):(C._readIntoRequests.forEach(function(ae){ae._errorSteps(n)}),C._readIntoRequests=new b))}function $t(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}function Sn(e,n){Ce(e,n);var C=e==null?void 0:e.highWaterMark;return s(C,"highWaterMark","QueuingStrategyInit"),{highWaterMark:o(C)}}var An=function(e){return e.byteLength};Object.defineProperty(An,"name",{value:"size",configurable:!0});var Pr=function(){function e(n){w(n,1,"ByteLengthQueuingStrategy"),n=Sn(n,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=n.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!kn(this))throw _n("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!kn(this))throw _n("size");return An},enumerable:!1,configurable:!0}),e}();Object.defineProperties(Pr.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Pr.prototype,r.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function _n(e){return new TypeError("ByteLengthQueuingStrategy.prototype."+e+" can only be used on a ByteLengthQueuingStrategy")}function kn(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")?!1:e instanceof Pr}var Cn=function(){return 1};Object.defineProperty(Cn,"name",{value:"size",configurable:!0});var wr=function(){function e(n){w(n,1,"CountQueuingStrategy"),n=Sn(n,"First parameter"),this._countQueuingStrategyHighWaterMark=n.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!Rn(this))throw Tn("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!Rn(this))throw Tn("size");return Cn},enumerable:!1,configurable:!0}),e}();Object.defineProperties(wr.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(wr.prototype,r.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Tn(e){return new TypeError("CountQueuingStrategy.prototype."+e+" can only be used on a CountQueuingStrategy")}function Rn(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")?!1:e instanceof wr}function Ea(e,n){Ce(e,n);var C=e==null?void 0:e.flush,ae=e==null?void 0:e.readableType,ge=e==null?void 0:e.start,Te=e==null?void 0:e.transform,Ie=e==null?void 0:e.writableType;return{flush:C===void 0?void 0:Oa(C,e,n+" has member 'flush' that"),readableType:ae,start:ge===void 0?void 0:xa(ge,e,n+" has member 'start' that"),transform:Te===void 0?void 0:Fa(Te,e,n+" has member 'transform' that"),writableType:Ie}}function Oa(e,n,C){return we(e,C),function(ae){return d(e,n,[ae])}}function xa(e,n,C){return we(e,C),function(ae){return v(e,n,[ae])}}function Fa(e,n,C){return we(e,C),function(ae,ge){return d(e,n,[ae,ge])}}var Er=function(){function e(n,C,ae){n===void 0&&(n={}),C===void 0&&(C={}),ae===void 0&&(ae={}),n===void 0&&(n=null);var ge=pr(C,"Second parameter"),Te=pr(ae,"Third parameter"),Ie=Ea(n,"First parameter");if(Ie.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(Ie.writableType!==void 0)throw new RangeError("Invalid writableType specified");var Ve=ar(Te,0),Ke=vr(Te),Qe=ar(ge,1),Je=vr(ge),et,ct=O(function(St){et=St});Ia(this,ct,Qe,Je,Ve,Ke),Da(this,Ie),Ie.start!==void 0?et(Ie.start(this._transformStreamController)):et(void 0)}return Object.defineProperty(e.prototype,"readable",{get:function(){if(!Pn(this))throw xn("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"writable",{get:function(){if(!Pn(this))throw xn("writable");return this._writable},enumerable:!1,configurable:!0}),e}();Object.defineProperties(Er.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Er.prototype,r.toStringTag,{value:"TransformStream",configurable:!0});function Ia(e,n,C,ae,ge,Te){function Ie(){return n}function Ve(ct){return Ba(e,ct)}function Ke(ct){return Wa(e,ct)}function Qe(){return Ua(e)}e._writable=jn(Ie,Ve,Qe,Ke,C,ae);function Je(){return Ga(e)}function et(ct){return xr(e,ct),P(void 0)}e._readable=Xr(Ie,Je,et,ge,Te),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Fr(e,!0),e._transformStreamController=void 0}function Pn(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")?!1:e instanceof Er}function Or(e,n){Dt(e._readable._readableStreamController,n),xr(e,n)}function xr(e,n){wn(e._transformStreamController),Ur(e._writable._writableStreamController,n),e._backpressure&&Fr(e,!1)}function Fr(e,n){e._backpressureChangePromise!==void 0&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=O(function(C){e._backpressureChangePromise_resolve=C}),e._backpressure=n}var fr=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Ir(this))throw Mr("desiredSize");var n=this._controlledTransformStream._readable._readableStreamController;return $r(n)},enumerable:!1,configurable:!0}),e.prototype.enqueue=function(n){if(n===void 0&&(n=void 0),!Ir(this))throw Mr("enqueue");En(this,n)},e.prototype.error=function(n){if(n===void 0&&(n=void 0),!Ir(this))throw Mr("error");La(this,n)},e.prototype.terminate=function(){if(!Ir(this))throw Mr("terminate");Na(this)},e}();Object.defineProperties(fr.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(fr.prototype,r.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Ir(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")?!1:e instanceof fr}function Ma(e,n,C,ae){n._controlledTransformStream=e,e._transformStreamController=n,n._transformAlgorithm=C,n._flushAlgorithm=ae}function Da(e,n){var C=Object.create(fr.prototype),ae=function(Te){try{return En(C,Te),P(void 0)}catch(Ie){return F(Ie)}},ge=function(){return P(void 0)};n.transform!==void 0&&(ae=function(Te){return n.transform(Te,C)}),n.flush!==void 0&&(ge=function(){return n.flush(C)}),Ma(e,C,ae,ge)}function wn(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0}function En(e,n){var C=e._controlledTransformStream,ae=C._readable._readableStreamController;if(!er(ae))throw new TypeError("Readable side is not in a state that permits enqueue");try{Tr(ae,n)}catch(Te){throw xr(C,Te),C._readable._storedError}var ge=va(ae);ge!==C._backpressure&&Fr(C,!0)}function La(e,n){Or(e._controlledTransformStream,n)}function On(e,n){var C=e._transformAlgorithm(n);return p(C,void 0,function(ae){throw Or(e._controlledTransformStream,ae),ae})}function Na(e){var n=e._controlledTransformStream,C=n._readable._readableStreamController;ur(C);var ae=new TypeError("TransformStream terminated");xr(n,ae)}function Ba(e,n){var C=e._transformStreamController;if(e._backpressure){var ae=e._backpressureChangePromise;return p(ae,function(){var ge=e._writable,Te=ge._state;if(Te==="erroring")throw ge._storedError;return On(C,n)})}return On(C,n)}function Wa(e,n){return Or(e,n),P(void 0)}function Ua(e){var n=e._readable,C=e._transformStreamController,ae=C._flushAlgorithm();return wn(C),p(ae,function(){if(n._state==="errored")throw n._storedError;ur(n._readableStreamController)},function(ge){throw Or(e,ge),n._storedError})}function Ga(e){return Fr(e,!1),e._backpressureChangePromise}function Mr(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function xn(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}t.ByteLengthQueuingStrategy=Pr,t.CountQueuingStrategy=wr,t.ReadableByteStreamController=Ue,t.ReadableStream=Lt,t.ReadableStreamBYOBReader=mt,t.ReadableStreamBYOBRequest=Be,t.ReadableStreamDefaultController=Zt,t.ReadableStreamDefaultReader=Pe,t.TransformStream=Er,t.TransformStreamDefaultController=fr,t.WritableStream=ir,t.WritableStreamDefaultController=Jt,t.WritableStreamDefaultWriter=or,Object.defineProperty(t,"__esModule",{value:!0})})},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.BaseStandardFontDataFactory=a.BaseSVGFactory=a.BaseCanvasFactory=a.BaseCMapReaderFactory=void 0;var r=f(t(2)),i=t(4);function f(F){return F&&F.__esModule?F:{default:F}}function m(F,x,I,g,B,p,l){try{var u=F[p](l),v=u.value}catch(d){I(d);return}u.done?x(v):Promise.resolve(v).then(g,B)}function _(F){return function(){var x=this,I=arguments;return new Promise(function(g,B){var p=F.apply(x,I);function l(v){m(p,g,B,l,u,"next",v)}function u(v){m(p,g,B,l,u,"throw",v)}l(void 0)})}}function D(F,x){if(!(F instanceof x))throw new TypeError("Cannot call a class as a function")}function L(F,x){for(var I=0;I<x.length;I++){var g=x[I];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(F,g.key,g)}}function $(F,x,I){return x&&L(F.prototype,x),I&&L(F,I),F}var j=function(){function F(){D(this,F),this.constructor===F&&(0,i.unreachable)("Cannot initialize BaseCanvasFactory.")}return $(F,[{key:"create",value:function(I,g){if(I<=0||g<=0)throw new Error("Invalid canvas size");var B=this._createCanvas(I,g);return{canvas:B,context:B.getContext("2d")}}},{key:"reset",value:function(I,g,B){if(!I.canvas)throw new Error("Canvas is not specified");if(g<=0||B<=0)throw new Error("Invalid canvas size");I.canvas.width=g,I.canvas.height=B}},{key:"destroy",value:function(I){if(!I.canvas)throw new Error("Canvas is not specified");I.canvas.width=0,I.canvas.height=0,I.canvas=null,I.context=null}},{key:"_createCanvas",value:function(I,g){(0,i.unreachable)("Abstract method `_createCanvas` called.")}}]),F}();a.BaseCanvasFactory=j;var V=function(){function F(x){var I=x.baseUrl,g=I===void 0?null:I,B=x.isCompressed,p=B===void 0?!1:B;D(this,F),this.constructor===F&&(0,i.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=g,this.isCompressed=p}return $(F,[{key:"fetch",value:function(){var x=_(r.default.mark(function g(B){var p=this,l,u,v;return r.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(l=B.name,this.baseUrl){c.next=3;break}throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');case 3:if(l){c.next=5;break}throw new Error("CMap name must be specified.");case 5:return u=this.baseUrl+l+(this.isCompressed?".bcmap":""),v=this.isCompressed?i.CMapCompressionType.BINARY:i.CMapCompressionType.NONE,c.abrupt("return",this._fetchData(u,v).catch(function(b){throw new Error("Unable to load ".concat(p.isCompressed?"binary ":"","CMap at: ").concat(u))}));case 8:case"end":return c.stop()}},g,this)}));function I(g){return x.apply(this,arguments)}return I}()},{key:"_fetchData",value:function(I,g){(0,i.unreachable)("Abstract method `_fetchData` called.")}}]),F}();a.BaseCMapReaderFactory=V;var O=function(){function F(x){var I=x.baseUrl,g=I===void 0?null:I;D(this,F),this.constructor===F&&(0,i.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=g}return $(F,[{key:"fetch",value:function(){var x=_(r.default.mark(function g(B){var p,l;return r.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(p=B.filename,this.baseUrl){v.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(p){v.next=5;break}throw new Error("Font filename must be specified.");case 5:return l="".concat(this.baseUrl).concat(p),v.abrupt("return",this._fetchData(l).catch(function(d){throw new Error("Unable to load font data at: ".concat(l))}));case 7:case"end":return v.stop()}},g,this)}));function I(g){return x.apply(this,arguments)}return I}()},{key:"_fetchData",value:function(I){(0,i.unreachable)("Abstract method `_fetchData` called.")}}]),F}();a.BaseStandardFontDataFactory=O;var P=function(){function F(){D(this,F),this.constructor===F&&(0,i.unreachable)("Cannot initialize BaseSVGFactory.")}return $(F,[{key:"create",value:function(I,g){if(I<=0||g<=0)throw new Error("Invalid SVG dimensions");var B=this._createSVG("svg:svg");return B.setAttribute("version","1.1"),B.setAttribute("width","".concat(I,"px")),B.setAttribute("height","".concat(g,"px")),B.setAttribute("preserveAspectRatio","none"),B.setAttribute("viewBox","0 0 ".concat(I," ").concat(g)),B}},{key:"createElement",value:function(I){if(typeof I!="string")throw new Error("Invalid SVG element type");return this._createSVG(I)}},{key:"_createSVG",value:function(I){(0,i.unreachable)("Abstract method `_createSVG` called.")}}]),F}();a.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);function _interopRequireDefault(y){return y&&y.__esModule?y:{default:y}}function _classPrivateFieldInitSpec(y,a,t){_checkPrivateRedeclaration(y,a),a.set(y,t)}function _checkPrivateRedeclaration(y,a){if(a.has(y))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(y,a,t){var r=_classExtractFieldDescriptor(y,a,"set");return _classApplyDescriptorSet(y,r,t),t}function _classApplyDescriptorSet(y,a,t){if(a.set)a.set.call(y,t);else{if(!a.writable)throw new TypeError("attempted to set read only private field");a.value=t}}function _classPrivateFieldGet(y,a){var t=_classExtractFieldDescriptor(y,a,"get");return _classApplyDescriptorGet(y,t)}function _classExtractFieldDescriptor(y,a,t){if(!a.has(y))throw new TypeError("attempted to "+t+" private field on non-instance");return a.get(y)}function _classApplyDescriptorGet(y,a){return a.get?a.get.call(y):a.value}function _toConsumableArray(y){return _arrayWithoutHoles(y)||_iterableToArray(y)||_unsupportedIterableToArray(y)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _iterableToArray(y){if(typeof Symbol!="undefined"&&y[Symbol.iterator]!=null||y["@@iterator"]!=null)return Array.from(y)}function _arrayWithoutHoles(y){if(Array.isArray(y))return _arrayLikeToArray(y)}function _createForOfIteratorHelper(y,a){var t=typeof Symbol!="undefined"&&y[Symbol.iterator]||y["@@iterator"];if(!t){if(Array.isArray(y)||(t=_unsupportedIterableToArray(y))||a&&y&&typeof y.length=="number"){t&&(y=t);var r=0,i=function(){};return{s:i,n:function(){return r>=y.length?{done:!0}:{done:!1,value:y[r++]}},e:function(L){throw L},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var f=!0,m=!1,_;return{s:function(){t=t.call(y)},n:function(){var L=t.next();return f=L.done,L},e:function(L){m=!0,_=L},f:function(){try{!f&&t.return!=null&&t.return()}finally{if(m)throw _}}}}function _classCallCheck(y,a){if(!(y instanceof a))throw new TypeError("Cannot call a class as a function")}function _defineProperties(y,a){for(var t=0;t<a.length;t++){var r=a[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(y,r.key,r)}}function _createClass(y,a,t){return a&&_defineProperties(y.prototype,a),t&&_defineProperties(y,t),y}function asyncGeneratorStep(y,a,t,r,i,f,m){try{var _=y[f](m),D=_.value}catch(L){t(L);return}_.done?a(D):Promise.resolve(D).then(r,i)}function _asyncToGenerator(y){return function(){var a=this,t=arguments;return new Promise(function(r,i){var f=y.apply(a,t);function m(D){asyncGeneratorStep(f,r,i,m,_,"next",D)}function _(D){asyncGeneratorStep(f,r,i,m,_,"throw",D)}m(void 0)})}}function _slicedToArray(y,a){return _arrayWithHoles(y)||_iterableToArrayLimit(y,a)||_unsupportedIterableToArray(y,a)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray(y,a){if(!!y){if(typeof y=="string")return _arrayLikeToArray(y,a);var t=Object.prototype.toString.call(y).slice(8,-1);if(t==="Object"&&y.constructor&&(t=y.constructor.name),t==="Map"||t==="Set")return Array.from(y);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return _arrayLikeToArray(y,a)}}function _arrayLikeToArray(y,a){(a==null||a>y.length)&&(a=y.length);for(var t=0,r=new Array(a);t<a;t++)r[t]=y[t];return r}function _iterableToArrayLimit(y,a){var t=y==null?null:typeof Symbol!="undefined"&&y[Symbol.iterator]||y["@@iterator"];if(t!=null){var r=[],i=!0,f=!1,m,_;try{for(t=t.call(y);!(i=(m=t.next()).done)&&(r.push(m.value),!(a&&r.length===a));i=!0);}catch(D){f=!0,_=D}finally{try{!i&&t.return!=null&&t.return()}finally{if(f)throw _}}return r}}function _arrayWithHoles(y){if(Array.isArray(y))return y}function _typeof(y){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(t){return typeof t}:_typeof=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(y)}var DEFAULT_RANGE_CHUNK_SIZE=getPar("rangeChunkSize")?parseInt(getPar("rangeChunkSize")):65536*32,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;exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory;var createPDFNetworkStream;function setPDFNetworkStreamFactory(y){createPDFNetworkStream=y}function getPar(y){var a=new RegExp("(^|&)"+y+"=([^&]*)(&|$)"),t=window.location.search.substr(1).match(a);return t!=null?unescape(t[2]):null}function getDocument(y){var a=new PDFDocumentLoadingTask,t;if(typeof y=="string"||y instanceof URL)t={url:y};else if((0,_util.isArrayBuffer)(y))t={data:y};else if(y instanceof PDFDataRangeTransport)t={range:y};else{if(_typeof(y)!=="object")throw new Error("Invalid parameter in getDocument, need either string, URL, Uint8Array, or parameter object.");if(!y.url&&!y.data&&!y.range)throw new Error("Invalid parameter object: need either .data, .range or .url");t=y}var r=Object.create(null),i=null,f=null;for(var m in t){var _=t[m];switch(m){case"url":if(typeof window!="undefined")try{r[m]=new URL(_,window.location).href;continue}catch($){(0,_util.warn)('Cannot create valid URL: "'.concat($,'".'))}else if(typeof _=="string"||_ instanceof URL){r[m]=_.toString();continue}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.");case"range":i=_;continue;case"worker":f=_;continue;case"data":if(_is_node.isNodeJS&&typeof Buffer!="undefined"&&_ instanceof Buffer)r[m]=new Uint8Array(_);else{if(_ instanceof Uint8Array)break;if(typeof _=="string")r[m]=(0,_util.stringToBytes)(_);else if(_typeof(_)==="object"&&_!==null&&!isNaN(_.length))r[m]=new Uint8Array(_);else if((0,_util.isArrayBuffer)(_))r[m]=new Uint8Array(_);else throw new Error("Invalid PDF binary data: either typed array, string, or array-like object is expected in the data property.")}continue}r[m]=_}if(r.rangeChunkSize=r.rangeChunkSize||DEFAULT_RANGE_CHUNK_SIZE,r.CMapReaderFactory=r.CMapReaderFactory||DefaultCMapReaderFactory,r.StandardFontDataFactory=r.StandardFontDataFactory||DefaultStandardFontDataFactory,r.ignoreErrors=r.stopAtErrors!==!0,r.fontExtraProperties=r.fontExtraProperties===!0,r.pdfBug=r.pdfBug===!0,r.enableXfa=r.enableXfa===!0,(typeof r.docBaseUrl!="string"||(0,_display_utils.isDataScheme)(r.docBaseUrl))&&(r.docBaseUrl=null),Number.isInteger(r.maxImageSize)||(r.maxImageSize=-1),typeof r.useWorkerFetch!="boolean"&&(r.useWorkerFetch=r.CMapReaderFactory===_display_utils.DOMCMapReaderFactory&&r.StandardFontDataFactory===_display_utils.DOMStandardFontDataFactory),typeof r.isEvalSupported!="boolean"&&(r.isEvalSupported=!0),typeof r.disableFontFace!="boolean"&&(r.disableFontFace=_is_node.isNodeJS),typeof r.useSystemFonts!="boolean"&&(r.useSystemFonts=!_is_node.isNodeJS&&!r.disableFontFace),typeof r.ownerDocument=="undefined"&&(r.ownerDocument=globalThis.document),typeof r.disableRange!="boolean"&&(r.disableRange=!1),typeof r.disableStream!="boolean"&&(r.disableStream=!1),typeof r.disableAutoFetch!="boolean"&&(r.disableAutoFetch=!1),(0,_util.setVerbosityLevel)(r.verbosity),!f){var D={verbosity:r.verbosity,port:_worker_options.GlobalWorkerOptions.workerPort};f=D.port?PDFWorker.fromPort(D):new PDFWorker(D),a._worker=f}var L=a.docId;return f.promise.then(function(){if(a.destroyed)throw new Error("Loading aborted");var $=_fetchDocument(f,r,i,L),j=new Promise(function(V){var O;i?O=new _transport_stream.PDFDataTransportStream({length:r.length,initialData:r.initialData,progressiveDone:r.progressiveDone,contentDispositionFilename:r.contentDispositionFilename,disableRange:r.disableRange,disableStream:r.disableStream},i):r.data||(O=createPDFNetworkStream({url:r.url,length:r.length,httpHeaders:r.httpHeaders,withCredentials:r.withCredentials,rangeChunkSize:r.rangeChunkSize,disableRange:r.disableRange,disableStream:r.disableStream})),V(O)});return Promise.all([$,j]).then(function(V){var O=_slicedToArray(V,2),P=O[0],F=O[1];if(a.destroyed)throw new Error("Loading aborted");var x=new _message_handler.MessageHandler(L,P,f.port),I=new WorkerTransport(x,a,F,r);a._transport=I,x.send("Ready",null)})}).catch(a._capability.reject),a}function _fetchDocument(y,a,t,r){return _fetchDocument2.apply(this,arguments)}function _fetchDocument2(){return _fetchDocument2=_asyncToGenerator(_regenerator.default.mark(function y(a,t,r,i){var f;return _regenerator.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(!a.destroyed){_.next=2;break}throw new Error("Worker was destroyed");case 2:return r&&(t.length=r.length,t.initialData=r.initialData,t.progressiveDone=r.progressiveDone,t.contentDispositionFilename=r.contentDispositionFilename),_.next=5,a.messageHandler.sendWithPromise("GetDocRequest",{docId:i,apiVersion:"2.12.313",source:{data:t.data,url:t.url,password:t.password,disableAutoFetch:t.disableAutoFetch,rangeChunkSize:t.rangeChunkSize,length:t.length},maxImageSize:t.maxImageSize,disableFontFace:t.disableFontFace,docBaseUrl:t.docBaseUrl,ignoreErrors:t.ignoreErrors,isEvalSupported:t.isEvalSupported,fontExtraProperties:t.fontExtraProperties,enableXfa:t.enableXfa,useSystemFonts:t.useSystemFonts,cMapUrl:t.useWorkerFetch?t.cMapUrl:null,standardFontDataUrl:t.useWorkerFetch?t.standardFontDataUrl:null});case 5:if(f=_.sent,!a.destroyed){_.next=8;break}throw new Error("Worker was destroyed");case 8:return _.abrupt("return",f);case 9:case"end":return _.stop()}},y)})),_fetchDocument2.apply(this,arguments)}var PDFDocumentLoadingTask=function(){function y(){_classCallCheck(this,y),this._capability=(0,_util.createPromiseCapability)(),this._transport=null,this._worker=null,this.docId="d".concat(y.idCounters.doc++),this.destroyed=!1,this.onPassword=null,this.onProgress=null,this.onUnsupportedFeature=null}return _createClass(y,[{key:"promise",get:function(){return this._capability.promise}},{key:"destroy",value:function(){var a=_asyncToGenerator(_regenerator.default.mark(function r(){var i;return _regenerator.default.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return this.destroyed=!0,m.next=3,(i=this._transport)===null||i===void 0?void 0:i.destroy();case 3:this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null);case 5:case"end":return m.stop()}},r,this)}));function t(){return a.apply(this,arguments)}return t}()}],[{key:"idCounters",get:function(){return(0,_util.shadow)(this,"idCounters",{doc:0})}}]),y}();exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;var PDFDataRangeTransport=function(){function y(a,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;_classCallCheck(this,y),this.length=a,this.initialData=t,this.progressiveDone=r,this.contentDispositionFilename=i,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,_util.createPromiseCapability)()}return _createClass(y,[{key:"addRangeListener",value:function(t){this._rangeListeners.push(t)}},{key:"addProgressListener",value:function(t){this._progressListeners.push(t)}},{key:"addProgressiveReadListener",value:function(t){this._progressiveReadListeners.push(t)}},{key:"addProgressiveDoneListener",value:function(t){this._progressiveDoneListeners.push(t)}},{key:"onDataRange",value:function(t,r){var i=_createForOfIteratorHelper(this._rangeListeners),f;try{for(i.s();!(f=i.n()).done;){var m=f.value;m(t,r)}}catch(_){i.e(_)}finally{i.f()}}},{key:"onDataProgress",value:function(t,r){var i=this;this._readyCapability.promise.then(function(){var f=_createForOfIteratorHelper(i._progressListeners),m;try{for(f.s();!(m=f.n()).done;){var _=m.value;_(t,r)}}catch(D){f.e(D)}finally{f.f()}})}},{key:"onDataProgressiveRead",value:function(t){var r=this;this._readyCapability.promise.then(function(){var i=_createForOfIteratorHelper(r._progressiveReadListeners),f;try{for(i.s();!(f=i.n()).done;){var m=f.value;m(t)}}catch(_){i.e(_)}finally{i.f()}})}},{key:"onDataProgressiveDone",value:function(){var t=this;this._readyCapability.promise.then(function(){var r=_createForOfIteratorHelper(t._progressiveDoneListeners),i;try{for(r.s();!(i=r.n()).done;){var f=i.value;f()}}catch(m){r.e(m)}finally{r.f()}})}},{key:"transportReady",value:function(){this._readyCapability.resolve()}},{key:"requestDataRange",value:function(t,r){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}},{key:"abort",value:function(){}}]),y}();exports.PDFDataRangeTransport=PDFDataRangeTransport;var PDFDocumentProxy=function(){function y(a,t){var r=this;_classCallCheck(this,y),this._pdfInfo=a,this._transport=t,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 i=_asyncToGenerator(_regenerator.default.mark(function m(){return _regenerator.default.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return(0,_display_utils.deprecated)("`PDFDocumentProxy.getStats`, please use the `PDFDocumentProxy.stats`-getter instead."),D.abrupt("return",r.stats||{streamTypes:{},fontTypes:{}});case 2:case"end":return D.stop()}},m)}));function f(){return i.apply(this,arguments)}return f}()})}return _createClass(y,[{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(t){return this._transport.getPage(t)}},{key:"getPageIndex",value:function(t){return this._transport.getPageIndex(t)}},{key:"getDestinations",value:function(){return this._transport.getDestinations()}},{key:"getDestination",value:function(t){return this._transport.getDestination(t)}},{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 t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return this._transport.startCleanup(t||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()}}]),y}();exports.PDFDocumentProxy=PDFDocumentProxy;var PDFPageProxy=function(){function y(a,t,r,i){var f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;_classCallCheck(this,y),this._pageIndex=a,this._pageInfo=t,this._ownerDocument=i,this._transport=r,this._stats=f?new _display_utils.StatTimer:null,this._pdfBug=f,this.commonObjs=r.commonObjs,this.objs=new PDFObjects,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this._intentStates=new Map,this._annotationPromises=new Map,this.destroyed=!1}return _createClass(y,[{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 t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.scale,i=t.rotation,f=i===void 0?this.rotate:i,m=t.offsetX,_=m===void 0?0:m,D=t.offsetY,L=D===void 0?0:D,$=t.dontFlip,j=$===void 0?!1:$;return new _display_utils.PageViewport({viewBox:this.view,scale:r,rotation:f,offsetX:_,offsetY:L,dontFlip:j})}},{key:"getAnnotations",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.intent,i=r===void 0?"display":r,f=this._transport.getRenderingIntent(i),m=this._annotationPromises.get(f.cacheKey);return m||(m=this._transport.getAnnotations(this._pageIndex,f.renderingIntent),this._annotationPromises.set(f.cacheKey,m),m=m.then(function(_){var D=_createForOfIteratorHelper(_),L;try{var $=function(){var V=L.value;V.titleObj!==void 0&&Object.defineProperty(V,"title",{get:function(){return(0,_display_utils.deprecated)("`title`-property on annotation, please use `titleObj` instead."),V.titleObj.str}}),V.contentsObj!==void 0&&Object.defineProperty(V,"contents",{get:function(){return(0,_display_utils.deprecated)("`contents`-property on annotation, please use `contentsObj` instead."),V.contentsObj.str}})};for(D.s();!(L=D.n()).done;)$()}catch(j){D.e(j)}finally{D.f()}return _})),m}},{key:"getJSActions",value:function(){return this._jsActionsPromise||(this._jsActionsPromise=this._transport.getPageJSActions(this._pageIndex))}},{key:"getXfa",value:function(){var a=_asyncToGenerator(_regenerator.default.mark(function r(){var i;return _regenerator.default.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.abrupt("return",((i=this._transport._htmlForXfa)===null||i===void 0?void 0:i.children[this._pageIndex])||null);case 1:case"end":return m.stop()}},r,this)}));function t(){return a.apply(this,arguments)}return t}()},{key:"render",value:function(t){var r,i,f=this,m,_=t.canvasContext,D=t.viewport,L=t.intent,$=L===void 0?"display":L,j=t.annotationMode,V=j===void 0?_util.AnnotationMode.ENABLE:j,O=t.transform,P=O===void 0?null:O,F=t.imageLayer,x=F===void 0?null:F,I=t.canvasFactory,g=I===void 0?null:I,B=t.background,p=B===void 0?null:B,l=t.optionalContentConfigPromise,u=l===void 0?null:l,v=t.annotationCanvasMap,d=v===void 0?null:v;((r=arguments[0])===null||r===void 0?void 0:r.renderInteractiveForms)!==void 0&&((0,_display_utils.deprecated)("render no longer accepts the `renderInteractiveForms`-option, please use the `annotationMode`-option instead."),arguments[0].renderInteractiveForms===!0&&V===_util.AnnotationMode.ENABLE&&(V=_util.AnnotationMode.ENABLE_FORMS)),((i=arguments[0])===null||i===void 0?void 0:i.includeAnnotationStorage)!==void 0&&((0,_display_utils.deprecated)("render no longer accepts the `includeAnnotationStorage`-option, please use the `annotationMode`-option instead."),arguments[0].includeAnnotationStorage===!0&&V===_util.AnnotationMode.ENABLE&&(V=_util.AnnotationMode.ENABLE_STORAGE)),this._stats&&this._stats.time("Overall");var c=this._transport.getRenderingIntent($,V);this.pendingCleanup=!1,u||(u=this._transport.getOptionalContentConfig());var b=this._intentStates.get(c.cacheKey);b||(b=Object.create(null),this._intentStates.set(c.cacheKey,b)),b.streamReaderCancelTimeout&&(clearTimeout(b.streamReaderCancelTimeout),b.streamReaderCancelTimeout=null);var T=g||new DefaultCanvasFactory({ownerDocument:this._ownerDocument}),U=!!(c.renderingIntent&_util.RenderingIntentFlag.PRINT);b.displayReadyCapability||(b.displayReadyCapability=(0,_util.createPromiseCapability)(),b.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList(c));var M=function(ie){b.renderTasks.delete(G),(f.cleanupAfterRender||U)&&(f.pendingCleanup=!0),f._tryCleanup(),ie?(G.capability.reject(ie),f._abortOperatorList({intentState:b,reason:ie instanceof Error?ie:new Error(ie)})):G.capability.resolve(),f._stats&&(f._stats.timeEnd("Rendering"),f._stats.timeEnd("Overall"))},G=new InternalRenderTask({callback:M,params:{canvasContext:_,viewport:D,transform:P,imageLayer:x,background:p},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:d,operatorList:b.operatorList,pageIndex:this._pageIndex,canvasFactory:T,useRequestAnimationFrame:!U,pdfBug:this._pdfBug});((m=b).renderTasks||(m.renderTasks=new Set)).add(G);var Z=G.task;return Promise.all([b.displayReadyCapability.promise,u]).then(function(J){var ie=_slicedToArray(J,2),H=ie[0],q=ie[1];if(f.pendingCleanup){M();return}f._stats&&f._stats.time("Rendering"),G.initializeGraphics({transparency:H,optionalContentConfig:q}),G.operatorListChanged()}).catch(M),Z}},{key:"getOperatorList",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.intent,i=r===void 0?"display":r,f=t.annotationMode,m=f===void 0?_util.AnnotationMode.ENABLE:f;function _(){L.operatorList.lastChunk&&(L.opListReadCapability.resolve(L.operatorList),L.renderTasks.delete($))}var D=this._transport.getRenderingIntent(i,m,!0),L=this._intentStates.get(D.cacheKey);L||(L=Object.create(null),this._intentStates.set(D.cacheKey,L));var $;if(!L.opListReadCapability){var j;$=Object.create(null),$.operatorListChanged=_,L.opListReadCapability=(0,_util.createPromiseCapability)(),((j=L).renderTasks||(j.renderTasks=new Set)).add($),L.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList(D)}return L.opListReadCapability.promise}},{key:"streamTextContent",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.normalizeWhitespace,i=r===void 0?!1:r,f=t.disableCombineTextItems,m=f===void 0?!1:f,_=t.includeMarkedContent,D=_===void 0?!1:_,L=100;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,normalizeWhitespace:i===!0,combineTextItems:m!==!0,includeMarkedContent:D===!0},{highWaterMark:L,size:function(j){return j.items.length}})}},{key:"getTextContent",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then(function(i){return _xfa_text.XfaText.textContent(i)});var r=this.streamTextContent(t);return new Promise(function(i,f){function m(){_.read().then(function(L){var $,j=L.value,V=L.done;if(V){i(D);return}Object.assign(D.styles,j.styles),($=D.items).push.apply($,_toConsumableArray(j.items)),m()},f)}var _=r.getReader(),D={items:[],styles:Object.create(null)};m()})}},{key:"getStructTree",value:function(){return this._structTreePromise||(this._structTreePromise=this._transport.getStructTree(this._pageIndex))}},{key:"_destroy",value:function(){this.destroyed=!0;var t=[],r=_createForOfIteratorHelper(this._intentStates.values()),i;try{for(r.s();!(i=r.n()).done;){var f=i.value;if(this._abortOperatorList({intentState:f,reason:new Error("Page was destroyed."),force:!0}),!f.opListReadCapability){var m=_createForOfIteratorHelper(f.renderTasks),_;try{for(m.s();!(_=m.n()).done;){var D=_.value;t.push(D.completed),D.cancel()}}catch(L){m.e(L)}finally{m.f()}}}}catch(L){r.e(L)}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 t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return this.pendingCleanup=!0,this._tryCleanup(t)}},{key:"_tryCleanup",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!this.pendingCleanup)return!1;var r=_createForOfIteratorHelper(this._intentStates.values()),i;try{for(r.s();!(i=r.n()).done;){var f=i.value,m=f.renderTasks,_=f.operatorList;if(m.size>0||!_.lastChunk)return!1}}catch(D){r.e(D)}finally{r.f()}return this._intentStates.clear(),this.objs.clear(),this._annotationPromises.clear(),this._jsActionsPromise=null,this._structTreePromise=null,t&&this._stats&&(this._stats=new _display_utils.StatTimer),this.pendingCleanup=!1,!0}},{key:"_startRenderPage",value:function(t,r){var i=this._intentStates.get(r);!i||(this._stats&&this._stats.timeEnd("Page Request"),i.displayReadyCapability&&i.displayReadyCapability.resolve(t))}},{key:"_renderPageChunk",value:function(t,r){for(var i=0,f=t.length;i<f;i++)r.operatorList.fnArray.push(t.fnArray[i]),r.operatorList.argsArray.push(t.argsArray[i]);r.operatorList.lastChunk=t.lastChunk;var m=_createForOfIteratorHelper(r.renderTasks),_;try{for(m.s();!(_=m.n()).done;){var D=_.value;D.operatorListChanged()}}catch(L){m.e(L)}finally{m.f()}t.lastChunk&&this._tryCleanup()}},{key:"_pumpOperatorList",value:function(t){var r=this,i=t.renderingIntent,f=t.cacheKey,m=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:i,cacheKey:f,annotationStorage:i&_util.RenderingIntentFlag.ANNOTATIONS_STORAGE?this._transport.annotationStorage.serializable:null}),_=m.getReader(),D=this._intentStates.get(f);D.streamReader=_;var L=function $(){_.read().then(function(j){var V=j.value,O=j.done;if(O){D.streamReader=null;return}r._transport.destroyed||(r._renderPageChunk(V,D),$())},function(j){if(D.streamReader=null,!r._transport.destroyed){if(D.operatorList){D.operatorList.lastChunk=!0;var V=_createForOfIteratorHelper(D.renderTasks),O;try{for(V.s();!(O=V.n()).done;){var P=O.value;P.operatorListChanged()}}catch(F){V.e(F)}finally{V.f()}r._tryCleanup()}if(D.displayReadyCapability)D.displayReadyCapability.reject(j);else if(D.opListReadCapability)D.opListReadCapability.reject(j);else throw j}})};L()}},{key:"_abortOperatorList",value:function(t){var r=this,i=t.intentState,f=t.reason,m=t.force,_=m===void 0?!1:m;if(!!i.streamReader){if(!_){if(i.renderTasks.size>0)return;if(f instanceof _display_utils.RenderingCancelledException){i.streamReaderCancelTimeout=setTimeout(function(){r._abortOperatorList({intentState:i,reason:f,force:!0}),i.streamReaderCancelTimeout=null},RENDERING_CANCELLED_TIMEOUT);return}}if(i.streamReader.cancel(new _util.AbortException(f.message)).catch(function(){}),i.streamReader=null,!this._transport.destroyed){var D=_createForOfIteratorHelper(this._intentStates),L;try{for(D.s();!(L=D.n()).done;){var $=_slicedToArray(L.value,2),j=$[0],V=$[1];if(V===i){this._intentStates.delete(j);break}}}catch(O){D.e(O)}finally{D.f()}this.cleanup()}}}},{key:"stats",get:function(){return this._stats}}]),y}();exports.PDFPageProxy=PDFPageProxy;var LoopbackPort=function(){function y(){_classCallCheck(this,y),this._listeners=[],this._deferred=Promise.resolve()}return _createClass(y,[{key:"postMessage",value:function(t,r){var i=this;function f(_){if(globalThis.structuredClone)return globalThis.structuredClone(_,r);function D($){if(typeof $=="function"||_typeof($)==="symbol"||$ instanceof URL)throw new Error("LoopbackPort.postMessage - cannot clone: ".concat($==null?void 0:$.toString()));if(_typeof($)!=="object"||$===null)return $;if(L.has($))return L.get($);var j,V;if((j=$.buffer)&&(0,_util.isArrayBuffer)(j))return r!=null&&r.includes(j)?V=new $.constructor(j,$.byteOffset,$.byteLength):V=new $.constructor($),L.set($,V),V;if($ instanceof Map){V=new Map,L.set($,V);var O=_createForOfIteratorHelper($),P;try{for(O.s();!(P=O.n()).done;){var F=_slicedToArray(P.value,2),x=F[0],I=F[1];V.set(x,D(I))}}catch(c){O.e(c)}finally{O.f()}return V}if($ instanceof Set){V=new Set,L.set($,V);var g=_createForOfIteratorHelper($),B;try{for(g.s();!(B=g.n()).done;){var p=B.value;V.add(D(p))}}catch(c){g.e(c)}finally{g.f()}return V}V=Array.isArray($)?[]:Object.create(null),L.set($,V);for(var l in $){for(var u,v=void 0,d=$;!(v=Object.getOwnPropertyDescriptor(d,l));)d=Object.getPrototypeOf(d);typeof v.value!="undefined"&&(typeof v.value=="function"&&!((u=$.hasOwnProperty)!==null&&u!==void 0&&u.call($,l))||(V[l]=D(v.value)))}return V}var L=new WeakMap;return D(_)}var m={data:f(t)};this._deferred.then(function(){var _=_createForOfIteratorHelper(i._listeners),D;try{for(_.s();!(D=_.n()).done;){var L=D.value;L.call(i,m)}}catch($){_.e($)}finally{_.f()}})}},{key:"addEventListener",value:function(t,r){this._listeners.push(r)}},{key:"removeEventListener",value:function(t,r){var i=this._listeners.indexOf(r);this._listeners.splice(i,1)}},{key:"terminate",value:function(){this._listeners.length=0}}]),y}();exports.LoopbackPort=LoopbackPort;var PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};{if(_is_node.isNodeJS&&typeof require=="function")PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="pdfjs/build/pdf.worker.js";else if((typeof document=="undefined"?"undefined":_typeof(document))==="object"){var _document,_document$currentScri,pdfjsFilePath=(_document=document)===null||_document===void 0||(_document$currentScri=_document.currentScript)===null||_document$currentScri===void 0?void 0:_document$currentScri.src;pdfjsFilePath&&(PDFWorkerUtil.fallbackWorkerSrc=pdfjsFilePath.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.createCDNWrapper=function(y){var a='importScripts("'.concat(y,'");');return URL.createObjectURL(new Blob([a]))}}var PDFWorker=function(){function PDFWorker(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=y.name,t=a===void 0?null:a,r=y.port,i=r===void 0?null:r,f=y.verbosity,m=f===void 0?(0,_util.getVerbosityLevel)():f;if(_classCallCheck(this,PDFWorker),i&&PDFWorker._workerPorts.has(i))throw new Error("Cannot use more than one PDFWorker per port.");if(this.name=t,this.destroyed=!1,this.verbosity=m,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,i){PDFWorker._workerPorts.set(i,this),this._initializeFromPort(i);return}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(a){this._port=a,this._messageHandler=new _message_handler.MessageHandler("main","worker",a),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve()}},{key:"_initialize",value:function(){var a=this;if(typeof Worker!="undefined"&&!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),i=new _message_handler.MessageHandler("main","worker",r),f=function(){r.removeEventListener("error",m),i.destroy(),r.terminate(),a.destroyed?a._readyCapability.reject(new Error("Worker was destroyed")):a._setupFakeWorker()},m=function(){a._webWorker||f()};r.addEventListener("error",m),i.on("test",function(D){if(r.removeEventListener("error",m),a.destroyed){f();return}D?(a._messageHandler=i,a._port=r,a._webWorker=r,a._readyCapability.resolve(),i.send("configure",{verbosity:a.verbosity})):(a._setupFakeWorker(),i.destroy(),r.terminate())}),i.on("ready",function(D){if(r.removeEventListener("error",m),a.destroyed){f();return}try{_()}catch(L){a._setupFakeWorker()}});var _=function(){var L=new Uint8Array([255]);try{i.send("test",L,[L.buffer])}catch($){(0,_util.warn)("Cannot use postMessage transfers."),L[0]=0,i.send("test",L)}};_();return}catch(D){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}},{key:"_setupFakeWorker",value:function(){var a=this;PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),PDFWorker._setupFakeWorkerGlobal.then(function(t){if(a.destroyed){a._readyCapability.reject(new Error("Worker was destroyed"));return}var r=new LoopbackPort;a._port=r;var i="fake".concat(PDFWorkerUtil.fakeWorkerId++),f=new _message_handler.MessageHandler(i+"_worker",i,r);t.setup(f,r);var m=new _message_handler.MessageHandler(i,i+"_worker",r);a._messageHandler=m,a._readyCapability.resolve(),m.send("configure",{verbosity:a.verbosity})}).catch(function(t){a._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(a){if(!(a!=null&&a.port))throw new Error("PDFWorker.fromPort - invalid method signature.");return this._workerPorts.has(a.port)?this._workerPorts.get(a.port):new PDFWorker(a)}},{key:"workerSrc",get:function(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(PDFWorkerUtil.fallbackWorkerSrc!==null)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 a;return((a=globalThis.pdfjsWorker)===null||a===void 0?void 0:a.WorkerMessageHandler)||null}catch(t){return null}}},{key:"_setupFakeWorkerGlobal",get:function(){var _this11=this,loader=function(){var _ref15=_asyncToGenerator(_regenerator.default.mark(function _callee4(){var mainWorkerMessageHandler,worker;return _regenerator.default.wrap(function(_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&&typeof require=="function")){_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 y(a,t,r,i){_classCallCheck(this,y),_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=a,this.loadingTask=t,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({docId:t.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),ownerDocument:i.ownerDocument,styleElement:i.styleElement}),this._params=i,i.useWorkerFetch||(this.CMapReaderFactory=new i.CMapReaderFactory({baseUrl:i.cMapUrl,isCompressed:i.cMapPacked}),this.StandardFontDataFactory=new i.StandardFontDataFactory({baseUrl:i.standardFontDataUrl})),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=r,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}return _createClass(y,[{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(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_util.AnnotationMode.ENABLE,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,f=_util.RenderingIntentFlag.DISPLAY,m="";switch(t){case"any":f=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":f=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)("getRenderingIntent - invalid intent: ".concat(t))}switch(r){case _util.AnnotationMode.DISABLE:f+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:f+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:f+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,m=this.annotationStorage.lastModified;break;default:(0,_util.warn)("getRenderingIntent - invalid annotationMode: ".concat(r))}return i&&(f+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:f,cacheKey:"".concat(f,"_").concat(m)}}},{key:"destroy",value:function(){var t=this;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=(0,_util.createPromiseCapability)(),this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));var r=[],i=_createForOfIteratorHelper(_classPrivateFieldGet(this,_pageCache).values()),f;try{for(i.s();!(f=i.n()).done;){var m=f.value;r.push(m._destroy())}}catch(D){i.e(D)}finally{i.f()}_classPrivateFieldGet(this,_pageCache).clear(),_classPrivateFieldGet(this,_pagePromises).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();var _=this.messageHandler.sendWithPromise("Terminate",null);return r.push(_),Promise.all(r).then(function(){t.commonObjs.clear(),t.fontLoader.clear(),_classPrivateFieldSet(t,_metadataPromise,null),t._getFieldObjectsPromise=null,t._hasJSActionsPromise=null,t._networkStream&&t._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),t.messageHandler&&(t.messageHandler.destroy(),t.messageHandler=null),t.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}},{key:"setupMessageHandler",value:function(){var t=this,r=this.messageHandler,i=this.loadingTask;r.on("GetReader",function(f,m){(0,_util.assert)(t._networkStream,"GetReader - no `IPDFStream` instance available."),t._fullReader=t._networkStream.getFullReader(),t._fullReader.onProgress=function(_){t._lastProgress={loaded:_.loaded,total:_.total}},m.onPull=function(){t._fullReader.read().then(function(_){var D=_.value,L=_.done;if(L){m.close();return}(0,_util.assert)((0,_util.isArrayBuffer)(D),"GetReader - expected an ArrayBuffer."),m.enqueue(new Uint8Array(D),1,[D])}).catch(function(_){m.error(_)})},m.onCancel=function(_){t._fullReader.cancel(_),m.ready.catch(function(D){if(!t.destroyed)throw D})}}),r.on("ReaderHeadersReady",function(f){var m=(0,_util.createPromiseCapability)(),_=t._fullReader;return _.headersReady.then(function(){if(!_.isStreamingSupported||!_.isRangeSupported){if(t._lastProgress){var D;(D=i.onProgress)===null||D===void 0||D.call(i,t._lastProgress)}_.onProgress=function(L){var $;($=i.onProgress)===null||$===void 0||$.call(i,{loaded:L.loaded,total:L.total})}}m.resolve({isStreamingSupported:_.isStreamingSupported,isRangeSupported:_.isRangeSupported,contentLength:_.contentLength})},m.reject),m.promise}),r.on("GetRangeReader",function(f,m){(0,_util.assert)(t._networkStream,"GetRangeReader - no `IPDFStream` instance available.");var _=t._networkStream.getRangeReader(f.begin,f.end);if(!_){m.close();return}m.onPull=function(){_.read().then(function(D){var L=D.value,$=D.done;if($){m.close();return}(0,_util.assert)((0,_util.isArrayBuffer)(L),"GetRangeReader - expected an ArrayBuffer."),m.enqueue(new Uint8Array(L),1,[L])}).catch(function(D){m.error(D)})},m.onCancel=function(D){_.cancel(D),m.ready.catch(function(L){if(!t.destroyed)throw L})}}),r.on("GetDoc",function(f){var m=f.pdfInfo;t._numPages=m.numPages,t._htmlForXfa=m.htmlForXfa,delete m.htmlForXfa,i._capability.resolve(new PDFDocumentProxy(m,t))}),r.on("DocException",function(f){var m;switch(f.name){case"PasswordException":m=new _util.PasswordException(f.message,f.code);break;case"InvalidPDFException":m=new _util.InvalidPDFException(f.message);break;case"MissingPDFException":m=new _util.MissingPDFException(f.message);break;case"UnexpectedResponseException":m=new _util.UnexpectedResponseException(f.message,f.status);break;case"UnknownErrorException":m=new _util.UnknownErrorException(f.message,f.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}i._capability.reject(m)}),r.on("PasswordRequest",function(f){if(t._passwordCapability=(0,_util.createPromiseCapability)(),i.onPassword){var m=function(D){t._passwordCapability.resolve({password:D})};try{i.onPassword(m,f.code)}catch(_){t._passwordCapability.reject(_)}}else t._passwordCapability.reject(new _util.PasswordException(f.message,f.code));return t._passwordCapability.promise}),r.on("DataLoaded",function(f){var m;(m=i.onProgress)===null||m===void 0||m.call(i,{loaded:f.length,total:f.length}),t.downloadInfoCapability.resolve(f)}),r.on("StartRenderPage",function(f){if(!t.destroyed){var m=_classPrivateFieldGet(t,_pageCache).get(f.pageIndex);m._startRenderPage(f.transparency,f.cacheKey)}}),r.on("commonobj",function(f){var m,_=_slicedToArray(f,3),D=_[0],L=_[1],$=_[2];if(!t.destroyed&&!t.commonObjs.has(D))switch(L){case"Font":var j=t._params;if("error"in $){var V=$.error;(0,_util.warn)("Error during font loading: ".concat(V)),t.commonObjs.resolve(D,V);break}var O=null;j.pdfBug&&(m=globalThis.FontInspector)!==null&&m!==void 0&&m.enabled&&(O={registerFont:function(x,I){globalThis.FontInspector.fontAdded(x,I)}});var P=new _font_loader.FontFaceObject($,{isEvalSupported:j.isEvalSupported,disableFontFace:j.disableFontFace,ignoreErrors:j.ignoreErrors,onUnsupportedFeature:t._onUnsupportedFeature.bind(t),fontRegistry:O});t.fontLoader.bind(P).catch(function(F){return r.sendWithPromise("FontFallback",{id:D})}).finally(function(){!j.fontExtraProperties&&P.data&&(P.data=null),t.commonObjs.resolve(D,P)});break;case"FontPath":case"Image":t.commonObjs.resolve(D,$);break;default:throw new Error("Got unknown common object type ".concat(L))}}),r.on("obj",function(f){var m,_=_slicedToArray(f,4),D=_[0],L=_[1],$=_[2],j=_[3];if(!t.destroyed){var V=_classPrivateFieldGet(t,_pageCache).get(L);if(!V.objs.has(D))switch($){case"Image":V.objs.resolve(D,j);var O=8e6;(j==null||(m=j.data)===null||m===void 0?void 0:m.length)>O&&(V.cleanupAfterRender=!0);break;case"Pattern":V.objs.resolve(D,j);break;default:throw new Error("Got unknown object type ".concat($))}}}),r.on("DocProgress",function(f){var m;t.destroyed||(m=i.onProgress)===null||m===void 0||m.call(i,{loaded:f.loaded,total:f.total})}),r.on("DocStats",function(f){t.destroyed||_classPrivateFieldSet(t,_docStats,Object.freeze({streamTypes:Object.freeze(f.streamTypes),fontTypes:Object.freeze(f.fontTypes)}))}),r.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),r.on("FetchBuiltInCMap",function(f){return t.destroyed?Promise.reject(new Error("Worker was destroyed.")):t.CMapReaderFactory?t.CMapReaderFactory.fetch(f):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))}),r.on("FetchStandardFontData",function(f){return t.destroyed?Promise.reject(new Error("Worker was destroyed.")):t.StandardFontDataFactory?t.StandardFontDataFactory.fetch(f):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))})}},{key:"_onUnsupportedFeature",value:function(t){var r,i,f=t.featureId;this.destroyed||(r=(i=this.loadingTask).onUnsupportedFeature)===null||r===void 0||r.call(i,f)}},{key:"getData",value:function(){return this.messageHandler.sendWithPromise("GetData",null)}},{key:"getPage",value:function(t){var r=this;if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request"));var i=t-1,f=_classPrivateFieldGet(this,_pagePromises).get(i);if(f)return f;var m=this.messageHandler.sendWithPromise("GetPage",{pageIndex:i}).then(function(_){if(r.destroyed)throw new Error("Transport destroyed");var D=new PDFPageProxy(i,_,r,r._params.ownerDocument,r._params.pdfBug);return _classPrivateFieldGet(r,_pageCache).set(i,D),D});return _classPrivateFieldGet(this,_pagePromises).set(i,m),m}},{key:"getPageIndex",value:function(t){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:t})}},{key:"getAnnotations",value:function(t,r){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:r})}},{key:"saveDocument",value:function(){var t,r,i=this;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:this.annotationStorage.serializable,filename:(t=(r=this._fullReader)===null||r===void 0?void 0:r.filename)!==null&&t!==void 0?t:null}).finally(function(){i.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(t){return typeof t!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}},{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.sendWithPromise("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(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}},{key:"getStructTree",value:function(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}},{key:"getOutline",value:function(){return this.messageHandler.sendWithPromise("GetOutline",null)}},{key:"getOptionalContentConfig",value:function(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(function(t){return new _optional_content_config.OptionalContentConfig(t)})}},{key:"getPermissions",value:function(){return this.messageHandler.sendWithPromise("GetPermissions",null)}},{key:"getMetadata",value:function(){var t=this;return _classPrivateFieldGet(this,_metadataPromise)||_classPrivateFieldSet(this,_metadataPromise,this.messageHandler.sendWithPromise("GetMetadata",null).then(function(r){var i,f,m,_;return{info:r[0],metadata:r[1]?new _metadata.Metadata(r[1]):null,contentDispositionFilename:(i=(f=t._fullReader)===null||f===void 0?void 0:f.filename)!==null&&i!==void 0?i:null,contentLength:(m=(_=t._fullReader)===null||_===void 0?void 0:_.contentLength)!==null&&m!==void 0?m:null}}))}},{key:"getMarkInfo",value:function(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}},{key:"startCleanup",value:function(){var a=_asyncToGenerator(_regenerator.default.mark(function r(){var i,f,m,_,D,L=arguments;return _regenerator.default.wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return i=L.length>0&&L[0]!==void 0?L[0]:!1,j.next=3,this.messageHandler.sendWithPromise("Cleanup",null);case 3:if(!this.destroyed){j.next=5;break}return j.abrupt("return");case 5:f=_createForOfIteratorHelper(_classPrivateFieldGet(this,_pageCache).values()),j.prev=6,f.s();case 8:if((m=f.n()).done){j.next=15;break}if(_=m.value,D=_.cleanup(),D){j.next=13;break}throw new Error("startCleanup: Page ".concat(_.pageNumber," is currently rendering."));case 13:j.next=8;break;case 15:j.next=20;break;case 17:j.prev=17,j.t0=j.catch(6),f.e(j.t0);case 20:return j.prev=20,f.f(),j.finish(20);case 23:this.commonObjs.clear(),i||this.fontLoader.clear(),_classPrivateFieldSet(this,_metadataPromise,null),this._getFieldObjectsPromise=null,this._hasJSActionsPromise=null;case 28:case"end":return j.stop()}},r,this,[[6,17,20,23]])}));function t(){return a.apply(this,arguments)}return t}()},{key:"loadingParams",get:function(){var t=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:t.disableAutoFetch,enableXfa:t.enableXfa})}}]),y}(),PDFObjects=function(){function y(){_classCallCheck(this,y),this._objs=Object.create(null)}return _createClass(y,[{key:"_ensureObj",value:function(t){return this._objs[t]?this._objs[t]:this._objs[t]={capability:(0,_util.createPromiseCapability)(),data:null,resolved:!1}}},{key:"get",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(r)return this._ensureObj(t).capability.promise.then(r),null;var i=this._objs[t];if(!i||!i.resolved)throw new Error("Requesting object that isn't resolved yet ".concat(t,"."));return i.data}},{key:"has",value:function(t){var r=this._objs[t];return(r==null?void 0:r.resolved)||!1}},{key:"resolve",value:function(t,r){var i=this._ensureObj(t);i.resolved=!0,i.data=r,i.capability.resolve(r)}},{key:"clear",value:function(){this._objs=Object.create(null)}}]),y}(),RenderTask=function(){function y(a){_classCallCheck(this,y),this._internalRenderTask=a,this.onContinue=null}return _createClass(y,[{key:"promise",get:function(){return this._internalRenderTask.capability.promise}},{key:"cancel",value:function(){this._internalRenderTask.cancel()}}]),y}();exports.RenderTask=RenderTask;var InternalRenderTask=function(){function y(a){var t=a.callback,r=a.params,i=a.objs,f=a.commonObjs,m=a.annotationCanvasMap,_=a.operatorList,D=a.pageIndex,L=a.canvasFactory,$=a.useRequestAnimationFrame,j=$===void 0?!1:$,V=a.pdfBug,O=V===void 0?!1:V;_classCallCheck(this,y),this.callback=t,this.params=r,this.objs=i,this.commonObjs=f,this.annotationCanvasMap=m,this.operatorListIdx=null,this.operatorList=_,this._pageIndex=D,this.canvasFactory=L,this._pdfBug=O,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=j===!0&&typeof window!="undefined",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=r.canvasContext.canvas}return _createClass(y,[{key:"completed",get:function(){return this.capability.promise.catch(function(){})}},{key:"initializeGraphics",value:function(t){var r,i=t.transparency,f=i===void 0?!1:i,m=t.optionalContentConfig;if(!this.cancelled){if(this._canvas){if(y.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.");y.canvasInUse.add(this._canvas)}this._pdfBug&&(r=globalThis.StepperManager)!==null&&r!==void 0&&r.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());var _=this.params,D=_.canvasContext,L=_.viewport,$=_.transform,j=_.imageLayer,V=_.background;this.gfx=new _canvas.CanvasGraphics(D,this.commonObjs,this.objs,this.canvasFactory,j,m,this.annotationCanvasMap),this.gfx.beginDrawing({transform:$,viewport:L,transparency:f,background:V}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}}},{key:"cancel",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;this.running=!1,this.cancelled=!0,this.gfx&&this.gfx.endDrawing(),this._canvas&&y.canvasInUse.delete(this._canvas),this.callback(t||new _display_utils.RenderingCancelledException("Rendering cancelled, page ".concat(this._pageIndex+1),"canvas"))}},{key:"operatorListChanged",value:function(){if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}this.stepper&&this.stepper.updateOperatorList(this.operatorList),!this.running&&this._continue()}},{key:"_continue",value:function(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}},{key:"_scheduleNext",value:function(){var t=this;this._useRequestAnimationFrame?window.requestAnimationFrame(function(){t._nextBound().catch(t._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}},{key:"_next",value:function(){var a=_asyncToGenerator(_regenerator.default.mark(function r(){return _regenerator.default.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(!this.cancelled){f.next=2;break}return f.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&&y.canvasInUse.delete(this._canvas),this.callback()));case 4:case"end":return f.stop()}},r,this)}));function t(){return a.apply(this,arguments)}return t}()}],[{key:"canvasInUse",get:function(){return(0,_util.shadow)(this,"canvasInUse",new WeakSet)}}]),y}(),version="2.12.313";exports.version=version;var build="a2ae56f39";exports.build=build},(y,a,t)=>{"use strict";function r(c){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?r=function(T){return typeof T}:r=function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},r(c)}Object.defineProperty(a,"__esModule",{value:!0}),a.FontLoader=a.FontFaceObject=void 0;var i=m(t(2)),f=t(4);function m(c){return c&&c.__esModule?c:{default:c}}function _(c,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(b&&b.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),b&&D(c,b)}function D(c,b){return D=Object.setPrototypeOf||function(U,M){return U.__proto__=M,U},D(c,b)}function L(c){var b=V();return function(){var U=O(c),M;if(b){var G=O(this).constructor;M=Reflect.construct(U,arguments,G)}else M=U.apply(this,arguments);return $(this,M)}}function $(c,b){if(b&&(r(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return j(c)}function j(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function V(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(c){return!1}}function O(c){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(T){return T.__proto__||Object.getPrototypeOf(T)},O(c)}function P(c,b,T,U,M,G,Z){try{var J=c[G](Z),ie=J.value}catch(H){T(H);return}J.done?b(ie):Promise.resolve(ie).then(U,M)}function F(c){return function(){var b=this,T=arguments;return new Promise(function(U,M){var G=c.apply(b,T);function Z(ie){P(G,U,M,Z,J,"next",ie)}function J(ie){P(G,U,M,Z,J,"throw",ie)}Z(void 0)})}}function x(c,b){var T=typeof Symbol!="undefined"&&c[Symbol.iterator]||c["@@iterator"];if(!T){if(Array.isArray(c)||(T=I(c))||b&&c&&typeof c.length=="number"){T&&(c=T);var U=0,M=function(){};return{s:M,n:function(){return U>=c.length?{done:!0}:{done:!1,value:c[U++]}},e:function(H){throw H},f:M}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var G=!0,Z=!1,J;return{s:function(){T=T.call(c)},n:function(){var H=T.next();return G=H.done,H},e:function(H){Z=!0,J=H},f:function(){try{!G&&T.return!=null&&T.return()}finally{if(Z)throw J}}}}function I(c,b){if(!!c){if(typeof c=="string")return g(c,b);var T=Object.prototype.toString.call(c).slice(8,-1);if(T==="Object"&&c.constructor&&(T=c.constructor.name),T==="Map"||T==="Set")return Array.from(c);if(T==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(T))return g(c,b)}}function g(c,b){(b==null||b>c.length)&&(b=c.length);for(var T=0,U=new Array(b);T<b;T++)U[T]=c[T];return U}function B(c,b){if(!(c instanceof b))throw new TypeError("Cannot call a class as a function")}function p(c,b){for(var T=0;T<b.length;T++){var U=b[T];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(c,U.key,U)}}function l(c,b,T){return b&&p(c.prototype,b),T&&p(c,T),c}var u=function(){function c(b){var T=b.docId,U=b.onUnsupportedFeature,M=b.ownerDocument,G=M===void 0?globalThis.document:M,Z=b.styleElement,J=Z===void 0?null:Z;B(this,c),this.constructor===c&&(0,f.unreachable)("Cannot initialize BaseFontLoader."),this.docId=T,this._onUnsupportedFeature=U,this._document=G,this.nativeFontFaces=[],this.styleElement=null}return l(c,[{key:"addNativeFontFace",value:function(T){this.nativeFontFaces.push(T),this._document.fonts.add(T)}},{key:"insertRule",value:function(T){var U=this.styleElement;U||(U=this.styleElement=this._document.createElement("style"),U.id="PDFJS_FONT_STYLE_TAG_".concat(this.docId),this._document.documentElement.getElementsByTagName("head")[0].appendChild(U));var M=U.sheet;M.insertRule(T,M.cssRules.length)}},{key:"clear",value:function(){var T=x(this.nativeFontFaces),U;try{for(T.s();!(U=T.n()).done;){var M=U.value;this._document.fonts.delete(M)}}catch(G){T.e(G)}finally{T.f()}this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}},{key:"bind",value:function(){var b=F(i.default.mark(function U(M){var G=this,Z,J;return i.default.wrap(function(H){for(;;)switch(H.prev=H.next){case 0:if(!(M.attached||M.missingFile)){H.next=2;break}return H.abrupt("return");case 2:if(M.attached=!0,!this.isFontLoadingAPISupported){H.next=19;break}if(Z=M.createNativeFontFace(),!Z){H.next=18;break}return this.addNativeFontFace(Z),H.prev=7,H.next=10,Z.loaded;case 10:H.next=18;break;case 12:throw H.prev=12,H.t0=H.catch(7),this._onUnsupportedFeature({featureId:f.UNSUPPORTED_FEATURES.errorFontLoadNative}),(0,f.warn)("Failed to load font '".concat(Z.family,"': '").concat(H.t0,"'.")),M.disableFontFace=!0,H.t0;case 18:return H.abrupt("return");case 19:if(J=M.createFontFaceRule(),!J){H.next=26;break}if(this.insertRule(J),!this.isSyncFontLoadingSupported){H.next=24;break}return H.abrupt("return");case 24:return H.next=26,new Promise(function(q){var R=G._queueLoadingCallback(q);G._prepareFontLoadEvent([J],[M],R)});case 26:case"end":return H.stop()}},U,this,[[7,12]])}));function T(U){return b.apply(this,arguments)}return T}()},{key:"_queueLoadingCallback",value:function(T){(0,f.unreachable)("Abstract method `_queueLoadingCallback`.")}},{key:"isFontLoadingAPISupported",get:function(){var T,U=!!((T=this._document)!==null&&T!==void 0&&T.fonts);return(0,f.shadow)(this,"isFontLoadingAPISupported",U)}},{key:"isSyncFontLoadingSupported",get:function(){(0,f.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}},{key:"_loadTestFont",get:function(){(0,f.unreachable)("Abstract method `_loadTestFont`.")}},{key:"_prepareFontLoadEvent",value:function(T,U,M){(0,f.unreachable)("Abstract method `_prepareFontLoadEvent`.")}}]),c}(),v;a.FontLoader=v,a.FontLoader=v=function(c){_(T,c);var b=L(T);function T(U){var M;return B(this,T),M=b.call(this,U),M.loadingContext={requests:[],nextRequestId:0},M.loadTestFontId=0,M}return l(T,[{key:"isSyncFontLoadingSupported",get:function(){var M=!1;if(typeof navigator=="undefined")M=!0;else{var G=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);(G==null?void 0:G[1])>=14&&(M=!0)}return(0,f.shadow)(this,"isSyncFontLoadingSupported",M)}},{key:"_queueLoadingCallback",value:function(M){function G(){for((0,f.assert)(!J.done,"completeRequest() cannot be called twice."),J.done=!0;Z.requests.length>0&&Z.requests[0].done;){var ie=Z.requests.shift();setTimeout(ie.callback,0)}}var Z=this.loadingContext,J={id:"pdfjs-font-loading-".concat(Z.nextRequestId++),done:!1,complete:G,callback:M};return Z.requests.push(J),J}},{key:"_loadTestFont",get:function(){var M=function(){return atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==")};return(0,f.shadow)(this,"_loadTestFont",M())}},{key:"_prepareFontLoadEvent",value:function(M,G,Z){function J(me,pe){return me.charCodeAt(pe)<<24|me.charCodeAt(pe+1)<<16|me.charCodeAt(pe+2)<<8|me.charCodeAt(pe+3)&255}function ie(me,pe,Ae,Pe){var _e=me.substring(0,pe),We=me.substring(pe+Ae);return _e+Pe+We}var H,q,R=this._document.createElement("canvas");R.width=1,R.height=1;var h=R.getContext("2d"),A=0;function E(me,pe){if(A++,A>30){(0,f.warn)("Load test font never loaded."),pe();return}h.font="30px "+me,h.fillText(".",0,20);var Ae=h.getImageData(0,0,1,1);if(Ae.data[3]>0){pe();return}setTimeout(E.bind(null,me,pe))}var K="lt".concat(Date.now()).concat(this.loadTestFontId++),te=this._loadTestFont,Y=976;te=ie(te,Y,K.length,K);var be=16,Ce=1482184792,we=J(te,be);for(H=0,q=K.length-3;H<q;H+=4)we=we-Ce+J(K,H)|0;H<K.length&&(we=we-Ce+J(K+"XXX",H)|0),te=ie(te,be,4,(0,f.string32)(we));var Me="url(data:font/opentype;base64,".concat(btoa(te),");"),S='@font-face {font-family:"'.concat(K,'";src:').concat(Me,"}");this.insertRule(S);var w=[],s=x(G),o;try{for(s.s();!(o=s.n()).done;){var k=o.value;w.push(k.loadedName)}}catch(me){s.e(me)}finally{s.f()}w.push(K);var N=this._document.createElement("div");N.style.visibility="hidden",N.style.width=N.style.height="10px",N.style.position="absolute",N.style.top=N.style.left="0px";for(var W=0,re=w;W<re.length;W++){var fe=re[W],ve=this._document.createElement("span");ve.textContent="Hi",ve.style.fontFamily=fe,N.appendChild(ve)}this._document.body.appendChild(N),E(K,function(){N.remove(),Z.complete()})}}]),T}(u);var d=function(){function c(b,T){var U=T.isEvalSupported,M=U===void 0?!0:U,G=T.disableFontFace,Z=G===void 0?!1:G,J=T.ignoreErrors,ie=J===void 0?!1:J,H=T.onUnsupportedFeature,q=T.fontRegistry,R=q===void 0?null:q;B(this,c),this.compiledGlyphs=Object.create(null);for(var h in b)this[h]=b[h];this.isEvalSupported=M!==!1,this.disableFontFace=Z===!0,this.ignoreErrors=ie===!0,this._onUnsupportedFeature=H,this.fontRegistry=R}return l(c,[{key:"createNativeFontFace",value:function(){if(!this.data||this.disableFontFace)return null;var T;if(!this.cssFontInfo)T=new FontFace(this.loadedName,this.data,{});else{var U={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(U.style="oblique ".concat(this.cssFontInfo.italicAngle,"deg")),T=new FontFace(this.cssFontInfo.fontFamily,this.data,U)}return this.fontRegistry&&this.fontRegistry.registerFont(this),T}},{key:"createFontFaceRule",value:function(){if(!this.data||this.disableFontFace)return null;var T=(0,f.bytesToString)(this.data),U="url(data:".concat(this.mimetype,";base64,").concat(btoa(T),");"),M;if(!this.cssFontInfo)M='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(U,"}");else{var G="font-weight: ".concat(this.cssFontInfo.fontWeight,";");this.cssFontInfo.italicAngle&&(G+="font-style: oblique ".concat(this.cssFontInfo.italicAngle,"deg;")),M='@font-face {font-family:"'.concat(this.cssFontInfo.fontFamily,'";').concat(G,"src:").concat(U,"}")}return this.fontRegistry&&this.fontRegistry.registerFont(this,U),M}},{key:"getPathGenerator",value:function(T,U){if(this.compiledGlyphs[U]!==void 0)return this.compiledGlyphs[U];var M;try{M=T.get(this.loadedName+"_path_"+U)}catch(q){if(!this.ignoreErrors)throw q;return this._onUnsupportedFeature({featureId:f.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,f.warn)('getPathGenerator - ignoring character: "'.concat(q,'".')),this.compiledGlyphs[U]=function(R,h){}}if(this.isEvalSupported&&f.IsEvalSupportedCached.value){var G=[],Z=x(M),J;try{for(Z.s();!(J=Z.n()).done;){var ie=J.value,H=ie.args!==void 0?ie.args.join(","):"";G.push("c.",ie.cmd,"(",H,`);
`)}}catch(q){Z.e(q)}finally{Z.f()}return this.compiledGlyphs[U]=new Function("c","size",G.join(""))}return this.compiledGlyphs[U]=function(q,R){var h=x(M),A;try{for(h.s();!(A=h.n()).done;){var E=A.value;E.cmd==="scale"&&(E.args=[R,-R]),q[E.cmd].apply(q,E.args)}}catch(K){h.e(K)}finally{h.f()}}}}]),c}();a.FontFaceObject=d},(y,a,t)=>{"use strict";function r(l){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?r=function(v){return typeof v}:r=function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},r(l)}Object.defineProperty(a,"__esModule",{value:!0}),a.NodeStandardFontDataFactory=a.NodeCanvasFactory=a.NodeCMapReaderFactory=void 0;var i=t(135),f=t(6),m=t(4);function _(l,u){for(var v=0;v<u.length;v++){var d=u[v];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}function D(l,u,v){return u&&_(l.prototype,u),v&&_(l,v),l}function L(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(u&&u.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),u&&$(l,u)}function $(l,u){return $=Object.setPrototypeOf||function(d,c){return d.__proto__=c,d},$(l,u)}function j(l){var u=P();return function(){var d=F(l),c;if(u){var b=F(this).constructor;c=Reflect.construct(d,arguments,b)}else c=d.apply(this,arguments);return V(this,c)}}function V(l,u){if(u&&(r(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return O(l)}function O(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}function P(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(l){return!1}}function F(l){return F=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)},F(l)}function x(l,u){if(!(l instanceof u))throw new TypeError("Cannot call a class as a function")}var I=function l(){x(this,l),(0,m.unreachable)("Not implemented: NodeCanvasFactory")};a.NodeCanvasFactory=I;var g=function l(){x(this,l),(0,m.unreachable)("Not implemented: NodeCMapReaderFactory")};a.NodeCMapReaderFactory=g;var B=function l(){x(this,l),(0,m.unreachable)("Not implemented: NodeStandardFontDataFactory")};if(a.NodeStandardFontDataFactory=B,f.isNodeJS){var p=function(u){return new Promise(function(v,d){var c=require("fs");c.readFile(u,function(b,T){if(b||!T){d(new Error(b));return}v(new Uint8Array(T))})})};a.NodeCanvasFactory=I=function(l){L(v,l);var u=j(v);function v(){return x(this,v),u.apply(this,arguments)}return D(v,[{key:"_createCanvas",value:function(c,b){var T=require("canvas");return T.createCanvas(c,b)}}]),v}(i.BaseCanvasFactory),a.NodeCMapReaderFactory=g=function(l){L(v,l);var u=j(v);function v(){return x(this,v),u.apply(this,arguments)}return D(v,[{key:"_fetchData",value:function(c,b){return p(c).then(function(T){return{cMapData:T,compressionType:b}})}}]),v}(i.BaseCMapReaderFactory),a.NodeStandardFontDataFactory=B=function(l){L(v,l);var u=j(v);function v(){return x(this,v),u.apply(this,arguments)}return D(v,[{key:"_fetchData",value:function(c){return p(c)}}]),v}(i.BaseStandardFontDataFactory)}},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.AnnotationStorage=void 0;var r=t(4);function i(P,F){return L(P)||D(P,F)||m(P,F)||f()}function f(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m(P,F){if(!!P){if(typeof P=="string")return _(P,F);var x=Object.prototype.toString.call(P).slice(8,-1);if(x==="Object"&&P.constructor&&(x=P.constructor.name),x==="Map"||x==="Set")return Array.from(P);if(x==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x))return _(P,F)}}function _(P,F){(F==null||F>P.length)&&(F=P.length);for(var x=0,I=new Array(F);x<F;x++)I[x]=P[x];return I}function D(P,F){var x=P==null?null:typeof Symbol!="undefined"&&P[Symbol.iterator]||P["@@iterator"];if(x!=null){var I=[],g=!0,B=!1,p,l;try{for(x=x.call(P);!(g=(p=x.next()).done)&&(I.push(p.value),!(F&&I.length===F));g=!0);}catch(u){B=!0,l=u}finally{try{!g&&x.return!=null&&x.return()}finally{if(B)throw l}}return I}}function L(P){if(Array.isArray(P))return P}function $(P,F){if(!(P instanceof F))throw new TypeError("Cannot call a class as a function")}function j(P,F){for(var x=0;x<F.length;x++){var I=F[x];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(P,I.key,I)}}function V(P,F,x){return F&&j(P.prototype,F),x&&j(P,x),P}var O=function(){function P(){$(this,P),this._storage=new Map,this._timeStamp=Date.now(),this._modified=!1,this.onSetModified=null,this.onResetModified=null}return V(P,[{key:"getValue",value:function(x,I){var g=this._storage.get(x);return g===void 0?I:Object.assign(I,g)}},{key:"setValue",value:function(x,I){var g=this._storage.get(x),B=!1;if(g!==void 0)for(var p=0,l=Object.entries(I);p<l.length;p++){var u=i(l[p],2),v=u[0],d=u[1];g[v]!==d&&(B=!0,g[v]=d)}else B=!0,this._storage.set(x,I);B&&(this._timeStamp=Date.now(),this._setModified())}},{key:"getAll",value:function(){return this._storage.size>0?(0,r.objectFromMap)(this._storage):null}},{key:"size",get:function(){return this._storage.size}},{key:"_setModified",value:function(){this._modified||(this._modified=!0,typeof this.onSetModified=="function"&&this.onSetModified())}},{key:"resetModified",value:function(){this._modified&&(this._modified=!1,typeof this.onResetModified=="function"&&this.onResetModified())}},{key:"serializable",get:function(){return this._storage.size>0?this._storage:null}},{key:"lastModified",get:function(){return this._timeStamp.toString()}}]),P}();a.AnnotationStorage=O},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.CanvasGraphics=void 0;var r=t(4),i=t(141),f=t(1);function m(S){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?m=function(s){return typeof s}:m=function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},m(S)}function _(S,w){var s=typeof Symbol!="undefined"&&S[Symbol.iterator]||S["@@iterator"];if(!s){if(Array.isArray(S)||(s=O(S))||w&&S&&typeof S.length=="number"){s&&(S=s);var o=0,k=function(){};return{s:k,n:function(){return o>=S.length?{done:!0}:{done:!1,value:S[o++]}},e:function(ve){throw ve},f:k}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var N=!0,W=!1,re;return{s:function(){s=s.call(S)},n:function(){var ve=s.next();return N=ve.done,ve},e:function(ve){W=!0,re=ve},f:function(){try{!N&&s.return!=null&&s.return()}finally{if(W)throw re}}}}function D(S,w){if(!(S instanceof w))throw new TypeError("Cannot call a class as a function")}function L(S,w){for(var s=0;s<w.length;s++){var o=w[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(S,o.key,o)}}function $(S,w,s){return w&&L(S.prototype,w),s&&L(S,s),S}function j(S,w){return x(S)||F(S,w)||O(S,w)||V()}function V(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function O(S,w){if(!!S){if(typeof S=="string")return P(S,w);var s=Object.prototype.toString.call(S).slice(8,-1);if(s==="Object"&&S.constructor&&(s=S.constructor.name),s==="Map"||s==="Set")return Array.from(S);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return P(S,w)}}function P(S,w){(w==null||w>S.length)&&(w=S.length);for(var s=0,o=new Array(w);s<w;s++)o[s]=S[s];return o}function F(S,w){var s=S==null?null:typeof Symbol!="undefined"&&S[Symbol.iterator]||S["@@iterator"];if(s!=null){var o=[],k=!0,N=!1,W,re;try{for(s=s.call(S);!(k=(W=s.next()).done)&&(o.push(W.value),!(w&&o.length===w));k=!0);}catch(fe){N=!0,re=fe}finally{try{!k&&s.return!=null&&s.return()}finally{if(N)throw re}}return o}}function x(S){if(Array.isArray(S))return S}var I=16,g=100,B=4096,p=15,l=10,u=!0,v=1e3,d=16,c=1.000001;function b(S,w){if(S._removeMirroring)throw new Error("Context is already forwarding operations.");S.__originalSave=S.save,S.__originalRestore=S.restore,S.__originalRotate=S.rotate,S.__originalScale=S.scale,S.__originalTranslate=S.translate,S.__originalTransform=S.transform,S.__originalSetTransform=S.setTransform,S.__originalResetTransform=S.resetTransform,S.__originalClip=S.clip,S.__originalMoveTo=S.moveTo,S.__originalLineTo=S.lineTo,S.__originalBezierCurveTo=S.bezierCurveTo,S.__originalRect=S.rect,S.__originalClosePath=S.closePath,S.__originalBeginPath=S.beginPath,S._removeMirroring=function(){S.save=S.__originalSave,S.restore=S.__originalRestore,S.rotate=S.__originalRotate,S.scale=S.__originalScale,S.translate=S.__originalTranslate,S.transform=S.__originalTransform,S.setTransform=S.__originalSetTransform,S.resetTransform=S.__originalResetTransform,S.clip=S.__originalClip,S.moveTo=S.__originalMoveTo,S.lineTo=S.__originalLineTo,S.bezierCurveTo=S.__originalBezierCurveTo,S.rect=S.__originalRect,S.closePath=S.__originalClosePath,S.beginPath=S.__originalBeginPath,delete S._removeMirroring},S.save=function(){w.save(),this.__originalSave()},S.restore=function(){w.restore(),this.__originalRestore()},S.translate=function(o,k){w.translate(o,k),this.__originalTranslate(o,k)},S.scale=function(o,k){w.scale(o,k),this.__originalScale(o,k)},S.transform=function(o,k,N,W,re,fe){w.transform(o,k,N,W,re,fe),this.__originalTransform(o,k,N,W,re,fe)},S.setTransform=function(o,k,N,W,re,fe){w.setTransform(o,k,N,W,re,fe),this.__originalSetTransform(o,k,N,W,re,fe)},S.resetTransform=function(){w.resetTransform(),this.__originalResetTransform()},S.rotate=function(o){w.rotate(o),this.__originalRotate(o)},S.clip=function(o){w.clip(o),this.__originalClip(o)},S.moveTo=function(s,o){w.moveTo(s,o),this.__originalMoveTo(s,o)},S.lineTo=function(s,o){w.lineTo(s,o),this.__originalLineTo(s,o)},S.bezierCurveTo=function(s,o,k,N,W,re){w.bezierCurveTo(s,o,k,N,W,re),this.__originalBezierCurveTo(s,o,k,N,W,re)},S.rect=function(s,o,k,N){w.rect(s,o,k,N),this.__originalRect(s,o,k,N)},S.closePath=function(){w.closePath(),this.__originalClosePath()},S.beginPath=function(){w.beginPath(),this.__originalBeginPath()}}function T(S){if(!S.mozCurrentTransform){S._originalSave=S.save,S._originalRestore=S.restore,S._originalRotate=S.rotate,S._originalScale=S.scale,S._originalTranslate=S.translate,S._originalTransform=S.transform,S._originalSetTransform=S.setTransform,S._originalResetTransform=S.resetTransform,S._transformMatrix=S._transformMatrix||[1,0,0,1,0,0],S._transformStack=[];try{var w=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(S),"lineWidth");S._setLineWidth=w.set,S._getLineWidth=w.get,Object.defineProperty(S,"lineWidth",{set:function(o){this._setLineWidth(o*c)},get:function(){return this._getLineWidth()}})}catch(s){}Object.defineProperty(S,"mozCurrentTransform",{get:function(){return this._transformMatrix}}),Object.defineProperty(S,"mozCurrentTransformInverse",{get:function(){var o=j(this._transformMatrix,6),k=o[0],N=o[1],W=o[2],re=o[3],fe=o[4],ve=o[5],me=k*re-N*W,pe=N*W-k*re;return[re/me,N/pe,W/pe,k/me,(re*fe-W*ve)/pe,(N*fe-k*ve)/me]}}),S.save=function(){var o=this._transformMatrix;this._transformStack.push(o),this._transformMatrix=o.slice(0,6),this._originalSave()},S.restore=function(){var o=this._transformStack.pop();o&&(this._transformMatrix=o,this._originalRestore())},S.translate=function(o,k){var N=this._transformMatrix;N[4]=N[0]*o+N[2]*k+N[4],N[5]=N[1]*o+N[3]*k+N[5],this._originalTranslate(o,k)},S.scale=function(o,k){var N=this._transformMatrix;N[0]*=o,N[1]*=o,N[2]*=k,N[3]*=k,this._originalScale(o,k)},S.transform=function(o,k,N,W,re,fe){var ve=this._transformMatrix;this._transformMatrix=[ve[0]*o+ve[2]*k,ve[1]*o+ve[3]*k,ve[0]*N+ve[2]*W,ve[1]*N+ve[3]*W,ve[0]*re+ve[2]*fe+ve[4],ve[1]*re+ve[3]*fe+ve[5]],S._originalTransform(o,k,N,W,re,fe)},S.setTransform=function(o,k,N,W,re,fe){this._transformMatrix=[o,k,N,W,re,fe],S._originalSetTransform(o,k,N,W,re,fe)},S.resetTransform=function(){this._transformMatrix=[1,0,0,1,0,0],S._originalResetTransform()},S.rotate=function(o){var k=Math.cos(o),N=Math.sin(o),W=this._transformMatrix;this._transformMatrix=[W[0]*k+W[2]*N,W[1]*k+W[3]*N,W[0]*-N+W[2]*k,W[1]*-N+W[3]*k,W[4],W[5]],this._originalRotate(o)}}}var U=function(){function S(w){D(this,S),this.canvasFactory=w,this.cache=Object.create(null)}return $(S,[{key:"getCanvas",value:function(s,o,k,N){var W;return this.cache[s]!==void 0?(W=this.cache[s],this.canvasFactory.reset(W,o,k),W.context.setTransform(1,0,0,1,0,0)):(W=this.canvasFactory.create(o,k),this.cache[s]=W),N&&T(W.context),W}},{key:"clear",value:function(){for(var s in this.cache){var o=this.cache[s];this.canvasFactory.destroy(o),delete this.cache[s]}}}]),S}();function M(S){var w=1e3,s=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),o=S.width,k=S.height,N=o+1,W,re,fe,ve,me=new Uint8Array(N*(k+1)),pe=o+7&~7,Ae=S.data,Pe=new Uint8Array(pe*k),_e=0;for(W=0,re=Ae.length;W<re;W++)for(var We=Ae[W],Le=128;Le>0;)Pe[_e++]=We&Le?0:255,Le>>=1;var je=0;for(_e=0,Pe[_e]!==0&&(me[0]=1,++je),fe=1;fe<o;fe++)Pe[_e]!==Pe[_e+1]&&(me[fe]=Pe[_e]?2:1,++je),_e++;for(Pe[_e]!==0&&(me[fe]=2,++je),W=1;W<k;W++){_e=W*pe,ve=W*N,Pe[_e-pe]!==Pe[_e]&&(me[ve]=Pe[_e]?1:8,++je);var le=(Pe[_e]?4:0)+(Pe[_e-pe]?8:0);for(fe=1;fe<o;fe++)le=(le>>2)+(Pe[_e+1]?4:0)+(Pe[_e-pe+1]?8:0),s[le]&&(me[ve+fe]=s[le],++je),_e++;if(Pe[_e-pe]!==Pe[_e]&&(me[ve+fe]=Pe[_e]?2:4,++je),je>w)return null}for(_e=pe*(k-1),ve=W*N,Pe[_e]!==0&&(me[ve]=8,++je),fe=1;fe<o;fe++)Pe[_e]!==Pe[_e+1]&&(me[ve+fe]=Pe[_e]?4:8,++je),_e++;if(Pe[_e]!==0&&(me[ve+fe]=4,++je),je>w)return null;var he=new Int32Array([0,N,-1,0,-N,0,0,0,1]),z=[];for(W=0;je&&W<=k;W++){for(var ee=W*N,X=ee+o;ee<X&&!me[ee];)ee++;if(ee!==X){var oe=[ee%N,W],ne=ee,Q=me[ee];do{var de=he[Q];do ee+=de;while(!me[ee]);var ce=me[ee];ce!==5&&ce!==10?(Q=ce,me[ee]=0):(Q=ce&51*Q>>4,me[ee]&=Q>>2|Q<<2),oe.push(ee%N,ee/N|0),me[ee]||--je}while(ne!==ee);z.push(oe),--W}}var Se=function(Fe){Fe.save(),Fe.scale(1/o,-1/k),Fe.translate(0,-k),Fe.beginPath();for(var De=0,Re=z.length;De<Re;De++){var Ne=z[De];Fe.moveTo(Ne[0],Ne[1]);for(var Oe=2,xe=Ne.length;Oe<xe;Oe+=2)Fe.lineTo(Ne[Oe],Ne[Oe+1])}Fe.fill(),Fe.beginPath(),Fe.restore()};return Se}var G=function(){function S(w,s){D(this,S),this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=r.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=r.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=r.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,w,s])}return $(S,[{key:"clone",value:function(){var s=Object.create(this);return s.clipBox=this.clipBox.slice(),s}},{key:"setCurrentPoint",value:function(s,o){this.x=s,this.y=o}},{key:"updatePathMinMax",value:function(s,o,k){var N=r.Util.applyTransform([o,k],s),W=j(N,2);o=W[0],k=W[1],this.minX=Math.min(this.minX,o),this.minY=Math.min(this.minY,k),this.maxX=Math.max(this.maxX,o),this.maxY=Math.max(this.maxY,k)}},{key:"updateCurvePathMinMax",value:function(s,o,k,N,W,re,fe,ve,me){var pe=r.Util.bezierBoundingBox(o,k,N,W,re,fe,ve,me);this.updatePathMinMax(s,pe[0],pe[1]),this.updatePathMinMax(s,pe[2],pe[3])}},{key:"getPathBoundingBox",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:i.PathType.FILL,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,k=[this.minX,this.minY,this.maxX,this.maxY];if(s===i.PathType.STROKE){o||(0,r.unreachable)("Stroke bounding box must include transform.");var N=r.Util.singularValueDecompose2dScale(o),W=N[0]*this.lineWidth/2,re=N[1]*this.lineWidth/2;k[0]-=W,k[1]-=re,k[2]+=W,k[3]+=re}return k}},{key:"updateClipFromPath",value:function(){var s=r.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(s||[0,0,0,0])}},{key:"startNewPathAndClipBox",value:function(s){this.clipBox=s,this.minX=Infinity,this.minY=Infinity,this.maxX=0,this.maxY=0}},{key:"getClippedPathBoundingBox",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:i.PathType.FILL,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return r.Util.intersect(this.clipBox,this.getPathBoundingBox(s,o))}}]),S}();function Z(S,w){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(typeof ImageData!="undefined"&&w instanceof ImageData){S.putImageData(w,0,0);return}var o=w.height,k=w.width,N=o%d,W=(o-N)/d,re=N===0?W:W+1,fe=S.createImageData(k,d),ve=0,me,pe=w.data,Ae=fe.data,Pe,_e,We,Le,je,le,he,z;if(s)switch(s.length){case 1:je=s[0],le=s[0],he=s[0],z=s[0];break;case 4:je=s[0],le=s[1],he=s[2],z=s[3];break}if(w.kind===r.ImageKind.GRAYSCALE_1BPP){var ee=pe.byteLength,X=new Uint32Array(Ae.buffer,0,Ae.byteLength>>2),oe=X.length,ne=k+7>>3,Q=4294967295,de=r.IsLittleEndianCached.value?4278190080:255;if(z&&z[0]===255&&z[255]===0){var ce=[de,Q];Q=ce[0],de=ce[1]}for(Pe=0;Pe<re;Pe++){for(We=Pe<W?d:N,me=0,_e=0;_e<We;_e++){for(var Se=ee-ve,Ee=0,Fe=Se>ne?k:Se*8-7,De=Fe&~7,Re=0,Ne=0;Ee<De;Ee+=8)Ne=pe[ve++],X[me++]=Ne&128?Q:de,X[me++]=Ne&64?Q:de,X[me++]=Ne&32?Q:de,X[me++]=Ne&16?Q:de,X[me++]=Ne&8?Q:de,X[me++]=Ne&4?Q:de,X[me++]=Ne&2?Q:de,X[me++]=Ne&1?Q:de;for(;Ee<Fe;Ee++)Re===0&&(Ne=pe[ve++],Re=128),X[me++]=Ne&Re?Q:de,Re>>=1}for(;me<oe;)X[me++]=0;S.putImageData(fe,0,Pe*d)}}else if(w.kind===r.ImageKind.RGBA_32BPP){var Oe=!!(je||le||he);for(_e=0,Le=k*d*4,Pe=0;Pe<W;Pe++){if(Ae.set(pe.subarray(ve,ve+Le)),ve+=Le,Oe)for(var xe=0;xe<Le;xe+=4)je&&(Ae[xe+0]=je[Ae[xe+0]]),le&&(Ae[xe+1]=le[Ae[xe+1]]),he&&(Ae[xe+2]=he[Ae[xe+2]]);S.putImageData(fe,0,_e),_e+=d}if(Pe<re){if(Le=k*N*4,Ae.set(pe.subarray(ve,ve+Le)),Oe)for(var Be=0;Be<Le;Be+=4)je&&(Ae[Be+0]=je[Ae[Be+0]]),le&&(Ae[Be+1]=le[Ae[Be+1]]),he&&(Ae[Be+2]=he[Ae[Be+2]]);S.putImageData(fe,0,_e)}}else if(w.kind===r.ImageKind.RGB_24BPP){var Ue=!!(je||le||he);for(We=d,Le=k*We,Pe=0;Pe<re;Pe++){for(Pe>=W&&(We=N,Le=k*We),me=0,_e=Le;_e--;)Ae[me++]=pe[ve++],Ae[me++]=pe[ve++],Ae[me++]=pe[ve++],Ae[me++]=255;if(Ue)for(var He=0;He<me;He+=4)je&&(Ae[He+0]=je[Ae[He+0]]),le&&(Ae[He+1]=le[Ae[He+1]]),he&&(Ae[He+2]=he[Ae[He+2]]);S.putImageData(fe,0,Pe*d)}}else throw new Error("bad image kind: ".concat(w.kind))}function J(S,w){for(var s=w.height,o=w.width,k=s%d,N=(s-k)/d,W=k===0?N:N+1,re=S.createImageData(o,d),fe=0,ve=w.data,me=re.data,pe=0;pe<W;pe++){for(var Ae=pe<N?d:k,Pe=3,_e=0;_e<Ae;_e++)for(var We=void 0,Le=0,je=0;je<o;je++)Le||(We=ve[fe++],Le=128),me[Pe]=We&Le?0:255,Pe+=4,Le>>=1;S.putImageData(re,0,pe*d)}}function ie(S,w){for(var s=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],o=0,k=s.length;o<k;o++){var N=s[o];S[N]!==void 0&&(w[N]=S[N])}S.setLineDash!==void 0&&(w.setLineDash(S.getLineDash()),w.lineDashOffset=S.lineDashOffset)}function H(S){S.strokeStyle="#000000",S.fillStyle="#000000",S.fillRule="nonzero",S.globalAlpha=1,S.lineWidth=1,S.lineCap="butt",S.lineJoin="miter",S.miterLimit=10,S.globalCompositeOperation="source-over",S.font="10px sans-serif",S.setLineDash!==void 0&&(S.setLineDash([]),S.lineDashOffset=0)}function q(S,w,s,o){for(var k=S.length,N=3;N<k;N+=4){var W=S[N];if(W===0)S[N-3]=w,S[N-2]=s,S[N-1]=o;else if(W<255){var re=255-W;S[N-3]=S[N-3]*W+w*re>>8,S[N-2]=S[N-2]*W+s*re>>8,S[N-1]=S[N-1]*W+o*re>>8}}}function R(S,w,s){for(var o=S.length,k=1/255,N=3;N<o;N+=4){var W=s?s[S[N]]:S[N];w[N]=w[N]*W*k|0}}function h(S,w,s){for(var o=S.length,k=3;k<o;k+=4){var N=S[k-3]*77+S[k-2]*152+S[k-1]*28;w[k]=s?w[k]*s[N>>8]>>8:w[k]*N>>16}}function A(S,w,s,o,k,N,W,re,fe,ve,me){var pe=!!N,Ae=pe?N[0]:0,Pe=pe?N[1]:0,_e=pe?N[2]:0,We;k==="Luminosity"?We=h:We=R;for(var Le=1048576,je=Math.min(o,Math.ceil(Le/s)),le=0;le<o;le+=je){var he=Math.min(je,o-le),z=S.getImageData(re-ve,le+(fe-me),s,he),ee=w.getImageData(re,le+fe,s,he);pe&&q(z.data,Ae,Pe,_e),We(z.data,ee.data,W),w.putImageData(ee,re,le+fe)}}function E(S,w,s,o){var k=o[0],N=o[1],W=o[2]-k,re=o[3]-N;W===0||re===0||(A(w.context,s,W,re,w.subtype,w.backdrop,w.transferMap,k,N,w.offsetX,w.offsetY),S.save(),S.globalAlpha=1,S.globalCompositeOperation="source-over",S.setTransform(1,0,0,1,0,0),S.drawImage(s.canvas,0,0),S.restore())}function K(S,w){var s=r.Util.singularValueDecompose2dScale(S);s[0]=Math.fround(s[0]),s[1]=Math.fround(s[1]);var o=Math.fround((globalThis.devicePixelRatio||1)*f.PixelsPerInch.PDF_TO_CSS_UNITS);return w!==void 0?w:s[0]<=o||s[1]<=o}var te=["butt","round","square"],Y=["miter","round","bevel"],be={},Ce={},we=function(){function S(w,s,o,k,N,W,re){D(this,S),this.ctx=w,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=s,this.objs=o,this.canvasFactory=k,this.imageLayer=N,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=W,this.cachedCanvases=new U(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=re,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,w&&T(w),this._cachedGetSinglePixelWidth=null}return $(S,[{key:"beginDrawing",value:function(s){var o=s.transform,k=s.viewport,N=s.transparency,W=N===void 0?!1:N,re=s.background,fe=re===void 0?null:re,ve=this.ctx.canvas.width,me=this.ctx.canvas.height;if(this.ctx.save(),this.ctx.fillStyle=fe||"rgb(255, 255, 255)",this.ctx.fillRect(0,0,ve,me),this.ctx.restore(),W){var pe=this.cachedCanvases.getCanvas("transparent",ve,me,!0);this.compositeCtx=this.ctx,this.transparentCanvas=pe.canvas,this.ctx=pe.context,this.ctx.save(),this.ctx.transform.apply(this.ctx,this.compositeCtx.mozCurrentTransform)}this.ctx.save(),H(this.ctx),o&&(this.ctx.transform.apply(this.ctx,o),this.outputScaleX=o[0],this.outputScaleY=o[0]),this.ctx.transform.apply(this.ctx,k.transform),this.viewportScale=k.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(s,o,k,N){var W=s.argsArray,re=s.fnArray,fe=o||0,ve=W.length;if(ve===fe)return fe;for(var me=ve-fe>l&&typeof k=="function",pe=me?Date.now()+p:0,Ae=0,Pe=this.commonObjs,_e=this.objs,We;;){if(N!==void 0&&fe===N.nextBreakPoint)return N.breakIt(fe,k),fe;if(We=re[fe],We!==r.OPS.dependency)this[We].apply(this,W[fe]);else{var Le=_(W[fe]),je;try{for(Le.s();!(je=Le.n()).done;){var le=je.value,he=le.startsWith("g_")?Pe:_e;if(!he.has(le))return he.get(le,k),fe}}catch(z){Le.e(z)}finally{Le.f()}}if(fe++,fe===ve)return fe;if(me&&++Ae>l){if(Date.now()>pe)return k(),fe;Ae=0}}}},{key:"endDrawing",value:function(){for(;this.stateStack.length||this.current.activeSMask!==null;)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(s,o){for(var k=s.width,N=s.height,W=Math.max(Math.hypot(o[0],o[1]),1),re=Math.max(Math.hypot(o[2],o[3]),1),fe=k,ve=N,me="prescale1",pe,Ae;W>2&&fe>1||re>2&&ve>1;){var Pe=fe,_e=ve;W>2&&fe>1&&(Pe=Math.ceil(fe/2),W/=fe/Pe),re>2&&ve>1&&(_e=Math.ceil(ve/2),re/=ve/_e),pe=this.cachedCanvases.getCanvas(me,Pe,_e),Ae=pe.context,Ae.clearRect(0,0,Pe,_e),Ae.drawImage(s,0,0,fe,ve,0,0,Pe,_e),s=pe.canvas,fe=Pe,ve=_e,me=me==="prescale1"?"prescale2":"prescale1"}return{img:s,paintWidth:fe,paintHeight:ve}}},{key:"_createMaskCanvas",value:function(s){var o=this.ctx,k=s.width,N=s.height,W=this.current.fillColor,re=this.current.patternFill,fe=this.cachedCanvases.getCanvas("maskCanvas",k,N),ve=fe.context;J(ve,s);var me=o.mozCurrentTransform,pe=r.Util.transform(me,[1/k,0,0,-1/N,0,0]);pe=r.Util.transform(pe,[1,0,0,1,0,-N]);var Ae=r.Util.applyTransform([0,0],pe),Pe=r.Util.applyTransform([k,N],pe),_e=r.Util.normalizeRect([Ae[0],Ae[1],Pe[0],Pe[1]]),We=Math.ceil(_e[2]-_e[0]),Le=Math.ceil(_e[3]-_e[1]),je=this.cachedCanvases.getCanvas("fillCanvas",We,Le,!0),le=je.context,he=Math.min(Ae[0],Pe[0]),z=Math.min(Ae[1],Pe[1]);le.translate(-he,-z),le.transform.apply(le,pe);var ee=this._scaleImage(fe.canvas,le.mozCurrentTransformInverse);le.imageSmoothingEnabled=K(le.mozCurrentTransform,s.interpolate),le.drawImage(ee.img,0,0,ee.img.width,ee.img.height,0,0,k,N),le.globalCompositeOperation="source-in";var X=r.Util.transform(le.mozCurrentTransformInverse,[1,0,0,1,-he,-z]);return le.fillStyle=re?W.getPattern(o,this,X,i.PathType.FILL):W,le.fillRect(0,0,k,N),{canvas:je.canvas,offsetX:Math.round(he),offsetY:Math.round(z)}}},{key:"setLineWidth",value:function(s){this.current.lineWidth=s,this.ctx.lineWidth=s}},{key:"setLineCap",value:function(s){this.ctx.lineCap=te[s]}},{key:"setLineJoin",value:function(s){this.ctx.lineJoin=Y[s]}},{key:"setMiterLimit",value:function(s){this.ctx.miterLimit=s}},{key:"setDash",value:function(s,o){var k=this.ctx;k.setLineDash!==void 0&&(k.setLineDash(s),k.lineDashOffset=o)}},{key:"setRenderingIntent",value:function(s){}},{key:"setFlatness",value:function(s){}},{key:"setGState",value:function(s){for(var o=0,k=s.length;o<k;o++){var N=s[o],W=N[0],re=N[1];switch(W){case"LW":this.setLineWidth(re);break;case"LC":this.setLineCap(re);break;case"LJ":this.setLineJoin(re);break;case"ML":this.setMiterLimit(re);break;case"D":this.setDash(re[0],re[1]);break;case"RI":this.setRenderingIntent(re);break;case"FL":this.setFlatness(re);break;case"Font":this.setFont(re[0],re[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=re;break;case"SMask":this.current.activeSMask=re?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.current.transferMaps=re}}}},{key:"checkSMaskState",value:function(){var s=!!this.suspendedCtx;this.current.activeSMask&&!s?this.beginSMaskMode():!this.current.activeSMask&&s&&this.endSMaskMode()}},{key:"beginSMaskMode",value:function(){if(this.suspendedCtx)throw new Error("beginSMaskMode called while already in smask mode");var s=this.ctx.canvas.width,o=this.ctx.canvas.height,k="smaskGroupAt"+this.groupLevel,N=this.cachedCanvases.getCanvas(k,s,o,!0);this.suspendedCtx=this.ctx,this.ctx=N.context;var W=this.ctx;W.setTransform.apply(W,this.suspendedCtx.mozCurrentTransform),ie(this.suspendedCtx,W),b(W,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(),ie(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.current.activeSMask=null,this.suspendedCtx=null}},{key:"compose",value:function(s){if(!!this.current.activeSMask){s?(s[0]=Math.floor(s[0]),s[1]=Math.floor(s[1]),s[2]=Math.ceil(s[2]),s[3]=Math.ceil(s[3])):s=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];var o=this.current.activeSMask,k=this.suspendedCtx;E(k,o,this.ctx,s),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 s=this.current;this.stateStack.push(s),this.current=s.clone()}},{key:"restore",value:function(){this.stateStack.length===0&&this.current.activeSMask&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedGetSinglePixelWidth=null)}},{key:"transform",value:function(s,o,k,N,W,re){this.ctx.transform(s,o,k,N,W,re),this._cachedGetSinglePixelWidth=null}},{key:"constructPath",value:function(s,o){for(var k=this.ctx,N=this.current,W=N.x,re=N.y,fe,ve,me=0,pe=0,Ae=s.length;me<Ae;me++)switch(s[me]|0){case r.OPS.rectangle:W=o[pe++],re=o[pe++];var Pe=o[pe++],_e=o[pe++],We=W+Pe,Le=re+_e;k.moveTo(W,re),Pe===0||_e===0?k.lineTo(We,Le):(k.lineTo(We,re),k.lineTo(We,Le),k.lineTo(W,Le)),N.updatePathMinMax(k.mozCurrentTransform,W,re),N.updatePathMinMax(k.mozCurrentTransform,We,Le),k.closePath();break;case r.OPS.moveTo:W=o[pe++],re=o[pe++],k.moveTo(W,re),N.updatePathMinMax(k.mozCurrentTransform,W,re);break;case r.OPS.lineTo:W=o[pe++],re=o[pe++],k.lineTo(W,re),N.updatePathMinMax(k.mozCurrentTransform,W,re);break;case r.OPS.curveTo:fe=W,ve=re,W=o[pe+4],re=o[pe+5],k.bezierCurveTo(o[pe],o[pe+1],o[pe+2],o[pe+3],W,re),N.updateCurvePathMinMax(k.mozCurrentTransform,fe,ve,o[pe],o[pe+1],o[pe+2],o[pe+3],W,re),pe+=6;break;case r.OPS.curveTo2:fe=W,ve=re,k.bezierCurveTo(W,re,o[pe],o[pe+1],o[pe+2],o[pe+3]),N.updateCurvePathMinMax(k.mozCurrentTransform,fe,ve,W,re,o[pe],o[pe+1],o[pe+2],o[pe+3]),W=o[pe+2],re=o[pe+3],pe+=4;break;case r.OPS.curveTo3:fe=W,ve=re,W=o[pe+2],re=o[pe+3],k.bezierCurveTo(o[pe],o[pe+1],W,re,W,re),N.updateCurvePathMinMax(k.mozCurrentTransform,fe,ve,o[pe],o[pe+1],W,re,W,re),pe+=4;break;case r.OPS.closePath:k.closePath();break}N.setCurrentPoint(W,re)}},{key:"closePath",value:function(){this.ctx.closePath()}},{key:"stroke",value:function(s){s=typeof s!="undefined"?s:!0;var o=this.ctx,k=this.current.strokeColor;if(o.globalAlpha=this.current.strokeAlpha,this.contentVisible)if(m(k)==="object"&&k!==null&&k!==void 0&&k.getPattern){var N=this.getSinglePixelWidth();o.save(),o.strokeStyle=k.getPattern(o,this,o.mozCurrentTransformInverse,i.PathType.STROKE),o.lineWidth=Math.max(N,this.current.lineWidth),o.stroke(),o.restore()}else{var W=this.getSinglePixelWidth();W<0&&-W>=this.current.lineWidth?(o.save(),o.resetTransform(),o.lineWidth=Math.round(this._combinedScaleFactor),o.stroke(),o.restore()):(o.lineWidth=Math.max(W,this.current.lineWidth),o.stroke())}s&&this.consumePath(this.current.getClippedPathBoundingBox()),o.globalAlpha=this.current.fillAlpha}},{key:"closeStroke",value:function(){this.closePath(),this.stroke()}},{key:"fill",value:function(s){s=typeof s!="undefined"?s:!0;var o=this.ctx,k=this.current.fillColor,N=this.current.patternFill,W=!1;N&&(o.save(),o.fillStyle=k.getPattern(o,this,o.mozCurrentTransformInverse,i.PathType.FILL),W=!0);var re=this.current.getClippedPathBoundingBox();this.contentVisible&&re!==null&&(this.pendingEOFill?(o.fill("evenodd"),this.pendingEOFill=!1):o.fill()),W&&o.restore(),s&&this.consumePath(re)}},{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=be}},{key:"eoClip",value:function(){this.pendingClip=Ce}},{key:"beginText",value:function(){this.current.textMatrix=r.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 s=this.pendingTextPaths,o=this.ctx;if(s===void 0){o.beginPath();return}o.save(),o.beginPath();for(var k=0;k<s.length;k++){var N=s[k];o.setTransform.apply(o,N.transform),o.translate(N.x,N.y),N.addToPath(o,N.fontSize)}o.restore(),o.clip(),o.beginPath(),delete this.pendingTextPaths}},{key:"setCharSpacing",value:function(s){this.current.charSpacing=s}},{key:"setWordSpacing",value:function(s){this.current.wordSpacing=s}},{key:"setHScale",value:function(s){this.current.textHScale=s/100}},{key:"setLeading",value:function(s){this.current.leading=-s}},{key:"setFont",value:function(s,o){var k=this.commonObjs.get(s),N=this.current;if(!k)throw new Error("Can't find font for ".concat(s));if(N.fontMatrix=k.fontMatrix||r.FONT_IDENTITY_MATRIX,(N.fontMatrix[0]===0||N.fontMatrix[3]===0)&&(0,r.warn)("Invalid font matrix for font "+s),o<0?(o=-o,N.fontDirection=-1):N.fontDirection=1,this.current.font=k,this.current.fontSize=o,!k.isType3Font){var W=k.loadedName||"sans-serif",re="normal";k.black?re="900":k.bold&&(re="bold");var fe=k.italic?"italic":"normal",ve='"'.concat(W,'", ').concat(k.fallbackName),me=o;o<I?me=I:o>g&&(me=g),this.current.fontSizeScale=o/me,this.ctx.font="".concat(fe," ").concat(re," ").concat(me,"px ").concat(ve)}}},{key:"setTextRenderingMode",value:function(s){this.current.textRenderingMode=s}},{key:"setTextRise",value:function(s){this.current.textRise=s}},{key:"moveText",value:function(s,o){this.current.x=this.current.lineX+=s,this.current.y=this.current.lineY+=o}},{key:"setLeadingMoveText",value:function(s,o){this.setLeading(-o),this.moveText(s,o)}},{key:"setTextMatrix",value:function(s,o,k,N,W,re){this.current.textMatrix=[s,o,k,N,W,re],this.current.textMatrixScale=Math.hypot(s,o),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(s,o,k,N,W){var re=this.ctx,fe=this.current,ve=fe.font,me=fe.textRenderingMode,pe=fe.fontSize/fe.fontSizeScale,Ae=me&r.TextRenderingMode.FILL_STROKE_MASK,Pe=!!(me&r.TextRenderingMode.ADD_TO_PATH_FLAG),_e=fe.patternFill&&!ve.missingFile,We;if((ve.disableFontFace||Pe||_e)&&(We=ve.getPathGenerator(this.commonObjs,s)),ve.disableFontFace||_e?(re.save(),re.translate(o,k),re.beginPath(),We(re,pe),N&&re.setTransform.apply(re,N),(Ae===r.TextRenderingMode.FILL||Ae===r.TextRenderingMode.FILL_STROKE)&&re.fill(),(Ae===r.TextRenderingMode.STROKE||Ae===r.TextRenderingMode.FILL_STROKE)&&(W&&(re.resetTransform(),re.lineWidth=Math.round(this._combinedScaleFactor)),re.stroke()),re.restore()):((Ae===r.TextRenderingMode.FILL||Ae===r.TextRenderingMode.FILL_STROKE)&&re.fillText(s,o,k),(Ae===r.TextRenderingMode.STROKE||Ae===r.TextRenderingMode.FILL_STROKE)&&(W?(re.save(),re.moveTo(o,k),re.resetTransform(),re.lineWidth=Math.round(this._combinedScaleFactor),re.strokeText(s,0,0),re.restore()):re.strokeText(s,o,k))),Pe){var Le=this.pendingTextPaths||(this.pendingTextPaths=[]);Le.push({transform:re.mozCurrentTransform,x:o,y:k,fontSize:pe,addToPath:We})}}},{key:"isFontSubpixelAAEnabled",get:function(){var s=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10),o=s.context;o.scale(1.5,1),o.fillText("I",0,10);for(var k=o.getImageData(0,0,10,10).data,N=!1,W=3;W<k.length;W+=4)if(k[W]>0&&k[W]<255){N=!0;break}return(0,r.shadow)(this,"isFontSubpixelAAEnabled",N)}},{key:"showText",value:function(s){var o=this.current,k=o.font;if(k.isType3Font)return this.showType3Text(s);var N=o.fontSize;if(N!==0){var W=this.ctx,re=o.fontSizeScale,fe=o.charSpacing,ve=o.wordSpacing,me=o.fontDirection,pe=o.textHScale*me,Ae=s.length,Pe=k.vertical,_e=Pe?1:-1,We=k.defaultVMetrics,Le=N*o.fontMatrix[0],je=o.textRenderingMode===r.TextRenderingMode.FILL&&!k.disableFontFace&&!o.patternFill;W.save(),W.transform.apply(W,o.textMatrix),W.translate(o.x,o.y+o.textRise),me>0?W.scale(pe,-1):W.scale(pe,1);var le;if(o.patternFill){W.save();var he=o.fillColor.getPattern(W,this,W.mozCurrentTransformInverse,i.PathType.FILL);le=W.mozCurrentTransform,W.restore(),W.fillStyle=he}var z=o.lineWidth,ee=!1,X=o.textMatrixScale;if(X===0||z===0){var oe=o.textRenderingMode&r.TextRenderingMode.FILL_STROKE_MASK;(oe===r.TextRenderingMode.STROKE||oe===r.TextRenderingMode.FILL_STROKE)&&(this._cachedGetSinglePixelWidth=null,z=this.getSinglePixelWidth(),ee=z<0)}else z/=X;re!==1&&(W.scale(re,re),z/=re),W.lineWidth=z;var ne=0,Q;for(Q=0;Q<Ae;++Q){var de=s[Q];if((0,r.isNum)(de)){ne+=_e*de*N/1e3;continue}var ce=!1,Se=(de.isSpace?ve:0)+fe,Ee=de.fontChar,Fe=de.accent,De=void 0,Re=void 0,Ne=de.width;if(Pe){var Oe=de.vmetric||We,xe=-(de.vmetric?Oe[1]:Ne*.5)*Le,Be=Oe[2]*Le;Ne=Oe?-Oe[0]:Ne,De=xe/re,Re=(ne+Be)/re}else De=ne/re,Re=0;if(k.remeasure&&Ne>0){var Ue=W.measureText(Ee).width*1e3/N*re;if(Ne<Ue&&this.isFontSubpixelAAEnabled){var He=Ne/Ue;ce=!0,W.save(),W.scale(He,1),De/=He}else Ne!==Ue&&(De+=(Ne-Ue)/2e3*N/re)}if(this.contentVisible&&(de.isInFont||k.missingFile)){if(je&&!Fe)W.fillText(Ee,De,Re);else if(this.paintChar(Ee,De,Re,le,ee),Fe){var Ye=De+N*Fe.offset.x/re,Ze=Re-N*Fe.offset.y/re;this.paintChar(Fe.fontChar,Ye,Ze,le,ee)}}var rt=void 0;Pe?rt=Ne*Le-Se*me:rt=Ne*Le+Se*me,ne+=rt,ce&&W.restore()}Pe?o.y-=ne:o.x+=ne*pe,W.restore(),this.compose()}}},{key:"showType3Text",value:function(s){var o=this.ctx,k=this.current,N=k.font,W=k.fontSize,re=k.fontDirection,fe=N.vertical?1:-1,ve=k.charSpacing,me=k.wordSpacing,pe=k.textHScale*re,Ae=k.fontMatrix||r.FONT_IDENTITY_MATRIX,Pe=s.length,_e=k.textRenderingMode===r.TextRenderingMode.INVISIBLE,We,Le,je,le;if(!(_e||W===0)){for(this._cachedGetSinglePixelWidth=null,o.save(),o.transform.apply(o,k.textMatrix),o.translate(k.x,k.y),o.scale(pe,re),We=0;We<Pe;++We){if(Le=s[We],(0,r.isNum)(Le)){le=fe*Le*W/1e3,this.ctx.translate(le,0),k.x+=le*pe;continue}var he=(Le.isSpace?me:0)+ve,z=N.charProcOperatorList[Le.operatorListId];if(!z){(0,r.warn)('Type3 character "'.concat(Le.operatorListId,'" is not available.'));continue}this.contentVisible&&(this.processingType3=Le,this.save(),o.scale(W,W),o.transform.apply(o,Ae),this.executeOperatorList(z),this.restore());var ee=r.Util.applyTransform([Le.width,0],Ae);je=ee[0]*W+he,o.translate(je,0),k.x+=je*pe}o.restore(),this.processingType3=null}}},{key:"setCharWidth",value:function(s,o){}},{key:"setCharWidthAndBounds",value:function(s,o,k,N,W,re){this.ctx.rect(k,N,W-k,re-N),this.clip(),this.endPath()}},{key:"getColorN_Pattern",value:function(s){var o=this,k;if(s[0]==="TilingPattern"){var N=s[1],W=this.baseTransform||this.ctx.mozCurrentTransform.slice(),re={createCanvasGraphics:function(ve){return new S(ve,o.commonObjs,o.objs,o.canvasFactory)}};k=new i.TilingPattern(s,N,this.ctx,re,W)}else k=this._getPattern(s[1],s[2]);return k}},{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(s,o,k){var N=r.Util.makeHexColor(s,o,k);this.ctx.strokeStyle=N,this.current.strokeColor=N}},{key:"setFillRGBColor",value:function(s,o,k){var N=r.Util.makeHexColor(s,o,k);this.ctx.fillStyle=N,this.current.fillColor=N,this.current.patternFill=!1}},{key:"_getPattern",value:function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,k;return this.cachedPatterns.has(s)?k=this.cachedPatterns.get(s):(k=(0,i.getShadingPattern)(this.objs.get(s)),this.cachedPatterns.set(s,k)),o&&(k.matrix=o),k}},{key:"shadingFill",value:function(s){if(!!this.contentVisible){var o=this.ctx;this.save();var k=this._getPattern(s);o.fillStyle=k.getPattern(o,this,o.mozCurrentTransformInverse,i.PathType.SHADING);var N=o.mozCurrentTransformInverse;if(N){var W=o.canvas,re=W.width,fe=W.height,ve=r.Util.applyTransform([0,0],N),me=r.Util.applyTransform([0,fe],N),pe=r.Util.applyTransform([re,0],N),Ae=r.Util.applyTransform([re,fe],N),Pe=Math.min(ve[0],me[0],pe[0],Ae[0]),_e=Math.min(ve[1],me[1],pe[1],Ae[1]),We=Math.max(ve[0],me[0],pe[0],Ae[0]),Le=Math.max(ve[1],me[1],pe[1],Ae[1]);this.ctx.fillRect(Pe,_e,We-Pe,Le-_e)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}}},{key:"beginInlineImage",value:function(){(0,r.unreachable)("Should not call beginInlineImage")}},{key:"beginImageData",value:function(){(0,r.unreachable)("Should not call beginImageData")}},{key:"paintFormXObjectBegin",value:function(s,o){if(!!this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(s)&&s.length===6&&this.transform.apply(this,s),this.baseTransform=this.ctx.mozCurrentTransform,o)){var k=o[2]-o[0],N=o[3]-o[1];this.ctx.rect(o[0],o[1],k,N),this.current.updatePathMinMax(this.ctx.mozCurrentTransform,o[0],o[1]),this.current.updatePathMinMax(this.ctx.mozCurrentTransform,o[2],o[3]),this.clip(),this.endPath()}}},{key:"paintFormXObjectEnd",value:function(){!this.contentVisible||(this.restore(),this.baseTransform=this.baseTransformStack.pop())}},{key:"beginGroup",value:function(s){if(!!this.contentVisible){this.save();var o=this.suspendedCtx;this.current.activeSMask&&(this.suspendedCtx=null,this.current.activeSMask=null);var k=this.ctx;s.isolated||(0,r.info)("TODO: Support non-isolated groups."),s.knockout&&(0,r.warn)("Knockout groups not supported.");var N=k.mozCurrentTransform;if(s.matrix&&k.transform.apply(k,s.matrix),!s.bbox)throw new Error("Bounding box is required.");var W=r.Util.getAxialAlignedBoundingBox(s.bbox,k.mozCurrentTransform),re=[0,0,k.canvas.width,k.canvas.height];W=r.Util.intersect(W,re)||[0,0,0,0];var fe=Math.floor(W[0]),ve=Math.floor(W[1]),me=Math.max(Math.ceil(W[2])-fe,1),pe=Math.max(Math.ceil(W[3])-ve,1),Ae=1,Pe=1;me>B&&(Ae=me/B,me=B),pe>B&&(Pe=pe/B,pe=B),this.current.startNewPathAndClipBox([0,0,me,pe]);var _e="groupAt"+this.groupLevel;s.smask&&(_e+="_smask_"+this.smaskCounter++%2);var We=this.cachedCanvases.getCanvas(_e,me,pe,!0),Le=We.context;Le.scale(1/Ae,1/Pe),Le.translate(-fe,-ve),Le.transform.apply(Le,N),s.smask?this.smaskStack.push({canvas:We.canvas,context:Le,offsetX:fe,offsetY:ve,scaleX:Ae,scaleY:Pe,subtype:s.smask.subtype,backdrop:s.smask.backdrop,transferMap:s.smask.transferMap||null,startTransformInverse:null}):(k.setTransform(1,0,0,1,0,0),k.translate(fe,ve),k.scale(Ae,Pe),k.save()),ie(k,Le),this.ctx=Le,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push({ctx:k,suspendedCtx:o}),this.groupLevel++}}},{key:"endGroup",value:function(s){if(!!this.contentVisible){this.groupLevel--;var o=this.ctx,k=this.groupStack.pop(),N=k.ctx,W=k.suspendedCtx;if(this.ctx=N,this.ctx.imageSmoothingEnabled=!1,W&&(this.suspendedCtx=W),s.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();var re=this.ctx.mozCurrentTransform;this.restore(),this.ctx.save(),this.ctx.setTransform.apply(this.ctx,re);var fe=r.Util.getAxialAlignedBoundingBox([0,0,o.canvas.width,o.canvas.height],re);this.ctx.drawImage(o.canvas,0,0),this.ctx.restore(),this.compose(fe)}}}},{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(s,o,k,N,W){if(this.save(),Array.isArray(o)&&o.length===4){var re=o[2]-o[0],fe=o[3]-o[1];if(W&&this.annotationCanvasMap){k=k.slice(),k[4]-=o[0],k[5]-=o[1],o=o.slice(),o[0]=o[1]=0,o[2]=re,o[3]=fe;var ve=r.Util.singularValueDecompose2dScale(this.ctx.mozCurrentTransform),me=j(ve,2),pe=me[0],Ae=me[1],Pe=this.viewportScale,_e=Math.ceil(re*this.outputScaleX*Pe),We=Math.ceil(fe*this.outputScaleY*Pe);this.annotationCanvas=this.canvasFactory.create(_e,We);var Le=this.annotationCanvas,je=Le.canvas,le=Le.context;je.style.width="calc(".concat(re,"px * var(--viewport-scale-factor))"),je.style.height="calc(".concat(fe,"px * var(--viewport-scale-factor))"),this.annotationCanvasMap.set(s,je),this.annotationCanvas.savedCtx=this.ctx,this.ctx=le,this.ctx.setTransform(pe,0,0,-Ae,0,fe*Ae),T(this.ctx),H(this.ctx)}else H(this.ctx),this.ctx.rect(o[0],o[1],re,fe),this.clip(),this.endPath()}this.current=new G(this.ctx.canvas.width,this.ctx.canvas.height),this.transform.apply(this,k),this.transform.apply(this,N)}},{key:"endAnnotation",value:function(){this.annotationCanvas&&(this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas),this.restore()}},{key:"paintImageMaskXObject",value:function(s){if(!!this.contentVisible){var o=this.ctx,k=s.width,N=s.height,W=this.processingType3;if(u&&W&&W.compiled===void 0&&(k<=v&&N<=v?W.compiled=M({data:s.data,width:k,height:N}):W.compiled=null),W!=null&&W.compiled){W.compiled(o);return}var re=this._createMaskCanvas(s),fe=re.canvas;o.save(),o.setTransform(1,0,0,1,0,0),o.drawImage(fe,re.offsetX,re.offsetY),o.restore(),this.compose()}}},{key:"paintImageMaskXObjectRepeat",value:function(s,o){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,N=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,W=arguments.length>4?arguments[4]:void 0,re=arguments.length>5?arguments[5]:void 0;if(!!this.contentVisible){var fe=this.ctx;fe.save();var ve=fe.mozCurrentTransform;fe.transform(o,k,N,W,0,0);var me=this._createMaskCanvas(s);fe.setTransform(1,0,0,1,0,0);for(var pe=0,Ae=re.length;pe<Ae;pe+=2){var Pe=r.Util.transform(ve,[o,k,N,W,re[pe],re[pe+1]]),_e=r.Util.applyTransform([0,0],Pe),We=j(_e,2),Le=We[0],je=We[1];fe.drawImage(me.canvas,Le,je)}fe.restore(),this.compose()}}},{key:"paintImageMaskXObjectGroup",value:function(s){if(!!this.contentVisible){for(var o=this.ctx,k=this.current.fillColor,N=this.current.patternFill,W=0,re=s.length;W<re;W++){var fe=s[W],ve=fe.width,me=fe.height,pe=this.cachedCanvases.getCanvas("maskCanvas",ve,me),Ae=pe.context;Ae.save(),J(Ae,fe),Ae.globalCompositeOperation="source-in",Ae.fillStyle=N?k.getPattern(Ae,this,o.mozCurrentTransformInverse,i.PathType.FILL):k,Ae.fillRect(0,0,ve,me),Ae.restore(),o.save(),o.transform.apply(o,fe.transform),o.scale(1,-1),o.drawImage(pe.canvas,0,0,ve,me,0,-1,1,1),o.restore()}this.compose()}}},{key:"paintImageXObject",value:function(s){if(!!this.contentVisible){var o=s.startsWith("g_")?this.commonObjs.get(s):this.objs.get(s);if(!o){(0,r.warn)("Dependent image isn't ready yet");return}this.paintInlineImageXObject(o)}}},{key:"paintImageXObjectRepeat",value:function(s,o,k,N){if(!!this.contentVisible){var W=s.startsWith("g_")?this.commonObjs.get(s):this.objs.get(s);if(!W){(0,r.warn)("Dependent image isn't ready yet");return}for(var re=W.width,fe=W.height,ve=[],me=0,pe=N.length;me<pe;me+=2)ve.push({transform:[o,0,0,k,N[me],N[me+1]],x:0,y:0,w:re,h:fe});this.paintInlineImageXObjectGroup(W,ve)}}},{key:"paintInlineImageXObject",value:function(s){if(!!this.contentVisible){var o=s.width,k=s.height,N=this.ctx;this.save(),N.scale(1/o,-1/k);var W;if(typeof HTMLElement=="function"&&s instanceof HTMLElement||!s.data)W=s;else{var re=this.cachedCanvases.getCanvas("inlineImage",o,k),fe=re.context;Z(fe,s,this.current.transferMaps),W=re.canvas}var ve=this._scaleImage(W,N.mozCurrentTransformInverse);if(N.imageSmoothingEnabled=K(N.mozCurrentTransform,s.interpolate),N.drawImage(ve.img,0,0,ve.paintWidth,ve.paintHeight,0,-k,o,k),this.imageLayer){var me=this.getCanvasPosition(0,-k);this.imageLayer.appendImage({imgData:s,left:me[0],top:me[1],width:o/N.mozCurrentTransformInverse[0],height:k/N.mozCurrentTransformInverse[3]})}this.compose(),this.restore()}}},{key:"paintInlineImageXObjectGroup",value:function(s,o){if(!!this.contentVisible){var k=this.ctx,N=s.width,W=s.height,re=this.cachedCanvases.getCanvas("inlineImage",N,W),fe=re.context;Z(fe,s,this.current.transferMaps);for(var ve=0,me=o.length;ve<me;ve++){var pe=o[ve];if(k.save(),k.transform.apply(k,pe.transform),k.scale(1,-1),k.drawImage(re.canvas,pe.x,pe.y,pe.w,pe.h,0,-1,1,1),this.imageLayer){var Ae=this.getCanvasPosition(pe.x,pe.y);this.imageLayer.appendImage({imgData:s,left:Ae[0],top:Ae[1],width:N,height:W})}k.restore()}this.compose()}}},{key:"paintSolidColorImageMask",value:function(){!this.contentVisible||(this.ctx.fillRect(0,0,1,1),this.compose())}},{key:"markPoint",value:function(s){}},{key:"markPointProps",value:function(s,o){}},{key:"beginMarkedContent",value:function(s){this.markedContentStack.push({visible:!0})}},{key:"beginMarkedContentProps",value:function(s,o){s==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(o)}):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(s){this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(s);var o=this.ctx;this.pendingClip&&(this.pendingClip===Ce?o.clip("evenodd"):o.clip(),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),o.beginPath()}},{key:"getSinglePixelWidth",value:function(){if(this._cachedGetSinglePixelWidth===null){var s=this.ctx.mozCurrentTransform,o=Math.abs(s[0]*s[3]-s[2]*s[1]),k=Math.pow(s[0],2)+Math.pow(s[2],2),N=Math.pow(s[1],2)+Math.pow(s[3],2),W=Math.sqrt(Math.max(k,N))/o;k!==N&&this._combinedScaleFactor*W>1?this._cachedGetSinglePixelWidth=-(this._combinedScaleFactor*W):o>Number.EPSILON?this._cachedGetSinglePixelWidth=W:this._cachedGetSinglePixelWidth=1}return this._cachedGetSinglePixelWidth}},{key:"getCanvasPosition",value:function(s,o){var k=this.ctx.mozCurrentTransform;return[k[0]*s+k[2]*o+k[4],k[1]*s+k[3]*o+k[5]]}},{key:"isContentVisible",value:function(){for(var s=this.markedContentStack.length-1;s>=0;s--)if(!this.markedContentStack[s].visible)return!1;return!0}}]),S}();a.CanvasGraphics=we;for(var Me in r.OPS)we.prototype[Me]!==void 0&&(we.prototype[r.OPS[Me]]=we.prototype[Me])},(y,a,t)=>{"use strict";function r(M){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?r=function(Z){return typeof Z}:r=function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},r(M)}Object.defineProperty(a,"__esModule",{value:!0}),a.TilingPattern=a.PathType=void 0,a.getShadingPattern=b;var i=t(4);function f(M,G){var Z=typeof Symbol!="undefined"&&M[Symbol.iterator]||M["@@iterator"];if(!Z){if(Array.isArray(M)||(Z=m(M))||G&&M&&typeof M.length=="number"){Z&&(M=Z);var J=0,ie=function(){};return{s:ie,n:function(){return J>=M.length?{done:!0}:{done:!1,value:M[J++]}},e:function(A){throw A},f:ie}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var H=!0,q=!1,R;return{s:function(){Z=Z.call(M)},n:function(){var A=Z.next();return H=A.done,A},e:function(A){q=!0,R=A},f:function(){try{!H&&Z.return!=null&&Z.return()}finally{if(q)throw R}}}}function m(M,G){if(!!M){if(typeof M=="string")return _(M,G);var Z=Object.prototype.toString.call(M).slice(8,-1);if(Z==="Object"&&M.constructor&&(Z=M.constructor.name),Z==="Map"||Z==="Set")return Array.from(M);if(Z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Z))return _(M,G)}}function _(M,G){(G==null||G>M.length)&&(G=M.length);for(var Z=0,J=new Array(G);Z<G;Z++)J[Z]=M[Z];return J}function D(M,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function");M.prototype=Object.create(G&&G.prototype,{constructor:{value:M,writable:!0,configurable:!0}}),G&&L(M,G)}function L(M,G){return L=Object.setPrototypeOf||function(J,ie){return J.__proto__=ie,J},L(M,G)}function $(M){var G=O();return function(){var J=P(M),ie;if(G){var H=P(this).constructor;ie=Reflect.construct(J,arguments,H)}else ie=J.apply(this,arguments);return j(this,ie)}}function j(M,G){if(G&&(r(G)==="object"||typeof G=="function"))return G;if(G!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return V(M)}function V(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}function O(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(M){return!1}}function P(M){return P=Object.setPrototypeOf?Object.getPrototypeOf:function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},P(M)}function F(M,G){if(!(M instanceof G))throw new TypeError("Cannot call a class as a function")}function x(M,G){for(var Z=0;Z<G.length;Z++){var J=G[Z];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(M,J.key,J)}}function I(M,G,Z){return G&&x(M.prototype,G),Z&&x(M,Z),M}var g={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};a.PathType=g;function B(M,G){if(!(!G||typeof Path2D=="undefined")){var Z=G[2]-G[0],J=G[3]-G[1],ie=new Path2D;ie.rect(G[0],G[1],Z,J),M.clip(ie)}}var p=function(){function M(){F(this,M),this.constructor===M&&(0,i.unreachable)("Cannot initialize BaseShadingPattern.")}return I(M,[{key:"getPattern",value:function(){(0,i.unreachable)("Abstract method `getPattern` called.")}}]),M}(),l=function(M){D(Z,M);var G=$(Z);function Z(J){var ie;return F(this,Z),ie=G.call(this),ie._type=J[1],ie._bbox=J[2],ie._colorStops=J[3],ie._p0=J[4],ie._p1=J[5],ie._r0=J[6],ie._r1=J[7],ie.matrix=null,ie}return I(Z,[{key:"_createGradient",value:function(ie){var H;this._type==="axial"?H=ie.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(H=ie.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));var q=f(this._colorStops),R;try{for(q.s();!(R=q.n()).done;){var h=R.value;H.addColorStop(h[0],h[1])}}catch(A){q.e(A)}finally{q.f()}return H}},{key:"getPattern",value:function(ie,H,q,R){var h;if(R===g.STROKE||R===g.FILL){var A=H.current.getClippedPathBoundingBox(R,ie.mozCurrentTransform)||[0,0,0,0],E=Math.ceil(A[2]-A[0])||1,K=Math.ceil(A[3]-A[1])||1,te=H.cachedCanvases.getCanvas("pattern",E,K,!0),Y=te.context;Y.clearRect(0,0,Y.canvas.width,Y.canvas.height),Y.beginPath(),Y.rect(0,0,Y.canvas.width,Y.canvas.height),Y.translate(-A[0],-A[1]),q=i.Util.transform(q,[1,0,0,1,A[0],A[1]]),Y.transform.apply(Y,H.baseTransform),this.matrix&&Y.transform.apply(Y,this.matrix),B(Y,this._bbox),Y.fillStyle=this._createGradient(Y),Y.fill(),h=ie.createPattern(te.canvas,"no-repeat");var be=new DOMMatrix(q);try{h.setTransform(be)}catch(Ce){(0,i.warn)('RadialAxialShadingPattern.getPattern: "'.concat(Ce==null?void 0:Ce.message,'".'))}}else B(ie,this._bbox),h=this._createGradient(ie);return h}}]),Z}(p);function u(M,G,Z,J,ie,H,q,R){var h=G.coords,A=G.colors,E=M.data,K=M.width*4,te;h[Z+1]>h[J+1]&&(te=Z,Z=J,J=te,te=H,H=q,q=te),h[J+1]>h[ie+1]&&(te=J,J=ie,ie=te,te=q,q=R,R=te),h[Z+1]>h[J+1]&&(te=Z,Z=J,J=te,te=H,H=q,q=te);var Y=(h[Z]+G.offsetX)*G.scaleX,be=(h[Z+1]+G.offsetY)*G.scaleY,Ce=(h[J]+G.offsetX)*G.scaleX,we=(h[J+1]+G.offsetY)*G.scaleY,Me=(h[ie]+G.offsetX)*G.scaleX,S=(h[ie+1]+G.offsetY)*G.scaleY;if(!(be>=S))for(var w=A[H],s=A[H+1],o=A[H+2],k=A[q],N=A[q+1],W=A[q+2],re=A[R],fe=A[R+1],ve=A[R+2],me=Math.round(be),pe=Math.round(S),Ae,Pe,_e,We,Le,je,le,he,z=me;z<=pe;z++){if(z<we){var ee=void 0;z<be?ee=0:ee=(be-z)/(be-we),Ae=Y-(Y-Ce)*ee,Pe=w-(w-k)*ee,_e=s-(s-N)*ee,We=o-(o-W)*ee}else{var X=void 0;z>S?X=1:we===S?X=0:X=(we-z)/(we-S),Ae=Ce-(Ce-Me)*X,Pe=k-(k-re)*X,_e=N-(N-fe)*X,We=W-(W-ve)*X}var oe=void 0;z<be?oe=0:z>S?oe=1:oe=(be-z)/(be-S),Le=Y-(Y-Me)*oe,je=w-(w-re)*oe,le=s-(s-fe)*oe,he=o-(o-ve)*oe;for(var ne=Math.round(Math.min(Ae,Le)),Q=Math.round(Math.max(Ae,Le)),de=K*z+ne*4,ce=ne;ce<=Q;ce++)oe=(Ae-ce)/(Ae-Le),oe<0?oe=0:oe>1&&(oe=1),E[de++]=Pe-(Pe-je)*oe|0,E[de++]=_e-(_e-le)*oe|0,E[de++]=We-(We-he)*oe|0,E[de++]=255}}function v(M,G,Z){var J=G.coords,ie=G.colors,H,q;switch(G.type){case"lattice":var R=G.verticesPerRow,h=Math.floor(J.length/R)-1,A=R-1;for(H=0;H<h;H++)for(var E=H*R,K=0;K<A;K++,E++)u(M,Z,J[E],J[E+1],J[E+R],ie[E],ie[E+1],ie[E+R]),u(M,Z,J[E+R+1],J[E+1],J[E+R],ie[E+R+1],ie[E+1],ie[E+R]);break;case"triangles":for(H=0,q=J.length;H<q;H+=3)u(M,Z,J[H],J[H+1],J[H+2],ie[H],ie[H+1],ie[H+2]);break;default:throw new Error("illegal figure")}}var d=function(M){D(Z,M);var G=$(Z);function Z(J){var ie;return F(this,Z),ie=G.call(this),ie._coords=J[2],ie._colors=J[3],ie._figures=J[4],ie._bounds=J[5],ie._bbox=J[7],ie._background=J[8],ie.matrix=null,ie}return I(Z,[{key:"_createMeshCanvas",value:function(ie,H,q){var R=1.1,h=3e3,A=2,E=Math.floor(this._bounds[0]),K=Math.floor(this._bounds[1]),te=Math.ceil(this._bounds[2])-E,Y=Math.ceil(this._bounds[3])-K,be=Math.min(Math.ceil(Math.abs(te*ie[0]*R)),h),Ce=Math.min(Math.ceil(Math.abs(Y*ie[1]*R)),h),we=te/be,Me=Y/Ce,S={coords:this._coords,colors:this._colors,offsetX:-E,offsetY:-K,scaleX:1/we,scaleY:1/Me},w=be+A*2,s=Ce+A*2,o=q.getCanvas("mesh",w,s,!1),k=o.context,N=k.createImageData(be,Ce);if(H)for(var W=N.data,re=0,fe=W.length;re<fe;re+=4)W[re]=H[0],W[re+1]=H[1],W[re+2]=H[2],W[re+3]=255;var ve=f(this._figures),me;try{for(ve.s();!(me=ve.n()).done;){var pe=me.value;v(N,pe,S)}}catch(Pe){ve.e(Pe)}finally{ve.f()}k.putImageData(N,A,A);var Ae=o.canvas;return{canvas:Ae,offsetX:E-A*we,offsetY:K-A*Me,scaleX:we,scaleY:Me}}},{key:"getPattern",value:function(ie,H,q,R){B(ie,this._bbox);var h;if(R===g.SHADING)h=i.Util.singularValueDecompose2dScale(ie.mozCurrentTransform);else if(h=i.Util.singularValueDecompose2dScale(H.baseTransform),this.matrix){var A=i.Util.singularValueDecompose2dScale(this.matrix);h=[h[0]*A[0],h[1]*A[1]]}var E=this._createMeshCanvas(h,R===g.SHADING?null:this._background,H.cachedCanvases);return R!==g.SHADING&&(ie.setTransform.apply(ie,H.baseTransform),this.matrix&&ie.transform.apply(ie,this.matrix)),ie.translate(E.offsetX,E.offsetY),ie.scale(E.scaleX,E.scaleY),ie.createPattern(E.canvas,"no-repeat")}}]),Z}(p),c=function(M){D(Z,M);var G=$(Z);function Z(){return F(this,Z),G.apply(this,arguments)}return I(Z,[{key:"getPattern",value:function(){return"hotpink"}}]),Z}(p);function b(M){switch(M[0]){case"RadialAxial":return new l(M);case"Mesh":return new d(M);case"Dummy":return new c}throw new Error("Unknown IR type: ".concat(M[0]))}var T={COLORED:1,UNCOLORED:2},U=function(){function M(G,Z,J,ie,H){F(this,M),this.operatorList=G[2],this.matrix=G[3]||[1,0,0,1,0,0],this.bbox=G[4],this.xstep=G[5],this.ystep=G[6],this.paintType=G[7],this.tilingType=G[8],this.color=Z,this.ctx=J,this.canvasGraphicsFactory=ie,this.baseTransform=H}return I(M,[{key:"createPatternCanvas",value:function(Z){var J=this.operatorList,ie=this.bbox,H=this.xstep,q=this.ystep,R=this.paintType,h=this.tilingType,A=this.color,E=this.canvasGraphicsFactory;(0,i.info)("TilingType: "+h);var K=ie[0],te=ie[1],Y=ie[2],be=ie[3],Ce=i.Util.singularValueDecompose2dScale(this.matrix),we=i.Util.singularValueDecompose2dScale(this.baseTransform),Me=[Ce[0]*we[0],Ce[1]*we[1]],S=this.getSizeAndScale(H,this.ctx.canvas.width,Me[0]),w=this.getSizeAndScale(q,this.ctx.canvas.height,Me[1]),s=Z.cachedCanvases.getCanvas("pattern",S.size,w.size,!0),o=s.context,k=E.createCanvasGraphics(o);k.groupLevel=Z.groupLevel,this.setFillAndStrokeStyleToContext(k,R,A);var N=K,W=te,re=Y,fe=be;return K<0&&(N=0,re+=Math.abs(K)),te<0&&(W=0,fe+=Math.abs(te)),o.translate(-(S.scale*N),-(w.scale*W)),k.transform(S.scale,0,0,w.scale,0,0),this.clipBbox(k,N,W,re,fe),k.baseTransform=k.ctx.mozCurrentTransform.slice(),k.executeOperatorList(J),k.endDrawing(),{canvas:s.canvas,scaleX:S.scale,scaleY:w.scale,offsetX:N,offsetY:W}}},{key:"getSizeAndScale",value:function(Z,J,ie){Z=Math.abs(Z);var H=Math.max(M.MAX_PATTERN_SIZE,J),q=Math.ceil(Z*ie);return q>=H?q=H:ie=q/Z,{scale:ie,size:q}}},{key:"clipBbox",value:function(Z,J,ie,H,q){var R=H-J,h=q-ie;Z.ctx.rect(J,ie,R,h),Z.clip(),Z.endPath()}},{key:"setFillAndStrokeStyleToContext",value:function(Z,J,ie){var H=Z.ctx,q=Z.current;switch(J){case T.COLORED:var R=this.ctx;H.fillStyle=R.fillStyle,H.strokeStyle=R.strokeStyle,q.fillColor=R.fillStyle,q.strokeColor=R.strokeStyle;break;case T.UNCOLORED:var h=i.Util.makeHexColor(ie[0],ie[1],ie[2]);H.fillStyle=h,H.strokeStyle=h,q.fillColor=h,q.strokeColor=h;break;default:throw new i.FormatError("Unsupported paint type: ".concat(J))}}},{key:"getPattern",value:function(Z,J,ie,H){var q=ie;H!==g.SHADING&&(q=i.Util.transform(q,J.baseTransform),this.matrix&&(q=i.Util.transform(q,this.matrix)));var R=this.createPatternCanvas(J),h=new DOMMatrix(q);h=h.translate(R.offsetX,R.offsetY),h=h.scale(1/R.scaleX,1/R.scaleY);var A=Z.createPattern(R.canvas,"repeat");try{A.setTransform(h)}catch(E){(0,i.warn)('TilingPattern.getPattern: "'.concat(E==null?void 0:E.message,'".'))}return A}}],[{key:"MAX_PATTERN_SIZE",get:function(){return(0,i.shadow)(this,"MAX_PATTERN_SIZE",3e3)}}]),M}();a.TilingPattern=U},(y,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.GlobalWorkerOptions=void 0;var t=Object.create(null);a.GlobalWorkerOptions=t,t.workerPort=t.workerPort===void 0?null:t.workerPort,t.workerSrc=t.workerSrc===void 0?"":t.workerSrc},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.MessageHandler=void 0;var r=f(t(2)),i=t(4);function f(x){return x&&x.__esModule?x:{default:x}}function m(x,I,g,B,p,l,u){try{var v=x[l](u),d=v.value}catch(c){g(c);return}v.done?I(d):Promise.resolve(d).then(B,p)}function _(x){return function(){var I=this,g=arguments;return new Promise(function(B,p){var l=x.apply(I,g);function u(d){m(l,B,p,u,v,"next",d)}function v(d){m(l,B,p,u,v,"throw",d)}u(void 0)})}}function D(x,I){if(!(x instanceof I))throw new TypeError("Cannot call a class as a function")}function L(x,I){for(var g=0;g<I.length;g++){var B=I[g];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(x,B.key,B)}}function $(x,I,g){return I&&L(x.prototype,I),g&&L(x,g),x}function j(x){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?j=function(g){return typeof g}:j=function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},j(x)}var V={UNKNOWN:0,DATA:1,ERROR:2},O={UNKNOWN:0,CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function P(x){if(!(x instanceof Error||j(x)==="object"&&x!==null))return(0,i.warn)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),x;switch(x.name){case"AbortException":return new i.AbortException(x.message);case"MissingPDFException":return new i.MissingPDFException(x.message);case"PasswordException":return new i.PasswordException(x.message,x.code);case"UnexpectedResponseException":return new i.UnexpectedResponseException(x.message,x.status);case"UnknownErrorException":return new i.UnknownErrorException(x.message,x.details);default:return new i.UnknownErrorException(x.message,x.toString())}}var F=function(){function x(I,g,B){var p=this;D(this,x),this.sourceName=I,this.targetName=g,this.comObj=B,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(l){var u=l.data;if(u.targetName===p.sourceName){if(u.stream){p._processStreamMessage(u);return}if(u.callback){var v=u.callbackId,d=p.callbackCapabilities[v];if(!d)throw new Error("Cannot resolve callback ".concat(v));if(delete p.callbackCapabilities[v],u.callback===V.DATA)d.resolve(u.data);else if(u.callback===V.ERROR)d.reject(P(u.reason));else throw new Error("Unexpected callback case");return}var c=p.actionHandler[u.action];if(!c)throw new Error("Unknown action from worker: ".concat(u.action));if(u.callbackId){var b=p.sourceName,T=u.sourceName;new Promise(function(U){U(c(u.data))}).then(function(U){B.postMessage({sourceName:b,targetName:T,callback:V.DATA,callbackId:u.callbackId,data:U})},function(U){B.postMessage({sourceName:b,targetName:T,callback:V.ERROR,callbackId:u.callbackId,reason:P(U)})});return}if(u.streamId){p._createStreamSink(u);return}c(u.data)}},B.addEventListener("message",this._onComObjOnMessage)}return $(x,[{key:"on",value:function(g,B){var p=this.actionHandler;if(p[g])throw new Error('There is already an actionName called "'.concat(g,'"'));p[g]=B}},{key:"send",value:function(g,B,p){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:g,data:B},p)}},{key:"sendWithPromise",value:function(g,B,p){var l=this.callbackId++,u=(0,i.createPromiseCapability)();this.callbackCapabilities[l]=u;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:g,callbackId:l,data:B},p)}catch(v){u.reject(v)}return u.promise}},{key:"sendWithStream",value:function(g,B,p,l){var u=this,v=this.streamId++,d=this.sourceName,c=this.targetName,b=this.comObj;return new ReadableStream({start:function(U){var M=(0,i.createPromiseCapability)();return u.streamControllers[v]={controller:U,startCall:M,pullCall:null,cancelCall:null,isClosed:!1},b.postMessage({sourceName:d,targetName:c,action:g,streamId:v,data:B,desiredSize:U.desiredSize},l),M.promise},pull:function(U){var M=(0,i.createPromiseCapability)();return u.streamControllers[v].pullCall=M,b.postMessage({sourceName:d,targetName:c,stream:O.PULL,streamId:v,desiredSize:U.desiredSize}),M.promise},cancel:function(U){(0,i.assert)(U instanceof Error,"cancel must have a valid reason");var M=(0,i.createPromiseCapability)();return u.streamControllers[v].cancelCall=M,u.streamControllers[v].isClosed=!0,b.postMessage({sourceName:d,targetName:c,stream:O.CANCEL,streamId:v,reason:P(U)}),M.promise}},p)}},{key:"_createStreamSink",value:function(g){var B=g.streamId,p=this.sourceName,l=g.sourceName,u=this.comObj,v=this,d=this.actionHandler[g.action],c={enqueue:function(T){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,M=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var G=this.desiredSize;this.desiredSize-=U,G>0&&this.desiredSize<=0&&(this.sinkCapability=(0,i.createPromiseCapability)(),this.ready=this.sinkCapability.promise),u.postMessage({sourceName:p,targetName:l,stream:O.ENQUEUE,streamId:B,chunk:T},M)}},close:function(){this.isCancelled||(this.isCancelled=!0,u.postMessage({sourceName:p,targetName:l,stream:O.CLOSE,streamId:B}),delete v.streamSinks[B])},error:function(T){(0,i.assert)(T instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,u.postMessage({sourceName:p,targetName:l,stream:O.ERROR,streamId:B,reason:P(T)}))},sinkCapability:(0,i.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:g.desiredSize,ready:null};c.sinkCapability.resolve(),c.ready=c.sinkCapability.promise,this.streamSinks[B]=c,new Promise(function(b){b(d(g.data,c))}).then(function(){u.postMessage({sourceName:p,targetName:l,stream:O.START_COMPLETE,streamId:B,success:!0})},function(b){u.postMessage({sourceName:p,targetName:l,stream:O.START_COMPLETE,streamId:B,reason:P(b)})})}},{key:"_processStreamMessage",value:function(g){var B=g.streamId,p=this.sourceName,l=g.sourceName,u=this.comObj,v=this.streamControllers[B],d=this.streamSinks[B];switch(g.stream){case O.START_COMPLETE:g.success?v.startCall.resolve():v.startCall.reject(P(g.reason));break;case O.PULL_COMPLETE:g.success?v.pullCall.resolve():v.pullCall.reject(P(g.reason));break;case O.PULL:if(!d){u.postMessage({sourceName:p,targetName:l,stream:O.PULL_COMPLETE,streamId:B,success:!0});break}d.desiredSize<=0&&g.desiredSize>0&&d.sinkCapability.resolve(),d.desiredSize=g.desiredSize,new Promise(function(c){c(d.onPull&&d.onPull())}).then(function(){u.postMessage({sourceName:p,targetName:l,stream:O.PULL_COMPLETE,streamId:B,success:!0})},function(c){u.postMessage({sourceName:p,targetName:l,stream:O.PULL_COMPLETE,streamId:B,reason:P(c)})});break;case O.ENQUEUE:if((0,i.assert)(v,"enqueue should have stream controller"),v.isClosed)break;v.controller.enqueue(g.chunk);break;case O.CLOSE:if((0,i.assert)(v,"close should have stream controller"),v.isClosed)break;v.isClosed=!0,v.controller.close(),this._deleteStreamController(v,B);break;case O.ERROR:(0,i.assert)(v,"error should have stream controller"),v.controller.error(P(g.reason)),this._deleteStreamController(v,B);break;case O.CANCEL_COMPLETE:g.success?v.cancelCall.resolve():v.cancelCall.reject(P(g.reason)),this._deleteStreamController(v,B);break;case O.CANCEL:if(!d)break;new Promise(function(c){c(d.onCancel&&d.onCancel(P(g.reason)))}).then(function(){u.postMessage({sourceName:p,targetName:l,stream:O.CANCEL_COMPLETE,streamId:B,success:!0})},function(c){u.postMessage({sourceName:p,targetName:l,stream:O.CANCEL_COMPLETE,streamId:B,reason:P(c)})}),d.sinkCapability.reject(P(g.reason)),d.isCancelled=!0,delete this.streamSinks[B];break;default:throw new Error("Unexpected stream case")}}},{key:"_deleteStreamController",value:function(){var I=_(r.default.mark(function B(p,l){return r.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,Promise.allSettled([p.startCall&&p.startCall.promise,p.pullCall&&p.pullCall.promise,p.cancelCall&&p.cancelCall.promise]);case 2:delete this.streamControllers[l];case 3:case"end":return v.stop()}},B,this)}));function g(B,p){return I.apply(this,arguments)}return g}()},{key:"destroy",value:function(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}]),x}();a.MessageHandler=F},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Metadata=void 0;var r=t(4);function i(I,g){if(!(I instanceof g))throw new TypeError("Cannot call a class as a function")}function f(I,g){for(var B=0;B<g.length;B++){var p=g[B];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(I,p.key,p)}}function m(I,g,B){return g&&f(I.prototype,g),B&&f(I,B),I}function _(I,g,B){D(I,g),g.set(I,B)}function D(I,g){if(g.has(I))throw new TypeError("Cannot initialize the same private elements twice on an object")}function L(I,g){var B=V(I,g,"get");return $(I,B)}function $(I,g){return g.get?g.get.call(I):g.value}function j(I,g,B){var p=V(I,g,"set");return O(I,p,B),B}function V(I,g,B){if(!g.has(I))throw new TypeError("attempted to "+B+" private field on non-instance");return g.get(I)}function O(I,g,B){if(g.set)g.set.call(I,B);else{if(!g.writable)throw new TypeError("attempted to set read only private field");g.value=B}}var P=new WeakMap,F=new WeakMap,x=function(){function I(g){var B=g.parsedData,p=g.rawData;i(this,I),_(this,P,{writable:!0,value:void 0}),_(this,F,{writable:!0,value:void 0}),j(this,P,B),j(this,F,p)}return m(I,[{key:"getRaw",value:function(){return L(this,F)}},{key:"get",value:function(B){var p;return(p=L(this,P).get(B))!==null&&p!==void 0?p:null}},{key:"getAll",value:function(){return(0,r.objectFromMap)(L(this,P))}},{key:"has",value:function(B){return L(this,P).has(B)}}]),I}();a.Metadata=x},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.OptionalContentConfig=void 0;var r=t(4);function i(V,O){var P=typeof Symbol!="undefined"&&V[Symbol.iterator]||V["@@iterator"];if(!P){if(Array.isArray(V)||(P=f(V))||O&&V&&typeof V.length=="number"){P&&(V=P);var F=0,x=function(){};return{s:x,n:function(){return F>=V.length?{done:!0}:{done:!1,value:V[F++]}},e:function(l){throw l},f:x}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var I=!0,g=!1,B;return{s:function(){P=P.call(V)},n:function(){var l=P.next();return I=l.done,l},e:function(l){g=!0,B=l},f:function(){try{!I&&P.return!=null&&P.return()}finally{if(g)throw B}}}}function f(V,O){if(!!V){if(typeof V=="string")return m(V,O);var P=Object.prototype.toString.call(V).slice(8,-1);if(P==="Object"&&V.constructor&&(P=V.constructor.name),P==="Map"||P==="Set")return Array.from(V);if(P==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P))return m(V,O)}}function m(V,O){(O==null||O>V.length)&&(O=V.length);for(var P=0,F=new Array(O);P<O;P++)F[P]=V[P];return F}function _(V,O){for(var P=0;P<O.length;P++){var F=O[P];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(V,F.key,F)}}function D(V,O,P){return O&&_(V.prototype,O),P&&_(V,P),V}function L(V,O){if(!(V instanceof O))throw new TypeError("Cannot call a class as a function")}var $=function V(O,P){L(this,V),this.visible=!0,this.name=O,this.intent=P},j=function(){function V(O){if(L(this,V),this.name=null,this.creator=null,this._order=null,this._groups=new Map,O!==null){this.name=O.name,this.creator=O.creator,this._order=O.order;var P=i(O.groups),F;try{for(P.s();!(F=P.n()).done;){var x=F.value;this._groups.set(x.id,new $(x.name,x.intent))}}catch(b){P.e(b)}finally{P.f()}if(O.baseState==="OFF"){var I=i(this._groups),g;try{for(I.s();!(g=I.n()).done;){var B=g.value;B.visible=!1}}catch(b){I.e(b)}finally{I.f()}}var p=i(O.on),l;try{for(p.s();!(l=p.n()).done;){var u=l.value;this._groups.get(u).visible=!0}}catch(b){p.e(b)}finally{p.f()}var v=i(O.off),d;try{for(v.s();!(d=v.n()).done;){var c=d.value;this._groups.get(c).visible=!1}}catch(b){v.e(b)}finally{v.f()}}}return D(V,[{key:"_evaluateVisibilityExpression",value:function(P){var F=P.length;if(F<2)return!0;for(var x=P[0],I=1;I<F;I++){var g=P[I],B=void 0;if(Array.isArray(g))B=this._evaluateVisibilityExpression(g);else if(this._groups.has(g))B=this._groups.get(g).visible;else return(0,r.warn)("Optional content group not found: ".concat(g)),!0;switch(x){case"And":if(!B)return!1;break;case"Or":if(B)return!0;break;case"Not":return!B;default:return!0}}return x==="And"}},{key:"isVisible",value:function(P){if(this._groups.size===0)return!0;if(!P)return(0,r.warn)("Optional content group not defined."),!0;if(P.type==="OCG")return this._groups.has(P.id)?this._groups.get(P.id).visible:((0,r.warn)("Optional content group not found: ".concat(P.id)),!0);if(P.type==="OCMD"){if(P.expression)return this._evaluateVisibilityExpression(P.expression);if(!P.policy||P.policy==="AnyOn"){var F=i(P.ids),x;try{for(F.s();!(x=F.n()).done;){var I=x.value;if(!this._groups.has(I))return(0,r.warn)("Optional content group not found: ".concat(I)),!0;if(this._groups.get(I).visible)return!0}}catch(T){F.e(T)}finally{F.f()}return!1}else if(P.policy==="AllOn"){var g=i(P.ids),B;try{for(g.s();!(B=g.n()).done;){var p=B.value;if(!this._groups.has(p))return(0,r.warn)("Optional content group not found: ".concat(p)),!0;if(!this._groups.get(p).visible)return!1}}catch(T){g.e(T)}finally{g.f()}return!0}else if(P.policy==="AnyOff"){var l=i(P.ids),u;try{for(l.s();!(u=l.n()).done;){var v=u.value;if(!this._groups.has(v))return(0,r.warn)("Optional content group not found: ".concat(v)),!0;if(!this._groups.get(v).visible)return!0}}catch(T){l.e(T)}finally{l.f()}return!1}else if(P.policy==="AllOff"){var d=i(P.ids),c;try{for(d.s();!(c=d.n()).done;){var b=c.value;if(!this._groups.has(b))return(0,r.warn)("Optional content group not found: ".concat(b)),!0;if(this._groups.get(b).visible)return!1}}catch(T){d.e(T)}finally{d.f()}return!0}return(0,r.warn)("Unknown optional content policy ".concat(P.policy,".")),!0}return(0,r.warn)("Unknown group type ".concat(P.type,".")),!0}},{key:"setVisibility",value:function(P){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!this._groups.has(P)){(0,r.warn)("Optional content group not found: ".concat(P));return}this._groups.get(P).visible=!!F}},{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,r.objectFromMap)(this._groups):null}},{key:"getGroup",value:function(P){return this._groups.get(P)||null}}]),V}();a.OptionalContentConfig=j},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.PDFDataTransportStream=void 0;var r=m(t(2)),i=t(4),f=t(1);function m(g){return g&&g.__esModule?g:{default:g}}function _(g,B,p,l,u,v,d){try{var c=g[v](d),b=c.value}catch(T){p(T);return}c.done?B(b):Promise.resolve(b).then(l,u)}function D(g){return function(){var B=this,p=arguments;return new Promise(function(l,u){var v=g.apply(B,p);function d(b){_(v,l,u,d,c,"next",b)}function c(b){_(v,l,u,d,c,"throw",b)}d(void 0)})}}function L(g,B){var p=typeof Symbol!="undefined"&&g[Symbol.iterator]||g["@@iterator"];if(!p){if(Array.isArray(g)||(p=$(g))||B&&g&&typeof g.length=="number"){p&&(g=p);var l=0,u=function(){};return{s:u,n:function(){return l>=g.length?{done:!0}:{done:!1,value:g[l++]}},e:function(T){throw T},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var v=!0,d=!1,c;return{s:function(){p=p.call(g)},n:function(){var T=p.next();return v=T.done,T},e:function(T){d=!0,c=T},f:function(){try{!v&&p.return!=null&&p.return()}finally{if(d)throw c}}}}function $(g,B){if(!!g){if(typeof g=="string")return j(g,B);var p=Object.prototype.toString.call(g).slice(8,-1);if(p==="Object"&&g.constructor&&(p=g.constructor.name),p==="Map"||p==="Set")return Array.from(g);if(p==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p))return j(g,B)}}function j(g,B){(B==null||B>g.length)&&(B=g.length);for(var p=0,l=new Array(B);p<B;p++)l[p]=g[p];return l}function V(g,B){if(!(g instanceof B))throw new TypeError("Cannot call a class as a function")}function O(g,B){for(var p=0;p<B.length;p++){var l=B[p];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(g,l.key,l)}}function P(g,B,p){return B&&O(g.prototype,B),p&&O(g,p),g}var F=function(){function g(B,p){var l=this;V(this,g),(0,i.assert)(p,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=B.progressiveDone||!1,this._contentDispositionFilename=B.contentDispositionFilename||null;var u=B.initialData;if((u==null?void 0:u.length)>0){var v=new Uint8Array(u).buffer;this._queuedChunks.push(v)}this._pdfDataRangeTransport=p,this._isStreamingSupported=!B.disableStream,this._isRangeSupported=!B.disableRange,this._contentLength=B.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener(function(d,c){l._onReceiveData({begin:d,chunk:c})}),this._pdfDataRangeTransport.addProgressListener(function(d,c){l._onProgress({loaded:d,total:c})}),this._pdfDataRangeTransport.addProgressiveReadListener(function(d){l._onReceiveData({chunk:d})}),this._pdfDataRangeTransport.addProgressiveDoneListener(function(){l._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}return P(g,[{key:"_onReceiveData",value:function(p){var l=new Uint8Array(p.chunk).buffer;if(p.begin===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(l):this._queuedChunks.push(l);else{var u=this._rangeReaders.some(function(v){return v._begin!==p.begin?!1:(v._enqueue(l),!0)});(0,i.assert)(u,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}},{key:"_progressiveDataLength",get:function(){var p,l;return(p=(l=this._fullRequestReader)===null||l===void 0?void 0:l._loaded)!==null&&p!==void 0?p:0}},{key:"_onProgress",value:function(p){if(p.total===void 0){var l=this._rangeReaders[0];l!=null&&l.onProgress&&l.onProgress({loaded:p.loaded})}else{var u=this._fullRequestReader;u!=null&&u.onProgress&&u.onProgress({loaded:p.loaded,total:p.total})}}},{key:"_onProgressiveDone",value:function(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}},{key:"_removeRangeReader",value:function(p){var l=this._rangeReaders.indexOf(p);l>=0&&this._rangeReaders.splice(l,1)}},{key:"getFullReader",value:function(){(0,i.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");var p=this._queuedChunks;return this._queuedChunks=null,new x(this,p,this._progressiveDone,this._contentDispositionFilename)}},{key:"getRangeReader",value:function(p,l){if(l<=this._progressiveDataLength)return null;var u=new I(this,p,l);return this._pdfDataRangeTransport.requestDataRange(p,l),this._rangeReaders.push(u),u}},{key:"cancelAllRequests",value:function(p){this._fullRequestReader&&this._fullRequestReader.cancel(p);var l=L(this._rangeReaders.slice(0)),u;try{for(l.s();!(u=l.n()).done;){var v=u.value;v.cancel(p)}}catch(d){l.e(d)}finally{l.f()}this._pdfDataRangeTransport.abort()}}]),g}();a.PDFDataTransportStream=F;var x=function(){function g(B,p){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;V(this,g),this._stream=B,this._done=l||!1,this._filename=(0,f.isPdfFile)(u)?u:null,this._queuedChunks=p||[],this._loaded=0;var v=L(this._queuedChunks),d;try{for(v.s();!(d=v.n()).done;){var c=d.value;this._loaded+=c.byteLength}}catch(b){v.e(b)}finally{v.f()}this._requests=[],this._headersReady=Promise.resolve(),B._fullRequestReader=this,this.onProgress=null}return P(g,[{key:"_enqueue",value:function(p){if(!this._done){if(this._requests.length>0){var l=this._requests.shift();l.resolve({value:p,done:!1})}else this._queuedChunks.push(p);this._loaded+=p.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 B=D(r.default.mark(function l(){var u,v;return r.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(!(this._queuedChunks.length>0)){c.next=3;break}return u=this._queuedChunks.shift(),c.abrupt("return",{value:u,done:!1});case 3:if(!this._done){c.next=5;break}return c.abrupt("return",{value:void 0,done:!0});case 5:return v=(0,i.createPromiseCapability)(),this._requests.push(v),c.abrupt("return",v.promise);case 8:case"end":return c.stop()}},l,this)}));function p(){return B.apply(this,arguments)}return p}()},{key:"cancel",value:function(p){this._done=!0;var l=L(this._requests),u;try{for(l.s();!(u=l.n()).done;){var v=u.value;v.resolve({value:void 0,done:!0})}}catch(d){l.e(d)}finally{l.f()}this._requests.length=0}},{key:"progressiveDone",value:function(){this._done||(this._done=!0)}}]),g}(),I=function(){function g(B,p,l){V(this,g),this._stream=B,this._begin=p,this._end=l,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}return P(g,[{key:"_enqueue",value:function(p){if(!this._done){if(this._requests.length===0)this._queuedChunk=p;else{var l=this._requests.shift();l.resolve({value:p,done:!1});var u=L(this._requests),v;try{for(u.s();!(v=u.n()).done;){var d=v.value;d.resolve({value:void 0,done:!0})}}catch(c){u.e(c)}finally{u.f()}this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}},{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:function(){var B=D(r.default.mark(function l(){var u,v;return r.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(!this._queuedChunk){c.next=4;break}return u=this._queuedChunk,this._queuedChunk=null,c.abrupt("return",{value:u,done:!1});case 4:if(!this._done){c.next=6;break}return c.abrupt("return",{value:void 0,done:!0});case 6:return v=(0,i.createPromiseCapability)(),this._requests.push(v),c.abrupt("return",v.promise);case 9:case"end":return c.stop()}},l,this)}));function p(){return B.apply(this,arguments)}return p}()},{key:"cancel",value:function(p){this._done=!0;var l=L(this._requests),u;try{for(l.s();!(u=l.n()).done;){var v=u.value;v.resolve({value:void 0,done:!0})}}catch(d){l.e(d)}finally{l.f()}this._requests.length=0,this._stream._removeRangeReader(this)}}]),g}()},(y,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.XfaText=void 0;function t(L,$){var j=typeof Symbol!="undefined"&&L[Symbol.iterator]||L["@@iterator"];if(!j){if(Array.isArray(L)||(j=r(L))||$&&L&&typeof L.length=="number"){j&&(L=j);var V=0,O=function(){};return{s:O,n:function(){return V>=L.length?{done:!0}:{done:!1,value:L[V++]}},e:function(g){throw g},f:O}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var P=!0,F=!1,x;return{s:function(){j=j.call(L)},n:function(){var g=j.next();return P=g.done,g},e:function(g){F=!0,x=g},f:function(){try{!P&&j.return!=null&&j.return()}finally{if(F)throw x}}}}function r(L,$){if(!!L){if(typeof L=="string")return i(L,$);var j=Object.prototype.toString.call(L).slice(8,-1);if(j==="Object"&&L.constructor&&(j=L.constructor.name),j==="Map"||j==="Set")return Array.from(L);if(j==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(j))return i(L,$)}}function i(L,$){($==null||$>L.length)&&($=L.length);for(var j=0,V=new Array($);j<$;j++)V[j]=L[j];return V}function f(L,$){if(!(L instanceof $))throw new TypeError("Cannot call a class as a function")}function m(L,$){for(var j=0;j<$.length;j++){var V=$[j];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(L,V.key,V)}}function _(L,$,j){return $&&m(L.prototype,$),j&&m(L,j),L}var D=function(){function L(){f(this,L)}return _(L,null,[{key:"textContent",value:function(j){var V=[],O={items:V,styles:Object.create(null)};function P(F){var x;if(!!F){var I=null,g=F.name;if(g==="#text")I=F.value;else if(L.shouldBuildText(g))F!=null&&(x=F.attributes)!==null&&x!==void 0&&x.textContent?I=F.attributes.textContent:F.value&&(I=F.value);else return;if(I!==null&&V.push({str:I}),!!F.children){var B=t(F.children),p;try{for(B.s();!(p=B.n()).done;){var l=p.value;P(l)}}catch(u){B.e(u)}finally{B.f()}}}}return P(j),O}},{key:"shouldBuildText",value:function(j){return!(j==="textarea"||j==="input"||j==="option"||j==="select")}}]),L}();a.XfaText=D},(y,a,t)=>{"use strict";function r(le){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?r=function(z){return typeof z}:r=function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z},r(le)}Object.defineProperty(a,"__esModule",{value:!0}),a.AnnotationLayer=void 0;var i=t(4),f=t(1),m=t(139),_=t(149),D=t(150);function L(le,he,z){return $(le,he),z}function $(le,he){if(le!==he)throw new TypeError("Private static access of wrong provenance")}function j(le,he,z){return typeof Reflect!="undefined"&&Reflect.get?j=Reflect.get:j=function(X,oe,ne){var Q=V(X,oe);if(!!Q){var de=Object.getOwnPropertyDescriptor(Q,oe);return de.get?de.get.call(ne):de.value}},j(le,he,z||le)}function V(le,he){for(;!Object.prototype.hasOwnProperty.call(le,he)&&(le=d(le),le!==null););return le}function O(le,he,z){return he in le?Object.defineProperty(le,he,{value:z,enumerable:!0,configurable:!0,writable:!0}):le[he]=z,le}function P(le){return I(le)||x(le)||U(le)||F()}function F(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x(le){if(typeof Symbol!="undefined"&&le[Symbol.iterator]!=null||le["@@iterator"]!=null)return Array.from(le)}function I(le){if(Array.isArray(le))return M(le)}function g(le,he){if(typeof he!="function"&&he!==null)throw new TypeError("Super expression must either be null or a function");le.prototype=Object.create(he&&he.prototype,{constructor:{value:le,writable:!0,configurable:!0}}),he&&B(le,he)}function B(le,he){return B=Object.setPrototypeOf||function(ee,X){return ee.__proto__=X,ee},B(le,he)}function p(le){var he=v();return function(){var ee=d(le),X;if(he){var oe=d(this).constructor;X=Reflect.construct(ee,arguments,oe)}else X=ee.apply(this,arguments);return l(this,X)}}function l(le,he){if(he&&(r(he)==="object"||typeof he=="function"))return he;if(he!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return u(le)}function u(le){if(le===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return le}function v(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(le){return!1}}function d(le){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(z){return z.__proto__||Object.getPrototypeOf(z)},d(le)}function c(le,he){var z=typeof Symbol!="undefined"&&le[Symbol.iterator]||le["@@iterator"];if(!z){if(Array.isArray(le)||(z=U(le))||he&&le&&typeof le.length=="number"){z&&(le=z);var ee=0,X=function(){};return{s:X,n:function(){return ee>=le.length?{done:!0}:{done:!1,value:le[ee++]}},e:function(ce){throw ce},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var oe=!0,ne=!1,Q;return{s:function(){z=z.call(le)},n:function(){var ce=z.next();return oe=ce.done,ce},e:function(ce){ne=!0,Q=ce},f:function(){try{!oe&&z.return!=null&&z.return()}finally{if(ne)throw Q}}}}function b(le,he){return Z(le)||G(le,he)||U(le,he)||T()}function T(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U(le,he){if(!!le){if(typeof le=="string")return M(le,he);var z=Object.prototype.toString.call(le).slice(8,-1);if(z==="Object"&&le.constructor&&(z=le.constructor.name),z==="Map"||z==="Set")return Array.from(le);if(z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z))return M(le,he)}}function M(le,he){(he==null||he>le.length)&&(he=le.length);for(var z=0,ee=new Array(he);z<he;z++)ee[z]=le[z];return ee}function G(le,he){var z=le==null?null:typeof Symbol!="undefined"&&le[Symbol.iterator]||le["@@iterator"];if(z!=null){var ee=[],X=!0,oe=!1,ne,Q;try{for(z=z.call(le);!(X=(ne=z.next()).done)&&(ee.push(ne.value),!(he&&ee.length===he));X=!0);}catch(de){oe=!0,Q=de}finally{try{!X&&z.return!=null&&z.return()}finally{if(oe)throw Q}}return ee}}function Z(le){if(Array.isArray(le))return le}function J(le,he){if(!(le instanceof he))throw new TypeError("Cannot call a class as a function")}function ie(le,he){for(var z=0;z<he.length;z++){var ee=he[z];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(le,ee.key,ee)}}function H(le,he,z){return he&&ie(le.prototype,he),z&&ie(le,z),le}var q=1e3,R=new WeakSet,h=function(){function le(){J(this,le)}return H(le,null,[{key:"create",value:function(z){var ee=z.data.annotationType;switch(ee){case i.AnnotationType.LINK:return new E(z);case i.AnnotationType.TEXT:return new K(z);case i.AnnotationType.WIDGET:var X=z.data.fieldType;switch(X){case"Tx":return new Y(z);case"Btn":return z.data.radioButton?new Ce(z):z.data.checkBox?new be(z):new we(z);case"Ch":return new Me(z)}return new te(z);case i.AnnotationType.POPUP:return new S(z);case i.AnnotationType.FREETEXT:return new s(z);case i.AnnotationType.LINE:return new o(z);case i.AnnotationType.SQUARE:return new k(z);case i.AnnotationType.CIRCLE:return new N(z);case i.AnnotationType.POLYLINE:return new W(z);case i.AnnotationType.CARET:return new fe(z);case i.AnnotationType.INK:return new ve(z);case i.AnnotationType.POLYGON:return new re(z);case i.AnnotationType.HIGHLIGHT:return new me(z);case i.AnnotationType.UNDERLINE:return new pe(z);case i.AnnotationType.SQUIGGLY:return new Ae(z);case i.AnnotationType.STRIKEOUT:return new Pe(z);case i.AnnotationType.STAMP:return new _e(z);case i.AnnotationType.FILEATTACHMENT:return new We(z);default:return new A(z)}}}]),le}(),A=function(){function le(he){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ee=z.isRenderable,X=ee===void 0?!1:ee,oe=z.ignoreBorder,ne=oe===void 0?!1:oe,Q=z.createQuadrilaterals,de=Q===void 0?!1:Q;J(this,le),this.isRenderable=X,this.data=he.data,this.layer=he.layer,this.page=he.page,this.viewport=he.viewport,this.linkService=he.linkService,this.downloadManager=he.downloadManager,this.imageResourcesPath=he.imageResourcesPath,this.renderForms=he.renderForms,this.svgFactory=he.svgFactory,this.annotationStorage=he.annotationStorage,this.enableScripting=he.enableScripting,this.hasJSActions=he.hasJSActions,this._fieldObjects=he.fieldObjects,this._mouseState=he.mouseState,X&&(this.container=this._createContainer(ne)),de&&(this.quadrilaterals=this._createQuadrilaterals(ne))}return H(le,[{key:"_createContainer",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,ee=this.data,X=this.page,oe=this.viewport,ne=document.createElement("section"),Q=ee.rect[2]-ee.rect[0],de=ee.rect[3]-ee.rect[1];ne.setAttribute("data-annotation-id",ee.id);var ce=i.Util.normalizeRect([ee.rect[0],X.view[3]-ee.rect[1]+X.view[1],ee.rect[2],X.view[3]-ee.rect[3]+X.view[1]]);if(ee.hasOwnCanvas){var Se=oe.transform.slice(),Ee=i.Util.singularValueDecompose2dScale(Se),Fe=b(Ee,2),De=Fe[0],Re=Fe[1];Q=Math.ceil(Q*De),de=Math.ceil(de*Re),ce[0]*=De,ce[1]*=Re;for(var Ne=0;Ne<4;Ne++)Se[Ne]=Math.sign(Se[Ne]);ne.style.transform="matrix(".concat(Se.join(","),")")}else ne.style.transform="matrix(".concat(oe.transform.join(","),")");if(ne.style.transformOrigin="".concat(-ce[0],"px ").concat(-ce[1],"px"),!z&&ee.borderStyle.width>0){ne.style.borderWidth="".concat(ee.borderStyle.width,"px"),ee.borderStyle.style!==i.AnnotationBorderStyleType.UNDERLINE&&(Q-=2*ee.borderStyle.width,de-=2*ee.borderStyle.width);var Oe=ee.borderStyle.horizontalCornerRadius,xe=ee.borderStyle.verticalCornerRadius;if(Oe>0||xe>0){var Be="".concat(Oe,"px / ").concat(xe,"px");ne.style.borderRadius=Be}switch(ee.borderStyle.style){case i.AnnotationBorderStyleType.SOLID:ne.style.borderStyle="solid";break;case i.AnnotationBorderStyleType.DASHED:ne.style.borderStyle="dashed";break;case i.AnnotationBorderStyleType.BEVELED:(0,i.warn)("Unimplemented border style: beveled");break;case i.AnnotationBorderStyleType.INSET:(0,i.warn)("Unimplemented border style: inset");break;case i.AnnotationBorderStyleType.UNDERLINE:ne.style.borderBottomStyle="solid";break;default:break}var Ue=ee.borderColor||ee.color||null;Ue?ne.style.borderColor=i.Util.makeHexColor(ee.color[0]|0,ee.color[1]|0,ee.color[2]|0):ne.style.borderWidth=0}return ne.style.left="".concat(ce[0],"px"),ne.style.top="".concat(ce[1],"px"),ee.hasOwnCanvas?ne.style.width=ne.style.height="auto":(ne.style.width="".concat(Q,"px"),ne.style.height="".concat(de,"px")),ne}},{key:"_createQuadrilaterals",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!this.data.quadPoints)return null;var ee=[],X=this.data.rect,oe=c(this.data.quadPoints),ne;try{for(oe.s();!(ne=oe.n()).done;){var Q=ne.value;this.data.rect=[Q[2].x,Q[2].y,Q[1].x,Q[1].y],ee.push(this._createContainer(z))}}catch(de){oe.e(de)}finally{oe.f()}return this.data.rect=X,ee}},{key:"_createPopup",value:function(z,ee){var X=this.container;this.quadrilaterals&&(z=z||this.quadrilaterals,X=this.quadrilaterals[0]),z||(z=document.createElement("div"),z.style.height=X.style.height,z.style.width=X.style.width,X.appendChild(z));var oe=new w({container:X,trigger:z,color:ee.color,titleObj:ee.titleObj,modificationDate:ee.modificationDate,contentsObj:ee.contentsObj,richText:ee.richText,hideWrapper:!0}),ne=oe.render();ne.style.left=X.style.width,X.appendChild(ne)}},{key:"_renderQuadrilaterals",value:function(z){var ee=c(this.quadrilaterals),X;try{for(ee.s();!(X=ee.n()).done;){var oe=X.value;oe.className=z}}catch(ne){ee.e(ne)}finally{ee.f()}return this.quadrilaterals}},{key:"render",value:function(){(0,i.unreachable)("Abstract method `AnnotationElement.render` called")}},{key:"_getElementsByName",value:function(z){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,X=[];if(this._fieldObjects){var oe=this._fieldObjects[z];if(oe){var ne=c(oe),Q;try{for(ne.s();!(Q=ne.n()).done;){var de=Q.value,ce=de.page,Se=de.id,Ee=de.exportValues;if(ce!==-1&&Se!==ee){var Fe=typeof Ee=="string"?Ee:null,De=document.getElementById(Se);if(De&&!R.has(De)){(0,i.warn)("_getElementsByName - element not allowed: ".concat(Se));continue}X.push({id:Se,exportValue:Fe,domElement:De})}}}catch(Ue){ne.e(Ue)}finally{ne.f()}}return X}var Re=c(document.getElementsByName(z)),Ne;try{for(Re.s();!(Ne=Re.n()).done;){var Oe=Ne.value,xe=Oe.id,Be=Oe.exportValue;xe!==ee&&(!R.has(Oe)||X.push({id:xe,exportValue:Be,domElement:Oe}))}}catch(Ue){Re.e(Ue)}finally{Re.f()}return X}}],[{key:"platform",get:function(){var z=typeof navigator!="undefined"?navigator.platform:"";return(0,i.shadow)(this,"platform",{isWin:z.includes("Win"),isMac:z.includes("Mac")})}}]),le}(),E=function(le){g(z,le);var he=p(z);function z(ee){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;J(this,z);var oe=!!(ee.data.url||ee.data.dest||ee.data.action||ee.data.isTooltipOnly||ee.data.resetForm||ee.data.actions&&(ee.data.actions.Action||ee.data.actions["Mouse Up"]||ee.data.actions["Mouse Down"]));return he.call(this,ee,{isRenderable:oe,ignoreBorder:!!(X!=null&&X.ignoreBorder),createQuadrilaterals:!0})}return H(z,[{key:"render",value:function(){var X=this.data,oe=this.linkService,ne=document.createElement("a");if(X.url){var Q;oe.addLinkAttributes||(0,i.warn)("LinkAnnotationElement.render - missing `addLinkAttributes`-method on the `linkService`-instance."),(Q=oe.addLinkAttributes)===null||Q===void 0||Q.call(oe,ne,X.url,X.newWindow)}else if(X.action)this._bindNamedAction(ne,X.action);else if(X.dest)this._bindLink(ne,X.dest);else{var de=!1;X.actions&&(X.actions.Action||X.actions["Mouse Up"]||X.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(de=!0,this._bindJSAction(ne,X)),X.resetForm?this._bindResetFormAction(ne,X.resetForm):de||this._bindLink(ne,"")}return this.quadrilaterals?this._renderQuadrilaterals("linkAnnotation").map(function(ce,Se){var Ee=Se===0?ne:ne.cloneNode();return ce.appendChild(Ee),ce}):(this.container.className="linkAnnotation",this.container.appendChild(ne),this.container)}},{key:"_bindLink",value:function(X,oe){var ne=this;X.href=this.linkService.getDestinationHash(oe),X.onclick=function(){return oe&&ne.linkService.goToDestination(oe),!1},(oe||oe==="")&&(X.className="internalLink")}},{key:"_bindNamedAction",value:function(X,oe){var ne=this;X.href=this.linkService.getAnchorUrl(""),X.onclick=function(){return ne.linkService.executeNamedAction(oe),!1},X.className="internalLink"}},{key:"_bindJSAction",value:function(X,oe){var ne=this;X.href=this.linkService.getAnchorUrl("");for(var Q=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]),de=function(){var De=Se[ce],Re=Q.get(De);if(!Re)return"continue";X[Re]=function(){var Ne;return(Ne=ne.linkService.eventBus)===null||Ne===void 0||Ne.dispatch("dispatcheventinsandbox",{source:ne,detail:{id:oe.id,name:De}}),!1}},ce=0,Se=Object.keys(oe.actions);ce<Se.length;ce++)var Ee=de();X.onclick||(X.onclick=function(){return!1}),X.className="internalLink"}},{key:"_bindResetFormAction",value:function(X,oe){var ne=this,Q=X.onclick;if(Q||(X.href=this.linkService.getAnchorUrl("")),X.className="internalLink",!this._fieldObjects){(0,i.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),Q||(X.onclick=function(){return!1});return}X.onclick=function(){Q&&Q();var de=oe.fields,ce=oe.refs,Se=oe.include,Ee=[];if(de.length!==0||ce.length!==0){var Fe=new Set(ce),De=c(de),Re;try{for(De.s();!(Re=De.n()).done;){var Ne=Re.value,Oe=ne._fieldObjects[Ne]||[],xe=c(Oe),Be;try{for(xe.s();!(Be=xe.n()).done;){var Ue=Be.value.id;Fe.add(Ue)}}catch(ze){xe.e(ze)}finally{xe.f()}}}catch(ze){De.e(ze)}finally{De.f()}for(var He=0,Ye=Object.values(ne._fieldObjects);He<Ye.length;He++){var Ze=Ye[He],rt=c(Ze),it;try{for(rt.s();!(it=rt.n()).done;){var yt=it.value;Fe.has(yt.id)===Se&&Ee.push(yt)}}catch(ze){rt.e(ze)}finally{rt.f()}}}else for(var ht=0,Pt=Object.values(ne._fieldObjects);ht<Pt.length;ht++){var Xt=Pt[ht];Ee.push.apply(Ee,P(Xt))}for(var Ot=ne.annotationStorage,xt=[],Ft=0,Yt=Ee;Ft<Yt.length;Ft++){var At=Yt[Ft],wt=At.id;switch(xt.push(wt),At.type){case"text":{var ue=At.defaultValue||"";Ot.setValue(wt,{value:ue,valueAsString:ue});break}case"checkbox":case"radiobutton":{var ke=At.defaultValue===At.exportValues;Ot.setValue(wt,{value:ke});break}case"combobox":case"listbox":{var se=At.defaultValue||"";Ot.setValue(wt,{value:se});break}default:continue}var ye=document.getElementById(wt);!ye||!R.has(ye)||ye.dispatchEvent(new Event("resetform"))}if(ne.enableScripting){var Ge;(Ge=ne.linkService.eventBus)===null||Ge===void 0||Ge.dispatch("dispatcheventinsandbox",{source:ne,detail:{id:"app",ids:xt,name:"ResetForm"}})}return!1}}}]),z}(A),K=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q})}return H(z,[{key:"render",value:function(){this.container.className="textAnnotation";var X=document.createElement("img");return X.style.height=this.container.style.height,X.style.width=this.container.style.width,X.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",X.alt="[{{type}} Annotation]",X.dataset.l10nId="text_annotation_type",X.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup(X,this.data),this.container.appendChild(X),this.container}}]),z}(A),te=function(le){g(z,le);var he=p(z);function z(){return J(this,z),he.apply(this,arguments)}return H(z,[{key:"render",value:function(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}},{key:"_getKeyModifier",value:function(X){var oe=A.platform,ne=oe.isWin,Q=oe.isMac;return ne&&X.ctrlKey||Q&&X.metaKey}},{key:"_setEventListener",value:function(X,oe,ne,Q){var de=this;oe.includes("mouse")?X.addEventListener(oe,function(ce){var Se;(Se=de.linkService.eventBus)===null||Se===void 0||Se.dispatch("dispatcheventinsandbox",{source:de,detail:{id:de.data.id,name:ne,value:Q(ce),shift:ce.shiftKey,modifier:de._getKeyModifier(ce)}})}):X.addEventListener(oe,function(ce){var Se;(Se=de.linkService.eventBus)===null||Se===void 0||Se.dispatch("dispatcheventinsandbox",{source:de,detail:{id:de.data.id,name:ne,value:ce.target.checked}})})}},{key:"_setEventListeners",value:function(X,oe,ne){var Q=c(oe),de;try{for(Q.s();!(de=Q.n()).done;){var ce,Se=b(de.value,2),Ee=Se[0],Fe=Se[1];(Fe==="Action"||(ce=this.data.actions)!==null&&ce!==void 0&&ce[Fe])&&this._setEventListener(X,Ee,Fe,ne)}}catch(De){Q.e(De)}finally{Q.f()}}},{key:"_setBackgroundColor",value:function(X){var oe=this.data.backgroundColor||null;X.style.backgroundColor=oe===null?"transparent":i.Util.makeHexColor(oe[0],oe[1],oe[2])}},{key:"_dispatchEventFromSandbox",value:function(X,oe){for(var ne=this,Q=function(Re,Ne,Oe){var xe=Oe.detail[Re];Oe.target.style[Ne]=_.ColorConverters["".concat(xe[0],"_HTML")](xe.slice(1))},de={display:function(Re){var Ne=Re.detail.display%2==1;Re.target.style.visibility=Ne?"hidden":"visible",ne.annotationStorage.setValue(ne.data.id,{hidden:Ne,print:Re.detail.display===0||Re.detail.display===3})},print:function(Re){ne.annotationStorage.setValue(ne.data.id,{print:Re.detail.print})},hidden:function(Re){Re.target.style.visibility=Re.detail.hidden?"hidden":"visible",ne.annotationStorage.setValue(ne.data.id,{hidden:Re.detail.hidden})},focus:function(Re){setTimeout(function(){return Re.target.focus({preventScroll:!1})},0)},userName:function(Re){Re.target.title=Re.detail.userName},readonly:function(Re){Re.detail.readonly?Re.target.setAttribute("readonly",""):Re.target.removeAttribute("readonly")},required:function(Re){Re.detail.required?Re.target.setAttribute("required",""):Re.target.removeAttribute("required")},bgColor:function(Re){Q("bgColor","backgroundColor",Re)},fillColor:function(Re){Q("fillColor","backgroundColor",Re)},fgColor:function(Re){Q("fgColor","color",Re)},textColor:function(Re){Q("textColor","color",Re)},borderColor:function(Re){Q("borderColor","borderColor",Re)},strokeColor:function(Re){Q("strokeColor","borderColor",Re)}},ce=0,Se=Object.keys(oe.detail);ce<Se.length;ce++){var Ee=Se[ce],Fe=X[Ee]||de[Ee];Fe&&Fe(oe)}}}]),z}(A),Y=function(le){g(z,le);var he=p(z);function z(ee){J(this,z);var X=ee.renderForms||!ee.data.hasAppearance&&!!ee.data.fieldValue;return he.call(this,ee,{isRenderable:X})}return H(z,[{key:"setPropertyOnSiblings",value:function(X,oe,ne,Q){var de=this.annotationStorage,ce=c(this._getElementsByName(X.name,X.id)),Se;try{for(ce.s();!(Se=ce.n()).done;){var Ee=Se.value;Ee.domElement&&(Ee.domElement[oe]=ne),de.setValue(Ee.id,O({},Q,ne))}}catch(Fe){ce.e(Fe)}finally{ce.f()}}},{key:"render",value:function(){var X=this,oe=this.annotationStorage,ne=this.data.id;this.container.className="textWidgetAnnotation";var Q=null;if(this.renderForms){var de=oe.getValue(ne,{value:this.data.fieldValue,valueAsString:this.data.fieldValue}),ce=de.valueAsString||de.value||"",Se={userValue:null,formattedValue:null,beforeInputSelectionRange:null,beforeInputValue:null};this.data.multiLine?(Q=document.createElement("textarea"),Q.textContent=ce):(Q=document.createElement("input"),Q.type="text",Q.setAttribute("value",ce)),R.add(Q),Q.disabled=this.data.readOnly,Q.name=this.data.fieldName,Q.tabIndex=q,Se.userValue=ce,Q.setAttribute("id",ne),Q.addEventListener("input",function(Oe){oe.setValue(ne,{value:Oe.target.value}),X.setPropertyOnSiblings(Q,"value",Oe.target.value,"value")}),Q.addEventListener("resetform",function(Oe){var xe=X.data.defaultFieldValue||"";Q.value=Se.userValue=xe,delete Se.formattedValue});var Ee=function(xe){Se.formattedValue&&(xe.target.value=Se.formattedValue),xe.target.scrollLeft=0,Se.beforeInputSelectionRange=null};if(this.enableScripting&&this.hasJSActions){var Fe;Q.addEventListener("focus",function(Oe){Se.userValue&&(Oe.target.value=Se.userValue)}),Q.addEventListener("updatefromsandbox",function(Oe){var xe={value:function(Ue){Se.userValue=Ue.detail.value||"",oe.setValue(ne,{value:Se.userValue.toString()}),Se.formattedValue||(Ue.target.value=Se.userValue)},valueAsString:function(Ue){Se.formattedValue=Ue.detail.valueAsString||"",Ue.target!==document.activeElement&&(Ue.target.value=Se.formattedValue),oe.setValue(ne,{formattedValue:Se.formattedValue})},selRange:function(Ue){var He=b(Ue.detail.selRange,2),Ye=He[0],Ze=He[1];Ye>=0&&Ze<Ue.target.value.length&&Ue.target.setSelectionRange(Ye,Ze)}};X._dispatchEventFromSandbox(xe,Oe)}),Q.addEventListener("keydown",function(Oe){var xe;Se.beforeInputValue=Oe.target.value;var Be=-1;Oe.key==="Escape"?Be=0:Oe.key==="Enter"?Be=2:Oe.key==="Tab"&&(Be=3),Be!==-1&&(Se.userValue=Oe.target.value,(xe=X.linkService.eventBus)===null||xe===void 0||xe.dispatch("dispatcheventinsandbox",{source:X,detail:{id:ne,name:"Keystroke",value:Oe.target.value,willCommit:!0,commitKey:Be,selStart:Oe.target.selectionStart,selEnd:Oe.target.selectionEnd}}))});var De=Ee;Ee=null,Q.addEventListener("blur",function(Oe){if(X._mouseState.isDown){var xe;Se.userValue=Oe.target.value,(xe=X.linkService.eventBus)===null||xe===void 0||xe.dispatch("dispatcheventinsandbox",{source:X,detail:{id:ne,name:"Keystroke",value:Oe.target.value,willCommit:!0,commitKey:1,selStart:Oe.target.selectionStart,selEnd:Oe.target.selectionEnd}})}De(Oe)}),Q.addEventListener("mousedown",function(Oe){Se.beforeInputValue=Oe.target.value,Se.beforeInputSelectionRange=null}),Q.addEventListener("keyup",function(Oe){Oe.target.selectionStart===Oe.target.selectionEnd&&(Se.beforeInputSelectionRange=null)}),Q.addEventListener("select",function(Oe){Se.beforeInputSelectionRange=[Oe.target.selectionStart,Oe.target.selectionEnd]}),(Fe=this.data.actions)!==null&&Fe!==void 0&&Fe.Keystroke&&Q.addEventListener("input",function(Oe){var xe,Be=-1,Ue=-1;if(Se.beforeInputSelectionRange){var He=b(Se.beforeInputSelectionRange,2);Be=He[0],Ue=He[1]}(xe=X.linkService.eventBus)===null||xe===void 0||xe.dispatch("dispatcheventinsandbox",{source:X,detail:{id:ne,name:"Keystroke",value:Se.beforeInputValue,change:Oe.data,willCommit:!1,selStart:Be,selEnd:Ue}})}),this._setEventListeners(Q,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],function(Oe){return Oe.target.value})}if(Ee&&Q.addEventListener("blur",Ee),this.data.maxLen!==null&&(Q.maxLength=this.data.maxLen),this.data.comb){var Re=this.data.rect[2]-this.data.rect[0],Ne=Re/this.data.maxLen;Q.classList.add("comb"),Q.style.letterSpacing="calc(".concat(Ne,"px - 1ch)")}}else Q=document.createElement("div"),Q.textContent=this.data.fieldValue,Q.style.verticalAlign="middle",Q.style.display="table-cell";return this._setTextStyle(Q),this._setBackgroundColor(Q),this.container.appendChild(Q),this.container}},{key:"_setTextStyle",value:function(X){var oe=["left","center","right"],ne=this.data.defaultAppearanceData,Q=ne.fontSize,de=ne.fontColor,ce=X.style;Q&&(ce.fontSize="".concat(Q,"px")),ce.color=i.Util.makeHexColor(de[0],de[1],de[2]),this.data.textAlignment!==null&&(ce.textAlign=oe[this.data.textAlignment])}}]),z}(te),be=function(le){g(z,le);var he=p(z);function z(ee){return J(this,z),he.call(this,ee,{isRenderable:ee.renderForms})}return H(z,[{key:"render",value:function(){var X=this,oe=this.annotationStorage,ne=this.data,Q=ne.id,de=oe.getValue(Q,{value:ne.exportValue===ne.fieldValue}).value;typeof de=="string"&&(de=de!=="Off",oe.setValue(Q,{value:de})),this.container.className="buttonWidgetAnnotation checkBox";var ce=document.createElement("input");return R.add(ce),ce.disabled=ne.readOnly,ce.type="checkbox",ce.name=ne.fieldName,de&&ce.setAttribute("checked",!0),ce.setAttribute("id",Q),ce.setAttribute("exportValue",ne.exportValue),ce.tabIndex=q,ce.addEventListener("change",function(Se){var Ee=Se.target,Fe=Ee.name,De=Ee.checked,Re=c(X._getElementsByName(Fe,Q)),Ne;try{for(Re.s();!(Ne=Re.n()).done;){var Oe=Ne.value,xe=De&&Oe.exportValue===ne.exportValue;Oe.domElement&&(Oe.domElement.checked=xe),oe.setValue(Oe.id,{value:xe})}}catch(Be){Re.e(Be)}finally{Re.f()}oe.setValue(Q,{value:De})}),ce.addEventListener("resetform",function(Se){var Ee=ne.defaultFieldValue||"Off";Se.target.checked=Ee===ne.exportValue}),this.enableScripting&&this.hasJSActions&&(ce.addEventListener("updatefromsandbox",function(Se){var Ee={value:function(De){De.target.checked=De.detail.value!=="Off",oe.setValue(Q,{value:De.target.checked})}};X._dispatchEventFromSandbox(Ee,Se)}),this._setEventListeners(ce,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],function(Se){return Se.target.checked})),this._setBackgroundColor(ce),this.container.appendChild(ce),this.container}}]),z}(te),Ce=function(le){g(z,le);var he=p(z);function z(ee){return J(this,z),he.call(this,ee,{isRenderable:ee.renderForms})}return H(z,[{key:"render",value:function(){var X=this;this.container.className="buttonWidgetAnnotation radioButton";var oe=this.annotationStorage,ne=this.data,Q=ne.id,de=oe.getValue(Q,{value:ne.fieldValue===ne.buttonValue}).value;typeof de=="string"&&(de=de!==ne.buttonValue,oe.setValue(Q,{value:de}));var ce=document.createElement("input");if(R.add(ce),ce.disabled=ne.readOnly,ce.type="radio",ce.name=ne.fieldName,de&&ce.setAttribute("checked",!0),ce.setAttribute("id",Q),ce.tabIndex=q,ce.addEventListener("change",function(Ee){var Fe=Ee.target,De=Fe.name,Re=Fe.checked,Ne=c(X._getElementsByName(De,Q)),Oe;try{for(Ne.s();!(Oe=Ne.n()).done;){var xe=Oe.value;oe.setValue(xe.id,{value:!1})}}catch(Be){Ne.e(Be)}finally{Ne.f()}oe.setValue(Q,{value:Re})}),ce.addEventListener("resetform",function(Ee){var Fe=ne.defaultFieldValue;Ee.target.checked=Fe!=null&&Fe===ne.buttonValue}),this.enableScripting&&this.hasJSActions){var Se=ne.buttonValue;ce.addEventListener("updatefromsandbox",function(Ee){var Fe={value:function(Re){var Ne=Se===Re.detail.value,Oe=c(X._getElementsByName(Re.target.name)),xe;try{for(Oe.s();!(xe=Oe.n()).done;){var Be=xe.value,Ue=Ne&&Be.id===Q;Be.domElement&&(Be.domElement.checked=Ue),oe.setValue(Be.id,{value:Ue})}}catch(He){Oe.e(He)}finally{Oe.f()}}};X._dispatchEventFromSandbox(Fe,Ee)}),this._setEventListeners(ce,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],function(Ee){return Ee.target.checked})}return this._setBackgroundColor(ce),this.container.appendChild(ce),this.container}}]),z}(te),we=function(le){g(z,le);var he=p(z);function z(ee){return J(this,z),he.call(this,ee,{ignoreBorder:ee.data.hasAppearance})}return H(z,[{key:"render",value:function(){var X=j(d(z.prototype),"render",this).call(this);return X.className="buttonWidgetAnnotation pushButton",this.data.alternativeText&&(X.title=this.data.alternativeText),X}}]),z}(E),Me=function(le){g(z,le);var he=p(z);function z(ee){return J(this,z),he.call(this,ee,{isRenderable:ee.renderForms})}return H(z,[{key:"render",value:function(){var X=this;this.container.className="choiceWidgetAnnotation";var oe=this.annotationStorage,ne=this.data.id;oe.getValue(ne,{value:this.data.fieldValue.length>0?this.data.fieldValue[0]:void 0});var Q=this.data.defaultAppearanceData.fontSize;Q||(Q=9);var de="calc(".concat(Q,"px * var(--zoom-factor))"),ce=document.createElement("select");R.add(ce),ce.disabled=this.data.readOnly,ce.name=this.data.fieldName,ce.setAttribute("id",ne),ce.tabIndex=q,ce.style.fontSize="".concat(Q,"px"),this.data.combo||(ce.size=this.data.options.length,this.data.multiSelect&&(ce.multiple=!0)),ce.addEventListener("resetform",function(Oe){var xe=X.data.defaultFieldValue,Be=c(ce.options),Ue;try{for(Be.s();!(Ue=Be.n()).done;){var He=Ue.value;He.selected=He.value===xe}}catch(Ye){Be.e(Ye)}finally{Be.f()}});var Se=c(this.data.options),Ee;try{for(Se.s();!(Ee=Se.n()).done;){var Fe=Ee.value,De=document.createElement("option");De.textContent=Fe.displayValue,De.value=Fe.exportValue,this.data.combo&&(De.style.fontSize=de),this.data.fieldValue.includes(Fe.exportValue)&&De.setAttribute("selected",!0),ce.appendChild(De)}}catch(Oe){Se.e(Oe)}finally{Se.f()}var Re=function(xe,Be){var Ue=Be?"value":"textContent",He=xe.target.options;return xe.target.multiple?Array.prototype.filter.call(He,function(Ye){return Ye.selected}).map(function(Ye){return Ye[Ue]}):He.selectedIndex===-1?null:He[He.selectedIndex][Ue]},Ne=function(xe){var Be=xe.target.options;return Array.prototype.map.call(Be,function(Ue){return{displayValue:Ue.textContent,exportValue:Ue.value}})};return this.enableScripting&&this.hasJSActions?(ce.addEventListener("updatefromsandbox",function(Oe){var xe={value:function(Ue){var He=Ue.detail.value,Ye=new Set(Array.isArray(He)?He:[He]),Ze=c(ce.options),rt;try{for(Ze.s();!(rt=Ze.n()).done;){var it=rt.value;it.selected=Ye.has(it.value)}}catch(yt){Ze.e(yt)}finally{Ze.f()}oe.setValue(ne,{value:Re(Ue,!0)})},multipleSelection:function(Ue){ce.multiple=!0},remove:function(Ue){var He=ce.options,Ye=Ue.detail.remove;if(He[Ye].selected=!1,ce.remove(Ye),He.length>0){var Ze=Array.prototype.findIndex.call(He,function(rt){return rt.selected});Ze===-1&&(He[0].selected=!0)}oe.setValue(ne,{value:Re(Ue,!0),items:Ne(Ue)})},clear:function(Ue){for(;ce.length!==0;)ce.remove(0);oe.setValue(ne,{value:null,items:[]})},insert:function(Ue){var He=Ue.detail.insert,Ye=He.index,Ze=He.displayValue,rt=He.exportValue,it=document.createElement("option");it.textContent=Ze,it.value=rt,ce.insertBefore(it,ce.children[Ye]),oe.setValue(ne,{value:Re(Ue,!0),items:Ne(Ue)})},items:function(Ue){for(var He=Ue.detail.items;ce.length!==0;)ce.remove(0);var Ye=c(He),Ze;try{for(Ye.s();!(Ze=Ye.n()).done;){var rt=Ze.value,it=rt.displayValue,yt=rt.exportValue,ht=document.createElement("option");ht.textContent=it,ht.value=yt,ce.appendChild(ht)}}catch(Pt){Ye.e(Pt)}finally{Ye.f()}ce.options.length>0&&(ce.options[0].selected=!0),oe.setValue(ne,{value:Re(Ue,!0),items:Ne(Ue)})},indices:function(Ue){var He=new Set(Ue.detail.indices),Ye=c(Ue.target.options),Ze;try{for(Ye.s();!(Ze=Ye.n()).done;){var rt=Ze.value;rt.selected=He.has(rt.index)}}catch(it){Ye.e(it)}finally{Ye.f()}oe.setValue(ne,{value:Re(Ue,!0)})},editable:function(Ue){Ue.target.disabled=!Ue.detail.editable}};X._dispatchEventFromSandbox(xe,Oe)}),ce.addEventListener("input",function(Oe){var xe,Be=Re(Oe,!0),Ue=Re(Oe,!1);oe.setValue(ne,{value:Be}),(xe=X.linkService.eventBus)===null||xe===void 0||xe.dispatch("dispatcheventinsandbox",{source:X,detail:{id:ne,name:"Keystroke",value:Ue,changeEx:Be,willCommit:!0,commitKey:1,keyDown:!1}})}),this._setEventListeners(ce,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"]],function(Oe){return Oe.target.checked})):ce.addEventListener("input",function(Oe){oe.setValue(ne,{value:Re(Oe)})}),this._setBackgroundColor(ce),this.container.appendChild(ce),this.container}}]),z}(te),S=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!((X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q})}return H(z,[{key:"render",value:function(){var X=["Line","Square","Circle","PolyLine","Polygon","Ink"];if(this.container.className="popupAnnotation",X.includes(this.data.parentType))return this.container;var oe='[data-annotation-id="'.concat(this.data.parentId,'"]'),ne=this.layer.querySelectorAll(oe);if(ne.length===0)return this.container;var Q=new w({container:this.container,trigger:Array.from(ne),color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText}),de=this.page,ce=i.Util.normalizeRect([this.data.parentRect[0],de.view[3]-this.data.parentRect[1]+de.view[1],this.data.parentRect[2],de.view[3]-this.data.parentRect[3]+de.view[1]]),Se=ce[0]+this.data.parentRect[2]-this.data.parentRect[0],Ee=ce[1];return this.container.style.transformOrigin="".concat(-Se,"px ").concat(-Ee,"px"),this.container.style.left="".concat(Se,"px"),this.container.style.top="".concat(Ee,"px"),this.container.appendChild(Q.render()),this.container}}]),z}(A),w=function(){function le(he){J(this,le),this.container=he.container,this.trigger=he.trigger,this.color=he.color,this.titleObj=he.titleObj,this.modificationDate=he.modificationDate,this.contentsObj=he.contentsObj,this.richText=he.richText,this.hideWrapper=he.hideWrapper||!1,this.pinned=!1}return H(le,[{key:"render",value:function(){var z,ee,X=.7,oe=document.createElement("div");oe.className="popupWrapper",this.hideElement=this.hideWrapper?oe:this.container,this.hideElement.hidden=!0;var ne=document.createElement("div");ne.className="popup";var Q=this.color;if(Q){var de=X*(255-Q[0])+Q[0],ce=X*(255-Q[1])+Q[1],Se=X*(255-Q[2])+Q[2];ne.style.backgroundColor=i.Util.makeHexColor(de|0,ce|0,Se|0)}var Ee=document.createElement("h1");Ee.dir=this.titleObj.dir,Ee.textContent=this.titleObj.str,ne.appendChild(Ee);var Fe=f.PDFDateString.toDateObject(this.modificationDate);if(Fe){var De=document.createElement("span");De.className="popupDate",De.textContent="{{date}}, {{time}}",De.dataset.l10nId="annotation_date_string",De.dataset.l10nArgs=JSON.stringify({date:Fe.toLocaleDateString(),time:Fe.toLocaleTimeString()}),ne.appendChild(De)}if((z=this.richText)!==null&&z!==void 0&&z.str&&(!((ee=this.contentsObj)!==null&&ee!==void 0&&ee.str)||this.contentsObj.str===this.richText.str))D.XfaLayer.render({xfaHtml:this.richText.html,intent:"richText",div:ne}),ne.lastChild.className="richText popupContent";else{var Re=this._formatContents(this.contentsObj);ne.appendChild(Re)}Array.isArray(this.trigger)||(this.trigger=[this.trigger]);var Ne=c(this.trigger),Oe;try{for(Ne.s();!(Oe=Ne.n()).done;){var xe=Oe.value;xe.addEventListener("click",this._toggle.bind(this)),xe.addEventListener("mouseover",this._show.bind(this,!1)),xe.addEventListener("mouseout",this._hide.bind(this,!1))}}catch(Be){Ne.e(Be)}finally{Ne.f()}return ne.addEventListener("click",this._hide.bind(this,!0)),oe.appendChild(ne),oe}},{key:"_formatContents",value:function(z){var ee=z.str,X=z.dir,oe=document.createElement("p");oe.className="popupContent",oe.dir=X;for(var ne=ee.split(/(?:\r\n?|\n)/),Q=0,de=ne.length;Q<de;++Q){var ce=ne[Q];oe.appendChild(document.createTextNode(ce)),Q<de-1&&oe.appendChild(document.createElement("br"))}return oe}},{key:"_toggle",value:function(){this.pinned?this._hide(!0):this._show(!0)}},{key:"_show",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;z&&(this.pinned=!0),this.hideElement.hidden&&(this.hideElement.hidden=!1,this.container.style.zIndex+=1)}},{key:"_hide",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;z&&(this.pinned=!1),!this.hideElement.hidden&&!this.pinned&&(this.hideElement.hidden=!0,this.container.style.zIndex-=1)}}]),le}(),s=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q,ignoreBorder:!0})}return H(z,[{key:"render",value:function(){return this.container.className="freeTextAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),z}(A),o=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q,ignoreBorder:!0})}return H(z,[{key:"render",value:function(){this.container.className="lineAnnotation";var X=this.data,oe=X.rect[2]-X.rect[0],ne=X.rect[3]-X.rect[1],Q=this.svgFactory.create(oe,ne),de=this.svgFactory.createElement("svg:line");return de.setAttribute("x1",X.rect[2]-X.lineCoordinates[0]),de.setAttribute("y1",X.rect[3]-X.lineCoordinates[1]),de.setAttribute("x2",X.rect[2]-X.lineCoordinates[2]),de.setAttribute("y2",X.rect[3]-X.lineCoordinates[3]),de.setAttribute("stroke-width",X.borderStyle.width||1),de.setAttribute("stroke","transparent"),de.setAttribute("fill","transparent"),Q.appendChild(de),this.container.append(Q),this._createPopup(de,X),this.container}}]),z}(A),k=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q,ignoreBorder:!0})}return H(z,[{key:"render",value:function(){this.container.className="squareAnnotation";var X=this.data,oe=X.rect[2]-X.rect[0],ne=X.rect[3]-X.rect[1],Q=this.svgFactory.create(oe,ne),de=X.borderStyle.width,ce=this.svgFactory.createElement("svg:rect");return ce.setAttribute("x",de/2),ce.setAttribute("y",de/2),ce.setAttribute("width",oe-de),ce.setAttribute("height",ne-de),ce.setAttribute("stroke-width",de||1),ce.setAttribute("stroke","transparent"),ce.setAttribute("fill","transparent"),Q.appendChild(ce),this.container.append(Q),this._createPopup(ce,X),this.container}}]),z}(A),N=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q,ignoreBorder:!0})}return H(z,[{key:"render",value:function(){this.container.className="circleAnnotation";var X=this.data,oe=X.rect[2]-X.rect[0],ne=X.rect[3]-X.rect[1],Q=this.svgFactory.create(oe,ne),de=X.borderStyle.width,ce=this.svgFactory.createElement("svg:ellipse");return ce.setAttribute("cx",oe/2),ce.setAttribute("cy",ne/2),ce.setAttribute("rx",oe/2-de/2),ce.setAttribute("ry",ne/2-de/2),ce.setAttribute("stroke-width",de||1),ce.setAttribute("stroke","transparent"),ce.setAttribute("fill","transparent"),Q.appendChild(ce),this.container.append(Q),this._createPopup(ce,X),this.container}}]),z}(A),W=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne,Q;J(this,z);var de=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return Q=he.call(this,ee,{isRenderable:de,ignoreBorder:!0}),Q.containerClassName="polylineAnnotation",Q.svgElementName="svg:polyline",Q}return H(z,[{key:"render",value:function(){this.container.className=this.containerClassName;var X=this.data,oe=X.rect[2]-X.rect[0],ne=X.rect[3]-X.rect[1],Q=this.svgFactory.create(oe,ne),de=[],ce=c(X.vertices),Se;try{for(ce.s();!(Se=ce.n()).done;){var Ee=Se.value,Fe=Ee.x-X.rect[0],De=X.rect[3]-Ee.y;de.push(Fe+","+De)}}catch(Ne){ce.e(Ne)}finally{ce.f()}de=de.join(" ");var Re=this.svgFactory.createElement(this.svgElementName);return Re.setAttribute("points",de),Re.setAttribute("stroke-width",X.borderStyle.width||1),Re.setAttribute("stroke","transparent"),Re.setAttribute("fill","transparent"),Q.appendChild(Re),this.container.append(Q),this._createPopup(Re,X),this.container}}]),z}(A),re=function(le){g(z,le);var he=p(z);function z(ee){var X;return J(this,z),X=he.call(this,ee),X.containerClassName="polygonAnnotation",X.svgElementName="svg:polygon",X}return z}(W),fe=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q,ignoreBorder:!0})}return H(z,[{key:"render",value:function(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),z}(A),ve=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne,Q;J(this,z);var de=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return Q=he.call(this,ee,{isRenderable:de,ignoreBorder:!0}),Q.containerClassName="inkAnnotation",Q.svgElementName="svg:polyline",Q}return H(z,[{key:"render",value:function(){this.container.className=this.containerClassName;var X=this.data,oe=X.rect[2]-X.rect[0],ne=X.rect[3]-X.rect[1],Q=this.svgFactory.create(oe,ne),de=c(X.inkLists),ce;try{for(de.s();!(ce=de.n()).done;){var Se=ce.value,Ee=[],Fe=c(Se),De;try{for(Fe.s();!(De=Fe.n()).done;){var Re=De.value,Ne=Re.x-X.rect[0],Oe=X.rect[3]-Re.y;Ee.push("".concat(Ne,",").concat(Oe))}}catch(Be){Fe.e(Be)}finally{Fe.f()}Ee=Ee.join(" ");var xe=this.svgFactory.createElement(this.svgElementName);xe.setAttribute("points",Ee),xe.setAttribute("stroke-width",X.borderStyle.width||1),xe.setAttribute("stroke","transparent"),xe.setAttribute("fill","transparent"),this._createPopup(xe,X),Q.appendChild(xe)}}catch(Be){de.e(Be)}finally{de.f()}return this.container.append(Q),this.container}}]),z}(A),me=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q,ignoreBorder:!0,createQuadrilaterals:!0})}return H(z,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("highlightAnnotation"):(this.container.className="highlightAnnotation",this.container)}}]),z}(A),pe=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q,ignoreBorder:!0,createQuadrilaterals:!0})}return H(z,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("underlineAnnotation"):(this.container.className="underlineAnnotation",this.container)}}]),z}(A),Ae=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q,ignoreBorder:!0,createQuadrilaterals:!0})}return H(z,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("squigglyAnnotation"):(this.container.className="squigglyAnnotation",this.container)}}]),z}(A),Pe=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q,ignoreBorder:!0,createQuadrilaterals:!0})}return H(z,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("strikeoutAnnotation"):(this.container.className="strikeoutAnnotation",this.container)}}]),z}(A),_e=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q,ignoreBorder:!0})}return H(z,[{key:"render",value:function(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),z}(A),We=function(le){g(z,le);var he=p(z);function z(ee){var X,oe;J(this,z),oe=he.call(this,ee,{isRenderable:!0});var ne=oe.data.file,Q=ne.filename,de=ne.content;return oe.filename=(0,f.getFilenameFromUrl)(Q),oe.content=de,(X=oe.linkService.eventBus)===null||X===void 0||X.dispatch("fileattachmentannotation",{source:u(oe),id:(0,i.stringToPDFString)(Q),filename:Q,content:de}),oe}return H(z,[{key:"render",value:function(){var X,oe;this.container.className="fileAttachmentAnnotation";var ne=document.createElement("div");return ne.style.height=this.container.style.height,ne.style.width=this.container.style.width,ne.addEventListener("dblclick",this._download.bind(this)),!this.data.hasPopup&&((X=this.data.titleObj)!==null&&X!==void 0&&X.str||(oe=this.data.contentsObj)!==null&&oe!==void 0&&oe.str||this.data.richText)&&this._createPopup(ne,this.data),this.container.appendChild(ne),this.container}},{key:"_download",value:function(){var X;(X=this.downloadManager)===null||X===void 0||X.openOrDownloadData(this.container,this.content,this.filename)}}]),z}(A),Le=function(){function le(){J(this,le)}return H(le,null,[{key:"render",value:function(z){var ee=[],X=[],oe=c(z.annotations),ne;try{for(oe.s();!(ne=oe.n()).done;){var Q=ne.value;if(!!Q){if(Q.annotationType===i.AnnotationType.POPUP){X.push(Q);continue}ee.push(Q)}}}catch(xe){oe.e(xe)}finally{oe.f()}X.length&&ee.push.apply(ee,X);for(var de=z.div,ce=0,Se=ee;ce<Se.length;ce++){var Ee=Se[ce],Fe=h.create({data:Ee,layer:de,page:z.page,viewport:z.viewport,linkService:z.linkService,downloadManager:z.downloadManager,imageResourcesPath:z.imageResourcesPath||"",renderForms:z.renderForms!==!1,svgFactory:new f.DOMSVGFactory,annotationStorage:z.annotationStorage||new m.AnnotationStorage,enableScripting:z.enableScripting,hasJSActions:z.hasJSActions,fieldObjects:z.fieldObjects,mouseState:z.mouseState||{isDown:!1}});if(Fe.isRenderable){var De=Fe.render();if(Ee.hidden&&(De.style.visibility="hidden"),Array.isArray(De)){var Re=c(De),Ne;try{for(Re.s();!(Ne=Re.n()).done;){var Oe=Ne.value;de.appendChild(Oe)}}catch(xe){Re.e(xe)}finally{Re.f()}}else Fe instanceof S?de.prepend(De):de.appendChild(De)}}L(this,le,je).call(this,de,z.annotationCanvasMap)}},{key:"update",value:function(z){var ee=z.page,X=z.viewport,oe=z.annotations,ne=z.annotationCanvasMap,Q=z.div,de=X.transform,ce="matrix(".concat(de.join(","),")"),Se,Ee,Fe=c(oe),De;try{for(Fe.s();!(De=Fe.n()).done;){var Re=De.value,Ne=Q.querySelectorAll('[data-annotation-id="'.concat(Re.id,'"]'));if(Ne){var Oe=c(Ne),xe;try{for(Oe.s();!(xe=Oe.n()).done;){var Be=xe.value;if(Re.hasOwnCanvas){var Ue=i.Util.normalizeRect([Re.rect[0],ee.view[3]-Re.rect[1]+ee.view[1],Re.rect[2],ee.view[3]-Re.rect[3]+ee.view[1]]);if(!Ee){Se=Math.abs(de[0]||de[1]);for(var He=de.slice(),Ye=0;Ye<4;Ye++)He[Ye]=Math.sign(He[Ye]);Ee="matrix(".concat(He.join(","),")")}var Ze=Ue[0]*Se,rt=Ue[1]*Se;Be.style.left="".concat(Ze,"px"),Be.style.top="".concat(rt,"px"),Be.style.transformOrigin="".concat(-Ze,"px ").concat(-rt,"px"),Be.style.transform=Ee}else Be.style.transform=ce}}catch(it){Oe.e(it)}finally{Oe.f()}}}}catch(it){Fe.e(it)}finally{Fe.f()}L(this,le,je).call(this,Q,ne),Q.hidden=!1}}]),le}();a.AnnotationLayer=Le;function je(le,he){if(!!he){var z=c(he),ee;try{for(z.s();!(ee=z.n()).done;){var X=b(ee.value,2),oe=X[0],ne=X[1],Q=le.querySelector('[data-annotation-id="'.concat(oe,'"]'));if(!!Q){var de=Q.firstChild;de.nodeName==="CANVAS"?Q.replaceChild(ne,de):Q.insertBefore(ne,de)}}}catch(ce){z.e(ce)}finally{z.f()}he.clear()}}},(y,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ColorConverters=void 0;function t(O,P){return _(O)||m(O,P)||i(O,P)||r()}function r(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i(O,P){if(!!O){if(typeof O=="string")return f(O,P);var F=Object.prototype.toString.call(O).slice(8,-1);if(F==="Object"&&O.constructor&&(F=O.constructor.name),F==="Map"||F==="Set")return Array.from(O);if(F==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F))return f(O,P)}}function f(O,P){(P==null||P>O.length)&&(P=O.length);for(var F=0,x=new Array(P);F<P;F++)x[F]=O[F];return x}function m(O,P){var F=O==null?null:typeof Symbol!="undefined"&&O[Symbol.iterator]||O["@@iterator"];if(F!=null){var x=[],I=!0,g=!1,B,p;try{for(F=F.call(O);!(I=(B=F.next()).done)&&(x.push(B.value),!(P&&x.length===P));I=!0);}catch(l){g=!0,p=l}finally{try{!I&&F.return!=null&&F.return()}finally{if(g)throw p}}return x}}function _(O){if(Array.isArray(O))return O}function D(O,P){if(!(O instanceof P))throw new TypeError("Cannot call a class as a function")}function L(O,P){for(var F=0;F<P.length;F++){var x=P[F];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(O,x.key,x)}}function $(O,P,F){return P&&L(O.prototype,P),F&&L(O,F),O}function j(O){return Math.floor(Math.max(0,Math.min(1,O))*255).toString(16).padStart(2,"0")}var V=function(){function O(){D(this,O)}return $(O,null,[{key:"CMYK_G",value:function(F){var x=t(F,4),I=x[0],g=x[1],B=x[2],p=x[3];return["G",1-Math.min(1,.3*I+.59*B+.11*g+p)]}},{key:"G_CMYK",value:function(F){var x=t(F,1),I=x[0];return["CMYK",0,0,0,1-I]}},{key:"G_RGB",value:function(F){var x=t(F,1),I=x[0];return["RGB",I,I,I]}},{key:"G_HTML",value:function(F){var x=t(F,1),I=x[0],g=j(I);return"#".concat(g).concat(g).concat(g)}},{key:"RGB_G",value:function(F){var x=t(F,3),I=x[0],g=x[1],B=x[2];return["G",.3*I+.59*g+.11*B]}},{key:"RGB_HTML",value:function(F){var x=t(F,3),I=x[0],g=x[1],B=x[2],p=j(I),l=j(g),u=j(B);return"#".concat(p).concat(l).concat(u)}},{key:"T_HTML",value:function(){return"#00000000"}},{key:"CMYK_RGB",value:function(F){var x=t(F,4),I=x[0],g=x[1],B=x[2],p=x[3];return["RGB",1-Math.min(1,I+p),1-Math.min(1,B+p),1-Math.min(1,g+p)]}},{key:"CMYK_HTML",value:function(F){return this.RGB_HTML(this.CMYK_RGB(F))}},{key:"RGB_CMYK",value:function(F){var x=t(F,3),I=x[0],g=x[1],B=x[2],p=1-I,l=1-g,u=1-B,v=Math.min(p,l,u);return["CMYK",p,l,u,v]}}]),O}();a.ColorConverters=V},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.XfaLayer=void 0;var r=t(4),i=t(147);function f(x,I){return D(x)||_(x,I)||$(x,I)||m()}function m(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _(x,I){var g=x==null?null:typeof Symbol!="undefined"&&x[Symbol.iterator]||x["@@iterator"];if(g!=null){var B=[],p=!0,l=!1,u,v;try{for(g=g.call(x);!(p=(u=g.next()).done)&&(B.push(u.value),!(I&&B.length===I));p=!0);}catch(d){l=!0,v=d}finally{try{!p&&g.return!=null&&g.return()}finally{if(l)throw v}}return B}}function D(x){if(Array.isArray(x))return x}function L(x,I){var g=typeof Symbol!="undefined"&&x[Symbol.iterator]||x["@@iterator"];if(!g){if(Array.isArray(x)||(g=$(x))||I&&x&&typeof x.length=="number"){g&&(x=g);var B=0,p=function(){};return{s:p,n:function(){return B>=x.length?{done:!0}:{done:!1,value:x[B++]}},e:function(c){throw c},f:p}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var l=!0,u=!1,v;return{s:function(){g=g.call(x)},n:function(){var c=g.next();return l=c.done,c},e:function(c){u=!0,v=c},f:function(){try{!l&&g.return!=null&&g.return()}finally{if(u)throw v}}}}function $(x,I){if(!!x){if(typeof x=="string")return j(x,I);var g=Object.prototype.toString.call(x).slice(8,-1);if(g==="Object"&&x.constructor&&(g=x.constructor.name),g==="Map"||g==="Set")return Array.from(x);if(g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return j(x,I)}}function j(x,I){(I==null||I>x.length)&&(I=x.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=x[g];return B}function V(x,I){if(!(x instanceof I))throw new TypeError("Cannot call a class as a function")}function O(x,I){for(var g=0;g<I.length;g++){var B=I[g];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(x,B.key,B)}}function P(x,I,g){return I&&O(x.prototype,I),g&&O(x,g),x}var F=function(){function x(){V(this,x)}return P(x,null,[{key:"setupStorage",value:function(g,B,p,l,u){var v=l.getValue(B,{value:null});switch(p.name){case"textarea":if(v.value!==null&&(g.textContent=v.value),u==="print")break;g.addEventListener("input",function(T){l.setValue(B,{value:T.target.value})});break;case"input":if(p.attributes.type==="radio"||p.attributes.type==="checkbox"){if(v.value===p.attributes.xfaOn?g.setAttribute("checked",!0):v.value===p.attributes.xfaOff&&g.removeAttribute("checked"),u==="print")break;g.addEventListener("change",function(T){l.setValue(B,{value:T.target.checked?T.target.getAttribute("xfaOn"):T.target.getAttribute("xfaOff")})})}else{if(v.value!==null&&g.setAttribute("value",v.value),u==="print")break;g.addEventListener("input",function(T){l.setValue(B,{value:T.target.value})})}break;case"select":if(v.value!==null){var d=L(p.children),c;try{for(d.s();!(c=d.n()).done;){var b=c.value;b.attributes.value===v.value&&(b.attributes.selected=!0)}}catch(T){d.e(T)}finally{d.f()}}g.addEventListener("input",function(T){var U=T.target.options,M=U.selectedIndex===-1?"":U[U.selectedIndex].value;l.setValue(B,{value:M})});break}}},{key:"setAttributes",value:function(g){var B=g.html,p=g.element,l=g.storage,u=l===void 0?null:l,v=g.intent,d=g.linkService,c=p.attributes,b=B instanceof HTMLAnchorElement;c.type==="radio"&&(c.name="".concat(c.name,"-").concat(v));for(var T=0,U=Object.entries(c);T<U.length;T++){var M=f(U[T],2),G=M[0],Z=M[1];if(!(Z==null||G==="dataId"))if(G!=="style")if(G==="textContent")B.textContent=Z;else if(G==="class")Z.length&&B.setAttribute(G,Z.join(" "));else{if(b&&(G==="href"||G==="newWindow"))continue;B.setAttribute(G,Z)}else Object.assign(B.style,Z)}if(b){var J;d.addLinkAttributes||(0,r.warn)("XfaLayer.setAttribute - missing `addLinkAttributes`-method on the `linkService`-instance."),(J=d.addLinkAttributes)===null||J===void 0||J.call(d,B,c.href,c.newWindow)}u&&c.dataId&&this.setupStorage(B,c.dataId,p,u)}},{key:"render",value:function(g){var B=g.annotationStorage,p=g.linkService,l=g.xfaHtml,u=g.intent||"display",v=document.createElement(l.name);l.attributes&&this.setAttributes({html:v,element:l,intent:u,linkService:p});var d=[[l,-1,v]],c=g.div;if(c.appendChild(v),g.viewport){var b="matrix(".concat(g.viewport.transform.join(","),")");c.style.transform=b}u!=="richText"&&c.setAttribute("class","xfaLayer xfaFont");for(var T=[];d.length>0;){var U,M=f(d[d.length-1],3),G=M[0],Z=M[1],J=M[2];if(Z+1===G.children.length){d.pop();continue}var ie=G.children[++d[d.length-1][1]];if(ie!==null){var H=ie.name;if(H==="#text"){var q=document.createTextNode(ie.value);T.push(q),J.appendChild(q);continue}var R=void 0;if(ie!=null&&(U=ie.attributes)!==null&&U!==void 0&&U.xmlns?R=document.createElementNS(ie.attributes.xmlns,H):R=document.createElement(H),J.appendChild(R),ie.attributes&&this.setAttributes({html:R,element:ie,storage:B,intent:u,linkService:p}),ie.children&&ie.children.length>0)d.push([ie,-1,R]);else if(ie.value){var h=document.createTextNode(ie.value);i.XfaText.shouldBuildText(H)&&T.push(h),R.appendChild(h)}}}var A=L(c.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea")),E;try{for(A.s();!(E=A.n()).done;){var K=E.value;K.setAttribute("readOnly",!0)}}catch(te){A.e(te)}finally{A.f()}return{textDivs:T}}},{key:"update",value:function(g){var B="matrix(".concat(g.viewport.transform.join(","),")");g.div.style.transform=B,g.div.hidden=!1}}]),x}();a.XfaLayer=F},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.renderTextLayer=v;var r=t(4);function i(d,c){if(!(d instanceof c))throw new TypeError("Cannot call a class as a function")}function f(d,c){for(var b=0;b<c.length;b++){var T=c[b];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(d,T.key,T)}}function m(d,c,b){return c&&f(d.prototype,c),b&&f(d,b),d}function _(d,c){var b=typeof Symbol!="undefined"&&d[Symbol.iterator]||d["@@iterator"];if(!b){if(Array.isArray(d)||(b=D(d))||c&&d&&typeof d.length=="number"){b&&(d=b);var T=0,U=function(){};return{s:U,n:function(){return T>=d.length?{done:!0}:{done:!1,value:d[T++]}},e:function(ie){throw ie},f:U}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var M=!0,G=!1,Z;return{s:function(){b=b.call(d)},n:function(){var ie=b.next();return M=ie.done,ie},e:function(ie){G=!0,Z=ie},f:function(){try{!M&&b.return!=null&&b.return()}finally{if(G)throw Z}}}}function D(d,c){if(!!d){if(typeof d=="string")return L(d,c);var b=Object.prototype.toString.call(d).slice(8,-1);if(b==="Object"&&d.constructor&&(b=d.constructor.name),b==="Map"||b==="Set")return Array.from(d);if(b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b))return L(d,c)}}function L(d,c){(c==null||c>d.length)&&(c=d.length);for(var b=0,T=new Array(c);b<c;b++)T[b]=d[b];return T}var $=1e5,j=30,V=.8,O=new Map,P=/^\s+$/g;function F(d,c){var b=O.get(d);if(b)return b;c.save(),c.font="".concat(j,"px ").concat(d);var T=c.measureText(""),U=T.fontBoundingBoxAscent,M=Math.abs(T.fontBoundingBoxDescent);if(U){c.restore();var G=U/(U+M);return O.set(d,G),G}c.strokeStyle="red",c.clearRect(0,0,j,j),c.strokeText("g",0,0);var Z=c.getImageData(0,0,j,j).data;M=0;for(var J=Z.length-1-3;J>=0;J-=4)if(Z[J]>0){M=Math.ceil(J/4/j);break}c.clearRect(0,0,j,j),c.strokeText("A",0,j),Z=c.getImageData(0,0,j,j).data,U=0;for(var ie=0,H=Z.length;ie<H;ie+=4)if(Z[ie]>0){U=j-Math.floor(ie/4/j);break}if(c.restore(),U){var q=U/(U+M);return O.set(d,q),q}return O.set(d,V),V}function x(d,c,b,T){var U=document.createElement("span"),M=d._enhanceTextSelection?{angle:0,canvasWidth:0,hasText:c.str!=="",hasEOL:c.hasEOL,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1}:{angle:0,canvasWidth:0,hasText:c.str!=="",hasEOL:c.hasEOL};d._textDivs.push(U);var G=r.Util.transform(d._viewport.transform,c.transform),Z=Math.atan2(G[1],G[0]),J=b[c.fontName];J.vertical&&(Z+=Math.PI/2);var ie=Math.hypot(G[2],G[3]),H=ie*F(J.fontFamily,T),q,R;Z===0?(q=G[4],R=G[5]-H):(q=G[4]+H*Math.sin(Z),R=G[5]-H*Math.cos(Z)),U.style.left="".concat(q,"px"),U.style.top="".concat(R,"px"),U.style.fontSize="".concat(ie,"px"),U.style.fontFamily=J.fontFamily,U.setAttribute("role","presentation"),U.textContent=c.str,U.dir=c.dir,d._fontInspectorEnabled&&(U.dataset.fontName=c.fontName),Z!==0&&(M.angle=Z*(180/Math.PI));var h=!1;if(c.str.length>1||d._enhanceTextSelection&&P.test(c.str))h=!0;else if(c.str!==" "&&c.transform[0]!==c.transform[3]){var A=Math.abs(c.transform[0]),E=Math.abs(c.transform[3]);A!==E&&Math.max(A,E)/Math.min(A,E)>1.5&&(h=!0)}if(h&&(J.vertical?M.canvasWidth=c.height*d._viewport.scale:M.canvasWidth=c.width*d._viewport.scale),d._textDivProperties.set(U,M),d._textContentStream&&d._layoutText(U),d._enhanceTextSelection&&M.hasText){var K=1,te=0;Z!==0&&(K=Math.cos(Z),te=Math.sin(Z));var Y=(J.vertical?c.height:c.width)*d._viewport.scale,be=ie,Ce,we;Z!==0?(Ce=[K,te,-te,K,q,R],we=r.Util.getAxialAlignedBoundingBox([0,0,Y,be],Ce)):we=[q,R,q+Y,R+be],d._bounds.push({left:we[0],top:we[1],right:we[2],bottom:we[3],div:U,size:[Y,be],m:Ce})}}function I(d){if(!d._canceled){var c=d._textDivs,b=d._capability,T=c.length;if(T>$){d._renderingDone=!0,b.resolve();return}if(!d._textContentStream)for(var U=0;U<T;U++)d._layoutText(c[U]);d._renderingDone=!0,b.resolve()}}function g(d,c,b){for(var T=0,U=0;U<b;U++){var M=d[c++];M>0&&(T=T?Math.min(M,T):M)}return T}function B(d){for(var c=d._bounds,b=d._viewport,T=p(b.width,b.height,c),U=0;U<T.length;U++){var M=c[U].div,G=d._textDivProperties.get(M);if(G.angle===0){G.paddingLeft=c[U].left-T[U].left,G.paddingTop=c[U].top-T[U].top,G.paddingRight=T[U].right-c[U].right,G.paddingBottom=T[U].bottom-c[U].bottom,d._textDivProperties.set(M,G);continue}for(var Z=T[U],J=c[U],ie=J.m,H=ie[0],q=ie[1],R=[[0,0],[0,J.size[1]],[J.size[0],0],J.size],h=new Float64Array(64),A=0,E=R.length;A<E;A++){var K=r.Util.applyTransform(R[A],ie);h[A+0]=H&&(Z.left-K[0])/H,h[A+4]=q&&(Z.top-K[1])/q,h[A+8]=H&&(Z.right-K[0])/H,h[A+12]=q&&(Z.bottom-K[1])/q,h[A+16]=q&&(Z.left-K[0])/-q,h[A+20]=H&&(Z.top-K[1])/H,h[A+24]=q&&(Z.right-K[0])/-q,h[A+28]=H&&(Z.bottom-K[1])/H,h[A+32]=H&&(Z.left-K[0])/-H,h[A+36]=q&&(Z.top-K[1])/-q,h[A+40]=H&&(Z.right-K[0])/-H,h[A+44]=q&&(Z.bottom-K[1])/-q,h[A+48]=q&&(Z.left-K[0])/q,h[A+52]=H&&(Z.top-K[1])/-H,h[A+56]=q&&(Z.right-K[0])/q,h[A+60]=H&&(Z.bottom-K[1])/-H}var te=1+Math.min(Math.abs(H),Math.abs(q));G.paddingLeft=g(h,32,16)/te,G.paddingTop=g(h,48,16)/te,G.paddingRight=g(h,0,16)/te,G.paddingBottom=g(h,16,16)/te,d._textDivProperties.set(M,G)}}function p(d,c,b){var T=b.map(function(h,A){return{x1:h.left,y1:h.top,x2:h.right,y2:h.bottom,index:A,x1New:void 0,x2New:void 0}});l(d,T);var U=new Array(b.length),M=_(T),G;try{for(M.s();!(G=M.n()).done;){var Z=G.value,J=Z.index;U[J]={left:Z.x1New,top:0,right:Z.x2New,bottom:0}}}catch(h){M.e(h)}finally{M.f()}b.map(function(h,A){var E=U[A],K=T[A];K.x1=h.top,K.y1=d-E.right,K.x2=h.bottom,K.y2=d-E.left,K.index=A,K.x1New=void 0,K.x2New=void 0}),l(c,T);var ie=_(T),H;try{for(ie.s();!(H=ie.n()).done;){var q=H.value,R=q.index;U[R].top=q.x1New,U[R].bottom=q.x2New}}catch(h){ie.e(h)}finally{ie.f()}return U}function l(d,c){c.sort(function(S,w){return S.x1-w.x1||S.index-w.index});var b={x1:-Infinity,y1:-Infinity,x2:0,y2:Infinity,index:-1,x1New:0,x2New:0},T=[{start:-Infinity,end:Infinity,boundary:b}],U=_(c),M;try{for(U.s();!(M=U.n()).done;){for(var G=M.value,Z=0;Z<T.length&&T[Z].end<=G.y1;)Z++;for(var J=T.length-1;J>=0&&T[J].start>=G.y2;)J--;var ie=void 0,H=void 0,q=void 0,R=void 0,h=-Infinity;for(q=Z;q<=J;q++){ie=T[q],H=ie.boundary;var A=void 0;H.x2>G.x1?A=H.index>G.index?H.x1New:G.x1:H.x2New===void 0?A=(H.x2+G.x1)/2:A=H.x2New,A>h&&(h=A)}for(G.x1New=h,q=Z;q<=J;q++)ie=T[q],H=ie.boundary,H.x2New===void 0?H.x2>G.x1?H.index>G.index&&(H.x2New=H.x2):H.x2New=h:H.x2New>h&&(H.x2New=Math.max(h,H.x2));var E=[],K=null;for(q=Z;q<=J;q++){ie=T[q],H=ie.boundary;var te=H.x2>G.x2?H:G;K===te?E[E.length-1].end=ie.end:(E.push({start:ie.start,end:ie.end,boundary:te}),K=te)}for(T[Z].start<G.y1&&(E[0].start=G.y1,E.unshift({start:T[Z].start,end:G.y1,boundary:T[Z].boundary})),G.y2<T[J].end&&(E[E.length-1].end=G.y2,E.push({start:G.y2,end:T[J].end,boundary:T[J].boundary})),q=Z;q<=J;q++)if(ie=T[q],H=ie.boundary,H.x2New===void 0){var Y=!1;for(R=Z-1;!Y&&R>=0&&T[R].start>=H.y1;R--)Y=T[R].boundary===H;for(R=J+1;!Y&&R<T.length&&T[R].end<=H.y2;R++)Y=T[R].boundary===H;for(R=0;!Y&&R<E.length;R++)Y=E[R].boundary===H;Y||(H.x2New=h)}Array.prototype.splice.apply(T,[Z,J-Z+1].concat(E))}}catch(S){U.e(S)}finally{U.f()}for(var be=0,Ce=T;be<Ce.length;be++){var we=Ce[be],Me=we.boundary;Me.x2New===void 0&&(Me.x2New=Math.max(d,Me.x2))}}var u=function(){function d(c){var b,T=this,U=c.textContent,M=c.textContentStream,G=c.container,Z=c.viewport,J=c.textDivs,ie=c.textContentItemsStr,H=c.enhanceTextSelection;i(this,d),this._textContent=U,this._textContentStream=M,this._container=G,this._document=G.ownerDocument,this._viewport=Z,this._textDivs=J||[],this._textContentItemsStr=ie||[],this._enhanceTextSelection=!!H,this._fontInspectorEnabled=!!((b=globalThis.FontInspector)!==null&&b!==void 0&&b.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,r.createPromiseCapability)(),this._renderTimer=null,this._bounds=[],this._capability.promise.finally(function(){T._enhanceTextSelection||(T._textDivProperties=null),T._layoutTextCtx&&(T._layoutTextCtx.canvas.width=0,T._layoutTextCtx.canvas.height=0,T._layoutTextCtx=null)}).catch(function(){})}return m(d,[{key:"promise",get:function(){return this._capability.promise}},{key:"cancel",value:function(){this._canceled=!0,this._reader&&(this._reader.cancel(new r.AbortException("TextLayer task cancelled.")).catch(function(){}),this._reader=null),this._renderTimer!==null&&(clearTimeout(this._renderTimer),this._renderTimer=null),this._capability.reject(new Error("TextLayer task cancelled."))}},{key:"_processItems",value:function(b,T){for(var U=0,M=b.length;U<M;U++){if(b[U].str===void 0){if(b[U].type==="beginMarkedContentProps"||b[U].type==="beginMarkedContent"){var G=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),b[U].id!==null&&this._container.setAttribute("id","".concat(b[U].id)),G.appendChild(this._container)}else b[U].type==="endMarkedContent"&&(this._container=this._container.parentNode);continue}this._textContentItemsStr.push(b[U].str),x(this,b[U],T,this._layoutTextCtx)}}},{key:"_layoutText",value:function(b){var T=this._textDivProperties.get(b),U="";if(T.canvasWidth!==0&&T.hasText){var M=b.style,G=M.fontSize,Z=M.fontFamily;(G!==this._layoutTextLastFontSize||Z!==this._layoutTextLastFontFamily)&&(this._layoutTextCtx.font="".concat(G," ").concat(Z),this._layoutTextLastFontSize=G,this._layoutTextLastFontFamily=Z);var J=this._layoutTextCtx.measureText(b.textContent),ie=J.width;if(ie>0){var H=T.canvasWidth/ie;this._enhanceTextSelection&&(T.scale=H),U="scaleX(".concat(H,")")}}if(T.angle!==0&&(U="rotate(".concat(T.angle,"deg) ").concat(U)),U.length>0&&(this._enhanceTextSelection&&(T.originalTransform=U),b.style.transform=U),T.hasText&&this._container.appendChild(b),T.hasEOL){var q=document.createElement("br");q.setAttribute("role","presentation"),this._container.appendChild(q)}}},{key:"_render",value:function(){var b=this,T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,U=(0,r.createPromiseCapability)(),M=Object.create(null),G=this._document.createElement("canvas");if(G.height=G.width=j,G.mozOpaque=!0,this._layoutTextCtx=G.getContext("2d",{alpha:!1}),this._textContent){var Z=this._textContent.items,J=this._textContent.styles;this._processItems(Z,J),U.resolve()}else if(this._textContentStream){var ie=function H(){b._reader.read().then(function(q){var R=q.value,h=q.done;if(h){U.resolve();return}Object.assign(M,R.styles),b._processItems(R.items,M),H()},U.reject)};this._reader=this._textContentStream.getReader(),ie()}else throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');U.promise.then(function(){M=null,T?b._renderTimer=setTimeout(function(){I(b),b._renderTimer=null},T):I(b)},this._capability.reject)}},{key:"expandTextDivs",value:function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!(!this._enhanceTextSelection||!this._renderingDone)){this._bounds!==null&&(B(this),this._bounds=null);for(var T=[],U=[],M=0,G=this._textDivs.length;M<G;M++){var Z=this._textDivs[M],J=this._textDivProperties.get(Z);!J.hasText||(b?(T.length=0,U.length=0,J.originalTransform&&T.push(J.originalTransform),J.paddingTop>0?(U.push("".concat(J.paddingTop,"px")),T.push("translateY(".concat(-J.paddingTop,"px)"))):U.push(0),J.paddingRight>0?U.push("".concat(J.paddingRight/J.scale,"px")):U.push(0),J.paddingBottom>0?U.push("".concat(J.paddingBottom,"px")):U.push(0),J.paddingLeft>0?(U.push("".concat(J.paddingLeft/J.scale,"px")),T.push("translateX(".concat(-J.paddingLeft/J.scale,"px)"))):U.push(0),Z.style.padding=U.join(" "),T.length&&(Z.style.transform=T.join(" "))):(Z.style.padding=null,Z.style.transform=J.originalTransform))}}}}]),d}();function v(d){var c=new u({textContent:d.textContent,textContentStream:d.textContentStream,container:d.container,viewport:d.viewport,textDivs:d.textDivs,textContentItemsStr:d.textContentItemsStr,enhanceTextSelection:d.enhanceTextSelection});return c._render(d.timeout),c}},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.SVGGraphics=void 0;var r=t(4),i=t(1),f=t(6);function m(H){return L(H)||D(H)||F(H)||_()}function _(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function D(H){if(typeof Symbol!="undefined"&&H[Symbol.iterator]!=null||H["@@iterator"]!=null)return Array.from(H)}function L(H){if(Array.isArray(H))return x(H)}function $(H,q){return O(H)||V(H,q)||F(H,q)||j()}function j(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function V(H,q){var R=H==null?null:typeof Symbol!="undefined"&&H[Symbol.iterator]||H["@@iterator"];if(R!=null){var h=[],A=!0,E=!1,K,te;try{for(R=R.call(H);!(A=(K=R.next()).done)&&(h.push(K.value),!(q&&h.length===q));A=!0);}catch(Y){E=!0,te=Y}finally{try{!A&&R.return!=null&&R.return()}finally{if(E)throw te}}return h}}function O(H){if(Array.isArray(H))return H}function P(H,q){var R=typeof Symbol!="undefined"&&H[Symbol.iterator]||H["@@iterator"];if(!R){if(Array.isArray(H)||(R=F(H))||q&&H&&typeof H.length=="number"){R&&(H=R);var h=0,A=function(){};return{s:A,n:function(){return h>=H.length?{done:!0}:{done:!1,value:H[h++]}},e:function(be){throw be},f:A}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var E=!0,K=!1,te;return{s:function(){R=R.call(H)},n:function(){var be=R.next();return E=be.done,be},e:function(be){K=!0,te=be},f:function(){try{!E&&R.return!=null&&R.return()}finally{if(K)throw te}}}}function F(H,q){if(!!H){if(typeof H=="string")return x(H,q);var R=Object.prototype.toString.call(H).slice(8,-1);if(R==="Object"&&H.constructor&&(R=H.constructor.name),R==="Map"||R==="Set")return Array.from(H);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return x(H,q)}}function x(H,q){(q==null||q>H.length)&&(q=H.length);for(var R=0,h=new Array(q);R<q;R++)h[R]=H[R];return h}function I(H,q){for(var R=0;R<q.length;R++){var h=q[R];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(H,h.key,h)}}function g(H,q,R){return q&&I(H.prototype,q),R&&I(H,R),H}function B(H,q){if(!(H instanceof q))throw new TypeError("Cannot call a class as a function")}var p=function H(){B(this,H),(0,r.unreachable)("Not implemented: SVGGraphics")};a.SVGGraphics=p;{var l=function(q){var R=[],h=[],A=P(q),E;try{for(A.s();!(E=A.n()).done;){var K=E.value;if(K.fn==="save"){R.push({fnId:92,fn:"group",items:[]}),h.push(R),R=R[R.length-1].items;continue}K.fn==="restore"?R=h.pop():R.push(K)}}catch(te){A.e(te)}finally{A.f()}return R},u=function(q){if(Number.isInteger(q))return q.toString();var R=q.toFixed(10),h=R.length-1;if(R[h]!=="0")return R;do h--;while(R[h]==="0");return R.substring(0,R[h]==="."?h:h+1)},v=function(q){if(q[4]===0&&q[5]===0){if(q[1]===0&&q[2]===0)return q[0]===1&&q[3]===1?"":"scale(".concat(u(q[0])," ").concat(u(q[3]),")");if(q[0]===q[3]&&q[1]===-q[2]){var R=Math.acos(q[0])*180/Math.PI;return"rotate(".concat(u(R),")")}}else if(q[0]===1&&q[1]===0&&q[2]===0&&q[3]===1)return"translate(".concat(u(q[4])," ").concat(u(q[5]),")");return"matrix(".concat(u(q[0])," ").concat(u(q[1])," ").concat(u(q[2])," ").concat(u(q[3])," ").concat(u(q[4])," ")+"".concat(u(q[5]),")")},d={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},c="http://www.w3.org/XML/1998/namespace",b="http://www.w3.org/1999/xlink",T=["butt","round","square"],U=["miter","round","bevel"],M=function(){for(var H=new Uint8Array([137,80,78,71,13,10,26,10]),q=12,R=new Int32Array(256),h=0;h<256;h++){for(var A=h,E=0;E<8;E++)A&1?A=3988292384^A>>1&2147483647:A=A>>1&2147483647;R[h]=A}function K(Me,S,w){for(var s=-1,o=S;o<w;o++){var k=(s^Me[o])&255,N=R[k];s=s>>>8^N}return s^-1}function te(Me,S,w,s){var o=s,k=S.length;w[o]=k>>24&255,w[o+1]=k>>16&255,w[o+2]=k>>8&255,w[o+3]=k&255,o+=4,w[o]=Me.charCodeAt(0)&255,w[o+1]=Me.charCodeAt(1)&255,w[o+2]=Me.charCodeAt(2)&255,w[o+3]=Me.charCodeAt(3)&255,o+=4,w.set(S,o),o+=S.length;var N=K(w,s+4,o);w[o]=N>>24&255,w[o+1]=N>>16&255,w[o+2]=N>>8&255,w[o+3]=N&255}function Y(Me,S,w){for(var s=1,o=0,k=S;k<w;++k)s=(s+(Me[k]&255))%65521,o=(o+s)%65521;return o<<16|s}function be(Me){if(!f.isNodeJS)return Ce(Me);try{var S;parseInt(process.versions.node)>=8?S=Me:S=Buffer.from(Me);var w=require("zlib").deflateSync(S,{level:9});return w instanceof Uint8Array?w:new Uint8Array(w)}catch(s){(0,r.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+s)}return Ce(Me)}function Ce(Me){var S=Me.length,w=65535,s=Math.ceil(S/w),o=new Uint8Array(2+S+s*5+4),k=0;o[k++]=120,o[k++]=156;for(var N=0;S>w;)o[k++]=0,o[k++]=255,o[k++]=255,o[k++]=0,o[k++]=0,o.set(Me.subarray(N,N+w),k),k+=w,N+=w,S-=w;o[k++]=1,o[k++]=S&255,o[k++]=S>>8&255,o[k++]=~S&65535&255,o[k++]=(~S&65535)>>8&255,o.set(Me.subarray(N),k),k+=Me.length-N;var W=Y(Me,0,Me.length);return o[k++]=W>>24&255,o[k++]=W>>16&255,o[k++]=W>>8&255,o[k++]=W&255,o}function we(Me,S,w,s){var o=Me.width,k=Me.height,N,W,re,fe=Me.data;switch(S){case r.ImageKind.GRAYSCALE_1BPP:W=0,N=1,re=o+7>>3;break;case r.ImageKind.RGB_24BPP:W=2,N=8,re=o*3;break;case r.ImageKind.RGBA_32BPP:W=6,N=8,re=o*4;break;default:throw new Error("invalid format")}for(var ve=new Uint8Array((1+re)*k),me=0,pe=0,Ae=0;Ae<k;++Ae)ve[me++]=0,ve.set(fe.subarray(pe,pe+re),me),pe+=re,me+=re;if(S===r.ImageKind.GRAYSCALE_1BPP&&s){me=0;for(var Pe=0;Pe<k;Pe++){me++;for(var _e=0;_e<re;_e++)ve[me++]^=255}}var We=new Uint8Array([o>>24&255,o>>16&255,o>>8&255,o&255,k>>24&255,k>>16&255,k>>8&255,k&255,N,W,0,0,0]),Le=be(ve),je=H.length+q*3+We.length+Le.length,le=new Uint8Array(je),he=0;return le.set(H,he),he+=H.length,te("IHDR",We,le,he),he+=q+We.length,te("IDATA",Le,le,he),he+=q+Le.length,te("IEND",new Uint8Array(0),le,he),(0,r.createObjectURL)(le,"image/png",w)}return function(S,w,s){var o=S.kind===void 0?r.ImageKind.GRAYSCALE_1BPP:S.kind;return we(S,o,w,s)}}(),G=function(){function H(){B(this,H),this.fontSizeScale=1,this.fontWeight=d.fontWeight,this.fontSize=0,this.textMatrix=r.IDENTITY_MATRIX,this.fontMatrix=r.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=r.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=d.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 g(H,[{key:"clone",value:function(){return Object.create(this)}},{key:"setCurrentPoint",value:function(R,h){this.x=R,this.y=h}}]),H}(),Z=0,J=0,ie=0;a.SVGGraphics=p=function(){function H(q,R){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;B(this,H),this.svgFactory=new i.DOMSVGFactory,this.current=new G,this.transformMatrix=r.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=q,this.objs=R,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!h,this._operatorIdMapping=[];for(var A in r.OPS)this._operatorIdMapping[r.OPS[A]]=A}return g(H,[{key:"save",value:function(){this.transformStack.push(this.transformMatrix);var R=this.current;this.extraStack.push(R),this.current=R.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(R){this.save(),this.executeOpTree(R),this.restore()}},{key:"loadDependencies",value:function(R){for(var h=this,A=R.fnArray,E=R.argsArray,K=0,te=A.length;K<te;K++)if(A[K]===r.OPS.dependency){var Y=P(E[K]),be;try{var Ce=function(){var Me=be.value,S=Me.startsWith("g_")?h.commonObjs:h.objs,w=new Promise(function(s){S.get(Me,s)});h.current.dependencies.push(w)};for(Y.s();!(be=Y.n()).done;)Ce()}catch(we){Y.e(we)}finally{Y.f()}}return Promise.all(this.current.dependencies)}},{key:"transform",value:function(R,h,A,E,K,te){var Y=[R,h,A,E,K,te];this.transformMatrix=r.Util.transform(this.transformMatrix,Y),this.tgrp=null}},{key:"getSVG",value:function(R,h){var A=this;this.viewport=h;var E=this._initialize(h);return this.loadDependencies(R).then(function(){return A.transformMatrix=r.IDENTITY_MATRIX,A.executeOpTree(A.convertOpList(R)),E})}},{key:"convertOpList",value:function(R){for(var h=this._operatorIdMapping,A=R.argsArray,E=R.fnArray,K=[],te=0,Y=E.length;te<Y;te++){var be=E[te];K.push({fnId:be,fn:h[be],args:A[te]})}return l(K)}},{key:"executeOpTree",value:function(R){var h=P(R),A;try{for(h.s();!(A=h.n()).done;){var E=A.value,K=E.fn,te=E.fnId,Y=E.args;switch(te|0){case r.OPS.beginText:this.beginText();break;case r.OPS.dependency:break;case r.OPS.setLeading:this.setLeading(Y);break;case r.OPS.setLeadingMoveText:this.setLeadingMoveText(Y[0],Y[1]);break;case r.OPS.setFont:this.setFont(Y);break;case r.OPS.showText:this.showText(Y[0]);break;case r.OPS.showSpacedText:this.showText(Y[0]);break;case r.OPS.endText:this.endText();break;case r.OPS.moveText:this.moveText(Y[0],Y[1]);break;case r.OPS.setCharSpacing:this.setCharSpacing(Y[0]);break;case r.OPS.setWordSpacing:this.setWordSpacing(Y[0]);break;case r.OPS.setHScale:this.setHScale(Y[0]);break;case r.OPS.setTextMatrix:this.setTextMatrix(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]);break;case r.OPS.setTextRise:this.setTextRise(Y[0]);break;case r.OPS.setTextRenderingMode:this.setTextRenderingMode(Y[0]);break;case r.OPS.setLineWidth:this.setLineWidth(Y[0]);break;case r.OPS.setLineJoin:this.setLineJoin(Y[0]);break;case r.OPS.setLineCap:this.setLineCap(Y[0]);break;case r.OPS.setMiterLimit:this.setMiterLimit(Y[0]);break;case r.OPS.setFillRGBColor:this.setFillRGBColor(Y[0],Y[1],Y[2]);break;case r.OPS.setStrokeRGBColor:this.setStrokeRGBColor(Y[0],Y[1],Y[2]);break;case r.OPS.setStrokeColorN:this.setStrokeColorN(Y);break;case r.OPS.setFillColorN:this.setFillColorN(Y);break;case r.OPS.shadingFill:this.shadingFill(Y[0]);break;case r.OPS.setDash:this.setDash(Y[0],Y[1]);break;case r.OPS.setRenderingIntent:this.setRenderingIntent(Y[0]);break;case r.OPS.setFlatness:this.setFlatness(Y[0]);break;case r.OPS.setGState:this.setGState(Y[0]);break;case r.OPS.fill:this.fill();break;case r.OPS.eoFill:this.eoFill();break;case r.OPS.stroke:this.stroke();break;case r.OPS.fillStroke:this.fillStroke();break;case r.OPS.eoFillStroke:this.eoFillStroke();break;case r.OPS.clip:this.clip("nonzero");break;case r.OPS.eoClip:this.clip("evenodd");break;case r.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case r.OPS.paintImageXObject:this.paintImageXObject(Y[0]);break;case r.OPS.paintInlineImageXObject:this.paintInlineImageXObject(Y[0]);break;case r.OPS.paintImageMaskXObject:this.paintImageMaskXObject(Y[0]);break;case r.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(Y[0],Y[1]);break;case r.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case r.OPS.closePath:this.closePath();break;case r.OPS.closeStroke:this.closeStroke();break;case r.OPS.closeFillStroke:this.closeFillStroke();break;case r.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case r.OPS.nextLine:this.nextLine();break;case r.OPS.transform:this.transform(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]);break;case r.OPS.constructPath:this.constructPath(Y[0],Y[1]);break;case r.OPS.endPath:this.endPath();break;case 92:this.group(E.items);break;default:(0,r.warn)("Unimplemented operator ".concat(K));break}}}catch(be){h.e(be)}finally{h.f()}}},{key:"setWordSpacing",value:function(R){this.current.wordSpacing=R}},{key:"setCharSpacing",value:function(R){this.current.charSpacing=R}},{key:"nextLine",value:function(){this.moveText(0,this.current.leading)}},{key:"setTextMatrix",value:function(R,h,A,E,K,te){var Y=this.current;Y.textMatrix=Y.lineMatrix=[R,h,A,E,K,te],Y.textMatrixScale=Math.hypot(R,h),Y.x=Y.lineX=0,Y.y=Y.lineY=0,Y.xcoords=[],Y.ycoords=[],Y.tspan=this.svgFactory.createElement("svg:tspan"),Y.tspan.setAttributeNS(null,"font-family",Y.fontFamily),Y.tspan.setAttributeNS(null,"font-size","".concat(u(Y.fontSize),"px")),Y.tspan.setAttributeNS(null,"y",u(-Y.y)),Y.txtElement=this.svgFactory.createElement("svg:text"),Y.txtElement.appendChild(Y.tspan)}},{key:"beginText",value:function(){var R=this.current;R.x=R.lineX=0,R.y=R.lineY=0,R.textMatrix=r.IDENTITY_MATRIX,R.lineMatrix=r.IDENTITY_MATRIX,R.textMatrixScale=1,R.tspan=this.svgFactory.createElement("svg:tspan"),R.txtElement=this.svgFactory.createElement("svg:text"),R.txtgrp=this.svgFactory.createElement("svg:g"),R.xcoords=[],R.ycoords=[]}},{key:"moveText",value:function(R,h){var A=this.current;A.x=A.lineX+=R,A.y=A.lineY+=h,A.xcoords=[],A.ycoords=[],A.tspan=this.svgFactory.createElement("svg:tspan"),A.tspan.setAttributeNS(null,"font-family",A.fontFamily),A.tspan.setAttributeNS(null,"font-size","".concat(u(A.fontSize),"px")),A.tspan.setAttributeNS(null,"y",u(-A.y))}},{key:"showText",value:function(R){var h=this.current,A=h.font,E=h.fontSize;if(E!==0){var K=h.fontSizeScale,te=h.charSpacing,Y=h.wordSpacing,be=h.fontDirection,Ce=h.textHScale*be,we=A.vertical,Me=we?1:-1,S=A.defaultVMetrics,w=E*h.fontMatrix[0],s=0,o=P(R),k;try{for(o.s();!(k=o.n()).done;){var N=k.value;if(N===null){s+=be*Y;continue}else if((0,r.isNum)(N)){s+=Me*N*E/1e3;continue}var W=(N.isSpace?Y:0)+te,re=N.fontChar,fe=void 0,ve=void 0,me=N.width;if(we){var pe=void 0,Ae=N.vmetric||S;pe=N.vmetric?Ae[1]:me*.5,pe=-pe*w;var Pe=Ae[2]*w;me=Ae?-Ae[0]:me,fe=pe/K,ve=(s+Pe)/K}else fe=s/K,ve=0;(N.isInFont||A.missingFile)&&(h.xcoords.push(h.x+fe),we&&h.ycoords.push(-h.y+ve),h.tspan.textContent+=re);var _e=void 0;we?_e=me*w-W*be:_e=me*w+W*be,s+=_e}}catch(le){o.e(le)}finally{o.f()}h.tspan.setAttributeNS(null,"x",h.xcoords.map(u).join(" ")),we?h.tspan.setAttributeNS(null,"y",h.ycoords.map(u).join(" ")):h.tspan.setAttributeNS(null,"y",u(-h.y)),we?h.y-=s:h.x+=s*Ce,h.tspan.setAttributeNS(null,"font-family",h.fontFamily),h.tspan.setAttributeNS(null,"font-size","".concat(u(h.fontSize),"px")),h.fontStyle!==d.fontStyle&&h.tspan.setAttributeNS(null,"font-style",h.fontStyle),h.fontWeight!==d.fontWeight&&h.tspan.setAttributeNS(null,"font-weight",h.fontWeight);var We=h.textRenderingMode&r.TextRenderingMode.FILL_STROKE_MASK;if(We===r.TextRenderingMode.FILL||We===r.TextRenderingMode.FILL_STROKE?(h.fillColor!==d.fillColor&&h.tspan.setAttributeNS(null,"fill",h.fillColor),h.fillAlpha<1&&h.tspan.setAttributeNS(null,"fill-opacity",h.fillAlpha)):h.textRenderingMode===r.TextRenderingMode.ADD_TO_PATH?h.tspan.setAttributeNS(null,"fill","transparent"):h.tspan.setAttributeNS(null,"fill","none"),We===r.TextRenderingMode.STROKE||We===r.TextRenderingMode.FILL_STROKE){var Le=1/(h.textMatrixScale||1);this._setStrokeAttributes(h.tspan,Le)}var je=h.textMatrix;h.textRise!==0&&(je=je.slice(),je[5]+=h.textRise),h.txtElement.setAttributeNS(null,"transform","".concat(v(je)," scale(").concat(u(Ce),", -1)")),h.txtElement.setAttributeNS(c,"xml:space","preserve"),h.txtElement.appendChild(h.tspan),h.txtgrp.appendChild(h.txtElement),this._ensureTransformGroup().appendChild(h.txtElement)}}},{key:"setLeadingMoveText",value:function(R,h){this.setLeading(-h),this.moveText(R,h)}},{key:"addFontStyle",value:function(R){if(!R.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 h=(0,r.createObjectURL)(R.data,R.mimetype,this.forceDataSchema);this.cssStyle.textContent+='@font-face { font-family: "'.concat(R.loadedName,'";')+" src: url(".concat(h,`); }
`)}},{key:"setFont",value:function(R){var h=this.current,A=this.commonObjs.get(R[0]),E=R[1];h.font=A,this.embedFonts&&!A.missingFile&&!this.embeddedFonts[A.loadedName]&&(this.addFontStyle(A),this.embeddedFonts[A.loadedName]=A),h.fontMatrix=A.fontMatrix||r.FONT_IDENTITY_MATRIX;var K="normal";A.black?K="900":A.bold&&(K="bold");var te=A.italic?"italic":"normal";E<0?(E=-E,h.fontDirection=-1):h.fontDirection=1,h.fontSize=E,h.fontFamily=A.loadedName,h.fontWeight=K,h.fontStyle=te,h.tspan=this.svgFactory.createElement("svg:tspan"),h.tspan.setAttributeNS(null,"y",u(-h.y)),h.xcoords=[],h.ycoords=[]}},{key:"endText",value:function(){var R,h=this.current;h.textRenderingMode&r.TextRenderingMode.ADD_TO_PATH_FLAG&&(R=h.txtElement)!==null&&R!==void 0&&R.hasChildNodes()&&(h.element=h.txtElement,this.clip("nonzero"),this.endPath())}},{key:"setLineWidth",value:function(R){R>0&&(this.current.lineWidth=R)}},{key:"setLineCap",value:function(R){this.current.lineCap=T[R]}},{key:"setLineJoin",value:function(R){this.current.lineJoin=U[R]}},{key:"setMiterLimit",value:function(R){this.current.miterLimit=R}},{key:"setStrokeAlpha",value:function(R){this.current.strokeAlpha=R}},{key:"setStrokeRGBColor",value:function(R,h,A){this.current.strokeColor=r.Util.makeHexColor(R,h,A)}},{key:"setFillAlpha",value:function(R){this.current.fillAlpha=R}},{key:"setFillRGBColor",value:function(R,h,A){this.current.fillColor=r.Util.makeHexColor(R,h,A),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}},{key:"setStrokeColorN",value:function(R){this.current.strokeColor=this._makeColorN_Pattern(R)}},{key:"setFillColorN",value:function(R){this.current.fillColor=this._makeColorN_Pattern(R)}},{key:"shadingFill",value:function(R){var h=this.viewport.width,A=this.viewport.height,E=r.Util.inverseTransform(this.transformMatrix),K=r.Util.applyTransform([0,0],E),te=r.Util.applyTransform([0,A],E),Y=r.Util.applyTransform([h,0],E),be=r.Util.applyTransform([h,A],E),Ce=Math.min(K[0],te[0],Y[0],be[0]),we=Math.min(K[1],te[1],Y[1],be[1]),Me=Math.max(K[0],te[0],Y[0],be[0]),S=Math.max(K[1],te[1],Y[1],be[1]),w=this.svgFactory.createElement("svg:rect");w.setAttributeNS(null,"x",Ce),w.setAttributeNS(null,"y",we),w.setAttributeNS(null,"width",Me-Ce),w.setAttributeNS(null,"height",S-we),w.setAttributeNS(null,"fill",this._makeShadingPattern(R)),this.current.fillAlpha<1&&w.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().appendChild(w)}},{key:"_makeColorN_Pattern",value:function(R){return R[0]==="TilingPattern"?this._makeTilingPattern(R):this._makeShadingPattern(R)}},{key:"_makeTilingPattern",value:function(R){var h=R[1],A=R[2],E=R[3]||r.IDENTITY_MATRIX,K=$(R[4],4),te=K[0],Y=K[1],be=K[2],Ce=K[3],we=R[5],Me=R[6],S=R[7],w="shading".concat(ie++),s=r.Util.normalizeRect([].concat(m(r.Util.applyTransform([te,Y],E)),m(r.Util.applyTransform([be,Ce],E)))),o=$(s,4),k=o[0],N=o[1],W=o[2],re=o[3],fe=r.Util.singularValueDecompose2dScale(E),ve=$(fe,2),me=ve[0],pe=ve[1],Ae=we*me,Pe=Me*pe,_e=this.svgFactory.createElement("svg:pattern");_e.setAttributeNS(null,"id",w),_e.setAttributeNS(null,"patternUnits","userSpaceOnUse"),_e.setAttributeNS(null,"width",Ae),_e.setAttributeNS(null,"height",Pe),_e.setAttributeNS(null,"x","".concat(k)),_e.setAttributeNS(null,"y","".concat(N));var We=this.svg,Le=this.transformMatrix,je=this.current.fillColor,le=this.current.strokeColor,he=this.svgFactory.create(W-k,re-N);if(this.svg=he,this.transformMatrix=E,S===2){var z=r.Util.makeHexColor.apply(r.Util,m(h));this.current.fillColor=z,this.current.strokeColor=z}return this.executeOpTree(this.convertOpList(A)),this.svg=We,this.transformMatrix=Le,this.current.fillColor=je,this.current.strokeColor=le,_e.appendChild(he.childNodes[0]),this.defs.appendChild(_e),"url(#".concat(w,")")}},{key:"_makeShadingPattern",value:function(R){switch(typeof R=="string"&&(R=this.objs.get(R)),R[0]){case"RadialAxial":var h="shading".concat(ie++),A=R[3],E;switch(R[1]){case"axial":var K=R[4],te=R[5];E=this.svgFactory.createElement("svg:linearGradient"),E.setAttributeNS(null,"id",h),E.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),E.setAttributeNS(null,"x1",K[0]),E.setAttributeNS(null,"y1",K[1]),E.setAttributeNS(null,"x2",te[0]),E.setAttributeNS(null,"y2",te[1]);break;case"radial":var Y=R[4],be=R[5],Ce=R[6],we=R[7];E=this.svgFactory.createElement("svg:radialGradient"),E.setAttributeNS(null,"id",h),E.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),E.setAttributeNS(null,"cx",be[0]),E.setAttributeNS(null,"cy",be[1]),E.setAttributeNS(null,"r",we),E.setAttributeNS(null,"fx",Y[0]),E.setAttributeNS(null,"fy",Y[1]),E.setAttributeNS(null,"fr",Ce);break;default:throw new Error("Unknown RadialAxial type: ".concat(R[1]))}var Me=P(A),S;try{for(Me.s();!(S=Me.n()).done;){var w=S.value,s=this.svgFactory.createElement("svg:stop");s.setAttributeNS(null,"offset",w[0]),s.setAttributeNS(null,"stop-color",w[1]),E.appendChild(s)}}catch(o){Me.e(o)}finally{Me.f()}return this.defs.appendChild(E),"url(#".concat(h,")");case"Mesh":return(0,r.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: ".concat(R[0]))}}},{key:"setDash",value:function(R,h){this.current.dashArray=R,this.current.dashPhase=h}},{key:"constructPath",value:function(R,h){var A=this.current,E=A.x,K=A.y,te=[],Y=0,be=P(R),Ce;try{for(be.s();!(Ce=be.n()).done;){var we=Ce.value;switch(we|0){case r.OPS.rectangle:E=h[Y++],K=h[Y++];var Me=h[Y++],S=h[Y++],w=E+Me,s=K+S;te.push("M",u(E),u(K),"L",u(w),u(K),"L",u(w),u(s),"L",u(E),u(s),"Z");break;case r.OPS.moveTo:E=h[Y++],K=h[Y++],te.push("M",u(E),u(K));break;case r.OPS.lineTo:E=h[Y++],K=h[Y++],te.push("L",u(E),u(K));break;case r.OPS.curveTo:E=h[Y+4],K=h[Y+5],te.push("C",u(h[Y]),u(h[Y+1]),u(h[Y+2]),u(h[Y+3]),u(E),u(K)),Y+=6;break;case r.OPS.curveTo2:te.push("C",u(E),u(K),u(h[Y]),u(h[Y+1]),u(h[Y+2]),u(h[Y+3])),E=h[Y+2],K=h[Y+3],Y+=4;break;case r.OPS.curveTo3:E=h[Y+2],K=h[Y+3],te.push("C",u(h[Y]),u(h[Y+1]),u(E),u(K),u(E),u(K)),Y+=4;break;case r.OPS.closePath:te.push("Z");break}}}catch(o){be.e(o)}finally{be.f()}te=te.join(" "),A.path&&R.length>0&&R[0]!==r.OPS.rectangle&&R[0]!==r.OPS.moveTo?te=A.path.getAttributeNS(null,"d")+te:(A.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().appendChild(A.path)),A.path.setAttributeNS(null,"d",te),A.path.setAttributeNS(null,"fill","none"),A.element=A.path,A.setCurrentPoint(E,K)}},{key:"endPath",value:function(){var R=this.current;if(R.path=null,!!this.pendingClip){if(!R.element){this.pendingClip=null;return}var h="clippath".concat(Z++),A=this.svgFactory.createElement("svg:clipPath");A.setAttributeNS(null,"id",h),A.setAttributeNS(null,"transform",v(this.transformMatrix));var E=R.element.cloneNode(!0);if(this.pendingClip==="evenodd"?E.setAttributeNS(null,"clip-rule","evenodd"):E.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,A.appendChild(E),this.defs.appendChild(A),R.activeClipUrl){R.clipGroup=null;var K=P(this.extraStack),te;try{for(K.s();!(te=K.n()).done;){var Y=te.value;Y.clipGroup=null}}catch(be){K.e(be)}finally{K.f()}A.setAttributeNS(null,"clip-path",R.activeClipUrl)}R.activeClipUrl="url(#".concat(h,")"),this.tgrp=null}}},{key:"clip",value:function(R){this.pendingClip=R}},{key:"closePath",value:function(){var R=this.current;if(R.path){var h="".concat(R.path.getAttributeNS(null,"d"),"Z");R.path.setAttributeNS(null,"d",h)}}},{key:"setLeading",value:function(R){this.current.leading=-R}},{key:"setTextRise",value:function(R){this.current.textRise=R}},{key:"setTextRenderingMode",value:function(R){this.current.textRenderingMode=R}},{key:"setHScale",value:function(R){this.current.textHScale=R/100}},{key:"setRenderingIntent",value:function(R){}},{key:"setFlatness",value:function(R){}},{key:"setGState",value:function(R){var h=P(R),A;try{for(h.s();!(A=h.n()).done;){var E=$(A.value,2),K=E[0],te=E[1];switch(K){case"LW":this.setLineWidth(te);break;case"LC":this.setLineCap(te);break;case"LJ":this.setLineJoin(te);break;case"ML":this.setMiterLimit(te);break;case"D":this.setDash(te[0],te[1]);break;case"RI":this.setRenderingIntent(te);break;case"FL":this.setFlatness(te);break;case"Font":this.setFont(te);break;case"CA":this.setStrokeAlpha(te);break;case"ca":this.setFillAlpha(te);break;default:(0,r.warn)("Unimplemented graphic state operator ".concat(K));break}}}catch(Y){h.e(Y)}finally{h.f()}}},{key:"fill",value:function(){var R=this.current;R.element&&(R.element.setAttributeNS(null,"fill",R.fillColor),R.element.setAttributeNS(null,"fill-opacity",R.fillAlpha),this.endPath())}},{key:"stroke",value:function(){var R=this.current;R.element&&(this._setStrokeAttributes(R.element),R.element.setAttributeNS(null,"fill","none"),this.endPath())}},{key:"_setStrokeAttributes",value:function(R){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,A=this.current,E=A.dashArray;h!==1&&E.length>0&&(E=E.map(function(K){return h*K})),R.setAttributeNS(null,"stroke",A.strokeColor),R.setAttributeNS(null,"stroke-opacity",A.strokeAlpha),R.setAttributeNS(null,"stroke-miterlimit",u(A.miterLimit)),R.setAttributeNS(null,"stroke-linecap",A.lineCap),R.setAttributeNS(null,"stroke-linejoin",A.lineJoin),R.setAttributeNS(null,"stroke-width",u(h*A.lineWidth)+"px"),R.setAttributeNS(null,"stroke-dasharray",E.map(u).join(" ")),R.setAttributeNS(null,"stroke-dashoffset",u(h*A.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 R=this.svgFactory.createElement("svg:rect");R.setAttributeNS(null,"x","0"),R.setAttributeNS(null,"y","0"),R.setAttributeNS(null,"width","1px"),R.setAttributeNS(null,"height","1px"),R.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().appendChild(R)}},{key:"paintImageXObject",value:function(R){var h=R.startsWith("g_")?this.commonObjs.get(R):this.objs.get(R);if(!h){(0,r.warn)("Dependent image with object ID ".concat(R," is not ready yet"));return}this.paintInlineImageXObject(h)}},{key:"paintInlineImageXObject",value:function(R,h){var A=R.width,E=R.height,K=M(R,this.forceDataSchema,!!h),te=this.svgFactory.createElement("svg:rect");te.setAttributeNS(null,"x","0"),te.setAttributeNS(null,"y","0"),te.setAttributeNS(null,"width",u(A)),te.setAttributeNS(null,"height",u(E)),this.current.element=te,this.clip("nonzero");var Y=this.svgFactory.createElement("svg:image");Y.setAttributeNS(b,"xlink:href",K),Y.setAttributeNS(null,"x","0"),Y.setAttributeNS(null,"y",u(-E)),Y.setAttributeNS(null,"width",u(A)+"px"),Y.setAttributeNS(null,"height",u(E)+"px"),Y.setAttributeNS(null,"transform","scale(".concat(u(1/A)," ").concat(u(-1/E),")")),h?h.appendChild(Y):this._ensureTransformGroup().appendChild(Y)}},{key:"paintImageMaskXObject",value:function(R){var h=this.current,A=R.width,E=R.height,K=h.fillColor;h.maskId="mask".concat(J++);var te=this.svgFactory.createElement("svg:mask");te.setAttributeNS(null,"id",h.maskId);var Y=this.svgFactory.createElement("svg:rect");Y.setAttributeNS(null,"x","0"),Y.setAttributeNS(null,"y","0"),Y.setAttributeNS(null,"width",u(A)),Y.setAttributeNS(null,"height",u(E)),Y.setAttributeNS(null,"fill",K),Y.setAttributeNS(null,"mask","url(#".concat(h.maskId,")")),this.defs.appendChild(te),this._ensureTransformGroup().appendChild(Y),this.paintInlineImageXObject(R,te)}},{key:"paintFormXObjectBegin",value:function(R,h){if(Array.isArray(R)&&R.length===6&&this.transform(R[0],R[1],R[2],R[3],R[4],R[5]),h){var A=h[2]-h[0],E=h[3]-h[1],K=this.svgFactory.createElement("svg:rect");K.setAttributeNS(null,"x",h[0]),K.setAttributeNS(null,"y",h[1]),K.setAttributeNS(null,"width",u(A)),K.setAttributeNS(null,"height",u(E)),this.current.element=K,this.clip("nonzero"),this.endPath()}}},{key:"paintFormXObjectEnd",value:function(){}},{key:"_initialize",value:function(R){var h=this.svgFactory.create(R.width,R.height),A=this.svgFactory.createElement("svg:defs");h.appendChild(A),this.defs=A;var E=this.svgFactory.createElement("svg:g");return E.setAttributeNS(null,"transform",v(R.transform)),h.appendChild(E),this.svg=E,h}},{key:"_ensureClipGroup",value:function(){if(!this.current.clipGroup){var R=this.svgFactory.createElement("svg:g");R.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.appendChild(R),this.current.clipGroup=R}return this.current.clipGroup}},{key:"_ensureTransformGroup",value:function(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",v(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}}]),H}()}},(y,a,t)=>{"use strict";function r(h){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?r=function(E){return typeof E}:r=function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},r(h)}Object.defineProperty(a,"__esModule",{value:!0}),a.PDFNodeStream=void 0;var i=_(t(2)),f=t(4),m=t(154);function _(h){return h&&h.__esModule?h:{default:h}}function D(h,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(A&&A.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),A&&L(h,A)}function L(h,A){return L=Object.setPrototypeOf||function(K,te){return K.__proto__=te,K},L(h,A)}function $(h){var A=O();return function(){var K=P(h),te;if(A){var Y=P(this).constructor;te=Reflect.construct(K,arguments,Y)}else te=K.apply(this,arguments);return j(this,te)}}function j(h,A){if(A&&(r(A)==="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return V(h)}function V(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function O(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(h){return!1}}function P(h){return P=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},P(h)}function F(h,A,E,K,te,Y,be){try{var Ce=h[Y](be),we=Ce.value}catch(Me){E(Me);return}Ce.done?A(we):Promise.resolve(we).then(K,te)}function x(h){return function(){var A=this,E=arguments;return new Promise(function(K,te){var Y=h.apply(A,E);function be(we){F(Y,K,te,be,Ce,"next",we)}function Ce(we){F(Y,K,te,be,Ce,"throw",we)}be(void 0)})}}function I(h,A){var E=typeof Symbol!="undefined"&&h[Symbol.iterator]||h["@@iterator"];if(!E){if(Array.isArray(h)||(E=g(h))||A&&h&&typeof h.length=="number"){E&&(h=E);var K=0,te=function(){};return{s:te,n:function(){return K>=h.length?{done:!0}:{done:!1,value:h[K++]}},e:function(Me){throw Me},f:te}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Y=!0,be=!1,Ce;return{s:function(){E=E.call(h)},n:function(){var Me=E.next();return Y=Me.done,Me},e:function(Me){be=!0,Ce=Me},f:function(){try{!Y&&E.return!=null&&E.return()}finally{if(be)throw Ce}}}}function g(h,A){if(!!h){if(typeof h=="string")return B(h,A);var E=Object.prototype.toString.call(h).slice(8,-1);if(E==="Object"&&h.constructor&&(E=h.constructor.name),E==="Map"||E==="Set")return Array.from(h);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return B(h,A)}}function B(h,A){(A==null||A>h.length)&&(A=h.length);for(var E=0,K=new Array(A);E<A;E++)K[E]=h[E];return K}function p(h,A){if(!(h instanceof A))throw new TypeError("Cannot call a class as a function")}function l(h,A){for(var E=0;E<A.length;E++){var K=A[E];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(h,K.key,K)}}function u(h,A,E){return A&&l(h.prototype,A),E&&l(h,E),h}var v=require("fs"),d=require("http"),c=require("https"),b=require("url"),T=/^file:\/\/\/[a-zA-Z]:\//;function U(h){var A=b.parse(h);return A.protocol==="file:"||A.host?A:/^[a-z]:[/\\]/i.test(h)?b.parse("file:///".concat(h)):(A.host||(A.protocol="file:"),A)}var M=function(){function h(A){p(this,h),this.source=A,this.url=U(A.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.httpHeaders=this.isHttp&&A.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}return u(h,[{key:"_progressiveDataLength",get:function(){var E,K;return(E=(K=this._fullRequestReader)===null||K===void 0?void 0:K._loaded)!==null&&E!==void 0?E:0}},{key:"getFullReader",value:function(){return(0,f.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new q(this):new ie(this),this._fullRequestReader}},{key:"getRangeReader",value:function(E,K){if(K<=this._progressiveDataLength)return null;var te=this.isFsUrl?new R(this,E,K):new H(this,E,K);return this._rangeRequestReaders.push(te),te}},{key:"cancelAllRequests",value:function(E){this._fullRequestReader&&this._fullRequestReader.cancel(E);var K=I(this._rangeRequestReaders.slice(0)),te;try{for(K.s();!(te=K.n()).done;){var Y=te.value;Y.cancel(E)}}catch(be){K.e(be)}finally{K.f()}}}]),h}();a.PDFNodeStream=M;var G=function(){function h(A){p(this,h),this._url=A.url,this._done=!1,this._storedError=null,this.onProgress=null;var E=A.source;this._contentLength=E.length,this._loaded=0,this._filename=null,this._disableRange=E.disableRange||!1,this._rangeChunkSize=E.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!E.disableStream,this._isRangeSupported=!E.disableRange,this._readableStream=null,this._readCapability=(0,f.createPromiseCapability)(),this._headersCapability=(0,f.createPromiseCapability)()}return u(h,[{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 A=x(i.default.mark(function K(){var te,Y;return i.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,this._readCapability.promise;case 2:if(!this._done){Ce.next=4;break}return Ce.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){Ce.next=6;break}throw this._storedError;case 6:if(te=this._readableStream.read(),te!==null){Ce.next=10;break}return this._readCapability=(0,f.createPromiseCapability)(),Ce.abrupt("return",this.read());case 10:return this._loaded+=te.length,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),Y=new Uint8Array(te).buffer,Ce.abrupt("return",{value:Y,done:!1});case 14:case"end":return Ce.stop()}},K,this)}));function E(){return A.apply(this,arguments)}return E}()},{key:"cancel",value:function(E){if(!this._readableStream){this._error(E);return}this._readableStream.destroy(E)}},{key:"_error",value:function(E){this._storedError=E,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(E){var K=this;this._readableStream=E,E.on("readable",function(){K._readCapability.resolve()}),E.on("end",function(){E.destroy(),K._done=!0,K._readCapability.resolve()}),E.on("error",function(te){K._error(te)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new f.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}]),h}(),Z=function(){function h(A){p(this,h),this._url=A.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,f.createPromiseCapability)();var E=A.source;this._isStreamingSupported=!E.disableStream}return u(h,[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:function(){var A=x(i.default.mark(function K(){var te,Y;return i.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,this._readCapability.promise;case 2:if(!this._done){Ce.next=4;break}return Ce.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){Ce.next=6;break}throw this._storedError;case 6:if(te=this._readableStream.read(),te!==null){Ce.next=10;break}return this._readCapability=(0,f.createPromiseCapability)(),Ce.abrupt("return",this.read());case 10:return this._loaded+=te.length,this.onProgress&&this.onProgress({loaded:this._loaded}),Y=new Uint8Array(te).buffer,Ce.abrupt("return",{value:Y,done:!1});case 14:case"end":return Ce.stop()}},K,this)}));function E(){return A.apply(this,arguments)}return E}()},{key:"cancel",value:function(E){if(!this._readableStream){this._error(E);return}this._readableStream.destroy(E)}},{key:"_error",value:function(E){this._storedError=E,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(E){var K=this;this._readableStream=E,E.on("readable",function(){K._readCapability.resolve()}),E.on("end",function(){E.destroy(),K._done=!0,K._readCapability.resolve()}),E.on("error",function(te){K._error(te)}),this._storedError&&this._readableStream.destroy(this._storedError)}}]),h}();function J(h,A){return{protocol:h.protocol,auth:h.auth,host:h.hostname,port:h.port,path:h.path,method:"GET",headers:A}}var ie=function(h){D(E,h);var A=$(E);function E(K){var te;p(this,E),te=A.call(this,K);var Y=function(Ce){if(Ce.statusCode===404){var we=new f.MissingPDFException('Missing PDF "'.concat(te._url,'".'));te._storedError=we,te._headersCapability.reject(we);return}te._headersCapability.resolve(),te._setReadableStream(Ce);var Me=function(k){return te._readableStream.headers[k.toLowerCase()]},S=(0,m.validateRangeRequestCapabilities)({getResponseHeader:Me,isHttp:K.isHttp,rangeChunkSize:te._rangeChunkSize,disableRange:te._disableRange}),w=S.allowRangeRequests,s=S.suggestedLength;te._isRangeSupported=w,te._contentLength=s||te._contentLength,te._filename=(0,m.extractFilenameFromHeader)(Me)};return te._request=null,te._url.protocol==="http:"?te._request=d.request(J(te._url,K.httpHeaders),Y):te._request=c.request(J(te._url,K.httpHeaders),Y),te._request.on("error",function(be){te._storedError=be,te._headersCapability.reject(be)}),te._request.end(),te}return E}(G),H=function(h){D(E,h);var A=$(E);function E(K,te,Y){var be;p(this,E),be=A.call(this,K),be._httpHeaders={};for(var Ce in K.httpHeaders){var we=K.httpHeaders[Ce];typeof we!="undefined"&&(be._httpHeaders[Ce]=we)}be._httpHeaders.Range="bytes=".concat(te,"-").concat(Y-1);var Me=function(w){if(w.statusCode===404){var s=new f.MissingPDFException('Missing PDF "'.concat(be._url,'".'));be._storedError=s;return}be._setReadableStream(w)};return be._request=null,be._url.protocol==="http:"?be._request=d.request(J(be._url,be._httpHeaders),Me):be._request=c.request(J(be._url,be._httpHeaders),Me),be._request.on("error",function(S){be._storedError=S}),be._request.end(),be}return E}(Z),q=function(h){D(E,h);var A=$(E);function E(K){var te;p(this,E),te=A.call(this,K);var Y=decodeURIComponent(te._url.path);return T.test(te._url.href)&&(Y=Y.replace(/^\//,"")),v.lstat(Y,function(be,Ce){if(be){be.code==="ENOENT"&&(be=new f.MissingPDFException('Missing PDF "'.concat(Y,'".'))),te._storedError=be,te._headersCapability.reject(be);return}te._contentLength=Ce.size,te._setReadableStream(v.createReadStream(Y)),te._headersCapability.resolve()}),te}return E}(G),R=function(h){D(E,h);var A=$(E);function E(K,te,Y){var be;p(this,E),be=A.call(this,K);var Ce=decodeURIComponent(be._url.path);return T.test(be._url.href)&&(Ce=Ce.replace(/^\//,"")),be._setReadableStream(v.createReadStream(Ce,{start:te,end:Y-1})),be}return E}(Z)},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.createResponseStatusError=D,a.extractFilenameFromHeader=_,a.validateRangeRequestCapabilities=m,a.validateResponseStatus=L;var r=t(4),i=t(155),f=t(1);function m($){var j=$.getResponseHeader,V=$.isHttp,O=$.rangeChunkSize,P=$.disableRange;(0,r.assert)(O>0,"Range chunk size must be larger than zero");var F={allowRangeRequests:!1,suggestedLength:void 0},x=parseInt(j("Content-Length"),10);if(!Number.isInteger(x)||(F.suggestedLength=x,x<=2*O)||P||!V)return F;var I=j("Content-Encoding")||"identity";return I!=="identity"||(F.allowRangeRequests=!0),F}function _($){var j=$("Content-Disposition");if(j){var V=(0,i.getFilenameFromContentDispositionHeader)(j);if(V.includes("%"))try{V=decodeURIComponent(V)}catch(O){}if((0,f.isPdfFile)(V))return V}return null}function D($,j){return $===404||$===0&&j.startsWith("file:")?new r.MissingPDFException('Missing PDF "'+j+'".'):new r.UnexpectedResponseException("Unexpected server response (".concat($,') while retrieving PDF "').concat(j,'".'),$)}function L($){return $===200||$===206}},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.getFilenameFromContentDispositionHeader=$;var r=t(4);function i(j,V){return L(j)||D(j,V)||m(j,V)||f()}function f(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m(j,V){if(!!j){if(typeof j=="string")return _(j,V);var O=Object.prototype.toString.call(j).slice(8,-1);if(O==="Object"&&j.constructor&&(O=j.constructor.name),O==="Map"||O==="Set")return Array.from(j);if(O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O))return _(j,V)}}function _(j,V){(V==null||V>j.length)&&(V=j.length);for(var O=0,P=new Array(V);O<V;O++)P[O]=j[O];return P}function D(j,V){var O=j==null?null:typeof Symbol!="undefined"&&j[Symbol.iterator]||j["@@iterator"];if(O!=null){var P=[],F=!0,x=!1,I,g;try{for(O=O.call(j);!(F=(I=O.next()).done)&&(P.push(I.value),!(V&&P.length===V));F=!0);}catch(B){x=!0,g=B}finally{try{!F&&O.return!=null&&O.return()}finally{if(x)throw g}}return P}}function L(j){if(Array.isArray(j))return j}function $(j){var V=!0,O=I("filename\\*","i").exec(j);if(O){O=O[1];var P=l(O);return P=unescape(P),P=u(P),P=v(P),B(P)}if(O=p(j),O){var F=v(O);return B(F)}if(O=I("filename","i").exec(j),O){O=O[1];var x=l(O);return x=v(x),B(x)}function I(d,c){return new RegExp("(?:^|;)\\s*"+d+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',c)}function g(d,c){if(d){if(!/^[\x00-\xFF]+$/.test(c))return c;try{var b=new TextDecoder(d,{fatal:!0}),T=(0,r.stringToBytes)(c);c=b.decode(T),V=!1}catch(U){if(/^utf-?8$/i.test(d))try{c=decodeURIComponent(escape(c)),V=!1}catch(M){}}}return c}function B(d){return V&&/[\x80-\xff]/.test(d)&&(d=g("utf-8",d),V&&(d=g("iso-8859-1",d))),d}function p(d){for(var c=[],b,T=I("filename\\*((?!0\\d)\\d+)(\\*?)","ig");(b=T.exec(d))!==null;){var U=b,M=i(U,4),G=M[1],Z=M[2],J=M[3];if(G=parseInt(G,10),G in c){if(G===0)break;continue}c[G]=[Z,J]}for(var ie=[],H=0;H<c.length&&H in c;++H){var q=i(c[H],2),R=q[0],h=q[1];h=l(h),R&&(h=unescape(h),H===0&&(h=u(h))),ie.push(h)}return ie.join("")}function l(d){if(d.startsWith('"')){for(var c=d.slice(1).split('\\"'),b=0;b<c.length;++b){var T=c[b].indexOf('"');T!==-1&&(c[b]=c[b].slice(0,T),c.length=b+1),c[b]=c[b].replace(/\\(.)/g,"$1")}d=c.join('"')}return d}function u(d){var c=d.indexOf("'");if(c===-1)return d;var b=d.slice(0,c),T=d.slice(c+1),U=T.replace(/^[^']*'/,"");return g(b,U)}function v(d){return!d.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(d)?d:d.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(c,b,T,U){if(T==="q"||T==="Q")return U=U.replace(/_/g," "),U=U.replace(/=([0-9a-fA-F]{2})/g,function(M,G){return String.fromCharCode(parseInt(G,16))}),g(b,U);try{U=atob(U)}catch(M){}return g(b,U)})}return""}},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.PDFNetworkStream=void 0;var r=m(t(2)),i=t(4),f=t(154);function m(u){return u&&u.__esModule?u:{default:u}}function _(u,v,d,c,b,T,U){try{var M=u[T](U),G=M.value}catch(Z){d(Z);return}M.done?v(G):Promise.resolve(G).then(c,b)}function D(u){return function(){var v=this,d=arguments;return new Promise(function(c,b){var T=u.apply(v,d);function U(G){_(T,c,b,U,M,"next",G)}function M(G){_(T,c,b,U,M,"throw",G)}U(void 0)})}}function L(u,v){var d=typeof Symbol!="undefined"&&u[Symbol.iterator]||u["@@iterator"];if(!d){if(Array.isArray(u)||(d=$(u))||v&&u&&typeof u.length=="number"){d&&(u=d);var c=0,b=function(){};return{s:b,n:function(){return c>=u.length?{done:!0}:{done:!1,value:u[c++]}},e:function(Z){throw Z},f:b}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var T=!0,U=!1,M;return{s:function(){d=d.call(u)},n:function(){var Z=d.next();return T=Z.done,Z},e:function(Z){U=!0,M=Z},f:function(){try{!T&&d.return!=null&&d.return()}finally{if(U)throw M}}}}function $(u,v){if(!!u){if(typeof u=="string")return j(u,v);var d=Object.prototype.toString.call(u).slice(8,-1);if(d==="Object"&&u.constructor&&(d=u.constructor.name),d==="Map"||d==="Set")return Array.from(u);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return j(u,v)}}function j(u,v){(v==null||v>u.length)&&(v=u.length);for(var d=0,c=new Array(v);d<v;d++)c[d]=u[d];return c}function V(u,v){if(!(u instanceof v))throw new TypeError("Cannot call a class as a function")}function O(u,v){for(var d=0;d<v.length;d++){var c=v[d];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(u,c.key,c)}}function P(u,v,d){return v&&O(u.prototype,v),d&&O(u,d),u}var F=200,x=206;function I(u){var v=u.response;if(typeof v!="string")return v;var d=(0,i.stringToBytes)(v);return d.buffer}var g=function(){function u(v){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};V(this,u),this.url=v,this.isHttp=/^https?:/i.test(v),this.httpHeaders=this.isHttp&&d.httpHeaders||Object.create(null),this.withCredentials=d.withCredentials||!1,this.getXhr=d.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}return P(u,[{key:"requestRange",value:function(d,c,b){var T={begin:d,end:c};for(var U in b)T[U]=b[U];return this.request(T)}},{key:"requestFull",value:function(d){return this.request(d)}},{key:"request",value:function(d){var c=this.getXhr(),b=this.currXhrId++,T=this.pendingRequests[b]={xhr:c};c.open("GET",this.url),c.withCredentials=this.withCredentials;for(var U in this.httpHeaders){var M=this.httpHeaders[U];typeof M!="undefined"&&c.setRequestHeader(U,M)}return this.isHttp&&"begin"in d&&"end"in d?(c.setRequestHeader("Range","bytes=".concat(d.begin,"-").concat(d.end-1)),T.expectedStatus=x):T.expectedStatus=F,c.responseType="arraybuffer",d.onError&&(c.onerror=function(G){d.onError(c.status)}),c.onreadystatechange=this.onStateChange.bind(this,b),c.onprogress=this.onProgress.bind(this,b),T.onHeadersReceived=d.onHeadersReceived,T.onDone=d.onDone,T.onError=d.onError,T.onProgress=d.onProgress,c.send(null),b}},{key:"onProgress",value:function(d,c){var b,T=this.pendingRequests[d];!T||(b=T.onProgress)===null||b===void 0||b.call(T,c)}},{key:"onStateChange",value:function(d,c){var b=this.pendingRequests[d];if(!!b){var T=b.xhr;if(T.readyState>=2&&b.onHeadersReceived&&(b.onHeadersReceived(),delete b.onHeadersReceived),T.readyState===4&&d in this.pendingRequests){if(delete this.pendingRequests[d],T.status===0&&this.isHttp){var U;(U=b.onError)===null||U===void 0||U.call(b,T.status);return}var M=T.status||F,G=M===F&&b.expectedStatus===x;if(!G&&M!==b.expectedStatus){var Z;(Z=b.onError)===null||Z===void 0||Z.call(b,T.status);return}var J=I(T);if(M===x){var ie=T.getResponseHeader("Content-Range"),H=/bytes (\d+)-(\d+)\/(\d+)/.exec(ie);b.onDone({begin:parseInt(H[1],10),chunk:J})}else if(J)b.onDone({begin:0,chunk:J});else{var q;(q=b.onError)===null||q===void 0||q.call(b,T.status)}}}}},{key:"getRequestXhr",value:function(d){return this.pendingRequests[d].xhr}},{key:"isPendingRequest",value:function(d){return d in this.pendingRequests}},{key:"abortRequest",value:function(d){var c=this.pendingRequests[d].xhr;delete this.pendingRequests[d],c.abort()}}]),u}(),B=function(){function u(v){V(this,u),this._source=v,this._manager=new g(v.url,{httpHeaders:v.httpHeaders,withCredentials:v.withCredentials}),this._rangeChunkSize=v.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}return P(u,[{key:"_onRangeRequestReaderClosed",value:function(d){var c=this._rangeRequestReaders.indexOf(d);c>=0&&this._rangeRequestReaders.splice(c,1)}},{key:"getFullReader",value:function(){return(0,i.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new p(this._manager,this._source),this._fullRequestReader}},{key:"getRangeReader",value:function(d,c){var b=new l(this._manager,d,c);return b.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(b),b}},{key:"cancelAllRequests",value:function(d){var c;(c=this._fullRequestReader)===null||c===void 0||c.cancel(d);var b=L(this._rangeRequestReaders.slice(0)),T;try{for(b.s();!(T=b.n()).done;){var U=T.value;U.cancel(d)}}catch(M){b.e(M)}finally{b.f()}}}]),u}();a.PDFNetworkStream=B;var p=function(){function u(v,d){V(this,u),this._manager=v;var c={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=d.url,this._fullRequestId=v.requestFull(c),this._headersReceivedCapability=(0,i.createPromiseCapability)(),this._disableRange=d.disableRange||!1,this._contentLength=d.length,this._rangeChunkSize=d.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 P(u,[{key:"_onHeadersReceived",value:function(){var d=this._fullRequestId,c=this._manager.getRequestXhr(d),b=function(Z){return c.getResponseHeader(Z)},T=(0,f.validateRangeRequestCapabilities)({getResponseHeader:b,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),U=T.allowRangeRequests,M=T.suggestedLength;U&&(this._isRangeSupported=!0),this._contentLength=M||this._contentLength,this._filename=(0,f.extractFilenameFromHeader)(b),this._isRangeSupported&&this._manager.abortRequest(d),this._headersReceivedCapability.resolve()}},{key:"_onDone",value:function(d){if(d)if(this._requests.length>0){var c=this._requests.shift();c.resolve({value:d.chunk,done:!1})}else this._cachedChunks.push(d.chunk);if(this._done=!0,!(this._cachedChunks.length>0)){var b=L(this._requests),T;try{for(b.s();!(T=b.n()).done;){var U=T.value;U.resolve({value:void 0,done:!0})}}catch(M){b.e(M)}finally{b.f()}this._requests.length=0}}},{key:"_onError",value:function(d){this._storedError=(0,f.createResponseStatusError)(d,this._url),this._headersReceivedCapability.reject(this._storedError);var c=L(this._requests),b;try{for(c.s();!(b=c.n()).done;){var T=b.value;T.reject(this._storedError)}}catch(U){c.e(U)}finally{c.f()}this._requests.length=0,this._cachedChunks.length=0}},{key:"_onProgress",value:function(d){var c;(c=this.onProgress)===null||c===void 0||c.call(this,{loaded:d.loaded,total:d.lengthComputable?d.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 v=D(r.default.mark(function c(){var b,T;return r.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(!this._storedError){M.next=2;break}throw this._storedError;case 2:if(!(this._cachedChunks.length>0)){M.next=5;break}return b=this._cachedChunks.shift(),M.abrupt("return",{value:b,done:!1});case 5:if(!this._done){M.next=7;break}return M.abrupt("return",{value:void 0,done:!0});case 7:return T=(0,i.createPromiseCapability)(),this._requests.push(T),M.abrupt("return",T.promise);case 10:case"end":return M.stop()}},c,this)}));function d(){return v.apply(this,arguments)}return d}()},{key:"cancel",value:function(d){this._done=!0,this._headersReceivedCapability.reject(d);var c=L(this._requests),b;try{for(c.s();!(b=c.n()).done;){var T=b.value;T.resolve({value:void 0,done:!0})}}catch(U){c.e(U)}finally{c.f()}this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}]),u}(),l=function(){function u(v,d,c){V(this,u),this._manager=v;var b={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=v.url,this._requestId=v.requestRange(d,c,b),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}return P(u,[{key:"_close",value:function(){var d;(d=this.onClosed)===null||d===void 0||d.call(this,this)}},{key:"_onDone",value:function(d){var c=d.chunk;if(this._requests.length>0){var b=this._requests.shift();b.resolve({value:c,done:!1})}else this._queuedChunk=c;this._done=!0;var T=L(this._requests),U;try{for(T.s();!(U=T.n()).done;){var M=U.value;M.resolve({value:void 0,done:!0})}}catch(G){T.e(G)}finally{T.f()}this._requests.length=0,this._close()}},{key:"_onError",value:function(d){this._storedError=(0,f.createResponseStatusError)(d,this._url);var c=L(this._requests),b;try{for(c.s();!(b=c.n()).done;){var T=b.value;T.reject(this._storedError)}}catch(U){c.e(U)}finally{c.f()}this._requests.length=0,this._queuedChunk=null}},{key:"_onProgress",value:function(d){if(!this.isStreamingSupported){var c;(c=this.onProgress)===null||c===void 0||c.call(this,{loaded:d.loaded})}}},{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:function(){var v=D(r.default.mark(function c(){var b,T;return r.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(!this._storedError){M.next=2;break}throw this._storedError;case 2:if(this._queuedChunk===null){M.next=6;break}return b=this._queuedChunk,this._queuedChunk=null,M.abrupt("return",{value:b,done:!1});case 6:if(!this._done){M.next=8;break}return M.abrupt("return",{value:void 0,done:!0});case 8:return T=(0,i.createPromiseCapability)(),this._requests.push(T),M.abrupt("return",T.promise);case 11:case"end":return M.stop()}},c,this)}));function d(){return v.apply(this,arguments)}return d}()},{key:"cancel",value:function(d){this._done=!0;var c=L(this._requests),b;try{for(c.s();!(b=c.n()).done;){var T=b.value;T.resolve({value:void 0,done:!0})}}catch(U){c.e(U)}finally{c.f()}this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}]),u}()},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.PDFFetchStream=void 0;var r=m(t(2)),i=t(4),f=t(154);function m(l){return l&&l.__esModule?l:{default:l}}function _(l,u,v,d,c,b,T){try{var U=l[b](T),M=U.value}catch(G){v(G);return}U.done?u(M):Promise.resolve(M).then(d,c)}function D(l){return function(){var u=this,v=arguments;return new Promise(function(d,c){var b=l.apply(u,v);function T(M){_(b,d,c,T,U,"next",M)}function U(M){_(b,d,c,T,U,"throw",M)}T(void 0)})}}function L(l,u){var v=typeof Symbol!="undefined"&&l[Symbol.iterator]||l["@@iterator"];if(!v){if(Array.isArray(l)||(v=$(l))||u&&l&&typeof l.length=="number"){v&&(l=v);var d=0,c=function(){};return{s:c,n:function(){return d>=l.length?{done:!0}:{done:!1,value:l[d++]}},e:function(G){throw G},f:c}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var b=!0,T=!1,U;return{s:function(){v=v.call(l)},n:function(){var G=v.next();return b=G.done,G},e:function(G){T=!0,U=G},f:function(){try{!b&&v.return!=null&&v.return()}finally{if(T)throw U}}}}function $(l,u){if(!!l){if(typeof l=="string")return j(l,u);var v=Object.prototype.toString.call(l).slice(8,-1);if(v==="Object"&&l.constructor&&(v=l.constructor.name),v==="Map"||v==="Set")return Array.from(l);if(v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v))return j(l,u)}}function j(l,u){(u==null||u>l.length)&&(u=l.length);for(var v=0,d=new Array(u);v<u;v++)d[v]=l[v];return d}function V(l,u){if(!(l instanceof u))throw new TypeError("Cannot call a class as a function")}function O(l,u){for(var v=0;v<u.length;v++){var d=u[v];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}function P(l,u,v){return u&&O(l.prototype,u),v&&O(l,v),l}function F(l,u,v){return{method:"GET",headers:l,signal:v==null?void 0:v.signal,mode:"cors",credentials:u?"include":"same-origin",redirect:"follow"}}function x(l,u,v){return{method:"HEAD",headers:l,signal:v==null?void 0:v.signal,mode:"cors",credentials:u?"include":"same-origin",redirect:"follow"}}function I(l){var u=new Headers;for(var v in l){var d=l[v];typeof d!="undefined"&&u.append(v,d)}return u}var g=function(){function l(u){V(this,l),this.source=u,this.isHttp=/^https?:/i.test(u.url),this.httpHeaders=this.isHttp&&u.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}return P(l,[{key:"_progressiveDataLength",get:function(){var v,d;return(v=(d=this._fullRequestReader)===null||d===void 0?void 0:d._loaded)!==null&&v!==void 0?v:0}},{key:"getFullReader",value:function(){return(0,i.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new B(this),this._fullRequestReader}},{key:"getRangeReader",value:function(v,d){if(d<=this._progressiveDataLength)return null;var c=new p(this,v,d);return this._rangeRequestReaders.push(c),c}},{key:"cancelAllRequests",value:function(v){this._fullRequestReader&&this._fullRequestReader.cancel(v);var d=L(this._rangeRequestReaders.slice(0)),c;try{for(d.s();!(c=d.n()).done;){var b=c.value;b.cancel(v)}}catch(T){d.e(T)}finally{d.f()}}}]),l}();a.PDFFetchStream=g;var B=function(){function l(u){var v=this;V(this,l),this._stream=u,this._reader=null,this._loaded=0,this._filename=null;var d=u.source;this._withCredentials=d.withCredentials||!1,this._contentLength=d.length,this._headersCapability=(0,i.createPromiseCapability)(),this._disableRange=d.disableRange||!1,this._rangeChunkSize=d.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),typeof AbortController!="undefined"&&(this._abortController=new AbortController),this._isStreamingSupported=!d.disableStream,this._isRangeSupported=!d.disableRange,this._headers=I(this._stream.httpHeaders);var c=d.url;fetch(c,x(this._headers,this._withCredentials,this._abortController)).then(function(b){if(!(0,f.validateResponseStatus)(b.status))throw(0,f.createResponseStatusError)(b.status,c);v._reader=b.body.getReader(),v._headersCapability.resolve();var T=function(J){return b.headers.get(J)},U=(0,f.validateRangeRequestCapabilities)({getResponseHeader:T,isHttp:v._stream.isHttp,rangeChunkSize:v._rangeChunkSize,disableRange:v._disableRange}),M=U.allowRangeRequests,G=U.suggestedLength;v._isRangeSupported=M,v._contentLength=G||v._contentLength,v._filename=(0,f.extractFilenameFromHeader)(T),!v._isStreamingSupported&&v._isRangeSupported&&v.cancel(new i.AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}return P(l,[{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 u=D(r.default.mark(function d(){var c,b,T,U;return r.default.wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return G.next=2,this._headersCapability.promise;case 2:return G.next=4,this._reader.read();case 4:if(c=G.sent,b=c.value,T=c.done,!T){G.next=9;break}return G.abrupt("return",{value:b,done:T});case 9:return this._loaded+=b.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),U=new Uint8Array(b).buffer,G.abrupt("return",{value:U,done:!1});case 13:case"end":return G.stop()}},d,this)}));function v(){return u.apply(this,arguments)}return v}()},{key:"cancel",value:function(v){this._reader&&this._reader.cancel(v),this._abortController&&this._abortController.abort()}}]),l}(),p=function(){function l(u,v,d){var c=this;V(this,l),this._stream=u,this._reader=null,this._loaded=0;var b=u.source;this._withCredentials=b.withCredentials||!1,this._readCapability=(0,i.createPromiseCapability)(),this._isStreamingSupported=!b.disableStream,typeof AbortController!="undefined"&&(this._abortController=new AbortController),this._headers=I(this._stream.httpHeaders),this._headers.append("Range","bytes=".concat(v,"-").concat(d-1));var T=b.url;fetch(T,F(this._headers,this._withCredentials,this._abortController)).then(function(U){if(!(0,f.validateResponseStatus)(U.status))throw(0,f.createResponseStatusError)(U.status,T);c._readCapability.resolve(),c._reader=U.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}return P(l,[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:function(){var u=D(r.default.mark(function d(){var c,b,T,U;return r.default.wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return G.next=2,this._readCapability.promise;case 2:return G.next=4,this._reader.read();case 4:if(c=G.sent,b=c.value,T=c.done,!T){G.next=9;break}return G.abrupt("return",{value:b,done:T});case 9:return this._loaded+=b.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded}),U=new Uint8Array(b).buffer,G.abrupt("return",{value:U,done:!1});case 13:case"end":return G.stop()}},d,this)}));function v(){return u.apply(this,arguments)}return v}()},{key:"cancel",value:function(v){this._reader&&this._reader.cancel(v),this._abortController&&this._abortController.abort()}}]),l}()}],__webpack_module_cache__={};function __w_pdfjs_require__(y){var a=__webpack_module_cache__[y];if(a!==void 0)return a.exports;var t=__webpack_module_cache__[y]={id:y,loaded:!1,exports:{}};return __webpack_modules__[y].call(t.exports,t,t.exports,__w_pdfjs_require__),t.loaded=!0,t.exports}(()=>{__w_pdfjs_require__.nmd=y=>(y.paths=[],y.children||(y.children=[]),y)})();var __webpack_exports__={};return(()=>{"use strict";var y=__webpack_exports__;Object.defineProperty(y,"__esModule",{value:!0}),Object.defineProperty(y,"AnnotationLayer",{enumerable:!0,get:function(){return i.AnnotationLayer}}),Object.defineProperty(y,"AnnotationMode",{enumerable:!0,get:function(){return t.AnnotationMode}}),Object.defineProperty(y,"CMapCompressionType",{enumerable:!0,get:function(){return t.CMapCompressionType}}),Object.defineProperty(y,"GlobalWorkerOptions",{enumerable:!0,get:function(){return f.GlobalWorkerOptions}}),Object.defineProperty(y,"InvalidPDFException",{enumerable:!0,get:function(){return t.InvalidPDFException}}),Object.defineProperty(y,"LinkTarget",{enumerable:!0,get:function(){return a.LinkTarget}}),Object.defineProperty(y,"LoopbackPort",{enumerable:!0,get:function(){return r.LoopbackPort}}),Object.defineProperty(y,"MissingPDFException",{enumerable:!0,get:function(){return t.MissingPDFException}}),Object.defineProperty(y,"OPS",{enumerable:!0,get:function(){return t.OPS}}),Object.defineProperty(y,"PDFDataRangeTransport",{enumerable:!0,get:function(){return r.PDFDataRangeTransport}}),Object.defineProperty(y,"PDFDateString",{enumerable:!0,get:function(){return a.PDFDateString}}),Object.defineProperty(y,"PDFWorker",{enumerable:!0,get:function(){return r.PDFWorker}}),Object.defineProperty(y,"PasswordResponses",{enumerable:!0,get:function(){return t.PasswordResponses}}),Object.defineProperty(y,"PermissionFlag",{enumerable:!0,get:function(){return t.PermissionFlag}}),Object.defineProperty(y,"PixelsPerInch",{enumerable:!0,get:function(){return a.PixelsPerInch}}),Object.defineProperty(y,"RenderingCancelledException",{enumerable:!0,get:function(){return a.RenderingCancelledException}}),Object.defineProperty(y,"SVGGraphics",{enumerable:!0,get:function(){return D.SVGGraphics}}),Object.defineProperty(y,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return t.UNSUPPORTED_FEATURES}}),Object.defineProperty(y,"UnexpectedResponseException",{enumerable:!0,get:function(){return t.UnexpectedResponseException}}),Object.defineProperty(y,"Util",{enumerable:!0,get:function(){return t.Util}}),Object.defineProperty(y,"VerbosityLevel",{enumerable:!0,get:function(){return t.VerbosityLevel}}),Object.defineProperty(y,"XfaLayer",{enumerable:!0,get:function(){return L.XfaLayer}}),Object.defineProperty(y,"addLinkAttributes",{enumerable:!0,get:function(){return a.addLinkAttributes}}),Object.defineProperty(y,"build",{enumerable:!0,get:function(){return r.build}}),Object.defineProperty(y,"createObjectURL",{enumerable:!0,get:function(){return t.createObjectURL}}),Object.defineProperty(y,"createPromiseCapability",{enumerable:!0,get:function(){return t.createPromiseCapability}}),Object.defineProperty(y,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return t.createValidAbsoluteUrl}}),Object.defineProperty(y,"getDocument",{enumerable:!0,get:function(){return r.getDocument}}),Object.defineProperty(y,"getFilenameFromUrl",{enumerable:!0,get:function(){return a.getFilenameFromUrl}}),Object.defineProperty(y,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return a.getPdfFilenameFromUrl}}),Object.defineProperty(y,"getXfaPageViewport",{enumerable:!0,get:function(){return a.getXfaPageViewport}}),Object.defineProperty(y,"isPdfFile",{enumerable:!0,get:function(){return a.isPdfFile}}),Object.defineProperty(y,"loadScript",{enumerable:!0,get:function(){return a.loadScript}}),Object.defineProperty(y,"removeNullCharacters",{enumerable:!0,get:function(){return t.removeNullCharacters}}),Object.defineProperty(y,"renderTextLayer",{enumerable:!0,get:function(){return _.renderTextLayer}}),Object.defineProperty(y,"shadow",{enumerable:!0,get:function(){return t.shadow}}),Object.defineProperty(y,"version",{enumerable:!0,get:function(){return r.version}});var a=__w_pdfjs_require__(1),t=__w_pdfjs_require__(4),r=__w_pdfjs_require__(136),i=__w_pdfjs_require__(148),f=__w_pdfjs_require__(142),m=__w_pdfjs_require__(6),_=__w_pdfjs_require__(151),D=__w_pdfjs_require__(152),L=__w_pdfjs_require__(150),$="2.12.313",j="a2ae56f39";if(m.isNodeJS){var V=__w_pdfjs_require__(153),O=V.PDFNodeStream;(0,r.setPDFNetworkStreamFactory)(function(g){return new O(g)})}else{var P=__w_pdfjs_require__(156),F=P.PDFNetworkStream,x=__w_pdfjs_require__(157),I=x.PDFFetchStream;(0,r.setPDFNetworkStreamFactory)(function(g){return(0,a.isValidFetchUrl)(g.url)?new I(g):new F(g)})}})(),__webpack_exports__})()});