@vue-pdf-viewer/viewer 2.4.0-beta.5 → 2.4.0-beta.6

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 CHANGED
@@ -4188,7 +4188,7 @@ class RZ {
4188
4188
  }
4189
4189
  }
4190
4190
  }
4191
- const Fl = RZ.getInstance(), oJ = /* @__PURE__ */ new Date("2025-03-28T07:41:28.142Z"), wd = "Please visit https://www.vue-pdf-viewer.dev/license-management/ to generate a new license key.", aZ = {
4191
+ const Fl = RZ.getInstance(), oJ = /* @__PURE__ */ new Date("2025-03-28T08:02:53.245Z"), wd = "Please visit https://www.vue-pdf-viewer.dev/license-management/ to generate a new license key.", aZ = {
4192
4192
  invalidLicense: `You are currently using without a valid license. ${wd}`,
4193
4193
  mismatchedDomain: `Your license key is not valid for the current domain / IP. ${wd}`,
4194
4194
  expired: `Your license key has expired. ${wd}`,
@@ -4333,7 +4333,7 @@ function DJ(l) {
4333
4333
  return;
4334
4334
  }
4335
4335
  const { isValidKey: c, isValidating: R, invalidatedMessage: b } = Q;
4336
- if (console.log("Watching license", Q), !(c && W)) {
4336
+ if (!(c && W)) {
4337
4337
  if (!W) {
4338
4338
  F(V), Z.isValidating = !1;
4339
4339
  return;
@@ -29,7 +29,7 @@
29
29
  <div class="${d}"></div>
30
30
  `,U.appendChild(F),F},wW=new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0}),qZ=U=>{const d=new Date(U);return wW.format(d)},xW=U=>{const d=typeof U=="string"?new Date(U):U;return new Intl.DateTimeFormat("en-US",{month:"short",day:"2-digit",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}).format(d).replace(/(\d{4}),\s*/,"$1・")};function _Z(U,d,F,Z,Q,c){let V=F;switch([_.DualPage].includes(Q)&&c>=3&&(V=2*F),!0){case(Q===_.DualPage&&c>=3):break;default:V=F;break}switch(Z){case bl.ActualSize:return 1;case bl.PageFit:return Math.min((U.clientWidth-QF)/V,(U.clientHeight-2*AW)/d);case bl.PageWidth:return(U.clientWidth-QF)/V}}const $Z=U=>{if(!U||U.length<15||!U.startsWith("D:"))return U;U=U.substring(2);const d=U.substring(0,4),F=U.substring(4,6),Z=U.substring(6,8),Q=U.substring(8,10),c=U.substring(10,12),V=U.charAt(12);let W,R;V==="Z"||V==="+"||V==="-"?(W="00",R=12):(W=U.substring(12,14),R=14);const N=U.substring(R).replaceAll("'","");return new Date(`${d}-${F}-${Z}T${Q}:${c}:${W}${N}`)},jW=U=>{if(!U||U.length<3)return"rgb(0, 0, 0)";const[d,F,Z]=U;return`rgb(${d}, ${F}, ${Z})`};function HU(){const d=new Error().stack?.split(`
31
31
  `);if(!d||d.length<4)return"unknown";const F=d[3],Z=F.match(/\((.+?)\)/)||F.match(/at\s+(.+)/);return Z?Z[1].split("/").slice(-2).join("/"):"unknown"}function td(U){const d=U.level==="debug",F=`[VPV ${U.level.charAt(0).toUpperCase()+U.level.slice(1)}]`,Z=U.origin||HU();return d?[`%c ${F}(${Z}):
32
- `,"color: #2563eb;",...U.args]:[F,`(${Z}):`,...U.args]}class hU{static instance;isProduction;constructor(){this.isProduction=!0}static getInstance(){return hU.instance||(hU.instance=new hU),hU.instance}debug(...d){if(!this.isProduction){const F={level:"debug",args:d,origin:HU()};console.debug(...td(F))}}info(...d){if(this.isProduction)console.info("[VPV Info]:",...d);else{const F={level:"info",args:d,origin:HU()};console.info(...td(F))}}warn(...d){if(this.isProduction)console.warn("[VPV Warning]:",...d);else{const F={level:"warn",args:d,origin:HU()};console.warn(...td(F))}}error(...d){if(this.isProduction)console.error("[VPV Error]:",...d);else{const F={level:"error",args:d,origin:HU()};console.error(...td(F))}}}const g=hU.getInstance(),OW=new Date("2025-03-28T07:41:28.142Z"),dF="Please visit https://www.vue-pdf-viewer.dev/license-management/ to generate a new license key.",TU={invalidLicense:`You are currently using without a valid license. ${dF}`,mismatchedDomain:`Your license key is not valid for the current domain / IP. ${dF}`,expired:`Your license key has expired. ${dF}`,exceededVersion:"Your license does not support the current version of Vue PDF Viewer. The library version you are using exceeds the supported range of your license.",invalidSignature:"Invalid license key: Signature mismatch"};function gW(U){const d=atob(U),F=new Uint8Array(d.length);for(let Z=0;Z<d.length;Z++)F[Z]=d.charCodeAt(Z);return F.buffer}const l0=window.crypto.getRandomValues(new Uint8Array(32)).reduce((U,d)=>U+d.toString(16).padStart(2,"0"),"");function rW(U){const d=U.replace(/-----BEGIN PUBLIC KEY-----/,"").replace(/-----END PUBLIC KEY-----/,"").replace(/\s+/g,""),F=atob(d),Z=new Uint8Array(F.length);for(let Q=0;Q<F.length;Q++)Z[Q]=F.charCodeAt(Q);return Z.buffer}function KW(U){try{const d=JSON.stringify(U);return btoa(d+l0)}catch(d){return g.error("Error encoding license data:",d),""}}function vW(U){if(!U)return null;try{const F=atob(U).slice(0,-l0.length);return JSON.parse(F)}catch(d){return g.error("Error decoding license data:",d),null}}async function HW(U,d="SHA-256"){try{const{data:F,signature:Z}=JSON.parse(atob(U)),Q=rW(`-----BEGIN PUBLIC KEY-----
32
+ `,"color: #2563eb;",...U.args]:[F,`(${Z}):`,...U.args]}class hU{static instance;isProduction;constructor(){this.isProduction=!0}static getInstance(){return hU.instance||(hU.instance=new hU),hU.instance}debug(...d){if(!this.isProduction){const F={level:"debug",args:d,origin:HU()};console.debug(...td(F))}}info(...d){if(this.isProduction)console.info("[VPV Info]:",...d);else{const F={level:"info",args:d,origin:HU()};console.info(...td(F))}}warn(...d){if(this.isProduction)console.warn("[VPV Warning]:",...d);else{const F={level:"warn",args:d,origin:HU()};console.warn(...td(F))}}error(...d){if(this.isProduction)console.error("[VPV Error]:",...d);else{const F={level:"error",args:d,origin:HU()};console.error(...td(F))}}}const g=hU.getInstance(),OW=new Date("2025-03-28T08:02:53.245Z"),dF="Please visit https://www.vue-pdf-viewer.dev/license-management/ to generate a new license key.",TU={invalidLicense:`You are currently using without a valid license. ${dF}`,mismatchedDomain:`Your license key is not valid for the current domain / IP. ${dF}`,expired:`Your license key has expired. ${dF}`,exceededVersion:"Your license does not support the current version of Vue PDF Viewer. The library version you are using exceeds the supported range of your license.",invalidSignature:"Invalid license key: Signature mismatch"};function gW(U){const d=atob(U),F=new Uint8Array(d.length);for(let Z=0;Z<d.length;Z++)F[Z]=d.charCodeAt(Z);return F.buffer}const l0=window.crypto.getRandomValues(new Uint8Array(32)).reduce((U,d)=>U+d.toString(16).padStart(2,"0"),"");function rW(U){const d=U.replace(/-----BEGIN PUBLIC KEY-----/,"").replace(/-----END PUBLIC KEY-----/,"").replace(/\s+/g,""),F=atob(d),Z=new Uint8Array(F.length);for(let Q=0;Q<F.length;Q++)Z[Q]=F.charCodeAt(Q);return Z.buffer}function KW(U){try{const d=JSON.stringify(U);return btoa(d+l0)}catch(d){return g.error("Error encoding license data:",d),""}}function vW(U){if(!U)return null;try{const F=atob(U).slice(0,-l0.length);return JSON.parse(F)}catch(d){return g.error("Error decoding license data:",d),null}}async function HW(U,d="SHA-256"){try{const{data:F,signature:Z}=JSON.parse(atob(U)),Q=rW(`-----BEGIN PUBLIC KEY-----
33
33
  MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxBYxngKoXlUVluqotveU
34
34
  Uo8+98JHEHr6exhswsBqEVS3T4ZqvsVjyBm3FDEE4A5YpwyqISj5Wp1QS+9rhK0L
35
35
  s0fAhxRYtziHJGiARcHURSjLbsVuH9IsBDzIjay3j+MD42TumiVh8IzQ8SJvBmTL
@@ -37,7 +37,7 @@ og5u0mm7ZWAA7GkYbPEYKYWbRLOi0qCt9tbBKgw4X7hNRII3z6CZ+vuTnZeV3z66
37
37
  S/1sHTjahq5BGlUI1HTJxZak7LMc4rFZUEva6V968smppdHMIiRGahpoxumm2rSa
38
38
  RAlnlcoyjS63Wl8cOZxYDNM7qoF7OBLopKHsrU2gftEX40Q3cKaSPW7BOrHbiyfg
39
39
  QwIDAQAB
40
- -----END PUBLIC KEY-----`),c=await window.crypto.subtle.importKey("spki",Q,{name:"RSA-PSS",hash:d},!0,["verify"]);if(!await window.crypto.subtle.verify({name:"RSA-PSS",saltLength:32},c,gW(Z),new TextEncoder().encode(atob(F))))throw new Error(TU.invalidSignature);return JSON.parse(atob(F))}catch{throw new Error(TU.invalidLicense)}}const PW=U=>{const d=IZ("VPV:license",null,localStorage),F=l.computed(()=>d.value?vW(d.value):null),Z=l.reactive({...s0,...F.value}),Q=l.computed(()=>l.unref(U??null)),c=(W,R)=>W==="specific"?R===window.location.host:window.location.host.includes(R),V=W=>{g.debug("validateLicense",W);const{avu:R,exp:N}=W;if(!N)throw new Error("License is missing expiration timestamp");if(N>Number.MAX_SAFE_INTEGER/1e3)throw new Error("Invalid expiration timestamp: value too large");const t=new Date(N*1e3),n=new Date().getTime();if(t.getTime()<n)throw new Error(TU.expired);if(!R)throw new Error("License is missing available until version timestamp");if(R>Number.MAX_SAFE_INTEGER/1e3)throw new Error("Invalid available until version timestamp: value too large");const a=new Date(R*1e3);if(g.debug("availableUntilTimestamp",a),a.getTime()<OW.getTime())throw new Error(TU.exceededVersion);if(!c(W.dmt,W.dm))throw new Error(TU.mismatchedDomain)};return l.watch(Q,async W=>{if(W){Z.isValidating=!0;try{const R=await HW(W);V(R),Z.isValidKey=!0,Z.type=R.t}catch(R){Z.isValidKey=!1,Z.invalidatedMessage=R instanceof Error?R.message:String(R)}finally{Z.isValidating=!1,Z.isValidated=!0}d.value=KW({isValidKey:Z.isValidKey,isValidating:Z.isValidating,isValidated:Z.isValidated,type:Z.type})}},{immediate:!0}),l.provide(R0,Z),l.provide(N0,Q),{license:Z}};function U0(U){g.info("Starting from Vue PDF Viewer v2.0.0, the licensing mechanism has been updated. Please visit https://www.vue-pdf-viewer.dev/license-management to generate a new license key and ensure the watermark is properly removed.");const d=l.inject(R0,l.reactive({...s0})),F=l.inject(N0,void 0),Z=l.ref(null),Q=(c,V=TU.invalidLicense)=>{Z.value&&(Z.value.remove(),Z.value=null);const W=LW(c);g.warn(V),Z.value=W};return l.watch([()=>d,U,()=>F?.value],([c,V,W])=>{if(!V){g.debug("NoContainerYet");return}const{isValidKey:R,isValidating:N,invalidatedMessage:t}=c;if(console.log("Watching license",c),!(R&&W)){if(!W){Q(V),d.isValidating=!1;return}N||(R?Z.value&&(Z.value.remove(),Z.value=null):Q(V,t))}},{deep:!0}),Vd(Z,c=>{c.length&&Q(U.value)},{attributes:!0,childList:!0,subtree:!0,characterData:!0}),Vd(U,c=>{const V=l.unref(d);if(!(V&&V.isValidKey)&&c.length)for(const W of c)(W?.target===Z.value||W?.removedNodes?.[0]===Z.value||W.type==="childList"&&W.target===U.value&&W.target.lastChild!==Z.value)&&Q(U.value)},{attributes:!0,childList:!0,subtree:!0,characterData:!0}),{license:d}}const FF={searchable:!0,navigatable:!0,zoomable:!0,themeSwitchable:!0,fullscreen:!0,downloadable:!0,newFileOpenable:!0,printable:!0,sidebarEnable:!0,thumbnailViewable:!0,rotatable:!0,pointerSwitchable:!0,docPropertiesEnabled:!0,jumpNavigatable:!0,scrollingSwitchable:!0,pageViewSwitchable:!0,commentPanelEnabled:!0},nd={en_US:wZ,zh_CN:UW,it_IT:dW,pt_PT:FW,th_TH:ZW};bl.PageFit,v.Vertical,_.SinglePage;const d0={left:0,top:0},pl=100,YU=.25,ZF=10,QF=20,AW=1,cF=0,fW=4,VF=Symbol(),qW={keyword:"",regExp:new RegExp(" "),wholeWords:!1},F0="vpv-highlight__text-current",Z0=Symbol(),_W=Symbol(),Q0=Symbol(),MU=Symbol(),$W=Symbol(),WF=Symbol(),lR=Symbol(),UU=Symbol(),ad=Symbol(),dU=Symbol(),bd=Symbol(),UR=Symbol(),md=Symbol(),c0=Symbol(),V0=Symbol(),W0=Symbol(),RF=Symbol(),R0=Symbol(),N0=Symbol(),t0=Symbol(),n0=Symbol(),NF=Symbol(),a0=Symbol(),b0=Symbol(),m0=Symbol(),J0=Symbol(),nl=Symbol(),dR=Symbol(),s0={isValidated:!1,isValidating:!0,isValidKey:!1,licenseKey:null,type:Nd.Unlicense},e0=Symbol();function i0(U,d=!0){const{initialScrollMode:F,initialViewMode:Z}=U;if(!F)return v.Vertical;const Q=[v.Page,v.Vertical].includes(F);return Z&&!Q&&Z!==_.SinglePage?(d&&g.warn(`Only vertical and page scrolling are acceptable in ${Z} mode.`),v.Vertical):F}function G0(U,d=!0){const{initialScrollMode:F,initialViewMode:Z}=U;return F&&[v.Horizontal,v.Wrapped].includes(F)&&Z!==_.SinglePage?(d&&g.warn(`Only single page is acceptable for scroll mode: ${F}`),_.SinglePage):Z??_.SinglePage}async function tF(U,d=!1){try{const F=await fetch(U,d?void 0:{method:"HEAD"});return F.ok?((d?(await F.blob()).type:F.headers.get("content-type"))!=="application/pdf",!0):(g.error("Invalid URL: The resource could not be fetched."),!1)}catch(F){return g.error(`Error fetching ${d?"Blob URL":"PDF source URL"}:`,F.message),!1}}async function B0(U){if(g.debug("validatePDFSourceAsync",U),!U||typeof U!="string")return g.error("Invalid source: Source must be a non-empty string."),!1;if(U.startsWith("http://")||U.startsWith("https://"))return tF(U,!1);if(U.startsWith("blob:"))return tF(U,!0);if(U.startsWith("/")||U.startsWith("./")||U.startsWith("../"))try{const d=new URL(U,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:jl&&jl.tagName.toUpperCase()==="SCRIPT"&&jl.src||new URL("index.umd.cjs",document.baseURI).href).href;return tF(d,!1)}catch(d){return g.error("Error fetching PDF source URL:",d.message),!1}return g.error("Invalid source: Unsupported source type."),!1}const S0={src:{type:[Object,String],required:!0},workerUrl:{type:String,default:void 0},initialPage:{type:Number,default:()=>1},initialScale:{type:[Number,String],default:()=>bl.PageFit},initialScrollMode:{type:String,default(){return v.Vertical},validator:(U,d)=>{const{initialViewMode:F}=d??{initialViewMode:v.Vertical};return i0({initialScrollMode:U,initialViewMode:F})===U}},initialViewMode:{type:String,default(){return _.SinglePage},validator:(U,d)=>{const{initialScrollMode:F}=d??{initialScrollMode:_.SinglePage};return G0({initialScrollMode:F,initialViewMode:U})===U}},initialRotation:{type:Number,default:()=>0},initialThumbnailsVisible:{type:Boolean,default:void 0},textLayer:{type:Boolean,default:()=>!0},characterMap:{type:Object,default:void 0},toolbarOptions:{type:[Object,Boolean],default:()=>FF},localization:{type:Object,default:()=>nd},initialSearch:{type:String,default:void 0},afterCanvasLoaded:{type:Object,default:void 0},textHighlights:{type:Array,default:void 0,validator:U=>{const d=U.every(F=>typeof F.keyword=="string"||F.keyword instanceof RegExp);return U.length||g.warn("No text highlights provided."),d||g.warn("The text highlight keywords must be a string or a regular expression."),!!(U.length&&d)}},downloadFilename:{type:String,default:void 0}},FR={class:"vpv-loader-wrapper"},ZR={class:"vp-relative vp-flex vp-items-center"},QR=["src"],cR=l.defineComponent({__name:"AppLoader",setup(U){return(d,F)=>(l.openBlock(),l.createElementBlock("div",FR,[l.createElementVNode("div",ZR,[l.renderSlot(d.$slots,"loaderImage",{},()=>[l.createElementVNode("img",{src:l.unref(JV),alt:"vue-pdf-viewer-loader"},null,8,QR)],!0),l.renderSlot(d.$slots,"loaderProgress",{},void 0,!0)])]))}}),w=(U,d)=>{const F=U.__vccOpts||U;for(const[Z,Q]of d)F[Z]=Q;return F},Jd=w(cR,[["__scopeId","data-v-2a52b39a"]]),h0=["click","dblclick","mouseover","input","change"];function PU(U,d,F){const Z=[];if(F)for(const Q of F)Q[U]===d&&Z.push(Q);return Z}function zl(U,d){return{type:U,data:d}}function pU(U,d){switch(U.type){case"textarea":case"text":return zl(ml.FORM_TEXT,{fieldName:U.name,value:U.value});case"select-one":case"select-multiple":const F=[];for(const Q of U.options)F.push({value:Q.value,label:Q.label});const Z=[];for(const Q of U.selectedOptions)Z.push({value:Q.value,label:Q.label});return zl(ml.FORM_SELECT,{fieldName:U.name,value:Z,options:F});case"checkbox":return zl(ml.FORM_CHECKBOX,{fieldName:U.name,checked:U.checked});case"radio":return zl(ml.FORM_RADIO,{fieldName:U.name,...d});case"button":return zl(ml.FORM_BUTTON,{fieldName:U.name,...d})}}function VR(U){return zl(ml.FILE_ATTACHMENT,U.file)}const nF=new Map,T0=(U,d)=>`${U.loadingTask.docId}___${d.num}R${d.gen===0?"":d.gen}`;function WR(U,d){const F=T0(U,d);return nF.has(F)?nF.get(F)??null:null}const RR=(U,d,F)=>{nF.set(T0(U,d),F)};async function Y0(U,d){const F=await U.getDestination(d);if(F&&typeof F[0]=="object"&&F[0]!==null){const Z=F[0],Q=WR(U,Z);if(Q===null){const c=await U.getPageIndex(Z);return RR(U,Z,c),await Y0(U,d)}else return p0(Q,F)}else return p0(F[0],F)}async function NR(U,d){if(U.dest)if(typeof U.dest=="string"){const F=await Y0(d,U.dest);return zl(ml.INTERNAL_LINK,{referencedPage:F.pageIndex,offset:null})}else{const F=await d.getPageIndex(U.dest[0]);return zl(ml.INTERNAL_LINK,{referencedPage:F,offset:{left:U.dest[2],bottom:U.dest[3]}})}else{if(U.url)return zl(ml.LINK,{url:U.url,unsafeUrl:U.unsafeUrl});if(U.action&&["FirstPage","LastPage","NextPage","PrevPage"].includes(U.action))return zl(ml.NAVIGATION,U)}}function M0(U){for(const d of U.getElementsByTagName("span")){let F=d.textContent;const Z=JSON.parse(d.dataset.l10nArgs??"{}");if(F)for(const Q in Z)F=F.replace(`{{${Q}}}`,Z[Q]);d.textContent=F}}function tR(U,d,F){let Z=U.target.parentNode;if(Z.tagName==="DIV"&&(Z=Z.firstChild),nR(Z),typeof Z.className!="object")if(Z.className==="linkAnnotation"&&U.type==="click"){const Q=Z.dataset?.annotationId;if(Q){const c=PU("id",Q,F);if(c.length)return NR(c[0],d)}}else if(Z.className.includes("textAnnotation"))M0(Z);else if(Z.className.includes("fileAttachmentAnnotation")){M0(Z);const Q=Z.dataset.annotationId;if(Q&&U.type==="dblclick")return VR(PU("id",Q,F)[0])}else if(Z.className.includes("textWidgetAnnotation")&&U.type==="input"){let Q=Z.getElementsByTagName("input")[0];return Q||(Q=Z.getElementsByTagName("textarea")[0]),pU(Q)}else{if(Z.className.includes("choiceWidgetAnnotation")&&U.type==="input")return pU(Z.getElementsByTagName("select")[0]);if(Z.className.includes("buttonWidgetAnnotation checkBox")&&U.type==="change")return pU(Z.getElementsByTagName("input")[0]);if(Z.className.includes("buttonWidgetAnnotation radioButton")&&U.type==="change"){const Q=Z.dataset.annotationId;if(Q){const c=PU("id",Q,F)[0],V=[];for(const W of PU("fieldName",c.fieldName,F))W.buttonValue&&V.push(W.buttonValue);return pU(Z.getElementsByTagName("input")[0],{value:c.buttonValue,defaultValue:c.fieldValue,options:V})}}else if(Z.className.includes("buttonWidgetAnnotation pushButton")&&U.type==="click"){const Q=Z.dataset.annotationId;if(Q){const c=PU("id",Q,F)[0];g.debug("Annotation `pushButton`",c);const{action:V}=c;return V&&["Print","SaveAs"].includes(V)?{type:ml.BUTTON,data:c}:c.resetForm?pU({name:c.fieldName,type:"button"},{actions:c.actions,reset:!0}):pU({name:c.fieldName,type:"button"},{actions:c.actions,reset:!1})}}}}function nR(U){let d=U;for(;d.tagName!=="SECTION";)d=d.parentElement;const F=d.getAttribute("aria-haspopup")==="dialog",Z=d.classList.contains("popupAnnotation");if(!F&&!Z)return;let Q=d.id||d.getAttribute("aria-controls");if(Q||(Q=d.firstChild?.id),Q&&d.parentElement){const c=d.parentElement.querySelector(`[aria-controls="${Q}"]`);c&&new MutationObserver((W,R)=>{const N=document.querySelectorAll(".popupDate");N.length>0&&(N.forEach(t=>{if(t.innerHTML)return!1;const n=t.getAttribute("data-l10n-args");if(n){const{date:a,time:b,dateObj:J}=JSON.parse(n);if(a&&b)t.textContent=`${a}, ${b}`;else if(J){const e=new Date(J);t.textContent=`${e.toLocaleDateString()}, ${e.toLocaleTimeString()}`}}}),R.disconnect())}).observe(c,{childList:!0,subtree:!0})}}const p0=(U,d)=>{switch(d[1].name){case"XYZ":return{bottomOffset:(F,Z)=>d[3]===null?Z:d[3],leftOffset:(F,Z)=>d[2]===null?0:d[2],pageIndex:U,scaleTo:d[4]};case"Fit":case"FitB":return{bottomOffset:0,leftOffset:0,pageIndex:U,scaleTo:bl.PageFit};case"FitH":case"FitBH":return{bottomOffset:d[2],leftOffset:0,pageIndex:U,scaleTo:bl.PageWidth};default:return{bottomOffset:0,leftOffset:0,pageIndex:U,scaleTo:1}}};class X0{externalLinkEnabled;constructor(){this.externalLinkEnabled=!0}get pagesCount(){return 0}get page(){return 0}set page(d){}get rotation(){return 0}set rotation(d){}get isInPresentationMode(){return!1}async goToDestination(d){}goToPage(d){}addLinkAttributes(d,F,Z=!1){}getDestinationHash(d){return"#"}getAnchorUrl(d){return"#"}setHash(d){}executeNamedAction(d){}executeSetOCGState(d){}cachePageRef(d,F){}}const aR=/^([^\w]*)(javascript|data|vbscript)/im,bR=/&#(\w+)(^\w|;)?/g,mR=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,JR=/^([^:]+):/gm,sR=U=>U.replace(bR,(d,F)=>String.fromCharCode(F)),eR=(U,d="about:blank")=>{const F=sR(U||"").replace(mR,"").trim();if(!F)return d;const Z=F[0];if(Z==="."||Z==="/")return F;const Q=F.match(JR);if(!Q)return F;const c=Q[0];return aR.test(c)?d:F},iR=w(l.defineComponent({__name:"LayerAnnotation",props:{page:{},viewport:{},document:{},annotationsFilter:{},annotationsMap:{},imageResourcesPath:{},hideForms:{type:Boolean},enableScripting:{type:Boolean},intent:{}},emits:["annotation","annotationLoaded","annotationRenderError"],setup(U,{emit:d}){const F=U,Z=d,{page:Q}=l.toRefs(F),c=l.shallowRef(),V=l.shallowRef(),W=l.ref();function R(i){const B=tR(i,F.document,W.value);Promise.resolve(B).then(Y=>{Y&&Z("annotation",Y)})}async function N(i){return await i.getFieldObjects()}async function t(i){return await i.hasJSActions()}async function n(i){let B=await i.getAnnotations({intent:F.intent});if(F.annotationsFilter){const Y=F.annotationsFilter;B=B.filter(T=>{const M=T.subtype,S=T.fieldType?`${M}.${T.fieldType}`:null;return Y?.includes(M)||S!==null&&Y?.includes(S)})}return B}function a(i,B){if(!i)return;const{rotation:Y}=B,T=Math.abs(B.width-B.height)/2,M="calc(var(--vpv-base-z-index)* 3)";switch(Y){case-90:case 270:i.style.width=`${B.height}px`,i.style.height=`${B.width}px`,i.style.transform=`rotate(${B.rotation}deg) translate(${T}px, ${T}px) translateZ(0)`,i.style.transformStyle="preserve-3d",i.style.zIndex=M;break;case 90:i.style.width=`${B.height}px`,i.style.height=`${B.width}px`,i.style.transform=`rotate(${B.rotation}deg) translate(-${T}px, -${T}px) translateZ(0)`,i.style.transformStyle="preserve-3d",i.style.zIndex=M;break;case 180:i.style.width=`${B.width}px`,i.style.height=`${B.height}px`,i.style.transform=`rotate(${B.rotation}deg) translateZ(0)`,i.style.transformStyle="preserve-3d",i.style.zIndex=M;break;default:i.style.width=`${B.width}px`,i.style.height=`${B.height}px`,i.style.transform="unset";break}}function b(i){for(const B of h0)i.addEventListener(B,R)}function J(i){for(const B of h0)i.removeEventListener(B,R)}function e(i){const{id:B,url:Y,unsafeUrl:T}=i;new MutationObserver((S,o)=>{const u=document.querySelector(`[data-annotation-id="${B}"]`);if(u){const G=u.querySelector("a"),p=eR((Y||T)??"","");G?.setAttribute("target","_blank"),G?.setAttribute("href",p),G?.setAttribute("rel","noopener noreferrer"),o.disconnect()}}).observe(document.body,{childList:!0,subtree:!0})}function m(i,B,Y){const{rotation:T,scale:M}=B,S=T%180===0;if(i.fieldType==="Btn"&&i.pushButton){const o=i.rect[2]-i.rect[0],u=i.rect[3]-i.rect[1],G=document.createElement("canvas");G.setAttribute("width",((S?o:u)*M).toString()),G.setAttribute("height",((S?u:o)*M).toString()),Y.set(i.id,G)}}async function s(i,B){const Y=F.viewport,{scale:T}=Y;if(i.style.setProperty("--scale-factor",`${T}`),V.value){V.value.update({viewport:Y.clone({dontFlip:!0})}),a(i,Y);return}J(i);const M=l.toRaw(F.document),[S,o,u]=await Promise.all([t(M),N(M),n(B)]);W.value=[...u];const G=M.annotationStorage;if(F.annotationsMap)for(const[X,C]of Object.entries(F.annotationsMap))G.setValue(X,C);const p=new Map([]);for(const X of W.value){const{annotationType:C}=X;switch(C){case rU.Link:e(X);break;case rU.Caret:break;case rU.Widget:m(X,Y,p);break}}a(i,Y);try{V.value=new Il.AnnotationLayer({div:i,accessibilityManager:void 0,annotationCanvasMap:void 0,annotationEditorUIManager:void 0,page:B,viewport:Y.clone({dontFlip:!0}),structTreeLayer:null}),await V.value.render({div:i,viewport:Y.clone({dontFlip:!0}),page:B,annotations:W.value,imageResourcesPath:F.imageResourcesPath,renderForms:!F.hideForms,linkService:new X0,downloadManager:null,annotationStorage:G,enableScripting:!1,hasJSActions:S,fieldObjects:o})}catch(X){g.error(X),Z("annotationRenderError",X)}b(i),Z("annotationLoaded",W.value)}return l.watch(()=>[F.viewport.rotation,F.viewport.scale],(i,B)=>{B.every((Y,T)=>Y===i[T])||Q.value&&F.viewport&&c.value&&s(c.value,Q.value)}),l.onMounted(()=>{const i=c.value;V.value=void 0,W.value=void 0,i&&(i.replaceChildren(),l.nextTick(async()=>{if(F.page.pageNumber>F.document.numPages)return;const B=await F.document.getPage(F.page.pageNumber);s(i,B)}))}),(i,B)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"layer",ref:c,class:"vpv-annotation-layer",style:{display:"block"}},null,512))}}),[["__scopeId","data-v-fb90436a"]]);function GR(U){return U<11904}function BR(U){return(U&65408)===0}function SR(U){return U>=97&&U<=122||U>=65&&U<=90}function hR(U){return U>=48&&U<=57}function TR(U){return U===32||U===9||U===13||U===10}function YR(U){return U>=13312&&U<=40959||U>=63744&&U<=64255}function MR(U){return U>=12448&&U<=12543}function pR(U){return U>=12352&&U<=12447}function XR(U){return U>=65376&&U<=65439}function uR(U){return(U&65408)===3584}function sd(U){return GR(U)?BR(U)?TR(U)?0:SR(U)||hR(U)||U===95?1:2:uR(U)?7:U===160?0:1:YR(U)?3:MR(U)?4:pR(U)?5:XR(U)?6:1}function u0(U,d,F){let Z=U.slice(0,d).match(/([^\p{M}])\p{M}*$/u);if(Z){const Q=U.charCodeAt(d),c=Z[1].charCodeAt(0);if(sd(Q)===sd(c))return!1}if(Z=U.slice(d+F).match(/^\p{M}*([^\p{M}])/u),Z){const Q=U.charCodeAt(d+F-1),c=Z[1].charCodeAt(0);if(sd(Q)===sd(c))return!1}return!0}function oR(U,d,F){const Z=[];for(const R of U.items)if(R.hasEOL)if(R.str.endsWith("-")){const N=R.str.lastIndexOf("-");Z.push(R.str.substring(0,N))}else Z.push(R.str,`
40
+ -----END PUBLIC KEY-----`),c=await window.crypto.subtle.importKey("spki",Q,{name:"RSA-PSS",hash:d},!0,["verify"]);if(!await window.crypto.subtle.verify({name:"RSA-PSS",saltLength:32},c,gW(Z),new TextEncoder().encode(atob(F))))throw new Error(TU.invalidSignature);return JSON.parse(atob(F))}catch{throw new Error(TU.invalidLicense)}}const PW=U=>{const d=IZ("VPV:license",null,localStorage),F=l.computed(()=>d.value?vW(d.value):null),Z=l.reactive({...s0,...F.value}),Q=l.computed(()=>l.unref(U??null)),c=(W,R)=>W==="specific"?R===window.location.host:window.location.host.includes(R),V=W=>{g.debug("validateLicense",W);const{avu:R,exp:N}=W;if(!N)throw new Error("License is missing expiration timestamp");if(N>Number.MAX_SAFE_INTEGER/1e3)throw new Error("Invalid expiration timestamp: value too large");const t=new Date(N*1e3),n=new Date().getTime();if(t.getTime()<n)throw new Error(TU.expired);if(!R)throw new Error("License is missing available until version timestamp");if(R>Number.MAX_SAFE_INTEGER/1e3)throw new Error("Invalid available until version timestamp: value too large");const a=new Date(R*1e3);if(g.debug("availableUntilTimestamp",a),a.getTime()<OW.getTime())throw new Error(TU.exceededVersion);if(!c(W.dmt,W.dm))throw new Error(TU.mismatchedDomain)};return l.watch(Q,async W=>{if(W){Z.isValidating=!0;try{const R=await HW(W);V(R),Z.isValidKey=!0,Z.type=R.t}catch(R){Z.isValidKey=!1,Z.invalidatedMessage=R instanceof Error?R.message:String(R)}finally{Z.isValidating=!1,Z.isValidated=!0}d.value=KW({isValidKey:Z.isValidKey,isValidating:Z.isValidating,isValidated:Z.isValidated,type:Z.type})}},{immediate:!0}),l.provide(R0,Z),l.provide(N0,Q),{license:Z}};function U0(U){g.info("Starting from Vue PDF Viewer v2.0.0, the licensing mechanism has been updated. Please visit https://www.vue-pdf-viewer.dev/license-management to generate a new license key and ensure the watermark is properly removed.");const d=l.inject(R0,l.reactive({...s0})),F=l.inject(N0,void 0),Z=l.ref(null),Q=(c,V=TU.invalidLicense)=>{Z.value&&(Z.value.remove(),Z.value=null);const W=LW(c);g.warn(V),Z.value=W};return l.watch([()=>d,U,()=>F?.value],([c,V,W])=>{if(!V){g.debug("NoContainerYet");return}const{isValidKey:R,isValidating:N,invalidatedMessage:t}=c;if(!(R&&W)){if(!W){Q(V),d.isValidating=!1;return}N||(R?Z.value&&(Z.value.remove(),Z.value=null):Q(V,t))}},{deep:!0}),Vd(Z,c=>{c.length&&Q(U.value)},{attributes:!0,childList:!0,subtree:!0,characterData:!0}),Vd(U,c=>{const V=l.unref(d);if(!(V&&V.isValidKey)&&c.length)for(const W of c)(W?.target===Z.value||W?.removedNodes?.[0]===Z.value||W.type==="childList"&&W.target===U.value&&W.target.lastChild!==Z.value)&&Q(U.value)},{attributes:!0,childList:!0,subtree:!0,characterData:!0}),{license:d}}const FF={searchable:!0,navigatable:!0,zoomable:!0,themeSwitchable:!0,fullscreen:!0,downloadable:!0,newFileOpenable:!0,printable:!0,sidebarEnable:!0,thumbnailViewable:!0,rotatable:!0,pointerSwitchable:!0,docPropertiesEnabled:!0,jumpNavigatable:!0,scrollingSwitchable:!0,pageViewSwitchable:!0,commentPanelEnabled:!0},nd={en_US:wZ,zh_CN:UW,it_IT:dW,pt_PT:FW,th_TH:ZW};bl.PageFit,v.Vertical,_.SinglePage;const d0={left:0,top:0},pl=100,YU=.25,ZF=10,QF=20,AW=1,cF=0,fW=4,VF=Symbol(),qW={keyword:"",regExp:new RegExp(" "),wholeWords:!1},F0="vpv-highlight__text-current",Z0=Symbol(),_W=Symbol(),Q0=Symbol(),MU=Symbol(),$W=Symbol(),WF=Symbol(),lR=Symbol(),UU=Symbol(),ad=Symbol(),dU=Symbol(),bd=Symbol(),UR=Symbol(),md=Symbol(),c0=Symbol(),V0=Symbol(),W0=Symbol(),RF=Symbol(),R0=Symbol(),N0=Symbol(),t0=Symbol(),n0=Symbol(),NF=Symbol(),a0=Symbol(),b0=Symbol(),m0=Symbol(),J0=Symbol(),nl=Symbol(),dR=Symbol(),s0={isValidated:!1,isValidating:!0,isValidKey:!1,licenseKey:null,type:Nd.Unlicense},e0=Symbol();function i0(U,d=!0){const{initialScrollMode:F,initialViewMode:Z}=U;if(!F)return v.Vertical;const Q=[v.Page,v.Vertical].includes(F);return Z&&!Q&&Z!==_.SinglePage?(d&&g.warn(`Only vertical and page scrolling are acceptable in ${Z} mode.`),v.Vertical):F}function G0(U,d=!0){const{initialScrollMode:F,initialViewMode:Z}=U;return F&&[v.Horizontal,v.Wrapped].includes(F)&&Z!==_.SinglePage?(d&&g.warn(`Only single page is acceptable for scroll mode: ${F}`),_.SinglePage):Z??_.SinglePage}async function tF(U,d=!1){try{const F=await fetch(U,d?void 0:{method:"HEAD"});return F.ok?((d?(await F.blob()).type:F.headers.get("content-type"))!=="application/pdf",!0):(g.error("Invalid URL: The resource could not be fetched."),!1)}catch(F){return g.error(`Error fetching ${d?"Blob URL":"PDF source URL"}:`,F.message),!1}}async function B0(U){if(g.debug("validatePDFSourceAsync",U),!U||typeof U!="string")return g.error("Invalid source: Source must be a non-empty string."),!1;if(U.startsWith("http://")||U.startsWith("https://"))return tF(U,!1);if(U.startsWith("blob:"))return tF(U,!0);if(U.startsWith("/")||U.startsWith("./")||U.startsWith("../"))try{const d=new URL(U,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:jl&&jl.tagName.toUpperCase()==="SCRIPT"&&jl.src||new URL("index.umd.cjs",document.baseURI).href).href;return tF(d,!1)}catch(d){return g.error("Error fetching PDF source URL:",d.message),!1}return g.error("Invalid source: Unsupported source type."),!1}const S0={src:{type:[Object,String],required:!0},workerUrl:{type:String,default:void 0},initialPage:{type:Number,default:()=>1},initialScale:{type:[Number,String],default:()=>bl.PageFit},initialScrollMode:{type:String,default(){return v.Vertical},validator:(U,d)=>{const{initialViewMode:F}=d??{initialViewMode:v.Vertical};return i0({initialScrollMode:U,initialViewMode:F})===U}},initialViewMode:{type:String,default(){return _.SinglePage},validator:(U,d)=>{const{initialScrollMode:F}=d??{initialScrollMode:_.SinglePage};return G0({initialScrollMode:F,initialViewMode:U})===U}},initialRotation:{type:Number,default:()=>0},initialThumbnailsVisible:{type:Boolean,default:void 0},textLayer:{type:Boolean,default:()=>!0},characterMap:{type:Object,default:void 0},toolbarOptions:{type:[Object,Boolean],default:()=>FF},localization:{type:Object,default:()=>nd},initialSearch:{type:String,default:void 0},afterCanvasLoaded:{type:Object,default:void 0},textHighlights:{type:Array,default:void 0,validator:U=>{const d=U.every(F=>typeof F.keyword=="string"||F.keyword instanceof RegExp);return U.length||g.warn("No text highlights provided."),d||g.warn("The text highlight keywords must be a string or a regular expression."),!!(U.length&&d)}},downloadFilename:{type:String,default:void 0}},FR={class:"vpv-loader-wrapper"},ZR={class:"vp-relative vp-flex vp-items-center"},QR=["src"],cR=l.defineComponent({__name:"AppLoader",setup(U){return(d,F)=>(l.openBlock(),l.createElementBlock("div",FR,[l.createElementVNode("div",ZR,[l.renderSlot(d.$slots,"loaderImage",{},()=>[l.createElementVNode("img",{src:l.unref(JV),alt:"vue-pdf-viewer-loader"},null,8,QR)],!0),l.renderSlot(d.$slots,"loaderProgress",{},void 0,!0)])]))}}),w=(U,d)=>{const F=U.__vccOpts||U;for(const[Z,Q]of d)F[Z]=Q;return F},Jd=w(cR,[["__scopeId","data-v-2a52b39a"]]),h0=["click","dblclick","mouseover","input","change"];function PU(U,d,F){const Z=[];if(F)for(const Q of F)Q[U]===d&&Z.push(Q);return Z}function zl(U,d){return{type:U,data:d}}function pU(U,d){switch(U.type){case"textarea":case"text":return zl(ml.FORM_TEXT,{fieldName:U.name,value:U.value});case"select-one":case"select-multiple":const F=[];for(const Q of U.options)F.push({value:Q.value,label:Q.label});const Z=[];for(const Q of U.selectedOptions)Z.push({value:Q.value,label:Q.label});return zl(ml.FORM_SELECT,{fieldName:U.name,value:Z,options:F});case"checkbox":return zl(ml.FORM_CHECKBOX,{fieldName:U.name,checked:U.checked});case"radio":return zl(ml.FORM_RADIO,{fieldName:U.name,...d});case"button":return zl(ml.FORM_BUTTON,{fieldName:U.name,...d})}}function VR(U){return zl(ml.FILE_ATTACHMENT,U.file)}const nF=new Map,T0=(U,d)=>`${U.loadingTask.docId}___${d.num}R${d.gen===0?"":d.gen}`;function WR(U,d){const F=T0(U,d);return nF.has(F)?nF.get(F)??null:null}const RR=(U,d,F)=>{nF.set(T0(U,d),F)};async function Y0(U,d){const F=await U.getDestination(d);if(F&&typeof F[0]=="object"&&F[0]!==null){const Z=F[0],Q=WR(U,Z);if(Q===null){const c=await U.getPageIndex(Z);return RR(U,Z,c),await Y0(U,d)}else return p0(Q,F)}else return p0(F[0],F)}async function NR(U,d){if(U.dest)if(typeof U.dest=="string"){const F=await Y0(d,U.dest);return zl(ml.INTERNAL_LINK,{referencedPage:F.pageIndex,offset:null})}else{const F=await d.getPageIndex(U.dest[0]);return zl(ml.INTERNAL_LINK,{referencedPage:F,offset:{left:U.dest[2],bottom:U.dest[3]}})}else{if(U.url)return zl(ml.LINK,{url:U.url,unsafeUrl:U.unsafeUrl});if(U.action&&["FirstPage","LastPage","NextPage","PrevPage"].includes(U.action))return zl(ml.NAVIGATION,U)}}function M0(U){for(const d of U.getElementsByTagName("span")){let F=d.textContent;const Z=JSON.parse(d.dataset.l10nArgs??"{}");if(F)for(const Q in Z)F=F.replace(`{{${Q}}}`,Z[Q]);d.textContent=F}}function tR(U,d,F){let Z=U.target.parentNode;if(Z.tagName==="DIV"&&(Z=Z.firstChild),nR(Z),typeof Z.className!="object")if(Z.className==="linkAnnotation"&&U.type==="click"){const Q=Z.dataset?.annotationId;if(Q){const c=PU("id",Q,F);if(c.length)return NR(c[0],d)}}else if(Z.className.includes("textAnnotation"))M0(Z);else if(Z.className.includes("fileAttachmentAnnotation")){M0(Z);const Q=Z.dataset.annotationId;if(Q&&U.type==="dblclick")return VR(PU("id",Q,F)[0])}else if(Z.className.includes("textWidgetAnnotation")&&U.type==="input"){let Q=Z.getElementsByTagName("input")[0];return Q||(Q=Z.getElementsByTagName("textarea")[0]),pU(Q)}else{if(Z.className.includes("choiceWidgetAnnotation")&&U.type==="input")return pU(Z.getElementsByTagName("select")[0]);if(Z.className.includes("buttonWidgetAnnotation checkBox")&&U.type==="change")return pU(Z.getElementsByTagName("input")[0]);if(Z.className.includes("buttonWidgetAnnotation radioButton")&&U.type==="change"){const Q=Z.dataset.annotationId;if(Q){const c=PU("id",Q,F)[0],V=[];for(const W of PU("fieldName",c.fieldName,F))W.buttonValue&&V.push(W.buttonValue);return pU(Z.getElementsByTagName("input")[0],{value:c.buttonValue,defaultValue:c.fieldValue,options:V})}}else if(Z.className.includes("buttonWidgetAnnotation pushButton")&&U.type==="click"){const Q=Z.dataset.annotationId;if(Q){const c=PU("id",Q,F)[0];g.debug("Annotation `pushButton`",c);const{action:V}=c;return V&&["Print","SaveAs"].includes(V)?{type:ml.BUTTON,data:c}:c.resetForm?pU({name:c.fieldName,type:"button"},{actions:c.actions,reset:!0}):pU({name:c.fieldName,type:"button"},{actions:c.actions,reset:!1})}}}}function nR(U){let d=U;for(;d.tagName!=="SECTION";)d=d.parentElement;const F=d.getAttribute("aria-haspopup")==="dialog",Z=d.classList.contains("popupAnnotation");if(!F&&!Z)return;let Q=d.id||d.getAttribute("aria-controls");if(Q||(Q=d.firstChild?.id),Q&&d.parentElement){const c=d.parentElement.querySelector(`[aria-controls="${Q}"]`);c&&new MutationObserver((W,R)=>{const N=document.querySelectorAll(".popupDate");N.length>0&&(N.forEach(t=>{if(t.innerHTML)return!1;const n=t.getAttribute("data-l10n-args");if(n){const{date:a,time:b,dateObj:J}=JSON.parse(n);if(a&&b)t.textContent=`${a}, ${b}`;else if(J){const e=new Date(J);t.textContent=`${e.toLocaleDateString()}, ${e.toLocaleTimeString()}`}}}),R.disconnect())}).observe(c,{childList:!0,subtree:!0})}}const p0=(U,d)=>{switch(d[1].name){case"XYZ":return{bottomOffset:(F,Z)=>d[3]===null?Z:d[3],leftOffset:(F,Z)=>d[2]===null?0:d[2],pageIndex:U,scaleTo:d[4]};case"Fit":case"FitB":return{bottomOffset:0,leftOffset:0,pageIndex:U,scaleTo:bl.PageFit};case"FitH":case"FitBH":return{bottomOffset:d[2],leftOffset:0,pageIndex:U,scaleTo:bl.PageWidth};default:return{bottomOffset:0,leftOffset:0,pageIndex:U,scaleTo:1}}};class X0{externalLinkEnabled;constructor(){this.externalLinkEnabled=!0}get pagesCount(){return 0}get page(){return 0}set page(d){}get rotation(){return 0}set rotation(d){}get isInPresentationMode(){return!1}async goToDestination(d){}goToPage(d){}addLinkAttributes(d,F,Z=!1){}getDestinationHash(d){return"#"}getAnchorUrl(d){return"#"}setHash(d){}executeNamedAction(d){}executeSetOCGState(d){}cachePageRef(d,F){}}const aR=/^([^\w]*)(javascript|data|vbscript)/im,bR=/&#(\w+)(^\w|;)?/g,mR=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,JR=/^([^:]+):/gm,sR=U=>U.replace(bR,(d,F)=>String.fromCharCode(F)),eR=(U,d="about:blank")=>{const F=sR(U||"").replace(mR,"").trim();if(!F)return d;const Z=F[0];if(Z==="."||Z==="/")return F;const Q=F.match(JR);if(!Q)return F;const c=Q[0];return aR.test(c)?d:F},iR=w(l.defineComponent({__name:"LayerAnnotation",props:{page:{},viewport:{},document:{},annotationsFilter:{},annotationsMap:{},imageResourcesPath:{},hideForms:{type:Boolean},enableScripting:{type:Boolean},intent:{}},emits:["annotation","annotationLoaded","annotationRenderError"],setup(U,{emit:d}){const F=U,Z=d,{page:Q}=l.toRefs(F),c=l.shallowRef(),V=l.shallowRef(),W=l.ref();function R(i){const B=tR(i,F.document,W.value);Promise.resolve(B).then(Y=>{Y&&Z("annotation",Y)})}async function N(i){return await i.getFieldObjects()}async function t(i){return await i.hasJSActions()}async function n(i){let B=await i.getAnnotations({intent:F.intent});if(F.annotationsFilter){const Y=F.annotationsFilter;B=B.filter(T=>{const M=T.subtype,S=T.fieldType?`${M}.${T.fieldType}`:null;return Y?.includes(M)||S!==null&&Y?.includes(S)})}return B}function a(i,B){if(!i)return;const{rotation:Y}=B,T=Math.abs(B.width-B.height)/2,M="calc(var(--vpv-base-z-index)* 3)";switch(Y){case-90:case 270:i.style.width=`${B.height}px`,i.style.height=`${B.width}px`,i.style.transform=`rotate(${B.rotation}deg) translate(${T}px, ${T}px) translateZ(0)`,i.style.transformStyle="preserve-3d",i.style.zIndex=M;break;case 90:i.style.width=`${B.height}px`,i.style.height=`${B.width}px`,i.style.transform=`rotate(${B.rotation}deg) translate(-${T}px, -${T}px) translateZ(0)`,i.style.transformStyle="preserve-3d",i.style.zIndex=M;break;case 180:i.style.width=`${B.width}px`,i.style.height=`${B.height}px`,i.style.transform=`rotate(${B.rotation}deg) translateZ(0)`,i.style.transformStyle="preserve-3d",i.style.zIndex=M;break;default:i.style.width=`${B.width}px`,i.style.height=`${B.height}px`,i.style.transform="unset";break}}function b(i){for(const B of h0)i.addEventListener(B,R)}function J(i){for(const B of h0)i.removeEventListener(B,R)}function e(i){const{id:B,url:Y,unsafeUrl:T}=i;new MutationObserver((S,o)=>{const u=document.querySelector(`[data-annotation-id="${B}"]`);if(u){const G=u.querySelector("a"),p=eR((Y||T)??"","");G?.setAttribute("target","_blank"),G?.setAttribute("href",p),G?.setAttribute("rel","noopener noreferrer"),o.disconnect()}}).observe(document.body,{childList:!0,subtree:!0})}function m(i,B,Y){const{rotation:T,scale:M}=B,S=T%180===0;if(i.fieldType==="Btn"&&i.pushButton){const o=i.rect[2]-i.rect[0],u=i.rect[3]-i.rect[1],G=document.createElement("canvas");G.setAttribute("width",((S?o:u)*M).toString()),G.setAttribute("height",((S?u:o)*M).toString()),Y.set(i.id,G)}}async function s(i,B){const Y=F.viewport,{scale:T}=Y;if(i.style.setProperty("--scale-factor",`${T}`),V.value){V.value.update({viewport:Y.clone({dontFlip:!0})}),a(i,Y);return}J(i);const M=l.toRaw(F.document),[S,o,u]=await Promise.all([t(M),N(M),n(B)]);W.value=[...u];const G=M.annotationStorage;if(F.annotationsMap)for(const[X,C]of Object.entries(F.annotationsMap))G.setValue(X,C);const p=new Map([]);for(const X of W.value){const{annotationType:C}=X;switch(C){case rU.Link:e(X);break;case rU.Caret:break;case rU.Widget:m(X,Y,p);break}}a(i,Y);try{V.value=new Il.AnnotationLayer({div:i,accessibilityManager:void 0,annotationCanvasMap:void 0,annotationEditorUIManager:void 0,page:B,viewport:Y.clone({dontFlip:!0}),structTreeLayer:null}),await V.value.render({div:i,viewport:Y.clone({dontFlip:!0}),page:B,annotations:W.value,imageResourcesPath:F.imageResourcesPath,renderForms:!F.hideForms,linkService:new X0,downloadManager:null,annotationStorage:G,enableScripting:!1,hasJSActions:S,fieldObjects:o})}catch(X){g.error(X),Z("annotationRenderError",X)}b(i),Z("annotationLoaded",W.value)}return l.watch(()=>[F.viewport.rotation,F.viewport.scale],(i,B)=>{B.every((Y,T)=>Y===i[T])||Q.value&&F.viewport&&c.value&&s(c.value,Q.value)}),l.onMounted(()=>{const i=c.value;V.value=void 0,W.value=void 0,i&&(i.replaceChildren(),l.nextTick(async()=>{if(F.page.pageNumber>F.document.numPages)return;const B=await F.document.getPage(F.page.pageNumber);s(i,B)}))}),(i,B)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"layer",ref:c,class:"vpv-annotation-layer",style:{display:"block"}},null,512))}}),[["__scopeId","data-v-fb90436a"]]);function GR(U){return U<11904}function BR(U){return(U&65408)===0}function SR(U){return U>=97&&U<=122||U>=65&&U<=90}function hR(U){return U>=48&&U<=57}function TR(U){return U===32||U===9||U===13||U===10}function YR(U){return U>=13312&&U<=40959||U>=63744&&U<=64255}function MR(U){return U>=12448&&U<=12543}function pR(U){return U>=12352&&U<=12447}function XR(U){return U>=65376&&U<=65439}function uR(U){return(U&65408)===3584}function sd(U){return GR(U)?BR(U)?TR(U)?0:SR(U)||hR(U)||U===95?1:2:uR(U)?7:U===160?0:1:YR(U)?3:MR(U)?4:pR(U)?5:XR(U)?6:1}function u0(U,d,F){let Z=U.slice(0,d).match(/([^\p{M}])\p{M}*$/u);if(Z){const Q=U.charCodeAt(d),c=Z[1].charCodeAt(0);if(sd(Q)===sd(c))return!1}if(Z=U.slice(d+F).match(/^\p{M}*([^\p{M}])/u),Z){const Q=U.charCodeAt(d+F-1),c=Z[1].charCodeAt(0);if(sd(Q)===sd(c))return!1}return!0}function oR(U,d,F){const Z=[];for(const R of U.items)if(R.hasEOL)if(R.str.endsWith("-")){const N=R.str.lastIndexOf("-");Z.push(R.str.substring(0,N))}else Z.push(R.str,`
41
41
  `);else Z.push(R.str);const Q=Z.join("").replace(/\n/g," ");let c;if(d instanceof RegExp)c=d.flags.indexOf("g")===-1?new RegExp(d,`${d.flags}g`):d;else{const R=["g"];F.matchCase||R.push("i");let t=d.replace(/[.^$*+?()[{|\\]/g,n=>`\\${n}`).trim();c=new RegExp(t,R.join(""))}const V=[];let W;for(;(W=c.exec(Q))!==null;)F.wholeWords&&!u0(Q,W.index,W[0].length)||V.push([W.index,W[0].length,W[0]]);return V}function IR(U,d,F){function Z(N){return N.hasEOL?N.str.endsWith("-")?-1:1:0}let Q=0,c=0;const V=d.items,W=V.length-1,R=[];for(let N=0;N<U.length;N++){let t=U[N][0];for(;Q!==W&&t>=c+V[Q].str.length;){const b=V[Q];c+=b.str.length+Z(b),Q++}const n={idx:Q,offset:t-c};for(t+=U[N][1];Q!==W&&t>c+V[Q].str.length;){const b=V[Q];c+=b.str.length+Z(b),Q++}const a={idx:Q,offset:t-c};R.push({start:n,end:a,str:U[N][2],oIndex:U[N][0],pageIndex:F})}return R}function ER(U,d,F){function Z(Q,c,V=-1,W=-1,R=""){const N=d.items[Q],t=[];let n="",a="",b="",J=F[Q];if(!J)return;if(J.nodeType===Node.TEXT_NODE){const s=document.createElement("span");J.before(s),s.append(J),F[Q]=s,J=s}V>=0&&W>=0?n=N.str.substring(V,W):V<0&&W<0?n=N.str:V>=0?n=N.str.substring(V):W>=0&&(n=N.str.substring(0,W));const e=document.createTextNode(n),m=document.createElement("span");if(m.className="highlight appended "+R,m.setAttribute("data-match-index",`${c}`),m.append(e),t.push(m),V>0)if(J.childNodes.length===1&&J.childNodes[0].nodeType===Node.TEXT_NODE){a=N.str.substring(0,V);const s=document.createTextNode(a);t.unshift(s)}else{let s=0;const i=[];for(const B of J.childNodes){const Y=B.nodeType===Node.TEXT_NODE?B.nodeValue:B.firstChild.nodeValue;s+=Y.length,s<=V?i.push(B):V>=s-Y.length&&W<=s&&i.push(document.createTextNode(Y.substring(0,V-(s-Y.length))))}t.unshift(...i)}if(W>0){b=N.str.substring(W);const s=document.createTextNode(b);t.push(s)}J.replaceChildren(...t)}for(const[Q,c]of U.entries())if(c.start.idx===c.end.idx)Z(c.start.idx,Q,c.start.offset,c.end.offset);else for(let V=c.start.idx,W=c.end.idx;V<=W;V++)V===c.start.idx?Z(V,Q,c.start.offset,-1,"begin"):V===c.end.idx?Z(V,Q,-1,c.end.offset,"end"):Z(V,Q,-1,-1,"middle")}function kR(U,d){const F=U.items.map(Z=>Z.str);for(let Z=0;Z<d.length;Z++){const Q=d[Z];if(Q&&Q.nodeType!==Node.TEXT_NODE){const c=document.createTextNode(F[Z]);Q.replaceChildren(c)}}}function aF(U,d,F,Z){const Q=[];for(const c of U){const V=oR(d,c,Z);Q.push(...IR(V,d,F))}return Q}function o0(U={}){return{matchCase:!1,wholeWords:!1,...U}}const I0=U=>{let Z=U.keyword.replace(/[.^$*+?()[{|\\]/g,c=>`\\${c}`).trim();const Q=U.matchCase?"g":"gi";return{keyword:U.keyword,regExp:new RegExp(Z,Q),wholeWords:U.wholeWords||!1}},yR=(U,d,F)=>U instanceof RegExp?{keyword:U.source,regExp:U,wholeWords:F||!1}:typeof U=="string"?U===""?qW:I0({keyword:U,matchCase:d||!1,wholeWords:F||!1}):(typeof d<"u"&&(U.matchCase=d),typeof F<"u"&&(U.wholeWords=F),I0(U)),zR=(U,d)=>U.top<d.top?-1:U.top>d.top?1:U.left<d.left?-1:U.left>d.left?1:0,CR=U=>({left:`${U.left}%`,top:`${U.top}%`,height:`${U.height}%`,width:`${U.width}%`}),E0=U=>{const d=U.parentNode;d&&d.removeChild(U)},DR=(U,d)=>{E0(U);const F=d.parentNode;F&&F.insertBefore(U,d),E0(d)},LR=U=>{const d=U.parentNode;if(!d)return;const F=document.createRange();F.selectNodeContents(U),DR(F.extractContents(),U),d.normalize()},wR=(U,d)=>new Promise(F=>{const Z=U.querySelectorAll(d);if(Z.length>0){F(Z);return}new MutationObserver((c,V)=>{const W=U.querySelectorAll(d);W.length>0&&(V.disconnect(),F(W))}).observe(U,{childList:!0,subtree:!0})});function xR(U,d,F){if(!U||!d||!F)return;let Z=F;const Q=F.getAttribute("data-scroll-mode"),c=Q.charAt(0).toUpperCase()+Q.slice(1);v.Page===c&&(Z=F.parentElement);const W=U.getBoundingClientRect(),R=d.getBoundingClientRect(),N=Z.getBoundingClientRect();let t=W.top-R.top+d.offsetTop,n=W.left-R.left+d.offsetLeft;const a=0,b=0,J=t-N.height/2-a,e=n-N.width/2-b,m={top:J,left:e,behavior:"auto"};Z.scrollTo(m)}const jR=["data-index","title"],OR=w(l.defineComponent({__name:"LayerTextHighlight",props:{pageIndex:{},viewport:{},textContent:{},highlightKeywords:{}},setup(U){const d=U,{pageIndex:F,highlightKeywords:Z}=l.toRefs(d),Q=l.ref(),c=_d(Q),V=XZ(),W=l.ref(null),R=l.ref([]),N=l.shallowRef(),t=l.inject(t0,l.shallowRef({matchCase:!1,wholeWords:!1})),n=CR,a=l.inject(MU,void 0),b=l.computed(()=>Z.value.map(Y=>({...yR(Y.keyword,Y.options?.matchCase,Y.options?.wholeWords),color:Y.highlightColor})));function J(Y,T){const M=`.vpv-text-layer-wrapper[data-page-index="${T}"]`;return new Promise(S=>{const o=Y.querySelector(M);if(o){S(o);return}new MutationObserver((G,p)=>{const X=Y.querySelector(M);X&&(S(X),p.disconnect())}).observe(Y,{childList:!0,subtree:!0})})}function e(Y){return new Promise(T=>{const M=Y.querySelectorAll(".vpv-text-layer-text");if(M.length){T(Array.from(M));return}new MutationObserver((o,u)=>{const G=Y.querySelectorAll(".vpv-text-layer-text");G.length&&(T(Array.from(G)),u.disconnect())}).observe(Y,{childList:!0,subtree:!0})})}const m=(Y,T,M,S)=>{const o=document.createRange(),u=M.firstChild;if(!u||u.nodeType!==Node.TEXT_NODE)return null;const G=u.textContent?.length??0,p=S[0].charIdxInSpan,X=S.length===1?p:S[S.length-1].charIdxInSpan;if(p>G||X+1>G)return null;o.setStart(u,p),o.setEnd(u,X+1);const C=document.createElement("span");C.style.width="auto",o.surroundContents(C);const x=C.getBoundingClientRect(),E=Y.getBoundingClientRect(),z=E.height,I=E.width,y=100*(x.left-E.left)/I,k=100*(x.top-E.top)/z,K=100*x.height/z,P=100*x.width/I;return LR(C),{keywordStr:T,left:y,top:k,height:K,width:P,pageHeight:z,pageWidth:I}},s=(Y,T,M,S)=>{const o=T.length;if(!S.length||!o)return[];const u=[],G=S.map(p=>p.char).join("");return b.value.forEach(p=>{const{keyword:X,regExp:C,wholeWords:x,color:E}=p,z=X;if(!z.trim())return;const I=C.flags.indexOf("g")===-1?new RegExp(C,`${C.flags}g`):C;let y;const k=[];for(;(y=I.exec(G))!==null;)x&&!u0(G,y.index,y[0].length)||k.push({keyword:I,startIndex:y.index,endIndex:I.lastIndex});const K=k.map(P=>({keyword:P.keyword,indexes:S.slice(P.startIndex,P.endIndex),color:E}));for(const P of K){const j=P.indexes.reduce((O,q)=>(O[q.spanIdx]=(O[q.spanIdx]||[]).concat([q]),O),{});for(const O of Object.values(j))if(O.length!==1||O[0].char.trim()!==""){const q=O,Rl=M[q[0].spanIdx],Jl=m(Y,z,Rl,q);if(Jl){const{left:Zl,top:Xl}=Jl;if(u.find(fl=>fl.left===Zl&&fl.top===Xl))continue;u.push({...Jl,highlightColor:P.color})}}}}),u.sort(zR),u},i=async()=>{N.value=[],await l.nextTick(),B(F.value)};l.watch(()=>[a?.scale,a?.rotation],i),l.watch(t,i,{deep:!0}),l.onUnmounted(()=>{N.value=[],W.value=null,R.value=[]});async function B(Y){const T=await J(c.value,Y),M=await e(T);if(M.length){R.value=M.map(o=>o.tagName==="BR"?" ":o.textContent).reduce((o,u,G)=>o.concat(u.split("").map((p,X)=>({char:p,charIdxInSpan:X,spanIdx:G}))),[{char:"",charIdxInSpan:0,spanIdx:0}]).slice(1);const S=s(T,Z.value,M,R.value);N.value=S}}return l.watchEffect(async()=>{if(V.value&&Z.value)try{await B(F.value)}catch(Y){g.error(Y)}}),(Y,T)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"layerRef",ref:Q,class:l.normalizeClass(["vpv-custom-highlight-layer-wrapper",`page-${l.unref(F)}`])},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(N.value,(M,S)=>(l.openBlock(),l.createElementBlock("div",{class:"vpv-highlight__text",key:S,"data-index":S,title:M.keywordStr.trim(),style:l.normalizeStyle({...l.unref(n)(M),...M.highlightColor&&{backgroundColor:M.highlightColor}})},null,12,jR))),128))],2))}}),[["__scopeId","data-v-cbec0ba6"]]);function gR(U,d=20){let F=0,Z=1,Q=1,c=1,V,W;for(let R=0;R<d;R++)V=F+Q,W=Z+c,U>V/W?[F,Z]=[V,W]:[Q,c]=[V,W];return{numerator:V,denominator:W,a:F,b:Z,c:Q,d:c}}const rR=(U,d)=>{if(Math.floor(U)===U)return[U,1];const F=1/U;if(F>d)return[1,d];if(Math.floor(F)===F)return[1,F];const Z=U>1?F:U,{a:Q,b:c,c:V,d:W}=gR(Z,d),R=(Q/c+V/W)/2;return Z<R?Z===U?[Q,c]:[c,Q]:Z===U?[V,W]:[W,V]},ed=(U,d)=>{const F=U%d;return F===0?U:Math.floor(U-F)},KR=w(l.defineComponent({__name:"LayerCanvas",props:{page:{},width:{},height:{},pageIndex:{},intersecting:{type:Boolean},afterCanvasLoaded:{type:Function}},emits:["rendered"],setup(U,{emit:d}){const Z=U,Q=d,c=l.inject(MU,void 0),{page:V,width:W,height:R,intersecting:N}=l.toRefs(Z),t=l.computed(()=>l.toRaw(Z.page)),n=l.ref(),a=l.shallowRef(),b=l.shallowRef(null),J=l.ref(GU.PreRender);return l.watchEffect(()=>{if(n.value)try{const e=n.value;J.value===GU.DidRender&&Q("rendered");const{scale:m,rotation:s}=c,i=V.value.getViewport({rotation:s,scale:m??1});e.getBoundingClientRect().height,Math.floor(i.height);let B=window.devicePixelRatio||1;const Y=Math.sqrt(16777216/(i.width*i.height)),T=B>Y;T?e.style.transform="scale(1, 1)":e.style.removeProperty("transform");const M=Math.min(Y,B),[S,o]=rR(M,8);e.width=ed(i.width*M,S),e.height=ed(i.height*M,S),e.style.width=`${ed(i.width,o)}px`,e.style.height=`${ed(i.height,o)}px`,e.hidden=!0,b.value=e.getContext("2d",{alpha:!1,desynchronized:!1,willReadFrequently:!0});const u=T||B!==1?[M,0,0,M,0,0]:void 0;if(!b.value)return;const G=a.value;G&&G.cancel();const p={canvasContext:b.value,transform:u,viewport:i,annotationMode:jU.AnnotationMode.ENABLE_FORMS};a.value=t.value.render(p),a.value.promise.then(()=>{if(e.hidden=!1,J.value=GU.DidRender,Z.afterCanvasLoaded){const X={width:i.width,height:i.height,canvasWidth:e.width,canvasHeight:e.height,widthRatio:e.width/i.width,heightRatio:e.height/i.height};Z.afterCanvasLoaded(e,X)}}).catch(X=>{}).finally(()=>{Q("rendered")})}catch(e){g.warn("rendering canvas got an error",e)}}),l.onBeforeUnmount(()=>{const e=n.value;e&&b.value&&!N.value&&(e.width=0,e.height=0,b.value.clearRect(0,0,e.width,e.height),J.value=GU.PreRender)}),(e,m)=>(l.openBlock(),l.createElementBlock("div",{class:"vpv-core__canvas-layer",style:l.normalizeStyle({height:`${l.unref(R)}px`,width:`${l.unref(W)}px`})},[l.createElementVNode("canvas",{ref_key:"canvasLayerRef",ref:n},null,512)],4))}}),[["__scopeId","data-v-7a2dcda0"]]),vR=(U,d)=>{const{rotation:F,width:Z,height:Q}=d,c=Math.abs(Z-Q)/2;switch(F){case-90:case 270:U.style.width=`${Q}px`,U.style.height=`${Z}px`,U.style.transform=`rotate(${d.rotation}deg) translate(${c}px, ${c}px)`;break;case 90:U.style.width=`${Q}px`,U.style.height=`${Z}px`,U.style.transform=`rotate(${d.rotation}deg) translate(-${c}px, -${c}px)`;break;case 180:U.style.width=`${Z}px`,U.style.height=`${Q}px`,U.style.transform=`rotate(${d.rotation}deg)`;break;default:U.style.width=`${Z}px`,U.style.height=`${Q}px`,U.style.transform="unset";break}},HR=w(l.defineComponent({__name:"LayerText",props:{page:{},viewport:{},highlight:{},currentMatchIndex:{}},emits:["highlight","textLoaded"],setup(U,{emit:d}){const F=U,Z=d,{viewport:Q,highlight:c}=l.toRefs(F),V=l.ref(),W=l.ref(),R=l.ref(),N=l.ref(null),t=l.shallowRef(),n=l.inject(Z0,l.ref(void 0)),a=l.inject(MU,void 0),b=_d(V),J=l.computed(()=>F.page.pageNumber-1),e=l.ref([]);async function m(T,M,S=!1){if(!c.value)return;const o=F.page;S&&kR(T,M);const{keyword:u,options:G}=c.value;if(u){const X=aF(typeof u=="string"?[u]:u,T,o.pageNumber-1,o0(G));await l.nextTick(),ER(X,T,M),Z("highlight",{matches:X,textContent:T,textDivs:M,page:o?.pageNumber||1}),X.length&&!n.value&&(n.value={pageIdx:o.pageNumber-1,matchIdx:F.currentMatchIndex??0})}}function s(T){t.value&&t.value.cancel(),V.value.replaceChildren?.();const M=F.page,S=F.viewport,{scale:o}=S;vR(T,S);const u=M.pageNumber-1;let G;return M.getTextContent().then(p=>(T.style.setProperty("--scale-factor",`${o}`),G=p,"TextLayer"in Il?(t.value=new Il.TextLayer({container:T,textContentSource:G,viewport:S.clone({dontFlip:!0})}),t.value.render()):(t.value=Il.renderTextLayer({container:T,viewport:S.clone({dontFlip:!0}),isOffscreenCanvasSupported:!0,textContent:G,textContentSource:G}),t.value.promise))).then(()=>{T.setAttribute("data-page-index",`${u}`),[].slice.call(T.children).forEach(C=>{C.classList.add("vpv-text-layer-text")});const X=document.createElement("div");return X.className="endOfContent",V.value?.appendChild(X),R.value=X,e.value=t.value.textDivs,Z("textLoaded",{textDivs:e.value,textContent:G}),V.value?.appendChild(X),Z("textLoaded",{textDivs:e.value,textContent:G,textLayerRef:V.value}),{textContent:G,textDivs:e.value}},p=>(g.error(p),null))}const i=T=>{a?.pagesContainerRef&&b.value&&xR(T,b.value,a.pagesContainerRef.firstChild)};function B(){R.value&&R.value.classList.add("active")}function Y(){R.value&&R.value.classList.remove("active")}return l.watch(Q,T=>{V.value&&s(V.value)}),l.watch(n,T=>{if(!T)return;const{pageIdx:M,matchIdx:S}=T;M===J.value&&(N.value?.length&&N.value.forEach(o=>{o.classList.remove(F0)}),l.nextTick(async()=>{const o=await wR(V.value,`[data-match-index="${S}"]`);if(!o?.length)return;N.value=[];let u=null;o.forEach((G,p)=>{p===0&&(u=G),G.classList.add(F0),N.value.push(G)}),i(u)}))},{deep:!0,immediate:!0}),l.watch(c,async T=>{if(await l.nextTick(),!W.value)return;const M=await s(V.value);if(M){const{textContent:S,textDivs:o}=M;W.value=S,m(S,o,!0)}},{deep:!0}),l.onMounted(async()=>{const T=await s(V.value);if(T){const{textContent:M,textDivs:S}=T;W.value=M,m(M,S)}}),(T,M)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"textLayerRef",ref:V,class:"vpv-text-layer-wrapper",onMousedown:B,onMouseup:Y},null,544))}}),[["__scopeId","data-v-8ea1b1b9"]]),PR=w(l.defineComponent({__name:"LayerXFA",props:{page:{},document:{},viewport:{}},emits:["xfaLoaded"],setup(U,{emit:d}){const F=U,Z=d,Q=l.ref();async function c(){Q.value.replaceChildren?.();const V=l.toRaw(F.document),W=F.page,R=F.viewport;if(V.isPureXfa){const N=await W.getXfa(),t={div:Q.value,viewport:R.clone({dontFlip:!0}),linkService:new X0,annotationStorage:V?.annotationStorage,xfaHtml:N};Il.XfaLayer.render(t),Z("xfaLoaded")}}return l.watch(()=>F.viewport,V=>{F.page&&F.viewport&&Q.value&&c()}),l.onMounted(()=>{F.page&&F.viewport&&Q.value&&c()}),(V,W)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"layer",ref:Q,style:{display:"block"}},null,512))}}),[["__scopeId","data-v-a240560d"]]),AR=["data-page-index"],k0=w(l.defineComponent({__name:"VPdfPage",props:{pageIndex:{},page:{},viewport:{},document:{},afterCanvasLoaded:{type:Function},annoImageResourcesPath:{},initialTextLayer:{type:Boolean},textLayer:{type:Boolean},searchKeyword:{},highlightTexts:{},currentHighlight:{},highlightOptions:{}},emits:["highlight","textLoaded","annotated","annotationLoaded","intersected"],setup(U,{emit:d}){const F=U,Z=d,Q=l.inject(MU),{page:c,afterCanvasLoaded:V,annoImageResourcesPath:W}=l.toRefs(F),{rotation:R,scale:N,pagesContainerRef:t}=l.toRefs(Q),n=l.ref(),a=l.ref(null),b=l.ref(!1),J=l.ref(),e=l.computed(()=>l.toRaw(F.page)),m=l.ref(!1),s=l.inject(NF),i=l.ref(!1);Ad(n,([{isIntersecting:j,intersectionRatio:O}],q)=>{Z("intersected",{pageIndex:T.value,ratio:j?O:-1}),i.value=j},{root:t,threshold:[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1]});const B=l.computed(()=>F.viewport.clone({scale:1}));l.computed(()=>B.value.scale);const Y=l.computed(()=>({pageWidth:B.value.width,pageHeight:B.value.height})),T=l.computed(()=>e.value.pageNumber-1),M=l.computed(()=>B.value.rotation),S=l.computed(()=>Math.abs(R.value+M.value)%180===0),o=l.computed(()=>Y.value.pageWidth*(N.value??1)),u=l.computed(()=>Y.value.pageHeight*(N.value??1)),G=l.computed(()=>S.value?o.value:u.value),p=l.computed(()=>S.value?u.value:o.value),X=l.computed(()=>({width:`${G.value}px`,height:`${p.value}px`})),C=l.computed(()=>F.textLayer?F.textLayer:!!(F.initialTextLayer&&F.searchKeyword)),x=l.computed(()=>{const j=F.document;return{viewport:F.viewport.clone({scale:N.value,rotation:R.value}),document:j,page:c.value}}),E=l.computed(()=>({annotationsMap:void 0,annotationsFilter:void 0,imageResourcesPath:W.value,hideForms:void 0,intent:"display"})),z=l.computed(()=>{const j=F.viewport.clone({scale:N.value,rotation:R.value});return F.textLayer||F.initialTextLayer?{page:e.value,viewport:j,...F.searchKeyword&&{highlight:{keyword:F.searchKeyword},currentMatchIndex:F.currentHighlight?.pageMatchIdx}}:{page:e.value,viewport:j}});l.computed(()=>{if(!(!F.textLayer||!a.value||!J.value||!F.searchKeyword))return{pageIndex:T.value,viewport:F.viewport.clone({scale:N.value,rotation:R.value}),searchKeyword:F.searchKeyword,textContent:J.value}});const I=l.computed(()=>{if(!(!F.textLayer||!a.value||!J.value||!F.highlightTexts))return{pageIndex:T.value,viewport:F.viewport.clone({scale:N.value,rotation:R.value}),textContent:J.value,highlightKeywords:F.highlightTexts}});function y(j){Z("annotated",j)}function k(j){Z("annotationLoaded",j)}function K(j){b.value=!0,j.textLayerRef&&(a.value=j.textLayerRef),J.value=j.textContent,Z("textLoaded",j)}function P(){g.debug("XFALoaded")}return(j,O)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"pageContainerRef",ref:n,style:l.normalizeStyle(X.value)},[l.createElementVNode("div",{class:"page-inner-container",style:l.normalizeStyle(X.value),"data-page-index":T.value},[l.createElementVNode("div",{class:"page-canvas-layer",style:l.normalizeStyle(X.value)},[m.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Jd,{key:0},l.createSlots({_:2},[l.unref(s)?{name:"loaderImage",fn:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(l.unref(s))))]),key:"0"}:void 0]),1024)),l.createVNode(KR,{page:l.unref(c),width:G.value,height:p.value,"page-index":T.value,intersecting:i.value,"after-canvas-loaded":l.unref(V),onRendered:O[0]||(O[0]=()=>m.value=!0)},null,8,["page","width","height","page-index","intersecting","after-canvas-loaded"])],4),C.value?(l.openBlock(),l.createBlock(HR,l.mergeProps({key:0},z.value,{onTextLoaded:K}),null,16)):l.createCommentVNode("",!0),C.value&&m.value?(l.openBlock(),l.createBlock(iR,l.mergeProps({key:1},{...x.value,...E.value},{onAnnotation:y,onAnnotationLoaded:k}),null,16)):l.createCommentVNode("",!0),b.value&&I.value?(l.openBlock(),l.createBlock(OR,l.normalizeProps(l.mergeProps({key:2},I.value)),null,16)):l.createCommentVNode("",!0),l.createVNode(PR,l.mergeProps({...x.value},{onXfaLoaded:P}),null,16)],12,AR)],4))}}),[["__scopeId","data-v-bbb0e1e3"]]),fR=20,qR=50,_R=w(l.defineComponent({__name:"VPdfSplitter",setup(U){const d=l.ref(null),F=_d(),Z=l.computed(()=>d.value?.previousElementSibling??null),Q=l.computed(()=>Z.value?.getBoundingClientRect().width??0),c=l.computed(()=>d.value?.nextElementSibling??null),V=l.reactive({startX:0,startWidth:Q.value,startWidthPercent:0,containerWidth:0});return KV(d,{exact:!0,containerElement:F,onStart:(W,R)=>{const{clientX:N}=R;!Z.value||!F.value||(V.startX=N,V.startWidth=Q.value,V.containerWidth=F.value.getBoundingClientRect().width,V.startWidthPercent=Z.value.getBoundingClientRect().width/V.containerWidth*pl)},onMove:(W,R)=>{if(!d.value||!Z.value||!c.value||!F.value)return;const{clientX:N}=R,a=(N-V.startX)/V.containerWidth*pl;let b=V.startWidthPercent+a;b=Math.max(fR,Math.min(b,qR)),d.value.classList.add("vpv-splitter--resizing"),Z.value.classList.add("vpv-splitter-sibling--resizing"),c.value.classList.add("vpv-splitter-sibling--resizing"),F.value.classList.add("vpv-splitter-container--resizing"),Z.value.style.width=`${b}%`},onEnd:(W,R)=>{!d.value||!Z.value||!c.value||!F.value||(d.value.classList.remove("vpv-splitter--resizing"),Z.value.classList.remove("vpv-splitter-sibling--resizing"),c.value.classList.remove("vpv-splitter-sibling--resizing"),F.value.classList.remove("vpv-splitter-container--resizing"))}}),(W,R)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"splitterEle",ref:d,class:"vpv-splitter"},null,512))}}),[["__scopeId","data-v-ae084cfe"]]),$R=["src","alt"],lN={class:"page-number"},UN=100,dN=w(l.defineComponent({__name:"VPdfThumbnail",props:{page:{},isPageFocused:{type:Boolean}},emits:["click","rendered","error","visibilityChanged"],setup(U,{emit:d}){const F=U,Z=d,Q=l.inject(c0,l.ref(0)),c=l.ref(""),V=l.shallowRef(),W=l.ref(),R=l.computed(()=>l.toRaw(F.page)),N=l.computed(()=>R.value.pageNumber),t=l.computed(()=>R.value.getViewport({scale:1})),n=l.computed(()=>Math.abs(Q.value+t.value.rotation)%180===0),a=l.ref({}),b=l.inject(NF,void 0);Ad(W,async([{isIntersecting:m,target:s,intersectionRect:i,rootBounds:B}],Y)=>{Z("visibilityChanged",{pageIndex:N.value-1,visibility:m})});const J=()=>{const m=V.value;m&&m.cancel();const{width:s,height:i}=t.value,B=UN,Y=B/s,T=B/(s/i),M=R.value.getViewport({scale:Y,rotation:Q.value}),S=document.createElement("canvas"),o=S.getContext("2d",{alpha:!1}),u=n.value?B:T,G=n.value?T:B;a.value={width:`${u}px`,paddingTop:`${G}px`},S.width=u,S.height=G,S.style.width=`${u}px`,S.style.height=`${G}px`;const p={canvasContext:o,viewport:M};V.value=R.value.render(p),V.value.promise.then(()=>{c.value=S.toDataURL()}).catch(X=>Z("error",X)).finally(()=>Z("rendered",N.value))},e=()=>{Z("click",R.value.pageNumber)};return l.watchEffect(()=>{R.value&&J()}),(m,s)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"elemRef",ref:W,class:l.normalizeClass(["pdf-thumbnail-wrapper",{focused:F.isPageFocused,"pdf-thumbnail-vertical":n.value,"pdf-thumbnail-horizontal":!n.value}]),onClick:e},[l.createElementVNode("div",{class:l.normalizeClass([{focused:F.isPageFocused},"pdf-thumbnail"])},[c.value?(l.openBlock(),l.createElementBlock("img",{key:0,src:c.value,alt:`pdf-page-${F.page.pageNumber}`},null,8,$R)):(l.openBlock(),l.createElementBlock("div",{key:1,class:"placeholder",style:l.normalizeStyle(a.value)},[l.createVNode(Jd,null,l.createSlots({_:2},[l.unref(b)?{name:"loaderImage",fn:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(l.unref(b))))]),key:"0"}:void 0]),1024)],4))],2),l.createElementVNode("div",lN,l.toDisplayString(N.value),1)],2))}}),[["__scopeId","data-v-16a01bd8"]]),FN={class:"vpv-thumbnail-list-container"},y0=100;function ZN(U,d){const F=d/U;return y0*F}function QN(U,d){if(!U||!d)return;const F=U.getBoundingClientRect().top-d.getBoundingClientRect().top,Z=U.clientHeight,Q=d.clientHeight;if(F<0){d.scrollTop+=F;return}F+Z<=Q||(d.scrollTop+=F+Z-Q)}const cN=w(l.defineComponent({__name:"VPdfThumbnails",props:{pages:{},isOpened:{type:Boolean}},emits:["navigate"],setup(U,{emit:d}){const F=U,Z=d,Q=l.inject(md,l.ref(1)),c=l.ref(null),V=l.ref([]),W=l.shallowRef([]),R=l.ref(0),N=l.ref(!1),{height:t}=vV(c),{isScrolling:n}=qd(c);AV(c,()=>{const m=W.value.length,s=F.pages.slice(m,m+R.value);W.value=[...W.value,...s],V.value=Array.from(c.value?.querySelectorAll(".vpv-thumbnail-item")??[])},{distance:10});const a=m=>{Z("navigate",m)},b=m=>{},J=(m,s)=>{const i=m[s];i&&QN(i,c.value)};l.watch(n,m=>{m&&(N.value=!0)}),l.watch(Q,()=>{N.value=!1}),l.watch([()=>F.pages,t],async([m,s])=>{if(!s)return;const i=Q.value;let B=0,Y=0;for(const T of m){const M=T.page.getViewport({scale:1}),o=y0/M.width,u=T.page.getViewport({scale:o});if(B>=s)break;const{height:G,width:p}=u;B+=ZN(p,G),Y+=1}R.value=Y,Y<i&&(Y=i+Y),W.value=m.slice(0,Y),await l.nextTick(),V.value=Array.from(c.value?.querySelectorAll(".vpv-thumbnail-item")??[]),requestAnimationFrame(()=>J(V.value,i-1))},{immediate:!0});const e=m=>{const s=m.target;if(document.activeElement===s)switch(m.key){case"ArrowUp":if(Q.value===1)return;Z("navigate",Q.value-1);break;case"ArrowDown":if(Q.value===F.pages.length)return;Z("navigate",Q.value+1);break}};return l.watchEffect(async()=>{const m=Q.value,s=W.value.length,i=s+R.value;if(c.value?.removeEventListener("keydown",e),c.value?.addEventListener("keydown",e),m>=s){let S=m>i?m:i;if(S===m){const u=F.pages.length-1;m<u&&(S+=R.value)}const o=F.pages.slice(s,S);o.length&&(W.value=[...W.value,...o],await l.nextTick(),V.value=Array.from(c.value?.querySelectorAll(".vpv-thumbnail-item")??[]))}const B=F.isOpened,Y=N.value;if(!B||Y)return;const T=c.value,M=l.toRaw(V.value);!T||M.length===0||m<0||m>M.length||J(M,m-1)}),l.onUnmounted(()=>{c.value?.removeEventListener("keydown",e)}),(m,s)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"elWrapperRef",ref:c,tabindex:"0",role:"menu","aria-label":"PDF thumbnails",class:"vpv-thumbnail-list-wrapper vp-overflow-y-scroll vp-h-full"},[l.createElementVNode("div",FN,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(W.value,(i,B)=>(l.openBlock(),l.createElementBlock("div",{key:i.page.pageNumber,class:"vpv-thumbnail-wrapper vp-mb-2"},[l.createVNode(dN,{class:"vpv-thumbnail-item",page:i.page,"is-page-focused":i.page.pageNumber===l.unref(Q),onVisibilityChanged:b,onClick:a},null,8,["page","is-page-focused"])]))),128))])],512))}}),[["__scopeId","data-v-9a76c422"]]),VN=(U,d,F)=>{const Z=U[d];return Z?typeof Z=="function"?Z():Promise.resolve(Z):new Promise((Q,c)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(c.bind(null,new Error("Unknown variable dynamic import: "+d+(d.split("/").length!==F?". Note that variables only represent file names one level deep.":""))))})},r=w(l.defineComponent({__name:"AppIcon",props:{icon:{}},setup(U){const d=U,F=l.defineAsyncComponent({loader:()=>VN(Object.assign({"../assets/icons/arrow-up.svg":()=>Promise.resolve().then(()=>YJ),"../assets/icons/check.svg":()=>Promise.resolve().then(()=>pJ),"../assets/icons/chevron-down.svg":()=>Promise.resolve().then(()=>uJ),"../assets/icons/clear.svg":()=>Promise.resolve().then(()=>IJ),"../assets/icons/close.svg":()=>Promise.resolve().then(()=>kJ),"../assets/icons/comment-panel.svg":()=>Promise.resolve().then(()=>zJ),"../assets/icons/comment.svg":()=>Promise.resolve().then(()=>DJ),"../assets/icons/download.svg":()=>Promise.resolve().then(()=>wJ),"../assets/icons/drag-icon-dark.svg":()=>Promise.resolve().then(()=>jJ),"../assets/icons/drag-icon.svg":()=>Promise.resolve().then(()=>gJ),"../assets/icons/ellipsis-vertical.svg":()=>Promise.resolve().then(()=>KJ),"../assets/icons/empty-comment-dark.svg":()=>Promise.resolve().then(()=>HJ),"../assets/icons/empty-comment-light.svg":()=>Promise.resolve().then(()=>AJ),"../assets/icons/file.svg":()=>Promise.resolve().then(()=>qJ),"../assets/icons/first-page.svg":()=>Promise.resolve().then(()=>$J),"../assets/icons/fullscreen.svg":()=>Promise.resolve().then(()=>Us),"../assets/icons/hand.svg":()=>Promise.resolve().then(()=>Fs),"../assets/icons/info.svg":()=>Promise.resolve().then(()=>Qs),"../assets/icons/last-page.svg":()=>Promise.resolve().then(()=>Vs),"../assets/icons/magnifier.svg":()=>Promise.resolve().then(()=>Rs),"../assets/icons/moon.svg":()=>Promise.resolve().then(()=>ts),"../assets/icons/page-view-dual.svg":()=>Promise.resolve().then(()=>as),"../assets/icons/page-view-single.svg":()=>Promise.resolve().then(()=>ms),"../assets/icons/pointer.svg":()=>Promise.resolve().then(()=>ss),"../assets/icons/printer.svg":()=>Promise.resolve().then(()=>is),"../assets/icons/rotate-counter-clockwise.svg":()=>Promise.resolve().then(()=>Bs),"../assets/icons/scrolling-horizontal.svg":()=>Promise.resolve().then(()=>hs),"../assets/icons/scrolling-page.svg":()=>Promise.resolve().then(()=>Ys),"../assets/icons/scrolling-vertical.svg":()=>Promise.resolve().then(()=>ps),"../assets/icons/scrolling-wrapped.svg":()=>Promise.resolve().then(()=>us),"../assets/icons/sun.svg":()=>Promise.resolve().then(()=>Is),"../assets/icons/thumbnail.svg":()=>Promise.resolve().then(()=>ks),"../assets/icons/zoom-in.svg":()=>Promise.resolve().then(()=>zs),"../assets/icons/zoom-out.svg":()=>Promise.resolve().then(()=>Ds)}),`../assets/icons/${d.icon}.svg`,4)});return(Z,Q)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(l.unref(F))))}}),[["__scopeId","data-v-068a8395"]]),WN={class:"vpv-comments__comment-date"},RN=w(l.defineComponent({__name:"VPdfCommentsDate",props:{date:{}},setup(U){const d=U;return(F,Z)=>(l.openBlock(),l.createElementBlock("p",WN,l.toDisplayString(l.unref(xW)(d.date)),1))}}),[["__scopeId","data-v-ea95874b"]]),NN={class:"vpv-comments__comment-header"},tN={key:0,class:"vpv-comments__comment-author"},z0=w(l.defineComponent({__name:"VPdfCommentsHeader",props:{comment:{}},setup(U){const d=U;return(F,Z)=>(l.openBlock(),l.createElementBlock("div",NN,[d.comment.titleObj?.str?(l.openBlock(),l.createElementBlock("p",tN,l.toDisplayString(d.comment.titleObj.str),1)):l.createCommentVNode("",!0),d.comment.modificationDate||d.comment.creationDate?(l.openBlock(),l.createBlock(RN,{key:1,date:d.comment.modificationDate||d.comment.creationDate},null,8,["date"])):l.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-a415f00f"]]),nN={},aN={class:"vpv-comments__comment-text"};function bN(U,d){return l.openBlock(),l.createElementBlock("p",aN,[l.renderSlot(U.$slots,"default",{},void 0,!0)])}const C0=w(nN,[["render",bN],["__scopeId","data-v-5b6e428f"]]),mN=["top","right","bottom","left"],FU=Math.min,Bl=Math.max,id=Math.round,Gd=Math.floor,Cl=U=>({x:U,y:U}),JN={left:"right",right:"left",bottom:"top",top:"bottom"},sN={start:"end",end:"start"};function bF(U,d,F){return Bl(U,FU(d,F))}function Kl(U,d){return typeof U=="function"?U(d):U}function vl(U){return U.split("-")[0]}function XU(U){return U.split("-")[1]}function mF(U){return U==="x"?"y":"x"}function JF(U){return U==="y"?"height":"width"}function ZU(U){return["top","bottom"].includes(vl(U))?"y":"x"}function sF(U){return mF(ZU(U))}function eN(U,d,F){F===void 0&&(F=!1);const Z=XU(U),Q=sF(U),c=JF(Q);let V=Q==="x"?Z===(F?"end":"start")?"right":"left":Z==="start"?"bottom":"top";return d.reference[c]>d.floating[c]&&(V=Bd(V)),[V,Bd(V)]}function iN(U){const d=Bd(U);return[eF(U),d,eF(d)]}function eF(U){return U.replace(/start|end/g,d=>sN[d])}function GN(U,d,F){const Z=["left","right"],Q=["right","left"],c=["top","bottom"],V=["bottom","top"];switch(U){case"top":case"bottom":return F?d?Q:Z:d?Z:Q;case"left":case"right":return d?c:V;default:return[]}}function BN(U,d,F,Z){const Q=XU(U);let c=GN(vl(U),F==="start",Z);return Q&&(c=c.map(V=>V+"-"+Q),d&&(c=c.concat(c.map(eF)))),c}function Bd(U){return U.replace(/left|right|bottom|top/g,d=>JN[d])}function SN(U){return{top:0,right:0,bottom:0,left:0,...U}}function D0(U){return typeof U!="number"?SN(U):{top:U,right:U,bottom:U,left:U}}function Sd(U){const{x:d,y:F,width:Z,height:Q}=U;return{width:Z,height:Q,top:F,left:d,right:d+Z,bottom:F+Q,x:d,y:F}}function L0(U,d,F){let{reference:Z,floating:Q}=U;const c=ZU(d),V=sF(d),W=JF(V),R=vl(d),N=c==="y",t=Z.x+Z.width/2-Q.width/2,n=Z.y+Z.height/2-Q.height/2,a=Z[W]/2-Q[W]/2;let b;switch(R){case"top":b={x:t,y:Z.y-Q.height};break;case"bottom":b={x:t,y:Z.y+Z.height};break;case"right":b={x:Z.x+Z.width,y:n};break;case"left":b={x:Z.x-Q.width,y:n};break;default:b={x:Z.x,y:Z.y}}switch(XU(d)){case"start":b[V]-=a*(F&&N?-1:1);break;case"end":b[V]+=a*(F&&N?-1:1);break}return b}const hN=async(U,d,F)=>{const{placement:Z="bottom",strategy:Q="absolute",middleware:c=[],platform:V}=F,W=c.filter(Boolean),R=await(V.isRTL==null?void 0:V.isRTL(d));let N=await V.getElementRects({reference:U,floating:d,strategy:Q}),{x:t,y:n}=L0(N,Z,R),a=Z,b={},J=0;for(let e=0;e<W.length;e++){const{name:m,fn:s}=W[e],{x:i,y:B,data:Y,reset:T}=await s({x:t,y:n,initialPlacement:Z,placement:a,strategy:Q,middlewareData:b,rects:N,platform:V,elements:{reference:U,floating:d}});t=i??t,n=B??n,b={...b,[m]:{...b[m],...Y}},T&&J<=50&&(J++,typeof T=="object"&&(T.placement&&(a=T.placement),T.rects&&(N=T.rects===!0?await V.getElementRects({reference:U,floating:d,strategy:Q}):T.rects),{x:t,y:n}=L0(N,a,R)),e=-1)}return{x:t,y:n,placement:a,strategy:Q,middlewareData:b}};async function AU(U,d){var F;d===void 0&&(d={});const{x:Z,y:Q,platform:c,rects:V,elements:W,strategy:R}=U,{boundary:N="clippingAncestors",rootBoundary:t="viewport",elementContext:n="floating",altBoundary:a=!1,padding:b=0}=Kl(d,U),J=D0(b),m=W[a?n==="floating"?"reference":"floating":n],s=Sd(await c.getClippingRect({element:(F=await(c.isElement==null?void 0:c.isElement(m)))==null||F?m:m.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(W.floating)),boundary:N,rootBoundary:t,strategy:R})),i=n==="floating"?{x:Z,y:Q,width:V.floating.width,height:V.floating.height}:V.reference,B=await(c.getOffsetParent==null?void 0:c.getOffsetParent(W.floating)),Y=await(c.isElement==null?void 0:c.isElement(B))?await(c.getScale==null?void 0:c.getScale(B))||{x:1,y:1}:{x:1,y:1},T=Sd(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:W,rect:i,offsetParent:B,strategy:R}):i);return{top:(s.top-T.top+J.top)/Y.y,bottom:(T.bottom-s.bottom+J.bottom)/Y.y,left:(s.left-T.left+J.left)/Y.x,right:(T.right-s.right+J.right)/Y.x}}const TN=U=>({name:"arrow",options:U,async fn(d){const{x:F,y:Z,placement:Q,rects:c,platform:V,elements:W,middlewareData:R}=d,{element:N,padding:t=0}=Kl(U,d)||{};if(N==null)return{};const n=D0(t),a={x:F,y:Z},b=sF(Q),J=JF(b),e=await V.getDimensions(N),m=b==="y",s=m?"top":"left",i=m?"bottom":"right",B=m?"clientHeight":"clientWidth",Y=c.reference[J]+c.reference[b]-a[b]-c.floating[J],T=a[b]-c.reference[b],M=await(V.getOffsetParent==null?void 0:V.getOffsetParent(N));let S=M?M[B]:0;(!S||!await(V.isElement==null?void 0:V.isElement(M)))&&(S=W.floating[B]||c.floating[J]);const o=Y/2-T/2,u=S/2-e[J]/2-1,G=FU(n[s],u),p=FU(n[i],u),X=G,C=S-e[J]-p,x=S/2-e[J]/2+o,E=bF(X,x,C),z=!R.arrow&&XU(Q)!=null&&x!==E&&c.reference[J]/2-(x<X?G:p)-e[J]/2<0,I=z?x<X?x-X:x-C:0;return{[b]:a[b]+I,data:{[b]:E,centerOffset:x-E-I,...z&&{alignmentOffset:I}},reset:z}}}),YN=function(U){return U===void 0&&(U={}),{name:"flip",options:U,async fn(d){var F,Z;const{placement:Q,middlewareData:c,rects:V,initialPlacement:W,platform:R,elements:N}=d,{mainAxis:t=!0,crossAxis:n=!0,fallbackPlacements:a,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:J="none",flipAlignment:e=!0,...m}=Kl(U,d);if((F=c.arrow)!=null&&F.alignmentOffset)return{};const s=vl(Q),i=ZU(W),B=vl(W)===W,Y=await(R.isRTL==null?void 0:R.isRTL(N.floating)),T=a||(B||!e?[Bd(W)]:iN(W)),M=J!=="none";!a&&M&&T.push(...BN(W,e,J,Y));const S=[W,...T],o=await AU(d,m),u=[];let G=((Z=c.flip)==null?void 0:Z.overflows)||[];if(t&&u.push(o[s]),n){const x=eN(Q,V,Y);u.push(o[x[0]],o[x[1]])}if(G=[...G,{placement:Q,overflows:u}],!u.every(x=>x<=0)){var p,X;const x=(((p=c.flip)==null?void 0:p.index)||0)+1,E=S[x];if(E)return{data:{index:x,overflows:G},reset:{placement:E}};let z=(X=G.filter(I=>I.overflows[0]<=0).sort((I,y)=>I.overflows[1]-y.overflows[1])[0])==null?void 0:X.placement;if(!z)switch(b){case"bestFit":{var C;const I=(C=G.filter(y=>{if(M){const k=ZU(y.placement);return k===i||k==="y"}return!0}).map(y=>[y.placement,y.overflows.filter(k=>k>0).reduce((k,K)=>k+K,0)]).sort((y,k)=>y[1]-k[1])[0])==null?void 0:C[0];I&&(z=I);break}case"initialPlacement":z=W;break}if(Q!==z)return{reset:{placement:z}}}return{}}}};function w0(U,d){return{top:U.top-d.height,right:U.right-d.width,bottom:U.bottom-d.height,left:U.left-d.width}}function x0(U){return mN.some(d=>U[d]>=0)}const MN=function(U){return U===void 0&&(U={}),{name:"hide",options:U,async fn(d){const{rects:F}=d,{strategy:Z="referenceHidden",...Q}=Kl(U,d);switch(Z){case"referenceHidden":{const c=await AU(d,{...Q,elementContext:"reference"}),V=w0(c,F.reference);return{data:{referenceHiddenOffsets:V,referenceHidden:x0(V)}}}case"escaped":{const c=await AU(d,{...Q,altBoundary:!0}),V=w0(c,F.floating);return{data:{escapedOffsets:V,escaped:x0(V)}}}default:return{}}}}};async function pN(U,d){const{placement:F,platform:Z,elements:Q}=U,c=await(Z.isRTL==null?void 0:Z.isRTL(Q.floating)),V=vl(F),W=XU(F),R=ZU(F)==="y",N=["left","top"].includes(V)?-1:1,t=c&&R?-1:1,n=Kl(d,U);let{mainAxis:a,crossAxis:b,alignmentAxis:J}=typeof n=="number"?{mainAxis:n,crossAxis:0,alignmentAxis:null}:{mainAxis:n.mainAxis||0,crossAxis:n.crossAxis||0,alignmentAxis:n.alignmentAxis};return W&&typeof J=="number"&&(b=W==="end"?J*-1:J),R?{x:b*t,y:a*N}:{x:a*N,y:b*t}}const XN=function(U){return U===void 0&&(U=0),{name:"offset",options:U,async fn(d){var F,Z;const{x:Q,y:c,placement:V,middlewareData:W}=d,R=await pN(d,U);return V===((F=W.offset)==null?void 0:F.placement)&&(Z=W.arrow)!=null&&Z.alignmentOffset?{}:{x:Q+R.x,y:c+R.y,data:{...R,placement:V}}}}},uN=function(U){return U===void 0&&(U={}),{name:"shift",options:U,async fn(d){const{x:F,y:Z,placement:Q}=d,{mainAxis:c=!0,crossAxis:V=!1,limiter:W={fn:m=>{let{x:s,y:i}=m;return{x:s,y:i}}},...R}=Kl(U,d),N={x:F,y:Z},t=await AU(d,R),n=ZU(vl(Q)),a=mF(n);let b=N[a],J=N[n];if(c){const m=a==="y"?"top":"left",s=a==="y"?"bottom":"right",i=b+t[m],B=b-t[s];b=bF(i,b,B)}if(V){const m=n==="y"?"top":"left",s=n==="y"?"bottom":"right",i=J+t[m],B=J-t[s];J=bF(i,J,B)}const e=W.fn({...d,[a]:b,[n]:J});return{...e,data:{x:e.x-F,y:e.y-Z,enabled:{[a]:c,[n]:V}}}}}},oN=function(U){return U===void 0&&(U={}),{options:U,fn(d){const{x:F,y:Z,placement:Q,rects:c,middlewareData:V}=d,{offset:W=0,mainAxis:R=!0,crossAxis:N=!0}=Kl(U,d),t={x:F,y:Z},n=ZU(Q),a=mF(n);let b=t[a],J=t[n];const e=Kl(W,d),m=typeof e=="number"?{mainAxis:e,crossAxis:0}:{mainAxis:0,crossAxis:0,...e};if(R){const B=a==="y"?"height":"width",Y=c.reference[a]-c.floating[B]+m.mainAxis,T=c.reference[a]+c.reference[B]-m.mainAxis;b<Y?b=Y:b>T&&(b=T)}if(N){var s,i;const B=a==="y"?"width":"height",Y=["top","left"].includes(vl(Q)),T=c.reference[n]-c.floating[B]+(Y&&((s=V.offset)==null?void 0:s[n])||0)+(Y?0:m.crossAxis),M=c.reference[n]+c.reference[B]+(Y?0:((i=V.offset)==null?void 0:i[n])||0)-(Y?m.crossAxis:0);J<T?J=T:J>M&&(J=M)}return{[a]:b,[n]:J}}}},IN=function(U){return U===void 0&&(U={}),{name:"size",options:U,async fn(d){var F,Z;const{placement:Q,rects:c,platform:V,elements:W}=d,{apply:R=()=>{},...N}=Kl(U,d),t=await AU(d,N),n=vl(Q),a=XU(Q),b=ZU(Q)==="y",{width:J,height:e}=c.floating;let m,s;n==="top"||n==="bottom"?(m=n,s=a===(await(V.isRTL==null?void 0:V.isRTL(W.floating))?"start":"end")?"left":"right"):(s=n,m=a==="end"?"top":"bottom");const i=e-t.top-t.bottom,B=J-t.left-t.right,Y=FU(e-t[m],i),T=FU(J-t[s],B),M=!d.middlewareData.shift;let S=Y,o=T;if((F=d.middlewareData.shift)!=null&&F.enabled.x&&(o=B),(Z=d.middlewareData.shift)!=null&&Z.enabled.y&&(S=i),M&&!a){const G=Bl(t.left,0),p=Bl(t.right,0),X=Bl(t.top,0),C=Bl(t.bottom,0);b?o=J-2*(G!==0||p!==0?G+p:Bl(t.left,t.right)):S=e-2*(X!==0||C!==0?X+C:Bl(t.top,t.bottom))}await R({...d,availableWidth:o,availableHeight:S});const u=await V.getDimensions(W.floating);return J!==u.width||e!==u.height?{reset:{rects:!0}}:{}}}};function hd(){return typeof window<"u"}function nU(U){return iF(U)?(U.nodeName||"").toLowerCase():"#document"}function Sl(U){var d;return(U==null||(d=U.ownerDocument)==null?void 0:d.defaultView)||window}function Dl(U){var d;return(d=(iF(U)?U.ownerDocument:U.document)||window.document)==null?void 0:d.documentElement}function iF(U){return hd()?U instanceof Node||U instanceof Sl(U).Node:!1}function ul(U){return hd()?U instanceof Element||U instanceof Sl(U).Element:!1}function Ll(U){return hd()?U instanceof HTMLElement||U instanceof Sl(U).HTMLElement:!1}function j0(U){return!hd()||typeof ShadowRoot>"u"?!1:U instanceof ShadowRoot||U instanceof Sl(U).ShadowRoot}function fU(U){const{overflow:d,overflowX:F,overflowY:Z,display:Q}=ol(U);return/auto|scroll|overlay|hidden|clip/.test(d+Z+F)&&!["inline","contents"].includes(Q)}function EN(U){return["table","td","th"].includes(nU(U))}function Td(U){return[":popover-open",":modal"].some(d=>{try{return U.matches(d)}catch{return!1}})}function GF(U){const d=BF(),F=ul(U)?ol(U):U;return F.transform!=="none"||F.perspective!=="none"||(F.containerType?F.containerType!=="normal":!1)||!d&&(F.backdropFilter?F.backdropFilter!=="none":!1)||!d&&(F.filter?F.filter!=="none":!1)||["transform","perspective","filter"].some(Z=>(F.willChange||"").includes(Z))||["paint","layout","strict","content"].some(Z=>(F.contain||"").includes(Z))}function kN(U){let d=QU(U);for(;Ll(d)&&!uU(d);){if(GF(d))return d;if(Td(d))return null;d=QU(d)}return null}function BF(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function uU(U){return["html","body","#document"].includes(nU(U))}function ol(U){return Sl(U).getComputedStyle(U)}function Yd(U){return ul(U)?{scrollLeft:U.scrollLeft,scrollTop:U.scrollTop}:{scrollLeft:U.scrollX,scrollTop:U.scrollY}}function QU(U){if(nU(U)==="html")return U;const d=U.assignedSlot||U.parentNode||j0(U)&&U.host||Dl(U);return j0(d)?d.host:d}function O0(U){const d=QU(U);return uU(d)?U.ownerDocument?U.ownerDocument.body:U.body:Ll(d)&&fU(d)?d:O0(d)}function qU(U,d,F){var Z;d===void 0&&(d=[]),F===void 0&&(F=!0);const Q=O0(U),c=Q===((Z=U.ownerDocument)==null?void 0:Z.body),V=Sl(Q);if(c){const W=SF(V);return d.concat(V,V.visualViewport||[],fU(Q)?Q:[],W&&F?qU(W):[])}return d.concat(Q,qU(Q,[],F))}function SF(U){return U.parent&&Object.getPrototypeOf(U.parent)?U.frameElement:null}function g0(U){const d=ol(U);let F=parseFloat(d.width)||0,Z=parseFloat(d.height)||0;const Q=Ll(U),c=Q?U.offsetWidth:F,V=Q?U.offsetHeight:Z,W=id(F)!==c||id(Z)!==V;return W&&(F=c,Z=V),{width:F,height:Z,$:W}}function hF(U){return ul(U)?U:U.contextElement}function oU(U){const d=hF(U);if(!Ll(d))return Cl(1);const F=d.getBoundingClientRect(),{width:Z,height:Q,$:c}=g0(d);let V=(c?id(F.width):F.width)/Z,W=(c?id(F.height):F.height)/Q;return(!V||!Number.isFinite(V))&&(V=1),(!W||!Number.isFinite(W))&&(W=1),{x:V,y:W}}const yN=Cl(0);function r0(U){const d=Sl(U);return!BF()||!d.visualViewport?yN:{x:d.visualViewport.offsetLeft,y:d.visualViewport.offsetTop}}function zN(U,d,F){return d===void 0&&(d=!1),!F||d&&F!==Sl(U)?!1:d}function aU(U,d,F,Z){d===void 0&&(d=!1),F===void 0&&(F=!1);const Q=U.getBoundingClientRect(),c=hF(U);let V=Cl(1);d&&(Z?ul(Z)&&(V=oU(Z)):V=oU(U));const W=zN(c,F,Z)?r0(c):Cl(0);let R=(Q.left+W.x)/V.x,N=(Q.top+W.y)/V.y,t=Q.width/V.x,n=Q.height/V.y;if(c){const a=Sl(c),b=Z&&ul(Z)?Sl(Z):Z;let J=a,e=SF(J);for(;e&&Z&&b!==J;){const m=oU(e),s=e.getBoundingClientRect(),i=ol(e),B=s.left+(e.clientLeft+parseFloat(i.paddingLeft))*m.x,Y=s.top+(e.clientTop+parseFloat(i.paddingTop))*m.y;R*=m.x,N*=m.y,t*=m.x,n*=m.y,R+=B,N+=Y,J=Sl(e),e=SF(J)}}return Sd({width:t,height:n,x:R,y:N})}function TF(U,d){const F=Yd(U).scrollLeft;return d?d.left+F:aU(Dl(U)).left+F}function K0(U,d,F){F===void 0&&(F=!1);const Z=U.getBoundingClientRect(),Q=Z.left+d.scrollLeft-(F?0:TF(U,Z)),c=Z.top+d.scrollTop;return{x:Q,y:c}}function CN(U){let{elements:d,rect:F,offsetParent:Z,strategy:Q}=U;const c=Q==="fixed",V=Dl(Z),W=d?Td(d.floating):!1;if(Z===V||W&&c)return F;let R={scrollLeft:0,scrollTop:0},N=Cl(1);const t=Cl(0),n=Ll(Z);if((n||!n&&!c)&&((nU(Z)!=="body"||fU(V))&&(R=Yd(Z)),Ll(Z))){const b=aU(Z);N=oU(Z),t.x=b.x+Z.clientLeft,t.y=b.y+Z.clientTop}const a=V&&!n&&!c?K0(V,R,!0):Cl(0);return{width:F.width*N.x,height:F.height*N.y,x:F.x*N.x-R.scrollLeft*N.x+t.x+a.x,y:F.y*N.y-R.scrollTop*N.y+t.y+a.y}}function DN(U){return Array.from(U.getClientRects())}function LN(U){const d=Dl(U),F=Yd(U),Z=U.ownerDocument.body,Q=Bl(d.scrollWidth,d.clientWidth,Z.scrollWidth,Z.clientWidth),c=Bl(d.scrollHeight,d.clientHeight,Z.scrollHeight,Z.clientHeight);let V=-F.scrollLeft+TF(U);const W=-F.scrollTop;return ol(Z).direction==="rtl"&&(V+=Bl(d.clientWidth,Z.clientWidth)-Q),{width:Q,height:c,x:V,y:W}}function wN(U,d){const F=Sl(U),Z=Dl(U),Q=F.visualViewport;let c=Z.clientWidth,V=Z.clientHeight,W=0,R=0;if(Q){c=Q.width,V=Q.height;const N=BF();(!N||N&&d==="fixed")&&(W=Q.offsetLeft,R=Q.offsetTop)}return{width:c,height:V,x:W,y:R}}function xN(U,d){const F=aU(U,!0,d==="fixed"),Z=F.top+U.clientTop,Q=F.left+U.clientLeft,c=Ll(U)?oU(U):Cl(1),V=U.clientWidth*c.x,W=U.clientHeight*c.y,R=Q*c.x,N=Z*c.y;return{width:V,height:W,x:R,y:N}}function v0(U,d,F){let Z;if(d==="viewport")Z=wN(U,F);else if(d==="document")Z=LN(Dl(U));else if(ul(d))Z=xN(d,F);else{const Q=r0(U);Z={x:d.x-Q.x,y:d.y-Q.y,width:d.width,height:d.height}}return Sd(Z)}function H0(U,d){const F=QU(U);return F===d||!ul(F)||uU(F)?!1:ol(F).position==="fixed"||H0(F,d)}function jN(U,d){const F=d.get(U);if(F)return F;let Z=qU(U,[],!1).filter(W=>ul(W)&&nU(W)!=="body"),Q=null;const c=ol(U).position==="fixed";let V=c?QU(U):U;for(;ul(V)&&!uU(V);){const W=ol(V),R=GF(V);!R&&W.position==="fixed"&&(Q=null),(c?!R&&!Q:!R&&W.position==="static"&&!!Q&&["absolute","fixed"].includes(Q.position)||fU(V)&&!R&&H0(U,V))?Z=Z.filter(t=>t!==V):Q=W,V=QU(V)}return d.set(U,Z),Z}function ON(U){let{element:d,boundary:F,rootBoundary:Z,strategy:Q}=U;const V=[...F==="clippingAncestors"?Td(d)?[]:jN(d,this._c):[].concat(F),Z],W=V[0],R=V.reduce((N,t)=>{const n=v0(d,t,Q);return N.top=Bl(n.top,N.top),N.right=FU(n.right,N.right),N.bottom=FU(n.bottom,N.bottom),N.left=Bl(n.left,N.left),N},v0(d,W,Q));return{width:R.right-R.left,height:R.bottom-R.top,x:R.left,y:R.top}}function gN(U){const{width:d,height:F}=g0(U);return{width:d,height:F}}function rN(U,d,F){const Z=Ll(d),Q=Dl(d),c=F==="fixed",V=aU(U,!0,c,d);let W={scrollLeft:0,scrollTop:0};const R=Cl(0);if(Z||!Z&&!c)if((nU(d)!=="body"||fU(Q))&&(W=Yd(d)),Z){const a=aU(d,!0,c,d);R.x=a.x+d.clientLeft,R.y=a.y+d.clientTop}else Q&&(R.x=TF(Q));const N=Q&&!Z&&!c?K0(Q,W):Cl(0),t=V.left+W.scrollLeft-R.x-N.x,n=V.top+W.scrollTop-R.y-N.y;return{x:t,y:n,width:V.width,height:V.height}}function YF(U){return ol(U).position==="static"}function P0(U,d){if(!Ll(U)||ol(U).position==="fixed")return null;if(d)return d(U);let F=U.offsetParent;return Dl(U)===F&&(F=F.ownerDocument.body),F}function A0(U,d){const F=Sl(U);if(Td(U))return F;if(!Ll(U)){let Q=QU(U);for(;Q&&!uU(Q);){if(ul(Q)&&!YF(Q))return Q;Q=QU(Q)}return F}let Z=P0(U,d);for(;Z&&EN(Z)&&YF(Z);)Z=P0(Z,d);return Z&&uU(Z)&&YF(Z)&&!GF(Z)?F:Z||kN(U)||F}const KN=async function(U){const d=this.getOffsetParent||A0,F=this.getDimensions,Z=await F(U.floating);return{reference:rN(U.reference,await d(U.floating),U.strategy),floating:{x:0,y:0,width:Z.width,height:Z.height}}};function vN(U){return ol(U).direction==="rtl"}const HN={convertOffsetParentRelativeRectToViewportRelativeRect:CN,getDocumentElement:Dl,getClippingRect:ON,getOffsetParent:A0,getElementRects:KN,getClientRects:DN,getDimensions:gN,getScale:oU,isElement:ul,isRTL:vN};function PN(U,d){let F=null,Z;const Q=Dl(U);function c(){var W;clearTimeout(Z),(W=F)==null||W.disconnect(),F=null}function V(W,R){W===void 0&&(W=!1),R===void 0&&(R=1),c();const{left:N,top:t,width:n,height:a}=U.getBoundingClientRect();if(W||d(),!n||!a)return;const b=Gd(t),J=Gd(Q.clientWidth-(N+n)),e=Gd(Q.clientHeight-(t+a)),m=Gd(N),i={rootMargin:-b+"px "+-J+"px "+-e+"px "+-m+"px",threshold:Bl(0,FU(1,R))||1};let B=!0;function Y(T){const M=T[0].intersectionRatio;if(M!==R){if(!B)return V();M?V(!1,M):Z=setTimeout(()=>{V(!1,1e-7)},1e3)}B=!1}try{F=new IntersectionObserver(Y,{...i,root:Q.ownerDocument})}catch{F=new IntersectionObserver(Y,i)}F.observe(U)}return V(!0),c}function AN(U,d,F,Z){Z===void 0&&(Z={});const{ancestorScroll:Q=!0,ancestorResize:c=!0,elementResize:V=typeof ResizeObserver=="function",layoutShift:W=typeof IntersectionObserver=="function",animationFrame:R=!1}=Z,N=hF(U),t=Q||c?[...N?qU(N):[],...qU(d)]:[];t.forEach(s=>{Q&&s.addEventListener("scroll",F,{passive:!0}),c&&s.addEventListener("resize",F)});const n=N&&W?PN(N,F):null;let a=-1,b=null;V&&(b=new ResizeObserver(s=>{let[i]=s;i&&i.target===N&&b&&(b.unobserve(d),cancelAnimationFrame(a),a=requestAnimationFrame(()=>{var B;(B=b)==null||B.observe(d)})),F()}),N&&!R&&b.observe(N),b.observe(d));let J,e=R?aU(U):null;R&&m();function m(){const s=aU(U);e&&(s.x!==e.x||s.y!==e.y||s.width!==e.width||s.height!==e.height)&&F(),e=s,J=requestAnimationFrame(m)}return F(),()=>{var s;t.forEach(i=>{Q&&i.removeEventListener("scroll",F),c&&i.removeEventListener("resize",F)}),n?.(),(s=b)==null||s.disconnect(),b=null,R&&cancelAnimationFrame(J)}}const fN=XN,qN=uN,f0=YN,_N=IN,$N=MN,lt=TN,Ut=oN,dt=(U,d,F)=>{const Z=new Map,Q={platform:HN,...F},c={...Q.platform,_c:Z};return hN(U,d,{...Q,platform:c})};function Ft(U){return U!=null&&typeof U=="object"&&"$el"in U}function MF(U){if(Ft(U)){const d=U.$el;return iF(d)&&nU(d)==="#comment"?null:d}return U}function IU(U){return typeof U=="function"?U():l.unref(U)}function Zt(U){return{name:"arrow",options:U,fn(d){const F=MF(IU(U.element));return F==null?{}:lt({element:F,padding:U.padding}).fn(d)}}}function q0(U){return typeof window>"u"?1:(U.ownerDocument.defaultView||window).devicePixelRatio||1}function _0(U,d){const F=q0(U);return Math.round(d*F)/F}function Qt(U,d,F){F===void 0&&(F={});const Z=F.whileElementsMounted,Q=l.computed(()=>{var S;return(S=IU(F.open))!=null?S:!0}),c=l.computed(()=>IU(F.middleware)),V=l.computed(()=>{var S;return(S=IU(F.placement))!=null?S:"bottom"}),W=l.computed(()=>{var S;return(S=IU(F.strategy))!=null?S:"absolute"}),R=l.computed(()=>{var S;return(S=IU(F.transform))!=null?S:!0}),N=l.computed(()=>MF(U.value)),t=l.computed(()=>MF(d.value)),n=l.ref(0),a=l.ref(0),b=l.ref(W.value),J=l.ref(V.value),e=l.shallowRef({}),m=l.ref(!1),s=l.computed(()=>{const S={position:b.value,left:"0",top:"0"};if(!t.value)return S;const o=_0(t.value,n.value),u=_0(t.value,a.value);return R.value?{...S,transform:"translate("+o+"px, "+u+"px)",...q0(t.value)>=1.5&&{willChange:"transform"}}:{position:b.value,left:o+"px",top:u+"px"}});let i;function B(){if(N.value==null||t.value==null)return;const S=Q.value;dt(N.value,t.value,{middleware:c.value,placement:V.value,strategy:W.value}).then(o=>{n.value=o.x,a.value=o.y,b.value=o.strategy,J.value=o.placement,e.value=o.middlewareData,m.value=S!==!1})}function Y(){typeof i=="function"&&(i(),i=void 0)}function T(){if(Y(),Z===void 0){B();return}if(N.value!=null&&t.value!=null){i=Z(N.value,t.value,B);return}}function M(){Q.value||(m.value=!1)}return l.watch([c,V,W,Q],B,{flush:"sync"}),l.watch([N,t],T,{flush:"sync"}),l.watch(Q,M,{flush:"sync"}),l.getCurrentScope()&&l.onScopeDispose(Y),{x:l.shallowReadonly(n),y:l.shallowReadonly(a),strategy:l.shallowReadonly(b),placement:l.shallowReadonly(J),middlewareData:l.shallowReadonly(e),isPositioned:l.shallowReadonly(m),floatingStyles:s,update:B}}function al(U,d){const F=typeof U=="string"&&!d?`${U}Context`:d,Z=Symbol(F);return[Q=>{const c=l.inject(Z,Q);if(c||c===null)return c;throw new Error(`Injection \`${Z.toString()}\` not found. Component must be used within ${Array.isArray(U)?`one of the following components: ${U.join(", ")}`:`\`${U}\``}`)},Q=>(l.provide(Z,Q),Q)]}function $0(U,d,F){const Z=F.originalEvent.target,Q=new CustomEvent(U,{bubbles:!1,cancelable:!0,detail:F});d&&Z.addEventListener(U,d,{once:!0}),Z.dispatchEvent(Q)}function lQ(U){return U==null}function ct(U,d){var F;const Z=l.shallowRef();return l.watchEffect(()=>{Z.value=U()},{...d,flush:(F=void 0)!=null?F:"sync"}),l.readonly(Z)}function _U(U){return l.getCurrentScope()?(l.onScopeDispose(U),!0):!1}function Vt(){const U=new Set,d=F=>{U.delete(F)};return{on:F=>{U.add(F);const Z=()=>d(F);return _U(Z),{off:Z}},off:d,trigger:(...F)=>Promise.all(Array.from(U).map(Z=>Z(...F)))}}function Wt(U){let d=!1,F;const Z=l.effectScope(!0);return(...Q)=>(d||(F=Z.run(()=>U(...Q)),d=!0),F)}function UQ(U){let d=0,F,Z;const Q=()=>{d-=1,Z&&d<=0&&(Z.stop(),F=void 0,Z=void 0)};return(...c)=>(d+=1,F||(Z=l.effectScope(!0),F=Z.run(()=>U(...c))),_U(Q),F)}function cU(U){return typeof U=="function"?U():l.unref(U)}const Hl=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Rt=U=>typeof U<"u",Nt=Object.prototype.toString,tt=U=>Nt.call(U)==="[object Object]",nt=()=>{},dQ=at();function at(){var U,d;return Hl&&((U=window?.navigator)==null?void 0:U.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((d=window?.navigator)==null?void 0:d.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function bt(U){return l.getCurrentInstance()}function FQ(U,d=1e4){return l.customRef((F,Z)=>{let Q=cU(U),c;const V=()=>setTimeout(()=>{Q=cU(U),Z()},cU(d));return _U(()=>{clearTimeout(c)}),{get(){return F(),Q},set(W){Q=W,Z(),clearTimeout(c),c=V()}}})}function mt(U,d){bt()&&l.onBeforeUnmount(U,d)}function ZQ(U,d,F={}){const{immediate:Z=!0}=F,Q=l.ref(!1);let c=null;function V(){c&&(clearTimeout(c),c=null)}function W(){Q.value=!1,V()}function R(...N){V(),Q.value=!0,c=setTimeout(()=>{Q.value=!1,c=null,U(...N)},cU(d))}return Z&&(Q.value=!0,Hl&&R()),_U(W),{isPending:l.readonly(Q),start:R,stop:W}}function VU(U){var d;const F=cU(U);return(d=F?.$el)!=null?d:F}const pF=Hl?window:void 0;function EU(...U){let d,F,Z,Q;if(typeof U[0]=="string"||Array.isArray(U[0])?([F,Z,Q]=U,d=pF):[d,F,Z,Q]=U,!d)return nt;Array.isArray(F)||(F=[F]),Array.isArray(Z)||(Z=[Z]);const c=[],V=()=>{c.forEach(t=>t()),c.length=0},W=(t,n,a,b)=>(t.addEventListener(n,a,b),()=>t.removeEventListener(n,a,b)),R=l.watch(()=>[VU(d),cU(Q)],([t,n])=>{if(V(),!t)return;const a=tt(n)?{...n}:n;c.push(...F.flatMap(b=>Z.map(J=>W(t,b,J,a))))},{immediate:!0,flush:"post"}),N=()=>{R(),V()};return _U(N),N}function Jt(U){return typeof U=="function"?U:typeof U=="string"?d=>d.key===U:Array.isArray(U)?d=>U.includes(d.key):()=>!0}function st(...U){let d,F,Z={};U.length===3?(d=U[0],F=U[1],Z=U[2]):U.length===2?typeof U[1]=="object"?(d=!0,F=U[0],Z=U[1]):(d=U[0],F=U[1]):(d=!0,F=U[0]);const{target:Q=pF,eventName:c="keydown",passive:V=!1,dedupe:W=!1}=Z,R=Jt(d);return EU(Q,c,N=>{N.repeat&&cU(W)||R(N)&&F(N)},V)}function et(){const U=l.ref(!1),d=l.getCurrentInstance();return d&&l.onMounted(()=>{U.value=!0},d),U}function it(U){return JSON.parse(JSON.stringify(U))}function wl(U,d,F,Z={}){var Q,c,V;const{clone:W=!1,passive:R=!1,eventName:N,deep:t=!1,defaultValue:n,shouldEmit:a}=Z,b=l.getCurrentInstance(),J=F||b?.emit||((Q=b?.$emit)==null?void 0:Q.bind(b))||((V=(c=b?.proxy)==null?void 0:c.$emit)==null?void 0:V.bind(b?.proxy));let e=N;d||(d="modelValue"),e=e||`update:${d.toString()}`;const m=B=>W?typeof W=="function"?W(B):it(B):B,s=()=>Rt(U[d])?m(U[d]):n,i=B=>{a?a(B)&&J(e,B):J(e,B)};if(R){const B=s(),Y=l.ref(B);let T=!1;return l.watch(()=>U[d],M=>{T||(T=!0,Y.value=m(M),l.nextTick(()=>T=!1))}),l.watch(Y,M=>{!T&&(M!==U[d]||t)&&i(M)},{deep:t}),Y}else return l.computed({get(){return s()},set(B){i(B)}})}function XF(U){return U?U.flatMap(d=>d.type===l.Fragment?XF(d.children):[d]):[]}const Gt=["INPUT","TEXTAREA"];function Bt(U,d,F,Z={}){if(!d||Z.enableIgnoredElement&&Gt.includes(d.nodeName))return null;const{arrowKeyOptions:Q="both",attributeName:c="[data-radix-vue-collection-item]",itemsArray:V=[],loop:W=!0,dir:R="ltr",preventScroll:N=!0,focus:t=!1}=Z,[n,a,b,J,e,m]=[U.key==="ArrowRight",U.key==="ArrowLeft",U.key==="ArrowUp",U.key==="ArrowDown",U.key==="Home",U.key==="End"],s=b||J,i=n||a;if(!e&&!m&&(!s&&!i||Q==="vertical"&&i||Q==="horizontal"&&s))return null;const B=F?Array.from(F.querySelectorAll(c)):V;if(!B.length)return null;N&&U.preventDefault();let Y=null;return i||s?Y=QQ(B,d,{goForward:s?J:R==="ltr"?n:a,loop:W}):e?Y=B.at(0)||null:m&&(Y=B.at(-1)||null),t&&Y?.focus(),Y}function QQ(U,d,F,Z=U.length){if(--Z===0)return null;const Q=U.indexOf(d),c=F.goForward?Q+1:Q-1;if(!F.loop&&(c<0||c>=U.length))return null;const V=(c+U.length)%U.length,W=U[V];return W?W.hasAttribute("disabled")&&W.getAttribute("disabled")!=="false"?QQ(U,W,F,Z):W:null}function uF(U){if(U===null||typeof U!="object")return!1;const d=Object.getPrototypeOf(U);return d!==null&&d!==Object.prototype&&Object.getPrototypeOf(d)!==null||Symbol.iterator in U?!1:Symbol.toStringTag in U?Object.prototype.toString.call(U)==="[object Module]":!0}function oF(U,d,F=".",Z){if(!uF(d))return oF(U,{},F);const Q=Object.assign({},d);for(const c in U){if(c==="__proto__"||c==="constructor")continue;const V=U[c];V!=null&&(Array.isArray(V)&&Array.isArray(Q[c])?Q[c]=[...V,...Q[c]]:uF(V)&&uF(Q[c])?Q[c]=oF(V,Q[c],(F?`${F}.`:"")+c.toString()):Q[c]=V)}return Q}function St(U){return(...d)=>d.reduce((F,Z)=>oF(F,Z,""),{})}const ht=St(),[IF,RM]=al("ConfigProvider");let Tt="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Yt=(U=21)=>{let d="",F=U;for(;F--;)d+=Tt[Math.random()*64|0];return d};const Mt=UQ(()=>{const U=l.ref(new Map),d=l.ref(),F=l.computed(()=>{for(const V of U.value.values())if(V)return!0;return!1}),Z=IF({scrollBody:l.ref(!0)});let Q=null;const c=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=d.value??"",dQ&&Q?.(),d.value=void 0};return l.watch(F,(V,W)=>{var R;if(!Hl)return;if(!V){W&&c();return}d.value===void 0&&(d.value=document.body.style.overflow);const N=window.innerWidth-document.documentElement.clientWidth,t={padding:N,margin:0},n=(R=Z.scrollBody)!=null&&R.value?typeof Z.scrollBody.value=="object"?ht({padding:Z.scrollBody.value.padding===!0?N:Z.scrollBody.value.padding,margin:Z.scrollBody.value.margin===!0?N:Z.scrollBody.value.margin},t):t:{padding:0,margin:0};N>0&&(document.body.style.paddingRight=typeof n.padding=="number"?`${n.padding}px`:String(n.padding),document.body.style.marginRight=typeof n.margin=="number"?`${n.margin}px`:String(n.margin),document.body.style.setProperty("--scrollbar-width",`${N}px`),document.body.style.overflow="hidden"),dQ&&(Q=EU(document,"touchmove",a=>pt(a),{passive:!1})),l.nextTick(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),U});function EF(U){const d=Yt(6),F=Mt();F.value.set(d,U??!1);const Z=l.computed({get:()=>F.value.get(d)??!1,set:Q=>F.value.set(d,Q)});return mt(()=>{F.value.delete(d)}),Z}function cQ(U){const d=window.getComputedStyle(U);if(d.overflowX==="scroll"||d.overflowY==="scroll"||d.overflowX==="auto"&&U.clientWidth<U.scrollWidth||d.overflowY==="auto"&&U.clientHeight<U.scrollHeight)return!0;{const F=U.parentNode;return!F||F.tagName==="BODY"?!1:cQ(F)}}function pt(U){const d=U||window.event,F=d.target;return F instanceof Element&&cQ(F)?!1:d.touches.length>1?!0:(d.preventDefault&&d.cancelable&&d.preventDefault(),!1)}const Xt="data-radix-vue-collection-item";function ut(U,d=Xt){const F=Symbol();return{createCollection:Z=>{const Q=l.ref([]);function c(){const V=VU(Z);return V?Q.value=Array.from(V.querySelectorAll(`[${d}]:not([data-disabled])`)):Q.value=[]}return l.onBeforeUpdate(()=>{Q.value=[]}),l.onMounted(c),l.onUpdated(c),l.watch(()=>Z?.value,c,{immediate:!0}),l.provide(F,Q),Q},injectCollection:()=>l.inject(F,l.ref([]))}}function kF(U){const d=IF({dir:l.ref("ltr")});return l.computed(()=>{var F;return U?.value||((F=d.dir)==null?void 0:F.value)||"ltr"})}function kU(U){const d=l.getCurrentInstance(),F=d?.type.emits,Z={};return F!=null&&F.length||console.warn(`No emitted event found. Please check component: ${d?.type.__name}`),F?.forEach(Q=>{Z[l.toHandlerKey(l.camelize(Q))]=(...c)=>U(Q,...c)}),Z}let yF=0;function VQ(){l.watchEffect(U=>{if(!Hl)return;const d=document.querySelectorAll("[data-radix-focus-guard]");document.body.insertAdjacentElement("afterbegin",d[0]??WQ()),document.body.insertAdjacentElement("beforeend",d[1]??WQ()),yF++,U(()=>{yF===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(F=>F.remove()),yF--})})}function WQ(){const U=document.createElement("span");return U.setAttribute("data-radix-focus-guard",""),U.tabIndex=0,U.style.outline="none",U.style.opacity="0",U.style.position="fixed",U.style.pointerEvents="none",U}function ot(U){return l.computed(()=>{var d;return cU(U)?!!((d=VU(U))!=null&&d.closest("form")):!0})}function bU(U){const d=l.getCurrentInstance(),F=Object.keys(d?.type.props??{}).reduce((Q,c)=>{const V=(d?.type.props[c]).default;return V!==void 0&&(Q[c]=V),Q},{}),Z=l.toRef(U);return l.computed(()=>{const Q={},c=d?.vnode.props??{};return Object.keys(c).forEach(V=>{Q[l.camelize(V)]=c[V]}),Object.keys({...F,...Q}).reduce((V,W)=>(Z.value[W]!==void 0&&(V[W]=Z.value[W]),V),{})})}function tl(U,d){const F=bU(U),Z=d?kU(d):{};return l.computed(()=>({...F.value,...Z}))}function H(){const U=l.getCurrentInstance(),d=l.ref(),F=l.computed(()=>{var V,W;return["#text","#comment"].includes((V=d.value)==null?void 0:V.$el.nodeName)?(W=d.value)==null?void 0:W.$el.nextElementSibling:VU(d)}),Z=Object.assign({},U.exposed),Q={};for(const V in U.props)Object.defineProperty(Q,V,{enumerable:!0,configurable:!0,get:()=>U.props[V]});if(Object.keys(Z).length>0)for(const V in Z)Object.defineProperty(Q,V,{enumerable:!0,configurable:!0,get:()=>Z[V]});Object.defineProperty(Q,"$el",{enumerable:!0,configurable:!0,get:()=>U.vnode.el}),U.exposed=Q;function c(V){d.value=V,!(V instanceof Element||!V)&&(Object.defineProperty(Q,"$el",{enumerable:!0,configurable:!0,get:()=>V.$el}),U.exposed=Q)}return{forwardRef:c,currentRef:d,currentElement:F}}function It(U,d){const F=FQ(!1,300),Z=l.ref(null),Q=Vt();function c(){Z.value=null,F.value=!1}function V(W,R){const N=W.currentTarget,t={x:W.clientX,y:W.clientY},n=Et(t,N.getBoundingClientRect()),a=kt(t,n),b=yt(R.getBoundingClientRect()),J=Ct([...a,...b]);Z.value=J,F.value=!0}return l.watchEffect(W=>{if(U.value&&d.value){const R=t=>V(t,d.value),N=t=>V(t,U.value);U.value.addEventListener("pointerleave",R),d.value.addEventListener("pointerleave",N),W(()=>{var t,n;(t=U.value)==null||t.removeEventListener("pointerleave",R),(n=d.value)==null||n.removeEventListener("pointerleave",N)})}}),l.watchEffect(W=>{var R;if(Z.value){const N=t=>{var n,a;if(!Z.value)return;const b=t.target,J={x:t.clientX,y:t.clientY},e=((n=U.value)==null?void 0:n.contains(b))||((a=d.value)==null?void 0:a.contains(b)),m=!zt(J,Z.value),s=b.hasAttribute("data-grace-area-trigger");e?c():(m||s)&&(c(),Q.trigger())};(R=U.value)==null||R.ownerDocument.addEventListener("pointermove",N),W(()=>{var t;return(t=U.value)==null?void 0:t.ownerDocument.removeEventListener("pointermove",N)})}}),{isPointerInTransit:F,onPointerExit:Q.on}}function Et(U,d){const F=Math.abs(d.top-U.y),Z=Math.abs(d.bottom-U.y),Q=Math.abs(d.right-U.x),c=Math.abs(d.left-U.x);switch(Math.min(F,Z,Q,c)){case c:return"left";case Q:return"right";case F:return"top";case Z:return"bottom";default:throw new Error("unreachable")}}function kt(U,d,F=5){const Z=[];switch(d){case"top":Z.push({x:U.x-F,y:U.y+F},{x:U.x+F,y:U.y+F});break;case"bottom":Z.push({x:U.x-F,y:U.y-F},{x:U.x+F,y:U.y-F});break;case"left":Z.push({x:U.x+F,y:U.y-F},{x:U.x+F,y:U.y+F});break;case"right":Z.push({x:U.x-F,y:U.y-F},{x:U.x-F,y:U.y+F});break}return Z}function yt(U){const{top:d,right:F,bottom:Z,left:Q}=U;return[{x:Q,y:d},{x:F,y:d},{x:F,y:Z},{x:Q,y:Z}]}function zt(U,d){const{x:F,y:Z}=U;let Q=!1;for(let c=0,V=d.length-1;c<d.length;V=c++){const W=d[c].x,R=d[c].y,N=d[V].x,t=d[V].y;R>Z!=t>Z&&F<(N-W)*(Z-R)/(t-R)+W&&(Q=!Q)}return Q}function Ct(U){const d=U.slice();return d.sort((F,Z)=>F.x<Z.x?-1:F.x>Z.x?1:F.y<Z.y?-1:F.y>Z.y?1:0),Dt(d)}function Dt(U){if(U.length<=1)return U.slice();const d=[];for(let Z=0;Z<U.length;Z++){const Q=U[Z];for(;d.length>=2;){const c=d[d.length-1],V=d[d.length-2];if((c.x-V.x)*(Q.y-V.y)>=(c.y-V.y)*(Q.x-V.x))d.pop();else break}d.push(Q)}d.pop();const F=[];for(let Z=U.length-1;Z>=0;Z--){const Q=U[Z];for(;F.length>=2;){const c=F[F.length-1],V=F[F.length-2];if((c.x-V.x)*(Q.y-V.y)>=(c.y-V.y)*(Q.x-V.x))F.pop();else break}F.push(Q)}return F.pop(),d.length===1&&F.length===1&&d[0].x===F[0].x&&d[0].y===F[0].y?d:d.concat(F)}var Lt=function(U){if(typeof document>"u")return null;var d=Array.isArray(U)?U[0]:U;return d.ownerDocument.body},yU=new WeakMap,Md=new WeakMap,pd={},zF=0,RQ=function(U){return U&&(U.host||RQ(U.parentNode))},wt=function(U,d){return d.map(function(F){if(U.contains(F))return F;var Z=RQ(F);return Z&&U.contains(Z)?Z:(console.error("aria-hidden",F,"in not contained inside",U,". Doing nothing"),null)}).filter(function(F){return!!F})},xt=function(U,d,F,Z){var Q=wt(d,Array.isArray(U)?U:[U]);pd[F]||(pd[F]=new WeakMap);var c=pd[F],V=[],W=new Set,R=new Set(Q),N=function(n){!n||W.has(n)||(W.add(n),N(n.parentNode))};Q.forEach(N);var t=function(n){!n||R.has(n)||Array.prototype.forEach.call(n.children,function(a){if(W.has(a))t(a);else try{var b=a.getAttribute(Z),J=b!==null&&b!=="false",e=(yU.get(a)||0)+1,m=(c.get(a)||0)+1;yU.set(a,e),c.set(a,m),V.push(a),e===1&&J&&Md.set(a,!0),m===1&&a.setAttribute(F,"true"),J||a.setAttribute(Z,"true")}catch(s){console.error("aria-hidden: cannot operate on ",a,s)}})};return t(d),W.clear(),zF++,function(){V.forEach(function(n){var a=yU.get(n)-1,b=c.get(n)-1;yU.set(n,a),c.set(n,b),a||(Md.has(n)||n.removeAttribute(Z),Md.delete(n)),b||n.removeAttribute(F)}),zF--,zF||(yU=new WeakMap,yU=new WeakMap,Md=new WeakMap,pd={})}},jt=function(U,d,F){F===void 0&&(F="data-aria-hidden");var Z=Array.from(Array.isArray(U)?U:[U]),Q=Lt(U);return Q?(Z.push.apply(Z,Array.from(Q.querySelectorAll("[aria-live]"))),xt(Z,Q,F,"aria-hidden")):function(){return null}};function CF(U){let d;l.watch(()=>VU(U),F=>{F?d=jt(F):d&&d()}),l.onUnmounted(()=>{d&&d()})}let Ot=0;function zU(U,d="radix"){const F=IF({useId:void 0});return dd.useId?`${d}-${dd.useId()}`:F.useId?`${d}-${F.useId()}`:`${d}-${++Ot}`}function gt(U){const d=l.ref(),F=l.computed(()=>{var Q;return((Q=d.value)==null?void 0:Q.width)??0}),Z=l.computed(()=>{var Q;return((Q=d.value)==null?void 0:Q.height)??0});return l.onMounted(()=>{const Q=VU(U);if(Q){d.value={width:Q.offsetWidth,height:Q.offsetHeight};const c=new ResizeObserver(V=>{if(!Array.isArray(V)||!V.length)return;const W=V[0];let R,N;if("borderBoxSize"in W){const t=W.borderBoxSize,n=Array.isArray(t)?t[0]:t;R=n.inlineSize,N=n.blockSize}else R=Q.offsetWidth,N=Q.offsetHeight;d.value={width:R,height:N}});return c.observe(Q,{box:"border-box"}),()=>c.unobserve(Q)}else d.value=void 0}),{width:F,height:Z}}function rt(U,d){const F=l.ref(U);function Z(Q){return d[F.value][Q]??F.value}return{state:F,dispatch:Q=>{F.value=Z(Q)}}}function Kt(U){const d=FQ("",1e3);return{search:d,handleTypeaheadSearch:(F,Z)=>{var Q,c;if(!(U!=null&&U.value)&&!Z)return;d.value=d.value+F;const V=U?.value??Z,W=document.activeElement,R=((c=(Q=V.find(a=>a===W))==null?void 0:Q.textContent)==null?void 0:c.trim())??"",N=V.map(a=>{var b;return((b=a.textContent)==null?void 0:b.trim())??""}),t=Ht(N,d.value,R),n=V.find(a=>{var b;return((b=a.textContent)==null?void 0:b.trim())===t});return n&&n.focus(),n},resetTypeahead:()=>{d.value=""}}}function vt(U,d){return U.map((F,Z)=>U[(d+Z)%U.length])}function Ht(U,d,F){const Z=d.length>1&&Array.from(d).every(W=>W===d[0])?d[0]:d,Q=F?U.indexOf(F):-1;let c=vt(U,Math.max(Q,0));Z.length===1&&(c=c.filter(W=>W!==F));const V=c.find(W=>W.toLowerCase().startsWith(Z.toLowerCase()));return V!==F?V:void 0}const DF=l.defineComponent({name:"PrimitiveSlot",inheritAttrs:!1,setup(U,{attrs:d,slots:F}){return()=>{var Z,Q;if(!F.default)return null;const c=XF(F.default()),V=c.findIndex(t=>t.type!==l.Comment);if(V===-1)return c;const W=c[V];(Z=W.props)==null||delete Z.ref;const R=W.props?l.mergeProps(d,W.props):d;d.class&&(Q=W.props)!=null&&Q.class&&delete W.props.class;const N=l.cloneVNode(W,R);for(const t in R)t.startsWith("on")&&(N.props||(N.props={}),N.props[t]=R[t]);return c.length===1?N:(c[V]=N,c)}}}),cl=l.defineComponent({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(U,{attrs:d,slots:F}){const Z=U.asChild?"template":U.as;return typeof Z=="string"&&["area","img","input"].includes(Z)?()=>l.h(Z,d):Z!=="template"?()=>l.h(U.as,d,{default:F.default}):()=>l.h(DF,d,{default:F.default})}});function NQ(){const U=l.ref(),d=l.computed(()=>{var F,Z;return["#text","#comment"].includes((F=U.value)==null?void 0:F.$el.nodeName)?(Z=U.value)==null?void 0:Z.$el.nextElementSibling:VU(U)});return{primitiveElement:U,currentElement:d}}function Pt(U,d){var F;const Z=l.ref({}),Q=l.ref("none"),c=l.ref(U),V=U.value?"mounted":"unmounted";let W;const R=((F=d.value)==null?void 0:F.ownerDocument.defaultView)??pF,{state:N,dispatch:t}=rt(V,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),n=m=>{var s;if(Hl){const i=new CustomEvent(m,{bubbles:!1,cancelable:!1});(s=d.value)==null||s.dispatchEvent(i)}};l.watch(U,async(m,s)=>{var i;const B=s!==m;if(await l.nextTick(),B){const Y=Q.value,T=Xd(d.value);m?(t("MOUNT"),n("enter"),T==="none"&&n("after-enter")):T==="none"||((i=Z.value)==null?void 0:i.display)==="none"?(t("UNMOUNT"),n("leave"),n("after-leave")):s&&Y!==T?(t("ANIMATION_OUT"),n("leave")):(t("UNMOUNT"),n("after-leave"))}},{immediate:!0});const a=m=>{const s=Xd(d.value),i=s.includes(m.animationName),B=N.value==="mounted"?"enter":"leave";if(m.target===d.value&&i&&(n(`after-${B}`),t("ANIMATION_END"),!c.value)){const Y=d.value.style.animationFillMode;d.value.style.animationFillMode="forwards",W=R?.setTimeout(()=>{var T;((T=d.value)==null?void 0:T.style.animationFillMode)==="forwards"&&(d.value.style.animationFillMode=Y)})}m.target===d.value&&s==="none"&&t("ANIMATION_END")},b=m=>{m.target===d.value&&(Q.value=Xd(d.value))},J=l.watch(d,(m,s)=>{m?(Z.value=getComputedStyle(m),m.addEventListener("animationstart",b),m.addEventListener("animationcancel",a),m.addEventListener("animationend",a)):(t("ANIMATION_END"),R?.clearTimeout(W),s?.removeEventListener("animationstart",b),s?.removeEventListener("animationcancel",a),s?.removeEventListener("animationend",a))},{immediate:!0}),e=l.watch(N,()=>{const m=Xd(d.value);Q.value=N.value==="mounted"?m:"none"});return l.onUnmounted(()=>{J(),e()}),{isPresent:l.computed(()=>["mounted","unmountSuspended"].includes(N.value))}}function Xd(U){return U&&getComputedStyle(U).animationName||"none"}const mU=l.defineComponent({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(U,{slots:d,expose:F}){var Z;const{present:Q,forceMount:c}=l.toRefs(U),V=l.ref(),{isPresent:W}=Pt(Q,V);F({present:W});let R=d.default({present:W});R=XF(R||[]);const N=l.getCurrentInstance();if(R&&R?.length>1){const t=(Z=N?.parent)!=null&&Z.type.name?`<${N.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${t}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(n=>` - ${n}`).join(`
42
42
  `)].join(`
43
43
  `))}return()=>c.value||Q.value||W.value?l.h(d.default({present:W})[0],{ref:t=>{const n=VU(t);return typeof n?.hasAttribute>"u"||(n!=null&&n.hasAttribute("data-radix-popper-content-wrapper")?V.value=n.firstElementChild:V.value=n),n}}):null}}),[Pl,At]=al("DialogRoot"),ft=l.defineComponent({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(U,{emit:d}){const F=U,Z=wl(F,"open",d,{defaultValue:F.defaultOpen,passive:F.open===void 0}),Q=l.ref(),c=l.ref(),{modal:V}=l.toRefs(F);return At({open:Z,modal:V,openModal:()=>{Z.value=!0},onOpenChange:W=>{Z.value=W},onOpenToggle:()=>{Z.value=!Z.value},contentId:"",titleId:"",descriptionId:"",triggerElement:Q,contentElement:c}),(W,R)=>l.renderSlot(W.$slots,"default",{open:l.unref(Z)})}}),ud=l.defineComponent({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(U){const d=et();return(F,Z)=>l.unref(d)||F.forceMount?(l.openBlock(),l.createBlock(l.Teleport,{key:0,to:F.to,disabled:F.disabled},[l.renderSlot(F.$slots,"default")],8,["to","disabled"])):l.createCommentVNode("",!0)}}),LF=l.defineComponent({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(U){const d=U;return(F,Z)=>(l.openBlock(),l.createBlock(l.unref(ud),l.normalizeProps(l.guardReactiveProps(d)),{default:l.withCtx(()=>[l.renderSlot(F.$slots,"default")]),_:3},16))}}),qt="dismissableLayer.pointerDownOutside",_t="dismissableLayer.focusOutside";function tQ(U,d){const F=d.closest("[data-dismissable-layer]"),Z=U.dataset.dismissableLayer===""?U:U.querySelector("[data-dismissable-layer]"),Q=Array.from(U.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(F&&Z===F||Q.indexOf(Z)<Q.indexOf(F))}function $t(U,d){var F;const Z=((F=d?.value)==null?void 0:F.ownerDocument)??globalThis?.document,Q=l.ref(!1),c=l.ref(()=>{});return l.watchEffect(V=>{if(!Hl)return;const W=async N=>{const t=N.target;if(d!=null&&d.value){if(tQ(d.value,t)){Q.value=!1;return}if(N.target&&!Q.value){let n=function(){$0(qt,U,a)};const a={originalEvent:N};N.pointerType==="touch"?(Z.removeEventListener("click",c.value),c.value=n,Z.addEventListener("click",c.value,{once:!0})):n()}else Z.removeEventListener("click",c.value);Q.value=!1}},R=window.setTimeout(()=>{Z.addEventListener("pointerdown",W)},0);V(()=>{window.clearTimeout(R),Z.removeEventListener("pointerdown",W),Z.removeEventListener("click",c.value)})}),{onPointerDownCapture:()=>Q.value=!0}}function ln(U,d){var F;const Z=((F=d?.value)==null?void 0:F.ownerDocument)??globalThis?.document,Q=l.ref(!1);return l.watchEffect(c=>{if(!Hl)return;const V=async W=>{d!=null&&d.value&&(await l.nextTick(),!(!d.value||tQ(d.value,W.target))&&W.target&&!Q.value&&$0(_t,U,{originalEvent:W}))};Z.addEventListener("focusin",V),c(()=>Z.removeEventListener("focusin",V))}),{onFocusCapture:()=>Q.value=!0,onBlurCapture:()=>Q.value=!1}}const Al=l.reactive({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),od=l.defineComponent({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(U,{emit:d}){const F=U,Z=d,{forwardRef:Q,currentElement:c}=H(),V=l.computed(()=>{var J;return((J=c.value)==null?void 0:J.ownerDocument)??globalThis.document}),W=l.computed(()=>Al.layersRoot),R=l.computed(()=>c.value?Array.from(W.value).indexOf(c.value):-1),N=l.computed(()=>Al.layersWithOutsidePointerEventsDisabled.size>0),t=l.computed(()=>{const J=Array.from(W.value),[e]=[...Al.layersWithOutsidePointerEventsDisabled].slice(-1),m=J.indexOf(e);return R.value>=m}),n=$t(async J=>{const e=[...Al.branches].some(m=>m?.contains(J.target));!t.value||e||(Z("pointerDownOutside",J),Z("interactOutside",J),await l.nextTick(),J.defaultPrevented||Z("dismiss"))},c),a=ln(J=>{[...Al.branches].some(e=>e?.contains(J.target))||(Z("focusOutside",J),Z("interactOutside",J),J.defaultPrevented||Z("dismiss"))},c);st("Escape",J=>{R.value===W.value.size-1&&(Z("escapeKeyDown",J),J.defaultPrevented||Z("dismiss"))});let b;return l.watchEffect(J=>{c.value&&(F.disableOutsidePointerEvents&&(Al.layersWithOutsidePointerEventsDisabled.size===0&&(b=V.value.body.style.pointerEvents,V.value.body.style.pointerEvents="none"),Al.layersWithOutsidePointerEventsDisabled.add(c.value)),W.value.add(c.value),J(()=>{F.disableOutsidePointerEvents&&Al.layersWithOutsidePointerEventsDisabled.size===1&&(V.value.body.style.pointerEvents=b)}))}),l.watchEffect(J=>{J(()=>{c.value&&(W.value.delete(c.value),Al.layersWithOutsidePointerEventsDisabled.delete(c.value))})}),(J,e)=>(l.openBlock(),l.createBlock(l.unref(cl),{ref:l.unref(Q),"as-child":J.asChild,as:J.as,"data-dismissable-layer":"",style:l.normalizeStyle({pointerEvents:N.value?t.value?"auto":"none":void 0}),onFocusCapture:l.unref(a).onFocusCapture,onBlurCapture:l.unref(a).onBlurCapture,onPointerdownCapture:l.unref(n).onPointerDownCapture},{default:l.withCtx(()=>[l.renderSlot(J.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),wF="focusScope.autoFocusOnMount",xF="focusScope.autoFocusOnUnmount",nQ={bubbles:!1,cancelable:!0};function Un(U,{select:d=!1}={}){const F=document.activeElement;for(const Z of U)if(WU(Z,{select:d}),document.activeElement!==F)return!0}function dn(U){const d=aQ(U),F=bQ(d,U),Z=bQ(d.reverse(),U);return[F,Z]}function aQ(U){const d=[],F=document.createTreeWalker(U,NodeFilter.SHOW_ELEMENT,{acceptNode:Z=>{const Q=Z.tagName==="INPUT"&&Z.type==="hidden";return Z.disabled||Z.hidden||Q?NodeFilter.FILTER_SKIP:Z.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;F.nextNode();)d.push(F.currentNode);return d}function bQ(U,d){for(const F of U)if(!Fn(F,{upTo:d}))return F}function Fn(U,{upTo:d}){if(getComputedStyle(U).visibility==="hidden")return!0;for(;U;){if(d!==void 0&&U===d)return!1;if(getComputedStyle(U).display==="none")return!0;U=U.parentElement}return!1}function Zn(U){return U instanceof HTMLInputElement&&"select"in U}function WU(U,{select:d=!1}={}){if(U&&U.focus){const F=document.activeElement;U.focus({preventScroll:!0}),U!==F&&Zn(U)&&d&&U.select()}}const Qn=Wt(()=>l.ref([]));function cn(){const U=Qn();return{add(d){const F=U.value[0];d!==F&&F?.pause(),U.value=mQ(U.value,d),U.value.unshift(d)},remove(d){var F;U.value=mQ(U.value,d),(F=U.value[0])==null||F.resume()}}}function mQ(U,d){const F=[...U],Z=F.indexOf(d);return Z!==-1&&F.splice(Z,1),F}function Vn(U){return U.filter(d=>d.tagName!=="A")}const jF=l.defineComponent({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(U,{emit:d}){const F=U,Z=d,{currentRef:Q,currentElement:c}=H(),V=l.ref(null),W=cn(),R=l.reactive({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});l.watchEffect(t=>{if(!Hl)return;const n=c.value;if(!F.trapped)return;function a(m){if(R.paused||!n)return;const s=m.target;n.contains(s)?V.value=s:WU(V.value,{select:!0})}function b(m){if(R.paused||!n)return;const s=m.relatedTarget;s!==null&&(n.contains(s)||WU(V.value,{select:!0}))}function J(m){n.contains(V.value)||WU(n)}document.addEventListener("focusin",a),document.addEventListener("focusout",b);const e=new MutationObserver(J);n&&e.observe(n,{childList:!0,subtree:!0}),t(()=>{document.removeEventListener("focusin",a),document.removeEventListener("focusout",b),e.disconnect()})}),l.watchEffect(async t=>{const n=c.value;if(await l.nextTick(),!n)return;W.add(R);const a=document.activeElement;if(!n.contains(a)){const b=new CustomEvent(wF,nQ);n.addEventListener(wF,J=>Z("mountAutoFocus",J)),n.dispatchEvent(b),b.defaultPrevented||(Un(Vn(aQ(n)),{select:!0}),document.activeElement===a&&WU(n))}t(()=>{n.removeEventListener(wF,e=>Z("mountAutoFocus",e));const b=new CustomEvent(xF,nQ),J=e=>{Z("unmountAutoFocus",e)};n.addEventListener(xF,J),n.dispatchEvent(b),setTimeout(()=>{b.defaultPrevented||WU(a??document.body,{select:!0}),n.removeEventListener(xF,J),W.remove(R)},0)})});function N(t){if(!F.loop&&!F.trapped||R.paused)return;const n=t.key==="Tab"&&!t.altKey&&!t.ctrlKey&&!t.metaKey,a=document.activeElement;if(n&&a){const b=t.currentTarget,[J,e]=dn(b);J&&e?!t.shiftKey&&a===e?(t.preventDefault(),F.loop&&WU(J,{select:!0})):t.shiftKey&&a===J&&(t.preventDefault(),F.loop&&WU(e,{select:!0})):a===b&&t.preventDefault()}}return(t,n)=>(l.openBlock(),l.createBlock(l.unref(cl),{ref_key:"currentRef",ref:Q,tabindex:"-1","as-child":t.asChild,as:t.as,onKeydown:N},{default:l.withCtx(()=>[l.renderSlot(t.$slots,"default")]),_:3},8,["as-child","as"]))}}),Wn="menu.itemSelect",OF=["Enter"," "],Rn=["ArrowDown","PageUp","Home"],JQ=["ArrowUp","PageDown","End"],Nn=[...Rn,...JQ];[...OF],[...OF];function sQ(U){return U?"open":"closed"}function eQ(U){return U==="indeterminate"}function iQ(U){return eQ(U)?"indeterminate":U?"checked":"unchecked"}function tn(U){const d=document.activeElement;for(const F of U)if(F===d||(F.focus(),document.activeElement!==d))return}function nn(U,d){const{x:F,y:Z}=U;let Q=!1;for(let c=0,V=d.length-1;c<d.length;V=c++){const W=d[c].x,R=d[c].y,N=d[V].x,t=d[V].y;R>Z!=t>Z&&F<(N-W)*(Z-R)/(t-R)+W&&(Q=!Q)}return Q}function an(U,d){if(!d)return!1;const F={x:U.clientX,y:U.clientY};return nn(F,d)}function gF(U){return U.pointerType==="mouse"}const bn="DialogTitle",mn="DialogContent";function Jn({titleName:U=bn,contentName:d=mn,componentLink:F="dialog.html#title",titleId:Z,descriptionId:Q,contentElement:c}){const V=`Warning: \`${d}\` requires a \`${U}\` for the component to be accessible for screen reader users.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue-pdf-viewer/viewer",
3
3
  "private": false,
4
- "version": "2.4.0-beta.5",
4
+ "version": "2.4.0-beta.6",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.cjs",
7
7
  "module": "./dist/index.js",