nextcloud/dist/files_sharing-init-public.js
nextcloud-command f1a7a2b2ec chore(assets): Recompile assets
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2026-02-06 13:12:54 +00:00

2 lines
No EOL
24 KiB
JavaScript

(()=>{var e,t,i,r={84560(e,t,i){"use strict";i.d(t,{A:()=>r});const r=(0,i(35947).YK)().setApp("files").detectUser().build()},14668(e,t,i){"use strict";i.d(t,{h:()=>u});var r=i(77815),n=i(43627),o=i(84560),s=i(88975),a=i(88140),d=i(78246),l=i(99201),c=i(46502);async function u(e="/",t){const i=(0,d.j)((0,a.u)());return i.query.length<3?await async function(e,t){e=(0,n.join)((0,r.ei)(),e);const i=(0,r.aN)(),s=await l.S.getDirectoryContents(e,{details:!0,data:i,includeSelf:!0,signal:t?.signal}),a=s.data[0],d=s.data.slice(1);if(a?.filename!==e&&`${a?.filename}/`!==e)throw o.A.debug(`Exepected "${e}" but got filename "${a.filename}" instead.`),new Error("Root node does not match requested path");return{folder:(0,r.pO)(a),contents:d.map(e=>{try{return(0,r.pO)(e)}catch(t){return o.A.error(`Invalid node detected '${e.basename}'`,{error:t}),null}}).filter(Boolean)}}(e,t):await async function(e,t,i){let o=(0,s._)((0,a.u)()).getDirectoryByPath("files",e);if(!o){const t=(0,n.join)((0,r.ei)(),e),i=await l.S.stat(t,{details:!0});o=(0,r.pO)(i.data)}return{folder:o,contents:await(0,c.E)(t,{dir:e,signal:i})}}(e,i.query,t?.signal)}},46502(e,t,i){"use strict";i.d(t,{E:()=>d});var r=i(21777),n=i(77815),o=i(63814),s=i(84560),a=i(99201);async function d(e,{dir:t,signal:i}){const d=(0,r.HW)();if(!d)return[];if((e=e.trim()).length<3)return[];t&&!t.startsWith("/")&&(t=`/${t}`),s.A.debug("Searching for nodes",{query:e,dir:t});const{data:l}=await a.S.search("/",{details:!0,signal:i,data:`\n<d:searchrequest ${(0,n.CP)()}>\n\t <d:basicsearch>\n\t\t <d:select>\n\t\t\t <d:prop>\n\t\t\t ${(0,n.VX)()}\n\t\t\t </d:prop>\n\t\t </d:select>\n\t\t <d:from>\n\t\t\t <d:scope>\n\t\t\t\t <d:href>/files/${d.uid}${t||""}</d:href>\n\t\t\t\t <d:depth>infinity</d:depth>\n\t\t\t </d:scope>\n\t\t </d:from>\n\t\t <d:where>\n\t\t\t <d:like>\n\t\t\t\t <d:prop>\n\t\t\t\t\t <d:displayname/>\n\t\t\t\t </d:prop>\n\t\t\t\t <d:literal>%${e.replace("%","")}%</d:literal>\n\t\t\t </d:like>\n\t\t </d:where>\n\t\t <d:orderby/>\n\t</d:basicsearch>\n</d:searchrequest>`});return i?.aborted?[]:l.results.map(e=>(0,n.pO)(e,n.VA,(0,o.$_)()))}},99201(e,t,i){"use strict";i.d(t,{S:()=>n,t:()=>o});var r=i(77815);const n=(0,r.KU)();async function o(e){const t=(0,r.aN)(),i=await n.stat(`${(0,r.ei)()}${e}`,{details:!0,data:t});return(0,r.pO)(i.data)}},39992(e,t,i){"use strict";var r=i(61338),n=i(35810),o=i(10810),s=i(85471),a=i(84560);(0,o.nY)("active",()=>{const e=(0,s.IJ)(),t=(0,s.KR)(),i=(0,s.KR)(),o=(0,s.IJ)();function d(e){i.value&&i.value.source===e.source&&(i.value=void 0)}function l(e=null){a.A.debug("Setting active view",{view:e}),o.value=e??void 0,i.value=void 0}return(0,s.wB)(i,()=>{"number"==typeof i.value?.fileid&&i.value.fileid!==t.value?.fileid&&(a.A.debug("Updating active fileid in URL query",{fileid:i.value.fileid}),window.OCP.Files.Router.goToRoute(null,{...window.OCP.Files.Router.params,fileid:String(i.value.fileid)},{...window.OCP.Files.Router.query},!0))}),function(){const e=(0,n.bh)();l(e.active),(0,r.B1)("files:node:deleted",d),e.addEventListener("updateActive",e=>{l(e.detail)})}(),{activeAction:e,activeFolder:t,activeNode:i,activeView:o}})},88975(e,t,i){"use strict";i.d(t,{_:()=>l});var r=i(61338),n=i(10810),o=i(85471),s=i(84560),a=i(99201),d=i(16488);function l(...e){const t=(0,n.nY)("files",{state:()=>({files:{},roots:{}}),getters:{getNode:e=>t=>e.files[t],getNodes:e=>t=>t.map(t=>e.files[t]).filter(Boolean),getNodesById:e=>t=>Object.values(e.files).filter(e=>e.fileid===t),getRoot:e=>t=>e.roots[t]},actions:{getDirectoryByPath(e,t){const i=(0,d.B)();let r;if(t&&"/"!==t){const n=i.getPath(e,t);n&&(r=this.getNode(n))}else r=this.getRoot(e);return r},getNodesByPath(e,t){const i=this.getDirectoryByPath(e,t);return(i?._children??[]).map(e=>this.getNode(e)).filter(Boolean)},updateNodes(e){const t=e.reduce((e,t)=>t.fileid?(e[t.source]=t,e):(s.A.error("Trying to update/set a node without fileid",{node:t}),e),{});o.Ay.set(this,"files",{...this.files,...t})},deleteNodes(e){e.forEach(e=>{e.source&&o.Ay.delete(this.files,e.source)})},setRoot({service:e,root:t}){o.Ay.set(this.roots,e,t)},onDeletedNode(e){this.deleteNodes([e])},onCreatedNode(e){this.updateNodes([e])},onMovedNode({node:e,oldSource:t}){e.fileid?(o.Ay.delete(this.files,t),this.updateNodes([e])):s.A.error("Trying to update/set a node without fileid",{node:e})},async onUpdatedNode(e){if(!e.fileid)return void s.A.error("Trying to update/set a node without fileid",{node:e});const t=this.getNodesById(e.fileid);if(t.length>1)return await Promise.all(t.map(e=>(0,a.t)(e.path))).then(this.updateNodes),void s.A.debug(t.length+" nodes updated in store",{fileid:e.fileid});1!==t.length||e.source!==t[0].source?(0,a.t)(e.path).then(e=>this.updateNodes([e])):this.updateNodes([e])},onAddFavorite(e){const t=this.getNode(e.source);t&&o.Ay.set(t.attributes,"favorite",1)},onRemoveFavorite(e){const t=this.getNode(e.source);t&&o.Ay.set(t.attributes,"favorite",0)}}})(...e);return t._initialized||((0,r.B1)("files:node:created",t.onCreatedNode),(0,r.B1)("files:node:deleted",t.onDeletedNode),(0,r.B1)("files:node:updated",t.onUpdatedNode),(0,r.B1)("files:node:moved",t.onMovedNode),(0,r.B1)("files:favorites:added",t.onAddFavorite),(0,r.B1)("files:favorites:removed",t.onRemoveFavorite),t._initialized=!0),t}},88140(e,t,i){"use strict";i.d(t,{u:()=>n});var r=i(10810);function n(){return window._nc_files_pinia||(window._nc_files_pinia=(0,r.Ey)()),window._nc_files_pinia}},16488(e,t,i){"use strict";i.d(t,{B:()=>c});var r=i(61338),n=i(35810),o=i(71225),s=i(10810),a=i(85471),d=i(84560),l=i(88975);function c(...e){const t=(0,l._)(...e),i=(0,s.nY)("paths",{state:()=>({paths:{}}),getters:{getPath:e=>(t,i)=>{if(e.paths[t])return e.paths[t][i]}},actions:{addPath(e){this.paths[e.service]||a.Ay.set(this.paths,e.service,{}),a.Ay.set(this.paths[e.service],e.path,e.source)},deletePath(e,t){this.paths[e]&&a.Ay.delete(this.paths[e],t)},onCreatedNode(e){const t=(0,n.bh)()?.active?.id||"files";e.fileid?(e.type===n.pt.Folder&&this.addPath({service:t,path:e.path,source:e.source}),this.addNodeToParentChildren(e)):d.A.error("Node has no fileid",{node:e})},onDeletedNode(e){const t=(0,n.bh)()?.active?.id||"files";e.type===n.pt.Folder&&this.deletePath(t,e.path),this.deleteNodeFromParentChildren(e)},onMovedNode({node:e,oldSource:t}){const i=(0,n.bh)()?.active?.id||"files";if(e.type===n.pt.Folder){const r=Object.entries(this.paths[i]).find(([,e])=>e===t);r?.[0]&&this.deletePath(i,r[0]),this.addPath({service:i,path:e.path,source:e.source})}const r=new n.ZH({source:t,owner:e.owner,mime:e.mime,root:e.root});this.deleteNodeFromParentChildren(r),this.addNodeToParentChildren(e)},deleteNodeFromParentChildren(e){const i=(0,n.bh)()?.active?.id||"files",r=(0,o.pD)(e.source),s="/"===e.dirname?t.getRoot(i):t.getNode(r);if(s){const t=new Set(s._children??[]);return t.delete(e.source),a.Ay.set(s,"_children",[...t.values()]),void d.A.debug("Children updated",{parent:s,node:e,children:s._children})}d.A.debug("Parent path does not exists, skipping children update",{node:e})},addNodeToParentChildren(e){const i=(0,n.bh)()?.active?.id||"files",r=(0,o.pD)(e.source),s="/"===e.dirname?t.getRoot(i):t.getNode(r);if(s){const t=new Set(s._children??[]);return t.add(e.source),a.Ay.set(s,"_children",[...t.values()]),void d.A.debug("Children updated",{parent:s,node:e,children:s._children})}d.A.debug("Parent path does not exists, skipping children update",{node:e})}}})(...e);return i._initialized||((0,r.B1)("files:node:created",i.onCreatedNode),(0,r.B1)("files:node:deleted",i.onDeletedNode),(0,r.B1)("files:node:moved",i.onMovedNode),i._initialized=!0),i}},78246(e,t,i){"use strict";i.d(t,{j:()=>l});var r=i(61338),n=i(46855),o=i(10810),s=i(85471),a=i(84560),d=i(10333);const l=(0,o.nY)("search",()=>{const e=(0,s.KR)(""),t=(0,s.KR)("filter");(0,s.wB)(t,o),(0,s.wB)(e,(e,t)=>{e.trim()!==t.trim()&&o()}),function(){(0,r.B1)("files:navigation:changed",l);const i=window.OCP.Files.Router;i.params.view===d.w&&(e.value=[i.query.query].flat()[0]??"",e.value?(t.value="globally",a.A.debug("Directly navigated to search view",{query:e.value})):(a.A.info("Directly navigated to search view without any query, redirect to files view."),i.goToRoute(void 0,{...i.params,view:"files"},{...i.query,query:void 0},!0)))}();const i=(0,n.A)(t=>{window.OCP.Files.Router.goToRoute(void 0,{view:d.w},{query:e.value},t)});function o(){(0,r.Ic)("files:search:updated",{query:e.value,scope:t.value});const n=window.OCP.Files.Router;if(n.params.view===d.w&&(""===e.value||"filter"===t.value))return t.value="filter",n.goToRoute(void 0,{view:"files"},{...n.query,query:void 0});if("filter"===t.value||!e.value)return;const o=n.params.view===d.w;a.A.debug("Update route for updated search query",{query:e.value,isSearch:o}),i(o)}function l(i){i.id!==d.w&&(e.value="",t.value="filter")}return{query:e,scope:t}})},66480(e,t,i){"use strict";i(61338),i(35810),i(53334),i(14668),i(39992)},10333(e,t,i){"use strict";i.d(t,{w:()=>r}),i(35810),i(53334),i(21777),i(77815),i(84560),i(78246),i(46502),i(66480);const r="search"},85908(e,t,i){"use strict";var r=i(61338),n=i(35810),o=i(81222);var s=i(77815),a=i(53334),d=i(85471);const l='<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>';var c=i(99201);const u=(0,i(35947).YK)().setApp("files_sharing").detectUser().build();var h=i(14668),p=i(63814),f=i(82490),v=i(40173);const w=(0,o.C)("files_sharing","view"),g=(0,o.C)("files_sharing","sharingToken");d.Ay.use(v.Ay);const m=v.Ay.prototype.push;v.Ay.prototype.push=function(...e){return e.length>1?m.call(this,...e):m.call(this,e[0]).catch(b)};const y=v.Ay.prototype.replace;function b(e){if(!(0,v.Pq)(e,v.$c.duplicated))throw e;u.debug("Ignoring duplicated navigation from vue-router",{error:e})}v.Ay.prototype.replace=function(...e){return e.length>1?y.call(this,...e):y.call(this,e[0]).catch(b)};const _=new v.Ay({mode:"history",base:(0,p.Jv)("/s"),linkActiveClass:"active",routes:[{path:"/",redirect:{name:"filelist",params:{view:w,token:g}}},{path:"/:token",name:"filelist",props:!0}],stringifyQuery(e){const t=f.A.stringify(e).replace(/%2F/gim,"/");return t?"?"+t:""}});(()=>{const e=(0,o.C)("files_sharing","filename");let t,r;const l=new n.Ss({id:"public-file-drop",name:(0,a.Tl)("files_sharing","File drop"),caption:(0,a.Tl)("files_sharing","Upload files to {foldername}",{foldername:e}),icon:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-cloud-upload" viewBox="0 0 24 24"><path d="M11 20H6.5Q4.22 20 2.61 18.43 1 16.85 1 14.58 1 12.63 2.17 11.1 3.35 9.57 5.25 9.15 5.88 6.85 7.75 5.43 9.63 4 12 4 14.93 4 16.96 6.04 19 8.07 19 11 20.73 11.2 21.86 12.5 23 13.78 23 15.5 23 17.38 21.69 18.69 20.38 20 18.5 20H13V12.85L14.6 14.4L16 13L12 9L8 13L9.4 14.4L11 12.85Z" /></svg>',order:1,emptyView:async n=>{if(void 0===t){const{default:e}=await Promise.all([i.e(4208),i.e(8192)]).then(i.bind(i,28192));t=d.Ay.extend(e)}r&&r.$destroy(),r=new t({propsData:{foldername:e}}),r.$mount(n)},getContents:async()=>({contents:[],folder:new n.vd({id:0,source:`${s.Xn}${s.VA}`,root:s.VA,owner:null,permissions:n.aX.CREATE})})});(0,n.bh)().register(l)})(),(()=>{const e=new n.Ss({id:"public-share",name:(0,a.Tl)("files_sharing","Public share"),caption:(0,a.Tl)("files_sharing","Publicly shared files."),emptyTitle:(0,a.Tl)("files_sharing","No files"),emptyCaption:(0,a.Tl)("files_sharing","Files and folders shared with you will show up here"),icon:l,order:1,getContents:h.h});(0,n.bh)().register(e)})(),(()=>{const e=new n.Ss({id:"public-file-share",name:(0,a.Tl)("files_sharing","Public file share"),caption:(0,a.Tl)("files_sharing","Publicly shared file."),emptyTitle:(0,a.Tl)("files_sharing","No file"),emptyCaption:(0,a.Tl)("files_sharing","The file shared with you will show up here"),icon:l,order:1,getContents:async(e,{signal:t})=>{try{const e=await c.S.stat((0,s.ei)(),{data:(0,s.aN)(),details:!0,signal:t});return{contents:[(0,s.pO)(e.data)],folder:new n.vd({id:0,source:`${(0,s.EY)()}${(0,s.ei)()}`,root:(0,s.ei)(),owner:null,permissions:n.aX.READ,attributes:{note:e.data.props?.note}})}}catch(e){if(t.aborted)throw u.info("Fetching contents for public file share was aborted",{error:e}),new DOMException("Aborted","AbortError");throw u.error("Failed to get contents for public file share",{error:e}),e}}});(0,n.bh)().register(e)})();const A=(0,o.C)("files_sharing","view"),C=(0,n.bh)();try{C.setActive(A)}catch{C.setActive(null)}window.OCP.Files=window.OCP.Files??{},window.OCP.Files.Router=new class{constructor(e){var t,i,r;t=this,r=void 0,(i=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(i="router"))in t?Object.defineProperty(t,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[i]=r,this.router=e}get name(){return this.router.currentRoute.name}get query(){return this.router.currentRoute.query||{}}get params(){return this.router.currentRoute.params||{}}get _router(){return this.router}goTo(e,t=!1){return this.router.push({path:e,replace:t})}goToRoute(e,t,i,r){e??=this.router.currentRoute.name;const n={name:e,query:i,params:t};return r?this._router.replace(n):this._router.push(n)}}(_);const N=(0,o.C)("files_sharing","fileId",null),P=(0,o.C)("files_sharing","sharingToken");null!==N&&window.OCP.Files.Router.goToRoute("filelist",{...window.OCP.Files.Router.params,token:P,fileid:String(N)},{...window.OCP.Files.Router.query,openfile:"true"}),(0,r.B1)("files:list:updated",function e({folder:t}){if((0,r.al)("files:list:updated",e),t.attributes["share-attributes"]){const e=JSON.parse(t.attributes["share-attributes"]||"[]").find(({scope:e,key:t})=>"config"===e&&"grid_view"===t);void 0!==e&&(u.debug("Loading share attributes",{gridViewAttribute:e}),(0,r.Ic)("files:config:updated",{key:"grid_view",value:!0===e.value}))}})},63779(){},77199(){},77815(e,t,i){"use strict";i.d(t,{CP:()=>u,EY:()=>v,KU:()=>g,VA:()=>f,VX:()=>c,Xn:()=>w,aN:()=>h,ei:()=>p,pO:()=>m});var r=i(21777),n=i(63814),o=i(32505),s=i(44719),a=i(36520);const d=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:creationdate","d:displayname","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:size"],l={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"};function c(){return void 0===window._nc_dav_properties&&(window._nc_dav_properties=[...d]),window._nc_dav_properties.map(e=>`<${e} />`).join(" ")}function u(){return void 0===window._nc_dav_namespaces&&(window._nc_dav_namespaces={...l}),Object.keys(window._nc_dav_namespaces).map(e=>`xmlns:${e}="${window._nc_dav_namespaces?.[e]}"`).join(" ")}function h(){return`<?xml version="1.0"?>\n\t\t<d:propfind ${u()}>\n\t\t\t<d:prop>\n\t\t\t\t${c()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`}function p(){return(0,o.f)()?`/files/${(0,o.G)()}`:`/files/${(0,r.HW)()?.uid}`}const f=p();function v(){const e=(0,n.dC)("dav");return(0,o.f)()?e.replace("remote.php","public.php"):e}const w=v();function g(e=w,t={}){const i=(0,s.UU)(e,{headers:t});function n(e){i.setHeaders({...t,"X-Requested-With":"XMLHttpRequest",requesttoken:e??""})}return(0,r.zo)(n),n((0,r.do)()),(0,s.Gu)().patch("fetch",(e,t)=>{const i=t.headers;return i?.method&&(t.method=i.method,delete i.method),fetch(e,t)}),i}function m(e,t=f,i=w){let n=(0,r.HW)()?.uid;if((0,o.f)())n=n??"anonymous";else if(!n)throw new Error("No user id found");const s=e.props,d=function(e=""){let t=a.P.NONE;return e?(e.includes("G")&&(t|=a.P.READ),e.includes("W")&&(t|=a.P.WRITE),e.includes("CK")&&(t|=a.P.CREATE),e.includes("NV")&&(t|=a.P.UPDATE),e.includes("D")&&(t|=a.P.DELETE),e.includes("R")&&(t|=a.P.SHARE),t):t}(s?.permissions),l=String(s?.["owner-id"]||n),c=s.fileid||0,u=new Date(Date.parse(e.lastmod)),h=new Date(Date.parse(s.creationdate)),p={id:c,source:`${i}${e.filename}`,mtime:isNaN(u.getTime())||0===u.getTime()?void 0:u,crtime:isNaN(h.getTime())||0===h.getTime()?void 0:h,mime:e.mime||"application/octet-stream",displayname:void 0!==s.displayname?String(s.displayname):void 0,size:s?.size||Number.parseInt(s.getcontentlength||"0"),status:c<0?a.c.FAILED:void 0,permissions:d,owner:l,root:t,attributes:{...e,...s,hasPreview:s?.["has-preview"]}};return delete p.attributes?.props,"file"===e.type?new a.a(p):new a.b(p)}},35810(e,t,i){"use strict";i.d(t,{Ss:()=>d,ZH:()=>n.a,aX:()=>n.P,bh:()=>u,pt:()=>n.F,vd:()=>n.b});var r=i(380),n=i(36520),o=i(20005);function s(e,t,i){if(void 0!==e[t])if("array"===i){if(!Array.isArray(e[t]))throw new Error(`View ${t} must be an array`)}else{if(typeof e[t]!==i)throw new Error(`View ${t} must be a ${i}`);if("object"===i&&(null===e[t]||Array.isArray(e[t])))throw new Error(`View ${t} must be an object`)}}function a(e){if("object"!=typeof e||null===e)throw new Error("View column must be an object");if(!e.id||"string"!=typeof e.id)throw new Error("A column id is required");if(!e.title||"string"!=typeof e.title)throw new Error("A column title is required");if(!e.render||"function"!=typeof e.render)throw new Error("A render function is required");s(e,"sort","function"),s(e,"summary","function")}i(53334),Object.freeze({DEFAULT:"default",HIDDEN:"hidden"}),r.m;class d{_view;constructor(e){l(e),this._view=e}get id(){return this._view.id}get name(){return this._view.name}get caption(){return this._view.caption}get emptyTitle(){return this._view.emptyTitle}get emptyCaption(){return this._view.emptyCaption}get getContents(){return this._view.getContents}get hidden(){return this._view.hidden}get icon(){return this._view.icon}set icon(e){this._view.icon=e}get order(){return this._view.order}set order(e){this._view.order=e}get params(){return this._view.params}set params(e){this._view.params=e}get columns(){return this._view.columns}get emptyView(){return this._view.emptyView}get parent(){return this._view.parent}get sticky(){return this._view.sticky}get expanded(){return this._view.expanded}set expanded(e){this._view.expanded=e}get defaultSortKey(){return this._view.defaultSortKey}get loadChildViews(){return this._view.loadChildViews}}function l(e){if(!e.icon||"string"!=typeof e.icon||!(0,o.A)(e.icon))throw new Error("View icon is required and must be a valid svg string");if(!e.id||"string"!=typeof e.id)throw new Error("View id is required and must be a string");if(!e.getContents||"function"!=typeof e.getContents)throw new Error("View getContents is required and must be a function");if(!e.name||"string"!=typeof e.name)throw new Error("View name is required and must be a string");if(s(e,"caption","string"),s(e,"columns","array"),s(e,"defaultSortKey","string"),s(e,"emptyCaption","string"),s(e,"emptyTitle","string"),s(e,"emptyView","function"),s(e,"expanded","boolean"),s(e,"hidden","boolean"),s(e,"loadChildViews","function"),s(e,"order","number"),s(e,"params","object"),s(e,"parent","string"),s(e,"sticky","boolean"),e.columns&&(e.columns.forEach(a),e.columns.reduce((e,t)=>e.add(t.id),new Set).size!==e.columns.length))throw new Error("View columns must have unique ids")}class c extends r.m{_views=[];_currentView=null;register(...e){for(const t of e){if(this._views.find(e=>e.id===t.id))throw new Error(`IView id ${t.id} is already registered`);l(t)}this._views.push(...e),this.dispatchTypedEvent("update",new CustomEvent("update"))}remove(e){const t=this._views.findIndex(t=>t.id===e);-1!==t&&(this._views.splice(t,1),this.dispatchTypedEvent("update",new CustomEvent("update")))}setActive(e){if(null===e)this._currentView=null;else{const t=this._views.find(({id:t})=>t===e);if(!t)throw new Error(`No view with ${e} registered`);this._currentView=t}const t=new CustomEvent("updateActive",{detail:this._currentView});this.dispatchTypedEvent("updateActive",t)}get active(){return this._currentView}get views(){return this._views}}function u(){return void 0===window._nc_navigation&&(window._nc_navigation=new c,n.l.debug("Navigation service initialized")),window._nc_navigation}Object.freeze({UploadFromDevice:0,CreateNew:1,Other:2}),Object.freeze({ReservedName:"reserved name",Character:"character",Extension:"extension"}),Error,Object.freeze({Name:"basename",Modified:"mtime",Size:"size"})}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={id:e,loaded:!1,exports:{}};return r[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=r,e=[],o.O=(t,i,r,n)=>{if(!i){var s=1/0;for(c=0;c<e.length;c++){for(var[i,r,n]=e[c],a=!0,d=0;d<i.length;d++)(!1&n||s>=n)&&Object.keys(o.O).every(e=>o.O[e](i[d]))?i.splice(d--,1):(a=!1,n<s&&(s=n));if(a){e.splice(c--,1);var l=r();void 0!==l&&(t=l)}}return t}n=n||0;for(var c=e.length;c>0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[i,r,n]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((t,i)=>(o.f[i](e,t),t),[])),o.u=e=>e+"-"+e+".js?v="+{1035:"da08d310d18692ca4e27",1764:"6868e3e91c06835cd5e1",2457:"a5c6062829f94c072805",2800:"ea9327a730a5619cd9cc",4271:"085eea602405daebb610",6798:"995524658ab188a2d123",7471:"b4ac70873a3ab192efd0",8192:"3a07db11c463906e3079",9281:"42cc0ff95bc3c2a90752"}[e],o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},i="nextcloud-ui-legacy:",o.l=(e,r,n,s)=>{if(t[e])t[e].push(r);else{var a,d;if(void 0!==n)for(var l=document.getElementsByTagName("script"),c=0;c<l.length;c++){var u=l[c];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==i+n){a=u;break}}a||(d=!0,(a=document.createElement("script")).charset="utf-8",o.nc&&a.setAttribute("nonce",o.nc),a.setAttribute("data-webpack",i+n),a.src=e),t[e]=[r];var h=(i,r)=>{a.onerror=a.onload=null,clearTimeout(p);var n=t[e];if(delete t[e],a.parentNode&&a.parentNode.removeChild(a),n&&n.forEach(e=>e(r)),i)return i(r)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=h.bind(null,a.onerror),a.onload=h.bind(null,a.onload),d&&document.head.appendChild(a)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o.j=5102,(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");if(i.length)for(var r=i.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=i[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{o.b="undefined"!=typeof document&&document.baseURI||self.location.href;var e={5102:0};o.f.j=(t,i)=>{var r=o.o(e,t)?e[t]:void 0;if(0!==r)if(r)i.push(r[2]);else{var n=new Promise((i,n)=>r=e[t]=[i,n]);i.push(r[2]=n);var s=o.p+o.u(t),a=new Error;o.l(s,i=>{if(o.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var n=i&&("load"===i.type?"missing":i.type),s=i&&i.target&&i.target.src;a.message="Loading chunk "+t+" failed.\n("+n+": "+s+")",a.name="ChunkLoadError",a.type=n,a.request=s,r[1](a)}},"chunk-"+t,t)}},o.O.j=t=>0===e[t];var t=(t,i)=>{var r,n,[s,a,d]=i,l=0;if(s.some(t=>0!==e[t])){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);if(d)var c=d(o)}for(t&&t(i);l<s.length;l++)n=s[l],o.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return o.O(c)},i=globalThis.webpackChunknextcloud_ui_legacy=globalThis.webpackChunknextcloud_ui_legacy||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})(),o.nc=void 0;var s=o.O(void 0,[4208],()=>o(85908));s=o.O(s)})();
//# sourceMappingURL=files_sharing-init-public.js.map?v=476fd585daf88723cd63