filesbox/web/dist/pdfjs/build/pdf.js

37 lines
422 KiB
JavaScript
Raw Permalink Normal View History

2024-07-26 06:10:54 +00:00
(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}}f
`))}}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("Generat
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,COMMITONSEL
`?"\\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{re
`),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(
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===_displ
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?
`)}}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._tr
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
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.
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._load
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="".c
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.que
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+
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_1B
`)}},{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.setAttribu
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
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."),th
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._isStream