From 3018c47b115446ffa91e364cd61e8476e58400e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yusuf=20=C3=96zdemir?= Date: Sun, 16 Jun 2024 15:54:08 +0300 Subject: [PATCH] build 2.5.3 --- dist/vuefinder.cjs | 4 +- dist/vuefinder.js | 2203 ++++++++++++++++++++++---------------------- package.json | 2 +- 3 files changed, 1113 insertions(+), 1096 deletions(-) diff --git a/dist/vuefinder.cjs b/dist/vuefinder.cjs index b08a572e..01613f7b 100644 --- a/dist/vuefinder.cjs +++ b/dist/vuefinder.cjs @@ -1,4 +1,4 @@ -"use strict";var dr=Object.defineProperty;var ur=(o,t,n)=>t in o?dr(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n;var Fo=(o,t,n)=>ur(o,typeof t!="symbol"?t+"":t,n);const e=require("vue"),mr=require("mitt"),fr=require("dragselect"),pr=require("@uppy/core"),hr=require("@uppy/xhr-upload"),vr=require("vanilla-lazyload");require("cropperjs/dist/cropper.css");const gr=require("cropperjs");require("microtip/microtip.css");var ln;const qt=(ln=document.querySelector('meta[name="csrf-token"]'))==null?void 0:ln.getAttribute("content");class kr{constructor(t){Fo(this,"config");this.config=t}get config(){return this.config}transformRequestParams(t){const n=this.config,s={};qt!=null&&qt!==""&&(s[n.xsrfHeaderName]=qt);const r=Object.assign({},n.headers,s,t.headers),c=Object.assign({},n.params,t.params),l=t.body,i=n.baseUrl+t.url,a=t.method;let d;a!=="get"&&(l instanceof FormData?(d=l,n.body!=null&&Object.entries(this.config.body).forEach(([u,p])=>{d.append(u,p)})):(d={...l},n.body!=null&&Object.assign(d,this.config.body)));const m={url:i,method:a,headers:r,params:c,body:d};if(n.transformRequest!=null){const u=n.transformRequest({url:i,method:a,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,n){if(n.url!=null)return n.url;const s=this.transformRequestParams({url:"",method:"get",params:{q:"download",adapter:t,path:n.path}});return s.url+"?"+new URLSearchParams(s.params).toString()}getPreviewUrl(t,n){if(n.url!=null)return n.url;const s=this.transformRequestParams({url:"",method:"get",params:{q:"preview",adapter:t,path:n.path}});return s.url+"?"+new URLSearchParams(s.params).toString()}async send(t){const n=this.transformRequestParams(t),s=t.responseType||"json",r={method:t.method,headers:n.headers,signal:t.abortSignal},c=n.url+"?"+new URLSearchParams(n.params);if(n.method!=="get"&&n.body!=null){let i;n.body instanceof FormData?i=t.body:(i=JSON.stringify(n.body),r.headers["Content-Type"]="application/json"),r.body=i}const l=await fetch(c,r);if(l.ok)return await l[s]();throw await l.json()}}function yr(o){const t={baseUrl:"",headers:{},params:{},body:{},xsrfHeaderName:"X-CSRF-Token"};return typeof o=="string"?Object.assign(t,{baseUrl:o}):Object.assign(t,o),new kr(t)}function xr(o){let t=localStorage.getItem(o+"_storage");const n=e.reactive(JSON.parse(t??"{}"));e.watch(n,s);function s(){Object.keys(n).length?localStorage.setItem(o+"_storage",JSON.stringify(n)):localStorage.removeItem(o+"_storage")}function r(a,d){n[a]=d}function c(a){delete n[a]}function l(){Object.keys(n).map(a=>c(a))}return{getStore:(a,d=null)=>n.hasOwnProperty(a)?n[a]:d,setStore:r,removeStore:c,clearStore:l}}async function _r(o,t){const n=t[o];return typeof n=="function"?(await n()).default:n}function wr(o,t,n,s){const{getStore:r,setStore:c}=o,l=e.ref({}),i=e.ref(r("locale",t)),a=(u,p=t)=>{_r(u,s).then(f=>{l.value=f,c("locale",u),i.value=u,c("translations",f),Object.values(s).length>1&&(n.emit("vf-toast-push",{label:"The language is set to "+u}),n.emit("vf-language-saved"))}).catch(f=>{p?(n.emit("vf-toast-push",{label:"The selected locale is not yet supported!",type:"error"}),a(p,null)):n.emit("vf-toast-push",{label:"Locale cannot be loaded!",type:"error"})})};!r("locale")&&!s.length?a(t):l.value=r("translations");const d=(u,...p)=>p.length?d(u=u.replace("%s",p.shift()),...p):u;function m(u,...p){return l.value&&l.value.hasOwnProperty(u)?d(l.value[u],...p):d(u,...p)}return{t:m,changeLocale:a,locale:i}}const oe={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"},br=Object.values(oe),Er="2.5.2";function cn(o,t,n,s,r){return(t=Math,n=t.log,s=1024,r=n(o)/n(s)|0,o/t.pow(s,r)).toFixed(0)+" "+(r?"KMGTPEZY"[--r]+"iB":"B")}function dn(o,t,n,s,r){return(t=Math,n=t.log,s=1e3,r=n(o)/n(s)|0,o/t.pow(s,r)).toFixed(0)+" "+(r?"KMGTPEZY"[--r]+"B":"B")}function Vr(o){const t={k:1,m:2,g:3,t:4},s=/(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(o);return s[1]*Math.pow(1024,t[s[2].toLowerCase()])}const Oe={SYSTEM:"system",LIGHT:"light",DARK:"dark"};function Nr(o,t){const n=e.ref(Oe.SYSTEM),s=e.ref(Oe.LIGHT);n.value=o.getStore("theme",t??Oe.SYSTEM);const r=window.matchMedia("(prefers-color-scheme: dark)"),c=l=>{n.value===Oe.DARK||n.value===Oe.SYSTEM&&l.matches?s.value=Oe.DARK:s.value=Oe.LIGHT};return c(r),r.addEventListener("change",c),{value:n,actualValue:s,set(l){n.value=l,l!==Oe.SYSTEM?o.setStore("theme",l):o.removeStore("theme"),c(r)}}}function Sr(){const o=e.shallowRef(null),t=e.ref(!1),n=e.ref();return{visible:t,type:o,data:n,open:(c,l=null)=>{document.querySelector("body").style.overflow="hidden",t.value=!0,o.value=c,n.value=l},close:()=>{document.querySelector("body").style.overflow="",t.value=!1,o.value=null}}}/*! +"use strict";var dr=Object.defineProperty;var ur=(o,t,n)=>t in o?dr(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n;var Fo=(o,t,n)=>ur(o,typeof t!="symbol"?t+"":t,n);const e=require("vue"),mr=require("mitt"),fr=require("dragselect"),pr=require("@uppy/core"),hr=require("@uppy/xhr-upload"),vr=require("vanilla-lazyload");require("cropperjs/dist/cropper.css");const gr=require("cropperjs");require("microtip/microtip.css");var ln;const qt=(ln=document.querySelector('meta[name="csrf-token"]'))==null?void 0:ln.getAttribute("content");class kr{constructor(t){Fo(this,"config");this.config=t}get config(){return this.config}transformRequestParams(t){const n=this.config,s={};qt!=null&&qt!==""&&(s[n.xsrfHeaderName]=qt);const r=Object.assign({},n.headers,s,t.headers),c=Object.assign({},n.params,t.params),l=t.body,i=n.baseUrl+t.url,a=t.method;let d;a!=="get"&&(l instanceof FormData?(d=l,n.body!=null&&Object.entries(this.config.body).forEach(([u,p])=>{d.append(u,p)})):(d={...l},n.body!=null&&Object.assign(d,this.config.body)));const m={url:i,method:a,headers:r,params:c,body:d};if(n.transformRequest!=null){const u=n.transformRequest({url:i,method:a,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,n){if(n.url!=null)return n.url;const s=this.transformRequestParams({url:"",method:"get",params:{q:"download",adapter:t,path:n.path}});return s.url+"?"+new URLSearchParams(s.params).toString()}getPreviewUrl(t,n){if(n.url!=null)return n.url;const s=this.transformRequestParams({url:"",method:"get",params:{q:"preview",adapter:t,path:n.path}});return s.url+"?"+new URLSearchParams(s.params).toString()}async send(t){const n=this.transformRequestParams(t),s=t.responseType||"json",r={method:t.method,headers:n.headers,signal:t.abortSignal},c=n.url+"?"+new URLSearchParams(n.params);if(n.method!=="get"&&n.body!=null){let i;n.body instanceof FormData?i=t.body:(i=JSON.stringify(n.body),r.headers["Content-Type"]="application/json"),r.body=i}const l=await fetch(c,r);if(l.ok)return await l[s]();throw await l.json()}}function yr(o){const t={baseUrl:"",headers:{},params:{},body:{},xsrfHeaderName:"X-CSRF-Token"};return typeof o=="string"?Object.assign(t,{baseUrl:o}):Object.assign(t,o),new kr(t)}function xr(o){let t=localStorage.getItem(o+"_storage");const n=e.reactive(JSON.parse(t??"{}"));e.watch(n,s);function s(){Object.keys(n).length?localStorage.setItem(o+"_storage",JSON.stringify(n)):localStorage.removeItem(o+"_storage")}function r(a,d){n[a]=d}function c(a){delete n[a]}function l(){Object.keys(n).map(a=>c(a))}return{getStore:(a,d=null)=>n.hasOwnProperty(a)?n[a]:d,setStore:r,removeStore:c,clearStore:l}}async function _r(o,t){const n=t[o];return typeof n=="function"?(await n()).default:n}function wr(o,t,n,s){const{getStore:r,setStore:c}=o,l=e.ref({}),i=e.ref(r("locale",t)),a=(u,p=t)=>{_r(u,s).then(f=>{l.value=f,c("locale",u),i.value=u,c("translations",f),Object.values(s).length>1&&(n.emit("vf-toast-push",{label:"The language is set to "+u}),n.emit("vf-language-saved"))}).catch(f=>{p?(n.emit("vf-toast-push",{label:"The selected locale is not yet supported!",type:"error"}),a(p,null)):n.emit("vf-toast-push",{label:"Locale cannot be loaded!",type:"error"})})};!r("locale")&&!s.length?a(t):l.value=r("translations");const d=(u,...p)=>p.length?d(u=u.replace("%s",p.shift()),...p):u;function m(u,...p){return l.value&&l.value.hasOwnProperty(u)?d(l.value[u],...p):d(u,...p)}return{t:m,changeLocale:a,locale:i}}const oe={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"},br=Object.values(oe),Er="2.5.3";function cn(o,t,n,s,r){return(t=Math,n=t.log,s=1024,r=n(o)/n(s)|0,o/t.pow(s,r)).toFixed(0)+" "+(r?"KMGTPEZY"[--r]+"iB":"B")}function dn(o,t,n,s,r){return(t=Math,n=t.log,s=1e3,r=n(o)/n(s)|0,o/t.pow(s,r)).toFixed(0)+" "+(r?"KMGTPEZY"[--r]+"B":"B")}function Vr(o){const t={k:1,m:2,g:3,t:4},s=/(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(o);return s[1]*Math.pow(1024,t[s[2].toLowerCase()])}const Fe={SYSTEM:"system",LIGHT:"light",DARK:"dark"};function Nr(o,t){const n=e.ref(Fe.SYSTEM),s=e.ref(Fe.LIGHT);n.value=o.getStore("theme",t??Fe.SYSTEM);const r=window.matchMedia("(prefers-color-scheme: dark)"),c=l=>{n.value===Fe.DARK||n.value===Fe.SYSTEM&&l.matches?s.value=Fe.DARK:s.value=Fe.LIGHT};return c(r),r.addEventListener("change",c),{value:n,actualValue:s,set(l){n.value=l,l!==Fe.SYSTEM?o.setStore("theme",l):o.removeStore("theme"),c(r)}}}function Sr(){const o=e.shallowRef(null),t=e.ref(!1),n=e.ref();return{visible:t,type:o,data:n,open:(c,l=null)=>{document.querySelector("body").style.overflow="hidden",t.value=!0,o.value=c,n.value=l},close:()=>{document.querySelector("body").style.overflow="",t.value=!1,o.value=null}}}/*! * OverlayScrollbars * Version: 2.8.3 * @@ -6,4 +6,4 @@ * https://github.com/KingSora * * Released under the MIT license. - */const ge=(o,t)=>{const{o:n,i:s,u:r}=o;let c=n,l;const i=(m,u)=>{const p=c,f=m,h=u||(s?!s(p,f):p!==f);return(h||r)&&(c=f,l=p),[c,h,l]};return[t?m=>i(t(c,l),m):i,m=>[c,!!m,l]]},un=typeof window<"u"&&typeof document<"u",pe=un?window:{},mn=Math.max,$r=Math.min,Qt=Math.round,Vt=Math.abs,Ho=Math.sign,fn=pe.cancelAnimationFrame,ko=pe.requestAnimationFrame,Nt=pe.setTimeout,Zt=pe.clearTimeout,Tt=o=>typeof pe[o]<"u"?pe[o]:void 0,Br=Tt("MutationObserver"),Ro=Tt("IntersectionObserver"),St=Tt("ResizeObserver"),eo=Tt("ScrollTimeline"),pn=un&&Node.ELEMENT_NODE,{toString:Of,hasOwnProperty:Gt}=Object.prototype,Mt=o=>o===void 0,yo=o=>o===null,Se=o=>typeof o=="number",At=o=>typeof o=="string",hn=o=>typeof o=="boolean",we=o=>typeof o=="function",$e=o=>Array.isArray(o),ct=o=>typeof o=="object"&&!$e(o)&&!yo(o),Lt=o=>{const t=!!o&&o.length,n=Se(t)&&t>-1&&t%1==0;return $e(o)||!we(o)&&n?t>0&&ct(o)?t-1 in o:!0:!1},$t=o=>{if(!o||!ct(o))return!1;let t;const n="constructor",s=o[n],r=s&&s.prototype,c=Gt.call(o,n),l=r&&Gt.call(r,"isPrototypeOf");if(s&&!c&&!l)return!1;for(t in o);return Mt(t)||Gt.call(o,t)},Bt=o=>{const t=HTMLElement;return o?t?o instanceof t:o.nodeType===pn:!1},Ot=o=>{const t=Element;return o?t?o instanceof t:o.nodeType===pn:!1};function Q(o,t){if(Lt(o))for(let n=0;nt(o[n],n,o));return o}const xo=(o,t)=>o.indexOf(t)>=0,Me=(o,t)=>o.concat(t),se=(o,t,n)=>(!At(t)&&Lt(t)?Array.prototype.push.apply(o,t):o.push(t),o),Pe=o=>Array.from(o||[]),vn=o=>$e(o)?o:[o],to=o=>!!o&&!o.length,zo=o=>Pe(new Set(o)),be=(o,t,n)=>{Q(o,r=>r&&r.apply(void 0,t||[])),!n&&(o.length=0)},gn="paddingTop",kn="paddingRight",yn="paddingLeft",xn="paddingBottom",_n="marginLeft",wn="marginRight",bn="marginBottom",Cr="overflowX",Dr="overflowY",Ze="width",et="height",Re="visible",qe="hidden",tt="scroll",Tr=o=>{const t=String(o||"");return t?t[0].toUpperCase()+t.slice(1):""},Ft=(o,t,n,s)=>{if(o&&t){let r=!0;return Q(n,c=>{const l=o[c],i=t[c];l!==i&&(r=!1)}),r}return!1},En=(o,t)=>Ft(o,t,["w","h"]),wt=(o,t)=>Ft(o,t,["x","y"]),Mr=(o,t)=>Ft(o,t,["t","r","b","l"]),ze=()=>{},U=(o,...t)=>o.bind(0,...t),Ge=o=>{let t;const n=o?Nt:ko,s=o?Zt:fn;return[r=>{s(t),t=n(()=>r(),we(o)?o():o)},()=>s(t)]},oo=(o,t)=>{const{_:n,p:s,v:r,m:c}=t||{};let l,i,a,d,m=ze;const u=function(v){m(),Zt(l),d=l=i=void 0,m=ze,o.apply(this,v)},p=g=>c&&i?c(i,g):g,f=()=>{m!==ze&&u(p(a)||a)},h=function(){const v=Pe(arguments),E=we(n)?n():n;if(Se(E)&&E>=0){const O=we(s)?s():s,C=Se(O)&&O>=0,V=E>0?Nt:ko,S=E>0?Zt:fn,N=p(v)||v,$=u.bind(0,N);let b;m(),r&&!d?($(),d=!0,b=V(()=>d=void 0,E)):(b=V($,E),C&&!l&&(l=Nt(f,O))),m=()=>S(b),i=a=N}else u(v)};return h.S=f,h},Vn=(o,t)=>Object.prototype.hasOwnProperty.call(o,t),Ae=o=>o?Object.keys(o):[],Y=(o,t,n,s,r,c,l)=>{const i=[t,n,s,r,c,l];return(typeof o!="object"||yo(o))&&!we(o)&&(o={}),Q(i,a=>{Q(a,(d,m)=>{const u=a[m];if(o===u)return!0;const p=$e(u);if(u&&$t(u)){const f=o[m];let h=f;p&&!$e(f)?h=[]:!p&&!$t(f)&&(h={}),o[m]=Y(h,u)}else o[m]=p?u.slice():u})}),o},Nn=(o,t)=>Q(Y({},o),(n,s,r)=>{n===void 0?delete r[s]:n&&$t(n)&&(r[s]=Nn(n))}),_o=o=>{for(const t in o)return!1;return!0},no=(o,t,n)=>mn(o,$r(t,n)),Ke=o=>Pe(new Set(($e(o)?o:(o||"").split(" ")).filter(t=>t))),wo=(o,t)=>o&&o.getAttribute(t),jo=(o,t)=>o&&o.hasAttribute(t),Te=(o,t,n)=>{Q(Ke(t),s=>{o&&o.setAttribute(s,String(n||""))})},Ve=(o,t)=>{Q(Ke(t),n=>o&&o.removeAttribute(n))},Ht=(o,t)=>{const n=Ke(wo(o,t)),s=U(Te,o,t),r=(c,l)=>{const i=new Set(n);return Q(Ke(c),a=>{i[l](a)}),Pe(i).join(" ")};return{O:c=>s(r(c,"delete")),$:c=>s(r(c,"add")),C:c=>{const l=Ke(c);return l.reduce((i,a)=>i&&n.includes(a),l.length>0)}}},Sn=(o,t,n)=>(Ht(o,t).O(n),U(bo,o,t,n)),bo=(o,t,n)=>(Ht(o,t).$(n),U(Sn,o,t,n)),ro=(o,t,n,s)=>(s?bo:Sn)(o,t,n),Eo=(o,t,n)=>Ht(o,t).C(n),$n=o=>Ht(o,"class"),Bn=(o,t)=>{$n(o).O(t)},Vo=(o,t)=>($n(o).$(t),U(Bn,o,t)),Cn=(o,t)=>{const n=[],s=t?Ot(t)&&t:document;return s?se(n,s.querySelectorAll(o)):n},Ar=(o,t)=>{const n=t?Ot(t)&&t:document;return n?n.querySelector(o):null},Ct=(o,t)=>Ot(o)?o.matches(t):!1,Dn=o=>Ct(o,"body"),so=o=>o?Pe(o.childNodes):[],ot=o=>o&&o.parentElement,Je=(o,t)=>Ot(o)&&o.closest(t),ao=o=>document.activeElement,Lr=(o,t,n)=>{const s=Je(o,t),r=o&&Ar(n,s),c=Je(r,t)===s;return s&&r?s===o||r===o||c&&Je(Je(o,n),t)!==s:!1},Ie=o=>{if(Lt(o))Q(Pe(o),t=>Ie(t));else if(o){const t=ot(o);t&&t.removeChild(o)}},Tn=(o,t,n)=>{if(n&&o){let s=t,r;return Lt(n)?(r=document.createDocumentFragment(),Q(n,c=>{c===s&&(s=c.previousSibling),r.appendChild(c)})):r=n,t&&(s?s!==t&&(s=s.nextSibling):s=o.firstChild),o.insertBefore(r,s||null),()=>Ie(n)}return ze},ke=(o,t)=>Tn(o,null,t),Io=(o,t)=>Tn(ot(o),o&&o.nextSibling,t),Qe=o=>{const t=document.createElement("div");return Te(t,"class",o),t},Mn=o=>{const t=Qe();return t.innerHTML=o.trim(),Q(so(t),n=>Ie(n))},Or=/^--/,Uo=(o,t)=>o.getPropertyValue(t)||o[t]||"",No=o=>{const t=o||0;return isFinite(t)?t:0},yt=o=>No(parseFloat(o||"")),Po=o=>`${(No(o)*100).toFixed(3)}%`,lo=o=>`${No(o)}px`;function it(o,t){o&&t&&Q(t,(n,s)=>{try{const r=o.style,c=Se(n)?lo(n):(n||"")+"";Or.test(s)?r.setProperty(s,c):r[s]=c}catch{}})}function We(o,t,n){const s=At(t);let r=s?"":{};if(o){const c=pe.getComputedStyle(o,n)||o.style;r=s?Uo(c,t):Pe(t).reduce((l,i)=>(l[i]=Uo(c,i),l),r)}return r}const qo=(o,t,n)=>{const s=t?`${t}-`:"",r=n?`-${n}`:"",c=`${s}top${r}`,l=`${s}right${r}`,i=`${s}bottom${r}`,a=`${s}left${r}`,d=We(o,[c,l,i,a]);return{t:yt(d[c]),r:yt(d[l]),b:yt(d[i]),l:yt(d[a])}},Kt=(o,t)=>`translate${ct(o)?`(${o.x},${o.y})`:`${t?"X":"Y"}(${o})`}`,Fr=o=>!!(o.offsetWidth||o.offsetHeight||o.getClientRects().length),Hr={w:0,h:0},Rt=(o,t)=>t?{w:t[`${o}Width`],h:t[`${o}Height`]}:Hr,Rr=o=>Rt("inner",o||pe),at=U(Rt,"offset"),An=U(Rt,"client"),co=U(Rt,"scroll"),So=o=>{const t=parseFloat(We(o,Ze))||0,n=parseFloat(We(o,et))||0;return{w:t-Qt(t),h:n-Qt(n)}},lt=o=>o.getBoundingClientRect(),zr=o=>!!o&&Fr(o),io=o=>!!(o&&(o[et]||o[Ze])),Ln=(o,t)=>{const n=io(o);return!io(t)&&n},Go=(o,t,n,s)=>{Q(Ke(t),r=>{o&&o.removeEventListener(r,n,s)})},te=(o,t,n,s)=>{var r;const c=(r=s&&s.H)!=null?r:!0,l=s&&s.I||!1,i=s&&s.A||!1,a={passive:c,capture:l};return U(be,Ke(t).map(d=>{const m=i?u=>{Go(o,d,m,l),n&&n(u)}:n;return o&&o.addEventListener(d,m,a),U(Go,o,d,m,l)}))},On=o=>o.stopPropagation(),uo=o=>o.preventDefault(),Fn=o=>On(o)||uo(o),Ne=(o,t)=>{const{x:n,y:s}=Se(t)?{x:t,y:t}:t||{};Se(n)&&(o.scrollLeft=n),Se(s)&&(o.scrollTop=s)},ye=o=>({x:o.scrollLeft,y:o.scrollTop}),Hn=()=>({T:{x:0,y:0},D:{x:0,y:0}}),jr=(o,t)=>{const{T:n,D:s}=o,{w:r,h:c}=t,l=(u,p,f)=>{let h=Ho(u)*f,g=Ho(p)*f;if(h===g){const v=Vt(u),E=Vt(p);g=v>E?0:g,h=v{const n=(s,r)=>s===0&&s<=r;return{x:n(o.x,t.x),y:n(o.y,t.y)}},Wo=({T:o,D:t},n)=>{const s=(r,c,l)=>no(0,1,(r-l)/(r-c)||0);return{x:s(o.x,t.x,n.x),y:s(o.y,t.y,n.y)}},mo=o=>{o&&o.focus&&o.focus({preventScroll:!0})},Yo=(o,t)=>{Q(vn(t),o)},fo=o=>{const t=new Map,n=(c,l)=>{if(c){const i=t.get(c);Yo(a=>{i&&i[a?"delete":"clear"](a)},l)}else t.forEach(i=>{i.clear()}),t.clear()},s=(c,l)=>{if(At(c)){const d=t.get(c)||new Set;return t.set(c,d),Yo(m=>{we(m)&&d.add(m)},l),U(n,c,l)}hn(l)&&l&&n();const i=Ae(c),a=[];return Q(i,d=>{const m=c[d];m&&se(a,s(d,m))}),U(be,a)},r=(c,l)=>{Q(Pe(t.get(c)),i=>{l&&!to(l)?i.apply(0,l):i()})};return s(o||{}),[s,n,r]},Xo=o=>JSON.stringify(o,(t,n)=>{if(we(n))throw 0;return n}),Jo=(o,t)=>o?`${t}`.split(".").reduce((n,s)=>n&&Vn(n,s)?n[s]:void 0,o):void 0,Ir={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"]}},Rn=(o,t)=>{const n={},s=Me(Ae(t),Ae(o));return Q(s,r=>{const c=o[r],l=t[r];if(ct(c)&&ct(l))Y(n[r]={},Rn(c,l)),_o(n[r])&&delete n[r];else if(Vn(t,r)&&l!==c){let i=!0;if($e(c)||$e(l))try{Xo(c)===Xo(l)&&(i=!1)}catch{}i&&(n[r]=l)}}),n},Qo=(o,t,n)=>s=>[Jo(o,s),n||Jo(t,s)!==void 0],nt="data-overlayscrollbars",bt="os-environment",xt=`${bt}-scrollbar-hidden`,Wt=`${nt}-initialize`,Et="noClipping",Zo=`${nt}-body`,je=nt,Ur="host",He=`${nt}-viewport`,Pr=Cr,qr=Dr,Gr="arrange",zn="measuring",jn="scrollbarHidden",Kr="scrollbarPressed",Wr="noContent",po=`${nt}-padding`,en=`${nt}-content`,$o="os-size-observer",Yr=`${$o}-appear`,Xr=`${$o}-listener`,Jr="os-trinsic-observer",Qr="os-theme-none",xe="os-scrollbar",Zr=`${xe}-rtl`,es=`${xe}-horizontal`,ts=`${xe}-vertical`,In=`${xe}-track`,Bo=`${xe}-handle`,os=`${xe}-visible`,ns=`${xe}-cornerless`,tn=`${xe}-interaction`,on=`${xe}-unusable`,ho=`${xe}-auto-hide`,nn=`${ho}-hidden`,rn=`${xe}-wheel`,rs=`${In}-interactive`,ss=`${Bo}-interactive`;let Yt;const as=()=>{const o=(y,O,C)=>{ke(document.body,y),ke(document.body,y);const V=An(y),S=at(y),D=So(O);return C&&Ie(y),{x:S.h-V.h+D.h,y:S.w-V.w+D.w}},t=y=>{let O=!1;const C=Vo(y,xt);try{O=We(y,"scrollbar-width")==="none"||We(y,"display","::-webkit-scrollbar")==="none"}catch{}return C(),O},n=`.${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=Mn(`
`)[0],c=r.firstChild,[l,,i]=fo(),[a,d]=ge({o:o(r,c),i:wt},U(o,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&&Dn(y)&&y,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},h=Y({},Ir),g=U(Y,{},h),v=U(Y,{},f),E={k:m,M:p,R:u,V:!!eo,L:U(l,"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 C=pe.matchMedia(`(resolution: ${pe.devicePixelRatio}dppx)`);te(C,"change",()=>{O(),y(O)},{A:!0})};y(()=>{const[O,C]=a();Y(E.k,O),i("r",[C])})}return E},Be=()=>(Yt||(Yt=as()),Yt),Un=(o,t)=>we(t)?t.apply(0,o):t,ls=(o,t,n,s)=>{const r=Mt(s)?n:s;return Un(o,r)||t.apply(0,o)},Pn=(o,t,n,s)=>{const r=Mt(s)?n:s,c=Un(o,r);return!!c&&(Bt(c)?c:t.apply(0,o))},cs=(o,t)=>{const{nativeScrollbarsOverlaid:n,body:s}=t||{},{M:r,R:c,P:l}=Be(),{nativeScrollbarsOverlaid:i,body:a}=l().cancel,d=n??i,m=Mt(s)?a:s,u=(r.x||r.y)&&d,p=o&&(yo(m)?!c:m);return!!u||!!p},Co=new WeakMap,is=(o,t)=>{Co.set(o,t)},ds=o=>{Co.delete(o)},qn=o=>Co.get(o),us=(o,t,n)=>{let s=!1;const r=n?new WeakMap:!1,c=()=>{s=!0},l=i=>{if(r&&n){const a=n.map(d=>{const[m,u]=d||[];return[u&&m?(i||Cn)(m,o):[],u]});Q(a,d=>Q(d[0],m=>{const u=d[1],p=r.get(m)||[];if(o.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 l(),[c,l]},sn=(o,t,n,s)=>{let r=!1;const{j:c,X:l,Y:i,W:a,J:d,K:m}=s||{},u=oo(()=>r&&n(!0),{_:33,p:99}),[p,f]=us(o,u,i),h=c||[],g=l||[],v=Me(h,g),E=(O,C)=>{if(!to(C)){const V=d||ze,S=m||ze,D=[],N=[];let $=!1,b=!1;if(Q(C,_=>{const{attributeName:B,target:x,type:k,oldValue:A,addedNodes:T,removedNodes:K}=_,Z=k==="attributes",X=k==="childList",M=o===x,q=Z&&B,G=q&&wo(x,B||""),I=At(G)?G:null,ee=q&&A!==I,F=xo(g,B)&ⅇif(t&&(X||!M)){const R=Z&&ee,H=R&&a&&Ct(x,a),L=(H?!V(x,B,A,I):!Z||R)&&!S(_,!!H,o,s);Q(T,z=>se(D,z)),Q(K,z=>se(D,z)),b=b||L}!t&&M&&ee&&!V(x,B,A,I)&&(se(N,B),$=$||F)}),f(_=>zo(D).reduce((B,x)=>(se(B,Cn(_,x)),Ct(x,_)?se(B,x):B),[])),t)return!O&&b&&n(!1),[!1];if(!to(N)||$){const _=[zo(N),$];return!O&&n.apply(0,_),_}}},y=new Br(U(E,!1));return[()=>(y.observe(o,{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(),E(!0,y.takeRecords())}]},Gn={},Kn={},ms=o=>{Q(o,t=>Q(t,(n,s)=>{Gn[s]=t[s]}))},Wn=(o,t,n)=>Ae(o).map(s=>{const{static:r,instance:c}=o[s],[l,i,a]=n||[],d=n?c:r;if(d){const m=n?d(l,i,t):d(t);return(a||Kn)[s]=m}}),dt=o=>Kn[o],fs="__osOptionsValidationPlugin",ps="__osSizeObserverPlugin",hs=(o,t)=>{const{M:n}=t,[s,r]=o("showNativeOverlaidScrollbars");return[s&&n.x&&n.y,r]},Dt=o=>o.indexOf(Re)===0,vs=(o,t)=>{const n=(r,c,l,i)=>{const a=r===Re?qe:r.replace(`${Re}-`,""),d=Dt(r),m=Dt(l);return!c&&!i?qe:d&&m?Re:d?c&&i?a:c?Re:qe:c?a:m&&i?Re:qe},s={x:n(t.x,o.x,t.y,o.y),y:n(t.y,o.y,t.x,o.x)};return{G:s,Z:{x:s.x===tt,y:s.y===tt}}},Yn="__osScrollbarsHidingPlugin",gs="__osClickScrollPlugin",Xn=(o,t,n)=>{const{dt:s}=n||{},r=dt(ps),[c]=ge({o:!1,u:!0});return()=>{const l=[],a=Mn(`
`)[0],d=a.firstChild,m=u=>{const p=u instanceof ResizeObserverEntry;let f=!1,h=!1;if(p){const[g,,v]=c(u.contentRect),E=io(g);h=Ln(g,v),f=!h&&!E}else h=u===!0;f||t({ft:!0,dt:h})};if(St){const u=new St(p=>m(p.pop()));u.observe(d),se(l,()=>{u.disconnect()})}else if(r){const[u,p]=r(d,m,s);se(l,Me([Vo(a,Yr),te(a,"animationstart",u)],p))}else return ze;return U(be,se(l,ke(o,a)))}},ks=(o,t)=>{let n;const s=a=>a.h===0||a.isIntersecting||a.intersectionRatio>0,r=Qe(Jr),[c]=ge({o:!1}),l=(a,d)=>{if(a){const m=c(s(a)),[,u]=m;return u&&!d&&t(m)&&[m]}},i=(a,d)=>l(d.pop(),a);return[()=>{const a=[];if(Ro)n=new Ro(U(i,!1),{root:o}),n.observe(r),se(a,()=>{n.disconnect()});else{const d=()=>{const m=at(r);l(m)};se(a,Xn(r,d)()),d()}return U(be,se(a,ke(o,r)))},()=>n&&i(!0,n.takeRecords())]},ys=(o,t,n,s)=>{let r,c,l,i,a,d;const m=`[${je}]`,u=`[${He}]`,p=[],f=["wrap","cols","rows"],h=["id","class","style","open"],{vt:g,ht:v,ot:E,gt:y,bt:O,wt:C,nt:V,yt:S,St:D,Ot:N}=o,$=w=>We(w,"direction")==="rtl",b={$t:!1,ct:$(g)},_=Be(),B=dt(Yn),[x]=ge({i:En,o:{w:0,h:0}},()=>{const w=B&&B.tt(o,t,b,_,n).ut,z=!(S&&V)&&Eo(v,je,Et),j=!V&&D(Gr),P=j&&ye(y),J=N(zn,z),le=j&&w&&w()[0],de=co(E),W=So(E);return le&&le(),Ne(y,P),z&&J(),{w:de.w+W.w,h:de.h+W.h}}),k=C?f:Me(h,f),A=oo(s,{_:()=>r,p:()=>c,m(w,L){const[z]=w,[j]=L;return[Me(Ae(z),Ae(j)).reduce((P,J)=>(P[J]=z[J]||j[J],P),{})]}}),T=w=>{const L=$(g);Y(w,{Ct:d!==L}),Y(b,{ct:L}),d=L},K=(w,L)=>{const[z,j]=w,P={xt:j};return Y(b,{$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?ks(v,K):[],I=!V&&Xn(v,Z,{dt:!0}),[ee,F]=sn(v,!1,M,{X:h,j:Me(h,p)}),R=V&&St&&new St(w=>{const L=w[w.length-1].contentRect;Z({ft:!0,dt:Ln(L,a)}),a=L}),H=oo(()=>{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,le]=w("update.attributes"),[de,W]=w("update.elementEvents"),[ce,ue]=w("update.debounce"),_e=W||le,ie=L||z,he=ae=>we(P)&&P(ae);if(_e){l&&l(),i&&i();const[ae,ne]=sn(O||E,!0,X,{j:Me(k,J||[]),Y:de,W:m,K:(me,re)=>{const{target:fe,attributeName:ve}=me;return(!re&&ve&&!V?Lr(fe,m,u):!1)||!!Je(fe,`.${xe}`)||!!he(me)}});i=ae(),l=ne}if(ue)if(A.S(),$e(ce)){const ae=ce[0],ne=ce[1];r=Se(ae)&&ae,c=Se(ne)&&ne}else Se(ce)?(r=ce,c=!1):(r=!1,c=!1);if(ie){const ae=F(),ne=G&&G(),me=l&&l();ae&&Y(j,M(ae[0],ae[1],ie)),ne&&Y(j,K(ne[0],ie)),me&&Y(j,X(me[0],ie))}return T(j),j},b]},xs=(o,t,n,s)=>{const{P:r}=Be(),{scrollbars:c}=r(),{slot:l}=c,{vt:i,ht:a,ot:d,Dt:m,gt:u,yt:p,nt:f}=t,{scrollbars:h}=m?{}:o,{slot:g}=h||{},v=new Map,E=F=>eo&&new eo({source:u,axis:F}),y={x:E("x"),y:E("y")},O=Pn([i,a,d],()=>f&&p?i:a,l,g),C=(F,R)=>{if(R){const P=F?Ze:et,{kt:J,Mt:le}=R,de=lt(le)[P],W=lt(J)[P];return no(0,1,de/W||0)}const H=F?"x":"y",{Rt:w,Vt:L}=n,z=L[H],j=w[H];return no(0,1,z/(z+j)||0)},V=(F,R,H)=>{const w=C(H,F);return 1/w*(1-w)*R},S=F=>Y(F,{clear:["left"]}),D=F=>{v.forEach((R,H)=>{(F?xo(vn(F),H):!0)&&(Q(R||[],L=>{L&&L.cancel()}),v.delete(H))})},N=(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,Me(L,[F.animate(H,{timeline:R,composite:w})]))},$=(F,R,H)=>{const w=H?Vo:Bn;Q(F,L=>{w(L.Lt,R)})},b=(F,R)=>{Q(F,H=>{const[w,L]=R(H);it(w,L)})},_=(F,R)=>{b(F,H=>{const{Mt:w}=H;return[w,{[R?Ze:et]:Po(C(R))}]})},B=(F,R)=>{const{Pt:H}=n,w=R?"x":"y",L=y[w],z=Ko(H)[w],j=(P,J)=>Kt(Po(V(P,z?J:1-J,R)),R);L?Q(F,P=>{const{Mt:J}=P;N(J,L,S({transform:[0,1].map(le=>j(P,le))}))}):b(F,P=>[P.Mt,{transform:j(P,Wo(H,ye(u))[w])}])},x=F=>f&&!p&&ot(F)===d,k=[],A=[],T=[],K=(F,R,H)=>{const w=hn(H),L=w?H:!0,z=w?!H:!0;L&&$(A,F,R),z&&$(T,F,R)},Z=()=>{_(A,!0),_(T)},X=()=>{B(A,!0),B(T)},M=()=>{if(f){const{Rt:F,Pt:R}=n,H=Ko(R),w=.5;if(y.x&&y.y)Q(Me(T,A),({Lt:L})=>{if(x(L)){const z=j=>N(L,y[j],S({transform:[0,H[j]?1:-1].map(P=>Kt(lo(P*(F[j]-w)),j==="x"))}),"add");z("x"),z("y")}else D(L)});else{const L=Wo(R,ye(u)),z=j=>{const{Lt:P}=j,J=x(P)&&P,le=(de,W,ce)=>{const ue=W*de;return lo(ce?ue:-ue)};return[J,J&&{transform:Kt({x:le(L.x,F.x,H.x),y:le(L.y,F.y,H.y)})}]};b(A,z),b(T,z)}}},q=F=>{const H=Qe(`${xe} ${F?es:ts}`),w=Qe(In),L=Qe(Bo),z={Lt:H,kt:w,Mt:L};return se(F?A:T,z),se(k,[ke(H,w),ke(w,L),U(Ie,H),D,s(z,K,B,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(b,A)},Wt:{V:y.y,jt:T,Xt:I,Yt:U(b,T)}},ee]},_s=(o,t,n,s)=>(r,c,l,i)=>{const{ht:a,ot:d,nt:m,gt:u,Jt:p,Ot:f}=t,{Lt:h,kt:g,Mt:v}=r,[E,y]=Ge(333),[O,C]=Ge(444),[V,S]=Ge(),D=U(l,[r],i),N=x=>{we(u.scrollBy)&&u.scrollBy({behavior:"smooth",left:x.x,top:x.y})},$=i?Ze:et,b=()=>{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}=n,I=at(g)[T]-at(v)[T],F=M*q/I*G[K];Ne(u,{[K]:X+F})};return te(g,"pointerdown",X=>{const M=Je(X.target,`.${Bo}`)===v,q=M?v:g,G=o.scrollbars,{button:I,isPrimary:ee,pointerType:F}=X,{pointers:R}=G;if(I===0&&ee&&G[M?"dragScroll":"clickScroll"]&&(R||[]).includes(F)){C();const w=!M&&X.shiftKey,L=U(lt,v),z=U(lt,g),j=(re,fe)=>(re||L())[A]-(fe||z())[A],P=Qt(lt(u)[$])/at(u)[T]||1,J=Z(ye(u)[K],1/P),le=X[k],de=L(),W=z(),ce=de[$],ue=j(de,W)+ce/2,_e=le-W[A],ie=M?0:_e-ue,he=re=>{be(me),q.releasePointerCapture(re.pointerId)},ae=()=>f(Kr,!0),ne=ae(),me=[()=>{const re=ye(u);ne();const fe=ye(u),ve={x:fe.x-re.x,y:fe.y-re.y};(Vt(ve.x)>3||Vt(ve.y)>3)&&(ae(),Ne(u,re),N(ve),O(ne))},te(p,x,he),te(p,"selectstart",re=>uo(re),{H:!1}),te(g,x,he),te(g,"pointermove",re=>{const fe=re[k]-le;(M||w)&&J(ie+fe)})];if(q.setPointerCapture(X.pointerId),w)J(ie);else if(!M){const re=dt(gs);re&&se(me,re(J,j,ie,ce,_e))}}})};let _=!0;const B=x=>x.propertyName.indexOf($)>-1;return U(be,[te(v,"pointermove pointerleave",s),te(h,"pointerenter",()=>{c(tn,!0)}),te(h,"pointerleave pointercancel",()=>{c(tn,!1)}),!m&&te(h,"mousedown",()=>{const x=ao();(jo(x,He)||jo(x,je)||x===document.body)&&Nt(U(mo,d),25)}),te(h,"wheel",x=>{const{deltaX:k,deltaY:A,deltaMode:T}=x;_&&T===0&&ot(h)===a&&N({x:k,y:A}),_=!1,c(rn,!0),E(()=>{_=!0,c(rn)}),uo(x)},{H:!1,I:!0}),te(v,"transitionstart",x=>{if(B(x)){const k=()=>{D(),V(k)};k()}}),te(v,"transitionend transitioncancel",x=>{B(x)&&(S(),D())}),te(h,"pointerdown",U(te,p,"click",Fn,{A:!0,I:!0,H:!1}),{I:!0}),b(),y,C,S])},ws=(o,t,n,s,r,c)=>{let l,i,a,d,m,u=ze,p=0;const f=M=>M.pointerType==="mouse",[h,g]=Ge(),[v,E]=Ge(100),[y,O]=Ge(100),[C,V]=Ge(()=>p),[S,D]=xs(o,r,s,_s(t,r,s,M=>f(M)&&T())),{ht:N,Kt:$,yt:b}=r,{Bt:_,Ut:B,Nt:x,qt:k}=S,A=(M,q)=>{if(V(),M)_(nn);else{const G=U(_,nn,!0);p>0&&!q?C(G):G()}},T=()=>{(a?!l:!d)&&(A(!0),v(()=>{A(!1)}))},K=M=>{_(ho,M,!0),_(ho,M,!1)},Z=M=>{f(M)&&(l=a,a&&A(!0))},X=[V,E,O,g,()=>u(),te(N,"pointerover",Z,{A:!0}),te(N,"pointerenter",Z),te(N,"pointerleave",M=>{f(M)&&(l=!1,a&&A(!1))}),te(N,"pointermove",M=>{f(M)&&i&&T()}),te($,"scroll",M=>{h(()=>{x(),T()}),c(M),k()})];return[()=>U(be,se(X,D())),({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}=n,{M:j}=Be(),{G:P,en:J}=s,[le,de]=M("showNativeOverlaidScrollbars"),[W,ce]=M("scrollbars.theme"),[ue,_e]=M("scrollbars.visibility"),[ie,he]=M("scrollbars.autoHide"),[ae,ne]=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=le&&j.x&&j.y,ft=(Le,rt,st)=>{const pt=Le.includes(tt)&&(ue===Re||ue==="auto"&&rt===tt);return _(os,pt,st),pt};if(p=me,It&&(ae&&Ut?(K(!1),u(),y(()=>{u=te($,"scroll",U(K,!0),{A:!0})})):K(!0)),de&&_(Qr,mt),ce&&(_(m),_(W,!0),m=W),ne&&!ae&&K(!0),he&&(i=ie==="move",a=ie==="leave",d=ie==="never",A(d,!0)),fe&&_(ss,re),Ye&&_(rs,ve),Pt){const Le=ft(ut.x,P.x,!0),rt=ft(ut.y,P.y,!1);_(ns,!(Le&&rt))}Ee&&(B(),x(),k(),_(on,!J.x,!0),_(on,!J.y,!1),_(Zr,z&&!b))},{},S]},bs=o=>{const t=Be(),{P:n,R:s}=t,{elements:r}=n(),{host:c,padding:l,viewport:i,content:a}=r,d=Bt(o),m=d?{}:o,{elements:u}=m,{host:p,padding:f,viewport:h,content:g}=u||{},v=d?o:m.target,E=Dn(v),y=Ct(v,"textarea"),O=v.ownerDocument,C=O.documentElement,V=()=>O.defaultView||pe,S=U(ls,[v]),D=U(Pn,[v]),N=U(Qe,""),$=U(S,N,i),b=U(D,N,a),_=$(h),B=_===v,x=B&&E,k=!B&&b(g),A=!B&&_===k,T=x?C:_,K=y?S(N,c,p):v,Z=x?T:K,X=!B&&D(N,l,f),M=!A&&k,q=[M,T,X,Z].map(W=>Bt(W)&&!ot(W)&&W),G=W=>W&&xo(q,W),I=G(T)?v:T,ee={vt:v,ht:Z,ot:T,cn:X,bt:M,gt:x?C:T,Kt:x?O:T,rn:E?C:I,Jt:O,wt:y,yt:E,Dt:d,nt:B,ln:V,St:W=>Eo(T,He,W),Ot:(W,ce)=>ro(T,He,W,ce)},{vt:F,ht:R,cn:H,ot:w,bt:L}=ee,z=[()=>{Ve(R,[je,Wt]),Ve(F,Wt),E&&Ve(C,[Wt,je])}],j=y&&G(R);let P=y?F:so([L,w,H,R,F].find(W=>W&&!G(W)));const J=x?F:L||w,le=U(be,z);return[ee,()=>{const W=V(),ce=ao(),ue=ne=>{ke(ot(ne),so(ne)),Ie(ne)},_e=ne=>te(ne,"focusin focusout focus blur",Fn,{I:!0,H:!1}),ie="tabindex",he=wo(w,ie),ae=_e(ce);return Te(R,je,B?"":Ur),Te(H,po,""),Te(w,He,""),Te(L,en,""),B||(Te(w,ie,he||"-1"),E&&Te(C,Zo,"")),j&&(Io(F,R),se(z,()=>{Io(R,F),Ie(R)})),ke(J,P),ke(R,H),ke(H||R,!B&&w),ke(w,L),se(z,[ae,()=>{const ne=ao(),me=G(w),re=me&&ne===w?F:ne,fe=_e(re);Ve(H,po),Ve(L,en),Ve(w,He),E&&Ve(C,Zo),he?Te(w,ie,he):Ve(w,ie),G(L)&&ue(L),me&&ue(w),G(H)&&ue(H),mo(re),fe()}]),s&&!B&&(bo(w,He,jn),se(z,U(Ve,w,He))),mo(!B&&E&&ce===F&&W.top===W?w:ce),ae(),P=0,le},le]},Es=({bt:o})=>({Gt:t,an:n,Tt:s})=>{const{xt:r}=t||{},{$t:c}=n;o&&(r||s)&&it(o,{[et]:c&&"100%"})},Vs=({ht:o,cn:t,ot:n,nt:s},r)=>{const[c,l]=ge({i:Mr,o:qo()},U(qo,o,"padding",""));return({It:i,Gt:a,an:d,Tt:m})=>{let[u,p]=l(m);const{R:f}=Be(),{ft:h,Ht:g,Ct:v}=a||{},{ct:E}=d,[y,O]=i("paddingAbsolute");(h||p||(m||g))&&([u,p]=c(m));const V=!s&&(O||v||p);if(V){const S=!y||!t&&!f,D=u.r+u.l,N=u.t+u.b,$={[wn]:S&&!E?-D:0,[bn]:S?-N:0,[_n]:S&&E?-D:0,top:S?-u.t:0,right:S?E?-u.r:"auto":0,left:S?E?"auto":-u.l:0,[Ze]:S&&`calc(100% + ${D}px)`},b={[gn]:S?u.t:0,[kn]:S?u.r:0,[xn]:S?u.b:0,[yn]:S?u.l:0};it(t||n,$),it(n,b),Y(r,{cn:u,un:!S,rt:t?b:Y({},$,b)})}return{_n:V}}},Ns=(o,t)=>{const n=Be(),{ht:s,cn:r,ot:c,nt:l,Kt:i,gt:a,yt:d,Ot:m,ln:u}=o,{R:p}=n,f=d&&l,h=U(mn,0),g=["display","direction","flexDirection","writingMode"],v={i:En,o:{w:0,h:0}},E={i:wt,o:{}},y=M=>{m(zn,!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}},[C,V]=ge(v,U(So,c)),[S,D]=ge(v,U(co,c)),[N,$]=ge(v),[b]=ge(E),[_,B]=ge(v),[x]=ge(E),[k]=ge({i:(M,q)=>Ft(M,q,g),o:{}},()=>zr(c)?We(c,g):{}),[A,T]=ge({i:(M,q)=>wt(M.T,q.T)&&wt(M.D,q.D),o:Hn()},()=>{y(!0);const M=ye(a),q=m(Wr,!0),G=te(i,tt,H=>{const w=ye(a);H.isTrusted&&w.x===M.x&&w.y===M.y&&On(H)},{I:!0,A:!0});Ne(a,{x:0,y:0}),q();const I=ye(a),ee=co(a);Ne(a,{x:ee.w,y:ee.h});const F=ye(a);Ne(a,{x:F.x-I.x<1&&-ee.w,y:F.y-I.y<1&&-ee.h});const R=ye(a);return Ne(a,M),ko(()=>G()),{T:I,D:R}}),K=dt(Yn),Z=(M,q)=>`${q?Pr:qr}${Tr(M)}`,X=M=>{const q=I=>[Re,qe,tt].map(ee=>Z(ee,I)),G=q(!0).concat(q()).join(" ");m(G),m(Ae(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(o,t,G,n,M),{it:j,ut:P,_t:J}=z||{},[le,de]=hs(M,n),[W,ce]=M("overflow"),ue=Dt(W.x),_e=Dt(W.y),ie=F||ee||R||H||L||de;let he=V(I),ae=D(I),ne=$(I),me=B(I);if(de&&p&&m(jn,!le),ie){Eo(s,je,Et)&&y(!0);const[Lo]=P?P():[],[ht]=he=C(I),[vt]=ae=S(I),gt=An(c),kt=f&&Rr(u()),ir={w:h(vt.w+ht.w),h:h(vt.h+ht.h)},Oo={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)};Lo&&Lo(),me=_(Oo),ne=N(O(ir,Oo),I)}const[re,fe]=me,[ve,Ye]=ne,[ut,jt]=ae,[It,Ut]=he,[Ee,Pt]=b({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,Le=vs(Ee,W),[rt,st]=x(Le.G),[,pt]=k(I),Ao=H||w||pt||Pt||I,[lr,cr]=Ao?A(I):T();return ft&&(st&&X(Le.G),J&&j&&it(c,J(Le,G,j(Le,ut,It)))),y(!1),ro(s,je,Et,mt),ro(r,po,Et,mt),Y(t,{G:rt,Vt:{x:re.w,y:re.h},Rt:{x:ve.w,y:ve.h},en:Ee,Pt:jr(lr,ve)}),{nn:st,Zt:fe,tn:Ye,sn:cr||Ye,dn:Ao}}},Ss=o=>{const[t,n,s]=bs(o),r={cn:{t:0,r:0,b:0,l:0},un:!1,rt:{[wn]:0,[bn]:0,[_n]:0,[gn]:0,[kn]:0,[xn]:0,[yn]:0},Vt:{x:0,y:0},Rt:{x:0,y:0},G:{x:qe,y:qe},en:{x:!1,y:!1},Pt:Hn()},{vt:c,gt:l,nt:i}=t,{R:a,M:d}=Be(),m=!a&&(d.x||d.y),u=[Es(t),Vs(t,r),Ns(t,r)];return[n,p=>{const f={},g=m&&ye(l);return Q(u,v=>{Y(f,v(p,f)||{})}),Ne(l,g),!i&&Ne(c,0),f},r,t,s]},$s=(o,t,n,s,r)=>{const c=Qo(t,{}),[l,i,a,d,m]=Ss(o),[u,p,f]=ys(d,a,c,O=>{y({},O)}),[h,g,,v]=ws(o,t,f,a,d,r),E=O=>Ae(O).some(C=>!!O[C]),y=(O,C)=>{if(n())return!1;const{fn:V,Tt:S,At:D,pn:N}=O,$=V||{},b=!!S,_={It:Qo(t,$,b),fn:$,Tt:b};if(N)return g(_),!1;const B=C||p(Y({},_,{At:D})),x=i(Y({},_,{an:f,Gt:B}));g(Y({},_,{Gt:B,Qt:x}));const k=E(B),A=E(x),T=k||A||!_o($)||b;return T&&s(O,{Gt:B,Qt:x}),T};return[()=>{const{rn:O,gt:C}=d,V=ye(O),S=[u(),l(),h()];return Ne(C,V),U(be,S)},y,()=>({vn:f,hn:a}),{gn:d,bn:v},m]},Ue=(o,t,n)=>{const{N:s}=Be(),r=Bt(o),c=r?o:o.target,l=qn(c);if(t&&!l){let i=!1;const a=[],d={},m=b=>{const _=Nn(b),B=dt(fs);return B?B(_,!0):_},u=Y({},s(),m(t)),[p,f,h]=fo(),[g,v,E]=fo(n),y=(b,_)=>{E(b,_),h(b,_)},[O,C,V,S,D]=$s(o,u,()=>i,({fn:b,Tt:_},{Gt:B,Qt:x})=>{const{ft:k,Ct:A,xt:T,Ht:K,Et:Z,dt:X}=B,{Zt:M,tn:q,nn:G,sn:I}=x;y("updated",[$,{updateHints:{sizeChanged:!!k,directionChanged:!!A,heightIntrinsicChanged:!!T,overflowEdgeChanged:!!M,overflowAmountChanged:!!q,overflowStyleChanged:!!G,scrollCoordinatesChanged:!!I,contentMutation:!!K,hostMutation:!!Z,appear:!!X},changedOptions:b||{},force:!!_}])},b=>y("scroll",[$,b])),N=b=>{ds(c),be(a),i=!0,y("destroyed",[$,b]),f(),v()},$={options(b,_){if(b){const B=_?s():{},x=Rn(u,Y(B,m(b)));_o(x)||(Y(u,x),C({fn:x}))}return Y({},u)},on:g,off:(b,_)=>{b&&_&&v(b,_)},state(){const{vn:b,hn:_}=V(),{ct:B}=b,{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:B,destroyed:i})},elements(){const{vt:b,ht:_,cn:B,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 C({pn:!0}),F}})};return Y({},{target:b,host:_,padding:B||x,viewport:x,content:k||x,scrollOffsetElement:A,scrollEventElement:T,scrollbarHorizontal:M(K),scrollbarVertical:M(Z)})},update:b=>C({Tt:b,At:!0}),destroy:U(N,!1),plugin:b=>d[Ae(b)[0]]};return se(a,[D]),is(c,$),Wn(Gn,Ue,[$,p,d]),cs(S.gn.yt,!r&&o.cancel)?(N(!0),$):(se(a,O()),y("initialized",[$]),$.update(!0),$)}return l};Ue.plugin=o=>{const t=$e(o),n=t?o:[o],s=n.map(r=>Wn(r,Ue)[0]);return ms(n),t?s:s[0]};Ue.valid=o=>{const t=o&&o.elements,n=we(t)&&t();return $t(n)&&!!qn(n.target)};Ue.env=()=>{const{k:o,M:t,R:n,V:s,B:r,F:c,P:l,U:i,N:a,q:d}=Be();return Y({},{scrollbarsSize:o,scrollbarsOverlaid:t,scrollbarsHiding:n,scrollTimeline:s,staticDefaultInitialization:r,staticDefaultOptions:c,getDefaultInitialization:l,setDefaultInitialization:i,getDefaultOptions:a,setDefaultOptions:d})};function Bs(){let o;const t=e.ref(null),n=Math.floor(Math.random()*2**32),s=e.ref(!1),r=e.ref([]),c=()=>r.value,l=()=>o.getSelection(),i=()=>r.value.length,a=()=>o.clearSelection(!0),d=e.ref(),m=e.ref(null),u=e.ref(null),p=e.ref(null);function f(){o=new fr({area:t.value,keyboardDrag:!1,selectedClass:"vf-explorer-selected",selectorClass:"vf-explorer-selector"}),o.subscribe("DS:start:pre",({items:C,event:V,isDragging:S})=>{if(S)o.Interaction._reset(V);else{s.value=!1;const D=t.value.offsetWidth-V.offsetX,N=t.value.offsetHeight-V.offsetY;D<15&&N<15&&o.Interaction._reset(V),V.target.classList.contains("os-scrollbar-handle")&&o.Interaction._reset(V)}}),document.addEventListener("dragleave",C=>{!C.buttons&&s.value&&(s.value=!1)})}const h=()=>e.nextTick(()=>{o.addSelection(o.getSelectables()),g()}),g=()=>{r.value=o.getSelection().map(C=>JSON.parse(C.dataset.item)),d.value(r.value)},v=()=>e.nextTick(()=>{const C=c().map(V=>V.path);a(),o.setSettings({selectables:document.getElementsByClassName("vf-item-"+n)}),o.addSelection(o.getSelectables().filter(V=>C.includes(JSON.parse(V.dataset.item).path))),g(),y()}),E=C=>{d.value=C,o.subscribe("DS:end",({items:V,event:S,isDragging:D})=>{r.value=V.map(N=>JSON.parse(N.dataset.item)),C(V.map(N=>JSON.parse(N.dataset.item)))})},y=()=>{m.value&&(t.value.getBoundingClientRect().height{if(!m.value)return;const{scrollOffsetElement:V}=m.value.elements();V.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:C=>{m.value=C},scroll:(C,V)=>{const{scrollOffsetElement:S}=C.elements();t.value.scrollTo({top:S.scrollTop,left:0})}}),f(),y(),new ResizeObserver(y).observe(t.value),t.value.addEventListener("scroll",O),o.subscribe("DS:scroll",({isDragging:C})=>C||O())}),e.onUnmounted(()=>{o&&o.stop()}),e.onUpdated(()=>{o&&o.Area.reset()}),{area:t,explorerId:n,isDraggingRef:s,scrollBar:u,scrollBarContainer:p,getSelected:c,getSelection:l,selectAll:h,clearSelection:a,refreshSelection:v,getCount:i,onSelect:E}}function Cs(o,t){const n=e.ref(o),s=e.ref(t),r=e.ref([]),c=e.ref([]),l=e.ref([]),i=e.ref(!1),a=e.ref(5);let d=!1,m=!1;const u=e.reactive({adapter:n,storages:[],dirname:s,files:[]});function p(){let y=[],O=[],C=s.value??n.value+"://";C.length===0&&(r.value=[]),C.replace(n.value+"://","").split("/").forEach(function(D){y.push(D),y.join("/")!==""&&O.push({basename:D,name:D,path:n.value+"://"+y.join("/"),type:"dir"})}),c.value=O;const[V,S]=h(O,a.value);l.value=S,r.value=V}function f(y){a.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 E=e.computed(()=>{var y;return((y=r.value[r.value.length-2])==null?void 0:y.path)??n.value+"://"});return e.onMounted(()=>{}),e.watch(s,p),e.onMounted(p),{adapter:n,path:s,loading:d,searchMode:m,data:u,breadcrumbs:r,breadcrumbItems:c,limitBreadcrumbItems:f,hiddenBreadcrumbs:l,showHiddenBreadcrumbs:i,toggleHiddenBreadcrumbs:g,isGoUpAvailable:v,parentFolderPath:E}}const Ds=(o,t)=>{const n=xr(o.id),s=mr(),r=n.getStore("metricUnits",!1),c=Nr(n,o.theme),l=t.i18n,i=o.locale??t.locale,a=n.getStore("adapter"),d=p=>Array.isArray(p)?p:br,m=n.getStore("persist-path",o.persist),u=m?n.getStore("path",o.path):o.path;return e.reactive({version:Er,root:null,debug:o.debug,emitter:s,storage:n,i18n:e.computed(()=>wr(n,i,s,l)),modal:Sr(),dragSelect:e.computed(()=>Bs()),requester:yr(o.request),features:d(o.features),view:n.getStore("viewport","grid"),fullScreen:n.getStore("full-screen",o.fullScreen),showTreeView:n.getStore("show-tree-view",o.showTreeView),pinnedFolders:n.getStore("pinned-folders",o.pinnedFolders),treeViewData:[],selectButton:o.selectButton,maxFileSize:o.maxFileSize,theme:c,metricUnits:r,filesize:r?dn:cn,compactListView:n.getStore("compact-list-view",!0),persist:m,showThumbnails:n.getStore("show-thumbnails",o.showThumbnails),fs:Cs(a,u)})},Ts=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),Ms={class:"fixed z-10 inset-0 overflow-hidden"},As={class:"bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Ls={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(o){const t=e.ref(null),n=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(n).modal.close(),["esc"])),tabindex:"0"},[Ts,e.createElementVNode("div",Ms,[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(n).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",As,[e.renderSlot(s.$slots,"default")]),e.createElementVNode("div",Ls,[e.renderSlot(s.$slots,"buttons")])],512)],32)])],32))}},Os=(o,t)=>{const n=o.__vccOpts||o;for(const[s,r]of t)n[s]=r;return n},Fs={props:{on:{type:String,required:!0}},setup(o,{emit:t,slots:n}){const s=e.inject("ServiceContainer"),r=e.ref(!1),{t:c}=s.i18n;let l=null;const i=()=>{clearTimeout(l),r.value=!0,l=setTimeout(()=>{r.value=!1},2e3)};return e.onMounted(()=>{s.emitter.on(o.on,i)}),e.onUnmounted(()=>{clearTimeout(l)}),{shown:r,t:c}}},Hs={key:1};function Rs(o,t,n,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}]])},[o.$slots.default?e.renderSlot(o.$slots,"default",{key:0}):(e.openBlock(),e.createElementBlock("span",Hs,e.toDisplayString(s.t("Saved.")),1))],2)}const Xe=Os(Fs,[["render",Rs]]),zs={class:"sm:flex sm:items-start select-none"},js=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),Is={class:"mt-3 sm:mt-0 sm:ml-4 sm:text-left w-full"},Us={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Ps={class:"flex","aria-label":"Tabs"},qs=["onClick","aria-current"],Gs={key:0,class:"mt-4"},Ks={class:"m-1 text-sm text-gray-500"},Ws={href:"https://vuefinder.ozdemir.be",class:"block mt-2 text-sm text-blue-500 dark:text-blue-400",target:"_blank"},Ys={href:"https://github.com/n1crack/vuefinder",class:"block mt-2 text-sm text-blue-500 dark:text-blue-400",target:"_blank"},Xs={key:1,class:"mt-2"},Js={class:"m-1 text-sm text-gray-500"},Qs={class:"mt-3 text-left"},Zs={class:"space-y-2"},ea={class:"flex relative gap-x-3"},ta={class:"h-6 items-center"},oa={class:"flex-1 block text-sm"},na={for:"metric_unit",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},ra={class:"flex relative gap-x-3"},sa={class:"h-6 items-center"},aa={class:"flex-1 block text-sm"},la={for:"large_icons",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},ca={class:"flex relative gap-x-3"},ia={class:"h-6 items-center"},da={class:"flex-1 block text-sm"},ua={for:"persist_path",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},ma={class:"flex relative gap-x-3"},fa={class:"h-6 items-center"},pa={class:"flex-1 block text-sm"},ha={for:"show_thumbnails",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},va={class:""},ga={class:"h-6 items-center"},ka={for:"theme",class:"flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm"},ya={class:"flex text-sm"},xa=["label"],_a=["value"],wa={key:0,class:""},ba={class:"h-6 items-center"},Ea={for:"language",class:"flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm text-nowrap"},Va={class:"flex text-sm"},Na=["label"],Sa=["value"],$a={key:2,class:"mt-3"},Ba={class:"space-y-2 sm:w-1/2"},Ca={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Da=e.createElementVNode("kbd",null,"F2",-1),Ta={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Ma=e.createElementVNode("kbd",null,"F5",-1),Aa={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},La=e.createElementVNode("kbd",null,"Del",-1),Oa={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Fa=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Esc")],-1),Ha={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Ra=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"A")],-1),za={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},ja=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"F")],-1),Ia={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Ua=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"E")],-1),Pa={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},qa=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,",")],-1),Ga={key:3,class:"mt-3"},Ka={class:"m-1 text-sm text-gray-500"},Jn={__name:"ModalAbout",setup(o){const t=e.inject("ServiceContainer"),{setStore:n,clearStore:s}=t.storage,{t:r,changeLocale:c,locale:l}=t.i18n,i={ABOUT:"about",SETTINGS:"settings",SHORTCUTS:"shortcuts",RESET:"reset"},a=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=C=>{t.theme.set(C),t.emitter.emit("vf-theme-saved")},p=()=>{t.metricUnits=!t.metricUnits,t.filesize=t.metricUnits?dn:cn,n("metricUnits",t.metricUnits),t.emitter.emit("vf-metric-units-saved")},f=()=>{t.compactListView=!t.compactListView,n("compactListView",t.compactListView),t.emitter.emit("vf-compact-view-saved")},h=()=>{t.showThumbnails=!t.showThumbnails,n("show-thumbnails",t.showThumbnails),t.emitter.emit("vf-show-thumbnails-saved")},g=()=>{t.persist=!t.persist,n("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(([C])=>Object.keys(v).includes(C))),O=e.computed(()=>({system:r("System"),light:r("Light"),dark:r("Dark")}));return(C,V)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:V[8]||(V[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",zs,[js,e.createElementVNode("div",Is,[e.createElementVNode("h3",Us,e.toDisplayString("Vuefinder "+e.unref(t).version),1),e.createElementVNode("div",null,[e.createElementVNode("div",null,[e.createElementVNode("nav",Ps,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,S=>(e.openBlock(),e.createElementBlock("button",{key:S.name,onClick:D=>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,qs))),128))])])]),d.value===i.ABOUT?(e.openBlock(),e.createElementBlock("div",Gs,[e.createElementVNode("div",Ks,e.toDisplayString(e.unref(r)("Vuefinder is a simple, lightweight, and fast file manager library for Vue.js applications")),1),e.createElementVNode("a",Ws,e.toDisplayString(e.unref(r)("Project home")),1),e.createElementVNode("a",Ys,e.toDisplayString(e.unref(r)("Follow on GitHub")),1)])):e.createCommentVNode("",!0),d.value===i.SETTINGS?(e.openBlock(),e.createElementBlock("div",Xs,[e.createElementVNode("div",Js,e.toDisplayString(e.unref(r)("Customize your experience with the following settings.")),1),e.createElementVNode("div",Qs,[e.createElementVNode("fieldset",null,[e.createElementVNode("div",Zs,[e.createElementVNode("div",ea,[e.createElementVNode("div",ta,[e.withDirectives(e.createElementVNode("input",{id:"metric_unit",name:"metric_unit",type:"checkbox","onUpdate:modelValue":V[0]||(V[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",oa,[e.createElementVNode("label",na,[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",ra,[e.createElementVNode("div",sa,[e.withDirectives(e.createElementVNode("input",{id:"large_icons",name:"large_icons",type:"checkbox","onUpdate:modelValue":V[1]||(V[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",aa,[e.createElementVNode("label",la,[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",ca,[e.createElementVNode("div",ia,[e.withDirectives(e.createElementVNode("input",{id:"persist_path",name:"persist_path",type:"checkbox","onUpdate:modelValue":V[2]||(V[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",da,[e.createElementVNode("label",ua,[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",ma,[e.createElementVNode("div",fa,[e.withDirectives(e.createElementVNode("input",{id:"show_thumbnails",name:"show_thumbnails",type:"checkbox","onUpdate:modelValue":V[3]||(V[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",pa,[e.createElementVNode("label",ha,[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",va,[e.createElementVNode("div",ga,[e.createElementVNode("label",ka,e.toDisplayString(e.unref(r)("Theme")),1)]),e.createElementVNode("div",ya,[e.withDirectives(e.createElementVNode("select",{id:"theme","onUpdate:modelValue":V[4]||(V[4]=S=>e.unref(t).theme.value=S),onChange:V[5]||(V[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,D)=>(e.openBlock(),e.createElementBlock("option",{value:D},e.toDisplayString(S),9,_a))),256))],8,xa)],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(oe).LANGUAGE)&&Object.keys(e.unref(y)).length>1?(e.openBlock(),e.createElementBlock("div",wa,[e.createElementVNode("div",ba,[e.createElementVNode("label",Ea,e.toDisplayString(e.unref(r)("Language")),1)]),e.createElementVNode("div",Va,[e.withDirectives(e.createElementVNode("select",{id:"language","onUpdate:modelValue":V[6]||(V[6]=S=>e.isRef(l)?l.value=S:null),onChange:V[7]||(V[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,D)=>(e.openBlock(),e.createElementBlock("option",{value:D},e.toDisplayString(S),9,Sa))),256))],8,Na)],544),[[e.vModelSelect,e.unref(l)]]),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",$a,[e.createElementVNode("div",Ba,[e.createElementVNode("div",Ca,[e.createElementVNode("div",null,e.toDisplayString(e.unref(r)("Rename")),1),Da]),e.createElementVNode("div",Ta,[e.createElementVNode("div",null,e.toDisplayString(e.unref(r)("Refresh")),1),Ma]),e.createElementVNode("div",Aa,[e.createTextVNode(e.toDisplayString(e.unref(r)("Delete"))+" ",1),La]),e.createElementVNode("div",Oa,[e.createTextVNode(e.toDisplayString(e.unref(r)("Escape"))+" ",1),Fa]),e.createElementVNode("div",Ha,[e.createTextVNode(e.toDisplayString(e.unref(r)("Select All"))+" ",1),Ra]),e.createElementVNode("div",za,[e.createTextVNode(e.toDisplayString(e.unref(r)("Search"))+" ",1),ja]),e.createElementVNode("div",Ia,[e.createTextVNode(e.toDisplayString(e.unref(r)("Toggle Sidebar"))+" ",1),Ua]),e.createElementVNode("div",Pa,[e.createTextVNode(e.toDisplayString(e.unref(r)("Open Settings"))+" ",1),qa])])])):e.createCommentVNode("",!0),d.value===i.RESET?(e.openBlock(),e.createElementBlock("div",Ga,[e.createElementVNode("div",Ka,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}))}},Wa=["aria-label"],Ya=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),Xa=[Ya],De={__name:"Message",props:{error:{type:Boolean,default:!1}},emits:["hidden"],setup(o,{emit:t}){var d;const n=t,s=e.inject("ServiceContainer"),{t:r}=s.i18n,c=e.ref(!1),l=e.ref(null),i=e.ref((d=l.value)==null?void 0:d.strMessage);e.watch(i,()=>c.value=!1);const a=()=>{n("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:l,class:e.normalizeClass(["flex mt-2 p-1 px-2 rounded text-sm break-all dark:opacity-75",o.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:a,"aria-label":e.unref(r)("Close"),"data-microtip-position":"top-left",role:"tooltip"},Xa,8,Wa)],2))]))}},Ja={class:"sm:flex sm:items-start"},Qa=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),Za={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},el={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},tl={class:"mt-2"},ol={class:"text-sm text-gray-500"},nl={class:"text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",style:{"max-height":"200px"}},rl={class:"flex text-sm text-gray-800 dark:text-gray-400"},sl={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"},al=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),ll=[al],cl={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"},il=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),dl=[il],ul={class:"ml-1.5"},ml={class:"m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center"},Do={__name:"ModalDelete",setup(o){const t=e.inject("ServiceContainer"),{t:n}=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:l,type:i})=>({path:l,type:i}))},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:n("Files deleted.")})},onError:l=>{r.value=n(l.message)}})};return(l,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(n)("Yes, Delete!")),1),e.createElementVNode("button",{type:"button",onClick:i[1]||(i[1]=a=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(n)("Cancel")),1),e.createElementVNode("div",ml,e.toDisplayString(e.unref(n)("This action cannot be undone.")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Ja,[Qa,e.createElementVNode("div",Za,[e.createElementVNode("h3",el,e.toDisplayString(e.unref(n)("Delete files")),1),e.createElementVNode("div",tl,[e.createElementVNode("p",ol,e.toDisplayString(e.unref(n)("Are you sure you want to delete these files?")),1),e.createElementVNode("div",nl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,a=>(e.openBlock(),e.createElementBlock("p",rl,[a.type==="dir"?(e.openBlock(),e.createElementBlock("svg",sl,ll)):(e.openBlock(),e.createElementBlock("svg",cl,dl)),e.createElementVNode("span",ul,e.toDisplayString(a.basename),1)]))),256))]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:i[0]||(i[0]=a=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},fl={class:"sm:flex sm:items-start"},pl=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),hl={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},vl={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},gl={class:"mt-2"},kl={class:"flex text-sm text-gray-800 dark:text-gray-400 py-2"},yl={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"},xl=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),_l=[xl],wl={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"},bl=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),El=[bl],Vl={class:"ml-1.5"},To={__name:"ModalRename",setup(o){const t=e.inject("ServiceContainer"),{t:n}=t.i18n,s=e.ref(t.modal.data.items[0]),r=e.ref(t.modal.data.items[0].basename),c=e.ref(""),l=()=>{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:n("%s is renamed.",r.value)})},onError:i=>{c.value=n(i.message)}})};return(i,a)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:l,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(n)("Rename")),1),e.createElementVNode("button",{type:"button",onClick:a[2]||(a[2]=d=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(n)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",fl,[pl,e.createElementVNode("div",hl,[e.createElementVNode("h3",vl,e.toDisplayString(e.unref(n)("Rename")),1),e.createElementVNode("div",gl,[e.createElementVNode("p",kl,[s.value.type==="dir"?(e.openBlock(),e.createElementBlock("svg",yl,_l)):(e.openBlock(),e.createElementBlock("svg",wl,El)),e.createElementVNode("span",Vl,e.toDisplayString(s.value.basename),1)]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=d=>r.value=d),onKeyup:e.withKeys(l,["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:a[1]||(a[1]=d=>c.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},Fe={ESCAPE:"Escape",F2:"F2",F5:"F5",DELETE:"Delete",BACKSLASH:"Backslash",KEY_A:"KeyA",KEY_E:"KeyE",KEY_F:"KeyF"};function Nl(o){const t=n=>{n.code===Fe.ESCAPE&&(o.modal.close(),o.root.focus()),!o.modal.visible&&(o.fs.searchMode||(n.code===Fe.F2&&o.features.includes(oe.RENAME)&&(o.dragSelect.getCount()!==1||o.modal.open(To,{items:o.dragSelect.getSelected()})),n.code===Fe.F5&&o.emitter.emit("vf-fetch",{params:{q:"index",adapter:o.fs.adapter,path:o.fs.data.dirname}}),n.code===Fe.DELETE&&(!o.dragSelect.getCount()||o.modal.open(Do,{items:o.dragSelect.getSelected()})),n.metaKey&&n.code===Fe.BACKSLASH&&o.modal.open(Jn),n.metaKey&&n.code===Fe.KEY_F&&o.features.includes(oe.SEARCH)&&(o.fs.searchMode=!0,n.preventDefault()),n.metaKey&&n.code===Fe.KEY_E&&(o.showTreeView=!o.showTreeView,o.storage.setStore("show-tree-view",o.showTreeView)),n.metaKey&&n.code===Fe.KEY_A&&(o.dragSelect.selectAll(),n.preventDefault())))};e.onMounted(()=>{o.root.addEventListener("keydown",t)}),e.onUnmounted(()=>{o.root.removeEventListener("keydown",t)})}const Sl={class:"sm:flex sm:items-start"},$l=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),Bl={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Cl={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Dl={class:"mt-2"},Tl={class:"text-sm text-gray-500"},Ml=["placeholder"],Qn={__name:"ModalNewFolder",setup(o){const t=e.inject("ServiceContainer");t.storage;const{t:n}=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:n("%s is created.",s.value)})},onError:l=>{r.value=n(l.message)}})};return(l,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(n)("Create")),1),e.createElementVNode("button",{type:"button",onClick:i[2]||(i[2]=a=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(n)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Sl,[$l,e.createElementVNode("div",Bl,[e.createElementVNode("h3",Cl,e.toDisplayString(e.unref(n)("New Folder")),1),e.createElementVNode("div",Dl,[e.createElementVNode("p",Tl,e.toDisplayString(e.unref(n)("Create a new folder")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=a=>s.value=a),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(n)("Folder Name"),type:"text"},null,40,Ml),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:i[1]||(i[1]=a=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},Al={class:"sm:flex sm:items-start"},Ll=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),Ol={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Fl={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Hl={class:"mt-2"},Rl={class:"text-sm text-gray-500"},zl=["placeholder"],jl={__name:"ModalNewFile",setup(o){const t=e.inject("ServiceContainer");t.storage;const{t:n}=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:n("%s is created.",s.value)})},onError:l=>{r.value=n(l.message)}})};return(l,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(n)("Create")),1),e.createElementVNode("button",{type:"button",onClick:i[2]||(i[2]=a=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(n)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Al,[Ll,e.createElementVNode("div",Ol,[e.createElementVNode("h3",Fl,e.toDisplayString(e.unref(n)("New File")),1),e.createElementVNode("div",Hl,[e.createElementVNode("p",Rl,e.toDisplayString(e.unref(n)("Create a new file")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=a=>s.value=a),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(n)("File Name"),type:"text"},null,40,zl),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:i[1]||(i[1]=a=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}};function vo(o,t=14){let n=`((?=([\\w\\W]{0,${t}}))([\\w\\W]{${t+1},})([\\w\\W]{8,}))`;return o.replace(new RegExp(n),"$2..$4")}const Il={class:"sm:flex sm:items-start"},Ul=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),Pl={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},ql={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Gl={class:"mt-2"},Kl={key:0,class:"pointer-events-none"},Wl={key:1,class:"pointer-events-none"},Yl=["disabled"],Xl=["disabled"],Jl={class:"text-gray-500 text-sm mb-1 pr-1 max-h-[200px] overflow-y-auto vf-scrollbar"},Ql={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"},Zl=["textContent"],ec={class:"ml-1 w-full h-fit"},tc={class:"text-left hidden md:block"},oc={class:"text-left md:hidden"},nc={key:0,class:"ml-auto"},rc=["title","disabled","onClick"],sc=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),ac=[sc],lc={key:0,class:"py-2"},cc=["disabled"],ic={__name:"ModalUpload",setup(o){const t=e.inject("ServiceContainer"),{t:n}=t.i18n,s=n("uppy"),r={PENDING:0,CANCELED:1,UPLOADING:2,ERROR:3,DONE:10},c=e.ref({QUEUE_ENTRY_STATUS:r}),l=e.ref(null),i=e.ref(null),a=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 E(B){return p.value.findIndex(x=>x.id===B)}function y(B,x=null){x=x??(B.webkitRelativePath||B.name),v.addFile({name:x,type:B.type,data:B,source:"Local"})}function O(B){switch(B.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 C=B=>{switch(B.status){case r.DONE:return"✓";case r.ERROR:case r.CANCELED:return"!";case r.PENDING:default:return"..."}};function V(){d.value.click()}function S(){if(!h.value){if(!p.value.filter(B=>B.status!==r.DONE).length){f.value=n("Please select file to upload first.");return}f.value="",v.retryAll(),v.upload()}}function D(){v.cancelAll({reason:"user"}),p.value.forEach(B=>{B.status!==r.DONE&&(B.status=r.CANCELED,B.statusName=n("Canceled"))}),h.value=!1}function N(B){h.value||(v.removeFile(B.id,"removed-by-user"),p.value.splice(E(B.id),1))}function $(B){if(!h.value){if(v.cancelAll({reason:"user"}),B){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 b(){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 pr({debug:t.debug,restrictions:{maxFileSize:Vr(t.maxFileSize)},locale:s,onBeforeFileAdded(k,A){if(A[k.id]!=null){const K=E(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:n("Pending upload"),percent:null,originalFile:k.data}),!0}}),v.use(hr,{endpoint:"WILL_BE_REPLACED_BEFORE_UPLOAD",limit:5,timeout:0,getResponseError(k,A){let T;try{T=JSON.parse(k).message}catch{T=n("Cannot parse server response.")}return new Error(T)}}),v.on("restriction-failed",(k,A)=>{const T=p.value[E(k.id)];N(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=n("Pending upload"))})}),v.on("upload-progress",(k,A)=>{const T=Math.floor(A.bytesUploaded/A.bytesTotal*100);p.value[E(k.id)].percent=`${T}%`}),v.on("upload-success",k=>{const A=p.value[E(k.id)];A.status=r.DONE,A.statusName=n("Done")}),v.on("upload-error",(k,A)=>{const T=p.value[E(k.id)];T.percent=null,T.status=r.ERROR,A.isNetworkError?T.statusName=n("Network Error, Unable establish connection to the server or interrupted."):T.statusName=A?A.message:n("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",()=>{a.value.click()}),u.value.addEventListener("dragover",k=>{k.preventDefault(),g.value=!0}),u.value.addEventListener("dragleave",k=>{k.preventDefault(),g.value=!1});function B(k,A){A.isFile&&A.file(T=>k(A,T)),A.isDirectory&&A.createReader().readEntries(T=>{T.forEach(K=>{B(k,K)})})}u.value.addEventListener("drop",k=>{k.preventDefault(),g.value=!1;const A=/^[/\\](.+)/;[...k.dataTransfer.items].forEach(T=>{T.kind==="file"&&B((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),a.value.addEventListener("change",x)}),e.onBeforeUnmount(()=>{v==null||v.close({reason:"unmount"})}),(B,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(n)("Upload")),11,cc),h.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"vf-btn vf-btn-secondary",onClick:e.withModifiers(D,["prevent"])},e.toDisplayString(e.unref(n)("Cancel")),1)):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"vf-btn vf-btn-secondary",onClick:e.withModifiers(b,["prevent"])},e.toDisplayString(e.unref(n)("Close")),1))]),default:e.withCtx(()=>[e.createElementVNode("div",Il,[Ul,e.createElementVNode("div",Pl,[e.createElementVNode("h3",ql,e.toDisplayString(e.unref(n)("Upload Files")),1),e.createElementVNode("div",Gl,[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:V},[g.value?(e.openBlock(),e.createElementBlock("div",Kl,e.toDisplayString(e.unref(n)("Release to drop these files.")),1)):(e.openBlock(),e.createElementBlock("div",Wl,e.toDisplayString(e.unref(n)("Drag and drop the files/folders to here or click here.")),1))],512),e.createElementVNode("div",{ref_key:"container",ref:l,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(n)("Select Files")),513),e.createElementVNode("button",{ref_key:"pickFolders",ref:m,type:"button",class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(n)("Select Folders")),513),e.createElementVNode("button",{type:"button",class:"vf-btn vf-btn-secondary",disabled:h.value,onClick:x[0]||(x[0]=k=>$(!1))},e.toDisplayString(e.unref(n)("Clear all")),9,Yl),e.createElementVNode("button",{type:"button",class:"vf-btn vf-btn-secondary",disabled:h.value,onClick:x[1]||(x[1]=k=>$(!0))},e.toDisplayString(e.unref(n)("Clear only successful")),9,Xl)],512),e.createElementVNode("div",Jl,[(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",Ql,[e.createElementVNode("span",{class:e.normalizeClass(["text-base m-auto",O(k)]),textContent:e.toDisplayString(C(k))},null,10,Zl)]),e.createElementVNode("div",ec,[e.createElementVNode("div",tc,e.toDisplayString(e.unref(vo)(k.name,40))+" ("+e.toDisplayString(k.size)+")",1),e.createElementVNode("div",oc,e.toDisplayString(e.unref(vo)(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",nc,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(n)("Delete"),disabled:h.value,onClick:A=>N(k)},ac,10,rc)]))),128)),p.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",lc,e.toDisplayString(e.unref(n)("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:a,type:"file",multiple:"",webkitdirectory:"",class:"hidden"},null,512)]),_:1}))}},dc={class:"sm:flex sm:items-start"},uc=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),mc={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},fc={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},pc={class:"mt-2"},hc={class:"flex text-sm text-gray-800 dark:text-gray-400"},vc={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"},gc=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),kc=[gc],yc={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"},xc=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),_c=[xc],wc={class:"ml-1.5"},bc={class:"my-1 text-sm text-gray-500"},Zn={__name:"ModalUnarchive",setup(o){const t=e.inject("ServiceContainer"),{t:n}=t.i18n,s=e.ref(t.modal.data.items[0]),r=e.ref(""),c=e.ref([]),l=()=>{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:n("The file unarchived.")})},onError:i=>{r.value=n(i.message)}})};return(i,a)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:l,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(n)("Unarchive")),1),e.createElementVNode("button",{type:"button",onClick:a[1]||(a[1]=d=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(n)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",dc,[uc,e.createElementVNode("div",mc,[e.createElementVNode("h3",fc,e.toDisplayString(e.unref(n)("Unarchive")),1),e.createElementVNode("div",pc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,d=>(e.openBlock(),e.createElementBlock("p",hc,[d.type==="dir"?(e.openBlock(),e.createElementBlock("svg",vc,kc)):(e.openBlock(),e.createElementBlock("svg",yc,_c)),e.createElementVNode("span",wc,e.toDisplayString(d.basename),1)]))),256)),e.createElementVNode("p",bc,e.toDisplayString(e.unref(n)("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:a[0]||(a[0]=d=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},Ec={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.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),Nc={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Sc={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},$c={class:"mt-2"},Bc={class:"text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",style:{"max-height":"200px"}},Cc={class:"flex text-sm text-gray-800 dark:text-gray-400"},Dc={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"},Tc=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),Mc=[Tc],Ac={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"},Lc=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),Oc=[Lc],Fc={class:"ml-1.5"},Hc=["placeholder"],er={__name:"ModalArchive",setup(o){const t=e.inject("ServiceContainer"),{t:n}=t.i18n,s=e.ref(""),r=e.ref(""),c=e.ref(t.modal.data.items),l=()=>{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:a})=>({path:i,type:a})),name:s.value},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:n("The file(s) archived.")})},onError:i=>{r.value=n(i.message)}})};return(i,a)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:l,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(n)("Archive")),1),e.createElementVNode("button",{type:"button",onClick:a[2]||(a[2]=d=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(n)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Ec,[Vc,e.createElementVNode("div",Nc,[e.createElementVNode("h3",Sc,e.toDisplayString(e.unref(n)("Archive the files")),1),e.createElementVNode("div",$c,[e.createElementVNode("div",Bc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,d=>(e.openBlock(),e.createElementBlock("p",Cc,[d.type==="dir"?(e.openBlock(),e.createElementBlock("svg",Dc,Mc)):(e.openBlock(),e.createElementBlock("svg",Ac,Oc)),e.createElementVNode("span",Fc,e.toDisplayString(d.basename),1)]))),256))]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=d=>s.value=d),onKeyup:e.withKeys(l,["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(n)("Archive name. (.zip file will be created)"),type:"text"},null,40,Hc),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:a[1]||(a[1]=d=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},Rc={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"},zc=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),jc=[zc];function Ic(o,t){return e.openBlock(),e.createElementBlock("svg",Rc,[...jc])}const Uc={render:Ic},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:"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),Gc=[qc];function Kc(o,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",viewBox:"0 0 24 24"},Xc=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),Jc=[Xc];function Qc(o,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:"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),oi=[ti];function ni(o,t){return e.openBlock(),e.createElementBlock("svg",ei,[...oi])}const ri={render:ni},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 vf-toolbar-icon",viewBox:"0 0 24 24"},ai=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),li=[ai];function ci(o,t){return e.openBlock(),e.createElementBlock("svg",si,[...li])}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",viewBox:"0 0 24 24"},ui=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),mi=[ui];function fi(o,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.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),gi=[vi];function ki(o,t){return e.openBlock(),e.createElementBlock("svg",hi,[...gi])}const yi={render:ki},xi={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"},_i=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),wi=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),bi=[_i,wi];function Ei(o,t){return e.openBlock(),e.createElementBlock("svg",xi,[...bi])}const Mo={render:Ei},Vi={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"},Ni=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),Si=[Ni];function $i(o,t){return e.openBlock(),e.createElementBlock("svg",Vi,[...Si])}const Bi={render:$i},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:"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),Ti=[Di];function Mi(o,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",viewBox:"0 0 24 24"},Oi=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),Fi=[Oi];function Hi(o,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 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),Ii=[ji];function Ui(o,t){return e.openBlock(),e.createElementBlock("svg",zi,[...Ii])}const Pi={render:Ui},qi={class:"border-neutral-300 flex justify-between items-center py-1 text-sm grow-0"},Gi={key:0,class:"flex text-center"},Ki=["aria-label"],Wi=["aria-label"],Yi=["aria-label"],Xi=["aria-label"],Ji=["aria-label"],Qi=["aria-label"],Zi=["aria-label"],ed={key:1,class:"flex text-center"},td={class:"pl-2"},od={class:"dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded"},nd={class:"flex text-center items-center justify-end"},rd=["aria-label"],sd=["aria-label"],ad={__name:"Toolbar",setup(o){const t=e.inject("ServiceContainer"),{setStore:n}=t.storage,{t:s}=t.i18n,r=t.dragSelect,c=e.ref("");t.emitter.on("vf-search-query",({newQuery:a})=>{c.value=a});const l=()=>{t.fullScreen=!t.fullScreen,t.fullScreen?document.querySelector("body").style.overflow="hidden":document.querySelector("body").style.overflow="",n("full-screen",t.fullScreen),t.emitter.emit("vf-fullscreen-toggle")},i=()=>{t.view=t.view==="list"?"grid":"list",r.refreshSelection(),n("viewport",t.view)};return(a,d)=>(e.openBlock(),e.createElementBlock("div",qi,[c.value.length?(e.openBlock(),e.createElementBlock("div",ed,[e.createElementVNode("div",td,[e.createTextVNode(e.toDisplayString(e.unref(s)("Search results for"))+" ",1),e.createElementVNode("span",od,e.toDisplayString(c.value),1)]),e.unref(t).fs.loading?(e.openBlock(),e.createBlock(e.unref(Mo),{key:0})):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Gi,[e.unref(t).features.includes(e.unref(oe).NEW_FOLDER)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mx-1.5","aria-label":e.unref(s)("New Folder"),"data-microtip-position":"bottom-right",role:"tooltip",onClick:d[0]||(d[0]=m=>e.unref(t).modal.open(Qn,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(Uc))],8,Ki)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(oe).NEW_FILE)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"mx-1.5","aria-label":e.unref(s)("New File"),"data-microtip-position":"bottom",role:"tooltip",onClick:d[1]||(d[1]=m=>e.unref(t).modal.open(jl,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(Wc))],8,Wi)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(oe).RENAME)?(e.openBlock(),e.createElementBlock("div",{key:2,class:"mx-1.5","aria-label":e.unref(s)("Rename"),"data-microtip-position":"bottom",role:"tooltip",onClick:d[2]||(d[2]=m=>e.unref(r).getCount()!==1||e.unref(t).modal.open(To,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(Zc),{class:e.normalizeClass(e.unref(r).getCount()===1?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Yi)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(oe).DELETE)?(e.openBlock(),e.createElementBlock("div",{key:3,class:"mx-1.5","aria-label":e.unref(s)("Delete"),"data-microtip-position":"bottom",role:"tooltip",onClick:d[3]||(d[3]=m=>!e.unref(r).getCount()||e.unref(t).modal.open(Do,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(ri),{class:e.normalizeClass(e.unref(r).getCount()?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Xi)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(oe).UPLOAD)?(e.openBlock(),e.createElementBlock("div",{key:4,class:"mx-1.5","aria-label":e.unref(s)("Upload"),"data-microtip-position":"bottom",role:"tooltip",onClick:d[4]||(d[4]=m=>e.unref(t).modal.open(ic,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(ii))],8,Ji)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(oe).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","aria-label":e.unref(s)("Unarchive"),"data-microtip-position":"bottom",role:"tooltip",onClick:d[5]||(d[5]=m=>!e.unref(r).getCount()||e.unref(t).modal.open(Zn,{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,Qi)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(oe).ARCHIVE)?(e.openBlock(),e.createElementBlock("div",{key:6,class:"mx-1.5","aria-label":e.unref(s)("Archive"),"data-microtip-position":"bottom",role:"tooltip",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(pi),{class:e.normalizeClass(e.unref(r).getCount()?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Zi)):e.createCommentVNode("",!0)])),e.createElementVNode("div",nd,[e.unref(t).features.includes(e.unref(oe).FULL_SCREEN)?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:l,class:"mx-1.5","aria-label":e.unref(s)("Toggle Full Screen"),"data-microtip-position":"bottom-left",role:"tooltip"},[e.unref(t).fullScreen?(e.openBlock(),e.createBlock(e.unref(Ai),{key:0})):(e.openBlock(),e.createBlock(e.unref(Bi),{key:1}))],8,rd)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(s)("Change View"),"data-microtip-position":"bottom-left",role:"tooltip",onClick:d[7]||(d[7]=m=>c.value.length||i())},[e.unref(t).view==="grid"?(e.openBlock(),e.createBlock(e.unref(Ri),{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(Pi),{key:1,class:e.normalizeClass(c.value.length?"vf-toolbar-icon-disabled":"vf-toolbar-icon")},null,8,["class"])):e.createCommentVNode("",!0)],8,sd)])]))}},ld=(o,t=0,n=!1)=>{let s;return(...r)=>{n&&!s&&o(...r),clearTimeout(s),s=setTimeout(()=>{o(...r)},t)}},an=(o,t,n)=>{const s=e.ref(o);return e.customRef((r,c)=>({get(){return r(),s.value},set:ld(l=>{s.value=l,c()},t,n)}))},cd={class:"sm:flex sm:items-start"},id=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),dd={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},ud={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},md={class:"text-sm text-gray-500 pb-1"},fd={class:"max-h-[200px] overflow-y-auto vf-scrollbar text-left"},pd={class:"flex text-sm text-gray-800 dark:text-gray-400"},hd={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"},vd=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),gd=[vd],kd={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"},yd=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),xd=[yd],_d={class:"ml-1.5"},wd={class:"font-bold text-xs text-gray-700 dark:text-gray-500 mt-3 tracking-wider"},bd={class:"flex text-sm text-gray-800 dark:text-gray-400 border dark:border-gray-700 p-1 rounded"},Ed=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),Vd={class:"ml-1.5 overflow-auto"},Nd={class:"m-1 mr-auto font-bold text-gray-500 text-sm dark:text-gray-200 self-center"},go={__name:"ModalMove",setup(o){const t=e.inject("ServiceContainer"),{t:n}=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:l,type:i})=>({path:l,type:i})),item:t.modal.data.items.to.path},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:n("Files moved.",t.modal.data.items.to.name)})},onError:l=>{r.value=n(l.message)}})};return(l,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(n)("Yes, Move!")),1),e.createElementVNode("button",{type:"button",onClick:i[1]||(i[1]=a=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(n)("Cancel")),1),e.createElementVNode("div",Nd,e.toDisplayString(e.unref(n)("%s item(s) selected.",s.value.length)),1)]),default:e.withCtx(()=>[e.createElementVNode("div",cd,[id,e.createElementVNode("div",dd,[e.createElementVNode("h3",ud,e.toDisplayString(e.unref(n)("Move files")),1),e.createElementVNode("p",md,e.toDisplayString(e.unref(n)("Are you sure you want to move these files?")),1),e.createElementVNode("div",fd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,a=>(e.openBlock(),e.createElementBlock("div",pd,[e.createElementVNode("div",null,[a.type==="dir"?(e.openBlock(),e.createElementBlock("svg",hd,gd)):(e.openBlock(),e.createElementBlock("svg",kd,xd))]),e.createElementVNode("div",_d,e.toDisplayString(a.path),1)]))),256))]),e.createElementVNode("h4",wd,e.toDisplayString(e.unref(n)("Target Directory")),1),e.createElementVNode("p",bd,[Ed,e.createElementVNode("span",Vd,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]=a=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])]),_:1}))}},Sd={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"},$d=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),Bd=[$d];function Cd(o,t){return e.openBlock(),e.createElementBlock("svg",Sd,[...Bd])}const Dd={render:Cd},Td={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-0.5 rounded",viewBox:"0 0 20 20"},Md=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),Ad=[Md];function Ld(o,t){return e.openBlock(),e.createElementBlock("svg",Td,[...Ad])}const Od={render:Ld},Fd={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"},Hd=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1),Rd=[Hd];function zd(o,t){return e.openBlock(),e.createElementBlock("svg",Fd,[...Rd])}const jd={render:zd},Id={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"},Ud=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),Pd=[Ud];function qd(o,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 m-auto stroke-gray-400 fill-gray-100 dark:stroke-gray-400 dark:fill-gray-400/20",viewBox:"0 0 20 20"},Wd=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),Yd=[Wd];function Xd(o,t){return e.openBlock(),e.createElementBlock("svg",Kd,[...Yd])}const Jd={render:Xd},Qd={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"},Zd=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1),eu=[Zd];function tu(o,t){return e.openBlock(),e.createElementBlock("svg",Qd,[...eu])}const ou={render:tu},nu={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"},ru=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),su=[ru];function au(o,t){return e.openBlock(),e.createElementBlock("svg",nu,[...su])}const zt={render:au},lu={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"},cu=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),iu=e.createElementVNode("path",{d:"M9 6h11M12 12h8M15 18h5M5 6v.01M8 12v.01M11 18v.01"},null,-1),du=[cu,iu];function uu(o,t){return e.openBlock(),e.createElementBlock("svg",lu,[...du])}const mu={render:uu},fu={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"},pu=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),hu=[pu];function vu(o,t){return e.openBlock(),e.createElementBlock("svg",fu,[...hu])}const gu={render:vu},ku={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"},yu=["aria-label"],xu=["aria-label"],_u=["aria-label"],wu=["aria-label"],bu={class:"flex leading-6"},Eu={key:0,class:"flex"},Vu=e.createElementVNode("div",{class:"text-neutral-300 dark:text-gray-600 mx-0.5"},"/",-1),Nu={class:"relative"},Su=e.createElementVNode("span",{class:"text-neutral-300 dark:text-gray-600 mx-0.5"},"/",-1),$u=["onDragover","onDragleave","onDrop","title","onClick"],Bu={class:"relative flex bg-white dark:bg-gray-700 justify-between items-center rounded p-1 ml-2 w-full"},Cu=["placeholder"],Du={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"},Tu=["onDrop","onClick"],Mu={class:"flex pointer-events-none"},Au={class:"inline-block w-full text-ellipsis overflow-hidden"},Lu={__name:"Breadcrumb",setup(o){const t=e.inject("ServiceContainer"),{t:n}=t.i18n,s=t.dragSelect,{setStore:r}=t.storage,c=e.ref(null),l=an(0,100);e.watch(l,D=>{const N=c.value.children;let $=0,b=0,_=5,B=1;t.fs.limitBreadcrumbItems(_),e.nextTick(()=>{for(let x=N.length-1;x>=0&&!($+N[x].offsetWidth>l.value-40);x--)$+=parseInt(N[x].offsetWidth,10),b++;b_&&(b=_),t.fs.limitBreadcrumbItems(b)})});const i=()=>{l.value=c.value.offsetWidth};e.onMounted(()=>{new ResizeObserver(i).observe(c.value)});const a=(D,N=null)=>{D.preventDefault(),s.isDraggingRef.value=!1,u(D),N??(N=t.fs.hiddenBreadcrumbs.length-1);let $=JSON.parse(D.dataTransfer.getData("items"));if($.find(b=>b.storage!==t.fs.adapter)){alert("Moving items between different storages is not supported yet.");return}t.modal.open(go,{items:{from:$,to:t.fs.hiddenBreadcrumbs[N]??{path:t.fs.adapter+"://"}}})},d=(D,N=null)=>{D.preventDefault(),s.isDraggingRef.value=!1,u(D),N??(N=t.fs.breadcrumbs.length-2);let $=JSON.parse(D.dataTransfer.getData("items"));if($.find(b=>b.storage!==t.fs.adapter)){alert("Moving items between different storages is not supported yet.");return}t.modal.open(go,{items:{from:$,to:t.fs.breadcrumbs[N]??{path:t.fs.adapter+"://"}}})},m=D=>{D.preventDefault(),t.fs.isGoUpAvailable()?(D.dataTransfer.dropEffect="copy",D.currentTarget.classList.add("bg-blue-200","dark:bg-slate-600")):(D.dataTransfer.dropEffect="none",D.dataTransfer.effectAllowed="none")},u=D=>{D.preventDefault(),D.currentTarget.classList.remove("bg-blue-200","dark:bg-slate-600"),t.fs.isGoUpAvailable()&&D.currentTarget.classList.remove("bg-blue-200","dark:bg-slate-600")},p=()=>{V(),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname}})},f=()=>{V(),!t.fs.isGoUpAvailable()||t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.parentFolderPath}})},h=D=>{t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:D.path}}),t.fs.toggleHiddenBreadcrumbs(!1)},g=()=>{t.fs.showHiddenBreadcrumbs&&t.fs.toggleHiddenBreadcrumbs(!1)},v={mounted(D,N,$,b){D.clickOutsideEvent=function(_){D===_.target||D.contains(_.target)||N.value()},document.body.addEventListener("click",D.clickOutsideEvent)},beforeUnmount(D,N,$,b){document.body.removeEventListener("click",D.clickOutsideEvent)}},E=()=>{t.showTreeView=!t.showTreeView,r("show-tree-view",t.showTreeView)},y=e.ref(null),O=()=>{t.features.includes(oe.SEARCH)&&(t.fs.searchMode=!0,e.nextTick(()=>y.value.focus()))},C=an("",400);e.watch(C,D=>{t.emitter.emit("vf-toast-clear"),t.emitter.emit("vf-search-query",{newQuery:D})}),e.watch(()=>t.fs.searchMode,D=>{D&&e.nextTick(()=>y.value.focus())});const V=()=>{t.fs.searchMode=!1,C.value=""};t.emitter.on("vf-search-exit",()=>{V()});const S=()=>{C.value===""&&V()};return(D,N)=>(e.openBlock(),e.createElementBlock("div",ku,[e.createElementVNode("span",{"aria-label":e.unref(n)("Toggle Tree View"),"data-microtip-position":"bottom-right",role:"tooltip"},[e.createVNode(e.unref(mu),{onClick:E,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,yu),e.createElementVNode("span",{"aria-label":e.unref(n)("Go up a directory"),"data-microtip-position":"bottom-right",role:"tooltip"},[e.createVNode(e.unref(Od),{onDragover:N[0]||(N[0]=$=>m($)),onDragleave:N[1]||(N[1]=$=>u($)),onDrop:N[2]||(N[2]=$=>d($)),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,xu),e.unref(t).fs.loading?(e.openBlock(),e.createElementBlock("span",{key:1,"aria-label":e.unref(n)("Cancel"),"data-microtip-position":"bottom-right",role:"tooltip"},[e.createVNode(e.unref(jd),{onClick:N[3]||(N[3]=$=>e.unref(t).emitter.emit("vf-fetch-abort"))})],8,wu)):(e.openBlock(),e.createElementBlock("span",{key:0,"aria-label":e.unref(n)("Refresh"),"data-microtip-position":"bottom-right",role:"tooltip"},[e.createVNode(e.unref(Dd),{onClick:p})],8,_u)),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(Gd),{onDragover:N[4]||(N[4]=$=>m($)),onDragleave:N[5]||(N[5]=$=>u($)),onDrop:N[6]||(N[6]=$=>d($,-1)),onClick:N[7]||(N[7]=$=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:e.unref(t).fs.adapter}}))})]),e.createElementVNode("div",bu,[e.unref(t).fs.hiddenBreadcrumbs.length?e.withDirectives((e.openBlock(),e.createElementBlock("div",Eu,[Vu,e.createElementVNode("div",Nu,[e.createElementVNode("span",{onDragenter:N[8]||(N[8]=$=>e.unref(t).fs.toggleHiddenBreadcrumbs(!0)),onClick:N[9]||(N[9]=$=>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(gu),{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.openBlock(),e.createElementBlock("div",{key:b},[Su,e.createElementVNode("span",{onDragover:_=>b===e.unref(t).fs.breadcrumbs.length-1||m(_),onDragleave:_=>b===e.unref(t).fs.breadcrumbs.length-1||u(_),onDrop:_=>b===e.unref(t).fs.breadcrumbs.length-1||d(_,b),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:$.basename,onClick:_=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:e.unref(t).fs.adapter,path:$.path}})},e.toDisplayString($.name),41,$u)]))),128))],512),e.unref(t).fs.loading?(e.openBlock(),e.createBlock(e.unref(Mo),{key:0})):e.createCommentVNode("",!0)],512),[[e.vShow,!e.unref(t).fs.searchMode]]),e.withDirectives(e.createElementVNode("div",Bu,[e.createElementVNode("div",null,[e.createVNode(e.unref(Jd))]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:y,onKeydown:e.withKeys(V,["esc"]),onBlur:S,"onUpdate:modelValue":N[10]||(N[10]=$=>e.isRef(C)?C.value=$:null),placeholder:e.unref(n)("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,Cu),[[e.vModelText,e.unref(C)]]),e.createVNode(e.unref(ou),{onClick:V})],512),[[e.vShow,e.unref(t).fs.searchMode]]),e.withDirectives(e.createElementVNode("div",Du,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.hiddenBreadcrumbs,($,b)=>(e.openBlock(),e.createElementBlock("div",{key:b,onDragover:N[11]||(N[11]=_=>m(_)),onDragleave:N[12]||(N[12]=_=>u(_)),onDrop:_=>a(_,b),onClick:_=>h($),class:"px-2 py-0.5 hover:bg-gray-400/20 cursor-pointer items-center whitespace-nowrap"},[e.createElementVNode("div",Mu,[e.createElementVNode("span",null,[e.createVNode(e.unref(zt),{class:"h-5 w-5"})]),e.createTextVNode(),e.createElementVNode("span",Au,e.toDisplayString($.name),1)])],40,Tu))),128))],512),[[e.vShow,e.unref(t).fs.showHiddenBreadcrumbs]])]))}},tr=(o,t=null)=>new Date(o*1e3).toLocaleString(t??navigator.language??"en-US"),Ou=["onClick"],Fu={__name:"Toast",setup(o){const t=e.inject("ServiceContainer"),{getStore:n}=t.storage,s=e.ref(n("full-screen",!1)),r=e.ref([]),c=a=>a==="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",l=a=>{r.value.splice(a,1)},i=a=>{let d=r.value.findIndex(m=>m.id===a);d!==-1&&l(d)};return t.emitter.on("vf-toast-clear",()=>{r.value=[]}),t.emitter.on("vf-toast-push",a=>{let d=new Date().getTime().toString(36).concat(performance.now().toString(),Math.random().toString()).replace(/\./g,"");a.id=d,r.value.push(a),setTimeout(()=>{i(d)},5e3)}),(a,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=>l(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,Ou))),128))]),_:1})],2))}},Hu={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 20 20"},Ru=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),zu=[Ru];function ju(o,t){return e.openBlock(),e.createElementBlock("svg",Hu,[...zu])}const Iu={render:ju},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:"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),qu=[Pu];function Gu(o,t){return e.openBlock(),e.createElementBlock("svg",Uu,[...qu])}const Ku={render:Gu},_t={__name:"SortIcon",props:{direction:String},setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("div",null,[o.direction==="asc"?(e.openBlock(),e.createBlock(e.unref(Iu),{key:0})):e.createCommentVNode("",!0),o.direction==="desc"?(e.openBlock(),e.createBlock(e.unref(Ku),{key:1})):e.createCommentVNode("",!0)]))}},Wu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"text-neutral-500",viewBox:"0 0 24 24"},Yu=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),Xu=[Yu];function Ju(o,t){return e.openBlock(),e.createElementBlock("svg",Wu,[...Xu])}const Qu={render:Ju},Xt={__name:"ItemIcon",props:{type:{type:String,required:!0},small:{type:Boolean,default:!1}},setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("span",null,[o.type==="dir"?(e.openBlock(),e.createBlock(e.unref(zt),{key:0,class:e.normalizeClass({"h-5 w-5":o.small,"h-10 w-10 md:h-12 md:w-12 m-auto":!o.small})},null,8,["class"])):(e.openBlock(),e.createBlock(e.unref(Qu),{key:1,class:e.normalizeClass({"h-5 w-5":o.small,"h-10 w-10 md:h-12 md:w-12 m-auto":!o.small})},null,8,["class"]))]))}},Zu={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"},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 om(o,t){return e.openBlock(),e.createElementBlock("svg",Zu,[...tm])}const nm={render:om},rm={class:"absolute -z-50 -top-96"},sm={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"},am={__name:"DragItem",props:{count:{type:Number,default:0}},setup(o){const t=o;return(n,s)=>(e.openBlock(),e.createElementBlock("div",rm,[e.createVNode(e.unref(nm)),e.createElementVNode("div",sm,e.toDisplayString(t.count),1)]))}},lm={class:"flex"},cm=["aria-label"],im={class:"ml-auto mb-2"},dm={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"},um={key:1},mm={__name:"Text",emits:["success"],setup(o,{emit:t}){const n=t,s=e.ref(""),r=e.ref(""),c=e.ref(null),l=e.ref(!1),i=e.ref(""),a=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,n("success")})});const u=()=>{l.value=!l.value,r.value=s.value},p=()=>{i.value="",a.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,n("success"),l.value=!l.value}).catch(f=>{i.value=m(f.message),a.value=!0})};return(f,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",lm,[e.createElementVNode("div",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":e.unref(d).modal.data.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(e.unref(d).modal.data.item.basename),9,cm),e.createElementVNode("div",im,[l.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(oe).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(l.value?e.unref(m)("Cancel"):e.unref(m)("Edit")),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[l.value?(e.openBlock(),e.createElementBlock("div",um,[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",dm,e.toDisplayString(s.value),1)),i.value.length?(e.openBlock(),e.createBlock(De,{key:2,onHidden:h[2]||(h[2]=g=>i.value=""),error:a.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)])],64))}},fm={class:"flex"},pm=["aria-label"],hm={class:"ml-auto mb-2"},vm={class:"w-full flex justify-center"},gm=["src"],km={__name:"Image",emits:["success"],setup(o,{emit:t}){const n=t,s=e.inject("ServiceContainer"),{t:r}=s.i18n,c=e.ref(null),l=e.ref(null),i=e.ref(!1),a=e.ref(""),d=e.ref(!1),m=()=>{i.value=!i.value,i.value?l.value=new gr(c.value,{crop(p){}}):l.value.destroy()},u=()=>{l.value.getCroppedCanvas({width:795,height:341}).toBlob(p=>{a.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=>{a.value=r("Updated."),c.value.src=s.requester.getPreviewUrl(s.modal.data.adapter,s.modal.data.item),m(),n("success")}).catch(h=>{a.value=r(h.message),d.value=!0})})};return e.onMounted(()=>{n("success")}),(p,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",fm,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":e.unref(s).modal.data.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(e.unref(s).modal.data.item.basename),9,pm),e.createElementVNode("div",hm,[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(oe).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",vm,[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,gm)]),a.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:f[1]||(f[1]=h=>a.value=""),error:d.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)],64))}},ym={class:"flex"},xm=["aria-label"],_m=e.createElementVNode("div",null,null,-1),wm={__name:"Default",emits:["success"],setup(o,{emit:t}){const n=e.inject("ServiceContainer"),s=t;return e.onMounted(()=>{s("success")}),(r,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",ym,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":e.unref(n).modal.data.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(e.unref(n).modal.data.item.basename),9,xm)]),_m],64))}},bm=["aria-label"],Em={class:"w-full aspect-video",preload:"",controls:""},Vm=["src"],Nm={__name:"Video",emits:["success"],setup(o,{emit:t}){const n=e.inject("ServiceContainer"),s=t,r=()=>n.requester.getPreviewUrl(n.modal.data.adapter,n.modal.data.item);return e.onMounted(()=>{s("success")}),(c,l)=>(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","aria-label":e.unref(n).modal.data.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(e.unref(n).modal.data.item.basename),9,bm),e.createElementVNode("div",null,[e.createElementVNode("video",Em,[e.createElementVNode("source",{src:r(),type:"video/mp4"},null,8,Vm),e.createTextVNode(" Your browser does not support the video tag. ")])])]))}},Sm=["aria-label"],$m={class:"w-full",controls:""},Bm=["src"],Cm={__name:"Audio",emits:["success"],setup(o,{emit:t}){const n=t,s=e.inject("ServiceContainer"),r=()=>s.requester.getPreviewUrl(s.modal.data.adapter,s.modal.data.item);return e.onMounted(()=>{n("success")}),(c,l)=>(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","aria-label":e.unref(s).modal.data.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(e.unref(s).modal.data.item.basename),9,Sm),e.createElementVNode("div",null,[e.createElementVNode("audio",$m,[e.createElementVNode("source",{src:r(),type:"audio/mpeg"},null,8,Bm),e.createTextVNode(" Your browser does not support the audio element. ")])])],64))}},Dm=["aria-label"],Tm=["data"],Mm=["src"],Am=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),Lm=[Am],Om={__name:"Pdf",emits:["success"],setup(o,{emit:t}){const n=e.inject("ServiceContainer"),s=t,r=()=>n.requester.getPreviewUrl(n.modal.data.adapter,n.modal.data.item);return e.onMounted(()=>{s("success")}),(c,l)=>(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","aria-label":e.unref(n).modal.data.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(e.unref(n).modal.data.item.basename),9,Dm),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%"},Lm,8,Mm)],8,Tm)])],64))}},Fm={class:"sm:flex sm:items-start"},Hm={class:"mt-3 text-center sm:mt-0 sm:text-left w-full"},Rm={key:0},zm={class:"text-gray-700 dark:text-gray-200 text-sm"},jm={key:0,class:"flex leading-5"},Im=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),Um={class:"py-2 flex font-normal break-all dark:text-gray-200 rounded text-xs"},Pm={class:"font-bold"},qm={class:"font-bold pl-2"},Gm={key:0,class:"text-xs text-gray-600 dark:text-gray-400"},Km=["download","href"],or={__name:"ModalPreview",setup(o){const t=e.inject("ServiceContainer"),{t:n}=t.i18n,s=e.ref(!1),r=l=>(t.modal.data.item.mime_type??"").startsWith(l),c=t.features.includes(oe.PREVIEW);return c||(s.value=!0),(l,i)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:i[6]||(i[6]=a=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(n)("Close")),1),e.unref(t).features.includes(e.unref(oe).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(n)("Download")),9,Km)):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createElementVNode("div",Fm,[e.createElementVNode("div",Hm,[e.unref(c)?(e.openBlock(),e.createElementBlock("div",Rm,[r("text")?(e.openBlock(),e.createBlock(mm,{key:0,onSuccess:i[0]||(i[0]=a=>s.value=!0)})):r("image")?(e.openBlock(),e.createBlock(km,{key:1,onSuccess:i[1]||(i[1]=a=>s.value=!0)})):r("video")?(e.openBlock(),e.createBlock(Nm,{key:2,onSuccess:i[2]||(i[2]=a=>s.value=!0)})):r("audio")?(e.openBlock(),e.createBlock(Cm,{key:3,onSuccess:i[3]||(i[3]=a=>s.value=!0)})):r("application/pdf")?(e.openBlock(),e.createBlock(Om,{key:4,onSuccess:i[4]||(i[4]=a=>s.value=!0)})):(e.openBlock(),e.createBlock(wm,{key:5,onSuccess:i[5]||(i[5]=a=>s.value=!0)}))])):e.createCommentVNode("",!0),e.createElementVNode("div",zm,[s.value===!1?(e.openBlock(),e.createElementBlock("div",jm,[Im,e.createElementVNode("span",null,e.toDisplayString(e.unref(n)("Loading")),1)])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",Um,[e.createElementVNode("div",null,[e.createElementVNode("span",Pm,e.toDisplayString(e.unref(n)("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",qm,e.toDisplayString(e.unref(n)("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(oe).DOWNLOAD)?(e.openBlock(),e.createElementBlock("div",Gm,[e.createElementVNode("span",null,e.toDisplayString(e.unref(n)(`Download doesn't work? You can try right-click "Download" button, select "Save link as...".`)),1)])):e.createCommentVNode("",!0)]),_:1}))}},Wm={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"},Ym=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),Xm=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),Jm=[Ym,Xm];function Qm(o,t){return e.openBlock(),e.createElementBlock("svg",Wm,[...Jm])}const nr={render:Qm},Zm=["data-type","data-item","data-index"],Jt={__name:"Item",props:{item:{type:Object},index:{type:Number},dragImage:{type:Object}},setup(o){const t=e.inject("ServiceContainer"),n=t.dragSelect,s=o,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(or,{adapter:t.fs.adapter,item:f})},c={mounted(f,h,g,v){g.props.draggable&&(f.addEventListener("dragstart",E=>l(E,h.value)),f.addEventListener("dragover",E=>a(E,h.value)),f.addEventListener("drop",E=>i(E,h.value)))},beforeUnmount(f,h,g,v){g.props.draggable&&(f.removeEventListener("dragstart",l),f.removeEventListener("dragover",a),f.removeEventListener("drop",i))}},l=(f,h)=>{if(f.altKey||f.ctrlKey||f.metaKey)return f.preventDefault(),!1;n.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(n.getSelected()))},i=(f,h)=>{f.preventDefault(),n.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(go,{items:{from:g,to:h}})},a=(f,h)=>{f.preventDefault(),!h||h.type!=="dir"||n.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(n).isDraggingRef.value&&e.unref(n).getSelection().find(g=>f.$el===g)?"0.5 !important":""}),class:e.normalizeClass(["vf-item-"+e.unref(n).explorerId,"relative"]),"data-type":o.item.type,key:o.item.path,"data-item":JSON.stringify(o.item),"data-index":o.index,onDblclick:h[0]||(h[0]=g=>r(o.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(n).getSelected(),target:o.item}),["prevent"]))},[e.renderSlot(f.$slots,"default"),e.unref(t).pinnedFolders.find(g=>g.path===o.item.path)?(e.openBlock(),e.createBlock(e.unref(nr),{key:0,class:"absolute top-0 right-0 text-amber-600"})):e.createCommentVNode("",!0)],46,Zm)),[[c,o.item]])}},e0={class:"relative flex-auto flex flex-col"},t0={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"},o0={class:"relative"},n0={class:"grid grid-cols-12 items-center"},r0={class:"flex col-span-7 items-center"},s0={class:"overflow-ellipsis overflow-hidden whitespace-nowrap"},a0={class:"col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap"},l0={class:"grid grid-cols-12 items-center"},c0={class:"flex col-span-7 items-center"},i0={class:"overflow-ellipsis overflow-hidden whitespace-nowrap"},d0={class:"col-span-2 text-center"},u0={class:"col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap px-1 md:px-3"},m0={class:"relative"},f0=["data-src","alt"],p0={key:2,class:"absolute hidden md:block top-1/2 w-full text-center text-neutral-500"},h0={class:"break-all"},v0={__name:"Explorer",setup(o){const t=e.inject("ServiceContainer"),{t:n}=t.i18n,s=u=>u==null?void 0:u.substring(0,3),r=e.ref(null),c=e.ref(""),l=t.dragSelect;let i;t.emitter.on("vf-fullscreen-toggle",()=>{l.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:n("No search result found.")})}}):t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname}})});const a=e.reactive({active:!1,column:"",order:""}),d=(u=!0)=>{let p=[...t.fs.data.files],f=a.column,h=a.order==="asc"?1:-1;if(!u)return p;const g=(v,E)=>typeof v=="string"&&typeof E=="string"?v.toLowerCase().localeCompare(E.toLowerCase()):vE?1:0;return a.active&&(p=p.slice().sort((v,E)=>g(v[f],E[f])*h)),p},m=u=>{a.active&&a.column===u?(a.active=a.order==="asc",a.column=u,a.order="desc"):(a.active=!0,a.column=u,a.order="asc")};return e.onMounted(()=>{i=new vr(l.area.value)}),e.onUpdated(()=>{i.update()}),e.onBeforeUnmount(()=>{i.destroy()}),(u,p)=>(e.openBlock(),e.createElementBlock("div",e0,[e.unref(t).view==="list"||c.value.length?(e.openBlock(),e.createElementBlock("div",t0,[e.createElementVNode("div",{onClick:p[0]||(p[0]=f=>m("basename")),class:"col-span-7 vf-sort-button"},[e.createTextVNode(e.toDisplayString(e.unref(n)("Name"))+" ",1),e.withDirectives(e.createVNode(_t,{direction:a.order},null,8,["direction"]),[[e.vShow,a.active&&a.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(n)("Size"))+" ",1),e.withDirectives(e.createVNode(_t,{direction:a.order},null,8,["direction"]),[[e.vShow,a.active&&a.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(n)("Date"))+" ",1),e.withDirectives(e.createVNode(_t,{direction:a.order},null,8,["direction"]),[[e.vShow,a.active&&a.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(n)("Filepath"))+" ",1),e.withDirectives(e.createVNode(_t,{direction:a.order},null,8,["direction"]),[[e.vShow,a.active&&a.column==="path"]])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",o0,[e.createVNode(am,{ref_key:"dragImage",ref:r,count:e.unref(l).getCount()},null,8,["count"])]),e.createElementVNode("div",{ref:e.unref(l).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(l).scrollBar,class:"w-5 bg-transparent pointer-events-none"},null,512)],2),e.createElementVNode("div",{ref:e.unref(l).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(l).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",n0,[e.createElementVNode("div",r0,[e.createVNode(Xt,{type:f.type,small:e.unref(t).compactListView},null,8,["type","small"]),e.createElementVNode("span",s0,e.toDisplayString(f.basename),1)]),e.createElementVNode("div",a0,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",l0,[e.createElementVNode("div",c0,[e.createVNode(Xt,{type:f.type,small:e.unref(t).compactListView},null,8,["type","small"]),e.createElementVNode("span",i0,e.toDisplayString(f.basename),1)]),e.createElementVNode("div",d0,e.toDisplayString(f.file_size?e.unref(t).filesize(f.file_size):""),1),e.createElementVNode("div",u0,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",m0,[(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,f0)):(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",p0,e.toDisplayString(s(f.extension)),1)):e.createCommentVNode("",!0)]),e.createElementVNode("span",h0,e.toDisplayString(e.unref(vo)(f.basename)),1)])]),_:2},1032,["item","index","dragImage"]))),256)):e.createCommentVNode("",!0)],544),e.createVNode(Fu)]))}},g0=["href","download"],k0=["onClick"],y0={__name:"ContextMenu",setup(o){const t=e.inject("ServiceContainer"),{t:n}=t.i18n,s=e.ref(null),r=e.ref([]),c=e.ref(""),l=e.reactive({active:!1,items:[],positions:{left:0,top:0}}),i=e.computed(()=>l.items.filter(u=>u.key==null||t.features.includes(u.key)));t.emitter.on("vf-context-selected",u=>{r.value=u});const a={newfolder:{key:oe.NEW_FOLDER,title:()=>n("New Folder"),action:()=>t.modal.open(Qn)},selectAll:{title:()=>n("Select All"),action:()=>t.dragSelect.selectAll()},markFavorite:{title:()=>n("Pin Folder"),action:()=>{t.pinnedFolders=t.pinnedFolders.concat(r.value),t.storage.setStore("pinned-folders",t.pinnedFolders)}},removeFavorite:{title:()=>n("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:oe.DELETE,title:()=>n("Delete"),action:()=>{t.modal.open(Do,{items:r})}},refresh:{title:()=>n("Refresh"),action:()=>{t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname}})}},preview:{key:oe.PREVIEW,title:()=>n("Preview"),action:()=>t.modal.open(or,{adapter:t.fs.adapter,item:r.value[0]})},open:{title:()=>n("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:()=>n("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:oe.DOWNLOAD,link:e.computed(()=>t.requester.getDownloadUrl(t.fs.adapter,r.value[0])),title:()=>n("Download"),action:()=>{}},archive:{key:oe.ARCHIVE,title:()=>n("Archive"),action:()=>t.modal.open(er,{items:r})},unarchive:{key:oe.UNARCHIVE,title:()=>n("Unarchive"),action:()=>t.modal.open(Zn,{items:r})},rename:{key:oe.RENAME,title:()=>n("Rename"),action:()=>t.modal.open(To,{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(l.items=[],c.value)if(f)l.items.push(a.openDir),t.emitter.emit("vf-context-selected",[f]);else return;else!f&&!c.value?(l.items.push(a.refresh),l.items.push(a.selectAll),l.items.push(a.newfolder),t.emitter.emit("vf-context-selected",[])):p.length>1&&p.some(h=>h.path===f.path)?(l.items.push(a.refresh),l.items.push(a.archive),l.items.push(a.delete),t.emitter.emit("vf-context-selected",p)):(f.type==="dir"?(l.items.push(a.open),t.pinnedFolders.findIndex(h=>h.path===f.path)!==-1?l.items.push(a.removeFavorite):l.items.push(a.markFavorite)):(l.items.push(a.preview),l.items.push(a.download)),l.items.push(a.rename),f.mime_type==="application/zip"?l.items.push(a.unarchive):l.items.push(a.archive),l.items.push(a.delete),t.emitter.emit("vf-context-selected",[f]));m(u)}),t.emitter.on("vf-contextmenu-hide",()=>{l.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;l.active=!0,e.nextTick(()=>{var C;const E=(C=s.value)==null?void 0:C.getBoundingClientRect();let y=(E==null?void 0:E.height)??0,O=(E==null?void 0:E.width)??0;g=h.right-u.pageX+window.scrollXe.withDirectives((e.openBlock(),e.createElementBlock("ul",{ref_key:"contextmenu",ref:s,style:e.normalizeStyle(l.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,g0)):(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,k0))]))),128))],4)),[[e.vShow,l.active]])}},x0={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"h-5 w-5",viewBox:"0 0 24 24"},_0=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),w0=[_0];function b0(o,t){return e.openBlock(),e.createElementBlock("svg",x0,[...w0])}const rr={render:b0},E0={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"},V0=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),N0=[V0];function S0(o,t){return e.openBlock(),e.createElementBlock("svg",E0,[...N0])}const $0={render:S0},B0={class:"p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none grow-0"},C0={class:"flex leading-5 items-center"},D0=["aria-label"],T0=["value"],M0={class:"ml-3"},A0={key:0},L0={class:"ml-1"},O0={class:"flex leading-5 items-center justify-end"},F0=["disabled"],H0=["aria-label"],R0={__name:"Statusbar",setup(o){const t=e.inject("ServiceContainer"),{t:n}=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)},l=e.ref("");t.emitter.on("vf-search-query",({newQuery:a})=>{l.value=a});const i=e.computed(()=>{const a=t.selectButton.multiple?r.getSelected().length>0:r.getSelected().length===1;return t.selectButton.active&&a});return(a,d)=>(e.openBlock(),e.createElementBlock("div",B0,[e.createElementVNode("div",C0,[e.createElementVNode("div",{class:"mx-2","aria-label":e.unref(n)("Storage"),"data-microtip-position":"top-right",role:"tooltip"},[e.createVNode(e.unref(rr))],8,D0),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":d[0]||(d[0]=m=>e.unref(t).fs.adapter=m),onChange:c,class:"py-0.5 text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded pl-2 pr-8",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,T0))),256))],544),[[e.vModelSelect,e.unref(t).fs.adapter]]),e.createElementVNode("div",M0,[l.value.length?(e.openBlock(),e.createElementBlock("span",A0,e.toDisplayString(e.unref(t).fs.data.files.length)+" items found. ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",L0,e.toDisplayString(e.unref(t).dragSelect.getCount()>0?e.unref(n)("%s item(s) selected.",e.unref(t).dragSelect.getCount()):""),1)])]),e.createElementVNode("div",O0,[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(n)("Select")),11,F0)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:"mr-1","aria-label":e.unref(n)("About"),"data-microtip-position":"top-left",role:"tooltip",onClick:d[2]||(d[2]=m=>e.unref(t).modal.open(Jn))},[e.createVNode(e.unref($0))],8,H0)])]))}},z0={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),I0=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),U0=[j0,I0];function P0(o,t){return e.openBlock(),e.createElementBlock("svg",z0,[...U0])}const q0={render:P0},G0={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"},K0=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),W0=e.createElementVNode("path",{d:"M15 12H9M12 9v6"},null,-1),Y0=[K0,W0];function X0(o,t){return e.openBlock(),e.createElementBlock("svg",G0,[...Y0])}const J0={render:X0},Q0={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"},Z0=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),ef=e.createElementVNode("path",{d:"M9 12h6"},null,-1),tf=[Z0,ef];function of(o,t){return e.openBlock(),e.createElementBlock("svg",Q0,[...tf])}const nf={render:of};function sr(o,t){const n=o.findIndex(s=>s.path===t.path);n>-1?o[n]=t:o.push(t)}const rf={key:1,class:"cursor-pointer"},ar={__name:"FolderLoaderIndicator",props:e.mergeModels({adapter:{type:String,required:!0},path:{type:String,required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const t=o,n=e.inject("ServiceContainer");n.i18n;const s=e.useModel(o,"modelValue"),r=e.ref(!1);function c(){return s.value=!s.value}function l(){return n.treeViewData.find(a=>a.path===t.path)}const i=()=>{r.value=!0,n.requester.send({url:"",method:"get",params:{q:"subfolders",adapter:t.adapter,path:t.path}}).then(a=>{sr(n.treeViewData,{path:t.path,...a})}).catch(a=>{}).finally(()=>{r.value=!1})};return(a,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=l())==null?void 0:p.folders.length))&&c()&&(l()||i())})},[r.value?(e.openBlock(),e.createBlock(e.unref(Mo),{key:0,class:"p-1"})):(e.openBlock(),e.createElementBlock("div",rf,[s.value&&((m=l())!=null&&m.folders.length)?(e.openBlock(),e.createBlock(e.unref(nf),{key:0,class:"text-gray-600"})):e.createCommentVNode("",!0),s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(J0),{key:1,class:"text-gray-400"}))]))])}}},sf={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"},af=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),lf=[af];function cf(o,t){return e.openBlock(),e.createElementBlock("svg",sf,[...lf])}const df={render:cf},uf={class:"block"},mf={class:"flex hover:text-sky-700 dark:hover:text-sky-200/50 rounded"},ff={class:"h-5 w-5 shrink-0"},pf=["onClick"],hf={class:"h-5 w-5 shrink-0"},vf={class:"text-nowrap"},gf={class:"pl-4"},kf={__name:"TreeSubfolderList",props:{adapter:{type:String,required:!0},path:{type:String,required:!0}},setup(o){const t=e.inject("ServiceContainer"),n=e.ref([]),s=o,r=e.computed(()=>{var c;return((c=t.treeViewData.find(l=>l.path===s.path))==null?void 0:c.folders)||[]});return(c,l)=>{const i=e.resolveComponent("TreeSubfolderList",!0);return e.openBlock(),e.createElementBlock("ul",uf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(a,d)=>(e.openBlock(),e.createElementBlock("li",{class:"flex flex-col space-x-0.5 py-0.5 text-sm",key:a.path},[e.createElementVNode("div",mf,[e.createElementVNode("div",ff,[e.createVNode(ar,{adapter:o.adapter,path:a.path,modelValue:n.value[a.path],"onUpdate:modelValue":m=>n.value[a.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:a.path}})},[e.createElementVNode("div",hf,[e.unref(t).fs.path===a.path?(e.openBlock(),e.createBlock(e.unref(df),{key:0})):(e.openBlock(),e.createBlock(e.unref(zt),{key:1}))]),e.createElementVNode("div",vf,e.toDisplayString(a.basename),1)],8,pf)]),e.createElementVNode("div",gf,[e.withDirectives(e.createVNode(i,{adapter:s.adapter,path:a.path},null,8,["adapter","path"]),[[e.vShow,n.value[a.path]]])])]))),128))])}}},yf={class:"pt-1 px-1 uppercase font-bold text-gray-400 dark:text-gray-500 text-xs flex justify-between"},xf={class:"h-5 w-5 shrink-0"},_f={class:"mr-3"},wf={__name:"TreeStorageItem",props:{storage:{type:String,required:!0}},setup(o){const t=e.inject("ServiceContainer"),n=e.ref(!1),s=r=>{t.fs.adapter=r,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",yf,[e.createElementVNode("div",{class:e.normalizeClass(["flex flex-1 space-x-1 items-center cursor-pointer",o.storage===e.unref(t).fs.adapter?"text-gray-700/80 dark:text-gray-300/80 text-bold":""]),onClick:c[0]||(c[0]=l=>s(o.storage))},[e.createElementVNode("div",xf,[e.createVNode(e.unref(rr))]),e.createElementVNode("div",null,e.toDisplayString(o.storage),1)],2),e.createElementVNode("div",_f,[e.createVNode(ar,{adapter:o.storage,path:o.storage+"://",modelValue:n.value,"onUpdate:modelValue":c[1]||(c[1]=l=>n.value=l)},null,8,["adapter","path","modelValue"])])]),e.withDirectives(e.createVNode(kf,{adapter:o.storage,path:o.storage+"://"},null,8,["adapter","path"]),[[e.vShow,n.value]])],64))}},bf={class:"p-1 uppercase font-bold text-gray-400 dark:text-gray-400 text-xs flex items-center space-x-1"},Ef={class:"block"},Vf={class:"flex pl-2 py-0.5 text-sm space-x-2"},Nf=["onClick"],Sf=["title"],$f=["onClick"],Bf={key:0},Cf={class:"rounded-lg p-1 bg-gray-100 dark:bg-gray-700 text-xs text-center"},Df={__name:"TreeView",setup(o){const t=e.inject("ServiceContainer"),{t:n}=t.i18n,s=e.ref(190),r=i=>{t.pinnedFolders=t.pinnedFolders.filter(a=>a.path!==i.path),t.storage.setStore("pinned-folders",t.pinnedFolders)},c=i=>{const a=i.clientX,d=i.target.parentElement,m=d.getBoundingClientRect().width;d.classList.remove("transition-[width]"),d.classList.add("transition-none");const u=f=>{s.value=m+f.clientX-a,s.value<50&&(s.value=0,t.showTreeView=!1),s.value>50&&(t.showTreeView=!0)},p=()=>{const f=d.getBoundingClientRect();s.value=f.width,d.classList.add("transition-[width]"),d.classList.remove("transition-none"),window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",p)};window.addEventListener("mousemove",u),window.addEventListener("mouseup",p)},l=e.ref(null);return e.onMounted(()=>{Ue(l.value,{})}),e.watch(t.fs.data,(i,a)=>{const d=i.files.filter(m=>m.type==="dir");sr(t.treeViewData,{path:t.fs.path,folders:d.map(m=>({adapter:m.storage,path:m.path,basename:m.basename}))})}),(i,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{onClick:a[0]||(a[0]=d=>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: "+s.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:l,class:"h-full border-r dark:border-gray-600/50 pb-4"},[e.createElementVNode("div",bf,[e.createElementVNode("div",null,[e.createVNode(e.unref(nr),{class:"text-amber-600"})]),e.createElementVNode("div",null,e.toDisplayString(e.unref(n)("Pinned Folders")),1)]),e.createElementVNode("ul",Ef,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).pinnedFolders,d=>(e.openBlock(),e.createElementBlock("li",Vf,[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:d.storage,path:d.path}})},[e.createVNode(e.unref(zt),{class:"h-5 w-5"}),e.createElementVNode("div",{title:d.path},e.toDisplayString(d.basename),9,Sf)],8,Nf),e.createElementVNode("div",{class:"cursor-pointer",onClick:m=>r(d)},[e.createVNode(e.unref(q0),{class:"p-0.5 text-gray-200 hover:text-gray-400 dark:text-gray-600 hover:dark:text-gray-400"})],8,$f)]))),256)),e.unref(t).pinnedFolders.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",Bf,[e.createElementVNode("div",Cf,e.toDisplayString(e.unref(n)("No folders pinned")),1)]))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.data.storages,d=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(wf,{storage:d},null,8,["storage"])]))),256))],512),e.createElementVNode("div",{onMousedown:c,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))}},Tf={class:"relative flex overflow-hidden h-full"},Mf={__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(o){return{active:!1,multiple:!1,click:t=>{},...o}}}},emits:["select"],setup(o,{emit:t}){const n=t,r=Ds(o,e.inject("VueFinderOptions"));e.provide("ServiceContainer",r);const{setStore:c}=r.storage,l=e.ref(null);r.root=l;const i=r.dragSelect;Nl(r);const a=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(),a(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=>{n("select",u)})}),(m,u)=>(e.openBlock(),e.createElementBlock("div",{class:"vuefinder",ref_key:"root",ref:l,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: "+o.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(ad),e.createVNode(Lu),e.createElementVNode("div",Tf,[e.createVNode(Df),e.createVNode(v0)]),e.createVNode(R0)],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(y0)],2)],512))}},Af={install(o,t={}){t.i18n=t.i18n??{};let[n]=Object.keys(t.i18n);t.locale=t.locale??n??"en",o.provide("VueFinderOptions",t),o.component("VueFinder",Mf)}};module.exports=Af; + */const ge=(o,t)=>{const{o:n,i:s,u:r}=o;let c=n,l;const i=(m,u)=>{const p=c,f=m,h=u||(s?!s(p,f):p!==f);return(h||r)&&(c=f,l=p),[c,h,l]};return[t?m=>i(t(c,l),m):i,m=>[c,!!m,l]]},un=typeof window<"u"&&typeof document<"u",pe=un?window:{},mn=Math.max,$r=Math.min,Qt=Math.round,Vt=Math.abs,Ho=Math.sign,fn=pe.cancelAnimationFrame,ko=pe.requestAnimationFrame,Nt=pe.setTimeout,Zt=pe.clearTimeout,Tt=o=>typeof pe[o]<"u"?pe[o]:void 0,Br=Tt("MutationObserver"),Ro=Tt("IntersectionObserver"),St=Tt("ResizeObserver"),eo=Tt("ScrollTimeline"),pn=un&&Node.ELEMENT_NODE,{toString:Hf,hasOwnProperty:Gt}=Object.prototype,Mt=o=>o===void 0,yo=o=>o===null,Se=o=>typeof o=="number",At=o=>typeof o=="string",hn=o=>typeof o=="boolean",we=o=>typeof o=="function",$e=o=>Array.isArray(o),ct=o=>typeof o=="object"&&!$e(o)&&!yo(o),Lt=o=>{const t=!!o&&o.length,n=Se(t)&&t>-1&&t%1==0;return $e(o)||!we(o)&&n?t>0&&ct(o)?t-1 in o:!0:!1},$t=o=>{if(!o||!ct(o))return!1;let t;const n="constructor",s=o[n],r=s&&s.prototype,c=Gt.call(o,n),l=r&&Gt.call(r,"isPrototypeOf");if(s&&!c&&!l)return!1;for(t in o);return Mt(t)||Gt.call(o,t)},Bt=o=>{const t=HTMLElement;return o?t?o instanceof t:o.nodeType===pn:!1},Ot=o=>{const t=Element;return o?t?o instanceof t:o.nodeType===pn:!1};function Q(o,t){if(Lt(o))for(let n=0;nt(o[n],n,o));return o}const xo=(o,t)=>o.indexOf(t)>=0,Ae=(o,t)=>o.concat(t),se=(o,t,n)=>(!At(t)&&Lt(t)?Array.prototype.push.apply(o,t):o.push(t),o),Pe=o=>Array.from(o||[]),vn=o=>$e(o)?o:[o],to=o=>!!o&&!o.length,zo=o=>Pe(new Set(o)),be=(o,t,n)=>{Q(o,r=>r&&r.apply(void 0,t||[])),!n&&(o.length=0)},gn="paddingTop",kn="paddingRight",yn="paddingLeft",xn="paddingBottom",_n="marginLeft",wn="marginRight",bn="marginBottom",Cr="overflowX",Dr="overflowY",Ze="width",et="height",Re="visible",qe="hidden",tt="scroll",Tr=o=>{const t=String(o||"");return t?t[0].toUpperCase()+t.slice(1):""},Ft=(o,t,n,s)=>{if(o&&t){let r=!0;return Q(n,c=>{const l=o[c],i=t[c];l!==i&&(r=!1)}),r}return!1},En=(o,t)=>Ft(o,t,["w","h"]),wt=(o,t)=>Ft(o,t,["x","y"]),Mr=(o,t)=>Ft(o,t,["t","r","b","l"]),ze=()=>{},U=(o,...t)=>o.bind(0,...t),Ge=o=>{let t;const n=o?Nt:ko,s=o?Zt:fn;return[r=>{s(t),t=n(()=>r(),we(o)?o():o)},()=>s(t)]},oo=(o,t)=>{const{_:n,p:s,v:r,m:c}=t||{};let l,i,a,d,m=ze;const u=function(v){m(),Zt(l),d=l=i=void 0,m=ze,o.apply(this,v)},p=g=>c&&i?c(i,g):g,f=()=>{m!==ze&&u(p(a)||a)},h=function(){const v=Pe(arguments),V=we(n)?n():n;if(Se(V)&&V>=0){const O=we(s)?s():s,D=Se(O)&&O>=0,N=V>0?Nt:ko,S=V>0?Zt:fn,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&&!l&&(l=Nt(f,O))),m=()=>S(E),i=a=b}else u(v)};return h.S=f,h},Vn=(o,t)=>Object.prototype.hasOwnProperty.call(o,t),Le=o=>o?Object.keys(o):[],Y=(o,t,n,s,r,c,l)=>{const i=[t,n,s,r,c,l];return(typeof o!="object"||yo(o))&&!we(o)&&(o={}),Q(i,a=>{Q(a,(d,m)=>{const u=a[m];if(o===u)return!0;const p=$e(u);if(u&&$t(u)){const f=o[m];let h=f;p&&!$e(f)?h=[]:!p&&!$t(f)&&(h={}),o[m]=Y(h,u)}else o[m]=p?u.slice():u})}),o},Nn=(o,t)=>Q(Y({},o),(n,s,r)=>{n===void 0?delete r[s]:n&&$t(n)&&(r[s]=Nn(n))}),_o=o=>{for(const t in o)return!1;return!0},no=(o,t,n)=>mn(o,$r(t,n)),Ke=o=>Pe(new Set(($e(o)?o:(o||"").split(" ")).filter(t=>t))),wo=(o,t)=>o&&o.getAttribute(t),jo=(o,t)=>o&&o.hasAttribute(t),Me=(o,t,n)=>{Q(Ke(t),s=>{o&&o.setAttribute(s,String(n||""))})},Ve=(o,t)=>{Q(Ke(t),n=>o&&o.removeAttribute(n))},Ht=(o,t)=>{const n=Ke(wo(o,t)),s=U(Me,o,t),r=(c,l)=>{const i=new Set(n);return Q(Ke(c),a=>{i[l](a)}),Pe(i).join(" ")};return{O:c=>s(r(c,"delete")),$:c=>s(r(c,"add")),C:c=>{const l=Ke(c);return l.reduce((i,a)=>i&&n.includes(a),l.length>0)}}},Sn=(o,t,n)=>(Ht(o,t).O(n),U(bo,o,t,n)),bo=(o,t,n)=>(Ht(o,t).$(n),U(Sn,o,t,n)),ro=(o,t,n,s)=>(s?bo:Sn)(o,t,n),Eo=(o,t,n)=>Ht(o,t).C(n),$n=o=>Ht(o,"class"),Bn=(o,t)=>{$n(o).O(t)},Vo=(o,t)=>($n(o).$(t),U(Bn,o,t)),Cn=(o,t)=>{const n=[],s=t?Ot(t)&&t:document;return s?se(n,s.querySelectorAll(o)):n},Ar=(o,t)=>{const n=t?Ot(t)&&t:document;return n?n.querySelector(o):null},Ct=(o,t)=>Ot(o)?o.matches(t):!1,Dn=o=>Ct(o,"body"),so=o=>o?Pe(o.childNodes):[],ot=o=>o&&o.parentElement,Je=(o,t)=>Ot(o)&&o.closest(t),ao=o=>document.activeElement,Lr=(o,t,n)=>{const s=Je(o,t),r=o&&Ar(n,s),c=Je(r,t)===s;return s&&r?s===o||r===o||c&&Je(Je(o,n),t)!==s:!1},Ie=o=>{if(Lt(o))Q(Pe(o),t=>Ie(t));else if(o){const t=ot(o);t&&t.removeChild(o)}},Tn=(o,t,n)=>{if(n&&o){let s=t,r;return Lt(n)?(r=document.createDocumentFragment(),Q(n,c=>{c===s&&(s=c.previousSibling),r.appendChild(c)})):r=n,t&&(s?s!==t&&(s=s.nextSibling):s=o.firstChild),o.insertBefore(r,s||null),()=>Ie(n)}return ze},ke=(o,t)=>Tn(o,null,t),Io=(o,t)=>Tn(ot(o),o&&o.nextSibling,t),Qe=o=>{const t=document.createElement("div");return Me(t,"class",o),t},Mn=o=>{const t=Qe();return t.innerHTML=o.trim(),Q(so(t),n=>Ie(n))},Or=/^--/,Uo=(o,t)=>o.getPropertyValue(t)||o[t]||"",No=o=>{const t=o||0;return isFinite(t)?t:0},yt=o=>No(parseFloat(o||"")),Po=o=>`${(No(o)*100).toFixed(3)}%`,lo=o=>`${No(o)}px`;function it(o,t){o&&t&&Q(t,(n,s)=>{try{const r=o.style,c=Se(n)?lo(n):(n||"")+"";Or.test(s)?r.setProperty(s,c):r[s]=c}catch{}})}function We(o,t,n){const s=At(t);let r=s?"":{};if(o){const c=pe.getComputedStyle(o,n)||o.style;r=s?Uo(c,t):Pe(t).reduce((l,i)=>(l[i]=Uo(c,i),l),r)}return r}const qo=(o,t,n)=>{const s=t?`${t}-`:"",r=n?`-${n}`:"",c=`${s}top${r}`,l=`${s}right${r}`,i=`${s}bottom${r}`,a=`${s}left${r}`,d=We(o,[c,l,i,a]);return{t:yt(d[c]),r:yt(d[l]),b:yt(d[i]),l:yt(d[a])}},Kt=(o,t)=>`translate${ct(o)?`(${o.x},${o.y})`:`${t?"X":"Y"}(${o})`}`,Fr=o=>!!(o.offsetWidth||o.offsetHeight||o.getClientRects().length),Hr={w:0,h:0},Rt=(o,t)=>t?{w:t[`${o}Width`],h:t[`${o}Height`]}:Hr,Rr=o=>Rt("inner",o||pe),at=U(Rt,"offset"),An=U(Rt,"client"),co=U(Rt,"scroll"),So=o=>{const t=parseFloat(We(o,Ze))||0,n=parseFloat(We(o,et))||0;return{w:t-Qt(t),h:n-Qt(n)}},lt=o=>o.getBoundingClientRect(),zr=o=>!!o&&Fr(o),io=o=>!!(o&&(o[et]||o[Ze])),Ln=(o,t)=>{const n=io(o);return!io(t)&&n},Go=(o,t,n,s)=>{Q(Ke(t),r=>{o&&o.removeEventListener(r,n,s)})},te=(o,t,n,s)=>{var r;const c=(r=s&&s.H)!=null?r:!0,l=s&&s.I||!1,i=s&&s.A||!1,a={passive:c,capture:l};return U(be,Ke(t).map(d=>{const m=i?u=>{Go(o,d,m,l),n&&n(u)}:n;return o&&o.addEventListener(d,m,a),U(Go,o,d,m,l)}))},On=o=>o.stopPropagation(),uo=o=>o.preventDefault(),Fn=o=>On(o)||uo(o),Ne=(o,t)=>{const{x:n,y:s}=Se(t)?{x:t,y:t}:t||{};Se(n)&&(o.scrollLeft=n),Se(s)&&(o.scrollTop=s)},ye=o=>({x:o.scrollLeft,y:o.scrollTop}),Hn=()=>({T:{x:0,y:0},D:{x:0,y:0}}),jr=(o,t)=>{const{T:n,D:s}=o,{w:r,h:c}=t,l=(u,p,f)=>{let h=Ho(u)*f,g=Ho(p)*f;if(h===g){const v=Vt(u),V=Vt(p);g=v>V?0:g,h=v{const n=(s,r)=>s===0&&s<=r;return{x:n(o.x,t.x),y:n(o.y,t.y)}},Wo=({T:o,D:t},n)=>{const s=(r,c,l)=>no(0,1,(r-l)/(r-c)||0);return{x:s(o.x,t.x,n.x),y:s(o.y,t.y,n.y)}},mo=o=>{o&&o.focus&&o.focus({preventScroll:!0})},Yo=(o,t)=>{Q(vn(t),o)},fo=o=>{const t=new Map,n=(c,l)=>{if(c){const i=t.get(c);Yo(a=>{i&&i[a?"delete":"clear"](a)},l)}else t.forEach(i=>{i.clear()}),t.clear()},s=(c,l)=>{if(At(c)){const d=t.get(c)||new Set;return t.set(c,d),Yo(m=>{we(m)&&d.add(m)},l),U(n,c,l)}hn(l)&&l&&n();const i=Le(c),a=[];return Q(i,d=>{const m=c[d];m&&se(a,s(d,m))}),U(be,a)},r=(c,l)=>{Q(Pe(t.get(c)),i=>{l&&!to(l)?i.apply(0,l):i()})};return s(o||{}),[s,n,r]},Xo=o=>JSON.stringify(o,(t,n)=>{if(we(n))throw 0;return n}),Jo=(o,t)=>o?`${t}`.split(".").reduce((n,s)=>n&&Vn(n,s)?n[s]:void 0,o):void 0,Ir={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"]}},Rn=(o,t)=>{const n={},s=Ae(Le(t),Le(o));return Q(s,r=>{const c=o[r],l=t[r];if(ct(c)&&ct(l))Y(n[r]={},Rn(c,l)),_o(n[r])&&delete n[r];else if(Vn(t,r)&&l!==c){let i=!0;if($e(c)||$e(l))try{Xo(c)===Xo(l)&&(i=!1)}catch{}i&&(n[r]=l)}}),n},Qo=(o,t,n)=>s=>[Jo(o,s),n||Jo(t,s)!==void 0],nt="data-overlayscrollbars",bt="os-environment",xt=`${bt}-scrollbar-hidden`,Wt=`${nt}-initialize`,Et="noClipping",Zo=`${nt}-body`,je=nt,Ur="host",He=`${nt}-viewport`,Pr=Cr,qr=Dr,Gr="arrange",zn="measuring",jn="scrollbarHidden",Kr="scrollbarPressed",Wr="noContent",po=`${nt}-padding`,en=`${nt}-content`,$o="os-size-observer",Yr=`${$o}-appear`,Xr=`${$o}-listener`,Jr="os-trinsic-observer",Qr="os-theme-none",xe="os-scrollbar",Zr=`${xe}-rtl`,es=`${xe}-horizontal`,ts=`${xe}-vertical`,In=`${xe}-track`,Bo=`${xe}-handle`,os=`${xe}-visible`,ns=`${xe}-cornerless`,tn=`${xe}-interaction`,on=`${xe}-unusable`,ho=`${xe}-auto-hide`,nn=`${ho}-hidden`,rn=`${xe}-wheel`,rs=`${In}-interactive`,ss=`${Bo}-interactive`;let Yt;const as=()=>{const o=(y,O,D)=>{ke(document.body,y),ke(document.body,y);const N=An(y),S=at(y),$=So(O);return D&&Ie(y),{x:S.h-N.h+$.h,y:S.w-N.w+$.w}},t=y=>{let O=!1;const D=Vo(y,xt);try{O=We(y,"scrollbar-width")==="none"||We(y,"display","::-webkit-scrollbar")==="none"}catch{}return D(),O},n=`.${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=Mn(`
`)[0],c=r.firstChild,[l,,i]=fo(),[a,d]=ge({o:o(r,c),i:wt},U(o,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&&Dn(y)&&y,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},h=Y({},Ir),g=U(Y,{},h),v=U(Y,{},f),V={k:m,M:p,R:u,V:!!eo,L:U(l,"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]=a();Y(V.k,O),i("r",[D])})}return V},Be=()=>(Yt||(Yt=as()),Yt),Un=(o,t)=>we(t)?t.apply(0,o):t,ls=(o,t,n,s)=>{const r=Mt(s)?n:s;return Un(o,r)||t.apply(0,o)},Pn=(o,t,n,s)=>{const r=Mt(s)?n:s,c=Un(o,r);return!!c&&(Bt(c)?c:t.apply(0,o))},cs=(o,t)=>{const{nativeScrollbarsOverlaid:n,body:s}=t||{},{M:r,R:c,P:l}=Be(),{nativeScrollbarsOverlaid:i,body:a}=l().cancel,d=n??i,m=Mt(s)?a:s,u=(r.x||r.y)&&d,p=o&&(yo(m)?!c:m);return!!u||!!p},Co=new WeakMap,is=(o,t)=>{Co.set(o,t)},ds=o=>{Co.delete(o)},qn=o=>Co.get(o),us=(o,t,n)=>{let s=!1;const r=n?new WeakMap:!1,c=()=>{s=!0},l=i=>{if(r&&n){const a=n.map(d=>{const[m,u]=d||[];return[u&&m?(i||Cn)(m,o):[],u]});Q(a,d=>Q(d[0],m=>{const u=d[1],p=r.get(m)||[];if(o.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 l(),[c,l]},sn=(o,t,n,s)=>{let r=!1;const{j:c,X:l,Y:i,W:a,J:d,K:m}=s||{},u=oo(()=>r&&n(!0),{_:33,p:99}),[p,f]=us(o,u,i),h=c||[],g=l||[],v=Ae(h,g),V=(O,D)=>{if(!to(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=o===x,q=Z&&C,G=q&&wo(x,C||""),I=At(G)?G:null,ee=q&&A!==I,F=xo(g,C)&ⅇif(t&&(X||!M)){const R=Z&&ee,H=R&&a&&Ct(x,a),L=(H?!N(x,C,A,I):!Z||R)&&!S(_,!!H,o,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(_=>zo($).reduce((C,x)=>(se(C,Cn(_,x)),Ct(x,_)?se(C,x):C),[])),t)return!O&&E&&n(!1),[!1];if(!to(b)||B){const _=[zo(b),B];return!O&&n.apply(0,_),_}}},y=new Br(U(V,!1));return[()=>(y.observe(o,{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())}]},Gn={},Kn={},ms=o=>{Q(o,t=>Q(t,(n,s)=>{Gn[s]=t[s]}))},Wn=(o,t,n)=>Le(o).map(s=>{const{static:r,instance:c}=o[s],[l,i,a]=n||[],d=n?c:r;if(d){const m=n?d(l,i,t):d(t);return(a||Kn)[s]=m}}),dt=o=>Kn[o],fs="__osOptionsValidationPlugin",ps="__osSizeObserverPlugin",hs=(o,t)=>{const{M:n}=t,[s,r]=o("showNativeOverlaidScrollbars");return[s&&n.x&&n.y,r]},Dt=o=>o.indexOf(Re)===0,vs=(o,t)=>{const n=(r,c,l,i)=>{const a=r===Re?qe:r.replace(`${Re}-`,""),d=Dt(r),m=Dt(l);return!c&&!i?qe:d&&m?Re:d?c&&i?a:c?Re:qe:c?a:m&&i?Re:qe},s={x:n(t.x,o.x,t.y,o.y),y:n(t.y,o.y,t.x,o.x)};return{G:s,Z:{x:s.x===tt,y:s.y===tt}}},Yn="__osScrollbarsHidingPlugin",gs="__osClickScrollPlugin",Xn=(o,t,n)=>{const{dt:s}=n||{},r=dt(ps),[c]=ge({o:!1,u:!0});return()=>{const l=[],a=Mn(`
`)[0],d=a.firstChild,m=u=>{const p=u instanceof ResizeObserverEntry;let f=!1,h=!1;if(p){const[g,,v]=c(u.contentRect),V=io(g);h=Ln(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(l,()=>{u.disconnect()})}else if(r){const[u,p]=r(d,m,s);se(l,Ae([Vo(a,Yr),te(a,"animationstart",u)],p))}else return ze;return U(be,se(l,ke(o,a)))}},ks=(o,t)=>{let n;const s=a=>a.h===0||a.isIntersecting||a.intersectionRatio>0,r=Qe(Jr),[c]=ge({o:!1}),l=(a,d)=>{if(a){const m=c(s(a)),[,u]=m;return u&&!d&&t(m)&&[m]}},i=(a,d)=>l(d.pop(),a);return[()=>{const a=[];if(Ro)n=new Ro(U(i,!1),{root:o}),n.observe(r),se(a,()=>{n.disconnect()});else{const d=()=>{const m=at(r);l(m)};se(a,Xn(r,d)()),d()}return U(be,se(a,ke(o,r)))},()=>n&&i(!0,n.takeRecords())]},ys=(o,t,n,s)=>{let r,c,l,i,a,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}=o,B=w=>We(w,"direction")==="rtl",E={$t:!1,ct:B(g)},_=Be(),C=dt(Yn),[x]=ge({i:En,o:{w:0,h:0}},()=>{const w=C&&C.tt(o,t,E,_,n).ut,z=!(S&&N)&&Eo(v,je,Et),j=!N&&$(Gr),P=j&&ye(y),J=b(zn,z),le=j&&w&&w()[0],de=co(V),W=So(V);return le&&le(),Ne(y,P),z&&J(),{w:de.w+W.w,h:de.h+W.h}}),k=D?f:Ae(h,f),A=oo(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?ks(v,K):[],I=!N&&Xn(v,Z,{dt:!0}),[ee,F]=sn(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:Ln(L,a)}),a=L}),H=oo(()=>{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,le]=w("update.attributes"),[de,W]=w("update.elementEvents"),[ce,ue]=w("update.debounce"),_e=W||le,ie=L||z,he=ae=>we(P)&&P(ae);if(_e){l&&l(),i&&i();const[ae,ne]=sn(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?Lr(fe,m,u):!1)||!!Je(fe,`.${xe}`)||!!he(me)}});i=ae(),l=ne}if(ue)if(A.S(),$e(ce)){const ae=ce[0],ne=ce[1];r=Se(ae)&&ae,c=Se(ne)&&ne}else Se(ce)?(r=ce,c=!1):(r=!1,c=!1);if(ie){const ae=F(),ne=G&&G(),me=l&&l();ae&&Y(j,M(ae[0],ae[1],ie)),ne&&Y(j,K(ne[0],ie)),me&&Y(j,X(me[0],ie))}return T(j),j},E]},xs=(o,t,n,s)=>{const{P:r}=Be(),{scrollbars:c}=r(),{slot:l}=c,{vt:i,ht:a,ot:d,Dt:m,gt:u,yt:p,nt:f}=t,{scrollbars:h}=m?{}:o,{slot:g}=h||{},v=new Map,V=F=>eo&&new eo({source:u,axis:F}),y={x:V("x"),y:V("y")},O=Pn([i,a,d],()=>f&&p?i:a,l,g),D=(F,R)=>{if(R){const P=F?Ze:et,{kt:J,Mt:le}=R,de=lt(le)[P],W=lt(J)[P];return no(0,1,de/W||0)}const H=F?"x":"y",{Rt:w,Vt:L}=n,z=L[H],j=w[H];return no(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?xo(vn(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?Vo:Bn;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]:Po(D(R))}]})},C=(F,R)=>{const{Pt:H}=n,w=R?"x":"y",L=y[w],z=Ko(H)[w],j=(P,J)=>Kt(Po(N(P,z?J:1-J,R)),R);L?Q(F,P=>{const{Mt:J}=P;b(J,L,S({transform:[0,1].map(le=>j(P,le))}))}):E(F,P=>[P.Mt,{transform:j(P,Wo(H,ye(u))[w])}])},x=F=>f&&!p&&ot(F)===d,k=[],A=[],T=[],K=(F,R,H)=>{const w=hn(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}=n,H=Ko(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(lo(P*(F[j]-w)),j==="x"))}),"add");z("x"),z("y")}else $(L)});else{const L=Wo(R,ye(u)),z=j=>{const{Lt:P}=j,J=x(P)&&P,le=(de,W,ce)=>{const ue=W*de;return lo(ce?ue:-ue)};return[J,J&&{transform:Kt({x:le(L.x,F.x,H.x),y:le(L.y,F.y,H.y)})}]};E(A,z),E(T,z)}}},q=F=>{const H=Qe(`${xe} ${F?es:ts}`),w=Qe(In),L=Qe(Bo),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]},_s=(o,t,n,s)=>(r,c,l,i)=>{const{ht:a,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(l,[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}=n,I=at(g)[T]-at(v)[T],F=M*q/I*G[K];Ne(u,{[K]:X+F})};return te(g,"pointerdown",X=>{const M=Je(X.target,`.${Bo}`)===v,q=M?v:g,G=o.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(lt,v),z=U(lt,g),j=(re,fe)=>(re||L())[A]-(fe||z())[A],P=Qt(lt(u)[B])/at(u)[T]||1,J=Z(ye(u)[K],1/P),le=X[k],de=L(),W=z(),ce=de[B],ue=j(de,W)+ce/2,_e=le-W[A],ie=M?0:_e-ue,he=re=>{be(me),q.releasePointerCapture(re.pointerId)},ae=()=>f(Kr,!0),ne=ae(),me=[()=>{const re=ye(u);ne();const fe=ye(u),ve={x:fe.x-re.x,y:fe.y-re.y};(Vt(ve.x)>3||Vt(ve.y)>3)&&(ae(),Ne(u,re),b(ve),O(ne))},te(p,x,he),te(p,"selectstart",re=>uo(re),{H:!1}),te(g,x,he),te(g,"pointermove",re=>{const fe=re[k]-le;(M||w)&&J(ie+fe)})];if(q.setPointerCapture(X.pointerId),w)J(ie);else if(!M){const re=dt(gs);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(tn,!0)}),te(h,"pointerleave pointercancel",()=>{c(tn,!1)}),!m&&te(h,"mousedown",()=>{const x=ao();(jo(x,He)||jo(x,je)||x===document.body)&&Nt(U(mo,d),25)}),te(h,"wheel",x=>{const{deltaX:k,deltaY:A,deltaMode:T}=x;_&&T===0&&ot(h)===a&&b({x:k,y:A}),_=!1,c(rn,!0),V(()=>{_=!0,c(rn)}),uo(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",Fn,{A:!0,I:!0,H:!1}),{I:!0}),E(),y,D,S])},ws=(o,t,n,s,r,c)=>{let l,i,a,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,$]=xs(o,r,s,_s(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)_(nn);else{const G=U(_,nn,!0);p>0&&!q?D(G):G()}},T=()=>{(a?!l:!d)&&(A(!0),v(()=>{A(!1)}))},K=M=>{_(ho,M,!0),_(ho,M,!1)},Z=M=>{f(M)&&(l=a,a&&A(!0))},X=[N,V,O,g,()=>u(),te(b,"pointerover",Z,{A:!0}),te(b,"pointerenter",Z),te(b,"pointerleave",M=>{f(M)&&(l=!1,a&&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}=n,{M:j}=Be(),{G:P,en:J}=s,[le,de]=M("showNativeOverlaidScrollbars"),[W,ce]=M("scrollbars.theme"),[ue,_e]=M("scrollbars.visibility"),[ie,he]=M("scrollbars.autoHide"),[ae,ne]=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=le&&j.x&&j.y,ft=(Oe,rt,st)=>{const pt=Oe.includes(tt)&&(ue===Re||ue==="auto"&&rt===tt);return _(os,pt,st),pt};if(p=me,It&&(ae&&Ut?(K(!1),u(),y(()=>{u=te(B,"scroll",U(K,!0),{A:!0})})):K(!0)),de&&_(Qr,mt),ce&&(_(m),_(W,!0),m=W),ne&&!ae&&K(!0),he&&(i=ie==="move",a=ie==="leave",d=ie==="never",A(d,!0)),fe&&_(ss,re),Ye&&_(rs,ve),Pt){const Oe=ft(ut.x,P.x,!0),rt=ft(ut.y,P.y,!1);_(ns,!(Oe&&rt))}Ee&&(C(),x(),k(),_(on,!J.x,!0),_(on,!J.y,!1),_(Zr,z&&!E))},{},S]},bs=o=>{const t=Be(),{P:n,R:s}=t,{elements:r}=n(),{host:c,padding:l,viewport:i,content:a}=r,d=Bt(o),m=d?{}:o,{elements:u}=m,{host:p,padding:f,viewport:h,content:g}=u||{},v=d?o:m.target,V=Dn(v),y=Ct(v,"textarea"),O=v.ownerDocument,D=O.documentElement,N=()=>O.defaultView||pe,S=U(ls,[v]),$=U(Pn,[v]),b=U(Qe,""),B=U(S,b,i),E=U($,b,a),_=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,l,f),M=!A&&k,q=[M,T,X,Z].map(W=>Bt(W)&&!ot(W)&&W),G=W=>W&&xo(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=>Eo(T,He,W),Ot:(W,ce)=>ro(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:so([L,w,H,R,F].find(W=>W&&!G(W)));const J=x?F:L||w,le=U(be,z);return[ee,()=>{const W=N(),ce=ao(),ue=ne=>{ke(ot(ne),so(ne)),Ie(ne)},_e=ne=>te(ne,"focusin focusout focus blur",Fn,{I:!0,H:!1}),ie="tabindex",he=wo(w,ie),ae=_e(ce);return Me(R,je,C?"":Ur),Me(H,po,""),Me(w,He,""),Me(L,en,""),C||(Me(w,ie,he||"-1"),V&&Me(D,Zo,"")),j&&(Io(F,R),se(z,()=>{Io(R,F),Ie(R)})),ke(J,P),ke(R,H),ke(H||R,!C&&w),ke(w,L),se(z,[ae,()=>{const ne=ao(),me=G(w),re=me&&ne===w?F:ne,fe=_e(re);Ve(H,po),Ve(L,en),Ve(w,He),V&&Ve(D,Zo),he?Me(w,ie,he):Ve(w,ie),G(L)&&ue(L),me&&ue(w),G(H)&&ue(H),mo(re),fe()}]),s&&!C&&(bo(w,He,jn),se(z,U(Ve,w,He))),mo(!C&&V&&ce===F&&W.top===W?w:ce),ae(),P=0,le},le]},Es=({bt:o})=>({Gt:t,an:n,Tt:s})=>{const{xt:r}=t||{},{$t:c}=n;o&&(r||s)&&it(o,{[et]:c&&"100%"})},Vs=({ht:o,cn:t,ot:n,nt:s},r)=>{const[c,l]=ge({i:Mr,o:qo()},U(qo,o,"padding",""));return({It:i,Gt:a,an:d,Tt:m})=>{let[u,p]=l(m);const{R:f}=Be(),{ft:h,Ht:g,Ct:v}=a||{},{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={[wn]:S&&!V?-$:0,[bn]:S?-b:0,[_n]: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={[gn]:S?u.t:0,[kn]:S?u.r:0,[xn]:S?u.b:0,[yn]:S?u.l:0};it(t||n,B),it(n,E),Y(r,{cn:u,un:!S,rt:t?E:Y({},B,E)})}return{_n:N}}},Ns=(o,t)=>{const n=Be(),{ht:s,cn:r,ot:c,nt:l,Kt:i,gt:a,yt:d,Ot:m,ln:u}=o,{R:p}=n,f=d&&l,h=U(mn,0),g=["display","direction","flexDirection","writingMode"],v={i:En,o:{w:0,h:0}},V={i:wt,o:{}},y=M=>{m(zn,!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(So,c)),[S,$]=ge(v,U(co,c)),[b,B]=ge(v),[E]=ge(V),[_,C]=ge(v),[x]=ge(V),[k]=ge({i:(M,q)=>Ft(M,q,g),o:{}},()=>zr(c)?We(c,g):{}),[A,T]=ge({i:(M,q)=>wt(M.T,q.T)&&wt(M.D,q.D),o:Hn()},()=>{y(!0);const M=ye(a),q=m(Wr,!0),G=te(i,tt,H=>{const w=ye(a);H.isTrusted&&w.x===M.x&&w.y===M.y&&On(H)},{I:!0,A:!0});Ne(a,{x:0,y:0}),q();const I=ye(a),ee=co(a);Ne(a,{x:ee.w,y:ee.h});const F=ye(a);Ne(a,{x:F.x-I.x<1&&-ee.w,y:F.y-I.y<1&&-ee.h});const R=ye(a);return Ne(a,M),ko(()=>G()),{T:I,D:R}}),K=dt(Yn),Z=(M,q)=>`${q?Pr:qr}${Tr(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(o,t,G,n,M),{it:j,ut:P,_t:J}=z||{},[le,de]=hs(M,n),[W,ce]=M("overflow"),ue=Dt(W.x),_e=Dt(W.y),ie=F||ee||R||H||L||de;let he=N(I),ae=$(I),ne=B(I),me=C(I);if(de&&p&&m(jn,!le),ie){Eo(s,je,Et)&&y(!0);const[Lo]=P?P():[],[ht]=he=D(I),[vt]=ae=S(I),gt=An(c),kt=f&&Rr(u()),ir={w:h(vt.w+ht.w),h:h(vt.h+ht.h)},Oo={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)};Lo&&Lo(),me=_(Oo),ne=b(O(ir,Oo),I)}const[re,fe]=me,[ve,Ye]=ne,[ut,jt]=ae,[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=vs(Ee,W),[rt,st]=x(Oe.G),[,pt]=k(I),Ao=H||w||pt||Pt||I,[lr,cr]=Ao?A(I):T();return ft&&(st&&X(Oe.G),J&&j&&it(c,J(Oe,G,j(Oe,ut,It)))),y(!1),ro(s,je,Et,mt),ro(r,po,Et,mt),Y(t,{G:rt,Vt:{x:re.w,y:re.h},Rt:{x:ve.w,y:ve.h},en:Ee,Pt:jr(lr,ve)}),{nn:st,Zt:fe,tn:Ye,sn:cr||Ye,dn:Ao}}},Ss=o=>{const[t,n,s]=bs(o),r={cn:{t:0,r:0,b:0,l:0},un:!1,rt:{[wn]:0,[bn]:0,[_n]:0,[gn]:0,[kn]:0,[xn]:0,[yn]:0},Vt:{x:0,y:0},Rt:{x:0,y:0},G:{x:qe,y:qe},en:{x:!1,y:!1},Pt:Hn()},{vt:c,gt:l,nt:i}=t,{R:a,M:d}=Be(),m=!a&&(d.x||d.y),u=[Es(t),Vs(t,r),Ns(t,r)];return[n,p=>{const f={},g=m&&ye(l);return Q(u,v=>{Y(f,v(p,f)||{})}),Ne(l,g),!i&&Ne(c,0),f},r,t,s]},$s=(o,t,n,s,r)=>{const c=Qo(t,{}),[l,i,a,d,m]=Ss(o),[u,p,f]=ys(d,a,c,O=>{y({},O)}),[h,g,,v]=ws(o,t,f,a,d,r),V=O=>Le(O).some(D=>!!O[D]),y=(O,D)=>{if(n())return!1;const{fn:N,Tt:S,At:$,pn:b}=O,B=N||{},E=!!S,_={It:Qo(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||!_o(B)||E;return T&&s(O,{Gt:C,Qt:x}),T};return[()=>{const{rn:O,gt:D}=d,N=ye(O),S=[u(),l(),h()];return Ne(D,N),U(be,S)},y,()=>({vn:f,hn:a}),{gn:d,bn:v},m]},Ue=(o,t,n)=>{const{N:s}=Be(),r=Bt(o),c=r?o:o.target,l=qn(c);if(t&&!l){let i=!1;const a=[],d={},m=E=>{const _=Nn(E),C=dt(fs);return C?C(_,!0):_},u=Y({},s(),m(t)),[p,f,h]=fo(),[g,v,V]=fo(n),y=(E,_)=>{V(E,_),h(E,_)},[O,D,N,S,$]=$s(o,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=>{ds(c),be(a),i=!0,y("destroyed",[B,E]),f(),v()},B={options(E,_){if(E){const C=_?s():{},x=Rn(u,Y(C,m(E)));_o(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(a,[$]),is(c,B),Wn(Gn,Ue,[B,p,d]),cs(S.gn.yt,!r&&o.cancel)?(b(!0),B):(se(a,O()),y("initialized",[B]),B.update(!0),B)}return l};Ue.plugin=o=>{const t=$e(o),n=t?o:[o],s=n.map(r=>Wn(r,Ue)[0]);return ms(n),t?s:s[0]};Ue.valid=o=>{const t=o&&o.elements,n=we(t)&&t();return $t(n)&&!!qn(n.target)};Ue.env=()=>{const{k:o,M:t,R:n,V:s,B:r,F:c,P:l,U:i,N:a,q:d}=Be();return Y({},{scrollbarsSize:o,scrollbarsOverlaid:t,scrollbarsHiding:n,scrollTimeline:s,staticDefaultInitialization:r,staticDefaultOptions:c,getDefaultInitialization:l,setDefaultInitialization:i,getDefaultOptions:a,setDefaultOptions:d})};function Bs(){let o;const t=e.ref(null),n=Math.floor(Math.random()*2**32),s=e.ref(!1),r=e.ref([]),c=()=>r.value,l=()=>o.getSelection(),i=()=>r.value.length,a=()=>o.clearSelection(!0),d=e.ref(),m=e.ref(null),u=e.ref(null),p=e.ref(null);function f(){o=new fr({area:t.value,keyboardDrag:!1,selectedClass:"vf-explorer-selected",selectorClass:"vf-explorer-selector"}),o.subscribe("DS:start:pre",({items:D,event:N,isDragging:S})=>{if(S)o.Interaction._reset(N);else{s.value=!1;const $=t.value.offsetWidth-N.offsetX,b=t.value.offsetHeight-N.offsetY;$<15&&b<15&&o.Interaction._reset(N),N.target.classList.contains("os-scrollbar-handle")&&o.Interaction._reset(N)}}),document.addEventListener("dragleave",D=>{!D.buttons&&s.value&&(s.value=!1)})}const h=()=>e.nextTick(()=>{o.addSelection(o.getSelectables()),g()}),g=()=>{r.value=o.getSelection().map(D=>JSON.parse(D.dataset.item)),d.value(r.value)},v=()=>e.nextTick(()=>{const D=c().map(N=>N.path);a(),o.setSettings({selectables:document.getElementsByClassName("vf-item-"+n)}),o.addSelection(o.getSelectables().filter(N=>D.includes(JSON.parse(N.dataset.item).path))),g(),y()}),V=D=>{d.value=D,o.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{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),o.subscribe("DS:scroll",({isDragging:D})=>D||O())}),e.onUnmounted(()=>{o&&o.stop()}),e.onUpdated(()=>{o&&o.Area.reset()}),{area:t,explorerId:n,isDraggingRef:s,scrollBar:u,scrollBarContainer:p,getSelected:c,getSelection:l,selectAll:h,clearSelection:a,refreshSelection:v,getCount:i,onSelect:V}}function Cs(o,t){const n=e.ref(o),s=e.ref(t),r=e.ref([]),c=e.ref([]),l=e.ref([]),i=e.ref(!1),a=e.ref(5);let d=!1,m=!1;const u=e.reactive({adapter:n,storages:[],dirname:s,files:[]});function p(){let y=[],O=[],D=s.value??n.value+"://";D.length===0&&(r.value=[]),D.replace(n.value+"://","").split("/").forEach(function($){y.push($),y.join("/")!==""&&O.push({basename:$,name:$,path:n.value+"://"+y.join("/"),type:"dir"})}),c.value=O;const[N,S]=h(O,a.value);l.value=S,r.value=N}function f(y){a.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)??n.value+"://"});return e.onMounted(()=>{}),e.watch(s,p),e.onMounted(p),{adapter:n,path:s,loading:d,searchMode:m,data:u,breadcrumbs:r,breadcrumbItems:c,limitBreadcrumbItems:f,hiddenBreadcrumbs:l,showHiddenBreadcrumbs:i,toggleHiddenBreadcrumbs:g,isGoUpAvailable:v,parentFolderPath:V}}const Ds=(o,t)=>{const n=xr(o.id),s=mr(),r=n.getStore("metricUnits",!1),c=Nr(n,o.theme),l=t.i18n,i=o.locale??t.locale,a=n.getStore("adapter"),d=p=>Array.isArray(p)?p:br,m=n.getStore("persist-path",o.persist),u=m?n.getStore("path",o.path):o.path;return e.reactive({version:Er,root:null,debug:o.debug,emitter:s,storage:n,i18n:e.computed(()=>wr(n,i,s,l)),modal:Sr(),dragSelect:e.computed(()=>Bs()),requester:yr(o.request),features:d(o.features),view:n.getStore("viewport","grid"),fullScreen:n.getStore("full-screen",o.fullScreen),showTreeView:n.getStore("show-tree-view",o.showTreeView),pinnedFolders:n.getStore("pinned-folders",o.pinnedFolders),treeViewData:[],selectButton:o.selectButton,maxFileSize:o.maxFileSize,theme:c,metricUnits:r,filesize:r?dn:cn,compactListView:n.getStore("compact-list-view",!0),persist:m,showThumbnails:n.getStore("show-thumbnails",o.showThumbnails),fs:Cs(a,u)})},Ts=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),Ms={class:"fixed z-10 inset-0 overflow-hidden"},As={class:"bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Ls={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(o){const t=e.ref(null),n=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(n).modal.close(),["esc"])),tabindex:"0"},[Ts,e.createElementVNode("div",Ms,[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(n).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",As,[e.renderSlot(s.$slots,"default")]),e.createElementVNode("div",Ls,[e.renderSlot(s.$slots,"buttons")])],512)],32)])],32))}},Os=(o,t)=>{const n=o.__vccOpts||o;for(const[s,r]of t)n[s]=r;return n},Fs={props:{on:{type:String,required:!0}},setup(o,{emit:t,slots:n}){const s=e.inject("ServiceContainer"),r=e.ref(!1),{t:c}=s.i18n;let l=null;const i=()=>{clearTimeout(l),r.value=!0,l=setTimeout(()=>{r.value=!1},2e3)};return e.onMounted(()=>{s.emitter.on(o.on,i)}),e.onUnmounted(()=>{clearTimeout(l)}),{shown:r,t:c}}},Hs={key:1};function Rs(o,t,n,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}]])},[o.$slots.default?e.renderSlot(o.$slots,"default",{key:0}):(e.openBlock(),e.createElementBlock("span",Hs,e.toDisplayString(s.t("Saved.")),1))],2)}const Xe=Os(Fs,[["render",Rs]]),zs={class:"sm:flex sm:items-start select-none"},js=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),Is={class:"mt-3 sm:mt-0 sm:ml-4 sm:text-left w-full"},Us={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Ps={class:"flex overflow-auto","aria-label":"Tabs"},qs=["onClick","aria-current"],Gs={key:0,class:"mt-4"},Ks={class:"m-1 text-sm text-gray-500"},Ws={href:"https://vuefinder.ozdemir.be",class:"block mt-2 text-sm text-blue-500 dark:text-blue-400",target:"_blank"},Ys={href:"https://github.com/n1crack/vuefinder",class:"block mt-2 text-sm text-blue-500 dark:text-blue-400",target:"_blank"},Xs={key:1,class:"mt-2"},Js={class:"m-1 text-sm text-gray-500"},Qs={class:"mt-3 text-left"},Zs={class:"space-y-2"},ea={class:"flex relative gap-x-3"},ta={class:"h-6 items-center"},oa={class:"flex-1 block text-sm"},na={for:"metric_unit",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},ra={class:"flex relative gap-x-3"},sa={class:"h-6 items-center"},aa={class:"flex-1 block text-sm"},la={for:"large_icons",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},ca={class:"flex relative gap-x-3"},ia={class:"h-6 items-center"},da={class:"flex-1 block text-sm"},ua={for:"persist_path",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},ma={class:"flex relative gap-x-3"},fa={class:"h-6 items-center"},pa={class:"flex-1 block text-sm"},ha={for:"show_thumbnails",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},va={class:""},ga={class:"h-6 items-center"},ka={for:"theme",class:"flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm"},ya={class:"flex text-sm"},xa=["label"],_a=["value"],wa={key:0,class:""},ba={class:"h-6 items-center"},Ea={for:"language",class:"flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm text-nowrap"},Va={class:"flex text-sm"},Na=["label"],Sa=["value"],$a={key:2,class:"mt-3"},Ba={class:"space-y-2 sm:w-1/2"},Ca={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Da=e.createElementVNode("kbd",null,"F2",-1),Ta={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Ma=e.createElementVNode("kbd",null,"F5",-1),Aa={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},La=e.createElementVNode("kbd",null,"Del",-1),Oa={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Fa=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Esc")],-1),Ha={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Ra=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"A")],-1),za={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},ja=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"F")],-1),Ia={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Ua=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"E")],-1),Pa={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},qa=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,",")],-1),Ga={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Ka=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"Enter")],-1),Wa={key:3,class:"mt-3"},Ya={class:"m-1 text-sm text-gray-500"},Jn={__name:"ModalAbout",setup(o){const t=e.inject("ServiceContainer"),{setStore:n,clearStore:s}=t.storage,{t:r,changeLocale:c,locale:l}=t.i18n,i={ABOUT:"about",SETTINGS:"settings",SHORTCUTS:"shortcuts",RESET:"reset"},a=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?dn:cn,n("metricUnits",t.metricUnits),t.emitter.emit("vf-metric-units-saved")},f=()=>{t.compactListView=!t.compactListView,n("compactListView",t.compactListView),t.emitter.emit("vf-compact-view-saved")},h=()=>{t.showThumbnails=!t.showThumbnails,n("show-thumbnails",t.showThumbnails),t.emitter.emit("vf-show-thumbnails-saved")},g=()=>{t.persist=!t.persist,n("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",zs,[js,e.createElementVNode("div",Is,[e.createElementVNode("h3",Us,e.toDisplayString("Vuefinder "+e.unref(t).version),1),e.createElementVNode("div",null,[e.createElementVNode("div",null,[e.createElementVNode("nav",Ps,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.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,qs))),128))])])]),d.value===i.ABOUT?(e.openBlock(),e.createElementBlock("div",Gs,[e.createElementVNode("div",Ks,e.toDisplayString(e.unref(r)("Vuefinder is a simple, lightweight, and fast file manager library for Vue.js applications")),1),e.createElementVNode("a",Ws,e.toDisplayString(e.unref(r)("Project home")),1),e.createElementVNode("a",Ys,e.toDisplayString(e.unref(r)("Follow on GitHub")),1)])):e.createCommentVNode("",!0),d.value===i.SETTINGS?(e.openBlock(),e.createElementBlock("div",Xs,[e.createElementVNode("div",Js,e.toDisplayString(e.unref(r)("Customize your experience with the following settings.")),1),e.createElementVNode("div",Qs,[e.createElementVNode("fieldset",null,[e.createElementVNode("div",Zs,[e.createElementVNode("div",ea,[e.createElementVNode("div",ta,[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",oa,[e.createElementVNode("label",na,[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",ra,[e.createElementVNode("div",sa,[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",aa,[e.createElementVNode("label",la,[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",ca,[e.createElementVNode("div",ia,[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",da,[e.createElementVNode("label",ua,[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",ma,[e.createElementVNode("div",fa,[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",pa,[e.createElementVNode("label",ha,[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",va,[e.createElementVNode("div",ga,[e.createElementVNode("label",ka,e.toDisplayString(e.unref(r)("Theme")),1)]),e.createElementVNode("div",ya,[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,_a))),256))],8,xa)],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(oe).LANGUAGE)&&Object.keys(e.unref(y)).length>1?(e.openBlock(),e.createElementBlock("div",wa,[e.createElementVNode("div",ba,[e.createElementVNode("label",Ea,e.toDisplayString(e.unref(r)("Language")),1)]),e.createElementVNode("div",Va,[e.withDirectives(e.createElementVNode("select",{id:"language","onUpdate:modelValue":N[6]||(N[6]=S=>e.isRef(l)?l.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,Sa))),256))],8,Na)],544),[[e.vModelSelect,e.unref(l)]]),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",$a,[e.createElementVNode("div",Ba,[e.createElementVNode("div",Ca,[e.createElementVNode("div",null,e.toDisplayString(e.unref(r)("Rename")),1),Da]),e.createElementVNode("div",Ta,[e.createElementVNode("div",null,e.toDisplayString(e.unref(r)("Refresh")),1),Ma]),e.createElementVNode("div",Aa,[e.createTextVNode(e.toDisplayString(e.unref(r)("Delete"))+" ",1),La]),e.createElementVNode("div",Oa,[e.createTextVNode(e.toDisplayString(e.unref(r)("Escape"))+" ",1),Fa]),e.createElementVNode("div",Ha,[e.createTextVNode(e.toDisplayString(e.unref(r)("Select All"))+" ",1),Ra]),e.createElementVNode("div",za,[e.createTextVNode(e.toDisplayString(e.unref(r)("Search"))+" ",1),ja]),e.createElementVNode("div",Ia,[e.createTextVNode(e.toDisplayString(e.unref(r)("Toggle Sidebar"))+" ",1),Ua]),e.createElementVNode("div",Pa,[e.createTextVNode(e.toDisplayString(e.unref(r)("Open Settings"))+" ",1),qa]),e.createElementVNode("div",Ga,[e.createTextVNode(e.toDisplayString(e.unref(r)("Toggle Full Screen"))+" ",1),Ka])])])):e.createCommentVNode("",!0),d.value===i.RESET?(e.openBlock(),e.createElementBlock("div",Wa,[e.createElementVNode("div",Ya,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}))}},Xa=["aria-label"],Ja=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),Qa=[Ja],De={__name:"Message",props:{error:{type:Boolean,default:!1}},emits:["hidden"],setup(o,{emit:t}){var d;const n=t,s=e.inject("ServiceContainer"),{t:r}=s.i18n,c=e.ref(!1),l=e.ref(null),i=e.ref((d=l.value)==null?void 0:d.strMessage);e.watch(i,()=>c.value=!1);const a=()=>{n("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:l,class:e.normalizeClass(["flex mt-2 p-1 px-2 rounded text-sm break-all dark:opacity-75",o.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:a,"aria-label":e.unref(r)("Close"),"data-microtip-position":"top-left",role:"tooltip"},Qa,8,Xa)],2))]))}},Za={class:"sm:flex sm:items-start"},el=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),tl={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},ol={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},nl={class:"mt-2"},rl={class:"text-sm text-gray-500"},sl={class:"text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",style:{"max-height":"200px"}},al={class:"flex text-sm text-gray-800 dark:text-gray-400"},ll={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"},cl=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),il=[cl],dl={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"},ul=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),ml=[ul],fl={class:"ml-1.5"},pl={class:"m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center"},Do={__name:"ModalDelete",setup(o){const t=e.inject("ServiceContainer"),{t:n}=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:l,type:i})=>({path:l,type:i}))},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:n("Files deleted.")})},onError:l=>{r.value=n(l.message)}})};return(l,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(n)("Yes, Delete!")),1),e.createElementVNode("button",{type:"button",onClick:i[1]||(i[1]=a=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(n)("Cancel")),1),e.createElementVNode("div",pl,e.toDisplayString(e.unref(n)("This action cannot be undone.")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Za,[el,e.createElementVNode("div",tl,[e.createElementVNode("h3",ol,e.toDisplayString(e.unref(n)("Delete files")),1),e.createElementVNode("div",nl,[e.createElementVNode("p",rl,e.toDisplayString(e.unref(n)("Are you sure you want to delete these files?")),1),e.createElementVNode("div",sl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,a=>(e.openBlock(),e.createElementBlock("p",al,[a.type==="dir"?(e.openBlock(),e.createElementBlock("svg",ll,il)):(e.openBlock(),e.createElementBlock("svg",dl,ml)),e.createElementVNode("span",fl,e.toDisplayString(a.basename),1)]))),256))]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:i[0]||(i[0]=a=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},hl={class:"sm:flex sm:items-start"},vl=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),gl={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},kl={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},yl={class:"mt-2"},xl={class:"flex text-sm text-gray-800 dark:text-gray-400 py-2"},_l={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"},wl=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),bl=[wl],El={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"},Vl=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),Nl=[Vl],Sl={class:"ml-1.5"},To={__name:"ModalRename",setup(o){const t=e.inject("ServiceContainer"),{t:n}=t.i18n,s=e.ref(t.modal.data.items[0]),r=e.ref(t.modal.data.items[0].basename),c=e.ref(""),l=()=>{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:n("%s is renamed.",r.value)})},onError:i=>{c.value=n(i.message)}})};return(i,a)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:l,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(n)("Rename")),1),e.createElementVNode("button",{type:"button",onClick:a[2]||(a[2]=d=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(n)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",hl,[vl,e.createElementVNode("div",gl,[e.createElementVNode("h3",kl,e.toDisplayString(e.unref(n)("Rename")),1),e.createElementVNode("div",yl,[e.createElementVNode("p",xl,[s.value.type==="dir"?(e.openBlock(),e.createElementBlock("svg",_l,bl)):(e.openBlock(),e.createElementBlock("svg",El,Nl)),e.createElementVNode("span",Sl,e.toDisplayString(s.value.basename),1)]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=d=>r.value=d),onKeyup:e.withKeys(l,["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:a[1]||(a[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 $l(o){const t=n=>{n.code===Te.ESCAPE&&(o.modal.close(),o.root.focus()),!o.modal.visible&&(o.fs.searchMode||(n.code===Te.F2&&o.features.includes(oe.RENAME)&&(o.dragSelect.getCount()!==1||o.modal.open(To,{items:o.dragSelect.getSelected()})),n.code===Te.F5&&o.emitter.emit("vf-fetch",{params:{q:"index",adapter:o.fs.adapter,path:o.fs.data.dirname}}),n.code===Te.DELETE&&(!o.dragSelect.getCount()||o.modal.open(Do,{items:o.dragSelect.getSelected()})),n.metaKey&&n.code===Te.BACKSLASH&&o.modal.open(Jn),n.metaKey&&n.code===Te.KEY_F&&o.features.includes(oe.SEARCH)&&(o.fs.searchMode=!0,n.preventDefault()),n.metaKey&&n.code===Te.KEY_E&&(o.showTreeView=!o.showTreeView,o.storage.setStore("show-tree-view",o.showTreeView)),n.metaKey&&n.code===Te.ENTER&&(o.fullScreen=!o.fullScreen,o.root.focus()),n.metaKey&&n.code===Te.KEY_A&&(o.dragSelect.selectAll(),n.preventDefault())))};e.onMounted(()=>{o.root.addEventListener("keydown",t)}),e.onUnmounted(()=>{o.root.removeEventListener("keydown",t)})}const Bl={class:"sm:flex sm:items-start"},Cl=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),Dl={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Tl={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Ml={class:"mt-2"},Al={class:"text-sm text-gray-500"},Ll=["placeholder"],Qn={__name:"ModalNewFolder",setup(o){const t=e.inject("ServiceContainer");t.storage;const{t:n}=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:n("%s is created.",s.value)})},onError:l=>{r.value=n(l.message)}})};return(l,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(n)("Create")),1),e.createElementVNode("button",{type:"button",onClick:i[2]||(i[2]=a=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(n)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Bl,[Cl,e.createElementVNode("div",Dl,[e.createElementVNode("h3",Tl,e.toDisplayString(e.unref(n)("New Folder")),1),e.createElementVNode("div",Ml,[e.createElementVNode("p",Al,e.toDisplayString(e.unref(n)("Create a new folder")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=a=>s.value=a),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(n)("Folder Name"),type:"text"},null,40,Ll),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:i[1]||(i[1]=a=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},Ol={class:"sm:flex sm:items-start"},Fl=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),Hl={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Rl={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},zl={class:"mt-2"},jl={class:"text-sm text-gray-500"},Il=["placeholder"],Ul={__name:"ModalNewFile",setup(o){const t=e.inject("ServiceContainer");t.storage;const{t:n}=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:n("%s is created.",s.value)})},onError:l=>{r.value=n(l.message)}})};return(l,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(n)("Create")),1),e.createElementVNode("button",{type:"button",onClick:i[2]||(i[2]=a=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(n)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Ol,[Fl,e.createElementVNode("div",Hl,[e.createElementVNode("h3",Rl,e.toDisplayString(e.unref(n)("New File")),1),e.createElementVNode("div",zl,[e.createElementVNode("p",jl,e.toDisplayString(e.unref(n)("Create a new file")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=a=>s.value=a),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(n)("File Name"),type:"text"},null,40,Il),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:i[1]||(i[1]=a=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}};function vo(o,t=14){let n=`((?=([\\w\\W]{0,${t}}))([\\w\\W]{${t+1},})([\\w\\W]{8,}))`;return o.replace(new RegExp(n),"$2..$4")}const Pl={class:"sm:flex sm:items-start"},ql=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),Gl={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Kl={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Wl={class:"mt-2"},Yl={key:0,class:"pointer-events-none"},Xl={key:1,class:"pointer-events-none"},Jl=["disabled"],Ql=["disabled"],Zl={class:"text-gray-500 text-sm mb-1 pr-1 max-h-[200px] overflow-y-auto vf-scrollbar"},ec={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"},tc=["textContent"],oc={class:"ml-1 w-full h-fit"},nc={class:"text-left hidden md:block"},rc={class:"text-left md:hidden"},sc={key:0,class:"ml-auto"},ac=["title","disabled","onClick"],lc=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),cc=[lc],ic={key:0,class:"py-2"},dc=["disabled"],uc={__name:"ModalUpload",setup(o){const t=e.inject("ServiceContainer"),{t:n}=t.i18n,s=n("uppy"),r={PENDING:0,CANCELED:1,UPLOADING:2,ERROR:3,DONE:10},c=e.ref({QUEUE_ENTRY_STATUS:r}),l=e.ref(null),i=e.ref(null),a=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=n("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=n("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 pr({debug:t.debug,restrictions:{maxFileSize:Vr(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:n("Pending upload"),percent:null,originalFile:k.data}),!0}}),v.use(hr,{endpoint:"WILL_BE_REPLACED_BEFORE_UPLOAD",limit:5,timeout:0,getResponseError(k,A){let T;try{T=JSON.parse(k).message}catch{T=n("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=n("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=n("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=n("Network Error, Unable establish connection to the server or interrupted."):T.statusName=A?A.message:n("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",()=>{a.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),a.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(n)("Upload")),11,dc),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(n)("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(n)("Close")),1))]),default:e.withCtx(()=>[e.createElementVNode("div",Pl,[ql,e.createElementVNode("div",Gl,[e.createElementVNode("h3",Kl,e.toDisplayString(e.unref(n)("Upload Files")),1),e.createElementVNode("div",Wl,[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",Yl,e.toDisplayString(e.unref(n)("Release to drop these files.")),1)):(e.openBlock(),e.createElementBlock("div",Xl,e.toDisplayString(e.unref(n)("Drag and drop the files/folders to here or click here.")),1))],512),e.createElementVNode("div",{ref_key:"container",ref:l,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(n)("Select Files")),513),e.createElementVNode("button",{ref_key:"pickFolders",ref:m,type:"button",class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(n)("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(n)("Clear all")),9,Jl),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(n)("Clear only successful")),9,Ql)],512),e.createElementVNode("div",Zl,[(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",ec,[e.createElementVNode("span",{class:e.normalizeClass(["text-base m-auto",O(k)]),textContent:e.toDisplayString(D(k))},null,10,tc)]),e.createElementVNode("div",oc,[e.createElementVNode("div",nc,e.toDisplayString(e.unref(vo)(k.name,40))+" ("+e.toDisplayString(k.size)+")",1),e.createElementVNode("div",rc,e.toDisplayString(e.unref(vo)(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",sc,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(n)("Delete"),disabled:h.value,onClick:A=>b(k)},cc,10,ac)]))),128)),p.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ic,e.toDisplayString(e.unref(n)("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:a,type:"file",multiple:"",webkitdirectory:"",class:"hidden"},null,512)]),_:1}))}},mc={class:"sm:flex sm:items-start"},fc=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),pc={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},hc={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},vc={class:"mt-2"},gc={class:"flex text-sm text-gray-800 dark:text-gray-400"},kc={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"},yc=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),xc=[yc],_c={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"},wc=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),bc=[wc],Ec={class:"ml-1.5"},Vc={class:"my-1 text-sm text-gray-500"},Zn={__name:"ModalUnarchive",setup(o){const t=e.inject("ServiceContainer"),{t:n}=t.i18n,s=e.ref(t.modal.data.items[0]),r=e.ref(""),c=e.ref([]),l=()=>{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:n("The file unarchived.")})},onError:i=>{r.value=n(i.message)}})};return(i,a)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:l,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(n)("Unarchive")),1),e.createElementVNode("button",{type:"button",onClick:a[1]||(a[1]=d=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(n)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",mc,[fc,e.createElementVNode("div",pc,[e.createElementVNode("h3",hc,e.toDisplayString(e.unref(n)("Unarchive")),1),e.createElementVNode("div",vc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,d=>(e.openBlock(),e.createElementBlock("p",gc,[d.type==="dir"?(e.openBlock(),e.createElementBlock("svg",kc,xc)):(e.openBlock(),e.createElementBlock("svg",_c,bc)),e.createElementVNode("span",Ec,e.toDisplayString(d.basename),1)]))),256)),e.createElementVNode("p",Vc,e.toDisplayString(e.unref(n)("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:a[0]||(a[0]=d=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},Nc={class:"sm:flex sm:items-start"},Sc=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),$c={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Bc={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Cc={class:"mt-2"},Dc={class:"text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",style:{"max-height":"200px"}},Tc={class:"flex text-sm text-gray-800 dark:text-gray-400"},Mc={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"},Ac=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),Lc=[Ac],Oc={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"},Fc=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),Hc=[Fc],Rc={class:"ml-1.5"},zc=["placeholder"],er={__name:"ModalArchive",setup(o){const t=e.inject("ServiceContainer"),{t:n}=t.i18n,s=e.ref(""),r=e.ref(""),c=e.ref(t.modal.data.items),l=()=>{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:a})=>({path:i,type:a})),name:s.value},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:n("The file(s) archived.")})},onError:i=>{r.value=n(i.message)}})};return(i,a)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:l,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(n)("Archive")),1),e.createElementVNode("button",{type:"button",onClick:a[2]||(a[2]=d=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(n)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Nc,[Sc,e.createElementVNode("div",$c,[e.createElementVNode("h3",Bc,e.toDisplayString(e.unref(n)("Archive the files")),1),e.createElementVNode("div",Cc,[e.createElementVNode("div",Dc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,d=>(e.openBlock(),e.createElementBlock("p",Tc,[d.type==="dir"?(e.openBlock(),e.createElementBlock("svg",Mc,Lc)):(e.openBlock(),e.createElementBlock("svg",Oc,Hc)),e.createElementVNode("span",Rc,e.toDisplayString(d.basename),1)]))),256))]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=d=>s.value=d),onKeyup:e.withKeys(l,["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(n)("Archive name. (.zip file will be created)"),type:"text"},null,40,zc),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:a[1]||(a[1]=d=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},jc={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"},Ic=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),Uc=[Ic];function Pc(o,t){return e.openBlock(),e.createElementBlock("svg",jc,[...Uc])}const qc={render:Pc},Gc={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"},Kc=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),Wc=[Kc];function Yc(o,t){return e.openBlock(),e.createElementBlock("svg",Gc,[...Wc])}const Xc={render:Yc},Jc={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"},Qc=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),Zc=[Qc];function ei(o,t){return e.openBlock(),e.createElementBlock("svg",Jc,[...Zc])}const ti={render:ei},oi={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"},ni=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),ri=[ni];function si(o,t){return e.openBlock(),e.createElementBlock("svg",oi,[...ri])}const ai={render:si},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"},ci=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),ii=[ci];function di(o,t){return e.openBlock(),e.createElementBlock("svg",li,[...ii])}const ui={render:di},mi={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"},fi=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),pi=[fi];function hi(o,t){return e.openBlock(),e.createElementBlock("svg",mi,[...pi])}const vi={render:hi},gi={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"},ki=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),yi=[ki];function xi(o,t){return e.openBlock(),e.createElementBlock("svg",gi,[...yi])}const _i={render:xi},wi={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"},bi=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),Ei=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),Vi=[bi,Ei];function Ni(o,t){return e.openBlock(),e.createElementBlock("svg",wi,[...Vi])}const Mo={render:Ni},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 vf-toolbar-icon",viewBox:"0 0 24 24"},$i=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),Bi=[$i];function Ci(o,t){return e.openBlock(),e.createElementBlock("svg",Si,[...Bi])}const Di={render:Ci},Ti={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"},Mi=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),Ai=[Mi];function Li(o,t){return e.openBlock(),e.createElementBlock("svg",Ti,[...Ai])}const Oi={render:Li},Fi={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"},Hi=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),Ri=[Hi];function zi(o,t){return e.openBlock(),e.createElementBlock("svg",Fi,[...Ri])}const ji={render:zi},Ii={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"},Ui=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),Pi=[Ui];function qi(o,t){return e.openBlock(),e.createElementBlock("svg",Ii,[...Pi])}const Gi={render:qi},Ki={class:"border-neutral-300 flex justify-between items-center py-1 text-sm grow-0"},Wi={key:0,class:"flex text-center"},Yi=["aria-label"],Xi=["aria-label"],Ji=["aria-label"],Qi=["aria-label"],Zi=["aria-label"],ed=["aria-label"],td=["aria-label"],od={key:1,class:"flex text-center"},nd={class:"pl-2"},rd={class:"dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded"},sd={class:"flex text-center items-center justify-end"},ad=["aria-label"],ld=["aria-label"],cd={__name:"Toolbar",setup(o){const t=e.inject("ServiceContainer"),{setStore:n}=t.storage,{t:s}=t.i18n,r=t.dragSelect,c=e.ref("");t.emitter.on("vf-search-query",({newQuery:a})=>{c.value=a});const l=()=>{t.fullScreen=!t.fullScreen};e.watch(()=>t.fullScreen,()=>{t.fullScreen?document.querySelector("body").style.overflow="hidden":document.querySelector("body").style.overflow="",n("full-screen",t.fullScreen),t.emitter.emit("vf-fullscreen-toggle")});const i=()=>{t.view=t.view==="list"?"grid":"list",r.refreshSelection(),n("viewport",t.view)};return(a,d)=>(e.openBlock(),e.createElementBlock("div",Ki,[c.value.length?(e.openBlock(),e.createElementBlock("div",od,[e.createElementVNode("div",nd,[e.createTextVNode(e.toDisplayString(e.unref(s)("Search results for"))+" ",1),e.createElementVNode("span",rd,e.toDisplayString(c.value),1)]),e.unref(t).fs.loading?(e.openBlock(),e.createBlock(e.unref(Mo),{key:0})):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Wi,[e.unref(t).features.includes(e.unref(oe).NEW_FOLDER)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mx-1.5","aria-label":e.unref(s)("New Folder"),"data-microtip-position":"bottom-right",role:"tooltip",onClick:d[0]||(d[0]=m=>e.unref(t).modal.open(Qn,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(qc))],8,Yi)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(oe).NEW_FILE)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"mx-1.5","aria-label":e.unref(s)("New File"),"data-microtip-position":"bottom",role:"tooltip",onClick:d[1]||(d[1]=m=>e.unref(t).modal.open(Ul,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(Xc))],8,Xi)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(oe).RENAME)?(e.openBlock(),e.createElementBlock("div",{key:2,class:"mx-1.5","aria-label":e.unref(s)("Rename"),"data-microtip-position":"bottom",role:"tooltip",onClick:d[2]||(d[2]=m=>e.unref(r).getCount()!==1||e.unref(t).modal.open(To,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(ti),{class:e.normalizeClass(e.unref(r).getCount()===1?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Ji)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(oe).DELETE)?(e.openBlock(),e.createElementBlock("div",{key:3,class:"mx-1.5","aria-label":e.unref(s)("Delete"),"data-microtip-position":"bottom",role:"tooltip",onClick:d[3]||(d[3]=m=>!e.unref(r).getCount()||e.unref(t).modal.open(Do,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(ai),{class:e.normalizeClass(e.unref(r).getCount()?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Qi)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(oe).UPLOAD)?(e.openBlock(),e.createElementBlock("div",{key:4,class:"mx-1.5","aria-label":e.unref(s)("Upload"),"data-microtip-position":"bottom",role:"tooltip",onClick:d[4]||(d[4]=m=>e.unref(t).modal.open(uc,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(ui))],8,Zi)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(oe).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","aria-label":e.unref(s)("Unarchive"),"data-microtip-position":"bottom",role:"tooltip",onClick:d[5]||(d[5]=m=>!e.unref(r).getCount()||e.unref(t).modal.open(Zn,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(_i),{class:e.normalizeClass(e.unref(r).getCount()?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,ed)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(oe).ARCHIVE)?(e.openBlock(),e.createElementBlock("div",{key:6,class:"mx-1.5","aria-label":e.unref(s)("Archive"),"data-microtip-position":"bottom",role:"tooltip",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(vi),{class:e.normalizeClass(e.unref(r).getCount()?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,td)):e.createCommentVNode("",!0)])),e.createElementVNode("div",sd,[e.unref(t).features.includes(e.unref(oe).FULL_SCREEN)?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:l,class:"mx-1.5","aria-label":e.unref(s)("Toggle Full Screen"),"data-microtip-position":"bottom-left",role:"tooltip"},[e.unref(t).fullScreen?(e.openBlock(),e.createBlock(e.unref(Oi),{key:0})):(e.openBlock(),e.createBlock(e.unref(Di),{key:1}))],8,ad)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(s)("Change View"),"data-microtip-position":"bottom-left",role:"tooltip",onClick:d[7]||(d[7]=m=>c.value.length||i())},[e.unref(t).view==="grid"?(e.openBlock(),e.createBlock(e.unref(ji),{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(Gi),{key:1,class:e.normalizeClass(c.value.length?"vf-toolbar-icon-disabled":"vf-toolbar-icon")},null,8,["class"])):e.createCommentVNode("",!0)],8,ld)])]))}},id=(o,t=0,n=!1)=>{let s;return(...r)=>{n&&!s&&o(...r),clearTimeout(s),s=setTimeout(()=>{o(...r)},t)}},an=(o,t,n)=>{const s=e.ref(o);return e.customRef((r,c)=>({get(){return r(),s.value},set:id(l=>{s.value=l,c()},t,n)}))},dd={class:"sm:flex sm:items-start"},ud=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),md={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},fd={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},pd={class:"text-sm text-gray-500 pb-1"},hd={class:"max-h-[200px] overflow-y-auto vf-scrollbar text-left"},vd={class:"flex text-sm text-gray-800 dark:text-gray-400"},gd={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"},kd=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),yd=[kd],xd={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"},_d=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),wd=[_d],bd={class:"ml-1.5"},Ed={class:"font-bold text-xs text-gray-700 dark:text-gray-500 mt-3 tracking-wider"},Vd={class:"flex text-sm text-gray-800 dark:text-gray-400 border dark:border-gray-700 p-1 rounded"},Nd=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),Sd={class:"ml-1.5 overflow-auto"},$d={class:"m-1 mr-auto font-bold text-gray-500 text-sm dark:text-gray-200 self-center"},go={__name:"ModalMove",setup(o){const t=e.inject("ServiceContainer"),{t:n}=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:l,type:i})=>({path:l,type:i})),item:t.modal.data.items.to.path},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:n("Files moved.",t.modal.data.items.to.name)})},onError:l=>{r.value=n(l.message)}})};return(l,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(n)("Yes, Move!")),1),e.createElementVNode("button",{type:"button",onClick:i[1]||(i[1]=a=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(n)("Cancel")),1),e.createElementVNode("div",$d,e.toDisplayString(e.unref(n)("%s item(s) selected.",s.value.length)),1)]),default:e.withCtx(()=>[e.createElementVNode("div",dd,[ud,e.createElementVNode("div",md,[e.createElementVNode("h3",fd,e.toDisplayString(e.unref(n)("Move files")),1),e.createElementVNode("p",pd,e.toDisplayString(e.unref(n)("Are you sure you want to move these files?")),1),e.createElementVNode("div",hd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,a=>(e.openBlock(),e.createElementBlock("div",vd,[e.createElementVNode("div",null,[a.type==="dir"?(e.openBlock(),e.createElementBlock("svg",gd,yd)):(e.openBlock(),e.createElementBlock("svg",xd,wd))]),e.createElementVNode("div",bd,e.toDisplayString(a.path),1)]))),256))]),e.createElementVNode("h4",Ed,e.toDisplayString(e.unref(n)("Target Directory")),1),e.createElementVNode("p",Vd,[Nd,e.createElementVNode("span",Sd,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]=a=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])]),_:1}))}},Bd={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"},Cd=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),Dd=[Cd];function Td(o,t){return e.openBlock(),e.createElementBlock("svg",Bd,[...Dd])}const Md={render:Td},Ad={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-0.5 rounded",viewBox:"0 0 20 20"},Ld=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),Od=[Ld];function Fd(o,t){return e.openBlock(),e.createElementBlock("svg",Ad,[...Od])}const Hd={render:Fd},Rd={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"},zd=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1),jd=[zd];function Id(o,t){return e.openBlock(),e.createElementBlock("svg",Rd,[...jd])}const Ud={render:Id},Pd={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"},qd=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),Gd=[qd];function Kd(o,t){return e.openBlock(),e.createElementBlock("svg",Pd,[...Gd])}const Wd={render:Kd},Yd={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"},Xd=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),Jd=[Xd];function Qd(o,t){return e.openBlock(),e.createElementBlock("svg",Yd,[...Jd])}const Zd={render:Qd},eu={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"},tu=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1),ou=[tu];function nu(o,t){return e.openBlock(),e.createElementBlock("svg",eu,[...ou])}const ru={render:nu},su={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"},au=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),lu=[au];function cu(o,t){return e.openBlock(),e.createElementBlock("svg",su,[...lu])}const zt={render:cu},iu={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"},du=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),uu=e.createElementVNode("path",{d:"M9 6h11M12 12h8M15 18h5M5 6v.01M8 12v.01M11 18v.01"},null,-1),mu=[du,uu];function fu(o,t){return e.openBlock(),e.createElementBlock("svg",iu,[...mu])}const pu={render:fu},hu={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"},vu=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),gu=[vu];function ku(o,t){return e.openBlock(),e.createElementBlock("svg",hu,[...gu])}const yu={render:ku},xu={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"},_u=["aria-label"],wu=["aria-label"],bu=["aria-label"],Eu=["aria-label"],Vu={class:"flex leading-6"},Nu={key:0,class:"flex"},Su=e.createElementVNode("div",{class:"text-neutral-300 dark:text-gray-600 mx-0.5"},"/",-1),$u={class:"relative"},Bu=e.createElementVNode("span",{class:"text-neutral-300 dark:text-gray-600 mx-0.5"},"/",-1),Cu=["onDragover","onDragleave","onDrop","title","onClick"],Du={class:"relative flex bg-white dark:bg-gray-700 justify-between items-center rounded p-1 ml-2 w-full"},Tu=["placeholder"],Mu={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"},Au=["onDrop","onClick"],Lu={class:"flex pointer-events-none"},Ou={class:"inline-block w-full text-ellipsis overflow-hidden"},Fu={__name:"Breadcrumb",setup(o){const t=e.inject("ServiceContainer"),{t:n}=t.i18n,s=t.dragSelect,{setStore:r}=t.storage,c=e.ref(null),l=an(0,100);e.watch(l,$=>{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>l.value-40);x--)B+=parseInt(b[x].offsetWidth,10),E++;E_&&(E=_),t.fs.limitBreadcrumbItems(E)})});const i=()=>{l.value=c.value.offsetWidth};e.onMounted(()=>{new ResizeObserver(i).observe(c.value)});const a=($,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(go,{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(go,{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(oe.SEARCH)&&(t.fs.searchMode=!0,e.nextTick(()=>y.value.focus()))},D=an("",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",xu,[e.createElementVNode("span",{"aria-label":e.unref(n)("Toggle Tree View"),"data-microtip-position":"bottom-right",role:"tooltip"},[e.createVNode(e.unref(pu),{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,_u),e.createElementVNode("span",{"aria-label":e.unref(n)("Go up a directory"),"data-microtip-position":"bottom-right",role:"tooltip"},[e.createVNode(e.unref(Hd),{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,wu),e.unref(t).fs.loading?(e.openBlock(),e.createElementBlock("span",{key:1,"aria-label":e.unref(n)("Cancel"),"data-microtip-position":"bottom-right",role:"tooltip"},[e.createVNode(e.unref(Ud),{onClick:b[3]||(b[3]=B=>e.unref(t).emitter.emit("vf-fetch-abort"))})],8,Eu)):(e.openBlock(),e.createElementBlock("span",{key:0,"aria-label":e.unref(n)("Refresh"),"data-microtip-position":"bottom-right",role:"tooltip"},[e.createVNode(e.unref(Md),{onClick:p})],8,bu)),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(Wd),{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",Vu,[e.unref(t).fs.hiddenBreadcrumbs.length?e.withDirectives((e.openBlock(),e.createElementBlock("div",Nu,[Su,e.createElementVNode("div",$u,[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(yu),{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},[Bu,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,Cu)]))),128))],512),e.unref(t).fs.loading?(e.openBlock(),e.createBlock(e.unref(Mo),{key:0})):e.createCommentVNode("",!0)],512),[[e.vShow,!e.unref(t).fs.searchMode]]),e.withDirectives(e.createElementVNode("div",Du,[e.createElementVNode("div",null,[e.createVNode(e.unref(Zd))]),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(n)("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,Tu),[[e.vModelText,e.unref(D)]]),e.createVNode(e.unref(ru),{onClick:N})],512),[[e.vShow,e.unref(t).fs.searchMode]]),e.withDirectives(e.createElementVNode("div",Mu,[(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:_=>a(_,E),onClick:_=>h(B),class:"px-2 py-0.5 hover:bg-gray-400/20 cursor-pointer items-center whitespace-nowrap"},[e.createElementVNode("div",Lu,[e.createElementVNode("span",null,[e.createVNode(e.unref(zt),{class:"h-5 w-5"})]),e.createTextVNode(),e.createElementVNode("span",Ou,e.toDisplayString(B.name),1)])],40,Au))),128))],512),[[e.vShow,e.unref(t).fs.showHiddenBreadcrumbs]])]))}},tr=(o,t=null)=>new Date(o*1e3).toLocaleString(t??navigator.language??"en-US"),Hu=["onClick"],Ru={__name:"Toast",setup(o){const t=e.inject("ServiceContainer"),{getStore:n}=t.storage,s=e.ref(n("full-screen",!1)),r=e.ref([]),c=a=>a==="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",l=a=>{r.value.splice(a,1)},i=a=>{let d=r.value.findIndex(m=>m.id===a);d!==-1&&l(d)};return t.emitter.on("vf-toast-clear",()=>{r.value=[]}),t.emitter.on("vf-toast-push",a=>{let d=new Date().getTime().toString(36).concat(performance.now().toString(),Math.random().toString()).replace(/\./g,"");a.id=d,r.value.push(a),setTimeout(()=>{i(d)},5e3)}),(a,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=>l(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,Hu))),128))]),_:1})],2))}},zu={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 20 20"},ju=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),Iu=[ju];function Uu(o,t){return e.openBlock(),e.createElementBlock("svg",zu,[...Iu])}const Pu={render:Uu},qu={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 20 20"},Gu=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),Ku=[Gu];function Wu(o,t){return e.openBlock(),e.createElementBlock("svg",qu,[...Ku])}const Yu={render:Wu},_t={__name:"SortIcon",props:{direction:String},setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("div",null,[o.direction==="asc"?(e.openBlock(),e.createBlock(e.unref(Pu),{key:0})):e.createCommentVNode("",!0),o.direction==="desc"?(e.openBlock(),e.createBlock(e.unref(Yu),{key:1})):e.createCommentVNode("",!0)]))}},Xu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"text-neutral-500",viewBox:"0 0 24 24"},Ju=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),Qu=[Ju];function Zu(o,t){return e.openBlock(),e.createElementBlock("svg",Xu,[...Qu])}const em={render:Zu},Xt={__name:"ItemIcon",props:{type:{type:String,required:!0},small:{type:Boolean,default:!1}},setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("span",null,[o.type==="dir"?(e.openBlock(),e.createBlock(e.unref(zt),{key:0,class:e.normalizeClass({"h-5 w-5":o.small,"h-10 w-10 md:h-12 md:w-12 m-auto":!o.small})},null,8,["class"])):(e.openBlock(),e.createBlock(e.unref(em),{key:1,class:e.normalizeClass({"h-5 w-5":o.small,"h-10 w-10 md:h-12 md:w-12 m-auto":!o.small})},null,8,["class"]))]))}},tm={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"},om=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),nm=[om];function rm(o,t){return e.openBlock(),e.createElementBlock("svg",tm,[...nm])}const sm={render:rm},am={class:"absolute -z-50 -top-96"},lm={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"},cm={__name:"DragItem",props:{count:{type:Number,default:0}},setup(o){const t=o;return(n,s)=>(e.openBlock(),e.createElementBlock("div",am,[e.createVNode(e.unref(sm)),e.createElementVNode("div",lm,e.toDisplayString(t.count),1)]))}},im={class:"flex"},dm=["aria-label"],um={class:"ml-auto mb-2"},mm={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"},fm={key:1},pm={__name:"Text",emits:["success"],setup(o,{emit:t}){const n=t,s=e.ref(""),r=e.ref(""),c=e.ref(null),l=e.ref(!1),i=e.ref(""),a=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,n("success")})});const u=()=>{l.value=!l.value,r.value=s.value},p=()=>{i.value="",a.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,n("success"),l.value=!l.value}).catch(f=>{i.value=m(f.message),a.value=!0})};return(f,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",im,[e.createElementVNode("div",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":e.unref(d).modal.data.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(e.unref(d).modal.data.item.basename),9,dm),e.createElementVNode("div",um,[l.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(oe).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(l.value?e.unref(m)("Cancel"):e.unref(m)("Edit")),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[l.value?(e.openBlock(),e.createElementBlock("div",fm,[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",mm,e.toDisplayString(s.value),1)),i.value.length?(e.openBlock(),e.createBlock(De,{key:2,onHidden:h[2]||(h[2]=g=>i.value=""),error:a.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)])],64))}},hm={class:"flex"},vm=["aria-label"],gm={class:"ml-auto mb-2"},km={class:"w-full flex justify-center"},ym=["src"],xm={__name:"Image",emits:["success"],setup(o,{emit:t}){const n=t,s=e.inject("ServiceContainer"),{t:r}=s.i18n,c=e.ref(null),l=e.ref(null),i=e.ref(!1),a=e.ref(""),d=e.ref(!1),m=()=>{i.value=!i.value,i.value?l.value=new gr(c.value,{crop(p){}}):l.value.destroy()},u=()=>{l.value.getCroppedCanvas({width:795,height:341}).toBlob(p=>{a.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=>{a.value=r("Updated."),c.value.src=s.requester.getPreviewUrl(s.modal.data.adapter,s.modal.data.item),m(),n("success")}).catch(h=>{a.value=r(h.message),d.value=!0})})};return e.onMounted(()=>{n("success")}),(p,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",hm,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":e.unref(s).modal.data.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(e.unref(s).modal.data.item.basename),9,vm),e.createElementVNode("div",gm,[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(oe).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",km,[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,ym)]),a.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:f[1]||(f[1]=h=>a.value=""),error:d.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)],64))}},_m={class:"flex"},wm=["aria-label"],bm=e.createElementVNode("div",null,null,-1),Em={__name:"Default",emits:["success"],setup(o,{emit:t}){const n=e.inject("ServiceContainer"),s=t;return e.onMounted(()=>{s("success")}),(r,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",_m,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":e.unref(n).modal.data.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(e.unref(n).modal.data.item.basename),9,wm)]),bm],64))}},Vm=["aria-label"],Nm={class:"w-full aspect-video",preload:"",controls:""},Sm=["src"],$m={__name:"Video",emits:["success"],setup(o,{emit:t}){const n=e.inject("ServiceContainer"),s=t,r=()=>n.requester.getPreviewUrl(n.modal.data.adapter,n.modal.data.item);return e.onMounted(()=>{s("success")}),(c,l)=>(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","aria-label":e.unref(n).modal.data.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(e.unref(n).modal.data.item.basename),9,Vm),e.createElementVNode("div",null,[e.createElementVNode("video",Nm,[e.createElementVNode("source",{src:r(),type:"video/mp4"},null,8,Sm),e.createTextVNode(" Your browser does not support the video tag. ")])])]))}},Bm=["aria-label"],Cm={class:"w-full",controls:""},Dm=["src"],Tm={__name:"Audio",emits:["success"],setup(o,{emit:t}){const n=t,s=e.inject("ServiceContainer"),r=()=>s.requester.getPreviewUrl(s.modal.data.adapter,s.modal.data.item);return e.onMounted(()=>{n("success")}),(c,l)=>(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","aria-label":e.unref(s).modal.data.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(e.unref(s).modal.data.item.basename),9,Bm),e.createElementVNode("div",null,[e.createElementVNode("audio",Cm,[e.createElementVNode("source",{src:r(),type:"audio/mpeg"},null,8,Dm),e.createTextVNode(" Your browser does not support the audio element. ")])])],64))}},Mm=["aria-label"],Am=["data"],Lm=["src"],Om=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),Fm=[Om],Hm={__name:"Pdf",emits:["success"],setup(o,{emit:t}){const n=e.inject("ServiceContainer"),s=t,r=()=>n.requester.getPreviewUrl(n.modal.data.adapter,n.modal.data.item);return e.onMounted(()=>{s("success")}),(c,l)=>(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","aria-label":e.unref(n).modal.data.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(e.unref(n).modal.data.item.basename),9,Mm),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%"},Fm,8,Lm)],8,Am)])],64))}},Rm={class:"sm:flex sm:items-start"},zm={class:"mt-3 text-center sm:mt-0 sm:text-left w-full"},jm={key:0},Im={class:"text-gray-700 dark:text-gray-200 text-sm"},Um={key:0,class:"flex leading-5"},Pm=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),qm={class:"py-2 flex font-normal break-all dark:text-gray-200 rounded text-xs"},Gm={class:"font-bold"},Km={class:"font-bold pl-2"},Wm={key:0,class:"text-xs text-gray-600 dark:text-gray-400"},Ym=["download","href"],or={__name:"ModalPreview",setup(o){const t=e.inject("ServiceContainer"),{t:n}=t.i18n,s=e.ref(!1),r=l=>(t.modal.data.item.mime_type??"").startsWith(l),c=t.features.includes(oe.PREVIEW);return c||(s.value=!0),(l,i)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:i[6]||(i[6]=a=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(n)("Close")),1),e.unref(t).features.includes(e.unref(oe).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(n)("Download")),9,Ym)):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createElementVNode("div",Rm,[e.createElementVNode("div",zm,[e.unref(c)?(e.openBlock(),e.createElementBlock("div",jm,[r("text")?(e.openBlock(),e.createBlock(pm,{key:0,onSuccess:i[0]||(i[0]=a=>s.value=!0)})):r("image")?(e.openBlock(),e.createBlock(xm,{key:1,onSuccess:i[1]||(i[1]=a=>s.value=!0)})):r("video")?(e.openBlock(),e.createBlock($m,{key:2,onSuccess:i[2]||(i[2]=a=>s.value=!0)})):r("audio")?(e.openBlock(),e.createBlock(Tm,{key:3,onSuccess:i[3]||(i[3]=a=>s.value=!0)})):r("application/pdf")?(e.openBlock(),e.createBlock(Hm,{key:4,onSuccess:i[4]||(i[4]=a=>s.value=!0)})):(e.openBlock(),e.createBlock(Em,{key:5,onSuccess:i[5]||(i[5]=a=>s.value=!0)}))])):e.createCommentVNode("",!0),e.createElementVNode("div",Im,[s.value===!1?(e.openBlock(),e.createElementBlock("div",Um,[Pm,e.createElementVNode("span",null,e.toDisplayString(e.unref(n)("Loading")),1)])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",qm,[e.createElementVNode("div",null,[e.createElementVNode("span",Gm,e.toDisplayString(e.unref(n)("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",Km,e.toDisplayString(e.unref(n)("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(oe).DOWNLOAD)?(e.openBlock(),e.createElementBlock("div",Wm,[e.createElementVNode("span",null,e.toDisplayString(e.unref(n)(`Download doesn't work? You can try right-click "Download" button, select "Save link as...".`)),1)])):e.createCommentVNode("",!0)]),_:1}))}},Xm={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"},Jm=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),Qm=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),Zm=[Jm,Qm];function e0(o,t){return e.openBlock(),e.createElementBlock("svg",Xm,[...Zm])}const nr={render:e0},t0=["data-type","data-item","data-index"],Jt={__name:"Item",props:{item:{type:Object},index:{type:Number},dragImage:{type:Object}},setup(o){const t=e.inject("ServiceContainer"),n=t.dragSelect,s=o,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(or,{adapter:t.fs.adapter,item:f})},c={mounted(f,h,g,v){g.props.draggable&&(f.addEventListener("dragstart",V=>l(V,h.value)),f.addEventListener("dragover",V=>a(V,h.value)),f.addEventListener("drop",V=>i(V,h.value)))},beforeUnmount(f,h,g,v){g.props.draggable&&(f.removeEventListener("dragstart",l),f.removeEventListener("dragover",a),f.removeEventListener("drop",i))}},l=(f,h)=>{if(f.altKey||f.ctrlKey||f.metaKey)return f.preventDefault(),!1;n.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(n.getSelected()))},i=(f,h)=>{f.preventDefault(),n.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(go,{items:{from:g,to:h}})},a=(f,h)=>{f.preventDefault(),!h||h.type!=="dir"||n.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(n).isDraggingRef.value&&e.unref(n).getSelection().find(g=>f.$el===g)?"0.5 !important":""}),class:e.normalizeClass(["vf-item-"+e.unref(n).explorerId,"relative"]),"data-type":o.item.type,key:o.item.path,"data-item":JSON.stringify(o.item),"data-index":o.index,onDblclick:h[0]||(h[0]=g=>r(o.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(n).getSelected(),target:o.item}),["prevent"]))},[e.renderSlot(f.$slots,"default"),e.unref(t).pinnedFolders.find(g=>g.path===o.item.path)?(e.openBlock(),e.createBlock(e.unref(nr),{key:0,class:"absolute top-0 right-0 text-amber-600"})):e.createCommentVNode("",!0)],46,t0)),[[c,o.item]])}},o0={class:"relative flex-auto flex flex-col"},n0={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"},r0={class:"relative"},s0={class:"grid grid-cols-12 items-center"},a0={class:"flex col-span-7 items-center"},l0={class:"overflow-ellipsis overflow-hidden whitespace-nowrap"},c0={class:"col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap"},i0={class:"grid grid-cols-12 items-center"},d0={class:"flex col-span-7 items-center"},u0={class:"overflow-ellipsis overflow-hidden whitespace-nowrap"},m0={class:"col-span-2 text-center"},f0={class:"col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap px-1 md:px-3"},p0={class:"relative"},h0=["data-src","alt"],v0={key:2,class:"absolute hidden md:block top-1/2 w-full text-center text-neutral-500"},g0={class:"break-all"},k0={__name:"Explorer",setup(o){const t=e.inject("ServiceContainer"),{t:n}=t.i18n,s=u=>u==null?void 0:u.substring(0,3),r=e.ref(null),c=e.ref(""),l=t.dragSelect;let i;t.emitter.on("vf-fullscreen-toggle",()=>{l.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:n("No search result found.")})}}):t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname}})});const a=e.reactive({active:!1,column:"",order:""}),d=(u=!0)=>{let p=[...t.fs.data.files],f=a.column,h=a.order==="asc"?1:-1;if(!u)return p;const g=(v,V)=>typeof v=="string"&&typeof V=="string"?v.toLowerCase().localeCompare(V.toLowerCase()):vV?1:0;return a.active&&(p=p.slice().sort((v,V)=>g(v[f],V[f])*h)),p},m=u=>{a.active&&a.column===u?(a.active=a.order==="asc",a.column=u,a.order="desc"):(a.active=!0,a.column=u,a.order="asc")};return e.onMounted(()=>{i=new vr(l.area.value)}),e.onUpdated(()=>{i.update()}),e.onBeforeUnmount(()=>{i.destroy()}),(u,p)=>(e.openBlock(),e.createElementBlock("div",o0,[e.unref(t).view==="list"||c.value.length?(e.openBlock(),e.createElementBlock("div",n0,[e.createElementVNode("div",{onClick:p[0]||(p[0]=f=>m("basename")),class:"col-span-7 vf-sort-button"},[e.createTextVNode(e.toDisplayString(e.unref(n)("Name"))+" ",1),e.withDirectives(e.createVNode(_t,{direction:a.order},null,8,["direction"]),[[e.vShow,a.active&&a.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(n)("Size"))+" ",1),e.withDirectives(e.createVNode(_t,{direction:a.order},null,8,["direction"]),[[e.vShow,a.active&&a.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(n)("Date"))+" ",1),e.withDirectives(e.createVNode(_t,{direction:a.order},null,8,["direction"]),[[e.vShow,a.active&&a.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(n)("Filepath"))+" ",1),e.withDirectives(e.createVNode(_t,{direction:a.order},null,8,["direction"]),[[e.vShow,a.active&&a.column==="path"]])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",r0,[e.createVNode(cm,{ref_key:"dragImage",ref:r,count:e.unref(l).getCount()},null,8,["count"])]),e.createElementVNode("div",{ref:e.unref(l).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(l).scrollBar,class:"w-5 bg-transparent pointer-events-none"},null,512)],2),e.createElementVNode("div",{ref:e.unref(l).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(l).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",s0,[e.createElementVNode("div",a0,[e.createVNode(Xt,{type:f.type,small:e.unref(t).compactListView},null,8,["type","small"]),e.createElementVNode("span",l0,e.toDisplayString(f.basename),1)]),e.createElementVNode("div",c0,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",i0,[e.createElementVNode("div",d0,[e.createVNode(Xt,{type:f.type,small:e.unref(t).compactListView},null,8,["type","small"]),e.createElementVNode("span",u0,e.toDisplayString(f.basename),1)]),e.createElementVNode("div",m0,e.toDisplayString(f.file_size?e.unref(t).filesize(f.file_size):""),1),e.createElementVNode("div",f0,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",p0,[(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,h0)):(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",v0,e.toDisplayString(s(f.extension)),1)):e.createCommentVNode("",!0)]),e.createElementVNode("span",g0,e.toDisplayString(e.unref(vo)(f.basename)),1)])]),_:2},1032,["item","index","dragImage"]))),256)):e.createCommentVNode("",!0)],544),e.createVNode(Ru)]))}},y0=["href","download"],x0=["onClick"],_0={__name:"ContextMenu",setup(o){const t=e.inject("ServiceContainer"),{t:n}=t.i18n,s=e.ref(null),r=e.ref([]),c=e.ref(""),l=e.reactive({active:!1,items:[],positions:{left:0,top:0}}),i=e.computed(()=>l.items.filter(u=>u.key==null||t.features.includes(u.key)));t.emitter.on("vf-context-selected",u=>{r.value=u});const a={newfolder:{key:oe.NEW_FOLDER,title:()=>n("New Folder"),action:()=>t.modal.open(Qn)},selectAll:{title:()=>n("Select All"),action:()=>t.dragSelect.selectAll()},pinFolder:{title:()=>n("Pin Folder"),action:()=>{t.pinnedFolders=t.pinnedFolders.concat(r.value),t.storage.setStore("pinned-folders",t.pinnedFolders)}},unpinFolder:{title:()=>n("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:oe.DELETE,title:()=>n("Delete"),action:()=>{t.modal.open(Do,{items:r})}},refresh:{title:()=>n("Refresh"),action:()=>{t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname}})}},preview:{key:oe.PREVIEW,title:()=>n("Preview"),action:()=>t.modal.open(or,{adapter:t.fs.adapter,item:r.value[0]})},open:{title:()=>n("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:()=>n("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:oe.DOWNLOAD,link:e.computed(()=>t.requester.getDownloadUrl(t.fs.adapter,r.value[0])),title:()=>n("Download"),action:()=>{}},archive:{key:oe.ARCHIVE,title:()=>n("Archive"),action:()=>t.modal.open(er,{items:r})},unarchive:{key:oe.UNARCHIVE,title:()=>n("Unarchive"),action:()=>t.modal.open(Zn,{items:r})},rename:{key:oe.RENAME,title:()=>n("Rename"),action:()=>t.modal.open(To,{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(l.items=[],c.value)if(f)l.items.push(a.openDir),t.emitter.emit("vf-context-selected",[f]);else return;else!f&&!c.value?(l.items.push(a.refresh),l.items.push(a.selectAll),l.items.push(a.newfolder),t.emitter.emit("vf-context-selected",[])):p.length>1&&p.some(h=>h.path===f.path)?(l.items.push(a.refresh),l.items.push(a.archive),l.items.push(a.delete),t.emitter.emit("vf-context-selected",p)):(f.type==="dir"?(l.items.push(a.open),t.pinnedFolders.findIndex(h=>h.path===f.path)!==-1?l.items.push(a.unpinFolder):l.items.push(a.pinFolder)):(l.items.push(a.preview),l.items.push(a.download)),l.items.push(a.rename),f.mime_type==="application/zip"?l.items.push(a.unarchive):l.items.push(a.archive),l.items.push(a.delete),t.emitter.emit("vf-context-selected",[f]));m(u)}),t.emitter.on("vf-contextmenu-hide",()=>{l.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;l.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.scrollXe.withDirectives((e.openBlock(),e.createElementBlock("ul",{ref_key:"contextmenu",ref:s,style:e.normalizeStyle(l.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,y0)):(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,x0))]))),128))],4)),[[e.vShow,l.active]])}},w0={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"h-5 w-5",viewBox:"0 0 24 24"},b0=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),E0=[b0];function V0(o,t){return e.openBlock(),e.createElementBlock("svg",w0,[...E0])}const rr={render:V0},N0={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"},S0=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),$0=[S0];function B0(o,t){return e.openBlock(),e.createElementBlock("svg",N0,[...$0])}const C0={render:B0},D0={class:"p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none grow-0"},T0={class:"flex leading-5 items-center"},M0=["aria-label"],A0=["value"],L0={class:"ml-3"},O0={key:0},F0={class:"ml-1"},H0={class:"flex leading-5 items-center justify-end"},R0=["disabled"],z0=["aria-label"],j0={__name:"Statusbar",setup(o){const t=e.inject("ServiceContainer"),{t:n}=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)},l=e.ref("");t.emitter.on("vf-search-query",({newQuery:a})=>{l.value=a});const i=e.computed(()=>{const a=t.selectButton.multiple?r.getSelected().length>0:r.getSelected().length===1;return t.selectButton.active&&a});return(a,d)=>(e.openBlock(),e.createElementBlock("div",D0,[e.createElementVNode("div",T0,[e.createElementVNode("div",{class:"mx-2","aria-label":e.unref(n)("Storage"),"data-microtip-position":"top-right",role:"tooltip"},[e.createVNode(e.unref(rr))],8,M0),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":d[0]||(d[0]=m=>e.unref(t).fs.adapter=m),onChange:c,class:"py-0.5 text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded pl-2 pr-8",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,A0))),256))],544),[[e.vModelSelect,e.unref(t).fs.adapter]]),e.createElementVNode("div",L0,[l.value.length?(e.openBlock(),e.createElementBlock("span",O0,e.toDisplayString(e.unref(t).fs.data.files.length)+" items found. ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",F0,e.toDisplayString(e.unref(t).dragSelect.getCount()>0?e.unref(n)("%s item(s) selected.",e.unref(t).dragSelect.getCount()):""),1)])]),e.createElementVNode("div",H0,[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(n)("Select")),11,R0)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:"mr-1","aria-label":e.unref(n)("About"),"data-microtip-position":"top-left",role:"tooltip",onClick:d[2]||(d[2]=m=>e.unref(t).modal.open(Jn))},[e.createVNode(e.unref(C0))],8,z0)])]))}},I0={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 24 24"},U0=e.createElementVNode("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),P0=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),q0=[U0,P0];function G0(o,t){return e.openBlock(),e.createElementBlock("svg",I0,[...q0])}const K0={render:G0},W0={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"},Y0=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),X0=e.createElementVNode("path",{d:"M15 12H9M12 9v6"},null,-1),J0=[Y0,X0];function Q0(o,t){return e.openBlock(),e.createElementBlock("svg",W0,[...J0])}const Z0={render:Q0},ef={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"},tf=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),of=e.createElementVNode("path",{d:"M9 12h6"},null,-1),nf=[tf,of];function rf(o,t){return e.openBlock(),e.createElementBlock("svg",ef,[...nf])}const sf={render:rf};function sr(o,t){const n=o.findIndex(s=>s.path===t.path);n>-1?o[n]=t:o.push(t)}const af={key:1,class:"cursor-pointer"},ar={__name:"FolderLoaderIndicator",props:e.mergeModels({adapter:{type:String,required:!0},path:{type:String,required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const t=o,n=e.inject("ServiceContainer");n.i18n;const s=e.useModel(o,"modelValue"),r=e.ref(!1);function c(){return s.value=!s.value}function l(){return n.treeViewData.find(a=>a.path===t.path)}const i=()=>{r.value=!0,n.requester.send({url:"",method:"get",params:{q:"subfolders",adapter:t.adapter,path:t.path}}).then(a=>{sr(n.treeViewData,{path:t.path,...a})}).catch(a=>{}).finally(()=>{r.value=!1})};return(a,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=l())==null?void 0:p.folders.length))&&c()&&(l()||i())})},[r.value?(e.openBlock(),e.createBlock(e.unref(Mo),{key:0,class:"p-1"})):(e.openBlock(),e.createElementBlock("div",af,[s.value&&((m=l())!=null&&m.folders.length)?(e.openBlock(),e.createBlock(e.unref(sf),{key:0,class:"text-gray-600"})):e.createCommentVNode("",!0),s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(Z0),{key:1,class:"text-gray-400"}))]))])}}},lf={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"},cf=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),df=[cf];function uf(o,t){return e.openBlock(),e.createElementBlock("svg",lf,[...df])}const mf={render:uf},ff={class:"block"},pf={class:"flex hover:text-sky-700 dark:hover:text-sky-200/50 rounded"},hf={class:"h-5 w-5 shrink-0"},vf=["onClick"],gf={class:"h-5 w-5 shrink-0"},kf={class:"text-nowrap"},yf={class:"pl-4"},xf={__name:"TreeSubfolderList",props:{adapter:{type:String,required:!0},path:{type:String,required:!0}},setup(o){const t=e.inject("ServiceContainer"),n=e.ref([]),s=o,r=e.computed(()=>{var c;return((c=t.treeViewData.find(l=>l.path===s.path))==null?void 0:c.folders)||[]});return(c,l)=>{const i=e.resolveComponent("TreeSubfolderList",!0);return e.openBlock(),e.createElementBlock("ul",ff,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(a,d)=>(e.openBlock(),e.createElementBlock("li",{class:"flex flex-col space-x-0.5 py-0.5 text-sm",key:a.path},[e.createElementVNode("div",pf,[e.createElementVNode("div",hf,[e.createVNode(ar,{adapter:o.adapter,path:a.path,modelValue:n.value[a.path],"onUpdate:modelValue":m=>n.value[a.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:a.path}})},[e.createElementVNode("div",gf,[e.unref(t).fs.path===a.path?(e.openBlock(),e.createBlock(e.unref(mf),{key:0})):(e.openBlock(),e.createBlock(e.unref(zt),{key:1}))]),e.createElementVNode("div",kf,e.toDisplayString(a.basename),1)],8,vf)]),e.createElementVNode("div",yf,[e.withDirectives(e.createVNode(i,{adapter:s.adapter,path:a.path},null,8,["adapter","path"]),[[e.vShow,n.value[a.path]]])])]))),128))])}}},_f={class:"pt-1 px-1 uppercase font-bold text-gray-400 dark:text-gray-500 text-xs flex justify-between"},wf={class:"h-5 w-5 shrink-0"},bf={class:"mr-3"},Ef={__name:"TreeStorageItem",props:{storage:{type:String,required:!0}},setup(o){const t=e.inject("ServiceContainer"),n=e.ref(!1),s=r=>{t.fs.adapter=r,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",o.storage===e.unref(t).fs.adapter?"text-gray-700/80 dark:text-gray-300/80 text-bold":""]),onClick:c[0]||(c[0]=l=>s(o.storage))},[e.createElementVNode("div",wf,[e.createVNode(e.unref(rr))]),e.createElementVNode("div",null,e.toDisplayString(o.storage),1)],2),e.createElementVNode("div",bf,[e.createVNode(ar,{adapter:o.storage,path:o.storage+"://",modelValue:n.value,"onUpdate:modelValue":c[1]||(c[1]=l=>n.value=l)},null,8,["adapter","path","modelValue"])])]),e.withDirectives(e.createVNode(xf,{adapter:o.storage,path:o.storage+"://"},null,8,["adapter","path"]),[[e.vShow,n.value]])],64))}},Vf={class:"p-1 uppercase font-bold text-gray-400 dark:text-gray-400 text-xs flex items-center space-x-1"},Nf={class:"block"},Sf={class:"flex pl-2 py-0.5 text-sm space-x-2"},$f=["onClick"],Bf=["title"],Cf=["onClick"],Df={key:0},Tf={class:"rounded-lg p-1 bg-gray-100 dark:bg-gray-700 text-xs text-center"},Mf={__name:"TreeView",setup(o){const t=e.inject("ServiceContainer"),{t:n}=t.i18n,s=e.ref(190),r=i=>{t.pinnedFolders=t.pinnedFolders.filter(a=>a.path!==i.path),t.storage.setStore("pinned-folders",t.pinnedFolders)},c=i=>{const a=i.clientX,d=i.target.parentElement,m=d.getBoundingClientRect().width;d.classList.remove("transition-[width]"),d.classList.add("transition-none");const u=f=>{s.value=m+f.clientX-a,s.value<50&&(s.value=0,t.showTreeView=!1),s.value>50&&(t.showTreeView=!0)},p=()=>{const f=d.getBoundingClientRect();s.value=f.width,d.classList.add("transition-[width]"),d.classList.remove("transition-none"),window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",p)};window.addEventListener("mousemove",u),window.addEventListener("mouseup",p)},l=e.ref(null);return e.onMounted(()=>{Ue(l.value,{})}),e.watch(t.fs.data,(i,a)=>{const d=i.files.filter(m=>m.type==="dir");sr(t.treeViewData,{path:t.fs.path,folders:d.map(m=>({adapter:m.storage,path:m.path,basename:m.basename}))})}),(i,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{onClick:a[0]||(a[0]=d=>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: "+s.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:l,class:"h-full border-r dark:border-gray-600/50 pb-4"},[e.createElementVNode("div",Vf,[e.createElementVNode("div",null,[e.createVNode(e.unref(nr),{class:"text-amber-600"})]),e.createElementVNode("div",null,e.toDisplayString(e.unref(n)("Pinned Folders")),1)]),e.createElementVNode("ul",Nf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).pinnedFolders,d=>(e.openBlock(),e.createElementBlock("li",Sf,[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:d.storage,path:d.path}})},[e.createVNode(e.unref(zt),{class:"h-5 w-5"}),e.createElementVNode("div",{title:d.path},e.toDisplayString(d.basename),9,Bf)],8,$f),e.createElementVNode("div",{class:"cursor-pointer",onClick:m=>r(d)},[e.createVNode(e.unref(K0),{class:"p-0.5 text-gray-200 hover:text-gray-400 dark:text-gray-600 hover:dark:text-gray-400"})],8,Cf)]))),256)),e.unref(t).pinnedFolders.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",Df,[e.createElementVNode("div",Tf,e.toDisplayString(e.unref(n)("No folders pinned")),1)]))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.data.storages,d=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(Ef,{storage:d},null,8,["storage"])]))),256))],512),e.createElementVNode("div",{onMousedown:c,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))}},Af={class:"relative flex overflow-hidden h-full"},Lf={__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(o){return{active:!1,multiple:!1,click:t=>{},...o}}}},emits:["select"],setup(o,{emit:t}){const n=t,r=Ds(o,e.inject("VueFinderOptions"));e.provide("ServiceContainer",r);const{setStore:c}=r.storage,l=e.ref(null);r.root=l;const i=r.dragSelect;$l(r);const a=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(),a(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=>{n("select",u)})}),(m,u)=>(e.openBlock(),e.createElementBlock("div",{class:"vuefinder",ref_key:"root",ref:l,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: "+o.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(cd),e.createVNode(Fu),e.createElementVNode("div",Af,[e.createVNode(Mf),e.createVNode(k0)]),e.createVNode(j0)],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(_0)],2)],512))}},Of={install(o,t={}){t.i18n=t.i18n??{};let[n]=Object.keys(t.i18n);t.locale=t.locale??n??"en",o.provide("VueFinderOptions",t),o.component("VueFinder",Lf)}};module.exports=Of; diff --git a/dist/vuefinder.js b/dist/vuefinder.js index 8630f6b4..12813340 100644 --- a/dist/vuefinder.js +++ b/dist/vuefinder.js @@ -1,7 +1,7 @@ var zn = Object.defineProperty; var Pn = (t, e, s) => e in t ? zn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s; var mo = (t, e, s) => Pn(t, typeof e != "symbol" ? e + "" : e, s); -import { reactive as Ot, watch as mt, ref as T, shallowRef as jn, onMounted as Ce, onUnmounted as qs, onUpdated as Ro, nextTick as ft, computed as Je, inject as ae, openBlock as f, createElementBlock as g, withKeys as $t, unref as a, createElementVNode as n, withModifiers as nt, renderSlot as Dt, normalizeClass as me, toDisplayString as _, createBlock as X, withCtx as se, Fragment as he, renderList as $e, createCommentVNode as P, withDirectives as ve, vModelCheckbox as jt, createTextVNode as ee, createVNode as W, vModelSelect as Ss, isRef as Fo, vModelText as St, onBeforeUnmount as Io, customRef as qn, vShow as ze, TransitionGroup as Gn, normalizeStyle as ns, mergeModels as Kn, useModel as Wn, resolveComponent as Yn, provide as Xn, Transition as Jn, resolveDynamicComponent as Qn } from "vue"; +import { reactive as Ot, watch as Je, ref as M, shallowRef as jn, onMounted as Ce, onUnmounted as qs, onUpdated as Ro, nextTick as ft, computed as Ze, inject as ae, openBlock as f, createElementBlock as g, withKeys as $t, unref as a, createElementVNode as n, withModifiers as rt, renderSlot as Dt, normalizeClass as me, toDisplayString as _, createBlock as X, withCtx as se, Fragment as he, renderList as $e, createCommentVNode as P, withDirectives as ve, vModelCheckbox as jt, createTextVNode as Q, createVNode as W, vModelSelect as Ss, isRef as Fo, vModelText as St, onBeforeUnmount as Io, customRef as qn, vShow as ze, TransitionGroup as Gn, normalizeStyle as ns, mergeModels as Kn, useModel as Wn, resolveComponent as Yn, provide as Xn, Transition as Jn, resolveDynamicComponent as Qn } from "vue"; import Zn from "mitt"; import er from "dragselect"; import tr from "@uppy/core"; @@ -138,7 +138,7 @@ function ar(t) { function lr(t) { let e = localStorage.getItem(t + "_storage"); const s = Ot(JSON.parse(e ?? "{}")); - mt(s, r); + Je(s, r); function r() { Object.keys(s).length ? localStorage.setItem(t + "_storage", JSON.stringify(s)) : localStorage.removeItem(t + "_storage"); } @@ -158,7 +158,7 @@ async function ir(t, e) { return typeof s == "function" ? (await s()).default : s; } function cr(t, e, s, r) { - const { getStore: o, setStore: c } = t, i = T({}), d = T(o("locale", e)), l = (m, v = e) => { + const { getStore: o, setStore: c } = t, i = M({}), d = M(o("locale", e)), l = (m, v = e) => { ir(m, r).then((p) => { i.value = p, c("locale", m), d.value = m, c("translations", p), Object.values(r).length > 1 && (s.emit("vf-toast-push", { label: "The language is set to " + m }), s.emit("vf-language-saved")); }).catch((p) => { @@ -186,7 +186,7 @@ const pe = { FULL_SCREEN: "fullscreen", DOWNLOAD: "download", LANGUAGE: "language" -}, dr = Object.values(pe), ur = "2.5.2"; +}, dr = Object.values(pe), ur = "2.5.3"; function No(t, e, s, r, o) { return (e = Math, s = e.log, r = 1024, o = s(t) / s(r) | 0, t / e.pow(r, o)).toFixed(0) + " " + (o ? "KMGTPEZY"[--o] + "iB" : "B"); } @@ -197,16 +197,16 @@ function mr(t) { const e = { k: 1, m: 2, g: 3, t: 4 }, r = /(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(t); return r[1] * Math.pow(1024, e[r[2].toLowerCase()]); } -const et = { +const st = { SYSTEM: "system", LIGHT: "light", DARK: "dark" }; function fr(t, e) { - const s = T(et.SYSTEM), r = T(et.LIGHT); - s.value = t.getStore("theme", e ?? et.SYSTEM); + const s = M(st.SYSTEM), r = M(st.LIGHT); + s.value = t.getStore("theme", e ?? st.SYSTEM); const o = window.matchMedia("(prefers-color-scheme: dark)"), c = (i) => { - s.value === et.DARK || s.value === et.SYSTEM && i.matches ? r.value = et.DARK : r.value = et.LIGHT; + s.value === st.DARK || s.value === st.SYSTEM && i.matches ? r.value = st.DARK : r.value = st.LIGHT; }; return c(o), o.addEventListener("change", c), { /** @@ -221,12 +221,12 @@ function fr(t, e) { * @param {Theme} value */ set(i) { - s.value = i, i !== et.SYSTEM ? t.setStore("theme", i) : t.removeStore("theme"), c(o); + s.value = i, i !== st.SYSTEM ? t.setStore("theme", i) : t.removeStore("theme"), c(o); } }; } function hr() { - const t = jn(null), e = T(!1), s = T(); + const t = jn(null), e = M(!1), s = M(); return { visible: e, type: t, data: s, open: (c, i = null) => { document.querySelector("body").style.overflow = "hidden", e.value = !0, t.value = c, s.value = i; }, close: () => { @@ -250,7 +250,7 @@ const Ve = (t, e) => { return (b || o) && (c = p, i = v), [c, b, i]; }; return [e ? (h) => d(e(c, i), h) : d, (h) => [c, !!h, i]]; -}, zo = typeof window < "u" && typeof document < "u", Ae = zo ? window : {}, Po = Math.max, pr = Math.min, Cs = Math.round, Jt = Math.abs, fo = Math.sign, jo = Ae.cancelAnimationFrame, Gs = Ae.requestAnimationFrame, Qt = Ae.setTimeout, Es = Ae.clearTimeout, rs = (t) => typeof Ae[t] < "u" ? Ae[t] : void 0, vr = rs("MutationObserver"), ho = rs("IntersectionObserver"), Zt = rs("ResizeObserver"), Ts = rs("ScrollTimeline"), qo = zo && Node.ELEMENT_NODE, { toString: Df, hasOwnProperty: bs } = Object.prototype, as = (t) => t === void 0, Ks = (t) => t === null, je = (t) => typeof t == "number", ls = (t) => typeof t == "string", Go = (t) => typeof t == "boolean", Fe = (t) => typeof t == "function", qe = (t) => Array.isArray(t), Lt = (t) => typeof t == "object" && !qe(t) && !Ks(t), is = (t) => { +}, zo = typeof window < "u" && typeof document < "u", Ae = zo ? window : {}, Po = Math.max, pr = Math.min, Cs = Math.round, Jt = Math.abs, fo = Math.sign, jo = Ae.cancelAnimationFrame, Gs = Ae.requestAnimationFrame, Qt = Ae.setTimeout, Es = Ae.clearTimeout, rs = (t) => typeof Ae[t] < "u" ? Ae[t] : void 0, vr = rs("MutationObserver"), ho = rs("IntersectionObserver"), Zt = rs("ResizeObserver"), Ts = rs("ScrollTimeline"), qo = zo && Node.ELEMENT_NODE, { toString: Vf, hasOwnProperty: bs } = Object.prototype, as = (t) => t === void 0, Ks = (t) => t === null, je = (t) => typeof t == "number", ls = (t) => typeof t == "string", Go = (t) => typeof t == "boolean", Fe = (t) => typeof t == "function", qe = (t) => Array.isArray(t), Lt = (t) => typeof t == "object" && !qe(t) && !Ks(t), is = (t) => { const e = !!t && t.length, s = je(e) && e > -1 && e % 1 == 0; return qe(t) || !Fe(t) && s ? e > 0 && Lt(t) ? e - 1 in t : !0 : !1; }, es = (t) => { @@ -277,9 +277,9 @@ function ce(t, e) { else t && ce(Object.keys(t), (s) => e(t[s], s, t)); return t; } -const Ws = (t, e) => t.indexOf(e) >= 0, Xe = (t, e) => t.concat(e), be = (t, e, s) => (!ls(e) && is(e) ? Array.prototype.push.apply(t, e) : t.push(e), t), ct = (t) => Array.from(t || []), Ko = (t) => qe(t) ? t : [t], Ms = (t) => !!t && !t.length, po = (t) => ct(new Set(t)), Ie = (t, e, s) => { +const Ws = (t, e) => t.indexOf(e) >= 0, Qe = (t, e) => t.concat(e), be = (t, e, s) => (!ls(e) && is(e) ? Array.prototype.push.apply(t, e) : t.push(e), t), dt = (t) => Array.from(t || []), Ko = (t) => qe(t) ? t : [t], Ms = (t) => !!t && !t.length, po = (t) => dt(new Set(t)), Ie = (t, e, s) => { ce(t, (o) => o && o.apply(void 0, e || [])), !s && (t.length = 0); -}, Wo = "paddingTop", Yo = "paddingRight", Xo = "paddingLeft", Jo = "paddingBottom", Qo = "marginLeft", Zo = "marginRight", en = "marginBottom", gr = "overflowX", _r = "overflowY", xt = "width", yt = "height", ot = "visible", dt = "hidden", wt = "scroll", br = (t) => { +}, Wo = "paddingTop", Yo = "paddingRight", Xo = "paddingLeft", Jo = "paddingBottom", Qo = "marginLeft", Zo = "marginRight", en = "marginBottom", gr = "overflowX", _r = "overflowY", xt = "width", yt = "height", nt = "visible", ut = "hidden", wt = "scroll", br = (t) => { const e = String(t || ""); return e ? e[0].toUpperCase() + e.slice(1) : ""; }, ds = (t, e, s, r) => { @@ -291,8 +291,8 @@ const Ws = (t, e) => t.indexOf(e) >= 0, Xe = (t, e) => t.concat(e), be = (t, e, }), o; } return !1; -}, tn = (t, e) => ds(t, e, ["w", "h"]), Wt = (t, e) => ds(t, e, ["x", "y"]), xr = (t, e) => ds(t, e, ["t", "r", "b", "l"]), rt = () => { -}, J = (t, ...e) => t.bind(0, ...e), ut = (t) => { +}, tn = (t, e) => ds(t, e, ["w", "h"]), Wt = (t, e) => ds(t, e, ["x", "y"]), xr = (t, e) => ds(t, e, ["t", "r", "b", "l"]), at = () => { +}, J = (t, ...e) => t.bind(0, ...e), mt = (t) => { let e; const s = t ? Qt : Gs, r = t ? Es : jo; return [(o) => { @@ -300,22 +300,22 @@ const Ws = (t, e) => t.indexOf(e) >= 0, Xe = (t, e) => t.concat(e), be = (t, e, }, () => r(e)]; }, As = (t, e) => { const { _: s, p: r, v: o, m: c } = e || {}; - let i, d, l, u, h = rt; + let i, d, l, u, h = at; const m = function(x) { - h(), Es(i), u = i = d = void 0, h = rt, t.apply(this, x); + h(), Es(i), u = i = d = void 0, h = at, t.apply(this, x); }, v = (y) => c && d ? c(d, y) : y, p = () => { - h !== rt && m(v(l) || l); + h !== at && m(v(l) || l); }, b = function() { - const x = ct(arguments), M = Fe(s) ? s() : s; - if (je(M) && M >= 0) { - const U = Fe(r) ? r() : r, H = je(U) && U >= 0, A = M > 0 ? Qt : Gs, L = M > 0 ? Es : jo, D = v(x) || x, V = m.bind(0, D); - let E; - h(), o && !u ? (V(), u = !0, E = A(() => u = void 0, M)) : (E = A(V, M), H && !i && (i = Qt(p, U))), h = () => L(E), d = l = D; + const x = dt(arguments), A = Fe(s) ? s() : s; + if (je(A) && A >= 0) { + const U = Fe(r) ? r() : r, B = je(U) && U >= 0, D = A > 0 ? Qt : Gs, L = A > 0 ? Es : jo, E = v(x) || x, O = m.bind(0, E); + let T; + h(), o && !u ? (O(), u = !0, T = D(() => u = void 0, A)) : (T = D(O, A), B && !i && (i = Qt(p, U))), h = () => L(T), d = l = E; } else m(x); }; return b.S = p, b; -}, sn = (t, e) => Object.prototype.hasOwnProperty.call(t, e), Qe = (t) => t ? Object.keys(t) : [], re = (t, e, s, r, o, c, i) => { +}, sn = (t, e) => Object.prototype.hasOwnProperty.call(t, e), et = (t) => t ? Object.keys(t) : [], re = (t, e, s, r, o, c, i) => { const d = [e, s, r, o, c, i]; return (typeof t != "object" || Ks(t)) && !Fe(t) && (t = {}), ce(d, (l) => { ce(l, (u, h) => { @@ -337,18 +337,18 @@ const Ws = (t, e) => t.indexOf(e) >= 0, Xe = (t, e) => t.concat(e), be = (t, e, for (const e in t) return !1; return !0; -}, Ds = (t, e, s) => Po(t, pr(e, s)), ht = (t) => ct(new Set((qe(t) ? t : (t || "").split(" ")).filter((e) => e))), Xs = (t, e) => t && t.getAttribute(e), vo = (t, e) => t && t.hasAttribute(e), Ye = (t, e, s) => { +}, Ds = (t, e, s) => Po(t, pr(e, s)), ht = (t) => dt(new Set((qe(t) ? t : (t || "").split(" ")).filter((e) => e))), Xs = (t, e) => t && t.getAttribute(e), vo = (t, e) => t && t.hasAttribute(e), Xe = (t, e, s) => { ce(ht(e), (r) => { t && t.setAttribute(r, String(s || "")); }); }, Ue = (t, e) => { ce(ht(e), (s) => t && t.removeAttribute(s)); }, us = (t, e) => { - const s = ht(Xs(t, e)), r = J(Ye, t, e), o = (c, i) => { + const s = ht(Xs(t, e)), r = J(Xe, t, e), o = (c, i) => { const d = new Set(s); return ce(ht(c), (l) => { d[i](l); - }), ct(d).join(" "); + }), dt(d).join(" "); }; return { O: (c) => r(o(c, "delete")), @@ -366,12 +366,12 @@ const Ws = (t, e) => t.indexOf(e) >= 0, Xe = (t, e) => t.concat(e), be = (t, e, }, yr = (t, e) => { const s = e ? cs(e) && e : document; return s ? s.querySelector(t) : null; -}, ss = (t, e) => cs(t) ? t.matches(e) : !1, cn = (t) => ss(t, "body"), Vs = (t) => t ? ct(t.childNodes) : [], kt = (t) => t && t.parentElement, _t = (t, e) => cs(t) && t.closest(e), Os = (t) => document.activeElement, wr = (t, e, s) => { +}, ss = (t, e) => cs(t) ? t.matches(e) : !1, cn = (t) => ss(t, "body"), Vs = (t) => t ? dt(t.childNodes) : [], kt = (t) => t && t.parentElement, _t = (t, e) => cs(t) && t.closest(e), Os = (t) => document.activeElement, wr = (t, e, s) => { const r = _t(t, e), o = t && yr(s, r), c = _t(o, e) === r; return r && o ? r === t || o === t || c && _t(_t(t, s), e) !== r : !1; -}, lt = (t) => { +}, it = (t) => { if (is(t)) - ce(ct(t), (e) => lt(e)); + ce(dt(t), (e) => it(e)); else if (t) { const e = kt(t); e && e.removeChild(t); @@ -381,15 +381,15 @@ const Ws = (t, e) => t.indexOf(e) >= 0, Xe = (t, e) => t.concat(e), be = (t, e, let r = e, o; return is(s) ? (o = document.createDocumentFragment(), ce(s, (c) => { c === r && (r = c.previousSibling), o.appendChild(c); - })) : o = s, e && (r ? r !== e && (r = r.nextSibling) : r = t.firstChild), t.insertBefore(o, r || null), () => lt(s); + })) : o = s, e && (r ? r !== e && (r = r.nextSibling) : r = t.firstChild), t.insertBefore(o, r || null), () => it(s); } - return rt; + return at; }, Oe = (t, e) => dn(t, null, e), go = (t, e) => dn(kt(t), t && t.nextSibling, e), bt = (t) => { const e = document.createElement("div"); - return Ye(e, "class", t), e; + return Xe(e, "class", t), e; }, un = (t) => { const e = bt(); - return e.innerHTML = t.trim(), ce(Vs(e), (s) => lt(s)); + return e.innerHTML = t.trim(), ce(Vs(e), (s) => it(s)); }, kr = /^--/, _o = (t, e) => t.getPropertyValue(e) || t[e] || "", eo = (t) => { const e = t || 0; return isFinite(e) ? e : 0; @@ -408,7 +408,7 @@ function pt(t, e, s) { let o = r ? "" : {}; if (t) { const c = Ae.getComputedStyle(t, s) || t.style; - o = r ? _o(c, e) : ct(e).reduce((i, d) => (i[d] = _o(c, d), i), o); + o = r ? _o(c, e) : dt(e).reduce((i, d) => (i[d] = _o(c, d), i), o); } return o; } @@ -473,8 +473,8 @@ const xo = (t, e, s) => { const { T: s, D: r } = t, { w: o, h: c } = e, i = (m, v, p) => { let b = fo(m) * p, y = fo(v) * p; if (b === y) { - const x = Jt(m), M = Jt(v); - y = x > M ? 0 : y, b = x < M ? 0 : b; + const x = Jt(m), A = Jt(v); + y = x > A ? 0 : y, b = x < A ? 0 : b; } return b = b === y ? 0 : b, [b + 0, y + 0]; }, [d, l] = i(s.x, r.x, o), [u, h] = i(s.y, r.y, c); @@ -525,13 +525,13 @@ const xo = (t, e, s) => { }, i), J(s, c, i); } Go(i) && i && s(); - const d = Qe(c), l = []; + const d = et(c), l = []; return ce(d, (u) => { const h = c[u]; h && be(l, r(u, h)); }), J(Ie, l); }, o = (c, i) => { - ce(ct(e.get(c)), (d) => { + ce(dt(e.get(c)), (d) => { i && !Ms(i) ? d.apply(0, i) : d(); }); }; @@ -564,7 +564,7 @@ const xo = (t, e, s) => { pointers: ["mouse", "touch", "pen"] } }, gn = (t, e) => { - const s = {}, r = Xe(Qe(e), Qe(t)); + const s = {}, r = Qe(et(e), et(t)); return ce(r, (o) => { const c = t[o], i = e[o]; if (Lt(c) && Lt(i)) @@ -579,24 +579,24 @@ const xo = (t, e, s) => { d && (s[o] = i); } }), s; -}, Eo = (t, e, s) => (r) => [Co(t, r), s || Co(e, r) !== void 0], Ct = "data-overlayscrollbars", Yt = "os-environment", Gt = `${Yt}-scrollbar-hidden`, ys = `${Ct}-initialize`, Xt = "noClipping", To = `${Ct}-body`, at = Ct, Ar = "host", st = `${Ct}-viewport`, Dr = gr, Lr = _r, Vr = "arrange", _n = "measuring", bn = "scrollbarHidden", Or = "scrollbarPressed", Hr = "noContent", Us = `${Ct}-padding`, Mo = `${Ct}-content`, so = "os-size-observer", Br = `${so}-appear`, Rr = `${so}-listener`, Fr = "os-trinsic-observer", Ir = "os-theme-none", Be = "os-scrollbar", Nr = `${Be}-rtl`, Ur = `${Be}-horizontal`, zr = `${Be}-vertical`, xn = `${Be}-track`, oo = `${Be}-handle`, Pr = `${Be}-visible`, jr = `${Be}-cornerless`, Ao = `${Be}-interaction`, Do = `${Be}-unusable`, zs = `${Be}-auto-hide`, Lo = `${zs}-hidden`, Vo = `${Be}-wheel`, qr = `${xn}-interactive`, Gr = `${oo}-interactive`; +}, Eo = (t, e, s) => (r) => [Co(t, r), s || Co(e, r) !== void 0], Ct = "data-overlayscrollbars", Yt = "os-environment", Gt = `${Yt}-scrollbar-hidden`, ys = `${Ct}-initialize`, Xt = "noClipping", To = `${Ct}-body`, lt = Ct, Ar = "host", ot = `${Ct}-viewport`, Dr = gr, Lr = _r, Vr = "arrange", _n = "measuring", bn = "scrollbarHidden", Or = "scrollbarPressed", Hr = "noContent", Us = `${Ct}-padding`, Mo = `${Ct}-content`, so = "os-size-observer", Br = `${so}-appear`, Rr = `${so}-listener`, Fr = "os-trinsic-observer", Ir = "os-theme-none", Be = "os-scrollbar", Nr = `${Be}-rtl`, Ur = `${Be}-horizontal`, zr = `${Be}-vertical`, xn = `${Be}-track`, oo = `${Be}-handle`, Pr = `${Be}-visible`, jr = `${Be}-cornerless`, Ao = `${Be}-interaction`, Do = `${Be}-unusable`, zs = `${Be}-auto-hide`, Lo = `${zs}-hidden`, Vo = `${Be}-wheel`, qr = `${xn}-interactive`, Gr = `${oo}-interactive`; let ws; const Kr = () => { - const t = (k, U, H) => { + const t = (k, U, B) => { Oe(document.body, k), Oe(document.body, k); - const A = mn(k), L = Mt(k), B = to(U); - return H && lt(k), { - x: L.h - A.h + B.h, - y: L.w - A.w + B.w + const D = mn(k), L = Mt(k), V = to(U); + return B && it(k), { + x: L.h - D.h + V.h, + y: L.w - D.w + V.w }; }, e = (k) => { let U = !1; - const H = Zs(k, Gt); + const B = Zs(k, Gt); try { U = pt(k, "scrollbar-width") === "none" || pt(k, "display", "::-webkit-scrollbar") === "none"; } catch { } - return H(), U; + return B(), U; }, s = `.${Yt}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${Yt} div{width:200%;height:200%;margin:10px 0}.${Gt}{scrollbar-width:none!important}.${Gt}::-webkit-scrollbar,.${Gt}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`, o = un(`
`)[0], c = o.firstChild, [i, , d] = Ns(), [l, u] = Ve({ o: t(o, c), i: Wt @@ -617,7 +617,7 @@ const Kr = () => { nativeScrollbarsOverlaid: !1, body: null } - }, b = re({}, Mr), y = J(re, {}, b), x = J(re, {}, p), M = { + }, b = re({}, Mr), y = J(re, {}, b), x = J(re, {}, p), A = { k: h, M: v, R: m, @@ -630,23 +630,23 @@ const Kr = () => { B: re({}, p), F: re({}, b) }; - if (Ue(o, "style"), lt(o), fe(Ae, "resize", () => { + if (Ue(o, "style"), it(o), fe(Ae, "resize", () => { d("r", []); }), Fe(Ae.matchMedia) && !m && (!v.x || !v.y)) { const k = (U) => { - const H = Ae.matchMedia(`(resolution: ${Ae.devicePixelRatio}dppx)`); - fe(H, "change", () => { + const B = Ae.matchMedia(`(resolution: ${Ae.devicePixelRatio}dppx)`); + fe(B, "change", () => { U(), k(U); }, { A: !0 }); }; k(() => { - const [U, H] = l(); - re(M.k, U), d("r", [H]); + const [U, B] = l(); + re(A.k, U), d("r", [B]); }); } - return M; + return A; }, Ge = () => (ws || (ws = Kr()), ws), yn = (t, e) => Fe(e) ? e.apply(0, t) : e, Wr = (t, e, s, r) => { const o = as(r) ? s : r; return yn(t, o) || e.apply(0, t); @@ -688,25 +688,25 @@ const Kr = () => { const { j: c, X: i, Y: d, W: l, J: u, K: h } = r || {}, m = As(() => o && s(!0), { _: 33, p: 99 - }), [v, p] = Qr(t, m, d), b = c || [], y = i || [], x = Xe(b, y), M = (U, H) => { - if (!Ms(H)) { - const A = u || rt, L = h || rt, B = [], D = []; - let V = !1, E = !1; - if (ce(H, (S) => { - const { attributeName: O, target: $, type: w, oldValue: I, addedNodes: R, removedNodes: oe } = S, de = w === "attributes", le = w === "childList", F = t === $, Z = de && O, te = Z && Xs($, O || ""), Y = ls(te) ? te : null, ue = Z && I !== Y, z = Ws(y, O) && ue; + }), [v, p] = Qr(t, m, d), b = c || [], y = i || [], x = Qe(b, y), A = (U, B) => { + if (!Ms(B)) { + const D = u || at, L = h || at, V = [], E = []; + let O = !1, T = !1; + if (ce(B, (S) => { + const { attributeName: H, target: $, type: w, oldValue: I, addedNodes: R, removedNodes: oe } = S, de = w === "attributes", le = w === "childList", F = t === $, ee = de && H, te = ee && Xs($, H || ""), Y = ls(te) ? te : null, ue = ee && I !== Y, z = Ws(y, H) && ue; if (e && (le || !F)) { - const q = de && ue, j = q && l && ss($, l), N = (j ? !A($, O, I, Y) : !de || q) && !L(S, !!j, t, r); - ce(R, (G) => be(B, G)), ce(oe, (G) => be(B, G)), E = E || N; + const q = de && ue, j = q && l && ss($, l), N = (j ? !D($, H, I, Y) : !de || q) && !L(S, !!j, t, r); + ce(R, (G) => be(V, G)), ce(oe, (G) => be(V, G)), T = T || N; } - !e && F && ue && !A($, O, I, Y) && (be(D, O), V = V || z); - }), p((S) => po(B).reduce((O, $) => (be(O, ln(S, $)), ss($, S) ? be(O, $) : O), [])), e) - return !U && E && s(!1), [!1]; - if (!Ms(D) || V) { - const S = [po(D), V]; + !e && F && ue && !D($, H, I, Y) && (be(E, H), O = O || z); + }), p((S) => po(V).reduce((H, $) => (be(H, ln(S, $)), ss($, S) ? be(H, $) : H), [])), e) + return !U && T && s(!1), [!1]; + if (!Ms(E) || O) { + const S = [po(E), O]; return !U && s.apply(0, S), S; } } - }, k = new vr(J(M, !1)); + }, k = new vr(J(A, !1)); return [() => (k.observe(t, { attributes: !0, attributeOldValue: !0, @@ -718,13 +718,13 @@ const Kr = () => { o && (v(), k.disconnect(), o = !1); }), () => { if (o) - return m.S(), M(!0, k.takeRecords()); + return m.S(), A(!0, k.takeRecords()); }]; }, $n = {}, Sn = {}, Zr = (t) => { ce(t, (e) => ce(e, (s, r) => { $n[r] = e[r]; })); -}, Cn = (t, e, s) => Qe(t).map((r) => { +}, Cn = (t, e, s) => et(t).map((r) => { const { static: o, instance: c } = t[r], [i, d, l] = s || [], u = s ? c : o; if (u) { const h = s ? u(i, d, e) : u(e); @@ -733,10 +733,10 @@ const Kr = () => { }), Ht = (t) => Sn[t], ea = "__osOptionsValidationPlugin", ta = "__osSizeObserverPlugin", sa = (t, e) => { const { M: s } = e, [r, o] = t("showNativeOverlaidScrollbars"); return [r && s.x && s.y, o]; -}, os = (t) => t.indexOf(ot) === 0, oa = (t, e) => { +}, os = (t) => t.indexOf(nt) === 0, oa = (t, e) => { const s = (o, c, i, d) => { - const l = o === ot ? dt : o.replace(`${ot}-`, ""), u = os(o), h = os(i); - return !c && !d ? dt : u && h ? ot : u ? c && d ? l : c ? ot : dt : c ? l : h && d ? ot : dt; + const l = o === nt ? ut : o.replace(`${nt}-`, ""), u = os(o), h = os(i); + return !c && !d ? ut : u && h ? nt : u ? c && d ? l : c ? nt : ut : c ? l : h && d ? nt : ut; }, r = { x: s(e.x, t.x, e.y, t.y), y: s(e.y, t.y, e.x, t.x) @@ -758,8 +758,8 @@ const Kr = () => { const v = m instanceof ResizeObserverEntry; let p = !1, b = !1; if (v) { - const [y, , x] = c(m.contentRect), M = Rs(y); - b = fn(y, x), p = !b && !M; + const [y, , x] = c(m.contentRect), A = Rs(y); + b = fn(y, x), p = !b && !A; } else b = m === !0; p || e({ @@ -774,9 +774,9 @@ const Kr = () => { }); } else if (o) { const [m, v] = o(u, h, r); - be(i, Xe([Zs(l, Br), fe(l, "animationstart", m)], v)); + be(i, Qe([Zs(l, Br), fe(l, "animationstart", m)], v)); } else - return rt; + return at; return J(Ie, be(i, Oe(t, l))); }; }, ra = (t, e) => { @@ -808,48 +808,48 @@ const Kr = () => { }, () => s && d(!0, s.takeRecords())]; }, aa = (t, e, s, r) => { let o, c, i, d, l, u; - const h = `[${at}]`, m = `[${st}]`, v = [], p = ["wrap", "cols", "rows"], b = ["id", "class", "style", "open"], { vt: y, ht: x, ot: M, gt: k, bt: U, wt: H, nt: A, yt: L, St: B, Ot: D } = t, V = (C) => pt(C, "direction") === "rtl", E = { + const h = `[${lt}]`, m = `[${ot}]`, v = [], p = ["wrap", "cols", "rows"], b = ["id", "class", "style", "open"], { vt: y, ht: x, ot: A, gt: k, bt: U, wt: B, nt: D, yt: L, St: V, Ot: E } = t, O = (C) => pt(C, "direction") === "rtl", T = { $t: !1, - ct: V(y) - }, S = Ge(), O = Ht(En), [$] = Ve({ + ct: O(y) + }, S = Ge(), H = Ht(En), [$] = Ve({ i: tn, o: { w: 0, h: 0 } }, () => { - const C = O && O.tt(t, e, E, S, s).ut, G = !(L && A) && Qs(x, at, Xt), K = !A && B(Vr), Q = K && He(k), ie = D(_n, G), ye = K && C && C()[0], Se = Bs(M), ne = to(M); - return ye && ye(), Pe(k, Q), G && ie(), { + const C = H && H.tt(t, e, T, S, s).ut, G = !(L && D) && Qs(x, lt, Xt), K = !D && V(Vr), Z = K && He(k), ie = E(_n, G), ye = K && C && C()[0], Se = Bs(A), ne = to(A); + return ye && ye(), Pe(k, Z), G && ie(), { w: Se.w + ne.w, h: Se.h + ne.h }; - }), w = H ? p : Xe(b, p), I = As(r, { + }), w = B ? p : Qe(b, p), I = As(r, { _: () => o, p: () => c, m(C, N) { const [G] = C, [K] = N; - return [Xe(Qe(G), Qe(K)).reduce((Q, ie) => (Q[ie] = G[ie] || K[ie], Q), {})]; + return [Qe(et(G), et(K)).reduce((Z, ie) => (Z[ie] = G[ie] || K[ie], Z), {})]; } }), R = (C) => { - const N = V(y); + const N = O(y); re(C, { Ct: u !== N - }), re(E, { + }), re(T, { ct: N }), u = N; }, oe = (C, N) => { - const [G, K] = C, Q = { + const [G, K] = C, Z = { xt: K }; - return re(E, { + return re(T, { $t: G - }), !N && r(Q), Q; + }), !N && r(Z), Z; }, de = ({ ft: C, dt: N }) => { - const K = !(C && !N) && S.R ? I : r, Q = { + const K = !(C && !N) && S.R ? I : r, Z = { ft: C || N, dt: N }; - R(Q), K(Q); + R(Z), K(Z); }, le = (C, N) => { const [, G] = $(), K = { Ht: G @@ -860,12 +860,12 @@ const Kr = () => { Et: N }; return R(K), N && !G && I(K), K; - }, [Z, te] = U ? ra(x, oe) : [], Y = !A && Tn(x, de, { + }, [ee, te] = U ? ra(x, oe) : [], Y = !D && Tn(x, de, { dt: !0 }), [ue, z] = Oo(x, !1, F, { X: b, - j: Xe(b, v) - }), q = A && Zt && new Zt((C) => { + j: Qe(b, v) + }), q = D && Zt && new Zt((C) => { const N = C[C.length - 1].contentRect; de({ ft: !0, @@ -882,25 +882,25 @@ const Kr = () => { }); return [() => { q && q.observe(x); - const C = Y && Y(), N = Z && Z(), G = ue(), K = S.L((Q) => { - Q ? I({ - zt: Q + const C = Y && Y(), N = ee && ee(), G = ue(), K = S.L((Z) => { + Z ? I({ + zt: Z }) : j(); }); return () => { q && q.disconnect(), C && C(), N && N(), d && d(), G(), K(); }; }, ({ It: C, At: N, Tt: G }) => { - const K = {}, [Q] = C("update.ignoreMutation"), [ie, ye] = C("update.attributes"), [Se, ne] = C("update.elementEvents"), [we, Ee] = C("update.debounce"), Re = ne || ye, ke = N || G, De = (xe) => Fe(Q) && Q(xe); + const K = {}, [Z] = C("update.ignoreMutation"), [ie, ye] = C("update.attributes"), [Se, ne] = C("update.elementEvents"), [we, Ee] = C("update.debounce"), Re = ne || ye, ke = N || G, De = (xe) => Fe(Z) && Z(xe); if (Re) { i && i(), d && d(); - const [xe, ge] = Oo(U || M, !0, le, { - j: Xe(w, ie || []), + const [xe, ge] = Oo(U || A, !0, le, { + j: Qe(w, ie || []), Y: Se, W: h, K: (Te, _e) => { const { target: Me, attributeName: Le } = Te; - return (!_e && Le && !A ? wr(Me, h, m) : !1) || !!_t(Me, `.${Be}`) || !!De(Te); + return (!_e && Le && !D ? wr(Me, h, m) : !1) || !!_t(Me, `.${Be}`) || !!De(Te); } }); d = xe(), i = ge; @@ -915,90 +915,90 @@ const Kr = () => { xe && re(K, F(xe[0], xe[1], ke)), ge && re(K, oe(ge[0], ke)), Te && re(K, le(Te[0], ke)); } return R(K), K; - }, E]; + }, T]; }, la = (t, e, s, r) => { - const { P: o } = Ge(), { scrollbars: c } = o(), { slot: i } = c, { vt: d, ht: l, ot: u, Dt: h, gt: m, yt: v, nt: p } = e, { scrollbars: b } = h ? {} : t, { slot: y } = b || {}, x = /* @__PURE__ */ new Map(), M = (z) => Ts && new Ts({ + const { P: o } = Ge(), { scrollbars: c } = o(), { slot: i } = c, { vt: d, ht: l, ot: u, Dt: h, gt: m, yt: v, nt: p } = e, { scrollbars: b } = h ? {} : t, { slot: y } = b || {}, x = /* @__PURE__ */ new Map(), A = (z) => Ts && new Ts({ source: m, axis: z }), k = { - x: M("x"), - y: M("y") - }, U = wn([d, l, u], () => p && v ? d : l, i, y), H = (z, q) => { + x: A("x"), + y: A("y") + }, U = wn([d, l, u], () => p && v ? d : l, i, y), B = (z, q) => { if (q) { - const Q = z ? xt : yt, { kt: ie, Mt: ye } = q, Se = At(ye)[Q], ne = At(ie)[Q]; + const Z = z ? xt : yt, { kt: ie, Mt: ye } = q, Se = At(ye)[Z], ne = At(ie)[Z]; return Ds(0, 1, Se / ne || 0); } const j = z ? "x" : "y", { Rt: C, Vt: N } = s, G = N[j], K = C[j]; return Ds(0, 1, G / (G + K) || 0); - }, A = (z, q, j) => { - const C = H(j, z); + }, D = (z, q, j) => { + const C = B(j, z); return 1 / C * (1 - C) * q; }, L = (z) => re(z, { clear: ["left"] - }), B = (z) => { + }), V = (z) => { x.forEach((q, j) => { (z ? Ws(Ko(z), j) : !0) && (ce(q || [], (N) => { N && N.cancel(); }), x.delete(j)); }); - }, D = (z, q, j, C) => { + }, E = (z, q, j, C) => { const N = x.get(z) || [], G = N.find((K) => K && K.timeline === q); G ? G.effect = new KeyframeEffect(z, j, { composite: C - }) : x.set(z, Xe(N, [z.animate(j, { + }) : x.set(z, Qe(N, [z.animate(j, { timeline: q, composite: C })])); - }, V = (z, q, j) => { + }, O = (z, q, j) => { const C = j ? Zs : an; ce(z, (N) => { C(N.Lt, q); }); - }, E = (z, q) => { + }, T = (z, q) => { ce(z, (j) => { const [C, N] = q(j); Vt(C, N); }); }, S = (z, q) => { - E(z, (j) => { + T(z, (j) => { const { Mt: C } = j; return [C, { - [q ? xt : yt]: bo(H(q)) + [q ? xt : yt]: bo(B(q)) }]; }); - }, O = (z, q) => { - const { Pt: j } = s, C = q ? "x" : "y", N = k[C], G = wo(j)[C], K = (Q, ie) => xs(bo(A(Q, G ? ie : 1 - ie, q)), q); - N ? ce(z, (Q) => { - const { Mt: ie } = Q; - D(ie, N, L({ - transform: [0, 1].map((ye) => K(Q, ye)) + }, H = (z, q) => { + const { Pt: j } = s, C = q ? "x" : "y", N = k[C], G = wo(j)[C], K = (Z, ie) => xs(bo(D(Z, G ? ie : 1 - ie, q)), q); + N ? ce(z, (Z) => { + const { Mt: ie } = Z; + E(ie, N, L({ + transform: [0, 1].map((ye) => K(Z, ye)) })); - }) : E(z, (Q) => [Q.Mt, { - transform: K(Q, ko(j, He(m))[C]) + }) : T(z, (Z) => [Z.Mt, { + transform: K(Z, ko(j, He(m))[C]) }]); }, $ = (z) => p && !v && kt(z) === u, w = [], I = [], R = [], oe = (z, q, j) => { const C = Go(j), N = C ? j : !0, G = C ? !j : !0; - N && V(I, z, q), G && V(R, z, q); + N && O(I, z, q), G && O(R, z, q); }, de = () => { S(I, !0), S(R); }, le = () => { - O(I, !0), O(R); + H(I, !0), H(R); }, F = () => { if (p) { const { Rt: z, Pt: q } = s, j = wo(q), C = 0.5; if (k.x && k.y) - ce(Xe(R, I), ({ Lt: N }) => { + ce(Qe(R, I), ({ Lt: N }) => { if ($(N)) { - const G = (K) => D(N, k[K], L({ - transform: [0, j[K] ? 1 : -1].map((Q) => xs(Hs(Q * (z[K] - C)), K === "x")) + const G = (K) => E(N, k[K], L({ + transform: [0, j[K] ? 1 : -1].map((Z) => xs(Hs(Z * (z[K] - C)), K === "x")) }), "add"); G("x"), G("y"); } else - B(N); + V(N); }); else { const N = ko(q, He(m)), G = (K) => { - const { Lt: Q } = K, ie = $(Q) && Q, ye = (Se, ne, we) => { + const { Lt: Z } = K, ie = $(Z) && Z, ye = (Se, ne, we) => { const Ee = ne * Se; return Hs(we ? Ee : -Ee); }; @@ -1009,17 +1009,17 @@ const Kr = () => { }) }]; }; - E(I, G), E(R, G); + T(I, G), T(R, G); } } - }, Z = (z) => { + }, ee = (z) => { const j = bt(`${Be} ${z ? Ur : zr}`), C = bt(xn), N = bt(oo), G = { Lt: j, kt: C, Mt: N }; - return be(z ? I : R, G), be(w, [Oe(j, C), Oe(C, N), J(lt, j), B, r(G, oe, O, z)]), G; - }, te = J(Z, !0), Y = J(Z, !1), ue = () => (Oe(U, I[0].Lt), Oe(U, R[0].Lt), J(Ie, w)); + return be(z ? I : R, G), be(w, [Oe(j, C), Oe(C, N), J(it, j), V, r(G, oe, H, z)]), G; + }, te = J(ee, !0), Y = J(ee, !1), ue = () => (Oe(U, I[0].Lt), Oe(U, R[0].Lt), J(Ie, w)); return te(), Y(), [{ Ut: de, Nt: le, @@ -1029,35 +1029,35 @@ const Kr = () => { V: k.x, jt: I, Xt: te, - Yt: J(E, I) + Yt: J(T, I) }, Wt: { V: k.y, jt: R, Xt: Y, - Yt: J(E, R) + Yt: J(T, R) } }, ue]; }, ia = (t, e, s, r) => (o, c, i, d) => { - const { ht: l, ot: u, nt: h, gt: m, Jt: v, Ot: p } = e, { Lt: b, kt: y, Mt: x } = o, [M, k] = ut(333), [U, H] = ut(444), [A, L] = ut(), B = J(i, [o], d), D = ($) => { + const { ht: l, ot: u, nt: h, gt: m, Jt: v, Ot: p } = e, { Lt: b, kt: y, Mt: x } = o, [A, k] = mt(333), [U, B] = mt(444), [D, L] = mt(), V = J(i, [o], d), E = ($) => { Fe(m.scrollBy) && m.scrollBy({ behavior: "smooth", left: $.x, top: $.y }); - }, V = d ? xt : yt, E = () => { - const $ = "pointerup pointercancel lostpointercapture", w = `client${d ? "X" : "Y"}`, I = d ? "left" : "top", R = d ? "w" : "h", oe = d ? "x" : "y", de = (le, F) => (Z) => { - const { Rt: te } = s, Y = Mt(y)[R] - Mt(x)[R], z = F * Z / Y * te[oe]; + }, O = d ? xt : yt, T = () => { + const $ = "pointerup pointercancel lostpointercapture", w = `client${d ? "X" : "Y"}`, I = d ? "left" : "top", R = d ? "w" : "h", oe = d ? "x" : "y", de = (le, F) => (ee) => { + const { Rt: te } = s, Y = Mt(y)[R] - Mt(x)[R], z = F * ee / Y * te[oe]; Pe(m, { [oe]: le + z }); }; return fe(y, "pointerdown", (le) => { - const F = _t(le.target, `.${oo}`) === x, Z = F ? x : y, te = t.scrollbars, { button: Y, isPrimary: ue, pointerType: z } = le, { pointers: q } = te; + const F = _t(le.target, `.${oo}`) === x, ee = F ? x : y, te = t.scrollbars, { button: Y, isPrimary: ue, pointerType: z } = le, { pointers: q } = te; if (Y === 0 && ue && te[F ? "dragScroll" : "clickScroll"] && (q || []).includes(z)) { - H(); - const C = !F && le.shiftKey, N = J(At, x), G = J(At, y), K = (_e, Me) => (_e || N())[I] - (Me || G())[I], Q = Cs(At(m)[V]) / Mt(m)[R] || 1, ie = de(He(m)[oe], 1 / Q), ye = le[w], Se = N(), ne = G(), we = Se[V], Ee = K(Se, ne) + we / 2, Re = ye - ne[I], ke = F ? 0 : Re - Ee, De = (_e) => { - Ie(Te), Z.releasePointerCapture(_e.pointerId); + B(); + const C = !F && le.shiftKey, N = J(At, x), G = J(At, y), K = (_e, Me) => (_e || N())[I] - (Me || G())[I], Z = Cs(At(m)[O]) / Mt(m)[R] || 1, ie = de(He(m)[oe], 1 / Z), ye = le[w], Se = N(), ne = G(), we = Se[O], Ee = K(Se, ne) + we / 2, Re = ye - ne[I], ke = F ? 0 : Re - Ee, De = (_e) => { + Ie(Te), ee.releasePointerCapture(_e.pointerId); }, xe = () => p(Or, !0), ge = xe(), Te = [() => { const _e = He(m); ge(); @@ -1065,14 +1065,14 @@ const Kr = () => { x: Me.x - _e.x, y: Me.y - _e.y }; - (Jt(Le.x) > 3 || Jt(Le.y) > 3) && (xe(), Pe(m, _e), D(Le), U(ge)); + (Jt(Le.x) > 3 || Jt(Le.y) > 3) && (xe(), Pe(m, _e), E(Le), U(ge)); }, fe(v, $, De), fe(v, "selectstart", (_e) => Fs(_e), { H: !1 }), fe(y, $, De), fe(y, "pointermove", (_e) => { const Me = _e[w] - ye; (F || C) && ie(ke + Me); })]; - if (Z.setPointerCapture(le.pointerId), C) + if (ee.setPointerCapture(le.pointerId), C) ie(ke); else if (!F) { const _e = Ht(na); @@ -1082,49 +1082,49 @@ const Kr = () => { }); }; let S = !0; - const O = ($) => $.propertyName.indexOf(V) > -1; + const H = ($) => $.propertyName.indexOf(O) > -1; return J(Ie, [fe(x, "pointermove pointerleave", r), fe(b, "pointerenter", () => { c(Ao, !0); }), fe(b, "pointerleave pointercancel", () => { c(Ao, !1); }), !h && fe(b, "mousedown", () => { const $ = Os(); - (vo($, st) || vo($, at) || $ === document.body) && Qt(J(Is, u), 25); + (vo($, ot) || vo($, lt) || $ === document.body) && Qt(J(Is, u), 25); }), fe(b, "wheel", ($) => { const { deltaX: w, deltaY: I, deltaMode: R } = $; - S && R === 0 && kt(b) === l && D({ + S && R === 0 && kt(b) === l && E({ x: w, y: I - }), S = !1, c(Vo, !0), M(() => { + }), S = !1, c(Vo, !0), A(() => { S = !0, c(Vo); }), Fs($); }, { H: !1, I: !0 }), fe(x, "transitionstart", ($) => { - if (O($)) { + if (H($)) { const w = () => { - B(), A(w); + V(), D(w); }; w(); } }), fe(x, "transitionend transitioncancel", ($) => { - O($) && (L(), B()); + H($) && (L(), V()); }), fe(b, "pointerdown", J(fe, v, "click", pn, { A: !0, I: !0, H: !1 }), { I: !0 - }), E(), k, H, L]); + }), T(), k, B, L]); }, ca = (t, e, s, r, o, c) => { - let i, d, l, u, h, m = rt, v = 0; - const p = (F) => F.pointerType === "mouse", [b, y] = ut(), [x, M] = ut(100), [k, U] = ut(100), [H, A] = ut(() => v), [L, B] = la(t, o, r, ia(e, o, r, (F) => p(F) && R())), { ht: D, Kt: V, yt: E } = o, { Bt: S, Ut: O, Nt: $, qt: w } = L, I = (F, Z) => { - if (A(), F) + let i, d, l, u, h, m = at, v = 0; + const p = (F) => F.pointerType === "mouse", [b, y] = mt(), [x, A] = mt(100), [k, U] = mt(100), [B, D] = mt(() => v), [L, V] = la(t, o, r, ia(e, o, r, (F) => p(F) && R())), { ht: E, Kt: O, yt: T } = o, { Bt: S, Ut: H, Nt: $, qt: w } = L, I = (F, ee) => { + if (D(), F) S(Lo); else { const te = J(S, Lo, !0); - v > 0 && !Z ? H(te) : te(); + v > 0 && !ee ? B(te) : te(); } }, R = () => { (l ? !i : !u) && (I(!0), x(() => { @@ -1134,68 +1134,68 @@ const Kr = () => { S(zs, F, !0), S(zs, F, !1); }, de = (F) => { p(F) && (i = l, l && I(!0)); - }, le = [A, M, U, y, () => m(), fe(D, "pointerover", de, { + }, le = [D, A, U, y, () => m(), fe(E, "pointerover", de, { A: !0 - }), fe(D, "pointerenter", de), fe(D, "pointerleave", (F) => { + }), fe(E, "pointerenter", de), fe(E, "pointerleave", (F) => { p(F) && (i = !1, l && I(!1)); - }), fe(D, "pointermove", (F) => { + }), fe(E, "pointermove", (F) => { p(F) && d && R(); - }), fe(V, "scroll", (F) => { + }), fe(O, "scroll", (F) => { b(() => { $(), R(); }), c(F), w(); })]; - return [() => J(Ie, be(le, B())), ({ It: F, Tt: Z, Gt: te, Qt: Y }) => { - const { Zt: ue, tn: z, nn: q, sn: j } = Y || {}, { Ct: C, dt: N } = te || {}, { ct: G } = s, { M: K } = Ge(), { G: Q, en: ie } = r, [ye, Se] = F("showNativeOverlaidScrollbars"), [ne, we] = F("scrollbars.theme"), [Ee, Re] = F("scrollbars.visibility"), [ke, De] = F("scrollbars.autoHide"), [xe, ge] = F("scrollbars.autoHideSuspend"), [Te] = F("scrollbars.autoHideDelay"), [_e, Me] = F("scrollbars.dragScroll"), [Le, vt] = F("scrollbars.clickScroll"), [Bt, hs] = F("overflow"), ps = N && !Z, vs = ie.x || ie.y, Ne = ue || z || j || C || Z, gs = q || Re || hs, Rt = ye && K.x && K.y, Ft = (Ze, Et, Tt) => { - const It = Ze.includes(wt) && (Ee === ot || Ee === "auto" && Et === wt); + return [() => J(Ie, be(le, V())), ({ It: F, Tt: ee, Gt: te, Qt: Y }) => { + const { Zt: ue, tn: z, nn: q, sn: j } = Y || {}, { Ct: C, dt: N } = te || {}, { ct: G } = s, { M: K } = Ge(), { G: Z, en: ie } = r, [ye, Se] = F("showNativeOverlaidScrollbars"), [ne, we] = F("scrollbars.theme"), [Ee, Re] = F("scrollbars.visibility"), [ke, De] = F("scrollbars.autoHide"), [xe, ge] = F("scrollbars.autoHideSuspend"), [Te] = F("scrollbars.autoHideDelay"), [_e, Me] = F("scrollbars.dragScroll"), [Le, vt] = F("scrollbars.clickScroll"), [Bt, hs] = F("overflow"), ps = N && !ee, vs = ie.x || ie.y, Ne = ue || z || j || C || ee, gs = q || Re || hs, Rt = ye && K.x && K.y, Ft = (tt, Et, Tt) => { + const It = tt.includes(wt) && (Ee === nt || Ee === "auto" && Et === wt); return S(Pr, It, Tt), It; }; if (v = Te, ps && (xe && vs ? (oe(!1), m(), k(() => { - m = fe(V, "scroll", J(oe, !0), { + m = fe(O, "scroll", J(oe, !0), { A: !0 }); })) : oe(!0)), Se && S(Ir, Rt), we && (S(h), S(ne, !0), h = ne), ge && !xe && oe(!0), De && (d = ke === "move", l = ke === "leave", u = ke === "never", I(u, !0)), Me && S(Gr, _e), vt && S(qr, Le), gs) { - const Ze = Ft(Bt.x, Q.x, !0), Et = Ft(Bt.y, Q.y, !1); - S(jr, !(Ze && Et)); + const tt = Ft(Bt.x, Z.x, !0), Et = Ft(Bt.y, Z.y, !1); + S(jr, !(tt && Et)); } - Ne && (O(), $(), w(), S(Do, !ie.x, !0), S(Do, !ie.y, !1), S(Nr, G && !E)); + Ne && (H(), $(), w(), S(Do, !ie.x, !0), S(Do, !ie.y, !1), S(Nr, G && !T)); }, {}, L]; }, da = (t) => { - const e = Ge(), { P: s, R: r } = e, { elements: o } = s(), { host: c, padding: i, viewport: d, content: l } = o, u = ts(t), h = u ? {} : t, { elements: m } = h, { host: v, padding: p, viewport: b, content: y } = m || {}, x = u ? t : h.target, M = cn(x), k = ss(x, "textarea"), U = x.ownerDocument, H = U.documentElement, A = () => U.defaultView || Ae, L = J(Wr, [x]), B = J(wn, [x]), D = J(bt, ""), V = J(L, D, d), E = J(B, D, l), S = V(b), O = S === x, $ = O && M, w = !O && E(y), I = !O && S === w, R = $ ? H : S, oe = k ? L(D, c, v) : x, de = $ ? R : oe, le = !O && B(D, i, p), F = !I && w, Z = [F, R, le, de].map((ne) => ts(ne) && !kt(ne) && ne), te = (ne) => ne && Ws(Z, ne), Y = te(R) ? x : R, ue = { + const e = Ge(), { P: s, R: r } = e, { elements: o } = s(), { host: c, padding: i, viewport: d, content: l } = o, u = ts(t), h = u ? {} : t, { elements: m } = h, { host: v, padding: p, viewport: b, content: y } = m || {}, x = u ? t : h.target, A = cn(x), k = ss(x, "textarea"), U = x.ownerDocument, B = U.documentElement, D = () => U.defaultView || Ae, L = J(Wr, [x]), V = J(wn, [x]), E = J(bt, ""), O = J(L, E, d), T = J(V, E, l), S = O(b), H = S === x, $ = H && A, w = !H && T(y), I = !H && S === w, R = $ ? B : S, oe = k ? L(E, c, v) : x, de = $ ? R : oe, le = !H && V(E, i, p), F = !I && w, ee = [F, R, le, de].map((ne) => ts(ne) && !kt(ne) && ne), te = (ne) => ne && Ws(ee, ne), Y = te(R) ? x : R, ue = { vt: x, ht: de, ot: R, cn: le, bt: F, - gt: $ ? H : R, + gt: $ ? B : R, Kt: $ ? U : R, - rn: M ? H : Y, + rn: A ? B : Y, Jt: U, wt: k, - yt: M, + yt: A, Dt: u, - nt: O, - ln: A, - St: (ne) => Qs(R, st, ne), - Ot: (ne, we) => Ls(R, st, ne, we) + nt: H, + ln: D, + St: (ne) => Qs(R, ot, ne), + Ot: (ne, we) => Ls(R, ot, ne, we) }, { vt: z, ht: q, cn: j, ot: C, bt: N } = ue, G = [() => { - Ue(q, [at, ys]), Ue(z, ys), M && Ue(H, [ys, at]); + Ue(q, [lt, ys]), Ue(z, ys), A && Ue(B, [ys, lt]); }], K = k && te(q); - let Q = k ? z : Vs([N, C, j, q, z].find((ne) => ne && !te(ne))); + let Z = k ? z : Vs([N, C, j, q, z].find((ne) => ne && !te(ne))); const ie = $ ? z : N || C, ye = J(Ie, G); return [ue, () => { - const ne = A(), we = Os(), Ee = (ge) => { - Oe(kt(ge), Vs(ge)), lt(ge); + const ne = D(), we = Os(), Ee = (ge) => { + Oe(kt(ge), Vs(ge)), it(ge); }, Re = (ge) => fe(ge, "focusin focusout focus blur", pn, { I: !0, H: !1 }), ke = "tabindex", De = Xs(C, ke), xe = Re(we); - return Ye(q, at, O ? "" : Ar), Ye(j, Us, ""), Ye(C, st, ""), Ye(N, Mo, ""), O || (Ye(C, ke, De || "-1"), M && Ye(H, To, "")), K && (go(z, q), be(G, () => { - go(q, z), lt(q); - })), Oe(ie, Q), Oe(q, j), Oe(j || q, !O && C), Oe(C, N), be(G, [xe, () => { + return Xe(q, lt, H ? "" : Ar), Xe(j, Us, ""), Xe(C, ot, ""), Xe(N, Mo, ""), H || (Xe(C, ke, De || "-1"), A && Xe(B, To, "")), K && (go(z, q), be(G, () => { + go(q, z), it(q); + })), Oe(ie, Z), Oe(q, j), Oe(j || q, !H && C), Oe(C, N), be(G, [xe, () => { const ge = Os(), Te = te(C), _e = Te && ge === C ? z : ge, Me = Re(_e); - Ue(j, Us), Ue(N, Mo), Ue(C, st), M && Ue(H, To), De ? Ye(C, ke, De) : Ue(C, ke), te(N) && Ee(N), Te && Ee(C), te(j) && Ee(j), Is(_e), Me(); - }]), r && !O && (Js(C, st, bn), be(G, J(Ue, C, st))), Is(!O && M && we === z && ne.top === ne ? C : we), xe(), Q = 0, ye; + Ue(j, Us), Ue(N, Mo), Ue(C, ot), A && Ue(B, To), De ? Xe(C, ke, De) : Ue(C, ke), te(N) && Ee(N), Te && Ee(C), te(j) && Ee(j), Is(_e), Me(); + }]), r && !H && (Js(C, ot, bn), be(G, J(Ue, C, ot))), Is(!H && A && we === z && ne.top === ne ? C : we), xe(), Z = 0, ye; }, ye]; }, ua = ({ bt: t }) => ({ Gt: e, an: s, Tt: r }) => { const { xt: o } = e || {}, { $t: c } = s; @@ -1209,32 +1209,32 @@ const Kr = () => { }, J(xo, t, "padding", "")); return ({ It: d, Gt: l, an: u, Tt: h }) => { let [m, v] = i(h); - const { R: p } = Ge(), { ft: b, Ht: y, Ct: x } = l || {}, { ct: M } = u, [k, U] = d("paddingAbsolute"); + const { R: p } = Ge(), { ft: b, Ht: y, Ct: x } = l || {}, { ct: A } = u, [k, U] = d("paddingAbsolute"); (b || v || (h || y)) && ([m, v] = c(h)); - const A = !r && (U || x || v); - if (A) { - const L = !k || !e && !p, B = m.r + m.l, D = m.t + m.b, V = { - [Zo]: L && !M ? -B : 0, - [en]: L ? -D : 0, - [Qo]: L && M ? -B : 0, + const D = !r && (U || x || v); + if (D) { + const L = !k || !e && !p, V = m.r + m.l, E = m.t + m.b, O = { + [Zo]: L && !A ? -V : 0, + [en]: L ? -E : 0, + [Qo]: L && A ? -V : 0, top: L ? -m.t : 0, - right: L ? M ? -m.r : "auto" : 0, - left: L ? M ? "auto" : -m.l : 0, - [xt]: L && `calc(100% + ${B}px)` - }, E = { + right: L ? A ? -m.r : "auto" : 0, + left: L ? A ? "auto" : -m.l : 0, + [xt]: L && `calc(100% + ${V}px)` + }, T = { [Wo]: L ? m.t : 0, [Yo]: L ? m.r : 0, [Jo]: L ? m.b : 0, [Xo]: L ? m.l : 0 }; - Vt(e || s, V), Vt(s, E), re(o, { + Vt(e || s, O), Vt(s, T), re(o, { cn: m, un: !L, - rt: e ? E : re({}, V, E) + rt: e ? T : re({}, O, T) }); } return { - _n: A + _n: D }; }; }, fa = (t, e) => { @@ -1244,29 +1244,29 @@ const Kr = () => { w: 0, h: 0 } - }, M = { + }, A = { i: Wt, o: {} }, k = (F) => { h(_n, !p && F); - }, U = (F, Z) => { + }, U = (F, ee) => { const te = Ae.devicePixelRatio % 1 !== 0 ? 1 : 0, Y = { - w: b(F.w - Z.w), - h: b(F.h - Z.h) + w: b(F.w - ee.w), + h: b(F.h - ee.h) }; return { w: Y.w > te ? Y.w : 0, h: Y.h > te ? Y.h : 0 }; - }, [H, A] = Ve(x, J(to, c)), [L, B] = Ve(x, J(Bs, c)), [D, V] = Ve(x), [E] = Ve(M), [S, O] = Ve(x), [$] = Ve(M), [w] = Ve({ - i: (F, Z) => ds(F, Z, y), + }, [B, D] = Ve(x, J(to, c)), [L, V] = Ve(x, J(Bs, c)), [E, O] = Ve(x), [T] = Ve(A), [S, H] = Ve(x), [$] = Ve(A), [w] = Ve({ + i: (F, ee) => ds(F, ee, y), o: {} }, () => Er(c) ? pt(c, y) : {}), [I, R] = Ve({ - i: (F, Z) => Wt(F.T, Z.T) && Wt(F.D, Z.D), + i: (F, ee) => Wt(F.T, ee.T) && Wt(F.D, ee.D), o: vn() }, () => { k(!0); - const F = He(l), Z = h(Hr, !0), te = fe(d, wt, (j) => { + const F = He(l), ee = h(Hr, !0), te = fe(d, wt, (j) => { const C = He(l); j.isTrusted && C.x === F.x && C.y === F.y && hn(j); }, { @@ -1276,7 +1276,7 @@ const Kr = () => { Pe(l, { x: 0, y: 0 - }), Z(); + }), ee(); const Y = He(l), ue = Bs(l); Pe(l, { x: ue.w, @@ -1292,29 +1292,29 @@ const Kr = () => { T: Y, D: q }; - }), oe = Ht(En), de = (F, Z) => `${Z ? Dr : Lr}${br(F)}`, le = (F) => { - const Z = (Y) => [ot, dt, wt].map((ue) => de(ue, Y)), te = Z(!0).concat(Z()).join(" "); - h(te), h(Qe(F).map((Y) => de(F[Y], Y === "x")).join(" "), !0); + }), oe = Ht(En), de = (F, ee) => `${ee ? Dr : Lr}${br(F)}`, le = (F) => { + const ee = (Y) => [nt, ut, wt].map((ue) => de(ue, Y)), te = ee(!0).concat(ee()).join(" "); + h(te), h(et(F).map((Y) => de(F[Y], Y === "x")).join(" "), !0); }; - return ({ It: F, Gt: Z, an: te, Tt: Y }, { _n: ue }) => { - const { ft: z, Ht: q, Ct: j, dt: C, zt: N } = Z || {}, G = oe && oe.tt(t, e, te, s, F), { it: K, ut: Q, _t: ie } = G || {}, [ye, Se] = sa(F, s), [ne, we] = F("overflow"), Ee = os(ne.x), Re = os(ne.y), ke = z || ue || q || j || N || Se; - let De = A(Y), xe = B(Y), ge = V(Y), Te = O(Y); + return ({ It: F, Gt: ee, an: te, Tt: Y }, { _n: ue }) => { + const { ft: z, Ht: q, Ct: j, dt: C, zt: N } = ee || {}, G = oe && oe.tt(t, e, te, s, F), { it: K, ut: Z, _t: ie } = G || {}, [ye, Se] = sa(F, s), [ne, we] = F("overflow"), Ee = os(ne.x), Re = os(ne.y), ke = z || ue || q || j || N || Se; + let De = D(Y), xe = V(Y), ge = O(Y), Te = H(Y); if (Se && v && h(bn, !ye), ke) { - Qs(r, at, Xt) && k(!0); - const [co] = Q ? Q() : [], [Nt] = De = H(Y), [Ut] = xe = L(Y), zt = mn(c), Pt = p && Cr(m()), Un = { + Qs(r, lt, Xt) && k(!0); + const [co] = Z ? Z() : [], [Nt] = De = B(Y), [Ut] = xe = L(Y), zt = mn(c), Pt = p && Cr(m()), Un = { w: b(Ut.w + Nt.w), h: b(Ut.h + Nt.h) }, uo = { w: b((Pt ? Pt.w : zt.w + b(zt.w - Ut.w)) + Nt.w), h: b((Pt ? Pt.h : zt.h + b(zt.h - Ut.h)) + Nt.h) }; - co && co(), Te = S(uo), ge = D(U(Un, uo), Y); + co && co(), Te = S(uo), ge = E(U(Un, uo), Y); } - const [_e, Me] = Te, [Le, vt] = ge, [Bt, hs] = xe, [ps, vs] = De, [Ne, gs] = E({ + const [_e, Me] = Te, [Le, vt] = ge, [Bt, hs] = xe, [ps, vs] = De, [Ne, gs] = T({ x: Le.w > 0, y: Le.h > 0 - }), Rt = Ee && Re && (Ne.x || Ne.y) || Ee && Ne.x && !Ne.y || Re && Ne.y && !Ne.x, Ft = ue || j || N || vs || hs || Me || vt || we || Se || ke, Ze = oa(Ne, ne), [Et, Tt] = $(Ze.G), [, It] = w(Y), io = j || C || It || gs || Y, [In, Nn] = io ? I(Y) : R(); - return Ft && (Tt && le(Ze.G), ie && K && Vt(c, ie(Ze, te, K(Ze, Bt, ps)))), k(!1), Ls(r, at, Xt, Rt), Ls(o, Us, Xt, Rt), re(e, { + }), Rt = Ee && Re && (Ne.x || Ne.y) || Ee && Ne.x && !Ne.y || Re && Ne.y && !Ne.x, Ft = ue || j || N || vs || hs || Me || vt || we || Se || ke, tt = oa(Ne, ne), [Et, Tt] = $(tt.G), [, It] = w(Y), io = j || C || It || gs || Y, [In, Nn] = io ? I(Y) : R(); + return Ft && (Tt && le(tt.G), ie && K && Vt(c, ie(tt, te, K(tt, Bt, ps)))), k(!1), Ls(r, lt, Xt, Rt), Ls(o, Us, Xt, Rt), re(e, { G: Et, Vt: { x: _e.w, @@ -1361,8 +1361,8 @@ const Kr = () => { y: 0 }, G: { - x: dt, - y: dt + x: ut, + y: ut }, en: { x: !1, @@ -1379,35 +1379,35 @@ const Kr = () => { }, pa = (t, e, s, r, o) => { const c = Eo(e, {}), [i, d, l, u, h] = ha(t), [m, v, p] = aa(u, l, c, (U) => { k({}, U); - }), [b, y, , x] = ca(t, e, p, l, u, o), M = (U) => Qe(U).some((H) => !!U[H]), k = (U, H) => { + }), [b, y, , x] = ca(t, e, p, l, u, o), A = (U) => et(U).some((B) => !!U[B]), k = (U, B) => { if (s()) return !1; - const { fn: A, Tt: L, At: B, pn: D } = U, V = A || {}, E = !!L, S = { - It: Eo(e, V, E), - fn: V, - Tt: E + const { fn: D, Tt: L, At: V, pn: E } = U, O = D || {}, T = !!L, S = { + It: Eo(e, O, T), + fn: O, + Tt: T }; - if (D) + if (E) return y(S), !1; - const O = H || v(re({}, S, { - At: B + const H = B || v(re({}, S, { + At: V })), $ = d(re({}, S, { an: p, - Gt: O + Gt: H })); y(re({}, S, { - Gt: O, + Gt: H, Qt: $ })); - const w = M(O), I = M($), R = w || I || !Ys(V) || E; + const w = A(H), I = A($), R = w || I || !Ys(O) || T; return R && r(U, { - Gt: O, + Gt: H, Qt: $ }), R; }; return [() => { - const { rn: U, gt: H } = u, A = He(U), L = [m(), i(), b()]; - return Pe(H, A), J(Ie, L); + const { rn: U, gt: B } = u, D = He(U), L = [m(), i(), b()]; + return Pe(B, D), J(Ie, L); }, k, () => ({ vn: p, hn: l @@ -1415,51 +1415,51 @@ const Kr = () => { gn: u, bn: x }, h]; -}, it = (t, e, s) => { +}, ct = (t, e, s) => { const { N: r } = Ge(), o = ts(t), c = o ? t : t.target, i = kn(c); if (e && !i) { let d = !1; - const l = [], u = {}, h = (E) => { - const S = on(E), O = Ht(ea); - return O ? O(S, !0) : S; - }, m = re({}, r(), h(e)), [v, p, b] = Ns(), [y, x, M] = Ns(s), k = (E, S) => { - M(E, S), b(E, S); - }, [U, H, A, L, B] = pa(t, m, () => d, ({ fn: E, Tt: S }, { Gt: O, Qt: $ }) => { - const { ft: w, Ct: I, xt: R, Ht: oe, Et: de, dt: le } = O, { Zt: F, tn: Z, nn: te, sn: Y } = $; - k("updated", [V, { + const l = [], u = {}, h = (T) => { + const S = on(T), H = Ht(ea); + return H ? H(S, !0) : S; + }, m = re({}, r(), h(e)), [v, p, b] = Ns(), [y, x, A] = Ns(s), k = (T, S) => { + A(T, S), b(T, S); + }, [U, B, D, L, V] = pa(t, m, () => d, ({ fn: T, Tt: S }, { Gt: H, Qt: $ }) => { + const { ft: w, Ct: I, xt: R, Ht: oe, Et: de, dt: le } = H, { Zt: F, tn: ee, nn: te, sn: Y } = $; + k("updated", [O, { updateHints: { sizeChanged: !!w, directionChanged: !!I, heightIntrinsicChanged: !!R, overflowEdgeChanged: !!F, - overflowAmountChanged: !!Z, + overflowAmountChanged: !!ee, overflowStyleChanged: !!te, scrollCoordinatesChanged: !!Y, contentMutation: !!oe, hostMutation: !!de, appear: !!le }, - changedOptions: E || {}, + changedOptions: T || {}, force: !!S }]); - }, (E) => k("scroll", [V, E])), D = (E) => { - Jr(c), Ie(l), d = !0, k("destroyed", [V, E]), p(), x(); - }, V = { - options(E, S) { - if (E) { - const O = S ? r() : {}, $ = gn(m, re(O, h(E))); - Ys($) || (re(m, $), H({ + }, (T) => k("scroll", [O, T])), E = (T) => { + Jr(c), Ie(l), d = !0, k("destroyed", [O, T]), p(), x(); + }, O = { + options(T, S) { + if (T) { + const H = S ? r() : {}, $ = gn(m, re(H, h(T))); + Ys($) || (re(m, $), B({ fn: $ })); } return re({}, m); }, on: y, - off: (E, S) => { - E && S && x(E, S); + off: (T, S) => { + T && S && x(T, S); }, state() { - const { vn: E, hn: S } = A(), { ct: O } = E, { Vt: $, Rt: w, G: I, en: R, cn: oe, un: de, Pt: le } = S; + const { vn: T, hn: S } = D(), { ct: H } = T, { Vt: $, Rt: w, G: I, en: R, cn: oe, un: de, Pt: le } = S; return re({}, { overflowEdge: $, overflowAmount: w, @@ -1471,33 +1471,33 @@ const Kr = () => { }, padding: oe, paddingAbsolute: de, - directionRTL: O, + directionRTL: H, destroyed: d }); }, elements() { - const { vt: E, ht: S, cn: O, ot: $, bt: w, gt: I, Kt: R } = L.gn, { Ft: oe, Wt: de } = L.bn, le = (Z) => { - const { Mt: te, kt: Y, Lt: ue } = Z; + const { vt: T, ht: S, cn: H, ot: $, bt: w, gt: I, Kt: R } = L.gn, { Ft: oe, Wt: de } = L.bn, le = (ee) => { + const { Mt: te, kt: Y, Lt: ue } = ee; return { scrollbar: ue, track: Y, handle: te }; - }, F = (Z) => { - const { jt: te, Xt: Y } = Z, ue = le(te[0]); + }, F = (ee) => { + const { jt: te, Xt: Y } = ee, ue = le(te[0]); return re({}, ue, { clone: () => { const z = le(Y()); - return H({ + return B({ pn: !0 }), z; } }); }; return re({}, { - target: E, + target: T, host: S, - padding: O || $, + padding: H || $, viewport: $, content: w || $, scrollOffsetElement: I, @@ -1506,26 +1506,26 @@ const Kr = () => { scrollbarVertical: F(de) }); }, - update: (E) => H({ - Tt: E, + update: (T) => B({ + Tt: T, At: !0 }), - destroy: J(D, !1), - plugin: (E) => u[Qe(E)[0]] + destroy: J(E, !1), + plugin: (T) => u[et(T)[0]] }; - return be(l, [B]), Xr(c, V), Cn($n, it, [V, v, u]), Yr(L.gn.yt, !o && t.cancel) ? (D(!0), V) : (be(l, U()), k("initialized", [V]), V.update(!0), V); + return be(l, [V]), Xr(c, O), Cn($n, ct, [O, v, u]), Yr(L.gn.yt, !o && t.cancel) ? (E(!0), O) : (be(l, U()), k("initialized", [O]), O.update(!0), O); } return i; }; -it.plugin = (t) => { - const e = qe(t), s = e ? t : [t], r = s.map((o) => Cn(o, it)[0]); +ct.plugin = (t) => { + const e = qe(t), s = e ? t : [t], r = s.map((o) => Cn(o, ct)[0]); return Zr(s), e ? r : r[0]; }; -it.valid = (t) => { +ct.valid = (t) => { const e = t && t.elements, s = Fe(e) && e(); return es(s) && !!kn(s.target); }; -it.env = () => { +ct.env = () => { const { k: t, M: e, R: s, V: r, B: o, F: c, P: i, U: d, N: l, q: u } = Ge(); return re({}, { scrollbarsSize: t, @@ -1542,23 +1542,23 @@ it.env = () => { }; function va() { let t; - const e = T(null), s = Math.floor(Math.random() * 2 ** 32), r = T(!1), o = T([]), c = () => o.value, i = () => t.getSelection(), d = () => o.value.length, l = () => t.clearSelection(!0), u = T(), h = T(null), m = T(null), v = T(null); + const e = M(null), s = Math.floor(Math.random() * 2 ** 32), r = M(!1), o = M([]), c = () => o.value, i = () => t.getSelection(), d = () => o.value.length, l = () => t.clearSelection(!0), u = M(), h = M(null), m = M(null), v = M(null); function p() { t = new er({ area: e.value, keyboardDrag: !1, selectedClass: "vf-explorer-selected", selectorClass: "vf-explorer-selector" - }), t.subscribe("DS:start:pre", ({ items: H, event: A, isDragging: L }) => { + }), t.subscribe("DS:start:pre", ({ items: B, event: D, isDragging: L }) => { if (L) - t.Interaction._reset(A); + t.Interaction._reset(D); else { r.value = !1; - const B = e.value.offsetWidth - A.offsetX, D = e.value.offsetHeight - A.offsetY; - B < 15 && D < 15 && t.Interaction._reset(A), A.target.classList.contains("os-scrollbar-handle") && t.Interaction._reset(A); + const V = e.value.offsetWidth - D.offsetX, E = e.value.offsetHeight - D.offsetY; + V < 15 && E < 15 && t.Interaction._reset(D), D.target.classList.contains("os-scrollbar-handle") && t.Interaction._reset(D); } - }), document.addEventListener("dragleave", (H) => { - !H.buttons && r.value && (r.value = !1); + }), document.addEventListener("dragleave", (B) => { + !B.buttons && r.value && (r.value = !1); }); } const b = () => ft(() => { @@ -1566,25 +1566,25 @@ function va() { t.getSelectables() ), y(); }), y = () => { - o.value = t.getSelection().map((H) => JSON.parse(H.dataset.item)), u.value(o.value); + o.value = t.getSelection().map((B) => JSON.parse(B.dataset.item)), u.value(o.value); }, x = () => ft(() => { - const H = c().map((A) => A.path); + const B = c().map((D) => D.path); l(), t.setSettings({ selectables: document.getElementsByClassName("vf-item-" + s) }), t.addSelection( - t.getSelectables().filter((A) => H.includes(JSON.parse(A.dataset.item).path)) + t.getSelectables().filter((D) => B.includes(JSON.parse(D.dataset.item).path)) ), y(), k(); - }), M = (H) => { - u.value = H, t.subscribe("DS:end", ({ items: A, event: L, isDragging: B }) => { - o.value = A.map((D) => JSON.parse(D.dataset.item)), H(A.map((D) => JSON.parse(D.dataset.item))); + }), A = (B) => { + u.value = B, t.subscribe("DS:end", ({ items: D, event: L, isDragging: V }) => { + o.value = D.map((E) => JSON.parse(E.dataset.item)), B(D.map((E) => JSON.parse(E.dataset.item))); }); }, k = () => { h.value && (e.value.getBoundingClientRect().height < e.value.scrollHeight ? (m.value.style.height = e.value.scrollHeight + "px", m.value.style.display = "block") : (m.value.style.height = "100%", m.value.style.display = "none")); - }, U = (H) => { + }, U = (B) => { if (!h.value) return; - const { scrollOffsetElement: A } = h.value.elements(); - A.scrollTo( + const { scrollOffsetElement: D } = h.value.elements(); + D.scrollTo( { top: e.value.scrollTop, left: 0 @@ -1592,28 +1592,28 @@ function va() { ); }; return Ce(() => { - it(v.value, { + ct(v.value, { scrollbars: { theme: "vf-theme-dark dark:vf-theme-light" }, plugins: { - OverlayScrollbars: it + OverlayScrollbars: ct // ScrollbarsHidingPlugin, // SizeObserverPlugin, // ClickScrollPlugin } }, { - initialized: (H) => { - h.value = H; + initialized: (B) => { + h.value = B; }, - scroll: (H, A) => { - const { scrollOffsetElement: L } = H.elements(); + scroll: (B, D) => { + const { scrollOffsetElement: L } = B.elements(); e.value.scrollTo({ top: L.scrollTop, left: 0 }); } - }), p(), k(), new ResizeObserver(k).observe(e.value), e.value.addEventListener("scroll", U), t.subscribe("DS:scroll", ({ isDragging: H }) => H || U()); + }), p(), k(), new ResizeObserver(k).observe(e.value), e.value.addEventListener("scroll", U), t.subscribe("DS:scroll", ({ isDragging: B }) => B || U()); }), qs(() => { t && t.stop(); }), Ro(() => { @@ -1630,11 +1630,11 @@ function va() { clearSelection: l, refreshSelection: x, getCount: d, - onSelect: M + onSelect: A }; } function ga(t, e) { - const s = T(t), r = T(e), o = T([]), c = T([]), i = T([]), d = T(!1), l = T(5); + const s = M(t), r = M(e), o = M([]), c = M([]), i = M([]), d = M(!1), l = M(5); let u = !1, h = !1; const m = Ot({ adapter: s, @@ -1643,17 +1643,17 @@ function ga(t, e) { files: [] }); function v() { - let k = [], U = [], H = r.value ?? s.value + "://"; - H.length === 0 && (o.value = []), H.replace(s.value + "://", "").split("/").forEach(function(B) { - k.push(B), k.join("/") !== "" && U.push({ - basename: B, - name: B, + let k = [], U = [], B = r.value ?? s.value + "://"; + B.length === 0 && (o.value = []), B.replace(s.value + "://", "").split("/").forEach(function(V) { + k.push(V), k.join("/") !== "" && U.push({ + basename: V, + name: V, path: s.value + "://" + k.join("/"), type: "dir" }); }), c.value = U; - const [A, L] = b(U, l.value); - i.value = L, o.value = A; + const [D, L] = b(U, l.value); + i.value = L, o.value = D; } function p(k) { l.value = k, v(); @@ -1667,12 +1667,12 @@ function ga(t, e) { function x() { return o.value && o.value.length && !h; } - const M = Je(() => { + const A = Ze(() => { var k; return ((k = o.value[o.value.length - 2]) == null ? void 0 : k.path) ?? s.value + "://"; }); return Ce(() => { - }), mt(r, v), Ce(v), { + }), Je(r, v), Ce(v), { adapter: s, path: r, loading: u, @@ -1685,7 +1685,7 @@ function ga(t, e) { showHiddenBreadcrumbs: d, toggleHiddenBreadcrumbs: y, isGoUpAvailable: x, - parentFolderPath: M + parentFolderPath: A }; } const _a = (t, e) => { @@ -1705,11 +1705,11 @@ const _a = (t, e) => { // storage storage: s, // localization object - i18n: Je(() => cr(s, d, r, i)), + i18n: Ze(() => cr(s, d, r, i)), // modal state modal: hr(), // dragSelect object, it is responsible for selecting items - dragSelect: Je(() => va()), + dragSelect: Ze(() => va()), // http object requester: ar(t.request), // active features @@ -1749,7 +1749,7 @@ const _a = (t, e) => { }, ba = /* @__PURE__ */ n("div", { class: "fixed inset-0 bg-gray-500 dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity" }, null, -1), xa = { class: "fixed z-10 inset-0 overflow-hidden" }, ya = { class: "bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, wa = { 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" }, Ke = { __name: "ModalLayout", setup(t) { - const e = T(null), s = ae("ServiceContainer"); + const e = M(null), s = ae("ServiceContainer"); return Ce(() => { const r = document.querySelector(".v-f-modal input"); r && r.focus(), ft(() => { @@ -1774,7 +1774,7 @@ const _a = (t, e) => { n("div", xa, [ n("div", { class: "flex items-end sm:items-center justify-center min-h-full p-4 text-center sm:p-0", - onMousedown: o[0] || (o[0] = nt((c) => a(s).modal.close(), ["self"])) + onMousedown: o[0] || (o[0] = rt((c) => a(s).modal.close(), ["self"])) }, [ n("div", { ref_key: "modalBody", @@ -1802,7 +1802,7 @@ const _a = (t, e) => { on: { type: String, required: !0 } }, setup(t, { emit: e, slots: s }) { - const r = ae("ServiceContainer"), o = T(!1), { t: c } = r.i18n; + const r = ae("ServiceContainer"), o = M(!1), { t: c } = r.i18n; let i = null; const d = () => { clearTimeout(i), o.value = !0, i = setTimeout(() => { @@ -1850,7 +1850,7 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" }, Da = { - class: "flex", + class: "flex overflow-auto", "aria-label": "Tabs" }, La = ["onClick", "aria-current"], Va = { key: 0, @@ -1894,24 +1894,28 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i /* @__PURE__ */ n("kbd", null, "Esc") ], -1), Sl = { class: "flex justify-between text-sm text-gray-500 dark:text-gray-400" }, Cl = /* @__PURE__ */ n("div", null, [ /* @__PURE__ */ n("kbd", null, "Ctrl"), - /* @__PURE__ */ ee(" + "), + /* @__PURE__ */ Q(" + "), /* @__PURE__ */ n("kbd", null, "A") ], -1), El = { class: "flex justify-between text-sm text-gray-500 dark:text-gray-400" }, Tl = /* @__PURE__ */ n("div", null, [ /* @__PURE__ */ n("kbd", null, "Ctrl"), - /* @__PURE__ */ ee(" + "), + /* @__PURE__ */ Q(" + "), /* @__PURE__ */ n("kbd", null, "F") ], -1), Ml = { class: "flex justify-between text-sm text-gray-500 dark:text-gray-400" }, Al = /* @__PURE__ */ n("div", null, [ /* @__PURE__ */ n("kbd", null, "Ctrl"), - /* @__PURE__ */ ee(" + "), + /* @__PURE__ */ Q(" + "), /* @__PURE__ */ n("kbd", null, "E") ], -1), Dl = { class: "flex justify-between text-sm text-gray-500 dark:text-gray-400" }, Ll = /* @__PURE__ */ n("div", null, [ /* @__PURE__ */ n("kbd", null, "Ctrl"), - /* @__PURE__ */ ee(" + "), + /* @__PURE__ */ Q(" + "), /* @__PURE__ */ n("kbd", null, ",") -], -1), Vl = { +], -1), Vl = { class: "flex justify-between text-sm text-gray-500 dark:text-gray-400" }, Ol = /* @__PURE__ */ n("div", null, [ + /* @__PURE__ */ n("kbd", null, "Ctrl"), + /* @__PURE__ */ Q(" + "), + /* @__PURE__ */ n("kbd", null, "Enter") +], -1), Hl = { key: 3, class: "mt-3" -}, Ol = { class: "m-1 text-sm text-gray-500" }, Mn = { +}, Bl = { class: "m-1 text-sm text-gray-500" }, Mn = { __name: "ModalAbout", setup(t) { const e = ae("ServiceContainer"), { setStore: s, clearStore: r } = e.storage, { t: o, changeLocale: c, locale: i } = e.i18n, d = { @@ -1919,15 +1923,15 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i SETTINGS: "settings", SHORTCUTS: "shortcuts", RESET: "reset" - }, l = Je(() => [ + }, l = Ze(() => [ { name: o("About"), key: d.ABOUT }, { name: o("Settings"), key: d.SETTINGS }, { name: o("Shortcuts"), key: d.SHORTCUTS }, { name: o("Reset"), key: d.RESET } - ]), u = T("about"), h = async () => { + ]), u = M("about"), h = async () => { r(), location.reload(); - }, m = (H) => { - e.theme.set(H), e.emitter.emit("vf-theme-saved"); + }, m = (B) => { + e.theme.set(B), e.emitter.emit("vf-theme-saved"); }, v = () => { e.metricUnits = !e.metricUnits, e.filesize = e.metricUnits ? Uo : No, s("metricUnits", e.metricUnits), e.emitter.emit("vf-metric-units-saved"); }, p = () => { @@ -1949,17 +1953,17 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i tr: "Turkish (Türkçe)", zhCN: "Simplified Chinese (简体中文)", zhTW: "Traditional Chinese (繁體中文)" - }).filter(([H]) => Object.keys(x).includes(H)) - ), U = Je(() => ({ + }).filter(([B]) => Object.keys(x).includes(B)) + ), U = Ze(() => ({ system: o("System"), light: o("Light"), dark: o("Dark") })); - return (H, A) => (f(), X(Ke, null, { + return (B, D) => (f(), X(Ke, null, { buttons: se(() => [ n("button", { type: "button", - onClick: A[8] || (A[8] = (L) => a(e).modal.close()), + onClick: D[8] || (D[8] = (L) => a(e).modal.close()), class: "vf-btn vf-btn-secondary" }, _(a(o)("Close")), 1) ]), @@ -1973,7 +1977,7 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i n("nav", Da, [ (f(!0), g(he, null, $e(l.value, (L) => (f(), g("button", { key: L.name, - onClick: (B) => u.value = L.key, + onClick: (V) => u.value = L.key, class: me([L.key === u.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": L.current ? "page" : void 0 }, _(L.name), 11, La))), 128)) @@ -1996,7 +2000,7 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i id: "metric_unit", name: "metric_unit", type: "checkbox", - "onUpdate:modelValue": A[0] || (A[0] = (L) => a(e).metricUnits = L), + "onUpdate:modelValue": D[0] || (D[0] = (L) => a(e).metricUnits = L), onClick: v, class: "h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600" }, null, 512), [ @@ -2005,13 +2009,13 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i ]), n("div", Pa, [ n("label", ja, [ - ee(_(a(o)("Use Metric Units")) + " ", 1), + Q(_(a(o)("Use Metric Units")) + " ", 1), W(gt, { class: "ms-3", on: "vf-metric-units-saved" }, { default: se(() => [ - ee(_(a(o)("Saved.")), 1) + Q(_(a(o)("Saved.")), 1) ]), _: 1 }) @@ -2024,7 +2028,7 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i id: "large_icons", name: "large_icons", type: "checkbox", - "onUpdate:modelValue": A[1] || (A[1] = (L) => a(e).compactListView = L), + "onUpdate:modelValue": D[1] || (D[1] = (L) => a(e).compactListView = L), onClick: p, class: "h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600" }, null, 512), [ @@ -2033,13 +2037,13 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i ]), n("div", Ka, [ n("label", Wa, [ - ee(_(a(o)("Compact list view")) + " ", 1), + Q(_(a(o)("Compact list view")) + " ", 1), W(gt, { class: "ms-3", on: "vf-compact-view-saved" }, { default: se(() => [ - ee(_(a(o)("Saved.")), 1) + Q(_(a(o)("Saved.")), 1) ]), _: 1 }) @@ -2052,7 +2056,7 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i id: "persist_path", name: "persist_path", type: "checkbox", - "onUpdate:modelValue": A[2] || (A[2] = (L) => a(e).persist = L), + "onUpdate:modelValue": D[2] || (D[2] = (L) => a(e).persist = L), onClick: y, class: "h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600" }, null, 512), [ @@ -2061,13 +2065,13 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i ]), n("div", Ja, [ n("label", Qa, [ - ee(_(a(o)("Persist path on reload")) + " ", 1), + Q(_(a(o)("Persist path on reload")) + " ", 1), W(gt, { class: "ms-3", on: "vf-persist-path-saved" }, { default: se(() => [ - ee(_(a(o)("Saved.")), 1) + Q(_(a(o)("Saved.")), 1) ]), _: 1 }) @@ -2080,7 +2084,7 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i id: "show_thumbnails", name: "show_thumbnails", type: "checkbox", - "onUpdate:modelValue": A[3] || (A[3] = (L) => a(e).showThumbnails = L), + "onUpdate:modelValue": D[3] || (D[3] = (L) => a(e).showThumbnails = L), onClick: b, class: "h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600" }, null, 512), [ @@ -2089,13 +2093,13 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i ]), n("div", tl, [ n("label", sl, [ - ee(_(a(o)("Show thumbnails")) + " ", 1), + Q(_(a(o)("Show thumbnails")) + " ", 1), W(gt, { class: "ms-3", on: "vf-show-thumbnails-saved" }, { default: se(() => [ - ee(_(a(o)("Saved.")), 1) + Q(_(a(o)("Saved.")), 1) ]), _: 1 }) @@ -2109,14 +2113,14 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i n("div", al, [ ve(n("select", { id: "theme", - "onUpdate:modelValue": A[4] || (A[4] = (L) => a(e).theme.value = L), - onChange: A[5] || (A[5] = (L) => m(L.target.value)), + "onUpdate:modelValue": D[4] || (D[4] = (L) => a(e).theme.value = L), + onChange: D[5] || (D[5] = (L) => m(L.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" }, [ n("optgroup", { label: a(o)("Theme") }, [ - (f(!0), g(he, null, $e(U.value, (L, B) => (f(), g("option", { value: B }, _(L), 9, il))), 256)) + (f(!0), g(he, null, $e(U.value, (L, V) => (f(), g("option", { value: V }, _(L), 9, il))), 256)) ], 8, ll) ], 544), [ [Ss, a(e).theme.value] @@ -2126,7 +2130,7 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i on: "vf-theme-saved" }, { default: se(() => [ - ee(_(a(o)("Saved.")), 1) + Q(_(a(o)("Saved.")), 1) ]), _: 1 }) @@ -2139,14 +2143,14 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i n("div", ml, [ ve(n("select", { id: "language", - "onUpdate:modelValue": A[6] || (A[6] = (L) => Fo(i) ? i.value = L : null), - onChange: A[7] || (A[7] = (L) => a(c)(L.target.value)), + "onUpdate:modelValue": D[6] || (D[6] = (L) => Fo(i) ? i.value = L : null), + onChange: D[7] || (D[7] = (L) => a(c)(L.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" }, [ n("optgroup", { label: a(o)("Language") }, [ - (f(!0), g(he, null, $e(a(k), (L, B) => (f(), g("option", { value: B }, _(L), 9, hl))), 256)) + (f(!0), g(he, null, $e(a(k), (L, V) => (f(), g("option", { value: V }, _(L), 9, hl))), 256)) ], 8, fl) ], 544), [ [Ss, a(i)] @@ -2156,7 +2160,7 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i on: "vf-language-saved" }, { default: se(() => [ - ee(_(a(o)("Saved.")), 1) + Q(_(a(o)("Saved.")), 1) ]), _: 1 }) @@ -2177,33 +2181,37 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i xl ]), n("div", yl, [ - ee(_(a(o)("Delete")) + " ", 1), + Q(_(a(o)("Delete")) + " ", 1), wl ]), n("div", kl, [ - ee(_(a(o)("Escape")) + " ", 1), + Q(_(a(o)("Escape")) + " ", 1), $l ]), n("div", Sl, [ - ee(_(a(o)("Select All")) + " ", 1), + Q(_(a(o)("Select All")) + " ", 1), Cl ]), n("div", El, [ - ee(_(a(o)("Search")) + " ", 1), + Q(_(a(o)("Search")) + " ", 1), Tl ]), n("div", Ml, [ - ee(_(a(o)("Toggle Sidebar")) + " ", 1), + Q(_(a(o)("Toggle Sidebar")) + " ", 1), Al ]), n("div", Dl, [ - ee(_(a(o)("Open Settings")) + " ", 1), + Q(_(a(o)("Open Settings")) + " ", 1), Ll + ]), + n("div", Vl, [ + Q(_(a(o)("Toggle Full Screen")) + " ", 1), + Ol ]) ]) ])) : P("", !0), - u.value === d.RESET ? (f(), g("div", Vl, [ - n("div", Ol, _(a(o)("Reset all settings to default")), 1), + u.value === d.RESET ? (f(), g("div", Hl, [ + n("div", Bl, _(a(o)("Reset all settings to default")), 1), n("button", { onClick: h, type: "button", @@ -2216,7 +2224,7 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i _: 1 })); } -}, Hl = ["aria-label"], Bl = /* @__PURE__ */ n("svg", { +}, Rl = ["aria-label"], Fl = /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", @@ -2229,8 +2237,8 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i "stroke-linejoin": "round", d: "M6 18L18 6M6 6l12 12" }) -], -1), Rl = [ - Bl +], -1), Il = [ + Fl ], We = { __name: "Message", props: { @@ -2242,8 +2250,8 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i emits: ["hidden"], setup(t, { emit: e }) { var u; - const s = e, r = ae("ServiceContainer"), { t: o } = r.i18n, c = T(!1), i = T(null), d = T((u = i.value) == null ? void 0 : u.strMessage); - mt(d, () => c.value = !1); + const s = e, r = ae("ServiceContainer"), { t: o } = r.i18n, c = M(!1), i = M(null), d = M((u = i.value) == null ? void 0 : u.strMessage); + Je(d, () => c.value = !1); const l = () => { s("hidden"), c.value = !0; }; @@ -2261,11 +2269,11 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i "aria-label": a(o)("Close"), "data-microtip-position": "top-left", role: "tooltip" - }, Rl, 8, Hl) + }, Il, 8, Rl) ], 2)) ])); } -}, Fl = { class: "sm:flex sm:items-start" }, Il = /* @__PURE__ */ n("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" }, [ +}, Nl = { class: "sm:flex sm:items-start" }, Ul = /* @__PURE__ */ n("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" }, [ /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-red-600 dark:stroke-red-200", @@ -2280,13 +2288,13 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i 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), Nl = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Ul = { +], -1), zl = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Pl = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, zl = { class: "mt-2" }, Pl = { class: "text-sm text-gray-500" }, jl = { +}, jl = { class: "mt-2" }, ql = { class: "text-sm text-gray-500" }, Gl = { class: "text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar", style: { "max-height": "200px" } -}, ql = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Gl = { +}, Kl = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Wl = { 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", @@ -2294,13 +2302,13 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, Kl = /* @__PURE__ */ n("path", { +}, Yl = /* @__PURE__ */ n("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), Wl = [ - Kl -], Yl = { +}, null, -1), Xl = [ + Yl +], Jl = { key: 1, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500", @@ -2308,16 +2316,16 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, Xl = /* @__PURE__ */ n("path", { +}, Ql = /* @__PURE__ */ n("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), Jl = [ - Xl -], Ql = { class: "ml-1.5" }, Zl = { class: "m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center" }, ro = { +}, null, -1), Zl = [ + Ql +], ei = { class: "ml-1.5" }, ti = { class: "m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center" }, ro = { __name: "ModalDelete", setup(t) { - const e = ae("ServiceContainer"), { t: s } = e.i18n, r = T(e.modal.data.items), o = T(""), c = () => { + const e = ae("ServiceContainer"), { t: s } = e.i18n, r = M(e.modal.data.items), o = M(""), c = () => { r.value.length && e.emitter.emit("vf-fetch", { params: { q: "delete", @@ -2348,19 +2356,19 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i onClick: d[1] || (d[1] = (l) => a(e).modal.close()), class: "vf-btn vf-btn-secondary" }, _(a(s)("Cancel")), 1), - n("div", Zl, _(a(s)("This action cannot be undone.")), 1) + n("div", ti, _(a(s)("This action cannot be undone.")), 1) ]), default: se(() => [ - n("div", Fl, [ - Il, - n("div", Nl, [ - n("h3", Ul, _(a(s)("Delete files")), 1), - n("div", zl, [ - n("p", Pl, _(a(s)("Are you sure you want to delete these files?")), 1), - n("div", jl, [ - (f(!0), g(he, null, $e(r.value, (l) => (f(), g("p", ql, [ - l.type === "dir" ? (f(), g("svg", Gl, Wl)) : (f(), g("svg", Yl, Jl)), - n("span", Ql, _(l.basename), 1) + n("div", Nl, [ + Ul, + n("div", zl, [ + n("h3", Pl, _(a(s)("Delete files")), 1), + n("div", jl, [ + n("p", ql, _(a(s)("Are you sure you want to delete these files?")), 1), + n("div", Gl, [ + (f(!0), g(he, null, $e(r.value, (l) => (f(), g("p", Kl, [ + l.type === "dir" ? (f(), g("svg", Wl, Xl)) : (f(), g("svg", Jl, Zl)), + n("span", ei, _(l.basename), 1) ]))), 256)) ]), o.value.length ? (f(), X(We, { @@ -2369,7 +2377,7 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i error: "" }, { default: se(() => [ - ee(_(o.value), 1) + Q(_(o.value), 1) ]), _: 1 })) : P("", !0) @@ -2380,7 +2388,7 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i _: 1 })); } -}, ei = { class: "sm:flex sm:items-start" }, ti = /* @__PURE__ */ n("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" }, [ +}, si = { class: "sm:flex sm:items-start" }, oi = /* @__PURE__ */ n("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" }, [ /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", @@ -2395,10 +2403,10 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i 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), si = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, oi = { +], -1), ni = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ri = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, ni = { class: "mt-2" }, ri = { class: "flex text-sm text-gray-800 dark:text-gray-400 py-2" }, ai = { +}, ai = { class: "mt-2" }, li = { class: "flex text-sm text-gray-800 dark:text-gray-400 py-2" }, ii = { 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", @@ -2406,13 +2414,13 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, li = /* @__PURE__ */ n("path", { +}, ci = /* @__PURE__ */ n("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), ii = [ - li -], ci = { +}, null, -1), di = [ + ci +], ui = { key: 1, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500", @@ -2420,16 +2428,16 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, di = /* @__PURE__ */ n("path", { +}, mi = /* @__PURE__ */ n("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), ui = [ - di -], mi = { class: "ml-1.5" }, ao = { +}, null, -1), fi = [ + mi +], hi = { class: "ml-1.5" }, ao = { __name: "ModalRename", setup(t) { - const e = ae("ServiceContainer"), { t: s } = e.i18n, r = T(e.modal.data.items[0]), o = T(e.modal.data.items[0].basename), c = T(""), i = () => { + const e = ae("ServiceContainer"), { t: s } = e.i18n, r = M(e.modal.data.items[0]), o = M(e.modal.data.items[0].basename), c = M(""), i = () => { o.value != "" && e.emitter.emit("vf-fetch", { params: { q: "rename", @@ -2463,14 +2471,14 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i }, _(a(s)("Cancel")), 1) ]), default: se(() => [ - n("div", ei, [ - ti, - n("div", si, [ - n("h3", oi, _(a(s)("Rename")), 1), - n("div", ni, [ - n("p", ri, [ - r.value.type === "dir" ? (f(), g("svg", ai, ii)) : (f(), g("svg", ci, ui)), - n("span", mi, _(r.value.basename), 1) + n("div", si, [ + oi, + n("div", ni, [ + n("h3", ri, _(a(s)("Rename")), 1), + n("div", ai, [ + n("p", li, [ + r.value.type === "dir" ? (f(), g("svg", ii, di)) : (f(), g("svg", ui, fi)), + n("span", hi, _(r.value.basename), 1) ]), ve(n("input", { "onUpdate:modelValue": l[0] || (l[0] = (u) => o.value = u), @@ -2487,7 +2495,7 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i error: "" }, { default: se(() => [ - ee(_(c.value), 1) + Q(_(c.value), 1) ]), _: 1 })) : P("", !0) @@ -2498,19 +2506,20 @@ const gt = /* @__PURE__ */ ka($a, [["render", Ca]]), Ea = { class: "sm:flex sm:i _: 1 })); } -}, tt = { +}, Ye = { ESCAPE: "Escape", F2: "F2", F5: "F5", DELETE: "Delete", + ENTER: "Enter", BACKSLASH: "Backslash", KEY_A: "KeyA", KEY_E: "KeyE", KEY_F: "KeyF" }; -function fi(t) { +function pi(t) { const e = (s) => { - s.code === tt.ESCAPE && (t.modal.close(), t.root.focus()), !t.modal.visible && (t.fs.searchMode || (s.code === tt.F2 && t.features.includes(pe.RENAME) && (t.dragSelect.getCount() !== 1 || t.modal.open(ao, { items: t.dragSelect.getSelected() })), s.code === tt.F5 && t.emitter.emit("vf-fetch", { params: { q: "index", adapter: t.fs.adapter, path: t.fs.data.dirname } }), s.code === tt.DELETE && (!t.dragSelect.getCount() || t.modal.open(ro, { items: t.dragSelect.getSelected() })), s.metaKey && s.code === tt.BACKSLASH && t.modal.open(Mn), s.metaKey && s.code === tt.KEY_F && t.features.includes(pe.SEARCH) && (t.fs.searchMode = !0, s.preventDefault()), s.metaKey && s.code === tt.KEY_E && (t.showTreeView = !t.showTreeView, t.storage.setStore("show-tree-view", t.showTreeView)), s.metaKey && s.code === tt.KEY_A && (t.dragSelect.selectAll(), s.preventDefault()))); + s.code === Ye.ESCAPE && (t.modal.close(), t.root.focus()), !t.modal.visible && (t.fs.searchMode || (s.code === Ye.F2 && t.features.includes(pe.RENAME) && (t.dragSelect.getCount() !== 1 || t.modal.open(ao, { items: t.dragSelect.getSelected() })), s.code === Ye.F5 && t.emitter.emit("vf-fetch", { params: { q: "index", adapter: t.fs.adapter, path: t.fs.data.dirname } }), s.code === Ye.DELETE && (!t.dragSelect.getCount() || t.modal.open(ro, { items: t.dragSelect.getSelected() })), s.metaKey && s.code === Ye.BACKSLASH && t.modal.open(Mn), s.metaKey && s.code === Ye.KEY_F && t.features.includes(pe.SEARCH) && (t.fs.searchMode = !0, s.preventDefault()), s.metaKey && s.code === Ye.KEY_E && (t.showTreeView = !t.showTreeView, t.storage.setStore("show-tree-view", t.showTreeView)), s.metaKey && s.code === Ye.ENTER && (t.fullScreen = !t.fullScreen, t.root.focus()), s.metaKey && s.code === Ye.KEY_A && (t.dragSelect.selectAll(), s.preventDefault()))); }; Ce(() => { t.root.addEventListener("keydown", e); @@ -2518,7 +2527,7 @@ function fi(t) { t.root.removeEventListener("keydown", e); }); } -const hi = { class: "sm:flex sm:items-start" }, pi = /* @__PURE__ */ n("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" }, [ +const vi = { class: "sm:flex sm:items-start" }, gi = /* @__PURE__ */ n("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" }, [ /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", @@ -2533,15 +2542,15 @@ const hi = { class: "sm:flex sm:items-start" }, pi = /* @__PURE__ */ n("div", { 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), vi = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, gi = { +], -1), _i = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, bi = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, _i = { class: "mt-2" }, bi = { class: "text-sm text-gray-500" }, xi = ["placeholder"], An = { +}, xi = { class: "mt-2" }, yi = { class: "text-sm text-gray-500" }, wi = ["placeholder"], An = { __name: "ModalNewFolder", setup(t) { const e = ae("ServiceContainer"); e.storage; - const { t: s } = e.i18n, r = T(""), o = T(""), c = () => { + const { t: s } = e.i18n, r = M(""), o = M(""), c = () => { r.value !== "" && e.emitter.emit("vf-fetch", { params: { q: "newfolder", @@ -2574,19 +2583,19 @@ const hi = { class: "sm:flex sm:items-start" }, pi = /* @__PURE__ */ n("div", { }, _(a(s)("Cancel")), 1) ]), default: se(() => [ - n("div", hi, [ - pi, - n("div", vi, [ - n("h3", gi, _(a(s)("New Folder")), 1), - n("div", _i, [ - n("p", bi, _(a(s)("Create a new folder")), 1), + n("div", vi, [ + gi, + n("div", _i, [ + n("h3", bi, _(a(s)("New Folder")), 1), + n("div", xi, [ + n("p", yi, _(a(s)("Create a new folder")), 1), ve(n("input", { "onUpdate:modelValue": d[0] || (d[0] = (l) => r.value = l), onKeyup: $t(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: a(s)("Folder Name"), type: "text" - }, null, 40, xi), [ + }, null, 40, wi), [ [St, r.value] ]), o.value.length ? (f(), X(We, { @@ -2595,7 +2604,7 @@ const hi = { class: "sm:flex sm:items-start" }, pi = /* @__PURE__ */ n("div", { error: "" }, { default: se(() => [ - ee(_(o.value), 1) + Q(_(o.value), 1) ]), _: 1 })) : P("", !0) @@ -2606,7 +2615,7 @@ const hi = { class: "sm:flex sm:items-start" }, pi = /* @__PURE__ */ n("div", { _: 1 })); } -}, yi = { class: "sm:flex sm:items-start" }, wi = /* @__PURE__ */ n("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" }, [ +}, ki = { class: "sm:flex sm:items-start" }, $i = /* @__PURE__ */ n("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" }, [ /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", @@ -2621,15 +2630,15 @@ const hi = { class: "sm:flex sm:items-start" }, pi = /* @__PURE__ */ n("div", { 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), ki = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, $i = { +], -1), Si = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Ci = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, Si = { class: "mt-2" }, Ci = { class: "text-sm text-gray-500" }, Ei = ["placeholder"], Ti = { +}, Ei = { class: "mt-2" }, Ti = { class: "text-sm text-gray-500" }, Mi = ["placeholder"], Ai = { __name: "ModalNewFile", setup(t) { const e = ae("ServiceContainer"); e.storage; - const { t: s } = e.i18n, r = T(""), o = T(""), c = () => { + const { t: s } = e.i18n, r = M(""), o = M(""), c = () => { r.value !== "" && e.emitter.emit("vf-fetch", { params: { q: "newfile", @@ -2662,19 +2671,19 @@ const hi = { class: "sm:flex sm:items-start" }, pi = /* @__PURE__ */ n("div", { }, _(a(s)("Cancel")), 1) ]), default: se(() => [ - n("div", yi, [ - wi, - n("div", ki, [ - n("h3", $i, _(a(s)("New File")), 1), - n("div", Si, [ - n("p", Ci, _(a(s)("Create a new file")), 1), + n("div", ki, [ + $i, + n("div", Si, [ + n("h3", Ci, _(a(s)("New File")), 1), + n("div", Ei, [ + n("p", Ti, _(a(s)("Create a new file")), 1), ve(n("input", { "onUpdate:modelValue": d[0] || (d[0] = (l) => r.value = l), onKeyup: $t(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: a(s)("File Name"), type: "text" - }, null, 40, Ei), [ + }, null, 40, Mi), [ [St, r.value] ]), o.value.length ? (f(), X(We, { @@ -2683,7 +2692,7 @@ const hi = { class: "sm:flex sm:items-start" }, pi = /* @__PURE__ */ n("div", { error: "" }, { default: se(() => [ - ee(_(o.value), 1) + Q(_(o.value), 1) ]), _: 1 })) : P("", !0) @@ -2699,7 +2708,7 @@ function Ps(t, e = 14) { let s = `((?=([\\w\\W]{0,${e}}))([\\w\\W]{${e + 1},})([\\w\\W]{8,}))`; return t.replace(new RegExp(s), "$2..$4"); } -const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("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" }, [ +const Di = { class: "sm:flex sm:items-start" }, Li = /* @__PURE__ */ n("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" }, [ /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", @@ -2714,19 +2723,19 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12" }) ]) -], -1), Di = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Li = { +], -1), Vi = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Oi = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, Vi = { class: "mt-2" }, Oi = { +}, Hi = { class: "mt-2" }, Bi = { key: 0, class: "pointer-events-none" -}, Hi = { +}, Ri = { key: 1, class: "pointer-events-none" -}, Bi = ["disabled"], Ri = ["disabled"], Fi = { class: "text-gray-500 text-sm mb-1 pr-1 max-h-[200px] overflow-y-auto vf-scrollbar" }, Ii = { 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" }, Ni = ["textContent"], Ui = { class: "ml-1 w-full h-fit" }, zi = { class: "text-left hidden md:block" }, Pi = { class: "text-left md:hidden" }, ji = { +}, Fi = ["disabled"], Ii = ["disabled"], Ni = { class: "text-gray-500 text-sm mb-1 pr-1 max-h-[200px] overflow-y-auto vf-scrollbar" }, Ui = { 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" }, zi = ["textContent"], Pi = { class: "ml-1 w-full h-fit" }, ji = { class: "text-left hidden md:block" }, qi = { class: "text-left md:hidden" }, Gi = { key: 0, class: "ml-auto" -}, qi = ["title", "disabled", "onClick"], Gi = /* @__PURE__ */ n("svg", { +}, Ki = ["title", "disabled", "onClick"], Wi = /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", @@ -2739,12 +2748,12 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { "stroke-linejoin": "round", d: "M6 18L18 6M6 6l12 12" }) -], -1), Ki = [ - Gi -], Wi = { +], -1), Yi = [ + Wi +], Xi = { key: 0, class: "py-2" -}, Yi = ["disabled"], Xi = { +}, Ji = ["disabled"], Qi = { __name: "ModalUpload", setup(t) { const e = ae("ServiceContainer"), { t: s } = e.i18n, r = s("uppy"), o = { @@ -2753,21 +2762,21 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { UPLOADING: 2, ERROR: 3, DONE: 10 - }, c = T({ QUEUE_ENTRY_STATUS: o }), i = T(null), d = T(null), l = T(null), u = T(null), h = T(null), m = T(null), v = T([]), p = T(""), b = T(!1), y = T(!1); + }, c = M({ QUEUE_ENTRY_STATUS: o }), i = M(null), d = M(null), l = M(null), u = M(null), h = M(null), m = M(null), v = M([]), p = M(""), b = M(!1), y = M(!1); let x; - function M(O) { - return v.value.findIndex(($) => $.id === O); + function A(H) { + return v.value.findIndex(($) => $.id === H); } - function k(O, $ = null) { - $ = $ ?? (O.webkitRelativePath || O.name), x.addFile({ + function k(H, $ = null) { + $ = $ ?? (H.webkitRelativePath || H.name), x.addFile({ name: $, - type: O.type, - data: O, + type: H.type, + data: H, source: "Local" }); } - function U(O) { - switch (O.status) { + function U(H) { + switch (H.status) { case o.DONE: return "text-green-600"; case o.ERROR: @@ -2779,8 +2788,8 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { return ""; } } - const H = (O) => { - switch (O.status) { + const B = (H) => { + switch (H.status) { case o.DONE: return "✓"; case o.ERROR: @@ -2791,29 +2800,29 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { return "..."; } }; - function A() { + function D() { u.value.click(); } function L() { if (!b.value) { - if (!v.value.filter((O) => O.status !== o.DONE).length) { + if (!v.value.filter((H) => H.status !== o.DONE).length) { p.value = s("Please select file to upload first."); return; } p.value = "", x.retryAll(), x.upload(); } } - function B() { - x.cancelAll({ reason: "user" }), v.value.forEach((O) => { - O.status !== o.DONE && (O.status = o.CANCELED, O.statusName = s("Canceled")); + function V() { + x.cancelAll({ reason: "user" }), v.value.forEach((H) => { + H.status !== o.DONE && (H.status = o.CANCELED, H.statusName = s("Canceled")); }), b.value = !1; } - function D(O) { - b.value || (x.removeFile(O.id, "removed-by-user"), v.value.splice(M(O.id), 1)); + function E(H) { + b.value || (x.removeFile(H.id, "removed-by-user"), v.value.splice(A(H.id), 1)); } - function V(O) { + function O(H) { if (!b.value) { - if (x.cancelAll({ reason: "user" }), O) { + if (x.cancelAll({ reason: "user" }), H) { const $ = []; v.value.forEach((w) => { w.status !== o.DONE && $.push(w); @@ -2825,7 +2834,7 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { v.value.splice(0); } } - function E() { + function T() { e.modal.close(); } function S() { @@ -2846,7 +2855,7 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { locale: r, onBeforeFileAdded(w, I) { if (I[w.id] != null) { - const oe = M(w.id); + const oe = A(w.id); v.value[oe].status === o.PENDING && (p.value = x.i18n("noDuplicates", { fileName: w.name })), v.value = v.value.filter((de) => de.id !== w.id); } return v.value.push({ @@ -2873,8 +2882,8 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { return new Error(R); } }), x.on("restriction-failed", (w, I) => { - const R = v.value[M(w.id)]; - D(R), p.value = I.message; + const R = v.value[A(w.id)]; + E(R), p.value = I.message; }), x.on("upload", () => { const w = S(); x.setMeta({ ...w.body }); @@ -2884,12 +2893,12 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { }); }), x.on("upload-progress", (w, I) => { const R = Math.floor(I.bytesUploaded / I.bytesTotal * 100); - v.value[M(w.id)].percent = `${R}%`; + v.value[A(w.id)].percent = `${R}%`; }), x.on("upload-success", (w) => { - const I = v.value[M(w.id)]; + const I = v.value[A(w.id)]; I.status = o.DONE, I.statusName = s("Done"); }), x.on("upload-error", (w, I) => { - const R = v.value[M(w.id)]; + const R = v.value[A(w.id)]; R.percent = null, R.status = o.ERROR, I.isNetworkError ? R.statusName = s("Network Error, Unable establish connection to the server or interrupted.") : R.statusName = I ? I.message : s("Unknown Error"); }), x.on("error", (w) => { p.value = w.message, b.value = !1, e.emitter.emit("vf-fetch", { @@ -2910,10 +2919,10 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { }), m.value.addEventListener("dragleave", (w) => { w.preventDefault(), y.value = !1; }); - function O(w, I) { + function H(w, I) { I.isFile && I.file((R) => w(I, R)), I.isDirectory && I.createReader().readEntries((R) => { R.forEach((oe) => { - O(w, oe); + H(w, oe); }); }); } @@ -2921,7 +2930,7 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { w.preventDefault(), y.value = !1; const I = /^[/\\](.+)/; [...w.dataTransfer.items].forEach((R) => { - R.kind === "file" && O((oe, de) => { + R.kind === "file" && H((oe, de) => { const le = I.exec(oe.fullPath); k(de, le[1]); }, R.webkitGetAsEntry()); @@ -2936,39 +2945,39 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { d.value.addEventListener("change", $), l.value.addEventListener("change", $); }), Io(() => { x == null || x.close({ reason: "unmount" }); - }), (O, $) => (f(), X(Ke, null, { + }), (H, $) => (f(), X(Ke, null, { buttons: se(() => [ n("button", { type: "button", class: me(["vf-btn vf-btn-primary", b.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: b.value, - onClick: nt(L, ["prevent"]) - }, _(a(s)("Upload")), 11, Yi), + onClick: rt(L, ["prevent"]) + }, _(a(s)("Upload")), 11, Ji), b.value ? (f(), g("button", { key: 0, type: "button", class: "vf-btn vf-btn-secondary", - onClick: nt(B, ["prevent"]) + onClick: rt(V, ["prevent"]) }, _(a(s)("Cancel")), 1)) : (f(), g("button", { key: 1, type: "button", class: "vf-btn vf-btn-secondary", - onClick: nt(E, ["prevent"]) + onClick: rt(T, ["prevent"]) }, _(a(s)("Close")), 1)) ]), default: se(() => [ - n("div", Mi, [ - Ai, - n("div", Di, [ - n("h3", Li, _(a(s)("Upload Files")), 1), - n("div", Vi, [ + n("div", Di, [ + Li, + n("div", Vi, [ + n("h3", Oi, _(a(s)("Upload Files")), 1), + n("div", Hi, [ n("div", { ref_key: "dropArea", ref: m, 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: A + onClick: D }, [ - y.value ? (f(), g("div", Oi, _(a(s)("Release to drop these files.")), 1)) : (f(), g("div", Hi, _(a(s)("Drag and drop the files/folders to here or click here.")), 1)) + y.value ? (f(), g("div", Bi, _(a(s)("Release to drop these files.")), 1)) : (f(), g("div", Ri, _(a(s)("Drag and drop the files/folders to here or click here.")), 1)) ], 512), n("div", { ref_key: "container", @@ -2991,34 +3000,34 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { type: "button", class: "vf-btn vf-btn-secondary", disabled: b.value, - onClick: $[0] || ($[0] = (w) => V(!1)) - }, _(a(s)("Clear all")), 9, Bi), + onClick: $[0] || ($[0] = (w) => O(!1)) + }, _(a(s)("Clear all")), 9, Fi), n("button", { type: "button", class: "vf-btn vf-btn-secondary", disabled: b.value, - onClick: $[1] || ($[1] = (w) => V(!0)) - }, _(a(s)("Clear only successful")), 9, Ri) + onClick: $[1] || ($[1] = (w) => O(!0)) + }, _(a(s)("Clear only successful")), 9, Ii) ], 512), - n("div", Fi, [ + n("div", Ni, [ (f(!0), g(he, null, $e(v.value, (w) => (f(), g("div", { class: "flex hover:bg-gray-100 dark:hover:bg-gray-800 dark:hover:text-gray-300", key: w.id }, [ - n("span", Ii, [ + n("span", Ui, [ n("span", { class: me(["text-base m-auto", U(w)]), - textContent: _(H(w)) - }, null, 10, Ni) + textContent: _(B(w)) + }, null, 10, zi) ]), - n("div", Ui, [ - n("div", zi, _(a(Ps)(w.name, 40)) + " (" + _(w.size) + ")", 1), - n("div", Pi, _(a(Ps)(w.name, 16)) + " (" + _(w.size) + ")", 1), + n("div", Pi, [ + n("div", ji, _(a(Ps)(w.name, 40)) + " (" + _(w.size) + ")", 1), + n("div", qi, _(a(Ps)(w.name, 16)) + " (" + _(w.size) + ")", 1), n("div", { class: me(["flex break-all text-left", U(w)]) }, [ - ee(_(w.statusName) + " ", 1), - w.status === c.value.QUEUE_ENTRY_STATUS.UPLOADING ? (f(), g("b", ji, _(w.percent), 1)) : P("", !0) + Q(_(w.statusName) + " ", 1), + w.status === c.value.QUEUE_ENTRY_STATUS.UPLOADING ? (f(), g("b", Gi, _(w.percent), 1)) : P("", !0) ], 2) ]), n("button", { @@ -3026,10 +3035,10 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { class: me(["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", b.value ? "disabled:bg-gray-100 text-white text-opacity-50" : "bg-gray-100"]), title: a(s)("Delete"), disabled: b.value, - onClick: (I) => D(w) - }, Ki, 10, qi) + onClick: (I) => E(w) + }, Yi, 10, Ki) ]))), 128)), - v.value.length ? P("", !0) : (f(), g("div", Wi, _(a(s)("No files selected!")), 1)) + v.value.length ? P("", !0) : (f(), g("div", Xi, _(a(s)("No files selected!")), 1)) ]), p.value.length ? (f(), X(We, { key: 0, @@ -3037,7 +3046,7 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { error: "" }, { default: se(() => [ - ee(_(p.value), 1) + Q(_(p.value), 1) ]), _: 1 })) : P("", !0) @@ -3063,7 +3072,7 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { _: 1 })); } -}, Ji = { class: "sm:flex sm:items-start" }, Qi = /* @__PURE__ */ n("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" }, [ +}, Zi = { class: "sm:flex sm:items-start" }, ec = /* @__PURE__ */ n("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" }, [ /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", @@ -3078,10 +3087,10 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { 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), Zi = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ec = { +], -1), tc = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, sc = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, tc = { class: "mt-2" }, sc = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, oc = { +}, oc = { class: "mt-2" }, nc = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, rc = { 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", @@ -3089,13 +3098,13 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, nc = /* @__PURE__ */ n("path", { +}, ac = /* @__PURE__ */ n("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), rc = [ - nc -], ac = { +}, null, -1), lc = [ + ac +], ic = { key: 1, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500", @@ -3103,16 +3112,16 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, lc = /* @__PURE__ */ n("path", { +}, cc = /* @__PURE__ */ n("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), ic = [ - lc -], cc = { class: "ml-1.5" }, dc = { class: "my-1 text-sm text-gray-500" }, Dn = { +}, null, -1), dc = [ + cc +], uc = { class: "ml-1.5" }, mc = { class: "my-1 text-sm text-gray-500" }, Dn = { __name: "ModalUnarchive", setup(t) { - const e = ae("ServiceContainer"), { t: s } = e.i18n, r = T(e.modal.data.items[0]), o = T(""), c = T([]), i = () => { + const e = ae("ServiceContainer"), { t: s } = e.i18n, r = M(e.modal.data.items[0]), o = M(""), c = M([]), i = () => { e.emitter.emit("vf-fetch", { params: { q: "unarchive", @@ -3145,23 +3154,23 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { }, _(a(s)("Cancel")), 1) ]), default: se(() => [ - n("div", Ji, [ - Qi, - n("div", Zi, [ - n("h3", ec, _(a(s)("Unarchive")), 1), - n("div", tc, [ - (f(!0), g(he, null, $e(c.value, (u) => (f(), g("p", sc, [ - u.type === "dir" ? (f(), g("svg", oc, rc)) : (f(), g("svg", ac, ic)), - n("span", cc, _(u.basename), 1) + n("div", Zi, [ + ec, + n("div", tc, [ + n("h3", sc, _(a(s)("Unarchive")), 1), + n("div", oc, [ + (f(!0), g(he, null, $e(c.value, (u) => (f(), g("p", nc, [ + u.type === "dir" ? (f(), g("svg", rc, lc)) : (f(), g("svg", ic, dc)), + n("span", uc, _(u.basename), 1) ]))), 256)), - n("p", dc, _(a(s)("The archive will be unarchived at")) + " (" + _(a(e).fs.data.dirname) + ")", 1), + n("p", mc, _(a(s)("The archive will be unarchived at")) + " (" + _(a(e).fs.data.dirname) + ")", 1), o.value.length ? (f(), X(We, { key: 0, onHidden: l[0] || (l[0] = (u) => o.value = ""), error: "" }, { default: se(() => [ - ee(_(o.value), 1) + Q(_(o.value), 1) ]), _: 1 })) : P("", !0) @@ -3172,7 +3181,7 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { _: 1 })); } -}, uc = { class: "sm:flex sm:items-start" }, mc = /* @__PURE__ */ n("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" }, [ +}, fc = { class: "sm:flex sm:items-start" }, hc = /* @__PURE__ */ n("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" }, [ /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", @@ -3187,13 +3196,13 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { 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), fc = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, hc = { +], -1), pc = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, vc = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, pc = { class: "mt-2" }, vc = { +}, gc = { class: "mt-2" }, _c = { class: "text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar", style: { "max-height": "200px" } -}, gc = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, _c = { +}, bc = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, xc = { 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", @@ -3201,13 +3210,13 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, bc = /* @__PURE__ */ n("path", { +}, yc = /* @__PURE__ */ n("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), xc = [ - bc -], yc = { +}, null, -1), wc = [ + yc +], kc = { key: 1, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500", @@ -3215,16 +3224,16 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, wc = /* @__PURE__ */ n("path", { +}, $c = /* @__PURE__ */ n("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), kc = [ - wc -], $c = { class: "ml-1.5" }, Sc = ["placeholder"], Ln = { +}, null, -1), Sc = [ + $c +], Cc = { class: "ml-1.5" }, Ec = ["placeholder"], Ln = { __name: "ModalArchive", setup(t) { - const e = ae("ServiceContainer"), { t: s } = e.i18n, r = T(""), o = T(""), c = T(e.modal.data.items), i = () => { + const e = ae("ServiceContainer"), { t: s } = e.i18n, r = M(""), o = M(""), c = M(e.modal.data.items), i = () => { c.value.length && e.emitter.emit("vf-fetch", { params: { q: "archive", @@ -3258,15 +3267,15 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { }, _(a(s)("Cancel")), 1) ]), default: se(() => [ - n("div", uc, [ - mc, - n("div", fc, [ - n("h3", hc, _(a(s)("Archive the files")), 1), - n("div", pc, [ - n("div", vc, [ - (f(!0), g(he, null, $e(c.value, (u) => (f(), g("p", gc, [ - u.type === "dir" ? (f(), g("svg", _c, xc)) : (f(), g("svg", yc, kc)), - n("span", $c, _(u.basename), 1) + n("div", fc, [ + hc, + n("div", pc, [ + n("h3", vc, _(a(s)("Archive the files")), 1), + n("div", gc, [ + n("div", _c, [ + (f(!0), g(he, null, $e(c.value, (u) => (f(), g("p", bc, [ + u.type === "dir" ? (f(), g("svg", xc, wc)) : (f(), g("svg", kc, Sc)), + n("span", Cc, _(u.basename), 1) ]))), 256)) ]), ve(n("input", { @@ -3275,7 +3284,7 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { 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: a(s)("Archive name. (.zip file will be created)"), type: "text" - }, null, 40, Sc), [ + }, null, 40, Ec), [ [St, r.value] ]), o.value.length ? (f(), X(We, { @@ -3284,7 +3293,7 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { error: "" }, { default: se(() => [ - ee(_(o.value), 1) + Q(_(o.value), 1) ]), _: 1 })) : P("", !0) @@ -3295,187 +3304,191 @@ const Mi = { class: "sm:flex sm:items-start" }, Ai = /* @__PURE__ */ n("div", { _: 1 })); } -}, Cc = { +}, Tc = { 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" -}, Ec = /* @__PURE__ */ n("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), Tc = [ - Ec +}, Mc = /* @__PURE__ */ n("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), Ac = [ + Mc ]; -function Mc(t, e) { - return f(), g("svg", Cc, [...Tc]); +function Dc(t, e) { + return f(), g("svg", Tc, [...Ac]); } -const Ac = { render: Mc }, Dc = { +const Lc = { render: Dc }, Vc = { 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" -}, Lc = /* @__PURE__ */ n("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), Vc = [ - Lc +}, Oc = /* @__PURE__ */ n("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), Hc = [ + Oc ]; -function Oc(t, e) { - return f(), g("svg", Dc, [...Vc]); +function Bc(t, e) { + return f(), g("svg", Vc, [...Hc]); } -const Hc = { render: Oc }, Bc = { +const Rc = { render: Bc }, Fc = { 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" -}, Rc = /* @__PURE__ */ n("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), Fc = [ - Rc +}, Ic = /* @__PURE__ */ n("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), Nc = [ + Ic ]; -function Ic(t, e) { - return f(), g("svg", Bc, [...Fc]); +function Uc(t, e) { + return f(), g("svg", Fc, [...Nc]); } -const Nc = { render: Ic }, Uc = { +const zc = { render: Uc }, 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", viewBox: "0 0 24 24" -}, zc = /* @__PURE__ */ n("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), Pc = [ - zc +}, jc = /* @__PURE__ */ n("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), qc = [ + jc ]; -function jc(t, e) { - return f(), g("svg", Uc, [...Pc]); +function Gc(t, e) { + return f(), g("svg", Pc, [...qc]); } -const qc = { render: jc }, Gc = { +const Kc = { render: Gc }, Wc = { 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" -}, Kc = /* @__PURE__ */ n("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), Wc = [ - Kc +}, Yc = /* @__PURE__ */ n("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), Xc = [ + Yc ]; -function Yc(t, e) { - return f(), g("svg", Gc, [...Wc]); +function Jc(t, e) { + return f(), g("svg", Wc, [...Xc]); } -const Xc = { render: Yc }, Jc = { +const Qc = { render: Jc }, Zc = { 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" -}, Qc = /* @__PURE__ */ n("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), Zc = [ - Qc +}, ed = /* @__PURE__ */ n("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), td = [ + ed ]; -function ed(t, e) { - return f(), g("svg", Jc, [...Zc]); +function sd(t, e) { + return f(), g("svg", Zc, [...td]); } -const td = { render: ed }, sd = { +const od = { render: sd }, nd = { 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" -}, od = /* @__PURE__ */ n("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), nd = [ - od +}, rd = /* @__PURE__ */ n("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), ad = [ + rd ]; -function rd(t, e) { - return f(), g("svg", sd, [...nd]); +function ld(t, e) { + return f(), g("svg", nd, [...ad]); } -const ad = { render: rd }, ld = { +const id = { render: ld }, cd = { 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" -}, id = /* @__PURE__ */ n("circle", { +}, dd = /* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", "stroke-width": "4", class: "opacity-25 stroke-blue-900 dark:stroke-blue-100" -}, null, -1), cd = /* @__PURE__ */ n("path", { +}, null, -1), ud = /* @__PURE__ */ n("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), dd = [ - id, - cd +}, null, -1), md = [ + dd, + ud ]; -function ud(t, e) { - return f(), g("svg", ld, [...dd]); +function fd(t, e) { + return f(), g("svg", cd, [...md]); } -const lo = { render: ud }, md = { +const lo = { render: fd }, hd = { 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" -}, fd = /* @__PURE__ */ n("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), hd = [ - fd +}, pd = /* @__PURE__ */ n("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), vd = [ + pd ]; -function pd(t, e) { - return f(), g("svg", md, [...hd]); +function gd(t, e) { + return f(), g("svg", hd, [...vd]); } -const vd = { render: pd }, gd = { +const _d = { render: gd }, bd = { 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" -}, _d = /* @__PURE__ */ n("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), bd = [ - _d +}, xd = /* @__PURE__ */ n("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), yd = [ + xd ]; -function xd(t, e) { - return f(), g("svg", gd, [...bd]); +function wd(t, e) { + return f(), g("svg", bd, [...yd]); } -const yd = { render: xd }, wd = { +const kd = { render: wd }, $d = { 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" -}, kd = /* @__PURE__ */ n("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), $d = [ - kd +}, Sd = /* @__PURE__ */ n("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), Cd = [ + Sd ]; -function Sd(t, e) { - return f(), g("svg", wd, [...$d]); +function Ed(t, e) { + return f(), g("svg", $d, [...Cd]); } -const Cd = { render: Sd }, Ed = { +const Td = { render: Ed }, Md = { 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" -}, Td = /* @__PURE__ */ n("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), Md = [ - Td +}, Ad = /* @__PURE__ */ n("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), Dd = [ + Ad ]; -function Ad(t, e) { - return f(), g("svg", Ed, [...Md]); +function Ld(t, e) { + return f(), g("svg", Md, [...Dd]); } -const Dd = { render: Ad }, Ld = { class: "border-neutral-300 flex justify-between items-center py-1 text-sm grow-0" }, Vd = { +const Vd = { render: Ld }, Od = { class: "border-neutral-300 flex justify-between items-center py-1 text-sm grow-0" }, Hd = { key: 0, class: "flex text-center" -}, Od = ["aria-label"], Hd = ["aria-label"], Bd = ["aria-label"], Rd = ["aria-label"], Fd = ["aria-label"], Id = ["aria-label"], Nd = ["aria-label"], Ud = { +}, Bd = ["aria-label"], Rd = ["aria-label"], Fd = ["aria-label"], Id = ["aria-label"], Nd = ["aria-label"], Ud = ["aria-label"], zd = ["aria-label"], Pd = { key: 1, class: "flex text-center" -}, zd = { class: "pl-2" }, Pd = { class: "dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded" }, jd = { class: "flex text-center items-center justify-end" }, qd = ["aria-label"], Gd = ["aria-label"], Kd = { +}, jd = { class: "pl-2" }, qd = { class: "dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded" }, Gd = { class: "flex text-center items-center justify-end" }, Kd = ["aria-label"], Wd = ["aria-label"], Yd = { __name: "Toolbar", setup(t) { - const e = ae("ServiceContainer"), { setStore: s } = e.storage, { t: r } = e.i18n, o = e.dragSelect, c = T(""); + const e = ae("ServiceContainer"), { setStore: s } = e.storage, { t: r } = e.i18n, o = e.dragSelect, c = M(""); e.emitter.on("vf-search-query", ({ newQuery: l }) => { c.value = l; }); const i = () => { - e.fullScreen = !e.fullScreen, e.fullScreen ? document.querySelector("body").style.overflow = "hidden" : document.querySelector("body").style.overflow = "", s("full-screen", e.fullScreen), e.emitter.emit("vf-fullscreen-toggle"); - }, d = () => { + e.fullScreen = !e.fullScreen; + }; + Je(() => e.fullScreen, () => { + e.fullScreen ? document.querySelector("body").style.overflow = "hidden" : document.querySelector("body").style.overflow = "", s("full-screen", e.fullScreen), e.emitter.emit("vf-fullscreen-toggle"); + }); + const d = () => { e.view = e.view === "list" ? "grid" : "list", o.refreshSelection(), s("viewport", e.view); }; - return (l, u) => (f(), g("div", Ld, [ - c.value.length ? (f(), g("div", Ud, [ - n("div", zd, [ - ee(_(a(r)("Search results for")) + " ", 1), - n("span", Pd, _(c.value), 1) + return (l, u) => (f(), g("div", Od, [ + c.value.length ? (f(), g("div", Pd, [ + n("div", jd, [ + Q(_(a(r)("Search results for")) + " ", 1), + n("span", qd, _(c.value), 1) ]), a(e).fs.loading ? (f(), X(a(lo), { key: 0 })) : P("", !0) - ])) : (f(), g("div", Vd, [ + ])) : (f(), g("div", Hd, [ a(e).features.includes(a(pe).NEW_FOLDER) ? (f(), g("div", { key: 0, class: "mx-1.5", @@ -3484,18 +3497,18 @@ const Dd = { render: Ad }, Ld = { class: "border-neutral-300 flex justify-betwee role: "tooltip", onClick: u[0] || (u[0] = (h) => a(e).modal.open(An, { items: a(o).getSelected() })) }, [ - W(a(Ac)) - ], 8, Od)) : P("", !0), + W(a(Lc)) + ], 8, Bd)) : P("", !0), a(e).features.includes(a(pe).NEW_FILE) ? (f(), g("div", { key: 1, class: "mx-1.5", "aria-label": a(r)("New File"), "data-microtip-position": "bottom", role: "tooltip", - onClick: u[1] || (u[1] = (h) => a(e).modal.open(Ti, { items: a(o).getSelected() })) + onClick: u[1] || (u[1] = (h) => a(e).modal.open(Ai, { items: a(o).getSelected() })) }, [ - W(a(Hc)) - ], 8, Hd)) : P("", !0), + W(a(Rc)) + ], 8, Rd)) : P("", !0), a(e).features.includes(a(pe).RENAME) ? (f(), g("div", { key: 2, class: "mx-1.5", @@ -3504,10 +3517,10 @@ const Dd = { render: Ad }, Ld = { class: "border-neutral-300 flex justify-betwee role: "tooltip", onClick: u[2] || (u[2] = (h) => a(o).getCount() !== 1 || a(e).modal.open(ao, { items: a(o).getSelected() })) }, [ - W(a(Nc), { + W(a(zc), { class: me(a(o).getCount() === 1 ? "vf-toolbar-icon" : "vf-toolbar-icon-disabled") }, null, 8, ["class"]) - ], 8, Bd)) : P("", !0), + ], 8, Fd)) : P("", !0), a(e).features.includes(a(pe).DELETE) ? (f(), g("div", { key: 3, class: "mx-1.5", @@ -3516,20 +3529,20 @@ const Dd = { render: Ad }, Ld = { class: "border-neutral-300 flex justify-betwee role: "tooltip", onClick: u[3] || (u[3] = (h) => !a(o).getCount() || a(e).modal.open(ro, { items: a(o).getSelected() })) }, [ - W(a(qc), { + W(a(Kc), { class: me(a(o).getCount() ? "vf-toolbar-icon" : "vf-toolbar-icon-disabled") }, null, 8, ["class"]) - ], 8, Rd)) : P("", !0), + ], 8, Id)) : P("", !0), a(e).features.includes(a(pe).UPLOAD) ? (f(), g("div", { key: 4, class: "mx-1.5", "aria-label": a(r)("Upload"), "data-microtip-position": "bottom", role: "tooltip", - onClick: u[4] || (u[4] = (h) => a(e).modal.open(Xi, { items: a(o).getSelected() })) + onClick: u[4] || (u[4] = (h) => a(e).modal.open(Qi, { items: a(o).getSelected() })) }, [ - W(a(Xc)) - ], 8, Fd)) : P("", !0), + W(a(Qc)) + ], 8, Nd)) : P("", !0), a(e).features.includes(a(pe).UNARCHIVE) && a(o).getCount() === 1 && a(o).getSelected()[0].mime_type === "application/zip" ? (f(), g("div", { key: 5, class: "mx-1.5", @@ -3538,10 +3551,10 @@ const Dd = { render: Ad }, Ld = { class: "border-neutral-300 flex justify-betwee role: "tooltip", onClick: u[5] || (u[5] = (h) => !a(o).getCount() || a(e).modal.open(Dn, { items: a(o).getSelected() })) }, [ - W(a(ad), { + W(a(id), { class: me(a(o).getCount() ? "vf-toolbar-icon" : "vf-toolbar-icon-disabled") }, null, 8, ["class"]) - ], 8, Id)) : P("", !0), + ], 8, Ud)) : P("", !0), a(e).features.includes(a(pe).ARCHIVE) ? (f(), g("div", { key: 6, class: "mx-1.5", @@ -3550,12 +3563,12 @@ const Dd = { render: Ad }, Ld = { class: "border-neutral-300 flex justify-betwee role: "tooltip", onClick: u[6] || (u[6] = (h) => !a(o).getCount() || a(e).modal.open(Ln, { items: a(o).getSelected() })) }, [ - W(a(td), { + W(a(od), { class: me(a(o).getCount() ? "vf-toolbar-icon" : "vf-toolbar-icon-disabled") }, null, 8, ["class"]) - ], 8, Nd)) : P("", !0) + ], 8, zd)) : P("", !0) ])), - n("div", jd, [ + n("div", Gd, [ a(e).features.includes(a(pe).FULL_SCREEN) ? (f(), g("div", { key: 0, onClick: i, @@ -3564,8 +3577,8 @@ const Dd = { render: Ad }, Ld = { class: "border-neutral-300 flex justify-betwee "data-microtip-position": "bottom-left", role: "tooltip" }, [ - a(e).fullScreen ? (f(), X(a(yd), { key: 0 })) : (f(), X(a(vd), { key: 1 })) - ], 8, qd)) : P("", !0), + a(e).fullScreen ? (f(), X(a(kd), { key: 0 })) : (f(), X(a(_d), { key: 1 })) + ], 8, Kd)) : P("", !0), n("div", { class: "mx-1.5", "aria-label": a(r)("Change View"), @@ -3573,19 +3586,19 @@ const Dd = { render: Ad }, Ld = { class: "border-neutral-300 flex justify-betwee role: "tooltip", onClick: u[7] || (u[7] = (h) => c.value.length || d()) }, [ - a(e).view === "grid" ? (f(), X(a(Cd), { + a(e).view === "grid" ? (f(), X(a(Td), { key: 0, class: me(c.value.length ? "vf-toolbar-icon-disabled" : "vf-toolbar-icon") }, null, 8, ["class"])) : P("", !0), - a(e).view === "list" ? (f(), X(a(Dd), { + a(e).view === "list" ? (f(), X(a(Vd), { key: 1, class: me(c.value.length ? "vf-toolbar-icon-disabled" : "vf-toolbar-icon") }, null, 8, ["class"])) : P("", !0) - ], 8, Gd) + ], 8, Wd) ]) ])); } -}, Wd = (t, e = 0, s = !1) => { +}, Xd = (t, e = 0, s = !1) => { let r; return (...o) => { s && !r && t(...o), clearTimeout(r), r = setTimeout(() => { @@ -3593,12 +3606,12 @@ const Dd = { render: Ad }, Ld = { class: "border-neutral-300 flex justify-betwee }, e); }; }, Ho = (t, e, s) => { - const r = T(t); + const r = M(t); return qn((o, c) => ({ get() { return o(), r.value; }, - set: Wd( + set: Xd( (i) => { r.value = i, c(); }, @@ -3606,7 +3619,7 @@ const Dd = { render: Ad }, Ld = { class: "border-neutral-300 flex justify-betwee s ) })); -}, Yd = { class: "sm:flex sm:items-start" }, Xd = /* @__PURE__ */ n("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" }, [ +}, Jd = { class: "sm:flex sm:items-start" }, Qd = /* @__PURE__ */ n("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" }, [ /* @__PURE__ */ n("svg", { class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", xmlns: "http://www.w3.org/2000/svg", @@ -3622,10 +3635,10 @@ const Dd = { render: Ad }, Ld = { class: "border-neutral-300 flex justify-betwee 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), Jd = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Qd = { +], -1), Zd = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, eu = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, Zd = { class: "text-sm text-gray-500 pb-1" }, eu = { class: "max-h-[200px] overflow-y-auto vf-scrollbar text-left" }, tu = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, su = { +}, tu = { class: "text-sm text-gray-500 pb-1" }, su = { class: "max-h-[200px] overflow-y-auto vf-scrollbar text-left" }, ou = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, nu = { 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", @@ -3633,13 +3646,13 @@ const Dd = { render: Ad }, Ld = { class: "border-neutral-300 flex justify-betwee viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, ou = /* @__PURE__ */ n("path", { +}, ru = /* @__PURE__ */ n("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), nu = [ - ou -], ru = { +}, null, -1), au = [ + ru +], lu = { key: 1, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500", @@ -3647,13 +3660,13 @@ const Dd = { render: Ad }, Ld = { class: "border-neutral-300 flex justify-betwee viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, au = /* @__PURE__ */ n("path", { +}, iu = /* @__PURE__ */ n("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), lu = [ - au -], iu = { class: "ml-1.5" }, cu = { class: "font-bold text-xs text-gray-700 dark:text-gray-500 mt-3 tracking-wider" }, du = { class: "flex text-sm text-gray-800 dark:text-gray-400 border dark:border-gray-700 p-1 rounded" }, uu = /* @__PURE__ */ n("svg", { +}, null, -1), cu = [ + iu +], du = { class: "ml-1.5" }, uu = { class: "font-bold text-xs text-gray-700 dark:text-gray-500 mt-3 tracking-wider" }, mu = { class: "flex text-sm text-gray-800 dark:text-gray-400 border dark:border-gray-700 p-1 rounded" }, fu = /* @__PURE__ */ n("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", @@ -3666,10 +3679,10 @@ const Dd = { render: Ad }, Ld = { class: "border-neutral-300 flex justify-betwee "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), mu = { class: "ml-1.5 overflow-auto" }, fu = { class: "m-1 mr-auto font-bold text-gray-500 text-sm dark:text-gray-200 self-center" }, js = { +], -1), hu = { class: "ml-1.5 overflow-auto" }, pu = { class: "m-1 mr-auto font-bold text-gray-500 text-sm dark:text-gray-200 self-center" }, js = { __name: "ModalMove", setup(t) { - const e = ae("ServiceContainer"), { t: s } = e.i18n, r = T(e.modal.data.items.from), o = T(""), c = () => { + const e = ae("ServiceContainer"), { t: s } = e.i18n, r = M(e.modal.data.items.from), o = M(""), c = () => { r.value.length && e.emitter.emit("vf-fetch", { params: { q: "move", @@ -3701,26 +3714,26 @@ const Dd = { render: Ad }, Ld = { class: "border-neutral-300 flex justify-betwee onClick: d[1] || (d[1] = (l) => a(e).modal.close()), class: "vf-btn vf-btn-secondary" }, _(a(s)("Cancel")), 1), - n("div", fu, _(a(s)("%s item(s) selected.", r.value.length)), 1) + n("div", pu, _(a(s)("%s item(s) selected.", r.value.length)), 1) ]), default: se(() => [ - n("div", Yd, [ - Xd, - n("div", Jd, [ - n("h3", Qd, _(a(s)("Move files")), 1), - n("p", Zd, _(a(s)("Are you sure you want to move these files?")), 1), - n("div", eu, [ - (f(!0), g(he, null, $e(r.value, (l) => (f(), g("div", tu, [ + n("div", Jd, [ + Qd, + n("div", Zd, [ + n("h3", eu, _(a(s)("Move files")), 1), + n("p", tu, _(a(s)("Are you sure you want to move these files?")), 1), + n("div", su, [ + (f(!0), g(he, null, $e(r.value, (l) => (f(), g("div", ou, [ n("div", null, [ - l.type === "dir" ? (f(), g("svg", su, nu)) : (f(), g("svg", ru, lu)) + l.type === "dir" ? (f(), g("svg", nu, au)) : (f(), g("svg", lu, cu)) ]), - n("div", iu, _(l.path), 1) + n("div", du, _(l.path), 1) ]))), 256)) ]), - n("h4", cu, _(a(s)("Target Directory")), 1), - n("p", du, [ - uu, - n("span", mu, _(a(e).modal.data.items.to.path), 1) + n("h4", uu, _(a(s)("Target Directory")), 1), + n("p", mu, [ + fu, + n("span", hu, _(a(e).modal.data.items.to.path), 1) ]), o.value.length ? (f(), X(We, { key: 0, @@ -3728,7 +3741,7 @@ const Dd = { render: Ad }, Ld = { class: "border-neutral-300 flex justify-betwee error: "" }, { default: se(() => [ - ee(_(o.value), 1) + Q(_(o.value), 1) ]), _: 1 })) : P("", !0) @@ -3738,109 +3751,109 @@ const Dd = { render: Ad }, Ld = { class: "border-neutral-300 flex justify-betwee _: 1 })); } -}, hu = { +}, vu = { 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" -}, pu = /* @__PURE__ */ n("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), vu = [ - pu +}, gu = /* @__PURE__ */ n("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), _u = [ + gu ]; -function gu(t, e) { - return f(), g("svg", hu, [...vu]); +function bu(t, e) { + return f(), g("svg", vu, [..._u]); } -const _u = { render: gu }, bu = { +const xu = { render: bu }, yu = { xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", class: "h-6 w-6 p-0.5 rounded", viewBox: "0 0 20 20" -}, xu = /* @__PURE__ */ n("path", { +}, wu = /* @__PURE__ */ n("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), yu = [ - xu +}, null, -1), ku = [ + wu ]; -function wu(t, e) { - return f(), g("svg", bu, [...yu]); +function $u(t, e) { + return f(), g("svg", yu, [...ku]); } -const ku = { render: wu }, $u = { +const Su = { render: $u }, Cu = { 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" -}, Su = /* @__PURE__ */ n("path", { +}, Eu = /* @__PURE__ */ n("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M6 18 18 6M6 6l12 12" -}, null, -1), Cu = [ - Su +}, null, -1), Tu = [ + Eu ]; -function Eu(t, e) { - return f(), g("svg", $u, [...Cu]); +function Mu(t, e) { + return f(), g("svg", Cu, [...Tu]); } -const Tu = { render: Eu }, Mu = { +const Au = { render: Mu }, Du = { 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" -}, Au = /* @__PURE__ */ n("path", { +}, Lu = /* @__PURE__ */ n("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), Du = [ - Au +}, null, -1), Vu = [ + Lu ]; -function Lu(t, e) { - return f(), g("svg", Mu, [...Du]); +function Ou(t, e) { + return f(), g("svg", Du, [...Vu]); } -const Vu = { render: Lu }, Ou = { +const Hu = { render: Ou }, Bu = { 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" -}, Hu = /* @__PURE__ */ n("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), Bu = [ - Hu +}, Ru = /* @__PURE__ */ n("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), Fu = [ + Ru ]; -function Ru(t, e) { - return f(), g("svg", Ou, [...Bu]); +function Iu(t, e) { + return f(), g("svg", Bu, [...Fu]); } -const Fu = { render: Ru }, Iu = { +const Nu = { render: Iu }, Uu = { 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" -}, Nu = /* @__PURE__ */ n("path", { +}, zu = /* @__PURE__ */ n("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M6 18 18 6M6 6l12 12" -}, null, -1), Uu = [ - Nu +}, null, -1), Pu = [ + zu ]; -function zu(t, e) { - return f(), g("svg", Iu, [...Uu]); +function ju(t, e) { + return f(), g("svg", Uu, [...Pu]); } -const Pu = { render: zu }, ju = { +const qu = { render: ju }, Gu = { 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" -}, qu = /* @__PURE__ */ n("path", { +}, Ku = /* @__PURE__ */ n("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), Gu = [ - qu +}, null, -1), Wu = [ + Ku ]; -function Ku(t, e) { - return f(), g("svg", ju, [...Gu]); +function Yu(t, e) { + return f(), g("svg", Gu, [...Wu]); } -const fs = { render: Ku }, Wu = { +const fs = { render: Yu }, Xu = { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", @@ -3849,40 +3862,40 @@ const fs = { render: Ku }, Wu = { "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" -}, Yu = /* @__PURE__ */ n("path", { +}, Ju = /* @__PURE__ */ n("path", { stroke: "none", d: "M0 0h24v24H0z" -}, null, -1), Xu = /* @__PURE__ */ n("path", { d: "M9 6h11M12 12h8M15 18h5M5 6v.01M8 12v.01M11 18v.01" }, null, -1), Ju = [ - Yu, - Xu +}, null, -1), Qu = /* @__PURE__ */ n("path", { d: "M9 6h11M12 12h8M15 18h5M5 6v.01M8 12v.01M11 18v.01" }, null, -1), Zu = [ + Ju, + Qu ]; -function Qu(t, e) { - return f(), g("svg", Wu, [...Ju]); +function e0(t, e) { + return f(), g("svg", Xu, [...Zu]); } -const Zu = { render: Qu }, e0 = { +const t0 = { render: e0 }, s0 = { 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" -}, t0 = /* @__PURE__ */ n("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), s0 = [ - t0 +}, o0 = /* @__PURE__ */ n("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), n0 = [ + o0 ]; -function o0(t, e) { - return f(), g("svg", e0, [...s0]); +function r0(t, e) { + return f(), g("svg", s0, [...n0]); } -const n0 = { render: o0 }, r0 = { 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" }, a0 = ["aria-label"], l0 = ["aria-label"], i0 = ["aria-label"], c0 = ["aria-label"], d0 = { class: "flex leading-6" }, u0 = { +const a0 = { render: r0 }, l0 = { 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" }, i0 = ["aria-label"], c0 = ["aria-label"], d0 = ["aria-label"], u0 = ["aria-label"], m0 = { class: "flex leading-6" }, f0 = { key: 0, class: "flex" -}, m0 = /* @__PURE__ */ n("div", { class: "text-neutral-300 dark:text-gray-600 mx-0.5" }, "/", -1), f0 = { class: "relative" }, h0 = /* @__PURE__ */ n("span", { class: "text-neutral-300 dark:text-gray-600 mx-0.5" }, "/", -1), p0 = ["onDragover", "onDragleave", "onDrop", "title", "onClick"], v0 = { class: "relative flex bg-white dark:bg-gray-700 justify-between items-center rounded p-1 ml-2 w-full" }, g0 = ["placeholder"], _0 = { 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" }, b0 = ["onDrop", "onClick"], x0 = { class: "flex pointer-events-none" }, y0 = { class: "inline-block w-full text-ellipsis overflow-hidden" }, w0 = { +}, h0 = /* @__PURE__ */ n("div", { class: "text-neutral-300 dark:text-gray-600 mx-0.5" }, "/", -1), p0 = { class: "relative" }, v0 = /* @__PURE__ */ n("span", { class: "text-neutral-300 dark:text-gray-600 mx-0.5" }, "/", -1), g0 = ["onDragover", "onDragleave", "onDrop", "title", "onClick"], _0 = { class: "relative flex bg-white dark:bg-gray-700 justify-between items-center rounded p-1 ml-2 w-full" }, b0 = ["placeholder"], x0 = { 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" }, y0 = ["onDrop", "onClick"], w0 = { class: "flex pointer-events-none" }, k0 = { class: "inline-block w-full text-ellipsis overflow-hidden" }, $0 = { __name: "Breadcrumb", setup(t) { - const e = ae("ServiceContainer"), { t: s } = e.i18n, r = e.dragSelect, { setStore: o } = e.storage, c = T(null), i = Ho(0, 100); - mt(i, (B) => { - const D = c.value.children; - let V = 0, E = 0, S = 5, O = 1; + const e = ae("ServiceContainer"), { t: s } = e.i18n, r = e.dragSelect, { setStore: o } = e.storage, c = M(null), i = Ho(0, 100); + Je(i, (V) => { + const E = c.value.children; + let O = 0, T = 0, S = 5, H = 1; e.fs.limitBreadcrumbItems(S), ft(() => { - for (let $ = D.length - 1; $ >= 0 && !(V + D[$].offsetWidth > i.value - 40); $--) - V += parseInt(D[$].offsetWidth, 10), E++; - E < O && (E = O), E > S && (E = S), e.fs.limitBreadcrumbItems(E); + for (let $ = E.length - 1; $ >= 0 && !(O + E[$].offsetWidth > i.value - 40); $--) + O += parseInt(E[$].offsetWidth, 10), T++; + T < H && (T = H), T > S && (T = S), e.fs.limitBreadcrumbItems(T); }); }); const d = () => { @@ -3891,141 +3904,145 @@ const n0 = { render: o0 }, r0 = { class: "space-x-0.5 flex p-1.5 bg-neutral-100 Ce(() => { new ResizeObserver(d).observe(c.value); }); - const l = (B, D = null) => { - B.preventDefault(), r.isDraggingRef.value = !1, m(B), D ?? (D = e.fs.hiddenBreadcrumbs.length - 1); - let V = JSON.parse(B.dataTransfer.getData("items")); - if (V.find((E) => E.storage !== e.fs.adapter)) { + const l = (V, E = null) => { + V.preventDefault(), r.isDraggingRef.value = !1, m(V), E ?? (E = e.fs.hiddenBreadcrumbs.length - 1); + let O = JSON.parse(V.dataTransfer.getData("items")); + if (O.find((T) => T.storage !== e.fs.adapter)) { alert("Moving items between different storages is not supported yet."); return; } e.modal.open(js, { items: { - from: V, - to: e.fs.hiddenBreadcrumbs[D] ?? { path: e.fs.adapter + "://" } + from: O, + to: e.fs.hiddenBreadcrumbs[E] ?? { path: e.fs.adapter + "://" } } }); - }, u = (B, D = null) => { - B.preventDefault(), r.isDraggingRef.value = !1, m(B), D ?? (D = e.fs.breadcrumbs.length - 2); - let V = JSON.parse(B.dataTransfer.getData("items")); - if (V.find((E) => E.storage !== e.fs.adapter)) { + }, u = (V, E = null) => { + V.preventDefault(), r.isDraggingRef.value = !1, m(V), E ?? (E = e.fs.breadcrumbs.length - 2); + let O = JSON.parse(V.dataTransfer.getData("items")); + if (O.find((T) => T.storage !== e.fs.adapter)) { alert("Moving items between different storages is not supported yet."); return; } e.modal.open(js, { items: { - from: V, - to: e.fs.breadcrumbs[D] ?? { path: e.fs.adapter + "://" } + from: O, + to: e.fs.breadcrumbs[E] ?? { path: e.fs.adapter + "://" } } }); - }, h = (B) => { - B.preventDefault(), e.fs.isGoUpAvailable() ? (B.dataTransfer.dropEffect = "copy", B.currentTarget.classList.add("bg-blue-200", "dark:bg-slate-600")) : (B.dataTransfer.dropEffect = "none", B.dataTransfer.effectAllowed = "none"); - }, m = (B) => { - B.preventDefault(), B.currentTarget.classList.remove("bg-blue-200", "dark:bg-slate-600"), e.fs.isGoUpAvailable() && B.currentTarget.classList.remove("bg-blue-200", "dark:bg-slate-600"); + }, h = (V) => { + V.preventDefault(), e.fs.isGoUpAvailable() ? (V.dataTransfer.dropEffect = "copy", V.currentTarget.classList.add("bg-blue-200", "dark:bg-slate-600")) : (V.dataTransfer.dropEffect = "none", V.dataTransfer.effectAllowed = "none"); + }, m = (V) => { + V.preventDefault(), V.currentTarget.classList.remove("bg-blue-200", "dark:bg-slate-600"), e.fs.isGoUpAvailable() && V.currentTarget.classList.remove("bg-blue-200", "dark:bg-slate-600"); }, v = () => { - A(), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.fs.adapter, path: e.fs.data.dirname } }); + D(), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.fs.adapter, path: e.fs.data.dirname } }); }, p = () => { - A(), !e.fs.isGoUpAvailable() || e.emitter.emit("vf-fetch", { + D(), !e.fs.isGoUpAvailable() || e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.fs.adapter, path: e.fs.parentFolderPath } }); - }, b = (B) => { - e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.fs.adapter, path: B.path } }), e.fs.toggleHiddenBreadcrumbs(!1); + }, b = (V) => { + e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.fs.adapter, path: V.path } }), e.fs.toggleHiddenBreadcrumbs(!1); }, y = () => { e.fs.showHiddenBreadcrumbs && e.fs.toggleHiddenBreadcrumbs(!1); }, x = { - mounted(B, D, V, E) { - B.clickOutsideEvent = function(S) { - B === S.target || B.contains(S.target) || D.value(); - }, document.body.addEventListener("click", B.clickOutsideEvent); + mounted(V, E, O, T) { + V.clickOutsideEvent = function(S) { + V === S.target || V.contains(S.target) || E.value(); + }, document.body.addEventListener("click", V.clickOutsideEvent); }, - beforeUnmount(B, D, V, E) { - document.body.removeEventListener("click", B.clickOutsideEvent); + beforeUnmount(V, E, O, T) { + document.body.removeEventListener("click", V.clickOutsideEvent); } - }, M = () => { - e.showTreeView = !e.showTreeView, o("show-tree-view", e.showTreeView); - }, k = T(null), U = () => { + }, A = () => { + e.showTreeView = !e.showTreeView; + }; + Je(() => e.showTreeView, (V, E) => { + V !== E && o("show-tree-view", V); + }); + const k = M(null), U = () => { e.features.includes(pe.SEARCH) && (e.fs.searchMode = !0, ft(() => k.value.focus())); - }, H = Ho("", 400); - mt(H, (B) => { - e.emitter.emit("vf-toast-clear"), e.emitter.emit("vf-search-query", { newQuery: B }); - }), mt(() => e.fs.searchMode, (B) => { - B && ft(() => k.value.focus()); + }, B = Ho("", 400); + Je(B, (V) => { + e.emitter.emit("vf-toast-clear"), e.emitter.emit("vf-search-query", { newQuery: V }); + }), Je(() => e.fs.searchMode, (V) => { + V && ft(() => k.value.focus()); }); - const A = () => { - e.fs.searchMode = !1, H.value = ""; + const D = () => { + e.fs.searchMode = !1, B.value = ""; }; e.emitter.on("vf-search-exit", () => { - A(); + D(); }); const L = () => { - H.value === "" && A(); + B.value === "" && D(); }; - return (B, D) => (f(), g("div", r0, [ + return (V, E) => (f(), g("div", l0, [ n("span", { "aria-label": a(s)("Toggle Tree View"), "data-microtip-position": "bottom-right", role: "tooltip" }, [ - W(a(Zu), { - onClick: M, + W(a(t0), { + onClick: A, class: me(["h-6 w-6 p-0.5 rounded cursor-pointer text-slate-700", a(e).showTreeView ? "bg-gray-300 dark:bg-gray-700" : ""]) }, null, 8, ["class"]) - ], 8, a0), + ], 8, i0), n("span", { "aria-label": a(s)("Go up a directory"), "data-microtip-position": "bottom-right", role: "tooltip" }, [ - W(a(ku), { - onDragover: D[0] || (D[0] = (V) => h(V)), - onDragleave: D[1] || (D[1] = (V) => m(V)), - onDrop: D[2] || (D[2] = (V) => u(V)), + W(a(Su), { + onDragover: E[0] || (E[0] = (O) => h(O)), + onDragleave: E[1] || (E[1] = (O) => m(O)), + onDrop: E[2] || (E[2] = (O) => u(O)), onClick: p, class: me(a(e).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, l0), + ], 8, c0), a(e).fs.loading ? (f(), g("span", { key: 1, "aria-label": a(s)("Cancel"), "data-microtip-position": "bottom-right", role: "tooltip" }, [ - W(a(Tu), { - onClick: D[3] || (D[3] = (V) => a(e).emitter.emit("vf-fetch-abort")) + W(a(Au), { + onClick: E[3] || (E[3] = (O) => a(e).emitter.emit("vf-fetch-abort")) }) - ], 8, c0)) : (f(), g("span", { + ], 8, u0)) : (f(), g("span", { key: 0, "aria-label": a(s)("Refresh"), "data-microtip-position": "bottom-right", role: "tooltip" }, [ - W(a(_u), { onClick: v }) - ], 8, i0)), + W(a(xu), { onClick: v }) + ], 8, d0)), ve(n("div", { - onClick: nt(U, ["self"]), + onClick: rt(U, ["self"]), class: "group flex bg-white dark:bg-gray-700 items-center rounded p-1 ml-2 w-full overflow-hidden" }, [ n("div", null, [ - W(a(Vu), { - onDragover: D[4] || (D[4] = (V) => h(V)), - onDragleave: D[5] || (D[5] = (V) => m(V)), - onDrop: D[6] || (D[6] = (V) => u(V, -1)), - onClick: D[7] || (D[7] = (V) => a(e).emitter.emit("vf-fetch", { params: { q: "index", adapter: a(e).fs.adapter } })) + W(a(Hu), { + onDragover: E[4] || (E[4] = (O) => h(O)), + onDragleave: E[5] || (E[5] = (O) => m(O)), + onDrop: E[6] || (E[6] = (O) => u(O, -1)), + onClick: E[7] || (E[7] = (O) => a(e).emitter.emit("vf-fetch", { params: { q: "index", adapter: a(e).fs.adapter } })) }) ]), - n("div", d0, [ - a(e).fs.hiddenBreadcrumbs.length ? ve((f(), g("div", u0, [ - m0, - n("div", f0, [ + n("div", m0, [ + a(e).fs.hiddenBreadcrumbs.length ? ve((f(), g("div", f0, [ + h0, + n("div", p0, [ n("span", { - onDragenter: D[8] || (D[8] = (V) => a(e).fs.toggleHiddenBreadcrumbs(!0)), - onClick: D[9] || (D[9] = (V) => a(e).fs.toggleHiddenBreadcrumbs()), + onDragenter: E[8] || (E[8] = (O) => a(e).fs.toggleHiddenBreadcrumbs(!0)), + onClick: E[9] || (E[9] = (O) => a(e).fs.toggleHiddenBreadcrumbs()), class: "text-slate-700 dark:text-slate-200 hover:bg-neutral-100 dark:hover:bg-gray-800 rounded cursor-pointer" }, [ - W(a(n0), { class: "px-1 pointer-events-none" }) + W(a(a0), { class: "px-1 pointer-events-none" }) ], 32) ]) ])), [ @@ -4036,70 +4053,70 @@ const n0 = { render: o0 }, r0 = { class: "space-x-0.5 flex p-1.5 bg-neutral-100 ref_key: "breadcrumbContainer", ref: c, class: "flex leading-6 w-full overflow-hidden", - onClick: nt(U, ["self"]) + onClick: rt(U, ["self"]) }, [ - (f(!0), g(he, null, $e(a(e).fs.breadcrumbs, (V, E) => (f(), g("div", { key: E }, [ - h0, + (f(!0), g(he, null, $e(a(e).fs.breadcrumbs, (O, T) => (f(), g("div", { key: T }, [ + v0, n("span", { - onDragover: (S) => E === a(e).fs.breadcrumbs.length - 1 || h(S), - onDragleave: (S) => E === a(e).fs.breadcrumbs.length - 1 || m(S), - onDrop: (S) => E === a(e).fs.breadcrumbs.length - 1 || u(S, E), + onDragover: (S) => T === a(e).fs.breadcrumbs.length - 1 || h(S), + onDragleave: (S) => T === a(e).fs.breadcrumbs.length - 1 || m(S), + onDrop: (S) => T === a(e).fs.breadcrumbs.length - 1 || u(S, T), 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: V.basename, - onClick: (S) => a(e).emitter.emit("vf-fetch", { params: { q: "index", adapter: a(e).fs.adapter, path: V.path } }) - }, _(V.name), 41, p0) + title: O.basename, + onClick: (S) => a(e).emitter.emit("vf-fetch", { params: { q: "index", adapter: a(e).fs.adapter, path: O.path } }) + }, _(O.name), 41, g0) ]))), 128)) ], 512), a(e).fs.loading ? (f(), X(a(lo), { key: 0 })) : P("", !0) ], 512), [ [ze, !a(e).fs.searchMode] ]), - ve(n("div", v0, [ + ve(n("div", _0, [ n("div", null, [ - W(a(Fu)) + W(a(Nu)) ]), ve(n("input", { ref_key: "searchInput", ref: k, - onKeydown: $t(A, ["esc"]), + onKeydown: $t(D, ["esc"]), onBlur: L, - "onUpdate:modelValue": D[10] || (D[10] = (V) => Fo(H) ? H.value = V : null), + "onUpdate:modelValue": E[10] || (E[10] = (O) => Fo(B) ? B.value = O : null), placeholder: a(s)("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, g0), [ - [St, a(H)] + }, null, 40, b0), [ + [St, a(B)] ]), - W(a(Pu), { onClick: A }) + W(a(qu), { onClick: D }) ], 512), [ [ze, a(e).fs.searchMode] ]), - ve(n("div", _0, [ - (f(!0), g(he, null, $e(a(e).fs.hiddenBreadcrumbs, (V, E) => (f(), g("div", { - key: E, - onDragover: D[11] || (D[11] = (S) => h(S)), - onDragleave: D[12] || (D[12] = (S) => m(S)), - onDrop: (S) => l(S, E), - onClick: (S) => b(V), + ve(n("div", x0, [ + (f(!0), g(he, null, $e(a(e).fs.hiddenBreadcrumbs, (O, T) => (f(), g("div", { + key: T, + onDragover: E[11] || (E[11] = (S) => h(S)), + onDragleave: E[12] || (E[12] = (S) => m(S)), + onDrop: (S) => l(S, T), + onClick: (S) => b(O), class: "px-2 py-0.5 hover:bg-gray-400/20 cursor-pointer items-center whitespace-nowrap" }, [ - n("div", x0, [ + n("div", w0, [ n("span", null, [ W(a(fs), { class: "h-5 w-5" }) ]), - ee(), - n("span", y0, _(V.name), 1) + Q(), + n("span", k0, _(O.name), 1) ]) - ], 40, b0))), 128)) + ], 40, y0))), 128)) ], 512), [ [ze, a(e).fs.showHiddenBreadcrumbs] ]) ])); } -}, Vn = (t, e = null) => new Date(t * 1e3).toLocaleString(e ?? navigator.language ?? "en-US"), k0 = ["onClick"], $0 = { +}, Vn = (t, e = null) => new Date(t * 1e3).toLocaleString(e ?? navigator.language ?? "en-US"), S0 = ["onClick"], C0 = { __name: "Toast", setup(t) { - const e = ae("ServiceContainer"), { getStore: s } = e.storage, r = T(s("full-screen", !1)), o = T([]), 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", i = (l) => { + const e = ae("ServiceContainer"), { getStore: s } = e.storage, r = M(s("full-screen", !1)), o = M([]), 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", i = (l) => { o.value.splice(l, 1); }, d = (l) => { let u = o.value.findIndex((h) => h.id === l); @@ -4125,68 +4142,68 @@ const n0 = { render: o0 }, r0 = { class: "space-x-0.5 flex p-1.5 bg-neutral-100 onClick: (v) => i(m), key: h, class: me([c(h.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"]) - }, _(h.label), 11, k0))), 128)) + }, _(h.label), 11, S0))), 128)) ]), _: 1 }) ], 2)); } -}, S0 = { +}, E0 = { xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", class: "h-5 w-5", viewBox: "0 0 20 20" -}, C0 = /* @__PURE__ */ n("path", { +}, T0 = /* @__PURE__ */ n("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), E0 = [ - C0 +}, null, -1), M0 = [ + T0 ]; -function T0(t, e) { - return f(), g("svg", S0, [...E0]); +function A0(t, e) { + return f(), g("svg", E0, [...M0]); } -const M0 = { render: T0 }, A0 = { +const D0 = { render: A0 }, L0 = { xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", class: "h-5 w-5", viewBox: "0 0 20 20" -}, D0 = /* @__PURE__ */ n("path", { +}, V0 = /* @__PURE__ */ n("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), L0 = [ - D0 +}, null, -1), O0 = [ + V0 ]; -function V0(t, e) { - return f(), g("svg", A0, [...L0]); +function H0(t, e) { + return f(), g("svg", L0, [...O0]); } -const O0 = { render: V0 }, Kt = { +const B0 = { render: H0 }, Kt = { __name: "SortIcon", props: { direction: String }, setup(t) { return (e, s) => (f(), g("div", null, [ - t.direction === "asc" ? (f(), X(a(M0), { key: 0 })) : P("", !0), - t.direction === "desc" ? (f(), X(a(O0), { key: 1 })) : P("", !0) + t.direction === "asc" ? (f(), X(a(D0), { key: 0 })) : P("", !0), + t.direction === "desc" ? (f(), X(a(B0), { key: 1 })) : P("", !0) ])); } -}, H0 = { +}, R0 = { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", class: "text-neutral-500", viewBox: "0 0 24 24" -}, B0 = /* @__PURE__ */ n("path", { +}, F0 = /* @__PURE__ */ n("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), R0 = [ - B0 +}, null, -1), I0 = [ + F0 ]; -function F0(t, e) { - return f(), g("svg", H0, [...R0]); +function N0(t, e) { + return f(), g("svg", R0, [...I0]); } -const I0 = { render: F0 }, ks = { +const U0 = { render: N0 }, ks = { __name: "ItemIcon", props: { type: { @@ -4203,29 +4220,29 @@ const I0 = { render: F0 }, ks = { t.type === "dir" ? (f(), X(a(fs), { key: 0, class: me({ "h-5 w-5": t.small, "h-10 w-10 md:h-12 md:w-12 m-auto": !t.small }) - }, null, 8, ["class"])) : (f(), X(a(I0), { + }, null, 8, ["class"])) : (f(), X(a(U0), { key: 1, class: me({ "h-5 w-5": t.small, "h-10 w-10 md:h-12 md:w-12 m-auto": !t.small }) }, null, 8, ["class"])) ])); } -}, N0 = { +}, z0 = { 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" -}, U0 = /* @__PURE__ */ n("path", { +}, P0 = /* @__PURE__ */ n("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), z0 = [ - U0 +}, null, -1), j0 = [ + P0 ]; -function P0(t, e) { - return f(), g("svg", N0, [...z0]); +function q0(t, e) { + return f(), g("svg", z0, [...j0]); } -const j0 = { render: P0 }, q0 = { class: "absolute -z-50 -top-96" }, G0 = { 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" }, K0 = { +const G0 = { render: q0 }, K0 = { class: "absolute -z-50 -top-96" }, W0 = { 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" }, Y0 = { __name: "DragItem", props: { count: { @@ -4235,19 +4252,19 @@ const j0 = { render: P0 }, q0 = { class: "absolute -z-50 -top-96" }, G0 = { clas }, setup(t) { const e = t; - return (s, r) => (f(), g("div", q0, [ - W(a(j0)), - n("div", G0, _(e.count), 1) + return (s, r) => (f(), g("div", K0, [ + W(a(G0)), + n("div", W0, _(e.count), 1) ])); } -}, W0 = { class: "flex" }, Y0 = ["aria-label"], X0 = { class: "ml-auto mb-2" }, J0 = { +}, X0 = { class: "flex" }, J0 = ["aria-label"], Q0 = { class: "ml-auto mb-2" }, Z0 = { 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" -}, Q0 = { key: 1 }, Z0 = { +}, em = { key: 1 }, tm = { __name: "Text", emits: ["success"], setup(t, { emit: e }) { - const s = e, r = T(""), o = T(""), c = T(null), i = T(!1), d = T(""), l = T(!1), u = ae("ServiceContainer"), { t: h } = u.i18n; + const s = e, r = M(""), o = M(""), c = M(null), i = M(!1), d = M(""), l = M(!1), u = ae("ServiceContainer"), { t: h } = u.i18n; Ce(() => { u.requester.send({ url: "", @@ -4280,15 +4297,15 @@ const j0 = { render: P0 }, q0 = { class: "absolute -z-50 -top-96" }, G0 = { clas }); }; return (p, b) => (f(), g(he, null, [ - n("div", W0, [ + n("div", X0, [ n("div", { class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title", "aria-label": a(u).modal.data.item.path, "data-microtip-position": "bottom-right", role: "tooltip" - }, _(a(u).modal.data.item.basename), 9, Y0), - n("div", X0, [ + }, _(a(u).modal.data.item.basename), 9, J0), + n("div", Q0, [ i.value ? (f(), g("button", { key: 0, onClick: v, @@ -4302,7 +4319,7 @@ const j0 = { render: P0 }, q0 = { class: "absolute -z-50 -top-96" }, G0 = { clas ]) ]), n("div", null, [ - i.value ? (f(), g("div", Q0, [ + i.value ? (f(), g("div", em, [ ve(n("textarea", { ref_key: "editInput", ref: c, @@ -4315,25 +4332,25 @@ const j0 = { render: P0 }, q0 = { class: "absolute -z-50 -top-96" }, G0 = { clas }, null, 512), [ [St, o.value] ]) - ])) : (f(), g("pre", J0, _(r.value), 1)), + ])) : (f(), g("pre", Z0, _(r.value), 1)), d.value.length ? (f(), X(We, { key: 2, onHidden: b[2] || (b[2] = (y) => d.value = ""), error: l.value }, { default: se(() => [ - ee(_(d.value), 1) + Q(_(d.value), 1) ]), _: 1 }, 8, ["error"])) : P("", !0) ]) ], 64)); } -}, em = { class: "flex" }, tm = ["aria-label"], sm = { class: "ml-auto mb-2" }, om = { class: "w-full flex justify-center" }, nm = ["src"], rm = { +}, sm = { class: "flex" }, om = ["aria-label"], nm = { class: "ml-auto mb-2" }, rm = { class: "w-full flex justify-center" }, am = ["src"], lm = { __name: "Image", emits: ["success"], setup(t, { emit: e }) { - const s = e, r = ae("ServiceContainer"), { t: o } = r.i18n, c = T(null), i = T(null), d = T(!1), l = T(""), u = T(!1), h = () => { + const s = e, r = ae("ServiceContainer"), { t: o } = r.i18n, c = M(null), i = M(null), d = M(!1), l = M(""), u = M(!1), h = () => { d.value = !d.value, d.value ? i.value = new nr(c.value, { crop(v) { } @@ -4366,15 +4383,15 @@ const j0 = { render: P0 }, q0 = { class: "absolute -z-50 -top-96" }, G0 = { clas return Ce(() => { s("success"); }), (v, p) => (f(), g(he, null, [ - n("div", em, [ + n("div", sm, [ n("h3", { class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title", "aria-label": a(r).modal.data.item.path, "data-microtip-position": "bottom-right", role: "tooltip" - }, _(a(r).modal.data.item.basename), 9, tm), - n("div", sm, [ + }, _(a(r).modal.data.item.basename), 9, om), + n("div", nm, [ d.value ? (f(), g("button", { key: 0, onClick: m, @@ -4387,14 +4404,14 @@ const j0 = { render: P0 }, q0 = { class: "absolute -z-50 -top-96" }, G0 = { clas }, _(d.value ? a(o)("Cancel") : a(o)("Edit")), 1)) : P("", !0) ]) ]), - n("div", om, [ + n("div", rm, [ n("img", { ref_key: "image", ref: c, class: "max-w-[50vh] max-h-[50vh]", src: a(r).requester.getPreviewUrl(a(r).modal.data.adapter, a(r).modal.data.item), alt: "" - }, null, 8, nm) + }, null, 8, am) ]), l.value.length ? (f(), X(We, { key: 0, @@ -4402,13 +4419,13 @@ const j0 = { render: P0 }, q0 = { class: "absolute -z-50 -top-96" }, G0 = { clas error: u.value }, { default: se(() => [ - ee(_(l.value), 1) + Q(_(l.value), 1) ]), _: 1 }, 8, ["error"])) : P("", !0) ], 64)); } -}, am = { class: "flex" }, lm = ["aria-label"], im = /* @__PURE__ */ n("div", null, null, -1), cm = { +}, im = { class: "flex" }, cm = ["aria-label"], dm = /* @__PURE__ */ n("div", null, null, -1), um = { __name: "Default", emits: ["success"], setup(t, { emit: e }) { @@ -4416,23 +4433,23 @@ const j0 = { render: P0 }, q0 = { class: "absolute -z-50 -top-96" }, G0 = { clas return Ce(() => { r("success"); }), (o, c) => (f(), g(he, null, [ - n("div", am, [ + n("div", im, [ n("h3", { class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title", "aria-label": a(s).modal.data.item.path, "data-microtip-position": "bottom-right", role: "tooltip" - }, _(a(s).modal.data.item.basename), 9, lm) + }, _(a(s).modal.data.item.basename), 9, cm) ]), - im + dm ], 64)); } -}, dm = ["aria-label"], um = { +}, mm = ["aria-label"], fm = { class: "w-full aspect-video", preload: "", controls: "" -}, mm = ["src"], fm = { +}, hm = ["src"], pm = { __name: "Video", emits: ["success"], setup(t, { emit: e }) { @@ -4446,22 +4463,22 @@ const j0 = { render: P0 }, q0 = { class: "absolute -z-50 -top-96" }, G0 = { clas "aria-label": a(s).modal.data.item.path, "data-microtip-position": "bottom-right", role: "tooltip" - }, _(a(s).modal.data.item.basename), 9, dm), + }, _(a(s).modal.data.item.basename), 9, mm), n("div", null, [ - n("video", um, [ + n("video", fm, [ n("source", { src: o(), type: "video/mp4" - }, null, 8, mm), - ee(" Your browser does not support the video tag. ") + }, null, 8, hm), + Q(" Your browser does not support the video tag. ") ]) ]) ])); } -}, hm = ["aria-label"], pm = { +}, vm = ["aria-label"], gm = { class: "w-full", controls: "" -}, vm = ["src"], gm = { +}, _m = ["src"], bm = { __name: "Audio", emits: ["success"], setup(t, { emit: e }) { @@ -4475,25 +4492,25 @@ const j0 = { render: P0 }, q0 = { class: "absolute -z-50 -top-96" }, G0 = { clas "aria-label": a(r).modal.data.item.path, "data-microtip-position": "bottom-right", role: "tooltip" - }, _(a(r).modal.data.item.basename), 9, hm), + }, _(a(r).modal.data.item.basename), 9, vm), n("div", null, [ - n("audio", pm, [ + n("audio", gm, [ n("source", { src: o(), type: "audio/mpeg" - }, null, 8, vm), - ee(" Your browser does not support the audio element. ") + }, null, 8, _m), + Q(" Your browser does not support the audio element. ") ]) ]) ], 64)); } -}, _m = ["aria-label"], bm = ["data"], xm = ["src"], ym = /* @__PURE__ */ n("p", null, [ - /* @__PURE__ */ ee(" Your browser does not support PDFs. "), +}, xm = ["aria-label"], ym = ["data"], wm = ["src"], km = /* @__PURE__ */ n("p", null, [ + /* @__PURE__ */ Q(" Your browser does not support PDFs. "), /* @__PURE__ */ n("a", { href: "https://example.com/test.pdf" }, "Download the PDF"), - /* @__PURE__ */ ee(" . ") -], -1), wm = [ - ym -], km = { + /* @__PURE__ */ Q(" . ") +], -1), $m = [ + km +], Sm = { __name: "Pdf", emits: ["success"], setup(t, { emit: e }) { @@ -4507,7 +4524,7 @@ const j0 = { render: P0 }, q0 = { class: "absolute -z-50 -top-96" }, G0 = { clas "aria-label": a(s).modal.data.item.path, "data-microtip-position": "bottom-right", role: "tooltip" - }, _(a(s).modal.data.item.basename), 9, _m), + }, _(a(s).modal.data.item.basename), 9, xm), n("div", null, [ n("object", { class: "h-[60vh]", @@ -4521,15 +4538,15 @@ const j0 = { render: P0 }, q0 = { class: "absolute -z-50 -top-96" }, G0 = { clas src: o(), width: "100%", height: "100%" - }, wm, 8, xm) - ], 8, bm) + }, $m, 8, wm) + ], 8, ym) ]) ], 64)); } -}, $m = { class: "sm:flex sm:items-start" }, Sm = { class: "mt-3 text-center sm:mt-0 sm:text-left w-full" }, Cm = { key: 0 }, Em = { class: "text-gray-700 dark:text-gray-200 text-sm" }, Tm = { +}, Cm = { class: "sm:flex sm:items-start" }, Em = { class: "mt-3 text-center sm:mt-0 sm:text-left w-full" }, Tm = { key: 0 }, Mm = { class: "text-gray-700 dark:text-gray-200 text-sm" }, Am = { key: 0, class: "flex leading-5" -}, Mm = /* @__PURE__ */ n("svg", { +}, Dm = /* @__PURE__ */ n("svg", { class: "animate-spin -ml-1 mr-3 h-5 w-5 text-white", xmlns: "http://www.w3.org/2000/svg", fill: "none", @@ -4548,13 +4565,13 @@ const j0 = { render: P0 }, q0 = { class: "absolute -z-50 -top-96" }, G0 = { clas 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), Am = { class: "py-2 flex font-normal break-all dark:text-gray-200 rounded text-xs" }, Dm = { class: "font-bold" }, Lm = { class: "font-bold pl-2" }, Vm = { +], -1), Lm = { class: "py-2 flex font-normal break-all dark:text-gray-200 rounded text-xs" }, Vm = { class: "font-bold" }, Om = { class: "font-bold pl-2" }, Hm = { key: 0, class: "text-xs text-gray-600 dark:text-gray-400" -}, Om = ["download", "href"], On = { +}, Bm = ["download", "href"], On = { __name: "ModalPreview", setup(t) { - const e = ae("ServiceContainer"), { t: s } = e.i18n, r = T(!1), o = (i) => (e.modal.data.item.mime_type ?? "").startsWith(i), c = e.features.includes(pe.PREVIEW); + const e = ae("ServiceContainer"), { t: s } = e.i18n, r = M(!1), o = (i) => (e.modal.data.item.mime_type ?? "").startsWith(i), c = e.features.includes(pe.PREVIEW); return c || (r.value = !0), (i, d) => (f(), X(Ke, null, { buttons: se(() => [ n("button", { @@ -4568,58 +4585,58 @@ const j0 = { render: P0 }, q0 = { class: "absolute -z-50 -top-96" }, G0 = { clas class: "vf-btn vf-btn-primary", download: a(e).requester.getDownloadUrl(a(e).modal.data.adapter, a(e).modal.data.item), href: a(e).requester.getDownloadUrl(a(e).modal.data.adapter, a(e).modal.data.item) - }, _(a(s)("Download")), 9, Om)) : P("", !0) + }, _(a(s)("Download")), 9, Bm)) : P("", !0) ]), default: se(() => [ - n("div", $m, [ - n("div", Sm, [ - a(c) ? (f(), g("div", Cm, [ - o("text") ? (f(), X(Z0, { + n("div", Cm, [ + n("div", Em, [ + a(c) ? (f(), g("div", Tm, [ + o("text") ? (f(), X(tm, { key: 0, onSuccess: d[0] || (d[0] = (l) => r.value = !0) - })) : o("image") ? (f(), X(rm, { + })) : o("image") ? (f(), X(lm, { key: 1, onSuccess: d[1] || (d[1] = (l) => r.value = !0) - })) : o("video") ? (f(), X(fm, { + })) : o("video") ? (f(), X(pm, { key: 2, onSuccess: d[2] || (d[2] = (l) => r.value = !0) - })) : o("audio") ? (f(), X(gm, { + })) : o("audio") ? (f(), X(bm, { key: 3, onSuccess: d[3] || (d[3] = (l) => r.value = !0) - })) : o("application/pdf") ? (f(), X(km, { + })) : o("application/pdf") ? (f(), X(Sm, { key: 4, onSuccess: d[4] || (d[4] = (l) => r.value = !0) - })) : (f(), X(cm, { + })) : (f(), X(um, { key: 5, onSuccess: d[5] || (d[5] = (l) => r.value = !0) })) ])) : P("", !0), - n("div", Em, [ - r.value === !1 ? (f(), g("div", Tm, [ - Mm, + n("div", Mm, [ + r.value === !1 ? (f(), g("div", Am, [ + Dm, n("span", null, _(a(s)("Loading")), 1) ])) : P("", !0) ]) ]) ]), - n("div", Am, [ + n("div", Lm, [ n("div", null, [ - n("span", Dm, _(a(s)("File Size")) + ": ", 1), - ee(_(a(e).filesize(a(e).modal.data.item.file_size)), 1) + n("span", Vm, _(a(s)("File Size")) + ": ", 1), + Q(_(a(e).filesize(a(e).modal.data.item.file_size)), 1) ]), n("div", null, [ - n("span", Lm, _(a(s)("Last Modified")) + ": ", 1), - ee(" " + _(a(Vn)(a(e).modal.data.item.last_modified)), 1) + n("span", Om, _(a(s)("Last Modified")) + ": ", 1), + Q(" " + _(a(Vn)(a(e).modal.data.item.last_modified)), 1) ]) ]), - a(e).features.includes(a(pe).DOWNLOAD) ? (f(), g("div", Vm, [ + a(e).features.includes(a(pe).DOWNLOAD) ? (f(), g("div", Hm, [ n("span", null, _(a(s)(`Download doesn't work? You can try right-click "Download" button, select "Save link as...".`)), 1) ])) : P("", !0) ]), _: 1 })); } -}, Hm = { +}, Rm = { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", @@ -4628,17 +4645,17 @@ const j0 = { render: P0 }, q0 = { class: "absolute -z-50 -top-96" }, G0 = { clas "stroke-width": "2", class: "h-5 w-5", viewBox: "0 0 24 24" -}, Bm = /* @__PURE__ */ n("path", { +}, Fm = /* @__PURE__ */ n("path", { stroke: "none", d: "M0 0h24v24H0z" -}, null, -1), Rm = /* @__PURE__ */ n("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), Fm = [ - Bm, - Rm +}, null, -1), Im = /* @__PURE__ */ n("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), Nm = [ + Fm, + Im ]; -function Im(t, e) { - return f(), g("svg", Hm, [...Fm]); +function Um(t, e) { + return f(), g("svg", Rm, [...Nm]); } -const Hn = { render: Im }, Nm = ["data-type", "data-item", "data-index"], $s = { +const Hn = { render: Um }, zm = ["data-type", "data-item", "data-index"], $s = { __name: "Item", props: { item: { type: Object }, @@ -4650,7 +4667,7 @@ const Hn = { render: Im }, Nm = ["data-type", "data-item", "data-index"], $s = { p.type === "dir" ? (e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.fs.adapter, path: p.path } })) : e.modal.open(On, { adapter: e.fs.adapter, item: p }); }, c = { mounted(p, b, y, x) { - y.props.draggable && (p.addEventListener("dragstart", (M) => i(M, b.value)), p.addEventListener("dragover", (M) => l(M, b.value)), p.addEventListener("drop", (M) => d(M, b.value))); + y.props.draggable && (p.addEventListener("dragstart", (A) => i(A, b.value)), p.addEventListener("dragover", (A) => l(A, b.value)), p.addEventListener("drop", (A) => d(A, b.value))); }, beforeUnmount(p, b, y, x) { y.props.draggable && (p.removeEventListener("dragstart", i), p.removeEventListener("dragover", l), p.removeEventListener("drop", d)); @@ -4701,27 +4718,27 @@ const Hn = { render: Im }, Nm = ["data-type", "data-item", "data-index"], $s = { onDblclick: b[0] || (b[0] = (y) => o(t.item)), onTouchstart: b[1] || (b[1] = (y) => v(y)), onTouchend: b[2] || (b[2] = (y) => m()), - onContextmenu: b[3] || (b[3] = nt((y) => a(e).emitter.emit("vf-contextmenu-show", { event: y, items: a(s).getSelected(), target: t.item }), ["prevent"])) + onContextmenu: b[3] || (b[3] = rt((y) => a(e).emitter.emit("vf-contextmenu-show", { event: y, items: a(s).getSelected(), target: t.item }), ["prevent"])) }, [ Dt(p.$slots, "default"), a(e).pinnedFolders.find((y) => y.path === t.item.path) ? (f(), X(a(Hn), { key: 0, class: "absolute top-0 right-0 text-amber-600" })) : P("", !0) - ], 46, Nm)), [ + ], 46, zm)), [ [c, t.item] ]); } -}, Um = { class: "relative flex-auto flex flex-col" }, zm = { +}, Pm = { class: "relative flex-auto flex flex-col" }, jm = { 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" -}, Pm = { class: "relative" }, jm = { class: "grid grid-cols-12 items-center" }, qm = { class: "flex col-span-7 items-center" }, Gm = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, Km = { class: "col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap" }, Wm = { class: "grid grid-cols-12 items-center" }, Ym = { class: "flex col-span-7 items-center" }, Xm = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, Jm = { class: "col-span-2 text-center" }, Qm = { class: "col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap px-1 md:px-3" }, Zm = { class: "relative" }, e1 = ["data-src", "alt"], t1 = { +}, qm = { class: "relative" }, Gm = { class: "grid grid-cols-12 items-center" }, Km = { class: "flex col-span-7 items-center" }, Wm = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, Ym = { class: "col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap" }, Xm = { class: "grid grid-cols-12 items-center" }, Jm = { class: "flex col-span-7 items-center" }, Qm = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, Zm = { class: "col-span-2 text-center" }, e1 = { class: "col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap px-1 md:px-3" }, t1 = { class: "relative" }, s1 = ["data-src", "alt"], o1 = { key: 2, class: "absolute hidden md:block top-1/2 w-full text-center text-neutral-500" -}, s1 = { class: "break-all" }, o1 = { +}, n1 = { class: "break-all" }, r1 = { __name: "Explorer", setup(t) { - const e = ae("ServiceContainer"), { t: s } = e.i18n, r = (m) => m == null ? void 0 : m.substring(0, 3), o = T(null), c = T(""), i = e.dragSelect; + const e = ae("ServiceContainer"), { t: s } = e.i18n, r = (m) => m == null ? void 0 : m.substring(0, 3), o = M(null), c = M(""), i = e.dragSelect; let d; e.emitter.on("vf-fullscreen-toggle", () => { i.area.value.style.height = null; @@ -4742,8 +4759,8 @@ const Hn = { render: Im }, Nm = ["data-type", "data-item", "data-index"], $s = { let v = [...e.fs.data.files], p = l.column, b = l.order === "asc" ? 1 : -1; if (!m) return v; - const y = (x, M) => typeof x == "string" && typeof M == "string" ? x.toLowerCase().localeCompare(M.toLowerCase()) : x < M ? -1 : x > M ? 1 : 0; - return l.active && (v = v.slice().sort((x, M) => y(x[p], M[p]) * b)), v; + const y = (x, A) => typeof x == "string" && typeof A == "string" ? x.toLowerCase().localeCompare(A.toLowerCase()) : x < A ? -1 : x > A ? 1 : 0; + return l.active && (v = v.slice().sort((x, A) => y(x[p], A[p]) * b)), v; }, h = (m) => { l.active && l.column === m ? (l.active = l.order === "asc", l.column = m, l.order = "desc") : (l.active = !0, l.column = m, l.order = "asc"); }; @@ -4753,13 +4770,13 @@ const Hn = { render: Im }, Nm = ["data-type", "data-item", "data-index"], $s = { d.update(); }), Io(() => { d.destroy(); - }), (m, v) => (f(), g("div", Um, [ - a(e).view === "list" || c.value.length ? (f(), g("div", zm, [ + }), (m, v) => (f(), g("div", Pm, [ + a(e).view === "list" || c.value.length ? (f(), g("div", jm, [ n("div", { onClick: v[0] || (v[0] = (p) => h("basename")), class: "col-span-7 vf-sort-button" }, [ - ee(_(a(s)("Name")) + " ", 1), + Q(_(a(s)("Name")) + " ", 1), ve(W(Kt, { direction: l.order }, null, 8, ["direction"]), [ @@ -4771,7 +4788,7 @@ const Hn = { render: Im }, Nm = ["data-type", "data-item", "data-index"], $s = { onClick: v[1] || (v[1] = (p) => h("file_size")), class: "justify-center col-span-2 vf-sort-button" }, [ - ee(_(a(s)("Size")) + " ", 1), + Q(_(a(s)("Size")) + " ", 1), ve(W(Kt, { direction: l.order }, null, 8, ["direction"]), [ @@ -4783,7 +4800,7 @@ const Hn = { render: Im }, Nm = ["data-type", "data-item", "data-index"], $s = { onClick: v[2] || (v[2] = (p) => h("last_modified")), class: "justify-center col-span-3 vf-sort-button" }, [ - ee(_(a(s)("Date")) + " ", 1), + Q(_(a(s)("Date")) + " ", 1), ve(W(Kt, { direction: l.order }, null, 8, ["direction"]), [ @@ -4795,7 +4812,7 @@ const Hn = { render: Im }, Nm = ["data-type", "data-item", "data-index"], $s = { onClick: v[3] || (v[3] = (p) => h("path")), class: "justify-center col-span-5 vf-sort-button" }, [ - ee(_(a(s)("Filepath")) + " ", 1), + Q(_(a(s)("Filepath")) + " ", 1), ve(W(Kt, { direction: l.order }, null, 8, ["direction"]), [ @@ -4803,8 +4820,8 @@ const Hn = { render: Im }, Nm = ["data-type", "data-item", "data-index"], $s = { ]) ])) : P("", !0) ])) : P("", !0), - n("div", Pm, [ - W(K0, { + n("div", qm, [ + W(Y0, { ref_key: "dragImage", ref: o, count: a(i).getCount() @@ -4822,7 +4839,7 @@ const Hn = { render: Im }, Nm = ["data-type", "data-item", "data-index"], $s = { n("div", { ref: a(i).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: v[4] || (v[4] = nt((p) => a(e).emitter.emit("vf-contextmenu-show", { event: p, items: a(i).getSelected() }), ["self", "prevent"])) + onContextmenu: v[4] || (v[4] = rt((p) => a(e).emitter.emit("vf-contextmenu-show", { event: p, items: a(i).getSelected() }), ["self", "prevent"])) }, [ c.value.length ? (f(!0), g(he, { key: 0 }, $e(u(), (p, b) => (f(), X($s, { item: p, @@ -4831,15 +4848,15 @@ const Hn = { render: Im }, Nm = ["data-type", "data-item", "data-index"], $s = { class: "vf-item vf-item-list" }, { default: se(() => [ - n("div", jm, [ - n("div", qm, [ + n("div", Gm, [ + n("div", Km, [ W(ks, { type: p.type, small: a(e).compactListView }, null, 8, ["type", "small"]), - n("span", Gm, _(p.basename), 1) + n("span", Wm, _(p.basename), 1) ]), - n("div", Km, _(p.path), 1) + n("div", Ym, _(p.path), 1) ]) ]), _: 2 @@ -4853,16 +4870,16 @@ const Hn = { render: Im }, Nm = ["data-type", "data-item", "data-index"], $s = { key: p.path }, { default: se(() => [ - n("div", Wm, [ - n("div", Ym, [ + n("div", Xm, [ + n("div", Jm, [ W(ks, { type: p.type, small: a(e).compactListView }, null, 8, ["type", "small"]), - n("span", Xm, _(p.basename), 1) + n("span", Qm, _(p.basename), 1) ]), - n("div", Jm, _(p.file_size ? a(e).filesize(p.file_size) : ""), 1), - n("div", Qm, _(a(Vn)(p.last_modified)), 1) + n("div", Zm, _(p.file_size ? a(e).filesize(p.file_size) : ""), 1), + n("div", e1, _(a(Vn)(p.last_modified)), 1) ]) ]), _: 2 @@ -4876,39 +4893,39 @@ const Hn = { render: Im }, Nm = ["data-type", "data-item", "data-index"], $s = { }, { default: se(() => [ n("div", null, [ - n("div", Zm, [ + n("div", t1, [ (p.mime_type ?? "").startsWith("image") && a(e).showThumbnails ? (f(), g("img", { src: "data:image/png;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", class: "lazy h-10 md:h-12 m-auto", "data-src": a(e).requester.getPreviewUrl(a(e).fs.adapter, p), alt: p.basename, key: p.path - }, null, 8, e1)) : (f(), X(ks, { + }, null, 8, s1)) : (f(), X(ks, { key: 1, type: p.type }, null, 8, ["type"])), - !((p.mime_type ?? "").startsWith("image") && a(e).showThumbnails) && p.type !== "dir" ? (f(), g("div", t1, _(r(p.extension)), 1)) : P("", !0) + !((p.mime_type ?? "").startsWith("image") && a(e).showThumbnails) && p.type !== "dir" ? (f(), g("div", o1, _(r(p.extension)), 1)) : P("", !0) ]), - n("span", s1, _(a(Ps)(p.basename)), 1) + n("span", n1, _(a(Ps)(p.basename)), 1) ]) ]), _: 2 }, 1032, ["item", "index", "dragImage"]))), 256)) : P("", !0) ], 544), - W($0) + W(C0) ])); } -}, n1 = ["href", "download"], r1 = ["onClick"], a1 = { +}, a1 = ["href", "download"], l1 = ["onClick"], i1 = { __name: "ContextMenu", setup(t) { - const e = ae("ServiceContainer"), { t: s } = e.i18n, r = T(null), o = T([]), c = T(""), i = Ot({ + const e = ae("ServiceContainer"), { t: s } = e.i18n, r = M(null), o = M([]), c = M(""), i = Ot({ active: !1, items: [], positions: { left: 0, top: 0 } - }), d = Je(() => i.items.filter((m) => m.key == null || e.features.includes(m.key))); + }), d = Ze(() => i.items.filter((m) => m.key == null || e.features.includes(m.key))); e.emitter.on("vf-context-selected", (m) => { o.value = m; }); @@ -4922,13 +4939,13 @@ const Hn = { render: Im }, Nm = ["data-type", "data-item", "data-index"], $s = { title: () => s("Select All"), action: () => e.dragSelect.selectAll() }, - markFavorite: { + pinFolder: { title: () => s("Pin Folder"), action: () => { e.pinnedFolders = e.pinnedFolders.concat(o.value), e.storage.setStore("pinned-folders", e.pinnedFolders); } }, - removeFavorite: { + unpinFolder: { title: () => s("Unpin Folder"), action: () => { e.pinnedFolders = e.pinnedFolders.filter((m) => !o.value.find((v) => v.path === m.path)), e.storage.setStore("pinned-folders", e.pinnedFolders); @@ -4978,7 +4995,7 @@ const Hn = { render: Im }, Nm = ["data-type", "data-item", "data-index"], $s = { }, download: { key: pe.DOWNLOAD, - link: Je(() => e.requester.getDownloadUrl(e.fs.adapter, o.value[0])), + link: Ze(() => e.requester.getDownloadUrl(e.fs.adapter, o.value[0])), title: () => s("Download"), action: () => { } @@ -5009,7 +5026,7 @@ const Hn = { render: Im }, Nm = ["data-type", "data-item", "data-index"], $s = { i.items.push(l.openDir), e.emitter.emit("vf-context-selected", [p]); else return; - else !p && !c.value ? (i.items.push(l.refresh), i.items.push(l.selectAll), i.items.push(l.newfolder), e.emitter.emit("vf-context-selected", [])) : v.length > 1 && v.some((b) => b.path === p.path) ? (i.items.push(l.refresh), i.items.push(l.archive), i.items.push(l.delete), e.emitter.emit("vf-context-selected", v)) : (p.type === "dir" ? (i.items.push(l.open), e.pinnedFolders.findIndex((b) => b.path === p.path) !== -1 ? i.items.push(l.removeFavorite) : i.items.push(l.markFavorite)) : (i.items.push(l.preview), i.items.push(l.download)), i.items.push(l.rename), p.mime_type === "application/zip" ? i.items.push(l.unarchive) : i.items.push(l.archive), i.items.push(l.delete), e.emitter.emit("vf-context-selected", [p])); + else !p && !c.value ? (i.items.push(l.refresh), i.items.push(l.selectAll), i.items.push(l.newfolder), e.emitter.emit("vf-context-selected", [])) : v.length > 1 && v.some((b) => b.path === p.path) ? (i.items.push(l.refresh), i.items.push(l.archive), i.items.push(l.delete), e.emitter.emit("vf-context-selected", v)) : (p.type === "dir" ? (i.items.push(l.open), e.pinnedFolders.findIndex((b) => b.path === p.path) !== -1 ? i.items.push(l.unpinFolder) : i.items.push(l.pinFolder)) : (i.items.push(l.preview), i.items.push(l.download)), i.items.push(l.rename), p.mime_type === "application/zip" ? i.items.push(l.unarchive) : i.items.push(l.archive), i.items.push(l.delete), e.emitter.emit("vf-context-selected", [p])); h(m); }), e.emitter.on("vf-contextmenu-hide", () => { i.active = !1; @@ -5018,9 +5035,9 @@ const Hn = { render: Im }, Nm = ["data-type", "data-item", "data-index"], $s = { const v = e.dragSelect.area.value, p = e.root.getBoundingClientRect(), b = v.getBoundingClientRect(); let y = m.clientX - p.left, x = m.clientY - p.top; i.active = !0, ft(() => { - var H; - const M = (H = r.value) == null ? void 0 : H.getBoundingClientRect(); - let k = (M == null ? void 0 : M.height) ?? 0, U = (M == null ? void 0 : M.width) ?? 0; + var B; + const A = (B = r.value) == null ? void 0 : B.getBoundingClientRect(); + let k = (A == null ? void 0 : A.height) ?? 0, U = (A == null ? void 0 : A.width) ?? 0; y = b.right - m.pageX + window.scrollX < U ? y - U : y, x = b.bottom - m.pageY + window.scrollY < k ? x - k : x, i.positions = { left: y + "px", top: x + "px" @@ -5046,66 +5063,66 @@ const Hn = { render: Im }, Nm = ["data-type", "data-item", "data-index"], $s = { onClick: v[0] || (v[0] = (b) => a(e).emitter.emit("vf-contextmenu-hide")) }, [ n("span", null, _(p.title()), 1) - ], 8, n1)) : (f(), g("div", { + ], 8, a1)) : (f(), g("div", { key: 1, class: "pl-2 pr-3 py-1.5", onClick: (b) => u(p) }, [ n("span", null, _(p.title()), 1) - ], 8, r1)) + ], 8, l1)) ]))), 128)) ], 4)), [ [ze, i.active] ]); } -}, l1 = { +}, c1 = { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", class: "h-5 w-5", viewBox: "0 0 24 24" -}, i1 = /* @__PURE__ */ n("path", { +}, d1 = /* @__PURE__ */ n("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), c1 = [ - i1 +}, null, -1), u1 = [ + d1 ]; -function d1(t, e) { - return f(), g("svg", l1, [...c1]); +function m1(t, e) { + return f(), g("svg", c1, [...u1]); } -const Bn = { render: d1 }, u1 = { +const Bn = { render: m1 }, f1 = { 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" -}, m1 = /* @__PURE__ */ n("path", { +}, h1 = /* @__PURE__ */ n("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), f1 = [ - m1 +}, null, -1), p1 = [ + h1 ]; -function h1(t, e) { - return f(), g("svg", u1, [...f1]); +function v1(t, e) { + return f(), g("svg", f1, [...p1]); } -const p1 = { render: h1 }, v1 = { class: "p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none grow-0" }, g1 = { class: "flex leading-5 items-center" }, _1 = ["aria-label"], b1 = ["value"], x1 = { class: "ml-3" }, y1 = { key: 0 }, w1 = { class: "ml-1" }, k1 = { class: "flex leading-5 items-center justify-end" }, $1 = ["disabled"], S1 = ["aria-label"], C1 = { +const g1 = { render: v1 }, _1 = { class: "p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none grow-0" }, b1 = { class: "flex leading-5 items-center" }, x1 = ["aria-label"], y1 = ["value"], w1 = { class: "ml-3" }, k1 = { key: 0 }, $1 = { class: "ml-1" }, S1 = { class: "flex leading-5 items-center justify-end" }, C1 = ["disabled"], E1 = ["aria-label"], T1 = { __name: "Statusbar", setup(t) { const e = ae("ServiceContainer"), { t: s } = e.i18n, { setStore: r } = e.storage, o = e.dragSelect, c = () => { e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.fs.adapter } }), r("adapter", e.fs.adapter); - }, i = T(""); + }, i = M(""); e.emitter.on("vf-search-query", ({ newQuery: l }) => { i.value = l; }); - const d = Je(() => { + const d = Ze(() => { const l = e.selectButton.multiple ? o.getSelected().length > 0 : o.getSelected().length === 1; return e.selectButton.active && l; }); - return (l, u) => (f(), g("div", v1, [ - n("div", g1, [ + return (l, u) => (f(), g("div", _1, [ + n("div", b1, [ n("div", { class: "mx-2", "aria-label": a(s)("Storage"), @@ -5113,29 +5130,29 @@ const p1 = { render: h1 }, v1 = { class: "p-1 text-xs border-t border-neutral-30 role: "tooltip" }, [ W(a(Bn)) - ], 8, _1), + ], 8, x1), ve(n("select", { "onUpdate:modelValue": u[0] || (u[0] = (h) => a(e).fs.adapter = h), onChange: c, class: "py-0.5 text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded pl-2 pr-8", tabindex: "-1" }, [ - (f(!0), g(he, null, $e(a(e).fs.data.storages, (h) => (f(), g("option", { value: h }, _(h), 9, b1))), 256)) + (f(!0), g(he, null, $e(a(e).fs.data.storages, (h) => (f(), g("option", { value: h }, _(h), 9, y1))), 256)) ], 544), [ [Ss, a(e).fs.adapter] ]), - n("div", x1, [ - i.value.length ? (f(), g("span", y1, _(a(e).fs.data.files.length) + " items found. ", 1)) : P("", !0), - n("span", w1, _(a(e).dragSelect.getCount() > 0 ? a(s)("%s item(s) selected.", a(e).dragSelect.getCount()) : ""), 1) + n("div", w1, [ + i.value.length ? (f(), g("span", k1, _(a(e).fs.data.files.length) + " items found. ", 1)) : P("", !0), + n("span", $1, _(a(e).dragSelect.getCount() > 0 ? a(s)("%s item(s) selected.", a(e).dragSelect.getCount()) : ""), 1) ]) ]), - n("div", k1, [ + n("div", S1, [ a(e).selectButton.active ? (f(), g("button", { key: 0, class: me(["vf-btn py-0 vf-btn-primary", { disabled: !d.value }]), disabled: !d.value, onClick: u[1] || (u[1] = (h) => a(e).selectButton.click(a(o).getSelected(), h)) - }, _(a(s)("Select")), 11, $1)) : P("", !0), + }, _(a(s)("Select")), 11, C1)) : P("", !0), n("span", { class: "mr-1", "aria-label": a(s)("About"), @@ -5143,27 +5160,27 @@ const p1 = { render: h1 }, v1 = { class: "p-1 text-xs border-t border-neutral-30 role: "tooltip", onClick: u[2] || (u[2] = (h) => a(e).modal.open(Mn)) }, [ - W(a(p1)) - ], 8, S1) + W(a(g1)) + ], 8, E1) ]) ])); } -}, E1 = { +}, M1 = { xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", class: "h-5 w-5", viewBox: "0 0 24 24" -}, T1 = /* @__PURE__ */ n("path", { +}, A1 = /* @__PURE__ */ n("path", { fill: "none", d: "M0 0h24v24H0z" -}, null, -1), M1 = /* @__PURE__ */ n("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), A1 = [ - T1, - M1 +}, null, -1), D1 = /* @__PURE__ */ n("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), L1 = [ + A1, + D1 ]; -function D1(t, e) { - return f(), g("svg", E1, [...A1]); +function V1(t, e) { + return f(), g("svg", M1, [...L1]); } -const L1 = { render: D1 }, V1 = { +const O1 = { render: V1 }, H1 = { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", @@ -5171,17 +5188,17 @@ const L1 = { render: D1 }, V1 = { "stroke-linejoin": "round", "stroke-width": "2", viewBox: "0 0 24 24" -}, O1 = /* @__PURE__ */ n("path", { +}, B1 = /* @__PURE__ */ n("path", { stroke: "none", d: "M0 0h24v24H0z" -}, null, -1), H1 = /* @__PURE__ */ n("path", { d: "M15 12H9M12 9v6" }, null, -1), B1 = [ - O1, - H1 +}, null, -1), R1 = /* @__PURE__ */ n("path", { d: "M15 12H9M12 9v6" }, null, -1), F1 = [ + B1, + R1 ]; -function R1(t, e) { - return f(), g("svg", V1, [...B1]); +function I1(t, e) { + return f(), g("svg", H1, [...F1]); } -const F1 = { render: R1 }, I1 = { +const N1 = { render: I1 }, U1 = { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", @@ -5189,22 +5206,22 @@ const F1 = { render: R1 }, I1 = { "stroke-linejoin": "round", "stroke-width": "2", viewBox: "0 0 24 24" -}, N1 = /* @__PURE__ */ n("path", { +}, z1 = /* @__PURE__ */ n("path", { stroke: "none", d: "M0 0h24v24H0z" -}, null, -1), U1 = /* @__PURE__ */ n("path", { d: "M9 12h6" }, null, -1), z1 = [ - N1, - U1 +}, null, -1), P1 = /* @__PURE__ */ n("path", { d: "M9 12h6" }, null, -1), j1 = [ + z1, + P1 ]; -function P1(t, e) { - return f(), g("svg", I1, [...z1]); +function q1(t, e) { + return f(), g("svg", U1, [...j1]); } -const j1 = { render: P1 }; +const G1 = { render: q1 }; function Rn(t, e) { const s = t.findIndex((r) => r.path === e.path); s > -1 ? t[s] = e : t.push(e); } -const q1 = { +const K1 = { key: 1, class: "cursor-pointer" }, Fn = { @@ -5226,7 +5243,7 @@ const q1 = { setup(t) { const e = t, s = ae("ServiceContainer"); s.i18n; - const r = Wn(t, "modelValue"), o = T(!1); + const r = Wn(t, "modelValue"), o = M(!1); function c() { return r.value = !r.value; } @@ -5261,12 +5278,12 @@ const q1 = { o.value ? (f(), X(a(lo), { key: 0, class: "p-1" - })) : (f(), g("div", q1, [ - r.value && ((h = i()) != null && h.folders.length) ? (f(), X(a(j1), { + })) : (f(), g("div", K1, [ + r.value && ((h = i()) != null && h.folders.length) ? (f(), X(a(G1), { key: 0, class: "text-gray-600" })) : P("", !0), - r.value ? P("", !0) : (f(), X(a(F1), { + r.value ? P("", !0) : (f(), X(a(N1), { key: 1, class: "text-gray-400" })) @@ -5274,24 +5291,24 @@ const q1 = { ]); }; } -}, G1 = { +}, W1 = { 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" -}, K1 = /* @__PURE__ */ n("path", { +}, Y1 = /* @__PURE__ */ n("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), W1 = [ - K1 +}, null, -1), X1 = [ + Y1 ]; -function Y1(t, e) { - return f(), g("svg", G1, [...W1]); +function J1(t, e) { + return f(), g("svg", W1, [...X1]); } -const X1 = { render: Y1 }, J1 = { class: "block" }, Q1 = { class: "flex hover:text-sky-700 dark:hover:text-sky-200/50 rounded" }, Z1 = { class: "h-5 w-5 shrink-0" }, ef = ["onClick"], tf = { class: "h-5 w-5 shrink-0" }, sf = { class: "text-nowrap" }, of = { class: "pl-4" }, nf = { +const Q1 = { render: J1 }, Z1 = { class: "block" }, ef = { class: "flex hover:text-sky-700 dark:hover:text-sky-200/50 rounded" }, tf = { class: "h-5 w-5 shrink-0" }, sf = ["onClick"], of = { class: "h-5 w-5 shrink-0" }, nf = { class: "text-nowrap" }, rf = { class: "pl-4" }, af = { __name: "TreeSubfolderList", props: { adapter: { @@ -5304,19 +5321,19 @@ const X1 = { render: Y1 }, J1 = { class: "block" }, Q1 = { class: "flex hover:te } }, setup(t) { - const e = ae("ServiceContainer"), s = T([]), r = t, o = Je(() => { + const e = ae("ServiceContainer"), s = M([]), r = t, o = Ze(() => { var c; return ((c = e.treeViewData.find((i) => i.path === r.path)) == null ? void 0 : c.folders) || []; }); return (c, i) => { const d = Yn("TreeSubfolderList", !0); - return f(), g("ul", J1, [ + return f(), g("ul", Z1, [ (f(!0), g(he, null, $e(o.value, (l, u) => (f(), g("li", { class: "flex flex-col space-x-0.5 py-0.5 text-sm", key: l.path }, [ - n("div", Q1, [ - n("div", Z1, [ + n("div", ef, [ + n("div", tf, [ W(Fn, { adapter: t.adapter, path: l.path, @@ -5328,13 +5345,13 @@ const X1 = { render: Y1 }, J1 = { class: "block" }, Q1 = { class: "flex hover:te class: "flex cursor-pointer", onClick: (h) => a(e).emitter.emit("vf-fetch", { params: { q: "index", adapter: r.adapter, path: l.path } }) }, [ - n("div", tf, [ - a(e).fs.path === l.path ? (f(), X(a(X1), { key: 0 })) : (f(), X(a(fs), { key: 1 })) + n("div", of, [ + a(e).fs.path === l.path ? (f(), X(a(Q1), { key: 0 })) : (f(), X(a(fs), { key: 1 })) ]), - n("div", sf, _(l.basename), 1) - ], 8, ef) + n("div", nf, _(l.basename), 1) + ], 8, sf) ]), - n("div", of, [ + n("div", rf, [ ve(W(d, { adapter: r.adapter, path: l.path @@ -5346,7 +5363,7 @@ const X1 = { render: Y1 }, J1 = { class: "block" }, Q1 = { class: "flex hover:te ]); }; } -}, rf = { class: "pt-1 px-1 uppercase font-bold text-gray-400 dark:text-gray-500 text-xs flex justify-between" }, af = { class: "h-5 w-5 shrink-0" }, lf = { class: "mr-3" }, cf = { +}, lf = { class: "pt-1 px-1 uppercase font-bold text-gray-400 dark:text-gray-500 text-xs flex justify-between" }, cf = { class: "h-5 w-5 shrink-0" }, df = { class: "mr-3" }, uf = { __name: "TreeStorageItem", props: { storage: { @@ -5355,21 +5372,21 @@ const X1 = { render: Y1 }, J1 = { class: "block" }, Q1 = { class: "flex hover:te } }, setup(t) { - const e = ae("ServiceContainer"), s = T(!1), r = (o) => { + const e = ae("ServiceContainer"), s = M(!1), r = (o) => { e.fs.adapter = o, e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: o } }), e.storage.setStore("adapter", o); }; return (o, c) => (f(), g(he, null, [ - n("div", rf, [ + n("div", lf, [ n("div", { class: me(["flex flex-1 space-x-1 items-center cursor-pointer", t.storage === a(e).fs.adapter ? "text-gray-700/80 dark:text-gray-300/80 text-bold" : ""]), onClick: c[0] || (c[0] = (i) => r(t.storage)) }, [ - n("div", af, [ + n("div", cf, [ W(a(Bn)) ]), n("div", null, _(t.storage), 1) ], 2), - n("div", lf, [ + n("div", df, [ W(Fn, { adapter: t.storage, path: t.storage + "://", @@ -5378,7 +5395,7 @@ const X1 = { render: Y1 }, J1 = { class: "block" }, Q1 = { class: "flex hover:te }, null, 8, ["adapter", "path", "modelValue"]) ]) ]), - ve(W(nf, { + ve(W(af, { adapter: t.storage, path: t.storage + "://" }, null, 8, ["adapter", "path"]), [ @@ -5386,10 +5403,10 @@ const X1 = { render: Y1 }, J1 = { class: "block" }, Q1 = { class: "flex hover:te ]) ], 64)); } -}, df = { class: "p-1 uppercase font-bold text-gray-400 dark:text-gray-400 text-xs flex items-center space-x-1" }, uf = { class: "block" }, mf = { class: "flex pl-2 py-0.5 text-sm space-x-2" }, ff = ["onClick"], hf = ["title"], pf = ["onClick"], vf = { key: 0 }, gf = { class: "rounded-lg p-1 bg-gray-100 dark:bg-gray-700 text-xs text-center" }, _f = { +}, mf = { class: "p-1 uppercase font-bold text-gray-400 dark:text-gray-400 text-xs flex items-center space-x-1" }, ff = { class: "block" }, hf = { class: "flex pl-2 py-0.5 text-sm space-x-2" }, pf = ["onClick"], vf = ["title"], gf = ["onClick"], _f = { key: 0 }, bf = { class: "rounded-lg p-1 bg-gray-100 dark:bg-gray-700 text-xs text-center" }, xf = { __name: "TreeView", setup(t) { - const e = ae("ServiceContainer"), { t: s } = e.i18n, r = T(190), o = (d) => { + const e = ae("ServiceContainer"), { t: s } = e.i18n, r = M(190), o = (d) => { e.pinnedFolders = e.pinnedFolders.filter((l) => l.path !== d.path), e.storage.setStore("pinned-folders", e.pinnedFolders); }, c = (d) => { const l = d.clientX, u = d.target.parentElement, h = u.getBoundingClientRect().width; @@ -5401,10 +5418,10 @@ const X1 = { render: Y1 }, J1 = { class: "block" }, Q1 = { class: "flex hover:te r.value = p.width, u.classList.add("transition-[width]"), u.classList.remove("transition-none"), window.removeEventListener("mousemove", m), window.removeEventListener("mouseup", v); }; window.addEventListener("mousemove", m), window.addEventListener("mouseup", v); - }, i = T(null); + }, i = M(null); return Ce(() => { - it(i.value, {}); - }), mt(e.fs.data, (d, l) => { + ct(i.value, {}); + }), Je(e.fs.data, (d, l) => { const u = d.files.filter((h) => h.type === "dir"); Rn(e.treeViewData, { path: e.fs.path, folders: u.map((h) => ({ adapter: h.storage, @@ -5425,14 +5442,14 @@ const X1 = { render: Y1 }, J1 = { class: "block" }, Q1 = { class: "flex hover:te ref: i, class: "h-full border-r dark:border-gray-600/50 pb-4" }, [ - n("div", df, [ + n("div", mf, [ n("div", null, [ W(a(Hn), { class: "text-amber-600" }) ]), n("div", null, _(a(s)("Pinned Folders")), 1) ]), - n("ul", uf, [ - (f(!0), g(he, null, $e(a(e).pinnedFolders, (u) => (f(), g("li", mf, [ + n("ul", ff, [ + (f(!0), g(he, null, $e(a(e).pinnedFolders, (u) => (f(), g("li", hf, [ n("div", { class: "flex hover:text-sky-500 dark:hover:text-sky-200/50 rounded cursor-pointer", onClick: (h) => a(e).emitter.emit("vf-fetch", { params: { q: "index", adapter: u.storage, path: u.path } }) @@ -5440,21 +5457,21 @@ const X1 = { render: Y1 }, J1 = { class: "block" }, Q1 = { class: "flex hover:te W(a(fs), { class: "h-5 w-5" }), n("div", { title: u.path - }, _(u.basename), 9, hf) - ], 8, ff), + }, _(u.basename), 9, vf) + ], 8, pf), n("div", { class: "cursor-pointer", onClick: (h) => o(u) }, [ - W(a(L1), { class: "p-0.5 text-gray-200 hover:text-gray-400 dark:text-gray-600 hover:dark:text-gray-400" }) - ], 8, pf) + W(a(O1), { class: "p-0.5 text-gray-200 hover:text-gray-400 dark:text-gray-600 hover:dark:text-gray-400" }) + ], 8, gf) ]))), 256)), - a(e).pinnedFolders.length ? P("", !0) : (f(), g("li", vf, [ - n("div", gf, _(a(s)("No folders pinned")), 1) + a(e).pinnedFolders.length ? P("", !0) : (f(), g("li", _f, [ + n("div", bf, _(a(s)("No folders pinned")), 1) ])) ]), (f(!0), g(he, null, $e(a(e).fs.data.storages, (u) => (f(), g("div", null, [ - W(cf, { storage: u }, null, 8, ["storage"]) + W(uf, { storage: u }, null, 8, ["storage"]) ]))), 256)) ], 512), n("div", { @@ -5464,7 +5481,7 @@ const X1 = { render: Y1 }, J1 = { class: "block" }, Q1 = { class: "flex hover:te ], 4) ], 64)); } -}, bf = { class: "relative flex overflow-hidden h-full" }, xf = { +}, yf = { class: "relative flex overflow-hidden h-full" }, wf = { __name: "VueFinder", props: { id: { @@ -5540,10 +5557,10 @@ const X1 = { render: Y1 }, J1 = { class: "block" }, Q1 = { class: "flex hover:te setup(t, { emit: e }) { const s = e, o = _a(t, ae("VueFinderOptions")); Xn("ServiceContainer", o); - const { setStore: c } = o.storage, i = T(null); + const { setStore: c } = o.storage, i = M(null); o.root = i; const d = o.dragSelect; - fi(o); + pi(o); const l = (h) => { Object.assign(o.fs.data, h), d.clearSelection(), d.refreshSelection(); }; @@ -5587,13 +5604,13 @@ const X1 = { render: Y1 }, J1 = { class: "block" }, Q1 = { class: "flex hover:te onMousedown: m[0] || (m[0] = (v) => a(o).emitter.emit("vf-contextmenu-hide")), onTouchstart: m[1] || (m[1] = (v) => a(o).emitter.emit("vf-contextmenu-hide")) }, [ - W(Kd), - W(w0), - n("div", bf, [ - W(_f), - W(o1) + W(Yd), + W($0), + n("div", yf, [ + W(xf), + W(r1) ]), - W(C1) + W(T1) ], 38), W(Jn, { name: "fade" }, { default: se(() => [ @@ -5601,11 +5618,11 @@ const X1 = { render: Y1 }, J1 = { class: "block" }, Q1 = { class: "flex hover:te ]), _: 1 }), - W(a1) + W(i1) ], 2) ], 512)); } -}, Lf = { +}, Of = { /** * @param {import('vue').App} app * @param options @@ -5613,9 +5630,9 @@ const X1 = { render: Y1 }, J1 = { class: "block" }, Q1 = { class: "flex hover:te install(t, e = {}) { e.i18n = e.i18n ?? {}; let [s] = Object.keys(e.i18n); - e.locale = e.locale ?? s ?? "en", t.provide("VueFinderOptions", e), t.component("VueFinder", xf); + e.locale = e.locale ?? s ?? "en", t.provide("VueFinderOptions", e), t.component("VueFinder", wf); } }; export { - Lf as default + Of as default }; diff --git a/package.json b/package.json index 791149c0..77903991 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vuefinder", - "version": "2.5.2", + "version": "2.5.3", "description": "Vuefinder is a file manager component for vuejs.", "type": "module", "files": [