(()=>{"use strict";vart,e,n,r={51528:(t,e,n)=>{varr=n(35810),i=n(32981),s=n(53334),o=n(50352),a=n(85471);constl='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-link" viewBox="0 0 24 24"><path d="M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z" /></svg>';vard=n(36117),u=n(43627);constc=(0,r.H4)();varh=n(35947);constp=(0,h.YK)().setApp("files").detectUser().build(),f=t=>(0,r.Al)(t),g=function(){lett=arguments.length>0&&void0!==arguments[0]?arguments[0]:"/";t=(0,u.join)(r.lJ,t);conste=newAbortController,n=(0,r.VL)();returnnewd.CancelablePromise((async(r,i,s)=>{s((()=>e.abort()));try{consti=awaitc.getDirectoryContents(t,{details:!0,data:n,includeSelf:!0,signal:e.signal}),s=i.data[0],o=i.data.slice(1);if(s.filename!==t&&`${s.filename}/`!==t)throwp.debug(`Exepected "${t}" but got filename "${s.filename}" instead.`),newError("Root node does not match requested path");r({folder:f(s),contents:o.map((t=>{try{returnf(t)}catch(e){returnp.error(`Invalid node detected '${t.basename}'`,{error:e}),null}})).filter(Boolean)})}catch(t){i(t)}}))},m=(0,h.YK)().setApp("files_sharing").detectUser().build();varE=n(63814),w=n(82490),v=n(40173);constN=(0,i.C)("files_sharing","view"),b=(0,i.C)("files_sharing","sharingToken");a.Ay.use(v.Ay);consty=v.Ay.prototype.push;v.Ay.prototype.push=function(t,e,n){returne||n?y.call(this,t,e,n):y.call(this,t).catch((t=>t))};constx=newv.Ay({mode:"history",base:(0,E.Jv)("/s"),linkActiveClass:"active",routes:[{path:"/",redirect:{name:"filelist",params:{view:N,token:b}}},{path:"/:token",name:"filelist",props:!0}],stringifyQuery(t){conste=w.A.stringify(t).replace(/%2F/gim,"/");returne?"?"+e:""}});(()=>{constt=(0,i.C)("files_sharing","filename");lete,l;constd=newr.Ss({id:"public-file-drop",name:(0,s.Tl)("files_sharing","File drop"),caption:(0,s.Tl)("files_sharing","Upload files to {foldername}",{foldername:t}),icon:o,order:1,emptyView:asyncr=>{if(void0===e){const{default:t}=awaitPromise.all([n.e(4208),n.e(9087)]).then(n.bind(n,99087));e=a.Ay.extend(t)}l&&l.$destroy(),l=newe({propsData:{foldername:t}}),l.$mount(r)},getContents:async()=>({contents:[],folder:newr.vd({id:0,source:`${r.PY}${r.lJ}`,root:r.lJ,owner:null,permissions:r.aX.CREATE})})});(0,r.bh)().register(d)})(),(()=>{constt=newr.Ss({id:"public-share",name:(0,s.Tl)("files_sharing","Public share"),caption:(0,s.Tl)("files_sharing","Public shared files."),emptyTitle:(0,s.Tl)("files_sharing","No files"),emptyCaption:(0,s.Tl)("files_sharing","Files and folders shared with you will show up here"),icon:l,order:1,getContents:g});(0,r.bh)().register(t)})(),(()=>{constt=newr.Ss({id:"public-file-share",name:(0,s.Tl)("files_sharing","Public file share"),caption:(0,s.Tl)("files_sharing","Public shared file."),emptyTitle:(0,s.Tl)("files_sharing","No file"),emptyCaption:(0,s.Tl)("files_sharing","The file shared with you will show up here"),icon:l,order:1,getContents:()=>newd.CancelablePromise((async(t,e,n)=>{consti=newAbortController;n((()=>i.abort()));try{conste=awaitc.stat(r.lJ,{data:(0,r.VL)(),details:!0,signal:i.signal});t({contents:[(0,r.Al)(e.data)],folder:newr.vd({id:0,source:`${r.PY}${r.lJ}`,root:r.lJ,owner:null,permissions:r.aX.READ,attributes:{note:e.data.props?.note}})})}catch(t){m.error(t),e(t)}}))});(0,r.bh)().register(t)})();constI=(0,i.C)("files_sharing","view"),O=(0,r.bh)();O.setActive(O.views.find((t=>{let{id:e}=t;returne===I}))??null),window.OCP.Files=window.OCP.Files??{},window.OCP.Files.Router=newclass{constructor(t){vare,n,r;e=this,r=void0,(n=function(t){vare=function(t){if("object"!=typeoft||!t)returnt;vare=t[Symbol.toPrimitive];if(void0!==e){varn=e.call(t,"string");if("object"!=typeofn)returnn;thrownewTypeError("@@toPrimitive must return a primitive value.")}returnString(t)}(t);return"symbol"==typeofe?e:e+""}(n="router"))ine?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}