From c19e81293a0832756c89de6214a85074aa5df724 Mon Sep 17 00:00:00 2001 From: Rezrazi Date: Tue, 30 Apr 2024 15:25:21 +0000 Subject: [PATCH] build(bot): build tool assets --- dist/js/tool.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/dist/js/tool.js b/dist/js/tool.js index 3f062ec1..dcb3d97d 100644 --- a/dist/js/tool.js +++ b/dist/js/tool.js @@ -2,18 +2,18 @@ * pinia v2.0.33 * (c) 2023 Eduardo San Martin Morote * @license MIT - */let Ei;const ka=e=>Ei=e,_i=Symbol();function kr(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Go;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Go||(Go={}));function nu(){const e=n.effectScope(!0),t=e.run(()=>n.ref({}));let o=[],a=[];const s=n.markRaw({install(i){ka(s),s._a=i,i.provide(_i,s),i.config.globalProperties.$pinia=s,a.forEach(r=>o.push(r)),a=[]},use(i){return!this._a&&!jo?a.push(i):o.push(i),this},_p:o,_a:null,_e:e,_s:new Map,state:t});return s}const wi=()=>{};function Ti(e,t,o,a=wi){e.push(t);const s=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),a())};return!o&&n.getCurrentScope()&&n.onScopeDispose(s),s}function fo(e,...t){e.slice().forEach(o=>{o(...t)})}function Ar(e,t){e instanceof Map&&t instanceof Map&&t.forEach((o,a)=>e.set(a,o)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const o in t){if(!t.hasOwnProperty(o))continue;const a=t[o],s=e[o];kr(s)&&kr(a)&&e.hasOwnProperty(o)&&!n.isRef(a)&&!n.isReactive(a)?e[o]=Ar(s,a):e[o]=a}return e}const ou=Symbol();function au(e){return!kr(e)||!e.hasOwnProperty(ou)}const{assign:bn}=Object;function ru(e){return!!(n.isRef(e)&&e.effect)}function su(e,t,o,a){const{state:s,actions:i,getters:r}=t,l=o.state.value[e];let c;function d(){l||(o.state.value[e]=s?s():{});const f=n.toRefs(o.state.value[e]);return bn(f,i,Object.keys(r||{}).reduce((p,h)=>(p[h]=n.markRaw(n.computed(()=>{ka(o);const g=o._s.get(e);return r[h].call(g,g)})),p),{}))}return c=xi(e,d,t,o,a,!0),c}function xi(e,t,o={},a,s,i){let r;const l=bn({actions:{}},o),c={deep:!0};let d,f,p=n.markRaw([]),h=n.markRaw([]),g;const u=a.state.value[e];!i&&!u&&(a.state.value[e]={}),n.ref({});let m;function y(B){let I;d=f=!1,typeof B=="function"?(B(a.state.value[e]),I={type:Go.patchFunction,storeId:e,events:g}):(Ar(a.state.value[e],B),I={type:Go.patchObject,payload:B,storeId:e,events:g});const D=m=Symbol();n.nextTick().then(()=>{m===D&&(d=!0)}),f=!0,fo(p,I,a.state.value[e])}const v=i?function(){const{state:I}=o,D=I?I():{};this.$patch(C=>{bn(C,D)})}:wi;function b(){r.stop(),p=[],h=[],a._s.delete(e)}function N(B,I){return function(){ka(a);const D=Array.from(arguments),C=[],F=[];function K(j){C.push(j)}function P(j){F.push(j)}fo(h,{args:D,name:B,store:T,after:K,onError:P});let U;try{U=I.apply(this&&this.$id===e?this:T,D)}catch(j){throw fo(F,j),j}return U instanceof Promise?U.then(j=>(fo(C,j),j)).catch(j=>(fo(F,j),Promise.reject(j))):(fo(C,U),U)}}const x={_p:a,$id:e,$onAction:Ti.bind(null,h),$patch:y,$reset:v,$subscribe(B,I={}){const D=Ti(p,B,I.detached,()=>C()),C=r.run(()=>n.watch(()=>a.state.value[e],F=>{(I.flush==="sync"?f:d)&&B({storeId:e,type:Go.direct,events:g},F)},bn({},c,I)));return D},$dispose:b},T=n.reactive(x);a._s.set(e,T);const O=a._e.run(()=>(r=n.effectScope(),r.run(()=>t())));for(const B in O){const I=O[B];if(n.isRef(I)&&!ru(I)||n.isReactive(I))i||(u&&au(I)&&(n.isRef(I)?I.value=u[B]:Ar(I,u[B])),a.state.value[e][B]=I);else if(typeof I=="function"){const D=N(B,I);O[B]=D,l.actions[B]=I}}return bn(T,O),bn(n.toRaw(T),O),Object.defineProperty(T,"$state",{get:()=>a.state.value[e],set:B=>{y(I=>{bn(I,B)})}}),a._p.forEach(B=>{bn(T,r.run(()=>B({store:T,app:a._a,pinia:a,options:l})))}),u&&i&&o.hydrate&&o.hydrate(T.$state,u),d=!0,f=!0,T}function Dr(e,t,o){let a,s;const i=typeof t=="function";typeof e=="string"?(a=e,s=i?o:t):(s=e,a=e.id);function r(l,c){const d=n.getCurrentInstance();return l=l||d&&n.inject(_i,null),l&&ka(l),l=Ei,l._s.has(a)||(i?xi(a,t,s,l):su(a,s,l)),l._s.get(a)}return r.$id=a,r}function iu(e,t){return Array.isArray(t)?t.reduce((o,a)=>(o[a]=function(){return e(this.$pinia)[a]},o),{}):Object.keys(t).reduce((o,a)=>(o[a]=function(){const s=e(this.$pinia),i=t[a];return typeof i=="function"?i.call(this,s):s[i]},o),{})}function lu(e,t){return Array.isArray(t)?t.reduce((o,a)=>(o[a]=function(...s){return e(this.$pinia)[a](...s)},o),{}):Object.keys(t).reduce((o,a)=>(o[a]=function(...s){return e(this.$pinia)[t[a]](...s)},o),{})}function cu(e){{e=n.toRaw(e);const t={};for(const o in e){const a=e[o];(n.isRef(a)||n.isReactive(a))&&(t[o]=n.toRef(e,o))}return t}}const wT="";function du(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125z"})])}function uu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})])}function Aa(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"})])}function Oi(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})])}function Br(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})])}function fu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 00-3.375-3.375h-1.5a1.125 1.125 0 01-1.125-1.125v-1.5A3.375 3.375 0 006.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0015 2.25h-1.5a2.251 2.251 0 00-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 00-9-9z"})])}function pu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9.75v6.75m0 0l-3-3m3 3l3-3m-8.25 6a4.5 4.5 0 01-1.41-8.775 5.25 5.25 0 0110.233-2.33 3 3 0 013.758 3.848A3.752 3.752 0 0118 19.5H6.75z"})])}function Pr(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 16.5V9.75m0 0l3 3m-3-3l-3 3M6.75 19.5a4.5 4.5 0 01-1.41-8.775 5.25 5.25 0 0110.233-2.33 3 3 0 013.758 3.848A3.752 3.752 0 0118 19.5H6.75z"})])}function hu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 15a4.5 4.5 0 004.5 4.5H18a3.75 3.75 0 001.332-7.257 3 3 0 00-3.758-3.848 5.25 5.25 0 00-10.233 2.33A4.502 4.502 0 002.25 15z"})])}function zo(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})])}function Si(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"})])}function Ni(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})])}function mu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 10.5v6m3-3H9m4.06-7.19l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})])}function Mr(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})])}function gu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"})])}function vu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.712 4.33a9.027 9.027 0 011.652 1.306c.51.51.944 1.064 1.306 1.652M16.712 4.33l-3.448 4.138m3.448-4.138a9.014 9.014 0 00-9.424 0M19.67 7.288l-4.138 3.448m4.138-3.448a9.014 9.014 0 010 9.424m-4.138-5.976a3.736 3.736 0 00-.88-1.388 3.737 3.737 0 00-1.388-.88m2.268 2.268a3.765 3.765 0 010 2.528m-2.268-4.796a3.765 3.765 0 00-2.528 0m4.796 4.796c-.181.506-.475.982-.88 1.388a3.736 3.736 0 01-1.388.88m2.268-2.268l4.138 3.448m0 0a9.027 9.027 0 01-1.306 1.652c-.51.51-1.064.944-1.652 1.306m0 0l-3.448-4.138m3.448 4.138a9.014 9.014 0 01-9.424 0m5.976-4.138a3.765 3.765 0 01-2.528 0m0 0a3.736 3.736 0 01-1.388-.88 3.737 3.737 0 01-.88-1.388m2.268 2.268L7.288 19.67m0 0a9.024 9.024 0 01-1.652-1.306 9.027 9.027 0 01-1.306-1.652m0 0l4.138-3.448M4.33 16.712a9.014 9.014 0 010-9.424m4.138 5.976a3.765 3.765 0 010-2.528m0 0c.181-.506.475-.982.88-1.388a3.736 3.736 0 011.388-.88m-2.268 2.268L4.33 7.288m6.406 1.18L7.288 4.33m0 0a9.024 9.024 0 00-1.652 1.306A9.025 9.025 0 004.33 7.288"})])}function bu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})])}function yu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"})])}function Eu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 010 3.75H5.625a1.875 1.875 0 010-3.75z"})])}function _u(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z"})])}function Ri(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"})])}function Lr(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})])}function Ii(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z","clip-rule":"evenodd"})])}function wu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z","clip-rule":"evenodd"})])}function Tu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M12.53 16.28a.75.75 0 01-1.06 0l-7.5-7.5a.75.75 0 011.06-1.06L12 14.69l6.97-6.97a.75.75 0 111.06 1.06l-7.5 7.5z","clip-rule":"evenodd"})])}function xu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M7.72 12.53a.75.75 0 010-1.06l7.5-7.5a.75.75 0 111.06 1.06L9.31 12l6.97 6.97a.75.75 0 11-1.06 1.06l-7.5-7.5z","clip-rule":"evenodd"})])}function Ou(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.28 11.47a.75.75 0 010 1.06l-7.5 7.5a.75.75 0 01-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 011.06-1.06l7.5 7.5z","clip-rule":"evenodd"})])}function Su(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.5 12a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm6 0a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm6 0a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0z","clip-rule":"evenodd"})])}function Nu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M10.5 6a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm0 6a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm0 6a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0z","clip-rule":"evenodd"})])}function Ci(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"})])}function Ru(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"})])}function Iu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.5 5.653c0-1.426 1.529-2.33 2.779-1.643l11.54 6.348c1.295.712 1.295 2.573 0 3.285L7.28 19.991c-1.25.687-2.779-.217-2.779-1.643V5.653z","clip-rule":"evenodd"})])}function Cu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25zm-1.72 6.97a.75.75 0 10-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 101.06 1.06L12 13.06l1.72 1.72a.75.75 0 101.06-1.06L13.06 12l1.72-1.72a.75.75 0 10-1.06-1.06L12 10.94l-1.72-1.72z","clip-rule":"evenodd"})])}const Fr=(e,t)=>{const o=e.__vccOpts||e;for(const[a,s]of t)o[a]=s;return o},ku={},Au={class:"text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",fill:"none",viewBox:"0 0 100 101",xmlns:"http://www.w3.org/2000/svg"},Du=[n.createElementVNode("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"},null,-1),n.createElementVNode("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"},null,-1)];function Bu(e,t){return n.openBlock(),n.createElementBlock("svg",Au,Du)}const po=Fr(ku,[["render",Bu]]),ki=n.defineComponent({__name:"ImageLoader",props:{src:{},alt:{},isThumbnail:{type:Boolean,default:!0}},emits:["missing"],setup(e,{emit:t}){const o=e,a=n.ref(!0),s=n.ref(!1),i=n.ref();return n.onMounted(()=>{new Promise((r,l)=>{let c=new Image;c.addEventListener("load",()=>r(c)),c.addEventListener("error",d=>l(d)),c.src=o.src}).then(r=>{r.className="pointer-events-none w-full h-full",r.classList.add(o.isThumbnail?"object-cover":"object-contain"),r.draggable=!1,i.value?.appendChild(r)}).catch(()=>{s.value=!0,t("missing",!0)}).finally(()=>{a.value=!1})}),(r,l)=>(n.openBlock(),n.createElementBlock("div",{class:"flex justify-center items-center h-full max-h-[80vh]",ref_key:"card",ref:i},[a.value?(n.openBlock(),n.createBlock(po,{key:0,class:"w-6 h-6"})):n.createCommentVNode("",!0)],512))}}),Pu=["title"],Mu={key:0,class:"absolute z-40 inset-0 flex justify-center items-center w-full h-full"},Lu={key:1,class:"absolute inset-0 w-full h-full bg-gray-100/50 dark:bg-gray-800/50"},Fu={key:2,class:"absolute inset-0 flex flex-row items-center justify-center text-sm font-bold text-gray-600 dark:text-gray-100"},Uu={class:"m-auto z-20 flex h-full items-center justify-center select-none"},Hu={key:0,class:"m-auto flex h-full w-full items-center justify-center bg-gray-50 dark:bg-gray-900 text-red-500"},Vu={key:0,class:"m-auto flex h-full w-full items-center justify-center bg-gray-50 dark:bg-gray-900 text-gray-500 dark:text-gray-600"},ju={class:"pointer-events-none w-full h-full object-cover"},Gu=["src"],zu={key:0,class:"absolute m-auto flex items-center justify-center bg-transparent"},Wu={key:3,class:"absolute right-1 top-1"},Xu=["title"],Ku={key:1,class:"text-sm text-red-500 font-semibold text-left break-all"},Yu={class:"gap-x-0.5 inline-flex flex-wrap items-center text-xs pointer-events-none block font-medium text-gray-500 text-left break-all"},Ju={key:0},Qu={key:1,class:"ml-0.5"},Zu={key:2,class:"absolute top-1 right-1"},Ur=n.defineComponent({__name:"File",props:{file:{},isUploading:{type:Boolean},isUploaded:{type:Boolean},uploadRatio:{},selected:{type:Boolean,default:!1},onDeselect:{},singleDisk:{type:Boolean},fieldMode:{type:Boolean}},setup(e){const t=e,o=n.computed(()=>t.file.type==="image"),a=n.computed(()=>t.file.type==="video"),s=n.computed(()=>t.file.type!=="image"&&t.file.type!=="video"),i=n.computed(()=>!t.file.exists),r=n.computed(()=>i.value?t.file.path:t.file.name);return(l,c)=>(n.openBlock(),n.createElementBlock("button",{class:"relative cursor-pointer group focus-visible:outline-none flex flex-col items-start",title:r.value},[n.createElementVNode("div",{class:n.normalizeClass(["relative block aspect-square w-full h-full overflow-hidden rounded-lg hover:shadow-md hover:opacity-75 border border-gray-200/50 dark:border-gray-700/50 text-left","group-focus-visible:outline group-focus-visible:outline-2 group-focus-visible:outline-black dark:group-focus-visible:outline-white",l.selected?"outline outline-2 outline-blue-500 group-focus-visible:outline-blue-500":""])},[l.isUploading?(n.openBlock(),n.createElementBlock("div",Mu,[l.isUploaded===null?(n.openBlock(),n.createBlock(po,{key:0,class:"w-16 h-16"})):l.isUploaded===!1?(n.openBlock(),n.createBlock(n.unref(Ci),{key:1,class:"w-16 h-16 text-red-500"})):l.isUploaded===!0?(n.openBlock(),n.createBlock(n.unref(Ii),{key:2,class:"w-16 h-16 text-green-500"})):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),l.isUploading?(n.openBlock(),n.createElementBlock("div",Lu)):n.createCommentVNode("",!0),l.isUploading&&l.isUploaded===null?(n.openBlock(),n.createElementBlock("div",Fu,[n.createElementVNode("span",null,n.toDisplayString(l.uploadRatio)+"%",1)])):n.createCommentVNode("",!0),n.createElementVNode("div",Uu,[i.value&&!l.isUploading?(n.openBlock(),n.createElementBlock("div",Hu,[n.createVNode(n.unref(Ru),{class:"w-16 h-16"})])):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[s.value?(n.openBlock(),n.createElementBlock("div",Vu,[l.isUploading?n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(n.unref(zo),{key:0,class:"w-16 h-16"}))])):n.createCommentVNode("",!0),o.value?(n.openBlock(),n.createBlock(ki,{key:1,src:l.file.url,alt:l.file.name},null,8,["src","alt"])):n.createCommentVNode("",!0),a.value?(n.openBlock(),n.createElementBlock(n.Fragment,{key:2},[n.createElementVNode("video",ju,[n.createElementVNode("source",{src:l.file.url},null,8,Gu),n.createTextVNode(" "+n.toDisplayString(l.__("Sorry, your browser doesn't support embedded videos.")),1)]),l.isUploading?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",zu,[n.createVNode(n.unref(Iu),{class:"h-16 w-16 text-white/60"})]))],64)):n.createCommentVNode("",!0)],64))]),l.onDeselect?(n.openBlock(),n.createElementBlock("div",Wu,[l.onDeselect?(n.openBlock(),n.createElementBlock("button",{key:0,onClick:c[0]||(c[0]=d=>l.onDeselect(l.file)),class:"text-red-500 hover:text-red-600 rounded-full"},[n.createVNode(n.unref(Cu),{class:"h-6 w-6"})])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)],2),!i.value||l.isUploading?(n.openBlock(),n.createElementBlock("p",{key:0,class:n.normalizeClass(["pointer-events-none mt-2 block truncate font-medium text-gray-900 dark:text-gray-50 text-left w-full",l.isUploading||l.onDeselect?"text-xs":"text-sm"]),title:l.isUploading?l.file.name:r.value},n.toDisplayString(l.isUploading?l.file.name:r.value),11,Xu)):n.createCommentVNode("",!0),i.value&&!l.isUploading?(n.openBlock(),n.createElementBlock("p",Ku,n.toDisplayString(l.__("NovaFileManager.fileMissing",{path:l.file.path})),1)):n.createCommentVNode("",!0),n.createElementVNode("div",Yu,[l.file.size?(n.openBlock(),n.createElementBlock("span",Ju,n.toDisplayString(l.file.size),1)):n.createCommentVNode("",!0),l.fieldMode&&!l.singleDisk&&l.file.disk?.length>0?(n.openBlock(),n.createElementBlock("span",Qu,"ยท "+n.toDisplayString(l.file.disk),1)):n.createCommentVNode("",!0)]),l.selected?(n.openBlock(),n.createElementBlock("span",Zu,[n.createVNode(n.unref(Ii),{class:"h-5 w-5 text-blue-500","aria-hidden":"true"})])):n.createCommentVNode("",!0)],8,Pu))}});var ho=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function qu(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var o=function a(){return this instanceof a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};o.prototype=t.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(o,a,s.get?s:{enumerable:!0,get:function(){return e[a]}})}),o}var $u=Math.ceil,ef=Math.max;function tf(e,t,o,a){for(var s=-1,i=ef($u((t-e)/(o||1)),0),r=Array(i);i--;)r[a?i:++s]=e,e+=o;return r}var nf=tf;function of(e,t){return e===t||e!==e&&t!==t}var af=of,rf=typeof ho=="object"&&ho&&ho.Object===Object&&ho,sf=rf,lf=sf,cf=typeof self=="object"&&self&&self.Object===Object&&self,df=lf||cf||Function("return this")(),Ai=df,uf=Ai,ff=uf.Symbol,Hr=ff,Di=Hr,Bi=Object.prototype,pf=Bi.hasOwnProperty,hf=Bi.toString,Wo=Di?Di.toStringTag:void 0;function mf(e){var t=pf.call(e,Wo),o=e[Wo];try{e[Wo]=void 0;var a=!0}catch{}var s=hf.call(e);return a&&(t?e[Wo]=o:delete e[Wo]),s}var gf=mf,vf=Object.prototype,bf=vf.toString;function yf(e){return bf.call(e)}var Ef=yf,Pi=Hr,_f=gf,wf=Ef,Tf="[object Null]",xf="[object Undefined]",Mi=Pi?Pi.toStringTag:void 0;function Of(e){return e==null?e===void 0?xf:Tf:Mi&&Mi in Object(e)?_f(e):wf(e)}var Li=Of;function Sf(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Da=Sf,Nf=Li,Rf=Da,If="[object AsyncFunction]",Cf="[object Function]",kf="[object GeneratorFunction]",Af="[object Proxy]";function Df(e){if(!Rf(e))return!1;var t=Nf(e);return t==Cf||t==kf||t==If||t==Af}var Bf=Df,Pf=9007199254740991;function Mf(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Pf}var Lf=Mf,Ff=Bf,Uf=Lf;function Hf(e){return e!=null&&Uf(e.length)&&!Ff(e)}var Vf=Hf,jf=9007199254740991,Gf=/^(?:0|[1-9]\d*)$/;function zf(e,t){var o=typeof e;return t=t??jf,!!t&&(o=="number"||o!="symbol"&&Gf.test(e))&&e>-1&&e%1==0&&e0){var I=!1;for(var D in v.fileType){var C="."+v.fileType[D];if(B.toLowerCase().indexOf(C.toLowerCase(),B.length-C.length)!==-1){I=!0;break}}if(!I)return v.fileTypeErrorCallback(O,y++),!1}if(typeof v.minFileSize<"u"&&O.sizev.maxFileSize)return v.maxFileSizeErrorCallback(O,y++),!1;function F(P){a.getFromUniqueIdentifier(P)?N.push(O):function(){O.uniqueIdentifier=P;var U=new h(a,O,P);a.files.push(U),b.push(U),U.container=typeof m<"u"?m.srcElement:null,window.setTimeout(function(){a.fire("fileAdded",U,m)},0)}(),T()}var K=s.generateUniqueIdentifier(O,m);K&&typeof K.then=="function"?K.then(function(P){F(P)},function(){T()}):F(K)})};function h(u,m,y){var v=this;v.opts={},v.getOpt=u.getOpt,v._prevProgress=0,v.resumableObj=u,v.file=m,v.fileName=m.fileName||m.name,v.size=m.size,v.relativePath=m.relativePath||m.webkitRelativePath||v.fileName,v.uniqueIdentifier=y,v._pause=!1,v.container="";var b=y!==void 0,N=function(x,T){switch(x){case"progress":v.resumableObj.fire("fileProgress",v,T);break;case"error":v.abort(),b=!0,v.chunks=[],v.resumableObj.fire("fileError",v,T);break;case"success":if(b)return;v.resumableObj.fire("fileProgress",v),v.isComplete()&&v.resumableObj.fire("fileSuccess",v,T);break;case"retry":v.resumableObj.fire("fileRetry",v);break}};return v.chunks=[],v.abort=function(){var x=0;s.each(v.chunks,function(T){T.status()=="uploading"&&(T.abort(),x++)}),x>0&&v.resumableObj.fire("fileProgress",v)},v.cancel=function(){var x=v.chunks;v.chunks=[],s.each(x,function(T){T.status()=="uploading"&&(T.abort(),v.resumableObj.uploadNextChunk())}),v.resumableObj.removeFile(v),v.resumableObj.fire("fileProgress",v)},v.retry=function(){v.bootstrap();var x=!1;v.resumableObj.on("chunkingComplete",function(){x||v.resumableObj.upload(),x=!0})},v.bootstrap=function(){v.abort(),b=!1,v.chunks=[],v._prevProgress=0;for(var x=v.getOpt("forceChunkSize")?Math.ceil:Math.floor,T=Math.max(x(v.file.size/v.getOpt("chunkSize")),1),O=0;O.99999?1:x,x=Math.max(v._prevProgress,x),v._prevProgress=x,x},v.isUploading=function(){var x=!1;return s.each(v.chunks,function(T){if(T.status()=="uploading")return x=!0,!1}),x},v.isComplete=function(){var x=!1;return s.each(v.chunks,function(T){var O=T.status();if(O=="pending"||O=="uploading"||T.preprocessState===1)return x=!0,!1}),!x},v.pause=function(x){typeof x>"u"?v._pause=!v._pause:v._pause=x},v.isPaused=function(){return v._pause},v.resumableObj.fire("chunkingStart",v),v.bootstrap(),this}function g(u,m,y,v){var b=this;b.opts={},b.getOpt=u.getOpt,b.resumableObj=u,b.fileObj=m,b.fileObjSize=m.size,b.fileObjType=m.file.type,b.offset=y,b.callback=v,b.lastProgressCallback=new Date,b.tested=!1,b.retries=0,b.pendingRetry=!1,b.preprocessState=0;var N=b.getOpt("chunkSize");return b.loaded=0,b.startByte=b.offset*N,b.endByte=Math.min(b.fileObjSize,(b.offset+1)*N),b.fileObjSize-b.endByteb.getOpt("throttleProgressCallbacks")*1e3&&(b.callback("progress"),b.lastProgressCallback=new Date),b.loaded=q.loaded||0},!1),b.loaded=0,b.pendingRetry=!1,b.callback("progress");var T=function(q){var ne=b.status();if(ne=="success"||ne=="error")b.callback(ne,b.message()),b.resumableObj.uploadNextChunk();else{b.callback("retry",b.message()),b.abort(),b.retries++;var _e=b.getOpt("chunkRetryInterval");_e!==void 0?(b.pendingRetry=!0,setTimeout(b.send,_e)):b.send()}};b.xhr.addEventListener("load",T,!1),b.xhr.addEventListener("error",T,!1),b.xhr.addEventListener("timeout",T,!1);var O=[["chunkNumberParameterName",b.offset+1],["chunkSizeParameterName",b.getOpt("chunkSize")],["currentChunkSizeParameterName",b.endByte-b.startByte],["totalSizeParameterName",b.fileObjSize],["typeParameterName",b.fileObjType],["identifierParameterName",b.fileObj.uniqueIdentifier],["fileNameParameterName",b.fileObj.fileName],["relativePathParameterName",b.fileObj.relativePath],["totalChunksParameterName",b.fileObj.chunks.length]].filter(function(q){return b.getOpt(q[0])}).reduce(function(q,ne){return q[b.getOpt(ne[0])]=ne[1],q},{}),B=b.getOpt("query");typeof B=="function"&&(B=B(b.fileObj,b)),s.each(B,function(q,ne){O[q]=ne});var I=b.fileObj.file.slice?"slice":b.fileObj.file.mozSlice?"mozSlice":b.fileObj.file.webkitSlice?"webkitSlice":"slice",D=b.fileObj.file[I](b.startByte,b.endByte,b.getOpt("setChunkTypeFromFile")?b.fileObj.file.type:""),C=null,F=[],K=b.getOpt("parameterNamespace");if(b.getOpt("method")==="octet")C=D,s.each(O,function(q,ne){F.push([encodeURIComponent(K+q),encodeURIComponent(ne)].join("="))});else if(C=new FormData,s.each(O,function(q,ne){C.append(K+q,ne),F.push([encodeURIComponent(K+q),encodeURIComponent(ne)].join("="))}),b.getOpt("chunkFormat")=="blob")C.append(K+b.getOpt("fileParameterName"),D,b.fileObj.fileName);else if(b.getOpt("chunkFormat")=="base64"){var P=new FileReader;P.onload=function(q){C.append(K+b.getOpt("fileParameterName"),P.result),b.xhr.send(C)},P.readAsDataURL(D)}var U=s.getTarget("upload",F),j=b.getOpt("uploadMethod");b.xhr.open(j,U),b.getOpt("method")==="octet"&&b.xhr.setRequestHeader("Content-Type","application/octet-stream"),b.xhr.timeout=b.getOpt("xhrTimeout"),b.xhr.withCredentials=b.getOpt("withCredentials");var W=b.getOpt("headers");typeof W=="function"&&(W=W(b.fileObj,b)),s.each(W,function(q,ne){b.xhr.setRequestHeader(q,ne)}),b.getOpt("chunkFormat")=="blob"&&b.xhr.send(C)},b.abort=function(){b.xhr&&b.xhr.abort(),b.xhr=null},b.status=function(){return b.pendingRetry?"uploading":b.xhr?b.xhr.readyState<4?"uploading":b.xhr.status==200||b.xhr.status==201?"success":s.contains(b.getOpt("permanentErrors"),b.xhr.status)||b.retries>=b.getOpt("maxChunkRetries")?"error":(b.abort(),"pending"):"pending"},b.message=function(){return b.xhr?b.xhr.responseText:""},b.progress=function(x){typeof x>"u"&&(x=!1);var T=x?(b.endByte-b.startByte)/b.fileObjSize:1;if(b.pendingRetry)return 0;(!b.xhr||!b.xhr.status)&&(T*=.95);var O=b.status();switch(O){case"success":case"error":return 1*T;case"pending":return 0*T;default:return b.loaded/(b.endByte-b.startByte)*T}},this}return a.uploadNextChunk=function(){var u=!1;if(a.getOpt("prioritizeFirstAndLastChunk")&&(s.each(a.files,function(y){if(y.chunks.length&&y.chunks[0].status()=="pending"&&y.chunks[0].preprocessState===0)return y.chunks[0].send(),u=!0,!1;if(y.chunks.length>1&&y.chunks[y.chunks.length-1].status()=="pending"&&y.chunks[y.chunks.length-1].preprocessState===0)return y.chunks[y.chunks.length-1].send(),u=!0,!1}),u)||(s.each(a.files,function(y){if(y.isPaused()===!1&&s.each(y.chunks,function(v){if(v.status()=="pending"&&v.preprocessState===0)return v.send(),u=!0,!1}),u)return!1}),u))return!0;var m=!1;return s.each(a.files,function(y){if(!y.isComplete())return m=!0,!1}),m||a.fire("complete"),!1},a.assignBrowse=function(u,m){typeof u.length>"u"&&(u=[u]),s.each(u,function(y){var v;y.tagName==="INPUT"&&y.type==="file"?v=y:(v=document.createElement("input"),v.setAttribute("type","file"),v.style.display="none",y.addEventListener("click",function(){v.style.opacity=0,v.style.display="block",v.focus(),v.click(),v.style.display="none"},!1),y.appendChild(v));var b=a.getOpt("maxFiles");typeof b>"u"||b!=1?v.setAttribute("multiple","multiple"):v.removeAttribute("multiple"),m?v.setAttribute("webkitdirectory","webkitdirectory"):v.removeAttribute("webkitdirectory");var N=a.getOpt("fileType");typeof N<"u"&&N.length>=1?v.setAttribute("accept",N.map(function(x){return"."+x}).join(",")):v.removeAttribute("accept"),v.addEventListener("change",function(x){p(x.target.files,x);var T=a.getOpt("clearInput");T&&(x.target.value="")},!1)})},a.assignDrop=function(u){typeof u.length>"u"&&(u=[u]),s.each(u,function(m){m.addEventListener("dragover",r,!1),m.addEventListener("dragenter",r,!1),m.addEventListener("drop",i,!1)})},a.unAssignDrop=function(u){typeof u.length>"u"&&(u=[u]),s.each(u,function(m){m.removeEventListener("dragover",r),m.removeEventListener("dragenter",r),m.removeEventListener("drop",i)})},a.isUploading=function(){var u=!1;return s.each(a.files,function(m){if(m.isUploading())return u=!0,!1}),u},a.upload=function(){if(!a.isUploading()){a.fire("uploadStart");for(var u=1;u<=a.getOpt("simultaneousUploads");u++)a.uploadNextChunk()}},a.pause=function(){s.each(a.files,function(u){u.abort()}),a.fire("pause")},a.cancel=function(){a.fire("beforeCancel");for(var u=a.files.length-1;u>=0;u--)a.files[u].cancel();a.fire("cancel")},a.progress=function(){var u=0,m=0;return s.each(a.files,function(y){u+=y.progress()*y.size,m+=y.size}),m>0?u/m:0},a.addFile=function(u,m){p([u],m)},a.addFiles=function(u,m){p(u,m)},a.removeFile=function(u){for(var m=a.files.length-1;m>=0;m--)a.files[m]===u&&a.files.splice(m,1)},a.getFromUniqueIdentifier=function(u){var m=!1;return s.each(a.files,function(y){y.uniqueIdentifier==u&&(m=y)}),m},a.getSize=function(){var u=0;return s.each(a.files,function(m){u+=m.size}),u},a.handleDropEvent=function(u){i(u)},a.handleChangeEvent=function(u){p(u.target.files,u),u.target.value=""},a.updateQuery=function(u){a.opts.query=u},this};e.exports=t})()})(zi);var Ip=zi.exports;const Cp=Hn(Ip),Xo="queue",jr="preview",kp="upload",yn="upload-crop",Gr="browser",Ap="folder",Dp="KeyK",zr={folders:"#",files:">",help:"?"},Bp=["setDisk","setPath","setPerPage","setPage","setSearch","upload","renameFile","deleteFiles","unzipFile","createFolder","renameFolder","deleteFolder"],Xt={CREATE_FOLDER:"createFolder",RENAME_FOLDER:"renameFolder",DELETE_FOLDER:"deleteFolder",RENAME_FILE:"renameFile",DELETE_FILE:"deleteFile",UNZIP_FILE:"unzipFile"},Lt={CREATE_FOLDER:"createFolder",RENAME_FOLDER:"renameFolder",DELETE_FOLDER:"deleteFolder",RENAME_FILE:"renameFile",DELETE_FILES:"deleteFiles",UNZIP_FILE:"unzipFile"},En={CREATE_FOLDER:"/folders/create",RENAME_FOLDER:"/folders/rename",DELETE_FOLDER:"/folders/delete",RENAME_FILE:"/files/rename",DELETE_FILE:"/files/delete",UNZIP_FILE:"/files/unzip",UPLOAD:"/nova-vendor/nova-file-manager/files/upload",DISKS:"/disks"};async function mo({operation:e,endpoint:t,data:o,modal:a,callback:s}){const i=De(),r=i.post,l=i.setError,c=i.resetError,d=i.closeModal;try{i.loadingOperation=e;const f=await r({path:t,data:o});c(),window.Nova.success(f.data.message),s&&s(f),a&&d({name:a})}catch(f){i.loadingOperation=void 0;const p=f.response?.data;window.Nova.error(p?.message||"An error occurred"),l({attribute:e,bag:p})}}function Wi(e,t){return function(){return e.apply(t,arguments)}}const{toString:Pp}=Object.prototype,{getPrototypeOf:Wr}=Object,Ba=(e=>t=>{const o=Pp.call(t);return e[o]||(e[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),Kt=e=>(e=e.toLowerCase(),t=>Ba(t)===e),Pa=e=>t=>typeof t===e,{isArray:go}=Array,Ko=Pa("undefined");function Mp(e){return e!==null&&!Ko(e)&&e.constructor!==null&&!Ko(e.constructor)&&Rt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Xi=Kt("ArrayBuffer");function Lp(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Xi(e.buffer),t}const Fp=Pa("string"),Rt=Pa("function"),Ki=Pa("number"),Ma=e=>e!==null&&typeof e=="object",Up=e=>e===!0||e===!1,La=e=>{if(Ba(e)!=="object")return!1;const t=Wr(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Hp=Kt("Date"),Vp=Kt("File"),jp=Kt("Blob"),Gp=Kt("FileList"),zp=e=>Ma(e)&&Rt(e.pipe),Wp=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Rt(e.append)&&((t=Ba(e))==="formdata"||t==="object"&&Rt(e.toString)&&e.toString()==="[object FormData]"))},Xp=Kt("URLSearchParams"),Kp=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Yo(e,t,{allOwnKeys:o=!1}={}){if(e===null||typeof e>"u")return;let a,s;if(typeof e!="object"&&(e=[e]),go(e))for(a=0,s=e.length;a0;)if(s=o[a],t===s.toLowerCase())return s;return null}const Ji=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Qi=e=>!Ko(e)&&e!==Ji;function Xr(){const{caseless:e}=Qi(this)&&this||{},t={},o=(a,s)=>{const i=e&&Yi(t,s)||s;La(t[i])&&La(a)?t[i]=Xr(t[i],a):La(a)?t[i]=Xr({},a):go(a)?t[i]=a.slice():t[i]=a};for(let a=0,s=arguments.length;a(Yo(t,(s,i)=>{o&&Rt(s)?e[i]=Wi(s,o):e[i]=s},{allOwnKeys:a}),e),Jp=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Qp=(e,t,o,a)=>{e.prototype=Object.create(t.prototype,a),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),o&&Object.assign(e.prototype,o)},Zp=(e,t,o,a)=>{let s,i,r;const l={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)r=s[i],(!a||a(r,e,t))&&!l[r]&&(t[r]=e[r],l[r]=!0);e=o!==!1&&Wr(e)}while(e&&(!o||o(e,t))&&e!==Object.prototype);return t},qp=(e,t,o)=>{e=String(e),(o===void 0||o>e.length)&&(o=e.length),o-=t.length;const a=e.indexOf(t,o);return a!==-1&&a===o},$p=e=>{if(!e)return null;if(go(e))return e;let t=e.length;if(!Ki(t))return null;const o=new Array(t);for(;t-- >0;)o[t]=e[t];return o},eh=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Wr(Uint8Array)),th=(e,t)=>{const a=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=a.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},nh=(e,t)=>{let o;const a=[];for(;(o=e.exec(t))!==null;)a.push(o);return a},oh=Kt("HTMLFormElement"),ah=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,a,s){return a.toUpperCase()+s}),Zi=(({hasOwnProperty:e})=>(t,o)=>e.call(t,o))(Object.prototype),rh=Kt("RegExp"),qi=(e,t)=>{const o=Object.getOwnPropertyDescriptors(e),a={};Yo(o,(s,i)=>{let r;(r=t(s,i,e))!==!1&&(a[i]=r||s)}),Object.defineProperties(e,a)},sh=e=>{qi(e,(t,o)=>{if(Rt(e)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;const a=e[o];if(Rt(a)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},ih=(e,t)=>{const o={},a=s=>{s.forEach(i=>{o[i]=!0})};return go(e)?a(e):a(String(e).split(t)),o},lh=()=>{},ch=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Kr="abcdefghijklmnopqrstuvwxyz",$i="0123456789",el={DIGIT:$i,ALPHA:Kr,ALPHA_DIGIT:Kr+Kr.toUpperCase()+$i},dh=(e=16,t=el.ALPHA_DIGIT)=>{let o="";const{length:a}=t;for(;e--;)o+=t[Math.random()*a|0];return o};function uh(e){return!!(e&&Rt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const fh=e=>{const t=new Array(10),o=(a,s)=>{if(Ma(a)){if(t.indexOf(a)>=0)return;if(!("toJSON"in a)){t[s]=a;const i=go(a)?[]:{};return Yo(a,(r,l)=>{const c=o(r,s+1);!Ko(c)&&(i[l]=c)}),t[s]=void 0,i}}return a};return o(e,0)},ph=Kt("AsyncFunction"),X={isArray:go,isArrayBuffer:Xi,isBuffer:Mp,isFormData:Wp,isArrayBufferView:Lp,isString:Fp,isNumber:Ki,isBoolean:Up,isObject:Ma,isPlainObject:La,isUndefined:Ko,isDate:Hp,isFile:Vp,isBlob:jp,isRegExp:rh,isFunction:Rt,isStream:zp,isURLSearchParams:Xp,isTypedArray:eh,isFileList:Gp,forEach:Yo,merge:Xr,extend:Yp,trim:Kp,stripBOM:Jp,inherits:Qp,toFlatObject:Zp,kindOf:Ba,kindOfTest:Kt,endsWith:qp,toArray:$p,forEachEntry:th,matchAll:nh,isHTMLForm:oh,hasOwnProperty:Zi,hasOwnProp:Zi,reduceDescriptors:qi,freezeMethods:sh,toObjectSet:ih,toCamelCase:ah,noop:lh,toFiniteNumber:ch,findKey:Yi,global:Ji,isContextDefined:Qi,ALPHABET:el,generateString:dh,isSpecCompliantForm:uh,toJSONObject:fh,isAsyncFn:ph,isThenable:e=>e&&(Ma(e)||Rt(e))&&Rt(e.then)&&Rt(e.catch)};function Se(e,t,o,a,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),o&&(this.config=o),a&&(this.request=a),s&&(this.response=s)}X.inherits(Se,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:X.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const tl=Se.prototype,nl={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{nl[e]={value:e}}),Object.defineProperties(Se,nl),Object.defineProperty(tl,"isAxiosError",{value:!0}),Se.from=(e,t,o,a,s,i)=>{const r=Object.create(tl);return X.toFlatObject(e,r,function(c){return c!==Error.prototype},l=>l!=="isAxiosError"),Se.call(r,e.message,t,o,a,s),r.cause=e,r.name=e.name,i&&Object.assign(r,i),r};const hh=null;function Yr(e){return X.isPlainObject(e)||X.isArray(e)}function ol(e){return X.endsWith(e,"[]")?e.slice(0,-2):e}function al(e,t,o){return e?e.concat(t).map(function(s,i){return s=ol(s),!o&&i?"["+s+"]":s}).join(o?".":""):t}function mh(e){return X.isArray(e)&&!e.some(Yr)}const gh=X.toFlatObject(X,{},null,function(t){return/^is[A-Z]/.test(t)});function Fa(e,t,o){if(!X.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,o=X.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!X.isUndefined(y[m])});const a=o.metaTokens,s=o.visitor||f,i=o.dots,r=o.indexes,c=(o.Blob||typeof Blob<"u"&&Blob)&&X.isSpecCompliantForm(t);if(!X.isFunction(s))throw new TypeError("visitor must be a function");function d(u){if(u===null)return"";if(X.isDate(u))return u.toISOString();if(!c&&X.isBlob(u))throw new Se("Blob is not supported. Use a Buffer instead.");return X.isArrayBuffer(u)||X.isTypedArray(u)?c&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function f(u,m,y){let v=u;if(u&&!y&&typeof u=="object"){if(X.endsWith(m,"{}"))m=a?m:m.slice(0,-2),u=JSON.stringify(u);else if(X.isArray(u)&&mh(u)||(X.isFileList(u)||X.endsWith(m,"[]"))&&(v=X.toArray(u)))return m=ol(m),v.forEach(function(N,x){!(X.isUndefined(N)||N===null)&&t.append(r===!0?al([m],x,i):r===null?m:m+"[]",d(N))}),!1}return Yr(u)?!0:(t.append(al(y,m,i),d(u)),!1)}const p=[],h=Object.assign(gh,{defaultVisitor:f,convertValue:d,isVisitable:Yr});function g(u,m){if(!X.isUndefined(u)){if(p.indexOf(u)!==-1)throw Error("Circular reference detected in "+m.join("."));p.push(u),X.forEach(u,function(v,b){(!(X.isUndefined(v)||v===null)&&s.call(t,v,X.isString(b)?b.trim():b,m,h))===!0&&g(v,m?m.concat(b):[b])}),p.pop()}}if(!X.isObject(e))throw new TypeError("data must be an object");return g(e),t}function rl(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(a){return t[a]})}function Jr(e,t){this._pairs=[],e&&Fa(e,this,t)}const sl=Jr.prototype;sl.append=function(t,o){this._pairs.push([t,o])},sl.toString=function(t){const o=t?function(a){return t.call(this,a,rl)}:rl;return this._pairs.map(function(s){return o(s[0])+"="+o(s[1])},"").join("&")};function vh(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function il(e,t,o){if(!t)return e;const a=o&&o.encode||vh,s=o&&o.serialize;let i;if(s?i=s(t,o):i=X.isURLSearchParams(t)?t.toString():new Jr(t,o).toString(a),i){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class bh{constructor(){this.handlers=[]}use(t,o,a){return this.handlers.push({fulfilled:t,rejected:o,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){X.forEach(this.handlers,function(a){a!==null&&t(a)})}}const ll=bh,cl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yh={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Jr,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},dl=typeof window<"u"&&typeof document<"u",Eh=(e=>dl&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),_h=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Yt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:dl,hasStandardBrowserEnv:Eh,hasStandardBrowserWebWorkerEnv:_h},Symbol.toStringTag,{value:"Module"})),...yh};function wh(e,t){return Fa(e,new Yt.classes.URLSearchParams,Object.assign({visitor:function(o,a,s,i){return Yt.isNode&&X.isBuffer(o)?(this.append(a,o.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Th(e){return X.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function xh(e){const t={},o=Object.keys(e);let a;const s=o.length;let i;for(a=0;a=o.length;return r=!r&&X.isArray(s)?s.length:r,c?(X.hasOwnProp(s,r)?s[r]=[s[r],a]:s[r]=a,!l):((!s[r]||!X.isObject(s[r]))&&(s[r]=[]),t(o,a,s[r],i)&&X.isArray(s[r])&&(s[r]=xh(s[r])),!l)}if(X.isFormData(e)&&X.isFunction(e.entries)){const o={};return X.forEachEntry(e,(a,s)=>{t(Th(a),s,o,0)}),o}return null}function Oh(e,t,o){if(X.isString(e))try{return(t||JSON.parse)(e),X.trim(e)}catch(a){if(a.name!=="SyntaxError")throw a}return(o||JSON.stringify)(e)}const Qr={transitional:cl,adapter:["xhr","http"],transformRequest:[function(t,o){const a=o.getContentType()||"",s=a.indexOf("application/json")>-1,i=X.isObject(t);if(i&&X.isHTMLForm(t)&&(t=new FormData(t)),X.isFormData(t))return s?JSON.stringify(ul(t)):t;if(X.isArrayBuffer(t)||X.isBuffer(t)||X.isStream(t)||X.isFile(t)||X.isBlob(t))return t;if(X.isArrayBufferView(t))return t.buffer;if(X.isURLSearchParams(t))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(i){if(a.indexOf("application/x-www-form-urlencoded")>-1)return wh(t,this.formSerializer).toString();if((l=X.isFileList(t))||a.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Fa(l?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||s?(o.setContentType("application/json",!1),Oh(t)):t}],transformResponse:[function(t){const o=this.transitional||Qr.transitional,a=o&&o.forcedJSONParsing,s=this.responseType==="json";if(t&&X.isString(t)&&(a&&!this.responseType||s)){const r=!(o&&o.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(l){if(r)throw l.name==="SyntaxError"?Se.from(l,Se.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Yt.classes.FormData,Blob:Yt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};X.forEach(["delete","get","head","post","put","patch"],e=>{Qr.headers[e]={}});const Zr=Qr,Sh=X.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Nh=e=>{const t={};let o,a,s;return e&&e.split(` -`).forEach(function(r){s=r.indexOf(":"),o=r.substring(0,s).trim().toLowerCase(),a=r.substring(s+1).trim(),!(!o||t[o]&&Sh[o])&&(o==="set-cookie"?t[o]?t[o].push(a):t[o]=[a]:t[o]=t[o]?t[o]+", "+a:a)}),t},fl=Symbol("internals");function Jo(e){return e&&String(e).trim().toLowerCase()}function Ua(e){return e===!1||e==null?e:X.isArray(e)?e.map(Ua):String(e)}function Rh(e){const t=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=o.exec(e);)t[a[1]]=a[2];return t}const Ih=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function qr(e,t,o,a,s){if(X.isFunction(a))return a.call(this,t,o);if(s&&(t=o),!!X.isString(t)){if(X.isString(a))return t.indexOf(a)!==-1;if(X.isRegExp(a))return a.test(t)}}function Ch(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,o,a)=>o.toUpperCase()+a)}function kh(e,t){const o=X.toCamelCase(" "+t);["get","set","has"].forEach(a=>{Object.defineProperty(e,a+o,{value:function(s,i,r){return this[a].call(this,t,s,i,r)},configurable:!0})})}class Ha{constructor(t){t&&this.set(t)}set(t,o,a){const s=this;function i(l,c,d){const f=Jo(c);if(!f)throw new Error("header name must be a non-empty string");const p=X.findKey(s,f);(!p||s[p]===void 0||d===!0||d===void 0&&s[p]!==!1)&&(s[p||c]=Ua(l))}const r=(l,c)=>X.forEach(l,(d,f)=>i(d,f,c));return X.isPlainObject(t)||t instanceof this.constructor?r(t,o):X.isString(t)&&(t=t.trim())&&!Ih(t)?r(Nh(t),o):t!=null&&i(o,t,a),this}get(t,o){if(t=Jo(t),t){const a=X.findKey(this,t);if(a){const s=this[a];if(!o)return s;if(o===!0)return Rh(s);if(X.isFunction(o))return o.call(this,s,a);if(X.isRegExp(o))return o.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,o){if(t=Jo(t),t){const a=X.findKey(this,t);return!!(a&&this[a]!==void 0&&(!o||qr(this,this[a],a,o)))}return!1}delete(t,o){const a=this;let s=!1;function i(r){if(r=Jo(r),r){const l=X.findKey(a,r);l&&(!o||qr(a,a[l],l,o))&&(delete a[l],s=!0)}}return X.isArray(t)?t.forEach(i):i(t),s}clear(t){const o=Object.keys(this);let a=o.length,s=!1;for(;a--;){const i=o[a];(!t||qr(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const o=this,a={};return X.forEach(this,(s,i)=>{const r=X.findKey(a,i);if(r){o[r]=Ua(s),delete o[i];return}const l=t?Ch(i):String(i).trim();l!==i&&delete o[i],o[l]=Ua(s),a[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const o=Object.create(null);return X.forEach(this,(a,s)=>{a!=null&&a!==!1&&(o[s]=t&&X.isArray(a)?a.join(", "):a)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,o])=>t+": "+o).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...o){const a=new this(t);return o.forEach(s=>a.set(s)),a}static accessor(t){const a=(this[fl]=this[fl]={accessors:{}}).accessors,s=this.prototype;function i(r){const l=Jo(r);a[l]||(kh(s,r),a[l]=!0)}return X.isArray(t)?t.forEach(i):i(t),this}}Ha.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),X.reduceDescriptors(Ha.prototype,({value:e},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(a){this[o]=a}}}),X.freezeMethods(Ha);const on=Ha;function $r(e,t){const o=this||Zr,a=t||o,s=on.from(a.headers);let i=a.data;return X.forEach(e,function(l){i=l.call(o,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function pl(e){return!!(e&&e.__CANCEL__)}function Qo(e,t,o){Se.call(this,e??"canceled",Se.ERR_CANCELED,t,o),this.name="CanceledError"}X.inherits(Qo,Se,{__CANCEL__:!0});function Ah(e,t,o){const a=o.config.validateStatus;!o.status||!a||a(o.status)?e(o):t(new Se("Request failed with status code "+o.status,[Se.ERR_BAD_REQUEST,Se.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}const Dh=Yt.hasStandardBrowserEnv?{write(e,t,o,a,s,i){const r=[e+"="+encodeURIComponent(t)];X.isNumber(o)&&r.push("expires="+new Date(o).toGMTString()),X.isString(a)&&r.push("path="+a),X.isString(s)&&r.push("domain="+s),i===!0&&r.push("secure"),document.cookie=r.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Bh(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ph(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function hl(e,t){return e&&!Bh(t)?Ph(e,t):t}const Mh=Yt.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");let a;function s(i){let r=i;return t&&(o.setAttribute("href",r),r=o.href),o.setAttribute("href",r),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:o.pathname.charAt(0)==="/"?o.pathname:"/"+o.pathname}}return a=s(window.location.href),function(r){const l=X.isString(r)?s(r):r;return l.protocol===a.protocol&&l.host===a.host}}():function(){return function(){return!0}}();function Lh(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Fh(e,t){e=e||10;const o=new Array(e),a=new Array(e);let s=0,i=0,r;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),f=a[i];r||(r=d),o[s]=c,a[s]=d;let p=i,h=0;for(;p!==s;)h+=o[p++],p=p%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),d-r{const i=s.loaded,r=s.lengthComputable?s.total:void 0,l=i-o,c=a(l),d=i<=r;o=i;const f={loaded:i,total:r,progress:r?i/r:void 0,bytes:l,rate:c||void 0,estimated:c&&r&&d?(r-i)/c:void 0,event:s};f[t?"download":"upload"]=!0,e(f)}}const es={http:hh,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(o,a){let s=e.data;const i=on.from(e.headers).normalize();let{responseType:r,withXSRFToken:l}=e,c;function d(){e.cancelToken&&e.cancelToken.unsubscribe(c),e.signal&&e.signal.removeEventListener("abort",c)}let f;if(X.isFormData(s)){if(Yt.hasStandardBrowserEnv||Yt.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((f=i.getContentType())!==!1){const[m,...y]=f?f.split(";").map(v=>v.trim()).filter(Boolean):[];i.setContentType([m||"multipart/form-data",...y].join("; "))}}let p=new XMLHttpRequest;if(e.auth){const m=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(m+":"+y))}const h=hl(e.baseURL,e.url);p.open(e.method.toUpperCase(),il(h,e.params,e.paramsSerializer),!0),p.timeout=e.timeout;function g(){if(!p)return;const m=on.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),v={data:!r||r==="text"||r==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:m,config:e,request:p};Ah(function(N){o(N),d()},function(N){a(N),d()},v),p=null}if("onloadend"in p?p.onloadend=g:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(g)},p.onabort=function(){p&&(a(new Se("Request aborted",Se.ECONNABORTED,e,p)),p=null)},p.onerror=function(){a(new Se("Network Error",Se.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const v=e.transitional||cl;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),a(new Se(y,v.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,e,p)),p=null},Yt.hasStandardBrowserEnv&&(l&&X.isFunction(l)&&(l=l(e)),l||l!==!1&&Mh(h))){const m=e.xsrfHeaderName&&e.xsrfCookieName&&Dh.read(e.xsrfCookieName);m&&i.set(e.xsrfHeaderName,m)}s===void 0&&i.setContentType(null),"setRequestHeader"in p&&X.forEach(i.toJSON(),function(y,v){p.setRequestHeader(v,y)}),X.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),r&&r!=="json"&&(p.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&p.addEventListener("progress",ml(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",ml(e.onUploadProgress)),(e.cancelToken||e.signal)&&(c=m=>{p&&(a(!m||m.type?new Qo(null,e,p):m),p.abort(),p=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));const u=Lh(h);if(u&&Yt.protocols.indexOf(u)===-1){a(new Se("Unsupported protocol "+u+":",Se.ERR_BAD_REQUEST,e));return}p.send(s||null)})}};X.forEach(es,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const gl=e=>`- ${e}`,Uh=e=>X.isFunction(e)||e===null||e===!1,vl={getAdapter:e=>{e=X.isArray(e)?e:[e];const{length:t}=e;let o,a;const s={};for(let i=0;i`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let r=t?i.length>1?`since : -`+i.map(gl).join(` -`):" "+gl(i[0]):"as no adapter specified";throw new Se("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return a},adapters:es};function ts(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Qo(null,e)}function bl(e){return ts(e),e.headers=on.from(e.headers),e.data=$r.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),vl.getAdapter(e.adapter||Zr.adapter)(e).then(function(a){return ts(e),a.data=$r.call(e,e.transformResponse,a),a.headers=on.from(a.headers),a},function(a){return pl(a)||(ts(e),a&&a.response&&(a.response.data=$r.call(e,e.transformResponse,a.response),a.response.headers=on.from(a.response.headers))),Promise.reject(a)})}const yl=e=>e instanceof on?e.toJSON():e;function vo(e,t){t=t||{};const o={};function a(d,f,p){return X.isPlainObject(d)&&X.isPlainObject(f)?X.merge.call({caseless:p},d,f):X.isPlainObject(f)?X.merge({},f):X.isArray(f)?f.slice():f}function s(d,f,p){if(X.isUndefined(f)){if(!X.isUndefined(d))return a(void 0,d,p)}else return a(d,f,p)}function i(d,f){if(!X.isUndefined(f))return a(void 0,f)}function r(d,f){if(X.isUndefined(f)){if(!X.isUndefined(d))return a(void 0,d)}else return a(void 0,f)}function l(d,f,p){if(p in t)return a(d,f);if(p in e)return a(void 0,d)}const c={url:i,method:i,data:i,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:l,headers:(d,f)=>s(yl(d),yl(f),!0)};return X.forEach(Object.keys(Object.assign({},e,t)),function(f){const p=c[f]||s,h=p(e[f],t[f],f);X.isUndefined(h)&&p!==l||(o[f]=h)}),o}const El="1.6.7",ns={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ns[e]=function(a){return typeof a===e||"a"+(t<1?"n ":" ")+e}});const _l={};ns.transitional=function(t,o,a){function s(i,r){return"[Axios v"+El+"] Transitional option '"+i+"'"+r+(a?". "+a:"")}return(i,r,l)=>{if(t===!1)throw new Se(s(r," has been removed"+(o?" in "+o:"")),Se.ERR_DEPRECATED);return o&&!_l[r]&&(_l[r]=!0,console.warn(s(r," has been deprecated since v"+o+" and will be removed in the near future"))),t?t(i,r,l):!0}};function Hh(e,t,o){if(typeof e!="object")throw new Se("options must be an object",Se.ERR_BAD_OPTION_VALUE);const a=Object.keys(e);let s=a.length;for(;s-- >0;){const i=a[s],r=t[i];if(r){const l=e[i],c=l===void 0||r(l,i,e);if(c!==!0)throw new Se("option "+i+" must be "+c,Se.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new Se("Unknown option "+i,Se.ERR_BAD_OPTION)}}const os={assertOptions:Hh,validators:ns},_n=os.validators;class Va{constructor(t){this.defaults=t,this.interceptors={request:new ll,response:new ll}}async request(t,o){try{return await this._request(t,o)}catch(a){if(a instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";a.stack?i&&!String(a.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(a.stack+=` -`+i):a.stack=i}throw a}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=vo(this.defaults,o);const{transitional:a,paramsSerializer:s,headers:i}=o;a!==void 0&&os.assertOptions(a,{silentJSONParsing:_n.transitional(_n.boolean),forcedJSONParsing:_n.transitional(_n.boolean),clarifyTimeoutError:_n.transitional(_n.boolean)},!1),s!=null&&(X.isFunction(s)?o.paramsSerializer={serialize:s}:os.assertOptions(s,{encode:_n.function,serialize:_n.function},!0)),o.method=(o.method||this.defaults.method||"get").toLowerCase();let r=i&&X.merge(i.common,i[o.method]);i&&X.forEach(["delete","get","head","post","put","patch","common"],u=>{delete i[u]}),o.headers=on.concat(r,i);const l=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(o)===!1||(c=c&&m.synchronous,l.unshift(m.fulfilled,m.rejected))});const d=[];this.interceptors.response.forEach(function(m){d.push(m.fulfilled,m.rejected)});let f,p=0,h;if(!c){const u=[bl.bind(this),void 0];for(u.unshift.apply(u,l),u.push.apply(u,d),h=u.length,f=Promise.resolve(o);p{if(!a._listeners)return;let i=a._listeners.length;for(;i-- >0;)a._listeners[i](s);a._listeners=null}),this.promise.then=s=>{let i;const r=new Promise(l=>{a.subscribe(l),i=l}).then(s);return r.cancel=function(){a.unsubscribe(i)},r},t(function(i,r,l){a.reason||(a.reason=new Qo(i,r,l),o(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}static source(){let t;return{token:new as(function(s){t=s}),cancel:t}}}const Vh=as;function jh(e){return function(o){return e.apply(null,o)}}function Gh(e){return X.isObject(e)&&e.isAxiosError===!0}const rs={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(rs).forEach(([e,t])=>{rs[t]=e});const zh=rs;function wl(e){const t=new ja(e),o=Wi(ja.prototype.request,t);return X.extend(o,ja.prototype,t,{allOwnKeys:!0}),X.extend(o,t,null,{allOwnKeys:!0}),o.create=function(s){return wl(vo(e,s))},o}const Qe=wl(Zr);Qe.Axios=ja,Qe.CanceledError=Qo,Qe.CancelToken=Vh,Qe.isCancel=pl,Qe.VERSION=El,Qe.toFormData=Fa,Qe.AxiosError=Se,Qe.Cancel=Qe.CanceledError,Qe.all=function(t){return Promise.all(t)},Qe.spread=jh,Qe.isAxiosError=Gh,Qe.mergeConfig=vo,Qe.AxiosHeaders=on,Qe.formToJSON=e=>ul(X.isHTMLForm(e)?new FormData(e):e),Qe.getAdapter=vl.getAdapter,Qe.HttpStatusCode=zh,Qe.default=Qe;const Ga=Qe;function Wh(e){return e==null}var Xh=Wh;const Kh=Hn(Xh);function Tl(){return document.head.querySelector('meta[name="csrf-token"]')?.content??!1}function xl(){const e=Ga.create();return e.defaults.headers.common["X-Requested-With"]="XMLHttpRequest",e.defaults.headers.common["X-CSRF-TOKEN"]=Tl(),e.interceptors.response.use(t=>t,t=>{if(Ga.isCancel(t))return Promise.reject(t);const o=t.response,{status:a,data:{redirect:s}}=o;if(a>=500&&window.Nova.$emit("error",t.response.data.message),a===401){if(!Kh(s)){location.href=s;return}window.Nova.redirectToLogin()}return a===403&&window.Nova.visit("/403"),a===419&&window.Nova.$emit("token-expired"),Promise.reject(t)}),e}function Yh(e){return function(t){return e?.[t]}}var Jh=Yh,Qh=Jh,Zh={"&":"&","<":"<",">":">",'"':""","'":"'"},qh=Qh(Zh),$h=qh;function em(e,t){for(var o=-1,a=e==null?0:e.length,s=Array(a);++o"']/g,hm=RegExp(Il.source);function mm(e){return e=pm(e),e&&hm.test(e)?e.replace(Il,fm):e}var gm=mm;const vm=Hn(gm);function wn(e,t){if(e==null)return e;let o=t?.escape?vm(e):e;return o=o.trim().replace(/ /g," ").replace(/\/{2,}/g,"/"),o}const De=Dr("nova-file-manager/browser",{state:()=>({path:void 0,disk:void 0,disks:void 0,page:void 0,search:void 0,perPage:15,perPageOptions:Gi(10,50,10),view:"grid",modals:[],callback:()=>{},files:void 0,folders:void 0,breadcrumbs:void 0,pagination:void 0,error:void 0,selection:void 0,preview:void 0,limit:void 0,wrapper:void 0,queue:[],multiple:void 0,ready:!1,isField:!1,isFetchingDisks:!1,isFetchingData:!1,isUploading:!1,loadingOperation:void 0,dark:void 0,tour:!1,resource:void 0,resourceId:void 0,attribute:void 0,singleDisk:!1,flexibleGroup:[],fieldInit:void 0,permissions:{folder:{create:!0,rename:!0,delete:!0},file:{upload:!0,rename:!0,edit:!0,delete:!0,unzip:!0}},chunkSize:50*1024*1024,usePintura:!1,pinturaOptions:{},cropperOptions:{}}),actions:{init(){this.ready||(this.syncDarkMode(),this.loadFromLocalStorage(),this.loadFromQueryString(),this.ready=!0)},syncDarkMode(){this.dark===void 0&&(this.dark=document.documentElement.classList.contains("dark")),window.Nova.$on("nova-theme-switched",({theme:e})=>{this.dark=e==="dark"})},loadFromLocalStorage(){if(this.isField)return;["perPage","view","disk"].forEach(t=>{const o=window?.localStorage.getItem(`nova-file-manager/${t}`);o&&o.length&&this.$patch({[t]:o})})},loadFromQueryString(){if(this.isField)return;const e=Object.fromEntries(new URLSearchParams(window?.location.search).entries());for(const[t,o]of Object.entries(e))["path","disk","page","perPage"].includes(t)&&this.$patch({[t]:o});window.location.href.includes("?")||(this.path="/")},saveToLocalStorage({values:e}){if(!(this.isField||!e))for(const[t,o]of Object.entries(e))o&&window?.localStorage.setItem(`nova-file-manager/${t}`,o.toString())},selectFile({file:e}){if(!this.selection){this.selection=[e];return}this.selection.push(e)},deselectFile({file:e}){this.selection=this.selection?.filter(t=>t.id!==e.id)},setSelection({files:e}){this.selection=e},clearSelection(){this.setSelection({files:void 0})},toggleSelection({file:e}){if(this.isSelected(e)){this.deselectFile({file:e});return}this.multiple||this.clearSelection(),this.selectFile({file:e})},openModal({name:e}){this.modals.unshift(e)},closeModal({name:e}){e===jr&&(this.preview=void 0),this.modals=this.modals.filter(t=>t!==e),this.resetError(),this.fixPortal()},setError({attribute:e,bag:t}){this.error={attribute:e,bag:t}},resetError(){this.error=void 0},queueFile({file:e}){this.queue.push({id:e.name,ratio:0,status:null,file:e,isImage:e.type.includes("image")??!1})},clearQueue(){this.queue=[]},updateQueue({id:e,ratio:t=100,status:o=null}){this.queue=this.queue.map(s=>s.id===e?{...s,status:o,ratio:t}:s),this.queue.reduce((s,i)=>s&&i.ratio===100,!0)&&this.queue.length&&setTimeout(async()=>{this.closeModal({name:kp}),this.closeModal({name:Xo}),this.clearQueue(),this.isUploading=!1,await this.data()},1e3)},fixPortal(){this.modals.length||this.preview||setTimeout(()=>{document.documentElement.style.removeProperty("overflow"),document.documentElement.style.removeProperty("padding-right")},200)},setQueryString({parameters:e}){if(this.isField)return;const t=new URLSearchParams(window.location.search),o=window.Nova.app.config.globalProperties.$inertia.page;for(const[a,s]of Object.entries(e)){const i=s?.toString();if(!i){t.delete(a);continue}i?.length>0&&t.set(a,i)}if(o.url!==`${window.location.pathname}?${t}`){o.url=`${window.location.pathname}?${t}`;const a=t.toString().length>0?"?":"";window.history.pushState(o,"",`${window.location.pathname}${a}${t}`)}},reset(){["page","search","path"].forEach(t=>{this.$patch({[t]:null})})},async setPath({path:e}){this.reset(),this.path=e,this.setQueryString({parameters:{page:null,search:null,path:e}})},async setDisk({disk:e}){this.reset(),this.disk=e,this.setQueryString({parameters:{disk:e}}),this.saveToLocalStorage({values:{disk:e,page:null,search:null,path:null}})},async setPerPage({perPage:e}){this.perPage=e,this.page=1,this.setQueryString({parameters:{perPage:e}}),this.saveToLocalStorage({values:{perPage:e}})},async setPage({page:e}){this.page=e,this.setQueryString({parameters:{page:e}})},setView({view:e}){this.view=e,this.saveToLocalStorage({values:{view:e}})},setSearch({search:e}){this.search=e,this.setQueryString({parameters:{search:e}})},setPreview({preview:e}){this.preview=e},async deleteSelectedFiles(){await this.deleteFiles({paths:this.selection?.map(e=>e.path)??[]})},async data(){this.isFetchingData=!0;const{data:e}=await this.get({params:this.payload({path:this.path,page:this.page,perPage:this.perPage,search:this.search})});this.disk=e.disk,this.folders=e.folders,this.breadcrumbs=e.breadcrumbs,this.files=e.files,this.pagination=e.pagination,this.isFetchingData=!1},async getDisks(){this.isFetchingDisks=!0;const{data:e}=await this.get({path:En.DISKS});this.disks=e,this.isFetchingDisks=!1},async createFolder({path:e}){await mo({operation:Xt.CREATE_FOLDER,modal:Lt.CREATE_FOLDER,endpoint:En.CREATE_FOLDER,data:this.payload({path:wn(`${this.path??""}/${wn(e)}`,{escape:!1})})})},async renameFolder({id:e,from:t,to:o}){await mo({operation:Xt.RENAME_FOLDER,modal:`${Lt.RENAME_FOLDER}-${e}`,endpoint:En.RENAME_FOLDER,data:this.payload({path:this.path,from:wn(t,{escape:!1}),to:wn(`${this.path??""}/${wn(o)}`,{escape:!1})})})},async deleteFolder({id:e,path:t}){await mo({operation:Xt.DELETE_FOLDER,modal:`${Lt.DELETE_FOLDER}-${e}`,endpoint:En.DELETE_FOLDER,data:this.payload({path:t})})},upload({files:e}){this.isUploading=!0;const t=new Cp({permanentErrors:[400,404,409,415,419,422,500,501],chunkSize:this.chunkSize,maxChunkRetries:5,chunkRetryInterval:1e3,simultaneousUploads:1,testChunks:!1,target:this.url(En.UPLOAD),query:this.payload({path:this.path??"/"}),headers:{Accept:"application/json","X-CSRF-TOKEN":Tl()}});e.forEach(o=>{t.addFile(o),this.queueFile({file:o})}),t.on("fileAdded",()=>t.upload()),t.on("fileSuccess",o=>{this.updateQueue({id:o.fileName,status:!0})}),t.on("fileProgress",o=>{this.updateQueue({id:o.fileName,ratio:Math.floor(o.progress(!1)*100)})}),t.on("fileError",(o,a)=>{this.updateQueue({id:o.fileName,status:!1}),window.Nova.error(JSON.parse(a).message)})},async renameFile({id:e,from:t,to:o}){await mo({operation:Xt.RENAME_FILE,modal:`${Lt.RENAME_FILE}-${e}`,endpoint:En.RENAME_FILE,data:this.payload({path:this.path,from:wn(t,{escape:!1}),to:wn(`${this.path??""}/${wn(o)}`,{escape:!1})})})},async deleteFiles({paths:e}){e.length!==0&&await mo({operation:Xt.DELETE_FILE,modal:Lt.DELETE_FILES,endpoint:En.DELETE_FILE,data:this.payload({paths:e}),callback:()=>{this.preview=void 0,this.clearSelection()}})},async unzipFile({path:e}){await mo({operation:Xt.UNZIP_FILE,endpoint:En.UNZIP_FILE,data:this.payload({path:e}),callback:()=>{this.preview=void 0,this.clearSelection()}})},async get({path:e,params:t,options:o={}}){return await xl().get(this.url(`/nova-vendor/nova-file-manager${e??""}`),{params:t,...o})},async post({path:e,data:t}){return await xl().post(this.url(`/nova-vendor/nova-file-manager${e??""}`),t)},payload(e){let t={...e,attribute:this.attribute,resource:this.resource,fieldMode:this.isField};if(this.component?.length&&["Nova.Create","Nova.Update"].includes(this.component)){let o;switch(this.component){case"Nova.Create":o="create";break;case"Nova.Update":o="update";break}t={...t,editing:!0,editMode:o}}return this.wrapper?.length&&(t={...t,wrapper:this.wrapper}),this.resourceId&&(t={...t,resourceId:this.resourceId}),this.singleDisk||(t={...t,disk:this.disk}),this.isField&&this.flexibleGroup?.length&&(t={...t,flexible:this.flexibleGroup.join(".")}),t},url(e){const t=this.isField?`/${this.resource}`:"";return`${e}${t}`.replace("//","/")},openBrowser({initialFiles:e,multiple:t,limit:o,wrapper:a,resource:s,resourceId:i,attribute:r,singleDisk:l,permissions:c,flexibleGroup:d,callback:f,usePintura:p,pinturaOptions:h,cropperOptions:g,component:u}){this.isField=!0,this.multiple=t,this.limit=o,this.wrapper=a,this.resource=s,this.resourceId=i,this.attribute=r,this.singleDisk=l,this.flexibleGroup=d,this.callback=f,this.usePintura=p,this.pinturaOptions=h,this.cropperOptions=g,this.error=void 0,this.permissions=c,this.disk=void 0,this.component=u,this.openModal({name:Gr}),this.setSelection({files:[...e]})},closeBrowser(){this.isField=!1,this.multiple=void 0,this.limit=void 0,this.wrapper=void 0,this.resource=void 0,this.resourceId=void 0,this.attribute=void 0,this.singleDisk=!1,this.flexibleGroup=[],this.callback=void 0,this.usePintura=!1,this.pinturaOptions={},this.cropperOptions={},this.error=void 0,this.permissions=void 0,this.disk=void 0,this.setSelection({files:[]}),this.closeModal({name:Gr})},confirm(){this.callback&&this.callback(this.selection),this.closeBrowser()},prepareTool({singleDisk:e,permissions:t,tour:o,usePintura:a,pinturaOptions:s,cropperOptions:i}){this.init(),this.clearSelection(),this.limit=void 0,this.isField=!1,this.multiple=!0,this.singleDisk=e,this.permissions=t,this.tour=o,this.usePintura=a,this.pinturaOptions=s,this.cropperOptions=i,this.error=void 0}},getters:{isOpen(){return e=>e===jr?!!this.preview:this.modals.includes(e)},isSelected(){return e=>!!this.selection?.find(t=>t.id===e.id)},isBrowserOpen(e){return e.modals.includes(Gr)}}}),Cl=n.defineComponent({__name:"FieldCard",props:{file:{},detail:{type:Boolean,default:!1},field:{},onDeselect:{}},setup(e){const t=e,o=De(),a=n.computed(()=>o.singleDisk),s=r=>o.preview=r,i=r=>{t.detail&&r.exists&&s(r)};return(r,l)=>(n.openBlock(),n.createBlock(Ur,{file:r.file,selected:!1,"on-deselect":r.onDeselect,"single-disk":a.value,"field-mode":!0,onClick:l[0]||(l[0]=n.withModifiers(c=>i(r.file),["prevent","stop"]))},null,8,["file","on-deselect","single-disk"]))}});function bo(e,t,o){let a=o.initialDeps??[],s;return()=>{var i,r,l,c;let d;o.key&&((i=o.debug)!=null&&i.call(o))&&(d=Date.now());const f=e();if(!(f.length!==a.length||f.some((g,u)=>a[u]!==g)))return s;a=f;let h;if(o.key&&((r=o.debug)!=null&&r.call(o))&&(h=Date.now()),s=t(...f),o.key&&((l=o.debug)!=null&&l.call(o))){const g=Math.round((Date.now()-d)*100)/100,u=Math.round((Date.now()-h)*100)/100,m=u/16,y=(v,b)=>{for(v=String(v);v.lengthEi=e,_i=Symbol();function kr(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Go;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Go||(Go={}));function nu(){const e=n.effectScope(!0),t=e.run(()=>n.ref({}));let o=[],a=[];const s=n.markRaw({install(l){ka(s),s._a=l,l.provide(_i,s),l.config.globalProperties.$pinia=s,a.forEach(r=>o.push(r)),a=[]},use(l){return!this._a&&!jo?a.push(l):o.push(l),this},_p:o,_a:null,_e:e,_s:new Map,state:t});return s}const wi=()=>{};function Ti(e,t,o,a=wi){e.push(t);const s=()=>{const l=e.indexOf(t);l>-1&&(e.splice(l,1),a())};return!o&&n.getCurrentScope()&&n.onScopeDispose(s),s}function fo(e,...t){e.slice().forEach(o=>{o(...t)})}function Ar(e,t){e instanceof Map&&t instanceof Map&&t.forEach((o,a)=>e.set(a,o)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const o in t){if(!t.hasOwnProperty(o))continue;const a=t[o],s=e[o];kr(s)&&kr(a)&&e.hasOwnProperty(o)&&!n.isRef(a)&&!n.isReactive(a)?e[o]=Ar(s,a):e[o]=a}return e}const ou=Symbol();function au(e){return!kr(e)||!e.hasOwnProperty(ou)}const{assign:bn}=Object;function ru(e){return!!(n.isRef(e)&&e.effect)}function su(e,t,o,a){const{state:s,actions:l,getters:r}=t,i=o.state.value[e];let c;function d(){i||(o.state.value[e]=s?s():{});const f=n.toRefs(o.state.value[e]);return bn(f,l,Object.keys(r||{}).reduce((p,h)=>(p[h]=n.markRaw(n.computed(()=>{ka(o);const g=o._s.get(e);return r[h].call(g,g)})),p),{}))}return c=xi(e,d,t,o,a,!0),c}function xi(e,t,o={},a,s,l){let r;const i=bn({actions:{}},o),c={deep:!0};let d,f,p=n.markRaw([]),h=n.markRaw([]),g;const u=a.state.value[e];!l&&!u&&(a.state.value[e]={}),n.ref({});let m;function y(B){let I;d=f=!1,typeof B=="function"?(B(a.state.value[e]),I={type:Go.patchFunction,storeId:e,events:g}):(Ar(a.state.value[e],B),I={type:Go.patchObject,payload:B,storeId:e,events:g});const D=m=Symbol();n.nextTick().then(()=>{m===D&&(d=!0)}),f=!0,fo(p,I,a.state.value[e])}const v=l?function(){const{state:I}=o,D=I?I():{};this.$patch(C=>{bn(C,D)})}:wi;function b(){r.stop(),p=[],h=[],a._s.delete(e)}function N(B,I){return function(){ka(a);const D=Array.from(arguments),C=[],F=[];function K(j){C.push(j)}function P(j){F.push(j)}fo(h,{args:D,name:B,store:T,after:K,onError:P});let U;try{U=I.apply(this&&this.$id===e?this:T,D)}catch(j){throw fo(F,j),j}return U instanceof Promise?U.then(j=>(fo(C,j),j)).catch(j=>(fo(F,j),Promise.reject(j))):(fo(C,U),U)}}const x={_p:a,$id:e,$onAction:Ti.bind(null,h),$patch:y,$reset:v,$subscribe(B,I={}){const D=Ti(p,B,I.detached,()=>C()),C=r.run(()=>n.watch(()=>a.state.value[e],F=>{(I.flush==="sync"?f:d)&&B({storeId:e,type:Go.direct,events:g},F)},bn({},c,I)));return D},$dispose:b},T=n.reactive(x);a._s.set(e,T);const O=a._e.run(()=>(r=n.effectScope(),r.run(()=>t())));for(const B in O){const I=O[B];if(n.isRef(I)&&!ru(I)||n.isReactive(I))l||(u&&au(I)&&(n.isRef(I)?I.value=u[B]:Ar(I,u[B])),a.state.value[e][B]=I);else if(typeof I=="function"){const D=N(B,I);O[B]=D,i.actions[B]=I}}return bn(T,O),bn(n.toRaw(T),O),Object.defineProperty(T,"$state",{get:()=>a.state.value[e],set:B=>{y(I=>{bn(I,B)})}}),a._p.forEach(B=>{bn(T,r.run(()=>B({store:T,app:a._a,pinia:a,options:i})))}),u&&l&&o.hydrate&&o.hydrate(T.$state,u),d=!0,f=!0,T}function Dr(e,t,o){let a,s;const l=typeof t=="function";typeof e=="string"?(a=e,s=l?o:t):(s=e,a=e.id);function r(i,c){const d=n.getCurrentInstance();return i=i||d&&n.inject(_i,null),i&&ka(i),i=Ei,i._s.has(a)||(l?xi(a,t,s,i):su(a,s,i)),i._s.get(a)}return r.$id=a,r}function iu(e,t){return Array.isArray(t)?t.reduce((o,a)=>(o[a]=function(){return e(this.$pinia)[a]},o),{}):Object.keys(t).reduce((o,a)=>(o[a]=function(){const s=e(this.$pinia),l=t[a];return typeof l=="function"?l.call(this,s):s[l]},o),{})}function lu(e,t){return Array.isArray(t)?t.reduce((o,a)=>(o[a]=function(...s){return e(this.$pinia)[a](...s)},o),{}):Object.keys(t).reduce((o,a)=>(o[a]=function(...s){return e(this.$pinia)[t[a]](...s)},o),{})}function cu(e){{e=n.toRaw(e);const t={};for(const o in e){const a=e[o];(n.isRef(a)||n.isReactive(a))&&(t[o]=n.toRef(e,o))}return t}}const _w="";function du(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125z"})])}function uu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})])}function Aa(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"})])}function Oi(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})])}function Br(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})])}function fu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 00-3.375-3.375h-1.5a1.125 1.125 0 01-1.125-1.125v-1.5A3.375 3.375 0 006.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0015 2.25h-1.5a2.251 2.251 0 00-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 00-9-9z"})])}function pu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9.75v6.75m0 0l-3-3m3 3l3-3m-8.25 6a4.5 4.5 0 01-1.41-8.775 5.25 5.25 0 0110.233-2.33 3 3 0 013.758 3.848A3.752 3.752 0 0118 19.5H6.75z"})])}function Pr(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 16.5V9.75m0 0l3 3m-3-3l-3 3M6.75 19.5a4.5 4.5 0 01-1.41-8.775 5.25 5.25 0 0110.233-2.33 3 3 0 013.758 3.848A3.752 3.752 0 0118 19.5H6.75z"})])}function hu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 15a4.5 4.5 0 004.5 4.5H18a3.75 3.75 0 001.332-7.257 3 3 0 00-3.758-3.848 5.25 5.25 0 00-10.233 2.33A4.502 4.502 0 002.25 15z"})])}function zo(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})])}function Si(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"})])}function Ni(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})])}function mu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 10.5v6m3-3H9m4.06-7.19l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})])}function Mr(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})])}function gu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"})])}function vu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.712 4.33a9.027 9.027 0 011.652 1.306c.51.51.944 1.064 1.306 1.652M16.712 4.33l-3.448 4.138m3.448-4.138a9.014 9.014 0 00-9.424 0M19.67 7.288l-4.138 3.448m4.138-3.448a9.014 9.014 0 010 9.424m-4.138-5.976a3.736 3.736 0 00-.88-1.388 3.737 3.737 0 00-1.388-.88m2.268 2.268a3.765 3.765 0 010 2.528m-2.268-4.796a3.765 3.765 0 00-2.528 0m4.796 4.796c-.181.506-.475.982-.88 1.388a3.736 3.736 0 01-1.388.88m2.268-2.268l4.138 3.448m0 0a9.027 9.027 0 01-1.306 1.652c-.51.51-1.064.944-1.652 1.306m0 0l-3.448-4.138m3.448 4.138a9.014 9.014 0 01-9.424 0m5.976-4.138a3.765 3.765 0 01-2.528 0m0 0a3.736 3.736 0 01-1.388-.88 3.737 3.737 0 01-.88-1.388m2.268 2.268L7.288 19.67m0 0a9.024 9.024 0 01-1.652-1.306 9.027 9.027 0 01-1.306-1.652m0 0l4.138-3.448M4.33 16.712a9.014 9.014 0 010-9.424m4.138 5.976a3.765 3.765 0 010-2.528m0 0c.181-.506.475-.982.88-1.388a3.736 3.736 0 011.388-.88m-2.268 2.268L4.33 7.288m6.406 1.18L7.288 4.33m0 0a9.024 9.024 0 00-1.652 1.306A9.025 9.025 0 004.33 7.288"})])}function bu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})])}function yu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"})])}function Eu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 010 3.75H5.625a1.875 1.875 0 010-3.75z"})])}function _u(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z"})])}function Ri(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"})])}function Lr(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})])}function Ii(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z","clip-rule":"evenodd"})])}function wu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z","clip-rule":"evenodd"})])}function Tu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M12.53 16.28a.75.75 0 01-1.06 0l-7.5-7.5a.75.75 0 011.06-1.06L12 14.69l6.97-6.97a.75.75 0 111.06 1.06l-7.5 7.5z","clip-rule":"evenodd"})])}function xu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M7.72 12.53a.75.75 0 010-1.06l7.5-7.5a.75.75 0 111.06 1.06L9.31 12l6.97 6.97a.75.75 0 11-1.06 1.06l-7.5-7.5z","clip-rule":"evenodd"})])}function Ou(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.28 11.47a.75.75 0 010 1.06l-7.5 7.5a.75.75 0 01-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 011.06-1.06l7.5 7.5z","clip-rule":"evenodd"})])}function Su(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.5 12a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm6 0a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm6 0a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0z","clip-rule":"evenodd"})])}function Nu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M10.5 6a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm0 6a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm0 6a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0z","clip-rule":"evenodd"})])}function Ci(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"})])}function Ru(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"})])}function Iu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.5 5.653c0-1.426 1.529-2.33 2.779-1.643l11.54 6.348c1.295.712 1.295 2.573 0 3.285L7.28 19.991c-1.25.687-2.779-.217-2.779-1.643V5.653z","clip-rule":"evenodd"})])}function Cu(e,t){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25zm-1.72 6.97a.75.75 0 10-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 101.06 1.06L12 13.06l1.72 1.72a.75.75 0 101.06-1.06L13.06 12l1.72-1.72a.75.75 0 10-1.06-1.06L12 10.94l-1.72-1.72z","clip-rule":"evenodd"})])}const Fr=(e,t)=>{const o=e.__vccOpts||e;for(const[a,s]of t)o[a]=s;return o},ku={},Au={class:"text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",fill:"none",viewBox:"0 0 100 101",xmlns:"http://www.w3.org/2000/svg"},Du=[n.createElementVNode("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"},null,-1),n.createElementVNode("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"},null,-1)];function Bu(e,t){return n.openBlock(),n.createElementBlock("svg",Au,Du)}const po=Fr(ku,[["render",Bu]]),ki=n.defineComponent({__name:"ImageLoader",props:{src:{},alt:{},isThumbnail:{type:Boolean,default:!0}},emits:["missing"],setup(e,{emit:t}){const o=e,a=t,s=n.ref(!0),l=n.ref(!1),r=n.ref();return n.onMounted(()=>{new Promise((i,c)=>{let d=new Image;d.addEventListener("load",()=>i(d)),d.addEventListener("error",f=>c(f)),d.src=o.src}).then(i=>{i.className="pointer-events-none w-full h-full",i.classList.add(o.isThumbnail?"object-cover":"object-contain"),i.draggable=!1,r.value?.appendChild(i)}).catch(()=>{l.value=!0,a("missing",!0)}).finally(()=>{s.value=!1})}),(i,c)=>(n.openBlock(),n.createElementBlock("div",{class:"flex justify-center items-center h-full max-h-[80vh]",ref_key:"card",ref:r},[s.value?(n.openBlock(),n.createBlock(po,{key:0,class:"w-6 h-6"})):n.createCommentVNode("",!0)],512))}}),Pu=["title"],Mu={key:0,class:"absolute z-40 inset-0 flex justify-center items-center w-full h-full"},Lu={key:1,class:"absolute inset-0 w-full h-full bg-gray-100/50 dark:bg-gray-800/50"},Fu={key:2,class:"absolute inset-0 flex flex-row items-center justify-center text-sm font-bold text-gray-600 dark:text-gray-100"},Uu={class:"m-auto z-20 flex h-full items-center justify-center select-none"},Hu={key:0,class:"m-auto flex h-full w-full items-center justify-center bg-gray-50 dark:bg-gray-900 text-red-500"},Vu={key:0,class:"m-auto flex h-full w-full items-center justify-center bg-gray-50 dark:bg-gray-900 text-gray-500 dark:text-gray-600"},ju={class:"pointer-events-none w-full h-full object-cover"},Gu=["src"],zu={key:0,class:"absolute m-auto flex items-center justify-center bg-transparent"},Wu={key:3,class:"absolute right-1 top-1"},Xu=["title"],Ku={key:1,class:"text-sm text-red-500 font-semibold text-left break-all"},Yu={class:"gap-x-0.5 inline-flex flex-wrap items-center text-xs pointer-events-none block font-medium text-gray-500 text-left break-all"},Ju={key:0},Qu={key:1,class:"ml-0.5"},Zu={key:2,class:"absolute top-1 right-1"},Ur=n.defineComponent({__name:"File",props:{file:{},isUploading:{type:Boolean},isUploaded:{type:Boolean},uploadRatio:{},selected:{type:Boolean,default:!1},onDeselect:{},singleDisk:{type:Boolean},fieldMode:{type:Boolean}},setup(e){const t=e,o=n.computed(()=>t.file.type==="image"),a=n.computed(()=>t.file.type==="video"),s=n.computed(()=>t.file.type!=="image"&&t.file.type!=="video"),l=n.computed(()=>!t.file.exists),r=n.computed(()=>l.value?t.file.path:t.file.name);return(i,c)=>(n.openBlock(),n.createElementBlock("button",{class:"relative cursor-pointer group focus-visible:outline-none flex flex-col items-start",title:r.value},[n.createElementVNode("div",{class:n.normalizeClass(["relative block aspect-square w-full h-full overflow-hidden rounded-lg hover:shadow-md hover:opacity-75 border border-gray-200/50 dark:border-gray-700/50 text-left","group-focus-visible:outline group-focus-visible:outline-2 group-focus-visible:outline-black dark:group-focus-visible:outline-white",i.selected?"outline outline-2 outline-blue-500 group-focus-visible:outline-blue-500":""])},[i.isUploading?(n.openBlock(),n.createElementBlock("div",Mu,[i.isUploaded===null?(n.openBlock(),n.createBlock(po,{key:0,class:"w-16 h-16"})):i.isUploaded===!1?(n.openBlock(),n.createBlock(n.unref(Ci),{key:1,class:"w-16 h-16 text-red-500"})):i.isUploaded===!0?(n.openBlock(),n.createBlock(n.unref(Ii),{key:2,class:"w-16 h-16 text-green-500"})):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),i.isUploading?(n.openBlock(),n.createElementBlock("div",Lu)):n.createCommentVNode("",!0),i.isUploading&&i.isUploaded===null?(n.openBlock(),n.createElementBlock("div",Fu,[n.createElementVNode("span",null,n.toDisplayString(i.uploadRatio)+"%",1)])):n.createCommentVNode("",!0),n.createElementVNode("div",Uu,[l.value&&!i.isUploading?(n.openBlock(),n.createElementBlock("div",Hu,[n.createVNode(n.unref(Ru),{class:"w-16 h-16"})])):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[s.value?(n.openBlock(),n.createElementBlock("div",Vu,[i.isUploading?n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(n.unref(zo),{key:0,class:"w-16 h-16"}))])):n.createCommentVNode("",!0),o.value?(n.openBlock(),n.createBlock(ki,{key:1,src:i.file.url,alt:i.file.name},null,8,["src","alt"])):n.createCommentVNode("",!0),a.value?(n.openBlock(),n.createElementBlock(n.Fragment,{key:2},[n.createElementVNode("video",ju,[n.createElementVNode("source",{src:i.file.url},null,8,Gu),n.createTextVNode(" "+n.toDisplayString(i.__("Sorry, your browser doesn't support embedded videos.")),1)]),i.isUploading?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",zu,[n.createVNode(n.unref(Iu),{class:"h-16 w-16 text-white/60"})]))],64)):n.createCommentVNode("",!0)],64))]),i.onDeselect?(n.openBlock(),n.createElementBlock("div",Wu,[i.onDeselect?(n.openBlock(),n.createElementBlock("button",{key:0,onClick:c[0]||(c[0]=d=>i.onDeselect(i.file)),class:"text-red-500 hover:text-red-600 rounded-full"},[n.createVNode(n.unref(Cu),{class:"h-6 w-6"})])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)],2),!l.value||i.isUploading?(n.openBlock(),n.createElementBlock("p",{key:0,class:n.normalizeClass(["pointer-events-none mt-2 block truncate font-medium text-gray-900 dark:text-gray-50 text-left w-full",i.isUploading||i.onDeselect?"text-xs":"text-sm"]),title:i.isUploading?i.file.name:r.value},n.toDisplayString(i.isUploading?i.file.name:r.value),11,Xu)):n.createCommentVNode("",!0),l.value&&!i.isUploading?(n.openBlock(),n.createElementBlock("p",Ku,n.toDisplayString(i.__("NovaFileManager.fileMissing",{path:i.file.path})),1)):n.createCommentVNode("",!0),n.createElementVNode("div",Yu,[i.file.size?(n.openBlock(),n.createElementBlock("span",Ju,n.toDisplayString(i.file.size),1)):n.createCommentVNode("",!0),i.fieldMode&&!i.singleDisk&&i.file.disk?.length>0?(n.openBlock(),n.createElementBlock("span",Qu,"ยท "+n.toDisplayString(i.file.disk),1)):n.createCommentVNode("",!0)]),i.selected?(n.openBlock(),n.createElementBlock("span",Zu,[n.createVNode(n.unref(Ii),{class:"h-5 w-5 text-blue-500","aria-hidden":"true"})])):n.createCommentVNode("",!0)],8,Pu))}});var ho=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function qu(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var o=function a(){return this instanceof a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};o.prototype=t.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(o,a,s.get?s:{enumerable:!0,get:function(){return e[a]}})}),o}var $u=Math.ceil,ef=Math.max;function tf(e,t,o,a){for(var s=-1,l=ef($u((t-e)/(o||1)),0),r=Array(l);l--;)r[a?l:++s]=e,e+=o;return r}var nf=tf;function of(e,t){return e===t||e!==e&&t!==t}var af=of,rf=typeof ho=="object"&&ho&&ho.Object===Object&&ho,sf=rf,lf=sf,cf=typeof self=="object"&&self&&self.Object===Object&&self,df=lf||cf||Function("return this")(),Ai=df,uf=Ai,ff=uf.Symbol,Hr=ff,Di=Hr,Bi=Object.prototype,pf=Bi.hasOwnProperty,hf=Bi.toString,Wo=Di?Di.toStringTag:void 0;function mf(e){var t=pf.call(e,Wo),o=e[Wo];try{e[Wo]=void 0;var a=!0}catch{}var s=hf.call(e);return a&&(t?e[Wo]=o:delete e[Wo]),s}var gf=mf,vf=Object.prototype,bf=vf.toString;function yf(e){return bf.call(e)}var Ef=yf,Pi=Hr,_f=gf,wf=Ef,Tf="[object Null]",xf="[object Undefined]",Mi=Pi?Pi.toStringTag:void 0;function Of(e){return e==null?e===void 0?xf:Tf:Mi&&Mi in Object(e)?_f(e):wf(e)}var Li=Of;function Sf(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Da=Sf,Nf=Li,Rf=Da,If="[object AsyncFunction]",Cf="[object Function]",kf="[object GeneratorFunction]",Af="[object Proxy]";function Df(e){if(!Rf(e))return!1;var t=Nf(e);return t==Cf||t==kf||t==If||t==Af}var Bf=Df,Pf=9007199254740991;function Mf(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Pf}var Lf=Mf,Ff=Bf,Uf=Lf;function Hf(e){return e!=null&&Uf(e.length)&&!Ff(e)}var Vf=Hf,jf=9007199254740991,Gf=/^(?:0|[1-9]\d*)$/;function zf(e,t){var o=typeof e;return t=t??jf,!!t&&(o=="number"||o!="symbol"&&Gf.test(e))&&e>-1&&e%1==0&&e0){var I=!1;for(var D in v.fileType){var C="."+v.fileType[D];if(B.toLowerCase().indexOf(C.toLowerCase(),B.length-C.length)!==-1){I=!0;break}}if(!I)return v.fileTypeErrorCallback(O,y++),!1}if(typeof v.minFileSize<"u"&&O.sizev.maxFileSize)return v.maxFileSizeErrorCallback(O,y++),!1;function F(P){a.getFromUniqueIdentifier(P)?N.push(O):function(){O.uniqueIdentifier=P;var U=new h(a,O,P);a.files.push(U),b.push(U),U.container=typeof m<"u"?m.srcElement:null,window.setTimeout(function(){a.fire("fileAdded",U,m)},0)}(),T()}var K=s.generateUniqueIdentifier(O,m);K&&typeof K.then=="function"?K.then(function(P){F(P)},function(){T()}):F(K)})};function h(u,m,y){var v=this;v.opts={},v.getOpt=u.getOpt,v._prevProgress=0,v.resumableObj=u,v.file=m,v.fileName=m.fileName||m.name,v.size=m.size,v.relativePath=m.relativePath||m.webkitRelativePath||v.fileName,v.uniqueIdentifier=y,v._pause=!1,v.container="";var b=y!==void 0,N=function(x,T){switch(x){case"progress":v.resumableObj.fire("fileProgress",v,T);break;case"error":v.abort(),b=!0,v.chunks=[],v.resumableObj.fire("fileError",v,T);break;case"success":if(b)return;v.resumableObj.fire("fileProgress",v),v.isComplete()&&v.resumableObj.fire("fileSuccess",v,T);break;case"retry":v.resumableObj.fire("fileRetry",v);break}};return v.chunks=[],v.abort=function(){var x=0;s.each(v.chunks,function(T){T.status()=="uploading"&&(T.abort(),x++)}),x>0&&v.resumableObj.fire("fileProgress",v)},v.cancel=function(){var x=v.chunks;v.chunks=[],s.each(x,function(T){T.status()=="uploading"&&(T.abort(),v.resumableObj.uploadNextChunk())}),v.resumableObj.removeFile(v),v.resumableObj.fire("fileProgress",v)},v.retry=function(){v.bootstrap();var x=!1;v.resumableObj.on("chunkingComplete",function(){x||v.resumableObj.upload(),x=!0})},v.bootstrap=function(){v.abort(),b=!1,v.chunks=[],v._prevProgress=0;for(var x=v.getOpt("forceChunkSize")?Math.ceil:Math.floor,T=Math.max(x(v.file.size/v.getOpt("chunkSize")),1),O=0;O.99999?1:x,x=Math.max(v._prevProgress,x),v._prevProgress=x,x},v.isUploading=function(){var x=!1;return s.each(v.chunks,function(T){if(T.status()=="uploading")return x=!0,!1}),x},v.isComplete=function(){var x=!1;return s.each(v.chunks,function(T){var O=T.status();if(O=="pending"||O=="uploading"||T.preprocessState===1)return x=!0,!1}),!x},v.pause=function(x){typeof x>"u"?v._pause=!v._pause:v._pause=x},v.isPaused=function(){return v._pause},v.resumableObj.fire("chunkingStart",v),v.bootstrap(),this}function g(u,m,y,v){var b=this;b.opts={},b.getOpt=u.getOpt,b.resumableObj=u,b.fileObj=m,b.fileObjSize=m.size,b.fileObjType=m.file.type,b.offset=y,b.callback=v,b.lastProgressCallback=new Date,b.tested=!1,b.retries=0,b.pendingRetry=!1,b.preprocessState=0;var N=b.getOpt("chunkSize");return b.loaded=0,b.startByte=b.offset*N,b.endByte=Math.min(b.fileObjSize,(b.offset+1)*N),b.fileObjSize-b.endByteb.getOpt("throttleProgressCallbacks")*1e3&&(b.callback("progress"),b.lastProgressCallback=new Date),b.loaded=q.loaded||0},!1),b.loaded=0,b.pendingRetry=!1,b.callback("progress");var T=function(q){var ne=b.status();if(ne=="success"||ne=="error")b.callback(ne,b.message()),b.resumableObj.uploadNextChunk();else{b.callback("retry",b.message()),b.abort(),b.retries++;var _e=b.getOpt("chunkRetryInterval");_e!==void 0?(b.pendingRetry=!0,setTimeout(b.send,_e)):b.send()}};b.xhr.addEventListener("load",T,!1),b.xhr.addEventListener("error",T,!1),b.xhr.addEventListener("timeout",T,!1);var O=[["chunkNumberParameterName",b.offset+1],["chunkSizeParameterName",b.getOpt("chunkSize")],["currentChunkSizeParameterName",b.endByte-b.startByte],["totalSizeParameterName",b.fileObjSize],["typeParameterName",b.fileObjType],["identifierParameterName",b.fileObj.uniqueIdentifier],["fileNameParameterName",b.fileObj.fileName],["relativePathParameterName",b.fileObj.relativePath],["totalChunksParameterName",b.fileObj.chunks.length]].filter(function(q){return b.getOpt(q[0])}).reduce(function(q,ne){return q[b.getOpt(ne[0])]=ne[1],q},{}),B=b.getOpt("query");typeof B=="function"&&(B=B(b.fileObj,b)),s.each(B,function(q,ne){O[q]=ne});var I=b.fileObj.file.slice?"slice":b.fileObj.file.mozSlice?"mozSlice":b.fileObj.file.webkitSlice?"webkitSlice":"slice",D=b.fileObj.file[I](b.startByte,b.endByte,b.getOpt("setChunkTypeFromFile")?b.fileObj.file.type:""),C=null,F=[],K=b.getOpt("parameterNamespace");if(b.getOpt("method")==="octet")C=D,s.each(O,function(q,ne){F.push([encodeURIComponent(K+q),encodeURIComponent(ne)].join("="))});else if(C=new FormData,s.each(O,function(q,ne){C.append(K+q,ne),F.push([encodeURIComponent(K+q),encodeURIComponent(ne)].join("="))}),b.getOpt("chunkFormat")=="blob")C.append(K+b.getOpt("fileParameterName"),D,b.fileObj.fileName);else if(b.getOpt("chunkFormat")=="base64"){var P=new FileReader;P.onload=function(q){C.append(K+b.getOpt("fileParameterName"),P.result),b.xhr.send(C)},P.readAsDataURL(D)}var U=s.getTarget("upload",F),j=b.getOpt("uploadMethod");b.xhr.open(j,U),b.getOpt("method")==="octet"&&b.xhr.setRequestHeader("Content-Type","application/octet-stream"),b.xhr.timeout=b.getOpt("xhrTimeout"),b.xhr.withCredentials=b.getOpt("withCredentials");var W=b.getOpt("headers");typeof W=="function"&&(W=W(b.fileObj,b)),s.each(W,function(q,ne){b.xhr.setRequestHeader(q,ne)}),b.getOpt("chunkFormat")=="blob"&&b.xhr.send(C)},b.abort=function(){b.xhr&&b.xhr.abort(),b.xhr=null},b.status=function(){return b.pendingRetry?"uploading":b.xhr?b.xhr.readyState<4?"uploading":b.xhr.status==200||b.xhr.status==201?"success":s.contains(b.getOpt("permanentErrors"),b.xhr.status)||b.retries>=b.getOpt("maxChunkRetries")?"error":(b.abort(),"pending"):"pending"},b.message=function(){return b.xhr?b.xhr.responseText:""},b.progress=function(x){typeof x>"u"&&(x=!1);var T=x?(b.endByte-b.startByte)/b.fileObjSize:1;if(b.pendingRetry)return 0;(!b.xhr||!b.xhr.status)&&(T*=.95);var O=b.status();switch(O){case"success":case"error":return 1*T;case"pending":return 0*T;default:return b.loaded/(b.endByte-b.startByte)*T}},this}return a.uploadNextChunk=function(){var u=!1;if(a.getOpt("prioritizeFirstAndLastChunk")&&(s.each(a.files,function(y){if(y.chunks.length&&y.chunks[0].status()=="pending"&&y.chunks[0].preprocessState===0)return y.chunks[0].send(),u=!0,!1;if(y.chunks.length>1&&y.chunks[y.chunks.length-1].status()=="pending"&&y.chunks[y.chunks.length-1].preprocessState===0)return y.chunks[y.chunks.length-1].send(),u=!0,!1}),u)||(s.each(a.files,function(y){if(y.isPaused()===!1&&s.each(y.chunks,function(v){if(v.status()=="pending"&&v.preprocessState===0)return v.send(),u=!0,!1}),u)return!1}),u))return!0;var m=!1;return s.each(a.files,function(y){if(!y.isComplete())return m=!0,!1}),m||a.fire("complete"),!1},a.assignBrowse=function(u,m){typeof u.length>"u"&&(u=[u]),s.each(u,function(y){var v;y.tagName==="INPUT"&&y.type==="file"?v=y:(v=document.createElement("input"),v.setAttribute("type","file"),v.style.display="none",y.addEventListener("click",function(){v.style.opacity=0,v.style.display="block",v.focus(),v.click(),v.style.display="none"},!1),y.appendChild(v));var b=a.getOpt("maxFiles");typeof b>"u"||b!=1?v.setAttribute("multiple","multiple"):v.removeAttribute("multiple"),m?v.setAttribute("webkitdirectory","webkitdirectory"):v.removeAttribute("webkitdirectory");var N=a.getOpt("fileType");typeof N<"u"&&N.length>=1?v.setAttribute("accept",N.map(function(x){return"."+x}).join(",")):v.removeAttribute("accept"),v.addEventListener("change",function(x){p(x.target.files,x);var T=a.getOpt("clearInput");T&&(x.target.value="")},!1)})},a.assignDrop=function(u){typeof u.length>"u"&&(u=[u]),s.each(u,function(m){m.addEventListener("dragover",r,!1),m.addEventListener("dragenter",r,!1),m.addEventListener("drop",l,!1)})},a.unAssignDrop=function(u){typeof u.length>"u"&&(u=[u]),s.each(u,function(m){m.removeEventListener("dragover",r),m.removeEventListener("dragenter",r),m.removeEventListener("drop",l)})},a.isUploading=function(){var u=!1;return s.each(a.files,function(m){if(m.isUploading())return u=!0,!1}),u},a.upload=function(){if(!a.isUploading()){a.fire("uploadStart");for(var u=1;u<=a.getOpt("simultaneousUploads");u++)a.uploadNextChunk()}},a.pause=function(){s.each(a.files,function(u){u.abort()}),a.fire("pause")},a.cancel=function(){a.fire("beforeCancel");for(var u=a.files.length-1;u>=0;u--)a.files[u].cancel();a.fire("cancel")},a.progress=function(){var u=0,m=0;return s.each(a.files,function(y){u+=y.progress()*y.size,m+=y.size}),m>0?u/m:0},a.addFile=function(u,m){p([u],m)},a.addFiles=function(u,m){p(u,m)},a.removeFile=function(u){for(var m=a.files.length-1;m>=0;m--)a.files[m]===u&&a.files.splice(m,1)},a.getFromUniqueIdentifier=function(u){var m=!1;return s.each(a.files,function(y){y.uniqueIdentifier==u&&(m=y)}),m},a.getSize=function(){var u=0;return s.each(a.files,function(m){u+=m.size}),u},a.handleDropEvent=function(u){l(u)},a.handleChangeEvent=function(u){p(u.target.files,u),u.target.value=""},a.updateQuery=function(u){a.opts.query=u},this};e.exports=t})()})(zi);var Ip=zi.exports;const Cp=Hn(Ip),Xo="queue",jr="preview",kp="upload",yn="upload-crop",Gr="browser",Ap="folder",Dp="KeyK",zr={folders:"#",files:">",help:"?"},Bp=["setDisk","setPath","setPerPage","setPage","setSearch","upload","renameFile","deleteFiles","unzipFile","createFolder","renameFolder","deleteFolder"],Xt={CREATE_FOLDER:"createFolder",RENAME_FOLDER:"renameFolder",DELETE_FOLDER:"deleteFolder",RENAME_FILE:"renameFile",DELETE_FILE:"deleteFile",UNZIP_FILE:"unzipFile"},Lt={CREATE_FOLDER:"createFolder",RENAME_FOLDER:"renameFolder",DELETE_FOLDER:"deleteFolder",RENAME_FILE:"renameFile",DELETE_FILES:"deleteFiles",UNZIP_FILE:"unzipFile"},En={CREATE_FOLDER:"/folders/create",RENAME_FOLDER:"/folders/rename",DELETE_FOLDER:"/folders/delete",RENAME_FILE:"/files/rename",DELETE_FILE:"/files/delete",UNZIP_FILE:"/files/unzip",UPLOAD:"/nova-vendor/nova-file-manager/files/upload",DISKS:"/disks"};async function mo({operation:e,endpoint:t,data:o,modal:a,callback:s}){const l=De(),r=l.post,i=l.setError,c=l.resetError,d=l.closeModal;try{l.loadingOperation=e;const f=await r({path:t,data:o});c(),window.Nova.success(f.data.message),s&&s(f),a&&d({name:a})}catch(f){l.loadingOperation=void 0;const p=f.response?.data;window.Nova.error(p?.message||"An error occurred"),i({attribute:e,bag:p})}}function Wi(e,t){return function(){return e.apply(t,arguments)}}const{toString:Pp}=Object.prototype,{getPrototypeOf:Wr}=Object,Ba=(e=>t=>{const o=Pp.call(t);return e[o]||(e[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),Kt=e=>(e=e.toLowerCase(),t=>Ba(t)===e),Pa=e=>t=>typeof t===e,{isArray:go}=Array,Ko=Pa("undefined");function Mp(e){return e!==null&&!Ko(e)&&e.constructor!==null&&!Ko(e.constructor)&&Rt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Xi=Kt("ArrayBuffer");function Lp(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Xi(e.buffer),t}const Fp=Pa("string"),Rt=Pa("function"),Ki=Pa("number"),Ma=e=>e!==null&&typeof e=="object",Up=e=>e===!0||e===!1,La=e=>{if(Ba(e)!=="object")return!1;const t=Wr(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Hp=Kt("Date"),Vp=Kt("File"),jp=Kt("Blob"),Gp=Kt("FileList"),zp=e=>Ma(e)&&Rt(e.pipe),Wp=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Rt(e.append)&&((t=Ba(e))==="formdata"||t==="object"&&Rt(e.toString)&&e.toString()==="[object FormData]"))},Xp=Kt("URLSearchParams"),Kp=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Yo(e,t,{allOwnKeys:o=!1}={}){if(e===null||typeof e>"u")return;let a,s;if(typeof e!="object"&&(e=[e]),go(e))for(a=0,s=e.length;a0;)if(s=o[a],t===s.toLowerCase())return s;return null}const Ji=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Qi=e=>!Ko(e)&&e!==Ji;function Xr(){const{caseless:e}=Qi(this)&&this||{},t={},o=(a,s)=>{const l=e&&Yi(t,s)||s;La(t[l])&&La(a)?t[l]=Xr(t[l],a):La(a)?t[l]=Xr({},a):go(a)?t[l]=a.slice():t[l]=a};for(let a=0,s=arguments.length;a(Yo(t,(s,l)=>{o&&Rt(s)?e[l]=Wi(s,o):e[l]=s},{allOwnKeys:a}),e),Jp=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Qp=(e,t,o,a)=>{e.prototype=Object.create(t.prototype,a),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),o&&Object.assign(e.prototype,o)},Zp=(e,t,o,a)=>{let s,l,r;const i={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),l=s.length;l-- >0;)r=s[l],(!a||a(r,e,t))&&!i[r]&&(t[r]=e[r],i[r]=!0);e=o!==!1&&Wr(e)}while(e&&(!o||o(e,t))&&e!==Object.prototype);return t},qp=(e,t,o)=>{e=String(e),(o===void 0||o>e.length)&&(o=e.length),o-=t.length;const a=e.indexOf(t,o);return a!==-1&&a===o},$p=e=>{if(!e)return null;if(go(e))return e;let t=e.length;if(!Ki(t))return null;const o=new Array(t);for(;t-- >0;)o[t]=e[t];return o},eh=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Wr(Uint8Array)),th=(e,t)=>{const a=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=a.next())&&!s.done;){const l=s.value;t.call(e,l[0],l[1])}},nh=(e,t)=>{let o;const a=[];for(;(o=e.exec(t))!==null;)a.push(o);return a},oh=Kt("HTMLFormElement"),ah=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,a,s){return a.toUpperCase()+s}),Zi=(({hasOwnProperty:e})=>(t,o)=>e.call(t,o))(Object.prototype),rh=Kt("RegExp"),qi=(e,t)=>{const o=Object.getOwnPropertyDescriptors(e),a={};Yo(o,(s,l)=>{let r;(r=t(s,l,e))!==!1&&(a[l]=r||s)}),Object.defineProperties(e,a)},sh=e=>{qi(e,(t,o)=>{if(Rt(e)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;const a=e[o];if(Rt(a)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},ih=(e,t)=>{const o={},a=s=>{s.forEach(l=>{o[l]=!0})};return go(e)?a(e):a(String(e).split(t)),o},lh=()=>{},ch=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Kr="abcdefghijklmnopqrstuvwxyz",$i="0123456789",el={DIGIT:$i,ALPHA:Kr,ALPHA_DIGIT:Kr+Kr.toUpperCase()+$i},dh=(e=16,t=el.ALPHA_DIGIT)=>{let o="";const{length:a}=t;for(;e--;)o+=t[Math.random()*a|0];return o};function uh(e){return!!(e&&Rt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const fh=e=>{const t=new Array(10),o=(a,s)=>{if(Ma(a)){if(t.indexOf(a)>=0)return;if(!("toJSON"in a)){t[s]=a;const l=go(a)?[]:{};return Yo(a,(r,i)=>{const c=o(r,s+1);!Ko(c)&&(l[i]=c)}),t[s]=void 0,l}}return a};return o(e,0)},ph=Kt("AsyncFunction"),X={isArray:go,isArrayBuffer:Xi,isBuffer:Mp,isFormData:Wp,isArrayBufferView:Lp,isString:Fp,isNumber:Ki,isBoolean:Up,isObject:Ma,isPlainObject:La,isUndefined:Ko,isDate:Hp,isFile:Vp,isBlob:jp,isRegExp:rh,isFunction:Rt,isStream:zp,isURLSearchParams:Xp,isTypedArray:eh,isFileList:Gp,forEach:Yo,merge:Xr,extend:Yp,trim:Kp,stripBOM:Jp,inherits:Qp,toFlatObject:Zp,kindOf:Ba,kindOfTest:Kt,endsWith:qp,toArray:$p,forEachEntry:th,matchAll:nh,isHTMLForm:oh,hasOwnProperty:Zi,hasOwnProp:Zi,reduceDescriptors:qi,freezeMethods:sh,toObjectSet:ih,toCamelCase:ah,noop:lh,toFiniteNumber:ch,findKey:Yi,global:Ji,isContextDefined:Qi,ALPHABET:el,generateString:dh,isSpecCompliantForm:uh,toJSONObject:fh,isAsyncFn:ph,isThenable:e=>e&&(Ma(e)||Rt(e))&&Rt(e.then)&&Rt(e.catch)};function Se(e,t,o,a,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),o&&(this.config=o),a&&(this.request=a),s&&(this.response=s)}X.inherits(Se,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:X.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const tl=Se.prototype,nl={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{nl[e]={value:e}}),Object.defineProperties(Se,nl),Object.defineProperty(tl,"isAxiosError",{value:!0}),Se.from=(e,t,o,a,s,l)=>{const r=Object.create(tl);return X.toFlatObject(e,r,function(c){return c!==Error.prototype},i=>i!=="isAxiosError"),Se.call(r,e.message,t,o,a,s),r.cause=e,r.name=e.name,l&&Object.assign(r,l),r};const hh=null;function Yr(e){return X.isPlainObject(e)||X.isArray(e)}function ol(e){return X.endsWith(e,"[]")?e.slice(0,-2):e}function al(e,t,o){return e?e.concat(t).map(function(s,l){return s=ol(s),!o&&l?"["+s+"]":s}).join(o?".":""):t}function mh(e){return X.isArray(e)&&!e.some(Yr)}const gh=X.toFlatObject(X,{},null,function(t){return/^is[A-Z]/.test(t)});function Fa(e,t,o){if(!X.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,o=X.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!X.isUndefined(y[m])});const a=o.metaTokens,s=o.visitor||f,l=o.dots,r=o.indexes,c=(o.Blob||typeof Blob<"u"&&Blob)&&X.isSpecCompliantForm(t);if(!X.isFunction(s))throw new TypeError("visitor must be a function");function d(u){if(u===null)return"";if(X.isDate(u))return u.toISOString();if(!c&&X.isBlob(u))throw new Se("Blob is not supported. Use a Buffer instead.");return X.isArrayBuffer(u)||X.isTypedArray(u)?c&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function f(u,m,y){let v=u;if(u&&!y&&typeof u=="object"){if(X.endsWith(m,"{}"))m=a?m:m.slice(0,-2),u=JSON.stringify(u);else if(X.isArray(u)&&mh(u)||(X.isFileList(u)||X.endsWith(m,"[]"))&&(v=X.toArray(u)))return m=ol(m),v.forEach(function(N,x){!(X.isUndefined(N)||N===null)&&t.append(r===!0?al([m],x,l):r===null?m:m+"[]",d(N))}),!1}return Yr(u)?!0:(t.append(al(y,m,l),d(u)),!1)}const p=[],h=Object.assign(gh,{defaultVisitor:f,convertValue:d,isVisitable:Yr});function g(u,m){if(!X.isUndefined(u)){if(p.indexOf(u)!==-1)throw Error("Circular reference detected in "+m.join("."));p.push(u),X.forEach(u,function(v,b){(!(X.isUndefined(v)||v===null)&&s.call(t,v,X.isString(b)?b.trim():b,m,h))===!0&&g(v,m?m.concat(b):[b])}),p.pop()}}if(!X.isObject(e))throw new TypeError("data must be an object");return g(e),t}function rl(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(a){return t[a]})}function Jr(e,t){this._pairs=[],e&&Fa(e,this,t)}const sl=Jr.prototype;sl.append=function(t,o){this._pairs.push([t,o])},sl.toString=function(t){const o=t?function(a){return t.call(this,a,rl)}:rl;return this._pairs.map(function(s){return o(s[0])+"="+o(s[1])},"").join("&")};function vh(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function il(e,t,o){if(!t)return e;const a=o&&o.encode||vh,s=o&&o.serialize;let l;if(s?l=s(t,o):l=X.isURLSearchParams(t)?t.toString():new Jr(t,o).toString(a),l){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}class bh{constructor(){this.handlers=[]}use(t,o,a){return this.handlers.push({fulfilled:t,rejected:o,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){X.forEach(this.handlers,function(a){a!==null&&t(a)})}}const ll=bh,cl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yh={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Jr,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},dl=typeof window<"u"&&typeof document<"u",Eh=(e=>dl&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),_h=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Yt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:dl,hasStandardBrowserEnv:Eh,hasStandardBrowserWebWorkerEnv:_h},Symbol.toStringTag,{value:"Module"})),...yh};function wh(e,t){return Fa(e,new Yt.classes.URLSearchParams,Object.assign({visitor:function(o,a,s,l){return Yt.isNode&&X.isBuffer(o)?(this.append(a,o.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)}},t))}function Th(e){return X.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function xh(e){const t={},o=Object.keys(e);let a;const s=o.length;let l;for(a=0;a=o.length;return r=!r&&X.isArray(s)?s.length:r,c?(X.hasOwnProp(s,r)?s[r]=[s[r],a]:s[r]=a,!i):((!s[r]||!X.isObject(s[r]))&&(s[r]=[]),t(o,a,s[r],l)&&X.isArray(s[r])&&(s[r]=xh(s[r])),!i)}if(X.isFormData(e)&&X.isFunction(e.entries)){const o={};return X.forEachEntry(e,(a,s)=>{t(Th(a),s,o,0)}),o}return null}function Oh(e,t,o){if(X.isString(e))try{return(t||JSON.parse)(e),X.trim(e)}catch(a){if(a.name!=="SyntaxError")throw a}return(o||JSON.stringify)(e)}const Qr={transitional:cl,adapter:["xhr","http"],transformRequest:[function(t,o){const a=o.getContentType()||"",s=a.indexOf("application/json")>-1,l=X.isObject(t);if(l&&X.isHTMLForm(t)&&(t=new FormData(t)),X.isFormData(t))return s?JSON.stringify(ul(t)):t;if(X.isArrayBuffer(t)||X.isBuffer(t)||X.isStream(t)||X.isFile(t)||X.isBlob(t))return t;if(X.isArrayBufferView(t))return t.buffer;if(X.isURLSearchParams(t))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(l){if(a.indexOf("application/x-www-form-urlencoded")>-1)return wh(t,this.formSerializer).toString();if((i=X.isFileList(t))||a.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Fa(i?{"files[]":t}:t,c&&new c,this.formSerializer)}}return l||s?(o.setContentType("application/json",!1),Oh(t)):t}],transformResponse:[function(t){const o=this.transitional||Qr.transitional,a=o&&o.forcedJSONParsing,s=this.responseType==="json";if(t&&X.isString(t)&&(a&&!this.responseType||s)){const r=!(o&&o.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(i){if(r)throw i.name==="SyntaxError"?Se.from(i,Se.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Yt.classes.FormData,Blob:Yt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};X.forEach(["delete","get","head","post","put","patch"],e=>{Qr.headers[e]={}});const Zr=Qr,Sh=X.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Nh=e=>{const t={};let o,a,s;return e&&e.split(` +`).forEach(function(r){s=r.indexOf(":"),o=r.substring(0,s).trim().toLowerCase(),a=r.substring(s+1).trim(),!(!o||t[o]&&Sh[o])&&(o==="set-cookie"?t[o]?t[o].push(a):t[o]=[a]:t[o]=t[o]?t[o]+", "+a:a)}),t},fl=Symbol("internals");function Jo(e){return e&&String(e).trim().toLowerCase()}function Ua(e){return e===!1||e==null?e:X.isArray(e)?e.map(Ua):String(e)}function Rh(e){const t=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=o.exec(e);)t[a[1]]=a[2];return t}const Ih=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function qr(e,t,o,a,s){if(X.isFunction(a))return a.call(this,t,o);if(s&&(t=o),!!X.isString(t)){if(X.isString(a))return t.indexOf(a)!==-1;if(X.isRegExp(a))return a.test(t)}}function Ch(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,o,a)=>o.toUpperCase()+a)}function kh(e,t){const o=X.toCamelCase(" "+t);["get","set","has"].forEach(a=>{Object.defineProperty(e,a+o,{value:function(s,l,r){return this[a].call(this,t,s,l,r)},configurable:!0})})}class Ha{constructor(t){t&&this.set(t)}set(t,o,a){const s=this;function l(i,c,d){const f=Jo(c);if(!f)throw new Error("header name must be a non-empty string");const p=X.findKey(s,f);(!p||s[p]===void 0||d===!0||d===void 0&&s[p]!==!1)&&(s[p||c]=Ua(i))}const r=(i,c)=>X.forEach(i,(d,f)=>l(d,f,c));return X.isPlainObject(t)||t instanceof this.constructor?r(t,o):X.isString(t)&&(t=t.trim())&&!Ih(t)?r(Nh(t),o):t!=null&&l(o,t,a),this}get(t,o){if(t=Jo(t),t){const a=X.findKey(this,t);if(a){const s=this[a];if(!o)return s;if(o===!0)return Rh(s);if(X.isFunction(o))return o.call(this,s,a);if(X.isRegExp(o))return o.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,o){if(t=Jo(t),t){const a=X.findKey(this,t);return!!(a&&this[a]!==void 0&&(!o||qr(this,this[a],a,o)))}return!1}delete(t,o){const a=this;let s=!1;function l(r){if(r=Jo(r),r){const i=X.findKey(a,r);i&&(!o||qr(a,a[i],i,o))&&(delete a[i],s=!0)}}return X.isArray(t)?t.forEach(l):l(t),s}clear(t){const o=Object.keys(this);let a=o.length,s=!1;for(;a--;){const l=o[a];(!t||qr(this,this[l],l,t,!0))&&(delete this[l],s=!0)}return s}normalize(t){const o=this,a={};return X.forEach(this,(s,l)=>{const r=X.findKey(a,l);if(r){o[r]=Ua(s),delete o[l];return}const i=t?Ch(l):String(l).trim();i!==l&&delete o[l],o[i]=Ua(s),a[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const o=Object.create(null);return X.forEach(this,(a,s)=>{a!=null&&a!==!1&&(o[s]=t&&X.isArray(a)?a.join(", "):a)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,o])=>t+": "+o).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...o){const a=new this(t);return o.forEach(s=>a.set(s)),a}static accessor(t){const a=(this[fl]=this[fl]={accessors:{}}).accessors,s=this.prototype;function l(r){const i=Jo(r);a[i]||(kh(s,r),a[i]=!0)}return X.isArray(t)?t.forEach(l):l(t),this}}Ha.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),X.reduceDescriptors(Ha.prototype,({value:e},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(a){this[o]=a}}}),X.freezeMethods(Ha);const on=Ha;function $r(e,t){const o=this||Zr,a=t||o,s=on.from(a.headers);let l=a.data;return X.forEach(e,function(i){l=i.call(o,l,s.normalize(),t?t.status:void 0)}),s.normalize(),l}function pl(e){return!!(e&&e.__CANCEL__)}function Qo(e,t,o){Se.call(this,e??"canceled",Se.ERR_CANCELED,t,o),this.name="CanceledError"}X.inherits(Qo,Se,{__CANCEL__:!0});function Ah(e,t,o){const a=o.config.validateStatus;!o.status||!a||a(o.status)?e(o):t(new Se("Request failed with status code "+o.status,[Se.ERR_BAD_REQUEST,Se.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}const Dh=Yt.hasStandardBrowserEnv?{write(e,t,o,a,s,l){const r=[e+"="+encodeURIComponent(t)];X.isNumber(o)&&r.push("expires="+new Date(o).toGMTString()),X.isString(a)&&r.push("path="+a),X.isString(s)&&r.push("domain="+s),l===!0&&r.push("secure"),document.cookie=r.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Bh(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ph(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function hl(e,t){return e&&!Bh(t)?Ph(e,t):t}const Mh=Yt.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");let a;function s(l){let r=l;return t&&(o.setAttribute("href",r),r=o.href),o.setAttribute("href",r),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:o.pathname.charAt(0)==="/"?o.pathname:"/"+o.pathname}}return a=s(window.location.href),function(r){const i=X.isString(r)?s(r):r;return i.protocol===a.protocol&&i.host===a.host}}():function(){return function(){return!0}}();function Lh(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Fh(e,t){e=e||10;const o=new Array(e),a=new Array(e);let s=0,l=0,r;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),f=a[l];r||(r=d),o[s]=c,a[s]=d;let p=l,h=0;for(;p!==s;)h+=o[p++],p=p%e;if(s=(s+1)%e,s===l&&(l=(l+1)%e),d-r{const l=s.loaded,r=s.lengthComputable?s.total:void 0,i=l-o,c=a(i),d=l<=r;o=l;const f={loaded:l,total:r,progress:r?l/r:void 0,bytes:i,rate:c||void 0,estimated:c&&r&&d?(r-l)/c:void 0,event:s};f[t?"download":"upload"]=!0,e(f)}}const es={http:hh,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(o,a){let s=e.data;const l=on.from(e.headers).normalize();let{responseType:r,withXSRFToken:i}=e,c;function d(){e.cancelToken&&e.cancelToken.unsubscribe(c),e.signal&&e.signal.removeEventListener("abort",c)}let f;if(X.isFormData(s)){if(Yt.hasStandardBrowserEnv||Yt.hasStandardBrowserWebWorkerEnv)l.setContentType(!1);else if((f=l.getContentType())!==!1){const[m,...y]=f?f.split(";").map(v=>v.trim()).filter(Boolean):[];l.setContentType([m||"multipart/form-data",...y].join("; "))}}let p=new XMLHttpRequest;if(e.auth){const m=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";l.set("Authorization","Basic "+btoa(m+":"+y))}const h=hl(e.baseURL,e.url);p.open(e.method.toUpperCase(),il(h,e.params,e.paramsSerializer),!0),p.timeout=e.timeout;function g(){if(!p)return;const m=on.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),v={data:!r||r==="text"||r==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:m,config:e,request:p};Ah(function(N){o(N),d()},function(N){a(N),d()},v),p=null}if("onloadend"in p?p.onloadend=g:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(g)},p.onabort=function(){p&&(a(new Se("Request aborted",Se.ECONNABORTED,e,p)),p=null)},p.onerror=function(){a(new Se("Network Error",Se.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const v=e.transitional||cl;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),a(new Se(y,v.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,e,p)),p=null},Yt.hasStandardBrowserEnv&&(i&&X.isFunction(i)&&(i=i(e)),i||i!==!1&&Mh(h))){const m=e.xsrfHeaderName&&e.xsrfCookieName&&Dh.read(e.xsrfCookieName);m&&l.set(e.xsrfHeaderName,m)}s===void 0&&l.setContentType(null),"setRequestHeader"in p&&X.forEach(l.toJSON(),function(y,v){p.setRequestHeader(v,y)}),X.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),r&&r!=="json"&&(p.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&p.addEventListener("progress",ml(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",ml(e.onUploadProgress)),(e.cancelToken||e.signal)&&(c=m=>{p&&(a(!m||m.type?new Qo(null,e,p):m),p.abort(),p=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));const u=Lh(h);if(u&&Yt.protocols.indexOf(u)===-1){a(new Se("Unsupported protocol "+u+":",Se.ERR_BAD_REQUEST,e));return}p.send(s||null)})}};X.forEach(es,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const gl=e=>`- ${e}`,Uh=e=>X.isFunction(e)||e===null||e===!1,vl={getAdapter:e=>{e=X.isArray(e)?e:[e];const{length:t}=e;let o,a;const s={};for(let l=0;l`adapter ${i} `+(c===!1?"is not supported by the environment":"is not available in the build"));let r=t?l.length>1?`since : +`+l.map(gl).join(` +`):" "+gl(l[0]):"as no adapter specified";throw new Se("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return a},adapters:es};function ts(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Qo(null,e)}function bl(e){return ts(e),e.headers=on.from(e.headers),e.data=$r.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),vl.getAdapter(e.adapter||Zr.adapter)(e).then(function(a){return ts(e),a.data=$r.call(e,e.transformResponse,a),a.headers=on.from(a.headers),a},function(a){return pl(a)||(ts(e),a&&a.response&&(a.response.data=$r.call(e,e.transformResponse,a.response),a.response.headers=on.from(a.response.headers))),Promise.reject(a)})}const yl=e=>e instanceof on?e.toJSON():e;function vo(e,t){t=t||{};const o={};function a(d,f,p){return X.isPlainObject(d)&&X.isPlainObject(f)?X.merge.call({caseless:p},d,f):X.isPlainObject(f)?X.merge({},f):X.isArray(f)?f.slice():f}function s(d,f,p){if(X.isUndefined(f)){if(!X.isUndefined(d))return a(void 0,d,p)}else return a(d,f,p)}function l(d,f){if(!X.isUndefined(f))return a(void 0,f)}function r(d,f){if(X.isUndefined(f)){if(!X.isUndefined(d))return a(void 0,d)}else return a(void 0,f)}function i(d,f,p){if(p in t)return a(d,f);if(p in e)return a(void 0,d)}const c={url:l,method:l,data:l,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:i,headers:(d,f)=>s(yl(d),yl(f),!0)};return X.forEach(Object.keys(Object.assign({},e,t)),function(f){const p=c[f]||s,h=p(e[f],t[f],f);X.isUndefined(h)&&p!==i||(o[f]=h)}),o}const El="1.6.7",ns={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ns[e]=function(a){return typeof a===e||"a"+(t<1?"n ":" ")+e}});const _l={};ns.transitional=function(t,o,a){function s(l,r){return"[Axios v"+El+"] Transitional option '"+l+"'"+r+(a?". "+a:"")}return(l,r,i)=>{if(t===!1)throw new Se(s(r," has been removed"+(o?" in "+o:"")),Se.ERR_DEPRECATED);return o&&!_l[r]&&(_l[r]=!0,console.warn(s(r," has been deprecated since v"+o+" and will be removed in the near future"))),t?t(l,r,i):!0}};function Hh(e,t,o){if(typeof e!="object")throw new Se("options must be an object",Se.ERR_BAD_OPTION_VALUE);const a=Object.keys(e);let s=a.length;for(;s-- >0;){const l=a[s],r=t[l];if(r){const i=e[l],c=i===void 0||r(i,l,e);if(c!==!0)throw new Se("option "+l+" must be "+c,Se.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new Se("Unknown option "+l,Se.ERR_BAD_OPTION)}}const os={assertOptions:Hh,validators:ns},_n=os.validators;class Va{constructor(t){this.defaults=t,this.interceptors={request:new ll,response:new ll}}async request(t,o){try{return await this._request(t,o)}catch(a){if(a instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const l=s.stack?s.stack.replace(/^.+\n/,""):"";a.stack?l&&!String(a.stack).endsWith(l.replace(/^.+\n.+\n/,""))&&(a.stack+=` +`+l):a.stack=l}throw a}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=vo(this.defaults,o);const{transitional:a,paramsSerializer:s,headers:l}=o;a!==void 0&&os.assertOptions(a,{silentJSONParsing:_n.transitional(_n.boolean),forcedJSONParsing:_n.transitional(_n.boolean),clarifyTimeoutError:_n.transitional(_n.boolean)},!1),s!=null&&(X.isFunction(s)?o.paramsSerializer={serialize:s}:os.assertOptions(s,{encode:_n.function,serialize:_n.function},!0)),o.method=(o.method||this.defaults.method||"get").toLowerCase();let r=l&&X.merge(l.common,l[o.method]);l&&X.forEach(["delete","get","head","post","put","patch","common"],u=>{delete l[u]}),o.headers=on.concat(r,l);const i=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(o)===!1||(c=c&&m.synchronous,i.unshift(m.fulfilled,m.rejected))});const d=[];this.interceptors.response.forEach(function(m){d.push(m.fulfilled,m.rejected)});let f,p=0,h;if(!c){const u=[bl.bind(this),void 0];for(u.unshift.apply(u,i),u.push.apply(u,d),h=u.length,f=Promise.resolve(o);p{if(!a._listeners)return;let l=a._listeners.length;for(;l-- >0;)a._listeners[l](s);a._listeners=null}),this.promise.then=s=>{let l;const r=new Promise(i=>{a.subscribe(i),l=i}).then(s);return r.cancel=function(){a.unsubscribe(l)},r},t(function(l,r,i){a.reason||(a.reason=new Qo(l,r,i),o(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}static source(){let t;return{token:new as(function(s){t=s}),cancel:t}}}const Vh=as;function jh(e){return function(o){return e.apply(null,o)}}function Gh(e){return X.isObject(e)&&e.isAxiosError===!0}const rs={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(rs).forEach(([e,t])=>{rs[t]=e});const zh=rs;function wl(e){const t=new ja(e),o=Wi(ja.prototype.request,t);return X.extend(o,ja.prototype,t,{allOwnKeys:!0}),X.extend(o,t,null,{allOwnKeys:!0}),o.create=function(s){return wl(vo(e,s))},o}const Qe=wl(Zr);Qe.Axios=ja,Qe.CanceledError=Qo,Qe.CancelToken=Vh,Qe.isCancel=pl,Qe.VERSION=El,Qe.toFormData=Fa,Qe.AxiosError=Se,Qe.Cancel=Qe.CanceledError,Qe.all=function(t){return Promise.all(t)},Qe.spread=jh,Qe.isAxiosError=Gh,Qe.mergeConfig=vo,Qe.AxiosHeaders=on,Qe.formToJSON=e=>ul(X.isHTMLForm(e)?new FormData(e):e),Qe.getAdapter=vl.getAdapter,Qe.HttpStatusCode=zh,Qe.default=Qe;const Ga=Qe;function Wh(e){return e==null}var Xh=Wh;const Kh=Hn(Xh);function Tl(){return document.head.querySelector('meta[name="csrf-token"]')?.content??!1}function xl(){const e=Ga.create();return e.defaults.headers.common["X-Requested-With"]="XMLHttpRequest",e.defaults.headers.common["X-CSRF-TOKEN"]=Tl(),e.interceptors.response.use(t=>t,t=>{if(Ga.isCancel(t))return Promise.reject(t);const o=t.response,{status:a,data:{redirect:s}}=o;if(a>=500&&window.Nova.$emit("error",t.response.data.message),a===401){if(!Kh(s)){location.href=s;return}window.Nova.redirectToLogin()}return a===403&&window.Nova.visit("/403"),a===419&&window.Nova.$emit("token-expired"),Promise.reject(t)}),e}function Yh(e){return function(t){return e?.[t]}}var Jh=Yh,Qh=Jh,Zh={"&":"&","<":"<",">":">",'"':""","'":"'"},qh=Qh(Zh),$h=qh;function em(e,t){for(var o=-1,a=e==null?0:e.length,s=Array(a);++o"']/g,hm=RegExp(Il.source);function mm(e){return e=pm(e),e&&hm.test(e)?e.replace(Il,fm):e}var gm=mm;const vm=Hn(gm);function wn(e,t){if(e==null)return e;let o=t?.escape?vm(e):e;return o=o.trim().replace(/ /g," ").replace(/\/{2,}/g,"/"),o}const De=Dr("nova-file-manager/browser",{state:()=>({path:void 0,disk:void 0,disks:void 0,page:void 0,search:void 0,perPage:15,perPageOptions:Gi(10,50,10),view:"grid",modals:[],callback:()=>{},files:void 0,folders:void 0,breadcrumbs:void 0,pagination:void 0,error:void 0,selection:void 0,preview:void 0,limit:void 0,wrapper:void 0,queue:[],multiple:void 0,ready:!1,isField:!1,isFetchingDisks:!1,isFetchingData:!1,isUploading:!1,loadingOperation:void 0,dark:void 0,tour:!1,resource:void 0,resourceId:void 0,attribute:void 0,singleDisk:!1,flexibleGroup:[],fieldInit:void 0,permissions:{folder:{create:!0,rename:!0,delete:!0},file:{upload:!0,rename:!0,edit:!0,delete:!0,unzip:!0}},chunkSize:50*1024*1024,usePintura:!1,pinturaOptions:{},cropperOptions:{}}),actions:{init(){this.ready||(this.syncDarkMode(),this.loadFromLocalStorage(),this.loadFromQueryString(),this.ready=!0)},syncDarkMode(){this.dark===void 0&&(this.dark=document.documentElement.classList.contains("dark")),window.Nova.$on("nova-theme-switched",({theme:e})=>{this.dark=e==="dark"})},loadFromLocalStorage(){if(this.isField)return;["perPage","view","disk"].forEach(t=>{const o=window?.localStorage.getItem(`nova-file-manager/${t}`);o&&o.length&&this.$patch({[t]:o})})},loadFromQueryString(){if(this.isField)return;const e=Object.fromEntries(new URLSearchParams(window?.location.search).entries());for(const[t,o]of Object.entries(e))["path","disk","page","perPage"].includes(t)&&this.$patch({[t]:o});window.location.href.includes("?")||(this.path="/")},saveToLocalStorage({values:e}){if(!(this.isField||!e))for(const[t,o]of Object.entries(e))o&&window?.localStorage.setItem(`nova-file-manager/${t}`,o.toString())},selectFile({file:e}){if(!this.selection){this.selection=[e];return}this.selection.push(e)},deselectFile({file:e}){this.selection=this.selection?.filter(t=>t.id!==e.id)},setSelection({files:e}){this.selection=e},clearSelection(){this.setSelection({files:void 0})},toggleSelection({file:e}){if(this.isSelected(e)){this.deselectFile({file:e});return}this.multiple||this.clearSelection(),this.selectFile({file:e})},openModal({name:e}){this.modals.unshift(e)},closeModal({name:e}){e===jr&&(this.preview=void 0),this.modals=this.modals.filter(t=>t!==e),this.resetError(),this.fixPortal()},setError({attribute:e,bag:t}){this.error={attribute:e,bag:t}},resetError(){this.error=void 0},queueFile({file:e}){this.queue.push({id:e.name,ratio:0,status:null,file:e,isImage:e.type.includes("image")??!1})},clearQueue(){this.queue=[]},updateQueue({id:e,ratio:t=100,status:o=null}){this.queue=this.queue.map(s=>s.id===e?{...s,status:o,ratio:t}:s),this.queue.reduce((s,l)=>s&&l.ratio===100,!0)&&this.queue.length&&setTimeout(async()=>{this.closeModal({name:kp}),this.closeModal({name:Xo}),this.clearQueue(),this.isUploading=!1,await this.data()},1e3)},fixPortal(){this.modals.length||this.preview||setTimeout(()=>{document.documentElement.style.removeProperty("overflow"),document.documentElement.style.removeProperty("padding-right")},200)},setQueryString({parameters:e}){if(this.isField)return;const t=new URLSearchParams(window.location.search),o=window.Nova.app.config.globalProperties.$inertia.page;for(const[a,s]of Object.entries(e)){const l=s?.toString();if(!l){t.delete(a);continue}l?.length>0&&t.set(a,l)}if(o.url!==`${window.location.pathname}?${t}`){o.url=`${window.location.pathname}?${t}`;const a=t.toString().length>0?"?":"";window.history.pushState(o,"",`${window.location.pathname}${a}${t}`)}},reset(){["page","search","path"].forEach(t=>{this.$patch({[t]:null})})},async setPath({path:e}){this.reset(),this.path=e,this.setQueryString({parameters:{page:null,search:null,path:e}})},async setDisk({disk:e}){this.reset(),this.disk=e,this.setQueryString({parameters:{disk:e}}),this.saveToLocalStorage({values:{disk:e,page:null,search:null,path:null}})},async setPerPage({perPage:e}){this.perPage=e,this.page=1,this.setQueryString({parameters:{perPage:e}}),this.saveToLocalStorage({values:{perPage:e}})},async setPage({page:e}){this.page=e,this.setQueryString({parameters:{page:e}})},setView({view:e}){this.view=e,this.saveToLocalStorage({values:{view:e}})},setSearch({search:e}){this.search=e,this.setQueryString({parameters:{search:e}})},setPreview({preview:e}){this.preview=e},async deleteSelectedFiles(){await this.deleteFiles({paths:this.selection?.map(e=>e.path)??[]})},async data(){this.isFetchingData=!0;const{data:e}=await this.get({params:this.payload({path:this.path,page:this.page,perPage:this.perPage,search:this.search})});this.disk=e.disk,this.folders=e.folders,this.breadcrumbs=e.breadcrumbs,this.files=e.files,this.pagination=e.pagination,this.isFetchingData=!1},async getDisks(){this.isFetchingDisks=!0;const{data:e}=await this.get({path:En.DISKS});this.disks=e,this.isFetchingDisks=!1},async createFolder({path:e}){await mo({operation:Xt.CREATE_FOLDER,modal:Lt.CREATE_FOLDER,endpoint:En.CREATE_FOLDER,data:this.payload({path:wn(`${this.path??""}/${wn(e)}`,{escape:!1})})})},async renameFolder({id:e,from:t,to:o}){await mo({operation:Xt.RENAME_FOLDER,modal:`${Lt.RENAME_FOLDER}-${e}`,endpoint:En.RENAME_FOLDER,data:this.payload({path:this.path,from:wn(t,{escape:!1}),to:wn(`${this.path??""}/${wn(o)}`,{escape:!1})})})},async deleteFolder({id:e,path:t}){await mo({operation:Xt.DELETE_FOLDER,modal:`${Lt.DELETE_FOLDER}-${e}`,endpoint:En.DELETE_FOLDER,data:this.payload({path:t})})},upload({files:e}){this.isUploading=!0;const t=new Cp({permanentErrors:[400,404,409,415,419,422,500,501],chunkSize:this.chunkSize,maxChunkRetries:5,chunkRetryInterval:1e3,simultaneousUploads:1,testChunks:!1,target:this.url(En.UPLOAD),query:this.payload({path:this.path??"/"}),headers:{Accept:"application/json","X-CSRF-TOKEN":Tl()}});e.forEach(o=>{t.addFile(o),this.queueFile({file:o})}),t.on("fileAdded",()=>t.upload()),t.on("fileSuccess",o=>{this.updateQueue({id:o.fileName,status:!0})}),t.on("fileProgress",o=>{this.updateQueue({id:o.fileName,ratio:Math.floor(o.progress(!1)*100)})}),t.on("fileError",(o,a)=>{this.updateQueue({id:o.fileName,status:!1}),window.Nova.error(JSON.parse(a).message)})},async renameFile({id:e,from:t,to:o}){await mo({operation:Xt.RENAME_FILE,modal:`${Lt.RENAME_FILE}-${e}`,endpoint:En.RENAME_FILE,data:this.payload({path:this.path,from:wn(t,{escape:!1}),to:wn(`${this.path??""}/${wn(o)}`,{escape:!1})})})},async deleteFiles({paths:e}){e.length!==0&&await mo({operation:Xt.DELETE_FILE,modal:Lt.DELETE_FILES,endpoint:En.DELETE_FILE,data:this.payload({paths:e}),callback:()=>{this.preview=void 0,this.clearSelection()}})},async unzipFile({path:e}){await mo({operation:Xt.UNZIP_FILE,endpoint:En.UNZIP_FILE,data:this.payload({path:e}),callback:()=>{this.preview=void 0,this.clearSelection()}})},async get({path:e,params:t,options:o={}}){return await xl().get(this.url(`/nova-vendor/nova-file-manager${e??""}`),{params:t,...o})},async post({path:e,data:t}){return await xl().post(this.url(`/nova-vendor/nova-file-manager${e??""}`),t)},payload(e){let t={...e,attribute:this.attribute,resource:this.resource,fieldMode:this.isField};if(this.component?.length&&["Nova.Create","Nova.Update"].includes(this.component)){let o;switch(this.component){case"Nova.Create":o="create";break;case"Nova.Update":o="update";break}t={...t,editing:!0,editMode:o}}return this.wrapper?.length&&(t={...t,wrapper:this.wrapper}),this.resourceId&&(t={...t,resourceId:this.resourceId}),this.singleDisk||(t={...t,disk:this.disk}),this.isField&&this.flexibleGroup?.length&&(t={...t,flexible:this.flexibleGroup.join(".")}),t},url(e){const t=this.isField?`/${this.resource}`:"";return`${e}${t}`.replace("//","/")},openBrowser({initialFiles:e,multiple:t,limit:o,wrapper:a,resource:s,resourceId:l,attribute:r,singleDisk:i,permissions:c,flexibleGroup:d,callback:f,usePintura:p,pinturaOptions:h,cropperOptions:g,component:u}){this.isField=!0,this.multiple=t,this.limit=o,this.wrapper=a,this.resource=s,this.resourceId=l,this.attribute=r,this.singleDisk=i,this.flexibleGroup=d,this.callback=f,this.usePintura=p,this.pinturaOptions=h,this.cropperOptions=g,this.error=void 0,this.permissions=c,this.disk=void 0,this.component=u,this.openModal({name:Gr}),this.setSelection({files:[...e]})},closeBrowser(){this.isField=!1,this.multiple=void 0,this.limit=void 0,this.wrapper=void 0,this.resource=void 0,this.resourceId=void 0,this.attribute=void 0,this.singleDisk=!1,this.flexibleGroup=[],this.callback=void 0,this.usePintura=!1,this.pinturaOptions={},this.cropperOptions={},this.error=void 0,this.permissions=void 0,this.disk=void 0,this.setSelection({files:[]}),this.closeModal({name:Gr})},confirm(){this.callback&&this.callback(this.selection),this.closeBrowser()},prepareTool({singleDisk:e,permissions:t,tour:o,usePintura:a,pinturaOptions:s,cropperOptions:l}){this.init(),this.clearSelection(),this.limit=void 0,this.isField=!1,this.multiple=!0,this.singleDisk=e,this.permissions=t,this.tour=o,this.usePintura=a,this.pinturaOptions=s,this.cropperOptions=l,this.error=void 0}},getters:{isOpen(){return e=>e===jr?!!this.preview:this.modals.includes(e)},isSelected(){return e=>!!this.selection?.find(t=>t.id===e.id)},isBrowserOpen(e){return e.modals.includes(Gr)}}}),Cl=n.defineComponent({__name:"FieldCard",props:{file:{},detail:{type:Boolean,default:!1},field:{},onDeselect:{}},setup(e){const t=De(),o=e,a=n.computed(()=>t.singleDisk),s=r=>t.preview=r,l=r=>{o.detail&&r.exists&&s(r)};return(r,i)=>(n.openBlock(),n.createBlock(Ur,{file:r.file,selected:!1,"on-deselect":r.onDeselect,"single-disk":a.value,"field-mode":!0,onClick:i[0]||(i[0]=n.withModifiers(c=>l(r.file),["prevent","stop"]))},null,8,["file","on-deselect","single-disk"]))}});function bo(e,t,o){let a=o.initialDeps??[],s;return()=>{var l,r,i,c;let d;o.key&&((l=o.debug)!=null&&l.call(o))&&(d=Date.now());const f=e();if(!(f.length!==a.length||f.some((g,u)=>a[u]!==g)))return s;a=f;let h;if(o.key&&((r=o.debug)!=null&&r.call(o))&&(h=Date.now()),s=t(...f),o.key&&((i=o.debug)!=null&&i.call(o))){const g=Math.round((Date.now()-d)*100)/100,u=Math.round((Date.now()-h)*100)/100,m=u/16,y=(v,b)=>{for(v=String(v);v.lengthMath.abs(e-t)<1,ym=e=>e,Em=e=>{const t=Math.max(e.startIndex-e.overscan,0),o=Math.min(e.endIndex+e.overscan,e.count-1),a=[];for(let s=t;s<=o;s++)a.push(s);return a},_m=(e,t)=>{const o=e.scrollElement;if(!o)return;const a=i=>{const{width:r,height:l}=i;t({width:Math.round(r),height:Math.round(l)})};if(a(o.getBoundingClientRect()),typeof ResizeObserver>"u")return()=>{};const s=new ResizeObserver(i=>{const r=i[0];if(r?.borderBoxSize){const l=r.borderBoxSize[0];if(l){a({width:l.inlineSize,height:l.blockSize});return}}a(o.getBoundingClientRect())});return s.observe(o,{box:"border-box"}),()=>{s.unobserve(o)}},wm=(e,t)=>{const o=e.scrollElement;if(!o)return;const a=()=>{t(o[e.options.horizontal?"scrollLeft":"scrollTop"])};return a(),o.addEventListener("scroll",a,{passive:!0}),()=>{o.removeEventListener("scroll",a)}},Tm=(e,t,o)=>{if(t?.borderBoxSize){const a=t.borderBoxSize[0];if(a)return Math.round(a[o.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[o.options.horizontal?"width":"height"])},xm=(e,{adjustments:t=0,behavior:o},a)=>{var s,i;const r=e+t;(i=(s=a.scrollElement)==null?void 0:s.scrollTo)==null||i.call(s,{[a.options.horizontal?"left":"top"]:r,behavior:o})};class Om{constructor(t){this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.isScrollingTimeoutId=null,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let o=null;const a=()=>o||(typeof ResizeObserver<"u"?o=new ResizeObserver(s=>{s.forEach(i=>{this._measureElement(i.target,i)})}):null);return{disconnect:()=>{var s;return(s=a())==null?void 0:s.disconnect()},observe:s=>{var i;return(i=a())==null?void 0:i.observe(s,{box:"border-box"})},unobserve:s=>{var i;return(i=a())==null?void 0:i.unobserve(s)}}})(),this.range=null,this.setOptions=o=>{Object.entries(o).forEach(([a,s])=>{typeof s>"u"&&delete o[a]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:ym,rangeExtractor:Em,onChange:()=>{},measureElement:Tm,initialRect:{width:0,height:0},scrollMargin:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,...o}},this.notify=o=>{var a,s;(s=(a=this.options).onChange)==null||s.call(a,this,o)},this.maybeNotify=bo(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),o=>{this.notify(o)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(o=>o()),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{const o=this.options.getScrollElement();this.scrollElement!==o&&(this.cleanup(),this.scrollElement=o,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,a=>{this.scrollRect=a,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,a=>{this.scrollAdjustments=0,this.scrollOffset!==a&&(this.isScrollingTimeoutId!==null&&(clearTimeout(this.isScrollingTimeoutId),this.isScrollingTimeoutId=null),this.isScrolling=!0,this.scrollDirection=this.scrollOffset{this.isScrollingTimeoutId=null,this.isScrolling=!1,this.scrollDirection=null,this.maybeNotify()},this.options.scrollingDelay))})))},this.getSize=()=>this.scrollRect[this.options.horizontal?"width":"height"],this.memoOptions=bo(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey],(o,a,s,i)=>(this.pendingMeasuredCacheIndexes=[],{count:o,paddingStart:a,scrollMargin:s,getItemKey:i}),{key:!1}),this.getFurthestMeasurement=(o,a)=>{const s=new Map,i=new Map;for(let r=a-1;r>=0;r--){const l=o[r];if(s.has(l.lane))continue;const c=i.get(l.lane);if(c==null||l.end>c.end?i.set(l.lane,l):l.endr.end===l.end?r.index-l.index:r.end-l.end)[0]:void 0},this.getMeasurements=bo(()=>[this.memoOptions(),this.itemSizeCache],({count:o,paddingStart:a,scrollMargin:s,getItemKey:i},r)=>{const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,l);for(let d=l;dthis.options.debug}),this.calculateRange=bo(()=>[this.getMeasurements(),this.getSize(),this.scrollOffset],(o,a,s)=>this.range=o.length>0&&a>0?Sm({measurements:o,outerSize:a,scrollOffset:s}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=bo(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(o,a,s,i)=>a===null?[]:o({...a,overscan:s,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=o=>{const a=this.options.indexAttribute,s=o.getAttribute(a);return s?parseInt(s,10):(console.warn(`Missing attribute name '${a}={index}' on measured element.`),-1)},this._measureElement=(o,a)=>{const s=this.measurementsCache[this.indexFromElement(o)];if(!s||!o.isConnected){this.measureElementCache.forEach((l,c)=>{l===o&&(this.observer.unobserve(o),this.measureElementCache.delete(c))});return}const i=this.measureElementCache.get(s.key);i!==o&&(i&&this.observer.unobserve(i),this.observer.observe(o),this.measureElementCache.set(s.key,o));const r=this.options.measureElement(o,a,this);this.resizeItem(s,r)},this.resizeItem=(o,a)=>{const s=this.itemSizeCache.get(o.key)??o.size,i=a-s;i!==0&&(o.start{o&&this._measureElement(o,void 0)},this.getVirtualItems=bo(()=>[this.getIndexes(),this.getMeasurements()],(o,a)=>{const s=[];for(let i=0,r=o.length;ithis.options.debug}),this.getVirtualItemForOffset=o=>{const a=this.getMeasurements();return ss(a[kl(0,a.length-1,s=>ss(a[s]).start,o)])},this.getOffsetForAlignment=(o,a)=>{const s=this.getSize();a==="auto"&&(o<=this.scrollOffset?a="start":o>=this.scrollOffset+s?a="end":a="start"),a==="start"?o=o:a==="end"?o=o-s:a==="center"&&(o=o-s/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-this.getSize();return Math.max(Math.min(l,o),0)},this.getOffsetForIndex=(o,a="auto")=>{o=Math.max(0,Math.min(o,this.options.count-1));const s=ss(this.getMeasurements()[o]);if(a==="auto")if(s.end>=this.scrollOffset+this.getSize()-this.options.scrollPaddingEnd)a="end";else if(s.start<=this.scrollOffset+this.options.scrollPaddingStart)a="start";else return[this.scrollOffset,a];const i=a==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,a),a]},this.isDynamicMode=()=>this.measureElementCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&(clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(o,{align:a="start",behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(o,a),{adjustments:void 0,behavior:s})},this.scrollToIndex=(o,{align:a="auto",behavior:s}={})=>{o=Math.max(0,Math.min(o,this.options.count-1)),this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const[i,r]=this.getOffsetForIndex(o,a);this._scrollToOffset(i,{adjustments:void 0,behavior:s}),s!=="smooth"&&this.isDynamicMode()&&(this.scrollToIndexTimeoutId=setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.measureElementCache.has(this.options.getItemKey(o))){const[c]=this.getOffsetForIndex(o,r);bm(c,this.scrollOffset)||this.scrollToIndex(o,{align:r,behavior:s})}else this.scrollToIndex(o,{align:r,behavior:s})}))},this.scrollBy=(o,{behavior:a}={})=>{this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.scrollOffset+o,{adjustments:void 0,behavior:a})},this.getTotalSize=()=>{var o;const a=this.getMeasurements();let s;return a.length===0?s=this.options.paddingStart:s=this.options.lanes===1?((o=a[a.length-1])==null?void 0:o.end)??0:Math.max(...a.slice(-this.options.lanes).map(i=>i.end)),s-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(o,{adjustments:a,behavior:s})=>{this.options.scrollToFn(o,{behavior:s,adjustments:a},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(o=>{this.itemSizeCache.set(o.key,o.size)}),this.maybeNotify()}}const kl=(e,t,o,a)=>{for(;e<=t;){const s=(e+t)/2|0,i=o(s);if(ia)t=s-1;else return s}return e>0?e-1:0};function Sm({measurements:e,outerSize:t,scrollOffset:o}){const a=e.length-1,i=kl(0,a,l=>e[l].start,o);let r=i;for(;rn.unref(e).getScrollElement(),s=>{s&&t._willUpdate()},{immediate:!0}),n.watch(()=>n.unref(e),s=>{t.setOptions({...s,onChange:(i,r)=>{var l;n.triggerRef(o),(l=s.onChange)==null||l.call(s,i,r)}}),t._willUpdate(),n.triggerRef(o)},{immediate:!0}),n.onScopeDispose(a),o}function Rm(e){return Nm(n.computed(()=>({observeElementRect:_m,observeElementOffset:wm,scrollToFn:xm,...n.unref(e)})))}function Im(e,t,o){let a=n.ref(o?.value),s=n.computed(()=>e.value!==void 0);return[n.computed(()=>s.value?e.value:a.value),function(i){return s.value||(a.value=i),t?.(i)}]}let Cm=Symbol("headlessui.useid"),km=0;function lt(){return n.inject(Cm,()=>`${++km}`)()}function ae(e){var t;if(e==null||e.value==null)return null;let o=(t=e.value.$el)!=null?t:e.value;return o instanceof Node?o:null}function $e(e,t,...o){if(e in t){let s=t[e];return typeof s=="function"?s(...o):s}let a=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(s=>`"${s}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,$e),a}var Am=Object.defineProperty,Dm=(e,t,o)=>t in e?Am(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Al=(e,t,o)=>(Dm(e,typeof t!="symbol"?t+"":t,o),o);let Bm=class{constructor(){Al(this,"current",this.detect()),Al(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},Zo=new Bm;function an(e){if(Zo.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=ae(e);if(t)return t.ownerDocument}return document}let is=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Jt=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Jt||{}),Dl=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Dl||{}),Pm=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Pm||{});function Bl(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(is)).sort((t,o)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(o.tabIndex||Number.MAX_SAFE_INTEGER)))}var ls=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(ls||{});function cs(e,t=0){var o;return e===((o=an(e))==null?void 0:o.body)?!1:$e(t,{0(){return e.matches(is)},1(){let a=e;for(;a!==null;){if(a.matches(is))return!0;a=a.parentElement}return!1}})}function Pl(e){let t=an(e);n.nextTick(()=>{t&&!cs(t.activeElement,0)&&Tn(e)})}var Mm=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Mm||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Tn(e){e?.focus({preventScroll:!0})}let Lm=["textarea","input"].join(",");function Fm(e){var t,o;return(o=(t=e?.matches)==null?void 0:t.call(e,Lm))!=null?o:!1}function ds(e,t=o=>o){return e.slice().sort((o,a)=>{let s=t(o),i=t(a);if(s===null||i===null)return 0;let r=s.compareDocumentPosition(i);return r&Node.DOCUMENT_POSITION_FOLLOWING?-1:r&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Um(e,t){return qo(Bl(),t,{relativeTo:e})}function qo(e,t,{sorted:o=!0,relativeTo:a=null,skipElements:s=[]}={}){var i;let r=(i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e?.ownerDocument)!=null?i:document,l=Array.isArray(e)?o?ds(e):e:Bl(e);s.length>0&&l.length>1&&(l=l.filter(u=>!s.includes(u))),a=a??r.activeElement;let c=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,l.indexOf(a))-1;if(t&4)return Math.max(0,l.indexOf(a))+1;if(t&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),f=t&32?{preventScroll:!0}:{},p=0,h=l.length,g;do{if(p>=h||p+h<=0)return 0;let u=d+p;if(t&16)u=(u+h)%h;else{if(u<0)return 3;if(u>=h)return 1}g=l[u],g?.focus(f),p+=c}while(g!==r.activeElement);return t&6&&Fm(g)&&g.select(),2}function Ml(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Hm(){return/Android/gi.test(window.navigator.userAgent)}function Ll(){return Ml()||Hm()}function za(e,t,o){Zo.isServer||n.watchEffect(a=>{document.addEventListener(e,t,o),a(()=>document.removeEventListener(e,t,o))})}function Fl(e,t,o){Zo.isServer||n.watchEffect(a=>{window.addEventListener(e,t,o),a(()=>window.removeEventListener(e,t,o))})}function us(e,t,o=n.computed(()=>!0)){function a(i,r){if(!o.value||i.defaultPrevented)return;let l=r(i);if(l===null||!l.getRootNode().contains(l))return;let c=function d(f){return typeof f=="function"?d(f()):Array.isArray(f)||f instanceof Set?f:[f]}(e);for(let d of c){if(d===null)continue;let f=d instanceof HTMLElement?d:ae(d);if(f!=null&&f.contains(l)||i.composed&&i.composedPath().includes(f))return}return!cs(l,ls.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}let s=n.ref(null);za("pointerdown",i=>{var r,l;o.value&&(s.value=((l=(r=i.composedPath)==null?void 0:r.call(i))==null?void 0:l[0])||i.target)},!0),za("mousedown",i=>{var r,l;o.value&&(s.value=((l=(r=i.composedPath)==null?void 0:r.call(i))==null?void 0:l[0])||i.target)},!0),za("click",i=>{Ll()||s.value&&(a(i,()=>s.value),s.value=null)},!0),za("touchend",i=>a(i,()=>i.target instanceof HTMLElement?i.target:null),!0),Fl("blur",i=>a(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Ul(e,t){if(e)return e;let o=t??"button";if(typeof o=="string"&&o.toLowerCase()==="button")return"button"}function fs(e,t){let o=n.ref(Ul(e.value.type,e.value.as));return n.onMounted(()=>{o.value=Ul(e.value.type,e.value.as)}),n.watchEffect(()=>{var a;o.value||ae(t)&&ae(t)instanceof HTMLButtonElement&&!((a=ae(t))!=null&&a.hasAttribute("type"))&&(o.value="button")}),o}function Hl(e){return[e.screenX,e.screenY]}function Vl(){let e=n.ref([-1,-1]);return{wasMoved(t){let o=Hl(t);return e.value[0]===o[0]&&e.value[1]===o[1]?!1:(e.value=o,!0)},update(t){e.value=Hl(t)}}}function jl({container:e,accept:t,walk:o,enabled:a}){n.watchEffect(()=>{let s=e.value;if(!s||a!==void 0&&!a.value)return;let i=an(e);if(!i)return;let r=Object.assign(c=>t(c),{acceptNode:t}),l=i.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,r,!1);for(;l.nextNode();)o(l.currentNode)})}var It=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(It||{}),xn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(xn||{});function Pe({visible:e=!0,features:t=0,ourProps:o,theirProps:a,...s}){var i;let r=zl(a,o),l=Object.assign(s,{props:r});if(e||t&2&&r.static)return ps(l);if(t&1){let c=(i=r.unmount)==null||i?0:1;return $e(c,{0(){return null},1(){return ps({...s,props:{...r,hidden:!0,style:{display:"none"}}})}})}return ps(l)}function ps({props:e,attrs:t,slots:o,slot:a,name:s}){var i,r;let{as:l,...c}=$o(e,["unmount","static"]),d=(i=o.default)==null?void 0:i.call(o,a),f={};if(a){let p=!1,h=[];for(let[g,u]of Object.entries(a))typeof u=="boolean"&&(p=!0),u===!0&&h.push(g);p&&(f["data-headlessui-state"]=h.join(" "))}if(l==="template"){if(d=Gl(d??[]),Object.keys(c).length>0||Object.keys(t).length>0){let[p,...h]=d??[];if(!jm(p)||h.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${s} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(c).concat(Object.keys(t)).map(m=>m.trim()).filter((m,y,v)=>v.indexOf(m)===y).sort((m,y)=>m.localeCompare(y)).map(m=>` - ${m}`).join(` + color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,o?.key)}return(c=o?.onChange)==null||c.call(o,s),s}}function ss(e,t){if(e===void 0)throw new Error(`Unexpected undefined${t?`: ${t}`:""}`);return e}const bm=(e,t)=>Math.abs(e-t)<1,ym=e=>e,Em=e=>{const t=Math.max(e.startIndex-e.overscan,0),o=Math.min(e.endIndex+e.overscan,e.count-1),a=[];for(let s=t;s<=o;s++)a.push(s);return a},_m=(e,t)=>{const o=e.scrollElement;if(!o)return;const a=l=>{const{width:r,height:i}=l;t({width:Math.round(r),height:Math.round(i)})};if(a(o.getBoundingClientRect()),typeof ResizeObserver>"u")return()=>{};const s=new ResizeObserver(l=>{const r=l[0];if(r?.borderBoxSize){const i=r.borderBoxSize[0];if(i){a({width:i.inlineSize,height:i.blockSize});return}}a(o.getBoundingClientRect())});return s.observe(o,{box:"border-box"}),()=>{s.unobserve(o)}},wm=(e,t)=>{const o=e.scrollElement;if(!o)return;const a=()=>{t(o[e.options.horizontal?"scrollLeft":"scrollTop"])};return a(),o.addEventListener("scroll",a,{passive:!0}),()=>{o.removeEventListener("scroll",a)}},Tm=(e,t,o)=>{if(t?.borderBoxSize){const a=t.borderBoxSize[0];if(a)return Math.round(a[o.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[o.options.horizontal?"width":"height"])},xm=(e,{adjustments:t=0,behavior:o},a)=>{var s,l;const r=e+t;(l=(s=a.scrollElement)==null?void 0:s.scrollTo)==null||l.call(s,{[a.options.horizontal?"left":"top"]:r,behavior:o})};class Om{constructor(t){this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.isScrollingTimeoutId=null,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let o=null;const a=()=>o||(typeof ResizeObserver<"u"?o=new ResizeObserver(s=>{s.forEach(l=>{this._measureElement(l.target,l)})}):null);return{disconnect:()=>{var s;return(s=a())==null?void 0:s.disconnect()},observe:s=>{var l;return(l=a())==null?void 0:l.observe(s,{box:"border-box"})},unobserve:s=>{var l;return(l=a())==null?void 0:l.unobserve(s)}}})(),this.range=null,this.setOptions=o=>{Object.entries(o).forEach(([a,s])=>{typeof s>"u"&&delete o[a]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:ym,rangeExtractor:Em,onChange:()=>{},measureElement:Tm,initialRect:{width:0,height:0},scrollMargin:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,...o}},this.notify=o=>{var a,s;(s=(a=this.options).onChange)==null||s.call(a,this,o)},this.maybeNotify=bo(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),o=>{this.notify(o)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(o=>o()),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{const o=this.options.getScrollElement();this.scrollElement!==o&&(this.cleanup(),this.scrollElement=o,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,a=>{this.scrollRect=a,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,a=>{this.scrollAdjustments=0,this.scrollOffset!==a&&(this.isScrollingTimeoutId!==null&&(clearTimeout(this.isScrollingTimeoutId),this.isScrollingTimeoutId=null),this.isScrolling=!0,this.scrollDirection=this.scrollOffset{this.isScrollingTimeoutId=null,this.isScrolling=!1,this.scrollDirection=null,this.maybeNotify()},this.options.scrollingDelay))})))},this.getSize=()=>this.scrollRect[this.options.horizontal?"width":"height"],this.memoOptions=bo(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey],(o,a,s,l)=>(this.pendingMeasuredCacheIndexes=[],{count:o,paddingStart:a,scrollMargin:s,getItemKey:l}),{key:!1}),this.getFurthestMeasurement=(o,a)=>{const s=new Map,l=new Map;for(let r=a-1;r>=0;r--){const i=o[r];if(s.has(i.lane))continue;const c=l.get(i.lane);if(c==null||i.end>c.end?l.set(i.lane,i):i.endr.end===i.end?r.index-i.index:r.end-i.end)[0]:void 0},this.getMeasurements=bo(()=>[this.memoOptions(),this.itemSizeCache],({count:o,paddingStart:a,scrollMargin:s,getItemKey:l},r)=>{const i=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,i);for(let d=i;dthis.options.debug}),this.calculateRange=bo(()=>[this.getMeasurements(),this.getSize(),this.scrollOffset],(o,a,s)=>this.range=o.length>0&&a>0?Sm({measurements:o,outerSize:a,scrollOffset:s}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=bo(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(o,a,s,l)=>a===null?[]:o({...a,overscan:s,count:l}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=o=>{const a=this.options.indexAttribute,s=o.getAttribute(a);return s?parseInt(s,10):(console.warn(`Missing attribute name '${a}={index}' on measured element.`),-1)},this._measureElement=(o,a)=>{const s=this.measurementsCache[this.indexFromElement(o)];if(!s||!o.isConnected){this.measureElementCache.forEach((i,c)=>{i===o&&(this.observer.unobserve(o),this.measureElementCache.delete(c))});return}const l=this.measureElementCache.get(s.key);l!==o&&(l&&this.observer.unobserve(l),this.observer.observe(o),this.measureElementCache.set(s.key,o));const r=this.options.measureElement(o,a,this);this.resizeItem(s,r)},this.resizeItem=(o,a)=>{const s=this.itemSizeCache.get(o.key)??o.size,l=a-s;l!==0&&(o.start{o&&this._measureElement(o,void 0)},this.getVirtualItems=bo(()=>[this.getIndexes(),this.getMeasurements()],(o,a)=>{const s=[];for(let l=0,r=o.length;lthis.options.debug}),this.getVirtualItemForOffset=o=>{const a=this.getMeasurements();return ss(a[kl(0,a.length-1,s=>ss(a[s]).start,o)])},this.getOffsetForAlignment=(o,a)=>{const s=this.getSize();a==="auto"&&(o<=this.scrollOffset?a="start":o>=this.scrollOffset+s?a="end":a="start"),a==="start"?o=o:a==="end"?o=o-s:a==="center"&&(o=o-s/2);const l=this.options.horizontal?"scrollWidth":"scrollHeight",i=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[l]:this.scrollElement[l]:0)-this.getSize();return Math.max(Math.min(i,o),0)},this.getOffsetForIndex=(o,a="auto")=>{o=Math.max(0,Math.min(o,this.options.count-1));const s=ss(this.getMeasurements()[o]);if(a==="auto")if(s.end>=this.scrollOffset+this.getSize()-this.options.scrollPaddingEnd)a="end";else if(s.start<=this.scrollOffset+this.options.scrollPaddingStart)a="start";else return[this.scrollOffset,a];const l=a==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,a),a]},this.isDynamicMode=()=>this.measureElementCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&(clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(o,{align:a="start",behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(o,a),{adjustments:void 0,behavior:s})},this.scrollToIndex=(o,{align:a="auto",behavior:s}={})=>{o=Math.max(0,Math.min(o,this.options.count-1)),this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const[l,r]=this.getOffsetForIndex(o,a);this._scrollToOffset(l,{adjustments:void 0,behavior:s}),s!=="smooth"&&this.isDynamicMode()&&(this.scrollToIndexTimeoutId=setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.measureElementCache.has(this.options.getItemKey(o))){const[c]=this.getOffsetForIndex(o,r);bm(c,this.scrollOffset)||this.scrollToIndex(o,{align:r,behavior:s})}else this.scrollToIndex(o,{align:r,behavior:s})}))},this.scrollBy=(o,{behavior:a}={})=>{this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.scrollOffset+o,{adjustments:void 0,behavior:a})},this.getTotalSize=()=>{var o;const a=this.getMeasurements();let s;return a.length===0?s=this.options.paddingStart:s=this.options.lanes===1?((o=a[a.length-1])==null?void 0:o.end)??0:Math.max(...a.slice(-this.options.lanes).map(l=>l.end)),s-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(o,{adjustments:a,behavior:s})=>{this.options.scrollToFn(o,{behavior:s,adjustments:a},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(o=>{this.itemSizeCache.set(o.key,o.size)}),this.maybeNotify()}}const kl=(e,t,o,a)=>{for(;e<=t;){const s=(e+t)/2|0,l=o(s);if(la)t=s-1;else return s}return e>0?e-1:0};function Sm({measurements:e,outerSize:t,scrollOffset:o}){const a=e.length-1,l=kl(0,a,i=>e[i].start,o);let r=l;for(;rn.unref(e).getScrollElement(),s=>{s&&t._willUpdate()},{immediate:!0}),n.watch(()=>n.unref(e),s=>{t.setOptions({...s,onChange:(l,r)=>{var i;n.triggerRef(o),(i=s.onChange)==null||i.call(s,l,r)}}),t._willUpdate(),n.triggerRef(o)},{immediate:!0}),n.onScopeDispose(a),o}function Rm(e){return Nm(n.computed(()=>({observeElementRect:_m,observeElementOffset:wm,scrollToFn:xm,...n.unref(e)})))}function Im(e,t,o){let a=n.ref(o?.value),s=n.computed(()=>e.value!==void 0);return[n.computed(()=>s.value?e.value:a.value),function(l){return s.value||(a.value=l),t?.(l)}]}let Cm=Symbol("headlessui.useid"),km=0;function lt(){return n.inject(Cm,()=>`${++km}`)()}function ae(e){var t;if(e==null||e.value==null)return null;let o=(t=e.value.$el)!=null?t:e.value;return o instanceof Node?o:null}function $e(e,t,...o){if(e in t){let s=t[e];return typeof s=="function"?s(...o):s}let a=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(s=>`"${s}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,$e),a}var Am=Object.defineProperty,Dm=(e,t,o)=>t in e?Am(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Al=(e,t,o)=>(Dm(e,typeof t!="symbol"?t+"":t,o),o);let Bm=class{constructor(){Al(this,"current",this.detect()),Al(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},Zo=new Bm;function an(e){if(Zo.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=ae(e);if(t)return t.ownerDocument}return document}let is=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Jt=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Jt||{}),Dl=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Dl||{}),Pm=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Pm||{});function Bl(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(is)).sort((t,o)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(o.tabIndex||Number.MAX_SAFE_INTEGER)))}var ls=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(ls||{});function cs(e,t=0){var o;return e===((o=an(e))==null?void 0:o.body)?!1:$e(t,{0(){return e.matches(is)},1(){let a=e;for(;a!==null;){if(a.matches(is))return!0;a=a.parentElement}return!1}})}function Pl(e){let t=an(e);n.nextTick(()=>{t&&!cs(t.activeElement,0)&&Tn(e)})}var Mm=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Mm||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Tn(e){e?.focus({preventScroll:!0})}let Lm=["textarea","input"].join(",");function Fm(e){var t,o;return(o=(t=e?.matches)==null?void 0:t.call(e,Lm))!=null?o:!1}function ds(e,t=o=>o){return e.slice().sort((o,a)=>{let s=t(o),l=t(a);if(s===null||l===null)return 0;let r=s.compareDocumentPosition(l);return r&Node.DOCUMENT_POSITION_FOLLOWING?-1:r&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Um(e,t){return qo(Bl(),t,{relativeTo:e})}function qo(e,t,{sorted:o=!0,relativeTo:a=null,skipElements:s=[]}={}){var l;let r=(l=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e?.ownerDocument)!=null?l:document,i=Array.isArray(e)?o?ds(e):e:Bl(e);s.length>0&&i.length>1&&(i=i.filter(u=>!s.includes(u))),a=a??r.activeElement;let c=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,i.indexOf(a))-1;if(t&4)return Math.max(0,i.indexOf(a))+1;if(t&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),f=t&32?{preventScroll:!0}:{},p=0,h=i.length,g;do{if(p>=h||p+h<=0)return 0;let u=d+p;if(t&16)u=(u+h)%h;else{if(u<0)return 3;if(u>=h)return 1}g=i[u],g?.focus(f),p+=c}while(g!==r.activeElement);return t&6&&Fm(g)&&g.select(),2}function Ml(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Hm(){return/Android/gi.test(window.navigator.userAgent)}function Ll(){return Ml()||Hm()}function za(e,t,o){Zo.isServer||n.watchEffect(a=>{document.addEventListener(e,t,o),a(()=>document.removeEventListener(e,t,o))})}function Fl(e,t,o){Zo.isServer||n.watchEffect(a=>{window.addEventListener(e,t,o),a(()=>window.removeEventListener(e,t,o))})}function us(e,t,o=n.computed(()=>!0)){function a(l,r){if(!o.value||l.defaultPrevented)return;let i=r(l);if(i===null||!i.getRootNode().contains(i))return;let c=function d(f){return typeof f=="function"?d(f()):Array.isArray(f)||f instanceof Set?f:[f]}(e);for(let d of c){if(d===null)continue;let f=d instanceof HTMLElement?d:ae(d);if(f!=null&&f.contains(i)||l.composed&&l.composedPath().includes(f))return}return!cs(i,ls.Loose)&&i.tabIndex!==-1&&l.preventDefault(),t(l,i)}let s=n.ref(null);za("pointerdown",l=>{var r,i;o.value&&(s.value=((i=(r=l.composedPath)==null?void 0:r.call(l))==null?void 0:i[0])||l.target)},!0),za("mousedown",l=>{var r,i;o.value&&(s.value=((i=(r=l.composedPath)==null?void 0:r.call(l))==null?void 0:i[0])||l.target)},!0),za("click",l=>{Ll()||s.value&&(a(l,()=>s.value),s.value=null)},!0),za("touchend",l=>a(l,()=>l.target instanceof HTMLElement?l.target:null),!0),Fl("blur",l=>a(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Ul(e,t){if(e)return e;let o=t??"button";if(typeof o=="string"&&o.toLowerCase()==="button")return"button"}function fs(e,t){let o=n.ref(Ul(e.value.type,e.value.as));return n.onMounted(()=>{o.value=Ul(e.value.type,e.value.as)}),n.watchEffect(()=>{var a;o.value||ae(t)&&ae(t)instanceof HTMLButtonElement&&!((a=ae(t))!=null&&a.hasAttribute("type"))&&(o.value="button")}),o}function Hl(e){return[e.screenX,e.screenY]}function Vl(){let e=n.ref([-1,-1]);return{wasMoved(t){let o=Hl(t);return e.value[0]===o[0]&&e.value[1]===o[1]?!1:(e.value=o,!0)},update(t){e.value=Hl(t)}}}function jl({container:e,accept:t,walk:o,enabled:a}){n.watchEffect(()=>{let s=e.value;if(!s||a!==void 0&&!a.value)return;let l=an(e);if(!l)return;let r=Object.assign(c=>t(c),{acceptNode:t}),i=l.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,r,!1);for(;i.nextNode();)o(i.currentNode)})}var It=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(It||{}),xn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(xn||{});function Pe({visible:e=!0,features:t=0,ourProps:o,theirProps:a,...s}){var l;let r=zl(a,o),i=Object.assign(s,{props:r});if(e||t&2&&r.static)return ps(i);if(t&1){let c=(l=r.unmount)==null||l?0:1;return $e(c,{0(){return null},1(){return ps({...s,props:{...r,hidden:!0,style:{display:"none"}}})}})}return ps(i)}function ps({props:e,attrs:t,slots:o,slot:a,name:s}){var l,r;let{as:i,...c}=$o(e,["unmount","static"]),d=(l=o.default)==null?void 0:l.call(o,a),f={};if(a){let p=!1,h=[];for(let[g,u]of Object.entries(a))typeof u=="boolean"&&(p=!0),u===!0&&h.push(g);p&&(f["data-headlessui-state"]=h.join(" "))}if(i==="template"){if(d=Gl(d??[]),Object.keys(c).length>0||Object.keys(t).length>0){let[p,...h]=d??[];if(!jm(p)||h.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${s} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(c).concat(Object.keys(t)).map(m=>m.trim()).filter((m,y,v)=>v.indexOf(m)===y).sort((m,y)=>m.localeCompare(y)).map(m=>` - ${m}`).join(` `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(m=>` - ${m}`).join(` `)].join(` -`));let g=zl((r=p.props)!=null?r:{},c,f),u=n.cloneVNode(p,g,!0);for(let m in g)m.startsWith("on")&&(u.props||(u.props={}),u.props[m]=g[m]);return u}return Array.isArray(d)&&d.length===1?d[0]:d}return n.h(l,Object.assign({},c,f),{default:()=>d})}function Gl(e){return e.flatMap(t=>t.type===n.Fragment?Gl(t.children):[t])}function zl(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},o={};for(let a of e)for(let s in a)s.startsWith("on")&&typeof a[s]=="function"?(o[s]!=null||(o[s]=[]),o[s].push(a[s])):t[s]=a[s];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(o).map(a=>[a,void 0])));for(let a in o)Object.assign(t,{[a](s,...i){let r=o[a];for(let l of r){if(s instanceof Event&&s.defaultPrevented)return;l(s,...i)}}});return t}function Vm(e){let t=Object.assign({},e);for(let o in t)t[o]===void 0&&delete t[o];return t}function $o(e,t=[]){let o=Object.assign({},e);for(let a of t)a in o&&delete o[a];return o}function jm(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var ea=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ea||{});let Wa=n.defineComponent({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:o}){return()=>{var a;let{features:s,...i}=e,r={"aria-hidden":(s&2)===2?!0:(a=i["aria-hidden"])!=null?a:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(s&4)===4&&(s&2)!==2&&{display:"none"}}};return Pe({ourProps:r,theirProps:i,slot:{},attrs:o,slots:t,name:"Hidden"})}}}),Wl=Symbol("Context");var Ue=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ue||{});function Gm(){return yo()!==null}function yo(){return n.inject(Wl,null)}function Xa(e){n.provide(Wl,e)}var xe=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(xe||{});function zm(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let rn=[];zm(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&rn[0]!==t.target&&(rn.unshift(t.target),rn=rn.filter(o=>o!=null&&o.isConnected),rn.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function Wm(e){throw new Error("Unexpected object: "+e)}var ke=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(ke||{});function hs(e,t){let o=t.resolveItems();if(o.length<=0)return null;let a=t.resolveActiveIndex(),s=a??-1;switch(e.focus){case 0:{for(let i=0;i=0;--i)if(!t.resolveDisabled(o[i],i,o))return i;return a}case 2:{for(let i=s+1;i=0;--i)if(!t.resolveDisabled(o[i],i,o))return i;return a}case 4:{for(let i=0;isetTimeout(()=>{throw t}))}function Vn(){let e=[],t={addEventListener(o,a,s,i){return o.addEventListener(a,s,i),t.add(()=>o.removeEventListener(a,s,i))},requestAnimationFrame(...o){let a=requestAnimationFrame(...o);t.add(()=>cancelAnimationFrame(a))},nextFrame(...o){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...o)})},setTimeout(...o){let a=setTimeout(...o);t.add(()=>clearTimeout(a))},microTask(...o){let a={current:!0};return ms(()=>{a.current&&o[0]()}),t.add(()=>{a.current=!1})},style(o,a,s){let i=o.style.getPropertyValue(a);return Object.assign(o.style,{[a]:s}),this.add(()=>{Object.assign(o.style,{[a]:i})})},group(o){let a=Vn();return o(a),this.add(()=>a.dispose())},add(o){return e.push(o),()=>{let a=e.indexOf(o);if(a>=0)for(let s of e.splice(a,1))s()}},dispose(){for(let o of e.splice(0))o()}};return t}function Xl(e={},t=null,o=[]){for(let[a,s]of Object.entries(e))Yl(o,Kl(t,a),s);return o}function Kl(e,t){return e?e+"["+t+"]":t}function Yl(e,t,o){if(Array.isArray(o))for(let[a,s]of o.entries())Yl(e,Kl(t,a.toString()),s);else o instanceof Date?e.push([t,o.toISOString()]):typeof o=="boolean"?e.push([t,o?"1":"0"]):typeof o=="string"?e.push([t,o]):typeof o=="number"?e.push([t,`${o}`]):o==null?e.push([t,""]):Xl(o,t,e)}function Xm(e,t){return e===t}var Km=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Km||{}),Ym=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Ym||{}),Jm=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Jm||{});let Jl=Symbol("ComboboxContext");function jn(e){let t=n.inject(Jl,null);if(t===null){let o=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,jn),o}return t}let Ql=Symbol("VirtualContext"),Qm=n.defineComponent({name:"VirtualProvider",setup(e,{slots:t}){let o=jn("VirtualProvider"),a=n.computed(()=>{let l=ae(o.optionsRef);if(!l)return{start:0,end:0};let c=window.getComputedStyle(l);return{start:parseFloat(c.paddingBlockStart||c.paddingTop),end:parseFloat(c.paddingBlockEnd||c.paddingBottom)}}),s=Rm(n.computed(()=>({scrollPaddingStart:a.value.start,scrollPaddingEnd:a.value.end,count:o.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return ae(o.optionsRef)},overscan:12}))),i=n.computed(()=>{var l;return(l=o.virtual.value)==null?void 0:l.options}),r=n.ref(0);return n.watch([i],()=>{r.value+=1}),n.provide(Ql,o.virtual.value?s:null),()=>[n.h("div",{style:{position:"relative",width:"100%",height:`${s.value.getTotalSize()}px`},ref:l=>{if(l){if(typeof process<"u"&&{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_eb48436b-27fa-4a9f-8ddf-545ec1ef37df",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.5.0 node/v18.20.2 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_eb48436b-27fa-4a9f-8ddf-545ec1ef37df",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/18.20.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/nova-file-manager/nova-file-manager/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"oneduo",GRADLE_HOME:"/usr/share/gradle-8.7",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/26.3.11579264",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"113685820",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu22",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/nova-file-manager/nova-file-manager",SYSTEMD_EXEC_PID:"590",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",GOROOT_1_20_X64:"/opt/hostedtoolcache/go/1.20.14/x64",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.9/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20240422.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.2/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",JOURNAL_STREAM:"8:19069",GITHUB_WORKFLOW:"Update Assets",_:"/opt/hostedtoolcache/node/18.20.2/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/18.20.2/x64",npm_config_npm_version:"10.5.0",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"8892036299",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"494154547cbd994e5b636589f8cf5b9cc1c62a0e",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",GITHUB_WORKFLOW_REF:"oneduo/nova-file-manager/.github/workflows/update-assets.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/18.20.2/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/nova-file-manager/nova-file-manager/node_modules/.bin:/home/runner/work/nova-file-manager/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/18.20.2/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/runner/work/nova-file-manager/nova-file-manager/node_modules/.bin:/home/runner/work/nova-file-manager/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/18.20.2/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/18.20.2/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_91cdae8c-6fc1-4fb4-ad4a-25550d074514",INVOCATION_ID:"955f549da72c48ebaa64c718de52a727",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/18.20.2/x64/bin/node",npm_package_name:"nova-file-manager",GITHUB_ACTION:"__run",GITHUB_RUN_NUMBER:"609",GITHUB_TRIGGERING_ACTOR:"Rezrazi",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 4",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"oneduo/nova-file-manager",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"505375003",GITHUB_ACTIONS:"true",npm_package_version:"0.8.0",npm_lifecycle_event:"build",GITHUB_REF_PROTECTED:"false",GITHUB_WORKSPACE:"/home/runner/work/nova-file-manager/nova-file-manager",ACCEPT_EULA:"Y",GITHUB_JOB:"update",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"494154547cbd994e5b636589f8cf5b9cc1c62a0e",GITHUB_RUN_ATTEMPT:"1",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"Rezrazi",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",LEIN_HOME:"/usr/local/lib/lein",npm_config_globalconfig:"/opt/hostedtoolcache/node/18.20.2/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_eb48436b-27fa-4a9f-8ddf-545ec1ef37df",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/nova-file-manager/nova-file-manager",GITHUB_ACTOR_ID:"2086576",RUNNER_WORKSPACE:"/home/runner/work/nova-file-manager",npm_execpath:"/opt/hostedtoolcache/node/18.20.2/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_eb48436b-27fa-4a9f-8ddf-545ec1ef37df",npm_config_global_prefix:"/opt/hostedtoolcache/node/18.20.2/x64",TAILWIND_MODE:"build",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/25.2.9519653",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",STATS_EXTP:"https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.172+1/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_eb48436b-27fa-4a9f-8ddf-545ec1ef37df",INIT_CWD:"/home/runner/work/nova-file-manager/nova-file-manager",EDITOR:"vi",NODE_ENV:"production"}.JEST_WORKER_ID!==void 0||o.activationTrigger.value===0)return;o.activeOptionIndex.value!==null&&o.virtual.value.options.length>o.activeOptionIndex.value&&s.value.scrollToIndex(o.activeOptionIndex.value)}}},s.value.getVirtualItems().map(l=>n.cloneVNode(t.default({option:o.virtual.value.options[l.index],open:o.comboboxState.value===0})[0],{key:`${r.value}-${l.index}`,"data-index":l.index,"aria-setsize":o.virtual.value.options.length,"aria-posinset":l.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${l.start}px)`,overflowAnchor:"none"}})))]}}),Zm=n.defineComponent({name:"Combobox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],nullable:!0,default:null},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1},virtual:{type:Object,default:null}},inheritAttrs:!1,setup(e,{slots:t,attrs:o,emit:a}){let s=n.ref(1),i=n.ref(null),r=n.ref(null),l=n.ref(null),c=n.ref(null),d=n.ref({static:!1,hold:!1}),f=n.ref([]),p=n.ref(null),h=n.ref(2),g=n.ref(!1);function u(C=F=>F){let F=p.value!==null?f.value[p.value]:null,K=C(f.value.slice()),P=K.length>0&&K[0].dataRef.order.value!==null?K.sort((j,W)=>j.dataRef.order.value-W.dataRef.order.value):ds(K,j=>ae(j.dataRef.domRef)),U=F?P.indexOf(F):null;return U===-1&&(U=null),{options:P,activeOptionIndex:U}}let m=n.computed(()=>e.multiple?1:0),y=n.computed(()=>e.nullable),[v,b]=Im(n.computed(()=>e.modelValue),C=>a("update:modelValue",C),n.computed(()=>e.defaultValue)),N=n.computed(()=>v.value===void 0?$e(m.value,{1:[],0:void 0}):v.value),x=null,T=null;function O(C){return $e(m.value,{0(){return b?.(C)},1:()=>{let F=n.toRaw(I.value.value).slice(),K=n.toRaw(C),P=F.findIndex(U=>I.compare(K,n.toRaw(U)));return P===-1?F.push(K):F.splice(P,1),b?.(F)}})}let B=n.computed(()=>{});n.watch([B],([C],[F])=>{if(I.virtual.value&&C&&F&&p.value!==null){let K=C.indexOf(F[p.value]);K!==-1?p.value=K:p.value=null}});let I={comboboxState:s,value:N,mode:m,compare(C,F){if(typeof e.by=="string"){let K=e.by;return C?.[K]===F?.[K]}return e.by===null?Xm(C,F):e.by(C,F)},calculateIndex(C){return I.virtual.value?e.by===null?I.virtual.value.options.indexOf(C):I.virtual.value.options.findIndex(F=>I.compare(F,C)):f.value.findIndex(F=>I.compare(F.dataRef.value,C))},defaultValue:n.computed(()=>e.defaultValue),nullable:y,immediate:n.computed(()=>!1),virtual:n.computed(()=>null),inputRef:r,labelRef:i,buttonRef:l,optionsRef:c,disabled:n.computed(()=>e.disabled),options:f,change(C){b(C)},activeOptionIndex:n.computed(()=>{if(g.value&&p.value===null&&(I.virtual.value?I.virtual.value.options.length>0:f.value.length>0)){if(I.virtual.value){let F=I.virtual.value.options.findIndex(K=>{var P;return!((P=I.virtual.value)!=null&&P.disabled(K))});if(F!==-1)return F}let C=f.value.findIndex(F=>!F.dataRef.disabled);if(C!==-1)return C}return p.value}),activationTrigger:h,optionsPropsRef:d,closeCombobox(){g.value=!1,!e.disabled&&s.value!==1&&(s.value=1,p.value=null)},openCombobox(){if(g.value=!0,!e.disabled&&s.value!==0){if(I.value.value){let C=I.calculateIndex(I.value.value);C!==-1&&(p.value=C)}s.value=0}},setActivationTrigger(C){h.value=C},goToOption(C,F,K){g.value=!1,x!==null&&cancelAnimationFrame(x),x=requestAnimationFrame(()=>{if(e.disabled||c.value&&!d.value.static&&s.value===1)return;if(I.virtual.value){p.value=C===ke.Specific?F:hs({focus:C},{resolveItems:()=>I.virtual.value.options,resolveActiveIndex:()=>{var j,W;return(W=(j=I.activeOptionIndex.value)!=null?j:I.virtual.value.options.findIndex(q=>{var ne;return!((ne=I.virtual.value)!=null&&ne.disabled(q))}))!=null?W:null},resolveDisabled:j=>I.virtual.value.disabled(j),resolveId(){throw new Error("Function not implemented.")}}),h.value=K??2;return}let P=u();if(P.activeOptionIndex===null){let j=P.options.findIndex(W=>!W.dataRef.disabled);j!==-1&&(P.activeOptionIndex=j)}let U=C===ke.Specific?F:hs({focus:C},{resolveItems:()=>P.options,resolveActiveIndex:()=>P.activeOptionIndex,resolveId:j=>j.id,resolveDisabled:j=>j.dataRef.disabled});p.value=U,h.value=K??2,f.value=P.options})},selectOption(C){let F=f.value.find(P=>P.id===C);if(!F)return;let{dataRef:K}=F;O(K.value)},selectActiveOption(){if(I.activeOptionIndex.value!==null){if(I.virtual.value)O(I.virtual.value.options[I.activeOptionIndex.value]);else{let{dataRef:C}=f.value[I.activeOptionIndex.value];O(C.value)}I.goToOption(ke.Specific,I.activeOptionIndex.value)}},registerOption(C,F){let K=n.reactive({id:C,dataRef:F});if(I.virtual.value){f.value.push(K);return}T&&cancelAnimationFrame(T);let P=u(U=>(U.push(K),U));p.value===null&&I.isSelected(F.value.value)&&(P.activeOptionIndex=P.options.indexOf(K)),f.value=P.options,p.value=P.activeOptionIndex,h.value=2,P.options.some(U=>!ae(U.dataRef.domRef))&&(T=requestAnimationFrame(()=>{let U=u();f.value=U.options,p.value=U.activeOptionIndex}))},unregisterOption(C,F){if(x!==null&&cancelAnimationFrame(x),F&&(g.value=!0),I.virtual.value){f.value=f.value.filter(P=>P.id!==C);return}let K=u(P=>{let U=P.findIndex(j=>j.id===C);return U!==-1&&P.splice(U,1),P});f.value=K.options,p.value=K.activeOptionIndex,h.value=2},isSelected(C){return $e(m.value,{0:()=>I.compare(n.toRaw(I.value.value),n.toRaw(C)),1:()=>n.toRaw(I.value.value).some(F=>I.compare(n.toRaw(F),n.toRaw(C)))})},isActive(C){return p.value===I.calculateIndex(C)}};us([r,l,c],()=>I.closeCombobox(),n.computed(()=>s.value===0)),n.provide(Jl,I),Xa(n.computed(()=>$e(s.value,{0:Ue.Open,1:Ue.Closed})));let D=n.computed(()=>{var C;return(C=ae(r))==null?void 0:C.closest("form")});return n.onMounted(()=>{n.watch([D],()=>{if(!D.value||e.defaultValue===void 0)return;function C(){I.change(e.defaultValue)}return D.value.addEventListener("reset",C),()=>{var F;(F=D.value)==null||F.removeEventListener("reset",C)}},{immediate:!0})}),()=>{var C,F,K;let{name:P,disabled:U,form:j,...W}=e,q={open:s.value===0,disabled:U,activeIndex:I.activeOptionIndex.value,activeOption:I.activeOptionIndex.value===null?null:I.virtual.value?I.virtual.value.options[(C=I.activeOptionIndex.value)!=null?C:0]:(K=(F=I.options.value[I.activeOptionIndex.value])==null?void 0:F.dataRef.value)!=null?K:null,value:N.value};return n.h(n.Fragment,[...P!=null&&N.value!=null?Xl({[P]:N.value}).map(([ne,_e])=>n.h(Wa,Vm({features:ea.Hidden,key:ne,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:j,name:ne,value:_e}))):[],Pe({theirProps:{...o,...$o(W,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:q,slots:t,attrs:o,name:"Combobox"})])}}});n.defineComponent({name:"ComboboxLabel",props:{as:{type:[Object,String],default:"label"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o}){var a;let s=(a=e.id)!=null?a:`headlessui-combobox-label-${lt()}`,i=jn("ComboboxLabel");function r(){var l;(l=ae(i.inputRef))==null||l.focus({preventScroll:!0})}return()=>{let l={open:i.comboboxState.value===0,disabled:i.disabled.value},{...c}=e,d={id:s,ref:i.labelRef,onClick:r};return Pe({ourProps:d,theirProps:c,slot:l,attrs:t,slots:o,name:"ComboboxLabel"})}}}),n.defineComponent({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){var s;let i=(s=e.id)!=null?s:`headlessui-combobox-button-${lt()}`,r=jn("ComboboxButton");a({el:r.buttonRef,$el:r.buttonRef});function l(f){r.disabled.value||(r.comboboxState.value===0?r.closeCombobox():(f.preventDefault(),r.openCombobox()),n.nextTick(()=>{var p;return(p=ae(r.inputRef))==null?void 0:p.focus({preventScroll:!0})}))}function c(f){switch(f.key){case xe.ArrowDown:f.preventDefault(),f.stopPropagation(),r.comboboxState.value===1&&r.openCombobox(),n.nextTick(()=>{var p;return(p=r.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return;case xe.ArrowUp:f.preventDefault(),f.stopPropagation(),r.comboboxState.value===1&&(r.openCombobox(),n.nextTick(()=>{r.value.value||r.goToOption(ke.Last)})),n.nextTick(()=>{var p;return(p=r.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return;case xe.Escape:if(r.comboboxState.value!==0)return;f.preventDefault(),r.optionsRef.value&&!r.optionsPropsRef.value.static&&f.stopPropagation(),r.closeCombobox(),n.nextTick(()=>{var p;return(p=r.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return}}let d=fs(n.computed(()=>({as:e.as,type:t.type})),r.buttonRef);return()=>{var f,p;let h={open:r.comboboxState.value===0,disabled:r.disabled.value,value:r.value.value},{...g}=e,u={ref:r.buttonRef,id:i,type:d.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(f=ae(r.optionsRef))==null?void 0:f.id,"aria-expanded":r.comboboxState.value===0,"aria-labelledby":r.labelRef.value?[(p=ae(r.labelRef))==null?void 0:p.id,i].join(" "):void 0,disabled:r.disabled.value===!0?!0:void 0,onKeydown:c,onClick:l};return Pe({ourProps:u,theirProps:g,slot:h,attrs:t,slots:o,name:"ComboboxButton"})}}});let qm=n.defineComponent({name:"ComboboxInput",props:{as:{type:[Object,String],default:"input"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:null}},emits:{change:e=>!0},setup(e,{emit:t,attrs:o,slots:a,expose:s}){var i;let r=(i=e.id)!=null?i:`headlessui-combobox-input-${lt()}`,l=jn("ComboboxInput"),c=n.computed(()=>an(ae(l.inputRef))),d={value:!1};s({el:l.inputRef,$el:l.inputRef});function f(){l.change(null);let x=ae(l.optionsRef);x&&(x.scrollTop=0),l.goToOption(ke.Nothing)}let p=n.computed(()=>{var x;let T=l.value.value;return ae(l.inputRef)?typeof e.displayValue<"u"&&T!==void 0?(x=e.displayValue(T))!=null?x:"":typeof T=="string"?T:"":""});n.onMounted(()=>{n.watch([p,l.comboboxState,c],([x,T],[O,B])=>{if(d.value)return;let I=ae(l.inputRef);I&&((B===0&&T===1||x!==O)&&(I.value=x),requestAnimationFrame(()=>{var D;if(d.value||!I||((D=c.value)==null?void 0:D.activeElement)!==I)return;let{selectionStart:C,selectionEnd:F}=I;Math.abs((F??0)-(C??0))===0&&C===0&&I.setSelectionRange(I.value.length,I.value.length)}))},{immediate:!0}),n.watch([l.comboboxState],([x],[T])=>{if(x===0&&T===1){if(d.value)return;let O=ae(l.inputRef);if(!O)return;let B=O.value,{selectionStart:I,selectionEnd:D,selectionDirection:C}=O;O.value="",O.value=B,C!==null?O.setSelectionRange(I,D,C):O.setSelectionRange(I,D)}})});let h=n.ref(!1);function g(){h.value=!0}function u(){Vn().nextFrame(()=>{h.value=!1})}function m(x){switch(d.value=!0,x.key){case xe.Enter:if(d.value=!1,l.comboboxState.value!==0||h.value)return;if(x.preventDefault(),x.stopPropagation(),l.activeOptionIndex.value===null){l.closeCombobox();return}l.selectActiveOption(),l.mode.value===0&&l.closeCombobox();break;case xe.ArrowDown:return d.value=!1,x.preventDefault(),x.stopPropagation(),$e(l.comboboxState.value,{0:()=>l.goToOption(ke.Next),1:()=>l.openCombobox()});case xe.ArrowUp:return d.value=!1,x.preventDefault(),x.stopPropagation(),$e(l.comboboxState.value,{0:()=>l.goToOption(ke.Previous),1:()=>{l.openCombobox(),n.nextTick(()=>{l.value.value||l.goToOption(ke.Last)})}});case xe.Home:if(x.shiftKey)break;return d.value=!1,x.preventDefault(),x.stopPropagation(),l.goToOption(ke.First);case xe.PageUp:return d.value=!1,x.preventDefault(),x.stopPropagation(),l.goToOption(ke.First);case xe.End:if(x.shiftKey)break;return d.value=!1,x.preventDefault(),x.stopPropagation(),l.goToOption(ke.Last);case xe.PageDown:return d.value=!1,x.preventDefault(),x.stopPropagation(),l.goToOption(ke.Last);case xe.Escape:if(d.value=!1,l.comboboxState.value!==0)return;x.preventDefault(),l.optionsRef.value&&!l.optionsPropsRef.value.static&&x.stopPropagation(),l.nullable.value&&l.mode.value===0&&l.value.value===null&&f(),l.closeCombobox();break;case xe.Tab:if(d.value=!1,l.comboboxState.value!==0)return;l.mode.value===0&&l.activationTrigger.value!==1&&l.selectActiveOption(),l.closeCombobox();break}}function y(x){t("change",x),l.nullable.value&&l.mode.value===0&&x.target.value===""&&f(),l.openCombobox()}function v(x){var T,O,B;let I=(T=x.relatedTarget)!=null?T:rn.find(D=>D!==x.currentTarget);if(d.value=!1,!((O=ae(l.optionsRef))!=null&&O.contains(I))&&!((B=ae(l.buttonRef))!=null&&B.contains(I))&&l.comboboxState.value===0)return x.preventDefault(),l.mode.value===0&&(l.nullable.value&&l.value.value===null?f():l.activationTrigger.value!==1&&l.selectActiveOption()),l.closeCombobox()}function b(x){var T,O,B;let I=(T=x.relatedTarget)!=null?T:rn.find(D=>D!==x.currentTarget);(O=ae(l.buttonRef))!=null&&O.contains(I)||(B=ae(l.optionsRef))!=null&&B.contains(I)||l.disabled.value||l.immediate.value&&l.comboboxState.value!==0&&(l.openCombobox(),Vn().nextFrame(()=>{l.setActivationTrigger(1)}))}let N=n.computed(()=>{var x,T,O,B;return(B=(O=(T=e.defaultValue)!=null?T:l.defaultValue.value!==void 0?(x=e.displayValue)==null?void 0:x.call(e,l.defaultValue.value):null)!=null?O:l.defaultValue.value)!=null?B:""});return()=>{var x,T,O,B,I,D,C;let F={open:l.comboboxState.value===0},{displayValue:K,onChange:P,...U}=e,j={"aria-controls":(x=l.optionsRef.value)==null?void 0:x.id,"aria-expanded":l.comboboxState.value===0,"aria-activedescendant":l.activeOptionIndex.value===null?void 0:l.virtual.value?(T=l.options.value.find(W=>!l.virtual.value.disabled(W.dataRef.value)&&l.compare(W.dataRef.value,l.virtual.value.options[l.activeOptionIndex.value])))==null?void 0:T.id:(O=l.options.value[l.activeOptionIndex.value])==null?void 0:O.id,"aria-labelledby":(D=(B=ae(l.labelRef))==null?void 0:B.id)!=null?D:(I=ae(l.buttonRef))==null?void 0:I.id,"aria-autocomplete":"list",id:r,onCompositionstart:g,onCompositionend:u,onKeydown:m,onInput:y,onFocus:b,onBlur:v,role:"combobox",type:(C=o.type)!=null?C:"text",tabIndex:0,ref:l.inputRef,defaultValue:N.value,disabled:l.disabled.value===!0?!0:void 0};return Pe({ourProps:j,theirProps:U,slot:F,attrs:o,slots:a,features:It.RenderStrategy|It.Static,name:"ComboboxInput"})}}}),$m=n.defineComponent({name:"ComboboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(e,{attrs:t,slots:o,expose:a}){let s=jn("ComboboxOptions"),i=`headlessui-combobox-options-${lt()}`;a({el:s.optionsRef,$el:s.optionsRef}),n.watchEffect(()=>{s.optionsPropsRef.value.static=e.static}),n.watchEffect(()=>{s.optionsPropsRef.value.hold=e.hold});let r=yo(),l=n.computed(()=>r!==null?(r.value&Ue.Open)===Ue.Open:s.comboboxState.value===0);return jl({container:n.computed(()=>ae(s.optionsRef)),enabled:n.computed(()=>s.comboboxState.value===0),accept(c){return c.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:c.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(c){c.setAttribute("role","none")}}),()=>{var c,d,f;let p={open:s.comboboxState.value===0},h={"aria-labelledby":(f=(c=ae(s.labelRef))==null?void 0:c.id)!=null?f:(d=ae(s.buttonRef))==null?void 0:d.id,id:i,ref:s.optionsRef,role:"listbox","aria-multiselectable":s.mode.value===1?!0:void 0},g=$o(e,["hold"]);return Pe({ourProps:h,theirProps:g,slot:p,attrs:t,slots:s.virtual.value&&s.comboboxState.value===0?{...o,default:()=>[n.h(Qm,{},o.default)]}:o,features:It.RenderStrategy|It.Static,visible:l.value,name:"ComboboxOptions"})}}}),Zl=n.defineComponent({name:"ComboboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},order:{type:[Number],default:null}},setup(e,{slots:t,attrs:o,expose:a}){let s=jn("ComboboxOption"),i=`headlessui-combobox-option-${lt()}`,r=n.ref(null);a({el:r,$el:r});let l=n.computed(()=>{var v;return s.virtual.value?s.activeOptionIndex.value===s.calculateIndex(e.value):s.activeOptionIndex.value===null?!1:((v=s.options.value[s.activeOptionIndex.value])==null?void 0:v.id)===i}),c=n.computed(()=>s.isSelected(e.value)),d=n.inject(Ql,null),f=n.computed(()=>({disabled:e.disabled,value:e.value,domRef:r,order:n.computed(()=>e.order)}));n.onMounted(()=>s.registerOption(i,f)),n.onUnmounted(()=>s.unregisterOption(i,l.value)),n.watchEffect(()=>{let v=ae(r);v&&d?.value.measureElement(v)}),n.watchEffect(()=>{s.comboboxState.value===0&&l.value&&(s.virtual.value||s.activationTrigger.value!==0&&n.nextTick(()=>{var v,b;return(b=(v=ae(r))==null?void 0:v.scrollIntoView)==null?void 0:b.call(v,{block:"nearest"})}))});function p(v){var b;if(e.disabled||(b=s.virtual.value)!=null&&b.disabled(e.value))return v.preventDefault();s.selectOption(i),Ll()||requestAnimationFrame(()=>{var N;return(N=ae(s.inputRef))==null?void 0:N.focus({preventScroll:!0})}),s.mode.value===0&&requestAnimationFrame(()=>s.closeCombobox())}function h(){var v;if(e.disabled||(v=s.virtual.value)!=null&&v.disabled(e.value))return s.goToOption(ke.Nothing);let b=s.calculateIndex(e.value);s.goToOption(ke.Specific,b)}let g=Vl();function u(v){g.update(v)}function m(v){var b;if(!g.wasMoved(v)||e.disabled||(b=s.virtual.value)!=null&&b.disabled(e.value)||l.value)return;let N=s.calculateIndex(e.value);s.goToOption(ke.Specific,N,0)}function y(v){var b;g.wasMoved(v)&&(e.disabled||(b=s.virtual.value)!=null&&b.disabled(e.value)||l.value&&(s.optionsPropsRef.value.hold||s.goToOption(ke.Nothing)))}return()=>{let{disabled:v}=e,b={active:l.value,selected:c.value,disabled:v},N={id:i,ref:r,role:"option",tabIndex:v===!0?void 0:-1,"aria-disabled":v===!0?!0:void 0,"aria-selected":c.value,disabled:void 0,onClick:p,onFocus:h,onPointerenter:u,onMouseenter:u,onPointermove:m,onMousemove:m,onPointerleave:y,onMouseleave:y},x=$o(e,["order","value"]);return Pe({ourProps:N,theirProps:x,slot:b,attrs:o,slots:t,name:"ComboboxOption"})}}});function ql(e,t,o,a){Zo.isServer||n.watchEffect(s=>{e=e??window,e.addEventListener(t,o,a),s(()=>e.removeEventListener(t,o,a))})}var ta=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(ta||{});function eg(){let e=n.ref(0);return Fl("keydown",t=>{t.key==="Tab"&&(e.value=t.shiftKey?1:0)}),e}function $l(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let o of e.value){let a=ae(o);a instanceof HTMLElement&&t.add(a)}return t}var ec=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(ec||{});let na=Object.assign(n.defineComponent({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:n.ref(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:o,expose:a}){let s=n.ref(null);a({el:s,$el:s});let i=n.computed(()=>an(s)),r=n.ref(!1);n.onMounted(()=>r.value=!0),n.onUnmounted(()=>r.value=!1),ng({ownerDocument:i},n.computed(()=>r.value&&!!(e.features&16)));let l=og({ownerDocument:i,container:s,initialFocus:n.computed(()=>e.initialFocus)},n.computed(()=>r.value&&!!(e.features&2)));ag({ownerDocument:i,container:s,containers:e.containers,previousActiveElement:l},n.computed(()=>r.value&&!!(e.features&8)));let c=eg();function d(g){let u=ae(s);u&&(m=>m())(()=>{$e(c.value,{[ta.Forwards]:()=>{qo(u,Jt.First,{skipElements:[g.relatedTarget]})},[ta.Backwards]:()=>{qo(u,Jt.Last,{skipElements:[g.relatedTarget]})}})})}let f=n.ref(!1);function p(g){g.key==="Tab"&&(f.value=!0,requestAnimationFrame(()=>{f.value=!1}))}function h(g){if(!r.value)return;let u=$l(e.containers);ae(s)instanceof HTMLElement&&u.add(ae(s));let m=g.relatedTarget;m instanceof HTMLElement&&m.dataset.headlessuiFocusGuard!=="true"&&(tc(u,m)||(f.value?qo(ae(s),$e(c.value,{[ta.Forwards]:()=>Jt.Next,[ta.Backwards]:()=>Jt.Previous})|Jt.WrapAround,{relativeTo:g.target}):g.target instanceof HTMLElement&&Tn(g.target)))}return()=>{let g={},u={ref:s,onKeydown:p,onFocusout:h},{features:m,initialFocus:y,containers:v,...b}=e;return n.h(n.Fragment,[!!(m&4)&&n.h(Wa,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:ea.Focusable}),Pe({ourProps:u,theirProps:{...t,...b},slot:g,attrs:t,slots:o,name:"FocusTrap"}),!!(m&4)&&n.h(Wa,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:ea.Focusable})])}}}),{features:ec});function tg(e){let t=n.ref(rn.slice());return n.watch([e],([o],[a])=>{a===!0&&o===!1?ms(()=>{t.value.splice(0)}):a===!1&&o===!0&&(t.value=rn.slice())},{flush:"post"}),()=>{var o;return(o=t.value.find(a=>a!=null&&a.isConnected))!=null?o:null}}function ng({ownerDocument:e},t){let o=tg(t);n.onMounted(()=>{n.watchEffect(()=>{var a,s;t.value||((a=e.value)==null?void 0:a.activeElement)===((s=e.value)==null?void 0:s.body)&&Tn(o())},{flush:"post"})}),n.onUnmounted(()=>{t.value&&Tn(o())})}function og({ownerDocument:e,container:t,initialFocus:o},a){let s=n.ref(null),i=n.ref(!1);return n.onMounted(()=>i.value=!0),n.onUnmounted(()=>i.value=!1),n.onMounted(()=>{n.watch([t,o,a],(r,l)=>{if(r.every((d,f)=>l?.[f]===d)||!a.value)return;let c=ae(t);c&&ms(()=>{var d,f;if(!i.value)return;let p=ae(o),h=(d=e.value)==null?void 0:d.activeElement;if(p){if(p===h){s.value=h;return}}else if(c.contains(h)){s.value=h;return}p?Tn(p):qo(c,Jt.First|Jt.NoScroll)===Dl.Error&&console.warn("There are no focusable elements inside the "),s.value=(f=e.value)==null?void 0:f.activeElement})},{immediate:!0,flush:"post"})}),s}function ag({ownerDocument:e,container:t,containers:o,previousActiveElement:a},s){var i;ql((i=e.value)==null?void 0:i.defaultView,"focus",r=>{if(!s.value)return;let l=$l(o);ae(t)instanceof HTMLElement&&l.add(ae(t));let c=a.value;if(!c)return;let d=r.target;d&&d instanceof HTMLElement?tc(l,d)?(a.value=d,Tn(d)):(r.preventDefault(),r.stopPropagation(),Tn(c)):Tn(a.value)},!0)}function tc(e,t){for(let o of e)if(o.contains(t))return!0;return!1}function rg(e){let t=n.shallowRef(e.getSnapshot());return n.onUnmounted(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function sg(e,t){let o=e(),a=new Set;return{getSnapshot(){return o},subscribe(s){return a.add(s),()=>a.delete(s)},dispatch(s,...i){let r=t[s].call(o,...i);r&&(o=r,a.forEach(l=>l()))}}}function ig(){let e;return{before({doc:t}){var o;let a=t.documentElement;e=((o=t.defaultView)!=null?o:window).innerWidth-a.clientWidth},after({doc:t,d:o}){let a=t.documentElement,s=a.clientWidth-a.offsetWidth,i=e-s;o.style(a,"paddingRight",`${i}px`)}}}function lg(){return Ml()?{before({doc:e,d:t,meta:o}){function a(s){return o.containers.flatMap(i=>i()).some(i=>i.contains(s))}t.microTask(()=>{var s;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let l=Vn();l.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>l.dispose()))}let i=(s=window.scrollY)!=null?s:window.pageYOffset,r=null;t.addEventListener(e,"click",l=>{if(l.target instanceof HTMLElement)try{let c=l.target.closest("a");if(!c)return;let{hash:d}=new URL(c.href),f=e.querySelector(d);f&&!a(f)&&(r=f)}catch{}},!0),t.addEventListener(e,"touchstart",l=>{if(l.target instanceof HTMLElement)if(a(l.target)){let c=l.target;for(;c.parentElement&&a(c.parentElement);)c=c.parentElement;t.style(c,"overscrollBehavior","contain")}else t.style(l.target,"touchAction","none")}),t.addEventListener(e,"touchmove",l=>{if(l.target instanceof HTMLElement)if(a(l.target)){let c=l.target;for(;c.parentElement&&c.dataset.headlessuiPortal!==""&&!(c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth);)c=c.parentElement;c.dataset.headlessuiPortal===""&&l.preventDefault()}else l.preventDefault()},{passive:!1}),t.add(()=>{var l;let c=(l=window.scrollY)!=null?l:window.pageYOffset;i!==c&&window.scrollTo(0,i),r&&r.isConnected&&(r.scrollIntoView({block:"nearest"}),r=null)})})}}:{}}function cg(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function dg(e){let t={};for(let o of e)Object.assign(t,o(t));return t}let Gn=sg(()=>new Map,{PUSH(e,t){var o;let a=(o=this.get(e))!=null?o:{doc:e,count:0,d:Vn(),meta:new Set};return a.count++,a.meta.add(t),this.set(e,a),this},POP(e,t){let o=this.get(e);return o&&(o.count--,o.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:o}){let a={doc:e,d:t,meta:dg(o)},s=[lg(),ig(),cg()];s.forEach(({before:i})=>i?.(a)),s.forEach(({after:i})=>i?.(a))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Gn.subscribe(()=>{let e=Gn.getSnapshot(),t=new Map;for(let[o]of e)t.set(o,o.documentElement.style.overflow);for(let o of e.values()){let a=t.get(o.doc)==="hidden",s=o.count!==0;(s&&!a||!s&&a)&&Gn.dispatch(o.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",o),o.count===0&&Gn.dispatch("TEARDOWN",o)}});function ug(e,t,o){let a=rg(Gn),s=n.computed(()=>{let i=e.value?a.value.get(e.value):void 0;return i?i.count>0:!1});return n.watch([e,t],([i,r],[l],c)=>{if(!i||!r)return;Gn.dispatch("PUSH",i,o);let d=!1;c(()=>{d||(Gn.dispatch("POP",l??i,o),d=!0)})},{immediate:!0}),s}let gs=new Map,oa=new Map;function nc(e,t=n.ref(!0)){n.watchEffect(o=>{var a;if(!t.value)return;let s=ae(e);if(!s)return;o(function(){var r;if(!s)return;let l=(r=oa.get(s))!=null?r:1;if(l===1?oa.delete(s):oa.set(s,l-1),l!==1)return;let c=gs.get(s);c&&(c["aria-hidden"]===null?s.removeAttribute("aria-hidden"):s.setAttribute("aria-hidden",c["aria-hidden"]),s.inert=c.inert,gs.delete(s))});let i=(a=oa.get(s))!=null?a:0;oa.set(s,i+1),i===0&&(gs.set(s,{"aria-hidden":s.getAttribute("aria-hidden"),inert:s.inert}),s.setAttribute("aria-hidden","true"),s.inert=!0)})}function fg({defaultContainers:e=[],portals:t,mainTreeNodeRef:o}={}){let a=n.ref(null),s=an(a);function i(){var r,l,c;let d=[];for(let f of e)f!==null&&(f instanceof HTMLElement?d.push(f):"value"in f&&f.value instanceof HTMLElement&&d.push(f.value));if(t!=null&&t.value)for(let f of t.value)d.push(f);for(let f of(r=s?.querySelectorAll("html > *, body > *"))!=null?r:[])f!==document.body&&f!==document.head&&f instanceof HTMLElement&&f.id!=="headlessui-portal-root"&&(f.contains(ae(a))||f.contains((c=(l=ae(a))==null?void 0:l.getRootNode())==null?void 0:c.host)||d.some(p=>f.contains(p))||d.push(f));return d}return{resolveContainers:i,contains(r){return i().some(l=>l.contains(r))},mainTreeNodeRef:a,MainTreeNode(){return o!=null?null:n.h(Wa,{features:ea.Hidden,ref:a})}}}let oc=Symbol("ForcePortalRootContext");function pg(){return n.inject(oc,!1)}let vs=n.defineComponent({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:o}){return n.provide(oc,e.force),()=>{let{force:a,...s}=e;return Pe({theirProps:s,ourProps:{},slot:{},slots:t,attrs:o,name:"ForcePortalRoot"})}}}),ac=Symbol("StackContext");var bs=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(bs||{});function hg(){return n.inject(ac,()=>{})}function mg({type:e,enabled:t,element:o,onUpdate:a}){let s=hg();function i(...r){a?.(...r),s(...r)}n.onMounted(()=>{n.watch(t,(r,l)=>{r?i(0,e,o):l===!0&&i(1,e,o)},{immediate:!0,flush:"sync"})}),n.onUnmounted(()=>{t.value&&i(1,e,o)}),n.provide(ac,i)}let rc=Symbol("DescriptionContext");function gg(){let e=n.inject(rc,null);if(e===null)throw new Error("Missing parent");return e}function vg({slot:e=n.ref({}),name:t="Description",props:o={}}={}){let a=n.ref([]);function s(i){return a.value.push(i),()=>{let r=a.value.indexOf(i);r!==-1&&a.value.splice(r,1)}}return n.provide(rc,{register:s,slot:e,name:t,props:o}),n.computed(()=>a.value.length>0?a.value.join(" "):void 0)}n.defineComponent({name:"Description",props:{as:{type:[Object,String],default:"p"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o}){var a;let s=(a=e.id)!=null?a:`headlessui-description-${lt()}`,i=gg();return n.onMounted(()=>n.onUnmounted(i.register(s))),()=>{let{name:r="Description",slot:l=n.ref({}),props:c={}}=i,{...d}=e,f={...Object.entries(c).reduce((p,[h,g])=>Object.assign(p,{[h]:n.unref(g)}),{}),id:s};return Pe({ourProps:f,theirProps:d,slot:l.value,attrs:t,slots:o,name:r})}}});function bg(e){let t=an(e);if(!t){if(e===null)return null;throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`)}let o=t.getElementById("headlessui-portal-root");if(o)return o;let a=t.createElement("div");return a.setAttribute("id","headlessui-portal-root"),t.body.appendChild(a)}let sc=n.defineComponent({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:o}){let a=n.ref(null),s=n.computed(()=>an(a)),i=pg(),r=n.inject(ic,null),l=n.ref(i===!0||r==null?bg(a.value):r.resolveTarget()),c=n.ref(!1);n.onMounted(()=>{c.value=!0}),n.watchEffect(()=>{i||r!=null&&(l.value=r.resolveTarget())});let d=n.inject(ys,null),f=!1,p=n.getCurrentInstance();return n.watch(a,()=>{if(f||!d)return;let h=ae(a);h&&(n.onUnmounted(d.register(h),p),f=!0)}),n.onUnmounted(()=>{var h,g;let u=(h=s.value)==null?void 0:h.getElementById("headlessui-portal-root");u&&l.value===u&&l.value.children.length<=0&&((g=l.value.parentElement)==null||g.removeChild(l.value))}),()=>{if(!c.value||l.value===null)return null;let h={ref:a,"data-headlessui-portal":""};return n.h(n.Teleport,{to:l.value},Pe({ourProps:h,theirProps:e,slot:{},attrs:o,slots:t,name:"Portal"}))}}}),ys=Symbol("PortalParentContext");function yg(){let e=n.inject(ys,null),t=n.ref([]);function o(i){return t.value.push(i),e&&e.register(i),()=>a(i)}function a(i){let r=t.value.indexOf(i);r!==-1&&t.value.splice(r,1),e&&e.unregister(i)}let s={register:o,unregister:a,portals:t};return[t,n.defineComponent({name:"PortalWrapper",setup(i,{slots:r}){return n.provide(ys,s),()=>{var l;return(l=r.default)==null?void 0:l.call(r)}}})]}let ic=Symbol("PortalGroupContext"),Eg=n.defineComponent({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:o}){let a=n.reactive({resolveTarget(){return e.target}});return n.provide(ic,a),()=>{let{target:s,...i}=e;return Pe({theirProps:i,ourProps:{},slot:{},attrs:t,slots:o,name:"PortalGroup"})}}});var _g=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(_g||{});let Es=Symbol("DialogContext");function aa(e){let t=n.inject(Es,null);if(t===null){let o=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,aa),o}return t}let Ka="DC8F892D-2EBD-447C-A4C8-A03058436FF4",Ya=n.defineComponent({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:Ka},initialFocus:{type:Object,default:null},id:{type:String,default:null},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:o,slots:a,expose:s}){var i,r;let l=(i=e.id)!=null?i:`headlessui-dialog-${lt()}`,c=n.ref(!1);n.onMounted(()=>{c.value=!0});let d=!1,f=n.computed(()=>e.role==="dialog"||e.role==="alertdialog"?e.role:(d||(d=!0,console.warn(`Invalid role [${f}] passed to . Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")),p=n.ref(0),h=yo(),g=n.computed(()=>e.open===Ka&&h!==null?(h.value&Ue.Open)===Ue.Open:e.open),u=n.ref(null),m=n.computed(()=>an(u));if(s({el:u,$el:u}),!(e.open!==Ka||h!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof g.value!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${g.value===Ka?void 0:e.open}`);let y=n.computed(()=>c.value&&g.value?0:1),v=n.computed(()=>y.value===0),b=n.computed(()=>p.value>1),N=n.inject(Es,null)!==null,[x,T]=yg(),{resolveContainers:O,mainTreeNodeRef:B,MainTreeNode:I}=fg({portals:x,defaultContainers:[n.computed(()=>{var ie;return(ie=q.panelRef.value)!=null?ie:u.value})]}),D=n.computed(()=>b.value?"parent":"leaf"),C=n.computed(()=>h!==null?(h.value&Ue.Closing)===Ue.Closing:!1),F=n.computed(()=>N||C.value?!1:v.value),K=n.computed(()=>{var ie,fe,ye;return(ye=Array.from((fe=(ie=m.value)==null?void 0:ie.querySelectorAll("body > *"))!=null?fe:[]).find(Te=>Te.id==="headlessui-portal-root"?!1:Te.contains(ae(B))&&Te instanceof HTMLElement))!=null?ye:null});nc(K,F);let P=n.computed(()=>b.value?!0:v.value),U=n.computed(()=>{var ie,fe,ye;return(ye=Array.from((fe=(ie=m.value)==null?void 0:ie.querySelectorAll("[data-headlessui-portal]"))!=null?fe:[]).find(Te=>Te.contains(ae(B))&&Te instanceof HTMLElement))!=null?ye:null});nc(U,P),mg({type:"Dialog",enabled:n.computed(()=>y.value===0),element:u,onUpdate:(ie,fe)=>{if(fe==="Dialog")return $e(ie,{[bs.Add]:()=>p.value+=1,[bs.Remove]:()=>p.value-=1})}});let j=vg({name:"DialogDescription",slot:n.computed(()=>({open:g.value}))}),W=n.ref(null),q={titleId:W,panelRef:n.ref(null),dialogState:y,setTitleId(ie){W.value!==ie&&(W.value=ie)},close(){t("close",!1)}};n.provide(Es,q);let ne=n.computed(()=>!(!v.value||b.value));us(O,(ie,fe)=>{q.close(),n.nextTick(()=>fe?.focus())},ne);let _e=n.computed(()=>!(b.value||y.value!==0));ql((r=m.value)==null?void 0:r.defaultView,"keydown",ie=>{_e.value&&(ie.defaultPrevented||ie.key===xe.Escape&&(ie.preventDefault(),ie.stopPropagation(),q.close()))});let Ye=n.computed(()=>!(C.value||y.value!==0||N));return ug(m,Ye,ie=>{var fe;return{containers:[...(fe=ie.containers)!=null?fe:[],O]}}),n.watchEffect(ie=>{if(y.value!==0)return;let fe=ae(u);if(!fe)return;let ye=new ResizeObserver(Te=>{for(let Be of Te){let Re=Be.target.getBoundingClientRect();Re.x===0&&Re.y===0&&Re.width===0&&Re.height===0&&q.close()}});ye.observe(fe),ie(()=>ye.disconnect())}),()=>{let{open:ie,initialFocus:fe,...ye}=e,Te={...o,ref:u,id:l,role:f.value,"aria-modal":y.value===0?!0:void 0,"aria-labelledby":W.value,"aria-describedby":j.value},Be={open:y.value===0};return n.h(vs,{force:!0},()=>[n.h(sc,()=>n.h(Eg,{target:u.value},()=>n.h(vs,{force:!1},()=>n.h(na,{initialFocus:fe,containers:O,features:v.value?$e(D.value,{parent:na.features.RestoreFocus,leaf:na.features.All&~na.features.FocusLock}):na.features.None},()=>n.h(T,{},()=>Pe({ourProps:Te,theirProps:{...ye,...o},slot:Be,attrs:o,slots:a,visible:y.value===0,features:It.RenderStrategy|It.Static,name:"Dialog"})))))),n.h(I)])}}});n.defineComponent({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o}){var a;let s=(a=e.id)!=null?a:`headlessui-dialog-overlay-${lt()}`,i=aa("DialogOverlay");function r(l){l.target===l.currentTarget&&(l.preventDefault(),l.stopPropagation(),i.close())}return()=>{let{...l}=e;return Pe({ourProps:{id:s,"aria-hidden":!0,onClick:r},theirProps:l,slot:{open:i.dialogState.value===0},attrs:t,slots:o,name:"DialogOverlay"})}}}),n.defineComponent({name:"DialogBackdrop",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},inheritAttrs:!1,setup(e,{attrs:t,slots:o,expose:a}){var s;let i=(s=e.id)!=null?s:`headlessui-dialog-backdrop-${lt()}`,r=aa("DialogBackdrop"),l=n.ref(null);return a({el:l,$el:l}),n.onMounted(()=>{if(r.panelRef.value===null)throw new Error("A component is being used, but a component is missing.")}),()=>{let{...c}=e,d={id:i,ref:l,"aria-hidden":!0};return n.h(vs,{force:!0},()=>n.h(sc,()=>Pe({ourProps:d,theirProps:{...t,...c},slot:{open:r.dialogState.value===0},attrs:t,slots:o,name:"DialogBackdrop"})))}}});let sn=n.defineComponent({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){var s;let i=(s=e.id)!=null?s:`headlessui-dialog-panel-${lt()}`,r=aa("DialogPanel");a({el:r.panelRef,$el:r.panelRef});function l(c){c.stopPropagation()}return()=>{let{...c}=e,d={id:i,ref:r.panelRef,onClick:l};return Pe({ourProps:d,theirProps:c,slot:{open:r.dialogState.value===0},attrs:t,slots:o,name:"DialogPanel"})}}}),lc=n.defineComponent({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o}){var a;let s=(a=e.id)!=null?a:`headlessui-dialog-title-${lt()}`,i=aa("DialogTitle");return n.onMounted(()=>{i.setTitleId(s),n.onUnmounted(()=>i.setTitleId(null))}),()=>{let{...r}=e;return Pe({ourProps:{id:s},theirProps:r,slot:{open:i.dialogState.value===0},attrs:t,slots:o,name:"DialogTitle"})}}});var wg=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(wg||{});let cc=Symbol("DisclosureContext");function _s(e){let t=n.inject(cc,null);if(t===null){let o=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,_s),o}return t}let dc=Symbol("DisclosurePanelContext");function Tg(){return n.inject(dc,null)}let uc=n.defineComponent({name:"Disclosure",props:{as:{type:[Object,String],default:"template"},defaultOpen:{type:[Boolean],default:!1}},setup(e,{slots:t,attrs:o}){let a=n.ref(e.defaultOpen?0:1),s=n.ref(null),i=n.ref(null),r={buttonId:n.ref(`headlessui-disclosure-button-${lt()}`),panelId:n.ref(`headlessui-disclosure-panel-${lt()}`),disclosureState:a,panel:s,button:i,toggleDisclosure(){a.value=$e(a.value,{0:1,1:0})},closeDisclosure(){a.value!==1&&(a.value=1)},close(l){r.closeDisclosure();let c=(()=>l?l instanceof HTMLElement?l:l.value instanceof HTMLElement?ae(l):ae(r.button):ae(r.button))();c?.focus()}};return n.provide(cc,r),Xa(n.computed(()=>$e(a.value,{0:Ue.Open,1:Ue.Closed}))),()=>{let{defaultOpen:l,...c}=e,d={open:a.value===0,close:r.close};return Pe({theirProps:c,ourProps:{},slot:d,slots:t,attrs:o,name:"Disclosure"})}}}),fc=n.defineComponent({name:"DisclosureButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){let s=_s("DisclosureButton"),i=Tg(),r=n.computed(()=>i===null?!1:i.value===s.panelId.value);n.onMounted(()=>{r.value||e.id!==null&&(s.buttonId.value=e.id)}),n.onUnmounted(()=>{r.value||(s.buttonId.value=null)});let l=n.ref(null);a({el:l,$el:l}),r.value||n.watchEffect(()=>{s.button.value=l.value});let c=fs(n.computed(()=>({as:e.as,type:t.type})),l);function d(){var h;e.disabled||(r.value?(s.toggleDisclosure(),(h=ae(s.button))==null||h.focus()):s.toggleDisclosure())}function f(h){var g;if(!e.disabled)if(r.value)switch(h.key){case xe.Space:case xe.Enter:h.preventDefault(),h.stopPropagation(),s.toggleDisclosure(),(g=ae(s.button))==null||g.focus();break}else switch(h.key){case xe.Space:case xe.Enter:h.preventDefault(),h.stopPropagation(),s.toggleDisclosure();break}}function p(h){switch(h.key){case xe.Space:h.preventDefault();break}}return()=>{var h;let g={open:s.disclosureState.value===0},{id:u,...m}=e,y=r.value?{ref:l,type:c.value,onClick:d,onKeydown:f}:{id:(h=s.buttonId.value)!=null?h:u,ref:l,type:c.value,"aria-expanded":s.disclosureState.value===0,"aria-controls":s.disclosureState.value===0||ae(s.panel)?s.panelId.value:void 0,disabled:e.disabled?!0:void 0,onClick:d,onKeydown:f,onKeyup:p};return Pe({ourProps:y,theirProps:m,slot:g,attrs:t,slots:o,name:"DisclosureButton"})}}}),pc=n.defineComponent({name:"DisclosurePanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){let s=_s("DisclosurePanel");n.onMounted(()=>{e.id!==null&&(s.panelId.value=e.id)}),n.onUnmounted(()=>{s.panelId.value=null}),a({el:s.panel,$el:s.panel}),n.provide(dc,s.panelId);let i=yo(),r=n.computed(()=>i!==null?(i.value&Ue.Open)===Ue.Open:s.disclosureState.value===0);return()=>{var l;let c={open:s.disclosureState.value===0,close:s.close},{id:d,...f}=e,p={id:(l=s.panelId.value)!=null?l:d,ref:s.panel};return Pe({ourProps:p,theirProps:f,slot:c,attrs:t,slots:o,features:It.RenderStrategy|It.Static,visible:r.value,name:"DisclosurePanel"})}}}),hc=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function mc(e){var t,o;let a=(t=e.innerText)!=null?t:"",s=e.cloneNode(!0);if(!(s instanceof HTMLElement))return a;let i=!1;for(let l of s.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))l.remove(),i=!0;let r=i?(o=s.innerText)!=null?o:"":a;return hc.test(r)&&(r=r.replace(hc,"")),r}function xg(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let o=e.getAttribute("aria-labelledby");if(o){let a=o.split(" ").map(s=>{let i=document.getElementById(s);if(i){let r=i.getAttribute("aria-label");return typeof r=="string"?r.trim():mc(i).trim()}return null}).filter(Boolean);if(a.length>0)return a.join(", ")}return mc(e).trim()}function Og(e){let t=n.ref(""),o=n.ref("");return()=>{let a=ae(e);if(!a)return"";let s=a.innerText;if(t.value===s)return o.value;let i=xg(a).trim().toLowerCase();return t.value=s,o.value=i,i}}var Sg=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Sg||{}),Ng=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Ng||{});function Rg(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let gc=Symbol("MenuContext");function Ja(e){let t=n.inject(gc,null);if(t===null){let o=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,Ja),o}return t}let ws=n.defineComponent({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup(e,{slots:t,attrs:o}){let a=n.ref(1),s=n.ref(null),i=n.ref(null),r=n.ref([]),l=n.ref(""),c=n.ref(null),d=n.ref(1);function f(h=g=>g){let g=c.value!==null?r.value[c.value]:null,u=ds(h(r.value.slice()),y=>ae(y.dataRef.domRef)),m=g?u.indexOf(g):null;return m===-1&&(m=null),{items:u,activeItemIndex:m}}let p={menuState:a,buttonRef:s,itemsRef:i,items:r,searchQuery:l,activeItemIndex:c,activationTrigger:d,closeMenu:()=>{a.value=1,c.value=null},openMenu:()=>a.value=0,goToItem(h,g,u){let m=f(),y=hs(h===ke.Specific?{focus:ke.Specific,id:g}:{focus:h},{resolveItems:()=>m.items,resolveActiveIndex:()=>m.activeItemIndex,resolveId:v=>v.id,resolveDisabled:v=>v.dataRef.disabled});l.value="",c.value=y,d.value=u??1,r.value=m.items},search(h){let g=l.value!==""?0:1;l.value+=h.toLowerCase();let u=(c.value!==null?r.value.slice(c.value+g).concat(r.value.slice(0,c.value+g)):r.value).find(y=>y.dataRef.textValue.startsWith(l.value)&&!y.dataRef.disabled),m=u?r.value.indexOf(u):-1;m===-1||m===c.value||(c.value=m,d.value=1)},clearSearch(){l.value=""},registerItem(h,g){let u=f(m=>[...m,{id:h,dataRef:g}]);r.value=u.items,c.value=u.activeItemIndex,d.value=1},unregisterItem(h){let g=f(u=>{let m=u.findIndex(y=>y.id===h);return m!==-1&&u.splice(m,1),u});r.value=g.items,c.value=g.activeItemIndex,d.value=1}};return us([s,i],(h,g)=>{var u;p.closeMenu(),cs(g,ls.Loose)||(h.preventDefault(),(u=ae(s))==null||u.focus())},n.computed(()=>a.value===0)),n.provide(gc,p),Xa(n.computed(()=>$e(a.value,{0:Ue.Open,1:Ue.Closed}))),()=>{let h={open:a.value===0,close:p.closeMenu};return Pe({ourProps:{},theirProps:e,slot:h,slots:t,attrs:o,name:"Menu"})}}}),Ts=n.defineComponent({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){var s;let i=(s=e.id)!=null?s:`headlessui-menu-button-${lt()}`,r=Ja("MenuButton");a({el:r.buttonRef,$el:r.buttonRef});function l(p){switch(p.key){case xe.Space:case xe.Enter:case xe.ArrowDown:p.preventDefault(),p.stopPropagation(),r.openMenu(),n.nextTick(()=>{var h;(h=ae(r.itemsRef))==null||h.focus({preventScroll:!0}),r.goToItem(ke.First)});break;case xe.ArrowUp:p.preventDefault(),p.stopPropagation(),r.openMenu(),n.nextTick(()=>{var h;(h=ae(r.itemsRef))==null||h.focus({preventScroll:!0}),r.goToItem(ke.Last)});break}}function c(p){switch(p.key){case xe.Space:p.preventDefault();break}}function d(p){e.disabled||(r.menuState.value===0?(r.closeMenu(),n.nextTick(()=>{var h;return(h=ae(r.buttonRef))==null?void 0:h.focus({preventScroll:!0})})):(p.preventDefault(),r.openMenu(),Rg(()=>{var h;return(h=ae(r.itemsRef))==null?void 0:h.focus({preventScroll:!0})})))}let f=fs(n.computed(()=>({as:e.as,type:t.type})),r.buttonRef);return()=>{var p;let h={open:r.menuState.value===0},{...g}=e,u={ref:r.buttonRef,id:i,type:f.value,"aria-haspopup":"menu","aria-controls":(p=ae(r.itemsRef))==null?void 0:p.id,"aria-expanded":r.menuState.value===0,onKeydown:l,onKeyup:c,onClick:d};return Pe({ourProps:u,theirProps:g,slot:h,attrs:t,slots:o,name:"MenuButton"})}}}),xs=n.defineComponent({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){var s;let i=(s=e.id)!=null?s:`headlessui-menu-items-${lt()}`,r=Ja("MenuItems"),l=n.ref(null);a({el:r.itemsRef,$el:r.itemsRef}),jl({container:n.computed(()=>ae(r.itemsRef)),enabled:n.computed(()=>r.menuState.value===0),accept(h){return h.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:h.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(h){h.setAttribute("role","none")}});function c(h){var g;switch(l.value&&clearTimeout(l.value),h.key){case xe.Space:if(r.searchQuery.value!=="")return h.preventDefault(),h.stopPropagation(),r.search(h.key);case xe.Enter:if(h.preventDefault(),h.stopPropagation(),r.activeItemIndex.value!==null){let u=r.items.value[r.activeItemIndex.value];(g=ae(u.dataRef.domRef))==null||g.click()}r.closeMenu(),Pl(ae(r.buttonRef));break;case xe.ArrowDown:return h.preventDefault(),h.stopPropagation(),r.goToItem(ke.Next);case xe.ArrowUp:return h.preventDefault(),h.stopPropagation(),r.goToItem(ke.Previous);case xe.Home:case xe.PageUp:return h.preventDefault(),h.stopPropagation(),r.goToItem(ke.First);case xe.End:case xe.PageDown:return h.preventDefault(),h.stopPropagation(),r.goToItem(ke.Last);case xe.Escape:h.preventDefault(),h.stopPropagation(),r.closeMenu(),n.nextTick(()=>{var u;return(u=ae(r.buttonRef))==null?void 0:u.focus({preventScroll:!0})});break;case xe.Tab:h.preventDefault(),h.stopPropagation(),r.closeMenu(),n.nextTick(()=>Um(ae(r.buttonRef),h.shiftKey?Jt.Previous:Jt.Next));break;default:h.key.length===1&&(r.search(h.key),l.value=setTimeout(()=>r.clearSearch(),350));break}}function d(h){switch(h.key){case xe.Space:h.preventDefault();break}}let f=yo(),p=n.computed(()=>f!==null?(f.value&Ue.Open)===Ue.Open:r.menuState.value===0);return()=>{var h,g;let u={open:r.menuState.value===0},{...m}=e,y={"aria-activedescendant":r.activeItemIndex.value===null||(h=r.items.value[r.activeItemIndex.value])==null?void 0:h.id,"aria-labelledby":(g=ae(r.buttonRef))==null?void 0:g.id,id:i,onKeydown:c,onKeyup:d,role:"menu",tabIndex:0,ref:r.itemsRef};return Pe({ourProps:y,theirProps:m,slot:u,attrs:t,slots:o,features:It.RenderStrategy|It.Static,visible:p.value,name:"MenuItems"})}}}),ra=n.defineComponent({name:"MenuItem",inheritAttrs:!1,props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(e,{slots:t,attrs:o,expose:a}){var s;let i=(s=e.id)!=null?s:`headlessui-menu-item-${lt()}`,r=Ja("MenuItem"),l=n.ref(null);a({el:l,$el:l});let c=n.computed(()=>r.activeItemIndex.value!==null?r.items.value[r.activeItemIndex.value].id===i:!1),d=Og(l),f=n.computed(()=>({disabled:e.disabled,get textValue(){return d()},domRef:l}));n.onMounted(()=>r.registerItem(i,f)),n.onUnmounted(()=>r.unregisterItem(i)),n.watchEffect(()=>{r.menuState.value===0&&c.value&&r.activationTrigger.value!==0&&n.nextTick(()=>{var v,b;return(b=(v=ae(l))==null?void 0:v.scrollIntoView)==null?void 0:b.call(v,{block:"nearest"})})});function p(v){if(e.disabled)return v.preventDefault();r.closeMenu(),Pl(ae(r.buttonRef))}function h(){if(e.disabled)return r.goToItem(ke.Nothing);r.goToItem(ke.Specific,i)}let g=Vl();function u(v){g.update(v)}function m(v){g.wasMoved(v)&&(e.disabled||c.value||r.goToItem(ke.Specific,i,0))}function y(v){g.wasMoved(v)&&(e.disabled||c.value&&r.goToItem(ke.Nothing))}return()=>{let{disabled:v}=e,b={active:c.value,disabled:v,close:r.closeMenu},{...N}=e;return Pe({ourProps:{id:i,ref:l,role:"menuitem",tabIndex:v===!0?void 0:-1,"aria-disabled":v===!0?!0:void 0,disabled:void 0,onClick:p,onFocus:h,onPointerenter:u,onMouseenter:u,onPointermove:m,onMousemove:m,onPointerleave:y,onMouseleave:y},theirProps:{...o,...N},slot:b,attrs:o,slots:t,name:"MenuItem"})}}});function Ig(e){let t={called:!1};return(...o)=>{if(!t.called)return t.called=!0,e(...o)}}function Os(e,...t){e&&t.length>0&&e.classList.add(...t)}function Qa(e,...t){e&&t.length>0&&e.classList.remove(...t)}var Ss=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(Ss||{});function Cg(e,t){let o=Vn();if(!e)return o.dispose;let{transitionDuration:a,transitionDelay:s}=getComputedStyle(e),[i,r]=[a,s].map(l=>{let[c=0]=l.split(",").filter(Boolean).map(d=>d.includes("ms")?parseFloat(d):parseFloat(d)*1e3).sort((d,f)=>f-d);return c});return i!==0?o.setTimeout(()=>t("finished"),i+r):t("finished"),o.add(()=>t("cancelled")),o.dispose}function vc(e,t,o,a,s,i){let r=Vn(),l=i!==void 0?Ig(i):()=>{};return Qa(e,...s),Os(e,...t,...o),r.nextFrame(()=>{Qa(e,...o),Os(e,...a),r.add(Cg(e,c=>(Qa(e,...a,...t),Os(e,...s),l(c))))}),r.add(()=>Qa(e,...t,...o,...a,...s)),r.add(()=>l("cancelled")),r.dispose}function zn(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let Ns=Symbol("TransitionContext");var kg=(e=>(e.Visible="visible",e.Hidden="hidden",e))(kg||{});function Ag(){return n.inject(Ns,null)!==null}function Dg(){let e=n.inject(Ns,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}function Bg(){let e=n.inject(Rs,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}let Rs=Symbol("NestingContext");function Za(e){return"children"in e?Za(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function bc(e){let t=n.ref([]),o=n.ref(!1);n.onMounted(()=>o.value=!0),n.onUnmounted(()=>o.value=!1);function a(i,r=xn.Hidden){let l=t.value.findIndex(({id:c})=>c===i);l!==-1&&($e(r,{[xn.Unmount](){t.value.splice(l,1)},[xn.Hidden](){t.value[l].state="hidden"}}),!Za(t)&&o.value&&e?.())}function s(i){let r=t.value.find(({id:l})=>l===i);return r?r.state!=="visible"&&(r.state="visible"):t.value.push({id:i,state:"visible"}),()=>a(i,xn.Unmount)}return{children:t,register:s,unregister:a}}let yc=It.RenderStrategy,On=n.defineComponent({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:o,slots:a,expose:s}){let i=n.ref(0);function r(){i.value|=Ue.Opening,t("beforeEnter")}function l(){i.value&=~Ue.Opening,t("afterEnter")}function c(){i.value|=Ue.Closing,t("beforeLeave")}function d(){i.value&=~Ue.Closing,t("afterLeave")}if(!Ag()&&Gm())return()=>n.h(sa,{...e,onBeforeEnter:r,onAfterEnter:l,onBeforeLeave:c,onAfterLeave:d},a);let f=n.ref(null),p=n.computed(()=>e.unmount?xn.Unmount:xn.Hidden);s({el:f,$el:f});let{show:h,appear:g}=Dg(),{register:u,unregister:m}=Bg(),y=n.ref(h.value?"visible":"hidden"),v={value:!0},b=lt(),N={value:!1},x=bc(()=>{!N.value&&y.value!=="hidden"&&(y.value="hidden",m(b),d())});n.onMounted(()=>{let P=u(b);n.onUnmounted(P)}),n.watchEffect(()=>{if(p.value===xn.Hidden&&b){if(h.value&&y.value!=="visible"){y.value="visible";return}$e(y.value,{hidden:()=>m(b),visible:()=>u(b)})}});let T=zn(e.enter),O=zn(e.enterFrom),B=zn(e.enterTo),I=zn(e.entered),D=zn(e.leave),C=zn(e.leaveFrom),F=zn(e.leaveTo);n.onMounted(()=>{n.watchEffect(()=>{if(y.value==="visible"){let P=ae(f);if(P instanceof Comment&&P.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function K(P){let U=v.value&&!g.value,j=ae(f);!j||!(j instanceof HTMLElement)||U||(N.value=!0,h.value&&r(),h.value||c(),P(h.value?vc(j,T,O,B,I,W=>{N.value=!1,W===Ss.Finished&&l()}):vc(j,D,C,F,I,W=>{N.value=!1,W===Ss.Finished&&(Za(x)||(y.value="hidden",m(b),d()))})))}return n.onMounted(()=>{n.watch([h],(P,U,j)=>{K(j),v.value=!1},{immediate:!0})}),n.provide(Rs,x),Xa(n.computed(()=>$e(y.value,{visible:Ue.Open,hidden:Ue.Closed})|i.value)),()=>{let{appear:P,show:U,enter:j,enterFrom:W,enterTo:q,entered:ne,leave:_e,leaveFrom:Ye,leaveTo:ie,...fe}=e,ye={ref:f},Te={...fe,...g.value&&h.value&&Zo.isServer?{class:n.normalizeClass([o.class,fe.class,...T,...O])}:{}};return Pe({theirProps:Te,ourProps:ye,slot:{},slots:a,attrs:o,features:yc,visible:y.value==="visible",name:"TransitionChild"})}}}),Pg=On,sa=n.defineComponent({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:o,slots:a}){let s=yo(),i=n.computed(()=>e.show===null&&s!==null?(s.value&Ue.Open)===Ue.Open:e.show);n.watchEffect(()=>{if(![!0,!1].includes(i.value))throw new Error('A is used but it is missing a `:show="true | false"` prop.')});let r=n.ref(i.value?"visible":"hidden"),l=bc(()=>{r.value="hidden"}),c=n.ref(!0),d={show:i,appear:n.computed(()=>e.appear||!c.value)};return n.onMounted(()=>{n.watchEffect(()=>{c.value=!1,i.value?r.value="visible":Za(l)||(r.value="hidden")})}),n.provide(Rs,l),n.provide(Ns,d),()=>{let f=$o(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),p={unmount:e.unmount};return Pe({ourProps:{...p,as:"template"},theirProps:{},slot:{},slots:{...a,default:()=>[n.h(Pg,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...o,...p,...f},a.default)]},attrs:{},features:yc,visible:r.value==="visible",name:"Transition"})}}});const Mg={},Lg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Fg=[n.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),n.createElementVNode("path",{d:"M8 5v10a1 1 0 0 0 1 1h10"},null,-1),n.createElementVNode("path",{d:"M5 8h10a1 1 0 0 1 1 1v10"},null,-1)];function Ug(e,t){return n.openBlock(),n.createElementBlock("svg",Lg,Fg)}const Ec=Fr(Mg,[["render",Ug]]),rt=n.defineComponent({__name:"IconButton",props:{variant:{default:"secondary"},type:{default:"button"},asAnchor:{type:Boolean,default:!1}},setup(e){const t=e,o={primary:"bg-blue-500 text-white focus:outline-blue-500",secondary:"bg-gray-300 dark:bg-gray-700 text-gray-800 dark:text-gray-200 focus:outline-blue-500",danger:"bg-red-500 text-white focus:outline-red-500",success:"bg-green-500 text-white focus:outline-green-500",transparent:"bg-transparent text-gray-800 dark:text-gray-100"},a=n.computed(()=>o[t.variant]);return(s,i)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(s.asAnchor?"a":"button"),{class:n.normalizeClass(`inline-flex items-center rounded-full border-0 p-2 shadow-sm focus:outline-none focus:ring-1 hover:opacity-75 disabled:opacity-25 ${a.value}`),type:s.asAnchor?void 0:s.type??"button"},{default:n.withCtx(()=>[n.renderSlot(s.$slots,"default")]),_:3},8,["class","type"]))}}),Hg=n.createElementVNode("div",{class:"fixed inset-0 bg-gray-800/20 backdrop-blur-sm transition-opacity"},null,-1),Vg={class:"flex items-end sm:items-center justify-center min-h-full p-0 md:p-4"},Eo=n.defineComponent({__name:"BaseModal",props:{name:{},initialFocusRef:{}},setup(e){const t=e;n.onBeforeUnmount(()=>{s.value&&i()});const o=De(),a=n.computed(()=>o.dark),s=n.computed(()=>o.isOpen(t.name)),i=()=>{o.closeModal({name:t.name})};return(r,l)=>(n.openBlock(),n.createBlock(n.unref(sa),{show:s.value,as:"template",class:"nova-file-manager"},{default:n.withCtx(()=>[n.createVNode(n.unref(Ya),{as:"div",class:"relative z-[60]",style:{"z-index":"999"},onClose:i,"initial-focus":r.initialFocusRef},{default:n.withCtx(()=>[n.createVNode(n.unref(On),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:n.withCtx(()=>[Hg]),_:1}),n.createElementVNode("div",{class:n.normalizeClass([{dark:a.value},"fixed z-10 inset-0 overflow-y-auto"])},[n.createElementVNode("div",Vg,[n.createVNode(n.unref(On),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:n.withCtx(()=>[n.renderSlot(r.$slots,"default",{close:i,isOpen:s.value,dark:a.value})]),_:3})])],2)]),_:3},8,["initial-focus"])]),_:3},8,["show"]))}}),PT="";var _c={},wc={exports:{}};/*! +`));let g=zl((r=p.props)!=null?r:{},c,f),u=n.cloneVNode(p,g,!0);for(let m in g)m.startsWith("on")&&(u.props||(u.props={}),u.props[m]=g[m]);return u}return Array.isArray(d)&&d.length===1?d[0]:d}return n.h(i,Object.assign({},c,f),{default:()=>d})}function Gl(e){return e.flatMap(t=>t.type===n.Fragment?Gl(t.children):[t])}function zl(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},o={};for(let a of e)for(let s in a)s.startsWith("on")&&typeof a[s]=="function"?(o[s]!=null||(o[s]=[]),o[s].push(a[s])):t[s]=a[s];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(o).map(a=>[a,void 0])));for(let a in o)Object.assign(t,{[a](s,...l){let r=o[a];for(let i of r){if(s instanceof Event&&s.defaultPrevented)return;i(s,...l)}}});return t}function Vm(e){let t=Object.assign({},e);for(let o in t)t[o]===void 0&&delete t[o];return t}function $o(e,t=[]){let o=Object.assign({},e);for(let a of t)a in o&&delete o[a];return o}function jm(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var ea=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ea||{});let Wa=n.defineComponent({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:o}){return()=>{var a;let{features:s,...l}=e,r={"aria-hidden":(s&2)===2?!0:(a=l["aria-hidden"])!=null?a:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(s&4)===4&&(s&2)!==2&&{display:"none"}}};return Pe({ourProps:r,theirProps:l,slot:{},attrs:o,slots:t,name:"Hidden"})}}}),Wl=Symbol("Context");var Ue=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ue||{});function Gm(){return yo()!==null}function yo(){return n.inject(Wl,null)}function Xa(e){n.provide(Wl,e)}var xe=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(xe||{});function zm(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let rn=[];zm(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&rn[0]!==t.target&&(rn.unshift(t.target),rn=rn.filter(o=>o!=null&&o.isConnected),rn.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function Wm(e){throw new Error("Unexpected object: "+e)}var ke=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(ke||{});function hs(e,t){let o=t.resolveItems();if(o.length<=0)return null;let a=t.resolveActiveIndex(),s=a??-1;switch(e.focus){case 0:{for(let l=0;l=0;--l)if(!t.resolveDisabled(o[l],l,o))return l;return a}case 2:{for(let l=s+1;l=0;--l)if(!t.resolveDisabled(o[l],l,o))return l;return a}case 4:{for(let l=0;lsetTimeout(()=>{throw t}))}function Vn(){let e=[],t={addEventListener(o,a,s,l){return o.addEventListener(a,s,l),t.add(()=>o.removeEventListener(a,s,l))},requestAnimationFrame(...o){let a=requestAnimationFrame(...o);t.add(()=>cancelAnimationFrame(a))},nextFrame(...o){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...o)})},setTimeout(...o){let a=setTimeout(...o);t.add(()=>clearTimeout(a))},microTask(...o){let a={current:!0};return ms(()=>{a.current&&o[0]()}),t.add(()=>{a.current=!1})},style(o,a,s){let l=o.style.getPropertyValue(a);return Object.assign(o.style,{[a]:s}),this.add(()=>{Object.assign(o.style,{[a]:l})})},group(o){let a=Vn();return o(a),this.add(()=>a.dispose())},add(o){return e.push(o),()=>{let a=e.indexOf(o);if(a>=0)for(let s of e.splice(a,1))s()}},dispose(){for(let o of e.splice(0))o()}};return t}function Xl(e={},t=null,o=[]){for(let[a,s]of Object.entries(e))Yl(o,Kl(t,a),s);return o}function Kl(e,t){return e?e+"["+t+"]":t}function Yl(e,t,o){if(Array.isArray(o))for(let[a,s]of o.entries())Yl(e,Kl(t,a.toString()),s);else o instanceof Date?e.push([t,o.toISOString()]):typeof o=="boolean"?e.push([t,o?"1":"0"]):typeof o=="string"?e.push([t,o]):typeof o=="number"?e.push([t,`${o}`]):o==null?e.push([t,""]):Xl(o,t,e)}function Xm(e,t){return e===t}var Km=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Km||{}),Ym=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Ym||{}),Jm=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Jm||{});let Jl=Symbol("ComboboxContext");function jn(e){let t=n.inject(Jl,null);if(t===null){let o=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,jn),o}return t}let Ql=Symbol("VirtualContext"),Qm=n.defineComponent({name:"VirtualProvider",setup(e,{slots:t}){let o=jn("VirtualProvider"),a=n.computed(()=>{let i=ae(o.optionsRef);if(!i)return{start:0,end:0};let c=window.getComputedStyle(i);return{start:parseFloat(c.paddingBlockStart||c.paddingTop),end:parseFloat(c.paddingBlockEnd||c.paddingBottom)}}),s=Rm(n.computed(()=>({scrollPaddingStart:a.value.start,scrollPaddingEnd:a.value.end,count:o.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return ae(o.optionsRef)},overscan:12}))),l=n.computed(()=>{var i;return(i=o.virtual.value)==null?void 0:i.options}),r=n.ref(0);return n.watch([l],()=>{r.value+=1}),n.provide(Ql,o.virtual.value?s:null),()=>[n.h("div",{style:{position:"relative",width:"100%",height:`${s.value.getTotalSize()}px`},ref:i=>{if(i){if(typeof process<"u"&&{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_d02172f7-3097-46ba-988e-cce01cfa3caa",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.5.0 node/v18.20.2 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_d02172f7-3097-46ba-988e-cce01cfa3caa",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/18.20.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/nova-file-manager/nova-file-manager/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"oneduo",GRADLE_HOME:"/usr/share/gradle-8.7",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/26.3.11579264",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"113685820",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu22",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/nova-file-manager/nova-file-manager",SYSTEMD_EXEC_PID:"599",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",GOROOT_1_20_X64:"/opt/hostedtoolcache/go/1.20.14/x64",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.9/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20240422.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.2/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",JOURNAL_STREAM:"8:19600",GITHUB_WORKFLOW:"Update Assets",_:"/opt/hostedtoolcache/node/18.20.2/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/18.20.2/x64",npm_config_npm_version:"10.5.0",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"8897439954",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"54cd2b8393f36719b9604514ab02c74ff35450e0",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",GITHUB_WORKFLOW_REF:"oneduo/nova-file-manager/.github/workflows/update-assets.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/18.20.2/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/nova-file-manager/nova-file-manager/node_modules/.bin:/home/runner/work/nova-file-manager/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/18.20.2/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/runner/work/nova-file-manager/nova-file-manager/node_modules/.bin:/home/runner/work/nova-file-manager/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/18.20.2/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/18.20.2/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_831e52aa-197c-48e8-8f36-a86dc4305bd3",INVOCATION_ID:"55586f825d4b468194282800c69eb721",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/18.20.2/x64/bin/node",npm_package_name:"nova-file-manager",GITHUB_ACTION:"__run",GITHUB_RUN_NUMBER:"614",GITHUB_TRIGGERING_ACTOR:"Rezrazi",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 14",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"oneduo/nova-file-manager",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"505375003",GITHUB_ACTIONS:"true",npm_package_version:"0.8.0",npm_lifecycle_event:"build",GITHUB_REF_PROTECTED:"false",GITHUB_WORKSPACE:"/home/runner/work/nova-file-manager/nova-file-manager",ACCEPT_EULA:"Y",GITHUB_JOB:"update",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"54cd2b8393f36719b9604514ab02c74ff35450e0",GITHUB_RUN_ATTEMPT:"1",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"Rezrazi",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",LEIN_HOME:"/usr/local/lib/lein",npm_config_globalconfig:"/opt/hostedtoolcache/node/18.20.2/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_d02172f7-3097-46ba-988e-cce01cfa3caa",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/nova-file-manager/nova-file-manager",GITHUB_ACTOR_ID:"2086576",RUNNER_WORKSPACE:"/home/runner/work/nova-file-manager",npm_execpath:"/opt/hostedtoolcache/node/18.20.2/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_d02172f7-3097-46ba-988e-cce01cfa3caa",npm_config_global_prefix:"/opt/hostedtoolcache/node/18.20.2/x64",TAILWIND_MODE:"build",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/25.2.9519653",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",STATS_EXTP:"https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.172+1/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_d02172f7-3097-46ba-988e-cce01cfa3caa",INIT_CWD:"/home/runner/work/nova-file-manager/nova-file-manager",EDITOR:"vi",NODE_ENV:"production"}.JEST_WORKER_ID!==void 0||o.activationTrigger.value===0)return;o.activeOptionIndex.value!==null&&o.virtual.value.options.length>o.activeOptionIndex.value&&s.value.scrollToIndex(o.activeOptionIndex.value)}}},s.value.getVirtualItems().map(i=>n.cloneVNode(t.default({option:o.virtual.value.options[i.index],open:o.comboboxState.value===0})[0],{key:`${r.value}-${i.index}`,"data-index":i.index,"aria-setsize":o.virtual.value.options.length,"aria-posinset":i.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${i.start}px)`,overflowAnchor:"none"}})))]}}),Zm=n.defineComponent({name:"Combobox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],nullable:!0,default:null},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1},virtual:{type:Object,default:null}},inheritAttrs:!1,setup(e,{slots:t,attrs:o,emit:a}){let s=n.ref(1),l=n.ref(null),r=n.ref(null),i=n.ref(null),c=n.ref(null),d=n.ref({static:!1,hold:!1}),f=n.ref([]),p=n.ref(null),h=n.ref(2),g=n.ref(!1);function u(C=F=>F){let F=p.value!==null?f.value[p.value]:null,K=C(f.value.slice()),P=K.length>0&&K[0].dataRef.order.value!==null?K.sort((j,W)=>j.dataRef.order.value-W.dataRef.order.value):ds(K,j=>ae(j.dataRef.domRef)),U=F?P.indexOf(F):null;return U===-1&&(U=null),{options:P,activeOptionIndex:U}}let m=n.computed(()=>e.multiple?1:0),y=n.computed(()=>e.nullable),[v,b]=Im(n.computed(()=>e.modelValue),C=>a("update:modelValue",C),n.computed(()=>e.defaultValue)),N=n.computed(()=>v.value===void 0?$e(m.value,{1:[],0:void 0}):v.value),x=null,T=null;function O(C){return $e(m.value,{0(){return b?.(C)},1:()=>{let F=n.toRaw(I.value.value).slice(),K=n.toRaw(C),P=F.findIndex(U=>I.compare(K,n.toRaw(U)));return P===-1?F.push(K):F.splice(P,1),b?.(F)}})}let B=n.computed(()=>{});n.watch([B],([C],[F])=>{if(I.virtual.value&&C&&F&&p.value!==null){let K=C.indexOf(F[p.value]);K!==-1?p.value=K:p.value=null}});let I={comboboxState:s,value:N,mode:m,compare(C,F){if(typeof e.by=="string"){let K=e.by;return C?.[K]===F?.[K]}return e.by===null?Xm(C,F):e.by(C,F)},calculateIndex(C){return I.virtual.value?e.by===null?I.virtual.value.options.indexOf(C):I.virtual.value.options.findIndex(F=>I.compare(F,C)):f.value.findIndex(F=>I.compare(F.dataRef.value,C))},defaultValue:n.computed(()=>e.defaultValue),nullable:y,immediate:n.computed(()=>!1),virtual:n.computed(()=>null),inputRef:r,labelRef:l,buttonRef:i,optionsRef:c,disabled:n.computed(()=>e.disabled),options:f,change(C){b(C)},activeOptionIndex:n.computed(()=>{if(g.value&&p.value===null&&(I.virtual.value?I.virtual.value.options.length>0:f.value.length>0)){if(I.virtual.value){let F=I.virtual.value.options.findIndex(K=>{var P;return!((P=I.virtual.value)!=null&&P.disabled(K))});if(F!==-1)return F}let C=f.value.findIndex(F=>!F.dataRef.disabled);if(C!==-1)return C}return p.value}),activationTrigger:h,optionsPropsRef:d,closeCombobox(){g.value=!1,!e.disabled&&s.value!==1&&(s.value=1,p.value=null)},openCombobox(){if(g.value=!0,!e.disabled&&s.value!==0){if(I.value.value){let C=I.calculateIndex(I.value.value);C!==-1&&(p.value=C)}s.value=0}},setActivationTrigger(C){h.value=C},goToOption(C,F,K){g.value=!1,x!==null&&cancelAnimationFrame(x),x=requestAnimationFrame(()=>{if(e.disabled||c.value&&!d.value.static&&s.value===1)return;if(I.virtual.value){p.value=C===ke.Specific?F:hs({focus:C},{resolveItems:()=>I.virtual.value.options,resolveActiveIndex:()=>{var j,W;return(W=(j=I.activeOptionIndex.value)!=null?j:I.virtual.value.options.findIndex(q=>{var ne;return!((ne=I.virtual.value)!=null&&ne.disabled(q))}))!=null?W:null},resolveDisabled:j=>I.virtual.value.disabled(j),resolveId(){throw new Error("Function not implemented.")}}),h.value=K??2;return}let P=u();if(P.activeOptionIndex===null){let j=P.options.findIndex(W=>!W.dataRef.disabled);j!==-1&&(P.activeOptionIndex=j)}let U=C===ke.Specific?F:hs({focus:C},{resolveItems:()=>P.options,resolveActiveIndex:()=>P.activeOptionIndex,resolveId:j=>j.id,resolveDisabled:j=>j.dataRef.disabled});p.value=U,h.value=K??2,f.value=P.options})},selectOption(C){let F=f.value.find(P=>P.id===C);if(!F)return;let{dataRef:K}=F;O(K.value)},selectActiveOption(){if(I.activeOptionIndex.value!==null){if(I.virtual.value)O(I.virtual.value.options[I.activeOptionIndex.value]);else{let{dataRef:C}=f.value[I.activeOptionIndex.value];O(C.value)}I.goToOption(ke.Specific,I.activeOptionIndex.value)}},registerOption(C,F){let K=n.reactive({id:C,dataRef:F});if(I.virtual.value){f.value.push(K);return}T&&cancelAnimationFrame(T);let P=u(U=>(U.push(K),U));p.value===null&&I.isSelected(F.value.value)&&(P.activeOptionIndex=P.options.indexOf(K)),f.value=P.options,p.value=P.activeOptionIndex,h.value=2,P.options.some(U=>!ae(U.dataRef.domRef))&&(T=requestAnimationFrame(()=>{let U=u();f.value=U.options,p.value=U.activeOptionIndex}))},unregisterOption(C,F){if(x!==null&&cancelAnimationFrame(x),F&&(g.value=!0),I.virtual.value){f.value=f.value.filter(P=>P.id!==C);return}let K=u(P=>{let U=P.findIndex(j=>j.id===C);return U!==-1&&P.splice(U,1),P});f.value=K.options,p.value=K.activeOptionIndex,h.value=2},isSelected(C){return $e(m.value,{0:()=>I.compare(n.toRaw(I.value.value),n.toRaw(C)),1:()=>n.toRaw(I.value.value).some(F=>I.compare(n.toRaw(F),n.toRaw(C)))})},isActive(C){return p.value===I.calculateIndex(C)}};us([r,i,c],()=>I.closeCombobox(),n.computed(()=>s.value===0)),n.provide(Jl,I),Xa(n.computed(()=>$e(s.value,{0:Ue.Open,1:Ue.Closed})));let D=n.computed(()=>{var C;return(C=ae(r))==null?void 0:C.closest("form")});return n.onMounted(()=>{n.watch([D],()=>{if(!D.value||e.defaultValue===void 0)return;function C(){I.change(e.defaultValue)}return D.value.addEventListener("reset",C),()=>{var F;(F=D.value)==null||F.removeEventListener("reset",C)}},{immediate:!0})}),()=>{var C,F,K;let{name:P,disabled:U,form:j,...W}=e,q={open:s.value===0,disabled:U,activeIndex:I.activeOptionIndex.value,activeOption:I.activeOptionIndex.value===null?null:I.virtual.value?I.virtual.value.options[(C=I.activeOptionIndex.value)!=null?C:0]:(K=(F=I.options.value[I.activeOptionIndex.value])==null?void 0:F.dataRef.value)!=null?K:null,value:N.value};return n.h(n.Fragment,[...P!=null&&N.value!=null?Xl({[P]:N.value}).map(([ne,_e])=>n.h(Wa,Vm({features:ea.Hidden,key:ne,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:j,name:ne,value:_e}))):[],Pe({theirProps:{...o,...$o(W,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:q,slots:t,attrs:o,name:"Combobox"})])}}});n.defineComponent({name:"ComboboxLabel",props:{as:{type:[Object,String],default:"label"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o}){var a;let s=(a=e.id)!=null?a:`headlessui-combobox-label-${lt()}`,l=jn("ComboboxLabel");function r(){var i;(i=ae(l.inputRef))==null||i.focus({preventScroll:!0})}return()=>{let i={open:l.comboboxState.value===0,disabled:l.disabled.value},{...c}=e,d={id:s,ref:l.labelRef,onClick:r};return Pe({ourProps:d,theirProps:c,slot:i,attrs:t,slots:o,name:"ComboboxLabel"})}}}),n.defineComponent({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){var s;let l=(s=e.id)!=null?s:`headlessui-combobox-button-${lt()}`,r=jn("ComboboxButton");a({el:r.buttonRef,$el:r.buttonRef});function i(f){r.disabled.value||(r.comboboxState.value===0?r.closeCombobox():(f.preventDefault(),r.openCombobox()),n.nextTick(()=>{var p;return(p=ae(r.inputRef))==null?void 0:p.focus({preventScroll:!0})}))}function c(f){switch(f.key){case xe.ArrowDown:f.preventDefault(),f.stopPropagation(),r.comboboxState.value===1&&r.openCombobox(),n.nextTick(()=>{var p;return(p=r.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return;case xe.ArrowUp:f.preventDefault(),f.stopPropagation(),r.comboboxState.value===1&&(r.openCombobox(),n.nextTick(()=>{r.value.value||r.goToOption(ke.Last)})),n.nextTick(()=>{var p;return(p=r.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return;case xe.Escape:if(r.comboboxState.value!==0)return;f.preventDefault(),r.optionsRef.value&&!r.optionsPropsRef.value.static&&f.stopPropagation(),r.closeCombobox(),n.nextTick(()=>{var p;return(p=r.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return}}let d=fs(n.computed(()=>({as:e.as,type:t.type})),r.buttonRef);return()=>{var f,p;let h={open:r.comboboxState.value===0,disabled:r.disabled.value,value:r.value.value},{...g}=e,u={ref:r.buttonRef,id:l,type:d.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(f=ae(r.optionsRef))==null?void 0:f.id,"aria-expanded":r.comboboxState.value===0,"aria-labelledby":r.labelRef.value?[(p=ae(r.labelRef))==null?void 0:p.id,l].join(" "):void 0,disabled:r.disabled.value===!0?!0:void 0,onKeydown:c,onClick:i};return Pe({ourProps:u,theirProps:g,slot:h,attrs:t,slots:o,name:"ComboboxButton"})}}});let qm=n.defineComponent({name:"ComboboxInput",props:{as:{type:[Object,String],default:"input"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:null}},emits:{change:e=>!0},setup(e,{emit:t,attrs:o,slots:a,expose:s}){var l;let r=(l=e.id)!=null?l:`headlessui-combobox-input-${lt()}`,i=jn("ComboboxInput"),c=n.computed(()=>an(ae(i.inputRef))),d={value:!1};s({el:i.inputRef,$el:i.inputRef});function f(){i.change(null);let x=ae(i.optionsRef);x&&(x.scrollTop=0),i.goToOption(ke.Nothing)}let p=n.computed(()=>{var x;let T=i.value.value;return ae(i.inputRef)?typeof e.displayValue<"u"&&T!==void 0?(x=e.displayValue(T))!=null?x:"":typeof T=="string"?T:"":""});n.onMounted(()=>{n.watch([p,i.comboboxState,c],([x,T],[O,B])=>{if(d.value)return;let I=ae(i.inputRef);I&&((B===0&&T===1||x!==O)&&(I.value=x),requestAnimationFrame(()=>{var D;if(d.value||!I||((D=c.value)==null?void 0:D.activeElement)!==I)return;let{selectionStart:C,selectionEnd:F}=I;Math.abs((F??0)-(C??0))===0&&C===0&&I.setSelectionRange(I.value.length,I.value.length)}))},{immediate:!0}),n.watch([i.comboboxState],([x],[T])=>{if(x===0&&T===1){if(d.value)return;let O=ae(i.inputRef);if(!O)return;let B=O.value,{selectionStart:I,selectionEnd:D,selectionDirection:C}=O;O.value="",O.value=B,C!==null?O.setSelectionRange(I,D,C):O.setSelectionRange(I,D)}})});let h=n.ref(!1);function g(){h.value=!0}function u(){Vn().nextFrame(()=>{h.value=!1})}function m(x){switch(d.value=!0,x.key){case xe.Enter:if(d.value=!1,i.comboboxState.value!==0||h.value)return;if(x.preventDefault(),x.stopPropagation(),i.activeOptionIndex.value===null){i.closeCombobox();return}i.selectActiveOption(),i.mode.value===0&&i.closeCombobox();break;case xe.ArrowDown:return d.value=!1,x.preventDefault(),x.stopPropagation(),$e(i.comboboxState.value,{0:()=>i.goToOption(ke.Next),1:()=>i.openCombobox()});case xe.ArrowUp:return d.value=!1,x.preventDefault(),x.stopPropagation(),$e(i.comboboxState.value,{0:()=>i.goToOption(ke.Previous),1:()=>{i.openCombobox(),n.nextTick(()=>{i.value.value||i.goToOption(ke.Last)})}});case xe.Home:if(x.shiftKey)break;return d.value=!1,x.preventDefault(),x.stopPropagation(),i.goToOption(ke.First);case xe.PageUp:return d.value=!1,x.preventDefault(),x.stopPropagation(),i.goToOption(ke.First);case xe.End:if(x.shiftKey)break;return d.value=!1,x.preventDefault(),x.stopPropagation(),i.goToOption(ke.Last);case xe.PageDown:return d.value=!1,x.preventDefault(),x.stopPropagation(),i.goToOption(ke.Last);case xe.Escape:if(d.value=!1,i.comboboxState.value!==0)return;x.preventDefault(),i.optionsRef.value&&!i.optionsPropsRef.value.static&&x.stopPropagation(),i.nullable.value&&i.mode.value===0&&i.value.value===null&&f(),i.closeCombobox();break;case xe.Tab:if(d.value=!1,i.comboboxState.value!==0)return;i.mode.value===0&&i.activationTrigger.value!==1&&i.selectActiveOption(),i.closeCombobox();break}}function y(x){t("change",x),i.nullable.value&&i.mode.value===0&&x.target.value===""&&f(),i.openCombobox()}function v(x){var T,O,B;let I=(T=x.relatedTarget)!=null?T:rn.find(D=>D!==x.currentTarget);if(d.value=!1,!((O=ae(i.optionsRef))!=null&&O.contains(I))&&!((B=ae(i.buttonRef))!=null&&B.contains(I))&&i.comboboxState.value===0)return x.preventDefault(),i.mode.value===0&&(i.nullable.value&&i.value.value===null?f():i.activationTrigger.value!==1&&i.selectActiveOption()),i.closeCombobox()}function b(x){var T,O,B;let I=(T=x.relatedTarget)!=null?T:rn.find(D=>D!==x.currentTarget);(O=ae(i.buttonRef))!=null&&O.contains(I)||(B=ae(i.optionsRef))!=null&&B.contains(I)||i.disabled.value||i.immediate.value&&i.comboboxState.value!==0&&(i.openCombobox(),Vn().nextFrame(()=>{i.setActivationTrigger(1)}))}let N=n.computed(()=>{var x,T,O,B;return(B=(O=(T=e.defaultValue)!=null?T:i.defaultValue.value!==void 0?(x=e.displayValue)==null?void 0:x.call(e,i.defaultValue.value):null)!=null?O:i.defaultValue.value)!=null?B:""});return()=>{var x,T,O,B,I,D,C;let F={open:i.comboboxState.value===0},{displayValue:K,onChange:P,...U}=e,j={"aria-controls":(x=i.optionsRef.value)==null?void 0:x.id,"aria-expanded":i.comboboxState.value===0,"aria-activedescendant":i.activeOptionIndex.value===null?void 0:i.virtual.value?(T=i.options.value.find(W=>!i.virtual.value.disabled(W.dataRef.value)&&i.compare(W.dataRef.value,i.virtual.value.options[i.activeOptionIndex.value])))==null?void 0:T.id:(O=i.options.value[i.activeOptionIndex.value])==null?void 0:O.id,"aria-labelledby":(D=(B=ae(i.labelRef))==null?void 0:B.id)!=null?D:(I=ae(i.buttonRef))==null?void 0:I.id,"aria-autocomplete":"list",id:r,onCompositionstart:g,onCompositionend:u,onKeydown:m,onInput:y,onFocus:b,onBlur:v,role:"combobox",type:(C=o.type)!=null?C:"text",tabIndex:0,ref:i.inputRef,defaultValue:N.value,disabled:i.disabled.value===!0?!0:void 0};return Pe({ourProps:j,theirProps:U,slot:F,attrs:o,slots:a,features:It.RenderStrategy|It.Static,name:"ComboboxInput"})}}}),$m=n.defineComponent({name:"ComboboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(e,{attrs:t,slots:o,expose:a}){let s=jn("ComboboxOptions"),l=`headlessui-combobox-options-${lt()}`;a({el:s.optionsRef,$el:s.optionsRef}),n.watchEffect(()=>{s.optionsPropsRef.value.static=e.static}),n.watchEffect(()=>{s.optionsPropsRef.value.hold=e.hold});let r=yo(),i=n.computed(()=>r!==null?(r.value&Ue.Open)===Ue.Open:s.comboboxState.value===0);return jl({container:n.computed(()=>ae(s.optionsRef)),enabled:n.computed(()=>s.comboboxState.value===0),accept(c){return c.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:c.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(c){c.setAttribute("role","none")}}),()=>{var c,d,f;let p={open:s.comboboxState.value===0},h={"aria-labelledby":(f=(c=ae(s.labelRef))==null?void 0:c.id)!=null?f:(d=ae(s.buttonRef))==null?void 0:d.id,id:l,ref:s.optionsRef,role:"listbox","aria-multiselectable":s.mode.value===1?!0:void 0},g=$o(e,["hold"]);return Pe({ourProps:h,theirProps:g,slot:p,attrs:t,slots:s.virtual.value&&s.comboboxState.value===0?{...o,default:()=>[n.h(Qm,{},o.default)]}:o,features:It.RenderStrategy|It.Static,visible:i.value,name:"ComboboxOptions"})}}}),Zl=n.defineComponent({name:"ComboboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},order:{type:[Number],default:null}},setup(e,{slots:t,attrs:o,expose:a}){let s=jn("ComboboxOption"),l=`headlessui-combobox-option-${lt()}`,r=n.ref(null);a({el:r,$el:r});let i=n.computed(()=>{var v;return s.virtual.value?s.activeOptionIndex.value===s.calculateIndex(e.value):s.activeOptionIndex.value===null?!1:((v=s.options.value[s.activeOptionIndex.value])==null?void 0:v.id)===l}),c=n.computed(()=>s.isSelected(e.value)),d=n.inject(Ql,null),f=n.computed(()=>({disabled:e.disabled,value:e.value,domRef:r,order:n.computed(()=>e.order)}));n.onMounted(()=>s.registerOption(l,f)),n.onUnmounted(()=>s.unregisterOption(l,i.value)),n.watchEffect(()=>{let v=ae(r);v&&d?.value.measureElement(v)}),n.watchEffect(()=>{s.comboboxState.value===0&&i.value&&(s.virtual.value||s.activationTrigger.value!==0&&n.nextTick(()=>{var v,b;return(b=(v=ae(r))==null?void 0:v.scrollIntoView)==null?void 0:b.call(v,{block:"nearest"})}))});function p(v){var b;if(e.disabled||(b=s.virtual.value)!=null&&b.disabled(e.value))return v.preventDefault();s.selectOption(l),Ll()||requestAnimationFrame(()=>{var N;return(N=ae(s.inputRef))==null?void 0:N.focus({preventScroll:!0})}),s.mode.value===0&&requestAnimationFrame(()=>s.closeCombobox())}function h(){var v;if(e.disabled||(v=s.virtual.value)!=null&&v.disabled(e.value))return s.goToOption(ke.Nothing);let b=s.calculateIndex(e.value);s.goToOption(ke.Specific,b)}let g=Vl();function u(v){g.update(v)}function m(v){var b;if(!g.wasMoved(v)||e.disabled||(b=s.virtual.value)!=null&&b.disabled(e.value)||i.value)return;let N=s.calculateIndex(e.value);s.goToOption(ke.Specific,N,0)}function y(v){var b;g.wasMoved(v)&&(e.disabled||(b=s.virtual.value)!=null&&b.disabled(e.value)||i.value&&(s.optionsPropsRef.value.hold||s.goToOption(ke.Nothing)))}return()=>{let{disabled:v}=e,b={active:i.value,selected:c.value,disabled:v},N={id:l,ref:r,role:"option",tabIndex:v===!0?void 0:-1,"aria-disabled":v===!0?!0:void 0,"aria-selected":c.value,disabled:void 0,onClick:p,onFocus:h,onPointerenter:u,onMouseenter:u,onPointermove:m,onMousemove:m,onPointerleave:y,onMouseleave:y},x=$o(e,["order","value"]);return Pe({ourProps:N,theirProps:x,slot:b,attrs:o,slots:t,name:"ComboboxOption"})}}});function ql(e,t,o,a){Zo.isServer||n.watchEffect(s=>{e=e??window,e.addEventListener(t,o,a),s(()=>e.removeEventListener(t,o,a))})}var ta=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(ta||{});function eg(){let e=n.ref(0);return Fl("keydown",t=>{t.key==="Tab"&&(e.value=t.shiftKey?1:0)}),e}function $l(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let o of e.value){let a=ae(o);a instanceof HTMLElement&&t.add(a)}return t}var ec=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(ec||{});let na=Object.assign(n.defineComponent({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:n.ref(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:o,expose:a}){let s=n.ref(null);a({el:s,$el:s});let l=n.computed(()=>an(s)),r=n.ref(!1);n.onMounted(()=>r.value=!0),n.onUnmounted(()=>r.value=!1),ng({ownerDocument:l},n.computed(()=>r.value&&!!(e.features&16)));let i=og({ownerDocument:l,container:s,initialFocus:n.computed(()=>e.initialFocus)},n.computed(()=>r.value&&!!(e.features&2)));ag({ownerDocument:l,container:s,containers:e.containers,previousActiveElement:i},n.computed(()=>r.value&&!!(e.features&8)));let c=eg();function d(g){let u=ae(s);u&&(m=>m())(()=>{$e(c.value,{[ta.Forwards]:()=>{qo(u,Jt.First,{skipElements:[g.relatedTarget]})},[ta.Backwards]:()=>{qo(u,Jt.Last,{skipElements:[g.relatedTarget]})}})})}let f=n.ref(!1);function p(g){g.key==="Tab"&&(f.value=!0,requestAnimationFrame(()=>{f.value=!1}))}function h(g){if(!r.value)return;let u=$l(e.containers);ae(s)instanceof HTMLElement&&u.add(ae(s));let m=g.relatedTarget;m instanceof HTMLElement&&m.dataset.headlessuiFocusGuard!=="true"&&(tc(u,m)||(f.value?qo(ae(s),$e(c.value,{[ta.Forwards]:()=>Jt.Next,[ta.Backwards]:()=>Jt.Previous})|Jt.WrapAround,{relativeTo:g.target}):g.target instanceof HTMLElement&&Tn(g.target)))}return()=>{let g={},u={ref:s,onKeydown:p,onFocusout:h},{features:m,initialFocus:y,containers:v,...b}=e;return n.h(n.Fragment,[!!(m&4)&&n.h(Wa,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:ea.Focusable}),Pe({ourProps:u,theirProps:{...t,...b},slot:g,attrs:t,slots:o,name:"FocusTrap"}),!!(m&4)&&n.h(Wa,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:ea.Focusable})])}}}),{features:ec});function tg(e){let t=n.ref(rn.slice());return n.watch([e],([o],[a])=>{a===!0&&o===!1?ms(()=>{t.value.splice(0)}):a===!1&&o===!0&&(t.value=rn.slice())},{flush:"post"}),()=>{var o;return(o=t.value.find(a=>a!=null&&a.isConnected))!=null?o:null}}function ng({ownerDocument:e},t){let o=tg(t);n.onMounted(()=>{n.watchEffect(()=>{var a,s;t.value||((a=e.value)==null?void 0:a.activeElement)===((s=e.value)==null?void 0:s.body)&&Tn(o())},{flush:"post"})}),n.onUnmounted(()=>{t.value&&Tn(o())})}function og({ownerDocument:e,container:t,initialFocus:o},a){let s=n.ref(null),l=n.ref(!1);return n.onMounted(()=>l.value=!0),n.onUnmounted(()=>l.value=!1),n.onMounted(()=>{n.watch([t,o,a],(r,i)=>{if(r.every((d,f)=>i?.[f]===d)||!a.value)return;let c=ae(t);c&&ms(()=>{var d,f;if(!l.value)return;let p=ae(o),h=(d=e.value)==null?void 0:d.activeElement;if(p){if(p===h){s.value=h;return}}else if(c.contains(h)){s.value=h;return}p?Tn(p):qo(c,Jt.First|Jt.NoScroll)===Dl.Error&&console.warn("There are no focusable elements inside the "),s.value=(f=e.value)==null?void 0:f.activeElement})},{immediate:!0,flush:"post"})}),s}function ag({ownerDocument:e,container:t,containers:o,previousActiveElement:a},s){var l;ql((l=e.value)==null?void 0:l.defaultView,"focus",r=>{if(!s.value)return;let i=$l(o);ae(t)instanceof HTMLElement&&i.add(ae(t));let c=a.value;if(!c)return;let d=r.target;d&&d instanceof HTMLElement?tc(i,d)?(a.value=d,Tn(d)):(r.preventDefault(),r.stopPropagation(),Tn(c)):Tn(a.value)},!0)}function tc(e,t){for(let o of e)if(o.contains(t))return!0;return!1}function rg(e){let t=n.shallowRef(e.getSnapshot());return n.onUnmounted(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function sg(e,t){let o=e(),a=new Set;return{getSnapshot(){return o},subscribe(s){return a.add(s),()=>a.delete(s)},dispatch(s,...l){let r=t[s].call(o,...l);r&&(o=r,a.forEach(i=>i()))}}}function ig(){let e;return{before({doc:t}){var o;let a=t.documentElement;e=((o=t.defaultView)!=null?o:window).innerWidth-a.clientWidth},after({doc:t,d:o}){let a=t.documentElement,s=a.clientWidth-a.offsetWidth,l=e-s;o.style(a,"paddingRight",`${l}px`)}}}function lg(){return Ml()?{before({doc:e,d:t,meta:o}){function a(s){return o.containers.flatMap(l=>l()).some(l=>l.contains(s))}t.microTask(()=>{var s;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let i=Vn();i.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>i.dispose()))}let l=(s=window.scrollY)!=null?s:window.pageYOffset,r=null;t.addEventListener(e,"click",i=>{if(i.target instanceof HTMLElement)try{let c=i.target.closest("a");if(!c)return;let{hash:d}=new URL(c.href),f=e.querySelector(d);f&&!a(f)&&(r=f)}catch{}},!0),t.addEventListener(e,"touchstart",i=>{if(i.target instanceof HTMLElement)if(a(i.target)){let c=i.target;for(;c.parentElement&&a(c.parentElement);)c=c.parentElement;t.style(c,"overscrollBehavior","contain")}else t.style(i.target,"touchAction","none")}),t.addEventListener(e,"touchmove",i=>{if(i.target instanceof HTMLElement)if(a(i.target)){let c=i.target;for(;c.parentElement&&c.dataset.headlessuiPortal!==""&&!(c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth);)c=c.parentElement;c.dataset.headlessuiPortal===""&&i.preventDefault()}else i.preventDefault()},{passive:!1}),t.add(()=>{var i;let c=(i=window.scrollY)!=null?i:window.pageYOffset;l!==c&&window.scrollTo(0,l),r&&r.isConnected&&(r.scrollIntoView({block:"nearest"}),r=null)})})}}:{}}function cg(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function dg(e){let t={};for(let o of e)Object.assign(t,o(t));return t}let Gn=sg(()=>new Map,{PUSH(e,t){var o;let a=(o=this.get(e))!=null?o:{doc:e,count:0,d:Vn(),meta:new Set};return a.count++,a.meta.add(t),this.set(e,a),this},POP(e,t){let o=this.get(e);return o&&(o.count--,o.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:o}){let a={doc:e,d:t,meta:dg(o)},s=[lg(),ig(),cg()];s.forEach(({before:l})=>l?.(a)),s.forEach(({after:l})=>l?.(a))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Gn.subscribe(()=>{let e=Gn.getSnapshot(),t=new Map;for(let[o]of e)t.set(o,o.documentElement.style.overflow);for(let o of e.values()){let a=t.get(o.doc)==="hidden",s=o.count!==0;(s&&!a||!s&&a)&&Gn.dispatch(o.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",o),o.count===0&&Gn.dispatch("TEARDOWN",o)}});function ug(e,t,o){let a=rg(Gn),s=n.computed(()=>{let l=e.value?a.value.get(e.value):void 0;return l?l.count>0:!1});return n.watch([e,t],([l,r],[i],c)=>{if(!l||!r)return;Gn.dispatch("PUSH",l,o);let d=!1;c(()=>{d||(Gn.dispatch("POP",i??l,o),d=!0)})},{immediate:!0}),s}let gs=new Map,oa=new Map;function nc(e,t=n.ref(!0)){n.watchEffect(o=>{var a;if(!t.value)return;let s=ae(e);if(!s)return;o(function(){var r;if(!s)return;let i=(r=oa.get(s))!=null?r:1;if(i===1?oa.delete(s):oa.set(s,i-1),i!==1)return;let c=gs.get(s);c&&(c["aria-hidden"]===null?s.removeAttribute("aria-hidden"):s.setAttribute("aria-hidden",c["aria-hidden"]),s.inert=c.inert,gs.delete(s))});let l=(a=oa.get(s))!=null?a:0;oa.set(s,l+1),l===0&&(gs.set(s,{"aria-hidden":s.getAttribute("aria-hidden"),inert:s.inert}),s.setAttribute("aria-hidden","true"),s.inert=!0)})}function fg({defaultContainers:e=[],portals:t,mainTreeNodeRef:o}={}){let a=n.ref(null),s=an(a);function l(){var r,i,c;let d=[];for(let f of e)f!==null&&(f instanceof HTMLElement?d.push(f):"value"in f&&f.value instanceof HTMLElement&&d.push(f.value));if(t!=null&&t.value)for(let f of t.value)d.push(f);for(let f of(r=s?.querySelectorAll("html > *, body > *"))!=null?r:[])f!==document.body&&f!==document.head&&f instanceof HTMLElement&&f.id!=="headlessui-portal-root"&&(f.contains(ae(a))||f.contains((c=(i=ae(a))==null?void 0:i.getRootNode())==null?void 0:c.host)||d.some(p=>f.contains(p))||d.push(f));return d}return{resolveContainers:l,contains(r){return l().some(i=>i.contains(r))},mainTreeNodeRef:a,MainTreeNode(){return o!=null?null:n.h(Wa,{features:ea.Hidden,ref:a})}}}let oc=Symbol("ForcePortalRootContext");function pg(){return n.inject(oc,!1)}let vs=n.defineComponent({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:o}){return n.provide(oc,e.force),()=>{let{force:a,...s}=e;return Pe({theirProps:s,ourProps:{},slot:{},slots:t,attrs:o,name:"ForcePortalRoot"})}}}),ac=Symbol("StackContext");var bs=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(bs||{});function hg(){return n.inject(ac,()=>{})}function mg({type:e,enabled:t,element:o,onUpdate:a}){let s=hg();function l(...r){a?.(...r),s(...r)}n.onMounted(()=>{n.watch(t,(r,i)=>{r?l(0,e,o):i===!0&&l(1,e,o)},{immediate:!0,flush:"sync"})}),n.onUnmounted(()=>{t.value&&l(1,e,o)}),n.provide(ac,l)}let rc=Symbol("DescriptionContext");function gg(){let e=n.inject(rc,null);if(e===null)throw new Error("Missing parent");return e}function vg({slot:e=n.ref({}),name:t="Description",props:o={}}={}){let a=n.ref([]);function s(l){return a.value.push(l),()=>{let r=a.value.indexOf(l);r!==-1&&a.value.splice(r,1)}}return n.provide(rc,{register:s,slot:e,name:t,props:o}),n.computed(()=>a.value.length>0?a.value.join(" "):void 0)}n.defineComponent({name:"Description",props:{as:{type:[Object,String],default:"p"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o}){var a;let s=(a=e.id)!=null?a:`headlessui-description-${lt()}`,l=gg();return n.onMounted(()=>n.onUnmounted(l.register(s))),()=>{let{name:r="Description",slot:i=n.ref({}),props:c={}}=l,{...d}=e,f={...Object.entries(c).reduce((p,[h,g])=>Object.assign(p,{[h]:n.unref(g)}),{}),id:s};return Pe({ourProps:f,theirProps:d,slot:i.value,attrs:t,slots:o,name:r})}}});function bg(e){let t=an(e);if(!t){if(e===null)return null;throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`)}let o=t.getElementById("headlessui-portal-root");if(o)return o;let a=t.createElement("div");return a.setAttribute("id","headlessui-portal-root"),t.body.appendChild(a)}let sc=n.defineComponent({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:o}){let a=n.ref(null),s=n.computed(()=>an(a)),l=pg(),r=n.inject(ic,null),i=n.ref(l===!0||r==null?bg(a.value):r.resolveTarget()),c=n.ref(!1);n.onMounted(()=>{c.value=!0}),n.watchEffect(()=>{l||r!=null&&(i.value=r.resolveTarget())});let d=n.inject(ys,null),f=!1,p=n.getCurrentInstance();return n.watch(a,()=>{if(f||!d)return;let h=ae(a);h&&(n.onUnmounted(d.register(h),p),f=!0)}),n.onUnmounted(()=>{var h,g;let u=(h=s.value)==null?void 0:h.getElementById("headlessui-portal-root");u&&i.value===u&&i.value.children.length<=0&&((g=i.value.parentElement)==null||g.removeChild(i.value))}),()=>{if(!c.value||i.value===null)return null;let h={ref:a,"data-headlessui-portal":""};return n.h(n.Teleport,{to:i.value},Pe({ourProps:h,theirProps:e,slot:{},attrs:o,slots:t,name:"Portal"}))}}}),ys=Symbol("PortalParentContext");function yg(){let e=n.inject(ys,null),t=n.ref([]);function o(l){return t.value.push(l),e&&e.register(l),()=>a(l)}function a(l){let r=t.value.indexOf(l);r!==-1&&t.value.splice(r,1),e&&e.unregister(l)}let s={register:o,unregister:a,portals:t};return[t,n.defineComponent({name:"PortalWrapper",setup(l,{slots:r}){return n.provide(ys,s),()=>{var i;return(i=r.default)==null?void 0:i.call(r)}}})]}let ic=Symbol("PortalGroupContext"),Eg=n.defineComponent({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:o}){let a=n.reactive({resolveTarget(){return e.target}});return n.provide(ic,a),()=>{let{target:s,...l}=e;return Pe({theirProps:l,ourProps:{},slot:{},attrs:t,slots:o,name:"PortalGroup"})}}});var _g=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(_g||{});let Es=Symbol("DialogContext");function aa(e){let t=n.inject(Es,null);if(t===null){let o=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,aa),o}return t}let Ka="DC8F892D-2EBD-447C-A4C8-A03058436FF4",Ya=n.defineComponent({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:Ka},initialFocus:{type:Object,default:null},id:{type:String,default:null},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:o,slots:a,expose:s}){var l,r;let i=(l=e.id)!=null?l:`headlessui-dialog-${lt()}`,c=n.ref(!1);n.onMounted(()=>{c.value=!0});let d=!1,f=n.computed(()=>e.role==="dialog"||e.role==="alertdialog"?e.role:(d||(d=!0,console.warn(`Invalid role [${f}] passed to . Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")),p=n.ref(0),h=yo(),g=n.computed(()=>e.open===Ka&&h!==null?(h.value&Ue.Open)===Ue.Open:e.open),u=n.ref(null),m=n.computed(()=>an(u));if(s({el:u,$el:u}),!(e.open!==Ka||h!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof g.value!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${g.value===Ka?void 0:e.open}`);let y=n.computed(()=>c.value&&g.value?0:1),v=n.computed(()=>y.value===0),b=n.computed(()=>p.value>1),N=n.inject(Es,null)!==null,[x,T]=yg(),{resolveContainers:O,mainTreeNodeRef:B,MainTreeNode:I}=fg({portals:x,defaultContainers:[n.computed(()=>{var ie;return(ie=q.panelRef.value)!=null?ie:u.value})]}),D=n.computed(()=>b.value?"parent":"leaf"),C=n.computed(()=>h!==null?(h.value&Ue.Closing)===Ue.Closing:!1),F=n.computed(()=>N||C.value?!1:v.value),K=n.computed(()=>{var ie,fe,ye;return(ye=Array.from((fe=(ie=m.value)==null?void 0:ie.querySelectorAll("body > *"))!=null?fe:[]).find(Te=>Te.id==="headlessui-portal-root"?!1:Te.contains(ae(B))&&Te instanceof HTMLElement))!=null?ye:null});nc(K,F);let P=n.computed(()=>b.value?!0:v.value),U=n.computed(()=>{var ie,fe,ye;return(ye=Array.from((fe=(ie=m.value)==null?void 0:ie.querySelectorAll("[data-headlessui-portal]"))!=null?fe:[]).find(Te=>Te.contains(ae(B))&&Te instanceof HTMLElement))!=null?ye:null});nc(U,P),mg({type:"Dialog",enabled:n.computed(()=>y.value===0),element:u,onUpdate:(ie,fe)=>{if(fe==="Dialog")return $e(ie,{[bs.Add]:()=>p.value+=1,[bs.Remove]:()=>p.value-=1})}});let j=vg({name:"DialogDescription",slot:n.computed(()=>({open:g.value}))}),W=n.ref(null),q={titleId:W,panelRef:n.ref(null),dialogState:y,setTitleId(ie){W.value!==ie&&(W.value=ie)},close(){t("close",!1)}};n.provide(Es,q);let ne=n.computed(()=>!(!v.value||b.value));us(O,(ie,fe)=>{q.close(),n.nextTick(()=>fe?.focus())},ne);let _e=n.computed(()=>!(b.value||y.value!==0));ql((r=m.value)==null?void 0:r.defaultView,"keydown",ie=>{_e.value&&(ie.defaultPrevented||ie.key===xe.Escape&&(ie.preventDefault(),ie.stopPropagation(),q.close()))});let Ye=n.computed(()=>!(C.value||y.value!==0||N));return ug(m,Ye,ie=>{var fe;return{containers:[...(fe=ie.containers)!=null?fe:[],O]}}),n.watchEffect(ie=>{if(y.value!==0)return;let fe=ae(u);if(!fe)return;let ye=new ResizeObserver(Te=>{for(let Be of Te){let Re=Be.target.getBoundingClientRect();Re.x===0&&Re.y===0&&Re.width===0&&Re.height===0&&q.close()}});ye.observe(fe),ie(()=>ye.disconnect())}),()=>{let{open:ie,initialFocus:fe,...ye}=e,Te={...o,ref:u,id:i,role:f.value,"aria-modal":y.value===0?!0:void 0,"aria-labelledby":W.value,"aria-describedby":j.value},Be={open:y.value===0};return n.h(vs,{force:!0},()=>[n.h(sc,()=>n.h(Eg,{target:u.value},()=>n.h(vs,{force:!1},()=>n.h(na,{initialFocus:fe,containers:O,features:v.value?$e(D.value,{parent:na.features.RestoreFocus,leaf:na.features.All&~na.features.FocusLock}):na.features.None},()=>n.h(T,{},()=>Pe({ourProps:Te,theirProps:{...ye,...o},slot:Be,attrs:o,slots:a,visible:y.value===0,features:It.RenderStrategy|It.Static,name:"Dialog"})))))),n.h(I)])}}});n.defineComponent({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o}){var a;let s=(a=e.id)!=null?a:`headlessui-dialog-overlay-${lt()}`,l=aa("DialogOverlay");function r(i){i.target===i.currentTarget&&(i.preventDefault(),i.stopPropagation(),l.close())}return()=>{let{...i}=e;return Pe({ourProps:{id:s,"aria-hidden":!0,onClick:r},theirProps:i,slot:{open:l.dialogState.value===0},attrs:t,slots:o,name:"DialogOverlay"})}}}),n.defineComponent({name:"DialogBackdrop",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},inheritAttrs:!1,setup(e,{attrs:t,slots:o,expose:a}){var s;let l=(s=e.id)!=null?s:`headlessui-dialog-backdrop-${lt()}`,r=aa("DialogBackdrop"),i=n.ref(null);return a({el:i,$el:i}),n.onMounted(()=>{if(r.panelRef.value===null)throw new Error("A component is being used, but a component is missing.")}),()=>{let{...c}=e,d={id:l,ref:i,"aria-hidden":!0};return n.h(vs,{force:!0},()=>n.h(sc,()=>Pe({ourProps:d,theirProps:{...t,...c},slot:{open:r.dialogState.value===0},attrs:t,slots:o,name:"DialogBackdrop"})))}}});let sn=n.defineComponent({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){var s;let l=(s=e.id)!=null?s:`headlessui-dialog-panel-${lt()}`,r=aa("DialogPanel");a({el:r.panelRef,$el:r.panelRef});function i(c){c.stopPropagation()}return()=>{let{...c}=e,d={id:l,ref:r.panelRef,onClick:i};return Pe({ourProps:d,theirProps:c,slot:{open:r.dialogState.value===0},attrs:t,slots:o,name:"DialogPanel"})}}}),lc=n.defineComponent({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o}){var a;let s=(a=e.id)!=null?a:`headlessui-dialog-title-${lt()}`,l=aa("DialogTitle");return n.onMounted(()=>{l.setTitleId(s),n.onUnmounted(()=>l.setTitleId(null))}),()=>{let{...r}=e;return Pe({ourProps:{id:s},theirProps:r,slot:{open:l.dialogState.value===0},attrs:t,slots:o,name:"DialogTitle"})}}});var wg=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(wg||{});let cc=Symbol("DisclosureContext");function _s(e){let t=n.inject(cc,null);if(t===null){let o=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,_s),o}return t}let dc=Symbol("DisclosurePanelContext");function Tg(){return n.inject(dc,null)}let uc=n.defineComponent({name:"Disclosure",props:{as:{type:[Object,String],default:"template"},defaultOpen:{type:[Boolean],default:!1}},setup(e,{slots:t,attrs:o}){let a=n.ref(e.defaultOpen?0:1),s=n.ref(null),l=n.ref(null),r={buttonId:n.ref(`headlessui-disclosure-button-${lt()}`),panelId:n.ref(`headlessui-disclosure-panel-${lt()}`),disclosureState:a,panel:s,button:l,toggleDisclosure(){a.value=$e(a.value,{0:1,1:0})},closeDisclosure(){a.value!==1&&(a.value=1)},close(i){r.closeDisclosure();let c=(()=>i?i instanceof HTMLElement?i:i.value instanceof HTMLElement?ae(i):ae(r.button):ae(r.button))();c?.focus()}};return n.provide(cc,r),Xa(n.computed(()=>$e(a.value,{0:Ue.Open,1:Ue.Closed}))),()=>{let{defaultOpen:i,...c}=e,d={open:a.value===0,close:r.close};return Pe({theirProps:c,ourProps:{},slot:d,slots:t,attrs:o,name:"Disclosure"})}}}),fc=n.defineComponent({name:"DisclosureButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){let s=_s("DisclosureButton"),l=Tg(),r=n.computed(()=>l===null?!1:l.value===s.panelId.value);n.onMounted(()=>{r.value||e.id!==null&&(s.buttonId.value=e.id)}),n.onUnmounted(()=>{r.value||(s.buttonId.value=null)});let i=n.ref(null);a({el:i,$el:i}),r.value||n.watchEffect(()=>{s.button.value=i.value});let c=fs(n.computed(()=>({as:e.as,type:t.type})),i);function d(){var h;e.disabled||(r.value?(s.toggleDisclosure(),(h=ae(s.button))==null||h.focus()):s.toggleDisclosure())}function f(h){var g;if(!e.disabled)if(r.value)switch(h.key){case xe.Space:case xe.Enter:h.preventDefault(),h.stopPropagation(),s.toggleDisclosure(),(g=ae(s.button))==null||g.focus();break}else switch(h.key){case xe.Space:case xe.Enter:h.preventDefault(),h.stopPropagation(),s.toggleDisclosure();break}}function p(h){switch(h.key){case xe.Space:h.preventDefault();break}}return()=>{var h;let g={open:s.disclosureState.value===0},{id:u,...m}=e,y=r.value?{ref:i,type:c.value,onClick:d,onKeydown:f}:{id:(h=s.buttonId.value)!=null?h:u,ref:i,type:c.value,"aria-expanded":s.disclosureState.value===0,"aria-controls":s.disclosureState.value===0||ae(s.panel)?s.panelId.value:void 0,disabled:e.disabled?!0:void 0,onClick:d,onKeydown:f,onKeyup:p};return Pe({ourProps:y,theirProps:m,slot:g,attrs:t,slots:o,name:"DisclosureButton"})}}}),pc=n.defineComponent({name:"DisclosurePanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){let s=_s("DisclosurePanel");n.onMounted(()=>{e.id!==null&&(s.panelId.value=e.id)}),n.onUnmounted(()=>{s.panelId.value=null}),a({el:s.panel,$el:s.panel}),n.provide(dc,s.panelId);let l=yo(),r=n.computed(()=>l!==null?(l.value&Ue.Open)===Ue.Open:s.disclosureState.value===0);return()=>{var i;let c={open:s.disclosureState.value===0,close:s.close},{id:d,...f}=e,p={id:(i=s.panelId.value)!=null?i:d,ref:s.panel};return Pe({ourProps:p,theirProps:f,slot:c,attrs:t,slots:o,features:It.RenderStrategy|It.Static,visible:r.value,name:"DisclosurePanel"})}}}),hc=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function mc(e){var t,o;let a=(t=e.innerText)!=null?t:"",s=e.cloneNode(!0);if(!(s instanceof HTMLElement))return a;let l=!1;for(let i of s.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))i.remove(),l=!0;let r=l?(o=s.innerText)!=null?o:"":a;return hc.test(r)&&(r=r.replace(hc,"")),r}function xg(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let o=e.getAttribute("aria-labelledby");if(o){let a=o.split(" ").map(s=>{let l=document.getElementById(s);if(l){let r=l.getAttribute("aria-label");return typeof r=="string"?r.trim():mc(l).trim()}return null}).filter(Boolean);if(a.length>0)return a.join(", ")}return mc(e).trim()}function Og(e){let t=n.ref(""),o=n.ref("");return()=>{let a=ae(e);if(!a)return"";let s=a.innerText;if(t.value===s)return o.value;let l=xg(a).trim().toLowerCase();return t.value=s,o.value=l,l}}var Sg=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Sg||{}),Ng=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Ng||{});function Rg(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let gc=Symbol("MenuContext");function Ja(e){let t=n.inject(gc,null);if(t===null){let o=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,Ja),o}return t}let ws=n.defineComponent({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup(e,{slots:t,attrs:o}){let a=n.ref(1),s=n.ref(null),l=n.ref(null),r=n.ref([]),i=n.ref(""),c=n.ref(null),d=n.ref(1);function f(h=g=>g){let g=c.value!==null?r.value[c.value]:null,u=ds(h(r.value.slice()),y=>ae(y.dataRef.domRef)),m=g?u.indexOf(g):null;return m===-1&&(m=null),{items:u,activeItemIndex:m}}let p={menuState:a,buttonRef:s,itemsRef:l,items:r,searchQuery:i,activeItemIndex:c,activationTrigger:d,closeMenu:()=>{a.value=1,c.value=null},openMenu:()=>a.value=0,goToItem(h,g,u){let m=f(),y=hs(h===ke.Specific?{focus:ke.Specific,id:g}:{focus:h},{resolveItems:()=>m.items,resolveActiveIndex:()=>m.activeItemIndex,resolveId:v=>v.id,resolveDisabled:v=>v.dataRef.disabled});i.value="",c.value=y,d.value=u??1,r.value=m.items},search(h){let g=i.value!==""?0:1;i.value+=h.toLowerCase();let u=(c.value!==null?r.value.slice(c.value+g).concat(r.value.slice(0,c.value+g)):r.value).find(y=>y.dataRef.textValue.startsWith(i.value)&&!y.dataRef.disabled),m=u?r.value.indexOf(u):-1;m===-1||m===c.value||(c.value=m,d.value=1)},clearSearch(){i.value=""},registerItem(h,g){let u=f(m=>[...m,{id:h,dataRef:g}]);r.value=u.items,c.value=u.activeItemIndex,d.value=1},unregisterItem(h){let g=f(u=>{let m=u.findIndex(y=>y.id===h);return m!==-1&&u.splice(m,1),u});r.value=g.items,c.value=g.activeItemIndex,d.value=1}};return us([s,l],(h,g)=>{var u;p.closeMenu(),cs(g,ls.Loose)||(h.preventDefault(),(u=ae(s))==null||u.focus())},n.computed(()=>a.value===0)),n.provide(gc,p),Xa(n.computed(()=>$e(a.value,{0:Ue.Open,1:Ue.Closed}))),()=>{let h={open:a.value===0,close:p.closeMenu};return Pe({ourProps:{},theirProps:e,slot:h,slots:t,attrs:o,name:"Menu"})}}}),Ts=n.defineComponent({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){var s;let l=(s=e.id)!=null?s:`headlessui-menu-button-${lt()}`,r=Ja("MenuButton");a({el:r.buttonRef,$el:r.buttonRef});function i(p){switch(p.key){case xe.Space:case xe.Enter:case xe.ArrowDown:p.preventDefault(),p.stopPropagation(),r.openMenu(),n.nextTick(()=>{var h;(h=ae(r.itemsRef))==null||h.focus({preventScroll:!0}),r.goToItem(ke.First)});break;case xe.ArrowUp:p.preventDefault(),p.stopPropagation(),r.openMenu(),n.nextTick(()=>{var h;(h=ae(r.itemsRef))==null||h.focus({preventScroll:!0}),r.goToItem(ke.Last)});break}}function c(p){switch(p.key){case xe.Space:p.preventDefault();break}}function d(p){e.disabled||(r.menuState.value===0?(r.closeMenu(),n.nextTick(()=>{var h;return(h=ae(r.buttonRef))==null?void 0:h.focus({preventScroll:!0})})):(p.preventDefault(),r.openMenu(),Rg(()=>{var h;return(h=ae(r.itemsRef))==null?void 0:h.focus({preventScroll:!0})})))}let f=fs(n.computed(()=>({as:e.as,type:t.type})),r.buttonRef);return()=>{var p;let h={open:r.menuState.value===0},{...g}=e,u={ref:r.buttonRef,id:l,type:f.value,"aria-haspopup":"menu","aria-controls":(p=ae(r.itemsRef))==null?void 0:p.id,"aria-expanded":r.menuState.value===0,onKeydown:i,onKeyup:c,onClick:d};return Pe({ourProps:u,theirProps:g,slot:h,attrs:t,slots:o,name:"MenuButton"})}}}),xs=n.defineComponent({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){var s;let l=(s=e.id)!=null?s:`headlessui-menu-items-${lt()}`,r=Ja("MenuItems"),i=n.ref(null);a({el:r.itemsRef,$el:r.itemsRef}),jl({container:n.computed(()=>ae(r.itemsRef)),enabled:n.computed(()=>r.menuState.value===0),accept(h){return h.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:h.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(h){h.setAttribute("role","none")}});function c(h){var g;switch(i.value&&clearTimeout(i.value),h.key){case xe.Space:if(r.searchQuery.value!=="")return h.preventDefault(),h.stopPropagation(),r.search(h.key);case xe.Enter:if(h.preventDefault(),h.stopPropagation(),r.activeItemIndex.value!==null){let u=r.items.value[r.activeItemIndex.value];(g=ae(u.dataRef.domRef))==null||g.click()}r.closeMenu(),Pl(ae(r.buttonRef));break;case xe.ArrowDown:return h.preventDefault(),h.stopPropagation(),r.goToItem(ke.Next);case xe.ArrowUp:return h.preventDefault(),h.stopPropagation(),r.goToItem(ke.Previous);case xe.Home:case xe.PageUp:return h.preventDefault(),h.stopPropagation(),r.goToItem(ke.First);case xe.End:case xe.PageDown:return h.preventDefault(),h.stopPropagation(),r.goToItem(ke.Last);case xe.Escape:h.preventDefault(),h.stopPropagation(),r.closeMenu(),n.nextTick(()=>{var u;return(u=ae(r.buttonRef))==null?void 0:u.focus({preventScroll:!0})});break;case xe.Tab:h.preventDefault(),h.stopPropagation(),r.closeMenu(),n.nextTick(()=>Um(ae(r.buttonRef),h.shiftKey?Jt.Previous:Jt.Next));break;default:h.key.length===1&&(r.search(h.key),i.value=setTimeout(()=>r.clearSearch(),350));break}}function d(h){switch(h.key){case xe.Space:h.preventDefault();break}}let f=yo(),p=n.computed(()=>f!==null?(f.value&Ue.Open)===Ue.Open:r.menuState.value===0);return()=>{var h,g;let u={open:r.menuState.value===0},{...m}=e,y={"aria-activedescendant":r.activeItemIndex.value===null||(h=r.items.value[r.activeItemIndex.value])==null?void 0:h.id,"aria-labelledby":(g=ae(r.buttonRef))==null?void 0:g.id,id:l,onKeydown:c,onKeyup:d,role:"menu",tabIndex:0,ref:r.itemsRef};return Pe({ourProps:y,theirProps:m,slot:u,attrs:t,slots:o,features:It.RenderStrategy|It.Static,visible:p.value,name:"MenuItems"})}}}),ra=n.defineComponent({name:"MenuItem",inheritAttrs:!1,props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(e,{slots:t,attrs:o,expose:a}){var s;let l=(s=e.id)!=null?s:`headlessui-menu-item-${lt()}`,r=Ja("MenuItem"),i=n.ref(null);a({el:i,$el:i});let c=n.computed(()=>r.activeItemIndex.value!==null?r.items.value[r.activeItemIndex.value].id===l:!1),d=Og(i),f=n.computed(()=>({disabled:e.disabled,get textValue(){return d()},domRef:i}));n.onMounted(()=>r.registerItem(l,f)),n.onUnmounted(()=>r.unregisterItem(l)),n.watchEffect(()=>{r.menuState.value===0&&c.value&&r.activationTrigger.value!==0&&n.nextTick(()=>{var v,b;return(b=(v=ae(i))==null?void 0:v.scrollIntoView)==null?void 0:b.call(v,{block:"nearest"})})});function p(v){if(e.disabled)return v.preventDefault();r.closeMenu(),Pl(ae(r.buttonRef))}function h(){if(e.disabled)return r.goToItem(ke.Nothing);r.goToItem(ke.Specific,l)}let g=Vl();function u(v){g.update(v)}function m(v){g.wasMoved(v)&&(e.disabled||c.value||r.goToItem(ke.Specific,l,0))}function y(v){g.wasMoved(v)&&(e.disabled||c.value&&r.goToItem(ke.Nothing))}return()=>{let{disabled:v}=e,b={active:c.value,disabled:v,close:r.closeMenu},{...N}=e;return Pe({ourProps:{id:l,ref:i,role:"menuitem",tabIndex:v===!0?void 0:-1,"aria-disabled":v===!0?!0:void 0,disabled:void 0,onClick:p,onFocus:h,onPointerenter:u,onMouseenter:u,onPointermove:m,onMousemove:m,onPointerleave:y,onMouseleave:y},theirProps:{...o,...N},slot:b,attrs:o,slots:t,name:"MenuItem"})}}});function Ig(e){let t={called:!1};return(...o)=>{if(!t.called)return t.called=!0,e(...o)}}function Os(e,...t){e&&t.length>0&&e.classList.add(...t)}function Qa(e,...t){e&&t.length>0&&e.classList.remove(...t)}var Ss=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(Ss||{});function Cg(e,t){let o=Vn();if(!e)return o.dispose;let{transitionDuration:a,transitionDelay:s}=getComputedStyle(e),[l,r]=[a,s].map(i=>{let[c=0]=i.split(",").filter(Boolean).map(d=>d.includes("ms")?parseFloat(d):parseFloat(d)*1e3).sort((d,f)=>f-d);return c});return l!==0?o.setTimeout(()=>t("finished"),l+r):t("finished"),o.add(()=>t("cancelled")),o.dispose}function vc(e,t,o,a,s,l){let r=Vn(),i=l!==void 0?Ig(l):()=>{};return Qa(e,...s),Os(e,...t,...o),r.nextFrame(()=>{Qa(e,...o),Os(e,...a),r.add(Cg(e,c=>(Qa(e,...a,...t),Os(e,...s),i(c))))}),r.add(()=>Qa(e,...t,...o,...a,...s)),r.add(()=>i("cancelled")),r.dispose}function zn(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let Ns=Symbol("TransitionContext");var kg=(e=>(e.Visible="visible",e.Hidden="hidden",e))(kg||{});function Ag(){return n.inject(Ns,null)!==null}function Dg(){let e=n.inject(Ns,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}function Bg(){let e=n.inject(Rs,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}let Rs=Symbol("NestingContext");function Za(e){return"children"in e?Za(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function bc(e){let t=n.ref([]),o=n.ref(!1);n.onMounted(()=>o.value=!0),n.onUnmounted(()=>o.value=!1);function a(l,r=xn.Hidden){let i=t.value.findIndex(({id:c})=>c===l);i!==-1&&($e(r,{[xn.Unmount](){t.value.splice(i,1)},[xn.Hidden](){t.value[i].state="hidden"}}),!Za(t)&&o.value&&e?.())}function s(l){let r=t.value.find(({id:i})=>i===l);return r?r.state!=="visible"&&(r.state="visible"):t.value.push({id:l,state:"visible"}),()=>a(l,xn.Unmount)}return{children:t,register:s,unregister:a}}let yc=It.RenderStrategy,On=n.defineComponent({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:o,slots:a,expose:s}){let l=n.ref(0);function r(){l.value|=Ue.Opening,t("beforeEnter")}function i(){l.value&=~Ue.Opening,t("afterEnter")}function c(){l.value|=Ue.Closing,t("beforeLeave")}function d(){l.value&=~Ue.Closing,t("afterLeave")}if(!Ag()&&Gm())return()=>n.h(sa,{...e,onBeforeEnter:r,onAfterEnter:i,onBeforeLeave:c,onAfterLeave:d},a);let f=n.ref(null),p=n.computed(()=>e.unmount?xn.Unmount:xn.Hidden);s({el:f,$el:f});let{show:h,appear:g}=Dg(),{register:u,unregister:m}=Bg(),y=n.ref(h.value?"visible":"hidden"),v={value:!0},b=lt(),N={value:!1},x=bc(()=>{!N.value&&y.value!=="hidden"&&(y.value="hidden",m(b),d())});n.onMounted(()=>{let P=u(b);n.onUnmounted(P)}),n.watchEffect(()=>{if(p.value===xn.Hidden&&b){if(h.value&&y.value!=="visible"){y.value="visible";return}$e(y.value,{hidden:()=>m(b),visible:()=>u(b)})}});let T=zn(e.enter),O=zn(e.enterFrom),B=zn(e.enterTo),I=zn(e.entered),D=zn(e.leave),C=zn(e.leaveFrom),F=zn(e.leaveTo);n.onMounted(()=>{n.watchEffect(()=>{if(y.value==="visible"){let P=ae(f);if(P instanceof Comment&&P.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function K(P){let U=v.value&&!g.value,j=ae(f);!j||!(j instanceof HTMLElement)||U||(N.value=!0,h.value&&r(),h.value||c(),P(h.value?vc(j,T,O,B,I,W=>{N.value=!1,W===Ss.Finished&&i()}):vc(j,D,C,F,I,W=>{N.value=!1,W===Ss.Finished&&(Za(x)||(y.value="hidden",m(b),d()))})))}return n.onMounted(()=>{n.watch([h],(P,U,j)=>{K(j),v.value=!1},{immediate:!0})}),n.provide(Rs,x),Xa(n.computed(()=>$e(y.value,{visible:Ue.Open,hidden:Ue.Closed})|l.value)),()=>{let{appear:P,show:U,enter:j,enterFrom:W,enterTo:q,entered:ne,leave:_e,leaveFrom:Ye,leaveTo:ie,...fe}=e,ye={ref:f},Te={...fe,...g.value&&h.value&&Zo.isServer?{class:n.normalizeClass([o.class,fe.class,...T,...O])}:{}};return Pe({theirProps:Te,ourProps:ye,slot:{},slots:a,attrs:o,features:yc,visible:y.value==="visible",name:"TransitionChild"})}}}),Pg=On,sa=n.defineComponent({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:o,slots:a}){let s=yo(),l=n.computed(()=>e.show===null&&s!==null?(s.value&Ue.Open)===Ue.Open:e.show);n.watchEffect(()=>{if(![!0,!1].includes(l.value))throw new Error('A is used but it is missing a `:show="true | false"` prop.')});let r=n.ref(l.value?"visible":"hidden"),i=bc(()=>{r.value="hidden"}),c=n.ref(!0),d={show:l,appear:n.computed(()=>e.appear||!c.value)};return n.onMounted(()=>{n.watchEffect(()=>{c.value=!1,l.value?r.value="visible":Za(i)||(r.value="hidden")})}),n.provide(Rs,i),n.provide(Ns,d),()=>{let f=$o(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),p={unmount:e.unmount};return Pe({ourProps:{...p,as:"template"},theirProps:{},slot:{},slots:{...a,default:()=>[n.h(Pg,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...o,...p,...f},a.default)]},attrs:{},features:yc,visible:r.value==="visible",name:"Transition"})}}});const Mg={},Lg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Fg=[n.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),n.createElementVNode("path",{d:"M8 5v10a1 1 0 0 0 1 1h10"},null,-1),n.createElementVNode("path",{d:"M5 8h10a1 1 0 0 1 1 1v10"},null,-1)];function Ug(e,t){return n.openBlock(),n.createElementBlock("svg",Lg,Fg)}const Ec=Fr(Mg,[["render",Ug]]),rt=n.defineComponent({__name:"IconButton",props:{variant:{default:"secondary"},type:{default:"button"},asAnchor:{type:Boolean,default:!1}},setup(e){const t={primary:"bg-blue-500 text-white focus:outline-blue-500",secondary:"bg-gray-300 dark:bg-gray-700 text-gray-800 dark:text-gray-200 focus:outline-blue-500",danger:"bg-red-500 text-white focus:outline-red-500",success:"bg-green-500 text-white focus:outline-green-500",transparent:"bg-transparent text-gray-800 dark:text-gray-100"},o=e,a=n.computed(()=>t[o.variant]);return(s,l)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(s.asAnchor?"a":"button"),{class:n.normalizeClass(`inline-flex items-center rounded-full border-0 p-2 shadow-sm focus:outline-none focus:ring-1 hover:opacity-75 disabled:opacity-25 ${a.value}`),type:s.asAnchor?void 0:s.type??"button"},{default:n.withCtx(()=>[n.renderSlot(s.$slots,"default")]),_:3},8,["class","type"]))}}),Hg=n.createElementVNode("div",{class:"fixed inset-0 bg-gray-800/20 backdrop-blur-sm transition-opacity"},null,-1),Vg={class:"flex items-end sm:items-center justify-center min-h-full p-0 md:p-4"},Eo=n.defineComponent({__name:"BaseModal",props:{name:{},initialFocusRef:{}},setup(e){const t=e;n.onBeforeUnmount(()=>{s.value&&l()});const o=De(),a=n.computed(()=>o.dark),s=n.computed(()=>o.isOpen(t.name)),l=()=>{o.closeModal({name:t.name})};return(r,i)=>(n.openBlock(),n.createBlock(n.unref(sa),{show:s.value,as:"template",class:"nova-file-manager"},{default:n.withCtx(()=>[n.createVNode(n.unref(Ya),{as:"div",class:"relative z-[60]",style:{"z-index":"999"},onClose:l,"initial-focus":r.initialFocusRef},{default:n.withCtx(()=>[n.createVNode(n.unref(On),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:n.withCtx(()=>[Hg]),_:1}),n.createElementVNode("div",{class:n.normalizeClass([{dark:a.value},"fixed z-10 inset-0 overflow-y-auto"])},[n.createElementVNode("div",Vg,[n.createVNode(n.unref(On),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:n.withCtx(()=>[n.renderSlot(r.$slots,"default",{close:l,isOpen:s.value,dark:a.value})]),_:3})])],2)]),_:3},8,["initial-focus"])]),_:3},8,["show"]))}}),Bw="";var _c={},wc={exports:{}};/*! * Cropper.js v1.5.12 * https://fengyuanchen.github.io/cropperjs * @@ -21,14 +21,14 @@ * Released under the MIT license * * Date: 2021-06-12T08:00:17.411Z - */(function(e,t){(function(o,a){e.exports=a()})(ho,function(){function o(S,E){var w=Object.keys(S);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(S);E&&(_=_.filter(function(A){return Object.getOwnPropertyDescriptor(S,A).enumerable})),w.push.apply(w,_)}return w}function a(S){for(var E=1;ES.length)&&(E=S.length);for(var w=0,_=new Array(E);w
',Q=Number.isNaN||y.isNaN;function J(S){return typeof S=="number"&&!Q(S)}var de=function(E){return E>0&&E<1/0};function pe(S){return typeof S>"u"}function ge(S){return s(S)==="object"&&S!==null}var ze=Object.prototype.hasOwnProperty;function le(S){if(!ge(S))return!1;try{var E=S.constructor,w=E.prototype;return E&&w&&ze.call(w,"isPrototypeOf")}catch{return!1}}function oe(S){return typeof S=="function"}var ce=Array.prototype.slice;function Ee(S){return Array.from?Array.from(S):ce.call(S)}function se(S,E){return S&&oe(E)&&(Array.isArray(S)||J(S.length)?Ee(S).forEach(function(w,_){E.call(S,w,_,S)}):ge(S)&&Object.keys(S).forEach(function(w){E.call(S,S[w],w,S)})),S}var ve=Object.assign||function(E){for(var w=arguments.length,_=new Array(w>1?w-1:0),A=1;A0&&_.forEach(function(R){ge(R)&&Object.keys(R).forEach(function(k){E[k]=R[k]})}),E},Ra=/\.\d*(?:0|9){12}\d*$/;function Mn(S){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Ra.test(S)?Math.round(S*E)/E:S}var Uo=/^width|height|left|top|marginLeft|marginTop$/;function Ln(S,E){var w=S.style;se(E,function(_,A){Uo.test(A)&&J(_)&&(_="".concat(_,"px")),w[A]=_})}function $w(S,E){return S.classList?S.classList.contains(E):S.className.indexOf(E)>-1}function st(S,E){if(E){if(J(S.length)){se(S,function(_){st(_,E)});return}if(S.classList){S.classList.add(E);return}var w=S.className.trim();w?w.indexOf(E)<0&&(S.className="".concat(w," ").concat(E)):S.className=E}}function tn(S,E){if(E){if(J(S.length)){se(S,function(w){tn(w,E)});return}if(S.classList){S.classList.remove(E);return}S.className.indexOf(E)>=0&&(S.className=S.className.replace(E,""))}}function Ho(S,E,w){if(E){if(J(S.length)){se(S,function(_){Ho(_,E,w)});return}w?st(S,E):tn(S,E)}}var eT=/([a-z\d])([A-Z])/g;function mi(S){return S.replace(eT,"$1-$2").toLowerCase()}function gi(S,E){return ge(S[E])?S[E]:S.dataset?S.dataset[E]:S.getAttribute("data-".concat(mi(E)))}function Ia(S,E,w){ge(w)?S[E]=w:S.dataset?S.dataset[E]=w:S.setAttribute("data-".concat(mi(E)),w)}function tT(S,E){if(ge(S[E]))try{delete S[E]}catch{S[E]=void 0}else if(S.dataset)try{delete S.dataset[E]}catch{S.dataset[E]=void 0}else S.removeAttribute("data-".concat(mi(E)))}var Wd=/\s\s*/,Xd=function(){var S=!1;if(m){var E=!1,w=function(){},_=Object.defineProperty({},"once",{get:function(){return S=!0,E},set:function(R){E=R}});y.addEventListener("test",w,_),y.removeEventListener("test",w,_)}return S}();function Wt(S,E,w){var _=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},A=w;E.trim().split(Wd).forEach(function(R){if(!Xd){var k=S.listeners;k&&k[R]&&k[R][w]&&(A=k[R][w],delete k[R][w],Object.keys(k[R]).length===0&&delete k[R],Object.keys(k).length===0&&delete S.listeners)}S.removeEventListener(R,A,_)})}function Pt(S,E,w){var _=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},A=w;E.trim().split(Wd).forEach(function(R){if(_.once&&!Xd){var k=S.listeners,V=k===void 0?{}:k;A=function(){delete V[R][w],S.removeEventListener(R,A,_);for(var Y=arguments.length,G=new Array(Y),z=0;zMath.abs(w)&&(w=Z)})}),w}function Ir(S,E){var w=S.pageX,_=S.pageY,A={endX:w,endY:_};return E?A:a({startX:w,startY:_},A)}function aT(S){var E=0,w=0,_=0;return se(S,function(A){var R=A.startX,k=A.startY;E+=R,w+=k,_+=1}),E/=_,w/=_,{pageX:E,pageY:w}}function Fn(S){var E=S.aspectRatio,w=S.height,_=S.width,A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",R=de(_),k=de(w);if(R&&k){var V=w*E;A==="contain"&&V>_||A==="cover"&&V<_?w=_/E:_=w*E}else R?w=_/E:k&&(_=w*E);return{width:_,height:w}}function rT(S){var E=S.width,w=S.height,_=S.degree;if(_=Math.abs(_)%180,_===90)return{width:w,height:E};var A=_%90*Math.PI/180,R=Math.sin(A),k=Math.cos(A),V=E*k+w*R,$=E*R+w*k;return _>90?{width:$,height:V}:{width:V,height:$}}function sT(S,E,w,_){var A=E.aspectRatio,R=E.naturalWidth,k=E.naturalHeight,V=E.rotate,$=V===void 0?0:V,Y=E.scaleX,G=Y===void 0?1:Y,z=E.scaleY,Z=z===void 0?1:z,Ne=w.aspectRatio,Oe=w.naturalWidth,je=w.naturalHeight,Ie=_.fillColor,ot=Ie===void 0?"transparent":Ie,it=_.imageSmoothingEnabled,qe=it===void 0?!0:it,gn=_.imageSmoothingQuality,Nt=gn===void 0?"low":gn,ee=_.maxWidth,Ce=ee===void 0?1/0:ee,at=_.maxHeight,Mt=at===void 0?1/0:at,vn=_.minWidth,lo=vn===void 0?0:vn,co=_.minHeight,Un=co===void 0?0:co,nn=document.createElement("canvas"),yt=nn.getContext("2d"),uo=Fn({aspectRatio:Ne,width:Ce,height:Mt}),Cr=Fn({aspectRatio:Ne,width:lo,height:Un},"cover"),bi=Math.min(uo.width,Math.max(Cr.width,Oe)),yi=Math.min(uo.height,Math.max(Cr.height,je)),qd=Fn({aspectRatio:A,width:Ce,height:Mt}),$d=Fn({aspectRatio:A,width:lo,height:Un},"cover"),eu=Math.min(qd.width,Math.max($d.width,R)),tu=Math.min(qd.height,Math.max($d.height,k)),ET=[-eu/2,-tu/2,eu,tu];return nn.width=Mn(bi),nn.height=Mn(yi),yt.fillStyle=ot,yt.fillRect(0,0,bi,yi),yt.save(),yt.translate(bi/2,yi/2),yt.rotate($*Math.PI/180),yt.scale(G,Z),yt.imageSmoothingEnabled=qe,yt.imageSmoothingQuality=Nt,yt.drawImage.apply(yt,[S].concat(d(ET.map(function(_T){return Math.floor(Mn(_T))})))),yt.restore(),nn}var Qd=String.fromCharCode;function iT(S,E,w){var _="";w+=E;for(var A=E;A0;)w.push(Qd.apply(null,Ee(A.subarray(0,_)))),A=A.subarray(_);return"data:".concat(E,";base64,").concat(btoa(w.join("")))}function uT(S){var E=new DataView(S),w;try{var _,A,R;if(E.getUint8(0)===255&&E.getUint8(1)===216)for(var k=E.byteLength,V=2;V+1=8&&(R=Y+z)}}}if(R){var Z=E.getUint16(R,_),Ne,Oe;for(Oe=0;Oe=0?R:Pn),height:Math.max(_.offsetHeight,k>=0?k:L)};this.containerData=V,Ln(A,{width:V.width,height:V.height}),st(E,ne),tn(A,ne)},initCanvas:function(){var E=this.containerData,w=this.imageData,_=this.options.viewMode,A=Math.abs(w.rotate)%180===90,R=A?w.naturalHeight:w.naturalWidth,k=A?w.naturalWidth:w.naturalHeight,V=R/k,$=E.width,Y=E.height;E.height*V>E.width?_===3?$=E.height*V:Y=E.width/V:_===3?Y=E.width/V:$=E.height*V;var G={aspectRatio:V,naturalWidth:R,naturalHeight:k,width:$,height:Y};this.canvasData=G,this.limited=_===1||_===2,this.limitCanvas(!0,!0),G.width=Math.min(Math.max(G.width,G.minWidth),G.maxWidth),G.height=Math.min(Math.max(G.height,G.minHeight),G.maxHeight),G.left=(E.width-G.width)/2,G.top=(E.height-G.height)/2,G.oldLeft=G.left,G.oldTop=G.top,this.initialCanvasData=ve({},G)},limitCanvas:function(E,w){var _=this.options,A=this.containerData,R=this.canvasData,k=this.cropBoxData,V=_.viewMode,$=R.aspectRatio,Y=this.cropped&&k;if(E){var G=Number(_.minCanvasWidth)||0,z=Number(_.minCanvasHeight)||0;V>1?(G=Math.max(G,A.width),z=Math.max(z,A.height),V===3&&(z*$>G?G=z*$:z=G/$)):V>0&&(G?G=Math.max(G,Y?k.width:0):z?z=Math.max(z,Y?k.height:0):Y&&(G=k.width,z=k.height,z*$>G?G=z*$:z=G/$));var Z=Fn({aspectRatio:$,width:G,height:z});G=Z.width,z=Z.height,R.minWidth=G,R.minHeight=z,R.maxWidth=1/0,R.maxHeight=1/0}if(w)if(V>(Y?0:1)){var Ne=A.width-R.width,Oe=A.height-R.height;R.minLeft=Math.min(0,Ne),R.minTop=Math.min(0,Oe),R.maxLeft=Math.max(0,Ne),R.maxTop=Math.max(0,Oe),Y&&this.limited&&(R.minLeft=Math.min(k.left,k.left+(k.width-R.width)),R.minTop=Math.min(k.top,k.top+(k.height-R.height)),R.maxLeft=k.left,R.maxTop=k.top,V===2&&(R.width>=A.width&&(R.minLeft=Math.min(0,Ne),R.maxLeft=Math.max(0,Ne)),R.height>=A.height&&(R.minTop=Math.min(0,Oe),R.maxTop=Math.max(0,Oe))))}else R.minLeft=-R.width,R.minTop=-R.height,R.maxLeft=A.width,R.maxTop=A.height},renderCanvas:function(E,w){var _=this.canvasData,A=this.imageData;if(w){var R=rT({width:A.naturalWidth*Math.abs(A.scaleX||1),height:A.naturalHeight*Math.abs(A.scaleY||1),degree:A.rotate||0}),k=R.width,V=R.height,$=_.width*(k/_.naturalWidth),Y=_.height*(V/_.naturalHeight);_.left-=($-_.width)/2,_.top-=(Y-_.height)/2,_.width=$,_.height=Y,_.aspectRatio=k/V,_.naturalWidth=k,_.naturalHeight=V,this.limitCanvas(!0,!1)}(_.width>_.maxWidth||_.width<_.minWidth)&&(_.left=_.oldLeft),(_.height>_.maxHeight||_.height<_.minHeight)&&(_.top=_.oldTop),_.width=Math.min(Math.max(_.width,_.minWidth),_.maxWidth),_.height=Math.min(Math.max(_.height,_.minHeight),_.maxHeight),this.limitCanvas(!1,!0),_.left=Math.min(Math.max(_.left,_.minLeft),_.maxLeft),_.top=Math.min(Math.max(_.top,_.minTop),_.maxTop),_.oldLeft=_.left,_.oldTop=_.top,Ln(this.canvas,ve({width:_.width,height:_.height},Ca({translateX:_.left,translateY:_.top}))),this.renderImage(E),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(E){var w=this.canvasData,_=this.imageData,A=_.naturalWidth*(w.width/w.naturalWidth),R=_.naturalHeight*(w.height/w.naturalHeight);ve(_,{width:A,height:R,left:(w.width-A)/2,top:(w.height-R)/2}),Ln(this.image,ve({width:_.width,height:_.height},Ca(ve({translateX:_.left,translateY:_.top},_)))),E&&this.output()},initCropBox:function(){var E=this.options,w=this.canvasData,_=E.aspectRatio||E.initialAspectRatio,A=Number(E.autoCropArea)||.8,R={width:w.width,height:w.height};_&&(w.height*_>w.width?R.height=R.width/_:R.width=R.height*_),this.cropBoxData=R,this.limitCropBox(!0,!0),R.width=Math.min(Math.max(R.width,R.minWidth),R.maxWidth),R.height=Math.min(Math.max(R.height,R.minHeight),R.maxHeight),R.width=Math.max(R.minWidth,R.width*A),R.height=Math.max(R.minHeight,R.height*A),R.left=w.left+(w.width-R.width)/2,R.top=w.top+(w.height-R.height)/2,R.oldLeft=R.left,R.oldTop=R.top,this.initialCropBoxData=ve({},R)},limitCropBox:function(E,w){var _=this.options,A=this.containerData,R=this.canvasData,k=this.cropBoxData,V=this.limited,$=_.aspectRatio;if(E){var Y=Number(_.minCropBoxWidth)||0,G=Number(_.minCropBoxHeight)||0,z=V?Math.min(A.width,R.width,R.width+R.left,A.width-R.left):A.width,Z=V?Math.min(A.height,R.height,R.height+R.top,A.height-R.top):A.height;Y=Math.min(Y,A.width),G=Math.min(G,A.height),$&&(Y&&G?G*$>Y?G=Y/$:Y=G*$:Y?G=Y/$:G&&(Y=G*$),Z*$>z?Z=z/$:z=Z*$),k.minWidth=Math.min(Y,z),k.minHeight=Math.min(G,Z),k.maxWidth=z,k.maxHeight=Z}w&&(V?(k.minLeft=Math.max(0,R.left),k.minTop=Math.max(0,R.top),k.maxLeft=Math.min(A.width,R.left+R.width)-k.width,k.maxTop=Math.min(A.height,R.top+R.height)-k.height):(k.minLeft=0,k.minTop=0,k.maxLeft=A.width-k.width,k.maxTop=A.height-k.height))},renderCropBox:function(){var E=this.options,w=this.containerData,_=this.cropBoxData;(_.width>_.maxWidth||_.width<_.minWidth)&&(_.left=_.oldLeft),(_.height>_.maxHeight||_.height<_.minHeight)&&(_.top=_.oldTop),_.width=Math.min(Math.max(_.width,_.minWidth),_.maxWidth),_.height=Math.min(Math.max(_.height,_.minHeight),_.maxHeight),this.limitCropBox(!1,!0),_.left=Math.min(Math.max(_.left,_.minLeft),_.maxLeft),_.top=Math.min(Math.max(_.top,_.minTop),_.maxTop),_.oldLeft=_.left,_.oldTop=_.top,E.movable&&E.cropBoxMovable&&Ia(this.face,ye,_.width>=w.width&&_.height>=w.height?O:x),Ln(this.cropBox,ve({width:_.width,height:_.height},Ca({translateX:_.left,translateY:_.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Vo(this.element,dt,this.getData())}},hT={initPreview:function(){var E=this.element,w=this.crossOrigin,_=this.options.preview,A=w?this.crossOriginUrl:this.url,R=E.alt||"The image to preview",k=document.createElement("img");if(w&&(k.crossOrigin=w),k.src=A,k.alt=R,this.viewBox.appendChild(k),this.viewBoxImage=k,!!_){var V=_;typeof _=="string"?V=E.ownerDocument.querySelectorAll(_):_.querySelector&&(V=[_]),this.previews=V,se(V,function($){var Y=document.createElement("img");Ia($,Te,{width:$.offsetWidth,height:$.offsetHeight,html:$.innerHTML}),w&&(Y.crossOrigin=w),Y.src=A,Y.alt=R,Y.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',$.innerHTML="",$.appendChild(Y)})}},resetPreview:function(){se(this.previews,function(E){var w=gi(E,Te);Ln(E,{width:w.width,height:w.height}),E.innerHTML=w.html,tT(E,Te)})},preview:function(){var E=this.imageData,w=this.canvasData,_=this.cropBoxData,A=_.width,R=_.height,k=E.width,V=E.height,$=_.left-w.left-E.left,Y=_.top-w.top-E.top;!this.cropped||this.disabled||(Ln(this.viewBoxImage,ve({width:k,height:V},Ca(ve({translateX:-$,translateY:-Y},E)))),se(this.previews,function(G){var z=gi(G,Te),Z=z.width,Ne=z.height,Oe=Z,je=Ne,Ie=1;A&&(Ie=Z/A,je=R*Ie),R&&je>Ne&&(Ie=Ne/R,Oe=A*Ie,je=Ne),Ln(G,{width:Oe,height:je}),Ln(G.getElementsByTagName("img")[0],ve({width:k*Ie,height:V*Ie},Ca(ve({translateX:-$*Ie,translateY:-Y*Ie},E))))}))}},mT={bind:function(){var E=this.element,w=this.options,_=this.cropper;oe(w.cropstart)&&Pt(E,jt,w.cropstart),oe(w.cropmove)&&Pt(E,xt,w.cropmove),oe(w.cropend)&&Pt(E,et,w.cropend),oe(w.crop)&&Pt(E,dt,w.crop),oe(w.zoom)&&Pt(E,en,w.zoom),Pt(_,Ot,this.onCropStart=this.cropStart.bind(this)),w.zoomable&&w.zoomOnWheel&&Pt(_,zt,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),w.toggleDragModeOnDblclick&&Pt(_,Gt,this.onDblclick=this.dblclick.bind(this)),Pt(E.ownerDocument,St,this.onCropMove=this.cropMove.bind(this)),Pt(E.ownerDocument,oo,this.onCropEnd=this.cropEnd.bind(this)),w.responsive&&Pt(window,bt,this.onResize=this.resize.bind(this))},unbind:function(){var E=this.element,w=this.options,_=this.cropper;oe(w.cropstart)&&Wt(E,jt,w.cropstart),oe(w.cropmove)&&Wt(E,xt,w.cropmove),oe(w.cropend)&&Wt(E,et,w.cropend),oe(w.crop)&&Wt(E,dt,w.crop),oe(w.zoom)&&Wt(E,en,w.zoom),Wt(_,Ot,this.onCropStart),w.zoomable&&w.zoomOnWheel&&Wt(_,zt,this.onWheel,{passive:!1,capture:!0}),w.toggleDragModeOnDblclick&&Wt(_,Gt,this.onDblclick),Wt(E.ownerDocument,St,this.onCropMove),Wt(E.ownerDocument,oo,this.onCropEnd),w.responsive&&Wt(window,bt,this.onResize)}},gT={resize:function(){if(!this.disabled){var E=this.options,w=this.container,_=this.containerData,A=w.offsetWidth/_.width,R=w.offsetHeight/_.height,k=Math.abs(A-1)>Math.abs(R-1)?A:R;if(k!==1){var V,$;E.restore&&(V=this.getCanvasData(),$=this.getCropBoxData()),this.render(),E.restore&&(this.setCanvasData(se(V,function(Y,G){V[G]=Y*k})),this.setCropBoxData(se($,function(Y,G){$[G]=Y*k})))}}},dblclick:function(){this.disabled||this.options.dragMode===Fe||this.setDragMode($w(this.dragBox,W)?Re:Be)},wheel:function(E){var w=this,_=Number(this.options.wheelZoomRatio)||.1,A=1;this.disabled||(E.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){w.wheeling=!1},50),E.deltaY?A=E.deltaY>0?1:-1:E.wheelDelta?A=-E.wheelDelta/120:E.detail&&(A=E.detail>0?1:-1),this.zoom(-A*_,E)))},cropStart:function(E){var w=E.buttons,_=E.button;if(!(this.disabled||(E.type==="mousedown"||E.type==="pointerdown"&&E.pointerType==="mouse")&&(J(w)&&w!==1||J(_)&&_!==0||E.ctrlKey))){var A=this.options,R=this.pointers,k;E.changedTouches?se(E.changedTouches,function(V){R[V.identifier]=Ir(V)}):R[E.pointerId||0]=Ir(E),Object.keys(R).length>1&&A.zoomable&&A.zoomOnTouch?k=B:k=gi(E.target,ye),ao.test(k)&&Vo(this.element,jt,{originalEvent:E,action:k})!==!1&&(E.preventDefault(),this.action=k,this.cropping=!1,k===T&&(this.cropping=!0,st(this.dragBox,ie)))}},cropMove:function(E){var w=this.action;if(!(this.disabled||!w)){var _=this.pointers;E.preventDefault(),Vo(this.element,xt,{originalEvent:E,action:w})!==!1&&(E.changedTouches?se(E.changedTouches,function(A){ve(_[A.identifier]||{},Ir(A,!0))}):ve(_[E.pointerId||0]||{},Ir(E,!0)),this.change(E))}},cropEnd:function(E){if(!this.disabled){var w=this.action,_=this.pointers;E.changedTouches?se(E.changedTouches,function(A){delete _[A.identifier]}):delete _[E.pointerId||0],w&&(E.preventDefault(),Object.keys(_).length||(this.action=""),this.cropping&&(this.cropping=!1,Ho(this.dragBox,ie,this.cropped&&this.options.modal)),Vo(this.element,et,{originalEvent:E,action:w}))}}},vT={change:function(E){var w=this.options,_=this.canvasData,A=this.containerData,R=this.cropBoxData,k=this.pointers,V=this.action,$=w.aspectRatio,Y=R.left,G=R.top,z=R.width,Z=R.height,Ne=Y+z,Oe=G+Z,je=0,Ie=0,ot=A.width,it=A.height,qe=!0,gn;!$&&E.shiftKey&&($=z&&Z?z/Z:1),this.limited&&(je=R.minLeft,Ie=R.minTop,ot=je+Math.min(A.width,_.width,_.left+_.width),it=Ie+Math.min(A.height,_.height,_.top+_.height));var Nt=k[Object.keys(k)[0]],ee={x:Nt.endX-Nt.startX,y:Nt.endY-Nt.startY},Ce=function(Mt){switch(Mt){case I:Ne+ee.x>ot&&(ee.x=ot-Ne);break;case D:Y+ee.xit&&(ee.y=it-Oe);break}};switch(V){case x:Y+=ee.x,G+=ee.y;break;case I:if(ee.x>=0&&(Ne>=ot||$&&(G<=Ie||Oe>=it))){qe=!1;break}Ce(I),z+=ee.x,z<0&&(V=D,z=-z,Y-=z),$&&(Z=z/$,G+=(R.height-Z)/2);break;case F:if(ee.y<=0&&(G<=Ie||$&&(Y<=je||Ne>=ot))){qe=!1;break}Ce(F),Z-=ee.y,G+=ee.y,Z<0&&(V=C,Z=-Z,G-=Z),$&&(z=Z*$,Y+=(R.width-z)/2);break;case D:if(ee.x<=0&&(Y<=je||$&&(G<=Ie||Oe>=it))){qe=!1;break}Ce(D),z-=ee.x,Y+=ee.x,z<0&&(V=I,z=-z,Y-=z),$&&(Z=z/$,G+=(R.height-Z)/2);break;case C:if(ee.y>=0&&(Oe>=it||$&&(Y<=je||Ne>=ot))){qe=!1;break}Ce(C),Z+=ee.y,Z<0&&(V=F,Z=-Z,G-=Z),$&&(z=Z*$,Y+=(R.width-z)/2);break;case K:if($){if(ee.y<=0&&(G<=Ie||Ne>=ot)){qe=!1;break}Ce(F),Z-=ee.y,G+=ee.y,z=Z*$}else Ce(F),Ce(I),ee.x>=0?NeIe&&(Z-=ee.y,G+=ee.y):(Z-=ee.y,G+=ee.y);z<0&&Z<0?(V=j,Z=-Z,z=-z,G-=Z,Y-=z):z<0?(V=P,z=-z,Y-=z):Z<0&&(V=U,Z=-Z,G-=Z);break;case P:if($){if(ee.y<=0&&(G<=Ie||Y<=je)){qe=!1;break}Ce(F),Z-=ee.y,G+=ee.y,z=Z*$,Y+=R.width-z}else Ce(F),Ce(D),ee.x<=0?Y>je?(z-=ee.x,Y+=ee.x):ee.y<=0&&G<=Ie&&(qe=!1):(z-=ee.x,Y+=ee.x),ee.y<=0?G>Ie&&(Z-=ee.y,G+=ee.y):(Z-=ee.y,G+=ee.y);z<0&&Z<0?(V=U,Z=-Z,z=-z,G-=Z,Y-=z):z<0?(V=K,z=-z,Y-=z):Z<0&&(V=j,Z=-Z,G-=Z);break;case j:if($){if(ee.x<=0&&(Y<=je||Oe>=it)){qe=!1;break}Ce(D),z-=ee.x,Y+=ee.x,Z=z/$}else Ce(C),Ce(D),ee.x<=0?Y>je?(z-=ee.x,Y+=ee.x):ee.y>=0&&Oe>=it&&(qe=!1):(z-=ee.x,Y+=ee.x),ee.y>=0?Oe=0&&(Ne>=ot||Oe>=it)){qe=!1;break}Ce(I),z+=ee.x,Z=z/$}else Ce(C),Ce(I),ee.x>=0?Ne=0&&Oe>=it&&(qe=!1):z+=ee.x,ee.y>=0?Oe0?V=ee.y>0?U:K:ee.x<0&&(Y-=z,V=ee.y>0?j:P),ee.y<0&&(G-=Z),this.cropped||(tn(this.cropBox,ne),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}qe&&(R.width=z,R.height=Z,R.left=Y,R.top=G,this.action=V,this.renderCropBox()),se(k,function(at){at.startX=at.endX,at.startY=at.endY})}},bT={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&st(this.dragBox,ie),tn(this.cropBox,ne),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=ve({},this.initialImageData),this.canvasData=ve({},this.initialCanvasData),this.cropBoxData=ve({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(ve(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),tn(this.dragBox,ie),st(this.cropBox,ne)),this},replace:function(E){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&E&&(this.isImg&&(this.element.src=E),w?(this.url=E,this.image.src=E,this.ready&&(this.viewBoxImage.src=E,se(this.previews,function(_){_.getElementsByTagName("img")[0].src=E}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(E))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,tn(this.cropper,q)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,st(this.cropper,q)),this},destroy:function(){var E=this.element;return E[N]?(E[N]=void 0,this.isImg&&this.replaced&&(E.src=this.originalUrl),this.uncreate(),this):this},move:function(E){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:E,_=this.canvasData,A=_.left,R=_.top;return this.moveTo(pe(E)?E:A+Number(E),pe(w)?w:R+Number(w))},moveTo:function(E){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:E,_=this.canvasData,A=!1;return E=Number(E),w=Number(w),this.ready&&!this.disabled&&this.options.movable&&(J(E)&&(_.left=E,A=!0),J(w)&&(_.top=w,A=!0),A&&this.renderCanvas(!0)),this},zoom:function(E,w){var _=this.canvasData;return E=Number(E),E<0?E=1/(1-E):E=1+E,this.zoomTo(_.width*E/_.naturalWidth,null,w)},zoomTo:function(E,w,_){var A=this.options,R=this.canvasData,k=R.width,V=R.height,$=R.naturalWidth,Y=R.naturalHeight;if(E=Number(E),E>=0&&this.ready&&!this.disabled&&A.zoomable){var G=$*E,z=Y*E;if(Vo(this.element,en,{ratio:E,oldRatio:k/$,originalEvent:_})===!1)return this;if(_){var Z=this.pointers,Ne=Kd(this.cropper),Oe=Z&&Object.keys(Z).length?aT(Z):{pageX:_.pageX,pageY:_.pageY};R.left-=(G-k)*((Oe.pageX-Ne.left-R.left)/k),R.top-=(z-V)*((Oe.pageY-Ne.top-R.top)/V)}else le(w)&&J(w.x)&&J(w.y)?(R.left-=(G-k)*((w.x-R.left)/k),R.top-=(z-V)*((w.y-R.top)/V)):(R.left-=(G-k)/2,R.top-=(z-V)/2);R.width=G,R.height=z,this.renderCanvas(!0)}return this},rotate:function(E){return this.rotateTo((this.imageData.rotate||0)+Number(E))},rotateTo:function(E){return E=Number(E),J(E)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=E%360,this.renderCanvas(!0,!0)),this},scaleX:function(E){var w=this.imageData.scaleY;return this.scale(E,J(w)?w:1)},scaleY:function(E){var w=this.imageData.scaleX;return this.scale(J(w)?w:1,E)},scale:function(E){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:E,_=this.imageData,A=!1;return E=Number(E),w=Number(w),this.ready&&!this.disabled&&this.options.scalable&&(J(E)&&(_.scaleX=E,A=!0),J(w)&&(_.scaleY=w,A=!0),A&&this.renderCanvas(!0,!0)),this},getData:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,w=this.options,_=this.imageData,A=this.canvasData,R=this.cropBoxData,k;if(this.ready&&this.cropped){k={x:R.left-A.left,y:R.top-A.top,width:R.width,height:R.height};var V=_.width/_.naturalWidth;if(se(k,function(G,z){k[z]=G/V}),E){var $=Math.round(k.y+k.height),Y=Math.round(k.x+k.width);k.x=Math.round(k.x),k.y=Math.round(k.y),k.width=Y-k.x,k.height=$-k.y}}else k={x:0,y:0,width:0,height:0};return w.rotatable&&(k.rotate=_.rotate||0),w.scalable&&(k.scaleX=_.scaleX||1,k.scaleY=_.scaleY||1),k},setData:function(E){var w=this.options,_=this.imageData,A=this.canvasData,R={};if(this.ready&&!this.disabled&&le(E)){var k=!1;w.rotatable&&J(E.rotate)&&E.rotate!==_.rotate&&(_.rotate=E.rotate,k=!0),w.scalable&&(J(E.scaleX)&&E.scaleX!==_.scaleX&&(_.scaleX=E.scaleX,k=!0),J(E.scaleY)&&E.scaleY!==_.scaleY&&(_.scaleY=E.scaleY,k=!0)),k&&this.renderCanvas(!0,!0);var V=_.width/_.naturalWidth;J(E.x)&&(R.left=E.x*V+A.left),J(E.y)&&(R.top=E.y*V+A.top),J(E.width)&&(R.width=E.width*V),J(E.height)&&(R.height=E.height*V),this.setCropBoxData(R)}return this},getContainerData:function(){return this.ready?ve({},this.containerData):{}},getImageData:function(){return this.sized?ve({},this.imageData):{}},getCanvasData:function(){var E=this.canvasData,w={};return this.ready&&se(["left","top","width","height","naturalWidth","naturalHeight"],function(_){w[_]=E[_]}),w},setCanvasData:function(E){var w=this.canvasData,_=w.aspectRatio;return this.ready&&!this.disabled&&le(E)&&(J(E.left)&&(w.left=E.left),J(E.top)&&(w.top=E.top),J(E.width)?(w.width=E.width,w.height=E.width/_):J(E.height)&&(w.height=E.height,w.width=E.height*_),this.renderCanvas(!0)),this},getCropBoxData:function(){var E=this.cropBoxData,w;return this.ready&&this.cropped&&(w={left:E.left,top:E.top,width:E.width,height:E.height}),w||{}},setCropBoxData:function(E){var w=this.cropBoxData,_=this.options.aspectRatio,A,R;return this.ready&&this.cropped&&!this.disabled&&le(E)&&(J(E.left)&&(w.left=E.left),J(E.top)&&(w.top=E.top),J(E.width)&&E.width!==w.width&&(A=!0,w.width=E.width),J(E.height)&&E.height!==w.height&&(R=!0,w.height=E.height),_&&(A?w.height=w.width/_:R&&(w.width=w.height*_)),this.renderCropBox()),this},getCroppedCanvas:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var w=this.canvasData,_=sT(this.image,this.imageData,w,E);if(!this.cropped)return _;var A=this.getData(),R=A.x,k=A.y,V=A.width,$=A.height,Y=_.width/Math.floor(w.naturalWidth);Y!==1&&(R*=Y,k*=Y,V*=Y,$*=Y);var G=V/$,z=Fn({aspectRatio:G,width:E.maxWidth||1/0,height:E.maxHeight||1/0}),Z=Fn({aspectRatio:G,width:E.minWidth||0,height:E.minHeight||0},"cover"),Ne=Fn({aspectRatio:G,width:E.width||(Y!==1?_.width:V),height:E.height||(Y!==1?_.height:$)}),Oe=Ne.width,je=Ne.height;Oe=Math.min(z.width,Math.max(Z.width,Oe)),je=Math.min(z.height,Math.max(Z.height,je));var Ie=document.createElement("canvas"),ot=Ie.getContext("2d");Ie.width=Mn(Oe),Ie.height=Mn(je),ot.fillStyle=E.fillColor||"transparent",ot.fillRect(0,0,Oe,je);var it=E.imageSmoothingEnabled,qe=it===void 0?!0:it,gn=E.imageSmoothingQuality;ot.imageSmoothingEnabled=qe,gn&&(ot.imageSmoothingQuality=gn);var Nt=_.width,ee=_.height,Ce=R,at=k,Mt,vn,lo,co,Un,nn;Ce<=-V||Ce>Nt?(Ce=0,Mt=0,lo=0,Un=0):Ce<=0?(lo=-Ce,Ce=0,Mt=Math.min(Nt,V+Ce),Un=Mt):Ce<=Nt&&(lo=0,Mt=Math.min(V,Nt-Ce),Un=Mt),Mt<=0||at<=-$||at>ee?(at=0,vn=0,co=0,nn=0):at<=0?(co=-at,at=0,vn=Math.min(ee,$+at),nn=vn):at<=ee&&(co=0,vn=Math.min($,ee-at),nn=vn);var yt=[Ce,at,Mt,vn];if(Un>0&&nn>0){var uo=Oe/V;yt.push(lo*uo,co*uo,Un*uo,nn*uo)}return ot.drawImage.apply(ot,[_].concat(d(yt.map(function(Cr){return Math.floor(Mn(Cr))})))),Ie},setAspectRatio:function(E){var w=this.options;return!this.disabled&&!pe(E)&&(w.aspectRatio=Math.max(0,E)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(E){var w=this.options,_=this.dragBox,A=this.face;if(this.ready&&!this.disabled){var R=E===Be,k=w.movable&&E===Re;E=R||k?E:Fe,w.dragMode=E,Ia(_,ye,E),Ho(_,W,R),Ho(_,fe,k),w.cropBoxMovable||(Ia(A,ye,E),Ho(A,W,R),Ho(A,fe,k))}return this}},yT=y.Cropper,Zd=function(){function S(E){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(i(this,S),!E||!io.test(E.tagName))throw new Error("The first argument is required and must be an or element.");this.element=E,this.options=ve({},M,le(w)&&w),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return l(S,[{key:"init",value:function(){var w=this.element,_=w.tagName.toLowerCase(),A;if(!w[N]){if(w[N]=this,_==="img"){if(this.isImg=!0,A=w.getAttribute("src")||"",this.originalUrl=A,!A)return;A=w.src}else _==="canvas"&&window.HTMLCanvasElement&&(A=w.toDataURL());this.load(A)}}},{key:"load",value:function(w){var _=this;if(w){this.url=w,this.imageData={};var A=this.element,R=this.options;if(!R.rotatable&&!R.scalable&&(R.checkOrientation=!1),!R.checkOrientation||!window.ArrayBuffer){this.clone();return}if(ro.test(w)){so.test(w)?this.read(cT(w)):this.clone();return}var k=new XMLHttpRequest,V=this.clone.bind(this);this.reloading=!0,this.xhr=k,k.onabort=V,k.onerror=V,k.ontimeout=V,k.onprogress=function(){k.getResponseHeader("content-type")!==Bn&&k.abort()},k.onload=function(){_.read(k.response)},k.onloadend=function(){_.reloading=!1,_.xhr=null},R.checkCrossOrigin&&Yd(w)&&A.crossOrigin&&(w=Jd(w)),k.open("GET",w,!0),k.responseType="arraybuffer",k.withCredentials=A.crossOrigin==="use-credentials",k.send()}}},{key:"read",value:function(w){var _=this.options,A=this.imageData,R=uT(w),k=0,V=1,$=1;if(R>1){this.url=dT(w,Bn);var Y=fT(R);k=Y.rotate,V=Y.scaleX,$=Y.scaleY}_.rotatable&&(A.rotate=k),_.scalable&&(A.scaleX=V,A.scaleY=$),this.clone()}},{key:"clone",value:function(){var w=this.element,_=this.url,A=w.crossOrigin,R=_;this.options.checkCrossOrigin&&Yd(_)&&(A||(A="anonymous"),R=Jd(_)),this.crossOrigin=A,this.crossOriginUrl=R;var k=document.createElement("img");A&&(k.crossOrigin=A),k.src=R||_,k.alt=w.alt||"The image to crop",this.image=k,k.onload=this.start.bind(this),k.onerror=this.stop.bind(this),st(k,_e),w.parentNode.insertBefore(k,w.nextSibling)}},{key:"start",value:function(){var w=this,_=this.image;_.onload=null,_.onerror=null,this.sizing=!0;var A=y.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(y.navigator.userAgent),R=function(Y,G){ve(w.imageData,{naturalWidth:Y,naturalHeight:G,aspectRatio:Y/G}),w.initialImageData=ve({},w.imageData),w.sizing=!1,w.sized=!0,w.build()};if(_.naturalWidth&&!A){R(_.naturalWidth,_.naturalHeight);return}var k=document.createElement("img"),V=document.body||document.documentElement;this.sizingImage=k,k.onload=function(){R(k.width,k.height),A||V.removeChild(k)},k.src=_.src,A||(k.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",V.appendChild(k))}},{key:"stop",value:function(){var w=this.image;w.onload=null,w.onerror=null,w.parentNode.removeChild(w),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var w=this.element,_=this.options,A=this.image,R=w.parentNode,k=document.createElement("div");k.innerHTML=H;var V=k.querySelector(".".concat(N,"-container")),$=V.querySelector(".".concat(N,"-canvas")),Y=V.querySelector(".".concat(N,"-drag-box")),G=V.querySelector(".".concat(N,"-crop-box")),z=G.querySelector(".".concat(N,"-face"));this.container=R,this.cropper=V,this.canvas=$,this.dragBox=Y,this.cropBox=G,this.viewBox=V.querySelector(".".concat(N,"-view-box")),this.face=z,$.appendChild(A),st(w,ne),R.insertBefore(V,w.nextSibling),this.isImg||tn(A,_e),this.initPreview(),this.bind(),_.initialAspectRatio=Math.max(0,_.initialAspectRatio)||NaN,_.aspectRatio=Math.max(0,_.aspectRatio)||NaN,_.viewMode=Math.max(0,Math.min(3,Math.round(_.viewMode)))||0,st(G,ne),_.guides||st(G.getElementsByClassName("".concat(N,"-dashed")),ne),_.center||st(G.getElementsByClassName("".concat(N,"-center")),ne),_.background&&st(V,"".concat(N,"-bg")),_.highlight||st(z,Ye),_.cropBoxMovable&&(st(z,fe),Ia(z,ye,x)),_.cropBoxResizable||(st(G.getElementsByClassName("".concat(N,"-line")),ne),st(G.getElementsByClassName("".concat(N,"-point")),ne)),this.render(),this.ready=!0,this.setDragMode(_.dragMode),_.autoCrop&&this.crop(),this.setData(_.data),oe(_.ready)&&Pt(w,Fo,_.ready,{once:!0}),Vo(w,Fo)}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),tn(this.element,ne))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=yT,S}},{key:"setDefaults",value:function(w){ve(M,le(w)&&w)}}]),S}();return ve(Zd.prototype,pT,hT,mT,gT,vT,bT),Zd})})(wc);var jg=wc.exports;Object.defineProperty(_c,"__esModule",{value:!0});var Tc=n,Gg=jg,zg=Wg(Gg);function Wg(e){return e&&e.__esModule?e:{default:e}}function Xg(e,t){var o={};for(var a in e)t.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(e,a)&&(o[a]=e[a]);return o}var Kg=typeof window>"u"?[String,Array]:[String,Array,Element,NodeList],Yg=_c.default={render:function(){var t=this.crossorigin||void 0;return(0,Tc.h)("div",{style:this.containerStyle},[(0,Tc.h)("img",{ref:"img",src:this.src,alt:this.alt||"image",style:[{"max-width":"100%"},this.imgStyle],crossorigin:t})])},props:{containerStyle:Object,src:{type:String,default:""},alt:String,imgStyle:Object,viewMode:Number,dragMode:String,initialAspectRatio:Number,aspectRatio:Number,data:Object,preview:Kg,responsive:{type:Boolean,default:!0},restore:{type:Boolean,default:!0},checkCrossOrigin:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},crossorigin:{type:String},modal:{type:Boolean,default:!0},guides:{type:Boolean,default:!0},center:{type:Boolean,default:!0},highlight:{type:Boolean,default:!0},background:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!0},autoCropArea:Number,movable:{type:Boolean,default:!0},rotatable:{type:Boolean,default:!0},scalable:{type:Boolean,default:!0},zoomable:{type:Boolean,default:!0},zoomOnTouch:{type:Boolean,default:!0},zoomOnWheel:{type:Boolean,default:!0},wheelZoomRatio:Number,cropBoxMovable:{type:Boolean,default:!0},cropBoxResizable:{type:Boolean,default:!0},toggleDragModeOnDblclick:{type:Boolean,default:!0},minCanvasWidth:Number,minCanvasHeight:Number,minCropBoxWidth:Number,minCropBoxHeight:Number,minContainerWidth:Number,minContainerHeight:Number,ready:Function,cropstart:Function,cropmove:Function,cropend:Function,crop:Function,zoom:Function},mounted:function(){var t=this.$options.props;t.containerStyle,t.src,t.alt,t.imgStyle;var o=Xg(t,["containerStyle","src","alt","imgStyle"]),a={};for(var s in o)this[s]!==void 0&&(a[s]=this[s]);this.cropper=new zg.default(this.$refs.img,a)},methods:{reset:function(){return this.cropper.reset()},clear:function(){return this.cropper.clear()},initCrop:function(){return this.cropper.crop()},replace:function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.cropper.replace(t,o)},enable:function(){return this.cropper.enable()},disable:function(){return this.cropper.disable()},destroy:function(){return this.cropper.destroy()},move:function(t,o){return this.cropper.move(t,o)},moveTo:function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;return this.cropper.moveTo(t,o)},relativeZoom:function(t,o){return this.cropper.zoom(t,o)},zoomTo:function(t,o){return this.cropper.zoomTo(t,o)},rotate:function(t){return this.cropper.rotate(t)},rotateTo:function(t){return this.cropper.rotateTo(t)},scaleX:function(t){return this.cropper.scaleX(t)},scaleY:function(t){return this.cropper.scaleY(t)},scale:function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;return this.cropper.scale(t,o)},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return this.cropper.getData(t)},setData:function(t){return this.cropper.setData(t)},getContainerData:function(){return this.cropper.getContainerData()},getImageData:function(){return this.cropper.getImageData()},getCanvasData:function(){return this.cropper.getCanvasData()},setCanvasData:function(t){return this.cropper.setCanvasData(t)},getCropBoxData:function(){return this.cropper.getCropBoxData()},setCropBoxData:function(t){return this.cropper.setCropBoxData(t)},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.cropper.getCroppedCanvas(t)},setAspectRatio:function(t){return this.cropper.setAspectRatio(t)},setDragMode:function(t){return this.cropper.setDragMode(t)}}};const Ct=n.defineComponent({__name:"Button",props:{variant:{default:"secondary"},type:{default:"button"},href:{},loading:{type:Boolean,default:!1}},setup(e){const t=e,o={primary:"bg-blue-500 dark:bg-blue-600/50 focus:outline-blue-500",secondary:"bg-gray-600 dark:bg-gray-600/50 focus:outline-gray-600",success:"bg-green-500 dark:bg-green-600/50 focus:outline-green-500",warning:"bg-orange-400 dark:bg-orange-600/50 focus:outline-orange-400",danger:"bg-red-500 dark:bg-red-600/50 focus:outline-red-500",transparent:"bg-transparent"},a=n.computed(()=>o[t.variant]);return(s,i)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(s.href?"a":"button"),{class:n.normalizeClass(["inline-flex items-center py-2 px-4 border-0 uppercase rounded-md shadow-sm text-xs font-medium text-white hover:shadow-md hover:opacity-75 disabled:opacity-50 focus:outline-none focus:ring-1",a.value]),href:s.href,type:s.type},{default:n.withCtx(()=>[s.loading?(n.openBlock(),n.createBlock(po,{key:0,class:"mr-2 w-3 h-3"})):n.createCommentVNode("",!0),n.renderSlot(s.$slots,"default")]),_:3},8,["class","href","type"]))}}),Jg={class:"px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Qg={class:"sm:flex sm:items-start"},Zg={class:"text-left w-full space-y-6"},qg={class:"mt-2 w-full space-y-6"},$g={class:"mt-5 sm:mt-4 px-4 sm:px-6 pb-4 sm:flex sm:flex-row-reverse sm:gap-x-2 space-y-3 sm:space-y-0"},qa=n.defineComponent({__name:"InputModal",props:{name:{},title:{},onSubmit:{type:Function}},setup(e){return(t,o)=>(n.openBlock(),n.createBlock(Eo,{as:"template",class:"nova-file-manager",name:t.name},{default:n.withCtx(({close:a})=>[n.createVNode(n.unref(sn),{class:"relative bg-gray-200 dark:bg-gray-900 rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-lg w-full"},{default:n.withCtx(()=>[n.createElementVNode("form",{name:"input-modal",onSubmit:o[0]||(o[0]=n.withModifiers((...s)=>t.onSubmit&&t.onSubmit(...s),["prevent"]))},[n.createElementVNode("div",Jg,[n.createElementVNode("div",Qg,[n.createElementVNode("div",Zg,[n.createVNode(n.unref(lc),{as:"h3",class:"text-lg leading-6 font-medium text-gray-700 dark:text-gray-200"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(t.title),1)]),_:1}),n.createElementVNode("div",qg,[n.renderSlot(t.$slots,"inputs")])])])]),n.createElementVNode("div",$g,[n.renderSlot(t.$slots,"submitButton"),n.renderSlot(t.$slots,"cancelButton",{close:a})])],32)]),_:2},1024)]),_:3},8,["name"]))}}),ev={class:"rounded-md overflow-auto"},tv={class:"relative rounded-md text-center overflow-hidden w-full"},nv=n.createElementVNode("div",{class:"absolute inset-0 opacity-50 bg-stripes bg-stripes-gray-400"},null,-1),ov=["src","alt"],av={class:"w-full border rounded-md space-y-2 px-3 py-2 bg-gray-100 dark:bg-gray-900 shadow-sm focus-within:ring-1 focus-within:ring-blue-600 focus-within:border-blue-600 border-gray-400 dark:border-gray-700"},rv={class:"block text-xs font-medium text-gray-700 dark:text-gray-200",for:"name"},sv=["placeholder"],iv={class:"mt-2 text-xs text-gray-400",id:"name-description"},xc=n.defineComponent({__name:"UploadCropModal",props:{file:{},name:{},onSubmit:{type:Function},destFile:{},destName:{}},setup(e){const t=e,o=De(),a=n.ref(null);n.onMounted(()=>{a.value=t.destName??""});const s=n.computed(()=>URL.createObjectURL(t.destFile)),i=l=>o.closeModal({name:l}),r=()=>a.value&&t.onSubmit(a.value);return(l,c)=>(n.openBlock(),n.createBlock(qa,{name:l.name,"on-submit":r,title:l.__("NovaFileManager.uploadCropTitle")},{inputs:n.withCtx(()=>[n.createElementVNode("div",ev,[n.createElementVNode("div",tv,[nv,n.createElementVNode("img",{class:"relative z-10 object-contain h-48 w-full",src:s.value,alt:l.name},null,8,ov)])]),n.createElementVNode("div",null,[n.createElementVNode("div",av,[n.createElementVNode("label",rv,n.toDisplayString(l.__("Name")),1),n.withDirectives(n.createElementVNode("input",{id:"name","onUpdate:modelValue":c[0]||(c[0]=d=>a.value=d),placeholder:l.__("NovaFileManager.actions.uploadCrop"),class:"block w-full border-0 p-0 bg-gray-100 dark:bg-gray-900 placeholder-gray-400 sm:text-sm text-black dark:text-white focus:outline-none focus:ring-0",name:"name",type:"text"},null,8,sv),[[n.vModelText,a.value]])]),n.createElementVNode("p",iv,n.toDisplayString(l.__("NovaFileManager.edit.originalName",{name:l.file.name})),1)])]),submitButton:n.withCtx(()=>[n.createVNode(Ct,{disabled:!a.value,class:"w-full sm:w-auto",type:"submit",variant:"primary"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(l.__("NovaFileManager.actions.upload")),1)]),_:1},8,["disabled"])]),cancelButton:n.withCtx(()=>[n.createVNode(Ct,{class:"w-full sm:w-auto",type:"reset",variant:"secondary",onClick:c[1]||(c[1]=d=>i(l.name))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(l.__("Cancel")),1)]),_:1})]),_:1},8,["name","title"]))}}),lv={class:"w-full flex flex-col flex-col-reverse gap-2 md:flex-row justify-between items-start"},cv={class:"text-lg font-medium text-gray-900 dark:text-gray-400 break-all w-full"},dv={class:"flex flex-row gap-2 justify-end flex-shrink-0"},uv={class:"h-full max-h-[70vh]"},fv=n.defineComponent({__name:"CropImageModal",props:{file:{},name:{},onConfirm:{type:Function}},setup(e){const t=e,o=De(),a=n.ref(),s=n.ref(null),i=n.ref(),r=n.computed(()=>o.isOpen(yn)),l=n.computed(()=>o.cropperOptions),c=n.computed(()=>({height:"100%",minHeight:"60vh"})),d=n.computed(()=>{const u=s.value?.getData(),m=`${Math.round(u.width)}_${Math.round(u.height)}_${Math.round(u.x)}_${Math.round(u.y)}`;return t.file?.name.replace(t.file?.extension,`${m}.${t.file?.extension}`)}),f=u=>o.openModal({name:u}),p=u=>o.closeModal({name:u}),h=()=>{s.value?.getCroppedCanvas().toBlob(u=>{u&&(i.value=new File([u],t.file.name,{type:t.file.mime}),f(yn))})},g=u=>{if(!i.value)return;const m=new File([i.value],u,{type:t.file.mime});p(yn),p(t.name),t.onConfirm(m)};return(u,m)=>(n.openBlock(),n.createBlock(Eo,{as:"template",class:"nova-file-manager",name:u.name},{default:n.withCtx(({close:y})=>[n.createVNode(n.unref(sn),{class:"relative bg-gray-100 dark:bg-gray-900 rounded-lg overflow-hidden shadow-xl transform transition-all w-full max-w-7xl p-4 flex flex-col gap-4 h-[80vh] max-h-[80vh]"},{default:n.withCtx(()=>[n.createElementVNode("div",lv,[n.createElementVNode("h2",cv,n.toDisplayString(u.__("NovaFileManager.actions.cropImage",{image:u.file.name})),1),n.createElementVNode("div",dv,[n.createVNode(rt,{ref_key:"buttonRef",ref:a,title:u.__("NovaFileManager.actions.close"),onClick:n.withModifiers(y,["prevent","stop"])},{default:n.withCtx(()=>[n.createVNode(n.unref(Lr),{class:"w-5 h-5"})]),_:2},1032,["title","onClick"]),n.createVNode(rt,{variant:"success",onClick:h},{default:n.withCtx(()=>[n.createVNode(n.unref(Aa),{class:"h-5 w-5"})]),_:1})])]),n.createElementVNode("div",uv,[n.createVNode(n.unref(Yg),n.mergeProps({ref_key:"cropper",ref:s,containerStyle:c.value,src:u.file.url,alt:u.file.name},l.value),null,16,["containerStyle","src","alt"])]),r.value?(n.openBlock(),n.createBlock(xc,{key:0,file:u.file,name:n.unref(yn),"on-submit":g,"dest-file":i.value,"dest-name":d.value},null,8,["file","name","dest-file","dest-name"])):n.createCommentVNode("",!0)]),_:2},1024)]),_:1},8,["name"]))}});var pv=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,o=[],a=0;a"u"){o&&console.warn("unable to use e.clipboardData"),o&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var p=Oc[t.format]||Oc.default;window.clipboardData.setData(p,e)}else f.clipboardData.clearData(),f.clipboardData.setData(t.format,e);t.onCopy&&(f.preventDefault(),t.onCopy(f.clipboardData))}),document.body.appendChild(l),i.selectNodeContents(l),r.addRange(i);var d=document.execCommand("copy");if(!d)throw new Error("copy command was unsuccessful");c=!0}catch(f){o&&console.error("unable to copy using execCommand: ",f),o&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(p){o&&console.error("unable to copy using clipboardData: ",p),o&&console.error("falling back to prompt"),a=gv("message"in t?t.message:mv),window.prompt(a,e)}}finally{r&&(typeof r.removeRange=="function"?r.removeRange(i):r.removeAllRanges()),l&&document.body.removeChild(l),s()}return c}var bv=vv;const yv=Hn(bv);function Sc(){return{copy:t=>{yv(t)}}}function $a(e){const t=De(),{error:o}=cu(t);return{message:n.computed(()=>o?.value?.bag?.message),invalid:n.computed(()=>o?.value?.attribute===e),errors:n.computed(()=>o?.value?.bag?.errors)}}function Ev(){return{__:(t,o)=>{let a=window.Nova.config("translations")[t]?window.Nova.config("translations")[t]:t;return Object.entries(o??{}).forEach(([s,i])=>{if(i===null){console.error(`Translation '${a}' for key '${s}' contains a null replacement.`);return}i=String(i);const r=[`:${s}`,`:${s.toUpperCase()}`,`:${s.charAt(0).toUpperCase()}${s.slice(1)}`],l=[i,i.toUpperCase(),i.charAt(0).toUpperCase()+i.slice(1)];for(let c=r.length-1;c>=0;c--)a=a.replace(r[c],l[c])}),a}}}function ia(){const e=De(),t=n.computed(()=>e.permissions?.folder.create),o=n.computed(()=>e.permissions?.folder.rename),a=n.computed(()=>e.permissions?.folder.delete),s=n.computed(()=>e.permissions?.file.upload),i=n.computed(()=>e.permissions?.file.rename),r=n.computed(()=>e.permissions?.file.delete),l=n.computed(()=>e.permissions?.file.edit),c=n.computed(()=>e.permissions?.file.unzip);return{showCreateFolder:t,showRenameFolder:o,showDeleteFolder:a,showUploadFile:s,showRenameFile:i,showDeleteFile:r,showCropImage:l,showUnzipFile:c}}function Nc(){const e=De(),t=n.computed(()=>e.usePintura),o=n.computed(()=>e.pinturaOptions);return{usePinturaEditor:t,pinturaOptions:o}}const _v={class:"sm:flex sm:items-start"},wv={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"},Tv={class:"mt-2"},xv={class:"text-sm text-gray-500 dark:text-gray-400"},Ov={class:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse sm:gap-x-2 space-y-3 sm:space-y-0"},Rc=n.defineComponent({__name:"ConfirmModal",props:{name:{},attribute:{},title:{},content:{},icon:{},variant:{default:"danger"}},setup(e){const t=e,o={danger:{iconBackground:"bg-red-100 dark:bg-red-800/30",iconColor:"text-red-600 dark:text-red-500"}},{invalid:a,errors:s}=$a(t.attribute),i=n.computed(()=>t.variant?o[t.variant].iconColor:""),r=n.computed(()=>t.variant?o[t.variant].iconBackground:"");return(l,c)=>(n.openBlock(),n.createBlock(Eo,{as:"template",class:"nova-file-manager",name:l.name},{default:n.withCtx(({close:d})=>[n.createVNode(n.unref(sn),{class:"relative bg-gray-100 dark:bg-gray-900 rounded-lg px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-lg sm:w-full sm:p-6"},{default:n.withCtx(()=>[n.createElementVNode("div",_v,[n.createElementVNode("div",{class:n.normalizeClass(`${r.value} mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full sm:mx-0 sm:h-10 sm:w-10`)},[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(l.icon),{class:n.normalizeClass(`${i.value} h-6 w-6`),"aria-hidden":"true"},null,8,["class"]))],2),n.createElementVNode("div",wv,[n.createVNode(n.unref(lc),{as:"h3",class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-100"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(l.title),1)]),_:1}),n.createElementVNode("div",Tv,[n.createElementVNode("p",xv,n.toDisplayString(l.content),1)]),n.unref(a)?(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:0},n.renderList(n.unref(s),(f,p)=>(n.openBlock(),n.createElementBlock("p",{key:`confirm_modal_error_${p}`,class:"mt-2 text-sm text-red-600"},n.toDisplayString(f),1))),128)):n.createCommentVNode("",!0)])]),n.createElementVNode("div",Ov,[n.renderSlot(l.$slots,"confirmButton"),n.renderSlot(l.$slots,"cancelButton",{close:d})])]),_:2},1024)]),_:3},8,["name"]))}}),Ic=n.defineComponent({__name:"DeleteFileModal",props:{isOpen:{type:Boolean,default:!1},name:{},onConfirm:{},count:{}},setup(e){const t=n.computed(()=>Si);return(o,a)=>(n.openBlock(),n.createBlock(Rc,{content:o.__("NovaFileManager.deleteFileContent"),icon:t.value,"is-open":o.isOpen,name:o.name,title:o.__("NovaFileManager.deleteFileTitle",{count:o.count}),variant:"danger",attribute:"deleteFile"},{confirmButton:n.withCtx(()=>[n.createVNode(Ct,{class:"w-full sm:w-auto",type:"button",variant:"danger",onClick:o.onConfirm},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(o.__("Delete")),1)]),_:1},8,["onClick"])]),cancelButton:n.withCtx(({close:s})=>[n.createVNode(Ct,{class:"w-full sm:w-auto",type:"button",variant:"secondary",onClick:s},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(o.__("Cancel")),1)]),_:2},1032,["onClick"])]),_:1},8,["content","icon","is-open","name","title"]))}}),Sv={class:"w-full flex flex-col flex-col-reverse gap-2 md:flex-row justify-between items-start"},Nv={class:"text-lg font-medium text-gray-900 dark:text-gray-400 break-all w-full"},Rv={class:"flex flex-row gap-2 justify-end flex-shrink-0"},Iv={key:0,class:"h-full max-h-[70vh] flex flex-col items-center justify-center space-y-4"},Cv={class:"text-red-500 text-xl"},kv=n.defineComponent({__name:"EditImageModal",props:{file:{},name:{},onConfirm:{type:Function}},setup(e){const t=e,o=De(),a=n.ref(),s=n.ref(),i=n.ref(),r=n.computed(()=>o.isOpen(yn)),l=n.ref(),c=n.ref(),{pinturaOptions:d}=Nc();n.watchEffect(()=>{if(l.value&&!c.value)try{const{appendDefaultEditor:u,editorOptions:m}=window.novaFileManagerEditor;c.value=u(l.value,{...m,...d.value,src:t.file.url,enableButtonExport:!1}),c.value&&c.value.on("loaderror",({error:y})=>window.Nova.error(y.message))}catch(u){s.value=!0,console.error(u)}});const f=u=>o.openModal({name:u}),p=u=>o.closeModal({name:u}),h=()=>{c.value?.processImage().then(({dest:u})=>{i.value=u,f(yn)})},g=u=>{if(!i.value)return;const m=new File([i.value],u,{type:t.file.mime});p(yn),p(t.name),t.onConfirm(m)};return(u,m)=>(n.openBlock(),n.createBlock(Eo,{as:"template",class:"nova-file-manager",name:u.name},{default:n.withCtx(({close:y})=>[n.createVNode(n.unref(sn),{class:"relative bg-gray-100 dark:bg-gray-900 rounded-lg overflow-hidden shadow-xl transform transition-all w-full max-w-7xl p-4 flex flex-col gap-4 h-[80vh] max-h-[80vh]"},{default:n.withCtx(()=>[n.createElementVNode("div",Sv,[n.createElementVNode("h2",Nv,n.toDisplayString(u.__("NovaFileManager.actions.editImage",{image:u.file.name})),1),n.createElementVNode("div",Rv,[n.createVNode(rt,{ref_key:"buttonRef",ref:a,title:u.__("NovaFileManager.actions.close"),onClick:n.withModifiers(y,["prevent","stop"])},{default:n.withCtx(()=>[n.createVNode(n.unref(Lr),{class:"w-5 h-5"})]),_:2},1032,["title","onClick"]),n.createVNode(rt,{variant:"success",onClick:h},{default:n.withCtx(()=>[n.createVNode(n.unref(Aa),{class:"h-5 w-5"})]),_:1})])]),s.value?(n.openBlock(),n.createElementBlock("div",Iv,[n.createVNode(n.unref(Ci),{class:"w-16 h-16 text-red-500"}),n.createElementVNode("p",Cv,n.toDisplayString(u.__("NovaFileManager.pintura.loadingError")),1)])):(n.openBlock(),n.createElementBlock("div",{key:1,class:"h-full max-h-[70vh]",ref_key:"editorRef",ref:l},null,512)),r.value?(n.openBlock(),n.createBlock(xc,{key:2,file:u.file,name:n.unref(yn),"on-submit":g,"dest-file":i.value},null,8,["file","name","dest-file"])):n.createCommentVNode("",!0)]),_:2},1024)]),_:1},8,["name"]))}}),Av={class:"block text-xs font-medium text-gray-700 dark:text-gray-200",for:"name"},Dv=["placeholder"],Bv=n.defineComponent({__name:"RenameFileModal",props:{name:{},onSubmit:{type:Function},from:{}},setup(e){const t=e,{invalid:o,errors:a}=$a(Xt.RENAME_FILE),s=n.ref(null);n.onMounted(()=>s.value=t.from);const i=()=>s.value&&t.onSubmit(s.value);return(r,l)=>(n.openBlock(),n.createBlock(qa,{name:r.name,"on-submit":i,title:r.__("NovaFileManager.renameFileTitle")},{inputs:n.withCtx(()=>[n.createElementVNode("div",null,[n.createElementVNode("div",{class:n.normalizeClass(["w-full border rounded-md space-y-2 px-3 py-2 bg-gray-100 dark:bg-gray-900 shadow-sm focus-within:ring-1 focus-within:ring-blue-600 focus-within:border-blue-600",n.unref(o)?"border-red-400 dark:border-red-700":"border-gray-400 dark:border-gray-700"])},[n.createElementVNode("label",Av,n.toDisplayString(r.__("Name")),1),n.withDirectives(n.createElementVNode("input",{id:"name","onUpdate:modelValue":l[0]||(l[0]=c=>s.value=c),placeholder:r.__("Name"),class:"block w-full border-0 p-0 bg-gray-100 dark:bg-gray-900 placeholder-gray-400 sm:text-sm text-black dark:text-white focus:outline-none focus:ring-0",name:"name",type:"text"},null,8,Dv),[[n.vModelText,s.value]])],2),n.unref(o)?(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:0},n.renderList(n.unref(a),(c,d)=>(n.openBlock(),n.createElementBlock("p",{key:`rename_file_modal_error_${d}`,class:"mt-2 text-sm text-red-600"},n.toDisplayString(c),1))),128)):n.createCommentVNode("",!0)])]),submitButton:n.withCtx(()=>[n.createVNode(Ct,{disabled:s.value===r.from,class:"w-full sm:w-auto",type:"submit",variant:"primary"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(r.__("Submit")),1)]),_:1},8,["disabled"])]),cancelButton:n.withCtx(({close:c})=>[n.createVNode(Ct,{class:"w-full sm:w-auto",type:"button",variant:"secondary",onClick:c},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(r.__("Cancel")),1)]),_:2},1032,["onClick"])]),_:1},8,["name","title"]))}}),Pv={class:"w-full flex flex-col flex-col-reverse gap-y-2 md:flex-row justify-between items-start"},Mv={class:"text-lg font-medium text-gray-900 dark:text-gray-400 break-all w-full"},Lv={class:"flex flex-row gap-2 justify-end flex-shrink-0"},Fv={class:"overflow-hidden flex flex-col md:flex-row gap-4 w-full"},Uv={class:"block relative w-full md:w-4/6 overflow-hidden rounded-lg bg-gray-500/10 flex items-center justify-center"},Hv={key:1,class:"w-full max-w-screen max-h-[80vh] relative",controls:"controls"},Vv=["src"],jv=["src"],Gv={class:"w-full md:w-2/6"},zv={class:"font-medium text-gray-800 dark:text-gray-100"},Wv={class:"mt-2 divide-y divide-gray-200 dark:divide-gray-800/40 border-t border-b border-gray-300 dark:border-gray-800/70"},Xv={class:"flex justify-between py-3 text-sm font-medium"},Kv={class:"text-gray-500"},Yv={class:"text-gray-400 dark:text-gray-600"},Jv={class:"flex justify-between py-3 text-sm font-medium"},Qv={class:"text-gray-500"},Zv={class:"text-gray-400 dark:text-gray-600"},qv={class:"flex justify-between py-3 text-sm font-medium"},$v={class:"text-gray-500"},eb={class:"text-gray-400 dark:text-gray-600"},tb={class:"text-gray-500"},nb={class:"text-gray-400 dark:text-gray-600"},Is=n.defineComponent({__name:"PreviewModal",props:{file:{},readOnly:{type:Boolean,default:!1}},setup(e){const t=e,o=De(),{copy:a}=Sc(),{showRenameFile:s,showDeleteFile:i,showCropImage:r,showUnzipFile:l}=ia(),{usePinturaEditor:c}=Nc(),d=n.ref(),f=n.computed(()=>o.isOpen(`crop-image-${t.file?.id}`)),p=n.computed(()=>o.isOpen(`edit-image-${t.file?.id}`)),h=n.computed(()=>o.isField),g=T=>o.openModal({name:T}),u=T=>o.renameFile({id:t.file.id,from:t.file.path,to:T}),m=()=>o.deleteFiles({paths:[t.file.path]}),y=T=>o.unzipFile({path:T}),v=()=>{o.selectFile({file:t.file}),o.confirm()},b=()=>{o.preview=void 0,o.fixPortal()},N=T=>{b(),g(Xo),o.upload({files:[T]})},x=T=>{a(T.url),window.Nova.success("OK!")};return(T,O)=>(n.openBlock(),n.createBlock(Eo,{as:"template",class:"nova-file-manager",name:n.unref(jr),"initial-focus-ref":d.value},{default:n.withCtx(()=>[n.createVNode(n.unref(sn),{class:"relative bg-gray-100 dark:bg-gray-900 rounded-lg overflow-hidden shadow-xl transform transition-all w-full max-w-7xl p-4 flex flex-col gap-4"},{default:n.withCtx(()=>[n.createElementVNode("div",Pv,[n.createElementVNode("h2",Mv,n.toDisplayString(T.file?.name),1),n.createElementVNode("div",Lv,[!T.readOnly&&n.unref(i)?(n.openBlock(),n.createBlock(rt,{key:0,variant:"danger",onClick:O[0]||(O[0]=B=>g(`${n.unref(Lt).DELETE_FILES}-${T.file?.id}`)),title:T.__("NovaFileManager.actions.delete")},{default:n.withCtx(()=>[n.createVNode(n.unref(Ri),{class:"w-5 h-5"})]),_:1},8,["title"])):n.createCommentVNode("",!0),!T.readOnly&&n.unref(r)&&!n.unref(c)&&T.file?.type==="image"?(n.openBlock(),n.createBlock(rt,{key:1,variant:"secondary",onClick:O[1]||(O[1]=B=>g(`crop-image-${T.file?.id}`)),title:T.__("NovaFileManager.actions.cropImage",{image:T.file?.name})},{default:n.withCtx(()=>[n.createVNode(Ec,{class:"w-5 h-5"})]),_:1},8,["title"])):n.createCommentVNode("",!0),!T.readOnly&&n.unref(r)&&n.unref(c)&&T.file?.type==="image"?(n.openBlock(),n.createBlock(rt,{key:2,variant:"secondary",onClick:O[2]||(O[2]=B=>g(`edit-image-${T.file?.id}`)),title:T.__("NovaFileManager.actions.editImage",{image:T.file?.name})},{default:n.withCtx(()=>[n.createVNode(Ec,{class:"w-5 h-5"})]),_:1},8,["title"])):n.createCommentVNode("",!0),!T.readOnly&&n.unref(l)&&T.file?.type==="zip"?(n.openBlock(),n.createBlock(rt,{key:3,variant:"secondary",onClick:O[3]||(O[3]=B=>y(T.file.path)),title:T.__("NovaFileManager.actions.unzip")},{default:n.withCtx(()=>[n.createVNode(n.unref(du),{class:"w-5 h-5"})]),_:1},8,["title"])):n.createCommentVNode("",!0),n.createVNode(rt,{onClick:O[4]||(O[4]=B=>x(T.file)),variant:"secondary",title:T.__("NovaFileManager.actions.copy")},{default:n.withCtx(()=>[n.createVNode(n.unref(fu),{class:"w-5 h-5"})]),_:1},8,["title"]),n.createVNode(rt,{"as-anchor":!0,download:T.file?.name,href:T.file?.url,variant:"secondary",title:T.__("NovaFileManager.actions.download")},{default:n.withCtx(()=>[n.createVNode(n.unref(pu),{class:"w-5 h-5"})]),_:1},8,["download","href","title"]),!T.readOnly&&n.unref(s)?(n.openBlock(),n.createBlock(rt,{key:4,variant:"secondary",onClick:O[5]||(O[5]=B=>g(`rename-file-${T.file?.id}`)),title:T.__("NovaFileManager.actions.rename")},{default:n.withCtx(()=>[n.createVNode(n.unref(yu),{class:"w-5 h-5"})]),_:1},8,["title"])):n.createCommentVNode("",!0),n.createVNode(rt,{ref_key:"buttonRef",ref:d,onClick:b,title:T.__("NovaFileManager.actions.close")},{default:n.withCtx(()=>[n.createVNode(n.unref(Lr),{class:"w-5 h-5"})]),_:1},8,["title"]),h.value?(n.openBlock(),n.createBlock(rt,{key:5,variant:"success",onClick:v},{default:n.withCtx(()=>[n.createVNode(n.unref(Aa),{class:"h-5 w-5"})]),_:1})):n.createCommentVNode("",!0)])]),n.createElementVNode("div",Fv,[n.createElementVNode("div",Uv,[T.file?.type==="image"?(n.openBlock(),n.createBlock(ki,{key:0,src:T.file.url,"is-thumbnail":!1,"full-width":!1,class:"relative",alt:T.file.name},null,8,["src","alt"])):T.file?.type==="video"?(n.openBlock(),n.createElementBlock("video",Hv,[n.createElementVNode("source",{src:T.file?.url},null,8,Vv),n.createTextVNode(" Sorry, your browser doesn't support embedded videos. ")])):T.file?.type==="pdf"?(n.openBlock(),n.createElementBlock("embed",{key:2,src:T.file?.url,type:"application/pdf",class:"w-full max-w-screen h-[80vh]"},null,8,jv)):(n.openBlock(),n.createBlock(n.unref(zo),{key:3,class:"h-40 w-40 text-gray-500 m-12"}))]),n.createElementVNode("div",Gv,[n.createElementVNode("div",null,[n.createElementVNode("h3",zv,n.toDisplayString(T.__("NovaFileManager.preview.information")),1),n.createElementVNode("dl",Wv,[n.createElementVNode("div",Xv,[n.createElementVNode("dt",Kv,n.toDisplayString(T.__("NovaFileManager.meta.size")),1),n.createElementVNode("dd",Yv,n.toDisplayString(T.file?.size),1)]),n.createElementVNode("div",Jv,[n.createElementVNode("dt",Qv,n.toDisplayString(T.__("NovaFileManager.meta.mime")),1),n.createElementVNode("dd",Zv,n.toDisplayString(T.file?.mime),1)]),n.createElementVNode("div",qv,[n.createElementVNode("dt",$v,n.toDisplayString(T.__("NovaFileManager.meta.lastModifiedAt")),1),n.createElementVNode("dd",eb,n.toDisplayString(T.file?.lastModifiedAt),1)]),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(T.file?.meta,(B,I)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[B?(n.openBlock(),n.createElementBlock("div",{key:I,class:"flex justify-between py-3 text-sm font-medium"},[n.createElementVNode("dt",tb,n.toDisplayString(T.__(`NovaFileManager.meta.${I}`)),1),n.createElementVNode("dd",nb,n.toDisplayString(B),1)])):n.createCommentVNode("",!0)],64))),256))])])])]),n.unref(i)?(n.openBlock(),n.createBlock(Ic,{key:0,name:`${n.unref(Lt).DELETE_FILES}-${T.file?.id}`,"on-confirm":m},null,8,["name"])):n.createCommentVNode("",!0),n.unref(r)&&f.value?(n.openBlock(),n.createBlock(fv,{key:1,name:`crop-image-${T.file?.id}`,file:T.file,"on-confirm":N},null,8,["name","file"])):n.createCommentVNode("",!0),n.unref(r)&&p.value?(n.openBlock(),n.createBlock(kv,{key:2,name:`edit-image-${T.file?.id}`,file:T.file,"on-confirm":N},null,8,["name","file"])):n.createCommentVNode("",!0),n.unref(s)?(n.openBlock(),n.createBlock(Bv,{key:3,name:`rename-file-${T.file?.id}`,from:T.file?.name,"on-submit":u},null,8,["name","from"])):n.createCommentVNode("",!0)]),_:1})]),_:1},8,["name","initial-focus-ref"]))}}),ob={class:"nova-file-manager"},ab={class:"grid grid-cols-2 md:grid-cols-4 gap-2 mb-2 w-full",role:"group"},rb=n.defineComponent({__name:"DetailField",props:{field:{},index:{}},setup(e){const t=n.ref(void 0),o=De(),{copy:a}=Sc(),s=n.computed(()=>o.dark),i=n.computed(()=>o.preview),r=l=>{t.value=l,a(l.url),setTimeout(()=>{t.value=void 0},1e3)};return n.onMounted(()=>o.syncDarkMode()),(l,c)=>{const d=n.resolveComponent("PanelItem");return n.openBlock(),n.createBlock(d,{field:l.field,index:l.index},n.createSlots({_:2},[l.field.value?{name:"value",fn:n.withCtx(()=>[n.createElementVNode("div",ob,[n.createElementVNode("div",{class:n.normalizeClass({dark:s.value})},[n.createElementVNode("ul",ab,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.field.value,f=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:f.id},[n.createVNode(Cl,{field:l.field,file:f,attribute:l.field.attribute,detail:!0,"on-copy":r},null,8,["field","file","attribute"]),i.value&&i.value.id===f.id?(n.openBlock(),n.createBlock(Is,{key:0,file:f,"read-only":!0},null,8,["file"])):n.createCommentVNode("",!0)],64))),128))])],2)])]),key:"0"}:void 0]),1032,["field","index"])}}});var Cc={exports:{}};/**! + */(function(e,t){(function(o,a){e.exports=a()})(ho,function(){function o(S,E){var w=Object.keys(S);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(S);E&&(_=_.filter(function(A){return Object.getOwnPropertyDescriptor(S,A).enumerable})),w.push.apply(w,_)}return w}function a(S){for(var E=1;ES.length)&&(E=S.length);for(var w=0,_=new Array(E);w
',Q=Number.isNaN||y.isNaN;function J(S){return typeof S=="number"&&!Q(S)}var de=function(E){return E>0&&E<1/0};function pe(S){return typeof S>"u"}function ge(S){return s(S)==="object"&&S!==null}var ze=Object.prototype.hasOwnProperty;function le(S){if(!ge(S))return!1;try{var E=S.constructor,w=E.prototype;return E&&w&&ze.call(w,"isPrototypeOf")}catch{return!1}}function oe(S){return typeof S=="function"}var ce=Array.prototype.slice;function Ee(S){return Array.from?Array.from(S):ce.call(S)}function se(S,E){return S&&oe(E)&&(Array.isArray(S)||J(S.length)?Ee(S).forEach(function(w,_){E.call(S,w,_,S)}):ge(S)&&Object.keys(S).forEach(function(w){E.call(S,S[w],w,S)})),S}var ve=Object.assign||function(E){for(var w=arguments.length,_=new Array(w>1?w-1:0),A=1;A0&&_.forEach(function(R){ge(R)&&Object.keys(R).forEach(function(k){E[k]=R[k]})}),E},Ra=/\.\d*(?:0|9){12}\d*$/;function Mn(S){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Ra.test(S)?Math.round(S*E)/E:S}var Uo=/^width|height|left|top|marginLeft|marginTop$/;function Ln(S,E){var w=S.style;se(E,function(_,A){Uo.test(A)&&J(_)&&(_="".concat(_,"px")),w[A]=_})}function q_(S,E){return S.classList?S.classList.contains(E):S.className.indexOf(E)>-1}function st(S,E){if(E){if(J(S.length)){se(S,function(_){st(_,E)});return}if(S.classList){S.classList.add(E);return}var w=S.className.trim();w?w.indexOf(E)<0&&(S.className="".concat(w," ").concat(E)):S.className=E}}function tn(S,E){if(E){if(J(S.length)){se(S,function(w){tn(w,E)});return}if(S.classList){S.classList.remove(E);return}S.className.indexOf(E)>=0&&(S.className=S.className.replace(E,""))}}function Ho(S,E,w){if(E){if(J(S.length)){se(S,function(_){Ho(_,E,w)});return}w?st(S,E):tn(S,E)}}var $_=/([a-z\d])([A-Z])/g;function mi(S){return S.replace($_,"$1-$2").toLowerCase()}function gi(S,E){return ge(S[E])?S[E]:S.dataset?S.dataset[E]:S.getAttribute("data-".concat(mi(E)))}function Ia(S,E,w){ge(w)?S[E]=w:S.dataset?S.dataset[E]=w:S.setAttribute("data-".concat(mi(E)),w)}function ew(S,E){if(ge(S[E]))try{delete S[E]}catch{S[E]=void 0}else if(S.dataset)try{delete S.dataset[E]}catch{S.dataset[E]=void 0}else S.removeAttribute("data-".concat(mi(E)))}var Wd=/\s\s*/,Xd=function(){var S=!1;if(m){var E=!1,w=function(){},_=Object.defineProperty({},"once",{get:function(){return S=!0,E},set:function(R){E=R}});y.addEventListener("test",w,_),y.removeEventListener("test",w,_)}return S}();function Wt(S,E,w){var _=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},A=w;E.trim().split(Wd).forEach(function(R){if(!Xd){var k=S.listeners;k&&k[R]&&k[R][w]&&(A=k[R][w],delete k[R][w],Object.keys(k[R]).length===0&&delete k[R],Object.keys(k).length===0&&delete S.listeners)}S.removeEventListener(R,A,_)})}function Pt(S,E,w){var _=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},A=w;E.trim().split(Wd).forEach(function(R){if(_.once&&!Xd){var k=S.listeners,V=k===void 0?{}:k;A=function(){delete V[R][w],S.removeEventListener(R,A,_);for(var Y=arguments.length,G=new Array(Y),z=0;zMath.abs(w)&&(w=Z)})}),w}function Ir(S,E){var w=S.pageX,_=S.pageY,A={endX:w,endY:_};return E?A:a({startX:w,startY:_},A)}function ow(S){var E=0,w=0,_=0;return se(S,function(A){var R=A.startX,k=A.startY;E+=R,w+=k,_+=1}),E/=_,w/=_,{pageX:E,pageY:w}}function Fn(S){var E=S.aspectRatio,w=S.height,_=S.width,A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",R=de(_),k=de(w);if(R&&k){var V=w*E;A==="contain"&&V>_||A==="cover"&&V<_?w=_/E:_=w*E}else R?w=_/E:k&&(_=w*E);return{width:_,height:w}}function aw(S){var E=S.width,w=S.height,_=S.degree;if(_=Math.abs(_)%180,_===90)return{width:w,height:E};var A=_%90*Math.PI/180,R=Math.sin(A),k=Math.cos(A),V=E*k+w*R,$=E*R+w*k;return _>90?{width:$,height:V}:{width:V,height:$}}function rw(S,E,w,_){var A=E.aspectRatio,R=E.naturalWidth,k=E.naturalHeight,V=E.rotate,$=V===void 0?0:V,Y=E.scaleX,G=Y===void 0?1:Y,z=E.scaleY,Z=z===void 0?1:z,Ne=w.aspectRatio,Oe=w.naturalWidth,je=w.naturalHeight,Ie=_.fillColor,ot=Ie===void 0?"transparent":Ie,it=_.imageSmoothingEnabled,qe=it===void 0?!0:it,gn=_.imageSmoothingQuality,Nt=gn===void 0?"low":gn,ee=_.maxWidth,Ce=ee===void 0?1/0:ee,at=_.maxHeight,Mt=at===void 0?1/0:at,vn=_.minWidth,lo=vn===void 0?0:vn,co=_.minHeight,Un=co===void 0?0:co,nn=document.createElement("canvas"),yt=nn.getContext("2d"),uo=Fn({aspectRatio:Ne,width:Ce,height:Mt}),Cr=Fn({aspectRatio:Ne,width:lo,height:Un},"cover"),bi=Math.min(uo.width,Math.max(Cr.width,Oe)),yi=Math.min(uo.height,Math.max(Cr.height,je)),qd=Fn({aspectRatio:A,width:Ce,height:Mt}),$d=Fn({aspectRatio:A,width:lo,height:Un},"cover"),eu=Math.min(qd.width,Math.max($d.width,R)),tu=Math.min(qd.height,Math.max($d.height,k)),yw=[-eu/2,-tu/2,eu,tu];return nn.width=Mn(bi),nn.height=Mn(yi),yt.fillStyle=ot,yt.fillRect(0,0,bi,yi),yt.save(),yt.translate(bi/2,yi/2),yt.rotate($*Math.PI/180),yt.scale(G,Z),yt.imageSmoothingEnabled=qe,yt.imageSmoothingQuality=Nt,yt.drawImage.apply(yt,[S].concat(d(yw.map(function(Ew){return Math.floor(Mn(Ew))})))),yt.restore(),nn}var Qd=String.fromCharCode;function sw(S,E,w){var _="";w+=E;for(var A=E;A0;)w.push(Qd.apply(null,Ee(A.subarray(0,_)))),A=A.subarray(_);return"data:".concat(E,";base64,").concat(btoa(w.join("")))}function dw(S){var E=new DataView(S),w;try{var _,A,R;if(E.getUint8(0)===255&&E.getUint8(1)===216)for(var k=E.byteLength,V=2;V+1=8&&(R=Y+z)}}}if(R){var Z=E.getUint16(R,_),Ne,Oe;for(Oe=0;Oe=0?R:Pn),height:Math.max(_.offsetHeight,k>=0?k:L)};this.containerData=V,Ln(A,{width:V.width,height:V.height}),st(E,ne),tn(A,ne)},initCanvas:function(){var E=this.containerData,w=this.imageData,_=this.options.viewMode,A=Math.abs(w.rotate)%180===90,R=A?w.naturalHeight:w.naturalWidth,k=A?w.naturalWidth:w.naturalHeight,V=R/k,$=E.width,Y=E.height;E.height*V>E.width?_===3?$=E.height*V:Y=E.width/V:_===3?Y=E.width/V:$=E.height*V;var G={aspectRatio:V,naturalWidth:R,naturalHeight:k,width:$,height:Y};this.canvasData=G,this.limited=_===1||_===2,this.limitCanvas(!0,!0),G.width=Math.min(Math.max(G.width,G.minWidth),G.maxWidth),G.height=Math.min(Math.max(G.height,G.minHeight),G.maxHeight),G.left=(E.width-G.width)/2,G.top=(E.height-G.height)/2,G.oldLeft=G.left,G.oldTop=G.top,this.initialCanvasData=ve({},G)},limitCanvas:function(E,w){var _=this.options,A=this.containerData,R=this.canvasData,k=this.cropBoxData,V=_.viewMode,$=R.aspectRatio,Y=this.cropped&&k;if(E){var G=Number(_.minCanvasWidth)||0,z=Number(_.minCanvasHeight)||0;V>1?(G=Math.max(G,A.width),z=Math.max(z,A.height),V===3&&(z*$>G?G=z*$:z=G/$)):V>0&&(G?G=Math.max(G,Y?k.width:0):z?z=Math.max(z,Y?k.height:0):Y&&(G=k.width,z=k.height,z*$>G?G=z*$:z=G/$));var Z=Fn({aspectRatio:$,width:G,height:z});G=Z.width,z=Z.height,R.minWidth=G,R.minHeight=z,R.maxWidth=1/0,R.maxHeight=1/0}if(w)if(V>(Y?0:1)){var Ne=A.width-R.width,Oe=A.height-R.height;R.minLeft=Math.min(0,Ne),R.minTop=Math.min(0,Oe),R.maxLeft=Math.max(0,Ne),R.maxTop=Math.max(0,Oe),Y&&this.limited&&(R.minLeft=Math.min(k.left,k.left+(k.width-R.width)),R.minTop=Math.min(k.top,k.top+(k.height-R.height)),R.maxLeft=k.left,R.maxTop=k.top,V===2&&(R.width>=A.width&&(R.minLeft=Math.min(0,Ne),R.maxLeft=Math.max(0,Ne)),R.height>=A.height&&(R.minTop=Math.min(0,Oe),R.maxTop=Math.max(0,Oe))))}else R.minLeft=-R.width,R.minTop=-R.height,R.maxLeft=A.width,R.maxTop=A.height},renderCanvas:function(E,w){var _=this.canvasData,A=this.imageData;if(w){var R=aw({width:A.naturalWidth*Math.abs(A.scaleX||1),height:A.naturalHeight*Math.abs(A.scaleY||1),degree:A.rotate||0}),k=R.width,V=R.height,$=_.width*(k/_.naturalWidth),Y=_.height*(V/_.naturalHeight);_.left-=($-_.width)/2,_.top-=(Y-_.height)/2,_.width=$,_.height=Y,_.aspectRatio=k/V,_.naturalWidth=k,_.naturalHeight=V,this.limitCanvas(!0,!1)}(_.width>_.maxWidth||_.width<_.minWidth)&&(_.left=_.oldLeft),(_.height>_.maxHeight||_.height<_.minHeight)&&(_.top=_.oldTop),_.width=Math.min(Math.max(_.width,_.minWidth),_.maxWidth),_.height=Math.min(Math.max(_.height,_.minHeight),_.maxHeight),this.limitCanvas(!1,!0),_.left=Math.min(Math.max(_.left,_.minLeft),_.maxLeft),_.top=Math.min(Math.max(_.top,_.minTop),_.maxTop),_.oldLeft=_.left,_.oldTop=_.top,Ln(this.canvas,ve({width:_.width,height:_.height},Ca({translateX:_.left,translateY:_.top}))),this.renderImage(E),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(E){var w=this.canvasData,_=this.imageData,A=_.naturalWidth*(w.width/w.naturalWidth),R=_.naturalHeight*(w.height/w.naturalHeight);ve(_,{width:A,height:R,left:(w.width-A)/2,top:(w.height-R)/2}),Ln(this.image,ve({width:_.width,height:_.height},Ca(ve({translateX:_.left,translateY:_.top},_)))),E&&this.output()},initCropBox:function(){var E=this.options,w=this.canvasData,_=E.aspectRatio||E.initialAspectRatio,A=Number(E.autoCropArea)||.8,R={width:w.width,height:w.height};_&&(w.height*_>w.width?R.height=R.width/_:R.width=R.height*_),this.cropBoxData=R,this.limitCropBox(!0,!0),R.width=Math.min(Math.max(R.width,R.minWidth),R.maxWidth),R.height=Math.min(Math.max(R.height,R.minHeight),R.maxHeight),R.width=Math.max(R.minWidth,R.width*A),R.height=Math.max(R.minHeight,R.height*A),R.left=w.left+(w.width-R.width)/2,R.top=w.top+(w.height-R.height)/2,R.oldLeft=R.left,R.oldTop=R.top,this.initialCropBoxData=ve({},R)},limitCropBox:function(E,w){var _=this.options,A=this.containerData,R=this.canvasData,k=this.cropBoxData,V=this.limited,$=_.aspectRatio;if(E){var Y=Number(_.minCropBoxWidth)||0,G=Number(_.minCropBoxHeight)||0,z=V?Math.min(A.width,R.width,R.width+R.left,A.width-R.left):A.width,Z=V?Math.min(A.height,R.height,R.height+R.top,A.height-R.top):A.height;Y=Math.min(Y,A.width),G=Math.min(G,A.height),$&&(Y&&G?G*$>Y?G=Y/$:Y=G*$:Y?G=Y/$:G&&(Y=G*$),Z*$>z?Z=z/$:z=Z*$),k.minWidth=Math.min(Y,z),k.minHeight=Math.min(G,Z),k.maxWidth=z,k.maxHeight=Z}w&&(V?(k.minLeft=Math.max(0,R.left),k.minTop=Math.max(0,R.top),k.maxLeft=Math.min(A.width,R.left+R.width)-k.width,k.maxTop=Math.min(A.height,R.top+R.height)-k.height):(k.minLeft=0,k.minTop=0,k.maxLeft=A.width-k.width,k.maxTop=A.height-k.height))},renderCropBox:function(){var E=this.options,w=this.containerData,_=this.cropBoxData;(_.width>_.maxWidth||_.width<_.minWidth)&&(_.left=_.oldLeft),(_.height>_.maxHeight||_.height<_.minHeight)&&(_.top=_.oldTop),_.width=Math.min(Math.max(_.width,_.minWidth),_.maxWidth),_.height=Math.min(Math.max(_.height,_.minHeight),_.maxHeight),this.limitCropBox(!1,!0),_.left=Math.min(Math.max(_.left,_.minLeft),_.maxLeft),_.top=Math.min(Math.max(_.top,_.minTop),_.maxTop),_.oldLeft=_.left,_.oldTop=_.top,E.movable&&E.cropBoxMovable&&Ia(this.face,ye,_.width>=w.width&&_.height>=w.height?O:x),Ln(this.cropBox,ve({width:_.width,height:_.height},Ca({translateX:_.left,translateY:_.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Vo(this.element,dt,this.getData())}},pw={initPreview:function(){var E=this.element,w=this.crossOrigin,_=this.options.preview,A=w?this.crossOriginUrl:this.url,R=E.alt||"The image to preview",k=document.createElement("img");if(w&&(k.crossOrigin=w),k.src=A,k.alt=R,this.viewBox.appendChild(k),this.viewBoxImage=k,!!_){var V=_;typeof _=="string"?V=E.ownerDocument.querySelectorAll(_):_.querySelector&&(V=[_]),this.previews=V,se(V,function($){var Y=document.createElement("img");Ia($,Te,{width:$.offsetWidth,height:$.offsetHeight,html:$.innerHTML}),w&&(Y.crossOrigin=w),Y.src=A,Y.alt=R,Y.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',$.innerHTML="",$.appendChild(Y)})}},resetPreview:function(){se(this.previews,function(E){var w=gi(E,Te);Ln(E,{width:w.width,height:w.height}),E.innerHTML=w.html,ew(E,Te)})},preview:function(){var E=this.imageData,w=this.canvasData,_=this.cropBoxData,A=_.width,R=_.height,k=E.width,V=E.height,$=_.left-w.left-E.left,Y=_.top-w.top-E.top;!this.cropped||this.disabled||(Ln(this.viewBoxImage,ve({width:k,height:V},Ca(ve({translateX:-$,translateY:-Y},E)))),se(this.previews,function(G){var z=gi(G,Te),Z=z.width,Ne=z.height,Oe=Z,je=Ne,Ie=1;A&&(Ie=Z/A,je=R*Ie),R&&je>Ne&&(Ie=Ne/R,Oe=A*Ie,je=Ne),Ln(G,{width:Oe,height:je}),Ln(G.getElementsByTagName("img")[0],ve({width:k*Ie,height:V*Ie},Ca(ve({translateX:-$*Ie,translateY:-Y*Ie},E))))}))}},hw={bind:function(){var E=this.element,w=this.options,_=this.cropper;oe(w.cropstart)&&Pt(E,jt,w.cropstart),oe(w.cropmove)&&Pt(E,xt,w.cropmove),oe(w.cropend)&&Pt(E,et,w.cropend),oe(w.crop)&&Pt(E,dt,w.crop),oe(w.zoom)&&Pt(E,en,w.zoom),Pt(_,Ot,this.onCropStart=this.cropStart.bind(this)),w.zoomable&&w.zoomOnWheel&&Pt(_,zt,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),w.toggleDragModeOnDblclick&&Pt(_,Gt,this.onDblclick=this.dblclick.bind(this)),Pt(E.ownerDocument,St,this.onCropMove=this.cropMove.bind(this)),Pt(E.ownerDocument,oo,this.onCropEnd=this.cropEnd.bind(this)),w.responsive&&Pt(window,bt,this.onResize=this.resize.bind(this))},unbind:function(){var E=this.element,w=this.options,_=this.cropper;oe(w.cropstart)&&Wt(E,jt,w.cropstart),oe(w.cropmove)&&Wt(E,xt,w.cropmove),oe(w.cropend)&&Wt(E,et,w.cropend),oe(w.crop)&&Wt(E,dt,w.crop),oe(w.zoom)&&Wt(E,en,w.zoom),Wt(_,Ot,this.onCropStart),w.zoomable&&w.zoomOnWheel&&Wt(_,zt,this.onWheel,{passive:!1,capture:!0}),w.toggleDragModeOnDblclick&&Wt(_,Gt,this.onDblclick),Wt(E.ownerDocument,St,this.onCropMove),Wt(E.ownerDocument,oo,this.onCropEnd),w.responsive&&Wt(window,bt,this.onResize)}},mw={resize:function(){if(!this.disabled){var E=this.options,w=this.container,_=this.containerData,A=w.offsetWidth/_.width,R=w.offsetHeight/_.height,k=Math.abs(A-1)>Math.abs(R-1)?A:R;if(k!==1){var V,$;E.restore&&(V=this.getCanvasData(),$=this.getCropBoxData()),this.render(),E.restore&&(this.setCanvasData(se(V,function(Y,G){V[G]=Y*k})),this.setCropBoxData(se($,function(Y,G){$[G]=Y*k})))}}},dblclick:function(){this.disabled||this.options.dragMode===Fe||this.setDragMode(q_(this.dragBox,W)?Re:Be)},wheel:function(E){var w=this,_=Number(this.options.wheelZoomRatio)||.1,A=1;this.disabled||(E.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){w.wheeling=!1},50),E.deltaY?A=E.deltaY>0?1:-1:E.wheelDelta?A=-E.wheelDelta/120:E.detail&&(A=E.detail>0?1:-1),this.zoom(-A*_,E)))},cropStart:function(E){var w=E.buttons,_=E.button;if(!(this.disabled||(E.type==="mousedown"||E.type==="pointerdown"&&E.pointerType==="mouse")&&(J(w)&&w!==1||J(_)&&_!==0||E.ctrlKey))){var A=this.options,R=this.pointers,k;E.changedTouches?se(E.changedTouches,function(V){R[V.identifier]=Ir(V)}):R[E.pointerId||0]=Ir(E),Object.keys(R).length>1&&A.zoomable&&A.zoomOnTouch?k=B:k=gi(E.target,ye),ao.test(k)&&Vo(this.element,jt,{originalEvent:E,action:k})!==!1&&(E.preventDefault(),this.action=k,this.cropping=!1,k===T&&(this.cropping=!0,st(this.dragBox,ie)))}},cropMove:function(E){var w=this.action;if(!(this.disabled||!w)){var _=this.pointers;E.preventDefault(),Vo(this.element,xt,{originalEvent:E,action:w})!==!1&&(E.changedTouches?se(E.changedTouches,function(A){ve(_[A.identifier]||{},Ir(A,!0))}):ve(_[E.pointerId||0]||{},Ir(E,!0)),this.change(E))}},cropEnd:function(E){if(!this.disabled){var w=this.action,_=this.pointers;E.changedTouches?se(E.changedTouches,function(A){delete _[A.identifier]}):delete _[E.pointerId||0],w&&(E.preventDefault(),Object.keys(_).length||(this.action=""),this.cropping&&(this.cropping=!1,Ho(this.dragBox,ie,this.cropped&&this.options.modal)),Vo(this.element,et,{originalEvent:E,action:w}))}}},gw={change:function(E){var w=this.options,_=this.canvasData,A=this.containerData,R=this.cropBoxData,k=this.pointers,V=this.action,$=w.aspectRatio,Y=R.left,G=R.top,z=R.width,Z=R.height,Ne=Y+z,Oe=G+Z,je=0,Ie=0,ot=A.width,it=A.height,qe=!0,gn;!$&&E.shiftKey&&($=z&&Z?z/Z:1),this.limited&&(je=R.minLeft,Ie=R.minTop,ot=je+Math.min(A.width,_.width,_.left+_.width),it=Ie+Math.min(A.height,_.height,_.top+_.height));var Nt=k[Object.keys(k)[0]],ee={x:Nt.endX-Nt.startX,y:Nt.endY-Nt.startY},Ce=function(Mt){switch(Mt){case I:Ne+ee.x>ot&&(ee.x=ot-Ne);break;case D:Y+ee.xit&&(ee.y=it-Oe);break}};switch(V){case x:Y+=ee.x,G+=ee.y;break;case I:if(ee.x>=0&&(Ne>=ot||$&&(G<=Ie||Oe>=it))){qe=!1;break}Ce(I),z+=ee.x,z<0&&(V=D,z=-z,Y-=z),$&&(Z=z/$,G+=(R.height-Z)/2);break;case F:if(ee.y<=0&&(G<=Ie||$&&(Y<=je||Ne>=ot))){qe=!1;break}Ce(F),Z-=ee.y,G+=ee.y,Z<0&&(V=C,Z=-Z,G-=Z),$&&(z=Z*$,Y+=(R.width-z)/2);break;case D:if(ee.x<=0&&(Y<=je||$&&(G<=Ie||Oe>=it))){qe=!1;break}Ce(D),z-=ee.x,Y+=ee.x,z<0&&(V=I,z=-z,Y-=z),$&&(Z=z/$,G+=(R.height-Z)/2);break;case C:if(ee.y>=0&&(Oe>=it||$&&(Y<=je||Ne>=ot))){qe=!1;break}Ce(C),Z+=ee.y,Z<0&&(V=F,Z=-Z,G-=Z),$&&(z=Z*$,Y+=(R.width-z)/2);break;case K:if($){if(ee.y<=0&&(G<=Ie||Ne>=ot)){qe=!1;break}Ce(F),Z-=ee.y,G+=ee.y,z=Z*$}else Ce(F),Ce(I),ee.x>=0?NeIe&&(Z-=ee.y,G+=ee.y):(Z-=ee.y,G+=ee.y);z<0&&Z<0?(V=j,Z=-Z,z=-z,G-=Z,Y-=z):z<0?(V=P,z=-z,Y-=z):Z<0&&(V=U,Z=-Z,G-=Z);break;case P:if($){if(ee.y<=0&&(G<=Ie||Y<=je)){qe=!1;break}Ce(F),Z-=ee.y,G+=ee.y,z=Z*$,Y+=R.width-z}else Ce(F),Ce(D),ee.x<=0?Y>je?(z-=ee.x,Y+=ee.x):ee.y<=0&&G<=Ie&&(qe=!1):(z-=ee.x,Y+=ee.x),ee.y<=0?G>Ie&&(Z-=ee.y,G+=ee.y):(Z-=ee.y,G+=ee.y);z<0&&Z<0?(V=U,Z=-Z,z=-z,G-=Z,Y-=z):z<0?(V=K,z=-z,Y-=z):Z<0&&(V=j,Z=-Z,G-=Z);break;case j:if($){if(ee.x<=0&&(Y<=je||Oe>=it)){qe=!1;break}Ce(D),z-=ee.x,Y+=ee.x,Z=z/$}else Ce(C),Ce(D),ee.x<=0?Y>je?(z-=ee.x,Y+=ee.x):ee.y>=0&&Oe>=it&&(qe=!1):(z-=ee.x,Y+=ee.x),ee.y>=0?Oe=0&&(Ne>=ot||Oe>=it)){qe=!1;break}Ce(I),z+=ee.x,Z=z/$}else Ce(C),Ce(I),ee.x>=0?Ne=0&&Oe>=it&&(qe=!1):z+=ee.x,ee.y>=0?Oe0?V=ee.y>0?U:K:ee.x<0&&(Y-=z,V=ee.y>0?j:P),ee.y<0&&(G-=Z),this.cropped||(tn(this.cropBox,ne),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}qe&&(R.width=z,R.height=Z,R.left=Y,R.top=G,this.action=V,this.renderCropBox()),se(k,function(at){at.startX=at.endX,at.startY=at.endY})}},vw={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&st(this.dragBox,ie),tn(this.cropBox,ne),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=ve({},this.initialImageData),this.canvasData=ve({},this.initialCanvasData),this.cropBoxData=ve({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(ve(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),tn(this.dragBox,ie),st(this.cropBox,ne)),this},replace:function(E){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&E&&(this.isImg&&(this.element.src=E),w?(this.url=E,this.image.src=E,this.ready&&(this.viewBoxImage.src=E,se(this.previews,function(_){_.getElementsByTagName("img")[0].src=E}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(E))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,tn(this.cropper,q)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,st(this.cropper,q)),this},destroy:function(){var E=this.element;return E[N]?(E[N]=void 0,this.isImg&&this.replaced&&(E.src=this.originalUrl),this.uncreate(),this):this},move:function(E){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:E,_=this.canvasData,A=_.left,R=_.top;return this.moveTo(pe(E)?E:A+Number(E),pe(w)?w:R+Number(w))},moveTo:function(E){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:E,_=this.canvasData,A=!1;return E=Number(E),w=Number(w),this.ready&&!this.disabled&&this.options.movable&&(J(E)&&(_.left=E,A=!0),J(w)&&(_.top=w,A=!0),A&&this.renderCanvas(!0)),this},zoom:function(E,w){var _=this.canvasData;return E=Number(E),E<0?E=1/(1-E):E=1+E,this.zoomTo(_.width*E/_.naturalWidth,null,w)},zoomTo:function(E,w,_){var A=this.options,R=this.canvasData,k=R.width,V=R.height,$=R.naturalWidth,Y=R.naturalHeight;if(E=Number(E),E>=0&&this.ready&&!this.disabled&&A.zoomable){var G=$*E,z=Y*E;if(Vo(this.element,en,{ratio:E,oldRatio:k/$,originalEvent:_})===!1)return this;if(_){var Z=this.pointers,Ne=Kd(this.cropper),Oe=Z&&Object.keys(Z).length?ow(Z):{pageX:_.pageX,pageY:_.pageY};R.left-=(G-k)*((Oe.pageX-Ne.left-R.left)/k),R.top-=(z-V)*((Oe.pageY-Ne.top-R.top)/V)}else le(w)&&J(w.x)&&J(w.y)?(R.left-=(G-k)*((w.x-R.left)/k),R.top-=(z-V)*((w.y-R.top)/V)):(R.left-=(G-k)/2,R.top-=(z-V)/2);R.width=G,R.height=z,this.renderCanvas(!0)}return this},rotate:function(E){return this.rotateTo((this.imageData.rotate||0)+Number(E))},rotateTo:function(E){return E=Number(E),J(E)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=E%360,this.renderCanvas(!0,!0)),this},scaleX:function(E){var w=this.imageData.scaleY;return this.scale(E,J(w)?w:1)},scaleY:function(E){var w=this.imageData.scaleX;return this.scale(J(w)?w:1,E)},scale:function(E){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:E,_=this.imageData,A=!1;return E=Number(E),w=Number(w),this.ready&&!this.disabled&&this.options.scalable&&(J(E)&&(_.scaleX=E,A=!0),J(w)&&(_.scaleY=w,A=!0),A&&this.renderCanvas(!0,!0)),this},getData:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,w=this.options,_=this.imageData,A=this.canvasData,R=this.cropBoxData,k;if(this.ready&&this.cropped){k={x:R.left-A.left,y:R.top-A.top,width:R.width,height:R.height};var V=_.width/_.naturalWidth;if(se(k,function(G,z){k[z]=G/V}),E){var $=Math.round(k.y+k.height),Y=Math.round(k.x+k.width);k.x=Math.round(k.x),k.y=Math.round(k.y),k.width=Y-k.x,k.height=$-k.y}}else k={x:0,y:0,width:0,height:0};return w.rotatable&&(k.rotate=_.rotate||0),w.scalable&&(k.scaleX=_.scaleX||1,k.scaleY=_.scaleY||1),k},setData:function(E){var w=this.options,_=this.imageData,A=this.canvasData,R={};if(this.ready&&!this.disabled&&le(E)){var k=!1;w.rotatable&&J(E.rotate)&&E.rotate!==_.rotate&&(_.rotate=E.rotate,k=!0),w.scalable&&(J(E.scaleX)&&E.scaleX!==_.scaleX&&(_.scaleX=E.scaleX,k=!0),J(E.scaleY)&&E.scaleY!==_.scaleY&&(_.scaleY=E.scaleY,k=!0)),k&&this.renderCanvas(!0,!0);var V=_.width/_.naturalWidth;J(E.x)&&(R.left=E.x*V+A.left),J(E.y)&&(R.top=E.y*V+A.top),J(E.width)&&(R.width=E.width*V),J(E.height)&&(R.height=E.height*V),this.setCropBoxData(R)}return this},getContainerData:function(){return this.ready?ve({},this.containerData):{}},getImageData:function(){return this.sized?ve({},this.imageData):{}},getCanvasData:function(){var E=this.canvasData,w={};return this.ready&&se(["left","top","width","height","naturalWidth","naturalHeight"],function(_){w[_]=E[_]}),w},setCanvasData:function(E){var w=this.canvasData,_=w.aspectRatio;return this.ready&&!this.disabled&&le(E)&&(J(E.left)&&(w.left=E.left),J(E.top)&&(w.top=E.top),J(E.width)?(w.width=E.width,w.height=E.width/_):J(E.height)&&(w.height=E.height,w.width=E.height*_),this.renderCanvas(!0)),this},getCropBoxData:function(){var E=this.cropBoxData,w;return this.ready&&this.cropped&&(w={left:E.left,top:E.top,width:E.width,height:E.height}),w||{}},setCropBoxData:function(E){var w=this.cropBoxData,_=this.options.aspectRatio,A,R;return this.ready&&this.cropped&&!this.disabled&&le(E)&&(J(E.left)&&(w.left=E.left),J(E.top)&&(w.top=E.top),J(E.width)&&E.width!==w.width&&(A=!0,w.width=E.width),J(E.height)&&E.height!==w.height&&(R=!0,w.height=E.height),_&&(A?w.height=w.width/_:R&&(w.width=w.height*_)),this.renderCropBox()),this},getCroppedCanvas:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var w=this.canvasData,_=rw(this.image,this.imageData,w,E);if(!this.cropped)return _;var A=this.getData(),R=A.x,k=A.y,V=A.width,$=A.height,Y=_.width/Math.floor(w.naturalWidth);Y!==1&&(R*=Y,k*=Y,V*=Y,$*=Y);var G=V/$,z=Fn({aspectRatio:G,width:E.maxWidth||1/0,height:E.maxHeight||1/0}),Z=Fn({aspectRatio:G,width:E.minWidth||0,height:E.minHeight||0},"cover"),Ne=Fn({aspectRatio:G,width:E.width||(Y!==1?_.width:V),height:E.height||(Y!==1?_.height:$)}),Oe=Ne.width,je=Ne.height;Oe=Math.min(z.width,Math.max(Z.width,Oe)),je=Math.min(z.height,Math.max(Z.height,je));var Ie=document.createElement("canvas"),ot=Ie.getContext("2d");Ie.width=Mn(Oe),Ie.height=Mn(je),ot.fillStyle=E.fillColor||"transparent",ot.fillRect(0,0,Oe,je);var it=E.imageSmoothingEnabled,qe=it===void 0?!0:it,gn=E.imageSmoothingQuality;ot.imageSmoothingEnabled=qe,gn&&(ot.imageSmoothingQuality=gn);var Nt=_.width,ee=_.height,Ce=R,at=k,Mt,vn,lo,co,Un,nn;Ce<=-V||Ce>Nt?(Ce=0,Mt=0,lo=0,Un=0):Ce<=0?(lo=-Ce,Ce=0,Mt=Math.min(Nt,V+Ce),Un=Mt):Ce<=Nt&&(lo=0,Mt=Math.min(V,Nt-Ce),Un=Mt),Mt<=0||at<=-$||at>ee?(at=0,vn=0,co=0,nn=0):at<=0?(co=-at,at=0,vn=Math.min(ee,$+at),nn=vn):at<=ee&&(co=0,vn=Math.min($,ee-at),nn=vn);var yt=[Ce,at,Mt,vn];if(Un>0&&nn>0){var uo=Oe/V;yt.push(lo*uo,co*uo,Un*uo,nn*uo)}return ot.drawImage.apply(ot,[_].concat(d(yt.map(function(Cr){return Math.floor(Mn(Cr))})))),Ie},setAspectRatio:function(E){var w=this.options;return!this.disabled&&!pe(E)&&(w.aspectRatio=Math.max(0,E)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(E){var w=this.options,_=this.dragBox,A=this.face;if(this.ready&&!this.disabled){var R=E===Be,k=w.movable&&E===Re;E=R||k?E:Fe,w.dragMode=E,Ia(_,ye,E),Ho(_,W,R),Ho(_,fe,k),w.cropBoxMovable||(Ia(A,ye,E),Ho(A,W,R),Ho(A,fe,k))}return this}},bw=y.Cropper,Zd=function(){function S(E){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(l(this,S),!E||!io.test(E.tagName))throw new Error("The first argument is required and must be an or element.");this.element=E,this.options=ve({},M,le(w)&&w),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return i(S,[{key:"init",value:function(){var w=this.element,_=w.tagName.toLowerCase(),A;if(!w[N]){if(w[N]=this,_==="img"){if(this.isImg=!0,A=w.getAttribute("src")||"",this.originalUrl=A,!A)return;A=w.src}else _==="canvas"&&window.HTMLCanvasElement&&(A=w.toDataURL());this.load(A)}}},{key:"load",value:function(w){var _=this;if(w){this.url=w,this.imageData={};var A=this.element,R=this.options;if(!R.rotatable&&!R.scalable&&(R.checkOrientation=!1),!R.checkOrientation||!window.ArrayBuffer){this.clone();return}if(ro.test(w)){so.test(w)?this.read(lw(w)):this.clone();return}var k=new XMLHttpRequest,V=this.clone.bind(this);this.reloading=!0,this.xhr=k,k.onabort=V,k.onerror=V,k.ontimeout=V,k.onprogress=function(){k.getResponseHeader("content-type")!==Bn&&k.abort()},k.onload=function(){_.read(k.response)},k.onloadend=function(){_.reloading=!1,_.xhr=null},R.checkCrossOrigin&&Yd(w)&&A.crossOrigin&&(w=Jd(w)),k.open("GET",w,!0),k.responseType="arraybuffer",k.withCredentials=A.crossOrigin==="use-credentials",k.send()}}},{key:"read",value:function(w){var _=this.options,A=this.imageData,R=dw(w),k=0,V=1,$=1;if(R>1){this.url=cw(w,Bn);var Y=uw(R);k=Y.rotate,V=Y.scaleX,$=Y.scaleY}_.rotatable&&(A.rotate=k),_.scalable&&(A.scaleX=V,A.scaleY=$),this.clone()}},{key:"clone",value:function(){var w=this.element,_=this.url,A=w.crossOrigin,R=_;this.options.checkCrossOrigin&&Yd(_)&&(A||(A="anonymous"),R=Jd(_)),this.crossOrigin=A,this.crossOriginUrl=R;var k=document.createElement("img");A&&(k.crossOrigin=A),k.src=R||_,k.alt=w.alt||"The image to crop",this.image=k,k.onload=this.start.bind(this),k.onerror=this.stop.bind(this),st(k,_e),w.parentNode.insertBefore(k,w.nextSibling)}},{key:"start",value:function(){var w=this,_=this.image;_.onload=null,_.onerror=null,this.sizing=!0;var A=y.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(y.navigator.userAgent),R=function(Y,G){ve(w.imageData,{naturalWidth:Y,naturalHeight:G,aspectRatio:Y/G}),w.initialImageData=ve({},w.imageData),w.sizing=!1,w.sized=!0,w.build()};if(_.naturalWidth&&!A){R(_.naturalWidth,_.naturalHeight);return}var k=document.createElement("img"),V=document.body||document.documentElement;this.sizingImage=k,k.onload=function(){R(k.width,k.height),A||V.removeChild(k)},k.src=_.src,A||(k.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",V.appendChild(k))}},{key:"stop",value:function(){var w=this.image;w.onload=null,w.onerror=null,w.parentNode.removeChild(w),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var w=this.element,_=this.options,A=this.image,R=w.parentNode,k=document.createElement("div");k.innerHTML=H;var V=k.querySelector(".".concat(N,"-container")),$=V.querySelector(".".concat(N,"-canvas")),Y=V.querySelector(".".concat(N,"-drag-box")),G=V.querySelector(".".concat(N,"-crop-box")),z=G.querySelector(".".concat(N,"-face"));this.container=R,this.cropper=V,this.canvas=$,this.dragBox=Y,this.cropBox=G,this.viewBox=V.querySelector(".".concat(N,"-view-box")),this.face=z,$.appendChild(A),st(w,ne),R.insertBefore(V,w.nextSibling),this.isImg||tn(A,_e),this.initPreview(),this.bind(),_.initialAspectRatio=Math.max(0,_.initialAspectRatio)||NaN,_.aspectRatio=Math.max(0,_.aspectRatio)||NaN,_.viewMode=Math.max(0,Math.min(3,Math.round(_.viewMode)))||0,st(G,ne),_.guides||st(G.getElementsByClassName("".concat(N,"-dashed")),ne),_.center||st(G.getElementsByClassName("".concat(N,"-center")),ne),_.background&&st(V,"".concat(N,"-bg")),_.highlight||st(z,Ye),_.cropBoxMovable&&(st(z,fe),Ia(z,ye,x)),_.cropBoxResizable||(st(G.getElementsByClassName("".concat(N,"-line")),ne),st(G.getElementsByClassName("".concat(N,"-point")),ne)),this.render(),this.ready=!0,this.setDragMode(_.dragMode),_.autoCrop&&this.crop(),this.setData(_.data),oe(_.ready)&&Pt(w,Fo,_.ready,{once:!0}),Vo(w,Fo)}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),tn(this.element,ne))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=bw,S}},{key:"setDefaults",value:function(w){ve(M,le(w)&&w)}}]),S}();return ve(Zd.prototype,fw,pw,hw,mw,gw,vw),Zd})})(wc);var jg=wc.exports;Object.defineProperty(_c,"__esModule",{value:!0});var Tc=n,Gg=jg,zg=Wg(Gg);function Wg(e){return e&&e.__esModule?e:{default:e}}function Xg(e,t){var o={};for(var a in e)t.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(e,a)&&(o[a]=e[a]);return o}var Kg=typeof window>"u"?[String,Array]:[String,Array,Element,NodeList],Yg=_c.default={render:function(){var t=this.crossorigin||void 0;return(0,Tc.h)("div",{style:this.containerStyle},[(0,Tc.h)("img",{ref:"img",src:this.src,alt:this.alt||"image",style:[{"max-width":"100%"},this.imgStyle],crossorigin:t})])},props:{containerStyle:Object,src:{type:String,default:""},alt:String,imgStyle:Object,viewMode:Number,dragMode:String,initialAspectRatio:Number,aspectRatio:Number,data:Object,preview:Kg,responsive:{type:Boolean,default:!0},restore:{type:Boolean,default:!0},checkCrossOrigin:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},crossorigin:{type:String},modal:{type:Boolean,default:!0},guides:{type:Boolean,default:!0},center:{type:Boolean,default:!0},highlight:{type:Boolean,default:!0},background:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!0},autoCropArea:Number,movable:{type:Boolean,default:!0},rotatable:{type:Boolean,default:!0},scalable:{type:Boolean,default:!0},zoomable:{type:Boolean,default:!0},zoomOnTouch:{type:Boolean,default:!0},zoomOnWheel:{type:Boolean,default:!0},wheelZoomRatio:Number,cropBoxMovable:{type:Boolean,default:!0},cropBoxResizable:{type:Boolean,default:!0},toggleDragModeOnDblclick:{type:Boolean,default:!0},minCanvasWidth:Number,minCanvasHeight:Number,minCropBoxWidth:Number,minCropBoxHeight:Number,minContainerWidth:Number,minContainerHeight:Number,ready:Function,cropstart:Function,cropmove:Function,cropend:Function,crop:Function,zoom:Function},mounted:function(){var t=this.$options.props;t.containerStyle,t.src,t.alt,t.imgStyle;var o=Xg(t,["containerStyle","src","alt","imgStyle"]),a={};for(var s in o)this[s]!==void 0&&(a[s]=this[s]);this.cropper=new zg.default(this.$refs.img,a)},methods:{reset:function(){return this.cropper.reset()},clear:function(){return this.cropper.clear()},initCrop:function(){return this.cropper.crop()},replace:function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.cropper.replace(t,o)},enable:function(){return this.cropper.enable()},disable:function(){return this.cropper.disable()},destroy:function(){return this.cropper.destroy()},move:function(t,o){return this.cropper.move(t,o)},moveTo:function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;return this.cropper.moveTo(t,o)},relativeZoom:function(t,o){return this.cropper.zoom(t,o)},zoomTo:function(t,o){return this.cropper.zoomTo(t,o)},rotate:function(t){return this.cropper.rotate(t)},rotateTo:function(t){return this.cropper.rotateTo(t)},scaleX:function(t){return this.cropper.scaleX(t)},scaleY:function(t){return this.cropper.scaleY(t)},scale:function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;return this.cropper.scale(t,o)},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return this.cropper.getData(t)},setData:function(t){return this.cropper.setData(t)},getContainerData:function(){return this.cropper.getContainerData()},getImageData:function(){return this.cropper.getImageData()},getCanvasData:function(){return this.cropper.getCanvasData()},setCanvasData:function(t){return this.cropper.setCanvasData(t)},getCropBoxData:function(){return this.cropper.getCropBoxData()},setCropBoxData:function(t){return this.cropper.setCropBoxData(t)},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.cropper.getCroppedCanvas(t)},setAspectRatio:function(t){return this.cropper.setAspectRatio(t)},setDragMode:function(t){return this.cropper.setDragMode(t)}}};const Ct=n.defineComponent({__name:"Button",props:{variant:{default:"secondary"},type:{default:"button"},href:{},loading:{type:Boolean,default:!1}},setup(e){const t={primary:"bg-blue-500 dark:bg-blue-600/50 focus:outline-blue-500",secondary:"bg-gray-600 dark:bg-gray-600/50 focus:outline-gray-600",success:"bg-green-500 dark:bg-green-600/50 focus:outline-green-500",warning:"bg-orange-400 dark:bg-orange-600/50 focus:outline-orange-400",danger:"bg-red-500 dark:bg-red-600/50 focus:outline-red-500",transparent:"bg-transparent"},o=e,a=n.computed(()=>t[o.variant]);return(s,l)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(s.href?"a":"button"),{class:n.normalizeClass(["inline-flex items-center py-2 px-4 border-0 uppercase rounded-md shadow-sm text-xs font-medium text-white hover:shadow-md hover:opacity-75 disabled:opacity-50 focus:outline-none focus:ring-1",a.value]),href:s.href,type:s.type},{default:n.withCtx(()=>[s.loading?(n.openBlock(),n.createBlock(po,{key:0,class:"mr-2 w-3 h-3"})):n.createCommentVNode("",!0),n.renderSlot(s.$slots,"default")]),_:3},8,["class","href","type"]))}}),Jg={class:"px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Qg={class:"sm:flex sm:items-start"},Zg={class:"text-left w-full space-y-6"},qg={class:"mt-2 w-full space-y-6"},$g={class:"mt-5 sm:mt-4 px-4 sm:px-6 pb-4 sm:flex sm:flex-row-reverse sm:gap-x-2 space-y-3 sm:space-y-0"},qa=n.defineComponent({__name:"InputModal",props:{name:{},title:{},onSubmit:{type:Function}},setup(e){return(t,o)=>(n.openBlock(),n.createBlock(Eo,{as:"template",class:"nova-file-manager",name:t.name},{default:n.withCtx(({close:a})=>[n.createVNode(n.unref(sn),{class:"relative bg-gray-200 dark:bg-gray-900 rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-lg w-full"},{default:n.withCtx(()=>[n.createElementVNode("form",{name:"input-modal",onSubmit:o[0]||(o[0]=n.withModifiers((...s)=>t.onSubmit&&t.onSubmit(...s),["prevent"]))},[n.createElementVNode("div",Jg,[n.createElementVNode("div",Qg,[n.createElementVNode("div",Zg,[n.createVNode(n.unref(lc),{as:"h3",class:"text-lg leading-6 font-medium text-gray-700 dark:text-gray-200"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(t.title),1)]),_:1}),n.createElementVNode("div",qg,[n.renderSlot(t.$slots,"inputs")])])])]),n.createElementVNode("div",$g,[n.renderSlot(t.$slots,"submitButton"),n.renderSlot(t.$slots,"cancelButton",{close:a})])],32)]),_:2},1024)]),_:3},8,["name"]))}}),ev={class:"rounded-md overflow-auto"},tv={class:"relative rounded-md text-center overflow-hidden w-full"},nv=n.createElementVNode("div",{class:"absolute inset-0 opacity-50 bg-stripes bg-stripes-gray-400"},null,-1),ov=["src","alt"],av={class:"w-full border rounded-md space-y-2 px-3 py-2 bg-gray-100 dark:bg-gray-900 shadow-sm focus-within:ring-1 focus-within:ring-blue-600 focus-within:border-blue-600 border-gray-400 dark:border-gray-700"},rv={class:"block text-xs font-medium text-gray-700 dark:text-gray-200",for:"name"},sv=["placeholder"],iv={class:"mt-2 text-xs text-gray-400",id:"name-description"},xc=n.defineComponent({__name:"UploadCropModal",props:{file:{},name:{},onSubmit:{type:Function},destFile:{},destName:{}},setup(e){const t=e,o=De(),a=n.ref(null);n.onMounted(()=>{a.value=t.destName??""});const s=n.computed(()=>URL.createObjectURL(t.destFile)),l=i=>o.closeModal({name:i}),r=()=>a.value&&t.onSubmit(a.value);return(i,c)=>(n.openBlock(),n.createBlock(qa,{name:i.name,"on-submit":r,title:i.__("NovaFileManager.uploadCropTitle")},{inputs:n.withCtx(()=>[n.createElementVNode("div",ev,[n.createElementVNode("div",tv,[nv,n.createElementVNode("img",{class:"relative z-10 object-contain h-48 w-full",src:s.value,alt:i.name},null,8,ov)])]),n.createElementVNode("div",null,[n.createElementVNode("div",av,[n.createElementVNode("label",rv,n.toDisplayString(i.__("Name")),1),n.withDirectives(n.createElementVNode("input",{id:"name","onUpdate:modelValue":c[0]||(c[0]=d=>a.value=d),placeholder:i.__("NovaFileManager.actions.uploadCrop"),class:"block w-full border-0 p-0 bg-gray-100 dark:bg-gray-900 placeholder-gray-400 sm:text-sm text-black dark:text-white focus:outline-none focus:ring-0",name:"name",type:"text"},null,8,sv),[[n.vModelText,a.value]])]),n.createElementVNode("p",iv,n.toDisplayString(i.__("NovaFileManager.edit.originalName",{name:i.file.name})),1)])]),submitButton:n.withCtx(()=>[n.createVNode(Ct,{disabled:!a.value,class:"w-full sm:w-auto",type:"submit",variant:"primary"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(i.__("NovaFileManager.actions.upload")),1)]),_:1},8,["disabled"])]),cancelButton:n.withCtx(()=>[n.createVNode(Ct,{class:"w-full sm:w-auto",type:"reset",variant:"secondary",onClick:c[1]||(c[1]=d=>l(i.name))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(i.__("Cancel")),1)]),_:1})]),_:1},8,["name","title"]))}}),lv={class:"w-full flex flex-col flex-col-reverse gap-2 md:flex-row justify-between items-start"},cv={class:"text-lg font-medium text-gray-900 dark:text-gray-400 break-all w-full"},dv={class:"flex flex-row gap-2 justify-end flex-shrink-0"},uv={class:"h-full max-h-[70vh]"},fv=n.defineComponent({__name:"CropImageModal",props:{file:{},name:{},onConfirm:{type:Function}},setup(e){const t=e,o=De(),a=n.ref(),s=n.ref(null),l=n.ref(),r=n.computed(()=>o.isOpen(yn)),i=n.computed(()=>o.cropperOptions),c=n.computed(()=>({height:"100%",minHeight:"60vh"})),d=n.computed(()=>{const u=s.value?.getData(),m=`${Math.round(u.width)}_${Math.round(u.height)}_${Math.round(u.x)}_${Math.round(u.y)}`;return t.file?.name.replace(t.file?.extension,`${m}.${t.file?.extension}`)}),f=u=>o.openModal({name:u}),p=u=>o.closeModal({name:u}),h=()=>{s.value?.getCroppedCanvas().toBlob(u=>{u&&(l.value=new File([u],t.file.name,{type:t.file.mime}),f(yn))})},g=u=>{if(!l.value)return;const m=new File([l.value],u,{type:t.file.mime});p(yn),p(t.name),t.onConfirm(m)};return(u,m)=>(n.openBlock(),n.createBlock(Eo,{as:"template",class:"nova-file-manager",name:u.name},{default:n.withCtx(({close:y})=>[n.createVNode(n.unref(sn),{class:"relative bg-gray-100 dark:bg-gray-900 rounded-lg overflow-hidden shadow-xl transform transition-all w-full max-w-7xl p-4 flex flex-col gap-4 h-[80vh] max-h-[80vh]"},{default:n.withCtx(()=>[n.createElementVNode("div",lv,[n.createElementVNode("h2",cv,n.toDisplayString(u.__("NovaFileManager.actions.cropImage",{image:u.file.name})),1),n.createElementVNode("div",dv,[n.createVNode(rt,{ref_key:"buttonRef",ref:a,title:u.__("NovaFileManager.actions.close"),onClick:n.withModifiers(y,["prevent","stop"])},{default:n.withCtx(()=>[n.createVNode(n.unref(Lr),{class:"w-5 h-5"})]),_:2},1032,["title","onClick"]),n.createVNode(rt,{variant:"success",onClick:h},{default:n.withCtx(()=>[n.createVNode(n.unref(Aa),{class:"h-5 w-5"})]),_:1})])]),n.createElementVNode("div",uv,[n.createVNode(n.unref(Yg),n.mergeProps({ref_key:"cropper",ref:s,containerStyle:c.value,src:u.file.url,alt:u.file.name},i.value),null,16,["containerStyle","src","alt"])]),r.value?(n.openBlock(),n.createBlock(xc,{key:0,file:u.file,name:n.unref(yn),"on-submit":g,"dest-file":l.value,"dest-name":d.value},null,8,["file","name","dest-file","dest-name"])):n.createCommentVNode("",!0)]),_:2},1024)]),_:1},8,["name"]))}});var pv=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,o=[],a=0;a"u"){o&&console.warn("unable to use e.clipboardData"),o&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var p=Oc[t.format]||Oc.default;window.clipboardData.setData(p,e)}else f.clipboardData.clearData(),f.clipboardData.setData(t.format,e);t.onCopy&&(f.preventDefault(),t.onCopy(f.clipboardData))}),document.body.appendChild(i),l.selectNodeContents(i),r.addRange(l);var d=document.execCommand("copy");if(!d)throw new Error("copy command was unsuccessful");c=!0}catch(f){o&&console.error("unable to copy using execCommand: ",f),o&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(p){o&&console.error("unable to copy using clipboardData: ",p),o&&console.error("falling back to prompt"),a=gv("message"in t?t.message:mv),window.prompt(a,e)}}finally{r&&(typeof r.removeRange=="function"?r.removeRange(l):r.removeAllRanges()),i&&document.body.removeChild(i),s()}return c}var bv=vv;const yv=Hn(bv);function Sc(){return{copy:t=>{yv(t)}}}function $a(e){const t=De(),{error:o}=cu(t);return{message:n.computed(()=>o?.value?.bag?.message),invalid:n.computed(()=>o?.value?.attribute===e),errors:n.computed(()=>o?.value?.bag?.errors)}}function Ev(){return{__:(t,o)=>{let a=window.Nova.config("translations")[t]?window.Nova.config("translations")[t]:t;return Object.entries(o??{}).forEach(([s,l])=>{if(l===null){console.error(`Translation '${a}' for key '${s}' contains a null replacement.`);return}l=String(l);const r=[`:${s}`,`:${s.toUpperCase()}`,`:${s.charAt(0).toUpperCase()}${s.slice(1)}`],i=[l,l.toUpperCase(),l.charAt(0).toUpperCase()+l.slice(1)];for(let c=r.length-1;c>=0;c--)a=a.replace(r[c],i[c])}),a}}}function ia(){const e=De(),t=n.computed(()=>e.permissions?.folder.create),o=n.computed(()=>e.permissions?.folder.rename),a=n.computed(()=>e.permissions?.folder.delete),s=n.computed(()=>e.permissions?.file.upload),l=n.computed(()=>e.permissions?.file.rename),r=n.computed(()=>e.permissions?.file.delete),i=n.computed(()=>e.permissions?.file.edit),c=n.computed(()=>e.permissions?.file.unzip);return{showCreateFolder:t,showRenameFolder:o,showDeleteFolder:a,showUploadFile:s,showRenameFile:l,showDeleteFile:r,showCropImage:i,showUnzipFile:c}}function Nc(){const e=De(),t=n.computed(()=>e.usePintura),o=n.computed(()=>e.pinturaOptions);return{usePinturaEditor:t,pinturaOptions:o}}const _v={class:"sm:flex sm:items-start"},wv={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"},Tv={class:"mt-2"},xv={class:"text-sm text-gray-500 dark:text-gray-400"},Ov={class:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse sm:gap-x-2 space-y-3 sm:space-y-0"},Rc=n.defineComponent({__name:"ConfirmModal",props:{name:{},attribute:{},title:{},content:{},icon:{},variant:{default:"danger"}},setup(e){const t={danger:{iconBackground:"bg-red-100 dark:bg-red-800/30",iconColor:"text-red-600 dark:text-red-500"}},o=e,{invalid:a,errors:s}=$a(o.attribute),l=n.computed(()=>o.variant?t[o.variant].iconColor:""),r=n.computed(()=>o.variant?t[o.variant].iconBackground:"");return(i,c)=>(n.openBlock(),n.createBlock(Eo,{as:"template",class:"nova-file-manager",name:i.name},{default:n.withCtx(({close:d})=>[n.createVNode(n.unref(sn),{class:"relative bg-gray-100 dark:bg-gray-900 rounded-lg px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-lg sm:w-full sm:p-6"},{default:n.withCtx(()=>[n.createElementVNode("div",_v,[n.createElementVNode("div",{class:n.normalizeClass(`${r.value} mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full sm:mx-0 sm:h-10 sm:w-10`)},[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(i.icon),{class:n.normalizeClass(`${l.value} h-6 w-6`),"aria-hidden":"true"},null,8,["class"]))],2),n.createElementVNode("div",wv,[n.createVNode(n.unref(lc),{as:"h3",class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-100"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(i.title),1)]),_:1}),n.createElementVNode("div",Tv,[n.createElementVNode("p",xv,n.toDisplayString(i.content),1)]),n.unref(a)?(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:0},n.renderList(n.unref(s),(f,p)=>(n.openBlock(),n.createElementBlock("p",{key:`confirm_modal_error_${p}`,class:"mt-2 text-sm text-red-600"},n.toDisplayString(f),1))),128)):n.createCommentVNode("",!0)])]),n.createElementVNode("div",Ov,[n.renderSlot(i.$slots,"confirmButton"),n.renderSlot(i.$slots,"cancelButton",{close:d})])]),_:2},1024)]),_:3},8,["name"]))}}),Ic=n.defineComponent({__name:"DeleteFileModal",props:{isOpen:{type:Boolean,default:!1},name:{},onConfirm:{},count:{}},setup(e){const t=n.computed(()=>Si);return(o,a)=>(n.openBlock(),n.createBlock(Rc,{content:o.__("NovaFileManager.deleteFileContent"),icon:t.value,"is-open":o.isOpen,name:o.name,title:o.__("NovaFileManager.deleteFileTitle",{count:o.count}),variant:"danger",attribute:"deleteFile"},{confirmButton:n.withCtx(()=>[n.createVNode(Ct,{class:"w-full sm:w-auto",type:"button",variant:"danger",onClick:o.onConfirm},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(o.__("Delete")),1)]),_:1},8,["onClick"])]),cancelButton:n.withCtx(({close:s})=>[n.createVNode(Ct,{class:"w-full sm:w-auto",type:"button",variant:"secondary",onClick:s},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(o.__("Cancel")),1)]),_:2},1032,["onClick"])]),_:1},8,["content","icon","is-open","name","title"]))}}),Sv={class:"w-full flex flex-col flex-col-reverse gap-2 md:flex-row justify-between items-start"},Nv={class:"text-lg font-medium text-gray-900 dark:text-gray-400 break-all w-full"},Rv={class:"flex flex-row gap-2 justify-end flex-shrink-0"},Iv={key:0,class:"h-full max-h-[70vh] flex flex-col items-center justify-center space-y-4"},Cv={class:"text-red-500 text-xl"},kv=n.defineComponent({__name:"EditImageModal",props:{file:{},name:{},onConfirm:{type:Function}},setup(e){const t=e,o=De(),a=n.ref(),s=n.ref(),l=n.ref(),r=n.computed(()=>o.isOpen(yn)),i=n.ref(),c=n.ref(),{pinturaOptions:d}=Nc();n.watchEffect(()=>{if(i.value&&!c.value)try{const{appendDefaultEditor:u,editorOptions:m}=window.novaFileManagerEditor;c.value=u(i.value,{...m,...d.value,src:t.file.url,enableButtonExport:!1}),c.value&&c.value.on("loaderror",({error:y})=>window.Nova.error(y.message))}catch(u){s.value=!0,console.error(u)}});const f=u=>o.openModal({name:u}),p=u=>o.closeModal({name:u}),h=()=>{c.value?.processImage().then(({dest:u})=>{l.value=u,f(yn)})},g=u=>{if(!l.value)return;const m=new File([l.value],u,{type:t.file.mime});p(yn),p(t.name),t.onConfirm(m)};return(u,m)=>(n.openBlock(),n.createBlock(Eo,{as:"template",class:"nova-file-manager",name:u.name},{default:n.withCtx(({close:y})=>[n.createVNode(n.unref(sn),{class:"relative bg-gray-100 dark:bg-gray-900 rounded-lg overflow-hidden shadow-xl transform transition-all w-full max-w-7xl p-4 flex flex-col gap-4 h-[80vh] max-h-[80vh]"},{default:n.withCtx(()=>[n.createElementVNode("div",Sv,[n.createElementVNode("h2",Nv,n.toDisplayString(u.__("NovaFileManager.actions.editImage",{image:u.file.name})),1),n.createElementVNode("div",Rv,[n.createVNode(rt,{ref_key:"buttonRef",ref:a,title:u.__("NovaFileManager.actions.close"),onClick:n.withModifiers(y,["prevent","stop"])},{default:n.withCtx(()=>[n.createVNode(n.unref(Lr),{class:"w-5 h-5"})]),_:2},1032,["title","onClick"]),n.createVNode(rt,{variant:"success",onClick:h},{default:n.withCtx(()=>[n.createVNode(n.unref(Aa),{class:"h-5 w-5"})]),_:1})])]),s.value?(n.openBlock(),n.createElementBlock("div",Iv,[n.createVNode(n.unref(Ci),{class:"w-16 h-16 text-red-500"}),n.createElementVNode("p",Cv,n.toDisplayString(u.__("NovaFileManager.pintura.loadingError")),1)])):(n.openBlock(),n.createElementBlock("div",{key:1,class:"h-full max-h-[70vh]",ref_key:"editorRef",ref:i},null,512)),r.value?(n.openBlock(),n.createBlock(xc,{key:2,file:u.file,name:n.unref(yn),"on-submit":g,"dest-file":l.value},null,8,["file","name","dest-file"])):n.createCommentVNode("",!0)]),_:2},1024)]),_:1},8,["name"]))}}),Av={class:"block text-xs font-medium text-gray-700 dark:text-gray-200",for:"name"},Dv=["placeholder"],Bv=n.defineComponent({__name:"RenameFileModal",props:{name:{},onSubmit:{type:Function},from:{}},setup(e){const t=e,{invalid:o,errors:a}=$a(Xt.RENAME_FILE),s=n.ref(null);n.onMounted(()=>s.value=t.from);const l=()=>s.value&&t.onSubmit(s.value);return(r,i)=>(n.openBlock(),n.createBlock(qa,{name:r.name,"on-submit":l,title:r.__("NovaFileManager.renameFileTitle")},{inputs:n.withCtx(()=>[n.createElementVNode("div",null,[n.createElementVNode("div",{class:n.normalizeClass(["w-full border rounded-md space-y-2 px-3 py-2 bg-gray-100 dark:bg-gray-900 shadow-sm focus-within:ring-1 focus-within:ring-blue-600 focus-within:border-blue-600",n.unref(o)?"border-red-400 dark:border-red-700":"border-gray-400 dark:border-gray-700"])},[n.createElementVNode("label",Av,n.toDisplayString(r.__("Name")),1),n.withDirectives(n.createElementVNode("input",{id:"name","onUpdate:modelValue":i[0]||(i[0]=c=>s.value=c),placeholder:r.__("Name"),class:"block w-full border-0 p-0 bg-gray-100 dark:bg-gray-900 placeholder-gray-400 sm:text-sm text-black dark:text-white focus:outline-none focus:ring-0",name:"name",type:"text"},null,8,Dv),[[n.vModelText,s.value]])],2),n.unref(o)?(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:0},n.renderList(n.unref(a),(c,d)=>(n.openBlock(),n.createElementBlock("p",{key:`rename_file_modal_error_${d}`,class:"mt-2 text-sm text-red-600"},n.toDisplayString(c),1))),128)):n.createCommentVNode("",!0)])]),submitButton:n.withCtx(()=>[n.createVNode(Ct,{disabled:s.value===r.from,class:"w-full sm:w-auto",type:"submit",variant:"primary"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(r.__("Submit")),1)]),_:1},8,["disabled"])]),cancelButton:n.withCtx(({close:c})=>[n.createVNode(Ct,{class:"w-full sm:w-auto",type:"button",variant:"secondary",onClick:c},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(r.__("Cancel")),1)]),_:2},1032,["onClick"])]),_:1},8,["name","title"]))}}),Pv={class:"w-full flex flex-col flex-col-reverse gap-y-2 md:flex-row justify-between items-start"},Mv={class:"text-lg font-medium text-gray-900 dark:text-gray-400 break-all w-full"},Lv={class:"flex flex-row gap-2 justify-end flex-shrink-0"},Fv={class:"overflow-hidden flex flex-col md:flex-row gap-4 w-full"},Uv={class:"block relative w-full md:w-4/6 overflow-hidden rounded-lg bg-gray-500/10 flex items-center justify-center"},Hv={key:1,class:"w-full max-w-screen max-h-[80vh] relative",controls:"controls"},Vv=["src"],jv=["src"],Gv={class:"w-full md:w-2/6"},zv={class:"font-medium text-gray-800 dark:text-gray-100"},Wv={class:"mt-2 divide-y divide-gray-200 dark:divide-gray-800/40 border-t border-b border-gray-300 dark:border-gray-800/70"},Xv={class:"flex justify-between py-3 text-sm font-medium"},Kv={class:"text-gray-500"},Yv={class:"text-gray-400 dark:text-gray-600"},Jv={class:"flex justify-between py-3 text-sm font-medium"},Qv={class:"text-gray-500"},Zv={class:"text-gray-400 dark:text-gray-600"},qv={class:"flex justify-between py-3 text-sm font-medium"},$v={class:"text-gray-500"},eb={class:"text-gray-400 dark:text-gray-600"},tb={class:"text-gray-500"},nb={class:"text-gray-400 dark:text-gray-600"},Is=n.defineComponent({__name:"PreviewModal",props:{file:{},readOnly:{type:Boolean,default:!1}},setup(e){const t=e,o=De(),{copy:a}=Sc(),{showRenameFile:s,showDeleteFile:l,showCropImage:r,showUnzipFile:i}=ia(),{usePinturaEditor:c}=Nc(),d=n.ref(),f=n.computed(()=>o.isOpen(`crop-image-${t.file?.id}`)),p=n.computed(()=>o.isOpen(`edit-image-${t.file?.id}`)),h=n.computed(()=>o.isField),g=T=>o.openModal({name:T}),u=T=>o.renameFile({id:t.file.id,from:t.file.path,to:T}),m=()=>o.deleteFiles({paths:[t.file.path]}),y=T=>o.unzipFile({path:T}),v=()=>{o.selectFile({file:t.file}),o.confirm()},b=()=>{o.preview=void 0,o.fixPortal()},N=T=>{b(),g(Xo),o.upload({files:[T]})},x=T=>{a(T.url),window.Nova.success("OK!")};return(T,O)=>(n.openBlock(),n.createBlock(Eo,{as:"template",class:"nova-file-manager",name:n.unref(jr),"initial-focus-ref":d.value},{default:n.withCtx(()=>[n.createVNode(n.unref(sn),{class:"relative bg-gray-100 dark:bg-gray-900 rounded-lg overflow-hidden shadow-xl transform transition-all w-full max-w-7xl p-4 flex flex-col gap-4"},{default:n.withCtx(()=>[n.createElementVNode("div",Pv,[n.createElementVNode("h2",Mv,n.toDisplayString(T.file?.name),1),n.createElementVNode("div",Lv,[!T.readOnly&&n.unref(l)?(n.openBlock(),n.createBlock(rt,{key:0,variant:"danger",onClick:O[0]||(O[0]=B=>g(`${n.unref(Lt).DELETE_FILES}-${T.file?.id}`)),title:T.__("NovaFileManager.actions.delete")},{default:n.withCtx(()=>[n.createVNode(n.unref(Ri),{class:"w-5 h-5"})]),_:1},8,["title"])):n.createCommentVNode("",!0),!T.readOnly&&n.unref(r)&&!n.unref(c)&&T.file?.type==="image"?(n.openBlock(),n.createBlock(rt,{key:1,variant:"secondary",onClick:O[1]||(O[1]=B=>g(`crop-image-${T.file?.id}`)),title:T.__("NovaFileManager.actions.cropImage",{image:T.file?.name})},{default:n.withCtx(()=>[n.createVNode(Ec,{class:"w-5 h-5"})]),_:1},8,["title"])):n.createCommentVNode("",!0),!T.readOnly&&n.unref(r)&&n.unref(c)&&T.file?.type==="image"?(n.openBlock(),n.createBlock(rt,{key:2,variant:"secondary",onClick:O[2]||(O[2]=B=>g(`edit-image-${T.file?.id}`)),title:T.__("NovaFileManager.actions.editImage",{image:T.file?.name})},{default:n.withCtx(()=>[n.createVNode(Ec,{class:"w-5 h-5"})]),_:1},8,["title"])):n.createCommentVNode("",!0),!T.readOnly&&n.unref(i)&&T.file?.type==="zip"?(n.openBlock(),n.createBlock(rt,{key:3,variant:"secondary",onClick:O[3]||(O[3]=B=>y(T.file.path)),title:T.__("NovaFileManager.actions.unzip")},{default:n.withCtx(()=>[n.createVNode(n.unref(du),{class:"w-5 h-5"})]),_:1},8,["title"])):n.createCommentVNode("",!0),n.createVNode(rt,{onClick:O[4]||(O[4]=B=>x(T.file)),variant:"secondary",title:T.__("NovaFileManager.actions.copy")},{default:n.withCtx(()=>[n.createVNode(n.unref(fu),{class:"w-5 h-5"})]),_:1},8,["title"]),n.createVNode(rt,{"as-anchor":!0,download:T.file?.name,href:T.file?.url,variant:"secondary",title:T.__("NovaFileManager.actions.download")},{default:n.withCtx(()=>[n.createVNode(n.unref(pu),{class:"w-5 h-5"})]),_:1},8,["download","href","title"]),!T.readOnly&&n.unref(s)?(n.openBlock(),n.createBlock(rt,{key:4,variant:"secondary",onClick:O[5]||(O[5]=B=>g(`rename-file-${T.file?.id}`)),title:T.__("NovaFileManager.actions.rename")},{default:n.withCtx(()=>[n.createVNode(n.unref(yu),{class:"w-5 h-5"})]),_:1},8,["title"])):n.createCommentVNode("",!0),n.createVNode(rt,{ref_key:"buttonRef",ref:d,onClick:b,title:T.__("NovaFileManager.actions.close")},{default:n.withCtx(()=>[n.createVNode(n.unref(Lr),{class:"w-5 h-5"})]),_:1},8,["title"]),h.value?(n.openBlock(),n.createBlock(rt,{key:5,variant:"success",onClick:v},{default:n.withCtx(()=>[n.createVNode(n.unref(Aa),{class:"h-5 w-5"})]),_:1})):n.createCommentVNode("",!0)])]),n.createElementVNode("div",Fv,[n.createElementVNode("div",Uv,[T.file?.type==="image"?(n.openBlock(),n.createBlock(ki,{key:0,src:T.file.url,"is-thumbnail":!1,"full-width":!1,class:"relative",alt:T.file.name},null,8,["src","alt"])):T.file?.type==="video"?(n.openBlock(),n.createElementBlock("video",Hv,[n.createElementVNode("source",{src:T.file?.url},null,8,Vv),n.createTextVNode(" Sorry, your browser doesn't support embedded videos. ")])):T.file?.type==="pdf"?(n.openBlock(),n.createElementBlock("embed",{key:2,src:T.file?.url,type:"application/pdf",class:"w-full max-w-screen h-[80vh]"},null,8,jv)):(n.openBlock(),n.createBlock(n.unref(zo),{key:3,class:"h-40 w-40 text-gray-500 m-12"}))]),n.createElementVNode("div",Gv,[n.createElementVNode("div",null,[n.createElementVNode("h3",zv,n.toDisplayString(T.__("NovaFileManager.preview.information")),1),n.createElementVNode("dl",Wv,[n.createElementVNode("div",Xv,[n.createElementVNode("dt",Kv,n.toDisplayString(T.__("NovaFileManager.meta.size")),1),n.createElementVNode("dd",Yv,n.toDisplayString(T.file?.size),1)]),n.createElementVNode("div",Jv,[n.createElementVNode("dt",Qv,n.toDisplayString(T.__("NovaFileManager.meta.mime")),1),n.createElementVNode("dd",Zv,n.toDisplayString(T.file?.mime),1)]),n.createElementVNode("div",qv,[n.createElementVNode("dt",$v,n.toDisplayString(T.__("NovaFileManager.meta.lastModifiedAt")),1),n.createElementVNode("dd",eb,n.toDisplayString(T.file?.lastModifiedAt),1)]),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(T.file?.meta,(B,I)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[B?(n.openBlock(),n.createElementBlock("div",{key:I,class:"flex justify-between py-3 text-sm font-medium"},[n.createElementVNode("dt",tb,n.toDisplayString(T.__(`NovaFileManager.meta.${I}`)),1),n.createElementVNode("dd",nb,n.toDisplayString(B),1)])):n.createCommentVNode("",!0)],64))),256))])])])]),n.unref(l)?(n.openBlock(),n.createBlock(Ic,{key:0,name:`${n.unref(Lt).DELETE_FILES}-${T.file?.id}`,"on-confirm":m},null,8,["name"])):n.createCommentVNode("",!0),n.unref(r)&&f.value?(n.openBlock(),n.createBlock(fv,{key:1,name:`crop-image-${T.file?.id}`,file:T.file,"on-confirm":N},null,8,["name","file"])):n.createCommentVNode("",!0),n.unref(r)&&p.value?(n.openBlock(),n.createBlock(kv,{key:2,name:`edit-image-${T.file?.id}`,file:T.file,"on-confirm":N},null,8,["name","file"])):n.createCommentVNode("",!0),n.unref(s)?(n.openBlock(),n.createBlock(Bv,{key:3,name:`rename-file-${T.file?.id}`,from:T.file?.name,"on-submit":u},null,8,["name","from"])):n.createCommentVNode("",!0)]),_:1})]),_:1},8,["name","initial-focus-ref"]))}}),ob={class:"nova-file-manager"},ab={class:"grid grid-cols-2 md:grid-cols-4 gap-2 mb-2 w-full",role:"group"},rb=n.defineComponent({__name:"DetailField",props:{field:{},index:{}},setup(e){const t=n.ref(void 0),o=De(),{copy:a}=Sc(),s=n.computed(()=>o.dark),l=n.computed(()=>o.preview),r=i=>{t.value=i,a(i.url),setTimeout(()=>{t.value=void 0},1e3)};return n.onMounted(()=>o.syncDarkMode()),(i,c)=>{const d=n.resolveComponent("PanelItem");return n.openBlock(),n.createBlock(d,{field:i.field,index:i.index},n.createSlots({_:2},[i.field.value?{name:"value",fn:n.withCtx(()=>[n.createElementVNode("div",ob,[n.createElementVNode("div",{class:n.normalizeClass({dark:s.value})},[n.createElementVNode("ul",ab,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.field.value,f=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:f.id},[n.createVNode(Cl,{field:i.field,file:f,attribute:i.field.attribute,detail:!0,"on-copy":r},null,8,["field","file","attribute"]),l.value&&l.value.id===f.id?(n.openBlock(),n.createBlock(Is,{key:0,file:f,"read-only":!0},null,8,["file"])):n.createCommentVNode("",!0)],64))),128))])],2)])]),key:"0"}:void 0]),1032,["field","index"])}}});var Cc={exports:{}};/**! * Sortable 1.14.0 * @author RubaXa * @author owenm * @license MIT - */function kc(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),o.push.apply(o,a)}return o}function Qt(e){for(var t=1;t=0)&&(o[s]=e[s]);return o}function lb(e,t){if(e==null)return{};var o=ib(e,t),a,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}function cb(e){return db(e)||ub(e)||fb(e)||pb()}function db(e){if(Array.isArray(e))return Cs(e)}function ub(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fb(e,t){if(e){if(typeof e=="string")return Cs(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Cs(e,t)}}function Cs(e,t){(t==null||t>e.length)&&(t=e.length);for(var o=0,a=new Array(t);o"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function gb(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Ft(e,t,o,a){if(e){o=o||document;do{if(t!=null&&(t[0]===">"?e.parentNode===o&&tr(e,t):tr(e,t))||a&&e===o)return e;if(e===o)break}while(e=gb(e))}return null}var Pc=/\s+/g;function Ge(e,t,o){if(e&&t)if(e.classList)e.classList[o?"add":"remove"](t);else{var a=(" "+e.className+" ").replace(Pc," ").replace(" "+t+" "," ");e.className=(a+(o?" "+t:"")).replace(Pc," ")}}function re(e,t,o){var a=e&&e.style;if(a){if(o===void 0)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(o=e.currentStyle),t===void 0?o:o[t];!(t in a)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),a[t]=o+(typeof o=="string"?"":"px")}}function Wn(e,t){var o="";if(typeof e=="string")o=e;else do{var a=re(e,"transform");a&&a!=="none"&&(o=a+" "+o)}while(!t&&(e=e.parentNode));var s=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return s&&new s(o)}function Mc(e,t,o){if(e){var a=e.getElementsByTagName(t),s=0,i=a.length;if(o)for(;s=i:r=s<=i,!r)return a;if(a===Zt())break;a=Sn(a,!1)}return!1}function _o(e,t,o,a){for(var s=0,i=0,r=e.children;i2&&arguments[2]!==void 0?arguments[2]:{},s=a.evt,i=lb(a,Tb);ua.pluginEvent.bind(ue)(t,o,Qt({dragEl:te,parentEl:Xe,ghostEl:me,rootEl:Ve,nextEl:Xn,lastDownEl:nr,cloneEl:Ke,cloneHidden:Nn,dragStarted:ha,putSortable:ct,activeSortable:ue.active,originalEvent:s,oldIndex:To,oldDraggableIndex:pa,newIndex:Et,newDraggableIndex:Rn,hideGhostForTarget:Yc,unhideGhostForTarget:Jc,cloneNowHidden:function(){Nn=!0},cloneNowShown:function(){Nn=!1},dispatchSortableEvent:function(l){mt({sortable:o,name:l,originalEvent:s})}},i))};function mt(e){fa(Qt({putSortable:ct,cloneEl:Ke,targetEl:te,rootEl:Ve,oldIndex:To,oldDraggableIndex:pa,newIndex:Et,newDraggableIndex:Rn},e))}var te,Xe,me,Ve,Xn,nr,Ke,Nn,To,Et,pa,Rn,or,ct,xo=!1,ar=!1,rr=[],Kn,Ut,Ms,Ls,jc,Gc,ha,Oo,ma,ga=!1,sr=!1,ir,ft,Fs=[],Us=!1,lr=[],cr=typeof document<"u",dr=Dc,zc=la||cn?"cssFloat":"float",xb=cr&&!mb&&!Dc&&"draggable"in document.createElement("div"),Wc=function(){if(cr){if(cn)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),Xc=function(t,o){var a=re(t),s=parseInt(a.width)-parseInt(a.paddingLeft)-parseInt(a.paddingRight)-parseInt(a.borderLeftWidth)-parseInt(a.borderRightWidth),i=_o(t,0,o),r=_o(t,1,o),l=i&&re(i),c=r&&re(r),d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+He(i).width,f=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+He(r).width;if(a.display==="flex")return a.flexDirection==="column"||a.flexDirection==="column-reverse"?"vertical":"horizontal";if(a.display==="grid")return a.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&l.float&&l.float!=="none"){var p=l.float==="left"?"left":"right";return r&&(c.clear==="both"||c.clear===p)?"vertical":"horizontal"}return i&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||d>=s&&a[zc]==="none"||r&&a[zc]==="none"&&d+f>s)?"vertical":"horizontal"},Ob=function(t,o,a){var s=a?t.left:t.top,i=a?t.right:t.bottom,r=a?t.width:t.height,l=a?o.left:o.top,c=a?o.right:o.bottom,d=a?o.width:o.height;return s===l||i===c||s+r/2===l+d/2},Sb=function(t,o){var a;return rr.some(function(s){var i=s[ut].options.emptyInsertThreshold;if(!(!i||ks(s))){var r=He(s),l=t>=r.left-i&&t<=r.right+i,c=o>=r.top-i&&o<=r.bottom+i;if(l&&c)return a=s}}),a},Kc=function(t){function o(i,r){return function(l,c,d,f){var p=l.options.group.name&&c.options.group.name&&l.options.group.name===c.options.group.name;if(i==null&&(r||p))return!0;if(i==null||i===!1)return!1;if(r&&i==="clone")return i;if(typeof i=="function")return o(i(l,c,d,f),r)(l,c,d,f);var h=(r?l:c).options.group.name;return i===!0||typeof i=="string"&&i===h||i.join&&i.indexOf(h)>-1}}var a={},s=t.group;(!s||er(s)!="object")&&(s={name:s}),a.name=s.name,a.checkPull=o(s.pull,!0),a.checkPut=o(s.put),a.revertClone=s.revertClone,t.group=a},Yc=function(){!Wc&&me&&re(me,"display","none")},Jc=function(){!Wc&&me&&re(me,"display","")};cr&&document.addEventListener("click",function(e){if(ar)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ar=!1,!1},!0);var Yn=function(t){if(te){t=t.touches?t.touches[0]:t;var o=Sb(t.clientX,t.clientY);if(o){var a={};for(var s in t)t.hasOwnProperty(s)&&(a[s]=t[s]);a.target=a.rootEl=o,a.preventDefault=void 0,a.stopPropagation=void 0,o[ut]._onDragOver(a)}}},Nb=function(t){te&&te.parentNode[ut]._isOutsideThisEl(t.target)};function ue(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=kt({},t),e[ut]=this;var o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Xc(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(r,l){r.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:ue.supportPointer!==!1&&"PointerEvent"in window&&!ca,emptyInsertThreshold:5};ua.initializePlugins(this,e,o);for(var a in o)!(a in t)&&(t[a]=o[a]);Kc(t);for(var s in this)s.charAt(0)==="_"&&typeof this[s]=="function"&&(this[s]=this[s].bind(this));this.nativeDraggable=t.forceFallback?!1:xb,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?we(e,"pointerdown",this._onTapStart):(we(e,"mousedown",this._onTapStart),we(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(we(e,"dragover",this),we(e,"dragenter",this)),rr.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),kt(this,Eb())}ue.prototype={constructor:ue,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Oo=null)},_getDirection:function(t,o){return typeof this.options.direction=="function"?this.options.direction.call(this,t,o,te):this.options.direction},_onTapStart:function(t){if(t.cancelable){var o=this,a=this.el,s=this.options,i=s.preventOnFilter,r=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,c=(l||t).target,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||c,f=s.filter;if(Pb(a),!te&&!(/mousedown|pointerdown/.test(r)&&t.button!==0||s.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&ca&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=Ft(c,s.draggable,a,!1),!(c&&c.animated)&&nr!==c)){if(To=We(c),pa=We(c,s.draggable),typeof f=="function"){if(f.call(this,t,c,this)){mt({sortable:o,rootEl:d,name:"filter",targetEl:c,toEl:a,fromEl:a}),gt("filter",o,{evt:t}),i&&t.cancelable&&t.preventDefault();return}}else if(f&&(f=f.split(",").some(function(p){if(p=Ft(d,p.trim(),a,!1),p)return mt({sortable:o,rootEl:p,name:"filter",targetEl:c,fromEl:a,toEl:a}),gt("filter",o,{evt:t}),!0}),f)){i&&t.cancelable&&t.preventDefault();return}s.handle&&!Ft(d,s.handle,a,!1)||this._prepareDragStart(t,l,c)}}},_prepareDragStart:function(t,o,a){var s=this,i=s.el,r=s.options,l=i.ownerDocument,c;if(a&&!te&&a.parentNode===i){var d=He(a);if(Ve=i,te=a,Xe=te.parentNode,Xn=te.nextSibling,nr=a,or=r.group,ue.dragged=te,Kn={target:te,clientX:(o||t).clientX,clientY:(o||t).clientY},jc=Kn.clientX-d.left,Gc=Kn.clientY-d.top,this._lastX=(o||t).clientX,this._lastY=(o||t).clientY,te.style["will-change"]="all",c=function(){if(gt("delayEnded",s,{evt:t}),ue.eventCanceled){s._onDrop();return}s._disableDelayedDragEvents(),!Ac&&s.nativeDraggable&&(te.draggable=!0),s._triggerDragStart(t,o),mt({sortable:s,name:"choose",originalEvent:t}),Ge(te,r.chosenClass,!0)},r.ignore.split(",").forEach(function(f){Mc(te,f.trim(),Hs)}),we(l,"dragover",Yn),we(l,"mousemove",Yn),we(l,"touchmove",Yn),we(l,"mouseup",s._onDrop),we(l,"touchend",s._onDrop),we(l,"touchcancel",s._onDrop),Ac&&this.nativeDraggable&&(this.options.touchStartThreshold=4,te.draggable=!0),gt("delayStart",this,{evt:t}),r.delay&&(!r.delayOnTouchOnly||o)&&(!this.nativeDraggable||!(la||cn))){if(ue.eventCanceled){this._onDrop();return}we(l,"mouseup",s._disableDelayedDrag),we(l,"touchend",s._disableDelayedDrag),we(l,"touchcancel",s._disableDelayedDrag),we(l,"mousemove",s._delayedDragTouchMoveHandler),we(l,"touchmove",s._delayedDragTouchMoveHandler),r.supportPointer&&we(l,"pointermove",s._delayedDragTouchMoveHandler),s._dragStartTimer=setTimeout(c,r.delay)}else c()}},_delayedDragTouchMoveHandler:function(t){var o=t.touches?t.touches[0]:t;Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){te&&Hs(te),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;be(t,"mouseup",this._disableDelayedDrag),be(t,"touchend",this._disableDelayedDrag),be(t,"touchcancel",this._disableDelayedDrag),be(t,"mousemove",this._delayedDragTouchMoveHandler),be(t,"touchmove",this._delayedDragTouchMoveHandler),be(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,o){o=o||t.pointerType=="touch"&&t,!this.nativeDraggable||o?this.options.supportPointer?we(document,"pointermove",this._onTouchMove):o?we(document,"touchmove",this._onTouchMove):we(document,"mousemove",this._onTouchMove):(we(te,"dragend",this),we(Ve,"dragstart",this._onDragStart));try{document.selection?fr(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,o){if(xo=!1,Ve&&te){gt("dragStarted",this,{evt:o}),this.nativeDraggable&&we(document,"dragover",Nb);var a=this.options;!t&&Ge(te,a.dragClass,!1),Ge(te,a.ghostClass,!0),ue.active=this,t&&this._appendGhost(),mt({sortable:this,name:"start",originalEvent:o})}else this._nulling()},_emulateDragOver:function(){if(Ut){this._lastX=Ut.clientX,this._lastY=Ut.clientY,Yc();for(var t=document.elementFromPoint(Ut.clientX,Ut.clientY),o=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Ut.clientX,Ut.clientY),t!==o);)o=t;if(te.parentNode[ut]._isOutsideThisEl(t),o)do{if(o[ut]){var a=void 0;if(a=o[ut]._onDragOver({clientX:Ut.clientX,clientY:Ut.clientY,target:t,rootEl:o}),a&&!this.options.dragoverBubble)break}t=o}while(o=o.parentNode);Jc()}},_onTouchMove:function(t){if(Kn){var o=this.options,a=o.fallbackTolerance,s=o.fallbackOffset,i=t.touches?t.touches[0]:t,r=me&&Wn(me,!0),l=me&&r&&r.a,c=me&&r&&r.d,d=dr&&ft&&Fc(ft),f=(i.clientX-Kn.clientX+s.x)/(l||1)+(d?d[0]-Fs[0]:0)/(l||1),p=(i.clientY-Kn.clientY+s.y)/(c||1)+(d?d[1]-Fs[1]:0)/(c||1);if(!ue.active&&!xo){if(a&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))=0&&(mt({rootEl:Xe,name:"add",toEl:Xe,fromEl:Ve,originalEvent:t}),mt({sortable:this,name:"remove",toEl:Xe,originalEvent:t}),mt({rootEl:Xe,name:"sort",toEl:Xe,fromEl:Ve,originalEvent:t}),mt({sortable:this,name:"sort",toEl:Xe,originalEvent:t})),ct&&ct.save()):Et!==To&&Et>=0&&(mt({sortable:this,name:"update",toEl:Xe,originalEvent:t}),mt({sortable:this,name:"sort",toEl:Xe,originalEvent:t})),ue.active&&((Et==null||Et===-1)&&(Et=To,Rn=pa),mt({sortable:this,name:"end",toEl:Xe,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){gt("nulling",this),Ve=te=Xe=me=Xn=Ke=nr=Nn=Kn=Ut=ha=Et=Rn=To=pa=Oo=ma=ct=or=ue.dragged=ue.ghost=ue.clone=ue.active=null,lr.forEach(function(t){t.checked=!0}),lr.length=Ms=Ls=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":te&&(this._onDragOver(t),Rb(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],o,a=this.el.children,s=0,i=a.length,r=this.options;sa.right+s||e.clientX<=a.right&&e.clientY>a.bottom&&e.clientX>=a.left:e.clientX>a.right&&e.clientY>a.top||e.clientX<=a.right&&e.clientY>a.bottom+s}function Ab(e,t,o,a,s,i,r,l){var c=a?e.clientY:e.clientX,d=a?o.height:o.width,f=a?o.top:o.left,p=a?o.bottom:o.right,h=!1;if(!r){if(l&&irf+d*i/2:cp-ir)return-ma}else if(c>f+d*(1-s)/2&&cp-d*i/2)?c>f+d/2?1:-1:0}function Db(e){return We(te)1&&(he.forEach(function(l){i.addAnimationState({target:l,rect:vt?He(l):r}),Bs(l),l.fromRect=r,a.removeAnimationState(l)}),vt=!1,Hb(!this.options.removeCloneOnHide,s))},dragOverCompleted:function(o){var a=o.sortable,s=o.isOwner,i=o.insertion,r=o.activeSortable,l=o.parentEl,c=o.putSortable,d=this.options;if(i){if(s&&r._hideClone(),Ea=!1,d.animation&&he.length>1&&(vt||!s&&!r.options.sort&&!c)){var f=He(Me,!1,!0,!0);he.forEach(function(h){h!==Me&&(Vc(h,f),l.appendChild(h))}),vt=!0}if(!s)if(vt||gr(),he.length>1){var p=mr;r._showClone(a),r.options.animation&&!mr&&p&&_t.forEach(function(h){r.addAnimationState({target:h,rect:_a}),h.fromRect=_a,h.thisAnimationDuration=null})}else r._showClone(a)}},dragOverAnimationCapture:function(o){var a=o.dragRect,s=o.isOwner,i=o.activeSortable;if(he.forEach(function(l){l.thisAnimationDuration=null}),i.options.animation&&!s&&i.multiDrag.isMultiDrag){_a=kt({},a);var r=Wn(Me,!0);_a.top-=r.f,_a.left-=r.e}},dragOverAnimationComplete:function(){vt&&(vt=!1,gr())},drop:function(o){var a=o.originalEvent,s=o.rootEl,i=o.parentEl,r=o.sortable,l=o.dispatchSortableEvent,c=o.oldIndex,d=o.putSortable,f=d||this.sortable;if(a){var p=this.options,h=i.children;if(!So)if(p.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Ge(Me,p.selectedClass,!~he.indexOf(Me)),~he.indexOf(Me))he.splice(he.indexOf(Me),1),ya=null,fa({sortable:r,rootEl:s,name:"deselect",targetEl:Me,originalEvt:a});else{if(he.push(Me),fa({sortable:r,rootEl:s,name:"select",targetEl:Me,originalEvt:a}),a.shiftKey&&ya&&r.el.contains(ya)){var g=We(ya),u=We(Me);if(~g&&~u&&g!==u){var m,y;for(u>g?(y=g,m=u):(y=u,m=g+1);y1){var v=He(Me),b=We(Me,":not(."+this.options.selectedClass+")");if(!Ea&&p.animation&&(Me.thisAnimationDuration=null),f.captureAnimationState(),!Ea&&(p.animation&&(Me.fromRect=v,he.forEach(function(x){if(x.thisAnimationDuration=null,x!==Me){var T=vt?He(x):v;x.fromRect=T,f.addAnimationState({target:x,rect:T})}})),gr(),he.forEach(function(x){h[b]?i.insertBefore(x,h[b]):i.appendChild(x),b++}),c===We(Me))){var N=!1;he.forEach(function(x){if(x.sortableIndex!==We(x)){N=!0;return}}),N&&l("update")}he.forEach(function(x){Bs(x)}),f.animateAll()}Ht=f}(s===i||d&&d.lastPutMode!=="clone")&&_t.forEach(function(x){x.parentNode&&x.parentNode.removeChild(x)})}},nullingGlobal:function(){this.isMultiDrag=So=!1,_t.length=0},destroyGlobal:function(){this._deselectMultiDrag(),be(document,"pointerup",this._deselectMultiDrag),be(document,"mouseup",this._deselectMultiDrag),be(document,"touchend",this._deselectMultiDrag),be(document,"keydown",this._checkKeyDown),be(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(o){if(!(typeof So<"u"&&So)&&Ht===this.sortable&&!(o&&Ft(o.target,this.options.draggable,this.sortable.el,!1))&&!(o&&o.button!==0))for(;he.length;){var a=he[0];Ge(a,this.options.selectedClass,!1),he.shift(),fa({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:a,originalEvt:o})}},_checkKeyDown:function(o){o.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(o){o.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},kt(e,{pluginName:"multiDrag",utils:{select:function(o){var a=o.parentNode[ut];!a||!a.options.multiDrag||~he.indexOf(o)||(Ht&&Ht!==a&&(Ht.multiDrag._deselectMultiDrag(),Ht=a),Ge(o,a.options.selectedClass,!0),he.push(o))},deselect:function(o){var a=o.parentNode[ut],s=he.indexOf(o);!a||!a.options.multiDrag||!~s||(Ge(o,a.options.selectedClass,!1),he.splice(s,1))}},eventProperties:function(){var o=this,a=[],s=[];return he.forEach(function(i){a.push({multiDragElement:i,index:i.sortableIndex});var r;vt&&i!==Me?r=-1:vt?r=We(i,":not(."+o.options.selectedClass+")"):r=We(i),s.push({multiDragElement:i,index:r})}),{items:cb(he),clones:[].concat(_t),oldIndicies:a,newIndicies:s}},optionListeners:{multiDragKey:function(o){return o=o.toLowerCase(),o==="ctrl"?o="Control":o.length>1&&(o=o.charAt(0).toUpperCase()+o.substr(1)),o}}})}function Hb(e,t){he.forEach(function(o,a){var s=t.children[o.sortableIndex+(e?Number(a):0)];s?t.insertBefore(o,s):t.appendChild(o)})}function qc(e,t){_t.forEach(function(o,a){var s=t.children[o.sortableIndex+(e?Number(a):0)];s?t.insertBefore(o,s):t.appendChild(o)})}function gr(){he.forEach(function(e){e!==Me&&e.parentNode&&e.parentNode.removeChild(e)})}ue.mount(new Mb),ue.mount(Ys,Ks);const Vb=qu(Object.freeze(Object.defineProperty({__proto__:null,MultiDrag:Ub,Sortable:ue,Swap:Lb,default:ue},Symbol.toStringTag,{value:"Module"})));(function(e,t){(function(a,s){e.exports=s(n,Vb)})(typeof self<"u"?self:ho,function(o,a){return function(s){var i={};function r(l){if(i[l])return i[l].exports;var c=i[l]={i:l,l:!1,exports:{}};return s[l].call(c.exports,c,c.exports,r),c.l=!0,c.exports}return r.m=s,r.c=i,r.d=function(l,c,d){r.o(l,c)||Object.defineProperty(l,c,{enumerable:!0,get:d})},r.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})},r.t=function(l,c){if(c&1&&(l=r(l)),c&8||c&4&&typeof l=="object"&&l&&l.__esModule)return l;var d=Object.create(null);if(r.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:l}),c&2&&typeof l!="string")for(var f in l)r.d(d,f,function(p){return l[p]}.bind(null,f));return d},r.n=function(l){var c=l&&l.__esModule?function(){return l.default}:function(){return l};return r.d(c,"a",c),c},r.o=function(l,c){return Object.prototype.hasOwnProperty.call(l,c)},r.p="",r(r.s="fb15")}({"00ee":function(s,i,r){var l=r("b622"),c=l("toStringTag"),d={};d[c]="z",s.exports=String(d)==="[object z]"},"0366":function(s,i,r){var l=r("1c0b");s.exports=function(c,d,f){if(l(c),d===void 0)return c;switch(f){case 0:return function(){return c.call(d)};case 1:return function(p){return c.call(d,p)};case 2:return function(p,h){return c.call(d,p,h)};case 3:return function(p,h,g){return c.call(d,p,h,g)}}return function(){return c.apply(d,arguments)}}},"057f":function(s,i,r){var l=r("fc6a"),c=r("241c").f,d={}.toString,f=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],p=function(h){try{return c(h)}catch{return f.slice()}};s.exports.f=function(g){return f&&d.call(g)=="[object Window]"?p(g):c(l(g))}},"06cf":function(s,i,r){var l=r("83ab"),c=r("d1e7"),d=r("5c6c"),f=r("fc6a"),p=r("c04e"),h=r("5135"),g=r("0cfb"),u=Object.getOwnPropertyDescriptor;i.f=l?u:function(y,v){if(y=f(y),v=p(v,!0),g)try{return u(y,v)}catch{}if(h(y,v))return d(!c.f.call(y,v),y[v])}},"0cfb":function(s,i,r){var l=r("83ab"),c=r("d039"),d=r("cc12");s.exports=!l&&!c(function(){return Object.defineProperty(d("div"),"a",{get:function(){return 7}}).a!=7})},"13d5":function(s,i,r){var l=r("23e7"),c=r("d58f").left,d=r("a640"),f=r("ae40"),p=d("reduce"),h=f("reduce",{1:0});l({target:"Array",proto:!0,forced:!p||!h},{reduce:function(u){return c(this,u,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"14c3":function(s,i,r){var l=r("c6b6"),c=r("9263");s.exports=function(d,f){var p=d.exec;if(typeof p=="function"){var h=p.call(d,f);if(typeof h!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return h}if(l(d)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return c.call(d,f)}},"159b":function(s,i,r){var l=r("da84"),c=r("fdbc"),d=r("17c2"),f=r("9112");for(var p in c){var h=l[p],g=h&&h.prototype;if(g&&g.forEach!==d)try{f(g,"forEach",d)}catch{g.forEach=d}}},"17c2":function(s,i,r){var l=r("b727").forEach,c=r("a640"),d=r("ae40"),f=c("forEach"),p=d("forEach");s.exports=!f||!p?function(g){return l(this,g,arguments.length>1?arguments[1]:void 0)}:[].forEach},"1be4":function(s,i,r){var l=r("d066");s.exports=l("document","documentElement")},"1c0b":function(s,i){s.exports=function(r){if(typeof r!="function")throw TypeError(String(r)+" is not a function");return r}},"1c7e":function(s,i,r){var l=r("b622"),c=l("iterator"),d=!1;try{var f=0,p={next:function(){return{done:!!f++}},return:function(){d=!0}};p[c]=function(){return this},Array.from(p,function(){throw 2})}catch{}s.exports=function(h,g){if(!g&&!d)return!1;var u=!1;try{var m={};m[c]=function(){return{next:function(){return{done:u=!0}}}},h(m)}catch{}return u}},"1d80":function(s,i){s.exports=function(r){if(r==null)throw TypeError("Can't call method on "+r);return r}},"1dde":function(s,i,r){var l=r("d039"),c=r("b622"),d=r("2d00"),f=c("species");s.exports=function(p){return d>=51||!l(function(){var h=[],g=h.constructor={};return g[f]=function(){return{foo:1}},h[p](Boolean).foo!==1})}},"23cb":function(s,i,r){var l=r("a691"),c=Math.max,d=Math.min;s.exports=function(f,p){var h=l(f);return h<0?c(h+p,0):d(h,p)}},"23e7":function(s,i,r){var l=r("da84"),c=r("06cf").f,d=r("9112"),f=r("6eeb"),p=r("ce4e"),h=r("e893"),g=r("94ca");s.exports=function(u,m){var y=u.target,v=u.global,b=u.stat,N,x,T,O,B,I;if(v?x=l:b?x=l[y]||p(y,{}):x=(l[y]||{}).prototype,x)for(T in m){if(B=m[T],u.noTargetGet?(I=c(x,T),O=I&&I.value):O=x[T],N=g(v?T:y+(b?".":"#")+T,u.forced),!N&&O!==void 0){if(typeof B==typeof O)continue;h(B,O)}(u.sham||O&&O.sham)&&d(B,"sham",!0),f(x,T,B,u)}}},"241c":function(s,i,r){var l=r("ca84"),c=r("7839"),d=c.concat("length","prototype");i.f=Object.getOwnPropertyNames||function(p){return l(p,d)}},"25f0":function(s,i,r){var l=r("6eeb"),c=r("825a"),d=r("d039"),f=r("ad6d"),p="toString",h=RegExp.prototype,g=h[p],u=d(function(){return g.call({source:"a",flags:"b"})!="/a/b"}),m=g.name!=p;(u||m)&&l(RegExp.prototype,p,function(){var v=c(this),b=String(v.source),N=v.flags,x=String(N===void 0&&v instanceof RegExp&&!("flags"in h)?f.call(v):N);return"/"+b+"/"+x},{unsafe:!0})},"2ca0":function(s,i,r){var l=r("23e7"),c=r("06cf").f,d=r("50c4"),f=r("5a34"),p=r("1d80"),h=r("ab13"),g=r("c430"),u="".startsWith,m=Math.min,y=h("startsWith"),v=!g&&!y&&!!function(){var b=c(String.prototype,"startsWith");return b&&!b.writable}();l({target:"String",proto:!0,forced:!v&&!y},{startsWith:function(N){var x=String(p(this));f(N);var T=d(m(arguments.length>1?arguments[1]:void 0,x.length)),O=String(N);return u?u.call(x,O,T):x.slice(T,T+O.length)===O}})},"2d00":function(s,i,r){var l=r("da84"),c=r("342f"),d=l.process,f=d&&d.versions,p=f&&f.v8,h,g;p?(h=p.split("."),g=h[0]+h[1]):c&&(h=c.match(/Edge\/(\d+)/),(!h||h[1]>=74)&&(h=c.match(/Chrome\/(\d+)/),h&&(g=h[1]))),s.exports=g&&+g},"342f":function(s,i,r){var l=r("d066");s.exports=l("navigator","userAgent")||""},"35a1":function(s,i,r){var l=r("f5df"),c=r("3f8c"),d=r("b622"),f=d("iterator");s.exports=function(p){if(p!=null)return p[f]||p["@@iterator"]||c[l(p)]}},"37e8":function(s,i,r){var l=r("83ab"),c=r("9bf2"),d=r("825a"),f=r("df75");s.exports=l?Object.defineProperties:function(h,g){d(h);for(var u=f(g),m=u.length,y=0,v;m>y;)c.f(h,v=u[y++],g[v]);return h}},"3bbe":function(s,i,r){var l=r("861d");s.exports=function(c){if(!l(c)&&c!==null)throw TypeError("Can't set "+String(c)+" as a prototype");return c}},"3ca3":function(s,i,r){var l=r("6547").charAt,c=r("69f3"),d=r("7dd0"),f="String Iterator",p=c.set,h=c.getterFor(f);d(String,"String",function(g){p(this,{type:f,string:String(g),index:0})},function(){var u=h(this),m=u.string,y=u.index,v;return y>=m.length?{value:void 0,done:!0}:(v=l(m,y),u.index+=v.length,{value:v,done:!1})})},"3f8c":function(s,i){s.exports={}},4160:function(s,i,r){var l=r("23e7"),c=r("17c2");l({target:"Array",proto:!0,forced:[].forEach!=c},{forEach:c})},"428f":function(s,i,r){var l=r("da84");s.exports=l},"44ad":function(s,i,r){var l=r("d039"),c=r("c6b6"),d="".split;s.exports=l(function(){return!Object("z").propertyIsEnumerable(0)})?function(f){return c(f)=="String"?d.call(f,""):Object(f)}:Object},"44d2":function(s,i,r){var l=r("b622"),c=r("7c73"),d=r("9bf2"),f=l("unscopables"),p=Array.prototype;p[f]==null&&d.f(p,f,{configurable:!0,value:c(null)}),s.exports=function(h){p[f][h]=!0}},"44e7":function(s,i,r){var l=r("861d"),c=r("c6b6"),d=r("b622"),f=d("match");s.exports=function(p){var h;return l(p)&&((h=p[f])!==void 0?!!h:c(p)=="RegExp")}},4930:function(s,i,r){var l=r("d039");s.exports=!!Object.getOwnPropertySymbols&&!l(function(){return!String(Symbol())})},"4d64":function(s,i,r){var l=r("fc6a"),c=r("50c4"),d=r("23cb"),f=function(p){return function(h,g,u){var m=l(h),y=c(m.length),v=d(u,y),b;if(p&&g!=g){for(;y>v;)if(b=m[v++],b!=b)return!0}else for(;y>v;v++)if((p||v in m)&&m[v]===g)return p||v||0;return!p&&-1}};s.exports={includes:f(!0),indexOf:f(!1)}},"4de4":function(s,i,r){var l=r("23e7"),c=r("b727").filter,d=r("1dde"),f=r("ae40"),p=d("filter"),h=f("filter");l({target:"Array",proto:!0,forced:!p||!h},{filter:function(u){return c(this,u,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(s,i,r){var l=r("0366"),c=r("7b0b"),d=r("9bdd"),f=r("e95a"),p=r("50c4"),h=r("8418"),g=r("35a1");s.exports=function(m){var y=c(m),v=typeof this=="function"?this:Array,b=arguments.length,N=b>1?arguments[1]:void 0,x=N!==void 0,T=g(y),O=0,B,I,D,C,F,K;if(x&&(N=l(N,b>2?arguments[2]:void 0,2)),T!=null&&!(v==Array&&f(T)))for(C=T.call(y),F=C.next,I=new v;!(D=F.call(C)).done;O++)K=x?d(C,N,[D.value,O],!0):D.value,h(I,O,K);else for(B=p(y.length),I=new v(B);B>O;O++)K=x?N(y[O],O):y[O],h(I,O,K);return I.length=O,I}},"4fad":function(s,i,r){var l=r("23e7"),c=r("6f53").entries;l({target:"Object",stat:!0},{entries:function(f){return c(f)}})},"50c4":function(s,i,r){var l=r("a691"),c=Math.min;s.exports=function(d){return d>0?c(l(d),9007199254740991):0}},5135:function(s,i){var r={}.hasOwnProperty;s.exports=function(l,c){return r.call(l,c)}},5319:function(s,i,r){var l=r("d784"),c=r("825a"),d=r("7b0b"),f=r("50c4"),p=r("a691"),h=r("1d80"),g=r("8aa5"),u=r("14c3"),m=Math.max,y=Math.min,v=Math.floor,b=/\$([$&'`]|\d\d?|<[^>]*>)/g,N=/\$([$&'`]|\d\d?)/g,x=function(T){return T===void 0?T:String(T)};l("replace",2,function(T,O,B,I){var D=I.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,C=I.REPLACE_KEEPS_$0,F=D?"$":"$0";return[function(U,j){var W=h(this),q=U?.[T];return q!==void 0?q.call(U,W,j):O.call(String(W),U,j)},function(P,U){if(!D&&C||typeof U=="string"&&U.indexOf(F)===-1){var j=B(O,P,this,U);if(j.done)return j.value}var W=c(P),q=String(this),ne=typeof U=="function";ne||(U=String(U));var _e=W.global;if(_e){var Ye=W.unicode;W.lastIndex=0}for(var ie=[];;){var fe=u(W,q);if(fe===null||(ie.push(fe),!_e))break;var ye=String(fe[0]);ye===""&&(W.lastIndex=g(q,f(W.lastIndex),Ye))}for(var Te="",Be=0,Re=0;Re=Be&&(Te+=q.slice(Be,dt)+tt,Be=dt+Fe.length)}return Te+q.slice(Be)}];function K(P,U,j,W,q,ne){var _e=j+P.length,Ye=W.length,ie=N;return q!==void 0&&(q=d(q),ie=b),O.call(ne,ie,function(fe,ye){var Te;switch(ye.charAt(0)){case"$":return"$";case"&":return P;case"`":return U.slice(0,j);case"'":return U.slice(_e);case"<":Te=q[ye.slice(1,-1)];break;default:var Be=+ye;if(Be===0)return fe;if(Be>Ye){var Re=v(Be/10);return Re===0?fe:Re<=Ye?W[Re-1]===void 0?ye.charAt(1):W[Re-1]+ye.charAt(1):fe}Te=W[Be-1]}return Te===void 0?"":Te})}})},5692:function(s,i,r){var l=r("c430"),c=r("c6cd");(s.exports=function(d,f){return c[d]||(c[d]=f!==void 0?f:{})})("versions",[]).push({version:"3.6.5",mode:l?"pure":"global",copyright:"ยฉ 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(s,i,r){var l=r("d066"),c=r("241c"),d=r("7418"),f=r("825a");s.exports=l("Reflect","ownKeys")||function(h){var g=c.f(f(h)),u=d.f;return u?g.concat(u(h)):g}},"5a34":function(s,i,r){var l=r("44e7");s.exports=function(c){if(l(c))throw TypeError("The method doesn't accept regular expressions");return c}},"5c6c":function(s,i){s.exports=function(r,l){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:l}}},"5db7":function(s,i,r){var l=r("23e7"),c=r("a2bf"),d=r("7b0b"),f=r("50c4"),p=r("1c0b"),h=r("65f0");l({target:"Array",proto:!0},{flatMap:function(u){var m=d(this),y=f(m.length),v;return p(u),v=h(m,0),v.length=c(v,m,m,y,0,1,u,arguments.length>1?arguments[1]:void 0),v}})},6547:function(s,i,r){var l=r("a691"),c=r("1d80"),d=function(f){return function(p,h){var g=String(c(p)),u=l(h),m=g.length,y,v;return u<0||u>=m?f?"":void 0:(y=g.charCodeAt(u),y<55296||y>56319||u+1===m||(v=g.charCodeAt(u+1))<56320||v>57343?f?g.charAt(u):y:f?g.slice(u,u+2):(y-55296<<10)+(v-56320)+65536)}};s.exports={codeAt:d(!1),charAt:d(!0)}},"65f0":function(s,i,r){var l=r("861d"),c=r("e8b5"),d=r("b622"),f=d("species");s.exports=function(p,h){var g;return c(p)&&(g=p.constructor,typeof g=="function"&&(g===Array||c(g.prototype))?g=void 0:l(g)&&(g=g[f],g===null&&(g=void 0))),new(g===void 0?Array:g)(h===0?0:h)}},"69f3":function(s,i,r){var l=r("7f9a"),c=r("da84"),d=r("861d"),f=r("9112"),p=r("5135"),h=r("f772"),g=r("d012"),u=c.WeakMap,m,y,v,b=function(D){return v(D)?y(D):m(D,{})},N=function(D){return function(C){var F;if(!d(C)||(F=y(C)).type!==D)throw TypeError("Incompatible receiver, "+D+" required");return F}};if(l){var x=new u,T=x.get,O=x.has,B=x.set;m=function(D,C){return B.call(x,D,C),C},y=function(D){return T.call(x,D)||{}},v=function(D){return O.call(x,D)}}else{var I=h("state");g[I]=!0,m=function(D,C){return f(D,I,C),C},y=function(D){return p(D,I)?D[I]:{}},v=function(D){return p(D,I)}}s.exports={set:m,get:y,has:v,enforce:b,getterFor:N}},"6eeb":function(s,i,r){var l=r("da84"),c=r("9112"),d=r("5135"),f=r("ce4e"),p=r("8925"),h=r("69f3"),g=h.get,u=h.enforce,m=String(String).split("String");(s.exports=function(y,v,b,N){var x=N?!!N.unsafe:!1,T=N?!!N.enumerable:!1,O=N?!!N.noTargetGet:!1;if(typeof b=="function"&&(typeof v=="string"&&!d(b,"name")&&c(b,"name",v),u(b).source=m.join(typeof v=="string"?v:"")),y===l){T?y[v]=b:f(v,b);return}else x?!O&&y[v]&&(T=!0):delete y[v];T?y[v]=b:c(y,v,b)})(Function.prototype,"toString",function(){return typeof this=="function"&&g(this).source||p(this)})},"6f53":function(s,i,r){var l=r("83ab"),c=r("df75"),d=r("fc6a"),f=r("d1e7").f,p=function(h){return function(g){for(var u=d(g),m=c(u),y=m.length,v=0,b=[],N;y>v;)N=m[v++],(!l||f.call(u,N))&&b.push(h?[N,u[N]]:u[N]);return b}};s.exports={entries:p(!0),values:p(!1)}},"73d9":function(s,i,r){var l=r("44d2");l("flatMap")},7418:function(s,i){i.f=Object.getOwnPropertySymbols},"746f":function(s,i,r){var l=r("428f"),c=r("5135"),d=r("e538"),f=r("9bf2").f;s.exports=function(p){var h=l.Symbol||(l.Symbol={});c(h,p)||f(h,p,{value:d.f(p)})}},7839:function(s,i){s.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(s,i,r){var l=r("1d80");s.exports=function(c){return Object(l(c))}},"7c73":function(s,i,r){var l=r("825a"),c=r("37e8"),d=r("7839"),f=r("d012"),p=r("1be4"),h=r("cc12"),g=r("f772"),u=">",m="<",y="prototype",v="script",b=g("IE_PROTO"),N=function(){},x=function(D){return m+v+u+D+m+"/"+v+u},T=function(D){D.write(x("")),D.close();var C=D.parentWindow.Object;return D=null,C},O=function(){var D=h("iframe"),C="java"+v+":",F;return D.style.display="none",p.appendChild(D),D.src=String(C),F=D.contentWindow.document,F.open(),F.write(x("document.F=Object")),F.close(),F.F},B,I=function(){try{B=document.domain&&new ActiveXObject("htmlfile")}catch{}I=B?T(B):O();for(var D=d.length;D--;)delete I[y][d[D]];return I()};f[b]=!0,s.exports=Object.create||function(C,F){var K;return C!==null?(N[y]=l(C),K=new N,N[y]=null,K[b]=C):K=I(),F===void 0?K:c(K,F)}},"7dd0":function(s,i,r){var l=r("23e7"),c=r("9ed3"),d=r("e163"),f=r("d2bb"),p=r("d44e"),h=r("9112"),g=r("6eeb"),u=r("b622"),m=r("c430"),y=r("3f8c"),v=r("ae93"),b=v.IteratorPrototype,N=v.BUGGY_SAFARI_ITERATORS,x=u("iterator"),T="keys",O="values",B="entries",I=function(){return this};s.exports=function(D,C,F,K,P,U,j){c(F,C,K);var W=function(Re){if(Re===P&&ie)return ie;if(!N&&Re in _e)return _e[Re];switch(Re){case T:return function(){return new F(this,Re)};case O:return function(){return new F(this,Re)};case B:return function(){return new F(this,Re)}}return function(){return new F(this)}},q=C+" Iterator",ne=!1,_e=D.prototype,Ye=_e[x]||_e["@@iterator"]||P&&_e[P],ie=!N&&Ye||W(P),fe=C=="Array"&&_e.entries||Ye,ye,Te,Be;if(fe&&(ye=d(fe.call(new D)),b!==Object.prototype&&ye.next&&(!m&&d(ye)!==b&&(f?f(ye,b):typeof ye[x]!="function"&&h(ye,x,I)),p(ye,q,!0,!0),m&&(y[q]=I))),P==O&&Ye&&Ye.name!==O&&(ne=!0,ie=function(){return Ye.call(this)}),(!m||j)&&_e[x]!==ie&&h(_e,x,ie),y[C]=ie,P)if(Te={values:W(O),keys:U?ie:W(T),entries:W(B)},j)for(Be in Te)(N||ne||!(Be in _e))&&g(_e,Be,Te[Be]);else l({target:C,proto:!0,forced:N||ne},Te);return Te}},"7f9a":function(s,i,r){var l=r("da84"),c=r("8925"),d=l.WeakMap;s.exports=typeof d=="function"&&/native code/.test(c(d))},"825a":function(s,i,r){var l=r("861d");s.exports=function(c){if(!l(c))throw TypeError(String(c)+" is not an object");return c}},"83ab":function(s,i,r){var l=r("d039");s.exports=!l(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},8418:function(s,i,r){var l=r("c04e"),c=r("9bf2"),d=r("5c6c");s.exports=function(f,p,h){var g=l(p);g in f?c.f(f,g,d(0,h)):f[g]=h}},"861d":function(s,i){s.exports=function(r){return typeof r=="object"?r!==null:typeof r=="function"}},8875:function(s,i,r){var l,c,d;(function(f,p){c=[],l=p,d=typeof l=="function"?l.apply(i,c):l,d!==void 0&&(s.exports=d)})(typeof self<"u"?self:this,function(){function f(){var p=Object.getOwnPropertyDescriptor(document,"currentScript");if(!p&&"currentScript"in document&&document.currentScript||p&&p.get!==f&&document.currentScript)return document.currentScript;try{throw new Error}catch(B){var h=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,g=/@([^@]*):(\d+):(\d+)\s*$/ig,u=h.exec(B.stack)||g.exec(B.stack),m=u&&u[1]||!1,y=u&&u[2]||!1,v=document.location.href.replace(document.location.hash,""),b,N,x,T=document.getElementsByTagName("script");m===v&&(b=document.documentElement.outerHTML,N=new RegExp("(?:[^\\n]+?\\n){0,"+(y-2)+"}[^<]*