@quoreadmin/ui 0.28.10 → 0.28.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +100 -94
- package/dist/index.umd.cjs +5 -5
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(ee,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],a):(ee=typeof globalThis<"u"?globalThis:ee||self,a(ee.QuoreUI={},ee.Vue))})(this,function(ee,a){"use strict";var d1e=Object.defineProperty;var u1e=(ee,a,ft)=>a in ee?d1e(ee,a,{enumerable:!0,configurable:!0,writable:!0,value:ft}):ee[a]=ft;var be=(ee,a,ft)=>(u1e(ee,typeof a!="symbol"?a+"":a,ft),ft),fv=(ee,a,ft)=>{if(!a.has(ee))throw TypeError("Cannot "+ft)};var g=(ee,a,ft)=>(fv(ee,a,"read from private field"),ft?ft.call(ee):a.get(ee)),E=(ee,a,ft)=>{if(a.has(ee))throw TypeError("Cannot add the same private member more than once");a instanceof WeakSet?a.add(ee):a.set(ee,ft)},A=(ee,a,ft,pe)=>(fv(ee,a,"write to private field"),pe?pe.call(ee,ft):a.set(ee,ft),ft);var Xn=(ee,a,ft,pe)=>({set _(x5){A(ee,a,x5,ft)},get _(){return g(ee,a,pe)}}),I=(ee,a,ft)=>(fv(ee,a,"access private method"),ft);var Uc,n5,Uf,hv,Zf,El,Ml,ei,Al,Wf,qf,b3,oN,w3,sN,v3,aN,Zc,r5,C3,lN,Kf,pv,Gf,Tl,Il,k3,cN,S3,dN,E3,uN,M3,Yf,A3,Br,Qf,mv,Ht,Gs,Xf,Ut,tN,T3,fN,Wc,dr,Ot,rn,qc,Io,Kc,ti,Ys,Gc,xl,Bi,ni,Ol,Jf,e1,Yc,t1,_i,Qs,Qc,Xs,Ri,x3,Js,n1,ea,Dl,r1,i1,Zt,Ze,xo,Nl,o1,s1,ta,$i,Oo,a1,Xc,i5,l1,gv,O3,hN,D3,pN,Jc,o5,N3,mN,P3,gN,L3,yN,c1,yv,B3,bN,d1,bv,u1,wv,_3,wN,on,Bn,Vi,Oa,R3,vN,$3,CN,f1,vv,V3,kN,Pl,Xh,h1,Cv,Wt,Fi,ri,ji,ur,td,zi,Yn,Do,Ll,Hi,nd,s5,rd,a5,Bl,ii,ct,id,_l,sn,Rl,na,p1,$l,ra,m1,Vl,No,Ui,od,sd,Rr,g1,F3,y1,kv,b1,Sv,w1,Ev,j3,SN,z3,EN,v1,Mv,C1,Av,k1,Tv,H3,MN,S1,Iv,U3,AN,Z3,TN,W3,IN,E1,xv,Fl,Jh,jl,zl,qt,q3,xN,M1,ad,A1,Ov,T1,Dv,I1,x1,G3,ON,Y3,DN,ld,l5,Hl,O1,D1,N1,P1,cd,ia,Ye,dd,ud,L1,Nv,nN,oa,Qn,B1,_1,Ul,Po,R1,$1,Zl,fd,hd,sa,pd,V1,md,Wl,F1,j1,ql,Kl,aa,gd,Q3,NN,X3,PN,z1,Pv,yd,c5,J3,LN,ey,BN,Gl,Yl,Zi,Lo,wn,ty,Ql,Gt,Cn,la,hu,ca,pu,bd,d5,da,mu,ny,_N,H1,Lv,ua,gu,Xl,ep,Jl,tp,U1,Bv,e0,np,rN,ry,fa,Bo,ha,yu,wd,u5,t0,oy,sy,n0,r0,vd,f5,Cd,h5,_o,Wi,kd,Sd,qi,i0,rp,oi,Z1,_v,pa,ma,o0,a0,Ed,Md,W1,Rv,Ro,R0,ay,RN,ly,$N,Ad,cy,dy,Td,l0,mt,$o,Id,q1,K1,xd,Vo,si,Fo,G1,jo,Y1,c0,d0,Od,p5,Q1,$v,uy,VN,fy,FN,hy,jN,py,zN,Dd,m5,Nd,g5,X1,Vv,J1,eh,th,nh,rh,ih,oh,Fv,sh,u0,f0,my,HN,ah,jv,ai,fr,lh,h0,hr,Pd,gy,UN,yy,ZN,by,WN,Ld,y5,Bd,b5,_d,w5,wy,qN,ch,zv,vy,KN,dh,ga,li,Cy,GN,Rd,v5,ky,YN,Sy,QN,uh,Hv,fh,$d,Ki,zo,Vd,Fd,Gi,Oe,p0,m0,hh,ph,jd,zd,ya,mh,Ey,My,gh,Uv,Hd,g0,Uo,yh,pr,bh,vt,y0,ip,b0,op,Ay,XN,wh,vh,ci,w0,Ud,Dt,Ch,Zd,kh,Sh,di,Wd,Eh,Zv,Mh,Wv,Ty,JN,Zo,$0,Iy,eP,Yi,Da,qd,Ah,ba,v0,Kd,$r,Th,Ih,C0,ui,On,mr,Gd,k0,Nt,Yd,Qi,xh,Oh,qv,Dh,Kv,xy,tP,Oy,nP,Dy,rP,Nh,Gv,S0,sp,wa,bu,Ny,iP,Qd,C5,E0,ap,Py,oP,Ly,sP,By,aP,_y,lP,M0,A0,Xi,qo,Vr,T0,I0,x0,Ko,Xd,O0,D0,va,Ry,cP,$y,dP,Vy,uP,Fy,fP,Ph,Yv,jy,hP,Lh,Qv,zy,pP,Hy,mP,Uy,gP,Zy,yP,Wy,bP,Go,V0,Bh,Xv,_h,Jv,Rh,e8,Jd,k5,eu,S5,Ca,wu,$h,t8,tu,E5,qy,wP,Vh,n8,Ky,vP,Gy,CP,Fh,r8,nu,M5,N0,lp,Ct,an,ka,Yo,Sa,ru,Ji,Qo,eo,Fr,jh,P0,cp,L0,dp,iu,A5,zh,i8,Yy,kP,Hh,o8,Uh,s8,ou,T5,Qy,SP,B0,su,to,Ea,Xo,gr,Ma,au,lu,Dn,Jo,fe,Aa,Xy,EP,Wh,a8,qh,l8,Kh,c8,cu,I5,no,Gh,Pt,Ta,Yh,d8,Qh,u8,Jy,MP;const ft=a.defineComponent({name:"QAccordion",props:{modelValue:{type:[Boolean,Number],default:!1},variant:{type:String,default:"white"},triggerText:{type:String,default:""},triggerClass:{type:[String,Array,Object],default:""},contentClass:{type:[String,Array,Object],default:""},chevronClass:{type:[String,Array,Object],default:""},chevronSize:{type:String,default:""}},emits:["update:modelValue"],setup(n,{emit:e,slots:t}){const r=a.computed({get:()=>!!n.modelValue,set:u=>e("update:modelValue",u)}),i=a.computed(()=>!!t.text),o=a.computed(()=>{const u=r.value?"Hide":"Show";return s.value?u:n.triggerText}),s=a.computed(()=>n.variant==="bubble"),l=a.computed(()=>["leading-normal font-bold",{"text-md":n.variant==="white"},{"text-base":n.variant==="gray"},{"flex-grow":n.variant!=="bubble"},{"flex-shrink mr-2 text-gray-40 text-sm":n.variant==="bubble"}]),c=a.computed(()=>n.chevronSize||(s.value?"sm":"md"));return{show:r,hasTextSlot:i,triggerTextClasses:l,isBubbleAccordion:s,triggerTextValue:o,triggerIconSize:c,onToggle:()=>{r.value=!r.value}}}}),pe=(n,e)=>{const t=n.__vccOpts||n;for(const[r,i]of e)t[r]=i;return t},x5=["value"],TP={key:0,class:"flex-grow border-t border-gray-20"},IP={key:1,class:"flex-grow border-t border-gray-20"};function xP(n,e,t,r,i,o){const s=a.resolveComponent("q-icon");return a.openBlock(),a.createElementBlock("div",{value:n.modelValue,class:a.normalizeClass(["accordion","accordion-"+n.variant,{"is-open":!!n.modelValue}])},[a.renderSlot(n.$slots,"toggle",a.normalizeProps(a.guardReactiveProps({onToggle:n.onToggle})),()=>[a.createElementVNode("div",{class:a.normalizeClass(["accordion-trigger",n.triggerClass,{"py-5":n.isBubbleAccordion}]),onClick:e[0]||(e[0]=(...l)=>n.onToggle&&n.onToggle(...l))},[n.isBubbleAccordion?(a.openBlock(),a.createElementBlock("div",TP)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["flex items-center",{"w-full":!n.isBubbleAccordion},{"border border-gray-20 rounded-full px-8 py-2 w-32":n.isBubbleAccordion}])},[n.hasTextSlot?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(n.triggerTextClasses)},[a.renderSlot(n.$slots,"text",{},void 0,!0)],2)):(a.openBlock(),a.createElementBlock("h4",{key:1,class:a.normalizeClass(n.triggerTextClasses)},a.toDisplayString(n.triggerTextValue),3)),a.renderSlot(n.$slots,"additionalInfo",{},void 0,!0),a.createVNode(s,{icon:"chevron-down",color:"gray-40",size:n.triggerIconSize,type:"",class:a.normalizeClass(["shrink-0 mr-4",n.chevronClass,{open:!!n.show}])},null,8,["size","class"])],2),n.isBubbleAccordion?(a.openBlock(),a.createElementBlock("div",IP)):a.createCommentVNode("",!0)],2)],!0),a.createVNode(a.Transition,{name:"slide-down"},{default:a.withCtx(()=>[n.show?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["accordion-content",n.contentClass,{"p-0":n.variant==="custom"}])},[a.renderSlot(n.$slots,"content",{},void 0,!0)],2)):a.createCommentVNode("",!0)]),_:3})],10,x5)}const OP=pe(ft,[["render",xP],["__scopeId","data-v-c7b4341d"]]),DP=a.defineComponent({name:"QActivityItem",props:{type:{type:String,default:"history"},text:{type:String,default:""},time:{type:String,default:""}},emits:["click"],setup(n,{emit:e}){const t=a.computed(()=>{switch(n.type){case"request":return"bell-concierge";case"work-order":return"hammer";case"complaint":return"face-sad";case"follow-up":return"check";case"satisfaction-call":return"phone-plus";default:return"history"}}),r=a.computed(()=>n.type==="history");return{props:n,isHistory:r,typeIcon:t,handleClick:()=>{e("click")}}}}),NP={class:"activity-item__content"},PP={class:"activity-item__content-text"},LP={key:0},BP={class:"activity-item__time"},_P={key:0};function RP(n,e,t,r,i,o){const s=a.resolveComponent("q-icon");return a.openBlock(),a.createElementBlock("button",{class:a.normalizeClass(["activity-item",{"bg-gray-0":!n.isHistory}]),onClick:e[0]||(e[0]=(...l)=>n.handleClick&&n.handleClick(...l))},[a.createElementVNode("div",NP,[a.createElementVNode("div",{class:a.normalizeClass(["flex justify-center items-center rounded w-6 h-6","activity-item__content-icon-"+n.props.type])},[a.createVNode(s,{icon:n.typeIcon,type:"fill",size:"sm",color:"white"},null,8,["icon"])],2),a.createElementVNode("div",PP,[n.props.text?(a.openBlock(),a.createElementBlock("span",LP,a.toDisplayString(n.props.text),1)):a.renderSlot(n.$slots,"text",{key:1},void 0,!0)])]),a.createElementVNode("div",BP,[n.props.time?(a.openBlock(),a.createElementBlock("span",_P,a.toDisplayString(n.props.time),1)):a.renderSlot(n.$slots,"time",{key:1},void 0,!0)])],2)}const $P=pe(DP,[["render",RP],["__scopeId","data-v-fe298230"]]),VP=a.defineComponent({name:"QAvatar",props:{size:{type:String,default:"sm"},text:{type:[String],default:""},bgColor:{type:String,default:"teal-20"},src:{type:String,default:""}},setup(){const n=a.ref(!0),e=a.ref(!1);return{validSrc:n,isLoaded:e,onImageLoad:()=>{e.value=!0},onImageError:()=>{n.value=!1}}}}),FP={class:"avatar-text"},jP=["src"];function zP(n,e,t,r,i,o){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["avatar flex justify-center items-center",[`avatar-${n.size}`,`bg-${n.bgColor}`]])},[a.createElementVNode("span",FP,a.toDisplayString(n.text),1),n.src&&n.validSrc?(a.openBlock(),a.createElementBlock("img",{key:0,class:"avatar-image",src:n.src,onLoad:e[0]||(e[0]=(...s)=>n.onImageLoad&&n.onImageLoad(...s)),onError:e[1]||(e[1]=(...s)=>n.onImageError&&n.onImageError(...s))},null,40,jP)):a.createCommentVNode("",!0)],2)}const g8=pe(VP,[["render",zP],["__scopeId","data-v-ebde1d6f"]]),HP=a.defineComponent({props:{backgroundColor:{type:String,default:"blue-20"},textColor:{type:String,default:"white"}}}),UP={class:"banner-text mb-0"};function ZP(n,e,t,r,i,o){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["q-banner flex","bg-"+n.backgroundColor,"text-"+n.textColor]),onClick:e[0]||(e[0]=s=>n.$emit("bannerClick"))},[a.createElementVNode("p",UP,[a.renderSlot(n.$slots,"default",{},void 0,!0)])],2)}const WP=pe(HP,[["render",ZP],["__scopeId","data-v-8edf76be"]]),qP=a.defineComponent({name:"QBadge",props:{color:{type:String,default:""},shape:{type:String,default:"circle"}},setup(n,e){const t=a.computed(function(){return n.color?`bg-${n.color}`:""}),r=a.computed(function(){return!!e.slots.icon});return{bgColor:t,hasIcon:r}}}),KP={key:1,class:"badge-text"};function GP(n,e,t,r,i,o){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["badge",n.shape,n.bgColor])},[n.hasIcon?a.renderSlot(n.$slots,"icon",{key:0},void 0,!0):(a.openBlock(),a.createElementBlock("p",KP,[a.renderSlot(n.$slots,"text",{},void 0,!0)]))],2)}const ns=pe(qP,[["render",GP],["__scopeId","data-v-c8e6730f"]]);function YP(){try{return"constructor"in GestureEvent}catch{return!1}}function y8(){return typeof window<"u"&&"ontouchstart"in window}function b8(n){return"pointerId"in n?null:n.type==="touchend"?n.changedTouches:n.targetTouches}function w8(n){return Array.from(b8(n)).map(e=>e.identifier)}function v8(n){const e="buttons"in n?n.buttons:0,{shiftKey:t,altKey:r,metaKey:i,ctrlKey:o}=n;return{buttons:e,shiftKey:t,altKey:r,metaKey:i,ctrlKey:o}}const QP=n=>n;function C8(n,e=QP){const t=b8(n),{clientX:r,clientY:i}=t?t[0]:n;return e([r,i])}function k8(){}function S8(...n){return n.length===0?k8:n.length===1?n[0]:function(){var e;for(let t of n)e=t.apply(this,arguments)||e;return e}}function rs(n,e){if(n===void 0){if(e===void 0)throw new Error("Must define fallback value if undefined is expected");n=e}return Array.isArray(n)?n:[n,n]}function E8(n,...e){return typeof n=="function"?n(...e):n}function vu(n){return{_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,_dragStarted:!1,_dragPreventScroll:!1,_dragIsTap:!0,_dragDelayed:!1,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:k8,canceled:!1,memo:void 0,args:void 0,...n}}function O5(){const n={hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1,locked:!1},e=vu({_pointerId:void 0,axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,tap:!1,swipe:[0,0]}),t=vu({_pointerIds:[],da:[0,0],vdva:[0,0],origin:void 0,turns:0}),r=vu({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=vu({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),o=vu({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0});return{shared:n,drag:e,pinch:t,wheel:r,move:i,scroll:o}}var XP=Object.defineProperty,JP=(n,e,t)=>e in n?XP(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,_n=(n,e,t)=>(JP(n,typeof e!="symbol"?e+"":e,t),t);class eL{constructor(e){this.classes=e,_n(this,"nativeRefs"),_n(this,"config"),_n(this,"handlers"),_n(this,"state"),_n(this,"timeouts"),_n(this,"domListeners"),_n(this,"windowListeners"),_n(this,"pointerIds",new Set),_n(this,"touchIds",new Set),_n(this,"supportsTouchEvents",y8()),_n(this,"supportsGestureEvents",YP()),_n(this,"bind",(...t)=>{const r={};for(let i of this.classes)new i(this,t).addBindings(r);for(let i in this.nativeRefs)mi(r,i,o=>this.nativeRefs[i]({...this.state.shared,event:o,args:t}));return this.config.domTarget?sL(this,r):aL(this,r)}),_n(this,"clean",()=>{const{eventOptions:t,domTarget:r}=this.config,i=a.unref(r);i&&Cu(i,M8(this.domListeners),t),Object.values(this.timeouts).forEach(clearTimeout),rL(this)}),_n(this,"reset",()=>{this.state=O5()}),this.classes=e,this.state=O5(),this.timeouts={},this.domListeners=[],this.windowListeners={}}}function tL(n,e){"pointerId"in e?n.pointerIds.add(e.pointerId):n.touchIds=new Set(w8(e))}function nL(n,e){"pointerId"in e?n.pointerIds.delete(e.pointerId):w8(e).forEach(t=>n.touchIds.delete(t))}function rL(n){const{config:{window:e,eventOptions:t},windowListeners:r}=n,i=a.unref(e);if(i){for(let o in r){const s=r[o];Cu(i,s,t)}n.windowListeners={}}}function iL({config:n,windowListeners:e},t,r=n.eventOptions){const i=a.unref(n.window);i&&(Cu(i,e[t],r),delete e[t])}function oL({config:n,windowListeners:e},t,r=[],i=n.eventOptions){const o=a.unref(n.window);o&&(Cu(o,e[t],i),A8(o,e[t]=r,i))}function sL({config:n,domListeners:e},t){const{eventOptions:r,domTarget:i}=n,o=a.unref(i);if(!o)throw new Error("domTarget must be defined");Cu(o,M8(e),r);for(let[s,l]of Object.entries(t)){const c=s.slice(2).toLowerCase();e.push([c,S8(...l)])}A8(o,e,r)}function aL({config:n},e){const t={},r=n.eventOptions.capture?"Capture":"";for(let[i,o]of Object.entries(e)){const s=Array.isArray(o)?o:[o],l=i+r;t[l]=S8(...s)}return t}function M8(n=[]){return n.splice(0,n.length)}function mi(n,e,t){n[e]||(n[e]=[]),n[e].push(t)}function A8(n,e=[],t={}){if(n)for(let[r,i]of e)n.addEventListener(r,i,t)}function Cu(n,e=[],t={}){if(n)for(let[r,i]of e)n.removeEventListener(r,i,t)}function D5(n,e){return n.map((t,r)=>t+e[r])}function T8(n,e){return n.map((t,r)=>t-e[r])}function N5(n){return Math.hypot(...n)}function lL(n,e,t){const r=N5(e),i=r===0?0:1/r,o=t===0?0:1/t,s=o*r,l=e.map(u=>o*u),c=e.map(u=>i*u),d=N5(n);return{velocities:l,velocity:s,distance:d,direction:c}}function P5(n){return Math.sign?Math.sign(n):+(n>0)-+(n<0)||+n}function cL(n,e,t){return Math.max(e,Math.min(n,t))}function dL(n,e){return Math.pow(n,e*5)}function I8(n,e,t){return e===0||Math.abs(e)===1/0?dL(n,t):n*e*t/(e+t*n)}function x8(n,e,t,r=.15){return r===0?cL(n,e,t):n<e?-I8(e-n,t-e,r)+e:n>t?+I8(n-t,t-e,r)+t:n}var uL=Object.defineProperty,fL=(n,e,t)=>e in n?uL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,up=(n,e,t)=>(fL(n,typeof e!="symbol"?e+"":e,t),t);const Na=new Map,hL=n=>n;class pL{constructor(e,t=[]){this.controller=e,this.args=t,up(this,"debounced",!0),up(this,"setTimeout",(r,i=140,...o)=>{clearTimeout(this.controller.timeouts[this.stateKey]),this.controller.timeouts[this.stateKey]=window.setTimeout(r,i,...o)}),up(this,"clearTimeout",()=>{clearTimeout(this.controller.timeouts[this.stateKey])}),up(this,"fireGestureHandler",(r=!1)=>{if(this.state._blocked)return this.debounced||(this.state._active=!1,this.clean()),null;if(!r&&!this.state.intentional&&!this.config.triggerAllEvents)return null;if(this.state.intentional){const c=this.state.active,d=this.state._active;this.state.active=d,this.state.first=d&&!c,this.state.last=c&&!d,this.controller.state.shared[this.ingKey]=d}const i=this.controller.pointerIds.size||this.controller.touchIds.size,o=this.controller.state.shared.buttons>0||i>0,s={...this.controller.state.shared,...this.state,...this.mapStateValues(this.state),locked:!!document.pointerLockElement,touches:i,down:o},l=this.handler(s);return this.state.memo=l!==void 0?l:this.state.memo,s}),this.controller=e,this.args=t}get config(){return this.controller.config[this.stateKey]}get enabled(){return this.controller.config.enabled&&this.config.enabled}get state(){return this.controller.state[this.stateKey]}get handler(){return this.controller.handlers[this.stateKey]}get transform(){return this.config.transform||this.controller.config.transform||hL}updateSharedState(e){Object.assign(this.controller.state.shared,e)}updateGestureState(e){Object.assign(this.state,e)}checkIntentionality(e,t){return{_intentional:e,_blocked:!1}}getMovement(e){const{rubberband:t,threshold:r}=this.config,{_bounds:i,_initial:o,_active:s,_intentional:l,lastOffset:c,movement:d}=this.state,u=this.getInternalMovement(e,this.state),f=this.transform(r).map(Math.abs),h=l[0]===!1?O8(u[0],f[0]):l[0],p=l[1]===!1?O8(u[1],f[1]):l[1],m=this.checkIntentionality([h,p],u);if(m._blocked)return{...m,_movement:u,delta:[0,0]};const y=m._intentional,b=u;let w=[y[0]!==!1?u[0]-y[0]:0,y[1]!==!1?u[1]-y[1]:0];const v=D5(w,c),k=s?t:[0,0];return w=D8(i,D5(w,o),k),{...m,intentional:y[0]!==!1||y[1]!==!1,_initial:o,_movement:b,movement:w,values:e,offset:D8(i,v,k),delta:T8(w,d)}}clean(){this.clearTimeout()}}function O8(n,e){return Math.abs(n)>=e?P5(n)*e:!1}function D8(n,[e,t],[r,i]){const[[o,s],[l,c]]=n;return[x8(e,o,s,r),x8(t,l,c,i)]}function L5({state:n},e,t){const{timeStamp:r,type:i}=e,o=n.values,s=t?0:r-n.startTime;return{_lastEventType:i,event:e,timeStamp:r,elapsedTime:s,previous:o}}function mL({state:n,config:e,stateKey:t,args:r},i,o){const s=n.offset,l=o.timeStamp,{initial:c,bounds:d}=e,u={...O5()[t],_active:!0,args:r,values:i,initial:i,offset:s,lastOffset:s,startTime:l};return{...u,_initial:E8(c,u),_bounds:E8(d,u)}}class gL extends pL{getInternalMovement(e,t){return T8(e,t.initial)}checkIntentionality(e,t){if(e[0]===!1&&e[1]===!1)return{_intentional:e,axis:this.state.axis};const[r,i]=t.map(Math.abs),o=this.state.axis||(r>i?"x":r<i?"y":void 0);return!this.config.axis&&!this.config.lockDirection?{_intentional:e,_blocked:!1,axis:o}:o?this.config.axis&&o!==this.config.axis?{_intentional:e,_blocked:!0,axis:o}:(e[o==="x"?1:0]=!1,{_intentional:e,_blocked:!1,axis:o}):{_intentional:[!1,!1],_blocked:!1,axis:o}}getKinematics(e,t){const r=this.getMovement(e);if(!r._blocked){const i=t.timeStamp-this.state.timeStamp;Object.assign(r,lL(r.movement,r.delta,i))}return r}mapStateValues(e){return{xy:e.values,vxvy:e.velocities}}}var yL=Object.defineProperty,bL=(n,e,t)=>e in n?yL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Yt=(n,e,t)=>(bL(n,typeof e!="symbol"?e+"":e,t),t);const wL=3;function N8(n){"persist"in n&&typeof n.persist=="function"&&n.persist()}class vL extends gL{constructor(){super(...arguments),Yt(this,"ingKey","dragging"),Yt(this,"stateKey","drag"),Yt(this,"setPointerCapture",e=>{if(this.config.useTouch||document.pointerLockElement)return;const{target:t,pointerId:r}=e;t&&"setPointerCapture"in t&&t.setPointerCapture(r),this.updateGestureState({_dragTarget:t,_dragPointerId:r})}),Yt(this,"releasePointerCapture",()=>{if(this.config.useTouch||document.pointerLockElement)return;const{_dragTarget:e,_dragPointerId:t}=this.state;if(t&&e&&"releasePointerCapture"in e&&(!("hasPointerCapture"in e)||e.hasPointerCapture(t)))try{e.releasePointerCapture(t)}catch{}}),Yt(this,"preventScroll",e=>{this.state._dragPreventScroll&&e.cancelable&&e.preventDefault()}),Yt(this,"getEventId",e=>this.config.useTouch?e.changedTouches[0].identifier:e.pointerId),Yt(this,"isValidEvent",e=>this.state._pointerId===this.getEventId(e)),Yt(this,"shouldPreventWindowScrollY",this.config.preventWindowScrollY&&this.controller.supportsTouchEvents),Yt(this,"setUpWindowScrollDetection",e=>{N8(e),oL(this.controller,this.stateKey,[["touchmove",this.preventScroll],["touchend",this.clean.bind(this)],["touchcancel",this.clean.bind(this)]],{passive:!1}),this.setTimeout(this.startDrag.bind(this),250,e)}),Yt(this,"setUpDelayedDragTrigger",e=>{this.state._dragDelayed=!0,N8(e),this.setTimeout(this.startDrag.bind(this),this.config.delay,e)}),Yt(this,"setStartState",e=>{const t=C8(e,this.transform);this.updateSharedState(v8(e)),this.updateGestureState({...mL(this,t,e),...L5(this,e,!0),_pointerId:this.getEventId(e)}),this.updateGestureState(this.getMovement(t))}),Yt(this,"onDragStart",e=>{tL(this.controller,e),!(!this.enabled||this.state._active)&&(this.setStartState(e),this.setPointerCapture(e),this.shouldPreventWindowScrollY?this.setUpWindowScrollDetection(e):this.config.delay>0?this.setUpDelayedDragTrigger(e):this.startDrag(e,!0))}),Yt(this,"onDragChange",e=>{if(this.state.canceled||!this.state._active||!this.isValidEvent(e)||this.state._lastEventType===e.type&&e.timeStamp===this.state.timeStamp)return;let t;if(document.pointerLockElement){const{movementX:c,movementY:d}=e;t=D5(this.transform([c,d]),this.state.values)}else t=C8(e,this.transform);const r=this.getKinematics(t,e);if(!this.state._dragStarted){if(this.state._dragDelayed){this.startDrag(e);return}if(this.shouldPreventWindowScrollY)if(!this.state._dragPreventScroll&&r.axis)if(r.axis==="x")this.startDrag(e);else{this.state._active=!1;return}else return;else return}const i=v8(e);this.updateSharedState(i);const o=L5(this,e),s=N5(r._movement);let{_dragIsTap:l}=this.state;l&&s>=wL&&(l=!1),this.updateGestureState({...o,...r,_dragIsTap:l}),this.fireGestureHandler()}),Yt(this,"onDragEnd",e=>{if(nL(this.controller,e),!this.isValidEvent(e)||(this.clean(),!this.state._active))return;this.state._active=!1;const t=this.state._dragIsTap,[r,i]=this.state.velocities,[o,s]=this.state.movement,[l,c]=this.state._intentional,[d,u]=this.config.swipeVelocity,[f,h]=this.config.swipeDistance,p=this.config.swipeDuration,m={...L5(this,e),...this.getMovement(this.state.values)},y=[0,0];m.elapsedTime<p&&(l!==!1&&Math.abs(r)>d&&Math.abs(o)>f&&(y[0]=P5(r)),c!==!1&&Math.abs(i)>u&&Math.abs(s)>h&&(y[1]=P5(i))),this.updateSharedState({buttons:0}),this.updateGestureState({...m,tap:t,swipe:y}),this.fireGestureHandler(this.config.filterTaps&&t===!0)}),Yt(this,"clean",()=>{super.clean(),this.state._dragStarted=!1,this.releasePointerCapture(),iL(this.controller,this.stateKey)}),Yt(this,"onCancel",()=>{this.state.canceled||(this.updateGestureState({canceled:!0,_active:!1}),this.updateSharedState({buttons:0}),a.nextTick(this.fireGestureHandler))}),Yt(this,"onClick",e=>{this.state._dragIsTap||e.stopPropagation()})}startDrag(e,t=!1){!this.state._active||this.state._dragStarted||(t||this.setStartState(e),this.updateGestureState({_dragStarted:!0,_dragPreventScroll:!0,cancel:this.onCancel}),this.clearTimeout(),this.fireGestureHandler())}addBindings(e){if(this.config.useTouch?(mi(e,"onTouchStart",this.onDragStart),mi(e,"onTouchMove",this.onDragChange),mi(e,"onTouchEnd",this.onDragEnd),mi(e,"onTouchCancel",this.onDragEnd)):(mi(e,"onPointerDown",this.onDragStart),mi(e,"onPointerMove",this.onDragChange),mi(e,"onPointerUp",this.onDragEnd),mi(e,"onPointerCancel",this.onDragEnd)),this.config.filterTaps){const t=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";mi(e,t,this.onClick)}}}function CL(n,e){let t,r=[],i,o=!1;function s(...l){return o&&t===this&&e(l,r)||(i=n.apply(this,l),o=!0,t=this,r=l),i}return s}function fp(n,e){if(n===e)return!0;if(n&&e&&typeof n=="object"&&typeof e=="object"){if(n.constructor!==e.constructor)return!1;let t,r,i;if(Array.isArray(n)){if(t=n.length,t!==e.length)return!1;for(r=t;r--!==0;)if(!fp(n[r],e[r]))return!1;return!0}let o;if(typeof Map=="function"&&n instanceof Map&&e instanceof Map){if(n.size!==e.size)return!1;for(o=n.entries();!(r=o.next()).done;)if(!e.has(r.value[0]))return!1;for(o=n.entries();!(r=o.next()).done;)if(!fp(r.value[1],e.get(r.value[0])))return!1;return!0}if(typeof Set=="function"&&n instanceof Set&&e instanceof Set){if(n.size!==e.size)return!1;for(o=n.entries();!(r=o.next()).done;)if(!e.has(r.value[0]))return!1;return!0}if(n.constructor===RegExp)return n.source===e.source&&n.flags===e.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===e.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===e.toString();if(i=Object.keys(n),t=i.length,t!==Object.keys(e).length)return!1;for(r=t;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;if(typeof Element<"u"&&n instanceof Element)return!1;for(r=t;r--!==0;)if(!(i[r]==="_owner"&&n.$$typeof)&&!fp(n[i[r]],e[i[r]]))return!1;return!0}return n!==n&&e!==e}function kL(n,e){try{return fp(n,e)}catch(t){if((t.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw t}}function B5(n={},e){const t={};for(const[r,i]of Object.entries(e))switch(typeof i){case"function":t[r]=i.call(t,n[r],r,n);break;case"object":t[r]=B5(n[r],i);break;case"boolean":i&&(t[r]=n[r]);break}return t}const SL=180,EL=.15,ML=.5,AL=50,TL=250,P8={...{threshold(n=0){return rs(n)},rubberband(n=0){switch(n){case!0:return rs(EL);case!1:return rs(0);default:return rs(n)}},enabled(n=!0){return n},triggerAllEvents(n=!1){return n},initial(n=0){return typeof n=="function"?n:rs(n)},transform:!0},axis:!0,lockDirection(n=!1){return n},bounds(n={}){if(typeof n=="function")return o=>P8.bounds(n(o));const{left:e=-1/0,right:t=1/0,top:r=-1/0,bottom:i=1/0}=n;return[[e,t],[r,i]]}},IL=typeof window<"u"&&window.document&&window.document.createElement,xL={enabled(n=!0){return n},domTarget:!0,window(n=IL?window:void 0){return n},eventOptions({passive:n=!0,capture:e=!1}={}){return{passive:n,capture:e}},transform:!0},OL={...P8,useTouch(n=!0){return n&&y8()},preventWindowScrollY(n=!1){return n},threshold(n,e,{filterTaps:t=!1,lockDirection:r=!1,axis:i=void 0}){const o=rs(n,t?3:r||i?1:0);return this.filterTaps=t,o},swipeVelocity(n=ML){return rs(n)},swipeDistance(n=AL){return rs(n)},swipeDuration(n=TL){return n},delay(n=0){switch(n){case!0:return SL;case!1:return 0;default:return n}}};function DL(n){return B5(n,xL)}function NL(n={}){return B5(n,OL)}function PL({domTarget:n,eventOptions:e,window:t,enabled:r,...i}){const o=DL({domTarget:n,eventOptions:e,window:t,enabled:r});return o.drag=NL(i),o}function LL(n,e,t={}){const r=BL(n),i=new eL(r);return i.config=e,i.handlers=n,i.nativeRefs=t,a.getCurrentInstance()&&!e.manual&&(a.onMounted(i.bind),a.onUnmounted(i.clean)),i}function BL(n){const e=new Set;return n.drag&&e.add(Na.get("drag")),n.wheel&&e.add(Na.get("wheel")),n.scroll&&e.add(Na.get("scroll")),n.move&&e.add(Na.get("move")),n.pinch&&e.add(Na.get("pinch")),n.hover&&e.add(Na.get("hover")),e}function L8(n,e={}){Na.set("drag",vL);const t=a.ref();return t.value||(t.value=CL(PL,kL)),LL({drag:n},t.value(e))}let _L=Symbol("headlessui.useid"),RL=0;function $L(){return a.inject(_L,()=>`${++RL}`)()}function B8(n){var e;if(n==null||n.value==null)return null;let t=(e=n.value.$el)!=null?e:n.value;return t instanceof Node?t:null}function ku(n,e,...t){if(n in e){let i=e[n];return typeof i=="function"?i(...t):i}let r=new Error(`Tried to handle "${n}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ku),r}var VL=Object.defineProperty,FL=(n,e,t)=>e in n?VL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,_8=(n,e,t)=>(FL(n,typeof e!="symbol"?e+"":e,t),t);let jL=class{constructor(){_8(this,"current",this.detect()),_8(this,"currentId",0)}set(e){this.current!==e&&(this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},zL=new jL;var R8=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(R8||{}),is=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(is||{});function $8({visible:n=!0,features:e=0,ourProps:t,theirProps:r,...i}){var o;let s=F8(r,t),l=Object.assign(i,{props:s});if(n||e&2&&s.static)return _5(l);if(e&1){let c=(o=s.unmount)==null||o?0:1;return ku(c,{0(){return null},1(){return _5({...i,props:{...s,hidden:!0,style:{display:"none"}}})}})}return _5(l)}function _5({props:n,attrs:e,slots:t,slot:r,name:i}){var o,s;let{as:l,...c}=j8(n,["unmount","static"]),d=(o=t.default)==null?void 0:o.call(t,r),u={};if(r){let f=!1,h=[];for(let[p,m]of Object.entries(r))typeof m=="boolean"&&(f=!0),m===!0&&h.push(p);f&&(u["data-headlessui-state"]=h.join(" "))}if(l==="template"){if(d=V8(d??[]),Object.keys(c).length>0||Object.keys(e).length>0){let[f,...h]=d??[];if(!HL(f)||h.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${i} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(c).concat(Object.keys(e)).map(y=>y.trim()).filter((y,b,w)=>w.indexOf(y)===b).sort((y,b)=>y.localeCompare(b)).map(y=>` - ${y}`).join(`
|
|
1
|
+
(function(ee,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],a):(ee=typeof globalThis<"u"?globalThis:ee||self,a(ee.QuoreUI={},ee.Vue))})(this,function(ee,a){"use strict";var u1e=Object.defineProperty;var f1e=(ee,a,ft)=>a in ee?u1e(ee,a,{enumerable:!0,configurable:!0,writable:!0,value:ft}):ee[a]=ft;var be=(ee,a,ft)=>(f1e(ee,typeof a!="symbol"?a+"":a,ft),ft),fv=(ee,a,ft)=>{if(!a.has(ee))throw TypeError("Cannot "+ft)};var g=(ee,a,ft)=>(fv(ee,a,"read from private field"),ft?ft.call(ee):a.get(ee)),E=(ee,a,ft)=>{if(a.has(ee))throw TypeError("Cannot add the same private member more than once");a instanceof WeakSet?a.add(ee):a.set(ee,ft)},A=(ee,a,ft,pe)=>(fv(ee,a,"write to private field"),pe?pe.call(ee,ft):a.set(ee,ft),ft);var Xn=(ee,a,ft,pe)=>({set _(x5){A(ee,a,x5,ft)},get _(){return g(ee,a,pe)}}),I=(ee,a,ft)=>(fv(ee,a,"access private method"),ft);var Uc,n5,Uf,hv,Zf,El,Ml,ei,Al,Wf,qf,b3,oN,w3,sN,v3,aN,Zc,r5,C3,lN,Kf,pv,Gf,Tl,Il,k3,cN,S3,dN,E3,uN,M3,Yf,A3,Br,Qf,mv,Ht,Gs,Xf,Ut,tN,T3,fN,Wc,dr,Ot,rn,qc,Io,Kc,ti,Ys,Gc,xl,Bi,ni,Ol,Jf,e1,Yc,t1,_i,Qs,Qc,Xs,Ri,x3,Js,n1,ea,Dl,r1,i1,Zt,Ze,xo,Nl,o1,s1,ta,$i,Oo,a1,Xc,i5,l1,gv,O3,hN,D3,pN,Jc,o5,N3,mN,P3,gN,L3,yN,c1,yv,B3,bN,d1,bv,u1,wv,_3,wN,on,Bn,Vi,Oa,R3,vN,$3,CN,f1,vv,V3,kN,Pl,Xh,h1,Cv,Wt,Fi,ri,ji,ur,td,zi,Yn,Do,Ll,Hi,nd,s5,rd,a5,Bl,ii,ct,id,_l,sn,Rl,na,p1,$l,ra,m1,Vl,No,Ui,od,sd,Rr,g1,F3,y1,kv,b1,Sv,w1,Ev,j3,SN,z3,EN,v1,Mv,C1,Av,k1,Tv,H3,MN,S1,Iv,U3,AN,Z3,TN,W3,IN,E1,xv,Fl,Jh,jl,zl,qt,q3,xN,M1,ad,A1,Ov,T1,Dv,I1,x1,G3,ON,Y3,DN,ld,l5,Hl,O1,D1,N1,P1,cd,ia,Ye,dd,ud,L1,Nv,nN,oa,Qn,B1,_1,Ul,Po,R1,$1,Zl,fd,hd,sa,pd,V1,md,Wl,F1,j1,ql,Kl,aa,gd,Q3,NN,X3,PN,z1,Pv,yd,c5,J3,LN,ey,BN,Gl,Yl,Zi,Lo,wn,ty,Ql,Gt,Cn,la,hu,ca,pu,bd,d5,da,mu,ny,_N,H1,Lv,ua,gu,Xl,ep,Jl,tp,U1,Bv,e0,np,rN,ry,fa,Bo,ha,yu,wd,u5,t0,oy,sy,n0,r0,vd,f5,Cd,h5,_o,Wi,kd,Sd,qi,i0,rp,oi,Z1,_v,pa,ma,o0,a0,Ed,Md,W1,Rv,Ro,R0,ay,RN,ly,$N,Ad,cy,dy,Td,l0,mt,$o,Id,q1,K1,xd,Vo,si,Fo,G1,jo,Y1,c0,d0,Od,p5,Q1,$v,uy,VN,fy,FN,hy,jN,py,zN,Dd,m5,Nd,g5,X1,Vv,J1,eh,th,nh,rh,ih,oh,Fv,sh,u0,f0,my,HN,ah,jv,ai,fr,lh,h0,hr,Pd,gy,UN,yy,ZN,by,WN,Ld,y5,Bd,b5,_d,w5,wy,qN,ch,zv,vy,KN,dh,ga,li,Cy,GN,Rd,v5,ky,YN,Sy,QN,uh,Hv,fh,$d,Ki,zo,Vd,Fd,Gi,Oe,p0,m0,hh,ph,jd,zd,ya,mh,Ey,My,gh,Uv,Hd,g0,Uo,yh,pr,bh,vt,y0,ip,b0,op,Ay,XN,wh,vh,ci,w0,Ud,Dt,Ch,Zd,kh,Sh,di,Wd,Eh,Zv,Mh,Wv,Ty,JN,Zo,$0,Iy,eP,Yi,Da,qd,Ah,ba,v0,Kd,$r,Th,Ih,C0,ui,On,mr,Gd,k0,Nt,Yd,Qi,xh,Oh,qv,Dh,Kv,xy,tP,Oy,nP,Dy,rP,Nh,Gv,S0,sp,wa,bu,Ny,iP,Qd,C5,E0,ap,Py,oP,Ly,sP,By,aP,_y,lP,M0,A0,Xi,qo,Vr,T0,I0,x0,Ko,Xd,O0,D0,va,Ry,cP,$y,dP,Vy,uP,Fy,fP,Ph,Yv,jy,hP,Lh,Qv,zy,pP,Hy,mP,Uy,gP,Zy,yP,Wy,bP,Go,V0,Bh,Xv,_h,Jv,Rh,e8,Jd,k5,eu,S5,Ca,wu,$h,t8,tu,E5,qy,wP,Vh,n8,Ky,vP,Gy,CP,Fh,r8,nu,M5,N0,lp,Ct,an,ka,Yo,Sa,ru,Ji,Qo,eo,Fr,jh,P0,cp,L0,dp,iu,A5,zh,i8,Yy,kP,Hh,o8,Uh,s8,ou,T5,Qy,SP,B0,su,to,Ea,Xo,gr,Ma,au,lu,Dn,Jo,fe,Aa,Xy,EP,Wh,a8,qh,l8,Kh,c8,cu,I5,no,Gh,Pt,Ta,Yh,d8,Qh,u8,Jy,MP;const ft=a.defineComponent({name:"QAccordion",props:{modelValue:{type:[Boolean,Number],default:!1},variant:{type:String,default:"white"},triggerText:{type:String,default:""},triggerClass:{type:[String,Array,Object],default:""},contentClass:{type:[String,Array,Object],default:""},chevronClass:{type:[String,Array,Object],default:""},chevronSize:{type:String,default:""}},emits:["update:modelValue"],setup(n,{emit:e,slots:t}){const r=a.computed({get:()=>!!n.modelValue,set:u=>e("update:modelValue",u)}),i=a.computed(()=>!!t.text),o=a.computed(()=>{const u=r.value?"Hide":"Show";return s.value?u:n.triggerText}),s=a.computed(()=>n.variant==="bubble"),l=a.computed(()=>["leading-normal font-bold",{"text-md":n.variant==="white"},{"text-base":n.variant==="gray"},{"flex-grow":n.variant!=="bubble"},{"flex-shrink mr-2 text-gray-40 text-sm":n.variant==="bubble"}]),c=a.computed(()=>n.chevronSize||(s.value?"sm":"md"));return{show:r,hasTextSlot:i,triggerTextClasses:l,isBubbleAccordion:s,triggerTextValue:o,triggerIconSize:c,onToggle:()=>{r.value=!r.value}}}}),pe=(n,e)=>{const t=n.__vccOpts||n;for(const[r,i]of e)t[r]=i;return t},x5=["value"],TP={key:0,class:"flex-grow border-t border-gray-20"},IP={key:1,class:"flex-grow border-t border-gray-20"};function xP(n,e,t,r,i,o){const s=a.resolveComponent("q-icon");return a.openBlock(),a.createElementBlock("div",{value:n.modelValue,class:a.normalizeClass(["accordion","accordion-"+n.variant,{"is-open":!!n.modelValue}])},[a.renderSlot(n.$slots,"toggle",a.normalizeProps(a.guardReactiveProps({onToggle:n.onToggle})),()=>[a.createElementVNode("div",{class:a.normalizeClass(["accordion-trigger",n.triggerClass,{"py-5":n.isBubbleAccordion}]),onClick:e[0]||(e[0]=(...l)=>n.onToggle&&n.onToggle(...l))},[n.isBubbleAccordion?(a.openBlock(),a.createElementBlock("div",TP)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["flex items-center",{"w-full":!n.isBubbleAccordion},{"border border-gray-20 rounded-full px-8 py-2 w-32":n.isBubbleAccordion}])},[n.hasTextSlot?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(n.triggerTextClasses)},[a.renderSlot(n.$slots,"text",{},void 0,!0)],2)):(a.openBlock(),a.createElementBlock("h4",{key:1,class:a.normalizeClass(n.triggerTextClasses)},a.toDisplayString(n.triggerTextValue),3)),a.renderSlot(n.$slots,"additionalInfo",{},void 0,!0),a.createVNode(s,{icon:"chevron-down",color:"gray-40",size:n.triggerIconSize,type:"",class:a.normalizeClass(["shrink-0 mr-4",n.chevronClass,{open:!!n.show}])},null,8,["size","class"])],2),n.isBubbleAccordion?(a.openBlock(),a.createElementBlock("div",IP)):a.createCommentVNode("",!0)],2)],!0),a.createVNode(a.Transition,{name:"slide-down"},{default:a.withCtx(()=>[n.show?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["accordion-content",n.contentClass,{"p-0":n.variant==="custom"}])},[a.renderSlot(n.$slots,"content",{},void 0,!0)],2)):a.createCommentVNode("",!0)]),_:3})],10,x5)}const OP=pe(ft,[["render",xP],["__scopeId","data-v-c7b4341d"]]),DP=a.defineComponent({name:"QActivityItem",props:{type:{type:String,default:"history"},text:{type:String,default:""},time:{type:String,default:""}},emits:["click"],setup(n,{emit:e}){const t=a.computed(()=>{switch(n.type){case"request":return"bell-concierge";case"work-order":return"hammer";case"complaint":return"face-sad";case"follow-up":return"check";case"satisfaction-call":return"phone-plus";default:return"history"}}),r=a.computed(()=>n.type==="history");return{props:n,isHistory:r,typeIcon:t,handleClick:()=>{e("click")}}}}),NP={class:"activity-item__content"},PP={class:"activity-item__content-text"},LP={key:0},BP={class:"activity-item__time"},_P={key:0};function RP(n,e,t,r,i,o){const s=a.resolveComponent("q-icon");return a.openBlock(),a.createElementBlock("button",{class:a.normalizeClass(["activity-item",{"bg-gray-0":!n.isHistory}]),onClick:e[0]||(e[0]=(...l)=>n.handleClick&&n.handleClick(...l))},[a.createElementVNode("div",NP,[a.createElementVNode("div",{class:a.normalizeClass(["flex justify-center items-center rounded w-6 h-6","activity-item__content-icon-"+n.props.type])},[a.createVNode(s,{icon:n.typeIcon,type:"fill",size:"sm",color:"white"},null,8,["icon"])],2),a.createElementVNode("div",PP,[n.props.text?(a.openBlock(),a.createElementBlock("span",LP,a.toDisplayString(n.props.text),1)):a.renderSlot(n.$slots,"text",{key:1},void 0,!0)])]),a.createElementVNode("div",BP,[n.props.time?(a.openBlock(),a.createElementBlock("span",_P,a.toDisplayString(n.props.time),1)):a.renderSlot(n.$slots,"time",{key:1},void 0,!0)])],2)}const $P=pe(DP,[["render",RP],["__scopeId","data-v-fe298230"]]),VP=a.defineComponent({name:"QAvatar",props:{size:{type:String,default:"sm"},text:{type:[String],default:""},bgColor:{type:String,default:"teal-20"},src:{type:String,default:""}},setup(){const n=a.ref(!0),e=a.ref(!1);return{validSrc:n,isLoaded:e,onImageLoad:()=>{e.value=!0},onImageError:()=>{n.value=!1}}}}),FP={class:"avatar-text"},jP=["src"];function zP(n,e,t,r,i,o){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["avatar flex justify-center items-center",[`avatar-${n.size}`,`bg-${n.bgColor}`]])},[a.createElementVNode("span",FP,a.toDisplayString(n.text),1),n.src&&n.validSrc?(a.openBlock(),a.createElementBlock("img",{key:0,class:"avatar-image",src:n.src,onLoad:e[0]||(e[0]=(...s)=>n.onImageLoad&&n.onImageLoad(...s)),onError:e[1]||(e[1]=(...s)=>n.onImageError&&n.onImageError(...s))},null,40,jP)):a.createCommentVNode("",!0)],2)}const g8=pe(VP,[["render",zP],["__scopeId","data-v-ebde1d6f"]]),HP=a.defineComponent({props:{backgroundColor:{type:String,default:"blue-20"},textColor:{type:String,default:"white"}}}),UP={class:"banner-text mb-0"};function ZP(n,e,t,r,i,o){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["q-banner flex","bg-"+n.backgroundColor,"text-"+n.textColor]),onClick:e[0]||(e[0]=s=>n.$emit("bannerClick"))},[a.createElementVNode("p",UP,[a.renderSlot(n.$slots,"default",{},void 0,!0)])],2)}const WP=pe(HP,[["render",ZP],["__scopeId","data-v-8edf76be"]]),qP=a.defineComponent({name:"QBadge",props:{color:{type:String,default:""},shape:{type:String,default:"circle"}},setup(n,e){const t=a.computed(function(){return n.color?`bg-${n.color}`:""}),r=a.computed(function(){return!!e.slots.icon});return{bgColor:t,hasIcon:r}}}),KP={key:1,class:"badge-text"};function GP(n,e,t,r,i,o){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["badge",n.shape,n.bgColor])},[n.hasIcon?a.renderSlot(n.$slots,"icon",{key:0},void 0,!0):(a.openBlock(),a.createElementBlock("p",KP,[a.renderSlot(n.$slots,"text",{},void 0,!0)]))],2)}const ns=pe(qP,[["render",GP],["__scopeId","data-v-c8e6730f"]]);function YP(){try{return"constructor"in GestureEvent}catch{return!1}}function y8(){return typeof window<"u"&&"ontouchstart"in window}function b8(n){return"pointerId"in n?null:n.type==="touchend"?n.changedTouches:n.targetTouches}function w8(n){return Array.from(b8(n)).map(e=>e.identifier)}function v8(n){const e="buttons"in n?n.buttons:0,{shiftKey:t,altKey:r,metaKey:i,ctrlKey:o}=n;return{buttons:e,shiftKey:t,altKey:r,metaKey:i,ctrlKey:o}}const QP=n=>n;function C8(n,e=QP){const t=b8(n),{clientX:r,clientY:i}=t?t[0]:n;return e([r,i])}function k8(){}function S8(...n){return n.length===0?k8:n.length===1?n[0]:function(){var e;for(let t of n)e=t.apply(this,arguments)||e;return e}}function rs(n,e){if(n===void 0){if(e===void 0)throw new Error("Must define fallback value if undefined is expected");n=e}return Array.isArray(n)?n:[n,n]}function E8(n,...e){return typeof n=="function"?n(...e):n}function vu(n){return{_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,_dragStarted:!1,_dragPreventScroll:!1,_dragIsTap:!0,_dragDelayed:!1,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:k8,canceled:!1,memo:void 0,args:void 0,...n}}function O5(){const n={hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1,locked:!1},e=vu({_pointerId:void 0,axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,tap:!1,swipe:[0,0]}),t=vu({_pointerIds:[],da:[0,0],vdva:[0,0],origin:void 0,turns:0}),r=vu({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=vu({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),o=vu({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0});return{shared:n,drag:e,pinch:t,wheel:r,move:i,scroll:o}}var XP=Object.defineProperty,JP=(n,e,t)=>e in n?XP(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,_n=(n,e,t)=>(JP(n,typeof e!="symbol"?e+"":e,t),t);class eL{constructor(e){this.classes=e,_n(this,"nativeRefs"),_n(this,"config"),_n(this,"handlers"),_n(this,"state"),_n(this,"timeouts"),_n(this,"domListeners"),_n(this,"windowListeners"),_n(this,"pointerIds",new Set),_n(this,"touchIds",new Set),_n(this,"supportsTouchEvents",y8()),_n(this,"supportsGestureEvents",YP()),_n(this,"bind",(...t)=>{const r={};for(let i of this.classes)new i(this,t).addBindings(r);for(let i in this.nativeRefs)mi(r,i,o=>this.nativeRefs[i]({...this.state.shared,event:o,args:t}));return this.config.domTarget?sL(this,r):aL(this,r)}),_n(this,"clean",()=>{const{eventOptions:t,domTarget:r}=this.config,i=a.unref(r);i&&Cu(i,M8(this.domListeners),t),Object.values(this.timeouts).forEach(clearTimeout),rL(this)}),_n(this,"reset",()=>{this.state=O5()}),this.classes=e,this.state=O5(),this.timeouts={},this.domListeners=[],this.windowListeners={}}}function tL(n,e){"pointerId"in e?n.pointerIds.add(e.pointerId):n.touchIds=new Set(w8(e))}function nL(n,e){"pointerId"in e?n.pointerIds.delete(e.pointerId):w8(e).forEach(t=>n.touchIds.delete(t))}function rL(n){const{config:{window:e,eventOptions:t},windowListeners:r}=n,i=a.unref(e);if(i){for(let o in r){const s=r[o];Cu(i,s,t)}n.windowListeners={}}}function iL({config:n,windowListeners:e},t,r=n.eventOptions){const i=a.unref(n.window);i&&(Cu(i,e[t],r),delete e[t])}function oL({config:n,windowListeners:e},t,r=[],i=n.eventOptions){const o=a.unref(n.window);o&&(Cu(o,e[t],i),A8(o,e[t]=r,i))}function sL({config:n,domListeners:e},t){const{eventOptions:r,domTarget:i}=n,o=a.unref(i);if(!o)throw new Error("domTarget must be defined");Cu(o,M8(e),r);for(let[s,l]of Object.entries(t)){const c=s.slice(2).toLowerCase();e.push([c,S8(...l)])}A8(o,e,r)}function aL({config:n},e){const t={},r=n.eventOptions.capture?"Capture":"";for(let[i,o]of Object.entries(e)){const s=Array.isArray(o)?o:[o],l=i+r;t[l]=S8(...s)}return t}function M8(n=[]){return n.splice(0,n.length)}function mi(n,e,t){n[e]||(n[e]=[]),n[e].push(t)}function A8(n,e=[],t={}){if(n)for(let[r,i]of e)n.addEventListener(r,i,t)}function Cu(n,e=[],t={}){if(n)for(let[r,i]of e)n.removeEventListener(r,i,t)}function D5(n,e){return n.map((t,r)=>t+e[r])}function T8(n,e){return n.map((t,r)=>t-e[r])}function N5(n){return Math.hypot(...n)}function lL(n,e,t){const r=N5(e),i=r===0?0:1/r,o=t===0?0:1/t,s=o*r,l=e.map(u=>o*u),c=e.map(u=>i*u),d=N5(n);return{velocities:l,velocity:s,distance:d,direction:c}}function P5(n){return Math.sign?Math.sign(n):+(n>0)-+(n<0)||+n}function cL(n,e,t){return Math.max(e,Math.min(n,t))}function dL(n,e){return Math.pow(n,e*5)}function I8(n,e,t){return e===0||Math.abs(e)===1/0?dL(n,t):n*e*t/(e+t*n)}function x8(n,e,t,r=.15){return r===0?cL(n,e,t):n<e?-I8(e-n,t-e,r)+e:n>t?+I8(n-t,t-e,r)+t:n}var uL=Object.defineProperty,fL=(n,e,t)=>e in n?uL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,up=(n,e,t)=>(fL(n,typeof e!="symbol"?e+"":e,t),t);const Na=new Map,hL=n=>n;class pL{constructor(e,t=[]){this.controller=e,this.args=t,up(this,"debounced",!0),up(this,"setTimeout",(r,i=140,...o)=>{clearTimeout(this.controller.timeouts[this.stateKey]),this.controller.timeouts[this.stateKey]=window.setTimeout(r,i,...o)}),up(this,"clearTimeout",()=>{clearTimeout(this.controller.timeouts[this.stateKey])}),up(this,"fireGestureHandler",(r=!1)=>{if(this.state._blocked)return this.debounced||(this.state._active=!1,this.clean()),null;if(!r&&!this.state.intentional&&!this.config.triggerAllEvents)return null;if(this.state.intentional){const c=this.state.active,d=this.state._active;this.state.active=d,this.state.first=d&&!c,this.state.last=c&&!d,this.controller.state.shared[this.ingKey]=d}const i=this.controller.pointerIds.size||this.controller.touchIds.size,o=this.controller.state.shared.buttons>0||i>0,s={...this.controller.state.shared,...this.state,...this.mapStateValues(this.state),locked:!!document.pointerLockElement,touches:i,down:o},l=this.handler(s);return this.state.memo=l!==void 0?l:this.state.memo,s}),this.controller=e,this.args=t}get config(){return this.controller.config[this.stateKey]}get enabled(){return this.controller.config.enabled&&this.config.enabled}get state(){return this.controller.state[this.stateKey]}get handler(){return this.controller.handlers[this.stateKey]}get transform(){return this.config.transform||this.controller.config.transform||hL}updateSharedState(e){Object.assign(this.controller.state.shared,e)}updateGestureState(e){Object.assign(this.state,e)}checkIntentionality(e,t){return{_intentional:e,_blocked:!1}}getMovement(e){const{rubberband:t,threshold:r}=this.config,{_bounds:i,_initial:o,_active:s,_intentional:l,lastOffset:c,movement:d}=this.state,u=this.getInternalMovement(e,this.state),f=this.transform(r).map(Math.abs),h=l[0]===!1?O8(u[0],f[0]):l[0],p=l[1]===!1?O8(u[1],f[1]):l[1],m=this.checkIntentionality([h,p],u);if(m._blocked)return{...m,_movement:u,delta:[0,0]};const y=m._intentional,b=u;let w=[y[0]!==!1?u[0]-y[0]:0,y[1]!==!1?u[1]-y[1]:0];const v=D5(w,c),k=s?t:[0,0];return w=D8(i,D5(w,o),k),{...m,intentional:y[0]!==!1||y[1]!==!1,_initial:o,_movement:b,movement:w,values:e,offset:D8(i,v,k),delta:T8(w,d)}}clean(){this.clearTimeout()}}function O8(n,e){return Math.abs(n)>=e?P5(n)*e:!1}function D8(n,[e,t],[r,i]){const[[o,s],[l,c]]=n;return[x8(e,o,s,r),x8(t,l,c,i)]}function L5({state:n},e,t){const{timeStamp:r,type:i}=e,o=n.values,s=t?0:r-n.startTime;return{_lastEventType:i,event:e,timeStamp:r,elapsedTime:s,previous:o}}function mL({state:n,config:e,stateKey:t,args:r},i,o){const s=n.offset,l=o.timeStamp,{initial:c,bounds:d}=e,u={...O5()[t],_active:!0,args:r,values:i,initial:i,offset:s,lastOffset:s,startTime:l};return{...u,_initial:E8(c,u),_bounds:E8(d,u)}}class gL extends pL{getInternalMovement(e,t){return T8(e,t.initial)}checkIntentionality(e,t){if(e[0]===!1&&e[1]===!1)return{_intentional:e,axis:this.state.axis};const[r,i]=t.map(Math.abs),o=this.state.axis||(r>i?"x":r<i?"y":void 0);return!this.config.axis&&!this.config.lockDirection?{_intentional:e,_blocked:!1,axis:o}:o?this.config.axis&&o!==this.config.axis?{_intentional:e,_blocked:!0,axis:o}:(e[o==="x"?1:0]=!1,{_intentional:e,_blocked:!1,axis:o}):{_intentional:[!1,!1],_blocked:!1,axis:o}}getKinematics(e,t){const r=this.getMovement(e);if(!r._blocked){const i=t.timeStamp-this.state.timeStamp;Object.assign(r,lL(r.movement,r.delta,i))}return r}mapStateValues(e){return{xy:e.values,vxvy:e.velocities}}}var yL=Object.defineProperty,bL=(n,e,t)=>e in n?yL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Yt=(n,e,t)=>(bL(n,typeof e!="symbol"?e+"":e,t),t);const wL=3;function N8(n){"persist"in n&&typeof n.persist=="function"&&n.persist()}class vL extends gL{constructor(){super(...arguments),Yt(this,"ingKey","dragging"),Yt(this,"stateKey","drag"),Yt(this,"setPointerCapture",e=>{if(this.config.useTouch||document.pointerLockElement)return;const{target:t,pointerId:r}=e;t&&"setPointerCapture"in t&&t.setPointerCapture(r),this.updateGestureState({_dragTarget:t,_dragPointerId:r})}),Yt(this,"releasePointerCapture",()=>{if(this.config.useTouch||document.pointerLockElement)return;const{_dragTarget:e,_dragPointerId:t}=this.state;if(t&&e&&"releasePointerCapture"in e&&(!("hasPointerCapture"in e)||e.hasPointerCapture(t)))try{e.releasePointerCapture(t)}catch{}}),Yt(this,"preventScroll",e=>{this.state._dragPreventScroll&&e.cancelable&&e.preventDefault()}),Yt(this,"getEventId",e=>this.config.useTouch?e.changedTouches[0].identifier:e.pointerId),Yt(this,"isValidEvent",e=>this.state._pointerId===this.getEventId(e)),Yt(this,"shouldPreventWindowScrollY",this.config.preventWindowScrollY&&this.controller.supportsTouchEvents),Yt(this,"setUpWindowScrollDetection",e=>{N8(e),oL(this.controller,this.stateKey,[["touchmove",this.preventScroll],["touchend",this.clean.bind(this)],["touchcancel",this.clean.bind(this)]],{passive:!1}),this.setTimeout(this.startDrag.bind(this),250,e)}),Yt(this,"setUpDelayedDragTrigger",e=>{this.state._dragDelayed=!0,N8(e),this.setTimeout(this.startDrag.bind(this),this.config.delay,e)}),Yt(this,"setStartState",e=>{const t=C8(e,this.transform);this.updateSharedState(v8(e)),this.updateGestureState({...mL(this,t,e),...L5(this,e,!0),_pointerId:this.getEventId(e)}),this.updateGestureState(this.getMovement(t))}),Yt(this,"onDragStart",e=>{tL(this.controller,e),!(!this.enabled||this.state._active)&&(this.setStartState(e),this.setPointerCapture(e),this.shouldPreventWindowScrollY?this.setUpWindowScrollDetection(e):this.config.delay>0?this.setUpDelayedDragTrigger(e):this.startDrag(e,!0))}),Yt(this,"onDragChange",e=>{if(this.state.canceled||!this.state._active||!this.isValidEvent(e)||this.state._lastEventType===e.type&&e.timeStamp===this.state.timeStamp)return;let t;if(document.pointerLockElement){const{movementX:c,movementY:d}=e;t=D5(this.transform([c,d]),this.state.values)}else t=C8(e,this.transform);const r=this.getKinematics(t,e);if(!this.state._dragStarted){if(this.state._dragDelayed){this.startDrag(e);return}if(this.shouldPreventWindowScrollY)if(!this.state._dragPreventScroll&&r.axis)if(r.axis==="x")this.startDrag(e);else{this.state._active=!1;return}else return;else return}const i=v8(e);this.updateSharedState(i);const o=L5(this,e),s=N5(r._movement);let{_dragIsTap:l}=this.state;l&&s>=wL&&(l=!1),this.updateGestureState({...o,...r,_dragIsTap:l}),this.fireGestureHandler()}),Yt(this,"onDragEnd",e=>{if(nL(this.controller,e),!this.isValidEvent(e)||(this.clean(),!this.state._active))return;this.state._active=!1;const t=this.state._dragIsTap,[r,i]=this.state.velocities,[o,s]=this.state.movement,[l,c]=this.state._intentional,[d,u]=this.config.swipeVelocity,[f,h]=this.config.swipeDistance,p=this.config.swipeDuration,m={...L5(this,e),...this.getMovement(this.state.values)},y=[0,0];m.elapsedTime<p&&(l!==!1&&Math.abs(r)>d&&Math.abs(o)>f&&(y[0]=P5(r)),c!==!1&&Math.abs(i)>u&&Math.abs(s)>h&&(y[1]=P5(i))),this.updateSharedState({buttons:0}),this.updateGestureState({...m,tap:t,swipe:y}),this.fireGestureHandler(this.config.filterTaps&&t===!0)}),Yt(this,"clean",()=>{super.clean(),this.state._dragStarted=!1,this.releasePointerCapture(),iL(this.controller,this.stateKey)}),Yt(this,"onCancel",()=>{this.state.canceled||(this.updateGestureState({canceled:!0,_active:!1}),this.updateSharedState({buttons:0}),a.nextTick(this.fireGestureHandler))}),Yt(this,"onClick",e=>{this.state._dragIsTap||e.stopPropagation()})}startDrag(e,t=!1){!this.state._active||this.state._dragStarted||(t||this.setStartState(e),this.updateGestureState({_dragStarted:!0,_dragPreventScroll:!0,cancel:this.onCancel}),this.clearTimeout(),this.fireGestureHandler())}addBindings(e){if(this.config.useTouch?(mi(e,"onTouchStart",this.onDragStart),mi(e,"onTouchMove",this.onDragChange),mi(e,"onTouchEnd",this.onDragEnd),mi(e,"onTouchCancel",this.onDragEnd)):(mi(e,"onPointerDown",this.onDragStart),mi(e,"onPointerMove",this.onDragChange),mi(e,"onPointerUp",this.onDragEnd),mi(e,"onPointerCancel",this.onDragEnd)),this.config.filterTaps){const t=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";mi(e,t,this.onClick)}}}function CL(n,e){let t,r=[],i,o=!1;function s(...l){return o&&t===this&&e(l,r)||(i=n.apply(this,l),o=!0,t=this,r=l),i}return s}function fp(n,e){if(n===e)return!0;if(n&&e&&typeof n=="object"&&typeof e=="object"){if(n.constructor!==e.constructor)return!1;let t,r,i;if(Array.isArray(n)){if(t=n.length,t!==e.length)return!1;for(r=t;r--!==0;)if(!fp(n[r],e[r]))return!1;return!0}let o;if(typeof Map=="function"&&n instanceof Map&&e instanceof Map){if(n.size!==e.size)return!1;for(o=n.entries();!(r=o.next()).done;)if(!e.has(r.value[0]))return!1;for(o=n.entries();!(r=o.next()).done;)if(!fp(r.value[1],e.get(r.value[0])))return!1;return!0}if(typeof Set=="function"&&n instanceof Set&&e instanceof Set){if(n.size!==e.size)return!1;for(o=n.entries();!(r=o.next()).done;)if(!e.has(r.value[0]))return!1;return!0}if(n.constructor===RegExp)return n.source===e.source&&n.flags===e.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===e.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===e.toString();if(i=Object.keys(n),t=i.length,t!==Object.keys(e).length)return!1;for(r=t;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;if(typeof Element<"u"&&n instanceof Element)return!1;for(r=t;r--!==0;)if(!(i[r]==="_owner"&&n.$$typeof)&&!fp(n[i[r]],e[i[r]]))return!1;return!0}return n!==n&&e!==e}function kL(n,e){try{return fp(n,e)}catch(t){if((t.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw t}}function B5(n={},e){const t={};for(const[r,i]of Object.entries(e))switch(typeof i){case"function":t[r]=i.call(t,n[r],r,n);break;case"object":t[r]=B5(n[r],i);break;case"boolean":i&&(t[r]=n[r]);break}return t}const SL=180,EL=.15,ML=.5,AL=50,TL=250,P8={...{threshold(n=0){return rs(n)},rubberband(n=0){switch(n){case!0:return rs(EL);case!1:return rs(0);default:return rs(n)}},enabled(n=!0){return n},triggerAllEvents(n=!1){return n},initial(n=0){return typeof n=="function"?n:rs(n)},transform:!0},axis:!0,lockDirection(n=!1){return n},bounds(n={}){if(typeof n=="function")return o=>P8.bounds(n(o));const{left:e=-1/0,right:t=1/0,top:r=-1/0,bottom:i=1/0}=n;return[[e,t],[r,i]]}},IL=typeof window<"u"&&window.document&&window.document.createElement,xL={enabled(n=!0){return n},domTarget:!0,window(n=IL?window:void 0){return n},eventOptions({passive:n=!0,capture:e=!1}={}){return{passive:n,capture:e}},transform:!0},OL={...P8,useTouch(n=!0){return n&&y8()},preventWindowScrollY(n=!1){return n},threshold(n,e,{filterTaps:t=!1,lockDirection:r=!1,axis:i=void 0}){const o=rs(n,t?3:r||i?1:0);return this.filterTaps=t,o},swipeVelocity(n=ML){return rs(n)},swipeDistance(n=AL){return rs(n)},swipeDuration(n=TL){return n},delay(n=0){switch(n){case!0:return SL;case!1:return 0;default:return n}}};function DL(n){return B5(n,xL)}function NL(n={}){return B5(n,OL)}function PL({domTarget:n,eventOptions:e,window:t,enabled:r,...i}){const o=DL({domTarget:n,eventOptions:e,window:t,enabled:r});return o.drag=NL(i),o}function LL(n,e,t={}){const r=BL(n),i=new eL(r);return i.config=e,i.handlers=n,i.nativeRefs=t,a.getCurrentInstance()&&!e.manual&&(a.onMounted(i.bind),a.onUnmounted(i.clean)),i}function BL(n){const e=new Set;return n.drag&&e.add(Na.get("drag")),n.wheel&&e.add(Na.get("wheel")),n.scroll&&e.add(Na.get("scroll")),n.move&&e.add(Na.get("move")),n.pinch&&e.add(Na.get("pinch")),n.hover&&e.add(Na.get("hover")),e}function L8(n,e={}){Na.set("drag",vL);const t=a.ref();return t.value||(t.value=CL(PL,kL)),LL({drag:n},t.value(e))}let _L=Symbol("headlessui.useid"),RL=0;function $L(){return a.inject(_L,()=>`${++RL}`)()}function B8(n){var e;if(n==null||n.value==null)return null;let t=(e=n.value.$el)!=null?e:n.value;return t instanceof Node?t:null}function ku(n,e,...t){if(n in e){let i=e[n];return typeof i=="function"?i(...t):i}let r=new Error(`Tried to handle "${n}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ku),r}var VL=Object.defineProperty,FL=(n,e,t)=>e in n?VL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,_8=(n,e,t)=>(FL(n,typeof e!="symbol"?e+"":e,t),t);let jL=class{constructor(){_8(this,"current",this.detect()),_8(this,"currentId",0)}set(e){this.current!==e&&(this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},zL=new jL;var R8=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(R8||{}),is=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(is||{});function $8({visible:n=!0,features:e=0,ourProps:t,theirProps:r,...i}){var o;let s=F8(r,t),l=Object.assign(i,{props:s});if(n||e&2&&s.static)return _5(l);if(e&1){let c=(o=s.unmount)==null||o?0:1;return ku(c,{0(){return null},1(){return _5({...i,props:{...s,hidden:!0,style:{display:"none"}}})}})}return _5(l)}function _5({props:n,attrs:e,slots:t,slot:r,name:i}){var o,s;let{as:l,...c}=j8(n,["unmount","static"]),d=(o=t.default)==null?void 0:o.call(t,r),u={};if(r){let f=!1,h=[];for(let[p,m]of Object.entries(r))typeof m=="boolean"&&(f=!0),m===!0&&h.push(p);f&&(u["data-headlessui-state"]=h.join(" "))}if(l==="template"){if(d=V8(d??[]),Object.keys(c).length>0||Object.keys(e).length>0){let[f,...h]=d??[];if(!HL(f)||h.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${i} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(c).concat(Object.keys(e)).map(y=>y.trim()).filter((y,b,w)=>w.indexOf(y)===b).sort((y,b)=>y.localeCompare(b)).map(y=>` - ${y}`).join(`
|
|
2
2
|
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(y=>` - ${y}`).join(`
|
|
3
3
|
`)].join(`
|
|
4
4
|
`));let p=F8((s=f.props)!=null?s:{},c,u),m=a.cloneVNode(f,p,!0);for(let y in p)y.startsWith("on")&&(m.props||(m.props={}),m.props[y]=p[y]);return m}return Array.isArray(d)&&d.length===1?d[0]:d}return a.h(l,Object.assign({},c,u),{default:()=>d})}function V8(n){return n.flatMap(e=>e.type===a.Fragment?V8(e.children):[e])}function F8(...n){if(n.length===0)return{};if(n.length===1)return n[0];let e={},t={};for(let r of n)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(t[i]!=null||(t[i]=[]),t[i].push(r[i])):e[i]=r[i];if(e.disabled||e["aria-disabled"])return Object.assign(e,Object.fromEntries(Object.keys(t).map(r=>[r,void 0])));for(let r in t)Object.assign(e,{[r](i,...o){let s=t[r];for(let l of s){if(i instanceof Event&&i.defaultPrevented)return;l(i,...o)}}});return e}function j8(n,e=[]){let t=Object.assign({},n);for(let r of e)r in t&&delete t[r];return t}function HL(n){return n==null?!1:typeof n.type=="string"||typeof n.type=="object"||typeof n.type=="function"}let z8=Symbol("Context");var io=(n=>(n[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n))(io||{});function UL(){return H8()!==null}function H8(){return a.inject(z8,null)}function ZL(n){a.provide(z8,n)}function WL(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(e=>setTimeout(()=>{throw e}))}function R5(){let n=[],e={addEventListener(t,r,i,o){return t.addEventListener(r,i,o),e.add(()=>t.removeEventListener(r,i,o))},requestAnimationFrame(...t){let r=requestAnimationFrame(...t);e.add(()=>cancelAnimationFrame(r))},nextFrame(...t){e.requestAnimationFrame(()=>{e.requestAnimationFrame(...t)})},setTimeout(...t){let r=setTimeout(...t);e.add(()=>clearTimeout(r))},microTask(...t){let r={current:!0};return WL(()=>{r.current&&t[0]()}),e.add(()=>{r.current=!1})},style(t,r,i){let o=t.style.getPropertyValue(r);return Object.assign(t.style,{[r]:i}),this.add(()=>{Object.assign(t.style,{[r]:o})})},group(t){let r=R5();return t(r),this.add(()=>r.dispose())},add(t){return n.push(t),()=>{let r=n.indexOf(t);if(r>=0)for(let i of n.splice(r,1))i()}},dispose(){for(let t of n.splice(0))t()}};return e}function qL(n){let e={called:!1};return(...t)=>{if(!e.called)return e.called=!0,n(...t)}}function $5(n,...e){n&&e.length>0&&n.classList.add(...e)}function hp(n,...e){n&&e.length>0&&n.classList.remove(...e)}var V5=(n=>(n.Finished="finished",n.Cancelled="cancelled",n))(V5||{});function KL(n,e){let t=R5();if(!n)return t.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(n),[o,s]=[r,i].map(l=>{let[c=0]=l.split(",").filter(Boolean).map(d=>d.includes("ms")?parseFloat(d):parseFloat(d)*1e3).sort((d,u)=>u-d);return c});return o!==0?t.setTimeout(()=>e("finished"),o+s):e("finished"),t.add(()=>e("cancelled")),t.dispose}function U8(n,e,t,r,i,o){let s=R5(),l=o!==void 0?qL(o):()=>{};return hp(n,...i),$5(n,...e,...t),s.nextFrame(()=>{hp(n,...t),$5(n,...r),s.add(KL(n,c=>(hp(n,...r,...e),$5(n,...i),l(c))))}),s.add(()=>hp(n,...e,...t,...r,...i)),s.add(()=>l("cancelled")),s.dispose}function Pa(n=""){return n.split(/\s+/).filter(e=>e.length>1)}let F5=Symbol("TransitionContext");var GL=(n=>(n.Visible="visible",n.Hidden="hidden",n))(GL||{});function YL(){return a.inject(F5,null)!==null}function QL(){let n=a.inject(F5,null);if(n===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return n}function XL(){let n=a.inject(j5,null);if(n===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return n}let j5=Symbol("NestingContext");function pp(n){return"children"in n?pp(n.children):n.value.filter(({state:e})=>e==="visible").length>0}function Z8(n){let e=a.ref([]),t=a.ref(!1);a.onMounted(()=>t.value=!0),a.onUnmounted(()=>t.value=!1);function r(o,s=is.Hidden){let l=e.value.findIndex(({id:c})=>c===o);l!==-1&&(ku(s,{[is.Unmount](){e.value.splice(l,1)},[is.Hidden](){e.value[l].state="hidden"}}),!pp(e)&&t.value&&(n==null||n()))}function i(o){let s=e.value.find(({id:l})=>l===o);return s?s.state!=="visible"&&(s.state="visible"):e.value.push({id:o,state:"visible"}),()=>r(o,is.Unmount)}return{children:e,register:i,unregister:r}}let W8=R8.RenderStrategy,JL=a.defineComponent({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(n,{emit:e,attrs:t,slots:r,expose:i}){let o=a.ref(0);function s(){o.value|=io.Opening,e("beforeEnter")}function l(){o.value&=~io.Opening,e("afterEnter")}function c(){o.value|=io.Closing,e("beforeLeave")}function d(){o.value&=~io.Closing,e("afterLeave")}if(!YL()&&UL())return()=>a.h(q8,{...n,onBeforeEnter:s,onAfterEnter:l,onBeforeLeave:c,onAfterLeave:d},r);let u=a.ref(null),f=a.computed(()=>n.unmount?is.Unmount:is.Hidden);i({el:u,$el:u});let{show:h,appear:p}=QL(),{register:m,unregister:y}=XL(),b=a.ref(h.value?"visible":"hidden"),w={value:!0},v=$L(),k={value:!1},C=Z8(()=>{!k.value&&b.value!=="hidden"&&(b.value="hidden",y(v),d())});a.onMounted(()=>{let V=m(v);a.onUnmounted(V)}),a.watchEffect(()=>{if(f.value===is.Hidden&&v){if(h.value&&b.value!=="visible"){b.value="visible";return}ku(b.value,{hidden:()=>y(v),visible:()=>m(v)})}});let T=Pa(n.enter),S=Pa(n.enterFrom),M=Pa(n.enterTo),x=Pa(n.entered),O=Pa(n.leave),P=Pa(n.leaveFrom),N=Pa(n.leaveTo);a.onMounted(()=>{a.watchEffect(()=>{if(b.value==="visible"){let V=B8(u);if(V instanceof Comment&&V.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function _(V){let H=w.value&&!p.value,L=B8(u);!L||!(L instanceof HTMLElement)||H||(k.value=!0,h.value&&s(),h.value||c(),V(h.value?U8(L,T,S,M,x,D=>{k.value=!1,D===V5.Finished&&l()}):U8(L,O,P,N,x,D=>{k.value=!1,D===V5.Finished&&(pp(C)||(b.value="hidden",y(v),d()))})))}return a.onMounted(()=>{a.watch([h],(V,H,L)=>{_(L),w.value=!1},{immediate:!0})}),a.provide(j5,C),ZL(a.computed(()=>ku(b.value,{visible:io.Open,hidden:io.Closed})|o.value)),()=>{let{appear:V,show:H,enter:L,enterFrom:D,enterTo:U,entered:F,leave:R,leaveFrom:G,leaveTo:ne,...Y}=n,Z={ref:u},j={...Y,...p.value&&h.value&&zL.isServer?{class:a.normalizeClass([t.class,Y.class,...T,...S])}:{}};return $8({theirProps:j,ourProps:Z,slot:{},slots:r,attrs:t,features:W8,visible:b.value==="visible",name:"TransitionChild"})}}}),eB=JL,q8=a.defineComponent({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(n,{emit:e,attrs:t,slots:r}){let i=H8(),o=a.computed(()=>n.show===null&&i!==null?(i.value&io.Open)===io.Open:n.show);a.watchEffect(()=>{if(![!0,!1].includes(o.value))throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.')});let s=a.ref(o.value?"visible":"hidden"),l=Z8(()=>{s.value="hidden"}),c=a.ref(!0),d={show:o,appear:a.computed(()=>n.appear||!c.value)};return a.onMounted(()=>{a.watchEffect(()=>{c.value=!1,o.value?s.value="visible":pp(l)||(s.value="hidden")})}),a.provide(j5,l),a.provide(F5,d),()=>{let u=j8(n,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),f={unmount:n.unmount};return $8({ourProps:{...f,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[a.h(eB,{onBeforeEnter:()=>e("beforeEnter"),onAfterEnter:()=>e("afterEnter"),onBeforeLeave:()=>e("beforeLeave"),onAfterLeave:()=>e("afterLeave"),...t,...f,...u},r.default)]},attrs:{},features:W8,visible:s.value==="visible",name:"Transition"})}}});function Su(n){return a.getCurrentScope()?(a.onScopeDispose(n),!0):!1}function dn(n){return typeof n=="function"?n():a.unref(n)}const z5=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const H5=n=>n!=null,tB=Object.prototype.toString,K8=n=>tB.call(n)==="[object Object]",kn=()=>{},nB=rB();function rB(){var n,e;return z5&&((n=window==null?void 0:window.navigator)==null?void 0:n.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function G8(n,e){function t(...r){return new Promise((i,o)=>{Promise.resolve(n(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(i).catch(o)})}return t}function iB(n,e={}){let t,r,i=kn;const o=l=>{clearTimeout(l),i(),i=kn};return l=>{const c=dn(n),d=dn(e.maxWait);return t&&o(t),c<=0||d!==void 0&&d<=0?(r&&(o(r),r=null),Promise.resolve(l())):new Promise((u,f)=>{i=e.rejectOnCancel?f:u,d&&!r&&(r=setTimeout(()=>{t&&o(t),r=null,u(l())},d)),t=setTimeout(()=>{r&&o(r),r=null,u(l())},c)})}}function oB(...n){let e=0,t,r=!0,i=kn,o,s,l,c,d;!a.isRef(n[0])&&typeof n[0]=="object"?{delay:s,trailing:l=!0,leading:c=!0,rejectOnCancel:d=!1}=n[0]:[s,l=!0,c=!0,d=!1]=n;const u=()=>{t&&(clearTimeout(t),t=void 0,i(),i=kn)};return h=>{const p=dn(s),m=Date.now()-e,y=()=>o=h();return u(),p<=0?(e=Date.now(),y()):(m>p&&(c||!r)?(e=Date.now(),y()):l&&(o=new Promise((b,w)=>{i=d?w:b,t=setTimeout(()=>{e=Date.now(),r=!0,b(y()),u()},Math.max(0,p-m))})),!c&&!t&&(t=setTimeout(()=>r=!0,p)),r=!1,o)}}function sB(n,e){var t;if(typeof n=="number")return n+e;const r=((t=n.match(/^-?[0-9]+\.?[0-9]*/))==null?void 0:t[0])||"",i=n.slice(r.length),o=Number.parseFloat(r)+e;return Number.isNaN(o)?n:o+i}function Y8(n){return n||a.getCurrentInstance()}function U5(n,e=200,t={}){return G8(iB(e,t),n)}function aB(n,e=200,t=!1,r=!0,i=!1){return G8(oB(e,t,r,i),n)}function Q8(n,e=!0,t){Y8()?a.onMounted(n,t):e?n():a.nextTick(n)}function lB(n,e){Y8(e)&&a.onUnmounted(n,e)}function un(n){var e;const t=dn(n);return(e=t==null?void 0:t.$el)!=null?e:t}const gi=z5?window:void 0;function Ue(...n){let e,t,r,i;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,r,i]=n,e=gi):[e,t,r,i]=n,!e)return kn;Array.isArray(t)||(t=[t]),Array.isArray(r)||(r=[r]);const o=[],s=()=>{o.forEach(u=>u()),o.length=0},l=(u,f,h,p)=>(u.addEventListener(f,h,p),()=>u.removeEventListener(f,h,p)),c=a.watch(()=>[un(e),dn(i)],([u,f])=>{if(s(),!u)return;const h=K8(f)?{...f}:f;o.push(...t.flatMap(p=>r.map(m=>l(u,p,m,h))))},{immediate:!0,flush:"post"}),d=()=>{c(),s()};return Su(d),d}let X8=!1;function mp(n,e,t={}){const{window:r=gi,ignore:i=[],capture:o=!0,detectIframe:s=!1}=t;if(!r)return kn;nB&&!X8&&(X8=!0,Array.from(r.document.body.children).forEach(h=>h.addEventListener("click",kn)),r.document.documentElement.addEventListener("click",kn));let l=!0;const c=h=>i.some(p=>{if(typeof p=="string")return Array.from(r.document.querySelectorAll(p)).some(m=>m===h.target||h.composedPath().includes(m));{const m=un(p);return m&&(h.target===m||h.composedPath().includes(m))}}),u=[Ue(r,"click",h=>{const p=un(n);if(!(!p||p===h.target||h.composedPath().includes(p))){if(h.detail===0&&(l=!c(h)),!l){l=!0;return}e(h)}},{passive:!0,capture:o}),Ue(r,"pointerdown",h=>{const p=un(n);l=!c(h)&&!!(p&&!h.composedPath().includes(p))},{passive:!0}),s&&Ue(r,"blur",h=>{setTimeout(()=>{var p;const m=un(n);((p=r.document.activeElement)==null?void 0:p.tagName)==="IFRAME"&&!(m!=null&&m.contains(r.document.activeElement))&&e(h)},0)})].filter(Boolean);return()=>u.forEach(h=>h())}const cB=500,dB=10;function uB(n,e,t){var r,i;const o=a.computed(()=>un(n));let s,l;function c(){s&&(clearTimeout(s),s=void 0),l=void 0}function d(m){var y,b,w,v;(y=t==null?void 0:t.modifiers)!=null&&y.self&&m.target!==o.value||(c(),(b=t==null?void 0:t.modifiers)!=null&&b.prevent&&m.preventDefault(),(w=t==null?void 0:t.modifiers)!=null&&w.stop&&m.stopPropagation(),l={x:m.x,y:m.y},s=setTimeout(()=>e(m),(v=t==null?void 0:t.delay)!=null?v:cB))}function u(m){var y,b,w,v;if((y=t==null?void 0:t.modifiers)!=null&&y.self&&m.target!==o.value||!l||(t==null?void 0:t.distanceThreshold)===!1)return;(b=t==null?void 0:t.modifiers)!=null&&b.prevent&&m.preventDefault(),(w=t==null?void 0:t.modifiers)!=null&&w.stop&&m.stopPropagation();const k=m.x-l.x,C=m.y-l.y;Math.sqrt(k*k+C*C)>=((v=t==null?void 0:t.distanceThreshold)!=null?v:dB)&&c()}const f={capture:(r=t==null?void 0:t.modifiers)==null?void 0:r.capture,once:(i=t==null?void 0:t.modifiers)==null?void 0:i.once},h=[Ue(o,"pointerdown",d,f),Ue(o,"pointermove",u,f),Ue(o,["pointerup","pointerleave"],c,f)];return()=>h.forEach(m=>m())}function fB(){const n=a.ref(!1),e=a.getCurrentInstance();return e&&a.onMounted(()=>{n.value=!0},e),n}function gp(n){const e=fB();return a.computed(()=>(e.value,!!n()))}function Eu(n,e={}){const{window:t=gi}=e,r=gp(()=>t&&"matchMedia"in t&&typeof t.matchMedia=="function");let i;const o=a.ref(!1),s=d=>{o.value=d.matches},l=()=>{i&&("removeEventListener"in i?i.removeEventListener("change",s):i.removeListener(s))},c=a.watchEffect(()=>{r.value&&(l(),i=t.matchMedia(dn(n)),"addEventListener"in i?i.addEventListener("change",s):i.addListener(s),o.value=i.matches)});return Su(()=>{c(),l(),i=void 0}),o}const hB={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function J8(n,e={}){function t(u,f){let h=dn(n[dn(u)]);return f!=null&&(h=sB(h,f)),typeof h=="number"&&(h=`${h}px`),h}const{window:r=gi,strategy:i="min-width"}=e;function o(u){return r?r.matchMedia(u).matches:!1}const s=u=>Eu(()=>`(min-width: ${t(u)})`,e),l=u=>Eu(()=>`(max-width: ${t(u)})`,e),c=Object.keys(n).reduce((u,f)=>(Object.defineProperty(u,f,{get:()=>i==="min-width"?s(f):l(f),enumerable:!0,configurable:!0}),u),{});function d(){const u=Object.keys(n).map(f=>[f,s(f)]);return a.computed(()=>u.filter(([,f])=>f.value).map(([f])=>f))}return Object.assign(c,{greaterOrEqual:s,smallerOrEqual:l,greater(u){return Eu(()=>`(min-width: ${t(u,.1)})`,e)},smaller(u){return Eu(()=>`(max-width: ${t(u,-.1)})`,e)},between(u,f){return Eu(()=>`(min-width: ${t(u)}) and (max-width: ${t(f,-.1)})`,e)},isGreater(u){return o(`(min-width: ${t(u,.1)})`)},isGreaterOrEqual(u){return o(`(min-width: ${t(u)})`)},isSmaller(u){return o(`(max-width: ${t(u,-.1)})`)},isSmallerOrEqual(u){return o(`(max-width: ${t(u)})`)},isInBetween(u,f){return o(`(min-width: ${t(u)}) and (max-width: ${t(f,-.1)})`)},current:d,active(){const u=d();return a.computed(()=>u.value.length===0?"":u.value.at(-1))}})}function pB(n,e,t={}){const{window:r=gi,...i}=t;let o;const s=gp(()=>r&&"MutationObserver"in r),l=()=>{o&&(o.disconnect(),o=void 0)},c=a.computed(()=>{const h=dn(n),p=(Array.isArray(h)?h:[h]).map(un).filter(H5);return new Set(p)}),d=a.watch(()=>c.value,h=>{l(),s.value&&r&&h.size&&(o=new MutationObserver(e),h.forEach(p=>o.observe(p,i)))},{immediate:!0,flush:"post"}),u=()=>o==null?void 0:o.takeRecords(),f=()=>{l(),d()};return Su(f),{isSupported:s,stop:f,takeRecords:u}}function mB(n,e={}){const t=a.ref(!1),r=a.shallowRef(null);let i=0,o=!0;if(z5){const s=typeof e=="function"?{onDrop:e}:e,l=c=>{var d,u;const f=Array.from((u=(d=c.dataTransfer)==null?void 0:d.files)!=null?u:[]);return r.value=f.length===0?null:f};Ue(n,"dragenter",c=>{var d,u;const f=Array.from(((d=c==null?void 0:c.dataTransfer)==null?void 0:d.items)||[]).map(h=>h.kind==="file"?h.type:null).filter(H5);if(s.dataTypes&&c.dataTransfer){const h=a.unref(s.dataTypes);if(o=typeof h=="function"?h(f):h?h.some(p=>f.includes(p)):!0,!o)return}c.preventDefault(),i+=1,t.value=!0,(u=s.onEnter)==null||u.call(s,l(c),c)}),Ue(n,"dragover",c=>{var d;o&&(c.preventDefault(),(d=s.onOver)==null||d.call(s,l(c),c))}),Ue(n,"dragleave",c=>{var d;o&&(c.preventDefault(),i-=1,i===0&&(t.value=!1),(d=s.onLeave)==null||d.call(s,l(c),c))}),Ue(n,"drop",c=>{var d;c.preventDefault(),i=0,t.value=!1,(d=s.onDrop)==null||d.call(s,l(c),c)})}return{files:r,isOverDropZone:t}}function gB(n,e,t={}){const{window:r=gi,...i}=t;let o;const s=gp(()=>r&&"ResizeObserver"in r),l=()=>{o&&(o.disconnect(),o=void 0)},c=a.computed(()=>Array.isArray(n)?n.map(f=>un(f)):[un(n)]),d=a.watch(c,f=>{if(l(),s.value&&r){o=new ResizeObserver(e);for(const h of f)h&&o.observe(h,i)}},{immediate:!0,flush:"post"}),u=()=>{l(),d()};return Su(u),{isSupported:s,stop:u}}function yB(n,e={}){const{reset:t=!0,windowResize:r=!0,windowScroll:i=!0,immediate:o=!0}=e,s=a.ref(0),l=a.ref(0),c=a.ref(0),d=a.ref(0),u=a.ref(0),f=a.ref(0),h=a.ref(0),p=a.ref(0);function m(){const y=un(n);if(!y){t&&(s.value=0,l.value=0,c.value=0,d.value=0,u.value=0,f.value=0,h.value=0,p.value=0);return}const b=y.getBoundingClientRect();s.value=b.height,l.value=b.bottom,c.value=b.left,d.value=b.right,u.value=b.top,f.value=b.width,h.value=b.x,p.value=b.y}return gB(n,m),a.watch(()=>un(n),y=>!y&&m()),pB(n,m,{attributeFilter:["style","class"]}),i&&Ue("scroll",m,{capture:!0,passive:!0}),r&&Ue("resize",m,{passive:!0}),Q8(()=>{o&&m()}),{height:s,bottom:l,left:c,right:d,top:u,width:f,x:h,y:p,update:m}}function bB(n,e,t={}){const{root:r,rootMargin:i="0px",threshold:o=.1,window:s=gi,immediate:l=!0}=t,c=gp(()=>s&&"IntersectionObserver"in s),d=a.computed(()=>{const m=dn(n);return(Array.isArray(m)?m:[m]).map(un).filter(H5)});let u=kn;const f=a.ref(l),h=c.value?a.watch(()=>[d.value,un(r),f.value],([m,y])=>{if(u(),!f.value||!m.length)return;const b=new IntersectionObserver(e,{root:un(y),rootMargin:i,threshold:o});m.forEach(w=>w&&b.observe(w)),u=()=>{b.disconnect(),u=kn}},{immediate:l,flush:"post"}):kn,p=()=>{u(),h(),f.value=!1};return Su(p),{isSupported:c,isActive:f,pause(){u(),f.value=!1},resume(){f.value=!0},stop:p}}const e9=1;function Z5(n,e={}){const{throttle:t=0,idle:r=200,onStop:i=kn,onScroll:o=kn,offset:s={left:0,right:0,top:0,bottom:0},eventListenerOptions:l={capture:!1,passive:!0},behavior:c="auto",window:d=gi,onError:u=M=>{console.error(M)}}=e,f=a.ref(0),h=a.ref(0),p=a.computed({get(){return f.value},set(M){y(M,void 0)}}),m=a.computed({get(){return h.value},set(M){y(void 0,M)}});function y(M,x){var O,P,N;if(!d)return;const _=dn(n);_&&((N=_ instanceof Document?d.document.body:_)==null||N.scrollTo({top:(O=dn(x))!=null?O:m.value,left:(P=dn(M))!=null?P:p.value,behavior:dn(c)}))}const b=a.ref(!1),w=a.reactive({left:!0,right:!1,top:!0,bottom:!1}),v=a.reactive({left:!1,right:!1,top:!1,bottom:!1}),k=M=>{b.value&&(b.value=!1,v.left=!1,v.right=!1,v.top=!1,v.bottom=!1,i(M))},C=U5(k,t+r),T=M=>{var x;if(!d)return;const O=((x=M==null?void 0:M.document)==null?void 0:x.documentElement)||(M==null?void 0:M.documentElement)||un(M),{display:P,flexDirection:N}=getComputedStyle(O),_=O.scrollLeft;v.left=_<f.value,v.right=_>f.value;const V=Math.abs(_)<=(s.left||0),H=Math.abs(_)+O.clientWidth>=O.scrollWidth-(s.right||0)-e9;P==="flex"&&N==="row-reverse"?(w.left=H,w.right=V):(w.left=V,w.right=H),f.value=_;let L=O.scrollTop;M===d.document&&!L&&(L=d.document.body.scrollTop),v.top=L<h.value,v.bottom=L>h.value;const D=Math.abs(L)<=(s.top||0),U=Math.abs(L)+O.clientHeight>=O.scrollHeight-(s.bottom||0)-e9;P==="flex"&&N==="column-reverse"?(w.top=U,w.bottom=D):(w.top=D,w.bottom=U),h.value=L},S=M=>{var x;if(!d)return;const O=(x=M.target.documentElement)!=null?x:M.target;T(O),b.value=!0,C(M),o(M)};return Ue(n,"scroll",t?aB(S,t,!0,!1):S,l),Q8(()=>{try{const M=dn(n);if(!M)return;T(M)}catch(M){u(M)}}),Ue(n,"scrollend",k,l),{x:p,y:m,isScrolling:b,arrivedState:w,directions:v,measure(){const M=dn(n);d&&M&&T(M)}}}function wB(n,e={}){const{threshold:t=50,onSwipe:r,onSwipeEnd:i,onSwipeStart:o,passive:s=!0,window:l=gi}=e,c=a.reactive({x:0,y:0}),d=a.reactive({x:0,y:0}),u=a.computed(()=>c.x-d.x),f=a.computed(()=>c.y-d.y),{max:h,abs:p}=Math,m=a.computed(()=>h(p(u.value),p(f.value))>=t),y=a.ref(!1),b=a.computed(()=>m.value?p(u.value)>p(f.value)?u.value>0?"left":"right":f.value>0?"up":"down":"none"),w=O=>[O.touches[0].clientX,O.touches[0].clientY],v=(O,P)=>{c.x=O,c.y=P},k=(O,P)=>{d.x=O,d.y=P};let C;const T=vB(l==null?void 0:l.document);s?C=T?{passive:!0}:{capture:!1}:C=T?{passive:!1,capture:!0}:{capture:!0};const S=O=>{y.value&&(i==null||i(O,b.value)),y.value=!1},M=[Ue(n,"touchstart",O=>{if(O.touches.length!==1)return;C.capture&&!C.passive&&O.preventDefault();const[P,N]=w(O);v(P,N),k(P,N),o==null||o(O)},C),Ue(n,"touchmove",O=>{if(O.touches.length!==1)return;const[P,N]=w(O);k(P,N),!y.value&&m.value&&(y.value=!0),y.value&&(r==null||r(O))},C),Ue(n,["touchend","touchcancel"],S,C)];return{isPassiveEventSupported:T,isSwiping:y,direction:b,coordsStart:c,coordsEnd:d,lengthX:u,lengthY:f,stop:()=>M.forEach(O=>O())}}function vB(n){if(!n)return!1;let e=!1;const t={get passive(){return e=!0,!1}};return n.addEventListener("x",kn,t),n.removeEventListener("x",kn),e}function t9(n={}){const{window:e=gi,behavior:t="auto"}=n;if(!e)return{x:a.ref(0),y:a.ref(0)};const r=a.ref(e.scrollX),i=a.ref(e.scrollY),o=a.computed({get(){return r.value},set(l){scrollTo({left:l,behavior:t})}}),s=a.computed({get(){return i.value},set(l){scrollTo({top:l,behavior:t})}});return Ue(e,"scroll",()=>{r.value=e.scrollX,i.value=e.scrollY},{capture:!1,passive:!0}),{x:o,y:s}}const n9=1/60*1e3,CB=typeof performance<"u"?()=>performance.now():()=>Date.now(),r9=typeof window<"u"?n=>window.requestAnimationFrame(n):n=>setTimeout(()=>n(CB()),n9);function kB(n){let e=[],t=[],r=0,i=!1,o=!1;const s=new WeakSet,l={schedule:(c,d=!1,u=!1)=>{const f=u&&i,h=f?e:t;return d&&s.add(c),h.indexOf(c)===-1&&(h.push(c),f&&i&&(r=e.length)),c},cancel:c=>{const d=t.indexOf(c);d!==-1&&t.splice(d,1),s.delete(c)},process:c=>{if(i){o=!0;return}if(i=!0,[e,t]=[t,e],t.length=0,r=e.length,r)for(let d=0;d<r;d++){const u=e[d];u(c),s.has(u)&&(l.schedule(u),n())}i=!1,o&&(o=!1,l.process(c))}};return l}const SB=40;let W5=!0,Mu=!1,q5=!1;const F0={delta:0,timestamp:0},Au=["read","update","preRender","render","postRender"],yp=Au.reduce((n,e)=>(n[e]=kB(()=>Mu=!0),n),{}),K5=Au.reduce((n,e)=>{const t=yp[e];return n[e]=(r,i=!1,o=!1)=>(Mu||AB(),t.schedule(r,i,o)),n},{}),EB=Au.reduce((n,e)=>(n[e]=yp[e].cancel,n),{});Au.reduce((n,e)=>(n[e]=()=>yp[e].process(F0),n),{});const MB=n=>yp[n].process(F0),i9=n=>{Mu=!1,F0.delta=W5?n9:Math.max(Math.min(n-F0.timestamp,SB),1),F0.timestamp=n,q5=!0,Au.forEach(MB),q5=!1,Mu&&(W5=!1,r9(i9))},AB=()=>{Mu=!0,W5=!0,q5||r9(i9)},o9=()=>F0;function s9(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t}var G5=function(){},Tu=function(){};process.env.NODE_ENV!=="production"&&(G5=function(n,e){!n&&typeof console<"u"&&console.warn(e)},Tu=function(n,e){if(!n)throw new Error(e)});const Y5=(n,e,t)=>Math.min(Math.max(t,n),e),Q5=.001,TB=.01,a9=10,IB=.05,xB=1;function OB({duration:n=800,bounce:e=.25,velocity:t=0,mass:r=1}){let i,o;G5(n<=a9*1e3,"Spring duration must be 10 seconds or less");let s=1-e;s=Y5(IB,xB,s),n=Y5(TB,a9,n/1e3),s<1?(i=d=>{const u=d*s,f=u*n,h=u-t,p=X5(d,s),m=Math.exp(-f);return Q5-h/p*m},o=d=>{const f=d*s*n,h=f*t+t,p=Math.pow(s,2)*Math.pow(d,2)*n,m=Math.exp(-f),y=X5(Math.pow(d,2),s);return(-i(d)+Q5>0?-1:1)*((h-p)*m)/y}):(i=d=>{const u=Math.exp(-d*n),f=(d-t)*n+1;return-Q5+u*f},o=d=>{const u=Math.exp(-d*n),f=(t-d)*(n*n);return u*f});const l=5/n,c=NB(i,o,l);if(n=n*1e3,isNaN(c))return{stiffness:100,damping:10,duration:n};{const d=Math.pow(c,2)*r;return{stiffness:d,damping:s*2*Math.sqrt(r*d),duration:n}}}const DB=12;function NB(n,e,t){let r=t;for(let i=1;i<DB;i++)r=r-n(r)/e(r);return r}function X5(n,e){return n*Math.sqrt(1-e*e)}const PB=["duration","bounce"],LB=["stiffness","damping","mass"];function l9(n,e){return e.some(t=>n[t]!==void 0)}function BB(n){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},n);if(!l9(n,LB)&&l9(n,PB)){const t=OB(n);e=Object.assign(Object.assign(Object.assign({},e),t),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function J5(n){var{from:e=0,to:t=1,restSpeed:r=2,restDelta:i}=n,o=s9(n,["from","to","restSpeed","restDelta"]);const s={done:!1,value:e};let{stiffness:l,damping:c,mass:d,velocity:u,duration:f,isResolvedFromDuration:h}=BB(o),p=c9,m=c9;function y(){const b=u?-(u/1e3):0,w=t-e,v=c/(2*Math.sqrt(l*d)),k=Math.sqrt(l/d)/1e3;if(i===void 0&&(i=Math.min(Math.abs(t-e)/100,.4)),v<1){const C=X5(k,v);p=T=>{const S=Math.exp(-v*k*T);return t-S*((b+v*k*w)/C*Math.sin(C*T)+w*Math.cos(C*T))},m=T=>{const S=Math.exp(-v*k*T);return v*k*S*(Math.sin(C*T)*(b+v*k*w)/C+w*Math.cos(C*T))-S*(Math.cos(C*T)*(b+v*k*w)-C*w*Math.sin(C*T))}}else if(v===1)p=C=>t-Math.exp(-k*C)*(w+(b+k*w)*C);else{const C=k*Math.sqrt(v*v-1);p=T=>{const S=Math.exp(-v*k*T),M=Math.min(C*T,300);return t-S*((b+v*k*w)*Math.sinh(M)+C*w*Math.cosh(M))/C}}}return y(),{next:b=>{const w=p(b);if(h)s.done=b>=f;else{const v=m(b)*1e3,k=Math.abs(v)<=r,C=Math.abs(t-w)<=i;s.done=k&&C}return s.value=s.done?t:w,s},flipTarget:()=>{u=-u,[e,t]=[t,e],y()}}}J5.needsInterpolation=(n,e)=>typeof n=="string"||typeof e=="string";const c9=n=>0,d9=(n,e,t)=>{const r=e-n;return r===0?1:(t-n)/r},e4=(n,e,t)=>-t*n+t*e+n,u9=(n,e)=>t=>Math.max(Math.min(t,e),n),Iu=n=>n%1?Number(n.toFixed(5)):n,xu=/(-)?([\d]*\.?[\d])+/g,t4=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,_B=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Ou(n){return typeof n=="string"}const Du={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},Nu=Object.assign(Object.assign({},Du),{transform:u9(0,1)}),bp=Object.assign(Object.assign({},Du),{default:1}),n4=n=>({test:e=>Ou(e)&&e.endsWith(n)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${n}`}),La=n4("deg"),Pu=n4("%"),Se=n4("px"),f9=Object.assign(Object.assign({},Pu),{parse:n=>Pu.parse(n)/100,transform:n=>Pu.transform(n*100)}),r4=(n,e)=>t=>!!(Ou(t)&&_B.test(t)&&t.startsWith(n)||e&&Object.prototype.hasOwnProperty.call(t,e)),h9=(n,e,t)=>r=>{if(!Ou(r))return r;const[i,o,s,l]=r.match(xu);return{[n]:parseFloat(i),[e]:parseFloat(o),[t]:parseFloat(s),alpha:l!==void 0?parseFloat(l):1}},Ba={test:r4("hsl","hue"),parse:h9("hue","saturation","lightness"),transform:({hue:n,saturation:e,lightness:t,alpha:r=1})=>"hsla("+Math.round(n)+", "+Pu.transform(Iu(e))+", "+Pu.transform(Iu(t))+", "+Iu(Nu.transform(r))+")"},RB=u9(0,255),i4=Object.assign(Object.assign({},Du),{transform:n=>Math.round(RB(n))}),ss={test:r4("rgb","red"),parse:h9("red","green","blue"),transform:({red:n,green:e,blue:t,alpha:r=1})=>"rgba("+i4.transform(n)+", "+i4.transform(e)+", "+i4.transform(t)+", "+Iu(Nu.transform(r))+")"};function $B(n){let e="",t="",r="",i="";return n.length>5?(e=n.substr(1,2),t=n.substr(3,2),r=n.substr(5,2),i=n.substr(7,2)):(e=n.substr(1,1),t=n.substr(2,1),r=n.substr(3,1),i=n.substr(4,1),e+=e,t+=t,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const o4={test:r4("#"),parse:$B,transform:ss.transform},Rn={test:n=>ss.test(n)||o4.test(n)||Ba.test(n),parse:n=>ss.test(n)?ss.parse(n):Ba.test(n)?Ba.parse(n):o4.parse(n),transform:n=>Ou(n)?n:n.hasOwnProperty("red")?ss.transform(n):Ba.transform(n)},p9="${c}",m9="${n}";function VB(n){var e,t,r,i;return isNaN(n)&&Ou(n)&&((t=(e=n.match(xu))===null||e===void 0?void 0:e.length)!==null&&t!==void 0?t:0)+((i=(r=n.match(t4))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function g9(n){typeof n=="number"&&(n=`${n}`);const e=[];let t=0;const r=n.match(t4);r&&(t=r.length,n=n.replace(t4,p9),e.push(...r.map(Rn.parse)));const i=n.match(xu);return i&&(n=n.replace(xu,m9),e.push(...i.map(Du.parse))),{values:e,numColors:t,tokenised:n}}function y9(n){return g9(n).values}function b9(n){const{values:e,numColors:t,tokenised:r}=g9(n),i=e.length;return o=>{let s=r;for(let l=0;l<i;l++)s=s.replace(l<t?p9:m9,l<t?Rn.transform(o[l]):Iu(o[l]));return s}}const FB=n=>typeof n=="number"?0:n;function jB(n){const e=y9(n);return b9(n)(e.map(FB))}const Lu={test:VB,parse:y9,createTransformer:b9,getAnimatableNone:jB},zB=new Set(["brightness","contrast","saturate","opacity"]);function HB(n){let[e,t]=n.slice(0,-1).split("(");if(e==="drop-shadow")return n;const[r]=t.match(xu)||[];if(!r)return n;const i=t.replace(r,"");let o=zB.has(e)?1:0;return r!==t&&(o*=100),e+"("+o+i+")"}const UB=/([a-z-]*)\(.*?\)/g,s4=Object.assign(Object.assign({},Lu),{getAnimatableNone:n=>{const e=n.match(UB);return e?e.map(HB).join(" "):n}});function a4(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function w9({hue:n,saturation:e,lightness:t,alpha:r}){n/=360,e/=100,t/=100;let i=0,o=0,s=0;if(!e)i=o=s=t;else{const l=t<.5?t*(1+e):t+e-t*e,c=2*t-l;i=a4(c,l,n+1/3),o=a4(c,l,n),s=a4(c,l,n-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const ZB=(n,e,t)=>{const r=n*n,i=e*e;return Math.sqrt(Math.max(0,t*(i-r)+r))},WB=[o4,ss,Ba],v9=n=>WB.find(e=>e.test(n)),C9=n=>`'${n}' is not an animatable color. Use the equivalent color code instead.`,k9=(n,e)=>{let t=v9(n),r=v9(e);Tu(!!t,C9(n)),Tu(!!r,C9(e));let i=t.parse(n),o=r.parse(e);t===Ba&&(i=w9(i),t=ss),r===Ba&&(o=w9(o),r=ss);const s=Object.assign({},i);return l=>{for(const c in s)c!=="alpha"&&(s[c]=ZB(i[c],o[c],l));return s.alpha=e4(i.alpha,o.alpha,l),t.transform(s)}},qB=n=>typeof n=="number",KB=(n,e)=>t=>e(n(t)),S9=(...n)=>n.reduce(KB);function E9(n,e){return qB(n)?t=>e4(n,e,t):Rn.test(n)?k9(n,e):T9(n,e)}const M9=(n,e)=>{const t=[...n],r=t.length,i=n.map((o,s)=>E9(o,e[s]));return o=>{for(let s=0;s<r;s++)t[s]=i[s](o);return t}},GB=(n,e)=>{const t=Object.assign(Object.assign({},n),e),r={};for(const i in t)n[i]!==void 0&&e[i]!==void 0&&(r[i]=E9(n[i],e[i]));return i=>{for(const o in r)t[o]=r[o](i);return t}};function A9(n){const e=Lu.parse(n),t=e.length;let r=0,i=0,o=0;for(let s=0;s<t;s++)r||typeof e[s]=="number"?r++:e[s].hue!==void 0?o++:i++;return{parsed:e,numNumbers:r,numRGB:i,numHSL:o}}const T9=(n,e)=>{const t=Lu.createTransformer(e),r=A9(n),i=A9(e);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?S9(M9(r.parsed,i.parsed),t):(G5(!0,`Complex values '${n}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),s=>`${s>0?e:n}`)},YB=(n,e)=>t=>e4(n,e,t);function QB(n){if(typeof n=="number")return YB;if(typeof n=="string")return Rn.test(n)?k9:T9;if(Array.isArray(n))return M9;if(typeof n=="object")return GB}function XB(n,e,t){const r=[],i=t||QB(n[0]),o=n.length-1;for(let s=0;s<o;s++){let l=i(n[s],n[s+1]);if(e){const c=Array.isArray(e)?e[s]:e;l=S9(c,l)}r.push(l)}return r}function JB([n,e],[t]){return r=>t(d9(n,e,r))}function e_(n,e){const t=n.length,r=t-1;return i=>{let o=0,s=!1;if(i<=n[0]?s=!0:i>=n[r]&&(o=r-1,s=!0),!s){let c=1;for(;c<t&&!(n[c]>i||c===r);c++);o=c-1}const l=d9(n[o],n[o+1],i);return e[o](l)}}function I9(n,e,{clamp:t=!0,ease:r,mixer:i}={}){const o=n.length;Tu(o===e.length,"Both input and output ranges must be the same length"),Tu(!r||!Array.isArray(r)||r.length===o-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),n[0]>n[o-1]&&(n=[].concat(n),e=[].concat(e),n.reverse(),e.reverse());const s=XB(e,r,i),l=o===2?JB(n,s):e_(n,s);return t?c=>l(Y5(n[0],n[o-1],c)):l}const wp=n=>e=>1-n(1-e),l4=n=>e=>e<=.5?n(2*e)/2:(2-n(2*(1-e)))/2,t_=n=>e=>Math.pow(e,n),x9=n=>e=>e*e*((n+1)*e-n),n_=n=>{const e=x9(n);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))},O9=1.525,r_=4/11,i_=8/11,o_=9/10,D9=n=>n,c4=t_(2),s_=wp(c4),N9=l4(c4),P9=n=>1-Math.sin(Math.acos(n)),L9=wp(P9),a_=l4(L9),d4=x9(O9),l_=wp(d4),c_=l4(d4),d_=n_(O9),u_=4356/361,f_=35442/1805,h_=16061/1805,vp=n=>{if(n===1||n===0)return n;const e=n*n;return n<r_?7.5625*e:n<i_?9.075*e-9.9*n+3.4:n<o_?u_*e-f_*n+h_:10.8*n*n-20.52*n+10.72},p_=wp(vp),m_=n=>n<.5?.5*(1-vp(1-n*2)):.5*vp(n*2-1)+.5;function g_(n,e){return n.map(()=>e||N9).splice(0,n.length-1)}function y_(n){const e=n.length;return n.map((t,r)=>r!==0?r/(e-1):0)}function b_(n,e){return n.map(t=>t*e)}function Cp({from:n=0,to:e=1,ease:t,offset:r,duration:i=300}){const o={done:!1,value:n},s=Array.isArray(e)?e:[n,e],l=b_(r&&r.length===s.length?r:y_(s),i);function c(){return I9(l,s,{ease:Array.isArray(t)?t:g_(s,t)})}let d=c();return{next:u=>(o.value=d(u),o.done=u>=i,o),flipTarget:()=>{s.reverse(),d=c()}}}function w_({velocity:n=0,from:e=0,power:t=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const s={done:!1,value:e};let l=t*n;const c=e+l,d=o===void 0?c:o(c);return d!==c&&(l=d-e),{next:u=>{const f=-l*Math.exp(-u/r);return s.done=!(f>i||f<-i),s.value=s.done?d:d+f,s},flipTarget:()=>{}}}const B9={keyframes:Cp,spring:J5,decay:w_};function v_(n){if(Array.isArray(n.to))return Cp;if(B9[n.type])return B9[n.type];const e=new Set(Object.keys(n));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Cp:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?J5:Cp}function _9(n,e,t=0){return n-e-t}function C_(n,e,t=0,r=!0){return r?_9(e+-n,e,t):e-(n-e)+t}function k_(n,e,t,r){return r?n>=e+t:n<=-t}const S_=n=>{const e=({delta:t})=>n(t);return{start:()=>K5.update(e,!0),stop:()=>EB.update(e)}};function R9(n){var e,t,{from:r,autoplay:i=!0,driver:o=S_,elapsed:s=0,repeat:l=0,repeatType:c="loop",repeatDelay:d=0,onPlay:u,onStop:f,onComplete:h,onRepeat:p,onUpdate:m}=n,y=s9(n,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:b}=y,w,v=0,k=y.duration,C,T=!1,S=!0,M;const x=v_(y);!((t=(e=x).needsInterpolation)===null||t===void 0)&&t.call(e,r,b)&&(M=I9([0,100],[r,b],{clamp:!1}),r=0,b=100);const O=x(Object.assign(Object.assign({},y),{from:r,to:b}));function P(){v++,c==="reverse"?(S=v%2===0,s=C_(s,k,d,S)):(s=_9(s,k,d),c==="mirror"&&O.flipTarget()),T=!1,p&&p()}function N(){w.stop(),h&&h()}function _(H){if(S||(H=-H),s+=H,!T){const L=O.next(Math.max(0,s));C=L.value,M&&(C=M(C)),T=S?L.done:s<=0}m==null||m(C),T&&(v===0&&(k??(k=s)),v<l?k_(s,k,d,S)&&P():N())}function V(){u==null||u(),w=o(_),w.start()}return i&&V(),{stop:()=>{f==null||f(),w.stop()}}}function $9(n,e){return e?n*(1e3/e):0}function E_({from:n=0,velocity:e=0,min:t,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:s=500,bounceDamping:l=10,restDelta:c=1,modifyTarget:d,driver:u,onUpdate:f,onComplete:h,onStop:p}){let m;function y(k){return t!==void 0&&k<t||r!==void 0&&k>r}function b(k){return t===void 0?r:r===void 0||Math.abs(t-k)<Math.abs(r-k)?t:r}function w(k){m==null||m.stop(),m=R9(Object.assign(Object.assign({},k),{driver:u,onUpdate:C=>{var T;f==null||f(C),(T=k.onUpdate)===null||T===void 0||T.call(k,C)},onComplete:h,onStop:p}))}function v(k){w(Object.assign({type:"spring",stiffness:s,damping:l,restDelta:c},k))}if(y(n))v({from:n,velocity:e,to:b(n)});else{let k=i*e+n;typeof d<"u"&&(k=d(k));const C=b(k),T=C===t?-1:1;let S,M;const x=O=>{S=M,M=O,e=$9(O-S,o9().delta),(T===1&&O>C||T===-1&&O<C)&&v({from:O,to:C,velocity:e})};w({type:"decay",from:n,velocity:e,timeConstant:o,power:i,restDelta:c,modifyTarget:d,onUpdate:y(k)?x:void 0})}return{stop:()=>m==null?void 0:m.stop()}}const V9=(n,e)=>1-3*e+3*n,F9=(n,e)=>3*e-6*n,j9=n=>3*n,kp=(n,e,t)=>((V9(e,t)*n+F9(e,t))*n+j9(e))*n,z9=(n,e,t)=>3*V9(e,t)*n*n+2*F9(e,t)*n+j9(e),M_=1e-7,A_=10;function T_(n,e,t,r,i){let o,s,l=0;do s=e+(t-e)/2,o=kp(s,r,i)-n,o>0?t=s:e=s;while(Math.abs(o)>M_&&++l<A_);return s}const I_=8,x_=.001;function O_(n,e,t,r){for(let i=0;i<I_;++i){const o=z9(e,t,r);if(o===0)return e;const s=kp(e,t,r)-n;e-=s/o}return e}const Sp=11,Ep=1/(Sp-1);function D_(n,e,t,r){if(n===e&&t===r)return D9;const i=new Float32Array(Sp);for(let s=0;s<Sp;++s)i[s]=kp(s*Ep,n,t);function o(s){let l=0,c=1;const d=Sp-1;for(;c!==d&&i[c]<=s;++c)l+=Ep;--c;const u=(s-i[c])/(i[c+1]-i[c]),f=l+u*Ep,h=z9(f,n,t);return h>=x_?O_(s,f,n,t):h===0?f:T_(s,l,l+Ep,n,t)}return s=>s===0||s===1?s:kp(o(s),e,r)}/**
|
|
@@ -118,7 +118,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
118
118
|
}
|
|
119
119
|
`)}}this.thumbnailsStyle.innerHTML=t},calculatePosition:function(){if(this.$refs.itemsContainer&&this.sortedResponsiveOptions){for(var e=window.innerWidth,t={numVisible:this.numVisible},r=0;r<this.sortedResponsiveOptions.length;r++){var i=this.sortedResponsiveOptions[r];parseInt(i.breakpoint,10)>=e&&(t=i)}this.d_numVisible!==t.numVisible&&(this.d_numVisible=t.numVisible)}},bindDocumentListeners:function(){var e=this;this.documentResizeListener||(this.documentResizeListener=function(){e.calculatePosition()},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},isNavBackwardDisabled:function(){return!this.circular&&this.d_activeIndex===0||this.value.length<=this.d_numVisible},isNavForwardDisabled:function(){return!this.circular&&this.d_activeIndex===this.value.length-1||this.value.length<=this.d_numVisible},firstItemAciveIndex:function(){return this.totalShiftedItems*-1},lastItemActiveIndex:function(){return this.firstItemAciveIndex()+this.d_numVisible-1},isItemActive:function(e){return this.firstItemAciveIndex()<=e&&this.lastItemActiveIndex()>=e},ariaPageLabel:function(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,e):void 0}},computed:{ariaPrevButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.prevPageLabel:void 0},ariaNextButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.nextPageLabel:void 0}},components:{ChevronLeftIcon:yb,ChevronRightIcon:o2,ChevronUpIcon:eE,ChevronDownIcon:s2},directives:{ripple:$n}};function l2(n){"@babel/helpers - typeof";return l2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l2(n)}function rE(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function nm(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?rE(Object(t),!0).forEach(function(r){LH(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):rE(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function LH(n,e,t){return e=BH(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function BH(n){var e=_H(n,"string");return l2(e)=="symbol"?e:String(e)}function _H(n,e){if(l2(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(l2(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var RH=["disabled","aria-label"],$H=["data-p-active","aria-selected","aria-controls","onKeydown","data-p-galleria-thumbnail-item-current","data-p-galleria-thumbnail-item-active","data-p-galleria-thumbnail-item-start","data-p-galleria-thumbnail-item-end"],VH=["tabindex","aria-label","aria-current","onClick"],FH=["disabled","aria-label"];function jH(n,e,t,r,i,o){var s=a.resolveDirective("ripple");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:n.cx("thumbnailWrapper")},n.ptm("thumbnailWrapper")),[a.createElementVNode("div",a.mergeProps({class:n.cx("thumbnailContainer")},n.ptm("thumbnailContainer")),[t.showThumbnailNavigators?a.withDirectives((a.openBlock(),a.createElementBlock("button",a.mergeProps({key:0,class:n.cx("previousThumbnailButton"),disabled:o.isNavBackwardDisabled(),type:"button","aria-label":o.ariaPrevButtonLabel,onClick:e[0]||(e[0]=function(l){return o.navBackward(l)})},nm(nm({},t.prevButtonProps),n.ptm("previousThumbnailButton")),{"data-pc-group-section":"thumbnailnavigator"}),[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(t.templates.previousthumbnailicon||(t.isVertical?"ChevronUpIcon":"ChevronLeftIcon")),a.mergeProps({class:n.cx("previousThumbnailIcon")},n.ptm("previousThumbnailIcon")),null,16,["class"]))],16,RH)),[[s]]):a.createCommentVNode("",!0),a.createElementVNode("div",a.mergeProps({class:n.cx("thumbnailItemsContainer"),style:{height:t.isVertical?t.contentHeight:""}},n.ptm("thumbnailItemsContainer")),[a.createElementVNode("div",a.mergeProps({ref:"itemsContainer",class:n.cx("thumbnailItems"),role:"tablist",onTransitionend:e[1]||(e[1]=function(l){return o.onTransitionEnd(l)}),onTouchstart:e[2]||(e[2]=function(l){return o.onTouchStart(l)}),onTouchmove:e[3]||(e[3]=function(l){return o.onTouchMove(l)}),onTouchend:e[4]||(e[4]=function(l){return o.onTouchEnd(l)})},n.ptm("thumbnailItems")),[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.value,function(l,c){return a.openBlock(),a.createElementBlock("div",a.mergeProps({key:"p-galleria-thumbnail-item-".concat(c),class:n.cx("thumbnailItem",{index:c,activeIndex:t.activeIndex}),role:"tab","data-p-active":t.activeIndex===c,"aria-selected":t.activeIndex===c,"aria-controls":t.containerId+"_item_"+c,onKeydown:function(u){return o.onThumbnailKeydown(u,c)}},n.ptm("thumbnailItem"),{"data-p-galleria-thumbnail-item-current":t.activeIndex===c,"data-p-galleria-thumbnail-item-active":o.isItemActive(c),"data-p-galleria-thumbnail-item-start":o.firstItemAciveIndex()===c,"data-p-galleria-thumbnail-item-end":o.lastItemActiveIndex()===c}),[a.createElementVNode("div",a.mergeProps({class:n.cx("thumbnailItemContent"),tabindex:t.activeIndex===c?"0":"-1","aria-label":o.ariaPageLabel(c+1),"aria-current":t.activeIndex===c?"page":void 0,onClick:function(u){return o.onItemClick(c)}},n.ptm("thumbnailItemContent")),[t.templates.thumbnail?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(t.templates.thumbnail),{key:0,item:l},null,8,["item"])):a.createCommentVNode("",!0)],16,VH)],16,$H)}),128))],16)],16),t.showThumbnailNavigators?a.withDirectives((a.openBlock(),a.createElementBlock("button",a.mergeProps({key:1,class:n.cx("nextThumbnailButton"),disabled:o.isNavForwardDisabled(),type:"button","aria-label":o.ariaNextButtonLabel,onClick:e[5]||(e[5]=function(l){return o.navForward(l)})},nm(nm({},t.nextButtonProps),n.ptm("nextThumbnailButton")),{"data-pc-group-section":"thumbnailnavigator"}),[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(t.templates.nextthumbnailicon||(t.isVertical?"ChevronDownIcon":"ChevronRightIcon")),a.mergeProps({class:n.cx("nextThumbnailIcon")},n.ptm("nextThumbnailIcon")),null,16,["class"]))],16,FH)),[[s]]):a.createCommentVNode("",!0)],16)],16)}nE.render=jH;function c2(n){"@babel/helpers - typeof";return c2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c2(n)}function iE(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function oE(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?iE(Object(t),!0).forEach(function(r){zH(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):iE(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function zH(n,e,t){return e=HH(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function HH(n){var e=UH(n,"string");return c2(e)=="symbol"?e:String(e)}function UH(n,e){if(c2(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(c2(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var sE={name:"GalleriaContent",hostName:"Galleria",extends:Ce,inheritAttrs:!1,interval:null,emits:["activeitem-change","mask-hide"],data:function(){return{id:this.$attrs.id||Hr(),activeIndex:this.$attrs.activeIndex,numVisible:this.$attrs.numVisible,slideShowActive:!1}},watch:{"$attrs.id":function(e){this.id=e||Hr()},"$attrs.value":function(e){e&&e.length<this.numVisible&&(this.numVisible=e.length)},"$attrs.activeIndex":function(e){this.activeIndex=e},"$attrs.numVisible":function(e){this.numVisible=e},"$attrs.autoPlay":function(e){e?this.startSlideShow():this.stopSlideShow()}},mounted:function(){this.id=this.id||Hr()},updated:function(){this.$emit("activeitem-change",this.activeIndex)},beforeUnmount:function(){this.slideShowActive&&this.stopSlideShow()},methods:{getPTOptions:function(e){return this.ptm(e,{props:oE(oE({},this.$attrs),{},{pt:this.pt,unstyled:this.unstyled})})},isAutoPlayActive:function(){return this.slideShowActive},startSlideShow:function(){var e=this;this.interval=setInterval(function(){var t=e.$attrs.circular&&e.$attrs.value.length-1===e.activeIndex?0:e.activeIndex+1;e.activeIndex=t},this.$attrs.transitionInterval),this.slideShowActive=!0},stopSlideShow:function(){this.interval&&clearInterval(this.interval),this.slideShowActive=!1},getPositionClass:function(e,t){var r=["top","left","bottom","right"],i=r.find(function(o){return o===t});return i?"".concat(e,"-").concat(i):""},isVertical:function(){return this.$attrs.thumbnailsPosition==="left"||this.$attrs.thumbnailsPosition==="right"}},computed:{closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{GalleriaItem:tE,GalleriaThumbnails:nE,TimesIcon:Wa},directives:{ripple:$n}};function d2(n){"@babel/helpers - typeof";return d2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d2(n)}function aE(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function lE(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?aE(Object(t),!0).forEach(function(r){ZH(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):aE(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function ZH(n,e,t){return e=WH(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function WH(n){var e=qH(n,"string");return d2(e)=="symbol"?e:String(e)}function qH(n,e){if(d2(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(d2(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var KH=["id","aria-label","aria-roledescription"],GH=["aria-label"],YH=["aria-live"];function QH(n,e,t,r,i,o){var s=a.resolveComponent("GalleriaItem"),l=a.resolveComponent("GalleriaThumbnails"),c=a.resolveDirective("ripple");return n.$attrs.value&&n.$attrs.value.length>0?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,id:i.id,role:"region",class:[n.cx("root"),n.$attrs.containerClass],style:n.$attrs.containerStyle,"aria-label":n.$attrs.ariaLabel,"aria-roledescription":n.$attrs.ariaRoledescription},lE(lE({},n.$attrs.containerProps),o.getPTOptions("root"))),[n.$attrs.fullScreen?a.withDirectives((a.openBlock(),a.createElementBlock("button",a.mergeProps({key:0,autofocus:"",type:"button",class:n.cx("closeButton"),"aria-label":o.closeAriaLabel,onClick:e[0]||(e[0]=function(d){return n.$emit("mask-hide")})},o.getPTOptions("closeButton")),[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.$attrs.templates.closeicon||"TimesIcon"),a.mergeProps({class:n.cx("closeIcon")},o.getPTOptions("closeIcon")),null,16,["class"]))],16,GH)),[[c]]):a.createCommentVNode("",!0),n.$attrs.templates&&n.$attrs.templates.header?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:1,class:n.cx("header")},o.getPTOptions("header")),[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.$attrs.templates.header)))],16)):a.createCommentVNode("",!0),a.createElementVNode("div",a.mergeProps({class:n.cx("content"),"aria-live":n.$attrs.autoPlay?"polite":"off"},o.getPTOptions("content")),[a.createVNode(s,{id:i.id,activeIndex:i.activeIndex,"onUpdate:activeIndex":e[1]||(e[1]=function(d){return i.activeIndex=d}),slideShowActive:i.slideShowActive,"onUpdate:slideShowActive":e[2]||(e[2]=function(d){return i.slideShowActive=d}),value:n.$attrs.value,circular:n.$attrs.circular,templates:n.$attrs.templates,showIndicators:n.$attrs.showIndicators,changeItemOnIndicatorHover:n.$attrs.changeItemOnIndicatorHover,showItemNavigators:n.$attrs.showItemNavigators,autoPlay:n.$attrs.autoPlay,onStartSlideshow:o.startSlideShow,onStopSlideshow:o.stopSlideShow,pt:n.pt,unstyled:n.unstyled},null,8,["id","activeIndex","slideShowActive","value","circular","templates","showIndicators","changeItemOnIndicatorHover","showItemNavigators","autoPlay","onStartSlideshow","onStopSlideshow","pt","unstyled"]),n.$attrs.showThumbnails?(a.openBlock(),a.createBlock(l,{key:0,activeIndex:i.activeIndex,"onUpdate:activeIndex":e[3]||(e[3]=function(d){return i.activeIndex=d}),slideShowActive:i.slideShowActive,"onUpdate:slideShowActive":e[4]||(e[4]=function(d){return i.slideShowActive=d}),containerId:i.id,value:n.$attrs.value,templates:n.$attrs.templates,numVisible:i.numVisible,responsiveOptions:n.$attrs.responsiveOptions,circular:n.$attrs.circular,isVertical:o.isVertical(),contentHeight:n.$attrs.verticalThumbnailViewPortHeight,showThumbnailNavigators:n.$attrs.showThumbnailNavigators,prevButtonProps:n.$attrs.prevButtonProps,nextButtonProps:n.$attrs.nextButtonProps,onStopSlideshow:o.stopSlideShow,pt:n.pt,unstyled:n.unstyled},null,8,["activeIndex","slideShowActive","containerId","value","templates","numVisible","responsiveOptions","circular","isVertical","contentHeight","showThumbnailNavigators","prevButtonProps","nextButtonProps","onStopSlideshow","pt","unstyled"])):a.createCommentVNode("",!0)],16,YH),n.$attrs.templates&&n.$attrs.templates.footer?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:2,class:n.cx("footer")},o.getPTOptions("footer")),[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.$attrs.templates.footer)))],16)):a.createCommentVNode("",!0)],16,KH)):a.createCommentVNode("",!0)}sE.render=QH;var cE={name:"Galleria",extends:wH,inheritAttrs:!1,emits:["update:activeIndex","update:visible"],container:null,mask:null,data:function(){return{containerVisible:this.visible}},updated:function(){this.fullScreen&&this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.fullScreen&&B.unblockBodyScroll(),this.mask=null,this.container&&(oo.clear(this.container),this.container=null)},methods:{onBeforeEnter:function(e){oo.set("modal",e,this.baseZIndex||this.$primevue.config.zIndex.modal)},onEnter:function(e){this.mask.style.zIndex=String(parseInt(e.style.zIndex,10)-1),B.blockBodyScroll(),this.focus()},onBeforeLeave:function(){!this.isUnstyled&&B.addClass(this.mask,"p-component-overlay-leave")},onAfterLeave:function(e){oo.clear(e),this.containerVisible=!1,B.unblockBodyScroll()},onActiveItemChange:function(e){this.activeIndex!==e&&this.$emit("update:activeIndex",e)},maskHide:function(){this.$emit("update:visible",!1)},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},focus:function(){var e=this.container.$el.querySelector("[autofocus]");e&&e.focus()}},components:{GalleriaContent:sE,Portal:tm},directives:{focustrap:QS}},XH=["aria-modal"];function JH(n,e,t,r,i,o){var s=a.resolveComponent("GalleriaContent"),l=a.resolveComponent("Portal"),c=a.resolveDirective("focustrap");return n.fullScreen?(a.openBlock(),a.createBlock(l,{key:0},{default:a.withCtx(function(){return[i.containerVisible?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:o.maskRef,class:[n.cx("mask"),n.maskClass],role:"dialog","aria-modal":n.fullScreen?"true":void 0},n.ptm("mask")),[a.createVNode(a.Transition,a.mergeProps({name:"p-galleria",onBeforeEnter:o.onBeforeEnter,onEnter:o.onEnter,onBeforeLeave:o.onBeforeLeave,onAfterLeave:o.onAfterLeave,appear:""},n.ptm("transition")),{default:a.withCtx(function(){return[n.visible?a.withDirectives((a.openBlock(),a.createBlock(s,a.mergeProps({key:0,ref:o.containerRef,onMaskHide:o.maskHide,templates:n.$slots,onActiveitemChange:o.onActiveItemChange,pt:n.pt,unstyled:n.unstyled},n.$props),null,16,["onMaskHide","templates","onActiveitemChange","pt","unstyled"])),[[c]]):a.createCommentVNode("",!0)]}),_:1},16,["onBeforeEnter","onEnter","onBeforeLeave","onAfterLeave"])],16,XH)):a.createCommentVNode("",!0)]}),_:1})):(a.openBlock(),a.createBlock(s,a.mergeProps({key:1,templates:n.$slots,onActiveitemChange:o.onActiveItemChange,pt:n.pt,unstyled:n.unstyled},n.$props),null,16,["templates","onActiveitemChange","pt","unstyled"]))}cE.render=JH;const eU=a.defineComponent({name:"QMenu",props:{modelValue:{type:Boolean,default:!1},actions:{type:Array},dismissibleOverlay:{type:Boolean,default:!0},links:{type:Array,required:!0},linksBackground:{type:String,default:"bg-white"},overlay:{type:String,default:"black-transparent"}},emits:["click:link","click:action"],setup(){return a.onUnmounted(()=>{document.body.classList.remove("scroll-disabled")}),a.onMounted(()=>{document.body.classList.add("scroll-disabled")}),{}}}),tU=["value"],nU={class:"q-menu-content px-4 pb-10"},rU=["onClick"],iU={class:"actions"},oU=["onClick"];function sU(n,e,t,r,i,o){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["q-menu",n.overlay]),value:n.modelValue},[e[0]||(e[0]=a.createElementVNode("div",{class:"overlay"},null,-1)),a.createElementVNode("div",nU,[a.renderSlot(n.$slots,"links",{},()=>[a.createElementVNode("ul",{class:a.normalizeClass(["links rounded-[0.8125rem] mb-2",n.linksBackground])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.links,(s,l)=>(a.openBlock(),a.createElementBlock("li",{key:l},[a.createElementVNode("a",{class:a.normalizeClass(["px-4 py-[1.125rem] flex items-center justify-center cursor-pointer text-inkwell-00 text-md",s.classes]),onClick:c=>n.$emit("click:link",s)},a.toDisplayString(s.text),11,rU)]))),128))],2)],!0),a.renderSlot(n.$slots,"actions",{},()=>[a.createElementVNode("ul",iU,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.actions,(s,l)=>(a.openBlock(),a.createElementBlock("li",{key:l},[a.createElementVNode("a",{class:"bg-white px-4 py-[1.125rem] rounded-[0.8125rem] flex items-center justify-center cursor-pointer text-blue-20 text-md font-semibold",onClick:c=>n.$emit("click:action",s)},a.toDisplayString(s.text),9,oU)]))),128))])],!0)])],10,tU)}const Cb=pe(eU,[["render",sU],["__scopeId","data-v-bd24b7a3"]]);var aU={9306:(n,e,t)=>{var r=t(4901),i=t(6823),o=TypeError;n.exports=function(s){if(r(s))return s;throw new o(i(s)+" is not a function")}},3506:(n,e,t)=>{var r=t(3925),i=String,o=TypeError;n.exports=function(s){if(r(s))return s;throw new o("Can't set "+i(s)+" as a prototype")}},7080:(n,e,t)=>{var r=t(4402).has;n.exports=function(i){return r(i),i}},679:(n,e,t)=>{var r=t(1625),i=TypeError;n.exports=function(o,s){if(r(s,o))return o;throw new i("Incorrect invocation")}},8551:(n,e,t)=>{var r=t(34),i=String,o=TypeError;n.exports=function(s){if(r(s))return s;throw new o(i(s)+" is not an object")}},7811:n=>{n.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"},7394:(n,e,t)=>{var r=t(4576),i=t(6706),o=t(2195),s=r.ArrayBuffer,l=r.TypeError;n.exports=s&&i(s.prototype,"byteLength","get")||function(c){if(o(c)!=="ArrayBuffer")throw new l("ArrayBuffer expected");return c.byteLength}},3238:(n,e,t)=>{var r=t(4576),i=t(7476),o=t(7394),s=r.ArrayBuffer,l=s&&s.prototype,c=l&&i(l.slice);n.exports=function(d){if(o(d)!==0||!c)return!1;try{return c(d,0,0),!1}catch{return!0}}},5169:(n,e,t)=>{var r=t(3238),i=TypeError;n.exports=function(o){if(r(o))throw new i("ArrayBuffer is detached");return o}},5636:(n,e,t)=>{var r=t(4576),i=t(9504),o=t(6706),s=t(7696),l=t(5169),c=t(7394),d=t(4483),u=t(1548),f=r.structuredClone,h=r.ArrayBuffer,p=r.DataView,m=Math.min,y=h.prototype,b=p.prototype,w=i(y.slice),v=o(y,"resizable","get"),k=o(y,"maxByteLength","get"),C=i(b.getInt8),T=i(b.setInt8);n.exports=(u||d)&&function(S,M,x){var O,P=c(S),N=M===void 0?P:s(M),_=!v||!v(S);if(l(S),u&&(S=f(S,{transfer:[S]}),P===N&&(x||_)))return S;if(P>=N&&(!x||_))O=w(S,0,N);else{var V=x&&!_&&k?{maxByteLength:k(S)}:void 0;O=new h(N,V);for(var H=new p(S),L=new p(O),D=m(N,P),U=0;U<D;U++)T(L,U,C(H,U))}return u||d(S),O}},4644:(n,e,t)=>{var r,i,o,s=t(7811),l=t(3724),c=t(4576),d=t(4901),u=t(34),f=t(9297),h=t(6955),p=t(6823),m=t(6699),y=t(6840),b=t(2106),w=t(1625),v=t(2787),k=t(2967),C=t(8227),T=t(3392),S=t(1181),M=S.enforce,x=S.get,O=c.Int8Array,P=O&&O.prototype,N=c.Uint8ClampedArray,_=N&&N.prototype,V=O&&v(O),H=P&&v(P),L=Object.prototype,D=c.TypeError,U=C("toStringTag"),F=T("TYPED_ARRAY_TAG"),R="TypedArrayConstructor",G=s&&!!k&&h(c.opera)!=="Opera",ne=!1,Y={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Z={BigInt64Array:8,BigUint64Array:8},j=function(W){var J=v(W);if(u(J)){var ae=x(J);return ae&&f(ae,R)?ae[R]:j(J)}},$=function(W){if(!u(W))return!1;var J=h(W);return f(Y,J)||f(Z,J)};for(r in Y)(o=(i=c[r])&&i.prototype)?M(o)[R]=i:G=!1;for(r in Z)(o=(i=c[r])&&i.prototype)&&(M(o)[R]=i);if((!G||!d(V)||V===Function.prototype)&&(V=function(){throw new D("Incorrect invocation")},G))for(r in Y)c[r]&&k(c[r],V);if((!G||!H||H===L)&&(H=V.prototype,G))for(r in Y)c[r]&&k(c[r].prototype,H);if(G&&v(_)!==H&&k(_,H),l&&!f(H,U)){ne=!0,b(H,U,{configurable:!0,get:function(){return u(this)?this[F]:void 0}});for(r in Y)c[r]&&m(c[r],F,r)}n.exports={NATIVE_ARRAY_BUFFER_VIEWS:G,TYPED_ARRAY_TAG:ne&&F,aTypedArray:function(W){if($(W))return W;throw new D("Target is not a typed array")},aTypedArrayConstructor:function(W){if(d(W)&&(!k||w(V,W)))return W;throw new D(p(W)+" is not a typed array constructor")},exportTypedArrayMethod:function(W,J,ae,oe){if(l){if(ae)for(var se in Y){var me=c[se];if(me&&f(me.prototype,W))try{delete me.prototype[W]}catch{try{me.prototype[W]=J}catch{}}}H[W]&&!ae||y(H,W,ae?J:G&&P[W]||J,oe)}},exportTypedArrayStaticMethod:function(W,J,ae){var oe,se;if(l){if(k){if(ae){for(oe in Y)if((se=c[oe])&&f(se,W))try{delete se[W]}catch{}}if(V[W]&&!ae)return;try{return y(V,W,ae?J:G&&V[W]||J)}catch{}}for(oe in Y)!(se=c[oe])||se[W]&&!ae||y(se,W,J)}},getTypedArrayConstructor:j,isView:function(J){if(!u(J))return!1;var ae=h(J);return ae==="DataView"||f(Y,ae)||f(Z,ae)},isTypedArray:$,TypedArray:V,TypedArrayPrototype:H}},5370:(n,e,t)=>{var r=t(6198);n.exports=function(i,o,s){for(var l=0,c=arguments.length>2?s:r(o),d=new i(c);c>l;)d[l]=o[l++];return d}},9617:(n,e,t)=>{var r=t(5397),i=t(5610),o=t(6198),s=function(l){return function(c,d,u){var f=r(c),h=o(f);if(h===0)return!l&&-1;var p,m=i(u,h);if(l&&d!=d){for(;h>m;)if((p=f[m++])!=p)return!0}else for(;h>m;m++)if((l||m in f)&&f[m]===d)return l||m||0;return!l&&-1}};n.exports={includes:s(!0),indexOf:s(!1)}},4527:(n,e,t)=>{var r=t(3724),i=t(4376),o=TypeError,s=Object.getOwnPropertyDescriptor,l=r&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(c){return c instanceof TypeError}}();n.exports=l?function(c,d){if(i(c)&&!s(c,"length").writable)throw new o("Cannot set read only .length");return c.length=d}:function(c,d){return c.length=d}},7628:(n,e,t)=>{var r=t(6198);n.exports=function(i,o){for(var s=r(i),l=new o(s),c=0;c<s;c++)l[c]=i[s-c-1];return l}},9928:(n,e,t)=>{var r=t(6198),i=t(1291),o=RangeError;n.exports=function(s,l,c,d){var u=r(s),f=i(c),h=f<0?u+f:f;if(h>=u||h<0)throw new o("Incorrect index");for(var p=new l(u),m=0;m<u;m++)p[m]=m===h?d:s[m];return p}},6319:(n,e,t)=>{var r=t(8551),i=t(9539);n.exports=function(o,s,l,c){try{return c?s(r(l)[0],l[1]):s(l)}catch(d){i(o,"throw",d)}}},2195:(n,e,t)=>{var r=t(9504),i=r({}.toString),o=r("".slice);n.exports=function(s){return o(i(s),8,-1)}},6955:(n,e,t)=>{var r=t(2140),i=t(4901),o=t(2195),s=t(8227)("toStringTag"),l=Object,c=o(function(){return arguments}())==="Arguments";n.exports=r?o:function(d){var u,f,h;return d===void 0?"Undefined":d===null?"Null":typeof(f=function(p,m){try{return p[m]}catch{}}(u=l(d),s))=="string"?f:c?o(u):(h=o(u))==="Object"&&i(u.callee)?"Arguments":h}},7740:(n,e,t)=>{var r=t(9297),i=t(5031),o=t(7347),s=t(4913);n.exports=function(l,c,d){for(var u=i(c),f=s.f,h=o.f,p=0;p<u.length;p++){var m=u[p];r(l,m)||d&&r(d,m)||f(l,m,h(c,m))}}},2211:(n,e,t)=>{var r=t(9039);n.exports=!r(function(){function i(){}return i.prototype.constructor=null,Object.getPrototypeOf(new i)!==i.prototype})},2529:n=>{n.exports=function(e,t){return{value:e,done:t}}},6699:(n,e,t)=>{var r=t(3724),i=t(4913),o=t(6980);n.exports=r?function(s,l,c){return i.f(s,l,o(1,c))}:function(s,l,c){return s[l]=c,s}},6980:n=>{n.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},4659:(n,e,t)=>{var r=t(3724),i=t(4913),o=t(6980);n.exports=function(s,l,c){r?i.f(s,l,o(0,c)):s[l]=c}},2106:(n,e,t)=>{var r=t(283),i=t(4913);n.exports=function(o,s,l){return l.get&&r(l.get,s,{getter:!0}),l.set&&r(l.set,s,{setter:!0}),i.f(o,s,l)}},6840:(n,e,t)=>{var r=t(4901),i=t(4913),o=t(283),s=t(9433);n.exports=function(l,c,d,u){u||(u={});var f=u.enumerable,h=u.name!==void 0?u.name:c;if(r(d)&&o(d,h,u),u.global)f?l[c]=d:s(c,d);else{try{u.unsafe?l[c]&&(f=!0):delete l[c]}catch{}f?l[c]=d:i.f(l,c,{value:d,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return l}},6279:(n,e,t)=>{var r=t(6840);n.exports=function(i,o,s){for(var l in o)r(i,l,o[l],s);return i}},9433:(n,e,t)=>{var r=t(4576),i=Object.defineProperty;n.exports=function(o,s){try{i(r,o,{value:s,configurable:!0,writable:!0})}catch{r[o]=s}return s}},3724:(n,e,t)=>{var r=t(9039);n.exports=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},4483:(n,e,t)=>{var r,i,o,s,l=t(4576),c=t(9429),d=t(1548),u=l.structuredClone,f=l.ArrayBuffer,h=l.MessageChannel,p=!1;if(d)p=function(m){u(m,{transfer:[m]})};else if(f)try{h||(r=c("worker_threads"))&&(h=r.MessageChannel),h&&(i=new h,o=new f(2),s=function(m){i.port1.postMessage(null,[m])},o.byteLength===2&&(s(o),o.byteLength===0&&(p=s)))}catch{}n.exports=p},4055:(n,e,t)=>{var r=t(4576),i=t(34),o=r.document,s=i(o)&&i(o.createElement);n.exports=function(l){return s?o.createElement(l):{}}},6837:n=>{var e=TypeError;n.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},5002:n=>{n.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},8727:n=>{n.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6193:(n,e,t)=>{var r=t(4215);n.exports=r==="NODE"},2839:(n,e,t)=>{var r=t(4576).navigator,i=r&&r.userAgent;n.exports=i?String(i):""},9519:(n,e,t)=>{var r,i,o=t(4576),s=t(2839),l=o.process,c=o.Deno,d=l&&l.versions||c&&c.version,u=d&&d.v8;u&&(i=(r=u.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(i=+r[1]),n.exports=i},4215:(n,e,t)=>{var r=t(4576),i=t(2839),o=t(2195),s=function(l){return i.slice(0,l.length)===l};n.exports=s("Bun/")?"BUN":s("Cloudflare-Workers")?"CLOUDFLARE":s("Deno/")?"DENO":s("Node.js/")?"NODE":r.Bun&&typeof Bun.version=="string"?"BUN":r.Deno&&typeof Deno.version=="object"?"DENO":o(r.process)==="process"?"NODE":r.window&&r.document?"BROWSER":"REST"},8574:(n,e,t)=>{var r=t(9504),i=Error,o=r("".replace),s=String(new i("zxcasd").stack),l=/\n\s*at [^:]*:[^\n]*/,c=l.test(s);n.exports=function(d,u){if(c&&typeof d=="string"&&!i.prepareStackTrace)for(;u--;)d=o(d,l,"");return d}},6518:(n,e,t)=>{var r=t(4576),i=t(7347).f,o=t(6699),s=t(6840),l=t(9433),c=t(7740),d=t(2796);n.exports=function(u,f){var h,p,m,y,b,w=u.target,v=u.global,k=u.stat;if(h=v?r:k?r[w]||l(w,{}):r[w]&&r[w].prototype)for(p in f){if(y=f[p],m=u.dontCallGetSet?(b=i(h,p))&&b.value:h[p],!d(v?p:w+(k?".":"#")+p,u.forced)&&m!==void 0){if(typeof y==typeof m)continue;c(y,m)}(u.sham||m&&m.sham)&&o(y,"sham",!0),s(h,p,y,u)}}},9039:n=>{n.exports=function(e){try{return!!e()}catch{return!0}}},6080:(n,e,t)=>{var r=t(7476),i=t(9306),o=t(616),s=r(r.bind);n.exports=function(l,c){return i(l),c===void 0?l:o?s(l,c):function(){return l.apply(c,arguments)}}},616:(n,e,t)=>{var r=t(9039);n.exports=!r(function(){var i=(function(){}).bind();return typeof i!="function"||i.hasOwnProperty("prototype")})},9565:(n,e,t)=>{var r=t(616),i=Function.prototype.call;n.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},350:(n,e,t)=>{var r=t(3724),i=t(9297),o=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,l=i(o,"name"),c=l&&(function(){}).name==="something",d=l&&(!r||r&&s(o,"name").configurable);n.exports={EXISTS:l,PROPER:c,CONFIGURABLE:d}},6706:(n,e,t)=>{var r=t(9504),i=t(9306);n.exports=function(o,s,l){try{return r(i(Object.getOwnPropertyDescriptor(o,s)[l]))}catch{}}},7476:(n,e,t)=>{var r=t(2195),i=t(9504);n.exports=function(o){if(r(o)==="Function")return i(o)}},9504:(n,e,t)=>{var r=t(616),i=Function.prototype,o=i.call,s=r&&i.bind.bind(o,o);n.exports=r?s:function(l){return function(){return o.apply(l,arguments)}}},9429:(n,e,t)=>{var r=t(4576),i=t(6193);n.exports=function(o){if(i){try{return r.process.getBuiltinModule(o)}catch{}try{return Function('return require("'+o+'")')()}catch{}}}},7751:(n,e,t)=>{var r=t(4576),i=t(4901);n.exports=function(o,s){return arguments.length<2?(l=r[o],i(l)?l:void 0):r[o]&&r[o][s];var l}},1767:n=>{n.exports=function(e){return{iterator:e,next:e.next,done:!1}}},8646:(n,e,t)=>{var r=t(9565),i=t(8551),o=t(1767),s=t(851);n.exports=function(l,c){c&&typeof l=="string"||i(l);var d=s(l);return o(i(d!==void 0?r(d,l):l))}},851:(n,e,t)=>{var r=t(6955),i=t(5966),o=t(4117),s=t(6269),l=t(8227)("iterator");n.exports=function(c){if(!o(c))return i(c,l)||i(c,"@@iterator")||s[r(c)]}},81:(n,e,t)=>{var r=t(9565),i=t(9306),o=t(8551),s=t(6823),l=t(851),c=TypeError;n.exports=function(d,u){var f=arguments.length<2?l(d):u;if(i(f))return o(r(f,d));throw new c(s(d)+" is not iterable")}},5966:(n,e,t)=>{var r=t(9306),i=t(4117);n.exports=function(o,s){var l=o[s];return i(l)?void 0:r(l)}},3789:(n,e,t)=>{var r=t(9306),i=t(8551),o=t(9565),s=t(1291),l=t(1767),c="Invalid size",d=RangeError,u=TypeError,f=Math.max,h=function(p,m){this.set=p,this.size=f(m,0),this.has=r(p.has),this.keys=r(p.keys)};h.prototype={getIterator:function(){return l(i(o(this.keys,this.set)))},includes:function(p){return o(this.has,this.set,p)}},n.exports=function(p){i(p);var m=+p.size;if(m!=m)throw new u(c);var y=s(m);if(y<0)throw new d(c);return new h(p,y)}},4576:function(n){var e=function(t){return t&&t.Math===Math&&t};n.exports=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof global=="object"&&global)||e(typeof this=="object"&&this)||function(){return this}()||Function("return this")()},9297:(n,e,t)=>{var r=t(9504),i=t(8981),o=r({}.hasOwnProperty);n.exports=Object.hasOwn||function(l,c){return o(i(l),c)}},421:n=>{n.exports={}},397:(n,e,t)=>{var r=t(7751);n.exports=r("document","documentElement")},5917:(n,e,t)=>{var r=t(3724),i=t(9039),o=t(4055);n.exports=!r&&!i(function(){return Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a!==7})},7055:(n,e,t)=>{var r=t(9504),i=t(9039),o=t(2195),s=Object,l=r("".split);n.exports=i(function(){return!s("z").propertyIsEnumerable(0)})?function(c){return o(c)==="String"?l(c,""):s(c)}:s},3167:(n,e,t)=>{var r=t(4901),i=t(34),o=t(2967);n.exports=function(s,l,c){var d,u;return o&&r(d=l.constructor)&&d!==c&&i(u=d.prototype)&&u!==c.prototype&&o(s,u),s}},3706:(n,e,t)=>{var r=t(9504),i=t(4901),o=t(7629),s=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(l){return s(l)}),n.exports=o.inspectSource},1181:(n,e,t)=>{var r,i,o,s=t(8622),l=t(4576),c=t(34),d=t(6699),u=t(9297),f=t(7629),h=t(6119),p=t(421),m="Object already initialized",y=l.TypeError,b=l.WeakMap;if(s||f.state){var w=f.state||(f.state=new b);w.get=w.get,w.has=w.has,w.set=w.set,r=function(k,C){if(w.has(k))throw new y(m);return C.facade=k,w.set(k,C),C},i=function(k){return w.get(k)||{}},o=function(k){return w.has(k)}}else{var v=h("state");p[v]=!0,r=function(k,C){if(u(k,v))throw new y(m);return C.facade=k,d(k,v,C),C},i=function(k){return u(k,v)?k[v]:{}},o=function(k){return u(k,v)}}n.exports={set:r,get:i,has:o,enforce:function(k){return o(k)?i(k):r(k,{})},getterFor:function(k){return function(C){var T;if(!c(C)||(T=i(C)).type!==k)throw new y("Incompatible receiver, "+k+" required");return T}}}},4209:(n,e,t)=>{var r=t(8227),i=t(6269),o=r("iterator"),s=Array.prototype;n.exports=function(l){return l!==void 0&&(i.Array===l||s[o]===l)}},4376:(n,e,t)=>{var r=t(2195);n.exports=Array.isArray||function(o){return r(o)==="Array"}},1108:(n,e,t)=>{var r=t(6955);n.exports=function(i){var o=r(i);return o==="BigInt64Array"||o==="BigUint64Array"}},4901:n=>{var e=typeof document=="object"&&document.all;n.exports=e===void 0&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"}},2796:(n,e,t)=>{var r=t(9039),i=t(4901),o=/#|\.prototype\./,s=function(f,h){var p=c[l(f)];return p===u||p!==d&&(i(h)?r(h):!!h)},l=s.normalize=function(f){return String(f).replace(o,".").toLowerCase()},c=s.data={},d=s.NATIVE="N",u=s.POLYFILL="P";n.exports=s},4117:n=>{n.exports=function(e){return e==null}},34:(n,e,t)=>{var r=t(4901);n.exports=function(i){return typeof i=="object"?i!==null:r(i)}},3925:(n,e,t)=>{var r=t(34);n.exports=function(i){return r(i)||i===null}},6395:n=>{n.exports=!1},757:(n,e,t)=>{var r=t(7751),i=t(4901),o=t(1625),s=t(7040),l=Object;n.exports=s?function(c){return typeof c=="symbol"}:function(c){var d=r("Symbol");return i(d)&&o(d.prototype,l(c))}},507:(n,e,t)=>{var r=t(9565);n.exports=function(i,o,s){for(var l,c,d=s?i:i.iterator,u=i.next;!(l=r(u,d)).done;)if((c=o(l.value))!==void 0)return c}},2652:(n,e,t)=>{var r=t(6080),i=t(9565),o=t(8551),s=t(6823),l=t(4209),c=t(6198),d=t(1625),u=t(81),f=t(851),h=t(9539),p=TypeError,m=function(b,w){this.stopped=b,this.result=w},y=m.prototype;n.exports=function(b,w,v){var k,C,T,S,M,x,O,P=v&&v.that,N=!(!v||!v.AS_ENTRIES),_=!(!v||!v.IS_RECORD),V=!(!v||!v.IS_ITERATOR),H=!(!v||!v.INTERRUPTED),L=r(w,P),D=function(F){return k&&h(k,"normal",F),new m(!0,F)},U=function(F){return N?(o(F),H?L(F[0],F[1],D):L(F[0],F[1])):H?L(F,D):L(F)};if(_)k=b.iterator;else if(V)k=b;else{if(!(C=f(b)))throw new p(s(b)+" is not iterable");if(l(C)){for(T=0,S=c(b);S>T;T++)if((M=U(b[T]))&&d(y,M))return M;return new m(!1)}k=u(b,C)}for(x=_?b.next:k.next;!(O=i(x,k)).done;){try{M=U(O.value)}catch(F){h(k,"throw",F)}if(typeof M=="object"&&M&&d(y,M))return M}return new m(!1)}},9539:(n,e,t)=>{var r=t(9565),i=t(8551),o=t(5966);n.exports=function(s,l,c){var d,u;i(s);try{if(!(d=o(s,"return"))){if(l==="throw")throw c;return c}d=r(d,s)}catch(f){u=!0,d=f}if(l==="throw")throw c;if(u)throw d;return i(d),c}},9462:(n,e,t)=>{var r=t(9565),i=t(2360),o=t(6699),s=t(6279),l=t(8227),c=t(1181),d=t(5966),u=t(7657).IteratorPrototype,f=t(2529),h=t(9539),p=l("toStringTag"),m="IteratorHelper",y="WrapForValidIterator",b=c.set,w=function(C){var T=c.getterFor(C?y:m);return s(i(u),{next:function(){var M=T(this);if(C)return M.nextHandler();try{var x=M.done?void 0:M.nextHandler();return f(x,M.done)}catch(O){throw M.done=!0,O}},return:function(){var S=T(this),M=S.iterator;if(S.done=!0,C){var x=d(M,"return");return x?r(x,M):f(void 0,!0)}if(S.inner)try{h(S.inner.iterator,"normal")}catch(O){return h(M,"throw",O)}return h(M,"normal"),f(void 0,!0)}})},v=w(!0),k=w(!1);o(k,p,"Iterator Helper"),n.exports=function(C,T){var S=function(x,O){O?(O.iterator=x.iterator,O.next=x.next):O=x,O.type=T?y:m,O.nextHandler=C,O.counter=0,O.done=!1,b(this,O)};return S.prototype=T?v:k,S}},713:(n,e,t)=>{var r=t(9565),i=t(9306),o=t(8551),s=t(1767),l=t(9462),c=t(6319),d=l(function(){var u=this.iterator,f=o(r(this.next,u));if(!(this.done=!!f.done))return c(u,this.mapper,[f.value,this.counter++],!0)});n.exports=function(f){return o(this),i(f),new d(s(this),{mapper:f})}},7657:(n,e,t)=>{var r,i,o,s=t(9039),l=t(4901),c=t(34),d=t(2360),u=t(2787),f=t(6840),h=t(8227),p=t(6395),m=h("iterator"),y=!1;[].keys&&("next"in(o=[].keys())?(i=u(u(o)))!==Object.prototype&&(r=i):y=!0),!c(r)||s(function(){var b={};return r[m].call(b)!==b})?r={}:p&&(r=d(r)),l(r[m])||f(r,m,function(){return this}),n.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:y}},6269:n=>{n.exports={}},6198:(n,e,t)=>{var r=t(8014);n.exports=function(i){return r(i.length)}},283:(n,e,t)=>{var r=t(9504),i=t(9039),o=t(4901),s=t(9297),l=t(3724),c=t(350).CONFIGURABLE,d=t(3706),u=t(1181),f=u.enforce,h=u.get,p=String,m=Object.defineProperty,y=r("".slice),b=r("".replace),w=r([].join),v=l&&!i(function(){return m(function(){},"length",{value:8}).length!==8}),k=String(String).split("String"),C=n.exports=function(T,S,M){y(p(S),0,7)==="Symbol("&&(S="["+b(p(S),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),M&&M.getter&&(S="get "+S),M&&M.setter&&(S="set "+S),(!s(T,"name")||c&&T.name!==S)&&(l?m(T,"name",{value:S,configurable:!0}):T.name=S),v&&M&&s(M,"arity")&&T.length!==M.arity&&m(T,"length",{value:M.arity});try{M&&s(M,"constructor")&&M.constructor?l&&m(T,"prototype",{writable:!1}):T.prototype&&(T.prototype=void 0)}catch{}var x=f(T);return s(x,"source")||(x.source=w(k,typeof S=="string"?S:"")),T};Function.prototype.toString=C(function(){return o(this)&&h(this).source||d(this)},"toString")},741:n=>{var e=Math.ceil,t=Math.floor;n.exports=Math.trunc||function(i){var o=+i;return(o>0?t:e)(o)}},6043:(n,e,t)=>{var r=t(9306),i=TypeError,o=function(s){var l,c;this.promise=new s(function(d,u){if(l!==void 0||c!==void 0)throw new i("Bad Promise constructor");l=d,c=u}),this.resolve=r(l),this.reject=r(c)};n.exports.f=function(s){return new o(s)}},2603:(n,e,t)=>{var r=t(655);n.exports=function(i,o){return i===void 0?arguments.length<2?"":o:r(i)}},4149:n=>{var e=RangeError;n.exports=function(t){if(t==t)return t;throw new e("NaN is not allowed")}},2360:(n,e,t)=>{var r,i=t(8551),o=t(6801),s=t(8727),l=t(421),c=t(397),d=t(4055),u=t(6119),f="prototype",h="script",p=u("IE_PROTO"),m=function(){},y=function(v){return"<"+h+">"+v+"</"+h+">"},b=function(v){v.write(y("")),v.close();var k=v.parentWindow.Object;return v=null,k},w=function(){try{r=new ActiveXObject("htmlfile")}catch{}w=typeof document<"u"?document.domain&&r?b(r):function(){var k,C=d("iframe"),T="java"+h+":";return C.style.display="none",c.appendChild(C),C.src=String(T),(k=C.contentWindow.document).open(),k.write(y("document.F=Object")),k.close(),k.F}():b(r);for(var v=s.length;v--;)delete w[f][s[v]];return w()};l[p]=!0,n.exports=Object.create||function(k,C){var T;return k!==null?(m[f]=i(k),T=new m,m[f]=null,T[p]=k):T=w(),C===void 0?T:o.f(T,C)}},6801:(n,e,t)=>{var r=t(3724),i=t(8686),o=t(4913),s=t(8551),l=t(5397),c=t(1072);e.f=r&&!i?Object.defineProperties:function(u,f){s(u);for(var h,p=l(f),m=c(f),y=m.length,b=0;y>b;)o.f(u,h=m[b++],p[h]);return u}},4913:(n,e,t)=>{var r=t(3724),i=t(5917),o=t(8686),s=t(8551),l=t(6969),c=TypeError,d=Object.defineProperty,u=Object.getOwnPropertyDescriptor,f="enumerable",h="configurable",p="writable";e.f=r?o?function(y,b,w){if(s(y),b=l(b),s(w),typeof y=="function"&&b==="prototype"&&"value"in w&&p in w&&!w[p]){var v=u(y,b);v&&v[p]&&(y[b]=w.value,w={configurable:h in w?w[h]:v[h],enumerable:f in w?w[f]:v[f],writable:!1})}return d(y,b,w)}:d:function(y,b,w){if(s(y),b=l(b),s(w),i)try{return d(y,b,w)}catch{}if("get"in w||"set"in w)throw new c("Accessors not supported");return"value"in w&&(y[b]=w.value),y}},7347:(n,e,t)=>{var r=t(3724),i=t(9565),o=t(8773),s=t(6980),l=t(5397),c=t(6969),d=t(9297),u=t(5917),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(p,m){if(p=l(p),m=c(m),u)try{return f(p,m)}catch{}if(d(p,m))return s(!i(o.f,p,m),p[m])}},8480:(n,e,t)=>{var r=t(1828),i=t(8727).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(s){return r(s,i)}},3717:(n,e)=>{e.f=Object.getOwnPropertySymbols},2787:(n,e,t)=>{var r=t(9297),i=t(4901),o=t(8981),s=t(6119),l=t(2211),c=s("IE_PROTO"),d=Object,u=d.prototype;n.exports=l?d.getPrototypeOf:function(f){var h=o(f);if(r(h,c))return h[c];var p=h.constructor;return i(p)&&h instanceof p?p.prototype:h instanceof d?u:null}},1625:(n,e,t)=>{var r=t(9504);n.exports=r({}.isPrototypeOf)},1828:(n,e,t)=>{var r=t(9504),i=t(9297),o=t(5397),s=t(9617).indexOf,l=t(421),c=r([].push);n.exports=function(d,u){var f,h=o(d),p=0,m=[];for(f in h)!i(l,f)&&i(h,f)&&c(m,f);for(;u.length>p;)i(h,f=u[p++])&&(~s(m,f)||c(m,f));return m}},1072:(n,e,t)=>{var r=t(1828),i=t(8727);n.exports=Object.keys||function(s){return r(s,i)}},8773:(n,e)=>{var t={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!t.call({1:2},1);e.f=i?function(s){var l=r(this,s);return!!l&&l.enumerable}:t},2967:(n,e,t)=>{var r=t(6706),i=t(34),o=t(7750),s=t(3506);n.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var l,c=!1,d={};try{(l=r(Object.prototype,"__proto__","set"))(d,[]),c=d instanceof Array}catch{}return function(f,h){return o(f),s(h),i(f)&&(c?l(f,h):f.__proto__=h),f}}():void 0)},4270:(n,e,t)=>{var r=t(9565),i=t(4901),o=t(34),s=TypeError;n.exports=function(l,c){var d,u;if(c==="string"&&i(d=l.toString)&&!o(u=r(d,l))||i(d=l.valueOf)&&!o(u=r(d,l))||c!=="string"&&i(d=l.toString)&&!o(u=r(d,l)))return u;throw new s("Can't convert object to primitive value")}},5031:(n,e,t)=>{var r=t(7751),i=t(9504),o=t(8480),s=t(3717),l=t(8551),c=i([].concat);n.exports=r("Reflect","ownKeys")||function(u){var f=o.f(l(u)),h=s.f;return h?c(f,h(u)):f}},8235:(n,e,t)=>{var r=t(9504),i=t(9297),o=SyntaxError,s=parseInt,l=String.fromCharCode,c=r("".charAt),d=r("".slice),u=r(/./.exec),f={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":`
|
|
120
120
|
`,"\\r":"\r","\\t":" "},h=/^[\da-f]{4}$/i,p=/^[\u0000-\u001F]$/;n.exports=function(m,y){for(var b=!0,w="";y<m.length;){var v=c(m,y);if(v==="\\"){var k=d(m,y,y+2);if(i(f,k))w+=f[k],y+=2;else{if(k!=="\\u")throw new o('Unknown escape sequence: "'+k+'"');var C=d(m,y+=2,y+4);if(!u(h,C))throw new o("Bad Unicode escape at: "+y);w+=l(s(C,16)),y+=4}}else{if(v==='"'){b=!1,y++;break}if(u(p,v))throw new o("Bad control character in string literal at: "+y);w+=v,y++}}if(b)throw new o("Unterminated string at: "+y);return{value:w,end:y}}},7750:(n,e,t)=>{var r=t(4117),i=TypeError;n.exports=function(o){if(r(o))throw new i("Can't call method on "+o);return o}},9286:(n,e,t)=>{var r=t(4402),i=t(8469),o=r.Set,s=r.add;n.exports=function(l){var c=new o;return i(l,function(d){s(c,d)}),c}},3440:(n,e,t)=>{var r=t(7080),i=t(4402),o=t(9286),s=t(5170),l=t(3789),c=t(8469),d=t(507),u=i.has,f=i.remove;n.exports=function(p){var m=r(this),y=l(p),b=o(m);return s(m)<=y.size?c(m,function(w){y.includes(w)&&f(b,w)}):d(y.getIterator(),function(w){u(m,w)&&f(b,w)}),b}},4402:(n,e,t)=>{var r=t(9504),i=Set.prototype;n.exports={Set,add:r(i.add),has:r(i.has),remove:r(i.delete),proto:i}},8750:(n,e,t)=>{var r=t(7080),i=t(4402),o=t(5170),s=t(3789),l=t(8469),c=t(507),d=i.Set,u=i.add,f=i.has;n.exports=function(p){var m=r(this),y=s(p),b=new d;return o(m)>y.size?c(y.getIterator(),function(w){f(m,w)&&u(b,w)}):l(m,function(w){y.includes(w)&&u(b,w)}),b}},4449:(n,e,t)=>{var r=t(7080),i=t(4402).has,o=t(5170),s=t(3789),l=t(8469),c=t(507),d=t(9539);n.exports=function(f){var h=r(this),p=s(f);if(o(h)<=p.size)return l(h,function(y){if(p.includes(y))return!1},!0)!==!1;var m=p.getIterator();return c(m,function(y){if(i(h,y))return d(m,"normal",!1)})!==!1}},3838:(n,e,t)=>{var r=t(7080),i=t(5170),o=t(8469),s=t(3789);n.exports=function(c){var d=r(this),u=s(c);return!(i(d)>u.size)&&o(d,function(f){if(!u.includes(f))return!1},!0)!==!1}},8527:(n,e,t)=>{var r=t(7080),i=t(4402).has,o=t(5170),s=t(3789),l=t(507),c=t(9539);n.exports=function(u){var f=r(this),h=s(u);if(o(f)<h.size)return!1;var p=h.getIterator();return l(p,function(m){if(!i(f,m))return c(p,"normal",!1)})!==!1}},8469:(n,e,t)=>{var r=t(9504),i=t(507),o=t(4402),s=o.Set,l=o.proto,c=r(l.forEach),d=r(l.keys),u=d(new s).next;n.exports=function(f,h,p){return p?i({iterator:d(f),next:u},h):c(f,h)}},4916:(n,e,t)=>{var r=t(7751),i=function(o){return{size:o,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};n.exports=function(o){var s=r("Set");try{new s()[o](i(0));try{return new s()[o](i(-1)),!1}catch{return!0}}catch{return!1}}},5170:(n,e,t)=>{var r=t(6706),i=t(4402);n.exports=r(i.proto,"size","get")||function(o){return o.size}},3650:(n,e,t)=>{var r=t(7080),i=t(4402),o=t(9286),s=t(3789),l=t(507),c=i.add,d=i.has,u=i.remove;n.exports=function(h){var p=r(this),m=s(h).getIterator(),y=o(p);return l(m,function(b){d(p,b)?u(y,b):c(y,b)}),y}},4204:(n,e,t)=>{var r=t(7080),i=t(4402).add,o=t(9286),s=t(3789),l=t(507);n.exports=function(d){var u=r(this),f=s(d).getIterator(),h=o(u);return l(f,function(p){i(h,p)}),h}},6119:(n,e,t)=>{var r=t(5745),i=t(3392),o=r("keys");n.exports=function(s){return o[s]||(o[s]=i(s))}},7629:(n,e,t)=>{var r=t(6395),i=t(4576),o=t(9433),s="__core-js_shared__",l=n.exports=i[s]||o(s,{});(l.versions||(l.versions=[])).push({version:"3.38.1",mode:r?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:(n,e,t)=>{var r=t(7629);n.exports=function(i,o){return r[i]||(r[i]=o||{})}},1548:(n,e,t)=>{var r=t(4576),i=t(9039),o=t(9519),s=t(4215),l=r.structuredClone;n.exports=!!l&&!i(function(){if(s==="DENO"&&o>92||s==="NODE"&&o>94||s==="BROWSER"&&o>97)return!1;var c=new ArrayBuffer(8),d=l(c,{transfer:[c]});return c.byteLength!==0||d.byteLength!==8})},4495:(n,e,t)=>{var r=t(9519),i=t(9039),o=t(4576).String;n.exports=!!Object.getOwnPropertySymbols&&!i(function(){var s=Symbol("symbol detection");return!o(s)||!(Object(s)instanceof Symbol)||!Symbol.sham&&r&&r<41})},5610:(n,e,t)=>{var r=t(1291),i=Math.max,o=Math.min;n.exports=function(s,l){var c=r(s);return c<0?i(c+l,0):o(c,l)}},5854:(n,e,t)=>{var r=t(2777),i=TypeError;n.exports=function(o){var s=r(o,"number");if(typeof s=="number")throw new i("Can't convert number to bigint");return BigInt(s)}},7696:(n,e,t)=>{var r=t(1291),i=t(8014),o=RangeError;n.exports=function(s){if(s===void 0)return 0;var l=r(s),c=i(l);if(l!==c)throw new o("Wrong length or index");return c}},5397:(n,e,t)=>{var r=t(7055),i=t(7750);n.exports=function(o){return r(i(o))}},1291:(n,e,t)=>{var r=t(741);n.exports=function(i){var o=+i;return o!=o||o===0?0:r(o)}},8014:(n,e,t)=>{var r=t(1291),i=Math.min;n.exports=function(o){var s=r(o);return s>0?i(s,9007199254740991):0}},8981:(n,e,t)=>{var r=t(7750),i=Object;n.exports=function(o){return i(r(o))}},9590:(n,e,t)=>{var r=t(1291),i=RangeError;n.exports=function(o){var s=r(o);if(s<0)throw new i("The argument can't be less than 0");return s}},2777:(n,e,t)=>{var r=t(9565),i=t(34),o=t(757),s=t(5966),l=t(4270),c=t(8227),d=TypeError,u=c("toPrimitive");n.exports=function(f,h){if(!i(f)||o(f))return f;var p,m=s(f,u);if(m){if(h===void 0&&(h="default"),p=r(m,f,h),!i(p)||o(p))return p;throw new d("Can't convert object to primitive value")}return h===void 0&&(h="number"),l(f,h)}},6969:(n,e,t)=>{var r=t(2777),i=t(757);n.exports=function(o){var s=r(o,"string");return i(s)?s:s+""}},2140:(n,e,t)=>{var r={};r[t(8227)("toStringTag")]="z",n.exports=String(r)==="[object z]"},655:(n,e,t)=>{var r=t(6955),i=String;n.exports=function(o){if(r(o)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return i(o)}},6823:n=>{var e=String;n.exports=function(t){try{return e(t)}catch{return"Object"}}},3392:(n,e,t)=>{var r=t(9504),i=0,o=Math.random(),s=r(1 .toString);n.exports=function(l){return"Symbol("+(l===void 0?"":l)+")_"+s(++i+o,36)}},7040:(n,e,t)=>{var r=t(4495);n.exports=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},8686:(n,e,t)=>{var r=t(3724),i=t(9039);n.exports=r&&i(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},2812:n=>{var e=TypeError;n.exports=function(t,r){if(t<r)throw new e("Not enough arguments");return t}},8622:(n,e,t)=>{var r=t(4576),i=t(4901),o=r.WeakMap;n.exports=i(o)&&/native code/.test(String(o))},8227:(n,e,t)=>{var r=t(4576),i=t(5745),o=t(9297),s=t(3392),l=t(4495),c=t(7040),d=r.Symbol,u=i("wks"),f=c?d.for||d:d&&d.withoutSetter||s;n.exports=function(h){return o(u,h)||(u[h]=l&&o(d,h)?d[h]:f("Symbol."+h)),u[h]}},6573:(n,e,t)=>{var r=t(3724),i=t(2106),o=t(3238),s=ArrayBuffer.prototype;r&&!("detached"in s)&&i(s,"detached",{configurable:!0,get:function(){return o(this)}})},7936:(n,e,t)=>{var r=t(6518),i=t(5636);i&&r({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return i(this,arguments.length?arguments[0]:void 0,!1)}})},8100:(n,e,t)=>{var r=t(6518),i=t(5636);i&&r({target:"ArrayBuffer",proto:!0},{transfer:function(){return i(this,arguments.length?arguments[0]:void 0,!0)}})},4114:(n,e,t)=>{var r=t(6518),i=t(8981),o=t(6198),s=t(4527),l=t(6837);r({target:"Array",proto:!0,arity:1,forced:t(9039)(function(){return[].push.call({length:4294967296},1)!==4294967297})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(c){return c instanceof TypeError}}()},{push:function(d){var u=i(this),f=o(u),h=arguments.length;l(f+h);for(var p=0;p<h;p++)u[f]=arguments[p],f++;return s(u,f),f}})},4628:(n,e,t)=>{var r=t(6518),i=t(6043);r({target:"Promise",stat:!0},{withResolvers:function(){var s=i.f(this);return{promise:s.promise,resolve:s.resolve,reject:s.reject}}})},7642:(n,e,t)=>{var r=t(6518),i=t(3440);r({target:"Set",proto:!0,real:!0,forced:!t(4916)("difference")},{difference:i})},8004:(n,e,t)=>{var r=t(6518),i=t(9039),o=t(8750);r({target:"Set",proto:!0,real:!0,forced:!t(4916)("intersection")||i(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"})},{intersection:o})},3853:(n,e,t)=>{var r=t(6518),i=t(4449);r({target:"Set",proto:!0,real:!0,forced:!t(4916)("isDisjointFrom")},{isDisjointFrom:i})},5876:(n,e,t)=>{var r=t(6518),i=t(3838);r({target:"Set",proto:!0,real:!0,forced:!t(4916)("isSubsetOf")},{isSubsetOf:i})},2475:(n,e,t)=>{var r=t(6518),i=t(8527);r({target:"Set",proto:!0,real:!0,forced:!t(4916)("isSupersetOf")},{isSupersetOf:i})},5024:(n,e,t)=>{var r=t(6518),i=t(3650);r({target:"Set",proto:!0,real:!0,forced:!t(4916)("symmetricDifference")},{symmetricDifference:i})},1698:(n,e,t)=>{var r=t(6518),i=t(4204);r({target:"Set",proto:!0,real:!0,forced:!t(4916)("union")},{union:i})},7467:(n,e,t)=>{var r=t(7628),i=t(4644),o=i.aTypedArray,s=i.exportTypedArrayMethod,l=i.getTypedArrayConstructor;s("toReversed",function(){return r(o(this),l(this))})},4732:(n,e,t)=>{var r=t(4644),i=t(9504),o=t(9306),s=t(5370),l=r.aTypedArray,c=r.getTypedArrayConstructor,d=r.exportTypedArrayMethod,u=i(r.TypedArrayPrototype.sort);d("toSorted",function(h){h!==void 0&&o(h);var p=l(this),m=s(c(p),p);return u(m,h)})},9577:(n,e,t)=>{var r=t(9928),i=t(4644),o=t(1108),s=t(1291),l=t(5854),c=i.aTypedArray,d=i.getTypedArrayConstructor,u=i.exportTypedArrayMethod,f=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(h){return h===8}}();u("with",function(h,p){var m=c(this),y=s(h),b=o(m)?l(p):+p;return r(m,d(m),y,b)},!f)},8992:(n,e,t)=>{var r=t(6518),i=t(4576),o=t(679),s=t(8551),l=t(4901),c=t(2787),d=t(2106),u=t(4659),f=t(9039),h=t(9297),p=t(8227),m=t(7657).IteratorPrototype,y=t(3724),b=t(6395),w="constructor",v="Iterator",k=p("toStringTag"),C=TypeError,T=i[v],S=b||!l(T)||T.prototype!==m||!f(function(){T({})}),M=function(){if(o(this,m),c(this)===m)throw new C("Abstract class Iterator not directly constructable")},x=function(O,P){y?d(m,O,{configurable:!0,get:function(){return P},set:function(N){if(s(this),this===m)throw new C("You can't redefine this property");h(this,O)?this[O]=N:u(this,O,N)}}):m[O]=P};h(m,k)||x(k,v),!S&&h(m,w)&&m[w]!==Object||x(w,M),M.prototype=m,r({global:!0,constructor:!0,forced:S},{Iterator:M})},4743:(n,e,t)=>{var r=t(6518),i=t(9565),o=t(8551),s=t(1767),l=t(4149),c=t(9590),d=t(9462),u=t(6395),f=d(function(){for(var h,p=this.iterator,m=this.next;this.remaining;)if(this.remaining--,h=o(i(m,p)),this.done=!!h.done)return;if(h=o(i(m,p)),!(this.done=!!h.done))return h.value});r({target:"Iterator",proto:!0,real:!0,forced:u},{drop:function(p){o(this);var m=c(l(+p));return new f(s(this),{remaining:m})}})},3215:(n,e,t)=>{var r=t(6518),i=t(2652),o=t(9306),s=t(8551),l=t(1767);r({target:"Iterator",proto:!0,real:!0},{every:function(d){s(this),o(d);var u=l(this),f=0;return!i(u,function(h,p){if(!d(h,f++))return p()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},4520:(n,e,t)=>{var r=t(6518),i=t(9565),o=t(9306),s=t(8551),l=t(1767),c=t(9462),d=t(6319),u=t(6395),f=c(function(){for(var h,p,m=this.iterator,y=this.predicate,b=this.next;;){if(h=s(i(b,m)),this.done=!!h.done)return;if(p=h.value,d(m,y,[p,this.counter++],!0))return p}});r({target:"Iterator",proto:!0,real:!0,forced:u},{filter:function(p){return s(this),o(p),new f(l(this),{predicate:p})}})},670:(n,e,t)=>{var r=t(6518),i=t(9565),o=t(9306),s=t(8551),l=t(1767),c=t(8646),d=t(9462),u=t(9539),f=t(6395),h=d(function(){for(var p,m,y=this.iterator,b=this.mapper;;){if(m=this.inner)try{if(!(p=s(i(m.next,m.iterator))).done)return p.value;this.inner=null}catch(w){u(y,"throw",w)}if(p=s(i(this.next,y)),this.done=!!p.done)return;try{this.inner=c(b(p.value,this.counter++),!1)}catch(w){u(y,"throw",w)}}});r({target:"Iterator",proto:!0,real:!0,forced:f},{flatMap:function(m){return s(this),o(m),new h(l(this),{mapper:m,inner:null})}})},1454:(n,e,t)=>{var r=t(6518),i=t(713);r({target:"Iterator",proto:!0,real:!0,forced:t(6395)},{map:i})},7550:(n,e,t)=>{var r=t(6518),i=t(2652),o=t(9306),s=t(8551),l=t(1767);r({target:"Iterator",proto:!0,real:!0},{some:function(d){s(this),o(d);var u=l(this),f=0;return i(u,function(h,p){if(d(h,f++))return p()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},8335:(n,e,t)=>{var r=t(6518),i=t(3724),o=t(4576),s=t(7751),l=t(9504),c=t(9565),d=t(4901),u=t(34),f=t(4376),h=t(9297),p=t(655),m=t(6198),y=t(4659),b=t(9039),w=t(8235),v=t(4495),k=o.JSON,C=o.Number,T=o.SyntaxError,S=k&&k.parse,M=s("Object","keys"),x=Object.getOwnPropertyDescriptor,O=l("".charAt),P=l("".slice),N=l(/./.exec),_=l([].push),V=/^\d$/,H=/^[1-9]$/,L=/^[\d-]$/,D=/^[\t\n\r ]$/,U=function(Z,j,$,W){var J,ae,oe,se,me,_e=Z[j],dt=W&&_e===W.value,cn=dt&&typeof W.source=="string"?{source:W.source}:{};if(u(_e)){var vn=f(_e),Lt=dt?W.nodes:vn?[]:{};if(vn)for(J=Lt.length,oe=m(_e),se=0;se<oe;se++)F(_e,se,U(_e,""+se,$,se<J?Lt[se]:void 0));else for(ae=M(_e),oe=m(ae),se=0;se<oe;se++)me=ae[se],F(_e,me,U(_e,me,$,h(Lt,me)?Lt[me]:void 0))}return c($,Z,j,_e,cn)},F=function(Z,j,$){if(i){var W=x(Z,j);if(W&&!W.configurable)return}$===void 0?delete Z[j]:y(Z,j,$)},R=function(Z,j,$,W){this.value=Z,this.end=j,this.source=$,this.nodes=W},G=function(Z,j){this.source=Z,this.index=j};G.prototype={fork:function(Z){return new G(this.source,Z)},parse:function(){var Z=this.source,j=this.skip(D,this.index),$=this.fork(j),W=O(Z,j);if(N(L,W))return $.number();switch(W){case"{":return $.object();case"[":return $.array();case'"':return $.string();case"t":return $.keyword(!0);case"f":return $.keyword(!1);case"n":return $.keyword(null)}throw new T('Unexpected character: "'+W+'" at: '+j)},node:function(Z,j,$,W,J){return new R(j,W,Z?null:P(this.source,$,W),J)},object:function(){for(var Z=this.source,j=this.index+1,$=!1,W={},J={};j<Z.length;){if(j=this.until(['"',"}"],j),O(Z,j)==="}"&&!$){j++;break}var ae=this.fork(j).string(),oe=ae.value;j=ae.end,j=this.until([":"],j)+1,j=this.skip(D,j),ae=this.fork(j).parse(),y(J,oe,ae),y(W,oe,ae.value),j=this.until([",","}"],ae.end);var se=O(Z,j);if(se===",")$=!0,j++;else if(se==="}"){j++;break}}return this.node(1,W,this.index,j,J)},array:function(){for(var Z=this.source,j=this.index+1,$=!1,W=[],J=[];j<Z.length;){if(j=this.skip(D,j),O(Z,j)==="]"&&!$){j++;break}var ae=this.fork(j).parse();if(_(J,ae),_(W,ae.value),j=this.until([",","]"],ae.end),O(Z,j)===",")$=!0,j++;else if(O(Z,j)==="]"){j++;break}}return this.node(1,W,this.index,j,J)},string:function(){var Z=this.index,j=w(this.source,this.index+1);return this.node(0,j.value,Z,j.end)},number:function(){var Z=this.source,j=this.index,$=j;if(O(Z,$)==="-"&&$++,O(Z,$)==="0")$++;else{if(!N(H,O(Z,$)))throw new T("Failed to parse number at: "+$);$=this.skip(V,$+1)}if(O(Z,$)==="."&&($=this.skip(V,$+1)),(O(Z,$)==="e"||O(Z,$)==="E")&&($++,O(Z,$)!=="+"&&O(Z,$)!=="-"||$++,$===($=this.skip(V,$))))throw new T("Failed to parse number's exponent value at: "+$);return this.node(0,C(P(Z,j,$)),j,$)},keyword:function(Z){var j=""+Z,$=this.index,W=$+j.length;if(P(this.source,$,W)!==j)throw new T("Failed to parse value at: "+$);return this.node(0,Z,$,W)},skip:function(Z,j){for(var $=this.source;j<$.length&&N(Z,O($,j));j++);return j},until:function(Z,j){j=this.skip(D,j);for(var $=O(this.source,j),W=0;W<Z.length;W++)if(Z[W]===$)return j;throw new T('Unexpected character: "'+$+'" at: '+j)}};var ne=b(function(){var Z,j="9007199254740993";return S(j,function($,W,J){Z=J.source}),Z!==j}),Y=v&&!b(function(){return 1/S("-0 ")!=-1/0});r({target:"JSON",stat:!0,forced:ne},{parse:function(j,$){return Y&&!d($)?S(j):function(W,J){W=p(W);var ae=new G(W,0),oe=ae.parse(),se=oe.value,me=ae.skip(D,oe.end);if(me<W.length)throw new T('Unexpected extra character: "'+O(W,me)+'" after the parsed data at: '+me);return d(J)?U({"":se},"",J,oe):se}(j,$)}})},4979:(n,e,t)=>{var r=t(6518),i=t(4576),o=t(7751),s=t(6980),l=t(4913).f,c=t(9297),d=t(679),u=t(3167),f=t(2603),h=t(5002),p=t(8574),m=t(3724),y=t(6395),b="DOMException",w=o("Error"),v=o(b),k=function(){d(this,C);var D=arguments.length,U=f(D<1?void 0:arguments[0]),F=f(D<2?void 0:arguments[1],"Error"),R=new v(U,F),G=new w(U);return G.name=b,l(R,"stack",s(1,p(G.stack,1))),u(R,this,k),R},C=k.prototype=v.prototype,T="stack"in new w(b),S="stack"in new v(1,2),M=v&&m&&Object.getOwnPropertyDescriptor(i,b),x=!(!M||M.writable&&M.configurable),O=T&&!x&&!S;r({global:!0,constructor:!0,forced:y||O},{DOMException:O?k:v});var P=o(b),N=P.prototype;if(N.constructor!==P){y||l(N,"constructor",s(1,P));for(var _ in h)if(c(h,_)){var V=h[_],H=V.s;c(P,H)||l(P,H,s(6,V.c))}}},4603:(n,e,t)=>{var r=t(6840),i=t(9504),o=t(655),s=t(2812),l=URLSearchParams,c=l.prototype,d=i(c.append),u=i(c.delete),f=i(c.forEach),h=i([].push),p=new l("a=1&a=2&b=3");p.delete("a",1),p.delete("b",void 0),p+""!="a=2"&&r(c,"delete",function(m){var y=arguments.length,b=y<2?void 0:arguments[1];if(y&&b===void 0)return u(this,m);var w=[];f(this,function(O,P){h(w,{key:P,value:O})}),s(y,1);for(var v,k=o(m),C=o(b),T=0,S=0,M=!1,x=w.length;T<x;)v=w[T++],M||v.key===k?(M=!0,u(this,v.key)):S++;for(;S<x;)(v=w[S++]).key===k&&v.value===C||d(this,v.key,v.value)},{enumerable:!0,unsafe:!0})},7566:(n,e,t)=>{var r=t(6840),i=t(9504),o=t(655),s=t(2812),l=URLSearchParams,c=l.prototype,d=i(c.getAll),u=i(c.has),f=new l("a=1");!f.has("a",2)&&f.has("a",void 0)||r(c,"has",function(p){var m=arguments.length,y=m<2?void 0:arguments[1];if(m&&y===void 0)return u(this,p);var b=d(this,p);s(m,1);for(var w=o(y),v=0;v<b.length;)if(b[v++]===w)return!0;return!1},{enumerable:!0,unsafe:!0})},8721:(n,e,t)=>{var r=t(3724),i=t(9504),o=t(2106),s=URLSearchParams.prototype,l=i(s.forEach);r&&!("size"in s)&&o(s,"size",{get:function(){var d=0;return l(this,function(){d++}),d},configurable:!0,enumerable:!0})}},dE={};function Le(n){var e=dE[n];if(e!==void 0)return e.exports;var t=dE[n]={exports:{}};return aU[n].call(t.exports,t,t.exports,Le),t.exports}Le.d=(n,e)=>{for(var t in e)Le.o(e,t)&&!Le.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:e[t]})},Le.o=(n,e)=>Object.prototype.hasOwnProperty.call(n,e);var ve=globalThis.pdfjsLib={};Le.d(ve,{AbortException:()=>Ka,AnnotationEditorLayer:()=>i6,AnnotationEditorParamsType:()=>ye,AnnotationEditorType:()=>xe,AnnotationEditorUIManager:()=>Ya,AnnotationLayer:()=>gW,AnnotationMode:()=>hs,CMapCompressionType:()=>Ab,ColorPicker:()=>km,DOMSVGFactory:()=>Nb,DrawLayer:()=>o6,FeatureTest:()=>jn,GlobalWorkerOptions:()=>po,ImageKind:()=>om,InvalidPDFException:()=>pE,MissingPDFException:()=>qa,OPS:()=>Kr,PDFDataRangeTransport:()=>XE,PDFDateString:()=>AE,PDFWorker:()=>nc,PasswordResponses:()=>VU,PermissionFlag:()=>pU,PixelsPerInch:()=>ms,RenderingCancelledException:()=>Pb,TextLayer:()=>w2,UnexpectedResponseException:()=>cm,Util:()=>ue,VerbosityLevel:()=>sm,XfaLayer:()=>nM,build:()=>QZ,createValidAbsoluteUrl:()=>zU,fetchData:()=>um,getDocument:()=>UZ,getFilenameFromUrl:()=>tZ,getPdfFilenameFromUrl:()=>nZ,getXfaPageViewport:()=>rZ,isDataScheme:()=>fm,isPdfFile:()=>Lb,noContextMenu:()=>kr,normalizeUnicode:()=>UU,setLayerDimensions:()=>Ga,shadow:()=>De,version:()=>YZ}),Le(4114),Le(6573),Le(8100),Le(7936),Le(7467),Le(4732),Le(9577),Le(4603),Le(7566),Le(8721);const mn=!(typeof process!="object"||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&process.type!=="browser"),uE=[1,0,0,1,0,0],kb=[.001,0,0,.001,0,0],Sb=1.35,lU=1,Eb=2,rm=4,cU=16,dU=32,uU=64,fU=128,hU=256,hs={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},xe={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},ye={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35},pU={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},im=0,Mb=1,u2=2,mU=3,fE=3,gU=4,om={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},yU=1,bU=2,wU=3,vU=4,CU=5,kU=6,SU=7,EU=8,MU=9,AU=10,TU=11,IU=12,xU=13,OU=14,DU=15,hE=16,NU=17,PU=20,LU=1,BU=2,_U=3,RU=4,$U=5,sm={ERRORS:0,WARNINGS:1,INFOS:5},Ab={NONE:0,BINARY:1},Kr={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},VU={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let am=sm.WARNINGS;function FU(n){Number.isInteger(n)&&(am=n)}function jU(){return am}function lm(n){am>=sm.INFOS&&console.log(`Info: ${n}`)}function Ee(n){am>=sm.WARNINGS&&console.log(`Warning: ${n}`)}function Mt(n){throw new Error(n)}function xt(n,e){n||Mt(e)}function zU(n,e=null,t=null){if(!n)return null;try{if(t&&typeof n=="string"){if(t.addDefaultProtocol&&n.startsWith("www.")){const i=n.match(/\./g);(i==null?void 0:i.length)>=2&&(n=`http://${n}`)}if(t.tryConvertEncoding)try{n=function(o){return decodeURIComponent(escape(o))}(n)}catch{}}const r=e?new URL(n,e):new URL(n);if(function(o){switch(o==null?void 0:o.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(r))return r}catch{}return null}function De(n,e,t,r=!1){return Object.defineProperty(n,e,{value:t,enumerable:!r,configurable:!0,writable:!1}),t}const ps=function(){function e(t,r){this.message=t,this.name=r}return e.prototype=new Error,e.constructor=e,e}();class Tb extends ps{constructor(e,t){super(e,"PasswordException"),this.code=t}}class Ib extends ps{constructor(e,t){super(e,"UnknownErrorException"),this.details=t}}class pE extends ps{constructor(e){super(e,"InvalidPDFException")}}class qa extends ps{constructor(e){super(e,"MissingPDFException")}}class cm extends ps{constructor(e,t){super(e,"UnexpectedResponseException"),this.status=t}}class HU extends ps{constructor(e){super(e,"FormatError")}}class Ka extends ps{constructor(e){super(e,"AbortException")}}function mE(n){typeof n=="object"&&(n==null?void 0:n.length)!==void 0||Mt("Invalid argument for bytesToString");const e=n.length,t=8192;if(e<t)return String.fromCharCode.apply(null,n);const r=[];for(let i=0;i<e;i+=t){const o=Math.min(i+t,e),s=n.subarray(i,o);r.push(String.fromCharCode.apply(null,s))}return r.join("")}function dm(n){typeof n!="string"&&Mt("Invalid argument for stringToBytes");const e=n.length,t=new Uint8Array(e);for(let r=0;r<e;++r)t[r]=255&n.charCodeAt(r);return t}function xb(n){const e=Object.create(null);for(const[t,r]of n)e[t]=r;return e}class jn{static get isLittleEndian(){return De(this,"isLittleEndian",function(){const t=new Uint8Array(4);return t[0]=1,new Uint32Array(t.buffer,0,1)[0]===1}())}static get isEvalSupported(){return De(this,"isEvalSupported",function(){try{return new Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return De(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator<"u"&&typeof(navigator==null?void 0:navigator.platform)=="string"?De(this,"platform",{isMac:navigator.platform.includes("Mac")}):De(this,"platform",{isMac:!1})}static get isCSSRoundSupported(){var e,t;return De(this,"isCSSRoundSupported",(t=(e=globalThis.CSS)==null?void 0:e.supports)==null?void 0:t.call(e,"width: round(1.5px, 1px)"))}}const Ob=Array.from(Array(256).keys(),n=>n.toString(16).padStart(2,"0"));class ue{static makeHexColor(e,t,r){return`#${Ob[e]}${Ob[t]}${Ob[r]}`}static scaleMinMax(e,t){let r;e[0]?(e[0]<0&&(r=t[0],t[0]=t[2],t[2]=r),t[0]*=e[0],t[2]*=e[0],e[3]<0&&(r=t[1],t[1]=t[3],t[3]=r),t[1]*=e[3],t[3]*=e[3]):(r=t[0],t[0]=t[1],t[1]=r,r=t[2],t[2]=t[3],t[3]=r,e[1]<0&&(r=t[1],t[1]=t[3],t[3]=r),t[1]*=e[1],t[3]*=e[1],e[2]<0&&(r=t[0],t[0]=t[2],t[2]=r),t[0]*=e[2],t[2]*=e[2]),t[0]+=e[4],t[1]+=e[5],t[2]+=e[4],t[3]+=e[5]}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){const r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]}static getAxialAlignedBoundingBox(e,t){const r=this.applyTransform(e,t),i=this.applyTransform(e.slice(2,4),t),o=this.applyTransform([e[0],e[3]],t),s=this.applyTransform([e[2],e[1]],t);return[Math.min(r[0],i[0],o[0],s[0]),Math.min(r[1],i[1],o[1],s[1]),Math.max(r[0],i[0],o[0],s[0]),Math.max(r[1],i[1],o[1],s[1])]}static inverseTransform(e){const t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static singularValueDecompose2dScale(e){const t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],i=e[0]*t[1]+e[1]*t[3],o=e[2]*t[0]+e[3]*t[2],s=e[2]*t[1]+e[3]*t[3],l=(r+s)/2,c=Math.sqrt((r+s)**2-4*(r*s-o*i))/2,d=l+c||1,u=l-c||1;return[Math.sqrt(d),Math.sqrt(u)]}static normalizeRect(e){const t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){const r=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),i=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(r>i)return null;const o=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),s=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return o>s?null:[r,o,i,s]}static bezierBoundingBox(e,t,r,i,o,s,l,c,d){return d?(d[0]=Math.min(d[0],e,l),d[1]=Math.min(d[1],t,c),d[2]=Math.max(d[2],e,l),d[3]=Math.max(d[3],t,c)):d=[Math.min(e,l),Math.min(t,c),Math.max(e,l),Math.max(t,c)],I(this,Uf,hv).call(this,e,r,o,l,t,i,s,c,3*(3*(r-o)-e+l),6*(e-2*r+o),3*(r-e),d),I(this,Uf,hv).call(this,e,r,o,l,t,i,s,c,3*(3*(i-s)-t+c),6*(t-2*i+s),3*(i-t),d),d}}Uc=new WeakSet,n5=function(e,t,r,i,o,s,l,c,d,u){if(d<=0||d>=1)return;const f=1-d,h=d*d,p=h*d,m=f*(f*(f*e+3*d*t)+3*h*r)+p*i,y=f*(f*(f*o+3*d*s)+3*h*l)+p*c;u[0]=Math.min(u[0],m),u[1]=Math.min(u[1],y),u[2]=Math.max(u[2],m),u[3]=Math.max(u[3],y)},Uf=new WeakSet,hv=function(e,t,r,i,o,s,l,c,d,u,f,h){if(Math.abs(d)<1e-12){Math.abs(u)>=1e-12&&I(this,Uc,n5).call(this,e,t,r,i,o,s,l,c,-f/u,h);return}const p=u**2-4*f*d;if(p<0)return;const m=Math.sqrt(p),y=2*d;I(this,Uc,n5).call(this,e,t,r,i,o,s,l,c,(-u+m)/y,h),I(this,Uc,n5).call(this,e,t,r,i,o,s,l,c,(-u-m)/y,h)},E(ue,Uc),E(ue,Uf);let Db=null,gE=null;function UU(n){return Db||(Db=/([\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,gE=new Map([["ſt","ſt"]])),n.replaceAll(Db,(e,t,r)=>t?t.normalize("NFKC"):gE.get(r))}const yE="pdfjs_internal_id_",ZU=0,WU=1,qU=2,KU=3,GU=4,YU=5,QU=6,XU=7,JU=8;Le(4628),Le(7642),Le(8004),Le(3853),Le(5876),Le(2475),Le(5024),Le(1698),Le(1454),Le(4979),Le(8992),Le(4743),Le(3215),Le(7550),Le(8335),Le(4520);class bE{addFilter(e){return"none"}addHCMFilter(e,t){return"none"}addAlphaFilter(e){return"none"}addLuminosityFilter(e){return"none"}addHighlightHCMFilter(e,t,r,i,o){return"none"}destroy(e=!1){}}class wE{constructor({enableHWA:e=!1}={}){E(this,Zf,!1);A(this,Zf,e)}create(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");const r=this._createCanvas(e,t);return{canvas:r,context:r.getContext("2d",{willReadFrequently:!g(this,Zf)})}}reset(e,t,r){if(!e.canvas)throw new Error("Canvas is not specified");if(t<=0||r<=0)throw new Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=r}destroy(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}_createCanvas(e,t){Mt("Abstract method `_createCanvas` called.")}}Zf=new WeakMap;class vE{constructor({baseUrl:e=null,isCompressed:t=!0}){this.baseUrl=e,this.isCompressed=t}async fetch({name:e}){if(!this.baseUrl)throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!e)throw new Error("CMap name must be specified.");const t=this.baseUrl+e+(this.isCompressed?".bcmap":""),r=this.isCompressed?Ab.BINARY:Ab.NONE;return this._fetchData(t,r).catch(i=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${t}`)})}_fetchData(e,t){Mt("Abstract method `_fetchData` called.")}}class CE{constructor({baseUrl:e=null}){this.baseUrl=e}async fetch({filename:e}){if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!e)throw new Error("Font filename must be specified.");const t=`${this.baseUrl}${e}`;return this._fetchData(t).catch(r=>{throw new Error(`Unable to load font data at: ${t}`)})}_fetchData(e){Mt("Abstract method `_fetchData` called.")}}class eZ{create(e,t,r=!1){if(e<=0||t<=0)throw new Error("Invalid SVG dimensions");const i=this._createSVG("svg:svg");return i.setAttribute("version","1.1"),r||(i.setAttribute("width",`${e}px`),i.setAttribute("height",`${t}px`)),i.setAttribute("preserveAspectRatio","none"),i.setAttribute("viewBox",`0 0 ${e} ${t}`),i}createElement(e){if(typeof e!="string")throw new Error("Invalid SVG element type");return this._createSVG(e)}_createSVG(e){Mt("Abstract method `_createSVG` called.")}}const fo="http://www.w3.org/2000/svg",Sl=class Sl{};be(Sl,"CSS",96),be(Sl,"PDF",72),be(Sl,"PDF_TO_CSS_UNITS",Sl.CSS/Sl.PDF);let ms=Sl;async function um(n,e="text"){if(h2(n,document.baseURI)){const t=await fetch(n);if(!t.ok)throw new Error(t.statusText);switch(e){case"arraybuffer":return t.arrayBuffer();case"blob":return t.blob();case"json":return t.json()}return t.text()}return new Promise((t,r)=>{const i=new XMLHttpRequest;i.open("GET",n,!0),i.responseType=e,i.onreadystatechange=()=>{if(i.readyState===XMLHttpRequest.DONE)if(i.status!==200&&i.status!==0)r(new Error(i.statusText));else{switch(e){case"arraybuffer":case"blob":case"json":t(i.response);return}t(i.responseText)}},i.send(null)})}class kE extends vE{_fetchData(e,t){return um(e,this.isCompressed?"arraybuffer":"text").then(r=>({cMapData:r instanceof ArrayBuffer?new Uint8Array(r):dm(r),compressionType:t}))}}class SE extends CE{_fetchData(e){return um(e,"arraybuffer").then(t=>new Uint8Array(t))}}class Nb extends eZ{_createSVG(e){return document.createElementNS(fo,e)}}class f2{constructor({viewBox:e,scale:t,rotation:r,offsetX:i=0,offsetY:o=0,dontFlip:s=!1}){this.viewBox=e,this.scale=t,this.rotation=r,this.offsetX=i,this.offsetY=o;const l=(e[2]+e[0])/2,c=(e[3]+e[1])/2;let d,u,f,h,p,m,y,b;switch((r%=360)<0&&(r+=360),r){case 180:d=-1,u=0,f=0,h=1;break;case 90:d=0,u=1,f=1,h=0;break;case 270:d=0,u=-1,f=-1,h=0;break;case 0:d=1,u=0,f=0,h=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}s&&(f=-f,h=-h),d===0?(p=Math.abs(c-e[1])*t+i,m=Math.abs(l-e[0])*t+o,y=(e[3]-e[1])*t,b=(e[2]-e[0])*t):(p=Math.abs(l-e[0])*t+i,m=Math.abs(c-e[1])*t+o,y=(e[2]-e[0])*t,b=(e[3]-e[1])*t),this.transform=[d*t,u*t,f*t,h*t,p-d*t*l-f*t*c,m-u*t*l-h*t*c],this.width=y,this.height=b}get rawDims(){const{viewBox:e}=this;return De(this,"rawDims",{pageWidth:e[2]-e[0],pageHeight:e[3]-e[1],pageX:e[0],pageY:e[1]})}clone({scale:e=this.scale,rotation:t=this.rotation,offsetX:r=this.offsetX,offsetY:i=this.offsetY,dontFlip:o=!1}={}){return new f2({viewBox:this.viewBox.slice(),scale:e,rotation:t,offsetX:r,offsetY:i,dontFlip:o})}convertToViewportPoint(e,t){return ue.applyTransform([e,t],this.transform)}convertToViewportRectangle(e){const t=ue.applyTransform([e[0],e[1]],this.transform),r=ue.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],r[0],r[1]]}convertToPdfPoint(e,t){return ue.applyInverseTransform([e,t],this.transform)}}class Pb extends ps{constructor(e,t=0){super(e,"RenderingCancelledException"),this.extraDelay=t}}function fm(n){const e=n.length;let t=0;for(;t<e&&n[t].trim()==="";)t++;return n.substring(t,t+5).toLowerCase()==="data:"}function Lb(n){return typeof n=="string"&&/\.pdf$/i.test(n)}function tZ(n){return[n]=n.split(/[#?]/,1),n.substring(n.lastIndexOf("/")+1)}function nZ(n,e="document.pdf"){if(typeof n!="string")return e;if(fm(n))return Ee('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),e;const t=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,r=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(n);let i=t.exec(r[1])||t.exec(r[2])||t.exec(r[3]);if(i&&(i=i[0],i.includes("%")))try{i=t.exec(decodeURIComponent(i))[0]}catch{}return i||e}class EE{constructor(){be(this,"started",Object.create(null));be(this,"times",[])}time(e){e in this.started&&Ee(`Timer is already running for ${e}`),this.started[e]=Date.now()}timeEnd(e){e in this.started||Ee(`Timer has not been started for ${e}`),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}toString(){const e=[];let t=0;for(const{name:r}of this.times)t=Math.max(r.length,t);for(const{name:r,start:i,end:o}of this.times)e.push(`${r.padEnd(t)} ${o-i}ms
|
|
121
|
-
`);return e.join("")}}function h2(n,e){try{const{protocol:t}=e?new URL(n,e):new URL(n);return t==="http:"||t==="https:"}catch{return!1}}function kr(n){n.preventDefault()}let ME;class AE{static toDateObject(e){if(!e||typeof e!="string")return null;ME||(ME=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const t=ME.exec(e);if(!t)return null;const r=parseInt(t[1],10);let i=parseInt(t[2],10);i=i>=1&&i<=12?i-1:0;let o=parseInt(t[3],10);o=o>=1&&o<=31?o:1;let s=parseInt(t[4],10);s=s>=0&&s<=23?s:0;let l=parseInt(t[5],10);l=l>=0&&l<=59?l:0;let c=parseInt(t[6],10);c=c>=0&&c<=59?c:0;const d=t[7]||"Z";let u=parseInt(t[8],10);u=u>=0&&u<=23?u:0;let f=parseInt(t[9],10)||0;return f=f>=0&&f<=59?f:0,d==="-"?(s+=u,l+=f):d==="+"&&(s-=u,l-=f),new Date(Date.UTC(r,i,o,s,l,c))}}function rZ(n,{scale:e=1,rotation:t=0}){const{width:r,height:i}=n.attributes.style,o=[0,0,parseInt(r),parseInt(i)];return new f2({viewBox:o,scale:e,rotation:t})}function Bb(n){if(n.startsWith("#")){const e=parseInt(n.slice(1),16);return[(16711680&e)>>16,(65280&e)>>8,255&e]}return n.startsWith("rgb(")?n.slice(4,-1).split(",").map(e=>parseInt(e)):n.startsWith("rgba(")?n.slice(5,-1).split(",").map(e=>parseInt(e)).slice(0,3):(Ee(`Not a valid color format: "${n}"`),[0,0,0])}function st(n){const{a:e,b:t,c:r,d:i,e:o,f:s}=n.getTransform();return[e,t,r,i,o,s]}function ho(n){const{a:e,b:t,c:r,d:i,e:o,f:s}=n.getTransform().invertSelf();return[e,t,r,i,o,s]}function Ga(n,e,t=!1,r=!0){if(e instanceof f2){const{pageWidth:i,pageHeight:o}=e.rawDims,{style:s}=n,l=jn.isCSSRoundSupported,c=`var(--scale-factor) * ${i}px`,d=`var(--scale-factor) * ${o}px`,u=l?`round(${c}, 1px)`:`calc(${c})`,f=l?`round(${d}, 1px)`:`calc(${d})`;t&&e.rotation%180!=0?(s.width=f,s.height=u):(s.width=u,s.height=f)}r&&n.setAttribute("data-main-rotation",e.rotation)}const To=class To{constructor(e){E(this,w3);E(this,v3);E(this,Zc);E(this,C3);E(this,Kf);E(this,El,null);E(this,Ml,null);E(this,ei,void 0);E(this,Al,null);E(this,Wf,null);A(this,ei,e),g(To,qf)||A(To,qf,Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button"}))}render(){const e=A(this,El,document.createElement("div"));e.className="editToolbar",e.setAttribute("role","toolbar");const t=g(this,ei)._uiManager._signal;e.addEventListener("contextmenu",kr,{signal:t}),e.addEventListener("pointerdown",I(To,b3,oN),{signal:t});const r=A(this,Al,document.createElement("div"));r.className="buttons",e.append(r);const i=g(this,ei).toolbarPosition;if(i){const{style:o}=e,s=g(this,ei)._uiManager.direction==="ltr"?1-i[0]:i[0];o.insetInlineEnd=100*s+"%",o.top=`calc(${100*i[1]}% + var(--editor-toolbar-vert-offset))`}return I(this,C3,lN).call(this),e}hide(){var e;g(this,El).classList.add("hidden"),(e=g(this,Ml))==null||e.hideDropdown()}show(){var e;g(this,El).classList.remove("hidden"),(e=g(this,Wf))==null||e.shown()}async addAltText(e){const t=await e.render();I(this,Zc,r5).call(this,t),g(this,Al).prepend(t,g(this,Kf,pv)),A(this,Wf,e)}addColorPicker(e){A(this,Ml,e);const t=e.renderButton();I(this,Zc,r5).call(this,t),g(this,Al).prepend(t,g(this,Kf,pv))}remove(){var e;g(this,El).remove(),(e=g(this,Ml))==null||e.destroy(),A(this,Ml,null)}};El=new WeakMap,Ml=new WeakMap,ei=new WeakMap,Al=new WeakMap,Wf=new WeakMap,qf=new WeakMap,b3=new WeakSet,oN=function(e){e.stopPropagation()},w3=new WeakSet,sN=function(e){g(this,ei)._focusEventsAllowed=!1,e.preventDefault(),e.stopPropagation()},v3=new WeakSet,aN=function(e){g(this,ei)._focusEventsAllowed=!0,e.preventDefault(),e.stopPropagation()},Zc=new WeakSet,r5=function(e){const t=g(this,ei)._uiManager._signal;e.addEventListener("focusin",I(this,w3,sN).bind(this),{capture:!0,signal:t}),e.addEventListener("focusout",I(this,v3,aN).bind(this),{capture:!0,signal:t}),e.addEventListener("contextmenu",kr,{signal:t})},C3=new WeakSet,lN=function(){const{editorType:e,_uiManager:t}=g(this,ei),r=document.createElement("button");r.className="delete",r.tabIndex=0,r.setAttribute("data-l10n-id",g(To,qf)[e]),I(this,Zc,r5).call(this,r),r.addEventListener("click",i=>{t.delete()},{signal:t._signal}),g(this,Al).append(r)},Kf=new WeakSet,pv=function(){const e=document.createElement("div");return e.className="divider",e},E(To,b3),E(To,qf,null);let _b=To;class iZ{constructor(e){E(this,k3);E(this,S3);E(this,E3);E(this,Gf,null);E(this,Tl,null);E(this,Il,void 0);A(this,Il,e)}show(e,t,r){const[i,o]=I(this,S3,dN).call(this,t,r),{style:s}=g(this,Tl)||A(this,Tl,I(this,k3,cN).call(this));e.append(g(this,Tl)),s.insetInlineEnd=100*i+"%",s.top=`calc(${100*o}% + var(--editor-toolbar-vert-offset))`}hide(){g(this,Tl).remove()}}Gf=new WeakMap,Tl=new WeakMap,Il=new WeakMap,k3=new WeakSet,cN=function(){const e=A(this,Tl,document.createElement("div"));e.className="editToolbar",e.setAttribute("role","toolbar"),e.addEventListener("contextmenu",kr,{signal:g(this,Il)._signal});const t=A(this,Gf,document.createElement("div"));return t.className="buttons",e.append(t),I(this,E3,uN).call(this),e},S3=new WeakSet,dN=function(e,t){let r=0,i=0;for(const o of e){const s=o.y+o.height;if(s<r)continue;const l=o.x+(t?o.width:0);s>r?(i=l,r=s):t?l>i&&(i=l):l<i&&(i=l)}return[t?1-i:i,r]},E3=new WeakSet,uN=function(){const e=document.createElement("button");e.className="highlightButton",e.tabIndex=0,e.setAttribute("data-l10n-id","pdfjs-highlight-floating-button1");const t=document.createElement("span");e.append(t),t.className="visuallyHidden",t.setAttribute("data-l10n-id","pdfjs-highlight-floating-button-label");const r=g(this,Il)._signal;e.addEventListener("contextmenu",kr,{signal:r}),e.addEventListener("click",()=>{g(this,Il).highlightSelection("floating_button")},{signal:r}),g(this,Gf).append(e)};function hm(n,e,t){for(const r of t)e.addEventListener(r,n[r].bind(n))}class oZ{constructor(){E(this,M3,0)}get id(){return"pdfjs_internal_editor_"+Xn(this,M3)._++}}M3=new WeakMap;const av=class av{constructor(){E(this,Qf);E(this,Yf,function(){if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.randomUUID)=="function")return crypto.randomUUID();const t=new Uint8Array(32);if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.getRandomValues)=="function")crypto.getRandomValues(t);else for(let r=0;r<32;r++)t[r]=Math.floor(255*Math.random());return mE(t)}());E(this,A3,0);E(this,Br,null)}static get _isSVGFittingCanvas(){const e=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),t=new Image;return t.src='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',De(this,"_isSVGFittingCanvas",t.decode().then(()=>(e.drawImage(t,0,0,1,1,0,0,1,3),new Uint32Array(e.getImageData(0,0,1,1).data.buffer)[0]===0)))}async getFromFile(e){const{lastModified:t,name:r,size:i,type:o}=e;return I(this,Qf,mv).call(this,`${t}_${r}_${i}_${o}`,e)}async getFromUrl(e){return I(this,Qf,mv).call(this,e,e)}async getFromId(e){g(this,Br)||A(this,Br,new Map);const t=g(this,Br).get(e);return t?t.bitmap?(t.refCounter+=1,t):t.file?this.getFromFile(t.file):this.getFromUrl(t.url):null}getSvgUrl(e){const t=g(this,Br).get(e);return t!=null&&t.isSvg?t.svgUrl:null}deleteId(e){g(this,Br)||A(this,Br,new Map);const t=g(this,Br).get(e);t&&(t.refCounter-=1,t.refCounter===0&&(t.bitmap=null))}isValidId(e){return e.startsWith(`image_${g(this,Yf)}_`)}};Yf=new WeakMap,A3=new WeakMap,Br=new WeakMap,Qf=new WeakSet,mv=async function(e,t){g(this,Br)||A(this,Br,new Map);let r=g(this,Br).get(e);if(r===null)return null;if(r!=null&&r.bitmap)return r.refCounter+=1,r;try{r||(r={bitmap:null,id:`image_${g(this,Yf)}_${Xn(this,A3)._++}`,refCounter:0,isSvg:!1});let i;if(typeof t=="string"?(r.url=t,i=await um(t,"blob")):i=r.file=t,i.type==="image/svg+xml"){const o=av._isSVGFittingCanvas,s=new FileReader,l=new Image,c=new Promise((d,u)=>{l.onload=()=>{r.bitmap=l,r.isSvg=!0,d()},s.onload=async()=>{const f=r.svgUrl=s.result;l.src=await o?`${f}#svgView(preserveAspectRatio(none))`:f},l.onerror=s.onerror=u});s.readAsDataURL(i),await c}else r.bitmap=await createImageBitmap(i);r.refCounter=1}catch(i){console.error(i),r=null}return g(this,Br).set(e,r),r&&g(this,Br).set(r.id,r),r};let Rb=av,sZ=(tN=class{constructor(e=128){E(this,Ht,[]);E(this,Gs,!1);E(this,Xf,void 0);E(this,Ut,-1);A(this,Xf,e)}add({cmd:e,undo:t,post:r,mustExec:i,type:o=NaN,overwriteIfSameType:s=!1,keepUndo:l=!1}){if(i&&e(),g(this,Gs))return;const c={cmd:e,undo:t,post:r,type:o};if(g(this,Ut)===-1){g(this,Ht).length>0&&(g(this,Ht).length=0),A(this,Ut,0),g(this,Ht).push(c);return}if(s&&g(this,Ht)[g(this,Ut)].type===o){l&&(c.undo=g(this,Ht)[g(this,Ut)].undo),g(this,Ht)[g(this,Ut)]=c;return}const d=g(this,Ut)+1;d===g(this,Xf)?g(this,Ht).splice(0,1):(A(this,Ut,d),d<g(this,Ht).length&&g(this,Ht).splice(d)),g(this,Ht).push(c)}undo(){if(g(this,Ut)===-1)return;A(this,Gs,!0);const{undo:e,post:t}=g(this,Ht)[g(this,Ut)];e(),t==null||t(),A(this,Gs,!1),A(this,Ut,g(this,Ut)-1)}redo(){if(g(this,Ut)<g(this,Ht).length-1){A(this,Ut,g(this,Ut)+1),A(this,Gs,!0);const{cmd:e,post:t}=g(this,Ht)[g(this,Ut)];e(),t==null||t(),A(this,Gs,!1)}}hasSomethingToUndo(){return g(this,Ut)!==-1}hasSomethingToRedo(){return g(this,Ut)<g(this,Ht).length-1}destroy(){A(this,Ht,null)}},Ht=new WeakMap,Gs=new WeakMap,Xf=new WeakMap,Ut=new WeakMap,tN);class p2{constructor(e){E(this,T3);this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:t}=jn.platform;for(const[r,i,o={}]of e)for(const s of r){const l=s.startsWith("mac+");t&&l?(this.callbacks.set(s.slice(4),{callback:i,options:o}),this.allKeys.add(s.split("+").at(-1))):!t&&!l&&(this.callbacks.set(s,{callback:i,options:o}),this.allKeys.add(s.split("+").at(-1)))}}exec(e,t){if(!this.allKeys.has(t.key))return;const r=this.callbacks.get(I(this,T3,fN).call(this,t));if(!r)return;const{callback:i,options:{bubbles:o=!1,args:s=[],checker:l=null}}=r;(!l||l(e,t))&&(i.bind(e,...s,t)(),o||(t.stopPropagation(),t.preventDefault()))}}T3=new WeakSet,fN=function(e){e.altKey&&this.buffer.push("alt"),e.ctrlKey&&this.buffer.push("ctrl"),e.metaKey&&this.buffer.push("meta"),e.shiftKey&&this.buffer.push("shift"),this.buffer.push(e.key);const t=this.buffer.join("+");return this.buffer.length=0,t};const I3=class I3{get _colors(){const e=new Map([["CanvasText",null],["Canvas",null]]);return function(r){const i=document.createElement("span");i.style.visibility="hidden",document.body.append(i);for(const o of r.keys()){i.style.color=o;const s=window.getComputedStyle(i).color;r.set(o,Bb(s))}i.remove()}(e),De(this,"_colors",e)}convert(e){const t=Bb(e);if(!window.matchMedia("(forced-colors: active)").matches)return t;for(const[r,i]of this._colors)if(i.every((o,s)=>o===t[s]))return I3._colorsMapping.get(r);return t}getHexCode(e){const t=this._colors.get(e);return t?ue.makeHexColor(...t):e}};be(I3,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let $b=I3;const ed=class ed{constructor(e,t,r,i,o,s,l,c,d,u,f){E(this,Xc);E(this,l1);E(this,O3);E(this,D3);E(this,Jc);E(this,N3);E(this,P3);E(this,L3);E(this,c1);E(this,B3);E(this,d1);E(this,u1);E(this,_3);E(this,on);E(this,Vi);E(this,R3);E(this,$3);E(this,f1);E(this,V3);E(this,Pl);E(this,h1);E(this,Wc,new AbortController);E(this,dr,null);E(this,Ot,new Map);E(this,rn,new Map);E(this,qc,null);E(this,Io,null);E(this,Kc,null);E(this,ti,new sZ);E(this,Ys,null);E(this,Gc,0);E(this,xl,new Set);E(this,Bi,null);E(this,ni,null);E(this,Ol,new Set);E(this,Jf,!1);E(this,e1,!1);E(this,Yc,!1);E(this,t1,null);E(this,_i,null);E(this,Qs,null);E(this,Qc,null);E(this,Xs,!1);E(this,Ri,null);E(this,x3,new oZ);E(this,Js,!1);E(this,n1,!1);E(this,ea,null);E(this,Dl,null);E(this,r1,null);E(this,i1,null);E(this,Zt,xe.NONE);E(this,Ze,new Set);E(this,xo,null);E(this,Nl,null);E(this,o1,null);E(this,s1,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1});E(this,ta,[0,0]);E(this,$i,null);E(this,Oo,null);E(this,a1,null);const h=this._signal=g(this,Wc).signal;A(this,Oo,e),A(this,a1,t),A(this,qc,r),this._eventBus=i,i._on("editingaction",this.onEditingAction.bind(this),{signal:h}),i._on("pagechanging",this.onPageChanging.bind(this),{signal:h}),i._on("scalechanging",this.onScaleChanging.bind(this),{signal:h}),i._on("rotationchanging",this.onRotationChanging.bind(this),{signal:h}),i._on("setpreference",this.onSetPreference.bind(this),{signal:h}),i._on("switchannotationeditorparams",p=>this.updateParams(p.type,p.value),{signal:h}),I(this,N3,mN).call(this),I(this,_3,wN).call(this),I(this,c1,yv).call(this),A(this,Io,o.annotationStorage),A(this,t1,o.filterFactory),A(this,Nl,s),A(this,Qc,l||null),A(this,Jf,c),A(this,e1,d),A(this,Yc,u),A(this,i1,f||null),this.viewParameters={realScale:ms.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1}static get _keyboardManager(){const e=ed.prototype,t=s=>g(s,Oo).contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&s.hasSomethingToControl(),r=(s,{target:l})=>{if(l instanceof HTMLInputElement){const{type:c}=l;return c!=="text"&&c!=="number"}return!0},i=this.TRANSLATE_SMALL,o=this.TRANSLATE_BIG;return De(this,"_keyboardManager",new p2([[["ctrl+a","mac+meta+a"],e.selectAll,{checker:r}],[["ctrl+z","mac+meta+z"],e.undo,{checker:r}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],e.redo,{checker:r}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],e.delete,{checker:r}],[["Enter","mac+Enter"],e.addNewEditorFromKeyboard,{checker:(s,{target:l})=>!(l instanceof HTMLButtonElement)&&g(s,Oo).contains(l)&&!s.isEnterHandled}],[[" ","mac+ "],e.addNewEditorFromKeyboard,{checker:(s,{target:l})=>!(l instanceof HTMLButtonElement)&&g(s,Oo).contains(document.activeElement)}],[["Escape","mac+Escape"],e.unselectAll],[["ArrowLeft","mac+ArrowLeft"],e.translateSelectedEditors,{args:[-i,0],checker:t}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e.translateSelectedEditors,{args:[-o,0],checker:t}],[["ArrowRight","mac+ArrowRight"],e.translateSelectedEditors,{args:[i,0],checker:t}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e.translateSelectedEditors,{args:[o,0],checker:t}],[["ArrowUp","mac+ArrowUp"],e.translateSelectedEditors,{args:[0,-i],checker:t}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e.translateSelectedEditors,{args:[0,-o],checker:t}],[["ArrowDown","mac+ArrowDown"],e.translateSelectedEditors,{args:[0,i],checker:t}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e.translateSelectedEditors,{args:[0,o],checker:t}]]))}destroy(){var e,t,r;(e=g(this,Wc))==null||e.abort(),A(this,Wc,null),this._signal=null;for(const i of g(this,rn).values())i.destroy();g(this,rn).clear(),g(this,Ot).clear(),g(this,Ol).clear(),A(this,dr,null),g(this,Ze).clear(),g(this,ti).destroy(),(t=g(this,qc))==null||t.destroy(),(r=g(this,Ri))==null||r.hide(),A(this,Ri,null),g(this,_i)&&(clearTimeout(g(this,_i)),A(this,_i,null)),g(this,$i)&&(clearTimeout(g(this,$i)),A(this,$i,null))}combinedSignal(e){return AbortSignal.any([this._signal,e.signal])}get mlManager(){return g(this,i1)}get useNewAltTextFlow(){return g(this,e1)}get useNewAltTextWhenAddingImage(){return g(this,Yc)}get hcmFilter(){return De(this,"hcmFilter",g(this,Nl)?g(this,t1).addHCMFilter(g(this,Nl).foreground,g(this,Nl).background):"none")}get direction(){return De(this,"direction",getComputedStyle(g(this,Oo)).direction)}get highlightColors(){return De(this,"highlightColors",g(this,Qc)?new Map(g(this,Qc).split(",").map(e=>e.split("=").map(t=>t.trim()))):null)}get highlightColorNames(){return De(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,e=>e.reverse())):null)}setMainHighlightColorPicker(e){A(this,r1,e)}editAltText(e,t=!1){var r;(r=g(this,qc))==null||r.editAltText(this,e,t)}switchToMode(e,t){this._eventBus.on("annotationeditormodechanged",t,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:e})}setPreference(e,t){this._eventBus.dispatch("setpreference",{source:this,name:e,value:t})}onSetPreference({name:e,value:t}){e==="enableNewAltTextWhenAddingImage"&&A(this,Yc,t)}onPageChanging({pageNumber:e}){A(this,Gc,e-1)}focusMainContainer(){g(this,Oo).focus()}findParent(e,t){for(const r of g(this,rn).values()){const{x:i,y:o,width:s,height:l}=r.div.getBoundingClientRect();if(e>=i&&e<=i+s&&t>=o&&t<=o+l)return r}return null}disableUserSelect(e=!1){g(this,a1).classList.toggle("noUserSelect",e)}addShouldRescale(e){g(this,Ol).add(e)}removeShouldRescale(e){g(this,Ol).delete(e)}onScaleChanging({scale:e}){this.commitOrRemove(),this.viewParameters.realScale=e*ms.PDF_TO_CSS_UNITS;for(const t of g(this,Ol))t.onScaleChanging()}onRotationChanging({pagesRotation:e}){this.commitOrRemove(),this.viewParameters.rotation=e}highlightSelection(e=""){const t=document.getSelection();if(!t||t.isCollapsed)return;const{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}=t,l=t.toString(),c=I(this,Xc,i5).call(this,t).closest(".textLayer"),d=this.getSelectionBoxes(c);if(!d)return;t.empty();const u=I(this,l1,gv).call(this,c),f=g(this,Zt)===xe.NONE,h=()=>{u==null||u.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:e,boxes:d,anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s,text:l}),f&&this.showAllEditors("highlight",!0,!0)};f?this.switchToMode(xe.HIGHLIGHT,h):h()}addToAnnotationStorage(e){e.isEmpty()||!g(this,Io)||g(this,Io).has(e.id)||g(this,Io).setValue(e.id,e)}blur(){if(this.isShiftKeyDown=!1,g(this,Xs)&&(A(this,Xs,!1),I(this,Jc,o5).call(this,"main_toolbar")),!this.hasSelection)return;const{activeElement:e}=document;for(const t of g(this,Ze))if(t.div.contains(e)){A(this,Dl,[t,e]),t._focusEventsAllowed=!1;break}}focus(){if(!g(this,Dl))return;const[e,t]=g(this,Dl);A(this,Dl,null),t.addEventListener("focusin",()=>{e._focusEventsAllowed=!0},{once:!0,signal:this._signal}),t.focus()}addEditListeners(){I(this,c1,yv).call(this),I(this,d1,bv).call(this)}removeEditListeners(){I(this,B3,bN).call(this),I(this,u1,wv).call(this)}dragOver(e){for(const{type:t}of e.dataTransfer.items)for(const r of g(this,ni))if(r.isHandlingMimeForPasting(t)){e.dataTransfer.dropEffect="copy",e.preventDefault();return}}drop(e){for(const t of e.dataTransfer.items)for(const r of g(this,ni))if(r.isHandlingMimeForPasting(t.type)){r.paste(t,this.currentLayer),e.preventDefault();return}}copy(e){var r;if(e.preventDefault(),(r=g(this,dr))==null||r.commitOrRemove(),!this.hasSelection)return;const t=[];for(const i of g(this,Ze)){const o=i.serialize(!0);o&&t.push(o)}t.length!==0&&e.clipboardData.setData("application/pdfjs",JSON.stringify(t))}cut(e){this.copy(e),this.delete()}paste(e){e.preventDefault();const{clipboardData:t}=e;for(const o of t.items)for(const s of g(this,ni))if(s.isHandlingMimeForPasting(o.type)){s.paste(o,this.currentLayer);return}let r=t.getData("application/pdfjs");if(!r)return;try{r=JSON.parse(r)}catch(o){Ee(`paste: "${o.message}".`);return}if(!Array.isArray(r))return;this.unselectAll();const i=this.currentLayer;try{const o=[];for(const c of r){const d=i.deserialize(c);if(!d)return;o.push(d)}const s=()=>{for(const c of o)I(this,f1,vv).call(this,c);I(this,h1,Cv).call(this,o)},l=()=>{for(const c of o)c.remove()};this.addCommands({cmd:s,undo:l,mustExec:!0})}catch(o){Ee(`paste: "${o.message}".`)}}keydown(e){this.isShiftKeyDown||e.key!=="Shift"||(this.isShiftKeyDown=!0),g(this,Zt)===xe.NONE||this.isEditorHandlingKeyboard||ed._keyboardManager.exec(this,e)}keyup(e){this.isShiftKeyDown&&e.key==="Shift"&&(this.isShiftKeyDown=!1,g(this,Xs)&&(A(this,Xs,!1),I(this,Jc,o5).call(this,"main_toolbar")))}onEditingAction({name:e}){switch(e){case"undo":case"redo":case"delete":case"selectAll":this[e]();break;case"highlightSelection":this.highlightSelection("context_menu")}}setEditingState(e){e?(I(this,P3,gN).call(this),I(this,d1,bv).call(this),I(this,on,Bn).call(this,{isEditing:g(this,Zt)!==xe.NONE,isEmpty:I(this,Pl,Xh).call(this),hasSomethingToUndo:g(this,ti).hasSomethingToUndo(),hasSomethingToRedo:g(this,ti).hasSomethingToRedo(),hasSelectedEditor:!1})):(I(this,L3,yN).call(this),I(this,u1,wv).call(this),I(this,on,Bn).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(e){if(!g(this,ni)){A(this,ni,e);for(const t of g(this,ni))I(this,Vi,Oa).call(this,t.defaultPropertiesToUpdate)}}getId(){return g(this,x3).id}get currentLayer(){return g(this,rn).get(g(this,Gc))}getLayer(e){return g(this,rn).get(e)}get currentPageIndex(){return g(this,Gc)}addLayer(e){g(this,rn).set(e.pageIndex,e),g(this,Js)?e.enable():e.disable()}removeLayer(e){g(this,rn).delete(e.pageIndex)}updateMode(e,t=null,r=!1){if(g(this,Zt)!==e)if(A(this,Zt,e),e!==xe.NONE){this.setEditingState(!0),I(this,R3,vN).call(this),this.unselectAll();for(const i of g(this,rn).values())i.updateMode(e);if(t||!r){if(t){for(const i of g(this,Ot).values())if(i.annotationElementId===t){this.setSelected(i),i.enterInEditMode();break}}}else this.addNewEditorFromKeyboard()}else this.setEditingState(!1),I(this,$3,CN).call(this)}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(e){e!==g(this,Zt)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:e})}updateParams(e,t){var r;if(g(this,ni)){switch(e){case ye.CREATE:this.currentLayer.addNewEditor();return;case ye.HIGHLIGHT_DEFAULT_COLOR:(r=g(this,r1))==null||r.updateColor(t);break;case ye.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(g(this,o1)||A(this,o1,new Map)).set(e,t),this.showAllEditors("highlight",t)}for(const i of g(this,Ze))i.updateParams(e,t);for(const i of g(this,ni))i.updateDefaultParams(e,t)}}showAllEditors(e,t,r=!1){var i;for(const o of g(this,Ot).values())o.editorType===e&&o.show(t);(((i=g(this,o1))==null?void 0:i.get(ye.HIGHLIGHT_SHOW_ALL))??!0)!==t&&I(this,Vi,Oa).call(this,[[ye.HIGHLIGHT_SHOW_ALL,t]])}enableWaiting(e=!1){if(g(this,n1)!==e){A(this,n1,e);for(const t of g(this,rn).values())e?t.disableClick():t.enableClick(),t.div.classList.toggle("waiting",e)}}getEditors(e){const t=[];for(const r of g(this,Ot).values())r.pageIndex===e&&t.push(r);return t}getEditor(e){return g(this,Ot).get(e)}addEditor(e){g(this,Ot).set(e.id,e)}removeEditor(e){var t;e.div.contains(document.activeElement)&&(g(this,_i)&&clearTimeout(g(this,_i)),A(this,_i,setTimeout(()=>{this.focusMainContainer(),A(this,_i,null)},0))),g(this,Ot).delete(e.id),this.unselect(e),e.annotationElementId&&g(this,xl).has(e.annotationElementId)||((t=g(this,Io))==null||t.remove(e.id))}addDeletedAnnotationElement(e){g(this,xl).add(e.annotationElementId),this.addChangedExistingAnnotation(e),e.deleted=!0}isDeletedAnnotationElement(e){return g(this,xl).has(e)}removeDeletedAnnotationElement(e){g(this,xl).delete(e.annotationElementId),this.removeChangedExistingAnnotation(e),e.deleted=!1}setActiveEditor(e){g(this,dr)!==e&&(A(this,dr,e),e&&I(this,Vi,Oa).call(this,e.propertiesToUpdate))}updateUI(e){g(this,V3,kN)===e&&I(this,Vi,Oa).call(this,e.propertiesToUpdate)}toggleSelected(e){g(this,Ze).has(e)?(g(this,Ze).delete(e),e.unselect(),I(this,on,Bn).call(this,{hasSelectedEditor:this.hasSelection})):(g(this,Ze).add(e),e.select(),I(this,Vi,Oa).call(this,e.propertiesToUpdate),I(this,on,Bn).call(this,{hasSelectedEditor:!0}))}setSelected(e){for(const t of g(this,Ze))t!==e&&t.unselect();g(this,Ze).clear(),g(this,Ze).add(e),e.select(),I(this,Vi,Oa).call(this,e.propertiesToUpdate),I(this,on,Bn).call(this,{hasSelectedEditor:!0})}isSelected(e){return g(this,Ze).has(e)}get firstSelectedEditor(){return g(this,Ze).values().next().value}unselect(e){e.unselect(),g(this,Ze).delete(e),I(this,on,Bn).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return g(this,Ze).size!==0}get isEnterHandled(){return g(this,Ze).size===1&&this.firstSelectedEditor.isEnterHandled}undo(){g(this,ti).undo(),I(this,on,Bn).call(this,{hasSomethingToUndo:g(this,ti).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:I(this,Pl,Xh).call(this)})}redo(){g(this,ti).redo(),I(this,on,Bn).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:g(this,ti).hasSomethingToRedo(),isEmpty:I(this,Pl,Xh).call(this)})}addCommands(e){g(this,ti).add(e),I(this,on,Bn).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:I(this,Pl,Xh).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const e=[...g(this,Ze)];this.addCommands({cmd:()=>{for(const t of e)t.remove()},undo:()=>{for(const t of e)I(this,f1,vv).call(this,t)},mustExec:!0})}commitOrRemove(){var e;(e=g(this,dr))==null||e.commitOrRemove()}hasSomethingToControl(){return g(this,dr)||this.hasSelection}selectAll(){for(const e of g(this,Ze))e.commit();I(this,h1,Cv).call(this,g(this,Ot).values())}unselectAll(){if(!(g(this,dr)&&(g(this,dr).commitOrRemove(),g(this,Zt)!==xe.NONE))&&this.hasSelection){for(const e of g(this,Ze))e.unselect();g(this,Ze).clear(),I(this,on,Bn).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(e,t,r=!1){if(r||this.commitOrRemove(),!this.hasSelection)return;g(this,ta)[0]+=e,g(this,ta)[1]+=t;const[i,o]=g(this,ta),s=[...g(this,Ze)];g(this,$i)&&clearTimeout(g(this,$i)),A(this,$i,setTimeout(()=>{A(this,$i,null),g(this,ta)[0]=g(this,ta)[1]=0,this.addCommands({cmd:()=>{for(const l of s)g(this,Ot).has(l.id)&&l.translateInPage(i,o)},undo:()=>{for(const l of s)g(this,Ot).has(l.id)&&l.translateInPage(-i,-o)},mustExec:!1})},1e3));for(const l of s)l.translateInPage(e,t)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),A(this,Bi,new Map);for(const e of g(this,Ze))g(this,Bi).set(e,{savedX:e.x,savedY:e.y,savedPageIndex:e.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!g(this,Bi))return!1;this.disableUserSelect(!1);const e=g(this,Bi);A(this,Bi,null);let t=!1;for(const[{x:i,y:o,pageIndex:s},l]of e)l.newX=i,l.newY=o,l.newPageIndex=s,t||(t=i!==l.savedX||o!==l.savedY||s!==l.savedPageIndex);if(!t)return!1;const r=(i,o,s,l)=>{if(g(this,Ot).has(i.id)){const c=g(this,rn).get(l);c?i._setParentAndPosition(c,o,s):(i.pageIndex=l,i.x=o,i.y=s)}};return this.addCommands({cmd:()=>{for(const[i,{newX:o,newY:s,newPageIndex:l}]of e)r(i,o,s,l)},undo:()=>{for(const[i,{savedX:o,savedY:s,savedPageIndex:l}]of e)r(i,o,s,l)},mustExec:!0}),!0}dragSelectedEditors(e,t){if(g(this,Bi))for(const r of g(this,Bi).keys())r.drag(e,t)}rebuild(e){if(e.parent===null){const t=this.getLayer(e.pageIndex);t?(t.changeParent(e),t.addOrRebuild(e)):(this.addEditor(e),this.addToAnnotationStorage(e),e.rebuild())}else e.parent.addOrRebuild(e)}get isEditorHandlingKeyboard(){var e;return((e=this.getActive())==null?void 0:e.shouldGetKeyboardEvents())||g(this,Ze).size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(e){return g(this,dr)===e}getActive(){return g(this,dr)}getMode(){return g(this,Zt)}get imageManager(){return De(this,"imageManager",new Rb)}getSelectionBoxes(e){if(!e)return null;const t=document.getSelection();for(let d=0,u=t.rangeCount;d<u;d++)if(!e.contains(t.getRangeAt(d).commonAncestorContainer))return null;const{x:r,y:i,width:o,height:s}=e.getBoundingClientRect();let l;switch(e.getAttribute("data-main-rotation")){case"90":l=(d,u,f,h)=>({x:(u-i)/s,y:1-(d+f-r)/o,width:h/s,height:f/o});break;case"180":l=(d,u,f,h)=>({x:1-(d+f-r)/o,y:1-(u+h-i)/s,width:f/o,height:h/s});break;case"270":l=(d,u,f,h)=>({x:1-(u+h-i)/s,y:(d-r)/o,width:h/s,height:f/o});break;default:l=(d,u,f,h)=>({x:(d-r)/o,y:(u-i)/s,width:f/o,height:h/s})}const c=[];for(let d=0,u=t.rangeCount;d<u;d++){const f=t.getRangeAt(d);if(!f.collapsed)for(const{x:h,y:p,width:m,height:y}of f.getClientRects())m!==0&&y!==0&&c.push(l(h,p,m,y))}return c.length===0?null:c}addChangedExistingAnnotation({annotationElementId:e,id:t}){(g(this,Kc)||A(this,Kc,new Map)).set(e,t)}removeChangedExistingAnnotation({annotationElementId:e}){var t;(t=g(this,Kc))==null||t.delete(e)}renderAnnotationElement(e){var i;const t=(i=g(this,Kc))==null?void 0:i.get(e.data.id);if(!t)return;const r=g(this,Io).getRawValue(t);r&&(g(this,Zt)!==xe.NONE||r.hasBeenModified)&&r.renderAnnotationElement(e)}};Wc=new WeakMap,dr=new WeakMap,Ot=new WeakMap,rn=new WeakMap,qc=new WeakMap,Io=new WeakMap,Kc=new WeakMap,ti=new WeakMap,Ys=new WeakMap,Gc=new WeakMap,xl=new WeakMap,Bi=new WeakMap,ni=new WeakMap,Ol=new WeakMap,Jf=new WeakMap,e1=new WeakMap,Yc=new WeakMap,t1=new WeakMap,_i=new WeakMap,Qs=new WeakMap,Qc=new WeakMap,Xs=new WeakMap,Ri=new WeakMap,x3=new WeakMap,Js=new WeakMap,n1=new WeakMap,ea=new WeakMap,Dl=new WeakMap,r1=new WeakMap,i1=new WeakMap,Zt=new WeakMap,Ze=new WeakMap,xo=new WeakMap,Nl=new WeakMap,o1=new WeakMap,s1=new WeakMap,ta=new WeakMap,$i=new WeakMap,Oo=new WeakMap,a1=new WeakMap,Xc=new WeakSet,i5=function({anchorNode:e}){return e.nodeType===Node.TEXT_NODE?e.parentElement:e},l1=new WeakSet,gv=function(e){const{currentLayer:t}=this;if(t.hasTextLayer(e))return t;for(const r of g(this,rn).values())if(r.hasTextLayer(e))return r;return null},O3=new WeakSet,hN=function(){const e=document.getSelection();if(!e||e.isCollapsed)return;const t=I(this,Xc,i5).call(this,e).closest(".textLayer"),r=this.getSelectionBoxes(t);r&&(g(this,Ri)||A(this,Ri,new iZ(this)),g(this,Ri).show(t,r,this.direction==="ltr"))},D3=new WeakSet,pN=function(){var i,o,s;const e=document.getSelection();if(!e||e.isCollapsed){g(this,xo)&&((i=g(this,Ri))==null||i.hide(),A(this,xo,null),I(this,on,Bn).call(this,{hasSelectedText:!1}));return}const{anchorNode:t}=e;if(t===g(this,xo))return;const r=I(this,Xc,i5).call(this,e).closest(".textLayer");if(r){if((o=g(this,Ri))==null||o.hide(),A(this,xo,t),I(this,on,Bn).call(this,{hasSelectedText:!0}),(g(this,Zt)===xe.HIGHLIGHT||g(this,Zt)===xe.NONE)&&(g(this,Zt)===xe.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),A(this,Xs,this.isShiftKeyDown),!this.isShiftKeyDown)){const l=g(this,Zt)===xe.HIGHLIGHT?I(this,l1,gv).call(this,r):null;l==null||l.toggleDrawing();const c=new AbortController,d=this.combinedSignal(c),u=f=>{(f.type!=="pointerup"||f.button===0)&&(c.abort(),l==null||l.toggleDrawing(!0),f.type==="pointerup"&&I(this,Jc,o5).call(this,"main_toolbar"))};window.addEventListener("pointerup",u,{signal:d}),window.addEventListener("blur",u,{signal:d})}}else g(this,xo)&&((s=g(this,Ri))==null||s.hide(),A(this,xo,null),I(this,on,Bn).call(this,{hasSelectedText:!1}))},Jc=new WeakSet,o5=function(e=""){g(this,Zt)===xe.HIGHLIGHT?this.highlightSelection(e):g(this,Jf)&&I(this,O3,hN).call(this)},N3=new WeakSet,mN=function(){document.addEventListener("selectionchange",I(this,D3,pN).bind(this),{signal:this._signal})},P3=new WeakSet,gN=function(){if(g(this,Qs))return;A(this,Qs,new AbortController);const e=this.combinedSignal(g(this,Qs));window.addEventListener("focus",this.focus.bind(this),{signal:e}),window.addEventListener("blur",this.blur.bind(this),{signal:e})},L3=new WeakSet,yN=function(){var e;(e=g(this,Qs))==null||e.abort(),A(this,Qs,null)},c1=new WeakSet,yv=function(){if(g(this,ea))return;A(this,ea,new AbortController);const e=this.combinedSignal(g(this,ea));window.addEventListener("keydown",this.keydown.bind(this),{signal:e}),window.addEventListener("keyup",this.keyup.bind(this),{signal:e})},B3=new WeakSet,bN=function(){var e;(e=g(this,ea))==null||e.abort(),A(this,ea,null)},d1=new WeakSet,bv=function(){if(g(this,Ys))return;A(this,Ys,new AbortController);const e=this.combinedSignal(g(this,Ys));document.addEventListener("copy",this.copy.bind(this),{signal:e}),document.addEventListener("cut",this.cut.bind(this),{signal:e}),document.addEventListener("paste",this.paste.bind(this),{signal:e})},u1=new WeakSet,wv=function(){var e;(e=g(this,Ys))==null||e.abort(),A(this,Ys,null)},_3=new WeakSet,wN=function(){const e=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:e}),document.addEventListener("drop",this.drop.bind(this),{signal:e})},on=new WeakSet,Bn=function(e){Object.entries(e).some(([t,r])=>g(this,s1)[t]!==r)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(g(this,s1),e)}),g(this,Zt)===xe.HIGHLIGHT&&e.hasSelectedEditor===!1&&I(this,Vi,Oa).call(this,[[ye.HIGHLIGHT_FREE,!0]]))},Vi=new WeakSet,Oa=function(e){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:e})},R3=new WeakSet,vN=function(){if(!g(this,Js)){A(this,Js,!0);for(const e of g(this,rn).values())e.enable();for(const e of g(this,Ot).values())e.enable()}},$3=new WeakSet,CN=function(){if(this.unselectAll(),g(this,Js)){A(this,Js,!1);for(const e of g(this,rn).values())e.disable();for(const e of g(this,Ot).values())e.disable()}},f1=new WeakSet,vv=function(e){const t=g(this,rn).get(e.pageIndex);t?t.addOrRebuild(e):(this.addEditor(e),this.addToAnnotationStorage(e))},V3=new WeakSet,kN=function(){let e=null;for(e of g(this,Ze));return e},Pl=new WeakSet,Xh=function(){if(g(this,Ot).size===0)return!0;if(g(this,Ot).size===1)for(const e of g(this,Ot).values())return e.isEmpty();return!1},h1=new WeakSet,Cv=function(e){for(const t of g(this,Ze))t.unselect();g(this,Ze).clear();for(const t of e)t.isEmpty()||(g(this,Ze).add(t),t.select());I(this,on,Bn).call(this,{hasSelectedEditor:this.hasSelection})},be(ed,"TRANSLATE_SMALL",1),be(ed,"TRANSLATE_BIG",10);let Ya=ed;const _r=class _r{constructor(e){E(this,nd);E(this,rd);E(this,Wt,null);E(this,Fi,!1);E(this,ri,null);E(this,ji,null);E(this,ur,null);E(this,td,!1);E(this,zi,null);E(this,Yn,null);E(this,Do,null);E(this,Ll,null);E(this,Hi,!1);A(this,Yn,e),A(this,Hi,e._uiManager.useNewAltTextFlow)}static initialize(e){_r._l10nPromise||(_r._l10nPromise=e)}async render(){const e=A(this,ri,document.createElement("button"));e.className="altText";let t;g(this,Hi)?(e.classList.add("new"),t=await _r._l10nPromise.get("pdfjs-editor-new-alt-text-missing-button-label")):t=await _r._l10nPromise.get("pdfjs-editor-alt-text-button-label"),e.textContent=t,e.setAttribute("aria-label",t),e.tabIndex="0";const r=g(this,Yn)._uiManager._signal;e.addEventListener("contextmenu",kr,{signal:r}),e.addEventListener("pointerdown",o=>o.stopPropagation(),{signal:r});const i=o=>{o.preventDefault(),g(this,Yn)._uiManager.editAltText(g(this,Yn)),g(this,Hi)&&g(this,Yn)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:g(this,nd,s5)}})};return e.addEventListener("click",i,{capture:!0,signal:r}),e.addEventListener("keydown",o=>{o.target===e&&o.key==="Enter"&&(A(this,td,!0),i(o))},{signal:r}),await I(this,rd,a5).call(this),e}finish(){g(this,ri)&&(g(this,ri).focus({focusVisible:g(this,td)}),A(this,td,!1))}isEmpty(){return g(this,Hi)?g(this,Wt)===null:!g(this,Wt)&&!g(this,Fi)}hasData(){return g(this,Hi)?g(this,Wt)!==null||!!g(this,Do):this.isEmpty()}get guessedText(){return g(this,Do)}async setGuessedText(e){g(this,Wt)===null&&(A(this,Do,e),A(this,Ll,await _r._l10nPromise.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer")({generatedAltText:e})),I(this,rd,a5).call(this))}toggleAltTextBadge(e=!1){var t;if(g(this,Hi)&&!g(this,Wt)){if(!g(this,zi)){const r=A(this,zi,document.createElement("div"));r.className="noAltTextBadge",g(this,Yn).div.append(r)}g(this,zi).classList.toggle("hidden",!e)}else(t=g(this,zi))==null||t.remove(),A(this,zi,null)}serialize(e){let t=g(this,Wt);return e||g(this,Do)!==t||(t=g(this,Ll)),{altText:t,decorative:g(this,Fi),guessedText:g(this,Do),textWithDisclaimer:g(this,Ll)}}get data(){return{altText:g(this,Wt),decorative:g(this,Fi)}}set data({altText:e,decorative:t,guessedText:r,textWithDisclaimer:i,cancel:o=!1}){r&&(A(this,Do,r),A(this,Ll,i)),(g(this,Wt)!==e||g(this,Fi)!==t)&&(o||(A(this,Wt,e),A(this,Fi,t)),I(this,rd,a5).call(this))}toggle(e=!1){g(this,ri)&&(!e&&g(this,ur)&&(clearTimeout(g(this,ur)),A(this,ur,null)),g(this,ri).disabled=!e)}shown(){g(this,Yn)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:g(this,nd,s5)}})}destroy(){var e,t;(e=g(this,ri))==null||e.remove(),A(this,ri,null),A(this,ji,null),(t=g(this,zi))==null||t.remove(),A(this,zi,null)}};Wt=new WeakMap,Fi=new WeakMap,ri=new WeakMap,ji=new WeakMap,ur=new WeakMap,td=new WeakMap,zi=new WeakMap,Yn=new WeakMap,Do=new WeakMap,Ll=new WeakMap,Hi=new WeakMap,nd=new WeakSet,s5=function(){return(g(this,Wt)?"added":g(this,Wt)===null&&this.guessedText&&"review")||"missing"},rd=new WeakSet,a5=async function(){var i,o;const e=g(this,ri);if(!e)return;if(g(this,Hi)){const s=g(this,nd,s5),l=s==="review"?"to-review":s;if(e.classList.toggle("done",!!g(this,Wt)),_r._l10nPromise.get(`pdfjs-editor-new-alt-text-${l}-button-label`).then(c=>{e.setAttribute("aria-label",c);for(const d of e.childNodes)if(d.nodeType===Node.TEXT_NODE){d.textContent=c;break}}),!g(this,Wt)){(i=g(this,ji))==null||i.remove();return}}else{if(!g(this,Wt)&&!g(this,Fi)){e.classList.remove("done"),(o=g(this,ji))==null||o.remove();return}e.classList.add("done"),_r._l10nPromise.get("pdfjs-editor-alt-text-edit-button-label").then(s=>{e.setAttribute("aria-label",s)})}let t=g(this,ji);if(!t){A(this,ji,t=document.createElement("span")),t.className="tooltip",t.setAttribute("role","tooltip");const s=t.id=`alt-text-tooltip-${g(this,Yn).id}`;e.setAttribute("aria-describedby",s);const l=100,c=g(this,Yn)._uiManager._signal;c.addEventListener("abort",()=>{clearTimeout(g(this,ur)),A(this,ur,null)},{once:!0}),e.addEventListener("mouseenter",()=>{A(this,ur,setTimeout(()=>{A(this,ur,null),g(this,ji).classList.add("show"),g(this,Yn)._reportTelemetry({action:"alt_text_tooltip"})},l))},{signal:c}),e.addEventListener("mouseleave",()=>{var d;g(this,ur)&&(clearTimeout(g(this,ur)),A(this,ur,null)),(d=g(this,ji))==null||d.classList.remove("show")},{signal:c})}t.innerText=g(this,Fi)?await _r._l10nPromise.get("pdfjs-editor-alt-text-decorative-tooltip"):g(this,Wt),t.parentNode||e.append(t);const r=g(this,Yn).getImageForAltText();r==null||r.setAttribute("aria-describedby",t.id)},be(_r,"_l10nPromise",null);let pm=_r;const je=class je{constructor(e){E(this,y1);E(this,w1);E(this,j3);E(this,z3);E(this,v1);E(this,C1);E(this,k1);E(this,H3);E(this,S1);E(this,U3);E(this,Z3);E(this,W3);E(this,E1);E(this,Fl);E(this,Bl,null);E(this,ii,null);E(this,ct,null);E(this,id,!1);E(this,_l,!1);E(this,sn,null);E(this,Rl,null);E(this,na,null);E(this,p1,"");E(this,$l,!1);E(this,ra,null);E(this,m1,!1);E(this,Vl,!1);E(this,No,!1);E(this,Ui,null);E(this,od,0);E(this,sd,0);E(this,Rr,null);be(this,"_editToolbar",null);be(this,"_initialOptions",Object.create(null));be(this,"_isVisible",!0);be(this,"_uiManager",null);be(this,"_focusEventsAllowed",!0);E(this,g1,!1);E(this,F3,je._zIndex++);this.parent=e.parent,this.id=e.id,this.width=this.height=null,this.pageIndex=e.parent.pageIndex,this.name=e.name,this.div=null,this._uiManager=e.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=e.isCentered,this._structTreeParentId=null;const{rotation:t,rawDims:{pageWidth:r,pageHeight:i,pageX:o,pageY:s}}=this.parent.viewport;this.rotation=t,this.pageRotation=(360+t-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[r,i],this.pageTranslation=[o,s];const[l,c]=this.parentDimensions;this.x=e.x/l,this.y=e.y/c,this.isAttachedToDOM=!1,this.deleted=!1}static get _resizerKeyboardManager(){const e=je.prototype._resizeWithKeyboard,t=Ya.TRANSLATE_SMALL,r=Ya.TRANSLATE_BIG;return De(this,"_resizerKeyboardManager",new p2([[["ArrowLeft","mac+ArrowLeft"],e,{args:[-t,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e,{args:[-r,0]}],[["ArrowRight","mac+ArrowRight"],e,{args:[t,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e,{args:[r,0]}],[["ArrowUp","mac+ArrowUp"],e,{args:[0,-t]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e,{args:[0,-r]}],[["ArrowDown","mac+ArrowDown"],e,{args:[0,t]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e,{args:[0,r]}],[["Escape","mac+Escape"],je.prototype._stopResizingWithKeyboard]]))}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return De(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(e){const t=new aZ({id:e.parent.getNextId(),parent:e.parent,uiManager:e._uiManager});t.annotationElementId=e.annotationElementId,t.deleted=!0,t._uiManager.addToAnnotationStorage(t)}static initialize(e,t,r){if(je._l10nResizer||(je._l10nResizer=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"})),je._l10nPromise||(je._l10nPromise=new Map([...["pdfjs-editor-alt-text-button-label","pdfjs-editor-alt-text-edit-button-label","pdfjs-editor-alt-text-decorative-tooltip","pdfjs-editor-new-alt-text-added-button-label","pdfjs-editor-new-alt-text-missing-button-label","pdfjs-editor-new-alt-text-to-review-button-label"].map(o=>[o,e.get(o)]),...["pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer"].map(o=>[o,e.get.bind(e,o)])])),r!=null&&r.strings)for(const o of r.strings)je._l10nPromise.set(o,e.get(o));if(je._borderLineWidth!==-1)return;const i=getComputedStyle(document.documentElement);je._borderLineWidth=parseFloat(i.getPropertyValue("--outline-width"))||0}static updateDefaultParams(e,t){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(e){return!1}static paste(e,t){Mt("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return g(this,g1)}set _isDraggable(e){var t;A(this,g1,e),(t=this.div)==null||t.classList.toggle("draggable",e)}get isEnterHandled(){return!0}center(){const[e,t]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*t/(2*e),this.y+=this.width*e/(2*t);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*t/(2*e),this.y-=this.width*e/(2*t);break;default:this.x-=this.width/2,this.y-=this.height/2}this.fixAndSetPosition()}addCommands(e){this._uiManager.addCommands(e)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=g(this,F3)}setParent(e){e!==null?(this.pageIndex=e.pageIndex,this.pageDimensions=e.pageDimensions):I(this,Fl,Jh).call(this),this.parent=e}focusin(e){this._focusEventsAllowed&&(g(this,$l)?A(this,$l,!1):this.parent.setSelected(this))}focusout(e){var r;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const t=e.relatedTarget;t!=null&&t.closest(`#${this.id}`)||(e.preventDefault(),(r=this.parent)!=null&&r.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(e,t,r,i){const[o,s]=this.parentDimensions;[r,i]=this.screenToPageTranslation(r,i),this.x=(e+r)/o,this.y=(t+i)/s,this.fixAndSetPosition()}translate(e,t){I(this,y1,kv).call(this,this.parentDimensions,e,t)}translateInPage(e,t){g(this,ra)||A(this,ra,[this.x,this.y]),I(this,y1,kv).call(this,this.pageDimensions,e,t),this.div.scrollIntoView({block:"nearest"})}drag(e,t){g(this,ra)||A(this,ra,[this.x,this.y]);const[r,i]=this.parentDimensions;if(this.x+=e/r,this.y+=t/i,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:d,y:u}=this.div.getBoundingClientRect();this.parent.findNewParent(this,d,u)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:o,y:s}=this;const[l,c]=this.getBaseTranslation();o+=l,s+=c,this.div.style.left=`${(100*o).toFixed(2)}%`,this.div.style.top=`${(100*s).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}get _hasBeenMoved(){return!!g(this,ra)&&(g(this,ra)[0]!==this.x||g(this,ra)[1]!==this.y)}getBaseTranslation(){const[e,t]=this.parentDimensions,{_borderLineWidth:r}=je,i=r/e,o=r/t;switch(this.rotation){case 90:return[-i,o];case 180:return[i,o];case 270:return[i,-o];default:return[-i,-o]}}get _mustFixPosition(){return!0}fixAndSetPosition(e=this.rotation){const[t,r]=this.pageDimensions;let{x:i,y:o,width:s,height:l}=this;if(s*=t,l*=r,i*=t,o*=r,this._mustFixPosition)switch(e){case 0:i=Math.max(0,Math.min(t-s,i)),o=Math.max(0,Math.min(r-l,o));break;case 90:i=Math.max(0,Math.min(t-l,i)),o=Math.min(r,Math.max(s,o));break;case 180:i=Math.min(t,Math.max(s,i)),o=Math.min(r,Math.max(l,o));break;case 270:i=Math.min(t,Math.max(l,i)),o=Math.max(0,Math.min(r-s,o))}this.x=i/=t,this.y=o/=r;const[c,d]=this.getBaseTranslation();i+=c,o+=d;const{style:u}=this.div;u.left=`${(100*i).toFixed(2)}%`,u.top=`${(100*o).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(e,t){var r;return I(r=je,b1,Sv).call(r,e,t,this.parentRotation)}pageTranslationToScreen(e,t){var r;return I(r=je,b1,Sv).call(r,e,t,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:e,pageDimensions:[t,r]}=this,i=t*e,o=r*e;return jn.isCSSRoundSupported?[Math.round(i),Math.round(o)]:[i,o]}setDims(e,t){const[r,i]=this.parentDimensions;this.div.style.width=`${(100*e/r).toFixed(2)}%`,g(this,_l)||(this.div.style.height=`${(100*t/i).toFixed(2)}%`)}fixDims(){const{style:e}=this.div,{height:t,width:r}=e,i=r.endsWith("%"),o=!g(this,_l)&&t.endsWith("%");if(i&&o)return;const[s,l]=this.parentDimensions;i||(e.width=`${(100*parseFloat(r)/s).toFixed(2)}%`),g(this,_l)||o||(e.height=`${(100*parseFloat(t)/l).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}altTextFinish(){var e;(e=g(this,ct))==null||e.finish()}async addEditToolbar(){return this._editToolbar||g(this,Vl)?this._editToolbar:(this._editToolbar=new _b(this),this.div.append(this._editToolbar.render()),g(this,ct)&&await this._editToolbar.addAltText(g(this,ct)),this._editToolbar)}removeEditToolbar(){var e;this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,(e=g(this,ct))==null||e.destroy())}getClientDimensions(){return this.div.getBoundingClientRect()}async addAltTextButton(){g(this,ct)||(pm.initialize(je._l10nPromise),A(this,ct,new pm(this)),g(this,Bl)&&(g(this,ct).data=g(this,Bl),A(this,Bl,null)),await this.addEditToolbar())}get altTextData(){var e;return(e=g(this,ct))==null?void 0:e.data}set altTextData(e){g(this,ct)&&(g(this,ct).data=e)}get guessedAltText(){var e;return(e=g(this,ct))==null?void 0:e.guessedText}async setGuessedAltText(e){var t;await((t=g(this,ct))==null?void 0:t.setGuessedText(e))}serializeAltText(e){var t;return(t=g(this,ct))==null?void 0:t.serialize(e)}hasAltText(){return!!g(this,ct)&&!g(this,ct).isEmpty()}hasAltTextData(){var e;return((e=g(this,ct))==null?void 0:e.hasData())??!1}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.tabIndex=g(this,id)?-1:0,this._isVisible||this.div.classList.add("hidden"),this.setInForeground(),I(this,S1,Iv).call(this);const[e,t]=this.parentDimensions;this.parentRotation%180!=0&&(this.div.style.maxWidth=`${(100*t/e).toFixed(2)}%`,this.div.style.maxHeight=`${(100*e/t).toFixed(2)}%`);const[r,i]=this.getInitialTranslation();return this.translate(r,i),hm(this,this.div,["pointerdown"]),this.div}pointerdown(e){const{isMac:t}=jn.platform;e.button!==0||e.ctrlKey&&t?e.preventDefault():(A(this,$l,!0),this._isDraggable?I(this,H3,MN).call(this,e):I(this,k1,Tv).call(this,e))}moveInDOM(){g(this,Ui)&&clearTimeout(g(this,Ui)),A(this,Ui,setTimeout(()=>{var e;A(this,Ui,null),(e=this.parent)==null||e.moveEditorInDOM(this)},0))}_setParentAndPosition(e,t,r){e.changeParent(this),this.x=t,this.y=r,this.fixAndSetPosition()}getRect(e,t,r=this.rotation){const i=this.parentScale,[o,s]=this.pageDimensions,[l,c]=this.pageTranslation,d=e/i,u=t/i,f=this.x*o,h=this.y*s,p=this.width*o,m=this.height*s;switch(r){case 0:return[f+d+l,s-h-u-m+c,f+d+p+l,s-h-u+c];case 90:return[f+u+l,s-h+d+c,f+u+m+l,s-h+d+p+c];case 180:return[f-d-p+l,s-h+u+c,f-d+l,s-h+u+m+c];case 270:return[f-u-m+l,s-h-d-p+c,f-u+l,s-h-d+c];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(e,t){const[r,i,o,s]=e,l=o-r,c=s-i;switch(this.rotation){case 0:return[r,t-s,l,c];case 90:return[r,t-i,c,l];case 180:return[o,t-i,l,c];case 270:return[o,t-s,c,l];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){A(this,Vl,!0)}disableEditMode(){A(this,Vl,!1)}isInEditMode(){return g(this,Vl)}shouldGetKeyboardEvents(){return g(this,No)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){I(this,S1,Iv).call(this)}rotate(e){}serialize(e=!1,t=null){Mt("An editor must be serializable")}static deserialize(e,t,r){const i=new this.prototype.constructor({parent:t,id:t.getNextId(),uiManager:r});i.rotation=e.rotation,A(i,Bl,e.accessibilityData);const[o,s]=i.pageDimensions,[l,c,d,u]=i.getRectInCurrentCoords(e.rect,s);return i.x=l/o,i.y=c/s,i.width=d/o,i.height=u/s,i}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){var e;if((e=g(this,na))==null||e.abort(),A(this,na,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),g(this,Ui)&&(clearTimeout(g(this,Ui)),A(this,Ui,null)),I(this,Fl,Jh).call(this),this.removeEditToolbar(),g(this,Rr)){for(const t of g(this,Rr).values())clearTimeout(t);A(this,Rr,null)}this.parent=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(I(this,j3,SN).call(this),g(this,sn).classList.remove("hidden"),hm(this,this.div,["keydown"]))}get toolbarPosition(){return null}keydown(e){if(!this.isResizable||e.target!==this.div||e.key!=="Enter")return;this._uiManager.setSelected(this),A(this,Rl,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const t=g(this,sn).children;if(!g(this,ii)){A(this,ii,Array.from(t));const s=I(this,U3,AN).bind(this),l=I(this,Z3,TN).bind(this),c=this._uiManager._signal;for(const d of g(this,ii)){const u=d.getAttribute("data-resizer-name");d.setAttribute("role","spinbutton"),d.addEventListener("keydown",s,{signal:c}),d.addEventListener("blur",l,{signal:c}),d.addEventListener("focus",I(this,W3,IN).bind(this,u),{signal:c}),d.setAttribute("data-l10n-id",je._l10nResizer[u])}}const r=g(this,ii)[0];let i=0;for(const s of t){if(s===r)break;i++}const o=(360-this.rotation+this.parentRotation)%360/90*(g(this,ii).length/4);if(o!==i){if(o<i)for(let l=0;l<i-o;l++)g(this,sn).append(g(this,sn).firstChild);else if(o>i)for(let l=0;l<o-i;l++)g(this,sn).firstChild.before(g(this,sn).lastChild);let s=0;for(const l of t){const c=g(this,ii)[s++].getAttribute("data-resizer-name");l.setAttribute("data-l10n-id",je._l10nResizer[c])}}I(this,E1,xv).call(this,0),A(this,No,!0),g(this,sn).firstChild.focus({focusVisible:!0}),e.preventDefault(),e.stopImmediatePropagation()}_resizeWithKeyboard(e,t){g(this,No)&&I(this,C1,Av).call(this,g(this,p1),{movementX:e,movementY:t})}_stopResizingWithKeyboard(){I(this,Fl,Jh).call(this),this.div.focus()}select(){var e,t,r;this.makeResizable(),(e=this.div)==null||e.classList.add("selectedEditor"),this._editToolbar?((t=this._editToolbar)==null||t.show(),(r=g(this,ct))==null||r.toggleAltTextBadge(!1)):this.addEditToolbar().then(()=>{var i,o;(i=this.div)!=null&&i.classList.contains("selectedEditor")&&((o=this._editToolbar)==null||o.show())})}unselect(){var e,t,r,i,o;(e=g(this,sn))==null||e.classList.add("hidden"),(t=this.div)==null||t.classList.remove("selectedEditor"),(r=this.div)!=null&&r.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),(i=this._editToolbar)==null||i.hide(),(o=g(this,ct))==null||o.toggleAltTextBadge(!0)}updateParams(e,t){}disableEditing(){}enableEditing(){}enterInEditMode(){}getImageForAltText(){return null}get contentDiv(){return this.div}get isEditing(){return g(this,m1)}set isEditing(e){A(this,m1,e),this.parent&&(e?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(e,t){A(this,_l,!0);const r=e/t,{style:i}=this.div;i.aspectRatio=r,i.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(e,t=!1){if(t){g(this,Rr)||A(this,Rr,new Map);const{action:r}=e;let i=g(this,Rr).get(r);i&&clearTimeout(i),i=setTimeout(()=>{this._reportTelemetry(e),g(this,Rr).delete(r),g(this,Rr).size===0&&A(this,Rr,null)},je._telemetryTimeout),g(this,Rr).set(r,i)}else e.type||(e.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:e}})}show(e=this._isVisible){this.div.classList.toggle("hidden",!e),this._isVisible=e}enable(){this.div&&(this.div.tabIndex=0),A(this,id,!1)}disable(){this.div&&(this.div.tabIndex=-1),A(this,id,!0)}renderAnnotationElement(e){let t=e.container.querySelector(".annotationContent");if(t){if(t.nodeName==="CANVAS"){const r=t;t=document.createElement("div"),t.classList.add("annotationContent",this.editorType),r.before(t)}}else t=document.createElement("div"),t.classList.add("annotationContent",this.editorType),e.container.prepend(t);return t}resetAnnotationElement(e){const{firstChild:t}=e.container;t.nodeName==="DIV"&&t.classList.contains("annotationContent")&&t.remove()}};Bl=new WeakMap,ii=new WeakMap,ct=new WeakMap,id=new WeakMap,_l=new WeakMap,sn=new WeakMap,Rl=new WeakMap,na=new WeakMap,p1=new WeakMap,$l=new WeakMap,ra=new WeakMap,m1=new WeakMap,Vl=new WeakMap,No=new WeakMap,Ui=new WeakMap,od=new WeakMap,sd=new WeakMap,Rr=new WeakMap,g1=new WeakMap,F3=new WeakMap,y1=new WeakSet,kv=function([e,t],r,i){[r,i]=this.screenToPageTranslation(r,i),this.x+=r/e,this.y+=i/t,this.fixAndSetPosition()},b1=new WeakSet,Sv=function(e,t,r){switch(r){case 90:return[t,-e];case 180:return[-e,-t];case 270:return[-t,e];default:return[e,t]}},w1=new WeakSet,Ev=function(e){switch(e){case 90:{const[t,r]=this.pageDimensions;return[0,-t/r,r/t,0]}case 180:return[-1,0,0,-1];case 270:{const[t,r]=this.pageDimensions;return[0,t/r,-r/t,0]}default:return[1,0,0,1]}},j3=new WeakSet,SN=function(){if(g(this,sn))return;A(this,sn,document.createElement("div")),g(this,sn).classList.add("resizers");const e=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],t=this._uiManager._signal;for(const r of e){const i=document.createElement("div");g(this,sn).append(i),i.classList.add("resizer",r),i.setAttribute("data-resizer-name",r),i.addEventListener("pointerdown",I(this,z3,EN).bind(this,r),{signal:t}),i.addEventListener("contextmenu",kr,{signal:t}),i.tabIndex=-1}this.div.prepend(g(this,sn))},z3=new WeakSet,EN=function(e,t){var m;t.preventDefault();const{isMac:r}=jn.platform;if(t.button!==0||t.ctrlKey&&r)return;(m=g(this,ct))==null||m.toggle(!1);const i=this._isDraggable;this._isDraggable=!1;const o=new AbortController,s=this._uiManager.combinedSignal(o);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",I(this,C1,Av).bind(this,e),{passive:!0,capture:!0,signal:s}),window.addEventListener("contextmenu",kr,{signal:s});const l=this.x,c=this.y,d=this.width,u=this.height,f=this.parent.div.style.cursor,h=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(t.target).cursor;const p=()=>{var y;o.abort(),this.parent.togglePointerEvents(!0),(y=g(this,ct))==null||y.toggle(!0),this._isDraggable=i,this.parent.div.style.cursor=f,this.div.style.cursor=h,I(this,v1,Mv).call(this,l,c,d,u)};window.addEventListener("pointerup",p,{signal:s}),window.addEventListener("blur",p,{signal:s})},v1=new WeakSet,Mv=function(e,t,r,i){const o=this.x,s=this.y,l=this.width,c=this.height;o===e&&s===t&&l===r&&c===i||this.addCommands({cmd:()=>{this.width=l,this.height=c,this.x=o,this.y=s;const[d,u]=this.parentDimensions;this.setDims(d*l,u*c),this.fixAndSetPosition()},undo:()=>{this.width=r,this.height=i,this.x=e,this.y=t;const[d,u]=this.parentDimensions;this.setDims(d*r,u*i),this.fixAndSetPosition()},mustExec:!0})},C1=new WeakSet,Av=function(e,t){const[r,i]=this.parentDimensions,o=this.x,s=this.y,l=this.width,c=this.height,d=je.MIN_SIZE/r,u=je.MIN_SIZE/i,f=F=>Math.round(1e4*F)/1e4,h=I(this,w1,Ev).call(this,this.rotation),p=(F,R)=>[h[0]*F+h[2]*R,h[1]*F+h[3]*R],m=I(this,w1,Ev).call(this,360-this.rotation);let y,b,w=!1,v=!1;switch(e){case"topLeft":w=!0,y=(F,R)=>[0,0],b=(F,R)=>[F,R];break;case"topMiddle":y=(F,R)=>[F/2,0],b=(F,R)=>[F/2,R];break;case"topRight":w=!0,y=(F,R)=>[F,0],b=(F,R)=>[0,R];break;case"middleRight":v=!0,y=(F,R)=>[F,R/2],b=(F,R)=>[0,R/2];break;case"bottomRight":w=!0,y=(F,R)=>[F,R],b=(F,R)=>[0,0];break;case"bottomMiddle":y=(F,R)=>[F/2,R],b=(F,R)=>[F/2,0];break;case"bottomLeft":w=!0,y=(F,R)=>[0,R],b=(F,R)=>[F,0];break;case"middleLeft":v=!0,y=(F,R)=>[0,R/2],b=(F,R)=>[F,R/2]}const k=y(l,c),C=b(l,c);let T=p(...C);const S=f(o+T[0]),M=f(s+T[1]);let x=1,O=1,[P,N]=this.screenToPageTranslation(t.movementX,t.movementY);[P,N]=(_=P/r,V=N/i,[m[0]*_+m[2]*V,m[1]*_+m[3]*V]);var _,V;if(w){const F=Math.hypot(l,c);x=O=Math.max(Math.min(Math.hypot(C[0]-k[0]-P,C[1]-k[1]-N)/F,1/l,1/c),d/l,u/c)}else v?x=Math.max(d,Math.min(1,Math.abs(C[0]-k[0]-P)))/l:O=Math.max(u,Math.min(1,Math.abs(C[1]-k[1]-N)))/c;const H=f(l*x),L=f(c*O);T=p(...b(H,L));const D=S-T[0],U=M-T[1];this.width=H,this.height=L,this.x=D,this.y=U,this.setDims(r*H,i*L),this.fixAndSetPosition()},k1=new WeakSet,Tv=function(e){const{isMac:t}=jn.platform;e.ctrlKey&&!t||e.shiftKey||e.metaKey&&t?this.parent.toggleSelected(this):this.parent.setSelected(this)},H3=new WeakSet,MN=function(e){const t=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();const r=new AbortController,i=this._uiManager.combinedSignal(r);if(t){this.div.classList.add("moving"),A(this,od,e.clientX),A(this,sd,e.clientY);const s=l=>{const{clientX:c,clientY:d}=l,[u,f]=this.screenToPageTranslation(c-g(this,od),d-g(this,sd));A(this,od,c),A(this,sd,d),this._uiManager.dragSelectedEditors(u,f)};window.addEventListener("pointermove",s,{passive:!0,capture:!0,signal:i})}const o=()=>{r.abort(),t&&this.div.classList.remove("moving"),A(this,$l,!1),this._uiManager.endDragSession()||I(this,k1,Tv).call(this,e)};window.addEventListener("pointerup",o,{signal:i}),window.addEventListener("blur",o,{signal:i})},S1=new WeakSet,Iv=function(){if(g(this,na)||!this.div)return;A(this,na,new AbortController);const e=this._uiManager.combinedSignal(g(this,na));this.div.addEventListener("focusin",this.focusin.bind(this),{signal:e}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:e})},U3=new WeakSet,AN=function(e){je._resizerKeyboardManager.exec(this,e)},Z3=new WeakSet,TN=function(e){var t;g(this,No)&&((t=e.relatedTarget)==null?void 0:t.parentNode)!==g(this,sn)&&I(this,Fl,Jh).call(this)},W3=new WeakSet,IN=function(e){A(this,p1,g(this,No)?e:"")},E1=new WeakSet,xv=function(e){if(g(this,ii))for(const t of g(this,ii))t.tabIndex=e},Fl=new WeakSet,Jh=function(){if(A(this,No,!1),I(this,E1,xv).call(this,-1),g(this,Rl)){const{savedX:e,savedY:t,savedWidth:r,savedHeight:i}=g(this,Rl);I(this,v1,Mv).call(this,e,t,r,i),A(this,Rl,null)}},E(je,b1),be(je,"_l10nPromise",null),be(je,"_l10nResizer",null),be(je,"_borderLineWidth",-1),be(je,"_colorManager",new $b),be(je,"_zIndex",1),be(je,"_telemetryTimeout",1e3);let He=je;class aZ extends He{constructor(e){super(e),this.annotationElementId=e.annotationElementId,this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}const TE=3285377520,Sr=4294901760,gs=65535;class IE{constructor(e){this.h1=e?4294967295&e:TE,this.h2=e?4294967295&e:TE}update(e){let t,r;if(typeof e=="string"){t=new Uint8Array(2*e.length),r=0;for(let y=0,b=e.length;y<b;y++){const w=e.charCodeAt(y);w<=255?t[r++]=w:(t[r++]=w>>>8,t[r++]=255&w)}}else{if(!ArrayBuffer.isView(e))throw new Error("Invalid data format, must be a string or TypedArray.");t=e.slice(),r=t.byteLength}const i=r>>2,o=r-4*i,s=new Uint32Array(t.buffer,0,i);let l=0,c=0,d=this.h1,u=this.h2;const f=3432918353,h=461845907,p=11601,m=13715;for(let y=0;y<i;y++)1&y?(l=s[y],l=l*f&Sr|l*p&gs,l=l<<15|l>>>17,l=l*h&Sr|l*m&gs,d^=l,d=d<<13|d>>>19,d=5*d+3864292196):(c=s[y],c=c*f&Sr|c*p&gs,c=c<<15|c>>>17,c=c*h&Sr|c*m&gs,u^=c,u=u<<13|u>>>19,u=5*u+3864292196);switch(l=0,o){case 3:l^=t[4*i+2]<<16;case 2:l^=t[4*i+1]<<8;case 1:l^=t[4*i],l=l*f&Sr|l*p&gs,l=l<<15|l>>>17,l=l*h&Sr|l*m&gs,1&i?d^=l:u^=l}this.h1=d,this.h2=u}hexdigest(){let e=this.h1,t=this.h2;return e^=t>>>1,e=3981806797*e&Sr|36045*e&gs,t=4283543511*t&Sr|(2950163797*(t<<16|e>>>16)&Sr)>>>16,e^=t>>>1,e=444984403*e&Sr|60499*e&gs,t=3301882366*t&Sr|(3120437893*(t<<16|e>>>16)&Sr)>>>16,e^=t>>>1,(e>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}const Vb=Object.freeze({map:null,hash:"",transfer:void 0});class Fb{constructor(){E(this,q3);E(this,jl,!1);E(this,zl,null);E(this,qt,new Map);this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(e,t){const r=g(this,qt).get(e);return r===void 0?t:Object.assign(t,r)}getRawValue(e){return g(this,qt).get(e)}remove(e){if(g(this,qt).delete(e),g(this,qt).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const t of g(this,qt).values())if(t instanceof He)return;this.onAnnotationEditor(null)}}setValue(e,t){const r=g(this,qt).get(e);let i=!1;if(r!==void 0)for(const[o,s]of Object.entries(t))r[o]!==s&&(i=!0,r[o]=s);else i=!0,g(this,qt).set(e,t);i&&I(this,q3,xN).call(this),t instanceof He&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(t.constructor._type)}has(e){return g(this,qt).has(e)}getAll(){return g(this,qt).size>0?xb(g(this,qt)):null}setAll(e){for(const[t,r]of Object.entries(e))this.setValue(t,r)}get size(){return g(this,qt).size}resetModified(){g(this,jl)&&(A(this,jl,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new xE(this)}get serializable(){if(g(this,qt).size===0)return Vb;const e=new Map,t=new IE,r=[],i=Object.create(null);let o=!1;for(const[s,l]of g(this,qt)){const c=l instanceof He?l.serialize(!1,i):l;c&&(e.set(s,c),t.update(`${s}:${JSON.stringify(c)}`),o||(o=!!c.bitmap))}if(o)for(const s of e.values())s.bitmap&&r.push(s.bitmap);return e.size>0?{map:e,hash:t.hexdigest(),transfer:r}:Vb}get editorStats(){let e=null;const t=new Map;for(const r of g(this,qt).values()){if(!(r instanceof He))continue;const i=r.telemetryFinalData;if(!i)continue;const{type:o}=i;t.has(o)||t.set(o,Object.getPrototypeOf(r).constructor),e||(e=Object.create(null));const s=e[o]||(e[o]=new Map);for(const[l,c]of Object.entries(i)){if(l==="type")continue;let d=s.get(l);d||(d=new Map,s.set(l,d));const u=d.get(c)??0;d.set(c,u+1)}}for(const[r,i]of t)e[r]=i.computeTelemetryFinalData(e[r]);return e}resetModifiedIds(){A(this,zl,null)}get modifiedIds(){if(g(this,zl))return g(this,zl);const e=[];for(const t of g(this,qt).values())t instanceof He&&t.annotationElementId&&t.serialize()&&e.push(t.annotationElementId);return A(this,zl,{ids:new Set(e),hash:e.join(",")})}}jl=new WeakMap,zl=new WeakMap,qt=new WeakMap,q3=new WeakSet,xN=function(){g(this,jl)||(A(this,jl,!0),typeof this.onSetModified=="function"&&this.onSetModified())};class xE extends Fb{constructor(t){super();E(this,M1,void 0);const{map:r,hash:i,transfer:o}=t.serializable,s=structuredClone(r,o?{transfer:o}:null);A(this,M1,{map:s,hash:i,transfer:o})}get print(){Mt("Should not call PrintAnnotationStorage.print")}get serializable(){return g(this,M1)}get modifiedIds(){return De(this,"modifiedIds",{ids:new Set,hash:""})}}M1=new WeakMap;class lZ{constructor({ownerDocument:e=globalThis.document,styleElement:t=null}){E(this,ad,new Set);this._document=e,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e){this.nativeFontFaces.add(e),this._document.fonts.add(e)}removeNativeFontFace(e){this.nativeFontFaces.delete(e),this._document.fonts.delete(e)}insertRule(e){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const t=this.styleElement.sheet;t.insertRule(e,t.cssRules.length)}clear(){for(const e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.clear(),g(this,ad).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:e,_inspectFont:t}){if(e&&!g(this,ad).has(e.loadedName))if(xt(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:r,src:i,style:o}=e,s=new FontFace(r,i,o);this.addNativeFontFace(s);try{await s.load(),g(this,ad).add(r),t==null||t(e)}catch{Ee(`Cannot load system font: ${e.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(s)}}else Mt("Not implemented: loadSystemFont without the Font Loading API.")}async bind(e){if(e.attached||e.missingFile&&!e.systemFontInfo)return;if(e.attached=!0,e.systemFontInfo){await this.loadSystemFont(e);return}if(this.isFontLoadingAPISupported){const r=e.createNativeFontFace();if(r){this.addNativeFontFace(r);try{await r.loaded}catch(i){throw Ee(`Failed to load font '${r.family}': '${i}'.`),e.disableFontFace=!0,i}}return}const t=e.createFontFaceRule();if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return;await new Promise(r=>{const i=this._queueLoadingCallback(r);this._prepareFontLoadEvent(e,i)})}}get isFontLoadingAPISupported(){var e;return De(this,"isFontLoadingAPISupported",!!((e=this._document)!=null&&e.fonts))}get isSyncFontLoadingSupported(){let e=!1;return(mn||typeof navigator<"u"&&typeof(navigator==null?void 0:navigator.userAgent)=="string"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(e=!0),De(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){const{loadingRequests:t}=this,r={done:!1,complete:function(){for(xt(!r.done,"completeRequest() cannot be called twice."),r.done=!0;t.length>0&&t[0].done;){const o=t.shift();setTimeout(o.callback,0)}},callback:e};return t.push(r),r}get _loadTestFont(){return De(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(e,t){function r(b,w){return b.charCodeAt(w)<<24|b.charCodeAt(w+1)<<16|b.charCodeAt(w+2)<<8|255&b.charCodeAt(w+3)}function i(b,w,v,k){return b.substring(0,w)+k+b.substring(w+v)}let o,s;const l=this._document.createElement("canvas");l.width=1,l.height=1;const c=l.getContext("2d");let d=0;const u=`lt${Date.now()}${this.loadTestFontId++}`;let f=this._loadTestFont;f=i(f,976,u.length,u);const h=1482184792;let p=r(f,16);for(o=0,s=u.length-3;o<s;o+=4)p=p-h+r(u,o)|0;o<u.length&&(p=p-h+r(u+"XXX",o)|0),f=i(f,16,4,function(w){return String.fromCharCode(w>>24&255,w>>16&255,w>>8&255,255&w)}(p));const m=`@font-face {font-family:"${u}";src:${`url(data:font/opentype;base64,${btoa(f)});`}}`;this.insertRule(m);const y=this._document.createElement("div");y.style.visibility="hidden",y.style.width=y.style.height="10px",y.style.position="absolute",y.style.top=y.style.left="0px";for(const b of[e.loadedName,u]){const w=this._document.createElement("span");w.textContent="Hi",w.style.fontFamily=b,y.append(w)}this._document.body.append(y),function b(w,v){if(++d>30){Ee("Load test font never loaded."),v();return}c.font="30px "+w,c.fillText(".",0,20),c.getImageData(0,0,1,1).data[3]>0?v():setTimeout(b.bind(null,w,v))}(u,()=>{y.remove(),t.complete()})}}ad=new WeakMap;class cZ{constructor(e,{disableFontFace:t=!1,inspectFont:r=null}){this.compiledGlyphs=Object.create(null);for(const i in e)this[i]=e[i];this.disableFontFace=t===!0,this._inspectFont=r}createNativeFontFace(){var t;if(!this.data||this.disableFontFace)return null;let e;if(this.cssFontInfo){const r={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(r.style=`oblique ${this.cssFontInfo.italicAngle}deg`),e=new FontFace(this.cssFontInfo.fontFamily,this.data,r)}else e=new FontFace(this.loadedName,this.data,{});return(t=this._inspectFont)==null||t.call(this,this),e}createFontFaceRule(){var i;if(!this.data||this.disableFontFace)return null;const e=mE(this.data),t=`url(data:${this.mimetype};base64,${btoa(e)});`;let r;if(this.cssFontInfo){let o=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(o+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),r=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${o}src:${t}}`}else r=`@font-face {font-family:"${this.loadedName}";src:${t}}`;return(i=this._inspectFont)==null||i.call(this,this,t),r}getPathGenerator(e,t){if(this.compiledGlyphs[t]!==void 0)return this.compiledGlyphs[t];let r;try{r=e.get(this.loadedName+"_path_"+t)}catch(o){Ee(`getPathGenerator - ignoring character: "${o}".`)}if(!Array.isArray(r)||r.length===0)return this.compiledGlyphs[t]=function(o,s){};const i=[];for(let o=0,s=r.length;o<s;)switch(r[o++]){case ZU:{const[l,c,d,u,f,h]=r.slice(o,o+6);i.push(p=>p.bezierCurveTo(l,c,d,u,f,h)),o+=6}break;case WU:{const[l,c]=r.slice(o,o+2);i.push(d=>d.moveTo(l,c)),o+=2}break;case qU:{const[l,c]=r.slice(o,o+2);i.push(d=>d.lineTo(l,c)),o+=2}break;case KU:{const[l,c,d,u]=r.slice(o,o+4);i.push(f=>f.quadraticCurveTo(l,c,d,u)),o+=4}break;case GU:i.push(l=>l.restore());break;case YU:i.push(l=>l.save());break;case QU:xt(i.length===2,"Scale command is only valid at the third position.");break;case XU:{const[l,c,d,u,f,h]=r.slice(o,o+6);i.push(p=>p.transform(l,c,d,u,f,h)),o+=6}break;case JU:{const[l,c]=r.slice(o,o+2);i.push(d=>d.translate(l,c)),o+=2}}return this.compiledGlyphs[t]=function(s,l){i[0](s),i[1](s),s.scale(l,-l);for(let c=2,d=i.length;c<d;c++)i[c](s)}}}if(mn){var jb=Promise.withResolvers(),m2=null;(async()=>{const n=await Promise.resolve().then(()=>jf),e=await Promise.resolve().then(()=>jf),t=await Promise.resolve().then(()=>jf),r=await Promise.resolve().then(()=>jf);let i,o;try{i=await Promise.resolve().then(()=>jf)}catch{}try{o=await Promise.resolve().then(()=>l1e)}catch{}return new Map(Object.entries({fs:n,http:e,https:t,url:r,canvas:i,path2d:o}))})().then(n=>{var e,t,r,i;if(m2=n,jb.resolve(),!globalThis.DOMMatrix){const o=(e=n.get("canvas"))==null?void 0:e.DOMMatrix;o?globalThis.DOMMatrix=o:Ee("Cannot polyfill `DOMMatrix`, rendering may be broken.")}if(!globalThis.Path2D){const o=(t=n.get("canvas"))==null?void 0:t.CanvasRenderingContext2D,s=(r=n.get("path2d"))==null?void 0:r.applyPath2DToCanvasRenderingContext,l=(i=n.get("path2d"))==null?void 0:i.Path2D;o&&s&&l?(s(o),globalThis.Path2D=l):Ee("Cannot polyfill `Path2D`, rendering may be broken.")}},n=>{Ee(`loadPackages: ${n}`),m2=new Map,jb.resolve()})}class ys{static get promise(){return jb.promise}static get(e){return m2==null?void 0:m2.get(e)}}const OE=function(n){return ys.get("fs").promises.readFile(n).then(e=>new Uint8Array(e))},Qa="Fill",zb="Stroke",g2="Shading";function Hb(n,e){if(!e)return;const t=e[2]-e[0],r=e[3]-e[1],i=new Path2D;i.rect(e[0],e[1],t,r),n.clip(i)}class Ub{getPattern(){Mt("Abstract method `getPattern` called.")}}class dZ extends Ub{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}_createGradient(e){let t;this._type==="axial"?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const r of this._colorStops)t.addColorStop(r[0],r[1]);return t}getPattern(e,t,r,i){let o;if(i===zb||i===Qa){const s=t.current.getClippedPathBoundingBox(i,st(e))||[0,0,0,0],l=Math.ceil(s[2]-s[0])||1,c=Math.ceil(s[3]-s[1])||1,d=t.cachedCanvases.getCanvas("pattern",l,c,!0),u=d.context;u.clearRect(0,0,u.canvas.width,u.canvas.height),u.beginPath(),u.rect(0,0,u.canvas.width,u.canvas.height),u.translate(-s[0],-s[1]),r=ue.transform(r,[1,0,0,1,s[0],s[1]]),u.transform(...t.baseTransform),this.matrix&&u.transform(...this.matrix),Hb(u,this._bbox),u.fillStyle=this._createGradient(u),u.fill(),o=e.createPattern(d.canvas,"no-repeat");const f=new DOMMatrix(r);o.setTransform(f)}else Hb(e,this._bbox),o=this._createGradient(e);return o}}function Zb(n,e,t,r,i,o,s,l){const c=e.coords,d=e.colors,u=n.data,f=4*n.width;let h;c[t+1]>c[r+1]&&(h=t,t=r,r=h,h=o,o=s,s=h),c[r+1]>c[i+1]&&(h=r,r=i,i=h,h=s,s=l,l=h),c[t+1]>c[r+1]&&(h=t,t=r,r=h,h=o,o=s,s=h);const p=(c[t]+e.offsetX)*e.scaleX,m=(c[t+1]+e.offsetY)*e.scaleY,y=(c[r]+e.offsetX)*e.scaleX,b=(c[r+1]+e.offsetY)*e.scaleY,w=(c[i]+e.offsetX)*e.scaleX,v=(c[i+1]+e.offsetY)*e.scaleY;if(m>=v)return;const k=d[o],C=d[o+1],T=d[o+2],S=d[s],M=d[s+1],x=d[s+2],O=d[l],P=d[l+1],N=d[l+2],_=Math.round(m),V=Math.round(v);let H,L,D,U,F,R,G,ne;for(let Y=_;Y<=V;Y++){if(Y<b){const J=Y<m?0:(m-Y)/(m-b);H=p-(p-y)*J,L=k-(k-S)*J,D=C-(C-M)*J,U=T-(T-x)*J}else{let J;J=Y>v?1:b===v?0:(b-Y)/(b-v),H=y-(y-w)*J,L=S-(S-O)*J,D=M-(M-P)*J,U=x-(x-N)*J}let Z;Z=Y<m?0:Y>v?1:(m-Y)/(m-v),F=p-(p-w)*Z,R=k-(k-O)*Z,G=C-(C-P)*Z,ne=T-(T-N)*Z;const j=Math.round(Math.min(H,F)),$=Math.round(Math.max(H,F));let W=f*Y+4*j;for(let J=j;J<=$;J++)Z=(H-J)/(H-F),Z<0?Z=0:Z>1&&(Z=1),u[W++]=L-(L-R)*Z|0,u[W++]=D-(D-G)*Z|0,u[W++]=U-(U-ne)*Z|0,u[W++]=255}}function uZ(n,e,t){const r=e.coords,i=e.colors;let o,s;switch(e.type){case"lattice":const l=e.verticesPerRow,c=Math.floor(r.length/l)-1,d=l-1;for(o=0;o<c;o++){let u=o*l;for(let f=0;f<d;f++,u++)Zb(n,t,r[u],r[u+1],r[u+l],i[u],i[u+1],i[u+l]),Zb(n,t,r[u+l+1],r[u+1],r[u+l],i[u+l+1],i[u+1],i[u+l])}break;case"triangles":for(o=0,s=r.length;o<s;o+=3)Zb(n,t,r[o],r[o+1],r[o+2],i[o],i[o+1],i[o+2]);break;default:throw new Error("illegal figure")}}class fZ extends Ub{constructor(e){super(),this._coords=e[2],this._colors=e[3],this._figures=e[4],this._bounds=e[5],this._bbox=e[7],this._background=e[8],this.matrix=null}_createMeshCanvas(e,t,r){const i=Math.floor(this._bounds[0]),o=Math.floor(this._bounds[1]),s=Math.ceil(this._bounds[2])-i,l=Math.ceil(this._bounds[3])-o,c=Math.min(Math.ceil(Math.abs(s*e[0]*1.1)),3e3),d=Math.min(Math.ceil(Math.abs(l*e[1]*1.1)),3e3),u=s/c,f=l/d,h={coords:this._coords,colors:this._colors,offsetX:-i,offsetY:-o,scaleX:1/u,scaleY:1/f},p=c+4,m=d+4,y=r.getCanvas("mesh",p,m,!1),b=y.context,w=b.createImageData(c,d);if(t){const v=w.data;for(let k=0,C=v.length;k<C;k+=4)v[k]=t[0],v[k+1]=t[1],v[k+2]=t[2],v[k+3]=255}for(const v of this._figures)uZ(w,v,h);return b.putImageData(w,2,2),{canvas:y.canvas,offsetX:i-2*u,offsetY:o-2*f,scaleX:u,scaleY:f}}getPattern(e,t,r,i){Hb(e,this._bbox);let o;if(i===g2)o=ue.singularValueDecompose2dScale(st(e));else if(o=ue.singularValueDecompose2dScale(t.baseTransform),this.matrix){const l=ue.singularValueDecompose2dScale(this.matrix);o=[o[0]*l[0],o[1]*l[1]]}const s=this._createMeshCanvas(o,i===g2?null:this._background,t.cachedCanvases);return i!==g2&&(e.setTransform(...t.baseTransform),this.matrix&&e.transform(...this.matrix)),e.translate(s.offsetX,s.offsetY),e.scale(s.scaleX,s.scaleY),e.createPattern(s.canvas,"no-repeat")}}class hZ extends Ub{getPattern(){return"hotpink"}}const pZ=1,mZ=2,K3=class K3{constructor(e,t,r,i,o){this.operatorList=e[2],this.matrix=e[3],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=t,this.ctx=r,this.canvasGraphicsFactory=i,this.baseTransform=o}createPatternCanvas(e){const t=this.operatorList,r=this.bbox,i=this.xstep,o=this.ystep,s=this.paintType,l=this.tilingType,c=this.color,d=this.canvasGraphicsFactory;lm("TilingType: "+l);const u=r[0],f=r[1],h=r[2],p=r[3],m=ue.singularValueDecompose2dScale(this.matrix),y=ue.singularValueDecompose2dScale(this.baseTransform),b=[m[0]*y[0],m[1]*y[1]],w=this.getSizeAndScale(i,this.ctx.canvas.width,b[0]),v=this.getSizeAndScale(o,this.ctx.canvas.height,b[1]),k=e.cachedCanvases.getCanvas("pattern",w.size,v.size,!0),C=k.context,T=d.createCanvasGraphics(C);T.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(T,s,c);let S=u,M=f,x=h,O=p;return u<0&&(S=0,x+=Math.abs(u)),f<0&&(M=0,O+=Math.abs(f)),C.translate(-w.scale*S,-v.scale*M),T.transform(w.scale,0,0,v.scale,0,0),C.save(),this.clipBbox(T,S,M,x,O),T.baseTransform=st(T.ctx),T.executeOperatorList(t),T.endDrawing(),{canvas:k.canvas,scaleX:w.scale,scaleY:v.scale,offsetX:S,offsetY:M}}getSizeAndScale(e,t,r){e=Math.abs(e);const i=Math.max(K3.MAX_PATTERN_SIZE,t);let o=Math.ceil(e*r);return o>=i?o=i:r=o/e,{scale:r,size:o}}clipBbox(e,t,r,i,o){const s=i-t,l=o-r;e.ctx.rect(t,r,s,l),e.current.updateRectMinMax(st(e.ctx),[t,r,i,o]),e.clip(),e.endPath()}setFillAndStrokeStyleToContext(e,t,r){const i=e.ctx,o=e.current;switch(t){case pZ:const s=this.ctx;i.fillStyle=s.fillStyle,i.strokeStyle=s.strokeStyle,o.fillColor=s.fillStyle,o.strokeColor=s.strokeStyle;break;case mZ:const l=ue.makeHexColor(r[0],r[1],r[2]);i.fillStyle=l,i.strokeStyle=l,o.fillColor=l,o.strokeColor=l;break;default:throw new HU(`Unsupported paint type: ${t}`)}}getPattern(e,t,r,i){let o=r;i!==g2&&(o=ue.transform(o,t.baseTransform),this.matrix&&(o=ue.transform(o,this.matrix)));const s=this.createPatternCanvas(t);let l=new DOMMatrix(o);l=l.translate(s.offsetX,s.offsetY),l=l.scale(1/s.scaleX,1/s.scaleY);const c=e.createPattern(s.canvas,"repeat");return c.setTransform(l),c}};be(K3,"MAX_PATTERN_SIZE",3e3);let Wb=K3;function gZ({src:n,srcPos:e=0,dest:t,width:r,height:i,nonBlackColor:o=4294967295,inverseDecode:s=!1}){const l=jn.isLittleEndian?4278190080:255,[c,d]=s?[o,l]:[l,o],u=r>>3,f=7&r,h=n.length;t=new Uint32Array(t.buffer);let p=0;for(let m=0;m<i;m++){for(const b=e+u;e<b;e++){const w=e<h?n[e]:255;t[p++]=128&w?d:c,t[p++]=64&w?d:c,t[p++]=32&w?d:c,t[p++]=16&w?d:c,t[p++]=8&w?d:c,t[p++]=4&w?d:c,t[p++]=2&w?d:c,t[p++]=1&w?d:c}if(f===0)continue;const y=e<h?n[e++]:255;for(let b=0;b<f;b++)t[p++]=y&1<<7-b?d:c}return{srcPos:e,destPos:p}}const zn=16;class yZ{constructor(e){this.canvasFactory=e,this.cache=Object.create(null)}getCanvas(e,t,r){let i;return this.cache[e]!==void 0?(i=this.cache[e],this.canvasFactory.reset(i,t,r)):(i=this.canvasFactory.create(t,r),this.cache[e]=i),i}delete(e){delete this.cache[e]}clear(){for(const e in this.cache){const t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}}function mm(n,e,t,r,i,o,s,l,c,d){const[u,f,h,p,m,y]=st(n);if(f===0&&h===0){const b=s*u+m,w=Math.round(b),v=l*p+y,k=Math.round(v),C=(s+c)*u+m,T=Math.abs(Math.round(C)-w)||1,S=(l+d)*p+y,M=Math.abs(Math.round(S)-k)||1;return n.setTransform(Math.sign(u),0,0,Math.sign(p),w,k),n.drawImage(e,t,r,i,o,0,0,T,M),n.setTransform(u,f,h,p,m,y),[T,M]}if(u===0&&p===0){const b=l*h+m,w=Math.round(b),v=s*f+y,k=Math.round(v),C=(l+d)*h+m,T=Math.abs(Math.round(C)-w)||1,S=(s+c)*f+y,M=Math.abs(Math.round(S)-k)||1;return n.setTransform(0,Math.sign(f),Math.sign(h),0,w,k),n.drawImage(e,t,r,i,o,0,0,M,T),n.setTransform(u,f,h,p,m,y),[M,T]}return n.drawImage(e,t,r,i,o,s,l,c,d),[Math.hypot(u,f)*c,Math.hypot(h,p)*d]}class DE{constructor(e,t){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=uE,this.textMatrixScale=1,this.fontMatrix=kb,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=im,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,e,t])}clone(){const e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}setCurrentPoint(e,t){this.x=e,this.y=t}updatePathMinMax(e,t,r){[t,r]=ue.applyTransform([t,r],e),this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,r),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,r)}updateRectMinMax(e,t){const r=ue.applyTransform(t,e),i=ue.applyTransform(t.slice(2),e),o=ue.applyTransform([t[0],t[3]],e),s=ue.applyTransform([t[2],t[1]],e);this.minX=Math.min(this.minX,r[0],i[0],o[0],s[0]),this.minY=Math.min(this.minY,r[1],i[1],o[1],s[1]),this.maxX=Math.max(this.maxX,r[0],i[0],o[0],s[0]),this.maxY=Math.max(this.maxY,r[1],i[1],o[1],s[1])}updateScalingPathMinMax(e,t){ue.scaleMinMax(e,t),this.minX=Math.min(this.minX,t[0]),this.minY=Math.min(this.minY,t[1]),this.maxX=Math.max(this.maxX,t[2]),this.maxY=Math.max(this.maxY,t[3])}updateCurvePathMinMax(e,t,r,i,o,s,l,c,d,u){const f=ue.bezierBoundingBox(t,r,i,o,s,l,c,d,u);u||this.updateRectMinMax(e,f)}getPathBoundingBox(e=Qa,t=null){const r=[this.minX,this.minY,this.maxX,this.maxY];if(e===zb){t||Mt("Stroke bounding box must include transform.");const i=ue.singularValueDecompose2dScale(t),o=i[0]*this.lineWidth/2,s=i[1]*this.lineWidth/2;r[0]-=o,r[1]-=s,r[2]+=o,r[3]+=s}return r}updateClipFromPath(){const e=ue.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(e=Qa,t=null){return ue.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}function NE(n,e){if(typeof ImageData<"u"&&e instanceof ImageData){n.putImageData(e,0,0);return}const t=e.height,r=e.width,i=t%zn,o=(t-i)/zn,s=i===0?o:o+1,l=n.createImageData(r,zn);let c,d=0;const u=e.data,f=l.data;let h,p,m,y;if(e.kind===om.GRAYSCALE_1BPP){const b=u.byteLength,w=new Uint32Array(f.buffer,0,f.byteLength>>2),v=w.length,k=r+7>>3,C=4294967295,T=jn.isLittleEndian?4278190080:255;for(h=0;h<s;h++){for(m=h<o?zn:i,c=0,p=0;p<m;p++){const S=b-d;let M=0;const x=S>k?r:8*S-7,O=-8&x;let P=0,N=0;for(;M<O;M+=8)N=u[d++],w[c++]=128&N?C:T,w[c++]=64&N?C:T,w[c++]=32&N?C:T,w[c++]=16&N?C:T,w[c++]=8&N?C:T,w[c++]=4&N?C:T,w[c++]=2&N?C:T,w[c++]=1&N?C:T;for(;M<x;M++)P===0&&(N=u[d++],P=128),w[c++]=N&P?C:T,P>>=1}for(;c<v;)w[c++]=0;n.putImageData(l,0,h*zn)}}else if(e.kind===om.RGBA_32BPP){for(p=0,y=r*zn*4,h=0;h<o;h++)f.set(u.subarray(d,d+y)),d+=y,n.putImageData(l,0,p),p+=zn;h<s&&(y=r*i*4,f.set(u.subarray(d,d+y)),n.putImageData(l,0,p))}else{if(e.kind!==om.RGB_24BPP)throw new Error(`bad image kind: ${e.kind}`);for(m=zn,y=r*m,h=0;h<s;h++){for(h>=o&&(m=i,y=r*m),c=0,p=y;p--;)f[c++]=u[d++],f[c++]=u[d++],f[c++]=u[d++],f[c++]=255;n.putImageData(l,0,h*zn)}}}function PE(n,e){if(e.bitmap){n.drawImage(e.bitmap,0,0);return}const t=e.height,r=e.width,i=t%zn,o=(t-i)/zn,s=i===0?o:o+1,l=n.createImageData(r,zn);let c=0;const d=e.data,u=l.data;for(let f=0;f<s;f++){const h=f<o?zn:i;({srcPos:c}=gZ({src:d,srcPos:c,dest:u,width:r,height:h,nonBlackColor:0})),n.putImageData(l,0,f*zn)}}function y2(n,e){const t=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const r of t)n[r]!==void 0&&(e[r]=n[r]);n.setLineDash!==void 0&&(e.setLineDash(n.getLineDash()),e.lineDashOffset=n.lineDashOffset)}function gm(n){if(n.strokeStyle=n.fillStyle="#000000",n.fillRule="nonzero",n.globalAlpha=1,n.lineWidth=1,n.lineCap="butt",n.lineJoin="miter",n.miterLimit=10,n.globalCompositeOperation="source-over",n.font="10px sans-serif",n.setLineDash!==void 0&&(n.setLineDash([]),n.lineDashOffset=0),!mn){const{filter:e}=n;e!=="none"&&e!==""&&(n.filter="none")}}function LE(n,e){if(e)return!0;const t=ue.singularValueDecompose2dScale(n);t[0]=Math.fround(t[0]),t[1]=Math.fround(t[1]);const r=Math.fround((globalThis.devicePixelRatio||1)*ms.PDF_TO_CSS_UNITS);return t[0]<=r&&t[1]<=r}const bZ=["butt","round","square"],wZ=["miter","round","bevel"],vZ={},BE={},lv=class lv{constructor(e,t,r,i,o,{optionalContentConfig:s,markedContentStack:l=null},c,d){E(this,A1);E(this,T1);this.ctx=e,this.current=new DE(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=r,this.canvasFactory=i,this.filterFactory=o,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=l||[],this.optionalContentConfig=s,this.cachedCanvases=new yZ(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=c,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=d,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(e,t=null){return typeof e=="string"?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):t}beginDrawing({transform:e,viewport:t,transparency:r=!1,background:i=null}){const o=this.ctx.canvas.width,s=this.ctx.canvas.height,l=this.ctx.fillStyle;if(this.ctx.fillStyle=i||"#ffffff",this.ctx.fillRect(0,0,o,s),this.ctx.fillStyle=l,r){const c=this.cachedCanvases.getCanvas("transparent",o,s);this.compositeCtx=this.ctx,this.transparentCanvas=c.canvas,this.ctx=c.context,this.ctx.save(),this.ctx.transform(...st(this.compositeCtx))}this.ctx.save(),gm(this.ctx),e&&(this.ctx.transform(...e),this.outputScaleX=e[0],this.outputScaleY=e[0]),this.ctx.transform(...t.transform),this.viewportScale=t.scale,this.baseTransform=st(this.ctx)}executeOperatorList(e,t,r,i){const o=e.argsArray,s=e.fnArray;let l=t||0;const c=o.length;if(c===l)return l;const d=c-l>10&&typeof r=="function",u=d?Date.now()+15:0;let f=0;const h=this.commonObjs,p=this.objs;let m;for(;;){if(i!==void 0&&l===i.nextBreakPoint)return i.breakIt(l,r),l;if(m=s[l],m!==Kr.dependency)this[m].apply(this,o[l]);else for(const y of o[l]){const b=y.startsWith("g_")?h:p;if(!b.has(y))return b.get(y,r),l}if(l++,l===c)return l;if(d&&++f>10){if(Date.now()>u)return r(),l;f=0}}}endDrawing(){I(this,A1,Ov).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const e of this._cachedBitmapsMap.values()){for(const t of e.values())typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&(t.width=t.height=0);e.clear()}this._cachedBitmapsMap.clear(),I(this,T1,Dv).call(this)}_scaleImage(e,t){const r=e.width,i=e.height;let o,s,l=Math.max(Math.hypot(t[0],t[1]),1),c=Math.max(Math.hypot(t[2],t[3]),1),d=r,u=i,f="prescale1";for(;l>2&&d>1||c>2&&u>1;){let h=d,p=u;l>2&&d>1&&(h=d>=16384?Math.floor(d/2)-1||1:Math.ceil(d/2),l/=d/h),c>2&&u>1&&(p=u>=16384?Math.floor(u/2)-1||1:Math.ceil(u)/2,c/=u/p),o=this.cachedCanvases.getCanvas(f,h,p),s=o.context,s.clearRect(0,0,h,p),s.drawImage(e,0,0,d,u,0,0,h,p),e=o.canvas,d=h,u=p,f=f==="prescale1"?"prescale2":"prescale1"}return{img:e,paintWidth:d,paintHeight:u}}_createMaskCanvas(e){const t=this.ctx,{width:r,height:i}=e,o=this.current.fillColor,s=this.current.patternFill,l=st(t);let c,d,u,f;if((e.bitmap||e.data)&&e.count>1){const x=e.bitmap||e.data.buffer;d=JSON.stringify(s?l:[l.slice(0,4),o]),c=this._cachedBitmapsMap.get(x),c||(c=new Map,this._cachedBitmapsMap.set(x,c));const O=c.get(d);if(O&&!s)return{canvas:O,offsetX:Math.round(Math.min(l[0],l[2])+l[4]),offsetY:Math.round(Math.min(l[1],l[3])+l[5])};u=O}u||(f=this.cachedCanvases.getCanvas("maskCanvas",r,i),PE(f.context,e));let h=ue.transform(l,[1/r,0,0,-1/i,0,0]);h=ue.transform(h,[1,0,0,1,0,-i]);const[p,m,y,b]=ue.getAxialAlignedBoundingBox([0,0,r,i],h),w=Math.round(y-p)||1,v=Math.round(b-m)||1,k=this.cachedCanvases.getCanvas("fillCanvas",w,v),C=k.context,T=p,S=m;C.translate(-T,-S),C.transform(...h),u||(u=this._scaleImage(f.canvas,ho(C)),u=u.img,c&&s&&c.set(d,u)),C.imageSmoothingEnabled=LE(st(C),e.interpolate),mm(C,u,0,0,u.width,u.height,0,0,r,i),C.globalCompositeOperation="source-in";const M=ue.transform(ho(C),[1,0,0,1,-T,-S]);return C.fillStyle=s?o.getPattern(t,this,M,Qa):o,C.fillRect(0,0,r,i),c&&!s&&(this.cachedCanvases.delete("fillCanvas"),c.set(d,k.canvas)),{canvas:k.canvas,offsetX:Math.round(T),offsetY:Math.round(S)}}setLineWidth(e){e!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(e){this.ctx.lineCap=bZ[e]}setLineJoin(e){this.ctx.lineJoin=wZ[e]}setMiterLimit(e){this.ctx.miterLimit=e}setDash(e,t){const r=this.ctx;r.setLineDash!==void 0&&(r.setLineDash(e),r.lineDashOffset=t)}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,r]of e)switch(t){case"LW":this.setLineWidth(r);break;case"LC":this.setLineCap(r);break;case"LJ":this.setLineJoin(r);break;case"ML":this.setMiterLimit(r);break;case"D":this.setDash(r[0],r[1]);break;case"RI":this.setRenderingIntent(r);break;case"FL":this.setFlatness(r);break;case"Font":this.setFont(r[0],r[1]);break;case"CA":this.current.strokeAlpha=r;break;case"ca":this.current.fillAlpha=r,this.ctx.globalAlpha=r;break;case"BM":this.ctx.globalCompositeOperation=r;break;case"SMask":this.current.activeSMask=r?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(r)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const e=this.ctx.canvas.width,t=this.ctx.canvas.height,r="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(r,e,t);this.suspendedCtx=this.ctx,this.ctx=i.context;const o=this.ctx;o.setTransform(...st(this.suspendedCtx)),y2(this.suspendedCtx,o),function(l,c){if(l._removeMirroring)throw new Error("Context is already forwarding operations.");l.__originalSave=l.save,l.__originalRestore=l.restore,l.__originalRotate=l.rotate,l.__originalScale=l.scale,l.__originalTranslate=l.translate,l.__originalTransform=l.transform,l.__originalSetTransform=l.setTransform,l.__originalResetTransform=l.resetTransform,l.__originalClip=l.clip,l.__originalMoveTo=l.moveTo,l.__originalLineTo=l.lineTo,l.__originalBezierCurveTo=l.bezierCurveTo,l.__originalRect=l.rect,l.__originalClosePath=l.closePath,l.__originalBeginPath=l.beginPath,l._removeMirroring=()=>{l.save=l.__originalSave,l.restore=l.__originalRestore,l.rotate=l.__originalRotate,l.scale=l.__originalScale,l.translate=l.__originalTranslate,l.transform=l.__originalTransform,l.setTransform=l.__originalSetTransform,l.resetTransform=l.__originalResetTransform,l.clip=l.__originalClip,l.moveTo=l.__originalMoveTo,l.lineTo=l.__originalLineTo,l.bezierCurveTo=l.__originalBezierCurveTo,l.rect=l.__originalRect,l.closePath=l.__originalClosePath,l.beginPath=l.__originalBeginPath,delete l._removeMirroring},l.save=function(){c.save(),this.__originalSave()},l.restore=function(){c.restore(),this.__originalRestore()},l.translate=function(u,f){c.translate(u,f),this.__originalTranslate(u,f)},l.scale=function(u,f){c.scale(u,f),this.__originalScale(u,f)},l.transform=function(u,f,h,p,m,y){c.transform(u,f,h,p,m,y),this.__originalTransform(u,f,h,p,m,y)},l.setTransform=function(u,f,h,p,m,y){c.setTransform(u,f,h,p,m,y),this.__originalSetTransform(u,f,h,p,m,y)},l.resetTransform=function(){c.resetTransform(),this.__originalResetTransform()},l.rotate=function(u){c.rotate(u),this.__originalRotate(u)},l.clip=function(u){c.clip(u),this.__originalClip(u)},l.moveTo=function(d,u){c.moveTo(d,u),this.__originalMoveTo(d,u)},l.lineTo=function(d,u){c.lineTo(d,u),this.__originalLineTo(d,u)},l.bezierCurveTo=function(d,u,f,h,p,m){c.bezierCurveTo(d,u,f,h,p,m),this.__originalBezierCurveTo(d,u,f,h,p,m)},l.rect=function(d,u,f,h){c.rect(d,u,f,h),this.__originalRect(d,u,f,h)},l.closePath=function(){c.closePath(),this.__originalClosePath()},l.beginPath=function(){c.beginPath(),this.__originalBeginPath()}}(o,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),y2(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(e){if(!this.current.activeSMask)return;e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const t=this.current.activeSMask,r=this.suspendedCtx;this.composeSMask(r,t,this.ctx,e),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(e,t,r,i){const o=i[0],s=i[1],l=i[2]-o,c=i[3]-s;l!==0&&c!==0&&(this.genericComposeSMask(t.context,r,l,c,t.subtype,t.backdrop,t.transferMap,o,s,t.offsetX,t.offsetY),e.save(),e.globalAlpha=1,e.globalCompositeOperation="source-over",e.setTransform(1,0,0,1,0,0),e.drawImage(r.canvas,0,0),e.restore())}genericComposeSMask(e,t,r,i,o,s,l,c,d,u,f){let h=e.canvas,p=c-u,m=d-f;if(s){if(p<0||m<0||p+r>h.width||m+i>h.height){const b=this.cachedCanvases.getCanvas("maskExtension",r,i),w=b.context;w.drawImage(h,-p,-m),s.some(v=>v!==0)&&(w.globalCompositeOperation="destination-atop",w.fillStyle=ue.makeHexColor(...s),w.fillRect(0,0,r,i),w.globalCompositeOperation="source-over"),h=b.canvas,p=m=0}else if(s.some(b=>b!==0)){e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0);const b=new Path2D;b.rect(p,m,r,i),e.clip(b),e.globalCompositeOperation="destination-atop",e.fillStyle=ue.makeHexColor(...s),e.fillRect(p,m,r,i),e.restore()}}t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0),o==="Alpha"&&l?t.filter=this.filterFactory.addAlphaFilter(l):o==="Luminosity"&&(t.filter=this.filterFactory.addLuminosityFilter(l));const y=new Path2D;y.rect(c,d,r,i),t.clip(y),t.globalCompositeOperation="destination-in",t.drawImage(h,p,m,r,i,c,d,r,i),t.restore()}save(){this.inSMaskMode?(y2(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const e=this.current;this.stateStack.push(e),this.current=e.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),y2(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(e,t,r,i,o,s){this.ctx.transform(e,t,r,i,o,s),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(e,t,r){const i=this.ctx,o=this.current;let s,l,c=o.x,d=o.y;const u=st(i),f=u[0]===0&&u[3]===0||u[1]===0&&u[2]===0,h=f?r.slice(0):null;for(let p=0,m=0,y=e.length;p<y;p++)switch(0|e[p]){case Kr.rectangle:c=t[m++],d=t[m++];const b=t[m++],w=t[m++],v=c+b,k=d+w;i.moveTo(c,d),b===0||w===0?i.lineTo(v,k):(i.lineTo(v,d),i.lineTo(v,k),i.lineTo(c,k)),f||o.updateRectMinMax(u,[c,d,v,k]),i.closePath();break;case Kr.moveTo:c=t[m++],d=t[m++],i.moveTo(c,d),f||o.updatePathMinMax(u,c,d);break;case Kr.lineTo:c=t[m++],d=t[m++],i.lineTo(c,d),f||o.updatePathMinMax(u,c,d);break;case Kr.curveTo:s=c,l=d,c=t[m+4],d=t[m+5],i.bezierCurveTo(t[m],t[m+1],t[m+2],t[m+3],c,d),o.updateCurvePathMinMax(u,s,l,t[m],t[m+1],t[m+2],t[m+3],c,d,h),m+=6;break;case Kr.curveTo2:s=c,l=d,i.bezierCurveTo(c,d,t[m],t[m+1],t[m+2],t[m+3]),o.updateCurvePathMinMax(u,s,l,c,d,t[m],t[m+1],t[m+2],t[m+3],h),c=t[m+2],d=t[m+3],m+=4;break;case Kr.curveTo3:s=c,l=d,c=t[m+2],d=t[m+3],i.bezierCurveTo(t[m],t[m+1],c,d,c,d),o.updateCurvePathMinMax(u,s,l,t[m],t[m+1],c,d,c,d,h),m+=4;break;case Kr.closePath:i.closePath()}f&&o.updateScalingPathMinMax(u,h),o.setCurrentPoint(c,d)}closePath(){this.ctx.closePath()}stroke(e=!0){const t=this.ctx,r=this.current.strokeColor;t.globalAlpha=this.current.strokeAlpha,this.contentVisible&&(typeof r=="object"&&(r!=null&&r.getPattern)?(t.save(),t.strokeStyle=r.getPattern(t,this,ho(t),zb),this.rescaleAndStroke(!1),t.restore()):this.rescaleAndStroke(!0)),e&&this.consumePath(this.current.getClippedPathBoundingBox()),t.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(e=!0){const t=this.ctx,r=this.current.fillColor;let i=!1;this.current.patternFill&&(t.save(),t.fillStyle=r.getPattern(t,this,ho(t),Qa),i=!0);const o=this.current.getClippedPathBoundingBox();this.contentVisible&&o!==null&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),i&&t.restore(),e&&this.consumePath(o)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=vZ}eoClip(){this.pendingClip=BE}beginText(){this.current.textMatrix=uE,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const e=this.pendingTextPaths,t=this.ctx;if(e!==void 0){t.save(),t.beginPath();for(const r of e)t.setTransform(...r.transform),t.translate(r.x,r.y),r.addToPath(t,r.fontSize);t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else t.beginPath()}setCharSpacing(e){this.current.charSpacing=e}setWordSpacing(e){this.current.wordSpacing=e}setHScale(e){this.current.textHScale=e/100}setLeading(e){this.current.leading=-e}setFont(e,t){var u;const r=this.commonObjs.get(e),i=this.current;if(!r)throw new Error(`Can't find font for ${e}`);if(i.fontMatrix=r.fontMatrix||kb,i.fontMatrix[0]!==0&&i.fontMatrix[3]!==0||Ee("Invalid font matrix for font "+e),t<0?(t=-t,i.fontDirection=-1):i.fontDirection=1,this.current.font=r,this.current.fontSize=t,r.isType3Font)return;const o=r.loadedName||"sans-serif",s=((u=r.systemFontInfo)==null?void 0:u.css)||`"${o}", ${r.fallbackName}`;let l="normal";r.black?l="900":r.bold&&(l="bold");const c=r.italic?"italic":"normal";let d=t;t<16?d=16:t>100&&(d=100),this.current.fontSizeScale=t/d,this.ctx.font=`${c} ${l} ${d}px ${s}`}setTextRenderingMode(e){this.current.textRenderingMode=e}setTextRise(e){this.current.textRise=e}moveText(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}setTextMatrix(e,t,r,i,o,s){this.current.textMatrix=[e,t,r,i,o,s],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(e,t,r,i){const o=this.ctx,s=this.current,l=s.font,c=s.textRenderingMode,d=s.fontSize/s.fontSizeScale,u=c&fE,f=!!(c&gU),h=s.patternFill&&!l.missingFile;let p;(l.disableFontFace||f||h)&&(p=l.getPathGenerator(this.commonObjs,e)),l.disableFontFace||h?(o.save(),o.translate(t,r),o.beginPath(),p(o,d),i&&o.setTransform(...i),u!==im&&u!==u2||o.fill(),u!==Mb&&u!==u2||o.stroke(),o.restore()):(u!==im&&u!==u2||o.fillText(e,t,r),u!==Mb&&u!==u2||o.strokeText(e,t,r)),f&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:st(o),x:t,y:r,fontSize:d,addToPath:p})}get isFontSubpixelAAEnabled(){const{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e.scale(1.5,1),e.fillText("I",0,10);const t=e.getImageData(0,0,10,10).data;let r=!1;for(let i=3;i<t.length;i+=4)if(t[i]>0&&t[i]<255){r=!0;break}return De(this,"isFontSubpixelAAEnabled",r)}showText(e){const t=this.current,r=t.font;if(r.isType3Font)return this.showType3Text(e);const i=t.fontSize;if(i===0)return;const o=this.ctx,s=t.fontSizeScale,l=t.charSpacing,c=t.wordSpacing,d=t.fontDirection,u=t.textHScale*d,f=e.length,h=r.vertical,p=h?1:-1,m=r.defaultVMetrics,y=i*t.fontMatrix[0],b=t.textRenderingMode===im&&!r.disableFontFace&&!t.patternFill;o.save(),o.transform(...t.textMatrix),o.translate(t.x,t.y+t.textRise),d>0?o.scale(u,-1):o.scale(u,1);let w;if(t.patternFill){o.save();const S=t.fillColor.getPattern(o,this,ho(o),Qa);w=st(o),o.restore(),o.fillStyle=S}let v=t.lineWidth;const k=t.textMatrixScale;if(k===0||v===0){const S=t.textRenderingMode&fE;S!==Mb&&S!==u2||(v=this.getSinglePixelWidth())}else v/=k;if(s!==1&&(o.scale(s,s),v/=s),o.lineWidth=v,r.isInvalidPDFjsFont){const S=[];let M=0;for(const x of e)S.push(x.unicode),M+=x.width;o.fillText(S.join(""),0,0),t.x+=M*y*u,o.restore(),this.compose();return}let C,T=0;for(C=0;C<f;++C){const S=e[C];if(typeof S=="number"){T+=p*S*i/1e3;continue}let M=!1;const x=(S.isSpace?c:0)+l,O=S.fontChar,P=S.accent;let N,_,V=S.width;if(h){const H=S.vmetric||m,L=-(S.vmetric?H[1]:.5*V)*y,D=H[2]*y;V=H?-H[0]:V,N=L/s,_=(T+D)/s}else N=T/s,_=0;if(r.remeasure&&V>0){const H=1e3*o.measureText(O).width/i*s;if(V<H&&this.isFontSubpixelAAEnabled){const L=V/H;M=!0,o.save(),o.scale(L,1),N/=L}else V!==H&&(N+=(V-H)/2e3*i/s)}if(this.contentVisible&&(S.isInFont||r.missingFile)){if(b&&!P)o.fillText(O,N,_);else if(this.paintChar(O,N,_,w),P){const H=N+i*P.offset.x/s,L=_-i*P.offset.y/s;this.paintChar(P.fontChar,H,L,w)}}T+=h?V*y-x*d:V*y+x*d,M&&o.restore()}h?t.y-=T:t.x+=T*u,o.restore(),this.compose()}showType3Text(e){const t=this.ctx,r=this.current,i=r.font,o=r.fontSize,s=r.fontDirection,l=i.vertical?1:-1,c=r.charSpacing,d=r.wordSpacing,u=r.textHScale*s,f=r.fontMatrix||kb,h=e.length;let p,m,y,b;if(r.textRenderingMode!==mU&&o!==0){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,t.save(),t.transform(...r.textMatrix),t.translate(r.x,r.y),t.scale(u,s),p=0;p<h;++p){if(m=e[p],typeof m=="number"){b=l*m*o/1e3,this.ctx.translate(b,0),r.x+=b*u;continue}const w=(m.isSpace?d:0)+c,v=i.charProcOperatorList[m.operatorListId];if(!v){Ee(`Type3 character "${m.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=m,this.save(),t.scale(o,o),t.transform(...f),this.executeOperatorList(v),this.restore()),y=ue.applyTransform([m.width,0],f)[0]*o+w,t.translate(y,0),r.x+=y*u}t.restore(),this.processingType3=null}}setCharWidth(e,t){}setCharWidthAndBounds(e,t,r,i,o,s){this.ctx.rect(r,i,o-r,s-i),this.ctx.clip(),this.endPath()}getColorN_Pattern(e){let t;if(e[0]==="TilingPattern"){const r=e[1],i=this.baseTransform||st(this.ctx),o={createCanvasGraphics:s=>new lv(s,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};t=new Wb(e,r,this.ctx,o,i)}else t=this._getPattern(e[1],e[2]);return t}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(e,t,r){this.ctx.strokeStyle=this.current.strokeColor=ue.makeHexColor(e,t,r)}setStrokeTransparent(){this.ctx.strokeStyle=this.current.strokeColor="transparent"}setFillRGBColor(e,t,r){this.ctx.fillStyle=this.current.fillColor=ue.makeHexColor(e,t,r),this.current.patternFill=!1}setFillTransparent(){this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(e,t=null){let r;return this.cachedPatterns.has(e)?r=this.cachedPatterns.get(e):(r=function(o){switch(o[0]){case"RadialAxial":return new dZ(o);case"Mesh":return new fZ(o);case"Dummy":return new hZ}throw new Error(`Unknown IR type: ${o[0]}`)}(this.getObject(e)),this.cachedPatterns.set(e,r)),t&&(r.matrix=t),r}shadingFill(e){if(!this.contentVisible)return;const t=this.ctx;this.save();const r=this._getPattern(e);t.fillStyle=r.getPattern(t,this,ho(t),g2);const i=ho(t);if(i){const{width:o,height:s}=t.canvas,[l,c,d,u]=ue.getAxialAlignedBoundingBox([0,0,o,s],i);this.ctx.fillRect(l,c,d-l,u-c)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){Mt("Should not call beginInlineImage")}beginImageData(){Mt("Should not call beginImageData")}paintFormXObjectBegin(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),e&&this.transform(...e),this.baseTransform=st(this.ctx),t)){const r=t[2]-t[0],i=t[3]-t[1];this.ctx.rect(t[0],t[1],r,i),this.current.updateRectMinMax(st(this.ctx),t),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(e){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const t=this.ctx;e.isolated||lm("TODO: Support non-isolated groups."),e.knockout&&Ee("Knockout groups not supported.");const r=st(t);if(e.matrix&&t.transform(...e.matrix),!e.bbox)throw new Error("Bounding box is required.");let i=ue.getAxialAlignedBoundingBox(e.bbox,st(t));const o=[0,0,t.canvas.width,t.canvas.height];i=ue.intersect(i,o)||[0,0,0,0];const s=Math.floor(i[0]),l=Math.floor(i[1]),c=Math.max(Math.ceil(i[2])-s,1),d=Math.max(Math.ceil(i[3])-l,1);this.current.startNewPathAndClipBox([0,0,c,d]);let u="groupAt"+this.groupLevel;e.smask&&(u+="_smask_"+this.smaskCounter++%2);const f=this.cachedCanvases.getCanvas(u,c,d),h=f.context;h.translate(-s,-l),h.transform(...r),e.smask?this.smaskStack.push({canvas:f.canvas,context:h,offsetX:s,offsetY:l,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(s,l),t.save()),y2(t,h),this.ctx=h,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++}endGroup(e){if(!this.contentVisible)return;this.groupLevel--;const t=this.ctx,r=this.groupStack.pop();if(this.ctx=r,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const i=st(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...i);const o=ue.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],i);this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(o)}}beginAnnotation(e,t,r,i,o){if(I(this,A1,Ov).call(this),gm(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),t){const s=t[2]-t[0],l=t[3]-t[1];if(o&&this.annotationCanvasMap){(r=r.slice())[4]-=t[0],r[5]-=t[1],(t=t.slice())[0]=t[1]=0,t[2]=s,t[3]=l;const[c,d]=ue.singularValueDecompose2dScale(st(this.ctx)),{viewportScale:u}=this,f=Math.ceil(s*this.outputScaleX*u),h=Math.ceil(l*this.outputScaleY*u);this.annotationCanvas=this.canvasFactory.create(f,h);const{canvas:p,context:m}=this.annotationCanvas;this.annotationCanvasMap.set(e,p),this.annotationCanvas.savedCtx=this.ctx,this.ctx=m,this.ctx.save(),this.ctx.setTransform(c,0,0,-d,0,l*d),gm(this.ctx)}else gm(this.ctx),this.ctx.rect(t[0],t[1],s,l),this.ctx.clip(),this.endPath()}this.current=new DE(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...r),this.transform(...i)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),I(this,T1,Dv).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(e){if(!this.contentVisible)return;const t=e.count;(e=this.getObject(e.data,e)).count=t;const r=this.ctx,i=this.processingType3;if(i&&(i.compiled===void 0&&(i.compiled=function(c){const{width:d,height:u}=c;if(d>1e3||u>1e3)return null;const f=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),h=d+1;let p,m,y,b=new Uint8Array(h*(u+1));const w=d+7&-8;let v=new Uint8Array(w*u),k=0;for(const M of c.data){let x=128;for(;x>0;)v[k++]=M&x?0:255,x>>=1}let C=0;for(k=0,v[k]!==0&&(b[0]=1,++C),m=1;m<d;m++)v[k]!==v[k+1]&&(b[m]=v[k]?2:1,++C),k++;for(v[k]!==0&&(b[m]=2,++C),p=1;p<u;p++){k=p*w,y=p*h,v[k-w]!==v[k]&&(b[y]=v[k]?1:8,++C);let M=(v[k]?4:0)+(v[k-w]?8:0);for(m=1;m<d;m++)M=(M>>2)+(v[k+1]?4:0)+(v[k-w+1]?8:0),f[M]&&(b[y+m]=f[M],++C),k++;if(v[k-w]!==v[k]&&(b[y+m]=v[k]?2:4,++C),C>1e3)return null}for(k=w*(u-1),y=p*h,v[k]!==0&&(b[y]=8,++C),m=1;m<d;m++)v[k]!==v[k+1]&&(b[y+m]=v[k]?4:8,++C),k++;if(v[k]!==0&&(b[y+m]=4,++C),C>1e3)return null;const T=new Int32Array([0,h,-1,0,-h,0,0,0,1]),S=new Path2D;for(p=0;C&&p<=u;p++){let M=p*h;const x=M+d;for(;M<x&&!b[M];)M++;if(M===x)continue;S.moveTo(M%h,p);const O=M;let P=b[M];do{const N=T[P];do M+=N;while(!b[M]);const _=b[M];_!==5&&_!==10?(P=_,b[M]=0):(P=_&51*P>>4,b[M]&=P>>2|P<<2),S.lineTo(M%h,M/h|0),b[M]||--C}while(O!==M);--p}return v=null,b=null,function(M){M.save(),M.scale(1/d,-1/u),M.translate(0,-u),M.fill(S),M.beginPath(),M.restore()}}(e)),i.compiled)){i.compiled(r);return}const o=this._createMaskCanvas(e),s=o.canvas;r.save(),r.setTransform(1,0,0,1,0,0),r.drawImage(s,o.offsetX,o.offsetY),r.restore(),this.compose()}paintImageMaskXObjectRepeat(e,t,r=0,i=0,o,s){if(!this.contentVisible)return;e=this.getObject(e.data,e);const l=this.ctx;l.save();const c=st(l);l.transform(t,r,i,o,0,0);const d=this._createMaskCanvas(e);l.setTransform(1,0,0,1,d.offsetX-c[4],d.offsetY-c[5]);for(let u=0,f=s.length;u<f;u+=2){const h=ue.transform(c,[t,r,i,o,s[u],s[u+1]]),[p,m]=ue.applyTransform([0,0],h);l.drawImage(d.canvas,p,m)}l.restore(),this.compose()}paintImageMaskXObjectGroup(e){if(!this.contentVisible)return;const t=this.ctx,r=this.current.fillColor,i=this.current.patternFill;for(const o of e){const{data:s,width:l,height:c,transform:d}=o,u=this.cachedCanvases.getCanvas("maskCanvas",l,c),f=u.context;f.save(),PE(f,this.getObject(s,o)),f.globalCompositeOperation="source-in",f.fillStyle=i?r.getPattern(f,this,ho(t),Qa):r,f.fillRect(0,0,l,c),f.restore(),t.save(),t.transform(...d),t.scale(1,-1),mm(t,u.canvas,0,0,l,c,0,-1,1,1),t.restore()}this.compose()}paintImageXObject(e){if(!this.contentVisible)return;const t=this.getObject(e);t?this.paintInlineImageXObject(t):Ee("Dependent image isn't ready yet")}paintImageXObjectRepeat(e,t,r,i){if(!this.contentVisible)return;const o=this.getObject(e);if(!o){Ee("Dependent image isn't ready yet");return}const s=o.width,l=o.height,c=[];for(let d=0,u=i.length;d<u;d+=2)c.push({transform:[t,0,0,r,i[d],i[d+1]],x:0,y:0,w:s,h:l});this.paintInlineImageXObjectGroup(o,c)}applyTransferMapsToCanvas(e){return this.current.transferMaps!=="none"&&(e.filter=this.current.transferMaps,e.drawImage(e.canvas,0,0),e.filter="none"),e.canvas}applyTransferMapsToBitmap(e){if(this.current.transferMaps==="none")return e.bitmap;const{bitmap:t,width:r,height:i}=e,o=this.cachedCanvases.getCanvas("inlineImage",r,i),s=o.context;return s.filter=this.current.transferMaps,s.drawImage(t,0,0),s.filter="none",o.canvas}paintInlineImageXObject(e){if(!this.contentVisible)return;const t=e.width,r=e.height,i=this.ctx;if(this.save(),!mn){const{filter:l}=i;l!=="none"&&l!==""&&(i.filter="none")}i.scale(1/t,-1/r);let o;if(e.bitmap)o=this.applyTransferMapsToBitmap(e);else if(typeof HTMLElement=="function"&&e instanceof HTMLElement||!e.data)o=e;else{const l=this.cachedCanvases.getCanvas("inlineImage",t,r).context;NE(l,e),o=this.applyTransferMapsToCanvas(l)}const s=this._scaleImage(o,ho(i));i.imageSmoothingEnabled=LE(st(i),e.interpolate),mm(i,s.img,0,0,s.paintWidth,s.paintHeight,0,-r,t,r),this.compose(),this.restore()}paintInlineImageXObjectGroup(e,t){if(!this.contentVisible)return;const r=this.ctx;let i;if(e.bitmap)i=e.bitmap;else{const o=e.width,s=e.height,l=this.cachedCanvases.getCanvas("inlineImage",o,s).context;NE(l,e),i=this.applyTransferMapsToCanvas(l)}for(const o of t)r.save(),r.transform(...o.transform),r.scale(1,-1),mm(r,i,o.x,o.y,o.w,o.h,0,-1,1,1),r.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(e){}markPointProps(e,t){}beginMarkedContent(e){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(e,t){e==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(t)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(e){const t=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(e);const r=this.ctx;this.pendingClip&&(t||(this.pendingClip===BE?r.clip("evenodd"):r.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),r.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const e=st(this.ctx);if(e[1]===0&&e[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(e[0]),Math.abs(e[3]));else{const t=Math.abs(e[0]*e[3]-e[2]*e[1]),r=Math.hypot(e[0],e[2]),i=Math.hypot(e[1],e[3]);this._cachedGetSinglePixelWidth=Math.max(r,i)/t}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:e}=this.current,{a:t,b:r,c:i,d:o}=this.ctx.getTransform();let s,l;if(r===0&&i===0){const c=Math.abs(t),d=Math.abs(o);if(c===d)if(e===0)s=l=1/c;else{const u=c*e;s=l=u<1?1/u:1}else if(e===0)s=1/c,l=1/d;else{const u=c*e,f=d*e;s=u<1?1/u:1,l=f<1?1/f:1}}else{const c=Math.abs(t*o-r*i),d=Math.hypot(t,r),u=Math.hypot(i,o);if(e===0)s=u/c,l=d/c;else{const f=e*c;s=u>f?u/f:1,l=d>f?d/f:1}}this._cachedScaleForStroking[0]=s,this._cachedScaleForStroking[1]=l}return this._cachedScaleForStroking}rescaleAndStroke(e){const{ctx:t}=this,{lineWidth:r}=this.current,[i,o]=this.getScaleForStroking();if(t.lineWidth=r||1,i===1&&o===1){t.stroke();return}const s=t.getLineDash();if(e&&t.save(),t.scale(i,o),s.length>0){const l=Math.max(i,o);t.setLineDash(s.map(c=>c/l)),t.lineDashOffset/=l}t.stroke(),e&&t.restore()}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}};A1=new WeakSet,Ov=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)},T1=new WeakSet,Dv=function(){if(this.pageColors){const e=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(e!=="none"){const t=this.ctx.filter;this.ctx.filter=e,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=t}}};let tc=lv;for(const n in Kr)tc.prototype[n]!==void 0&&(tc.prototype[Kr[n]]=tc.prototype[n]);class po{static get workerPort(){return g(this,I1)}static set workerPort(e){if(!(typeof Worker<"u"&&e instanceof Worker)&&e!==null)throw new Error("Invalid `workerPort` type.");A(this,I1,e)}static get workerSrc(){return g(this,x1)}static set workerSrc(e){if(typeof e!="string")throw new Error("Invalid `workerSrc` type.");A(this,x1,e)}}I1=new WeakMap,x1=new WeakMap,E(po,I1,null),E(po,x1,"");const _E=1,RE=2,$E=1,qb=2,VE=3,FE=4,jE=5,zE=6,ym=7,Kb=8;function tr(n){switch(n instanceof Error||typeof n=="object"&&n!==null||Mt('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),n.name){case"AbortException":return new Ka(n.message);case"MissingPDFException":return new qa(n.message);case"PasswordException":return new Tb(n.message,n.code);case"UnexpectedResponseException":return new cm(n.message,n.status);case"UnknownErrorException":return new Ib(n.message,n.details);default:return new Ib(n.message,n.toString())}}class b2{constructor(e,t,r){E(this,G3);E(this,Y3);E(this,ld);this.sourceName=e,this.targetName=t,this.comObj=r,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=i=>{const o=i.data;if(o.targetName!==this.sourceName)return;if(o.stream){I(this,Y3,DN).call(this,o);return}if(o.callback){const l=o.callbackId,c=this.callbackCapabilities[l];if(!c)throw new Error(`Cannot resolve callback ${l}`);if(delete this.callbackCapabilities[l],o.callback===_E)c.resolve(o.data);else{if(o.callback!==RE)throw new Error("Unexpected callback case");c.reject(tr(o.reason))}return}const s=this.actionHandler[o.action];if(!s)throw new Error(`Unknown action from worker: ${o.action}`);if(o.callbackId){const l=this.sourceName,c=o.sourceName;new Promise(function(d){d(s(o.data))}).then(function(d){r.postMessage({sourceName:l,targetName:c,callback:_E,callbackId:o.callbackId,data:d})},function(d){r.postMessage({sourceName:l,targetName:c,callback:RE,callbackId:o.callbackId,reason:tr(d)})})}else o.streamId?I(this,G3,ON).call(this,o):s(o.data)},r.addEventListener("message",this._onComObjOnMessage)}on(e,t){const r=this.actionHandler;if(r[e])throw new Error(`There is already an actionName called "${e}"`);r[e]=t}send(e,t,r){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},r)}sendWithPromise(e,t,r){const i=this.callbackId++,o=Promise.withResolvers();this.callbackCapabilities[i]=o;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:i,data:t},r)}catch(s){o.reject(s)}return o.promise}sendWithStream(e,t,r,i){const o=this.streamId++,s=this.sourceName,l=this.targetName,c=this.comObj;return new ReadableStream({start:d=>{const u=Promise.withResolvers();return this.streamControllers[o]={controller:d,startCall:u,pullCall:null,cancelCall:null,isClosed:!1},c.postMessage({sourceName:s,targetName:l,action:e,streamId:o,data:t,desiredSize:d.desiredSize},i),u.promise},pull:d=>{const u=Promise.withResolvers();return this.streamControllers[o].pullCall=u,c.postMessage({sourceName:s,targetName:l,stream:zE,streamId:o,desiredSize:d.desiredSize}),u.promise},cancel:d=>{xt(d instanceof Error,"cancel must have a valid reason");const u=Promise.withResolvers();return this.streamControllers[o].cancelCall=u,this.streamControllers[o].isClosed=!0,c.postMessage({sourceName:s,targetName:l,stream:$E,streamId:o,reason:tr(d)}),u.promise}},r)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}G3=new WeakSet,ON=function(e){const t=e.streamId,r=this.sourceName,i=e.sourceName,o=this.comObj,s=this,l=this.actionHandler[e.action],c={enqueue(d,u=1,f){if(this.isCancelled)return;const h=this.desiredSize;this.desiredSize-=u,h>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),o.postMessage({sourceName:r,targetName:i,stream:FE,streamId:t,chunk:d},f)},close(){this.isCancelled||(this.isCancelled=!0,o.postMessage({sourceName:r,targetName:i,stream:VE,streamId:t}),delete s.streamSinks[t])},error(d){xt(d instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,o.postMessage({sourceName:r,targetName:i,stream:jE,streamId:t,reason:tr(d)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};c.sinkCapability.resolve(),c.ready=c.sinkCapability.promise,this.streamSinks[t]=c,new Promise(function(d){d(l(e.data,c))}).then(function(){o.postMessage({sourceName:r,targetName:i,stream:Kb,streamId:t,success:!0})},function(d){o.postMessage({sourceName:r,targetName:i,stream:Kb,streamId:t,reason:tr(d)})})},Y3=new WeakSet,DN=function(e){const t=e.streamId,r=this.sourceName,i=e.sourceName,o=this.comObj,s=this.streamControllers[t],l=this.streamSinks[t];switch(e.stream){case Kb:e.success?s.startCall.resolve():s.startCall.reject(tr(e.reason));break;case ym:e.success?s.pullCall.resolve():s.pullCall.reject(tr(e.reason));break;case zE:if(!l){o.postMessage({sourceName:r,targetName:i,stream:ym,streamId:t,success:!0});break}l.desiredSize<=0&&e.desiredSize>0&&l.sinkCapability.resolve(),l.desiredSize=e.desiredSize,new Promise(function(c){var d;c((d=l.onPull)==null?void 0:d.call(l))}).then(function(){o.postMessage({sourceName:r,targetName:i,stream:ym,streamId:t,success:!0})},function(c){o.postMessage({sourceName:r,targetName:i,stream:ym,streamId:t,reason:tr(c)})});break;case FE:if(xt(s,"enqueue should have stream controller"),s.isClosed)break;s.controller.enqueue(e.chunk);break;case VE:if(xt(s,"close should have stream controller"),s.isClosed)break;s.isClosed=!0,s.controller.close(),I(this,ld,l5).call(this,s,t);break;case jE:xt(s,"error should have stream controller"),s.controller.error(tr(e.reason)),I(this,ld,l5).call(this,s,t);break;case qb:e.success?s.cancelCall.resolve():s.cancelCall.reject(tr(e.reason)),I(this,ld,l5).call(this,s,t);break;case $E:if(!l)break;new Promise(function(c){var d;c((d=l.onCancel)==null?void 0:d.call(l,tr(e.reason)))}).then(function(){o.postMessage({sourceName:r,targetName:i,stream:qb,streamId:t,success:!0})},function(c){o.postMessage({sourceName:r,targetName:i,stream:qb,streamId:t,reason:tr(c)})}),l.sinkCapability.reject(tr(e.reason)),l.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}},ld=new WeakSet,l5=async function(e,t){var r,i,o;await Promise.allSettled([(r=e.startCall)==null?void 0:r.promise,(i=e.pullCall)==null?void 0:i.promise,(o=e.cancelCall)==null?void 0:o.promise]),delete this.streamControllers[t]};class CZ{constructor({parsedData:e,rawData:t}){E(this,Hl,void 0);E(this,O1,void 0);A(this,Hl,e),A(this,O1,t)}getRaw(){return g(this,O1)}get(e){return g(this,Hl).get(e)??null}getAll(){return xb(g(this,Hl))}has(e){return g(this,Hl).has(e)}}Hl=new WeakMap,O1=new WeakMap;const bs=Symbol("INTERNAL");class kZ{constructor(e,{name:t,intent:r,usage:i}){E(this,D1,!1);E(this,N1,!1);E(this,P1,!1);E(this,cd,!0);A(this,D1,!!(e&Eb)),A(this,N1,!!(e&rm)),this.name=t,this.intent=r,this.usage=i}get visible(){if(g(this,P1))return g(this,cd);if(!g(this,cd))return!1;const{print:e,view:t}=this.usage;return g(this,D1)?(t==null?void 0:t.viewState)!=="OFF":!g(this,N1)||(e==null?void 0:e.printState)!=="OFF"}_setVisible(e,t,r=!1){e!==bs&&Mt("Internal method `_setVisible` called."),A(this,P1,r),A(this,cd,t)}}D1=new WeakMap,N1=new WeakMap,P1=new WeakMap,cd=new WeakMap;class SZ{constructor(e,t=Eb){E(this,L1);E(this,ia,null);E(this,Ye,new Map);E(this,dd,null);E(this,ud,null);if(this.renderingIntent=t,this.name=null,this.creator=null,e!==null){this.name=e.name,this.creator=e.creator,A(this,ud,e.order);for(const r of e.groups)g(this,Ye).set(r.id,new kZ(t,r));if(e.baseState==="OFF")for(const r of g(this,Ye).values())r._setVisible(bs,!1);for(const r of e.on)g(this,Ye).get(r)._setVisible(bs,!0);for(const r of e.off)g(this,Ye).get(r)._setVisible(bs,!1);A(this,dd,this.getHash())}}isVisible(e){if(g(this,Ye).size===0)return!0;if(!e)return lm("Optional content group not defined."),!0;if(e.type==="OCG")return g(this,Ye).has(e.id)?g(this,Ye).get(e.id).visible:(Ee(`Optional content group not found: ${e.id}`),!0);if(e.type==="OCMD"){if(e.expression)return I(this,L1,Nv).call(this,e.expression);if(!e.policy||e.policy==="AnyOn"){for(const t of e.ids){if(!g(this,Ye).has(t))return Ee(`Optional content group not found: ${t}`),!0;if(g(this,Ye).get(t).visible)return!0}return!1}if(e.policy==="AllOn"){for(const t of e.ids){if(!g(this,Ye).has(t))return Ee(`Optional content group not found: ${t}`),!0;if(!g(this,Ye).get(t).visible)return!1}return!0}if(e.policy==="AnyOff"){for(const t of e.ids){if(!g(this,Ye).has(t))return Ee(`Optional content group not found: ${t}`),!0;if(!g(this,Ye).get(t).visible)return!0}return!1}if(e.policy==="AllOff"){for(const t of e.ids){if(!g(this,Ye).has(t))return Ee(`Optional content group not found: ${t}`),!0;if(g(this,Ye).get(t).visible)return!1}return!0}return Ee(`Unknown optional content policy ${e.policy}.`),!0}return Ee(`Unknown group type ${e.type}.`),!0}setVisibility(e,t=!0){const r=g(this,Ye).get(e);r?(r._setVisible(bs,!!t,!0),A(this,ia,null)):Ee(`Optional content group not found: ${e}`)}setOCGState({state:e,preserveRB:t}){let r;for(const i of e){switch(i){case"ON":case"OFF":case"Toggle":r=i;continue}const o=g(this,Ye).get(i);if(o)switch(r){case"ON":o._setVisible(bs,!0);break;case"OFF":o._setVisible(bs,!1);break;case"Toggle":o._setVisible(bs,!o.visible)}}A(this,ia,null)}get hasInitialVisibility(){return g(this,dd)===null||this.getHash()===g(this,dd)}getOrder(){return g(this,Ye).size?g(this,ud)?g(this,ud).slice():[...g(this,Ye).keys()]:null}getGroups(){return g(this,Ye).size>0?xb(g(this,Ye)):null}getGroup(e){return g(this,Ye).get(e)||null}getHash(){if(g(this,ia)!==null)return g(this,ia);const e=new IE;for(const[t,r]of g(this,Ye))e.update(`${t}:${r.visible}`);return A(this,ia,e.hexdigest())}}ia=new WeakMap,Ye=new WeakMap,dd=new WeakMap,ud=new WeakMap,L1=new WeakSet,Nv=function(e){const t=e.length;if(t<2)return!0;const r=e[0];for(let i=1;i<t;i++){const o=e[i];let s;if(Array.isArray(o))s=I(this,L1,Nv).call(this,o);else{if(!g(this,Ye).has(o))return Ee(`Optional content group not found: ${o}`),!0;s=g(this,Ye).get(o).visible}switch(r){case"And":if(!s)return!1;break;case"Or":if(s)return!0;break;case"Not":return!s;default:return!0}}return r==="And"};class EZ{constructor(e,{disableRange:t=!1,disableStream:r=!1}){xt(e,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');const{length:i,initialData:o,progressiveDone:s,contentDispositionFilename:l}=e;if(this._queuedChunks=[],this._progressiveDone=s,this._contentDispositionFilename=l,(o==null?void 0:o.length)>0){const c=o instanceof Uint8Array&&o.byteLength===o.buffer.byteLength?o.buffer:new Uint8Array(o).buffer;this._queuedChunks.push(c)}this._pdfDataRangeTransport=e,this._isStreamingSupported=!r,this._isRangeSupported=!t,this._contentLength=i,this._fullRequestReader=null,this._rangeReaders=[],e.addRangeListener((c,d)=>{this._onReceiveData({begin:c,chunk:d})}),e.addProgressListener((c,d)=>{this._onProgress({loaded:c,total:d})}),e.addProgressiveReadListener(c=>{this._onReceiveData({chunk:c})}),e.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),e.transportReady()}_onReceiveData({begin:e,chunk:t}){const r=t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength?t.buffer:new Uint8Array(t).buffer;e===void 0?this._fullRequestReader?this._fullRequestReader._enqueue(r):this._queuedChunks.push(r):xt(this._rangeReaders.some(function(i){return i._begin!==e?!1:(i._enqueue(r),!0)}),"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}get _progressiveDataLength(){var e;return((e=this._fullRequestReader)==null?void 0:e._loaded)??0}_onProgress(e){var t,r,i,o;e.total===void 0?(r=(t=this._rangeReaders[0])==null?void 0:t.onProgress)==null||r.call(t,{loaded:e.loaded}):(o=(i=this._fullRequestReader)==null?void 0:i.onProgress)==null||o.call(i,{loaded:e.loaded,total:e.total})}_onProgressiveDone(){var e;(e=this._fullRequestReader)==null||e.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){const t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}getFullReader(){xt(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const e=this._queuedChunks;return this._queuedChunks=null,new MZ(this,e,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const r=new AZ(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(r),r}cancelAllRequests(e){var t;(t=this._fullRequestReader)==null||t.cancel(e);for(const r of this._rangeReaders.slice(0))r.cancel(e);this._pdfDataRangeTransport.abort()}}class MZ{constructor(e,t,r=!1,i=null){this._stream=e,this._done=r||!1,this._filename=Lb(i)?i:null,this._queuedChunks=t||[],this._loaded=0;for(const o of this._queuedChunks)this._loaded+=o.byteLength;this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class AZ{constructor(e,t,r){this._stream=e,this._begin=t,this._end=r,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){if(!this._done){if(this._requests.length===0)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const t=this._queuedChunk;return this._queuedChunk=null,{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function Gb({getResponseHeader:n,isHttp:e,rangeChunkSize:t,disableRange:r}){const i={allowRangeRequests:!1,suggestedLength:void 0},o=parseInt(n("Content-Length"),10);return!Number.isInteger(o)||(i.suggestedLength=o,o<=2*t)||r||!e||n("Accept-Ranges")!=="bytes"||(n("Content-Encoding")||"identity")!=="identity"||(i.allowRangeRequests=!0),i}function Yb(n){const e=n("Content-Disposition");if(e){let t=function(i){let o=!0,s=l("filename\\*","i").exec(i);if(s){s=s[1];let p=u(s);return p=unescape(p),p=f(p),p=h(p),d(p)}if(s=function(m){const y=[];let b;const w=l("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(b=w.exec(m))!==null;){let[,k,C,T]=b;if(k=parseInt(k,10),k in y){if(k===0)break}else y[k]=[C,T]}const v=[];for(let k=0;k<y.length&&k in y;++k){let[C,T]=y[k];T=u(T),C&&(T=unescape(T),k===0&&(T=f(T))),v.push(T)}return v.join("")}(i),s)return d(h(s));if(s=l("filename","i").exec(i),s){s=s[1];let p=u(s);return p=h(p),d(p)}function l(p,m){return new RegExp("(?:^|;)\\s*"+p+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',m)}function c(p,m){if(p){if(!/^[\x00-\xFF]+$/.test(m))return m;try{const y=new TextDecoder(p,{fatal:!0}),b=dm(m);m=y.decode(b),o=!1}catch{}}return m}function d(p){return o&&/[\x80-\xff]/.test(p)&&(p=c("utf-8",p),o&&(p=c("iso-8859-1",p))),p}function u(p){if(p.startsWith('"')){const m=p.slice(1).split('\\"');for(let y=0;y<m.length;++y){const b=m[y].indexOf('"');b!==-1&&(m[y]=m[y].slice(0,b),m.length=y+1),m[y]=m[y].replaceAll(/\\(.)/g,"$1")}p=m.join('"')}return p}function f(p){const m=p.indexOf("'");return m===-1?p:c(p.slice(0,m),p.slice(m+1).replace(/^[^']*'/,""))}function h(p){return!p.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(p)?p:p.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(m,y,b,w){if(b==="q"||b==="Q")return c(y,w=(w=w.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,function(v,k){return String.fromCharCode(parseInt(k,16))}));try{w=atob(w)}catch{}return c(y,w)})}return""}(e);if(t.includes("%"))try{t=decodeURIComponent(t)}catch{}if(Lb(t))return t}return null}function bm(n,e){return n===404||n===0&&e.startsWith("file:")?new qa('Missing PDF "'+e+'".'):new cm(`Unexpected server response (${n}) while retrieving PDF "${e}".`,n)}function HE(n){return n===200||n===206}function UE(n,e,t){return{method:"GET",headers:n,signal:t.signal,mode:"cors",credentials:e?"include":"same-origin",redirect:"follow"}}function ZE(n){const e=new Headers;for(const t in n){const r=n[t];r!==void 0&&e.append(t,r)}return e}function WE(n){return n instanceof Uint8Array?n.buffer:n instanceof ArrayBuffer?n:(Ee(`getArrayBuffer - unexpected data format: ${n}`),new Uint8Array(n).buffer)}class qE{constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e;return((e=this._fullRequestReader)==null?void 0:e._loaded)??0}getFullReader(){return xt(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new TZ(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const r=new IZ(this,e,t);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){var t;(t=this._fullRequestReader)==null||t.cancel(e);for(const r of this._rangeRequestReaders.slice(0))r.cancel(e)}}class TZ{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null;const t=e.source;this._withCredentials=t.withCredentials||!1,this._contentLength=t.length,this._headersCapability=Promise.withResolvers(),this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._headers=ZE(this._stream.httpHeaders);const r=t.url;fetch(r,UE(this._headers,this._withCredentials,this._abortController)).then(i=>{if(!HE(i.status))throw bm(i.status,r);this._reader=i.body.getReader(),this._headersCapability.resolve();const o=c=>i.headers.get(c),{allowRangeRequests:s,suggestedLength:l}=Gb({getResponseHeader:o,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=s,this._contentLength=l||this._contentLength,this._filename=Yb(o),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new Ka("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var r;await this._headersCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,(r=this.onProgress)==null||r.call(this,{loaded:this._loaded,total:this._contentLength}),{value:WE(e),done:!1})}cancel(e){var t;(t=this._reader)==null||t.cancel(e),this._abortController.abort()}}class IZ{constructor(e,t,r){this._stream=e,this._reader=null,this._loaded=0;const i=e.source;this._withCredentials=i.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!i.disableStream,this._abortController=new AbortController,this._headers=ZE(this._stream.httpHeaders),this._headers.append("Range",`bytes=${t}-${r-1}`);const o=i.url;fetch(o,UE(this._headers,this._withCredentials,this._abortController)).then(s=>{if(!HE(s.status))throw bm(s.status,o);this._readCapability.resolve(),this._reader=s.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var r;await this._readCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,(r=this.onProgress)==null||r.call(this,{loaded:this._loaded}),{value:WE(e),done:!1})}cancel(e){var t;(t=this._reader)==null||t.cancel(e),this._abortController.abort()}}class xZ{constructor(e,t={}){this.url=e,this.isHttp=/^https?:/i.test(e),this.httpHeaders=this.isHttp&&t.httpHeaders||Object.create(null),this.withCredentials=t.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e,t,r){const i={begin:e,end:t};for(const o in r)i[o]=r[o];return this.request(i)}requestFull(e){return this.request(e)}request(e){const t=new XMLHttpRequest,r=this.currXhrId++,i=this.pendingRequests[r]={xhr:t};t.open("GET",this.url),t.withCredentials=this.withCredentials;for(const o in this.httpHeaders){const s=this.httpHeaders[o];s!==void 0&&t.setRequestHeader(o,s)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`),i.expectedStatus=206):i.expectedStatus=200,t.responseType="arraybuffer",e.onError&&(t.onerror=function(o){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,r),t.onprogress=this.onProgress.bind(this,r),i.onHeadersReceived=e.onHeadersReceived,i.onDone=e.onDone,i.onError=e.onError,i.onProgress=e.onProgress,t.send(null),r}onProgress(e,t){var i;const r=this.pendingRequests[e];r&&((i=r.onProgress)==null||i.call(r,t))}onStateChange(e,t){var l,c,d;const r=this.pendingRequests[e];if(!r)return;const i=r.xhr;if(i.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),i.readyState!==4||!(e in this.pendingRequests))return;if(delete this.pendingRequests[e],i.status===0&&this.isHttp){(l=r.onError)==null||l.call(r,i.status);return}const o=i.status||200;if(!(o===200&&r.expectedStatus===206)&&o!==r.expectedStatus){(c=r.onError)==null||c.call(r,i.status);return}const s=function(f){const h=f.response;return typeof h!="string"?h:dm(h).buffer}(i);if(o===206){const u=i.getResponseHeader("Content-Range"),f=/bytes (\d+)-(\d+)\/(\d+)/.exec(u);r.onDone({begin:parseInt(f[1],10),chunk:s})}else s?r.onDone({begin:0,chunk:s}):(d=r.onError)==null||d.call(r,i.status)}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortRequest(e){const t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}class OZ{constructor(e){this._source=e,this._manager=new xZ(e.url,{httpHeaders:e.httpHeaders,withCredentials:e.withCredentials}),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){const t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}getFullReader(){return xt(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new DZ(this._manager,this._source),this._fullRequestReader}getRangeReader(e,t){const r=new NZ(this._manager,e,t);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}cancelAllRequests(e){var t;(t=this._fullRequestReader)==null||t.cancel(e);for(const r of this._rangeRequestReaders.slice(0))r.cancel(e)}}class DZ{constructor(e,t){this._manager=e;const r={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._fullRequestId=e.requestFull(r),this._headersReceivedCapability=Promise.withResolvers(),this._disableRange=t.disableRange||!1,this._contentLength=t.length,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const e=this._fullRequestId,t=this._manager.getRequestXhr(e),r=s=>t.getResponseHeader(s),{allowRangeRequests:i,suggestedLength:o}=Gb({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});i&&(this._isRangeSupported=!0),this._contentLength=o||this._contentLength,this._filename=Yb(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}_onDone(e){if(e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(e){this._storedError=bm(e,this._url),this._headersReceivedCapability.reject(this._storedError);for(const t of this._requests)t.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(e){var t;(t=this.onProgress)==null||t.call(this,{loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersReceivedCapability.reject(e);for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class NZ{constructor(e,t,r){this._manager=e;const i={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._requestId=e.requestRange(t,r,i),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var e;(e=this.onClosed)==null||e.call(this,this)}_onDone(e){const t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0;for(const r of this._requests)r.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(e){this._storedError=bm(e,this._url);for(const t of this._requests)t.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(e){var t;this.isStreamingSupported||((t=this.onProgress)==null||t.call(this,{loaded:e.loaded}))}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const t=this._queuedChunk;return this._queuedChunk=null,{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const PZ=/^[a-z][a-z0-9\-+.]+:/i;function KE(n,e,t){return n.protocol==="http:"?ys.get("http").request(n,{headers:e},t):ys.get("https").request(n,{headers:e},t)}class LZ{constructor(e){this.source=e,this.url=function(r){if(PZ.test(r))return new URL(r);const i=ys.get("url");return new URL(i.pathToFileURL(r))}(e.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e;return((e=this._fullRequestReader)==null?void 0:e._loaded)??0}getFullReader(){return xt(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new RZ(this):new BZ(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const r=this.isFsUrl?new $Z(this,e,t):new _Z(this,e,t);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){var t;(t=this._fullRequestReader)==null||t.cancel(e);for(const r of this._rangeRequestReaders.slice(0))r.cancel(e)}}class GE{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;const t=e.source;this._contentLength=t.length,this._loaded=0,this._filename=null,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var t;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();return e===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=e.length,(t=this.onProgress)==null||t.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",t=>{this._error(t)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new Ka("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class YE{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const t=e.source;this._isStreamingSupported=!t.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){var t;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();return e===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=e.length,(t=this.onProgress)==null||t.call(this,{loaded:this._loaded}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",t=>{this._error(t)}),this._storedError&&this._readableStream.destroy(this._storedError)}}class BZ extends GE{constructor(e){super(e),this._request=KE(this._url,e.httpHeaders,t=>{if(t.statusCode===404){const s=new qa(`Missing PDF "${this._url}".`);this._storedError=s,this._headersCapability.reject(s);return}this._headersCapability.resolve(),this._setReadableStream(t);const r=s=>this._readableStream.headers[s.toLowerCase()],{allowRangeRequests:i,suggestedLength:o}=Gb({getResponseHeader:r,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=i,this._contentLength=o||this._contentLength,this._filename=Yb(r)}),this._request.on("error",t=>{this._storedError=t,this._headersCapability.reject(t)}),this._request.end()}}class _Z extends YE{constructor(e,t,r){super(e),this._httpHeaders={};for(const i in e.httpHeaders){const o=e.httpHeaders[i];o!==void 0&&(this._httpHeaders[i]=o)}this._httpHeaders.Range=`bytes=${t}-${r-1}`,this._request=KE(this._url,this._httpHeaders,i=>{if(i.statusCode!==404)this._setReadableStream(i);else{const o=new qa(`Missing PDF "${this._url}".`);this._storedError=o}}),this._request.on("error",i=>{this._storedError=i}),this._request.end()}}class RZ extends GE{constructor(e){super(e);const t=ys.get("fs");t.promises.lstat(this._url).then(r=>{this._contentLength=r.size,this._setReadableStream(t.createReadStream(this._url)),this._headersCapability.resolve()},r=>{r.code==="ENOENT"&&(r=new qa(`Missing PDF "${this._url}".`)),this._storedError=r,this._headersCapability.reject(r)})}}class $Z extends YE{constructor(e,t,r){super(e);const i=ys.get("fs");this._setReadableStream(i.createReadStream(this._url,{start:t,end:r-1}))}}const nr=30,Kt=class Kt{constructor({textContentSource:e,container:t,viewport:r}){E(this,Q3);E(this,X3);E(this,z1);E(this,oa,Promise.withResolvers());E(this,Qn,null);E(this,B1,!1);E(this,_1,!!((nN=globalThis.FontInspector)!=null&&nN.enabled));E(this,Ul,null);E(this,Po,null);E(this,R1,0);E(this,$1,0);E(this,Zl,null);E(this,fd,null);E(this,hd,0);E(this,sa,0);E(this,pd,Object.create(null));E(this,V1,[]);E(this,md,null);E(this,Wl,[]);E(this,F1,new WeakMap);E(this,j1,null);var c;if(e instanceof ReadableStream)A(this,md,e);else{if(typeof e!="object")throw new Error('No "textContentSource" parameter specified.');A(this,md,new ReadableStream({start(d){d.enqueue(e),d.close()}}))}A(this,Qn,A(this,fd,t)),A(this,sa,r.scale*(globalThis.devicePixelRatio||1)),A(this,hd,r.rotation),A(this,Po,{prevFontSize:null,prevFontFamily:null,div:null,properties:null,ctx:null});const{pageWidth:i,pageHeight:o,pageX:s,pageY:l}=r.rawDims;A(this,j1,[1,0,0,-1,-s,l+o]),A(this,$1,i),A(this,R1,o),I(c=Kt,J3,LN).call(c),Ga(t,r),g(this,oa).promise.catch(()=>{}).then(()=>{g(Kt,gd).delete(this),A(this,Po,null),A(this,pd,null)})}render(){const e=()=>{g(this,Zl).read().then(({value:t,done:r})=>{r?g(this,oa).resolve():(g(this,Ul)??A(this,Ul,t.lang),Object.assign(g(this,pd),t.styles),I(this,Q3,NN).call(this,t.items),e())},g(this,oa).reject)};return A(this,Zl,g(this,md).getReader()),g(Kt,gd).add(this),e(),g(this,oa).promise}update({viewport:e,onBefore:t=null}){var o;const r=e.scale*(globalThis.devicePixelRatio||1),i=e.rotation;if(i!==g(this,hd)&&(t==null||t(),A(this,hd,i),Ga(g(this,fd),{rotation:i})),r!==g(this,sa)){t==null||t(),A(this,sa,r);const s={prevFontSize:null,prevFontFamily:null,div:null,properties:null,ctx:I(o=Kt,yd,c5).call(o,g(this,Ul))};for(const l of g(this,Wl))s.properties=g(this,F1).get(l),s.div=l,I(this,z1,Pv).call(this,s)}}cancel(){var t;const e=new Ka("TextLayer task cancelled.");(t=g(this,Zl))==null||t.cancel(e).catch(()=>{}),A(this,Zl,null),g(this,oa).reject(e)}get textDivs(){return g(this,Wl)}get textContentItemsStr(){return g(this,V1)}static cleanup(){if(!(g(this,gd).size>0)){g(this,ql).clear();for(const{canvas:e}of g(this,Kl).values())e.remove();g(this,Kl).clear()}}};oa=new WeakMap,Qn=new WeakMap,B1=new WeakMap,_1=new WeakMap,Ul=new WeakMap,Po=new WeakMap,R1=new WeakMap,$1=new WeakMap,Zl=new WeakMap,fd=new WeakMap,hd=new WeakMap,sa=new WeakMap,pd=new WeakMap,V1=new WeakMap,md=new WeakMap,Wl=new WeakMap,F1=new WeakMap,j1=new WeakMap,ql=new WeakMap,Kl=new WeakMap,aa=new WeakMap,gd=new WeakMap,Q3=new WeakSet,NN=function(e){var i,o;if(g(this,B1))return;(o=g(this,Po)).ctx??(o.ctx=I(i=Kt,yd,c5).call(i,g(this,Ul)));const t=g(this,Wl),r=g(this,V1);for(const s of e){if(t.length>1e5){Ee("Ignoring additional textDivs for performance reasons."),A(this,B1,!0);return}if(s.str!==void 0)r.push(s.str),I(this,X3,PN).call(this,s);else if(s.type==="beginMarkedContentProps"||s.type==="beginMarkedContent"){const l=g(this,Qn);A(this,Qn,document.createElement("span")),g(this,Qn).classList.add("markedContent"),s.id!==null&&g(this,Qn).setAttribute("id",`${s.id}`),l.append(g(this,Qn))}else s.type==="endMarkedContent"&&A(this,Qn,g(this,Qn).parentNode)}},X3=new WeakSet,PN=function(e){var y;const t=document.createElement("span"),r={angle:0,canvasWidth:0,hasText:e.str!=="",hasEOL:e.hasEOL,fontSize:0};g(this,Wl).push(t);const i=ue.transform(g(this,j1),e.transform);let o=Math.atan2(i[1],i[0]);const s=g(this,pd)[e.fontName];s.vertical&&(o+=Math.PI/2);const l=g(this,_1)&&s.fontSubstitution||s.fontFamily,c=Math.hypot(i[2],i[3]),d=c*I(y=Kt,ey,BN).call(y,l,g(this,Ul));let u,f;o===0?(u=i[4],f=i[5]-d):(u=i[4]+d*Math.sin(o),f=i[5]-d*Math.cos(o));const h="calc(var(--scale-factor)*",p=t.style;g(this,Qn)===g(this,fd)?(p.left=`${(100*u/g(this,$1)).toFixed(2)}%`,p.top=`${(100*f/g(this,R1)).toFixed(2)}%`):(p.left=`${h}${u.toFixed(2)}px)`,p.top=`${h}${f.toFixed(2)}px)`),p.fontSize=`${h}${(g(Kt,aa)*c).toFixed(2)}px)`,p.fontFamily=l,r.fontSize=c,t.setAttribute("role","presentation"),t.textContent=e.str,t.dir=e.dir,g(this,_1)&&(t.dataset.fontName=s.fontSubstitutionLoadedName||e.fontName),o!==0&&(r.angle=o*(180/Math.PI));let m=!1;if(e.str.length>1)m=!0;else if(e.str!==" "&&e.transform[0]!==e.transform[3]){const b=Math.abs(e.transform[0]),w=Math.abs(e.transform[3]);b!==w&&Math.max(b,w)/Math.min(b,w)>1.5&&(m=!0)}if(m&&(r.canvasWidth=s.vertical?e.height:e.width),g(this,F1).set(t,r),g(this,Po).div=t,g(this,Po).properties=r,I(this,z1,Pv).call(this,g(this,Po)),r.hasText&&g(this,Qn).append(t),r.hasEOL){const b=document.createElement("br");b.setAttribute("role","presentation"),g(this,Qn).append(b)}},z1=new WeakSet,Pv=function(e){const{div:t,properties:r,ctx:i,prevFontSize:o,prevFontFamily:s}=e,{style:l}=t;let c="";if(g(Kt,aa)>1&&(c=`scale(${1/g(Kt,aa)})`),r.canvasWidth!==0&&r.hasText){const{fontFamily:d}=l,{canvasWidth:u,fontSize:f}=r;(o!==f||s!==d)&&(i.font=`${f*g(this,sa)}px ${d}`,e.prevFontSize=f,e.prevFontFamily=d);const{width:h}=i.measureText(t.textContent);h>0&&(c=`scaleX(${u*g(this,sa)/h}) ${c}`)}r.angle!==0&&(c=`rotate(${r.angle}deg) ${c}`),c.length>0&&(l.transform=c)},yd=new WeakSet,c5=function(e=null){let t=g(this,Kl).get(e||(e=""));if(!t){const r=document.createElement("canvas");r.className="hiddenCanvasElement",r.lang=e,document.body.append(r),t=r.getContext("2d",{alpha:!1,willReadFrequently:!0}),g(this,Kl).set(e,t)}return t},J3=new WeakSet,LN=function(){if(g(this,aa)!==null)return;const e=document.createElement("div");e.style.opacity=0,e.style.lineHeight=1,e.style.fontSize="1px",e.style.position="absolute",e.textContent="X",document.body.append(e),A(this,aa,e.getBoundingClientRect().height),e.remove()},ey=new WeakSet,BN=function(e,t){const r=g(this,ql).get(e);if(r)return r;const i=I(this,yd,c5).call(this,t),o=i.font;i.canvas.width=i.canvas.height=nr,i.font=`30px ${e}`;const s=i.measureText("");let l=s.fontBoundingBoxAscent,c=Math.abs(s.fontBoundingBoxDescent);if(l){const f=l/(l+c);return g(this,ql).set(e,f),i.canvas.width=i.canvas.height=0,i.font=o,f}i.strokeStyle="red",i.clearRect(0,0,nr,nr),i.strokeText("g",0,0);let d=i.getImageData(0,0,nr,nr).data;c=0;for(let f=d.length-1-3;f>=0;f-=4)if(d[f]>0){c=Math.ceil(f/4/nr);break}i.clearRect(0,0,nr,nr),i.strokeText("A",0,nr),d=i.getImageData(0,0,nr,nr).data,l=0;for(let f=0,h=d.length;f<h;f+=4)if(d[f]>0){l=nr-Math.floor(f/4/nr);break}i.canvas.width=i.canvas.height=0,i.font=o;const u=l?l/(l+c):.8;return g(this,ql).set(e,u),u},E(Kt,yd),E(Kt,J3),E(Kt,ey),E(Kt,ql,new Map),E(Kt,Kl,new Map),E(Kt,aa,null),E(Kt,gd,new Set);let w2=Kt;class v2{static textContent(e){const t=[],r={items:t,styles:Object.create(null)};return function i(o){var c;if(!o)return;let s=null;const l=o.name;if(l==="#text")s=o.value;else{if(!v2.shouldBuildText(l))return;(c=o==null?void 0:o.attributes)!=null&&c.textContent?s=o.attributes.textContent:o.value&&(s=o.value)}if(s!==null&&t.push({str:s}),o.children)for(const d of o.children)i(d)}(e),r}static shouldBuildText(e){return!(e==="textarea"||e==="input"||e==="option"||e==="select")}}const VZ=65536,FZ=mn?class extends wE{_createCanvas(e,t){return ys.get("canvas").createCanvas(e,t)}}:class extends wE{constructor({ownerDocument:e=globalThis.document,enableHWA:t=!1}={}){super({enableHWA:t}),this._document=e}_createCanvas(e,t){const r=this._document.createElement("canvas");return r.width=e,r.height=t,r}},jZ=mn?class extends vE{_fetchData(e,t){return OE(e).then(r=>({cMapData:r,compressionType:t}))}}:kE,zZ=mn?class extends bE{}:(rN=class extends bE{constructor({docId:t,ownerDocument:r=globalThis.document}={}){super();E(this,Gt);E(this,la);E(this,ca);E(this,bd);E(this,da);E(this,ny);E(this,H1);E(this,ua);E(this,Xl);E(this,Jl);E(this,U1);E(this,e0);E(this,Gl,void 0);E(this,Yl,void 0);E(this,Zi,void 0);E(this,Lo,void 0);E(this,wn,void 0);E(this,ty,void 0);E(this,Ql,0);A(this,Lo,t),A(this,wn,r)}addFilter(t){if(!t)return"none";let r=g(this,Gt,Cn).get(t);if(r)return r;const[i,o,s]=I(this,bd,d5).call(this,t),l=t.length===1?i:`${i}${o}${s}`;if(r=g(this,Gt,Cn).get(l),r)return g(this,Gt,Cn).set(t,r),r;const c=`g_${g(this,Lo)}_transfer_map_${Xn(this,Ql)._++}`,d=I(this,da,mu).call(this,c);g(this,Gt,Cn).set(t,d),g(this,Gt,Cn).set(l,d);const u=I(this,ua,gu).call(this,c);return I(this,Jl,tp).call(this,i,o,s,u),d}addHCMFilter(t,r){var m;const i=`${t}-${r}`,o="base";let s=g(this,la,hu).get(o);if((s==null?void 0:s.key)===i||(s?((m=s.filter)==null||m.remove(),s.key=i,s.url="none",s.filter=null):(s={key:i,url:"none",filter:null},g(this,la,hu).set(o,s)),!t||!r))return s.url;const l=I(this,e0,np).call(this,t);t=ue.makeHexColor(...l);const c=I(this,e0,np).call(this,r);if(r=ue.makeHexColor(...c),g(this,ca,pu).style.color="",t==="#000000"&&r==="#ffffff"||t===r)return s.url;const d=new Array(256);for(let y=0;y<=255;y++){const b=y/255;d[y]=b<=.03928?b/12.92:((b+.055)/1.055)**2.4}const u=d.join(","),f=`g_${g(this,Lo)}_hcm_filter`,h=s.filter=I(this,ua,gu).call(this,f);I(this,Jl,tp).call(this,u,u,u,h),I(this,H1,Lv).call(this,h);const p=(y,b)=>{const w=l[y]/255,v=c[y]/255,k=new Array(b+1);for(let C=0;C<=b;C++)k[C]=w+C/b*(v-w);return k.join(",")};return I(this,Jl,tp).call(this,p(0,5),p(1,5),p(2,5),h),s.url=I(this,da,mu).call(this,f),s.url}addAlphaFilter(t){let r=g(this,Gt,Cn).get(t);if(r)return r;const[i]=I(this,bd,d5).call(this,[t]),o=`alpha_${i}`;if(r=g(this,Gt,Cn).get(o),r)return g(this,Gt,Cn).set(t,r),r;const s=`g_${g(this,Lo)}_alpha_map_${Xn(this,Ql)._++}`,l=I(this,da,mu).call(this,s);g(this,Gt,Cn).set(t,l),g(this,Gt,Cn).set(o,l);const c=I(this,ua,gu).call(this,s);return I(this,U1,Bv).call(this,i,c),l}addLuminosityFilter(t){let r,i,o=g(this,Gt,Cn).get(t||"luminosity");if(o)return o;if(t?([r]=I(this,bd,d5).call(this,[t]),i=`luminosity_${r}`):i="luminosity",o=g(this,Gt,Cn).get(i),o)return g(this,Gt,Cn).set(t,o),o;const s=`g_${g(this,Lo)}_luminosity_map_${Xn(this,Ql)._++}`,l=I(this,da,mu).call(this,s);g(this,Gt,Cn).set(t,l),g(this,Gt,Cn).set(i,l);const c=I(this,ua,gu).call(this,s);return I(this,ny,_N).call(this,c),t&&I(this,U1,Bv).call(this,r,c),l}addHighlightHCMFilter(t,r,i,o,s){var v;const l=`${r}-${i}-${o}-${s}`;let c=g(this,la,hu).get(t);if((c==null?void 0:c.key)===l||(c?((v=c.filter)==null||v.remove(),c.key=l,c.url="none",c.filter=null):(c={key:l,url:"none",filter:null},g(this,la,hu).set(t,c)),!r||!i))return c.url;const[d,u]=[r,i].map(I(this,e0,np).bind(this));let f=Math.round(.2126*d[0]+.7152*d[1]+.0722*d[2]),h=Math.round(.2126*u[0]+.7152*u[1]+.0722*u[2]),[p,m]=[o,s].map(I(this,e0,np).bind(this));h<f&&([f,h,p,m]=[h,f,m,p]),g(this,ca,pu).style.color="";const y=(k,C,T)=>{const S=new Array(256),M=(h-f)/T,x=k/255,O=(C-k)/(255*T);let P=0;for(let N=0;N<=T;N++){const _=Math.round(f+N*M),V=x+N*O;for(let H=P;H<=_;H++)S[H]=V;P=_+1}for(let N=P;N<256;N++)S[N]=S[P-1];return S.join(",")},b=`g_${g(this,Lo)}_hcm_${t}_filter`,w=c.filter=I(this,ua,gu).call(this,b);return I(this,H1,Lv).call(this,w),I(this,Jl,tp).call(this,y(p[0],m[0],5),y(p[1],m[1],5),y(p[2],m[2],5),w),c.url=I(this,da,mu).call(this,b),c.url}destroy(t=!1){(!t||g(this,la,hu).size===0)&&(g(this,Zi)&&(g(this,Zi).parentNode.parentNode.remove(),A(this,Zi,null)),g(this,Yl)&&(g(this,Yl).clear(),A(this,Yl,null)),A(this,Ql,0))}},Gl=new WeakMap,Yl=new WeakMap,Zi=new WeakMap,Lo=new WeakMap,wn=new WeakMap,ty=new WeakMap,Ql=new WeakMap,Gt=new WeakSet,Cn=function(){return g(this,Yl)||A(this,Yl,new Map)},la=new WeakSet,hu=function(){return g(this,ty)||A(this,ty,new Map)},ca=new WeakSet,pu=function(){if(!g(this,Zi)){const t=g(this,wn).createElement("div"),{style:r}=t;r.visibility="hidden",r.contain="strict",r.width=r.height=0,r.position="absolute",r.top=r.left=0,r.zIndex=-1;const i=g(this,wn).createElementNS(fo,"svg");i.setAttribute("width",0),i.setAttribute("height",0),A(this,Zi,g(this,wn).createElementNS(fo,"defs")),t.append(i),i.append(g(this,Zi)),g(this,wn).body.append(t)}return g(this,Zi)},bd=new WeakSet,d5=function(t){if(t.length===1){const d=t[0],u=new Array(256);for(let h=0;h<256;h++)u[h]=d[h]/255;const f=u.join(",");return[f,f,f]}const[r,i,o]=t,s=new Array(256),l=new Array(256),c=new Array(256);for(let d=0;d<256;d++)s[d]=r[d]/255,l[d]=i[d]/255,c[d]=o[d]/255;return[s.join(","),l.join(","),c.join(",")]},da=new WeakSet,mu=function(t){if(g(this,Gl)===void 0){A(this,Gl,"");const r=g(this,wn).URL;r!==g(this,wn).baseURI&&(fm(r)?Ee('#createUrl: ignore "data:"-URL for performance reasons.'):A(this,Gl,r.split("#",1)[0]))}return`url(${g(this,Gl)}#${t})`},ny=new WeakSet,_N=function(t){const r=g(this,wn).createElementNS(fo,"feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),t.append(r)},H1=new WeakSet,Lv=function(t){const r=g(this,wn).createElementNS(fo,"feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),t.append(r)},ua=new WeakSet,gu=function(t){const r=g(this,wn).createElementNS(fo,"filter");return r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("id",t),g(this,ca,pu).append(r),r},Xl=new WeakSet,ep=function(t,r,i){const o=g(this,wn).createElementNS(fo,r);o.setAttribute("type","discrete"),o.setAttribute("tableValues",i),t.append(o)},Jl=new WeakSet,tp=function(t,r,i,o){const s=g(this,wn).createElementNS(fo,"feComponentTransfer");o.append(s),I(this,Xl,ep).call(this,s,"feFuncR",t),I(this,Xl,ep).call(this,s,"feFuncG",r),I(this,Xl,ep).call(this,s,"feFuncB",i)},U1=new WeakSet,Bv=function(t,r){const i=g(this,wn).createElementNS(fo,"feComponentTransfer");r.append(i),I(this,Xl,ep).call(this,i,"feFuncA",t)},e0=new WeakSet,np=function(t){return g(this,ca,pu).style.color=t,Bb(getComputedStyle(g(this,ca,pu)).getPropertyValue("color"))},rN),HZ=mn?class extends CE{_fetchData(e){return OE(e)}}:SE;function UZ(n={}){typeof n=="string"||n instanceof URL?n={url:n}:(n instanceof ArrayBuffer||ArrayBuffer.isView(n))&&(n={data:n});const e=new Qb,{docId:t}=e,r=n.url?function($){if($ instanceof URL)return $.href;try{return new URL($,window.location).href}catch{if(mn&&typeof $=="string")return $}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}(n.url):null,i=n.data?function($){if(mn&&typeof Buffer<"u"&&$ instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if($ instanceof Uint8Array&&$.byteLength===$.buffer.byteLength)return $;if(typeof $=="string")return dm($);if($ instanceof ArrayBuffer||ArrayBuffer.isView($)||typeof $=="object"&&!isNaN($==null?void 0:$.length))return new Uint8Array($);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}(n.data):null,o=n.httpHeaders||null,s=n.withCredentials===!0,l=n.password??null,c=n.range instanceof XE?n.range:null,d=Number.isInteger(n.rangeChunkSize)&&n.rangeChunkSize>0?n.rangeChunkSize:VZ;let u=n.worker instanceof nc?n.worker:null;const f=n.verbosity,h=typeof n.docBaseUrl!="string"||fm(n.docBaseUrl)?null:n.docBaseUrl,p=typeof n.cMapUrl=="string"?n.cMapUrl:null,m=n.cMapPacked!==!1,y=n.CMapReaderFactory||jZ,b=typeof n.standardFontDataUrl=="string"?n.standardFontDataUrl:null,w=n.StandardFontDataFactory||HZ,v=n.stopAtErrors!==!0,k=Number.isInteger(n.maxImageSize)&&n.maxImageSize>-1?n.maxImageSize:-1,C=n.isEvalSupported!==!1,T=typeof n.isOffscreenCanvasSupported=="boolean"?n.isOffscreenCanvasSupported:!mn,S=Number.isInteger(n.canvasMaxAreaInBytes)?n.canvasMaxAreaInBytes:-1,M=typeof n.disableFontFace=="boolean"?n.disableFontFace:mn,x=n.fontExtraProperties===!0,O=n.enableXfa===!0,P=n.ownerDocument||globalThis.document,N=n.disableRange===!0,_=n.disableStream===!0,V=n.disableAutoFetch===!0,H=n.pdfBug===!0,L=n.enableHWA===!0,D=c?c.length:n.length??NaN,U=typeof n.useSystemFonts=="boolean"?n.useSystemFonts:!mn&&!M,F=typeof n.useWorkerFetch=="boolean"?n.useWorkerFetch:y===kE&&w===SE&&p&&b&&h2(p,document.baseURI)&&h2(b,document.baseURI),R=n.canvasFactory||new FZ({ownerDocument:P,enableHWA:L}),G=n.filterFactory||new zZ({docId:t,ownerDocument:P});FU(f);const ne={canvasFactory:R,filterFactory:G};if(F||(ne.cMapReaderFactory=new y({baseUrl:p,isCompressed:m}),ne.standardFontDataFactory=new w({baseUrl:b})),!u){const j={verbosity:f,port:po.workerPort};u=j.port?nc.fromPort(j):new nc(j),e._worker=u}const Y={docId:t,apiVersion:"4.6.82",data:i,password:l,disableAutoFetch:V,rangeChunkSize:d,length:D,docBaseUrl:h,enableXfa:O,evaluatorOptions:{maxImageSize:k,disableFontFace:M,ignoreErrors:v,isEvalSupported:C,isOffscreenCanvasSupported:T,canvasMaxAreaInBytes:S,fontExtraProperties:x,useSystemFonts:U,cMapUrl:F?p:null,standardFontDataUrl:F?b:null}},Z={disableFontFace:M,fontExtraProperties:x,ownerDocument:P,pdfBug:H,styleElement:null,loadingParams:{disableAutoFetch:V,enableXfa:O}};return u.promise.then(function(){if(e.destroyed)throw new Error("Loading aborted");if(u.destroyed)throw new Error("Worker was destroyed");const j=u.messageHandler.sendWithPromise("GetDocRequest",Y,i?[i.buffer]:null);let $;if(c)$=new EZ(c,{disableRange:N,disableStream:_});else if(!i){if(!r)throw new Error("getDocument - no `url` parameter provided.");$=(W=>mn?function(){return typeof fetch<"u"&&typeof Response<"u"&&"body"in Response.prototype}()&&h2(W.url)?new qE(W):new LZ(W):h2(W.url)?new qE(W):new OZ(W))({url:r,length:D,httpHeaders:o,withCredentials:s,rangeChunkSize:d,disableRange:N,disableStream:_})}return j.then(W=>{if(e.destroyed)throw new Error("Loading aborted");if(u.destroyed)throw new Error("Worker was destroyed");const J=new b2(t,W,u.port),ae=new KZ(J,e,$,Z,ne);e._transport=ae,J.send("Ready",null)})}).catch(e._capability.reject),e}function QE(n){return typeof n=="object"&&Number.isInteger(n==null?void 0:n.num)&&n.num>=0&&Number.isInteger(n==null?void 0:n.gen)&&n.gen>=0}const iy=class iy{constructor(){this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId="d"+Xn(iy,ry)._++,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){var e,t,r;this.destroyed=!0;try{(e=this._worker)!=null&&e.port&&(this._worker._pendingDestroy=!0),await((t=this._transport)==null?void 0:t.destroy())}catch(i){throw(r=this._worker)!=null&&r.port&&delete this._worker._pendingDestroy,i}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}};ry=new WeakMap,E(iy,ry,0);let Qb=iy;class XE{constructor(e,t,r=!1,i=null){this.length=e,this.initialData=t,this.progressiveDone=r,this.contentDispositionFilename=i,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(const r of this._rangeListeners)r(e,t)}onDataProgress(e,t){this._readyCapability.promise.then(()=>{for(const r of this._progressListeners)r(e,t)})}onDataProgressiveRead(e){this._readyCapability.promise.then(()=>{for(const t of this._progressiveReadListeners)t(e)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const e of this._progressiveDoneListeners)e()})}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){Mt("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}class ZZ{constructor(e,t){this._pdfInfo=e,this._transport=t}get annotationStorage(){return this._transport.annotationStorage}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return De(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:e="display"}={}){const{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getOptionalContentConfig(t)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(e=!1){return this._transport.startCleanup(e||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(e){return this._transport.cachedPageNumber(e)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}class WZ{constructor(e,t,r,i=!1){E(this,ha);E(this,wd);E(this,fa,null);E(this,Bo,!1);this._pageIndex=e,this._pageInfo=t,this._transport=r,this._stats=i?new EE:null,this._pdfBug=i,this.commonObjs=r.commonObjs,this.objs=new JE,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:e,rotation:t=this.rotate,offsetX:r=0,offsetY:i=0,dontFlip:o=!1}={}){return new f2({viewBox:this.view,scale:e,rotation:t,offsetX:r,offsetY:i,dontFlip:o})}getAnnotations({intent:e="display"}={}){const{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getAnnotations(this._pageIndex,t)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return De(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var e;return((e=this._transport._htmlForXfa)==null?void 0:e.children[this._pageIndex])||null}render({canvasContext:e,viewport:t,intent:r="display",annotationMode:i=hs.ENABLE,transform:o=null,background:s=null,optionalContentConfigPromise:l=null,annotationCanvasMap:c=null,pageColors:d=null,printAnnotationStorage:u=null,isEditing:f=!1}){var C,T;(C=this._stats)==null||C.time("Overall");const h=this._transport.getRenderingIntent(r,i,u,f),{renderingIntent:p,cacheKey:m}=h;A(this,Bo,!1),I(this,wd,u5).call(this),l||(l=this._transport.getOptionalContentConfig(p));let y=this._intentStates.get(m);y||(y=Object.create(null),this._intentStates.set(m,y)),y.streamReaderCancelTimeout&&(clearTimeout(y.streamReaderCancelTimeout),y.streamReaderCancelTimeout=null);const b=!!(p&rm);y.displayReadyCapability||(y.displayReadyCapability=Promise.withResolvers(),y.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(T=this._stats)==null||T.time("Page Request"),this._pumpOperatorList(h));const w=S=>{var M;y.renderTasks.delete(v),(this._maybeCleanupAfterRender||b)&&A(this,Bo,!0),I(this,ha,yu).call(this,!b),S?(v.capability.reject(S),this._abortOperatorList({intentState:y,reason:S instanceof Error?S:new Error(S)})):v.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),(M=globalThis.Stats)!=null&&M.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},v=new Xb({callback:w,params:{canvasContext:e,viewport:t,transform:o,background:s},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:c,operatorList:y.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!b,pdfBug:this._pdfBug,pageColors:d});(y.renderTasks||(y.renderTasks=new Set)).add(v);const k=v.task;return Promise.all([y.displayReadyCapability.promise,l]).then(([S,M])=>{var x;if(this.destroyed)w();else{if((x=this._stats)==null||x.time("Rendering"),!(M.renderingIntent&p))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");v.initializeGraphics({transparency:S,optionalContentConfig:M}),v.operatorListChanged()}}).catch(w),k}getOperatorList({intent:e="display",annotationMode:t=hs.ENABLE,printAnnotationStorage:r=null,isEditing:i=!1}={}){var c;const o=this._transport.getRenderingIntent(e,t,r,i,!0);let s,l=this._intentStates.get(o.cacheKey);return l||(l=Object.create(null),this._intentStates.set(o.cacheKey,l)),l.opListReadCapability||(s=Object.create(null),s.operatorListChanged=function(){l.operatorList.lastChunk&&(l.opListReadCapability.resolve(l.operatorList),l.renderTasks.delete(s))},l.opListReadCapability=Promise.withResolvers(),(l.renderTasks||(l.renderTasks=new Set)).add(s),l.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(c=this._stats)==null||c.time("Page Request"),this._pumpOperatorList(o)),l.opListReadCapability.promise}streamTextContent({includeMarkedContent:e=!1,disableNormalization:t=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:e===!0,disableNormalization:t===!0},{highWaterMark:100,size:r=>r.items.length})}getTextContent(e={}){if(this._transport._htmlForXfa)return this.getXfa().then(r=>v2.textContent(r));const t=this.streamTextContent(e);return new Promise(function(r,i){const o=t.getReader(),s={items:[],styles:Object.create(null),lang:null};(function l(){o.read().then(function({value:c,done:d}){d?r(s):(s.lang??(s.lang=c.lang),Object.assign(s.styles,c.styles),s.items.push(...c.items),l())},i)})()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const e=[];for(const t of this._intentStates.values())if(this._abortOperatorList({intentState:t,reason:new Error("Page was destroyed."),force:!0}),!t.opListReadCapability)for(const r of t.renderTasks)e.push(r.completed),r.cancel();return this.objs.clear(),A(this,Bo,!1),I(this,wd,u5).call(this),Promise.all(e)}cleanup(e=!1){A(this,Bo,!0);const t=I(this,ha,yu).call(this,!1);return e&&t&&this._stats&&(this._stats=new EE),t}_startRenderPage(e,t){var i,o;const r=this._intentStates.get(t);r&&((i=this._stats)==null||i.timeEnd("Page Request"),(o=r.displayReadyCapability)==null||o.resolve(e))}_renderPageChunk(e,t){for(let r=0,i=e.length;r<i;r++)t.operatorList.fnArray.push(e.fnArray[r]),t.operatorList.argsArray.push(e.argsArray[r]);t.operatorList.lastChunk=e.lastChunk,t.operatorList.separateAnnots=e.separateAnnots;for(const r of t.renderTasks)r.operatorListChanged();e.lastChunk&&I(this,ha,yu).call(this,!0)}_pumpOperatorList({renderingIntent:e,cacheKey:t,annotationStorageSerializable:r,modifiedIds:i}){const{map:o,transfer:s}=r,l=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:e,cacheKey:t,annotationStorage:o,modifiedIds:i},s).getReader(),c=this._intentStates.get(t);c.streamReader=l;const d=()=>{l.read().then(({value:u,done:f})=>{f?c.streamReader=null:this._transport.destroyed||(this._renderPageChunk(u,c),d())},u=>{if(c.streamReader=null,!this._transport.destroyed){if(c.operatorList){c.operatorList.lastChunk=!0;for(const f of c.renderTasks)f.operatorListChanged();I(this,ha,yu).call(this,!0)}if(c.displayReadyCapability)c.displayReadyCapability.reject(u);else{if(!c.opListReadCapability)throw u;c.opListReadCapability.reject(u)}}})};d()}_abortOperatorList({intentState:e,reason:t,force:r=!1}){if(e.streamReader){if(e.streamReaderCancelTimeout&&(clearTimeout(e.streamReaderCancelTimeout),e.streamReaderCancelTimeout=null),!r){if(e.renderTasks.size>0)return;if(t instanceof Pb){let i=100;t.extraDelay>0&&t.extraDelay<1e3&&(i+=t.extraDelay),e.streamReaderCancelTimeout=setTimeout(()=>{e.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:e,reason:t,force:!0})},i);return}}if(e.streamReader.cancel(new Ka(t.message)).catch(()=>{}),e.streamReader=null,!this._transport.destroyed){for(const[i,o]of this._intentStates)if(o===e){this._intentStates.delete(i);break}this.cleanup()}}}get stats(){return this._stats}}fa=new WeakMap,Bo=new WeakMap,ha=new WeakSet,yu=function(e=!1){if(I(this,wd,u5).call(this),!g(this,Bo)||this.destroyed)return!1;if(e)return A(this,fa,setTimeout(()=>{A(this,fa,null),I(this,ha,yu).call(this,!1)},5e3)),!1;for(const{renderTasks:t,operatorList:r}of this._intentStates.values())if(t.size>0||!r.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),A(this,Bo,!1),!0},wd=new WeakSet,u5=function(){g(this,fa)&&(clearTimeout(g(this,fa)),A(this,fa,null))};class qZ{constructor(){E(this,t0,new Set);E(this,oy,Promise.resolve())}postMessage(e,t){const r={data:structuredClone(e,t?{transfer:t}:null)};g(this,oy).then(()=>{for(const i of g(this,t0))i.call(this,r)})}addEventListener(e,t){g(this,t0).add(t)}removeEventListener(e,t){g(this,t0).delete(t)}terminate(){g(this,t0).clear()}}t0=new WeakMap,oy=new WeakMap;const nt=class nt{constructor({name:e=null,port:t=null,verbosity:r=jU()}={}){E(this,vd);var i;if(this.name=e,this.destroyed=!1,this.verbosity=r,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,t){if((i=g(nt,r0))!=null&&i.has(t))throw new Error("Cannot use more than one PDFWorker per port.");(g(nt,r0)||A(nt,r0,new WeakMap)).set(t,this),this._initializeFromPort(t)}else this._initialize()}get promise(){return mn?Promise.all([ys.promise,this._readyCapability.promise]):this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new b2("main","worker",e),this._messageHandler.on("ready",function(){}),I(this,vd,f5).call(this)}_initialize(){if(g(nt,n0)||g(nt,Cd,h5)){this._setupFakeWorker();return}let{workerSrc:e}=nt;try{nt._isSameOrigin(window.location.href,e)||(e=nt._createCDNWrapper(new URL(e,window.location).href));const t=new Worker(e,{type:"module"}),r=new b2("main","worker",t),i=()=>{o.abort(),r.destroy(),t.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},o=new AbortController;t.addEventListener("error",()=>{this._webWorker||i()},{signal:o.signal}),r.on("test",l=>{o.abort(),!this.destroyed&&l?(this._messageHandler=r,this._port=t,this._webWorker=t,I(this,vd,f5).call(this)):i()}),r.on("ready",l=>{if(o.abort(),this.destroyed)i();else try{s()}catch{this._setupFakeWorker()}});const s=()=>{const l=new Uint8Array;r.send("test",l,[l.buffer])};s();return}catch{lm("The worker has been disabled.")}this._setupFakeWorker()}_setupFakeWorker(){g(nt,n0)||(Ee("Setting up fake worker."),A(nt,n0,!0)),nt._setupFakeWorkerGlobal.then(e=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const t=new qZ;this._port=t;const r="fake"+Xn(nt,sy)._++,i=new b2(r+"_worker",r,t);e.setup(i,t),this._messageHandler=new b2(r,r+"_worker",t),I(this,vd,f5).call(this)}).catch(e=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${e.message}".`))})}destroy(){var e;this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),(e=g(nt,r0))==null||e.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(e){var r;if(!(e!=null&&e.port))throw new Error("PDFWorker.fromPort - invalid method signature.");const t=(r=g(this,r0))==null?void 0:r.get(e.port);if(t){if(t._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return t}return new nt(e)}static get workerSrc(){if(po.workerSrc)return po.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return De(this,"_setupFakeWorkerGlobal",(async()=>g(this,Cd,h5)?g(this,Cd,h5):(await import(this.workerSrc)).WorkerMessageHandler)())}};sy=new WeakMap,n0=new WeakMap,r0=new WeakMap,vd=new WeakSet,f5=function(){this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})},Cd=new WeakSet,h5=function(){var e;try{return((e=globalThis.pdfjsWorker)==null?void 0:e.WorkerMessageHandler)||null}catch{return null}},E(nt,Cd),E(nt,sy,0),E(nt,n0,!1),E(nt,r0,void 0),mn&&(A(nt,n0,!0),po.workerSrc||(po.workerSrc="./pdf.worker.mjs")),nt._isSameOrigin=(e,t)=>{let r;try{if(r=new URL(e),!r.origin||r.origin==="null")return!1}catch{return!1}const i=new URL(t,r);return r.origin===i.origin},nt._createCDNWrapper=e=>{const t=`await import("${e}");`;return URL.createObjectURL(new Blob([t],{type:"text/javascript"}))};let nc=nt;class KZ{constructor(e,t,r,i,o){E(this,i0);E(this,_o,new Map);E(this,Wi,new Map);E(this,kd,new Map);E(this,Sd,new Map);E(this,qi,null);this.messageHandler=e,this.loadingTask=t,this.commonObjs=new JE,this.fontLoader=new lZ({ownerDocument:i.ownerDocument,styleElement:i.styleElement}),this.loadingParams=i.loadingParams,this._params=i,this.canvasFactory=o.canvasFactory,this.filterFactory=o.filterFactory,this.cMapReaderFactory=o.cMapReaderFactory,this.standardFontDataFactory=o.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=r,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}get annotationStorage(){return De(this,"annotationStorage",new Fb)}getRenderingIntent(e,t=hs.ENABLE,r=null,i=!1,o=!1){let s=Eb,l=Vb;switch(e){case"any":s=lU;break;case"display":break;case"print":s=rm;break;default:Ee(`getRenderingIntent - invalid intent: ${e}`)}const c=s&rm&&r instanceof xE?r:this.annotationStorage;switch(t){case hs.DISABLE:s+=uU;break;case hs.ENABLE:break;case hs.ENABLE_FORMS:s+=cU;break;case hs.ENABLE_STORAGE:s+=dU,l=c.serializable;break;default:Ee(`getRenderingIntent - invalid annotationMode: ${t}`)}i&&(s+=fU),o&&(s+=hU);const{ids:d,hash:u}=c.modifiedIds;return{renderingIntent:s,cacheKey:[s,l.hash,u].join("_"),annotationStorageSerializable:l,modifiedIds:d}}destroy(){var r;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),(r=g(this,qi))==null||r.reject(new Error("Worker was destroyed during onPassword callback"));const e=[];for(const i of g(this,Wi).values())e.push(i._destroy());g(this,Wi).clear(),g(this,kd).clear(),g(this,Sd).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const t=this.messageHandler.sendWithPromise("Terminate",null);return e.push(t),Promise.all(e).then(()=>{var i;this.commonObjs.clear(),this.fontLoader.clear(),g(this,_o).clear(),this.filterFactory.destroy(),w2.cleanup(),(i=this._networkStream)==null||i.cancelAllRequests(new Ka("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:e,loadingTask:t}=this;e.on("GetReader",(r,i)=>{xt(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=o=>{this._lastProgress={loaded:o.loaded,total:o.total}},i.onPull=()=>{this._fullReader.read().then(function({value:o,done:s}){s?i.close():(xt(o instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(o),1,[o]))}).catch(o=>{i.error(o)})},i.onCancel=o=>{this._fullReader.cancel(o),i.ready.catch(s=>{if(!this.destroyed)throw s})}}),e.on("ReaderHeadersReady",r=>{const i=Promise.withResolvers(),o=this._fullReader;return o.headersReady.then(()=>{var s;(!o.isStreamingSupported||!o.isRangeSupported)&&(this._lastProgress&&((s=t.onProgress)==null||s.call(t,this._lastProgress)),o.onProgress=l=>{var c;(c=t.onProgress)==null||c.call(t,{loaded:l.loaded,total:l.total})}),i.resolve({isStreamingSupported:o.isStreamingSupported,isRangeSupported:o.isRangeSupported,contentLength:o.contentLength})},i.reject),i.promise}),e.on("GetRangeReader",(r,i)=>{xt(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const o=this._networkStream.getRangeReader(r.begin,r.end);o?(i.onPull=()=>{o.read().then(function({value:s,done:l}){l?i.close():(xt(s instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(s),1,[s]))}).catch(s=>{i.error(s)})},i.onCancel=s=>{o.cancel(s),i.ready.catch(l=>{if(!this.destroyed)throw l})}):i.close()}),e.on("GetDoc",({pdfInfo:r})=>{this._numPages=r.numPages,this._htmlForXfa=r.htmlForXfa,delete r.htmlForXfa,t._capability.resolve(new ZZ(r,this))}),e.on("DocException",function(r){let i;switch(r.name){case"PasswordException":i=new Tb(r.message,r.code);break;case"InvalidPDFException":i=new pE(r.message);break;case"MissingPDFException":i=new qa(r.message);break;case"UnexpectedResponseException":i=new cm(r.message,r.status);break;case"UnknownErrorException":i=new Ib(r.message,r.details);break;default:Mt("DocException - expected a valid Error.")}t._capability.reject(i)}),e.on("PasswordRequest",r=>{if(A(this,qi,Promise.withResolvers()),t.onPassword){const i=o=>{o instanceof Error?g(this,qi).reject(o):g(this,qi).resolve({password:o})};try{t.onPassword(i,r.code)}catch(o){g(this,qi).reject(o)}}else g(this,qi).reject(new Tb(r.message,r.code));return g(this,qi).promise}),e.on("DataLoaded",r=>{var i;(i=t.onProgress)==null||i.call(t,{loaded:r.length,total:r.length}),this.downloadInfoCapability.resolve(r)}),e.on("StartRenderPage",r=>{this.destroyed||g(this,Wi).get(r.pageIndex)._startRenderPage(r.transparency,r.cacheKey)}),e.on("commonobj",([r,i,o])=>{var s;if(this.destroyed||this.commonObjs.has(r))return null;switch(i){case"Font":const{disableFontFace:l,fontExtraProperties:c,pdfBug:d}=this._params;if("error"in o){const p=o.error;Ee(`Error during font loading: ${p}`),this.commonObjs.resolve(r,p);break}const u=d&&((s=globalThis.FontInspector)!=null&&s.enabled)?(p,m)=>globalThis.FontInspector.fontAdded(p,m):null,f=new cZ(o,{disableFontFace:l,inspectFont:u});this.fontLoader.bind(f).catch(()=>e.sendWithPromise("FontFallback",{id:r})).finally(()=>{!c&&f.data&&(f.data=null),this.commonObjs.resolve(r,f)});break;case"CopyLocalImage":const{imageRef:h}=o;xt(h,"The imageRef must be defined.");for(const p of g(this,Wi).values())for(const[,m]of p.objs)if((m==null?void 0:m.ref)===h)return m.dataLen?(this.commonObjs.resolve(r,structuredClone(m)),m.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(r,o);break;default:throw new Error(`Got unknown common object type ${i}`)}return null}),e.on("obj",([r,i,o,s])=>{var c;if(this.destroyed)return;const l=g(this,Wi).get(i);if(!l.objs.has(r))if(l._intentStates.size!==0)switch(o){case"Image":l.objs.resolve(r,s),(s==null?void 0:s.dataLen)>1e7&&(l._maybeCleanupAfterRender=!0);break;case"Pattern":l.objs.resolve(r,s);break;default:throw new Error(`Got unknown object type ${o}`)}else(c=s==null?void 0:s.bitmap)==null||c.close()}),e.on("DocProgress",r=>{var i;this.destroyed||((i=t.onProgress)==null||i.call(t,{loaded:r.loaded,total:r.total}))}),e.on("FetchBuiltInCMap",r=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(r):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),e.on("FetchStandardFontData",r=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(r):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var r;this.annotationStorage.size<=0&&Ee("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:e,transfer:t}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:e,filename:((r=this._fullReader)==null?void 0:r.filename)??null},t).finally(()=>{this.annotationStorage.resetModified()})}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request."));const t=e-1,r=g(this,kd).get(t);if(r)return r;const i=this.messageHandler.sendWithPromise("GetPage",{pageIndex:t}).then(o=>{if(this.destroyed)throw new Error("Transport destroyed");o.refStr&&g(this,Sd).set(o.refStr,e);const s=new WZ(t,o,this,this._params.pdfBug);return g(this,Wi).set(t,s),s});return g(this,kd).set(t,i),i}getPageIndex(e){return QE(e)?this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}getFieldObjects(){return I(this,i0,rp).call(this,"GetFieldObjects")}hasJSActions(){return I(this,i0,rp).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return typeof e!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return I(this,i0,rp).call(this,"GetDocJSActions")}getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}getStructTree(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(e){return I(this,i0,rp).call(this,"GetOptionalContentConfig").then(t=>new SZ(t,e))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const e="GetMetadata",t=g(this,_o).get(e);if(t)return t;const r=this.messageHandler.sendWithPromise(e,null).then(i=>{var o,s;return{info:i[0],metadata:i[1]?new CZ(i[1]):null,contentDispositionFilename:((o=this._fullReader)==null?void 0:o.filename)??null,contentLength:((s=this._fullReader)==null?void 0:s.contentLength)??null}});return g(this,_o).set(e,r),r}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(e=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const t of g(this,Wi).values())if(!t.cleanup())throw new Error(`startCleanup: Page ${t.pageNumber} is currently rendering.`);this.commonObjs.clear(),e||this.fontLoader.clear(),g(this,_o).clear(),this.filterFactory.destroy(!0),w2.cleanup()}}cachedPageNumber(e){if(!QE(e))return null;const t=e.gen===0?`${e.num}R`:`${e.num}R${e.gen}`;return g(this,Sd).get(t)??null}}_o=new WeakMap,Wi=new WeakMap,kd=new WeakMap,Sd=new WeakMap,qi=new WeakMap,i0=new WeakSet,rp=function(e,t=null){const r=g(this,_o).get(e);if(r)return r;const i=this.messageHandler.sendWithPromise(e,t);return g(this,_o).set(e,i),i};const wm=Symbol("INITIAL_DATA");class JE{constructor(){E(this,Z1);E(this,oi,Object.create(null))}get(e,t=null){if(t){const i=I(this,Z1,_v).call(this,e);return i.promise.then(()=>t(i.data)),null}const r=g(this,oi)[e];if(!r||r.data===wm)throw new Error(`Requesting object that isn't resolved yet ${e}.`);return r.data}has(e){const t=g(this,oi)[e];return!!t&&t.data!==wm}resolve(e,t=null){const r=I(this,Z1,_v).call(this,e);r.data=t,r.resolve()}clear(){var e;for(const t in g(this,oi)){const{data:r}=g(this,oi)[t];(e=r==null?void 0:r.bitmap)==null||e.close()}A(this,oi,Object.create(null))}*[Symbol.iterator](){for(const e in g(this,oi)){const{data:t}=g(this,oi)[e];t!==wm&&(yield[e,t])}}}oi=new WeakMap,Z1=new WeakSet,_v=function(e){var t;return(t=g(this,oi))[e]||(t[e]={...Promise.withResolvers(),data:wm})};class GZ{constructor(e){E(this,pa,null);A(this,pa,e),this.onContinue=null}get promise(){return g(this,pa).capability.promise}cancel(e=0){g(this,pa).cancel(null,e)}get separateAnnots(){const{separateAnnots:e}=g(this,pa).operatorList;if(!e)return!1;const{annotationCanvasMap:t}=g(this,pa);return e.form||e.canvas&&(t==null?void 0:t.size)>0}}pa=new WeakMap;const s0=class s0{constructor({callback:e,params:t,objs:r,commonObjs:i,annotationCanvasMap:o,operatorList:s,pageIndex:l,canvasFactory:c,filterFactory:d,useRequestAnimationFrame:u=!1,pdfBug:f=!1,pageColors:h=null}){E(this,ma,null);this.callback=e,this.params=t,this.objs=r,this.commonObjs=i,this.annotationCanvasMap=o,this.operatorListIdx=null,this.operatorList=s,this._pageIndex=l,this.canvasFactory=c,this.filterFactory=d,this._pdfBug=f,this.pageColors=h,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=u===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new GZ(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=t.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:e=!1,optionalContentConfig:t}){var l,c;if(this.cancelled)return;if(this._canvas){if(g(s0,o0).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");g(s0,o0).add(this._canvas)}this._pdfBug&&((l=globalThis.StepperManager)!=null&&l.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:r,viewport:i,transform:o,background:s}=this.params;this.gfx=new tc(r,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:t},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:o,viewport:i,transparency:e,background:s}),this.operatorListIdx=0,this.graphicsReady=!0,(c=this.graphicsReadyCallback)==null||c.call(this)}cancel(e=null,t=0){var r;this.running=!1,this.cancelled=!0,(r=this.gfx)==null||r.endDrawing(),g(this,ma)&&(window.cancelAnimationFrame(g(this,ma)),A(this,ma,null)),g(s0,o0).delete(this._canvas),this.callback(e||new Pb(`Rendering cancelled, page ${this._pageIndex+1}`,t))}operatorListChanged(){var e;this.graphicsReady?((e=this.stepper)==null||e.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?A(this,ma,window.requestAnimationFrame(()=>{A(this,ma,null),this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),g(s0,o0).delete(this._canvas),this.callback())))}};ma=new WeakMap,o0=new WeakMap,E(s0,o0,new WeakSet);let Xb=s0;const YZ="4.6.82",QZ="9b541910f";Le(670);function eM(n){return Math.floor(255*Math.max(0,Math.min(1,n))).toString(16).padStart(2,"0")}function C2(n){return Math.max(0,Math.min(255,255*n))}class tM{static CMYK_G([e,t,r,i]){return["G",1-Math.min(1,.3*e+.59*r+.11*t+i)]}static G_CMYK([e]){return["CMYK",0,0,0,1-e]}static G_RGB([e]){return["RGB",e,e,e]}static G_rgb([e]){return[e=C2(e),e,e]}static G_HTML([e]){const t=eM(e);return`#${t}${t}${t}`}static RGB_G([e,t,r]){return["G",.3*e+.59*t+.11*r]}static RGB_rgb(e){return e.map(C2)}static RGB_HTML(e){return`#${e.map(eM).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([e,t,r,i]){return["RGB",1-Math.min(1,e+i),1-Math.min(1,r+i),1-Math.min(1,t+i)]}static CMYK_rgb([e,t,r,i]){return[C2(1-Math.min(1,e+i)),C2(1-Math.min(1,r+i)),C2(1-Math.min(1,t+i))]}static CMYK_HTML(e){const t=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(t)}static RGB_CMYK([e,t,r]){const i=1-e,o=1-t,s=1-r;return["CMYK",i,o,s,Math.min(i,o,s)]}}class nM{static setupStorage(e,t,r,i,o){const s=i.getValue(t,{value:null});switch(r.name){case"textarea":if(s.value!==null&&(e.textContent=s.value),o==="print")break;e.addEventListener("input",l=>{i.setValue(t,{value:l.target.value})});break;case"input":if(r.attributes.type==="radio"||r.attributes.type==="checkbox"){if(s.value===r.attributes.xfaOn?e.setAttribute("checked",!0):s.value===r.attributes.xfaOff&&e.removeAttribute("checked"),o==="print")break;e.addEventListener("change",l=>{i.setValue(t,{value:l.target.checked?l.target.getAttribute("xfaOn"):l.target.getAttribute("xfaOff")})})}else{if(s.value!==null&&e.setAttribute("value",s.value),o==="print")break;e.addEventListener("input",l=>{i.setValue(t,{value:l.target.value})})}break;case"select":if(s.value!==null){e.setAttribute("value",s.value);for(const l of r.children)l.attributes.value===s.value?l.attributes.selected=!0:l.attributes.hasOwnProperty("selected")&&delete l.attributes.selected}e.addEventListener("input",l=>{const c=l.target.options,d=c.selectedIndex===-1?"":c[c.selectedIndex].value;i.setValue(t,{value:d})})}}static setAttributes({html:e,element:t,storage:r=null,intent:i,linkService:o}){const{attributes:s}=t,l=e instanceof HTMLAnchorElement;s.type==="radio"&&(s.name=`${s.name}-${i}`);for(const[c,d]of Object.entries(s))if(d!=null)switch(c){case"class":d.length&&e.setAttribute(c,d.join(" "));break;case"dataId":break;case"id":e.setAttribute("data-element-id",d);break;case"style":Object.assign(e.style,d);break;case"textContent":e.textContent=d;break;default:(!l||c!=="href"&&c!=="newWindow")&&e.setAttribute(c,d)}l&&o.addLinkAttributes(e,s.href,s.newWindow),r&&s.dataId&&this.setupStorage(e,s.dataId,t,r)}static render(e){var f,h;const t=e.annotationStorage,r=e.linkService,i=e.xfaHtml,o=e.intent||"display",s=document.createElement(i.name);i.attributes&&this.setAttributes({html:s,element:i,intent:o,linkService:r});const l=o!=="richText",c=e.div;if(c.append(s),e.viewport){const p=`matrix(${e.viewport.transform.join(",")})`;c.style.transform=p}l&&c.setAttribute("class","xfaLayer xfaFont");const d=[];if(i.children.length===0){if(i.value){const p=document.createTextNode(i.value);s.append(p),l&&v2.shouldBuildText(i.name)&&d.push(p)}return{textDivs:d}}const u=[[i,-1,s]];for(;u.length>0;){const[p,m,y]=u.at(-1);if(m+1===p.children.length){u.pop();continue}const b=p.children[++u.at(-1)[1]];if(b===null)continue;const{name:w}=b;if(w==="#text"){const k=document.createTextNode(b.value);d.push(k),y.append(k);continue}const v=(f=b==null?void 0:b.attributes)!=null&&f.xmlns?document.createElementNS(b.attributes.xmlns,w):document.createElement(w);if(y.append(v),b.attributes&&this.setAttributes({html:v,element:b,storage:t,intent:o,linkService:r}),((h=b.children)==null?void 0:h.length)>0)u.push([b,-1,v]);else if(b.value){const k=document.createTextNode(b.value);l&&v2.shouldBuildText(w)&&d.push(k),v.append(k)}}for(const p of c.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))p.setAttribute("readOnly",!0);return{textDivs:d}}static update(e){const t=`matrix(${e.viewport.transform.join(",")})`;e.div.style.transform=t,e.div.hidden=!1}}const k2=1e3,Xa=new WeakSet;function mo(n){return{width:n[2]-n[0],height:n[3]-n[1]}}class XZ{static create(e){switch(e.data.annotationType){case bU:return new rM(e);case yU:return new JZ(e);case PU:switch(e.data.fieldType){case"Tx":return new eW(e);case"Btn":return e.data.radioButton?new iM(e):e.data.checkBox?new nW(e):new rW(e);case"Ch":return new iW(e);case"Sig":return new tW(e)}return new Ja(e);case hE:return new Jb(e);case wU:return new oM(e);case vU:return new sW(e);case CU:return new aW(e);case kU:return new lW(e);case EU:return new sM(e);case OU:return new dW(e);case DU:return new aM(e);case SU:return new cW(e);case MU:return new uW(e);case AU:return new fW(e);case TU:return new hW(e);case IU:return new pW(e);case xU:return new lM(e);case NU:return new mW(e);default:return new wt(e)}}}const cv=class cv{constructor(e,{isRenderable:t=!1,ignoreBorder:r=!1,createQuadrilaterals:i=!1}={}){E(this,W1);E(this,a0,null);E(this,Ed,!1);E(this,Md,null);this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,this.parent=e.parent,t&&(this.container=this._createContainer(r)),i&&this._createQuadrilaterals()}static _hasPopupData({titleObj:e,contentsObj:t,richText:r}){return!!(e!=null&&e.str||t!=null&&t.str||r!=null&&r.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return cv._hasPopupData(this.data)}updateEdited(e){var r;if(!this.container)return;g(this,a0)||A(this,a0,{rect:this.data.rect.slice(0)});const{rect:t}=e;t&&I(this,W1,Rv).call(this,t),(r=g(this,Md))==null||r.popup.updateEdited(e)}resetEdited(){var e;g(this,a0)&&(I(this,W1,Rv).call(this,g(this,a0).rect),(e=g(this,Md))==null||e.popup.resetEdited(),A(this,a0,null))}_createContainer(e){const{data:t,parent:{page:r,viewport:i}}=this,o=document.createElement("section");o.setAttribute("data-annotation-id",t.id),this instanceof Ja||(o.tabIndex=k2);const{style:s}=o;if(s.zIndex=this.parent.zIndex++,t.popupRef&&o.setAttribute("aria-haspopup","dialog"),t.alternativeText&&(o.title=t.alternativeText),t.noRotate&&o.classList.add("norotate"),!t.rect||this instanceof Jb){const{rotation:y}=t;return t.hasOwnCanvas||y===0||this.setRotation(y,o),o}const{width:l,height:c}=mo(t.rect);if(!e&&t.borderStyle.width>0){s.borderWidth=`${t.borderStyle.width}px`;const y=t.borderStyle.horizontalCornerRadius,b=t.borderStyle.verticalCornerRadius;if(y>0||b>0){const v=`calc(${y}px * var(--scale-factor)) / calc(${b}px * var(--scale-factor))`;s.borderRadius=v}else if(this instanceof iM){const v=`calc(${l}px * var(--scale-factor)) / calc(${c}px * var(--scale-factor))`;s.borderRadius=v}switch(t.borderStyle.style){case LU:s.borderStyle="solid";break;case BU:s.borderStyle="dashed";break;case _U:Ee("Unimplemented border style: beveled");break;case RU:Ee("Unimplemented border style: inset");break;case $U:s.borderBottomStyle="solid"}const w=t.borderColor||null;w?(A(this,Ed,!0),s.borderColor=ue.makeHexColor(0|w[0],0|w[1],0|w[2])):s.borderWidth=0}const d=ue.normalizeRect([t.rect[0],r.view[3]-t.rect[1]+r.view[1],t.rect[2],r.view[3]-t.rect[3]+r.view[1]]),{pageWidth:u,pageHeight:f,pageX:h,pageY:p}=i.rawDims;s.left=100*(d[0]-h)/u+"%",s.top=100*(d[1]-p)/f+"%";const{rotation:m}=t;return t.hasOwnCanvas||m===0?(s.width=100*l/u+"%",s.height=100*c/f+"%"):this.setRotation(m,o),o}setRotation(e,t=this.container){if(!this.data.rect)return;const{pageWidth:r,pageHeight:i}=this.parent.viewport.rawDims,{width:o,height:s}=mo(this.data.rect);let l,c;e%180==0?(l=100*o/r,c=100*s/i):(l=100*s/r,c=100*o/i),t.style.width=`${l}%`,t.style.height=`${c}%`,t.setAttribute("data-main-rotation",(360-e)%360)}get _commonActions(){const e=(t,r,i)=>{const o=i.detail[t],s=o[0],l=o.slice(1);i.target.style[r]=tM[`${s}_HTML`](l),this.annotationStorage.setValue(this.data.id,{[r]:tM[`${s}_rgb`](l)})};return De(this,"_commonActions",{display:t=>{const{display:r}=t.detail,i=r%2==1;this.container.style.visibility=i?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:i,noPrint:r===1||r===2})},print:t=>{this.annotationStorage.setValue(this.data.id,{noPrint:!t.detail.print})},hidden:t=>{const{hidden:r}=t.detail;this.container.style.visibility=r?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:r,noView:r})},focus:t=>{setTimeout(()=>t.target.focus({preventScroll:!1}),0)},userName:t=>{t.target.title=t.detail.userName},readonly:t=>{t.target.disabled=t.detail.readonly},required:t=>{this._setRequired(t.target,t.detail.required)},bgColor:t=>{e("bgColor","backgroundColor",t)},fillColor:t=>{e("fillColor","backgroundColor",t)},fgColor:t=>{e("fgColor","color",t)},textColor:t=>{e("textColor","color",t)},borderColor:t=>{e("borderColor","borderColor",t)},strokeColor:t=>{e("strokeColor","borderColor",t)},rotation:t=>{const r=t.detail.rotation;this.setRotation(r),this.annotationStorage.setValue(this.data.id,{rotation:r})}})}_dispatchEventFromSandbox(e,t){const r=this._commonActions;for(const i of Object.keys(t.detail)){const o=e[i]||r[i];o==null||o(t)}}_setDefaultPropertiesFromJS(e){if(!this.enableScripting)return;const t=this.annotationStorage.getRawValue(this.data.id);if(!t)return;const r=this._commonActions;for(const[i,o]of Object.entries(t)){const s=r[i];s&&(s({detail:{[i]:o},target:e}),delete t[i])}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:e}=this.data;if(!e)return;const[t,r,i,o]=this.data.rect.map(y=>Math.fround(y));if(e.length===8){const[y,b,w,v]=e.subarray(2,6);if(i===y&&o===b&&t===w&&r===v)return}const{style:s}=this.container;let l;if(g(this,Ed)){const{borderColor:y,borderWidth:b}=s;s.borderWidth=0,l=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${y}" stroke-width="${b}">`],this.container.classList.add("hasBorder")}const c=i-t,d=o-r,{svgFactory:u}=this,f=u.createElement("svg");f.classList.add("quadrilateralsContainer"),f.setAttribute("width",0),f.setAttribute("height",0);const h=u.createElement("defs");f.append(h);const p=u.createElement("clipPath"),m=`clippath_${this.data.id}`;p.setAttribute("id",m),p.setAttribute("clipPathUnits","objectBoundingBox"),h.append(p);for(let y=2,b=e.length;y<b;y+=8){const w=e[y],v=e[y+1],k=e[y+2],C=e[y+3],T=u.createElement("rect"),S=(k-t)/c,M=(o-v)/d,x=(w-k)/c,O=(v-C)/d;T.setAttribute("x",S),T.setAttribute("y",M),T.setAttribute("width",x),T.setAttribute("height",O),p.append(T),l==null||l.push(`<rect vector-effect="non-scaling-stroke" x="${S}" y="${M}" width="${x}" height="${O}"/>`)}g(this,Ed)&&(l.push("</g></svg>')"),s.backgroundImage=l.join("")),this.container.append(f),this.container.style.clipPath=`url(#${m})`}_createPopup(){const{container:e,data:t}=this;e.setAttribute("aria-haspopup","dialog");const r=A(this,Md,new Jb({data:{color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,parentRect:t.rect,borderStyle:0,id:`popup_${t.id}`,rotation:t.rotation},parent:this.parent,elements:[this]}));this.parent.div.append(r.render())}render(){Mt("Abstract method `AnnotationElement.render` called")}_getElementsByName(e,t=null){const r=[];if(this._fieldObjects){const i=this._fieldObjects[e];if(i)for(const{page:o,id:s,exportValues:l}of i){if(o===-1||s===t)continue;const c=typeof l=="string"?l:null,d=document.querySelector(`[data-element-id="${s}"]`);!d||Xa.has(d)?r.push({id:s,exportValue:c,domElement:d}):Ee(`_getElementsByName - element not allowed: ${s}`)}return r}for(const i of document.getElementsByName(e)){const{exportValue:o}=i,s=i.getAttribute("data-element-id");s!==t&&Xa.has(i)&&r.push({id:s,exportValue:o,domElement:i})}return r}show(){var e;this.container&&(this.container.hidden=!1),(e=this.popup)==null||e.maybeShow()}hide(){var e;this.container&&(this.container.hidden=!0),(e=this.popup)==null||e.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const e=this.getElementsToTriggerPopup();if(Array.isArray(e))for(const t of e)t.classList.add("highlightArea");else e.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:e,data:{id:t}}=this;this.container.addEventListener("dblclick",()=>{var r;(r=this.linkService.eventBus)==null||r.dispatch("switchannotationeditormode",{source:this,mode:e,editId:t})})}};a0=new WeakMap,Ed=new WeakMap,Md=new WeakMap,W1=new WeakSet,Rv=function(e){const{container:{style:t},data:{rect:r,rotation:i},parent:{viewport:{rawDims:{pageWidth:o,pageHeight:s,pageX:l,pageY:c}}}}=this;r==null||r.splice(0,4,...e);const{width:d,height:u}=mo(e);t.left=100*(e[0]-l)/o+"%",t.top=100*(s-e[3]+c)/s+"%",i===0?(t.width=100*d/o+"%",t.height=100*u/s+"%"):this.setRotation(i)};let wt=cv;class rM extends wt{constructor(t,r=null){super(t,{isRenderable:!0,ignoreBorder:!!(r!=null&&r.ignoreBorder),createQuadrilaterals:!0});E(this,Ro);E(this,ay);E(this,ly);this.isTooltipOnly=t.data.isTooltipOnly}render(){const{data:t,linkService:r}=this,i=document.createElement("a");i.setAttribute("data-element-id",t.id);let o=!1;return t.url?(r.addLinkAttributes(i,t.url,t.newWindow),o=!0):t.action?(this._bindNamedAction(i,t.action),o=!0):t.attachment?(I(this,ay,RN).call(this,i,t.attachment,t.attachmentDest),o=!0):t.setOCGState?(I(this,ly,$N).call(this,i,t.setOCGState),o=!0):t.dest?(this._bindLink(i,t.dest),o=!0):(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(i,t),o=!0),t.resetForm?(this._bindResetFormAction(i,t.resetForm),o=!0):this.isTooltipOnly&&!o&&(this._bindLink(i,""),o=!0)),this.container.classList.add("linkAnnotation"),o&&this.container.append(i),this.container}_bindLink(t,r){t.href=this.linkService.getDestinationHash(r),t.onclick=()=>(r&&this.linkService.goToDestination(r),!1),(r||r==="")&&I(this,Ro,R0).call(this)}_bindNamedAction(t,r){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeNamedAction(r),!1),I(this,Ro,R0).call(this)}_bindJSAction(t,r){t.href=this.linkService.getAnchorUrl("");const i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const o of Object.keys(r.actions)){const s=i.get(o);s&&(t[s]=()=>{var l;return(l=this.linkService.eventBus)==null||l.dispatch("dispatcheventinsandbox",{source:this,detail:{id:r.id,name:o}}),!1})}t.onclick||(t.onclick=()=>!1),I(this,Ro,R0).call(this)}_bindResetFormAction(t,r){const i=t.onclick;i||(t.href=this.linkService.getAnchorUrl("")),I(this,Ro,R0).call(this),this._fieldObjects?t.onclick=()=>{var f;i==null||i();const{fields:o,refs:s,include:l}=r,c=[];if(o.length!==0||s.length!==0){const h=new Set(s);for(const p of o){const m=this._fieldObjects[p]||[];for(const{id:y}of m)h.add(y)}for(const p of Object.values(this._fieldObjects))for(const m of p)h.has(m.id)===l&&c.push(m)}else for(const h of Object.values(this._fieldObjects))c.push(...h);const d=this.annotationStorage,u=[];for(const h of c){const{id:p}=h;switch(u.push(p),h.type){case"text":{const y=h.defaultValue||"";d.setValue(p,{value:y});break}case"checkbox":case"radiobutton":{const y=h.defaultValue===h.exportValues;d.setValue(p,{value:y});break}case"combobox":case"listbox":{const y=h.defaultValue||"";d.setValue(p,{value:y});break}default:continue}const m=document.querySelector(`[data-element-id="${p}"]`);m&&(Xa.has(m)?m.dispatchEvent(new Event("resetform")):Ee(`_bindResetFormAction - element not allowed: ${p}`))}return this.enableScripting&&((f=this.linkService.eventBus)==null||f.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:u,name:"ResetForm"}})),!1}:(Ee('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),i||(t.onclick=()=>!1))}}Ro=new WeakSet,R0=function(){this.container.setAttribute("data-internal-link","")},ay=new WeakSet,RN=function(t,r,i=null){t.href=this.linkService.getAnchorUrl(""),r.description&&(t.title=r.description),t.onclick=()=>{var o;return(o=this.downloadManager)==null||o.openOrDownloadData(r.content,r.filename,i),!1},I(this,Ro,R0).call(this)},ly=new WeakSet,$N=function(t,r){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeSetOCGState(r),!1),I(this,Ro,R0).call(this)};class JZ extends wt{constructor(e){super(e,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const e=document.createElement("img");return e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),e.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(e),this.container}}class Ja extends wt{render(){return this.container}showElementAndHideCanvas(e){var t;this.data.hasOwnCanvas&&(((t=e.previousSibling)==null?void 0:t.nodeName)==="CANVAS"&&(e.previousSibling.hidden=!0),e.hidden=!1)}_getKeyModifier(e){return jn.platform.isMac?e.metaKey:e.ctrlKey}_setEventListener(e,t,r,i,o){r.includes("mouse")?e.addEventListener(r,s=>{var l;(l=this.linkService.eventBus)==null||l.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:o(s),shift:s.shiftKey,modifier:this._getKeyModifier(s)}})}):e.addEventListener(r,s=>{var l;if(r==="blur"){if(!t.focused||!s.relatedTarget)return;t.focused=!1}else if(r==="focus"){if(t.focused)return;t.focused=!0}o&&((l=this.linkService.eventBus)==null||l.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:o(s)}}))})}_setEventListeners(e,t,r,i){var o,s,l;for(const[c,d]of r)(d==="Action"||(o=this.data.actions)!=null&&o[d])&&(d!=="Focus"&&d!=="Blur"||t||(t={focused:!1}),this._setEventListener(e,t,c,d,i),d!=="Focus"||(s=this.data.actions)!=null&&s.Blur?d!=="Blur"||(l=this.data.actions)!=null&&l.Focus||this._setEventListener(e,t,"focus","Focus",null):this._setEventListener(e,t,"blur","Blur",null))}_setBackgroundColor(e){const t=this.data.backgroundColor||null;e.style.backgroundColor=t===null?"transparent":ue.makeHexColor(t[0],t[1],t[2])}_setTextStyle(e){const t=["left","center","right"],{fontColor:r}=this.data.defaultAppearanceData,i=this.data.defaultAppearanceData.fontSize||9,o=e.style;let s;const l=c=>Math.round(10*c)/10;if(this.data.multiLine){const c=Math.abs(this.data.rect[3]-this.data.rect[1]-2),d=c/(Math.round(c/(Sb*i))||1);s=Math.min(i,l(d/Sb))}else{const c=Math.abs(this.data.rect[3]-this.data.rect[1]-2);s=Math.min(i,l(c/Sb))}o.fontSize=`calc(${s}px * var(--scale-factor))`,o.color=ue.makeHexColor(r[0],r[1],r[2]),this.data.textAlignment!==null&&(o.textAlign=t[this.data.textAlignment])}_setRequired(e,t){t?e.setAttribute("required",!0):e.removeAttribute("required"),e.setAttribute("aria-required",t)}}class eW extends Ja{constructor(e){super(e,{isRenderable:e.renderForms||e.data.hasOwnCanvas||!e.data.hasAppearance&&!!e.data.fieldValue})}setPropertyOnSiblings(e,t,r,i){const o=this.annotationStorage;for(const s of this._getElementsByName(e.name,e.id))s.domElement&&(s.domElement[t]=r),o.setValue(s.id,{[i]:r})}render(){var i,o;const e=this.annotationStorage,t=this.data.id;this.container.classList.add("textWidgetAnnotation");let r=null;if(this.renderForms){const s=e.getValue(t,{value:this.data.fieldValue});let l=s.value||"";const c=e.getValue(t,{charLimit:this.data.maxLen}).charLimit;c&&l.length>c&&(l=l.slice(0,c));let d=s.formattedValue||((i=this.data.textContent)==null?void 0:i.join(`
|
|
121
|
+
`);return e.join("")}}function h2(n,e){try{const{protocol:t}=e?new URL(n,e):new URL(n);return t==="http:"||t==="https:"}catch{return!1}}function kr(n){n.preventDefault()}let ME;class AE{static toDateObject(e){if(!e||typeof e!="string")return null;ME||(ME=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const t=ME.exec(e);if(!t)return null;const r=parseInt(t[1],10);let i=parseInt(t[2],10);i=i>=1&&i<=12?i-1:0;let o=parseInt(t[3],10);o=o>=1&&o<=31?o:1;let s=parseInt(t[4],10);s=s>=0&&s<=23?s:0;let l=parseInt(t[5],10);l=l>=0&&l<=59?l:0;let c=parseInt(t[6],10);c=c>=0&&c<=59?c:0;const d=t[7]||"Z";let u=parseInt(t[8],10);u=u>=0&&u<=23?u:0;let f=parseInt(t[9],10)||0;return f=f>=0&&f<=59?f:0,d==="-"?(s+=u,l+=f):d==="+"&&(s-=u,l-=f),new Date(Date.UTC(r,i,o,s,l,c))}}function rZ(n,{scale:e=1,rotation:t=0}){const{width:r,height:i}=n.attributes.style,o=[0,0,parseInt(r),parseInt(i)];return new f2({viewBox:o,scale:e,rotation:t})}function Bb(n){if(n.startsWith("#")){const e=parseInt(n.slice(1),16);return[(16711680&e)>>16,(65280&e)>>8,255&e]}return n.startsWith("rgb(")?n.slice(4,-1).split(",").map(e=>parseInt(e)):n.startsWith("rgba(")?n.slice(5,-1).split(",").map(e=>parseInt(e)).slice(0,3):(Ee(`Not a valid color format: "${n}"`),[0,0,0])}function st(n){const{a:e,b:t,c:r,d:i,e:o,f:s}=n.getTransform();return[e,t,r,i,o,s]}function ho(n){const{a:e,b:t,c:r,d:i,e:o,f:s}=n.getTransform().invertSelf();return[e,t,r,i,o,s]}function Ga(n,e,t=!1,r=!0){if(e instanceof f2){const{pageWidth:i,pageHeight:o}=e.rawDims,{style:s}=n,l=jn.isCSSRoundSupported,c=`var(--scale-factor) * ${i}px`,d=`var(--scale-factor) * ${o}px`,u=l?`round(${c}, 1px)`:`calc(${c})`,f=l?`round(${d}, 1px)`:`calc(${d})`;t&&e.rotation%180!=0?(s.width=f,s.height=u):(s.width=u,s.height=f)}r&&n.setAttribute("data-main-rotation",e.rotation)}const To=class To{constructor(e){E(this,w3);E(this,v3);E(this,Zc);E(this,C3);E(this,Kf);E(this,El,null);E(this,Ml,null);E(this,ei,void 0);E(this,Al,null);E(this,Wf,null);A(this,ei,e),g(To,qf)||A(To,qf,Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button"}))}render(){const e=A(this,El,document.createElement("div"));e.className="editToolbar",e.setAttribute("role","toolbar");const t=g(this,ei)._uiManager._signal;e.addEventListener("contextmenu",kr,{signal:t}),e.addEventListener("pointerdown",I(To,b3,oN),{signal:t});const r=A(this,Al,document.createElement("div"));r.className="buttons",e.append(r);const i=g(this,ei).toolbarPosition;if(i){const{style:o}=e,s=g(this,ei)._uiManager.direction==="ltr"?1-i[0]:i[0];o.insetInlineEnd=100*s+"%",o.top=`calc(${100*i[1]}% + var(--editor-toolbar-vert-offset))`}return I(this,C3,lN).call(this),e}hide(){var e;g(this,El).classList.add("hidden"),(e=g(this,Ml))==null||e.hideDropdown()}show(){var e;g(this,El).classList.remove("hidden"),(e=g(this,Wf))==null||e.shown()}async addAltText(e){const t=await e.render();I(this,Zc,r5).call(this,t),g(this,Al).prepend(t,g(this,Kf,pv)),A(this,Wf,e)}addColorPicker(e){A(this,Ml,e);const t=e.renderButton();I(this,Zc,r5).call(this,t),g(this,Al).prepend(t,g(this,Kf,pv))}remove(){var e;g(this,El).remove(),(e=g(this,Ml))==null||e.destroy(),A(this,Ml,null)}};El=new WeakMap,Ml=new WeakMap,ei=new WeakMap,Al=new WeakMap,Wf=new WeakMap,qf=new WeakMap,b3=new WeakSet,oN=function(e){e.stopPropagation()},w3=new WeakSet,sN=function(e){g(this,ei)._focusEventsAllowed=!1,e.preventDefault(),e.stopPropagation()},v3=new WeakSet,aN=function(e){g(this,ei)._focusEventsAllowed=!0,e.preventDefault(),e.stopPropagation()},Zc=new WeakSet,r5=function(e){const t=g(this,ei)._uiManager._signal;e.addEventListener("focusin",I(this,w3,sN).bind(this),{capture:!0,signal:t}),e.addEventListener("focusout",I(this,v3,aN).bind(this),{capture:!0,signal:t}),e.addEventListener("contextmenu",kr,{signal:t})},C3=new WeakSet,lN=function(){const{editorType:e,_uiManager:t}=g(this,ei),r=document.createElement("button");r.className="delete",r.tabIndex=0,r.setAttribute("data-l10n-id",g(To,qf)[e]),I(this,Zc,r5).call(this,r),r.addEventListener("click",i=>{t.delete()},{signal:t._signal}),g(this,Al).append(r)},Kf=new WeakSet,pv=function(){const e=document.createElement("div");return e.className="divider",e},E(To,b3),E(To,qf,null);let _b=To;class iZ{constructor(e){E(this,k3);E(this,S3);E(this,E3);E(this,Gf,null);E(this,Tl,null);E(this,Il,void 0);A(this,Il,e)}show(e,t,r){const[i,o]=I(this,S3,dN).call(this,t,r),{style:s}=g(this,Tl)||A(this,Tl,I(this,k3,cN).call(this));e.append(g(this,Tl)),s.insetInlineEnd=100*i+"%",s.top=`calc(${100*o}% + var(--editor-toolbar-vert-offset))`}hide(){g(this,Tl).remove()}}Gf=new WeakMap,Tl=new WeakMap,Il=new WeakMap,k3=new WeakSet,cN=function(){const e=A(this,Tl,document.createElement("div"));e.className="editToolbar",e.setAttribute("role","toolbar"),e.addEventListener("contextmenu",kr,{signal:g(this,Il)._signal});const t=A(this,Gf,document.createElement("div"));return t.className="buttons",e.append(t),I(this,E3,uN).call(this),e},S3=new WeakSet,dN=function(e,t){let r=0,i=0;for(const o of e){const s=o.y+o.height;if(s<r)continue;const l=o.x+(t?o.width:0);s>r?(i=l,r=s):t?l>i&&(i=l):l<i&&(i=l)}return[t?1-i:i,r]},E3=new WeakSet,uN=function(){const e=document.createElement("button");e.className="highlightButton",e.tabIndex=0,e.setAttribute("data-l10n-id","pdfjs-highlight-floating-button1");const t=document.createElement("span");e.append(t),t.className="visuallyHidden",t.setAttribute("data-l10n-id","pdfjs-highlight-floating-button-label");const r=g(this,Il)._signal;e.addEventListener("contextmenu",kr,{signal:r}),e.addEventListener("click",()=>{g(this,Il).highlightSelection("floating_button")},{signal:r}),g(this,Gf).append(e)};function hm(n,e,t){for(const r of t)e.addEventListener(r,n[r].bind(n))}class oZ{constructor(){E(this,M3,0)}get id(){return"pdfjs_internal_editor_"+Xn(this,M3)._++}}M3=new WeakMap;const av=class av{constructor(){E(this,Qf);E(this,Yf,function(){if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.randomUUID)=="function")return crypto.randomUUID();const t=new Uint8Array(32);if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.getRandomValues)=="function")crypto.getRandomValues(t);else for(let r=0;r<32;r++)t[r]=Math.floor(255*Math.random());return mE(t)}());E(this,A3,0);E(this,Br,null)}static get _isSVGFittingCanvas(){const e=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),t=new Image;return t.src='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',De(this,"_isSVGFittingCanvas",t.decode().then(()=>(e.drawImage(t,0,0,1,1,0,0,1,3),new Uint32Array(e.getImageData(0,0,1,1).data.buffer)[0]===0)))}async getFromFile(e){const{lastModified:t,name:r,size:i,type:o}=e;return I(this,Qf,mv).call(this,`${t}_${r}_${i}_${o}`,e)}async getFromUrl(e){return I(this,Qf,mv).call(this,e,e)}async getFromId(e){g(this,Br)||A(this,Br,new Map);const t=g(this,Br).get(e);return t?t.bitmap?(t.refCounter+=1,t):t.file?this.getFromFile(t.file):this.getFromUrl(t.url):null}getSvgUrl(e){const t=g(this,Br).get(e);return t!=null&&t.isSvg?t.svgUrl:null}deleteId(e){g(this,Br)||A(this,Br,new Map);const t=g(this,Br).get(e);t&&(t.refCounter-=1,t.refCounter===0&&(t.bitmap=null))}isValidId(e){return e.startsWith(`image_${g(this,Yf)}_`)}};Yf=new WeakMap,A3=new WeakMap,Br=new WeakMap,Qf=new WeakSet,mv=async function(e,t){g(this,Br)||A(this,Br,new Map);let r=g(this,Br).get(e);if(r===null)return null;if(r!=null&&r.bitmap)return r.refCounter+=1,r;try{r||(r={bitmap:null,id:`image_${g(this,Yf)}_${Xn(this,A3)._++}`,refCounter:0,isSvg:!1});let i;if(typeof t=="string"?(r.url=t,i=await um(t,"blob")):i=r.file=t,i.type==="image/svg+xml"){const o=av._isSVGFittingCanvas,s=new FileReader,l=new Image,c=new Promise((d,u)=>{l.onload=()=>{r.bitmap=l,r.isSvg=!0,d()},s.onload=async()=>{const f=r.svgUrl=s.result;l.src=await o?`${f}#svgView(preserveAspectRatio(none))`:f},l.onerror=s.onerror=u});s.readAsDataURL(i),await c}else r.bitmap=await createImageBitmap(i);r.refCounter=1}catch(i){console.error(i),r=null}return g(this,Br).set(e,r),r&&g(this,Br).set(r.id,r),r};let Rb=av,sZ=(tN=class{constructor(e=128){E(this,Ht,[]);E(this,Gs,!1);E(this,Xf,void 0);E(this,Ut,-1);A(this,Xf,e)}add({cmd:e,undo:t,post:r,mustExec:i,type:o=NaN,overwriteIfSameType:s=!1,keepUndo:l=!1}){if(i&&e(),g(this,Gs))return;const c={cmd:e,undo:t,post:r,type:o};if(g(this,Ut)===-1){g(this,Ht).length>0&&(g(this,Ht).length=0),A(this,Ut,0),g(this,Ht).push(c);return}if(s&&g(this,Ht)[g(this,Ut)].type===o){l&&(c.undo=g(this,Ht)[g(this,Ut)].undo),g(this,Ht)[g(this,Ut)]=c;return}const d=g(this,Ut)+1;d===g(this,Xf)?g(this,Ht).splice(0,1):(A(this,Ut,d),d<g(this,Ht).length&&g(this,Ht).splice(d)),g(this,Ht).push(c)}undo(){if(g(this,Ut)===-1)return;A(this,Gs,!0);const{undo:e,post:t}=g(this,Ht)[g(this,Ut)];e(),t==null||t(),A(this,Gs,!1),A(this,Ut,g(this,Ut)-1)}redo(){if(g(this,Ut)<g(this,Ht).length-1){A(this,Ut,g(this,Ut)+1),A(this,Gs,!0);const{cmd:e,post:t}=g(this,Ht)[g(this,Ut)];e(),t==null||t(),A(this,Gs,!1)}}hasSomethingToUndo(){return g(this,Ut)!==-1}hasSomethingToRedo(){return g(this,Ut)<g(this,Ht).length-1}destroy(){A(this,Ht,null)}},Ht=new WeakMap,Gs=new WeakMap,Xf=new WeakMap,Ut=new WeakMap,tN);class p2{constructor(e){E(this,T3);this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:t}=jn.platform;for(const[r,i,o={}]of e)for(const s of r){const l=s.startsWith("mac+");t&&l?(this.callbacks.set(s.slice(4),{callback:i,options:o}),this.allKeys.add(s.split("+").at(-1))):!t&&!l&&(this.callbacks.set(s,{callback:i,options:o}),this.allKeys.add(s.split("+").at(-1)))}}exec(e,t){if(!this.allKeys.has(t.key))return;const r=this.callbacks.get(I(this,T3,fN).call(this,t));if(!r)return;const{callback:i,options:{bubbles:o=!1,args:s=[],checker:l=null}}=r;(!l||l(e,t))&&(i.bind(e,...s,t)(),o||(t.stopPropagation(),t.preventDefault()))}}T3=new WeakSet,fN=function(e){e.altKey&&this.buffer.push("alt"),e.ctrlKey&&this.buffer.push("ctrl"),e.metaKey&&this.buffer.push("meta"),e.shiftKey&&this.buffer.push("shift"),this.buffer.push(e.key);const t=this.buffer.join("+");return this.buffer.length=0,t};const I3=class I3{get _colors(){const e=new Map([["CanvasText",null],["Canvas",null]]);return function(r){const i=document.createElement("span");i.style.visibility="hidden",document.body.append(i);for(const o of r.keys()){i.style.color=o;const s=window.getComputedStyle(i).color;r.set(o,Bb(s))}i.remove()}(e),De(this,"_colors",e)}convert(e){const t=Bb(e);if(!window.matchMedia("(forced-colors: active)").matches)return t;for(const[r,i]of this._colors)if(i.every((o,s)=>o===t[s]))return I3._colorsMapping.get(r);return t}getHexCode(e){const t=this._colors.get(e);return t?ue.makeHexColor(...t):e}};be(I3,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let $b=I3;const ed=class ed{constructor(e,t,r,i,o,s,l,c,d,u,f){E(this,Xc);E(this,l1);E(this,O3);E(this,D3);E(this,Jc);E(this,N3);E(this,P3);E(this,L3);E(this,c1);E(this,B3);E(this,d1);E(this,u1);E(this,_3);E(this,on);E(this,Vi);E(this,R3);E(this,$3);E(this,f1);E(this,V3);E(this,Pl);E(this,h1);E(this,Wc,new AbortController);E(this,dr,null);E(this,Ot,new Map);E(this,rn,new Map);E(this,qc,null);E(this,Io,null);E(this,Kc,null);E(this,ti,new sZ);E(this,Ys,null);E(this,Gc,0);E(this,xl,new Set);E(this,Bi,null);E(this,ni,null);E(this,Ol,new Set);E(this,Jf,!1);E(this,e1,!1);E(this,Yc,!1);E(this,t1,null);E(this,_i,null);E(this,Qs,null);E(this,Qc,null);E(this,Xs,!1);E(this,Ri,null);E(this,x3,new oZ);E(this,Js,!1);E(this,n1,!1);E(this,ea,null);E(this,Dl,null);E(this,r1,null);E(this,i1,null);E(this,Zt,xe.NONE);E(this,Ze,new Set);E(this,xo,null);E(this,Nl,null);E(this,o1,null);E(this,s1,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1});E(this,ta,[0,0]);E(this,$i,null);E(this,Oo,null);E(this,a1,null);const h=this._signal=g(this,Wc).signal;A(this,Oo,e),A(this,a1,t),A(this,qc,r),this._eventBus=i,i._on("editingaction",this.onEditingAction.bind(this),{signal:h}),i._on("pagechanging",this.onPageChanging.bind(this),{signal:h}),i._on("scalechanging",this.onScaleChanging.bind(this),{signal:h}),i._on("rotationchanging",this.onRotationChanging.bind(this),{signal:h}),i._on("setpreference",this.onSetPreference.bind(this),{signal:h}),i._on("switchannotationeditorparams",p=>this.updateParams(p.type,p.value),{signal:h}),I(this,N3,mN).call(this),I(this,_3,wN).call(this),I(this,c1,yv).call(this),A(this,Io,o.annotationStorage),A(this,t1,o.filterFactory),A(this,Nl,s),A(this,Qc,l||null),A(this,Jf,c),A(this,e1,d),A(this,Yc,u),A(this,i1,f||null),this.viewParameters={realScale:ms.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1}static get _keyboardManager(){const e=ed.prototype,t=s=>g(s,Oo).contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&s.hasSomethingToControl(),r=(s,{target:l})=>{if(l instanceof HTMLInputElement){const{type:c}=l;return c!=="text"&&c!=="number"}return!0},i=this.TRANSLATE_SMALL,o=this.TRANSLATE_BIG;return De(this,"_keyboardManager",new p2([[["ctrl+a","mac+meta+a"],e.selectAll,{checker:r}],[["ctrl+z","mac+meta+z"],e.undo,{checker:r}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],e.redo,{checker:r}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],e.delete,{checker:r}],[["Enter","mac+Enter"],e.addNewEditorFromKeyboard,{checker:(s,{target:l})=>!(l instanceof HTMLButtonElement)&&g(s,Oo).contains(l)&&!s.isEnterHandled}],[[" ","mac+ "],e.addNewEditorFromKeyboard,{checker:(s,{target:l})=>!(l instanceof HTMLButtonElement)&&g(s,Oo).contains(document.activeElement)}],[["Escape","mac+Escape"],e.unselectAll],[["ArrowLeft","mac+ArrowLeft"],e.translateSelectedEditors,{args:[-i,0],checker:t}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e.translateSelectedEditors,{args:[-o,0],checker:t}],[["ArrowRight","mac+ArrowRight"],e.translateSelectedEditors,{args:[i,0],checker:t}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e.translateSelectedEditors,{args:[o,0],checker:t}],[["ArrowUp","mac+ArrowUp"],e.translateSelectedEditors,{args:[0,-i],checker:t}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e.translateSelectedEditors,{args:[0,-o],checker:t}],[["ArrowDown","mac+ArrowDown"],e.translateSelectedEditors,{args:[0,i],checker:t}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e.translateSelectedEditors,{args:[0,o],checker:t}]]))}destroy(){var e,t,r;(e=g(this,Wc))==null||e.abort(),A(this,Wc,null),this._signal=null;for(const i of g(this,rn).values())i.destroy();g(this,rn).clear(),g(this,Ot).clear(),g(this,Ol).clear(),A(this,dr,null),g(this,Ze).clear(),g(this,ti).destroy(),(t=g(this,qc))==null||t.destroy(),(r=g(this,Ri))==null||r.hide(),A(this,Ri,null),g(this,_i)&&(clearTimeout(g(this,_i)),A(this,_i,null)),g(this,$i)&&(clearTimeout(g(this,$i)),A(this,$i,null))}combinedSignal(e){return AbortSignal.any([this._signal,e.signal])}get mlManager(){return g(this,i1)}get useNewAltTextFlow(){return g(this,e1)}get useNewAltTextWhenAddingImage(){return g(this,Yc)}get hcmFilter(){return De(this,"hcmFilter",g(this,Nl)?g(this,t1).addHCMFilter(g(this,Nl).foreground,g(this,Nl).background):"none")}get direction(){return De(this,"direction",getComputedStyle(g(this,Oo)).direction)}get highlightColors(){return De(this,"highlightColors",g(this,Qc)?new Map(g(this,Qc).split(",").map(e=>e.split("=").map(t=>t.trim()))):null)}get highlightColorNames(){return De(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,e=>e.reverse())):null)}setMainHighlightColorPicker(e){A(this,r1,e)}editAltText(e,t=!1){var r;(r=g(this,qc))==null||r.editAltText(this,e,t)}switchToMode(e,t){this._eventBus.on("annotationeditormodechanged",t,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:e})}setPreference(e,t){this._eventBus.dispatch("setpreference",{source:this,name:e,value:t})}onSetPreference({name:e,value:t}){e==="enableNewAltTextWhenAddingImage"&&A(this,Yc,t)}onPageChanging({pageNumber:e}){A(this,Gc,e-1)}focusMainContainer(){g(this,Oo).focus()}findParent(e,t){for(const r of g(this,rn).values()){const{x:i,y:o,width:s,height:l}=r.div.getBoundingClientRect();if(e>=i&&e<=i+s&&t>=o&&t<=o+l)return r}return null}disableUserSelect(e=!1){g(this,a1).classList.toggle("noUserSelect",e)}addShouldRescale(e){g(this,Ol).add(e)}removeShouldRescale(e){g(this,Ol).delete(e)}onScaleChanging({scale:e}){this.commitOrRemove(),this.viewParameters.realScale=e*ms.PDF_TO_CSS_UNITS;for(const t of g(this,Ol))t.onScaleChanging()}onRotationChanging({pagesRotation:e}){this.commitOrRemove(),this.viewParameters.rotation=e}highlightSelection(e=""){const t=document.getSelection();if(!t||t.isCollapsed)return;const{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}=t,l=t.toString(),c=I(this,Xc,i5).call(this,t).closest(".textLayer"),d=this.getSelectionBoxes(c);if(!d)return;t.empty();const u=I(this,l1,gv).call(this,c),f=g(this,Zt)===xe.NONE,h=()=>{u==null||u.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:e,boxes:d,anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s,text:l}),f&&this.showAllEditors("highlight",!0,!0)};f?this.switchToMode(xe.HIGHLIGHT,h):h()}addToAnnotationStorage(e){e.isEmpty()||!g(this,Io)||g(this,Io).has(e.id)||g(this,Io).setValue(e.id,e)}blur(){if(this.isShiftKeyDown=!1,g(this,Xs)&&(A(this,Xs,!1),I(this,Jc,o5).call(this,"main_toolbar")),!this.hasSelection)return;const{activeElement:e}=document;for(const t of g(this,Ze))if(t.div.contains(e)){A(this,Dl,[t,e]),t._focusEventsAllowed=!1;break}}focus(){if(!g(this,Dl))return;const[e,t]=g(this,Dl);A(this,Dl,null),t.addEventListener("focusin",()=>{e._focusEventsAllowed=!0},{once:!0,signal:this._signal}),t.focus()}addEditListeners(){I(this,c1,yv).call(this),I(this,d1,bv).call(this)}removeEditListeners(){I(this,B3,bN).call(this),I(this,u1,wv).call(this)}dragOver(e){for(const{type:t}of e.dataTransfer.items)for(const r of g(this,ni))if(r.isHandlingMimeForPasting(t)){e.dataTransfer.dropEffect="copy",e.preventDefault();return}}drop(e){for(const t of e.dataTransfer.items)for(const r of g(this,ni))if(r.isHandlingMimeForPasting(t.type)){r.paste(t,this.currentLayer),e.preventDefault();return}}copy(e){var r;if(e.preventDefault(),(r=g(this,dr))==null||r.commitOrRemove(),!this.hasSelection)return;const t=[];for(const i of g(this,Ze)){const o=i.serialize(!0);o&&t.push(o)}t.length!==0&&e.clipboardData.setData("application/pdfjs",JSON.stringify(t))}cut(e){this.copy(e),this.delete()}paste(e){e.preventDefault();const{clipboardData:t}=e;for(const o of t.items)for(const s of g(this,ni))if(s.isHandlingMimeForPasting(o.type)){s.paste(o,this.currentLayer);return}let r=t.getData("application/pdfjs");if(!r)return;try{r=JSON.parse(r)}catch(o){Ee(`paste: "${o.message}".`);return}if(!Array.isArray(r))return;this.unselectAll();const i=this.currentLayer;try{const o=[];for(const c of r){const d=i.deserialize(c);if(!d)return;o.push(d)}const s=()=>{for(const c of o)I(this,f1,vv).call(this,c);I(this,h1,Cv).call(this,o)},l=()=>{for(const c of o)c.remove()};this.addCommands({cmd:s,undo:l,mustExec:!0})}catch(o){Ee(`paste: "${o.message}".`)}}keydown(e){this.isShiftKeyDown||e.key!=="Shift"||(this.isShiftKeyDown=!0),g(this,Zt)===xe.NONE||this.isEditorHandlingKeyboard||ed._keyboardManager.exec(this,e)}keyup(e){this.isShiftKeyDown&&e.key==="Shift"&&(this.isShiftKeyDown=!1,g(this,Xs)&&(A(this,Xs,!1),I(this,Jc,o5).call(this,"main_toolbar")))}onEditingAction({name:e}){switch(e){case"undo":case"redo":case"delete":case"selectAll":this[e]();break;case"highlightSelection":this.highlightSelection("context_menu")}}setEditingState(e){e?(I(this,P3,gN).call(this),I(this,d1,bv).call(this),I(this,on,Bn).call(this,{isEditing:g(this,Zt)!==xe.NONE,isEmpty:I(this,Pl,Xh).call(this),hasSomethingToUndo:g(this,ti).hasSomethingToUndo(),hasSomethingToRedo:g(this,ti).hasSomethingToRedo(),hasSelectedEditor:!1})):(I(this,L3,yN).call(this),I(this,u1,wv).call(this),I(this,on,Bn).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(e){if(!g(this,ni)){A(this,ni,e);for(const t of g(this,ni))I(this,Vi,Oa).call(this,t.defaultPropertiesToUpdate)}}getId(){return g(this,x3).id}get currentLayer(){return g(this,rn).get(g(this,Gc))}getLayer(e){return g(this,rn).get(e)}get currentPageIndex(){return g(this,Gc)}addLayer(e){g(this,rn).set(e.pageIndex,e),g(this,Js)?e.enable():e.disable()}removeLayer(e){g(this,rn).delete(e.pageIndex)}updateMode(e,t=null,r=!1){if(g(this,Zt)!==e)if(A(this,Zt,e),e!==xe.NONE){this.setEditingState(!0),I(this,R3,vN).call(this),this.unselectAll();for(const i of g(this,rn).values())i.updateMode(e);if(t||!r){if(t){for(const i of g(this,Ot).values())if(i.annotationElementId===t){this.setSelected(i),i.enterInEditMode();break}}}else this.addNewEditorFromKeyboard()}else this.setEditingState(!1),I(this,$3,CN).call(this)}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(e){e!==g(this,Zt)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:e})}updateParams(e,t){var r;if(g(this,ni)){switch(e){case ye.CREATE:this.currentLayer.addNewEditor();return;case ye.HIGHLIGHT_DEFAULT_COLOR:(r=g(this,r1))==null||r.updateColor(t);break;case ye.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(g(this,o1)||A(this,o1,new Map)).set(e,t),this.showAllEditors("highlight",t)}for(const i of g(this,Ze))i.updateParams(e,t);for(const i of g(this,ni))i.updateDefaultParams(e,t)}}showAllEditors(e,t,r=!1){var i;for(const o of g(this,Ot).values())o.editorType===e&&o.show(t);(((i=g(this,o1))==null?void 0:i.get(ye.HIGHLIGHT_SHOW_ALL))??!0)!==t&&I(this,Vi,Oa).call(this,[[ye.HIGHLIGHT_SHOW_ALL,t]])}enableWaiting(e=!1){if(g(this,n1)!==e){A(this,n1,e);for(const t of g(this,rn).values())e?t.disableClick():t.enableClick(),t.div.classList.toggle("waiting",e)}}getEditors(e){const t=[];for(const r of g(this,Ot).values())r.pageIndex===e&&t.push(r);return t}getEditor(e){return g(this,Ot).get(e)}addEditor(e){g(this,Ot).set(e.id,e)}removeEditor(e){var t;e.div.contains(document.activeElement)&&(g(this,_i)&&clearTimeout(g(this,_i)),A(this,_i,setTimeout(()=>{this.focusMainContainer(),A(this,_i,null)},0))),g(this,Ot).delete(e.id),this.unselect(e),e.annotationElementId&&g(this,xl).has(e.annotationElementId)||((t=g(this,Io))==null||t.remove(e.id))}addDeletedAnnotationElement(e){g(this,xl).add(e.annotationElementId),this.addChangedExistingAnnotation(e),e.deleted=!0}isDeletedAnnotationElement(e){return g(this,xl).has(e)}removeDeletedAnnotationElement(e){g(this,xl).delete(e.annotationElementId),this.removeChangedExistingAnnotation(e),e.deleted=!1}setActiveEditor(e){g(this,dr)!==e&&(A(this,dr,e),e&&I(this,Vi,Oa).call(this,e.propertiesToUpdate))}updateUI(e){g(this,V3,kN)===e&&I(this,Vi,Oa).call(this,e.propertiesToUpdate)}toggleSelected(e){g(this,Ze).has(e)?(g(this,Ze).delete(e),e.unselect(),I(this,on,Bn).call(this,{hasSelectedEditor:this.hasSelection})):(g(this,Ze).add(e),e.select(),I(this,Vi,Oa).call(this,e.propertiesToUpdate),I(this,on,Bn).call(this,{hasSelectedEditor:!0}))}setSelected(e){for(const t of g(this,Ze))t!==e&&t.unselect();g(this,Ze).clear(),g(this,Ze).add(e),e.select(),I(this,Vi,Oa).call(this,e.propertiesToUpdate),I(this,on,Bn).call(this,{hasSelectedEditor:!0})}isSelected(e){return g(this,Ze).has(e)}get firstSelectedEditor(){return g(this,Ze).values().next().value}unselect(e){e.unselect(),g(this,Ze).delete(e),I(this,on,Bn).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return g(this,Ze).size!==0}get isEnterHandled(){return g(this,Ze).size===1&&this.firstSelectedEditor.isEnterHandled}undo(){g(this,ti).undo(),I(this,on,Bn).call(this,{hasSomethingToUndo:g(this,ti).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:I(this,Pl,Xh).call(this)})}redo(){g(this,ti).redo(),I(this,on,Bn).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:g(this,ti).hasSomethingToRedo(),isEmpty:I(this,Pl,Xh).call(this)})}addCommands(e){g(this,ti).add(e),I(this,on,Bn).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:I(this,Pl,Xh).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const e=[...g(this,Ze)];this.addCommands({cmd:()=>{for(const t of e)t.remove()},undo:()=>{for(const t of e)I(this,f1,vv).call(this,t)},mustExec:!0})}commitOrRemove(){var e;(e=g(this,dr))==null||e.commitOrRemove()}hasSomethingToControl(){return g(this,dr)||this.hasSelection}selectAll(){for(const e of g(this,Ze))e.commit();I(this,h1,Cv).call(this,g(this,Ot).values())}unselectAll(){if(!(g(this,dr)&&(g(this,dr).commitOrRemove(),g(this,Zt)!==xe.NONE))&&this.hasSelection){for(const e of g(this,Ze))e.unselect();g(this,Ze).clear(),I(this,on,Bn).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(e,t,r=!1){if(r||this.commitOrRemove(),!this.hasSelection)return;g(this,ta)[0]+=e,g(this,ta)[1]+=t;const[i,o]=g(this,ta),s=[...g(this,Ze)];g(this,$i)&&clearTimeout(g(this,$i)),A(this,$i,setTimeout(()=>{A(this,$i,null),g(this,ta)[0]=g(this,ta)[1]=0,this.addCommands({cmd:()=>{for(const l of s)g(this,Ot).has(l.id)&&l.translateInPage(i,o)},undo:()=>{for(const l of s)g(this,Ot).has(l.id)&&l.translateInPage(-i,-o)},mustExec:!1})},1e3));for(const l of s)l.translateInPage(e,t)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),A(this,Bi,new Map);for(const e of g(this,Ze))g(this,Bi).set(e,{savedX:e.x,savedY:e.y,savedPageIndex:e.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!g(this,Bi))return!1;this.disableUserSelect(!1);const e=g(this,Bi);A(this,Bi,null);let t=!1;for(const[{x:i,y:o,pageIndex:s},l]of e)l.newX=i,l.newY=o,l.newPageIndex=s,t||(t=i!==l.savedX||o!==l.savedY||s!==l.savedPageIndex);if(!t)return!1;const r=(i,o,s,l)=>{if(g(this,Ot).has(i.id)){const c=g(this,rn).get(l);c?i._setParentAndPosition(c,o,s):(i.pageIndex=l,i.x=o,i.y=s)}};return this.addCommands({cmd:()=>{for(const[i,{newX:o,newY:s,newPageIndex:l}]of e)r(i,o,s,l)},undo:()=>{for(const[i,{savedX:o,savedY:s,savedPageIndex:l}]of e)r(i,o,s,l)},mustExec:!0}),!0}dragSelectedEditors(e,t){if(g(this,Bi))for(const r of g(this,Bi).keys())r.drag(e,t)}rebuild(e){if(e.parent===null){const t=this.getLayer(e.pageIndex);t?(t.changeParent(e),t.addOrRebuild(e)):(this.addEditor(e),this.addToAnnotationStorage(e),e.rebuild())}else e.parent.addOrRebuild(e)}get isEditorHandlingKeyboard(){var e;return((e=this.getActive())==null?void 0:e.shouldGetKeyboardEvents())||g(this,Ze).size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(e){return g(this,dr)===e}getActive(){return g(this,dr)}getMode(){return g(this,Zt)}get imageManager(){return De(this,"imageManager",new Rb)}getSelectionBoxes(e){if(!e)return null;const t=document.getSelection();for(let d=0,u=t.rangeCount;d<u;d++)if(!e.contains(t.getRangeAt(d).commonAncestorContainer))return null;const{x:r,y:i,width:o,height:s}=e.getBoundingClientRect();let l;switch(e.getAttribute("data-main-rotation")){case"90":l=(d,u,f,h)=>({x:(u-i)/s,y:1-(d+f-r)/o,width:h/s,height:f/o});break;case"180":l=(d,u,f,h)=>({x:1-(d+f-r)/o,y:1-(u+h-i)/s,width:f/o,height:h/s});break;case"270":l=(d,u,f,h)=>({x:1-(u+h-i)/s,y:(d-r)/o,width:h/s,height:f/o});break;default:l=(d,u,f,h)=>({x:(d-r)/o,y:(u-i)/s,width:f/o,height:h/s})}const c=[];for(let d=0,u=t.rangeCount;d<u;d++){const f=t.getRangeAt(d);if(!f.collapsed)for(const{x:h,y:p,width:m,height:y}of f.getClientRects())m!==0&&y!==0&&c.push(l(h,p,m,y))}return c.length===0?null:c}addChangedExistingAnnotation({annotationElementId:e,id:t}){(g(this,Kc)||A(this,Kc,new Map)).set(e,t)}removeChangedExistingAnnotation({annotationElementId:e}){var t;(t=g(this,Kc))==null||t.delete(e)}renderAnnotationElement(e){var i;const t=(i=g(this,Kc))==null?void 0:i.get(e.data.id);if(!t)return;const r=g(this,Io).getRawValue(t);r&&(g(this,Zt)!==xe.NONE||r.hasBeenModified)&&r.renderAnnotationElement(e)}};Wc=new WeakMap,dr=new WeakMap,Ot=new WeakMap,rn=new WeakMap,qc=new WeakMap,Io=new WeakMap,Kc=new WeakMap,ti=new WeakMap,Ys=new WeakMap,Gc=new WeakMap,xl=new WeakMap,Bi=new WeakMap,ni=new WeakMap,Ol=new WeakMap,Jf=new WeakMap,e1=new WeakMap,Yc=new WeakMap,t1=new WeakMap,_i=new WeakMap,Qs=new WeakMap,Qc=new WeakMap,Xs=new WeakMap,Ri=new WeakMap,x3=new WeakMap,Js=new WeakMap,n1=new WeakMap,ea=new WeakMap,Dl=new WeakMap,r1=new WeakMap,i1=new WeakMap,Zt=new WeakMap,Ze=new WeakMap,xo=new WeakMap,Nl=new WeakMap,o1=new WeakMap,s1=new WeakMap,ta=new WeakMap,$i=new WeakMap,Oo=new WeakMap,a1=new WeakMap,Xc=new WeakSet,i5=function({anchorNode:e}){return e.nodeType===Node.TEXT_NODE?e.parentElement:e},l1=new WeakSet,gv=function(e){const{currentLayer:t}=this;if(t.hasTextLayer(e))return t;for(const r of g(this,rn).values())if(r.hasTextLayer(e))return r;return null},O3=new WeakSet,hN=function(){const e=document.getSelection();if(!e||e.isCollapsed)return;const t=I(this,Xc,i5).call(this,e).closest(".textLayer"),r=this.getSelectionBoxes(t);r&&(g(this,Ri)||A(this,Ri,new iZ(this)),g(this,Ri).show(t,r,this.direction==="ltr"))},D3=new WeakSet,pN=function(){var i,o,s;const e=document.getSelection();if(!e||e.isCollapsed){g(this,xo)&&((i=g(this,Ri))==null||i.hide(),A(this,xo,null),I(this,on,Bn).call(this,{hasSelectedText:!1}));return}const{anchorNode:t}=e;if(t===g(this,xo))return;const r=I(this,Xc,i5).call(this,e).closest(".textLayer");if(r){if((o=g(this,Ri))==null||o.hide(),A(this,xo,t),I(this,on,Bn).call(this,{hasSelectedText:!0}),(g(this,Zt)===xe.HIGHLIGHT||g(this,Zt)===xe.NONE)&&(g(this,Zt)===xe.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),A(this,Xs,this.isShiftKeyDown),!this.isShiftKeyDown)){const l=g(this,Zt)===xe.HIGHLIGHT?I(this,l1,gv).call(this,r):null;l==null||l.toggleDrawing();const c=new AbortController,d=this.combinedSignal(c),u=f=>{(f.type!=="pointerup"||f.button===0)&&(c.abort(),l==null||l.toggleDrawing(!0),f.type==="pointerup"&&I(this,Jc,o5).call(this,"main_toolbar"))};window.addEventListener("pointerup",u,{signal:d}),window.addEventListener("blur",u,{signal:d})}}else g(this,xo)&&((s=g(this,Ri))==null||s.hide(),A(this,xo,null),I(this,on,Bn).call(this,{hasSelectedText:!1}))},Jc=new WeakSet,o5=function(e=""){g(this,Zt)===xe.HIGHLIGHT?this.highlightSelection(e):g(this,Jf)&&I(this,O3,hN).call(this)},N3=new WeakSet,mN=function(){document.addEventListener("selectionchange",I(this,D3,pN).bind(this),{signal:this._signal})},P3=new WeakSet,gN=function(){if(g(this,Qs))return;A(this,Qs,new AbortController);const e=this.combinedSignal(g(this,Qs));window.addEventListener("focus",this.focus.bind(this),{signal:e}),window.addEventListener("blur",this.blur.bind(this),{signal:e})},L3=new WeakSet,yN=function(){var e;(e=g(this,Qs))==null||e.abort(),A(this,Qs,null)},c1=new WeakSet,yv=function(){if(g(this,ea))return;A(this,ea,new AbortController);const e=this.combinedSignal(g(this,ea));window.addEventListener("keydown",this.keydown.bind(this),{signal:e}),window.addEventListener("keyup",this.keyup.bind(this),{signal:e})},B3=new WeakSet,bN=function(){var e;(e=g(this,ea))==null||e.abort(),A(this,ea,null)},d1=new WeakSet,bv=function(){if(g(this,Ys))return;A(this,Ys,new AbortController);const e=this.combinedSignal(g(this,Ys));document.addEventListener("copy",this.copy.bind(this),{signal:e}),document.addEventListener("cut",this.cut.bind(this),{signal:e}),document.addEventListener("paste",this.paste.bind(this),{signal:e})},u1=new WeakSet,wv=function(){var e;(e=g(this,Ys))==null||e.abort(),A(this,Ys,null)},_3=new WeakSet,wN=function(){const e=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:e}),document.addEventListener("drop",this.drop.bind(this),{signal:e})},on=new WeakSet,Bn=function(e){Object.entries(e).some(([t,r])=>g(this,s1)[t]!==r)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(g(this,s1),e)}),g(this,Zt)===xe.HIGHLIGHT&&e.hasSelectedEditor===!1&&I(this,Vi,Oa).call(this,[[ye.HIGHLIGHT_FREE,!0]]))},Vi=new WeakSet,Oa=function(e){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:e})},R3=new WeakSet,vN=function(){if(!g(this,Js)){A(this,Js,!0);for(const e of g(this,rn).values())e.enable();for(const e of g(this,Ot).values())e.enable()}},$3=new WeakSet,CN=function(){if(this.unselectAll(),g(this,Js)){A(this,Js,!1);for(const e of g(this,rn).values())e.disable();for(const e of g(this,Ot).values())e.disable()}},f1=new WeakSet,vv=function(e){const t=g(this,rn).get(e.pageIndex);t?t.addOrRebuild(e):(this.addEditor(e),this.addToAnnotationStorage(e))},V3=new WeakSet,kN=function(){let e=null;for(e of g(this,Ze));return e},Pl=new WeakSet,Xh=function(){if(g(this,Ot).size===0)return!0;if(g(this,Ot).size===1)for(const e of g(this,Ot).values())return e.isEmpty();return!1},h1=new WeakSet,Cv=function(e){for(const t of g(this,Ze))t.unselect();g(this,Ze).clear();for(const t of e)t.isEmpty()||(g(this,Ze).add(t),t.select());I(this,on,Bn).call(this,{hasSelectedEditor:this.hasSelection})},be(ed,"TRANSLATE_SMALL",1),be(ed,"TRANSLATE_BIG",10);let Ya=ed;const _r=class _r{constructor(e){E(this,nd);E(this,rd);E(this,Wt,null);E(this,Fi,!1);E(this,ri,null);E(this,ji,null);E(this,ur,null);E(this,td,!1);E(this,zi,null);E(this,Yn,null);E(this,Do,null);E(this,Ll,null);E(this,Hi,!1);A(this,Yn,e),A(this,Hi,e._uiManager.useNewAltTextFlow)}static initialize(e){_r._l10nPromise||(_r._l10nPromise=e)}async render(){const e=A(this,ri,document.createElement("button"));e.className="altText";let t;g(this,Hi)?(e.classList.add("new"),t=await _r._l10nPromise.get("pdfjs-editor-new-alt-text-missing-button-label")):t=await _r._l10nPromise.get("pdfjs-editor-alt-text-button-label"),e.textContent=t,e.setAttribute("aria-label",t),e.tabIndex="0";const r=g(this,Yn)._uiManager._signal;e.addEventListener("contextmenu",kr,{signal:r}),e.addEventListener("pointerdown",o=>o.stopPropagation(),{signal:r});const i=o=>{o.preventDefault(),g(this,Yn)._uiManager.editAltText(g(this,Yn)),g(this,Hi)&&g(this,Yn)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:g(this,nd,s5)}})};return e.addEventListener("click",i,{capture:!0,signal:r}),e.addEventListener("keydown",o=>{o.target===e&&o.key==="Enter"&&(A(this,td,!0),i(o))},{signal:r}),await I(this,rd,a5).call(this),e}finish(){g(this,ri)&&(g(this,ri).focus({focusVisible:g(this,td)}),A(this,td,!1))}isEmpty(){return g(this,Hi)?g(this,Wt)===null:!g(this,Wt)&&!g(this,Fi)}hasData(){return g(this,Hi)?g(this,Wt)!==null||!!g(this,Do):this.isEmpty()}get guessedText(){return g(this,Do)}async setGuessedText(e){g(this,Wt)===null&&(A(this,Do,e),A(this,Ll,await _r._l10nPromise.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer")({generatedAltText:e})),I(this,rd,a5).call(this))}toggleAltTextBadge(e=!1){var t;if(g(this,Hi)&&!g(this,Wt)){if(!g(this,zi)){const r=A(this,zi,document.createElement("div"));r.className="noAltTextBadge",g(this,Yn).div.append(r)}g(this,zi).classList.toggle("hidden",!e)}else(t=g(this,zi))==null||t.remove(),A(this,zi,null)}serialize(e){let t=g(this,Wt);return e||g(this,Do)!==t||(t=g(this,Ll)),{altText:t,decorative:g(this,Fi),guessedText:g(this,Do),textWithDisclaimer:g(this,Ll)}}get data(){return{altText:g(this,Wt),decorative:g(this,Fi)}}set data({altText:e,decorative:t,guessedText:r,textWithDisclaimer:i,cancel:o=!1}){r&&(A(this,Do,r),A(this,Ll,i)),(g(this,Wt)!==e||g(this,Fi)!==t)&&(o||(A(this,Wt,e),A(this,Fi,t)),I(this,rd,a5).call(this))}toggle(e=!1){g(this,ri)&&(!e&&g(this,ur)&&(clearTimeout(g(this,ur)),A(this,ur,null)),g(this,ri).disabled=!e)}shown(){g(this,Yn)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:g(this,nd,s5)}})}destroy(){var e,t;(e=g(this,ri))==null||e.remove(),A(this,ri,null),A(this,ji,null),(t=g(this,zi))==null||t.remove(),A(this,zi,null)}};Wt=new WeakMap,Fi=new WeakMap,ri=new WeakMap,ji=new WeakMap,ur=new WeakMap,td=new WeakMap,zi=new WeakMap,Yn=new WeakMap,Do=new WeakMap,Ll=new WeakMap,Hi=new WeakMap,nd=new WeakSet,s5=function(){return(g(this,Wt)?"added":g(this,Wt)===null&&this.guessedText&&"review")||"missing"},rd=new WeakSet,a5=async function(){var i,o;const e=g(this,ri);if(!e)return;if(g(this,Hi)){const s=g(this,nd,s5),l=s==="review"?"to-review":s;if(e.classList.toggle("done",!!g(this,Wt)),_r._l10nPromise.get(`pdfjs-editor-new-alt-text-${l}-button-label`).then(c=>{e.setAttribute("aria-label",c);for(const d of e.childNodes)if(d.nodeType===Node.TEXT_NODE){d.textContent=c;break}}),!g(this,Wt)){(i=g(this,ji))==null||i.remove();return}}else{if(!g(this,Wt)&&!g(this,Fi)){e.classList.remove("done"),(o=g(this,ji))==null||o.remove();return}e.classList.add("done"),_r._l10nPromise.get("pdfjs-editor-alt-text-edit-button-label").then(s=>{e.setAttribute("aria-label",s)})}let t=g(this,ji);if(!t){A(this,ji,t=document.createElement("span")),t.className="tooltip",t.setAttribute("role","tooltip");const s=t.id=`alt-text-tooltip-${g(this,Yn).id}`;e.setAttribute("aria-describedby",s);const l=100,c=g(this,Yn)._uiManager._signal;c.addEventListener("abort",()=>{clearTimeout(g(this,ur)),A(this,ur,null)},{once:!0}),e.addEventListener("mouseenter",()=>{A(this,ur,setTimeout(()=>{A(this,ur,null),g(this,ji).classList.add("show"),g(this,Yn)._reportTelemetry({action:"alt_text_tooltip"})},l))},{signal:c}),e.addEventListener("mouseleave",()=>{var d;g(this,ur)&&(clearTimeout(g(this,ur)),A(this,ur,null)),(d=g(this,ji))==null||d.classList.remove("show")},{signal:c})}t.innerText=g(this,Fi)?await _r._l10nPromise.get("pdfjs-editor-alt-text-decorative-tooltip"):g(this,Wt),t.parentNode||e.append(t);const r=g(this,Yn).getImageForAltText();r==null||r.setAttribute("aria-describedby",t.id)},be(_r,"_l10nPromise",null);let pm=_r;const je=class je{constructor(e){E(this,y1);E(this,w1);E(this,j3);E(this,z3);E(this,v1);E(this,C1);E(this,k1);E(this,H3);E(this,S1);E(this,U3);E(this,Z3);E(this,W3);E(this,E1);E(this,Fl);E(this,Bl,null);E(this,ii,null);E(this,ct,null);E(this,id,!1);E(this,_l,!1);E(this,sn,null);E(this,Rl,null);E(this,na,null);E(this,p1,"");E(this,$l,!1);E(this,ra,null);E(this,m1,!1);E(this,Vl,!1);E(this,No,!1);E(this,Ui,null);E(this,od,0);E(this,sd,0);E(this,Rr,null);be(this,"_editToolbar",null);be(this,"_initialOptions",Object.create(null));be(this,"_isVisible",!0);be(this,"_uiManager",null);be(this,"_focusEventsAllowed",!0);E(this,g1,!1);E(this,F3,je._zIndex++);this.parent=e.parent,this.id=e.id,this.width=this.height=null,this.pageIndex=e.parent.pageIndex,this.name=e.name,this.div=null,this._uiManager=e.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=e.isCentered,this._structTreeParentId=null;const{rotation:t,rawDims:{pageWidth:r,pageHeight:i,pageX:o,pageY:s}}=this.parent.viewport;this.rotation=t,this.pageRotation=(360+t-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[r,i],this.pageTranslation=[o,s];const[l,c]=this.parentDimensions;this.x=e.x/l,this.y=e.y/c,this.isAttachedToDOM=!1,this.deleted=!1}static get _resizerKeyboardManager(){const e=je.prototype._resizeWithKeyboard,t=Ya.TRANSLATE_SMALL,r=Ya.TRANSLATE_BIG;return De(this,"_resizerKeyboardManager",new p2([[["ArrowLeft","mac+ArrowLeft"],e,{args:[-t,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e,{args:[-r,0]}],[["ArrowRight","mac+ArrowRight"],e,{args:[t,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e,{args:[r,0]}],[["ArrowUp","mac+ArrowUp"],e,{args:[0,-t]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e,{args:[0,-r]}],[["ArrowDown","mac+ArrowDown"],e,{args:[0,t]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e,{args:[0,r]}],[["Escape","mac+Escape"],je.prototype._stopResizingWithKeyboard]]))}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return De(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(e){const t=new aZ({id:e.parent.getNextId(),parent:e.parent,uiManager:e._uiManager});t.annotationElementId=e.annotationElementId,t.deleted=!0,t._uiManager.addToAnnotationStorage(t)}static initialize(e,t,r){if(je._l10nResizer||(je._l10nResizer=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"})),je._l10nPromise||(je._l10nPromise=new Map([...["pdfjs-editor-alt-text-button-label","pdfjs-editor-alt-text-edit-button-label","pdfjs-editor-alt-text-decorative-tooltip","pdfjs-editor-new-alt-text-added-button-label","pdfjs-editor-new-alt-text-missing-button-label","pdfjs-editor-new-alt-text-to-review-button-label"].map(o=>[o,e.get(o)]),...["pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer"].map(o=>[o,e.get.bind(e,o)])])),r!=null&&r.strings)for(const o of r.strings)je._l10nPromise.set(o,e.get(o));if(je._borderLineWidth!==-1)return;const i=getComputedStyle(document.documentElement);je._borderLineWidth=parseFloat(i.getPropertyValue("--outline-width"))||0}static updateDefaultParams(e,t){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(e){return!1}static paste(e,t){Mt("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return g(this,g1)}set _isDraggable(e){var t;A(this,g1,e),(t=this.div)==null||t.classList.toggle("draggable",e)}get isEnterHandled(){return!0}center(){const[e,t]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*t/(2*e),this.y+=this.width*e/(2*t);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*t/(2*e),this.y-=this.width*e/(2*t);break;default:this.x-=this.width/2,this.y-=this.height/2}this.fixAndSetPosition()}addCommands(e){this._uiManager.addCommands(e)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=g(this,F3)}setParent(e){e!==null?(this.pageIndex=e.pageIndex,this.pageDimensions=e.pageDimensions):I(this,Fl,Jh).call(this),this.parent=e}focusin(e){this._focusEventsAllowed&&(g(this,$l)?A(this,$l,!1):this.parent.setSelected(this))}focusout(e){var r;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const t=e.relatedTarget;t!=null&&t.closest(`#${this.id}`)||(e.preventDefault(),(r=this.parent)!=null&&r.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(e,t,r,i){const[o,s]=this.parentDimensions;[r,i]=this.screenToPageTranslation(r,i),this.x=(e+r)/o,this.y=(t+i)/s,this.fixAndSetPosition()}translate(e,t){I(this,y1,kv).call(this,this.parentDimensions,e,t)}translateInPage(e,t){g(this,ra)||A(this,ra,[this.x,this.y]),I(this,y1,kv).call(this,this.pageDimensions,e,t),this.div.scrollIntoView({block:"nearest"})}drag(e,t){g(this,ra)||A(this,ra,[this.x,this.y]);const[r,i]=this.parentDimensions;if(this.x+=e/r,this.y+=t/i,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:d,y:u}=this.div.getBoundingClientRect();this.parent.findNewParent(this,d,u)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:o,y:s}=this;const[l,c]=this.getBaseTranslation();o+=l,s+=c,this.div.style.left=`${(100*o).toFixed(2)}%`,this.div.style.top=`${(100*s).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}get _hasBeenMoved(){return!!g(this,ra)&&(g(this,ra)[0]!==this.x||g(this,ra)[1]!==this.y)}getBaseTranslation(){const[e,t]=this.parentDimensions,{_borderLineWidth:r}=je,i=r/e,o=r/t;switch(this.rotation){case 90:return[-i,o];case 180:return[i,o];case 270:return[i,-o];default:return[-i,-o]}}get _mustFixPosition(){return!0}fixAndSetPosition(e=this.rotation){const[t,r]=this.pageDimensions;let{x:i,y:o,width:s,height:l}=this;if(s*=t,l*=r,i*=t,o*=r,this._mustFixPosition)switch(e){case 0:i=Math.max(0,Math.min(t-s,i)),o=Math.max(0,Math.min(r-l,o));break;case 90:i=Math.max(0,Math.min(t-l,i)),o=Math.min(r,Math.max(s,o));break;case 180:i=Math.min(t,Math.max(s,i)),o=Math.min(r,Math.max(l,o));break;case 270:i=Math.min(t,Math.max(l,i)),o=Math.max(0,Math.min(r-s,o))}this.x=i/=t,this.y=o/=r;const[c,d]=this.getBaseTranslation();i+=c,o+=d;const{style:u}=this.div;u.left=`${(100*i).toFixed(2)}%`,u.top=`${(100*o).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(e,t){var r;return I(r=je,b1,Sv).call(r,e,t,this.parentRotation)}pageTranslationToScreen(e,t){var r;return I(r=je,b1,Sv).call(r,e,t,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:e,pageDimensions:[t,r]}=this,i=t*e,o=r*e;return jn.isCSSRoundSupported?[Math.round(i),Math.round(o)]:[i,o]}setDims(e,t){const[r,i]=this.parentDimensions;this.div.style.width=`${(100*e/r).toFixed(2)}%`,g(this,_l)||(this.div.style.height=`${(100*t/i).toFixed(2)}%`)}fixDims(){const{style:e}=this.div,{height:t,width:r}=e,i=r.endsWith("%"),o=!g(this,_l)&&t.endsWith("%");if(i&&o)return;const[s,l]=this.parentDimensions;i||(e.width=`${(100*parseFloat(r)/s).toFixed(2)}%`),g(this,_l)||o||(e.height=`${(100*parseFloat(t)/l).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}altTextFinish(){var e;(e=g(this,ct))==null||e.finish()}async addEditToolbar(){return this._editToolbar||g(this,Vl)?this._editToolbar:(this._editToolbar=new _b(this),this.div.append(this._editToolbar.render()),g(this,ct)&&await this._editToolbar.addAltText(g(this,ct)),this._editToolbar)}removeEditToolbar(){var e;this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,(e=g(this,ct))==null||e.destroy())}getClientDimensions(){return this.div.getBoundingClientRect()}async addAltTextButton(){g(this,ct)||(pm.initialize(je._l10nPromise),A(this,ct,new pm(this)),g(this,Bl)&&(g(this,ct).data=g(this,Bl),A(this,Bl,null)),await this.addEditToolbar())}get altTextData(){var e;return(e=g(this,ct))==null?void 0:e.data}set altTextData(e){g(this,ct)&&(g(this,ct).data=e)}get guessedAltText(){var e;return(e=g(this,ct))==null?void 0:e.guessedText}async setGuessedAltText(e){var t;await((t=g(this,ct))==null?void 0:t.setGuessedText(e))}serializeAltText(e){var t;return(t=g(this,ct))==null?void 0:t.serialize(e)}hasAltText(){return!!g(this,ct)&&!g(this,ct).isEmpty()}hasAltTextData(){var e;return((e=g(this,ct))==null?void 0:e.hasData())??!1}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.tabIndex=g(this,id)?-1:0,this._isVisible||this.div.classList.add("hidden"),this.setInForeground(),I(this,S1,Iv).call(this);const[e,t]=this.parentDimensions;this.parentRotation%180!=0&&(this.div.style.maxWidth=`${(100*t/e).toFixed(2)}%`,this.div.style.maxHeight=`${(100*e/t).toFixed(2)}%`);const[r,i]=this.getInitialTranslation();return this.translate(r,i),hm(this,this.div,["pointerdown"]),this.div}pointerdown(e){const{isMac:t}=jn.platform;e.button!==0||e.ctrlKey&&t?e.preventDefault():(A(this,$l,!0),this._isDraggable?I(this,H3,MN).call(this,e):I(this,k1,Tv).call(this,e))}moveInDOM(){g(this,Ui)&&clearTimeout(g(this,Ui)),A(this,Ui,setTimeout(()=>{var e;A(this,Ui,null),(e=this.parent)==null||e.moveEditorInDOM(this)},0))}_setParentAndPosition(e,t,r){e.changeParent(this),this.x=t,this.y=r,this.fixAndSetPosition()}getRect(e,t,r=this.rotation){const i=this.parentScale,[o,s]=this.pageDimensions,[l,c]=this.pageTranslation,d=e/i,u=t/i,f=this.x*o,h=this.y*s,p=this.width*o,m=this.height*s;switch(r){case 0:return[f+d+l,s-h-u-m+c,f+d+p+l,s-h-u+c];case 90:return[f+u+l,s-h+d+c,f+u+m+l,s-h+d+p+c];case 180:return[f-d-p+l,s-h+u+c,f-d+l,s-h+u+m+c];case 270:return[f-u-m+l,s-h-d-p+c,f-u+l,s-h-d+c];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(e,t){const[r,i,o,s]=e,l=o-r,c=s-i;switch(this.rotation){case 0:return[r,t-s,l,c];case 90:return[r,t-i,c,l];case 180:return[o,t-i,l,c];case 270:return[o,t-s,c,l];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){A(this,Vl,!0)}disableEditMode(){A(this,Vl,!1)}isInEditMode(){return g(this,Vl)}shouldGetKeyboardEvents(){return g(this,No)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){I(this,S1,Iv).call(this)}rotate(e){}serialize(e=!1,t=null){Mt("An editor must be serializable")}static deserialize(e,t,r){const i=new this.prototype.constructor({parent:t,id:t.getNextId(),uiManager:r});i.rotation=e.rotation,A(i,Bl,e.accessibilityData);const[o,s]=i.pageDimensions,[l,c,d,u]=i.getRectInCurrentCoords(e.rect,s);return i.x=l/o,i.y=c/s,i.width=d/o,i.height=u/s,i}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){var e;if((e=g(this,na))==null||e.abort(),A(this,na,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),g(this,Ui)&&(clearTimeout(g(this,Ui)),A(this,Ui,null)),I(this,Fl,Jh).call(this),this.removeEditToolbar(),g(this,Rr)){for(const t of g(this,Rr).values())clearTimeout(t);A(this,Rr,null)}this.parent=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(I(this,j3,SN).call(this),g(this,sn).classList.remove("hidden"),hm(this,this.div,["keydown"]))}get toolbarPosition(){return null}keydown(e){if(!this.isResizable||e.target!==this.div||e.key!=="Enter")return;this._uiManager.setSelected(this),A(this,Rl,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const t=g(this,sn).children;if(!g(this,ii)){A(this,ii,Array.from(t));const s=I(this,U3,AN).bind(this),l=I(this,Z3,TN).bind(this),c=this._uiManager._signal;for(const d of g(this,ii)){const u=d.getAttribute("data-resizer-name");d.setAttribute("role","spinbutton"),d.addEventListener("keydown",s,{signal:c}),d.addEventListener("blur",l,{signal:c}),d.addEventListener("focus",I(this,W3,IN).bind(this,u),{signal:c}),d.setAttribute("data-l10n-id",je._l10nResizer[u])}}const r=g(this,ii)[0];let i=0;for(const s of t){if(s===r)break;i++}const o=(360-this.rotation+this.parentRotation)%360/90*(g(this,ii).length/4);if(o!==i){if(o<i)for(let l=0;l<i-o;l++)g(this,sn).append(g(this,sn).firstChild);else if(o>i)for(let l=0;l<o-i;l++)g(this,sn).firstChild.before(g(this,sn).lastChild);let s=0;for(const l of t){const c=g(this,ii)[s++].getAttribute("data-resizer-name");l.setAttribute("data-l10n-id",je._l10nResizer[c])}}I(this,E1,xv).call(this,0),A(this,No,!0),g(this,sn).firstChild.focus({focusVisible:!0}),e.preventDefault(),e.stopImmediatePropagation()}_resizeWithKeyboard(e,t){g(this,No)&&I(this,C1,Av).call(this,g(this,p1),{movementX:e,movementY:t})}_stopResizingWithKeyboard(){I(this,Fl,Jh).call(this),this.div.focus()}select(){var e,t,r;this.makeResizable(),(e=this.div)==null||e.classList.add("selectedEditor"),this._editToolbar?((t=this._editToolbar)==null||t.show(),(r=g(this,ct))==null||r.toggleAltTextBadge(!1)):this.addEditToolbar().then(()=>{var i,o;(i=this.div)!=null&&i.classList.contains("selectedEditor")&&((o=this._editToolbar)==null||o.show())})}unselect(){var e,t,r,i,o;(e=g(this,sn))==null||e.classList.add("hidden"),(t=this.div)==null||t.classList.remove("selectedEditor"),(r=this.div)!=null&&r.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),(i=this._editToolbar)==null||i.hide(),(o=g(this,ct))==null||o.toggleAltTextBadge(!0)}updateParams(e,t){}disableEditing(){}enableEditing(){}enterInEditMode(){}getImageForAltText(){return null}get contentDiv(){return this.div}get isEditing(){return g(this,m1)}set isEditing(e){A(this,m1,e),this.parent&&(e?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(e,t){A(this,_l,!0);const r=e/t,{style:i}=this.div;i.aspectRatio=r,i.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(e,t=!1){if(t){g(this,Rr)||A(this,Rr,new Map);const{action:r}=e;let i=g(this,Rr).get(r);i&&clearTimeout(i),i=setTimeout(()=>{this._reportTelemetry(e),g(this,Rr).delete(r),g(this,Rr).size===0&&A(this,Rr,null)},je._telemetryTimeout),g(this,Rr).set(r,i)}else e.type||(e.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:e}})}show(e=this._isVisible){this.div.classList.toggle("hidden",!e),this._isVisible=e}enable(){this.div&&(this.div.tabIndex=0),A(this,id,!1)}disable(){this.div&&(this.div.tabIndex=-1),A(this,id,!0)}renderAnnotationElement(e){let t=e.container.querySelector(".annotationContent");if(t){if(t.nodeName==="CANVAS"){const r=t;t=document.createElement("div"),t.classList.add("annotationContent",this.editorType),r.before(t)}}else t=document.createElement("div"),t.classList.add("annotationContent",this.editorType),e.container.prepend(t);return t}resetAnnotationElement(e){const{firstChild:t}=e.container;t.nodeName==="DIV"&&t.classList.contains("annotationContent")&&t.remove()}};Bl=new WeakMap,ii=new WeakMap,ct=new WeakMap,id=new WeakMap,_l=new WeakMap,sn=new WeakMap,Rl=new WeakMap,na=new WeakMap,p1=new WeakMap,$l=new WeakMap,ra=new WeakMap,m1=new WeakMap,Vl=new WeakMap,No=new WeakMap,Ui=new WeakMap,od=new WeakMap,sd=new WeakMap,Rr=new WeakMap,g1=new WeakMap,F3=new WeakMap,y1=new WeakSet,kv=function([e,t],r,i){[r,i]=this.screenToPageTranslation(r,i),this.x+=r/e,this.y+=i/t,this.fixAndSetPosition()},b1=new WeakSet,Sv=function(e,t,r){switch(r){case 90:return[t,-e];case 180:return[-e,-t];case 270:return[-t,e];default:return[e,t]}},w1=new WeakSet,Ev=function(e){switch(e){case 90:{const[t,r]=this.pageDimensions;return[0,-t/r,r/t,0]}case 180:return[-1,0,0,-1];case 270:{const[t,r]=this.pageDimensions;return[0,t/r,-r/t,0]}default:return[1,0,0,1]}},j3=new WeakSet,SN=function(){if(g(this,sn))return;A(this,sn,document.createElement("div")),g(this,sn).classList.add("resizers");const e=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],t=this._uiManager._signal;for(const r of e){const i=document.createElement("div");g(this,sn).append(i),i.classList.add("resizer",r),i.setAttribute("data-resizer-name",r),i.addEventListener("pointerdown",I(this,z3,EN).bind(this,r),{signal:t}),i.addEventListener("contextmenu",kr,{signal:t}),i.tabIndex=-1}this.div.prepend(g(this,sn))},z3=new WeakSet,EN=function(e,t){var m;t.preventDefault();const{isMac:r}=jn.platform;if(t.button!==0||t.ctrlKey&&r)return;(m=g(this,ct))==null||m.toggle(!1);const i=this._isDraggable;this._isDraggable=!1;const o=new AbortController,s=this._uiManager.combinedSignal(o);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",I(this,C1,Av).bind(this,e),{passive:!0,capture:!0,signal:s}),window.addEventListener("contextmenu",kr,{signal:s});const l=this.x,c=this.y,d=this.width,u=this.height,f=this.parent.div.style.cursor,h=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(t.target).cursor;const p=()=>{var y;o.abort(),this.parent.togglePointerEvents(!0),(y=g(this,ct))==null||y.toggle(!0),this._isDraggable=i,this.parent.div.style.cursor=f,this.div.style.cursor=h,I(this,v1,Mv).call(this,l,c,d,u)};window.addEventListener("pointerup",p,{signal:s}),window.addEventListener("blur",p,{signal:s})},v1=new WeakSet,Mv=function(e,t,r,i){const o=this.x,s=this.y,l=this.width,c=this.height;o===e&&s===t&&l===r&&c===i||this.addCommands({cmd:()=>{this.width=l,this.height=c,this.x=o,this.y=s;const[d,u]=this.parentDimensions;this.setDims(d*l,u*c),this.fixAndSetPosition()},undo:()=>{this.width=r,this.height=i,this.x=e,this.y=t;const[d,u]=this.parentDimensions;this.setDims(d*r,u*i),this.fixAndSetPosition()},mustExec:!0})},C1=new WeakSet,Av=function(e,t){const[r,i]=this.parentDimensions,o=this.x,s=this.y,l=this.width,c=this.height,d=je.MIN_SIZE/r,u=je.MIN_SIZE/i,f=F=>Math.round(1e4*F)/1e4,h=I(this,w1,Ev).call(this,this.rotation),p=(F,R)=>[h[0]*F+h[2]*R,h[1]*F+h[3]*R],m=I(this,w1,Ev).call(this,360-this.rotation);let y,b,w=!1,v=!1;switch(e){case"topLeft":w=!0,y=(F,R)=>[0,0],b=(F,R)=>[F,R];break;case"topMiddle":y=(F,R)=>[F/2,0],b=(F,R)=>[F/2,R];break;case"topRight":w=!0,y=(F,R)=>[F,0],b=(F,R)=>[0,R];break;case"middleRight":v=!0,y=(F,R)=>[F,R/2],b=(F,R)=>[0,R/2];break;case"bottomRight":w=!0,y=(F,R)=>[F,R],b=(F,R)=>[0,0];break;case"bottomMiddle":y=(F,R)=>[F/2,R],b=(F,R)=>[F/2,0];break;case"bottomLeft":w=!0,y=(F,R)=>[0,R],b=(F,R)=>[F,0];break;case"middleLeft":v=!0,y=(F,R)=>[0,R/2],b=(F,R)=>[F,R/2]}const k=y(l,c),C=b(l,c);let T=p(...C);const S=f(o+T[0]),M=f(s+T[1]);let x=1,O=1,[P,N]=this.screenToPageTranslation(t.movementX,t.movementY);[P,N]=(_=P/r,V=N/i,[m[0]*_+m[2]*V,m[1]*_+m[3]*V]);var _,V;if(w){const F=Math.hypot(l,c);x=O=Math.max(Math.min(Math.hypot(C[0]-k[0]-P,C[1]-k[1]-N)/F,1/l,1/c),d/l,u/c)}else v?x=Math.max(d,Math.min(1,Math.abs(C[0]-k[0]-P)))/l:O=Math.max(u,Math.min(1,Math.abs(C[1]-k[1]-N)))/c;const H=f(l*x),L=f(c*O);T=p(...b(H,L));const D=S-T[0],U=M-T[1];this.width=H,this.height=L,this.x=D,this.y=U,this.setDims(r*H,i*L),this.fixAndSetPosition()},k1=new WeakSet,Tv=function(e){const{isMac:t}=jn.platform;e.ctrlKey&&!t||e.shiftKey||e.metaKey&&t?this.parent.toggleSelected(this):this.parent.setSelected(this)},H3=new WeakSet,MN=function(e){const t=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();const r=new AbortController,i=this._uiManager.combinedSignal(r);if(t){this.div.classList.add("moving"),A(this,od,e.clientX),A(this,sd,e.clientY);const s=l=>{const{clientX:c,clientY:d}=l,[u,f]=this.screenToPageTranslation(c-g(this,od),d-g(this,sd));A(this,od,c),A(this,sd,d),this._uiManager.dragSelectedEditors(u,f)};window.addEventListener("pointermove",s,{passive:!0,capture:!0,signal:i})}const o=()=>{r.abort(),t&&this.div.classList.remove("moving"),A(this,$l,!1),this._uiManager.endDragSession()||I(this,k1,Tv).call(this,e)};window.addEventListener("pointerup",o,{signal:i}),window.addEventListener("blur",o,{signal:i})},S1=new WeakSet,Iv=function(){if(g(this,na)||!this.div)return;A(this,na,new AbortController);const e=this._uiManager.combinedSignal(g(this,na));this.div.addEventListener("focusin",this.focusin.bind(this),{signal:e}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:e})},U3=new WeakSet,AN=function(e){je._resizerKeyboardManager.exec(this,e)},Z3=new WeakSet,TN=function(e){var t;g(this,No)&&((t=e.relatedTarget)==null?void 0:t.parentNode)!==g(this,sn)&&I(this,Fl,Jh).call(this)},W3=new WeakSet,IN=function(e){A(this,p1,g(this,No)?e:"")},E1=new WeakSet,xv=function(e){if(g(this,ii))for(const t of g(this,ii))t.tabIndex=e},Fl=new WeakSet,Jh=function(){if(A(this,No,!1),I(this,E1,xv).call(this,-1),g(this,Rl)){const{savedX:e,savedY:t,savedWidth:r,savedHeight:i}=g(this,Rl);I(this,v1,Mv).call(this,e,t,r,i),A(this,Rl,null)}},E(je,b1),be(je,"_l10nPromise",null),be(je,"_l10nResizer",null),be(je,"_borderLineWidth",-1),be(je,"_colorManager",new $b),be(je,"_zIndex",1),be(je,"_telemetryTimeout",1e3);let He=je;class aZ extends He{constructor(e){super(e),this.annotationElementId=e.annotationElementId,this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}const TE=3285377520,Sr=4294901760,gs=65535;class IE{constructor(e){this.h1=e?4294967295&e:TE,this.h2=e?4294967295&e:TE}update(e){let t,r;if(typeof e=="string"){t=new Uint8Array(2*e.length),r=0;for(let y=0,b=e.length;y<b;y++){const w=e.charCodeAt(y);w<=255?t[r++]=w:(t[r++]=w>>>8,t[r++]=255&w)}}else{if(!ArrayBuffer.isView(e))throw new Error("Invalid data format, must be a string or TypedArray.");t=e.slice(),r=t.byteLength}const i=r>>2,o=r-4*i,s=new Uint32Array(t.buffer,0,i);let l=0,c=0,d=this.h1,u=this.h2;const f=3432918353,h=461845907,p=11601,m=13715;for(let y=0;y<i;y++)1&y?(l=s[y],l=l*f&Sr|l*p&gs,l=l<<15|l>>>17,l=l*h&Sr|l*m&gs,d^=l,d=d<<13|d>>>19,d=5*d+3864292196):(c=s[y],c=c*f&Sr|c*p&gs,c=c<<15|c>>>17,c=c*h&Sr|c*m&gs,u^=c,u=u<<13|u>>>19,u=5*u+3864292196);switch(l=0,o){case 3:l^=t[4*i+2]<<16;case 2:l^=t[4*i+1]<<8;case 1:l^=t[4*i],l=l*f&Sr|l*p&gs,l=l<<15|l>>>17,l=l*h&Sr|l*m&gs,1&i?d^=l:u^=l}this.h1=d,this.h2=u}hexdigest(){let e=this.h1,t=this.h2;return e^=t>>>1,e=3981806797*e&Sr|36045*e&gs,t=4283543511*t&Sr|(2950163797*(t<<16|e>>>16)&Sr)>>>16,e^=t>>>1,e=444984403*e&Sr|60499*e&gs,t=3301882366*t&Sr|(3120437893*(t<<16|e>>>16)&Sr)>>>16,e^=t>>>1,(e>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}const Vb=Object.freeze({map:null,hash:"",transfer:void 0});class Fb{constructor(){E(this,q3);E(this,jl,!1);E(this,zl,null);E(this,qt,new Map);this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(e,t){const r=g(this,qt).get(e);return r===void 0?t:Object.assign(t,r)}getRawValue(e){return g(this,qt).get(e)}remove(e){if(g(this,qt).delete(e),g(this,qt).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const t of g(this,qt).values())if(t instanceof He)return;this.onAnnotationEditor(null)}}setValue(e,t){const r=g(this,qt).get(e);let i=!1;if(r!==void 0)for(const[o,s]of Object.entries(t))r[o]!==s&&(i=!0,r[o]=s);else i=!0,g(this,qt).set(e,t);i&&I(this,q3,xN).call(this),t instanceof He&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(t.constructor._type)}has(e){return g(this,qt).has(e)}getAll(){return g(this,qt).size>0?xb(g(this,qt)):null}setAll(e){for(const[t,r]of Object.entries(e))this.setValue(t,r)}get size(){return g(this,qt).size}resetModified(){g(this,jl)&&(A(this,jl,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new xE(this)}get serializable(){if(g(this,qt).size===0)return Vb;const e=new Map,t=new IE,r=[],i=Object.create(null);let o=!1;for(const[s,l]of g(this,qt)){const c=l instanceof He?l.serialize(!1,i):l;c&&(e.set(s,c),t.update(`${s}:${JSON.stringify(c)}`),o||(o=!!c.bitmap))}if(o)for(const s of e.values())s.bitmap&&r.push(s.bitmap);return e.size>0?{map:e,hash:t.hexdigest(),transfer:r}:Vb}get editorStats(){let e=null;const t=new Map;for(const r of g(this,qt).values()){if(!(r instanceof He))continue;const i=r.telemetryFinalData;if(!i)continue;const{type:o}=i;t.has(o)||t.set(o,Object.getPrototypeOf(r).constructor),e||(e=Object.create(null));const s=e[o]||(e[o]=new Map);for(const[l,c]of Object.entries(i)){if(l==="type")continue;let d=s.get(l);d||(d=new Map,s.set(l,d));const u=d.get(c)??0;d.set(c,u+1)}}for(const[r,i]of t)e[r]=i.computeTelemetryFinalData(e[r]);return e}resetModifiedIds(){A(this,zl,null)}get modifiedIds(){if(g(this,zl))return g(this,zl);const e=[];for(const t of g(this,qt).values())t instanceof He&&t.annotationElementId&&t.serialize()&&e.push(t.annotationElementId);return A(this,zl,{ids:new Set(e),hash:e.join(",")})}}jl=new WeakMap,zl=new WeakMap,qt=new WeakMap,q3=new WeakSet,xN=function(){g(this,jl)||(A(this,jl,!0),typeof this.onSetModified=="function"&&this.onSetModified())};class xE extends Fb{constructor(t){super();E(this,M1,void 0);const{map:r,hash:i,transfer:o}=t.serializable,s=structuredClone(r,o?{transfer:o}:null);A(this,M1,{map:s,hash:i,transfer:o})}get print(){Mt("Should not call PrintAnnotationStorage.print")}get serializable(){return g(this,M1)}get modifiedIds(){return De(this,"modifiedIds",{ids:new Set,hash:""})}}M1=new WeakMap;class lZ{constructor({ownerDocument:e=globalThis.document,styleElement:t=null}){E(this,ad,new Set);this._document=e,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e){this.nativeFontFaces.add(e),this._document.fonts.add(e)}removeNativeFontFace(e){this.nativeFontFaces.delete(e),this._document.fonts.delete(e)}insertRule(e){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const t=this.styleElement.sheet;t.insertRule(e,t.cssRules.length)}clear(){for(const e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.clear(),g(this,ad).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:e,_inspectFont:t}){if(e&&!g(this,ad).has(e.loadedName))if(xt(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:r,src:i,style:o}=e,s=new FontFace(r,i,o);this.addNativeFontFace(s);try{await s.load(),g(this,ad).add(r),t==null||t(e)}catch{Ee(`Cannot load system font: ${e.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(s)}}else Mt("Not implemented: loadSystemFont without the Font Loading API.")}async bind(e){if(e.attached||e.missingFile&&!e.systemFontInfo)return;if(e.attached=!0,e.systemFontInfo){await this.loadSystemFont(e);return}if(this.isFontLoadingAPISupported){const r=e.createNativeFontFace();if(r){this.addNativeFontFace(r);try{await r.loaded}catch(i){throw Ee(`Failed to load font '${r.family}': '${i}'.`),e.disableFontFace=!0,i}}return}const t=e.createFontFaceRule();if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return;await new Promise(r=>{const i=this._queueLoadingCallback(r);this._prepareFontLoadEvent(e,i)})}}get isFontLoadingAPISupported(){var e;return De(this,"isFontLoadingAPISupported",!!((e=this._document)!=null&&e.fonts))}get isSyncFontLoadingSupported(){let e=!1;return(mn||typeof navigator<"u"&&typeof(navigator==null?void 0:navigator.userAgent)=="string"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(e=!0),De(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){const{loadingRequests:t}=this,r={done:!1,complete:function(){for(xt(!r.done,"completeRequest() cannot be called twice."),r.done=!0;t.length>0&&t[0].done;){const o=t.shift();setTimeout(o.callback,0)}},callback:e};return t.push(r),r}get _loadTestFont(){return De(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(e,t){function r(b,w){return b.charCodeAt(w)<<24|b.charCodeAt(w+1)<<16|b.charCodeAt(w+2)<<8|255&b.charCodeAt(w+3)}function i(b,w,v,k){return b.substring(0,w)+k+b.substring(w+v)}let o,s;const l=this._document.createElement("canvas");l.width=1,l.height=1;const c=l.getContext("2d");let d=0;const u=`lt${Date.now()}${this.loadTestFontId++}`;let f=this._loadTestFont;f=i(f,976,u.length,u);const h=1482184792;let p=r(f,16);for(o=0,s=u.length-3;o<s;o+=4)p=p-h+r(u,o)|0;o<u.length&&(p=p-h+r(u+"XXX",o)|0),f=i(f,16,4,function(w){return String.fromCharCode(w>>24&255,w>>16&255,w>>8&255,255&w)}(p));const m=`@font-face {font-family:"${u}";src:${`url(data:font/opentype;base64,${btoa(f)});`}}`;this.insertRule(m);const y=this._document.createElement("div");y.style.visibility="hidden",y.style.width=y.style.height="10px",y.style.position="absolute",y.style.top=y.style.left="0px";for(const b of[e.loadedName,u]){const w=this._document.createElement("span");w.textContent="Hi",w.style.fontFamily=b,y.append(w)}this._document.body.append(y),function b(w,v){if(++d>30){Ee("Load test font never loaded."),v();return}c.font="30px "+w,c.fillText(".",0,20),c.getImageData(0,0,1,1).data[3]>0?v():setTimeout(b.bind(null,w,v))}(u,()=>{y.remove(),t.complete()})}}ad=new WeakMap;class cZ{constructor(e,{disableFontFace:t=!1,inspectFont:r=null}){this.compiledGlyphs=Object.create(null);for(const i in e)this[i]=e[i];this.disableFontFace=t===!0,this._inspectFont=r}createNativeFontFace(){var t;if(!this.data||this.disableFontFace)return null;let e;if(this.cssFontInfo){const r={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(r.style=`oblique ${this.cssFontInfo.italicAngle}deg`),e=new FontFace(this.cssFontInfo.fontFamily,this.data,r)}else e=new FontFace(this.loadedName,this.data,{});return(t=this._inspectFont)==null||t.call(this,this),e}createFontFaceRule(){var i;if(!this.data||this.disableFontFace)return null;const e=mE(this.data),t=`url(data:${this.mimetype};base64,${btoa(e)});`;let r;if(this.cssFontInfo){let o=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(o+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),r=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${o}src:${t}}`}else r=`@font-face {font-family:"${this.loadedName}";src:${t}}`;return(i=this._inspectFont)==null||i.call(this,this,t),r}getPathGenerator(e,t){if(this.compiledGlyphs[t]!==void 0)return this.compiledGlyphs[t];let r;try{r=e.get(this.loadedName+"_path_"+t)}catch(o){Ee(`getPathGenerator - ignoring character: "${o}".`)}if(!Array.isArray(r)||r.length===0)return this.compiledGlyphs[t]=function(o,s){};const i=[];for(let o=0,s=r.length;o<s;)switch(r[o++]){case ZU:{const[l,c,d,u,f,h]=r.slice(o,o+6);i.push(p=>p.bezierCurveTo(l,c,d,u,f,h)),o+=6}break;case WU:{const[l,c]=r.slice(o,o+2);i.push(d=>d.moveTo(l,c)),o+=2}break;case qU:{const[l,c]=r.slice(o,o+2);i.push(d=>d.lineTo(l,c)),o+=2}break;case KU:{const[l,c,d,u]=r.slice(o,o+4);i.push(f=>f.quadraticCurveTo(l,c,d,u)),o+=4}break;case GU:i.push(l=>l.restore());break;case YU:i.push(l=>l.save());break;case QU:xt(i.length===2,"Scale command is only valid at the third position.");break;case XU:{const[l,c,d,u,f,h]=r.slice(o,o+6);i.push(p=>p.transform(l,c,d,u,f,h)),o+=6}break;case JU:{const[l,c]=r.slice(o,o+2);i.push(d=>d.translate(l,c)),o+=2}}return this.compiledGlyphs[t]=function(s,l){i[0](s),i[1](s),s.scale(l,-l);for(let c=2,d=i.length;c<d;c++)i[c](s)}}}if(mn){var jb=Promise.withResolvers(),m2=null;(async()=>{const n=await Promise.resolve().then(()=>jf),e=await Promise.resolve().then(()=>jf),t=await Promise.resolve().then(()=>jf),r=await Promise.resolve().then(()=>jf);let i,o;try{i=await Promise.resolve().then(()=>jf)}catch{}try{o=await Promise.resolve().then(()=>c1e)}catch{}return new Map(Object.entries({fs:n,http:e,https:t,url:r,canvas:i,path2d:o}))})().then(n=>{var e,t,r,i;if(m2=n,jb.resolve(),!globalThis.DOMMatrix){const o=(e=n.get("canvas"))==null?void 0:e.DOMMatrix;o?globalThis.DOMMatrix=o:Ee("Cannot polyfill `DOMMatrix`, rendering may be broken.")}if(!globalThis.Path2D){const o=(t=n.get("canvas"))==null?void 0:t.CanvasRenderingContext2D,s=(r=n.get("path2d"))==null?void 0:r.applyPath2DToCanvasRenderingContext,l=(i=n.get("path2d"))==null?void 0:i.Path2D;o&&s&&l?(s(o),globalThis.Path2D=l):Ee("Cannot polyfill `Path2D`, rendering may be broken.")}},n=>{Ee(`loadPackages: ${n}`),m2=new Map,jb.resolve()})}class ys{static get promise(){return jb.promise}static get(e){return m2==null?void 0:m2.get(e)}}const OE=function(n){return ys.get("fs").promises.readFile(n).then(e=>new Uint8Array(e))},Qa="Fill",zb="Stroke",g2="Shading";function Hb(n,e){if(!e)return;const t=e[2]-e[0],r=e[3]-e[1],i=new Path2D;i.rect(e[0],e[1],t,r),n.clip(i)}class Ub{getPattern(){Mt("Abstract method `getPattern` called.")}}class dZ extends Ub{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}_createGradient(e){let t;this._type==="axial"?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const r of this._colorStops)t.addColorStop(r[0],r[1]);return t}getPattern(e,t,r,i){let o;if(i===zb||i===Qa){const s=t.current.getClippedPathBoundingBox(i,st(e))||[0,0,0,0],l=Math.ceil(s[2]-s[0])||1,c=Math.ceil(s[3]-s[1])||1,d=t.cachedCanvases.getCanvas("pattern",l,c,!0),u=d.context;u.clearRect(0,0,u.canvas.width,u.canvas.height),u.beginPath(),u.rect(0,0,u.canvas.width,u.canvas.height),u.translate(-s[0],-s[1]),r=ue.transform(r,[1,0,0,1,s[0],s[1]]),u.transform(...t.baseTransform),this.matrix&&u.transform(...this.matrix),Hb(u,this._bbox),u.fillStyle=this._createGradient(u),u.fill(),o=e.createPattern(d.canvas,"no-repeat");const f=new DOMMatrix(r);o.setTransform(f)}else Hb(e,this._bbox),o=this._createGradient(e);return o}}function Zb(n,e,t,r,i,o,s,l){const c=e.coords,d=e.colors,u=n.data,f=4*n.width;let h;c[t+1]>c[r+1]&&(h=t,t=r,r=h,h=o,o=s,s=h),c[r+1]>c[i+1]&&(h=r,r=i,i=h,h=s,s=l,l=h),c[t+1]>c[r+1]&&(h=t,t=r,r=h,h=o,o=s,s=h);const p=(c[t]+e.offsetX)*e.scaleX,m=(c[t+1]+e.offsetY)*e.scaleY,y=(c[r]+e.offsetX)*e.scaleX,b=(c[r+1]+e.offsetY)*e.scaleY,w=(c[i]+e.offsetX)*e.scaleX,v=(c[i+1]+e.offsetY)*e.scaleY;if(m>=v)return;const k=d[o],C=d[o+1],T=d[o+2],S=d[s],M=d[s+1],x=d[s+2],O=d[l],P=d[l+1],N=d[l+2],_=Math.round(m),V=Math.round(v);let H,L,D,U,F,R,G,ne;for(let Y=_;Y<=V;Y++){if(Y<b){const J=Y<m?0:(m-Y)/(m-b);H=p-(p-y)*J,L=k-(k-S)*J,D=C-(C-M)*J,U=T-(T-x)*J}else{let J;J=Y>v?1:b===v?0:(b-Y)/(b-v),H=y-(y-w)*J,L=S-(S-O)*J,D=M-(M-P)*J,U=x-(x-N)*J}let Z;Z=Y<m?0:Y>v?1:(m-Y)/(m-v),F=p-(p-w)*Z,R=k-(k-O)*Z,G=C-(C-P)*Z,ne=T-(T-N)*Z;const j=Math.round(Math.min(H,F)),$=Math.round(Math.max(H,F));let W=f*Y+4*j;for(let J=j;J<=$;J++)Z=(H-J)/(H-F),Z<0?Z=0:Z>1&&(Z=1),u[W++]=L-(L-R)*Z|0,u[W++]=D-(D-G)*Z|0,u[W++]=U-(U-ne)*Z|0,u[W++]=255}}function uZ(n,e,t){const r=e.coords,i=e.colors;let o,s;switch(e.type){case"lattice":const l=e.verticesPerRow,c=Math.floor(r.length/l)-1,d=l-1;for(o=0;o<c;o++){let u=o*l;for(let f=0;f<d;f++,u++)Zb(n,t,r[u],r[u+1],r[u+l],i[u],i[u+1],i[u+l]),Zb(n,t,r[u+l+1],r[u+1],r[u+l],i[u+l+1],i[u+1],i[u+l])}break;case"triangles":for(o=0,s=r.length;o<s;o+=3)Zb(n,t,r[o],r[o+1],r[o+2],i[o],i[o+1],i[o+2]);break;default:throw new Error("illegal figure")}}class fZ extends Ub{constructor(e){super(),this._coords=e[2],this._colors=e[3],this._figures=e[4],this._bounds=e[5],this._bbox=e[7],this._background=e[8],this.matrix=null}_createMeshCanvas(e,t,r){const i=Math.floor(this._bounds[0]),o=Math.floor(this._bounds[1]),s=Math.ceil(this._bounds[2])-i,l=Math.ceil(this._bounds[3])-o,c=Math.min(Math.ceil(Math.abs(s*e[0]*1.1)),3e3),d=Math.min(Math.ceil(Math.abs(l*e[1]*1.1)),3e3),u=s/c,f=l/d,h={coords:this._coords,colors:this._colors,offsetX:-i,offsetY:-o,scaleX:1/u,scaleY:1/f},p=c+4,m=d+4,y=r.getCanvas("mesh",p,m,!1),b=y.context,w=b.createImageData(c,d);if(t){const v=w.data;for(let k=0,C=v.length;k<C;k+=4)v[k]=t[0],v[k+1]=t[1],v[k+2]=t[2],v[k+3]=255}for(const v of this._figures)uZ(w,v,h);return b.putImageData(w,2,2),{canvas:y.canvas,offsetX:i-2*u,offsetY:o-2*f,scaleX:u,scaleY:f}}getPattern(e,t,r,i){Hb(e,this._bbox);let o;if(i===g2)o=ue.singularValueDecompose2dScale(st(e));else if(o=ue.singularValueDecompose2dScale(t.baseTransform),this.matrix){const l=ue.singularValueDecompose2dScale(this.matrix);o=[o[0]*l[0],o[1]*l[1]]}const s=this._createMeshCanvas(o,i===g2?null:this._background,t.cachedCanvases);return i!==g2&&(e.setTransform(...t.baseTransform),this.matrix&&e.transform(...this.matrix)),e.translate(s.offsetX,s.offsetY),e.scale(s.scaleX,s.scaleY),e.createPattern(s.canvas,"no-repeat")}}class hZ extends Ub{getPattern(){return"hotpink"}}const pZ=1,mZ=2,K3=class K3{constructor(e,t,r,i,o){this.operatorList=e[2],this.matrix=e[3],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=t,this.ctx=r,this.canvasGraphicsFactory=i,this.baseTransform=o}createPatternCanvas(e){const t=this.operatorList,r=this.bbox,i=this.xstep,o=this.ystep,s=this.paintType,l=this.tilingType,c=this.color,d=this.canvasGraphicsFactory;lm("TilingType: "+l);const u=r[0],f=r[1],h=r[2],p=r[3],m=ue.singularValueDecompose2dScale(this.matrix),y=ue.singularValueDecompose2dScale(this.baseTransform),b=[m[0]*y[0],m[1]*y[1]],w=this.getSizeAndScale(i,this.ctx.canvas.width,b[0]),v=this.getSizeAndScale(o,this.ctx.canvas.height,b[1]),k=e.cachedCanvases.getCanvas("pattern",w.size,v.size,!0),C=k.context,T=d.createCanvasGraphics(C);T.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(T,s,c);let S=u,M=f,x=h,O=p;return u<0&&(S=0,x+=Math.abs(u)),f<0&&(M=0,O+=Math.abs(f)),C.translate(-w.scale*S,-v.scale*M),T.transform(w.scale,0,0,v.scale,0,0),C.save(),this.clipBbox(T,S,M,x,O),T.baseTransform=st(T.ctx),T.executeOperatorList(t),T.endDrawing(),{canvas:k.canvas,scaleX:w.scale,scaleY:v.scale,offsetX:S,offsetY:M}}getSizeAndScale(e,t,r){e=Math.abs(e);const i=Math.max(K3.MAX_PATTERN_SIZE,t);let o=Math.ceil(e*r);return o>=i?o=i:r=o/e,{scale:r,size:o}}clipBbox(e,t,r,i,o){const s=i-t,l=o-r;e.ctx.rect(t,r,s,l),e.current.updateRectMinMax(st(e.ctx),[t,r,i,o]),e.clip(),e.endPath()}setFillAndStrokeStyleToContext(e,t,r){const i=e.ctx,o=e.current;switch(t){case pZ:const s=this.ctx;i.fillStyle=s.fillStyle,i.strokeStyle=s.strokeStyle,o.fillColor=s.fillStyle,o.strokeColor=s.strokeStyle;break;case mZ:const l=ue.makeHexColor(r[0],r[1],r[2]);i.fillStyle=l,i.strokeStyle=l,o.fillColor=l,o.strokeColor=l;break;default:throw new HU(`Unsupported paint type: ${t}`)}}getPattern(e,t,r,i){let o=r;i!==g2&&(o=ue.transform(o,t.baseTransform),this.matrix&&(o=ue.transform(o,this.matrix)));const s=this.createPatternCanvas(t);let l=new DOMMatrix(o);l=l.translate(s.offsetX,s.offsetY),l=l.scale(1/s.scaleX,1/s.scaleY);const c=e.createPattern(s.canvas,"repeat");return c.setTransform(l),c}};be(K3,"MAX_PATTERN_SIZE",3e3);let Wb=K3;function gZ({src:n,srcPos:e=0,dest:t,width:r,height:i,nonBlackColor:o=4294967295,inverseDecode:s=!1}){const l=jn.isLittleEndian?4278190080:255,[c,d]=s?[o,l]:[l,o],u=r>>3,f=7&r,h=n.length;t=new Uint32Array(t.buffer);let p=0;for(let m=0;m<i;m++){for(const b=e+u;e<b;e++){const w=e<h?n[e]:255;t[p++]=128&w?d:c,t[p++]=64&w?d:c,t[p++]=32&w?d:c,t[p++]=16&w?d:c,t[p++]=8&w?d:c,t[p++]=4&w?d:c,t[p++]=2&w?d:c,t[p++]=1&w?d:c}if(f===0)continue;const y=e<h?n[e++]:255;for(let b=0;b<f;b++)t[p++]=y&1<<7-b?d:c}return{srcPos:e,destPos:p}}const zn=16;class yZ{constructor(e){this.canvasFactory=e,this.cache=Object.create(null)}getCanvas(e,t,r){let i;return this.cache[e]!==void 0?(i=this.cache[e],this.canvasFactory.reset(i,t,r)):(i=this.canvasFactory.create(t,r),this.cache[e]=i),i}delete(e){delete this.cache[e]}clear(){for(const e in this.cache){const t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}}function mm(n,e,t,r,i,o,s,l,c,d){const[u,f,h,p,m,y]=st(n);if(f===0&&h===0){const b=s*u+m,w=Math.round(b),v=l*p+y,k=Math.round(v),C=(s+c)*u+m,T=Math.abs(Math.round(C)-w)||1,S=(l+d)*p+y,M=Math.abs(Math.round(S)-k)||1;return n.setTransform(Math.sign(u),0,0,Math.sign(p),w,k),n.drawImage(e,t,r,i,o,0,0,T,M),n.setTransform(u,f,h,p,m,y),[T,M]}if(u===0&&p===0){const b=l*h+m,w=Math.round(b),v=s*f+y,k=Math.round(v),C=(l+d)*h+m,T=Math.abs(Math.round(C)-w)||1,S=(s+c)*f+y,M=Math.abs(Math.round(S)-k)||1;return n.setTransform(0,Math.sign(f),Math.sign(h),0,w,k),n.drawImage(e,t,r,i,o,0,0,M,T),n.setTransform(u,f,h,p,m,y),[M,T]}return n.drawImage(e,t,r,i,o,s,l,c,d),[Math.hypot(u,f)*c,Math.hypot(h,p)*d]}class DE{constructor(e,t){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=uE,this.textMatrixScale=1,this.fontMatrix=kb,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=im,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,e,t])}clone(){const e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}setCurrentPoint(e,t){this.x=e,this.y=t}updatePathMinMax(e,t,r){[t,r]=ue.applyTransform([t,r],e),this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,r),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,r)}updateRectMinMax(e,t){const r=ue.applyTransform(t,e),i=ue.applyTransform(t.slice(2),e),o=ue.applyTransform([t[0],t[3]],e),s=ue.applyTransform([t[2],t[1]],e);this.minX=Math.min(this.minX,r[0],i[0],o[0],s[0]),this.minY=Math.min(this.minY,r[1],i[1],o[1],s[1]),this.maxX=Math.max(this.maxX,r[0],i[0],o[0],s[0]),this.maxY=Math.max(this.maxY,r[1],i[1],o[1],s[1])}updateScalingPathMinMax(e,t){ue.scaleMinMax(e,t),this.minX=Math.min(this.minX,t[0]),this.minY=Math.min(this.minY,t[1]),this.maxX=Math.max(this.maxX,t[2]),this.maxY=Math.max(this.maxY,t[3])}updateCurvePathMinMax(e,t,r,i,o,s,l,c,d,u){const f=ue.bezierBoundingBox(t,r,i,o,s,l,c,d,u);u||this.updateRectMinMax(e,f)}getPathBoundingBox(e=Qa,t=null){const r=[this.minX,this.minY,this.maxX,this.maxY];if(e===zb){t||Mt("Stroke bounding box must include transform.");const i=ue.singularValueDecompose2dScale(t),o=i[0]*this.lineWidth/2,s=i[1]*this.lineWidth/2;r[0]-=o,r[1]-=s,r[2]+=o,r[3]+=s}return r}updateClipFromPath(){const e=ue.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(e=Qa,t=null){return ue.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}function NE(n,e){if(typeof ImageData<"u"&&e instanceof ImageData){n.putImageData(e,0,0);return}const t=e.height,r=e.width,i=t%zn,o=(t-i)/zn,s=i===0?o:o+1,l=n.createImageData(r,zn);let c,d=0;const u=e.data,f=l.data;let h,p,m,y;if(e.kind===om.GRAYSCALE_1BPP){const b=u.byteLength,w=new Uint32Array(f.buffer,0,f.byteLength>>2),v=w.length,k=r+7>>3,C=4294967295,T=jn.isLittleEndian?4278190080:255;for(h=0;h<s;h++){for(m=h<o?zn:i,c=0,p=0;p<m;p++){const S=b-d;let M=0;const x=S>k?r:8*S-7,O=-8&x;let P=0,N=0;for(;M<O;M+=8)N=u[d++],w[c++]=128&N?C:T,w[c++]=64&N?C:T,w[c++]=32&N?C:T,w[c++]=16&N?C:T,w[c++]=8&N?C:T,w[c++]=4&N?C:T,w[c++]=2&N?C:T,w[c++]=1&N?C:T;for(;M<x;M++)P===0&&(N=u[d++],P=128),w[c++]=N&P?C:T,P>>=1}for(;c<v;)w[c++]=0;n.putImageData(l,0,h*zn)}}else if(e.kind===om.RGBA_32BPP){for(p=0,y=r*zn*4,h=0;h<o;h++)f.set(u.subarray(d,d+y)),d+=y,n.putImageData(l,0,p),p+=zn;h<s&&(y=r*i*4,f.set(u.subarray(d,d+y)),n.putImageData(l,0,p))}else{if(e.kind!==om.RGB_24BPP)throw new Error(`bad image kind: ${e.kind}`);for(m=zn,y=r*m,h=0;h<s;h++){for(h>=o&&(m=i,y=r*m),c=0,p=y;p--;)f[c++]=u[d++],f[c++]=u[d++],f[c++]=u[d++],f[c++]=255;n.putImageData(l,0,h*zn)}}}function PE(n,e){if(e.bitmap){n.drawImage(e.bitmap,0,0);return}const t=e.height,r=e.width,i=t%zn,o=(t-i)/zn,s=i===0?o:o+1,l=n.createImageData(r,zn);let c=0;const d=e.data,u=l.data;for(let f=0;f<s;f++){const h=f<o?zn:i;({srcPos:c}=gZ({src:d,srcPos:c,dest:u,width:r,height:h,nonBlackColor:0})),n.putImageData(l,0,f*zn)}}function y2(n,e){const t=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const r of t)n[r]!==void 0&&(e[r]=n[r]);n.setLineDash!==void 0&&(e.setLineDash(n.getLineDash()),e.lineDashOffset=n.lineDashOffset)}function gm(n){if(n.strokeStyle=n.fillStyle="#000000",n.fillRule="nonzero",n.globalAlpha=1,n.lineWidth=1,n.lineCap="butt",n.lineJoin="miter",n.miterLimit=10,n.globalCompositeOperation="source-over",n.font="10px sans-serif",n.setLineDash!==void 0&&(n.setLineDash([]),n.lineDashOffset=0),!mn){const{filter:e}=n;e!=="none"&&e!==""&&(n.filter="none")}}function LE(n,e){if(e)return!0;const t=ue.singularValueDecompose2dScale(n);t[0]=Math.fround(t[0]),t[1]=Math.fround(t[1]);const r=Math.fround((globalThis.devicePixelRatio||1)*ms.PDF_TO_CSS_UNITS);return t[0]<=r&&t[1]<=r}const bZ=["butt","round","square"],wZ=["miter","round","bevel"],vZ={},BE={},lv=class lv{constructor(e,t,r,i,o,{optionalContentConfig:s,markedContentStack:l=null},c,d){E(this,A1);E(this,T1);this.ctx=e,this.current=new DE(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=r,this.canvasFactory=i,this.filterFactory=o,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=l||[],this.optionalContentConfig=s,this.cachedCanvases=new yZ(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=c,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=d,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(e,t=null){return typeof e=="string"?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):t}beginDrawing({transform:e,viewport:t,transparency:r=!1,background:i=null}){const o=this.ctx.canvas.width,s=this.ctx.canvas.height,l=this.ctx.fillStyle;if(this.ctx.fillStyle=i||"#ffffff",this.ctx.fillRect(0,0,o,s),this.ctx.fillStyle=l,r){const c=this.cachedCanvases.getCanvas("transparent",o,s);this.compositeCtx=this.ctx,this.transparentCanvas=c.canvas,this.ctx=c.context,this.ctx.save(),this.ctx.transform(...st(this.compositeCtx))}this.ctx.save(),gm(this.ctx),e&&(this.ctx.transform(...e),this.outputScaleX=e[0],this.outputScaleY=e[0]),this.ctx.transform(...t.transform),this.viewportScale=t.scale,this.baseTransform=st(this.ctx)}executeOperatorList(e,t,r,i){const o=e.argsArray,s=e.fnArray;let l=t||0;const c=o.length;if(c===l)return l;const d=c-l>10&&typeof r=="function",u=d?Date.now()+15:0;let f=0;const h=this.commonObjs,p=this.objs;let m;for(;;){if(i!==void 0&&l===i.nextBreakPoint)return i.breakIt(l,r),l;if(m=s[l],m!==Kr.dependency)this[m].apply(this,o[l]);else for(const y of o[l]){const b=y.startsWith("g_")?h:p;if(!b.has(y))return b.get(y,r),l}if(l++,l===c)return l;if(d&&++f>10){if(Date.now()>u)return r(),l;f=0}}}endDrawing(){I(this,A1,Ov).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const e of this._cachedBitmapsMap.values()){for(const t of e.values())typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&(t.width=t.height=0);e.clear()}this._cachedBitmapsMap.clear(),I(this,T1,Dv).call(this)}_scaleImage(e,t){const r=e.width,i=e.height;let o,s,l=Math.max(Math.hypot(t[0],t[1]),1),c=Math.max(Math.hypot(t[2],t[3]),1),d=r,u=i,f="prescale1";for(;l>2&&d>1||c>2&&u>1;){let h=d,p=u;l>2&&d>1&&(h=d>=16384?Math.floor(d/2)-1||1:Math.ceil(d/2),l/=d/h),c>2&&u>1&&(p=u>=16384?Math.floor(u/2)-1||1:Math.ceil(u)/2,c/=u/p),o=this.cachedCanvases.getCanvas(f,h,p),s=o.context,s.clearRect(0,0,h,p),s.drawImage(e,0,0,d,u,0,0,h,p),e=o.canvas,d=h,u=p,f=f==="prescale1"?"prescale2":"prescale1"}return{img:e,paintWidth:d,paintHeight:u}}_createMaskCanvas(e){const t=this.ctx,{width:r,height:i}=e,o=this.current.fillColor,s=this.current.patternFill,l=st(t);let c,d,u,f;if((e.bitmap||e.data)&&e.count>1){const x=e.bitmap||e.data.buffer;d=JSON.stringify(s?l:[l.slice(0,4),o]),c=this._cachedBitmapsMap.get(x),c||(c=new Map,this._cachedBitmapsMap.set(x,c));const O=c.get(d);if(O&&!s)return{canvas:O,offsetX:Math.round(Math.min(l[0],l[2])+l[4]),offsetY:Math.round(Math.min(l[1],l[3])+l[5])};u=O}u||(f=this.cachedCanvases.getCanvas("maskCanvas",r,i),PE(f.context,e));let h=ue.transform(l,[1/r,0,0,-1/i,0,0]);h=ue.transform(h,[1,0,0,1,0,-i]);const[p,m,y,b]=ue.getAxialAlignedBoundingBox([0,0,r,i],h),w=Math.round(y-p)||1,v=Math.round(b-m)||1,k=this.cachedCanvases.getCanvas("fillCanvas",w,v),C=k.context,T=p,S=m;C.translate(-T,-S),C.transform(...h),u||(u=this._scaleImage(f.canvas,ho(C)),u=u.img,c&&s&&c.set(d,u)),C.imageSmoothingEnabled=LE(st(C),e.interpolate),mm(C,u,0,0,u.width,u.height,0,0,r,i),C.globalCompositeOperation="source-in";const M=ue.transform(ho(C),[1,0,0,1,-T,-S]);return C.fillStyle=s?o.getPattern(t,this,M,Qa):o,C.fillRect(0,0,r,i),c&&!s&&(this.cachedCanvases.delete("fillCanvas"),c.set(d,k.canvas)),{canvas:k.canvas,offsetX:Math.round(T),offsetY:Math.round(S)}}setLineWidth(e){e!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(e){this.ctx.lineCap=bZ[e]}setLineJoin(e){this.ctx.lineJoin=wZ[e]}setMiterLimit(e){this.ctx.miterLimit=e}setDash(e,t){const r=this.ctx;r.setLineDash!==void 0&&(r.setLineDash(e),r.lineDashOffset=t)}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,r]of e)switch(t){case"LW":this.setLineWidth(r);break;case"LC":this.setLineCap(r);break;case"LJ":this.setLineJoin(r);break;case"ML":this.setMiterLimit(r);break;case"D":this.setDash(r[0],r[1]);break;case"RI":this.setRenderingIntent(r);break;case"FL":this.setFlatness(r);break;case"Font":this.setFont(r[0],r[1]);break;case"CA":this.current.strokeAlpha=r;break;case"ca":this.current.fillAlpha=r,this.ctx.globalAlpha=r;break;case"BM":this.ctx.globalCompositeOperation=r;break;case"SMask":this.current.activeSMask=r?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(r)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const e=this.ctx.canvas.width,t=this.ctx.canvas.height,r="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(r,e,t);this.suspendedCtx=this.ctx,this.ctx=i.context;const o=this.ctx;o.setTransform(...st(this.suspendedCtx)),y2(this.suspendedCtx,o),function(l,c){if(l._removeMirroring)throw new Error("Context is already forwarding operations.");l.__originalSave=l.save,l.__originalRestore=l.restore,l.__originalRotate=l.rotate,l.__originalScale=l.scale,l.__originalTranslate=l.translate,l.__originalTransform=l.transform,l.__originalSetTransform=l.setTransform,l.__originalResetTransform=l.resetTransform,l.__originalClip=l.clip,l.__originalMoveTo=l.moveTo,l.__originalLineTo=l.lineTo,l.__originalBezierCurveTo=l.bezierCurveTo,l.__originalRect=l.rect,l.__originalClosePath=l.closePath,l.__originalBeginPath=l.beginPath,l._removeMirroring=()=>{l.save=l.__originalSave,l.restore=l.__originalRestore,l.rotate=l.__originalRotate,l.scale=l.__originalScale,l.translate=l.__originalTranslate,l.transform=l.__originalTransform,l.setTransform=l.__originalSetTransform,l.resetTransform=l.__originalResetTransform,l.clip=l.__originalClip,l.moveTo=l.__originalMoveTo,l.lineTo=l.__originalLineTo,l.bezierCurveTo=l.__originalBezierCurveTo,l.rect=l.__originalRect,l.closePath=l.__originalClosePath,l.beginPath=l.__originalBeginPath,delete l._removeMirroring},l.save=function(){c.save(),this.__originalSave()},l.restore=function(){c.restore(),this.__originalRestore()},l.translate=function(u,f){c.translate(u,f),this.__originalTranslate(u,f)},l.scale=function(u,f){c.scale(u,f),this.__originalScale(u,f)},l.transform=function(u,f,h,p,m,y){c.transform(u,f,h,p,m,y),this.__originalTransform(u,f,h,p,m,y)},l.setTransform=function(u,f,h,p,m,y){c.setTransform(u,f,h,p,m,y),this.__originalSetTransform(u,f,h,p,m,y)},l.resetTransform=function(){c.resetTransform(),this.__originalResetTransform()},l.rotate=function(u){c.rotate(u),this.__originalRotate(u)},l.clip=function(u){c.clip(u),this.__originalClip(u)},l.moveTo=function(d,u){c.moveTo(d,u),this.__originalMoveTo(d,u)},l.lineTo=function(d,u){c.lineTo(d,u),this.__originalLineTo(d,u)},l.bezierCurveTo=function(d,u,f,h,p,m){c.bezierCurveTo(d,u,f,h,p,m),this.__originalBezierCurveTo(d,u,f,h,p,m)},l.rect=function(d,u,f,h){c.rect(d,u,f,h),this.__originalRect(d,u,f,h)},l.closePath=function(){c.closePath(),this.__originalClosePath()},l.beginPath=function(){c.beginPath(),this.__originalBeginPath()}}(o,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),y2(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(e){if(!this.current.activeSMask)return;e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const t=this.current.activeSMask,r=this.suspendedCtx;this.composeSMask(r,t,this.ctx,e),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(e,t,r,i){const o=i[0],s=i[1],l=i[2]-o,c=i[3]-s;l!==0&&c!==0&&(this.genericComposeSMask(t.context,r,l,c,t.subtype,t.backdrop,t.transferMap,o,s,t.offsetX,t.offsetY),e.save(),e.globalAlpha=1,e.globalCompositeOperation="source-over",e.setTransform(1,0,0,1,0,0),e.drawImage(r.canvas,0,0),e.restore())}genericComposeSMask(e,t,r,i,o,s,l,c,d,u,f){let h=e.canvas,p=c-u,m=d-f;if(s){if(p<0||m<0||p+r>h.width||m+i>h.height){const b=this.cachedCanvases.getCanvas("maskExtension",r,i),w=b.context;w.drawImage(h,-p,-m),s.some(v=>v!==0)&&(w.globalCompositeOperation="destination-atop",w.fillStyle=ue.makeHexColor(...s),w.fillRect(0,0,r,i),w.globalCompositeOperation="source-over"),h=b.canvas,p=m=0}else if(s.some(b=>b!==0)){e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0);const b=new Path2D;b.rect(p,m,r,i),e.clip(b),e.globalCompositeOperation="destination-atop",e.fillStyle=ue.makeHexColor(...s),e.fillRect(p,m,r,i),e.restore()}}t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0),o==="Alpha"&&l?t.filter=this.filterFactory.addAlphaFilter(l):o==="Luminosity"&&(t.filter=this.filterFactory.addLuminosityFilter(l));const y=new Path2D;y.rect(c,d,r,i),t.clip(y),t.globalCompositeOperation="destination-in",t.drawImage(h,p,m,r,i,c,d,r,i),t.restore()}save(){this.inSMaskMode?(y2(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const e=this.current;this.stateStack.push(e),this.current=e.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),y2(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(e,t,r,i,o,s){this.ctx.transform(e,t,r,i,o,s),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(e,t,r){const i=this.ctx,o=this.current;let s,l,c=o.x,d=o.y;const u=st(i),f=u[0]===0&&u[3]===0||u[1]===0&&u[2]===0,h=f?r.slice(0):null;for(let p=0,m=0,y=e.length;p<y;p++)switch(0|e[p]){case Kr.rectangle:c=t[m++],d=t[m++];const b=t[m++],w=t[m++],v=c+b,k=d+w;i.moveTo(c,d),b===0||w===0?i.lineTo(v,k):(i.lineTo(v,d),i.lineTo(v,k),i.lineTo(c,k)),f||o.updateRectMinMax(u,[c,d,v,k]),i.closePath();break;case Kr.moveTo:c=t[m++],d=t[m++],i.moveTo(c,d),f||o.updatePathMinMax(u,c,d);break;case Kr.lineTo:c=t[m++],d=t[m++],i.lineTo(c,d),f||o.updatePathMinMax(u,c,d);break;case Kr.curveTo:s=c,l=d,c=t[m+4],d=t[m+5],i.bezierCurveTo(t[m],t[m+1],t[m+2],t[m+3],c,d),o.updateCurvePathMinMax(u,s,l,t[m],t[m+1],t[m+2],t[m+3],c,d,h),m+=6;break;case Kr.curveTo2:s=c,l=d,i.bezierCurveTo(c,d,t[m],t[m+1],t[m+2],t[m+3]),o.updateCurvePathMinMax(u,s,l,c,d,t[m],t[m+1],t[m+2],t[m+3],h),c=t[m+2],d=t[m+3],m+=4;break;case Kr.curveTo3:s=c,l=d,c=t[m+2],d=t[m+3],i.bezierCurveTo(t[m],t[m+1],c,d,c,d),o.updateCurvePathMinMax(u,s,l,t[m],t[m+1],c,d,c,d,h),m+=4;break;case Kr.closePath:i.closePath()}f&&o.updateScalingPathMinMax(u,h),o.setCurrentPoint(c,d)}closePath(){this.ctx.closePath()}stroke(e=!0){const t=this.ctx,r=this.current.strokeColor;t.globalAlpha=this.current.strokeAlpha,this.contentVisible&&(typeof r=="object"&&(r!=null&&r.getPattern)?(t.save(),t.strokeStyle=r.getPattern(t,this,ho(t),zb),this.rescaleAndStroke(!1),t.restore()):this.rescaleAndStroke(!0)),e&&this.consumePath(this.current.getClippedPathBoundingBox()),t.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(e=!0){const t=this.ctx,r=this.current.fillColor;let i=!1;this.current.patternFill&&(t.save(),t.fillStyle=r.getPattern(t,this,ho(t),Qa),i=!0);const o=this.current.getClippedPathBoundingBox();this.contentVisible&&o!==null&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),i&&t.restore(),e&&this.consumePath(o)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=vZ}eoClip(){this.pendingClip=BE}beginText(){this.current.textMatrix=uE,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const e=this.pendingTextPaths,t=this.ctx;if(e!==void 0){t.save(),t.beginPath();for(const r of e)t.setTransform(...r.transform),t.translate(r.x,r.y),r.addToPath(t,r.fontSize);t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else t.beginPath()}setCharSpacing(e){this.current.charSpacing=e}setWordSpacing(e){this.current.wordSpacing=e}setHScale(e){this.current.textHScale=e/100}setLeading(e){this.current.leading=-e}setFont(e,t){var u;const r=this.commonObjs.get(e),i=this.current;if(!r)throw new Error(`Can't find font for ${e}`);if(i.fontMatrix=r.fontMatrix||kb,i.fontMatrix[0]!==0&&i.fontMatrix[3]!==0||Ee("Invalid font matrix for font "+e),t<0?(t=-t,i.fontDirection=-1):i.fontDirection=1,this.current.font=r,this.current.fontSize=t,r.isType3Font)return;const o=r.loadedName||"sans-serif",s=((u=r.systemFontInfo)==null?void 0:u.css)||`"${o}", ${r.fallbackName}`;let l="normal";r.black?l="900":r.bold&&(l="bold");const c=r.italic?"italic":"normal";let d=t;t<16?d=16:t>100&&(d=100),this.current.fontSizeScale=t/d,this.ctx.font=`${c} ${l} ${d}px ${s}`}setTextRenderingMode(e){this.current.textRenderingMode=e}setTextRise(e){this.current.textRise=e}moveText(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}setTextMatrix(e,t,r,i,o,s){this.current.textMatrix=[e,t,r,i,o,s],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(e,t,r,i){const o=this.ctx,s=this.current,l=s.font,c=s.textRenderingMode,d=s.fontSize/s.fontSizeScale,u=c&fE,f=!!(c&gU),h=s.patternFill&&!l.missingFile;let p;(l.disableFontFace||f||h)&&(p=l.getPathGenerator(this.commonObjs,e)),l.disableFontFace||h?(o.save(),o.translate(t,r),o.beginPath(),p(o,d),i&&o.setTransform(...i),u!==im&&u!==u2||o.fill(),u!==Mb&&u!==u2||o.stroke(),o.restore()):(u!==im&&u!==u2||o.fillText(e,t,r),u!==Mb&&u!==u2||o.strokeText(e,t,r)),f&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:st(o),x:t,y:r,fontSize:d,addToPath:p})}get isFontSubpixelAAEnabled(){const{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e.scale(1.5,1),e.fillText("I",0,10);const t=e.getImageData(0,0,10,10).data;let r=!1;for(let i=3;i<t.length;i+=4)if(t[i]>0&&t[i]<255){r=!0;break}return De(this,"isFontSubpixelAAEnabled",r)}showText(e){const t=this.current,r=t.font;if(r.isType3Font)return this.showType3Text(e);const i=t.fontSize;if(i===0)return;const o=this.ctx,s=t.fontSizeScale,l=t.charSpacing,c=t.wordSpacing,d=t.fontDirection,u=t.textHScale*d,f=e.length,h=r.vertical,p=h?1:-1,m=r.defaultVMetrics,y=i*t.fontMatrix[0],b=t.textRenderingMode===im&&!r.disableFontFace&&!t.patternFill;o.save(),o.transform(...t.textMatrix),o.translate(t.x,t.y+t.textRise),d>0?o.scale(u,-1):o.scale(u,1);let w;if(t.patternFill){o.save();const S=t.fillColor.getPattern(o,this,ho(o),Qa);w=st(o),o.restore(),o.fillStyle=S}let v=t.lineWidth;const k=t.textMatrixScale;if(k===0||v===0){const S=t.textRenderingMode&fE;S!==Mb&&S!==u2||(v=this.getSinglePixelWidth())}else v/=k;if(s!==1&&(o.scale(s,s),v/=s),o.lineWidth=v,r.isInvalidPDFjsFont){const S=[];let M=0;for(const x of e)S.push(x.unicode),M+=x.width;o.fillText(S.join(""),0,0),t.x+=M*y*u,o.restore(),this.compose();return}let C,T=0;for(C=0;C<f;++C){const S=e[C];if(typeof S=="number"){T+=p*S*i/1e3;continue}let M=!1;const x=(S.isSpace?c:0)+l,O=S.fontChar,P=S.accent;let N,_,V=S.width;if(h){const H=S.vmetric||m,L=-(S.vmetric?H[1]:.5*V)*y,D=H[2]*y;V=H?-H[0]:V,N=L/s,_=(T+D)/s}else N=T/s,_=0;if(r.remeasure&&V>0){const H=1e3*o.measureText(O).width/i*s;if(V<H&&this.isFontSubpixelAAEnabled){const L=V/H;M=!0,o.save(),o.scale(L,1),N/=L}else V!==H&&(N+=(V-H)/2e3*i/s)}if(this.contentVisible&&(S.isInFont||r.missingFile)){if(b&&!P)o.fillText(O,N,_);else if(this.paintChar(O,N,_,w),P){const H=N+i*P.offset.x/s,L=_-i*P.offset.y/s;this.paintChar(P.fontChar,H,L,w)}}T+=h?V*y-x*d:V*y+x*d,M&&o.restore()}h?t.y-=T:t.x+=T*u,o.restore(),this.compose()}showType3Text(e){const t=this.ctx,r=this.current,i=r.font,o=r.fontSize,s=r.fontDirection,l=i.vertical?1:-1,c=r.charSpacing,d=r.wordSpacing,u=r.textHScale*s,f=r.fontMatrix||kb,h=e.length;let p,m,y,b;if(r.textRenderingMode!==mU&&o!==0){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,t.save(),t.transform(...r.textMatrix),t.translate(r.x,r.y),t.scale(u,s),p=0;p<h;++p){if(m=e[p],typeof m=="number"){b=l*m*o/1e3,this.ctx.translate(b,0),r.x+=b*u;continue}const w=(m.isSpace?d:0)+c,v=i.charProcOperatorList[m.operatorListId];if(!v){Ee(`Type3 character "${m.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=m,this.save(),t.scale(o,o),t.transform(...f),this.executeOperatorList(v),this.restore()),y=ue.applyTransform([m.width,0],f)[0]*o+w,t.translate(y,0),r.x+=y*u}t.restore(),this.processingType3=null}}setCharWidth(e,t){}setCharWidthAndBounds(e,t,r,i,o,s){this.ctx.rect(r,i,o-r,s-i),this.ctx.clip(),this.endPath()}getColorN_Pattern(e){let t;if(e[0]==="TilingPattern"){const r=e[1],i=this.baseTransform||st(this.ctx),o={createCanvasGraphics:s=>new lv(s,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};t=new Wb(e,r,this.ctx,o,i)}else t=this._getPattern(e[1],e[2]);return t}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(e,t,r){this.ctx.strokeStyle=this.current.strokeColor=ue.makeHexColor(e,t,r)}setStrokeTransparent(){this.ctx.strokeStyle=this.current.strokeColor="transparent"}setFillRGBColor(e,t,r){this.ctx.fillStyle=this.current.fillColor=ue.makeHexColor(e,t,r),this.current.patternFill=!1}setFillTransparent(){this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(e,t=null){let r;return this.cachedPatterns.has(e)?r=this.cachedPatterns.get(e):(r=function(o){switch(o[0]){case"RadialAxial":return new dZ(o);case"Mesh":return new fZ(o);case"Dummy":return new hZ}throw new Error(`Unknown IR type: ${o[0]}`)}(this.getObject(e)),this.cachedPatterns.set(e,r)),t&&(r.matrix=t),r}shadingFill(e){if(!this.contentVisible)return;const t=this.ctx;this.save();const r=this._getPattern(e);t.fillStyle=r.getPattern(t,this,ho(t),g2);const i=ho(t);if(i){const{width:o,height:s}=t.canvas,[l,c,d,u]=ue.getAxialAlignedBoundingBox([0,0,o,s],i);this.ctx.fillRect(l,c,d-l,u-c)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){Mt("Should not call beginInlineImage")}beginImageData(){Mt("Should not call beginImageData")}paintFormXObjectBegin(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),e&&this.transform(...e),this.baseTransform=st(this.ctx),t)){const r=t[2]-t[0],i=t[3]-t[1];this.ctx.rect(t[0],t[1],r,i),this.current.updateRectMinMax(st(this.ctx),t),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(e){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const t=this.ctx;e.isolated||lm("TODO: Support non-isolated groups."),e.knockout&&Ee("Knockout groups not supported.");const r=st(t);if(e.matrix&&t.transform(...e.matrix),!e.bbox)throw new Error("Bounding box is required.");let i=ue.getAxialAlignedBoundingBox(e.bbox,st(t));const o=[0,0,t.canvas.width,t.canvas.height];i=ue.intersect(i,o)||[0,0,0,0];const s=Math.floor(i[0]),l=Math.floor(i[1]),c=Math.max(Math.ceil(i[2])-s,1),d=Math.max(Math.ceil(i[3])-l,1);this.current.startNewPathAndClipBox([0,0,c,d]);let u="groupAt"+this.groupLevel;e.smask&&(u+="_smask_"+this.smaskCounter++%2);const f=this.cachedCanvases.getCanvas(u,c,d),h=f.context;h.translate(-s,-l),h.transform(...r),e.smask?this.smaskStack.push({canvas:f.canvas,context:h,offsetX:s,offsetY:l,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(s,l),t.save()),y2(t,h),this.ctx=h,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++}endGroup(e){if(!this.contentVisible)return;this.groupLevel--;const t=this.ctx,r=this.groupStack.pop();if(this.ctx=r,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const i=st(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...i);const o=ue.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],i);this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(o)}}beginAnnotation(e,t,r,i,o){if(I(this,A1,Ov).call(this),gm(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),t){const s=t[2]-t[0],l=t[3]-t[1];if(o&&this.annotationCanvasMap){(r=r.slice())[4]-=t[0],r[5]-=t[1],(t=t.slice())[0]=t[1]=0,t[2]=s,t[3]=l;const[c,d]=ue.singularValueDecompose2dScale(st(this.ctx)),{viewportScale:u}=this,f=Math.ceil(s*this.outputScaleX*u),h=Math.ceil(l*this.outputScaleY*u);this.annotationCanvas=this.canvasFactory.create(f,h);const{canvas:p,context:m}=this.annotationCanvas;this.annotationCanvasMap.set(e,p),this.annotationCanvas.savedCtx=this.ctx,this.ctx=m,this.ctx.save(),this.ctx.setTransform(c,0,0,-d,0,l*d),gm(this.ctx)}else gm(this.ctx),this.ctx.rect(t[0],t[1],s,l),this.ctx.clip(),this.endPath()}this.current=new DE(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...r),this.transform(...i)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),I(this,T1,Dv).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(e){if(!this.contentVisible)return;const t=e.count;(e=this.getObject(e.data,e)).count=t;const r=this.ctx,i=this.processingType3;if(i&&(i.compiled===void 0&&(i.compiled=function(c){const{width:d,height:u}=c;if(d>1e3||u>1e3)return null;const f=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),h=d+1;let p,m,y,b=new Uint8Array(h*(u+1));const w=d+7&-8;let v=new Uint8Array(w*u),k=0;for(const M of c.data){let x=128;for(;x>0;)v[k++]=M&x?0:255,x>>=1}let C=0;for(k=0,v[k]!==0&&(b[0]=1,++C),m=1;m<d;m++)v[k]!==v[k+1]&&(b[m]=v[k]?2:1,++C),k++;for(v[k]!==0&&(b[m]=2,++C),p=1;p<u;p++){k=p*w,y=p*h,v[k-w]!==v[k]&&(b[y]=v[k]?1:8,++C);let M=(v[k]?4:0)+(v[k-w]?8:0);for(m=1;m<d;m++)M=(M>>2)+(v[k+1]?4:0)+(v[k-w+1]?8:0),f[M]&&(b[y+m]=f[M],++C),k++;if(v[k-w]!==v[k]&&(b[y+m]=v[k]?2:4,++C),C>1e3)return null}for(k=w*(u-1),y=p*h,v[k]!==0&&(b[y]=8,++C),m=1;m<d;m++)v[k]!==v[k+1]&&(b[y+m]=v[k]?4:8,++C),k++;if(v[k]!==0&&(b[y+m]=4,++C),C>1e3)return null;const T=new Int32Array([0,h,-1,0,-h,0,0,0,1]),S=new Path2D;for(p=0;C&&p<=u;p++){let M=p*h;const x=M+d;for(;M<x&&!b[M];)M++;if(M===x)continue;S.moveTo(M%h,p);const O=M;let P=b[M];do{const N=T[P];do M+=N;while(!b[M]);const _=b[M];_!==5&&_!==10?(P=_,b[M]=0):(P=_&51*P>>4,b[M]&=P>>2|P<<2),S.lineTo(M%h,M/h|0),b[M]||--C}while(O!==M);--p}return v=null,b=null,function(M){M.save(),M.scale(1/d,-1/u),M.translate(0,-u),M.fill(S),M.beginPath(),M.restore()}}(e)),i.compiled)){i.compiled(r);return}const o=this._createMaskCanvas(e),s=o.canvas;r.save(),r.setTransform(1,0,0,1,0,0),r.drawImage(s,o.offsetX,o.offsetY),r.restore(),this.compose()}paintImageMaskXObjectRepeat(e,t,r=0,i=0,o,s){if(!this.contentVisible)return;e=this.getObject(e.data,e);const l=this.ctx;l.save();const c=st(l);l.transform(t,r,i,o,0,0);const d=this._createMaskCanvas(e);l.setTransform(1,0,0,1,d.offsetX-c[4],d.offsetY-c[5]);for(let u=0,f=s.length;u<f;u+=2){const h=ue.transform(c,[t,r,i,o,s[u],s[u+1]]),[p,m]=ue.applyTransform([0,0],h);l.drawImage(d.canvas,p,m)}l.restore(),this.compose()}paintImageMaskXObjectGroup(e){if(!this.contentVisible)return;const t=this.ctx,r=this.current.fillColor,i=this.current.patternFill;for(const o of e){const{data:s,width:l,height:c,transform:d}=o,u=this.cachedCanvases.getCanvas("maskCanvas",l,c),f=u.context;f.save(),PE(f,this.getObject(s,o)),f.globalCompositeOperation="source-in",f.fillStyle=i?r.getPattern(f,this,ho(t),Qa):r,f.fillRect(0,0,l,c),f.restore(),t.save(),t.transform(...d),t.scale(1,-1),mm(t,u.canvas,0,0,l,c,0,-1,1,1),t.restore()}this.compose()}paintImageXObject(e){if(!this.contentVisible)return;const t=this.getObject(e);t?this.paintInlineImageXObject(t):Ee("Dependent image isn't ready yet")}paintImageXObjectRepeat(e,t,r,i){if(!this.contentVisible)return;const o=this.getObject(e);if(!o){Ee("Dependent image isn't ready yet");return}const s=o.width,l=o.height,c=[];for(let d=0,u=i.length;d<u;d+=2)c.push({transform:[t,0,0,r,i[d],i[d+1]],x:0,y:0,w:s,h:l});this.paintInlineImageXObjectGroup(o,c)}applyTransferMapsToCanvas(e){return this.current.transferMaps!=="none"&&(e.filter=this.current.transferMaps,e.drawImage(e.canvas,0,0),e.filter="none"),e.canvas}applyTransferMapsToBitmap(e){if(this.current.transferMaps==="none")return e.bitmap;const{bitmap:t,width:r,height:i}=e,o=this.cachedCanvases.getCanvas("inlineImage",r,i),s=o.context;return s.filter=this.current.transferMaps,s.drawImage(t,0,0),s.filter="none",o.canvas}paintInlineImageXObject(e){if(!this.contentVisible)return;const t=e.width,r=e.height,i=this.ctx;if(this.save(),!mn){const{filter:l}=i;l!=="none"&&l!==""&&(i.filter="none")}i.scale(1/t,-1/r);let o;if(e.bitmap)o=this.applyTransferMapsToBitmap(e);else if(typeof HTMLElement=="function"&&e instanceof HTMLElement||!e.data)o=e;else{const l=this.cachedCanvases.getCanvas("inlineImage",t,r).context;NE(l,e),o=this.applyTransferMapsToCanvas(l)}const s=this._scaleImage(o,ho(i));i.imageSmoothingEnabled=LE(st(i),e.interpolate),mm(i,s.img,0,0,s.paintWidth,s.paintHeight,0,-r,t,r),this.compose(),this.restore()}paintInlineImageXObjectGroup(e,t){if(!this.contentVisible)return;const r=this.ctx;let i;if(e.bitmap)i=e.bitmap;else{const o=e.width,s=e.height,l=this.cachedCanvases.getCanvas("inlineImage",o,s).context;NE(l,e),i=this.applyTransferMapsToCanvas(l)}for(const o of t)r.save(),r.transform(...o.transform),r.scale(1,-1),mm(r,i,o.x,o.y,o.w,o.h,0,-1,1,1),r.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(e){}markPointProps(e,t){}beginMarkedContent(e){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(e,t){e==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(t)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(e){const t=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(e);const r=this.ctx;this.pendingClip&&(t||(this.pendingClip===BE?r.clip("evenodd"):r.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),r.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const e=st(this.ctx);if(e[1]===0&&e[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(e[0]),Math.abs(e[3]));else{const t=Math.abs(e[0]*e[3]-e[2]*e[1]),r=Math.hypot(e[0],e[2]),i=Math.hypot(e[1],e[3]);this._cachedGetSinglePixelWidth=Math.max(r,i)/t}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:e}=this.current,{a:t,b:r,c:i,d:o}=this.ctx.getTransform();let s,l;if(r===0&&i===0){const c=Math.abs(t),d=Math.abs(o);if(c===d)if(e===0)s=l=1/c;else{const u=c*e;s=l=u<1?1/u:1}else if(e===0)s=1/c,l=1/d;else{const u=c*e,f=d*e;s=u<1?1/u:1,l=f<1?1/f:1}}else{const c=Math.abs(t*o-r*i),d=Math.hypot(t,r),u=Math.hypot(i,o);if(e===0)s=u/c,l=d/c;else{const f=e*c;s=u>f?u/f:1,l=d>f?d/f:1}}this._cachedScaleForStroking[0]=s,this._cachedScaleForStroking[1]=l}return this._cachedScaleForStroking}rescaleAndStroke(e){const{ctx:t}=this,{lineWidth:r}=this.current,[i,o]=this.getScaleForStroking();if(t.lineWidth=r||1,i===1&&o===1){t.stroke();return}const s=t.getLineDash();if(e&&t.save(),t.scale(i,o),s.length>0){const l=Math.max(i,o);t.setLineDash(s.map(c=>c/l)),t.lineDashOffset/=l}t.stroke(),e&&t.restore()}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}};A1=new WeakSet,Ov=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)},T1=new WeakSet,Dv=function(){if(this.pageColors){const e=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(e!=="none"){const t=this.ctx.filter;this.ctx.filter=e,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=t}}};let tc=lv;for(const n in Kr)tc.prototype[n]!==void 0&&(tc.prototype[Kr[n]]=tc.prototype[n]);class po{static get workerPort(){return g(this,I1)}static set workerPort(e){if(!(typeof Worker<"u"&&e instanceof Worker)&&e!==null)throw new Error("Invalid `workerPort` type.");A(this,I1,e)}static get workerSrc(){return g(this,x1)}static set workerSrc(e){if(typeof e!="string")throw new Error("Invalid `workerSrc` type.");A(this,x1,e)}}I1=new WeakMap,x1=new WeakMap,E(po,I1,null),E(po,x1,"");const _E=1,RE=2,$E=1,qb=2,VE=3,FE=4,jE=5,zE=6,ym=7,Kb=8;function tr(n){switch(n instanceof Error||typeof n=="object"&&n!==null||Mt('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),n.name){case"AbortException":return new Ka(n.message);case"MissingPDFException":return new qa(n.message);case"PasswordException":return new Tb(n.message,n.code);case"UnexpectedResponseException":return new cm(n.message,n.status);case"UnknownErrorException":return new Ib(n.message,n.details);default:return new Ib(n.message,n.toString())}}class b2{constructor(e,t,r){E(this,G3);E(this,Y3);E(this,ld);this.sourceName=e,this.targetName=t,this.comObj=r,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=i=>{const o=i.data;if(o.targetName!==this.sourceName)return;if(o.stream){I(this,Y3,DN).call(this,o);return}if(o.callback){const l=o.callbackId,c=this.callbackCapabilities[l];if(!c)throw new Error(`Cannot resolve callback ${l}`);if(delete this.callbackCapabilities[l],o.callback===_E)c.resolve(o.data);else{if(o.callback!==RE)throw new Error("Unexpected callback case");c.reject(tr(o.reason))}return}const s=this.actionHandler[o.action];if(!s)throw new Error(`Unknown action from worker: ${o.action}`);if(o.callbackId){const l=this.sourceName,c=o.sourceName;new Promise(function(d){d(s(o.data))}).then(function(d){r.postMessage({sourceName:l,targetName:c,callback:_E,callbackId:o.callbackId,data:d})},function(d){r.postMessage({sourceName:l,targetName:c,callback:RE,callbackId:o.callbackId,reason:tr(d)})})}else o.streamId?I(this,G3,ON).call(this,o):s(o.data)},r.addEventListener("message",this._onComObjOnMessage)}on(e,t){const r=this.actionHandler;if(r[e])throw new Error(`There is already an actionName called "${e}"`);r[e]=t}send(e,t,r){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},r)}sendWithPromise(e,t,r){const i=this.callbackId++,o=Promise.withResolvers();this.callbackCapabilities[i]=o;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:i,data:t},r)}catch(s){o.reject(s)}return o.promise}sendWithStream(e,t,r,i){const o=this.streamId++,s=this.sourceName,l=this.targetName,c=this.comObj;return new ReadableStream({start:d=>{const u=Promise.withResolvers();return this.streamControllers[o]={controller:d,startCall:u,pullCall:null,cancelCall:null,isClosed:!1},c.postMessage({sourceName:s,targetName:l,action:e,streamId:o,data:t,desiredSize:d.desiredSize},i),u.promise},pull:d=>{const u=Promise.withResolvers();return this.streamControllers[o].pullCall=u,c.postMessage({sourceName:s,targetName:l,stream:zE,streamId:o,desiredSize:d.desiredSize}),u.promise},cancel:d=>{xt(d instanceof Error,"cancel must have a valid reason");const u=Promise.withResolvers();return this.streamControllers[o].cancelCall=u,this.streamControllers[o].isClosed=!0,c.postMessage({sourceName:s,targetName:l,stream:$E,streamId:o,reason:tr(d)}),u.promise}},r)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}G3=new WeakSet,ON=function(e){const t=e.streamId,r=this.sourceName,i=e.sourceName,o=this.comObj,s=this,l=this.actionHandler[e.action],c={enqueue(d,u=1,f){if(this.isCancelled)return;const h=this.desiredSize;this.desiredSize-=u,h>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),o.postMessage({sourceName:r,targetName:i,stream:FE,streamId:t,chunk:d},f)},close(){this.isCancelled||(this.isCancelled=!0,o.postMessage({sourceName:r,targetName:i,stream:VE,streamId:t}),delete s.streamSinks[t])},error(d){xt(d instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,o.postMessage({sourceName:r,targetName:i,stream:jE,streamId:t,reason:tr(d)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};c.sinkCapability.resolve(),c.ready=c.sinkCapability.promise,this.streamSinks[t]=c,new Promise(function(d){d(l(e.data,c))}).then(function(){o.postMessage({sourceName:r,targetName:i,stream:Kb,streamId:t,success:!0})},function(d){o.postMessage({sourceName:r,targetName:i,stream:Kb,streamId:t,reason:tr(d)})})},Y3=new WeakSet,DN=function(e){const t=e.streamId,r=this.sourceName,i=e.sourceName,o=this.comObj,s=this.streamControllers[t],l=this.streamSinks[t];switch(e.stream){case Kb:e.success?s.startCall.resolve():s.startCall.reject(tr(e.reason));break;case ym:e.success?s.pullCall.resolve():s.pullCall.reject(tr(e.reason));break;case zE:if(!l){o.postMessage({sourceName:r,targetName:i,stream:ym,streamId:t,success:!0});break}l.desiredSize<=0&&e.desiredSize>0&&l.sinkCapability.resolve(),l.desiredSize=e.desiredSize,new Promise(function(c){var d;c((d=l.onPull)==null?void 0:d.call(l))}).then(function(){o.postMessage({sourceName:r,targetName:i,stream:ym,streamId:t,success:!0})},function(c){o.postMessage({sourceName:r,targetName:i,stream:ym,streamId:t,reason:tr(c)})});break;case FE:if(xt(s,"enqueue should have stream controller"),s.isClosed)break;s.controller.enqueue(e.chunk);break;case VE:if(xt(s,"close should have stream controller"),s.isClosed)break;s.isClosed=!0,s.controller.close(),I(this,ld,l5).call(this,s,t);break;case jE:xt(s,"error should have stream controller"),s.controller.error(tr(e.reason)),I(this,ld,l5).call(this,s,t);break;case qb:e.success?s.cancelCall.resolve():s.cancelCall.reject(tr(e.reason)),I(this,ld,l5).call(this,s,t);break;case $E:if(!l)break;new Promise(function(c){var d;c((d=l.onCancel)==null?void 0:d.call(l,tr(e.reason)))}).then(function(){o.postMessage({sourceName:r,targetName:i,stream:qb,streamId:t,success:!0})},function(c){o.postMessage({sourceName:r,targetName:i,stream:qb,streamId:t,reason:tr(c)})}),l.sinkCapability.reject(tr(e.reason)),l.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}},ld=new WeakSet,l5=async function(e,t){var r,i,o;await Promise.allSettled([(r=e.startCall)==null?void 0:r.promise,(i=e.pullCall)==null?void 0:i.promise,(o=e.cancelCall)==null?void 0:o.promise]),delete this.streamControllers[t]};class CZ{constructor({parsedData:e,rawData:t}){E(this,Hl,void 0);E(this,O1,void 0);A(this,Hl,e),A(this,O1,t)}getRaw(){return g(this,O1)}get(e){return g(this,Hl).get(e)??null}getAll(){return xb(g(this,Hl))}has(e){return g(this,Hl).has(e)}}Hl=new WeakMap,O1=new WeakMap;const bs=Symbol("INTERNAL");class kZ{constructor(e,{name:t,intent:r,usage:i}){E(this,D1,!1);E(this,N1,!1);E(this,P1,!1);E(this,cd,!0);A(this,D1,!!(e&Eb)),A(this,N1,!!(e&rm)),this.name=t,this.intent=r,this.usage=i}get visible(){if(g(this,P1))return g(this,cd);if(!g(this,cd))return!1;const{print:e,view:t}=this.usage;return g(this,D1)?(t==null?void 0:t.viewState)!=="OFF":!g(this,N1)||(e==null?void 0:e.printState)!=="OFF"}_setVisible(e,t,r=!1){e!==bs&&Mt("Internal method `_setVisible` called."),A(this,P1,r),A(this,cd,t)}}D1=new WeakMap,N1=new WeakMap,P1=new WeakMap,cd=new WeakMap;class SZ{constructor(e,t=Eb){E(this,L1);E(this,ia,null);E(this,Ye,new Map);E(this,dd,null);E(this,ud,null);if(this.renderingIntent=t,this.name=null,this.creator=null,e!==null){this.name=e.name,this.creator=e.creator,A(this,ud,e.order);for(const r of e.groups)g(this,Ye).set(r.id,new kZ(t,r));if(e.baseState==="OFF")for(const r of g(this,Ye).values())r._setVisible(bs,!1);for(const r of e.on)g(this,Ye).get(r)._setVisible(bs,!0);for(const r of e.off)g(this,Ye).get(r)._setVisible(bs,!1);A(this,dd,this.getHash())}}isVisible(e){if(g(this,Ye).size===0)return!0;if(!e)return lm("Optional content group not defined."),!0;if(e.type==="OCG")return g(this,Ye).has(e.id)?g(this,Ye).get(e.id).visible:(Ee(`Optional content group not found: ${e.id}`),!0);if(e.type==="OCMD"){if(e.expression)return I(this,L1,Nv).call(this,e.expression);if(!e.policy||e.policy==="AnyOn"){for(const t of e.ids){if(!g(this,Ye).has(t))return Ee(`Optional content group not found: ${t}`),!0;if(g(this,Ye).get(t).visible)return!0}return!1}if(e.policy==="AllOn"){for(const t of e.ids){if(!g(this,Ye).has(t))return Ee(`Optional content group not found: ${t}`),!0;if(!g(this,Ye).get(t).visible)return!1}return!0}if(e.policy==="AnyOff"){for(const t of e.ids){if(!g(this,Ye).has(t))return Ee(`Optional content group not found: ${t}`),!0;if(!g(this,Ye).get(t).visible)return!0}return!1}if(e.policy==="AllOff"){for(const t of e.ids){if(!g(this,Ye).has(t))return Ee(`Optional content group not found: ${t}`),!0;if(g(this,Ye).get(t).visible)return!1}return!0}return Ee(`Unknown optional content policy ${e.policy}.`),!0}return Ee(`Unknown group type ${e.type}.`),!0}setVisibility(e,t=!0){const r=g(this,Ye).get(e);r?(r._setVisible(bs,!!t,!0),A(this,ia,null)):Ee(`Optional content group not found: ${e}`)}setOCGState({state:e,preserveRB:t}){let r;for(const i of e){switch(i){case"ON":case"OFF":case"Toggle":r=i;continue}const o=g(this,Ye).get(i);if(o)switch(r){case"ON":o._setVisible(bs,!0);break;case"OFF":o._setVisible(bs,!1);break;case"Toggle":o._setVisible(bs,!o.visible)}}A(this,ia,null)}get hasInitialVisibility(){return g(this,dd)===null||this.getHash()===g(this,dd)}getOrder(){return g(this,Ye).size?g(this,ud)?g(this,ud).slice():[...g(this,Ye).keys()]:null}getGroups(){return g(this,Ye).size>0?xb(g(this,Ye)):null}getGroup(e){return g(this,Ye).get(e)||null}getHash(){if(g(this,ia)!==null)return g(this,ia);const e=new IE;for(const[t,r]of g(this,Ye))e.update(`${t}:${r.visible}`);return A(this,ia,e.hexdigest())}}ia=new WeakMap,Ye=new WeakMap,dd=new WeakMap,ud=new WeakMap,L1=new WeakSet,Nv=function(e){const t=e.length;if(t<2)return!0;const r=e[0];for(let i=1;i<t;i++){const o=e[i];let s;if(Array.isArray(o))s=I(this,L1,Nv).call(this,o);else{if(!g(this,Ye).has(o))return Ee(`Optional content group not found: ${o}`),!0;s=g(this,Ye).get(o).visible}switch(r){case"And":if(!s)return!1;break;case"Or":if(s)return!0;break;case"Not":return!s;default:return!0}}return r==="And"};class EZ{constructor(e,{disableRange:t=!1,disableStream:r=!1}){xt(e,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');const{length:i,initialData:o,progressiveDone:s,contentDispositionFilename:l}=e;if(this._queuedChunks=[],this._progressiveDone=s,this._contentDispositionFilename=l,(o==null?void 0:o.length)>0){const c=o instanceof Uint8Array&&o.byteLength===o.buffer.byteLength?o.buffer:new Uint8Array(o).buffer;this._queuedChunks.push(c)}this._pdfDataRangeTransport=e,this._isStreamingSupported=!r,this._isRangeSupported=!t,this._contentLength=i,this._fullRequestReader=null,this._rangeReaders=[],e.addRangeListener((c,d)=>{this._onReceiveData({begin:c,chunk:d})}),e.addProgressListener((c,d)=>{this._onProgress({loaded:c,total:d})}),e.addProgressiveReadListener(c=>{this._onReceiveData({chunk:c})}),e.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),e.transportReady()}_onReceiveData({begin:e,chunk:t}){const r=t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength?t.buffer:new Uint8Array(t).buffer;e===void 0?this._fullRequestReader?this._fullRequestReader._enqueue(r):this._queuedChunks.push(r):xt(this._rangeReaders.some(function(i){return i._begin!==e?!1:(i._enqueue(r),!0)}),"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}get _progressiveDataLength(){var e;return((e=this._fullRequestReader)==null?void 0:e._loaded)??0}_onProgress(e){var t,r,i,o;e.total===void 0?(r=(t=this._rangeReaders[0])==null?void 0:t.onProgress)==null||r.call(t,{loaded:e.loaded}):(o=(i=this._fullRequestReader)==null?void 0:i.onProgress)==null||o.call(i,{loaded:e.loaded,total:e.total})}_onProgressiveDone(){var e;(e=this._fullRequestReader)==null||e.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){const t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}getFullReader(){xt(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const e=this._queuedChunks;return this._queuedChunks=null,new MZ(this,e,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const r=new AZ(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(r),r}cancelAllRequests(e){var t;(t=this._fullRequestReader)==null||t.cancel(e);for(const r of this._rangeReaders.slice(0))r.cancel(e);this._pdfDataRangeTransport.abort()}}class MZ{constructor(e,t,r=!1,i=null){this._stream=e,this._done=r||!1,this._filename=Lb(i)?i:null,this._queuedChunks=t||[],this._loaded=0;for(const o of this._queuedChunks)this._loaded+=o.byteLength;this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class AZ{constructor(e,t,r){this._stream=e,this._begin=t,this._end=r,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){if(!this._done){if(this._requests.length===0)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const t=this._queuedChunk;return this._queuedChunk=null,{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function Gb({getResponseHeader:n,isHttp:e,rangeChunkSize:t,disableRange:r}){const i={allowRangeRequests:!1,suggestedLength:void 0},o=parseInt(n("Content-Length"),10);return!Number.isInteger(o)||(i.suggestedLength=o,o<=2*t)||r||!e||n("Accept-Ranges")!=="bytes"||(n("Content-Encoding")||"identity")!=="identity"||(i.allowRangeRequests=!0),i}function Yb(n){const e=n("Content-Disposition");if(e){let t=function(i){let o=!0,s=l("filename\\*","i").exec(i);if(s){s=s[1];let p=u(s);return p=unescape(p),p=f(p),p=h(p),d(p)}if(s=function(m){const y=[];let b;const w=l("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(b=w.exec(m))!==null;){let[,k,C,T]=b;if(k=parseInt(k,10),k in y){if(k===0)break}else y[k]=[C,T]}const v=[];for(let k=0;k<y.length&&k in y;++k){let[C,T]=y[k];T=u(T),C&&(T=unescape(T),k===0&&(T=f(T))),v.push(T)}return v.join("")}(i),s)return d(h(s));if(s=l("filename","i").exec(i),s){s=s[1];let p=u(s);return p=h(p),d(p)}function l(p,m){return new RegExp("(?:^|;)\\s*"+p+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',m)}function c(p,m){if(p){if(!/^[\x00-\xFF]+$/.test(m))return m;try{const y=new TextDecoder(p,{fatal:!0}),b=dm(m);m=y.decode(b),o=!1}catch{}}return m}function d(p){return o&&/[\x80-\xff]/.test(p)&&(p=c("utf-8",p),o&&(p=c("iso-8859-1",p))),p}function u(p){if(p.startsWith('"')){const m=p.slice(1).split('\\"');for(let y=0;y<m.length;++y){const b=m[y].indexOf('"');b!==-1&&(m[y]=m[y].slice(0,b),m.length=y+1),m[y]=m[y].replaceAll(/\\(.)/g,"$1")}p=m.join('"')}return p}function f(p){const m=p.indexOf("'");return m===-1?p:c(p.slice(0,m),p.slice(m+1).replace(/^[^']*'/,""))}function h(p){return!p.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(p)?p:p.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(m,y,b,w){if(b==="q"||b==="Q")return c(y,w=(w=w.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,function(v,k){return String.fromCharCode(parseInt(k,16))}));try{w=atob(w)}catch{}return c(y,w)})}return""}(e);if(t.includes("%"))try{t=decodeURIComponent(t)}catch{}if(Lb(t))return t}return null}function bm(n,e){return n===404||n===0&&e.startsWith("file:")?new qa('Missing PDF "'+e+'".'):new cm(`Unexpected server response (${n}) while retrieving PDF "${e}".`,n)}function HE(n){return n===200||n===206}function UE(n,e,t){return{method:"GET",headers:n,signal:t.signal,mode:"cors",credentials:e?"include":"same-origin",redirect:"follow"}}function ZE(n){const e=new Headers;for(const t in n){const r=n[t];r!==void 0&&e.append(t,r)}return e}function WE(n){return n instanceof Uint8Array?n.buffer:n instanceof ArrayBuffer?n:(Ee(`getArrayBuffer - unexpected data format: ${n}`),new Uint8Array(n).buffer)}class qE{constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e;return((e=this._fullRequestReader)==null?void 0:e._loaded)??0}getFullReader(){return xt(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new TZ(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const r=new IZ(this,e,t);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){var t;(t=this._fullRequestReader)==null||t.cancel(e);for(const r of this._rangeRequestReaders.slice(0))r.cancel(e)}}class TZ{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null;const t=e.source;this._withCredentials=t.withCredentials||!1,this._contentLength=t.length,this._headersCapability=Promise.withResolvers(),this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._headers=ZE(this._stream.httpHeaders);const r=t.url;fetch(r,UE(this._headers,this._withCredentials,this._abortController)).then(i=>{if(!HE(i.status))throw bm(i.status,r);this._reader=i.body.getReader(),this._headersCapability.resolve();const o=c=>i.headers.get(c),{allowRangeRequests:s,suggestedLength:l}=Gb({getResponseHeader:o,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=s,this._contentLength=l||this._contentLength,this._filename=Yb(o),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new Ka("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var r;await this._headersCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,(r=this.onProgress)==null||r.call(this,{loaded:this._loaded,total:this._contentLength}),{value:WE(e),done:!1})}cancel(e){var t;(t=this._reader)==null||t.cancel(e),this._abortController.abort()}}class IZ{constructor(e,t,r){this._stream=e,this._reader=null,this._loaded=0;const i=e.source;this._withCredentials=i.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!i.disableStream,this._abortController=new AbortController,this._headers=ZE(this._stream.httpHeaders),this._headers.append("Range",`bytes=${t}-${r-1}`);const o=i.url;fetch(o,UE(this._headers,this._withCredentials,this._abortController)).then(s=>{if(!HE(s.status))throw bm(s.status,o);this._readCapability.resolve(),this._reader=s.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var r;await this._readCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,(r=this.onProgress)==null||r.call(this,{loaded:this._loaded}),{value:WE(e),done:!1})}cancel(e){var t;(t=this._reader)==null||t.cancel(e),this._abortController.abort()}}class xZ{constructor(e,t={}){this.url=e,this.isHttp=/^https?:/i.test(e),this.httpHeaders=this.isHttp&&t.httpHeaders||Object.create(null),this.withCredentials=t.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e,t,r){const i={begin:e,end:t};for(const o in r)i[o]=r[o];return this.request(i)}requestFull(e){return this.request(e)}request(e){const t=new XMLHttpRequest,r=this.currXhrId++,i=this.pendingRequests[r]={xhr:t};t.open("GET",this.url),t.withCredentials=this.withCredentials;for(const o in this.httpHeaders){const s=this.httpHeaders[o];s!==void 0&&t.setRequestHeader(o,s)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`),i.expectedStatus=206):i.expectedStatus=200,t.responseType="arraybuffer",e.onError&&(t.onerror=function(o){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,r),t.onprogress=this.onProgress.bind(this,r),i.onHeadersReceived=e.onHeadersReceived,i.onDone=e.onDone,i.onError=e.onError,i.onProgress=e.onProgress,t.send(null),r}onProgress(e,t){var i;const r=this.pendingRequests[e];r&&((i=r.onProgress)==null||i.call(r,t))}onStateChange(e,t){var l,c,d;const r=this.pendingRequests[e];if(!r)return;const i=r.xhr;if(i.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),i.readyState!==4||!(e in this.pendingRequests))return;if(delete this.pendingRequests[e],i.status===0&&this.isHttp){(l=r.onError)==null||l.call(r,i.status);return}const o=i.status||200;if(!(o===200&&r.expectedStatus===206)&&o!==r.expectedStatus){(c=r.onError)==null||c.call(r,i.status);return}const s=function(f){const h=f.response;return typeof h!="string"?h:dm(h).buffer}(i);if(o===206){const u=i.getResponseHeader("Content-Range"),f=/bytes (\d+)-(\d+)\/(\d+)/.exec(u);r.onDone({begin:parseInt(f[1],10),chunk:s})}else s?r.onDone({begin:0,chunk:s}):(d=r.onError)==null||d.call(r,i.status)}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortRequest(e){const t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}class OZ{constructor(e){this._source=e,this._manager=new xZ(e.url,{httpHeaders:e.httpHeaders,withCredentials:e.withCredentials}),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){const t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}getFullReader(){return xt(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new DZ(this._manager,this._source),this._fullRequestReader}getRangeReader(e,t){const r=new NZ(this._manager,e,t);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}cancelAllRequests(e){var t;(t=this._fullRequestReader)==null||t.cancel(e);for(const r of this._rangeRequestReaders.slice(0))r.cancel(e)}}class DZ{constructor(e,t){this._manager=e;const r={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._fullRequestId=e.requestFull(r),this._headersReceivedCapability=Promise.withResolvers(),this._disableRange=t.disableRange||!1,this._contentLength=t.length,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const e=this._fullRequestId,t=this._manager.getRequestXhr(e),r=s=>t.getResponseHeader(s),{allowRangeRequests:i,suggestedLength:o}=Gb({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});i&&(this._isRangeSupported=!0),this._contentLength=o||this._contentLength,this._filename=Yb(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}_onDone(e){if(e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(e){this._storedError=bm(e,this._url),this._headersReceivedCapability.reject(this._storedError);for(const t of this._requests)t.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(e){var t;(t=this.onProgress)==null||t.call(this,{loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersReceivedCapability.reject(e);for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class NZ{constructor(e,t,r){this._manager=e;const i={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._requestId=e.requestRange(t,r,i),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var e;(e=this.onClosed)==null||e.call(this,this)}_onDone(e){const t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0;for(const r of this._requests)r.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(e){this._storedError=bm(e,this._url);for(const t of this._requests)t.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(e){var t;this.isStreamingSupported||((t=this.onProgress)==null||t.call(this,{loaded:e.loaded}))}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const t=this._queuedChunk;return this._queuedChunk=null,{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const PZ=/^[a-z][a-z0-9\-+.]+:/i;function KE(n,e,t){return n.protocol==="http:"?ys.get("http").request(n,{headers:e},t):ys.get("https").request(n,{headers:e},t)}class LZ{constructor(e){this.source=e,this.url=function(r){if(PZ.test(r))return new URL(r);const i=ys.get("url");return new URL(i.pathToFileURL(r))}(e.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e;return((e=this._fullRequestReader)==null?void 0:e._loaded)??0}getFullReader(){return xt(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new RZ(this):new BZ(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const r=this.isFsUrl?new $Z(this,e,t):new _Z(this,e,t);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){var t;(t=this._fullRequestReader)==null||t.cancel(e);for(const r of this._rangeRequestReaders.slice(0))r.cancel(e)}}class GE{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;const t=e.source;this._contentLength=t.length,this._loaded=0,this._filename=null,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var t;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();return e===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=e.length,(t=this.onProgress)==null||t.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",t=>{this._error(t)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new Ka("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class YE{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const t=e.source;this._isStreamingSupported=!t.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){var t;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();return e===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=e.length,(t=this.onProgress)==null||t.call(this,{loaded:this._loaded}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",t=>{this._error(t)}),this._storedError&&this._readableStream.destroy(this._storedError)}}class BZ extends GE{constructor(e){super(e),this._request=KE(this._url,e.httpHeaders,t=>{if(t.statusCode===404){const s=new qa(`Missing PDF "${this._url}".`);this._storedError=s,this._headersCapability.reject(s);return}this._headersCapability.resolve(),this._setReadableStream(t);const r=s=>this._readableStream.headers[s.toLowerCase()],{allowRangeRequests:i,suggestedLength:o}=Gb({getResponseHeader:r,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=i,this._contentLength=o||this._contentLength,this._filename=Yb(r)}),this._request.on("error",t=>{this._storedError=t,this._headersCapability.reject(t)}),this._request.end()}}class _Z extends YE{constructor(e,t,r){super(e),this._httpHeaders={};for(const i in e.httpHeaders){const o=e.httpHeaders[i];o!==void 0&&(this._httpHeaders[i]=o)}this._httpHeaders.Range=`bytes=${t}-${r-1}`,this._request=KE(this._url,this._httpHeaders,i=>{if(i.statusCode!==404)this._setReadableStream(i);else{const o=new qa(`Missing PDF "${this._url}".`);this._storedError=o}}),this._request.on("error",i=>{this._storedError=i}),this._request.end()}}class RZ extends GE{constructor(e){super(e);const t=ys.get("fs");t.promises.lstat(this._url).then(r=>{this._contentLength=r.size,this._setReadableStream(t.createReadStream(this._url)),this._headersCapability.resolve()},r=>{r.code==="ENOENT"&&(r=new qa(`Missing PDF "${this._url}".`)),this._storedError=r,this._headersCapability.reject(r)})}}class $Z extends YE{constructor(e,t,r){super(e);const i=ys.get("fs");this._setReadableStream(i.createReadStream(this._url,{start:t,end:r-1}))}}const nr=30,Kt=class Kt{constructor({textContentSource:e,container:t,viewport:r}){E(this,Q3);E(this,X3);E(this,z1);E(this,oa,Promise.withResolvers());E(this,Qn,null);E(this,B1,!1);E(this,_1,!!((nN=globalThis.FontInspector)!=null&&nN.enabled));E(this,Ul,null);E(this,Po,null);E(this,R1,0);E(this,$1,0);E(this,Zl,null);E(this,fd,null);E(this,hd,0);E(this,sa,0);E(this,pd,Object.create(null));E(this,V1,[]);E(this,md,null);E(this,Wl,[]);E(this,F1,new WeakMap);E(this,j1,null);var c;if(e instanceof ReadableStream)A(this,md,e);else{if(typeof e!="object")throw new Error('No "textContentSource" parameter specified.');A(this,md,new ReadableStream({start(d){d.enqueue(e),d.close()}}))}A(this,Qn,A(this,fd,t)),A(this,sa,r.scale*(globalThis.devicePixelRatio||1)),A(this,hd,r.rotation),A(this,Po,{prevFontSize:null,prevFontFamily:null,div:null,properties:null,ctx:null});const{pageWidth:i,pageHeight:o,pageX:s,pageY:l}=r.rawDims;A(this,j1,[1,0,0,-1,-s,l+o]),A(this,$1,i),A(this,R1,o),I(c=Kt,J3,LN).call(c),Ga(t,r),g(this,oa).promise.catch(()=>{}).then(()=>{g(Kt,gd).delete(this),A(this,Po,null),A(this,pd,null)})}render(){const e=()=>{g(this,Zl).read().then(({value:t,done:r})=>{r?g(this,oa).resolve():(g(this,Ul)??A(this,Ul,t.lang),Object.assign(g(this,pd),t.styles),I(this,Q3,NN).call(this,t.items),e())},g(this,oa).reject)};return A(this,Zl,g(this,md).getReader()),g(Kt,gd).add(this),e(),g(this,oa).promise}update({viewport:e,onBefore:t=null}){var o;const r=e.scale*(globalThis.devicePixelRatio||1),i=e.rotation;if(i!==g(this,hd)&&(t==null||t(),A(this,hd,i),Ga(g(this,fd),{rotation:i})),r!==g(this,sa)){t==null||t(),A(this,sa,r);const s={prevFontSize:null,prevFontFamily:null,div:null,properties:null,ctx:I(o=Kt,yd,c5).call(o,g(this,Ul))};for(const l of g(this,Wl))s.properties=g(this,F1).get(l),s.div=l,I(this,z1,Pv).call(this,s)}}cancel(){var t;const e=new Ka("TextLayer task cancelled.");(t=g(this,Zl))==null||t.cancel(e).catch(()=>{}),A(this,Zl,null),g(this,oa).reject(e)}get textDivs(){return g(this,Wl)}get textContentItemsStr(){return g(this,V1)}static cleanup(){if(!(g(this,gd).size>0)){g(this,ql).clear();for(const{canvas:e}of g(this,Kl).values())e.remove();g(this,Kl).clear()}}};oa=new WeakMap,Qn=new WeakMap,B1=new WeakMap,_1=new WeakMap,Ul=new WeakMap,Po=new WeakMap,R1=new WeakMap,$1=new WeakMap,Zl=new WeakMap,fd=new WeakMap,hd=new WeakMap,sa=new WeakMap,pd=new WeakMap,V1=new WeakMap,md=new WeakMap,Wl=new WeakMap,F1=new WeakMap,j1=new WeakMap,ql=new WeakMap,Kl=new WeakMap,aa=new WeakMap,gd=new WeakMap,Q3=new WeakSet,NN=function(e){var i,o;if(g(this,B1))return;(o=g(this,Po)).ctx??(o.ctx=I(i=Kt,yd,c5).call(i,g(this,Ul)));const t=g(this,Wl),r=g(this,V1);for(const s of e){if(t.length>1e5){Ee("Ignoring additional textDivs for performance reasons."),A(this,B1,!0);return}if(s.str!==void 0)r.push(s.str),I(this,X3,PN).call(this,s);else if(s.type==="beginMarkedContentProps"||s.type==="beginMarkedContent"){const l=g(this,Qn);A(this,Qn,document.createElement("span")),g(this,Qn).classList.add("markedContent"),s.id!==null&&g(this,Qn).setAttribute("id",`${s.id}`),l.append(g(this,Qn))}else s.type==="endMarkedContent"&&A(this,Qn,g(this,Qn).parentNode)}},X3=new WeakSet,PN=function(e){var y;const t=document.createElement("span"),r={angle:0,canvasWidth:0,hasText:e.str!=="",hasEOL:e.hasEOL,fontSize:0};g(this,Wl).push(t);const i=ue.transform(g(this,j1),e.transform);let o=Math.atan2(i[1],i[0]);const s=g(this,pd)[e.fontName];s.vertical&&(o+=Math.PI/2);const l=g(this,_1)&&s.fontSubstitution||s.fontFamily,c=Math.hypot(i[2],i[3]),d=c*I(y=Kt,ey,BN).call(y,l,g(this,Ul));let u,f;o===0?(u=i[4],f=i[5]-d):(u=i[4]+d*Math.sin(o),f=i[5]-d*Math.cos(o));const h="calc(var(--scale-factor)*",p=t.style;g(this,Qn)===g(this,fd)?(p.left=`${(100*u/g(this,$1)).toFixed(2)}%`,p.top=`${(100*f/g(this,R1)).toFixed(2)}%`):(p.left=`${h}${u.toFixed(2)}px)`,p.top=`${h}${f.toFixed(2)}px)`),p.fontSize=`${h}${(g(Kt,aa)*c).toFixed(2)}px)`,p.fontFamily=l,r.fontSize=c,t.setAttribute("role","presentation"),t.textContent=e.str,t.dir=e.dir,g(this,_1)&&(t.dataset.fontName=s.fontSubstitutionLoadedName||e.fontName),o!==0&&(r.angle=o*(180/Math.PI));let m=!1;if(e.str.length>1)m=!0;else if(e.str!==" "&&e.transform[0]!==e.transform[3]){const b=Math.abs(e.transform[0]),w=Math.abs(e.transform[3]);b!==w&&Math.max(b,w)/Math.min(b,w)>1.5&&(m=!0)}if(m&&(r.canvasWidth=s.vertical?e.height:e.width),g(this,F1).set(t,r),g(this,Po).div=t,g(this,Po).properties=r,I(this,z1,Pv).call(this,g(this,Po)),r.hasText&&g(this,Qn).append(t),r.hasEOL){const b=document.createElement("br");b.setAttribute("role","presentation"),g(this,Qn).append(b)}},z1=new WeakSet,Pv=function(e){const{div:t,properties:r,ctx:i,prevFontSize:o,prevFontFamily:s}=e,{style:l}=t;let c="";if(g(Kt,aa)>1&&(c=`scale(${1/g(Kt,aa)})`),r.canvasWidth!==0&&r.hasText){const{fontFamily:d}=l,{canvasWidth:u,fontSize:f}=r;(o!==f||s!==d)&&(i.font=`${f*g(this,sa)}px ${d}`,e.prevFontSize=f,e.prevFontFamily=d);const{width:h}=i.measureText(t.textContent);h>0&&(c=`scaleX(${u*g(this,sa)/h}) ${c}`)}r.angle!==0&&(c=`rotate(${r.angle}deg) ${c}`),c.length>0&&(l.transform=c)},yd=new WeakSet,c5=function(e=null){let t=g(this,Kl).get(e||(e=""));if(!t){const r=document.createElement("canvas");r.className="hiddenCanvasElement",r.lang=e,document.body.append(r),t=r.getContext("2d",{alpha:!1,willReadFrequently:!0}),g(this,Kl).set(e,t)}return t},J3=new WeakSet,LN=function(){if(g(this,aa)!==null)return;const e=document.createElement("div");e.style.opacity=0,e.style.lineHeight=1,e.style.fontSize="1px",e.style.position="absolute",e.textContent="X",document.body.append(e),A(this,aa,e.getBoundingClientRect().height),e.remove()},ey=new WeakSet,BN=function(e,t){const r=g(this,ql).get(e);if(r)return r;const i=I(this,yd,c5).call(this,t),o=i.font;i.canvas.width=i.canvas.height=nr,i.font=`30px ${e}`;const s=i.measureText("");let l=s.fontBoundingBoxAscent,c=Math.abs(s.fontBoundingBoxDescent);if(l){const f=l/(l+c);return g(this,ql).set(e,f),i.canvas.width=i.canvas.height=0,i.font=o,f}i.strokeStyle="red",i.clearRect(0,0,nr,nr),i.strokeText("g",0,0);let d=i.getImageData(0,0,nr,nr).data;c=0;for(let f=d.length-1-3;f>=0;f-=4)if(d[f]>0){c=Math.ceil(f/4/nr);break}i.clearRect(0,0,nr,nr),i.strokeText("A",0,nr),d=i.getImageData(0,0,nr,nr).data,l=0;for(let f=0,h=d.length;f<h;f+=4)if(d[f]>0){l=nr-Math.floor(f/4/nr);break}i.canvas.width=i.canvas.height=0,i.font=o;const u=l?l/(l+c):.8;return g(this,ql).set(e,u),u},E(Kt,yd),E(Kt,J3),E(Kt,ey),E(Kt,ql,new Map),E(Kt,Kl,new Map),E(Kt,aa,null),E(Kt,gd,new Set);let w2=Kt;class v2{static textContent(e){const t=[],r={items:t,styles:Object.create(null)};return function i(o){var c;if(!o)return;let s=null;const l=o.name;if(l==="#text")s=o.value;else{if(!v2.shouldBuildText(l))return;(c=o==null?void 0:o.attributes)!=null&&c.textContent?s=o.attributes.textContent:o.value&&(s=o.value)}if(s!==null&&t.push({str:s}),o.children)for(const d of o.children)i(d)}(e),r}static shouldBuildText(e){return!(e==="textarea"||e==="input"||e==="option"||e==="select")}}const VZ=65536,FZ=mn?class extends wE{_createCanvas(e,t){return ys.get("canvas").createCanvas(e,t)}}:class extends wE{constructor({ownerDocument:e=globalThis.document,enableHWA:t=!1}={}){super({enableHWA:t}),this._document=e}_createCanvas(e,t){const r=this._document.createElement("canvas");return r.width=e,r.height=t,r}},jZ=mn?class extends vE{_fetchData(e,t){return OE(e).then(r=>({cMapData:r,compressionType:t}))}}:kE,zZ=mn?class extends bE{}:(rN=class extends bE{constructor({docId:t,ownerDocument:r=globalThis.document}={}){super();E(this,Gt);E(this,la);E(this,ca);E(this,bd);E(this,da);E(this,ny);E(this,H1);E(this,ua);E(this,Xl);E(this,Jl);E(this,U1);E(this,e0);E(this,Gl,void 0);E(this,Yl,void 0);E(this,Zi,void 0);E(this,Lo,void 0);E(this,wn,void 0);E(this,ty,void 0);E(this,Ql,0);A(this,Lo,t),A(this,wn,r)}addFilter(t){if(!t)return"none";let r=g(this,Gt,Cn).get(t);if(r)return r;const[i,o,s]=I(this,bd,d5).call(this,t),l=t.length===1?i:`${i}${o}${s}`;if(r=g(this,Gt,Cn).get(l),r)return g(this,Gt,Cn).set(t,r),r;const c=`g_${g(this,Lo)}_transfer_map_${Xn(this,Ql)._++}`,d=I(this,da,mu).call(this,c);g(this,Gt,Cn).set(t,d),g(this,Gt,Cn).set(l,d);const u=I(this,ua,gu).call(this,c);return I(this,Jl,tp).call(this,i,o,s,u),d}addHCMFilter(t,r){var m;const i=`${t}-${r}`,o="base";let s=g(this,la,hu).get(o);if((s==null?void 0:s.key)===i||(s?((m=s.filter)==null||m.remove(),s.key=i,s.url="none",s.filter=null):(s={key:i,url:"none",filter:null},g(this,la,hu).set(o,s)),!t||!r))return s.url;const l=I(this,e0,np).call(this,t);t=ue.makeHexColor(...l);const c=I(this,e0,np).call(this,r);if(r=ue.makeHexColor(...c),g(this,ca,pu).style.color="",t==="#000000"&&r==="#ffffff"||t===r)return s.url;const d=new Array(256);for(let y=0;y<=255;y++){const b=y/255;d[y]=b<=.03928?b/12.92:((b+.055)/1.055)**2.4}const u=d.join(","),f=`g_${g(this,Lo)}_hcm_filter`,h=s.filter=I(this,ua,gu).call(this,f);I(this,Jl,tp).call(this,u,u,u,h),I(this,H1,Lv).call(this,h);const p=(y,b)=>{const w=l[y]/255,v=c[y]/255,k=new Array(b+1);for(let C=0;C<=b;C++)k[C]=w+C/b*(v-w);return k.join(",")};return I(this,Jl,tp).call(this,p(0,5),p(1,5),p(2,5),h),s.url=I(this,da,mu).call(this,f),s.url}addAlphaFilter(t){let r=g(this,Gt,Cn).get(t);if(r)return r;const[i]=I(this,bd,d5).call(this,[t]),o=`alpha_${i}`;if(r=g(this,Gt,Cn).get(o),r)return g(this,Gt,Cn).set(t,r),r;const s=`g_${g(this,Lo)}_alpha_map_${Xn(this,Ql)._++}`,l=I(this,da,mu).call(this,s);g(this,Gt,Cn).set(t,l),g(this,Gt,Cn).set(o,l);const c=I(this,ua,gu).call(this,s);return I(this,U1,Bv).call(this,i,c),l}addLuminosityFilter(t){let r,i,o=g(this,Gt,Cn).get(t||"luminosity");if(o)return o;if(t?([r]=I(this,bd,d5).call(this,[t]),i=`luminosity_${r}`):i="luminosity",o=g(this,Gt,Cn).get(i),o)return g(this,Gt,Cn).set(t,o),o;const s=`g_${g(this,Lo)}_luminosity_map_${Xn(this,Ql)._++}`,l=I(this,da,mu).call(this,s);g(this,Gt,Cn).set(t,l),g(this,Gt,Cn).set(i,l);const c=I(this,ua,gu).call(this,s);return I(this,ny,_N).call(this,c),t&&I(this,U1,Bv).call(this,r,c),l}addHighlightHCMFilter(t,r,i,o,s){var v;const l=`${r}-${i}-${o}-${s}`;let c=g(this,la,hu).get(t);if((c==null?void 0:c.key)===l||(c?((v=c.filter)==null||v.remove(),c.key=l,c.url="none",c.filter=null):(c={key:l,url:"none",filter:null},g(this,la,hu).set(t,c)),!r||!i))return c.url;const[d,u]=[r,i].map(I(this,e0,np).bind(this));let f=Math.round(.2126*d[0]+.7152*d[1]+.0722*d[2]),h=Math.round(.2126*u[0]+.7152*u[1]+.0722*u[2]),[p,m]=[o,s].map(I(this,e0,np).bind(this));h<f&&([f,h,p,m]=[h,f,m,p]),g(this,ca,pu).style.color="";const y=(k,C,T)=>{const S=new Array(256),M=(h-f)/T,x=k/255,O=(C-k)/(255*T);let P=0;for(let N=0;N<=T;N++){const _=Math.round(f+N*M),V=x+N*O;for(let H=P;H<=_;H++)S[H]=V;P=_+1}for(let N=P;N<256;N++)S[N]=S[P-1];return S.join(",")},b=`g_${g(this,Lo)}_hcm_${t}_filter`,w=c.filter=I(this,ua,gu).call(this,b);return I(this,H1,Lv).call(this,w),I(this,Jl,tp).call(this,y(p[0],m[0],5),y(p[1],m[1],5),y(p[2],m[2],5),w),c.url=I(this,da,mu).call(this,b),c.url}destroy(t=!1){(!t||g(this,la,hu).size===0)&&(g(this,Zi)&&(g(this,Zi).parentNode.parentNode.remove(),A(this,Zi,null)),g(this,Yl)&&(g(this,Yl).clear(),A(this,Yl,null)),A(this,Ql,0))}},Gl=new WeakMap,Yl=new WeakMap,Zi=new WeakMap,Lo=new WeakMap,wn=new WeakMap,ty=new WeakMap,Ql=new WeakMap,Gt=new WeakSet,Cn=function(){return g(this,Yl)||A(this,Yl,new Map)},la=new WeakSet,hu=function(){return g(this,ty)||A(this,ty,new Map)},ca=new WeakSet,pu=function(){if(!g(this,Zi)){const t=g(this,wn).createElement("div"),{style:r}=t;r.visibility="hidden",r.contain="strict",r.width=r.height=0,r.position="absolute",r.top=r.left=0,r.zIndex=-1;const i=g(this,wn).createElementNS(fo,"svg");i.setAttribute("width",0),i.setAttribute("height",0),A(this,Zi,g(this,wn).createElementNS(fo,"defs")),t.append(i),i.append(g(this,Zi)),g(this,wn).body.append(t)}return g(this,Zi)},bd=new WeakSet,d5=function(t){if(t.length===1){const d=t[0],u=new Array(256);for(let h=0;h<256;h++)u[h]=d[h]/255;const f=u.join(",");return[f,f,f]}const[r,i,o]=t,s=new Array(256),l=new Array(256),c=new Array(256);for(let d=0;d<256;d++)s[d]=r[d]/255,l[d]=i[d]/255,c[d]=o[d]/255;return[s.join(","),l.join(","),c.join(",")]},da=new WeakSet,mu=function(t){if(g(this,Gl)===void 0){A(this,Gl,"");const r=g(this,wn).URL;r!==g(this,wn).baseURI&&(fm(r)?Ee('#createUrl: ignore "data:"-URL for performance reasons.'):A(this,Gl,r.split("#",1)[0]))}return`url(${g(this,Gl)}#${t})`},ny=new WeakSet,_N=function(t){const r=g(this,wn).createElementNS(fo,"feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),t.append(r)},H1=new WeakSet,Lv=function(t){const r=g(this,wn).createElementNS(fo,"feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),t.append(r)},ua=new WeakSet,gu=function(t){const r=g(this,wn).createElementNS(fo,"filter");return r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("id",t),g(this,ca,pu).append(r),r},Xl=new WeakSet,ep=function(t,r,i){const o=g(this,wn).createElementNS(fo,r);o.setAttribute("type","discrete"),o.setAttribute("tableValues",i),t.append(o)},Jl=new WeakSet,tp=function(t,r,i,o){const s=g(this,wn).createElementNS(fo,"feComponentTransfer");o.append(s),I(this,Xl,ep).call(this,s,"feFuncR",t),I(this,Xl,ep).call(this,s,"feFuncG",r),I(this,Xl,ep).call(this,s,"feFuncB",i)},U1=new WeakSet,Bv=function(t,r){const i=g(this,wn).createElementNS(fo,"feComponentTransfer");r.append(i),I(this,Xl,ep).call(this,i,"feFuncA",t)},e0=new WeakSet,np=function(t){return g(this,ca,pu).style.color=t,Bb(getComputedStyle(g(this,ca,pu)).getPropertyValue("color"))},rN),HZ=mn?class extends CE{_fetchData(e){return OE(e)}}:SE;function UZ(n={}){typeof n=="string"||n instanceof URL?n={url:n}:(n instanceof ArrayBuffer||ArrayBuffer.isView(n))&&(n={data:n});const e=new Qb,{docId:t}=e,r=n.url?function($){if($ instanceof URL)return $.href;try{return new URL($,window.location).href}catch{if(mn&&typeof $=="string")return $}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}(n.url):null,i=n.data?function($){if(mn&&typeof Buffer<"u"&&$ instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if($ instanceof Uint8Array&&$.byteLength===$.buffer.byteLength)return $;if(typeof $=="string")return dm($);if($ instanceof ArrayBuffer||ArrayBuffer.isView($)||typeof $=="object"&&!isNaN($==null?void 0:$.length))return new Uint8Array($);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}(n.data):null,o=n.httpHeaders||null,s=n.withCredentials===!0,l=n.password??null,c=n.range instanceof XE?n.range:null,d=Number.isInteger(n.rangeChunkSize)&&n.rangeChunkSize>0?n.rangeChunkSize:VZ;let u=n.worker instanceof nc?n.worker:null;const f=n.verbosity,h=typeof n.docBaseUrl!="string"||fm(n.docBaseUrl)?null:n.docBaseUrl,p=typeof n.cMapUrl=="string"?n.cMapUrl:null,m=n.cMapPacked!==!1,y=n.CMapReaderFactory||jZ,b=typeof n.standardFontDataUrl=="string"?n.standardFontDataUrl:null,w=n.StandardFontDataFactory||HZ,v=n.stopAtErrors!==!0,k=Number.isInteger(n.maxImageSize)&&n.maxImageSize>-1?n.maxImageSize:-1,C=n.isEvalSupported!==!1,T=typeof n.isOffscreenCanvasSupported=="boolean"?n.isOffscreenCanvasSupported:!mn,S=Number.isInteger(n.canvasMaxAreaInBytes)?n.canvasMaxAreaInBytes:-1,M=typeof n.disableFontFace=="boolean"?n.disableFontFace:mn,x=n.fontExtraProperties===!0,O=n.enableXfa===!0,P=n.ownerDocument||globalThis.document,N=n.disableRange===!0,_=n.disableStream===!0,V=n.disableAutoFetch===!0,H=n.pdfBug===!0,L=n.enableHWA===!0,D=c?c.length:n.length??NaN,U=typeof n.useSystemFonts=="boolean"?n.useSystemFonts:!mn&&!M,F=typeof n.useWorkerFetch=="boolean"?n.useWorkerFetch:y===kE&&w===SE&&p&&b&&h2(p,document.baseURI)&&h2(b,document.baseURI),R=n.canvasFactory||new FZ({ownerDocument:P,enableHWA:L}),G=n.filterFactory||new zZ({docId:t,ownerDocument:P});FU(f);const ne={canvasFactory:R,filterFactory:G};if(F||(ne.cMapReaderFactory=new y({baseUrl:p,isCompressed:m}),ne.standardFontDataFactory=new w({baseUrl:b})),!u){const j={verbosity:f,port:po.workerPort};u=j.port?nc.fromPort(j):new nc(j),e._worker=u}const Y={docId:t,apiVersion:"4.6.82",data:i,password:l,disableAutoFetch:V,rangeChunkSize:d,length:D,docBaseUrl:h,enableXfa:O,evaluatorOptions:{maxImageSize:k,disableFontFace:M,ignoreErrors:v,isEvalSupported:C,isOffscreenCanvasSupported:T,canvasMaxAreaInBytes:S,fontExtraProperties:x,useSystemFonts:U,cMapUrl:F?p:null,standardFontDataUrl:F?b:null}},Z={disableFontFace:M,fontExtraProperties:x,ownerDocument:P,pdfBug:H,styleElement:null,loadingParams:{disableAutoFetch:V,enableXfa:O}};return u.promise.then(function(){if(e.destroyed)throw new Error("Loading aborted");if(u.destroyed)throw new Error("Worker was destroyed");const j=u.messageHandler.sendWithPromise("GetDocRequest",Y,i?[i.buffer]:null);let $;if(c)$=new EZ(c,{disableRange:N,disableStream:_});else if(!i){if(!r)throw new Error("getDocument - no `url` parameter provided.");$=(W=>mn?function(){return typeof fetch<"u"&&typeof Response<"u"&&"body"in Response.prototype}()&&h2(W.url)?new qE(W):new LZ(W):h2(W.url)?new qE(W):new OZ(W))({url:r,length:D,httpHeaders:o,withCredentials:s,rangeChunkSize:d,disableRange:N,disableStream:_})}return j.then(W=>{if(e.destroyed)throw new Error("Loading aborted");if(u.destroyed)throw new Error("Worker was destroyed");const J=new b2(t,W,u.port),ae=new KZ(J,e,$,Z,ne);e._transport=ae,J.send("Ready",null)})}).catch(e._capability.reject),e}function QE(n){return typeof n=="object"&&Number.isInteger(n==null?void 0:n.num)&&n.num>=0&&Number.isInteger(n==null?void 0:n.gen)&&n.gen>=0}const iy=class iy{constructor(){this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId="d"+Xn(iy,ry)._++,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){var e,t,r;this.destroyed=!0;try{(e=this._worker)!=null&&e.port&&(this._worker._pendingDestroy=!0),await((t=this._transport)==null?void 0:t.destroy())}catch(i){throw(r=this._worker)!=null&&r.port&&delete this._worker._pendingDestroy,i}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}};ry=new WeakMap,E(iy,ry,0);let Qb=iy;class XE{constructor(e,t,r=!1,i=null){this.length=e,this.initialData=t,this.progressiveDone=r,this.contentDispositionFilename=i,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(const r of this._rangeListeners)r(e,t)}onDataProgress(e,t){this._readyCapability.promise.then(()=>{for(const r of this._progressListeners)r(e,t)})}onDataProgressiveRead(e){this._readyCapability.promise.then(()=>{for(const t of this._progressiveReadListeners)t(e)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const e of this._progressiveDoneListeners)e()})}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){Mt("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}class ZZ{constructor(e,t){this._pdfInfo=e,this._transport=t}get annotationStorage(){return this._transport.annotationStorage}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return De(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:e="display"}={}){const{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getOptionalContentConfig(t)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(e=!1){return this._transport.startCleanup(e||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(e){return this._transport.cachedPageNumber(e)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}class WZ{constructor(e,t,r,i=!1){E(this,ha);E(this,wd);E(this,fa,null);E(this,Bo,!1);this._pageIndex=e,this._pageInfo=t,this._transport=r,this._stats=i?new EE:null,this._pdfBug=i,this.commonObjs=r.commonObjs,this.objs=new JE,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:e,rotation:t=this.rotate,offsetX:r=0,offsetY:i=0,dontFlip:o=!1}={}){return new f2({viewBox:this.view,scale:e,rotation:t,offsetX:r,offsetY:i,dontFlip:o})}getAnnotations({intent:e="display"}={}){const{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getAnnotations(this._pageIndex,t)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return De(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var e;return((e=this._transport._htmlForXfa)==null?void 0:e.children[this._pageIndex])||null}render({canvasContext:e,viewport:t,intent:r="display",annotationMode:i=hs.ENABLE,transform:o=null,background:s=null,optionalContentConfigPromise:l=null,annotationCanvasMap:c=null,pageColors:d=null,printAnnotationStorage:u=null,isEditing:f=!1}){var C,T;(C=this._stats)==null||C.time("Overall");const h=this._transport.getRenderingIntent(r,i,u,f),{renderingIntent:p,cacheKey:m}=h;A(this,Bo,!1),I(this,wd,u5).call(this),l||(l=this._transport.getOptionalContentConfig(p));let y=this._intentStates.get(m);y||(y=Object.create(null),this._intentStates.set(m,y)),y.streamReaderCancelTimeout&&(clearTimeout(y.streamReaderCancelTimeout),y.streamReaderCancelTimeout=null);const b=!!(p&rm);y.displayReadyCapability||(y.displayReadyCapability=Promise.withResolvers(),y.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(T=this._stats)==null||T.time("Page Request"),this._pumpOperatorList(h));const w=S=>{var M;y.renderTasks.delete(v),(this._maybeCleanupAfterRender||b)&&A(this,Bo,!0),I(this,ha,yu).call(this,!b),S?(v.capability.reject(S),this._abortOperatorList({intentState:y,reason:S instanceof Error?S:new Error(S)})):v.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),(M=globalThis.Stats)!=null&&M.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},v=new Xb({callback:w,params:{canvasContext:e,viewport:t,transform:o,background:s},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:c,operatorList:y.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!b,pdfBug:this._pdfBug,pageColors:d});(y.renderTasks||(y.renderTasks=new Set)).add(v);const k=v.task;return Promise.all([y.displayReadyCapability.promise,l]).then(([S,M])=>{var x;if(this.destroyed)w();else{if((x=this._stats)==null||x.time("Rendering"),!(M.renderingIntent&p))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");v.initializeGraphics({transparency:S,optionalContentConfig:M}),v.operatorListChanged()}}).catch(w),k}getOperatorList({intent:e="display",annotationMode:t=hs.ENABLE,printAnnotationStorage:r=null,isEditing:i=!1}={}){var c;const o=this._transport.getRenderingIntent(e,t,r,i,!0);let s,l=this._intentStates.get(o.cacheKey);return l||(l=Object.create(null),this._intentStates.set(o.cacheKey,l)),l.opListReadCapability||(s=Object.create(null),s.operatorListChanged=function(){l.operatorList.lastChunk&&(l.opListReadCapability.resolve(l.operatorList),l.renderTasks.delete(s))},l.opListReadCapability=Promise.withResolvers(),(l.renderTasks||(l.renderTasks=new Set)).add(s),l.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(c=this._stats)==null||c.time("Page Request"),this._pumpOperatorList(o)),l.opListReadCapability.promise}streamTextContent({includeMarkedContent:e=!1,disableNormalization:t=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:e===!0,disableNormalization:t===!0},{highWaterMark:100,size:r=>r.items.length})}getTextContent(e={}){if(this._transport._htmlForXfa)return this.getXfa().then(r=>v2.textContent(r));const t=this.streamTextContent(e);return new Promise(function(r,i){const o=t.getReader(),s={items:[],styles:Object.create(null),lang:null};(function l(){o.read().then(function({value:c,done:d}){d?r(s):(s.lang??(s.lang=c.lang),Object.assign(s.styles,c.styles),s.items.push(...c.items),l())},i)})()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const e=[];for(const t of this._intentStates.values())if(this._abortOperatorList({intentState:t,reason:new Error("Page was destroyed."),force:!0}),!t.opListReadCapability)for(const r of t.renderTasks)e.push(r.completed),r.cancel();return this.objs.clear(),A(this,Bo,!1),I(this,wd,u5).call(this),Promise.all(e)}cleanup(e=!1){A(this,Bo,!0);const t=I(this,ha,yu).call(this,!1);return e&&t&&this._stats&&(this._stats=new EE),t}_startRenderPage(e,t){var i,o;const r=this._intentStates.get(t);r&&((i=this._stats)==null||i.timeEnd("Page Request"),(o=r.displayReadyCapability)==null||o.resolve(e))}_renderPageChunk(e,t){for(let r=0,i=e.length;r<i;r++)t.operatorList.fnArray.push(e.fnArray[r]),t.operatorList.argsArray.push(e.argsArray[r]);t.operatorList.lastChunk=e.lastChunk,t.operatorList.separateAnnots=e.separateAnnots;for(const r of t.renderTasks)r.operatorListChanged();e.lastChunk&&I(this,ha,yu).call(this,!0)}_pumpOperatorList({renderingIntent:e,cacheKey:t,annotationStorageSerializable:r,modifiedIds:i}){const{map:o,transfer:s}=r,l=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:e,cacheKey:t,annotationStorage:o,modifiedIds:i},s).getReader(),c=this._intentStates.get(t);c.streamReader=l;const d=()=>{l.read().then(({value:u,done:f})=>{f?c.streamReader=null:this._transport.destroyed||(this._renderPageChunk(u,c),d())},u=>{if(c.streamReader=null,!this._transport.destroyed){if(c.operatorList){c.operatorList.lastChunk=!0;for(const f of c.renderTasks)f.operatorListChanged();I(this,ha,yu).call(this,!0)}if(c.displayReadyCapability)c.displayReadyCapability.reject(u);else{if(!c.opListReadCapability)throw u;c.opListReadCapability.reject(u)}}})};d()}_abortOperatorList({intentState:e,reason:t,force:r=!1}){if(e.streamReader){if(e.streamReaderCancelTimeout&&(clearTimeout(e.streamReaderCancelTimeout),e.streamReaderCancelTimeout=null),!r){if(e.renderTasks.size>0)return;if(t instanceof Pb){let i=100;t.extraDelay>0&&t.extraDelay<1e3&&(i+=t.extraDelay),e.streamReaderCancelTimeout=setTimeout(()=>{e.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:e,reason:t,force:!0})},i);return}}if(e.streamReader.cancel(new Ka(t.message)).catch(()=>{}),e.streamReader=null,!this._transport.destroyed){for(const[i,o]of this._intentStates)if(o===e){this._intentStates.delete(i);break}this.cleanup()}}}get stats(){return this._stats}}fa=new WeakMap,Bo=new WeakMap,ha=new WeakSet,yu=function(e=!1){if(I(this,wd,u5).call(this),!g(this,Bo)||this.destroyed)return!1;if(e)return A(this,fa,setTimeout(()=>{A(this,fa,null),I(this,ha,yu).call(this,!1)},5e3)),!1;for(const{renderTasks:t,operatorList:r}of this._intentStates.values())if(t.size>0||!r.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),A(this,Bo,!1),!0},wd=new WeakSet,u5=function(){g(this,fa)&&(clearTimeout(g(this,fa)),A(this,fa,null))};class qZ{constructor(){E(this,t0,new Set);E(this,oy,Promise.resolve())}postMessage(e,t){const r={data:structuredClone(e,t?{transfer:t}:null)};g(this,oy).then(()=>{for(const i of g(this,t0))i.call(this,r)})}addEventListener(e,t){g(this,t0).add(t)}removeEventListener(e,t){g(this,t0).delete(t)}terminate(){g(this,t0).clear()}}t0=new WeakMap,oy=new WeakMap;const nt=class nt{constructor({name:e=null,port:t=null,verbosity:r=jU()}={}){E(this,vd);var i;if(this.name=e,this.destroyed=!1,this.verbosity=r,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,t){if((i=g(nt,r0))!=null&&i.has(t))throw new Error("Cannot use more than one PDFWorker per port.");(g(nt,r0)||A(nt,r0,new WeakMap)).set(t,this),this._initializeFromPort(t)}else this._initialize()}get promise(){return mn?Promise.all([ys.promise,this._readyCapability.promise]):this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new b2("main","worker",e),this._messageHandler.on("ready",function(){}),I(this,vd,f5).call(this)}_initialize(){if(g(nt,n0)||g(nt,Cd,h5)){this._setupFakeWorker();return}let{workerSrc:e}=nt;try{nt._isSameOrigin(window.location.href,e)||(e=nt._createCDNWrapper(new URL(e,window.location).href));const t=new Worker(e,{type:"module"}),r=new b2("main","worker",t),i=()=>{o.abort(),r.destroy(),t.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},o=new AbortController;t.addEventListener("error",()=>{this._webWorker||i()},{signal:o.signal}),r.on("test",l=>{o.abort(),!this.destroyed&&l?(this._messageHandler=r,this._port=t,this._webWorker=t,I(this,vd,f5).call(this)):i()}),r.on("ready",l=>{if(o.abort(),this.destroyed)i();else try{s()}catch{this._setupFakeWorker()}});const s=()=>{const l=new Uint8Array;r.send("test",l,[l.buffer])};s();return}catch{lm("The worker has been disabled.")}this._setupFakeWorker()}_setupFakeWorker(){g(nt,n0)||(Ee("Setting up fake worker."),A(nt,n0,!0)),nt._setupFakeWorkerGlobal.then(e=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const t=new qZ;this._port=t;const r="fake"+Xn(nt,sy)._++,i=new b2(r+"_worker",r,t);e.setup(i,t),this._messageHandler=new b2(r,r+"_worker",t),I(this,vd,f5).call(this)}).catch(e=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${e.message}".`))})}destroy(){var e;this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),(e=g(nt,r0))==null||e.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(e){var r;if(!(e!=null&&e.port))throw new Error("PDFWorker.fromPort - invalid method signature.");const t=(r=g(this,r0))==null?void 0:r.get(e.port);if(t){if(t._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return t}return new nt(e)}static get workerSrc(){if(po.workerSrc)return po.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return De(this,"_setupFakeWorkerGlobal",(async()=>g(this,Cd,h5)?g(this,Cd,h5):(await import(this.workerSrc)).WorkerMessageHandler)())}};sy=new WeakMap,n0=new WeakMap,r0=new WeakMap,vd=new WeakSet,f5=function(){this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})},Cd=new WeakSet,h5=function(){var e;try{return((e=globalThis.pdfjsWorker)==null?void 0:e.WorkerMessageHandler)||null}catch{return null}},E(nt,Cd),E(nt,sy,0),E(nt,n0,!1),E(nt,r0,void 0),mn&&(A(nt,n0,!0),po.workerSrc||(po.workerSrc="./pdf.worker.mjs")),nt._isSameOrigin=(e,t)=>{let r;try{if(r=new URL(e),!r.origin||r.origin==="null")return!1}catch{return!1}const i=new URL(t,r);return r.origin===i.origin},nt._createCDNWrapper=e=>{const t=`await import("${e}");`;return URL.createObjectURL(new Blob([t],{type:"text/javascript"}))};let nc=nt;class KZ{constructor(e,t,r,i,o){E(this,i0);E(this,_o,new Map);E(this,Wi,new Map);E(this,kd,new Map);E(this,Sd,new Map);E(this,qi,null);this.messageHandler=e,this.loadingTask=t,this.commonObjs=new JE,this.fontLoader=new lZ({ownerDocument:i.ownerDocument,styleElement:i.styleElement}),this.loadingParams=i.loadingParams,this._params=i,this.canvasFactory=o.canvasFactory,this.filterFactory=o.filterFactory,this.cMapReaderFactory=o.cMapReaderFactory,this.standardFontDataFactory=o.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=r,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}get annotationStorage(){return De(this,"annotationStorage",new Fb)}getRenderingIntent(e,t=hs.ENABLE,r=null,i=!1,o=!1){let s=Eb,l=Vb;switch(e){case"any":s=lU;break;case"display":break;case"print":s=rm;break;default:Ee(`getRenderingIntent - invalid intent: ${e}`)}const c=s&rm&&r instanceof xE?r:this.annotationStorage;switch(t){case hs.DISABLE:s+=uU;break;case hs.ENABLE:break;case hs.ENABLE_FORMS:s+=cU;break;case hs.ENABLE_STORAGE:s+=dU,l=c.serializable;break;default:Ee(`getRenderingIntent - invalid annotationMode: ${t}`)}i&&(s+=fU),o&&(s+=hU);const{ids:d,hash:u}=c.modifiedIds;return{renderingIntent:s,cacheKey:[s,l.hash,u].join("_"),annotationStorageSerializable:l,modifiedIds:d}}destroy(){var r;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),(r=g(this,qi))==null||r.reject(new Error("Worker was destroyed during onPassword callback"));const e=[];for(const i of g(this,Wi).values())e.push(i._destroy());g(this,Wi).clear(),g(this,kd).clear(),g(this,Sd).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const t=this.messageHandler.sendWithPromise("Terminate",null);return e.push(t),Promise.all(e).then(()=>{var i;this.commonObjs.clear(),this.fontLoader.clear(),g(this,_o).clear(),this.filterFactory.destroy(),w2.cleanup(),(i=this._networkStream)==null||i.cancelAllRequests(new Ka("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:e,loadingTask:t}=this;e.on("GetReader",(r,i)=>{xt(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=o=>{this._lastProgress={loaded:o.loaded,total:o.total}},i.onPull=()=>{this._fullReader.read().then(function({value:o,done:s}){s?i.close():(xt(o instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(o),1,[o]))}).catch(o=>{i.error(o)})},i.onCancel=o=>{this._fullReader.cancel(o),i.ready.catch(s=>{if(!this.destroyed)throw s})}}),e.on("ReaderHeadersReady",r=>{const i=Promise.withResolvers(),o=this._fullReader;return o.headersReady.then(()=>{var s;(!o.isStreamingSupported||!o.isRangeSupported)&&(this._lastProgress&&((s=t.onProgress)==null||s.call(t,this._lastProgress)),o.onProgress=l=>{var c;(c=t.onProgress)==null||c.call(t,{loaded:l.loaded,total:l.total})}),i.resolve({isStreamingSupported:o.isStreamingSupported,isRangeSupported:o.isRangeSupported,contentLength:o.contentLength})},i.reject),i.promise}),e.on("GetRangeReader",(r,i)=>{xt(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const o=this._networkStream.getRangeReader(r.begin,r.end);o?(i.onPull=()=>{o.read().then(function({value:s,done:l}){l?i.close():(xt(s instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(s),1,[s]))}).catch(s=>{i.error(s)})},i.onCancel=s=>{o.cancel(s),i.ready.catch(l=>{if(!this.destroyed)throw l})}):i.close()}),e.on("GetDoc",({pdfInfo:r})=>{this._numPages=r.numPages,this._htmlForXfa=r.htmlForXfa,delete r.htmlForXfa,t._capability.resolve(new ZZ(r,this))}),e.on("DocException",function(r){let i;switch(r.name){case"PasswordException":i=new Tb(r.message,r.code);break;case"InvalidPDFException":i=new pE(r.message);break;case"MissingPDFException":i=new qa(r.message);break;case"UnexpectedResponseException":i=new cm(r.message,r.status);break;case"UnknownErrorException":i=new Ib(r.message,r.details);break;default:Mt("DocException - expected a valid Error.")}t._capability.reject(i)}),e.on("PasswordRequest",r=>{if(A(this,qi,Promise.withResolvers()),t.onPassword){const i=o=>{o instanceof Error?g(this,qi).reject(o):g(this,qi).resolve({password:o})};try{t.onPassword(i,r.code)}catch(o){g(this,qi).reject(o)}}else g(this,qi).reject(new Tb(r.message,r.code));return g(this,qi).promise}),e.on("DataLoaded",r=>{var i;(i=t.onProgress)==null||i.call(t,{loaded:r.length,total:r.length}),this.downloadInfoCapability.resolve(r)}),e.on("StartRenderPage",r=>{this.destroyed||g(this,Wi).get(r.pageIndex)._startRenderPage(r.transparency,r.cacheKey)}),e.on("commonobj",([r,i,o])=>{var s;if(this.destroyed||this.commonObjs.has(r))return null;switch(i){case"Font":const{disableFontFace:l,fontExtraProperties:c,pdfBug:d}=this._params;if("error"in o){const p=o.error;Ee(`Error during font loading: ${p}`),this.commonObjs.resolve(r,p);break}const u=d&&((s=globalThis.FontInspector)!=null&&s.enabled)?(p,m)=>globalThis.FontInspector.fontAdded(p,m):null,f=new cZ(o,{disableFontFace:l,inspectFont:u});this.fontLoader.bind(f).catch(()=>e.sendWithPromise("FontFallback",{id:r})).finally(()=>{!c&&f.data&&(f.data=null),this.commonObjs.resolve(r,f)});break;case"CopyLocalImage":const{imageRef:h}=o;xt(h,"The imageRef must be defined.");for(const p of g(this,Wi).values())for(const[,m]of p.objs)if((m==null?void 0:m.ref)===h)return m.dataLen?(this.commonObjs.resolve(r,structuredClone(m)),m.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(r,o);break;default:throw new Error(`Got unknown common object type ${i}`)}return null}),e.on("obj",([r,i,o,s])=>{var c;if(this.destroyed)return;const l=g(this,Wi).get(i);if(!l.objs.has(r))if(l._intentStates.size!==0)switch(o){case"Image":l.objs.resolve(r,s),(s==null?void 0:s.dataLen)>1e7&&(l._maybeCleanupAfterRender=!0);break;case"Pattern":l.objs.resolve(r,s);break;default:throw new Error(`Got unknown object type ${o}`)}else(c=s==null?void 0:s.bitmap)==null||c.close()}),e.on("DocProgress",r=>{var i;this.destroyed||((i=t.onProgress)==null||i.call(t,{loaded:r.loaded,total:r.total}))}),e.on("FetchBuiltInCMap",r=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(r):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),e.on("FetchStandardFontData",r=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(r):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var r;this.annotationStorage.size<=0&&Ee("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:e,transfer:t}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:e,filename:((r=this._fullReader)==null?void 0:r.filename)??null},t).finally(()=>{this.annotationStorage.resetModified()})}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request."));const t=e-1,r=g(this,kd).get(t);if(r)return r;const i=this.messageHandler.sendWithPromise("GetPage",{pageIndex:t}).then(o=>{if(this.destroyed)throw new Error("Transport destroyed");o.refStr&&g(this,Sd).set(o.refStr,e);const s=new WZ(t,o,this,this._params.pdfBug);return g(this,Wi).set(t,s),s});return g(this,kd).set(t,i),i}getPageIndex(e){return QE(e)?this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}getFieldObjects(){return I(this,i0,rp).call(this,"GetFieldObjects")}hasJSActions(){return I(this,i0,rp).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return typeof e!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return I(this,i0,rp).call(this,"GetDocJSActions")}getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}getStructTree(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(e){return I(this,i0,rp).call(this,"GetOptionalContentConfig").then(t=>new SZ(t,e))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const e="GetMetadata",t=g(this,_o).get(e);if(t)return t;const r=this.messageHandler.sendWithPromise(e,null).then(i=>{var o,s;return{info:i[0],metadata:i[1]?new CZ(i[1]):null,contentDispositionFilename:((o=this._fullReader)==null?void 0:o.filename)??null,contentLength:((s=this._fullReader)==null?void 0:s.contentLength)??null}});return g(this,_o).set(e,r),r}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(e=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const t of g(this,Wi).values())if(!t.cleanup())throw new Error(`startCleanup: Page ${t.pageNumber} is currently rendering.`);this.commonObjs.clear(),e||this.fontLoader.clear(),g(this,_o).clear(),this.filterFactory.destroy(!0),w2.cleanup()}}cachedPageNumber(e){if(!QE(e))return null;const t=e.gen===0?`${e.num}R`:`${e.num}R${e.gen}`;return g(this,Sd).get(t)??null}}_o=new WeakMap,Wi=new WeakMap,kd=new WeakMap,Sd=new WeakMap,qi=new WeakMap,i0=new WeakSet,rp=function(e,t=null){const r=g(this,_o).get(e);if(r)return r;const i=this.messageHandler.sendWithPromise(e,t);return g(this,_o).set(e,i),i};const wm=Symbol("INITIAL_DATA");class JE{constructor(){E(this,Z1);E(this,oi,Object.create(null))}get(e,t=null){if(t){const i=I(this,Z1,_v).call(this,e);return i.promise.then(()=>t(i.data)),null}const r=g(this,oi)[e];if(!r||r.data===wm)throw new Error(`Requesting object that isn't resolved yet ${e}.`);return r.data}has(e){const t=g(this,oi)[e];return!!t&&t.data!==wm}resolve(e,t=null){const r=I(this,Z1,_v).call(this,e);r.data=t,r.resolve()}clear(){var e;for(const t in g(this,oi)){const{data:r}=g(this,oi)[t];(e=r==null?void 0:r.bitmap)==null||e.close()}A(this,oi,Object.create(null))}*[Symbol.iterator](){for(const e in g(this,oi)){const{data:t}=g(this,oi)[e];t!==wm&&(yield[e,t])}}}oi=new WeakMap,Z1=new WeakSet,_v=function(e){var t;return(t=g(this,oi))[e]||(t[e]={...Promise.withResolvers(),data:wm})};class GZ{constructor(e){E(this,pa,null);A(this,pa,e),this.onContinue=null}get promise(){return g(this,pa).capability.promise}cancel(e=0){g(this,pa).cancel(null,e)}get separateAnnots(){const{separateAnnots:e}=g(this,pa).operatorList;if(!e)return!1;const{annotationCanvasMap:t}=g(this,pa);return e.form||e.canvas&&(t==null?void 0:t.size)>0}}pa=new WeakMap;const s0=class s0{constructor({callback:e,params:t,objs:r,commonObjs:i,annotationCanvasMap:o,operatorList:s,pageIndex:l,canvasFactory:c,filterFactory:d,useRequestAnimationFrame:u=!1,pdfBug:f=!1,pageColors:h=null}){E(this,ma,null);this.callback=e,this.params=t,this.objs=r,this.commonObjs=i,this.annotationCanvasMap=o,this.operatorListIdx=null,this.operatorList=s,this._pageIndex=l,this.canvasFactory=c,this.filterFactory=d,this._pdfBug=f,this.pageColors=h,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=u===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new GZ(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=t.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:e=!1,optionalContentConfig:t}){var l,c;if(this.cancelled)return;if(this._canvas){if(g(s0,o0).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");g(s0,o0).add(this._canvas)}this._pdfBug&&((l=globalThis.StepperManager)!=null&&l.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:r,viewport:i,transform:o,background:s}=this.params;this.gfx=new tc(r,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:t},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:o,viewport:i,transparency:e,background:s}),this.operatorListIdx=0,this.graphicsReady=!0,(c=this.graphicsReadyCallback)==null||c.call(this)}cancel(e=null,t=0){var r;this.running=!1,this.cancelled=!0,(r=this.gfx)==null||r.endDrawing(),g(this,ma)&&(window.cancelAnimationFrame(g(this,ma)),A(this,ma,null)),g(s0,o0).delete(this._canvas),this.callback(e||new Pb(`Rendering cancelled, page ${this._pageIndex+1}`,t))}operatorListChanged(){var e;this.graphicsReady?((e=this.stepper)==null||e.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?A(this,ma,window.requestAnimationFrame(()=>{A(this,ma,null),this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),g(s0,o0).delete(this._canvas),this.callback())))}};ma=new WeakMap,o0=new WeakMap,E(s0,o0,new WeakSet);let Xb=s0;const YZ="4.6.82",QZ="9b541910f";Le(670);function eM(n){return Math.floor(255*Math.max(0,Math.min(1,n))).toString(16).padStart(2,"0")}function C2(n){return Math.max(0,Math.min(255,255*n))}class tM{static CMYK_G([e,t,r,i]){return["G",1-Math.min(1,.3*e+.59*r+.11*t+i)]}static G_CMYK([e]){return["CMYK",0,0,0,1-e]}static G_RGB([e]){return["RGB",e,e,e]}static G_rgb([e]){return[e=C2(e),e,e]}static G_HTML([e]){const t=eM(e);return`#${t}${t}${t}`}static RGB_G([e,t,r]){return["G",.3*e+.59*t+.11*r]}static RGB_rgb(e){return e.map(C2)}static RGB_HTML(e){return`#${e.map(eM).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([e,t,r,i]){return["RGB",1-Math.min(1,e+i),1-Math.min(1,r+i),1-Math.min(1,t+i)]}static CMYK_rgb([e,t,r,i]){return[C2(1-Math.min(1,e+i)),C2(1-Math.min(1,r+i)),C2(1-Math.min(1,t+i))]}static CMYK_HTML(e){const t=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(t)}static RGB_CMYK([e,t,r]){const i=1-e,o=1-t,s=1-r;return["CMYK",i,o,s,Math.min(i,o,s)]}}class nM{static setupStorage(e,t,r,i,o){const s=i.getValue(t,{value:null});switch(r.name){case"textarea":if(s.value!==null&&(e.textContent=s.value),o==="print")break;e.addEventListener("input",l=>{i.setValue(t,{value:l.target.value})});break;case"input":if(r.attributes.type==="radio"||r.attributes.type==="checkbox"){if(s.value===r.attributes.xfaOn?e.setAttribute("checked",!0):s.value===r.attributes.xfaOff&&e.removeAttribute("checked"),o==="print")break;e.addEventListener("change",l=>{i.setValue(t,{value:l.target.checked?l.target.getAttribute("xfaOn"):l.target.getAttribute("xfaOff")})})}else{if(s.value!==null&&e.setAttribute("value",s.value),o==="print")break;e.addEventListener("input",l=>{i.setValue(t,{value:l.target.value})})}break;case"select":if(s.value!==null){e.setAttribute("value",s.value);for(const l of r.children)l.attributes.value===s.value?l.attributes.selected=!0:l.attributes.hasOwnProperty("selected")&&delete l.attributes.selected}e.addEventListener("input",l=>{const c=l.target.options,d=c.selectedIndex===-1?"":c[c.selectedIndex].value;i.setValue(t,{value:d})})}}static setAttributes({html:e,element:t,storage:r=null,intent:i,linkService:o}){const{attributes:s}=t,l=e instanceof HTMLAnchorElement;s.type==="radio"&&(s.name=`${s.name}-${i}`);for(const[c,d]of Object.entries(s))if(d!=null)switch(c){case"class":d.length&&e.setAttribute(c,d.join(" "));break;case"dataId":break;case"id":e.setAttribute("data-element-id",d);break;case"style":Object.assign(e.style,d);break;case"textContent":e.textContent=d;break;default:(!l||c!=="href"&&c!=="newWindow")&&e.setAttribute(c,d)}l&&o.addLinkAttributes(e,s.href,s.newWindow),r&&s.dataId&&this.setupStorage(e,s.dataId,t,r)}static render(e){var f,h;const t=e.annotationStorage,r=e.linkService,i=e.xfaHtml,o=e.intent||"display",s=document.createElement(i.name);i.attributes&&this.setAttributes({html:s,element:i,intent:o,linkService:r});const l=o!=="richText",c=e.div;if(c.append(s),e.viewport){const p=`matrix(${e.viewport.transform.join(",")})`;c.style.transform=p}l&&c.setAttribute("class","xfaLayer xfaFont");const d=[];if(i.children.length===0){if(i.value){const p=document.createTextNode(i.value);s.append(p),l&&v2.shouldBuildText(i.name)&&d.push(p)}return{textDivs:d}}const u=[[i,-1,s]];for(;u.length>0;){const[p,m,y]=u.at(-1);if(m+1===p.children.length){u.pop();continue}const b=p.children[++u.at(-1)[1]];if(b===null)continue;const{name:w}=b;if(w==="#text"){const k=document.createTextNode(b.value);d.push(k),y.append(k);continue}const v=(f=b==null?void 0:b.attributes)!=null&&f.xmlns?document.createElementNS(b.attributes.xmlns,w):document.createElement(w);if(y.append(v),b.attributes&&this.setAttributes({html:v,element:b,storage:t,intent:o,linkService:r}),((h=b.children)==null?void 0:h.length)>0)u.push([b,-1,v]);else if(b.value){const k=document.createTextNode(b.value);l&&v2.shouldBuildText(w)&&d.push(k),v.append(k)}}for(const p of c.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))p.setAttribute("readOnly",!0);return{textDivs:d}}static update(e){const t=`matrix(${e.viewport.transform.join(",")})`;e.div.style.transform=t,e.div.hidden=!1}}const k2=1e3,Xa=new WeakSet;function mo(n){return{width:n[2]-n[0],height:n[3]-n[1]}}class XZ{static create(e){switch(e.data.annotationType){case bU:return new rM(e);case yU:return new JZ(e);case PU:switch(e.data.fieldType){case"Tx":return new eW(e);case"Btn":return e.data.radioButton?new iM(e):e.data.checkBox?new nW(e):new rW(e);case"Ch":return new iW(e);case"Sig":return new tW(e)}return new Ja(e);case hE:return new Jb(e);case wU:return new oM(e);case vU:return new sW(e);case CU:return new aW(e);case kU:return new lW(e);case EU:return new sM(e);case OU:return new dW(e);case DU:return new aM(e);case SU:return new cW(e);case MU:return new uW(e);case AU:return new fW(e);case TU:return new hW(e);case IU:return new pW(e);case xU:return new lM(e);case NU:return new mW(e);default:return new wt(e)}}}const cv=class cv{constructor(e,{isRenderable:t=!1,ignoreBorder:r=!1,createQuadrilaterals:i=!1}={}){E(this,W1);E(this,a0,null);E(this,Ed,!1);E(this,Md,null);this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,this.parent=e.parent,t&&(this.container=this._createContainer(r)),i&&this._createQuadrilaterals()}static _hasPopupData({titleObj:e,contentsObj:t,richText:r}){return!!(e!=null&&e.str||t!=null&&t.str||r!=null&&r.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return cv._hasPopupData(this.data)}updateEdited(e){var r;if(!this.container)return;g(this,a0)||A(this,a0,{rect:this.data.rect.slice(0)});const{rect:t}=e;t&&I(this,W1,Rv).call(this,t),(r=g(this,Md))==null||r.popup.updateEdited(e)}resetEdited(){var e;g(this,a0)&&(I(this,W1,Rv).call(this,g(this,a0).rect),(e=g(this,Md))==null||e.popup.resetEdited(),A(this,a0,null))}_createContainer(e){const{data:t,parent:{page:r,viewport:i}}=this,o=document.createElement("section");o.setAttribute("data-annotation-id",t.id),this instanceof Ja||(o.tabIndex=k2);const{style:s}=o;if(s.zIndex=this.parent.zIndex++,t.popupRef&&o.setAttribute("aria-haspopup","dialog"),t.alternativeText&&(o.title=t.alternativeText),t.noRotate&&o.classList.add("norotate"),!t.rect||this instanceof Jb){const{rotation:y}=t;return t.hasOwnCanvas||y===0||this.setRotation(y,o),o}const{width:l,height:c}=mo(t.rect);if(!e&&t.borderStyle.width>0){s.borderWidth=`${t.borderStyle.width}px`;const y=t.borderStyle.horizontalCornerRadius,b=t.borderStyle.verticalCornerRadius;if(y>0||b>0){const v=`calc(${y}px * var(--scale-factor)) / calc(${b}px * var(--scale-factor))`;s.borderRadius=v}else if(this instanceof iM){const v=`calc(${l}px * var(--scale-factor)) / calc(${c}px * var(--scale-factor))`;s.borderRadius=v}switch(t.borderStyle.style){case LU:s.borderStyle="solid";break;case BU:s.borderStyle="dashed";break;case _U:Ee("Unimplemented border style: beveled");break;case RU:Ee("Unimplemented border style: inset");break;case $U:s.borderBottomStyle="solid"}const w=t.borderColor||null;w?(A(this,Ed,!0),s.borderColor=ue.makeHexColor(0|w[0],0|w[1],0|w[2])):s.borderWidth=0}const d=ue.normalizeRect([t.rect[0],r.view[3]-t.rect[1]+r.view[1],t.rect[2],r.view[3]-t.rect[3]+r.view[1]]),{pageWidth:u,pageHeight:f,pageX:h,pageY:p}=i.rawDims;s.left=100*(d[0]-h)/u+"%",s.top=100*(d[1]-p)/f+"%";const{rotation:m}=t;return t.hasOwnCanvas||m===0?(s.width=100*l/u+"%",s.height=100*c/f+"%"):this.setRotation(m,o),o}setRotation(e,t=this.container){if(!this.data.rect)return;const{pageWidth:r,pageHeight:i}=this.parent.viewport.rawDims,{width:o,height:s}=mo(this.data.rect);let l,c;e%180==0?(l=100*o/r,c=100*s/i):(l=100*s/r,c=100*o/i),t.style.width=`${l}%`,t.style.height=`${c}%`,t.setAttribute("data-main-rotation",(360-e)%360)}get _commonActions(){const e=(t,r,i)=>{const o=i.detail[t],s=o[0],l=o.slice(1);i.target.style[r]=tM[`${s}_HTML`](l),this.annotationStorage.setValue(this.data.id,{[r]:tM[`${s}_rgb`](l)})};return De(this,"_commonActions",{display:t=>{const{display:r}=t.detail,i=r%2==1;this.container.style.visibility=i?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:i,noPrint:r===1||r===2})},print:t=>{this.annotationStorage.setValue(this.data.id,{noPrint:!t.detail.print})},hidden:t=>{const{hidden:r}=t.detail;this.container.style.visibility=r?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:r,noView:r})},focus:t=>{setTimeout(()=>t.target.focus({preventScroll:!1}),0)},userName:t=>{t.target.title=t.detail.userName},readonly:t=>{t.target.disabled=t.detail.readonly},required:t=>{this._setRequired(t.target,t.detail.required)},bgColor:t=>{e("bgColor","backgroundColor",t)},fillColor:t=>{e("fillColor","backgroundColor",t)},fgColor:t=>{e("fgColor","color",t)},textColor:t=>{e("textColor","color",t)},borderColor:t=>{e("borderColor","borderColor",t)},strokeColor:t=>{e("strokeColor","borderColor",t)},rotation:t=>{const r=t.detail.rotation;this.setRotation(r),this.annotationStorage.setValue(this.data.id,{rotation:r})}})}_dispatchEventFromSandbox(e,t){const r=this._commonActions;for(const i of Object.keys(t.detail)){const o=e[i]||r[i];o==null||o(t)}}_setDefaultPropertiesFromJS(e){if(!this.enableScripting)return;const t=this.annotationStorage.getRawValue(this.data.id);if(!t)return;const r=this._commonActions;for(const[i,o]of Object.entries(t)){const s=r[i];s&&(s({detail:{[i]:o},target:e}),delete t[i])}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:e}=this.data;if(!e)return;const[t,r,i,o]=this.data.rect.map(y=>Math.fround(y));if(e.length===8){const[y,b,w,v]=e.subarray(2,6);if(i===y&&o===b&&t===w&&r===v)return}const{style:s}=this.container;let l;if(g(this,Ed)){const{borderColor:y,borderWidth:b}=s;s.borderWidth=0,l=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${y}" stroke-width="${b}">`],this.container.classList.add("hasBorder")}const c=i-t,d=o-r,{svgFactory:u}=this,f=u.createElement("svg");f.classList.add("quadrilateralsContainer"),f.setAttribute("width",0),f.setAttribute("height",0);const h=u.createElement("defs");f.append(h);const p=u.createElement("clipPath"),m=`clippath_${this.data.id}`;p.setAttribute("id",m),p.setAttribute("clipPathUnits","objectBoundingBox"),h.append(p);for(let y=2,b=e.length;y<b;y+=8){const w=e[y],v=e[y+1],k=e[y+2],C=e[y+3],T=u.createElement("rect"),S=(k-t)/c,M=(o-v)/d,x=(w-k)/c,O=(v-C)/d;T.setAttribute("x",S),T.setAttribute("y",M),T.setAttribute("width",x),T.setAttribute("height",O),p.append(T),l==null||l.push(`<rect vector-effect="non-scaling-stroke" x="${S}" y="${M}" width="${x}" height="${O}"/>`)}g(this,Ed)&&(l.push("</g></svg>')"),s.backgroundImage=l.join("")),this.container.append(f),this.container.style.clipPath=`url(#${m})`}_createPopup(){const{container:e,data:t}=this;e.setAttribute("aria-haspopup","dialog");const r=A(this,Md,new Jb({data:{color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,parentRect:t.rect,borderStyle:0,id:`popup_${t.id}`,rotation:t.rotation},parent:this.parent,elements:[this]}));this.parent.div.append(r.render())}render(){Mt("Abstract method `AnnotationElement.render` called")}_getElementsByName(e,t=null){const r=[];if(this._fieldObjects){const i=this._fieldObjects[e];if(i)for(const{page:o,id:s,exportValues:l}of i){if(o===-1||s===t)continue;const c=typeof l=="string"?l:null,d=document.querySelector(`[data-element-id="${s}"]`);!d||Xa.has(d)?r.push({id:s,exportValue:c,domElement:d}):Ee(`_getElementsByName - element not allowed: ${s}`)}return r}for(const i of document.getElementsByName(e)){const{exportValue:o}=i,s=i.getAttribute("data-element-id");s!==t&&Xa.has(i)&&r.push({id:s,exportValue:o,domElement:i})}return r}show(){var e;this.container&&(this.container.hidden=!1),(e=this.popup)==null||e.maybeShow()}hide(){var e;this.container&&(this.container.hidden=!0),(e=this.popup)==null||e.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const e=this.getElementsToTriggerPopup();if(Array.isArray(e))for(const t of e)t.classList.add("highlightArea");else e.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:e,data:{id:t}}=this;this.container.addEventListener("dblclick",()=>{var r;(r=this.linkService.eventBus)==null||r.dispatch("switchannotationeditormode",{source:this,mode:e,editId:t})})}};a0=new WeakMap,Ed=new WeakMap,Md=new WeakMap,W1=new WeakSet,Rv=function(e){const{container:{style:t},data:{rect:r,rotation:i},parent:{viewport:{rawDims:{pageWidth:o,pageHeight:s,pageX:l,pageY:c}}}}=this;r==null||r.splice(0,4,...e);const{width:d,height:u}=mo(e);t.left=100*(e[0]-l)/o+"%",t.top=100*(s-e[3]+c)/s+"%",i===0?(t.width=100*d/o+"%",t.height=100*u/s+"%"):this.setRotation(i)};let wt=cv;class rM extends wt{constructor(t,r=null){super(t,{isRenderable:!0,ignoreBorder:!!(r!=null&&r.ignoreBorder),createQuadrilaterals:!0});E(this,Ro);E(this,ay);E(this,ly);this.isTooltipOnly=t.data.isTooltipOnly}render(){const{data:t,linkService:r}=this,i=document.createElement("a");i.setAttribute("data-element-id",t.id);let o=!1;return t.url?(r.addLinkAttributes(i,t.url,t.newWindow),o=!0):t.action?(this._bindNamedAction(i,t.action),o=!0):t.attachment?(I(this,ay,RN).call(this,i,t.attachment,t.attachmentDest),o=!0):t.setOCGState?(I(this,ly,$N).call(this,i,t.setOCGState),o=!0):t.dest?(this._bindLink(i,t.dest),o=!0):(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(i,t),o=!0),t.resetForm?(this._bindResetFormAction(i,t.resetForm),o=!0):this.isTooltipOnly&&!o&&(this._bindLink(i,""),o=!0)),this.container.classList.add("linkAnnotation"),o&&this.container.append(i),this.container}_bindLink(t,r){t.href=this.linkService.getDestinationHash(r),t.onclick=()=>(r&&this.linkService.goToDestination(r),!1),(r||r==="")&&I(this,Ro,R0).call(this)}_bindNamedAction(t,r){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeNamedAction(r),!1),I(this,Ro,R0).call(this)}_bindJSAction(t,r){t.href=this.linkService.getAnchorUrl("");const i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const o of Object.keys(r.actions)){const s=i.get(o);s&&(t[s]=()=>{var l;return(l=this.linkService.eventBus)==null||l.dispatch("dispatcheventinsandbox",{source:this,detail:{id:r.id,name:o}}),!1})}t.onclick||(t.onclick=()=>!1),I(this,Ro,R0).call(this)}_bindResetFormAction(t,r){const i=t.onclick;i||(t.href=this.linkService.getAnchorUrl("")),I(this,Ro,R0).call(this),this._fieldObjects?t.onclick=()=>{var f;i==null||i();const{fields:o,refs:s,include:l}=r,c=[];if(o.length!==0||s.length!==0){const h=new Set(s);for(const p of o){const m=this._fieldObjects[p]||[];for(const{id:y}of m)h.add(y)}for(const p of Object.values(this._fieldObjects))for(const m of p)h.has(m.id)===l&&c.push(m)}else for(const h of Object.values(this._fieldObjects))c.push(...h);const d=this.annotationStorage,u=[];for(const h of c){const{id:p}=h;switch(u.push(p),h.type){case"text":{const y=h.defaultValue||"";d.setValue(p,{value:y});break}case"checkbox":case"radiobutton":{const y=h.defaultValue===h.exportValues;d.setValue(p,{value:y});break}case"combobox":case"listbox":{const y=h.defaultValue||"";d.setValue(p,{value:y});break}default:continue}const m=document.querySelector(`[data-element-id="${p}"]`);m&&(Xa.has(m)?m.dispatchEvent(new Event("resetform")):Ee(`_bindResetFormAction - element not allowed: ${p}`))}return this.enableScripting&&((f=this.linkService.eventBus)==null||f.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:u,name:"ResetForm"}})),!1}:(Ee('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),i||(t.onclick=()=>!1))}}Ro=new WeakSet,R0=function(){this.container.setAttribute("data-internal-link","")},ay=new WeakSet,RN=function(t,r,i=null){t.href=this.linkService.getAnchorUrl(""),r.description&&(t.title=r.description),t.onclick=()=>{var o;return(o=this.downloadManager)==null||o.openOrDownloadData(r.content,r.filename,i),!1},I(this,Ro,R0).call(this)},ly=new WeakSet,$N=function(t,r){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeSetOCGState(r),!1),I(this,Ro,R0).call(this)};class JZ extends wt{constructor(e){super(e,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const e=document.createElement("img");return e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),e.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(e),this.container}}class Ja extends wt{render(){return this.container}showElementAndHideCanvas(e){var t;this.data.hasOwnCanvas&&(((t=e.previousSibling)==null?void 0:t.nodeName)==="CANVAS"&&(e.previousSibling.hidden=!0),e.hidden=!1)}_getKeyModifier(e){return jn.platform.isMac?e.metaKey:e.ctrlKey}_setEventListener(e,t,r,i,o){r.includes("mouse")?e.addEventListener(r,s=>{var l;(l=this.linkService.eventBus)==null||l.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:o(s),shift:s.shiftKey,modifier:this._getKeyModifier(s)}})}):e.addEventListener(r,s=>{var l;if(r==="blur"){if(!t.focused||!s.relatedTarget)return;t.focused=!1}else if(r==="focus"){if(t.focused)return;t.focused=!0}o&&((l=this.linkService.eventBus)==null||l.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:o(s)}}))})}_setEventListeners(e,t,r,i){var o,s,l;for(const[c,d]of r)(d==="Action"||(o=this.data.actions)!=null&&o[d])&&(d!=="Focus"&&d!=="Blur"||t||(t={focused:!1}),this._setEventListener(e,t,c,d,i),d!=="Focus"||(s=this.data.actions)!=null&&s.Blur?d!=="Blur"||(l=this.data.actions)!=null&&l.Focus||this._setEventListener(e,t,"focus","Focus",null):this._setEventListener(e,t,"blur","Blur",null))}_setBackgroundColor(e){const t=this.data.backgroundColor||null;e.style.backgroundColor=t===null?"transparent":ue.makeHexColor(t[0],t[1],t[2])}_setTextStyle(e){const t=["left","center","right"],{fontColor:r}=this.data.defaultAppearanceData,i=this.data.defaultAppearanceData.fontSize||9,o=e.style;let s;const l=c=>Math.round(10*c)/10;if(this.data.multiLine){const c=Math.abs(this.data.rect[3]-this.data.rect[1]-2),d=c/(Math.round(c/(Sb*i))||1);s=Math.min(i,l(d/Sb))}else{const c=Math.abs(this.data.rect[3]-this.data.rect[1]-2);s=Math.min(i,l(c/Sb))}o.fontSize=`calc(${s}px * var(--scale-factor))`,o.color=ue.makeHexColor(r[0],r[1],r[2]),this.data.textAlignment!==null&&(o.textAlign=t[this.data.textAlignment])}_setRequired(e,t){t?e.setAttribute("required",!0):e.removeAttribute("required"),e.setAttribute("aria-required",t)}}class eW extends Ja{constructor(e){super(e,{isRenderable:e.renderForms||e.data.hasOwnCanvas||!e.data.hasAppearance&&!!e.data.fieldValue})}setPropertyOnSiblings(e,t,r,i){const o=this.annotationStorage;for(const s of this._getElementsByName(e.name,e.id))s.domElement&&(s.domElement[t]=r),o.setValue(s.id,{[i]:r})}render(){var i,o;const e=this.annotationStorage,t=this.data.id;this.container.classList.add("textWidgetAnnotation");let r=null;if(this.renderForms){const s=e.getValue(t,{value:this.data.fieldValue});let l=s.value||"";const c=e.getValue(t,{charLimit:this.data.maxLen}).charLimit;c&&l.length>c&&(l=l.slice(0,c));let d=s.formattedValue||((i=this.data.textContent)==null?void 0:i.join(`
|
|
122
122
|
`))||null;d&&this.data.comb&&(d=d.replaceAll(/\s+/g,""));const u={userValue:l,formattedValue:d,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(r=document.createElement("textarea"),r.textContent=d??l,this.data.doNotScroll&&(r.style.overflowY="hidden")):(r=document.createElement("input"),r.type="text",r.setAttribute("value",d??l),this.data.doNotScroll&&(r.style.overflowX="hidden")),this.data.hasOwnCanvas&&(r.hidden=!0),Xa.add(r),r.setAttribute("data-element-id",t),r.disabled=this.data.readOnly,r.name=this.data.fieldName,r.tabIndex=k2,this._setRequired(r,this.data.required),c&&(r.maxLength=c),r.addEventListener("input",h=>{e.setValue(t,{value:h.target.value}),this.setPropertyOnSiblings(r,"value",h.target.value,"value"),u.formattedValue=null}),r.addEventListener("resetform",h=>{const p=this.data.defaultFieldValue??"";r.value=u.userValue=p,u.formattedValue=null});let f=h=>{const{formattedValue:p}=u;p!=null&&(h.target.value=p),h.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){r.addEventListener("focus",p=>{var y;if(u.focused)return;const{target:m}=p;u.userValue&&(m.value=u.userValue),u.lastCommittedValue=m.value,u.commitKey=1,(y=this.data.actions)!=null&&y.Focus||(u.focused=!0)}),r.addEventListener("updatefromsandbox",p=>{this.showElementAndHideCanvas(p.target);const m={value(y){u.userValue=y.detail.value??"",e.setValue(t,{value:u.userValue.toString()}),y.target.value=u.userValue},formattedValue(y){const{formattedValue:b}=y.detail;u.formattedValue=b,b!=null&&y.target!==document.activeElement&&(y.target.value=b),e.setValue(t,{formattedValue:b})},selRange(y){y.target.setSelectionRange(...y.detail.selRange)},charLimit:y=>{var k;const{charLimit:b}=y.detail,{target:w}=y;if(b===0){w.removeAttribute("maxLength");return}w.setAttribute("maxLength",b);let v=u.userValue;v&&!(v.length<=b)&&(v=v.slice(0,b),w.value=u.userValue=v,e.setValue(t,{value:v}),(k=this.linkService.eventBus)==null||k.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:v,willCommit:!0,commitKey:1,selStart:w.selectionStart,selEnd:w.selectionEnd}}))}};this._dispatchEventFromSandbox(m,p)}),r.addEventListener("keydown",p=>{var b;u.commitKey=1;let m=-1;if(p.key==="Escape"?m=0:p.key!=="Enter"||this.data.multiLine?p.key==="Tab"&&(u.commitKey=3):m=2,m===-1)return;const{value:y}=p.target;u.lastCommittedValue!==y&&(u.lastCommittedValue=y,u.userValue=y,(b=this.linkService.eventBus)==null||b.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:y,willCommit:!0,commitKey:m,selStart:p.target.selectionStart,selEnd:p.target.selectionEnd}}))});const h=f;f=null,r.addEventListener("blur",p=>{var y,b;if(!u.focused||!p.relatedTarget)return;(y=this.data.actions)!=null&&y.Blur||(u.focused=!1);const{value:m}=p.target;u.userValue=m,u.lastCommittedValue!==m&&((b=this.linkService.eventBus)==null||b.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:m,willCommit:!0,commitKey:u.commitKey,selStart:p.target.selectionStart,selEnd:p.target.selectionEnd}})),h(p)}),(o=this.data.actions)!=null&&o.Keystroke&&r.addEventListener("beforeinput",p=>{var T;u.lastCommittedValue=null;const{data:m,target:y}=p,{value:b,selectionStart:w,selectionEnd:v}=y;let k=w,C=v;switch(p.inputType){case"deleteWordBackward":{const S=b.substring(0,w).match(/\w*[^\w]*$/);S&&(k-=S[0].length);break}case"deleteWordForward":{const S=b.substring(w).match(/^[^\w]*\w*/);S&&(C+=S[0].length);break}case"deleteContentBackward":w===v&&(k-=1);break;case"deleteContentForward":w===v&&(C+=1)}p.preventDefault(),(T=this.linkService.eventBus)==null||T.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:b,change:m||"",willCommit:!1,selStart:k,selEnd:C}})}),this._setEventListeners(r,u,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],p=>p.target.value)}if(f&&r.addEventListener("blur",f),this.data.comb){const h=(this.data.rect[2]-this.data.rect[0])/c;r.classList.add("comb"),r.style.letterSpacing=`calc(${h}px * var(--scale-factor) - 1ch)`}}else r=document.createElement("div"),r.textContent=this.data.fieldValue,r.style.verticalAlign="middle",r.style.display="table-cell",this.data.hasOwnCanvas&&(r.hidden=!0);return this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class tW extends Ja{constructor(e){super(e,{isRenderable:!!e.data.hasOwnCanvas})}}class nW extends Ja{constructor(e){super(e,{isRenderable:e.renderForms})}render(){const e=this.annotationStorage,t=this.data,r=t.id;let i=e.getValue(r,{value:t.exportValue===t.fieldValue}).value;typeof i=="string"&&(i=i!=="Off",e.setValue(r,{value:i})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const o=document.createElement("input");return Xa.add(o),o.setAttribute("data-element-id",r),o.disabled=t.readOnly,this._setRequired(o,this.data.required),o.type="checkbox",o.name=t.fieldName,i&&o.setAttribute("checked",!0),o.setAttribute("exportValue",t.exportValue),o.tabIndex=k2,o.addEventListener("change",s=>{const{name:l,checked:c}=s.target;for(const d of this._getElementsByName(l,r)){const u=c&&d.exportValue===t.exportValue;d.domElement&&(d.domElement.checked=u),e.setValue(d.id,{value:u})}e.setValue(r,{value:c})}),o.addEventListener("resetform",s=>{const l=t.defaultFieldValue||"Off";s.target.checked=l===t.exportValue}),this.enableScripting&&this.hasJSActions&&(o.addEventListener("updatefromsandbox",s=>{const l={value(c){c.target.checked=c.detail.value!=="Off",e.setValue(r,{value:c.target.checked})}};this._dispatchEventFromSandbox(l,s)}),this._setEventListeners(o,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],s=>s.target.checked)),this._setBackgroundColor(o),this._setDefaultPropertiesFromJS(o),this.container.append(o),this.container}}class iM extends Ja{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const e=this.annotationStorage,t=this.data,r=t.id;let i=e.getValue(r,{value:t.fieldValue===t.buttonValue}).value;if(typeof i=="string"&&(i=i!==t.buttonValue,e.setValue(r,{value:i})),i)for(const s of this._getElementsByName(t.fieldName,r))e.setValue(s.id,{value:!1});const o=document.createElement("input");if(Xa.add(o),o.setAttribute("data-element-id",r),o.disabled=t.readOnly,this._setRequired(o,this.data.required),o.type="radio",o.name=t.fieldName,i&&o.setAttribute("checked",!0),o.tabIndex=k2,o.addEventListener("change",s=>{const{name:l,checked:c}=s.target;for(const d of this._getElementsByName(l,r))e.setValue(d.id,{value:!1});e.setValue(r,{value:c})}),o.addEventListener("resetform",s=>{const l=t.defaultFieldValue;s.target.checked=l!=null&&l===t.buttonValue}),this.enableScripting&&this.hasJSActions){const s=t.buttonValue;o.addEventListener("updatefromsandbox",l=>{const c={value:d=>{const u=s===d.detail.value;for(const f of this._getElementsByName(d.target.name)){const h=u&&f.id===r;f.domElement&&(f.domElement.checked=h),e.setValue(f.id,{value:h})}}};this._dispatchEventFromSandbox(c,l)}),this._setEventListeners(o,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],l=>l.target.checked)}return this._setBackgroundColor(o),this._setDefaultPropertiesFromJS(o),this.container.append(o),this.container}}class rW extends rM{constructor(e){super(e,{ignoreBorder:e.data.hasAppearance})}render(){const e=super.render();e.classList.add("buttonWidgetAnnotation","pushButton");const t=e.lastChild;return this.enableScripting&&this.hasJSActions&&t&&(this._setDefaultPropertiesFromJS(t),t.addEventListener("updatefromsandbox",r=>{this._dispatchEventFromSandbox({},r)})),e}}class iW extends Ja{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const e=this.annotationStorage,t=this.data.id,r=e.getValue(t,{value:this.data.fieldValue}),i=document.createElement("select");Xa.add(i),i.setAttribute("data-element-id",t),i.disabled=this.data.readOnly,this._setRequired(i,this.data.required),i.name=this.data.fieldName,i.tabIndex=k2;let o=this.data.combo&&this.data.options.length>0;this.data.combo||(i.size=this.data.options.length,this.data.multiSelect&&(i.multiple=!0)),i.addEventListener("resetform",u=>{const f=this.data.defaultFieldValue;for(const h of i.options)h.selected=h.value===f});for(const u of this.data.options){const f=document.createElement("option");f.textContent=u.displayValue,f.value=u.exportValue,r.value.includes(u.exportValue)&&(f.setAttribute("selected",!0),o=!1),i.append(f)}let s=null;if(o){const u=document.createElement("option");u.value=" ",u.setAttribute("hidden",!0),u.setAttribute("selected",!0),i.prepend(u),s=()=>{u.remove(),i.removeEventListener("input",s),s=null},i.addEventListener("input",s)}const l=u=>{const f=u?"value":"textContent",{options:h,multiple:p}=i;return p?Array.prototype.filter.call(h,m=>m.selected).map(m=>m[f]):h.selectedIndex===-1?null:h[h.selectedIndex][f]};let c=l(!1);const d=u=>{const f=u.target.options;return Array.prototype.map.call(f,h=>({displayValue:h.textContent,exportValue:h.value}))};return this.enableScripting&&this.hasJSActions?(i.addEventListener("updatefromsandbox",u=>{const f={value(h){s==null||s();const p=h.detail.value,m=new Set(Array.isArray(p)?p:[p]);for(const y of i.options)y.selected=m.has(y.value);e.setValue(t,{value:l(!0)}),c=l(!1)},multipleSelection(h){i.multiple=!0},remove(h){const p=i.options,m=h.detail.remove;p[m].selected=!1,i.remove(m),p.length>0&&Array.prototype.findIndex.call(p,y=>y.selected)===-1&&(p[0].selected=!0),e.setValue(t,{value:l(!0),items:d(h)}),c=l(!1)},clear(h){for(;i.length!==0;)i.remove(0);e.setValue(t,{value:null,items:[]}),c=l(!1)},insert(h){const{index:p,displayValue:m,exportValue:y}=h.detail.insert,b=i.children[p],w=document.createElement("option");w.textContent=m,w.value=y,b?b.before(w):i.append(w),e.setValue(t,{value:l(!0),items:d(h)}),c=l(!1)},items(h){const{items:p}=h.detail;for(;i.length!==0;)i.remove(0);for(const m of p){const{displayValue:y,exportValue:b}=m,w=document.createElement("option");w.textContent=y,w.value=b,i.append(w)}i.options.length>0&&(i.options[0].selected=!0),e.setValue(t,{value:l(!0),items:d(h)}),c=l(!1)},indices(h){const p=new Set(h.detail.indices);for(const m of h.target.options)m.selected=p.has(m.index);e.setValue(t,{value:l(!0)}),c=l(!1)},editable(h){h.target.disabled=!h.detail.editable}};this._dispatchEventFromSandbox(f,u)}),i.addEventListener("input",u=>{var p;const f=l(!0),h=l(!1);e.setValue(t,{value:f}),u.preventDefault(),(p=this.linkService.eventBus)==null||p.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:c,change:h,changeEx:f,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(i,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],u=>u.target.value)):i.addEventListener("input",function(u){e.setValue(t,{value:l(!0)})}),this.data.combo&&this._setTextStyle(i),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class Jb extends wt{constructor(e){const{data:t,elements:r}=e;super(e,{isRenderable:wt._hasPopupData(t)}),this.elements=r,this.popup=null}render(){this.container.classList.add("popupAnnotation");const e=this.popup=new oW({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),t=[];for(const r of this.elements)r.popup=e,t.push(r.data.id),r.addHighlightArea();return this.container.setAttribute("aria-controls",t.map(r=>`${yE}${r}`).join(",")),this.container}}class oW{constructor({container:e,color:t,elements:r,titleObj:i,modificationDate:o,contentsObj:s,richText:l,parent:c,rect:d,parentRect:u,open:f}){E(this,Od);E(this,Q1);E(this,uy);E(this,fy);E(this,hy);E(this,py);E(this,Dd);E(this,Nd);E(this,X1);E(this,Ad,I(this,hy,jN).bind(this));E(this,cy,I(this,X1,Vv).bind(this));E(this,dy,I(this,Nd,g5).bind(this));E(this,Td,I(this,Dd,m5).bind(this));E(this,l0,null);E(this,mt,null);E(this,$o,null);E(this,Id,null);E(this,q1,null);E(this,K1,null);E(this,xd,null);E(this,Vo,!1);E(this,si,null);E(this,Fo,null);E(this,G1,null);E(this,jo,null);E(this,Y1,null);E(this,c0,null);E(this,d0,!1);var h;A(this,mt,e),A(this,Y1,i),A(this,$o,s),A(this,jo,l),A(this,K1,c),A(this,l0,t),A(this,G1,d),A(this,xd,u),A(this,q1,r),A(this,Id,AE.toDateObject(o)),this.trigger=r.flatMap(p=>p.getElementsToTriggerPopup());for(const p of this.trigger)p.addEventListener("click",g(this,Td)),p.addEventListener("mouseenter",g(this,dy)),p.addEventListener("mouseleave",g(this,cy)),p.classList.add("popupTriggerArea");for(const p of r)(h=p.container)==null||h.addEventListener("keydown",g(this,Ad));g(this,mt).hidden=!0,f&&I(this,Dd,m5).call(this)}render(){if(g(this,si))return;const e=A(this,si,document.createElement("div"));if(e.className="popup",g(this,l0)){const o=e.style.outlineColor=ue.makeHexColor(...g(this,l0));CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?e.style.backgroundColor=`color-mix(in srgb, ${o} 30%, white)`:e.style.backgroundColor=ue.makeHexColor(...g(this,l0).map(l=>Math.floor(.7*(255-l)+l)))}const t=document.createElement("span");t.className="header";const r=document.createElement("h1");if(t.append(r),{dir:r.dir,str:r.textContent}=g(this,Y1),e.append(t),g(this,Id)){const o=document.createElement("span");o.classList.add("popupDate"),o.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),o.setAttribute("data-l10n-args",JSON.stringify({dateObj:g(this,Id).valueOf()})),t.append(o)}const i=g(this,Od,p5);if(i)nM.render({xfaHtml:i,intent:"richText",div:e}),e.lastChild.classList.add("richText","popupContent");else{const o=this._formatContents(g(this,$o));e.append(o)}g(this,mt).append(e)}_formatContents({str:e,dir:t}){const r=document.createElement("p");r.classList.add("popupContent"),r.dir=t;const i=e.split(/(?:\r\n?|\n)/);for(let o=0,s=i.length;o<s;++o){const l=i[o];r.append(document.createTextNode(l)),o<s-1&&r.append(document.createElement("br"))}return r}updateEdited({rect:e,popupContent:t}){var r;g(this,c0)||A(this,c0,{contentsObj:g(this,$o),richText:g(this,jo)}),e&&A(this,Fo,null),t&&(A(this,jo,I(this,fy,FN).call(this,t)),A(this,$o,null)),(r=g(this,si))==null||r.remove(),A(this,si,null)}resetEdited(){var e;g(this,c0)&&({contentsObj:Xn(this,$o)._,richText:Xn(this,jo)._}=g(this,c0),A(this,c0,null),(e=g(this,si))==null||e.remove(),A(this,si,null),A(this,Fo,null))}forceHide(){A(this,d0,this.isVisible),g(this,d0)&&(g(this,mt).hidden=!0)}maybeShow(){g(this,d0)&&(g(this,si)||I(this,Nd,g5).call(this),A(this,d0,!1),g(this,mt).hidden=!1)}get isVisible(){return g(this,mt).hidden===!1}}Ad=new WeakMap,cy=new WeakMap,dy=new WeakMap,Td=new WeakMap,l0=new WeakMap,mt=new WeakMap,$o=new WeakMap,Id=new WeakMap,q1=new WeakMap,K1=new WeakMap,xd=new WeakMap,Vo=new WeakMap,si=new WeakMap,Fo=new WeakMap,G1=new WeakMap,jo=new WeakMap,Y1=new WeakMap,c0=new WeakMap,d0=new WeakMap,Od=new WeakSet,p5=function(){const e=g(this,jo),t=g(this,$o);return!(e!=null&&e.str)||t!=null&&t.str&&t.str!==e.str?null:g(this,jo).html||null},Q1=new WeakSet,$v=function(){var e,t,r;return((r=(t=(e=g(this,Od,p5))==null?void 0:e.attributes)==null?void 0:t.style)==null?void 0:r.fontSize)||0},uy=new WeakSet,VN=function(){var e,t,r;return((r=(t=(e=g(this,Od,p5))==null?void 0:e.attributes)==null?void 0:t.style)==null?void 0:r.color)||null},fy=new WeakSet,FN=function(e){const t=[],r={str:e,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:t}]}},i={style:{color:g(this,uy,VN),fontSize:g(this,Q1,$v)?`calc(${g(this,Q1,$v)}px * var(--scale-factor))`:""}};for(const o of e.split(`
|
|
123
123
|
`))t.push({name:"span",value:o,attributes:i});return r},hy=new WeakSet,jN=function(e){e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||(e.key==="Enter"||e.key==="Escape"&&g(this,Vo))&&I(this,Dd,m5).call(this)},py=new WeakSet,zN=function(){if(g(this,Fo)!==null)return;const{page:{view:e},viewport:{rawDims:{pageWidth:t,pageHeight:r,pageX:i,pageY:o}}}=g(this,K1);let s=!!g(this,xd),l=s?g(this,xd):g(this,G1);for(const p of g(this,q1))if(!l||ue.intersect(p.data.rect,l)!==null){l=p.data.rect,s=!0;break}const c=ue.normalizeRect([l[0],e[3]-l[1]+e[1],l[2],e[3]-l[3]+e[1]]),d=s?l[2]-l[0]+5:0,u=c[0]+d,f=c[1];A(this,Fo,[100*(u-i)/t,100*(f-o)/r]);const{style:h}=g(this,mt);h.left=`${g(this,Fo)[0]}%`,h.top=`${g(this,Fo)[1]}%`},Dd=new WeakSet,m5=function(){A(this,Vo,!g(this,Vo)),g(this,Vo)?(I(this,Nd,g5).call(this),g(this,mt).addEventListener("click",g(this,Td)),g(this,mt).addEventListener("keydown",g(this,Ad))):(I(this,X1,Vv).call(this),g(this,mt).removeEventListener("click",g(this,Td)),g(this,mt).removeEventListener("keydown",g(this,Ad)))},Nd=new WeakSet,g5=function(){g(this,si)||this.render(),this.isVisible?g(this,Vo)&&g(this,mt).classList.add("focused"):(I(this,py,zN).call(this),g(this,mt).hidden=!1,g(this,mt).style.zIndex=parseInt(g(this,mt).style.zIndex)+1e3)},X1=new WeakSet,Vv=function(){g(this,mt).classList.remove("focused"),!g(this,Vo)&&this.isVisible&&(g(this,mt).hidden=!0,g(this,mt).style.zIndex=parseInt(g(this,mt).style.zIndex)-1e3)};class oM extends wt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.textContent=e.data.textContent,this.textPosition=e.data.textPosition,this.annotationEditorType=xe.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const e=document.createElement("div");e.classList.add("annotationTextContent"),e.setAttribute("role","comment");for(const t of this.textContent){const r=document.createElement("span");r.textContent=t,e.append(r)}this.container.append(e)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}class sW extends wt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0});E(this,J1,null)}render(){this.container.classList.add("lineAnnotation");const t=this.data,{width:r,height:i}=mo(t.rect),o=this.svgFactory.create(r,i,!0),s=A(this,J1,this.svgFactory.createElement("svg:line"));return s.setAttribute("x1",t.rect[2]-t.lineCoordinates[0]),s.setAttribute("y1",t.rect[3]-t.lineCoordinates[1]),s.setAttribute("x2",t.rect[2]-t.lineCoordinates[2]),s.setAttribute("y2",t.rect[3]-t.lineCoordinates[3]),s.setAttribute("stroke-width",t.borderStyle.width||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),o.append(s),this.container.append(o),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return g(this,J1)}addHighlightArea(){this.container.classList.add("highlightArea")}}J1=new WeakMap;class aW extends wt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0});E(this,eh,null)}render(){this.container.classList.add("squareAnnotation");const t=this.data,{width:r,height:i}=mo(t.rect),o=this.svgFactory.create(r,i,!0),s=t.borderStyle.width,l=A(this,eh,this.svgFactory.createElement("svg:rect"));return l.setAttribute("x",s/2),l.setAttribute("y",s/2),l.setAttribute("width",r-s),l.setAttribute("height",i-s),l.setAttribute("stroke-width",s||1),l.setAttribute("stroke","transparent"),l.setAttribute("fill","transparent"),o.append(l),this.container.append(o),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return g(this,eh)}addHighlightArea(){this.container.classList.add("highlightArea")}}eh=new WeakMap;class lW extends wt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0});E(this,th,null)}render(){this.container.classList.add("circleAnnotation");const t=this.data,{width:r,height:i}=mo(t.rect),o=this.svgFactory.create(r,i,!0),s=t.borderStyle.width,l=A(this,th,this.svgFactory.createElement("svg:ellipse"));return l.setAttribute("cx",r/2),l.setAttribute("cy",i/2),l.setAttribute("rx",r/2-s/2),l.setAttribute("ry",i/2-s/2),l.setAttribute("stroke-width",s||1),l.setAttribute("stroke","transparent"),l.setAttribute("fill","transparent"),o.append(l),this.container.append(o),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return g(this,th)}addHighlightArea(){this.container.classList.add("highlightArea")}}th=new WeakMap;class sM extends wt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0});E(this,nh,null);this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const{data:{rect:t,vertices:r,borderStyle:i,popupRef:o}}=this;if(!r)return this.container;const{width:s,height:l}=mo(t),c=this.svgFactory.create(s,l,!0);let d=[];for(let f=0,h=r.length;f<h;f+=2){const p=r[f]-t[0],m=t[3]-r[f+1];d.push(`${p},${m}`)}d=d.join(" ");const u=A(this,nh,this.svgFactory.createElement(this.svgElementName));return u.setAttribute("points",d),u.setAttribute("stroke-width",i.width||1),u.setAttribute("stroke","transparent"),u.setAttribute("fill","transparent"),c.append(u),this.container.append(c),!o&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return g(this,nh)}addHighlightArea(){this.container.classList.add("highlightArea")}}nh=new WeakMap;class cW extends sM{constructor(e){super(e),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class dW extends wt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class aM extends wt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0});E(this,rh,[]);this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=xe.INK}render(){this.container.classList.add(this.containerClassName);const{data:{rect:t,inkLists:r,borderStyle:i,popupRef:o}}=this,{width:s,height:l}=mo(t),c=this.svgFactory.create(s,l,!0);for(const d of r){let u=[];for(let h=0,p=d.length;h<p;h+=2){const m=d[h]-t[0],y=t[3]-d[h+1];u.push(`${m},${y}`)}u=u.join(" ");const f=this.svgFactory.createElement(this.svgElementName);g(this,rh).push(f),f.setAttribute("points",u),f.setAttribute("stroke-width",i.width||1),f.setAttribute("stroke","transparent"),f.setAttribute("fill","transparent"),!o&&this.hasPopupData&&this._createPopup(),c.append(f)}return this.container.append(c),this.container}getElementsToTriggerPopup(){return g(this,rh)}addHighlightArea(){this.container.classList.add("highlightArea")}}rh=new WeakMap;class uW extends wt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this.container}}class fW extends wt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}class hW extends wt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}class pW extends wt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),this.container}}class lM extends wt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("stampAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class mW extends wt{constructor(t){var i;super(t,{isRenderable:!0});E(this,oh);E(this,ih,null);const{file:r}=this.data;this.filename=r.filename,this.content=r.content,(i=this.linkService.eventBus)==null||i.dispatch("fileattachmentannotation",{source:this,...r})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:t,data:r}=this;let i;r.hasAppearance||r.fillAlpha===0?i=document.createElement("div"):(i=document.createElement("img"),i.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(r.name)?"paperclip":"pushpin"}.svg`,r.fillAlpha&&r.fillAlpha<1&&(i.style=`filter: opacity(${Math.round(100*r.fillAlpha)}%);`)),i.addEventListener("dblclick",I(this,oh,Fv).bind(this)),A(this,ih,i);const{isMac:o}=jn.platform;return t.addEventListener("keydown",s=>{s.key==="Enter"&&(o?s.metaKey:s.ctrlKey)&&I(this,oh,Fv).call(this)}),!r.popupRef&&this.hasPopupData?this._createPopup():i.classList.add("popupTriggerArea"),t.append(i),t}getElementsToTriggerPopup(){return g(this,ih)}addHighlightArea(){this.container.classList.add("highlightArea")}}ih=new WeakMap,oh=new WeakSet,Fv=function(){var t;(t=this.downloadManager)==null||t.openOrDownloadData(this.content,this.filename)};class gW{constructor({div:e,accessibilityManager:t,annotationCanvasMap:r,annotationEditorUIManager:i,page:o,viewport:s}){E(this,my);E(this,ah);E(this,sh,null);E(this,u0,null);E(this,f0,new Map);this.div=e,A(this,sh,t),A(this,u0,r),this.page=o,this.viewport=s,this.zIndex=0,this._annotationEditorUIManager=i}hasEditableAnnotations(){return g(this,f0).size>0}async render(e){var s;const{annotations:t}=e,r=this.div;Ga(r,this.viewport);const i=new Map,o={data:null,layer:r,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:e.renderForms!==!1,svgFactory:new Nb,annotationStorage:e.annotationStorage||new Fb,enableScripting:e.enableScripting===!0,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,parent:this,elements:null};for(const l of t){if(l.noHTML)continue;const c=l.annotationType===hE;if(c){const f=i.get(l.id);if(!f)continue;o.elements=f}else{const{width:f,height:h}=mo(l.rect);if(f<=0||h<=0)continue}o.data=l;const d=XZ.create(o);if(!d.isRenderable)continue;if(!c&&l.popupRef){const f=i.get(l.popupRef);f?f.push(d):i.set(l.popupRef,[d])}const u=d.render();l.hidden&&(u.style.visibility="hidden"),I(this,my,HN).call(this,u,l.id),d._isEditable&&(g(this,f0).set(d.data.id,d),(s=this._annotationEditorUIManager)==null||s.renderAnnotationElement(d))}I(this,ah,jv).call(this)}update({viewport:e}){const t=this.div;this.viewport=e,Ga(t,{rotation:e.rotation}),I(this,ah,jv).call(this),t.hidden=!1}getEditableAnnotations(){return Array.from(g(this,f0).values())}getEditableAnnotation(e){return g(this,f0).get(e)}}sh=new WeakMap,u0=new WeakMap,f0=new WeakMap,my=new WeakSet,HN=function(e,t){var i;const r=e.firstChild||e;r.id=`${yE}${t}`,this.div.append(e),(i=g(this,sh))==null||i.moveElementInDOM(this.div,e,r,!1)},ah=new WeakSet,jv=function(){if(!g(this,u0))return;const e=this.div;for(const[t,r]of g(this,u0)){const i=e.querySelector(`[data-annotation-id="${t}"]`);if(!i)continue;r.className="annotationContent";const{firstChild:o}=i;o?o.nodeName==="CANVAS"?o.replaceWith(r):o.classList.contains("annotationContent")?o.after(r):o.before(r):i.append(r)}g(this,u0).clear()};const vm=/\r\n?|\n/g,Xe=class Xe extends He{constructor(t){super({...t,name:"freeTextEditor"});E(this,gy);E(this,yy);E(this,by);E(this,Ld);E(this,_d);E(this,wy);E(this,vy);E(this,ai,void 0);E(this,fr,"");E(this,lh,`${this.id}-editor`);E(this,h0,null);E(this,hr,void 0);E(this,Pd,null);A(this,ai,t.color||Xe._defaultColor||He._defaultLineColor),A(this,hr,t.fontSize||Xe._defaultFontSize)}static get _keyboardManager(){const t=Xe.prototype,r=s=>s.isEmpty(),i=Ya.TRANSLATE_SMALL,o=Ya.TRANSLATE_BIG;return De(this,"_keyboardManager",new p2([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],t.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],t.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],t._translateEmpty,{args:[-i,0],checker:r}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t._translateEmpty,{args:[-o,0],checker:r}],[["ArrowRight","mac+ArrowRight"],t._translateEmpty,{args:[i,0],checker:r}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t._translateEmpty,{args:[o,0],checker:r}],[["ArrowUp","mac+ArrowUp"],t._translateEmpty,{args:[0,-i],checker:r}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t._translateEmpty,{args:[0,-o],checker:r}],[["ArrowDown","mac+ArrowDown"],t._translateEmpty,{args:[0,i],checker:r}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t._translateEmpty,{args:[0,o],checker:r}]]))}static initialize(t,r){He.initialize(t,r,{strings:["pdfjs-free-text-default-content"]});const i=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(i.getPropertyValue("--freetext-padding"))}static updateDefaultParams(t,r){switch(t){case ye.FREETEXT_SIZE:Xe._defaultFontSize=r;break;case ye.FREETEXT_COLOR:Xe._defaultColor=r}}updateParams(t,r){switch(t){case ye.FREETEXT_SIZE:I(this,gy,UN).call(this,r);break;case ye.FREETEXT_COLOR:I(this,yy,ZN).call(this,r)}}static get defaultPropertiesToUpdate(){return[[ye.FREETEXT_SIZE,Xe._defaultFontSize],[ye.FREETEXT_COLOR,Xe._defaultColor||He._defaultLineColor]]}get propertiesToUpdate(){return[[ye.FREETEXT_SIZE,g(this,hr)],[ye.FREETEXT_COLOR,g(this,ai)]]}_translateEmpty(t,r){this._uiManager.translateSelectedEditors(t,r,!0)}getInitialTranslation(){const t=this.parentScale;return[-Xe._internalPadding*t,-(Xe._internalPadding+g(this,hr))*t]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(this.isInEditMode())return;this.parent.setEditingState(!1),this.parent.updateToolbar(xe.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),A(this,h0,new AbortController);const t=this._uiManager.combinedSignal(g(this,h0));this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:t}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:t}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:t}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:t}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:t})}disableEditMode(){var t;this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",g(this,lh)),this._isDraggable=!0,(t=g(this,h0))==null||t.abort(),A(this,h0,null),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"))}focusin(t){this._focusEventsAllowed&&(super.focusin(t),t.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(){var t;this.width||(this.enableEditMode(),this.editorDiv.focus(),(t=this._initialOptions)!=null&&t.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const t=g(this,fr),r=A(this,fr,I(this,by,WN).call(this).trimEnd());if(t===r)return;const i=o=>{A(this,fr,o),o?(I(this,_d,w5).call(this),this._uiManager.rebuild(this),I(this,Ld,y5).call(this)):this.remove()};this.addCommands({cmd:()=>{i(r)},undo:()=>{i(t)},mustExec:!1}),I(this,Ld,y5).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(t){this.enterInEditMode()}keydown(t){t.target===this.div&&t.key==="Enter"&&(this.enterInEditMode(),t.preventDefault())}editorDivKeydown(t){Xe._keyboardManager.exec(this,t)}editorDivFocus(t){this.isEditing=!0}editorDivBlur(t){this.isEditing=!1}editorDivInput(t){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let t,r;this.width&&(t=this.x,r=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",g(this,lh)),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text"),this.enableEditing(),He._l10nPromise.get("pdfjs-free-text-default-content").then(o=>{var s;return(s=this.editorDiv)==null?void 0:s.setAttribute("default-content",o)}),this.editorDiv.contentEditable=!0;const{style:i}=this.editorDiv;if(i.fontSize=`calc(${g(this,hr)}px * var(--scale-factor))`,i.color=g(this,ai),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),hm(this,this.div,["dblclick","keydown"]),this.width){const[o,s]=this.parentDimensions;if(this.annotationElementId){const{position:l}=g(this,Pd);let[c,d]=this.getInitialTranslation();[c,d]=this.pageTranslationToScreen(c,d);const[u,f]=this.pageDimensions,[h,p]=this.pageTranslation;let m,y;switch(this.rotation){case 0:m=t+(l[0]-h)/u,y=r+this.height-(l[1]-p)/f;break;case 90:m=t+(l[0]-h)/u,y=r-(l[1]-p)/f,[c,d]=[d,-c];break;case 180:m=t-this.width+(l[0]-h)/u,y=r-(l[1]-p)/f,[c,d]=[-c,-d];break;case 270:m=t+(l[0]-h-this.height*f)/u,y=r+(l[1]-p-this.width*u)/f,[c,d]=[-d,c]}this.setAt(m*o,y*s,c,d)}else this.setAt(t*o,r*s,this.width*o,this.height*s);I(this,_d,w5).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}editorDivPaste(t){var m,y,b;const r=t.clipboardData||window.clipboardData,{types:i}=r;if(i.length===1&&i[0]==="text/plain")return;t.preventDefault();const o=I(m=Xe,ch,zv).call(m,r.getData("text")||"").replaceAll(vm,`
|
|
124
124
|
`);if(!o)return;const s=window.getSelection();if(!s.rangeCount)return;this.editorDiv.normalize(),s.deleteFromDocument();const l=s.getRangeAt(0);if(!o.includes(`
|
|
@@ -224,7 +224,7 @@ img.ProseMirror-separator {
|
|
|
224
224
|
`)}function wI(n){return[kJ(n),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var Q2;process.env.NODE_ENV!=="production"&&SJ();function SJ(){Q2=new Set}function Co(n,e){if(n&&!Q2.has(e)){var t;Q2.add(e),(t=console).warn.apply(t,wI(e))}}function T7(n,e){if(n&&!Q2.has(e)){var t;Q2.add(e),(t=console).error.apply(t,wI(e))}}function EJ(n){var e=!n,t=Object.prototype.toString.call(n)==="[object Object]"&&!n.addEventListener;T7(e,["tippy() was passed","`"+String(n)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),T7(t,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var vI={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},MJ={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},lr=Object.assign({appendTo:cI,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},vI,MJ),AJ=Object.keys(lr),TJ=function(e){process.env.NODE_ENV!=="production"&&SI(e,[]);var t=Object.keys(e);t.forEach(function(r){lr[r]=e[r]})};function CI(n){var e=n.plugins||[],t=e.reduce(function(r,i){var o=i.name,s=i.defaultValue;if(o){var l;r[o]=n[o]!==void 0?n[o]:(l=lr[o])!=null?l:s}return r},{});return Object.assign({},n,t)}function IJ(n,e){var t=e?Object.keys(CI(Object.assign({},lr,{plugins:e}))):AJ,r=t.reduce(function(i,o){var s=(n.getAttribute("data-tippy-"+o)||"").trim();if(!s)return i;if(o==="content")i[o]=s;else try{i[o]=JSON.parse(s)}catch{i[o]=s}return i},{});return r}function kI(n,e){var t=Object.assign({},e,{content:dI(e.content,[n])},e.ignoreAttributes?{}:IJ(n,e.plugins));return t.aria=Object.assign({},lr.aria,t.aria),t.aria={expanded:t.aria.expanded==="auto"?e.interactive:t.aria.expanded,content:t.aria.content==="auto"?e.interactive?null:"describedby":t.aria.content},t}function SI(n,e){n===void 0&&(n={}),e===void 0&&(e=[]);var t=Object.keys(n);t.forEach(function(r){var i=aJ(lr,Object.keys(vI)),o=!sJ(i,r);o&&(o=e.filter(function(s){return s.name===r}).length===0),Co(o,["`"+r+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
|
|
225
225
|
|
|
226
226
|
`,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
|
|
227
|
-
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var xJ=function(){return"innerHTML"};function I7(n,e){n[xJ()]=e}function EI(n){var e=G2();return n===!0?e.className=aI:(e.className=lI,Y2(n)?e.appendChild(n):I7(e,n)),e}function MI(n,e){Y2(e.content)?(I7(n,""),n.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?I7(n,e.content):n.textContent=e.content)}function x7(n){var e=n.firstElementChild,t=sg(e.children);return{box:e,content:t.find(function(r){return r.classList.contains(sI)}),arrow:t.find(function(r){return r.classList.contains(aI)||r.classList.contains(lI)}),backdrop:t.find(function(r){return r.classList.contains(oJ)})}}function AI(n){var e=G2(),t=G2();t.className=iJ,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var r=G2();r.className=sI,r.setAttribute("data-state","hidden"),MI(r,n.props),e.appendChild(t),t.appendChild(r),i(n.props,n.props);function i(o,s){var l=x7(e),c=l.box,d=l.content,u=l.arrow;s.theme?c.setAttribute("data-theme",s.theme):c.removeAttribute("data-theme"),typeof s.animation=="string"?c.setAttribute("data-animation",s.animation):c.removeAttribute("data-animation"),s.inertia?c.setAttribute("data-inertia",""):c.removeAttribute("data-inertia"),c.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?c.setAttribute("role",s.role):c.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&MI(d,n.props),s.arrow?u?o.arrow!==s.arrow&&(c.removeChild(u),c.appendChild(EI(s.arrow))):c.appendChild(EI(s.arrow)):u&&c.removeChild(u)}return{popper:e,onUpdate:i}}AI.$$tippy=!0;var OJ=1,ag=[],O7=[];function DJ(n,e){var t=kI(n,Object.assign({},lr,CI(hI(e)))),r,i,o,s=!1,l=!1,c=!1,d=!1,u,f,h,p=[],m=uI(cn,t.interactiveDebounce),y,b=OJ++,w=null,v=cJ(t.plugins),k={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},C={id:b,reference:n,popper:G2(),popperInstance:w,props:t,state:k,plugins:v,clearDelayTimeouts:q,setProps:Q,setContent:Ie,show:ut,hide:es,hideWithInteractivity:du,enable:pi,disable:Qe,unmount:xa,destroy:ts};if(!t.render)return process.env.NODE_ENV!=="production"&&T7(!0,"render() function has not been supplied."),C;var T=t.render(C),S=T.popper,M=T.onUpdate;S.setAttribute("data-tippy-root",""),S.id="tippy-"+C.id,C.popper=S,n._tippy=C,S._tippy=C;var x=v.map(function(K){return K.fn(C)}),O=n.hasAttribute("aria-expanded");return me(),G(),U(),F("onCreate",[C]),t.showOnCreate&&ro(),S.addEventListener("mouseenter",function(){C.props.interactive&&C.state.isVisible&&C.clearDelayTimeouts()}),S.addEventListener("mouseleave",function(){C.props.interactive&&C.props.trigger.indexOf("mouseenter")>=0&&H().addEventListener("mousemove",m)}),C;function P(){var K=C.props.touch;return Array.isArray(K)?K:[K,0]}function N(){return P()[0]==="hold"}function _(){var K;return!!((K=C.props.render)!=null&&K.$$tippy)}function V(){return y||n}function H(){var K=V().parentNode;return K?mJ(K):document}function L(){return x7(S)}function D(K){return C.state.isMounted&&!C.state.isVisible||Ai.isTouch||u&&u.type==="focus"?0:S7(C.props.delay,K?0:1,lr.delay)}function U(K){K===void 0&&(K=!1),S.style.pointerEvents=C.props.interactive&&!K?"":"none",S.style.zIndex=""+C.props.zIndex}function F(K,ce,ge){if(ge===void 0&&(ge=!0),x.forEach(function(Re){Re[K]&&Re[K].apply(Re,ce)}),ge){var We;(We=C.props)[K].apply(We,ce)}}function R(){var K=C.props.aria;if(K.content){var ce="aria-"+K.content,ge=S.id,We=Ac(C.props.triggerTarget||n);We.forEach(function(Re){var Ln=Re.getAttribute(ce);if(C.state.isVisible)Re.setAttribute(ce,Ln?Ln+" "+ge:ge);else{var zr=Ln&&Ln.replace(ge,"").trim();zr?Re.setAttribute(ce,zr):Re.removeAttribute(ce)}})}}function G(){if(!(O||!C.props.aria.expanded)){var K=Ac(C.props.triggerTarget||n);K.forEach(function(ce){C.props.interactive?ce.setAttribute("aria-expanded",C.state.isVisible&&ce===V()?"true":"false"):ce.removeAttribute("aria-expanded")})}}function ne(){H().removeEventListener("mousemove",m),ag=ag.filter(function(K){return K!==m})}function Y(K){if(!(Ai.isTouch&&(c||K.type==="mousedown"))){var ce=K.composedPath&&K.composedPath()[0]||K.target;if(!(C.props.interactive&&mI(S,ce))){if(Ac(C.props.triggerTarget||n).some(function(ge){return mI(ge,ce)})){if(Ai.isTouch||C.state.isVisible&&C.props.trigger.indexOf("click")>=0)return}else F("onClickOutside",[C,K]);C.props.hideOnClick===!0&&(C.clearDelayTimeouts(),C.hide(),l=!0,setTimeout(function(){l=!1}),C.state.isMounted||W())}}}function Z(){c=!0}function j(){c=!1}function $(){var K=H();K.addEventListener("mousedown",Y,!0),K.addEventListener("touchend",Y,ml),K.addEventListener("touchstart",j,ml),K.addEventListener("touchmove",Z,ml)}function W(){var K=H();K.removeEventListener("mousedown",Y,!0),K.removeEventListener("touchend",Y,ml),K.removeEventListener("touchstart",j,ml),K.removeEventListener("touchmove",Z,ml)}function J(K,ce){oe(K,function(){!C.state.isVisible&&S.parentNode&&S.parentNode.contains(S)&&ce()})}function ae(K,ce){oe(K,ce)}function oe(K,ce){var ge=L().box;function We(Re){Re.target===ge&&(A7(ge,"remove",We),ce())}if(K===0)return ce();A7(ge,"remove",f),A7(ge,"add",We),f=We}function se(K,ce,ge){ge===void 0&&(ge=!1);var We=Ac(C.props.triggerTarget||n);We.forEach(function(Re){Re.addEventListener(K,ce,ge),p.push({node:Re,eventType:K,handler:ce,options:ge})})}function me(){N()&&(se("touchstart",dt,{passive:!0}),se("touchend",vn,{passive:!0})),lJ(C.props.trigger).forEach(function(K){if(K!=="manual")switch(se(K,dt),K){case"mouseenter":se("mouseleave",vn);break;case"focus":se(CJ?"focusout":"blur",Lt);break;case"focusin":se("focusout",Lt);break}})}function _e(){p.forEach(function(K){var ce=K.node,ge=K.eventType,We=K.handler,Re=K.options;ce.removeEventListener(ge,We,Re)}),p=[]}function dt(K){var ce,ge=!1;if(!(!C.state.isEnabled||Nn(K)||l)){var We=((ce=u)==null?void 0:ce.type)==="focus";u=K,y=K.currentTarget,G(),!C.state.isVisible&&fJ(K)&&ag.forEach(function(Re){return Re(K)}),K.type==="click"&&(C.props.trigger.indexOf("mouseenter")<0||s)&&C.props.hideOnClick!==!1&&C.state.isVisible?ge=!0:ro(K),K.type==="click"&&(s=!ge),ge&&!We&&jr(K)}}function cn(K){var ce=K.target,ge=V().contains(ce)||S.contains(ce);if(!(K.type==="mousemove"&&ge)){var We=Pn().concat(S).map(function(Re){var Ln,zr=Re._tippy,uu=(Ln=zr.popperInstance)==null?void 0:Ln.state;return uu?{popperRect:Re.getBoundingClientRect(),popperState:uu,props:t}:null}).filter(Boolean);gJ(We,K)&&(ne(),jr(K))}}function vn(K){var ce=Nn(K)||C.props.trigger.indexOf("click")>=0&&s;if(!ce){if(C.props.interactive){C.hideWithInteractivity(K);return}jr(K)}}function Lt(K){C.props.trigger.indexOf("focusin")<0&&K.target!==V()||C.props.interactive&&K.relatedTarget&&S.contains(K.relatedTarget)||jr(K)}function Nn(K){return Ai.isTouch?N()!==K.type.indexOf("touch")>=0:!1}function hi(){Ia();var K=C.props,ce=K.popperOptions,ge=K.placement,We=K.offset,Re=K.getReferenceClientRect,Ln=K.moveTransition,zr=_()?x7(S).arrow:null,uu=Re?{getBoundingClientRect:Re,contextElement:Re.contextElement||V()}:n,iN={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e5){var fu=e5.state;if(_()){var
|
|
227
|
+
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var xJ=function(){return"innerHTML"};function I7(n,e){n[xJ()]=e}function EI(n){var e=G2();return n===!0?e.className=aI:(e.className=lI,Y2(n)?e.appendChild(n):I7(e,n)),e}function MI(n,e){Y2(e.content)?(I7(n,""),n.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?I7(n,e.content):n.textContent=e.content)}function x7(n){var e=n.firstElementChild,t=sg(e.children);return{box:e,content:t.find(function(r){return r.classList.contains(sI)}),arrow:t.find(function(r){return r.classList.contains(aI)||r.classList.contains(lI)}),backdrop:t.find(function(r){return r.classList.contains(oJ)})}}function AI(n){var e=G2(),t=G2();t.className=iJ,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var r=G2();r.className=sI,r.setAttribute("data-state","hidden"),MI(r,n.props),e.appendChild(t),t.appendChild(r),i(n.props,n.props);function i(o,s){var l=x7(e),c=l.box,d=l.content,u=l.arrow;s.theme?c.setAttribute("data-theme",s.theme):c.removeAttribute("data-theme"),typeof s.animation=="string"?c.setAttribute("data-animation",s.animation):c.removeAttribute("data-animation"),s.inertia?c.setAttribute("data-inertia",""):c.removeAttribute("data-inertia"),c.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?c.setAttribute("role",s.role):c.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&MI(d,n.props),s.arrow?u?o.arrow!==s.arrow&&(c.removeChild(u),c.appendChild(EI(s.arrow))):c.appendChild(EI(s.arrow)):u&&c.removeChild(u)}return{popper:e,onUpdate:i}}AI.$$tippy=!0;var OJ=1,ag=[],O7=[];function DJ(n,e){var t=kI(n,Object.assign({},lr,CI(hI(e)))),r,i,o,s=!1,l=!1,c=!1,d=!1,u,f,h,p=[],m=uI(cn,t.interactiveDebounce),y,b=OJ++,w=null,v=cJ(t.plugins),k={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},C={id:b,reference:n,popper:G2(),popperInstance:w,props:t,state:k,plugins:v,clearDelayTimeouts:q,setProps:Q,setContent:Ie,show:ut,hide:es,hideWithInteractivity:du,enable:pi,disable:Qe,unmount:xa,destroy:ts};if(!t.render)return process.env.NODE_ENV!=="production"&&T7(!0,"render() function has not been supplied."),C;var T=t.render(C),S=T.popper,M=T.onUpdate;S.setAttribute("data-tippy-root",""),S.id="tippy-"+C.id,C.popper=S,n._tippy=C,S._tippy=C;var x=v.map(function(K){return K.fn(C)}),O=n.hasAttribute("aria-expanded");return me(),G(),U(),F("onCreate",[C]),t.showOnCreate&&ro(),S.addEventListener("mouseenter",function(){C.props.interactive&&C.state.isVisible&&C.clearDelayTimeouts()}),S.addEventListener("mouseleave",function(){C.props.interactive&&C.props.trigger.indexOf("mouseenter")>=0&&H().addEventListener("mousemove",m)}),C;function P(){var K=C.props.touch;return Array.isArray(K)?K:[K,0]}function N(){return P()[0]==="hold"}function _(){var K;return!!((K=C.props.render)!=null&&K.$$tippy)}function V(){return y||n}function H(){var K=V().parentNode;return K?mJ(K):document}function L(){return x7(S)}function D(K){return C.state.isMounted&&!C.state.isVisible||Ai.isTouch||u&&u.type==="focus"?0:S7(C.props.delay,K?0:1,lr.delay)}function U(K){K===void 0&&(K=!1),S.style.pointerEvents=C.props.interactive&&!K?"":"none",S.style.zIndex=""+C.props.zIndex}function F(K,ce,ge){if(ge===void 0&&(ge=!0),x.forEach(function(Re){Re[K]&&Re[K].apply(Re,ce)}),ge){var We;(We=C.props)[K].apply(We,ce)}}function R(){var K=C.props.aria;if(K.content){var ce="aria-"+K.content,ge=S.id,We=Ac(C.props.triggerTarget||n);We.forEach(function(Re){var Ln=Re.getAttribute(ce);if(C.state.isVisible)Re.setAttribute(ce,Ln?Ln+" "+ge:ge);else{var zr=Ln&&Ln.replace(ge,"").trim();zr?Re.setAttribute(ce,zr):Re.removeAttribute(ce)}})}}function G(){if(!(O||!C.props.aria.expanded)){var K=Ac(C.props.triggerTarget||n);K.forEach(function(ce){C.props.interactive?ce.setAttribute("aria-expanded",C.state.isVisible&&ce===V()?"true":"false"):ce.removeAttribute("aria-expanded")})}}function ne(){H().removeEventListener("mousemove",m),ag=ag.filter(function(K){return K!==m})}function Y(K){if(!(Ai.isTouch&&(c||K.type==="mousedown"))){var ce=K.composedPath&&K.composedPath()[0]||K.target;if(!(C.props.interactive&&mI(S,ce))){if(Ac(C.props.triggerTarget||n).some(function(ge){return mI(ge,ce)})){if(Ai.isTouch||C.state.isVisible&&C.props.trigger.indexOf("click")>=0)return}else F("onClickOutside",[C,K]);C.props.hideOnClick===!0&&(C.clearDelayTimeouts(),C.hide(),l=!0,setTimeout(function(){l=!1}),C.state.isMounted||W())}}}function Z(){c=!0}function j(){c=!1}function $(){var K=H();K.addEventListener("mousedown",Y,!0),K.addEventListener("touchend",Y,ml),K.addEventListener("touchstart",j,ml),K.addEventListener("touchmove",Z,ml)}function W(){var K=H();K.removeEventListener("mousedown",Y,!0),K.removeEventListener("touchend",Y,ml),K.removeEventListener("touchstart",j,ml),K.removeEventListener("touchmove",Z,ml)}function J(K,ce){oe(K,function(){!C.state.isVisible&&S.parentNode&&S.parentNode.contains(S)&&ce()})}function ae(K,ce){oe(K,ce)}function oe(K,ce){var ge=L().box;function We(Re){Re.target===ge&&(A7(ge,"remove",We),ce())}if(K===0)return ce();A7(ge,"remove",f),A7(ge,"add",We),f=We}function se(K,ce,ge){ge===void 0&&(ge=!1);var We=Ac(C.props.triggerTarget||n);We.forEach(function(Re){Re.addEventListener(K,ce,ge),p.push({node:Re,eventType:K,handler:ce,options:ge})})}function me(){N()&&(se("touchstart",dt,{passive:!0}),se("touchend",vn,{passive:!0})),lJ(C.props.trigger).forEach(function(K){if(K!=="manual")switch(se(K,dt),K){case"mouseenter":se("mouseleave",vn);break;case"focus":se(CJ?"focusout":"blur",Lt);break;case"focusin":se("focusout",Lt);break}})}function _e(){p.forEach(function(K){var ce=K.node,ge=K.eventType,We=K.handler,Re=K.options;ce.removeEventListener(ge,We,Re)}),p=[]}function dt(K){var ce,ge=!1;if(!(!C.state.isEnabled||Nn(K)||l)){var We=((ce=u)==null?void 0:ce.type)==="focus";u=K,y=K.currentTarget,G(),!C.state.isVisible&&fJ(K)&&ag.forEach(function(Re){return Re(K)}),K.type==="click"&&(C.props.trigger.indexOf("mouseenter")<0||s)&&C.props.hideOnClick!==!1&&C.state.isVisible?ge=!0:ro(K),K.type==="click"&&(s=!ge),ge&&!We&&jr(K)}}function cn(K){var ce=K.target,ge=V().contains(ce)||S.contains(ce);if(!(K.type==="mousemove"&&ge)){var We=Pn().concat(S).map(function(Re){var Ln,zr=Re._tippy,uu=(Ln=zr.popperInstance)==null?void 0:Ln.state;return uu?{popperRect:Re.getBoundingClientRect(),popperState:uu,props:t}:null}).filter(Boolean);gJ(We,K)&&(ne(),jr(K))}}function vn(K){var ce=Nn(K)||C.props.trigger.indexOf("click")>=0&&s;if(!ce){if(C.props.interactive){C.hideWithInteractivity(K);return}jr(K)}}function Lt(K){C.props.trigger.indexOf("focusin")<0&&K.target!==V()||C.props.interactive&&K.relatedTarget&&S.contains(K.relatedTarget)||jr(K)}function Nn(K){return Ai.isTouch?N()!==K.type.indexOf("touch")>=0:!1}function hi(){Ia();var K=C.props,ce=K.popperOptions,ge=K.placement,We=K.offset,Re=K.getReferenceClientRect,Ln=K.moveTransition,zr=_()?x7(S).arrow:null,uu=Re?{getBoundingClientRect:Re,contextElement:Re.contextElement||V()}:n,iN={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e5){var fu=e5.state;if(_()){var d1e=L(),uv=d1e.box;["placement","reference-hidden","escaped"].forEach(function(t5){t5==="placement"?uv.setAttribute("data-placement",fu.placement):fu.attributes.popper["data-popper-"+t5]?uv.setAttribute("data-"+t5,""):uv.removeAttribute("data-"+t5)}),fu.attributes.popper={}}}},_0=[{name:"offset",options:{offset:We}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Ln}},iN];_()&&zr&&_0.push({name:"arrow",options:{element:zr,padding:3}}),_0.push.apply(_0,(ce==null?void 0:ce.modifiers)||[]),C.popperInstance=rJ(uu,S,Object.assign({},ce,{placement:ge,onFirstUpdate:h,modifiers:_0}))}function Ia(){C.popperInstance&&(C.popperInstance.destroy(),C.popperInstance=null)}function Bt(){var K=C.props.appendTo,ce,ge=V();C.props.interactive&&K===cI||K==="parent"?ce=ge.parentNode:ce=dI(K,[ge]),ce.contains(S)||ce.appendChild(S),C.state.isMounted=!0,hi(),process.env.NODE_ENV!=="production"&&Co(C.props.interactive&&K===lr.appendTo&&ge.nextElementSibling!==S,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
|
|
228
228
|
|
|
229
229
|
`,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
|
|
230
230
|
|
|
@@ -399,7 +399,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
`);this.responsiveStyleElement.innerHTML=o}},destroyResponsiveStyle:function(){this.responsiveStyleElement&&(document.head.removeChild(this.responsiveStyleElement),this.responsiveStyleElement=null)},destroyStyleElement:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},dataToRender:function(e){var t=e||this.processedData;if(t&&this.paginator){var r=this.lazy?0:this.d_first;return t.slice(r,r+this.d_rows)}return t},getVirtualScrollerRef:function(){return this.$refs.virtualScroller},hasSpacerStyle:function(e){return z.isNotEmpty(e)}},computed:{columns:function(){var e=this.d_columns.get(this);if(this.reorderableColumns&&this.d_columnOrder){var t=[],r=$f(this.d_columnOrder),i;try{for(r.s();!(i=r.n()).done;){var o=i.value,s=this.findColumnByKey(e,o);s&&!this.columnProp(s,"hidden")&&t.push(s)}}catch(l){r.e(l)}finally{r.f()}return[].concat(t,tt(e.filter(function(l){return t.indexOf(l)<0})))}return e},columnGroups:function(){return this.d_columnGroups.get(this)},headerColumnGroup:function(){var e,t=this;return(e=this.columnGroups)===null||e===void 0?void 0:e.find(function(r){return t.columnProp(r,"type")==="header"})},footerColumnGroup:function(){var e,t=this;return(e=this.columnGroups)===null||e===void 0?void 0:e.find(function(r){return t.columnProp(r,"type")==="footer"})},hasFilters:function(){return this.filters&&Object.keys(this.filters).length>0&&this.filters.constructor===Object},processedData:function(){var e,t=this.value||[];return!this.lazy&&!((e=this.virtualScrollerOptions)!==null&&e!==void 0&&e.lazy)&&t&&t.length&&(this.hasFilters&&(t=this.filter(t)),this.sorted&&(this.sortMode==="single"?t=this.sortSingle(t):this.sortMode==="multiple"&&(t=this.sortMultiple(t)))),t},totalRecordsLength:function(){if(this.lazy)return this.totalRecords;var e=this.processedData;return e?e.length:0},empty:function(){var e=this.processedData;return!e||e.length===0},paginatorTop:function(){return this.paginator&&(this.paginatorPosition!=="bottom"||this.paginatorPosition==="both")},paginatorBottom:function(){return this.paginator&&(this.paginatorPosition!=="top"||this.paginatorPosition==="both")},sorted:function(){return this.d_sortField||this.d_multiSortMeta&&this.d_multiSortMeta.length>0},allRowsSelected:function(){var e=this;if(this.selectAll!==null)return this.selectAll;var t=this.frozenValue?[].concat(tt(this.frozenValue),tt(this.processedData)):this.processedData;return z.isNotEmpty(t)&&this.selection&&Array.isArray(this.selection)&&t.every(function(r){return e.selection.some(function(i){return e.equals(i,r)})})},attributeSelector:function(){return Hr()},groupRowSortField:function(){return this.sortMode==="single"?this.sortField:this.d_groupRowsSortMeta?this.d_groupRowsSortMeta.field:null},virtualScrollerDisabled:function(){return z.isEmpty(this.virtualScrollerOptions)||!this.scrollable}},components:{DTPaginator:dD,DTTableHeader:VD,DTTableBody:AD,DTTableFooter:DD,DTVirtualScroller:Zw,ArrowDownIcon:NO,ArrowUpIcon:PO,SpinnerIcon:hf}};function Vf(n){"@babel/helpers - typeof";return Vf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vf(n)}function UD(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function ZD(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?UD(Object(t),!0).forEach(function(r){$2e(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):UD(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function $2e(n,e,t){return e=V2e(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function V2e(n){var e=F2e(n,"string");return Vf(e)=="symbol"?e:String(e)}function F2e(n,e){if(Vf(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(Vf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function j2e(n,e,t,r,i,o){var s=a.resolveComponent("SpinnerIcon"),l=a.resolveComponent("DTPaginator"),c=a.resolveComponent("DTTableHeader"),d=a.resolveComponent("DTTableBody"),u=a.resolveComponent("DTTableFooter"),f=a.resolveComponent("DTVirtualScroller");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:n.cx("root"),"data-scrollselectors":".p-datatable-wrapper"},n.ptmi("root")),[a.renderSlot(n.$slots,"default"),n.loading?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,class:n.cx("loadingOverlay")},n.ptm("loadingOverlay")),[n.$slots.loading?a.renderSlot(n.$slots,"loading",{key:0}):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[n.$slots.loadingicon?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.$slots.loadingicon),{key:0,class:a.normalizeClass(n.cx("loadingIcon"))},null,8,["class"])):n.loadingIcon?(a.openBlock(),a.createElementBlock("i",a.mergeProps({key:1,class:[n.cx("loadingIcon"),"pi-spin",n.loadingIcon]},n.ptm("loadingIcon")),null,16)):(a.openBlock(),a.createBlock(s,a.mergeProps({key:2,spin:"",class:n.cx("loadingIcon")},n.ptm("loadingIcon")),null,16,["class"]))],64))],16)):a.createCommentVNode("",!0),n.$slots.header?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:1,class:n.cx("header")},n.ptm("header")),[a.renderSlot(n.$slots,"header")],16)):a.createCommentVNode("",!0),o.paginatorTop?(a.openBlock(),a.createBlock(l,{key:2,rows:i.d_rows,first:i.d_first,totalRecords:o.totalRecordsLength,pageLinkSize:n.pageLinkSize,template:n.paginatorTemplate,rowsPerPageOptions:n.rowsPerPageOptions,currentPageReportTemplate:n.currentPageReportTemplate,class:a.normalizeClass(n.cx("paginator")),onPage:e[0]||(e[0]=function(h){return o.onPage(h)}),alwaysShow:n.alwaysShowPaginator,unstyled:n.unstyled,pt:n.ptm("paginator")},a.createSlots({_:2},[n.$slots.paginatorstart?{name:"start",fn:a.withCtx(function(){return[a.renderSlot(n.$slots,"paginatorstart")]}),key:"0"}:void 0,n.$slots.paginatorend?{name:"end",fn:a.withCtx(function(){return[a.renderSlot(n.$slots,"paginatorend")]}),key:"1"}:void 0,n.$slots.paginatorfirstpagelinkicon?{name:"firstpagelinkicon",fn:a.withCtx(function(h){return[a.renderSlot(n.$slots,"paginatorfirstpagelinkicon",{class:a.normalizeClass(h.class)})]}),key:"2"}:void 0,n.$slots.paginatorprevpagelinkicon?{name:"prevpagelinkicon",fn:a.withCtx(function(h){return[a.renderSlot(n.$slots,"paginatorprevpagelinkicon",{class:a.normalizeClass(h.class)})]}),key:"3"}:void 0,n.$slots.paginatornextpagelinkicon?{name:"nextpagelinkicon",fn:a.withCtx(function(h){return[a.renderSlot(n.$slots,"paginatornextpagelinkicon",{class:a.normalizeClass(h.class)})]}),key:"4"}:void 0,n.$slots.paginatorlastpagelinkicon?{name:"lastpagelinkicon",fn:a.withCtx(function(h){return[a.renderSlot(n.$slots,"paginatorlastpagelinkicon",{class:a.normalizeClass(h.class)})]}),key:"5"}:void 0,n.$slots.paginatorjumptopagedropdownicon?{name:"jumptopagedropdownicon",fn:a.withCtx(function(h){return[a.renderSlot(n.$slots,"paginatorjumptopagedropdownicon",{class:a.normalizeClass(h.class)})]}),key:"6"}:void 0,n.$slots.paginatorrowsperpagedropdownicon?{name:"rowsperpagedropdownicon",fn:a.withCtx(function(h){return[a.renderSlot(n.$slots,"paginatorrowsperpagedropdownicon",{class:a.normalizeClass(h.class)})]}),key:"7"}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow","unstyled","pt"])):a.createCommentVNode("",!0),a.createElementVNode("div",a.mergeProps({class:n.cx("wrapper"),style:[n.sx("wrapper"),{maxHeight:o.virtualScrollerDisabled?n.scrollHeight:""}]},n.ptm("wrapper")),[a.createVNode(f,a.mergeProps({ref:"virtualScroller"},n.virtualScrollerOptions,{items:o.processedData,columns:o.columns,style:n.scrollHeight!=="flex"?{height:n.scrollHeight}:void 0,scrollHeight:n.scrollHeight!=="flex"?void 0:"100%",disabled:o.virtualScrollerDisabled,loaderDisabled:"",inline:"",autoSize:"",showSpacer:!1,pt:n.ptm("virtualScroller")}),{content:a.withCtx(function(h){return[a.createElementVNode("table",a.mergeProps({ref:"table",role:"table",class:[n.cx("table"),n.tableClass],style:[n.tableStyle,h.spacerStyle]},ZD(ZD({},n.tableProps),n.ptm("table"))),[a.createVNode(c,{columnGroup:o.headerColumnGroup,columns:h.columns,rowGroupMode:n.rowGroupMode,groupRowsBy:n.groupRowsBy,groupRowSortField:o.groupRowSortField,reorderableColumns:n.reorderableColumns,resizableColumns:n.resizableColumns,allRowsSelected:o.allRowsSelected,empty:o.empty,sortMode:n.sortMode,sortField:i.d_sortField,sortOrder:i.d_sortOrder,multiSortMeta:i.d_multiSortMeta,filters:i.d_filters,filtersStore:n.filters,filterDisplay:n.filterDisplay,filterInputProps:n.filterInputProps,onColumnClick:e[1]||(e[1]=function(p){return o.onColumnHeaderClick(p)}),onColumnMousedown:e[2]||(e[2]=function(p){return o.onColumnHeaderMouseDown(p)}),onFilterChange:o.onFilterChange,onFilterApply:o.onFilterApply,onColumnDragstart:e[3]||(e[3]=function(p){return o.onColumnHeaderDragStart(p)}),onColumnDragover:e[4]||(e[4]=function(p){return o.onColumnHeaderDragOver(p)}),onColumnDragleave:e[5]||(e[5]=function(p){return o.onColumnHeaderDragLeave(p)}),onColumnDrop:e[6]||(e[6]=function(p){return o.onColumnHeaderDrop(p)}),onColumnResizestart:e[7]||(e[7]=function(p){return o.onColumnResizeStart(p)}),onCheckboxChange:e[8]||(e[8]=function(p){return o.toggleRowsWithCheckbox(p)}),unstyled:n.unstyled,pt:n.pt},null,8,["columnGroup","columns","rowGroupMode","groupRowsBy","groupRowSortField","reorderableColumns","resizableColumns","allRowsSelected","empty","sortMode","sortField","sortOrder","multiSortMeta","filters","filtersStore","filterDisplay","filterInputProps","onFilterChange","onFilterApply","unstyled","pt"]),n.frozenValue?(a.openBlock(),a.createBlock(d,{key:0,ref:"frozenBodyRef",value:n.frozenValue,frozenRow:!0,columns:h.columns,first:i.d_first,dataKey:n.dataKey,selection:n.selection,selectionKeys:i.d_selectionKeys,selectionMode:n.selectionMode,contextMenu:n.contextMenu,contextMenuSelection:n.contextMenuSelection,rowGroupMode:n.rowGroupMode,groupRowsBy:n.groupRowsBy,expandableRowGroups:n.expandableRowGroups,rowClass:n.rowClass,rowStyle:n.rowStyle,editMode:n.editMode,compareSelectionBy:n.compareSelectionBy,scrollable:n.scrollable,expandedRowIcon:n.expandedRowIcon,collapsedRowIcon:n.collapsedRowIcon,expandedRows:n.expandedRows,expandedRowGroups:n.expandedRowGroups,editingRows:n.editingRows,editingRowKeys:i.d_editingRowKeys,templates:n.$slots,responsiveLayout:n.responsiveLayout,isVirtualScrollerDisabled:!0,onRowgroupToggle:o.toggleRowGroup,onRowClick:e[9]||(e[9]=function(p){return o.onRowClick(p)}),onRowDblclick:e[10]||(e[10]=function(p){return o.onRowDblClick(p)}),onRowRightclick:e[11]||(e[11]=function(p){return o.onRowRightClick(p)}),onRowTouchend:o.onRowTouchEnd,onRowKeydown:o.onRowKeyDown,onRowMousedown:o.onRowMouseDown,onRowDragstart:e[12]||(e[12]=function(p){return o.onRowDragStart(p)}),onRowDragover:e[13]||(e[13]=function(p){return o.onRowDragOver(p)}),onRowDragleave:e[14]||(e[14]=function(p){return o.onRowDragLeave(p)}),onRowDragend:e[15]||(e[15]=function(p){return o.onRowDragEnd(p)}),onRowDrop:e[16]||(e[16]=function(p){return o.onRowDrop(p)}),onRowToggle:e[17]||(e[17]=function(p){return o.toggleRow(p)}),onRadioChange:e[18]||(e[18]=function(p){return o.toggleRowWithRadio(p)}),onCheckboxChange:e[19]||(e[19]=function(p){return o.toggleRowWithCheckbox(p)}),onCellEditInit:e[20]||(e[20]=function(p){return o.onCellEditInit(p)}),onCellEditComplete:e[21]||(e[21]=function(p){return o.onCellEditComplete(p)}),onCellEditCancel:e[22]||(e[22]=function(p){return o.onCellEditCancel(p)}),onRowEditInit:e[23]||(e[23]=function(p){return o.onRowEditInit(p)}),onRowEditSave:e[24]||(e[24]=function(p){return o.onRowEditSave(p)}),onRowEditCancel:e[25]||(e[25]=function(p){return o.onRowEditCancel(p)}),editingMeta:i.d_editingMeta,onEditingMetaChange:o.onEditingMetaChange,unstyled:n.unstyled,pt:n.pt},null,8,["value","columns","first","dataKey","selection","selectionKeys","selectionMode","contextMenu","contextMenuSelection","rowGroupMode","groupRowsBy","expandableRowGroups","rowClass","rowStyle","editMode","compareSelectionBy","scrollable","expandedRowIcon","collapsedRowIcon","expandedRows","expandedRowGroups","editingRows","editingRowKeys","templates","responsiveLayout","onRowgroupToggle","onRowTouchend","onRowKeydown","onRowMousedown","editingMeta","onEditingMetaChange","unstyled","pt"])):a.createCommentVNode("",!0),a.createVNode(d,{ref:"bodyRef",value:o.dataToRender(h.rows),class:a.normalizeClass(h.styleClass),columns:h.columns,empty:o.empty,first:i.d_first,dataKey:n.dataKey,selection:n.selection,selectionKeys:i.d_selectionKeys,selectionMode:n.selectionMode,contextMenu:n.contextMenu,contextMenuSelection:n.contextMenuSelection,rowGroupMode:n.rowGroupMode,groupRowsBy:n.groupRowsBy,expandableRowGroups:n.expandableRowGroups,rowClass:n.rowClass,rowStyle:n.rowStyle,editMode:n.editMode,compareSelectionBy:n.compareSelectionBy,scrollable:n.scrollable,expandedRowIcon:n.expandedRowIcon,collapsedRowIcon:n.collapsedRowIcon,expandedRows:n.expandedRows,expandedRowGroups:n.expandedRowGroups,editingRows:n.editingRows,editingRowKeys:i.d_editingRowKeys,templates:n.$slots,responsiveLayout:n.responsiveLayout,virtualScrollerContentProps:h,isVirtualScrollerDisabled:o.virtualScrollerDisabled,onRowgroupToggle:o.toggleRowGroup,onRowClick:e[26]||(e[26]=function(p){return o.onRowClick(p)}),onRowDblclick:e[27]||(e[27]=function(p){return o.onRowDblClick(p)}),onRowRightclick:e[28]||(e[28]=function(p){return o.onRowRightClick(p)}),onRowTouchend:o.onRowTouchEnd,onRowKeydown:function(m){return o.onRowKeyDown(m,h)},onRowMousedown:o.onRowMouseDown,onRowDragstart:e[29]||(e[29]=function(p){return o.onRowDragStart(p)}),onRowDragover:e[30]||(e[30]=function(p){return o.onRowDragOver(p)}),onRowDragleave:e[31]||(e[31]=function(p){return o.onRowDragLeave(p)}),onRowDragend:e[32]||(e[32]=function(p){return o.onRowDragEnd(p)}),onRowDrop:e[33]||(e[33]=function(p){return o.onRowDrop(p)}),onRowToggle:e[34]||(e[34]=function(p){return o.toggleRow(p)}),onRadioChange:e[35]||(e[35]=function(p){return o.toggleRowWithRadio(p)}),onCheckboxChange:e[36]||(e[36]=function(p){return o.toggleRowWithCheckbox(p)}),onCellEditInit:e[37]||(e[37]=function(p){return o.onCellEditInit(p)}),onCellEditComplete:e[38]||(e[38]=function(p){return o.onCellEditComplete(p)}),onCellEditCancel:e[39]||(e[39]=function(p){return o.onCellEditCancel(p)}),onRowEditInit:e[40]||(e[40]=function(p){return o.onRowEditInit(p)}),onRowEditSave:e[41]||(e[41]=function(p){return o.onRowEditSave(p)}),onRowEditCancel:e[42]||(e[42]=function(p){return o.onRowEditCancel(p)}),editingMeta:i.d_editingMeta,onEditingMetaChange:o.onEditingMetaChange,unstyled:n.unstyled,pt:n.pt},null,8,["value","class","columns","empty","first","dataKey","selection","selectionKeys","selectionMode","contextMenu","contextMenuSelection","rowGroupMode","groupRowsBy","expandableRowGroups","rowClass","rowStyle","editMode","compareSelectionBy","scrollable","expandedRowIcon","collapsedRowIcon","expandedRows","expandedRowGroups","editingRows","editingRowKeys","templates","responsiveLayout","virtualScrollerContentProps","isVirtualScrollerDisabled","onRowgroupToggle","onRowTouchend","onRowKeydown","onRowMousedown","editingMeta","onEditingMetaChange","unstyled","pt"]),o.hasSpacerStyle(h.spacerStyle)?(a.openBlock(),a.createElementBlock("tbody",a.mergeProps({key:1,class:n.cx("virtualScrollerSpacer"),style:{height:"calc(".concat(h.spacerStyle.height," - ").concat(h.rows.length*h.itemSize,"px)")}},n.ptm("virtualScrollerSpacer")),null,16)):a.createCommentVNode("",!0),a.createVNode(u,{columnGroup:o.footerColumnGroup,columns:h.columns,pt:n.pt},null,8,["columnGroup","columns","pt"])],16)]}),_:1},16,["items","columns","style","scrollHeight","disabled","pt"])],16),n.$slots.footer?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:3,class:n.cx("footer")},n.ptm("footer")),[a.renderSlot(n.$slots,"footer")],16)):a.createCommentVNode("",!0),o.paginatorBottom?(a.openBlock(),a.createBlock(l,{key:4,rows:i.d_rows,first:i.d_first,totalRecords:o.totalRecordsLength,pageLinkSize:n.pageLinkSize,template:n.paginatorTemplate,rowsPerPageOptions:n.rowsPerPageOptions,currentPageReportTemplate:n.currentPageReportTemplate,class:a.normalizeClass(n.cx("paginator")),onPage:e[43]||(e[43]=function(h){return o.onPage(h)}),alwaysShow:n.alwaysShowPaginator,unstyled:n.unstyled,pt:n.ptm("paginator")},a.createSlots({_:2},[n.$slots.paginatorstart?{name:"start",fn:a.withCtx(function(){return[a.renderSlot(n.$slots,"paginatorstart")]}),key:"0"}:void 0,n.$slots.paginatorend?{name:"end",fn:a.withCtx(function(){return[a.renderSlot(n.$slots,"paginatorend")]}),key:"1"}:void 0,n.$slots.paginatorfirstpagelinkicon?{name:"firstpagelinkicon",fn:a.withCtx(function(h){return[a.renderSlot(n.$slots,"paginatorfirstpagelinkicon",{class:a.normalizeClass(h.class)})]}),key:"2"}:void 0,n.$slots.paginatorprevpagelinkicon?{name:"prevpagelinkicon",fn:a.withCtx(function(h){return[a.renderSlot(n.$slots,"paginatorprevpagelinkicon",{class:a.normalizeClass(h.class)})]}),key:"3"}:void 0,n.$slots.paginatornextpagelinkicon?{name:"nextpagelinkicon",fn:a.withCtx(function(h){return[a.renderSlot(n.$slots,"paginatornextpagelinkicon",{class:a.normalizeClass(h.class)})]}),key:"4"}:void 0,n.$slots.paginatorlastpagelinkicon?{name:"lastpagelinkicon",fn:a.withCtx(function(h){return[a.renderSlot(n.$slots,"paginatorlastpagelinkicon",{class:a.normalizeClass(h.class)})]}),key:"5"}:void 0,n.$slots.paginatorjumptopagedropdownicon?{name:"jumptopagedropdownicon",fn:a.withCtx(function(h){return[a.renderSlot(n.$slots,"paginatorjumptopagedropdownicon",{class:a.normalizeClass(h.class)})]}),key:"6"}:void 0,n.$slots.paginatorrowsperpagedropdownicon?{name:"rowsperpagedropdownicon",fn:a.withCtx(function(h){return[a.renderSlot(n.$slots,"paginatorrowsperpagedropdownicon",{class:a.normalizeClass(h.class)})]}),key:"7"}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow","unstyled","pt"])):a.createCommentVNode("",!0),a.createElementVNode("div",a.mergeProps({ref:"resizeHelper",class:n.cx("resizeHelper"),style:{display:"none"}},n.ptm("resizeHelper")),null,16),n.reorderableColumns?(a.openBlock(),a.createElementBlock("span",a.mergeProps({key:5,ref:"reorderIndicatorUp",class:n.cx("reorderIndicatorUp"),style:{position:"absolute",display:"none"}},n.ptm("reorderIndicatorUp")),[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.$slots.reorderindicatorupicon||"ArrowDownIcon")))],16)):a.createCommentVNode("",!0),n.reorderableColumns?(a.openBlock(),a.createElementBlock("span",a.mergeProps({key:6,ref:"reorderIndicatorDown",class:n.cx("reorderIndicatorDown"),style:{position:"absolute",display:"none"}},n.ptm("reorderIndicatorDown")),[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.$slots.reorderindicatordownicon||"ArrowUpIcon")))],16)):a.createCommentVNode("",!0)],16)}HD.render=j2e;var z2e={},H2e={name:"BaseColumn",extends:Ce,props:{columnKey:{type:null,default:null},field:{type:[String,Function],default:null},sortField:{type:[String,Function],default:null},filterField:{type:[String,Function],default:null},dataType:{type:String,default:"text"},sortable:{type:Boolean,default:!1},header:{type:null,default:null},footer:{type:null,default:null},style:{type:null,default:null},class:{type:String,default:null},headerStyle:{type:null,default:null},headerClass:{type:String,default:null},bodyStyle:{type:null,default:null},bodyClass:{type:String,default:null},footerStyle:{type:null,default:null},footerClass:{type:String,default:null},showFilterMenu:{type:Boolean,default:!0},showFilterOperator:{type:Boolean,default:!0},showClearButton:{type:Boolean,default:!0},showApplyButton:{type:Boolean,default:!0},showFilterMatchModes:{type:Boolean,default:!0},showAddButton:{type:Boolean,default:!0},filterMatchModeOptions:{type:Array,default:null},maxConstraints:{type:Number,default:2},excludeGlobalFilter:{type:Boolean,default:!1},filterHeaderClass:{type:String,default:null},filterHeaderStyle:{type:null,default:null},filterMenuClass:{type:String,default:null},filterMenuStyle:{type:null,default:null},selectionMode:{type:String,default:null},expander:{type:Boolean,default:!1},colspan:{type:Number,default:null},rowspan:{type:Number,default:null},rowReorder:{type:Boolean,default:!1},rowReorderIcon:{type:String,default:void 0},reorderableColumn:{type:Boolean,default:!0},rowEditor:{type:Boolean,default:!1},frozen:{type:Boolean,default:!1},alignFrozen:{type:String,default:"left"},exportable:{type:Boolean,default:!0},exportHeader:{type:String,default:null},exportFooter:{type:String,default:null},filterMatchMode:{type:String,default:null},hidden:{type:Boolean,default:!1}},style:z2e,provide:function(){return{$parentInstance:this}}},U2e={name:"Column",extends:H2e,inheritAttrs:!1,inject:["$columns"],mounted:function(){var e;(e=this.$columns)===null||e===void 0||e.add(this.$)},unmounted:function(){var e;(e=this.$columns)===null||e===void 0||e.delete(this.$)},render:function(){return null}},Z2e={},W2e={name:"BaseColumnGroup",extends:Ce,props:{type:{type:String,default:null}},style:Z2e,provide:function(){return{$parentInstance:this}}},q2e={name:"ColumnGroup",extends:W2e,inheritAttrs:!1,inject:["$columnGroups"],mounted:function(){var e;(e=this.$columnGroups)===null||e===void 0||e.add(this.$)},unmounted:function(){var e;(e=this.$columnGroups)===null||e===void 0||e.delete(this.$)},render:function(){return null}},K2e={name:"Row",extends:Ce,inject:["$rows"],mounted:function(){var e;(e=this.$rows)===null||e===void 0||e.add(this.$)},unmounted:function(){var e;(e=this.$rows)===null||e===void 0||e.delete(this.$)},render:function(){return null}};const G2e=a.defineComponent({name:"QTable",components:{Column:U2e,ColumnGroup:q2e,DataTable:HD,Row:K2e,QBadge:ns,QTooltip:rc},props:{id:{type:String,default:""},modelValue:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},hasSearch:{type:Boolean,default:!0},sortBy:{type:String,default:""},itemsPerPage:{type:Number,default:20},currentPage:{type:Number,default:1},searchPlaceholder:{type:String,default:""},filters:{type:Object,default:()=>({})},filtersAction:{type:Function,default:()=>{}},filtersCount:{type:Number,default:0},globalFilters:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1},isMultiSort:{type:Boolean,default:!1},isMultiSelect:{type:Boolean,default:!1},rowSelect:{type:Function,default:()=>{}},rowUnselect:{type:Function,default:()=>{}},fixedTopOffset:{type:Number,default:0},skeletonRows:{type:Number,default:6},leftScrollAmount:{type:Number,default:200},rightScrollAmount:{type:Number,default:200},overrideFrozen:{type:Boolean,default:!1},searchDelay:{type:Number,default:300}},emits:["is-empty"],setup(n,{emit:e}){const{deviceType:t}=ic(),r=a.ref(),i=a.ref(!1),o=a.ref(!1),s=a.ref(!1),l=a.ref(!1),c=a.ref(!1),d=a.ref(!0),u=a.ref(Hx),f=a.ref(),h=a.ref(""),p=a.ref([]),m=a.ref(),y=a.ref(0),b=a.computed(()=>$c(n.modelValue,h.value,n.filters,void 0,void 0,[])),w=a.computed(()=>t.value==="desktop"),v=a.computed(()=>{var G;const R=!n.loading&&((G=r.value)==null?void 0:G.empty);return e("is-empty",R),R}),k=a.computed(()=>{const R=[],G={};let ne=0;return n.columns.forEach(Y=>{G[Y.key]=""}),[...Array(n.skeletonRows)].forEach(()=>{R.push({...G,shimmer:ne%2?"bg-gray-10":"bg-gray-30"}),ne++}),R}),C=()=>{N(),_(),M(),x(),U()},T=R=>{n.rowSelect(R)},S=R=>{n.rowUnselect(R)},M=()=>{var Y,Z;const R=m.value.offsetTop-n.fixedTopOffset,G=document.querySelector('div[data-pc-section="header"]'),ne=(Y=f.value)==null?void 0:Y.querySelector("thead");if(o.value=!!n.fixedTopOffset&&m.value&&window.scrollY>=R,o.value)if(G.style.top=n.fixedTopOffset+"px",i.value)ne.style.top="";else{const j=n.fixedTopOffset+G.clientHeight+1;ne.style.top=j+"px"}else G.style.top="",ne.style.top="";if(o.value&&i.value){const j=document.querySelector('div[data-pc-section="header"] > div[data-pc-section="wrapper"]');(Z=j==null?void 0:j.querySelectorAll("th"))==null||Z.forEach(($,W)=>{var oe;const J=(oe=f.value)==null?void 0:oe.querySelector(`th:nth-child(${W+1})`),ae=J==null?void 0:J.getAttribute("aria-sort");$==null||$.setAttribute("aria-sort",ae),$.classList.contains("actions")&&($.style.minWidth=(J==null?void 0:J.clientWidth)+"px")}),j&&(j.scrollLeft=f.value.scrollLeft)}_(),x(),U()},x=()=>{const G=f.value.scrollWidth-f.value.clientWidth;d.value=Math.abs(f.value.scrollLeft)<=1,c.value=Math.abs(f.value.scrollLeft-G)<=1},O=()=>{N(),s.value=!1,l.value=!1,n.columns.forEach((R,G)=>{R.frozen&&(s.value||(s.value=!0),m.value.querySelectorAll(`th:nth-child(${G+1}), td:nth-child(${G+1})`).forEach(ne=>{ne.classList.add("sticky"),G===0?ne.classList.add("left-0"):G===n.columns.length-1&&R.frozen&&(ne.classList.add("right-0"),l.value=!0)}))})},P=()=>{var G,ne,Y,Z;const R=(G=f.value)==null?void 0:G.cloneNode(!0);if(R){const j=document.querySelector('div[data-pc-section="header"]');j==null||j.append(R);const $=j==null?void 0:j.querySelector('div[data-pc-section="wrapper"]');(ne=$==null?void 0:$.querySelector("tbody"))==null||ne.remove(),$==null||$.addEventListener("scroll",()=>{f.value.scrollLeft=$.scrollLeft,x(),U()}),(Y=f.value)==null||Y.addEventListener("scroll",()=>{var W;$.scrollLeft=f.value.scrollLeft,x(),(W=f.value)==null||W.setAttribute("data-scroll",f.value.scrollLeft.toString()),U()}),(Z=$==null?void 0:$.querySelectorAll("th"))==null||Z.forEach((W,J)=>{W==null||W.addEventListener("click",async()=>{var ae;if(o.value&&i.value){const oe=(ae=f.value)==null?void 0:ae.querySelector(`th:nth-child(${J+1})`);await(oe==null?void 0:oe.click());const se=oe==null?void 0:oe.getAttribute("aria-sort");W==null||W.setAttribute("aria-sort",se)}})})}},N=()=>{var R,G;f.value.scrollWidth>f.value.clientWidth?(i.value=!0,(R=f.value)==null||R.classList.add("is-scrolled")):(i.value=!1,(G=f.value)==null||G.classList.remove("is-scrolled")),f.value&&f.value.setAttribute("data-scroll",f.value.scrollLeft.toString())},_=()=>{const R=f.value.clientWidth+"px",G=document.querySelector('div[data-pc-section="header"]'),ne=G.querySelector('div[data-pc-section="wrapper"] thead');G.style.width=R,f.value.querySelector("thead").style.width=R,ne&&(ne.style.width=R)},V=()=>{if(f.value){const R=-Math.min(n.leftScrollAmount,f.value.scrollLeft),G=o.value?"instant":"smooth";f.value.scrollBy({left:R,behavior:G})}},H=()=>{if(f.value){const R=f.value.scrollWidth-f.value.clientWidth,G=Math.min(n.rightScrollAmount,R-f.value.scrollLeft),ne=o.value?"instant":"smooth";f.value.scrollBy({left:G,behavior:ne})}},L=()=>{var R,G,ne;if(i.value||!w.value){const Y=d.value?"hidden":"",Z=c.value?"hidden":"";(R=m.value)==null||R.insertAdjacentHTML("beforeend",`<button type="button" class="q-table-scroll-button scroll-button scroll-left ${Y}"></button>
|
|
402
|
-
<button type="button" class="q-table-scroll-button scroll-button scroll-right ${Z}"></button>`);const j=a.h(Ra,{icon:"chevron-left",type:"",size:"md",class:"p-[0.1875rem]"}),$=a.h(Ra,{icon:"chevron-right",type:"",size:"md",class:"p-[0.1875rem]"}),W=(G=m.value)==null?void 0:G.querySelector(".scroll-button.scroll-left"),J=(ne=m.value)==null?void 0:ne.querySelector(".scroll-button.scroll-right");a.render(j,W),a.render($,J),W==null||W.addEventListener("click",V),J==null||J.addEventListener("click",H),U()}},D=()=>{var R,G;(G=(R=m.value)==null?void 0:R.querySelectorAll(".scroll-button"))==null||G.forEach(ne=>{ne.remove()})},U=()=>{var W,J,ae,oe;const R=(W=m.value)==null?void 0:W.querySelector(".scroll-button.scroll-left"),G=(J=m.value)==null?void 0:J.querySelector(".scroll-button.scroll-right"),ne=(ae=f.value)==null?void 0:ae.querySelector("td.sticky:first-child"),Y=(oe=m.value)==null?void 0:oe.getBoundingClientRect(),Z=document.querySelector('div[data-pc-section="header"]'),j=(Z==null?void 0:Z.getBoundingClientRect().height)||0,$=f.value;if(m.value&&Y&&$){const se=(ne==null?void 0:ne.getBoundingClientRect().width)||0;m.value.style.setProperty("--first-sticky-width",`${se}px`);const me=$.getBoundingClientRect(),_e=Math.max(me.top,j),dt=Math.min(me.bottom,window.innerHeight),cn=_e<window.innerHeight&&dt>j,vn=dt-_e,Lt=_e+vn/2;if(R&&G)if(cn&&i.value){R.classList.remove("hidden"),G.classList.remove("hidden");const Nn=Math.max(_e,Math.min(Lt,dt-R.offsetHeight));R.style.top=`${Nn}px`,G.style.top=`${Nn}px`,R.style.left=`${Y.left+se+8}px`,G.style.right=`${window.innerWidth-Y.right+8}px`}else R.classList.add("hidden"),G.classList.add("hidden");R&&(d.value||!i.value?R.classList.add("hidden"):R.classList.remove("hidden")),G&&(c.value||!i.value?G.classList.add("hidden"):G.classList.remove("hidden"))}},F=U5(R=>{h.value=R},n.searchDelay);return a.onMounted(()=>{f.value=document.querySelector('div[data-pc-section="wrapper"]'),C(),window.addEventListener("resize",C),window.addEventListener("scroll",M),P(),w.value||L()}),a.onUnmounted(()=>{window.removeEventListener("resize",C),window.removeEventListener("scroll",M)}),{dataTableRef:r,horizontalScroll:i,isFixed:o,isSticky:s,isLastCellSticky:l,isScrolledToEnd:c,isScrolledToStart:d,noResultsPath:u,scrollableElement:f,scrollLeft:V,scrollRight:H,search:h,selectedRows:p,tableContainer:m,tableHeight:y,isDesktop:w,isEmpty:v,skeletonData:k,filteredData:b,addScrollButtons:L,onPageResizeOrLoad:C,onSelectRow:T,onUnselectRow:S,removeScrollButtons:D,setSticky:O,mq:Qt,deviceType:t,debouncedSearch:F}}}),Y2e=["id"],Q2e={class:"search-and-filters"},X2e={class:"inspections-search"},J2e={for:"search",class:"search-label"},efe={key:0,class:"inspection-actions"},tfe={class:"flex relative"},nfe={key:0},rfe={key:1},ife={key:0,class:"table-empty flex flex-col items-center justify-center"},ofe=["src"];function sfe(n,e,t,r,i,o){const s=a.resolveComponent("q-icon"),l=a.resolveComponent("q-input"),c=a.resolveComponent("q-badge"),d=a.resolveComponent("q-tooltip"),u=a.resolveComponent("column"),f=a.resolveComponent("data-table");return a.openBlock(),a.createElementBlock("div",a.mergeProps({id:n.id,class:["table-container",{"is-fixed":n.isFixed},{"using-scroll":n.horizontalScroll},{"is-loading":n.loading},{"has-sticky-columns":n.isSticky},{"scroll-start":n.isScrolledToStart},{"scroll-end":n.isScrolledToEnd},{"is-empty bg-white":n.isEmpty},{"last-cell-sticky":n.isLastCellSticky}],ref:"tableContainer"},{[a.toHandlerKey(n.isDesktop&&"mouseenter")]:e[1]||(e[1]=(...h)=>n.addScrollButtons&&n.addScrollButtons(...h))},{[a.toHandlerKey(n.isDesktop&&"mouseleave")]:e[2]||(e[2]=(...h)=>n.removeScrollButtons&&n.removeScrollButtons(...h))}),[a.createVNode(f,{selection:n.selectedRows,"onUpdate:selection":e[0]||(e[0]=h=>n.selectedRows=h),loading:n.loading,"meta-key-selection":!1,"scroll-height":n.horizontalScroll&&n.tableHeight?`${n.tableHeight}px`:"","selection-mode":n.isMultiSelect?"multiple":"single","sort-mode":n.isMultiSort?"multiple":"single",value:n.loading?n.skeletonData:n.filteredData,"data-key":"id","filter-display":"menu",ref:"dataTableRef","removable-sort":"",scrollable:"",onRowSelect:n.onSelectRow,onRowUnselect:n.onUnselectRow,onValueChange:n.setSticky},{header:a.withCtx(()=>[n.hasSearch?a.renderSlot(n.$slots,"search-and-filters",{key:0},()=>{var h,p;return[a.createElementVNode("div",Q2e,[a.createElementVNode("div",X2e,[n.hasSearch?a.renderSlot(n.$slots,"search",{key:0},()=>[a.createElementVNode("label",J2e,[a.createVNode(s,{class:"mr-2",color:"gray-40",icon:"search",size:"md",type:""}),a.createVNode(l,{id:"search","model-value":n.search,"onUpdate:modelValue":n.debouncedSearch,"hide-clear":!!n.mq.md,placeholder:n.searchPlaceholder||n.$t("HC_SEARCH"),class:"text-base","control-class":"!border-0 !px-0"},null,8,["model-value","onUpdate:modelValue","hide-clear","placeholder"])])],!0):a.createCommentVNode("",!0)]),(h=n.filters)!=null&&h.length||n.$slots.tableActions?(a.openBlock(),a.createElementBlock("div",efe,[(p=n.filters)!=null&&p.length?a.renderSlot(n.$slots,"filters",{key:0},()=>[a.createVNode(d,{class:"z-[45] ml-2"},{trigger:a.withCtx(()=>[a.createElementVNode("div",tfe,[a.createVNode(s,{class:"filters-icon ml-0",color:"gray-40",icon:"filter",size:"md",onClick:n.filtersAction},null,8,["onClick"]),n.filtersCount?(a.openBlock(),a.createBlock(c,{key:0,class:"filters-count",color:"white"},{text:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.filtersCount),1)]),_:1})):a.createCommentVNode("",!0)])]),content:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t("HC_FILTERS")),1)]),_:1})],!0):a.createCommentVNode("",!0),n.$slots.tableActions?a.renderSlot(n.$slots,"tableActions",{key:1},void 0,!0):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)])]},!0):a.createCommentVNode("",!0)]),empty:a.withCtx(()=>e[3]||(e[3]=[])),default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.columns,h=>(a.openBlock(),a.createBlock(u,{key:h.key,field:h.key,"filter-field":h.key,header:h.name,sortable:h.sortable,frozen:h.frozen&&!n.overrideFrozen,class:a.normalizeClass([h.key,h.size?`cell-${h.size}`:"",{"text-right":h.key==="actions"}])},{body:a.withCtx(({data:p})=>[n.loading?n.loading?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["animate-shimmer",p.shimmer])}," ",2)):a.createCommentVNode("",!0):a.renderSlot(n.$slots,h.key,a.mergeProps({key:0,ref_for:!0},p),()=>[h.key.match(/\./)?(a.openBlock(),a.createElementBlock("div",rfe,a.toDisplayString(p[h.key.split(".")[0]][h.key.split(".")[1]]),1)):(a.openBlock(),a.createElementBlock("div",nfe,a.toDisplayString(p[h.key]),1))],!0)]),_:2},1032,["field","filter-field","header","sortable","frozen","class"]))),128))]),_:3},8,["selection","loading","scroll-height","selection-mode","sort-mode","value","onRowSelect","onRowUnselect","onValueChange"]),n.isEmpty?(a.openBlock(),a.createElementBlock("div",ife,[a.renderSlot(n.$slots,"no-results-illustration",{},()=>[a.createElementVNode("img",{class:"mb-5",src:n.noResultsPath},null,8,ofe)],!0),a.renderSlot(n.$slots,"no-results-text",a.normalizeProps(a.guardReactiveProps({search:n.search})),void 0,!0)])):a.createCommentVNode("",!0)],16,Y2e)}const afe=pe(G2e,[["render",sfe],["__scopeId","data-v-a76fc032"]]),lfe=a.defineComponent({name:"QTag",components:{},props:{tagClass:{type:String,default:""},bgColor:{type:String,default:"bg-green-0"},textColor:{type:String,default:"text-green-20"},shape:{type:String,default:"square"}},setup(n,{slots:e}){return{hasIcon:!!e.icon}}});function cfe(n,e,t,r,i,o){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["tag flex items-center",[n.tagClass,n.bgColor,n.textColor,"tag-"+n.shape,{"has-icon":n.hasIcon}]])},[n.hasIcon?a.renderSlot(n.$slots,"icon",{key:0},void 0,!0):a.createCommentVNode("",!0),a.renderSlot(n.$slots,"default",{},void 0,!0)],2)}const dfe=pe(lfe,[["render",cfe],["__scopeId","data-v-1a01844c"]]),WD="update:model-value",ufe=a.defineComponent({name:"QTextarea",inheritAttrs:!1,props:{modelValue:{type:[String,Number],default:""},controlClass:{type:String,default:""},persistentPlaceholder:{type:Boolean,default:!1},placeholder:{type:String,default:""},rows:{type:Number,default:2},status:{type:String,default:""},textareaClass:{type:String,default:""},isDisabled:{type:Boolean,default:!1}},emits:[WD],setup(n,{attrs:e,emit:t,slots:r}){const i=a.ref(!1),o=a.ref(),s=a.computed(()=>!!r.actions),l=a.computed(()=>!!e.disabled||!!n.isDisabled),c=a.computed(()=>[{[`has-${n.status}`]:n.status&&!l.value},{"is-focused":i.value},{"is-disabled":l.value}]),d=a.computed(()=>["textarea",n.textareaClass,{[n.status]:n.status&&!l.value},{populated:!!n.modelValue&&n.persistentPlaceholder},{"is-focused":i.value&&n.persistentPlaceholder}]),u=()=>{o.value.style.height="auto",o.value.style.height=o.value.scrollHeight+"px"},f=h=>{t(WD,h.target.value)};return a.onMounted(()=>{u()}),{focused:i,disabled:l,rootClasses:c,textarea:o,textareaClasses:d,hasActions:s,resizeTextarea:u,updateValue:f}}}),ffe=["id","disabled","placeholder","rows","value"],hfe={key:0,class:"action flex items-end py-2 pr-4"},pfe=["for"];function mfe(n,e,t,r,i,o){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([[n.rootClasses,n.controlClass],"control flex"])},[a.createElementVNode("textarea",a.mergeProps({id:String(n.$attrs.id),ref:"textarea",disabled:n.isDisabled,class:[n.textareaClasses],placeholder:n.persistentPlaceholder?"":n.placeholder,rows:n.rows,value:n.modelValue},n.$attrs,{onInput:e[0]||(e[0]=(...s)=>n.updateValue&&n.updateValue(...s)),onFocusin:e[1]||(e[1]=s=>n.focused=!n.focused),onFocusout:e[2]||(e[2]=s=>n.focused=!n.focused),onKeyup:e[3]||(e[3]=(...s)=>n.resizeTextarea&&n.resizeTextarea(...s))})," ",16,ffe),n.hasActions?(a.openBlock(),a.createElementBlock("div",hfe,[a.renderSlot(n.$slots,"actions",{},void 0,!0)])):a.createCommentVNode("",!0),n.persistentPlaceholder?(a.openBlock(),a.createElementBlock("label",{key:1,for:String(n.$attrs.id),class:"placeholder"},a.toDisplayString(n.placeholder),9,pfe)):a.createCommentVNode("",!0)],2)}const gfe=pe(ufe,[["render",mfe],["__scopeId","data-v-fda73545"]]),qD="update:modelValue",KD="undo-action",GD="timeout-done",yfe=a.defineComponent({name:"QToast",props:{modelValue:{type:Boolean,default:!1,required:!0},icon:{type:String,default:""},message:{type:String,default:""},variant:{type:String,default:""},duration:{type:Number,default:null,required:!1},position:{type:[String,Array],default:null,required:!1},withTransition:{type:Boolean,default:!1},transitionClass:{type:String,default:"component-slide-right"},closeButton:{type:Boolean,default:!1},undoButton:{type:Boolean,default:!1}},emits:[qD,KD,GD],setup(n,{emit:e}){const t=a.ref(null),r=a.computed({get:()=>n.modelValue,set:d=>{e(qD,d)}}),i=a.computed(()=>n.variant?"is-"+n.variant:""),o=a.computed(()=>n.position?"toast-fixed "+n.position:""),s=a.computed(()=>n.withTransition&&n.transitionClass),l=()=>{e(KD)},c=()=>{t.value=setTimeout(()=>{r.value=!1,e(GD)},n.duration)};return a.onBeforeUnmount(()=>{t.value&&(clearTimeout(t.value),t.value=null)}),a.watchEffect(()=>{r.value&&n.duration?c():t.value&&(clearTimeout(t.value),t.value=null)}),{show:r,statusClass:i,positionClass:o,computedTransition:s,startTimeout:c,undoAction:l}}}),bfe=["aria-live"],wfe={class:"message flex-grow"},vfe=["aria-label"];function Cfe(n,e,t,r,i,o){const s=a.resolveComponent("q-icon");return a.openBlock(),a.createBlock(a.Transition,{name:String(n.computedTransition),appear:""},{default:a.withCtx(()=>[n.show?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["toast flex",n.statusClass,n.positionClass,n.undoButton?"gap-2":"gap-3"]),role:"alert","aria-live":n.variant=="error"?"assertive":"polite","aria-atomic":"true"},[n.icon?(a.openBlock(),a.createBlock(s,{key:0,icon:n.icon,class:"status-icon",type:"fill","aria-hidden":"true"},null,8,["icon"])):a.createCommentVNode("",!0),a.createElementVNode("span",wfe,[a.renderSlot(n.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(n.message),1)],!0)]),n.undoButton?(a.openBlock(),a.createElementBlock("button",{key:1,class:"button-link",onClick:e[0]||(e[0]=l=>n.undoAction())},[a.renderSlot(n.$slots,"undo-message",{},()=>[a.createTextVNode(a.toDisplayString(n.$t("HC_UNDO")),1)],!0)])):a.createCommentVNode("",!0),n.closeButton?(a.openBlock(),a.createElementBlock("button",{key:2,class:"close-icon",onClick:e[1]||(e[1]=l=>n.show=!n.show),"aria-label":n.$t("HC_CLOSE")},[a.createVNode(s,{icon:"close",type:"line",color:"inkwell-30",class:"close","aria-hidden":"true"})],8,vfe)):a.createCommentVNode("",!0)],10,bfe)):a.createCommentVNode("",!0)]),_:3},8,["name"])}const kfe=pe(yfe,[["render",Cfe],["__scopeId","data-v-3862f72b"]]),Sfe={variantFlipOrder:{start:"sme",middle:"mse",end:"ems"},positionFlipOrder:{top:"tbrl",right:"rltb",bottom:"btrl",left:"lrbt"},position:"bottom",margin:8,padding:0},Efe=(n,e,t)=>{const{container:r,arrow:i,margin:o,padding:s,position:l,variantFlipOrder:c,positionFlipOrder:d}={container:document.documentElement.getBoundingClientRect(),...Sfe,...t},{left:u,top:f}=e.style;e.style.left="0",e.style.top="0";const h=n.getBoundingClientRect(),p=e.getBoundingClientRect(),m={t:h.top-p.height-o,b:h.bottom+o,r:h.right+o,l:h.left-p.width-o},y={vs:h.left,vm:h.left+h.width/2-p.width/2,ve:h.left+h.width-p.width,hs:h.top,hm:h.bottom-h.height/2-p.height/2,he:h.bottom-p.height},[b,w="middle"]=l.split("-"),v=d[b],k=c[w],{top:C,left:T,bottom:S,right:M}=r;for(const x of v){const O=x==="t"||x==="b";let P=m[x];const[N,_]=O?["top","left"]:["left","top"],[V,H]=O?[p.height,p.width]:[p.width,p.height],[L,D]=O?[S,M]:[M,S],[U,F]=O?[C,T]:[T,C];if(!(P<U||P+V+s>L))for(const R of k){let G=y[(O?"v":"h")+R];if(!(G<F||G+H+s>D)){if(G-=p[_],P-=p[N],e.style[_]=`${G}px`,e.style[N]=`${P}px`,i){const ne=O?h.width/2:h.height/2,Y=H/2,Z=ne>Y,j={s:Z?Y:ne,m:Y,e:Z?Y:H-ne},$={t:V,b:0,r:0,l:V},W=G+j[R],J=P+$[x];i.style[_]=`${W}px`,i.style[N]=`${J}px`}return x+R}}}return e.style.left=u,e.style.top=f,null},Mfe=(n,e,t)=>{const r=typeof n=="object"&&!(n instanceof HTMLElement)?n:{reference:n,popper:e,...t};return{update(i=r){const{reference:o,popper:s}=Object.assign(r,i);if(!s||!o)throw new Error("Popper- or reference-element missing.");return Efe(o,s,r)}}},Afe=a.defineComponent({name:"QTour",props:{name:{type:String,default:"default"},steps:{type:Array,required:!0},backdrop:{type:Boolean,default:!0},autoStart:{type:Boolean,default:!1},startDelay:{type:Number,default:2e3},highlight:{type:Boolean,default:!0},margin:{type:Number,default:8},buttonLabels:{type:Object,default:()=>{const{t:n}=bi();return{next:n("HC_NEXT"),back:n("HC_BACK"),end:n("HC_GOT_IT"),snooze:n("HC_SNOOZE")}}},saveProgress:{type:Boolean,default:!0},hideSnooze:{type:Boolean,default:!1},hideArrow:{type:Boolean,default:!1},noScroll:{type:Boolean,default:!1},backdropBlur:{type:Number,default:1},outlineWidth:{type:Number,default:4}},emits:["onTourStart","onTourStop","onTourEnd","onTourStep","onTourSnooze"],setup(n,{emit:e,expose:t}){const r=`tour-${n.name}`,i=`${r}-tooltip`,o=`${r}-backdrop`,s=`${r}-arrow`,l=a.ref(null),c=a.ref(null),d=a.ref(!1),u=a.computed(()=>n.steps.filter(L=>{var D;return!((D=L.skip)!=null&&D.call(L))})),f=a.reactive({currentStep:0,lastStep:0,nextStep:1,getCurrentStep:a.computed(()=>u.value[f.currentStep]),getLastStep:a.computed(()=>u.value[f.lastStep]),getNextStep:a.computed(()=>u.value[f.nextStep])}),h=a.computed(()=>f.currentStep===u.value.length-1?n.buttonLabels.end:n.buttonLabels.next),p=()=>{window.addEventListener("resize",H),window.addEventListener("scroll",H,!0)},m=()=>{window.removeEventListener("resize",H),window.removeEventListener("scroll",H,!0)},y=()=>{if(localStorage.getItem("tour-"+n.name)==="true")return;n.saveProgress?f.currentStep=parseInt(localStorage.getItem("tour-"+n.name)||"0"):f.currentStep=0;const L=async()=>{if(await M(f.currentStep),!l.value){const D=document.querySelector(f.getCurrentStep.target);l.value=Mfe(D,c.value,{position:f.getCurrentStep.placement||"right",margin:n.margin||8})}x(),p()};n.autoStart?setTimeout(L,n.startDelay):L(),e("onTourStart")},b=async()=>{var L,D;f.currentStep<u.value.length&&f.getCurrentStep.onAfter&&await f.getCurrentStep.onAfter(),n.backdrop&&((L=document.querySelector(`#${o}`))==null||L.setAttribute("data-hidden","")),(n.highlight||f.getLastStep.highlight)&&document.querySelectorAll(".tour-highlight").forEach(U=>U.classList.remove("tour-highlight")),(D=c.value)==null||D.setAttribute("data-hidden",""),m(),e("onTourStop")},w=L=>{b(),f.currentStep=0,f.lastStep=0,f.nextStep=1,localStorage.removeItem("tour-"+n.name),L&&y()},v=async()=>{if(f.getCurrentStep.onAfter&&await f.getCurrentStep.onAfter(),f.lastStep=f.currentStep,f.currentStep++,f.currentStep>=u.value.length){T();return}await M(f.currentStep),f.nextStep=f.currentStep+1,x()},k=async()=>{var L,D;if(await((D=(L=f.getCurrentStep).onAfter)==null?void 0:D.call(L)),await M(f.lastStep),f.currentStep=f.lastStep,f.lastStep--,f.lastStep<0&&(f.lastStep=0),f.currentStep<0){T();return}f.nextStep=f.currentStep+1,x()},C=()=>{b(),e("onTourSnooze")},T=()=>{b(),d.value=!1,localStorage.removeItem("tour-"+n.name),e("onTourEnd")},S=async L=>{await M(L),f.currentStep=L,f.lastStep=L-1,f.lastStep<0&&(f.lastStep=0),f.nextStep=L+1,x()},M=async L=>{var U,F,R,G;document.querySelectorAll(".tour-highlight").forEach(ne=>ne.classList.remove("tour-highlight"));const D=document.querySelector(`#${o}`);D&&(D.style.clipPath=""),(U=c.value)==null||U.setAttribute("data-hidden",""),await((R=(F=u.value[L])==null?void 0:F.onBefore)==null?void 0:R.call(F)),(G=c.value)==null||G.removeAttribute("data-hidden")},x=async()=>{var L,D,U,F,R,G;if(O(),P(),(L=c.value)==null||L.setAttribute("data-hidden",""),f.getCurrentStep.tooltipWidth?(D=c.value)==null||D.style.setProperty("width",f.getCurrentStep.tooltipWidth):(U=c.value)==null||U.style.removeProperty("width"),!n.noScroll&&!f.getCurrentStep.noScroll){const ne=document.querySelector(f.getCurrentStep.target);if(ne){const Y=ne.getBoundingClientRect();Y.top>=0&&Y.left>=0&&Y.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&Y.right<=(window.innerWidth||document.documentElement.clientWidth)||ne.scrollIntoView({behavior:"smooth",block:"center"})}}(F=c.value)==null||F.removeAttribute("data-hidden"),(G=c.value)==null||G.setAttribute("data-arrow",((R=l.value)==null?void 0:R.update({reference:document.querySelector(f.getCurrentStep.target),position:f.getCurrentStep.placement||"right"}))||"right"),n.saveProgress&&localStorage.setItem("tour-"+n.name,f.currentStep.toString()),e("onTourStep")},O=()=>{if(document.querySelectorAll(".tour-highlight").forEach(U=>U.classList.remove("tour-highlight")),!(n.highlight&&f.getCurrentStep.highlight!==!1||f.getCurrentStep.highlight===!0))return;const D=document.querySelector(f.getCurrentStep.target);D==null||D.classList.add("tour-highlight")},P=()=>{const L=document.querySelector(`#${o}`),D=L==null?void 0:L.querySelector(".tour-highlight-outline");if(!n.backdrop||!L){L==null||L.setAttribute("data-hidden","");return}const U=document.querySelector(f.getCurrentStep.target);if(!U){L.setAttribute("data-hidden","");return}const F=U.getBoundingClientRect(),R=f.getCurrentStep.clipPadding??0,G=n.outlineWidth??4,ne=`path('M 0,0 L 0,${window.innerHeight} L ${window.innerWidth},${window.innerHeight} L ${window.innerWidth},0 Z M ${F.left-R},${F.top-R} L ${F.right+R},${F.top-R} L ${F.right+R},${F.bottom+R} L ${F.left-R},${F.bottom+R} Z')`,Y=`path('M ${F.left-R-G},${F.top-R-G} L ${F.right+R+G},${F.top-R-G} L ${F.right+R+G},${F.bottom+R+G} L ${F.left-R-G},${F.bottom+R+G} Z')`;L.style.clipPath=ne,n.highlight&&f.getCurrentStep.highlight!==!1?D.style.clipPath=Y:D.style.clipPath="none",L.removeAttribute("data-hidden")},N=()=>{d.value=!d.value},_=L=>{d.value=!1,localStorage.setItem("tour-"+n.name,L.toString()),y()},V=L=>Number(localStorage.getItem("tour-"+n.name))>=L,H=()=>{f.getCurrentStep&&(P(),O(),x())};return a.onMounted(()=>{c.value=document.querySelector(`#${i}`),n.autoStart&&y()}),a.onUnmounted(()=>{m()}),t({startTour:y,nextStep:v,lastStep:k,endTour:T,stopTour:b,snoozeTour:C,goToStep:S,resetTour:w}),{_CurrentStep:f,getNextLabel:h,startTour:y,nextStep:v,lastStep:k,endTour:T,stopTour:b,snoozeTour:C,goToStep:S,resetTour:w,props:n,tooltipId:i,backdropId:o,arrowId:s,showPopover:d,togglePopover:N,startStepFromPopover:_,isStepViewed:V,visibleSteps:u}}}),Tfe={class:"tour-popover"},Ife={key:0,class:"tour-steps-container"},xfe={class:"mt-[1px]"},Ofe={class:"popover-heading"},Dfe={class:"step-list"},Nfe={class:"text-black"},Pfe={class:"text-black/70"},Lfe=["onClick"],Bfe=["id"],_fe=["id"],Rfe={class:"tour-title"},$fe=["innerHTML"],Vfe={class:"tour-actions"},Ffe={class:"flex items-center gap-6"},jfe={class:"flex gap-1"},zfe=["onClick"],Hfe={class:"flex items-center gap-1"},Ufe=["id"];function Zfe(n,e,t,r,i,o){const s=a.resolveComponent("q-icon"),l=a.resolveComponent("i18n-t");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",Tfe,[n.showPopover?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("button",{key:0,class:"tour-fab",onClick:e[0]||(e[0]=(...c)=>n.togglePopover&&n.togglePopover(...c))},[a.createVNode(s,{icon:"quore-glyph",type:"",size:"sm",color:"white"})])),a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>[n.showPopover?(a.openBlock(),a.createElementBlock("div",Ife,[a.createElementVNode("button",{class:"hide-button",onClick:e[1]||(e[1]=(...c)=>n.togglePopover&&n.togglePopover(...c))},[a.createElementVNode("span",xfe,a.toDisplayString(n.$t("HC_HIDE")),1),a.createVNode(s,{icon:"close",type:"",size:"sm",color:"inkwell-30"})]),a.createElementVNode("div",Ofe,[a.createVNode(l,{keypath:"HC_CONTINUE_THE_TOUR",tag:"div",scope:"global",class:"flex items-center"},{icon:a.withCtx(()=>[a.createVNode(s,{icon:"quore-glyph",type:"",size:"lg",color:"green-quore",class:"mx-1"})]),_:1})]),a.createElementVNode("div",Dfe,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.visibleSteps,(c,d)=>(a.openBlock(),a.createElementBlock("div",{key:d,class:a.normalizeClass(["step-item",{viewed:n.isStepViewed(d)}])},[a.createElementVNode("div",null,[a.createElementVNode("span",Nfe,a.toDisplayString(d+1)+".",1),e[7]||(e[7]=a.createTextVNode()),a.createElementVNode("span",Pfe,a.toDisplayString(c.title),1)]),a.createElementVNode("button",{class:a.normalizeClass(["step-button",{viewed:n.isStepViewed(d)}]),onClick:u=>n.startStepFromPopover(d)},a.toDisplayString(n.isStepViewed(d)?n.$t("HC_OPEN"):n.$t("HC_START")),11,Lfe)],2))),128))]),a.createElementVNode("button",{class:"text-blue-10 text-center mt-5",onClick:e[2]||(e[2]=c=>n.endTour())},a.toDisplayString(n.$t("HC_I_DONT_NEED_HELP")),1)])):a.createCommentVNode("",!0)]),_:1})]),a.createElementVNode("div",{id:n.backdropId,class:"tour-backdrop","data-hidden":!0,style:a.normalizeStyle({"--tour-backdrop-blur":`${n.props.backdropBlur}px`})},e[8]||(e[8]=[a.createElementVNode("div",{class:"tour-highlight-outline"},null,-1)]),12,Bfe),a.createElementVNode("div",{id:n.tooltipId,class:"tour-tooltip",role:"tooltip","data-arrow":"r","data-hidden":""},[n._CurrentStep.getCurrentStep?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("button",{class:"close-button",onClick:e[3]||(e[3]=a.withModifiers(c=>n.snoozeTour(),["prevent"]))},[a.createVNode(s,{icon:"close",size:"sm",color:"inkwell-40",type:""})]),a.renderSlot(n.$slots,"header",{currentStep:n._CurrentStep.getCurrentStep},()=>[a.createElementVNode("div",Rfe,a.toDisplayString(n._CurrentStep.getCurrentStep.title),1)]),a.renderSlot(n.$slots,"body",{currentStep:n._CurrentStep.getCurrentStep},()=>[typeof n._CurrentStep.getCurrentStep.content=="object"?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n._CurrentStep.getCurrentStep.content),{key:0})):(a.openBlock(),a.createElementBlock("div",{key:1,class:"tour-content",innerHTML:n._CurrentStep.getCurrentStep.content},null,8,$fe))]),a.renderSlot(n.$slots,"footer",{currentStep:n._CurrentStep.getCurrentStep,snoozeTour:n.snoozeTour,lastStep:n.lastStep,nextStep:n.nextStep,buttonLabels:n.props.buttonLabels},()=>[a.createElementVNode("div",Vfe,[a.createElementVNode("div",Ffe,[n.props.hideSnooze?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("button",{key:0,class:"snooze-button",onClick:e[4]||(e[4]=a.withModifiers(c=>n.snoozeTour(),["prevent"]))},a.toDisplayString(n.props.buttonLabels.snooze),1)),a.createElementVNode("div",jfe,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.visibleSteps,(c,d)=>(a.openBlock(),a.createElementBlock("button",{key:d,onClick:u=>n.goToStep(d),class:a.normalizeClass(["w-2 h-2 rounded-full",n._CurrentStep.currentStep===d?"step-button-active bg-blue-20 border border-gray-30 scale-125":"step-button bg-blue-5"])},null,10,zfe))),128))])]),a.createElementVNode("div",Hfe,[n._CurrentStep.lastStep<n._CurrentStep.currentStep?(a.openBlock(),a.createElementBlock("button",{key:0,class:"back-button",onClick:e[5]||(e[5]=a.withModifiers(c=>n.lastStep(),["prevent"]))},a.toDisplayString(n.props.buttonLabels.back),1)):a.createCommentVNode("",!0),a.createElementVNode("button",{class:"next-button",onClick:e[6]||(e[6]=a.withModifiers(c=>n.nextStep(),["prevent"]))},a.toDisplayString(n.getNextLabel),1)])])])],64)):a.createCommentVNode("",!0),n.props.hideArrow?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:1,id:n.arrowId,class:"tour-arrow"},null,8,Ufe))],8,_fe)],64)}const Wfe=pe(Afe,[["render",Zfe]]),qfe={install:({config:n,provide:e})=>{n.globalProperties.$datetime=it,e("$datetime",it)}};function Ff(n){"@babel/helpers - typeof";return Ff=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ff(n)}function YD(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function ov(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?YD(Object(t),!0).forEach(function(r){Kfe(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):YD(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Kfe(n,e,t){return e=Gfe(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Gfe(n){var e=Yfe(n,"string");return Ff(e)=="symbol"?e:String(e)}function Yfe(n,e){if(Ff(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(Ff(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var QD={ripple:!1,inputStyle:null,locale:{startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",completed:"Completed",pending:"Pending",fileSizeTypes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",today:"Today",weekHeader:"Wk",firstDayOfWeek:0,showMonthAfterYear:!1,dateFormat:"mm/dd/yy",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyFilterMessage:"No results found",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyMessage:"No available options",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"Page {page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left"}},filterMatchModeOptions:{text:[zt.STARTS_WITH,zt.CONTAINS,zt.NOT_CONTAINS,zt.ENDS_WITH,zt.EQUALS,zt.NOT_EQUALS],numeric:[zt.EQUALS,zt.NOT_EQUALS,zt.LESS_THAN,zt.LESS_THAN_OR_EQUAL_TO,zt.GREATER_THAN,zt.GREATER_THAN_OR_EQUAL_TO],date:[zt.DATE_IS,zt.DATE_IS_NOT,zt.DATE_BEFORE,zt.DATE_AFTER]},zIndex:{modal:1100,overlay:1e3,menu:1e3,tooltip:1100},pt:void 0,ptOptions:{mergeSections:!0,mergeProps:!1},unstyled:!1,csp:{nonce:void 0}},Qfe=Symbol();function Xfe(n,e,t,r){if(n!==e){var i=document.getElementById(t),o=i.cloneNode(!0),s=i.getAttribute("href").replace(n,e);o.setAttribute("id",t+"-clone"),o.setAttribute("href",s),o.addEventListener("load",function(){i.remove(),o.setAttribute("id",t),r&&r()}),i.parentNode&&i.parentNode.insertBefore(o,i.nextSibling)}}var Jfe={install:function(e,t){var r=t?ov(ov({},QD),t):ov({},QD),i={config:a.reactive(r),changeTheme:Xfe};e.config.globalProperties.$primevue=i,e.provide(Qfe,i)}};const e1e={global:{css:`
|
|
402
|
+
<button type="button" class="q-table-scroll-button scroll-button scroll-right ${Z}"></button>`);const j=a.h(Ra,{icon:"chevron-left",type:"",size:"md",class:"p-[0.1875rem]"}),$=a.h(Ra,{icon:"chevron-right",type:"",size:"md",class:"p-[0.1875rem]"}),W=(G=m.value)==null?void 0:G.querySelector(".scroll-button.scroll-left"),J=(ne=m.value)==null?void 0:ne.querySelector(".scroll-button.scroll-right");a.render(j,W),a.render($,J),W==null||W.addEventListener("click",V),J==null||J.addEventListener("click",H),U()}},D=()=>{var R,G;(G=(R=m.value)==null?void 0:R.querySelectorAll(".scroll-button"))==null||G.forEach(ne=>{ne.remove()})},U=()=>{var W,J,ae,oe;const R=(W=m.value)==null?void 0:W.querySelector(".scroll-button.scroll-left"),G=(J=m.value)==null?void 0:J.querySelector(".scroll-button.scroll-right"),ne=(ae=f.value)==null?void 0:ae.querySelector("td.sticky:first-child"),Y=(oe=m.value)==null?void 0:oe.getBoundingClientRect(),Z=document.querySelector('div[data-pc-section="header"]'),j=(Z==null?void 0:Z.getBoundingClientRect().height)||0,$=f.value;if(m.value&&Y&&$){const se=(ne==null?void 0:ne.getBoundingClientRect().width)||0;m.value.style.setProperty("--first-sticky-width",`${se}px`);const me=$.getBoundingClientRect(),_e=Math.max(me.top,j),dt=Math.min(me.bottom,window.innerHeight),cn=_e<window.innerHeight&&dt>j,vn=dt-_e,Lt=_e+vn/2;if(R&&G)if(cn&&i.value){R.classList.remove("hidden"),G.classList.remove("hidden");const Nn=Math.max(_e,Math.min(Lt,dt-R.offsetHeight));R.style.top=`${Nn}px`,G.style.top=`${Nn}px`,R.style.left=`${Y.left+se+8}px`,G.style.right=`${window.innerWidth-Y.right+8}px`}else R.classList.add("hidden"),G.classList.add("hidden");R&&(d.value||!i.value?R.classList.add("hidden"):R.classList.remove("hidden")),G&&(c.value||!i.value?G.classList.add("hidden"):G.classList.remove("hidden"))}},F=U5(R=>{h.value=R},n.searchDelay);return a.onMounted(()=>{f.value=document.querySelector('div[data-pc-section="wrapper"]'),C(),window.addEventListener("resize",C),window.addEventListener("scroll",M),P(),w.value||L()}),a.onUnmounted(()=>{window.removeEventListener("resize",C),window.removeEventListener("scroll",M)}),{dataTableRef:r,horizontalScroll:i,isFixed:o,isSticky:s,isLastCellSticky:l,isScrolledToEnd:c,isScrolledToStart:d,noResultsPath:u,scrollableElement:f,scrollLeft:V,scrollRight:H,search:h,selectedRows:p,tableContainer:m,tableHeight:y,isDesktop:w,isEmpty:v,skeletonData:k,filteredData:b,addScrollButtons:L,onPageResizeOrLoad:C,onSelectRow:T,onUnselectRow:S,removeScrollButtons:D,setSticky:O,mq:Qt,deviceType:t,debouncedSearch:F}}}),Y2e=["id"],Q2e={class:"search-and-filters"},X2e={class:"inspections-search"},J2e={for:"search",class:"search-label"},efe={key:0,class:"inspection-actions"},tfe={class:"flex relative"},nfe={key:0},rfe={key:1},ife={key:0,class:"table-empty flex flex-col items-center justify-center"},ofe=["src"];function sfe(n,e,t,r,i,o){const s=a.resolveComponent("q-icon"),l=a.resolveComponent("q-input"),c=a.resolveComponent("q-badge"),d=a.resolveComponent("q-tooltip"),u=a.resolveComponent("column"),f=a.resolveComponent("data-table");return a.openBlock(),a.createElementBlock("div",a.mergeProps({id:n.id,class:["table-container",{"is-fixed":n.isFixed},{"using-scroll":n.horizontalScroll},{"is-loading":n.loading},{"has-sticky-columns":n.isSticky},{"scroll-start":n.isScrolledToStart},{"scroll-end":n.isScrolledToEnd},{"is-empty bg-white":n.isEmpty},{"last-cell-sticky":n.isLastCellSticky}],ref:"tableContainer"},{[a.toHandlerKey(n.isDesktop&&"mouseenter")]:e[1]||(e[1]=(...h)=>n.addScrollButtons&&n.addScrollButtons(...h))},{[a.toHandlerKey(n.isDesktop&&"mouseleave")]:e[2]||(e[2]=(...h)=>n.removeScrollButtons&&n.removeScrollButtons(...h))}),[a.createVNode(f,{selection:n.selectedRows,"onUpdate:selection":e[0]||(e[0]=h=>n.selectedRows=h),loading:n.loading,"meta-key-selection":!1,"scroll-height":n.horizontalScroll&&n.tableHeight?`${n.tableHeight}px`:"","selection-mode":n.isMultiSelect?"multiple":"single","sort-mode":n.isMultiSort?"multiple":"single",value:n.loading?n.skeletonData:n.filteredData,"data-key":"id","filter-display":"menu",ref:"dataTableRef","removable-sort":"",scrollable:"",onRowSelect:n.onSelectRow,onRowUnselect:n.onUnselectRow,onValueChange:n.setSticky},{header:a.withCtx(()=>[n.hasSearch?a.renderSlot(n.$slots,"search-and-filters",{key:0},()=>{var h,p;return[a.createElementVNode("div",Q2e,[a.createElementVNode("div",X2e,[n.hasSearch?a.renderSlot(n.$slots,"search",{key:0},()=>[a.createElementVNode("label",J2e,[a.createVNode(s,{class:"mr-2",color:"gray-40",icon:"search",size:"md",type:""}),a.createVNode(l,{id:"search","model-value":n.search,"onUpdate:modelValue":n.debouncedSearch,"hide-clear":!!n.mq.md,placeholder:n.searchPlaceholder||n.$t("HC_SEARCH"),class:"text-base","control-class":"!border-0 !px-0"},null,8,["model-value","onUpdate:modelValue","hide-clear","placeholder"])])],!0):a.createCommentVNode("",!0)]),(h=n.filters)!=null&&h.length||n.$slots.tableActions?(a.openBlock(),a.createElementBlock("div",efe,[(p=n.filters)!=null&&p.length?a.renderSlot(n.$slots,"filters",{key:0},()=>[a.createVNode(d,{class:"z-[45] ml-2"},{trigger:a.withCtx(()=>[a.createElementVNode("div",tfe,[a.createVNode(s,{class:"filters-icon ml-0",color:"gray-40",icon:"filter",size:"md",onClick:n.filtersAction},null,8,["onClick"]),n.filtersCount?(a.openBlock(),a.createBlock(c,{key:0,class:"filters-count",color:"white"},{text:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.filtersCount),1)]),_:1})):a.createCommentVNode("",!0)])]),content:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t("HC_FILTERS")),1)]),_:1})],!0):a.createCommentVNode("",!0),n.$slots.tableActions?a.renderSlot(n.$slots,"tableActions",{key:1},void 0,!0):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)])]},!0):a.createCommentVNode("",!0)]),empty:a.withCtx(()=>e[3]||(e[3]=[])),default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.columns,h=>(a.openBlock(),a.createBlock(u,{key:h.key,field:h.key,"filter-field":h.key,header:h.name,sortable:h.sortable,frozen:h.frozen&&!n.overrideFrozen,class:a.normalizeClass([h.key,h.size?`cell-${h.size}`:"",{"text-right":h.key==="actions"}])},{body:a.withCtx(({data:p})=>[n.loading?n.loading?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["animate-shimmer",p.shimmer])}," ",2)):a.createCommentVNode("",!0):a.renderSlot(n.$slots,h.key,a.mergeProps({key:0,ref_for:!0},p),()=>[h.key.match(/\./)?(a.openBlock(),a.createElementBlock("div",rfe,a.toDisplayString(p[h.key.split(".")[0]][h.key.split(".")[1]]),1)):(a.openBlock(),a.createElementBlock("div",nfe,a.toDisplayString(p[h.key]),1))],!0)]),_:2},1032,["field","filter-field","header","sortable","frozen","class"]))),128))]),_:3},8,["selection","loading","scroll-height","selection-mode","sort-mode","value","onRowSelect","onRowUnselect","onValueChange"]),n.isEmpty?(a.openBlock(),a.createElementBlock("div",ife,[a.renderSlot(n.$slots,"no-results-illustration",{},()=>[a.createElementVNode("img",{class:"mb-5",src:n.noResultsPath},null,8,ofe)],!0),a.renderSlot(n.$slots,"no-results-text",a.normalizeProps(a.guardReactiveProps({search:n.search})),void 0,!0)])):a.createCommentVNode("",!0)],16,Y2e)}const afe=pe(G2e,[["render",sfe],["__scopeId","data-v-a76fc032"]]),lfe=a.defineComponent({name:"QTag",components:{},props:{tagClass:{type:String,default:""},bgColor:{type:String,default:"bg-green-0"},textColor:{type:String,default:"text-green-20"},shape:{type:String,default:"square"}},setup(n,{slots:e}){return{hasIcon:!!e.icon}}});function cfe(n,e,t,r,i,o){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["tag flex items-center",[n.tagClass,n.bgColor,n.textColor,"tag-"+n.shape,{"has-icon":n.hasIcon}]])},[n.hasIcon?a.renderSlot(n.$slots,"icon",{key:0},void 0,!0):a.createCommentVNode("",!0),a.renderSlot(n.$slots,"default",{},void 0,!0)],2)}const dfe=pe(lfe,[["render",cfe],["__scopeId","data-v-1a01844c"]]),WD="update:model-value",ufe=a.defineComponent({name:"QTextarea",inheritAttrs:!1,props:{modelValue:{type:[String,Number],default:""},controlClass:{type:String,default:""},persistentPlaceholder:{type:Boolean,default:!1},placeholder:{type:String,default:""},rows:{type:Number,default:2},status:{type:String,default:""},textareaClass:{type:String,default:""},isDisabled:{type:Boolean,default:!1}},emits:[WD],setup(n,{attrs:e,emit:t,slots:r}){const i=a.ref(!1),o=a.ref(),s=a.computed(()=>!!r.actions),l=a.computed(()=>!!e.disabled||!!n.isDisabled),c=a.computed(()=>[{[`has-${n.status}`]:n.status&&!l.value},{"is-focused":i.value},{"is-disabled":l.value}]),d=a.computed(()=>["textarea",n.textareaClass,{[n.status]:n.status&&!l.value},{populated:!!n.modelValue&&n.persistentPlaceholder},{"is-focused":i.value&&n.persistentPlaceholder}]),u=()=>{o.value.style.height="auto",o.value.style.height=o.value.scrollHeight+"px"},f=h=>{t(WD,h.target.value)};return a.onMounted(()=>{u()}),{focused:i,disabled:l,rootClasses:c,textarea:o,textareaClasses:d,hasActions:s,resizeTextarea:u,updateValue:f}}}),ffe=["id","disabled","placeholder","rows","value"],hfe={key:0,class:"action flex items-end py-2 pr-4"},pfe=["for"];function mfe(n,e,t,r,i,o){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([[n.rootClasses,n.controlClass],"control flex"])},[a.createElementVNode("textarea",a.mergeProps({id:String(n.$attrs.id),ref:"textarea",disabled:n.isDisabled,class:[n.textareaClasses],placeholder:n.persistentPlaceholder?"":n.placeholder,rows:n.rows,value:n.modelValue},n.$attrs,{onInput:e[0]||(e[0]=(...s)=>n.updateValue&&n.updateValue(...s)),onFocusin:e[1]||(e[1]=s=>n.focused=!n.focused),onFocusout:e[2]||(e[2]=s=>n.focused=!n.focused),onKeyup:e[3]||(e[3]=(...s)=>n.resizeTextarea&&n.resizeTextarea(...s))})," ",16,ffe),n.hasActions?(a.openBlock(),a.createElementBlock("div",hfe,[a.renderSlot(n.$slots,"actions",{},void 0,!0)])):a.createCommentVNode("",!0),n.persistentPlaceholder?(a.openBlock(),a.createElementBlock("label",{key:1,for:String(n.$attrs.id),class:"placeholder"},a.toDisplayString(n.placeholder),9,pfe)):a.createCommentVNode("",!0)],2)}const gfe=pe(ufe,[["render",mfe],["__scopeId","data-v-fda73545"]]),qD="update:modelValue",KD="undo-action",GD="timeout-done",yfe=a.defineComponent({name:"QToast",props:{modelValue:{type:Boolean,default:!1,required:!0},icon:{type:String,default:""},message:{type:String,default:""},variant:{type:String,default:""},duration:{type:Number,default:null,required:!1},position:{type:[String,Array],default:null,required:!1},withTransition:{type:Boolean,default:!1},transitionClass:{type:String,default:"component-slide-right"},closeButton:{type:Boolean,default:!1},undoButton:{type:Boolean,default:!1}},emits:[qD,KD,GD],setup(n,{emit:e}){const t=a.ref(null),r=a.computed({get:()=>n.modelValue,set:d=>{e(qD,d)}}),i=a.computed(()=>n.variant?"is-"+n.variant:""),o=a.computed(()=>n.position?"toast-fixed "+n.position:""),s=a.computed(()=>n.withTransition&&n.transitionClass),l=()=>{e(KD)},c=()=>{t.value=setTimeout(()=>{r.value=!1,e(GD)},n.duration)};return a.onBeforeUnmount(()=>{t.value&&(clearTimeout(t.value),t.value=null)}),a.watchEffect(()=>{r.value&&n.duration?c():t.value&&(clearTimeout(t.value),t.value=null)}),{show:r,statusClass:i,positionClass:o,computedTransition:s,startTimeout:c,undoAction:l}}}),bfe=["aria-live"],wfe={class:"message flex-grow"},vfe=["aria-label"];function Cfe(n,e,t,r,i,o){const s=a.resolveComponent("q-icon");return a.openBlock(),a.createBlock(a.Transition,{name:String(n.computedTransition),appear:""},{default:a.withCtx(()=>[n.show?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["toast flex",n.statusClass,n.positionClass,n.undoButton?"gap-2":"gap-3"]),role:"alert","aria-live":n.variant=="error"?"assertive":"polite","aria-atomic":"true"},[n.icon?(a.openBlock(),a.createBlock(s,{key:0,icon:n.icon,class:"status-icon",type:"fill","aria-hidden":"true"},null,8,["icon"])):a.createCommentVNode("",!0),a.createElementVNode("span",wfe,[a.renderSlot(n.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(n.message),1)],!0)]),n.undoButton?(a.openBlock(),a.createElementBlock("button",{key:1,class:"button-link",onClick:e[0]||(e[0]=l=>n.undoAction())},[a.renderSlot(n.$slots,"undo-message",{},()=>[a.createTextVNode(a.toDisplayString(n.$t("HC_UNDO")),1)],!0)])):a.createCommentVNode("",!0),n.closeButton?(a.openBlock(),a.createElementBlock("button",{key:2,class:"close-icon",onClick:e[1]||(e[1]=l=>n.show=!n.show),"aria-label":n.$t("HC_CLOSE")},[a.createVNode(s,{icon:"close",type:"line",color:"inkwell-30",class:"close","aria-hidden":"true"})],8,vfe)):a.createCommentVNode("",!0)],10,bfe)):a.createCommentVNode("",!0)]),_:3},8,["name"])}const kfe=pe(yfe,[["render",Cfe],["__scopeId","data-v-3862f72b"]]),Sfe={variantFlipOrder:{start:"sme",middle:"mse",end:"ems"},positionFlipOrder:{top:"tbrl",right:"rltb",bottom:"btrl",left:"lrbt"},position:"bottom",margin:8,padding:0},Efe=(n,e,t)=>{const{container:r,arrow:i,margin:o,padding:s,position:l,variantFlipOrder:c,positionFlipOrder:d}={container:document.documentElement.getBoundingClientRect(),...Sfe,...t},{left:u,top:f}=e.style;e.style.left="0",e.style.top="0";const h=n.getBoundingClientRect(),p=e.getBoundingClientRect(),m={t:h.top-p.height-o,b:h.bottom+o,r:h.right+o,l:h.left-p.width-o},y={vs:h.left,vm:h.left+h.width/2-p.width/2,ve:h.left+h.width-p.width,hs:h.top,hm:h.bottom-h.height/2-p.height/2,he:h.bottom-p.height},[b,w="middle"]=l.split("-"),v=d[b],k=c[w],{top:C,left:T,bottom:S,right:M}=r;for(const x of v){const O=x==="t"||x==="b";let P=m[x];const[N,_]=O?["top","left"]:["left","top"],[V,H]=O?[p.height,p.width]:[p.width,p.height],[L,D]=O?[S,M]:[M,S],[U,F]=O?[C,T]:[T,C];if(!(P<U||P+V+s>L))for(const R of k){let G=y[(O?"v":"h")+R];if(!(G<F||G+H+s>D)){if(G-=p[_],P-=p[N],e.style[_]=`${G}px`,e.style[N]=`${P}px`,i){const ne=O?h.width/2:h.height/2,Y=H/2,Z=ne>Y,j={s:Z?Y:ne,m:Y,e:Z?Y:H-ne},$={t:V,b:0,r:0,l:V},W=G+j[R],J=P+$[x];i.style[_]=`${W}px`,i.style[N]=`${J}px`}return x+R}}}return e.style.left=u,e.style.top=f,null},Mfe=(n,e,t)=>{const r=typeof n=="object"&&!(n instanceof HTMLElement)?n:{reference:n,popper:e,...t};return{update(i=r){const{reference:o,popper:s}=Object.assign(r,i);if(!s||!o)throw new Error("Popper- or reference-element missing.");return Efe(o,s,r)}}},Afe=a.defineComponent({name:"QTour",props:{name:{type:String,default:"default"},steps:{type:Array,required:!0},backdrop:{type:Boolean,default:!0},autoStart:{type:Boolean,default:!1},startDelay:{type:Number,default:2e3},highlight:{type:Boolean,default:!0},margin:{type:Number,default:8},buttonLabels:{type:Object,default:()=>{const{t:n}=bi();return{next:n("HC_NEXT"),back:n("HC_BACK"),end:n("HC_GOT_IT"),snooze:n("HC_SNOOZE")}}},saveProgress:{type:Boolean,default:!0},hideSnooze:{type:Boolean,default:!1},hideArrow:{type:Boolean,default:!1},noScroll:{type:Boolean,default:!1},backdropBlur:{type:Number,default:1},outlineWidth:{type:Number,default:4},animateButton:{type:Boolean,default:!1}},emits:["onTourStart","onTourStop","onTourEnd","onTourStep","onTourSnooze"],setup(n,{emit:e,expose:t}){const r=`tour-${n.name}`,i=`${r}-tooltip`,o=`${r}-backdrop`,s=`${r}-arrow`,l=a.ref(null),c=a.ref(null),d=a.ref(!1),u=a.computed(()=>n.steps.filter(L=>{var D;return!((D=L.skip)!=null&&D.call(L))})),f=a.reactive({currentStep:0,lastStep:0,nextStep:1,getCurrentStep:a.computed(()=>u.value[f.currentStep]),getLastStep:a.computed(()=>u.value[f.lastStep]),getNextStep:a.computed(()=>u.value[f.nextStep])}),h=a.computed(()=>f.currentStep===u.value.length-1?n.buttonLabels.end:n.buttonLabels.next),p=()=>{window.addEventListener("resize",H),window.addEventListener("scroll",H,!0)},m=()=>{window.removeEventListener("resize",H),window.removeEventListener("scroll",H,!0)},y=()=>{if(localStorage.getItem("tour-"+n.name)==="true")return;n.saveProgress?f.currentStep=parseInt(localStorage.getItem("tour-"+n.name)||"0"):f.currentStep=0;const L=async()=>{if(await M(f.currentStep),!l.value){const D=document.querySelector(f.getCurrentStep.target);l.value=Mfe(D,c.value,{position:f.getCurrentStep.placement||"right",margin:n.margin||8})}x(),p()};n.autoStart?setTimeout(L,n.startDelay):L(),e("onTourStart")},b=async()=>{var L,D;f.currentStep<u.value.length&&f.getCurrentStep.onAfter&&await f.getCurrentStep.onAfter(),n.backdrop&&((L=document.querySelector(`#${o}`))==null||L.setAttribute("data-hidden","")),(n.highlight||f.getLastStep.highlight)&&document.querySelectorAll(".tour-highlight").forEach(U=>U.classList.remove("tour-highlight")),(D=c.value)==null||D.setAttribute("data-hidden",""),m(),e("onTourStop")},w=L=>{b(),f.currentStep=0,f.lastStep=0,f.nextStep=1,localStorage.removeItem("tour-"+n.name),L&&y()},v=async()=>{if(f.getCurrentStep.onAfter&&await f.getCurrentStep.onAfter(),f.lastStep=f.currentStep,f.currentStep++,f.currentStep>=u.value.length){T();return}await M(f.currentStep),f.nextStep=f.currentStep+1,x()},k=async()=>{var L,D;if(await((D=(L=f.getCurrentStep).onAfter)==null?void 0:D.call(L)),await M(f.lastStep),f.currentStep=f.lastStep,f.lastStep--,f.lastStep<0&&(f.lastStep=0),f.currentStep<0){T();return}f.nextStep=f.currentStep+1,x()},C=()=>{b(),e("onTourSnooze")},T=()=>{b(),d.value=!1,e("onTourEnd")},S=async L=>{await M(L),f.currentStep=L,f.lastStep=L-1,f.lastStep<0&&(f.lastStep=0),f.nextStep=L+1,x()},M=async L=>{var U,F,R,G;document.querySelectorAll(".tour-highlight").forEach(ne=>ne.classList.remove("tour-highlight"));const D=document.querySelector(`#${o}`);D&&(D.style.clipPath=""),(U=c.value)==null||U.setAttribute("data-hidden",""),await((R=(F=u.value[L])==null?void 0:F.onBefore)==null?void 0:R.call(F)),(G=c.value)==null||G.removeAttribute("data-hidden")},x=async()=>{var L,D,U,F,R,G;if(O(),P(),(L=c.value)==null||L.setAttribute("data-hidden",""),f.getCurrentStep.tooltipWidth?(D=c.value)==null||D.style.setProperty("width",f.getCurrentStep.tooltipWidth):(U=c.value)==null||U.style.removeProperty("width"),!n.noScroll&&!f.getCurrentStep.noScroll){const ne=document.querySelector(f.getCurrentStep.target);if(ne){const Y=ne.getBoundingClientRect();Y.top>=0&&Y.left>=0&&Y.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&Y.right<=(window.innerWidth||document.documentElement.clientWidth)||ne.scrollIntoView({behavior:"smooth",block:"center"})}}(F=c.value)==null||F.removeAttribute("data-hidden"),(G=c.value)==null||G.setAttribute("data-arrow",((R=l.value)==null?void 0:R.update({reference:document.querySelector(f.getCurrentStep.target),position:f.getCurrentStep.placement||"right"}))||"right"),n.saveProgress&&localStorage.setItem("tour-"+n.name,f.currentStep.toString()),e("onTourStep")},O=()=>{if(document.querySelectorAll(".tour-highlight").forEach(U=>U.classList.remove("tour-highlight")),!(n.highlight&&f.getCurrentStep.highlight!==!1||f.getCurrentStep.highlight===!0))return;const D=document.querySelector(f.getCurrentStep.target);D==null||D.classList.add("tour-highlight")},P=()=>{const L=document.querySelector(`#${o}`),D=L==null?void 0:L.querySelector(".tour-highlight-outline");if(!n.backdrop||!L){L==null||L.setAttribute("data-hidden","");return}const U=document.querySelector(f.getCurrentStep.target);if(!U){L.setAttribute("data-hidden","");return}const F=U.getBoundingClientRect(),R=f.getCurrentStep.clipPadding??0,G=n.outlineWidth??4,ne=`path('M 0,0 L 0,${window.innerHeight} L ${window.innerWidth},${window.innerHeight} L ${window.innerWidth},0 Z M ${F.left-R},${F.top-R} L ${F.right+R},${F.top-R} L ${F.right+R},${F.bottom+R} L ${F.left-R},${F.bottom+R} Z')`,Y=`path('M ${F.left-R-G},${F.top-R-G} L ${F.right+R+G},${F.top-R-G} L ${F.right+R+G},${F.bottom+R+G} L ${F.left-R-G},${F.bottom+R+G} Z')`;L.style.clipPath=ne,n.highlight&&f.getCurrentStep.highlight!==!1?D.style.clipPath=Y:D.style.clipPath="none",L.removeAttribute("data-hidden")},N=()=>{d.value=!d.value},_=L=>{d.value=!1,localStorage.setItem("tour-"+n.name,L.toString()),y()},V=L=>Number(localStorage.getItem("tour-"+n.name))>=L,H=()=>{f.getCurrentStep&&(P(),O(),x())};return a.onMounted(()=>{c.value=document.querySelector(`#${i}`),n.autoStart&&y()}),a.onUnmounted(()=>{m()}),t({startTour:y,nextStep:v,lastStep:k,endTour:T,stopTour:b,snoozeTour:C,goToStep:S,resetTour:w}),{_CurrentStep:f,getNextLabel:h,startTour:y,nextStep:v,lastStep:k,endTour:T,stopTour:b,snoozeTour:C,goToStep:S,resetTour:w,props:n,tooltipId:i,backdropId:o,arrowId:s,showPopover:d,togglePopover:N,startStepFromPopover:_,isStepViewed:V,visibleSteps:u}}}),Tfe={class:"tour-popover"},Ife={key:0,class:"tour-steps-container"},xfe={class:"mt-[1px]"},Ofe={class:"popover-heading"},Dfe={class:"step-list"},Nfe={class:"text-black"},Pfe={class:"text-black/70"},Lfe=["onClick"],Bfe={class:"skip-cta"},_fe=["id"],Rfe=["id"],$fe={class:"tour-title"},Vfe=["innerHTML"],Ffe={class:"tour-actions"},jfe={class:"flex items-center gap-6"},zfe={class:"flex gap-1"},Hfe=["onClick"],Ufe={class:"flex items-center gap-1"},Zfe=["id"];function Wfe(n,e,t,r,i,o){const s=a.resolveComponent("q-icon"),l=a.resolveComponent("i18n-t");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",Tfe,[n.showPopover?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("button",{key:0,class:a.normalizeClass(["tour-fab",{"animate-bounce":n.props.animateButton}]),onClick:e[0]||(e[0]=(...c)=>n.togglePopover&&n.togglePopover(...c))},[a.createVNode(s,{icon:"quore-glyph",type:"",size:"sm",color:"white"})],2)),a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>[n.showPopover?(a.openBlock(),a.createElementBlock("div",Ife,[a.createElementVNode("button",{class:"hide-button",onClick:e[1]||(e[1]=(...c)=>n.togglePopover&&n.togglePopover(...c))},[a.createElementVNode("span",xfe,a.toDisplayString(n.$t("HC_HIDE")),1),a.createVNode(s,{icon:"close",type:"",size:"sm",color:"inkwell-30"})]),a.createElementVNode("div",Ofe,[a.createVNode(l,{keypath:"HC_CONTINUE_THE_TOUR",tag:"div",scope:"global",class:"flex items-center"},{icon:a.withCtx(()=>[a.createVNode(s,{icon:"quore-glyph",type:"",size:"lg",color:"green-quore",class:"mx-1"})]),_:1})]),a.createElementVNode("div",Dfe,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.visibleSteps,(c,d)=>(a.openBlock(),a.createElementBlock("div",{key:d,class:a.normalizeClass(["step-item",{viewed:n.isStepViewed(d)}])},[a.createElementVNode("div",null,[a.createElementVNode("span",Nfe,a.toDisplayString(d+1)+".",1),e[7]||(e[7]=a.createTextVNode()),a.createElementVNode("span",Pfe,a.toDisplayString(c.title),1)]),a.createElementVNode("button",{class:a.normalizeClass(["step-button",{viewed:n.isStepViewed(d)}]),onClick:u=>n.startStepFromPopover(d)},a.toDisplayString(n.isStepViewed(d)?n.$t("HC_OPEN"):n.$t("HC_START")),11,Lfe)],2))),128))]),a.createElementVNode("div",Bfe,[a.createElementVNode("button",{class:"text-blue-10 text-center mt-5",onClick:e[2]||(e[2]=c=>n.endTour())},a.toDisplayString(n.$t("HC_I_DONT_NEED_HELP")),1)])])):a.createCommentVNode("",!0)]),_:1})]),a.createElementVNode("div",{id:n.backdropId,class:"tour-backdrop","data-hidden":!0,style:a.normalizeStyle({"--tour-backdrop-blur":`${n.props.backdropBlur}px`})},e[8]||(e[8]=[a.createElementVNode("div",{class:"tour-highlight-outline"},null,-1)]),12,_fe),a.createElementVNode("div",{id:n.tooltipId,class:"tour-tooltip",role:"tooltip","data-arrow":"r","data-hidden":""},[n._CurrentStep.getCurrentStep?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("button",{class:"close-button",onClick:e[3]||(e[3]=a.withModifiers(c=>n.snoozeTour(),["prevent"]))},[a.createVNode(s,{icon:"close",size:"sm",color:"inkwell-40",type:""})]),a.renderSlot(n.$slots,"header",{currentStep:n._CurrentStep.getCurrentStep},()=>[a.createElementVNode("div",$fe,a.toDisplayString(n._CurrentStep.getCurrentStep.title),1)]),a.renderSlot(n.$slots,"body",{currentStep:n._CurrentStep.getCurrentStep},()=>[typeof n._CurrentStep.getCurrentStep.content=="object"?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n._CurrentStep.getCurrentStep.content),{key:0})):(a.openBlock(),a.createElementBlock("div",{key:1,class:"tour-content",innerHTML:n._CurrentStep.getCurrentStep.content},null,8,Vfe))]),a.renderSlot(n.$slots,"footer",{currentStep:n._CurrentStep.getCurrentStep,snoozeTour:n.snoozeTour,lastStep:n.lastStep,nextStep:n.nextStep,buttonLabels:n.props.buttonLabels},()=>[a.createElementVNode("div",Ffe,[a.createElementVNode("div",jfe,[n.props.hideSnooze?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("button",{key:0,class:"snooze-button",onClick:e[4]||(e[4]=a.withModifiers(c=>n.snoozeTour(),["prevent"]))},a.toDisplayString(n.props.buttonLabels.snooze),1)),a.createElementVNode("div",zfe,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.visibleSteps,(c,d)=>(a.openBlock(),a.createElementBlock("button",{key:d,onClick:u=>n.goToStep(d),class:a.normalizeClass(["w-2 h-2 rounded-full",n._CurrentStep.currentStep===d?"step-button-active bg-blue-20 border border-gray-30 scale-125":"step-button bg-blue-5"])},null,10,Hfe))),128))])]),a.createElementVNode("div",Ufe,[n._CurrentStep.lastStep<n._CurrentStep.currentStep?(a.openBlock(),a.createElementBlock("button",{key:0,class:"back-button",onClick:e[5]||(e[5]=a.withModifiers(c=>n.lastStep(),["prevent"]))},a.toDisplayString(n.props.buttonLabels.back),1)):a.createCommentVNode("",!0),a.createElementVNode("button",{class:"next-button",onClick:e[6]||(e[6]=a.withModifiers(c=>n.nextStep(),["prevent"]))},a.toDisplayString(n.getNextLabel),1)])])])],64)):a.createCommentVNode("",!0),n.props.hideArrow?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:1,id:n.arrowId,class:"tour-arrow"},null,8,Zfe))],8,Rfe)],64)}const qfe=pe(Afe,[["render",Wfe]]),Kfe={install:({config:n,provide:e})=>{n.globalProperties.$datetime=it,e("$datetime",it)}};function Ff(n){"@babel/helpers - typeof";return Ff=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ff(n)}function YD(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function ov(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?YD(Object(t),!0).forEach(function(r){Gfe(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):YD(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Gfe(n,e,t){return e=Yfe(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Yfe(n){var e=Qfe(n,"string");return Ff(e)=="symbol"?e:String(e)}function Qfe(n,e){if(Ff(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(Ff(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var QD={ripple:!1,inputStyle:null,locale:{startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",completed:"Completed",pending:"Pending",fileSizeTypes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",today:"Today",weekHeader:"Wk",firstDayOfWeek:0,showMonthAfterYear:!1,dateFormat:"mm/dd/yy",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyFilterMessage:"No results found",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyMessage:"No available options",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"Page {page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left"}},filterMatchModeOptions:{text:[zt.STARTS_WITH,zt.CONTAINS,zt.NOT_CONTAINS,zt.ENDS_WITH,zt.EQUALS,zt.NOT_EQUALS],numeric:[zt.EQUALS,zt.NOT_EQUALS,zt.LESS_THAN,zt.LESS_THAN_OR_EQUAL_TO,zt.GREATER_THAN,zt.GREATER_THAN_OR_EQUAL_TO],date:[zt.DATE_IS,zt.DATE_IS_NOT,zt.DATE_BEFORE,zt.DATE_AFTER]},zIndex:{modal:1100,overlay:1e3,menu:1e3,tooltip:1100},pt:void 0,ptOptions:{mergeSections:!0,mergeProps:!1},unstyled:!1,csp:{nonce:void 0}},Xfe=Symbol();function Jfe(n,e,t,r){if(n!==e){var i=document.getElementById(t),o=i.cloneNode(!0),s=i.getAttribute("href").replace(n,e);o.setAttribute("id",t+"-clone"),o.setAttribute("href",s),o.addEventListener("load",function(){i.remove(),o.setAttribute("id",t),r&&r()}),i.parentNode&&i.parentNode.insertBefore(o,i.nextSibling)}}var e1e={install:function(e,t){var r=t?ov(ov({},QD),t):ov({},QD),i={config:a.reactive(r),changeTheme:Jfe};e.config.globalProperties.$primevue=i,e.provide(Xfe,i)}};const t1e={global:{css:`
|
|
403
403
|
*[data-pd-ripple="true"]{
|
|
404
404
|
overflow: hidden;
|
|
405
405
|
position: relative;
|
|
@@ -486,4 +486,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
486
486
|
opacity: 1;
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
|
-
`},datatable:{root:({props:n})=>({class:["relative",{"flex flex-col":n.scrollable&&n.scrollHeight==="flex"},{"h-full":n.scrollable&&n.scrollHeight==="flex"}]}),loadingoverlay:{class:["absolute","top-0 left-0","z-20","flex items-center justify-center","w-full h-full","bg-surface-100/0 dark:bg-surface-800/0","transition duration-200"]},loadingicon:{class:"w-8 h-8 animate-spin hidden"},wrapper:({props:n})=>({class:[{relative:n.scrollable,"flex flex-col grow":n.scrollable&&n.scrollHeight==="flex"},{"h-full":n.scrollable&&n.scrollHeight==="flex"}]}),header:({props:n})=>({class:["font-bold",n.showGridlines?"border-x border-t border-b-0":"border-y-0 border-x-0","p-4","bg-surface-50 dark:bg-surface-800","border-surface-200 dark:border-surface-700","text-surface-700 dark:text-white/80"]}),table:{class:"w-full border-spacing-0 border-separate"},thead:({context:n})=>({class:[{"bg-surface-50 z-40 sticky":n.scrollable}]}),tbody:({instance:n,context:e})=>({class:[{"sticky z-20":n.frozenRow&&e.scrollable}]}),tfoot:({context:n})=>({class:[{"bg-surface-50 bottom-0 z-0":n.scrollable}]}),footer:{class:["font-bold","border-t-0 border-b border-x-0","p-4","bg-surface-50 dark:bg-surface-800","border-surface-200 dark:border-surface-700","text-surface-700 dark:text-white/80"]},column:{headercell:({context:n,props:e})=>({class:["font-bold",{"sticky z-20 border-b":e.frozen||e.frozen===""},{relative:n.resizable},"text-left",{"first:border-l border-y border-r":n==null?void 0:n.showGridlines},"border-0 border-b border-solid",(n==null?void 0:n.size)==="small"?"p-2":(n==null?void 0:n.size)==="large"?"p-5":"p-4",(e.sortable===""||e.sortable)&&n.sorted?"bg-primary-50 text-primary-700":"bg-surface-50 text-surface-700",(e.sortable===""||e.sortable)&&n.sorted?"dark:text-white dark:bg-primary-400/30":"dark:text-white/80 dark:bg-surface-800","border-surface-200 dark:border-surface-700 ",{"hover:bg-surface-100 dark:hover:bg-surface-400/30":(e.sortable===""||e.sortable)&&!(n!=null&&n.sorted)},"focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring focus-visible:ring-inset focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50",{"transition duration-200":e.sortable===""||e.sortable},{"cursor-pointer":e.sortable===""||e.sortable},{"overflow-hidden space-nowrap border-y bg-clip-padding":n.resizable}]}),headercontent:{class:"flex items-center"},sort:({context:n})=>({class:[n.sorted?"text-primary-500":"text-surface-700",n.sorted?"dark:text-primary-400":"dark:text-white/80"]}),bodycell:({props:n,context:e,state:t,parent:r})=>({class:[{"sticky box-border border-b":r.instance.frozenRow},{"sticky box-border border-b":n.frozen||n.frozen===""},"text-left","border-0 border-b border-solid",{"first:border-l border-r border-b":e==null?void 0:e.showGridlines},{"bg-surface-0 dark:bg-surface-800":r.instance.frozenRow||n.frozen||n.frozen===""},{"p-2":(e==null?void 0:e.size)==="small"&&!t.d_editing},{"p-5":(e==null?void 0:e.size)==="large"&&!t.d_editing},{"p-4":(e==null?void 0:e.size)!=="large"&&(e==null?void 0:e.size)!=="small"&&!t.d_editing},{"py-[0.6rem] px-2":t.d_editing},"border-surface-200 dark:border-surface-700"]}),footercell:({context:n})=>({class:["font-bold","text-left","border-0 border-b border-solid",{"border-x border-y":n==null?void 0:n.showGridlines},(n==null?void 0:n.size)==="small"?"p-2":(n==null?void 0:n.size)==="large"?"p-5":"p-4","border-surface-200 dark:border-surface-700","text-surface-700 dark:text-white/80","bg-surface-50 dark:bg-surface-800"]}),sorticon:({context:n})=>({class:["ml-2",n.sorted?"text-primary-700 dark:text-white/80":"text-surface-700 dark:text-white/70"]}),sortbadge:{class:["flex items-center justify-center align-middle","rounded-full","w-[1.143rem] leading-[1.143rem]","ml-2","text-primary-700 dark:text-white","bg-primary-50 dark:bg-primary-400/30"]},columnfilter:{class:"inline-flex items-center ml-auto"},filteroverlay:{class:["absolute top-0 left-0","border-0 dark:border","rounded-md","shadow-md","min-w-[12.5rem]","bg-surface-0 dark:bg-surface-800","text-surface-800 dark:text-white/80","dark:border-surface-700"]},filtermatchmodedropdown:{root:({state:n})=>({class:["flex","relative","my-2","w-full","rounded-md","bg-surface-0 dark:bg-surface-900","border border-surface-300 dark:border-surface-700","text-surface-800 dark:text-white/80","placeholder:text-surface-400 dark:placeholder:text-surface-500","transition-all","duration-200","hover:border-primary-500 dark:hover:border-primary-300",{"outline-none outline-offset-0 ring ring-primary-400/50 dark:ring-primary-300/50":n.focused},"cursor-pointer","select-none"]})},filterrowitems:{class:"m-0 p-0 py-3 list-none"},filterrowitem:({context:n})=>({class:["font-normal","leading-none","relative","border-0","rounded-none","m-0","py-3 px-5",{"text-surface-700 dark:text-white/80":!(n!=null&&n.highlighted)},{"bg-surface-0 dark:bg-surface-800 text-surface-700 dark:text-white/80":!(n!=null&&n.highlighted)},{"bg-primary-100 dark:bg-primary-400/40 text-primary-700 dark:text-white/80":n==null?void 0:n.highlighted},{"bg-primary-50 dark:bg-primary-400/40 text-primary-700 dark:text-white/80":n==null?void 0:n.highlighted},{"hover:bg-surface-100 dark:hover:bg-surface-600/80":!(n!=null&&n.highlighted)},{"hover:text-surface-700 hover:bg-surface-100 dark:hover:text-white dark:hover:bg-surface-600/80":!(n!=null&&n.highlighted)},"focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring focus-visible:ring-inset focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50","transition-shadow","duration-200","cursor-pointer","overflow-hidden","whitespace-nowrap"]}),filteroperator:{class:["px-5 py-3","border-b border-solid","rounded-t-md","text-surface-700 dark:text-white/80","border-surface-200 dark:border-surface-800","bg-surface-0 dark:bg-surface-700"]},filteroperatordropdown:{root:({state:n})=>({class:["inline-flex","relative","w-full","rounded-md","bg-surface-0 dark:bg-surface-900","border border-surface-300 dark:border-surface-700","transition-all","duration-200","hover:border-primary-500 dark:hover:border-primary-300",{"outline-none outline-offset-0 ring ring-primary-400/50 dark:ring-primary-300/50":n.focused},"cursor-pointer","select-none"]}),input:({props:n})=>({class:["font-sans","leading-none","block","flex-auto","bg-transparent","border-0",{"text-surface-800 dark:text-white/80":n.modelValue,"text-surface-400 dark:text-surface-500":!n.modelValue},"placeholder:text-surface-400 dark:placeholder:text-surface-500","w-[1%]","p-3","rounded-none","transition","duration-200","focus:outline-none focus:shadow-none","relative","cursor-pointer","overflow-hidden overflow-ellipsis","whitespace-nowrap","appearance-none"]}),trigger:{class:["flex items-center justify-center","shrink-0","bg-transparent","text-surface-500","w-12","rounded-tr-md","rounded-br-md"]},panel:{class:["absolute top-0 left-0","border-0 dark:border","rounded-md","shadow-md","bg-surface-0 dark:bg-surface-800","text-surface-800 dark:text-white/80","dark:border-surface-700"]},item:({context:n})=>({class:["font-normal","leading-none","relative","border-0","rounded-none","m-0","py-3 px-5",{"text-surface-700 dark:text-white/80":!n.focused&&!n.selected},{"bg-surface-50 dark:bg-surface-600/60 text-surface-700 dark:text-white/80":n.focused&&!n.selected},{"bg-primary-100 dark:bg-primary-400/40 text-primary-700 dark:text-white/80":n.focused&&n.selected},{"bg-primary-50 dark:bg-primary-400/40 text-primary-700 dark:text-white/80":!n.focused&&n.selected},{"hover:bg-surface-100 dark:hover:bg-surface-600/80":!n.focused&&!n.selected},{"hover:text-surface-700 hover:bg-surface-100 dark:hover:text-white dark:hover:bg-surface-600/80":n.focused&&!n.selected},"transition-shadow","duration-200","cursor-pointer","overflow-hidden","whitespace-nowrap"]})},filterconstraint:{class:["py-3 px-5","border-b border-solid","border-surface-200 dark:border-surface-700"]},filteraddrule:{class:"py-3 px-5"},filteraddrulebutton:{root:{class:["relative","items-center inline-flex text-center align-bottom justify-center","text-sm py-2 px-3 w-full","rounded-md","bg-transparent border-transparent","text-primary-500 dark:text-primary-400","hover:bg-primary-300/20","transition duration-200 ease-in-out","cursor-pointer overflow-hidden select-none"]},label:{class:"flex-auto grow-0"},icon:{class:"mr-2"}},filterremovebutton:{root:{class:["relative","items-center inline-flex text-center align-bottom justify-center","text-sm py-2 px-3 w-full mt-2","rounded-md","bg-transparent border-transparent","text-red-500 dark:text-red-400","hover:bg-red-300/20","transition duration-200 ease-in-out","cursor-pointer overflow-hidden select-none"]},label:{class:"flex-auto grow-0"},icon:{class:"mr-2"}},filterbuttonbar:{class:["flex items-center justify-between","py-3 px-5"]},filterclearbutton:{root:{class:["relative","items-center inline-flex text-center align-bottom justify-center","text-sm py-2 px-3","rounded-md","text-primary-500 border border-primary-500","hover:bg-primary-300/20","transition duration-200 ease-in-out","cursor-pointer overflow-hidden select-none"]}},filterapplybutton:{root:{class:["relative","items-center inline-flex text-center align-bottom justify-center","text-sm py-2 px-3","rounded-md","text-white dark:text-surface-900","bg-primary-500 dark:bg-primary-400","hover:bg-primary-600 dark:hover:bg-primary-300 hover:border-primary-600 dark:hover:border-primary-300","transition duration-200 ease-in-out","cursor-pointer overflow-hidden select-none"]}},filtermenubutton:({context:n})=>({class:["relative","inline-flex items-center justify-center","w-8 h-8","ml-2","rounded-full",{"bg-primary-50 text-primary-700":n.active},"dark:text-white/70 dark:hover:text-white/80 dark:bg-surface-800","hover:text-surface-700 hover:bg-surface-300/20","focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50","transition duration-200","cursor-pointer no-underline overflow-hidden"]}),headerfilterclearbutton:({context:n})=>({class:["relative","inline-flex items-center justify-center","text-left","border-none","m-0 p-0 ml-2","bg-transparent","cursor-pointer no-underline overflow-hidden select-none",{invisible:!n.hidden}]}),rowtoggler:{class:["relative","inline-flex items-center justify-center","text-left","m-0 p-0","w-8 h-8","border-0 rounded-full","text-surface-500 dark:text-white/70","bg-transparent","focus-visible:outline-none focus-visible:outline-offset-0","focus-visible:ring focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50","transition duration-200","overflow-hidden","cursor-pointer select-none"]},columnresizer:{class:["block","absolute top-0 right-0","w-2 h-full","m-0 p-0","border border-transparent","cursor-col-resize"]},rowreordericon:{class:"cursor-move"},roweditorinitbutton:{class:["relative","inline-flex items-center justify-center","text-left","w-8 h-8","border-0 rounded-full","text-surface-700 dark:text-white/70","border-transparent","focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50","hover:text-surface-700 hover:bg-surface-300/20","transition duration-200","overflow-hidden","cursor-pointer select-none"]},roweditorsavebutton:{class:["relative","inline-flex items-center justify-center","text-left","w-8 h-8","border-0 rounded-full","text-surface-700 dark:text-white/70","border-transparent","focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50","hover:text-surface-700 hover:bg-surface-300/20","transition duration-200","overflow-hidden","cursor-pointer select-none"]},roweditorcancelbutton:{class:["relative","inline-flex items-center justify-center","text-left","w-8 h-8","border-0 rounded-full","text-surface-700 dark:text-white/70","border-transparent","focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50","hover:text-surface-700 hover:bg-surface-300/20","transition duration-200","overflow-hidden","cursor-pointer select-none"]},radiobuttonwrapper:{class:["relative","inline-flex align-bottom","w-6 h-6","cursor-pointer select-none"]},radiobutton:({context:n})=>({class:["flex justify-center items-center","w-[1.571rem] h-[1.571rem]","border-2 rounded-full",{"text-surface-700 dark:text-white/80":!n.checked},{"bg-surface-0 dark:bg-surface-900":!n.checked},{"border-surface-300 dark:border-surface-700":!n.checked},{"border-primary-500 dark:border-primary-400":n.checked},{"bg-primary-500 dark:bg-primary-400":n.checked},{"hover:border-primary-500 dark:hover:border-primary-400":!n.disabled},{"outline-none outline-offset-0 ring ring-primary-400/50 ring-inset dark:ring-primary-300/50":n.focused},"transition duration-200 ease-in-out",{"cursor-default opacity-60":n.disabled}]}),radiobuttonicon:({context:n})=>({class:["block","rounded-full","w-3 h-3","bg-surface-0 dark:bg-surface-900","transition duration-200 transform",{"backface-hidden scale-10 invisible":n.checked===!1,"transform scale-100 visible":n.checked===!0}]}),headercheckboxwrapper:{class:["relative","inline-flex align-bottom","w-6 h-6","cursor-pointer select-none"]},headercheckbox:({context:n})=>({class:["flex items-center justify-center","border-2 rounded-lg","w-6 h-6","text-surface-600",{"border-surface-200 bg-surface-0 dark:border-surface-700 dark:bg-surface-900":!n.checked,"border-primary-500 bg-primary-500 dark:border-primary-400 dark:bg-primary-400":n.checked},"focus:outline-none focus:outline-offset-0",{"ring ring-primary-400/50 dark:ring-primary-300/50":n.focused},"transition-colors duration-200",{"cursor-default opacity-60":n.disabled}]}),headercheckboxicon:{class:["w-4 h-4","text-base leading-none","text-white dark:text-surface-900","transition-all duration-200"]},checkboxwrapper:{class:["relative","inline-flex align-bottom","w-6 h-6","cursor-pointer select-none"]},checkbox:({context:n})=>({class:["flex items-center justify-center","border-2 rounded-lg","w-6 h-6","text-surface-600",{"border-surface-200 bg-surface-0 dark:border-surface-700 dark:bg-surface-900":!n.checked,"border-primary-500 bg-primary-500 dark:border-primary-400 dark:bg-primary-400":n.checked},"focus:outline-none focus:outline-offset-0",{"ring ring-primary-400/50 dark:ring-primary-300/50":n.focused},"transition-colors duration-200",{"cursor-default opacity-60":n.disabled}]}),checkboxicon:{class:["w-4 h-4","text-base leading-none","text-white dark:text-surface-900","transition-all duration-200"]},transition:{enterFromClass:"opacity-0 scale-y-[0.8]",enterActiveClass:"transition-[transform,opacity] duration-[120ms] ease-[cubic-bezier(0,0,0.2,1)]",leaveActiveClass:"transition-opacity duration-100 ease-linear",leaveToClass:"opacity-0"}},bodyrow:({context:n,props:e})=>({class:["dark:text-white/80",{"bg-primary-50 text-primary-600 dark:bg-primary-400/30":n.selected},{"bg-surface-0 text-surface-600 dark:bg-surface-800":!n.selected},{"font-bold bg-surface-0 dark:bg-surface-800":e.frozenRow},{"odd:bg-surface-0 odd:text-surface-600 dark:odd:bg-surface-800 even:bg-surface-50 even:text-surface-600 dark:even:bg-surface-900/50":n.stripedRows},{"hover:bg-surface-300/20 hover:text-surface-600":e.selectionMode&&!n.selected},{"transition duration-200":e.selectionMode&&!n.selected||e.rowHover},{"cursor-pointer":e.selectionMode}]}),rowexpansion:{class:"bg-surface-0 dark:bg-surface-800 text-surface-600 dark:text-white/80"},rowgroupheader:{class:["sticky z-20","bg-surface-0 text-surface-600 dark:text-white/70","dark:bg-surface-800"]},rowgroupfooter:{class:["sticky z-20","bg-surface-0 text-surface-600 dark:text-white/70","dark:bg-surface-800"]},rowgrouptoggler:{class:["relative","inline-flex items-center justify-center","text-left","m-0 p-0","w-8 h-8","border-0 rounded-full","text-surface-500 dark:text-white/70","bg-transparent","focus-visible:outline-none focus-visible:outline-offset-0","focus-visible:ring focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50","transition duration-200","overflow-hidden","cursor-pointer select-none"]},rowgrouptogglericon:{class:"inline-block w-4 h-4"},resizehelper:{class:"absolute hidden w-[2px] z-20 bg-primary-500 dark:bg-primary-400"}},selectbutton:{root:({props:n})=>({class:[{"opacity-60 select-none pointer-events-none cursor-default":n.disabled}]}),button:({context:n})=>({class:["relative","leading-normal text-base","inline-flex items-center align-bottom text-center","px-4 py-2","rounded-lg",{"bg-gray-0 text-gray-40":!n.active,"button-active bg-white text-inkwell-30":n.active},{"opacity-60 select-none pointer-events-none cursor-default":n.disabled},"transition duration-200","cursor-pointer select-none overflow-hidden"]}),label:{class:"font-bold"}},galleria:{content:({parent:n,props:e})=>({class:["flex",{"flex-col":e.fullScreen},{"flex-col":n.props.thumbnailsPosition==="top"||n.props.thumbnailsPosition==="bottom","flex-row":n.props.thumbnailsPosition==="right"||n.props.thumbnailsPosition==="left"}]}),itemwrapper:({parent:n,props:e})=>({class:["group","flex relative","mt-14 md:mt-20 min-h-[74vh]",{"grow shrink w-0 justify-center":e.fullScreen},{"flex-col":n.props.indicatorsPosition==="bottom"||n.props.indicatorsPosition==="top","flex-row items-center":n.props.indicatorsPosition==="left"||n.props.indicatorsPosition==="right"},{"order-2":n.props.thumbnailsPosition==="top"||n.props.thumbnailsPosition==="left","flex-row":n.props.thumbnailsPosition==="right"}]}),itemcontainer:({parent:n})=>({class:["flex w-full md:w-screen h-full relative grow items-center",{"order-1":n.props.indicatorsPosition==="bottom"||n.props.indicatorsPosition==="right","order-2":n.props.indicatorsPosition==="top"||n.props.indicatorsPosition==="left"}]}),item:{class:["flex justify-center items-center","h-full w-full","rounded-lg overflow-auto","md:max-w-[592px] mx-auto"]},thumbnailwrapper:({parent:n})=>({class:["flex flex-col shrink-0",{"order-1":n.props.thumbnailsPosition==="top"||n.props.thumbnailsPosition==="left"},"overflow-auto"]}),thumbnailcontainer:({parent:n})=>({class:["flex","p-4","bg-transparent","md:max-w-[592px] mx-auto",{"flex-row":n.props.thumbnailsPosition==="top"||n.props.thumbnailsPosition==="bottom","flex-col grow":n.props.thumbnailsPosition==="right"||n.props.thumbnailsPosition==="left"}]}),previousthumbnailbutton:{class:["self-center relative","flex shrink-0 justify-center items-center overflow-hidden","m-2 ml-0","bg-transparent text-white w-8 h-8 rounded-full transition duration-200 ease-in-out","hover:bg-surface-0/10 hover:text-white","focus:outline-none focus:outline-offset-0"]},thumbnailitemscontainer:{class:"overflow-hidden w-full md:w-[30rem]"},thumbnailitems:({parent:n})=>({class:["flex",{"flex-col h-full":n.props.thumbnailsPosition==="right"||n.props.thumbnailsPosition==="left"}]}),thumbnailitem:({parent:n})=>({class:["flex items-center justify-center","grow shrink-0",{"w-full md:w-[25%]":n.props.thumbnailsPosition==="top"||n.props.thumbnailsPosition==="bottom"},"overflow-auto","cursor-pointer","hover:opacity-100","hover:transition-opacity","hover:duration-300"]}),nextthumbnailbutton:{class:["self-center relative","flex shrink-0 justify-center items-center overflow-hidden","m-2 mr-0","bg-transparent text-white w-8 h-8 rounded-full transition duration-200 ease-in-out","hover:bg-surface-0/10 hover:text-white","focus:outline-none focus:outline-offset-0"]},indicators:({parent:n})=>({class:["flex items-center justify-center","p-4",{"order-2":n.props.indicatorsPosition=="bottom","order-1":n.props.indicatorsPosition=="top","order-1 flex-col":n.props.indicatorsPosition=="left","flex-col order-2":n.props.indicatorsPosition=="right"},{"absolute z-10 bg-black/50":n.props.showIndicatorsOnItem},{"bottom-0 left-0 w-full items-start":n.props.indicatorsPosition=="bottom"&&n.props.showIndicatorsOnItem,"top-0 left-0 w-full items-start":n.props.indicatorsPosition=="top"&&n.props.showIndicatorsOnItem,"left-0 top-0 h-full items-start":n.props.indicatorsPosition=="left"&&n.props.showIndicatorsOnItem,"right-0 top-0 h-full items-start":n.props.indicatorsPosition=="right"&&n.props.showIndicatorsOnItem}]}),indicator:({parent:n})=>({class:[{"mr-2":n.props.indicatorsPosition=="bottom"||n.props.indicatorsPosition=="top","mb-2":n.props.indicatorsPosition=="left"||n.props.indicatorsPosition=="right"}]}),indicatorbutton:({context:n})=>({class:["w-2 h-2","rounded-full transition duration-200","focus:outline-none focus:outline-offset-0",{"bg-inkwell-30 hover:bg-surface-300 dark:bg-surface-700 dark:hover:bg-surface-600":!n.highlighted},{"bg-white hover:bg-primary-600":n.highlighted}]}),mask:{class:["fixed top-0 left-0 w-full h-full","flex items-center justify-center","bg-inkwell-40/95","image-overlay"]},closebutton:{class:["!absolute top-0 right-0 z-[1001]","flex justify-center items-center overflow-hidden","m-2","text-white bg-transparent w-12 h-12 rounded-full transition duration-200 ease-in-out","focus:outline-none"]},closeicon:{class:"w-6 h-6"},previousitembutton:({parent:n})=>({class:["inline-flex justify-center items-center overflow-hidden","bg-transparent text-white w-16 h-16 transition duration-200 ease-in-out rounded-md",{"opacity-0 group-hover:opacity-100":n.props.showItemNavigatorsOnHover},"mx-2","top-1/2 mt-[-0.5rem] left-0",{"!absolute":n.props.showItemNavigators,"!fixed":!n.props.showItemNavigators},"hover:bg-surface-0/10 hover:text-white","focus:outline-none focus:outline-offset-0"]}),nextitembutton:({parent:n})=>({class:["inline-flex justify-center items-center overflow-hidden","bg-transparent text-white w-16 h-16 transition duration-200 ease-in-out rounded-md",{"opacity-0 group-hover:opacity-100":n.props.showItemNavigatorsOnHover},"mx-2","top-1/2 mt-[-0.5rem] right-0",{"!absolute":n.props.showItemNavigators,"!fixed":!n.props.showItemNavigators},"hover:bg-surface-0/10 hover:text-white","focus:outline-none focus:outline-offset-0"]}),caption:{class:["absolute bottom-0 left-0 w-full","bg-black/50 text-white p-4"]},transition:{enterFromClass:"opacity-0 scale-75",enterActiveClass:"transition-all duration-150 ease-in-out",leaveActiveClass:"transition-all duration-150 ease-in",leaveToClass:"opacity-0 scale-75"}},fileupload:{input:{class:"hidden"},buttonbar:{class:["flex","flex-wrap","bg-surface-50","dark:bg-surface-800","text-surface-700","dark:text-white/80","p-5","gap-2","border","border-solid","border-surface-200","dark:border-surface-700","border-b-0","rounded-tr-lg","rounded-tl-lg"]},chooseButton:{class:["relative","items-center inline-flex text-center align-bottom justify-center","px-4 py-3","rounded-md","leading-[normal]","font-bold","text-white dark:text-surface-900","bg-primary-500 dark:bg-primary-400","border-primary-500 dark:border-primary-400","hover:bg-primary-600 dark:hover:bg-primary-300","overflow-hidden","cursor-pointer"]},chooseIcon:{class:["mr-2","inline-block"]},chooseButtonLabel:{class:["flex-1","font-bold"]},uploadbutton:{icon:{class:"mr-2"}},cancelbutton:{icon:{class:"mr-2"}},content:{class:["relative","bg-surface-0","dark:bg-surface-900","text-surface-700","dark:text-white/80","p-8","border","border-surface-200","dark:border-surface-700","rounded-b-lg"]},file:{class:["flex","items-center","flex-wrap","p-4","mb-2","last:mb-0","border","border-surface-200","dark:border-surface-700","gap-2","rounded"]},thumbnail:{class:"shrink-0"},fileName:{class:"mb-2"},fileSize:{class:"mr-2"},uploadicon:{class:"mr-2"},progressbar:{root:{class:["overflow-hidden","absolute top-0 left-0","border-0","h-2","rounded-md","w-full","bg-surface-100 dark:bg-surface-700"]},value:{class:["absolute flex items-center justify-center overflow-hidden","bg-primary-500 dark:bg-primary-400","m-0","h-full w-0","border-0","transition-width duration-1000 ease-in-out"]}}}},jf=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}));var zf={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},t1e=/([astvzqmhlc])([^astvzqmhlc]*)/gi,n1e=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function r1e(n){const e=n.match(n1e);return e?e.map(Number):[]}function XD(n){const e=[],t=String(n).trim();return t[0]!=="M"&&t[0]!=="m"||t.replace(t1e,(r,i,o)=>{const s=r1e(o);let l=i.toLowerCase(),c=i;if(l==="m"&&s.length>2&&(e.push([c,...s.splice(0,2)]),l="l",c=c==="m"?"l":"L"),s.length<zf[l])return"";for(e.push([c,...s.splice(0,zf[l])]);s.length>=zf[l]&&s.length&&zf[l];)e.push([c,...s.splice(0,zf[l])]);return""}),e}function JD(n,e){const t=n.x*Math.cos(e)-n.y*Math.sin(e),r=n.y*Math.cos(e)+n.x*Math.sin(e);n.x=t,n.y=r}function i1e(n,e,t){n.x+=e,n.y+=t}function eN(n,e){n.x*=e,n.y*=e}var y3=class m8{constructor(e){this.commands=[],e&&e instanceof m8?this.commands.push(...e.commands):e&&(this.commands=XD(e))}addPath(e){e&&e instanceof m8&&this.commands.push(...e.commands)}moveTo(e,t){this.commands.push(["M",e,t])}lineTo(e,t){this.commands.push(["L",e,t])}arc(e,t,r,i,o,s){this.commands.push(["AC",e,t,r,i,o,!!s])}arcTo(e,t,r,i,o){this.commands.push(["AT",e,t,r,i,o])}ellipse(e,t,r,i,o,s,l,c){this.commands.push(["E",e,t,r,i,o,s,l,!!c])}closePath(){this.commands.push(["Z"])}bezierCurveTo(e,t,r,i,o,s){this.commands.push(["C",e,t,r,i,o,s])}quadraticCurveTo(e,t,r,i){this.commands.push(["Q",e,t,r,i])}rect(e,t,r,i){this.commands.push(["R",e,t,r,i])}roundRect(e,t,r,i,o){typeof o>"u"?this.commands.push(["RR",e,t,r,i,0]):this.commands.push(["RR",e,t,r,i,o])}};function Hf(n,e){let t=0,r=0,i,o,s,l,c,d,u,f,h,p,m,y,b,w,v,k,C,T,S,M,x,O=null,P=null,N=null,_=null,V=null,H=null;n.beginPath();for(let L=0;L<e.length;++L){T=e[L][0],T!=="S"&&T!=="s"&&T!=="C"&&T!=="c"&&(O=null,P=null),T!=="T"&&T!=="t"&&T!=="Q"&&T!=="q"&&(N=null,_=null);let D;switch(T){case"m":case"M":D=e[L],T==="m"?(t+=D[1],r+=D[2]):(t=D[1],r=D[2]),(T==="M"||!V)&&(V={x:t,y:r}),n.moveTo(t,r);break;case"l":D=e[L],t+=D[1],r+=D[2],n.lineTo(t,r);break;case"L":D=e[L],t=D[1],r=D[2],n.lineTo(t,r);break;case"H":D=e[L],t=D[1],n.lineTo(t,r);break;case"h":D=e[L],t+=D[1],n.lineTo(t,r);break;case"V":D=e[L],r=D[1],n.lineTo(t,r);break;case"v":D=e[L],r+=D[1],n.lineTo(t,r);break;case"a":case"A":if(D=e[L],H===null)throw new Error("This should never happen");T==="a"?(t+=D[6],r+=D[7]):(t=D[6],r=D[7]),w=D[1],v=D[2],u=D[3]*Math.PI/180,s=!!D[4],l=!!D[5],c={x:t,y:r},d={x:(H.x-c.x)/2,y:(H.y-c.y)/2},JD(d,-u),f=d.x*d.x/(w*w)+d.y*d.y/(v*v),f>1&&(f=Math.sqrt(f),w*=f,v*=f),S={x:w*d.y/v,y:-(v*d.x)/w},h=w*w*v*v,p=w*w*d.y*d.y+v*v*d.x*d.x,l!==s?eN(S,Math.sqrt((h-p)/p)||0):eN(S,-Math.sqrt((h-p)/p)||0),o=Math.atan2((d.y-S.y)/v,(d.x-S.x)/w),i=Math.atan2(-(d.y+S.y)/v,-(d.x+S.x)/w),JD(S,u),i1e(S,(c.x+H.x)/2,(c.y+H.y)/2),n.save(),n.translate(S.x,S.y),n.rotate(u),n.scale(w,v),n.arc(0,0,1,o,i,!l),n.restore();break;case"C":D=e[L],O=D[3],P=D[4],t=D[5],r=D[6],n.bezierCurveTo(D[1],D[2],O,P,t,r);break;case"c":D=e[L],n.bezierCurveTo(D[1]+t,D[2]+r,D[3]+t,D[4]+r,D[5]+t,D[6]+r),O=D[3]+t,P=D[4]+r,t+=D[5],r+=D[6];break;case"S":D=e[L],(O===null||P===null)&&(O=t,P=r),n.bezierCurveTo(2*t-O,2*r-P,D[1],D[2],D[3],D[4]),O=D[1],P=D[2],t=D[3],r=D[4];break;case"s":D=e[L],(O===null||P===null)&&(O=t,P=r),n.bezierCurveTo(2*t-O,2*r-P,D[1]+t,D[2]+r,D[3]+t,D[4]+r),O=D[1]+t,P=D[2]+r,t+=D[3],r+=D[4];break;case"Q":D=e[L],N=D[1],_=D[2],t=D[3],r=D[4],n.quadraticCurveTo(N,_,t,r);break;case"q":D=e[L],N=D[1]+t,_=D[2]+r,t+=D[3],r+=D[4],n.quadraticCurveTo(N,_,t,r);break;case"T":D=e[L],(N===null||_===null)&&(N=t,_=r),N=2*t-N,_=2*r-_,t=D[1],r=D[2],n.quadraticCurveTo(N,_,t,r);break;case"t":D=e[L],(N===null||_===null)&&(N=t,_=r),N=2*t-N,_=2*r-_,t+=D[1],r+=D[2],n.quadraticCurveTo(N,_,t,r);break;case"z":case"Z":V&&(t=V.x,r=V.y),V=null,n.closePath();break;case"AC":D=e[L],t=D[1],r=D[2],b=D[3],o=D[4],i=D[5],M=D[6],n.arc(t,r,b,o,i,M);break;case"AT":D=e[L],m=D[1],y=D[2],t=D[3],r=D[4],b=D[5],n.arcTo(m,y,t,r,b);break;case"E":D=e[L],t=D[1],r=D[2],w=D[3],v=D[4],u=D[5],o=D[6],i=D[7],M=D[8],n.save(),n.translate(t,r),n.rotate(u),n.scale(w,v),n.arc(0,0,1,o,i,M),n.restore();break;case"R":D=e[L],t=D[1],r=D[2],k=D[3],C=D[4],V={x:t,y:r},n.rect(t,r,k,C);break;case"RR":D=e[L],t=D[1],r=D[2],k=D[3],C=D[4],x=D[5],V={x:t,y:r},n.roundRect(t,r,k,C,x);break;default:throw new Error(`Invalid path command: ${T}`)}H?(H.x=t,H.y=r):H={x:t,y:r}}}function sv(n,e,t,r,i=0){if(typeof i=="number"&&(i=[i]),Array.isArray(i)){if(i.length===0||i.length>4)throw new RangeError(`Failed to execute 'roundRect' on '${this.constructor.name}': ${i.length} radii provided. Between one and four radii are necessary.`);i.forEach(u=>{if(u<0)throw new RangeError(`Failed to execute 'roundRect' on '${this.constructor.name}': Radius value ${u} is negative.`)})}else return;if(i.length===1&&i[0]===0){this.rect(n,e,t,r);return}const o=Math.min(t,r)/2,s=Math.min(o,i[0]);let l=s,c=s,d=s;i.length===2&&(l=Math.min(o,i[1]),d=l),i.length===3&&(l=Math.min(o,i[1]),d=l,c=Math.min(o,i[2])),i.length===4&&(l=Math.min(o,i[1]),c=Math.min(o,i[2]),d=Math.min(o,i[3])),this.moveTo(n,e+r-d),this.arcTo(n,e,n+s,e,s),this.arcTo(n+t,e,n+t,e+l,l),this.arcTo(n+t,e+r,n+t-c,e+r,c),this.arcTo(n,e+r,n,e+r-d,d),this.moveTo(n,e)}function o1e(n){if(!n)return;const e=n.prototype.clip,t=n.prototype.fill,r=n.prototype.stroke,i=n.prototype.isPointInPath;n.prototype.clip=function(...s){if(s[0]instanceof y3){const c=s[0],d=s[1]||"nonzero";return Hf(this,c.commands),e.apply(this,[d])}const l=s[0]||"nonzero";return e.apply(this,[l])},n.prototype.fill=function(...s){if(s[0]instanceof y3){const c=s[0],d=s[1]||"nonzero";return Hf(this,c.commands),t.apply(this,[d])}const l=s[0]||"nonzero";return t.apply(this,[l])},n.prototype.stroke=function(s){s&&Hf(this,s.commands),r.apply(this)},n.prototype.isPointInPath=function(...s){if(s[0]instanceof y3){const l=s[0],c=s[1],d=s[2],u=s[3]||"nonzero";return Hf(this,l.commands),i.apply(this,[c,d,u])}return i.apply(this,s)}}function s1e(n){n&&!n.prototype.roundRect&&(n.prototype.roundRect=sv)}function a1e(n){n&&!n.prototype.roundRect&&(n.prototype.roundRect=sv)}const l1e=Object.freeze(Object.defineProperty({__proto__:null,Path2D:y3,applyPath2DToCanvasRenderingContext:o1e,applyRoundRectToCanvasRenderingContext2D:s1e,applyRoundRectToPath2D:a1e,buildPath:Hf,parsePath:XD,roundRect:sv},Symbol.toStringTag,{value:"Module"}));ee.DateTimePlugin=qfe,ee.PrimeVue=Jfe,ee.PrimeVuePresets=e1e,ee.QAccordion=OP,ee.QActivityItem=$P,ee.QAvatar=g8,ee.QBadge=ns,ee.QBanner=WP,ee.QBottomSheet=tC,ee.QButton=nC,ee.QButtonGroup=mV,ee.QCheckbox=MV,ee.QComment=$x,ee.QCommentSection=poe,ee.QCounter=woe,ee.QDataFilter=Poe,ee.QDataTable=ise,ee.QDataTableCell=Sw,ee.QDataTableHead=zx,ee.QDatePicker=zae,ee.QDivider=Wae,ee.QErrorModal=uM,ee.QFileUpload=Rx,ee.QFooterActions=Yae,ee.QFormGroup=rle,ee.QGrid=mle,ee.QIcon=Ra,ee.QIconActionGroup=kle,ee.QImageGallery=a6,ee.QInput=jx,ee.QList=Vle,ee.QMenu=Cb,ee.QModal=s6,ee.QModalContent=Ule,ee.QPageHeading=Kle,ee.QPageNavigation=Xle,ee.QPdfViewer=fM,ee.QPopover=hM,ee.QSelect=_0e,ee.QTable=afe,ee.QTag=dfe,ee.QTextarea=gfe,ee.QToast=kfe,ee.QTooltip=rc,ee.QTour=Wfe,ee.QWarningModal=l6,ee.QWysiwyg=kw,ee.filterData=$c,ee.mq=Qt,ee.useDeviceType=ic,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
|
|
489
|
+
`},datatable:{root:({props:n})=>({class:["relative",{"flex flex-col":n.scrollable&&n.scrollHeight==="flex"},{"h-full":n.scrollable&&n.scrollHeight==="flex"}]}),loadingoverlay:{class:["absolute","top-0 left-0","z-20","flex items-center justify-center","w-full h-full","bg-surface-100/0 dark:bg-surface-800/0","transition duration-200"]},loadingicon:{class:"w-8 h-8 animate-spin hidden"},wrapper:({props:n})=>({class:[{relative:n.scrollable,"flex flex-col grow":n.scrollable&&n.scrollHeight==="flex"},{"h-full":n.scrollable&&n.scrollHeight==="flex"}]}),header:({props:n})=>({class:["font-bold",n.showGridlines?"border-x border-t border-b-0":"border-y-0 border-x-0","p-4","bg-surface-50 dark:bg-surface-800","border-surface-200 dark:border-surface-700","text-surface-700 dark:text-white/80"]}),table:{class:"w-full border-spacing-0 border-separate"},thead:({context:n})=>({class:[{"bg-surface-50 z-40 sticky":n.scrollable}]}),tbody:({instance:n,context:e})=>({class:[{"sticky z-20":n.frozenRow&&e.scrollable}]}),tfoot:({context:n})=>({class:[{"bg-surface-50 bottom-0 z-0":n.scrollable}]}),footer:{class:["font-bold","border-t-0 border-b border-x-0","p-4","bg-surface-50 dark:bg-surface-800","border-surface-200 dark:border-surface-700","text-surface-700 dark:text-white/80"]},column:{headercell:({context:n,props:e})=>({class:["font-bold",{"sticky z-20 border-b":e.frozen||e.frozen===""},{relative:n.resizable},"text-left",{"first:border-l border-y border-r":n==null?void 0:n.showGridlines},"border-0 border-b border-solid",(n==null?void 0:n.size)==="small"?"p-2":(n==null?void 0:n.size)==="large"?"p-5":"p-4",(e.sortable===""||e.sortable)&&n.sorted?"bg-primary-50 text-primary-700":"bg-surface-50 text-surface-700",(e.sortable===""||e.sortable)&&n.sorted?"dark:text-white dark:bg-primary-400/30":"dark:text-white/80 dark:bg-surface-800","border-surface-200 dark:border-surface-700 ",{"hover:bg-surface-100 dark:hover:bg-surface-400/30":(e.sortable===""||e.sortable)&&!(n!=null&&n.sorted)},"focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring focus-visible:ring-inset focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50",{"transition duration-200":e.sortable===""||e.sortable},{"cursor-pointer":e.sortable===""||e.sortable},{"overflow-hidden space-nowrap border-y bg-clip-padding":n.resizable}]}),headercontent:{class:"flex items-center"},sort:({context:n})=>({class:[n.sorted?"text-primary-500":"text-surface-700",n.sorted?"dark:text-primary-400":"dark:text-white/80"]}),bodycell:({props:n,context:e,state:t,parent:r})=>({class:[{"sticky box-border border-b":r.instance.frozenRow},{"sticky box-border border-b":n.frozen||n.frozen===""},"text-left","border-0 border-b border-solid",{"first:border-l border-r border-b":e==null?void 0:e.showGridlines},{"bg-surface-0 dark:bg-surface-800":r.instance.frozenRow||n.frozen||n.frozen===""},{"p-2":(e==null?void 0:e.size)==="small"&&!t.d_editing},{"p-5":(e==null?void 0:e.size)==="large"&&!t.d_editing},{"p-4":(e==null?void 0:e.size)!=="large"&&(e==null?void 0:e.size)!=="small"&&!t.d_editing},{"py-[0.6rem] px-2":t.d_editing},"border-surface-200 dark:border-surface-700"]}),footercell:({context:n})=>({class:["font-bold","text-left","border-0 border-b border-solid",{"border-x border-y":n==null?void 0:n.showGridlines},(n==null?void 0:n.size)==="small"?"p-2":(n==null?void 0:n.size)==="large"?"p-5":"p-4","border-surface-200 dark:border-surface-700","text-surface-700 dark:text-white/80","bg-surface-50 dark:bg-surface-800"]}),sorticon:({context:n})=>({class:["ml-2",n.sorted?"text-primary-700 dark:text-white/80":"text-surface-700 dark:text-white/70"]}),sortbadge:{class:["flex items-center justify-center align-middle","rounded-full","w-[1.143rem] leading-[1.143rem]","ml-2","text-primary-700 dark:text-white","bg-primary-50 dark:bg-primary-400/30"]},columnfilter:{class:"inline-flex items-center ml-auto"},filteroverlay:{class:["absolute top-0 left-0","border-0 dark:border","rounded-md","shadow-md","min-w-[12.5rem]","bg-surface-0 dark:bg-surface-800","text-surface-800 dark:text-white/80","dark:border-surface-700"]},filtermatchmodedropdown:{root:({state:n})=>({class:["flex","relative","my-2","w-full","rounded-md","bg-surface-0 dark:bg-surface-900","border border-surface-300 dark:border-surface-700","text-surface-800 dark:text-white/80","placeholder:text-surface-400 dark:placeholder:text-surface-500","transition-all","duration-200","hover:border-primary-500 dark:hover:border-primary-300",{"outline-none outline-offset-0 ring ring-primary-400/50 dark:ring-primary-300/50":n.focused},"cursor-pointer","select-none"]})},filterrowitems:{class:"m-0 p-0 py-3 list-none"},filterrowitem:({context:n})=>({class:["font-normal","leading-none","relative","border-0","rounded-none","m-0","py-3 px-5",{"text-surface-700 dark:text-white/80":!(n!=null&&n.highlighted)},{"bg-surface-0 dark:bg-surface-800 text-surface-700 dark:text-white/80":!(n!=null&&n.highlighted)},{"bg-primary-100 dark:bg-primary-400/40 text-primary-700 dark:text-white/80":n==null?void 0:n.highlighted},{"bg-primary-50 dark:bg-primary-400/40 text-primary-700 dark:text-white/80":n==null?void 0:n.highlighted},{"hover:bg-surface-100 dark:hover:bg-surface-600/80":!(n!=null&&n.highlighted)},{"hover:text-surface-700 hover:bg-surface-100 dark:hover:text-white dark:hover:bg-surface-600/80":!(n!=null&&n.highlighted)},"focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring focus-visible:ring-inset focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50","transition-shadow","duration-200","cursor-pointer","overflow-hidden","whitespace-nowrap"]}),filteroperator:{class:["px-5 py-3","border-b border-solid","rounded-t-md","text-surface-700 dark:text-white/80","border-surface-200 dark:border-surface-800","bg-surface-0 dark:bg-surface-700"]},filteroperatordropdown:{root:({state:n})=>({class:["inline-flex","relative","w-full","rounded-md","bg-surface-0 dark:bg-surface-900","border border-surface-300 dark:border-surface-700","transition-all","duration-200","hover:border-primary-500 dark:hover:border-primary-300",{"outline-none outline-offset-0 ring ring-primary-400/50 dark:ring-primary-300/50":n.focused},"cursor-pointer","select-none"]}),input:({props:n})=>({class:["font-sans","leading-none","block","flex-auto","bg-transparent","border-0",{"text-surface-800 dark:text-white/80":n.modelValue,"text-surface-400 dark:text-surface-500":!n.modelValue},"placeholder:text-surface-400 dark:placeholder:text-surface-500","w-[1%]","p-3","rounded-none","transition","duration-200","focus:outline-none focus:shadow-none","relative","cursor-pointer","overflow-hidden overflow-ellipsis","whitespace-nowrap","appearance-none"]}),trigger:{class:["flex items-center justify-center","shrink-0","bg-transparent","text-surface-500","w-12","rounded-tr-md","rounded-br-md"]},panel:{class:["absolute top-0 left-0","border-0 dark:border","rounded-md","shadow-md","bg-surface-0 dark:bg-surface-800","text-surface-800 dark:text-white/80","dark:border-surface-700"]},item:({context:n})=>({class:["font-normal","leading-none","relative","border-0","rounded-none","m-0","py-3 px-5",{"text-surface-700 dark:text-white/80":!n.focused&&!n.selected},{"bg-surface-50 dark:bg-surface-600/60 text-surface-700 dark:text-white/80":n.focused&&!n.selected},{"bg-primary-100 dark:bg-primary-400/40 text-primary-700 dark:text-white/80":n.focused&&n.selected},{"bg-primary-50 dark:bg-primary-400/40 text-primary-700 dark:text-white/80":!n.focused&&n.selected},{"hover:bg-surface-100 dark:hover:bg-surface-600/80":!n.focused&&!n.selected},{"hover:text-surface-700 hover:bg-surface-100 dark:hover:text-white dark:hover:bg-surface-600/80":n.focused&&!n.selected},"transition-shadow","duration-200","cursor-pointer","overflow-hidden","whitespace-nowrap"]})},filterconstraint:{class:["py-3 px-5","border-b border-solid","border-surface-200 dark:border-surface-700"]},filteraddrule:{class:"py-3 px-5"},filteraddrulebutton:{root:{class:["relative","items-center inline-flex text-center align-bottom justify-center","text-sm py-2 px-3 w-full","rounded-md","bg-transparent border-transparent","text-primary-500 dark:text-primary-400","hover:bg-primary-300/20","transition duration-200 ease-in-out","cursor-pointer overflow-hidden select-none"]},label:{class:"flex-auto grow-0"},icon:{class:"mr-2"}},filterremovebutton:{root:{class:["relative","items-center inline-flex text-center align-bottom justify-center","text-sm py-2 px-3 w-full mt-2","rounded-md","bg-transparent border-transparent","text-red-500 dark:text-red-400","hover:bg-red-300/20","transition duration-200 ease-in-out","cursor-pointer overflow-hidden select-none"]},label:{class:"flex-auto grow-0"},icon:{class:"mr-2"}},filterbuttonbar:{class:["flex items-center justify-between","py-3 px-5"]},filterclearbutton:{root:{class:["relative","items-center inline-flex text-center align-bottom justify-center","text-sm py-2 px-3","rounded-md","text-primary-500 border border-primary-500","hover:bg-primary-300/20","transition duration-200 ease-in-out","cursor-pointer overflow-hidden select-none"]}},filterapplybutton:{root:{class:["relative","items-center inline-flex text-center align-bottom justify-center","text-sm py-2 px-3","rounded-md","text-white dark:text-surface-900","bg-primary-500 dark:bg-primary-400","hover:bg-primary-600 dark:hover:bg-primary-300 hover:border-primary-600 dark:hover:border-primary-300","transition duration-200 ease-in-out","cursor-pointer overflow-hidden select-none"]}},filtermenubutton:({context:n})=>({class:["relative","inline-flex items-center justify-center","w-8 h-8","ml-2","rounded-full",{"bg-primary-50 text-primary-700":n.active},"dark:text-white/70 dark:hover:text-white/80 dark:bg-surface-800","hover:text-surface-700 hover:bg-surface-300/20","focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50","transition duration-200","cursor-pointer no-underline overflow-hidden"]}),headerfilterclearbutton:({context:n})=>({class:["relative","inline-flex items-center justify-center","text-left","border-none","m-0 p-0 ml-2","bg-transparent","cursor-pointer no-underline overflow-hidden select-none",{invisible:!n.hidden}]}),rowtoggler:{class:["relative","inline-flex items-center justify-center","text-left","m-0 p-0","w-8 h-8","border-0 rounded-full","text-surface-500 dark:text-white/70","bg-transparent","focus-visible:outline-none focus-visible:outline-offset-0","focus-visible:ring focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50","transition duration-200","overflow-hidden","cursor-pointer select-none"]},columnresizer:{class:["block","absolute top-0 right-0","w-2 h-full","m-0 p-0","border border-transparent","cursor-col-resize"]},rowreordericon:{class:"cursor-move"},roweditorinitbutton:{class:["relative","inline-flex items-center justify-center","text-left","w-8 h-8","border-0 rounded-full","text-surface-700 dark:text-white/70","border-transparent","focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50","hover:text-surface-700 hover:bg-surface-300/20","transition duration-200","overflow-hidden","cursor-pointer select-none"]},roweditorsavebutton:{class:["relative","inline-flex items-center justify-center","text-left","w-8 h-8","border-0 rounded-full","text-surface-700 dark:text-white/70","border-transparent","focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50","hover:text-surface-700 hover:bg-surface-300/20","transition duration-200","overflow-hidden","cursor-pointer select-none"]},roweditorcancelbutton:{class:["relative","inline-flex items-center justify-center","text-left","w-8 h-8","border-0 rounded-full","text-surface-700 dark:text-white/70","border-transparent","focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50","hover:text-surface-700 hover:bg-surface-300/20","transition duration-200","overflow-hidden","cursor-pointer select-none"]},radiobuttonwrapper:{class:["relative","inline-flex align-bottom","w-6 h-6","cursor-pointer select-none"]},radiobutton:({context:n})=>({class:["flex justify-center items-center","w-[1.571rem] h-[1.571rem]","border-2 rounded-full",{"text-surface-700 dark:text-white/80":!n.checked},{"bg-surface-0 dark:bg-surface-900":!n.checked},{"border-surface-300 dark:border-surface-700":!n.checked},{"border-primary-500 dark:border-primary-400":n.checked},{"bg-primary-500 dark:bg-primary-400":n.checked},{"hover:border-primary-500 dark:hover:border-primary-400":!n.disabled},{"outline-none outline-offset-0 ring ring-primary-400/50 ring-inset dark:ring-primary-300/50":n.focused},"transition duration-200 ease-in-out",{"cursor-default opacity-60":n.disabled}]}),radiobuttonicon:({context:n})=>({class:["block","rounded-full","w-3 h-3","bg-surface-0 dark:bg-surface-900","transition duration-200 transform",{"backface-hidden scale-10 invisible":n.checked===!1,"transform scale-100 visible":n.checked===!0}]}),headercheckboxwrapper:{class:["relative","inline-flex align-bottom","w-6 h-6","cursor-pointer select-none"]},headercheckbox:({context:n})=>({class:["flex items-center justify-center","border-2 rounded-lg","w-6 h-6","text-surface-600",{"border-surface-200 bg-surface-0 dark:border-surface-700 dark:bg-surface-900":!n.checked,"border-primary-500 bg-primary-500 dark:border-primary-400 dark:bg-primary-400":n.checked},"focus:outline-none focus:outline-offset-0",{"ring ring-primary-400/50 dark:ring-primary-300/50":n.focused},"transition-colors duration-200",{"cursor-default opacity-60":n.disabled}]}),headercheckboxicon:{class:["w-4 h-4","text-base leading-none","text-white dark:text-surface-900","transition-all duration-200"]},checkboxwrapper:{class:["relative","inline-flex align-bottom","w-6 h-6","cursor-pointer select-none"]},checkbox:({context:n})=>({class:["flex items-center justify-center","border-2 rounded-lg","w-6 h-6","text-surface-600",{"border-surface-200 bg-surface-0 dark:border-surface-700 dark:bg-surface-900":!n.checked,"border-primary-500 bg-primary-500 dark:border-primary-400 dark:bg-primary-400":n.checked},"focus:outline-none focus:outline-offset-0",{"ring ring-primary-400/50 dark:ring-primary-300/50":n.focused},"transition-colors duration-200",{"cursor-default opacity-60":n.disabled}]}),checkboxicon:{class:["w-4 h-4","text-base leading-none","text-white dark:text-surface-900","transition-all duration-200"]},transition:{enterFromClass:"opacity-0 scale-y-[0.8]",enterActiveClass:"transition-[transform,opacity] duration-[120ms] ease-[cubic-bezier(0,0,0.2,1)]",leaveActiveClass:"transition-opacity duration-100 ease-linear",leaveToClass:"opacity-0"}},bodyrow:({context:n,props:e})=>({class:["dark:text-white/80",{"bg-primary-50 text-primary-600 dark:bg-primary-400/30":n.selected},{"bg-surface-0 text-surface-600 dark:bg-surface-800":!n.selected},{"font-bold bg-surface-0 dark:bg-surface-800":e.frozenRow},{"odd:bg-surface-0 odd:text-surface-600 dark:odd:bg-surface-800 even:bg-surface-50 even:text-surface-600 dark:even:bg-surface-900/50":n.stripedRows},{"hover:bg-surface-300/20 hover:text-surface-600":e.selectionMode&&!n.selected},{"transition duration-200":e.selectionMode&&!n.selected||e.rowHover},{"cursor-pointer":e.selectionMode}]}),rowexpansion:{class:"bg-surface-0 dark:bg-surface-800 text-surface-600 dark:text-white/80"},rowgroupheader:{class:["sticky z-20","bg-surface-0 text-surface-600 dark:text-white/70","dark:bg-surface-800"]},rowgroupfooter:{class:["sticky z-20","bg-surface-0 text-surface-600 dark:text-white/70","dark:bg-surface-800"]},rowgrouptoggler:{class:["relative","inline-flex items-center justify-center","text-left","m-0 p-0","w-8 h-8","border-0 rounded-full","text-surface-500 dark:text-white/70","bg-transparent","focus-visible:outline-none focus-visible:outline-offset-0","focus-visible:ring focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50","transition duration-200","overflow-hidden","cursor-pointer select-none"]},rowgrouptogglericon:{class:"inline-block w-4 h-4"},resizehelper:{class:"absolute hidden w-[2px] z-20 bg-primary-500 dark:bg-primary-400"}},selectbutton:{root:({props:n})=>({class:[{"opacity-60 select-none pointer-events-none cursor-default":n.disabled}]}),button:({context:n})=>({class:["relative","leading-normal text-base","inline-flex items-center align-bottom text-center","px-4 py-2","rounded-lg",{"bg-gray-0 text-gray-40":!n.active,"button-active bg-white text-inkwell-30":n.active},{"opacity-60 select-none pointer-events-none cursor-default":n.disabled},"transition duration-200","cursor-pointer select-none overflow-hidden"]}),label:{class:"font-bold"}},galleria:{content:({parent:n,props:e})=>({class:["flex",{"flex-col":e.fullScreen},{"flex-col":n.props.thumbnailsPosition==="top"||n.props.thumbnailsPosition==="bottom","flex-row":n.props.thumbnailsPosition==="right"||n.props.thumbnailsPosition==="left"}]}),itemwrapper:({parent:n,props:e})=>({class:["group","flex relative","mt-14 md:mt-20 min-h-[74vh]",{"grow shrink w-0 justify-center":e.fullScreen},{"flex-col":n.props.indicatorsPosition==="bottom"||n.props.indicatorsPosition==="top","flex-row items-center":n.props.indicatorsPosition==="left"||n.props.indicatorsPosition==="right"},{"order-2":n.props.thumbnailsPosition==="top"||n.props.thumbnailsPosition==="left","flex-row":n.props.thumbnailsPosition==="right"}]}),itemcontainer:({parent:n})=>({class:["flex w-full md:w-screen h-full relative grow items-center",{"order-1":n.props.indicatorsPosition==="bottom"||n.props.indicatorsPosition==="right","order-2":n.props.indicatorsPosition==="top"||n.props.indicatorsPosition==="left"}]}),item:{class:["flex justify-center items-center","h-full w-full","rounded-lg overflow-auto","md:max-w-[592px] mx-auto"]},thumbnailwrapper:({parent:n})=>({class:["flex flex-col shrink-0",{"order-1":n.props.thumbnailsPosition==="top"||n.props.thumbnailsPosition==="left"},"overflow-auto"]}),thumbnailcontainer:({parent:n})=>({class:["flex","p-4","bg-transparent","md:max-w-[592px] mx-auto",{"flex-row":n.props.thumbnailsPosition==="top"||n.props.thumbnailsPosition==="bottom","flex-col grow":n.props.thumbnailsPosition==="right"||n.props.thumbnailsPosition==="left"}]}),previousthumbnailbutton:{class:["self-center relative","flex shrink-0 justify-center items-center overflow-hidden","m-2 ml-0","bg-transparent text-white w-8 h-8 rounded-full transition duration-200 ease-in-out","hover:bg-surface-0/10 hover:text-white","focus:outline-none focus:outline-offset-0"]},thumbnailitemscontainer:{class:"overflow-hidden w-full md:w-[30rem]"},thumbnailitems:({parent:n})=>({class:["flex",{"flex-col h-full":n.props.thumbnailsPosition==="right"||n.props.thumbnailsPosition==="left"}]}),thumbnailitem:({parent:n})=>({class:["flex items-center justify-center","grow shrink-0",{"w-full md:w-[25%]":n.props.thumbnailsPosition==="top"||n.props.thumbnailsPosition==="bottom"},"overflow-auto","cursor-pointer","hover:opacity-100","hover:transition-opacity","hover:duration-300"]}),nextthumbnailbutton:{class:["self-center relative","flex shrink-0 justify-center items-center overflow-hidden","m-2 mr-0","bg-transparent text-white w-8 h-8 rounded-full transition duration-200 ease-in-out","hover:bg-surface-0/10 hover:text-white","focus:outline-none focus:outline-offset-0"]},indicators:({parent:n})=>({class:["flex items-center justify-center","p-4",{"order-2":n.props.indicatorsPosition=="bottom","order-1":n.props.indicatorsPosition=="top","order-1 flex-col":n.props.indicatorsPosition=="left","flex-col order-2":n.props.indicatorsPosition=="right"},{"absolute z-10 bg-black/50":n.props.showIndicatorsOnItem},{"bottom-0 left-0 w-full items-start":n.props.indicatorsPosition=="bottom"&&n.props.showIndicatorsOnItem,"top-0 left-0 w-full items-start":n.props.indicatorsPosition=="top"&&n.props.showIndicatorsOnItem,"left-0 top-0 h-full items-start":n.props.indicatorsPosition=="left"&&n.props.showIndicatorsOnItem,"right-0 top-0 h-full items-start":n.props.indicatorsPosition=="right"&&n.props.showIndicatorsOnItem}]}),indicator:({parent:n})=>({class:[{"mr-2":n.props.indicatorsPosition=="bottom"||n.props.indicatorsPosition=="top","mb-2":n.props.indicatorsPosition=="left"||n.props.indicatorsPosition=="right"}]}),indicatorbutton:({context:n})=>({class:["w-2 h-2","rounded-full transition duration-200","focus:outline-none focus:outline-offset-0",{"bg-inkwell-30 hover:bg-surface-300 dark:bg-surface-700 dark:hover:bg-surface-600":!n.highlighted},{"bg-white hover:bg-primary-600":n.highlighted}]}),mask:{class:["fixed top-0 left-0 w-full h-full","flex items-center justify-center","bg-inkwell-40/95","image-overlay"]},closebutton:{class:["!absolute top-0 right-0 z-[1001]","flex justify-center items-center overflow-hidden","m-2","text-white bg-transparent w-12 h-12 rounded-full transition duration-200 ease-in-out","focus:outline-none"]},closeicon:{class:"w-6 h-6"},previousitembutton:({parent:n})=>({class:["inline-flex justify-center items-center overflow-hidden","bg-transparent text-white w-16 h-16 transition duration-200 ease-in-out rounded-md",{"opacity-0 group-hover:opacity-100":n.props.showItemNavigatorsOnHover},"mx-2","top-1/2 mt-[-0.5rem] left-0",{"!absolute":n.props.showItemNavigators,"!fixed":!n.props.showItemNavigators},"hover:bg-surface-0/10 hover:text-white","focus:outline-none focus:outline-offset-0"]}),nextitembutton:({parent:n})=>({class:["inline-flex justify-center items-center overflow-hidden","bg-transparent text-white w-16 h-16 transition duration-200 ease-in-out rounded-md",{"opacity-0 group-hover:opacity-100":n.props.showItemNavigatorsOnHover},"mx-2","top-1/2 mt-[-0.5rem] right-0",{"!absolute":n.props.showItemNavigators,"!fixed":!n.props.showItemNavigators},"hover:bg-surface-0/10 hover:text-white","focus:outline-none focus:outline-offset-0"]}),caption:{class:["absolute bottom-0 left-0 w-full","bg-black/50 text-white p-4"]},transition:{enterFromClass:"opacity-0 scale-75",enterActiveClass:"transition-all duration-150 ease-in-out",leaveActiveClass:"transition-all duration-150 ease-in",leaveToClass:"opacity-0 scale-75"}},fileupload:{input:{class:"hidden"},buttonbar:{class:["flex","flex-wrap","bg-surface-50","dark:bg-surface-800","text-surface-700","dark:text-white/80","p-5","gap-2","border","border-solid","border-surface-200","dark:border-surface-700","border-b-0","rounded-tr-lg","rounded-tl-lg"]},chooseButton:{class:["relative","items-center inline-flex text-center align-bottom justify-center","px-4 py-3","rounded-md","leading-[normal]","font-bold","text-white dark:text-surface-900","bg-primary-500 dark:bg-primary-400","border-primary-500 dark:border-primary-400","hover:bg-primary-600 dark:hover:bg-primary-300","overflow-hidden","cursor-pointer"]},chooseIcon:{class:["mr-2","inline-block"]},chooseButtonLabel:{class:["flex-1","font-bold"]},uploadbutton:{icon:{class:"mr-2"}},cancelbutton:{icon:{class:"mr-2"}},content:{class:["relative","bg-surface-0","dark:bg-surface-900","text-surface-700","dark:text-white/80","p-8","border","border-surface-200","dark:border-surface-700","rounded-b-lg"]},file:{class:["flex","items-center","flex-wrap","p-4","mb-2","last:mb-0","border","border-surface-200","dark:border-surface-700","gap-2","rounded"]},thumbnail:{class:"shrink-0"},fileName:{class:"mb-2"},fileSize:{class:"mr-2"},uploadicon:{class:"mr-2"},progressbar:{root:{class:["overflow-hidden","absolute top-0 left-0","border-0","h-2","rounded-md","w-full","bg-surface-100 dark:bg-surface-700"]},value:{class:["absolute flex items-center justify-center overflow-hidden","bg-primary-500 dark:bg-primary-400","m-0","h-full w-0","border-0","transition-width duration-1000 ease-in-out"]}}}},jf=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}));var zf={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},n1e=/([astvzqmhlc])([^astvzqmhlc]*)/gi,r1e=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function i1e(n){const e=n.match(r1e);return e?e.map(Number):[]}function XD(n){const e=[],t=String(n).trim();return t[0]!=="M"&&t[0]!=="m"||t.replace(n1e,(r,i,o)=>{const s=i1e(o);let l=i.toLowerCase(),c=i;if(l==="m"&&s.length>2&&(e.push([c,...s.splice(0,2)]),l="l",c=c==="m"?"l":"L"),s.length<zf[l])return"";for(e.push([c,...s.splice(0,zf[l])]);s.length>=zf[l]&&s.length&&zf[l];)e.push([c,...s.splice(0,zf[l])]);return""}),e}function JD(n,e){const t=n.x*Math.cos(e)-n.y*Math.sin(e),r=n.y*Math.cos(e)+n.x*Math.sin(e);n.x=t,n.y=r}function o1e(n,e,t){n.x+=e,n.y+=t}function eN(n,e){n.x*=e,n.y*=e}var y3=class m8{constructor(e){this.commands=[],e&&e instanceof m8?this.commands.push(...e.commands):e&&(this.commands=XD(e))}addPath(e){e&&e instanceof m8&&this.commands.push(...e.commands)}moveTo(e,t){this.commands.push(["M",e,t])}lineTo(e,t){this.commands.push(["L",e,t])}arc(e,t,r,i,o,s){this.commands.push(["AC",e,t,r,i,o,!!s])}arcTo(e,t,r,i,o){this.commands.push(["AT",e,t,r,i,o])}ellipse(e,t,r,i,o,s,l,c){this.commands.push(["E",e,t,r,i,o,s,l,!!c])}closePath(){this.commands.push(["Z"])}bezierCurveTo(e,t,r,i,o,s){this.commands.push(["C",e,t,r,i,o,s])}quadraticCurveTo(e,t,r,i){this.commands.push(["Q",e,t,r,i])}rect(e,t,r,i){this.commands.push(["R",e,t,r,i])}roundRect(e,t,r,i,o){typeof o>"u"?this.commands.push(["RR",e,t,r,i,0]):this.commands.push(["RR",e,t,r,i,o])}};function Hf(n,e){let t=0,r=0,i,o,s,l,c,d,u,f,h,p,m,y,b,w,v,k,C,T,S,M,x,O=null,P=null,N=null,_=null,V=null,H=null;n.beginPath();for(let L=0;L<e.length;++L){T=e[L][0],T!=="S"&&T!=="s"&&T!=="C"&&T!=="c"&&(O=null,P=null),T!=="T"&&T!=="t"&&T!=="Q"&&T!=="q"&&(N=null,_=null);let D;switch(T){case"m":case"M":D=e[L],T==="m"?(t+=D[1],r+=D[2]):(t=D[1],r=D[2]),(T==="M"||!V)&&(V={x:t,y:r}),n.moveTo(t,r);break;case"l":D=e[L],t+=D[1],r+=D[2],n.lineTo(t,r);break;case"L":D=e[L],t=D[1],r=D[2],n.lineTo(t,r);break;case"H":D=e[L],t=D[1],n.lineTo(t,r);break;case"h":D=e[L],t+=D[1],n.lineTo(t,r);break;case"V":D=e[L],r=D[1],n.lineTo(t,r);break;case"v":D=e[L],r+=D[1],n.lineTo(t,r);break;case"a":case"A":if(D=e[L],H===null)throw new Error("This should never happen");T==="a"?(t+=D[6],r+=D[7]):(t=D[6],r=D[7]),w=D[1],v=D[2],u=D[3]*Math.PI/180,s=!!D[4],l=!!D[5],c={x:t,y:r},d={x:(H.x-c.x)/2,y:(H.y-c.y)/2},JD(d,-u),f=d.x*d.x/(w*w)+d.y*d.y/(v*v),f>1&&(f=Math.sqrt(f),w*=f,v*=f),S={x:w*d.y/v,y:-(v*d.x)/w},h=w*w*v*v,p=w*w*d.y*d.y+v*v*d.x*d.x,l!==s?eN(S,Math.sqrt((h-p)/p)||0):eN(S,-Math.sqrt((h-p)/p)||0),o=Math.atan2((d.y-S.y)/v,(d.x-S.x)/w),i=Math.atan2(-(d.y+S.y)/v,-(d.x+S.x)/w),JD(S,u),o1e(S,(c.x+H.x)/2,(c.y+H.y)/2),n.save(),n.translate(S.x,S.y),n.rotate(u),n.scale(w,v),n.arc(0,0,1,o,i,!l),n.restore();break;case"C":D=e[L],O=D[3],P=D[4],t=D[5],r=D[6],n.bezierCurveTo(D[1],D[2],O,P,t,r);break;case"c":D=e[L],n.bezierCurveTo(D[1]+t,D[2]+r,D[3]+t,D[4]+r,D[5]+t,D[6]+r),O=D[3]+t,P=D[4]+r,t+=D[5],r+=D[6];break;case"S":D=e[L],(O===null||P===null)&&(O=t,P=r),n.bezierCurveTo(2*t-O,2*r-P,D[1],D[2],D[3],D[4]),O=D[1],P=D[2],t=D[3],r=D[4];break;case"s":D=e[L],(O===null||P===null)&&(O=t,P=r),n.bezierCurveTo(2*t-O,2*r-P,D[1]+t,D[2]+r,D[3]+t,D[4]+r),O=D[1]+t,P=D[2]+r,t+=D[3],r+=D[4];break;case"Q":D=e[L],N=D[1],_=D[2],t=D[3],r=D[4],n.quadraticCurveTo(N,_,t,r);break;case"q":D=e[L],N=D[1]+t,_=D[2]+r,t+=D[3],r+=D[4],n.quadraticCurveTo(N,_,t,r);break;case"T":D=e[L],(N===null||_===null)&&(N=t,_=r),N=2*t-N,_=2*r-_,t=D[1],r=D[2],n.quadraticCurveTo(N,_,t,r);break;case"t":D=e[L],(N===null||_===null)&&(N=t,_=r),N=2*t-N,_=2*r-_,t+=D[1],r+=D[2],n.quadraticCurveTo(N,_,t,r);break;case"z":case"Z":V&&(t=V.x,r=V.y),V=null,n.closePath();break;case"AC":D=e[L],t=D[1],r=D[2],b=D[3],o=D[4],i=D[5],M=D[6],n.arc(t,r,b,o,i,M);break;case"AT":D=e[L],m=D[1],y=D[2],t=D[3],r=D[4],b=D[5],n.arcTo(m,y,t,r,b);break;case"E":D=e[L],t=D[1],r=D[2],w=D[3],v=D[4],u=D[5],o=D[6],i=D[7],M=D[8],n.save(),n.translate(t,r),n.rotate(u),n.scale(w,v),n.arc(0,0,1,o,i,M),n.restore();break;case"R":D=e[L],t=D[1],r=D[2],k=D[3],C=D[4],V={x:t,y:r},n.rect(t,r,k,C);break;case"RR":D=e[L],t=D[1],r=D[2],k=D[3],C=D[4],x=D[5],V={x:t,y:r},n.roundRect(t,r,k,C,x);break;default:throw new Error(`Invalid path command: ${T}`)}H?(H.x=t,H.y=r):H={x:t,y:r}}}function sv(n,e,t,r,i=0){if(typeof i=="number"&&(i=[i]),Array.isArray(i)){if(i.length===0||i.length>4)throw new RangeError(`Failed to execute 'roundRect' on '${this.constructor.name}': ${i.length} radii provided. Between one and four radii are necessary.`);i.forEach(u=>{if(u<0)throw new RangeError(`Failed to execute 'roundRect' on '${this.constructor.name}': Radius value ${u} is negative.`)})}else return;if(i.length===1&&i[0]===0){this.rect(n,e,t,r);return}const o=Math.min(t,r)/2,s=Math.min(o,i[0]);let l=s,c=s,d=s;i.length===2&&(l=Math.min(o,i[1]),d=l),i.length===3&&(l=Math.min(o,i[1]),d=l,c=Math.min(o,i[2])),i.length===4&&(l=Math.min(o,i[1]),c=Math.min(o,i[2]),d=Math.min(o,i[3])),this.moveTo(n,e+r-d),this.arcTo(n,e,n+s,e,s),this.arcTo(n+t,e,n+t,e+l,l),this.arcTo(n+t,e+r,n+t-c,e+r,c),this.arcTo(n,e+r,n,e+r-d,d),this.moveTo(n,e)}function s1e(n){if(!n)return;const e=n.prototype.clip,t=n.prototype.fill,r=n.prototype.stroke,i=n.prototype.isPointInPath;n.prototype.clip=function(...s){if(s[0]instanceof y3){const c=s[0],d=s[1]||"nonzero";return Hf(this,c.commands),e.apply(this,[d])}const l=s[0]||"nonzero";return e.apply(this,[l])},n.prototype.fill=function(...s){if(s[0]instanceof y3){const c=s[0],d=s[1]||"nonzero";return Hf(this,c.commands),t.apply(this,[d])}const l=s[0]||"nonzero";return t.apply(this,[l])},n.prototype.stroke=function(s){s&&Hf(this,s.commands),r.apply(this)},n.prototype.isPointInPath=function(...s){if(s[0]instanceof y3){const l=s[0],c=s[1],d=s[2],u=s[3]||"nonzero";return Hf(this,l.commands),i.apply(this,[c,d,u])}return i.apply(this,s)}}function a1e(n){n&&!n.prototype.roundRect&&(n.prototype.roundRect=sv)}function l1e(n){n&&!n.prototype.roundRect&&(n.prototype.roundRect=sv)}const c1e=Object.freeze(Object.defineProperty({__proto__:null,Path2D:y3,applyPath2DToCanvasRenderingContext:s1e,applyRoundRectToCanvasRenderingContext2D:a1e,applyRoundRectToPath2D:l1e,buildPath:Hf,parsePath:XD,roundRect:sv},Symbol.toStringTag,{value:"Module"}));ee.DateTimePlugin=Kfe,ee.PrimeVue=e1e,ee.PrimeVuePresets=t1e,ee.QAccordion=OP,ee.QActivityItem=$P,ee.QAvatar=g8,ee.QBadge=ns,ee.QBanner=WP,ee.QBottomSheet=tC,ee.QButton=nC,ee.QButtonGroup=mV,ee.QCheckbox=MV,ee.QComment=$x,ee.QCommentSection=poe,ee.QCounter=woe,ee.QDataFilter=Poe,ee.QDataTable=ise,ee.QDataTableCell=Sw,ee.QDataTableHead=zx,ee.QDatePicker=zae,ee.QDivider=Wae,ee.QErrorModal=uM,ee.QFileUpload=Rx,ee.QFooterActions=Yae,ee.QFormGroup=rle,ee.QGrid=mle,ee.QIcon=Ra,ee.QIconActionGroup=kle,ee.QImageGallery=a6,ee.QInput=jx,ee.QList=Vle,ee.QMenu=Cb,ee.QModal=s6,ee.QModalContent=Ule,ee.QPageHeading=Kle,ee.QPageNavigation=Xle,ee.QPdfViewer=fM,ee.QPopover=hM,ee.QSelect=_0e,ee.QTable=afe,ee.QTag=dfe,ee.QTextarea=gfe,ee.QToast=kfe,ee.QTooltip=rc,ee.QTour=qfe,ee.QWarningModal=l6,ee.QWysiwyg=kw,ee.filterData=$c,ee.mq=Qt,ee.useDeviceType=ic,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
|