Загрузка

This commit is contained in:
iriska-gri committed 2024-02-29 14:34:59 +03:00
1 parent 4bb29d7f2b
commit 43eb80e47f
57 files changed
+102 -98

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
var Ks=Object.defineProperty;var vs=($,r,h)=>r in $?Ks($,r,{enumerable:!0,configurable:!0,writable:!0,value:h}):$[r]=h;var gl=($,r,h)=>(vs($,typeof r!="symbol"?r+"":r,h),h),Xe=($,r,h)=>{if(!r.has($))throw TypeError("Cannot "+h)};var bt=($,r,h)=>(Xe($,r,"read from private field"),h?h.call($):r.get($)),ll=($,r,h)=>{if(r.has($))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add($):r.set($,h)},ul=($,r,h,m)=>(Xe($,r,"write to private field"),m?m.call($,h):r.set($,h),h);var Al=($,r,h,m)=>({set _(T){ul($,r,T,h)},get _(){return bt($,r,m)}}),nl=($,r,h)=>(Xe($,r,"access private method"),h);import{b4 as commonjsGlobal$1,b5 as getAugmentedNamespace$1,s as shallowRef,am as watchEffect,l as onBeforeUnmount,b6 as defineComponent,b7 as toValue,r as ref,al as toRef,c as computed,w as watch,D as openBlock,a0 as createElementBlock,a1 as Fragment,a2 as renderList,aO as renderSlot,W as createBaseVNode,a7 as createCommentVNode,aP as normalizeStyle,p as propsFactory,b8 as omit,ae as genericComponent,aj as useProxiedModel,h as getUid,ah as useRender,a_ as filterInputAttrs,G as createVNode,I as mergeProps,b9 as IconValue,F as withCtx,N as VCol,T as VCard,E as createBlock,O as VCardActions,J as VBtn,H as createTextVNode,M as VRow,a6 as toDisplayString,a4 as VImg,x as unref,U as VDialog,K as VCardTitle,aF as baseURL,a8 as axiosApiInstance,ba as makeVBtnProps,bb as useTextColor,a$ as forwardRefs,bc as animate,bd as standardEasing,be as makeDensityProps,an as makeTagProps,bf as useDensity,au as useBackgroundColor,aB as provideDefaults,b as convertToUnit,bg as isObject,aV as pagecounter,aL as useRoute,t as onBeforeMount,bh as onUpdated,P as withDirectives,L as VCardText,Q as vShow}from"./index-d6873f20.js";import{V as VWindow,a as VWindowItem}from"./VWindowItem-8fafdcd2.js";import{m as makeVInputProps,u as useFocus,V as VInput,a as VLabel}from"./VInput-db55fed0.js";import{m as makeVSelectionControlProps,V as VSelectionControl,a as makeSelectionControlGroupProps,b as VSelectionControlGroup}from"./VSelectionControl-19f98319.js";import{m as makeVCheckboxBtnProps,V as VCheckboxBtn}from"./VCheckboxBtn-749166bf.js";import{V as VSpacer}from"./VSpacer-6c0eda74.js";import{V as VContainer}from"./VContainer-d6cf5c15.js";import{L as ListUser}from"./listUser-9125d86c.js";import{a as VExpandTransition}from"./index-efa864ba.js";import{m as makeVSlideGroupProps,a as VSlideGroup}from"./VChip-e6a63478.js";import"./ssrBoot-4c47c1e2.js";import"./VListItem-e530d51b.js";var FileSaver_min={exports:{}};(function($,r){(function(h,m){m()})(commonjsGlobal$1,function(){function h(p,k){return typeof k>"u"?k={autoBom:!1}:typeof k!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),k={autoBom:!k}),k.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(p.type)?new Blob(["\uFEFF",p],{type:p.type}):p}function m(p,k,_){var O=new XMLHttpRequest;O.open("GET",p),O.responseType="blob",O.onload=function(){j(O.response,k,_)},O.onerror=function(){console.error("could not download file")},O.send()}function T(p){var k=new XMLHttpRequest;k.open("HEAD",p,!1);try{k.send()}catch{}return 200<=k.status&&299>=k.status}function B(p){try{p.dispatchEvent(new MouseEvent("click"))}catch{var k=document.createEvent("MouseEvents");k.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),p.dispatchEvent(k)}}var v=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof commonjsGlobal$1=="object"&&commonjsGlobal$1.global===commonjsGlobal$1?commonjsGlobal$1:void 0,U=v.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),j=v.saveAs||(typeof window!="object"||window!==v?function(){}:"download"in HTMLAnchorElement.prototype&&!U?function(p,k,_){var O=v.URL||v.webkitURL,P=document.createElement("a");k=k||p.name||"download",P.download=k,P.rel="noopener",typeof p=="string"?(P.href=p,P.origin===location.origin?B(P):T(P.href)?m(p,k,_):B(P,P.target="_blank")):(P.href=O.createObjectURL(p),setTimeout(function(){O.revokeObjectURL(P.href)},4e4),setTimeout(function(){B(P)},0))}:"msSaveOrOpenBlob"in navigator?function(p,k,_){if(k=k||p.name||"download",typeof p!="string")navigator.msSaveOrOpenBlob(h(p,_),k);else if(T(p))m(p,k,_);else{var O=document.createElement("a");O.href=p,O.target="_blank",setTimeout(function(){B(O)})}}:function(p,k,_,O){if(O=O||open("","_blank"),O&&(O.document.title=O.document.body.innerText="downloading..."),typeof p=="string")return m(p,k,_);var P=p.type==="application/octet-stream",I=/constructor/i.test(v.HTMLElement)||v.safari,g=/CriOS\/[\d]+/.test(navigator.userAgent);if((g||P&&I||U)&&typeof FileReader<"u"){var L=new FileReader;L.onloadend=function(){var K=L.result;K=g?K:K.replace(/^data:[^;]*;/,"data:attachment/file;"),O?O.location.href=K:location=K,O=null},L.readAsDataURL(p)}else{var C=v.URL||v.webkitURL,F=C.createObjectURL(p);O?O.location=F:Line truncated
`);return wt.join("")}}r.StatTimer=K;function H(Ft,wt){try{const{protocol:Yt}=wt?new URL(Ft,wt):new URL(Ft);return Yt==="http:"||Yt==="https:"}catch{return!1}}function M(Ft){Ft.preventDefault()}function u(Ft,wt=!1){return new Promise((Yt,jt)=>{const $t=document.createElement("script");$t.src=Ft,$t.onload=function(al){wt&&$t.remove(),Yt(al)},$t.onerror=function(){jt(new Error(`Cannot load script at: ${$t.src}`))},(document.head||document.documentElement).append($t)})}function q(Ft){console.log("Deprecated API usage: "+Ft)}let lt;class Q{static toDateObject(wt){if(!wt||typeof wt!="string")return null;lt||(lt=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const Yt=lt.exec(wt);if(!Yt)return null;const jt=parseInt(Yt[1],10);let $t=parseInt(Yt[2],10);$t=$t>=1&&$t<=12?$t-1:0;let al=parseInt(Yt[3],10);al=al>=1&&al<=31?al:1;let Ml=parseInt(Yt[4],10);Ml=Ml>=0&&Ml<=23?Ml:0;let pl=parseInt(Yt[5],10);pl=pl>=0&&pl<=59?pl:0;let Xl=parseInt(Yt[6],10);Xl=Xl>=0&&Xl<=59?Xl:0;const Yl=Yt[7]||"Z";let Vl=parseInt(Yt[8],10);Vl=Vl>=0&&Vl<=23?Vl:0;let yl=parseInt(Yt[9],10)||0;return yl=yl>=0&&yl<=59?yl:0,Yl==="-"?(Ml+=Vl,pl+=yl):Yl==="+"&&(Ml-=Vl,pl-=yl),new Date(Date.UTC(jt,$t,al,Ml,pl,Xl))}}r.PDFDateString=Q;function Zt(Ft,{scale:wt=1,rotation:Yt=0}){const{width:jt,height:$t}=Ft.attributes.style,al=[0,0,parseInt(jt),parseInt($t)];return new P({viewBox:al,scale:wt,rotation:Yt})}function at(Ft){if(Ft.startsWith("#")){const wt=parseInt(Ft.slice(1),16);return[(wt&16711680)>>16,(wt&65280)>>8,wt&255]}return Ft.startsWith("rgb(")?Ft.slice(4,-1).split(",").map(wt=>parseInt(wt)):Ft.startsWith("rgba(")?Ft.slice(5,-1).split(",").map(wt=>parseInt(wt)).slice(0,3):((0,T.warn)(`Not a valid color format: "${Ft}"`),[0,0,0])}function It(Ft){const wt=document.createElement("span");wt.style.visibility="hidden",document.body.append(wt);for(const Yt of Ft.keys()){wt.style.color=Yt;const jt=window.getComputedStyle(wt).color;Ft.set(Yt,at(jt))}wt.remove()}function xt(Ft){const{a:wt,b:Yt,c:jt,d:$t,e:al,f:Ml}=Ft.getTransform();return[wt,Yt,jt,$t,al,Ml]}function it(Ft){const{a:wt,b:Yt,c:jt,d:$t,e:al,f:Ml}=Ft.getTransform().invertSelf();return[wt,Yt,jt,$t,al,Ml]}function Xt(Ft,wt,Yt=!1,jt=!0){if(wt instanceof P){const{pageWidth:$t,pageHeight:al}=wt.rawDims,{style:Ml}=Ft,pl=T.FeatureTest.isCSSRoundSupported,Xl=`var(--scale-factor) * ${$t}px`,Yl=`var(--scale-factor) * ${al}px`,Vl=pl?`round(${Xl}, 1px)`:`calc(${Xl})`,yl=pl?`round(${Yl}, 1px)`:`calc(${Yl})`;!Yt||wt.rotation%180===0?(Ml.width=Vl,Ml.height=yl):(Ml.width=yl,Ml.height=Vl)}jt&&Ft.setAttribute("data-main-rotation",wt.rotation)}},($,r,h)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BaseStandardFontDataFactory=r.BaseSVGFactory=r.BaseFilterFactory=r.BaseCanvasFactory=r.BaseCMapReaderFactory=void 0;var m=h(1);class T{constructor(){this.constructor===T&&(0,m.unreachable)("Cannot initialize BaseFilterFactory.")}addFilter(k){return"none"}addHCMFilter(k,_){return"none"}addHighlightHCMFilter(k,_,O,P){return"none"}destroy(k=!1){}}r.BaseFilterFactory=T;class B{constructor(){this.constructor===B&&(0,m.unreachable)("Cannot initialize BaseCanvasFactory.")}create(k,_){if(k<=0||_<=0)throw new Error("Invalid canvas size");const O=this._createCanvas(k,_);return{canvas:O,context:O.getContext("2d")}}reset(k,_,O){if(!k.canvas)throw new Error("Canvas is not specified");if(_<=0||O<=0)throw new Error("Invalid canvas size");k.canvas.width=_,k.canvas.height=O}destroy(k){if(!k.canvas)throw new Error("Canvas is not specified");k.canvas.width=0,k.canvas.height=0,k.canvas=null,k.context=null}_createCanvas(k,_){(0,m.unreachable)("Abstract method `_createCanvas` called.")}}r.BaseCanvasFactory=B;class v{constructor({baseUrl:k=null,isCompressed:_=!0}){this.constructor===v&&(0,m.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=k,this.isCompressed=_}async fetch({name:k}){if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!k)throw new Error("CMap name must be specified.");const _=this.baseUrl+k+(this.isCompressed?".bcmap":""),O=this.isCompressed?m.CMapCompressionType.BINARY:m.CMapCompressionType.NONE;return this._fetchData(_,O).catch(P=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${_}`)})}_fetchData(k,_){(0,m.unreachable)("Abstract method `_fetchData` called.")}}r.BaseCMapReaderFactory=v;class U{constructor({baseUrl:k=null}){this.constructor===U&&(0,m.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=k}async fetch({filename:k}){if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!k)throw new Error("Font filename must be specified.");const _=`${this.baseUrl}${k}`;return this._fetchData(_).catch(O=>{throw new Error(`Unable to load font data at: ${_}`)})}_fetchData(k){(0,m.unreachable)( Line truncated
`)}return this.compiledGlyphs[p]=new Function("c","size",_.join(""))}return this.compiledGlyphs[p]=function(_,O){for(const P of k)P.cmd==="scale"&&(P.args=[O,-O]),_[P.cmd].apply(_,P.args)}}}r.FontFaceObject=B},($,r,h)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.NodeStandardFontDataFactory=r.NodeFilterFactory=r.NodeCanvasFactory=r.NodeCMapReaderFactory=void 0;var m=h(7);h(1);const T=function(p){return new Promise((k,_)=>{require$$5.readFile(p,(P,I)=>{if(P||!I){_(new Error(P));return}k(new Uint8Array(I))})})};class B extends m.BaseFilterFactory{}r.NodeFilterFactory=B;class v extends m.BaseCanvasFactory{_createCanvas(k,_){return require$$5.createCanvas(k,_)}}r.NodeCanvasFactory=v;class U extends m.BaseCMapReaderFactory{_fetchData(k,_){return T(k).then(O=>({cMapData:O,compressionType:_}))}}r.NodeCMapReaderFactory=U;class j extends m.BaseStandardFontDataFactory{_fetchData(k){return T(k)}}r.NodeStandardFontDataFactory=j},($,r,h)=>{var Nt,De,Lt,Ce;Object.defineProperty(r,"__esModule",{value:!0}),r.CanvasGraphics=void 0;var m=h(1),T=h(6),B=h(12),v=h(13);const U=16,j=100,p=4096,k=15,_=10,O=1e3,P=16;function I(dt,S){if(dt._removeMirroring)throw new Error("Context is already forwarding operations.");dt.__originalSave=dt.save,dt.__originalRestore=dt.restore,dt.__originalRotate=dt.rotate,dt.__originalScale=dt.scale,dt.__originalTranslate=dt.translate,dt.__originalTransform=dt.transform,dt.__originalSetTransform=dt.setTransform,dt.__originalResetTransform=dt.resetTransform,dt.__originalClip=dt.clip,dt.__originalMoveTo=dt.moveTo,dt.__originalLineTo=dt.lineTo,dt.__originalBezierCurveTo=dt.bezierCurveTo,dt.__originalRect=dt.rect,dt.__originalClosePath=dt.closePath,dt.__originalBeginPath=dt.beginPath,dt._removeMirroring=()=>{dt.save=dt.__originalSave,dt.restore=dt.__originalRestore,dt.rotate=dt.__originalRotate,dt.scale=dt.__originalScale,dt.translate=dt.__originalTranslate,dt.transform=dt.__originalTransform,dt.setTransform=dt.__originalSetTransform,dt.resetTransform=dt.__originalResetTransform,dt.clip=dt.__originalClip,dt.moveTo=dt.__originalMoveTo,dt.lineTo=dt.__originalLineTo,dt.bezierCurveTo=dt.__originalBezierCurveTo,dt.rect=dt.__originalRect,dt.closePath=dt.__originalClosePath,dt.beginPath=dt.__originalBeginPath,delete dt._removeMirroring},dt.save=function(){S.save(),this.__originalSave()},dt.restore=function(){S.restore(),this.__originalRestore()},dt.translate=function(X,J){S.translate(X,J),this.__originalTranslate(X,J)},dt.scale=function(X,J){S.scale(X,J),this.__originalScale(X,J)},dt.transform=function(X,J,f,st,et,Mt){S.transform(X,J,f,st,et,Mt),this.__originalTransform(X,J,f,st,et,Mt)},dt.setTransform=function(X,J,f,st,et,Mt){S.setTransform(X,J,f,st,et,Mt),this.__originalSetTransform(X,J,f,st,et,Mt)},dt.resetTransform=function(){S.resetTransform(),this.__originalResetTransform()},dt.rotate=function(X){S.rotate(X),this.__originalRotate(X)},dt.clip=function(X){S.clip(X),this.__originalClip(X)},dt.moveTo=function(w,X){S.moveTo(w,X),this.__originalMoveTo(w,X)},dt.lineTo=function(w,X){S.lineTo(w,X),this.__originalLineTo(w,X)},dt.bezierCurveTo=function(w,X,J,f,st,et){S.bezierCurveTo(w,X,J,f,st,et),this.__originalBezierCurveTo(w,X,J,f,st,et)},dt.rect=function(w,X,J,f){S.rect(w,X,J,f),this.__originalRect(w,X,J,f)},dt.closePath=function(){S.closePath(),this.__originalClosePath()},dt.beginPath=function(){S.beginPath(),this.__originalBeginPath()}}class g{constructor(S){this.canvasFactory=S,this.cache=Object.create(null)}getCanvas(S,w,X){let J;return this.cache[S]!==void 0?(J=this.cache[S],this.canvasFactory.reset(J,w,X)):(J=this.canvasFactory.create(w,X),this.cache[S]=J),J}delete(S){delete this.cache[S]}clear(){for(const S in this.cache){const w=this.cache[S];this.canvasFactory.destroy(w),delete this.cache[S]}}}function L(dt,S,w,X,J,f,st,et,Mt,Rt){const[gt,Jt,Dt,qt,vt,cl]=(0,T.getCurrentTransform)(dt);if(Jt===0&&Dt===0){const Bt=st*gt+vt,Ft=Math.round(Bt),wt=et*qt+cl,Yt=Math.round(wt),jt=(st+Mt)*gt+vt,$t=Math.abs(Math.round(jt)-Ft)||1,al=(et+Rt)*qt+cl,Ml=Math.abs(Math.round(al)-Yt)||1;return dt.setTransform(Math.sign(gt),0,0,Math.sign(qt),Ft,Yt),dt.drawImage(S,w,X,J,f,0,0,$t,Ml),dt.setTransform(gt,Jt,Dt,qt,vt,cl),[$t,Ml]}if(gt===0&&qt===0){const Bt=et*Dt+vt,Ft=Math.round(Bt),wt=st*Jt+cl,Yt=Math.round(wt),jt=(et+Rt)*Dt+vt,$t=Math.abs(Math.round(jt)-Ft)||1,al=(st+Mt)*Jt+cl,Ml=Math.abs(Math.round(al)-Yt)||1;return dt.setTransform(0,Math.sign(Jt),Math.sign(Dt),0,Ft,Yt),dt.drawImage(S,w,X,J,f,0,0,Ml,$t),dt.setTransform(gt,Jt,Dt,qt,vt,cl),[Ml,$t]}dt.drawImage(S,w,X,J,f,st,et,Mt,Rt);const bl=Math.hypot(gt,Jt),il=Math.hypot(Dt,qt);return[bl*Mt,il*Rt]}function C(dt){const{width:S,height:w}=dt;if(S>O||w>O)return null;const X=1e3,J=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),f=S+1;let st=new Uint8Array(f*(w+1)),et,Mt,Rt;const gt=S+7&-8;let Jt=new Uint8Array(gt*w),Dt=0;for(const il of dt.data){let Bt=128;for(;Bt>0;)Jt[Dt++]=il&Bt?0:255,Bt>>=1}let qt=0;for(Dt=0,Jt[Dt]!==0&&(st[0]=1,++qt),Mt=1;Mt<S;Mt++)Jt[Dt]!==Jt[Dt+1]& Line truncated
`}setFont(M){const u=this.current,q=this.commonObjs.get(M[0]);let lt=M[1];u.font=q,this.embedFonts&&!q.missingFile&&!this.embeddedFonts[q.loadedName]&&(this.addFontStyle(q),this.embeddedFonts[q.loadedName]=q),u.fontMatrix=q.fontMatrix||T.FONT_IDENTITY_MATRIX;let Q="normal";q.black?Q="900":q.bold&&(Q="bold");const Zt=q.italic?"italic":"normal";lt<0?(lt=-lt,u.fontDirection=-1):u.fontDirection=1,u.fontSize=lt,u.fontFamily=q.loadedName,u.fontWeight=Q,u.fontStyle=Zt,u.tspan=this.svgFactory.createElement("svg:tspan"),u.tspan.setAttributeNS(null,"y",I(-u.y)),u.xcoords=[],u.ycoords=[]}endText(){var u;const M=this.current;M.textRenderingMode&T.TextRenderingMode.ADD_TO_PATH_FLAG&&((u=M.txtElement)!=null&&u.hasChildNodes())&&(M.element=M.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(M){M>0&&(this.current.lineWidth=M)}setLineCap(M){this.current.lineCap=j[M]}setLineJoin(M){this.current.lineJoin=p[M]}setMiterLimit(M){this.current.miterLimit=M}setStrokeAlpha(M){this.current.strokeAlpha=M}setStrokeRGBColor(M,u,q){this.current.strokeColor=T.Util.makeHexColor(M,u,q)}setFillAlpha(M){this.current.fillAlpha=M}setFillRGBColor(M,u,q){this.current.fillColor=T.Util.makeHexColor(M,u,q),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(M){this.current.strokeColor=this._makeColorN_Pattern(M)}setFillColorN(M){this.current.fillColor=this._makeColorN_Pattern(M)}shadingFill(M){const{width:u,height:q}=this.viewport,lt=T.Util.inverseTransform(this.transformMatrix),[Q,Zt,at,It]=T.Util.getAxialAlignedBoundingBox([0,0,u,q],lt),xt=this.svgFactory.createElement("svg:rect");xt.setAttributeNS(null,"x",Q),xt.setAttributeNS(null,"y",Zt),xt.setAttributeNS(null,"width",at-Q),xt.setAttributeNS(null,"height",It-Zt),xt.setAttributeNS(null,"fill",this._makeShadingPattern(M)),this.current.fillAlpha<1&&xt.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(xt)}_makeColorN_Pattern(M){return M[0]==="TilingPattern"?this._makeTilingPattern(M):this._makeShadingPattern(M)}_makeTilingPattern(M){const u=M[1],q=M[2],lt=M[3]||T.IDENTITY_MATRIX,[Q,Zt,at,It]=M[4],xt=M[5],it=M[6],Xt=M[7],zt=`shading${F++}`,[Gt,Nt,Ut,Lt]=T.Util.normalizeRect([...T.Util.applyTransform([Q,Zt],lt),...T.Util.applyTransform([at,It],lt)]),[Ht,Pt]=T.Util.singularValueDecompose2dScale(lt),dt=xt*Ht,S=it*Pt,w=this.svgFactory.createElement("svg:pattern");w.setAttributeNS(null,"id",zt),w.setAttributeNS(null,"patternUnits","userSpaceOnUse"),w.setAttributeNS(null,"width",dt),w.setAttributeNS(null,"height",S),w.setAttributeNS(null,"x",`${Gt}`),w.setAttributeNS(null,"y",`${Nt}`);const X=this.svg,J=this.transformMatrix,f=this.current.fillColor,st=this.current.strokeColor,et=this.svgFactory.create(Ut-Gt,Lt-Nt);if(this.svg=et,this.transformMatrix=lt,Xt===2){const Mt=T.Util.makeHexColor(...u);this.current.fillColor=Mt,this.current.strokeColor=Mt}return this.executeOpTree(this.convertOpList(q)),this.svg=X,this.transformMatrix=J,this.current.fillColor=f,this.current.strokeColor=st,w.append(et.childNodes[0]),this.defs.append(w),`url(#${zt})`}_makeShadingPattern(M){switch(typeof M=="string"&&(M=this.objs.get(M)),M[0]){case"RadialAxial":const u=`shading${F++}`,q=M[3];let lt;switch(M[1]){case"axial":const Q=M[4],Zt=M[5];lt=this.svgFactory.createElement("svg:linearGradient"),lt.setAttributeNS(null,"id",u),lt.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),lt.setAttributeNS(null,"x1",Q[0]),lt.setAttributeNS(null,"y1",Q[1]),lt.setAttributeNS(null,"x2",Zt[0]),lt.setAttributeNS(null,"y2",Zt[1]);break;case"radial":const at=M[4],It=M[5],xt=M[6],it=M[7];lt=this.svgFactory.createElement("svg:radialGradient"),lt.setAttributeNS(null,"id",u),lt.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),lt.setAttributeNS(null,"cx",It[0]),lt.setAttributeNS(null,"cy",It[1]),lt.setAttributeNS(null,"r",it),lt.setAttributeNS(null,"fx",at[0]),lt.setAttributeNS(null,"fy",at[1]),lt.setAttributeNS(null,"fr",xt);break;default:throw new Error(`Unknown RadialAxial type: ${M[1]}`)}for(const Q of q){const Zt=this.svgFactory.createElement("svg:stop");Zt.setAttributeNS(null,"offset",Q[0]),Zt.setAttributeNS(null,"stop-color",Q[1]),lt.append(Zt)}return this.defs.append(lt),`url(#${u})`;case"Mesh":return(0,T.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${M[0]}`)}}setDash(M,u){this.current.dashArray=M,this.current.dashPhase=u}constructPath(M,u){const q=this.current;let lt=q.x,Q=q.y,Zt=[],at=0;for(const It of M)switch(It|0){case T.OPS.rectangle:lt=u[at++],Q=u[at++];const xt=u[at++],it=u[at++],Xt=lt+xt,zt=Q+it;Zt.push("M",I(lt),I(Q),"L",I(Xt),I(Q),"L",I(Xt),I(zt),"L",I(lt),I(zt),"Z");break;case T.OPS.moveTo:lt=u[at++],Q=u[at++],Zt.push("M",I(lt),I(Q));break;case T.OPS.lineTo:lt=u[at++],Q=u[at++],Zt.push("L",I(lt),I(Q));break;case T.OPS.curveTo:lt=u[at+4],Q=u[at+5],Zt.push("C",I(u[at]),I(u[at+1]),I(u[at+2]),I(u[at+3]),I(lt),I(Q)),at+=6;break;case T.O Line truncated
`),position:st,pageIndex:et-1,rect:w,rotation:X,id:J,deleted:!1}}const Pt=super.deserialize(Nt,Ut,Lt);return ul(Pt,g,Nt.fontSize),ul(Pt,O,m.Util.makeHexColor(...Nt.color)),ul(Pt,P,Nt.value),Pt.annotationElementId=Nt.id||null,ul(Pt,L,Ht),Pt}serialize(Nt=!1){if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};const Ut=Xt._internalPadding*this.parentScale,Lt=this.getRect(Ut,Ut),Ht=B.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:bt(this,O)),Pt={annotationType:m.AnnotationEditorType.FREETEXT,color:Ht,fontSize:bt(this,g),value:bt(this,P),pageIndex:this.pageIndex,rect:Lt,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return Nt?Pt:this.annotationElementId&&!nl(this,at,rs).call(this,Pt)?null:(Pt.id=this.annotationElementId,Pt)}};j=new WeakMap,p=new WeakMap,k=new WeakMap,_=new WeakMap,O=new WeakMap,P=new WeakMap,I=new WeakMap,g=new WeakMap,L=new WeakMap,C=new WeakSet,us=function(Nt){const Ut=Ht=>{this.editorDiv.style.fontSize=`calc(${Ht}px * var(--scale-factor))`,this.translate(0,-(Ht-bt(this,g))*this.parentScale),ul(this,g,Ht),nl(this,q,le).call(this)},Lt=bt(this,g);this.addCommands({cmd:()=>{Ut(Nt)},undo:()=>{Ut(Lt)},mustExec:!0,type:m.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},K=new WeakSet,Ws=function(Nt){const Ut=bt(this,O);this.addCommands({cmd:()=>{ul(this,O,this.editorDiv.style.color=Nt)},undo:()=>{ul(this,O,this.editorDiv.style.color=Ut)},mustExec:!0,type:m.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},M=new WeakSet,Gs=function(){const Nt=this.editorDiv.getElementsByTagName("div");if(Nt.length===0)return this.editorDiv.innerText;const Ut=[];for(const Lt of Nt)Ut.push(Lt.innerText.replace(/\r\n?|\n/,""));return Ut.join(`
`)},q=new WeakSet,le=function(){const[Nt,Ut]=this.parentDimensions;let Lt;if(this.isAttachedToDOM)Lt=this.div.getBoundingClientRect();else{const{currentLayer:Ht,div:Pt}=this,dt=Pt.style.display;Pt.style.display="hidden",Ht.div.append(this.div),Lt=Pt.getBoundingClientRect(),Pt.remove(),Pt.style.display=dt}this.rotation%180===this.parentRotation%180?(this.width=Lt.width/Nt,this.height=Lt.height/Ut):(this.width=Lt.height/Nt,this.height=Lt.width/Ut),this.fixAndSetPosition()},Q=new WeakSet,Ue=function(){if(this.editorDiv.replaceChildren(),!!bt(this,P))for(const Nt of bt(this,P).split(`
`)){const Ut=document.createElement("div");Ut.append(Nt?document.createTextNode(Nt):document.createElement("br")),this.editorDiv.append(Ut)}},at=new WeakSet,rs=function(Nt){const{value:Ut,fontSize:Lt,color:Ht,rect:Pt,pageIndex:dt}=bt(this,L);return Nt.value!==Ut||Nt.fontSize!==Lt||Nt.rect.some((S,w)=>Math.abs(S-Pt[w])>=1)||Nt.color.some((S,w)=>S!==Ht[w])||Nt.pageIndex!==dt},xt=new WeakSet,Ee=function(Nt=!1){if(!this.annotationElementId)return;if(nl(this,q,le).call(this),!Nt&&(this.width===0||this.height===0)){setTimeout(()=>nl(this,xt,Ee).call(this,!0),0);return}const Ut=Xt._internalPadding*this.parentScale;bt(this,L).rect=this.getRect(Ut,Ut)},gl(Xt,"_freeTextDefaultContent",""),gl(Xt,"_internalPadding",0),gl(Xt,"_defaultColor",null),gl(Xt,"_defaultFontSize",10),gl(Xt,"_type","freetext");let U=Xt;r.FreeTextEditor=U},($,r,h)=>{var w,J,Kl,st,Ms,Mt,Rt,gt,Jt,Dt,qt,vt,cl,bl,il,Bt,Ft,wt,Yt,jt,$t,al,Ml,Ns,Xl,oe,Vl,Ke,Ll,ve,ot,ut,Tt,Ct,Ot,Vt,yt,Pe,tl,el,ol,Qt,Xs,hl,He;Object.defineProperty(r,"__esModule",{value:!0}),r.StampAnnotationElement=r.InkAnnotationElement=r.FreeTextAnnotationElement=r.AnnotationLayer=void 0;var m=h(1),T=h(6),B=h(3),v=h(30),U=h(31),j=h(32);const p=1e3,k=9,_=new WeakSet;function O(Wl){return{width:Wl[2]-Wl[0],height:Wl[3]-Wl[1]}}class P{static create(nt){switch(nt.data.annotationType){case m.AnnotationType.LINK:return new g(nt);case m.AnnotationType.TEXT:return new L(nt);case m.AnnotationType.WIDGET:switch(nt.data.fieldType){case"Tx":return new F(nt);case"Btn":return nt.data.radioButton?new M(nt):nt.data.checkBox?new H(nt):new u(nt);case"Ch":return new q(nt);case"Sig":return new K(nt)}return new C(nt);case m.AnnotationType.POPUP:return new lt(nt);case m.AnnotationType.FREETEXT:return new Zt(nt);case m.AnnotationType.LINE:return new at(nt);case m.AnnotationType.SQUARE:return new It(nt);case m.AnnotationType.CIRCLE:return new xt(nt);case m.AnnotationType.POLYLINE:return new it(nt);case m.AnnotationType.CARET:return new zt(nt);case m.AnnotationType.INK:return new Gt(nt);case m.AnnotationType.POLYGON:return new Xt(nt);case m.AnnotationType.HIGHLIGHT:return new Nt(nt);case m.AnnotationType.UNDERLINE:return new Ut(nt);case m.AnnotationType.SQUIGGLY:return new Lt(nt);case m.AnnotationType.STRIKEOUT:return new Ht(nt);case m.AnnotationType.STAMP:return new Pt(nt);case m.AnnotationType.FILEATTACHMENT:return new dt(nt);default:return new I(nt)}}}const X=class X{constructor(nt,{isRenderable:R=!1,ignoreBorder:ct=!1,createQuadrilaterals:Wt=!1}={}){ll(this,w,!1);this.isRenderable=R,this.data=nt.data,this.layer=nt.layer,this.linkService=nt.linkService,this.downloadManager=nt.downloadManager,this.imageResourcesPath=nt.imageResourcesPath,this.renderForms=nt.renderForms,this.svgFactory=nt.svgFactory,this.annotationStorage=nt.annotationStorage,this.enableScripting=nt.enableScripting,this.hasJSActions=nt.hasJSActions,this._fieldObjects=nt.fieldObjects,this.parent=nt.parent,R&&(this.container=this._createContainer(ct)),Wt&&this._createQuadrilaterals()}static _hasPopupData({titleObj:nt,contentsObj:R,richText:ct}){return!!(nt!=null&&nt.str||R!=null&&R.str||ct!=null&&ct.str)}get hasPopupData(){return X._hasPopupData(this.data)}_createContainer(nt){const{data:R,parent:{page:ct,viewport:Wt}}=this,pt=document.createElement("section");pt.setAttribute("data-annotation-id",R.id),this instanceof C||(pt.tabIndex=p),pt.style.zIndex=this.parent.zIndex++,this.data.popupRef&&pt.setAttribute("aria-haspopup","dialog"),R.noRotate&&pt.classList.add("norotate");const{pageWidth:kt,pageHeight:Et,pageX:sl,pageY:ml}=Wt.rawDims;if(!R.rect||this instanceof lt){const{rotation:Tl}=R;return!R.hasOwnCanvas&&Tl!==0&&this.setRotation(Tl,pt),pt}const{width:dl,height:zl}=O(R.rect),Gl=m.Util.normalizeRect([R.rect[0],ct.view[3]-R.rect[1]+ct.view[1],R.rect[2],ct.view[3]-R.rect[3]+ct.view[1]]);if(!nt&&R.borderStyle.width>0){pt.style.borderWidth=`${R.borderStyle.width}px`;const Tl=R.borderStyle.horizontalCornerRadius,Rl=R.borderStyle.verticalCornerRadius;if(Tl>0||Rl>0){const wl=`calc(${Tl}px * var(--scale-factor)) / calc(${Rl}px * var(--scale-factor))`;pt.style.borderRadius=wl}else if(this instanceof M){const wl=`calc(${dl}px * var(--scale-factor)) / calc(${zl}px * var(--scale-factor))`;pt.style.borderRadius=wl}switch(R.borderStyle.style){case m.AnnotationBorderStyleType.SOLID:pt.style.borderStyle="solid";break;case m.AnnotationBorderStyleType.DASHED:pt.style.borderStyle="dashed";break;case m.AnnotationBorderStyleType.BEVELED:(0,m.warn)("Unimplemented border style: beveled");break;case m.AnnotationBorderStyleType.INSET:(0,m.warn)("Unimplemented border style: inset");break;case m.AnnotationBorderStyleType.UNDERLINE:pt.style.borderBottomStyle="solid";break}const Sl=R.borderColor||null;Sl?(ul(this,w,!0),pt.style.borderColor=m.Util.makeHexColor(Sl[0]|0,Sl[1]|0,Sl[2]|0)):pt.style.borderWidth=0}pt.style.left=`${100*(Gl[0]-sl)/kt}%`,pt.style.top=`${100*(Gl[1]-ml)/Et}%`;const{rotation:Nl}=R;return R.hasOwnCanvas||Nl===0?(pt.style.width=`${100*dl/kt}%`,pt.styl Line truncated
`))||null;ml&&this.data.comb&&(ml=ml.replaceAll(/\s+/g,""));const dl={userValue:Et,formattedValue:ml,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(ct=document.createElement("textarea"),ct.textContent=ml??Et,this.data.doNotScroll&&(ct.style.overflowY="hidden")):(ct=document.createElement("input"),ct.type="text",ct.setAttribute("value",ml??Et),this.data.doNotScroll&&(ct.style.overflowX="hidden")),this.data.hasOwnCanvas&&(ct.hidden=!0),_.add(ct),ct.setAttribute("data-element-id",R),ct.disabled=this.data.readOnly,ct.name=this.data.fieldName,ct.tabIndex=p,this._setRequired(ct,this.data.required),sl&&(ct.maxLength=sl),ct.addEventListener("input",Gl=>{nt.setValue(R,{value:Gl.target.value}),this.setPropertyOnSiblings(ct,"value",Gl.target.value,"value"),dl.formattedValue=null}),ct.addEventListener("resetform",Gl=>{const Nl=this.data.defaultFieldValue??"";ct.value=dl.userValue=Nl,dl.formattedValue=null});let zl=Gl=>{const{formattedValue:Nl}=dl;Nl!=null&&(Gl.target.value=Nl),Gl.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){ct.addEventListener("focus",Nl=>{if(dl.focused)return;const{target:Tl}=Nl;dl.userValue&&(Tl.value=dl.userValue),dl.lastCommittedValue=Tl.value,dl.commitKey=1,dl.focused=!0}),ct.addEventListener("updatefromsandbox",Nl=>{this.showElementAndHideCanvas(Nl.target);const Tl={value(Rl){dl.userValue=Rl.detail.value??"",nt.setValue(R,{value:dl.userValue.toString()}),Rl.target.value=dl.userValue},formattedValue(Rl){const{formattedValue:Sl}=Rl.detail;dl.formattedValue=Sl,Sl!=null&&Rl.target!==document.activeElement&&(Rl.target.value=Sl),nt.setValue(R,{formattedValue:Sl})},selRange(Rl){Rl.target.setSelectionRange(...Rl.detail.selRange)},charLimit:Rl=>{var xl;const{charLimit:Sl}=Rl.detail,{target:wl}=Rl;if(Sl===0){wl.removeAttribute("maxLength");return}wl.setAttribute("maxLength",Sl);let kl=dl.userValue;!kl||kl.length<=Sl||(kl=kl.slice(0,Sl),wl.value=dl.userValue=kl,nt.setValue(R,{value:kl}),(xl=this.linkService.eventBus)==null||xl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:R,name:"Keystroke",value:kl,willCommit:!0,commitKey:1,selStart:wl.selectionStart,selEnd:wl.selectionEnd}}))}};this._dispatchEventFromSandbox(Tl,Nl)}),ct.addEventListener("keydown",Nl=>{var Sl;dl.commitKey=1;let Tl=-1;if(Nl.key==="Escape"?Tl=0:Nl.key==="Enter"&&!this.data.multiLine?Tl=2:Nl.key==="Tab"&&(dl.commitKey=3),Tl===-1)return;const{value:Rl}=Nl.target;dl.lastCommittedValue!==Rl&&(dl.lastCommittedValue=Rl,dl.userValue=Rl,(Sl=this.linkService.eventBus)==null||Sl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:R,name:"Keystroke",value:Rl,willCommit:!0,commitKey:Tl,selStart:Nl.target.selectionStart,selEnd:Nl.target.selectionEnd}}))});const Gl=zl;zl=null,ct.addEventListener("blur",Nl=>{var Rl;if(!dl.focused||!Nl.relatedTarget)return;dl.focused=!1;const{value:Tl}=Nl.target;dl.userValue=Tl,dl.lastCommittedValue!==Tl&&((Rl=this.linkService.eventBus)==null||Rl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:R,name:"Keystroke",value:Tl,willCommit:!0,commitKey:dl.commitKey,selStart:Nl.target.selectionStart,selEnd:Nl.target.selectionEnd}})),Gl(Nl)}),(pt=this.data.actions)!=null&&pt.Keystroke&&ct.addEventListener("beforeinput",Nl=>{var jl;dl.lastCommittedValue=null;const{data:Tl,target:Rl}=Nl,{value:Sl,selectionStart:wl,selectionEnd:kl}=Rl;let xl=wl,Dl=kl;switch(Nl.inputType){case"deleteWordBackward":{const Cl=Sl.substring(0,wl).match(/\w*[^\w]*$/);Cl&&(xl-=Cl[0].length);break}case"deleteWordForward":{const Cl=Sl.substring(wl).match(/^[^\w]*\w*/);Cl&&(Dl+=Cl[0].length);break}case"deleteContentBackward":wl===kl&&(xl-=1);break;case"deleteContentForward":wl===kl&&(Dl+=1);break}Nl.preventDefault(),(jl=this.linkService.eventBus)==null||jl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:R,name:"Keystroke",value:Sl,change:Tl||"",willCommit:!1,selStart:xl,selEnd:Dl}})}),this._setEventListeners(ct,dl,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],Nl=>Nl.target.value)}if(zl&&ct.addEventListener("blur",zl),this.data.comb){const Nl=(this.data.rect[2]-this.data.rect[0])/sl;ct.classList.add("comb"),ct.style.letterSpacing=`calc(${Nl}px * var(--scale-factor) - 1ch)`}}else ct=document.createElement("div"),ct.textContent=this.data.fieldValue,ct.style.verticalAlign="middle",ct.style.display="table-cell";return this._setTextStyle(ct),this._setBackgroundColor(ct),this._setDefaultPropertiesFromJS(ct),this.container.append(ct),this.container}}class K extends C{constructor(nt){super(nt,{isRenderable:!!nt.data.hasOwnCanvas})}}class H extends C{constructor(nt){super(nt,{isRenderable:nt.renderForms})}render(){const nt=this.annotationStorage,R=this.data,ct=R.id;let Wt=nt.getValue(ct,{value:R.exportValue===R.fieldValue}).value;typeof Wt=="string"&&(Wt=Wt!=="Off",nt.setValue(ct,{value:Wt})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const pt=document.createElement("input");r Line truncated
`,"\\r":"\r","\\t":" "},O=/^[\da-f]{4}$/i,P=/^[\u0000-\u001F]$/;$.exports=function(I,g){for(var L=!0,C="";g<I.length;){var F=j(I,g);if(F==="\\"){var K=p(I,g,g+2);if(T(_,K))C+=_[K],g+=2;else if(K==="\\u"){g+=2;var H=p(I,g,g+4);if(!k(O,H))throw B("Bad Unicode escape at: "+g);C+=U(v(H,16)),g+=4}else throw B('Unknown escape sequence: "'+K+'"')}else if(F==='"'){L=!1,g++;break}else{if(k(P,F))throw B("Bad control character in string literal at: "+g);C+=F,g++}}if(L)throw B("Unterminated string at: "+g);return{value:C,end:g}}},($,r,h)=>{var m,T,B,v,U,j,p,k,_,O,P,I,g,L,C,F,K,H,M,u,q,lt,Q,Zt,at;Object.defineProperty(r,"__esModule",{value:!0}),r.StatTimer=r.RenderingCancelledException=r.PixelsPerInch=r.PageViewport=r.PDFDateString=r.DOMStandardFontDataFactory=r.DOMSVGFactory=r.DOMFilterFactory=r.DOMCanvasFactory=r.DOMCMapReaderFactory=void 0,r.deprecated=gt,r.getColorValues=cl,r.getCurrentTransform=bl,r.getCurrentTransformInverse=il,r.getFilenameFromUrl=J,r.getPdfFilenameFromUrl=f,r.getRGB=vt,r.getXfaPageViewport=qt,r.isDataScheme=w,r.isPdfFile=X,r.isValidFetchUrl=et,r.loadScript=Rt,r.noContextMenu=Mt,r.setLayerDimensions=Bt,h(2),h(93),h(101),h(102),h(105),h(107),h(109),h(113),h(116),h(123),h(89),h(84),h(86),h(87);var It=h(169),xt=h(1);const it="http://www.w3.org/2000/svg",Xt=class{};tt(Xt,"CSS",96),tt(Xt,"PDF",72),tt(Xt,"PDF_TO_CSS_UNITS",Xt.CSS/Xt.PDF);let zt=Xt;r.PixelsPerInch=zt;class Gt extends It.BaseFilterFactory{constructor(){let{docId:wt,ownerDocument:Yt=globalThis.document}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),E(this,I),E(this,L),E(this,F),E(this,H),E(this,u),E(this,lt),E(this,Zt),E(this,m,void 0),E(this,T,void 0),E(this,B,void 0),E(this,v,void 0),E(this,U,void 0),E(this,j,void 0),E(this,p,void 0),E(this,k,void 0),E(this,_,void 0),E(this,O,void 0),E(this,P,0),Zl(this,B,wt),Zl(this,v,Yt)}addFilter(wt){if(!wt)return"none";let Yt=t(this,I,g).get(wt);if(Yt)return Yt;let jt,$t,al,Ml;if(wt.length===1){const Vl=wt[0],yl=new Array(256);for(let Ll=0;Ll<256;Ll++)yl[Ll]=Vl[Ll]/255;Ml=jt=$t=al=yl.join(",")}else{const[Vl,yl,Ll]=wt,_t=new Array(256),ot=new Array(256),ut=new Array(256);for(let Tt=0;Tt<256;Tt++)_t[Tt]=Vl[Tt]/255,ot[Tt]=yl[Tt]/255,ut[Tt]=Ll[Tt]/255;jt=_t.join(","),$t=ot.join(","),al=ut.join(","),Ml=`${jt}${$t}${al}`}if(Yt=t(this,I,g).get(Ml),Yt)return t(this,I,g).set(wt,Yt),Yt;const pl=`g_${t(this,B)}_transfer_map_${mt(this,P)._++}`,Xl=`url(#${pl})`;t(this,I,g).set(wt,Xl),t(this,I,g).set(Ml,Xl);const Yl=A(this,H,M).call(this,pl);return A(this,lt,Q).call(this,jt,$t,al,Yl),Xl}addHCMFilter(wt,Yt){var jt;const $t=`${wt}-${Yt}`;if(t(this,j)===$t)return t(this,p);if(Zl(this,j,$t),Zl(this,p,"none"),(jt=t(this,U))==null||jt.remove(),!wt||!Yt)return t(this,p);const al=A(this,Zt,at).call(this,wt);wt=xt.Util.makeHexColor(...al);const Ml=A(this,Zt,at).call(this,Yt);if(Yt=xt.Util.makeHexColor(...Ml),t(this,L,C).style.color="",wt==="#000000"&&Yt==="#ffffff"||wt===Yt)return t(this,p);const pl=new Array(256);for(let Ll=0;Ll<=255;Ll++){const _t=Ll/255;pl[Ll]=_t<=.03928?_t/12.92:((_t+.055)/1.055)**2.4}const Xl=pl.join(","),Yl=`g_${t(this,B)}_hcm_filter`,Vl=Zl(this,k,A(this,H,M).call(this,Yl));A(this,lt,Q).call(this,Xl,Xl,Xl,Vl),A(this,F,K).call(this,Vl);const yl=(Ll,_t)=>{const ot=al[Ll]/255,ut=Ml[Ll]/255,Tt=new Array(_t+1);for(let Ct=0;Ct<=_t;Ct++)Tt[Ct]=ot+Ct/_t*(ut-ot);return Tt.join(",")};return A(this,lt,Q).call(this,yl(0,5),yl(1,5),yl(2,5),Vl),Zl(this,p,`url(#${Yl})`),t(this,p)}addHighlightHCMFilter(wt,Yt,jt,$t){var al;const Ml=`${wt}-${Yt}-${jt}-${$t}`;if(t(this,_)===Ml)return t(this,O);if(Zl(this,_,Ml),Zl(this,O,"none"),(al=t(this,k))==null||al.remove(),!wt||!Yt)return t(this,O);const[pl,Xl]=[wt,Yt].map(A(this,Zt,at).bind(this));let Yl=Math.round(.2126*pl[0]+.7152*pl[1]+.0722*pl[2]),Vl=Math.round(.2126*Xl[0]+.7152*Xl[1]+.0722*Xl[2]),[yl,Ll]=[jt,$t].map(A(this,Zt,at).bind(this));Vl<Yl&&([Yl,Vl,yl,Ll]=[Vl,Yl,Ll,yl]),t(this,L,C).style.color="";const _t=(Tt,Ct,Ot)=>{const Vt=new Array(256),yt=(Vl-Yl)/Ot,Kt=Tt/255,tl=(Ct-Tt)/(255*Ot);let el=0;for(let ol=0;ol<=Ot;ol++){const Qt=Math.round(Yl+ol*yt),rl=Kt+ol*tl;for(let hl=el;hl<=Qt;hl++)Vt[hl]=rl;el=Qt+1}for(let ol=el;ol<256;ol++)Vt[ol]=Vt[el-1];return Vt.join(",")},ot=`g_${t(this,B)}_hcm_highlight_filter`,ut=Zl(this,k,A(this,H,M).call(this,ot));return A(this,F,K).call(this,ut),A(this,lt,Q).call(this,_t(yl[0],Ll[0],5),_t(yl[1],Ll[1],5),_t(yl[2],Ll[2],5),ut),Zl(this,O,`url(#${ot})`),t(this,O)}destroy(){arguments.length>0&&arguments[0]!==void 0&&arguments[0]&&(t(this,p)||t(this,O))||(t(this,T)&&(t(this,T).parentNode.parentNode.remove(),Zl(this,T,null)),t(this,m)&&(t(this,m).clear(),Zl(this,m,null)),Zl(this,P,0))}}m=new WeakMap,T=new WeakMap,B=new WeakMap,v=new WeakMap,U=new WeakMap,j=new WeakMap,p=new WeakMap,k=new WeakMap,_=new WeakMap,O=new WeakMap,P=new WeakMap,I=new WeakSet,g=function(){return t(this,m)||Zl(this,m,new Map)},L=new WeakSet,C=function(){if(!t(this,T)){const Ft=t(this,v).createElement("div"),{style:wt}=Ft;wt.visibility="hidden",wt. Line truncated
`);return wt.join("")}}r.StatTimer=st;function et(Ft,wt){try{const{protocol:Yt}=wt?new URL(Ft,wt):new URL(Ft);return Yt==="http:"||Yt==="https:"}catch{return!1}}function Mt(Ft){Ft.preventDefault()}function Rt(Ft){let wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return new Promise((Yt,jt)=>{const $t=document.createElement("script");$t.src=Ft,$t.onload=function(al){wt&&$t.remove(),Yt(al)},$t.onerror=function(){jt(new Error(`Cannot load script at: ${$t.src}`))},(document.head||document.documentElement).append($t)})}function gt(Ft){console.log("Deprecated API usage: "+Ft)}let Jt;class Dt{static toDateObject(wt){if(!wt||typeof wt!="string")return null;Jt||(Jt=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const Yt=Jt.exec(wt);if(!Yt)return null;const jt=parseInt(Yt[1],10);let $t=parseInt(Yt[2],10);$t=$t>=1&&$t<=12?$t-1:0;let al=parseInt(Yt[3],10);al=al>=1&&al<=31?al:1;let Ml=parseInt(Yt[4],10);Ml=Ml>=0&&Ml<=23?Ml:0;let pl=parseInt(Yt[5],10);pl=pl>=0&&pl<=59?pl:0;let Xl=parseInt(Yt[6],10);Xl=Xl>=0&&Xl<=59?Xl:0;const Yl=Yt[7]||"Z";let Vl=parseInt(Yt[8],10);Vl=Vl>=0&&Vl<=23?Vl:0;let yl=parseInt(Yt[9],10)||0;return yl=yl>=0&&yl<=59?yl:0,Yl==="-"?(Ml+=Vl,pl+=yl):Yl==="+"&&(Ml-=Vl,pl-=yl),new Date(Date.UTC(jt,$t,al,Ml,pl,Xl))}}r.PDFDateString=Dt;function qt(Ft,wt){let{scale:Yt=1,rotation:jt=0}=wt;const{width:$t,height:al}=Ft.attributes.style,Ml=[0,0,parseInt($t),parseInt(al)];return new dt({viewBox:Ml,scale:Yt,rotation:jt})}function vt(Ft){if(Ft.startsWith("#")){const wt=parseInt(Ft.slice(1),16);return[(wt&16711680)>>16,(wt&65280)>>8,wt&255]}return Ft.startsWith("rgb(")?Ft.slice(4,-1).split(",").map(wt=>parseInt(wt)):Ft.startsWith("rgba(")?Ft.slice(5,-1).split(",").map(wt=>parseInt(wt)).slice(0,3):((0,xt.warn)(`Not a valid color format: "${Ft}"`),[0,0,0])}function cl(Ft){const wt=document.createElement("span");wt.style.visibility="hidden",document.body.append(wt);for(const Yt of Ft.keys()){wt.style.color=Yt;const jt=window.getComputedStyle(wt).color;Ft.set(Yt,vt(jt))}wt.remove()}function bl(Ft){const{a:wt,b:Yt,c:jt,d:$t,e:al,f:Ml}=Ft.getTransform();return[wt,Yt,jt,$t,al,Ml]}function il(Ft){const{a:wt,b:Yt,c:jt,d:$t,e:al,f:Ml}=Ft.getTransform().invertSelf();return[wt,Yt,jt,$t,al,Ml]}function Bt(Ft,wt){let Yt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,jt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;if(wt instanceof dt){const{pageWidth:$t,pageHeight:al}=wt.rawDims,{style:Ml}=Ft,pl=xt.FeatureTest.isCSSRoundSupported,Xl=`var(--scale-factor) * ${$t}px`,Yl=`var(--scale-factor) * ${al}px`,Vl=pl?`round(${Xl}, 1px)`:`calc(${Xl})`,yl=pl?`round(${Yl}, 1px)`:`calc(${Yl})`;!Yt||wt.rotation%180===0?(Ml.width=Vl,Ml.height=yl):(Ml.width=yl,Ml.height=Vl)}jt&&Ft.setAttribute("data-main-rotation",wt.rotation)}},($,r,h)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BaseStandardFontDataFactory=r.BaseSVGFactory=r.BaseFilterFactory=r.BaseCanvasFactory=r.BaseCMapReaderFactory=void 0,h(2);var m=h(1);class T{constructor(){this.constructor===T&&(0,m.unreachable)("Cannot initialize BaseFilterFactory.")}addFilter(k){return"none"}addHCMFilter(k,_){return"none"}addHighlightHCMFilter(k,_,O,P){return"none"}destroy(){}}r.BaseFilterFactory=T;class B{constructor(){this.constructor===B&&(0,m.unreachable)("Cannot initialize BaseCanvasFactory.")}create(k,_){if(k<=0||_<=0)throw new Error("Invalid canvas size");const O=this._createCanvas(k,_);return{canvas:O,context:O.getContext("2d")}}reset(k,_,O){if(!k.canvas)throw new Error("Canvas is not specified");if(_<=0||O<=0)throw new Error("Invalid canvas size");k.canvas.width=_,k.canvas.height=O}destroy(k){if(!k.canvas)throw new Error("Canvas is not specified");k.canvas.width=0,k.canvas.height=0,k.canvas=null,k.context=null}_createCanvas(k,_){(0,m.unreachable)("Abstract method `_createCanvas` called.")}}r.BaseCanvasFactory=B;class v{constructor(k){let{baseUrl:_=null,isCompressed:O=!0}=k;this.constructor===v&&(0,m.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=_,this.isCompressed=O}async fetch(k){let{name:_}=k;if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!_)throw new Error("CMap name must be specified.");const O=this.baseUrl+_+(this.isCompressed?".bcmap":""),P=this.isCompressed?m.CMapCompressionType.BINARY:m.CMapCompressionType.NONE;return this._fetchData(O,P).catch(I=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${O}`)})}_fetchData(k,_){(0,m.unreachable)("Abstract method `_fetchData` called.")}}r.BaseCMapReaderFactory=v;class U{constructor(k){let{baseUrl:_=null}=k;this.constructor===U&&(0,m.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=_}async fetch(k){let{filename:_}=k;if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is p Line truncated
`)}return this.compiledGlyphs[p]=new Function("c","size",_.join(""))}return this.compiledGlyphs[p]=function(_,O){for(const P of k)P.cmd==="scale"&&(P.args=[O,-O]),_[P.cmd].apply(_,P.args)}}}r.FontFaceObject=v},($,r,h)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.NodeStandardFontDataFactory=r.NodeFilterFactory=r.NodeCanvasFactory=r.NodeCMapReaderFactory=void 0,h(2),h(93),h(101),h(102),h(105),h(107),h(109),h(113),h(116),h(123);var m=h(169),T=h(1);(function(){if(!(globalThis.DOMMatrix||!T.isNodeJS))try{globalThis.DOMMatrix=require$$6.DOMMatrix}catch(k){(0,T.warn)(`Cannot polyfill \`DOMMatrix\`, rendering may be broken: "${k}".`)}})(),function(){if(!(globalThis.Path2D||!T.isNodeJS))try{const{CanvasRenderingContext2D:k}=require$$6,{polyfillPath2D:_}=requirePath2dPolyfill_esm();globalThis.CanvasRenderingContext2D=k,_(globalThis)}catch(k){(0,T.warn)(`Cannot polyfill \`Path2D\`, rendering may be broken: "${k}".`)}}();const B=function(k){return new Promise((_,O)=>{require$$6.readFile(k,(P,I)=>{if(P||!I){O(new Error(P));return}_(new Uint8Array(I))})})};class v extends m.BaseFilterFactory{}r.NodeFilterFactory=v;class U extends m.BaseCanvasFactory{_createCanvas(_,O){return require$$6.createCanvas(_,O)}}r.NodeCanvasFactory=U;class j extends m.BaseCMapReaderFactory{_fetchData(_,O){return B(_).then(P=>({cMapData:P,compressionType:O}))}}r.NodeCMapReaderFactory=j;class p extends m.BaseStandardFontDataFactory{_fetchData(_){return B(_)}}r.NodeStandardFontDataFactory=p},($,r,h)=>{var m,T,B,v;Object.defineProperty(r,"__esModule",{value:!0}),r.CanvasGraphics=void 0,h(2),h(93),h(101),h(102),h(105),h(107),h(109),h(113),h(116),h(123),h(89);var U=h(1),j=h(168),p=h(174),k=h(175);const _=16,O=100,P=4096,I=15,g=10,L=1e3,C=16;function F(dt,S){if(dt._removeMirroring)throw new Error("Context is already forwarding operations.");dt.__originalSave=dt.save,dt.__originalRestore=dt.restore,dt.__originalRotate=dt.rotate,dt.__originalScale=dt.scale,dt.__originalTranslate=dt.translate,dt.__originalTransform=dt.transform,dt.__originalSetTransform=dt.setTransform,dt.__originalResetTransform=dt.resetTransform,dt.__originalClip=dt.clip,dt.__originalMoveTo=dt.moveTo,dt.__originalLineTo=dt.lineTo,dt.__originalBezierCurveTo=dt.bezierCurveTo,dt.__originalRect=dt.rect,dt.__originalClosePath=dt.closePath,dt.__originalBeginPath=dt.beginPath,dt._removeMirroring=()=>{dt.save=dt.__originalSave,dt.restore=dt.__originalRestore,dt.rotate=dt.__originalRotate,dt.scale=dt.__originalScale,dt.translate=dt.__originalTranslate,dt.transform=dt.__originalTransform,dt.setTransform=dt.__originalSetTransform,dt.resetTransform=dt.__originalResetTransform,dt.clip=dt.__originalClip,dt.moveTo=dt.__originalMoveTo,dt.lineTo=dt.__originalLineTo,dt.bezierCurveTo=dt.__originalBezierCurveTo,dt.rect=dt.__originalRect,dt.closePath=dt.__originalClosePath,dt.beginPath=dt.__originalBeginPath,delete dt._removeMirroring},dt.save=function(){S.save(),this.__originalSave()},dt.restore=function(){S.restore(),this.__originalRestore()},dt.translate=function(w,X){S.translate(w,X),this.__originalTranslate(w,X)},dt.scale=function(w,X){S.scale(w,X),this.__originalScale(w,X)},dt.transform=function(w,X,J,f,st,et){S.transform(w,X,J,f,st,et),this.__originalTransform(w,X,J,f,st,et)},dt.setTransform=function(w,X,J,f,st,et){S.setTransform(w,X,J,f,st,et),this.__originalSetTransform(w,X,J,f,st,et)},dt.resetTransform=function(){S.resetTransform(),this.__originalResetTransform()},dt.rotate=function(w){S.rotate(w),this.__originalRotate(w)},dt.clip=function(w){S.clip(w),this.__originalClip(w)},dt.moveTo=function(w,X){S.moveTo(w,X),this.__originalMoveTo(w,X)},dt.lineTo=function(w,X){S.lineTo(w,X),this.__originalLineTo(w,X)},dt.bezierCurveTo=function(w,X,J,f,st,et){S.bezierCurveTo(w,X,J,f,st,et),this.__originalBezierCurveTo(w,X,J,f,st,et)},dt.rect=function(w,X,J,f){S.rect(w,X,J,f),this.__originalRect(w,X,J,f)},dt.closePath=function(){S.closePath(),this.__originalClosePath()},dt.beginPath=function(){S.beginPath(),this.__originalBeginPath()}}class K{constructor(S){this.canvasFactory=S,this.cache=Object.create(null)}getCanvas(S,w,X){let J;return this.cache[S]!==void 0?(J=this.cache[S],this.canvasFactory.reset(J,w,X)):(J=this.canvasFactory.create(w,X),this.cache[S]=J),J}delete(S){delete this.cache[S]}clear(){for(const S in this.cache){const w=this.cache[S];this.canvasFactory.destroy(w),delete this.cache[S]}}}function H(dt,S,w,X,J,f,st,et,Mt,Rt){const[gt,Jt,Dt,qt,vt,cl]=(0,j.getCurrentTransform)(dt);if(Jt===0&&Dt===0){const Bt=st*gt+vt,Ft=Math.round(Bt),wt=et*qt+cl,Yt=Math.round(wt),jt=(st+Mt)*gt+vt,$t=Math.abs(Math.round(jt)-Ft)||1,al=(et+Rt)*qt+cl,Ml=Math.abs(Math.round(al)-Yt)||1;return dt.setTransform(Math.sign(gt),0,0,Math.sign(qt),Ft,Yt),dt.drawImage(S,w,X,J,f,0,0,$t,Ml),dt.setTransform(gt,Jt,Dt,qt,vt,cl),[$t,Ml]}if(gt===0&&qt===0){const Bt=et*Dt+vt,Ft=Math.round(Bt),wt=st*Jt+cl,Yt=Math.round(wt),jt=(et+Rt)*Dt+vt,$t=Math.abs(Math.round(jt)-Ft)||1,al=(st+Mt)*Jt+cl,Ml=Math.abs(Math.round(al)-Yt)||1;return dt.Line truncated
`}setFont(M){const u=this.current,q=this.commonObjs.get(M[0]);let lt=M[1];u.font=q,this.embedFonts&&!q.missingFile&&!this.embeddedFonts[q.loadedName]&&(this.addFontStyle(q),this.embeddedFonts[q.loadedName]=q),u.fontMatrix=q.fontMatrix||T.FONT_IDENTITY_MATRIX;let Q="normal";q.black?Q="900":q.bold&&(Q="bold");const Zt=q.italic?"italic":"normal";lt<0?(lt=-lt,u.fontDirection=-1):u.fontDirection=1,u.fontSize=lt,u.fontFamily=q.loadedName,u.fontWeight=Q,u.fontStyle=Zt,u.tspan=this.svgFactory.createElement("svg:tspan"),u.tspan.setAttributeNS(null,"y",I(-u.y)),u.xcoords=[],u.ycoords=[]}endText(){var M;const u=this.current;u.textRenderingMode&T.TextRenderingMode.ADD_TO_PATH_FLAG&&(M=u.txtElement)!=null&&M.hasChildNodes()&&(u.element=u.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(M){M>0&&(this.current.lineWidth=M)}setLineCap(M){this.current.lineCap=j[M]}setLineJoin(M){this.current.lineJoin=p[M]}setMiterLimit(M){this.current.miterLimit=M}setStrokeAlpha(M){this.current.strokeAlpha=M}setStrokeRGBColor(M,u,q){this.current.strokeColor=T.Util.makeHexColor(M,u,q)}setFillAlpha(M){this.current.fillAlpha=M}setFillRGBColor(M,u,q){this.current.fillColor=T.Util.makeHexColor(M,u,q),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(M){this.current.strokeColor=this._makeColorN_Pattern(M)}setFillColorN(M){this.current.fillColor=this._makeColorN_Pattern(M)}shadingFill(M){const{width:u,height:q}=this.viewport,lt=T.Util.inverseTransform(this.transformMatrix),[Q,Zt,at,It]=T.Util.getAxialAlignedBoundingBox([0,0,u,q],lt),xt=this.svgFactory.createElement("svg:rect");xt.setAttributeNS(null,"x",Q),xt.setAttributeNS(null,"y",Zt),xt.setAttributeNS(null,"width",at-Q),xt.setAttributeNS(null,"height",It-Zt),xt.setAttributeNS(null,"fill",this._makeShadingPattern(M)),this.current.fillAlpha<1&&xt.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(xt)}_makeColorN_Pattern(M){return M[0]==="TilingPattern"?this._makeTilingPattern(M):this._makeShadingPattern(M)}_makeTilingPattern(M){const u=M[1],q=M[2],lt=M[3]||T.IDENTITY_MATRIX,[Q,Zt,at,It]=M[4],xt=M[5],it=M[6],Xt=M[7],zt=`shading${F++}`,[Gt,Nt,Ut,Lt]=T.Util.normalizeRect([...T.Util.applyTransform([Q,Zt],lt),...T.Util.applyTransform([at,It],lt)]),[Ht,Pt]=T.Util.singularValueDecompose2dScale(lt),dt=xt*Ht,S=it*Pt,w=this.svgFactory.createElement("svg:pattern");w.setAttributeNS(null,"id",zt),w.setAttributeNS(null,"patternUnits","userSpaceOnUse"),w.setAttributeNS(null,"width",dt),w.setAttributeNS(null,"height",S),w.setAttributeNS(null,"x",`${Gt}`),w.setAttributeNS(null,"y",`${Nt}`);const X=this.svg,J=this.transformMatrix,f=this.current.fillColor,st=this.current.strokeColor,et=this.svgFactory.create(Ut-Gt,Lt-Nt);if(this.svg=et,this.transformMatrix=lt,Xt===2){const Mt=T.Util.makeHexColor(...u);this.current.fillColor=Mt,this.current.strokeColor=Mt}return this.executeOpTree(this.convertOpList(q)),this.svg=X,this.transformMatrix=J,this.current.fillColor=f,this.current.strokeColor=st,w.append(et.childNodes[0]),this.defs.append(w),`url(#${zt})`}_makeShadingPattern(M){switch(typeof M=="string"&&(M=this.objs.get(M)),M[0]){case"RadialAxial":const u=`shading${F++}`,q=M[3];let lt;switch(M[1]){case"axial":const Q=M[4],Zt=M[5];lt=this.svgFactory.createElement("svg:linearGradient"),lt.setAttributeNS(null,"id",u),lt.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),lt.setAttributeNS(null,"x1",Q[0]),lt.setAttributeNS(null,"y1",Q[1]),lt.setAttributeNS(null,"x2",Zt[0]),lt.setAttributeNS(null,"y2",Zt[1]);break;case"radial":const at=M[4],It=M[5],xt=M[6],it=M[7];lt=this.svgFactory.createElement("svg:radialGradient"),lt.setAttributeNS(null,"id",u),lt.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),lt.setAttributeNS(null,"cx",It[0]),lt.setAttributeNS(null,"cy",It[1]),lt.setAttributeNS(null,"r",it),lt.setAttributeNS(null,"fx",at[0]),lt.setAttributeNS(null,"fy",at[1]),lt.setAttributeNS(null,"fr",xt);break;default:throw new Error(`Unknown RadialAxial type: ${M[1]}`)}for(const Q of q){const Zt=this.svgFactory.createElement("svg:stop");Zt.setAttributeNS(null,"offset",Q[0]),Zt.setAttributeNS(null,"stop-color",Q[1]),lt.append(Zt)}return this.defs.append(lt),`url(#${u})`;case"Mesh":return(0,T.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${M[0]}`)}}setDash(M,u){this.current.dashArray=M,this.current.dashPhase=u}constructPath(M,u){const q=this.current;let lt=q.x,Q=q.y,Zt=[],at=0;for(const It of M)switch(It|0){case T.OPS.rectangle:lt=u[at++],Q=u[at++];const xt=u[at++],it=u[at++],Xt=lt+xt,zt=Q+it;Zt.push("M",I(lt),I(Q),"L",I(Xt),I(Q),"L",I(Xt),I(zt),"L",I(lt),I(zt),"Z");break;case T.OPS.moveTo:lt=u[at++],Q=u[at++],Zt.push("M",I(lt),I(Q));break;case T.OPS.lineTo:lt=u[at++],Q=u[at++],Zt.push("L",I(lt),I(Q));break;case T.OPS.curveTo:lt=u[at+4],Q=u[at+5],Zt.push("C",I(u[at]),I(u[at+1]),I(u[at+2]),I(u[at+3]),I(lt),I(Q)),at+=6;break;case T.OPS Line truncated
`),position:f,pageIndex:st-1,rect:S,rotation:w,id:X,deleted:!1}}const Ht=super.deserialize(Gt,Nt,Ut);return Zl(Ht,k,Gt.fontSize),Zl(Ht,U,Zt.Util.makeHexColor(...Gt.color)),Zl(Ht,j,Gt.value),Ht.annotationElementId=Gt.id||null,Zl(Ht,_,Lt),Ht}serialize(){let Gt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};const Nt=Ol._internalPadding*this.parentScale,Ut=this.getRect(Nt,Nt),Lt=It.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:t(this,U)),Ht={annotationType:Zt.AnnotationEditorType.FREETEXT,color:Lt,fontSize:t(this,k),value:t(this,j),pageIndex:this.pageIndex,rect:Ut,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return Gt?Ht:this.annotationElementId&&!A(this,u,q).call(this,Ht)?null:(Ht.id=this.annotationElementId,Ht)}};m=new WeakMap,T=new WeakMap,B=new WeakMap,v=new WeakMap,U=new WeakMap,j=new WeakMap,p=new WeakMap,k=new WeakMap,_=new WeakMap,O=new WeakSet,P=function(zt){const Gt=Ut=>{this.editorDiv.style.fontSize=`calc(${Ut}px * var(--scale-factor))`,this.translate(0,-(Ut-t(this,k))*this.parentScale),Zl(this,k,Ut),A(this,F,K).call(this)},Nt=t(this,k);this.addCommands({cmd:()=>{Gt(zt)},undo:()=>{Gt(Nt)},mustExec:!0,type:Zt.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},I=new WeakSet,g=function(zt){const Gt=t(this,U);this.addCommands({cmd:()=>{Zl(this,U,this.editorDiv.style.color=zt)},undo:()=>{Zl(this,U,this.editorDiv.style.color=Gt)},mustExec:!0,type:Zt.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},L=new WeakSet,C=function(){const zt=this.editorDiv.getElementsByTagName("div");if(zt.length===0)return this.editorDiv.innerText;const Gt=[];for(const Nt of zt)Gt.push(Nt.innerText.replace(/\r\n?|\n/,""));return Gt.join(`
`)},F=new WeakSet,K=function(){const[zt,Gt]=this.parentDimensions;let Nt;if(this.isAttachedToDOM)Nt=this.div.getBoundingClientRect();else{const{currentLayer:Ut,div:Lt}=this,Ht=Lt.style.display;Lt.style.display="hidden",Ut.div.append(this.div),Nt=Lt.getBoundingClientRect(),Lt.remove(),Lt.style.display=Ht}this.rotation%180===this.parentRotation%180?(this.width=Nt.width/zt,this.height=Nt.height/Gt):(this.width=Nt.height/zt,this.height=Nt.width/Gt),this.fixAndSetPosition()},H=new WeakSet,M=function(){if(this.editorDiv.replaceChildren(),!!t(this,j))for(const zt of t(this,j).split(`
`)){const Gt=document.createElement("div");Gt.append(zt?document.createTextNode(zt):document.createElement("br")),this.editorDiv.append(Gt)}},u=new WeakSet,q=function(zt){const{value:Gt,fontSize:Nt,color:Ut,rect:Lt,pageIndex:Ht}=t(this,_);return zt.value!==Gt||zt.fontSize!==Nt||zt.rect.some((Pt,dt)=>Math.abs(Pt-Lt[dt])>=1)||zt.color.some((Pt,dt)=>Pt!==Ut[dt])||zt.pageIndex!==Ht},lt=new WeakSet,Q=function(){let zt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!this.annotationElementId)return;if(A(this,F,K).call(this),!zt&&(this.width===0||this.height===0)){setTimeout(()=>A(this,lt,Q).call(this,!0),0);return}const Gt=it._internalPadding*this.parentScale;t(this,_).rect=this.getRect(Gt,Gt)},tt(it,"_freeTextDefaultContent",""),tt(it,"_internalPadding",0),tt(it,"_defaultColor",null),tt(it,"_defaultFontSize",10),tt(it,"_type","freetext");let Xt=it;r.FreeTextEditor=Xt},($,r,h)=>{var m,T,B,v,U,j,p,k,_,O,P,I,g,L,C,F,K,H,M,u,q,lt,Q,Zt,at,It,xt,it,Xt,zt,Gt,Nt,Ut,Lt,Ht,Pt,dt,S,w,X,J,f,st,et,Mt;Object.defineProperty(r,"__esModule",{value:!0}),r.StampAnnotationElement=r.InkAnnotationElement=r.FreeTextAnnotationElement=r.AnnotationLayer=void 0,h(89),h(125),h(136),h(138),h(141),h(143),h(145),h(147);var Rt=h(1),gt=h(168),Jt=h(163),Dt=h(199),qt=h(200),vt=h(201);const cl=1e3,bl=9,il=new WeakSet;function Bt(Wl){return{width:Wl[2]-Wl[0],height:Wl[3]-Wl[1]}}class Ft{static create(nt){switch(nt.data.annotationType){case Rt.AnnotationType.LINK:return new jt(nt);case Rt.AnnotationType.TEXT:return new $t(nt);case Rt.AnnotationType.WIDGET:switch(nt.data.fieldType){case"Tx":return new Ml(nt);case"Btn":return nt.data.radioButton?new Yl(nt):nt.data.checkBox?new Xl(nt):new Vl(nt);case"Ch":return new yl(nt);case"Sig":return new pl(nt)}return new al(nt);case Rt.AnnotationType.POPUP:return new Ll(nt);case Rt.AnnotationType.FREETEXT:return new ot(nt);case Rt.AnnotationType.LINE:return new ut(nt);case Rt.AnnotationType.SQUARE:return new Tt(nt);case Rt.AnnotationType.CIRCLE:return new Ct(nt);case Rt.AnnotationType.POLYLINE:return new Ot(nt);case Rt.AnnotationType.CARET:return new yt(nt);case Rt.AnnotationType.INK:return new Kt(nt);case Rt.AnnotationType.POLYGON:return new Vt(nt);case Rt.AnnotationType.HIGHLIGHT:return new tl(nt);case Rt.AnnotationType.UNDERLINE:return new el(nt);case Rt.AnnotationType.SQUIGGLY:return new ol(nt);case Rt.AnnotationType.STRIKEOUT:return new Qt(nt);case Rt.AnnotationType.STAMP:return new rl(nt);case Rt.AnnotationType.FILEATTACHMENT:return new hl(nt);default:return new Yt(nt)}}}const wt=class Us{constructor(nt){E(this,m,!1);let{isRenderable:R=!1,ignoreBorder:ct=!1,createQuadrilaterals:Wt=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.isRenderable=R,this.data=nt.data,this.layer=nt.layer,this.linkService=nt.linkService,this.downloadManager=nt.downloadManager,this.imageResourcesPath=nt.imageResourcesPath,this.renderForms=nt.renderForms,this.svgFactory=nt.svgFactory,this.annotationStorage=nt.annotationStorage,this.enableScripting=nt.enableScripting,this.hasJSActions=nt.hasJSActions,this._fieldObjects=nt.fieldObjects,this.parent=nt.parent,R&&(this.container=this._createContainer(ct)),Wt&&this._createQuadrilaterals()}static _hasPopupData(nt){let{titleObj:R,contentsObj:ct,richText:Wt}=nt;return!!(R!=null&&R.str||ct!=null&&ct.str||Wt!=null&&Wt.str)}get hasPopupData(){return Us._hasPopupData(this.data)}_createContainer(nt){const{data:R,parent:{page:ct,viewport:Wt}}=this,pt=document.createElement("section");pt.setAttribute("data-annotation-id",R.id),this instanceof al||(pt.tabIndex=cl),pt.style.zIndex=this.parent.zIndex++,this.data.popupRef&&pt.setAttribute("aria-haspopup","dialog"),R.noRotate&&pt.classList.add("norotate");const{pageWidth:kt,pageHeight:Et,pageX:sl,pageY:ml}=Wt.rawDims;if(!R.rect||this instanceof Ll){const{rotation:Tl}=R;return!R.hasOwnCanvas&&Tl!==0&&this.setRotation(Tl,pt),pt}const{width:dl,height:zl}=Bt(R.rect),Gl=Rt.Util.normalizeRect([R.rect[0],ct.view[3]-R.rect[1]+ct.view[1],R.rect[2],ct.view[3]-R.rect[3]+ct.view[1]]);if(!nt&&R.borderStyle.width>0){pt.style.borderWidth=`${R.borderStyle.width}px`;const Tl=R.borderStyle.horizontalCornerRadius,Rl=R.borderStyle.verticalCornerRadius;if(Tl>0||Rl>0){const wl=`calc(${Tl}px * var(--scale-factor)) / calc(${Rl}px * var(--scale-factor))`;pt.style.borderRadius=wl}else if(this instanceof Yl){const wl=`calc(${dl}px * var(--scale-factor)) / calc(${zl}px * var(--scale-factor))`;pt.style.borderRadius=wl}switch(R.borderStyle.style){case Rt.AnnotationBorderStyleType.SOLID:pt.style.borderStyle="solid";break;case Rt.AnnotationBorderStyleType.DASHED:pt.style.borderStyle="dashed";break;case Rt.AnnotationBorderStyleType.BEVELED:(0,Rt.warn)("Unimplemented border style: beveled");break;case Rt.AnnotationBorderStyleType.INSET:(0,Rt.warn)("Unimplemented border style: inset");break;case Rt.AnnotationBorderStyleType.UNDERLINE:pt.style.borderBottomStyle="solid";break}const Sl=R.borderColor||null;Sl?(Zl(this,m,!0),pt.style.borderColor=Rt.Util.makeHexC Line truncated
`))||null;ml&&this.data.comb&&(ml=ml.replaceAll(/\s+/g,""));const dl={userValue:Et,formattedValue:ml,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(pt=document.createElement("textarea"),pt.textContent=ml??Et,this.data.doNotScroll&&(pt.style.overflowY="hidden")):(pt=document.createElement("input"),pt.type="text",pt.setAttribute("value",ml??Et),this.data.doNotScroll&&(pt.style.overflowX="hidden")),this.data.hasOwnCanvas&&(pt.hidden=!0),il.add(pt),pt.setAttribute("data-element-id",Wt),pt.disabled=this.data.readOnly,pt.name=this.data.fieldName,pt.tabIndex=cl,this._setRequired(pt,this.data.required),sl&&(pt.maxLength=sl),pt.addEventListener("input",Gl=>{ct.setValue(Wt,{value:Gl.target.value}),this.setPropertyOnSiblings(pt,"value",Gl.target.value,"value"),dl.formattedValue=null}),pt.addEventListener("resetform",Gl=>{const Nl=this.data.defaultFieldValue??"";pt.value=dl.userValue=Nl,dl.formattedValue=null});let zl=Gl=>{const{formattedValue:Nl}=dl;Nl!=null&&(Gl.target.value=Nl),Gl.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){pt.addEventListener("focus",Nl=>{if(dl.focused)return;const{target:Tl}=Nl;dl.userValue&&(Tl.value=dl.userValue),dl.lastCommittedValue=Tl.value,dl.commitKey=1,dl.focused=!0}),pt.addEventListener("updatefromsandbox",Nl=>{this.showElementAndHideCanvas(Nl.target);const Tl={value(Rl){dl.userValue=Rl.detail.value??"",ct.setValue(Wt,{value:dl.userValue.toString()}),Rl.target.value=dl.userValue},formattedValue(Rl){const{formattedValue:Sl}=Rl.detail;dl.formattedValue=Sl,Sl!=null&&Rl.target!==document.activeElement&&(Rl.target.value=Sl),ct.setValue(Wt,{formattedValue:Sl})},selRange(Rl){Rl.target.setSelectionRange(...Rl.detail.selRange)},charLimit:Rl=>{var Sl;const{charLimit:wl}=Rl.detail,{target:kl}=Rl;if(wl===0){kl.removeAttribute("maxLength");return}kl.setAttribute("maxLength",wl);let xl=dl.userValue;!xl||xl.length<=wl||(xl=xl.slice(0,wl),kl.value=dl.userValue=xl,ct.setValue(Wt,{value:xl}),(Sl=this.linkService.eventBus)==null||Sl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Wt,name:"Keystroke",value:xl,willCommit:!0,commitKey:1,selStart:kl.selectionStart,selEnd:kl.selectionEnd}}))}};this._dispatchEventFromSandbox(Tl,Nl)}),pt.addEventListener("keydown",Nl=>{var Tl;dl.commitKey=1;let Rl=-1;if(Nl.key==="Escape"?Rl=0:Nl.key==="Enter"&&!this.data.multiLine?Rl=2:Nl.key==="Tab"&&(dl.commitKey=3),Rl===-1)return;const{value:Sl}=Nl.target;dl.lastCommittedValue!==Sl&&(dl.lastCommittedValue=Sl,dl.userValue=Sl,(Tl=this.linkService.eventBus)==null||Tl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Wt,name:"Keystroke",value:Sl,willCommit:!0,commitKey:Rl,selStart:Nl.target.selectionStart,selEnd:Nl.target.selectionEnd}}))});const Gl=zl;zl=null,pt.addEventListener("blur",Nl=>{var Tl;if(!dl.focused||!Nl.relatedTarget)return;dl.focused=!1;const{value:Rl}=Nl.target;dl.userValue=Rl,dl.lastCommittedValue!==Rl&&((Tl=this.linkService.eventBus)==null||Tl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Wt,name:"Keystroke",value:Rl,willCommit:!0,commitKey:dl.commitKey,selStart:Nl.target.selectionStart,selEnd:Nl.target.selectionEnd}})),Gl(Nl)}),(R=this.data.actions)!=null&&R.Keystroke&&pt.addEventListener("beforeinput",Nl=>{var Tl;dl.lastCommittedValue=null;const{data:Rl,target:Sl}=Nl,{value:wl,selectionStart:kl,selectionEnd:xl}=Sl;let Dl=kl,jl=xl;switch(Nl.inputType){case"deleteWordBackward":{const Cl=wl.substring(0,kl).match(/\w*[^\w]*$/);Cl&&(Dl-=Cl[0].length);break}case"deleteWordForward":{const Cl=wl.substring(kl).match(/^[^\w]*\w*/);Cl&&(jl+=Cl[0].length);break}case"deleteContentBackward":kl===xl&&(Dl-=1);break;case"deleteContentForward":kl===xl&&(jl+=1);break}Nl.preventDefault(),(Tl=this.linkService.eventBus)==null||Tl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Wt,name:"Keystroke",value:wl,change:Rl||"",willCommit:!1,selStart:Dl,selEnd:jl}})}),this._setEventListeners(pt,dl,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],Nl=>Nl.target.value)}if(zl&&pt.addEventListener("blur",zl),this.data.comb){const Gl=(this.data.rect[2]-this.data.rect[0])/sl;pt.classList.add("comb"),pt.style.letterSpacing=`calc(${Gl}px * var(--scale-factor) - 1ch)`}}else pt=document.createElement("div"),pt.textContent=this.data.fieldValue,pt.style.verticalAlign="middle",pt.style.display="table-cell";return this._setTextStyle(pt),this._setBackgroundColor(pt),this._setDefaultPropertiesFromJS(pt),this.container.append(pt),this.container}}class pl extends al{constructor(nt){super(nt,{isRenderable:!!nt.data.hasOwnCanvas})}}class Xl extends al{constructor(nt){super(nt,{isRenderable:nt.renderForms})}render(){const nt=this.annotationStorage,R=this.data,ct=R.id;let Wt=nt.getValue(ct,{value:R.exportValue===R.fieldValue}).value;typeof Wt=="string"&&(Wt=Wt!=="Off",nt.setValue(ct,{value:Wt})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const pt=document.createEleme Line truncated
`),Rl=Tl?pt.length-2:pt.length;Wl=!0;let Sl=Rl;dl+Il===((Gl=Kt[ol])==null?void 0:Gl[1])&&(Sl-=Kt[ol][0],++ol);for(let wl=1;wl<=Sl;wl++)el.push([dl-1-rl+wl,rl-wl]);return rl-=Sl,hl+=Sl,Tl?(dl+=Rl-1,el.push([dl-rl+1,1+rl]),rl+=1,hl+=1,Il+=1,pt.slice(0,Rl)):pt}if(kt){const Tl=kt.length-2;return el.push([dl-rl+Tl,1+rl]),rl+=1,hl+=1,Il+=1,kt.slice(0,-2)}if(Et){const Tl=Et.length-1;return el.push([dl-rl+Tl,rl]),hl+=1,Il+=1,Et.slice(0,-1)}if(sl)return el.push([dl-rl+1,rl-1]),rl-=1,hl+=1,Il+=1," ";if(dl+Il===((Nl=Ot[Qt])==null?void 0:Nl[1])){const Tl=Ot[Qt][0]-1;++Qt;for(let Rl=1;Rl<=Tl;Rl++)el.push([dl-(rl-Rl),rl-Rl]);rl-=Tl,hl+=Tl}return ml}),el.push([tl.length,rl]),[tl,el,Wl]}function ut(Ct,Ot,Vt){if(!Ct)return[Ot,Vt];const yt=Ot,Kt=Ot+Vt-1;let tl=(0,qt.binarySearchFirstItem)(Ct,rl=>rl[0]>=yt);Ct[tl][0]>yt&&--tl;let el=(0,qt.binarySearchFirstItem)(Ct,rl=>rl[0]>=Kt,tl);Ct[el][0]>Kt&&--el;const ol=yt+Ct[tl][1],Qt=Kt+Ct[el][1]+1-ol;return[ol,Qt]}class Tt{constructor({linkService:Ot,eventBus:Vt,updateMatchesCountOnProgress:yt=!0}){E(this,O),E(this,I),E(this,L),E(this,F),E(this,H),E(this,u),E(this,lt),E(this,Zt),E(this,It),E(this,it),E(this,zt),E(this,Nt),E(this,Lt),E(this,Pt),E(this,S),E(this,X),E(this,f),E(this,et),E(this,Rt),E(this,Jt),E(this,p,null),E(this,k,!0),E(this,_,0),this._linkService=Ot,this._eventBus=Vt,Zl(this,k,yt),this.onIsPageVisible=null,A(this,I,g).call(this),Vt._on("find",A(this,O,P).bind(this)),Vt._on("findbarclose",A(this,f,st).bind(this))}get highlightMatches(){return this._highlightMatches}get pageMatches(){return this._pageMatches}get pageMatchesLength(){return this._pageMatchesLength}get selected(){return this._selected}get state(){return t(this,p)}setDocument(Ot){this._pdfDocument&&A(this,I,g).call(this),Ot&&(this._pdfDocument=Ot,this._firstPageCapability.resolve())}scrollMatchIntoView({element:Ot=null,selectedLeft:Vt=0,pageIndex:yt=-1,matchIndex:Kt=-1}){if(!this._scrollMatches||!Ot||Kt===-1||Kt!==this._selected.matchIdx||yt===-1||yt!==this._selected.pageIdx)return;this._scrollMatches=!1;const tl={top:Bt,left:Vt+Ft};(0,qt.scrollIntoView)(Ot,tl,!0)}}p=new WeakMap,k=new WeakMap,_=new WeakMap,O=new WeakSet,P=function(Ct){if(!Ct)return;Ct.phraseSearch===!1&&(console.error("The `phraseSearch`-parameter was removed, please provide an Array of strings in the `query`-parameter instead."),typeof Ct.query=="string"&&(Ct.query=Ct.query.match(/\S+/g)));const Ot=this._pdfDocument,{type:Vt}=Ct;(t(this,p)===null||A(this,F,K).call(this,Ct))&&(this._dirtyMatch=!0),Zl(this,p,Ct),Vt!=="highlightallchange"&&A(this,Jt,Dt).call(this,bl.PENDING),this._firstPageCapability.promise.then(()=>{if(!this._pdfDocument||Ot&&this._pdfDocument!==Ot)return;A(this,It,xt).call(this);const yt=!this._highlightMatches,Kt=!!this._findTimeout;this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),Vt?this._dirtyMatch?A(this,Nt,Ut).call(this):Vt==="again"?(A(this,Nt,Ut).call(this),yt&&t(this,p).highlightAll&&A(this,zt,Gt).call(this)):Vt==="highlightallchange"?(Kt?A(this,Nt,Ut).call(this):this._highlightMatches=!0,A(this,zt,Gt).call(this)):A(this,Nt,Ut).call(this):this._findTimeout=setTimeout(()=>{A(this,Nt,Ut).call(this),this._findTimeout=null},il)})},I=new WeakSet,g=function(){this._highlightMatches=!1,this._scrollMatches=!1,this._pdfDocument=null,this._pageMatches=[],this._pageMatchesLength=[],Zl(this,_,0),Zl(this,p,null),this._selected={pageIdx:-1,matchIdx:-1},this._offset={pageIdx:null,matchIdx:null,wrapped:!1},this._extractTextPromises=[],this._pageContents=[],this._pageDiffs=[],this._hasDiacritics=[],this._matchesCountTotal=0,this._pagesToSearch=null,this._pendingFindMatches=new Set,this._resumePageIdx=null,this._dirtyMatch=!1,clearTimeout(this._findTimeout),this._findTimeout=null,this._firstPageCapability=new cl.PromiseCapability},L=new WeakSet,C=function(){const{query:Ct}=t(this,p);return typeof Ct=="string"?(Ct!==this._rawQuery&&(this._rawQuery=Ct,[this._normalizedQuery]=ot(Ct)),this._normalizedQuery):(Ct||[]).filter(Ot=>!!Ot).map(Ot=>ot(Ot)[0])},F=new WeakSet,K=function(Ct){var Ot;const Vt=Ct.query,yt=t(this,p).query,Kt=typeof Vt;if(Kt!==typeof yt)return!0;if(Kt==="string"){if(Vt!==yt)return!0}else if(JSON.stringify(Vt)!==JSON.stringify(yt))return!0;switch(Ct.type){case"again":const tl=this._selected.pageIdx+1,el=this._linkService;return tl>=1&&tl<=el.pagesCount&&tl!==el.page&&!(((Ot=this.onIsPageVisible)==null?void 0:Ot.call(this,tl))??!0);case"highlightallchange":return!1}return!0},H=new WeakSet,M=function(Ct,Ot,Vt){let yt=Ct.slice(0,Ot).match(Ml);if(yt){const Kt=Ct.charCodeAt(Ot),tl=yt[1].charCodeAt(0);if((0,vt.getCharacterType)(Kt)===(0,vt.getCharacterType)(tl))return!1}if(yt=Ct.slice(Ot+Vt).match(pl),yt){const Kt=Ct.charCodeAt(Ot+Vt-1),tl=yt[1].charCodeAt(0);if((0,vt.getCharacterType)(Kt)===(0,vt.getCharacterType)(tl))return!1}return!0},u=new WeakSet,q=function(Ct,Ot,Vt,yt){const Kt=this._pageMatches[Vt]=[],tl=this._pageMatchesLength[Vt]=[];if(!Ct)return;const el=this._pageDiffs[Vt];let ol;for(;(o Line truncated
`);[this._pageContents[Vt],this._pageDiffs[Vt],this._hasDiacritics[Vt]]=ot(el.join("")),Kt.resolve()},tl=>{console.error(`Unable to get text content for page ${Vt+1}`,tl),this._pageContents[Vt]="",this._pageDiffs[Vt]=null,this._hasDiacritics[Vt]=!1,Kt.resolve()}))}},it=new WeakSet,Xt=function(Ct){this._scrollMatches&&this._selected.pageIdx===Ct&&(this._linkService.page=Ct+1),this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:Ct})},zt=new WeakSet,Gt=function(){this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:-1})},Nt=new WeakSet,Ut=function(){const Ct=t(this,p).findPrevious,Ot=this._linkService.page-1,Vt=this._linkService.pagesCount;if(this._highlightMatches=!0,this._dirtyMatch){this._dirtyMatch=!1,this._selected.pageIdx=this._selected.matchIdx=-1,this._offset.pageIdx=Ot,this._offset.matchIdx=null,this._offset.wrapped=!1,this._resumePageIdx=null,this._pageMatches.length=0,this._pageMatchesLength.length=0,Zl(this,_,0),this._matchesCountTotal=0,A(this,zt,Gt).call(this);for(let Kt=0;Kt<Vt;Kt++)this._pendingFindMatches.has(Kt)||(this._pendingFindMatches.add(Kt),this._extractTextPromises[Kt].then(()=>{this._pendingFindMatches.delete(Kt),A(this,Zt,at).call(this,Kt)}))}if(t(this,L,C).length===0){A(this,Jt,Dt).call(this,bl.FOUND);return}if(this._resumePageIdx)return;const yt=this._offset;if(this._pagesToSearch=Vt,yt.matchIdx!==null){const Kt=this._pageMatches[yt.pageIdx].length;if(!Ct&&yt.matchIdx+1<Kt||Ct&&yt.matchIdx>0){yt.matchIdx=Ct?yt.matchIdx-1:yt.matchIdx+1,A(this,X,J).call(this,!0);return}A(this,S,w).call(this,Ct)}A(this,Pt,dt).call(this)},Lt=new WeakSet,Ht=function(Ct){const Ot=this._offset,Vt=Ct.length,yt=t(this,p).findPrevious;return Vt?(Ot.matchIdx=yt?Vt-1:0,A(this,X,J).call(this,!0),!0):(A(this,S,w).call(this,yt),Ot.wrapped&&(Ot.matchIdx=null,this._pagesToSearch<0)?(A(this,X,J).call(this,!1),!0):!1)},Pt=new WeakSet,dt=function(){this._resumePageIdx!==null&&console.error("There can only be one pending page.");let Ct=null;do{const Ot=this._offset.pageIdx;if(Ct=this._pageMatches[Ot],!Ct){this._resumePageIdx=Ot;break}}while(!A(this,Lt,Ht).call(this,Ct))},S=new WeakSet,w=function(Ct){const Ot=this._offset,Vt=this._linkService.pagesCount;Ot.pageIdx=Ct?Ot.pageIdx-1:Ot.pageIdx+1,Ot.matchIdx=null,this._pagesToSearch--,(Ot.pageIdx>=Vt||Ot.pageIdx<0)&&(Ot.pageIdx=Ct?Vt-1:0,Ot.wrapped=!0)},X=new WeakSet,J=function(Ct=!1){let Ot=bl.NOT_FOUND;const Vt=this._offset.wrapped;if(this._offset.wrapped=!1,Ct){const yt=this._selected.pageIdx;this._selected.pageIdx=this._offset.pageIdx,this._selected.matchIdx=this._offset.matchIdx,Ot=Vt?bl.WRAPPED:bl.FOUND,yt!==-1&&yt!==this._selected.pageIdx&&A(this,it,Xt).call(this,yt)}A(this,Jt,Dt).call(this,Ot,t(this,p).findPrevious),this._selected.pageIdx!==-1&&(this._scrollMatches=!0,A(this,it,Xt).call(this,this._selected.pageIdx))},f=new WeakSet,st=function(Ct){const Ot=this._pdfDocument;this._firstPageCapability.promise.then(()=>{!this._pdfDocument||Ot&&this._pdfDocument!==Ot||(this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),this._resumePageIdx&&(this._resumePageIdx=null,this._dirtyMatch=!0),A(this,Jt,Dt).call(this,bl.FOUND),this._highlightMatches=!1,A(this,zt,Gt).call(this))})},et=new WeakSet,Mt=function(){var Ct;const{pageIdx:Ot,matchIdx:Vt}=this._selected;let yt=0,Kt=this._matchesCountTotal;if(Vt!==-1){for(let tl=0;tl<Ot;tl++)yt+=((Ct=this._pageMatches[tl])==null?void 0:Ct.length)||0;yt+=Vt+1}return(yt<1||yt>Kt)&&(yt=Kt=0),{current:yt,total:Kt}},Rt=new WeakSet,gt=function(){this._eventBus.dispatch("updatefindmatchescount",{source:this,matchesCount:A(this,et,Mt).call(this)})},Jt=new WeakSet,Dt=function(Ct,Ot=!1){var Vt;!t(this,k)&&(t(this,_)!==this._linkService.pagesCount||Ct===bl.PENDING)||this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:Ct,previous:Ot,matchesCount:A(this,et,Mt).call(this),rawQuery:((Vt=t(this,p))==null?void 0:Vt.query)??null})},U.PDFFindController=Tt},(v,U)=>{var j,p,k,_,O;Object.defineProperty(U,"__esModule",{value:!0}),U.animationStarted=U.VERTICAL_PADDING=U.UNKNOWN_SCALE=U.TextLayerMode=U.SpreadMode=U.SidebarView=U.ScrollMode=U.SCROLLBAR_PADDING=U.RenderingStates=U.ProgressBar=U.PresentationModeState=U.OutputScale=U.MIN_SCALE=U.MAX_SCALE=U.MAX_AUTO_SCALE=U.DEFAULT_SCALE_VALUE=U.DEFAULT_SCALE_DELTA=U.DEFAULT_SCALE=U.CursorTool=U.AutoPrintRegExp=void 0,U.apiPageLayoutToViewerModes=vt,U.apiPageModeToSidebarView=cl,U.approximateFraction=Ht,U.backtrackBeforeAllVisibleElements=S,U.binarySearchFirstItem=Lt,U.docStyle=void 0,U.getActiveOrFocusedElement=qt,U.getPageSizeInches=dt,U.getVisibleElements=w,U.isPortraitOrientation=Mt,U.isValidRotation=f,U.isValidScrollMode=st,U.isValidSpreadMode=et,U.normalizeWheelEventDelta=J,U.normalizeWheelEventDirection=X,U.parseQueryString=Gt,U.removeNullCharacters=Ut,U.roundToDivide=Pt,U.scrollIntoView=Xt,U.toggleCheckedBtn=bl,U.toggleExpandedBtn=il,U.watchScroll=zt;const P="auto";U.DEFAULT_SCALE_VALUE=P;const I=1;U.DEFAULT_SCALE=I;const g=1.1;U. Line truncated
`).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\{/g,"{").replace(/\\}/g,"}").replace(/\\"/g,'"').replace(/\\'/g,"'")}function Lt(Ht,Pt){var dt={},S=/^\s*|\s*$/,w=/^\s*#|^\s*$/,X=/^\s*\[(.*)\]\s*$/,J=/^\s*@import\s+url\((.*)\)\s*$/i,f=/^([^=\s]*)\s*=\s*(.+)$/;function st(Mt,Rt,gt){var Jt=Mt.replace(S,"").split(/[\r\n]+/),Dt="*",qt=Xt.split("-",1)[0],vt=!1,cl="";function bl(){for(;;){if(!Jt.length){gt();return}var il=Jt.shift();if(!w.test(il)){if(Rt){if(cl=X.exec(il),cl){Dt=cl[1].toLowerCase(),vt=Dt!=="*"&&Dt!==Xt&&Dt!==qt;continue}else if(vt)continue;if(cl=J.exec(il),cl){et(Nt+cl[1],bl);return}}var Bt=il.match(f);Bt&&Bt.length==3&&(dt[Bt[1]]=Ut(Bt[2]))}}}bl()}function et(Mt,Rt){K(Mt,function(gt){st(gt,!1,Rt)},function(){console.warn(Mt+" not found."),Rt()})}st(Ht,!0,function(){Pt(dt)})}K(it,function(Ht){p+=Ht,Lt(Ht,function(Pt){for(var dt in Pt){var S,w,X=dt.lastIndexOf(".");X>0?(S=dt.substring(0,X),w=dt.substring(X+1)):(S=dt,w=k),j[S]||(j[S]={}),j[S][w]=Pt[dt]}zt&&zt()})},Gt)}function M(it,Xt){it&&(it=it.toLowerCase()),Xt=Xt||function(){},u(),_=it;var zt=g(),Gt=zt.length;if(Gt===0){var Nt=L();if(Nt&&Nt.locales&&Nt.default_locale){if(console.log("using the embedded JSON directory, early way out"),j=Nt.locales[it],!j){var Ut=Nt.default_locale.toLowerCase();for(var Lt in Nt.locales)if(Lt=Lt.toLowerCase(),Lt===it){j=Nt.locales[it];break}else Lt===Ut&&(j=Nt.locales[Ut])}Xt()}else console.log("no resource to load, early way out");P="complete";return}var Ht=null,Pt=0;Ht=function(){Pt++,Pt>=Gt&&(Xt(),P="complete")};function dt(X){var J=X.href;this.load=function(f,st){H(J,f,st,function(){console.warn(J+" not found."),console.warn('"'+f+'" resource not found'),_="",st()})}}for(var S=0;S<Gt;S++){var w=new dt(zt[S]);w.load(it,Ht)}}function u(){j={},p="",_=""}function q(it){var Xt={af:3,ak:4,am:4,ar:1,asa:3,az:0,be:11,bem:3,bez:3,bg:3,bh:4,bm:0,bn:3,bo:0,br:20,brx:3,bs:11,ca:3,cgg:3,chr:3,cs:12,cy:17,da:3,de:3,dv:3,dz:0,ee:3,el:3,en:3,eo:3,es:3,et:3,eu:3,fa:0,ff:5,fi:3,fil:4,fo:3,fr:5,fur:3,fy:3,ga:8,gd:24,gl:3,gsw:3,gu:3,guw:4,gv:23,ha:3,haw:3,he:2,hi:4,hr:11,hu:0,id:0,ig:0,ii:0,is:3,it:3,iu:7,ja:0,jmc:3,jv:0,ka:0,kab:5,kaj:3,kcg:3,kde:0,kea:0,kk:3,kl:3,km:0,kn:0,ko:0,ksb:3,ksh:21,ku:3,kw:7,lag:18,lb:3,lg:3,ln:4,lo:0,lt:10,lv:6,mas:3,mg:4,mk:16,ml:3,mn:3,mo:9,mr:3,ms:0,mt:15,my:0,nah:3,naq:7,nb:3,nd:3,ne:3,nl:3,nn:3,no:3,nr:3,nso:4,ny:3,nyn:3,om:3,or:3,pa:3,pap:3,pl:13,ps:3,pt:3,rm:3,ro:9,rof:3,ru:11,rwk:3,sah:0,saq:3,se:7,seh:3,ses:0,sg:0,sh:11,shi:19,sk:12,sl:14,sma:7,smi:7,smj:7,smn:7,sms:7,sn:3,so:3,sq:3,sr:11,ss:3,ssy:3,st:3,sv:3,sw:3,syr:3,ta:3,te:3,teo:3,th:0,ti:4,tig:3,tk:3,tl:4,tn:3,to:0,tr:0,ts:3,tzm:22,uk:11,ur:3,ve:3,vi:0,vun:3,wa:4,wae:3,wo:0,xh:3,xog:3,yo:0,zh:0,zu:3};function zt(Lt,Ht){return Ht.indexOf(Lt)!==-1}function Gt(Lt,Ht,Pt){return Ht<=Lt&&Lt<=Pt}var Nt={0:function(Lt){return"other"},1:function(Lt){return Gt(Lt%100,3,10)?"few":Lt===0?"zero":Gt(Lt%100,11,99)?"many":Lt==2?"two":Lt==1?"one":"other"},2:function(Lt){return Lt!==0&&Lt%10===0?"many":Lt==2?"two":Lt==1?"one":"other"},3:function(Lt){return Lt==1?"one":"other"},4:function(Lt){return Gt(Lt,0,1)?"one":"other"},5:function(Lt){return Gt(Lt,0,2)&&Lt!=2?"one":"other"},6:function(Lt){return Lt===0?"zero":Lt%10==1&&Lt%100!=11?"one":"other"},7:function(Lt){return Lt==2?"two":Lt==1?"one":"other"},8:function(Lt){return Gt(Lt,3,6)?"few":Gt(Lt,7,10)?"many":Lt==2?"two":Lt==1?"one":"other"},9:function(Lt){return Lt===0||Lt!=1&&Gt(Lt%100,1,19)?"few":Lt==1?"one":"other"},10:function(Lt){return Gt(Lt%10,2,9)&&!Gt(Lt%100,11,19)?"few":Lt%10==1&&!Gt(Lt%100,11,19)?"one":"other"},11:function(Lt){return Gt(Lt%10,2,4)&&!Gt(Lt%100,12,14)?"few":Lt%10===0||Gt(Lt%10,5,9)||Gt(Lt%100,11,14)?"many":Lt%10==1&&Lt%100!=11?"one":"other"},12:function(Lt){return Gt(Lt,2,4)?"few":Lt==1?"one":"other"},13:function(Lt){return Gt(Lt%10,2,4)&&!Gt(Lt%100,12,14)?"few":Lt!=1&&Gt(Lt%10,0,1)||Gt(Lt%10,5,9)||Gt(Lt%100,12,14)?"many":Lt==1?"one":"other"},14:function(Lt){return Gt(Lt%100,3,4)?"few":Lt%100==2?"two":Lt%100==1?"one":"other"},15:function(Lt){return Lt===0||Gt(Lt%100,2,10)?"few":Gt(Lt%100,11,19)?"many":Lt==1?"one":"other"},16:function(Lt){return Lt%10==1&&Lt!=11?"one":"other"},17:function(Lt){return Lt==3?"few":Lt===0?"zero":Lt==6?"many":Lt==2?"two":Lt==1?"one":"other"},18:function(Lt){return Lt===0?"zero":Gt(Lt,0,2)&&Lt!==0&&Lt!=2?"one":"other"},19:function(Lt){return Gt(Lt,2,10)?"few":Gt(Lt,0,1)?"one":"other"},20:function(Lt){return(Gt(Lt%10,3,4)||Lt%10==9)&&!(Gt(Lt%100,10,19)||Gt(Lt%100,70,79)||Gt(Lt%100,90,99))?"few":Lt%1e6===0&&Lt!==0?"many":Lt%10==2&&!zt(Lt%100,[12,72,92])?"two":Lt%10==1&&!zt(Lt%100,[11,71,91])?"one":"other"},21:function(Lt){return Lt===0?"zero":Lt==1?"one":"other"},22:function(Lt){return Gt(Lt,0,1)||Gt(Lt,11,99)?"one":"other"},23:function(Lt){return Gt(Lt%10,1,2)||Lt%20===0?"one":"other"},24:function(Lt){return Gt(Lt,3,10)||Gt(Lt,13,19)?"few":zt(Lt,[2,12])?"two":zt(Lt,[1,11])?"one":"other"}},Ut=Xt[it.replac Line truncated
`);ot.push((0,jt.removeNullCharacters)(ut.join("")))}return ot.join(`
`)}setDocument(ot){var ut,Tt;if(this.pdfDocument&&(this.eventBus.dispatch("pagesdestroy",{source:this}),this._cancelRendering(),this._resetView(),(ut=this.findController)==null||ut.setDocument(null),(Tt=this._scriptingManager)==null||Tt.setDocument(null),t(this,L)&&(t(this,L).destroy(),Zl(this,L,null))),this.pdfDocument=ot,!ot)return;const Ct=ot.numPages,Ot=ot.getPage(1),Vt=ot.getOptionalContentConfig(),yt=t(this,H)?ot.getPermissions():Promise.resolve();if(Ct>Yl.FORCE_SCROLL_MODE_PAGE){console.warn("Forcing PAGE-scrolling for performance reasons, given the length of the document.");const Kt=this._scrollMode=jt.ScrollMode.PAGE;this.eventBus.dispatch("scrollmodechanged",{source:this,mode:Kt})}this._pagesCapability.promise.then(()=>{this.eventBus.dispatch("pagesloaded",{source:this,pagesCount:Ct})},()=>{}),this._onBeforeDraw=Kt=>{const tl=this._pages[Kt.pageNumber-1];tl&&t(this,P).push(tl)},this.eventBus._on("pagerender",this._onBeforeDraw),this._onAfterDraw=Kt=>{Kt.cssTransform||this._onePageRenderedCapability.settled||(this._onePageRenderedCapability.resolve({timestamp:Kt.timestamp}),this.eventBus._off("pagerendered",this._onAfterDraw),this._onAfterDraw=null,t(this,at)&&(document.removeEventListener("visibilitychange",t(this,at)),Zl(this,at,null)))},this.eventBus._on("pagerendered",this._onAfterDraw),Promise.all([Ot,yt]).then(([Kt,tl])=>{var el,ol;if(ot!==this.pdfDocument)return;this._firstPageCapability.resolve(Kt),this._optionalContentConfigPromise=Vt;const{annotationEditorMode:Qt,annotationMode:rl,textLayerMode:hl}=A(this,zt,Gt).call(this,tl);if(hl!==jt.TextLayerMode.DISABLE){const Wt=Zl(this,u,document.createElement("div"));Wt.id="hiddenCopyElement",this.viewer.before(Wt)}if(Qt!==Yt.AnnotationEditorType.DISABLE){const Wt=Qt;ot.isPureXfa?console.warn("Warning: XFA-editing is not implemented."):Vl(Wt)?(Zl(this,L,new Yt.AnnotationEditorUIManager(this.container,this.viewer,t(this,I),this.eventBus,ot,this.pageColors)),Wt!==Yt.AnnotationEditorType.NONE&&t(this,L).updateMode(Wt)):console.error(`Invalid AnnotationEditor mode: ${Wt}`)}const Il=A(this,it,Xt).bind(this),Wl=this._scrollMode===jt.ScrollMode.PAGE?null:this.viewer,nt=this.currentScale,R=Kt.getViewport({scale:nt*Yt.PixelsPerInch.PDF_TO_CSS_UNITS});this.viewer.style.setProperty("--scale-factor",R.scale),(((el=this.pageColors)==null?void 0:el.foreground)==="CanvasText"||((ol=this.pageColors)==null?void 0:ol.background)==="Canvas")&&this.viewer.style.setProperty("--hcm-highligh-filter",ot.filterFactory.addHighlightHCMFilter("CanvasText","Canvas","HighlightText","Highlight"));for(let Wt=1;Wt<=Ct;++Wt){const pt=new al.PDFPageView({container:Wl,eventBus:this.eventBus,id:Wt,scale:nt,defaultViewport:R.clone(),optionalContentConfigPromise:Vt,renderingQueue:this.renderingQueue,textLayerMode:hl,annotationMode:rl,imageResourcesPath:this.imageResourcesPath,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported,maxCanvasPixels:this.maxCanvasPixels,pageColors:this.pageColors,l10n:this.l10n,layerProperties:Il});this._pages.push(pt)}const ct=this._pages[0];ct&&(ct.setPdfPage(Kt),this.linkService.cachePageRef(1,Kt.ref)),this._scrollMode===jt.ScrollMode.PAGE?A(this,Pt,dt).call(this):this._spreadMode!==jt.SpreadMode.NONE&&this._updateSpreadMode(),A(this,Nt,Ut).call(this).then(async()=>{var Wt,pt;if((Wt=this.findController)==null||Wt.setDocument(ot),(pt=this._scriptingManager)==null||pt.setDocument(ot),t(this,u)&&(Zl(this,K,A(this,Lt,Ht).bind(this,hl)),document.addEventListener("copy",t(this,K))),t(this,L)&&this.eventBus.dispatch("annotationeditormodechanged",{source:this,mode:t(this,g)}),ot.loadingParams.disableAutoFetch||Ct>Yl.FORCE_LAZY_PAGE_INIT){this._pagesCapability.resolve();return}let kt=Ct-1;if(kt<=0){this._pagesCapability.resolve();return}for(let Et=2;Et<=Ct;++Et){const sl=ot.getPage(Et).then(ml=>{const dl=this._pages[Et-1];dl.pdfPage||dl.setPdfPage(ml),this.linkService.cachePageRef(Et,ml.ref),--kt===0&&this._pagesCapability.resolve()},ml=>{console.error(`Unable to get page ${Et} to initialize viewer`,ml),--kt===0&&this._pagesCapability.resolve()});Et%Yl.PAUSE_EAGER_PAGE_INIT===0&&await sl}}),this.eventBus.dispatch("pagesinit",{source:this}),ot.getMetadata().then(({info:Wt})=>{ot===this.pdfDocument&&Wt.Language&&(this.viewer.lang=Wt.Language)}),this.defaultRenderingQueue&&this.update()}).catch(Kt=>{console.error("Unable to initialize viewer",Kt),this._pagesCapability.reject(Kt)})}setPageLabels(ot){var ut;if(this.pdfDocument){ot?Array.isArray(ot)&&this.pdfDocument.numPages===ot.length?this._pageLabels=ot:(this._pageLabels=null,console.error("setPageLabels: Invalid page labels.")):this._pageLabels=null;for(let Tt=0,Ct=this._pages.length;Tt<Ct;Tt++)this._pages[Tt].setPageLabel(((ut=this._pageLabels)==null?void 0:ut[Tt])??null)}}_resetView(){this._pages=[],this._currentPageNumber=1,this._currentScale=jt.UNKNOWN_SCALE,this._currentScaleValue=null,this._pageLabels=null,Zl(this,P,new yl(Xl)),this._location=null,this._pagesRotation=0,this._optionalContentConfigPromis Line truncated
@page {
margin: 0;
size: ${r}pt ${h}pt;
}
body {
margin: 0;
}
canvas {
width: 100%;
page-break-after: always;
page-break-before: avoid;
page-break-inside: avoid;
}
`,$.contentWindow.document.head.appendChild(m),$.contentWindow.document.body.style.width="100%"}function createPrintIframe($){return new Promise(r=>{const h=document.createElement("iframe");h.width="0",h.height="0",h.style.position="absolute",h.style.top="0",h.style.left="0",h.style.border="none",h.style.overflow="hidden",h.onload=()=>r(h),$.appendChild(h)})}function downloadPdf($,r){const h=URL.createObjectURL(new Blob([$],{type:"application/pdf"})),m=document.createElement("a");m.href=h,m.download=r,m.style.display="none",document.body.append(m),m.click(),setTimeout(()=>{URL.revokeObjectURL(h),document.body.removeChild(m)},1e3)}function emptyElement($){for(;$!=null&&$.firstChild;)$.removeChild($.firstChild)}function releaseChildCanvases($){$==null||$.querySelectorAll("canvas").forEach(r=>{var h;r.width=1,r.height=1,(h=r.getContext("2d"))==null||h.clearRect(0,0,1,1)})}const _hoisted_1=["id"],_hoisted_2=["id"],_hoisted_3=createBaseVNode("canvas",null,null,-1),_hoisted_4={key:0,class:"textLayer"},_hoisted_5={key:1,class:"annotationLayer"},_sfc_main$3=defineComponent({__name:"VuePdfEmbed",props:{annotationLayer:{type:Boolean},height:{},id:{},imageResourcesPath:{},page:{},rotation:{default:0},scale:{},source:{},textLayer:{type:Boolean},width:{}},emits:["internal-link-clicked","loaded","loading-failed","password-requested","progress","rendered","rendering-failed"],setup($,{expose:r,emit:h}){const m=$,T=shallowRef([]),B=shallowRef([]),v=ref([]),U=shallowRef(null),{doc:j}=useVuePdfEmbed({onError:C=>{T.value=[],h("loading-failed",C)},onPasswordRequest({callback:C,isWrongPassword:F}){h("password-requested",{callback:C,isWrongPassword:F})},onProgress:C=>{h("progress",C)},source:toRef(m,"source")}),p=computed(()=>{if(!j.value||!m.annotationLayer)return null;const C=new pdf_viewerExports.PDFLinkService;return C.setDocument(j.value),C.setViewer({scrollPageIntoView:({pageNumber:F})=>{h("internal-link-clicked",F)}}),C}),k=async C=>{if(!j.value)return;const F=await j.value.getData(),K=await j.value.getMetadata(),H=C??K.contentDispositionFilename??"";downloadPdf(F,H)},_=C=>{let F,K;return m.height&&!m.width?(K=m.height,F=K/C):(F=m.width??U.value.clientWidth,K=F*C),[F,K]},O=async(C=300,F="",K=!1)=>{var H,M,u;if(!j.value)return;const q=C/72,lt=96/72;let Q,Zt,at;try{Q=window.document.createElement("div"),Q.style.display="none",window.document.body.appendChild(Q),Zt=await createPrintIframe(Q);const It=m.page&&!K?[m.page]:[...Array(j.value.numPages+1).keys()].slice(1);await Promise.all(It.map(async(xt,it)=>{const Xt=await j.value.getPage(xt),zt=Xt.getViewport({scale:1,rotation:0});if(it===0){const Ut=zt.width*q/lt,Lt=zt.height*q/lt;addPrintStyles(Zt,Ut,Lt)}const Gt=window.document.createElement("canvas");Gt.width=zt.width*q,Gt.height=zt.height*q,Q.appendChild(Gt);const Nt=Gt.cloneNode();Zt.contentWindow.document.body.appendChild(Nt),await Xt.render({canvasContext:Gt.getContext("2d"),intent:"print",transform:[q,0,0,q,0,0],viewport:zt}).promise,Nt.getContext("2d").drawImage(Gt,0,0)})),F&&(at=window.document.title,window.document.title=F),(H=Zt.contentWindow)==null||H.focus(),(M=Zt.contentWindow)==null||M.print()}finally{at&&(window.document.title=at),releaseChildCanvases(Q),(u=Q.parentNode)==null||u.removeChild(Q)}},P=async()=>{if(j.value)try{T.value=m.page?[m.page]:[...Array(j.value.numPages+1).keys()].slice(1),v.value=Array(T.value.length).fill(1),await Promise.all(T.value.map(async(C,F)=>{const K=await j.value.getPage(C),H=((m.rotation%90===0?m.rotation:0)+K.rotate)%360,[M,u,q]=Array.from(B.value[F].children),lt=!!(H/90%2),[Q,Zt]=_(lt?K.view[2]/K.view[3]:K.view[3]/K.view[2]),at=`${Math.floor(Q)}px`,It=`${Math.floor(Zt)}px`,xt=lt?K.view[3]:K.view[2],it=m.scale??Q/xt,Xt=K.getViewport({scale:it,rotation:H});v.value[F]=it,M.style.width=at,M.style.height=It,u&&(u.style.width=lt?It:at,u.style.height=lt?at:It),q&&(q.style.width=lt?It:at,q.style.height=lt?at:It),await I(K,Xt,M),m.textLayer&&await L(K,Xt.clone({dontFlip:!0}),u),m.annotationLayer&&await g(K,Xt.clone({dontFlip:!0}),q||u)})),h("rendered")}catch(C){T.value=[],v.value=[],h("rendering-failed",C)}},I=async(C,F,K)=>{K.width=F.width,K.height=F.height,await C.render({canvasContext:K.getContext("2d"),viewport:F}).promise},g=async(C,F,K)=>{emptyElement(K),new pdfExports.AnnotationLayer({accessibilityManager:null,annotationCanvasMap:null,div:K,l10n:null,page:C,viewport:F}).render({annotations:await C.getAnnotations(),div:K,downloadManager:null,imageResourcesPath:m.imageResourcesPath,linkService:p.value,page:C,renderForms:!1,viewport:F})},L=async(C,F,K)=>{emptyElement(K),await pdfExports.renderTextLayer({container:K,textContentSource:await C.getTextContent(),viewport:F}).promise};return watch(j,()=>{j.value&&h("loaded",j.value)},{immediate:!0}),watch(()=>m.source,()=>{releaseChildCanvases(U.value)}),watch(()=>[j.value,m.annotationLayer,m.height,m.imageResourcesPath,m.page,m.rotation,m.scale,m.textLayer,m.width],()=>{j.value&&P()},{immediate:!0}),onBeforeUnmount(()=>{releaseChildC Line truncated