Files
nextcloud-server-mirror/dist/files-main.mjs
2026-10-07 08:58:40 +00:00

4 lines
41 KiB
JavaScript

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('', '', 'dist/FilesList-BC8r-ikH.chunk.mjs'),window.OC.filePath('', '', 'dist/index-UXL_i2di.chunk.mjs'),window.OC.filePath('', '', 'dist/star-outline-BpDZzOb8.chunk.mjs'),window.OC.filePath('', '', 'dist/AlertCircleOutline-jA3ki2Uu.chunk.mjs'),window.OC.filePath('', '', 'dist/TrayArrowDown-vMg8Cl05.chunk.mjs'),window.OC.filePath('', '', 'dist/PencilOutline-C4ZkKkas.chunk.mjs'),window.OC.filePath('', '', 'dist/translations-pLZlvQeM.chunk.mjs'),window.OC.filePath('', '', 'dist/Web-BMG0zIln.chunk.mjs'),window.OC.filePath('', '', 'dist/_l10n-CK24vgHE.chunk.mjs'),window.OC.filePath('', '', 'dist/File-xDTWu8L0.chunk.mjs'),window.OC.filePath('', '', 'dist/Link-CUdpEe-t.chunk.mjs'),window.OC.filePath('', '', 'dist/formatRelative-uuSCBZ1C.chunk.mjs'),window.OC.filePath('', '', 'dist/common-Link-3plNpBrB.chunk.css'),window.OC.filePath('', '', 'dist/ArrowRight-COu6qSN5.chunk.mjs'),window.OC.filePath('', '', 'dist/common-ArrowRight-C_oBIsvc.chunk.css'),window.OC.filePath('', '', 'dist/Check-CEU1oy_I.chunk.mjs'),window.OC.filePath('', '', 'dist/common-Check-BYHcrfvW.chunk.css'),window.OC.filePath('', '', 'dist/NcModal-BxLzaUZK.chunk.mjs'),window.OC.filePath('', '', 'dist/MapMarkerOutline-Ip3bQdll.chunk.mjs'),window.OC.filePath('', '', 'dist/livePhotoUtils-CVUhgL4S.chunk.mjs'),window.OC.filePath('', '', 'dist/index-D6fZh9CR.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcModal-Cclh_O_-.chunk.css'),window.OC.filePath('', '', 'dist/common-AlertCircleOutline-B7Bbzm8f.chunk.css'),window.OC.filePath('', '', 'dist/cancel-DDzvQ-HX.chunk.mjs'),window.OC.filePath('', '', 'dist/common-cancel-BWNFKLbC.chunk.css'),window.OC.filePath('', '', 'dist/index-D_oRcFiB.chunk.mjs'),window.OC.filePath('', '', 'dist/externalStorageUtils-mlnj1LcU.chunk.mjs'),window.OC.filePath('', '', 'dist/NcUploadPicker-Cla8uJJV.chunk.mjs'),window.OC.filePath('', '', 'dist/index-DHyMMYTN.chunk.mjs'),window.OC.filePath('', '', 'dist/index-GqSDnl3c.chunk.mjs'),window.OC.filePath('', '', 'dist/dav-BNCa0U-Z.chunk.mjs'),window.OC.filePath('', '', 'dist/NcActionButton-BvGszxyz.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcActionButton-BQBDvDX2.chunk.css'),window.OC.filePath('', '', 'dist/index-DKxdOjOX.chunk.mjs'),window.OC.filePath('', '', 'dist/common-index-DExoDmi9.chunk.css'),window.OC.filePath('', '', 'dist/NcProgressBar-Dixhlp8F.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcProgressBar-DiAmXTz0.chunk.css'),window.OC.filePath('', '', 'dist/common-NcUploadPicker-fC_XTit7.chunk.css'),window.OC.filePath('', '', 'dist/Folder-BcToKSIM.chunk.mjs'),window.OC.filePath('', '', 'dist/NcAppContent-WuNJWVSm.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcAppContent-Cl3uhtpo.chunk.css'),window.OC.filePath('', '', 'dist/MenuUp-DiApqAR0.chunk.mjs'),window.OC.filePath('', '', 'dist/common-MenuUp-Don1d5Bd.chunk.css'),window.OC.filePath('', '', 'dist/information-outline-CUvhpCqf.chunk.mjs'),window.OC.filePath('', '', 'dist/NcActionLink-DvEArNRM.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcActionLink-iJnZg6ii.chunk.css'),window.OC.filePath('', '', 'dist/NcActionRouter-X9XmAaxE.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcActionRouter-C1KErZDl.chunk.css'),window.OC.filePath('', '', 'dist/common-information-outline-cz7E3Mo9.chunk.css'),window.OC.filePath('', '', 'dist/hashUtils-BlT4ancg.chunk.mjs'),window.OC.filePath('', '', 'dist/folder-multiple-outline-BhxDilQg.chunk.mjs'),window.OC.filePath('', '', 'dist/common-folder-multiple-outline-C8MZXt0T.chunk.css'),window.OC.filePath('', '', 'dist/DialogConfirmFileHidden-Cse3N_TB.chunk.mjs'),window.OC.filePath('', '', 'dist/logger-BJoaV_Xz.chunk.mjs'),window.OC.filePath('', '', 'dist/index-BEQt8xTG.chunk.mjs'),window.OC.filePath('', '', 'dist/NcCheckboxRadioSwitch-BgZXg73g.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcCheckboxRadioSwitch-BAaFbykd.chunk.css'),window.OC.filePath('', '', 'dist/common-DialogConfirmFileHidden-D2N3kGNe.chunk.css'),window.OC.filePath('', '', 'dist/NcHighlight.vue_vue_type_script_lang-CT7Xx-zK.chunk.mjs'),window.OC.filePath('', '', 'dist/NcInputField-wKF2DDSn.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcInputField-B5YBBomo.chunk.css'),window.OC.filePath('', '', 'dist/common-hashUtils-CmYx6QzA.chunk.css'),window.OC.filePath('', '', 'dist/star-Dwot5QHD.chunk.mjs'),window.OC.filePath('', '', 'dist/common-star-pXJ_-D_I.chunk.css'),window.OC.filePath('', '', 'dist/NcAvatar-RT0QIft7.chunk.mjs'),window.OC.filePath('', '', 'dist/autolink-D1sObkXs.chunk.mjs'),window.OC.filePath('', '', 'dist/common-autolink-B8CEsDGb.chunk.css'),window.OC.filePath('', '', 'dist/colors-B1T-jIOW.chunk.mjs'),window.OC.filePath('', '', 'dist/NcUserStatusIcon-CWV4DI9J.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcUserStatusIcon-Bq_6hmXG.chunk.css'),window.OC.filePath('', '', 'dist/NcActionText-BWO7oBCL.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcActionText-BzbAkUEn.chunk.css'),window.OC.filePath('', '', 'dist/common-NcAvatar-o8Woel4F.chunk.css'),window.OC.filePath('', '', 'dist/setup-HgSWUfgd.chunk.mjs'),window.OC.filePath('', '', 'dist/NcTextArea-DqJyrYiA.chunk.mjs'),window.OC.filePath('', '', 'dist/NcContent-CIX5Zf8v.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcContent-BJOvx5pm.chunk.css'),window.OC.filePath('', '', 'dist/index-BJ-wBpMs.chunk.mjs'),window.OC.filePath('', '', 'dist/common-index-CRfKBhKV.chunk.css'),window.OC.filePath('', '', 'dist/statusOptionsService-ChGCgh7H.chunk.mjs'),window.OC.filePath('', '', 'dist/common-statusOptionsService-BEbvWlY3.chunk.css'),window.OC.filePath('', '', 'dist/common-NcTextArea-CjZPRAaW.chunk.css'),window.OC.filePath('', '', 'dist/history-D6oDzA1t.chunk.mjs'),window.OC.filePath('', '', 'dist/common-history-f2DD9EAL.chunk.css'),window.OC.filePath('', '', 'dist/NcActionCheckbox-Co6zJ6Hf.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcActionCheckbox-B5qjGanw.chunk.css'),window.OC.filePath('', '', 'dist/NcActionInput-CEGC-U_1.chunk.mjs'),window.OC.filePath('', '', 'dist/NcDateTimePickerNative-Df5ELjq1.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcDateTimePickerNative-ogFF6WN4.chunk.css'),window.OC.filePath('', '', 'dist/NcPasswordField-DgVaELPd.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcPasswordField-Crp_EMfV.chunk.css'),window.OC.filePath('', '', 'dist/common-NcActionInput-BajPb93V.chunk.css'),window.OC.filePath('', '', 'dist/NcChip-cyGdYKyD.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcChip-Som-mR4B.chunk.css'),window.OC.filePath('', '', 'dist/index-JFK8X6kZ.chunk.mjs'),window.OC.filePath('', '', 'dist/common-index-bfXBK-tQ.chunk.css'),window.OC.filePath('', '', 'dist/NcDashboardWidget-a5Hnwaiz.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcDashboardWidget-Cd52qQOs.chunk.css'),window.OC.filePath('', '', 'dist/zh-TW-cfs3YkM4.chunk.mjs'),window.OC.filePath('', '', 'dist/common-zh-TW-DBPTxogX.chunk.css'),window.OC.filePath('', '', 'dist/NcEmojiPicker-D7HkUvA6.chunk.mjs'),window.OC.filePath('', '', 'dist/emoji-Cbe4MxhY.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcEmojiPicker-ChsL0oK6.chunk.css'),window.OC.filePath('', '', 'dist/NcFormBox-BeUjBkqH.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcFormBox-BBWqHlxP.chunk.css'),window.OC.filePath('', '', 'dist/NcRichText-BQgo5yW3.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcRichText-DVtX8ulO.chunk.css'),window.OC.filePath('', '', 'dist/LoginFlowDone-Bb0f_UR0.chunk.mjs'),window.OC.filePath('', '', 'dist/common-LoginFlowDone-DTe3ag8_.chunk.css'),window.OC.filePath('', '', 'dist/CogOutline-u_yQZWjI.chunk.mjs'),window.OC.filePath('', '', 'dist/common-CogOutline-AHEjHWRN.chunk.css'),window.OC.filePath('', '', 'dist/NcProfileHoverCard-RZrrM7IM.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcProfileHoverCard-ONd1A-xb.chunk.css'),window.OC.filePath('', '', 'dist/index-BueGcLEj.chunk.mjs'),window.OC.filePath('', '', 'dist/index-DDsCA2or.chunk.mjs'),window.OC.filePath('', '', 'dist/common-index-Bkq_iXjX.chunk.css'),window.OC.filePath('', '', 'dist/common-index-DBjOe6uk.chunk.css'),window.OC.filePath('', '', 'dist/NcSelectTags-DyK-4P4O.chunk.mjs'),window.OC.filePath('', '', 'dist/NcSettingsSection-DeN6Lle1.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcSettingsSection-D7mIRwIy.chunk.css'),window.OC.filePath('', '', 'dist/common-setup-ogg5oxMj.chunk.css'),window.OC.filePath('', '', 'dist/index-DJ32j2fv.chunk.mjs'),window.OC.filePath('', '', 'dist/modulepreload-polyfill-BxzAKjcf.chunk.mjs'),window.OC.filePath('', '', 'dist/files-FilesList-5SRl2xN6.chunk.css')])))=>i.map(i=>d[i]);
import{f as Y,l as pe,a as Z,c as ee,j as We,i as Ve,_ as je}from"./star-outline-BpDZzOb8.chunk.mjs";import{e as h,o as m,k as g,I as ce,w as f,l as R,t as V,u as e,r as B,z as G,p as u,E as Ne,C as Qe,Q as He,n as N,ah as Je,F as oe,f as b,G as E,H as M,i as v,q,X as qe,v as te,h as A,Z as Ke,S as Xe,aa as Ye,j as Se,am as Ae,D as Fe,m as Ze,J as $e,y as Be,a7 as et,a0 as tt,a3 as it,x as at,M as fe,A as lt,a8 as ot,a9 as st,a as rt}from"./PencilOutline-C4ZkKkas.chunk.mjs";import{N as nt}from"./NcContent-CIX5Zf8v.chunk.mjs";import{s as $,e as xe,u as W}from"./index-D6fZh9CR.chunk.mjs";import{c as Le,n as se,o as ut}from"./index-D_oRcFiB.chunk.mjs";import{g as Oe,b as Re,t as d}from"./translations-pLZlvQeM.chunk.mjs";import{a as re,e as dt,N as pt,f as me,g as ct,h as ft,i as P,j as mt,k as j,l as vt,m as gt}from"./NcTextArea-DqJyrYiA.chunk.mjs";import{N as _t,I as ht}from"./CogOutline-u_yQZWjI.chunk.mjs";import{N as O}from"./ArrowRight-COu6qSN5.chunk.mjs";import{h as yt,n as L,u as bt,V as I,a as ie,l as wt,b as ne,c as ge,f as kt}from"./DialogConfirmFileHidden-Cse3N_TB.chunk.mjs";import{a as Ge}from"./livePhotoUtils-CVUhgL4S.chunk.mjs";import{c as Ue}from"./index-DHyMMYTN.chunk.mjs";import{aj as Ct,o as _e,ak as he,M as Vt,f as Nt}from"./Link-CUdpEe-t.chunk.mjs";import{N as ye}from"./NcActionButton-BvGszxyz.chunk.mjs";import{a as qt,u as H}from"./NcModal-BxLzaUZK.chunk.mjs";import{b as K,e as St}from"./index-UXL_i2di.chunk.mjs";import{N as be}from"./externalStorageUtils-mlnj1LcU.chunk.mjs";import{f as we}from"./cancel-DDzvQ-HX.chunk.mjs";import{N as At}from"./NcProgressBar-Dixhlp8F.chunk.mjs";import{l as _}from"./logger-BJoaV_Xz.chunk.mjs";import{c as Ft}from"./index-DJ32j2fv.chunk.mjs";import{N as z}from"./NcFormBox-BeUjBkqH.chunk.mjs";import{a as $t,I as Bt,u as xt}from"./NcCheckboxRadioSwitch-BgZXg73g.chunk.mjs";import{c as De}from"./Web-BMG0zIln.chunk.mjs";import{u as Lt}from"./NcRichText-BQgo5yW3.chunk.mjs";import{w as Ot}from"./TrayArrowDown-vMg8Cl05.chunk.mjs";import{u as ue,F as Rt,s as Gt,a as Ut}from"./setup-HgSWUfgd.chunk.mjs";import{a as Ie}from"./Folder-BcToKSIM.chunk.mjs";import{c as Dt,a as It,s as Et}from"./File-xDTWu8L0.chunk.mjs";import{p as X}from"./index-BEQt8xTG.chunk.mjs";import"./modulepreload-polyfill-BxzAKjcf.chunk.mjs";import"./_l10n-CK24vgHE.chunk.mjs";import"./formatRelative-uuSCBZ1C.chunk.mjs";import"./index-BJ-wBpMs.chunk.mjs";import"./NcHighlight.vue_vue_type_script_lang-CT7Xx-zK.chunk.mjs";import"./NcInputField-wKF2DDSn.chunk.mjs";import"./Check-CEU1oy_I.chunk.mjs";import"./statusOptionsService-ChGCgh7H.chunk.mjs";import"./AlertCircleOutline-jA3ki2Uu.chunk.mjs";import"./NcAppContent-WuNJWVSm.chunk.mjs";import"./MapMarkerOutline-Ip3bQdll.chunk.mjs";import"./NcAvatar-RT0QIft7.chunk.mjs";import"./autolink-D1sObkXs.chunk.mjs";import"./colors-B1T-jIOW.chunk.mjs";import"./NcUserStatusIcon-CWV4DI9J.chunk.mjs";import"./NcActionLink-DvEArNRM.chunk.mjs";import"./NcActionRouter-X9XmAaxE.chunk.mjs";import"./NcActionText-BWO7oBCL.chunk.mjs";import"./MenuUp-DiApqAR0.chunk.mjs";import"./index-GqSDnl3c.chunk.mjs";import"./dav-BNCa0U-Z.chunk.mjs";import"./history-D6oDzA1t.chunk.mjs";import"./index-DKxdOjOX.chunk.mjs";import"./NcActionCheckbox-Co6zJ6Hf.chunk.mjs";import"./NcActionInput-CEGC-U_1.chunk.mjs";import"./NcDateTimePickerNative-Df5ELjq1.chunk.mjs";import"./NcPasswordField-DgVaELPd.chunk.mjs";import"./star-Dwot5QHD.chunk.mjs";import"./information-outline-CUvhpCqf.chunk.mjs";import"./NcChip-cyGdYKyD.chunk.mjs";import"./index-JFK8X6kZ.chunk.mjs";import"./NcDashboardWidget-a5Hnwaiz.chunk.mjs";import"./zh-TW-cfs3YkM4.chunk.mjs";import"./NcEmojiPicker-D7HkUvA6.chunk.mjs";import"./emoji-Cbe4MxhY.chunk.mjs";import"./NcUploadPicker-Cla8uJJV.chunk.mjs";import"./LoginFlowDone-Bb0f_UR0.chunk.mjs";import"./folder-multiple-outline-BhxDilQg.chunk.mjs";import"./NcProfileHoverCard-RZrrM7IM.chunk.mjs";import"./index-BueGcLEj.chunk.mjs";import"./index-DDsCA2or.chunk.mjs";import"./NcSelectTags-DyK-4P4O.chunk.mjs";import"./NcSettingsSection-DeN6Lle1.chunk.mjs";const Mt={class:"hidden-visually"},Pt=h({__name:"NcFormBoxCopyButton",props:{label:{default:()=>{}},value:{},disabled:{type:Boolean,default:!1}},emits:["copy"],setup(i,{emit:t}){const a=t,{isCopied:l,copy:o,icon:s,altText:n}=Lt(()=>i.value);return Ot(l,()=>a("copy")),(r,p)=>(m(),g(re,{disabled:i.disabled,invertedAccent:"",onClick:e(o)},ce({description:f(()=>[G(V(i.value),1)]),icon:f(()=>[u(O,{path:e(s),inline:""},null,8,["path"])]),_:2},[r.$slots.default||i.label?{name:"default",fn:f(()=>[R("span",Mt,V(e(n)),1),B(r.$slots,"default",{},()=>[G(V(i.label),1)])]),key:"0"}:void 0]),1032,["disabled","onClick"]))}}),zt=["id","aria-describedby","disabled"],Tt=h({__name:"NcFormBoxSwitch",props:oe({label:{default:()=>{}},description:{default:()=>{}},disabled:{type:Boolean,default:!1}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:oe(["enable","disable"],["update:modelValue"]),setup(i,{emit:t}){const a=Ne(i,"modelValue"),l=t,o=De();return Qe(a,()=>{a.value?l("enable"):l("disable")},{flush:"sync"}),(s,n)=>(m(),g(dt,{tag:"label",for:e(o)},ce({icon:f(({descriptionId:r})=>[He(R("input",{id:e(o),"onUpdate:modelValue":n[0]||(n[0]=p=>a.value=p),class:N(s.$style.formBoxSwitch__input),type:"checkbox",role:"switch","aria-describedby":r,disabled:i.disabled},null,10,zt),[[Je,a.value]]),u($t,{checked:a.value,inline:""},null,8,["checked"])]),_:2},[s.$slots.default||i.label?{name:"default",fn:f(()=>[B(s.$slots,"default",{},()=>[G(V(i.label),1)])]),key:"0"}:void 0,s.$slots.description||i.description?{name:"description",fn:f(()=>[B(s.$slots,"description",{},()=>[G(V(i.description),1)])]),key:"1"}:void 0]),1032,["for"]))}}),Wt="_formBoxSwitch__input_oY7zN",jt={"material-design-icon":"_material-design-icon_Xz4ev",formBoxSwitch__input:Wt},Qt={$style:jt},S=Y(Tt,[["__cssModules",Qt]]),Ht="⚠️ NcHotKey must have a label or slot content",Jt=h({__name:"NcHotkey",props:{label:{default:()=>{}},hotkey:{default:()=>{}}},setup(i){const t=v(()=>i.hotkey?.split(/\s+/).map(a=>a.trim()));return(a,l)=>(m(),b("li",{class:N(a.$style.hotkey)},[R("span",{role:"term",class:N(a.$style.hotkey__keys)},[B(a.$slots,"hotkey",{},()=>[(m(!0),b(E,null,M(t.value,(o,s)=>(m(),g(_t,{key:s,symbol:o},null,8,["symbol"]))),128))])],2),R("span",{role:"definition",class:N(a.$style.hotkey__label)},[B(a.$slots,"default",{},()=>[G(V(i.label||Ht),1)])],2)],2))}}),Kt="_hotkey_W5WOO",Xt="_hotkey__label_UJqDg",Yt="_hotkey__keys_DhshL",Zt={"material-design-icon":"_material-design-icon_b8Jeb",hotkey:Kt,hotkey__label:Xt,hotkey__keys:Yt},ei={$style:Zt},k=Y(Jt,[["__cssModules",ei]]),ti=h({__name:"NcRadioGroup",props:oe({label:{},labelHidden:{type:Boolean},hideLabel:{type:Boolean},description:{}},{modelValue:{required:!1,default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(i){const t=Ne(i,"modelValue"),a=q();qe(Bt,v(()=>({register:l,modelValue:t.value,onUpdate:o})));function l(s){a.value!==void 0&&a.value,a.value=s}function o(s){t.value=s}return(s,n)=>(m(),g(pt,{label:i.label,description:i.description,hideLabel:i.labelHidden||i.hideLabel},{default:f(()=>[a.value?(m(),g(z,{key:0,row:""},{default:f(()=>[B(s.$slots,"default")]),_:3})):(m(),b("span",{key:1,class:N(s.$style.radioGroup_checkboxRadioContainer)},[B(s.$slots,"default")],2))]),_:3},8,["label","description","hideLabel"]))}}),ii="_radioGroup_checkboxRadioContainer_JW-uf",ai={"material-design-icon":"_material-design-icon_KFY-h",radioGroup_checkboxRadioContainer:ii},li={$style:ai},oi=Y(ti,[["__cssModules",li]]),si=["id"],ri=["aria-labelledby","aria-label","checked","disabled","value"],ni=h({__name:"NcRadioGroupButton",props:{ariaLabel:{},label:{},value:{},disabled:{type:Boolean}},setup(i){const t=i,a=De(),l=xt(),{formBoxItemClass:o}=Ct();te(()=>l.value.register(!0));const s=v(()=>l?.value.modelValue===t.value);function n(){t.disabled||l.value.onUpdate(t.value)}return(r,p)=>(m(),b("div",{class:N([{[r.$style.radioGroupButton_active]:s.value,[r.$style.radioGroupButton_disabled]:i.disabled},r.$style.radioGroupButton,e(o)]),onClick:n},[r.$slots.icon?(m(),b("div",{key:0,class:N(r.$style.radioGroupButton__icon)},[B(r.$slots,"icon")],2)):A("",!0),i.label?(m(),b("div",{key:1,id:e(a),class:N(r.$style.radioGroupButton__label)},V(i.label),11,si)):A("",!0),R("input",{"aria-labelledby":i.label?e(a):void 0,"aria-label":i.label?void 0:i.ariaLabel,class:"hidden-visually",checked:s.value,type:"radio",disabled:i.disabled,value:i.value,onInput:n},null,40,ri)],2))}}),ui="_radioGroupButton_zvINB",di="_radioGroupButton__label_bAKze",pi="_radioGroupButton__icon_DB-zg",ci="_radioGroupButton_disabled_Acqgc",fi="_radioGroupButton_active_EEJX-",mi={"material-design-icon":"_material-design-icon_WI1tJ",radioGroupButton:ui,radioGroupButton__label:di,radioGroupButton__icon:pi,radioGroupButton_disabled:ci,radioGroupButton_active:fi},vi={$style:mi},ke=Y(ni,[["__cssModules",vi]]),J=Ke([]),gi=v(()=>J.value?.filter(i=>!i.hidden)??[]);let Ce=!1;function Ee(){if(!Ce){const i=Le();i.addEventListener("update",()=>{J.value=[...i.views]}),J.value=[...i.views],Ce=!0}return J}function Me(){return Ee(),gi}const _i=pe("files","viewConfigs",{}),hi=Xe("viewconfig",()=>{const i=q({..._i});function t(n){return i.value[n]||{}}function a(n,r,p){n in i.value||(i.value[n]={}),i.value[n][r]=p}async function l(n,r,p){Ge()!==null&&await Ue.put(Z("/apps/files/api/v1/views"),{value:p,view:n,key:r}),xe("files:view-config:updated",{view:n,key:r,value:p})}function o(n="basename",r="files"){l(r,"sorting_mode",n),l(r,"sorting_direction","asc")}function s(n="files"){const r=(i.value[n]||{sorting_direction:"asc"}).sorting_direction==="asc"?"desc":"asc";l(n,"sorting_direction",r)}return $("files:view-config:updated",({view:n,key:r,value:p})=>a(n,r,p)),{viewConfigs:i,getConfig:t,setSortingBy:o,toggleSortingDirection:s,update:l}}),yi=Intl.Collator([Oe(),Re()],{numeric:!0,usage:"sort"}),bi=h({__name:"FilesNavigationListItem",props:{view:{},level:{default:0}},setup(i){const t=i,a=6,l=hi(),o=v(()=>l.viewConfigs[t.view.id]),s=v(()=>o.value?o.value.expanded===!0:t.view.expanded===!0),n=Me(),r=v(()=>{if(t.level<a)return n.value.filter(C=>C.parent===t.view.id);return n.value.filter(C=>y(C,t.view.id));function y(C,T){if(C.parent){if(C.parent===T)return!0}else return!1;const D=n.value.find(Te=>Te.id===C.parent);return!!D&&y(D,T)}}),p=v(()=>r.value.slice().sort((y,C)=>y.order!==void 0&&C.order===void 0?-1:y.order===void 0&&C.order!==void 0?1:yi.compare(y.name,C.name))),c=v(()=>r.value.length>0),F=Ye("currentNavigationView",q(void 0)),w=v(()=>F.value===t.view.id),x=v(()=>{if(t.view.params){const{dir:y}=t.view.params;return{name:"filelist",params:{...t.view.params},query:{dir:y}}}return{name:"filelist",params:{view:t.view.id}}}),U=q(!1),ae=q(!1);te(()=>{s.value&&!c.value&&ve()});async function ze(y){o.value?o.value.expanded=y:y&&(l.viewConfigs[t.view.id]={expanded:!0}),t.view.id.startsWith(`${yt}::`)||l.update(t.view.id,"expanded",y),y&&await ve()}async function ve(){if(t.view.loadChildViews&&!ae.value){U.value=!0;try{await t.view.loadChildViews(t.view),ae.value=!0}finally{U.value=!1}}}return(y,C)=>{const T=Se("FilesNavigationListItem",!0);return m(),g(e(me),{class:"files-navigation__item","data-cy-files-navigation-item":i.view.id,active:w.value,allowCollapse:"",loading:U.value,name:i.view.name,open:s.value,pinned:i.view.sticky,to:x.value,"onUpdate:open":ze},ce({_:2},[i.view.icon?{name:"icon",fn:f(()=>[u(e(O),{svg:i.view.icon},null,8,["svg"])]),key:"0"}:void 0,c.value||!ae.value&&i.view.loadChildViews?{name:"default",fn:f(()=>[(m(!0),b(E,null,M(p.value,D=>(m(),g(T,{key:D.id,level:i.level+1,view:D},null,8,["level","view"]))),128))]),key:"1"}:void 0]),1032,["data-cy-files-navigation-item","active","loading","name","open","pinned","to"])}}}),wi=h({__name:"FilesNavigationList",setup(i){const t=Me(),a=v(()=>t.value.filter(s=>!s.parent).sort(o)),l=Intl.Collator([Oe(),Re()],{numeric:!0,usage:"sort"});function o(s,n){return s.order!==void 0&&n.order!==void 0?s.order-n.order:s.order!==void 0&&n.order===void 0?-1:s.order===void 0&&n.order!==void 0?1:l.compare(s.name,n.name)}return(s,n)=>(m(),g(e(ct),{class:N(s.$style.filesNavigationList),"aria-label":e(d)("files","Views")},{default:f(()=>[(m(!0),b(E,null,M(a.value,r=>(m(),g(bi,{key:r.id,view:r},null,8,["view"]))),128))]),_:1},8,["class","aria-label"]))}}),ki="_filesNavigationList_1n97q_2",Ci={filesNavigationList:ki},Vi={$style:Ci},Ni=ee(wi,[["__cssModules",Vi]]);function qi(i){const t=Ae().beforeResolve(i);Fe(t)}const Si=h({__name:"FilesNavigationSearch",setup(i){const t=L(),a=bt();qi((s,n)=>{if(s.params.view!==I&&(n.params.view===I||n.query.dir!==s.query.dir))a.query="",a.scope="filter";else if(s.params.view===I&&n.params.view===I&&a.query&&!s.query.query)return{...s,query:{...s.query,query:a.query}}});const l=v(()=>t.activeView?.id===I),o=v(()=>a.scope==="globally"?d("files","Search everywhere"):d("files","Search here"));return(s,n)=>(m(),g(e(ft),{modelValue:e(a).query,"onUpdate:modelValue":n[2]||(n[2]=r=>e(a).query=r),label:o.value},{actions:f(()=>[u(e(qt),{"aria-label":e(d)("files","Search scope options"),disabled:l.value},{icon:f(()=>[u(e(O),{path:e(a).scope==="globally"?e(he):e(_e)},null,8,["path"])]),default:f(()=>[u(e(ye),{closeAfterClick:"",onClick:n[0]||(n[0]=r=>e(a).scope="filter")},{icon:f(()=>[u(e(O),{path:e(_e)},null,8,["path"])]),default:f(()=>[G(" "+V(e(d)("files","Search here")),1)]),_:1}),u(e(ye),{closeAfterClick:"",onClick:n[1]||(n[1]=r=>e(a).scope="globally")},{icon:f(()=>[u(e(O),{path:e(he)},null,8,["path"])]),default:f(()=>[G(" "+V(e(d)("files","Search everywhere")),1)]),_:1})]),_:1},8,["aria-label","disabled"])]),_:1},8,["modelValue","label"]))}}),Ai={name:"ChartPieOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Fi=["aria-hidden","aria-label"],$i=["fill","width","height"],Bi={d:"M13 11H19.95Q19.58 8.25 17.66 6.34 15.75 4.43 13 4.05M11 19.95V4.05Q8 4.43 6 6.69 4 8.95 4 12T6 17.31Q8 19.58 11 19.95M13 19.95Q15.75 19.6 17.68 17.68 19.6 15.75 19.95 13H13M12 12M12 22Q9.93 22 8.1 21.21 6.28 20.43 4.93 19.08 3.58 17.73 2.79 15.9 2 14.08 2 12T2.79 8.1Q3.58 6.28 4.93 4.93 6.28 3.58 8.1 2.79 9.93 2 12 2T15.89 2.79Q17.7 3.58 19.06 4.94 20.43 6.3 21.21 8.11 22 9.93 22 12 22 14.05 21.21 15.88 20.43 17.7 19.08 19.06 17.73 20.43 15.9 21.21 14.08 22 12 22Z"},xi={key:0};function Li(i,t,a,l,o,s){return m(),b("span",Ze(i.$attrs,{"aria-hidden":a.title?null:"true","aria-label":a.title,class:"material-design-icon chart-pie-outline-icon",role:"img",onClick:t[0]||(t[0]=n=>i.$emit("click",n))}),[(m(),b("svg",{fill:a.fillColor,class:"material-design-icon__svg",width:a.size,height:a.size,viewBox:"0 0 24 24"},[R("path",Bi,[a.title?(m(),b("title",xi,V(a.title),1)):A("",!0)])],8,$i))],16,Fi)}const Oi=ee(Ai,[["render",Li]]),Ri=h({__name:"NavigationQuota",setup(i){const t=q(!1),a=q(pe("files","storageStats",null)),l=v(()=>{const p=we(a.value?.used??0,!1,!1),c=we(a.value?.total??0,!1,!1);return a.value===null||a.value?.quota<0?d("files","{usedQuotaByte} used",{usedQuotaByte:p}):d("files","{used} of {quota} used",{used:p,quota:c})}),o=v(()=>a.value?.relative?d("files","{relative}% used",a.value):""),s=Ft(n,2e3);$e(()=>{$("files:node:created",s),$("files:node:deleted",s),$("files:node:moved",s),$("files:node:updated",s)}),Fe(()=>{W("files:node:created",s),W("files:node:deleted",s),W("files:node:moved",s),W("files:node:updated",s)}),te(()=>{a.value&&a.value?.quota>0&&a.value?.free===0&&r()});async function n(p){if(!t.value){t.value=!0;try{const c=await Ue.get(Z("/apps/files/api/v1/stats"));if(!c?.data?.data)throw new Error("Invalid storage stats");a.value&&a.value?.free>0&&c.data.data?.free===0&&c.data.data?.quota>0&&r(),a.value=c.data.data}catch(c){_.error("Could not refresh storage stats",{error:c}),p&&K(d("files","Could not refresh storage stats"))}finally{t.value=!1}}}function r(){K(d("files","Your storage is full, files can not be updated or synced anymore!"))}return(p,c)=>a.value?(m(),g(e(me),{key:0,"aria-description":e(d)("files","Storage information"),class:N([{"app-navigation-entry__settings-quota--not-unlimited":a.value.quota>=0},"app-navigation-entry__settings-quota"]),loading:t.value,name:l.value,title:o.value,"data-cy-files-navigation-settings-quota":"",onClick:Be(e(s),["stop","prevent"])},{icon:f(()=>[u(Oi,{size:20})]),extra:f(()=>[a.value.quota>=0?(m(),g(e(At),{key:0,"aria-label":e(d)("files","Storage quota"),error:a.value.relative>80,value:Math.min(a.value.relative,100)},null,8,["aria-label","error","value"])):A("",!0)]),_:1},8,["aria-description","class","loading","name","title","onClick"])):A("",!0)}}),Gi=ee(Ri,[["__scopeId","data-v-65c0f8b8"]]),Ui=h({__name:"FilesAppSettingsAppearance",setup(i){const t=ie();return(a,l)=>(m(),g(e(P),{id:"appearance",name:e(d)("files","Appearance")},{default:f(()=>[u(e(z),null,{default:f(()=>[u(e(S),{modelValue:e(t).userConfig.show_hidden,"onUpdate:modelValue":[l[0]||(l[0]=o=>e(t).userConfig.show_hidden=o),l[1]||(l[1]=o=>e(t).update("show_hidden",o))],label:e(d)("files","Show hidden files")},null,8,["modelValue","label"]),u(e(S),{modelValue:e(t).userConfig.show_mime_column,"onUpdate:modelValue":[l[2]||(l[2]=o=>e(t).userConfig.show_mime_column=o),l[3]||(l[3]=o=>e(t).update("show_mime_column",o))],label:e(d)("files","Show file type column")},null,8,["modelValue","label"]),u(e(S),{modelValue:e(t).userConfig.show_files_extensions,"onUpdate:modelValue":[l[4]||(l[4]=o=>e(t).userConfig.show_files_extensions=o),l[5]||(l[5]=o=>e(t).update("show_files_extensions",o))],label:e(d)("files","Show file extensions")},null,8,["modelValue","label"]),u(e(S),{modelValue:e(t).userConfig.crop_image_previews,"onUpdate:modelValue":[l[6]||(l[6]=o=>e(t).userConfig.crop_image_previews=o),l[7]||(l[7]=o=>e(t).update("crop_image_previews",o))],label:e(d)("files","Crop image previews")},null,8,["modelValue","label"])]),_:1})]),_:1},8,["name"]))}}),Di=h({__name:"FilesAppSettingsGeneral",setup(i){const t=ie();return(a,l)=>(m(),g(e(P),{id:"settings",name:e(d)("files","General")},{default:f(()=>[u(e(z),null,{default:f(()=>[u(e(S),{modelValue:e(t).userConfig.sort_favorites_first,"onUpdate:modelValue":[l[0]||(l[0]=o=>e(t).userConfig.sort_favorites_first=o),l[1]||(l[1]=o=>e(t).update("sort_favorites_first",o))],label:e(d)("files","Sort favorites first")},null,8,["modelValue","label"]),u(e(S),{modelValue:e(t).userConfig.sort_folders_first,"onUpdate:modelValue":[l[2]||(l[2]=o=>e(t).userConfig.sort_folders_first=o),l[3]||(l[3]=o=>e(t).update("sort_folders_first",o))],label:e(d)("files","Sort folders before files")},null,8,["modelValue","label"]),u(e(S),{modelValue:e(t).userConfig.folder_tree,"onUpdate:modelValue":[l[4]||(l[4]=o=>e(t).userConfig.folder_tree=o),l[5]||(l[5]=o=>e(t).update("folder_tree",o))],label:e(d)("files","Enable folder tree view")},null,8,["modelValue","label"])]),_:1}),u(e(oi),{modelValue:e(t).userConfig.default_view,"onUpdate:modelValue":[l[6]||(l[6]=o=>e(t).userConfig.default_view=o),l[7]||(l[7]=o=>e(t).update("default_view",o))],label:e(d)("files","Default view")},{default:f(()=>[u(e(ke),{label:e(d)("files","All files"),value:"files"},{icon:f(()=>[u(e(O),{path:e(Vt)},null,8,["path"])]),_:1},8,["label"]),u(e(ke),{label:e(d)("files","Personal files"),value:"personal"},{icon:f(()=>[u(e(O),{path:e(Nt)},null,8,["path"])]),_:1},8,["label"])]),_:1},8,["modelValue","label"])]),_:1},8,["name"]))}}),Ii=h({__name:"FilesAppSettingsLegacyApiEntry",props:{setting:{}},setup(i){const t=i,a=q();return $e(()=>t.setting.open()),et(()=>t.setting.close()),te(()=>{a.value.appendChild(t.setting.el())}),(l,o)=>(m(),b("div",{ref_key:"el",ref:a},null,512))}}),Ei=h({__name:"FilesAppSettingsLegacyApi",setup(i){const t=(window.OCA?.Files?.Settings?.settings||[]).sort((a,l)=>a.order&&l.order?a.order-l.order:a.name.localeCompare(l.name));return(a,l)=>e(t).length!==0?(m(),g(e(P),{key:0,id:"api-settings",name:e(d)("files","Additional settings")},{default:f(()=>[(m(!0),b(E,null,M(e(t),o=>(m(),g(Ii,{key:o.name,setting:o},null,8,["setting"]))),128))]),_:1},8,["name"])):A("",!0)}}),Q=q();function Pe(){return Q.value||(Q.value=se(),ut().addEventListener("register:action",()=>{Q.value=se()})),tt(Q)}function Nl(i){const t=Pe();return v(()=>t.value.filter(a=>a.enabled===void 0||a.enabled(it(i))).sort((a,l)=>(a.order??0)-(l.order??0)))}const Mi=h({__name:"FilesAppSettingsShortcuts",setup(i){const t=Pe(),a=v(()=>t.value.filter(o=>!!o.hotkey).sort((o,s)=>(o.order||0)-(s.order||0)).map(o=>({id:o.id,label:o.hotkey.description,hotkey:l(o.hotkey)})));function l(o){const s=[];return o.ctrl&&s.push("Control"),o.alt&&s.push("Alt"),o.shift&&s.push("Shift"),o.key.match(/^[a-z]$/)?s.push(o.key.toUpperCase()):s.push(o.key),s.join(" ")}return(o,s)=>(m(),g(e(mt),null,{default:f(()=>[u(e(j),{label:e(d)("files","Actions")},{default:f(()=>[u(e(k),{label:e(d)("files","File actions"),hotkey:"A"},null,8,["label"]),(m(!0),b(E,null,M(a.value,n=>(m(),g(e(k),{key:n.id,label:n.label,hotkey:n.hotkey},null,8,["label","hotkey"]))),128))]),_:1},8,["label"]),u(e(j),{label:e(d)("files","Selection")},{default:f(()=>[u(e(k),{label:e(d)("files","Select all files"),hotkey:"Control A"},null,8,["label"]),u(e(k),{label:e(d)("files","Deselect all"),hotkey:"Escape"},null,8,["label"]),u(e(k),{label:e(d)("files","Select or deselect"),hotkey:"Control Space"},null,8,["label"]),u(e(k),{label:e(d)("files","Select a range"),hotkey:"Control Shift Space"},null,8,["label"])]),_:1},8,["label"]),u(e(j),{label:e(d)("files","Navigation")},{default:f(()=>[u(e(k),{label:e(d)("files","Go to parent folder"),hotkey:"Alt ArrowUp"},null,8,["label"]),u(e(k),{label:e(d)("files","Go to file above"),hotkey:"ArrowUp"},null,8,["label"]),u(e(k),{label:e(d)("files","Go to file below"),hotkey:"ArrowDown"},null,8,["label"]),u(e(k),{label:e(d)("files","Go left in grid"),hotkey:"ArrowLeft"},null,8,["label"]),u(e(k),{label:e(d)("files","Go right in grid"),hotkey:"ArrowRight"},null,8,["label"])]),_:1},8,["label"]),u(e(j),{label:e(d)("files","View")},{default:f(()=>[u(e(k),{label:e(d)("files","Toggle grid view"),hotkey:"V"},null,8,["label"]),u(e(k),{label:e(d)("files","Show those shortcuts"),hotkey:"?"},null,8,["label"])]),_:1},8,["label"])]),_:1}))}}),Pi=h({__name:"FilesAppSettingsWarnings",setup(i){const t=ie();return(a,l)=>(m(),g(e(P),{id:"warning",name:e(d)("files","Warnings")},{default:f(()=>[u(e(z),null,{default:f(()=>[u(e(S),{modelValue:e(t).userConfig.show_dialog_file_extension,"onUpdate:modelValue":[l[0]||(l[0]=o=>e(t).userConfig.show_dialog_file_extension=o),l[1]||(l[1]=o=>e(t).update("show_dialog_file_extension",o))],label:e(d)("files","Warn before changing a file extension")},null,8,["modelValue","label"]),u(e(S),{modelValue:e(t).userConfig.show_dialog_deletion,"onUpdate:modelValue":[l[2]||(l[2]=o=>e(t).userConfig.show_dialog_deletion=o),l[3]||(l[3]=o=>e(t).update("show_dialog_deletion",o))],label:e(d)("files","Warn before deleting a file")},null,8,["modelValue","label"])]),_:1})]),_:1},8,["name"]))}}),zi="https://docs.nextcloud.com/server/stable/go.php?to=user-webdav",Ti=h({__name:"FilesAppSettingsWebDav",setup(i){const t=We("dav/files/"+encodeURIComponent(Ge().uid)),a=Z("/settings/user/security#generate-app-token-section"),l=pe("files","isTwoFactorEnabled",!1);return(o,s)=>(m(),g(e(P),{id:"webdav",name:"WebDAV"},{default:f(()=>[u(e(z),null,{default:f(()=>[u(e(Pt),{label:e(d)("files","WebDAV URL"),value:e(t)},null,8,["label","value"]),e(l)?(m(),g(e(re),{key:0,label:e(d)("files","Create an app password"),description:e(d)("files","Required for WebDAV authentication because Two-Factor Authentication is enabled for this account."),href:e(a),target:"_blank"},null,8,["label","description","href"])):A("",!0),u(e(re),{label:e(d)("files","How to access files using WebDAV"),href:zi,target:"_blank"},null,8,["label"])]),_:1})]),_:1}))}}),Wi=h({__name:"FilesAppSettings",props:{open:{type:Boolean}},emits:["close","update:open"],setup(i,{emit:t}){const a=t;H("?",l,{stop:!0,prevent:!0});async function l(){a("update:open",!0),await at(),document.getElementById("settings-section_keyboard-shortcuts").scrollIntoView({behavior:"smooth",inline:"nearest"})}return(o,s)=>(m(),g(e(vt),{legacy:!1,name:e(d)("files","Files settings"),noVersion:"",open:i.open,showNavigation:"","onUpdate:open":s[0]||(s[0]=n=>a("close"))},{default:f(()=>[u(Di),u(Ui),u(Ei),u(Pi),u(Ti),u(Mi)]),_:1},8,["name","open"]))}}),ji={class:"app-navigation-entry__settings"},Qi=h({__name:"FilesNavigation",setup(i){const t=ue(),a=L(),l=q(!1),o=Ee(),s=fe(),n=v(()=>s?.params?.view||"files"),r=v(()=>{const p=o.value.filter(w=>w.id===n.value||w.params?.view===n.value),c=p.filter(w=>w.params&&Object.entries(w.params).every(([x,U])=>x in s.params?s.params[x]===U:s.query[x]===U)).sort((w,x)=>Object.keys(x.params).length-Object.keys(w.params).length);if(c.length>0)return c[0].id;const F=p.find(w=>w.params?.dir===s.query.dir);return F?F.id:p.find(w=>w.id===n.value)?.id});return qe("currentNavigationView",r),lt(()=>{if(n.value!==a.activeView?.id){_.debug(`Route view id ${n.value} is different from active view id ${a.activeView?.id}, updating active view...`);const p=o.value.find(({id:c})=>c===n.value);p&&(t.close(),Le().setActive(p.id),xe("files:navigation:changed",p))}}),(p,c)=>(m(),g(e(gt),{"data-cy-files-navigation":"",class:"files-navigation","aria-label":e(d)("files","Files")},{search:f(()=>[u(Si)]),default:f(()=>[u(Ni),u(Wi,{open:l.value,"onUpdate:open":c[0]||(c[0]=F=>l.value=F),"data-cy-files-navigation-settings":"",onClose:c[1]||(c[1]=F=>l.value=!1)},null,8,["open"])]),footer:f(()=>[R("ul",ji,[u(Gi),u(e(me),{name:e(d)("files","Files settings"),"data-cy-files-navigation-settings-button":"",onClick:c[2]||(c[2]=Be(F=>l.value=!0,["prevent","stop"]))},{icon:f(()=>[u(ht,{size:20})]),_:1},8,["name"])])]),_:1},8,["aria-label"]))}}),Hi=ee(Qi,[["__scopeId","data-v-d149cece"]]);async function Ji(i,t){const a=L(),l=a.activeFolder,o=a.activeNode,s=a.activeView;if(!l||!o||!s){_.error("No active folder, node or view",{folder:l,node:o,view:s});return}if(o.status===be.LOADING){_.debug("Node is already loading",{node:o});return}const n=l?._children||[],r={nodes:[o],view:s,folder:l,contents:n,trigger:t};if(!i.enabled(r)){_.debug("Action is not not available for the current context",{action:i,node:o,view:s});return}let p=i.id;try{p=i.displayName(r)||p}catch(c){_.error("Error while getting action display name",{action:i,error:c})}try{o.status=be.LOADING,a.activeAction=i;const c=await i.exec(r);if(c==null)return;if(c){St(d("files","{displayName}: done",{displayName:p}));return}K(d("files","{displayName}: failed",{displayName:p}))}catch(c){_.error("Error while executing action",{action:i,error:c}),K(d("files","{displayName}: failed",{displayName:p}))}finally{o.status=void 0,a.activeAction=void 0}}function Ki(){const i=fe(),t=v(()=>String(i.query.dir||"/").replace(/^(.+)\/$/,"$1")),a=v(()=>{const s=Number.parseInt([i.params.fileid??"0"].flat()[0])||null;return Number.isNaN(s)?null:s}),l=v(()=>"openfile"in i.query&&(typeof i.query.openfile!="string"||i.query.openfile.toLocaleLowerCase()!=="false")),o=v(()=>"opendetails"in i.query&&(typeof i.query.opendetails!="string"||i.query.opendetails.toLocaleLowerCase()!=="false"));return{directory:t,fileId:a,openFile:l,openDetails:o}}function Xi(){const i=ie(),{directory:t}=Ki(),a=Ae(),l=fe(),o=se();for(const r of o){if(!r.hotkey)continue;const p=r.hotkey.key.match(/^[a-z]$/)?r.hotkey.key.toUpperCase():r.hotkey.key;_.debug(`Register hotkey for action "${r.id}"`),H(p,()=>Ji(r,"hotkey"),{stop:!0,prevent:!0,alt:r.hotkey.alt,ctrl:r.hotkey.ctrl,shift:r.hotkey.shift})}H("ArrowUp",s,{stop:!0,prevent:!0,alt:!0}),H("v",n,{stop:!0,prevent:!0}),_.debug("Hotkeys registered");function s(){const r=Ie.dirname(t.value);_.debug("Navigating to parent directory",{dir:r}),a.push({params:{...l.params},query:{...l.query,dir:r}})}function n(){const r=i.userConfig.grid_view;_.debug("Toggling grid view",{old:r,new:!r}),i.update("grid_view",!r)}}const Yi=h({__name:"FilesApp",setup(i){Xi();const t=Ve();return(a,l)=>{const o=Se("RouterView");return m(),g(e(nt),{appName:"files"},{default:f(()=>[e(t)?A("",!0):(m(),g(Hi,{key:0})),u(o),e(t)?A("",!0):(m(),g(Rt,{key:1}))]),_:1})}}});class Zi{#t;#e;constructor(t,a){if(this.#t=t,this.#e={open:()=>{},close:()=>{},order:0,...a},typeof this.#e.el!="function")throw new Error("Setting must have an `el` function that returns a DOM element");if(typeof this.#t!="string")throw new Error("Setting must have a `name` string");if(typeof this.#e.order!="number")throw new Error("Setting must have an `order` number")}get name(){return this.#t}get el(){return this.#e.el}get open(){return this.#e.open}get close(){return this.#e.close}get order(){return this.#e.order}}const ea=()=>je(()=>import("./FilesList-BC8r-ikH.chunk.mjs"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123]),import.meta.url);function ta(i){return Et(i).replace(/\+/g,"%20")}const de=Dt({history:It(Z("/apps/files")),linkActiveClass:"active",stringifyQuery:ta,routes:[{path:"/",redirect:{name:"filelist",params:{view:wt()}}},{path:"/:view/:fileid(\\d+)?",name:"filelist",props:!0,component:ea}]});de.onError(i=>{if(ot(i,st.aborted))_.debug("Navigation was aborted",{error:i});else throw i}),de.beforeResolve((i,t)=>{if(i.params.view!==t.params.view)return;const a=t.query?.dir||"/",l=i.query?.dir||"/";if(Ie.relative(a,l)===".."){const{getNode:o}=ne(),{getPath:s}=ge();if(!t.params.view){_.error("No current view id found, cannot navigate to parent directory",{fromDir:a,toDir:l});return}const n=s(t.params.view,a);if(!n){_.error("No source found for the parent directory",{fromDir:a,toDir:l});return}const r=o(n)?.fileid;if(i.params.fileid===String(r))return;if(!r){_.error("No fileid found for the parent directory",{fromDir:a,toDir:l,fromSource:n});return}return _.debug("Navigating back to parent directory",{fromDir:a,toDir:l,fileId:r}),{name:"filelist",query:i.query,params:{...i.params,fileid:String(r)},replace:!0}}}),$("files:node:deleted",i=>{const{Router:t}=window.OCP.Files;if(t.params.fileid===String(i.fileid)){const a={...t.params},{getPath:l}=ge(X),{getNode:o}=ne(X),s=l(t.params.view,i.dirname),n=o(s);s&&n?a.fileid=String(n.fileid):delete a.fileid;const r={...t.query};delete r.opendetails,delete r.openfile,t.goToRoute(null,a,r,!0)}});class ia{router;pendingLocation;constructor(t){this.router=t}get route(){return e(this.router.currentRoute)}get name(){return this.pendingLocation?.name??this.route.name}get query(){return this.pendingLocation?.query??this.route.query??{}}get params(){return this.pendingLocation?.params??this.route.params??{}}get _router(){return this.router}goTo(t,a=!1){return this.pendingLocation=void 0,this.router.push({path:t,replace:a})}goToRoute(t,a,l,o){t??=this.name;const s={name:t,query:l,params:a};return this.pendingLocation=s,(o?this._router.replace(s):this._router.push(s)).finally(()=>{this.pendingLocation===s&&(this.pendingLocation=void 0)})}}let aa=class{_settings;constructor(){this._settings=[],_.debug("OCA.Files.Settings initialized")}register(i){return this._settings.filter(t=>t.name===i.name).length>0?(_.error("A setting with the same name is already registered"),!1):(this._settings.push(i),!0)}get settings(){return this._settings}};function la(i=X){const t=v(()=>L(i).activeNode),a=v(()=>L(i).activeFolder),l=v(()=>L(i).activeView);function o(r){const p=L(i);r&&!p.activeView&&_.debug("sidebar: opening without an active view",{node:r}),p.activeNode=r}function s(r){const p={...window.OCP?.Files?.Router?.params??{}},c={...window.OCP?.Files?.Router?.query??{}};_.debug(`sidebar: ${r?"opened":"closed"}`,{query:c,params:p}),!r&&"opendetails"in c&&(delete c.opendetails,window.OCP.Files.Router.goToRoute(null,p,c,!0)),r&&!("opendetails"in c)&&window.OCP.Files.Router.goToRoute(null,p,{...c,opendetails:"true"},!0)}let n=!1;return $("files:list:updated",()=>{n||(n=!0,window.OCP.Files.Router._router.afterEach((r,p)=>{p.query&&"opendetails"in p.query&&r.query&&!("opendetails"in r.query)&&(_.debug('sidebar: closing because "opendetails" query parameter was removed from URL.'),ue(i).close())}))}),$("viewer:sidebar:open",async({source:r,path:p})=>{_.debug("sidebar: opening for node from Viewer.",{source:r});try{const c=ne(i).getNode(r)??await kt(p);if(!c)throw new Error(`Node '${r}' could not be resolved`);ue(i).open(c)}catch(c){_.error("sidebar: could not open for the node from the Viewer.",{error:c,source:r})}}),{node:t,folder:a,view:l,setNode:o,onOpenStateChanged:s}}if(window.OCA.Files=window.OCA.Files??{},window.OCP.Files=window.OCP.Files??{},!window.OCP.Files.Router){const i=new ia(de);Object.assign(window.OCP.Files,{Router:i})}Ve()||(Gt(la()),Ut());const oa=new aa;Object.assign(window.OCA.Files,{Settings:oa}),Object.assign(window.OCA.Files.Settings,{Setting:Zi});const le=rt(Yi);le.use(X),le.use(window.OCP.Files.Router._router),le.mount("#content");export{Ki as a,Pe as b,hi as c,Nl as d,Ji as e,Ee as u};
//# sourceMappingURL=files-main.mjs.map