vuefinder 2.5.7 → 2.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";var fr=Object.defineProperty;var pr=(n,t,o)=>t in n?fr(n,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[t]=o;var Fn=(n,t,o)=>pr(n,typeof t!="symbol"?t+"":t,o);const e=require("vue"),hr=require("mitt"),vr=require("dragselect"),gr=require("@uppy/core"),kr=require("@uppy/xhr-upload"),yr=require("vanilla-lazyload");require("cropperjs/dist/cropper.css");const xr=require("cropperjs");var ao;const qt=(ao=document.querySelector('meta[name="csrf-token"]'))==null?void 0:ao.getAttribute("content");class _r{constructor(t){Fn(this,"config");this.config=t}get config(){return this.config}transformRequestParams(t){const o=this.config,s={};qt!=null&&qt!==""&&(s[o.xsrfHeaderName]=qt);const r=Object.assign({},o.headers,s,t.headers),c=Object.assign({},o.params,t.params),a=t.body,i=o.baseUrl+t.url,l=t.method;let d;l!=="get"&&(a instanceof FormData?(d=a,o.body!=null&&Object.entries(this.config.body).forEach(([u,p])=>{d.append(u,p)})):(d={...a},o.body!=null&&Object.assign(d,this.config.body)));const m={url:i,method:l,headers:r,params:c,body:d};if(o.transformRequest!=null){const u=o.transformRequest({url:i,method:l,headers:r,params:c,body:d});u.url!=null&&(m.url=u.url),u.method!=null&&(m.method=u.method),u.params!=null&&(m.params=u.params??{}),u.headers!=null&&(m.headers=u.headers??{}),u.body!=null&&(m.body=u.body)}return m}getDownloadUrl(t,o){if(o.url!=null)return o.url;const s=this.transformRequestParams({url:"",method:"get",params:{q:"download",adapter:t,path:o.path}});return s.url+"?"+new URLSearchParams(s.params).toString()}getPreviewUrl(t,o){if(o.url!=null)return o.url;const s=this.transformRequestParams({url:"",method:"get",params:{q:"preview",adapter:t,path:o.path}});return s.url+"?"+new URLSearchParams(s.params).toString()}async send(t){const o=this.transformRequestParams(t),s=t.responseType||"json",r={method:t.method,headers:o.headers,signal:t.abortSignal},c=o.url+"?"+new URLSearchParams(o.params);if(o.method!=="get"&&o.body!=null){let i;o.body instanceof FormData?i=t.body:(i=JSON.stringify(o.body),r.headers["Content-Type"]="application/json"),r.body=i}const a=await fetch(c,r);if(a.ok)return await a[s]();throw await a.json()}}function wr(n){const t={baseUrl:"",headers:{},params:{},body:{},xsrfHeaderName:"X-CSRF-Token"};return typeof n=="string"?Object.assign(t,{baseUrl:n}):Object.assign(t,n),new _r(t)}function br(n){let t=localStorage.getItem(n+"_storage");const o=e.reactive(JSON.parse(t??"{}"));e.watch(o,s);function s(){Object.keys(o).length?localStorage.setItem(n+"_storage",JSON.stringify(o)):localStorage.removeItem(n+"_storage")}function r(l,d){o[l]=d}function c(l){delete o[l]}function a(){Object.keys(o).map(l=>c(l))}return{getStore:(l,d=null)=>o.hasOwnProperty(l)?o[l]:d,setStore:r,removeStore:c,clearStore:a}}async function Er(n,t){const o=t[n];return typeof o=="function"?(await o()).default:o}function Vr(n,t,o,s){const{getStore:r,setStore:c}=n,a=e.ref({}),i=e.ref(r("locale",t)),l=(u,p=t)=>{Er(u,s).then(f=>{a.value=f,c("locale",u),i.value=u,c("translations",f),Object.values(s).length>1&&(o.emit("vf-toast-push",{label:"The language is set to "+u}),o.emit("vf-language-saved"))}).catch(f=>{p?(o.emit("vf-toast-push",{label:"The selected locale is not yet supported!",type:"error"}),l(p,null)):o.emit("vf-toast-push",{label:"Locale cannot be loaded!",type:"error"})})};!r("locale")&&!s.length?l(t):a.value=r("translations");const d=(u,...p)=>p.length?d(u=u.replace("%s",p.shift()),...p):u;function m(u,...p){return a.value&&a.value.hasOwnProperty(u)?d(a.value[u],...p):d(u,...p)}return{t:m,changeLocale:l,locale:i}}const ne={EDIT:"edit",NEW_FILE:"newfile",NEW_FOLDER:"newfolder",PREVIEW:"preview",ARCHIVE:"archive",UNARCHIVE:"unarchive",SEARCH:"search",RENAME:"rename",UPLOAD:"upload",DELETE:"delete",FULL_SCREEN:"fullscreen",DOWNLOAD:"download",LANGUAGE:"language"},Nr=Object.values(ne),Sr="2.5.7";function co(n,t,o,s,r){return(t=Math,o=t.log,s=1024,r=o(n)/o(s)|0,n/t.pow(s,r)).toFixed(0)+" "+(r?"KMGTPEZY"[--r]+"iB":"B")}function io(n,t,o,s,r){return(t=Math,o=t.log,s=1e3,r=o(n)/o(s)|0,n/t.pow(s,r)).toFixed(0)+" "+(r?"KMGTPEZY"[--r]+"B":"B")}function $r(n){const t={k:1,m:2,g:3,t:4},s=/(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(n);return s[1]*Math.pow(1024,t[s[2].toLowerCase()])}const Fe={SYSTEM:"system",LIGHT:"light",DARK:"dark"};function Br(n,t){const o=e.ref(Fe.SYSTEM),s=e.ref(Fe.LIGHT);o.value=n.getStore("theme",t??Fe.SYSTEM);const r=window.matchMedia("(prefers-color-scheme: dark)"),c=a=>{o.value===Fe.DARK||o.value===Fe.SYSTEM&&a.matches?s.value=Fe.DARK:s.value=Fe.LIGHT};return c(r),r.addEventListener("change",c),{value:o,actualValue:s,set(a){o.value=a,a!==Fe.SYSTEM?n.setStore("theme",a):n.removeStore("theme"),c(r)}}}function Cr(){const n=e.shallowRef(null),t=e.ref(!1),o=e.ref();return{visible:t,type:n,data:o,open:(c,a=null)=>{document.querySelector("body").style.overflow="hidden",t.value=!0,n.value=c,o.value=a},close:()=>{document.querySelector("body").style.overflow="",t.value=!1,n.value=null}}}/*!
1
+ "use strict";var fr=Object.defineProperty;var pr=(n,t,o)=>t in n?fr(n,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[t]=o;var Fn=(n,t,o)=>pr(n,typeof t!="symbol"?t+"":t,o);const e=require("vue"),hr=require("mitt"),vr=require("dragselect"),gr=require("@uppy/core"),kr=require("@uppy/xhr-upload"),yr=require("vanilla-lazyload");require("cropperjs/dist/cropper.css");const xr=require("cropperjs");var ao;const qt=(ao=document.querySelector('meta[name="csrf-token"]'))==null?void 0:ao.getAttribute("content");class _r{constructor(t){Fn(this,"config");this.config=t}get config(){return this.config}transformRequestParams(t){const o=this.config,s={};qt!=null&&qt!==""&&(s[o.xsrfHeaderName]=qt);const r=Object.assign({},o.headers,s,t.headers),c=Object.assign({},o.params,t.params),a=t.body,i=o.baseUrl+t.url,l=t.method;let d;l!=="get"&&(a instanceof FormData?(d=a,o.body!=null&&Object.entries(this.config.body).forEach(([u,p])=>{d.append(u,p)})):(d={...a},o.body!=null&&Object.assign(d,this.config.body)));const f={url:i,method:l,headers:r,params:c,body:d};if(o.transformRequest!=null){const u=o.transformRequest({url:i,method:l,headers:r,params:c,body:d});u.url!=null&&(f.url=u.url),u.method!=null&&(f.method=u.method),u.params!=null&&(f.params=u.params??{}),u.headers!=null&&(f.headers=u.headers??{}),u.body!=null&&(f.body=u.body)}return f}getDownloadUrl(t,o){if(o.url!=null)return o.url;const s=this.transformRequestParams({url:"",method:"get",params:{q:"download",adapter:t,path:o.path}});return s.url+"?"+new URLSearchParams(s.params).toString()}getPreviewUrl(t,o){if(o.url!=null)return o.url;const s=this.transformRequestParams({url:"",method:"get",params:{q:"preview",adapter:t,path:o.path}});return s.url+"?"+new URLSearchParams(s.params).toString()}async send(t){const o=this.transformRequestParams(t),s=t.responseType||"json",r={method:t.method,headers:o.headers,signal:t.abortSignal},c=o.url+"?"+new URLSearchParams(o.params);if(o.method!=="get"&&o.body!=null){let i;o.body instanceof FormData?i=t.body:(i=JSON.stringify(o.body),r.headers["Content-Type"]="application/json"),r.body=i}const a=await fetch(c,r);if(a.ok)return await a[s]();throw await a.json()}}function wr(n){const t={baseUrl:"",headers:{},params:{},body:{},xsrfHeaderName:"X-CSRF-Token"};return typeof n=="string"?Object.assign(t,{baseUrl:n}):Object.assign(t,n),new _r(t)}function br(n){let t=localStorage.getItem(n+"_storage");const o=e.reactive(JSON.parse(t??"{}"));e.watch(o,s);function s(){Object.keys(o).length?localStorage.setItem(n+"_storage",JSON.stringify(o)):localStorage.removeItem(n+"_storage")}function r(l,d){o[l]=d}function c(l){delete o[l]}function a(){Object.keys(o).map(l=>c(l))}return{getStore:(l,d=null)=>o.hasOwnProperty(l)?o[l]:d,setStore:r,removeStore:c,clearStore:a}}async function Er(n,t){const o=t[n];return typeof o=="function"?(await o()).default:o}function Vr(n,t,o,s){const{getStore:r,setStore:c}=n,a=e.ref({}),i=e.ref(r("locale",t)),l=(u,p=t)=>{Er(u,s).then(m=>{a.value=m,c("locale",u),i.value=u,c("translations",m),Object.values(s).length>1&&(o.emit("vf-toast-push",{label:"The language is set to "+u}),o.emit("vf-language-saved"))}).catch(m=>{p?(o.emit("vf-toast-push",{label:"The selected locale is not yet supported!",type:"error"}),l(p,null)):o.emit("vf-toast-push",{label:"Locale cannot be loaded!",type:"error"})})};!r("locale")&&!s.length?l(t):a.value=r("translations");const d=(u,...p)=>p.length?d(u=u.replace("%s",p.shift()),...p):u;function f(u,...p){return a.value&&a.value.hasOwnProperty(u)?d(a.value[u],...p):d(u,...p)}return{t:f,changeLocale:l,locale:i}}const ne={EDIT:"edit",NEW_FILE:"newfile",NEW_FOLDER:"newfolder",PREVIEW:"preview",ARCHIVE:"archive",UNARCHIVE:"unarchive",SEARCH:"search",RENAME:"rename",UPLOAD:"upload",DELETE:"delete",FULL_SCREEN:"fullscreen",DOWNLOAD:"download",LANGUAGE:"language"},Nr=Object.values(ne),Sr="2.5.8";function co(n,t,o,s,r){return(t=Math,o=t.log,s=1024,r=o(n)/o(s)|0,n/t.pow(s,r)).toFixed(0)+" "+(r?"KMGTPEZY"[--r]+"iB":"B")}function io(n,t,o,s,r){return(t=Math,o=t.log,s=1e3,r=o(n)/o(s)|0,n/t.pow(s,r)).toFixed(0)+" "+(r?"KMGTPEZY"[--r]+"B":"B")}function $r(n){const t={k:1,m:2,g:3,t:4},s=/(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(n);return s[1]*Math.pow(1024,t[s[2].toLowerCase()])}const Fe={SYSTEM:"system",LIGHT:"light",DARK:"dark"};function Br(n,t){const o=e.ref(Fe.SYSTEM),s=e.ref(Fe.LIGHT);o.value=n.getStore("theme",t??Fe.SYSTEM);const r=window.matchMedia("(prefers-color-scheme: dark)"),c=a=>{o.value===Fe.DARK||o.value===Fe.SYSTEM&&a.matches?s.value=Fe.DARK:s.value=Fe.LIGHT};return c(r),r.addEventListener("change",c),{value:o,actualValue:s,set(a){o.value=a,a!==Fe.SYSTEM?n.setStore("theme",a):n.removeStore("theme"),c(r)}}}function Cr(){const n=e.shallowRef(null),t=e.ref(!1),o=e.ref();return{visible:t,type:n,data:o,open:(c,a=null)=>{document.querySelector("body").style.overflow="hidden",t.value=!0,n.value=c,o.value=a},close:()=>{document.querySelector("body").style.overflow="",t.value=!1,n.value=null}}}/*!
2
2
  * OverlayScrollbars
3
3
  * Version: 2.8.3
4
4
  *
@@ -6,4 +6,4 @@
6
6
  * https://github.com/KingSora
7
7
  *
8
8
  * Released under the MIT license.
9
- */const ge=(n,t)=>{const{o,i:s,u:r}=n;let c=o,a;const i=(m,u)=>{const p=c,f=m,h=u||(s?!s(p,f):p!==f);return(h||r)&&(c=f,a=p),[c,h,a]};return[t?m=>i(t(c,a),m):i,m=>[c,!!m,a]]},uo=typeof window<"u"&&typeof document<"u",pe=uo?window:{},mo=Math.max,Dr=Math.min,Qt=Math.round,Vt=Math.abs,Hn=Math.sign,fo=pe.cancelAnimationFrame,kn=pe.requestAnimationFrame,Nt=pe.setTimeout,Zt=pe.clearTimeout,Tt=n=>typeof pe[n]<"u"?pe[n]:void 0,Tr=Tt("MutationObserver"),Rn=Tt("IntersectionObserver"),St=Tt("ResizeObserver"),en=Tt("ScrollTimeline"),po=uo&&Node.ELEMENT_NODE,{toString:jf,hasOwnProperty:Gt}=Object.prototype,Mt=n=>n===void 0,yn=n=>n===null,Se=n=>typeof n=="number",At=n=>typeof n=="string",ho=n=>typeof n=="boolean",we=n=>typeof n=="function",$e=n=>Array.isArray(n),ct=n=>typeof n=="object"&&!$e(n)&&!yn(n),Lt=n=>{const t=!!n&&n.length,o=Se(t)&&t>-1&&t%1==0;return $e(n)||!we(n)&&o?t>0&&ct(n)?t-1 in n:!0:!1},$t=n=>{if(!n||!ct(n))return!1;let t;const o="constructor",s=n[o],r=s&&s.prototype,c=Gt.call(n,o),a=r&&Gt.call(r,"isPrototypeOf");if(s&&!c&&!a)return!1;for(t in n);return Mt(t)||Gt.call(n,t)},Bt=n=>{const t=HTMLElement;return n?t?n instanceof t:n.nodeType===po:!1},Ot=n=>{const t=Element;return n?t?n instanceof t:n.nodeType===po:!1};function Q(n,t){if(Lt(n))for(let o=0;o<n.length&&t(n[o],o,n)!==!1;o++);else n&&Q(Object.keys(n),o=>t(n[o],o,n));return n}const xn=(n,t)=>n.indexOf(t)>=0,Ae=(n,t)=>n.concat(t),se=(n,t,o)=>(!At(t)&&Lt(t)?Array.prototype.push.apply(n,t):n.push(t),n),Pe=n=>Array.from(n||[]),vo=n=>$e(n)?n:[n],tn=n=>!!n&&!n.length,zn=n=>Pe(new Set(n)),be=(n,t,o)=>{Q(n,r=>r&&r.apply(void 0,t||[])),!o&&(n.length=0)},go="paddingTop",ko="paddingRight",yo="paddingLeft",xo="paddingBottom",_o="marginLeft",wo="marginRight",bo="marginBottom",Mr="overflowX",Ar="overflowY",Ze="width",et="height",Re="visible",qe="hidden",tt="scroll",Lr=n=>{const t=String(n||"");return t?t[0].toUpperCase()+t.slice(1):""},Ft=(n,t,o,s)=>{if(n&&t){let r=!0;return Q(o,c=>{const a=n[c],i=t[c];a!==i&&(r=!1)}),r}return!1},Eo=(n,t)=>Ft(n,t,["w","h"]),wt=(n,t)=>Ft(n,t,["x","y"]),Or=(n,t)=>Ft(n,t,["t","r","b","l"]),ze=()=>{},U=(n,...t)=>n.bind(0,...t),Ge=n=>{let t;const o=n?Nt:kn,s=n?Zt:fo;return[r=>{s(t),t=o(()=>r(),we(n)?n():n)},()=>s(t)]},nn=(n,t)=>{const{_:o,p:s,v:r,m:c}=t||{};let a,i,l,d,m=ze;const u=function(v){m(),Zt(a),d=a=i=void 0,m=ze,n.apply(this,v)},p=g=>c&&i?c(i,g):g,f=()=>{m!==ze&&u(p(l)||l)},h=function(){const v=Pe(arguments),V=we(o)?o():o;if(Se(V)&&V>=0){const O=we(s)?s():s,D=Se(O)&&O>=0,N=V>0?Nt:kn,S=V>0?Zt:fo,b=p(v)||v,B=u.bind(0,b);let E;m(),r&&!d?(B(),d=!0,E=N(()=>d=void 0,V)):(E=N(B,V),D&&!a&&(a=Nt(f,O))),m=()=>S(E),i=l=b}else u(v)};return h.S=f,h},Vo=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),Le=n=>n?Object.keys(n):[],Y=(n,t,o,s,r,c,a)=>{const i=[t,o,s,r,c,a];return(typeof n!="object"||yn(n))&&!we(n)&&(n={}),Q(i,l=>{Q(l,(d,m)=>{const u=l[m];if(n===u)return!0;const p=$e(u);if(u&&$t(u)){const f=n[m];let h=f;p&&!$e(f)?h=[]:!p&&!$t(f)&&(h={}),n[m]=Y(h,u)}else n[m]=p?u.slice():u})}),n},No=(n,t)=>Q(Y({},n),(o,s,r)=>{o===void 0?delete r[s]:o&&$t(o)&&(r[s]=No(o))}),_n=n=>{for(const t in n)return!1;return!0},on=(n,t,o)=>mo(n,Dr(t,o)),Ke=n=>Pe(new Set(($e(n)?n:(n||"").split(" ")).filter(t=>t))),wn=(n,t)=>n&&n.getAttribute(t),jn=(n,t)=>n&&n.hasAttribute(t),Me=(n,t,o)=>{Q(Ke(t),s=>{n&&n.setAttribute(s,String(o||""))})},Ve=(n,t)=>{Q(Ke(t),o=>n&&n.removeAttribute(o))},Ht=(n,t)=>{const o=Ke(wn(n,t)),s=U(Me,n,t),r=(c,a)=>{const i=new Set(o);return Q(Ke(c),l=>{i[a](l)}),Pe(i).join(" ")};return{O:c=>s(r(c,"delete")),$:c=>s(r(c,"add")),C:c=>{const a=Ke(c);return a.reduce((i,l)=>i&&o.includes(l),a.length>0)}}},So=(n,t,o)=>(Ht(n,t).O(o),U(bn,n,t,o)),bn=(n,t,o)=>(Ht(n,t).$(o),U(So,n,t,o)),rn=(n,t,o,s)=>(s?bn:So)(n,t,o),En=(n,t,o)=>Ht(n,t).C(o),$o=n=>Ht(n,"class"),Bo=(n,t)=>{$o(n).O(t)},Vn=(n,t)=>($o(n).$(t),U(Bo,n,t)),Co=(n,t)=>{const o=[],s=t?Ot(t)&&t:document;return s?se(o,s.querySelectorAll(n)):o},Fr=(n,t)=>{const o=t?Ot(t)&&t:document;return o?o.querySelector(n):null},Ct=(n,t)=>Ot(n)?n.matches(t):!1,Do=n=>Ct(n,"body"),sn=n=>n?Pe(n.childNodes):[],nt=n=>n&&n.parentElement,Je=(n,t)=>Ot(n)&&n.closest(t),ln=n=>document.activeElement,Hr=(n,t,o)=>{const s=Je(n,t),r=n&&Fr(o,s),c=Je(r,t)===s;return s&&r?s===n||r===n||c&&Je(Je(n,o),t)!==s:!1},Ie=n=>{if(Lt(n))Q(Pe(n),t=>Ie(t));else if(n){const t=nt(n);t&&t.removeChild(n)}},To=(n,t,o)=>{if(o&&n){let s=t,r;return Lt(o)?(r=document.createDocumentFragment(),Q(o,c=>{c===s&&(s=c.previousSibling),r.appendChild(c)})):r=o,t&&(s?s!==t&&(s=s.nextSibling):s=n.firstChild),n.insertBefore(r,s||null),()=>Ie(o)}return ze},ke=(n,t)=>To(n,null,t),In=(n,t)=>To(nt(n),n&&n.nextSibling,t),Qe=n=>{const t=document.createElement("div");return Me(t,"class",n),t},Mo=n=>{const t=Qe();return t.innerHTML=n.trim(),Q(sn(t),o=>Ie(o))},Rr=/^--/,Un=(n,t)=>n.getPropertyValue(t)||n[t]||"",Nn=n=>{const t=n||0;return isFinite(t)?t:0},yt=n=>Nn(parseFloat(n||"")),Pn=n=>`${(Nn(n)*100).toFixed(3)}%`,an=n=>`${Nn(n)}px`;function it(n,t){n&&t&&Q(t,(o,s)=>{try{const r=n.style,c=Se(o)?an(o):(o||"")+"";Rr.test(s)?r.setProperty(s,c):r[s]=c}catch{}})}function We(n,t,o){const s=At(t);let r=s?"":{};if(n){const c=pe.getComputedStyle(n,o)||n.style;r=s?Un(c,t):Pe(t).reduce((a,i)=>(a[i]=Un(c,i),a),r)}return r}const qn=(n,t,o)=>{const s=t?`${t}-`:"",r=o?`-${o}`:"",c=`${s}top${r}`,a=`${s}right${r}`,i=`${s}bottom${r}`,l=`${s}left${r}`,d=We(n,[c,a,i,l]);return{t:yt(d[c]),r:yt(d[a]),b:yt(d[i]),l:yt(d[l])}},Kt=(n,t)=>`translate${ct(n)?`(${n.x},${n.y})`:`${t?"X":"Y"}(${n})`}`,zr=n=>!!(n.offsetWidth||n.offsetHeight||n.getClientRects().length),jr={w:0,h:0},Rt=(n,t)=>t?{w:t[`${n}Width`],h:t[`${n}Height`]}:jr,Ir=n=>Rt("inner",n||pe),lt=U(Rt,"offset"),Ao=U(Rt,"client"),cn=U(Rt,"scroll"),Sn=n=>{const t=parseFloat(We(n,Ze))||0,o=parseFloat(We(n,et))||0;return{w:t-Qt(t),h:o-Qt(o)}},at=n=>n.getBoundingClientRect(),Ur=n=>!!n&&zr(n),dn=n=>!!(n&&(n[et]||n[Ze])),Lo=(n,t)=>{const o=dn(n);return!dn(t)&&o},Gn=(n,t,o,s)=>{Q(Ke(t),r=>{n&&n.removeEventListener(r,o,s)})},te=(n,t,o,s)=>{var r;const c=(r=s&&s.H)!=null?r:!0,a=s&&s.I||!1,i=s&&s.A||!1,l={passive:c,capture:a};return U(be,Ke(t).map(d=>{const m=i?u=>{Gn(n,d,m,a),o&&o(u)}:o;return n&&n.addEventListener(d,m,l),U(Gn,n,d,m,a)}))},Oo=n=>n.stopPropagation(),un=n=>n.preventDefault(),Fo=n=>Oo(n)||un(n),Ne=(n,t)=>{const{x:o,y:s}=Se(t)?{x:t,y:t}:t||{};Se(o)&&(n.scrollLeft=o),Se(s)&&(n.scrollTop=s)},ye=n=>({x:n.scrollLeft,y:n.scrollTop}),Ho=()=>({T:{x:0,y:0},D:{x:0,y:0}}),Pr=(n,t)=>{const{T:o,D:s}=n,{w:r,h:c}=t,a=(u,p,f)=>{let h=Hn(u)*f,g=Hn(p)*f;if(h===g){const v=Vt(u),V=Vt(p);g=v>V?0:g,h=v<V?0:h}return h=h===g?0:h,[h+0,g+0]},[i,l]=a(o.x,s.x,r),[d,m]=a(o.y,s.y,c);return{T:{x:i,y:d},D:{x:l,y:m}}},Kn=({T:n,D:t})=>{const o=(s,r)=>s===0&&s<=r;return{x:o(n.x,t.x),y:o(n.y,t.y)}},Wn=({T:n,D:t},o)=>{const s=(r,c,a)=>on(0,1,(r-a)/(r-c)||0);return{x:s(n.x,t.x,o.x),y:s(n.y,t.y,o.y)}},mn=n=>{n&&n.focus&&n.focus({preventScroll:!0})},Yn=(n,t)=>{Q(vo(t),n)},fn=n=>{const t=new Map,o=(c,a)=>{if(c){const i=t.get(c);Yn(l=>{i&&i[l?"delete":"clear"](l)},a)}else t.forEach(i=>{i.clear()}),t.clear()},s=(c,a)=>{if(At(c)){const d=t.get(c)||new Set;return t.set(c,d),Yn(m=>{we(m)&&d.add(m)},a),U(o,c,a)}ho(a)&&a&&o();const i=Le(c),l=[];return Q(i,d=>{const m=c[d];m&&se(l,s(d,m))}),U(be,l)},r=(c,a)=>{Q(Pe(t.get(c)),i=>{a&&!tn(a)?i.apply(0,a):i()})};return s(n||{}),[s,o,r]},Xn=n=>JSON.stringify(n,(t,o)=>{if(we(o))throw 0;return o}),Jn=(n,t)=>n?`${t}`.split(".").reduce((o,s)=>o&&Vo(o,s)?o[s]:void 0,n):void 0,qr={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:[0,33],attributes:null,ignoreMutation:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},Ro=(n,t)=>{const o={},s=Ae(Le(t),Le(n));return Q(s,r=>{const c=n[r],a=t[r];if(ct(c)&&ct(a))Y(o[r]={},Ro(c,a)),_n(o[r])&&delete o[r];else if(Vo(t,r)&&a!==c){let i=!0;if($e(c)||$e(a))try{Xn(c)===Xn(a)&&(i=!1)}catch{}i&&(o[r]=a)}}),o},Qn=(n,t,o)=>s=>[Jn(n,s),o||Jn(t,s)!==void 0],ot="data-overlayscrollbars",bt="os-environment",xt=`${bt}-scrollbar-hidden`,Wt=`${ot}-initialize`,Et="noClipping",Zn=`${ot}-body`,je=ot,Gr="host",He=`${ot}-viewport`,Kr=Mr,Wr=Ar,Yr="arrange",zo="measuring",jo="scrollbarHidden",Xr="scrollbarPressed",Jr="noContent",pn=`${ot}-padding`,eo=`${ot}-content`,$n="os-size-observer",Qr=`${$n}-appear`,Zr=`${$n}-listener`,es="os-trinsic-observer",ts="os-theme-none",xe="os-scrollbar",ns=`${xe}-rtl`,os=`${xe}-horizontal`,rs=`${xe}-vertical`,Io=`${xe}-track`,Bn=`${xe}-handle`,ss=`${xe}-visible`,ls=`${xe}-cornerless`,to=`${xe}-interaction`,no=`${xe}-unusable`,hn=`${xe}-auto-hide`,oo=`${hn}-hidden`,ro=`${xe}-wheel`,as=`${Io}-interactive`,cs=`${Bn}-interactive`;let Yt;const is=()=>{const n=(y,O,D)=>{ke(document.body,y),ke(document.body,y);const N=Ao(y),S=lt(y),$=Sn(O);return D&&Ie(y),{x:S.h-N.h+$.h,y:S.w-N.w+$.w}},t=y=>{let O=!1;const D=Vn(y,xt);try{O=We(y,"scrollbar-width")==="none"||We(y,"display","::-webkit-scrollbar")==="none"}catch{}return D(),O},o=`.${bt}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${bt} div{width:200%;height:200%;margin:10px 0}.${xt}{scrollbar-width:none!important}.${xt}::-webkit-scrollbar,.${xt}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`,r=Mo(`<div class="${bt}"><div></div><style>${o}</style></div>`)[0],c=r.firstChild,[a,,i]=fn(),[l,d]=ge({o:n(r,c),i:wt},U(n,r,c,!0)),[m]=d(),u=t(r),p={x:m.x===0,y:m.y===0},f={elements:{host:null,padding:!u,viewport:y=>u&&Do(y)&&y,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},h=Y({},qr),g=U(Y,{},h),v=U(Y,{},f),V={k:m,M:p,R:u,V:!!en,L:U(a,"r"),P:v,U:y=>Y(f,y)&&v(),N:g,q:y=>Y(h,y)&&g(),B:Y({},f),F:Y({},h)};if(Ve(r,"style"),Ie(r),te(pe,"resize",()=>{i("r",[])}),we(pe.matchMedia)&&!u&&(!p.x||!p.y)){const y=O=>{const D=pe.matchMedia(`(resolution: ${pe.devicePixelRatio}dppx)`);te(D,"change",()=>{O(),y(O)},{A:!0})};y(()=>{const[O,D]=l();Y(V.k,O),i("r",[D])})}return V},Be=()=>(Yt||(Yt=is()),Yt),Uo=(n,t)=>we(t)?t.apply(0,n):t,ds=(n,t,o,s)=>{const r=Mt(s)?o:s;return Uo(n,r)||t.apply(0,n)},Po=(n,t,o,s)=>{const r=Mt(s)?o:s,c=Uo(n,r);return!!c&&(Bt(c)?c:t.apply(0,n))},us=(n,t)=>{const{nativeScrollbarsOverlaid:o,body:s}=t||{},{M:r,R:c,P:a}=Be(),{nativeScrollbarsOverlaid:i,body:l}=a().cancel,d=o??i,m=Mt(s)?l:s,u=(r.x||r.y)&&d,p=n&&(yn(m)?!c:m);return!!u||!!p},Cn=new WeakMap,ms=(n,t)=>{Cn.set(n,t)},fs=n=>{Cn.delete(n)},qo=n=>Cn.get(n),ps=(n,t,o)=>{let s=!1;const r=o?new WeakMap:!1,c=()=>{s=!0},a=i=>{if(r&&o){const l=o.map(d=>{const[m,u]=d||[];return[u&&m?(i||Co)(m,n):[],u]});Q(l,d=>Q(d[0],m=>{const u=d[1],p=r.get(m)||[];if(n.contains(m)&&u){const h=te(m,u,g=>{s?(h(),r.delete(m)):t(g)});r.set(m,se(p,h))}else be(p),r.delete(m)}))}};return a(),[c,a]},so=(n,t,o,s)=>{let r=!1;const{j:c,X:a,Y:i,W:l,J:d,K:m}=s||{},u=nn(()=>r&&o(!0),{_:33,p:99}),[p,f]=ps(n,u,i),h=c||[],g=a||[],v=Ae(h,g),V=(O,D)=>{if(!tn(D)){const N=d||ze,S=m||ze,$=[],b=[];let B=!1,E=!1;if(Q(D,_=>{const{attributeName:C,target:x,type:k,oldValue:A,addedNodes:T,removedNodes:K}=_,Z=k==="attributes",X=k==="childList",M=n===x,q=Z&&C,G=q&&wn(x,C||""),I=At(G)?G:null,ee=q&&A!==I,F=xn(g,C)&&ee;if(t&&(X||!M)){const R=Z&&ee,H=R&&l&&Ct(x,l),L=(H?!N(x,C,A,I):!Z||R)&&!S(_,!!H,n,s);Q(T,z=>se($,z)),Q(K,z=>se($,z)),E=E||L}!t&&M&&ee&&!N(x,C,A,I)&&(se(b,C),B=B||F)}),f(_=>zn($).reduce((C,x)=>(se(C,Co(_,x)),Ct(x,_)?se(C,x):C),[])),t)return!O&&E&&o(!1),[!1];if(!tn(b)||B){const _=[zn(b),B];return!O&&o.apply(0,_),_}}},y=new Tr(U(V,!1));return[()=>(y.observe(n,{attributes:!0,attributeOldValue:!0,attributeFilter:v,subtree:t,childList:t,characterData:t}),r=!0,()=>{r&&(p(),y.disconnect(),r=!1)}),()=>{if(r)return u.S(),V(!0,y.takeRecords())}]},Go={},Ko={},hs=n=>{Q(n,t=>Q(t,(o,s)=>{Go[s]=t[s]}))},Wo=(n,t,o)=>Le(n).map(s=>{const{static:r,instance:c}=n[s],[a,i,l]=o||[],d=o?c:r;if(d){const m=o?d(a,i,t):d(t);return(l||Ko)[s]=m}}),dt=n=>Ko[n],vs="__osOptionsValidationPlugin",gs="__osSizeObserverPlugin",ks=(n,t)=>{const{M:o}=t,[s,r]=n("showNativeOverlaidScrollbars");return[s&&o.x&&o.y,r]},Dt=n=>n.indexOf(Re)===0,ys=(n,t)=>{const o=(r,c,a,i)=>{const l=r===Re?qe:r.replace(`${Re}-`,""),d=Dt(r),m=Dt(a);return!c&&!i?qe:d&&m?Re:d?c&&i?l:c?Re:qe:c?l:m&&i?Re:qe},s={x:o(t.x,n.x,t.y,n.y),y:o(t.y,n.y,t.x,n.x)};return{G:s,Z:{x:s.x===tt,y:s.y===tt}}},Yo="__osScrollbarsHidingPlugin",xs="__osClickScrollPlugin",Xo=(n,t,o)=>{const{dt:s}=o||{},r=dt(gs),[c]=ge({o:!1,u:!0});return()=>{const a=[],l=Mo(`<div class="${$n}"><div class="${Zr}"></div></div>`)[0],d=l.firstChild,m=u=>{const p=u instanceof ResizeObserverEntry;let f=!1,h=!1;if(p){const[g,,v]=c(u.contentRect),V=dn(g);h=Lo(g,v),f=!h&&!V}else h=u===!0;f||t({ft:!0,dt:h})};if(St){const u=new St(p=>m(p.pop()));u.observe(d),se(a,()=>{u.disconnect()})}else if(r){const[u,p]=r(d,m,s);se(a,Ae([Vn(l,Qr),te(l,"animationstart",u)],p))}else return ze;return U(be,se(a,ke(n,l)))}},_s=(n,t)=>{let o;const s=l=>l.h===0||l.isIntersecting||l.intersectionRatio>0,r=Qe(es),[c]=ge({o:!1}),a=(l,d)=>{if(l){const m=c(s(l)),[,u]=m;return u&&!d&&t(m)&&[m]}},i=(l,d)=>a(d.pop(),l);return[()=>{const l=[];if(Rn)o=new Rn(U(i,!1),{root:n}),o.observe(r),se(l,()=>{o.disconnect()});else{const d=()=>{const m=lt(r);a(m)};se(l,Xo(r,d)()),d()}return U(be,se(l,ke(n,r)))},()=>o&&i(!0,o.takeRecords())]},ws=(n,t,o,s)=>{let r,c,a,i,l,d;const m=`[${je}]`,u=`[${He}]`,p=[],f=["wrap","cols","rows"],h=["id","class","style","open"],{vt:g,ht:v,ot:V,gt:y,bt:O,wt:D,nt:N,yt:S,St:$,Ot:b}=n,B=w=>We(w,"direction")==="rtl",E={$t:!1,ct:B(g)},_=Be(),C=dt(Yo),[x]=ge({i:Eo,o:{w:0,h:0}},()=>{const w=C&&C.tt(n,t,E,_,o).ut,z=!(S&&N)&&En(v,je,Et),j=!N&&$(Yr),P=j&&ye(y),J=b(zo,z),ae=j&&w&&w()[0],de=cn(V),W=Sn(V);return ae&&ae(),Ne(y,P),z&&J(),{w:de.w+W.w,h:de.h+W.h}}),k=D?f:Ae(h,f),A=nn(s,{_:()=>r,p:()=>c,m(w,L){const[z]=w,[j]=L;return[Ae(Le(z),Le(j)).reduce((P,J)=>(P[J]=z[J]||j[J],P),{})]}}),T=w=>{const L=B(g);Y(w,{Ct:d!==L}),Y(E,{ct:L}),d=L},K=(w,L)=>{const[z,j]=w,P={xt:j};return Y(E,{$t:z}),!L&&s(P),P},Z=({ft:w,dt:L})=>{const j=!(w&&!L)&&_.R?A:s,P={ft:w||L,dt:L};T(P),j(P)},X=(w,L)=>{const[,z]=x(),j={Ht:z};return T(j),z&&!L&&(w?s:A)(j),j},M=(w,L,z)=>{const j={Et:L};return T(j),L&&!z&&A(j),j},[q,G]=O?_s(v,K):[],I=!N&&Xo(v,Z,{dt:!0}),[ee,F]=so(v,!1,M,{X:h,j:Ae(h,p)}),R=N&&St&&new St(w=>{const L=w[w.length-1].contentRect;Z({ft:!0,dt:Lo(L,l)}),l=L}),H=nn(()=>{const[,w]=x();s({Ht:w})},{_:222,v:!0});return[()=>{R&&R.observe(v);const w=I&&I(),L=q&&q(),z=ee(),j=_.L(P=>{P?A({zt:P}):H()});return()=>{R&&R.disconnect(),w&&w(),L&&L(),i&&i(),z(),j()}},({It:w,At:L,Tt:z})=>{const j={},[P]=w("update.ignoreMutation"),[J,ae]=w("update.attributes"),[de,W]=w("update.elementEvents"),[ce,ue]=w("update.debounce"),_e=W||ae,ie=L||z,he=le=>we(P)&&P(le);if(_e){a&&a(),i&&i();const[le,oe]=so(O||V,!0,X,{j:Ae(k,J||[]),Y:de,W:m,K:(me,re)=>{const{target:fe,attributeName:ve}=me;return(!re&&ve&&!N?Hr(fe,m,u):!1)||!!Je(fe,`.${xe}`)||!!he(me)}});i=le(),a=oe}if(ue)if(A.S(),$e(ce)){const le=ce[0],oe=ce[1];r=Se(le)&&le,c=Se(oe)&&oe}else Se(ce)?(r=ce,c=!1):(r=!1,c=!1);if(ie){const le=F(),oe=G&&G(),me=a&&a();le&&Y(j,M(le[0],le[1],ie)),oe&&Y(j,K(oe[0],ie)),me&&Y(j,X(me[0],ie))}return T(j),j},E]},bs=(n,t,o,s)=>{const{P:r}=Be(),{scrollbars:c}=r(),{slot:a}=c,{vt:i,ht:l,ot:d,Dt:m,gt:u,yt:p,nt:f}=t,{scrollbars:h}=m?{}:n,{slot:g}=h||{},v=new Map,V=F=>en&&new en({source:u,axis:F}),y={x:V("x"),y:V("y")},O=Po([i,l,d],()=>f&&p?i:l,a,g),D=(F,R)=>{if(R){const P=F?Ze:et,{kt:J,Mt:ae}=R,de=at(ae)[P],W=at(J)[P];return on(0,1,de/W||0)}const H=F?"x":"y",{Rt:w,Vt:L}=o,z=L[H],j=w[H];return on(0,1,z/(z+j)||0)},N=(F,R,H)=>{const w=D(H,F);return 1/w*(1-w)*R},S=F=>Y(F,{clear:["left"]}),$=F=>{v.forEach((R,H)=>{(F?xn(vo(F),H):!0)&&(Q(R||[],L=>{L&&L.cancel()}),v.delete(H))})},b=(F,R,H,w)=>{const L=v.get(F)||[],z=L.find(j=>j&&j.timeline===R);z?z.effect=new KeyframeEffect(F,H,{composite:w}):v.set(F,Ae(L,[F.animate(H,{timeline:R,composite:w})]))},B=(F,R,H)=>{const w=H?Vn:Bo;Q(F,L=>{w(L.Lt,R)})},E=(F,R)=>{Q(F,H=>{const[w,L]=R(H);it(w,L)})},_=(F,R)=>{E(F,H=>{const{Mt:w}=H;return[w,{[R?Ze:et]:Pn(D(R))}]})},C=(F,R)=>{const{Pt:H}=o,w=R?"x":"y",L=y[w],z=Kn(H)[w],j=(P,J)=>Kt(Pn(N(P,z?J:1-J,R)),R);L?Q(F,P=>{const{Mt:J}=P;b(J,L,S({transform:[0,1].map(ae=>j(P,ae))}))}):E(F,P=>[P.Mt,{transform:j(P,Wn(H,ye(u))[w])}])},x=F=>f&&!p&&nt(F)===d,k=[],A=[],T=[],K=(F,R,H)=>{const w=ho(H),L=w?H:!0,z=w?!H:!0;L&&B(A,F,R),z&&B(T,F,R)},Z=()=>{_(A,!0),_(T)},X=()=>{C(A,!0),C(T)},M=()=>{if(f){const{Rt:F,Pt:R}=o,H=Kn(R),w=.5;if(y.x&&y.y)Q(Ae(T,A),({Lt:L})=>{if(x(L)){const z=j=>b(L,y[j],S({transform:[0,H[j]?1:-1].map(P=>Kt(an(P*(F[j]-w)),j==="x"))}),"add");z("x"),z("y")}else $(L)});else{const L=Wn(R,ye(u)),z=j=>{const{Lt:P}=j,J=x(P)&&P,ae=(de,W,ce)=>{const ue=W*de;return an(ce?ue:-ue)};return[J,J&&{transform:Kt({x:ae(L.x,F.x,H.x),y:ae(L.y,F.y,H.y)})}]};E(A,z),E(T,z)}}},q=F=>{const H=Qe(`${xe} ${F?os:rs}`),w=Qe(Io),L=Qe(Bn),z={Lt:H,kt:w,Mt:L};return se(F?A:T,z),se(k,[ke(H,w),ke(w,L),U(Ie,H),$,s(z,K,C,F)]),z},G=U(q,!0),I=U(q,!1),ee=()=>(ke(O,A[0].Lt),ke(O,T[0].Lt),U(be,k));return G(),I(),[{Ut:Z,Nt:X,qt:M,Bt:K,Ft:{V:y.x,jt:A,Xt:G,Yt:U(E,A)},Wt:{V:y.y,jt:T,Xt:I,Yt:U(E,T)}},ee]},Es=(n,t,o,s)=>(r,c,a,i)=>{const{ht:l,ot:d,nt:m,gt:u,Jt:p,Ot:f}=t,{Lt:h,kt:g,Mt:v}=r,[V,y]=Ge(333),[O,D]=Ge(444),[N,S]=Ge(),$=U(a,[r],i),b=x=>{we(u.scrollBy)&&u.scrollBy({behavior:"smooth",left:x.x,top:x.y})},B=i?Ze:et,E=()=>{const x="pointerup pointercancel lostpointercapture",k=`client${i?"X":"Y"}`,A=i?"left":"top",T=i?"w":"h",K=i?"x":"y",Z=(X,M)=>q=>{const{Rt:G}=o,I=lt(g)[T]-lt(v)[T],F=M*q/I*G[K];Ne(u,{[K]:X+F})};return te(g,"pointerdown",X=>{const M=Je(X.target,`.${Bn}`)===v,q=M?v:g,G=n.scrollbars,{button:I,isPrimary:ee,pointerType:F}=X,{pointers:R}=G;if(I===0&&ee&&G[M?"dragScroll":"clickScroll"]&&(R||[]).includes(F)){D();const w=!M&&X.shiftKey,L=U(at,v),z=U(at,g),j=(re,fe)=>(re||L())[A]-(fe||z())[A],P=Qt(at(u)[B])/lt(u)[T]||1,J=Z(ye(u)[K],1/P),ae=X[k],de=L(),W=z(),ce=de[B],ue=j(de,W)+ce/2,_e=ae-W[A],ie=M?0:_e-ue,he=re=>{be(me),q.releasePointerCapture(re.pointerId)},le=()=>f(Xr,!0),oe=le(),me=[()=>{const re=ye(u);oe();const fe=ye(u),ve={x:fe.x-re.x,y:fe.y-re.y};(Vt(ve.x)>3||Vt(ve.y)>3)&&(le(),Ne(u,re),b(ve),O(oe))},te(p,x,he),te(p,"selectstart",re=>un(re),{H:!1}),te(g,x,he),te(g,"pointermove",re=>{const fe=re[k]-ae;(M||w)&&J(ie+fe)})];if(q.setPointerCapture(X.pointerId),w)J(ie);else if(!M){const re=dt(xs);re&&se(me,re(J,j,ie,ce,_e))}}})};let _=!0;const C=x=>x.propertyName.indexOf(B)>-1;return U(be,[te(v,"pointermove pointerleave",s),te(h,"pointerenter",()=>{c(to,!0)}),te(h,"pointerleave pointercancel",()=>{c(to,!1)}),!m&&te(h,"mousedown",()=>{const x=ln();(jn(x,He)||jn(x,je)||x===document.body)&&Nt(U(mn,d),25)}),te(h,"wheel",x=>{const{deltaX:k,deltaY:A,deltaMode:T}=x;_&&T===0&&nt(h)===l&&b({x:k,y:A}),_=!1,c(ro,!0),V(()=>{_=!0,c(ro)}),un(x)},{H:!1,I:!0}),te(v,"transitionstart",x=>{if(C(x)){const k=()=>{$(),N(k)};k()}}),te(v,"transitionend transitioncancel",x=>{C(x)&&(S(),$())}),te(h,"pointerdown",U(te,p,"click",Fo,{A:!0,I:!0,H:!1}),{I:!0}),E(),y,D,S])},Vs=(n,t,o,s,r,c)=>{let a,i,l,d,m,u=ze,p=0;const f=M=>M.pointerType==="mouse",[h,g]=Ge(),[v,V]=Ge(100),[y,O]=Ge(100),[D,N]=Ge(()=>p),[S,$]=bs(n,r,s,Es(t,r,s,M=>f(M)&&T())),{ht:b,Kt:B,yt:E}=r,{Bt:_,Ut:C,Nt:x,qt:k}=S,A=(M,q)=>{if(N(),M)_(oo);else{const G=U(_,oo,!0);p>0&&!q?D(G):G()}},T=()=>{(l?!a:!d)&&(A(!0),v(()=>{A(!1)}))},K=M=>{_(hn,M,!0),_(hn,M,!1)},Z=M=>{f(M)&&(a=l,l&&A(!0))},X=[N,V,O,g,()=>u(),te(b,"pointerover",Z,{A:!0}),te(b,"pointerenter",Z),te(b,"pointerleave",M=>{f(M)&&(a=!1,l&&A(!1))}),te(b,"pointermove",M=>{f(M)&&i&&T()}),te(B,"scroll",M=>{h(()=>{x(),T()}),c(M),k()})];return[()=>U(be,se(X,$())),({It:M,Tt:q,Gt:G,Qt:I})=>{const{Zt:ee,tn:F,nn:R,sn:H}=I||{},{Ct:w,dt:L}=G||{},{ct:z}=o,{M:j}=Be(),{G:P,en:J}=s,[ae,de]=M("showNativeOverlaidScrollbars"),[W,ce]=M("scrollbars.theme"),[ue,_e]=M("scrollbars.visibility"),[ie,he]=M("scrollbars.autoHide"),[le,oe]=M("scrollbars.autoHideSuspend"),[me]=M("scrollbars.autoHideDelay"),[re,fe]=M("scrollbars.dragScroll"),[ve,Ye]=M("scrollbars.clickScroll"),[ut,jt]=M("overflow"),It=L&&!q,Ut=J.x||J.y,Ee=ee||F||H||w||q,Pt=R||_e||jt,mt=ae&&j.x&&j.y,ft=(Oe,rt,st)=>{const pt=Oe.includes(tt)&&(ue===Re||ue==="auto"&&rt===tt);return _(ss,pt,st),pt};if(p=me,It&&(le&&Ut?(K(!1),u(),y(()=>{u=te(B,"scroll",U(K,!0),{A:!0})})):K(!0)),de&&_(ts,mt),ce&&(_(m),_(W,!0),m=W),oe&&!le&&K(!0),he&&(i=ie==="move",l=ie==="leave",d=ie==="never",A(d,!0)),fe&&_(cs,re),Ye&&_(as,ve),Pt){const Oe=ft(ut.x,P.x,!0),rt=ft(ut.y,P.y,!1);_(ls,!(Oe&&rt))}Ee&&(C(),x(),k(),_(no,!J.x,!0),_(no,!J.y,!1),_(ns,z&&!E))},{},S]},Ns=n=>{const t=Be(),{P:o,R:s}=t,{elements:r}=o(),{host:c,padding:a,viewport:i,content:l}=r,d=Bt(n),m=d?{}:n,{elements:u}=m,{host:p,padding:f,viewport:h,content:g}=u||{},v=d?n:m.target,V=Do(v),y=Ct(v,"textarea"),O=v.ownerDocument,D=O.documentElement,N=()=>O.defaultView||pe,S=U(ds,[v]),$=U(Po,[v]),b=U(Qe,""),B=U(S,b,i),E=U($,b,l),_=B(h),C=_===v,x=C&&V,k=!C&&E(g),A=!C&&_===k,T=x?D:_,K=y?S(b,c,p):v,Z=x?T:K,X=!C&&$(b,a,f),M=!A&&k,q=[M,T,X,Z].map(W=>Bt(W)&&!nt(W)&&W),G=W=>W&&xn(q,W),I=G(T)?v:T,ee={vt:v,ht:Z,ot:T,cn:X,bt:M,gt:x?D:T,Kt:x?O:T,rn:V?D:I,Jt:O,wt:y,yt:V,Dt:d,nt:C,ln:N,St:W=>En(T,He,W),Ot:(W,ce)=>rn(T,He,W,ce)},{vt:F,ht:R,cn:H,ot:w,bt:L}=ee,z=[()=>{Ve(R,[je,Wt]),Ve(F,Wt),V&&Ve(D,[Wt,je])}],j=y&&G(R);let P=y?F:sn([L,w,H,R,F].find(W=>W&&!G(W)));const J=x?F:L||w,ae=U(be,z);return[ee,()=>{const W=N(),ce=ln(),ue=oe=>{ke(nt(oe),sn(oe)),Ie(oe)},_e=oe=>te(oe,"focusin focusout focus blur",Fo,{I:!0,H:!1}),ie="tabindex",he=wn(w,ie),le=_e(ce);return Me(R,je,C?"":Gr),Me(H,pn,""),Me(w,He,""),Me(L,eo,""),C||(Me(w,ie,he||"-1"),V&&Me(D,Zn,"")),j&&(In(F,R),se(z,()=>{In(R,F),Ie(R)})),ke(J,P),ke(R,H),ke(H||R,!C&&w),ke(w,L),se(z,[le,()=>{const oe=ln(),me=G(w),re=me&&oe===w?F:oe,fe=_e(re);Ve(H,pn),Ve(L,eo),Ve(w,He),V&&Ve(D,Zn),he?Me(w,ie,he):Ve(w,ie),G(L)&&ue(L),me&&ue(w),G(H)&&ue(H),mn(re),fe()}]),s&&!C&&(bn(w,He,jo),se(z,U(Ve,w,He))),mn(!C&&V&&ce===F&&W.top===W?w:ce),le(),P=0,ae},ae]},Ss=({bt:n})=>({Gt:t,an:o,Tt:s})=>{const{xt:r}=t||{},{$t:c}=o;n&&(r||s)&&it(n,{[et]:c&&"100%"})},$s=({ht:n,cn:t,ot:o,nt:s},r)=>{const[c,a]=ge({i:Or,o:qn()},U(qn,n,"padding",""));return({It:i,Gt:l,an:d,Tt:m})=>{let[u,p]=a(m);const{R:f}=Be(),{ft:h,Ht:g,Ct:v}=l||{},{ct:V}=d,[y,O]=i("paddingAbsolute");(h||p||(m||g))&&([u,p]=c(m));const N=!s&&(O||v||p);if(N){const S=!y||!t&&!f,$=u.r+u.l,b=u.t+u.b,B={[wo]:S&&!V?-$:0,[bo]:S?-b:0,[_o]:S&&V?-$:0,top:S?-u.t:0,right:S?V?-u.r:"auto":0,left:S?V?"auto":-u.l:0,[Ze]:S&&`calc(100% + ${$}px)`},E={[go]:S?u.t:0,[ko]:S?u.r:0,[xo]:S?u.b:0,[yo]:S?u.l:0};it(t||o,B),it(o,E),Y(r,{cn:u,un:!S,rt:t?E:Y({},B,E)})}return{_n:N}}},Bs=(n,t)=>{const o=Be(),{ht:s,cn:r,ot:c,nt:a,Kt:i,gt:l,yt:d,Ot:m,ln:u}=n,{R:p}=o,f=d&&a,h=U(mo,0),g=["display","direction","flexDirection","writingMode"],v={i:Eo,o:{w:0,h:0}},V={i:wt,o:{}},y=M=>{m(zo,!f&&M)},O=(M,q)=>{const G=pe.devicePixelRatio%1!==0?1:0,I={w:h(M.w-q.w),h:h(M.h-q.h)};return{w:I.w>G?I.w:0,h:I.h>G?I.h:0}},[D,N]=ge(v,U(Sn,c)),[S,$]=ge(v,U(cn,c)),[b,B]=ge(v),[E]=ge(V),[_,C]=ge(v),[x]=ge(V),[k]=ge({i:(M,q)=>Ft(M,q,g),o:{}},()=>Ur(c)?We(c,g):{}),[A,T]=ge({i:(M,q)=>wt(M.T,q.T)&&wt(M.D,q.D),o:Ho()},()=>{y(!0);const M=ye(l),q=m(Jr,!0),G=te(i,tt,H=>{const w=ye(l);H.isTrusted&&w.x===M.x&&w.y===M.y&&Oo(H)},{I:!0,A:!0});Ne(l,{x:0,y:0}),q();const I=ye(l),ee=cn(l);Ne(l,{x:ee.w,y:ee.h});const F=ye(l);Ne(l,{x:F.x-I.x<1&&-ee.w,y:F.y-I.y<1&&-ee.h});const R=ye(l);return Ne(l,M),kn(()=>G()),{T:I,D:R}}),K=dt(Yo),Z=(M,q)=>`${q?Kr:Wr}${Lr(M)}`,X=M=>{const q=I=>[Re,qe,tt].map(ee=>Z(ee,I)),G=q(!0).concat(q()).join(" ");m(G),m(Le(M).map(I=>Z(M[I],I==="x")).join(" "),!0)};return({It:M,Gt:q,an:G,Tt:I},{_n:ee})=>{const{ft:F,Ht:R,Ct:H,dt:w,zt:L}=q||{},z=K&&K.tt(n,t,G,o,M),{it:j,ut:P,_t:J}=z||{},[ae,de]=ks(M,o),[W,ce]=M("overflow"),ue=Dt(W.x),_e=Dt(W.y),ie=F||ee||R||H||L||de;let he=N(I),le=$(I),oe=B(I),me=C(I);if(de&&p&&m(jo,!ae),ie){En(s,je,Et)&&y(!0);const[Ln]=P?P():[],[ht]=he=D(I),[vt]=le=S(I),gt=Ao(c),kt=f&&Ir(u()),mr={w:h(vt.w+ht.w),h:h(vt.h+ht.h)},On={w:h((kt?kt.w:gt.w+h(gt.w-vt.w))+ht.w),h:h((kt?kt.h:gt.h+h(gt.h-vt.h))+ht.h)};Ln&&Ln(),me=_(On),oe=b(O(mr,On),I)}const[re,fe]=me,[ve,Ye]=oe,[ut,jt]=le,[It,Ut]=he,[Ee,Pt]=E({x:ve.w>0,y:ve.h>0}),mt=ue&&_e&&(Ee.x||Ee.y)||ue&&Ee.x&&!Ee.y||_e&&Ee.y&&!Ee.x,ft=ee||H||L||Ut||jt||fe||Ye||ce||de||ie,Oe=ys(Ee,W),[rt,st]=x(Oe.G),[,pt]=k(I),An=H||w||pt||Pt||I,[dr,ur]=An?A(I):T();return ft&&(st&&X(Oe.G),J&&j&&it(c,J(Oe,G,j(Oe,ut,It)))),y(!1),rn(s,je,Et,mt),rn(r,pn,Et,mt),Y(t,{G:rt,Vt:{x:re.w,y:re.h},Rt:{x:ve.w,y:ve.h},en:Ee,Pt:Pr(dr,ve)}),{nn:st,Zt:fe,tn:Ye,sn:ur||Ye,dn:An}}},Cs=n=>{const[t,o,s]=Ns(n),r={cn:{t:0,r:0,b:0,l:0},un:!1,rt:{[wo]:0,[bo]:0,[_o]:0,[go]:0,[ko]:0,[xo]:0,[yo]:0},Vt:{x:0,y:0},Rt:{x:0,y:0},G:{x:qe,y:qe},en:{x:!1,y:!1},Pt:Ho()},{vt:c,gt:a,nt:i}=t,{R:l,M:d}=Be(),m=!l&&(d.x||d.y),u=[Ss(t),$s(t,r),Bs(t,r)];return[o,p=>{const f={},g=m&&ye(a);return Q(u,v=>{Y(f,v(p,f)||{})}),Ne(a,g),!i&&Ne(c,0),f},r,t,s]},Ds=(n,t,o,s,r)=>{const c=Qn(t,{}),[a,i,l,d,m]=Cs(n),[u,p,f]=ws(d,l,c,O=>{y({},O)}),[h,g,,v]=Vs(n,t,f,l,d,r),V=O=>Le(O).some(D=>!!O[D]),y=(O,D)=>{if(o())return!1;const{fn:N,Tt:S,At:$,pn:b}=O,B=N||{},E=!!S,_={It:Qn(t,B,E),fn:B,Tt:E};if(b)return g(_),!1;const C=D||p(Y({},_,{At:$})),x=i(Y({},_,{an:f,Gt:C}));g(Y({},_,{Gt:C,Qt:x}));const k=V(C),A=V(x),T=k||A||!_n(B)||E;return T&&s(O,{Gt:C,Qt:x}),T};return[()=>{const{rn:O,gt:D}=d,N=ye(O),S=[u(),a(),h()];return Ne(D,N),U(be,S)},y,()=>({vn:f,hn:l}),{gn:d,bn:v},m]},Ue=(n,t,o)=>{const{N:s}=Be(),r=Bt(n),c=r?n:n.target,a=qo(c);if(t&&!a){let i=!1;const l=[],d={},m=E=>{const _=No(E),C=dt(vs);return C?C(_,!0):_},u=Y({},s(),m(t)),[p,f,h]=fn(),[g,v,V]=fn(o),y=(E,_)=>{V(E,_),h(E,_)},[O,D,N,S,$]=Ds(n,u,()=>i,({fn:E,Tt:_},{Gt:C,Qt:x})=>{const{ft:k,Ct:A,xt:T,Ht:K,Et:Z,dt:X}=C,{Zt:M,tn:q,nn:G,sn:I}=x;y("updated",[B,{updateHints:{sizeChanged:!!k,directionChanged:!!A,heightIntrinsicChanged:!!T,overflowEdgeChanged:!!M,overflowAmountChanged:!!q,overflowStyleChanged:!!G,scrollCoordinatesChanged:!!I,contentMutation:!!K,hostMutation:!!Z,appear:!!X},changedOptions:E||{},force:!!_}])},E=>y("scroll",[B,E])),b=E=>{fs(c),be(l),i=!0,y("destroyed",[B,E]),f(),v()},B={options(E,_){if(E){const C=_?s():{},x=Ro(u,Y(C,m(E)));_n(x)||(Y(u,x),D({fn:x}))}return Y({},u)},on:g,off:(E,_)=>{E&&_&&v(E,_)},state(){const{vn:E,hn:_}=N(),{ct:C}=E,{Vt:x,Rt:k,G:A,en:T,cn:K,un:Z,Pt:X}=_;return Y({},{overflowEdge:x,overflowAmount:k,overflowStyle:A,hasOverflow:T,scrollCoordinates:{start:X.T,end:X.D},padding:K,paddingAbsolute:Z,directionRTL:C,destroyed:i})},elements(){const{vt:E,ht:_,cn:C,ot:x,bt:k,gt:A,Kt:T}=S.gn,{Ft:K,Wt:Z}=S.bn,X=q=>{const{Mt:G,kt:I,Lt:ee}=q;return{scrollbar:ee,track:I,handle:G}},M=q=>{const{jt:G,Xt:I}=q,ee=X(G[0]);return Y({},ee,{clone:()=>{const F=X(I());return D({pn:!0}),F}})};return Y({},{target:E,host:_,padding:C||x,viewport:x,content:k||x,scrollOffsetElement:A,scrollEventElement:T,scrollbarHorizontal:M(K),scrollbarVertical:M(Z)})},update:E=>D({Tt:E,At:!0}),destroy:U(b,!1),plugin:E=>d[Le(E)[0]]};return se(l,[$]),ms(c,B),Wo(Go,Ue,[B,p,d]),us(S.gn.yt,!r&&n.cancel)?(b(!0),B):(se(l,O()),y("initialized",[B]),B.update(!0),B)}return a};Ue.plugin=n=>{const t=$e(n),o=t?n:[n],s=o.map(r=>Wo(r,Ue)[0]);return hs(o),t?s:s[0]};Ue.valid=n=>{const t=n&&n.elements,o=we(t)&&t();return $t(o)&&!!qo(o.target)};Ue.env=()=>{const{k:n,M:t,R:o,V:s,B:r,F:c,P:a,U:i,N:l,q:d}=Be();return Y({},{scrollbarsSize:n,scrollbarsOverlaid:t,scrollbarsHiding:o,scrollTimeline:s,staticDefaultInitialization:r,staticDefaultOptions:c,getDefaultInitialization:a,setDefaultInitialization:i,getDefaultOptions:l,setDefaultOptions:d})};function Ts(){let n;const t=e.ref(null),o=Math.floor(Math.random()*2**32),s=e.ref(!1),r=e.ref([]),c=()=>r.value,a=()=>n.getSelection(),i=()=>r.value.length,l=()=>n.clearSelection(!0),d=e.ref(),m=e.ref(null),u=e.ref(null),p=e.ref(null);function f(){n=new vr({area:t.value,keyboardDrag:!1,selectedClass:"vf-explorer-selected",selectorClass:"vf-explorer-selector"}),n.subscribe("DS:start:pre",({items:D,event:N,isDragging:S})=>{if(S)n.Interaction._reset(N);else{s.value=!1;const $=t.value.offsetWidth-N.offsetX,b=t.value.offsetHeight-N.offsetY;$<15&&b<15&&n.Interaction._reset(N),N.target.classList.contains("os-scrollbar-handle")&&n.Interaction._reset(N)}}),document.addEventListener("dragleave",D=>{!D.buttons&&s.value&&(s.value=!1)})}const h=()=>e.nextTick(()=>{n.addSelection(n.getSelectables()),g()}),g=()=>{r.value=n.getSelection().map(D=>JSON.parse(D.dataset.item)),d.value(r.value)},v=()=>e.nextTick(()=>{const D=c().map(N=>N.path);l(),n.setSettings({selectables:document.getElementsByClassName("vf-item-"+o)}),n.addSelection(n.getSelectables().filter(N=>D.includes(JSON.parse(N.dataset.item).path))),g(),y()}),V=D=>{d.value=D,n.subscribe("DS:end",({items:N,event:S,isDragging:$})=>{r.value=N.map(b=>JSON.parse(b.dataset.item)),D(N.map(b=>JSON.parse(b.dataset.item)))})},y=()=>{m.value&&(t.value.getBoundingClientRect().height<t.value.scrollHeight?(u.value.style.height=t.value.scrollHeight+"px",u.value.style.display="block"):(u.value.style.height="100%",u.value.style.display="none"))},O=D=>{if(!m.value)return;const{scrollOffsetElement:N}=m.value.elements();N.scrollTo({top:t.value.scrollTop,left:0})};return e.onMounted(()=>{Ue(p.value,{scrollbars:{theme:"vf-theme-dark dark:vf-theme-light"},plugins:{OverlayScrollbars:Ue}},{initialized:D=>{m.value=D},scroll:(D,N)=>{const{scrollOffsetElement:S}=D.elements();t.value.scrollTo({top:S.scrollTop,left:0})}}),f(),y(),new ResizeObserver(y).observe(t.value),t.value.addEventListener("scroll",O),n.subscribe("DS:scroll",({isDragging:D})=>D||O())}),e.onUnmounted(()=>{n&&n.stop()}),e.onUpdated(()=>{n&&n.Area.reset()}),{area:t,explorerId:o,isDraggingRef:s,scrollBar:u,scrollBarContainer:p,getSelected:c,getSelection:a,selectAll:h,clearSelection:l,refreshSelection:v,getCount:i,onSelect:V}}function Ms(n,t){const o=e.ref(n),s=e.ref(t),r=e.ref([]),c=e.ref([]),a=e.ref([]),i=e.ref(!1),l=e.ref(5);let d=!1,m=!1;const u=e.reactive({adapter:o,storages:[],dirname:s,files:[]});function p(){let y=[],O=[],D=s.value??o.value+"://";D.length===0&&(r.value=[]),D.replace(o.value+"://","").split("/").forEach(function($){y.push($),y.join("/")!==""&&O.push({basename:$,name:$,path:o.value+"://"+y.join("/"),type:"dir"})}),c.value=O;const[N,S]=h(O,l.value);a.value=S,r.value=N}function f(y){l.value=y,p()}function h(y,O){return y.length>O?[y.slice(-O),y.slice(0,-O)]:[y,[]]}function g(y=null){i.value=y??!i.value}function v(){return r.value&&r.value.length&&!m}const V=e.computed(()=>{var y;return((y=r.value[r.value.length-2])==null?void 0:y.path)??o.value+"://"});return e.onMounted(()=>{}),e.watch(s,p),e.onMounted(p),{adapter:o,path:s,loading:d,searchMode:m,data:u,breadcrumbs:r,breadcrumbItems:c,limitBreadcrumbItems:f,hiddenBreadcrumbs:a,showHiddenBreadcrumbs:i,toggleHiddenBreadcrumbs:g,isGoUpAvailable:v,parentFolderPath:V}}const As=(n,t)=>{const o=br(n.id),s=hr(),r=o.getStore("metricUnits",!1),c=Br(o,n.theme),a=t.i18n,i=n.locale??t.locale,l=o.getStore("adapter"),d=p=>Array.isArray(p)?p:Nr,m=o.getStore("persist-path",n.persist),u=m?o.getStore("path",n.path):n.path;return e.reactive({version:Sr,root:null,debug:n.debug,emitter:s,storage:o,i18n:e.computed(()=>Vr(o,i,s,a)),modal:Cr(),dragSelect:e.computed(()=>Ts()),requester:wr(n.request),features:d(n.features),view:o.getStore("viewport","grid"),fullScreen:o.getStore("full-screen",n.fullScreen),showTreeView:o.getStore("show-tree-view",n.showTreeView),pinnedFolders:o.getStore("pinned-folders",n.pinnedFolders),treeViewData:[],selectButton:n.selectButton,maxFileSize:n.maxFileSize,theme:c,metricUnits:r,filesize:r?io:co,compactListView:o.getStore("compact-list-view",!0),persist:m,showThumbnails:o.getStore("show-thumbnails",n.showThumbnails),fs:Ms(l,u)})},Ls=e.createElementVNode("div",{class:"fixed inset-0 bg-gray-500 dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity"},null,-1),Os={class:"fixed z-10 inset-0 overflow-hidden"},Fs={class:"bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Hs={class:"bg-gray-50 dark:bg-gray-800 dark:border-t dark:border-gray-700 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},Ce={__name:"ModalLayout",setup(n){const t=e.ref(null),o=e.inject("ServiceContainer");return e.onMounted(()=>{const s=document.querySelector(".v-f-modal input");s&&s.focus(),e.nextTick(()=>{if(document.querySelector(".v-f-modal input")&&window.innerWidth<768){const r=t.value.getBoundingClientRect().bottom+16;window.scrollTo({top:r,left:0,behavior:"smooth"})}})}),(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:"v-f-modal relative z-30","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",onKeyup:r[1]||(r[1]=e.withKeys(c=>e.unref(o).modal.close(),["esc"])),tabindex:"0"},[Ls,e.createElementVNode("div",Os,[e.createElementVNode("div",{class:"flex items-end sm:items-center justify-center min-h-full p-4 text-center sm:p-0",onMousedown:r[0]||(r[0]=e.withModifiers(c=>e.unref(o).modal.close(),["self"]))},[e.createElementVNode("div",{ref_key:"modalBody",ref:t,class:"relative bg-white dark:bg-gray-800 rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-4xl md:max-w-2xl lg:max-w-3xl xl:max-w-3xl w-full"},[e.createElementVNode("div",Fs,[e.renderSlot(s.$slots,"default")]),e.createElementVNode("div",Hs,[e.renderSlot(s.$slots,"buttons")])],512)],32)])],32))}},Rs=(n,t)=>{const o=n.__vccOpts||n;for(const[s,r]of t)o[s]=r;return o},zs={props:{on:{type:String,required:!0}},setup(n,{emit:t,slots:o}){const s=e.inject("ServiceContainer"),r=e.ref(!1),{t:c}=s.i18n;let a=null;const i=()=>{clearTimeout(a),r.value=!0,a=setTimeout(()=>{r.value=!1},2e3)};return e.onMounted(()=>{s.emitter.on(n.on,i)}),e.onUnmounted(()=>{clearTimeout(a)}),{shown:r,t:c}}},js={key:1};function Is(n,t,o,s,r,c){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["text-sm text-green-600 dark:text-green-600 transition-opacity duration-500 ease-out",[{"opacity-0":!s.shown}]])},[n.$slots.default?e.renderSlot(n.$slots,"default",{key:0}):(e.openBlock(),e.createElementBlock("span",js,e.toDisplayString(s.t("Saved.")),1))],2)}const Xe=Rs(zs,[["render",Is]]),Us={class:"sm:flex sm:items-start select-none"},Ps=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})])],-1),qs={class:"mt-3 sm:mt-0 sm:ml-4 sm:text-left w-full"},Gs={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Ks={class:"flex overflow-auto","aria-label":"Tabs"},Ws=["onClick","aria-current"],Ys={key:0,class:"mt-4"},Xs={class:"m-1 text-sm text-gray-500"},Js={href:"https://vuefinder.ozdemir.be",class:"block mt-2 text-sm text-blue-500 dark:text-blue-400",target:"_blank"},Qs={href:"https://github.com/n1crack/vuefinder",class:"block mt-2 text-sm text-blue-500 dark:text-blue-400",target:"_blank"},Zs={key:1,class:"mt-2"},el={class:"m-1 text-sm text-gray-500"},tl={class:"mt-3 text-left"},nl={class:"space-y-2"},ol={class:"flex relative gap-x-3"},rl={class:"h-6 items-center"},sl={class:"flex-1 block text-sm"},ll={for:"metric_unit",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},al={class:"flex relative gap-x-3"},cl={class:"h-6 items-center"},il={class:"flex-1 block text-sm"},dl={for:"large_icons",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},ul={class:"flex relative gap-x-3"},ml={class:"h-6 items-center"},fl={class:"flex-1 block text-sm"},pl={for:"persist_path",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},hl={class:"flex relative gap-x-3"},vl={class:"h-6 items-center"},gl={class:"flex-1 block text-sm"},kl={for:"show_thumbnails",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},yl={class:""},xl={class:"h-6 items-center"},_l={for:"theme",class:"flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm"},wl={class:"flex text-sm"},bl=["label"],El=["value"],Vl={key:0,class:""},Nl={class:"h-6 items-center"},Sl={for:"language",class:"flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm text-nowrap"},$l={class:"flex text-sm"},Bl=["label"],Cl=["value"],Dl={key:2,class:"mt-3"},Tl={class:"space-y-2 sm:w-1/2"},Ml={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Al=e.createElementVNode("kbd",null,"F2",-1),Ll={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Ol=e.createElementVNode("kbd",null,"F5",-1),Fl={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Hl=e.createElementVNode("kbd",null,"Del",-1),Rl={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},zl=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Esc")],-1),jl={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Il=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"A")],-1),Ul={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Pl=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"F")],-1),ql={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Gl=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"E")],-1),Kl={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Wl=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,",")],-1),Yl={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Xl=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"Enter")],-1),Jl={key:3,class:"mt-3"},Ql={class:"m-1 text-sm text-gray-500"},Jo={__name:"ModalAbout",setup(n){const t=e.inject("ServiceContainer"),{setStore:o,clearStore:s}=t.storage,{t:r,changeLocale:c,locale:a}=t.i18n,i={ABOUT:"about",SETTINGS:"settings",SHORTCUTS:"shortcuts",RESET:"reset"},l=e.computed(()=>[{name:r("About"),key:i.ABOUT},{name:r("Settings"),key:i.SETTINGS},{name:r("Shortcuts"),key:i.SHORTCUTS},{name:r("Reset"),key:i.RESET}]),d=e.ref("about"),m=async()=>{s(),location.reload()},u=D=>{t.theme.set(D),t.emitter.emit("vf-theme-saved")},p=()=>{t.metricUnits=!t.metricUnits,t.filesize=t.metricUnits?io:co,o("metricUnits",t.metricUnits),t.emitter.emit("vf-metric-units-saved")},f=()=>{t.compactListView=!t.compactListView,o("compactListView",t.compactListView),t.emitter.emit("vf-compact-view-saved")},h=()=>{t.showThumbnails=!t.showThumbnails,o("show-thumbnails",t.showThumbnails),t.emitter.emit("vf-show-thumbnails-saved")},g=()=>{t.persist=!t.persist,o("persist-path",t.persist),t.emitter.emit("vf-persist-path-saved")},{i18n:v}=e.inject("VueFinderOptions"),y=Object.fromEntries(Object.entries({en:"English",fr:"French (Français)",de:"German (Deutsch)",fa:"Persian (فارسی)",he:"Hebrew (עִברִית)",hi:"Hindi (हिंदी)",ru:"Russian (Pусский)",sv:"Swedish (Svenska)",tr:"Turkish (Türkçe)",zhCN:"Simplified Chinese (简体中文)",zhTW:"Traditional Chinese (繁體中文)"}).filter(([D])=>Object.keys(v).includes(D))),O=e.computed(()=>({system:r("System"),light:r("Light"),dark:r("Dark")}));return(D,N)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:N[8]||(N[8]=S=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(r)("Close")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Us,[Ps,e.createElementVNode("div",qs,[e.createElementVNode("h3",Gs,e.toDisplayString("Vuefinder "+e.unref(t).version),1),e.createElementVNode("div",null,[e.createElementVNode("div",null,[e.createElementVNode("nav",Ks,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,S=>(e.openBlock(),e.createElementBlock("button",{key:S.name,onClick:$=>d.value=S.key,class:e.normalizeClass([S.key===d.value?"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 border-sky-500":"text-gray-500 dark:text-gray-500 hover:text-gray-700 border-gray-300 dark:border-gray-600","px-3 py-2 border-b font-medium text-sm"]),"aria-current":S.current?"page":void 0},e.toDisplayString(S.name),11,Ws))),128))])])]),d.value===i.ABOUT?(e.openBlock(),e.createElementBlock("div",Ys,[e.createElementVNode("div",Xs,e.toDisplayString(e.unref(r)("Vuefinder is a simple, lightweight, and fast file manager library for Vue.js applications")),1),e.createElementVNode("a",Js,e.toDisplayString(e.unref(r)("Project home")),1),e.createElementVNode("a",Qs,e.toDisplayString(e.unref(r)("Follow on GitHub")),1)])):e.createCommentVNode("",!0),d.value===i.SETTINGS?(e.openBlock(),e.createElementBlock("div",Zs,[e.createElementVNode("div",el,e.toDisplayString(e.unref(r)("Customize your experience with the following settings.")),1),e.createElementVNode("div",tl,[e.createElementVNode("fieldset",null,[e.createElementVNode("div",nl,[e.createElementVNode("div",ol,[e.createElementVNode("div",rl,[e.withDirectives(e.createElementVNode("input",{id:"metric_unit",name:"metric_unit",type:"checkbox","onUpdate:modelValue":N[0]||(N[0]=S=>e.unref(t).metricUnits=S),onClick:p,class:"h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"},null,512),[[e.vModelCheckbox,e.unref(t).metricUnits]])]),e.createElementVNode("div",sl,[e.createElementVNode("label",ll,[e.createTextVNode(e.toDisplayString(e.unref(r)("Use Metric Units"))+" ",1),e.createVNode(Xe,{class:"ms-3",on:"vf-metric-units-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",al,[e.createElementVNode("div",cl,[e.withDirectives(e.createElementVNode("input",{id:"large_icons",name:"large_icons",type:"checkbox","onUpdate:modelValue":N[1]||(N[1]=S=>e.unref(t).compactListView=S),onClick:f,class:"h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"},null,512),[[e.vModelCheckbox,e.unref(t).compactListView]])]),e.createElementVNode("div",il,[e.createElementVNode("label",dl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Compact list view"))+" ",1),e.createVNode(Xe,{class:"ms-3",on:"vf-compact-view-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",ul,[e.createElementVNode("div",ml,[e.withDirectives(e.createElementVNode("input",{id:"persist_path",name:"persist_path",type:"checkbox","onUpdate:modelValue":N[2]||(N[2]=S=>e.unref(t).persist=S),onClick:g,class:"h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"},null,512),[[e.vModelCheckbox,e.unref(t).persist]])]),e.createElementVNode("div",fl,[e.createElementVNode("label",pl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Persist path on reload"))+" ",1),e.createVNode(Xe,{class:"ms-3",on:"vf-persist-path-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",hl,[e.createElementVNode("div",vl,[e.withDirectives(e.createElementVNode("input",{id:"show_thumbnails",name:"show_thumbnails",type:"checkbox","onUpdate:modelValue":N[3]||(N[3]=S=>e.unref(t).showThumbnails=S),onClick:h,class:"h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"},null,512),[[e.vModelCheckbox,e.unref(t).showThumbnails]])]),e.createElementVNode("div",gl,[e.createElementVNode("label",kl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Show thumbnails"))+" ",1),e.createVNode(Xe,{class:"ms-3",on:"vf-show-thumbnails-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",yl,[e.createElementVNode("div",xl,[e.createElementVNode("label",_l,e.toDisplayString(e.unref(r)("Theme")),1)]),e.createElementVNode("div",wl,[e.withDirectives(e.createElementVNode("select",{id:"theme","onUpdate:modelValue":N[4]||(N[4]=S=>e.unref(t).theme.value=S),onChange:N[5]||(N[5]=S=>u(S.target.value)),class:"flex-shrink-0 sm:w-1/2 w-full text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded"},[e.createElementVNode("optgroup",{label:e.unref(r)("Theme")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(S,$)=>(e.openBlock(),e.createElementBlock("option",{value:$},e.toDisplayString(S),9,El))),256))],8,bl)],544),[[e.vModelSelect,e.unref(t).theme.value]]),e.createVNode(Xe,{class:"ms-3 flex-shrink-0 flex-grow basis-full",on:"vf-theme-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])]),e.unref(t).features.includes(e.unref(ne).LANGUAGE)&&Object.keys(e.unref(y)).length>1?(e.openBlock(),e.createElementBlock("div",Vl,[e.createElementVNode("div",Nl,[e.createElementVNode("label",Sl,e.toDisplayString(e.unref(r)("Language")),1)]),e.createElementVNode("div",$l,[e.withDirectives(e.createElementVNode("select",{id:"language","onUpdate:modelValue":N[6]||(N[6]=S=>e.isRef(a)?a.value=S:null),onChange:N[7]||(N[7]=S=>e.unref(c)(S.target.value)),class:"flex-shrink-0 sm:w-1/2 w-full text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded"},[e.createElementVNode("optgroup",{label:e.unref(r)("Language")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(y),(S,$)=>(e.openBlock(),e.createElementBlock("option",{value:$},e.toDisplayString(S),9,Cl))),256))],8,Bl)],544),[[e.vModelSelect,e.unref(a)]]),e.createVNode(Xe,{class:"ms-3 flex-shrink-0 flex-grow basis-full",on:"vf-language-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])):e.createCommentVNode("",!0)])])])])):e.createCommentVNode("",!0),d.value===i.SHORTCUTS?(e.openBlock(),e.createElementBlock("div",Dl,[e.createElementVNode("div",Tl,[e.createElementVNode("div",Ml,[e.createElementVNode("div",null,e.toDisplayString(e.unref(r)("Rename")),1),Al]),e.createElementVNode("div",Ll,[e.createElementVNode("div",null,e.toDisplayString(e.unref(r)("Refresh")),1),Ol]),e.createElementVNode("div",Fl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Delete"))+" ",1),Hl]),e.createElementVNode("div",Rl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Escape"))+" ",1),zl]),e.createElementVNode("div",jl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Select All"))+" ",1),Il]),e.createElementVNode("div",Ul,[e.createTextVNode(e.toDisplayString(e.unref(r)("Search"))+" ",1),Pl]),e.createElementVNode("div",ql,[e.createTextVNode(e.toDisplayString(e.unref(r)("Toggle Sidebar"))+" ",1),Gl]),e.createElementVNode("div",Kl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Open Settings"))+" ",1),Wl]),e.createElementVNode("div",Yl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Toggle Full Screen"))+" ",1),Xl])])])):e.createCommentVNode("",!0),d.value===i.RESET?(e.openBlock(),e.createElementBlock("div",Jl,[e.createElementVNode("div",Ql,e.toDisplayString(e.unref(r)("Reset all settings to default")),1),e.createElementVNode("button",{onClick:m,type:"button",class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(r)("Reset Settings")),1)])):e.createCommentVNode("",!0)])])]),_:1}))}},Zl=["title"],ea=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1),ta=[ea],De={__name:"Message",props:{error:{type:Boolean,default:!1}},emits:["hidden"],setup(n,{emit:t}){var d;const o=t,s=e.inject("ServiceContainer"),{t:r}=s.i18n,c=e.ref(!1),a=e.ref(null),i=e.ref((d=a.value)==null?void 0:d.strMessage);e.watch(i,()=>c.value=!1);const l=()=>{o("hidden"),c.value=!0};return(m,u)=>(e.openBlock(),e.createElementBlock("div",null,[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"strMessage",ref:a,class:e.normalizeClass(["flex mt-2 p-1 px-2 rounded text-sm break-all dark:opacity-75",n.error?"bg-red-100 text-red-600 ":"bg-emerald-100 text-emerald-600"])},[e.renderSlot(m.$slots,"default"),e.createElementVNode("div",{class:"ml-auto cursor-pointer",onClick:l,title:e.unref(r)("Close")},ta,8,Zl)],2))]))}},na={class:"sm:flex sm:items-start"},oa=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-red-600 dark:stroke-red-200",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})])],-1),ra={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},sa={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},la={class:"mt-2"},aa={class:"text-sm text-gray-500"},ca={class:"text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",style:{"max-height":"200px"}},ia={class:"flex text-sm text-gray-800 dark:text-gray-400"},da={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},ua=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1),ma=[ua],fa={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},pa=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1),ha=[pa],va={class:"ml-1.5"},ga={class:"m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center"},Dn={__name:"ModalDelete",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(t.modal.data.items),r=e.ref(""),c=()=>{s.value.length&&t.emitter.emit("vf-fetch",{params:{q:"delete",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{items:s.value.map(({path:a,type:i})=>({path:a,type:i}))},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("Files deleted.")})},onError:a=>{r.value=o(a.message)}})};return(a,i)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:c,class:"vf-btn vf-btn-danger"},e.toDisplayString(e.unref(o)("Yes, Delete!")),1),e.createElementVNode("button",{type:"button",onClick:i[1]||(i[1]=l=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1),e.createElementVNode("div",ga,e.toDisplayString(e.unref(o)("This action cannot be undone.")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",na,[oa,e.createElementVNode("div",ra,[e.createElementVNode("h3",sa,e.toDisplayString(e.unref(o)("Delete files")),1),e.createElementVNode("div",la,[e.createElementVNode("p",aa,e.toDisplayString(e.unref(o)("Are you sure you want to delete these files?")),1),e.createElementVNode("div",ca,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,l=>(e.openBlock(),e.createElementBlock("p",ia,[l.type==="dir"?(e.openBlock(),e.createElementBlock("svg",da,ma)):(e.openBlock(),e.createElementBlock("svg",fa,ha)),e.createElementVNode("span",va,e.toDisplayString(l.basename),1)]))),256))]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:i[0]||(i[0]=l=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},ka={class:"sm:flex sm:items-start"},ya=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})])],-1),xa={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},_a={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},wa={class:"mt-2"},ba={class:"flex text-sm text-gray-800 dark:text-gray-400 py-2"},Ea={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Va=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1),Na=[Va],Sa={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},$a=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1),Ba=[$a],Ca={class:"ml-1.5"},Tn={__name:"ModalRename",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(t.modal.data.items[0]),r=e.ref(t.modal.data.items[0].basename),c=e.ref(""),a=()=>{r.value!=""&&t.emitter.emit("vf-fetch",{params:{q:"rename",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{item:s.value.path,name:r.value},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("%s is renamed.",r.value)})},onError:i=>{c.value=o(i.message)}})};return(i,l)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:a,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Rename")),1),e.createElementVNode("button",{type:"button",onClick:l[2]||(l[2]=d=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",ka,[ya,e.createElementVNode("div",xa,[e.createElementVNode("h3",_a,e.toDisplayString(e.unref(o)("Rename")),1),e.createElementVNode("div",wa,[e.createElementVNode("p",ba,[s.value.type==="dir"?(e.openBlock(),e.createElementBlock("svg",Ea,Na)):(e.openBlock(),e.createElementBlock("svg",Sa,Ba)),e.createElementVNode("span",Ca,e.toDisplayString(s.value.basename),1)]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=d=>r.value=d),onKeyup:e.withKeys(a,["enter"]),class:"px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:"Name",type:"text"},null,544),[[e.vModelText,r.value]]),c.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:l[1]||(l[1]=d=>c.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},Te={ESCAPE:"Escape",F2:"F2",F5:"F5",DELETE:"Delete",ENTER:"Enter",BACKSLASH:"Backslash",KEY_A:"KeyA",KEY_E:"KeyE",KEY_F:"KeyF"};function Da(n){const t=o=>{o.code===Te.ESCAPE&&(n.modal.close(),n.root.focus()),!n.modal.visible&&(n.fs.searchMode||(o.code===Te.F2&&n.features.includes(ne.RENAME)&&(n.dragSelect.getCount()!==1||n.modal.open(Tn,{items:n.dragSelect.getSelected()})),o.code===Te.F5&&n.emitter.emit("vf-fetch",{params:{q:"index",adapter:n.fs.adapter,path:n.fs.data.dirname}}),o.code===Te.DELETE&&(!n.dragSelect.getCount()||n.modal.open(Dn,{items:n.dragSelect.getSelected()})),o.metaKey&&o.code===Te.BACKSLASH&&n.modal.open(Jo),o.metaKey&&o.code===Te.KEY_F&&n.features.includes(ne.SEARCH)&&(n.fs.searchMode=!0,o.preventDefault()),o.metaKey&&o.code===Te.KEY_E&&(n.showTreeView=!n.showTreeView,n.storage.setStore("show-tree-view",n.showTreeView)),o.metaKey&&o.code===Te.ENTER&&(n.fullScreen=!n.fullScreen,n.root.focus()),o.metaKey&&o.code===Te.KEY_A&&(n.dragSelect.selectAll(),o.preventDefault())))};e.onMounted(()=>{n.root.addEventListener("keydown",t)}),e.onUnmounted(()=>{n.root.removeEventListener("keydown",t)})}const Ta={class:"sm:flex sm:items-start"},Ma=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z"})])],-1),Aa={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},La={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Oa={class:"mt-2"},Fa={class:"text-sm text-gray-500"},Ha=["placeholder"],Qo={__name:"ModalNewFolder",setup(n){const t=e.inject("ServiceContainer");t.storage;const{t:o}=t.i18n,s=e.ref(""),r=e.ref(""),c=()=>{s.value!==""&&t.emitter.emit("vf-fetch",{params:{q:"newfolder",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{name:s.value},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("%s is created.",s.value)})},onError:a=>{r.value=o(a.message)}})};return(a,i)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:c,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Create")),1),e.createElementVNode("button",{type:"button",onClick:i[2]||(i[2]=l=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Ta,[Ma,e.createElementVNode("div",Aa,[e.createElementVNode("h3",La,e.toDisplayString(e.unref(o)("New Folder")),1),e.createElementVNode("div",Oa,[e.createElementVNode("p",Fa,e.toDisplayString(e.unref(o)("Create a new folder")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=l=>s.value=l),onKeyup:e.withKeys(c,["enter"]),class:"px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:e.unref(o)("Folder Name"),type:"text"},null,40,Ha),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:i[1]||(i[1]=l=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},Ra={class:"sm:flex sm:items-start"},za=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})])],-1),ja={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Ia={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Ua={class:"mt-2"},Pa={class:"text-sm text-gray-500"},qa=["placeholder"],Ga={__name:"ModalNewFile",setup(n){const t=e.inject("ServiceContainer");t.storage;const{t:o}=t.i18n,s=e.ref(""),r=e.ref(""),c=()=>{s.value!==""&&t.emitter.emit("vf-fetch",{params:{q:"newfile",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{name:s.value},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("%s is created.",s.value)})},onError:a=>{r.value=o(a.message)}})};return(a,i)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:c,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Create")),1),e.createElementVNode("button",{type:"button",onClick:i[2]||(i[2]=l=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Ra,[za,e.createElementVNode("div",ja,[e.createElementVNode("h3",Ia,e.toDisplayString(e.unref(o)("New File")),1),e.createElementVNode("div",Ua,[e.createElementVNode("p",Pa,e.toDisplayString(e.unref(o)("Create a new file")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=l=>s.value=l),onKeyup:e.withKeys(c,["enter"]),class:"px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:e.unref(o)("File Name"),type:"text"},null,40,qa),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:i[1]||(i[1]=l=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}};function vn(n,t=14){let o=`((?=([\\w\\W]{0,${t}}))([\\w\\W]{${t+1},})([\\w\\W]{8,}))`;return n.replace(new RegExp(o),"$2..$4")}const Ka={class:"sm:flex sm:items-start"},Wa=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})])],-1),Ya={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Xa={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Ja={class:"mt-2"},Qa={key:0,class:"pointer-events-none"},Za={key:1,class:"pointer-events-none"},ec=["disabled"],tc=["disabled"],nc={class:"text-gray-500 text-sm mb-1 pr-1 max-h-[200px] overflow-y-auto vf-scrollbar"},oc={class:"rounded flex flex-shrink-0 w-6 h-6 border bg-gray-50 text-xs cursor-default dark:border-gray-700 dark:bg-gray-800 dark:text-gray-50"},rc=["textContent"],sc={class:"ml-1 w-full h-fit"},lc={class:"text-left hidden md:block"},ac={class:"text-left md:hidden"},cc={key:0,class:"ml-auto"},ic=["title","disabled","onClick"],dc=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1),uc=[dc],mc={key:0,class:"py-2"},fc=["disabled"],pc={__name:"ModalUpload",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=o("uppy"),r={PENDING:0,CANCELED:1,UPLOADING:2,ERROR:3,DONE:10},c=e.ref({QUEUE_ENTRY_STATUS:r}),a=e.ref(null),i=e.ref(null),l=e.ref(null),d=e.ref(null),m=e.ref(null),u=e.ref(null),p=e.ref([]),f=e.ref(""),h=e.ref(!1),g=e.ref(!1);let v;function V(C){return p.value.findIndex(x=>x.id===C)}function y(C,x=null){x=x??(C.webkitRelativePath||C.name),v.addFile({name:x,type:C.type,data:C,source:"Local"})}function O(C){switch(C.status){case r.DONE:return"text-green-600";case r.ERROR:return"text-red-600";case r.CANCELED:return"text-red-600";case r.PENDING:default:return""}}const D=C=>{switch(C.status){case r.DONE:return"✓";case r.ERROR:case r.CANCELED:return"!";case r.PENDING:default:return"..."}};function N(){d.value.click()}function S(){if(!h.value){if(!p.value.filter(C=>C.status!==r.DONE).length){f.value=o("Please select file to upload first.");return}f.value="",v.retryAll(),v.upload()}}function $(){v.cancelAll({reason:"user"}),p.value.forEach(C=>{C.status!==r.DONE&&(C.status=r.CANCELED,C.statusName=o("Canceled"))}),h.value=!1}function b(C){h.value||(v.removeFile(C.id,"removed-by-user"),p.value.splice(V(C.id),1))}function B(C){if(!h.value){if(v.cancelAll({reason:"user"}),C){const x=[];p.value.forEach(k=>{k.status!==r.DONE&&x.push(k)}),p.value=[],x.forEach(k=>{y(k.originalFile,k.name)});return}p.value.splice(0)}}function E(){t.modal.close()}function _(){return t.requester.transformRequestParams({url:"",method:"post",params:{q:"upload",adapter:t.fs.adapter,path:t.fs.data.dirname}})}return e.onMounted(async()=>{v=new gr({debug:t.debug,restrictions:{maxFileSize:$r(t.maxFileSize)},locale:s,onBeforeFileAdded(k,A){if(A[k.id]!=null){const K=V(k.id);p.value[K].status===r.PENDING&&(f.value=v.i18n("noDuplicates",{fileName:k.name})),p.value=p.value.filter(Z=>Z.id!==k.id)}return p.value.push({id:k.id,name:k.name,size:t.filesize(k.size),status:r.PENDING,statusName:o("Pending upload"),percent:null,originalFile:k.data}),!0}}),v.use(kr,{endpoint:"WILL_BE_REPLACED_BEFORE_UPLOAD",limit:5,timeout:0,getResponseError(k,A){let T;try{T=JSON.parse(k).message}catch{T=o("Cannot parse server response.")}return new Error(T)}}),v.on("restriction-failed",(k,A)=>{const T=p.value[V(k.id)];b(T),f.value=A.message}),v.on("upload",()=>{const k=_();v.setMeta({...k.body});const A=v.getPlugin("XHRUpload");A.opts.method=k.method,A.opts.endpoint=k.url+"?"+new URLSearchParams(k.params),A.opts.headers=k.headers,delete k.headers["Content-Type"],h.value=!0,p.value.forEach(T=>{T.status!==r.DONE&&(T.percent=null,T.status=r.UPLOADING,T.statusName=o("Pending upload"))})}),v.on("upload-progress",(k,A)=>{const T=Math.floor(A.bytesUploaded/A.bytesTotal*100);p.value[V(k.id)].percent=`${T}%`}),v.on("upload-success",k=>{const A=p.value[V(k.id)];A.status=r.DONE,A.statusName=o("Done")}),v.on("upload-error",(k,A)=>{const T=p.value[V(k.id)];T.percent=null,T.status=r.ERROR,A.isNetworkError?T.statusName=o("Network Error, Unable establish connection to the server or interrupted."):T.statusName=A?A.message:o("Unknown Error")}),v.on("error",k=>{f.value=k.message,h.value=!1,t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname},noCloseModal:!0})}),v.on("complete",()=>{h.value=!1,t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname},noCloseModal:!0})}),d.value.addEventListener("click",()=>{i.value.click()}),m.value.addEventListener("click",()=>{l.value.click()}),u.value.addEventListener("dragover",k=>{k.preventDefault(),g.value=!0}),u.value.addEventListener("dragleave",k=>{k.preventDefault(),g.value=!1});function C(k,A){A.isFile&&A.file(T=>k(A,T)),A.isDirectory&&A.createReader().readEntries(T=>{T.forEach(K=>{C(k,K)})})}u.value.addEventListener("drop",k=>{k.preventDefault(),g.value=!1;const A=/^[/\\](.+)/;[...k.dataTransfer.items].forEach(T=>{T.kind==="file"&&C((K,Z)=>{const X=A.exec(K.fullPath);y(Z,X[1])},T.webkitGetAsEntry())})});const x=({target:k})=>{const A=k.files;for(const T of A)y(T);k.value=""};i.value.addEventListener("change",x),l.value.addEventListener("change",x)}),e.onBeforeUnmount(()=>{v==null||v.close({reason:"unmount"})}),(C,x)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["vf-btn vf-btn-primary",h.value?"bg-blue-200 hover:bg-blue-200 dark:bg-gray-700/50 dark:hover:bg-gray-700/50 dark:text-gray-500":"bg-blue-600 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-500"]),disabled:h.value,onClick:e.withModifiers(S,["prevent"])},e.toDisplayString(e.unref(o)("Upload")),11,fc),h.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"vf-btn vf-btn-secondary",onClick:e.withModifiers($,["prevent"])},e.toDisplayString(e.unref(o)("Cancel")),1)):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"vf-btn vf-btn-secondary",onClick:e.withModifiers(E,["prevent"])},e.toDisplayString(e.unref(o)("Close")),1))]),default:e.withCtx(()=>[e.createElementVNode("div",Ka,[Wa,e.createElementVNode("div",Ya,[e.createElementVNode("h3",Xa,e.toDisplayString(e.unref(o)("Upload Files")),1),e.createElementVNode("div",Ja,[e.createElementVNode("div",{ref_key:"dropArea",ref:u,class:"flex items-center justify-center text-lg mb-4 text-gray-500 border-2 border-gray-300 rounded border-dashed select-none cursor-pointer dark:border-gray-600 h-[120px]",onClick:N},[g.value?(e.openBlock(),e.createElementBlock("div",Qa,e.toDisplayString(e.unref(o)("Release to drop these files.")),1)):(e.openBlock(),e.createElementBlock("div",Za,e.toDisplayString(e.unref(o)("Drag and drop the files/folders to here or click here.")),1))],512),e.createElementVNode("div",{ref_key:"container",ref:a,class:"text-gray-500 mb-1"},[e.createElementVNode("button",{ref_key:"pickFiles",ref:d,type:"button",class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Select Files")),513),e.createElementVNode("button",{ref_key:"pickFolders",ref:m,type:"button",class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Select Folders")),513),e.createElementVNode("button",{type:"button",class:"vf-btn vf-btn-secondary",disabled:h.value,onClick:x[0]||(x[0]=k=>B(!1))},e.toDisplayString(e.unref(o)("Clear all")),9,ec),e.createElementVNode("button",{type:"button",class:"vf-btn vf-btn-secondary",disabled:h.value,onClick:x[1]||(x[1]=k=>B(!0))},e.toDisplayString(e.unref(o)("Clear only successful")),9,tc)],512),e.createElementVNode("div",nc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,k=>(e.openBlock(),e.createElementBlock("div",{class:"flex hover:bg-gray-100 dark:hover:bg-gray-800 dark:hover:text-gray-300",key:k.id},[e.createElementVNode("span",oc,[e.createElementVNode("span",{class:e.normalizeClass(["text-base m-auto",O(k)]),textContent:e.toDisplayString(D(k))},null,10,rc)]),e.createElementVNode("div",sc,[e.createElementVNode("div",lc,e.toDisplayString(e.unref(vn)(k.name,40))+" ("+e.toDisplayString(k.size)+")",1),e.createElementVNode("div",ac,e.toDisplayString(e.unref(vn)(k.name,16))+" ("+e.toDisplayString(k.size)+")",1),e.createElementVNode("div",{class:e.normalizeClass(["flex break-all text-left",O(k)])},[e.createTextVNode(e.toDisplayString(k.statusName)+" ",1),k.status===c.value.QUEUE_ENTRY_STATUS.UPLOADING?(e.openBlock(),e.createElementBlock("b",cc,e.toDisplayString(k.percent),1)):e.createCommentVNode("",!0)],2)]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["rounded w-5 h-5 border-1 text-base leading-none font-medium focus:outline-none dark:border-gray-200 dark:text-gray-400 dark:hover:text-gray-200 dark:bg-gray-600 ml-auto sm:text-xs hover:text-red-600",h.value?"disabled:bg-gray-100 text-white text-opacity-50":"bg-gray-100"]),title:e.unref(o)("Delete"),disabled:h.value,onClick:A=>b(k)},uc,10,ic)]))),128)),p.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",mc,e.toDisplayString(e.unref(o)("No files selected!")),1))]),f.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:x[2]||(x[2]=k=>f.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.value),1)]),_:1})):e.createCommentVNode("",!0)])])]),e.createElementVNode("input",{ref_key:"internalFileInput",ref:i,type:"file",multiple:"",class:"hidden"},null,512),e.createElementVNode("input",{ref_key:"internalFolderInput",ref:l,type:"file",multiple:"",webkitdirectory:"",class:"hidden"},null,512)]),_:1}))}},hc={class:"sm:flex sm:items-start"},vc=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.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.5m6 4.125l2.25 2.25m0 0l2.25 2.25M12 13.875l2.25-2.25M12 13.875l-2.25 2.25M3.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"})])],-1),gc={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},kc={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},yc={class:"mt-2"},xc={class:"flex text-sm text-gray-800 dark:text-gray-400"},_c={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},wc=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1),bc=[wc],Ec={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Vc=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1),Nc=[Vc],Sc={class:"ml-1.5"},$c={class:"my-1 text-sm text-gray-500"},Zo={__name:"ModalUnarchive",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(t.modal.data.items[0]),r=e.ref(""),c=e.ref([]),a=()=>{t.emitter.emit("vf-fetch",{params:{q:"unarchive",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{item:s.value.path},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("The file unarchived.")})},onError:i=>{r.value=o(i.message)}})};return(i,l)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:a,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Unarchive")),1),e.createElementVNode("button",{type:"button",onClick:l[1]||(l[1]=d=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",hc,[vc,e.createElementVNode("div",gc,[e.createElementVNode("h3",kc,e.toDisplayString(e.unref(o)("Unarchive")),1),e.createElementVNode("div",yc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,d=>(e.openBlock(),e.createElementBlock("p",xc,[d.type==="dir"?(e.openBlock(),e.createElementBlock("svg",_c,bc)):(e.openBlock(),e.createElementBlock("svg",Ec,Nc)),e.createElementVNode("span",Sc,e.toDisplayString(d.basename),1)]))),256)),e.createElementVNode("p",$c,e.toDisplayString(e.unref(o)("The archive will be unarchived at"))+" ("+e.toDisplayString(e.unref(t).fs.data.dirname)+")",1),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:l[0]||(l[0]=d=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},Bc={class:"sm:flex sm:items-start"},Cc=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.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"})])],-1),Dc={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Tc={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Mc={class:"mt-2"},Ac={class:"text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",style:{"max-height":"200px"}},Lc={class:"flex text-sm text-gray-800 dark:text-gray-400"},Oc={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Fc=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1),Hc=[Fc],Rc={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},zc=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1),jc=[zc],Ic={class:"ml-1.5"},Uc=["placeholder"],er={__name:"ModalArchive",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(""),r=e.ref(""),c=e.ref(t.modal.data.items),a=()=>{c.value.length&&t.emitter.emit("vf-fetch",{params:{q:"archive",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{items:c.value.map(({path:i,type:l})=>({path:i,type:l})),name:s.value},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("The file(s) archived.")})},onError:i=>{r.value=o(i.message)}})};return(i,l)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:a,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Archive")),1),e.createElementVNode("button",{type:"button",onClick:l[2]||(l[2]=d=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Bc,[Cc,e.createElementVNode("div",Dc,[e.createElementVNode("h3",Tc,e.toDisplayString(e.unref(o)("Archive the files")),1),e.createElementVNode("div",Mc,[e.createElementVNode("div",Ac,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,d=>(e.openBlock(),e.createElementBlock("p",Lc,[d.type==="dir"?(e.openBlock(),e.createElementBlock("svg",Oc,Hc)):(e.openBlock(),e.createElementBlock("svg",Rc,jc)),e.createElementVNode("span",Ic,e.toDisplayString(d.basename),1)]))),256))]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=d=>s.value=d),onKeyup:e.withKeys(a,["enter"]),class:"my-1 px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:e.unref(o)("Archive name. (.zip file will be created)"),type:"text"},null,40,Uc),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:l[1]||(l[1]=d=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},Pc={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"},qc=e.createElementVNode("path",{d:"M12 10.5v6m3-3H9m4.06-7.19-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44z"},null,-1),Gc=[qc];function Kc(n,t){return e.openBlock(),e.createElementBlock("svg",Pc,[...Gc])}const Wc={render:Kc},Yc={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"},Xc=e.createElementVNode("path",{d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.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 0 0-9-9"},null,-1),Jc=[Xc];function Qc(n,t){return e.openBlock(),e.createElementBlock("svg",Yc,[...Jc])}const Zc={render:Qc},ei={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},ti=e.createElementVNode("path",{d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"},null,-1),ni=[ti];function oi(n,t){return e.openBlock(),e.createElementBlock("svg",ei,[...ni])}const ri={render:oi},si={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},li=e.createElementVNode("path",{d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21q.512.078 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48 48 0 0 0-3.478-.397m-12 .562q.51-.089 1.022-.165m0 0a48 48 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a52 52 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a49 49 0 0 0-7.5 0"},null,-1),ai=[li];function ci(n,t){return e.openBlock(),e.createElementBlock("svg",si,[...ai])}const ii={render:ci},di={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"},ui=e.createElementVNode("path",{d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"},null,-1),mi=[ui];function fi(n,t){return e.openBlock(),e.createElementBlock("svg",di,[...mi])}const pi={render:fi},hi={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},vi=e.createElementVNode("path",{d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-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.125"},null,-1),gi=[vi];function ki(n,t){return e.openBlock(),e.createElementBlock("svg",hi,[...gi])}const yi={render:ki},xi={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},_i=e.createElementVNode("path",{d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5m6 4.125 2.25 2.25m0 0 2.25 2.25M12 13.875l2.25-2.25M12 13.875l-2.25 2.25M3.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.125"},null,-1),wi=[_i];function bi(n,t){return e.openBlock(),e.createElementBlock("svg",xi,[...wi])}const Ei={render:bi},Vi={xmlns:"http://www.w3.org/2000/svg",fill:"none",class:"animate-spin p-0.5 h-5 w-5 text-white ml-auto",viewBox:"0 0 24 24"},Ni=e.createElementVNode("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",class:"opacity-25 stroke-blue-900 dark:stroke-blue-100"},null,-1),Si=e.createElementVNode("path",{fill:"currentColor",d:"M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12zm2 5.291A7.96 7.96 0 0 1 4 12H0c0 3.042 1.135 5.824 3 7.938z",class:"opacity-75"},null,-1),$i=[Ni,Si];function Bi(n,t){return e.openBlock(),e.createElementBlock("svg",Vi,[...$i])}const Mn={render:Bi},Ci={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"},Di=e.createElementVNode("path",{d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"},null,-1),Ti=[Di];function Mi(n,t){return e.openBlock(),e.createElementBlock("svg",Ci,[...Ti])}const Ai={render:Mi},Li={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"},Oi=e.createElementVNode("path",{d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"},null,-1),Fi=[Oi];function Hi(n,t){return e.openBlock(),e.createElementBlock("svg",Li,[...Fi])}const Ri={render:Hi},zi={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},ji=e.createElementVNode("path",{d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25zm0 9.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18zM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25zm0 9.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18z"},null,-1),Ii=[ji];function Ui(n,t){return e.openBlock(),e.createElementBlock("svg",zi,[...Ii])}const Pi={render:Ui},qi={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},Gi=e.createElementVNode("path",{d:"M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 0 1 0 3.75H5.625a1.875 1.875 0 0 1 0-3.75"},null,-1),Ki=[Gi];function Wi(n,t){return e.openBlock(),e.createElementBlock("svg",qi,[...Ki])}const Yi={render:Wi},Xi={class:"border-neutral-300 flex justify-between items-center py-1 text-sm grow-0"},Ji={key:0,class:"flex text-center"},Qi=["title"],Zi=["title"],ed=["title"],td=["title"],nd=["title"],od=["title"],rd=["title"],sd={key:1,class:"flex text-center"},ld={class:"pl-2"},ad={class:"dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded"},cd={class:"flex text-center items-center justify-end"},id=["title"],dd=["title"],ud={__name:"Toolbar",setup(n){const t=e.inject("ServiceContainer"),{setStore:o}=t.storage,{t:s}=t.i18n,r=t.dragSelect,c=e.ref("");t.emitter.on("vf-search-query",({newQuery:l})=>{c.value=l});const a=()=>{t.fullScreen=!t.fullScreen};e.watch(()=>t.fullScreen,()=>{t.fullScreen?document.querySelector("body").style.overflow="hidden":document.querySelector("body").style.overflow="",o("full-screen",t.fullScreen),t.emitter.emit("vf-fullscreen-toggle")});const i=()=>{t.view=t.view==="list"?"grid":"list",r.refreshSelection(),o("viewport",t.view)};return(l,d)=>(e.openBlock(),e.createElementBlock("div",Xi,[c.value.length?(e.openBlock(),e.createElementBlock("div",sd,[e.createElementVNode("div",ld,[e.createTextVNode(e.toDisplayString(e.unref(s)("Search results for"))+" ",1),e.createElementVNode("span",ad,e.toDisplayString(c.value),1)]),e.unref(t).fs.loading?(e.openBlock(),e.createBlock(e.unref(Mn),{key:0})):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Ji,[e.unref(t).features.includes(e.unref(ne).NEW_FOLDER)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mx-1.5",title:e.unref(s)("New Folder"),onClick:d[0]||(d[0]=m=>e.unref(t).modal.open(Qo,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(Wc))],8,Qi)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).NEW_FILE)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"mx-1.5",title:e.unref(s)("New File"),onClick:d[1]||(d[1]=m=>e.unref(t).modal.open(Ga,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(Zc))],8,Zi)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).RENAME)?(e.openBlock(),e.createElementBlock("div",{key:2,class:"mx-1.5",title:e.unref(s)("Rename"),onClick:d[2]||(d[2]=m=>e.unref(r).getCount()!==1||e.unref(t).modal.open(Tn,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(ri),{class:e.normalizeClass(e.unref(r).getCount()===1?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,ed)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).DELETE)?(e.openBlock(),e.createElementBlock("div",{key:3,class:"mx-1.5",title:e.unref(s)("Delete"),onClick:d[3]||(d[3]=m=>!e.unref(r).getCount()||e.unref(t).modal.open(Dn,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(ii),{class:e.normalizeClass(e.unref(r).getCount()?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,td)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).UPLOAD)?(e.openBlock(),e.createElementBlock("div",{key:4,class:"mx-1.5",title:e.unref(s)("Upload"),onClick:d[4]||(d[4]=m=>e.unref(t).modal.open(pc,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(pi))],8,nd)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).UNARCHIVE)&&e.unref(r).getCount()===1&&e.unref(r).getSelected()[0].mime_type==="application/zip"?(e.openBlock(),e.createElementBlock("div",{key:5,class:"mx-1.5",title:e.unref(s)("Unarchive"),onClick:d[5]||(d[5]=m=>!e.unref(r).getCount()||e.unref(t).modal.open(Zo,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(Ei),{class:e.normalizeClass(e.unref(r).getCount()?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,od)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).ARCHIVE)?(e.openBlock(),e.createElementBlock("div",{key:6,class:"mx-1.5",title:e.unref(s)("Archive"),onClick:d[6]||(d[6]=m=>!e.unref(r).getCount()||e.unref(t).modal.open(er,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(yi),{class:e.normalizeClass(e.unref(r).getCount()?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,rd)):e.createCommentVNode("",!0)])),e.createElementVNode("div",cd,[e.unref(t).features.includes(e.unref(ne).FULL_SCREEN)?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:a,class:"mx-1.5",title:e.unref(s)("Toggle Full Screen")},[e.unref(t).fullScreen?(e.openBlock(),e.createBlock(e.unref(Ri),{key:0})):(e.openBlock(),e.createBlock(e.unref(Ai),{key:1}))],8,id)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"mx-1.5",title:e.unref(s)("Change View"),onClick:d[7]||(d[7]=m=>c.value.length||i())},[e.unref(t).view==="grid"?(e.openBlock(),e.createBlock(e.unref(Pi),{key:0,class:e.normalizeClass(c.value.length?"vf-toolbar-icon-disabled":"vf-toolbar-icon")},null,8,["class"])):e.createCommentVNode("",!0),e.unref(t).view==="list"?(e.openBlock(),e.createBlock(e.unref(Yi),{key:1,class:e.normalizeClass(c.value.length?"vf-toolbar-icon-disabled":"vf-toolbar-icon")},null,8,["class"])):e.createCommentVNode("",!0)],8,dd)])]))}},md=(n,t=0,o=!1)=>{let s;return(...r)=>{o&&!s&&n(...r),clearTimeout(s),s=setTimeout(()=>{n(...r)},t)}},lo=(n,t,o)=>{const s=e.ref(n);return e.customRef((r,c)=>({get(){return r(),s.value},set:md(a=>{s.value=a,c()},t,o)}))},fd={class:"sm:flex sm:items-start"},pd=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})])],-1),hd={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},vd={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},gd={class:"text-sm text-gray-500 pb-1"},kd={class:"max-h-[200px] overflow-y-auto vf-scrollbar text-left"},yd={class:"flex text-sm text-gray-800 dark:text-gray-400"},xd={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},_d=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1),wd=[_d],bd={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Ed=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1),Vd=[Ed],Nd={class:"ml-1.5"},Sd={class:"font-bold text-xs text-gray-700 dark:text-gray-500 mt-3 tracking-wider"},$d={class:"flex text-sm text-gray-800 dark:text-gray-400 border dark:border-gray-700 p-1 rounded"},Bd=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})],-1),Cd={class:"ml-1.5 overflow-auto"},Dd={class:"m-1 mr-auto font-bold text-gray-500 text-sm dark:text-gray-200 self-center"},gn={__name:"ModalMove",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(t.modal.data.items.from),r=e.ref(""),c=()=>{s.value.length&&t.emitter.emit("vf-fetch",{params:{q:"move",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{items:s.value.map(({path:a,type:i})=>({path:a,type:i})),item:t.modal.data.items.to.path},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("Files moved.",t.modal.data.items.to.name)})},onError:a=>{r.value=o(a.message)}})};return(a,i)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:c,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Yes, Move!")),1),e.createElementVNode("button",{type:"button",onClick:i[1]||(i[1]=l=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1),e.createElementVNode("div",Dd,e.toDisplayString(e.unref(o)("%s item(s) selected.",s.value.length)),1)]),default:e.withCtx(()=>[e.createElementVNode("div",fd,[pd,e.createElementVNode("div",hd,[e.createElementVNode("h3",vd,e.toDisplayString(e.unref(o)("Move files")),1),e.createElementVNode("p",gd,e.toDisplayString(e.unref(o)("Are you sure you want to move these files?")),1),e.createElementVNode("div",kd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,l=>(e.openBlock(),e.createElementBlock("div",yd,[e.createElementVNode("div",null,[l.type==="dir"?(e.openBlock(),e.createElementBlock("svg",xd,wd)):(e.openBlock(),e.createElementBlock("svg",bd,Vd))]),e.createElementVNode("div",Nd,e.toDisplayString(l.path),1)]))),256))]),e.createElementVNode("h4",Sd,e.toDisplayString(e.unref(o)("Target Directory")),1),e.createElementVNode("p",$d,[Bd,e.createElementVNode("span",Cd,e.toDisplayString(e.unref(t).modal.data.items.to.path),1)]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:i[0]||(i[0]=l=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])]),_:1}))}},Td={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-1 rounded text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer",viewBox:"-40 -40 580 580"},Md=e.createElementVNode("path",{d:"M463.5 224h8.5c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2S461.9 48.1 455 55l-41.6 41.6c-87.6-86.5-228.7-86.2-315.8 1-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2S334.3 224 344 224z"},null,-1),Ad=[Md];function Ld(n,t){return e.openBlock(),e.createElementBlock("svg",Td,[...Ad])}const Od={render:Ld},Fd={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-0.5 rounded",viewBox:"0 0 20 20"},Hd=e.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 9.707a1 1 0 0 1 0-1.414l4-4a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L11 7.414V15a1 1 0 1 1-2 0V7.414L6.707 9.707a1 1 0 0 1-1.414 0",class:"pointer-events-none","clip-rule":"evenodd"},null,-1),Rd=[Hd];function zd(n,t){return e.openBlock(),e.createElementBlock("svg",Fd,[...Rd])}const jd={render:zd},Id={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"h-6 w-6 p-1 rounded text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer",viewBox:"0 0 24 24"},Ud=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1),Pd=[Ud];function qd(n,t){return e.openBlock(),e.createElementBlock("svg",Id,[...Pd])}const Gd={render:qd},Kd={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-1 rounded text-slate-700 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-gray-800 cursor-pointer",viewBox:"0 0 20 20"},Wd=e.createElementVNode("path",{d:"M10.707 2.293a1 1 0 0 0-1.414 0l-7 7a1 1 0 0 0 1.414 1.414L4 10.414V17a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-6.586l.293.293a1 1 0 0 0 1.414-1.414z",class:"pointer-events-none"},null,-1),Yd=[Wd];function Xd(n,t){return e.openBlock(),e.createElementBlock("svg",Kd,[...Yd])}const Jd={render:Xd},Qd={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-1 m-auto stroke-gray-400 fill-gray-100 dark:stroke-gray-400 dark:fill-gray-400/20",viewBox:"0 0 20 20"},Zd=e.createElementVNode("path",{d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607"},null,-1),eu=[Zd];function tu(n,t){return e.openBlock(),e.createElementBlock("svg",Qd,[...eu])}const nu={render:tu},ou={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"w-6 h-6 cursor-pointer",viewBox:"0 0 24 24"},ru=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1),su=[ru];function lu(n,t){return e.openBlock(),e.createElementBlock("svg",ou,[...su])}const au={render:lu},cu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",viewBox:"0 0 24 24"},iu=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-6l-2-2H5a2 2 0 0 0-2 2"},null,-1),du=[iu];function uu(n,t){return e.openBlock(),e.createElementBlock("svg",cu,[...du])}const zt={render:uu},mu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",class:"h-6 w-6 p-1 rounded text-slate-700 dark:text-neutral-300 cursor-pointer",viewBox:"0 0 24 24"},fu=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),pu=e.createElementVNode("path",{d:"M9 6h11M12 12h8M15 18h5M5 6v.01M8 12v.01M11 18v.01"},null,-1),hu=[fu,pu];function vu(n,t){return e.openBlock(),e.createElementBlock("svg",mu,[...hu])}const gu={render:vu},ku={xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 rounded text-slate-700 hover:bg-neutral-100 dark:fill-neutral-300 dark:hover:bg-gray-800 cursor-pointer",viewBox:"0 0 448 512"},yu=e.createElementVNode("path",{d:"M8 256a56 56 0 1 1 112 0 56 56 0 1 1-112 0m160 0a56 56 0 1 1 112 0 56 56 0 1 1-112 0m216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112"},null,-1),xu=[yu];function _u(n,t){return e.openBlock(),e.createElementBlock("svg",ku,[...xu])}const wu={render:_u},bu={class:"space-x-0.5 flex p-1.5 bg-neutral-100 dark:bg-gray-800 border-t border-b border-neutral-300 dark:border-gray-700/50 items-center select-none text-sm grow-0"},Eu=["title"],Vu=["title"],Nu=["title"],Su=["title"],$u={class:"flex leading-6"},Bu={key:0,class:"flex"},Cu=e.createElementVNode("div",{class:"text-neutral-300 dark:text-gray-600 mx-0.5"},"/",-1),Du={class:"relative"},Tu=e.createElementVNode("span",{class:"text-neutral-300 dark:text-gray-600 mx-0.5"},"/",-1),Mu=["onDragover","onDragleave","onDrop","title","onClick"],Au={class:"relative flex bg-white dark:bg-gray-700 justify-between items-center rounded p-1 ml-2 w-full"},Lu=["placeholder"],Ou={class:"z-30 absolute top-[65px] md:top-[75px] left-[90px] rounded -mx-1.5 mt-1 bg-neutral-50 dark:bg-gray-800 max-w-80 max-h-50 shadow overflow-y-auto text-gray-700 dark:text-gray-200 border border-neutral-300 dark:border-gray-600"},Fu=["onDrop","onClick"],Hu={class:"flex pointer-events-none"},Ru={class:"inline-block w-full text-ellipsis overflow-hidden"},zu={__name:"Breadcrumb",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=t.dragSelect,{setStore:r}=t.storage,c=e.ref(null),a=lo(0,100);e.watch(a,$=>{const b=c.value.children;let B=0,E=0,_=5,C=1;t.fs.limitBreadcrumbItems(_),e.nextTick(()=>{for(let x=b.length-1;x>=0&&!(B+b[x].offsetWidth>a.value-40);x--)B+=parseInt(b[x].offsetWidth,10),E++;E<C&&(E=C),E>_&&(E=_),t.fs.limitBreadcrumbItems(E)})});const i=()=>{a.value=c.value.offsetWidth};e.onMounted(()=>{new ResizeObserver(i).observe(c.value)});const l=($,b=null)=>{$.preventDefault(),s.isDraggingRef.value=!1,u($),b??(b=t.fs.hiddenBreadcrumbs.length-1);let B=JSON.parse($.dataTransfer.getData("items"));if(B.find(E=>E.storage!==t.fs.adapter)){alert("Moving items between different storages is not supported yet.");return}t.modal.open(gn,{items:{from:B,to:t.fs.hiddenBreadcrumbs[b]??{path:t.fs.adapter+"://"}}})},d=($,b=null)=>{$.preventDefault(),s.isDraggingRef.value=!1,u($),b??(b=t.fs.breadcrumbs.length-2);let B=JSON.parse($.dataTransfer.getData("items"));if(B.find(E=>E.storage!==t.fs.adapter)){alert("Moving items between different storages is not supported yet.");return}t.modal.open(gn,{items:{from:B,to:t.fs.breadcrumbs[b]??{path:t.fs.adapter+"://"}}})},m=$=>{$.preventDefault(),t.fs.isGoUpAvailable()?($.dataTransfer.dropEffect="copy",$.currentTarget.classList.add("bg-blue-200","dark:bg-slate-600")):($.dataTransfer.dropEffect="none",$.dataTransfer.effectAllowed="none")},u=$=>{$.preventDefault(),$.currentTarget.classList.remove("bg-blue-200","dark:bg-slate-600"),t.fs.isGoUpAvailable()&&$.currentTarget.classList.remove("bg-blue-200","dark:bg-slate-600")},p=()=>{N(),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname}})},f=()=>{N(),!t.fs.isGoUpAvailable()||t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.parentFolderPath}})},h=$=>{t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:$.path}}),t.fs.toggleHiddenBreadcrumbs(!1)},g=()=>{t.fs.showHiddenBreadcrumbs&&t.fs.toggleHiddenBreadcrumbs(!1)},v={mounted($,b,B,E){$.clickOutsideEvent=function(_){$===_.target||$.contains(_.target)||b.value()},document.body.addEventListener("click",$.clickOutsideEvent)},beforeUnmount($,b,B,E){document.body.removeEventListener("click",$.clickOutsideEvent)}},V=()=>{t.showTreeView=!t.showTreeView};e.watch(()=>t.showTreeView,($,b)=>{$!==b&&r("show-tree-view",$)});const y=e.ref(null),O=()=>{t.features.includes(ne.SEARCH)&&(t.fs.searchMode=!0,e.nextTick(()=>y.value.focus()))},D=lo("",400);e.watch(D,$=>{t.emitter.emit("vf-toast-clear"),t.emitter.emit("vf-search-query",{newQuery:$})}),e.watch(()=>t.fs.searchMode,$=>{$&&e.nextTick(()=>y.value.focus())});const N=()=>{t.fs.searchMode=!1,D.value=""};t.emitter.on("vf-search-exit",()=>{N()});const S=()=>{D.value===""&&N()};return($,b)=>(e.openBlock(),e.createElementBlock("div",bu,[e.createElementVNode("span",{title:e.unref(o)("Toggle Tree View")},[e.createVNode(e.unref(gu),{onClick:V,class:e.normalizeClass(["h-6 w-6 p-0.5 rounded cursor-pointer text-slate-700",e.unref(t).showTreeView?"bg-gray-300 dark:bg-gray-700":""])},null,8,["class"])],8,Eu),e.createElementVNode("span",{title:e.unref(o)("Go up a directory")},[e.createVNode(e.unref(jd),{onDragover:b[0]||(b[0]=B=>m(B)),onDragleave:b[1]||(b[1]=B=>u(B)),onDrop:b[2]||(b[2]=B=>d(B)),onClick:f,class:e.normalizeClass(e.unref(t).fs.isGoUpAvailable()?"text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer":"text-gray-400 dark:text-neutral-500")},null,8,["class"])],8,Vu),e.unref(t).fs.loading?(e.openBlock(),e.createElementBlock("span",{key:1,title:e.unref(o)("Cancel")},[e.createVNode(e.unref(Gd),{onClick:b[3]||(b[3]=B=>e.unref(t).emitter.emit("vf-fetch-abort"))})],8,Su)):(e.openBlock(),e.createElementBlock("span",{key:0,title:e.unref(o)("Refresh")},[e.createVNode(e.unref(Od),{onClick:p})],8,Nu)),e.withDirectives(e.createElementVNode("div",{onClick:e.withModifiers(O,["self"]),class:"group flex bg-white dark:bg-gray-700 items-center rounded p-1 ml-2 w-full overflow-hidden"},[e.createElementVNode("div",null,[e.createVNode(e.unref(Jd),{onDragover:b[4]||(b[4]=B=>m(B)),onDragleave:b[5]||(b[5]=B=>u(B)),onDrop:b[6]||(b[6]=B=>d(B,-1)),onClick:b[7]||(b[7]=B=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:e.unref(t).fs.adapter}}))})]),e.createElementVNode("div",$u,[e.unref(t).fs.hiddenBreadcrumbs.length?e.withDirectives((e.openBlock(),e.createElementBlock("div",Bu,[Cu,e.createElementVNode("div",Du,[e.createElementVNode("span",{onDragenter:b[8]||(b[8]=B=>e.unref(t).fs.toggleHiddenBreadcrumbs(!0)),onClick:b[9]||(b[9]=B=>e.unref(t).fs.toggleHiddenBreadcrumbs()),class:"text-slate-700 dark:text-slate-200 hover:bg-neutral-100 dark:hover:bg-gray-800 rounded cursor-pointer"},[e.createVNode(e.unref(wu),{class:"px-1 pointer-events-none"})],32)])])),[[v,g]]):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"breadcrumbContainer",ref:c,class:"flex leading-6 w-full overflow-hidden",onClick:e.withModifiers(O,["self"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.breadcrumbs,(B,E)=>(e.openBlock(),e.createElementBlock("div",{key:E},[Tu,e.createElementVNode("span",{onDragover:_=>E===e.unref(t).fs.breadcrumbs.length-1||m(_),onDragleave:_=>E===e.unref(t).fs.breadcrumbs.length-1||u(_),onDrop:_=>E===e.unref(t).fs.breadcrumbs.length-1||d(_,E),class:"px-1.5 py-1 text-slate-700 dark:text-slate-200 hover:bg-neutral-100 dark:hover:bg-gray-800 rounded cursor-pointer whitespace-nowrap",title:B.basename,onClick:_=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:e.unref(t).fs.adapter,path:B.path}})},e.toDisplayString(B.name),41,Mu)]))),128))],512),e.unref(t).fs.loading?(e.openBlock(),e.createBlock(e.unref(Mn),{key:0})):e.createCommentVNode("",!0)],512),[[e.vShow,!e.unref(t).fs.searchMode]]),e.withDirectives(e.createElementVNode("div",Au,[e.createElementVNode("div",null,[e.createVNode(e.unref(nu))]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:y,onKeydown:e.withKeys(N,["esc"]),onBlur:S,"onUpdate:modelValue":b[10]||(b[10]=B=>e.isRef(D)?D.value=B:null),placeholder:e.unref(o)("Search anything.."),class:"w-full pb-0 px-1 border-0 text-base ring-0 outline-0 text-gray-600 focus:ring-transparent focus:border-transparent dark:focus:ring-transparent dark:focus:border-transparent dark:text-gray-300 bg-transparent",type:"text"},null,40,Lu),[[e.vModelText,e.unref(D)]]),e.createVNode(e.unref(au),{onClick:N})],512),[[e.vShow,e.unref(t).fs.searchMode]]),e.withDirectives(e.createElementVNode("div",Ou,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.hiddenBreadcrumbs,(B,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,onDragover:b[11]||(b[11]=_=>m(_)),onDragleave:b[12]||(b[12]=_=>u(_)),onDrop:_=>l(_,E),onClick:_=>h(B),class:"px-2 py-0.5 hover:bg-gray-400/20 cursor-pointer items-center whitespace-nowrap"},[e.createElementVNode("div",Hu,[e.createElementVNode("span",null,[e.createVNode(e.unref(zt),{class:"h-5 w-5"})]),e.createTextVNode(),e.createElementVNode("span",Ru,e.toDisplayString(B.name),1)])],40,Fu))),128))],512),[[e.vShow,e.unref(t).fs.showHiddenBreadcrumbs]])]))}},tr=(n,t=null)=>new Date(n*1e3).toLocaleString(t??navigator.language??"en-US"),ju=["onClick"],Iu={__name:"Toast",setup(n){const t=e.inject("ServiceContainer"),{getStore:o}=t.storage,s=e.ref(o("full-screen",!1)),r=e.ref([]),c=l=>l==="error"?"text-red-400 border-red-400 dark:text-red-300 dark:border-red-300":"text-lime-600 border-lime-600 dark:text-lime-300 dark:border-lime-1300",a=l=>{r.value.splice(l,1)},i=l=>{let d=r.value.findIndex(m=>m.id===l);d!==-1&&a(d)};return t.emitter.on("vf-toast-clear",()=>{r.value=[]}),t.emitter.on("vf-toast-push",l=>{let d=new Date().getTime().toString(36).concat(performance.now().toString(),Math.random().toString()).replace(/\./g,"");l.id=d,r.value.push(l),setTimeout(()=>{i(d)},5e3)}),(l,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([s.value.value?"fixed":"absolute","max-w-fit flex flex-col bottom-0 left-1/2 -translate-x-1/2 z-10"])},[e.createVNode(e.TransitionGroup,{name:"vf-toast-item","leave-active-class":"transition-all duration-1000","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(m,u)=>(e.openBlock(),e.createElementBlock("div",{onClick:p=>a(u),key:m,class:e.normalizeClass([c(m.type),"inline-block mx-auto my-0.5 py-0.5 px-2 min-w-max bg-gray-50 dark:bg-gray-600 border text-xs sm:text-sm rounded cursor-pointer"])},e.toDisplayString(m.label),11,ju))),128))]),_:1})],2))}},Uu={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 20 20"},Pu=e.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 0 1 1.414 0L10 10.586l3.293-3.293a1 1 0 1 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 0-1.414","clip-rule":"evenodd"},null,-1),qu=[Pu];function Gu(n,t){return e.openBlock(),e.createElementBlock("svg",Uu,[...qu])}const Ku={render:Gu},Wu={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 20 20"},Yu=e.createElementVNode("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 0 1-1.414 0L10 9.414l-3.293 3.293a1 1 0 0 1-1.414-1.414l4-4a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1 0 1.414","clip-rule":"evenodd"},null,-1),Xu=[Yu];function Ju(n,t){return e.openBlock(),e.createElementBlock("svg",Wu,[...Xu])}const Qu={render:Ju},_t={__name:"SortIcon",props:{direction:String},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",null,[n.direction==="asc"?(e.openBlock(),e.createBlock(e.unref(Ku),{key:0})):e.createCommentVNode("",!0),n.direction==="desc"?(e.openBlock(),e.createBlock(e.unref(Qu),{key:1})):e.createCommentVNode("",!0)]))}},Zu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"text-neutral-500",viewBox:"0 0 24 24"},em=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 0 0 2-2V9.414a1 1 0 0 0-.293-.707l-5.414-5.414A1 1 0 0 0 12.586 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2"},null,-1),tm=[em];function nm(n,t){return e.openBlock(),e.createElementBlock("svg",Zu,[...tm])}const om={render:nm},Xt={__name:"ItemIcon",props:{type:{type:String,required:!0},small:{type:Boolean,default:!1}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("span",null,[n.type==="dir"?(e.openBlock(),e.createBlock(e.unref(zt),{key:0,class:e.normalizeClass({"h-5 w-5":n.small,"h-10 w-10 md:h-12 md:w-12 m-auto":!n.small})},null,8,["class"])):(e.openBlock(),e.createBlock(e.unref(om),{key:1,class:e.normalizeClass({"h-5 w-5":n.small,"h-10 w-10 md:h-12 md:w-12 m-auto":!n.small})},null,8,["class"]))]))}},rm={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"absolute h-6 w-6 md:h-12 md:w-12 m-auto stroke-neutral-500 fill-white dark:fill-gray-700 dark:stroke-gray-600 z-10",viewBox:"0 0 24 24"},sm=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 0 0 2-2V9.414a1 1 0 0 0-.293-.707l-5.414-5.414A1 1 0 0 0 12.586 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2"},null,-1),lm=[sm];function am(n,t){return e.openBlock(),e.createElementBlock("svg",rm,[...lm])}const cm={render:am},im={class:"absolute -z-50 -top-96"},dm={class:"text-neutral-700 dark:text-neutral-300 p-1 absolute text-center top-4 right-[-2rem] md:top-5 md:right-[-2.4rem] z-20 text-xs"},um={__name:"DragItem",props:{count:{type:Number,default:0}},setup(n){const t=n;return(o,s)=>(e.openBlock(),e.createElementBlock("div",im,[e.createVNode(e.unref(cm)),e.createElementVNode("div",dm,e.toDisplayString(t.count),1)]))}},mm={class:"flex"},fm=["title"],pm={class:"ml-auto mb-2"},hm={key:0,class:"p-2 border font-normal whitespace-pre-wrap border-gray-200 dark:border-gray-700/50 dark:text-gray-200 rounded min-h-[200px] max-h-[60vh] text-xs overflow-auto"},vm={key:1},gm={__name:"Text",emits:["success"],setup(n,{emit:t}){const o=t,s=e.ref(""),r=e.ref(""),c=e.ref(null),a=e.ref(!1),i=e.ref(""),l=e.ref(!1),d=e.inject("ServiceContainer"),{t:m}=d.i18n;e.onMounted(()=>{d.requester.send({url:"",method:"get",params:{q:"preview",adapter:d.modal.data.adapter,path:d.modal.data.item.path},responseType:"text"}).then(f=>{s.value=f,o("success")})});const u=()=>{a.value=!a.value,r.value=s.value},p=()=>{i.value="",l.value=!1,d.requester.send({url:"",method:"post",params:{q:"save",adapter:d.modal.data.adapter,path:d.modal.data.item.path},body:{content:r.value},responseType:"text"}).then(f=>{i.value=m("Updated."),s.value=f,o("success"),a.value=!a.value}).catch(f=>{i.value=m(f.message),l.value=!0})};return(f,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",mm,[e.createElementVNode("div",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(d).modal.data.item.path},e.toDisplayString(e.unref(d).modal.data.item.basename),9,fm),e.createElementVNode("div",pm,[a.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:p,class:"ml-1 px-2 py-1 rounded border border-transparent shadow-sm bg-blue-700/75 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-700/50 text-base font-medium text-white sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(m)("Save")),1)):e.createCommentVNode("",!0),e.unref(d).features.includes(e.unref(ne).EDIT)?(e.openBlock(),e.createElementBlock("button",{key:1,class:"ml-1 px-2 py-1 text-blue-500",onClick:h[0]||(h[0]=g=>u())},e.toDisplayString(a.value?e.unref(m)("Cancel"):e.unref(m)("Edit")),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[a.value?(e.openBlock(),e.createElementBlock("div",vm,[e.withDirectives(e.createElementVNode("textarea",{ref_key:"editInput",ref:c,"onUpdate:modelValue":h[1]||(h[1]=g=>r.value=g),class:"w-full p-2 rounded dark:bg-gray-700 dark:text-gray-200 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:selection:bg-gray-500 min-h-[200px] max-h-[60vh]",name:"text",id:"",cols:"30",rows:"10"},null,512),[[e.vModelText,r.value]])])):(e.openBlock(),e.createElementBlock("pre",hm,e.toDisplayString(s.value),1)),i.value.length?(e.openBlock(),e.createBlock(De,{key:2,onHidden:h[2]||(h[2]=g=>i.value=""),error:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)])],64))}},km={class:"flex"},ym=["title"],xm={class:"ml-auto mb-2"},_m={class:"w-full flex justify-center"},wm=["src"],bm={__name:"Image",emits:["success"],setup(n,{emit:t}){const o=t,s=e.inject("ServiceContainer"),{t:r}=s.i18n,c=e.ref(null),a=e.ref(null),i=e.ref(!1),l=e.ref(""),d=e.ref(!1),m=()=>{i.value=!i.value,i.value?a.value=new xr(c.value,{crop(p){}}):a.value.destroy()},u=()=>{a.value.getCroppedCanvas({width:795,height:341}).toBlob(p=>{l.value="",d.value=!1;const f=new FormData;f.set("file",p),s.requester.send({url:"",method:"post",params:{q:"upload",adapter:s.modal.data.adapter,path:s.modal.data.item.path},body:f}).then(h=>{l.value=r("Updated."),c.value.src=s.requester.getPreviewUrl(s.modal.data.adapter,s.modal.data.item),m(),o("success")}).catch(h=>{l.value=r(h.message),d.value=!0})})};return e.onMounted(()=>{o("success")}),(p,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",km,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(s).modal.data.item.path},e.toDisplayString(e.unref(s).modal.data.item.basename),9,ym),e.createElementVNode("div",xm,[i.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:u,class:"ml-1 px-2 py-1 rounded border border-transparent shadow-sm bg-blue-700/75 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-700/50 text-base font-medium text-white sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(r)("Crop")),1)):e.createCommentVNode("",!0),e.unref(s).features.includes(e.unref(ne).EDIT)?(e.openBlock(),e.createElementBlock("button",{key:1,class:"ml-1 px-2 py-1 text-blue-500",onClick:f[0]||(f[0]=h=>m())},e.toDisplayString(i.value?e.unref(r)("Cancel"):e.unref(r)("Edit")),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",_m,[e.createElementVNode("img",{ref_key:"image",ref:c,class:"max-w-[50vh] max-h-[50vh]",src:e.unref(s).requester.getPreviewUrl(e.unref(s).modal.data.adapter,e.unref(s).modal.data.item),alt:""},null,8,wm)]),l.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:f[1]||(f[1]=h=>l.value=""),error:d.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)],64))}},Em={class:"flex"},Vm=["title"],Nm=e.createElementVNode("div",null,null,-1),Sm={__name:"Default",emits:["success"],setup(n,{emit:t}){const o=e.inject("ServiceContainer"),s=t;return e.onMounted(()=>{s("success")}),(r,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Em,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(o).modal.data.item.path},e.toDisplayString(e.unref(o).modal.data.item.basename),9,Vm)]),Nm],64))}},$m=["title"],Bm={class:"w-full aspect-video",preload:"",controls:""},Cm=["src"],Dm={__name:"Video",emits:["success"],setup(n,{emit:t}){const o=e.inject("ServiceContainer"),s=t,r=()=>o.requester.getPreviewUrl(o.modal.data.adapter,o.modal.data.item);return e.onMounted(()=>{s("success")}),(c,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(o).modal.data.item.path},e.toDisplayString(e.unref(o).modal.data.item.basename),9,$m),e.createElementVNode("div",null,[e.createElementVNode("video",Bm,[e.createElementVNode("source",{src:r(),type:"video/mp4"},null,8,Cm),e.createTextVNode(" Your browser does not support the video tag. ")])])]))}},Tm=["title"],Mm={class:"w-full",controls:""},Am=["src"],Lm={__name:"Audio",emits:["success"],setup(n,{emit:t}){const o=t,s=e.inject("ServiceContainer"),r=()=>s.requester.getPreviewUrl(s.modal.data.adapter,s.modal.data.item);return e.onMounted(()=>{o("success")}),(c,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(s).modal.data.item.path},e.toDisplayString(e.unref(s).modal.data.item.basename),9,Tm),e.createElementVNode("div",null,[e.createElementVNode("audio",Mm,[e.createElementVNode("source",{src:r(),type:"audio/mpeg"},null,8,Am),e.createTextVNode(" Your browser does not support the audio element. ")])])],64))}},Om=["title"],Fm=["data"],Hm=["src"],Rm=e.createElementVNode("p",null,[e.createTextVNode(" Your browser does not support PDFs. "),e.createElementVNode("a",{href:"https://example.com/test.pdf"},"Download the PDF"),e.createTextVNode(" . ")],-1),zm=[Rm],jm={__name:"Pdf",emits:["success"],setup(n,{emit:t}){const o=e.inject("ServiceContainer"),s=t,r=()=>o.requester.getPreviewUrl(o.modal.data.adapter,o.modal.data.item);return e.onMounted(()=>{s("success")}),(c,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(o).modal.data.item.path},e.toDisplayString(e.unref(o).modal.data.item.basename),9,Om),e.createElementVNode("div",null,[e.createElementVNode("object",{class:"h-[60vh]",data:r(),type:"application/pdf",width:"100%",height:"100%"},[e.createElementVNode("iframe",{class:"border-0",src:r(),width:"100%",height:"100%"},zm,8,Hm)],8,Fm)])],64))}},Im={class:"sm:flex sm:items-start"},Um={class:"mt-3 text-center sm:mt-0 sm:text-left w-full"},Pm={key:0},qm={class:"text-gray-700 dark:text-gray-200 text-sm"},Gm={key:0,class:"flex leading-5"},Km=e.createElementVNode("svg",{class:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25 stroke-blue-900 dark:stroke-blue-100",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1),Wm={class:"py-2 flex font-normal break-all dark:text-gray-200 rounded text-xs"},Ym={class:"font-bold"},Xm={class:"font-bold pl-2"},Jm={key:0,class:"text-xs text-gray-600 dark:text-gray-400"},Qm=["download","href"],nr={__name:"ModalPreview",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(!1),r=a=>(t.modal.data.item.mime_type??"").startsWith(a),c=t.features.includes(ne.PREVIEW);return c||(s.value=!0),(a,i)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:i[6]||(i[6]=l=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Close")),1),e.unref(t).features.includes(e.unref(ne).DOWNLOAD)?(e.openBlock(),e.createElementBlock("a",{key:0,target:"_blank",class:"vf-btn vf-btn-primary",download:e.unref(t).requester.getDownloadUrl(e.unref(t).modal.data.adapter,e.unref(t).modal.data.item),href:e.unref(t).requester.getDownloadUrl(e.unref(t).modal.data.adapter,e.unref(t).modal.data.item)},e.toDisplayString(e.unref(o)("Download")),9,Qm)):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createElementVNode("div",Im,[e.createElementVNode("div",Um,[e.unref(c)?(e.openBlock(),e.createElementBlock("div",Pm,[r("text")?(e.openBlock(),e.createBlock(gm,{key:0,onSuccess:i[0]||(i[0]=l=>s.value=!0)})):r("image")?(e.openBlock(),e.createBlock(bm,{key:1,onSuccess:i[1]||(i[1]=l=>s.value=!0)})):r("video")?(e.openBlock(),e.createBlock(Dm,{key:2,onSuccess:i[2]||(i[2]=l=>s.value=!0)})):r("audio")?(e.openBlock(),e.createBlock(Lm,{key:3,onSuccess:i[3]||(i[3]=l=>s.value=!0)})):r("application/pdf")?(e.openBlock(),e.createBlock(jm,{key:4,onSuccess:i[4]||(i[4]=l=>s.value=!0)})):(e.openBlock(),e.createBlock(Sm,{key:5,onSuccess:i[5]||(i[5]=l=>s.value=!0)}))])):e.createCommentVNode("",!0),e.createElementVNode("div",qm,[s.value===!1?(e.openBlock(),e.createElementBlock("div",Gm,[Km,e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("Loading")),1)])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",Wm,[e.createElementVNode("div",null,[e.createElementVNode("span",Ym,e.toDisplayString(e.unref(o)("File Size"))+": ",1),e.createTextVNode(e.toDisplayString(e.unref(t).filesize(e.unref(t).modal.data.item.file_size)),1)]),e.createElementVNode("div",null,[e.createElementVNode("span",Xm,e.toDisplayString(e.unref(o)("Last Modified"))+": ",1),e.createTextVNode(" "+e.toDisplayString(e.unref(tr)(e.unref(t).modal.data.item.last_modified)),1)])]),e.unref(t).features.includes(e.unref(ne).DOWNLOAD)?(e.openBlock(),e.createElementBlock("div",Jm,[e.createElementVNode("span",null,e.toDisplayString(e.unref(o)(`Download doesn't work? You can try right-click "Download" button, select "Save link as...".`)),1)])):e.createCommentVNode("",!0)]),_:1}))}},Zm={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",class:"h-5 w-5",viewBox:"0 0 24 24"},e0=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),t0=e.createElementVNode("path",{d:"m15 4.5-4 4L7 10l-1.5 1.5 7 7L14 17l1.5-4 4-4M9 15l-4.5 4.5M14.5 4 20 9.5"},null,-1),n0=[e0,t0];function o0(n,t){return e.openBlock(),e.createElementBlock("svg",Zm,[...n0])}const or={render:o0},r0=["data-type","data-item","data-index"],Jt={__name:"Item",props:{item:{type:Object},index:{type:Number},dragImage:{type:Object}},setup(n){const t=e.inject("ServiceContainer"),o=t.dragSelect,s=n,r=f=>{f.type==="dir"?(t.emitter.emit("vf-search-exit"),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:f.path}})):t.modal.open(nr,{adapter:t.fs.adapter,item:f})},c={mounted(f,h,g,v){g.props.draggable&&(f.addEventListener("dragstart",V=>a(V,h.value)),f.addEventListener("dragover",V=>l(V,h.value)),f.addEventListener("drop",V=>i(V,h.value)))},beforeUnmount(f,h,g,v){g.props.draggable&&(f.removeEventListener("dragstart",a),f.removeEventListener("dragover",l),f.removeEventListener("drop",i))}},a=(f,h)=>{if(f.altKey||f.ctrlKey||f.metaKey)return f.preventDefault(),!1;o.isDraggingRef.value=!0,f.dataTransfer.setDragImage(s.dragImage.$el,0,15),f.dataTransfer.effectAllowed="all",f.dataTransfer.dropEffect="copy",f.dataTransfer.setData("items",JSON.stringify(o.getSelected()))},i=(f,h)=>{f.preventDefault(),o.isDraggingRef.value=!1;let g=JSON.parse(f.dataTransfer.getData("items"));if(g.find(v=>v.storage!==t.fs.adapter)){alert("Moving items between different storages is not supported yet.");return}t.modal.open(gn,{items:{from:g,to:h}})},l=(f,h)=>{f.preventDefault(),!h||h.type!=="dir"||o.getSelection().find(g=>g===f.currentTarget)?(f.dataTransfer.dropEffect="none",f.dataTransfer.effectAllowed="none"):f.dataTransfer.dropEffect="copy"};let d=null,m=!1;const u=()=>{d&&clearTimeout(d)},p=f=>{if(!m)m=!0,setTimeout(()=>m=!1,300);else return m=!1,r(s.item),clearTimeout(d),!1;d=setTimeout(()=>{const h=new MouseEvent("contextmenu",{bubbles:!0,cancelable:!1,view:window,button:2,buttons:0,clientX:f.target.getBoundingClientRect().x,clientY:f.target.getBoundingClientRect().y});f.target.dispatchEvent(h)},500)};return(f,h)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({opacity:e.unref(o).isDraggingRef.value&&e.unref(o).getSelection().find(g=>f.$el===g)?"0.5 !important":""}),class:e.normalizeClass(["vf-item-"+e.unref(o).explorerId,"relative"]),"data-type":n.item.type,key:n.item.path,"data-item":JSON.stringify(n.item),"data-index":n.index,onDblclick:h[0]||(h[0]=g=>r(n.item)),onTouchstart:h[1]||(h[1]=g=>p(g)),onTouchend:h[2]||(h[2]=g=>u()),onContextmenu:h[3]||(h[3]=e.withModifiers(g=>e.unref(t).emitter.emit("vf-contextmenu-show",{event:g,items:e.unref(o).getSelected(),target:n.item}),["prevent"]))},[e.renderSlot(f.$slots,"default"),e.unref(t).pinnedFolders.find(g=>g.path===n.item.path)?(e.openBlock(),e.createBlock(e.unref(or),{key:0,class:"absolute top-0 right-0 text-amber-600"})):e.createCommentVNode("",!0)],46,r0)),[[c,n.item]])}},s0={class:"relative flex-auto flex flex-col"},l0={key:0,class:"grid grid-cols-12 px-1 bg-neutral-50 dark:bg-gray-800 border-b border-neutral-300 dark:border-gray-700 text-xs select-none divide-x"},a0={class:"relative"},c0={class:"grid grid-cols-12 items-center"},i0={class:"flex col-span-7 items-center"},d0={class:"overflow-ellipsis overflow-hidden whitespace-nowrap"},u0={class:"col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap"},m0={class:"grid grid-cols-12 items-center"},f0={class:"flex col-span-7 items-center"},p0={class:"overflow-ellipsis overflow-hidden whitespace-nowrap"},h0={class:"col-span-2 text-center"},v0={class:"col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap px-1 md:px-3"},g0={class:"relative"},k0=["data-src","alt"],y0={key:2,class:"absolute hidden md:block top-1/2 w-full text-center text-neutral-500"},x0={class:"break-all"},_0={__name:"Explorer",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=u=>u==null?void 0:u.substring(0,3),r=e.ref(null),c=e.ref(""),a=t.dragSelect;let i;t.emitter.on("vf-fullscreen-toggle",()=>{a.area.value.style.height=null}),t.emitter.on("vf-search-query",({newQuery:u})=>{c.value=u,u?t.emitter.emit("vf-fetch",{params:{q:"search",adapter:t.fs.adapter,path:t.fs.data.dirname,filter:u},onSuccess:p=>{p.files.length||t.emitter.emit("vf-toast-push",{label:o("No search result found.")})}}):t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname}})});const l=e.reactive({active:!1,column:"",order:""}),d=(u=!0)=>{let p=[...t.fs.data.files],f=l.column,h=l.order==="asc"?1:-1;if(!u)return p;const g=(v,V)=>typeof v=="string"&&typeof V=="string"?v.toLowerCase().localeCompare(V.toLowerCase()):v<V?-1:v>V?1:0;return l.active&&(p=p.slice().sort((v,V)=>g(v[f],V[f])*h)),p},m=u=>{l.active&&l.column===u?(l.active=l.order==="asc",l.column=u,l.order="desc"):(l.active=!0,l.column=u,l.order="asc")};return e.onMounted(()=>{i=new yr(a.area.value)}),e.onUpdated(()=>{i.update()}),e.onBeforeUnmount(()=>{i.destroy()}),(u,p)=>(e.openBlock(),e.createElementBlock("div",s0,[e.unref(t).view==="list"||c.value.length?(e.openBlock(),e.createElementBlock("div",l0,[e.createElementVNode("div",{onClick:p[0]||(p[0]=f=>m("basename")),class:"col-span-7 vf-sort-button"},[e.createTextVNode(e.toDisplayString(e.unref(o)("Name"))+" ",1),e.withDirectives(e.createVNode(_t,{direction:l.order},null,8,["direction"]),[[e.vShow,l.active&&l.column==="basename"]])]),c.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:p[1]||(p[1]=f=>m("file_size")),class:"justify-center col-span-2 vf-sort-button"},[e.createTextVNode(e.toDisplayString(e.unref(o)("Size"))+" ",1),e.withDirectives(e.createVNode(_t,{direction:l.order},null,8,["direction"]),[[e.vShow,l.active&&l.column==="file_size"]])])),c.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:p[2]||(p[2]=f=>m("last_modified")),class:"justify-center col-span-3 vf-sort-button"},[e.createTextVNode(e.toDisplayString(e.unref(o)("Date"))+" ",1),e.withDirectives(e.createVNode(_t,{direction:l.order},null,8,["direction"]),[[e.vShow,l.active&&l.column==="last_modified"]])])),c.value.length?(e.openBlock(),e.createElementBlock("div",{key:2,onClick:p[3]||(p[3]=f=>m("path")),class:"justify-center col-span-5 vf-sort-button"},[e.createTextVNode(e.toDisplayString(e.unref(o)("Filepath"))+" ",1),e.withDirectives(e.createVNode(_t,{direction:l.order},null,8,["direction"]),[[e.vShow,l.active&&l.column==="path"]])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",a0,[e.createVNode(um,{ref_key:"dragImage",ref:r,count:e.unref(a).getCount()},null,8,["count"])]),e.createElementVNode("div",{ref:e.unref(a).scrollBarContainer,class:e.normalizeClass(["vf-explorer-scrollbar-container",[{"grid-view":e.unref(t).view==="grid"},{"search-active":c.value.length}]])},[e.createElementVNode("div",{ref:e.unref(a).scrollBar,class:"w-5 bg-transparent pointer-events-none"},null,512)],2),e.createElementVNode("div",{ref:e.unref(a).area,class:"h-full w-full text-xs p-1 vf-explorer-scrollbar vf-selector-area min-h-[150px] z-0 overflow-y-auto",onContextmenu:p[4]||(p[4]=e.withModifiers(f=>e.unref(t).emitter.emit("vf-contextmenu-show",{event:f,items:e.unref(a).getSelected()}),["self","prevent"]))},[c.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(d(),(f,h)=>(e.openBlock(),e.createBlock(Jt,{item:f,index:h,dragImage:r.value,class:"vf-item vf-item-list"},{default:e.withCtx(()=>[e.createElementVNode("div",c0,[e.createElementVNode("div",i0,[e.createVNode(Xt,{type:f.type,small:e.unref(t).compactListView},null,8,["type","small"]),e.createElementVNode("span",d0,e.toDisplayString(f.basename),1)]),e.createElementVNode("div",u0,e.toDisplayString(f.path),1)])]),_:2},1032,["item","index","dragImage"]))),256)):e.createCommentVNode("",!0),e.unref(t).view==="list"&&!c.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d(),(f,h)=>(e.openBlock(),e.createBlock(Jt,{item:f,index:h,dragImage:r.value,class:"vf-item vf-item-list",draggable:"true",key:f.path},{default:e.withCtx(()=>[e.createElementVNode("div",m0,[e.createElementVNode("div",f0,[e.createVNode(Xt,{type:f.type,small:e.unref(t).compactListView},null,8,["type","small"]),e.createElementVNode("span",p0,e.toDisplayString(f.basename),1)]),e.createElementVNode("div",h0,e.toDisplayString(f.file_size?e.unref(t).filesize(f.file_size):""),1),e.createElementVNode("div",v0,e.toDisplayString(e.unref(tr)(f.last_modified)),1)])]),_:2},1032,["item","index","dragImage"]))),128)):e.createCommentVNode("",!0),e.unref(t).view==="grid"&&!c.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(d(!1),(f,h)=>(e.openBlock(),e.createBlock(Jt,{item:f,index:h,dragImage:r.value,class:"vf-item vf-item-grid",draggable:"true"},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",g0,[(f.mime_type??"").startsWith("image")&&e.unref(t).showThumbnails?(e.openBlock(),e.createElementBlock("img",{src:"data:image/png;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",class:"lazy h-10 md:h-12 m-auto","data-src":e.unref(t).requester.getPreviewUrl(e.unref(t).fs.adapter,f),alt:f.basename,key:f.path},null,8,k0)):(e.openBlock(),e.createBlock(Xt,{key:1,type:f.type},null,8,["type"])),!((f.mime_type??"").startsWith("image")&&e.unref(t).showThumbnails)&&f.type!=="dir"?(e.openBlock(),e.createElementBlock("div",y0,e.toDisplayString(s(f.extension)),1)):e.createCommentVNode("",!0)]),e.createElementVNode("span",x0,e.toDisplayString(e.unref(vn)(f.basename)),1)])]),_:2},1032,["item","index","dragImage"]))),256)):e.createCommentVNode("",!0)],544),e.createVNode(Iu)]))}},w0=["href","download"],b0=["onClick"],E0={__name:"ContextMenu",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(null),r=e.ref([]),c=e.ref(""),a=e.reactive({active:!1,items:[],positions:{left:0,top:0}}),i=e.computed(()=>a.items.filter(u=>u.key==null||t.features.includes(u.key)));t.emitter.on("vf-context-selected",u=>{r.value=u});const l={newfolder:{key:ne.NEW_FOLDER,title:()=>o("New Folder"),action:()=>t.modal.open(Qo)},selectAll:{title:()=>o("Select All"),action:()=>t.dragSelect.selectAll()},pinFolder:{title:()=>o("Pin Folder"),action:()=>{t.pinnedFolders=t.pinnedFolders.concat(r.value),t.storage.setStore("pinned-folders",t.pinnedFolders)}},unpinFolder:{title:()=>o("Unpin Folder"),action:()=>{t.pinnedFolders=t.pinnedFolders.filter(u=>!r.value.find(p=>p.path===u.path)),t.storage.setStore("pinned-folders",t.pinnedFolders)}},delete:{key:ne.DELETE,title:()=>o("Delete"),action:()=>{t.modal.open(Dn,{items:r})}},refresh:{title:()=>o("Refresh"),action:()=>{t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname}})}},preview:{key:ne.PREVIEW,title:()=>o("Preview"),action:()=>t.modal.open(nr,{adapter:t.fs.adapter,item:r.value[0]})},open:{title:()=>o("Open"),action:()=>{t.emitter.emit("vf-search-exit"),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:r.value[0].path}})}},openDir:{title:()=>o("Open containing folder"),action:()=>{t.emitter.emit("vf-search-exit"),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:r.value[0].dir}})}},download:{key:ne.DOWNLOAD,link:e.computed(()=>t.requester.getDownloadUrl(t.fs.adapter,r.value[0])),title:()=>o("Download"),action:()=>{}},archive:{key:ne.ARCHIVE,title:()=>o("Archive"),action:()=>t.modal.open(er,{items:r})},unarchive:{key:ne.UNARCHIVE,title:()=>o("Unarchive"),action:()=>t.modal.open(Zo,{items:r})},rename:{key:ne.RENAME,title:()=>o("Rename"),action:()=>t.modal.open(Tn,{items:r})}},d=u=>{t.emitter.emit("vf-contextmenu-hide"),u.action()};t.emitter.on("vf-search-query",({newQuery:u})=>{c.value=u}),t.emitter.on("vf-contextmenu-show",({event:u,items:p,target:f=null})=>{if(a.items=[],c.value)if(f)a.items.push(l.openDir),t.emitter.emit("vf-context-selected",[f]);else return;else!f&&!c.value?(a.items.push(l.refresh),a.items.push(l.selectAll),a.items.push(l.newfolder),t.emitter.emit("vf-context-selected",[])):p.length>1&&p.some(h=>h.path===f.path)?(a.items.push(l.refresh),a.items.push(l.archive),a.items.push(l.delete),t.emitter.emit("vf-context-selected",p)):(f.type==="dir"?(a.items.push(l.open),t.pinnedFolders.findIndex(h=>h.path===f.path)!==-1?a.items.push(l.unpinFolder):a.items.push(l.pinFolder)):(a.items.push(l.preview),a.items.push(l.download)),a.items.push(l.rename),f.mime_type==="application/zip"?a.items.push(l.unarchive):a.items.push(l.archive),a.items.push(l.delete),t.emitter.emit("vf-context-selected",[f]));m(u)}),t.emitter.on("vf-contextmenu-hide",()=>{a.active=!1});const m=u=>{const p=t.dragSelect.area.value,f=t.root.getBoundingClientRect(),h=p.getBoundingClientRect();let g=u.clientX-f.left,v=u.clientY-f.top;a.active=!0,e.nextTick(()=>{var D;const V=(D=s.value)==null?void 0:D.getBoundingClientRect();let y=(V==null?void 0:V.height)??0,O=(V==null?void 0:V.width)??0;g=h.right-u.pageX+window.scrollX<O?g-O:g,v=h.bottom-u.pageY+window.scrollY<y?v-y:v,a.positions={left:g+"px",top:v+"px"}})};return(u,p)=>e.withDirectives((e.openBlock(),e.createElementBlock("ul",{ref_key:"contextmenu",ref:s,style:e.normalizeStyle(a.positions),class:"z-30 absolute text-xs bg-neutral-50 dark:bg-gray-800 text-gray-700 dark:text-gray-200 border border-neutral-300 dark:border-gray-600 shadow rounded-sm select-none"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,f=>(e.openBlock(),e.createElementBlock("li",{class:"cursor-pointer hover:bg-neutral-200 dark:hover:bg-gray-700",key:f.title},[f.link?(e.openBlock(),e.createElementBlock("a",{key:0,class:"block pl-2 pr-3 py-2",target:"_blank",href:f.link,download:f.link,onClick:p[0]||(p[0]=h=>e.unref(t).emitter.emit("vf-contextmenu-hide"))},[e.createElementVNode("span",null,e.toDisplayString(f.title()),1)],8,w0)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"pl-2 pr-3 py-1.5",onClick:h=>d(f)},[e.createElementVNode("span",null,e.toDisplayString(f.title()),1)],8,b0))]))),128))],4)),[[e.vShow,a.active]])}},V0={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"h-5 w-5",viewBox:"0 0 24 24"},N0=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"},null,-1),S0=[N0];function $0(n,t){return e.openBlock(),e.createElementBlock("svg",V0,[...S0])}const rr={render:$0},B0={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"2",class:"h-5 w-5 stroke-slate-500 cursor-pointer",viewBox:"0 0 24 24"},C0=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0"},null,-1),D0=[C0];function T0(n,t){return e.openBlock(),e.createElementBlock("svg",B0,[...D0])}const M0={render:T0},A0={class:"p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none grow-0"},L0={class:"flex leading-5 items-center"},O0=["title"],F0={class:"z-[1] pointer-events-none"},H0=["value"],R0={class:"ml-3"},z0={key:0},j0={class:"ml-1"},I0={class:"flex leading-5 items-center justify-end"},U0=["disabled"],P0=["title"],q0={__name:"Statusbar",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,{setStore:s}=t.storage,r=t.dragSelect,c=()=>{t.emitter.emit("vf-search-exit"),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter}}),s("adapter",t.fs.adapter)},a=e.ref("");t.emitter.on("vf-search-query",({newQuery:l})=>{a.value=l});const i=e.computed(()=>{const l=t.selectButton.multiple?r.getSelected().length>0:r.getSelected().length===1;return t.selectButton.active&&l});return(l,d)=>(e.openBlock(),e.createElementBlock("div",A0,[e.createElementVNode("div",L0,[e.createElementVNode("div",{class:"flex leading-5 items-center rounded border dark:bg-gray-700 dark:border-gray-600",title:e.unref(o)("Storage")},[e.createElementVNode("div",F0,[e.createVNode(e.unref(rr))]),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":d[0]||(d[0]=m=>e.unref(t).fs.adapter=m),onChange:c,class:"border-0 py-0.5 text-xs text-slate-500 bg-white dark:text-neutral-50 dark:bg-gray-700 rounded uppercase focus:outline-0 cursor-pointer",tabindex:"-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.data.storages,m=>(e.openBlock(),e.createElementBlock("option",{value:m},e.toDisplayString(m),9,H0))),256))],544),[[e.vModelSelect,e.unref(t).fs.adapter]])],8,O0),e.createElementVNode("div",R0,[a.value.length?(e.openBlock(),e.createElementBlock("span",z0,e.toDisplayString(e.unref(t).fs.data.files.length)+" items found. ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",j0,e.toDisplayString(e.unref(t).dragSelect.getCount()>0?e.unref(o)("%s item(s) selected.",e.unref(t).dragSelect.getCount()):""),1)])]),e.createElementVNode("div",I0,[e.unref(t).selectButton.active?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["vf-btn py-0 vf-btn-primary",{disabled:!i.value}]),disabled:!i.value,onClick:d[1]||(d[1]=m=>e.unref(t).selectButton.click(e.unref(r).getSelected(),m))},e.toDisplayString(e.unref(o)("Select")),11,U0)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:"mr-1",title:e.unref(o)("About"),onClick:d[2]||(d[2]=m=>e.unref(t).modal.open(Jo))},[e.createVNode(e.unref(M0))],8,P0)])]))}},G0={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"text-neutral-500 fill-sky-500 stroke-gray-100/50 dark:stroke-slate-700/50 dark:fill-slate-500",viewBox:"0 0 24 24"},K0=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 9.776q.168-.026.344-.026h15.812q.176 0 .344.026m-16.5 0a2.25 2.25 0 0 0-1.883 2.542l.857 6a2.25 2.25 0 0 0 2.227 1.932H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-1.883-2.542m-16.5 0V6A2.25 2.25 0 0 1 6 3.75h3.879a1.5 1.5 0 0 1 1.06.44l2.122 2.12a1.5 1.5 0 0 0 1.06.44H18A2.25 2.25 0 0 1 20.25 9v.776"},null,-1),W0=[K0];function Y0(n,t){return e.openBlock(),e.createElementBlock("svg",G0,[...W0])}const sr={render:Y0},X0={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 24 24"},J0=e.createElementVNode("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),Q0=e.createElementVNode("path",{d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m3.6 5.2a1 1 0 0 0-1.4.2L12 10.333 9.8 7.4a1 1 0 1 0-1.6 1.2l2.55 3.4-2.55 3.4a1 1 0 1 0 1.6 1.2l2.2-2.933 2.2 2.933a1 1 0 0 0 1.6-1.2L13.25 12l2.55-3.4a1 1 0 0 0-.2-1.4"},null,-1),Z0=[J0,Q0];function ef(n,t){return e.openBlock(),e.createElementBlock("svg",X0,[...Z0])}const tf={render:ef},nf={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"},of=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),rf=e.createElementVNode("path",{d:"M15 12H9M12 9v6"},null,-1),sf=[of,rf];function lf(n,t){return e.openBlock(),e.createElementBlock("svg",nf,[...sf])}const lr={render:lf},af={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"},cf=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),df=e.createElementVNode("path",{d:"M9 12h6"},null,-1),uf=[cf,df];function mf(n,t){return e.openBlock(),e.createElementBlock("svg",af,[...uf])}const ar={render:mf};function cr(n,t){const o=n.findIndex(s=>s.path===t.path);o>-1?n[o]=t:n.push(t)}const ff={key:1,class:"cursor-pointer"},ir={__name:"FolderLoaderIndicator",props:e.mergeModels({adapter:{type:String,required:!0},path:{type:String,required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=n,o=e.inject("ServiceContainer");o.i18n;const s=e.useModel(n,"modelValue"),r=e.ref(!1);function c(){return s.value=!s.value}function a(){return o.treeViewData.find(l=>l.path===t.path)}const i=()=>{r.value=!0,o.requester.send({url:"",method:"get",params:{q:"subfolders",adapter:t.adapter,path:t.path}}).then(l=>{cr(o.treeViewData,{path:t.path,...l})}).catch(l=>{}).finally(()=>{r.value=!1})};return(l,d)=>{var m;return e.openBlock(),e.createElementBlock("div",{class:"h-5 w-5 shrink-0",onClick:d[0]||(d[0]=u=>{var p;return(!s.value||((p=a())==null?void 0:p.folders.length))&&c()&&(a()||i())})},[r.value?(e.openBlock(),e.createBlock(e.unref(Mn),{key:0,class:"p-1"})):(e.openBlock(),e.createElementBlock("div",ff,[s.value&&((m=a())!=null&&m.folders.length)?(e.openBlock(),e.createBlock(e.unref(ar),{key:0,class:"text-gray-600"})):e.createCommentVNode("",!0),s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(lr),{key:1,class:"text-gray-400"}))]))])}}},pf={class:"block"},hf={class:"flex hover:text-sky-700 dark:hover:text-sky-200/50 rounded"},vf={class:"h-5 w-5 shrink-0"},gf=["onClick"],kf={class:"h-5 w-5 shrink-0"},yf={class:"pl-4"},xf={__name:"TreeSubfolderList",props:{adapter:{type:String,required:!0},path:{type:String,required:!0}},setup(n){const t=e.inject("ServiceContainer"),o=e.ref([]),s=n,r=e.computed(()=>{var c;return((c=t.treeViewData.find(a=>a.path===s.path))==null?void 0:c.folders)||[]});return(c,a)=>{const i=e.resolveComponent("TreeSubfolderList",!0);return e.openBlock(),e.createElementBlock("ul",pf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(l,d)=>(e.openBlock(),e.createElementBlock("li",{class:"flex flex-col space-x-0.5 py-0.5 text-sm",key:l.path},[e.createElementVNode("div",hf,[e.createElementVNode("div",vf,[e.createVNode(ir,{adapter:n.adapter,path:l.path,modelValue:o.value[l.path],"onUpdate:modelValue":m=>o.value[l.path]=m},null,8,["adapter","path","modelValue","onUpdate:modelValue"])]),e.createElementVNode("div",{class:"flex cursor-pointer",onClick:m=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:s.adapter,path:l.path}})},[e.createElementVNode("div",kf,[e.unref(t).fs.path===l.path?(e.openBlock(),e.createBlock(e.unref(sr),{key:0})):(e.openBlock(),e.createBlock(e.unref(zt),{key:1}))]),e.createElementVNode("div",{class:e.normalizeClass(["text-nowrap",{"underline decoration-blue-300 dark:decoration-gray-400":e.unref(t).fs.path===l.path}])},e.toDisplayString(l.basename),3)],8,gf)]),e.createElementVNode("div",yf,[e.withDirectives(e.createVNode(i,{adapter:s.adapter,path:l.path},null,8,["adapter","path"]),[[e.vShow,o.value[l.path]]])])]))),128))])}}},_f={class:"pt-1 px-1 uppercase font-bold text-gray-400 dark:text-gray-500 text-xs flex justify-between bg-gray-100 dark:bg-[#2e3c51] border-b dark:border-gray-600"},wf={__name:"TreeStorageItem",props:{storage:{type:String,required:!0}},setup(n){const t=e.inject("ServiceContainer"),o=e.ref(!1),s=r=>{t.fs.adapter=r,o.value=!o.value,t.emitter.emit("vf-search-exit"),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:r}}),t.storage.setStore("adapter",r)};return(r,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",_f,[e.createElementVNode("div",{class:e.normalizeClass(["flex flex-1 space-x-1 items-center cursor-pointer",n.storage===e.unref(t).fs.adapter?"text-gray-700/80 dark:text-gray-300/80 text-bold":""]),onClick:c[0]||(c[0]=a=>s(n.storage))},[e.createElementVNode("div",{class:e.normalizeClass(["h-5 w-5 shrink-0",n.storage===e.unref(t).fs.adapter?"text-sky-500 dark:text-slate-300":""])},[e.createVNode(e.unref(rr))],2),e.createElementVNode("div",null,e.toDisplayString(n.storage),1)],2),e.createElementVNode("div",null,[e.createVNode(ir,{adapter:n.storage,path:n.storage+"://",modelValue:o.value,"onUpdate:modelValue":c[1]||(c[1]=a=>o.value=a)},null,8,["adapter","path","modelValue"])])]),e.withDirectives(e.createVNode(xf,{adapter:n.storage,path:n.storage+"://",class:"overflow-x-auto"},null,8,["adapter","path"]),[[e.vShow,o.value]])],64))}},bf={class:"h-5 w-5 shrink-0"},Ef={class:"cursor-pointer"},Vf={__name:"FolderIndicator",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue");return(o,s)=>(e.openBlock(),e.createElementBlock("div",bf,[e.createElementVNode("div",Ef,[t.value?(e.openBlock(),e.createBlock(e.unref(ar),{key:0,class:"text-gray-600"})):e.createCommentVNode("",!0),t.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(lr),{key:1,class:"text-gray-400"}))])]))}},Nf={class:"sticky left-0 dark:border-gray-600"},Sf={class:"flex items-center space-x-1"},$f={class:"text-nowrap"},Bf={key:0,class:"block"},Cf={class:"flex pl-2 py-0.5 text-sm justify-between pr-1"},Df=["onClick"],Tf=["title"],Mf=["onClick"],Af={key:0},Lf={class:"p-1 text-xs text-center"},Of={__name:"TreeView",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,{getStore:s,setStore:r}=t.storage,c=e.ref(190),a=e.ref(s("pinned-folders-opened",!0));e.watch(a,m=>r("pinned-folders-opened",m));const i=m=>{t.pinnedFolders=t.pinnedFolders.filter(u=>u.path!==m.path),t.storage.setStore("pinned-folders",t.pinnedFolders)},l=m=>{const u=m.clientX,p=m.target.parentElement,f=p.getBoundingClientRect().width;p.classList.remove("transition-[width]"),p.classList.add("transition-none");const h=v=>{c.value=f+v.clientX-u,c.value<50&&(c.value=0,t.showTreeView=!1),c.value>50&&(t.showTreeView=!0)},g=()=>{const v=p.getBoundingClientRect();c.value=v.width,p.classList.add("transition-[width]"),p.classList.remove("transition-none"),window.removeEventListener("mousemove",h),window.removeEventListener("mouseup",g)};window.addEventListener("mousemove",h),window.addEventListener("mouseup",g)},d=e.ref(null);return e.onMounted(()=>{Ue(d.value,{})}),e.watch(t.fs.data,(m,u)=>{const p=m.files.filter(f=>f.type==="dir");cr(t.treeViewData,{path:t.fs.path,folders:p.map(f=>({adapter:f.storage,path:f.path,basename:f.basename}))})}),(m,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{onClick:u[0]||(u[0]=p=>e.unref(t).showTreeView=!e.unref(t).showTreeView),class:e.normalizeClass(["w-full h-full bg-gray-300/10 dark:bg-gray-700/10 z-[1]",e.unref(t).showTreeView?"backdrop-blur-sm absolute md:hidden":"hidden"])},null,2),e.createElementVNode("div",{style:e.normalizeStyle(e.unref(t).showTreeView?"min-width:100px;max-width:75%; width: "+c.value+"px":"width: 0"),class:"absolute h-full md:h-auto md:relative shadow-lg shrink-0 transition-[width] ease-in-out duration-200 z-[1] bg-gray-50 dark:bg-[#242f41]"},[e.createElementVNode("div",{ref_key:"treeViewScrollElement",ref:d,class:"h-full border-r dark:border-gray-600/50 pb-4"},[e.createElementVNode("div",Nf,[e.createElementVNode("div",{onClick:u[2]||(u[2]=p=>a.value=!a.value),class:"bg-gray-100 dark:bg-[#2e3c51] dark:border-gray-600 border-b p-1 uppercase font-bold text-gray-400 dark:text-gray-400 text-xs flex items-center justify-between cursor-pointer"},[e.createElementVNode("div",Sf,[e.createVNode(e.unref(or),{class:"text-amber-600"}),e.createElementVNode("div",$f,e.toDisplayString(e.unref(o)("Pinned Folders")),1)]),e.createVNode(Vf,{modelValue:a.value,"onUpdate:modelValue":u[1]||(u[1]=p=>a.value=p)},null,8,["modelValue"])]),a.value?(e.openBlock(),e.createElementBlock("ul",Bf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).pinnedFolders,p=>(e.openBlock(),e.createElementBlock("li",Cf,[e.createElementVNode("div",{class:"flex hover:text-sky-500 dark:hover:text-sky-200/50 rounded cursor-pointer",onClick:f=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:p.storage,path:p.path}})},[e.unref(t).fs.path!==p.path?(e.openBlock(),e.createBlock(e.unref(zt),{key:0,class:"h-5 w-5"})):e.createCommentVNode("",!0),e.unref(t).fs.path===p.path?(e.openBlock(),e.createBlock(e.unref(sr),{key:1,class:"h-5 w-5"})):e.createCommentVNode("",!0),e.createElementVNode("div",{title:p.path,class:e.normalizeClass(["text-nowrap",{"underline decoration-blue-300 dark:decoration-gray-400":e.unref(t).fs.path===p.path}])},e.toDisplayString(p.basename),11,Tf)],8,Df),e.createElementVNode("div",{class:"cursor-pointer",onClick:f=>i(p)},[e.createVNode(e.unref(tf),{class:"p-0.5 text-gray-300 hover:text-gray-400 dark:text-gray-600 hover:dark:text-gray-400"})],8,Mf)]))),256)),e.unref(t).pinnedFolders.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",Af,[e.createElementVNode("div",Lf,e.toDisplayString(e.unref(o)("No folders pinned")),1)]))])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.data.storages,p=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(wf,{storage:p},null,8,["storage"])]))),256))],512),e.createElementVNode("div",{onMousedown:l,class:e.normalizeClass([(e.unref(t).showTreeView,""),"transition-colors ease-in-out duration-200 top-0 hover:bg-slate-600/10 dark:hover:bg-slate-300/10 w-1 h-full absolute -right-0.5 cursor-ew-resize"])},null,34)],4)],64))}},Ff={class:"relative flex overflow-hidden h-full"},Hf={__name:"VueFinder",props:{id:{type:String,default:"vf"},request:{type:[String,Object],required:!0},persist:{type:Boolean,default:!1},path:{type:String,default:""},features:{type:[Array,Boolean],default:!0},debug:{type:Boolean,default:!1},theme:{type:String,default:"system"},locale:{type:String,default:null},maxHeight:{type:String,default:"600px"},maxFileSize:{type:String,default:"10mb"},fullScreen:{type:Boolean,default:!1},showTreeView:{type:Boolean,default:!1},pinnedFolders:{type:Array,default:[]},showThumbnails:{type:Boolean,default:!0},selectButton:{type:Object,default(n){return{active:!1,multiple:!1,click:t=>{},...n}}}},emits:["select"],setup(n,{emit:t}){const o=t,r=As(n,e.inject("VueFinderOptions"));e.provide("ServiceContainer",r);const{setStore:c}=r.storage,a=e.ref(null);r.root=a;const i=r.dragSelect;Da(r);const l=m=>{Object.assign(r.fs.data,m),i.clearSelection(),i.refreshSelection()};let d;return r.emitter.on("vf-fetch-abort",()=>{d.abort(),r.fs.loading=!1}),r.emitter.on("vf-fetch",({params:m,body:u=null,onSuccess:p=null,onError:f=null,noCloseModal:h=!1})=>{["index","search"].includes(m.q)&&(d&&d.abort(),r.fs.loading=!0),d=new AbortController;const g=d.signal;r.requester.send({url:"",method:m.m||"get",params:m,body:u,abortSignal:g}).then(v=>{r.fs.adapter=v.adapter,r.persist&&(r.fs.path=v.dirname,c("path",r.fs.path)),["index","search"].includes(m.q)&&(r.fs.loading=!1),h||r.modal.close(),l(v),p&&p(v)}).catch(v=>{console.error(v),f&&f(v)})}),e.onMounted(()=>{let m={};r.fs.path.includes("://")&&(m={adapter:r.fs.path.split("://")[0],path:r.fs.path}),r.emitter.emit("vf-fetch",{params:{q:"index",adapter:r.fs.adapter,...m}}),i.onSelect(u=>{o("select",u)})}),(m,u)=>(e.openBlock(),e.createElementBlock("div",{class:"vuefinder",ref_key:"root",ref:a,tabindex:"0"},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).theme.actualValue)},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(r).fullScreen?"fixed w-screen inset-0 z-20":"relative rounded resize-y ","overflow-hidden min-h-44 border flex flex-col bg-white dark:bg-gray-800 text-gray-700 dark:text-neutral-400 border-neutral-300 dark:border-gray-900 select-none"]),style:e.normalizeStyle(e.unref(r).fullScreen?"":"max-height: "+n.maxHeight),onMousedown:u[0]||(u[0]=p=>e.unref(r).emitter.emit("vf-contextmenu-hide")),onTouchstart:u[1]||(u[1]=p=>e.unref(r).emitter.emit("vf-contextmenu-hide"))},[e.createVNode(ud),e.createVNode(zu),e.createElementVNode("div",Ff,[e.createVNode(Of),e.createVNode(_0)]),e.createVNode(q0)],38),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[e.unref(r).modal.visible?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(r).modal.type),{key:0})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(E0)],2)],512))}},Rf={install(n,t={}){t.i18n=t.i18n??{};let[o]=Object.keys(t.i18n);t.locale=t.locale??o??"en",n.provide("VueFinderOptions",t),n.component("VueFinder",Hf)}};module.exports=Rf;
9
+ */const ge=(n,t)=>{const{o,i:s,u:r}=n;let c=o,a;const i=(f,u)=>{const p=c,m=f,h=u||(s?!s(p,m):p!==m);return(h||r)&&(c=m,a=p),[c,h,a]};return[t?f=>i(t(c,a),f):i,f=>[c,!!f,a]]},uo=typeof window<"u"&&typeof document<"u",pe=uo?window:{},mo=Math.max,Dr=Math.min,Qt=Math.round,Vt=Math.abs,Hn=Math.sign,fo=pe.cancelAnimationFrame,kn=pe.requestAnimationFrame,Nt=pe.setTimeout,Zt=pe.clearTimeout,Tt=n=>typeof pe[n]<"u"?pe[n]:void 0,Tr=Tt("MutationObserver"),Rn=Tt("IntersectionObserver"),St=Tt("ResizeObserver"),en=Tt("ScrollTimeline"),po=uo&&Node.ELEMENT_NODE,{toString:If,hasOwnProperty:Gt}=Object.prototype,Mt=n=>n===void 0,yn=n=>n===null,Se=n=>typeof n=="number",At=n=>typeof n=="string",ho=n=>typeof n=="boolean",we=n=>typeof n=="function",$e=n=>Array.isArray(n),ct=n=>typeof n=="object"&&!$e(n)&&!yn(n),Lt=n=>{const t=!!n&&n.length,o=Se(t)&&t>-1&&t%1==0;return $e(n)||!we(n)&&o?t>0&&ct(n)?t-1 in n:!0:!1},$t=n=>{if(!n||!ct(n))return!1;let t;const o="constructor",s=n[o],r=s&&s.prototype,c=Gt.call(n,o),a=r&&Gt.call(r,"isPrototypeOf");if(s&&!c&&!a)return!1;for(t in n);return Mt(t)||Gt.call(n,t)},Bt=n=>{const t=HTMLElement;return n?t?n instanceof t:n.nodeType===po:!1},Ot=n=>{const t=Element;return n?t?n instanceof t:n.nodeType===po:!1};function Q(n,t){if(Lt(n))for(let o=0;o<n.length&&t(n[o],o,n)!==!1;o++);else n&&Q(Object.keys(n),o=>t(n[o],o,n));return n}const xn=(n,t)=>n.indexOf(t)>=0,Ae=(n,t)=>n.concat(t),se=(n,t,o)=>(!At(t)&&Lt(t)?Array.prototype.push.apply(n,t):n.push(t),n),Pe=n=>Array.from(n||[]),vo=n=>$e(n)?n:[n],tn=n=>!!n&&!n.length,zn=n=>Pe(new Set(n)),be=(n,t,o)=>{Q(n,r=>r&&r.apply(void 0,t||[])),!o&&(n.length=0)},go="paddingTop",ko="paddingRight",yo="paddingLeft",xo="paddingBottom",_o="marginLeft",wo="marginRight",bo="marginBottom",Mr="overflowX",Ar="overflowY",Ze="width",et="height",Re="visible",qe="hidden",tt="scroll",Lr=n=>{const t=String(n||"");return t?t[0].toUpperCase()+t.slice(1):""},Ft=(n,t,o,s)=>{if(n&&t){let r=!0;return Q(o,c=>{const a=n[c],i=t[c];a!==i&&(r=!1)}),r}return!1},Eo=(n,t)=>Ft(n,t,["w","h"]),wt=(n,t)=>Ft(n,t,["x","y"]),Or=(n,t)=>Ft(n,t,["t","r","b","l"]),ze=()=>{},U=(n,...t)=>n.bind(0,...t),Ge=n=>{let t;const o=n?Nt:kn,s=n?Zt:fo;return[r=>{s(t),t=o(()=>r(),we(n)?n():n)},()=>s(t)]},nn=(n,t)=>{const{_:o,p:s,v:r,m:c}=t||{};let a,i,l,d,f=ze;const u=function(v){f(),Zt(a),d=a=i=void 0,f=ze,n.apply(this,v)},p=g=>c&&i?c(i,g):g,m=()=>{f!==ze&&u(p(l)||l)},h=function(){const v=Pe(arguments),V=we(o)?o():o;if(Se(V)&&V>=0){const O=we(s)?s():s,D=Se(O)&&O>=0,N=V>0?Nt:kn,S=V>0?Zt:fo,b=p(v)||v,B=u.bind(0,b);let E;f(),r&&!d?(B(),d=!0,E=N(()=>d=void 0,V)):(E=N(B,V),D&&!a&&(a=Nt(m,O))),f=()=>S(E),i=l=b}else u(v)};return h.S=m,h},Vo=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),Le=n=>n?Object.keys(n):[],Y=(n,t,o,s,r,c,a)=>{const i=[t,o,s,r,c,a];return(typeof n!="object"||yn(n))&&!we(n)&&(n={}),Q(i,l=>{Q(l,(d,f)=>{const u=l[f];if(n===u)return!0;const p=$e(u);if(u&&$t(u)){const m=n[f];let h=m;p&&!$e(m)?h=[]:!p&&!$t(m)&&(h={}),n[f]=Y(h,u)}else n[f]=p?u.slice():u})}),n},No=(n,t)=>Q(Y({},n),(o,s,r)=>{o===void 0?delete r[s]:o&&$t(o)&&(r[s]=No(o))}),_n=n=>{for(const t in n)return!1;return!0},on=(n,t,o)=>mo(n,Dr(t,o)),Ke=n=>Pe(new Set(($e(n)?n:(n||"").split(" ")).filter(t=>t))),wn=(n,t)=>n&&n.getAttribute(t),jn=(n,t)=>n&&n.hasAttribute(t),Me=(n,t,o)=>{Q(Ke(t),s=>{n&&n.setAttribute(s,String(o||""))})},Ve=(n,t)=>{Q(Ke(t),o=>n&&n.removeAttribute(o))},Ht=(n,t)=>{const o=Ke(wn(n,t)),s=U(Me,n,t),r=(c,a)=>{const i=new Set(o);return Q(Ke(c),l=>{i[a](l)}),Pe(i).join(" ")};return{O:c=>s(r(c,"delete")),$:c=>s(r(c,"add")),C:c=>{const a=Ke(c);return a.reduce((i,l)=>i&&o.includes(l),a.length>0)}}},So=(n,t,o)=>(Ht(n,t).O(o),U(bn,n,t,o)),bn=(n,t,o)=>(Ht(n,t).$(o),U(So,n,t,o)),rn=(n,t,o,s)=>(s?bn:So)(n,t,o),En=(n,t,o)=>Ht(n,t).C(o),$o=n=>Ht(n,"class"),Bo=(n,t)=>{$o(n).O(t)},Vn=(n,t)=>($o(n).$(t),U(Bo,n,t)),Co=(n,t)=>{const o=[],s=t?Ot(t)&&t:document;return s?se(o,s.querySelectorAll(n)):o},Fr=(n,t)=>{const o=t?Ot(t)&&t:document;return o?o.querySelector(n):null},Ct=(n,t)=>Ot(n)?n.matches(t):!1,Do=n=>Ct(n,"body"),sn=n=>n?Pe(n.childNodes):[],nt=n=>n&&n.parentElement,Je=(n,t)=>Ot(n)&&n.closest(t),ln=n=>document.activeElement,Hr=(n,t,o)=>{const s=Je(n,t),r=n&&Fr(o,s),c=Je(r,t)===s;return s&&r?s===n||r===n||c&&Je(Je(n,o),t)!==s:!1},Ie=n=>{if(Lt(n))Q(Pe(n),t=>Ie(t));else if(n){const t=nt(n);t&&t.removeChild(n)}},To=(n,t,o)=>{if(o&&n){let s=t,r;return Lt(o)?(r=document.createDocumentFragment(),Q(o,c=>{c===s&&(s=c.previousSibling),r.appendChild(c)})):r=o,t&&(s?s!==t&&(s=s.nextSibling):s=n.firstChild),n.insertBefore(r,s||null),()=>Ie(o)}return ze},ke=(n,t)=>To(n,null,t),In=(n,t)=>To(nt(n),n&&n.nextSibling,t),Qe=n=>{const t=document.createElement("div");return Me(t,"class",n),t},Mo=n=>{const t=Qe();return t.innerHTML=n.trim(),Q(sn(t),o=>Ie(o))},Rr=/^--/,Un=(n,t)=>n.getPropertyValue(t)||n[t]||"",Nn=n=>{const t=n||0;return isFinite(t)?t:0},yt=n=>Nn(parseFloat(n||"")),Pn=n=>`${(Nn(n)*100).toFixed(3)}%`,an=n=>`${Nn(n)}px`;function it(n,t){n&&t&&Q(t,(o,s)=>{try{const r=n.style,c=Se(o)?an(o):(o||"")+"";Rr.test(s)?r.setProperty(s,c):r[s]=c}catch{}})}function We(n,t,o){const s=At(t);let r=s?"":{};if(n){const c=pe.getComputedStyle(n,o)||n.style;r=s?Un(c,t):Pe(t).reduce((a,i)=>(a[i]=Un(c,i),a),r)}return r}const qn=(n,t,o)=>{const s=t?`${t}-`:"",r=o?`-${o}`:"",c=`${s}top${r}`,a=`${s}right${r}`,i=`${s}bottom${r}`,l=`${s}left${r}`,d=We(n,[c,a,i,l]);return{t:yt(d[c]),r:yt(d[a]),b:yt(d[i]),l:yt(d[l])}},Kt=(n,t)=>`translate${ct(n)?`(${n.x},${n.y})`:`${t?"X":"Y"}(${n})`}`,zr=n=>!!(n.offsetWidth||n.offsetHeight||n.getClientRects().length),jr={w:0,h:0},Rt=(n,t)=>t?{w:t[`${n}Width`],h:t[`${n}Height`]}:jr,Ir=n=>Rt("inner",n||pe),lt=U(Rt,"offset"),Ao=U(Rt,"client"),cn=U(Rt,"scroll"),Sn=n=>{const t=parseFloat(We(n,Ze))||0,o=parseFloat(We(n,et))||0;return{w:t-Qt(t),h:o-Qt(o)}},at=n=>n.getBoundingClientRect(),Ur=n=>!!n&&zr(n),dn=n=>!!(n&&(n[et]||n[Ze])),Lo=(n,t)=>{const o=dn(n);return!dn(t)&&o},Gn=(n,t,o,s)=>{Q(Ke(t),r=>{n&&n.removeEventListener(r,o,s)})},te=(n,t,o,s)=>{var r;const c=(r=s&&s.H)!=null?r:!0,a=s&&s.I||!1,i=s&&s.A||!1,l={passive:c,capture:a};return U(be,Ke(t).map(d=>{const f=i?u=>{Gn(n,d,f,a),o&&o(u)}:o;return n&&n.addEventListener(d,f,l),U(Gn,n,d,f,a)}))},Oo=n=>n.stopPropagation(),un=n=>n.preventDefault(),Fo=n=>Oo(n)||un(n),Ne=(n,t)=>{const{x:o,y:s}=Se(t)?{x:t,y:t}:t||{};Se(o)&&(n.scrollLeft=o),Se(s)&&(n.scrollTop=s)},ye=n=>({x:n.scrollLeft,y:n.scrollTop}),Ho=()=>({T:{x:0,y:0},D:{x:0,y:0}}),Pr=(n,t)=>{const{T:o,D:s}=n,{w:r,h:c}=t,a=(u,p,m)=>{let h=Hn(u)*m,g=Hn(p)*m;if(h===g){const v=Vt(u),V=Vt(p);g=v>V?0:g,h=v<V?0:h}return h=h===g?0:h,[h+0,g+0]},[i,l]=a(o.x,s.x,r),[d,f]=a(o.y,s.y,c);return{T:{x:i,y:d},D:{x:l,y:f}}},Kn=({T:n,D:t})=>{const o=(s,r)=>s===0&&s<=r;return{x:o(n.x,t.x),y:o(n.y,t.y)}},Wn=({T:n,D:t},o)=>{const s=(r,c,a)=>on(0,1,(r-a)/(r-c)||0);return{x:s(n.x,t.x,o.x),y:s(n.y,t.y,o.y)}},mn=n=>{n&&n.focus&&n.focus({preventScroll:!0})},Yn=(n,t)=>{Q(vo(t),n)},fn=n=>{const t=new Map,o=(c,a)=>{if(c){const i=t.get(c);Yn(l=>{i&&i[l?"delete":"clear"](l)},a)}else t.forEach(i=>{i.clear()}),t.clear()},s=(c,a)=>{if(At(c)){const d=t.get(c)||new Set;return t.set(c,d),Yn(f=>{we(f)&&d.add(f)},a),U(o,c,a)}ho(a)&&a&&o();const i=Le(c),l=[];return Q(i,d=>{const f=c[d];f&&se(l,s(d,f))}),U(be,l)},r=(c,a)=>{Q(Pe(t.get(c)),i=>{a&&!tn(a)?i.apply(0,a):i()})};return s(n||{}),[s,o,r]},Xn=n=>JSON.stringify(n,(t,o)=>{if(we(o))throw 0;return o}),Jn=(n,t)=>n?`${t}`.split(".").reduce((o,s)=>o&&Vo(o,s)?o[s]:void 0,n):void 0,qr={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:[0,33],attributes:null,ignoreMutation:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},Ro=(n,t)=>{const o={},s=Ae(Le(t),Le(n));return Q(s,r=>{const c=n[r],a=t[r];if(ct(c)&&ct(a))Y(o[r]={},Ro(c,a)),_n(o[r])&&delete o[r];else if(Vo(t,r)&&a!==c){let i=!0;if($e(c)||$e(a))try{Xn(c)===Xn(a)&&(i=!1)}catch{}i&&(o[r]=a)}}),o},Qn=(n,t,o)=>s=>[Jn(n,s),o||Jn(t,s)!==void 0],ot="data-overlayscrollbars",bt="os-environment",xt=`${bt}-scrollbar-hidden`,Wt=`${ot}-initialize`,Et="noClipping",Zn=`${ot}-body`,je=ot,Gr="host",He=`${ot}-viewport`,Kr=Mr,Wr=Ar,Yr="arrange",zo="measuring",jo="scrollbarHidden",Xr="scrollbarPressed",Jr="noContent",pn=`${ot}-padding`,eo=`${ot}-content`,$n="os-size-observer",Qr=`${$n}-appear`,Zr=`${$n}-listener`,es="os-trinsic-observer",ts="os-theme-none",xe="os-scrollbar",ns=`${xe}-rtl`,os=`${xe}-horizontal`,rs=`${xe}-vertical`,Io=`${xe}-track`,Bn=`${xe}-handle`,ss=`${xe}-visible`,ls=`${xe}-cornerless`,to=`${xe}-interaction`,no=`${xe}-unusable`,hn=`${xe}-auto-hide`,oo=`${hn}-hidden`,ro=`${xe}-wheel`,as=`${Io}-interactive`,cs=`${Bn}-interactive`;let Yt;const is=()=>{const n=(y,O,D)=>{ke(document.body,y),ke(document.body,y);const N=Ao(y),S=lt(y),$=Sn(O);return D&&Ie(y),{x:S.h-N.h+$.h,y:S.w-N.w+$.w}},t=y=>{let O=!1;const D=Vn(y,xt);try{O=We(y,"scrollbar-width")==="none"||We(y,"display","::-webkit-scrollbar")==="none"}catch{}return D(),O},o=`.${bt}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${bt} div{width:200%;height:200%;margin:10px 0}.${xt}{scrollbar-width:none!important}.${xt}::-webkit-scrollbar,.${xt}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`,r=Mo(`<div class="${bt}"><div></div><style>${o}</style></div>`)[0],c=r.firstChild,[a,,i]=fn(),[l,d]=ge({o:n(r,c),i:wt},U(n,r,c,!0)),[f]=d(),u=t(r),p={x:f.x===0,y:f.y===0},m={elements:{host:null,padding:!u,viewport:y=>u&&Do(y)&&y,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},h=Y({},qr),g=U(Y,{},h),v=U(Y,{},m),V={k:f,M:p,R:u,V:!!en,L:U(a,"r"),P:v,U:y=>Y(m,y)&&v(),N:g,q:y=>Y(h,y)&&g(),B:Y({},m),F:Y({},h)};if(Ve(r,"style"),Ie(r),te(pe,"resize",()=>{i("r",[])}),we(pe.matchMedia)&&!u&&(!p.x||!p.y)){const y=O=>{const D=pe.matchMedia(`(resolution: ${pe.devicePixelRatio}dppx)`);te(D,"change",()=>{O(),y(O)},{A:!0})};y(()=>{const[O,D]=l();Y(V.k,O),i("r",[D])})}return V},Be=()=>(Yt||(Yt=is()),Yt),Uo=(n,t)=>we(t)?t.apply(0,n):t,ds=(n,t,o,s)=>{const r=Mt(s)?o:s;return Uo(n,r)||t.apply(0,n)},Po=(n,t,o,s)=>{const r=Mt(s)?o:s,c=Uo(n,r);return!!c&&(Bt(c)?c:t.apply(0,n))},us=(n,t)=>{const{nativeScrollbarsOverlaid:o,body:s}=t||{},{M:r,R:c,P:a}=Be(),{nativeScrollbarsOverlaid:i,body:l}=a().cancel,d=o??i,f=Mt(s)?l:s,u=(r.x||r.y)&&d,p=n&&(yn(f)?!c:f);return!!u||!!p},Cn=new WeakMap,ms=(n,t)=>{Cn.set(n,t)},fs=n=>{Cn.delete(n)},qo=n=>Cn.get(n),ps=(n,t,o)=>{let s=!1;const r=o?new WeakMap:!1,c=()=>{s=!0},a=i=>{if(r&&o){const l=o.map(d=>{const[f,u]=d||[];return[u&&f?(i||Co)(f,n):[],u]});Q(l,d=>Q(d[0],f=>{const u=d[1],p=r.get(f)||[];if(n.contains(f)&&u){const h=te(f,u,g=>{s?(h(),r.delete(f)):t(g)});r.set(f,se(p,h))}else be(p),r.delete(f)}))}};return a(),[c,a]},so=(n,t,o,s)=>{let r=!1;const{j:c,X:a,Y:i,W:l,J:d,K:f}=s||{},u=nn(()=>r&&o(!0),{_:33,p:99}),[p,m]=ps(n,u,i),h=c||[],g=a||[],v=Ae(h,g),V=(O,D)=>{if(!tn(D)){const N=d||ze,S=f||ze,$=[],b=[];let B=!1,E=!1;if(Q(D,_=>{const{attributeName:C,target:x,type:k,oldValue:A,addedNodes:T,removedNodes:K}=_,Z=k==="attributes",X=k==="childList",M=n===x,q=Z&&C,G=q&&wn(x,C||""),I=At(G)?G:null,ee=q&&A!==I,F=xn(g,C)&&ee;if(t&&(X||!M)){const R=Z&&ee,H=R&&l&&Ct(x,l),L=(H?!N(x,C,A,I):!Z||R)&&!S(_,!!H,n,s);Q(T,z=>se($,z)),Q(K,z=>se($,z)),E=E||L}!t&&M&&ee&&!N(x,C,A,I)&&(se(b,C),B=B||F)}),m(_=>zn($).reduce((C,x)=>(se(C,Co(_,x)),Ct(x,_)?se(C,x):C),[])),t)return!O&&E&&o(!1),[!1];if(!tn(b)||B){const _=[zn(b),B];return!O&&o.apply(0,_),_}}},y=new Tr(U(V,!1));return[()=>(y.observe(n,{attributes:!0,attributeOldValue:!0,attributeFilter:v,subtree:t,childList:t,characterData:t}),r=!0,()=>{r&&(p(),y.disconnect(),r=!1)}),()=>{if(r)return u.S(),V(!0,y.takeRecords())}]},Go={},Ko={},hs=n=>{Q(n,t=>Q(t,(o,s)=>{Go[s]=t[s]}))},Wo=(n,t,o)=>Le(n).map(s=>{const{static:r,instance:c}=n[s],[a,i,l]=o||[],d=o?c:r;if(d){const f=o?d(a,i,t):d(t);return(l||Ko)[s]=f}}),dt=n=>Ko[n],vs="__osOptionsValidationPlugin",gs="__osSizeObserverPlugin",ks=(n,t)=>{const{M:o}=t,[s,r]=n("showNativeOverlaidScrollbars");return[s&&o.x&&o.y,r]},Dt=n=>n.indexOf(Re)===0,ys=(n,t)=>{const o=(r,c,a,i)=>{const l=r===Re?qe:r.replace(`${Re}-`,""),d=Dt(r),f=Dt(a);return!c&&!i?qe:d&&f?Re:d?c&&i?l:c?Re:qe:c?l:f&&i?Re:qe},s={x:o(t.x,n.x,t.y,n.y),y:o(t.y,n.y,t.x,n.x)};return{G:s,Z:{x:s.x===tt,y:s.y===tt}}},Yo="__osScrollbarsHidingPlugin",xs="__osClickScrollPlugin",Xo=(n,t,o)=>{const{dt:s}=o||{},r=dt(gs),[c]=ge({o:!1,u:!0});return()=>{const a=[],l=Mo(`<div class="${$n}"><div class="${Zr}"></div></div>`)[0],d=l.firstChild,f=u=>{const p=u instanceof ResizeObserverEntry;let m=!1,h=!1;if(p){const[g,,v]=c(u.contentRect),V=dn(g);h=Lo(g,v),m=!h&&!V}else h=u===!0;m||t({ft:!0,dt:h})};if(St){const u=new St(p=>f(p.pop()));u.observe(d),se(a,()=>{u.disconnect()})}else if(r){const[u,p]=r(d,f,s);se(a,Ae([Vn(l,Qr),te(l,"animationstart",u)],p))}else return ze;return U(be,se(a,ke(n,l)))}},_s=(n,t)=>{let o;const s=l=>l.h===0||l.isIntersecting||l.intersectionRatio>0,r=Qe(es),[c]=ge({o:!1}),a=(l,d)=>{if(l){const f=c(s(l)),[,u]=f;return u&&!d&&t(f)&&[f]}},i=(l,d)=>a(d.pop(),l);return[()=>{const l=[];if(Rn)o=new Rn(U(i,!1),{root:n}),o.observe(r),se(l,()=>{o.disconnect()});else{const d=()=>{const f=lt(r);a(f)};se(l,Xo(r,d)()),d()}return U(be,se(l,ke(n,r)))},()=>o&&i(!0,o.takeRecords())]},ws=(n,t,o,s)=>{let r,c,a,i,l,d;const f=`[${je}]`,u=`[${He}]`,p=[],m=["wrap","cols","rows"],h=["id","class","style","open"],{vt:g,ht:v,ot:V,gt:y,bt:O,wt:D,nt:N,yt:S,St:$,Ot:b}=n,B=w=>We(w,"direction")==="rtl",E={$t:!1,ct:B(g)},_=Be(),C=dt(Yo),[x]=ge({i:Eo,o:{w:0,h:0}},()=>{const w=C&&C.tt(n,t,E,_,o).ut,z=!(S&&N)&&En(v,je,Et),j=!N&&$(Yr),P=j&&ye(y),J=b(zo,z),ae=j&&w&&w()[0],de=cn(V),W=Sn(V);return ae&&ae(),Ne(y,P),z&&J(),{w:de.w+W.w,h:de.h+W.h}}),k=D?m:Ae(h,m),A=nn(s,{_:()=>r,p:()=>c,m(w,L){const[z]=w,[j]=L;return[Ae(Le(z),Le(j)).reduce((P,J)=>(P[J]=z[J]||j[J],P),{})]}}),T=w=>{const L=B(g);Y(w,{Ct:d!==L}),Y(E,{ct:L}),d=L},K=(w,L)=>{const[z,j]=w,P={xt:j};return Y(E,{$t:z}),!L&&s(P),P},Z=({ft:w,dt:L})=>{const j=!(w&&!L)&&_.R?A:s,P={ft:w||L,dt:L};T(P),j(P)},X=(w,L)=>{const[,z]=x(),j={Ht:z};return T(j),z&&!L&&(w?s:A)(j),j},M=(w,L,z)=>{const j={Et:L};return T(j),L&&!z&&A(j),j},[q,G]=O?_s(v,K):[],I=!N&&Xo(v,Z,{dt:!0}),[ee,F]=so(v,!1,M,{X:h,j:Ae(h,p)}),R=N&&St&&new St(w=>{const L=w[w.length-1].contentRect;Z({ft:!0,dt:Lo(L,l)}),l=L}),H=nn(()=>{const[,w]=x();s({Ht:w})},{_:222,v:!0});return[()=>{R&&R.observe(v);const w=I&&I(),L=q&&q(),z=ee(),j=_.L(P=>{P?A({zt:P}):H()});return()=>{R&&R.disconnect(),w&&w(),L&&L(),i&&i(),z(),j()}},({It:w,At:L,Tt:z})=>{const j={},[P]=w("update.ignoreMutation"),[J,ae]=w("update.attributes"),[de,W]=w("update.elementEvents"),[ce,ue]=w("update.debounce"),_e=W||ae,ie=L||z,he=le=>we(P)&&P(le);if(_e){a&&a(),i&&i();const[le,oe]=so(O||V,!0,X,{j:Ae(k,J||[]),Y:de,W:f,K:(me,re)=>{const{target:fe,attributeName:ve}=me;return(!re&&ve&&!N?Hr(fe,f,u):!1)||!!Je(fe,`.${xe}`)||!!he(me)}});i=le(),a=oe}if(ue)if(A.S(),$e(ce)){const le=ce[0],oe=ce[1];r=Se(le)&&le,c=Se(oe)&&oe}else Se(ce)?(r=ce,c=!1):(r=!1,c=!1);if(ie){const le=F(),oe=G&&G(),me=a&&a();le&&Y(j,M(le[0],le[1],ie)),oe&&Y(j,K(oe[0],ie)),me&&Y(j,X(me[0],ie))}return T(j),j},E]},bs=(n,t,o,s)=>{const{P:r}=Be(),{scrollbars:c}=r(),{slot:a}=c,{vt:i,ht:l,ot:d,Dt:f,gt:u,yt:p,nt:m}=t,{scrollbars:h}=f?{}:n,{slot:g}=h||{},v=new Map,V=F=>en&&new en({source:u,axis:F}),y={x:V("x"),y:V("y")},O=Po([i,l,d],()=>m&&p?i:l,a,g),D=(F,R)=>{if(R){const P=F?Ze:et,{kt:J,Mt:ae}=R,de=at(ae)[P],W=at(J)[P];return on(0,1,de/W||0)}const H=F?"x":"y",{Rt:w,Vt:L}=o,z=L[H],j=w[H];return on(0,1,z/(z+j)||0)},N=(F,R,H)=>{const w=D(H,F);return 1/w*(1-w)*R},S=F=>Y(F,{clear:["left"]}),$=F=>{v.forEach((R,H)=>{(F?xn(vo(F),H):!0)&&(Q(R||[],L=>{L&&L.cancel()}),v.delete(H))})},b=(F,R,H,w)=>{const L=v.get(F)||[],z=L.find(j=>j&&j.timeline===R);z?z.effect=new KeyframeEffect(F,H,{composite:w}):v.set(F,Ae(L,[F.animate(H,{timeline:R,composite:w})]))},B=(F,R,H)=>{const w=H?Vn:Bo;Q(F,L=>{w(L.Lt,R)})},E=(F,R)=>{Q(F,H=>{const[w,L]=R(H);it(w,L)})},_=(F,R)=>{E(F,H=>{const{Mt:w}=H;return[w,{[R?Ze:et]:Pn(D(R))}]})},C=(F,R)=>{const{Pt:H}=o,w=R?"x":"y",L=y[w],z=Kn(H)[w],j=(P,J)=>Kt(Pn(N(P,z?J:1-J,R)),R);L?Q(F,P=>{const{Mt:J}=P;b(J,L,S({transform:[0,1].map(ae=>j(P,ae))}))}):E(F,P=>[P.Mt,{transform:j(P,Wn(H,ye(u))[w])}])},x=F=>m&&!p&&nt(F)===d,k=[],A=[],T=[],K=(F,R,H)=>{const w=ho(H),L=w?H:!0,z=w?!H:!0;L&&B(A,F,R),z&&B(T,F,R)},Z=()=>{_(A,!0),_(T)},X=()=>{C(A,!0),C(T)},M=()=>{if(m){const{Rt:F,Pt:R}=o,H=Kn(R),w=.5;if(y.x&&y.y)Q(Ae(T,A),({Lt:L})=>{if(x(L)){const z=j=>b(L,y[j],S({transform:[0,H[j]?1:-1].map(P=>Kt(an(P*(F[j]-w)),j==="x"))}),"add");z("x"),z("y")}else $(L)});else{const L=Wn(R,ye(u)),z=j=>{const{Lt:P}=j,J=x(P)&&P,ae=(de,W,ce)=>{const ue=W*de;return an(ce?ue:-ue)};return[J,J&&{transform:Kt({x:ae(L.x,F.x,H.x),y:ae(L.y,F.y,H.y)})}]};E(A,z),E(T,z)}}},q=F=>{const H=Qe(`${xe} ${F?os:rs}`),w=Qe(Io),L=Qe(Bn),z={Lt:H,kt:w,Mt:L};return se(F?A:T,z),se(k,[ke(H,w),ke(w,L),U(Ie,H),$,s(z,K,C,F)]),z},G=U(q,!0),I=U(q,!1),ee=()=>(ke(O,A[0].Lt),ke(O,T[0].Lt),U(be,k));return G(),I(),[{Ut:Z,Nt:X,qt:M,Bt:K,Ft:{V:y.x,jt:A,Xt:G,Yt:U(E,A)},Wt:{V:y.y,jt:T,Xt:I,Yt:U(E,T)}},ee]},Es=(n,t,o,s)=>(r,c,a,i)=>{const{ht:l,ot:d,nt:f,gt:u,Jt:p,Ot:m}=t,{Lt:h,kt:g,Mt:v}=r,[V,y]=Ge(333),[O,D]=Ge(444),[N,S]=Ge(),$=U(a,[r],i),b=x=>{we(u.scrollBy)&&u.scrollBy({behavior:"smooth",left:x.x,top:x.y})},B=i?Ze:et,E=()=>{const x="pointerup pointercancel lostpointercapture",k=`client${i?"X":"Y"}`,A=i?"left":"top",T=i?"w":"h",K=i?"x":"y",Z=(X,M)=>q=>{const{Rt:G}=o,I=lt(g)[T]-lt(v)[T],F=M*q/I*G[K];Ne(u,{[K]:X+F})};return te(g,"pointerdown",X=>{const M=Je(X.target,`.${Bn}`)===v,q=M?v:g,G=n.scrollbars,{button:I,isPrimary:ee,pointerType:F}=X,{pointers:R}=G;if(I===0&&ee&&G[M?"dragScroll":"clickScroll"]&&(R||[]).includes(F)){D();const w=!M&&X.shiftKey,L=U(at,v),z=U(at,g),j=(re,fe)=>(re||L())[A]-(fe||z())[A],P=Qt(at(u)[B])/lt(u)[T]||1,J=Z(ye(u)[K],1/P),ae=X[k],de=L(),W=z(),ce=de[B],ue=j(de,W)+ce/2,_e=ae-W[A],ie=M?0:_e-ue,he=re=>{be(me),q.releasePointerCapture(re.pointerId)},le=()=>m(Xr,!0),oe=le(),me=[()=>{const re=ye(u);oe();const fe=ye(u),ve={x:fe.x-re.x,y:fe.y-re.y};(Vt(ve.x)>3||Vt(ve.y)>3)&&(le(),Ne(u,re),b(ve),O(oe))},te(p,x,he),te(p,"selectstart",re=>un(re),{H:!1}),te(g,x,he),te(g,"pointermove",re=>{const fe=re[k]-ae;(M||w)&&J(ie+fe)})];if(q.setPointerCapture(X.pointerId),w)J(ie);else if(!M){const re=dt(xs);re&&se(me,re(J,j,ie,ce,_e))}}})};let _=!0;const C=x=>x.propertyName.indexOf(B)>-1;return U(be,[te(v,"pointermove pointerleave",s),te(h,"pointerenter",()=>{c(to,!0)}),te(h,"pointerleave pointercancel",()=>{c(to,!1)}),!f&&te(h,"mousedown",()=>{const x=ln();(jn(x,He)||jn(x,je)||x===document.body)&&Nt(U(mn,d),25)}),te(h,"wheel",x=>{const{deltaX:k,deltaY:A,deltaMode:T}=x;_&&T===0&&nt(h)===l&&b({x:k,y:A}),_=!1,c(ro,!0),V(()=>{_=!0,c(ro)}),un(x)},{H:!1,I:!0}),te(v,"transitionstart",x=>{if(C(x)){const k=()=>{$(),N(k)};k()}}),te(v,"transitionend transitioncancel",x=>{C(x)&&(S(),$())}),te(h,"pointerdown",U(te,p,"click",Fo,{A:!0,I:!0,H:!1}),{I:!0}),E(),y,D,S])},Vs=(n,t,o,s,r,c)=>{let a,i,l,d,f,u=ze,p=0;const m=M=>M.pointerType==="mouse",[h,g]=Ge(),[v,V]=Ge(100),[y,O]=Ge(100),[D,N]=Ge(()=>p),[S,$]=bs(n,r,s,Es(t,r,s,M=>m(M)&&T())),{ht:b,Kt:B,yt:E}=r,{Bt:_,Ut:C,Nt:x,qt:k}=S,A=(M,q)=>{if(N(),M)_(oo);else{const G=U(_,oo,!0);p>0&&!q?D(G):G()}},T=()=>{(l?!a:!d)&&(A(!0),v(()=>{A(!1)}))},K=M=>{_(hn,M,!0),_(hn,M,!1)},Z=M=>{m(M)&&(a=l,l&&A(!0))},X=[N,V,O,g,()=>u(),te(b,"pointerover",Z,{A:!0}),te(b,"pointerenter",Z),te(b,"pointerleave",M=>{m(M)&&(a=!1,l&&A(!1))}),te(b,"pointermove",M=>{m(M)&&i&&T()}),te(B,"scroll",M=>{h(()=>{x(),T()}),c(M),k()})];return[()=>U(be,se(X,$())),({It:M,Tt:q,Gt:G,Qt:I})=>{const{Zt:ee,tn:F,nn:R,sn:H}=I||{},{Ct:w,dt:L}=G||{},{ct:z}=o,{M:j}=Be(),{G:P,en:J}=s,[ae,de]=M("showNativeOverlaidScrollbars"),[W,ce]=M("scrollbars.theme"),[ue,_e]=M("scrollbars.visibility"),[ie,he]=M("scrollbars.autoHide"),[le,oe]=M("scrollbars.autoHideSuspend"),[me]=M("scrollbars.autoHideDelay"),[re,fe]=M("scrollbars.dragScroll"),[ve,Ye]=M("scrollbars.clickScroll"),[ut,jt]=M("overflow"),It=L&&!q,Ut=J.x||J.y,Ee=ee||F||H||w||q,Pt=R||_e||jt,mt=ae&&j.x&&j.y,ft=(Oe,rt,st)=>{const pt=Oe.includes(tt)&&(ue===Re||ue==="auto"&&rt===tt);return _(ss,pt,st),pt};if(p=me,It&&(le&&Ut?(K(!1),u(),y(()=>{u=te(B,"scroll",U(K,!0),{A:!0})})):K(!0)),de&&_(ts,mt),ce&&(_(f),_(W,!0),f=W),oe&&!le&&K(!0),he&&(i=ie==="move",l=ie==="leave",d=ie==="never",A(d,!0)),fe&&_(cs,re),Ye&&_(as,ve),Pt){const Oe=ft(ut.x,P.x,!0),rt=ft(ut.y,P.y,!1);_(ls,!(Oe&&rt))}Ee&&(C(),x(),k(),_(no,!J.x,!0),_(no,!J.y,!1),_(ns,z&&!E))},{},S]},Ns=n=>{const t=Be(),{P:o,R:s}=t,{elements:r}=o(),{host:c,padding:a,viewport:i,content:l}=r,d=Bt(n),f=d?{}:n,{elements:u}=f,{host:p,padding:m,viewport:h,content:g}=u||{},v=d?n:f.target,V=Do(v),y=Ct(v,"textarea"),O=v.ownerDocument,D=O.documentElement,N=()=>O.defaultView||pe,S=U(ds,[v]),$=U(Po,[v]),b=U(Qe,""),B=U(S,b,i),E=U($,b,l),_=B(h),C=_===v,x=C&&V,k=!C&&E(g),A=!C&&_===k,T=x?D:_,K=y?S(b,c,p):v,Z=x?T:K,X=!C&&$(b,a,m),M=!A&&k,q=[M,T,X,Z].map(W=>Bt(W)&&!nt(W)&&W),G=W=>W&&xn(q,W),I=G(T)?v:T,ee={vt:v,ht:Z,ot:T,cn:X,bt:M,gt:x?D:T,Kt:x?O:T,rn:V?D:I,Jt:O,wt:y,yt:V,Dt:d,nt:C,ln:N,St:W=>En(T,He,W),Ot:(W,ce)=>rn(T,He,W,ce)},{vt:F,ht:R,cn:H,ot:w,bt:L}=ee,z=[()=>{Ve(R,[je,Wt]),Ve(F,Wt),V&&Ve(D,[Wt,je])}],j=y&&G(R);let P=y?F:sn([L,w,H,R,F].find(W=>W&&!G(W)));const J=x?F:L||w,ae=U(be,z);return[ee,()=>{const W=N(),ce=ln(),ue=oe=>{ke(nt(oe),sn(oe)),Ie(oe)},_e=oe=>te(oe,"focusin focusout focus blur",Fo,{I:!0,H:!1}),ie="tabindex",he=wn(w,ie),le=_e(ce);return Me(R,je,C?"":Gr),Me(H,pn,""),Me(w,He,""),Me(L,eo,""),C||(Me(w,ie,he||"-1"),V&&Me(D,Zn,"")),j&&(In(F,R),se(z,()=>{In(R,F),Ie(R)})),ke(J,P),ke(R,H),ke(H||R,!C&&w),ke(w,L),se(z,[le,()=>{const oe=ln(),me=G(w),re=me&&oe===w?F:oe,fe=_e(re);Ve(H,pn),Ve(L,eo),Ve(w,He),V&&Ve(D,Zn),he?Me(w,ie,he):Ve(w,ie),G(L)&&ue(L),me&&ue(w),G(H)&&ue(H),mn(re),fe()}]),s&&!C&&(bn(w,He,jo),se(z,U(Ve,w,He))),mn(!C&&V&&ce===F&&W.top===W?w:ce),le(),P=0,ae},ae]},Ss=({bt:n})=>({Gt:t,an:o,Tt:s})=>{const{xt:r}=t||{},{$t:c}=o;n&&(r||s)&&it(n,{[et]:c&&"100%"})},$s=({ht:n,cn:t,ot:o,nt:s},r)=>{const[c,a]=ge({i:Or,o:qn()},U(qn,n,"padding",""));return({It:i,Gt:l,an:d,Tt:f})=>{let[u,p]=a(f);const{R:m}=Be(),{ft:h,Ht:g,Ct:v}=l||{},{ct:V}=d,[y,O]=i("paddingAbsolute");(h||p||(f||g))&&([u,p]=c(f));const N=!s&&(O||v||p);if(N){const S=!y||!t&&!m,$=u.r+u.l,b=u.t+u.b,B={[wo]:S&&!V?-$:0,[bo]:S?-b:0,[_o]:S&&V?-$:0,top:S?-u.t:0,right:S?V?-u.r:"auto":0,left:S?V?"auto":-u.l:0,[Ze]:S&&`calc(100% + ${$}px)`},E={[go]:S?u.t:0,[ko]:S?u.r:0,[xo]:S?u.b:0,[yo]:S?u.l:0};it(t||o,B),it(o,E),Y(r,{cn:u,un:!S,rt:t?E:Y({},B,E)})}return{_n:N}}},Bs=(n,t)=>{const o=Be(),{ht:s,cn:r,ot:c,nt:a,Kt:i,gt:l,yt:d,Ot:f,ln:u}=n,{R:p}=o,m=d&&a,h=U(mo,0),g=["display","direction","flexDirection","writingMode"],v={i:Eo,o:{w:0,h:0}},V={i:wt,o:{}},y=M=>{f(zo,!m&&M)},O=(M,q)=>{const G=pe.devicePixelRatio%1!==0?1:0,I={w:h(M.w-q.w),h:h(M.h-q.h)};return{w:I.w>G?I.w:0,h:I.h>G?I.h:0}},[D,N]=ge(v,U(Sn,c)),[S,$]=ge(v,U(cn,c)),[b,B]=ge(v),[E]=ge(V),[_,C]=ge(v),[x]=ge(V),[k]=ge({i:(M,q)=>Ft(M,q,g),o:{}},()=>Ur(c)?We(c,g):{}),[A,T]=ge({i:(M,q)=>wt(M.T,q.T)&&wt(M.D,q.D),o:Ho()},()=>{y(!0);const M=ye(l),q=f(Jr,!0),G=te(i,tt,H=>{const w=ye(l);H.isTrusted&&w.x===M.x&&w.y===M.y&&Oo(H)},{I:!0,A:!0});Ne(l,{x:0,y:0}),q();const I=ye(l),ee=cn(l);Ne(l,{x:ee.w,y:ee.h});const F=ye(l);Ne(l,{x:F.x-I.x<1&&-ee.w,y:F.y-I.y<1&&-ee.h});const R=ye(l);return Ne(l,M),kn(()=>G()),{T:I,D:R}}),K=dt(Yo),Z=(M,q)=>`${q?Kr:Wr}${Lr(M)}`,X=M=>{const q=I=>[Re,qe,tt].map(ee=>Z(ee,I)),G=q(!0).concat(q()).join(" ");f(G),f(Le(M).map(I=>Z(M[I],I==="x")).join(" "),!0)};return({It:M,Gt:q,an:G,Tt:I},{_n:ee})=>{const{ft:F,Ht:R,Ct:H,dt:w,zt:L}=q||{},z=K&&K.tt(n,t,G,o,M),{it:j,ut:P,_t:J}=z||{},[ae,de]=ks(M,o),[W,ce]=M("overflow"),ue=Dt(W.x),_e=Dt(W.y),ie=F||ee||R||H||L||de;let he=N(I),le=$(I),oe=B(I),me=C(I);if(de&&p&&f(jo,!ae),ie){En(s,je,Et)&&y(!0);const[Ln]=P?P():[],[ht]=he=D(I),[vt]=le=S(I),gt=Ao(c),kt=m&&Ir(u()),mr={w:h(vt.w+ht.w),h:h(vt.h+ht.h)},On={w:h((kt?kt.w:gt.w+h(gt.w-vt.w))+ht.w),h:h((kt?kt.h:gt.h+h(gt.h-vt.h))+ht.h)};Ln&&Ln(),me=_(On),oe=b(O(mr,On),I)}const[re,fe]=me,[ve,Ye]=oe,[ut,jt]=le,[It,Ut]=he,[Ee,Pt]=E({x:ve.w>0,y:ve.h>0}),mt=ue&&_e&&(Ee.x||Ee.y)||ue&&Ee.x&&!Ee.y||_e&&Ee.y&&!Ee.x,ft=ee||H||L||Ut||jt||fe||Ye||ce||de||ie,Oe=ys(Ee,W),[rt,st]=x(Oe.G),[,pt]=k(I),An=H||w||pt||Pt||I,[dr,ur]=An?A(I):T();return ft&&(st&&X(Oe.G),J&&j&&it(c,J(Oe,G,j(Oe,ut,It)))),y(!1),rn(s,je,Et,mt),rn(r,pn,Et,mt),Y(t,{G:rt,Vt:{x:re.w,y:re.h},Rt:{x:ve.w,y:ve.h},en:Ee,Pt:Pr(dr,ve)}),{nn:st,Zt:fe,tn:Ye,sn:ur||Ye,dn:An}}},Cs=n=>{const[t,o,s]=Ns(n),r={cn:{t:0,r:0,b:0,l:0},un:!1,rt:{[wo]:0,[bo]:0,[_o]:0,[go]:0,[ko]:0,[xo]:0,[yo]:0},Vt:{x:0,y:0},Rt:{x:0,y:0},G:{x:qe,y:qe},en:{x:!1,y:!1},Pt:Ho()},{vt:c,gt:a,nt:i}=t,{R:l,M:d}=Be(),f=!l&&(d.x||d.y),u=[Ss(t),$s(t,r),Bs(t,r)];return[o,p=>{const m={},g=f&&ye(a);return Q(u,v=>{Y(m,v(p,m)||{})}),Ne(a,g),!i&&Ne(c,0),m},r,t,s]},Ds=(n,t,o,s,r)=>{const c=Qn(t,{}),[a,i,l,d,f]=Cs(n),[u,p,m]=ws(d,l,c,O=>{y({},O)}),[h,g,,v]=Vs(n,t,m,l,d,r),V=O=>Le(O).some(D=>!!O[D]),y=(O,D)=>{if(o())return!1;const{fn:N,Tt:S,At:$,pn:b}=O,B=N||{},E=!!S,_={It:Qn(t,B,E),fn:B,Tt:E};if(b)return g(_),!1;const C=D||p(Y({},_,{At:$})),x=i(Y({},_,{an:m,Gt:C}));g(Y({},_,{Gt:C,Qt:x}));const k=V(C),A=V(x),T=k||A||!_n(B)||E;return T&&s(O,{Gt:C,Qt:x}),T};return[()=>{const{rn:O,gt:D}=d,N=ye(O),S=[u(),a(),h()];return Ne(D,N),U(be,S)},y,()=>({vn:m,hn:l}),{gn:d,bn:v},f]},Ue=(n,t,o)=>{const{N:s}=Be(),r=Bt(n),c=r?n:n.target,a=qo(c);if(t&&!a){let i=!1;const l=[],d={},f=E=>{const _=No(E),C=dt(vs);return C?C(_,!0):_},u=Y({},s(),f(t)),[p,m,h]=fn(),[g,v,V]=fn(o),y=(E,_)=>{V(E,_),h(E,_)},[O,D,N,S,$]=Ds(n,u,()=>i,({fn:E,Tt:_},{Gt:C,Qt:x})=>{const{ft:k,Ct:A,xt:T,Ht:K,Et:Z,dt:X}=C,{Zt:M,tn:q,nn:G,sn:I}=x;y("updated",[B,{updateHints:{sizeChanged:!!k,directionChanged:!!A,heightIntrinsicChanged:!!T,overflowEdgeChanged:!!M,overflowAmountChanged:!!q,overflowStyleChanged:!!G,scrollCoordinatesChanged:!!I,contentMutation:!!K,hostMutation:!!Z,appear:!!X},changedOptions:E||{},force:!!_}])},E=>y("scroll",[B,E])),b=E=>{fs(c),be(l),i=!0,y("destroyed",[B,E]),m(),v()},B={options(E,_){if(E){const C=_?s():{},x=Ro(u,Y(C,f(E)));_n(x)||(Y(u,x),D({fn:x}))}return Y({},u)},on:g,off:(E,_)=>{E&&_&&v(E,_)},state(){const{vn:E,hn:_}=N(),{ct:C}=E,{Vt:x,Rt:k,G:A,en:T,cn:K,un:Z,Pt:X}=_;return Y({},{overflowEdge:x,overflowAmount:k,overflowStyle:A,hasOverflow:T,scrollCoordinates:{start:X.T,end:X.D},padding:K,paddingAbsolute:Z,directionRTL:C,destroyed:i})},elements(){const{vt:E,ht:_,cn:C,ot:x,bt:k,gt:A,Kt:T}=S.gn,{Ft:K,Wt:Z}=S.bn,X=q=>{const{Mt:G,kt:I,Lt:ee}=q;return{scrollbar:ee,track:I,handle:G}},M=q=>{const{jt:G,Xt:I}=q,ee=X(G[0]);return Y({},ee,{clone:()=>{const F=X(I());return D({pn:!0}),F}})};return Y({},{target:E,host:_,padding:C||x,viewport:x,content:k||x,scrollOffsetElement:A,scrollEventElement:T,scrollbarHorizontal:M(K),scrollbarVertical:M(Z)})},update:E=>D({Tt:E,At:!0}),destroy:U(b,!1),plugin:E=>d[Le(E)[0]]};return se(l,[$]),ms(c,B),Wo(Go,Ue,[B,p,d]),us(S.gn.yt,!r&&n.cancel)?(b(!0),B):(se(l,O()),y("initialized",[B]),B.update(!0),B)}return a};Ue.plugin=n=>{const t=$e(n),o=t?n:[n],s=o.map(r=>Wo(r,Ue)[0]);return hs(o),t?s:s[0]};Ue.valid=n=>{const t=n&&n.elements,o=we(t)&&t();return $t(o)&&!!qo(o.target)};Ue.env=()=>{const{k:n,M:t,R:o,V:s,B:r,F:c,P:a,U:i,N:l,q:d}=Be();return Y({},{scrollbarsSize:n,scrollbarsOverlaid:t,scrollbarsHiding:o,scrollTimeline:s,staticDefaultInitialization:r,staticDefaultOptions:c,getDefaultInitialization:a,setDefaultInitialization:i,getDefaultOptions:l,setDefaultOptions:d})};function Ts(){let n;const t=e.ref(null),o=Math.floor(Math.random()*2**32),s=e.ref(!1),r=e.ref([]),c=()=>r.value,a=()=>n.getSelection(),i=()=>r.value.length,l=()=>n.clearSelection(!0),d=e.ref(),f=e.ref(null),u=e.ref(null),p=e.ref(null);function m(){n=new vr({area:t.value,keyboardDrag:!1,selectedClass:"vf-explorer-selected",selectorClass:"vf-explorer-selector"}),n.subscribe("DS:start:pre",({items:D,event:N,isDragging:S})=>{if(S)n.Interaction._reset(N);else{s.value=!1;const $=t.value.offsetWidth-N.offsetX,b=t.value.offsetHeight-N.offsetY;$<15&&b<15&&n.Interaction._reset(N),N.target.classList.contains("os-scrollbar-handle")&&n.Interaction._reset(N)}}),document.addEventListener("dragleave",D=>{!D.buttons&&s.value&&(s.value=!1)})}const h=()=>e.nextTick(()=>{n.addSelection(n.getSelectables()),g()}),g=()=>{r.value=n.getSelection().map(D=>JSON.parse(D.dataset.item)),d.value(r.value)},v=()=>e.nextTick(()=>{const D=c().map(N=>N.path);l(),n.setSettings({selectables:document.getElementsByClassName("vf-item-"+o)}),n.addSelection(n.getSelectables().filter(N=>D.includes(JSON.parse(N.dataset.item).path))),g(),y()}),V=D=>{d.value=D,n.subscribe("DS:end",({items:N,event:S,isDragging:$})=>{r.value=N.map(b=>JSON.parse(b.dataset.item)),D(N.map(b=>JSON.parse(b.dataset.item)))})},y=()=>{f.value&&(t.value.getBoundingClientRect().height<t.value.scrollHeight?(u.value.style.height=t.value.scrollHeight+"px",u.value.style.display="block"):(u.value.style.height="100%",u.value.style.display="none"))},O=D=>{if(!f.value)return;const{scrollOffsetElement:N}=f.value.elements();N.scrollTo({top:t.value.scrollTop,left:0})};return e.onMounted(()=>{Ue(p.value,{scrollbars:{theme:"vf-theme-dark dark:vf-theme-light"},plugins:{OverlayScrollbars:Ue}},{initialized:D=>{f.value=D},scroll:(D,N)=>{const{scrollOffsetElement:S}=D.elements();t.value.scrollTo({top:S.scrollTop,left:0})}}),m(),y(),new ResizeObserver(y).observe(t.value),t.value.addEventListener("scroll",O),n.subscribe("DS:scroll",({isDragging:D})=>D||O())}),e.onUnmounted(()=>{n&&n.stop()}),e.onUpdated(()=>{n&&n.Area.reset()}),{area:t,explorerId:o,isDraggingRef:s,scrollBar:u,scrollBarContainer:p,getSelected:c,getSelection:a,selectAll:h,clearSelection:l,refreshSelection:v,getCount:i,onSelect:V}}function Ms(n,t){const o=e.ref(n),s=e.ref(t),r=e.ref([]),c=e.ref([]),a=e.ref([]),i=e.ref(!1),l=e.ref(5);let d=!1,f=!1;const u=e.reactive({adapter:o,storages:[],dirname:s,files:[]});function p(){let y=[],O=[],D=s.value??o.value+"://";D.length===0&&(r.value=[]),D.replace(o.value+"://","").split("/").forEach(function($){y.push($),y.join("/")!==""&&O.push({basename:$,name:$,path:o.value+"://"+y.join("/"),type:"dir"})}),c.value=O;const[N,S]=h(O,l.value);a.value=S,r.value=N}function m(y){l.value=y,p()}function h(y,O){return y.length>O?[y.slice(-O),y.slice(0,-O)]:[y,[]]}function g(y=null){i.value=y??!i.value}function v(){return r.value&&r.value.length&&!f}const V=e.computed(()=>{var y;return((y=r.value[r.value.length-2])==null?void 0:y.path)??o.value+"://"});return e.onMounted(()=>{}),e.watch(s,p),e.onMounted(p),{adapter:o,path:s,loading:d,searchMode:f,data:u,breadcrumbs:r,breadcrumbItems:c,limitBreadcrumbItems:m,hiddenBreadcrumbs:a,showHiddenBreadcrumbs:i,toggleHiddenBreadcrumbs:g,isGoUpAvailable:v,parentFolderPath:V}}const As=(n,t)=>{const o=br(n.id),s=hr(),r=o.getStore("metricUnits",!1),c=Br(o,n.theme),a=t.i18n,i=n.locale??t.locale,l=o.getStore("adapter"),d=p=>Array.isArray(p)?p:Nr,f=o.getStore("persist-path",n.persist),u=f?o.getStore("path",n.path):n.path;return e.reactive({version:Sr,root:null,debug:n.debug,emitter:s,storage:o,i18n:e.computed(()=>Vr(o,i,s,a)),modal:Cr(),dragSelect:e.computed(()=>Ts()),requester:wr(n.request),features:d(n.features),view:o.getStore("viewport","grid"),fullScreen:o.getStore("full-screen",n.fullScreen),showTreeView:o.getStore("show-tree-view",n.showTreeView),pinnedFolders:o.getStore("pinned-folders",n.pinnedFolders),treeViewData:[],selectButton:n.selectButton,maxFileSize:n.maxFileSize,theme:c,metricUnits:r,filesize:r?io:co,compactListView:o.getStore("compact-list-view",!0),persist:f,showThumbnails:o.getStore("show-thumbnails",n.showThumbnails),fs:Ms(l,u)})},Ls=e.createElementVNode("div",{class:"fixed inset-0 bg-gray-500 dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity"},null,-1),Os={class:"fixed z-10 inset-0 overflow-hidden"},Fs={class:"bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Hs={class:"bg-gray-50 dark:bg-gray-800 dark:border-t dark:border-gray-700 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},Ce={__name:"ModalLayout",setup(n){const t=e.ref(null),o=e.inject("ServiceContainer");return e.onMounted(()=>{const s=document.querySelector(".v-f-modal input");s&&s.focus(),e.nextTick(()=>{if(document.querySelector(".v-f-modal input")&&window.innerWidth<768){const r=t.value.getBoundingClientRect().bottom+16;window.scrollTo({top:r,left:0,behavior:"smooth"})}})}),(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:"v-f-modal relative z-30","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",onKeyup:r[1]||(r[1]=e.withKeys(c=>e.unref(o).modal.close(),["esc"])),tabindex:"0"},[Ls,e.createElementVNode("div",Os,[e.createElementVNode("div",{class:"flex items-end sm:items-center justify-center min-h-full p-4 text-center sm:p-0",onMousedown:r[0]||(r[0]=e.withModifiers(c=>e.unref(o).modal.close(),["self"]))},[e.createElementVNode("div",{ref_key:"modalBody",ref:t,class:"relative bg-white dark:bg-gray-800 rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-4xl md:max-w-2xl lg:max-w-3xl xl:max-w-3xl w-full"},[e.createElementVNode("div",Fs,[e.renderSlot(s.$slots,"default")]),e.createElementVNode("div",Hs,[e.renderSlot(s.$slots,"buttons")])],512)],32)])],32))}},Rs=(n,t)=>{const o=n.__vccOpts||n;for(const[s,r]of t)o[s]=r;return o},zs={props:{on:{type:String,required:!0}},setup(n,{emit:t,slots:o}){const s=e.inject("ServiceContainer"),r=e.ref(!1),{t:c}=s.i18n;let a=null;const i=()=>{clearTimeout(a),r.value=!0,a=setTimeout(()=>{r.value=!1},2e3)};return e.onMounted(()=>{s.emitter.on(n.on,i)}),e.onUnmounted(()=>{clearTimeout(a)}),{shown:r,t:c}}},js={key:1};function Is(n,t,o,s,r,c){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["text-sm text-green-600 dark:text-green-600 transition-opacity duration-500 ease-out",[{"opacity-0":!s.shown}]])},[n.$slots.default?e.renderSlot(n.$slots,"default",{key:0}):(e.openBlock(),e.createElementBlock("span",js,e.toDisplayString(s.t("Saved.")),1))],2)}const Xe=Rs(zs,[["render",Is]]),Us={class:"sm:flex sm:items-start select-none"},Ps=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})])],-1),qs={class:"mt-3 sm:mt-0 sm:ml-4 sm:text-left w-full"},Gs={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Ks={class:"flex overflow-auto","aria-label":"Tabs"},Ws=["onClick","aria-current"],Ys={key:0,class:"mt-4"},Xs={class:"m-1 text-sm text-gray-500"},Js={href:"https://vuefinder.ozdemir.be",class:"block mt-2 text-sm text-blue-500 dark:text-blue-400",target:"_blank"},Qs={href:"https://github.com/n1crack/vuefinder",class:"block mt-2 text-sm text-blue-500 dark:text-blue-400",target:"_blank"},Zs={key:1,class:"mt-2"},el={class:"m-1 text-sm text-gray-500"},tl={class:"mt-3 text-left"},nl={class:"space-y-2"},ol={class:"flex relative gap-x-3"},rl={class:"h-6 items-center"},sl={class:"flex-1 block text-sm"},ll={for:"metric_unit",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},al={class:"flex relative gap-x-3"},cl={class:"h-6 items-center"},il={class:"flex-1 block text-sm"},dl={for:"large_icons",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},ul={class:"flex relative gap-x-3"},ml={class:"h-6 items-center"},fl={class:"flex-1 block text-sm"},pl={for:"persist_path",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},hl={class:"flex relative gap-x-3"},vl={class:"h-6 items-center"},gl={class:"flex-1 block text-sm"},kl={for:"show_thumbnails",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},yl={class:""},xl={class:"h-6 items-center"},_l={for:"theme",class:"flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm"},wl={class:"flex text-sm"},bl=["label"],El=["value"],Vl={key:0,class:""},Nl={class:"h-6 items-center"},Sl={for:"language",class:"flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm text-nowrap"},$l={class:"flex text-sm"},Bl=["label"],Cl=["value"],Dl={key:2,class:"mt-3"},Tl={class:"space-y-2 sm:w-1/2"},Ml={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Al=e.createElementVNode("kbd",null,"F2",-1),Ll={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Ol=e.createElementVNode("kbd",null,"F5",-1),Fl={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Hl=e.createElementVNode("kbd",null,"Del",-1),Rl={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},zl=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Esc")],-1),jl={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Il=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"A")],-1),Ul={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Pl=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"F")],-1),ql={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Gl=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"E")],-1),Kl={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Wl=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,",")],-1),Yl={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Xl=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"Enter")],-1),Jl={key:3,class:"mt-3"},Ql={class:"m-1 text-sm text-gray-500"},Jo={__name:"ModalAbout",setup(n){const t=e.inject("ServiceContainer"),{setStore:o,clearStore:s}=t.storage,{t:r,changeLocale:c,locale:a}=t.i18n,i={ABOUT:"about",SETTINGS:"settings",SHORTCUTS:"shortcuts",RESET:"reset"},l=e.computed(()=>[{name:r("About"),key:i.ABOUT},{name:r("Settings"),key:i.SETTINGS},{name:r("Shortcuts"),key:i.SHORTCUTS},{name:r("Reset"),key:i.RESET}]),d=e.ref("about"),f=async()=>{s(),location.reload()},u=D=>{t.theme.set(D),t.emitter.emit("vf-theme-saved")},p=()=>{t.metricUnits=!t.metricUnits,t.filesize=t.metricUnits?io:co,o("metricUnits",t.metricUnits),t.emitter.emit("vf-metric-units-saved")},m=()=>{t.compactListView=!t.compactListView,o("compactListView",t.compactListView),t.emitter.emit("vf-compact-view-saved")},h=()=>{t.showThumbnails=!t.showThumbnails,o("show-thumbnails",t.showThumbnails),t.emitter.emit("vf-show-thumbnails-saved")},g=()=>{t.persist=!t.persist,o("persist-path",t.persist),t.emitter.emit("vf-persist-path-saved")},{i18n:v}=e.inject("VueFinderOptions"),y=Object.fromEntries(Object.entries({en:"English",fr:"French (Français)",de:"German (Deutsch)",fa:"Persian (فارسی)",he:"Hebrew (עִברִית)",hi:"Hindi (हिंदी)",ru:"Russian (Pусский)",sv:"Swedish (Svenska)",tr:"Turkish (Türkçe)",zhCN:"Simplified Chinese (简体中文)",zhTW:"Traditional Chinese (繁體中文)"}).filter(([D])=>Object.keys(v).includes(D))),O=e.computed(()=>({system:r("System"),light:r("Light"),dark:r("Dark")}));return(D,N)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:N[8]||(N[8]=S=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(r)("Close")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Us,[Ps,e.createElementVNode("div",qs,[e.createElementVNode("h3",Gs,e.toDisplayString("Vuefinder "+e.unref(t).version),1),e.createElementVNode("div",null,[e.createElementVNode("div",null,[e.createElementVNode("nav",Ks,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,S=>(e.openBlock(),e.createElementBlock("button",{key:S.name,onClick:$=>d.value=S.key,class:e.normalizeClass([S.key===d.value?"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 border-sky-500":"text-gray-500 dark:text-gray-500 hover:text-gray-700 border-gray-300 dark:border-gray-600","px-3 py-2 border-b font-medium text-sm"]),"aria-current":S.current?"page":void 0},e.toDisplayString(S.name),11,Ws))),128))])])]),d.value===i.ABOUT?(e.openBlock(),e.createElementBlock("div",Ys,[e.createElementVNode("div",Xs,e.toDisplayString(e.unref(r)("Vuefinder is a simple, lightweight, and fast file manager library for Vue.js applications")),1),e.createElementVNode("a",Js,e.toDisplayString(e.unref(r)("Project home")),1),e.createElementVNode("a",Qs,e.toDisplayString(e.unref(r)("Follow on GitHub")),1)])):e.createCommentVNode("",!0),d.value===i.SETTINGS?(e.openBlock(),e.createElementBlock("div",Zs,[e.createElementVNode("div",el,e.toDisplayString(e.unref(r)("Customize your experience with the following settings.")),1),e.createElementVNode("div",tl,[e.createElementVNode("fieldset",null,[e.createElementVNode("div",nl,[e.createElementVNode("div",ol,[e.createElementVNode("div",rl,[e.withDirectives(e.createElementVNode("input",{id:"metric_unit",name:"metric_unit",type:"checkbox","onUpdate:modelValue":N[0]||(N[0]=S=>e.unref(t).metricUnits=S),onClick:p,class:"h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"},null,512),[[e.vModelCheckbox,e.unref(t).metricUnits]])]),e.createElementVNode("div",sl,[e.createElementVNode("label",ll,[e.createTextVNode(e.toDisplayString(e.unref(r)("Use Metric Units"))+" ",1),e.createVNode(Xe,{class:"ms-3",on:"vf-metric-units-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",al,[e.createElementVNode("div",cl,[e.withDirectives(e.createElementVNode("input",{id:"large_icons",name:"large_icons",type:"checkbox","onUpdate:modelValue":N[1]||(N[1]=S=>e.unref(t).compactListView=S),onClick:m,class:"h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"},null,512),[[e.vModelCheckbox,e.unref(t).compactListView]])]),e.createElementVNode("div",il,[e.createElementVNode("label",dl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Compact list view"))+" ",1),e.createVNode(Xe,{class:"ms-3",on:"vf-compact-view-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",ul,[e.createElementVNode("div",ml,[e.withDirectives(e.createElementVNode("input",{id:"persist_path",name:"persist_path",type:"checkbox","onUpdate:modelValue":N[2]||(N[2]=S=>e.unref(t).persist=S),onClick:g,class:"h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"},null,512),[[e.vModelCheckbox,e.unref(t).persist]])]),e.createElementVNode("div",fl,[e.createElementVNode("label",pl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Persist path on reload"))+" ",1),e.createVNode(Xe,{class:"ms-3",on:"vf-persist-path-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",hl,[e.createElementVNode("div",vl,[e.withDirectives(e.createElementVNode("input",{id:"show_thumbnails",name:"show_thumbnails",type:"checkbox","onUpdate:modelValue":N[3]||(N[3]=S=>e.unref(t).showThumbnails=S),onClick:h,class:"h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"},null,512),[[e.vModelCheckbox,e.unref(t).showThumbnails]])]),e.createElementVNode("div",gl,[e.createElementVNode("label",kl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Show thumbnails"))+" ",1),e.createVNode(Xe,{class:"ms-3",on:"vf-show-thumbnails-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",yl,[e.createElementVNode("div",xl,[e.createElementVNode("label",_l,e.toDisplayString(e.unref(r)("Theme")),1)]),e.createElementVNode("div",wl,[e.withDirectives(e.createElementVNode("select",{id:"theme","onUpdate:modelValue":N[4]||(N[4]=S=>e.unref(t).theme.value=S),onChange:N[5]||(N[5]=S=>u(S.target.value)),class:"flex-shrink-0 sm:w-1/2 w-full text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded"},[e.createElementVNode("optgroup",{label:e.unref(r)("Theme")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(S,$)=>(e.openBlock(),e.createElementBlock("option",{value:$},e.toDisplayString(S),9,El))),256))],8,bl)],544),[[e.vModelSelect,e.unref(t).theme.value]]),e.createVNode(Xe,{class:"ms-3 flex-shrink-0 flex-grow basis-full",on:"vf-theme-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])]),e.unref(t).features.includes(e.unref(ne).LANGUAGE)&&Object.keys(e.unref(y)).length>1?(e.openBlock(),e.createElementBlock("div",Vl,[e.createElementVNode("div",Nl,[e.createElementVNode("label",Sl,e.toDisplayString(e.unref(r)("Language")),1)]),e.createElementVNode("div",$l,[e.withDirectives(e.createElementVNode("select",{id:"language","onUpdate:modelValue":N[6]||(N[6]=S=>e.isRef(a)?a.value=S:null),onChange:N[7]||(N[7]=S=>e.unref(c)(S.target.value)),class:"flex-shrink-0 sm:w-1/2 w-full text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded"},[e.createElementVNode("optgroup",{label:e.unref(r)("Language")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(y),(S,$)=>(e.openBlock(),e.createElementBlock("option",{value:$},e.toDisplayString(S),9,Cl))),256))],8,Bl)],544),[[e.vModelSelect,e.unref(a)]]),e.createVNode(Xe,{class:"ms-3 flex-shrink-0 flex-grow basis-full",on:"vf-language-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])):e.createCommentVNode("",!0)])])])])):e.createCommentVNode("",!0),d.value===i.SHORTCUTS?(e.openBlock(),e.createElementBlock("div",Dl,[e.createElementVNode("div",Tl,[e.createElementVNode("div",Ml,[e.createElementVNode("div",null,e.toDisplayString(e.unref(r)("Rename")),1),Al]),e.createElementVNode("div",Ll,[e.createElementVNode("div",null,e.toDisplayString(e.unref(r)("Refresh")),1),Ol]),e.createElementVNode("div",Fl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Delete"))+" ",1),Hl]),e.createElementVNode("div",Rl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Escape"))+" ",1),zl]),e.createElementVNode("div",jl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Select All"))+" ",1),Il]),e.createElementVNode("div",Ul,[e.createTextVNode(e.toDisplayString(e.unref(r)("Search"))+" ",1),Pl]),e.createElementVNode("div",ql,[e.createTextVNode(e.toDisplayString(e.unref(r)("Toggle Sidebar"))+" ",1),Gl]),e.createElementVNode("div",Kl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Open Settings"))+" ",1),Wl]),e.createElementVNode("div",Yl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Toggle Full Screen"))+" ",1),Xl])])])):e.createCommentVNode("",!0),d.value===i.RESET?(e.openBlock(),e.createElementBlock("div",Jl,[e.createElementVNode("div",Ql,e.toDisplayString(e.unref(r)("Reset all settings to default")),1),e.createElementVNode("button",{onClick:f,type:"button",class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(r)("Reset Settings")),1)])):e.createCommentVNode("",!0)])])]),_:1}))}},Zl=["title"],ea=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1),ta=[ea],De={__name:"Message",props:{error:{type:Boolean,default:!1}},emits:["hidden"],setup(n,{emit:t}){var d;const o=t,s=e.inject("ServiceContainer"),{t:r}=s.i18n,c=e.ref(!1),a=e.ref(null),i=e.ref((d=a.value)==null?void 0:d.strMessage);e.watch(i,()=>c.value=!1);const l=()=>{o("hidden"),c.value=!0};return(f,u)=>(e.openBlock(),e.createElementBlock("div",null,[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"strMessage",ref:a,class:e.normalizeClass(["flex mt-2 p-1 px-2 rounded text-sm break-all dark:opacity-75",n.error?"bg-red-100 text-red-600 ":"bg-emerald-100 text-emerald-600"])},[e.renderSlot(f.$slots,"default"),e.createElementVNode("div",{class:"ml-auto cursor-pointer",onClick:l,title:e.unref(r)("Close")},ta,8,Zl)],2))]))}},na={class:"sm:flex sm:items-start"},oa=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-red-600 dark:stroke-red-200",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})])],-1),ra={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},sa={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},la={class:"mt-2"},aa={class:"text-sm text-gray-500"},ca={class:"text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",style:{"max-height":"200px"}},ia={class:"flex text-sm text-gray-800 dark:text-gray-400"},da={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},ua=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1),ma=[ua],fa={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},pa=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1),ha=[pa],va={class:"ml-1.5"},ga={class:"m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center"},Dn={__name:"ModalDelete",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(t.modal.data.items),r=e.ref(""),c=()=>{s.value.length&&t.emitter.emit("vf-fetch",{params:{q:"delete",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{items:s.value.map(({path:a,type:i})=>({path:a,type:i}))},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("Files deleted.")})},onError:a=>{r.value=o(a.message)}})};return(a,i)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:c,class:"vf-btn vf-btn-danger"},e.toDisplayString(e.unref(o)("Yes, Delete!")),1),e.createElementVNode("button",{type:"button",onClick:i[1]||(i[1]=l=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1),e.createElementVNode("div",ga,e.toDisplayString(e.unref(o)("This action cannot be undone.")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",na,[oa,e.createElementVNode("div",ra,[e.createElementVNode("h3",sa,e.toDisplayString(e.unref(o)("Delete files")),1),e.createElementVNode("div",la,[e.createElementVNode("p",aa,e.toDisplayString(e.unref(o)("Are you sure you want to delete these files?")),1),e.createElementVNode("div",ca,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,l=>(e.openBlock(),e.createElementBlock("p",ia,[l.type==="dir"?(e.openBlock(),e.createElementBlock("svg",da,ma)):(e.openBlock(),e.createElementBlock("svg",fa,ha)),e.createElementVNode("span",va,e.toDisplayString(l.basename),1)]))),256))]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:i[0]||(i[0]=l=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},ka={class:"sm:flex sm:items-start"},ya=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})])],-1),xa={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},_a={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},wa={class:"mt-2"},ba={class:"flex text-sm text-gray-800 dark:text-gray-400 py-2"},Ea={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Va=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1),Na=[Va],Sa={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},$a=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1),Ba=[$a],Ca={class:"ml-1.5"},Tn={__name:"ModalRename",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(t.modal.data.items[0]),r=e.ref(t.modal.data.items[0].basename),c=e.ref(""),a=()=>{r.value!=""&&t.emitter.emit("vf-fetch",{params:{q:"rename",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{item:s.value.path,name:r.value},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("%s is renamed.",r.value)})},onError:i=>{c.value=o(i.message)}})};return(i,l)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:a,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Rename")),1),e.createElementVNode("button",{type:"button",onClick:l[2]||(l[2]=d=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",ka,[ya,e.createElementVNode("div",xa,[e.createElementVNode("h3",_a,e.toDisplayString(e.unref(o)("Rename")),1),e.createElementVNode("div",wa,[e.createElementVNode("p",ba,[s.value.type==="dir"?(e.openBlock(),e.createElementBlock("svg",Ea,Na)):(e.openBlock(),e.createElementBlock("svg",Sa,Ba)),e.createElementVNode("span",Ca,e.toDisplayString(s.value.basename),1)]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=d=>r.value=d),onKeyup:e.withKeys(a,["enter"]),class:"px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:"Name",type:"text"},null,544),[[e.vModelText,r.value]]),c.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:l[1]||(l[1]=d=>c.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},Te={ESCAPE:"Escape",F2:"F2",F5:"F5",DELETE:"Delete",ENTER:"Enter",BACKSLASH:"Backslash",KEY_A:"KeyA",KEY_E:"KeyE",KEY_F:"KeyF"};function Da(n){const t=o=>{o.code===Te.ESCAPE&&(n.modal.close(),n.root.focus()),!n.modal.visible&&(n.fs.searchMode||(o.code===Te.F2&&n.features.includes(ne.RENAME)&&(n.dragSelect.getCount()!==1||n.modal.open(Tn,{items:n.dragSelect.getSelected()})),o.code===Te.F5&&n.emitter.emit("vf-fetch",{params:{q:"index",adapter:n.fs.adapter,path:n.fs.data.dirname}}),o.code===Te.DELETE&&(!n.dragSelect.getCount()||n.modal.open(Dn,{items:n.dragSelect.getSelected()})),o.metaKey&&o.code===Te.BACKSLASH&&n.modal.open(Jo),o.metaKey&&o.code===Te.KEY_F&&n.features.includes(ne.SEARCH)&&(n.fs.searchMode=!0,o.preventDefault()),o.metaKey&&o.code===Te.KEY_E&&(n.showTreeView=!n.showTreeView,n.storage.setStore("show-tree-view",n.showTreeView)),o.metaKey&&o.code===Te.ENTER&&(n.fullScreen=!n.fullScreen,n.root.focus()),o.metaKey&&o.code===Te.KEY_A&&(n.dragSelect.selectAll(),o.preventDefault())))};e.onMounted(()=>{n.root.addEventListener("keydown",t)}),e.onUnmounted(()=>{n.root.removeEventListener("keydown",t)})}const Ta={class:"sm:flex sm:items-start"},Ma=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z"})])],-1),Aa={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},La={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Oa={class:"mt-2"},Fa={class:"text-sm text-gray-500"},Ha=["placeholder"],Qo={__name:"ModalNewFolder",setup(n){const t=e.inject("ServiceContainer");t.storage;const{t:o}=t.i18n,s=e.ref(""),r=e.ref(""),c=()=>{s.value!==""&&t.emitter.emit("vf-fetch",{params:{q:"newfolder",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{name:s.value},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("%s is created.",s.value)})},onError:a=>{r.value=o(a.message)}})};return(a,i)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:c,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Create")),1),e.createElementVNode("button",{type:"button",onClick:i[2]||(i[2]=l=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Ta,[Ma,e.createElementVNode("div",Aa,[e.createElementVNode("h3",La,e.toDisplayString(e.unref(o)("New Folder")),1),e.createElementVNode("div",Oa,[e.createElementVNode("p",Fa,e.toDisplayString(e.unref(o)("Create a new folder")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=l=>s.value=l),onKeyup:e.withKeys(c,["enter"]),class:"px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:e.unref(o)("Folder Name"),type:"text"},null,40,Ha),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:i[1]||(i[1]=l=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},Ra={class:"sm:flex sm:items-start"},za=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})])],-1),ja={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Ia={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Ua={class:"mt-2"},Pa={class:"text-sm text-gray-500"},qa=["placeholder"],Ga={__name:"ModalNewFile",setup(n){const t=e.inject("ServiceContainer");t.storage;const{t:o}=t.i18n,s=e.ref(""),r=e.ref(""),c=()=>{s.value!==""&&t.emitter.emit("vf-fetch",{params:{q:"newfile",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{name:s.value},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("%s is created.",s.value)})},onError:a=>{r.value=o(a.message)}})};return(a,i)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:c,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Create")),1),e.createElementVNode("button",{type:"button",onClick:i[2]||(i[2]=l=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Ra,[za,e.createElementVNode("div",ja,[e.createElementVNode("h3",Ia,e.toDisplayString(e.unref(o)("New File")),1),e.createElementVNode("div",Ua,[e.createElementVNode("p",Pa,e.toDisplayString(e.unref(o)("Create a new file")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=l=>s.value=l),onKeyup:e.withKeys(c,["enter"]),class:"px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:e.unref(o)("File Name"),type:"text"},null,40,qa),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:i[1]||(i[1]=l=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}};function vn(n,t=14){let o=`((?=([\\w\\W]{0,${t}}))([\\w\\W]{${t+1},})([\\w\\W]{8,}))`;return n.replace(new RegExp(o),"$2..$4")}const Ka={class:"sm:flex sm:items-start"},Wa=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})])],-1),Ya={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Xa={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Ja={class:"mt-2"},Qa={key:0,class:"pointer-events-none"},Za={key:1,class:"pointer-events-none"},ec=["disabled"],tc=["disabled"],nc={class:"text-gray-500 text-sm mb-1 pr-1 max-h-[200px] overflow-y-auto vf-scrollbar"},oc={class:"rounded flex flex-shrink-0 w-6 h-6 border bg-gray-50 text-xs cursor-default dark:border-gray-700 dark:bg-gray-800 dark:text-gray-50"},rc=["textContent"],sc={class:"ml-1 w-full h-fit"},lc={class:"text-left hidden md:block"},ac={class:"text-left md:hidden"},cc={key:0,class:"ml-auto"},ic=["title","disabled","onClick"],dc=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1),uc=[dc],mc={key:0,class:"py-2"},fc=["disabled"],pc={__name:"ModalUpload",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=o("uppy"),r={PENDING:0,CANCELED:1,UPLOADING:2,ERROR:3,DONE:10},c=e.ref({QUEUE_ENTRY_STATUS:r}),a=e.ref(null),i=e.ref(null),l=e.ref(null),d=e.ref(null),f=e.ref(null),u=e.ref(null),p=e.ref([]),m=e.ref(""),h=e.ref(!1),g=e.ref(!1);let v;function V(C){return p.value.findIndex(x=>x.id===C)}function y(C,x=null){x=x??(C.webkitRelativePath||C.name),v.addFile({name:x,type:C.type,data:C,source:"Local"})}function O(C){switch(C.status){case r.DONE:return"text-green-600";case r.ERROR:return"text-red-600";case r.CANCELED:return"text-red-600";case r.PENDING:default:return""}}const D=C=>{switch(C.status){case r.DONE:return"✓";case r.ERROR:case r.CANCELED:return"!";case r.PENDING:default:return"..."}};function N(){d.value.click()}function S(){if(!h.value){if(!p.value.filter(C=>C.status!==r.DONE).length){m.value=o("Please select file to upload first.");return}m.value="",v.retryAll(),v.upload()}}function $(){v.cancelAll({reason:"user"}),p.value.forEach(C=>{C.status!==r.DONE&&(C.status=r.CANCELED,C.statusName=o("Canceled"))}),h.value=!1}function b(C){h.value||(v.removeFile(C.id,"removed-by-user"),p.value.splice(V(C.id),1))}function B(C){if(!h.value){if(v.cancelAll({reason:"user"}),C){const x=[];p.value.forEach(k=>{k.status!==r.DONE&&x.push(k)}),p.value=[],x.forEach(k=>{y(k.originalFile,k.name)});return}p.value.splice(0)}}function E(){t.modal.close()}function _(){return t.requester.transformRequestParams({url:"",method:"post",params:{q:"upload",adapter:t.fs.adapter,path:t.fs.data.dirname}})}return e.onMounted(async()=>{v=new gr({debug:t.debug,restrictions:{maxFileSize:$r(t.maxFileSize)},locale:s,onBeforeFileAdded(k,A){if(A[k.id]!=null){const K=V(k.id);p.value[K].status===r.PENDING&&(m.value=v.i18n("noDuplicates",{fileName:k.name})),p.value=p.value.filter(Z=>Z.id!==k.id)}return p.value.push({id:k.id,name:k.name,size:t.filesize(k.size),status:r.PENDING,statusName:o("Pending upload"),percent:null,originalFile:k.data}),!0}}),v.use(kr,{endpoint:"WILL_BE_REPLACED_BEFORE_UPLOAD",limit:5,timeout:0,getResponseError(k,A){let T;try{T=JSON.parse(k).message}catch{T=o("Cannot parse server response.")}return new Error(T)}}),v.on("restriction-failed",(k,A)=>{const T=p.value[V(k.id)];b(T),m.value=A.message}),v.on("upload",()=>{const k=_();v.setMeta({...k.body});const A=v.getPlugin("XHRUpload");A.opts.method=k.method,A.opts.endpoint=k.url+"?"+new URLSearchParams(k.params),A.opts.headers=k.headers,delete k.headers["Content-Type"],h.value=!0,p.value.forEach(T=>{T.status!==r.DONE&&(T.percent=null,T.status=r.UPLOADING,T.statusName=o("Pending upload"))})}),v.on("upload-progress",(k,A)=>{const T=Math.floor(A.bytesUploaded/A.bytesTotal*100);p.value[V(k.id)].percent=`${T}%`}),v.on("upload-success",k=>{const A=p.value[V(k.id)];A.status=r.DONE,A.statusName=o("Done")}),v.on("upload-error",(k,A)=>{const T=p.value[V(k.id)];T.percent=null,T.status=r.ERROR,A.isNetworkError?T.statusName=o("Network Error, Unable establish connection to the server or interrupted."):T.statusName=A?A.message:o("Unknown Error")}),v.on("error",k=>{m.value=k.message,h.value=!1,t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname},noCloseModal:!0})}),v.on("complete",()=>{h.value=!1,t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname},noCloseModal:!0})}),d.value.addEventListener("click",()=>{i.value.click()}),f.value.addEventListener("click",()=>{l.value.click()}),u.value.addEventListener("dragover",k=>{k.preventDefault(),g.value=!0}),u.value.addEventListener("dragleave",k=>{k.preventDefault(),g.value=!1});function C(k,A){A.isFile&&A.file(T=>k(A,T)),A.isDirectory&&A.createReader().readEntries(T=>{T.forEach(K=>{C(k,K)})})}u.value.addEventListener("drop",k=>{k.preventDefault(),g.value=!1;const A=/^[/\\](.+)/;[...k.dataTransfer.items].forEach(T=>{T.kind==="file"&&C((K,Z)=>{const X=A.exec(K.fullPath);y(Z,X[1])},T.webkitGetAsEntry())})});const x=({target:k})=>{const A=k.files;for(const T of A)y(T);k.value=""};i.value.addEventListener("change",x),l.value.addEventListener("change",x)}),e.onBeforeUnmount(()=>{v==null||v.close({reason:"unmount"})}),(C,x)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["vf-btn vf-btn-primary",h.value?"bg-blue-200 hover:bg-blue-200 dark:bg-gray-700/50 dark:hover:bg-gray-700/50 dark:text-gray-500":"bg-blue-600 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-500"]),disabled:h.value,onClick:e.withModifiers(S,["prevent"])},e.toDisplayString(e.unref(o)("Upload")),11,fc),h.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"vf-btn vf-btn-secondary",onClick:e.withModifiers($,["prevent"])},e.toDisplayString(e.unref(o)("Cancel")),1)):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"vf-btn vf-btn-secondary",onClick:e.withModifiers(E,["prevent"])},e.toDisplayString(e.unref(o)("Close")),1))]),default:e.withCtx(()=>[e.createElementVNode("div",Ka,[Wa,e.createElementVNode("div",Ya,[e.createElementVNode("h3",Xa,e.toDisplayString(e.unref(o)("Upload Files")),1),e.createElementVNode("div",Ja,[e.createElementVNode("div",{ref_key:"dropArea",ref:u,class:"flex items-center justify-center text-lg mb-4 text-gray-500 border-2 border-gray-300 rounded border-dashed select-none cursor-pointer dark:border-gray-600 h-[120px]",onClick:N},[g.value?(e.openBlock(),e.createElementBlock("div",Qa,e.toDisplayString(e.unref(o)("Release to drop these files.")),1)):(e.openBlock(),e.createElementBlock("div",Za,e.toDisplayString(e.unref(o)("Drag and drop the files/folders to here or click here.")),1))],512),e.createElementVNode("div",{ref_key:"container",ref:a,class:"text-gray-500 mb-1"},[e.createElementVNode("button",{ref_key:"pickFiles",ref:d,type:"button",class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Select Files")),513),e.createElementVNode("button",{ref_key:"pickFolders",ref:f,type:"button",class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Select Folders")),513),e.createElementVNode("button",{type:"button",class:"vf-btn vf-btn-secondary",disabled:h.value,onClick:x[0]||(x[0]=k=>B(!1))},e.toDisplayString(e.unref(o)("Clear all")),9,ec),e.createElementVNode("button",{type:"button",class:"vf-btn vf-btn-secondary",disabled:h.value,onClick:x[1]||(x[1]=k=>B(!0))},e.toDisplayString(e.unref(o)("Clear only successful")),9,tc)],512),e.createElementVNode("div",nc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,k=>(e.openBlock(),e.createElementBlock("div",{class:"flex hover:bg-gray-100 dark:hover:bg-gray-800 dark:hover:text-gray-300",key:k.id},[e.createElementVNode("span",oc,[e.createElementVNode("span",{class:e.normalizeClass(["text-base m-auto",O(k)]),textContent:e.toDisplayString(D(k))},null,10,rc)]),e.createElementVNode("div",sc,[e.createElementVNode("div",lc,e.toDisplayString(e.unref(vn)(k.name,40))+" ("+e.toDisplayString(k.size)+")",1),e.createElementVNode("div",ac,e.toDisplayString(e.unref(vn)(k.name,16))+" ("+e.toDisplayString(k.size)+")",1),e.createElementVNode("div",{class:e.normalizeClass(["flex break-all text-left",O(k)])},[e.createTextVNode(e.toDisplayString(k.statusName)+" ",1),k.status===c.value.QUEUE_ENTRY_STATUS.UPLOADING?(e.openBlock(),e.createElementBlock("b",cc,e.toDisplayString(k.percent),1)):e.createCommentVNode("",!0)],2)]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["rounded w-5 h-5 border-1 text-base leading-none font-medium focus:outline-none dark:border-gray-200 dark:text-gray-400 dark:hover:text-gray-200 dark:bg-gray-600 ml-auto sm:text-xs hover:text-red-600",h.value?"disabled:bg-gray-100 text-white text-opacity-50":"bg-gray-100"]),title:e.unref(o)("Delete"),disabled:h.value,onClick:A=>b(k)},uc,10,ic)]))),128)),p.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",mc,e.toDisplayString(e.unref(o)("No files selected!")),1))]),m.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:x[2]||(x[2]=k=>m.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value),1)]),_:1})):e.createCommentVNode("",!0)])])]),e.createElementVNode("input",{ref_key:"internalFileInput",ref:i,type:"file",multiple:"",class:"hidden"},null,512),e.createElementVNode("input",{ref_key:"internalFolderInput",ref:l,type:"file",multiple:"",webkitdirectory:"",class:"hidden"},null,512)]),_:1}))}},hc={class:"sm:flex sm:items-start"},vc=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.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.5m6 4.125l2.25 2.25m0 0l2.25 2.25M12 13.875l2.25-2.25M12 13.875l-2.25 2.25M3.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"})])],-1),gc={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},kc={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},yc={class:"mt-2"},xc={class:"flex text-sm text-gray-800 dark:text-gray-400"},_c={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},wc=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1),bc=[wc],Ec={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Vc=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1),Nc=[Vc],Sc={class:"ml-1.5"},$c={class:"my-1 text-sm text-gray-500"},Zo={__name:"ModalUnarchive",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(t.modal.data.items[0]),r=e.ref(""),c=e.ref([]),a=()=>{t.emitter.emit("vf-fetch",{params:{q:"unarchive",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{item:s.value.path},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("The file unarchived.")})},onError:i=>{r.value=o(i.message)}})};return(i,l)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:a,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Unarchive")),1),e.createElementVNode("button",{type:"button",onClick:l[1]||(l[1]=d=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",hc,[vc,e.createElementVNode("div",gc,[e.createElementVNode("h3",kc,e.toDisplayString(e.unref(o)("Unarchive")),1),e.createElementVNode("div",yc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,d=>(e.openBlock(),e.createElementBlock("p",xc,[d.type==="dir"?(e.openBlock(),e.createElementBlock("svg",_c,bc)):(e.openBlock(),e.createElementBlock("svg",Ec,Nc)),e.createElementVNode("span",Sc,e.toDisplayString(d.basename),1)]))),256)),e.createElementVNode("p",$c,e.toDisplayString(e.unref(o)("The archive will be unarchived at"))+" ("+e.toDisplayString(e.unref(t).fs.data.dirname)+")",1),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:l[0]||(l[0]=d=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},Bc={class:"sm:flex sm:items-start"},Cc=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.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"})])],-1),Dc={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Tc={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Mc={class:"mt-2"},Ac={class:"text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",style:{"max-height":"200px"}},Lc={class:"flex text-sm text-gray-800 dark:text-gray-400"},Oc={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Fc=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1),Hc=[Fc],Rc={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},zc=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1),jc=[zc],Ic={class:"ml-1.5"},Uc=["placeholder"],er={__name:"ModalArchive",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(""),r=e.ref(""),c=e.ref(t.modal.data.items),a=()=>{c.value.length&&t.emitter.emit("vf-fetch",{params:{q:"archive",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{items:c.value.map(({path:i,type:l})=>({path:i,type:l})),name:s.value},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("The file(s) archived.")})},onError:i=>{r.value=o(i.message)}})};return(i,l)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:a,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Archive")),1),e.createElementVNode("button",{type:"button",onClick:l[2]||(l[2]=d=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Bc,[Cc,e.createElementVNode("div",Dc,[e.createElementVNode("h3",Tc,e.toDisplayString(e.unref(o)("Archive the files")),1),e.createElementVNode("div",Mc,[e.createElementVNode("div",Ac,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,d=>(e.openBlock(),e.createElementBlock("p",Lc,[d.type==="dir"?(e.openBlock(),e.createElementBlock("svg",Oc,Hc)):(e.openBlock(),e.createElementBlock("svg",Rc,jc)),e.createElementVNode("span",Ic,e.toDisplayString(d.basename),1)]))),256))]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=d=>s.value=d),onKeyup:e.withKeys(a,["enter"]),class:"my-1 px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:e.unref(o)("Archive name. (.zip file will be created)"),type:"text"},null,40,Uc),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:l[1]||(l[1]=d=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},Pc={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"},qc=e.createElementVNode("path",{d:"M12 10.5v6m3-3H9m4.06-7.19-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44z"},null,-1),Gc=[qc];function Kc(n,t){return e.openBlock(),e.createElementBlock("svg",Pc,[...Gc])}const Wc={render:Kc},Yc={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"},Xc=e.createElementVNode("path",{d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.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 0 0-9-9"},null,-1),Jc=[Xc];function Qc(n,t){return e.openBlock(),e.createElementBlock("svg",Yc,[...Jc])}const Zc={render:Qc},ei={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},ti=e.createElementVNode("path",{d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"},null,-1),ni=[ti];function oi(n,t){return e.openBlock(),e.createElementBlock("svg",ei,[...ni])}const ri={render:oi},si={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},li=e.createElementVNode("path",{d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21q.512.078 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48 48 0 0 0-3.478-.397m-12 .562q.51-.089 1.022-.165m0 0a48 48 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a52 52 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a49 49 0 0 0-7.5 0"},null,-1),ai=[li];function ci(n,t){return e.openBlock(),e.createElementBlock("svg",si,[...ai])}const ii={render:ci},di={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"},ui=e.createElementVNode("path",{d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"},null,-1),mi=[ui];function fi(n,t){return e.openBlock(),e.createElementBlock("svg",di,[...mi])}const pi={render:fi},hi={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},vi=e.createElementVNode("path",{d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-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.125"},null,-1),gi=[vi];function ki(n,t){return e.openBlock(),e.createElementBlock("svg",hi,[...gi])}const yi={render:ki},xi={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},_i=e.createElementVNode("path",{d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5m6 4.125 2.25 2.25m0 0 2.25 2.25M12 13.875l2.25-2.25M12 13.875l-2.25 2.25M3.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.125"},null,-1),wi=[_i];function bi(n,t){return e.openBlock(),e.createElementBlock("svg",xi,[...wi])}const Ei={render:bi},Vi={xmlns:"http://www.w3.org/2000/svg",fill:"none",class:"animate-spin p-0.5 h-5 w-5 text-white ml-auto",viewBox:"0 0 24 24"},Ni=e.createElementVNode("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",class:"opacity-25 stroke-blue-900 dark:stroke-blue-100"},null,-1),Si=e.createElementVNode("path",{fill:"currentColor",d:"M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12zm2 5.291A7.96 7.96 0 0 1 4 12H0c0 3.042 1.135 5.824 3 7.938z",class:"opacity-75"},null,-1),$i=[Ni,Si];function Bi(n,t){return e.openBlock(),e.createElementBlock("svg",Vi,[...$i])}const Mn={render:Bi},Ci={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"},Di=e.createElementVNode("path",{d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"},null,-1),Ti=[Di];function Mi(n,t){return e.openBlock(),e.createElementBlock("svg",Ci,[...Ti])}const Ai={render:Mi},Li={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"},Oi=e.createElementVNode("path",{d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"},null,-1),Fi=[Oi];function Hi(n,t){return e.openBlock(),e.createElementBlock("svg",Li,[...Fi])}const Ri={render:Hi},zi={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},ji=e.createElementVNode("path",{d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25zm0 9.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18zM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25zm0 9.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18z"},null,-1),Ii=[ji];function Ui(n,t){return e.openBlock(),e.createElementBlock("svg",zi,[...Ii])}const Pi={render:Ui},qi={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},Gi=e.createElementVNode("path",{d:"M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 0 1 0 3.75H5.625a1.875 1.875 0 0 1 0-3.75"},null,-1),Ki=[Gi];function Wi(n,t){return e.openBlock(),e.createElementBlock("svg",qi,[...Ki])}const Yi={render:Wi},Xi={class:"border-neutral-300 flex justify-between items-center py-1 text-sm grow-0"},Ji={key:0,class:"flex text-center"},Qi=["title"],Zi=["title"],ed=["title"],td=["title"],nd=["title"],od=["title"],rd=["title"],sd={key:1,class:"flex text-center"},ld={class:"pl-2"},ad={class:"dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded"},cd={class:"flex text-center items-center justify-end"},id=["title"],dd=["title"],ud={__name:"Toolbar",setup(n){const t=e.inject("ServiceContainer"),{setStore:o}=t.storage,{t:s}=t.i18n,r=t.dragSelect,c=e.ref("");t.emitter.on("vf-search-query",({newQuery:l})=>{c.value=l});const a=()=>{t.fullScreen=!t.fullScreen};e.watch(()=>t.fullScreen,()=>{t.fullScreen?document.querySelector("body").style.overflow="hidden":document.querySelector("body").style.overflow="",o("full-screen",t.fullScreen),t.emitter.emit("vf-fullscreen-toggle")});const i=()=>{t.view=t.view==="list"?"grid":"list",r.refreshSelection(),o("viewport",t.view)};return(l,d)=>(e.openBlock(),e.createElementBlock("div",Xi,[c.value.length?(e.openBlock(),e.createElementBlock("div",sd,[e.createElementVNode("div",ld,[e.createTextVNode(e.toDisplayString(e.unref(s)("Search results for"))+" ",1),e.createElementVNode("span",ad,e.toDisplayString(c.value),1)]),e.unref(t).fs.loading?(e.openBlock(),e.createBlock(e.unref(Mn),{key:0})):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Ji,[e.unref(t).features.includes(e.unref(ne).NEW_FOLDER)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mx-1.5",title:e.unref(s)("New Folder"),onClick:d[0]||(d[0]=f=>e.unref(t).modal.open(Qo,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(Wc))],8,Qi)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).NEW_FILE)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"mx-1.5",title:e.unref(s)("New File"),onClick:d[1]||(d[1]=f=>e.unref(t).modal.open(Ga,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(Zc))],8,Zi)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).RENAME)?(e.openBlock(),e.createElementBlock("div",{key:2,class:"mx-1.5",title:e.unref(s)("Rename"),onClick:d[2]||(d[2]=f=>e.unref(r).getCount()!==1||e.unref(t).modal.open(Tn,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(ri),{class:e.normalizeClass(e.unref(r).getCount()===1?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,ed)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).DELETE)?(e.openBlock(),e.createElementBlock("div",{key:3,class:"mx-1.5",title:e.unref(s)("Delete"),onClick:d[3]||(d[3]=f=>!e.unref(r).getCount()||e.unref(t).modal.open(Dn,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(ii),{class:e.normalizeClass(e.unref(r).getCount()?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,td)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).UPLOAD)?(e.openBlock(),e.createElementBlock("div",{key:4,class:"mx-1.5",title:e.unref(s)("Upload"),onClick:d[4]||(d[4]=f=>e.unref(t).modal.open(pc,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(pi))],8,nd)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).UNARCHIVE)&&e.unref(r).getCount()===1&&e.unref(r).getSelected()[0].mime_type==="application/zip"?(e.openBlock(),e.createElementBlock("div",{key:5,class:"mx-1.5",title:e.unref(s)("Unarchive"),onClick:d[5]||(d[5]=f=>!e.unref(r).getCount()||e.unref(t).modal.open(Zo,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(Ei),{class:e.normalizeClass(e.unref(r).getCount()?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,od)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).ARCHIVE)?(e.openBlock(),e.createElementBlock("div",{key:6,class:"mx-1.5",title:e.unref(s)("Archive"),onClick:d[6]||(d[6]=f=>!e.unref(r).getCount()||e.unref(t).modal.open(er,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(yi),{class:e.normalizeClass(e.unref(r).getCount()?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,rd)):e.createCommentVNode("",!0)])),e.createElementVNode("div",cd,[e.unref(t).features.includes(e.unref(ne).FULL_SCREEN)?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:a,class:"mx-1.5",title:e.unref(s)("Toggle Full Screen")},[e.unref(t).fullScreen?(e.openBlock(),e.createBlock(e.unref(Ri),{key:0})):(e.openBlock(),e.createBlock(e.unref(Ai),{key:1}))],8,id)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"mx-1.5",title:e.unref(s)("Change View"),onClick:d[7]||(d[7]=f=>c.value.length||i())},[e.unref(t).view==="grid"?(e.openBlock(),e.createBlock(e.unref(Pi),{key:0,class:e.normalizeClass(c.value.length?"vf-toolbar-icon-disabled":"vf-toolbar-icon")},null,8,["class"])):e.createCommentVNode("",!0),e.unref(t).view==="list"?(e.openBlock(),e.createBlock(e.unref(Yi),{key:1,class:e.normalizeClass(c.value.length?"vf-toolbar-icon-disabled":"vf-toolbar-icon")},null,8,["class"])):e.createCommentVNode("",!0)],8,dd)])]))}},md=(n,t=0,o=!1)=>{let s;return(...r)=>{o&&!s&&n(...r),clearTimeout(s),s=setTimeout(()=>{n(...r)},t)}},lo=(n,t,o)=>{const s=e.ref(n);return e.customRef((r,c)=>({get(){return r(),s.value},set:md(a=>{s.value=a,c()},t,o)}))},fd={class:"sm:flex sm:items-start"},pd=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})])],-1),hd={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},vd={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},gd={class:"text-sm text-gray-500 pb-1"},kd={class:"max-h-[200px] overflow-y-auto vf-scrollbar text-left"},yd={class:"flex text-sm text-gray-800 dark:text-gray-400"},xd={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},_d=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1),wd=[_d],bd={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Ed=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1),Vd=[Ed],Nd={class:"ml-1.5"},Sd={class:"font-bold text-xs text-gray-700 dark:text-gray-500 mt-3 tracking-wider"},$d={class:"flex text-sm text-gray-800 dark:text-gray-400 border dark:border-gray-700 p-1 rounded"},Bd=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})],-1),Cd={class:"ml-1.5 overflow-auto"},Dd={class:"m-1 mr-auto font-bold text-gray-500 text-sm dark:text-gray-200 self-center"},gn={__name:"ModalMove",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(t.modal.data.items.from),r=e.ref(""),c=()=>{s.value.length&&t.emitter.emit("vf-fetch",{params:{q:"move",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{items:s.value.map(({path:a,type:i})=>({path:a,type:i})),item:t.modal.data.items.to.path},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("Files moved.",t.modal.data.items.to.name)})},onError:a=>{r.value=o(a.message)}})};return(a,i)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:c,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Yes, Move!")),1),e.createElementVNode("button",{type:"button",onClick:i[1]||(i[1]=l=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1),e.createElementVNode("div",Dd,e.toDisplayString(e.unref(o)("%s item(s) selected.",s.value.length)),1)]),default:e.withCtx(()=>[e.createElementVNode("div",fd,[pd,e.createElementVNode("div",hd,[e.createElementVNode("h3",vd,e.toDisplayString(e.unref(o)("Move files")),1),e.createElementVNode("p",gd,e.toDisplayString(e.unref(o)("Are you sure you want to move these files?")),1),e.createElementVNode("div",kd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,l=>(e.openBlock(),e.createElementBlock("div",yd,[e.createElementVNode("div",null,[l.type==="dir"?(e.openBlock(),e.createElementBlock("svg",xd,wd)):(e.openBlock(),e.createElementBlock("svg",bd,Vd))]),e.createElementVNode("div",Nd,e.toDisplayString(l.path),1)]))),256))]),e.createElementVNode("h4",Sd,e.toDisplayString(e.unref(o)("Target Directory")),1),e.createElementVNode("p",$d,[Bd,e.createElementVNode("span",Cd,e.toDisplayString(e.unref(t).modal.data.items.to.path),1)]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:i[0]||(i[0]=l=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])]),_:1}))}},Td={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-1 rounded text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer",viewBox:"-40 -40 580 580"},Md=e.createElementVNode("path",{d:"M463.5 224h8.5c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2S461.9 48.1 455 55l-41.6 41.6c-87.6-86.5-228.7-86.2-315.8 1-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2S334.3 224 344 224z"},null,-1),Ad=[Md];function Ld(n,t){return e.openBlock(),e.createElementBlock("svg",Td,[...Ad])}const Od={render:Ld},Fd={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-0.5 rounded",viewBox:"0 0 20 20"},Hd=e.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 9.707a1 1 0 0 1 0-1.414l4-4a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L11 7.414V15a1 1 0 1 1-2 0V7.414L6.707 9.707a1 1 0 0 1-1.414 0",class:"pointer-events-none","clip-rule":"evenodd"},null,-1),Rd=[Hd];function zd(n,t){return e.openBlock(),e.createElementBlock("svg",Fd,[...Rd])}const jd={render:zd},Id={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"h-6 w-6 p-1 rounded text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer",viewBox:"0 0 24 24"},Ud=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1),Pd=[Ud];function qd(n,t){return e.openBlock(),e.createElementBlock("svg",Id,[...Pd])}const Gd={render:qd},Kd={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-1 rounded text-slate-700 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-gray-800 cursor-pointer",viewBox:"0 0 20 20"},Wd=e.createElementVNode("path",{d:"M10.707 2.293a1 1 0 0 0-1.414 0l-7 7a1 1 0 0 0 1.414 1.414L4 10.414V17a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-6.586l.293.293a1 1 0 0 0 1.414-1.414z",class:"pointer-events-none"},null,-1),Yd=[Wd];function Xd(n,t){return e.openBlock(),e.createElementBlock("svg",Kd,[...Yd])}const Jd={render:Xd},Qd={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-1 m-auto stroke-gray-400 fill-gray-100 dark:stroke-gray-400 dark:fill-gray-400/20",viewBox:"0 0 20 20"},Zd=e.createElementVNode("path",{d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607"},null,-1),eu=[Zd];function tu(n,t){return e.openBlock(),e.createElementBlock("svg",Qd,[...eu])}const nu={render:tu},ou={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"w-6 h-6 cursor-pointer",viewBox:"0 0 24 24"},ru=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1),su=[ru];function lu(n,t){return e.openBlock(),e.createElementBlock("svg",ou,[...su])}const au={render:lu},cu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",viewBox:"0 0 24 24"},iu=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-6l-2-2H5a2 2 0 0 0-2 2"},null,-1),du=[iu];function uu(n,t){return e.openBlock(),e.createElementBlock("svg",cu,[...du])}const zt={render:uu},mu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",class:"h-6 w-6 p-1 rounded text-slate-700 dark:text-neutral-300 cursor-pointer",viewBox:"0 0 24 24"},fu=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),pu=e.createElementVNode("path",{d:"M9 6h11M12 12h8M15 18h5M5 6v.01M8 12v.01M11 18v.01"},null,-1),hu=[fu,pu];function vu(n,t){return e.openBlock(),e.createElementBlock("svg",mu,[...hu])}const gu={render:vu},ku={xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 rounded text-slate-700 hover:bg-neutral-100 dark:fill-neutral-300 dark:hover:bg-gray-800 cursor-pointer",viewBox:"0 0 448 512"},yu=e.createElementVNode("path",{d:"M8 256a56 56 0 1 1 112 0 56 56 0 1 1-112 0m160 0a56 56 0 1 1 112 0 56 56 0 1 1-112 0m216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112"},null,-1),xu=[yu];function _u(n,t){return e.openBlock(),e.createElementBlock("svg",ku,[...xu])}const wu={render:_u},bu={class:"space-x-0.5 flex p-1.5 bg-neutral-100 dark:bg-gray-800 border-t border-b border-neutral-300 dark:border-gray-700/50 items-center select-none text-sm grow-0"},Eu=["title"],Vu=["title"],Nu=["title"],Su=["title"],$u={class:"flex leading-6"},Bu={key:0,class:"flex"},Cu=e.createElementVNode("div",{class:"text-neutral-300 dark:text-gray-600 mx-0.5"},"/",-1),Du={class:"relative"},Tu=e.createElementVNode("span",{class:"text-neutral-300 dark:text-gray-600 mx-0.5"},"/",-1),Mu=["onDragover","onDragleave","onDrop","title","onClick"],Au={class:"relative flex bg-white dark:bg-gray-700 justify-between items-center rounded p-1 ml-2 w-full"},Lu=["placeholder"],Ou={class:"z-30 absolute top-[65px] md:top-[75px] left-[90px] rounded -mx-1.5 mt-1 bg-neutral-50 dark:bg-gray-800 max-w-80 max-h-50 shadow overflow-y-auto text-gray-700 dark:text-gray-200 border border-neutral-300 dark:border-gray-600"},Fu=["onDrop","onClick"],Hu={class:"flex pointer-events-none"},Ru={class:"inline-block w-full text-ellipsis overflow-hidden"},zu={__name:"Breadcrumb",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=t.dragSelect,{setStore:r}=t.storage,c=e.ref(null),a=lo(0,100);e.watch(a,$=>{const b=c.value.children;let B=0,E=0,_=5,C=1;t.fs.limitBreadcrumbItems(_),e.nextTick(()=>{for(let x=b.length-1;x>=0&&!(B+b[x].offsetWidth>a.value-40);x--)B+=parseInt(b[x].offsetWidth,10),E++;E<C&&(E=C),E>_&&(E=_),t.fs.limitBreadcrumbItems(E)})});const i=()=>{a.value=c.value.offsetWidth};e.onMounted(()=>{new ResizeObserver(i).observe(c.value)});const l=($,b=null)=>{$.preventDefault(),s.isDraggingRef.value=!1,u($),b??(b=t.fs.hiddenBreadcrumbs.length-1);let B=JSON.parse($.dataTransfer.getData("items"));if(B.find(E=>E.storage!==t.fs.adapter)){alert("Moving items between different storages is not supported yet.");return}t.modal.open(gn,{items:{from:B,to:t.fs.hiddenBreadcrumbs[b]??{path:t.fs.adapter+"://"}}})},d=($,b=null)=>{$.preventDefault(),s.isDraggingRef.value=!1,u($),b??(b=t.fs.breadcrumbs.length-2);let B=JSON.parse($.dataTransfer.getData("items"));if(B.find(E=>E.storage!==t.fs.adapter)){alert("Moving items between different storages is not supported yet.");return}t.modal.open(gn,{items:{from:B,to:t.fs.breadcrumbs[b]??{path:t.fs.adapter+"://"}}})},f=$=>{$.preventDefault(),t.fs.isGoUpAvailable()?($.dataTransfer.dropEffect="copy",$.currentTarget.classList.add("bg-blue-200","dark:bg-slate-600")):($.dataTransfer.dropEffect="none",$.dataTransfer.effectAllowed="none")},u=$=>{$.preventDefault(),$.currentTarget.classList.remove("bg-blue-200","dark:bg-slate-600"),t.fs.isGoUpAvailable()&&$.currentTarget.classList.remove("bg-blue-200","dark:bg-slate-600")},p=()=>{N(),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname}})},m=()=>{N(),!t.fs.isGoUpAvailable()||t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.parentFolderPath}})},h=$=>{t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:$.path}}),t.fs.toggleHiddenBreadcrumbs(!1)},g=()=>{t.fs.showHiddenBreadcrumbs&&t.fs.toggleHiddenBreadcrumbs(!1)},v={mounted($,b,B,E){$.clickOutsideEvent=function(_){$===_.target||$.contains(_.target)||b.value()},document.body.addEventListener("click",$.clickOutsideEvent)},beforeUnmount($,b,B,E){document.body.removeEventListener("click",$.clickOutsideEvent)}},V=()=>{t.showTreeView=!t.showTreeView};e.watch(()=>t.showTreeView,($,b)=>{$!==b&&r("show-tree-view",$)});const y=e.ref(null),O=()=>{t.features.includes(ne.SEARCH)&&(t.fs.searchMode=!0,e.nextTick(()=>y.value.focus()))},D=lo("",400);e.watch(D,$=>{t.emitter.emit("vf-toast-clear"),t.emitter.emit("vf-search-query",{newQuery:$})}),e.watch(()=>t.fs.searchMode,$=>{$&&e.nextTick(()=>y.value.focus())});const N=()=>{t.fs.searchMode=!1,D.value=""};t.emitter.on("vf-search-exit",()=>{N()});const S=()=>{D.value===""&&N()};return($,b)=>(e.openBlock(),e.createElementBlock("div",bu,[e.createElementVNode("span",{title:e.unref(o)("Toggle Tree View")},[e.createVNode(e.unref(gu),{onClick:V,class:e.normalizeClass(["h-6 w-6 p-0.5 rounded cursor-pointer text-slate-700",e.unref(t).showTreeView?"bg-gray-300 dark:bg-gray-700":""])},null,8,["class"])],8,Eu),e.createElementVNode("span",{title:e.unref(o)("Go up a directory")},[e.createVNode(e.unref(jd),{onDragover:b[0]||(b[0]=B=>f(B)),onDragleave:b[1]||(b[1]=B=>u(B)),onDrop:b[2]||(b[2]=B=>d(B)),onClick:m,class:e.normalizeClass(e.unref(t).fs.isGoUpAvailable()?"text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer":"text-gray-400 dark:text-neutral-500")},null,8,["class"])],8,Vu),e.unref(t).fs.loading?(e.openBlock(),e.createElementBlock("span",{key:1,title:e.unref(o)("Cancel")},[e.createVNode(e.unref(Gd),{onClick:b[3]||(b[3]=B=>e.unref(t).emitter.emit("vf-fetch-abort"))})],8,Su)):(e.openBlock(),e.createElementBlock("span",{key:0,title:e.unref(o)("Refresh")},[e.createVNode(e.unref(Od),{onClick:p})],8,Nu)),e.withDirectives(e.createElementVNode("div",{onClick:e.withModifiers(O,["self"]),class:"group flex bg-white dark:bg-gray-700 items-center rounded p-1 ml-2 w-full overflow-hidden"},[e.createElementVNode("div",null,[e.createVNode(e.unref(Jd),{onDragover:b[4]||(b[4]=B=>f(B)),onDragleave:b[5]||(b[5]=B=>u(B)),onDrop:b[6]||(b[6]=B=>d(B,-1)),onClick:b[7]||(b[7]=B=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:e.unref(t).fs.adapter}}))})]),e.createElementVNode("div",$u,[e.unref(t).fs.hiddenBreadcrumbs.length?e.withDirectives((e.openBlock(),e.createElementBlock("div",Bu,[Cu,e.createElementVNode("div",Du,[e.createElementVNode("span",{onDragenter:b[8]||(b[8]=B=>e.unref(t).fs.toggleHiddenBreadcrumbs(!0)),onClick:b[9]||(b[9]=B=>e.unref(t).fs.toggleHiddenBreadcrumbs()),class:"text-slate-700 dark:text-slate-200 hover:bg-neutral-100 dark:hover:bg-gray-800 rounded cursor-pointer"},[e.createVNode(e.unref(wu),{class:"px-1 pointer-events-none"})],32)])])),[[v,g]]):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"breadcrumbContainer",ref:c,class:"flex leading-6 w-full overflow-hidden",onClick:e.withModifiers(O,["self"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.breadcrumbs,(B,E)=>(e.openBlock(),e.createElementBlock("div",{key:E},[Tu,e.createElementVNode("span",{onDragover:_=>E===e.unref(t).fs.breadcrumbs.length-1||f(_),onDragleave:_=>E===e.unref(t).fs.breadcrumbs.length-1||u(_),onDrop:_=>E===e.unref(t).fs.breadcrumbs.length-1||d(_,E),class:"px-1.5 py-1 text-slate-700 dark:text-slate-200 hover:bg-neutral-100 dark:hover:bg-gray-800 rounded cursor-pointer whitespace-nowrap",title:B.basename,onClick:_=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:e.unref(t).fs.adapter,path:B.path}})},e.toDisplayString(B.name),41,Mu)]))),128))],512),e.unref(t).fs.loading?(e.openBlock(),e.createBlock(e.unref(Mn),{key:0})):e.createCommentVNode("",!0)],512),[[e.vShow,!e.unref(t).fs.searchMode]]),e.withDirectives(e.createElementVNode("div",Au,[e.createElementVNode("div",null,[e.createVNode(e.unref(nu))]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:y,onKeydown:e.withKeys(N,["esc"]),onBlur:S,"onUpdate:modelValue":b[10]||(b[10]=B=>e.isRef(D)?D.value=B:null),placeholder:e.unref(o)("Search anything.."),class:"w-full pb-0 px-1 border-0 text-base ring-0 outline-0 text-gray-600 focus:ring-transparent focus:border-transparent dark:focus:ring-transparent dark:focus:border-transparent dark:text-gray-300 bg-transparent",type:"text"},null,40,Lu),[[e.vModelText,e.unref(D)]]),e.createVNode(e.unref(au),{onClick:N})],512),[[e.vShow,e.unref(t).fs.searchMode]]),e.withDirectives(e.createElementVNode("div",Ou,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.hiddenBreadcrumbs,(B,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,onDragover:b[11]||(b[11]=_=>f(_)),onDragleave:b[12]||(b[12]=_=>u(_)),onDrop:_=>l(_,E),onClick:_=>h(B),class:"px-2 py-0.5 hover:bg-gray-400/20 cursor-pointer items-center whitespace-nowrap"},[e.createElementVNode("div",Hu,[e.createElementVNode("span",null,[e.createVNode(e.unref(zt),{class:"h-5 w-5"})]),e.createTextVNode(),e.createElementVNode("span",Ru,e.toDisplayString(B.name),1)])],40,Fu))),128))],512),[[e.vShow,e.unref(t).fs.showHiddenBreadcrumbs]])]))}},tr=(n,t=null)=>new Date(n*1e3).toLocaleString(t??navigator.language??"en-US"),ju=["onClick"],Iu={__name:"Toast",setup(n){const t=e.inject("ServiceContainer"),{getStore:o}=t.storage,s=e.ref(o("full-screen",!1)),r=e.ref([]),c=l=>l==="error"?"text-red-400 border-red-400 dark:text-red-300 dark:border-red-300":"text-lime-600 border-lime-600 dark:text-lime-300 dark:border-lime-1300",a=l=>{r.value.splice(l,1)},i=l=>{let d=r.value.findIndex(f=>f.id===l);d!==-1&&a(d)};return t.emitter.on("vf-toast-clear",()=>{r.value=[]}),t.emitter.on("vf-toast-push",l=>{let d=new Date().getTime().toString(36).concat(performance.now().toString(),Math.random().toString()).replace(/\./g,"");l.id=d,r.value.push(l),setTimeout(()=>{i(d)},5e3)}),(l,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([s.value.value?"fixed":"absolute","max-w-fit flex flex-col bottom-0 left-1/2 -translate-x-1/2 z-10"])},[e.createVNode(e.TransitionGroup,{name:"vf-toast-item","leave-active-class":"transition-all duration-1000","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,u)=>(e.openBlock(),e.createElementBlock("div",{onClick:p=>a(u),key:f,class:e.normalizeClass([c(f.type),"inline-block mx-auto my-0.5 py-0.5 px-2 min-w-max bg-gray-50 dark:bg-gray-600 border text-xs sm:text-sm rounded cursor-pointer"])},e.toDisplayString(f.label),11,ju))),128))]),_:1})],2))}},Uu={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 20 20"},Pu=e.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 0 1 1.414 0L10 10.586l3.293-3.293a1 1 0 1 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 0-1.414","clip-rule":"evenodd"},null,-1),qu=[Pu];function Gu(n,t){return e.openBlock(),e.createElementBlock("svg",Uu,[...qu])}const Ku={render:Gu},Wu={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 20 20"},Yu=e.createElementVNode("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 0 1-1.414 0L10 9.414l-3.293 3.293a1 1 0 0 1-1.414-1.414l4-4a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1 0 1.414","clip-rule":"evenodd"},null,-1),Xu=[Yu];function Ju(n,t){return e.openBlock(),e.createElementBlock("svg",Wu,[...Xu])}const Qu={render:Ju},_t={__name:"SortIcon",props:{direction:String},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",null,[n.direction==="asc"?(e.openBlock(),e.createBlock(e.unref(Ku),{key:0})):e.createCommentVNode("",!0),n.direction==="desc"?(e.openBlock(),e.createBlock(e.unref(Qu),{key:1})):e.createCommentVNode("",!0)]))}},Zu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"text-neutral-500",viewBox:"0 0 24 24"},em=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 0 0 2-2V9.414a1 1 0 0 0-.293-.707l-5.414-5.414A1 1 0 0 0 12.586 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2"},null,-1),tm=[em];function nm(n,t){return e.openBlock(),e.createElementBlock("svg",Zu,[...tm])}const om={render:nm},Xt={__name:"ItemIcon",props:{type:{type:String,required:!0},small:{type:Boolean,default:!1}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("span",null,[n.type==="dir"?(e.openBlock(),e.createBlock(e.unref(zt),{key:0,class:e.normalizeClass({"h-5 w-5":n.small,"h-10 w-10 md:h-12 md:w-12 m-auto":!n.small})},null,8,["class"])):(e.openBlock(),e.createBlock(e.unref(om),{key:1,class:e.normalizeClass({"h-5 w-5":n.small,"h-10 w-10 md:h-12 md:w-12 m-auto":!n.small})},null,8,["class"]))]))}},rm={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"absolute h-6 w-6 md:h-12 md:w-12 m-auto stroke-neutral-500 fill-white dark:fill-gray-700 dark:stroke-gray-600 z-10",viewBox:"0 0 24 24"},sm=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 0 0 2-2V9.414a1 1 0 0 0-.293-.707l-5.414-5.414A1 1 0 0 0 12.586 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2"},null,-1),lm=[sm];function am(n,t){return e.openBlock(),e.createElementBlock("svg",rm,[...lm])}const cm={render:am},im={class:"absolute -z-50 -top-96"},dm={class:"text-neutral-700 dark:text-neutral-300 p-1 absolute text-center top-4 right-[-2rem] md:top-5 md:right-[-2.4rem] z-20 text-xs"},um={__name:"DragItem",props:{count:{type:Number,default:0}},setup(n){const t=n;return(o,s)=>(e.openBlock(),e.createElementBlock("div",im,[e.createVNode(e.unref(cm)),e.createElementVNode("div",dm,e.toDisplayString(t.count),1)]))}},mm={class:"flex"},fm=["title"],pm={class:"ml-auto mb-2"},hm={key:0,class:"p-2 border font-normal whitespace-pre-wrap border-gray-200 dark:border-gray-700/50 dark:text-gray-200 rounded min-h-[200px] max-h-[60vh] text-xs overflow-auto"},vm={key:1},gm={__name:"Text",emits:["success"],setup(n,{emit:t}){const o=t,s=e.ref(""),r=e.ref(""),c=e.ref(null),a=e.ref(!1),i=e.ref(""),l=e.ref(!1),d=e.inject("ServiceContainer"),{t:f}=d.i18n;e.onMounted(()=>{d.requester.send({url:"",method:"get",params:{q:"preview",adapter:d.modal.data.adapter,path:d.modal.data.item.path},responseType:"text"}).then(m=>{s.value=m,o("success")})});const u=()=>{a.value=!a.value,r.value=s.value},p=()=>{i.value="",l.value=!1,d.requester.send({url:"",method:"post",params:{q:"save",adapter:d.modal.data.adapter,path:d.modal.data.item.path},body:{content:r.value},responseType:"text"}).then(m=>{i.value=f("Updated."),s.value=m,o("success"),a.value=!a.value}).catch(m=>{i.value=f(m.message),l.value=!0})};return(m,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",mm,[e.createElementVNode("div",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(d).modal.data.item.path},e.toDisplayString(e.unref(d).modal.data.item.basename),9,fm),e.createElementVNode("div",pm,[a.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:p,class:"ml-1 px-2 py-1 rounded border border-transparent shadow-sm bg-blue-700/75 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-700/50 text-base font-medium text-white sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(f)("Save")),1)):e.createCommentVNode("",!0),e.unref(d).features.includes(e.unref(ne).EDIT)?(e.openBlock(),e.createElementBlock("button",{key:1,class:"ml-1 px-2 py-1 text-blue-500",onClick:h[0]||(h[0]=g=>u())},e.toDisplayString(a.value?e.unref(f)("Cancel"):e.unref(f)("Edit")),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[a.value?(e.openBlock(),e.createElementBlock("div",vm,[e.withDirectives(e.createElementVNode("textarea",{ref_key:"editInput",ref:c,"onUpdate:modelValue":h[1]||(h[1]=g=>r.value=g),class:"w-full p-2 rounded dark:bg-gray-700 dark:text-gray-200 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:selection:bg-gray-500 min-h-[200px] max-h-[60vh]",name:"text",id:"",cols:"30",rows:"10"},null,512),[[e.vModelText,r.value]])])):(e.openBlock(),e.createElementBlock("pre",hm,e.toDisplayString(s.value),1)),i.value.length?(e.openBlock(),e.createBlock(De,{key:2,onHidden:h[2]||(h[2]=g=>i.value=""),error:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)])],64))}},km={class:"flex"},ym=["title"],xm={class:"ml-auto mb-2"},_m={class:"w-full flex justify-center"},wm=["src"],bm={__name:"Image",emits:["success"],setup(n,{emit:t}){const o=t,s=e.inject("ServiceContainer"),{t:r}=s.i18n,c=e.ref(null),a=e.ref(null),i=e.ref(!1),l=e.ref(""),d=e.ref(!1),f=()=>{i.value=!i.value,i.value?a.value=new xr(c.value,{crop(p){}}):a.value.destroy()},u=()=>{a.value.getCroppedCanvas({width:795,height:341}).toBlob(p=>{l.value="",d.value=!1;const m=new FormData;m.set("file",p),s.requester.send({url:"",method:"post",params:{q:"upload",adapter:s.modal.data.adapter,path:s.modal.data.item.path},body:m}).then(h=>{l.value=r("Updated."),c.value.src=s.requester.getPreviewUrl(s.modal.data.adapter,s.modal.data.item),f(),o("success")}).catch(h=>{l.value=r(h.message),d.value=!0})})};return e.onMounted(()=>{o("success")}),(p,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",km,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(s).modal.data.item.path},e.toDisplayString(e.unref(s).modal.data.item.basename),9,ym),e.createElementVNode("div",xm,[i.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:u,class:"ml-1 px-2 py-1 rounded border border-transparent shadow-sm bg-blue-700/75 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-700/50 text-base font-medium text-white sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(r)("Crop")),1)):e.createCommentVNode("",!0),e.unref(s).features.includes(e.unref(ne).EDIT)?(e.openBlock(),e.createElementBlock("button",{key:1,class:"ml-1 px-2 py-1 text-blue-500",onClick:m[0]||(m[0]=h=>f())},e.toDisplayString(i.value?e.unref(r)("Cancel"):e.unref(r)("Edit")),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",_m,[e.createElementVNode("img",{ref_key:"image",ref:c,class:"max-w-[50vh] max-h-[50vh]",src:e.unref(s).requester.getPreviewUrl(e.unref(s).modal.data.adapter,e.unref(s).modal.data.item),alt:""},null,8,wm)]),l.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:m[1]||(m[1]=h=>l.value=""),error:d.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)],64))}},Em={class:"flex"},Vm=["title"],Nm=e.createElementVNode("div",null,null,-1),Sm={__name:"Default",emits:["success"],setup(n,{emit:t}){const o=e.inject("ServiceContainer"),s=t;return e.onMounted(()=>{s("success")}),(r,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Em,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(o).modal.data.item.path},e.toDisplayString(e.unref(o).modal.data.item.basename),9,Vm)]),Nm],64))}},$m=["title"],Bm={class:"w-full aspect-video",preload:"",controls:""},Cm=["src"],Dm={__name:"Video",emits:["success"],setup(n,{emit:t}){const o=e.inject("ServiceContainer"),s=t,r=()=>o.requester.getPreviewUrl(o.modal.data.adapter,o.modal.data.item);return e.onMounted(()=>{s("success")}),(c,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(o).modal.data.item.path},e.toDisplayString(e.unref(o).modal.data.item.basename),9,$m),e.createElementVNode("div",null,[e.createElementVNode("video",Bm,[e.createElementVNode("source",{src:r(),type:"video/mp4"},null,8,Cm),e.createTextVNode(" Your browser does not support the video tag. ")])])]))}},Tm=["title"],Mm={class:"w-full",controls:""},Am=["src"],Lm={__name:"Audio",emits:["success"],setup(n,{emit:t}){const o=t,s=e.inject("ServiceContainer"),r=()=>s.requester.getPreviewUrl(s.modal.data.adapter,s.modal.data.item);return e.onMounted(()=>{o("success")}),(c,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(s).modal.data.item.path},e.toDisplayString(e.unref(s).modal.data.item.basename),9,Tm),e.createElementVNode("div",null,[e.createElementVNode("audio",Mm,[e.createElementVNode("source",{src:r(),type:"audio/mpeg"},null,8,Am),e.createTextVNode(" Your browser does not support the audio element. ")])])],64))}},Om=["title"],Fm=["data"],Hm=["src"],Rm=e.createElementVNode("p",null,[e.createTextVNode(" Your browser does not support PDFs. "),e.createElementVNode("a",{href:"https://example.com/test.pdf"},"Download the PDF"),e.createTextVNode(" . ")],-1),zm=[Rm],jm={__name:"Pdf",emits:["success"],setup(n,{emit:t}){const o=e.inject("ServiceContainer"),s=t,r=()=>o.requester.getPreviewUrl(o.modal.data.adapter,o.modal.data.item);return e.onMounted(()=>{s("success")}),(c,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(o).modal.data.item.path},e.toDisplayString(e.unref(o).modal.data.item.basename),9,Om),e.createElementVNode("div",null,[e.createElementVNode("object",{class:"h-[60vh]",data:r(),type:"application/pdf",width:"100%",height:"100%"},[e.createElementVNode("iframe",{class:"border-0",src:r(),width:"100%",height:"100%"},zm,8,Hm)],8,Fm)])],64))}},Im={class:"sm:flex sm:items-start"},Um={class:"mt-3 text-center sm:mt-0 sm:text-left w-full"},Pm={key:0},qm={class:"text-gray-700 dark:text-gray-200 text-sm"},Gm={key:0,class:"flex leading-5"},Km=e.createElementVNode("svg",{class:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25 stroke-blue-900 dark:stroke-blue-100",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1),Wm={class:"py-2 flex font-normal break-all dark:text-gray-200 rounded text-xs"},Ym={class:"font-bold"},Xm={class:"font-bold pl-2"},Jm={key:0,class:"text-xs text-gray-600 dark:text-gray-400"},Qm=["download","href"],nr={__name:"ModalPreview",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(!1),r=a=>(t.modal.data.item.mime_type??"").startsWith(a),c=t.features.includes(ne.PREVIEW);return c||(s.value=!0),(a,i)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:i[6]||(i[6]=l=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Close")),1),e.unref(t).features.includes(e.unref(ne).DOWNLOAD)?(e.openBlock(),e.createElementBlock("a",{key:0,target:"_blank",class:"vf-btn vf-btn-primary",download:e.unref(t).requester.getDownloadUrl(e.unref(t).modal.data.adapter,e.unref(t).modal.data.item),href:e.unref(t).requester.getDownloadUrl(e.unref(t).modal.data.adapter,e.unref(t).modal.data.item)},e.toDisplayString(e.unref(o)("Download")),9,Qm)):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createElementVNode("div",Im,[e.createElementVNode("div",Um,[e.unref(c)?(e.openBlock(),e.createElementBlock("div",Pm,[r("text")?(e.openBlock(),e.createBlock(gm,{key:0,onSuccess:i[0]||(i[0]=l=>s.value=!0)})):r("image")?(e.openBlock(),e.createBlock(bm,{key:1,onSuccess:i[1]||(i[1]=l=>s.value=!0)})):r("video")?(e.openBlock(),e.createBlock(Dm,{key:2,onSuccess:i[2]||(i[2]=l=>s.value=!0)})):r("audio")?(e.openBlock(),e.createBlock(Lm,{key:3,onSuccess:i[3]||(i[3]=l=>s.value=!0)})):r("application/pdf")?(e.openBlock(),e.createBlock(jm,{key:4,onSuccess:i[4]||(i[4]=l=>s.value=!0)})):(e.openBlock(),e.createBlock(Sm,{key:5,onSuccess:i[5]||(i[5]=l=>s.value=!0)}))])):e.createCommentVNode("",!0),e.createElementVNode("div",qm,[s.value===!1?(e.openBlock(),e.createElementBlock("div",Gm,[Km,e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("Loading")),1)])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",Wm,[e.createElementVNode("div",null,[e.createElementVNode("span",Ym,e.toDisplayString(e.unref(o)("File Size"))+": ",1),e.createTextVNode(e.toDisplayString(e.unref(t).filesize(e.unref(t).modal.data.item.file_size)),1)]),e.createElementVNode("div",null,[e.createElementVNode("span",Xm,e.toDisplayString(e.unref(o)("Last Modified"))+": ",1),e.createTextVNode(" "+e.toDisplayString(e.unref(tr)(e.unref(t).modal.data.item.last_modified)),1)])]),e.unref(t).features.includes(e.unref(ne).DOWNLOAD)?(e.openBlock(),e.createElementBlock("div",Jm,[e.createElementVNode("span",null,e.toDisplayString(e.unref(o)(`Download doesn't work? You can try right-click "Download" button, select "Save link as...".`)),1)])):e.createCommentVNode("",!0)]),_:1}))}},Zm={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",class:"h-5 w-5",viewBox:"0 0 24 24"},e0=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),t0=e.createElementVNode("path",{d:"m15 4.5-4 4L7 10l-1.5 1.5 7 7L14 17l1.5-4 4-4M9 15l-4.5 4.5M14.5 4 20 9.5"},null,-1),n0=[e0,t0];function o0(n,t){return e.openBlock(),e.createElementBlock("svg",Zm,[...n0])}const or={render:o0},r0=["data-type","data-item","data-index"],Jt={__name:"Item",props:{item:{type:Object},index:{type:Number},dragImage:{type:Object}},setup(n){const t=e.inject("ServiceContainer"),o=t.dragSelect,s=n,r=m=>{m.type==="dir"?(t.emitter.emit("vf-search-exit"),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:m.path}})):t.modal.open(nr,{adapter:t.fs.adapter,item:m})},c={mounted(m,h,g,v){g.props.draggable&&(m.addEventListener("dragstart",V=>a(V,h.value)),m.addEventListener("dragover",V=>l(V,h.value)),m.addEventListener("drop",V=>i(V,h.value)))},beforeUnmount(m,h,g,v){g.props.draggable&&(m.removeEventListener("dragstart",a),m.removeEventListener("dragover",l),m.removeEventListener("drop",i))}},a=(m,h)=>{if(m.altKey||m.ctrlKey||m.metaKey)return m.preventDefault(),!1;o.isDraggingRef.value=!0,m.dataTransfer.setDragImage(s.dragImage.$el,0,15),m.dataTransfer.effectAllowed="all",m.dataTransfer.dropEffect="copy",m.dataTransfer.setData("items",JSON.stringify(o.getSelected()))},i=(m,h)=>{m.preventDefault(),o.isDraggingRef.value=!1;let g=JSON.parse(m.dataTransfer.getData("items"));if(g.find(v=>v.storage!==t.fs.adapter)){alert("Moving items between different storages is not supported yet.");return}t.modal.open(gn,{items:{from:g,to:h}})},l=(m,h)=>{m.preventDefault(),!h||h.type!=="dir"||o.getSelection().find(g=>g===m.currentTarget)?(m.dataTransfer.dropEffect="none",m.dataTransfer.effectAllowed="none"):m.dataTransfer.dropEffect="copy"};let d=null,f=!1;const u=()=>{d&&clearTimeout(d)},p=m=>{if(!f)f=!0,setTimeout(()=>f=!1,300);else return f=!1,r(s.item),clearTimeout(d),!1;d=setTimeout(()=>{const h=new MouseEvent("contextmenu",{bubbles:!0,cancelable:!1,view:window,button:2,buttons:0,clientX:m.target.getBoundingClientRect().x,clientY:m.target.getBoundingClientRect().y});m.target.dispatchEvent(h)},500)};return(m,h)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({opacity:e.unref(o).isDraggingRef.value&&e.unref(o).getSelection().find(g=>m.$el===g)?"0.5 !important":""}),class:e.normalizeClass(["vf-item-"+e.unref(o).explorerId,"relative"]),"data-type":n.item.type,key:n.item.path,"data-item":JSON.stringify(n.item),"data-index":n.index,onDblclick:h[0]||(h[0]=g=>r(n.item)),onTouchstart:h[1]||(h[1]=g=>p(g)),onTouchend:h[2]||(h[2]=g=>u()),onContextmenu:h[3]||(h[3]=e.withModifiers(g=>e.unref(t).emitter.emit("vf-contextmenu-show",{event:g,items:e.unref(o).getSelected(),target:n.item}),["prevent"]))},[e.renderSlot(m.$slots,"default"),e.unref(t).pinnedFolders.find(g=>g.path===n.item.path)?(e.openBlock(),e.createBlock(e.unref(or),{key:0,class:"absolute top-0 right-0 text-amber-600"})):e.createCommentVNode("",!0)],46,r0)),[[c,n.item]])}},s0={class:"relative flex-auto flex flex-col"},l0={key:0,class:"grid grid-cols-12 px-1 bg-neutral-50 dark:bg-gray-800 border-b border-neutral-300 dark:border-gray-700 text-xs select-none divide-x"},a0={class:"relative"},c0={class:"grid grid-cols-12 items-center"},i0={class:"flex col-span-7 items-center"},d0={class:"overflow-ellipsis overflow-hidden whitespace-nowrap"},u0={class:"col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap"},m0={class:"grid grid-cols-12 items-center"},f0={class:"flex col-span-7 items-center"},p0={class:"overflow-ellipsis overflow-hidden whitespace-nowrap"},h0={class:"col-span-2 text-center"},v0={class:"col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap px-1 md:px-3"},g0={class:"relative"},k0=["data-src","alt"],y0={key:2,class:"absolute hidden md:block top-1/2 w-full text-center text-neutral-500"},x0={class:"break-all"},_0={__name:"Explorer",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=u=>u==null?void 0:u.substring(0,3),r=e.ref(null),c=e.ref(""),a=t.dragSelect;let i;t.emitter.on("vf-fullscreen-toggle",()=>{a.area.value.style.height=null}),t.emitter.on("vf-search-query",({newQuery:u})=>{c.value=u,u?t.emitter.emit("vf-fetch",{params:{q:"search",adapter:t.fs.adapter,path:t.fs.data.dirname,filter:u},onSuccess:p=>{p.files.length||t.emitter.emit("vf-toast-push",{label:o("No search result found.")})}}):t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname}})});const l=e.reactive({active:!1,column:"",order:""}),d=(u=!0)=>{let p=[...t.fs.data.files],m=l.column,h=l.order==="asc"?1:-1;if(!u)return p;const g=(v,V)=>typeof v=="string"&&typeof V=="string"?v.toLowerCase().localeCompare(V.toLowerCase()):v<V?-1:v>V?1:0;return l.active&&(p=p.slice().sort((v,V)=>g(v[m],V[m])*h)),p},f=u=>{l.active&&l.column===u?(l.active=l.order==="asc",l.column=u,l.order="desc"):(l.active=!0,l.column=u,l.order="asc")};return e.onMounted(()=>{i=new yr(a.area.value)}),e.onUpdated(()=>{i.update()}),e.onBeforeUnmount(()=>{i.destroy()}),(u,p)=>(e.openBlock(),e.createElementBlock("div",s0,[e.unref(t).view==="list"||c.value.length?(e.openBlock(),e.createElementBlock("div",l0,[e.createElementVNode("div",{onClick:p[0]||(p[0]=m=>f("basename")),class:"col-span-7 vf-sort-button"},[e.createTextVNode(e.toDisplayString(e.unref(o)("Name"))+" ",1),e.withDirectives(e.createVNode(_t,{direction:l.order},null,8,["direction"]),[[e.vShow,l.active&&l.column==="basename"]])]),c.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:p[1]||(p[1]=m=>f("file_size")),class:"justify-center col-span-2 vf-sort-button"},[e.createTextVNode(e.toDisplayString(e.unref(o)("Size"))+" ",1),e.withDirectives(e.createVNode(_t,{direction:l.order},null,8,["direction"]),[[e.vShow,l.active&&l.column==="file_size"]])])),c.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:p[2]||(p[2]=m=>f("last_modified")),class:"justify-center col-span-3 vf-sort-button"},[e.createTextVNode(e.toDisplayString(e.unref(o)("Date"))+" ",1),e.withDirectives(e.createVNode(_t,{direction:l.order},null,8,["direction"]),[[e.vShow,l.active&&l.column==="last_modified"]])])),c.value.length?(e.openBlock(),e.createElementBlock("div",{key:2,onClick:p[3]||(p[3]=m=>f("path")),class:"justify-center col-span-5 vf-sort-button"},[e.createTextVNode(e.toDisplayString(e.unref(o)("Filepath"))+" ",1),e.withDirectives(e.createVNode(_t,{direction:l.order},null,8,["direction"]),[[e.vShow,l.active&&l.column==="path"]])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",a0,[e.createVNode(um,{ref_key:"dragImage",ref:r,count:e.unref(a).getCount()},null,8,["count"])]),e.createElementVNode("div",{ref:e.unref(a).scrollBarContainer,class:e.normalizeClass(["vf-explorer-scrollbar-container",[{"grid-view":e.unref(t).view==="grid"},{"search-active":c.value.length}]])},[e.createElementVNode("div",{ref:e.unref(a).scrollBar,class:"w-5 bg-transparent pointer-events-none"},null,512)],2),e.createElementVNode("div",{ref:e.unref(a).area,class:"h-full w-full text-xs p-1 vf-explorer-scrollbar vf-selector-area min-h-[150px] z-0 overflow-y-auto",onContextmenu:p[4]||(p[4]=e.withModifiers(m=>e.unref(t).emitter.emit("vf-contextmenu-show",{event:m,items:e.unref(a).getSelected()}),["self","prevent"]))},[c.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(d(),(m,h)=>(e.openBlock(),e.createBlock(Jt,{item:m,index:h,dragImage:r.value,class:"vf-item vf-item-list"},{default:e.withCtx(()=>[e.createElementVNode("div",c0,[e.createElementVNode("div",i0,[e.createVNode(Xt,{type:m.type,small:e.unref(t).compactListView},null,8,["type","small"]),e.createElementVNode("span",d0,e.toDisplayString(m.basename),1)]),e.createElementVNode("div",u0,e.toDisplayString(m.path),1)])]),_:2},1032,["item","index","dragImage"]))),256)):e.createCommentVNode("",!0),e.unref(t).view==="list"&&!c.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d(),(m,h)=>(e.openBlock(),e.createBlock(Jt,{item:m,index:h,dragImage:r.value,class:"vf-item vf-item-list",draggable:"true",key:m.path},{default:e.withCtx(()=>[e.createElementVNode("div",m0,[e.createElementVNode("div",f0,[e.createVNode(Xt,{type:m.type,small:e.unref(t).compactListView},null,8,["type","small"]),e.createElementVNode("span",p0,e.toDisplayString(m.basename),1)]),e.createElementVNode("div",h0,e.toDisplayString(m.file_size?e.unref(t).filesize(m.file_size):""),1),e.createElementVNode("div",v0,e.toDisplayString(e.unref(tr)(m.last_modified)),1)])]),_:2},1032,["item","index","dragImage"]))),128)):e.createCommentVNode("",!0),e.unref(t).view==="grid"&&!c.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(d(!1),(m,h)=>(e.openBlock(),e.createBlock(Jt,{item:m,index:h,dragImage:r.value,class:"vf-item vf-item-grid",draggable:"true"},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",g0,[(m.mime_type??"").startsWith("image")&&e.unref(t).showThumbnails?(e.openBlock(),e.createElementBlock("img",{src:"data:image/png;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",class:"lazy h-10 md:h-12 m-auto","data-src":e.unref(t).requester.getPreviewUrl(e.unref(t).fs.adapter,m),alt:m.basename,key:m.path},null,8,k0)):(e.openBlock(),e.createBlock(Xt,{key:1,type:m.type},null,8,["type"])),!((m.mime_type??"").startsWith("image")&&e.unref(t).showThumbnails)&&m.type!=="dir"?(e.openBlock(),e.createElementBlock("div",y0,e.toDisplayString(s(m.extension)),1)):e.createCommentVNode("",!0)]),e.createElementVNode("span",x0,e.toDisplayString(e.unref(vn)(m.basename)),1)])]),_:2},1032,["item","index","dragImage"]))),256)):e.createCommentVNode("",!0)],544),e.createVNode(Iu)]))}},w0=["href","download"],b0=["onClick"],E0={__name:"ContextMenu",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(null),r=e.ref([]),c=e.ref(""),a=e.reactive({active:!1,items:[],positions:{left:0,top:0}}),i=e.computed(()=>a.items.filter(u=>u.key==null||t.features.includes(u.key)));t.emitter.on("vf-context-selected",u=>{r.value=u});const l={newfolder:{key:ne.NEW_FOLDER,title:()=>o("New Folder"),action:()=>t.modal.open(Qo)},selectAll:{title:()=>o("Select All"),action:()=>t.dragSelect.selectAll()},pinFolder:{title:()=>o("Pin Folder"),action:()=>{t.pinnedFolders=t.pinnedFolders.concat(r.value),t.storage.setStore("pinned-folders",t.pinnedFolders)}},unpinFolder:{title:()=>o("Unpin Folder"),action:()=>{t.pinnedFolders=t.pinnedFolders.filter(u=>!r.value.find(p=>p.path===u.path)),t.storage.setStore("pinned-folders",t.pinnedFolders)}},delete:{key:ne.DELETE,title:()=>o("Delete"),action:()=>{t.modal.open(Dn,{items:r})}},refresh:{title:()=>o("Refresh"),action:()=>{t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname}})}},preview:{key:ne.PREVIEW,title:()=>o("Preview"),action:()=>t.modal.open(nr,{adapter:t.fs.adapter,item:r.value[0]})},open:{title:()=>o("Open"),action:()=>{t.emitter.emit("vf-search-exit"),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:r.value[0].path}})}},openDir:{title:()=>o("Open containing folder"),action:()=>{t.emitter.emit("vf-search-exit"),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:r.value[0].dir}})}},download:{key:ne.DOWNLOAD,link:e.computed(()=>t.requester.getDownloadUrl(t.fs.adapter,r.value[0])),title:()=>o("Download"),action:()=>{}},archive:{key:ne.ARCHIVE,title:()=>o("Archive"),action:()=>t.modal.open(er,{items:r})},unarchive:{key:ne.UNARCHIVE,title:()=>o("Unarchive"),action:()=>t.modal.open(Zo,{items:r})},rename:{key:ne.RENAME,title:()=>o("Rename"),action:()=>t.modal.open(Tn,{items:r})}},d=u=>{t.emitter.emit("vf-contextmenu-hide"),u.action()};t.emitter.on("vf-search-query",({newQuery:u})=>{c.value=u}),t.emitter.on("vf-contextmenu-show",({event:u,items:p,target:m=null})=>{if(a.items=[],c.value)if(m)a.items.push(l.openDir),t.emitter.emit("vf-context-selected",[m]);else return;else!m&&!c.value?(a.items.push(l.refresh),a.items.push(l.selectAll),a.items.push(l.newfolder),t.emitter.emit("vf-context-selected",[])):p.length>1&&p.some(h=>h.path===m.path)?(a.items.push(l.refresh),a.items.push(l.archive),a.items.push(l.delete),t.emitter.emit("vf-context-selected",p)):(m.type==="dir"?(a.items.push(l.open),t.pinnedFolders.findIndex(h=>h.path===m.path)!==-1?a.items.push(l.unpinFolder):a.items.push(l.pinFolder)):(a.items.push(l.preview),a.items.push(l.download)),a.items.push(l.rename),m.mime_type==="application/zip"?a.items.push(l.unarchive):a.items.push(l.archive),a.items.push(l.delete),t.emitter.emit("vf-context-selected",[m]));f(u)}),t.emitter.on("vf-contextmenu-hide",()=>{a.active=!1});const f=u=>{const p=t.dragSelect.area.value,m=t.root.getBoundingClientRect(),h=p.getBoundingClientRect();let g=u.clientX-m.left,v=u.clientY-m.top;a.active=!0,e.nextTick(()=>{var D;const V=(D=s.value)==null?void 0:D.getBoundingClientRect();let y=(V==null?void 0:V.height)??0,O=(V==null?void 0:V.width)??0;g=h.right-u.pageX+window.scrollX<O?g-O:g,v=h.bottom-u.pageY+window.scrollY<y?v-y:v,a.positions={left:g+"px",top:v+"px"}})};return(u,p)=>e.withDirectives((e.openBlock(),e.createElementBlock("ul",{ref_key:"contextmenu",ref:s,style:e.normalizeStyle(a.positions),class:"z-30 absolute text-xs bg-neutral-50 dark:bg-gray-800 text-gray-700 dark:text-gray-200 border border-neutral-300 dark:border-gray-600 shadow rounded-sm select-none"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,m=>(e.openBlock(),e.createElementBlock("li",{class:"cursor-pointer hover:bg-neutral-200 dark:hover:bg-gray-700",key:m.title},[m.link?(e.openBlock(),e.createElementBlock("a",{key:0,class:"block pl-2 pr-3 py-2",target:"_blank",href:m.link,download:m.link,onClick:p[0]||(p[0]=h=>e.unref(t).emitter.emit("vf-contextmenu-hide"))},[e.createElementVNode("span",null,e.toDisplayString(m.title()),1)],8,w0)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"pl-2 pr-3 py-1.5",onClick:h=>d(m)},[e.createElementVNode("span",null,e.toDisplayString(m.title()),1)],8,b0))]))),128))],4)),[[e.vShow,a.active]])}},V0={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"h-5 w-5",viewBox:"0 0 24 24"},N0=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"},null,-1),S0=[N0];function $0(n,t){return e.openBlock(),e.createElementBlock("svg",V0,[...S0])}const rr={render:$0},B0={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"2",class:"h-5 w-5 stroke-slate-500 cursor-pointer",viewBox:"0 0 24 24"},C0=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0"},null,-1),D0=[C0];function T0(n,t){return e.openBlock(),e.createElementBlock("svg",B0,[...D0])}const M0={render:T0},A0={class:"p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none grow-0"},L0={class:"flex leading-5 items-center"},O0=["title"],F0={class:"z-[1] pointer-events-none"},H0=["value"],R0={class:"ml-3"},z0={key:0},j0={class:"ml-1"},I0={class:"flex leading-5 items-center justify-end"},U0=["disabled"],P0=["title"],q0={__name:"Statusbar",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,{setStore:s}=t.storage,r=t.dragSelect,c=()=>{t.emitter.emit("vf-search-exit"),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter}}),s("adapter",t.fs.adapter)},a=e.ref("");t.emitter.on("vf-search-query",({newQuery:l})=>{a.value=l});const i=e.computed(()=>{const l=t.selectButton.multiple?r.getSelected().length>0:r.getSelected().length===1;return t.selectButton.active&&l});return(l,d)=>(e.openBlock(),e.createElementBlock("div",A0,[e.createElementVNode("div",L0,[e.createElementVNode("div",{class:"flex leading-5 items-center rounded border dark:bg-gray-700 dark:border-gray-600",title:e.unref(o)("Storage")},[e.createElementVNode("div",F0,[e.createVNode(e.unref(rr))]),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":d[0]||(d[0]=f=>e.unref(t).fs.adapter=f),onChange:c,class:"border-0 py-0.5 text-xs text-slate-500 bg-white dark:text-neutral-50 dark:bg-gray-700 rounded uppercase focus:outline-0 cursor-pointer",tabindex:"-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.data.storages,f=>(e.openBlock(),e.createElementBlock("option",{value:f},e.toDisplayString(f),9,H0))),256))],544),[[e.vModelSelect,e.unref(t).fs.adapter]])],8,O0),e.createElementVNode("div",R0,[a.value.length?(e.openBlock(),e.createElementBlock("span",z0,e.toDisplayString(e.unref(t).fs.data.files.length)+" items found. ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",j0,e.toDisplayString(e.unref(t).dragSelect.getCount()>0?e.unref(o)("%s item(s) selected.",e.unref(t).dragSelect.getCount()):""),1)])]),e.createElementVNode("div",I0,[e.unref(t).selectButton.active?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["vf-btn py-0 vf-btn-primary",{disabled:!i.value}]),disabled:!i.value,onClick:d[1]||(d[1]=f=>e.unref(t).selectButton.click(e.unref(r).getSelected(),f))},e.toDisplayString(e.unref(o)("Select")),11,U0)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:"mr-1",title:e.unref(o)("About"),onClick:d[2]||(d[2]=f=>e.unref(t).modal.open(Jo))},[e.createVNode(e.unref(M0))],8,P0)])]))}},G0={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"text-neutral-500 fill-sky-500 stroke-gray-100/50 dark:stroke-slate-700/50 dark:fill-slate-500",viewBox:"0 0 24 24"},K0=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 9.776q.168-.026.344-.026h15.812q.176 0 .344.026m-16.5 0a2.25 2.25 0 0 0-1.883 2.542l.857 6a2.25 2.25 0 0 0 2.227 1.932H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-1.883-2.542m-16.5 0V6A2.25 2.25 0 0 1 6 3.75h3.879a1.5 1.5 0 0 1 1.06.44l2.122 2.12a1.5 1.5 0 0 0 1.06.44H18A2.25 2.25 0 0 1 20.25 9v.776"},null,-1),W0=[K0];function Y0(n,t){return e.openBlock(),e.createElementBlock("svg",G0,[...W0])}const sr={render:Y0},X0={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 24 24"},J0=e.createElementVNode("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),Q0=e.createElementVNode("path",{d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m3.6 5.2a1 1 0 0 0-1.4.2L12 10.333 9.8 7.4a1 1 0 1 0-1.6 1.2l2.55 3.4-2.55 3.4a1 1 0 1 0 1.6 1.2l2.2-2.933 2.2 2.933a1 1 0 0 0 1.6-1.2L13.25 12l2.55-3.4a1 1 0 0 0-.2-1.4"},null,-1),Z0=[J0,Q0];function ef(n,t){return e.openBlock(),e.createElementBlock("svg",X0,[...Z0])}const tf={render:ef},nf={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"},of=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),rf=e.createElementVNode("path",{d:"M15 12H9M12 9v6"},null,-1),sf=[of,rf];function lf(n,t){return e.openBlock(),e.createElementBlock("svg",nf,[...sf])}const lr={render:lf},af={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"},cf=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),df=e.createElementVNode("path",{d:"M9 12h6"},null,-1),uf=[cf,df];function mf(n,t){return e.openBlock(),e.createElementBlock("svg",af,[...uf])}const ar={render:mf};function cr(n,t){const o=n.findIndex(s=>s.path===t.path);o>-1?n[o]=t:n.push(t)}const ff={class:"h-5 w-5 shrink-0"},pf={key:1,class:"cursor-pointer"},ir={__name:"FolderLoaderIndicator",props:e.mergeModels({adapter:{type:String,required:!0},path:{type:String,required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=n,o=e.inject("ServiceContainer");o.i18n;const s=e.useModel(n,"modelValue"),r=e.ref(!1);e.watch(()=>s.value,()=>{var i;return((i=c())==null?void 0:i.folders.length)||a()});function c(){return o.treeViewData.find(i=>i.path===t.path)}const a=()=>{r.value=!0,o.requester.send({url:"",method:"get",params:{q:"subfolders",adapter:t.adapter,path:t.path}}).then(i=>{cr(o.treeViewData,{path:t.path,...i})}).catch(i=>{}).finally(()=>{r.value=!1})};return(i,l)=>{var d;return e.openBlock(),e.createElementBlock("div",ff,[r.value?(e.openBlock(),e.createBlock(e.unref(Mn),{key:0,class:"p-1"})):(e.openBlock(),e.createElementBlock("div",pf,[s.value&&((d=c())!=null&&d.folders.length)?(e.openBlock(),e.createBlock(e.unref(ar),{key:0,class:"text-gray-600"})):e.createCommentVNode("",!0),s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(lr),{key:1,class:"text-gray-400"}))]))])}}},hf={class:"block"},vf={class:"flex hover:text-sky-700 dark:hover:text-sky-200/50 rounded"},gf=["onClick"],kf=["onClick"],yf={class:"h-5 w-5 shrink-0"},xf={class:"pl-4"},_f={__name:"TreeSubfolderList",props:{adapter:{type:String,required:!0},path:{type:String,required:!0}},setup(n){const t=e.inject("ServiceContainer"),o=e.ref([]),s=n,r=e.computed(()=>{var c;return((c=t.treeViewData.find(a=>a.path===s.path))==null?void 0:c.folders)||[]});return(c,a)=>{const i=e.resolveComponent("TreeSubfolderList",!0);return e.openBlock(),e.createElementBlock("ul",hf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(l,d)=>(e.openBlock(),e.createElementBlock("li",{class:"flex flex-col space-x-0.5 py-0.5 text-sm",key:l.path},[e.createElementVNode("div",vf,[e.createElementVNode("div",{class:"h-5 w-5 shrink-0",onClick:f=>o.value[l.path]=!o.value[l.path]},[e.createVNode(ir,{adapter:n.adapter,path:l.path,modelValue:o.value[l.path],"onUpdate:modelValue":f=>o.value[l.path]=f},null,8,["adapter","path","modelValue","onUpdate:modelValue"])],8,gf),e.createElementVNode("div",{class:"flex cursor-pointer",onClick:f=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:s.adapter,path:l.path}})},[e.createElementVNode("div",yf,[e.unref(t).fs.path===l.path?(e.openBlock(),e.createBlock(e.unref(sr),{key:0})):(e.openBlock(),e.createBlock(e.unref(zt),{key:1}))]),e.createElementVNode("div",{class:e.normalizeClass(["text-nowrap",{"underline decoration-blue-300 dark:decoration-gray-400":e.unref(t).fs.path===l.path}])},e.toDisplayString(l.basename),3)],8,kf)]),e.createElementVNode("div",xf,[e.withDirectives(e.createVNode(i,{adapter:s.adapter,path:l.path},null,8,["adapter","path"]),[[e.vShow,o.value[l.path]]])])]))),128))])}}},wf={class:"pointer-events-none"},bf={__name:"TreeStorageItem",props:{storage:{type:String,required:!0}},setup(n){const t=e.inject("ServiceContainer"),o=e.ref(!1),s=r=>{console.log("ok"),o.value=!o.value};return(r,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{onClick:s,class:"pt-1 px-1 uppercase font-bold text-gray-400 dark:text-gray-500 text-xs flex justify-between bg-gray-100 dark:bg-[#2e3c51] border-b dark:border-gray-600 cursor-pointer"},[e.createElementVNode("div",{class:e.normalizeClass(["flex flex-1 space-x-1 items-center",n.storage===e.unref(t).fs.adapter?"text-gray-700/80 dark:text-gray-300/80 text-bold":""])},[e.createElementVNode("div",{class:e.normalizeClass(["h-5 w-5 shrink-0",n.storage===e.unref(t).fs.adapter?"text-sky-500 dark:text-slate-300":""])},[e.createVNode(e.unref(rr))],2),e.createElementVNode("div",null,e.toDisplayString(n.storage),1)],2),e.createElementVNode("div",wf,[e.createVNode(ir,{adapter:n.storage,path:n.storage+"://",modelValue:o.value,"onUpdate:modelValue":c[0]||(c[0]=a=>o.value=a)},null,8,["adapter","path","modelValue"])])]),e.withDirectives(e.createVNode(_f,{adapter:n.storage,path:n.storage+"://",class:"overflow-x-auto"},null,8,["adapter","path"]),[[e.vShow,o.value]])],64))}},Ef={class:"h-5 w-5 shrink-0"},Vf={class:"cursor-pointer"},Nf={__name:"FolderIndicator",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue");return(o,s)=>(e.openBlock(),e.createElementBlock("div",Ef,[e.createElementVNode("div",Vf,[t.value?(e.openBlock(),e.createBlock(e.unref(ar),{key:0,class:"text-gray-600"})):e.createCommentVNode("",!0),t.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(lr),{key:1,class:"text-gray-400"}))])]))}},Sf={class:"sticky left-0 dark:border-gray-600"},$f={class:"flex items-center space-x-1"},Bf={class:"text-nowrap"},Cf={key:0,class:"block"},Df={class:"flex pl-2 py-0.5 text-sm justify-between pr-1"},Tf=["onClick"],Mf=["title"],Af=["onClick"],Lf={key:0},Of={class:"p-1 text-xs text-center"},Ff={__name:"TreeView",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,{getStore:s,setStore:r}=t.storage,c=e.ref(190),a=e.ref(s("pinned-folders-opened",!0));e.watch(a,f=>r("pinned-folders-opened",f));const i=f=>{t.pinnedFolders=t.pinnedFolders.filter(u=>u.path!==f.path),t.storage.setStore("pinned-folders",t.pinnedFolders)},l=f=>{const u=f.clientX,p=f.target.parentElement,m=p.getBoundingClientRect().width;p.classList.remove("transition-[width]"),p.classList.add("transition-none");const h=v=>{c.value=m+v.clientX-u,c.value<50&&(c.value=0,t.showTreeView=!1),c.value>50&&(t.showTreeView=!0)},g=()=>{const v=p.getBoundingClientRect();c.value=v.width,p.classList.add("transition-[width]"),p.classList.remove("transition-none"),window.removeEventListener("mousemove",h),window.removeEventListener("mouseup",g)};window.addEventListener("mousemove",h),window.addEventListener("mouseup",g)},d=e.ref(null);return e.onMounted(()=>{Ue(d.value,{})}),e.watch(t.fs.data,(f,u)=>{const p=f.files.filter(m=>m.type==="dir");cr(t.treeViewData,{path:t.fs.path,folders:p.map(m=>({adapter:m.storage,path:m.path,basename:m.basename}))})}),(f,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{onClick:u[0]||(u[0]=p=>e.unref(t).showTreeView=!e.unref(t).showTreeView),class:e.normalizeClass(["w-full h-full bg-gray-300/10 dark:bg-gray-700/10 z-[1]",e.unref(t).showTreeView?"backdrop-blur-sm absolute md:hidden":"hidden"])},null,2),e.createElementVNode("div",{style:e.normalizeStyle(e.unref(t).showTreeView?"min-width:100px;max-width:75%; width: "+c.value+"px":"width: 0"),class:"absolute h-full md:h-auto md:relative shadow-lg shrink-0 transition-[width] ease-in-out duration-200 z-[1] bg-gray-50 dark:bg-[#242f41]"},[e.createElementVNode("div",{ref_key:"treeViewScrollElement",ref:d,class:"h-full border-r dark:border-gray-600/50 pb-4"},[e.createElementVNode("div",Sf,[e.createElementVNode("div",{onClick:u[2]||(u[2]=p=>a.value=!a.value),class:"bg-gray-100 dark:bg-[#2e3c51] dark:border-gray-600 border-b p-1 uppercase font-bold text-gray-400 dark:text-gray-400 text-xs flex items-center justify-between cursor-pointer"},[e.createElementVNode("div",$f,[e.createVNode(e.unref(or),{class:"text-amber-600"}),e.createElementVNode("div",Bf,e.toDisplayString(e.unref(o)("Pinned Folders")),1)]),e.createVNode(Nf,{modelValue:a.value,"onUpdate:modelValue":u[1]||(u[1]=p=>a.value=p)},null,8,["modelValue"])]),a.value?(e.openBlock(),e.createElementBlock("ul",Cf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).pinnedFolders,p=>(e.openBlock(),e.createElementBlock("li",Df,[e.createElementVNode("div",{class:"flex hover:text-sky-500 dark:hover:text-sky-200/50 rounded cursor-pointer",onClick:m=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:p.storage,path:p.path}})},[e.unref(t).fs.path!==p.path?(e.openBlock(),e.createBlock(e.unref(zt),{key:0,class:"h-5 w-5"})):e.createCommentVNode("",!0),e.unref(t).fs.path===p.path?(e.openBlock(),e.createBlock(e.unref(sr),{key:1,class:"h-5 w-5"})):e.createCommentVNode("",!0),e.createElementVNode("div",{title:p.path,class:e.normalizeClass(["text-nowrap",{"underline decoration-blue-300 dark:decoration-gray-400":e.unref(t).fs.path===p.path}])},e.toDisplayString(p.basename),11,Mf)],8,Tf),e.createElementVNode("div",{class:"cursor-pointer",onClick:m=>i(p)},[e.createVNode(e.unref(tf),{class:"p-0.5 text-gray-300 hover:text-gray-400 dark:text-gray-600 hover:dark:text-gray-400"})],8,Af)]))),256)),e.unref(t).pinnedFolders.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",Lf,[e.createElementVNode("div",Of,e.toDisplayString(e.unref(o)("No folders pinned")),1)]))])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.data.storages,p=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(bf,{storage:p},null,8,["storage"])]))),256))],512),e.createElementVNode("div",{onMousedown:l,class:e.normalizeClass([(e.unref(t).showTreeView,""),"transition-colors ease-in-out duration-200 top-0 hover:bg-slate-600/10 dark:hover:bg-slate-300/10 w-1 h-full absolute -right-0.5 cursor-ew-resize"])},null,34)],4)],64))}},Hf={class:"relative flex overflow-hidden h-full"},Rf={__name:"VueFinder",props:{id:{type:String,default:"vf"},request:{type:[String,Object],required:!0},persist:{type:Boolean,default:!1},path:{type:String,default:""},features:{type:[Array,Boolean],default:!0},debug:{type:Boolean,default:!1},theme:{type:String,default:"system"},locale:{type:String,default:null},maxHeight:{type:String,default:"600px"},maxFileSize:{type:String,default:"10mb"},fullScreen:{type:Boolean,default:!1},showTreeView:{type:Boolean,default:!1},pinnedFolders:{type:Array,default:[]},showThumbnails:{type:Boolean,default:!0},selectButton:{type:Object,default(n){return{active:!1,multiple:!1,click:t=>{},...n}}}},emits:["select"],setup(n,{emit:t}){const o=t,r=As(n,e.inject("VueFinderOptions"));e.provide("ServiceContainer",r);const{setStore:c}=r.storage,a=e.ref(null);r.root=a;const i=r.dragSelect;Da(r);const l=f=>{Object.assign(r.fs.data,f),i.clearSelection(),i.refreshSelection()};let d;return r.emitter.on("vf-fetch-abort",()=>{d.abort(),r.fs.loading=!1}),r.emitter.on("vf-fetch",({params:f,body:u=null,onSuccess:p=null,onError:m=null,noCloseModal:h=!1})=>{["index","search"].includes(f.q)&&(d&&d.abort(),r.fs.loading=!0),d=new AbortController;const g=d.signal;r.requester.send({url:"",method:f.m||"get",params:f,body:u,abortSignal:g}).then(v=>{r.fs.adapter=v.adapter,r.persist&&(r.fs.path=v.dirname,c("path",r.fs.path)),["index","search"].includes(f.q)&&(r.fs.loading=!1),h||r.modal.close(),l(v),p&&p(v)}).catch(v=>{console.error(v),m&&m(v)})}),e.onMounted(()=>{let f={};r.fs.path.includes("://")&&(f={adapter:r.fs.path.split("://")[0],path:r.fs.path}),r.emitter.emit("vf-fetch",{params:{q:"index",adapter:r.fs.adapter,...f}}),i.onSelect(u=>{o("select",u)})}),(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:"vuefinder",ref_key:"root",ref:a,tabindex:"0"},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).theme.actualValue)},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(r).fullScreen?"fixed w-screen inset-0 z-20":"relative rounded resize-y ","overflow-hidden min-h-44 border flex flex-col bg-white dark:bg-gray-800 text-gray-700 dark:text-neutral-400 border-neutral-300 dark:border-gray-900 select-none"]),style:e.normalizeStyle(e.unref(r).fullScreen?"":"max-height: "+n.maxHeight),onMousedown:u[0]||(u[0]=p=>e.unref(r).emitter.emit("vf-contextmenu-hide")),onTouchstart:u[1]||(u[1]=p=>e.unref(r).emitter.emit("vf-contextmenu-hide"))},[e.createVNode(ud),e.createVNode(zu),e.createElementVNode("div",Hf,[e.createVNode(Ff),e.createVNode(_0)]),e.createVNode(q0)],38),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[e.unref(r).modal.visible?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(r).modal.type),{key:0})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(E0)],2)],512))}},zf={install(n,t={}){t.i18n=t.i18n??{};let[o]=Object.keys(t.i18n);t.locale=t.locale??o??"en",n.provide("VueFinderOptions",t),n.component("VueFinder",Rf)}};module.exports=zf;