nextcloud/dist/files_sharing-init-public.js
nextcloud-command e2dc31de77 chore(assets): Recompile assets
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2026-01-24 14:26:14 +00:00

2 lines
No EOL
32 KiB
JavaScript

(()=>{var e,t,r,i={14668(e,t,r){"use strict";r.d(t,{h:()=>u});var i=r(77815),n=r(43627),s=r(84560),o=r(88975),a=r(88140),d=r(78246),l=r(99201),c=r(46502);async function u(e="/",t){const r=(0,d.j)((0,a.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}),a=o.data[0],d=o.data.slice(1);if(a?.filename!==e&&`${a?.filename}/`!==e)throw s.A.debug(`Exepected "${e}" but got filename "${a.filename}" instead.`),new Error("Root node does not match requested path");return{folder:(0,i.pO)(a),contents:d.map(e=>{try{return(0,i.pO)(e)}catch(t){return s.A.error(`Invalid node detected '${e.basename}'`,{error:t}),null}}).filter(Boolean)}}(e,t):await async function(e,t,r){let s=(0,o._)((0,a.u)()).getDirectoryByPath("files",e);if(!s){const t=(0,n.join)((0,i.ei)(),e),r=await l.S.stat(t,{details:!0});s=(0,i.pO)(r.data)}return{folder:s,contents:await(0,c.E)(t,{dir:e,signal:r})}}(e,r.query,t?.signal)}},16488(e,t,r){"use strict";r.d(t,{B:()=>c});var i=r(61338),n=r(35810),s=r(71225),o=r(10810),a=r(85471),d=r(84560),l=r(88975);function c(...e){const t=(0,l._)(...e),r=(0,o.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.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 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,s.pD)(e.source),o="/"===e.dirname?t.getRoot(r):t.getNode(i);if(o){const t=new Set(o._children??[]);return t.delete(e.source),a.Ay.set(o,"_children",[...t.values()]),void d.A.debug("Children updated",{parent:o,node:e,children:o._children})}d.A.debug("Parent path does not exists, skipping children update",{node:e})},addNodeToParentChildren(e){const r=(0,n.bh)()?.active?.id||"files",i=(0,s.pD)(e.source),o="/"===e.dirname?t.getRoot(r):t.getNode(i);if(o){const t=new Set(o._children??[]);return t.add(e.source),a.Ay.set(o,"_children",[...t.values()]),void d.A.debug("Children updated",{parent:o,node:e,children:o._children})}d.A.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}},35810(e,t,r){"use strict";r.d(t,{Ss:()=>_,ZH:()=>a.a,aX:()=>a.P,bh:()=>S,pt:()=>a.F,vd:()=>a.b});var i,n,s,o,a=r(36520),d=r(380),l=r(20005),c=(r(53334),r(65606));function u(){if(n)return i;n=1;const e="object"==typeof c&&c.env&&c.env.NODE_DEBUG&&/\bsemver\b/i.test(c.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return i=e}function h(){if(o)return s;o=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return s={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}Object.freeze({DEFAULT:"default",HIDDEN:"hidden"});var p,f,E,v,w,m,g,N,R,y,I,A,b,O={exports:{}};function L(){if(g)return m;g=1;const e=u(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:r}=h(),{safeRe:i,t:n}=(p||(p=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:n}=h(),s=u(),o=(t=e.exports={}).re=[],a=t.safeRe=[],d=t.src=[],l=t.safeSrc=[],c=t.t={};let p=0;const f="[a-zA-Z0-9-]",E=[["\\s",1],["\\d",n],[f,i]],v=(e,t,r)=>{const i=(e=>{for(const[t,r]of E)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),n=p++;s(e,n,t),c[e]=n,d[n]=t,l[n]=i,o[n]=new RegExp(t,r?"g":void 0),a[n]=new RegExp(i,r?"g":void 0)};v("NUMERICIDENTIFIER","0|[1-9]\\d*"),v("NUMERICIDENTIFIERLOOSE","\\d+"),v("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),v("MAINVERSION",`(${d[c.NUMERICIDENTIFIER]})\\.(${d[c.NUMERICIDENTIFIER]})\\.(${d[c.NUMERICIDENTIFIER]})`),v("MAINVERSIONLOOSE",`(${d[c.NUMERICIDENTIFIERLOOSE]})\\.(${d[c.NUMERICIDENTIFIERLOOSE]})\\.(${d[c.NUMERICIDENTIFIERLOOSE]})`),v("PRERELEASEIDENTIFIER",`(?:${d[c.NONNUMERICIDENTIFIER]}|${d[c.NUMERICIDENTIFIER]})`),v("PRERELEASEIDENTIFIERLOOSE",`(?:${d[c.NONNUMERICIDENTIFIER]}|${d[c.NUMERICIDENTIFIERLOOSE]})`),v("PRERELEASE",`(?:-(${d[c.PRERELEASEIDENTIFIER]}(?:\\.${d[c.PRERELEASEIDENTIFIER]})*))`),v("PRERELEASELOOSE",`(?:-?(${d[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${d[c.PRERELEASEIDENTIFIERLOOSE]})*))`),v("BUILDIDENTIFIER",`${f}+`),v("BUILD",`(?:\\+(${d[c.BUILDIDENTIFIER]}(?:\\.${d[c.BUILDIDENTIFIER]})*))`),v("FULLPLAIN",`v?${d[c.MAINVERSION]}${d[c.PRERELEASE]}?${d[c.BUILD]}?`),v("FULL",`^${d[c.FULLPLAIN]}$`),v("LOOSEPLAIN",`[v=\\s]*${d[c.MAINVERSIONLOOSE]}${d[c.PRERELEASELOOSE]}?${d[c.BUILD]}?`),v("LOOSE",`^${d[c.LOOSEPLAIN]}$`),v("GTLT","((?:<|>)?=?)"),v("XRANGEIDENTIFIERLOOSE",`${d[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),v("XRANGEIDENTIFIER",`${d[c.NUMERICIDENTIFIER]}|x|X|\\*`),v("XRANGEPLAIN",`[v=\\s]*(${d[c.XRANGEIDENTIFIER]})(?:\\.(${d[c.XRANGEIDENTIFIER]})(?:\\.(${d[c.XRANGEIDENTIFIER]})(?:${d[c.PRERELEASE]})?${d[c.BUILD]}?)?)?`),v("XRANGEPLAINLOOSE",`[v=\\s]*(${d[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[c.XRANGEIDENTIFIERLOOSE]})(?:${d[c.PRERELEASELOOSE]})?${d[c.BUILD]}?)?)?`),v("XRANGE",`^${d[c.GTLT]}\\s*${d[c.XRANGEPLAIN]}$`),v("XRANGELOOSE",`^${d[c.GTLT]}\\s*${d[c.XRANGEPLAINLOOSE]}$`),v("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),v("COERCE",`${d[c.COERCEPLAIN]}(?:$|[^\\d])`),v("COERCEFULL",d[c.COERCEPLAIN]+`(?:${d[c.PRERELEASE]})?(?:${d[c.BUILD]})?(?:$|[^\\d])`),v("COERCERTL",d[c.COERCE],!0),v("COERCERTLFULL",d[c.COERCEFULL],!0),v("LONETILDE","(?:~>?)"),v("TILDETRIM",`(\\s*)${d[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",v("TILDE",`^${d[c.LONETILDE]}${d[c.XRANGEPLAIN]}$`),v("TILDELOOSE",`^${d[c.LONETILDE]}${d[c.XRANGEPLAINLOOSE]}$`),v("LONECARET","(?:\\^)"),v("CARETTRIM",`(\\s*)${d[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",v("CARET",`^${d[c.LONECARET]}${d[c.XRANGEPLAIN]}$`),v("CARETLOOSE",`^${d[c.LONECARET]}${d[c.XRANGEPLAINLOOSE]}$`),v("COMPARATORLOOSE",`^${d[c.GTLT]}\\s*(${d[c.LOOSEPLAIN]})$|^$`),v("COMPARATOR",`^${d[c.GTLT]}\\s*(${d[c.FULLPLAIN]})$|^$`),v("COMPARATORTRIM",`(\\s*)${d[c.GTLT]}\\s*(${d[c.LOOSEPLAIN]}|${d[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",v("HYPHENRANGE",`^\\s*(${d[c.XRANGEPLAIN]})\\s+-\\s+(${d[c.XRANGEPLAIN]})\\s*$`),v("HYPHENRANGELOOSE",`^\\s*(${d[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${d[c.XRANGEPLAINLOOSE]})\\s*$`),v("STAR","(<|>)?=?\\s*\\*"),v("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),v("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(O,O.exports)),O.exports),s=function(){if(E)return f;E=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return f=r=>r?"object"!=typeof r?e:r:t}(),{compareIdentifiers:o}=function(){if(w)return v;w=1;const e=/^[0-9]+$/,t=(t,r)=>{if("number"==typeof t&&"number"==typeof r)return t===r?0:t<r?-1:1;const i=e.test(t),n=e.test(r);return i&&n&&(t=+t,r=+r),t===r?0:i&&!n?-1:n&&!i?1:t<r?-1:1};return v={compareIdentifiers:t,rcompareIdentifiers:(e,r)=>t(r,e)}}();class a{constructor(o,d){if(d=s(d),o instanceof a){if(o.loose===!!d.loose&&o.includePrerelease===!!d.includePrerelease)return o;o=o.version}else if("string"!=typeof o)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof o}".`);if(o.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",o,d),this.options=d,this.loose=!!d.loose,this.includePrerelease=!!d.includePrerelease;const l=o.trim().match(d.loose?i[n.LOOSE]:i[n.FULL]);if(!l)throw new TypeError(`Invalid Version: ${o}`);if(this.raw=o,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");l[4]?this.prerelease=l[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<r)return t}return e}):this.prerelease=[],this.build=l[5]?l[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(e("SemVer.compare",this.version,this.options,t),!(t instanceof a)){if("string"==typeof t&&t===this.version)return 0;t=new a(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof a||(e=new a(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(t){if(t instanceof a||(t=new a(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{const i=this.prerelease[r],n=t.prerelease[r];if(e("prerelease compare",r,i,n),void 0===i&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===i)return-1;if(i!==n)return o(i,n)}while(++r)}compareBuild(t){t instanceof a||(t=new a(t,this.options));let r=0;do{const i=this.build[r],n=t.build[r];if(e("build compare",r,i,n),void 0===i&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===i)return-1;if(i!==n)return o(i,n)}while(++r)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?i[n.PRERELEASELOOSE]:i[n.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let i=this.prerelease.length;for(;--i>=0;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);if(-1===i){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let i=[t,e];!1===r&&(i=[t]),0===o(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return m=a}function $(e,t,r){if(void 0!==e[t])if("array"===r){if(!Array.isArray(e[t]))throw new Error(`View ${t} must be an array`)}else{if(typeof e[t]!==r)throw new Error(`View ${t} must be a ${r}`);if("object"===r&&(null===e[t]||Array.isArray(e[t])))throw new Error(`View ${t} must be an object`)}}function T(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");$(e,"sort","function"),$(e,"summary","function")}!function(){if(R)return N;R=1;const e=L();N=(t,r)=>new e(t,r).major}(),function(){if(b)return A;b=1;const e=function(){if(I)return y;I=1;const e=L();return y=(t,r,i=!1)=>{if(t instanceof e)return t;try{return new e(t,r)}catch(e){if(!i)return null;throw e}}}();A=(t,r)=>{const i=e(t,r);return i?i.version:null}}(),d.m;class _{_view;constructor(e){C(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 C(e){if(!e.icon||"string"!=typeof e.icon||!(0,l.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($(e,"caption","string"),$(e,"columns","array"),$(e,"defaultSortKey","string"),$(e,"emptyCaption","string"),$(e,"emptyTitle","string"),$(e,"emptyView","function"),$(e,"expanded","boolean"),$(e,"hidden","boolean"),$(e,"loadChildViews","function"),$(e,"order","number"),$(e,"params","object"),$(e,"parent","string"),$(e,"sticky","boolean"),e.columns&&(e.columns.forEach(T),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 P extends d.m{_views=[];_currentView=null;register(e){if(this._views.find(t=>t.id===e.id))throw new Error(`IView id ${e.id} is already registered`);C(e),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 S(){return void 0===window._nc_navigation&&(window._nc_navigation=new P,a.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"})},37365(e,t,r){"use strict";r.d(t,{w:()=>i}),r(35810),r(53334),r(21777),r(77815),r(84560),r(78246),r(46502),r(66480);const i="search"},39992(e,t,r){"use strict";var i=r(61338),n=r(35810),s=r(10810),o=r(85471),a=r(84560);(0,s.nY)("active",()=>{const e=(0,o.KR)(),t=(0,o.KR)(),r=(0,o.KR)(),s=(0,o.KR)();function d(e){r.value&&r.value.source===e.source&&(r.value=void 0)}function l(e=null){a.A.debug("Setting active view",{view:e}),s.value=e??void 0,r.value=void 0}return(0,o.wB)(r,()=>{"number"==typeof r.value?.fileid&&r.value.fileid!==t.value?.fileid&&(a.A.debug("Updating active fileid in URL query",{fileid:r.value.fileid}),window.OCP.Files.Router.goToRoute(null,{...window.OCP.Files.Router.params,fileid:String(r.value.fileid)},{...window.OCP.Files.Router.query},!0))}),function(){const e=(0,n.bh)();l(e.active),(0,i.B1)("files:node:deleted",d),e.addEventListener("updateActive",e=>{l(e.detail)})}(),{activeAction:e,activeFolder:t,activeNode:r,activeView:s}})},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>'},46502(e,t,r){"use strict";r.d(t,{E:()=>d});var i=r(21777),n=r(77815),s=r(63814),o=r(84560),a=r(99201);async function d(e,{dir:t,signal:r}){const d=(0,i.HW)();if(!d)return[];if((e=e.trim()).length<3)return[];t&&!t.startsWith("/")&&(t=`/${t}`),o.A.debug("Searching for nodes",{query:e,dir:t});const{data:l}=await a.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/${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 r?.aborted?[]:l.results.map(e=>(0,n.pO)(e,n.VA,(0,s.$_)()))}},63779(){},66480(e,t,r){"use strict";r(43690),r(61338),r(35810),r(53334),r(14668),r(39992)},77199(){},77815(e,t,r){"use strict";r.d(t,{CP:()=>u,EY:()=>E,KU:()=>w,VA:()=>f,VX:()=>c,Xn:()=>v,aN:()=>h,ei:()=>p,pO:()=>m});var i=r(21777),n=r(63814),s=r(32505),o=r(44719),a=r(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,s.f)()?`/files/${(0,s.G)()}`:`/files/${(0,i.HW)()?.uid}`}const f=p();function E(){const e=(0,n.dC)("dav");return(0,s.f)()?e.replace("remote.php","public.php"):e}const v=E();function w(e=v,t={}){const r=(0,o.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,o.Gu)().patch("fetch",(e,t)=>{const r=t.headers;return r?.method&&(t.method=r.method,delete r.method),fetch(e,t)}),r}function m(e,t=f,r=v){let n=(0,i.HW)()?.uid;if((0,s.f)())n=n??"anonymous";else if(!n)throw new Error("No user id found");const o=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}(o?.permissions),l=String(o?.["owner-id"]||n),c=o.fileid||0,u=new Date(Date.parse(e.lastmod)),h=new Date(Date.parse(o.creationdate)),p={id:c,source:`${r}${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!==o.displayname?String(o.displayname):void 0,size:o?.size||Number.parseInt(o.getcontentlength||"0"),status:c<0?a.c.FAILED:void 0,permissions:d,owner:l,root:t,attributes:{...e,...o,hasPreview:o?.["has-preview"]}};return delete p.attributes?.props,"file"===e.type?new a.a(p):new a.b(p)}},78246(e,t,r){"use strict";r.d(t,{j:()=>l});var i=r(61338),n=r(46855),s=r(10810),o=r(85471),a=r(84560),d=r(37365);const l=(0,s.nY)("search",()=>{const e=(0,o.KR)(""),t=(0,o.KR)("filter");(0,o.wB)(t,s),(0,o.wB)(e,(e,t)=>{e.trim()!==t.trim()&&s()}),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.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."),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 s(){(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 s=n.params.view===d.w;a.A.debug("Update route for updated search query",{query:e.value,isSearch:s}),r(s)}function l(r){r.id!==d.w&&(e.value="",t.value="filter")}return{query:e,scope:t}})},84560(e,t,r){"use strict";r.d(t,{A:()=>i});const i=(0,r(35947).YK)().setApp("files").detectUser().build()},85908(e,t,r){"use strict";var i=r(61338),n=r(35810),s=r(81222);var o=r(77815),a=r(53334),d=r(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=r(99201);const u=(0,r(35947).YK)().setApp("files_sharing").detectUser().build();var h=r(14668),p=r(63814),f=r(82490),E=r(40173);const v=(0,s.C)("files_sharing","view"),w=(0,s.C)("files_sharing","sharingToken");d.Ay.use(E.Ay);const m=E.Ay.prototype.push;E.Ay.prototype.push=function(...e){return e.length>1?m.call(this,...e):m.call(this,e[0]).catch(N)};const g=E.Ay.prototype.replace;function N(e){if(!(0,E.Pq)(e,E.$c.duplicated))throw e;u.debug("Ignoring duplicated navigation from vue-router",{error:e})}E.Ay.prototype.replace=function(...e){return e.length>1?g.call(this,...e):g.call(this,e[0]).catch(N)};const R=new E.Ay({mode:"history",base:(0,p.Jv)("/s"),linkActiveClass:"active",routes:[{path:"/",redirect:{name:"filelist",params:{view:v,token:w}}},{path:"/:token",name:"filelist",props:!0}],stringifyQuery(e){const t=f.A.stringify(e).replace(/%2F/gim,"/");return t?"?"+t:""}});(()=>{const e=(0,s.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(8192)]).then(r.bind(r,28192));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:`${o.Xn}${o.VA}`,root:o.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,o.ei)(),{data:(0,o.aN)(),details:!0,signal:t});return{contents:[(0,o.pO)(e.data)],folder:new n.vd({id:0,source:`${(0,o.EY)()}${(0,o.ei)()}`,root:(0,o.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 y=(0,s.C)("files_sharing","view"),I=(0,n.bh)();try{I.setActive(y)}catch{I.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)}}(R);const A=(0,s.C)("files_sharing","fileId",null),b=(0,s.C)("files_sharing","sharingToken");null!==A&&window.OCP.Files.Router.goToRoute("filelist",{...window.OCP.Files.Router.params,token:b,fileid:String(A)},{...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&&(u.debug("Loading share attributes",{gridViewAttribute:e}),(0,i.Ic)("files:config:updated",{key:"grid_view",value:!0===e.value}))}})},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}},88975(e,t,r){"use strict";r.d(t,{_:()=>l});var i=r(61338),n=r(10810),s=r(85471),o=r(84560),a=r(99201),d=r(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 r=(0,d.B)();let i;if(t&&"/"!==t){const n=r.getPath(e,t);n&&(i=this.getNode(n))}else i=this.getRoot(e);return i},getNodesByPath(e,t){const r=this.getDirectoryByPath(e,t);return(r?._children??[]).map(e=>this.getNode(e)).filter(Boolean)},updateNodes(e){const t=e.reduce((e,t)=>t.fileid?(e[t.source]=t,e):(o.A.error("Trying to update/set a node without fileid",{node:t}),e),{});s.Ay.set(this,"files",{...this.files,...t})},deleteNodes(e){e.forEach(e=>{e.source&&s.Ay.delete(this.files,e.source)})},setRoot({service:e,root:t}){s.Ay.set(this.roots,e,t)},onDeletedNode(e){this.deleteNodes([e])},onCreatedNode(e){this.updateNodes([e])},onMovedNode({node:e,oldSource:t}){e.fileid?(s.Ay.delete(this.files,t),this.updateNodes([e])):o.A.error("Trying to update/set a node without fileid",{node:e})},async onUpdatedNode(e){if(!e.fileid)return void o.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 o.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&&s.Ay.set(t.attributes,"favorite",1)},onRemoveFavorite(e){const t=this.getNode(e.source);t&&s.Ay.set(t.attributes,"favorite",0)}}})(...e);return t._initialized||((0,i.B1)("files:node:created",t.onCreatedNode),(0,i.B1)("files:node:deleted",t.onDeletedNode),(0,i.B1)("files:node:updated",t.onUpdatedNode),(0,i.B1)("files:node:moved",t.onMovedNode),(0,i.B1)("files:favorites:added",t.onAddFavorite),(0,i.B1)("files:favorites:removed",t.onRemoveFavorite),t._initialized=!0),t}},99201(e,t,r){"use strict";r.d(t,{S:()=>n,t:()=>s});var i=r(77815);const n=(0,i.KU)();async function s(e){const t=(0,i.aN)(),r=await n.stat(`${(0,i.ei)()}${e}`,{details:!0,data:t});return(0,i.pO)(r.data)}}},n={};function s(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={id:e,loaded:!1,exports:{}};return i[e].call(r.exports,r,r.exports,s),r.loaded=!0,r.exports}s.m=i,e=[],s.O=(t,r,i,n)=>{if(!r){var o=1/0;for(c=0;c<e.length;c++){for(var[r,i,n]=e[c],a=!0,d=0;d<r.length;d++)(!1&n||o>=n)&&Object.keys(s.O).every(e=>s.O[e](r[d]))?r.splice(d--,1):(a=!1,n<o&&(o=n));if(a){e.splice(c--,1);var l=i();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]=[r,i,n]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,r)=>(s.f[r](e,t),t),[])),s.u=e=>e+"-"+e+".js?v="+{1035:"da08d310d18692ca4e27",4271:"085eea602405daebb610",5402:"4f921549751b8a679c6b",6590:"4d964638c1daaaca9c34",6798:"97ac15f0b8b580dc0bc6",7471:"9ee6c1057cda0339f62c",8192:"08f414d4f8ca82402f37",9107:"5e0183d8d50cb5068bba",9281:"feab11896533ab67dcd8"}[e],s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},r="nextcloud-ui-legacy:",s.l=(e,i,n,o)=>{if(t[e])t[e].push(i);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")==r+n){a=u;break}}a||(d=!0,(a=document.createElement("script")).charset="utf-8",s.nc&&a.setAttribute("nonce",s.nc),a.setAttribute("data-webpack",r+n),a.src=e),t[e]=[i];var h=(r,i)=>{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(i)),r)return r(i)},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)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.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 r=t.getElementsByTagName("script");if(r.length)for(var i=r.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=r[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})(),(()=>{s.b="undefined"!=typeof document&&document.baseURI||self.location.href;var e={5102:0};s.f.j=(t,r)=>{var i=s.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var n=new Promise((r,n)=>i=e[t]=[r,n]);r.push(i[2]=n);var o=s.p+s.u(t),a=new Error;s.l(o,r=>{if(s.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var n=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+n+": "+o+")",a.name="ChunkLoadError",a.type=n,a.request=o,i[1](a)}},"chunk-"+t,t)}},s.O.j=t=>0===e[t];var t=(t,r)=>{var i,n,[o,a,d]=r,l=0;if(o.some(t=>0!==e[t])){for(i in a)s.o(a,i)&&(s.m[i]=a[i]);if(d)var c=d(s)}for(t&&t(r);l<o.length;l++)n=o[l],s.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return s.O(c)},r=globalThis.webpackChunknextcloud_ui_legacy=globalThis.webpackChunknextcloud_ui_legacy||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),s.nc=void 0;var o=s.O(void 0,[4208],()=>s(85908));o=s.O(o)})();
//# sourceMappingURL=files_sharing-init-public.js.map?v=06164cd0879e4cb4a4f1