Files
nextcloud-server-mirror/dist/files_sharing-init-public.js
2026-09-26 13:38:16 +00:00

2 lines
22 KiB
JavaScript

(()=>{var e={14668(e,t,r){"use strict";r.d(t,{h:()=>u});var i=r(77815),n=r(43627),o=r(88975),s=r(88140),a=r(78246),d=r(64630),l=r(99201),c=r(46502);async function u(e="/",t){const r=(0,a.j)((0,s.u)());return r.query.length<3?await async function(e,t){e=(0,n.join)((0,i.ei)(),e);const r=(0,i.aN)(),o=await l.S.getDirectoryContents(e,{details:!0,data:r,includeSelf:!0,signal:t?.signal}),s=o.data[0],a=o.data.slice(1);if(s?.filename!==e&&`${s?.filename}/`!==e)throw d.v.debug(`Exepected "${e}" but got filename "${s.filename}" instead.`),new Error("Root node does not match requested path");return{folder:(0,i.pO)(s),contents:a.map(e=>{try{return(0,i.pO)(e)}catch(t){return d.v.error(`Invalid node detected '${e.basename}'`,{error:t}),null}}).filter(Boolean)}}(e,t):await async function(e,t,r){let a=(0,o._)((0,s.u)()).getDirectoryByPath("files",e);if(!a){const t=(0,n.join)((0,i.ei)(),e),r=await l.S.stat(t,{details:!0});a=(0,i.pO)(r.data)}return{folder:a,contents:await(0,c.E)(t,{dir:e,signal:r})}}(e,r.query,t?.signal)}},46502(e,t,r){"use strict";r.d(t,{E:()=>c});var i=r(21777),n=r(77815),o=r(63814),s=r(70580),a=r.n(s),d=r(64630),l=r(99201);async function c(e,{dir:t,signal:r}){const s=(0,i.HW)();if(!s)return[];if((e=e.trim()).length<3)return[];t&&!t.startsWith("/")&&(t=`/${t}`),d.v.debug("Searching for nodes",{query:e,dir:t});const{data:c}=await l.S.search("/",{details:!0,signal:r,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/${s.uid}${t?a()(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 r?.aborted?[]:c.results.map(e=>(0,n.pO)(e,n.VA,(0,o.$_)()))}},99201(e,t,r){"use strict";r.d(t,{t:()=>o});var i=r(77815);const n=(0,i.KU)();async function o(e){const t=(0,i.aN)(),r=await n.stat(`${(0,i.ei)()}${e}`,{details:!0,data:t});return(0,i.pO)(r.data)}r.d(t,["S",0,n])},39992(e,t,r){"use strict";var i=r(21777),n=r(71323),o=r(45967),s=r(77815),a=r(10810),d=r(85471),l=r(64630);const c=new o.vd({id:0,source:(0,s.EY)()+(0,s.ei)(),root:(0,s.ei)(),owner:(0,i.HW)()?.uid||null,permissions:o.aX.NONE}),u=(0,a.nY)("active",()=>{const e=(0,d.IJ)(),t=(0,d.KR)(),r=(0,d.IJ)(),i=(0,d.KR)(c);function s(e){t.value&&t.value.source===e.source&&(t.value=void 0)}function a(e=null){l.v.debug("Setting active view",{view:e}),r.value=e??void 0,t.value=void 0}return(0,d.wB)(t,()=>{t.value?.id&&t.value.id!==String(window.OCP.Files.Router.params?.fileid??"")&&(l.v.debug("Updating active fileid in URL query",{fileid:t.value.id}),window.OCP.Files.Router.goToRoute(null,{...window.OCP.Files.Router.params,fileid:t.value.id},{...window.OCP.Files.Router.query},!0))}),function(){const e=(0,o.bh)();a(e.active),(0,n.B1)("files:node:deleted",s),e.addEventListener("updateActive",e=>{a(e.detail)})}(),{activeAction:e,activeFolder:i,activeNode:t,activeView:r}});r.d(t,["F",0,u])},88975(e,t,r){"use strict";r.d(t,{_:()=>c});var i=r(71323),n=r(10810),o=r(85471),s=r(99201),a=r(64630),d=r(39992),l=r(16488);const c=(0,n.nY)("files",()=>{const e=(0,o.KR)({}),t=(0,o.KR)({});function r(t){return e.value[t]}function n(t){return t.map(t=>e.value[t]).filter(Boolean)}function c(t){return Object.values(e.value).filter(e=>e.id===t)}function u(e){return t.value[e]}function p(e,t){const i=(0,l.B)();let n;if(t&&"/"!==t){const o=i.getPath(e,t);o&&(n=r(o))}else n=u(e);return n}function f(t){const r=t.reduce((t,r)=>e.value[r.source]?.id&&!r.id?(a.v.error("Trying to update/set a node without id",{node:r}),t):(t[r.source]=r,t),{});e.value={...e.value,...r};const i=(0,d.F)();i.activeNode&&i.activeNode.source in r&&(i.activeNode=e.value[i.activeNode.source])}function h(t){const r=Object.entries(e.value).filter(([,e])=>!t.some(t=>t.source===e.source));e.value=Object.fromEntries(r)}return(0,i.B1)("files:node:created",function(e){f([e])}),(0,i.B1)("files:node:deleted",function(e){h([e])}),(0,i.B1)("files:node:updated",async function(e){const t=e.id?c(e.id):n([e.source]);if(t.length>1)return await Promise.all(t.map(e=>(0,s.t)(e.path))).then(f),void a.v.debug(t.length+" nodes updated in store",{fileid:e.id,source:e.source});if(1===t.length&&e.source===t[0].source)return void f([e]);f([await(0,s.t)(e.path)])}),(0,i.B1)("files:node:moved",function({node:t,oldSource:r}){delete e.value[r],f([t])}),(0,i.B1)("files:favorites:added",function(e){const t=r(e.source);t&&o.Ay.set(t.attributes,"favorite",1)}),(0,i.B1)("files:favorites:removed",function(e){const t=r(e.source);t&&o.Ay.set(t.attributes,"favorite",0)}),{files:e,roots:t,deleteNodes:h,getDirectoryByPath:p,getNode:r,getNodes:n,getNodesById:c,getNodesByPath:function(e,t){const i=p(e,t);return(i?._children??[]).map(e=>r(e)).filter(Boolean)},getRoot:u,setRoot:function({service:e,root:r}){t.value={...t.value,[e]:r}},updateNodes:f}})},88140(e,t,r){"use strict";r.d(t,{u:()=>n});var i=r(10810);function n(){return window._nc_files_pinia||(window._nc_files_pinia=(0,i.Ey)()),window._nc_files_pinia}},16488(e,t,r){"use strict";r.d(t,{B:()=>c});var i=r(71323),n=r(45967),o=r(71225),s=r(10810),a=r(85471),d=r(64630),l=r(88975);function c(...e){const t=(0,l._)(...e),r=(0,s.nY)("paths",{state:()=>({paths:{}}),getters:{getPath:e=>(t,r)=>{if(e.paths[t])return e.paths[t][r]}},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.v.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 r=(0,n.bh)()?.active?.id||"files";if(e.type===n.pt.Folder){const i=Object.entries(this.paths[r]).find(([,e])=>e===t);i?.[0]&&this.deletePath(r,i[0]),this.addPath({service:r,path:e.path,source:e.source})}const i=new n.ZH({source:t,owner:e.owner,mime:e.mime,root:e.root});this.deleteNodeFromParentChildren(i),this.addNodeToParentChildren(e)},deleteNodeFromParentChildren(e){const r=(0,n.bh)()?.active?.id||"files",i=(0,o.pD)(e.source),s="/"===e.dirname?t.getRoot(r):t.getNode(i);if(s){const t=new Set(s._children??[]);return t.delete(e.source),a.Ay.set(s,"_children",[...t.values()]),void d.v.debug("Children updated",{parent:s,node:e,children:s._children})}d.v.debug("Parent path does not exists, skipping children update",{node:e})},addNodeToParentChildren(e){const r=(0,n.bh)()?.active?.id||"files",i=(0,o.pD)(e.source),s="/"===e.dirname?t.getRoot(r):t.getNode(i);if(s){const t=new Set(s._children??[]);return t.add(e.source),a.Ay.set(s,"_children",[...t.values()]),void d.v.debug("Children updated",{parent:s,node:e,children:s._children})}d.v.debug("Parent path does not exists, skipping children update",{node:e})}}})(...e);return r._initialized||((0,i.B1)("files:node:created",r.onCreatedNode),(0,i.B1)("files:node:deleted",r.onDeletedNode),(0,i.B1)("files:node:moved",r.onMovedNode),r._initialized=!0),r}},78246(e,t,r){"use strict";r.d(t,{j:()=>l});var i=r(71323),n=r(46855),o=r(10810),s=r(85471),a=r(64630),d=r(37365);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,i.B1)("files:navigation:changed",l);const r=window.OCP.Files.Router;r.params.view===d.w&&(e.value=[r.query.query].flat()[0]??"",e.value?(t.value="globally",a.v.debug("Directly navigated to search view",{query:e.value})):(a.v.info("Directly navigated to search view without any query, redirect to files view."),r.goToRoute(void 0,{...r.params,view:"files"},{...r.query,query:void 0},!0)))}();const r=(0,n.A)(t=>{window.OCP.Files.Router.goToRoute(void 0,{view:d.w},{query:e.value},t)});function o(){(0,i.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.v.debug("Update route for updated search query",{query:e.value,isSearch:o}),r(o)}function l(r){r.id!==d.w&&(e.value="",t.value="filter")}return{query:e,scope:t}})},64630(e,t,r){"use strict";const i=(0,r(35947).YK)().setApp("files").detectUser().build();r.d(t,["v",0,i])},66480(e,t,r){"use strict";r(43690),r(71323),r(45967),r(53334),r(14668),r(39992)},37365(e,t,r){"use strict";r.d(t,{w:()=>i}),r(45967),r(53334),r(21777),r(77815),r(78246),r(64630),r(46502),r(66480);const i="search"},42857(e,t,r){"use strict";var i=r(71323),n=r(45967),o=r(81222);var s=r(77815),a=r(53334),d=r(85471);const l=()=>{const e=(0,o.C)("files_sharing","filename");let t,i;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([r.e(4208),r.e(745)]).then(()=>r(30745));t=d.Ay.extend(e)}i&&i.$destroy(),i=new t({propsData:{foldername:e}}),i.$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)};r.dn(l);const c='<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 u=r(99201);const p=(0,r(35947).YK)().setApp("files_sharing").detectUser().build(),f=()=>{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:c,order:1,getContents:async(e,{signal:t})=>{try{const e=await u.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 p.info("Fetching contents for public file share was aborted",{error:e}),new DOMException("Aborted","AbortError");throw p.error("Failed to get contents for public file share",{error:e}),e}}});(0,n.bh)().register(e)};r.dn(f);var h=r(14668);const v=()=>{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:c,order:1,getContents:h.h});(0,n.bh)().register(e)};r.dn(v);var g=r(63814);function m(e,t){return t.encode?t.strict?encodeURIComponent(e).replaceAll(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`):encodeURIComponent(e):e}function w(e,t){if(!e)return"";!function(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}((t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t}).arrayFormatSeparator);const r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],i=function(e){switch(e.arrayFormat){case"index":return t=>(r,i)=>{const n=r.length;return void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:null===i?(r.push([m(t,e),"[",n,"]"].join("")),r):(r.push([m(t,e),"[",m(n,e),"]=",m(i,e)].join("")),r)};case"bracket":return t=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:null===i?(r.push([m(t,e),"[]"].join("")),r):(r.push([m(t,e),"[]=",m(i,e)].join("")),r);case"colon-list-separator":return t=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:null===i?(r.push([m(t,e),":list="].join("")),r):(r.push([m(t,e),":list=",m(i,e)].join("")),r);case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(i,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?i:(n=null===n?"":n,0===i.length?(i.push([m(r,e),t,m(n,e)].join("")),i):(i.push(m(n,e)),i))}default:return t=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:null===i?(r.push(m(t,e)),r):(r.push([m(t,e),"=",m(i,e)].join("")),r)}}(t),n={};for(const[t,i]of Object.entries(e))r(t)||(n[t]=i);const o=Object.keys(n);return!1!==t.sort&&o.sort(t.sort),o.map(r=>{let n=e[r];if(t.replacer&&(n=t.replacer(r,n),void 0===n))return"";if(void 0===n)return"";if(null===n)return m(r,t);if(Array.isArray(n)){if(0===n.length&&"bracket-separator"===t.arrayFormat)return m(r,t)+"[]";let e=n;t.replacer&&(e=n.map((e,i)=>t.replacer(`${r}[${i}]`,e)).filter(e=>void 0!==e));const o=e.reduce(i(r),[]),s=["comma","separator","bracket-separator"].includes(t.arrayFormat)?t.arrayFormatSeparator:"&";return o.join(s)}return m(r,t)+"="+m(n,t)}).filter(e=>e.length>0).join("&")}Symbol("encodeFragmentIdentifier");var y=r(40173);const b=(0,o.C)("files_sharing","view"),P=(0,o.C)("files_sharing","sharingToken");d.Ay.use(y.Ay);const C=y.Ay.prototype.push;y.Ay.prototype.push=function(...e){return e.length>1?C.call(this,...e):C.call(this,e[0]).catch(A)};const N=y.Ay.prototype.replace;function A(e){if(!(0,y.Pq)(e,y.$c.duplicated)&&!(0,y.Pq)(e,y.$c.redirected))throw e;p.debug("Ignoring duplicated/redirected navigation from vue-router",{error:e})}y.Ay.prototype.replace=function(...e){return e.length>1?N.call(this,...e):N.call(this,e[0]).catch(A)};const _=new y.Ay({mode:"history",base:(0,g.Jv)("/s"),linkActiveClass:"active",routes:[{path:"/",redirect:{name:"filelist",params:{view:b,token:P}}},{path:"/:token",name:"filelist",props:!0}],stringifyQuery(e){const t=w(e).replace(/%2F/gim,"/");return t?"?"+t:""}});l(),v(),f();const O=(0,o.C)("files_sharing","view"),T=(0,n.bh)();try{T.setActive(O)}catch{T.setActive(null)}window.OCP.Files=window.OCP.Files??{},window.OCP.Files.Router=new class{constructor(e){var t,r,i;t=this,i=void 0,(r=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(r="router"))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,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,r,i){e??=this.router.currentRoute.name;const n={name:e,query:r,params:t};return i?this._router.replace(n):this._router.push(n)}}(_);const R=(0,o.C)("files_sharing","fileId",null),E=(0,o.C)("files_sharing","sharingToken");null!==R&&window.OCP.Files.Router.goToRoute("filelist",{...window.OCP.Files.Router.params,token:E,fileid:String(R)},{...window.OCP.Files.Router.query,openfile:"true"}),(0,i.B1)("files:list:updated",function e({folder:t}){if((0,i.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&&(p.debug("Loading share attributes",{gridViewAttribute:e}),(0,i.Ic)("files:config:updated",{key:"grid_view",value:!0===e.value}))}})},43690(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-folder-outline" viewBox="0 0 24 24"><path d="M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z" /></svg>'},63779(){},77199(){},58608(e,t,r){"use strict";r.d(t,{e:()=>u,f:()=>c,g:()=>m,h:()=>p,l:()=>v,m:()=>f,n:()=>w});var i=r(21777),n=r(63814),o=r(32505),s=r(44719),a=r(18635);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","nc:upload_time"],l={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"};function c(){return a.s.davProperties??=[...d],a.s.davProperties.map(e=>`<${e} />`).join(" ")}function u(){return a.s.davNamespaces??={...l},Object.keys(a.s.davNamespaces).map(e=>`xmlns:${e}="${a.s.davNamespaces?.[e]}"`).join(" ")}function p(){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 f(){return(0,o.f)()?`/files/${(0,o.G)()}`:`/files/${(0,i.HW)()?.uid}`}const h=f();function v(){const e=(0,n.dC)("dav");return(0,o.f)()?e.replace("remote.php","public.php"):e}const g=v();function m(e=g,t={}){const r=(0,s.UU)(e,{headers:t});function n(e){r.setHeaders({...t,"X-Requested-With":"XMLHttpRequest",requesttoken:e??""})}return(0,i.zo)(n),n((0,i.do)()),(0,s.Gu)().patch("fetch",(e,t)=>{const r=t.headers;return r?.method&&(t.method=r.method,delete r.method),fetch(e,t)}),r}function w(e,t=h,r=g){let n=(0,i.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)),p=new Date(Date.parse(s.creationdate)),f={id:c,source:`${r}${e.filename}`,mtime:isNaN(u.getTime())||0===u.getTime()?void 0:u,crtime:isNaN(p.getTime())||0===p.getTime()?void 0:p,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.N.FAILED:void 0,permissions:d,owner:l,root:t,attributes:{...e,...s,hasPreview:s?.["has-preview"]}};return delete f.attributes?.props,"file"===e.type?new a.F(f):new a.a(f)}r.d(t,["b",0,g,"c",0,h])},77815(e,t,r){"use strict";r.d(t,{CP:()=>i.e,EY:()=>i.l,KU:()=>i.g,VA:()=>i.c,VX:()=>i.f,Xn:()=>i.b,aN:()=>i.h,ei:()=>i.m,pO:()=>i.n});var i=r(58608)}};const t={};function r(i){const n=t[i];if(void 0!==n)return n.exports;const o=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.m=e,(()=>{const e=[];r.O=(t,i,n)=>{if(!i){for(var o=0;o<e.length;o++){let[i,n]=e[o],a=!0;for(var s=0;s<i.length;s++)r.O.j(i[s])?i.splice(s--,1):a=!1;if(a){e.splice(o--,1);const r=n();void 0!==r&&(t=r)}}return t}e.push([i,n])}})(),r.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.cw=e=>{var t;return()=>{if(e){var r=e;e=0,t={exports:{}},r.call(t.exports,t,t.exports)}return t.exports}},r.d=(e,t)=>{if(Array.isArray(t))for(var i=0;i<t.length;){var n=t[i++],o=t[i++],s=0===o?{enumerable:!0,value:t[i++]}:{enumerable:!0,get:o};r.o(e,n)||Object.defineProperty(e,n,s)}else for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>{const t=[];return r.f.j(e,t),Promise.all(t)},r.u=e=>e+"-"+e+".js?v="+{745:"8a3e4341f7290d4c92d8",2751:"c81bdbf6d72b7d33410f",3462:"222ccf9a50d9e1433e7c",4271:"4fb846cf98bdef6bda82",6798:"93837c551f35879aa50f",7471:"e1dc641ea8726e1b57ce",8625:"b132cc15f4fdaae0422b",9281:"fe6b2ef0fac4a7e91af9",9906:"5b93150b0f581f85b3f2"}[e],r.o=(e,t)=>Object.hasOwn(e,t),(()=>{const e={},t="nextcloud-ui-legacy:";r.l=(i,n,o,s)=>{if(e[i])return void e[i].push(n);let a,d;if(void 0!==o){const e=document.getElementsByTagName("script");for(var l=0;l<e.length;l++){const r=e[l];if(r.getAttribute("src")==i||r.getAttribute("data-webpack")==t+o){a=r;break}}}a||(d=!0,a=document.createElement("script"),a.charset="utf-8",r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",t+o),a.src=i),e[i]=[n];const c=(t,r)=>{a.onerror=a.onload=null,clearTimeout(u);const n=e[i];if(delete e[i],a.parentNode?.removeChild(a),n?.forEach(e=>e(r)),t)return t(r)},u=setTimeout(c.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=c.bind(null,a.onerror),a.onload=c.bind(null,a.onload),d&&document.head.appendChild(a)}})(),r.r=e=>{Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.j=5102,r.dn=e=>{var t=Object.getOwnPropertyDescriptor(e,"name");(!t||!t.writable&&t.configurable)&&Object.defineProperty(e,"name",{value:"default",configurable:!0})},(()=>{let e;globalThis.importScripts&&(e=globalThis.location+"");const t=globalThis.document;if(!e&&t&&("SCRIPT"===t.currentScript?.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){const r=t.getElementsByTagName("script");if(r.length){let t=r.length-1;for(;t>-1&&(!e||!/^https?:/.test(e));)e=r[t--].src}}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:|[?#].*$/g,"").replace(/\/[^/]+$/,"/"),r.p=e})(),(()=>{r.b="undefined"!=typeof document&&document.baseURI||self.location.href;const e={5102:0};r.f.j=(t,i)=>{let n=r.o(e,t)?e[t]:void 0;if(0!==n)if(n)i.push(n[2]);else{const o=new Promise((r,i)=>n=e[t]=[r,i]);i.push(n[2]=o);const s=new Error,a=i=>{if(r.o(e,t)&&(n=e[t],0!==n&&(e[t]=void 0),n)){const e=i&&("load"===i.type?"missing":i.type),r=i&&i.target&&i.target.src;s.message="Loading chunk "+t+" failed.\n("+e+": "+r+")",s.name="ChunkLoadError",s.type=e,s.request=r,s.event=i,n[1](s)}};r.l(r.p+r.u(t),a,"chunk-"+t,t)}},r.O.j=t=>0===e[t];const t=(t,i)=>{let[n,o,s]=i;var a,d,l=0;if(n.some(t=>0!==e[t])){for(a in o)r.o(o,a)&&(r.m[a]=o[a]);if(s)var c=s(r)}for(t&&t(i);l<n.length;l++)d=n[l],r.o(e,d)&&e[d]&&e[d][0](),e[d]=0;return r.O(c)},i=globalThis.webpackChunknextcloud_ui_legacy||=[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})(),r.nc=void 0;let i=r.O(void 0,[4208],()=>r(42857));i=r.O(i)})();
//# sourceMappingURL=files_sharing-init-public.js.map?v=b37dbbdd065daf94f47d