@tuttarealstep/vue-pdf.js
Version:
A Vue component for displaying PDF files using the standard `pdf.js` viewer. This package provides a simple and powerful integration to embed PDF viewers in Vue applications.
2 lines • 4.82 MB
JavaScript
(function(Ke,G){typeof exports=="object"&&typeof module<"u"?G(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],G):(Ke=typeof globalThis<"u"?globalThis:Ke||self,G(Ke.VuePDFjs={},Ke.Vue))})(this,function(Ke,G){"use strict";var wst=Object.defineProperty;var jD=Ke=>{throw TypeError(Ke)};var Mst=(Ke,G,S)=>G in Ke?wst(Ke,G,{enumerable:!0,configurable:!0,writable:!0,value:S}):Ke[G]=S;var w=(Ke,G,S)=>Mst(Ke,typeof G!="symbol"?G+"":G,S),mw=(Ke,G,S)=>G.has(Ke)||jD("Cannot "+S);var Q=(Ke,G,S)=>(mw(Ke,G,"read from private field"),S?S.call(Ke):G.get(Ke)),b=(Ke,G,S)=>G.has(Ke)?jD("Cannot add the same private member more than once"):G instanceof WeakSet?G.add(Ke):G.set(Ke,S),m=(Ke,G,S,gs)=>(mw(Ke,G,"write to private field"),gs?gs.call(Ke,S):G.set(Ke,S),S),I=(Ke,G,S)=>(mw(Ke,G,"access private method"),S);var Re=(Ke,G,S,gs)=>({set _(gB){m(Ke,G,gB,S)},get _(){return Q(Ke,G,gs)}});var mo,aU,Zo,hZ,AU,Io,rQ,I1,Zw,go,yR,bo,Eo,Oa,Pa,YR,Ro,rZ,mZ,TR,h2,HD,Vs,KD,vD,Xb,gS,LR,QU,ZQ,IQ,OD,PD,Iw,cU,oU,ZZ,FU,IZ,gZ,DR,Ks,bZ,g1,Wi,Co,XR,Qi,r2,qD,EZ,ia,RZ,Ei,ci,CZ,NZ,Bn,uZ,qa,as,No,uo,Vo,So,v0,_a,BU,jR,HR,VZ,KR,O0,Wo,SZ,po,P0,WZ,gQ,pZ,vR,Jo,UU,JZ,Go,OR,Xi,gl,bQ,xo,ko,PR,GZ,qR,wo,q0,EQ,_R,$R,$a,$t,b1,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l),eval:l=>l==="BUNDLE_VERSION"?"5.7.284":null};var gs=typeof document<"u"?document.currentScript:null;typeof Promise.withResolvers!="function"&&(Promise.withResolvers=function(){let l,t;return{promise:new this((i,s)=>{l=i,t=s}),resolve:l,reject:t}}),typeof Promise.try!="function"&&(Promise.try=function(l,...t){return new this(e=>{e(l(...t))})});const gB="auto",wJ=1,Ny=1.1,uy=.1,Vy=25,MJ=0,_j=1.25,Sy=40,Wy=5,Pi={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3},Je={UNKNOWN:-1,NONE:0,THUMBS:1,OUTLINE:2,ATTACHMENTS:3,LAYERS:4},NA={DISABLE:0,ENABLE:1,ENABLE_PERMISSIONS:2},Ge={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2,PAGE:3},xl={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2},un={SELECT:0,HAND:1,ZOOM:2},$j=/\bprint\s*\(/;function tH(l,t){let e=l.offsetParent;if(!e){console.error("offsetParent is not set -- cannot scroll");return}let i=l.offsetTop+l.clientTop,s=l.offsetLeft+l.clientLeft;for(;e.clientHeight===e.scrollHeight&&e.clientWidth===e.scrollWidth;)if(i+=e.offsetTop,s+=e.offsetLeft,e=e.offsetParent,!e)return;t&&(t.top!==void 0&&(i+=t.top),t.left!==void 0&&(s+=t.left,e.scrollLeft=s)),e.scrollTop=i}function py(l,t,e=void 0){const i=function(a){n||(n=window.requestAnimationFrame(function(){n=null;const d=l.scrollLeft,c=s.lastX;d!==c&&(s.right=d>c),s.lastX=d;const o=l.scrollTop,F=s.lastY;o!==F&&(s.down=o>F),s.lastY=o,t(s)}))},s={right:!0,down:!0,lastX:l.scrollLeft,lastY:l.scrollTop,_eventHandler:i};let n=null;return l.addEventListener("scroll",i,{useCapture:!0,signal:e}),e==null||e.addEventListener("abort",()=>window.cancelAnimationFrame(n),{once:!0}),s}function AE(l){const t=new Map;for(const[e,i]of new URLSearchParams(l))t.set(e.toLowerCase(),i);return t}const Jy=/[\x00-\x1F]/g;function Zm(l,t=!1){return Jy.test(l)?t?l.replaceAll(Jy,e=>e==="\0"?"":" "):l.replaceAll("\0",""):l}function uA(l,t,e=0){let i=e,s=l.length-1;if(s<0||!t(l[s]))return l.length;if(t(l[i]))return i;for(;i<s;){const n=i+s>>1,a=l[n];t(a)?s=n:i=n+1}return i}function Gy(l){if(Math.floor(l)===l)return[l,1];const t=1/l,e=8;if(t>e)return[1,e];if(Math.floor(t)===t)return[1,t];const i=l>1?t:l;let s=0,n=1,a=1,A=1;for(;;){const c=s+a,o=n+A;if(o>e)break;i<=c/o?(a=c,A=o):(s=c,n=o)}let d;return i-s/n<a/A-i?d=i===l?[s,n]:[n,s]:d=i===l?[a,A]:[A,a],d}function BW(l,t){return l-l%t}function eH({view:l,userUnit:t,rotate:e}){const[i,s,n,a]=l,A=e%180!==0,d=(n-i)/72*t,c=(a-s)/72*t;return{width:A?c:d,height:A?d:c}}function lH(l,t,e){if(l<2)return l;let i=t[l].div,s=i.offsetTop+i.clientTop;s>=e&&(i=t[l-1].div,s=i.offsetTop+i.clientTop);for(let n=l-2;n>=0&&(i=t[n].div,!(i.offsetTop+i.clientTop+i.clientHeight<=s));--n)l=n;return l}function xy({scrollEl:l,views:t,sortByVisibility:e=!1,horizontal:i=!1,rtl:s=!1}){const n=l.scrollTop,a=n+l.clientHeight,A=l.scrollLeft,d=A+l.clientWidth;function c(E){const R=E.div;return R.offsetTop+R.clientTop+R.clientHeight>n}function o(E){const R=E.div,N=R.offsetLeft+R.clientLeft,u=N+R.clientWidth;return s?N<d:u>A}const F=[],B=new Set,U=t.length;let h=uA(t,i?o:c);h>0&&h<U&&!i&&(h=lH(h,t,n));let r=i?d:-1;for(let E=h;E<U;E++){const R=t[E],N=R.div,u=N.offsetLeft+N.clientLeft,V=N.offsetTop+N.clientTop,W=N.clientWidth,J=N.clientHeight,p=u+W,x=V+J;if(r===-1)x>=a&&(r=x);else if((i?u:V)>r)break;if(x<=n||V>=a||p<=A||u>=d)continue;const k=Math.max(0,n-V),Y=Math.max(0,A-u),j=k+Math.max(0,x-a),K=Y+Math.max(0,p-d),lt=(J-j)/J,v=(W-K)/W,P=lt*v*100|0;F.push({id:R.id,x:u,y:V,visibleArea:P===100?null:{minX:Y,minY:k,maxX:Math.min(p,d)-u,maxY:Math.min(x,a)-V},view:R,percent:P,widthPercent:v*100|0}),B.add(R.id)}const Z=F[0],g=F.at(-1);return e&&F.sort(function(E,R){const N=E.percent-R.percent;return Math.abs(N)>.001?-N:E.id-R.id}),{first:Z,last:g,views:F,ids:B}}function ky(l){let t=Math.hypot(l.deltaX,l.deltaY);const e=Math.atan2(l.deltaY,l.deltaX);return-.25*Math.PI<e&&e<.75*Math.PI&&(t=-t),t}function iH(l){const t=l.deltaMode;let e=ky(l);const i=30,s=30;return t===WheelEvent.DOM_DELTA_PIXEL?e/=i*s:t===WheelEvent.DOM_DELTA_LINE&&(e/=s),e}function UW(l){return Number.isInteger(l)&&l%90===0}function wy(l){return Number.isInteger(l)&&Object.values(Ge).includes(l)&&l!==Ge.UNKNOWN}function My(l){return Number.isInteger(l)&&Object.values(xl).includes(l)&&l!==xl.UNKNOWN}function fJ(l){return l.width<=l.height}const sH=new Promise(function(l){if(typeof S<"u"&&S.test("LIB")&&typeof window>"u"){setTimeout(l,20);return}window.requestAnimationFrame(l)}),yJ=typeof S<"u"&&S.test("LIB")&&typeof document>"u"?null:document.documentElement.style;class nH{constructor(t){b(this,mo,null);b(this,aU,null);b(this,Zo,0);b(this,hZ,null);b(this,AU,!0);m(this,mo,t.classList),m(this,hZ,t.style)}get percent(){return Q(this,Zo)}set percent(t){if(m(this,Zo,t),isNaN(t)){Q(this,mo).add("indeterminate");return}Q(this,mo).remove("indeterminate"),Q(this,hZ).setProperty("--progressBar-percent",`${Q(this,Zo)}%`)}setWidth(t){if(!t)return;const i=t.parentNode.offsetWidth-t.offsetWidth;i>0&&Q(this,hZ).setProperty("--progressBar-end-offset",`${i}px`)}setDisableAutoFetch(t=5e3){Q(this,Zo)===100||isNaN(Q(this,Zo))||(Q(this,aU)&&clearTimeout(Q(this,aU)),this.show(),m(this,aU,setTimeout(()=>{m(this,aU,null),this.hide()},t)))}hide(){Q(this,AU)&&(m(this,AU,!1),Q(this,mo).add("hidden"))}show(){Q(this,AU)||(m(this,AU,!0),Q(this,mo).remove("hidden"))}}mo=new WeakMap,aU=new WeakMap,Zo=new WeakMap,hZ=new WeakMap,AU=new WeakMap;function fy(){let l=document,t=l.activeElement||l.querySelector(":focus");for(;t!=null&&t.shadowRoot;)l=t.shadowRoot,t=l.activeElement||l.querySelector(":focus");return t}function yy(l){let t=Ge.VERTICAL,e=xl.NONE;switch(l){case"SinglePage":t=Ge.PAGE;break;case"OneColumn":break;case"TwoPageLeft":t=Ge.PAGE;case"TwoColumnLeft":e=xl.ODD;break;case"TwoPageRight":t=Ge.PAGE;case"TwoColumnRight":e=xl.EVEN;break}return{scrollMode:t,spreadMode:e}}function aH(l){switch(l){case"UseNone":return Je.NONE;case"UseThumbs":return Je.THUMBS;case"UseOutlines":return Je.OUTLINE;case"UseAttachments":return Je.ATTACHMENTS;case"UseOC":return Je.LAYERS}return Je.NONE}function Pd(l,t,e=null){l.classList.toggle("toggled",t),l.setAttribute("aria-checked",t),e==null||e.classList.toggle("hidden",!t)}function hW(l,t,e=null){l.classList.toggle("selected",t),l.setAttribute("aria-selected",t),e==null||e.classList.toggle("hidden",!t)}function Ga(l,t,e=null){l.classList.toggle("toggled",t),l.setAttribute("aria-expanded",t),e==null||e.classList.toggle("hidden",!t)}const rW=typeof S<"u"&&S.test("MOZCENTRAL")?Math.fround:function(){if(typeof S<"u"&&S.test("LIB")&&typeof document>"u")return t=>t;const l=document.createElement("div");return l.style.width="round(down, calc(1.6666666666666665 * 792px), 1px)",l.style.width==="calc(1320px)"?Math.fround:t=>t}(),ke={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3};class mW{constructor(){w(this,"renderingId","");w(this,"renderTask",null);w(this,"resume",null);if((typeof S>"u"||S.test("TESTING"))&&this.constructor===mW)throw new Error("Cannot initialize RenderableView.")}get renderingState(){throw new Error("Abstract getter `renderingState` accessed")}set renderingState(t){throw new Error("Abstract setter `renderingState` accessed")}async draw(){throw new Error("Not implemented: draw")}}if(typeof S>"u"||S.test("GENERIC")){var bB=new Map;const{maxTouchPoints:l,platform:t,userAgent:e}=navigator,i=/Android/.test(e);(/\b(iPad|iPhone|iPod)(?=;)/.test(e)||t==="MacIntel"&&l>1||i)&&bB.set("maxCanvasPixels",5242880),i&&bB.set("useSystemFonts",!1)}const ct={BROWSER:1,VIEWER:2,API:4,WORKER:8,EVENT_DISPATCH:16,PREFERENCE:128},YJ={BOOLEAN:1,NUMBER:2,OBJECT:4,STRING:8,UNDEFINED:16},xa={allowedGlobalEvents:{value:null,kind:ct.BROWSER},canvasMaxAreaInBytes:{value:-1,kind:ct.BROWSER+ct.API},isInAutomation:{value:!1,kind:ct.BROWSER},localeProperties:{value:typeof S>"u"||S.test("GENERIC")?{lang:navigator.language||"en-US"}:null,kind:ct.BROWSER},maxCanvasDim:{value:32767,kind:ct.BROWSER+ct.VIEWER},nimbusDataStr:{value:"",kind:ct.BROWSER},supportsCaretBrowsingMode:{value:!1,kind:ct.BROWSER},supportsDocumentFonts:{value:!0,kind:ct.BROWSER},supportsIntegratedFind:{value:!1,kind:ct.BROWSER},supportsMouseWheelZoomCtrlKey:{value:!0,kind:ct.BROWSER},supportsMouseWheelZoomMetaKey:{value:!0,kind:ct.BROWSER},supportsPinchToZoom:{value:!0,kind:ct.BROWSER},supportsPrinting:{value:!0,kind:ct.BROWSER},toolbarDensity:{value:0,kind:ct.BROWSER+ct.EVENT_DISPATCH},altTextLearnMoreUrl:{value:typeof S<"u"&&S.test("MOZCENTRAL")?"https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/pdf-alt-text":"",kind:ct.VIEWER+ct.PREFERENCE},annotationEditorMode:{value:0,kind:ct.VIEWER+ct.PREFERENCE},annotationMode:{value:2,kind:ct.VIEWER+ct.PREFERENCE},capCanvasAreaFactor:{value:200,kind:ct.VIEWER+ct.PREFERENCE},commentLearnMoreUrl:{value:typeof S>"u"||S.test("MOZCENTRAL")?"https://support.mozilla.org/%LOCALE%/kb/view-pdf-files-firefox-or-choose-another-viewer#w_add-a-comment-to-a-pdf":"",kind:ct.VIEWER+ct.PREFERENCE},cursorToolOnLoad:{value:0,kind:ct.VIEWER+ct.PREFERENCE},debuggerSrc:{value:"./debugger.mjs",kind:ct.VIEWER},defaultZoomDelay:{value:400,kind:ct.VIEWER+ct.PREFERENCE},defaultZoomValue:{value:"",kind:ct.VIEWER+ct.PREFERENCE},disableHistory:{value:!1,kind:ct.VIEWER},disablePageLabels:{value:!1,kind:ct.VIEWER+ct.PREFERENCE},enableAltText:{value:!1,kind:ct.VIEWER+ct.PREFERENCE},enableAltTextModelDownload:{value:!0,kind:ct.VIEWER+ct.PREFERENCE+ct.EVENT_DISPATCH},enableAutoLinking:{value:!0,kind:ct.VIEWER+ct.PREFERENCE},enableComment:{value:typeof S>"u",kind:ct.VIEWER+ct.PREFERENCE},enableDetailCanvas:{value:!0,kind:ct.VIEWER},enableGuessAltText:{value:!0,kind:ct.VIEWER+ct.PREFERENCE+ct.EVENT_DISPATCH},enableHighlightFloatingButton:{value:typeof S>"u"||S.test("TESTING"),kind:ct.VIEWER+ct.PREFERENCE},enableMerge:{value:typeof S>"u"||S.test("TESTING"),kind:ct.VIEWER+ct.PREFERENCE},enableNewAltTextWhenAddingImage:{value:!0,kind:ct.VIEWER+ct.PREFERENCE},enableNewBadge:{value:typeof S>"u"||S.test("MOZCENTRAL"),kind:ct.VIEWER+ct.PREFERENCE},enableOptimizedPartialRendering:{value:!1,kind:ct.VIEWER+ct.PREFERENCE},enablePermissions:{value:!1,kind:ct.VIEWER+ct.PREFERENCE},enablePrintAutoRotate:{value:!0,kind:ct.VIEWER+ct.PREFERENCE},enableScripting:{value:typeof S>"u"||!S.test("CHROME"),kind:ct.VIEWER+ct.PREFERENCE},enableSignatureEditor:{value:typeof S>"u"||S.test("TESTING"),kind:ct.VIEWER+ct.PREFERENCE},enableSplitMerge:{value:typeof S>"u"||S.test("TESTING"),kind:ct.VIEWER+ct.PREFERENCE},enableUpdatedAddImage:{value:!1,kind:ct.VIEWER+ct.PREFERENCE},externalLinkRel:{value:"noopener noreferrer nofollow",kind:ct.VIEWER},externalLinkTarget:{value:0,kind:ct.VIEWER+ct.PREFERENCE},highlightEditorColors:{value:"yellow=#FFFF98,green=#53FFBC,blue=#80EBFF,pink=#FFCBE6,red=#FF4F5F,yellow_HCM=#FFFFCC,green_HCM=#53FFBC,blue_HCM=#80EBFF,pink_HCM=#F6B8FF,red_HCM=#C50043",kind:ct.VIEWER+ct.PREFERENCE},historyUpdateUrl:{value:!1,kind:ct.VIEWER+ct.PREFERENCE},ignoreDestinationZoom:{value:!1,kind:ct.VIEWER+ct.PREFERENCE},imageResourcesPath:{value:typeof S<"u"&&S.test("MOZCENTRAL")?"resource://pdf.js/web/images/":"./images/",kind:ct.VIEWER},imagesRightClickMinSize:{value:typeof S<"u"&&S.test("MOZCENTRAL && !GECKOVIEW")?16:-1,kind:ct.VIEWER+ct.PREFERENCE},maxCanvasPixels:{value:2**25,kind:ct.VIEWER},minDurationToUpdateCanvas:{value:500,kind:ct.VIEWER},forcePageColors:{value:!1,kind:ct.VIEWER+ct.PREFERENCE},pageColorsBackground:{value:"Canvas",kind:ct.VIEWER+ct.PREFERENCE},pageColorsForeground:{value:"CanvasText",kind:ct.VIEWER+ct.PREFERENCE},pdfBugEnabled:{value:typeof S>"u"||S.test("TESTING"),kind:ct.VIEWER+ct.PREFERENCE},printResolution:{value:150,kind:ct.VIEWER},sidebarViewOnLoad:{value:-1,kind:ct.VIEWER+ct.PREFERENCE},scrollModeOnLoad:{value:-1,kind:ct.VIEWER+ct.PREFERENCE},spreadModeOnLoad:{value:-1,kind:ct.VIEWER+ct.PREFERENCE},textLayerMode:{value:1,kind:ct.VIEWER+ct.PREFERENCE},viewerCssTheme:{value:typeof S<"u"&&S.test("CHROME")?2:0,kind:ct.VIEWER+ct.PREFERENCE},viewOnLoad:{value:0,kind:ct.VIEWER+ct.PREFERENCE},cMapPacked:{value:!0,kind:ct.API},cMapUrl:{value:typeof S>"u"?"../external/bcmaps/":S.test("MOZCENTRAL")?"resource://pdf.js/web/cmaps/":"../web/cmaps/",kind:ct.API},disableAutoFetch:{value:!1,kind:ct.API+ct.PREFERENCE},disableFontFace:{value:!1,kind:ct.API+ct.PREFERENCE},disableRange:{value:!1,kind:ct.API+ct.PREFERENCE},disableStream:{value:!1,kind:ct.API+ct.PREFERENCE},docBaseUrl:{value:typeof S>"u"?document.URL.split("#",1)[0]:"",kind:ct.API},enableHWA:{value:!0,kind:ct.API+ct.PREFERENCE},enableWebGPU:{value:!0,kind:ct.API+ct.PREFERENCE},enableXfa:{value:!0,kind:ct.API+ct.PREFERENCE},fontExtraProperties:{value:!1,kind:ct.API},iccUrl:{value:typeof S>"u"?"../external/iccs/":S.test("MOZCENTRAL")?"resource://pdf.js/web/iccs/":"../web/iccs/",kind:ct.API},isOffscreenCanvasSupported:{value:!0,kind:ct.API},maxImageSize:{value:-1,kind:ct.API},pdfBug:{value:!1,kind:ct.API},standardFontDataUrl:{value:typeof S>"u"?"../external/standard_fonts/":S.test("MOZCENTRAL")?"resource://pdf.js/web/standard_fonts/":"../web/standard_fonts/",kind:ct.API},useSystemFonts:{value:(typeof S>"u"?window.isGECKOVIEW:S.test("GECKOVIEW"))?!1:void 0,kind:ct.API,type:YJ.BOOLEAN+YJ.UNDEFINED},verbosity:{value:1,kind:ct.API},wasmUrl:{value:typeof S<"u"&&S.test("MOZCENTRAL")?"resource://pdf.js/web/wasm/":"../web/wasm/",kind:ct.API},workerPort:{value:typeof S<"u"&&S.test("MOZCENTRAL")&&globalThis.pdfjsPreloadedWorker||null,kind:ct.WORKER},workerSrc:{value:typeof S>"u"?"../src/pdf.worker.js":S.test("MOZCENTRAL")?"resource://pdf.js/build/pdf.worker.mjs":"../build/pdf.worker.mjs",kind:ct.WORKER}};if((typeof S>"u"||!S.test("MOZCENTRAL"))&&(xa.defaultUrl={value:typeof S<"u"&&S.test("CHROME")?"":"compressed.tracemonkey-pldi-09.pdf",kind:ct.VIEWER},xa.sandboxBundleSrc={value:typeof S>"u"?"../build/dev-sandbox/pdf.sandbox.mjs":"../build/pdf.sandbox.mjs",kind:ct.VIEWER},xa.enableFakeMLManager={value:!0,kind:ct.VIEWER}),typeof S>"u"||S.test("GENERIC")?xa.disablePreferences={value:typeof S<"u"&&S.test("TESTING"),kind:ct.VIEWER}:S.test("CHROME")&&(xa.disableTelemetry={value:!1,kind:ct.VIEWER+ct.PREFERENCE}),typeof S>"u"||S.test("TESTING"))for(const l in xa){const{value:t,kind:e,type:i}=xa[l];if(e&ct.PREFERENCE){if(e===ct.PREFERENCE)throw new Error(`Cannot use only "PREFERENCE" kind: ${l}`);if(e&ct.BROWSER)throw new Error(`Cannot mix "PREFERENCE" and "BROWSER" kind: ${l}`);if(i!==void 0)throw new Error(`Cannot have \`type\`-field for "PREFERENCE" kind: ${l}`);if(typeof bB=="object"&&bB.has(l))throw new Error(`Should not have compatibility-value for "PREFERENCE" kind: ${l}`);if(typeof t!="boolean"&&typeof t!="string"&&!Number.isInteger(t))throw new Error(`Invalid value for "PREFERENCE" kind: ${l}`)}else if(e&ct.BROWSER){if(i!==void 0)throw new Error(`Cannot have \`type\`-field for "BROWSER" kind: ${l}`);if(typeof bB=="object"&&bB.has(l))throw new Error(`Should not have compatibility-value for "BROWSER" kind: ${l}`);if(t===void 0)throw new Error(`Invalid value for "BROWSER" kind: ${l}`)}}const K0=class K0{constructor(){if(typeof S>"u"||S.test("TESTING"))throw new Error("Cannot initialize AppOptions.")}static get(t){return Q(this,Io).get(t)}static getAll(t=null,e=!1){const i=Object.create(null);for(const s in xa){const n=xa[s];t&&!(t&n.kind)||(i[s]=e?n.value:Q(this,Io).get(s))}return i}static set(t,e){this.setAll({[t]:e})}static setAll(t,e=!1){(typeof S>"u"||S.test("GENERIC"))&&(this._hasInvokedSet||(this._hasInvokedSet=!0));let i;for(const s in t){const n=xa[s],a=t[s];if(!n||!(typeof a==typeof n.value||YJ[(typeof a).toUpperCase()]&n.type))continue;const{kind:A}=n;e&&!(A&ct.BROWSER||A&ct.PREFERENCE)||(this.eventBus&&A&ct.EVENT_DISPATCH&&(i||(i=new Map)).set(s,a),Q(this,Io).set(s,a))}if(i)for(const[s,n]of i)this.eventBus.dispatch(s.toLowerCase(),{source:this,value:n})}};Io=new WeakMap,w(K0,"eventBus"),b(K0,Io,new Map),(()=>{for(const t in xa)Q(K0,Io).set(t,xa[t].value);if(typeof S>"u"||S.test("GENERIC")){for(const[t,e]of bB)Q(K0,Io).set(t,e);K0._hasInvokedSet=!1,K0._checkDisablePreferences=()=>K0.get("disablePreferences")?!0:(K0._hasInvokedSet&&console.warn('The Preferences may override manually set AppOptions; please use the "disablePreferences"-option to prevent that.'),!1)}})();let Wt=K0;const vn=(typeof S>"u"||S.test("GENERIC"))&&typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),fs=[1/0,1/0,-1/0,-1/0],VA=new Float32Array(fs),p0=[.001,0,0,.001,0,0],On=1.35,ZW=.35,Yy=ZW/On,ul={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},ki={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},EB="pdfjs_internal_editor_",Xt={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15,POPUP:16,SIGNATURE:101,COMMENT:102},ue={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,INK_COLOR_AND_OPACITY:24,HIGHLIGHT_COLOR:31,HIGHLIGHT_THICKNESS:32,HIGHLIGHT_FREE:33,HIGHLIGHT_SHOW_ALL:34,DRAW_STEP:41},J0={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},SA={TRIANGLES:1,LATTICE:2,PATCH:3},Vi={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},ni={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},Yl={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},TJ={GROUP:"Group",REPLY:"R"},wi={INVISIBLE:1,HIDDEN:2,PRINT:4,NOROTATE:16,NOVIEW:32,LOCKED:128,LOCKEDCONTENTS:512},WA={READONLY:1,REQUIRED:2,MULTILINE:4096,PASSWORD:8192,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,FILESELECT:1048576,MULTISELECT:2097152,DONOTSCROLL:8388608,COMB:16777216},ka={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},Ty={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},AH={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},dH={O:"PageOpen",C:"PageClose"},RB={ERRORS:0,WARNINGS:1,INFOS:5},f={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93,rawFillPath:94},Al={moveTo:0,lineTo:1,curveTo:2,quadraticCurveTo:3,closePath:4},dE={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let IW=RB.WARNINGS;function Ly(l){Number.isInteger(l)&&(IW=l)}function Dy(){return IW}function fe(l){IW>=RB.INFOS&&console.info(`Info: ${l}`)}function M(l){IW>=RB.WARNINGS&&console.warn(`Warning: ${l}`)}function Lt(l){throw new Error(l)}function Tt(l,t){l||Lt(t)}function QH(l){switch(l==null?void 0:l.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function qd(l,t=null,e=null){if(!l)return null;if(e&&typeof l=="string"){if(e.addDefaultProtocol&&l.startsWith("www.")){const s=l.match(/\./g);(s==null?void 0:s.length)>=2&&(l=`http://${l}`)}if(e.tryConvertEncoding)try{l=bm(l)}catch{}}const i=t?URL.parse(l,t):URL.parse(l);return QH(i)?i:null}function _d(l,t,e=!1){const i=URL.parse(l);return i?(i.hash=t,i.href):e&&qd(l,"http://example.com")?l.split("#",1)[0]+`${t?`#${t}`:""}`:""}function gW(l){return l.substring(l.lastIndexOf("/")+1)}function nt(l,t,e,i=!1){return(typeof S>"u"||S.test("TESTING"))&&Tt(t in l,`shadow: Property "${t&&t.toString()}" not found in object.`),Object.defineProperty(l,t,{value:e,enumerable:!i,configurable:!0,writable:!1}),e}const ys=function(){function t(e,i){(typeof S>"u"||S.test("TESTING"))&&this.constructor===t&&Lt("Cannot initialize BaseException."),this.message=e,this.name=i}return t.prototype=new Error,t.constructor=t,t}();class Im extends ys{constructor(t,e){super(t,"PasswordException"),this.code=e}}class LJ extends ys{constructor(t,e){super(t,"UnknownErrorException"),this.details=e}}class Oc extends ys{constructor(t){super(t,"InvalidPDFException")}}class gm extends ys{constructor(t,e,i){super(t,"ResponseException"),this.status=e,this.missing=i}}class at extends ys{constructor(t){super(t,"FormatError")}}class Tl extends ys{constructor(t){super(t,"AbortException")}}function an(l){(typeof l!="object"||(l==null?void 0:l.length)===void 0)&&Lt("Invalid argument for bytesToString");const t=l.length,e=8192;if(t<e)return String.fromCharCode.apply(null,l);const i=[];for(let s=0;s<t;s+=e){const n=Math.min(s+e,t),a=l.subarray(s,n);i.push(String.fromCharCode.apply(null,a))}return i.join("")}function vl(l){typeof l!="string"&&Lt("Invalid argument for stringToBytes");const t=l.length,e=new Uint8Array(t);for(let i=0;i<t;++i)e[i]=l.charCodeAt(i)&255;return e}function DJ(l){return Object.keys(l).length}function cH(){const l=new Uint8Array(4);return l[0]=1,new Uint32Array(l.buffer,0,1)[0]===1}class De{static get isLittleEndian(){return nt(this,"isLittleEndian",cH())}static get isOffscreenCanvasSupported(){return nt(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get isImageDecoderSupported(){return nt(this,"isImageDecoderSupported",typeof ImageDecoder<"u")}static get isFloat16ArraySupported(){return nt(this,"isFloat16ArraySupported",typeof Float16Array<"u")}static get isSanitizerSupported(){return nt(this,"isSanitizerSupported",typeof Sanitizer<"u")}static get platform(){const{platform:t,userAgent:e}=navigator;return nt(this,"platform",{isAndroid:e.includes("Android"),isLinux:t.includes("Linux"),isMac:t.includes("Mac"),isWindows:t.includes("Win"),isFirefox:typeof S<"u"&&S.test("MOZCENTRAL")||e.includes("Firefox")})}static get isCSSRoundSupported(){var t,e;return nt(this,"isCSSRoundSupported",(e=(t=globalThis.CSS)==null?void 0:t.supports)==null?void 0:e.call(t,"width: round(1.5px, 1px)"))}static get isAlphaColorInputSupported(){return nt(this,"isAlphaColorInputSupported",(()=>{if(typeof document>"u")return!1;const t=document.createElement("input");return t.type="color",t.setAttribute("alpha",""),t.value="#ff000080",t.value!=="#ff0000"})())}}class It{static get hexNums(){return nt(this,"hexNums",Array.from(Array(256).keys(),t=>t.toString(16).padStart(2,"0")))}static makeHexColor(t,e,i){return`#${this.hexNums[t]}${this.hexNums[e]}${this.hexNums[i]}`}static domMatrixToTransform(t){return[t.a,t.b,t.c,t.d,t.e,t.f]}static scaleMinMax(t,e){let i;t[0]?(t[0]<0&&(i=e[0],e[0]=e[2],e[2]=i),e[0]*=t[0],e[2]*=t[0],t[3]<0&&(i=e[1],e[1]=e[3],e[3]=i),e[1]*=t[3],e[3]*=t[3]):(i=e[0],e[0]=e[1],e[1]=i,i=e[2],e[2]=e[3],e[3]=i,t[1]<0&&(i=e[1],e[1]=e[3],e[3]=i),e[1]*=t[1],e[3]*=t[1],t[2]<0&&(i=e[0],e[0]=e[2],e[2]=i),e[0]*=t[2],e[2]*=t[2]),e[0]+=t[4],e[1]+=t[5],e[2]+=t[4],e[3]+=t[5]}static transform(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}static multiplyByDOMMatrix(t,e){return[t[0]*e.a+t[2]*e.b,t[1]*e.a+t[3]*e.b,t[0]*e.c+t[2]*e.d,t[1]*e.c+t[3]*e.d,t[0]*e.e+t[2]*e.f+t[4],t[1]*e.e+t[3]*e.f+t[5]]}static applyTransform(t,e,i=0){const s=t[i],n=t[i+1];t[i]=s*e[0]+n*e[2]+e[4],t[i+1]=s*e[1]+n*e[3]+e[5]}static applyTransformToBezier(t,e,i=0){const s=e[0],n=e[1],a=e[2],A=e[3],d=e[4],c=e[5];for(let o=0;o<6;o+=2){const F=t[i+o],B=t[i+o+1];t[i+o]=F*s+B*a+d,t[i+o+1]=F*n+B*A+c}}static applyInverseTransform(t,e){const i=t[0],s=t[1],n=e[0]*e[3]-e[1]*e[2];t[0]=(i*e[3]-s*e[2]+e[2]*e[5]-e[4]*e[3])/n,t[1]=(-i*e[1]+s*e[0]+e[4]*e[1]-e[5]*e[0])/n}static axialAlignedBoundingBox(t,e,i){const s=e[0],n=e[1],a=e[2],A=e[3],d=e[4],c=e[5],o=t[0],F=t[1],B=t[2],U=t[3];let h=s*o+d,r=h,Z=s*B+d,g=Z,E=A*F+c,R=E,N=A*U+c,u=N;if(n!==0||a!==0){const V=n*o,W=n*B,J=a*F,p=a*U;h+=J,g+=J,Z+=p,r+=p,E+=V,u+=V,N+=W,R+=W}i[0]=Math.min(i[0],h,Z,r,g),i[1]=Math.min(i[1],E,N,R,u),i[2]=Math.max(i[2],h,Z,r,g),i[3]=Math.max(i[3],E,N,R,u)}static inverseTransform(t){const e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}static singularValueDecompose2dScale(t,e){const i=t[0],s=t[1],n=t[2],a=t[3],A=i**2+s**2,d=i*n+s*a,c=n**2+a**2,o=(A+c)/2,F=Math.sqrt(o**2-(A*c-d**2));e[0]=Math.sqrt(o+F||1),e[1]=Math.sqrt(o-F||1)}static normalizeRect(t){const e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[1]>t[3]&&(e[1]=t[3],e[3]=t[1]),e}static intersect(t,e){const i=Math.max(Math.min(t[0],t[2]),Math.min(e[0],e[2])),s=Math.min(Math.max(t[0],t[2]),Math.max(e[0],e[2]));if(i>s)return null;const n=Math.max(Math.min(t[1],t[3]),Math.min(e[1],e[3])),a=Math.min(Math.max(t[1],t[3]),Math.max(e[1],e[3]));return n>a?null:[i,n,s,a]}static pointBoundingBox(t,e,i){i[0]=Math.min(i[0],t),i[1]=Math.min(i[1],e),i[2]=Math.max(i[2],t),i[3]=Math.max(i[3],e)}static rectBoundingBox(t,e,i,s,n){n[0]=Math.min(n[0],t,i),n[1]=Math.min(n[1],e,s),n[2]=Math.max(n[2],t,i),n[3]=Math.max(n[3],e,s)}static bezierBoundingBox(t,e,i,s,n,a,A,d,c){c[0]=Math.min(c[0],t,A),c[1]=Math.min(c[1],e,d),c[2]=Math.max(c[2],t,A),c[3]=Math.max(c[3],e,d),I(this,rQ,Zw).call(this,t,i,n,A,e,s,a,d,3*(-t+3*(i-n)+A),6*(t-2*i+n),3*(i-t),c),I(this,rQ,Zw).call(this,t,i,n,A,e,s,a,d,3*(-e+3*(s-a)+d),6*(e-2*s+a),3*(s-e),c)}}rQ=new WeakSet,I1=function(t,e,i,s,n,a,A,d,c,o){if(c<=0||c>=1)return;const F=1-c,B=c*c,U=B*c,h=F*(F*(F*t+3*c*e)+3*B*i)+U*s,r=F*(F*(F*n+3*c*a)+3*B*A)+U*d;o[0]=Math.min(o[0],h),o[1]=Math.min(o[1],r),o[2]=Math.max(o[2],h),o[3]=Math.max(o[3],r)},Zw=function(t,e,i,s,n,a,A,d,c,o,F,B){if(Math.abs(c)<1e-12){Math.abs(o)>=1e-12&&I(this,rQ,I1).call(this,t,e,i,s,n,a,A,d,-F/o,B);return}const U=o**2-4*F*c;if(U<0)return;const h=Math.sqrt(U),r=2*c;I(this,rQ,I1).call(this,t,e,i,s,n,a,A,d,(-o+h)/r,B),I(this,rQ,I1).call(this,t,e,i,s,n,a,A,d,(-o-h)/r,B)},b(It,rQ);const oH=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function Me(l,t=!1){if(l[0]>="ï"){let i;if(l[0]==="þ"&&l[1]==="ÿ"?(i="utf-16be",l.length%2===1&&(l=l.slice(0,-1))):l[0]==="ÿ"&&l[1]==="þ"?(i="utf-16le",l.length%2===1&&(l=l.slice(0,-1))):l[0]==="ï"&&l[1]==="»"&&l[2]==="¿"&&(i="utf-8"),i)try{const s=new TextDecoder(i,{fatal:!0}),n=vl(l),a=s.decode(n);return t||!a.includes("\x1B")?a:a.replaceAll(/\x1b[^\x1b]*(?:\x1b|$)/g,"")}catch(s){M(`stringToPDFString: "${s}".`)}}const e=[];for(let i=0,s=l.length;i<s;i++){const n=l.charCodeAt(i);if(!t&&n===27){for(;++i<s&&l.charCodeAt(i)!==27;);continue}const a=oH[n];e.push(a?String.fromCharCode(a):l.charAt(i))}return e.join("")}function bm(l){return decodeURIComponent(escape(l))}function XJ(l){return unescape(encodeURIComponent(l))}function QE(l,t){if(l.length!==t.length)return!1;for(let e=0,i=l.length;e<i;e++)if(l[e]!==t[e])return!1;return!0}function Pc(l=new Date){return l instanceof Date||(l=new Date(l)),[l.getUTCFullYear().toString(),(l.getUTCMonth()+1).toString().padStart(2,"0"),l.getUTCDate().toString().padStart(2,"0"),l.getUTCHours().toString().padStart(2,"0"),l.getUTCMinutes().toString().padStart(2,"0"),l.getUTCSeconds().toString().padStart(2,"0")].join("")}let zJ=null,Xy=null;function bW(l){return zJ||(zJ=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,Xy=new Map([["ſt","ſt"]])),l.replaceAll(zJ,(t,e,i)=>e?e.normalize("NFKC"):Xy.get(i))}function EW(){if(typeof S<"u"&&S.test("MOZCENTRAL")||typeof crypto.randomUUID=="function")return crypto.randomUUID();const l=new Uint8Array(32);return crypto.getRandomValues(l),an(l)}const CB="pdfjs_internal_id_";function zy(l,t,e){if(!Array.isArray(e)||e.length<2)return!1;const[i,s,...n]=e;if(!l(i)&&!Number.isInteger(i)||!t(s))return!1;const a=n.length;let A=!0;switch(s.name){case"XYZ":if(a<2||a>3)return!1;break;case"Fit":case"FitB":return a===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(a>1)return!1;break;case"FitR":if(a!==4)return!1;A=!1;break;default:return!1}for(const d of n)if(!(typeof d=="number"||A&&d===null))return!1;return!0}const $d=()=>[],Em=()=>new Map,cE=()=>Object.create(null);typeof S<"u"&&!S.test("SKIP_BABEL")&&typeof Blob.prototype.bytes!="function"&&(Blob.prototype.bytes=async function(){return new Uint8Array(await this.arrayBuffer())}),typeof S<"u"&&!S.test("SKIP_BABEL")&&typeof Response.prototype.bytes!="function"&&(Response.prototype.bytes=async function(){return new Uint8Array(await this.arrayBuffer())}),typeof S<"u"&&!S.test("SKIP_BABEL")&&typeof AbortSignal.any!="function"&&(AbortSignal.any=function(l){const t=new AbortController,{signal:e}=t;for(const i of l)if(i.aborted)return t.abort(i.reason),e;for(const i of l)i.addEventListener("abort",()=>{t.abort(i.reason)},{signal:e});return e});function Ve(l,t,e){return Math.min(Math.max(l,t),e)}class oE{static textContent(t){const e=[],i={items:e,styles:Object.create(null)};function s(n){var d;if(!n)return;let a=null;const A=n.name;if(A==="#text")a=n.value;else if(oE.shouldBuildText(A))(d=n==null?void 0:n.attributes)!=null&&d.textContent?a=n.attributes.textContent:n.value&&(a=n.value);else return;if(a!==null&&e.push({str:a}),!!n.children)for(const c of n.children)s(c)}return s(t),i}static shouldBuildText(t){return!(t==="textarea"||t==="input"||t==="option"||t==="select")}}class Rm{static setupStorage(t,e,i,s,n){const a=s.getValue(e,{value:null});switch(i.name){case"textarea":if(a.value!==null&&(t.textContent=a.value),n==="print")break;t.addEventListener("input",A=>{s.setValue(e,{value:A.target.value})});break;case"input":if(i.attributes.type==="radio"||i.attributes.type==="checkbox"){if(a.value===i.attributes.xfaOn?t.setAttribute("checked",!0):a.value===i.attributes.xfaOff&&t.removeAttribute("checked"),n==="print")break;t.addEventListener("change",A=>{s.setValue(e,{value:A.target.checked?A.target.getAttribute("xfaOn"):A.target.getAttribute("xfaOff")})})}else{if(a.value!==null&&t.setAttribute("value",a.value),n==="print")break;t.addEventListener("input",A=>{s.setValue(e,{value:A.target.value})})}break;case"select":if(a.value!==null){t.setAttribute("value",a.value);for(const A of i.children)A.attributes.value===a.value?A.attributes.selected=!0:Object.hasOwn(A.attributes,"selected")&&delete A.attributes.selected}t.addEventListener("input",A=>{const d=A.target.options,c=d.selectedIndex===-1?"":d[d.selectedIndex].value;s.setValue(e,{value:c})});break}}static setAttributes({html:t,element:e,storage:i=null,intent:s,linkService:n}){const{attributes:a}=e,A=t instanceof HTMLAnchorElement;a.type==="radio"&&(a.name=`${a.name}-${s}`);for(const[d,c]of Object.entries(a))if(c!=null)switch(d){case"class":c.length&&t.setAttribute(d,c.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",c);break;case"style":Object.assign(t.style,c);break;case"textContent":t.textContent=c;break;default:(!A||d!=="href"&&d!=="newWindow")&&t.setAttribute(d,c)}A&&n.addLinkAttributes(t,a.href,a.newWindow),i&&a.dataId&&this.setupStorage(t,a.dataId,e,i)}static render(t){var F,B;const e=t.annotationStorage,i=t.linkService,s=t.xfaHtml,n=t.intent||"display",a=document.createElement(s.name);s.attributes&&this.setAttributes({html:a,element:s,intent:n,linkService:i});const A=n!=="richText",d=t.div;if(d.append(a),t.viewport){const U=`matrix(${t.viewport.transform.join(",")})`;d.style.transform=U}A&&d.setAttribute("class","xfaLayer xfaFont");const c=[];if(s.children.length===0){if(s.value){const U=document.createTextNode(s.value);a.append(U),A&&oE.shouldBuildText(s.name)&&c.push(U)}return{textDivs:c}}const o=[[s,-1,a]];for(;o.length>0;){const[U,h,r]=o.at(-1);if(h+1===U.children.length){o.pop();continue}const Z=U.children[++o.at(-1)[1]];if(Z===null)continue;const{name:g}=Z;if(g==="#text"){const R=document.createTextNode(Z.value);c.push(R),r.append(R);continue}const E=(F=Z==null?void 0:Z.attributes)!=null&&F.xmlns?document.createElementNS(Z.attributes.xmlns,g):document.createElement(g);if(r.append(E),Z.attributes&&this.setAttributes({html:E,element:Z,storage:e,intent:n,linkService:i}),((B=Z.children)==null?void 0:B.length)>0)o.push([Z,-1,E]);else if(Z.value){const R=document.createTextNode(Z.value);A&&oE.shouldBuildText(g)&&c.push(R),E.append(R)}}for(const U of d.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))U.setAttribute("readOnly",!0);return{textDivs:c}}static update(t){const e=`matrix(${t.viewport.transform.join(",")})`;t.div.style.transform=e,t.div.hidden=!1}}const tQ="http://www.w3.org/2000/svg",dU=class dU{};w(dU,"CSS",96),w(dU,"PDF",72),w(dU,"PDF_TO_CSS_UNITS",dU.CSS/dU.PDF);let Mi=dU;async function NB(l,t="text"){if(typeof S<"u"&&S.test("MOZCENTRAL")||BE(l,document.baseURI)){const e=await fetch(l);if(!e.ok)throw new Error(e.statusText);switch(t){case"blob":return e.blob();case"bytes":return e.bytes();case"json":return e.json()}return e.text()}return new Promise((e,i)=>{const s=new XMLHttpRequest;s.open("GET",l,!0),s.responseType=t==="bytes"?"arraybuffer":t,s.onreadystatechange=()=>{if(s.readyState===XMLHttpRequest.DONE){if(s.status===200||s.status===0){switch(t){case"bytes":e(new Uint8Array(s.response));return;case"blob":case"json":e(s.response);return}e(s.responseText);return}i(new Error(s.statusText))}},s.send(null)})}class FE{constructor({viewBox:t,userUnit:e,scale:i,rotation:s,offsetX:n=0,offsetY:a=0,dontFlip:A=!1}){this.viewBox=t,this.userUnit=e,this.scale=i,this.rotation=s,this.offsetX=n,this.offsetY=a,i*=e;const d=(t[2]+t[0])/2,c=(t[3]+t[1])/2;let o,F,B,U;switch(s%=360,s<0&&(s+=360),s){case 180:o=-1,F=0,B=0,U=1;break;case 90:o=0,F=1,B=1,U=0;break;case 270:o=0,F=-1,B=-1,U=0;break;case 0:o=1,F=0,B=0,U=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}A&&(B=-B,U=-U);let h,r,Z,g;o===0?(h=Math.abs(c-t[1])*i+n,r=Math.abs(d-t[0])*i+a,Z=(t[3]-t[1])*i,g=(t[2]-t[0])*i):(h=Math.abs(d-t[0])*i+n,r=Math.abs(c-t[1])*i+a,Z=(t[2]-t[0])*i,g=(t[3]-t[1])*i),this.transform=[o*i,F*i,B*i,U*i,h-o*i*d-B*i*c,r-F*i*d-U*i*c],this.width=Z,this.height=g}get rawDims(){const t=this.viewBox;return nt(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}clone({scale:t=this.scale,rotation:e=this.rotation,offsetX:i=this.offsetX,offsetY:s=this.offsetY,dontFlip:n=!1}={}){return new FE({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:t,rotation:e,offsetX:i,offsetY:s,dontFlip:n})}convertToViewportPoint(t,e){const i=[t,e];return It.applyTransform(i,this.transform),i}convertToViewportRectangle(t){const e=[t[0],t[1]];It.applyTransform(e,this.transform);const i=[t[2],t[3]];return It.applyTransform(i,this.transform),[e[0],e[1],i[0],i[1]]}convertToPdfPoint(t,e){const i=[t,e];return It.applyInverseTransform(i,this.transform),i}}class eQ extends ys{constructor(t,e=0){super(t,"RenderingCancelledException"),this.extraDelay=e}}function uB(l){const t=l.length;let e=0;for(;e<t&&l[e].trim()==="";)e++;return l.substring(e,e+5).toLowerCase()==="data:"}function Cm(l){return typeof l=="string"&&/\.pdf$/i.test(l)}function jJ(l){return[l]=l.split(/[#?]/,1),gW(l)}function RW(l,t="document.pdf"){if(typeof l!="string")return t;if(uB(l))return M('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;const i=(A=>{try{return new URL(A)}catch{try{return new URL(decodeURIComponent(A))}catch{try{return new URL(A,"https://foo.bar")}catch{try{return new URL(decodeURIComponent(A),"https://foo.bar")}catch{return null}}}}})(l);if(!i)return t;const s=A=>{try{let d=decodeURIComponent(A);return d.includes("/")&&(d=gW(d),/^\.pdf$/i.test(d))?A:d}catch{return A}},n=/\.pdf$/i,a=gW(i.pathname);if(n.test(a))return s(a);if(i.searchParams.size>0){const A=c=>[...c].findLast(o=>n.test(o)),d=A(i.searchParams.values())??A(i.searchParams.keys());if(d)return s(d)}if(i.hash){const d=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i.exec(i.hash);if(d)return s(d[0])}return t}class jy{constructor(){b(this,go,new Map);w(this,"times",[])}time(t){Q(this,go).has(t)&&M(`Timer is already running for ${t}`),Q(this,go).set(t,Date.now())}timeEnd(t){Q(this,go).has(t)||M(`Timer has not been started for ${t}`),this.times.push({name:t,start:Q(this,go).get(t),end:Date.now()}),Q(this,go).delete(t)}toString(){const t=Math.max(...this.times.map(e=>e.name.length));return this.times.map(e=>`${e.name.padEnd(t)} ${e.end-e.start}ms
`).join("")}}go=new WeakMap;function BE(l,t){if(typeof S<"u"&&S.test("MOZCENTRAL"))throw new Error("Not implemented: isValidFetchUrl");const e=t?URL.parse(l,t):URL.parse(l);return/https?:/.test((e==null?void 0:e.protocol)??"")}function ai(l){l.preventDefault()}function _t(l){l.preventDefault(),l.stopPropagation()}function FH(l){console.log("Deprecated API usage: "+l)}class G0{static toDateObject(t){if(t instanceof Date)return t;if(!t||typeof t!="string")return null;Q(this,yR)||m(this,yR,new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const e=Q(this,yR).exec(t);if(!e)return null;const i=parseInt(e[1],10);let s=parseInt(e[2],10);s=s>=1&&s<=12?s-1:0;let n=parseInt(e[3],10);n=n>=1&&n<=31?n:1;let a=parseInt(e[4],10);a=a>=0&&a<=23?a:0;let A=parseInt(e[5],10);A=A>=0&&A<=59?A:0;let d=parseInt(e[6],10);d=d>=0&&d<=59?d:0;const c=e[7]||"Z";let o=parseInt(e[8],10);o=o>=0&&o<=23?o:0;let F=parseInt(e[9],10)||0;return F=F>=0&&F<=59?F:0,c==="-"?(a+=o,A+=F):c==="+"&&(a-=o,A-=F),new Date(Date.UTC(i,s,n,a,A,d))}}yR=new WeakMap,b(G0,yR);function HJ(l,{scale:t=1,rotation:e=0}){const{width:i,height:s}=l.attributes.style,n=[0,0,parseInt(i,10),parseInt(s,10)];return new FE({viewBox:n,userUnit:1,scale:t,rotation:e})}function UE(l){if(l.startsWith("#")){const e=l.slice(1);return[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16),e.length>=8?parseInt(e.slice(6,8),16)/255:1]}if(l.startsWith("rgb(")){const[e,i,s]=l.slice(4,-1).split(",").map(n=>parseInt(n,10));return[e,i,s,1]}if(l.startsWith("rgba(")){const e=l.slice(5,-1).split(",");return[parseInt(e[0],10),parseInt(e[1],10),parseInt(e[2],10),parseFloat(e[3])]}const t=l.match(/^color\(srgb\s+([\d.]+)\s+([\d.]+)\s+([\d.]+)(?:\s*\/\s*([\d.]+|none))?\)$/);return t?[Math.round(parseFloat(t[1])*255),Math.round(parseFloat(t[2])*255),Math.round(parseFloat(t[3])*255),t[4]!==void 0&&t[4]!=="none"?parseFloat(t[4]):1]:null}function Nm(l){const t=UE(l);return t?t.slice(0,3):(M(`Not a valid color format: "${l}"`),[0,0,0])}function BH(l){const t=document.createElement("span");t.style.visibility="hidden",t.style.colorScheme="only light",document.body.append(t);for(const e of l.keys()){t.style.color=e;const i=window.getComputedStyle(t).color;l.set(e,Nm(i))}t.remove()}function Ll(l){const{a:t,b:e,c:i,d:s,e:n,f:a}=l.getTransform();return[t,e,i,s,n,a]}function x0(l){const{a:t,b:e,c:i,d:s,e:n,f:a}=l.getTransform().invertSelf();return[t,e,i,s,n,a]}function k0(l,t,e=!1,i=!0){if(t instanceof FE){const{pageWidth:s,pageHeight:n}=t.rawDims,{style:a}=l,A=De.isCSSRoundSupported,d=`var(--total-scale-factor) * ${s}px`,c=`var(--total-scale-factor) * ${n}px`,o=A?`round(down, ${d}, var(--scale-round-x))`:`calc(${d})`,F=A?`round(down, ${c}, var(--scale-round-y))`:`calc(${c})`;!e||t.rotation%180===0?(a.width=o,a.height=F):(a.width=F,a.height=o)}i&&l.setAttribute("data-main-rotation",t.rotation)}class is{constructor(){const{pixelRatio:t}=is;this.sx=t,this.sy=t}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}limitCanvas(t,e,i,s,n=-1){let a=1/0,A=1/0,d=1/0;i=is.capPixels(i,n),i>0&&(a=Math.sqrt(i/(t*e))),s!==-1&&(A=s/t,d=s/e);const c=Math.min(a,A,d);return this.sx>c||this.sy>c?(this.sx=c,this.sy=c,!0):!1}static get pixelRatio(){return globalThis.devicePixelRatio||1}static capPixels(t,e){if(e>=0){const i=Math.ceil((typeof S<"u"&&S.test("TESTING")?window.innerWidth*window.innerHeight:window.screen.availWidth*window.screen.availHeight)*this.pixelRatio**2*(1+e/100));return t>0?Math.min(t,i):i}return t}}const qc=["image/apng","image/avif","image/bmp","image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/x-icon"];class UH{static get isDarkMode(){var t;return nt(this,"isDarkMode",!!((t=window==null?void 0:window.matchMedia)!=null&&t.call(window,"(prefers-color-scheme: dark)").matches))}}class KJ{static get commentForegroundColor(){const t=document.createElement("span");t.classList.add("comment","sidebar");const{style:e}=t;e.width=e.height="0",e.display="none",e.color="var(--comment-fg-color)",document.body.append(t);const{color:i}=window.getComputedStyle(t);return t.remove(),nt(this,"commentForegroundColor",Nm(i))}}function vJ(l,t){t=Ve(t??1,0,1);const e=255*(1-t);return l.map(i=>Math.round(i*t+e))}function Hy(l,t){const e=l[0]/255,i=l[1]/255,s=l[2]/255,n=Math.max(e,i,s),a=Math.min(e,i,s),A=(n+a)/2;if(n===a)t[0]=t[1]=0;else{const d=n-a;switch(t[1]=A<.5?d/(n+a):d/(2-n-a),n){case e:t[0]=((i-s)/d+(i<s?6:0))*60;break;case i:t[0]=((s-e)/d+2)*60;break;case s:t[0]=((e-i)/d+4)*60;break}}t[2]=A}function OJ(l,t){const e=l[0],i=l[1],s=l[2],n=(1-Math.abs(2*s-1))*i,a=n*(1-Math.abs(e/60%2-1)),A=s-n/2;switch(Math.floor(e/60)){case 0:t[0]=n+A,t[1]=a+A,t[2]=A;break;case 1:t[0]=a+A,t[1]=n+A,t[2]=A;break;case 2:t[0]=A,t[1]=n+A,t[2]=a+A;break;case 3:t[0]=A,t[1]=a+A,t[2]=n+A;break;case 4:t[0]=a+A,t[1]=A,t[2]=n+A;break;case 5:case 6:t[0]=n+A,t[1]=A,t[2]=a+A;break}}function Ky(l){return l<=.03928?l/12.92:((l+.055)/1.055)**2.4}function vy(l,t,e){OJ(l,e),e.map(Ky);const i=.2126*e[0]+.7152*e[1]+.0722*e[2];OJ(t,e),e.map(Ky);const s=.2126*e[0]+.7152*e[1]+.0722*e[2];return i>s?(i+.05)/(s+.05):(s+.05)/(i+.05)}const Oy=new Map;function PJ(l,t){const e=l[0]+l[1]*256+l[2]*65536+t[0]*16777216+t[1]*4294967296+t[2]*1099511627776;let i=Oy.get(e);if(i)return i;const s=new Float32Array(9),n=s.subarray(0,3),a=s.subarray(3,6);Hy(l,a);const A=s.subarray(6,9);Hy(t,A);const d=A[2]<.5,c=d?12:4.5;if(a[2]=d?Math.sqrt(a[2]):1-Math.sqrt(1-a[2]),vy(a,A,n)<c){let o,F;d?(o=a[2],F=1):(o=0,F=a[2]);const B=.005;for(;F-o>B;){const U=a[2]=(o+F)/2;d===vy(a,A,n)<c?o=U:F=U}a[2]=d?F:o}return OJ(a,n),i=It.makeHexColor(Math.round(n[0]*255),Math.round(n[1]*255),Math.round(n[2]*255)),Oy.set(e,i),i}function hE({html:l,dir:t,className:e},i){const s=document.createDocumentFragment();if(typeof l=="string"){const n=document.createElement("p");n.dir=t||"auto";const a=l.split(/(?:\r\n?|\n)/);for(let A=0,d=a.length;A<d;++A){const c=a[A];n.append(document.createTextNode(c)),A<d-1&&n.append(