From 77f307bafdbb04cb1165d9a3c1a09a242d43f856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Sat, 3 Feb 2024 12:39:43 +0100 Subject: [PATCH] fix(files): dav owner and mime types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ Signed-off-by: nextcloud-command --- apps/files/src/services/Files.ts | 9 +++++++-- dist/files-init.js | 4 ++-- dist/files-init.js.map | 2 +- dist/systemtags-init.js | 4 ++-- dist/systemtags-init.js.map | 2 +- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/apps/files/src/services/Files.ts b/apps/files/src/services/Files.ts index a293154f625e2..bcfb368882d72 100644 --- a/apps/files/src/services/Files.ts +++ b/apps/files/src/services/Files.ts @@ -40,9 +40,14 @@ interface ResponseProps extends DAVResultResponseProps { } export const resultToNode = function(node: FileStat): File | Folder { + const userId = getCurrentUser()?.uid + if (!userId) { + throw new Error('No user id found') + } + const props = node.props as ResponseProps const permissions = davParsePermissions(props?.permissions) - const owner = (props['owner-id'] || getCurrentUser()?.uid) as string + const owner = (props['owner-id'] || userId).toString() const source = generateRemoteUrl('dav' + rootPath + node.filename) const id = props?.fileid < 0 @@ -53,7 +58,7 @@ export const resultToNode = function(node: FileStat): File | Folder { id, source, mtime: new Date(node.lastmod), - mime: node.mime as string, + mime: node.mime || 'application/octet-stream', size: props?.size as number || 0, permissions, owner, diff --git a/dist/files-init.js b/dist/files-init.js index a6baf08b8c4e1..8aec047a5e2d7 100644 --- a/dist/files-init.js +++ b/dist/files-init.js @@ -1,3 +1,3 @@ /*! For license information please see files-init.js.LICENSE.txt */ -(()=>{var e,n,i,r={34507:(e,n,i)=>{"use strict";var r=i(5656),o=i(69183),a=i(31352),s=i(93664),l=i(17499);const d=(0,l.IY)().setApp("files").detectUser().build(),c=new r.p$({id:"delete",displayName:(e,t)=>"trashbin"===t.id?(0,a.Iu)("files","Delete permanently"):(0,a.Iu)("files","Delete"),iconSvgInline:()=>'',enabled:e=>e.length>0&&e.map((e=>e.permissions)).every((e=>0!=(e&r.y3.DELETE))),async exec(e){try{return await s.Z.delete(e.encodedSource),(0,o.j8)("files:node:deleted",e),!0}catch(t){return d.error("Error while deleting a file",{error:t,source:e.source,node:e}),!1}},async execBatch(e,t,n){return Promise.all(e.map((e=>this.exec(e,t,n))))},order:100});var u=i(79753);const p=function(e){const t=document.createElement("a");t.download="",t.href=e,t.click()},f=function(e,t){const n=Math.random().toString(36).substring(2),i=(0,u.generateUrl)("/apps/files/ajax/download.php?dir={dir}&files={files}&downloadStartSecret={secret}",{dir:e,secret:n,files:JSON.stringify(t.map((e=>e.basename)))});p(i)},h=function(e){if(0==(e.permissions&r.y3.READ))return!1;if("shared"===e.attributes["mount-type"]){const t=JSON.parse(e.attributes["share-attributes"]).find((e=>"permissions"===e.scope&&"download"===e.key));if(void 0!==t&&!1===t.enabled)return!1}return!0},A=new r.p$({id:"download",displayName:()=>(0,a.Iu)("files","Download"),iconSvgInline:()=>'',enabled:e=>0!==e.length&&(!e.some((e=>e.type===r.Tv.Folder))||!e.some((e=>!e.root?.startsWith("/files"))))&&e.every(h),exec:async(e,t,n)=>e.type===r.Tv.Folder?(f(n,[e]),null):(p(e.encodedSource),null),async execBatch(e,t,n){return 1===e.length?(this.exec(e[0],t,n),[null]):(f(n,e),new Array(e.length).fill(null))},order:30});var g=i(65358),m=i(77958),w=i(64024);const v=new r.p$({id:"edit-locally",displayName:()=>(0,a.Iu)("files","Edit locally"),iconSvgInline:()=>'',enabled:e=>1===e.length&&0!=(e[0].permissions&r.y3.UPDATE),exec:async e=>(async function(e){const t=(0,u.generateOcsUrl)("apps/files/api/v1")+"/openlocaleditor?format=json";try{const n=await s.Z.post(t,{path:e}),i=(0,m.ts)()?.uid;let r=`nc://open/${i}@`+window.location.host+(0,g.Ec)(e);r+="?token="+n.data.ocs.data.token,window.location.href=r}catch(e){(0,w.x2)((0,a.Iu)("files","Failed to redirect to client"))}}(e.path),null),order:25});var y=i(20144);const b='',C=e=>e.some((e=>1!==e.attributes.favorite)),x=async(e,t,n)=>{try{const i=(0,u.generateUrl)("/apps/files/api/v1/files")+(0,g.Ec)(e.path);return await s.Z.post(i,{tags:n?[window.OC.TAG_FAVORITE]:[]}),"favorites"!==t.id||n||"/"!==e.dirname||(0,o.j8)("files:node:deleted",e),y.default.set(e.attributes,"favorite",n?1:0),n?(0,o.j8)("files:favorites:added",e):(0,o.j8)("files:favorites:removed",e),!0}catch(t){const i=n?"adding a file to favourites":"removing a file from favourites";return d.error("Error while "+i,{error:t,source:e.source,node:e}),!1}},E=new r.p$({id:"favorite",displayName:e=>C(e)?(0,a.Iu)("files","Add to favorites"):(0,a.Iu)("files","Remove from favorites"),iconSvgInline:e=>C(e)?'':b,enabled:e=>!e.some((e=>!e.root?.startsWith?.("/files")))&&e.every((e=>e.permissions!==r.y3.NONE)),async exec(e,t){const n=C([e]);return await x(e,t,n)},async execBatch(e,t){const n=C(e);return Promise.all(e.map((async e=>await x(e,t,n))))},order:-50});var _=i(93379),k=i.n(_),B=i(7795),T=i.n(B),N=i(90569),O=i.n(N),I=i(3565),P=i.n(I),S=i(19216),R=i.n(S),L=i(44589),j=i.n(L),D=i(51473),$={};$.styleTagTransform=j(),$.setAttributes=P(),$.insert=O().bind(null,"head"),$.domAPI=T(),$.insertStyleElement=R(),k()(D.Z,$),D.Z&&D.Z.locals&&D.Z.locals;var M=i(51120);const{Axios:F,AxiosError:V,CanceledError:U,isCancel:H,CancelToken:q,VERSION:z,all:Y,Cancel:W,isAxiosError:G,spread:Z,toFormData:X,AxiosHeaders:K,HttpStatusCode:J,formToJSON:Q,getAdapter:ee,mergeConfig:te}=M.default;var ne=i(62520),ie=i(59546),re=i(96384),oe=i(59440);let ae;const se=()=>(ae||(ae=new oe.Z({concurrency:3})),ae);var le;!function(e){e.MOVE="Move",e.COPY="Copy",e.MOVE_OR_COPY="move-or-copy"}(le||(le={}));const de=e=>0!=(e.reduce(((e,t)=>Math.min(e,t.permissions)),r.y3.ALL)&r.y3.UPDATE),ce=e=>(e=>e.every((e=>!JSON.parse(e.attributes?.["share-attributes"]??"[]").some((e=>"permissions"===e.scope&&!1===e.enabled&&"download"===e.key)))))(e),ue=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e=>`(${e})`,i=e,r=1;for(;t.includes(i);){const t=(0,ne.extname)(e);i=`${(0,ne.basename)(e,t)} ${n(r++)}${t}`}return i},pe=e=>de(e)?ce(e)?le.MOVE_OR_COPY:le.MOVE:le.COPY,fe=async function(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!t)return;if(t.type!==r.Tv.Folder)throw new Error((0,a.Iu)("files","Destination is not a folder"));if(n===le.MOVE&&e.dirname===t.path)throw new Error((0,a.Iu)("files","This file/folder is already in that directory"));if(`${t.path}/`.startsWith(`${e.path}/`))throw new Error((0,a.Iu)("files","You cannot move a file/folder onto itself or into a subfolder of itself"));y.default.set(e,"status",r.e4.LOADING);const s=se();return await s.add((async()=>{const s=e=>1===e?(0,a.Iu)("files","(copy)"):(0,a.Iu)("files","(copy %n)",void 0,e);try{const a=(0,r.rp)(),l=(0,ne.join)(r._o,e.path),d=(0,ne.join)(r._o,t.path);if(n===le.COPY){let n=e.basename;if(!i){const t=await a.getDirectoryContents(d);n=ue(e.basename,t.map((e=>e.basename)),s)}if(await a.copyFile(l,(0,ne.join)(d,n)),e.dirname===t.path){const{data:e}=await a.stat((0,ne.join)(d,n),{details:!0,data:(0,r.h7)()});(0,o.j8)("files:node:created",(0,r.RL)(e))}}else await a.moveFile(l,(0,ne.join)(d,e.basename)),(0,o.j8)("files:node:deleted",e)}catch(e){if(e instanceof V){if(412===e?.response?.status)throw new Error((0,a.Iu)("files","A file or folder with that name already exists in this folder"));if(423===e?.response?.status)throw new Error((0,a.Iu)("files","The files is locked"));if(404===e?.response?.status)throw new Error((0,a.Iu)("files","The file does not exist anymore"));if(e.message)throw new Error(e.message)}throw d.debug(e),new Error}finally{y.default.set(e,"status",void 0)}}))},he=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",n=arguments.length>2?arguments[2]:void 0;const i=n.map((e=>e.fileid)).filter(Boolean),o=(0,w.fn)((0,a.Iu)("files","Choose destination")).allowDirectories(!0).setFilter((e=>0!=(e.permissions&r.y3.CREATE)&&!i.includes(e.fileid))).setMimeTypeFilter([]).setMultiSelect(!1).startAt(t);return new Promise(((t,i)=>{o.setButtonFactory(((i,r)=>{const o=[],s=(0,ne.basename)(r),l=n.map((e=>e.dirname)),d=n.map((e=>e.path));return e!==le.COPY&&e!==le.MOVE_OR_COPY||o.push({label:s?(0,a.Iu)("files","Copy to {target}",{target:s}):(0,a.Iu)("files","Copy"),type:"primary",icon:ie,async callback(e){t({destination:e[0],action:le.COPY})}}),l.includes(r)||d.includes(r)||e!==le.MOVE&&e!==le.MOVE_OR_COPY||o.push({label:s?(0,a.Iu)("files","Move to {target}",{target:s}):(0,a.Iu)("files","Move"),type:e===le.MOVE?"primary":"secondary",icon:re,async callback(e){t({destination:e[0],action:le.MOVE})}}),o})),o.build().pick().catch((e=>{d.debug(e),e instanceof w.Pq?i(new Error((0,a.Iu)("files","Cancelled move or copy operation"))):i(new Error((0,a.Iu)("files","Move or copy operation failed")))}))}))},Ae=new r.p$({id:"move-copy",displayName(e){switch(pe(e)){case le.MOVE:return(0,a.Iu)("files","Move");case le.COPY:return(0,a.Iu)("files","Copy");case le.MOVE_OR_COPY:return(0,a.Iu)("files","Move or copy")}},iconSvgInline:()=>re,enabled:e=>!!e.every((e=>e.root?.startsWith("/files/")))&&e.length>0&&(de(e)||ce(e)),async exec(e,t,n){const i=pe([e]);let r;try{r=await he(i,n,[e])}catch(e){return d.error(e),!1}try{return await fe(e,r.destination,r.action),!0}catch(e){return!!(e instanceof Error&&e.message)&&((0,w.x2)(e.message),null)}},async execBatch(e,t,n){const i=pe(e),r=await he(i,n,e),o=e.map((async e=>{try{return await fe(e,r.destination,r.action),!0}catch(t){return d.error(`Failed to ${r.action} node`,{node:e,error:t}),!1}}));return await Promise.all(o)},order:15}),ge='',me=new r.p$({id:"open-folder",displayName(e){const t=e[0].attributes.displayName||e[0].basename;return(0,a.Iu)("files","Open folder {displayName}",{displayName:t})},iconSvgInline:()=>ge,enabled(e){if(1!==e.length)return!1;const t=e[0];return!!t.isDavRessource&&t.type===r.Tv.Folder&&0!=(t.permissions&r.y3.READ)},exec:async(e,t)=>!(!e||e.type!==r.Tv.Folder)&&(window.OCP.Files.Router.goToRoute(null,{view:t.id,fileid:e.fileid},{dir:e.path}),null),default:r.DT.HIDDEN,order:-100}),we=new r.p$({id:"open-in-files-recent",displayName:()=>(0,a.Iu)("files","Open in Files"),iconSvgInline:()=>"",enabled:(e,t)=>"recent"===t.id,async exec(e){let t=e.dirname;return e.type===r.Tv.Folder&&(t=t+"/"+e.basename),window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:e.fileid},{dir:t}),null},order:-1e3,default:r.DT.HIDDEN}),ve=new r.p$({id:"rename",displayName:()=>(0,a.Iu)("files","Rename"),iconSvgInline:()=>'',enabled:e=>e.length>0&&e.map((e=>e.permissions)).every((e=>0!=(e&r.y3.UPDATE))),exec:async e=>((0,o.j8)("files:node:rename",e),null),order:10});var ye=i(48250);const be=new r.p$({id:"details",displayName:()=>(0,a.Iu)("files","Open details"),iconSvgInline:()=>ye,enabled:e=>1===e.length&&!!e[0]&&!!window?.OCA?.Files?.Sidebar&&((e[0].root?.startsWith("/files/")&&e[0].permissions!==r.y3.NONE)??!1),async exec(e,t,n){try{return await window.OCA.Files.Sidebar.open(e.path),window.OCP.Files.Router.goToRoute(null,{view:t.id,fileid:e.fileid},{dir:n},!0),null}catch(e){return d.error("Error while opening sidebar",{error:e}),!1}},order:-50}),Ce=new r.p$({id:"view-in-folder",displayName:()=>(0,a.Iu)("files","View in folder"),iconSvgInline:()=>re,enabled(e,t){if("files"===t.id)return!1;if(1!==e.length)return!1;const n=e[0];return!!n.isDavRessource&&n.permissions!==r.y3.NONE&&n.type===r.Tv.File},exec:async e=>!(!e||e.type!==r.Tv.File)&&(window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:e.fileid},{dir:e.dirname}),null),order:80}),xe={id:"newFolder",displayName:(0,a.Iu)("files","New folder"),enabled:e=>0!=(e.permissions&r.y3.CREATE),iconSvgInline:'',order:0,async handler(e,t){const n=t.map((e=>e.basename)),i=ue((0,a.Iu)("files","New folder"),n),{fileid:l,source:c}=await(async(e,t)=>{const n=e.source+"/"+t,i=e.encodedSource+"/"+encodeURIComponent(t),r=await(0,s.Z)({method:"MKCOL",url:i,headers:{Overwrite:"F"}});return{fileid:parseInt(r.headers["oc-fileid"]),source:n}})(e,i),u=new r.gt({source:c,id:l,mtime:new Date,owner:(0,m.ts)()?.uid||null,permissions:r.y3.ALL,root:e?.root||"/files/"+(0,m.ts)()?.uid});(0,w.s$)((0,a.Iu)("files",'Created new folder "{name}"',{name:(0,ne.basename)(c)})),d.debug("Created new folder",{folder:u,source:c}),(0,o.j8)("files:node:created",u),(0,o.j8)("files:node:rename",u)}};var Ee=i(43554),_e=i(14596),ke=i(8501),Be=i(79267);const Te="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:"undefined"!=typeof window?window:globalThis,Ne=Te.fetch.bind(Te);Te.Headers,Te.Request,Te.Response;const Oe="@@HOTPATCHER",Ie=()=>{};function Pe(e){return{original:e,methods:[e],final:!1}}class Se{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=Oe}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(e){this.configuration.getEmptyAction=e}control(e,t=!1){if(!e||e.__type__!==Oe)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(e.configuration.registry).forEach((n=>{this.configuration.registry.hasOwnProperty(n)?t&&(this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])):this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])})),e._configuration=this.configuration,this}execute(e,...t){return(this.get(e)||Ie)(...t)}get(e){const t=this.configuration.registry[e];if(!t)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${e}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return function(...e){if(0===e.length)throw new Error("Failed creating sequence: No functions provided");return function(...t){let n=t;const i=this;for(;e.length>0;)n=[e.shift().apply(i,n)];return n[0]}}(...t.methods)}isPatched(e){return!!this.configuration.registry[e]}patch(e,t,n={}){const{chain:i=!1}=n;if(this.configuration.registry[e]&&this.configuration.registry[e].final)throw new Error(`Failed patching '${e}': Method marked as being final`);if("function"!=typeof t)throw new Error(`Failed patching '${e}': Provided method is not a function`);if(i)this.configuration.registry[e]?this.configuration.registry[e].methods.push(t):this.configuration.registry[e]=Pe(t);else if(this.isPatched(e)){const{original:n}=this.configuration.registry[e];this.configuration.registry[e]=Object.assign(Pe(t),{original:n})}else this.configuration.registry[e]=Pe(t);return this}patchInline(e,t,...n){return this.isPatched(e)||this.patch(e,t),this.execute(e,...n)}plugin(e,...t){return t.forEach((t=>{this.patch(e,t,{chain:!0})})),this}restore(e){if(!this.isPatched(e))throw new Error(`Failed restoring method: No method present for key: ${e}`);if("function"!=typeof this.configuration.registry[e].original)throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${e}`);return this.configuration.registry[e].methods=[this.configuration.registry[e].original],this}setFinal(e){if(!this.configuration.registry.hasOwnProperty(e))throw new Error(`Failed marking '${e}' as final: No method found for key`);return this.configuration.registry[e].final=!0,this}}let Re=null;var Le=i(62639),je=i(2568);const De="abcdef0123456789";function $e(e,t){const n=e.url.replace("//",""),i=-1==n.indexOf("/")?"/":n.slice(n.indexOf("/")),r=e.method?e.method.toUpperCase():"GET",o=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&"auth",a=`00000000${t.nc}`.slice(-8),s=function(e,t,n,i,r,o,a){const s=a||je(`${t}:${n}:${i}`);return e&&"md5-sess"===e.toLowerCase()?je(`${s}:${r}:${o}`):s}(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),l=je(`${r}:${i}`),d=je(o?`${s}:${t.nonce}:${a}:${t.cnonce}:${o}:${l}`:`${s}:${t.nonce}:${l}`),c={username:t.username,realm:t.realm,nonce:t.nonce,uri:i,qop:o,response:d,nc:a,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},u=[];for(const e in c)c[e]&&("qop"===e||"nc"===e||"algorithm"===e?u.push(`${e}=${c[e]}`):u.push(`${e}="${c[e]}"`));return`Digest ${u.join(", ")}`}function Me(e){return function(e){if("object"!=typeof e||null===e||"[object Object]"!=Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e)?Object.assign({},e):Object.setPrototypeOf(Object.assign({},e),Object.getPrototypeOf(e))}function Fe(...e){let t=null,n=[...e];for(;n.length>0;){const e=n.shift();t=t?Ve(t,e):Me(e)}return t}function Ve(e,t){const n=Me(e);return Object.keys(t).forEach((e=>{n.hasOwnProperty(e)?Array.isArray(t[e])?n[e]=Array.isArray(n[e])?[...n[e],...t[e]]:[...t[e]]:"object"==typeof t[e]&&t[e]?n[e]="object"==typeof n[e]&&n[e]?Ve(n[e],t[e]):Me(t[e]):n[e]=t[e]:n[e]=t[e]})),n}function Ue(...e){if(0===e.length)return{};const t={};return e.reduce(((e,n)=>(Object.keys(n).forEach((i=>{const r=i.toLowerCase();t.hasOwnProperty(r)?e[t[r]]=n[i]:(t[r]=i,e[i]=n[i])})),e)),{})}var He=i(42830);const qe="function"==typeof ArrayBuffer,{toString:ze}=Object.prototype;function Ye(e){const t=(Re||(Re=new Se),Re);return t.patchInline("request",(e=>t.patchInline("fetch",Ne,e.url,function(e){let t={};const n={method:e.method};if(e.headers&&(t=Ue(t,e.headers)),void 0!==e.data){const[i,r]=function(e){if(!(0,Le.$)()&&e instanceof He.Readable)return[e,{}];if("string"==typeof e)return[e,{}];if(null!=(t=e)&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))return[e,{}];if(function(e){return qe&&(e instanceof ArrayBuffer||"[object ArrayBuffer]"===ze.call(e))}(e))return[e,{}];if(e&&"object"==typeof e)return[JSON.stringify(e),{"content-type":"application/json"}];var t;throw new Error("Unable to convert request body: Unexpected body type: "+typeof e)}(e.data);n.body=i,t=Ue(t,r)}return e.signal&&(n.signal=e.signal),e.withCredentials&&(n.credentials="include"),(0,Le.$)()||(e.httpAgent||e.httpsAgent)&&(n.agent=t=>"http:"===t.protocol?e.httpAgent||new ke.Agent:e.httpsAgent||new Be.Agent),n.headers=t,n}(e))),e)}const We=`/files/${(0,m.ts)()?.uid}`,Ge=(0,u.generateRemoteUrl)("dav"+We),Ze=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ge;const t=(0,_e.eI)(e,{headers:{requesttoken:(0,m.IH)()||""}});return(0,_e.lD)().patch("request",(e=>(e.headers?.method&&(e.method=e.headers.method,delete e.headers.method),async function(e){if(!e._digest)return Ye(e);const t=e._digest;delete e._digest,t.hasDigestAuth&&(e=Fe(e,{headers:{Authorization:$e(e,t)}}));const n=await Ye(e);if(401==n.status){if(t.hasDigestAuth=function(e,t){const n=e.headers&&e.headers.get("www-authenticate")||"";if("digest"!==n.split(/\s/)[0].toLowerCase())return!1;const i=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const e=i.exec(n);if(!e)break;t[e[1]]=e[2]||e[3]}return t.nc+=1,t.cnonce=function(){let e="";for(let t=0;t<32;++t)e=`${e}${De[Math.floor(16*Math.random())]}`;return e}(),!0}(n,t),t.hasDigestAuth){e=Fe(e,{headers:{Authorization:$e(e,t)}});const n=await Ye(e);return 401==n.status?t.hasDigestAuth=!1:t.nc++,n}}else t.nc++;return n}(e)))),t};var Xe=i(3443);const Ke=function(e){return e.split("").reduce((function(e,t){return(e=(e<<5)-e+t.charCodeAt(0))&e}),0)},Je=Ze(),Qe=function(e){const t=e.props,n=(0,r.zu)(t?.permissions),i=t["owner-id"]||(0,m.ts)()?.uid,o=(0,u.generateRemoteUrl)("dav"+We+e.filename),a={id:t?.fileid<0?Ke(o):t?.fileid||0,source:o,mtime:new Date(e.lastmod),mime:e.mime,size:t?.size||0,permissions:n,owner:i,root:We,attributes:{...e,...t,hasPreview:t?.["has-preview"],failed:t?.fileid<0}};return delete a.attributes.props,"file"===e.type?new r.$B(a):new r.gt(a)},et=Ze(),tt=`\n\n\t\n\t\t${(0,r.m0)()}\n\t\n\t\n\t\t1\n\t\n`,nt=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const t=(0,r.h7)();let n;"/"===e&&(n=await et.stat(e,{details:!0,data:t}));const i=await et.getDirectoryContents(e,{details:!0,data:"/"===e?tt:t,headers:{method:"/"===e?"REPORT":"PROPFIND"},includeSelf:!0}),o=n?.data||i.data[0],a=i.data.filter((t=>t.filename!==e));return{folder:Qe(o),contents:a.map(Qe)}},it=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new r.G7({id:rt(e.path),name:(0,ne.basename)(e.path),icon:ge,order:t,params:{dir:e.path,fileid:e.fileid.toString(),view:"favorites"},parent:"favorites",columns:[],getContents:nt})},rt=function(e){return`favorite-${Ke(e)}`},ot=(0,r.rp)(),at=Math.round(Date.now()/1e3-1209600);var st=i(52506),lt=i(79584);const dt={name:"TemplatePreview",inheritAttrs:!1,props:{basename:{type:String,required:!0},checked:{type:Boolean,default:!1},fileid:{type:[String,Number],required:!0},filename:{type:String,required:!0},previewUrl:{type:String,default:null},hasPreview:{type:Boolean,default:!0},mime:{type:String,required:!0},ratio:{type:Number,default:null}},data:()=>({failedPreview:!1}),computed:{nameWithoutExt(){return this.basename.indexOf(".")>-1?this.basename.split(".").slice(0,-1).join("."):this.basename},id(){return`template-picker-${this.fileid}`},realPreviewUrl(){return this.failedPreview&&this.mimeIcon?this.mimeIcon:this.previewUrl?this.previewUrl:(0,m.ts)()?(0,u.generateUrl)(`/core/preview?fileId=${this.fileid}&x=256&y=256&a=1`):(0,u.generateUrl)(`/apps/files_sharing/publicpreview/${document.getElementById("sharingToken")&&document.getElementById("sharingToken").value}?fileId=${this.fileid}&file=${function(e){const t=(e.startsWith("/")?e:`/${e}`).split("/");let n="";return t.forEach((e=>{""!==e&&(n+="/"+encodeURIComponent(e))})),n}(this.filename)}&x=256&y=256&a=1`)},mimeIcon(){return OC.MimeType.getIconUrl(this.mime)}},methods:{onCheck(){this.$emit("check",this.fileid)},onFailure(){this.failedPreview=!0}}};var ct=i(92246),ut={};ut.styleTagTransform=j(),ut.setAttributes=P(),ut.insert=O().bind(null,"head"),ut.domAPI=T(),ut.insertStyleElement=R(),k()(ct.Z,ut),ct.Z&&ct.Z.locals&&ct.Z.locals;var pt=i(51900);const ft=(0,pt.Z)(dt,(function(){var e=this,t=e._self._c;return t("li",{staticClass:"template-picker__item"},[t("input",{staticClass:"radio",attrs:{id:e.id,type:"radio",name:"template-picker"},domProps:{checked:e.checked},on:{change:e.onCheck}}),e._v(" "),t("label",{staticClass:"template-picker__label",attrs:{for:e.id}},[t("div",{staticClass:"template-picker__preview",class:e.failedPreview?"template-picker__preview--failed":""},[t("img",{staticClass:"template-picker__image",attrs:{src:e.realPreviewUrl,alt:"",draggable:"false"},on:{error:e.onFailure}})]),e._v(" "),t("span",{staticClass:"template-picker__title"},[e._v("\n\t\t\t"+e._s(e.nameWithoutExt)+"\n\t\t")])])])}),[],!1,null,"0859a92c",null).exports,ht=y.default.extend({name:"TemplatePicker",components:{NcEmptyContent:st.Z,NcModal:lt.Z,TemplatePreview:ft},props:{logger:{type:Object,required:!0}},data:()=>({checked:-1,loading:!1,name:null,opened:!1,provider:null}),computed:{extension(){return(0,ne.extname)(this.name)},nameWithoutExt(){return this.extension?this.name.slice(0,0-this.extension.length):this.name},emptyTemplate(){return{basename:t("files","Blank"),fileid:-1,filename:this.t("files","Blank"),hasPreview:!1,mime:this.provider?.mimetypes[0]||this.provider?.mimetypes}},selectedTemplate(){return this.provider?this.provider.templates.find((e=>e.fileid===this.checked)):null},style(){if(!this.provider)return{};const e=(this.provider.ratio?this.provider.ratio:1.77)>1?240:160;return{"--margin":"8px","--width":e+"px","--border":"2px","--fullwidth":e+16+4+"px","--height":this.provider.ratio?Math.round(e/this.provider.ratio)+"px":null}}},methods:{async open(e,t){this.checked=this.emptyTemplate.fileid,this.name=e,this.provider=t;const n=(await async function(){return(await s.Z.get((0,u.generateOcsUrl)("apps/files/api/v1/templates"))).data.ocs.data}()).find((e=>e.app===t.app&&e.label===t.label));if(null===n)throw new Error("Failed to match provider in results");this.provider=n,0!==n.templates.length?this.opened=!0:this.onSubmit()},close(){this.checked=this.emptyTemplate.fileid,this.loading=!1,this.name=null,this.opened=!1,this.provider=null},onCheck(e){this.checked=e},async onSubmit(){this.loading=!0;const e=new URL(window.location.href).searchParams.get("dir")||"/";this.nameWithoutExt===this.name&&(this.logger.warn("Fixed invalid filename",{name:this.name,extension:this.provider?.extension}),this.name=this.name+this.provider?.extension);try{const t=await async function(e,t,n){return(await s.Z.post((0,u.generateOcsUrl)("apps/files/api/v1/templates/create"),{filePath:e,templatePath:t,templateType:n})).data.ocs.data}((0,ne.normalize)(`${e}/${this.name}`),this.selectedTemplate?.filename,this.selectedTemplate?.templateType);this.logger.debug("Created new file",t);const n=(0,m.ts)()?.uid||null,i=new r.$B({id:t.fileid,source:(0,u.generateRemoteUrl)((0,ne.join)("dav/files",n,t.filename)),root:`/files/${n}`,mime:t.mime,mtime:new Date(1e3*t.lastmod),owner:n,size:t.size,permissions:t.permissions,attributes:{...t,"has-preview":t.hasPreview}});(0,o.j8)("files:node:created",i),window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:i.fileid},{dir:i.dirname,openfile:!0}),this.close()}catch(e){this.logger.error("Error while creating the new file from template",{error:e}),(0,w.x2)(this.t("files","Unable to create new file from template"))}finally{this.loading=!1}}}});var At=i(24142),gt={};gt.styleTagTransform=j(),gt.setAttributes=P(),gt.insert=O().bind(null,"head"),gt.domAPI=T(),gt.insertStyleElement=R(),k()(At.Z,gt),At.Z&&At.Z.locals&&At.Z.locals;const mt=(0,pt.Z)(ht,(function(){var e=this,t=e._self._c;return e._self._setupProxy,e.opened?t("NcModal",{staticClass:"templates-picker",attrs:{"clear-view-delay":-1,size:"large"},on:{close:e.close}},[t("form",{staticClass:"templates-picker__form",style:e.style,on:{submit:function(t){return t.preventDefault(),t.stopPropagation(),e.onSubmit.apply(null,arguments)}}},[t("h2",[e._v(e._s(e.t("files","Pick a template for {name}",{name:e.nameWithoutExt})))]),e._v(" "),t("ul",{staticClass:"templates-picker__list"},[t("TemplatePreview",e._b({attrs:{checked:e.checked===e.emptyTemplate.fileid},on:{check:e.onCheck}},"TemplatePreview",e.emptyTemplate,!1)),e._v(" "),e._l(e.provider.templates,(function(n){return t("TemplatePreview",e._b({key:n.fileid,attrs:{checked:e.checked===n.fileid,ratio:e.provider.ratio},on:{check:e.onCheck}},"TemplatePreview",n,!1))}))],2),e._v(" "),t("div",{staticClass:"templates-picker__buttons"},[t("input",{staticClass:"primary",attrs:{type:"submit","aria-label":e.t("files","Create a new file with the selected template")},domProps:{value:e.t("files","Create")}})])]),e._v(" "),e.loading?t("NcEmptyContent",{staticClass:"templates-picker__loading",attrs:{icon:"icon-loading"}},[e._v("\n\t\t"+e._s(e.t("files","Creating file"))+"\n\t")]):e._e()],1):e._e()}),[],!1,null,"48121b39",null).exports,wt=(0,l.IY)().setApp("files").detectUser().build();y.default.mixin({methods:{t:a.Iu,n:a.uN}});const vt=document.createElement("div");vt.id="template-picker",document.body.appendChild(vt);let yt=(0,Ee.j)("files","templates",[]),bt=(0,Ee.j)("files","templates_path",!1);wt.debug("Templates providers",{templates:yt}),wt.debug("Templates folder",{templatesPath:bt});const Ct=new(y.default.extend(mt))({name:"TemplatePicker",propsData:{logger:wt}});Ct.$mount("#template-picker"),bt||(wt.debug("Templates folder not initialized"),(0,r.cd)({id:"template-picker",displayName:(0,a.Iu)("files","Create new templates folder"),iconSvgInline:'',order:10,enabled:e=>e.owner===(0,m.ts)()?.uid&&0!=(e.permissions&r.y3.CREATE),handler(e,t){const n=t.map((e=>e.basename)),i=ue((0,a.Iu)("files","Templates"),n);xt(e,i),(0,r.oE)("template-picker")}})),yt.forEach(((e,t)=>{(0,r.cd)({id:`template-new-${e.app}-${t}`,displayName:e.label,iconClass:e.iconClass||"icon-file",enabled:e=>0!=(e.permissions&r.y3.CREATE),order:11,handler(t,n){const i=n.map((e=>e.basename)),r=ue(e.label+e.extension,i);Ct.open(r,e)}})}));const xt=async function(e,t){const n=(0,ne.join)(e.path,t);try{wt.debug("Initializing the templates directory",{templatePath:n});const e=await s.Z.post((0,u.generateOcsUrl)("apps/files/api/v1/templates/path"),{templatePath:n,copySystemTemplates:!0});window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:void 0},{dir:n}),yt=e.data.ocs.data.templates,bt=e.data.ocs.data.template_path}catch(e){wt.error("Unable to initialize the templates directory"),(0,w.x2)((0,a.Iu)("files","Unable to initialize the templates directory"))}};(0,r.p4)(c),(0,r.p4)(A),(0,r.p4)(v),(0,r.p4)(E),(0,r.p4)(Ae),(0,r.p4)(me),(0,r.p4)(we),(0,r.p4)(ve),(0,r.p4)(be),(0,r.p4)(Ce),(0,r.cd)(xe),(()=>{const e=(0,Ee.j)("files","favoriteFolders",[]),t=e.map(((e,t)=>it(e,t)));d.debug("Generating favorites view",{favoriteFolders:e});const n=(0,r.Ti)();n.register(new r.G7({id:"favorites",name:(0,a.Iu)("files","Favorites"),caption:(0,a.Iu)("files","List of favorites files and folders."),emptyTitle:(0,a.Iu)("files","No favorites yet"),emptyCaption:(0,a.Iu)("files","Files and folders you mark as favorite will show up here"),icon:b,order:5,columns:[],getContents:nt})),t.forEach((e=>n.register(e))),(0,o.Ld)("files:favorites:added",(e=>{e.type===r.Tv.Folder&&(null!==e.path&&e.root?.startsWith("/files")?s(e):d.error("Favorite folder is not within user files root",{node:e}))})),(0,o.Ld)("files:favorites:removed",(e=>{e.type===r.Tv.Folder&&(null!==e.path&&e.root?.startsWith("/files")?l(e.path):d.error("Favorite folder is not within user files root",{node:e}))}));const i=function(){e.sort(((e,t)=>e.path.localeCompare(t.path,(0,a.G3)(),{ignorePunctuation:!0}))),e.forEach(((e,n)=>{const i=t.find((t=>t.id===rt(e.path)));i&&(i.order=n)}))},s=function(r){const o={path:r.path,fileid:r.fileid},a=it(o);e.find((e=>e.path===r.path))||(e.push(o),t.push(a),i(),n.register(a))},l=function(r){const o=rt(r),a=e.findIndex((e=>e.path===r));-1!==a&&(e.splice(a,1),t.splice(a,1),n.remove(o),i())}})(),(0,r.Ti)().register(new r.G7({id:"files",name:(0,a.Iu)("files","All files"),caption:(0,a.Iu)("files","List of your files and folders."),icon:ge,order:0,getContents:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const t=new AbortController,n=(0,r.h7)();return new Xe.CancelablePromise((async(i,r,o)=>{o((()=>t.abort()));try{const r=await Je.getDirectoryContents(e,{details:!0,data:n,includeSelf:!0,signal:t.signal}),o=r.data[0],a=r.data.slice(1);if(o.filename!==e)throw new Error("Root node does not match requested path");i({folder:Qe(o),contents:a.map((e=>{try{return Qe(e)}catch(t){return d.error(`Invalid node detected '${e.basename}'`,{error:t}),null}})).filter(Boolean)})}catch(e){r(e)}}))}})),(0,r.Ti)().register(new r.G7({id:"recent",name:(0,a.Iu)("files","Recent"),caption:(0,a.Iu)("files","List of recently modified files and folders."),emptyTitle:(0,a.Iu)("files","No recently modified files"),emptyCaption:(0,a.Iu)("files","Files and folders you recently modified will show up here."),icon:'',order:2,defaultSortKey:"mtime",getContents:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const t=(await ot.getDirectoryContents(e,{details:!0,data:(0,r.tB)(at),headers:{method:"SEARCH","Content-Type":"application/xml; charset=utf-8"},deep:!0})).data;return{folder:new r.gt({id:0,source:`${r.SR}${r._o}`,root:r._o,owner:(0,m.ts)()?.uid||null,permissions:r.y3.READ}),contents:t.map((e=>(0,r.RL)(e)))}}})),"serviceWorker"in navigator?window.addEventListener("load",(async()=>{try{const e=(0,u.generateUrl)("/apps/files/preview-service-worker.js",{},{noRewrite:!0}),t=await navigator.serviceWorker.register(e,{scope:"/"});d.debug("SW registered: ",{registration:t})}catch(e){d.error("SW registration failed: ",{error:e})}})):d.debug("Service Worker is not enabled on this browser."),(0,r.qq)("nc:hidden",{nc:"http://nextcloud.org/ns"}),(0,r.qq)("nc:metadata-files-live-photo",{nc:"http://nextcloud.org/ns"})},50584:e=>{e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},3443:function(e,t,n){var i,r,o=n(25108);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=function(e){"use strict";function t(e,n){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},t(e,n)}function n(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=i(e);if(t){var o=i(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n{"use strict";n.d(t,{Z:()=>h});var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o),s=n(61667),l=n.n(s),d=new URL(n(79839),n.b),c=new URL(n(88717),n.b),u=a()(r()),p=l()(d),f=l()(c);u.push([e.id,`@charset "UTF-8";\n/**\n * @copyright Copyright (c) 2019 Julius Härtl \n *\n * @author Julius Härtl \n * @author John Molakvoæ \n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n.toastify.dialogs {\n min-width: 200px;\n background: none;\n background-color: var(--color-main-background);\n color: var(--color-main-text);\n box-shadow: 0 0 6px 0 var(--color-box-shadow);\n padding: 0 12px;\n margin-top: 45px;\n position: fixed;\n z-index: 10100;\n border-radius: var(--border-radius);\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-container {\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-button,\n.toastify.dialogs .toast-close {\n position: static;\n overflow: hidden;\n box-sizing: border-box;\n min-width: 44px;\n height: 100%;\n padding: 12px;\n white-space: nowrap;\n background-repeat: no-repeat;\n background-position: center;\n background-color: transparent;\n min-height: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close,\n.toastify.dialogs .toast-close.toast-close {\n text-indent: 0;\n opacity: .4;\n border: none;\n min-height: 44px;\n margin-left: 10px;\n font-size: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close:before,\n.toastify.dialogs .toast-close.toast-close:before {\n background-image: url(${p});\n content: " ";\n filter: var(--background-invert-if-dark);\n display: inline-block;\n width: 16px;\n height: 16px;\n}\n.toastify.dialogs .toast-undo-button.toast-undo-button,\n.toastify.dialogs .toast-close.toast-undo-button {\n height: calc(100% - 6px);\n margin: 3px 3px 3px 12px;\n}\n.toastify.dialogs .toast-undo-button:hover,\n.toastify.dialogs .toast-undo-button:focus,\n.toastify.dialogs .toast-undo-button:active,\n.toastify.dialogs .toast-close:hover,\n.toastify.dialogs .toast-close:focus,\n.toastify.dialogs .toast-close:active {\n cursor: pointer;\n opacity: 1;\n}\n.toastify.dialogs.toastify-top {\n right: 10px;\n}\n.toastify.dialogs.toast-with-click {\n cursor: pointer;\n}\n.toastify.dialogs.toast-error {\n border-left: 3px solid var(--color-error);\n}\n.toastify.dialogs.toast-info {\n border-left: 3px solid var(--color-primary);\n}\n.toastify.dialogs.toast-warning {\n border-left: 3px solid var(--color-warning);\n}\n.toastify.dialogs.toast-success,\n.toastify.dialogs.toast-undo {\n border-left: 3px solid var(--color-success);\n}\n.theme--dark .toastify.dialogs .toast-close.toast-close:before {\n background-image: url(${f});\n}\n._file-picker__file-icon_1vgv4_5 {\n width: 32px;\n height: 32px;\n min-width: 32px;\n min-height: 32px;\n background-repeat: no-repeat;\n background-size: contain;\n display: flex;\n justify-content: center;\n}\ntr.file-picker__row[data-v-6aded0d9] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-6aded0d9] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td.row-checkbox[data-v-6aded0d9] {\n padding: 0 2px;\n}\ntr.file-picker__row td[data-v-6aded0d9]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-6aded0d9] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-6aded0d9] {\n padding-inline: 2px 0;\n}\n@keyframes gradient-6aded0d9 {\n 0% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n to {\n background-position: 0% 50%;\n }\n}\n.loading-row .row-checkbox[data-v-6aded0d9] {\n text-align: center !important;\n}\n.loading-row span[data-v-6aded0d9] {\n display: inline-block;\n height: 24px;\n background: linear-gradient(to right, var(--color-background-darker), var(--color-text-maxcontrast), var(--color-background-darker));\n background-size: 600px 100%;\n border-radius: var(--border-radius);\n animation: gradient-6aded0d9 12s ease infinite;\n}\n.loading-row .row-wrapper[data-v-6aded0d9] {\n display: inline-flex;\n align-items: center;\n}\n.loading-row .row-checkbox span[data-v-6aded0d9] {\n width: 24px;\n}\n.loading-row .row-name span[data-v-6aded0d9]:last-of-type {\n margin-inline-start: 6px;\n width: 130px;\n}\n.loading-row .row-size span[data-v-6aded0d9] {\n width: 80px;\n}\n.loading-row .row-modified span[data-v-6aded0d9] {\n width: 90px;\n}\ntr.file-picker__row[data-v-48df4f27] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-48df4f27] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td.row-checkbox[data-v-48df4f27] {\n padding: 0 2px;\n}\ntr.file-picker__row td[data-v-48df4f27]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-48df4f27] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-48df4f27] {\n padding-inline: 2px 0;\n}\n.file-picker__row--selected[data-v-48df4f27] {\n background-color: var(--color-background-dark);\n}\n.file-picker__row[data-v-48df4f27]:hover {\n background-color: var(--color-background-hover);\n}\n.file-picker__name-container[data-v-48df4f27] {\n display: flex;\n justify-content: start;\n align-items: center;\n height: 100%;\n}\n.file-picker__file-name[data-v-48df4f27] {\n padding-inline-start: 6px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.file-picker__file-extension[data-v-48df4f27] {\n color: var(--color-text-maxcontrast);\n min-width: fit-content;\n}\n.file-picker__header-preview[data-v-d3c94818] {\n width: 22px;\n height: 32px;\n flex: 0 0 auto;\n}\n.file-picker__files[data-v-d3c94818] {\n margin: 2px;\n margin-inline-start: 12px;\n overflow: scroll auto;\n}\n.file-picker__files table[data-v-d3c94818] {\n width: 100%;\n max-height: 100%;\n table-layout: fixed;\n}\n.file-picker__files th[data-v-d3c94818] {\n position: sticky;\n z-index: 1;\n top: 0;\n background-color: var(--color-main-background);\n padding: 2px;\n}\n.file-picker__files th .header-wrapper[data-v-d3c94818] {\n display: flex;\n}\n.file-picker__files th.row-checkbox[data-v-d3c94818] {\n width: 44px;\n}\n.file-picker__files th.row-name[data-v-d3c94818] {\n width: 230px;\n}\n.file-picker__files th.row-size[data-v-d3c94818] {\n width: 100px;\n}\n.file-picker__files th.row-modified[data-v-d3c94818] {\n width: 120px;\n}\n.file-picker__files th[data-v-d3c94818]:not(.row-size) .button-vue__wrapper {\n justify-content: start;\n flex-direction: row-reverse;\n}\n.file-picker__files th[data-v-d3c94818]:not(.row-size) .button-vue {\n padding-inline: 16px 4px;\n}\n.file-picker__files th.row-size[data-v-d3c94818] .button-vue__wrapper {\n justify-content: end;\n}\n.file-picker__files th[data-v-d3c94818] .button-vue__wrapper {\n color: var(--color-text-maxcontrast);\n}\n.file-picker__files th[data-v-d3c94818] .button-vue__wrapper .button-vue__text {\n font-weight: 400;\n}\n.file-picker__breadcrumbs[data-v-3bc9efa5] {\n flex-grow: 0 !important;\n}\n.file-picker__side[data-v-e96bec41] {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: .5rem;\n min-width: 200px;\n padding: 2px;\n overflow: auto;\n}\n.file-picker__side[data-v-e96bec41] .button-vue__wrapper {\n justify-content: start;\n}\n.file-picker__filter-input[data-v-e96bec41] {\n margin-block: 7px;\n max-width: 260px;\n}\n@media (max-width: 736px) {\n .file-picker__side[data-v-e96bec41] {\n flex-direction: row;\n min-width: unset;\n }\n}\n@media (max-width: 512px) {\n .file-picker__side[data-v-e96bec41] {\n flex-direction: row;\n min-width: unset;\n }\n .file-picker__filter-input[data-v-e96bec41] {\n max-width: unset;\n }\n}\n.file-picker__navigation {\n padding-inline: 8px 2px;\n}\n.file-picker__navigation,\n.file-picker__navigation * {\n box-sizing: border-box;\n}\n.file-picker__navigation .v-select.select {\n min-width: 220px;\n}\n@media (min-width: 513px) and (max-width: 736px) {\n .file-picker__navigation {\n gap: 11px;\n }\n}\n@media (max-width: 512px) {\n .file-picker__navigation {\n flex-direction: column-reverse !important;\n }\n}\n.file-picker__view[data-v-821451ce] {\n height: 50px;\n display: flex;\n justify-content: start;\n align-items: center;\n}\n.file-picker__view h3[data-v-821451ce] {\n font-weight: 700;\n height: fit-content;\n margin: 0;\n}\n.file-picker__main[data-v-821451ce] {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1;\n padding-inline: 2px;\n}\n.file-picker__main *[data-v-821451ce] {\n box-sizing: border-box;\n}\n[data-v-821451ce] .file-picker {\n height: min(80vh, 800px) !important;\n}\n@media (max-width: 512px) {\n [data-v-821451ce] .file-picker {\n height: calc(100% - 16px - var(--default-clickable-area)) !important;\n }\n}\n[data-v-821451ce] .file-picker__content {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n`,"",{version:3,sources:["webpack://./node_modules/@nextcloud/dialogs/dist/style.css"],names:[],mappings:"AAAA,gBAAgB;AAChB;;;;;;;;;;;;;;;;;;;;EAoBE;AACF;EACE,gBAAgB;EAChB,gBAAgB;EAChB,8CAA8C;EAC9C,6BAA6B;EAC7B,6CAA6C;EAC7C,eAAe;EACf,gBAAgB;EAChB,eAAe;EACf,cAAc;EACd,mCAAmC;EACnC,aAAa;EACb,mBAAmB;AACrB;AACA;EACE,aAAa;EACb,mBAAmB;AACrB;AACA;;EAEE,gBAAgB;EAChB,gBAAgB;EAChB,sBAAsB;EACtB,eAAe;EACf,YAAY;EACZ,aAAa;EACb,mBAAmB;EACnB,4BAA4B;EAC5B,2BAA2B;EAC3B,6BAA6B;EAC7B,aAAa;AACf;AACA;;EAEE,cAAc;EACd,WAAW;EACX,YAAY;EACZ,gBAAgB;EAChB,iBAAiB;EACjB,YAAY;AACd;AACA;;EAEE,yDAA8Q;EAC9Q,YAAY;EACZ,wCAAwC;EACxC,qBAAqB;EACrB,WAAW;EACX,YAAY;AACd;AACA;;EAEE,wBAAwB;EACxB,wBAAwB;AAC1B;AACA;;;;;;EAME,eAAe;EACf,UAAU;AACZ;AACA;EACE,WAAW;AACb;AACA;EACE,eAAe;AACjB;AACA;EACE,yCAAyC;AAC3C;AACA;EACE,2CAA2C;AAC7C;AACA;EACE,2CAA2C;AAC7C;AACA;;EAEE,2CAA2C;AAC7C;AACA;EACE,yDAAsT;AACxT;AACA;EACE,WAAW;EACX,YAAY;EACZ,eAAe;EACf,gBAAgB;EAChB,4BAA4B;EAC5B,wBAAwB;EACxB,aAAa;EACb,uBAAuB;AACzB;AACA;EACE,+BAA+B;AACjC;AACA;EACE,eAAe;EACf,gBAAgB;EAChB,uBAAuB;EACvB,mBAAmB;AACrB;AACA;EACE,cAAc;AAChB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,eAAe;EACf,sBAAsB;AACxB;AACA;EACE,qBAAqB;AACvB;AACA;EACE;IACE,2BAA2B;EAC7B;EACA;IACE,6BAA6B;EAC/B;EACA;IACE,2BAA2B;EAC7B;AACF;AACA;EACE,6BAA6B;AAC/B;AACA;EACE,qBAAqB;EACrB,YAAY;EACZ,oIAAoI;EACpI,2BAA2B;EAC3B,mCAAmC;EACnC,8CAA8C;AAChD;AACA;EACE,oBAAoB;EACpB,mBAAmB;AACrB;AACA;EACE,WAAW;AACb;AACA;EACE,wBAAwB;EACxB,YAAY;AACd;AACA;EACE,WAAW;AACb;AACA;EACE,WAAW;AACb;AACA;EACE,+BAA+B;AACjC;AACA;EACE,eAAe;EACf,gBAAgB;EAChB,uBAAuB;EACvB,mBAAmB;AACrB;AACA;EACE,cAAc;AAChB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,eAAe;EACf,sBAAsB;AACxB;AACA;EACE,qBAAqB;AACvB;AACA;EACE,8CAA8C;AAChD;AACA;EACE,+CAA+C;AACjD;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,mBAAmB;EACnB,YAAY;AACd;AACA;EACE,yBAAyB;EACzB,YAAY;EACZ,gBAAgB;EAChB,uBAAuB;AACzB;AACA;EACE,oCAAoC;EACpC,sBAAsB;AACxB;AACA;EACE,WAAW;EACX,YAAY;EACZ,cAAc;AAChB;AACA;EACE,WAAW;EACX,yBAAyB;EACzB,qBAAqB;AACvB;AACA;EACE,WAAW;EACX,gBAAgB;EAChB,mBAAmB;AACrB;AACA;EACE,gBAAgB;EAChB,UAAU;EACV,MAAM;EACN,8CAA8C;EAC9C,YAAY;AACd;AACA;EACE,aAAa;AACf;AACA;EACE,WAAW;AACb;AACA;EACE,YAAY;AACd;AACA;EACE,YAAY;AACd;AACA;EACE,YAAY;AACd;AACA;EACE,sBAAsB;EACtB,2BAA2B;AAC7B;AACA;EACE,wBAAwB;AAC1B;AACA;EACE,oBAAoB;AACtB;AACA;EACE,oCAAoC;AACtC;AACA;EACE,gBAAgB;AAClB;AACA;EACE,uBAAuB;AACzB;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,oBAAoB;EACpB,UAAU;EACV,gBAAgB;EAChB,YAAY;EACZ,cAAc;AAChB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,iBAAiB;EACjB,gBAAgB;AAClB;AACA;EACE;IACE,mBAAmB;IACnB,gBAAgB;EAClB;AACF;AACA;EACE;IACE,mBAAmB;IACnB,gBAAgB;EAClB;EACA;IACE,gBAAgB;EAClB;AACF;AACA;EACE,uBAAuB;AACzB;AACA;;EAEE,sBAAsB;AACxB;AACA;EACE,gBAAgB;AAClB;AACA;EACE;IACE,SAAS;EACX;AACF;AACA;EACE;IACE,yCAAyC;EAC3C;AACF;AACA;EACE,YAAY;EACZ,aAAa;EACb,sBAAsB;EACtB,mBAAmB;AACrB;AACA;EACE,gBAAgB;EAChB,mBAAmB;EACnB,SAAS;AACX;AACA;EACE,sBAAsB;EACtB,WAAW;EACX,aAAa;EACb,sBAAsB;EACtB,aAAa;EACb,OAAO;EACP,mBAAmB;AACrB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,mCAAmC;AACrC;AACA;EACE;IACE,oEAAoE;EACtE;AACF;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,gBAAgB;AAClB",sourcesContent:["@charset \"UTF-8\";\n/**\n * @copyright Copyright (c) 2019 Julius Härtl \n *\n * @author Julius Härtl \n * @author John Molakvoæ \n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n.toastify.dialogs {\n min-width: 200px;\n background: none;\n background-color: var(--color-main-background);\n color: var(--color-main-text);\n box-shadow: 0 0 6px 0 var(--color-box-shadow);\n padding: 0 12px;\n margin-top: 45px;\n position: fixed;\n z-index: 10100;\n border-radius: var(--border-radius);\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-container {\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-button,\n.toastify.dialogs .toast-close {\n position: static;\n overflow: hidden;\n box-sizing: border-box;\n min-width: 44px;\n height: 100%;\n padding: 12px;\n white-space: nowrap;\n background-repeat: no-repeat;\n background-position: center;\n background-color: transparent;\n min-height: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close,\n.toastify.dialogs .toast-close.toast-close {\n text-indent: 0;\n opacity: .4;\n border: none;\n min-height: 44px;\n margin-left: 10px;\n font-size: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close:before,\n.toastify.dialogs .toast-close.toast-close:before {\n background-image: url(\"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='16'%20width='16'%3e%3cpath%20d='M14%2012.3L12.3%2014%208%209.7%203.7%2014%202%2012.3%206.3%208%202%203.7%203.7%202%208%206.3%2012.3%202%2014%203.7%209.7%208z'/%3e%3c/svg%3e\");\n content: \" \";\n filter: var(--background-invert-if-dark);\n display: inline-block;\n width: 16px;\n height: 16px;\n}\n.toastify.dialogs .toast-undo-button.toast-undo-button,\n.toastify.dialogs .toast-close.toast-undo-button {\n height: calc(100% - 6px);\n margin: 3px 3px 3px 12px;\n}\n.toastify.dialogs .toast-undo-button:hover,\n.toastify.dialogs .toast-undo-button:focus,\n.toastify.dialogs .toast-undo-button:active,\n.toastify.dialogs .toast-close:hover,\n.toastify.dialogs .toast-close:focus,\n.toastify.dialogs .toast-close:active {\n cursor: pointer;\n opacity: 1;\n}\n.toastify.dialogs.toastify-top {\n right: 10px;\n}\n.toastify.dialogs.toast-with-click {\n cursor: pointer;\n}\n.toastify.dialogs.toast-error {\n border-left: 3px solid var(--color-error);\n}\n.toastify.dialogs.toast-info {\n border-left: 3px solid var(--color-primary);\n}\n.toastify.dialogs.toast-warning {\n border-left: 3px solid var(--color-warning);\n}\n.toastify.dialogs.toast-success,\n.toastify.dialogs.toast-undo {\n border-left: 3px solid var(--color-success);\n}\n.theme--dark .toastify.dialogs .toast-close.toast-close:before {\n background-image: url(\"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='16'%20width='16'%3e%3cpath%20d='M14%2012.3L12.3%2014%208%209.7%203.7%2014%202%2012.3%206.3%208%202%203.7%203.7%202%208%206.3%2012.3%202%2014%203.7%209.7%208z'%20style='fill-opacity:1;fill:%23ffffff'/%3e%3c/svg%3e\");\n}\n._file-picker__file-icon_1vgv4_5 {\n width: 32px;\n height: 32px;\n min-width: 32px;\n min-height: 32px;\n background-repeat: no-repeat;\n background-size: contain;\n display: flex;\n justify-content: center;\n}\ntr.file-picker__row[data-v-6aded0d9] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-6aded0d9] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td.row-checkbox[data-v-6aded0d9] {\n padding: 0 2px;\n}\ntr.file-picker__row td[data-v-6aded0d9]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-6aded0d9] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-6aded0d9] {\n padding-inline: 2px 0;\n}\n@keyframes gradient-6aded0d9 {\n 0% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n to {\n background-position: 0% 50%;\n }\n}\n.loading-row .row-checkbox[data-v-6aded0d9] {\n text-align: center !important;\n}\n.loading-row span[data-v-6aded0d9] {\n display: inline-block;\n height: 24px;\n background: linear-gradient(to right, var(--color-background-darker), var(--color-text-maxcontrast), var(--color-background-darker));\n background-size: 600px 100%;\n border-radius: var(--border-radius);\n animation: gradient-6aded0d9 12s ease infinite;\n}\n.loading-row .row-wrapper[data-v-6aded0d9] {\n display: inline-flex;\n align-items: center;\n}\n.loading-row .row-checkbox span[data-v-6aded0d9] {\n width: 24px;\n}\n.loading-row .row-name span[data-v-6aded0d9]:last-of-type {\n margin-inline-start: 6px;\n width: 130px;\n}\n.loading-row .row-size span[data-v-6aded0d9] {\n width: 80px;\n}\n.loading-row .row-modified span[data-v-6aded0d9] {\n width: 90px;\n}\ntr.file-picker__row[data-v-48df4f27] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-48df4f27] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td.row-checkbox[data-v-48df4f27] {\n padding: 0 2px;\n}\ntr.file-picker__row td[data-v-48df4f27]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-48df4f27] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-48df4f27] {\n padding-inline: 2px 0;\n}\n.file-picker__row--selected[data-v-48df4f27] {\n background-color: var(--color-background-dark);\n}\n.file-picker__row[data-v-48df4f27]:hover {\n background-color: var(--color-background-hover);\n}\n.file-picker__name-container[data-v-48df4f27] {\n display: flex;\n justify-content: start;\n align-items: center;\n height: 100%;\n}\n.file-picker__file-name[data-v-48df4f27] {\n padding-inline-start: 6px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.file-picker__file-extension[data-v-48df4f27] {\n color: var(--color-text-maxcontrast);\n min-width: fit-content;\n}\n.file-picker__header-preview[data-v-d3c94818] {\n width: 22px;\n height: 32px;\n flex: 0 0 auto;\n}\n.file-picker__files[data-v-d3c94818] {\n margin: 2px;\n margin-inline-start: 12px;\n overflow: scroll auto;\n}\n.file-picker__files table[data-v-d3c94818] {\n width: 100%;\n max-height: 100%;\n table-layout: fixed;\n}\n.file-picker__files th[data-v-d3c94818] {\n position: sticky;\n z-index: 1;\n top: 0;\n background-color: var(--color-main-background);\n padding: 2px;\n}\n.file-picker__files th .header-wrapper[data-v-d3c94818] {\n display: flex;\n}\n.file-picker__files th.row-checkbox[data-v-d3c94818] {\n width: 44px;\n}\n.file-picker__files th.row-name[data-v-d3c94818] {\n width: 230px;\n}\n.file-picker__files th.row-size[data-v-d3c94818] {\n width: 100px;\n}\n.file-picker__files th.row-modified[data-v-d3c94818] {\n width: 120px;\n}\n.file-picker__files th[data-v-d3c94818]:not(.row-size) .button-vue__wrapper {\n justify-content: start;\n flex-direction: row-reverse;\n}\n.file-picker__files th[data-v-d3c94818]:not(.row-size) .button-vue {\n padding-inline: 16px 4px;\n}\n.file-picker__files th.row-size[data-v-d3c94818] .button-vue__wrapper {\n justify-content: end;\n}\n.file-picker__files th[data-v-d3c94818] .button-vue__wrapper {\n color: var(--color-text-maxcontrast);\n}\n.file-picker__files th[data-v-d3c94818] .button-vue__wrapper .button-vue__text {\n font-weight: 400;\n}\n.file-picker__breadcrumbs[data-v-3bc9efa5] {\n flex-grow: 0 !important;\n}\n.file-picker__side[data-v-e96bec41] {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: .5rem;\n min-width: 200px;\n padding: 2px;\n overflow: auto;\n}\n.file-picker__side[data-v-e96bec41] .button-vue__wrapper {\n justify-content: start;\n}\n.file-picker__filter-input[data-v-e96bec41] {\n margin-block: 7px;\n max-width: 260px;\n}\n@media (max-width: 736px) {\n .file-picker__side[data-v-e96bec41] {\n flex-direction: row;\n min-width: unset;\n }\n}\n@media (max-width: 512px) {\n .file-picker__side[data-v-e96bec41] {\n flex-direction: row;\n min-width: unset;\n }\n .file-picker__filter-input[data-v-e96bec41] {\n max-width: unset;\n }\n}\n.file-picker__navigation {\n padding-inline: 8px 2px;\n}\n.file-picker__navigation,\n.file-picker__navigation * {\n box-sizing: border-box;\n}\n.file-picker__navigation .v-select.select {\n min-width: 220px;\n}\n@media (min-width: 513px) and (max-width: 736px) {\n .file-picker__navigation {\n gap: 11px;\n }\n}\n@media (max-width: 512px) {\n .file-picker__navigation {\n flex-direction: column-reverse !important;\n }\n}\n.file-picker__view[data-v-821451ce] {\n height: 50px;\n display: flex;\n justify-content: start;\n align-items: center;\n}\n.file-picker__view h3[data-v-821451ce] {\n font-weight: 700;\n height: fit-content;\n margin: 0;\n}\n.file-picker__main[data-v-821451ce] {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1;\n padding-inline: 2px;\n}\n.file-picker__main *[data-v-821451ce] {\n box-sizing: border-box;\n}\n[data-v-821451ce] .file-picker {\n height: min(80vh, 800px) !important;\n}\n@media (max-width: 512px) {\n [data-v-821451ce] .file-picker {\n height: calc(100% - 16px - var(--default-clickable-area)) !important;\n }\n}\n[data-v-821451ce] .file-picker__content {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n"],sourceRoot:""}]);const h=u},92246:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([e.id,".template-picker__item[data-v-0859a92c]{display:flex}.template-picker__label[data-v-0859a92c]{display:flex;align-items:center;flex:1 1;flex-direction:column}.template-picker__label[data-v-0859a92c],.template-picker__label *[data-v-0859a92c]{cursor:pointer;user-select:none}.template-picker__label[data-v-0859a92c]::before{display:none !important}.template-picker__preview[data-v-0859a92c]{display:block;overflow:hidden;flex:1 1;width:var(--width);min-height:var(--height);max-height:var(--height);padding:0;border:var(--border) solid var(--color-border);border-radius:var(--border-radius-large)}input:checked+label>.template-picker__preview[data-v-0859a92c]{border-color:var(--color-primary-element)}.template-picker__preview--failed[data-v-0859a92c]{display:flex}.template-picker__image[data-v-0859a92c]{max-width:100%;background-color:var(--color-main-background);object-fit:cover}.template-picker__preview--failed .template-picker__image[data-v-0859a92c]{width:calc(var(--margin)*8);margin:auto;background-color:rgba(0,0,0,0) !important;object-fit:initial}.template-picker__title[data-v-0859a92c]{overflow:hidden;max-width:calc(var(--width) + 4px);padding:var(--margin);white-space:nowrap;text-overflow:ellipsis}","",{version:3,sources:["webpack://./apps/files/src/components/TemplatePreview.vue"],names:[],mappings:"AAGC,wCACC,YAAA,CAGD,yCACC,YAAA,CAEA,kBAAA,CACA,QAAA,CACA,qBAAA,CAEA,oFACC,cAAA,CACA,gBAAA,CAGD,iDACC,uBAAA,CAIF,2CACC,aAAA,CACA,eAAA,CAEA,QAAA,CACA,kBAAA,CACA,wBAAA,CACA,wBAAA,CACA,SAAA,CACA,8CAAA,CACA,wCAAA,CAEA,+DACC,yCAAA,CAGD,mDAEC,YAAA,CAIF,yCACC,cAAA,CACA,6CAAA,CAEA,gBAAA,CAID,2EACC,2BAAA,CAEA,WAAA,CACA,yCAAA,CAEA,kBAAA,CAGD,yCACC,eAAA,CAEA,kCAAA,CACA,qBAAA,CACA,kBAAA,CACA,sBAAA",sourcesContent:["\n\n.template-picker {\n\t&__item {\n\t\tdisplay: flex;\n\t}\n\n\t&__label {\n\t\tdisplay: flex;\n\t\t// Align in the middle of the grid\n\t\talign-items: center;\n\t\tflex: 1 1;\n\t\tflex-direction: column;\n\n\t\t&, * {\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\n\t\t&::before {\n\t\t\tdisplay: none !important;\n\t\t}\n\t}\n\n\t&__preview {\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t\t// Stretch so all entries are the same width\n\t\tflex: 1 1;\n\t\twidth: var(--width);\n\t\tmin-height: var(--height);\n\t\tmax-height: var(--height);\n\t\tpadding: 0;\n\t\tborder: var(--border) solid var(--color-border);\n\t\tborder-radius: var(--border-radius-large);\n\n\t\tinput:checked + label > & {\n\t\t\tborder-color: var(--color-primary-element);\n\t\t}\n\n\t\t&--failed {\n\t\t\t// Make sure to properly center fallback icon\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n\n\t&__image {\n\t\tmax-width: 100%;\n\t\tbackground-color: var(--color-main-background);\n\n\t\tobject-fit: cover;\n\t}\n\n\t// Failed preview, fallback to mime icon\n\t&__preview--failed &__image {\n\t\twidth: calc(var(--margin) * 8);\n\t\t// Center mime icon\n\t\tmargin: auto;\n\t\tbackground-color: transparent !important;\n\n\t\tobject-fit: initial;\n\t}\n\n\t&__title {\n\t\toverflow: hidden;\n\t\t// also count preview border\n\t\tmax-width: calc(var(--width) + 2*2px);\n\t\tpadding: var(--margin);\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n"],sourceRoot:""}]);const s=a},24142:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([e.id,".templates-picker__form[data-v-48121b39]{padding:calc(var(--margin)*2);padding-bottom:0}.templates-picker__form h2[data-v-48121b39]{text-align:center;font-weight:bold;margin:var(--margin) 0 calc(var(--margin)*2)}.templates-picker__list[data-v-48121b39]{display:grid;grid-gap:calc(var(--margin)*2);grid-auto-columns:1fr;max-width:calc(var(--fullwidth)*6);grid-template-columns:repeat(auto-fit, var(--fullwidth));grid-auto-rows:1fr;justify-content:center}.templates-picker__buttons[data-v-48121b39]{display:flex;justify-content:end;padding:calc(var(--margin)*2) var(--margin);position:sticky;bottom:0;background-image:linear-gradient(0, var(--gradient-main-background))}.templates-picker__buttons button[data-v-48121b39],.templates-picker__buttons input[type=submit][data-v-48121b39]{height:44px}.templates-picker[data-v-48121b39] .modal-container{position:relative}.templates-picker__loading[data-v-48121b39]{position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;margin:0;background-color:var(--color-main-background-translucent)}","",{version:3,sources:["webpack://./apps/files/src/views/TemplatePicker.vue"],names:[],mappings:"AAEC,yCACC,6BAAA,CAEA,gBAAA,CAEA,4CACC,iBAAA,CACA,gBAAA,CACA,4CAAA,CAIF,yCACC,YAAA,CACA,8BAAA,CACA,qBAAA,CAEA,kCAAA,CACA,wDAAA,CAEA,kBAAA,CAEA,sBAAA,CAGD,4CACC,YAAA,CACA,mBAAA,CACA,2CAAA,CACA,eAAA,CACA,QAAA,CACA,oEAAA,CAEA,kHACC,WAAA,CAKF,oDACC,iBAAA,CAGD,4CACC,iBAAA,CACA,KAAA,CACA,MAAA,CACA,sBAAA,CACA,UAAA,CACA,WAAA,CACA,QAAA,CACA,yDAAA",sourcesContent:["\n.templates-picker {\n\t&__form {\n\t\tpadding: calc(var(--margin) * 2);\n\t\t// Will be handled by the buttons\n\t\tpadding-bottom: 0;\n\n\t\th2 {\n\t\t\ttext-align: center;\n\t\t\tfont-weight: bold;\n\t\t\tmargin: var(--margin) 0 calc(var(--margin) * 2);\n\t\t}\n\t}\n\n\t&__list {\n\t\tdisplay: grid;\n\t\tgrid-gap: calc(var(--margin) * 2);\n\t\tgrid-auto-columns: 1fr;\n\t\t// We want maximum 5 columns. Putting 6 as we don't count the grid gap. So it will always be lower than 6\n\t\tmax-width: calc(var(--fullwidth) * 6);\n\t\tgrid-template-columns: repeat(auto-fit, var(--fullwidth));\n\t\t// Make sure all rows are the same height\n\t\tgrid-auto-rows: 1fr;\n\t\t// Center the columns set\n\t\tjustify-content: center;\n\t}\n\n\t&__buttons {\n\t\tdisplay: flex;\n\t\tjustify-content: end;\n\t\tpadding: calc(var(--margin) * 2) var(--margin);\n\t\tposition: sticky;\n\t\tbottom: 0;\n\t\tbackground-image: linear-gradient(0, var(--gradient-main-background));\n\n\t\tbutton, input[type='submit'] {\n\t\t\theight: 44px;\n\t\t}\n\t}\n\n\t// Make sure we're relative for the loading emptycontent on top\n\t::v-deep .modal-container {\n\t\tposition: relative;\n\t}\n\n\t&__loading {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tmargin: 0;\n\t\tbackground-color: var(--color-main-background-translucent);\n\t}\n}\n\n"],sourceRoot:""}]);const s=a},79267:(e,t,n)=>{var i=n(8501),r=n(8575),o=e.exports;for(var a in i)i.hasOwnProperty(a)&&(o[a]=i[a]);function s(e){if("string"==typeof e&&(e=r.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}o.request=function(e,t){return e=s(e),i.request.call(this,e,t)},o.get=function(e,t){return e=s(e),i.get.call(this,e,t)}},88473:(e,t,n)=>{(t=e.exports=n(79481)).Stream=t,t.Readable=t,t.Writable=n(64229),t.Duplex=n(56753),t.Transform=n(74605),t.PassThrough=n(82725),t.finished=n(8610),t.pipeline=n(59946)},8501:(e,t,n)=>{var i=n(11989),r=n(55676),o=n(47529),a=n(50584),s=n(8575),l=t;l.request=function(e,t){e="string"==typeof e?s.parse(e):o(e);var r=-1===n.g.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||r,l=e.hostname||e.host,d=e.port,c=e.path||"/";l&&-1!==l.indexOf(":")&&(l="["+l+"]"),e.url=(l?a+"//"+l:"")+(d?":"+d:"")+c,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var u=new i(e);return t&&u.on("response",t),u},l.get=function(e,t){var n=l.request(e,t);return n.end(),n},l.ClientRequest=i,l.IncomingMessage=r.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=a,l.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},8725:(e,t,n)=>{var i;function r(){if(void 0!==i)return i;if(n.g.XMLHttpRequest){i=new n.g.XMLHttpRequest;try{i.open("GET",n.g.XDomainRequest?"/":"https://example.com")}catch(e){i=null}}else i=null;return i}function o(e){var t=r();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function a(e){return"function"==typeof e}t.fetch=a(n.g.fetch)&&a(n.g.ReadableStream),t.writableStream=a(n.g.WritableStream),t.abortController=a(n.g.AbortController),t.arraybuffer=t.fetch||o("arraybuffer"),t.msstream=!t.fetch&&o("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&o("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!r()&&a(r().overrideMimeType),i=null},11989:(e,t,n)=>{var i=n(48764).Buffer,r=n(34155),o=n(8725),a=n(35717),s=n(55676),l=n(88473),d=s.IncomingMessage,c=s.readyStates,u=e.exports=function(e){var t,n=this;l.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+i.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var r=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)r=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!o.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}n._mode=function(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":"text"}(t,r),n._fetchTimer=null,n._socketTimeout=null,n._socketTimer=null,n.on("finish",(function(){n._onFinish()}))};a(u,l.Writable),u.prototype.setHeader=function(e,t){var n=e.toLowerCase();-1===p.indexOf(n)&&(this._headers[n]={name:e,value:t})},u.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},u.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},u.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var i=e._headers,a=null;"GET"!==t.method&&"HEAD"!==t.method&&(a=new Blob(e._body,{type:(i["content-type"]||{}).value||""}));var s=[];if(Object.keys(i).forEach((function(e){var t=i[e].name,n=i[e].value;Array.isArray(n)?n.forEach((function(e){s.push([t,e])})):s.push([t,n])})),"fetch"===e._mode){var l=null;if(o.abortController){var d=new AbortController;l=d.signal,e._fetchAbortController=d,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=n.g.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}n.g.fetch(e._opts.url,{method:e._opts.method,headers:s,body:a||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:l}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var u=e._xhr=new n.g.XMLHttpRequest;try{u.open(e._opts.method,e._opts.url,!0)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}"responseType"in u&&(u.responseType=e._mode),"withCredentials"in u&&(u.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in u&&u.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(u.timeout=t.requestTimeout,u.ontimeout=function(){e.emit("requestTimeout")}),s.forEach((function(e){u.setRequestHeader(e[0],e[1])})),e._response=null,u.onreadystatechange=function(){switch(u.readyState){case c.LOADING:case c.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(u.onprogress=function(){e._onXHRProgress()}),u.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{u.send(a)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}}}},u.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},u.prototype._connect=function(){var e=this;e._destroyed||(e._response=new d(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},u.prototype._write=function(e,t,n){this._body.push(e),n()},u.prototype._resetTimers=function(e){var t=this;n.g.clearTimeout(t._socketTimer),t._socketTimer=null,e?(n.g.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=n.g.setTimeout((function(){t.emit("timeout")}),t._socketTimeout))},u.prototype.abort=u.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},u.prototype.end=function(e,t,n){"function"==typeof e&&(n=e,e=void 0),l.Writable.prototype.end.call(this,e,t,n)},u.prototype.setTimeout=function(e,t){var n=this;t&&n.once("timeout",t),n._socketTimeout=e,n._resetTimers(!1)},u.prototype.flushHeaders=function(){},u.prototype.setNoDelay=function(){},u.prototype.setSocketKeepAlive=function(){};var p=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},55676:(e,t,n)=>{var i=n(34155),r=n(48764).Buffer,o=n(8725),a=n(35717),s=n(88473),l=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},d=t.IncomingMessage=function(e,t,n,a){var l=this;if(s.Readable.call(l),l._mode=n,l.headers={},l.rawHeaders=[],l.trailers={},l.rawTrailers=[],l.on("end",(function(){i.nextTick((function(){l.emit("close")}))})),"fetch"===n){if(l._fetchResponse=t,l.url=t.url,l.statusCode=t.status,l.statusMessage=t.statusText,t.headers.forEach((function(e,t){l.headers[t.toLowerCase()]=e,l.rawHeaders.push(t,e)})),o.writableStream){var d=new WritableStream({write:function(e){return a(!1),new Promise((function(t,n){l._destroyed?n():l.push(r.from(e))?t():l._resumeFetch=t}))},close:function(){a(!0),l._destroyed||l.push(null)},abort:function(e){a(!0),l._destroyed||l.emit("error",e)}});try{return void t.body.pipeTo(d).catch((function(e){a(!0),l._destroyed||l.emit("error",e)}))}catch(e){}}var c=t.body.getReader();!function e(){c.read().then((function(t){l._destroyed||(a(t.done),t.done?l.push(null):(l.push(r.from(t.value)),e()))})).catch((function(e){a(!0),l._destroyed||l.emit("error",e)}))}()}else if(l._xhr=e,l._pos=0,l.url=e.responseURL,l.statusCode=e.status,l.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===l.headers[n]&&(l.headers[n]=[]),l.headers[n].push(t[2])):void 0!==l.headers[n]?l.headers[n]+=", "+t[2]:l.headers[n]=t[2],l.rawHeaders.push(t[1],t[2])}})),l._charset="x-user-defined",!o.overrideMimeType){var u=l.rawHeaders["mime-type"];if(u){var p=u.match(/;\s*charset=([^;])(;|$)/);p&&(l._charset=p[1].toLowerCase())}l._charset||(l._charset="utf-8")}};a(d,s.Readable),d.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},d.prototype._onXHRProgress=function(e){var t=this,i=t._xhr,o=null;switch(t._mode){case"text":if((o=i.responseText).length>t._pos){var a=o.substr(t._pos);if("x-user-defined"===t._charset){for(var s=r.alloc(a.length),d=0;dt._pos&&(t.push(r.from(new Uint8Array(c.result.slice(t._pos)))),t._pos=c.result.byteLength)},c.onload=function(){e(!0),t.push(null)},c.readAsArrayBuffer(o)}t._xhr.readyState===l.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}},47529:e=>{e.exports=function(){for(var e={},n=0;n{"use strict";e.exports="data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20height=%2716%27%20width=%2716%27%3e%3cpath%20d=%27M14%2012.3L12.3%2014%208%209.7%203.7%2014%202%2012.3%206.3%208%202%203.7%203.7%202%208%206.3%2012.3%202%2014%203.7%209.7%208z%27%20style=%27fill-opacity:1;fill:%23ffffff%27/%3e%3c/svg%3e"},79839:e=>{"use strict";e.exports="data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20height=%2716%27%20width=%2716%27%3e%3cpath%20d=%27M14%2012.3L12.3%2014%208%209.7%203.7%2014%202%2012.3%206.3%208%202%203.7%203.7%202%208%206.3%2012.3%202%2014%203.7%209.7%208z%27/%3e%3c/svg%3e"},24654:()=>{},52361:()=>{},94616:()=>{},5656:(e,t,n)=>{"use strict";n.d(t,{$B:()=>R,DT:()=>m,G7:()=>st,RL:()=>F,SR:()=>D,Ti:()=>U,Tv:()=>N,_o:()=>j,cd:()=>dt,e4:()=>P,gt:()=>L,h7:()=>k,m0:()=>E,oE:()=>ct,p$:()=>w,p4:()=>v,pC:()=>M,qq:()=>x,rp:()=>$,sS:()=>g,tB:()=>B,w4:()=>_,y3:()=>y,zu:()=>T});var i=n(77958),r=n(17499),o=n(31352),a=n(62520),s=n(65358),l=n(79753),d=n(14596);const c=null===(u=(0,i.ts)())?(0,r.IY)().setApp("files").build():(0,r.IY)().setApp("files").setUid(u.uid).build();var u;class p{_entries=[];registerEntry(e){this.validateEntry(e),this._entries.push(e)}unregisterEntry(e){const t="string"==typeof e?this.getEntryIndex(e):this.getEntryIndex(e.id);-1!==t?this._entries.splice(t,1):c.warn("Entry not found, nothing removed",{entry:e,entries:this.getEntries()})}getEntries(e){return e?this._entries.filter((t=>"function"!=typeof t.enabled||t.enabled(e))):this._entries}getEntryIndex(e){return this._entries.findIndex((t=>t.id===e))}validateEntry(e){if(!e.id||!e.displayName||!e.iconSvgInline&&!e.iconClass||!e.handler)throw new Error("Invalid entry");if("string"!=typeof e.id||"string"!=typeof e.displayName)throw new Error("Invalid id or displayName property");if(e.iconClass&&"string"!=typeof e.iconClass||e.iconSvgInline&&"string"!=typeof e.iconSvgInline)throw new Error("Invalid icon provided");if(void 0!==e.enabled&&"function"!=typeof e.enabled)throw new Error("Invalid enabled property");if("function"!=typeof e.handler)throw new Error("Invalid handler property");if("order"in e&&"number"!=typeof e.order)throw new Error("Invalid order property");if(-1!==this.getEntryIndex(e.id))throw new Error("Duplicate entry")}}const f=function(){return typeof window._nc_newfilemenu>"u"&&(window._nc_newfilemenu=new p,c.debug("NewFileMenu initialized")),window._nc_newfilemenu},h=["B","KB","MB","GB","TB","PB"],A=["B","KiB","MiB","GiB","TiB","PiB"];function g(e,t=!1,n=!1,i=!1){n=n&&!i,"string"==typeof e&&(e=Number(e));let r=e>0?Math.floor(Math.log(e)/Math.log(i?1e3:1024)):0;r=Math.min((n?A.length:h.length)-1,r);const a=n?A[r]:h[r];let s=(e/Math.pow(i?1e3:1024,r)).toFixed(1);return!0===t&&0===r?("0.0"!==s?"< 1 ":"0 ")+(n?A[1]:h[1]):(s=r<2?parseFloat(s).toFixed(0):parseFloat(s).toLocaleString((0,o.aj)()),s+" "+a)}var m=(e=>(e.DEFAULT="default",e.HIDDEN="hidden",e))(m||{});class w{_action;constructor(e){this.validateAction(e),this._action=e}get id(){return this._action.id}get displayName(){return this._action.displayName}get title(){return this._action.title}get iconSvgInline(){return this._action.iconSvgInline}get enabled(){return this._action.enabled}get exec(){return this._action.exec}get execBatch(){return this._action.execBatch}get order(){return this._action.order}get parent(){return this._action.parent}get default(){return this._action.default}get inline(){return this._action.inline}get renderInline(){return this._action.renderInline}validateAction(e){if(!e.id||"string"!=typeof e.id)throw new Error("Invalid id");if(!e.displayName||"function"!=typeof e.displayName)throw new Error("Invalid displayName function");if("title"in e&&"function"!=typeof e.title)throw new Error("Invalid title function");if(!e.iconSvgInline||"function"!=typeof e.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!e.exec||"function"!=typeof e.exec)throw new Error("Invalid exec function");if("enabled"in e&&"function"!=typeof e.enabled)throw new Error("Invalid enabled function");if("execBatch"in e&&"function"!=typeof e.execBatch)throw new Error("Invalid execBatch function");if("order"in e&&"number"!=typeof e.order)throw new Error("Invalid order");if("parent"in e&&"string"!=typeof e.parent)throw new Error("Invalid parent");if(e.default&&!Object.values(m).includes(e.default))throw new Error("Invalid default");if("inline"in e&&"function"!=typeof e.inline)throw new Error("Invalid inline function");if("renderInline"in e&&"function"!=typeof e.renderInline)throw new Error("Invalid renderInline function")}}const v=function(e){typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],c.debug("FileActions initialized")),window._nc_fileactions.find((t=>t.id===e.id))?c.error(`FileAction ${e.id} already registered`,{action:e}):window._nc_fileactions.push(e)};var y=(e=>(e[e.NONE=0]="NONE",e[e.CREATE=4]="CREATE",e[e.READ=1]="READ",e[e.UPDATE=2]="UPDATE",e[e.DELETE=8]="DELETE",e[e.SHARE=16]="SHARE",e[e.ALL=31]="ALL",e))(y||{});const b=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","nc:share-attributes","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:share-types","oc:size","ocs:share-permissions"],C={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},x=function(e,t={nc:"http://nextcloud.org/ns"}){typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...b],window._nc_dav_namespaces={...C});const n={...window._nc_dav_namespaces,...t};return window._nc_dav_properties.find((t=>t===e))?(c.error(`${e} already registered`,{prop:e}),!1):e.startsWith("<")||2!==e.split(":").length?(c.error(`${e} is not valid. See example: 'oc:fileid'`,{prop:e}),!1):n[e.split(":")[0]]?(window._nc_dav_properties.push(e),window._nc_dav_namespaces=n,!0):(c.error(`${e} namespace unknown`,{prop:e,namespaces:n}),!1)},E=function(){return typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...b]),window._nc_dav_properties.map((e=>`<${e} />`)).join(" ")},_=function(){return typeof window._nc_dav_namespaces>"u"&&(window._nc_dav_namespaces={...C}),Object.keys(window._nc_dav_namespaces).map((e=>`xmlns:${e}="${window._nc_dav_namespaces?.[e]}"`)).join(" ")},k=function(){return`\n\t\t\n\t\t\t\n\t\t\t\t${E()}\n\t\t\t\n\t\t`},B=function(e){return`\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${E()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${(0,i.ts)()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${e}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`},T=function(e=""){let t=y.NONE;return e&&((e.includes("C")||e.includes("K"))&&(t|=y.CREATE),e.includes("G")&&(t|=y.READ),(e.includes("W")||e.includes("N")||e.includes("V"))&&(t|=y.UPDATE),e.includes("D")&&(t|=y.DELETE),e.includes("R")&&(t|=y.SHARE)),t};var N=(e=>(e.Folder="folder",e.File="file",e))(N||{});const O=function(e,t){return null!==e.match(t)},I=(e,t)=>{if(e.id&&"number"!=typeof e.id)throw new Error("Invalid id type of value");if(!e.source)throw new Error("Missing mandatory source");try{new URL(e.source)}catch{throw new Error("Invalid source format, source must be a valid URL")}if(!e.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(e.mtime&&!(e.mtime instanceof Date))throw new Error("Invalid mtime type");if(e.crtime&&!(e.crtime instanceof Date))throw new Error("Invalid crtime type");if(!e.mime||"string"!=typeof e.mime||!e.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in e&&"number"!=typeof e.size&&void 0!==e.size)throw new Error("Invalid size type");if("permissions"in e&&void 0!==e.permissions&&!("number"==typeof e.permissions&&e.permissions>=y.NONE&&e.permissions<=y.ALL))throw new Error("Invalid permissions");if(e.owner&&null!==e.owner&&"string"!=typeof e.owner)throw new Error("Invalid owner type");if(e.attributes&&"object"!=typeof e.attributes)throw new Error("Invalid attributes type");if(e.root&&"string"!=typeof e.root)throw new Error("Invalid root type");if(e.root&&!e.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(e.root&&!e.source.includes(e.root))throw new Error("Root must be part of the source");if(e.root&&O(e.source,t)){const n=e.source.match(t)[0];if(!e.source.includes((0,a.join)(n,e.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(e.status&&!Object.values(P).includes(e.status))throw new Error("Status must be a valid NodeStatus")};var P=(e=>(e.NEW="new",e.FAILED="failed",e.LOADING="loading",e.LOCKED="locked",e))(P||{});class S{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;constructor(e,t){I(e,t||this._knownDavService),this._data=e;const n={set:(e,t,n)=>(this.updateMtime(),Reflect.set(e,t,n)),deleteProperty:(e,t)=>(this.updateMtime(),Reflect.deleteProperty(e,t))};this._attributes=new Proxy(e.attributes||{},n),delete this._data.attributes,t&&(this._knownDavService=t)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:e}=new URL(this.source);return e+(0,s.Ec)(this.source.slice(e.length))}get basename(){return(0,a.basename)(this.source)}get extension(){return(0,a.extname)(this.source)}get dirname(){if(this.root){let e=this.source;this.isDavRessource&&(e=e.split(this._knownDavService).pop());const t=e.indexOf(this.root),n=this.root.replace(/\/$/,"");return(0,a.dirname)(e.slice(t+n.length)||"/")}const e=new URL(this.source);return(0,a.dirname)(e.pathname)}get mime(){return this._data.mime}get mtime(){return this._data.mtime}get crtime(){return this._data.crtime}get size(){return this._data.size}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavRessource?void 0!==this._data.permissions?this._data.permissions:y.NONE:y.READ}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return O(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,a.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){let e=this.source;this.isDavRessource&&(e=e.split(this._knownDavService).pop());const t=e.indexOf(this.root),n=this.root.replace(/\/$/,"");return e.slice(t+n.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id||this.attributes?.fileid}get status(){return this._data?.status}set status(e){this._data.status=e}move(e){I({...this._data,source:e},this._knownDavService),this._data.source=e,this.updateMtime()}rename(e){if(e.includes("/"))throw new Error("Invalid basename");this.move((0,a.dirname)(this.source)+"/"+e)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}}class R extends S{get type(){return N.File}}class L extends S{constructor(e){super({...e,mime:"httpd/unix-directory"})}get type(){return N.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}const j=`/files/${(0,i.ts)()?.uid}`,D=(0,l.generateRemoteUrl)("dav"),$=function(e=D,t={}){const n=(0,d.eI)(e,{headers:t});function r(e){n.setHeaders({...t,"X-Requested-With":"XMLHttpRequest",requesttoken:e??""})}return(0,i._S)(r),r((0,i.IH)()),(0,d.lD)().patch("fetch",((e,t)=>{const n=t.headers;return n?.method&&(t.method=n.method,delete n.method),fetch(e,t)})),n},M=async(e,t="/",n=j)=>(await e.getDirectoryContents(`${n}${t}`,{details:!0,data:`\n\t\t\n\t\t\t\n\t\t\t\t${E()}\n\t\t\t\n\t\t\t\n\t\t\t\t1\n\t\t\t\n\t\t`,headers:{method:"REPORT"},includeSelf:!0})).data.filter((e=>e.filename!==t)).map((e=>F(e,n))),F=function(e,t=j,n=D){const r=e.props,o=T(r?.permissions),a=r?.["owner-id"]||(0,i.ts)()?.uid,s={id:r?.fileid||0,source:`${n}${e.filename}`,mtime:new Date(Date.parse(e.lastmod)),mime:e.mime,size:r?.size||Number.parseInt(r.getcontentlength||"0"),permissions:o,owner:a,root:t,attributes:{...e,...r,hasPreview:r?.["has-preview"]}};return delete s.attributes?.props,"file"===e.type?new R(s):new L(s)};class V{_views=[];_currentView=null;register(e){if(this._views.find((t=>t.id===e.id)))throw new Error(`View id ${e.id} is already registered`);this._views.push(e)}remove(e){const t=this._views.findIndex((t=>t.id===e));-1!==t&&this._views.splice(t,1)}get views(){return this._views}setActive(e){this._currentView=e}get active(){return this._currentView}}const U=function(){return typeof window._nc_navigation>"u"&&(window._nc_navigation=new V,c.debug("Navigation service initialized")),window._nc_navigation};class H{_column;constructor(e){q(e),this._column=e}get id(){return this._column.id}get title(){return this._column.title}get render(){return this._column.render}get sort(){return this._column.sort}get summary(){return this._column.summary}}const q=function(e){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");if(e.sort&&"function"!=typeof e.sort)throw new Error("Column sortFunction must be a function");if(e.summary&&"function"!=typeof e.summary)throw new Error("Column summary must be a function");return!0};var z={},Y={};!function(e){const t=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n="["+t+"]["+t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=new RegExp("^"+n+"$");e.isExist=function(e){return typeof e<"u"},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,n){if(t){const i=Object.keys(t),r=i.length;for(let o=0;o"u")},e.getAllMatches=function(e,t){const n=[];let i=t.exec(e);for(;i;){const r=[];r.startIndex=t.lastIndex-i[0].length;const o=i.length;for(let e=0;e5&&"xml"===i)return re("InvalidXml","XML declaration allowed only at the start of the document.",se(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}continue}return t}function K(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let n=1;for(t+=8;t"===e[t]&&(n--,0===n))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t"===e[t+2]){t+=2;break}return t}z.validate=function(e,t){t=Object.assign({},G,t);const n=[];let i=!1,r=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let o=0;o"!==e[o]&&" "!==e[o]&&"\t"!==e[o]&&"\n"!==e[o]&&"\r"!==e[o];o++)l+=e[o];if(l=l.trim(),"/"===l[l.length-1]&&(l=l.substring(0,l.length-1),o--),!ae(l)){let t;return t=0===l.trim().length?"Invalid space after '<'.":"Tag '"+l+"' is an invalid name.",re("InvalidTag",t,se(e,o))}const d=ee(e,o);if(!1===d)return re("InvalidAttr","Attributes for '"+l+"' have open quote.",se(e,o));let c=d.value;if(o=d.index,"/"===c[c.length-1]){const n=o-c.length;c=c.substring(0,c.length-1);const r=ne(c,t);if(!0!==r)return re(r.err.code,r.err.msg,se(e,n+r.err.line));i=!0}else if(s){if(!d.tagClosed)return re("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",se(e,o));if(c.trim().length>0)return re("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",se(e,a));{const t=n.pop();if(l!==t.tagName){let n=se(e,t.tagStartPos);return re("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+l+"'.",se(e,a))}0==n.length&&(r=!0)}}else{const s=ne(c,t);if(!0!==s)return re(s.err.code,s.err.msg,se(e,o-c.length+s.err.line));if(!0===r)return re("InvalidXml","Multiple possible root nodes found.",se(e,o));-1!==t.unpairedTags.indexOf(l)||n.push({tagName:l,tagStartPos:a}),i=!0}for(o++;o0)||re("InvalidXml","Invalid '"+JSON.stringify(n.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):re("InvalidXml","Start tag expected.",1)};const J='"',Q="'";function ee(e,t){let n="",i="",r=!1;for(;t"===e[t]&&""===i){r=!0;break}n+=e[t]}return""===i&&{value:n,index:t,tagClosed:r}}const te=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function ne(e,t){const n=W.getAllMatches(e,te),i={};for(let e=0;e!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e}};de.buildOptions=function(e){return Object.assign({},ce,e)},de.defaultOptions=ce;const ue=Y;function pe(e,t){let n="";for(;t0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}},Ee=function(e,t){const n={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let i=1,r=!1,o=!1,a="";for(;t"===e[t]){if(o?"-"===e[t-1]&&"-"===e[t-2]&&(o=!1,i--):i--,0===i)break}else"["===e[t]?r=!0:a+=e[t];else{if(r&&he(e,t))t+=7,[entityName,val,t]=pe(e,t+1),-1===val.indexOf("&")&&(n[we(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(r&&Ae(e,t))t+=8;else if(r&&ge(e,t))t+=8;else if(r&&me(e,t))t+=9;else{if(!fe)throw new Error("Invalid DOCTYPE");o=!0}i++,a=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:t}},_e=function(e,t={}){if(t=Object.assign({},be,t),!e||"string"!=typeof e)return e;let n=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(n))return e;if(t.hex&&ve.test(n))return Number.parseInt(n,16);{const i=ye.exec(n);if(i){const r=i[1],o=i[2];let a=function(e){return e&&-1!==e.indexOf(".")&&("."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1))),e}(i[3]);const s=i[4]||i[6];if(!t.leadingZeros&&o.length>0&&r&&"."!==n[2])return e;if(!t.leadingZeros&&o.length>0&&!r&&"."!==n[1])return e;{const i=Number(n),l=""+i;return-1!==l.search(/[eE]/)||s?t.eNotation?i:e:-1!==n.indexOf(".")?"0"===l&&""===a||l===a||r&&l==="-"+a?i:e:o?a===l||r+a===l?i:e:n===l||n===r+l?i:e}}return e}};function ke(e){const t=Object.keys(e);for(let n=0;n0)){a||(e=this.replaceEntitiesValue(e));const i=this.options.tagValueProcessor(t,e,n,r,o);return null==i?e:typeof i!=typeof e||i!==e?i:this.options.trimValues||e.trim()===e?Me(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function Te(e){if(this.options.removeNSPrefix){const t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,Ce.nameRegexp);const Ne=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function Oe(e,t,n){if(!this.options.ignoreAttributes&&"string"==typeof e){const n=Ce.getAllMatches(e,Ne),i=n.length,r={};for(let e=0;e",o,"Closing Tag is not closed.");let a=e.substring(o+2,t).trim();if(this.options.removeNSPrefix){const e=a.indexOf(":");-1!==e&&(a=a.substr(e+1))}this.options.transformTagName&&(a=this.options.transformTagName(a)),n&&(i=this.saveTextToParentTag(i,n,r));const s=r.substring(r.lastIndexOf(".")+1);if(a&&-1!==this.options.unpairedTags.indexOf(a))throw new Error(`Unpaired tag can not be used as closing tag: `);let l=0;s&&-1!==this.options.unpairedTags.indexOf(s)?(l=r.lastIndexOf(".",r.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=r.lastIndexOf("."),r=r.substring(0,l),n=this.tagsNodeStack.pop(),i="",o=t}else if("?"===e[o+1]){let t=De(e,o,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,n,r),!(this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags)){const e=new xe(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,r,t.tagName)),this.addChild(n,e,r)}o=t.closeIndex+1}else if("!--"===e.substr(o+1,3)){const t=je(e,"--\x3e",o+4,"Comment is not closed.");if(this.options.commentPropName){const a=e.substring(o+4,t-2);i=this.saveTextToParentTag(i,n,r),n.add(this.options.commentPropName,[{[this.options.textNodeName]:a}])}o=t}else if("!D"===e.substr(o+1,2)){const t=Ee(e,o);this.docTypeEntities=t.entities,o=t.i}else if("!["===e.substr(o+1,2)){const t=je(e,"]]>",o,"CDATA is not closed.")-2,a=e.substring(o+9,t);if(i=this.saveTextToParentTag(i,n,r),this.options.cdataPropName)n.add(this.options.cdataPropName,[{[this.options.textNodeName]:a}]);else{let e=this.parseTextData(a,n.tagname,r,!0,!1,!0);null==e&&(e=""),n.add(this.options.textNodeName,e)}o=t+2}else{let a=De(e,o,this.options.removeNSPrefix),s=a.tagName;const l=a.rawTagName;let d=a.tagExp,c=a.attrExpPresent,u=a.closeIndex;this.options.transformTagName&&(s=this.options.transformTagName(s)),n&&i&&"!xml"!==n.tagname&&(i=this.saveTextToParentTag(i,n,r,!1));const p=n;if(p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(n=this.tagsNodeStack.pop(),r=r.substring(0,r.lastIndexOf("."))),s!==t.tagname&&(r+=r?"."+s:s),this.isItStopNode(this.options.stopNodes,r,s)){let t="";if(d.length>0&&d.lastIndexOf("/")===d.length-1)o=a.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(s))o=a.closeIndex;else{const n=this.readStopNodeData(e,l,u+1);if(!n)throw new Error(`Unexpected end of ${l}`);o=n.i,t=n.tagContent}const i=new xe(s);s!==d&&c&&(i[":@"]=this.buildAttributesMap(d,r,s)),t&&(t=this.parseTextData(t,s,r,!0,c,!0,!0)),r=r.substr(0,r.lastIndexOf(".")),i.add(this.options.textNodeName,t),this.addChild(n,i,r)}else{if(d.length>0&&d.lastIndexOf("/")===d.length-1){"/"===s[s.length-1]?(s=s.substr(0,s.length-1),r=r.substr(0,r.length-1),d=s):d=d.substr(0,d.length-1),this.options.transformTagName&&(s=this.options.transformTagName(s));const e=new xe(s);s!==d&&c&&(e[":@"]=this.buildAttributesMap(d,r,s)),this.addChild(n,e,r),r=r.substr(0,r.lastIndexOf("."))}else{const e=new xe(s);this.tagsNodeStack.push(n),s!==d&&c&&(e[":@"]=this.buildAttributesMap(d,r,s)),this.addChild(n,e,r),n=e}i="",o=u}}else i+=e[o];return t.child};function Pe(e,t,n){const i=this.options.updateTag(t.tagname,n,t[":@"]);!1===i||("string"==typeof i&&(t.tagname=i),e.addChild(t))}const Se=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){const n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function Re(e,t,n,i){return e&&(void 0===i&&(i=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,i))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function Le(e,t,n){const i="*."+n;for(const n in e){const r=e[n];if(i===r||t===r)return!0}return!1}function je(e,t,n,i){const r=e.indexOf(t,n);if(-1===r)throw new Error(i);return r+t.length-1}function De(e,t,n,i=">"){const r=function(e,t,n=">"){let i,r="";for(let o=t;o",n,`${t} is not closed`);if(e.substring(n+2,o).trim()===t&&(r--,0===r))return{tagContent:e.substring(i,n),i:o};n=o}else if("?"===e[n+1])n=je(e,"?>",n+1,"StopNode is not closed.");else if("!--"===e.substr(n+1,3))n=je(e,"--\x3e",n+3,"StopNode is not closed.");else if("!["===e.substr(n+1,2))n=je(e,"]]>",n,"StopNode is not closed.")-2;else{const i=De(e,n,">");i&&((i&&i.tagName)===t&&"/"!==i.tagExp[i.tagExp.length-1]&&r++,n=i.closeIndex)}}function Me(e,t,n){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&_e(e,n)}return Ce.isExist(e)?e:""}var Fe={};function Ve(e,t,n){let i;const r={};for(let o=0;o0&&(r[t.textNodeName]=i):void 0!==i&&(r[t.textNodeName]=i),r}function Ue(e){const t=Object.keys(e);for(let e=0;e"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"}},this.addExternalEntities=ke,this.parseXml=Ie,this.parseTextData=Be,this.resolveNameSpace=Te,this.buildAttributesMap=Oe,this.isItStopNode=Le,this.replaceEntitiesValue=Se,this.readStopNodeData=$e,this.saveTextToParentTag=Re,this.addChild=Pe}},{prettify:We}=Fe,Ge=z;function Ze(e,t,n,i){let r="",o=!1;for(let a=0;a`,o=!1;continue}if(l===t.commentPropName){r+=i+`\x3c!--${s[l][0][t.textNodeName]}--\x3e`,o=!0;continue}if("?"===l[0]){const e=Ke(s[":@"],t),n="?xml"===l?"":i;let a=s[l][0][t.textNodeName];a=0!==a.length?" "+a:"",r+=n+`<${l}${a}${e}?>`,o=!0;continue}let c=i;""!==c&&(c+=t.indentBy);const u=i+`<${l}${Ke(s[":@"],t)}`,p=Ze(s[l],t,d,c);-1!==t.unpairedTags.indexOf(l)?t.suppressUnpairedNode?r+=u+">":r+=u+"/>":p&&0!==p.length||!t.suppressEmptyNode?p&&p.endsWith(">")?r+=u+`>${p}${i}`:(r+=u+">",p&&""!==i&&(p.includes("/>")||p.includes("`):r+=u+"/>",o=!0}return r}function Xe(e){const t=Object.keys(e);for(let n=0;n0&&t.processEntities)for(let n=0;n0&&(n="\n"),Ze(e,t,"",n)},tt={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function nt(e){this.options=Object.assign({},tt,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=ot),this.processTextOrObjNode=it,this.options.format?(this.indentate=rt,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function it(e,t,n){const i=this.j2x(e,n+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,i.attrStr,n):this.buildObjectNode(i.val,t,i.attrStr,n)}function rt(e){return this.options.indentBy.repeat(e)}function ot(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}nt.prototype.build=function(e){return this.options.preserveOrder?et(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},nt.prototype.j2x=function(e,t){let n="",i="";for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r))if(typeof e[r]>"u")this.isAttribute(r)&&(i+="");else if(null===e[r])this.isAttribute(r)?i+="":"?"===r[0]?i+=this.indentate(t)+"<"+r+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+r+"/"+this.tagEndChar;else if(e[r]instanceof Date)i+=this.buildTextValNode(e[r],r,"",t);else if("object"!=typeof e[r]){const o=this.isAttribute(r);if(o)n+=this.buildAttrPairStr(o,""+e[r]);else if(r===this.options.textNodeName){let t=this.options.tagValueProcessor(r,""+e[r]);i+=this.replaceEntitiesValue(t)}else i+=this.buildTextValNode(e[r],r,"",t)}else if(Array.isArray(e[r])){const n=e[r].length;let o="";for(let a=0;a"u"||(null===n?"?"===r[0]?i+=this.indentate(t)+"<"+r+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+r+"/"+this.tagEndChar:"object"==typeof n?this.options.oneListGroup?o+=this.j2x(n,t+1).val:o+=this.processTextOrObjNode(n,r,t):o+=this.buildTextValNode(n,r,"",t))}this.options.oneListGroup&&(o=this.buildObjectNode(o,r,"",t)),i+=o}else if(this.options.attributesGroupName&&r===this.options.attributesGroupName){const t=Object.keys(e[r]),i=t.length;for(let o=0;o"+e+r}},nt.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(i)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(i)+"<"+t+n+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(t,e);return r=this.replaceEntitiesValue(r),""===r?this.indentate(i)+"<"+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(i)+"<"+t+n+">"+r+"0&&this.options.processEntities)for(let t=0;t0&&(!e.caption||"string"!=typeof e.caption))throw new Error("View caption is required for top-level views 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.icon||"string"!=typeof e.icon||!function(e){if("string"!=typeof e)throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);if(0===(e=e.trim()).length||!0!==at.XMLValidator.validate(e))return!1;let t;const n=new at.XMLParser;try{t=n.parse(e)}catch{return!1}return!(!t||!("svg"in t))}(e.icon))throw new Error("View icon is required and must be a valid svg string");if(!("order"in e)||"number"!=typeof e.order)throw new Error("View order is required and must be a number");if(e.columns&&e.columns.forEach((e=>{if(!(e instanceof H))throw new Error("View columns must be an array of Column. Invalid column found")})),e.emptyView&&"function"!=typeof e.emptyView)throw new Error("View emptyView must be a function");if(e.parent&&"string"!=typeof e.parent)throw new Error("View parent must be a string");if("sticky"in e&&"boolean"!=typeof e.sticky)throw new Error("View sticky must be a boolean");if("expanded"in e&&"boolean"!=typeof e.expanded)throw new Error("View expanded must be a boolean");if(e.defaultSortKey&&"string"!=typeof e.defaultSortKey)throw new Error("View defaultSortKey must be a string");return!0},dt=function(e){return f().registerEntry(e)},ct=function(e){return f().unregisterEntry(e)}}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return r[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=r,e=[],a.O=(t,n,i,r)=>{if(!n){var o=1/0;for(c=0;c=r)&&Object.keys(a.O).every((e=>a.O[e](n[l])))?n.splice(l--,1):(s=!1,r0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[n,i,r]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,n)=>(a.f[n](e,t),t)),[])),a.u=e=>e+"-"+e+".js?v="+{4720:"bf813bc45f5afa044293",6512:"a386aad6f01ecddf416d"}[e],a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},i="nextcloud:",a.l=(e,t,r,o)=>{if(n[e])n[e].push(t);else{var s,l;if(void 0!==r)for(var d=document.getElementsByTagName("script"),c=0;c{s.onerror=s.onload=null,clearTimeout(f);var r=n[e];if(delete n[e],s.parentNode&&s.parentNode.removeChild(s),r&&r.forEach((e=>e(i))),t)return t(i)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),l&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=9837,(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var i=n.length-1;i>-1&&!e;)e=n[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{a.b=document.baseURI||self.location.href;var e={9837:0};a.f.j=(t,n)=>{var i=a.o(e,t)?e[t]:void 0;if(0!==i)if(i)n.push(i[2]);else{var r=new Promise(((n,r)=>i=e[t]=[n,r]));n.push(i[2]=r);var o=a.p+a.u(t),s=new Error;a.l(o,(n=>{if(a.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var r=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+r+": "+o+")",s.name="ChunkLoadError",s.type=r,s.request=o,i[1](s)}}),"chunk-"+t,t)}},a.O.j=t=>0===e[t];var t=(t,n)=>{var i,r,o=n[0],s=n[1],l=n[2],d=0;if(o.some((t=>0!==e[t]))){for(i in s)a.o(s,i)&&(a.m[i]=s[i]);if(l)var c=l(a)}for(t&&t(n);da(34507)));s=a.O(s)})(); -//# sourceMappingURL=files-init.js.map?v=52098b6d9dbfb34019d5 \ No newline at end of file +(()=>{var e,n,i,r={34507:(e,n,i)=>{"use strict";var r=i(5656),o=i(69183),a=i(31352),s=i(93664),l=i(17499);const d=(0,l.IY)().setApp("files").detectUser().build(),c=new r.p$({id:"delete",displayName:(e,t)=>"trashbin"===t.id?(0,a.Iu)("files","Delete permanently"):(0,a.Iu)("files","Delete"),iconSvgInline:()=>'',enabled:e=>e.length>0&&e.map((e=>e.permissions)).every((e=>0!=(e&r.y3.DELETE))),async exec(e){try{return await s.Z.delete(e.encodedSource),(0,o.j8)("files:node:deleted",e),!0}catch(t){return d.error("Error while deleting a file",{error:t,source:e.source,node:e}),!1}},async execBatch(e,t,n){return Promise.all(e.map((e=>this.exec(e,t,n))))},order:100});var u=i(79753);const p=function(e){const t=document.createElement("a");t.download="",t.href=e,t.click()},f=function(e,t){const n=Math.random().toString(36).substring(2),i=(0,u.generateUrl)("/apps/files/ajax/download.php?dir={dir}&files={files}&downloadStartSecret={secret}",{dir:e,secret:n,files:JSON.stringify(t.map((e=>e.basename)))});p(i)},h=function(e){if(0==(e.permissions&r.y3.READ))return!1;if("shared"===e.attributes["mount-type"]){const t=JSON.parse(e.attributes["share-attributes"]).find((e=>"permissions"===e.scope&&"download"===e.key));if(void 0!==t&&!1===t.enabled)return!1}return!0},A=new r.p$({id:"download",displayName:()=>(0,a.Iu)("files","Download"),iconSvgInline:()=>'',enabled:e=>0!==e.length&&(!e.some((e=>e.type===r.Tv.Folder))||!e.some((e=>!e.root?.startsWith("/files"))))&&e.every(h),exec:async(e,t,n)=>e.type===r.Tv.Folder?(f(n,[e]),null):(p(e.encodedSource),null),async execBatch(e,t,n){return 1===e.length?(this.exec(e[0],t,n),[null]):(f(n,e),new Array(e.length).fill(null))},order:30});var g=i(65358),m=i(77958),w=i(64024);const v=new r.p$({id:"edit-locally",displayName:()=>(0,a.Iu)("files","Edit locally"),iconSvgInline:()=>'',enabled:e=>1===e.length&&0!=(e[0].permissions&r.y3.UPDATE),exec:async e=>(async function(e){const t=(0,u.generateOcsUrl)("apps/files/api/v1")+"/openlocaleditor?format=json";try{const n=await s.Z.post(t,{path:e}),i=(0,m.ts)()?.uid;let r=`nc://open/${i}@`+window.location.host+(0,g.Ec)(e);r+="?token="+n.data.ocs.data.token,window.location.href=r}catch(e){(0,w.x2)((0,a.Iu)("files","Failed to redirect to client"))}}(e.path),null),order:25});var y=i(20144);const b='',C=e=>e.some((e=>1!==e.attributes.favorite)),x=async(e,t,n)=>{try{const i=(0,u.generateUrl)("/apps/files/api/v1/files")+(0,g.Ec)(e.path);return await s.Z.post(i,{tags:n?[window.OC.TAG_FAVORITE]:[]}),"favorites"!==t.id||n||"/"!==e.dirname||(0,o.j8)("files:node:deleted",e),y.default.set(e.attributes,"favorite",n?1:0),n?(0,o.j8)("files:favorites:added",e):(0,o.j8)("files:favorites:removed",e),!0}catch(t){const i=n?"adding a file to favourites":"removing a file from favourites";return d.error("Error while "+i,{error:t,source:e.source,node:e}),!1}},E=new r.p$({id:"favorite",displayName:e=>C(e)?(0,a.Iu)("files","Add to favorites"):(0,a.Iu)("files","Remove from favorites"),iconSvgInline:e=>C(e)?'':b,enabled:e=>!e.some((e=>!e.root?.startsWith?.("/files")))&&e.every((e=>e.permissions!==r.y3.NONE)),async exec(e,t){const n=C([e]);return await x(e,t,n)},async execBatch(e,t){const n=C(e);return Promise.all(e.map((async e=>await x(e,t,n))))},order:-50});var _=i(93379),k=i.n(_),B=i(7795),T=i.n(B),N=i(90569),O=i.n(N),I=i(3565),P=i.n(I),S=i(19216),R=i.n(S),L=i(44589),j=i.n(L),D=i(51473),$={};$.styleTagTransform=j(),$.setAttributes=P(),$.insert=O().bind(null,"head"),$.domAPI=T(),$.insertStyleElement=R(),k()(D.Z,$),D.Z&&D.Z.locals&&D.Z.locals;var M=i(51120);const{Axios:F,AxiosError:V,CanceledError:U,isCancel:H,CancelToken:q,VERSION:z,all:Y,Cancel:W,isAxiosError:G,spread:Z,toFormData:X,AxiosHeaders:K,HttpStatusCode:J,formToJSON:Q,getAdapter:ee,mergeConfig:te}=M.default;var ne=i(62520),ie=i(59546),re=i(96384),oe=i(59440);let ae;const se=()=>(ae||(ae=new oe.Z({concurrency:3})),ae);var le;!function(e){e.MOVE="Move",e.COPY="Copy",e.MOVE_OR_COPY="move-or-copy"}(le||(le={}));const de=e=>0!=(e.reduce(((e,t)=>Math.min(e,t.permissions)),r.y3.ALL)&r.y3.UPDATE),ce=e=>(e=>e.every((e=>!JSON.parse(e.attributes?.["share-attributes"]??"[]").some((e=>"permissions"===e.scope&&!1===e.enabled&&"download"===e.key)))))(e),ue=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e=>`(${e})`,i=e,r=1;for(;t.includes(i);){const t=(0,ne.extname)(e);i=`${(0,ne.basename)(e,t)} ${n(r++)}${t}`}return i},pe=e=>de(e)?ce(e)?le.MOVE_OR_COPY:le.MOVE:le.COPY,fe=async function(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!t)return;if(t.type!==r.Tv.Folder)throw new Error((0,a.Iu)("files","Destination is not a folder"));if(n===le.MOVE&&e.dirname===t.path)throw new Error((0,a.Iu)("files","This file/folder is already in that directory"));if(`${t.path}/`.startsWith(`${e.path}/`))throw new Error((0,a.Iu)("files","You cannot move a file/folder onto itself or into a subfolder of itself"));y.default.set(e,"status",r.e4.LOADING);const s=se();return await s.add((async()=>{const s=e=>1===e?(0,a.Iu)("files","(copy)"):(0,a.Iu)("files","(copy %n)",void 0,e);try{const a=(0,r.rp)(),l=(0,ne.join)(r._o,e.path),d=(0,ne.join)(r._o,t.path);if(n===le.COPY){let n=e.basename;if(!i){const t=await a.getDirectoryContents(d);n=ue(e.basename,t.map((e=>e.basename)),s)}if(await a.copyFile(l,(0,ne.join)(d,n)),e.dirname===t.path){const{data:e}=await a.stat((0,ne.join)(d,n),{details:!0,data:(0,r.h7)()});(0,o.j8)("files:node:created",(0,r.RL)(e))}}else await a.moveFile(l,(0,ne.join)(d,e.basename)),(0,o.j8)("files:node:deleted",e)}catch(e){if(e instanceof V){if(412===e?.response?.status)throw new Error((0,a.Iu)("files","A file or folder with that name already exists in this folder"));if(423===e?.response?.status)throw new Error((0,a.Iu)("files","The files is locked"));if(404===e?.response?.status)throw new Error((0,a.Iu)("files","The file does not exist anymore"));if(e.message)throw new Error(e.message)}throw d.debug(e),new Error}finally{y.default.set(e,"status",void 0)}}))},he=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",n=arguments.length>2?arguments[2]:void 0;const i=n.map((e=>e.fileid)).filter(Boolean),o=(0,w.fn)((0,a.Iu)("files","Choose destination")).allowDirectories(!0).setFilter((e=>0!=(e.permissions&r.y3.CREATE)&&!i.includes(e.fileid))).setMimeTypeFilter([]).setMultiSelect(!1).startAt(t);return new Promise(((t,i)=>{o.setButtonFactory(((i,r)=>{const o=[],s=(0,ne.basename)(r),l=n.map((e=>e.dirname)),d=n.map((e=>e.path));return e!==le.COPY&&e!==le.MOVE_OR_COPY||o.push({label:s?(0,a.Iu)("files","Copy to {target}",{target:s}):(0,a.Iu)("files","Copy"),type:"primary",icon:ie,async callback(e){t({destination:e[0],action:le.COPY})}}),l.includes(r)||d.includes(r)||e!==le.MOVE&&e!==le.MOVE_OR_COPY||o.push({label:s?(0,a.Iu)("files","Move to {target}",{target:s}):(0,a.Iu)("files","Move"),type:e===le.MOVE?"primary":"secondary",icon:re,async callback(e){t({destination:e[0],action:le.MOVE})}}),o})),o.build().pick().catch((e=>{d.debug(e),e instanceof w.Pq?i(new Error((0,a.Iu)("files","Cancelled move or copy operation"))):i(new Error((0,a.Iu)("files","Move or copy operation failed")))}))}))},Ae=new r.p$({id:"move-copy",displayName(e){switch(pe(e)){case le.MOVE:return(0,a.Iu)("files","Move");case le.COPY:return(0,a.Iu)("files","Copy");case le.MOVE_OR_COPY:return(0,a.Iu)("files","Move or copy")}},iconSvgInline:()=>re,enabled:e=>!!e.every((e=>e.root?.startsWith("/files/")))&&e.length>0&&(de(e)||ce(e)),async exec(e,t,n){const i=pe([e]);let r;try{r=await he(i,n,[e])}catch(e){return d.error(e),!1}try{return await fe(e,r.destination,r.action),!0}catch(e){return!!(e instanceof Error&&e.message)&&((0,w.x2)(e.message),null)}},async execBatch(e,t,n){const i=pe(e),r=await he(i,n,e),o=e.map((async e=>{try{return await fe(e,r.destination,r.action),!0}catch(t){return d.error(`Failed to ${r.action} node`,{node:e,error:t}),!1}}));return await Promise.all(o)},order:15}),ge='',me=new r.p$({id:"open-folder",displayName(e){const t=e[0].attributes.displayName||e[0].basename;return(0,a.Iu)("files","Open folder {displayName}",{displayName:t})},iconSvgInline:()=>ge,enabled(e){if(1!==e.length)return!1;const t=e[0];return!!t.isDavRessource&&t.type===r.Tv.Folder&&0!=(t.permissions&r.y3.READ)},exec:async(e,t)=>!(!e||e.type!==r.Tv.Folder)&&(window.OCP.Files.Router.goToRoute(null,{view:t.id,fileid:e.fileid},{dir:e.path}),null),default:r.DT.HIDDEN,order:-100}),we=new r.p$({id:"open-in-files-recent",displayName:()=>(0,a.Iu)("files","Open in Files"),iconSvgInline:()=>"",enabled:(e,t)=>"recent"===t.id,async exec(e){let t=e.dirname;return e.type===r.Tv.Folder&&(t=t+"/"+e.basename),window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:e.fileid},{dir:t}),null},order:-1e3,default:r.DT.HIDDEN}),ve=new r.p$({id:"rename",displayName:()=>(0,a.Iu)("files","Rename"),iconSvgInline:()=>'',enabled:e=>e.length>0&&e.map((e=>e.permissions)).every((e=>0!=(e&r.y3.UPDATE))),exec:async e=>((0,o.j8)("files:node:rename",e),null),order:10});var ye=i(48250);const be=new r.p$({id:"details",displayName:()=>(0,a.Iu)("files","Open details"),iconSvgInline:()=>ye,enabled:e=>1===e.length&&!!e[0]&&!!window?.OCA?.Files?.Sidebar&&((e[0].root?.startsWith("/files/")&&e[0].permissions!==r.y3.NONE)??!1),async exec(e,t,n){try{return await window.OCA.Files.Sidebar.open(e.path),window.OCP.Files.Router.goToRoute(null,{view:t.id,fileid:e.fileid},{dir:n},!0),null}catch(e){return d.error("Error while opening sidebar",{error:e}),!1}},order:-50}),Ce=new r.p$({id:"view-in-folder",displayName:()=>(0,a.Iu)("files","View in folder"),iconSvgInline:()=>re,enabled(e,t){if("files"===t.id)return!1;if(1!==e.length)return!1;const n=e[0];return!!n.isDavRessource&&n.permissions!==r.y3.NONE&&n.type===r.Tv.File},exec:async e=>!(!e||e.type!==r.Tv.File)&&(window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:e.fileid},{dir:e.dirname}),null),order:80}),xe={id:"newFolder",displayName:(0,a.Iu)("files","New folder"),enabled:e=>0!=(e.permissions&r.y3.CREATE),iconSvgInline:'',order:0,async handler(e,t){const n=t.map((e=>e.basename)),i=ue((0,a.Iu)("files","New folder"),n),{fileid:l,source:c}=await(async(e,t)=>{const n=e.source+"/"+t,i=e.encodedSource+"/"+encodeURIComponent(t),r=await(0,s.Z)({method:"MKCOL",url:i,headers:{Overwrite:"F"}});return{fileid:parseInt(r.headers["oc-fileid"]),source:n}})(e,i),u=new r.gt({source:c,id:l,mtime:new Date,owner:(0,m.ts)()?.uid||null,permissions:r.y3.ALL,root:e?.root||"/files/"+(0,m.ts)()?.uid});(0,w.s$)((0,a.Iu)("files",'Created new folder "{name}"',{name:(0,ne.basename)(c)})),d.debug("Created new folder",{folder:u,source:c}),(0,o.j8)("files:node:created",u),(0,o.j8)("files:node:rename",u)}};var Ee=i(43554),_e=i(14596),ke=i(8501),Be=i(79267);const Te="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:"undefined"!=typeof window?window:globalThis,Ne=Te.fetch.bind(Te);Te.Headers,Te.Request,Te.Response;const Oe="@@HOTPATCHER",Ie=()=>{};function Pe(e){return{original:e,methods:[e],final:!1}}class Se{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=Oe}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(e){this.configuration.getEmptyAction=e}control(e,t=!1){if(!e||e.__type__!==Oe)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(e.configuration.registry).forEach((n=>{this.configuration.registry.hasOwnProperty(n)?t&&(this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])):this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])})),e._configuration=this.configuration,this}execute(e,...t){return(this.get(e)||Ie)(...t)}get(e){const t=this.configuration.registry[e];if(!t)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${e}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return function(...e){if(0===e.length)throw new Error("Failed creating sequence: No functions provided");return function(...t){let n=t;const i=this;for(;e.length>0;)n=[e.shift().apply(i,n)];return n[0]}}(...t.methods)}isPatched(e){return!!this.configuration.registry[e]}patch(e,t,n={}){const{chain:i=!1}=n;if(this.configuration.registry[e]&&this.configuration.registry[e].final)throw new Error(`Failed patching '${e}': Method marked as being final`);if("function"!=typeof t)throw new Error(`Failed patching '${e}': Provided method is not a function`);if(i)this.configuration.registry[e]?this.configuration.registry[e].methods.push(t):this.configuration.registry[e]=Pe(t);else if(this.isPatched(e)){const{original:n}=this.configuration.registry[e];this.configuration.registry[e]=Object.assign(Pe(t),{original:n})}else this.configuration.registry[e]=Pe(t);return this}patchInline(e,t,...n){return this.isPatched(e)||this.patch(e,t),this.execute(e,...n)}plugin(e,...t){return t.forEach((t=>{this.patch(e,t,{chain:!0})})),this}restore(e){if(!this.isPatched(e))throw new Error(`Failed restoring method: No method present for key: ${e}`);if("function"!=typeof this.configuration.registry[e].original)throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${e}`);return this.configuration.registry[e].methods=[this.configuration.registry[e].original],this}setFinal(e){if(!this.configuration.registry.hasOwnProperty(e))throw new Error(`Failed marking '${e}' as final: No method found for key`);return this.configuration.registry[e].final=!0,this}}let Re=null;var Le=i(62639),je=i(2568);const De="abcdef0123456789";function $e(e,t){const n=e.url.replace("//",""),i=-1==n.indexOf("/")?"/":n.slice(n.indexOf("/")),r=e.method?e.method.toUpperCase():"GET",o=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&"auth",a=`00000000${t.nc}`.slice(-8),s=function(e,t,n,i,r,o,a){const s=a||je(`${t}:${n}:${i}`);return e&&"md5-sess"===e.toLowerCase()?je(`${s}:${r}:${o}`):s}(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),l=je(`${r}:${i}`),d=je(o?`${s}:${t.nonce}:${a}:${t.cnonce}:${o}:${l}`:`${s}:${t.nonce}:${l}`),c={username:t.username,realm:t.realm,nonce:t.nonce,uri:i,qop:o,response:d,nc:a,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},u=[];for(const e in c)c[e]&&("qop"===e||"nc"===e||"algorithm"===e?u.push(`${e}=${c[e]}`):u.push(`${e}="${c[e]}"`));return`Digest ${u.join(", ")}`}function Me(e){return function(e){if("object"!=typeof e||null===e||"[object Object]"!=Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e)?Object.assign({},e):Object.setPrototypeOf(Object.assign({},e),Object.getPrototypeOf(e))}function Fe(...e){let t=null,n=[...e];for(;n.length>0;){const e=n.shift();t=t?Ve(t,e):Me(e)}return t}function Ve(e,t){const n=Me(e);return Object.keys(t).forEach((e=>{n.hasOwnProperty(e)?Array.isArray(t[e])?n[e]=Array.isArray(n[e])?[...n[e],...t[e]]:[...t[e]]:"object"==typeof t[e]&&t[e]?n[e]="object"==typeof n[e]&&n[e]?Ve(n[e],t[e]):Me(t[e]):n[e]=t[e]:n[e]=t[e]})),n}function Ue(...e){if(0===e.length)return{};const t={};return e.reduce(((e,n)=>(Object.keys(n).forEach((i=>{const r=i.toLowerCase();t.hasOwnProperty(r)?e[t[r]]=n[i]:(t[r]=i,e[i]=n[i])})),e)),{})}var He=i(42830);const qe="function"==typeof ArrayBuffer,{toString:ze}=Object.prototype;function Ye(e){const t=(Re||(Re=new Se),Re);return t.patchInline("request",(e=>t.patchInline("fetch",Ne,e.url,function(e){let t={};const n={method:e.method};if(e.headers&&(t=Ue(t,e.headers)),void 0!==e.data){const[i,r]=function(e){if(!(0,Le.$)()&&e instanceof He.Readable)return[e,{}];if("string"==typeof e)return[e,{}];if(null!=(t=e)&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))return[e,{}];if(function(e){return qe&&(e instanceof ArrayBuffer||"[object ArrayBuffer]"===ze.call(e))}(e))return[e,{}];if(e&&"object"==typeof e)return[JSON.stringify(e),{"content-type":"application/json"}];var t;throw new Error("Unable to convert request body: Unexpected body type: "+typeof e)}(e.data);n.body=i,t=Ue(t,r)}return e.signal&&(n.signal=e.signal),e.withCredentials&&(n.credentials="include"),(0,Le.$)()||(e.httpAgent||e.httpsAgent)&&(n.agent=t=>"http:"===t.protocol?e.httpAgent||new ke.Agent:e.httpsAgent||new Be.Agent),n.headers=t,n}(e))),e)}const We=`/files/${(0,m.ts)()?.uid}`,Ge=(0,u.generateRemoteUrl)("dav"+We),Ze=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ge;const t=(0,_e.eI)(e,{headers:{requesttoken:(0,m.IH)()||""}});return(0,_e.lD)().patch("request",(e=>(e.headers?.method&&(e.method=e.headers.method,delete e.headers.method),async function(e){if(!e._digest)return Ye(e);const t=e._digest;delete e._digest,t.hasDigestAuth&&(e=Fe(e,{headers:{Authorization:$e(e,t)}}));const n=await Ye(e);if(401==n.status){if(t.hasDigestAuth=function(e,t){const n=e.headers&&e.headers.get("www-authenticate")||"";if("digest"!==n.split(/\s/)[0].toLowerCase())return!1;const i=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const e=i.exec(n);if(!e)break;t[e[1]]=e[2]||e[3]}return t.nc+=1,t.cnonce=function(){let e="";for(let t=0;t<32;++t)e=`${e}${De[Math.floor(16*Math.random())]}`;return e}(),!0}(n,t),t.hasDigestAuth){e=Fe(e,{headers:{Authorization:$e(e,t)}});const n=await Ye(e);return 401==n.status?t.hasDigestAuth=!1:t.nc++,n}}else t.nc++;return n}(e)))),t};var Xe=i(3443);const Ke=function(e){return e.split("").reduce((function(e,t){return(e=(e<<5)-e+t.charCodeAt(0))&e}),0)},Je=Ze(),Qe=function(e){const t=(0,m.ts)()?.uid;if(!t)throw new Error("No user id found");const n=e.props,i=(0,r.zu)(n?.permissions),o=(n["owner-id"]||t).toString(),a=(0,u.generateRemoteUrl)("dav"+We+e.filename),s={id:n?.fileid<0?Ke(a):n?.fileid||0,source:a,mtime:new Date(e.lastmod),mime:e.mime||"application/octet-stream",size:n?.size||0,permissions:i,owner:o,root:We,attributes:{...e,...n,hasPreview:n?.["has-preview"],failed:n?.fileid<0}};return delete s.attributes.props,"file"===e.type?new r.$B(s):new r.gt(s)},et=Ze(),tt=`\n\n\t\n\t\t${(0,r.m0)()}\n\t\n\t\n\t\t1\n\t\n`,nt=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const t=(0,r.h7)();let n;"/"===e&&(n=await et.stat(e,{details:!0,data:t}));const i=await et.getDirectoryContents(e,{details:!0,data:"/"===e?tt:t,headers:{method:"/"===e?"REPORT":"PROPFIND"},includeSelf:!0}),o=n?.data||i.data[0],a=i.data.filter((t=>t.filename!==e));return{folder:Qe(o),contents:a.map(Qe)}},it=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new r.G7({id:rt(e.path),name:(0,ne.basename)(e.path),icon:ge,order:t,params:{dir:e.path,fileid:e.fileid.toString(),view:"favorites"},parent:"favorites",columns:[],getContents:nt})},rt=function(e){return`favorite-${Ke(e)}`},ot=(0,r.rp)(),at=Math.round(Date.now()/1e3-1209600);var st=i(52506),lt=i(79584);const dt={name:"TemplatePreview",inheritAttrs:!1,props:{basename:{type:String,required:!0},checked:{type:Boolean,default:!1},fileid:{type:[String,Number],required:!0},filename:{type:String,required:!0},previewUrl:{type:String,default:null},hasPreview:{type:Boolean,default:!0},mime:{type:String,required:!0},ratio:{type:Number,default:null}},data:()=>({failedPreview:!1}),computed:{nameWithoutExt(){return this.basename.indexOf(".")>-1?this.basename.split(".").slice(0,-1).join("."):this.basename},id(){return`template-picker-${this.fileid}`},realPreviewUrl(){return this.failedPreview&&this.mimeIcon?this.mimeIcon:this.previewUrl?this.previewUrl:(0,m.ts)()?(0,u.generateUrl)(`/core/preview?fileId=${this.fileid}&x=256&y=256&a=1`):(0,u.generateUrl)(`/apps/files_sharing/publicpreview/${document.getElementById("sharingToken")&&document.getElementById("sharingToken").value}?fileId=${this.fileid}&file=${function(e){const t=(e.startsWith("/")?e:`/${e}`).split("/");let n="";return t.forEach((e=>{""!==e&&(n+="/"+encodeURIComponent(e))})),n}(this.filename)}&x=256&y=256&a=1`)},mimeIcon(){return OC.MimeType.getIconUrl(this.mime)}},methods:{onCheck(){this.$emit("check",this.fileid)},onFailure(){this.failedPreview=!0}}};var ct=i(92246),ut={};ut.styleTagTransform=j(),ut.setAttributes=P(),ut.insert=O().bind(null,"head"),ut.domAPI=T(),ut.insertStyleElement=R(),k()(ct.Z,ut),ct.Z&&ct.Z.locals&&ct.Z.locals;var pt=i(51900);const ft=(0,pt.Z)(dt,(function(){var e=this,t=e._self._c;return t("li",{staticClass:"template-picker__item"},[t("input",{staticClass:"radio",attrs:{id:e.id,type:"radio",name:"template-picker"},domProps:{checked:e.checked},on:{change:e.onCheck}}),e._v(" "),t("label",{staticClass:"template-picker__label",attrs:{for:e.id}},[t("div",{staticClass:"template-picker__preview",class:e.failedPreview?"template-picker__preview--failed":""},[t("img",{staticClass:"template-picker__image",attrs:{src:e.realPreviewUrl,alt:"",draggable:"false"},on:{error:e.onFailure}})]),e._v(" "),t("span",{staticClass:"template-picker__title"},[e._v("\n\t\t\t"+e._s(e.nameWithoutExt)+"\n\t\t")])])])}),[],!1,null,"0859a92c",null).exports,ht=y.default.extend({name:"TemplatePicker",components:{NcEmptyContent:st.Z,NcModal:lt.Z,TemplatePreview:ft},props:{logger:{type:Object,required:!0}},data:()=>({checked:-1,loading:!1,name:null,opened:!1,provider:null}),computed:{extension(){return(0,ne.extname)(this.name)},nameWithoutExt(){return this.extension?this.name.slice(0,0-this.extension.length):this.name},emptyTemplate(){return{basename:t("files","Blank"),fileid:-1,filename:this.t("files","Blank"),hasPreview:!1,mime:this.provider?.mimetypes[0]||this.provider?.mimetypes}},selectedTemplate(){return this.provider?this.provider.templates.find((e=>e.fileid===this.checked)):null},style(){if(!this.provider)return{};const e=(this.provider.ratio?this.provider.ratio:1.77)>1?240:160;return{"--margin":"8px","--width":e+"px","--border":"2px","--fullwidth":e+16+4+"px","--height":this.provider.ratio?Math.round(e/this.provider.ratio)+"px":null}}},methods:{async open(e,t){this.checked=this.emptyTemplate.fileid,this.name=e,this.provider=t;const n=(await async function(){return(await s.Z.get((0,u.generateOcsUrl)("apps/files/api/v1/templates"))).data.ocs.data}()).find((e=>e.app===t.app&&e.label===t.label));if(null===n)throw new Error("Failed to match provider in results");this.provider=n,0!==n.templates.length?this.opened=!0:this.onSubmit()},close(){this.checked=this.emptyTemplate.fileid,this.loading=!1,this.name=null,this.opened=!1,this.provider=null},onCheck(e){this.checked=e},async onSubmit(){this.loading=!0;const e=new URL(window.location.href).searchParams.get("dir")||"/";this.nameWithoutExt===this.name&&(this.logger.warn("Fixed invalid filename",{name:this.name,extension:this.provider?.extension}),this.name=this.name+this.provider?.extension);try{const t=await async function(e,t,n){return(await s.Z.post((0,u.generateOcsUrl)("apps/files/api/v1/templates/create"),{filePath:e,templatePath:t,templateType:n})).data.ocs.data}((0,ne.normalize)(`${e}/${this.name}`),this.selectedTemplate?.filename,this.selectedTemplate?.templateType);this.logger.debug("Created new file",t);const n=(0,m.ts)()?.uid||null,i=new r.$B({id:t.fileid,source:(0,u.generateRemoteUrl)((0,ne.join)("dav/files",n,t.filename)),root:`/files/${n}`,mime:t.mime,mtime:new Date(1e3*t.lastmod),owner:n,size:t.size,permissions:t.permissions,attributes:{...t,"has-preview":t.hasPreview}});(0,o.j8)("files:node:created",i),window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:i.fileid},{dir:i.dirname,openfile:!0}),this.close()}catch(e){this.logger.error("Error while creating the new file from template",{error:e}),(0,w.x2)(this.t("files","Unable to create new file from template"))}finally{this.loading=!1}}}});var At=i(24142),gt={};gt.styleTagTransform=j(),gt.setAttributes=P(),gt.insert=O().bind(null,"head"),gt.domAPI=T(),gt.insertStyleElement=R(),k()(At.Z,gt),At.Z&&At.Z.locals&&At.Z.locals;const mt=(0,pt.Z)(ht,(function(){var e=this,t=e._self._c;return e._self._setupProxy,e.opened?t("NcModal",{staticClass:"templates-picker",attrs:{"clear-view-delay":-1,size:"large"},on:{close:e.close}},[t("form",{staticClass:"templates-picker__form",style:e.style,on:{submit:function(t){return t.preventDefault(),t.stopPropagation(),e.onSubmit.apply(null,arguments)}}},[t("h2",[e._v(e._s(e.t("files","Pick a template for {name}",{name:e.nameWithoutExt})))]),e._v(" "),t("ul",{staticClass:"templates-picker__list"},[t("TemplatePreview",e._b({attrs:{checked:e.checked===e.emptyTemplate.fileid},on:{check:e.onCheck}},"TemplatePreview",e.emptyTemplate,!1)),e._v(" "),e._l(e.provider.templates,(function(n){return t("TemplatePreview",e._b({key:n.fileid,attrs:{checked:e.checked===n.fileid,ratio:e.provider.ratio},on:{check:e.onCheck}},"TemplatePreview",n,!1))}))],2),e._v(" "),t("div",{staticClass:"templates-picker__buttons"},[t("input",{staticClass:"primary",attrs:{type:"submit","aria-label":e.t("files","Create a new file with the selected template")},domProps:{value:e.t("files","Create")}})])]),e._v(" "),e.loading?t("NcEmptyContent",{staticClass:"templates-picker__loading",attrs:{icon:"icon-loading"}},[e._v("\n\t\t"+e._s(e.t("files","Creating file"))+"\n\t")]):e._e()],1):e._e()}),[],!1,null,"48121b39",null).exports,wt=(0,l.IY)().setApp("files").detectUser().build();y.default.mixin({methods:{t:a.Iu,n:a.uN}});const vt=document.createElement("div");vt.id="template-picker",document.body.appendChild(vt);let yt=(0,Ee.j)("files","templates",[]),bt=(0,Ee.j)("files","templates_path",!1);wt.debug("Templates providers",{templates:yt}),wt.debug("Templates folder",{templatesPath:bt});const Ct=new(y.default.extend(mt))({name:"TemplatePicker",propsData:{logger:wt}});Ct.$mount("#template-picker"),bt||(wt.debug("Templates folder not initialized"),(0,r.cd)({id:"template-picker",displayName:(0,a.Iu)("files","Create new templates folder"),iconSvgInline:'',order:10,enabled:e=>e.owner===(0,m.ts)()?.uid&&0!=(e.permissions&r.y3.CREATE),handler(e,t){const n=t.map((e=>e.basename)),i=ue((0,a.Iu)("files","Templates"),n);xt(e,i),(0,r.oE)("template-picker")}})),yt.forEach(((e,t)=>{(0,r.cd)({id:`template-new-${e.app}-${t}`,displayName:e.label,iconClass:e.iconClass||"icon-file",enabled:e=>0!=(e.permissions&r.y3.CREATE),order:11,handler(t,n){const i=n.map((e=>e.basename)),r=ue(e.label+e.extension,i);Ct.open(r,e)}})}));const xt=async function(e,t){const n=(0,ne.join)(e.path,t);try{wt.debug("Initializing the templates directory",{templatePath:n});const e=await s.Z.post((0,u.generateOcsUrl)("apps/files/api/v1/templates/path"),{templatePath:n,copySystemTemplates:!0});window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:void 0},{dir:n}),yt=e.data.ocs.data.templates,bt=e.data.ocs.data.template_path}catch(e){wt.error("Unable to initialize the templates directory"),(0,w.x2)((0,a.Iu)("files","Unable to initialize the templates directory"))}};(0,r.p4)(c),(0,r.p4)(A),(0,r.p4)(v),(0,r.p4)(E),(0,r.p4)(Ae),(0,r.p4)(me),(0,r.p4)(we),(0,r.p4)(ve),(0,r.p4)(be),(0,r.p4)(Ce),(0,r.cd)(xe),(()=>{const e=(0,Ee.j)("files","favoriteFolders",[]),t=e.map(((e,t)=>it(e,t)));d.debug("Generating favorites view",{favoriteFolders:e});const n=(0,r.Ti)();n.register(new r.G7({id:"favorites",name:(0,a.Iu)("files","Favorites"),caption:(0,a.Iu)("files","List of favorites files and folders."),emptyTitle:(0,a.Iu)("files","No favorites yet"),emptyCaption:(0,a.Iu)("files","Files and folders you mark as favorite will show up here"),icon:b,order:5,columns:[],getContents:nt})),t.forEach((e=>n.register(e))),(0,o.Ld)("files:favorites:added",(e=>{e.type===r.Tv.Folder&&(null!==e.path&&e.root?.startsWith("/files")?s(e):d.error("Favorite folder is not within user files root",{node:e}))})),(0,o.Ld)("files:favorites:removed",(e=>{e.type===r.Tv.Folder&&(null!==e.path&&e.root?.startsWith("/files")?l(e.path):d.error("Favorite folder is not within user files root",{node:e}))}));const i=function(){e.sort(((e,t)=>e.path.localeCompare(t.path,(0,a.G3)(),{ignorePunctuation:!0}))),e.forEach(((e,n)=>{const i=t.find((t=>t.id===rt(e.path)));i&&(i.order=n)}))},s=function(r){const o={path:r.path,fileid:r.fileid},a=it(o);e.find((e=>e.path===r.path))||(e.push(o),t.push(a),i(),n.register(a))},l=function(r){const o=rt(r),a=e.findIndex((e=>e.path===r));-1!==a&&(e.splice(a,1),t.splice(a,1),n.remove(o),i())}})(),(0,r.Ti)().register(new r.G7({id:"files",name:(0,a.Iu)("files","All files"),caption:(0,a.Iu)("files","List of your files and folders."),icon:ge,order:0,getContents:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const t=new AbortController,n=(0,r.h7)();return new Xe.CancelablePromise((async(i,r,o)=>{o((()=>t.abort()));try{const r=await Je.getDirectoryContents(e,{details:!0,data:n,includeSelf:!0,signal:t.signal}),o=r.data[0],a=r.data.slice(1);if(o.filename!==e)throw new Error("Root node does not match requested path");i({folder:Qe(o),contents:a.map((e=>{try{return Qe(e)}catch(t){return d.error(`Invalid node detected '${e.basename}'`,{error:t}),null}})).filter(Boolean)})}catch(e){r(e)}}))}})),(0,r.Ti)().register(new r.G7({id:"recent",name:(0,a.Iu)("files","Recent"),caption:(0,a.Iu)("files","List of recently modified files and folders."),emptyTitle:(0,a.Iu)("files","No recently modified files"),emptyCaption:(0,a.Iu)("files","Files and folders you recently modified will show up here."),icon:'',order:2,defaultSortKey:"mtime",getContents:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const t=(await ot.getDirectoryContents(e,{details:!0,data:(0,r.tB)(at),headers:{method:"SEARCH","Content-Type":"application/xml; charset=utf-8"},deep:!0})).data;return{folder:new r.gt({id:0,source:`${r.SR}${r._o}`,root:r._o,owner:(0,m.ts)()?.uid||null,permissions:r.y3.READ}),contents:t.map((e=>(0,r.RL)(e)))}}})),"serviceWorker"in navigator?window.addEventListener("load",(async()=>{try{const e=(0,u.generateUrl)("/apps/files/preview-service-worker.js",{},{noRewrite:!0}),t=await navigator.serviceWorker.register(e,{scope:"/"});d.debug("SW registered: ",{registration:t})}catch(e){d.error("SW registration failed: ",{error:e})}})):d.debug("Service Worker is not enabled on this browser."),(0,r.qq)("nc:hidden",{nc:"http://nextcloud.org/ns"}),(0,r.qq)("nc:metadata-files-live-photo",{nc:"http://nextcloud.org/ns"})},50584:e=>{e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},3443:function(e,t,n){var i,r,o=n(25108);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=function(e){"use strict";function t(e,n){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},t(e,n)}function n(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=i(e);if(t){var o=i(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n{"use strict";n.d(t,{Z:()=>h});var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o),s=n(61667),l=n.n(s),d=new URL(n(79839),n.b),c=new URL(n(88717),n.b),u=a()(r()),p=l()(d),f=l()(c);u.push([e.id,`@charset "UTF-8";\n/**\n * @copyright Copyright (c) 2019 Julius Härtl \n *\n * @author Julius Härtl \n * @author John Molakvoæ \n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n.toastify.dialogs {\n min-width: 200px;\n background: none;\n background-color: var(--color-main-background);\n color: var(--color-main-text);\n box-shadow: 0 0 6px 0 var(--color-box-shadow);\n padding: 0 12px;\n margin-top: 45px;\n position: fixed;\n z-index: 10100;\n border-radius: var(--border-radius);\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-container {\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-button,\n.toastify.dialogs .toast-close {\n position: static;\n overflow: hidden;\n box-sizing: border-box;\n min-width: 44px;\n height: 100%;\n padding: 12px;\n white-space: nowrap;\n background-repeat: no-repeat;\n background-position: center;\n background-color: transparent;\n min-height: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close,\n.toastify.dialogs .toast-close.toast-close {\n text-indent: 0;\n opacity: .4;\n border: none;\n min-height: 44px;\n margin-left: 10px;\n font-size: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close:before,\n.toastify.dialogs .toast-close.toast-close:before {\n background-image: url(${p});\n content: " ";\n filter: var(--background-invert-if-dark);\n display: inline-block;\n width: 16px;\n height: 16px;\n}\n.toastify.dialogs .toast-undo-button.toast-undo-button,\n.toastify.dialogs .toast-close.toast-undo-button {\n height: calc(100% - 6px);\n margin: 3px 3px 3px 12px;\n}\n.toastify.dialogs .toast-undo-button:hover,\n.toastify.dialogs .toast-undo-button:focus,\n.toastify.dialogs .toast-undo-button:active,\n.toastify.dialogs .toast-close:hover,\n.toastify.dialogs .toast-close:focus,\n.toastify.dialogs .toast-close:active {\n cursor: pointer;\n opacity: 1;\n}\n.toastify.dialogs.toastify-top {\n right: 10px;\n}\n.toastify.dialogs.toast-with-click {\n cursor: pointer;\n}\n.toastify.dialogs.toast-error {\n border-left: 3px solid var(--color-error);\n}\n.toastify.dialogs.toast-info {\n border-left: 3px solid var(--color-primary);\n}\n.toastify.dialogs.toast-warning {\n border-left: 3px solid var(--color-warning);\n}\n.toastify.dialogs.toast-success,\n.toastify.dialogs.toast-undo {\n border-left: 3px solid var(--color-success);\n}\n.theme--dark .toastify.dialogs .toast-close.toast-close:before {\n background-image: url(${f});\n}\n._file-picker__file-icon_1vgv4_5 {\n width: 32px;\n height: 32px;\n min-width: 32px;\n min-height: 32px;\n background-repeat: no-repeat;\n background-size: contain;\n display: flex;\n justify-content: center;\n}\ntr.file-picker__row[data-v-6aded0d9] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-6aded0d9] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td.row-checkbox[data-v-6aded0d9] {\n padding: 0 2px;\n}\ntr.file-picker__row td[data-v-6aded0d9]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-6aded0d9] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-6aded0d9] {\n padding-inline: 2px 0;\n}\n@keyframes gradient-6aded0d9 {\n 0% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n to {\n background-position: 0% 50%;\n }\n}\n.loading-row .row-checkbox[data-v-6aded0d9] {\n text-align: center !important;\n}\n.loading-row span[data-v-6aded0d9] {\n display: inline-block;\n height: 24px;\n background: linear-gradient(to right, var(--color-background-darker), var(--color-text-maxcontrast), var(--color-background-darker));\n background-size: 600px 100%;\n border-radius: var(--border-radius);\n animation: gradient-6aded0d9 12s ease infinite;\n}\n.loading-row .row-wrapper[data-v-6aded0d9] {\n display: inline-flex;\n align-items: center;\n}\n.loading-row .row-checkbox span[data-v-6aded0d9] {\n width: 24px;\n}\n.loading-row .row-name span[data-v-6aded0d9]:last-of-type {\n margin-inline-start: 6px;\n width: 130px;\n}\n.loading-row .row-size span[data-v-6aded0d9] {\n width: 80px;\n}\n.loading-row .row-modified span[data-v-6aded0d9] {\n width: 90px;\n}\ntr.file-picker__row[data-v-48df4f27] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-48df4f27] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td.row-checkbox[data-v-48df4f27] {\n padding: 0 2px;\n}\ntr.file-picker__row td[data-v-48df4f27]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-48df4f27] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-48df4f27] {\n padding-inline: 2px 0;\n}\n.file-picker__row--selected[data-v-48df4f27] {\n background-color: var(--color-background-dark);\n}\n.file-picker__row[data-v-48df4f27]:hover {\n background-color: var(--color-background-hover);\n}\n.file-picker__name-container[data-v-48df4f27] {\n display: flex;\n justify-content: start;\n align-items: center;\n height: 100%;\n}\n.file-picker__file-name[data-v-48df4f27] {\n padding-inline-start: 6px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.file-picker__file-extension[data-v-48df4f27] {\n color: var(--color-text-maxcontrast);\n min-width: fit-content;\n}\n.file-picker__header-preview[data-v-d3c94818] {\n width: 22px;\n height: 32px;\n flex: 0 0 auto;\n}\n.file-picker__files[data-v-d3c94818] {\n margin: 2px;\n margin-inline-start: 12px;\n overflow: scroll auto;\n}\n.file-picker__files table[data-v-d3c94818] {\n width: 100%;\n max-height: 100%;\n table-layout: fixed;\n}\n.file-picker__files th[data-v-d3c94818] {\n position: sticky;\n z-index: 1;\n top: 0;\n background-color: var(--color-main-background);\n padding: 2px;\n}\n.file-picker__files th .header-wrapper[data-v-d3c94818] {\n display: flex;\n}\n.file-picker__files th.row-checkbox[data-v-d3c94818] {\n width: 44px;\n}\n.file-picker__files th.row-name[data-v-d3c94818] {\n width: 230px;\n}\n.file-picker__files th.row-size[data-v-d3c94818] {\n width: 100px;\n}\n.file-picker__files th.row-modified[data-v-d3c94818] {\n width: 120px;\n}\n.file-picker__files th[data-v-d3c94818]:not(.row-size) .button-vue__wrapper {\n justify-content: start;\n flex-direction: row-reverse;\n}\n.file-picker__files th[data-v-d3c94818]:not(.row-size) .button-vue {\n padding-inline: 16px 4px;\n}\n.file-picker__files th.row-size[data-v-d3c94818] .button-vue__wrapper {\n justify-content: end;\n}\n.file-picker__files th[data-v-d3c94818] .button-vue__wrapper {\n color: var(--color-text-maxcontrast);\n}\n.file-picker__files th[data-v-d3c94818] .button-vue__wrapper .button-vue__text {\n font-weight: 400;\n}\n.file-picker__breadcrumbs[data-v-3bc9efa5] {\n flex-grow: 0 !important;\n}\n.file-picker__side[data-v-e96bec41] {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: .5rem;\n min-width: 200px;\n padding: 2px;\n overflow: auto;\n}\n.file-picker__side[data-v-e96bec41] .button-vue__wrapper {\n justify-content: start;\n}\n.file-picker__filter-input[data-v-e96bec41] {\n margin-block: 7px;\n max-width: 260px;\n}\n@media (max-width: 736px) {\n .file-picker__side[data-v-e96bec41] {\n flex-direction: row;\n min-width: unset;\n }\n}\n@media (max-width: 512px) {\n .file-picker__side[data-v-e96bec41] {\n flex-direction: row;\n min-width: unset;\n }\n .file-picker__filter-input[data-v-e96bec41] {\n max-width: unset;\n }\n}\n.file-picker__navigation {\n padding-inline: 8px 2px;\n}\n.file-picker__navigation,\n.file-picker__navigation * {\n box-sizing: border-box;\n}\n.file-picker__navigation .v-select.select {\n min-width: 220px;\n}\n@media (min-width: 513px) and (max-width: 736px) {\n .file-picker__navigation {\n gap: 11px;\n }\n}\n@media (max-width: 512px) {\n .file-picker__navigation {\n flex-direction: column-reverse !important;\n }\n}\n.file-picker__view[data-v-821451ce] {\n height: 50px;\n display: flex;\n justify-content: start;\n align-items: center;\n}\n.file-picker__view h3[data-v-821451ce] {\n font-weight: 700;\n height: fit-content;\n margin: 0;\n}\n.file-picker__main[data-v-821451ce] {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1;\n padding-inline: 2px;\n}\n.file-picker__main *[data-v-821451ce] {\n box-sizing: border-box;\n}\n[data-v-821451ce] .file-picker {\n height: min(80vh, 800px) !important;\n}\n@media (max-width: 512px) {\n [data-v-821451ce] .file-picker {\n height: calc(100% - 16px - var(--default-clickable-area)) !important;\n }\n}\n[data-v-821451ce] .file-picker__content {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n`,"",{version:3,sources:["webpack://./node_modules/@nextcloud/dialogs/dist/style.css"],names:[],mappings:"AAAA,g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ACA;EACE,6BAA6B;AAC/B;AACA;EACE,qBAAqB;EACrB,YAAY;EACZ,oIAAoI;EACpI,2BAA2B;EAC3B,mCAAmC;EACnC,8CAA8C;AAChD;AACA;EACE,oBAAoB;EACpB,mBAAmB;AACrB;AACA;EACE,WAAW;AACb;AACA;EACE,wBAAwB;EACxB,YAAY;AACd;AACA;EACE,WAAW;AACb;AACA;EACE,WAAW;AACb;AACA;EACE,+BAA+B;AACjC;AACA;EACE,eAAe;EACf,gBAAgB;EAChB,uBAAuB;EACvB,mBAAmB;AACrB;AACA;EACE,cAAc;AAChB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,eAAe;EACf,sBAAsB;AACxB;AACA;EACE,qBAAqB;AACvB;AACA;EACE,8CAA8C;AAChD;AACA;EACE,+CAA+C;AACjD;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,mBAAmB;EACnB,YAAY;AACd;AACA;EACE,yBAAyB;EACzB,YAAY;EACZ,gBAAgB;EAChB,uBAAuB;AACzB;AACA;EACE,oCAAoC;EACpC,sBAAsB;AACxB;AACA;EACE,WAAW;EACX,YAAY;EACZ,cAAc;AAChB;AACA;EACE,WAAW;EACX,yBAAyB;EACzB,qBAAqB;AACvB;AACA;EACE,WAAW;EACX,gBAAgB;EAChB,mBAAmB;AACrB;AACA;EACE,gBAAgB;EAChB,UAAU;EACV,MAAM;EACN,8CAA8C;EAC9C,YAAY;AACd;AACA;EACE,aAAa;AACf;AACA;EACE,WAAW;AACb;AACA;EACE,YAAY;AACd;AACA;EACE,YAAY;AACd;AACA;EACE,YAAY;AACd;AACA;EACE,sBAAsB;EACtB,2BAA2B;AAC7B;AACA;EACE,wBAAwB;AAC1B;AACA;EACE,oBAAoB;AACtB;AACA;EACE,oCAAoC;AACtC;AACA;EACE,gBAAgB;AAClB;AACA;EACE,uBAAuB;AACzB;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,oBAAoB;EACpB,UAAU;EACV,gBAAgB;EAChB,YAAY;EACZ,cAAc;AAChB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,iBAAiB;EACjB,gBAAgB;AAClB;AACA;EACE;IACE,mBAAmB;IACnB,gBAAgB;EAClB;AACF;AACA;EACE;IACE,mBAAmB;IACnB,gBAAgB;EAClB;EACA;IACE,gBAAgB;EAClB;AACF;AACA;EACE,uBAAuB;AACzB;AACA;;EAEE,sBAAsB;AACxB;AACA;EACE,gBAAgB;AAClB;AACA;EACE;IACE,SAAS;EACX;AACF;AACA;EACE;IACE,yCAAyC;EAC3C;AACF;AACA;EACE,YAAY;EACZ,aAAa;EACb,sBAAsB;EACtB,mBAAmB;AACrB;AACA;EACE,gBAAgB;EAChB,mBAAmB;EACnB,SAAS;AACX;AACA;EACE,sBAAsB;EACtB,WAAW;EACX,aAAa;EACb,sBAAsB;EACtB,aAAa;EACb,OAAO;EACP,mBAAmB;AACrB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,mCAAmC;AACrC;AACA;EACE;IACE,oEAAoE;EACtE;AACF;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,gBAAgB;AAClB",sourcesContent:["@charset \"UTF-8\";\n/**\n * @copyright Copyright (c) 2019 Julius Härtl \n *\n * @author Julius Härtl \n * @author John Molakvoæ \n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n.toastify.dialogs {\n min-width: 200px;\n background: none;\n background-color: var(--color-main-background);\n color: var(--color-main-text);\n box-shadow: 0 0 6px 0 var(--color-box-shadow);\n padding: 0 12px;\n margin-top: 45px;\n position: fixed;\n z-index: 10100;\n border-radius: var(--border-radius);\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-container {\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-button,\n.toastify.dialogs .toast-close {\n position: static;\n overflow: hidden;\n box-sizing: border-box;\n min-width: 44px;\n height: 100%;\n padding: 12px;\n white-space: nowrap;\n background-repeat: no-repeat;\n background-position: center;\n background-color: transparent;\n min-height: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close,\n.toastify.dialogs .toast-close.toast-close {\n text-indent: 0;\n opacity: .4;\n border: none;\n min-height: 44px;\n margin-left: 10px;\n font-size: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close:before,\n.toastify.dialogs .toast-close.toast-close:before {\n background-image: url(\"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='16'%20width='16'%3e%3cpath%20d='M14%2012.3L12.3%2014%208%209.7%203.7%2014%202%2012.3%206.3%208%202%203.7%203.7%202%208%206.3%2012.3%202%2014%203.7%209.7%208z'/%3e%3c/svg%3e\");\n content: \" \";\n filter: var(--background-invert-if-dark);\n display: inline-block;\n width: 16px;\n height: 16px;\n}\n.toastify.dialogs .toast-undo-button.toast-undo-button,\n.toastify.dialogs .toast-close.toast-undo-button {\n height: calc(100% - 6px);\n margin: 3px 3px 3px 12px;\n}\n.toastify.dialogs .toast-undo-button:hover,\n.toastify.dialogs .toast-undo-button:focus,\n.toastify.dialogs .toast-undo-button:active,\n.toastify.dialogs .toast-close:hover,\n.toastify.dialogs .toast-close:focus,\n.toastify.dialogs .toast-close:active {\n cursor: pointer;\n opacity: 1;\n}\n.toastify.dialogs.toastify-top {\n right: 10px;\n}\n.toastify.dialogs.toast-with-click {\n cursor: pointer;\n}\n.toastify.dialogs.toast-error {\n border-left: 3px solid var(--color-error);\n}\n.toastify.dialogs.toast-info {\n border-left: 3px solid var(--color-primary);\n}\n.toastify.dialogs.toast-warning {\n border-left: 3px solid var(--color-warning);\n}\n.toastify.dialogs.toast-success,\n.toastify.dialogs.toast-undo {\n border-left: 3px solid var(--color-success);\n}\n.theme--dark .toastify.dialogs .toast-close.toast-close:before {\n background-image: url(\"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='16'%20width='16'%3e%3cpath%20d='M14%2012.3L12.3%2014%208%209.7%203.7%2014%202%2012.3%206.3%208%202%203.7%203.7%202%208%206.3%2012.3%202%2014%203.7%209.7%208z'%20style='fill-opacity:1;fill:%23ffffff'/%3e%3c/svg%3e\");\n}\n._file-picker__file-icon_1vgv4_5 {\n width: 32px;\n height: 32px;\n min-width: 32px;\n min-height: 32px;\n background-repeat: no-repeat;\n background-size: contain;\n display: flex;\n justify-content: center;\n}\ntr.file-picker__row[data-v-6aded0d9] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-6aded0d9] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td.row-checkbox[data-v-6aded0d9] {\n padding: 0 2px;\n}\ntr.file-picker__row td[data-v-6aded0d9]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-6aded0d9] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-6aded0d9] {\n padding-inline: 2px 0;\n}\n@keyframes gradient-6aded0d9 {\n 0% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n to {\n background-position: 0% 50%;\n }\n}\n.loading-row .row-checkbox[data-v-6aded0d9] {\n text-align: center !important;\n}\n.loading-row span[data-v-6aded0d9] {\n display: inline-block;\n height: 24px;\n background: linear-gradient(to right, var(--color-background-darker), var(--color-text-maxcontrast), var(--color-background-darker));\n background-size: 600px 100%;\n border-radius: var(--border-radius);\n animation: gradient-6aded0d9 12s ease infinite;\n}\n.loading-row .row-wrapper[data-v-6aded0d9] {\n display: inline-flex;\n align-items: center;\n}\n.loading-row .row-checkbox span[data-v-6aded0d9] {\n width: 24px;\n}\n.loading-row .row-name span[data-v-6aded0d9]:last-of-type {\n margin-inline-start: 6px;\n width: 130px;\n}\n.loading-row .row-size span[data-v-6aded0d9] {\n width: 80px;\n}\n.loading-row .row-modified span[data-v-6aded0d9] {\n width: 90px;\n}\ntr.file-picker__row[data-v-48df4f27] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-48df4f27] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td.row-checkbox[data-v-48df4f27] {\n padding: 0 2px;\n}\ntr.file-picker__row td[data-v-48df4f27]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-48df4f27] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-48df4f27] {\n padding-inline: 2px 0;\n}\n.file-picker__row--selected[data-v-48df4f27] {\n background-color: var(--color-background-dark);\n}\n.file-picker__row[data-v-48df4f27]:hover {\n background-color: var(--color-background-hover);\n}\n.file-picker__name-container[data-v-48df4f27] {\n display: flex;\n justify-content: start;\n align-items: center;\n height: 100%;\n}\n.file-picker__file-name[data-v-48df4f27] {\n padding-inline-start: 6px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.file-picker__file-extension[data-v-48df4f27] {\n color: var(--color-text-maxcontrast);\n min-width: fit-content;\n}\n.file-picker__header-preview[data-v-d3c94818] {\n width: 22px;\n height: 32px;\n flex: 0 0 auto;\n}\n.file-picker__files[data-v-d3c94818] {\n margin: 2px;\n margin-inline-start: 12px;\n overflow: scroll auto;\n}\n.file-picker__files table[data-v-d3c94818] {\n width: 100%;\n max-height: 100%;\n table-layout: fixed;\n}\n.file-picker__files th[data-v-d3c94818] {\n position: sticky;\n z-index: 1;\n top: 0;\n background-color: var(--color-main-background);\n padding: 2px;\n}\n.file-picker__files th .header-wrapper[data-v-d3c94818] {\n display: flex;\n}\n.file-picker__files th.row-checkbox[data-v-d3c94818] {\n width: 44px;\n}\n.file-picker__files th.row-name[data-v-d3c94818] {\n width: 230px;\n}\n.file-picker__files th.row-size[data-v-d3c94818] {\n width: 100px;\n}\n.file-picker__files th.row-modified[data-v-d3c94818] {\n width: 120px;\n}\n.file-picker__files th[data-v-d3c94818]:not(.row-size) .button-vue__wrapper {\n justify-content: start;\n flex-direction: row-reverse;\n}\n.file-picker__files th[data-v-d3c94818]:not(.row-size) .button-vue {\n padding-inline: 16px 4px;\n}\n.file-picker__files th.row-size[data-v-d3c94818] .button-vue__wrapper {\n justify-content: end;\n}\n.file-picker__files th[data-v-d3c94818] .button-vue__wrapper {\n color: var(--color-text-maxcontrast);\n}\n.file-picker__files th[data-v-d3c94818] .button-vue__wrapper .button-vue__text {\n font-weight: 400;\n}\n.file-picker__breadcrumbs[data-v-3bc9efa5] {\n flex-grow: 0 !important;\n}\n.file-picker__side[data-v-e96bec41] {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: .5rem;\n min-width: 200px;\n padding: 2px;\n overflow: auto;\n}\n.file-picker__side[data-v-e96bec41] .button-vue__wrapper {\n justify-content: start;\n}\n.file-picker__filter-input[data-v-e96bec41] {\n margin-block: 7px;\n max-width: 260px;\n}\n@media (max-width: 736px) {\n .file-picker__side[data-v-e96bec41] {\n flex-direction: row;\n min-width: unset;\n }\n}\n@media (max-width: 512px) {\n .file-picker__side[data-v-e96bec41] {\n flex-direction: row;\n min-width: unset;\n }\n .file-picker__filter-input[data-v-e96bec41] {\n max-width: unset;\n }\n}\n.file-picker__navigation {\n padding-inline: 8px 2px;\n}\n.file-picker__navigation,\n.file-picker__navigation * {\n box-sizing: border-box;\n}\n.file-picker__navigation .v-select.select {\n min-width: 220px;\n}\n@media (min-width: 513px) and (max-width: 736px) {\n .file-picker__navigation {\n gap: 11px;\n }\n}\n@media (max-width: 512px) {\n .file-picker__navigation {\n flex-direction: column-reverse !important;\n }\n}\n.file-picker__view[data-v-821451ce] {\n height: 50px;\n display: flex;\n justify-content: start;\n align-items: center;\n}\n.file-picker__view h3[data-v-821451ce] {\n font-weight: 700;\n height: fit-content;\n margin: 0;\n}\n.file-picker__main[data-v-821451ce] {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1;\n padding-inline: 2px;\n}\n.file-picker__main *[data-v-821451ce] {\n box-sizing: border-box;\n}\n[data-v-821451ce] .file-picker {\n height: min(80vh, 800px) !important;\n}\n@media (max-width: 512px) {\n [data-v-821451ce] .file-picker {\n height: calc(100% - 16px - var(--default-clickable-area)) !important;\n }\n}\n[data-v-821451ce] .file-picker__content {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n"],sourceRoot:""}]);const h=u},92246:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([e.id,".template-picker__item[data-v-0859a92c]{display:flex}.template-picker__label[data-v-0859a92c]{display:flex;align-items:center;flex:1 1;flex-direction:column}.template-picker__label[data-v-0859a92c],.template-picker__label *[data-v-0859a92c]{cursor:pointer;user-select:none}.template-picker__label[data-v-0859a92c]::before{display:none !important}.template-picker__preview[data-v-0859a92c]{display:block;overflow:hidden;flex:1 1;width:var(--width);min-height:var(--height);max-height:var(--height);padding:0;border:var(--border) solid var(--color-border);border-radius:var(--border-radius-large)}input:checked+label>.template-picker__preview[data-v-0859a92c]{border-color:var(--color-primary-element)}.template-picker__preview--failed[data-v-0859a92c]{display:flex}.template-picker__image[data-v-0859a92c]{max-width:100%;background-color:var(--color-main-background);object-fit:cover}.template-picker__preview--failed .template-picker__image[data-v-0859a92c]{width:calc(var(--margin)*8);margin:auto;background-color:rgba(0,0,0,0) !important;object-fit:initial}.template-picker__title[data-v-0859a92c]{overflow:hidden;max-width:calc(var(--width) + 4px);padding:var(--margin);white-space:nowrap;text-overflow:ellipsis}","",{version:3,sources:["webpack://./apps/files/src/components/TemplatePreview.vue"],names:[],mappings:"AAGC,wCACC,YAAA,CAGD,yCACC,YAAA,CAEA,kBAAA,CACA,QAAA,CACA,qBAAA,CAEA,oFACC,cAAA,CACA,gBAAA,CAGD,iDACC,uBAAA,CAIF,2CACC,aAAA,CACA,eAAA,CAEA,QAAA,CACA,kBAAA,CACA,wBAAA,CACA,wBAAA,CACA,SAAA,CACA,8CAAA,CACA,wCAAA,CAEA,+DACC,yCAAA,CAGD,mDAEC,YAAA,CAIF,yCACC,cAAA,CACA,6CAAA,CAEA,gBAAA,CAID,2EACC,2BAAA,CAEA,WAAA,CACA,yCAAA,CAEA,kBAAA,CAGD,yCACC,eAAA,CAEA,kCAAA,CACA,qBAAA,CACA,kBAAA,CACA,sBAAA",sourcesContent:["\n\n.template-picker {\n\t&__item {\n\t\tdisplay: flex;\n\t}\n\n\t&__label {\n\t\tdisplay: flex;\n\t\t// Align in the middle of the grid\n\t\talign-items: center;\n\t\tflex: 1 1;\n\t\tflex-direction: column;\n\n\t\t&, * {\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\n\t\t&::before {\n\t\t\tdisplay: none !important;\n\t\t}\n\t}\n\n\t&__preview {\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t\t// Stretch so all entries are the same width\n\t\tflex: 1 1;\n\t\twidth: var(--width);\n\t\tmin-height: var(--height);\n\t\tmax-height: var(--height);\n\t\tpadding: 0;\n\t\tborder: var(--border) solid var(--color-border);\n\t\tborder-radius: var(--border-radius-large);\n\n\t\tinput:checked + label > & {\n\t\t\tborder-color: var(--color-primary-element);\n\t\t}\n\n\t\t&--failed {\n\t\t\t// Make sure to properly center fallback icon\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n\n\t&__image {\n\t\tmax-width: 100%;\n\t\tbackground-color: var(--color-main-background);\n\n\t\tobject-fit: cover;\n\t}\n\n\t// Failed preview, fallback to mime icon\n\t&__preview--failed &__image {\n\t\twidth: calc(var(--margin) * 8);\n\t\t// Center mime icon\n\t\tmargin: auto;\n\t\tbackground-color: transparent !important;\n\n\t\tobject-fit: initial;\n\t}\n\n\t&__title {\n\t\toverflow: hidden;\n\t\t// also count preview border\n\t\tmax-width: calc(var(--width) + 2*2px);\n\t\tpadding: var(--margin);\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n"],sourceRoot:""}]);const s=a},24142:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([e.id,".templates-picker__form[data-v-48121b39]{padding:calc(var(--margin)*2);padding-bottom:0}.templates-picker__form h2[data-v-48121b39]{text-align:center;font-weight:bold;margin:var(--margin) 0 calc(var(--margin)*2)}.templates-picker__list[data-v-48121b39]{display:grid;grid-gap:calc(var(--margin)*2);grid-auto-columns:1fr;max-width:calc(var(--fullwidth)*6);grid-template-columns:repeat(auto-fit, var(--fullwidth));grid-auto-rows:1fr;justify-content:center}.templates-picker__buttons[data-v-48121b39]{display:flex;justify-content:end;padding:calc(var(--margin)*2) var(--margin);position:sticky;bottom:0;background-image:linear-gradient(0, var(--gradient-main-background))}.templates-picker__buttons button[data-v-48121b39],.templates-picker__buttons input[type=submit][data-v-48121b39]{height:44px}.templates-picker[data-v-48121b39] .modal-container{position:relative}.templates-picker__loading[data-v-48121b39]{position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;margin:0;background-color:var(--color-main-background-translucent)}","",{version:3,sources:["webpack://./apps/files/src/views/TemplatePicker.vue"],names:[],mappings:"AAEC,yCACC,6BAAA,CAEA,gBAAA,CAEA,4CACC,iBAAA,CACA,gBAAA,CACA,4CAAA,CAIF,yCACC,YAAA,CACA,8BAAA,CACA,qBAAA,CAEA,kCAAA,CACA,wDAAA,CAEA,kBAAA,CAEA,sBAAA,CAGD,4CACC,YAAA,CACA,mBAAA,CACA,2CAAA,CACA,eAAA,CACA,QAAA,CACA,oEAAA,CAEA,kHACC,WAAA,CAKF,oDACC,iBAAA,CAGD,4CACC,iBAAA,CACA,KAAA,CACA,MAAA,CACA,sBAAA,CACA,UAAA,CACA,WAAA,CACA,QAAA,CACA,yDAAA",sourcesContent:["\n.templates-picker {\n\t&__form {\n\t\tpadding: calc(var(--margin) * 2);\n\t\t// Will be handled by the buttons\n\t\tpadding-bottom: 0;\n\n\t\th2 {\n\t\t\ttext-align: center;\n\t\t\tfont-weight: bold;\n\t\t\tmargin: var(--margin) 0 calc(var(--margin) * 2);\n\t\t}\n\t}\n\n\t&__list {\n\t\tdisplay: grid;\n\t\tgrid-gap: calc(var(--margin) * 2);\n\t\tgrid-auto-columns: 1fr;\n\t\t// We want maximum 5 columns. Putting 6 as we don't count the grid gap. So it will always be lower than 6\n\t\tmax-width: calc(var(--fullwidth) * 6);\n\t\tgrid-template-columns: repeat(auto-fit, var(--fullwidth));\n\t\t// Make sure all rows are the same height\n\t\tgrid-auto-rows: 1fr;\n\t\t// Center the columns set\n\t\tjustify-content: center;\n\t}\n\n\t&__buttons {\n\t\tdisplay: flex;\n\t\tjustify-content: end;\n\t\tpadding: calc(var(--margin) * 2) var(--margin);\n\t\tposition: sticky;\n\t\tbottom: 0;\n\t\tbackground-image: linear-gradient(0, var(--gradient-main-background));\n\n\t\tbutton, input[type='submit'] {\n\t\t\theight: 44px;\n\t\t}\n\t}\n\n\t// Make sure we're relative for the loading emptycontent on top\n\t::v-deep .modal-container {\n\t\tposition: relative;\n\t}\n\n\t&__loading {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tmargin: 0;\n\t\tbackground-color: var(--color-main-background-translucent);\n\t}\n}\n\n"],sourceRoot:""}]);const s=a},79267:(e,t,n)=>{var i=n(8501),r=n(8575),o=e.exports;for(var a in i)i.hasOwnProperty(a)&&(o[a]=i[a]);function s(e){if("string"==typeof e&&(e=r.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}o.request=function(e,t){return e=s(e),i.request.call(this,e,t)},o.get=function(e,t){return e=s(e),i.get.call(this,e,t)}},88473:(e,t,n)=>{(t=e.exports=n(79481)).Stream=t,t.Readable=t,t.Writable=n(64229),t.Duplex=n(56753),t.Transform=n(74605),t.PassThrough=n(82725),t.finished=n(8610),t.pipeline=n(59946)},8501:(e,t,n)=>{var i=n(11989),r=n(55676),o=n(47529),a=n(50584),s=n(8575),l=t;l.request=function(e,t){e="string"==typeof e?s.parse(e):o(e);var r=-1===n.g.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||r,l=e.hostname||e.host,d=e.port,c=e.path||"/";l&&-1!==l.indexOf(":")&&(l="["+l+"]"),e.url=(l?a+"//"+l:"")+(d?":"+d:"")+c,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var u=new i(e);return t&&u.on("response",t),u},l.get=function(e,t){var n=l.request(e,t);return n.end(),n},l.ClientRequest=i,l.IncomingMessage=r.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=a,l.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},8725:(e,t,n)=>{var i;function r(){if(void 0!==i)return i;if(n.g.XMLHttpRequest){i=new n.g.XMLHttpRequest;try{i.open("GET",n.g.XDomainRequest?"/":"https://example.com")}catch(e){i=null}}else i=null;return i}function o(e){var t=r();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function a(e){return"function"==typeof e}t.fetch=a(n.g.fetch)&&a(n.g.ReadableStream),t.writableStream=a(n.g.WritableStream),t.abortController=a(n.g.AbortController),t.arraybuffer=t.fetch||o("arraybuffer"),t.msstream=!t.fetch&&o("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&o("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!r()&&a(r().overrideMimeType),i=null},11989:(e,t,n)=>{var i=n(48764).Buffer,r=n(34155),o=n(8725),a=n(35717),s=n(55676),l=n(88473),d=s.IncomingMessage,c=s.readyStates,u=e.exports=function(e){var t,n=this;l.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+i.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var r=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)r=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!o.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}n._mode=function(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":"text"}(t,r),n._fetchTimer=null,n._socketTimeout=null,n._socketTimer=null,n.on("finish",(function(){n._onFinish()}))};a(u,l.Writable),u.prototype.setHeader=function(e,t){var n=e.toLowerCase();-1===p.indexOf(n)&&(this._headers[n]={name:e,value:t})},u.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},u.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},u.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var i=e._headers,a=null;"GET"!==t.method&&"HEAD"!==t.method&&(a=new Blob(e._body,{type:(i["content-type"]||{}).value||""}));var s=[];if(Object.keys(i).forEach((function(e){var t=i[e].name,n=i[e].value;Array.isArray(n)?n.forEach((function(e){s.push([t,e])})):s.push([t,n])})),"fetch"===e._mode){var l=null;if(o.abortController){var d=new AbortController;l=d.signal,e._fetchAbortController=d,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=n.g.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}n.g.fetch(e._opts.url,{method:e._opts.method,headers:s,body:a||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:l}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var u=e._xhr=new n.g.XMLHttpRequest;try{u.open(e._opts.method,e._opts.url,!0)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}"responseType"in u&&(u.responseType=e._mode),"withCredentials"in u&&(u.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in u&&u.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(u.timeout=t.requestTimeout,u.ontimeout=function(){e.emit("requestTimeout")}),s.forEach((function(e){u.setRequestHeader(e[0],e[1])})),e._response=null,u.onreadystatechange=function(){switch(u.readyState){case c.LOADING:case c.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(u.onprogress=function(){e._onXHRProgress()}),u.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{u.send(a)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}}}},u.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},u.prototype._connect=function(){var e=this;e._destroyed||(e._response=new d(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},u.prototype._write=function(e,t,n){this._body.push(e),n()},u.prototype._resetTimers=function(e){var t=this;n.g.clearTimeout(t._socketTimer),t._socketTimer=null,e?(n.g.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=n.g.setTimeout((function(){t.emit("timeout")}),t._socketTimeout))},u.prototype.abort=u.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},u.prototype.end=function(e,t,n){"function"==typeof e&&(n=e,e=void 0),l.Writable.prototype.end.call(this,e,t,n)},u.prototype.setTimeout=function(e,t){var n=this;t&&n.once("timeout",t),n._socketTimeout=e,n._resetTimers(!1)},u.prototype.flushHeaders=function(){},u.prototype.setNoDelay=function(){},u.prototype.setSocketKeepAlive=function(){};var p=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},55676:(e,t,n)=>{var i=n(34155),r=n(48764).Buffer,o=n(8725),a=n(35717),s=n(88473),l=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},d=t.IncomingMessage=function(e,t,n,a){var l=this;if(s.Readable.call(l),l._mode=n,l.headers={},l.rawHeaders=[],l.trailers={},l.rawTrailers=[],l.on("end",(function(){i.nextTick((function(){l.emit("close")}))})),"fetch"===n){if(l._fetchResponse=t,l.url=t.url,l.statusCode=t.status,l.statusMessage=t.statusText,t.headers.forEach((function(e,t){l.headers[t.toLowerCase()]=e,l.rawHeaders.push(t,e)})),o.writableStream){var d=new WritableStream({write:function(e){return a(!1),new Promise((function(t,n){l._destroyed?n():l.push(r.from(e))?t():l._resumeFetch=t}))},close:function(){a(!0),l._destroyed||l.push(null)},abort:function(e){a(!0),l._destroyed||l.emit("error",e)}});try{return void t.body.pipeTo(d).catch((function(e){a(!0),l._destroyed||l.emit("error",e)}))}catch(e){}}var c=t.body.getReader();!function e(){c.read().then((function(t){l._destroyed||(a(t.done),t.done?l.push(null):(l.push(r.from(t.value)),e()))})).catch((function(e){a(!0),l._destroyed||l.emit("error",e)}))}()}else if(l._xhr=e,l._pos=0,l.url=e.responseURL,l.statusCode=e.status,l.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===l.headers[n]&&(l.headers[n]=[]),l.headers[n].push(t[2])):void 0!==l.headers[n]?l.headers[n]+=", "+t[2]:l.headers[n]=t[2],l.rawHeaders.push(t[1],t[2])}})),l._charset="x-user-defined",!o.overrideMimeType){var u=l.rawHeaders["mime-type"];if(u){var p=u.match(/;\s*charset=([^;])(;|$)/);p&&(l._charset=p[1].toLowerCase())}l._charset||(l._charset="utf-8")}};a(d,s.Readable),d.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},d.prototype._onXHRProgress=function(e){var t=this,i=t._xhr,o=null;switch(t._mode){case"text":if((o=i.responseText).length>t._pos){var a=o.substr(t._pos);if("x-user-defined"===t._charset){for(var s=r.alloc(a.length),d=0;dt._pos&&(t.push(r.from(new Uint8Array(c.result.slice(t._pos)))),t._pos=c.result.byteLength)},c.onload=function(){e(!0),t.push(null)},c.readAsArrayBuffer(o)}t._xhr.readyState===l.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}},47529:e=>{e.exports=function(){for(var e={},n=0;n{"use strict";e.exports="data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20height=%2716%27%20width=%2716%27%3e%3cpath%20d=%27M14%2012.3L12.3%2014%208%209.7%203.7%2014%202%2012.3%206.3%208%202%203.7%203.7%202%208%206.3%2012.3%202%2014%203.7%209.7%208z%27%20style=%27fill-opacity:1;fill:%23ffffff%27/%3e%3c/svg%3e"},79839:e=>{"use strict";e.exports="data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20height=%2716%27%20width=%2716%27%3e%3cpath%20d=%27M14%2012.3L12.3%2014%208%209.7%203.7%2014%202%2012.3%206.3%208%202%203.7%203.7%202%208%206.3%2012.3%202%2014%203.7%209.7%208z%27/%3e%3c/svg%3e"},24654:()=>{},52361:()=>{},94616:()=>{},5656:(e,t,n)=>{"use strict";n.d(t,{$B:()=>R,DT:()=>m,G7:()=>st,RL:()=>F,SR:()=>D,Ti:()=>U,Tv:()=>N,_o:()=>j,cd:()=>dt,e4:()=>P,gt:()=>L,h7:()=>k,m0:()=>E,oE:()=>ct,p$:()=>w,p4:()=>v,pC:()=>M,qq:()=>x,rp:()=>$,sS:()=>g,tB:()=>B,w4:()=>_,y3:()=>y,zu:()=>T});var i=n(77958),r=n(17499),o=n(31352),a=n(62520),s=n(65358),l=n(79753),d=n(14596);const c=null===(u=(0,i.ts)())?(0,r.IY)().setApp("files").build():(0,r.IY)().setApp("files").setUid(u.uid).build();var u;class p{_entries=[];registerEntry(e){this.validateEntry(e),this._entries.push(e)}unregisterEntry(e){const t="string"==typeof e?this.getEntryIndex(e):this.getEntryIndex(e.id);-1!==t?this._entries.splice(t,1):c.warn("Entry not found, nothing removed",{entry:e,entries:this.getEntries()})}getEntries(e){return e?this._entries.filter((t=>"function"!=typeof t.enabled||t.enabled(e))):this._entries}getEntryIndex(e){return this._entries.findIndex((t=>t.id===e))}validateEntry(e){if(!e.id||!e.displayName||!e.iconSvgInline&&!e.iconClass||!e.handler)throw new Error("Invalid entry");if("string"!=typeof e.id||"string"!=typeof e.displayName)throw new Error("Invalid id or displayName property");if(e.iconClass&&"string"!=typeof e.iconClass||e.iconSvgInline&&"string"!=typeof e.iconSvgInline)throw new Error("Invalid icon provided");if(void 0!==e.enabled&&"function"!=typeof e.enabled)throw new Error("Invalid enabled property");if("function"!=typeof e.handler)throw new Error("Invalid handler property");if("order"in e&&"number"!=typeof e.order)throw new Error("Invalid order property");if(-1!==this.getEntryIndex(e.id))throw new Error("Duplicate entry")}}const f=function(){return typeof window._nc_newfilemenu>"u"&&(window._nc_newfilemenu=new p,c.debug("NewFileMenu initialized")),window._nc_newfilemenu},h=["B","KB","MB","GB","TB","PB"],A=["B","KiB","MiB","GiB","TiB","PiB"];function g(e,t=!1,n=!1,i=!1){n=n&&!i,"string"==typeof e&&(e=Number(e));let r=e>0?Math.floor(Math.log(e)/Math.log(i?1e3:1024)):0;r=Math.min((n?A.length:h.length)-1,r);const a=n?A[r]:h[r];let s=(e/Math.pow(i?1e3:1024,r)).toFixed(1);return!0===t&&0===r?("0.0"!==s?"< 1 ":"0 ")+(n?A[1]:h[1]):(s=r<2?parseFloat(s).toFixed(0):parseFloat(s).toLocaleString((0,o.aj)()),s+" "+a)}var m=(e=>(e.DEFAULT="default",e.HIDDEN="hidden",e))(m||{});class w{_action;constructor(e){this.validateAction(e),this._action=e}get id(){return this._action.id}get displayName(){return this._action.displayName}get title(){return this._action.title}get iconSvgInline(){return this._action.iconSvgInline}get enabled(){return this._action.enabled}get exec(){return this._action.exec}get execBatch(){return this._action.execBatch}get order(){return this._action.order}get parent(){return this._action.parent}get default(){return this._action.default}get inline(){return this._action.inline}get renderInline(){return this._action.renderInline}validateAction(e){if(!e.id||"string"!=typeof e.id)throw new Error("Invalid id");if(!e.displayName||"function"!=typeof e.displayName)throw new Error("Invalid displayName function");if("title"in e&&"function"!=typeof e.title)throw new Error("Invalid title function");if(!e.iconSvgInline||"function"!=typeof e.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!e.exec||"function"!=typeof e.exec)throw new Error("Invalid exec function");if("enabled"in e&&"function"!=typeof e.enabled)throw new Error("Invalid enabled function");if("execBatch"in e&&"function"!=typeof e.execBatch)throw new Error("Invalid execBatch function");if("order"in e&&"number"!=typeof e.order)throw new Error("Invalid order");if("parent"in e&&"string"!=typeof e.parent)throw new Error("Invalid parent");if(e.default&&!Object.values(m).includes(e.default))throw new Error("Invalid default");if("inline"in e&&"function"!=typeof e.inline)throw new Error("Invalid inline function");if("renderInline"in e&&"function"!=typeof e.renderInline)throw new Error("Invalid renderInline function")}}const v=function(e){typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],c.debug("FileActions initialized")),window._nc_fileactions.find((t=>t.id===e.id))?c.error(`FileAction ${e.id} already registered`,{action:e}):window._nc_fileactions.push(e)};var y=(e=>(e[e.NONE=0]="NONE",e[e.CREATE=4]="CREATE",e[e.READ=1]="READ",e[e.UPDATE=2]="UPDATE",e[e.DELETE=8]="DELETE",e[e.SHARE=16]="SHARE",e[e.ALL=31]="ALL",e))(y||{});const b=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","nc:share-attributes","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:share-types","oc:size","ocs:share-permissions"],C={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},x=function(e,t={nc:"http://nextcloud.org/ns"}){typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...b],window._nc_dav_namespaces={...C});const n={...window._nc_dav_namespaces,...t};return window._nc_dav_properties.find((t=>t===e))?(c.error(`${e} already registered`,{prop:e}),!1):e.startsWith("<")||2!==e.split(":").length?(c.error(`${e} is not valid. See example: 'oc:fileid'`,{prop:e}),!1):n[e.split(":")[0]]?(window._nc_dav_properties.push(e),window._nc_dav_namespaces=n,!0):(c.error(`${e} namespace unknown`,{prop:e,namespaces:n}),!1)},E=function(){return typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...b]),window._nc_dav_properties.map((e=>`<${e} />`)).join(" ")},_=function(){return typeof window._nc_dav_namespaces>"u"&&(window._nc_dav_namespaces={...C}),Object.keys(window._nc_dav_namespaces).map((e=>`xmlns:${e}="${window._nc_dav_namespaces?.[e]}"`)).join(" ")},k=function(){return`\n\t\t\n\t\t\t\n\t\t\t\t${E()}\n\t\t\t\n\t\t`},B=function(e){return`\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${E()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${(0,i.ts)()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${e}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`},T=function(e=""){let t=y.NONE;return e&&((e.includes("C")||e.includes("K"))&&(t|=y.CREATE),e.includes("G")&&(t|=y.READ),(e.includes("W")||e.includes("N")||e.includes("V"))&&(t|=y.UPDATE),e.includes("D")&&(t|=y.DELETE),e.includes("R")&&(t|=y.SHARE)),t};var N=(e=>(e.Folder="folder",e.File="file",e))(N||{});const O=function(e,t){return null!==e.match(t)},I=(e,t)=>{if(e.id&&"number"!=typeof e.id)throw new Error("Invalid id type of value");if(!e.source)throw new Error("Missing mandatory source");try{new URL(e.source)}catch{throw new Error("Invalid source format, source must be a valid URL")}if(!e.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(e.mtime&&!(e.mtime instanceof Date))throw new Error("Invalid mtime type");if(e.crtime&&!(e.crtime instanceof Date))throw new Error("Invalid crtime type");if(!e.mime||"string"!=typeof e.mime||!e.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in e&&"number"!=typeof e.size&&void 0!==e.size)throw new Error("Invalid size type");if("permissions"in e&&void 0!==e.permissions&&!("number"==typeof e.permissions&&e.permissions>=y.NONE&&e.permissions<=y.ALL))throw new Error("Invalid permissions");if(e.owner&&null!==e.owner&&"string"!=typeof e.owner)throw new Error("Invalid owner type");if(e.attributes&&"object"!=typeof e.attributes)throw new Error("Invalid attributes type");if(e.root&&"string"!=typeof e.root)throw new Error("Invalid root type");if(e.root&&!e.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(e.root&&!e.source.includes(e.root))throw new Error("Root must be part of the source");if(e.root&&O(e.source,t)){const n=e.source.match(t)[0];if(!e.source.includes((0,a.join)(n,e.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(e.status&&!Object.values(P).includes(e.status))throw new Error("Status must be a valid NodeStatus")};var P=(e=>(e.NEW="new",e.FAILED="failed",e.LOADING="loading",e.LOCKED="locked",e))(P||{});class S{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;constructor(e,t){I(e,t||this._knownDavService),this._data=e;const n={set:(e,t,n)=>(this.updateMtime(),Reflect.set(e,t,n)),deleteProperty:(e,t)=>(this.updateMtime(),Reflect.deleteProperty(e,t))};this._attributes=new Proxy(e.attributes||{},n),delete this._data.attributes,t&&(this._knownDavService=t)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:e}=new URL(this.source);return e+(0,s.Ec)(this.source.slice(e.length))}get basename(){return(0,a.basename)(this.source)}get extension(){return(0,a.extname)(this.source)}get dirname(){if(this.root){let e=this.source;this.isDavRessource&&(e=e.split(this._knownDavService).pop());const t=e.indexOf(this.root),n=this.root.replace(/\/$/,"");return(0,a.dirname)(e.slice(t+n.length)||"/")}const e=new URL(this.source);return(0,a.dirname)(e.pathname)}get mime(){return this._data.mime}get mtime(){return this._data.mtime}get crtime(){return this._data.crtime}get size(){return this._data.size}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavRessource?void 0!==this._data.permissions?this._data.permissions:y.NONE:y.READ}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return O(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,a.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){let e=this.source;this.isDavRessource&&(e=e.split(this._knownDavService).pop());const t=e.indexOf(this.root),n=this.root.replace(/\/$/,"");return e.slice(t+n.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id||this.attributes?.fileid}get status(){return this._data?.status}set status(e){this._data.status=e}move(e){I({...this._data,source:e},this._knownDavService),this._data.source=e,this.updateMtime()}rename(e){if(e.includes("/"))throw new Error("Invalid basename");this.move((0,a.dirname)(this.source)+"/"+e)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}}class R extends S{get type(){return N.File}}class L extends S{constructor(e){super({...e,mime:"httpd/unix-directory"})}get type(){return N.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}const j=`/files/${(0,i.ts)()?.uid}`,D=(0,l.generateRemoteUrl)("dav"),$=function(e=D,t={}){const n=(0,d.eI)(e,{headers:t});function r(e){n.setHeaders({...t,"X-Requested-With":"XMLHttpRequest",requesttoken:e??""})}return(0,i._S)(r),r((0,i.IH)()),(0,d.lD)().patch("fetch",((e,t)=>{const n=t.headers;return n?.method&&(t.method=n.method,delete n.method),fetch(e,t)})),n},M=async(e,t="/",n=j)=>(await e.getDirectoryContents(`${n}${t}`,{details:!0,data:`\n\t\t\n\t\t\t\n\t\t\t\t${E()}\n\t\t\t\n\t\t\t\n\t\t\t\t1\n\t\t\t\n\t\t`,headers:{method:"REPORT"},includeSelf:!0})).data.filter((e=>e.filename!==t)).map((e=>F(e,n))),F=function(e,t=j,n=D){const r=e.props,o=T(r?.permissions),a=r?.["owner-id"]||(0,i.ts)()?.uid,s={id:r?.fileid||0,source:`${n}${e.filename}`,mtime:new Date(Date.parse(e.lastmod)),mime:e.mime,size:r?.size||Number.parseInt(r.getcontentlength||"0"),permissions:o,owner:a,root:t,attributes:{...e,...r,hasPreview:r?.["has-preview"]}};return delete s.attributes?.props,"file"===e.type?new R(s):new L(s)};class V{_views=[];_currentView=null;register(e){if(this._views.find((t=>t.id===e.id)))throw new Error(`View id ${e.id} is already registered`);this._views.push(e)}remove(e){const t=this._views.findIndex((t=>t.id===e));-1!==t&&this._views.splice(t,1)}get views(){return this._views}setActive(e){this._currentView=e}get active(){return this._currentView}}const U=function(){return typeof window._nc_navigation>"u"&&(window._nc_navigation=new V,c.debug("Navigation service initialized")),window._nc_navigation};class H{_column;constructor(e){q(e),this._column=e}get id(){return this._column.id}get title(){return this._column.title}get render(){return this._column.render}get sort(){return this._column.sort}get summary(){return this._column.summary}}const q=function(e){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");if(e.sort&&"function"!=typeof e.sort)throw new Error("Column sortFunction must be a function");if(e.summary&&"function"!=typeof e.summary)throw new Error("Column summary must be a function");return!0};var z={},Y={};!function(e){const t=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n="["+t+"]["+t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=new RegExp("^"+n+"$");e.isExist=function(e){return typeof e<"u"},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,n){if(t){const i=Object.keys(t),r=i.length;for(let o=0;o"u")},e.getAllMatches=function(e,t){const n=[];let i=t.exec(e);for(;i;){const r=[];r.startIndex=t.lastIndex-i[0].length;const o=i.length;for(let e=0;e5&&"xml"===i)return re("InvalidXml","XML declaration allowed only at the start of the document.",se(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}continue}return t}function K(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let n=1;for(t+=8;t"===e[t]&&(n--,0===n))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t"===e[t+2]){t+=2;break}return t}z.validate=function(e,t){t=Object.assign({},G,t);const n=[];let i=!1,r=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let o=0;o"!==e[o]&&" "!==e[o]&&"\t"!==e[o]&&"\n"!==e[o]&&"\r"!==e[o];o++)l+=e[o];if(l=l.trim(),"/"===l[l.length-1]&&(l=l.substring(0,l.length-1),o--),!ae(l)){let t;return t=0===l.trim().length?"Invalid space after '<'.":"Tag '"+l+"' is an invalid name.",re("InvalidTag",t,se(e,o))}const d=ee(e,o);if(!1===d)return re("InvalidAttr","Attributes for '"+l+"' have open quote.",se(e,o));let c=d.value;if(o=d.index,"/"===c[c.length-1]){const n=o-c.length;c=c.substring(0,c.length-1);const r=ne(c,t);if(!0!==r)return re(r.err.code,r.err.msg,se(e,n+r.err.line));i=!0}else if(s){if(!d.tagClosed)return re("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",se(e,o));if(c.trim().length>0)return re("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",se(e,a));{const t=n.pop();if(l!==t.tagName){let n=se(e,t.tagStartPos);return re("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+l+"'.",se(e,a))}0==n.length&&(r=!0)}}else{const s=ne(c,t);if(!0!==s)return re(s.err.code,s.err.msg,se(e,o-c.length+s.err.line));if(!0===r)return re("InvalidXml","Multiple possible root nodes found.",se(e,o));-1!==t.unpairedTags.indexOf(l)||n.push({tagName:l,tagStartPos:a}),i=!0}for(o++;o0)||re("InvalidXml","Invalid '"+JSON.stringify(n.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):re("InvalidXml","Start tag expected.",1)};const J='"',Q="'";function ee(e,t){let n="",i="",r=!1;for(;t"===e[t]&&""===i){r=!0;break}n+=e[t]}return""===i&&{value:n,index:t,tagClosed:r}}const te=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function ne(e,t){const n=W.getAllMatches(e,te),i={};for(let e=0;e!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e}};de.buildOptions=function(e){return Object.assign({},ce,e)},de.defaultOptions=ce;const ue=Y;function pe(e,t){let n="";for(;t0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}},Ee=function(e,t){const n={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let i=1,r=!1,o=!1,a="";for(;t"===e[t]){if(o?"-"===e[t-1]&&"-"===e[t-2]&&(o=!1,i--):i--,0===i)break}else"["===e[t]?r=!0:a+=e[t];else{if(r&&he(e,t))t+=7,[entityName,val,t]=pe(e,t+1),-1===val.indexOf("&")&&(n[we(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(r&&Ae(e,t))t+=8;else if(r&&ge(e,t))t+=8;else if(r&&me(e,t))t+=9;else{if(!fe)throw new Error("Invalid DOCTYPE");o=!0}i++,a=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:t}},_e=function(e,t={}){if(t=Object.assign({},be,t),!e||"string"!=typeof e)return e;let n=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(n))return e;if(t.hex&&ve.test(n))return Number.parseInt(n,16);{const i=ye.exec(n);if(i){const r=i[1],o=i[2];let a=function(e){return e&&-1!==e.indexOf(".")&&("."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1))),e}(i[3]);const s=i[4]||i[6];if(!t.leadingZeros&&o.length>0&&r&&"."!==n[2])return e;if(!t.leadingZeros&&o.length>0&&!r&&"."!==n[1])return e;{const i=Number(n),l=""+i;return-1!==l.search(/[eE]/)||s?t.eNotation?i:e:-1!==n.indexOf(".")?"0"===l&&""===a||l===a||r&&l==="-"+a?i:e:o?a===l||r+a===l?i:e:n===l||n===r+l?i:e}}return e}};function ke(e){const t=Object.keys(e);for(let n=0;n0)){a||(e=this.replaceEntitiesValue(e));const i=this.options.tagValueProcessor(t,e,n,r,o);return null==i?e:typeof i!=typeof e||i!==e?i:this.options.trimValues||e.trim()===e?Me(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function Te(e){if(this.options.removeNSPrefix){const t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,Ce.nameRegexp);const Ne=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function Oe(e,t,n){if(!this.options.ignoreAttributes&&"string"==typeof e){const n=Ce.getAllMatches(e,Ne),i=n.length,r={};for(let e=0;e",o,"Closing Tag is not closed.");let a=e.substring(o+2,t).trim();if(this.options.removeNSPrefix){const e=a.indexOf(":");-1!==e&&(a=a.substr(e+1))}this.options.transformTagName&&(a=this.options.transformTagName(a)),n&&(i=this.saveTextToParentTag(i,n,r));const s=r.substring(r.lastIndexOf(".")+1);if(a&&-1!==this.options.unpairedTags.indexOf(a))throw new Error(`Unpaired tag can not be used as closing tag: `);let l=0;s&&-1!==this.options.unpairedTags.indexOf(s)?(l=r.lastIndexOf(".",r.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=r.lastIndexOf("."),r=r.substring(0,l),n=this.tagsNodeStack.pop(),i="",o=t}else if("?"===e[o+1]){let t=De(e,o,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,n,r),!(this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags)){const e=new xe(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,r,t.tagName)),this.addChild(n,e,r)}o=t.closeIndex+1}else if("!--"===e.substr(o+1,3)){const t=je(e,"--\x3e",o+4,"Comment is not closed.");if(this.options.commentPropName){const a=e.substring(o+4,t-2);i=this.saveTextToParentTag(i,n,r),n.add(this.options.commentPropName,[{[this.options.textNodeName]:a}])}o=t}else if("!D"===e.substr(o+1,2)){const t=Ee(e,o);this.docTypeEntities=t.entities,o=t.i}else if("!["===e.substr(o+1,2)){const t=je(e,"]]>",o,"CDATA is not closed.")-2,a=e.substring(o+9,t);if(i=this.saveTextToParentTag(i,n,r),this.options.cdataPropName)n.add(this.options.cdataPropName,[{[this.options.textNodeName]:a}]);else{let e=this.parseTextData(a,n.tagname,r,!0,!1,!0);null==e&&(e=""),n.add(this.options.textNodeName,e)}o=t+2}else{let a=De(e,o,this.options.removeNSPrefix),s=a.tagName;const l=a.rawTagName;let d=a.tagExp,c=a.attrExpPresent,u=a.closeIndex;this.options.transformTagName&&(s=this.options.transformTagName(s)),n&&i&&"!xml"!==n.tagname&&(i=this.saveTextToParentTag(i,n,r,!1));const p=n;if(p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(n=this.tagsNodeStack.pop(),r=r.substring(0,r.lastIndexOf("."))),s!==t.tagname&&(r+=r?"."+s:s),this.isItStopNode(this.options.stopNodes,r,s)){let t="";if(d.length>0&&d.lastIndexOf("/")===d.length-1)o=a.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(s))o=a.closeIndex;else{const n=this.readStopNodeData(e,l,u+1);if(!n)throw new Error(`Unexpected end of ${l}`);o=n.i,t=n.tagContent}const i=new xe(s);s!==d&&c&&(i[":@"]=this.buildAttributesMap(d,r,s)),t&&(t=this.parseTextData(t,s,r,!0,c,!0,!0)),r=r.substr(0,r.lastIndexOf(".")),i.add(this.options.textNodeName,t),this.addChild(n,i,r)}else{if(d.length>0&&d.lastIndexOf("/")===d.length-1){"/"===s[s.length-1]?(s=s.substr(0,s.length-1),r=r.substr(0,r.length-1),d=s):d=d.substr(0,d.length-1),this.options.transformTagName&&(s=this.options.transformTagName(s));const e=new xe(s);s!==d&&c&&(e[":@"]=this.buildAttributesMap(d,r,s)),this.addChild(n,e,r),r=r.substr(0,r.lastIndexOf("."))}else{const e=new xe(s);this.tagsNodeStack.push(n),s!==d&&c&&(e[":@"]=this.buildAttributesMap(d,r,s)),this.addChild(n,e,r),n=e}i="",o=u}}else i+=e[o];return t.child};function Pe(e,t,n){const i=this.options.updateTag(t.tagname,n,t[":@"]);!1===i||("string"==typeof i&&(t.tagname=i),e.addChild(t))}const Se=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){const n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function Re(e,t,n,i){return e&&(void 0===i&&(i=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,i))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function Le(e,t,n){const i="*."+n;for(const n in e){const r=e[n];if(i===r||t===r)return!0}return!1}function je(e,t,n,i){const r=e.indexOf(t,n);if(-1===r)throw new Error(i);return r+t.length-1}function De(e,t,n,i=">"){const r=function(e,t,n=">"){let i,r="";for(let o=t;o",n,`${t} is not closed`);if(e.substring(n+2,o).trim()===t&&(r--,0===r))return{tagContent:e.substring(i,n),i:o};n=o}else if("?"===e[n+1])n=je(e,"?>",n+1,"StopNode is not closed.");else if("!--"===e.substr(n+1,3))n=je(e,"--\x3e",n+3,"StopNode is not closed.");else if("!["===e.substr(n+1,2))n=je(e,"]]>",n,"StopNode is not closed.")-2;else{const i=De(e,n,">");i&&((i&&i.tagName)===t&&"/"!==i.tagExp[i.tagExp.length-1]&&r++,n=i.closeIndex)}}function Me(e,t,n){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&_e(e,n)}return Ce.isExist(e)?e:""}var Fe={};function Ve(e,t,n){let i;const r={};for(let o=0;o0&&(r[t.textNodeName]=i):void 0!==i&&(r[t.textNodeName]=i),r}function Ue(e){const t=Object.keys(e);for(let e=0;e"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"}},this.addExternalEntities=ke,this.parseXml=Ie,this.parseTextData=Be,this.resolveNameSpace=Te,this.buildAttributesMap=Oe,this.isItStopNode=Le,this.replaceEntitiesValue=Se,this.readStopNodeData=$e,this.saveTextToParentTag=Re,this.addChild=Pe}},{prettify:We}=Fe,Ge=z;function Ze(e,t,n,i){let r="",o=!1;for(let a=0;a`,o=!1;continue}if(l===t.commentPropName){r+=i+`\x3c!--${s[l][0][t.textNodeName]}--\x3e`,o=!0;continue}if("?"===l[0]){const e=Ke(s[":@"],t),n="?xml"===l?"":i;let a=s[l][0][t.textNodeName];a=0!==a.length?" "+a:"",r+=n+`<${l}${a}${e}?>`,o=!0;continue}let c=i;""!==c&&(c+=t.indentBy);const u=i+`<${l}${Ke(s[":@"],t)}`,p=Ze(s[l],t,d,c);-1!==t.unpairedTags.indexOf(l)?t.suppressUnpairedNode?r+=u+">":r+=u+"/>":p&&0!==p.length||!t.suppressEmptyNode?p&&p.endsWith(">")?r+=u+`>${p}${i}`:(r+=u+">",p&&""!==i&&(p.includes("/>")||p.includes("`):r+=u+"/>",o=!0}return r}function Xe(e){const t=Object.keys(e);for(let n=0;n0&&t.processEntities)for(let n=0;n0&&(n="\n"),Ze(e,t,"",n)},tt={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function nt(e){this.options=Object.assign({},tt,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=ot),this.processTextOrObjNode=it,this.options.format?(this.indentate=rt,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function it(e,t,n){const i=this.j2x(e,n+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,i.attrStr,n):this.buildObjectNode(i.val,t,i.attrStr,n)}function rt(e){return this.options.indentBy.repeat(e)}function ot(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}nt.prototype.build=function(e){return this.options.preserveOrder?et(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},nt.prototype.j2x=function(e,t){let n="",i="";for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r))if(typeof e[r]>"u")this.isAttribute(r)&&(i+="");else if(null===e[r])this.isAttribute(r)?i+="":"?"===r[0]?i+=this.indentate(t)+"<"+r+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+r+"/"+this.tagEndChar;else if(e[r]instanceof Date)i+=this.buildTextValNode(e[r],r,"",t);else if("object"!=typeof e[r]){const o=this.isAttribute(r);if(o)n+=this.buildAttrPairStr(o,""+e[r]);else if(r===this.options.textNodeName){let t=this.options.tagValueProcessor(r,""+e[r]);i+=this.replaceEntitiesValue(t)}else i+=this.buildTextValNode(e[r],r,"",t)}else if(Array.isArray(e[r])){const n=e[r].length;let o="";for(let a=0;a"u"||(null===n?"?"===r[0]?i+=this.indentate(t)+"<"+r+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+r+"/"+this.tagEndChar:"object"==typeof n?this.options.oneListGroup?o+=this.j2x(n,t+1).val:o+=this.processTextOrObjNode(n,r,t):o+=this.buildTextValNode(n,r,"",t))}this.options.oneListGroup&&(o=this.buildObjectNode(o,r,"",t)),i+=o}else if(this.options.attributesGroupName&&r===this.options.attributesGroupName){const t=Object.keys(e[r]),i=t.length;for(let o=0;o"+e+r}},nt.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(i)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(i)+"<"+t+n+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(t,e);return r=this.replaceEntitiesValue(r),""===r?this.indentate(i)+"<"+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(i)+"<"+t+n+">"+r+"0&&this.options.processEntities)for(let t=0;t0&&(!e.caption||"string"!=typeof e.caption))throw new Error("View caption is required for top-level views 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.icon||"string"!=typeof e.icon||!function(e){if("string"!=typeof e)throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);if(0===(e=e.trim()).length||!0!==at.XMLValidator.validate(e))return!1;let t;const n=new at.XMLParser;try{t=n.parse(e)}catch{return!1}return!(!t||!("svg"in t))}(e.icon))throw new Error("View icon is required and must be a valid svg string");if(!("order"in e)||"number"!=typeof e.order)throw new Error("View order is required and must be a number");if(e.columns&&e.columns.forEach((e=>{if(!(e instanceof H))throw new Error("View columns must be an array of Column. Invalid column found")})),e.emptyView&&"function"!=typeof e.emptyView)throw new Error("View emptyView must be a function");if(e.parent&&"string"!=typeof e.parent)throw new Error("View parent must be a string");if("sticky"in e&&"boolean"!=typeof e.sticky)throw new Error("View sticky must be a boolean");if("expanded"in e&&"boolean"!=typeof e.expanded)throw new Error("View expanded must be a boolean");if(e.defaultSortKey&&"string"!=typeof e.defaultSortKey)throw new Error("View defaultSortKey must be a string");return!0},dt=function(e){return f().registerEntry(e)},ct=function(e){return f().unregisterEntry(e)}}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return r[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=r,e=[],a.O=(t,n,i,r)=>{if(!n){var o=1/0;for(c=0;c=r)&&Object.keys(a.O).every((e=>a.O[e](n[l])))?n.splice(l--,1):(s=!1,r0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[n,i,r]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,n)=>(a.f[n](e,t),t)),[])),a.u=e=>e+"-"+e+".js?v="+{4720:"bf813bc45f5afa044293",6512:"a386aad6f01ecddf416d"}[e],a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},i="nextcloud:",a.l=(e,t,r,o)=>{if(n[e])n[e].push(t);else{var s,l;if(void 0!==r)for(var d=document.getElementsByTagName("script"),c=0;c{s.onerror=s.onload=null,clearTimeout(f);var r=n[e];if(delete n[e],s.parentNode&&s.parentNode.removeChild(s),r&&r.forEach((e=>e(i))),t)return t(i)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),l&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=9837,(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var i=n.length-1;i>-1&&!e;)e=n[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{a.b=document.baseURI||self.location.href;var e={9837:0};a.f.j=(t,n)=>{var i=a.o(e,t)?e[t]:void 0;if(0!==i)if(i)n.push(i[2]);else{var r=new Promise(((n,r)=>i=e[t]=[n,r]));n.push(i[2]=r);var o=a.p+a.u(t),s=new Error;a.l(o,(n=>{if(a.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var r=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+r+": "+o+")",s.name="ChunkLoadError",s.type=r,s.request=o,i[1](s)}}),"chunk-"+t,t)}},a.O.j=t=>0===e[t];var t=(t,n)=>{var i,r,o=n[0],s=n[1],l=n[2],d=0;if(o.some((t=>0!==e[t]))){for(i in s)a.o(s,i)&&(a.m[i]=s[i]);if(l)var c=l(a)}for(t&&t(n);da(34507)));s=a.O(s)})(); +//# sourceMappingURL=files-init.js.map?v=dfe9d5de499563483db0 \ No newline at end of file diff --git a/dist/files-init.js.map b/dist/files-init.js.map index f89c83fdfc8f9..c6afabd4f06f5 100644 --- a/dist/files-init.js.map +++ b/dist/files-init.js.map @@ -1 +1 @@ -{"version":3,"file":"files-init.js?v=52098b6d9dbfb34019d5","mappings":";UAAIA,ECAAC,EACAC,4FCsBJ,SAAeC,EAAAA,EAAAA,MACbC,OAAO,SACPC,aACAC,QCCWC,EAAS,IAAIC,EAAAA,GAAW,CACjCC,GAAI,SACJC,YAAWA,CAACC,EAAOC,IACI,aAAZA,EAAKH,IACNI,EAAAA,EAAAA,IAAE,QAAS,uBACXA,EAAAA,EAAAA,IAAE,QAAS,UAErBC,cAAeA,uMAGfC,QAAQJ,GACGA,EAAMK,OAAS,GAAKL,EACtBM,KAAIC,GAAQA,EAAKC,cACjBC,OAAMC,GAAmD,IAApCA,EAAaC,EAAAA,GAAWC,UAEtD,UAAMC,CAAKN,GACP,IAMI,aALMO,EAAAA,EAAMC,OAAOR,EAAKS,gBAIxBC,EAAAA,EAAAA,IAAK,qBAAsBV,IACpB,CACX,CACA,MAAOW,GAEH,OADAC,EAAOD,MAAM,8BAA+B,CAAEA,QAAOE,OAAQb,EAAKa,OAAQb,UACnE,CACX,CACJ,EACA,eAAMc,CAAUrB,EAAOC,EAAMqB,GACzB,OAAOC,QAAQC,IAAIxB,EAAMM,KA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B4hC,EAAU5hC,EAAK,GAGIwD,EAAI,EAC3B,GAAG67B,EAAS1gC,MAAM1D,GAAgC,IAAxBomC,EAAgBpmC,KAAa,CACtD,IAAIgkC,KAAY0C,EACZ3C,EAAoB3hB,EAAEskB,EAAa1C,KACrCD,EAAoB9R,EAAE+R,GAAY0C,EAAY1C,IAGhD,GAAG2C,EAAS,IAAIpiC,EAASoiC,EAAQ5C,EAClC,CAEA,IADG0C,GAA4BA,EAA2B1hC,GACrDwD,EAAI67B,EAAS7jC,OAAQgI,IACzBs8B,EAAUT,EAAS77B,GAChBw7B,EAAoB3hB,EAAEgkB,EAAiBvB,IAAYuB,EAAgBvB,IACrEuB,EAAgBvB,GAAS,KAE1BuB,EAAgBvB,GAAW,EAE5B,OAAOd,EAAoBrM,EAAEnzB,EAAO,EAGjCqiC,EAAqBn4B,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1Fm4B,EAAmB12B,QAAQs2B,EAAqB53B,KAAK,KAAM,IAC3Dg4B,EAAmB56B,KAAOw6B,EAAqB53B,KAAK,KAAMg4B,EAAmB56B,KAAK4C,KAAKg4B,QCvFvF7C,EAAoB7xB,QAAKzO,ECGzB,IAAIojC,EAAsB9C,EAAoBrM,OAAEj0B,EAAW,CAAC,OAAO,IAAOsgC,EAAoB,SAC9F8C,EAAsB9C,EAAoBrM,EAAEmP","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/files/src/logger.js","webpack:///nextcloud/apps/files/src/actions/deleteAction.ts","webpack:///nextcloud/apps/files/src/actions/downloadAction.ts","webpack:///nextcloud/apps/files/src/actions/editLocallyAction.ts","webpack:///nextcloud/apps/files/src/actions/favoriteAction.ts","webpack://nextcloud/./node_modules/@nextcloud/dialogs/dist/style.css?d87c","webpack:///nextcloud/node_modules/axios/index.js","webpack:///nextcloud/apps/files/src/actions/moveOrCopyActionUtils.ts","webpack:///nextcloud/apps/files/src/utils/fileUtils.ts","webpack:///nextcloud/apps/files/src/actions/moveOrCopyAction.ts","webpack:///nextcloud/apps/files/src/actions/openFolderAction.ts","webpack:///nextcloud/apps/files/src/actions/openInFilesAction.ts","webpack:///nextcloud/apps/files/src/actions/renameAction.ts","webpack:///nextcloud/apps/files/src/actions/sidebarAction.ts","webpack:///nextcloud/apps/files/src/actions/viewInFolderAction.ts","webpack:///nextcloud/apps/files/src/newMenu/newFolder.ts","webpack:///nextcloud/node_modules/@buttercup/fetch/dist/index.browser.js","webpack:///nextcloud/node_modules/hot-patcher/dist/patcher.js","webpack:///nextcloud/node_modules/hot-patcher/dist/functions.js","webpack:///nextcloud/node_modules/webdav/dist/node/compat/patcher.js","webpack:///nextcloud/node_modules/webdav/dist/node/auth/digest.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/crypto.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/merge.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/headers.js","webpack:///nextcloud/node_modules/webdav/dist/node/compat/arrayBuffer.js","webpack:///nextcloud/node_modules/webdav/dist/node/request.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/body.js","webpack:///nextcloud/node_modules/webdav/dist/node/compat/buffer.js","webpack:///nextcloud/apps/files/src/services/WebdavClient.ts","webpack:///nextcloud/apps/files/src/utils/hashUtils.ts","webpack:///nextcloud/apps/files/src/services/Files.ts","webpack:///nextcloud/apps/files/src/services/Favorites.ts","webpack:///nextcloud/apps/files/src/views/favorites.ts","webpack:///nextcloud/apps/files/src/services/Recent.ts","webpack:///nextcloud/apps/files/src/views/TemplatePicker.vue","webpack:///nextcloud/apps/files/src/utils/davUtils.js","webpack:///nextcloud/apps/files/src/components/TemplatePreview.vue?vue&type=script&lang=js","webpack:///nextcloud/apps/files/src/components/TemplatePreview.vue","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue?af18","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue?81db","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue?c414","webpack:///nextcloud/apps/files/src/views/TemplatePicker.vue?vue&type=script&lang=ts","webpack:///nextcloud/apps/files/src/services/Templates.js","webpack://nextcloud/./apps/files/src/views/TemplatePicker.vue?0681","webpack://nextcloud/./apps/files/src/views/TemplatePicker.vue?afd8","webpack:///nextcloud/apps/files/src/init-templates.ts","webpack:///nextcloud/apps/files/src/init.ts","webpack:///nextcloud/apps/files/src/views/files.ts","webpack:///nextcloud/apps/files/src/views/recent.ts","webpack:///nextcloud/apps/files/src/services/ServiceWorker.js","webpack:///nextcloud/apps/files/src/services/LivePhotos.ts","webpack:///nextcloud/node_modules/builtin-status-codes/browser.js","webpack:///nextcloud/node_modules/cancelable-promise/umd/CancelablePromise.js","webpack:///nextcloud/node_modules/@nextcloud/dialogs/dist/style.css","webpack:///nextcloud/apps/files/src/components/TemplatePreview.vue?vue&type=style&index=0&id=0859a92c&prod&lang=scss&scoped=true","webpack:///nextcloud/apps/files/src/views/TemplatePicker.vue?vue&type=style&index=0&id=48121b39&prod&lang=scss&scoped=true","webpack:///nextcloud/node_modules/https-browserify/index.js","webpack:///nextcloud/node_modules/readable-stream/readable-browser.js","webpack:///nextcloud/node_modules/stream-http/index.js","webpack:///nextcloud/node_modules/stream-http/lib/capability.js","webpack:///nextcloud/node_modules/stream-http/lib/request.js","webpack:///nextcloud/node_modules/stream-http/lib/response.js","webpack:///nextcloud/node_modules/xtend/immutable.js","webpack:///nextcloud/node_modules/@nextcloud/files/dist/index.mjs","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { emit } from '@nextcloud/event-bus';\nimport { Permission, Node, View, FileAction } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport TrashCanSvg from '@mdi/svg/svg/trash-can.svg?raw';\nimport logger from '../logger.js';\nexport const action = new FileAction({\n id: 'delete',\n displayName(nodes, view) {\n return view.id === 'trashbin'\n ? t('files', 'Delete permanently')\n : t('files', 'Delete');\n },\n iconSvgInline: () => {\n return TrashCanSvg;\n },\n enabled(nodes) {\n return nodes.length > 0 && nodes\n .map(node => node.permissions)\n .every(permission => (permission & Permission.DELETE) !== 0);\n },\n async exec(node) {\n try {\n await axios.delete(node.encodedSource);\n // Let's delete even if it's moved to the trashbin\n // since it has been removed from the current view\n // and changing the view will trigger a reload anyway.\n emit('files:node:deleted', node);\n return true;\n }\n catch (error) {\n logger.error('Error while deleting a file', { error, source: node.source, node });\n return false;\n }\n },\n async execBatch(nodes, view, dir) {\n return Promise.all(nodes.map(node => this.exec(node, view, dir)));\n },\n order: 100,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { generateUrl } from '@nextcloud/router';\nimport { FileAction, Permission, Node, FileType, View } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport ArrowDownSvg from '@mdi/svg/svg/arrow-down.svg?raw';\nconst triggerDownload = function (url) {\n const hiddenElement = document.createElement('a');\n hiddenElement.download = '';\n hiddenElement.href = url;\n hiddenElement.click();\n};\nconst downloadNodes = function (dir, nodes) {\n const secret = Math.random().toString(36).substring(2);\n const url = generateUrl('/apps/files/ajax/download.php?dir={dir}&files={files}&downloadStartSecret={secret}', {\n dir,\n secret,\n files: JSON.stringify(nodes.map(node => node.basename)),\n });\n triggerDownload(url);\n};\nconst isDownloadable = function (node) {\n if ((node.permissions & Permission.READ) === 0) {\n return false;\n }\n // If the mount type is a share, ensure it got download permissions.\n if (node.attributes['mount-type'] === 'shared') {\n const downloadAttribute = JSON.parse(node.attributes['share-attributes']).find((attribute) => attribute.scope === 'permissions' && attribute.key === 'download');\n if (downloadAttribute !== undefined && downloadAttribute.enabled === false) {\n return false;\n }\n }\n return true;\n};\nexport const action = new FileAction({\n id: 'download',\n displayName: () => t('files', 'Download'),\n iconSvgInline: () => ArrowDownSvg,\n enabled(nodes) {\n if (nodes.length === 0) {\n return false;\n }\n // We can download direct dav files. But if we have\n // some folders, we need to use the /apps/files/ajax/download.php\n // endpoint, which only supports user root folder.\n if (nodes.some(node => node.type === FileType.Folder)\n && nodes.some(node => !node.root?.startsWith('/files'))) {\n return false;\n }\n return nodes.every(isDownloadable);\n },\n async exec(node, view, dir) {\n if (node.type === FileType.Folder) {\n downloadNodes(dir, [node]);\n return null;\n }\n triggerDownload(node.encodedSource);\n return null;\n },\n async execBatch(nodes, view, dir) {\n if (nodes.length === 1) {\n this.exec(nodes[0], view, dir);\n return [null];\n }\n downloadNodes(dir, nodes);\n return new Array(nodes.length).fill(null);\n },\n order: 30,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { encodePath } from '@nextcloud/paths';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { FileAction, Permission } from '@nextcloud/files';\nimport { showError } from '@nextcloud/dialogs';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport LaptopSvg from '@mdi/svg/svg/laptop.svg?raw';\nconst openLocalClient = async function (path) {\n const link = generateOcsUrl('apps/files/api/v1') + '/openlocaleditor?format=json';\n try {\n const result = await axios.post(link, { path });\n const uid = getCurrentUser()?.uid;\n let url = `nc://open/${uid}@` + window.location.host + encodePath(path);\n url += '?token=' + result.data.ocs.data.token;\n window.location.href = url;\n }\n catch (error) {\n showError(t('files', 'Failed to redirect to client'));\n }\n};\nexport const action = new FileAction({\n id: 'edit-locally',\n displayName: () => t('files', 'Edit locally'),\n iconSvgInline: () => LaptopSvg,\n // Only works on single files\n enabled(nodes) {\n // Only works on single node\n if (nodes.length !== 1) {\n return false;\n }\n return (nodes[0].permissions & Permission.UPDATE) !== 0;\n },\n async exec(node) {\n openLocalClient(node.path);\n return null;\n },\n order: 25,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { emit } from '@nextcloud/event-bus';\nimport { generateUrl } from '@nextcloud/router';\nimport { Permission, View, FileAction } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport Vue from 'vue';\nimport StarOutlineSvg from '@mdi/svg/svg/star-outline.svg?raw';\nimport StarSvg from '@mdi/svg/svg/star.svg?raw';\nimport logger from '../logger.js';\nimport { encodePath } from '@nextcloud/paths';\n// If any of the nodes is not favorited, we display the favorite action.\nconst shouldFavorite = (nodes) => {\n return nodes.some(node => node.attributes.favorite !== 1);\n};\nexport const favoriteNode = async (node, view, willFavorite) => {\n try {\n // TODO: migrate to webdav tags plugin\n const url = generateUrl('/apps/files/api/v1/files') + encodePath(node.path);\n await axios.post(url, {\n tags: willFavorite\n ? [window.OC.TAG_FAVORITE]\n : [],\n });\n // Let's delete if we are in the favourites view\n // AND if it is removed from the user favorites\n // AND it's in the root of the favorites view\n if (view.id === 'favorites' && !willFavorite && node.dirname === '/') {\n emit('files:node:deleted', node);\n }\n // Update the node webdav attribute\n Vue.set(node.attributes, 'favorite', willFavorite ? 1 : 0);\n // Dispatch event to whoever is interested\n if (willFavorite) {\n emit('files:favorites:added', node);\n }\n else {\n emit('files:favorites:removed', node);\n }\n return true;\n }\n catch (error) {\n const action = willFavorite ? 'adding a file to favourites' : 'removing a file from favourites';\n logger.error('Error while ' + action, { error, source: node.source, node });\n return false;\n }\n};\nexport const action = new FileAction({\n id: 'favorite',\n displayName(nodes) {\n return shouldFavorite(nodes)\n ? t('files', 'Add to favorites')\n : t('files', 'Remove from favorites');\n },\n iconSvgInline: (nodes) => {\n return shouldFavorite(nodes)\n ? StarOutlineSvg\n : StarSvg;\n },\n enabled(nodes) {\n // We can only favorite nodes within files and with permissions\n return !nodes.some(node => !node.root?.startsWith?.('/files'))\n && nodes.every(node => node.permissions !== Permission.NONE);\n },\n async exec(node, view) {\n const willFavorite = shouldFavorite([node]);\n return await favoriteNode(node, view, willFavorite);\n },\n async execBatch(nodes, view) {\n const willFavorite = shouldFavorite(nodes);\n return Promise.all(nodes.map(async (node) => await favoriteNode(node, view, willFavorite)));\n },\n order: -50,\n});\n","\n import API from \"!../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../css-loader/dist/cjs.js!./style.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../css-loader/dist/cjs.js!./style.css\";\n export default content && content.locals ? content.locals : undefined;\n","import axios from './lib/axios.js';\n\n// This module is intended to unwrap Axios default export as named.\n// Keep top-level export same with static properties\n// so that it can keep same with es module or cjs\nconst {\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n} = axios;\n\nexport {\n axios as default,\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n}\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport '@nextcloud/dialogs/style.css';\nimport { Permission } from '@nextcloud/files';\nimport PQueue from 'p-queue';\n// This is the processing queue. We only want to allow 3 concurrent requests\nlet queue;\n/**\n * Get the processing queue\n */\nexport const getQueue = () => {\n if (!queue) {\n queue = new PQueue({ concurrency: 3 });\n }\n return queue;\n};\nexport var MoveCopyAction;\n(function (MoveCopyAction) {\n MoveCopyAction[\"MOVE\"] = \"Move\";\n MoveCopyAction[\"COPY\"] = \"Copy\";\n MoveCopyAction[\"MOVE_OR_COPY\"] = \"move-or-copy\";\n})(MoveCopyAction || (MoveCopyAction = {}));\nexport const canMove = (nodes) => {\n const minPermission = nodes.reduce((min, node) => Math.min(min, node.permissions), Permission.ALL);\n return (minPermission & Permission.UPDATE) !== 0;\n};\nexport const canDownload = (nodes) => {\n return nodes.every(node => {\n const shareAttributes = JSON.parse(node.attributes?.['share-attributes'] ?? '[]');\n return !shareAttributes.some(attribute => attribute.scope === 'permissions' && attribute.enabled === false && attribute.key === 'download');\n });\n};\nexport const canCopy = (nodes) => {\n // For now the only restriction is that a shared file\n // cannot be copied if the download is disabled\n return canDownload(nodes);\n};\n","/**\n * @copyright Copyright (c) 2021 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { FileType } from '@nextcloud/files';\nimport { translate as t, translatePlural as n } from '@nextcloud/l10n';\nimport { basename, extname } from 'path';\n// TODO: move to @nextcloud/files\n/**\n * Create an unique file name\n * @param name The initial name to use\n * @param otherNames Other names that are already used\n * @param suffix A function that takes an index an returns a suffix to add, defaults to '(index)'\n * @return Either the initial name, if unique, or the name with the suffix so that the name is unique\n */\nexport const getUniqueName = (name, otherNames, suffix = (n) => `(${n})`) => {\n let newName = name;\n let i = 1;\n while (otherNames.includes(newName)) {\n const ext = extname(name);\n newName = `${basename(name, ext)} ${suffix(i++)}${ext}`;\n }\n return newName;\n};\nexport const encodeFilePath = function (path) {\n const pathSections = (path.startsWith('/') ? path : `/${path}`).split('/');\n let relativePath = '';\n pathSections.forEach((section) => {\n if (section !== '') {\n relativePath += '/' + encodeURIComponent(section);\n }\n });\n return relativePath;\n};\n/**\n * Extract dir and name from file path\n *\n * @param {string} path the full path\n * @return {string[]} [dirPath, fileName]\n */\nexport const extractFilePaths = function (path) {\n const pathSections = path.split('/');\n const fileName = pathSections[pathSections.length - 1];\n const dirPath = pathSections.slice(0, pathSections.length - 1).join('/');\n return [dirPath, fileName];\n};\n/**\n * Generate a translated summary of an array of nodes\n * @param {Node[]} nodes the nodes to summarize\n * @return {string}\n */\nexport const getSummaryFor = (nodes) => {\n const fileCount = nodes.filter(node => node.type === FileType.File).length;\n const folderCount = nodes.filter(node => node.type === FileType.Folder).length;\n if (fileCount === 0) {\n return n('files', '{folderCount} folder', '{folderCount} folders', folderCount, { folderCount });\n }\n else if (folderCount === 0) {\n return n('files', '{fileCount} file', '{fileCount} files', fileCount, { fileCount });\n }\n if (fileCount === 1) {\n return n('files', '1 file and {folderCount} folder', '1 file and {folderCount} folders', folderCount, { folderCount });\n }\n if (folderCount === 1) {\n return n('files', '{fileCount} file and 1 folder', '{fileCount} files and 1 folder', fileCount, { fileCount });\n }\n return t('files', '{fileCount} files and {folderCount} folders', { fileCount, folderCount });\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport '@nextcloud/dialogs/style.css';\n// eslint-disable-next-line n/no-extraneous-import\nimport { AxiosError } from 'axios';\nimport { basename, join } from 'path';\nimport { emit } from '@nextcloud/event-bus';\nimport { FilePickerClosed, getFilePickerBuilder, showError } from '@nextcloud/dialogs';\nimport { Permission, FileAction, FileType, NodeStatus, davGetClient, davRootPath, davResultToNode, davGetDefaultPropfind } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport Vue from 'vue';\nimport CopyIconSvg from '@mdi/svg/svg/folder-multiple.svg?raw';\nimport FolderMoveSvg from '@mdi/svg/svg/folder-move.svg?raw';\nimport { MoveCopyAction, canCopy, canMove, getQueue } from './moveOrCopyActionUtils';\nimport logger from '../logger';\nimport { getUniqueName } from '../utils/fileUtils';\n/**\n * Return the action that is possible for the given nodes\n * @param {Node[]} nodes The nodes to check against\n * @return {MoveCopyAction} The action that is possible for the given nodes\n */\nconst getActionForNodes = (nodes) => {\n if (canMove(nodes)) {\n if (canCopy(nodes)) {\n return MoveCopyAction.MOVE_OR_COPY;\n }\n return MoveCopyAction.MOVE;\n }\n // Assuming we can copy as the enabled checks for copy permissions\n return MoveCopyAction.COPY;\n};\n/**\n * Handle the copy/move of a node to a destination\n * This can be imported and used by other scripts/components on server\n * @param {Node} node The node to copy/move\n * @param {Folder} destination The destination to copy/move the node to\n * @param {MoveCopyAction} method The method to use for the copy/move\n * @param {boolean} overwrite Whether to overwrite the destination if it exists\n * @return {Promise} A promise that resolves when the copy/move is done\n */\nexport const handleCopyMoveNodeTo = async (node, destination, method, overwrite = false) => {\n if (!destination) {\n return;\n }\n if (destination.type !== FileType.Folder) {\n throw new Error(t('files', 'Destination is not a folder'));\n }\n // Do not allow to MOVE a node to the same folder it is already located\n if (method === MoveCopyAction.MOVE && node.dirname === destination.path) {\n throw new Error(t('files', 'This file/folder is already in that directory'));\n }\n /**\n * Example:\n * - node: /foo/bar/file.txt -> path = /foo/bar/file.txt, destination: /foo\n * Allow move of /foo does not start with /foo/bar/file.txt so allow\n * - node: /foo , destination: /foo/bar\n * Do not allow as it would copy foo within itself\n * - node: /foo/bar.txt, destination: /foo\n * Allow copy a file to the same directory\n * - node: \"/foo/bar\", destination: \"/foo/bar 1\"\n * Allow to move or copy but we need to check with trailing / otherwise it would report false positive\n */\n if (`${destination.path}/`.startsWith(`${node.path}/`)) {\n throw new Error(t('files', 'You cannot move a file/folder onto itself or into a subfolder of itself'));\n }\n // Set loading state\n Vue.set(node, 'status', NodeStatus.LOADING);\n const queue = getQueue();\n return await queue.add(async () => {\n const copySuffix = (index) => {\n if (index === 1) {\n return t('files', '(copy)'); // TRANSLATORS: Mark a file as a copy of another file\n }\n return t('files', '(copy %n)', undefined, index); // TRANSLATORS: Meaning it is the n'th copy of a file\n };\n try {\n const client = davGetClient();\n const currentPath = join(davRootPath, node.path);\n const destinationPath = join(davRootPath, destination.path);\n if (method === MoveCopyAction.COPY) {\n let target = node.basename;\n // If we do not allow overwriting then find an unique name\n if (!overwrite) {\n const otherNodes = await client.getDirectoryContents(destinationPath);\n target = getUniqueName(node.basename, otherNodes.map((n) => n.basename), copySuffix);\n }\n await client.copyFile(currentPath, join(destinationPath, target));\n // If the node is copied into current directory the view needs to be updated\n if (node.dirname === destination.path) {\n const { data } = await client.stat(join(destinationPath, target), {\n details: true,\n data: davGetDefaultPropfind(),\n });\n emit('files:node:created', davResultToNode(data));\n }\n }\n else {\n await client.moveFile(currentPath, join(destinationPath, node.basename));\n // Delete the node as it will be fetched again\n // when navigating to the destination folder\n emit('files:node:deleted', node);\n }\n }\n catch (error) {\n if (error instanceof AxiosError) {\n if (error?.response?.status === 412) {\n throw new Error(t('files', 'A file or folder with that name already exists in this folder'));\n }\n else if (error?.response?.status === 423) {\n throw new Error(t('files', 'The files is locked'));\n }\n else if (error?.response?.status === 404) {\n throw new Error(t('files', 'The file does not exist anymore'));\n }\n else if (error.message) {\n throw new Error(error.message);\n }\n }\n logger.debug(error);\n throw new Error();\n }\n finally {\n Vue.set(node, 'status', undefined);\n }\n });\n};\n/**\n * Open a file picker for the given action\n * @param {MoveCopyAction} action The action to open the file picker for\n * @param {string} dir The directory to start the file picker in\n * @param {Node[]} nodes The nodes to move/copy\n * @return {Promise} The picked destination\n */\nconst openFilePickerForAction = async (action, dir = '/', nodes) => {\n const fileIDs = nodes.map(node => node.fileid).filter(Boolean);\n const filePicker = getFilePickerBuilder(t('files', 'Choose destination'))\n .allowDirectories(true)\n .setFilter((n) => {\n // We only want to show folders that we can create nodes in\n return (n.permissions & Permission.CREATE) !== 0\n // We don't want to show the current nodes in the file picker\n && !fileIDs.includes(n.fileid);\n })\n .setMimeTypeFilter([])\n .setMultiSelect(false)\n .startAt(dir);\n return new Promise((resolve, reject) => {\n filePicker.setButtonFactory((_selection, path) => {\n const buttons = [];\n const target = basename(path);\n const dirnames = nodes.map(node => node.dirname);\n const paths = nodes.map(node => node.path);\n if (action === MoveCopyAction.COPY || action === MoveCopyAction.MOVE_OR_COPY) {\n buttons.push({\n label: target ? t('files', 'Copy to {target}', { target }) : t('files', 'Copy'),\n type: 'primary',\n icon: CopyIconSvg,\n async callback(destination) {\n resolve({\n destination: destination[0],\n action: MoveCopyAction.COPY,\n });\n },\n });\n }\n // Invalid MOVE targets (but valid copy targets)\n if (dirnames.includes(path)) {\n // This file/folder is already in that directory\n return buttons;\n }\n if (paths.includes(path)) {\n // You cannot move a file/folder onto itself\n return buttons;\n }\n if (action === MoveCopyAction.MOVE || action === MoveCopyAction.MOVE_OR_COPY) {\n buttons.push({\n label: target ? t('files', 'Move to {target}', { target }) : t('files', 'Move'),\n type: action === MoveCopyAction.MOVE ? 'primary' : 'secondary',\n icon: FolderMoveSvg,\n async callback(destination) {\n resolve({\n destination: destination[0],\n action: MoveCopyAction.MOVE,\n });\n },\n });\n }\n return buttons;\n });\n const picker = filePicker.build();\n picker.pick().catch((error) => {\n logger.debug(error);\n if (error instanceof FilePickerClosed) {\n reject(new Error(t('files', 'Cancelled move or copy operation')));\n }\n else {\n reject(new Error(t('files', 'Move or copy operation failed')));\n }\n });\n });\n};\nexport const action = new FileAction({\n id: 'move-copy',\n displayName(nodes) {\n switch (getActionForNodes(nodes)) {\n case MoveCopyAction.MOVE:\n return t('files', 'Move');\n case MoveCopyAction.COPY:\n return t('files', 'Copy');\n case MoveCopyAction.MOVE_OR_COPY:\n return t('files', 'Move or copy');\n }\n },\n iconSvgInline: () => FolderMoveSvg,\n enabled(nodes) {\n // We only support moving/copying files within the user folder\n if (!nodes.every(node => node.root?.startsWith('/files/'))) {\n return false;\n }\n return nodes.length > 0 && (canMove(nodes) || canCopy(nodes));\n },\n async exec(node, view, dir) {\n const action = getActionForNodes([node]);\n let result;\n try {\n result = await openFilePickerForAction(action, dir, [node]);\n }\n catch (e) {\n logger.error(e);\n return false;\n }\n try {\n await handleCopyMoveNodeTo(node, result.destination, result.action);\n return true;\n }\n catch (error) {\n if (error instanceof Error && !!error.message) {\n showError(error.message);\n // Silent action as we handle the toast\n return null;\n }\n return false;\n }\n },\n async execBatch(nodes, view, dir) {\n const action = getActionForNodes(nodes);\n const result = await openFilePickerForAction(action, dir, nodes);\n const promises = nodes.map(async (node) => {\n try {\n await handleCopyMoveNodeTo(node, result.destination, result.action);\n return true;\n }\n catch (error) {\n logger.error(`Failed to ${result.action} node`, { node, error });\n return false;\n }\n });\n // We need to keep the selection on error!\n // So we do not return null, and for batch action\n // we let the front handle the error.\n return await Promise.all(promises);\n },\n order: 15,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { Permission, Node, FileType, View, FileAction, DefaultType } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport FolderSvg from '@mdi/svg/svg/folder.svg?raw';\nexport const action = new FileAction({\n id: 'open-folder',\n displayName(files) {\n // Only works on single node\n const displayName = files[0].attributes.displayName || files[0].basename;\n return t('files', 'Open folder {displayName}', { displayName });\n },\n iconSvgInline: () => FolderSvg,\n enabled(nodes) {\n // Only works on single node\n if (nodes.length !== 1) {\n return false;\n }\n const node = nodes[0];\n if (!node.isDavRessource) {\n return false;\n }\n return node.type === FileType.Folder\n && (node.permissions & Permission.READ) !== 0;\n },\n async exec(node, view) {\n if (!node || node.type !== FileType.Folder) {\n return false;\n }\n window.OCP.Files.Router.goToRoute(null, { view: view.id, fileid: node.fileid }, { dir: node.path });\n return null;\n },\n // Main action if enabled, meaning folders only\n default: DefaultType.HIDDEN,\n order: -100,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { translate as t } from '@nextcloud/l10n';\nimport { FileType, FileAction, DefaultType } from '@nextcloud/files';\n/**\n * TODO: Move away from a redirect and handle\n * navigation straight out of the recent view\n */\nexport const action = new FileAction({\n id: 'open-in-files-recent',\n displayName: () => t('files', 'Open in Files'),\n iconSvgInline: () => '',\n enabled: (nodes, view) => view.id === 'recent',\n async exec(node) {\n let dir = node.dirname;\n if (node.type === FileType.Folder) {\n dir = dir + '/' + node.basename;\n }\n window.OCP.Files.Router.goToRoute(null, // use default route\n { view: 'files', fileid: node.fileid }, { dir });\n return null;\n },\n // Before openFolderAction\n order: -1000,\n default: DefaultType.HIDDEN,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { emit } from '@nextcloud/event-bus';\nimport { Permission, FileAction } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport PencilSvg from '@mdi/svg/svg/pencil.svg?raw';\nexport const ACTION_DETAILS = 'details';\nexport const action = new FileAction({\n id: 'rename',\n displayName: () => t('files', 'Rename'),\n iconSvgInline: () => PencilSvg,\n enabled: (nodes) => {\n return nodes.length > 0 && nodes\n .map(node => node.permissions)\n .every(permission => (permission & Permission.UPDATE) !== 0);\n },\n async exec(node) {\n // Renaming is a built-in feature of the files app\n emit('files:node:rename', node);\n return null;\n },\n order: 10,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { Permission, View, FileAction, FileType } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport InformationSvg from '@mdi/svg/svg/information-variant.svg?raw';\nimport logger from '../logger.js';\nexport const ACTION_DETAILS = 'details';\nexport const action = new FileAction({\n id: ACTION_DETAILS,\n displayName: () => t('files', 'Open details'),\n iconSvgInline: () => InformationSvg,\n // Sidebar currently supports user folder only, /files/USER\n enabled: (nodes) => {\n // Only works on single node\n if (nodes.length !== 1) {\n return false;\n }\n if (!nodes[0]) {\n return false;\n }\n // Only work if the sidebar is available\n if (!window?.OCA?.Files?.Sidebar) {\n return false;\n }\n return (nodes[0].root?.startsWith('/files/') && nodes[0].permissions !== Permission.NONE) ?? false;\n },\n async exec(node, view, dir) {\n try {\n // TODO: migrate Sidebar to use a Node instead\n await window.OCA.Files.Sidebar.open(node.path);\n // Silently update current fileid\n window.OCP.Files.Router.goToRoute(null, { view: view.id, fileid: node.fileid }, { dir }, true);\n return null;\n }\n catch (error) {\n logger.error('Error while opening sidebar', { error });\n return false;\n }\n },\n order: -50,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { Node, FileType, Permission, View, FileAction } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport FolderMoveSvg from '@mdi/svg/svg/folder-move.svg?raw';\nexport const action = new FileAction({\n id: 'view-in-folder',\n displayName() {\n return t('files', 'View in folder');\n },\n iconSvgInline: () => FolderMoveSvg,\n enabled(nodes, view) {\n // Only works outside of the main files view\n if (view.id === 'files') {\n return false;\n }\n // Only works on single node\n if (nodes.length !== 1) {\n return false;\n }\n const node = nodes[0];\n if (!node.isDavRessource) {\n return false;\n }\n if (node.permissions === Permission.NONE) {\n return false;\n }\n return node.type === FileType.File;\n },\n async exec(node) {\n if (!node || node.type !== FileType.File) {\n return false;\n }\n window.OCP.Files.Router.goToRoute(null, { view: 'files', fileid: node.fileid }, { dir: node.dirname });\n return null;\n },\n order: 80,\n});\n","import { basename } from 'path';\nimport { emit } from '@nextcloud/event-bus';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { Permission, Folder } from '@nextcloud/files';\nimport { showSuccess } from '@nextcloud/dialogs';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport FolderPlusSvg from '@mdi/svg/svg/folder-plus.svg?raw';\nimport { getUniqueName } from '../utils/fileUtils.ts';\nimport logger from '../logger';\nconst createNewFolder = async (root, name) => {\n const source = root.source + '/' + name;\n const encodedSource = root.encodedSource + '/' + encodeURIComponent(name);\n const response = await axios({\n method: 'MKCOL',\n url: encodedSource,\n headers: {\n Overwrite: 'F',\n },\n });\n return {\n fileid: parseInt(response.headers['oc-fileid']),\n source,\n };\n};\nexport const entry = {\n id: 'newFolder',\n displayName: t('files', 'New folder'),\n enabled: (context) => (context.permissions & Permission.CREATE) !== 0,\n iconSvgInline: FolderPlusSvg,\n order: 0,\n async handler(context, content) {\n const contentNames = content.map((node) => node.basename);\n const name = getUniqueName(t('files', 'New folder'), contentNames);\n const { fileid, source } = await createNewFolder(context, name);\n // Create the folder in the store\n const folder = new Folder({\n source,\n id: fileid,\n mtime: new Date(),\n owner: getCurrentUser()?.uid || null,\n permissions: Permission.ALL,\n root: context?.root || '/files/' + getCurrentUser()?.uid,\n });\n showSuccess(t('files', 'Created new folder \"{name}\"', { name: basename(source) }));\n logger.debug('Created new folder', { folder, source });\n emit('files:node:created', folder);\n emit('files:node:rename', folder);\n },\n};\n","const inWebWorker = typeof WorkerGlobalScope !== \"undefined\" &&\n self instanceof WorkerGlobalScope;\nconst root = inWebWorker\n ? self\n : typeof window !== \"undefined\"\n ? window\n : globalThis;\nexport const fetch = root.fetch.bind(root);\nexport const Headers = root.Headers;\nexport const Request = root.Request;\nexport const Response = root.Response;\n","import { sequence } from \"./functions.js\";\nconst HOT_PATCHER_TYPE = \"@@HOTPATCHER\";\nconst NOOP = () => { };\nfunction createNewItem(method) {\n return {\n original: method,\n methods: [method],\n final: false\n };\n}\n/**\n * Hot patching manager class\n */\nexport class HotPatcher {\n constructor() {\n this._configuration = {\n registry: {},\n getEmptyAction: \"null\"\n };\n this.__type__ = HOT_PATCHER_TYPE;\n }\n /**\n * Configuration object reference\n * @readonly\n */\n get configuration() {\n return this._configuration;\n }\n /**\n * The action to take when a non-set method is requested\n * Possible values: null/throw\n */\n get getEmptyAction() {\n return this.configuration.getEmptyAction;\n }\n set getEmptyAction(newAction) {\n this.configuration.getEmptyAction = newAction;\n }\n /**\n * Control another hot-patcher instance\n * Force the remote instance to use patched methods from calling instance\n * @param target The target instance to control\n * @param allowTargetOverrides Allow the target to override patched methods on\n * the controller (default is false)\n * @returns Returns self\n * @throws {Error} Throws if the target is invalid\n */\n control(target, allowTargetOverrides = false) {\n if (!target || target.__type__ !== HOT_PATCHER_TYPE) {\n throw new Error(\"Failed taking control of target HotPatcher instance: Invalid type or object\");\n }\n Object.keys(target.configuration.registry).forEach(foreignKey => {\n if (this.configuration.registry.hasOwnProperty(foreignKey)) {\n if (allowTargetOverrides) {\n this.configuration.registry[foreignKey] = Object.assign({}, target.configuration.registry[foreignKey]);\n }\n }\n else {\n this.configuration.registry[foreignKey] = Object.assign({}, target.configuration.registry[foreignKey]);\n }\n });\n target._configuration = this.configuration;\n return this;\n }\n /**\n * Execute a patched method\n * @param key The method key\n * @param args Arguments to pass to the method (optional)\n * @see HotPatcher#get\n * @returns The output of the called method\n */\n execute(key, ...args) {\n const method = this.get(key) || NOOP;\n return method(...args);\n }\n /**\n * Get a method for a key\n * @param key The method key\n * @returns Returns the requested function or null if the function\n * does not exist and the host is configured to return null (and not throw)\n * @throws {Error} Throws if the configuration specifies to throw and the method\n * does not exist\n * @throws {Error} Throws if the `getEmptyAction` value is invalid\n */\n get(key) {\n const item = this.configuration.registry[key];\n if (!item) {\n switch (this.getEmptyAction) {\n case \"null\":\n return null;\n case \"throw\":\n throw new Error(`Failed handling method request: No method provided for override: ${key}`);\n default:\n throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`);\n }\n }\n return sequence(...item.methods);\n }\n /**\n * Check if a method has been patched\n * @param key The function key\n * @returns True if already patched\n */\n isPatched(key) {\n return !!this.configuration.registry[key];\n }\n /**\n * Patch a method name\n * @param key The method key to patch\n * @param method The function to set\n * @param opts Patch options\n * @returns Returns self\n */\n patch(key, method, opts = {}) {\n const { chain = false } = opts;\n if (this.configuration.registry[key] && this.configuration.registry[key].final) {\n throw new Error(`Failed patching '${key}': Method marked as being final`);\n }\n if (typeof method !== \"function\") {\n throw new Error(`Failed patching '${key}': Provided method is not a function`);\n }\n if (chain) {\n // Add new method to the chain\n if (!this.configuration.registry[key]) {\n // New key, create item\n this.configuration.registry[key] = createNewItem(method);\n }\n else {\n // Existing, push the method\n this.configuration.registry[key].methods.push(method);\n }\n }\n else {\n // Replace the original\n if (this.isPatched(key)) {\n const { original } = this.configuration.registry[key];\n this.configuration.registry[key] = Object.assign(createNewItem(method), {\n original\n });\n }\n else {\n this.configuration.registry[key] = createNewItem(method);\n }\n }\n return this;\n }\n /**\n * Patch a method inline, execute it and return the value\n * Used for patching contents of functions. This method will not apply a patched\n * function if it has already been patched, allowing for external overrides to\n * function. It also means that the function is cached so that it is not\n * instantiated every time the outer function is invoked.\n * @param key The function key to use\n * @param method The function to patch (once, only if not patched)\n * @param args Arguments to pass to the function\n * @returns The output of the patched function\n * @example\n * function mySpecialFunction(a, b) {\n * return hotPatcher.patchInline(\"func\", (a, b) => {\n * return a + b;\n * }, a, b);\n * }\n */\n patchInline(key, method, ...args) {\n if (!this.isPatched(key)) {\n this.patch(key, method);\n }\n return this.execute(key, ...args);\n }\n /**\n * Patch a method (or methods) in sequential-mode\n * See `patch()` with the option `chain: true`\n * @see patch\n * @param key The key to patch\n * @param methods The methods to patch\n * @returns Returns self\n */\n plugin(key, ...methods) {\n methods.forEach(method => {\n this.patch(key, method, { chain: true });\n });\n return this;\n }\n /**\n * Restore a patched method if it has been overridden\n * @param key The method key\n * @returns Returns self\n */\n restore(key) {\n if (!this.isPatched(key)) {\n throw new Error(`Failed restoring method: No method present for key: ${key}`);\n }\n else if (typeof this.configuration.registry[key].original !== \"function\") {\n throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${key}`);\n }\n this.configuration.registry[key].methods = [this.configuration.registry[key].original];\n return this;\n }\n /**\n * Set a method as being final\n * This sets a method as having been finally overridden. Attempts at overriding\n * again will fail with an error.\n * @param key The key to make final\n * @returns Returns self\n */\n setFinal(key) {\n if (!this.configuration.registry.hasOwnProperty(key)) {\n throw new Error(`Failed marking '${key}' as final: No method found for key`);\n }\n this.configuration.registry[key].final = true;\n return this;\n }\n}\n","export function sequence(...methods) {\n if (methods.length === 0) {\n throw new Error(\"Failed creating sequence: No functions provided\");\n }\n return function __executeSequence(...args) {\n let result = args;\n const _this = this;\n while (methods.length > 0) {\n const method = methods.shift();\n result = [method.apply(_this, result)];\n }\n return result[0];\n };\n}\n","import { HotPatcher } from \"hot-patcher\";\nlet __patcher = null;\nexport function getPatcher() {\n if (!__patcher) {\n __patcher = new HotPatcher();\n }\n return __patcher;\n}\n","import md5 from \"md5\";\nimport { ha1Compute } from \"../tools/crypto.js\";\nconst NONCE_CHARS = \"abcdef0123456789\";\nconst NONCE_SIZE = 32;\nexport function createDigestContext(username, password, ha1) {\n return { username, password, ha1, nc: 0, algorithm: \"md5\", hasDigestAuth: false };\n}\nexport function generateDigestAuthHeader(options, digest) {\n const url = options.url.replace(\"//\", \"\");\n const uri = url.indexOf(\"/\") == -1 ? \"/\" : url.slice(url.indexOf(\"/\"));\n const method = options.method ? options.method.toUpperCase() : \"GET\";\n const qop = /(^|,)\\s*auth\\s*($|,)/.test(digest.qop) ? \"auth\" : false;\n const ncString = `00000000${digest.nc}`.slice(-8);\n const ha1 = ha1Compute(digest.algorithm, digest.username, digest.realm, digest.password, digest.nonce, digest.cnonce, digest.ha1);\n const ha2 = md5(`${method}:${uri}`);\n const digestResponse = qop\n ? md5(`${ha1}:${digest.nonce}:${ncString}:${digest.cnonce}:${qop}:${ha2}`)\n : md5(`${ha1}:${digest.nonce}:${ha2}`);\n const authValues = {\n username: digest.username,\n realm: digest.realm,\n nonce: digest.nonce,\n uri,\n qop,\n response: digestResponse,\n nc: ncString,\n cnonce: digest.cnonce,\n algorithm: digest.algorithm,\n opaque: digest.opaque\n };\n const authHeader = [];\n for (const k in authValues) {\n if (authValues[k]) {\n if (k === \"qop\" || k === \"nc\" || k === \"algorithm\") {\n authHeader.push(`${k}=${authValues[k]}`);\n }\n else {\n authHeader.push(`${k}=\"${authValues[k]}\"`);\n }\n }\n }\n return `Digest ${authHeader.join(\", \")}`;\n}\nfunction makeNonce() {\n let uid = \"\";\n for (let i = 0; i < NONCE_SIZE; ++i) {\n uid = `${uid}${NONCE_CHARS[Math.floor(Math.random() * NONCE_CHARS.length)]}`;\n }\n return uid;\n}\nexport function parseDigestAuth(response, _digest) {\n const authHeader = (response.headers && response.headers.get(\"www-authenticate\")) || \"\";\n if (authHeader.split(/\\s/)[0].toLowerCase() !== \"digest\") {\n return false;\n }\n const re = /([a-z0-9_-]+)=(?:\"([^\"]+)\"|([a-z0-9_-]+))/gi;\n for (;;) {\n const match = re.exec(authHeader);\n if (!match) {\n break;\n }\n _digest[match[1]] = match[2] || match[3];\n }\n _digest.nc += 1;\n _digest.cnonce = makeNonce();\n return true;\n}\n","import md5 from \"md5\";\nexport function ha1Compute(algorithm, user, realm, pass, nonce, cnonce, ha1) {\n const ha1Hash = ha1 || md5(`${user}:${realm}:${pass}`);\n if (algorithm && algorithm.toLowerCase() === \"md5-sess\") {\n return md5(`${ha1Hash}:${nonce}:${cnonce}`);\n }\n return ha1Hash;\n}\n","export function cloneShallow(obj) {\n return isPlainObject(obj)\n ? Object.assign({}, obj)\n : Object.setPrototypeOf(Object.assign({}, obj), Object.getPrototypeOf(obj));\n}\nfunction isPlainObject(obj) {\n if (typeof obj !== \"object\" ||\n obj === null ||\n Object.prototype.toString.call(obj) != \"[object Object]\") {\n // Not an object\n return false;\n }\n if (Object.getPrototypeOf(obj) === null) {\n return true;\n }\n let proto = obj;\n // Find the prototype\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(obj) === proto;\n}\nexport function merge(...args) {\n let output = null, items = [...args];\n while (items.length > 0) {\n const nextItem = items.shift();\n if (!output) {\n output = cloneShallow(nextItem);\n }\n else {\n output = mergeObjects(output, nextItem);\n }\n }\n return output;\n}\nfunction mergeObjects(obj1, obj2) {\n const output = cloneShallow(obj1);\n Object.keys(obj2).forEach(key => {\n if (!output.hasOwnProperty(key)) {\n output[key] = obj2[key];\n return;\n }\n if (Array.isArray(obj2[key])) {\n output[key] = Array.isArray(output[key])\n ? [...output[key], ...obj2[key]]\n : [...obj2[key]];\n }\n else if (typeof obj2[key] === \"object\" && !!obj2[key]) {\n output[key] =\n typeof output[key] === \"object\" && !!output[key]\n ? mergeObjects(output[key], obj2[key])\n : cloneShallow(obj2[key]);\n }\n else {\n output[key] = obj2[key];\n }\n });\n return output;\n}\n","export function convertResponseHeaders(headers) {\n const output = {};\n for (const key of headers.keys()) {\n output[key] = headers.get(key);\n }\n return output;\n}\nexport function mergeHeaders(...headerPayloads) {\n if (headerPayloads.length === 0)\n return {};\n const headerKeys = {};\n return headerPayloads.reduce((output, headers) => {\n Object.keys(headers).forEach(header => {\n const lowerHeader = header.toLowerCase();\n if (headerKeys.hasOwnProperty(lowerHeader)) {\n output[headerKeys[lowerHeader]] = headers[header];\n }\n else {\n headerKeys[lowerHeader] = header;\n output[header] = headers[header];\n }\n });\n return output;\n }, {});\n}\n","const hasArrayBuffer = typeof ArrayBuffer === \"function\";\nconst { toString: objToString } = Object.prototype;\n// Taken from: https://github.com/fengyuanchen/is-array-buffer/blob/master/src/index.js\nexport function isArrayBuffer(value) {\n return (hasArrayBuffer &&\n (value instanceof ArrayBuffer || objToString.call(value) === \"[object ArrayBuffer]\"));\n}\n","import { Agent as HTTPAgent } from \"http\";\nimport { Agent as HTTPSAgent } from \"https\";\nimport { fetch } from \"@buttercup/fetch\";\nimport { getPatcher } from \"./compat/patcher.js\";\nimport { isWeb } from \"./compat/env.js\";\nimport { generateDigestAuthHeader, parseDigestAuth } from \"./auth/digest.js\";\nimport { cloneShallow, merge } from \"./tools/merge.js\";\nimport { mergeHeaders } from \"./tools/headers.js\";\nimport { requestDataToFetchBody } from \"./tools/body.js\";\nfunction _request(requestOptions) {\n const patcher = getPatcher();\n return patcher.patchInline(\"request\", (options) => patcher.patchInline(\"fetch\", fetch, options.url, getFetchOptions(options)), requestOptions);\n}\nfunction getFetchOptions(requestOptions) {\n let headers = {};\n // Handle standard options\n const opts = {\n method: requestOptions.method\n };\n if (requestOptions.headers) {\n headers = mergeHeaders(headers, requestOptions.headers);\n }\n if (typeof requestOptions.data !== \"undefined\") {\n const [body, newHeaders] = requestDataToFetchBody(requestOptions.data);\n opts.body = body;\n headers = mergeHeaders(headers, newHeaders);\n }\n if (requestOptions.signal) {\n opts.signal = requestOptions.signal;\n }\n if (requestOptions.withCredentials) {\n opts.credentials = \"include\";\n }\n // Check for node-specific options\n if (!isWeb()) {\n if (requestOptions.httpAgent || requestOptions.httpsAgent) {\n opts.agent = (parsedURL) => {\n if (parsedURL.protocol === \"http:\") {\n return requestOptions.httpAgent || new HTTPAgent();\n }\n return requestOptions.httpsAgent || new HTTPSAgent();\n };\n }\n }\n // Attach headers\n opts.headers = headers;\n return opts;\n}\nexport function prepareRequestOptions(requestOptions, context, userOptions) {\n const finalOptions = cloneShallow(requestOptions);\n finalOptions.headers = mergeHeaders(context.headers, finalOptions.headers || {}, userOptions.headers || {});\n if (typeof userOptions.data !== \"undefined\") {\n finalOptions.data = userOptions.data;\n }\n if (userOptions.signal) {\n finalOptions.signal = userOptions.signal;\n }\n if (context.httpAgent) {\n finalOptions.httpAgent = context.httpAgent;\n }\n if (context.httpsAgent) {\n finalOptions.httpsAgent = context.httpsAgent;\n }\n if (context.digest) {\n finalOptions._digest = context.digest;\n }\n if (typeof context.withCredentials === \"boolean\") {\n finalOptions.withCredentials = context.withCredentials;\n }\n return finalOptions;\n}\nexport async function request(requestOptions) {\n // Client not configured for digest authentication\n if (!requestOptions._digest) {\n return _request(requestOptions);\n }\n // Remove client's digest authentication object from request options\n const _digest = requestOptions._digest;\n delete requestOptions._digest;\n // If client is already using digest authentication, include the digest authorization header\n if (_digest.hasDigestAuth) {\n requestOptions = merge(requestOptions, {\n headers: {\n Authorization: generateDigestAuthHeader(requestOptions, _digest)\n }\n });\n }\n // Perform digest request + check\n const response = await _request(requestOptions);\n if (response.status == 401) {\n _digest.hasDigestAuth = parseDigestAuth(response, _digest);\n if (_digest.hasDigestAuth) {\n requestOptions = merge(requestOptions, {\n headers: {\n Authorization: generateDigestAuthHeader(requestOptions, _digest)\n }\n });\n const response2 = await _request(requestOptions);\n if (response2.status == 401) {\n _digest.hasDigestAuth = false;\n }\n else {\n _digest.nc++;\n }\n return response2;\n }\n }\n else {\n _digest.nc++;\n }\n return response;\n}\n","import Stream from \"stream\";\nimport { isArrayBuffer } from \"../compat/arrayBuffer.js\";\nimport { isBuffer } from \"../compat/buffer.js\";\nimport { isWeb } from \"../compat/env.js\";\nexport function requestDataToFetchBody(data) {\n if (!isWeb() && data instanceof Stream.Readable) {\n // @ts-ignore\n return [data, {}];\n }\n if (typeof data === \"string\") {\n return [data, {}];\n }\n else if (isBuffer(data)) {\n return [data, {}];\n }\n else if (isArrayBuffer(data)) {\n return [data, {}];\n }\n else if (data && typeof data === \"object\") {\n return [\n JSON.stringify(data),\n {\n \"content-type\": \"application/json\"\n }\n ];\n }\n throw new Error(`Unable to convert request body: Unexpected body type: ${typeof data}`);\n}\n","export function isBuffer(value) {\n return (value != null &&\n value.constructor != null &&\n typeof value.constructor.isBuffer === \"function\" &&\n value.constructor.isBuffer(value));\n}\n","import { createClient, getPatcher } from 'webdav';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser, getRequestToken } from '@nextcloud/auth';\nimport { request } from 'webdav/dist/node/request.js';\nexport const rootPath = `/files/${getCurrentUser()?.uid}`;\nexport const defaultRootUrl = generateRemoteUrl('dav' + rootPath);\nexport const getClient = (rootUrl = defaultRootUrl) => {\n const client = createClient(rootUrl, {\n headers: {\n requesttoken: getRequestToken() || '',\n },\n });\n /**\n * Allow to override the METHOD to support dav REPORT\n *\n * @see https://github.com/perry-mitchell/webdav-client/blob/8d9694613c978ce7404e26a401c39a41f125f87f/source/request.ts\n */\n const patcher = getPatcher();\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // https://github.com/perry-mitchell/hot-patcher/issues/6\n patcher.patch('request', (options) => {\n if (options.headers?.method) {\n options.method = options.headers.method;\n delete options.headers.method;\n }\n return request(options);\n });\n return client;\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nexport const hashCode = function (str) {\n return str.split('').reduce(function (a, b) {\n a = ((a << 5) - a) + b.charCodeAt(0);\n return a & a;\n }, 0);\n};\n","import { CancelablePromise } from 'cancelable-promise';\nimport { File, Folder, davParsePermissions, davGetDefaultPropfind } from '@nextcloud/files';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { getClient, rootPath } from './WebdavClient';\nimport { hashCode } from '../utils/hashUtils';\nimport logger from '../logger';\nconst client = getClient();\nexport const resultToNode = function (node) {\n const props = node.props;\n const permissions = davParsePermissions(props?.permissions);\n const owner = (props['owner-id'] || getCurrentUser()?.uid);\n const source = generateRemoteUrl('dav' + rootPath + node.filename);\n const id = props?.fileid < 0\n ? hashCode(source)\n : props?.fileid || 0;\n const nodeData = {\n id,\n source,\n mtime: new Date(node.lastmod),\n mime: node.mime,\n size: props?.size || 0,\n permissions,\n owner,\n root: rootPath,\n attributes: {\n ...node,\n ...props,\n hasPreview: props?.['has-preview'],\n failed: props?.fileid < 0,\n },\n };\n delete nodeData.attributes.props;\n return node.type === 'file'\n ? new File(nodeData)\n : new Folder(nodeData);\n};\nexport const getContents = (path = '/') => {\n const controller = new AbortController();\n const propfindPayload = davGetDefaultPropfind();\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n onCancel(() => controller.abort());\n try {\n const contentsResponse = await client.getDirectoryContents(path, {\n details: true,\n data: propfindPayload,\n includeSelf: true,\n signal: controller.signal,\n });\n const root = contentsResponse.data[0];\n const contents = contentsResponse.data.slice(1);\n if (root.filename !== path) {\n throw new Error('Root node does not match requested path');\n }\n resolve({\n folder: resultToNode(root),\n contents: contents.map(result => {\n try {\n return resultToNode(result);\n }\n catch (error) {\n logger.error(`Invalid node detected '${result.basename}'`, { error });\n return null;\n }\n }).filter(Boolean),\n });\n }\n catch (error) {\n reject(error);\n }\n });\n};\n","import { Folder, getDavNameSpaces, getDavProperties, davGetDefaultPropfind } from '@nextcloud/files';\nimport { getClient } from './WebdavClient';\nimport { resultToNode } from './Files';\nconst client = getClient();\nconst reportPayload = `\n\n\t\n\t\t${getDavProperties()}\n\t\n\t\n\t\t1\n\t\n`;\nexport const getContents = async (path = '/') => {\n const propfindPayload = davGetDefaultPropfind();\n // Get root folder\n let rootResponse;\n if (path === '/') {\n rootResponse = await client.stat(path, {\n details: true,\n data: propfindPayload,\n });\n }\n const contentsResponse = await client.getDirectoryContents(path, {\n details: true,\n // Only filter favorites if we're at the root\n data: path === '/' ? reportPayload : propfindPayload,\n headers: {\n // Patched in WebdavClient.ts\n method: path === '/' ? 'REPORT' : 'PROPFIND',\n },\n includeSelf: true,\n });\n const root = rootResponse?.data || contentsResponse.data[0];\n const contents = contentsResponse.data.filter(node => node.filename !== path);\n return {\n folder: resultToNode(root),\n contents: contents.map(resultToNode),\n };\n};\n","import { subscribe } from '@nextcloud/event-bus';\nimport { FileType, View, getNavigation } from '@nextcloud/files';\nimport { loadState } from '@nextcloud/initial-state';\nimport { getLanguage, translate as t } from '@nextcloud/l10n';\nimport { basename } from 'path';\nimport FolderSvg from '@mdi/svg/svg/folder.svg?raw';\nimport StarSvg from '@mdi/svg/svg/star.svg?raw';\nimport { getContents } from '../services/Favorites';\nimport { hashCode } from '../utils/hashUtils';\nimport logger from '../logger';\nexport const generateFavoriteFolderView = function (folder, index = 0) {\n return new View({\n id: generateIdFromPath(folder.path),\n name: basename(folder.path),\n icon: FolderSvg,\n order: index,\n params: {\n dir: folder.path,\n fileid: folder.fileid.toString(),\n view: 'favorites',\n },\n parent: 'favorites',\n columns: [],\n getContents,\n });\n};\nexport const generateIdFromPath = function (path) {\n return `favorite-${hashCode(path)}`;\n};\nexport default () => {\n // Load state in function for mock testing purposes\n const favoriteFolders = loadState('files', 'favoriteFolders', []);\n const favoriteFoldersViews = favoriteFolders.map((folder, index) => generateFavoriteFolderView(folder, index));\n logger.debug('Generating favorites view', { favoriteFolders });\n const Navigation = getNavigation();\n Navigation.register(new View({\n id: 'favorites',\n name: t('files', 'Favorites'),\n caption: t('files', 'List of favorites files and folders.'),\n emptyTitle: t('files', 'No favorites yet'),\n emptyCaption: t('files', 'Files and folders you mark as favorite will show up here'),\n icon: StarSvg,\n order: 5,\n columns: [],\n getContents,\n }));\n favoriteFoldersViews.forEach(view => Navigation.register(view));\n /**\n * Update favourites navigation when a new folder is added\n */\n subscribe('files:favorites:added', (node) => {\n if (node.type !== FileType.Folder) {\n return;\n }\n // Sanity check\n if (node.path === null || !node.root?.startsWith('/files')) {\n logger.error('Favorite folder is not within user files root', { node });\n return;\n }\n addToFavorites(node);\n });\n /**\n * Remove favourites navigation when a folder is removed\n */\n subscribe('files:favorites:removed', (node) => {\n if (node.type !== FileType.Folder) {\n return;\n }\n // Sanity check\n if (node.path === null || !node.root?.startsWith('/files')) {\n logger.error('Favorite folder is not within user files root', { node });\n return;\n }\n removePathFromFavorites(node.path);\n });\n /**\n * Sort the favorites paths array and\n * update the order property of the existing views\n */\n const updateAndSortViews = function () {\n favoriteFolders.sort((a, b) => a.path.localeCompare(b.path, getLanguage(), { ignorePunctuation: true }));\n favoriteFolders.forEach((folder, index) => {\n const view = favoriteFoldersViews.find((view) => view.id === generateIdFromPath(folder.path));\n if (view) {\n view.order = index;\n }\n });\n };\n // Add a folder to the favorites paths array and update the views\n const addToFavorites = function (node) {\n const newFavoriteFolder = { path: node.path, fileid: node.fileid };\n const view = generateFavoriteFolderView(newFavoriteFolder);\n // Skip if already exists\n if (favoriteFolders.find((folder) => folder.path === node.path)) {\n return;\n }\n // Update arrays\n favoriteFolders.push(newFavoriteFolder);\n favoriteFoldersViews.push(view);\n // Update and sort views\n updateAndSortViews();\n Navigation.register(view);\n };\n // Remove a folder from the favorites paths array and update the views\n const removePathFromFavorites = function (path) {\n const id = generateIdFromPath(path);\n const index = favoriteFolders.findIndex((folder) => folder.path === path);\n // Skip if not exists\n if (index === -1) {\n return;\n }\n // Update arrays\n favoriteFolders.splice(index, 1);\n favoriteFoldersViews.splice(index, 1);\n // Update and sort views\n Navigation.remove(id);\n updateAndSortViews();\n };\n};\n","import { getCurrentUser } from '@nextcloud/auth';\nimport { Folder, Permission, davGetRecentSearch, davGetClient, davResultToNode, davRootPath, davRemoteURL } from '@nextcloud/files';\nconst client = davGetClient();\nconst lastTwoWeeksTimestamp = Math.round((Date.now() / 1000) - (60 * 60 * 24 * 14));\nexport const getContents = async (path = '/') => {\n const contentsResponse = await client.getDirectoryContents(path, {\n details: true,\n data: davGetRecentSearch(lastTwoWeeksTimestamp),\n headers: {\n // Patched in WebdavClient.ts\n method: 'SEARCH',\n // Somehow it's needed to get the correct response\n 'Content-Type': 'application/xml; charset=utf-8',\n },\n deep: true,\n });\n const contents = contentsResponse.data;\n return {\n folder: new Folder({\n id: 0,\n source: `${davRemoteURL}${davRootPath}`,\n root: davRootPath,\n owner: getCurrentUser()?.uid || null,\n permissions: Permission.READ,\n }),\n contents: contents.map((r) => davResultToNode(r)),\n };\n};\n","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return (_vm.opened)?_c('NcModal',{staticClass:\"templates-picker\",attrs:{\"clear-view-delay\":-1,\"size\":\"large\"},on:{\"close\":_vm.close}},[_c('form',{staticClass:\"templates-picker__form\",style:(_vm.style),on:{\"submit\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.onSubmit.apply(null, arguments)}}},[_c('h2',[_vm._v(_vm._s(_vm.t('files', 'Pick a template for {name}', { name: _vm.nameWithoutExt })))]),_vm._v(\" \"),_c('ul',{staticClass:\"templates-picker__list\"},[_c('TemplatePreview',_vm._b({attrs:{\"checked\":_vm.checked === _vm.emptyTemplate.fileid},on:{\"check\":_vm.onCheck}},'TemplatePreview',_vm.emptyTemplate,false)),_vm._v(\" \"),_vm._l((_vm.provider.templates),function(template){return _c('TemplatePreview',_vm._b({key:template.fileid,attrs:{\"checked\":_vm.checked === template.fileid,\"ratio\":_vm.provider.ratio},on:{\"check\":_vm.onCheck}},'TemplatePreview',template,false))})],2),_vm._v(\" \"),_c('div',{staticClass:\"templates-picker__buttons\"},[_c('input',{staticClass:\"primary\",attrs:{\"type\":\"submit\",\"aria-label\":_vm.t('files', 'Create a new file with the selected template')},domProps:{\"value\":_vm.t('files', 'Create')}})])]),_vm._v(\" \"),(_vm.loading)?_c('NcEmptyContent',{staticClass:\"templates-picker__loading\",attrs:{\"icon\":\"icon-loading\"}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('files', 'Creating file'))+\"\\n\\t\")]):_vm._e()],1):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright Copyright (c) 2019 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\n\nimport { generateRemoteUrl } from '@nextcloud/router'\nimport { getCurrentUser } from '@nextcloud/auth'\n\nexport const getRootPath = function() {\n\tif (getCurrentUser()) {\n\t\treturn generateRemoteUrl(`dav/files/${getCurrentUser().uid}`)\n\t} else {\n\t\treturn generateRemoteUrl('webdav').replace('/remote.php', '/public.php')\n\t}\n}\n\nexport const isPublic = function() {\n\treturn !getCurrentUser()\n}\n\nexport const getToken = function() {\n\treturn document.getElementById('sharingToken') && document.getElementById('sharingToken').value\n}\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=script&lang=js\"","\n\n\n\n\n\n\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=style&index=0&id=0859a92c&prod&lang=scss&scoped=true\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=style&index=0&id=0859a92c&prod&lang=scss&scoped=true\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./TemplatePreview.vue?vue&type=template&id=0859a92c&scoped=true\"\nimport script from \"./TemplatePreview.vue?vue&type=script&lang=js\"\nexport * from \"./TemplatePreview.vue?vue&type=script&lang=js\"\nimport style0 from \"./TemplatePreview.vue?vue&type=style&index=0&id=0859a92c&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"0859a92c\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('li',{staticClass:\"template-picker__item\"},[_c('input',{staticClass:\"radio\",attrs:{\"id\":_vm.id,\"type\":\"radio\",\"name\":\"template-picker\"},domProps:{\"checked\":_vm.checked},on:{\"change\":_vm.onCheck}}),_vm._v(\" \"),_c('label',{staticClass:\"template-picker__label\",attrs:{\"for\":_vm.id}},[_c('div',{staticClass:\"template-picker__preview\",class:_vm.failedPreview ? 'template-picker__preview--failed' : ''},[_c('img',{staticClass:\"template-picker__image\",attrs:{\"src\":_vm.realPreviewUrl,\"alt\":\"\",\"draggable\":\"false\"},on:{\"error\":_vm.onFailure}})]),_vm._v(\" \"),_c('span',{staticClass:\"template-picker__title\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.nameWithoutExt)+\"\\n\\t\\t\")])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??clonedRuleSet-4.use[1]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??clonedRuleSet-4.use[1]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=script&lang=ts\"","/**\n * @copyright Copyright (c) 2021 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\n\nimport { generateOcsUrl } from '@nextcloud/router'\nimport axios from '@nextcloud/axios'\n\nexport const getTemplates = async function() {\n\tconst response = await axios.get(generateOcsUrl('apps/files/api/v1/templates'))\n\treturn response.data.ocs.data\n}\n\n/**\n * Create a new file from a specified template\n *\n * @param {string} filePath The new file destination path\n * @param {string} templatePath The template source path\n * @param {string} templateType The template type e.g 'user'\n */\nexport const createFromTemplate = async function(filePath, templatePath, templateType) {\n\tconst response = await axios.post(generateOcsUrl('apps/files/api/v1/templates/create'), {\n\t\tfilePath,\n\t\ttemplatePath,\n\t\ttemplateType,\n\t})\n\treturn response.data.ocs.data\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=style&index=0&id=48121b39&prod&lang=scss&scoped=true\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=style&index=0&id=48121b39&prod&lang=scss&scoped=true\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./TemplatePicker.vue?vue&type=template&id=48121b39&scoped=true\"\nimport script from \"./TemplatePicker.vue?vue&type=script&lang=ts\"\nexport * from \"./TemplatePicker.vue?vue&type=script&lang=ts\"\nimport style0 from \"./TemplatePicker.vue?vue&type=style&index=0&id=48121b39&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"48121b39\",\n null\n \n)\n\nexport default component.exports","import { Folder, Node, Permission, addNewFileMenuEntry, removeNewFileMenuEntry } from '@nextcloud/files';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { getLoggerBuilder } from '@nextcloud/logger';\nimport { join } from 'path';\nimport { loadState } from '@nextcloud/initial-state';\nimport { showError } from '@nextcloud/dialogs';\nimport { translate as t, translatePlural as n } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport Vue from 'vue';\nimport PlusSvg from '@mdi/svg/svg/plus.svg?raw';\nimport TemplatePickerView from './views/TemplatePicker.vue';\nimport { getUniqueName } from './utils/fileUtils.ts';\nimport { getCurrentUser } from '@nextcloud/auth';\n// Set up logger\nconst logger = getLoggerBuilder()\n .setApp('files')\n .detectUser()\n .build();\n// Add translates functions\nVue.mixin({\n methods: {\n t,\n n,\n },\n});\n// Create document root\nconst TemplatePickerRoot = document.createElement('div');\nTemplatePickerRoot.id = 'template-picker';\ndocument.body.appendChild(TemplatePickerRoot);\n// Retrieve and init templates\nlet templates = loadState('files', 'templates', []);\nlet templatesPath = loadState('files', 'templates_path', false);\nlogger.debug('Templates providers', { templates });\nlogger.debug('Templates folder', { templatesPath });\n// Init vue app\nconst View = Vue.extend(TemplatePickerView);\nconst TemplatePicker = new View({\n name: 'TemplatePicker',\n propsData: {\n logger,\n },\n});\nTemplatePicker.$mount('#template-picker');\nif (!templatesPath) {\n logger.debug('Templates folder not initialized');\n addNewFileMenuEntry({\n id: 'template-picker',\n displayName: t('files', 'Create new templates folder'),\n iconSvgInline: PlusSvg,\n order: 10,\n enabled(context) {\n // Allow creation on your own folders only\n if (context.owner !== getCurrentUser()?.uid) {\n return false;\n }\n return (context.permissions & Permission.CREATE) !== 0;\n },\n handler(context, content) {\n // Check for conflicts\n const contentNames = content.map((node) => node.basename);\n const name = getUniqueName(t('files', 'Templates'), contentNames);\n // Create the template folder\n initTemplatesFolder(context, name);\n // Remove the menu entry\n removeNewFileMenuEntry('template-picker');\n },\n });\n}\n// Init template files menu\ntemplates.forEach((provider, index) => {\n addNewFileMenuEntry({\n id: `template-new-${provider.app}-${index}`,\n displayName: provider.label,\n // TODO: migrate to inline svg\n iconClass: provider.iconClass || 'icon-file',\n enabled(context) {\n return (context.permissions & Permission.CREATE) !== 0;\n },\n order: 11,\n handler(context, content) {\n // Check for conflicts\n const contentNames = content.map((node) => node.basename);\n const name = getUniqueName(provider.label + provider.extension, contentNames);\n // Create the file\n TemplatePicker.open(name, provider);\n },\n });\n});\n// Init template folder\nconst initTemplatesFolder = async function (directory, name) {\n const templatePath = join(directory.path, name);\n try {\n logger.debug('Initializing the templates directory', { templatePath });\n const response = await axios.post(generateOcsUrl('apps/files/api/v1/templates/path'), {\n templatePath,\n copySystemTemplates: true,\n });\n // Go to template directory\n window.OCP.Files.Router.goToRoute(null, // use default route\n { view: 'files', fileid: undefined }, { dir: templatePath });\n templates = response.data.ocs.data.templates;\n templatesPath = response.data.ocs.data.template_path;\n }\n catch (error) {\n logger.error('Unable to initialize the templates directory');\n showError(t('files', 'Unable to initialize the templates directory'));\n }\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { addNewFileMenuEntry, registerDavProperty, registerFileAction } from '@nextcloud/files';\nimport { action as deleteAction } from './actions/deleteAction';\nimport { action as downloadAction } from './actions/downloadAction';\nimport { action as editLocallyAction } from './actions/editLocallyAction';\nimport { action as favoriteAction } from './actions/favoriteAction';\nimport { action as moveOrCopyAction } from './actions/moveOrCopyAction';\nimport { action as openFolderAction } from './actions/openFolderAction';\nimport { action as openInFilesAction } from './actions/openInFilesAction';\nimport { action as renameAction } from './actions/renameAction';\nimport { action as sidebarAction } from './actions/sidebarAction';\nimport { action as viewInFolderAction } from './actions/viewInFolderAction';\nimport { entry as newFolderEntry } from './newMenu/newFolder';\nimport registerFavoritesView from './views/favorites';\nimport registerRecentView from './views/recent';\nimport registerFilesView from './views/files';\nimport registerPreviewServiceWorker from './services/ServiceWorker.js';\nimport './init-templates';\nimport { initLivePhotos } from './services/LivePhotos';\n// Register file actions\nregisterFileAction(deleteAction);\nregisterFileAction(downloadAction);\nregisterFileAction(editLocallyAction);\nregisterFileAction(favoriteAction);\nregisterFileAction(moveOrCopyAction);\nregisterFileAction(openFolderAction);\nregisterFileAction(openInFilesAction);\nregisterFileAction(renameAction);\nregisterFileAction(sidebarAction);\nregisterFileAction(viewInFolderAction);\n// Register new menu entry\naddNewFileMenuEntry(newFolderEntry);\n// Register files views\nregisterFavoritesView();\nregisterFilesView();\nregisterRecentView();\n// Register preview service worker\nregisterPreviewServiceWorker();\nregisterDavProperty('nc:hidden', { nc: 'http://nextcloud.org/ns' });\ninitLivePhotos();\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { translate as t } from '@nextcloud/l10n';\nimport FolderSvg from '@mdi/svg/svg/folder.svg?raw';\nimport { getContents } from '../services/Files';\nimport { View, getNavigation } from '@nextcloud/files';\nexport default () => {\n const Navigation = getNavigation();\n Navigation.register(new View({\n id: 'files',\n name: t('files', 'All files'),\n caption: t('files', 'List of your files and folders.'),\n icon: FolderSvg,\n order: 0,\n getContents,\n }));\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { translate as t } from '@nextcloud/l10n';\nimport HistorySvg from '@mdi/svg/svg/history.svg?raw';\nimport { getContents } from '../services/Recent';\nimport { View, getNavigation } from '@nextcloud/files';\nexport default () => {\n const Navigation = getNavigation();\n Navigation.register(new View({\n id: 'recent',\n name: t('files', 'Recent'),\n caption: t('files', 'List of recently modified files and folders.'),\n emptyTitle: t('files', 'No recently modified files'),\n emptyCaption: t('files', 'Files and folders you recently modified will show up here.'),\n icon: HistorySvg,\n order: 2,\n defaultSortKey: 'mtime',\n getContents,\n }));\n};\n","/**\n * @copyright Copyright (c) 2019 Gary Kim \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { generateUrl } from '@nextcloud/router'\nimport logger from '../logger.js'\n\nexport default () => {\n\tif ('serviceWorker' in navigator) {\n\t\t// Use the window load event to keep the page load performant\n\t\twindow.addEventListener('load', async () => {\n\t\t\ttry {\n\t\t\t\tconst url = generateUrl('/apps/files/preview-service-worker.js', {}, { noRewrite: true })\n\t\t\t\tconst registration = await navigator.serviceWorker.register(url, { scope: '/' })\n\t\t\t\tlogger.debug('SW registered: ', { registration })\n\t\t\t} catch (error) {\n\t\t\t\tlogger.error('SW registration failed: ', { error })\n\t\t\t}\n\t\t})\n\t} else {\n\t\tlogger.debug('Service Worker is not enabled on this browser.')\n\t}\n}\n","/**\n * @copyright Copyright (c) 2023 Louis Chmn \n *\n * @author Louis Chmn \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { Node, registerDavProperty } from '@nextcloud/files';\nexport function initLivePhotos() {\n registerDavProperty('nc:metadata-files-live-photo', { nc: 'http://nextcloud.org/ns' });\n}\n/**\n * @param {Node} node - The node\n */\nexport function isLivePhoto(node) {\n return node.attributes['metadata-files-live-photo'] !== undefined;\n}\n","module.exports = {\n \"100\": \"Continue\",\n \"101\": \"Switching Protocols\",\n \"102\": \"Processing\",\n \"200\": \"OK\",\n \"201\": \"Created\",\n \"202\": \"Accepted\",\n \"203\": \"Non-Authoritative Information\",\n \"204\": \"No Content\",\n \"205\": \"Reset Content\",\n \"206\": \"Partial Content\",\n \"207\": \"Multi-Status\",\n \"208\": \"Already Reported\",\n \"226\": \"IM Used\",\n \"300\": \"Multiple Choices\",\n \"301\": \"Moved Permanently\",\n \"302\": \"Found\",\n \"303\": \"See Other\",\n \"304\": \"Not Modified\",\n \"305\": \"Use Proxy\",\n \"307\": \"Temporary Redirect\",\n \"308\": \"Permanent Redirect\",\n \"400\": \"Bad Request\",\n \"401\": \"Unauthorized\",\n \"402\": \"Payment Required\",\n \"403\": \"Forbidden\",\n \"404\": \"Not Found\",\n \"405\": \"Method Not Allowed\",\n \"406\": \"Not Acceptable\",\n \"407\": \"Proxy Authentication Required\",\n \"408\": \"Request Timeout\",\n \"409\": \"Conflict\",\n \"410\": \"Gone\",\n \"411\": \"Length Required\",\n \"412\": \"Precondition Failed\",\n \"413\": \"Payload Too Large\",\n \"414\": \"URI Too Long\",\n \"415\": \"Unsupported Media Type\",\n \"416\": \"Range Not Satisfiable\",\n \"417\": \"Expectation Failed\",\n \"418\": \"I'm a teapot\",\n \"421\": \"Misdirected Request\",\n \"422\": \"Unprocessable Entity\",\n \"423\": \"Locked\",\n \"424\": \"Failed Dependency\",\n \"425\": \"Unordered Collection\",\n \"426\": \"Upgrade Required\",\n \"428\": \"Precondition Required\",\n \"429\": \"Too Many Requests\",\n \"431\": \"Request Header Fields Too Large\",\n \"451\": \"Unavailable For Legal Reasons\",\n \"500\": \"Internal Server Error\",\n \"501\": \"Not Implemented\",\n \"502\": \"Bad Gateway\",\n \"503\": \"Service Unavailable\",\n \"504\": \"Gateway Timeout\",\n \"505\": \"HTTP Version Not Supported\",\n \"506\": \"Variant Also Negotiates\",\n \"507\": \"Insufficient Storage\",\n \"508\": \"Loop Detected\",\n \"509\": \"Bandwidth Limit Exceeded\",\n \"510\": \"Not Extended\",\n \"511\": \"Network Authentication Required\"\n}\n","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([\"exports\"], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports);\n global.CancelablePromise = mod.exports;\n }\n})(typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : this, function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.CancelablePromise = void 0;\n _exports.cancelable = cancelable;\n _exports.default = void 0;\n _exports.isCancelablePromise = isCancelablePromise;\n\n function _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\n function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\n function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\n function _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\n function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\n function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\n function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }\n\n function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\n\n function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"get\"); return _classApplyDescriptorGet(receiver, descriptor); }\n\n function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }\n\n function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"set\"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }\n\n function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError(\"attempted to \" + action + \" private field on non-instance\"); } return privateMap.get(receiver); }\n\n function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError(\"attempted to set read only private field\"); } descriptor.value = value; } }\n\n var toStringTag = typeof Symbol !== 'undefined' ? Symbol.toStringTag : '@@toStringTag';\n\n var _internals = /*#__PURE__*/new WeakMap();\n\n var _promise = /*#__PURE__*/new WeakMap();\n\n var CancelablePromiseInternal = /*#__PURE__*/function () {\n function CancelablePromiseInternal(_ref) {\n var _ref$executor = _ref.executor,\n executor = _ref$executor === void 0 ? function () {} : _ref$executor,\n _ref$internals = _ref.internals,\n internals = _ref$internals === void 0 ? defaultInternals() : _ref$internals,\n _ref$promise = _ref.promise,\n promise = _ref$promise === void 0 ? new Promise(function (resolve, reject) {\n return executor(resolve, reject, function (onCancel) {\n internals.onCancelList.push(onCancel);\n });\n }) : _ref$promise;\n\n _classCallCheck(this, CancelablePromiseInternal);\n\n _classPrivateFieldInitSpec(this, _internals, {\n writable: true,\n value: void 0\n });\n\n _classPrivateFieldInitSpec(this, _promise, {\n writable: true,\n value: void 0\n });\n\n _defineProperty(this, toStringTag, 'CancelablePromise');\n\n this.cancel = this.cancel.bind(this);\n\n _classPrivateFieldSet(this, _internals, internals);\n\n _classPrivateFieldSet(this, _promise, promise || new Promise(function (resolve, reject) {\n return executor(resolve, reject, function (onCancel) {\n internals.onCancelList.push(onCancel);\n });\n }));\n }\n\n _createClass(CancelablePromiseInternal, [{\n key: \"then\",\n value: function then(onfulfilled, onrejected) {\n return makeCancelable(_classPrivateFieldGet(this, _promise).then(createCallback(onfulfilled, _classPrivateFieldGet(this, _internals)), createCallback(onrejected, _classPrivateFieldGet(this, _internals))), _classPrivateFieldGet(this, _internals));\n }\n }, {\n key: \"catch\",\n value: function _catch(onrejected) {\n return makeCancelable(_classPrivateFieldGet(this, _promise).catch(createCallback(onrejected, _classPrivateFieldGet(this, _internals))), _classPrivateFieldGet(this, _internals));\n }\n }, {\n key: \"finally\",\n value: function _finally(onfinally, runWhenCanceled) {\n var _this = this;\n\n if (runWhenCanceled) {\n _classPrivateFieldGet(this, _internals).onCancelList.push(onfinally);\n }\n\n return makeCancelable(_classPrivateFieldGet(this, _promise).finally(createCallback(function () {\n if (onfinally) {\n if (runWhenCanceled) {\n _classPrivateFieldGet(_this, _internals).onCancelList = _classPrivateFieldGet(_this, _internals).onCancelList.filter(function (callback) {\n return callback !== onfinally;\n });\n }\n\n return onfinally();\n }\n }, _classPrivateFieldGet(this, _internals))), _classPrivateFieldGet(this, _internals));\n }\n }, {\n key: \"cancel\",\n value: function cancel() {\n _classPrivateFieldGet(this, _internals).isCanceled = true;\n\n var callbacks = _classPrivateFieldGet(this, _internals).onCancelList;\n\n _classPrivateFieldGet(this, _internals).onCancelList = [];\n\n var _iterator = _createForOfIteratorHelper(callbacks),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var callback = _step.value;\n\n if (typeof callback === 'function') {\n try {\n callback();\n } catch (err) {\n console.error(err);\n }\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n }, {\n key: \"isCanceled\",\n value: function isCanceled() {\n return _classPrivateFieldGet(this, _internals).isCanceled === true;\n }\n }]);\n\n return CancelablePromiseInternal;\n }();\n\n var CancelablePromise = /*#__PURE__*/function (_CancelablePromiseInt) {\n _inherits(CancelablePromise, _CancelablePromiseInt);\n\n var _super = _createSuper(CancelablePromise);\n\n function CancelablePromise(executor) {\n _classCallCheck(this, CancelablePromise);\n\n return _super.call(this, {\n executor: executor\n });\n }\n\n return _createClass(CancelablePromise);\n }(CancelablePromiseInternal);\n\n _exports.CancelablePromise = CancelablePromise;\n\n _defineProperty(CancelablePromise, \"all\", function all(iterable) {\n return makeAllCancelable(iterable, Promise.all(iterable));\n });\n\n _defineProperty(CancelablePromise, \"allSettled\", function allSettled(iterable) {\n return makeAllCancelable(iterable, Promise.allSettled(iterable));\n });\n\n _defineProperty(CancelablePromise, \"any\", function any(iterable) {\n return makeAllCancelable(iterable, Promise.any(iterable));\n });\n\n _defineProperty(CancelablePromise, \"race\", function race(iterable) {\n return makeAllCancelable(iterable, Promise.race(iterable));\n });\n\n _defineProperty(CancelablePromise, \"resolve\", function resolve(value) {\n return cancelable(Promise.resolve(value));\n });\n\n _defineProperty(CancelablePromise, \"reject\", function reject(reason) {\n return cancelable(Promise.reject(reason));\n });\n\n _defineProperty(CancelablePromise, \"isCancelable\", isCancelablePromise);\n\n var _default = CancelablePromise;\n _exports.default = _default;\n\n function cancelable(promise) {\n return makeCancelable(promise, defaultInternals());\n }\n\n function isCancelablePromise(promise) {\n return promise instanceof CancelablePromise || promise instanceof CancelablePromiseInternal;\n }\n\n function createCallback(onResult, internals) {\n if (onResult) {\n return function (arg) {\n if (!internals.isCanceled) {\n var result = onResult(arg);\n\n if (isCancelablePromise(result)) {\n internals.onCancelList.push(result.cancel);\n }\n\n return result;\n }\n\n return arg;\n };\n }\n }\n\n function makeCancelable(promise, internals) {\n return new CancelablePromiseInternal({\n internals: internals,\n promise: promise\n });\n }\n\n function makeAllCancelable(iterable, promise) {\n var internals = defaultInternals();\n internals.onCancelList.push(function () {\n var _iterator2 = _createForOfIteratorHelper(iterable),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var resolvable = _step2.value;\n\n if (isCancelablePromise(resolvable)) {\n resolvable.cancel();\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n });\n return new CancelablePromiseInternal({\n internals: internals,\n promise: promise\n });\n }\n\n function defaultInternals() {\n return {\n isCanceled: false,\n onCancelList: []\n };\n }\n});\n//# sourceMappingURL=CancelablePromise.js.map","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../css-loader/dist/runtime/api.js\";\nimport ___CSS_LOADER_GET_URL_IMPORT___ from \"../../../css-loader/dist/runtime/getUrl.js\";\nvar ___CSS_LOADER_URL_IMPORT_0___ = new URL(\"data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20height=%2716%27%20width=%2716%27%3e%3cpath%20d=%27M14%2012.3L12.3%2014%208%209.7%203.7%2014%202%2012.3%206.3%208%202%203.7%203.7%202%208%206.3%2012.3%202%2014%203.7%209.7%208z%27/%3e%3c/svg%3e\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_1___ = new URL(\"data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20height=%2716%27%20width=%2716%27%3e%3cpath%20d=%27M14%2012.3L12.3%2014%208%209.7%203.7%2014%202%2012.3%206.3%208%202%203.7%203.7%202%208%206.3%2012.3%202%2014%203.7%209.7%208z%27%20style=%27fill-opacity:1;fill:%23ffffff%27/%3e%3c/svg%3e\", import.meta.url);\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\nvar ___CSS_LOADER_URL_REPLACEMENT_1___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `@charset \"UTF-8\";\n/**\n * @copyright Copyright (c) 2019 Julius Härtl \n *\n * @author Julius Härtl \n * @author John Molakvoæ \n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n.toastify.dialogs {\n min-width: 200px;\n background: none;\n background-color: var(--color-main-background);\n color: var(--color-main-text);\n box-shadow: 0 0 6px 0 var(--color-box-shadow);\n padding: 0 12px;\n margin-top: 45px;\n position: fixed;\n z-index: 10100;\n border-radius: var(--border-radius);\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-container {\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-button,\n.toastify.dialogs .toast-close {\n position: static;\n overflow: hidden;\n box-sizing: border-box;\n min-width: 44px;\n height: 100%;\n padding: 12px;\n white-space: nowrap;\n background-repeat: no-repeat;\n background-position: center;\n background-color: transparent;\n min-height: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close,\n.toastify.dialogs .toast-close.toast-close {\n text-indent: 0;\n opacity: .4;\n border: none;\n min-height: 44px;\n margin-left: 10px;\n font-size: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close:before,\n.toastify.dialogs .toast-close.toast-close:before {\n background-image: url(${___CSS_LOADER_URL_REPLACEMENT_0___});\n content: \" \";\n filter: var(--background-invert-if-dark);\n display: inline-block;\n width: 16px;\n height: 16px;\n}\n.toastify.dialogs .toast-undo-button.toast-undo-button,\n.toastify.dialogs .toast-close.toast-undo-button {\n height: calc(100% - 6px);\n margin: 3px 3px 3px 12px;\n}\n.toastify.dialogs .toast-undo-button:hover,\n.toastify.dialogs .toast-undo-button:focus,\n.toastify.dialogs .toast-undo-button:active,\n.toastify.dialogs .toast-close:hover,\n.toastify.dialogs .toast-close:focus,\n.toastify.dialogs .toast-close:active {\n cursor: pointer;\n opacity: 1;\n}\n.toastify.dialogs.toastify-top {\n right: 10px;\n}\n.toastify.dialogs.toast-with-click {\n cursor: pointer;\n}\n.toastify.dialogs.toast-error {\n border-left: 3px solid var(--color-error);\n}\n.toastify.dialogs.toast-info {\n border-left: 3px solid var(--color-primary);\n}\n.toastify.dialogs.toast-warning {\n border-left: 3px solid var(--color-warning);\n}\n.toastify.dialogs.toast-success,\n.toastify.dialogs.toast-undo {\n border-left: 3px solid var(--color-success);\n}\n.theme--dark .toastify.dialogs .toast-close.toast-close:before {\n background-image: url(${___CSS_LOADER_URL_REPLACEMENT_1___});\n}\n._file-picker__file-icon_1vgv4_5 {\n width: 32px;\n height: 32px;\n min-width: 32px;\n min-height: 32px;\n background-repeat: no-repeat;\n background-size: contain;\n display: flex;\n justify-content: center;\n}\ntr.file-picker__row[data-v-6aded0d9] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-6aded0d9] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td.row-checkbox[data-v-6aded0d9] {\n padding: 0 2px;\n}\ntr.file-picker__row td[data-v-6aded0d9]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-6aded0d9] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-6aded0d9] {\n padding-inline: 2px 0;\n}\n@keyframes gradient-6aded0d9 {\n 0% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n to {\n background-position: 0% 50%;\n }\n}\n.loading-row .row-checkbox[data-v-6aded0d9] {\n text-align: center !important;\n}\n.loading-row span[data-v-6aded0d9] {\n display: inline-block;\n height: 24px;\n background: linear-gradient(to right, var(--color-background-darker), var(--color-text-maxcontrast), var(--color-background-darker));\n background-size: 600px 100%;\n border-radius: var(--border-radius);\n animation: gradient-6aded0d9 12s ease infinite;\n}\n.loading-row .row-wrapper[data-v-6aded0d9] {\n display: inline-flex;\n align-items: center;\n}\n.loading-row .row-checkbox span[data-v-6aded0d9] {\n width: 24px;\n}\n.loading-row .row-name span[data-v-6aded0d9]:last-of-type {\n margin-inline-start: 6px;\n width: 130px;\n}\n.loading-row .row-size span[data-v-6aded0d9] {\n width: 80px;\n}\n.loading-row .row-modified span[data-v-6aded0d9] {\n width: 90px;\n}\ntr.file-picker__row[data-v-48df4f27] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-48df4f27] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td.row-checkbox[data-v-48df4f27] {\n padding: 0 2px;\n}\ntr.file-picker__row td[data-v-48df4f27]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-48df4f27] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-48df4f27] {\n padding-inline: 2px 0;\n}\n.file-picker__row--selected[data-v-48df4f27] {\n background-color: var(--color-background-dark);\n}\n.file-picker__row[data-v-48df4f27]:hover {\n background-color: var(--color-background-hover);\n}\n.file-picker__name-container[data-v-48df4f27] {\n display: flex;\n justify-content: start;\n align-items: center;\n height: 100%;\n}\n.file-picker__file-name[data-v-48df4f27] {\n padding-inline-start: 6px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.file-picker__file-extension[data-v-48df4f27] {\n color: var(--color-text-maxcontrast);\n min-width: fit-content;\n}\n.file-picker__header-preview[data-v-d3c94818] {\n width: 22px;\n height: 32px;\n flex: 0 0 auto;\n}\n.file-picker__files[data-v-d3c94818] {\n margin: 2px;\n margin-inline-start: 12px;\n overflow: scroll auto;\n}\n.file-picker__files table[data-v-d3c94818] {\n width: 100%;\n max-height: 100%;\n table-layout: fixed;\n}\n.file-picker__files th[data-v-d3c94818] {\n position: sticky;\n z-index: 1;\n top: 0;\n background-color: var(--color-main-background);\n padding: 2px;\n}\n.file-picker__files th .header-wrapper[data-v-d3c94818] {\n display: flex;\n}\n.file-picker__files th.row-checkbox[data-v-d3c94818] {\n width: 44px;\n}\n.file-picker__files th.row-name[data-v-d3c94818] {\n width: 230px;\n}\n.file-picker__files th.row-size[data-v-d3c94818] {\n width: 100px;\n}\n.file-picker__files th.row-modified[data-v-d3c94818] {\n width: 120px;\n}\n.file-picker__files th[data-v-d3c94818]:not(.row-size) .button-vue__wrapper {\n justify-content: start;\n flex-direction: row-reverse;\n}\n.file-picker__files th[data-v-d3c94818]:not(.row-size) .button-vue {\n padding-inline: 16px 4px;\n}\n.file-picker__files th.row-size[data-v-d3c94818] .button-vue__wrapper {\n justify-content: end;\n}\n.file-picker__files th[data-v-d3c94818] .button-vue__wrapper {\n color: var(--color-text-maxcontrast);\n}\n.file-picker__files th[data-v-d3c94818] .button-vue__wrapper .button-vue__text {\n font-weight: 400;\n}\n.file-picker__breadcrumbs[data-v-3bc9efa5] {\n flex-grow: 0 !important;\n}\n.file-picker__side[data-v-e96bec41] {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: .5rem;\n min-width: 200px;\n padding: 2px;\n overflow: auto;\n}\n.file-picker__side[data-v-e96bec41] .button-vue__wrapper {\n justify-content: start;\n}\n.file-picker__filter-input[data-v-e96bec41] {\n margin-block: 7px;\n max-width: 260px;\n}\n@media (max-width: 736px) {\n .file-picker__side[data-v-e96bec41] {\n flex-direction: row;\n min-width: unset;\n }\n}\n@media (max-width: 512px) {\n .file-picker__side[data-v-e96bec41] {\n flex-direction: row;\n min-width: unset;\n }\n .file-picker__filter-input[data-v-e96bec41] {\n max-width: unset;\n }\n}\n.file-picker__navigation {\n padding-inline: 8px 2px;\n}\n.file-picker__navigation,\n.file-picker__navigation * {\n box-sizing: border-box;\n}\n.file-picker__navigation .v-select.select {\n min-width: 220px;\n}\n@media (min-width: 513px) and (max-width: 736px) {\n .file-picker__navigation {\n gap: 11px;\n }\n}\n@media (max-width: 512px) {\n .file-picker__navigation {\n flex-direction: column-reverse !important;\n }\n}\n.file-picker__view[data-v-821451ce] {\n height: 50px;\n display: flex;\n justify-content: start;\n align-items: center;\n}\n.file-picker__view h3[data-v-821451ce] {\n font-weight: 700;\n height: fit-content;\n margin: 0;\n}\n.file-picker__main[data-v-821451ce] {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1;\n padding-inline: 2px;\n}\n.file-picker__main *[data-v-821451ce] {\n box-sizing: border-box;\n}\n[data-v-821451ce] .file-picker {\n height: min(80vh, 800px) !important;\n}\n@media (max-width: 512px) {\n [data-v-821451ce] .file-picker {\n height: calc(100% - 16px - var(--default-clickable-area)) !important;\n }\n}\n[data-v-821451ce] .file-picker__content {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./node_modules/@nextcloud/dialogs/dist/style.css\"],\"names\":[],\"mappings\":\"AAAA,gBAAgB;AAChB;;;;;;;;;;;;;;;;;;;;EAoBE;AACF;EACE,gBAAgB;EAChB,gBAAgB;EAChB,8CAA8C;EAC9C,6BAA6B;EAC7B,6CAA6C;EAC7C,eAAe;EACf,gBAAgB;EAChB,eAAe;EACf,cAAc;EACd,mCAAmC;EACnC,aAAa;EACb,mBAAmB;AACrB;AACA;EACE,aAAa;EACb,mBAAmB;AACrB;AACA;;EAEE,gBAAgB;EAChB,gBAAgB;EAChB,sBAAsB;EACtB,eAAe;EACf,YAAY;EACZ,aAAa;EACb,mBAAmB;EACnB,4BAA4B;EAC5B,2BAA2B;EAC3B,6BAA6B;EAC7B,aAAa;AACf;AACA;;EAEE,cAAc;EACd,WAAW;EACX,YAAY;EACZ,gBAAgB;EAChB,iBAAiB;EACjB,YAAY;AACd;AACA;;EAEE,yDAA8Q;EAC9Q,YAAY;EACZ,wCAAwC;EACxC,qBAAqB;EACrB,WAAW;EACX,YAAY;AACd;AACA;;EAEE,wBAAwB;EACxB,wBAAwB;AAC1B;AACA;;;;;;EAME,eAAe;EACf,UAAU;AACZ;AACA;EACE,WAAW;AACb;AACA;EACE,eAAe;AACjB;AACA;EACE,yCAAyC;AAC3C;AACA;EACE,2CAA2C;AAC7C;AACA;EACE,2CAA2C;AAC7C;AACA;;EAEE,2CAA2C;AAC7C;AACA;EACE,yDAAsT;AACxT;AACA;EACE,WAAW;EACX,YAAY;EACZ,eAAe;EACf,gBAAgB;EAChB,4BAA4B;EAC5B,wBAAwB;EACxB,aAAa;EACb,uBAAuB;AACzB;AACA;EACE,+BAA+B;AACjC;AACA;EACE,eAAe;EACf,gBAAgB;EAChB,uBAAuB;EACvB,mBAAmB;AACrB;AACA;EACE,cAAc;AAChB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,eAAe;EACf,sBAAsB;AACxB;AACA;EACE,qBAAqB;AACvB;AACA;EACE;IACE,2BAA2B;EAC7B;EACA;IACE,6BAA6B;EAC/B;EACA;IACE,2BAA2B;EAC7B;AACF;AACA;EACE,6BAA6B;AAC/B;AACA;EACE,qBAAqB;EACrB,YAAY;EACZ,oIAAoI;EACpI,2BAA2B;EAC3B,mCAAmC;EACnC,8CAA8C;AAChD;AACA;EACE,oBAAoB;EACpB,mBAAmB;AACrB;AACA;EACE,WAAW;AACb;AACA;EACE,wBAAwB;EACxB,YAAY;AACd;AACA;EACE,WAAW;AACb;AACA;EACE,WAAW;AACb;AACA;EACE,+BAA+B;AACjC;AACA;EACE,eAAe;EACf,gBAAgB;EAChB,uBAAuB;EACvB,mBAAmB;AACrB;AACA;EACE,cAAc;AAChB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,eAAe;EACf,sBAAsB;AACxB;AACA;EACE,qBAAqB;AACvB;AACA;EACE,8CAA8C;AAChD;AACA;EACE,+CAA+C;AACjD;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,mBAAmB;EACnB,YAAY;AACd;AACA;EACE,yBAAyB;EACzB,YAAY;EACZ,gBAAgB;EAChB,uBAAuB;AACzB;AACA;EACE,oCAAoC;EACpC,sBAAsB;AACxB;AACA;EACE,WAAW;EACX,YAAY;EACZ,cAAc;AAChB;AACA;EACE,WAAW;EACX,yBAAyB;EACzB,qBAAqB;AACvB;AACA;EACE,WAAW;EACX,gBAAgB;EAChB,mBAAmB;AACrB;AACA;EACE,gBAAgB;EAChB,UAAU;EACV,MAAM;EACN,8CAA8C;EAC9C,YAAY;AACd;AACA;EACE,aAAa;AACf;AACA;EACE,WAAW;AACb;AACA;EACE,YAAY;AACd;AACA;EACE,YAAY;AACd;AACA;EACE,YAAY;AACd;AACA;EACE,sBAAsB;EACtB,2BAA2B;AAC7B;AACA;EACE,wBAAwB;AAC1B;AACA;EACE,oBAAoB;AACtB;AACA;EACE,oCAAoC;AACtC;AACA;EACE,gBAAgB;AAClB;AACA;EACE,uBAAuB;AACzB;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,oBAAoB;EACpB,UAAU;EACV,gBAAgB;EAChB,YAAY;EACZ,cAAc;AAChB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,iBAAiB;EACjB,gBAAgB;AAClB;AACA;EACE;IACE,mBAAmB;IACnB,gBAAgB;EAClB;AACF;AACA;EACE;IACE,mBAAmB;IACnB,gBAAgB;EAClB;EACA;IACE,gBAAgB;EAClB;AACF;AACA;EACE,uBAAuB;AACzB;AACA;;EAEE,sBAAsB;AACxB;AACA;EACE,gBAAgB;AAClB;AACA;EACE;IACE,SAAS;EACX;AACF;AACA;EACE;IACE,yCAAyC;EAC3C;AACF;AACA;EACE,YAAY;EACZ,aAAa;EACb,sBAAsB;EACtB,mBAAmB;AACrB;AACA;EACE,gBAAgB;EAChB,mBAAmB;EACnB,SAAS;AACX;AACA;EACE,sBAAsB;EACtB,WAAW;EACX,aAAa;EACb,sBAAsB;EACtB,aAAa;EACb,OAAO;EACP,mBAAmB;AACrB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,mCAAmC;AACrC;AACA;EACE;IACE,oEAAoE;EACtE;AACF;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,gBAAgB;AAClB\",\"sourcesContent\":[\"@charset \\\"UTF-8\\\";\\n/**\\n * @copyright Copyright (c) 2019 Julius Härtl \\n *\\n * @author Julius Härtl \\n * @author John Molakvoæ \\n *\\n * @license GNU AGPL version 3 or any later version\\n *\\n * This program is free software: you can redistribute it and/or modify\\n * it under the terms of the GNU Affero General Public License as\\n * published by the Free Software Foundation, either version 3 of the\\n * License, or (at your option) any later version.\\n *\\n * This program is distributed in the hope that it will be useful,\\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n * GNU Affero General Public License for more details.\\n *\\n * You should have received a copy of the GNU Affero General Public License\\n * along with this program. If not, see .\\n */\\n.toastify.dialogs {\\n min-width: 200px;\\n background: none;\\n background-color: var(--color-main-background);\\n color: var(--color-main-text);\\n box-shadow: 0 0 6px 0 var(--color-box-shadow);\\n padding: 0 12px;\\n margin-top: 45px;\\n position: fixed;\\n z-index: 10100;\\n border-radius: var(--border-radius);\\n display: flex;\\n align-items: center;\\n}\\n.toastify.dialogs .toast-undo-container {\\n display: flex;\\n align-items: center;\\n}\\n.toastify.dialogs .toast-undo-button,\\n.toastify.dialogs .toast-close {\\n position: static;\\n overflow: hidden;\\n box-sizing: border-box;\\n min-width: 44px;\\n height: 100%;\\n padding: 12px;\\n white-space: nowrap;\\n background-repeat: no-repeat;\\n background-position: center;\\n background-color: transparent;\\n min-height: 0;\\n}\\n.toastify.dialogs .toast-undo-button.toast-close,\\n.toastify.dialogs .toast-close.toast-close {\\n text-indent: 0;\\n opacity: .4;\\n border: none;\\n min-height: 44px;\\n margin-left: 10px;\\n font-size: 0;\\n}\\n.toastify.dialogs .toast-undo-button.toast-close:before,\\n.toastify.dialogs .toast-close.toast-close:before {\\n background-image: url(\\\"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='16'%20width='16'%3e%3cpath%20d='M14%2012.3L12.3%2014%208%209.7%203.7%2014%202%2012.3%206.3%208%202%203.7%203.7%202%208%206.3%2012.3%202%2014%203.7%209.7%208z'/%3e%3c/svg%3e\\\");\\n content: \\\" \\\";\\n filter: var(--background-invert-if-dark);\\n display: inline-block;\\n width: 16px;\\n height: 16px;\\n}\\n.toastify.dialogs .toast-undo-button.toast-undo-button,\\n.toastify.dialogs .toast-close.toast-undo-button {\\n height: calc(100% - 6px);\\n margin: 3px 3px 3px 12px;\\n}\\n.toastify.dialogs .toast-undo-button:hover,\\n.toastify.dialogs .toast-undo-button:focus,\\n.toastify.dialogs .toast-undo-button:active,\\n.toastify.dialogs .toast-close:hover,\\n.toastify.dialogs .toast-close:focus,\\n.toastify.dialogs .toast-close:active {\\n cursor: pointer;\\n opacity: 1;\\n}\\n.toastify.dialogs.toastify-top {\\n right: 10px;\\n}\\n.toastify.dialogs.toast-with-click {\\n cursor: pointer;\\n}\\n.toastify.dialogs.toast-error {\\n border-left: 3px solid var(--color-error);\\n}\\n.toastify.dialogs.toast-info {\\n border-left: 3px solid var(--color-primary);\\n}\\n.toastify.dialogs.toast-warning {\\n border-left: 3px solid var(--color-warning);\\n}\\n.toastify.dialogs.toast-success,\\n.toastify.dialogs.toast-undo {\\n border-left: 3px solid var(--color-success);\\n}\\n.theme--dark .toastify.dialogs .toast-close.toast-close:before {\\n background-image: url(\\\"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='16'%20width='16'%3e%3cpath%20d='M14%2012.3L12.3%2014%208%209.7%203.7%2014%202%2012.3%206.3%208%202%203.7%203.7%202%208%206.3%2012.3%202%2014%203.7%209.7%208z'%20style='fill-opacity:1;fill:%23ffffff'/%3e%3c/svg%3e\\\");\\n}\\n._file-picker__file-icon_1vgv4_5 {\\n width: 32px;\\n height: 32px;\\n min-width: 32px;\\n min-height: 32px;\\n background-repeat: no-repeat;\\n background-size: contain;\\n display: flex;\\n justify-content: center;\\n}\\ntr.file-picker__row[data-v-6aded0d9] {\\n height: var(--row-height, 50px);\\n}\\ntr.file-picker__row td[data-v-6aded0d9] {\\n cursor: pointer;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n border-bottom: none;\\n}\\ntr.file-picker__row td.row-checkbox[data-v-6aded0d9] {\\n padding: 0 2px;\\n}\\ntr.file-picker__row td[data-v-6aded0d9]:not(.row-checkbox) {\\n padding-inline: 14px 0;\\n}\\ntr.file-picker__row td.row-size[data-v-6aded0d9] {\\n text-align: end;\\n padding-inline: 0 14px;\\n}\\ntr.file-picker__row td.row-name[data-v-6aded0d9] {\\n padding-inline: 2px 0;\\n}\\n@keyframes gradient-6aded0d9 {\\n 0% {\\n background-position: 0% 50%;\\n }\\n 50% {\\n background-position: 100% 50%;\\n }\\n to {\\n background-position: 0% 50%;\\n }\\n}\\n.loading-row .row-checkbox[data-v-6aded0d9] {\\n text-align: center !important;\\n}\\n.loading-row span[data-v-6aded0d9] {\\n display: inline-block;\\n height: 24px;\\n background: linear-gradient(to right, var(--color-background-darker), var(--color-text-maxcontrast), var(--color-background-darker));\\n background-size: 600px 100%;\\n border-radius: var(--border-radius);\\n animation: gradient-6aded0d9 12s ease infinite;\\n}\\n.loading-row .row-wrapper[data-v-6aded0d9] {\\n display: inline-flex;\\n align-items: center;\\n}\\n.loading-row .row-checkbox span[data-v-6aded0d9] {\\n width: 24px;\\n}\\n.loading-row .row-name span[data-v-6aded0d9]:last-of-type {\\n margin-inline-start: 6px;\\n width: 130px;\\n}\\n.loading-row .row-size span[data-v-6aded0d9] {\\n width: 80px;\\n}\\n.loading-row .row-modified span[data-v-6aded0d9] {\\n width: 90px;\\n}\\ntr.file-picker__row[data-v-48df4f27] {\\n height: var(--row-height, 50px);\\n}\\ntr.file-picker__row td[data-v-48df4f27] {\\n cursor: pointer;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n border-bottom: none;\\n}\\ntr.file-picker__row td.row-checkbox[data-v-48df4f27] {\\n padding: 0 2px;\\n}\\ntr.file-picker__row td[data-v-48df4f27]:not(.row-checkbox) {\\n padding-inline: 14px 0;\\n}\\ntr.file-picker__row td.row-size[data-v-48df4f27] {\\n text-align: end;\\n padding-inline: 0 14px;\\n}\\ntr.file-picker__row td.row-name[data-v-48df4f27] {\\n padding-inline: 2px 0;\\n}\\n.file-picker__row--selected[data-v-48df4f27] {\\n background-color: var(--color-background-dark);\\n}\\n.file-picker__row[data-v-48df4f27]:hover {\\n background-color: var(--color-background-hover);\\n}\\n.file-picker__name-container[data-v-48df4f27] {\\n display: flex;\\n justify-content: start;\\n align-items: center;\\n height: 100%;\\n}\\n.file-picker__file-name[data-v-48df4f27] {\\n padding-inline-start: 6px;\\n min-width: 0;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n}\\n.file-picker__file-extension[data-v-48df4f27] {\\n color: var(--color-text-maxcontrast);\\n min-width: fit-content;\\n}\\n.file-picker__header-preview[data-v-d3c94818] {\\n width: 22px;\\n height: 32px;\\n flex: 0 0 auto;\\n}\\n.file-picker__files[data-v-d3c94818] {\\n margin: 2px;\\n margin-inline-start: 12px;\\n overflow: scroll auto;\\n}\\n.file-picker__files table[data-v-d3c94818] {\\n width: 100%;\\n max-height: 100%;\\n table-layout: fixed;\\n}\\n.file-picker__files th[data-v-d3c94818] {\\n position: sticky;\\n z-index: 1;\\n top: 0;\\n background-color: var(--color-main-background);\\n padding: 2px;\\n}\\n.file-picker__files th .header-wrapper[data-v-d3c94818] {\\n display: flex;\\n}\\n.file-picker__files th.row-checkbox[data-v-d3c94818] {\\n width: 44px;\\n}\\n.file-picker__files th.row-name[data-v-d3c94818] {\\n width: 230px;\\n}\\n.file-picker__files th.row-size[data-v-d3c94818] {\\n width: 100px;\\n}\\n.file-picker__files th.row-modified[data-v-d3c94818] {\\n width: 120px;\\n}\\n.file-picker__files th[data-v-d3c94818]:not(.row-size) .button-vue__wrapper {\\n justify-content: start;\\n flex-direction: row-reverse;\\n}\\n.file-picker__files th[data-v-d3c94818]:not(.row-size) .button-vue {\\n padding-inline: 16px 4px;\\n}\\n.file-picker__files th.row-size[data-v-d3c94818] .button-vue__wrapper {\\n justify-content: end;\\n}\\n.file-picker__files th[data-v-d3c94818] .button-vue__wrapper {\\n color: var(--color-text-maxcontrast);\\n}\\n.file-picker__files th[data-v-d3c94818] .button-vue__wrapper .button-vue__text {\\n font-weight: 400;\\n}\\n.file-picker__breadcrumbs[data-v-3bc9efa5] {\\n flex-grow: 0 !important;\\n}\\n.file-picker__side[data-v-e96bec41] {\\n display: flex;\\n flex-direction: column;\\n align-items: stretch;\\n gap: .5rem;\\n min-width: 200px;\\n padding: 2px;\\n overflow: auto;\\n}\\n.file-picker__side[data-v-e96bec41] .button-vue__wrapper {\\n justify-content: start;\\n}\\n.file-picker__filter-input[data-v-e96bec41] {\\n margin-block: 7px;\\n max-width: 260px;\\n}\\n@media (max-width: 736px) {\\n .file-picker__side[data-v-e96bec41] {\\n flex-direction: row;\\n min-width: unset;\\n }\\n}\\n@media (max-width: 512px) {\\n .file-picker__side[data-v-e96bec41] {\\n flex-direction: row;\\n min-width: unset;\\n }\\n .file-picker__filter-input[data-v-e96bec41] {\\n max-width: unset;\\n }\\n}\\n.file-picker__navigation {\\n padding-inline: 8px 2px;\\n}\\n.file-picker__navigation,\\n.file-picker__navigation * {\\n box-sizing: border-box;\\n}\\n.file-picker__navigation .v-select.select {\\n min-width: 220px;\\n}\\n@media (min-width: 513px) and (max-width: 736px) {\\n .file-picker__navigation {\\n gap: 11px;\\n }\\n}\\n@media (max-width: 512px) {\\n .file-picker__navigation {\\n flex-direction: column-reverse !important;\\n }\\n}\\n.file-picker__view[data-v-821451ce] {\\n height: 50px;\\n display: flex;\\n justify-content: start;\\n align-items: center;\\n}\\n.file-picker__view h3[data-v-821451ce] {\\n font-weight: 700;\\n height: fit-content;\\n margin: 0;\\n}\\n.file-picker__main[data-v-821451ce] {\\n box-sizing: border-box;\\n width: 100%;\\n display: flex;\\n flex-direction: column;\\n min-height: 0;\\n flex: 1;\\n padding-inline: 2px;\\n}\\n.file-picker__main *[data-v-821451ce] {\\n box-sizing: border-box;\\n}\\n[data-v-821451ce] .file-picker {\\n height: min(80vh, 800px) !important;\\n}\\n@media (max-width: 512px) {\\n [data-v-821451ce] .file-picker {\\n height: calc(100% - 16px - var(--default-clickable-area)) !important;\\n }\\n}\\n[data-v-821451ce] .file-picker__content {\\n display: flex;\\n flex-direction: column;\\n overflow: hidden;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.template-picker__item[data-v-0859a92c]{display:flex}.template-picker__label[data-v-0859a92c]{display:flex;align-items:center;flex:1 1;flex-direction:column}.template-picker__label[data-v-0859a92c],.template-picker__label *[data-v-0859a92c]{cursor:pointer;user-select:none}.template-picker__label[data-v-0859a92c]::before{display:none !important}.template-picker__preview[data-v-0859a92c]{display:block;overflow:hidden;flex:1 1;width:var(--width);min-height:var(--height);max-height:var(--height);padding:0;border:var(--border) solid var(--color-border);border-radius:var(--border-radius-large)}input:checked+label>.template-picker__preview[data-v-0859a92c]{border-color:var(--color-primary-element)}.template-picker__preview--failed[data-v-0859a92c]{display:flex}.template-picker__image[data-v-0859a92c]{max-width:100%;background-color:var(--color-main-background);object-fit:cover}.template-picker__preview--failed .template-picker__image[data-v-0859a92c]{width:calc(var(--margin)*8);margin:auto;background-color:rgba(0,0,0,0) !important;object-fit:initial}.template-picker__title[data-v-0859a92c]{overflow:hidden;max-width:calc(var(--width) + 4px);padding:var(--margin);white-space:nowrap;text-overflow:ellipsis}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files/src/components/TemplatePreview.vue\"],\"names\":[],\"mappings\":\"AAGC,wCACC,YAAA,CAGD,yCACC,YAAA,CAEA,kBAAA,CACA,QAAA,CACA,qBAAA,CAEA,oFACC,cAAA,CACA,gBAAA,CAGD,iDACC,uBAAA,CAIF,2CACC,aAAA,CACA,eAAA,CAEA,QAAA,CACA,kBAAA,CACA,wBAAA,CACA,wBAAA,CACA,SAAA,CACA,8CAAA,CACA,wCAAA,CAEA,+DACC,yCAAA,CAGD,mDAEC,YAAA,CAIF,yCACC,cAAA,CACA,6CAAA,CAEA,gBAAA,CAID,2EACC,2BAAA,CAEA,WAAA,CACA,yCAAA,CAEA,kBAAA,CAGD,yCACC,eAAA,CAEA,kCAAA,CACA,qBAAA,CACA,kBAAA,CACA,sBAAA\",\"sourcesContent\":[\"\\n\\n.template-picker {\\n\\t&__item {\\n\\t\\tdisplay: flex;\\n\\t}\\n\\n\\t&__label {\\n\\t\\tdisplay: flex;\\n\\t\\t// Align in the middle of the grid\\n\\t\\talign-items: center;\\n\\t\\tflex: 1 1;\\n\\t\\tflex-direction: column;\\n\\n\\t\\t&, * {\\n\\t\\t\\tcursor: pointer;\\n\\t\\t\\tuser-select: none;\\n\\t\\t}\\n\\n\\t\\t&::before {\\n\\t\\t\\tdisplay: none !important;\\n\\t\\t}\\n\\t}\\n\\n\\t&__preview {\\n\\t\\tdisplay: block;\\n\\t\\toverflow: hidden;\\n\\t\\t// Stretch so all entries are the same width\\n\\t\\tflex: 1 1;\\n\\t\\twidth: var(--width);\\n\\t\\tmin-height: var(--height);\\n\\t\\tmax-height: var(--height);\\n\\t\\tpadding: 0;\\n\\t\\tborder: var(--border) solid var(--color-border);\\n\\t\\tborder-radius: var(--border-radius-large);\\n\\n\\t\\tinput:checked + label > & {\\n\\t\\t\\tborder-color: var(--color-primary-element);\\n\\t\\t}\\n\\n\\t\\t&--failed {\\n\\t\\t\\t// Make sure to properly center fallback icon\\n\\t\\t\\tdisplay: flex;\\n\\t\\t}\\n\\t}\\n\\n\\t&__image {\\n\\t\\tmax-width: 100%;\\n\\t\\tbackground-color: var(--color-main-background);\\n\\n\\t\\tobject-fit: cover;\\n\\t}\\n\\n\\t// Failed preview, fallback to mime icon\\n\\t&__preview--failed &__image {\\n\\t\\twidth: calc(var(--margin) * 8);\\n\\t\\t// Center mime icon\\n\\t\\tmargin: auto;\\n\\t\\tbackground-color: transparent !important;\\n\\n\\t\\tobject-fit: initial;\\n\\t}\\n\\n\\t&__title {\\n\\t\\toverflow: hidden;\\n\\t\\t// also count preview border\\n\\t\\tmax-width: calc(var(--width) + 2*2px);\\n\\t\\tpadding: var(--margin);\\n\\t\\twhite-space: nowrap;\\n\\t\\ttext-overflow: ellipsis;\\n\\t}\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.templates-picker__form[data-v-48121b39]{padding:calc(var(--margin)*2);padding-bottom:0}.templates-picker__form h2[data-v-48121b39]{text-align:center;font-weight:bold;margin:var(--margin) 0 calc(var(--margin)*2)}.templates-picker__list[data-v-48121b39]{display:grid;grid-gap:calc(var(--margin)*2);grid-auto-columns:1fr;max-width:calc(var(--fullwidth)*6);grid-template-columns:repeat(auto-fit, var(--fullwidth));grid-auto-rows:1fr;justify-content:center}.templates-picker__buttons[data-v-48121b39]{display:flex;justify-content:end;padding:calc(var(--margin)*2) var(--margin);position:sticky;bottom:0;background-image:linear-gradient(0, var(--gradient-main-background))}.templates-picker__buttons button[data-v-48121b39],.templates-picker__buttons input[type=submit][data-v-48121b39]{height:44px}.templates-picker[data-v-48121b39] .modal-container{position:relative}.templates-picker__loading[data-v-48121b39]{position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;margin:0;background-color:var(--color-main-background-translucent)}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files/src/views/TemplatePicker.vue\"],\"names\":[],\"mappings\":\"AAEC,yCACC,6BAAA,CAEA,gBAAA,CAEA,4CACC,iBAAA,CACA,gBAAA,CACA,4CAAA,CAIF,yCACC,YAAA,CACA,8BAAA,CACA,qBAAA,CAEA,kCAAA,CACA,wDAAA,CAEA,kBAAA,CAEA,sBAAA,CAGD,4CACC,YAAA,CACA,mBAAA,CACA,2CAAA,CACA,eAAA,CACA,QAAA,CACA,oEAAA,CAEA,kHACC,WAAA,CAKF,oDACC,iBAAA,CAGD,4CACC,iBAAA,CACA,KAAA,CACA,MAAA,CACA,sBAAA,CACA,UAAA,CACA,WAAA,CACA,QAAA,CACA,yDAAA\",\"sourcesContent\":[\"\\n.templates-picker {\\n\\t&__form {\\n\\t\\tpadding: calc(var(--margin) * 2);\\n\\t\\t// Will be handled by the buttons\\n\\t\\tpadding-bottom: 0;\\n\\n\\t\\th2 {\\n\\t\\t\\ttext-align: center;\\n\\t\\t\\tfont-weight: bold;\\n\\t\\t\\tmargin: var(--margin) 0 calc(var(--margin) * 2);\\n\\t\\t}\\n\\t}\\n\\n\\t&__list {\\n\\t\\tdisplay: grid;\\n\\t\\tgrid-gap: calc(var(--margin) * 2);\\n\\t\\tgrid-auto-columns: 1fr;\\n\\t\\t// We want maximum 5 columns. Putting 6 as we don't count the grid gap. So it will always be lower than 6\\n\\t\\tmax-width: calc(var(--fullwidth) * 6);\\n\\t\\tgrid-template-columns: repeat(auto-fit, var(--fullwidth));\\n\\t\\t// Make sure all rows are the same height\\n\\t\\tgrid-auto-rows: 1fr;\\n\\t\\t// Center the columns set\\n\\t\\tjustify-content: center;\\n\\t}\\n\\n\\t&__buttons {\\n\\t\\tdisplay: flex;\\n\\t\\tjustify-content: end;\\n\\t\\tpadding: calc(var(--margin) * 2) var(--margin);\\n\\t\\tposition: sticky;\\n\\t\\tbottom: 0;\\n\\t\\tbackground-image: linear-gradient(0, var(--gradient-main-background));\\n\\n\\t\\tbutton, input[type='submit'] {\\n\\t\\t\\theight: 44px;\\n\\t\\t}\\n\\t}\\n\\n\\t// Make sure we're relative for the loading emptycontent on top\\n\\t::v-deep .modal-container {\\n\\t\\tposition: relative;\\n\\t}\\n\\n\\t&__loading {\\n\\t\\tposition: absolute;\\n\\t\\ttop: 0;\\n\\t\\tleft: 0;\\n\\t\\tjustify-content: center;\\n\\t\\twidth: 100%;\\n\\t\\theight: 100%;\\n\\t\\tmargin: 0;\\n\\t\\tbackground-color: var(--color-main-background-translucent);\\n\\t}\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var http = require('http')\nvar url = require('url')\n\nvar https = module.exports\n\nfor (var key in http) {\n if (http.hasOwnProperty(key)) https[key] = http[key]\n}\n\nhttps.request = function (params, cb) {\n params = validateParams(params)\n return http.request.call(this, params, cb)\n}\n\nhttps.get = function (params, cb) {\n params = validateParams(params)\n return http.get.call(this, params, cb)\n}\n\nfunction validateParams (params) {\n if (typeof params === 'string') {\n params = url.parse(params)\n }\n if (!params.protocol) {\n params.protocol = 'https:'\n }\n if (params.protocol !== 'https:') {\n throw new Error('Protocol \"' + params.protocol + '\" not supported. Expected \"https:\"')\n }\n return params\n}\n","exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\nexports.finished = require('./lib/internal/streams/end-of-stream.js');\nexports.pipeline = require('./lib/internal/streams/pipeline.js');\n","var ClientRequest = require('./lib/request')\nvar response = require('./lib/response')\nvar extend = require('xtend')\nvar statusCodes = require('builtin-status-codes')\nvar url = require('url')\n\nvar http = exports\n\nhttp.request = function (opts, cb) {\n\tif (typeof opts === 'string')\n\t\topts = url.parse(opts)\n\telse\n\t\topts = extend(opts)\n\n\t// Normally, the page is loaded from http or https, so not specifying a protocol\n\t// will result in a (valid) protocol-relative url. However, this won't work if\n\t// the protocol is something else, like 'file:'\n\tvar defaultProtocol = global.location.protocol.search(/^https?:$/) === -1 ? 'http:' : ''\n\n\tvar protocol = opts.protocol || defaultProtocol\n\tvar host = opts.hostname || opts.host\n\tvar port = opts.port\n\tvar path = opts.path || '/'\n\n\t// Necessary for IPv6 addresses\n\tif (host && host.indexOf(':') !== -1)\n\t\thost = '[' + host + ']'\n\n\t// This may be a relative url. The browser should always be able to interpret it correctly.\n\topts.url = (host ? (protocol + '//' + host) : '') + (port ? ':' + port : '') + path\n\topts.method = (opts.method || 'GET').toUpperCase()\n\topts.headers = opts.headers || {}\n\n\t// Also valid opts.auth, opts.mode\n\n\tvar req = new ClientRequest(opts)\n\tif (cb)\n\t\treq.on('response', cb)\n\treturn req\n}\n\nhttp.get = function get (opts, cb) {\n\tvar req = http.request(opts, cb)\n\treq.end()\n\treturn req\n}\n\nhttp.ClientRequest = ClientRequest\nhttp.IncomingMessage = response.IncomingMessage\n\nhttp.Agent = function () {}\nhttp.Agent.defaultMaxSockets = 4\n\nhttp.globalAgent = new http.Agent()\n\nhttp.STATUS_CODES = statusCodes\n\nhttp.METHODS = [\n\t'CHECKOUT',\n\t'CONNECT',\n\t'COPY',\n\t'DELETE',\n\t'GET',\n\t'HEAD',\n\t'LOCK',\n\t'M-SEARCH',\n\t'MERGE',\n\t'MKACTIVITY',\n\t'MKCOL',\n\t'MOVE',\n\t'NOTIFY',\n\t'OPTIONS',\n\t'PATCH',\n\t'POST',\n\t'PROPFIND',\n\t'PROPPATCH',\n\t'PURGE',\n\t'PUT',\n\t'REPORT',\n\t'SEARCH',\n\t'SUBSCRIBE',\n\t'TRACE',\n\t'UNLOCK',\n\t'UNSUBSCRIBE'\n]","exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableStream)\n\nexports.writableStream = isFunction(global.WritableStream)\n\nexports.abortController = isFunction(global.AbortController)\n\n// The xhr request to example.com may violate some restrictive CSP configurations,\n// so if we're running in a browser that supports `fetch`, avoid calling getXHR()\n// and assume support for certain features below.\nvar xhr\nfunction getXHR () {\n\t// Cache the xhr value\n\tif (xhr !== undefined) return xhr\n\n\tif (global.XMLHttpRequest) {\n\t\txhr = new global.XMLHttpRequest()\n\t\t// If XDomainRequest is available (ie only, where xhr might not work\n\t\t// cross domain), use the page location. Otherwise use example.com\n\t\t// Note: this doesn't actually make an http request.\n\t\ttry {\n\t\t\txhr.open('GET', global.XDomainRequest ? '/' : 'https://example.com')\n\t\t} catch(e) {\n\t\t\txhr = null\n\t\t}\n\t} else {\n\t\t// Service workers don't have XHR\n\t\txhr = null\n\t}\n\treturn xhr\n}\n\nfunction checkTypeSupport (type) {\n\tvar xhr = getXHR()\n\tif (!xhr) return false\n\ttry {\n\t\txhr.responseType = type\n\t\treturn xhr.responseType === type\n\t} catch (e) {}\n\treturn false\n}\n\n// If fetch is supported, then arraybuffer will be supported too. Skip calling\n// checkTypeSupport(), since that calls getXHR().\nexports.arraybuffer = exports.fetch || checkTypeSupport('arraybuffer')\n\n// These next two tests unavoidably show warnings in Chrome. Since fetch will always\n// be used if it's available, just return false for these to avoid the warnings.\nexports.msstream = !exports.fetch && checkTypeSupport('ms-stream')\nexports.mozchunkedarraybuffer = !exports.fetch && checkTypeSupport('moz-chunked-arraybuffer')\n\n// If fetch is supported, then overrideMimeType will be supported too. Skip calling\n// getXHR().\nexports.overrideMimeType = exports.fetch || (getXHR() ? isFunction(getXHR().overrideMimeType) : false)\n\nfunction isFunction (value) {\n\treturn typeof value === 'function'\n}\n\nxhr = null // Help gc\n","var capability = require('./capability')\nvar inherits = require('inherits')\nvar response = require('./response')\nvar stream = require('readable-stream')\n\nvar IncomingMessage = response.IncomingMessage\nvar rStates = response.readyStates\n\nfunction decideMode (preferBinary, useFetch) {\n\tif (capability.fetch && useFetch) {\n\t\treturn 'fetch'\n\t} else if (capability.mozchunkedarraybuffer) {\n\t\treturn 'moz-chunked-arraybuffer'\n\t} else if (capability.msstream) {\n\t\treturn 'ms-stream'\n\t} else if (capability.arraybuffer && preferBinary) {\n\t\treturn 'arraybuffer'\n\t} else {\n\t\treturn 'text'\n\t}\n}\n\nvar ClientRequest = module.exports = function (opts) {\n\tvar self = this\n\tstream.Writable.call(self)\n\n\tself._opts = opts\n\tself._body = []\n\tself._headers = {}\n\tif (opts.auth)\n\t\tself.setHeader('Authorization', 'Basic ' + Buffer.from(opts.auth).toString('base64'))\n\tObject.keys(opts.headers).forEach(function (name) {\n\t\tself.setHeader(name, opts.headers[name])\n\t})\n\n\tvar preferBinary\n\tvar useFetch = true\n\tif (opts.mode === 'disable-fetch' || ('requestTimeout' in opts && !capability.abortController)) {\n\t\t// If the use of XHR should be preferred. Not typically needed.\n\t\tuseFetch = false\n\t\tpreferBinary = true\n\t} else if (opts.mode === 'prefer-streaming') {\n\t\t// If streaming is a high priority but binary compatibility and\n\t\t// the accuracy of the 'content-type' header aren't\n\t\tpreferBinary = false\n\t} else if (opts.mode === 'allow-wrong-content-type') {\n\t\t// If streaming is more important than preserving the 'content-type' header\n\t\tpreferBinary = !capability.overrideMimeType\n\t} else if (!opts.mode || opts.mode === 'default' || opts.mode === 'prefer-fast') {\n\t\t// Use binary if text streaming may corrupt data or the content-type header, or for speed\n\t\tpreferBinary = true\n\t} else {\n\t\tthrow new Error('Invalid value for opts.mode')\n\t}\n\tself._mode = decideMode(preferBinary, useFetch)\n\tself._fetchTimer = null\n\tself._socketTimeout = null\n\tself._socketTimer = null\n\n\tself.on('finish', function () {\n\t\tself._onFinish()\n\t})\n}\n\ninherits(ClientRequest, stream.Writable)\n\nClientRequest.prototype.setHeader = function (name, value) {\n\tvar self = this\n\tvar lowerName = name.toLowerCase()\n\t// This check is not necessary, but it prevents warnings from browsers about setting unsafe\n\t// headers. To be honest I'm not entirely sure hiding these warnings is a good thing, but\n\t// http-browserify did it, so I will too.\n\tif (unsafeHeaders.indexOf(lowerName) !== -1)\n\t\treturn\n\n\tself._headers[lowerName] = {\n\t\tname: name,\n\t\tvalue: value\n\t}\n}\n\nClientRequest.prototype.getHeader = function (name) {\n\tvar header = this._headers[name.toLowerCase()]\n\tif (header)\n\t\treturn header.value\n\treturn null\n}\n\nClientRequest.prototype.removeHeader = function (name) {\n\tvar self = this\n\tdelete self._headers[name.toLowerCase()]\n}\n\nClientRequest.prototype._onFinish = function () {\n\tvar self = this\n\n\tif (self._destroyed)\n\t\treturn\n\tvar opts = self._opts\n\n\tif ('timeout' in opts && opts.timeout !== 0) {\n\t\tself.setTimeout(opts.timeout)\n\t}\n\n\tvar headersObj = self._headers\n\tvar body = null\n\tif (opts.method !== 'GET' && opts.method !== 'HEAD') {\n body = new Blob(self._body, {\n type: (headersObj['content-type'] || {}).value || ''\n });\n }\n\n\t// create flattened list of headers\n\tvar headersList = []\n\tObject.keys(headersObj).forEach(function (keyName) {\n\t\tvar name = headersObj[keyName].name\n\t\tvar value = headersObj[keyName].value\n\t\tif (Array.isArray(value)) {\n\t\t\tvalue.forEach(function (v) {\n\t\t\t\theadersList.push([name, v])\n\t\t\t})\n\t\t} else {\n\t\t\theadersList.push([name, value])\n\t\t}\n\t})\n\n\tif (self._mode === 'fetch') {\n\t\tvar signal = null\n\t\tif (capability.abortController) {\n\t\t\tvar controller = new AbortController()\n\t\t\tsignal = controller.signal\n\t\t\tself._fetchAbortController = controller\n\n\t\t\tif ('requestTimeout' in opts && opts.requestTimeout !== 0) {\n\t\t\t\tself._fetchTimer = global.setTimeout(function () {\n\t\t\t\t\tself.emit('requestTimeout')\n\t\t\t\t\tif (self._fetchAbortController)\n\t\t\t\t\t\tself._fetchAbortController.abort()\n\t\t\t\t}, opts.requestTimeout)\n\t\t\t}\n\t\t}\n\n\t\tglobal.fetch(self._opts.url, {\n\t\t\tmethod: self._opts.method,\n\t\t\theaders: headersList,\n\t\t\tbody: body || undefined,\n\t\t\tmode: 'cors',\n\t\t\tcredentials: opts.withCredentials ? 'include' : 'same-origin',\n\t\t\tsignal: signal\n\t\t}).then(function (response) {\n\t\t\tself._fetchResponse = response\n\t\t\tself._resetTimers(false)\n\t\t\tself._connect()\n\t\t}, function (reason) {\n\t\t\tself._resetTimers(true)\n\t\t\tif (!self._destroyed)\n\t\t\t\tself.emit('error', reason)\n\t\t})\n\t} else {\n\t\tvar xhr = self._xhr = new global.XMLHttpRequest()\n\t\ttry {\n\t\t\txhr.open(self._opts.method, self._opts.url, true)\n\t\t} catch (err) {\n\t\t\tprocess.nextTick(function () {\n\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t\treturn\n\t\t}\n\n\t\t// Can't set responseType on really old browsers\n\t\tif ('responseType' in xhr)\n\t\t\txhr.responseType = self._mode\n\n\t\tif ('withCredentials' in xhr)\n\t\t\txhr.withCredentials = !!opts.withCredentials\n\n\t\tif (self._mode === 'text' && 'overrideMimeType' in xhr)\n\t\t\txhr.overrideMimeType('text/plain; charset=x-user-defined')\n\n\t\tif ('requestTimeout' in opts) {\n\t\t\txhr.timeout = opts.requestTimeout\n\t\t\txhr.ontimeout = function () {\n\t\t\t\tself.emit('requestTimeout')\n\t\t\t}\n\t\t}\n\n\t\theadersList.forEach(function (header) {\n\t\t\txhr.setRequestHeader(header[0], header[1])\n\t\t})\n\n\t\tself._response = null\n\t\txhr.onreadystatechange = function () {\n\t\t\tswitch (xhr.readyState) {\n\t\t\t\tcase rStates.LOADING:\n\t\t\t\tcase rStates.DONE:\n\t\t\t\t\tself._onXHRProgress()\n\t\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\t// Necessary for streaming in Firefox, since xhr.response is ONLY defined\n\t\t// in onprogress, not in onreadystatechange with xhr.readyState = 3\n\t\tif (self._mode === 'moz-chunked-arraybuffer') {\n\t\t\txhr.onprogress = function () {\n\t\t\t\tself._onXHRProgress()\n\t\t\t}\n\t\t}\n\n\t\txhr.onerror = function () {\n\t\t\tif (self._destroyed)\n\t\t\t\treturn\n\t\t\tself._resetTimers(true)\n\t\t\tself.emit('error', new Error('XHR error'))\n\t\t}\n\n\t\ttry {\n\t\t\txhr.send(body)\n\t\t} catch (err) {\n\t\t\tprocess.nextTick(function () {\n\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t\treturn\n\t\t}\n\t}\n}\n\n/**\n * Checks if xhr.status is readable and non-zero, indicating no error.\n * Even though the spec says it should be available in readyState 3,\n * accessing it throws an exception in IE8\n */\nfunction statusValid (xhr) {\n\ttry {\n\t\tvar status = xhr.status\n\t\treturn (status !== null && status !== 0)\n\t} catch (e) {\n\t\treturn false\n\t}\n}\n\nClientRequest.prototype._onXHRProgress = function () {\n\tvar self = this\n\n\tself._resetTimers(false)\n\n\tif (!statusValid(self._xhr) || self._destroyed)\n\t\treturn\n\n\tif (!self._response)\n\t\tself._connect()\n\n\tself._response._onXHRProgress(self._resetTimers.bind(self))\n}\n\nClientRequest.prototype._connect = function () {\n\tvar self = this\n\n\tif (self._destroyed)\n\t\treturn\n\n\tself._response = new IncomingMessage(self._xhr, self._fetchResponse, self._mode, self._resetTimers.bind(self))\n\tself._response.on('error', function(err) {\n\t\tself.emit('error', err)\n\t})\n\n\tself.emit('response', self._response)\n}\n\nClientRequest.prototype._write = function (chunk, encoding, cb) {\n\tvar self = this\n\n\tself._body.push(chunk)\n\tcb()\n}\n\nClientRequest.prototype._resetTimers = function (done) {\n\tvar self = this\n\n\tglobal.clearTimeout(self._socketTimer)\n\tself._socketTimer = null\n\n\tif (done) {\n\t\tglobal.clearTimeout(self._fetchTimer)\n\t\tself._fetchTimer = null\n\t} else if (self._socketTimeout) {\n\t\tself._socketTimer = global.setTimeout(function () {\n\t\t\tself.emit('timeout')\n\t\t}, self._socketTimeout)\n\t}\n}\n\nClientRequest.prototype.abort = ClientRequest.prototype.destroy = function (err) {\n\tvar self = this\n\tself._destroyed = true\n\tself._resetTimers(true)\n\tif (self._response)\n\t\tself._response._destroyed = true\n\tif (self._xhr)\n\t\tself._xhr.abort()\n\telse if (self._fetchAbortController)\n\t\tself._fetchAbortController.abort()\n\n\tif (err)\n\t\tself.emit('error', err)\n}\n\nClientRequest.prototype.end = function (data, encoding, cb) {\n\tvar self = this\n\tif (typeof data === 'function') {\n\t\tcb = data\n\t\tdata = undefined\n\t}\n\n\tstream.Writable.prototype.end.call(self, data, encoding, cb)\n}\n\nClientRequest.prototype.setTimeout = function (timeout, cb) {\n\tvar self = this\n\n\tif (cb)\n\t\tself.once('timeout', cb)\n\n\tself._socketTimeout = timeout\n\tself._resetTimers(false)\n}\n\nClientRequest.prototype.flushHeaders = function () {}\nClientRequest.prototype.setNoDelay = function () {}\nClientRequest.prototype.setSocketKeepAlive = function () {}\n\n// Taken from http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader%28%29-method\nvar unsafeHeaders = [\n\t'accept-charset',\n\t'accept-encoding',\n\t'access-control-request-headers',\n\t'access-control-request-method',\n\t'connection',\n\t'content-length',\n\t'cookie',\n\t'cookie2',\n\t'date',\n\t'dnt',\n\t'expect',\n\t'host',\n\t'keep-alive',\n\t'origin',\n\t'referer',\n\t'te',\n\t'trailer',\n\t'transfer-encoding',\n\t'upgrade',\n\t'via'\n]\n","var capability = require('./capability')\nvar inherits = require('inherits')\nvar stream = require('readable-stream')\n\nvar rStates = exports.readyStates = {\n\tUNSENT: 0,\n\tOPENED: 1,\n\tHEADERS_RECEIVED: 2,\n\tLOADING: 3,\n\tDONE: 4\n}\n\nvar IncomingMessage = exports.IncomingMessage = function (xhr, response, mode, resetTimers) {\n\tvar self = this\n\tstream.Readable.call(self)\n\n\tself._mode = mode\n\tself.headers = {}\n\tself.rawHeaders = []\n\tself.trailers = {}\n\tself.rawTrailers = []\n\n\t// Fake the 'close' event, but only once 'end' fires\n\tself.on('end', function () {\n\t\t// The nextTick is necessary to prevent the 'request' module from causing an infinite loop\n\t\tprocess.nextTick(function () {\n\t\t\tself.emit('close')\n\t\t})\n\t})\n\n\tif (mode === 'fetch') {\n\t\tself._fetchResponse = response\n\n\t\tself.url = response.url\n\t\tself.statusCode = response.status\n\t\tself.statusMessage = response.statusText\n\t\t\n\t\tresponse.headers.forEach(function (header, key){\n\t\t\tself.headers[key.toLowerCase()] = header\n\t\t\tself.rawHeaders.push(key, header)\n\t\t})\n\n\t\tif (capability.writableStream) {\n\t\t\tvar writable = new WritableStream({\n\t\t\t\twrite: function (chunk) {\n\t\t\t\t\tresetTimers(false)\n\t\t\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\t\t\tif (self._destroyed) {\n\t\t\t\t\t\t\treject()\n\t\t\t\t\t\t} else if(self.push(Buffer.from(chunk))) {\n\t\t\t\t\t\t\tresolve()\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tself._resumeFetch = resolve\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t\tclose: function () {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.push(null)\n\t\t\t\t},\n\t\t\t\tabort: function (err) {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.emit('error', err)\n\t\t\t\t}\n\t\t\t})\n\n\t\t\ttry {\n\t\t\t\tresponse.body.pipeTo(writable).catch(function (err) {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.emit('error', err)\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t} catch (e) {} // pipeTo method isn't defined. Can't find a better way to feature test this\n\t\t}\n\t\t// fallback for when writableStream or pipeTo aren't available\n\t\tvar reader = response.body.getReader()\n\t\tfunction read () {\n\t\t\treader.read().then(function (result) {\n\t\t\t\tif (self._destroyed)\n\t\t\t\t\treturn\n\t\t\t\tresetTimers(result.done)\n\t\t\t\tif (result.done) {\n\t\t\t\t\tself.push(null)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tself.push(Buffer.from(result.value))\n\t\t\t\tread()\n\t\t\t}).catch(function (err) {\n\t\t\t\tresetTimers(true)\n\t\t\t\tif (!self._destroyed)\n\t\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t}\n\t\tread()\n\t} else {\n\t\tself._xhr = xhr\n\t\tself._pos = 0\n\n\t\tself.url = xhr.responseURL\n\t\tself.statusCode = xhr.status\n\t\tself.statusMessage = xhr.statusText\n\t\tvar headers = xhr.getAllResponseHeaders().split(/\\r?\\n/)\n\t\theaders.forEach(function (header) {\n\t\t\tvar matches = header.match(/^([^:]+):\\s*(.*)/)\n\t\t\tif (matches) {\n\t\t\t\tvar key = matches[1].toLowerCase()\n\t\t\t\tif (key === 'set-cookie') {\n\t\t\t\t\tif (self.headers[key] === undefined) {\n\t\t\t\t\t\tself.headers[key] = []\n\t\t\t\t\t}\n\t\t\t\t\tself.headers[key].push(matches[2])\n\t\t\t\t} else if (self.headers[key] !== undefined) {\n\t\t\t\t\tself.headers[key] += ', ' + matches[2]\n\t\t\t\t} else {\n\t\t\t\t\tself.headers[key] = matches[2]\n\t\t\t\t}\n\t\t\t\tself.rawHeaders.push(matches[1], matches[2])\n\t\t\t}\n\t\t})\n\n\t\tself._charset = 'x-user-defined'\n\t\tif (!capability.overrideMimeType) {\n\t\t\tvar mimeType = self.rawHeaders['mime-type']\n\t\t\tif (mimeType) {\n\t\t\t\tvar charsetMatch = mimeType.match(/;\\s*charset=([^;])(;|$)/)\n\t\t\t\tif (charsetMatch) {\n\t\t\t\t\tself._charset = charsetMatch[1].toLowerCase()\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!self._charset)\n\t\t\t\tself._charset = 'utf-8' // best guess\n\t\t}\n\t}\n}\n\ninherits(IncomingMessage, stream.Readable)\n\nIncomingMessage.prototype._read = function () {\n\tvar self = this\n\n\tvar resolve = self._resumeFetch\n\tif (resolve) {\n\t\tself._resumeFetch = null\n\t\tresolve()\n\t}\n}\n\nIncomingMessage.prototype._onXHRProgress = function (resetTimers) {\n\tvar self = this\n\n\tvar xhr = self._xhr\n\n\tvar response = null\n\tswitch (self._mode) {\n\t\tcase 'text':\n\t\t\tresponse = xhr.responseText\n\t\t\tif (response.length > self._pos) {\n\t\t\t\tvar newData = response.substr(self._pos)\n\t\t\t\tif (self._charset === 'x-user-defined') {\n\t\t\t\t\tvar buffer = Buffer.alloc(newData.length)\n\t\t\t\t\tfor (var i = 0; i < newData.length; i++)\n\t\t\t\t\t\tbuffer[i] = newData.charCodeAt(i) & 0xff\n\n\t\t\t\t\tself.push(buffer)\n\t\t\t\t} else {\n\t\t\t\t\tself.push(newData, self._charset)\n\t\t\t\t}\n\t\t\t\tself._pos = response.length\n\t\t\t}\n\t\t\tbreak\n\t\tcase 'arraybuffer':\n\t\t\tif (xhr.readyState !== rStates.DONE || !xhr.response)\n\t\t\t\tbreak\n\t\t\tresponse = xhr.response\n\t\t\tself.push(Buffer.from(new Uint8Array(response)))\n\t\t\tbreak\n\t\tcase 'moz-chunked-arraybuffer': // take whole\n\t\t\tresponse = xhr.response\n\t\t\tif (xhr.readyState !== rStates.LOADING || !response)\n\t\t\t\tbreak\n\t\t\tself.push(Buffer.from(new Uint8Array(response)))\n\t\t\tbreak\n\t\tcase 'ms-stream':\n\t\t\tresponse = xhr.response\n\t\t\tif (xhr.readyState !== rStates.LOADING)\n\t\t\t\tbreak\n\t\t\tvar reader = new global.MSStreamReader()\n\t\t\treader.onprogress = function () {\n\t\t\t\tif (reader.result.byteLength > self._pos) {\n\t\t\t\t\tself.push(Buffer.from(new Uint8Array(reader.result.slice(self._pos))))\n\t\t\t\t\tself._pos = reader.result.byteLength\n\t\t\t\t}\n\t\t\t}\n\t\t\treader.onload = function () {\n\t\t\t\tresetTimers(true)\n\t\t\t\tself.push(null)\n\t\t\t}\n\t\t\t// reader.onerror = ??? // TODO: this\n\t\t\treader.readAsArrayBuffer(response)\n\t\t\tbreak\n\t}\n\n\t// The ms-stream case handles end separately in reader.onload()\n\tif (self._xhr.readyState === rStates.DONE && self._mode !== 'ms-stream') {\n\t\tresetTimers(true)\n\t\tself.push(null)\n\t}\n}\n","module.exports = extend\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key]\n }\n }\n }\n\n return target\n}\n","import { getCurrentUser as A, onRequestTokenUpdate as ue, getRequestToken as de } from \"@nextcloud/auth\";\nimport { getLoggerBuilder as q } from \"@nextcloud/logger\";\nimport { getCanonicalLocale as ae } from \"@nextcloud/l10n\";\nimport { join as le, basename as fe, extname as ce, dirname as I } from \"path\";\nimport { encodePath as he } from \"@nextcloud/paths\";\nimport { generateRemoteUrl as pe } from \"@nextcloud/router\";\nimport { createClient as ge, getPatcher as we } from \"webdav\";\n/**\n * @copyright 2019 Christoph Wurst \n *\n * @author Christoph Wurst \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst me = (e) => e === null ? q().setApp(\"files\").build() : q().setApp(\"files\").setUid(e.uid).build(), m = me(A());\n/**\n * @copyright Copyright (c) 2021 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass Ne {\n _entries = [];\n registerEntry(t) {\n this.validateEntry(t), this._entries.push(t);\n }\n unregisterEntry(t) {\n const r = typeof t == \"string\" ? this.getEntryIndex(t) : this.getEntryIndex(t.id);\n if (r === -1) {\n m.warn(\"Entry not found, nothing removed\", { entry: t, entries: this.getEntries() });\n return;\n }\n this._entries.splice(r, 1);\n }\n /**\n * Get the list of registered entries\n *\n * @param {Folder} context the creation context. Usually the current folder\n */\n getEntries(t) {\n return t ? this._entries.filter((r) => typeof r.enabled == \"function\" ? r.enabled(t) : !0) : this._entries;\n }\n getEntryIndex(t) {\n return this._entries.findIndex((r) => r.id === t);\n }\n validateEntry(t) {\n if (!t.id || !t.displayName || !(t.iconSvgInline || t.iconClass) || !t.handler)\n throw new Error(\"Invalid entry\");\n if (typeof t.id != \"string\" || typeof t.displayName != \"string\")\n throw new Error(\"Invalid id or displayName property\");\n if (t.iconClass && typeof t.iconClass != \"string\" || t.iconSvgInline && typeof t.iconSvgInline != \"string\")\n throw new Error(\"Invalid icon provided\");\n if (t.enabled !== void 0 && typeof t.enabled != \"function\")\n throw new Error(\"Invalid enabled property\");\n if (typeof t.handler != \"function\")\n throw new Error(\"Invalid handler property\");\n if (\"order\" in t && typeof t.order != \"number\")\n throw new Error(\"Invalid order property\");\n if (this.getEntryIndex(t.id) !== -1)\n throw new Error(\"Duplicate entry\");\n }\n}\nconst F = function() {\n return typeof window._nc_newfilemenu > \"u\" && (window._nc_newfilemenu = new Ne(), m.debug(\"NewFileMenu initialized\")), window._nc_newfilemenu;\n};\n/**\n * @copyright 2019 Christoph Wurst \n *\n * @author Christoph Wurst \n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst C = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\"], P = [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\"];\nfunction Yt(e, t = !1, r = !1, s = !1) {\n r = r && !s, typeof e == \"string\" && (e = Number(e));\n let n = e > 0 ? Math.floor(Math.log(e) / Math.log(s ? 1e3 : 1024)) : 0;\n n = Math.min((r ? P.length : C.length) - 1, n);\n const i = r ? P[n] : C[n];\n let d = (e / Math.pow(s ? 1e3 : 1024, n)).toFixed(1);\n return t === !0 && n === 0 ? (d !== \"0.0\" ? \"< 1 \" : \"0 \") + (r ? P[1] : C[1]) : (n < 2 ? d = parseFloat(d).toFixed(0) : d = parseFloat(d).toLocaleString(ae()), d + \" \" + i);\n}\nfunction Jt(e, t = !1) {\n try {\n e = `${e}`.toLocaleLowerCase().replaceAll(/\\s+/g, \"\").replaceAll(\",\", \".\");\n } catch {\n return null;\n }\n const r = e.match(/^([0-9]*(\\.[0-9]*)?)([kmgtp]?)(i?)b?$/);\n if (r === null || r[1] === \".\" || r[1] === \"\")\n return null;\n const s = {\n \"\": 0,\n k: 1,\n m: 2,\n g: 3,\n t: 4,\n p: 5,\n e: 6\n }, n = `${r[1]}`, i = r[4] === \"i\" || t ? 1024 : 1e3;\n return Math.round(Number.parseFloat(n) * i ** s[r[3]]);\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nvar Z = /* @__PURE__ */ ((e) => (e.DEFAULT = \"default\", e.HIDDEN = \"hidden\", e))(Z || {});\nclass Qt {\n _action;\n constructor(t) {\n this.validateAction(t), this._action = t;\n }\n get id() {\n return this._action.id;\n }\n get displayName() {\n return this._action.displayName;\n }\n get title() {\n return this._action.title;\n }\n get iconSvgInline() {\n return this._action.iconSvgInline;\n }\n get enabled() {\n return this._action.enabled;\n }\n get exec() {\n return this._action.exec;\n }\n get execBatch() {\n return this._action.execBatch;\n }\n get order() {\n return this._action.order;\n }\n get parent() {\n return this._action.parent;\n }\n get default() {\n return this._action.default;\n }\n get inline() {\n return this._action.inline;\n }\n get renderInline() {\n return this._action.renderInline;\n }\n validateAction(t) {\n if (!t.id || typeof t.id != \"string\")\n throw new Error(\"Invalid id\");\n if (!t.displayName || typeof t.displayName != \"function\")\n throw new Error(\"Invalid displayName function\");\n if (\"title\" in t && typeof t.title != \"function\")\n throw new Error(\"Invalid title function\");\n if (!t.iconSvgInline || typeof t.iconSvgInline != \"function\")\n throw new Error(\"Invalid iconSvgInline function\");\n if (!t.exec || typeof t.exec != \"function\")\n throw new Error(\"Invalid exec function\");\n if (\"enabled\" in t && typeof t.enabled != \"function\")\n throw new Error(\"Invalid enabled function\");\n if (\"execBatch\" in t && typeof t.execBatch != \"function\")\n throw new Error(\"Invalid execBatch function\");\n if (\"order\" in t && typeof t.order != \"number\")\n throw new Error(\"Invalid order\");\n if (\"parent\" in t && typeof t.parent != \"string\")\n throw new Error(\"Invalid parent\");\n if (t.default && !Object.values(Z).includes(t.default))\n throw new Error(\"Invalid default\");\n if (\"inline\" in t && typeof t.inline != \"function\")\n throw new Error(\"Invalid inline function\");\n if (\"renderInline\" in t && typeof t.renderInline != \"function\")\n throw new Error(\"Invalid renderInline function\");\n }\n}\nconst Dt = function(e) {\n if (typeof window._nc_fileactions > \"u\" && (window._nc_fileactions = [], m.debug(\"FileActions initialized\")), window._nc_fileactions.find((t) => t.id === e.id)) {\n m.error(`FileAction ${e.id} already registered`, { action: e });\n return;\n }\n window._nc_fileactions.push(e);\n}, er = function() {\n return typeof window._nc_fileactions > \"u\" && (window._nc_fileactions = [], m.debug(\"FileActions initialized\")), window._nc_fileactions;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass tr {\n _header;\n constructor(t) {\n this.validateHeader(t), this._header = t;\n }\n get id() {\n return this._header.id;\n }\n get order() {\n return this._header.order;\n }\n get enabled() {\n return this._header.enabled;\n }\n get render() {\n return this._header.render;\n }\n get updated() {\n return this._header.updated;\n }\n validateHeader(t) {\n if (!t.id || !t.render || !t.updated)\n throw new Error(\"Invalid header: id, render and updated are required\");\n if (typeof t.id != \"string\")\n throw new Error(\"Invalid id property\");\n if (t.enabled !== void 0 && typeof t.enabled != \"function\")\n throw new Error(\"Invalid enabled property\");\n if (t.render && typeof t.render != \"function\")\n throw new Error(\"Invalid render property\");\n if (t.updated && typeof t.updated != \"function\")\n throw new Error(\"Invalid updated property\");\n }\n}\nconst rr = function(e) {\n if (typeof window._nc_filelistheader > \"u\" && (window._nc_filelistheader = [], m.debug(\"FileListHeaders initialized\")), window._nc_filelistheader.find((t) => t.id === e.id)) {\n m.error(`Header ${e.id} already registered`, { header: e });\n return;\n }\n window._nc_filelistheader.push(e);\n}, nr = function() {\n return typeof window._nc_filelistheader > \"u\" && (window._nc_filelistheader = [], m.debug(\"FileListHeaders initialized\")), window._nc_filelistheader;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nvar N = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = \"NONE\", e[e.CREATE = 4] = \"CREATE\", e[e.READ = 1] = \"READ\", e[e.UPDATE = 2] = \"UPDATE\", e[e.DELETE = 8] = \"DELETE\", e[e.SHARE = 16] = \"SHARE\", e[e.ALL = 31] = \"ALL\", e))(N || {});\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst j = [\n \"d:getcontentlength\",\n \"d:getcontenttype\",\n \"d:getetag\",\n \"d:getlastmodified\",\n \"d:quota-available-bytes\",\n \"d:resourcetype\",\n \"nc:has-preview\",\n \"nc:is-encrypted\",\n \"nc:mount-type\",\n \"nc:share-attributes\",\n \"oc:comments-unread\",\n \"oc:favorite\",\n \"oc:fileid\",\n \"oc:owner-display-name\",\n \"oc:owner-id\",\n \"oc:permissions\",\n \"oc:share-types\",\n \"oc:size\",\n \"ocs:share-permissions\"\n], Y = {\n d: \"DAV:\",\n nc: \"http://nextcloud.org/ns\",\n oc: \"http://owncloud.org/ns\",\n ocs: \"http://open-collaboration-services.org/ns\"\n}, ir = function(e, t = { nc: \"http://nextcloud.org/ns\" }) {\n typeof window._nc_dav_properties > \"u\" && (window._nc_dav_properties = [...j], window._nc_dav_namespaces = { ...Y });\n const r = { ...window._nc_dav_namespaces, ...t };\n if (window._nc_dav_properties.find((n) => n === e))\n return m.error(`${e} already registered`, { prop: e }), !1;\n if (e.startsWith(\"<\") || e.split(\":\").length !== 2)\n return m.error(`${e} is not valid. See example: 'oc:fileid'`, { prop: e }), !1;\n const s = e.split(\":\")[0];\n return r[s] ? (window._nc_dav_properties.push(e), window._nc_dav_namespaces = r, !0) : (m.error(`${e} namespace unknown`, { prop: e, namespaces: r }), !1);\n}, V = function() {\n return typeof window._nc_dav_properties > \"u\" && (window._nc_dav_properties = [...j]), window._nc_dav_properties.map((e) => `<${e} />`).join(\" \");\n}, L = function() {\n return typeof window._nc_dav_namespaces > \"u\" && (window._nc_dav_namespaces = { ...Y }), Object.keys(window._nc_dav_namespaces).map((e) => `xmlns:${e}=\"${window._nc_dav_namespaces?.[e]}\"`).join(\" \");\n}, sr = function() {\n return `\n\t\t\n\t\t\t\n\t\t\t\t${V()}\n\t\t\t\n\t\t`;\n}, Ee = function() {\n return `\n\t\t\n\t\t\t\n\t\t\t\t${V()}\n\t\t\t\n\t\t\t\n\t\t\t\t1\n\t\t\t\n\t\t`;\n}, or = function(e) {\n return `\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${V()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${A()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${e}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst be = function(e = \"\") {\n let t = N.NONE;\n return e && ((e.includes(\"C\") || e.includes(\"K\")) && (t |= N.CREATE), e.includes(\"G\") && (t |= N.READ), (e.includes(\"W\") || e.includes(\"N\") || e.includes(\"V\")) && (t |= N.UPDATE), e.includes(\"D\") && (t |= N.DELETE), e.includes(\"R\") && (t |= N.SHARE)), t;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nvar R = /* @__PURE__ */ ((e) => (e.Folder = \"folder\", e.File = \"file\", e))(R || {});\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst J = function(e, t) {\n return e.match(t) !== null;\n}, X = (e, t) => {\n if (e.id && typeof e.id != \"number\")\n throw new Error(\"Invalid id type of value\");\n if (!e.source)\n throw new Error(\"Missing mandatory source\");\n try {\n new URL(e.source);\n } catch {\n throw new Error(\"Invalid source format, source must be a valid URL\");\n }\n if (!e.source.startsWith(\"http\"))\n throw new Error(\"Invalid source format, only http(s) is supported\");\n if (e.mtime && !(e.mtime instanceof Date))\n throw new Error(\"Invalid mtime type\");\n if (e.crtime && !(e.crtime instanceof Date))\n throw new Error(\"Invalid crtime type\");\n if (!e.mime || typeof e.mime != \"string\" || !e.mime.match(/^[-\\w.]+\\/[-+\\w.]+$/gi))\n throw new Error(\"Missing or invalid mandatory mime\");\n if (\"size\" in e && typeof e.size != \"number\" && e.size !== void 0)\n throw new Error(\"Invalid size type\");\n if (\"permissions\" in e && e.permissions !== void 0 && !(typeof e.permissions == \"number\" && e.permissions >= N.NONE && e.permissions <= N.ALL))\n throw new Error(\"Invalid permissions\");\n if (e.owner && e.owner !== null && typeof e.owner != \"string\")\n throw new Error(\"Invalid owner type\");\n if (e.attributes && typeof e.attributes != \"object\")\n throw new Error(\"Invalid attributes type\");\n if (e.root && typeof e.root != \"string\")\n throw new Error(\"Invalid root type\");\n if (e.root && !e.root.startsWith(\"/\"))\n throw new Error(\"Root must start with a leading slash\");\n if (e.root && !e.source.includes(e.root))\n throw new Error(\"Root must be part of the source\");\n if (e.root && J(e.source, t)) {\n const r = e.source.match(t)[0];\n if (!e.source.includes(le(r, e.root)))\n throw new Error(\"The root must be relative to the service. e.g /files/emma\");\n }\n if (e.status && !Object.values(Q).includes(e.status))\n throw new Error(\"Status must be a valid NodeStatus\");\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nvar Q = /* @__PURE__ */ ((e) => (e.NEW = \"new\", e.FAILED = \"failed\", e.LOADING = \"loading\", e.LOCKED = \"locked\", e))(Q || {});\nclass D {\n _data;\n _attributes;\n _knownDavService = /(remote|public)\\.php\\/(web)?dav/i;\n constructor(t, r) {\n X(t, r || this._knownDavService), this._data = t;\n const s = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set: (n, i, d) => (this.updateMtime(), Reflect.set(n, i, d)),\n deleteProperty: (n, i) => (this.updateMtime(), Reflect.deleteProperty(n, i))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n };\n this._attributes = new Proxy(t.attributes || {}, s), delete this._data.attributes, r && (this._knownDavService = r);\n }\n /**\n * Get the source url to this object\n */\n get source() {\n return this._data.source.replace(/\\/$/i, \"\");\n }\n /**\n * Get the encoded source url to this object for requests purposes\n */\n get encodedSource() {\n const { origin: t } = new URL(this.source);\n return t + he(this.source.slice(t.length));\n }\n /**\n * Get this object name\n */\n get basename() {\n return fe(this.source);\n }\n /**\n * Get this object's extension\n */\n get extension() {\n return ce(this.source);\n }\n /**\n * Get the directory path leading to this object\n * Will use the relative path to root if available\n */\n get dirname() {\n if (this.root) {\n let r = this.source;\n this.isDavRessource && (r = r.split(this._knownDavService).pop());\n const s = r.indexOf(this.root), n = this.root.replace(/\\/$/, \"\");\n return I(r.slice(s + n.length) || \"/\");\n }\n const t = new URL(this.source);\n return I(t.pathname);\n }\n /**\n * Get the file mime\n */\n get mime() {\n return this._data.mime;\n }\n /**\n * Get the file modification time\n */\n get mtime() {\n return this._data.mtime;\n }\n /**\n * Get the file creation time\n */\n get crtime() {\n return this._data.crtime;\n }\n /**\n * Get the file size\n */\n get size() {\n return this._data.size;\n }\n /**\n * Get the file attribute\n */\n get attributes() {\n return this._attributes;\n }\n /**\n * Get the file permissions\n */\n get permissions() {\n return this.owner === null && !this.isDavRessource ? N.READ : this._data.permissions !== void 0 ? this._data.permissions : N.NONE;\n }\n /**\n * Get the file owner\n */\n get owner() {\n return this.isDavRessource ? this._data.owner : null;\n }\n /**\n * Is this a dav-related ressource ?\n */\n get isDavRessource() {\n return J(this.source, this._knownDavService);\n }\n /**\n * Get the dav root of this object\n */\n get root() {\n return this._data.root ? this._data.root.replace(/^(.+)\\/$/, \"$1\") : this.isDavRessource && I(this.source).split(this._knownDavService).pop() || null;\n }\n /**\n * Get the absolute path of this object relative to the root\n */\n get path() {\n if (this.root) {\n let t = this.source;\n this.isDavRessource && (t = t.split(this._knownDavService).pop());\n const r = t.indexOf(this.root), s = this.root.replace(/\\/$/, \"\");\n return t.slice(r + s.length) || \"/\";\n }\n return (this.dirname + \"/\" + this.basename).replace(/\\/\\//g, \"/\");\n }\n /**\n * Get the node id if defined.\n * Will look for the fileid in attributes if undefined.\n */\n get fileid() {\n return this._data?.id || this.attributes?.fileid;\n }\n /**\n * Get the node status.\n */\n get status() {\n return this._data?.status;\n }\n /**\n * Set the node status.\n */\n set status(t) {\n this._data.status = t;\n }\n /**\n * Move the node to a new destination\n *\n * @param {string} destination the new source.\n * e.g. https://cloud.domain.com/remote.php/dav/files/emma/Photos/picture.jpg\n */\n move(t) {\n X({ ...this._data, source: t }, this._knownDavService), this._data.source = t, this.updateMtime();\n }\n /**\n * Rename the node\n * This aliases the move method for easier usage\n *\n * @param basename The new name of the node\n */\n rename(t) {\n if (t.includes(\"/\"))\n throw new Error(\"Invalid basename\");\n this.move(I(this.source) + \"/\" + t);\n }\n /**\n * Update the mtime if exists.\n */\n updateMtime() {\n this._data.mtime && (this._data.mtime = /* @__PURE__ */ new Date());\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass ye extends D {\n get type() {\n return R.File;\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass _e extends D {\n constructor(t) {\n super({\n ...t,\n mime: \"httpd/unix-directory\"\n });\n }\n get type() {\n return R.Folder;\n }\n get extension() {\n return null;\n }\n get mime() {\n return \"httpd/unix-directory\";\n }\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst ee = `/files/${A()?.uid}`, te = pe(\"dav\"), ur = function(e = te, t = {}) {\n const r = ge(e, { headers: t });\n function s(i) {\n r.setHeaders({\n ...t,\n // Add this so the server knows it is an request from the browser\n \"X-Requested-With\": \"XMLHttpRequest\",\n // Inject user auth\n requesttoken: i ?? \"\"\n });\n }\n return ue(s), s(de()), we().patch(\"fetch\", (i, d) => {\n const u = d.headers;\n return u?.method && (d.method = u.method, delete u.method), fetch(i, d);\n }), r;\n}, dr = async (e, t = \"/\", r = ee) => (await e.getDirectoryContents(`${r}${t}`, {\n details: !0,\n data: Ee(),\n headers: {\n // see davGetClient for patched webdav client\n method: \"REPORT\"\n },\n includeSelf: !0\n})).data.filter((n) => n.filename !== t).map((n) => ve(n, r)), ve = function(e, t = ee, r = te) {\n const s = e.props, n = be(s?.permissions), i = s?.[\"owner-id\"] || A()?.uid, d = {\n id: s?.fileid || 0,\n source: `${r}${e.filename}`,\n mtime: new Date(Date.parse(e.lastmod)),\n mime: e.mime,\n size: s?.size || Number.parseInt(s.getcontentlength || \"0\"),\n permissions: n,\n owner: i,\n root: t,\n attributes: {\n ...e,\n ...s,\n hasPreview: s?.[\"has-preview\"]\n }\n };\n return delete d.attributes?.props, e.type === \"file\" ? new ye(d) : new _e(d);\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass Te {\n _views = [];\n _currentView = null;\n register(t) {\n if (this._views.find((r) => r.id === t.id))\n throw new Error(`View id ${t.id} is already registered`);\n this._views.push(t);\n }\n remove(t) {\n const r = this._views.findIndex((s) => s.id === t);\n r !== -1 && this._views.splice(r, 1);\n }\n get views() {\n return this._views;\n }\n setActive(t) {\n this._currentView = t;\n }\n get active() {\n return this._currentView;\n }\n}\nconst ar = function() {\n return typeof window._nc_navigation > \"u\" && (window._nc_navigation = new Te(), m.debug(\"Navigation service initialized\")), window._nc_navigation;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass Ie {\n _column;\n constructor(t) {\n Ae(t), this._column = t;\n }\n get id() {\n return this._column.id;\n }\n get title() {\n return this._column.title;\n }\n get render() {\n return this._column.render;\n }\n get sort() {\n return this._column.sort;\n }\n get summary() {\n return this._column.summary;\n }\n}\nconst Ae = function(e) {\n if (!e.id || typeof e.id != \"string\")\n throw new Error(\"A column id is required\");\n if (!e.title || typeof e.title != \"string\")\n throw new Error(\"A column title is required\");\n if (!e.render || typeof e.render != \"function\")\n throw new Error(\"A render function is required\");\n if (e.sort && typeof e.sort != \"function\")\n throw new Error(\"Column sortFunction must be a function\");\n if (e.summary && typeof e.summary != \"function\")\n throw new Error(\"Column summary must be a function\");\n return !0;\n};\nvar S = {}, O = {};\n(function(e) {\n const t = \":A-Za-z_\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\", r = t + \"\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\", s = \"[\" + t + \"][\" + r + \"]*\", n = new RegExp(\"^\" + s + \"$\"), i = function(u, o) {\n const a = [];\n let l = o.exec(u);\n for (; l; ) {\n const f = [];\n f.startIndex = o.lastIndex - l[0].length;\n const c = l.length;\n for (let g = 0; g < c; g++)\n f.push(l[g]);\n a.push(f), l = o.exec(u);\n }\n return a;\n }, d = function(u) {\n const o = n.exec(u);\n return !(o === null || typeof o > \"u\");\n };\n e.isExist = function(u) {\n return typeof u < \"u\";\n }, e.isEmptyObject = function(u) {\n return Object.keys(u).length === 0;\n }, e.merge = function(u, o, a) {\n if (o) {\n const l = Object.keys(o), f = l.length;\n for (let c = 0; c < f; c++)\n a === \"strict\" ? u[l[c]] = [o[l[c]]] : u[l[c]] = o[l[c]];\n }\n }, e.getValue = function(u) {\n return e.isExist(u) ? u : \"\";\n }, e.isName = d, e.getAllMatches = i, e.nameRegexp = s;\n})(O);\nconst M = O, Oe = {\n allowBooleanAttributes: !1,\n //A tag can have attributes without any value\n unpairedTags: []\n};\nS.validate = function(e, t) {\n t = Object.assign({}, Oe, t);\n const r = [];\n let s = !1, n = !1;\n e[0] === \"\\uFEFF\" && (e = e.substr(1));\n for (let i = 0; i < e.length; i++)\n if (e[i] === \"<\" && e[i + 1] === \"?\") {\n if (i += 2, i = G(e, i), i.err)\n return i;\n } else if (e[i] === \"<\") {\n let d = i;\n if (i++, e[i] === \"!\") {\n i = z(e, i);\n continue;\n } else {\n let u = !1;\n e[i] === \"/\" && (u = !0, i++);\n let o = \"\";\n for (; i < e.length && e[i] !== \">\" && e[i] !== \" \" && e[i] !== \"\t\" && e[i] !== `\n` && e[i] !== \"\\r\"; i++)\n o += e[i];\n if (o = o.trim(), o[o.length - 1] === \"/\" && (o = o.substring(0, o.length - 1), i--), !Re(o)) {\n let f;\n return o.trim().length === 0 ? f = \"Invalid space after '<'.\" : f = \"Tag '\" + o + \"' is an invalid name.\", p(\"InvalidTag\", f, w(e, i));\n }\n const a = xe(e, i);\n if (a === !1)\n return p(\"InvalidAttr\", \"Attributes for '\" + o + \"' have open quote.\", w(e, i));\n let l = a.value;\n if (i = a.index, l[l.length - 1] === \"/\") {\n const f = i - l.length;\n l = l.substring(0, l.length - 1);\n const c = H(l, t);\n if (c === !0)\n s = !0;\n else\n return p(c.err.code, c.err.msg, w(e, f + c.err.line));\n } else if (u)\n if (a.tagClosed) {\n if (l.trim().length > 0)\n return p(\"InvalidTag\", \"Closing tag '\" + o + \"' can't have attributes or invalid starting.\", w(e, d));\n {\n const f = r.pop();\n if (o !== f.tagName) {\n let c = w(e, f.tagStartPos);\n return p(\n \"InvalidTag\",\n \"Expected closing tag '\" + f.tagName + \"' (opened in line \" + c.line + \", col \" + c.col + \") instead of closing tag '\" + o + \"'.\",\n w(e, d)\n );\n }\n r.length == 0 && (n = !0);\n }\n } else\n return p(\"InvalidTag\", \"Closing tag '\" + o + \"' doesn't have proper closing.\", w(e, i));\n else {\n const f = H(l, t);\n if (f !== !0)\n return p(f.err.code, f.err.msg, w(e, i - l.length + f.err.line));\n if (n === !0)\n return p(\"InvalidXml\", \"Multiple possible root nodes found.\", w(e, i));\n t.unpairedTags.indexOf(o) !== -1 || r.push({ tagName: o, tagStartPos: d }), s = !0;\n }\n for (i++; i < e.length; i++)\n if (e[i] === \"<\")\n if (e[i + 1] === \"!\") {\n i++, i = z(e, i);\n continue;\n } else if (e[i + 1] === \"?\") {\n if (i = G(e, ++i), i.err)\n return i;\n } else\n break;\n else if (e[i] === \"&\") {\n const f = Ve(e, i);\n if (f == -1)\n return p(\"InvalidChar\", \"char '&' is not expected.\", w(e, i));\n i = f;\n } else if (n === !0 && !U(e[i]))\n return p(\"InvalidXml\", \"Extra text at the end\", w(e, i));\n e[i] === \"<\" && i--;\n }\n } else {\n if (U(e[i]))\n continue;\n return p(\"InvalidChar\", \"char '\" + e[i] + \"' is not expected.\", w(e, i));\n }\n if (s) {\n if (r.length == 1)\n return p(\"InvalidTag\", \"Unclosed tag '\" + r[0].tagName + \"'.\", w(e, r[0].tagStartPos));\n if (r.length > 0)\n return p(\"InvalidXml\", \"Invalid '\" + JSON.stringify(r.map((i) => i.tagName), null, 4).replace(/\\r?\\n/g, \"\") + \"' found.\", { line: 1, col: 1 });\n } else\n return p(\"InvalidXml\", \"Start tag expected.\", 1);\n return !0;\n};\nfunction U(e) {\n return e === \" \" || e === \"\t\" || e === `\n` || e === \"\\r\";\n}\nfunction G(e, t) {\n const r = t;\n for (; t < e.length; t++)\n if (e[t] == \"?\" || e[t] == \" \") {\n const s = e.substr(r, t - r);\n if (t > 5 && s === \"xml\")\n return p(\"InvalidXml\", \"XML declaration allowed only at the start of the document.\", w(e, t));\n if (e[t] == \"?\" && e[t + 1] == \">\") {\n t++;\n break;\n } else\n continue;\n }\n return t;\n}\nfunction z(e, t) {\n if (e.length > t + 5 && e[t + 1] === \"-\" && e[t + 2] === \"-\") {\n for (t += 3; t < e.length; t++)\n if (e[t] === \"-\" && e[t + 1] === \"-\" && e[t + 2] === \">\") {\n t += 2;\n break;\n }\n } else if (e.length > t + 8 && e[t + 1] === \"D\" && e[t + 2] === \"O\" && e[t + 3] === \"C\" && e[t + 4] === \"T\" && e[t + 5] === \"Y\" && e[t + 6] === \"P\" && e[t + 7] === \"E\") {\n let r = 1;\n for (t += 8; t < e.length; t++)\n if (e[t] === \"<\")\n r++;\n else if (e[t] === \">\" && (r--, r === 0))\n break;\n } else if (e.length > t + 9 && e[t + 1] === \"[\" && e[t + 2] === \"C\" && e[t + 3] === \"D\" && e[t + 4] === \"A\" && e[t + 5] === \"T\" && e[t + 6] === \"A\" && e[t + 7] === \"[\") {\n for (t += 8; t < e.length; t++)\n if (e[t] === \"]\" && e[t + 1] === \"]\" && e[t + 2] === \">\") {\n t += 2;\n break;\n }\n }\n return t;\n}\nconst Ce = '\"', Pe = \"'\";\nfunction xe(e, t) {\n let r = \"\", s = \"\", n = !1;\n for (; t < e.length; t++) {\n if (e[t] === Ce || e[t] === Pe)\n s === \"\" ? s = e[t] : s !== e[t] || (s = \"\");\n else if (e[t] === \">\" && s === \"\") {\n n = !0;\n break;\n }\n r += e[t];\n }\n return s !== \"\" ? !1 : {\n value: r,\n index: t,\n tagClosed: n\n };\n}\nconst $e = new RegExp(`(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*(['\"])(([\\\\s\\\\S])*?)\\\\5)?`, \"g\");\nfunction H(e, t) {\n const r = M.getAllMatches(e, $e), s = {};\n for (let n = 0; n < r.length; n++) {\n if (r[n][1].length === 0)\n return p(\"InvalidAttr\", \"Attribute '\" + r[n][2] + \"' has no space in starting.\", v(r[n]));\n if (r[n][3] !== void 0 && r[n][4] === void 0)\n return p(\"InvalidAttr\", \"Attribute '\" + r[n][2] + \"' is without value.\", v(r[n]));\n if (r[n][3] === void 0 && !t.allowBooleanAttributes)\n return p(\"InvalidAttr\", \"boolean attribute '\" + r[n][2] + \"' is not allowed.\", v(r[n]));\n const i = r[n][2];\n if (!Le(i))\n return p(\"InvalidAttr\", \"Attribute '\" + i + \"' is an invalid name.\", v(r[n]));\n if (!s.hasOwnProperty(i))\n s[i] = 1;\n else\n return p(\"InvalidAttr\", \"Attribute '\" + i + \"' is repeated.\", v(r[n]));\n }\n return !0;\n}\nfunction Fe(e, t) {\n let r = /\\d/;\n for (e[t] === \"x\" && (t++, r = /[\\da-fA-F]/); t < e.length; t++) {\n if (e[t] === \";\")\n return t;\n if (!e[t].match(r))\n break;\n }\n return -1;\n}\nfunction Ve(e, t) {\n if (t++, e[t] === \";\")\n return -1;\n if (e[t] === \"#\")\n return t++, Fe(e, t);\n let r = 0;\n for (; t < e.length; t++, r++)\n if (!(e[t].match(/\\w/) && r < 20)) {\n if (e[t] === \";\")\n break;\n return -1;\n }\n return t;\n}\nfunction p(e, t, r) {\n return {\n err: {\n code: e,\n msg: t,\n line: r.line || r,\n col: r.col\n }\n };\n}\nfunction Le(e) {\n return M.isName(e);\n}\nfunction Re(e) {\n return M.isName(e);\n}\nfunction w(e, t) {\n const r = e.substring(0, t).split(/\\r?\\n/);\n return {\n line: r.length,\n // column number is last line's length + 1, because column numbering starts at 1:\n col: r[r.length - 1].length + 1\n };\n}\nfunction v(e) {\n return e.startIndex + e[1].length;\n}\nvar k = {};\nconst re = {\n preserveOrder: !1,\n attributeNamePrefix: \"@_\",\n attributesGroupName: !1,\n textNodeName: \"#text\",\n ignoreAttributes: !0,\n removeNSPrefix: !1,\n // remove NS from tag name or attribute name if true\n allowBooleanAttributes: !1,\n //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseTagValue: !0,\n parseAttributeValue: !1,\n trimValues: !0,\n //Trim string values of tag and attributes\n cdataPropName: !1,\n numberParseOptions: {\n hex: !0,\n leadingZeros: !0,\n eNotation: !0\n },\n tagValueProcessor: function(e, t) {\n return t;\n },\n attributeValueProcessor: function(e, t) {\n return t;\n },\n stopNodes: [],\n //nested tags will not be parsed even for errors\n alwaysCreateTextNode: !1,\n isArray: () => !1,\n commentPropName: !1,\n unpairedTags: [],\n processEntities: !0,\n htmlEntities: !1,\n ignoreDeclaration: !1,\n ignorePiTags: !1,\n transformTagName: !1,\n transformAttributeName: !1,\n updateTag: function(e, t, r) {\n return e;\n }\n // skipEmptyListItem: false\n}, Se = function(e) {\n return Object.assign({}, re, e);\n};\nk.buildOptions = Se;\nk.defaultOptions = re;\nclass Me {\n constructor(t) {\n this.tagname = t, this.child = [], this[\":@\"] = {};\n }\n add(t, r) {\n t === \"__proto__\" && (t = \"#__proto__\"), this.child.push({ [t]: r });\n }\n addChild(t) {\n t.tagname === \"__proto__\" && (t.tagname = \"#__proto__\"), t[\":@\"] && Object.keys(t[\":@\"]).length > 0 ? this.child.push({ [t.tagname]: t.child, \":@\": t[\":@\"] }) : this.child.push({ [t.tagname]: t.child });\n }\n}\nvar ke = Me;\nconst Be = O;\nfunction qe(e, t) {\n const r = {};\n if (e[t + 3] === \"O\" && e[t + 4] === \"C\" && e[t + 5] === \"T\" && e[t + 6] === \"Y\" && e[t + 7] === \"P\" && e[t + 8] === \"E\") {\n t = t + 9;\n let s = 1, n = !1, i = !1, d = \"\";\n for (; t < e.length; t++)\n if (e[t] === \"<\" && !i) {\n if (n && Ge(e, t))\n t += 7, [entityName, val, t] = Xe(e, t + 1), val.indexOf(\"&\") === -1 && (r[We(entityName)] = {\n regx: RegExp(`&${entityName};`, \"g\"),\n val\n });\n else if (n && ze(e, t))\n t += 8;\n else if (n && He(e, t))\n t += 8;\n else if (n && Ke(e, t))\n t += 9;\n else if (Ue)\n i = !0;\n else\n throw new Error(\"Invalid DOCTYPE\");\n s++, d = \"\";\n } else if (e[t] === \">\") {\n if (i ? e[t - 1] === \"-\" && e[t - 2] === \"-\" && (i = !1, s--) : s--, s === 0)\n break;\n } else\n e[t] === \"[\" ? n = !0 : d += e[t];\n if (s !== 0)\n throw new Error(\"Unclosed DOCTYPE\");\n } else\n throw new Error(\"Invalid Tag instead of DOCTYPE\");\n return { entities: r, i: t };\n}\nfunction Xe(e, t) {\n let r = \"\";\n for (; t < e.length && e[t] !== \"'\" && e[t] !== '\"'; t++)\n r += e[t];\n if (r = r.trim(), r.indexOf(\" \") !== -1)\n throw new Error(\"External entites are not supported\");\n const s = e[t++];\n let n = \"\";\n for (; t < e.length && e[t] !== s; t++)\n n += e[t];\n return [r, n, t];\n}\nfunction Ue(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"-\" && e[t + 3] === \"-\";\n}\nfunction Ge(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"E\" && e[t + 3] === \"N\" && e[t + 4] === \"T\" && e[t + 5] === \"I\" && e[t + 6] === \"T\" && e[t + 7] === \"Y\";\n}\nfunction ze(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"E\" && e[t + 3] === \"L\" && e[t + 4] === \"E\" && e[t + 5] === \"M\" && e[t + 6] === \"E\" && e[t + 7] === \"N\" && e[t + 8] === \"T\";\n}\nfunction He(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"A\" && e[t + 3] === \"T\" && e[t + 4] === \"T\" && e[t + 5] === \"L\" && e[t + 6] === \"I\" && e[t + 7] === \"S\" && e[t + 8] === \"T\";\n}\nfunction Ke(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"N\" && e[t + 3] === \"O\" && e[t + 4] === \"T\" && e[t + 5] === \"A\" && e[t + 6] === \"T\" && e[t + 7] === \"I\" && e[t + 8] === \"O\" && e[t + 9] === \"N\";\n}\nfunction We(e) {\n if (Be.isName(e))\n return e;\n throw new Error(`Invalid entity name ${e}`);\n}\nvar Ze = qe;\nconst je = /^[-+]?0x[a-fA-F0-9]+$/, Ye = /^([\\-\\+])?(0*)(\\.[0-9]+([eE]\\-?[0-9]+)?|[0-9]+(\\.[0-9]+([eE]\\-?[0-9]+)?)?)$/;\n!Number.parseInt && window.parseInt && (Number.parseInt = window.parseInt);\n!Number.parseFloat && window.parseFloat && (Number.parseFloat = window.parseFloat);\nconst Je = {\n hex: !0,\n leadingZeros: !0,\n decimalPoint: \".\",\n eNotation: !0\n //skipLike: /regex/\n};\nfunction Qe(e, t = {}) {\n if (t = Object.assign({}, Je, t), !e || typeof e != \"string\")\n return e;\n let r = e.trim();\n if (t.skipLike !== void 0 && t.skipLike.test(r))\n return e;\n if (t.hex && je.test(r))\n return Number.parseInt(r, 16);\n {\n const s = Ye.exec(r);\n if (s) {\n const n = s[1], i = s[2];\n let d = De(s[3]);\n const u = s[4] || s[6];\n if (!t.leadingZeros && i.length > 0 && n && r[2] !== \".\")\n return e;\n if (!t.leadingZeros && i.length > 0 && !n && r[1] !== \".\")\n return e;\n {\n const o = Number(r), a = \"\" + o;\n return a.search(/[eE]/) !== -1 || u ? t.eNotation ? o : e : r.indexOf(\".\") !== -1 ? a === \"0\" && d === \"\" || a === d || n && a === \"-\" + d ? o : e : i ? d === a || n + d === a ? o : e : r === a || r === n + a ? o : e;\n }\n } else\n return e;\n }\n}\nfunction De(e) {\n return e && e.indexOf(\".\") !== -1 && (e = e.replace(/0+$/, \"\"), e === \".\" ? e = \"0\" : e[0] === \".\" ? e = \"0\" + e : e[e.length - 1] === \".\" && (e = e.substr(0, e.length - 1))), e;\n}\nvar et = Qe;\nconst B = O, T = ke, tt = Ze, rt = et;\n\"<((!\\\\[CDATA\\\\[([\\\\s\\\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\\\/)(NAME)\\\\s*>))([^<]*)\".replace(/NAME/g, B.nameRegexp);\nlet nt = class {\n constructor(t) {\n this.options = t, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = {\n apos: { regex: /&(apos|#39|#x27);/g, val: \"'\" },\n gt: { regex: /&(gt|#62|#x3E);/g, val: \">\" },\n lt: { regex: /&(lt|#60|#x3C);/g, val: \"<\" },\n quot: { regex: /&(quot|#34|#x22);/g, val: '\"' }\n }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: \"&\" }, this.htmlEntities = {\n space: { regex: /&(nbsp|#160);/g, val: \" \" },\n // \"lt\" : { regex: /&(lt|#60);/g, val: \"<\" },\n // \"gt\" : { regex: /&(gt|#62);/g, val: \">\" },\n // \"amp\" : { regex: /&(amp|#38);/g, val: \"&\" },\n // \"quot\" : { regex: /&(quot|#34);/g, val: \"\\\"\" },\n // \"apos\" : { regex: /&(apos|#39);/g, val: \"'\" },\n cent: { regex: /&(cent|#162);/g, val: \"¢\" },\n pound: { regex: /&(pound|#163);/g, val: \"£\" },\n yen: { regex: /&(yen|#165);/g, val: \"¥\" },\n euro: { regex: /&(euro|#8364);/g, val: \"€\" },\n copyright: { regex: /&(copy|#169);/g, val: \"©\" },\n reg: { regex: /&(reg|#174);/g, val: \"®\" },\n inr: { regex: /&(inr|#8377);/g, val: \"₹\" }\n }, this.addExternalEntities = it, this.parseXml = at, this.parseTextData = st, this.resolveNameSpace = ot, this.buildAttributesMap = dt, this.isItStopNode = ht, this.replaceEntitiesValue = ft, this.readStopNodeData = gt, this.saveTextToParentTag = ct, this.addChild = lt;\n }\n};\nfunction it(e) {\n const t = Object.keys(e);\n for (let r = 0; r < t.length; r++) {\n const s = t[r];\n this.lastEntities[s] = {\n regex: new RegExp(\"&\" + s + \";\", \"g\"),\n val: e[s]\n };\n }\n}\nfunction st(e, t, r, s, n, i, d) {\n if (e !== void 0 && (this.options.trimValues && !s && (e = e.trim()), e.length > 0)) {\n d || (e = this.replaceEntitiesValue(e));\n const u = this.options.tagValueProcessor(t, e, r, n, i);\n return u == null ? e : typeof u != typeof e || u !== e ? u : this.options.trimValues ? $(e, this.options.parseTagValue, this.options.numberParseOptions) : e.trim() === e ? $(e, this.options.parseTagValue, this.options.numberParseOptions) : e;\n }\n}\nfunction ot(e) {\n if (this.options.removeNSPrefix) {\n const t = e.split(\":\"), r = e.charAt(0) === \"/\" ? \"/\" : \"\";\n if (t[0] === \"xmlns\")\n return \"\";\n t.length === 2 && (e = r + t[1]);\n }\n return e;\n}\nconst ut = new RegExp(`([^\\\\s=]+)\\\\s*(=\\\\s*(['\"])([\\\\s\\\\S]*?)\\\\3)?`, \"gm\");\nfunction dt(e, t, r) {\n if (!this.options.ignoreAttributes && typeof e == \"string\") {\n const s = B.getAllMatches(e, ut), n = s.length, i = {};\n for (let d = 0; d < n; d++) {\n const u = this.resolveNameSpace(s[d][1]);\n let o = s[d][4], a = this.options.attributeNamePrefix + u;\n if (u.length)\n if (this.options.transformAttributeName && (a = this.options.transformAttributeName(a)), a === \"__proto__\" && (a = \"#__proto__\"), o !== void 0) {\n this.options.trimValues && (o = o.trim()), o = this.replaceEntitiesValue(o);\n const l = this.options.attributeValueProcessor(u, o, t);\n l == null ? i[a] = o : typeof l != typeof o || l !== o ? i[a] = l : i[a] = $(\n o,\n this.options.parseAttributeValue,\n this.options.numberParseOptions\n );\n } else\n this.options.allowBooleanAttributes && (i[a] = !0);\n }\n if (!Object.keys(i).length)\n return;\n if (this.options.attributesGroupName) {\n const d = {};\n return d[this.options.attributesGroupName] = i, d;\n }\n return i;\n }\n}\nconst at = function(e) {\n e = e.replace(/\\r\\n?/g, `\n`);\n const t = new T(\"!xml\");\n let r = t, s = \"\", n = \"\";\n for (let i = 0; i < e.length; i++)\n if (e[i] === \"<\")\n if (e[i + 1] === \"/\") {\n const u = y(e, \">\", i, \"Closing Tag is not closed.\");\n let o = e.substring(i + 2, u).trim();\n if (this.options.removeNSPrefix) {\n const f = o.indexOf(\":\");\n f !== -1 && (o = o.substr(f + 1));\n }\n this.options.transformTagName && (o = this.options.transformTagName(o)), r && (s = this.saveTextToParentTag(s, r, n));\n const a = n.substring(n.lastIndexOf(\".\") + 1);\n if (o && this.options.unpairedTags.indexOf(o) !== -1)\n throw new Error(`Unpaired tag can not be used as closing tag: `);\n let l = 0;\n a && this.options.unpairedTags.indexOf(a) !== -1 ? (l = n.lastIndexOf(\".\", n.lastIndexOf(\".\") - 1), this.tagsNodeStack.pop()) : l = n.lastIndexOf(\".\"), n = n.substring(0, l), r = this.tagsNodeStack.pop(), s = \"\", i = u;\n } else if (e[i + 1] === \"?\") {\n let u = x(e, i, !1, \"?>\");\n if (!u)\n throw new Error(\"Pi Tag is not closed.\");\n if (s = this.saveTextToParentTag(s, r, n), !(this.options.ignoreDeclaration && u.tagName === \"?xml\" || this.options.ignorePiTags)) {\n const o = new T(u.tagName);\n o.add(this.options.textNodeName, \"\"), u.tagName !== u.tagExp && u.attrExpPresent && (o[\":@\"] = this.buildAttributesMap(u.tagExp, n, u.tagName)), this.addChild(r, o, n);\n }\n i = u.closeIndex + 1;\n } else if (e.substr(i + 1, 3) === \"!--\") {\n const u = y(e, \"-->\", i + 4, \"Comment is not closed.\");\n if (this.options.commentPropName) {\n const o = e.substring(i + 4, u - 2);\n s = this.saveTextToParentTag(s, r, n), r.add(this.options.commentPropName, [{ [this.options.textNodeName]: o }]);\n }\n i = u;\n } else if (e.substr(i + 1, 2) === \"!D\") {\n const u = tt(e, i);\n this.docTypeEntities = u.entities, i = u.i;\n } else if (e.substr(i + 1, 2) === \"![\") {\n const u = y(e, \"]]>\", i, \"CDATA is not closed.\") - 2, o = e.substring(i + 9, u);\n if (s = this.saveTextToParentTag(s, r, n), this.options.cdataPropName)\n r.add(this.options.cdataPropName, [{ [this.options.textNodeName]: o }]);\n else {\n let a = this.parseTextData(o, r.tagname, n, !0, !1, !0);\n a == null && (a = \"\"), r.add(this.options.textNodeName, a);\n }\n i = u + 2;\n } else {\n let u = x(e, i, this.options.removeNSPrefix), o = u.tagName;\n const a = u.rawTagName;\n let l = u.tagExp, f = u.attrExpPresent, c = u.closeIndex;\n this.options.transformTagName && (o = this.options.transformTagName(o)), r && s && r.tagname !== \"!xml\" && (s = this.saveTextToParentTag(s, r, n, !1));\n const g = r;\n if (g && this.options.unpairedTags.indexOf(g.tagname) !== -1 && (r = this.tagsNodeStack.pop(), n = n.substring(0, n.lastIndexOf(\".\"))), o !== t.tagname && (n += n ? \".\" + o : o), this.isItStopNode(this.options.stopNodes, n, o)) {\n let h = \"\";\n if (l.length > 0 && l.lastIndexOf(\"/\") === l.length - 1)\n i = u.closeIndex;\n else if (this.options.unpairedTags.indexOf(o) !== -1)\n i = u.closeIndex;\n else {\n const E = this.readStopNodeData(e, a, c + 1);\n if (!E)\n throw new Error(`Unexpected end of ${a}`);\n i = E.i, h = E.tagContent;\n }\n const _ = new T(o);\n o !== l && f && (_[\":@\"] = this.buildAttributesMap(l, n, o)), h && (h = this.parseTextData(h, o, n, !0, f, !0, !0)), n = n.substr(0, n.lastIndexOf(\".\")), _.add(this.options.textNodeName, h), this.addChild(r, _, n);\n } else {\n if (l.length > 0 && l.lastIndexOf(\"/\") === l.length - 1) {\n o[o.length - 1] === \"/\" ? (o = o.substr(0, o.length - 1), n = n.substr(0, n.length - 1), l = o) : l = l.substr(0, l.length - 1), this.options.transformTagName && (o = this.options.transformTagName(o));\n const h = new T(o);\n o !== l && f && (h[\":@\"] = this.buildAttributesMap(l, n, o)), this.addChild(r, h, n), n = n.substr(0, n.lastIndexOf(\".\"));\n } else {\n const h = new T(o);\n this.tagsNodeStack.push(r), o !== l && f && (h[\":@\"] = this.buildAttributesMap(l, n, o)), this.addChild(r, h, n), r = h;\n }\n s = \"\", i = c;\n }\n }\n else\n s += e[i];\n return t.child;\n};\nfunction lt(e, t, r) {\n const s = this.options.updateTag(t.tagname, r, t[\":@\"]);\n s === !1 || (typeof s == \"string\" && (t.tagname = s), e.addChild(t));\n}\nconst ft = function(e) {\n if (this.options.processEntities) {\n for (let t in this.docTypeEntities) {\n const r = this.docTypeEntities[t];\n e = e.replace(r.regx, r.val);\n }\n for (let t in this.lastEntities) {\n const r = this.lastEntities[t];\n e = e.replace(r.regex, r.val);\n }\n if (this.options.htmlEntities)\n for (let t in this.htmlEntities) {\n const r = this.htmlEntities[t];\n e = e.replace(r.regex, r.val);\n }\n e = e.replace(this.ampEntity.regex, this.ampEntity.val);\n }\n return e;\n};\nfunction ct(e, t, r, s) {\n return e && (s === void 0 && (s = Object.keys(t.child).length === 0), e = this.parseTextData(\n e,\n t.tagname,\n r,\n !1,\n t[\":@\"] ? Object.keys(t[\":@\"]).length !== 0 : !1,\n s\n ), e !== void 0 && e !== \"\" && t.add(this.options.textNodeName, e), e = \"\"), e;\n}\nfunction ht(e, t, r) {\n const s = \"*.\" + r;\n for (const n in e) {\n const i = e[n];\n if (s === i || t === i)\n return !0;\n }\n return !1;\n}\nfunction pt(e, t, r = \">\") {\n let s, n = \"\";\n for (let i = t; i < e.length; i++) {\n let d = e[i];\n if (s)\n d === s && (s = \"\");\n else if (d === '\"' || d === \"'\")\n s = d;\n else if (d === r[0])\n if (r[1]) {\n if (e[i + 1] === r[1])\n return {\n data: n,\n index: i\n };\n } else\n return {\n data: n,\n index: i\n };\n else\n d === \"\t\" && (d = \" \");\n n += d;\n }\n}\nfunction y(e, t, r, s) {\n const n = e.indexOf(t, r);\n if (n === -1)\n throw new Error(s);\n return n + t.length - 1;\n}\nfunction x(e, t, r, s = \">\") {\n const n = pt(e, t + 1, s);\n if (!n)\n return;\n let i = n.data;\n const d = n.index, u = i.search(/\\s/);\n let o = i, a = !0;\n u !== -1 && (o = i.substr(0, u).replace(/\\s\\s*$/, \"\"), i = i.substr(u + 1));\n const l = o;\n if (r) {\n const f = o.indexOf(\":\");\n f !== -1 && (o = o.substr(f + 1), a = o !== n.data.substr(f + 1));\n }\n return {\n tagName: o,\n tagExp: i,\n closeIndex: d,\n attrExpPresent: a,\n rawTagName: l\n };\n}\nfunction gt(e, t, r) {\n const s = r;\n let n = 1;\n for (; r < e.length; r++)\n if (e[r] === \"<\")\n if (e[r + 1] === \"/\") {\n const i = y(e, \">\", r, `${t} is not closed`);\n if (e.substring(r + 2, i).trim() === t && (n--, n === 0))\n return {\n tagContent: e.substring(s, r),\n i\n };\n r = i;\n } else if (e[r + 1] === \"?\")\n r = y(e, \"?>\", r + 1, \"StopNode is not closed.\");\n else if (e.substr(r + 1, 3) === \"!--\")\n r = y(e, \"-->\", r + 3, \"StopNode is not closed.\");\n else if (e.substr(r + 1, 2) === \"![\")\n r = y(e, \"]]>\", r, \"StopNode is not closed.\") - 2;\n else {\n const i = x(e, r, \">\");\n i && ((i && i.tagName) === t && i.tagExp[i.tagExp.length - 1] !== \"/\" && n++, r = i.closeIndex);\n }\n}\nfunction $(e, t, r) {\n if (t && typeof e == \"string\") {\n const s = e.trim();\n return s === \"true\" ? !0 : s === \"false\" ? !1 : rt(e, r);\n } else\n return B.isExist(e) ? e : \"\";\n}\nvar wt = nt, ne = {};\nfunction mt(e, t) {\n return ie(e, t);\n}\nfunction ie(e, t, r) {\n let s;\n const n = {};\n for (let i = 0; i < e.length; i++) {\n const d = e[i], u = Nt(d);\n let o = \"\";\n if (r === void 0 ? o = u : o = r + \".\" + u, u === t.textNodeName)\n s === void 0 ? s = d[u] : s += \"\" + d[u];\n else {\n if (u === void 0)\n continue;\n if (d[u]) {\n let a = ie(d[u], t, o);\n const l = bt(a, t);\n d[\":@\"] ? Et(a, d[\":@\"], o, t) : Object.keys(a).length === 1 && a[t.textNodeName] !== void 0 && !t.alwaysCreateTextNode ? a = a[t.textNodeName] : Object.keys(a).length === 0 && (t.alwaysCreateTextNode ? a[t.textNodeName] = \"\" : a = \"\"), n[u] !== void 0 && n.hasOwnProperty(u) ? (Array.isArray(n[u]) || (n[u] = [n[u]]), n[u].push(a)) : t.isArray(u, o, l) ? n[u] = [a] : n[u] = a;\n }\n }\n }\n return typeof s == \"string\" ? s.length > 0 && (n[t.textNodeName] = s) : s !== void 0 && (n[t.textNodeName] = s), n;\n}\nfunction Nt(e) {\n const t = Object.keys(e);\n for (let r = 0; r < t.length; r++) {\n const s = t[r];\n if (s !== \":@\")\n return s;\n }\n}\nfunction Et(e, t, r, s) {\n if (t) {\n const n = Object.keys(t), i = n.length;\n for (let d = 0; d < i; d++) {\n const u = n[d];\n s.isArray(u, r + \".\" + u, !0, !0) ? e[u] = [t[u]] : e[u] = t[u];\n }\n }\n}\nfunction bt(e, t) {\n const { textNodeName: r } = t, s = Object.keys(e).length;\n return !!(s === 0 || s === 1 && (e[r] || typeof e[r] == \"boolean\" || e[r] === 0));\n}\nne.prettify = mt;\nconst { buildOptions: yt } = k, _t = wt, { prettify: vt } = ne, Tt = S;\nlet It = class {\n constructor(t) {\n this.externalEntities = {}, this.options = yt(t);\n }\n /**\n * Parse XML dats to JS object \n * @param {string|Buffer} xmlData \n * @param {boolean|Object} validationOption \n */\n parse(t, r) {\n if (typeof t != \"string\")\n if (t.toString)\n t = t.toString();\n else\n throw new Error(\"XML data is accepted in String or Bytes[] form.\");\n if (r) {\n r === !0 && (r = {});\n const i = Tt.validate(t, r);\n if (i !== !0)\n throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`);\n }\n const s = new _t(this.options);\n s.addExternalEntities(this.externalEntities);\n const n = s.parseXml(t);\n return this.options.preserveOrder || n === void 0 ? n : vt(n, this.options);\n }\n /**\n * Add Entity which is not by default supported by this library\n * @param {string} key \n * @param {string} value \n */\n addEntity(t, r) {\n if (r.indexOf(\"&\") !== -1)\n throw new Error(\"Entity value can't have '&'\");\n if (t.indexOf(\"&\") !== -1 || t.indexOf(\";\") !== -1)\n throw new Error(\"An entity must be set without '&' and ';'. Eg. use '#xD' for ' '\");\n if (r === \"&\")\n throw new Error(\"An entity with value '&' is not permitted\");\n this.externalEntities[t] = r;\n }\n};\nvar At = It;\nconst Ot = `\n`;\nfunction Ct(e, t) {\n let r = \"\";\n return t.format && t.indentBy.length > 0 && (r = Ot), se(e, t, \"\", r);\n}\nfunction se(e, t, r, s) {\n let n = \"\", i = !1;\n for (let d = 0; d < e.length; d++) {\n const u = e[d], o = Pt(u);\n if (o === void 0)\n continue;\n let a = \"\";\n if (r.length === 0 ? a = o : a = `${r}.${o}`, o === t.textNodeName) {\n let h = u[o];\n xt(a, t) || (h = t.tagValueProcessor(o, h), h = oe(h, t)), i && (n += s), n += h, i = !1;\n continue;\n } else if (o === t.cdataPropName) {\n i && (n += s), n += ``, i = !1;\n continue;\n } else if (o === t.commentPropName) {\n n += s + ``, i = !0;\n continue;\n } else if (o[0] === \"?\") {\n const h = K(u[\":@\"], t), _ = o === \"?xml\" ? \"\" : s;\n let E = u[o][0][t.textNodeName];\n E = E.length !== 0 ? \" \" + E : \"\", n += _ + `<${o}${E}${h}?>`, i = !0;\n continue;\n }\n let l = s;\n l !== \"\" && (l += t.indentBy);\n const f = K(u[\":@\"], t), c = s + `<${o}${f}`, g = se(u[o], t, a, l);\n t.unpairedTags.indexOf(o) !== -1 ? t.suppressUnpairedNode ? n += c + \">\" : n += c + \"/>\" : (!g || g.length === 0) && t.suppressEmptyNode ? n += c + \"/>\" : g && g.endsWith(\">\") ? n += c + `>${g}${s}` : (n += c + \">\", g && s !== \"\" && (g.includes(\"/>\") || g.includes(\"`), i = !0;\n }\n return n;\n}\nfunction Pt(e) {\n const t = Object.keys(e);\n for (let r = 0; r < t.length; r++) {\n const s = t[r];\n if (e.hasOwnProperty(s) && s !== \":@\")\n return s;\n }\n}\nfunction K(e, t) {\n let r = \"\";\n if (e && !t.ignoreAttributes)\n for (let s in e) {\n if (!e.hasOwnProperty(s))\n continue;\n let n = t.attributeValueProcessor(s, e[s]);\n n = oe(n, t), n === !0 && t.suppressBooleanAttributes ? r += ` ${s.substr(t.attributeNamePrefix.length)}` : r += ` ${s.substr(t.attributeNamePrefix.length)}=\"${n}\"`;\n }\n return r;\n}\nfunction xt(e, t) {\n e = e.substr(0, e.length - t.textNodeName.length - 1);\n let r = e.substr(e.lastIndexOf(\".\") + 1);\n for (let s in t.stopNodes)\n if (t.stopNodes[s] === e || t.stopNodes[s] === \"*.\" + r)\n return !0;\n return !1;\n}\nfunction oe(e, t) {\n if (e && e.length > 0 && t.processEntities)\n for (let r = 0; r < t.entities.length; r++) {\n const s = t.entities[r];\n e = e.replace(s.regex, s.val);\n }\n return e;\n}\nvar $t = Ct;\nconst Ft = $t, Vt = {\n attributeNamePrefix: \"@_\",\n attributesGroupName: !1,\n textNodeName: \"#text\",\n ignoreAttributes: !0,\n cdataPropName: !1,\n format: !1,\n indentBy: \" \",\n suppressEmptyNode: !1,\n suppressUnpairedNode: !0,\n suppressBooleanAttributes: !0,\n tagValueProcessor: function(e, t) {\n return t;\n },\n attributeValueProcessor: function(e, t) {\n return t;\n },\n preserveOrder: !1,\n commentPropName: !1,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&\" },\n //it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \">\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"<\" },\n { regex: new RegExp(\"'\", \"g\"), val: \"'\" },\n { regex: new RegExp('\"', \"g\"), val: \""\" }\n ],\n processEntities: !0,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: !1\n};\nfunction b(e) {\n this.options = Object.assign({}, Vt, e), this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {\n return !1;\n } : (this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = St), this.processTextOrObjNode = Lt, this.options.format ? (this.indentate = Rt, this.tagEndChar = `>\n`, this.newLine = `\n`) : (this.indentate = function() {\n return \"\";\n }, this.tagEndChar = \">\", this.newLine = \"\");\n}\nb.prototype.build = function(e) {\n return this.options.preserveOrder ? Ft(e, this.options) : (Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = {\n [this.options.arrayNodeName]: e\n }), this.j2x(e, 0).val);\n};\nb.prototype.j2x = function(e, t) {\n let r = \"\", s = \"\";\n for (let n in e)\n if (Object.prototype.hasOwnProperty.call(e, n))\n if (typeof e[n] > \"u\")\n this.isAttribute(n) && (s += \"\");\n else if (e[n] === null)\n this.isAttribute(n) ? s += \"\" : n[0] === \"?\" ? s += this.indentate(t) + \"<\" + n + \"?\" + this.tagEndChar : s += this.indentate(t) + \"<\" + n + \"/\" + this.tagEndChar;\n else if (e[n] instanceof Date)\n s += this.buildTextValNode(e[n], n, \"\", t);\n else if (typeof e[n] != \"object\") {\n const i = this.isAttribute(n);\n if (i)\n r += this.buildAttrPairStr(i, \"\" + e[n]);\n else if (n === this.options.textNodeName) {\n let d = this.options.tagValueProcessor(n, \"\" + e[n]);\n s += this.replaceEntitiesValue(d);\n } else\n s += this.buildTextValNode(e[n], n, \"\", t);\n } else if (Array.isArray(e[n])) {\n const i = e[n].length;\n let d = \"\";\n for (let u = 0; u < i; u++) {\n const o = e[n][u];\n typeof o > \"u\" || (o === null ? n[0] === \"?\" ? s += this.indentate(t) + \"<\" + n + \"?\" + this.tagEndChar : s += this.indentate(t) + \"<\" + n + \"/\" + this.tagEndChar : typeof o == \"object\" ? this.options.oneListGroup ? d += this.j2x(o, t + 1).val : d += this.processTextOrObjNode(o, n, t) : d += this.buildTextValNode(o, n, \"\", t));\n }\n this.options.oneListGroup && (d = this.buildObjectNode(d, n, \"\", t)), s += d;\n } else if (this.options.attributesGroupName && n === this.options.attributesGroupName) {\n const i = Object.keys(e[n]), d = i.length;\n for (let u = 0; u < d; u++)\n r += this.buildAttrPairStr(i[u], \"\" + e[n][i[u]]);\n } else\n s += this.processTextOrObjNode(e[n], n, t);\n return { attrStr: r, val: s };\n};\nb.prototype.buildAttrPairStr = function(e, t) {\n return t = this.options.attributeValueProcessor(e, \"\" + t), t = this.replaceEntitiesValue(t), this.options.suppressBooleanAttributes && t === \"true\" ? \" \" + e : \" \" + e + '=\"' + t + '\"';\n};\nfunction Lt(e, t, r) {\n const s = this.j2x(e, r + 1);\n return e[this.options.textNodeName] !== void 0 && Object.keys(e).length === 1 ? this.buildTextValNode(e[this.options.textNodeName], t, s.attrStr, r) : this.buildObjectNode(s.val, t, s.attrStr, r);\n}\nb.prototype.buildObjectNode = function(e, t, r, s) {\n if (e === \"\")\n return t[0] === \"?\" ? this.indentate(s) + \"<\" + t + r + \"?\" + this.tagEndChar : this.indentate(s) + \"<\" + t + r + this.closeTag(t) + this.tagEndChar;\n {\n let n = \"\" + e + n : this.options.commentPropName !== !1 && t === this.options.commentPropName && i.length === 0 ? this.indentate(s) + `` + this.newLine : this.indentate(s) + \"<\" + t + r + i + this.tagEndChar + e + this.indentate(s) + n;\n }\n};\nb.prototype.closeTag = function(e) {\n let t = \"\";\n return this.options.unpairedTags.indexOf(e) !== -1 ? this.options.suppressUnpairedNode || (t = \"/\") : this.options.suppressEmptyNode ? t = \"/\" : t = `>` + this.newLine;\n if (this.options.commentPropName !== !1 && t === this.options.commentPropName)\n return this.indentate(s) + `` + this.newLine;\n if (t[0] === \"?\")\n return this.indentate(s) + \"<\" + t + r + \"?\" + this.tagEndChar;\n {\n let n = this.options.tagValueProcessor(t, e);\n return n = this.replaceEntitiesValue(n), n === \"\" ? this.indentate(s) + \"<\" + t + r + this.closeTag(t) + this.tagEndChar : this.indentate(s) + \"<\" + t + r + \">\" + n + \" 0 && this.options.processEntities)\n for (let t = 0; t < this.options.entities.length; t++) {\n const r = this.options.entities[t];\n e = e.replace(r.regex, r.val);\n }\n return e;\n};\nfunction Rt(e) {\n return this.options.indentBy.repeat(e);\n}\nfunction St(e) {\n return e.startsWith(this.options.attributeNamePrefix) && e !== this.options.textNodeName ? e.substr(this.attrPrefixLen) : !1;\n}\nvar Mt = b;\nconst kt = S, Bt = At, qt = Mt;\nvar W = {\n XMLParser: Bt,\n XMLValidator: kt,\n XMLBuilder: qt\n};\nfunction Xt(e) {\n if (typeof e != \"string\")\n throw new TypeError(`Expected a \\`string\\`, got \\`${typeof e}\\``);\n if (e = e.trim(), e.length === 0 || W.XMLValidator.validate(e) !== !0)\n return !1;\n let t;\n const r = new W.XMLParser();\n try {\n t = r.parse(e);\n } catch {\n return !1;\n }\n return !(!t || !(\"svg\" in t));\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass cr {\n _view;\n constructor(t) {\n Ut(t), this._view = t;\n }\n get id() {\n return this._view.id;\n }\n get name() {\n return this._view.name;\n }\n get caption() {\n return this._view.caption;\n }\n get emptyTitle() {\n return this._view.emptyTitle;\n }\n get emptyCaption() {\n return this._view.emptyCaption;\n }\n get getContents() {\n return this._view.getContents;\n }\n get icon() {\n return this._view.icon;\n }\n set icon(t) {\n this._view.icon = t;\n }\n get order() {\n return this._view.order;\n }\n set order(t) {\n this._view.order = t;\n }\n get params() {\n return this._view.params;\n }\n set params(t) {\n this._view.params = t;\n }\n get columns() {\n return this._view.columns;\n }\n get emptyView() {\n return this._view.emptyView;\n }\n get parent() {\n return this._view.parent;\n }\n get sticky() {\n return this._view.sticky;\n }\n get expanded() {\n return this._view.expanded;\n }\n set expanded(t) {\n this._view.expanded = t;\n }\n get defaultSortKey() {\n return this._view.defaultSortKey;\n }\n}\nconst Ut = function(e) {\n if (!e.id || typeof e.id != \"string\")\n throw new Error(\"View id is required and must be a string\");\n if (!e.name || typeof e.name != \"string\")\n throw new Error(\"View name is required and must be a string\");\n if (e.columns && e.columns.length > 0 && (!e.caption || typeof e.caption != \"string\"))\n throw new Error(\"View caption is required for top-level views and must be a string\");\n if (!e.getContents || typeof e.getContents != \"function\")\n throw new Error(\"View getContents is required and must be a function\");\n if (!e.icon || typeof e.icon != \"string\" || !Xt(e.icon))\n throw new Error(\"View icon is required and must be a valid svg string\");\n if (!(\"order\" in e) || typeof e.order != \"number\")\n throw new Error(\"View order is required and must be a number\");\n if (e.columns && e.columns.forEach((t) => {\n if (!(t instanceof Ie))\n throw new Error(\"View columns must be an array of Column. Invalid column found\");\n }), e.emptyView && typeof e.emptyView != \"function\")\n throw new Error(\"View emptyView must be a function\");\n if (e.parent && typeof e.parent != \"string\")\n throw new Error(\"View parent must be a string\");\n if (\"sticky\" in e && typeof e.sticky != \"boolean\")\n throw new Error(\"View sticky must be a boolean\");\n if (\"expanded\" in e && typeof e.expanded != \"boolean\")\n throw new Error(\"View expanded must be a boolean\");\n if (e.defaultSortKey && typeof e.defaultSortKey != \"string\")\n throw new Error(\"View defaultSortKey must be a string\");\n return !0;\n};\n/**\n * @copyright 2019 Christoph Wurst \n *\n * @author Christoph Wurst \n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst hr = function(e) {\n return F().registerEntry(e);\n}, pr = function(e) {\n return F().unregisterEntry(e);\n}, gr = function(e) {\n return F().getEntries(e).sort((r, s) => r.order !== void 0 && s.order !== void 0 && r.order !== s.order ? r.order - s.order : r.displayName.localeCompare(s.displayName, void 0, { numeric: !0, sensitivity: \"base\" }));\n};\nexport {\n Ie as Column,\n Z as DefaultType,\n ye as File,\n Qt as FileAction,\n R as FileType,\n _e as Folder,\n tr as Header,\n Te as Navigation,\n D as Node,\n Q as NodeStatus,\n N as Permission,\n cr as View,\n hr as addNewFileMenuEntry,\n ur as davGetClient,\n sr as davGetDefaultPropfind,\n Ee as davGetFavoritesReport,\n or as davGetRecentSearch,\n be as davParsePermissions,\n te as davRemoteURL,\n ve as davResultToNode,\n ee as davRootPath,\n Y as defaultDavNamespaces,\n j as defaultDavProperties,\n Yt as formatFileSize,\n L as getDavNameSpaces,\n V as getDavProperties,\n dr as getFavoriteNodes,\n er as getFileActions,\n nr as getFileListHeaders,\n ar as getNavigation,\n gr as getNewFileMenuEntries,\n Jt as parseFileSize,\n ir as registerDavProperty,\n Dt as registerFileAction,\n rr as registerFileListHeaders,\n pr as removeNewFileMenuEntry\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + chunkId + \".js?v=\" + {\"4720\":\"bf813bc45f5afa044293\",\"6512\":\"a386aad6f01ecddf416d\"}[chunkId] + \"\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 9837;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t9837: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], () => (__webpack_require__(34507)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","getLoggerBuilder","setApp","detectUser","build","action","FileAction","id","displayName","nodes","view","t","iconSvgInline","enabled","length","map","node","permissions","every","permission","Permission","DELETE","exec","axios","delete","encodedSource","emit","error","logger","source","execBatch","dir","Promise","all","this","order","triggerDownload","url","hiddenElement","document","createElement","download","href","click","downloadNodes","secret","Math","random","toString","substring","generateUrl","files","JSON","stringify","basename","isDownloadable","READ","attributes","downloadAttribute","parse","find","attribute","scope","key","undefined","some","type","FileType","Folder","root","startsWith","async","Array","fill","UPDATE","path","link","generateOcsUrl","result","post","uid","getCurrentUser","window","location","host","encodePath","data","ocs","token","showError","openLocalClient","shouldFavorite","favorite","favoriteNode","willFavorite","tags","OC","TAG_FAVORITE","dirname","Vue","StarSvg","NONE","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","Axios","AxiosError","CanceledError","isCancel","CancelToken","VERSION","Cancel","isAxiosError","spread","toFormData","AxiosHeaders","HttpStatusCode","formToJSON","getAdapter","mergeConfig","queue","getQueue","PQueue","concurrency","MoveCopyAction","canMove","reduce","min","ALL","canCopy","canDownload","getUniqueName","name","otherNames","suffix","arguments","n","newName","i","includes","ext","extname","getActionForNodes","MOVE_OR_COPY","MOVE","COPY","handleCopyMoveNodeTo","destination","method","overwrite","Error","NodeStatus","LOADING","add","copySuffix","index","client","davGetClient","currentPath","join","davRootPath","destinationPath","target","otherNodes","getDirectoryContents","copyFile","stat","details","davGetDefaultPropfind","davResultToNode","moveFile","response","status","message","debug","openFilePickerForAction","fileIDs","fileid","filter","Boolean","filePicker","getFilePickerBuilder","allowDirectories","setFilter","CREATE","setMimeTypeFilter","setMultiSelect","startAt","resolve","reject","setButtonFactory","_selection","buttons","dirnames","paths","push","label","icon","CopyIconSvg","callback","FolderMoveSvg","pick","catch","FilePickerClosed","e","promises","FolderSvg","isDavRessource","OCP","Files","Router","goToRoute","default","DefaultType","HIDDEN","InformationSvg","OCA","Sidebar","open","File","entry","context","handler","content","contentNames","encodeURIComponent","headers","Overwrite","parseInt","createNewFolder","folder","mtime","Date","owner","showSuccess","WorkerGlobalScope","self","globalThis","fetch","bind","Headers","Request","Response","HOT_PATCHER_TYPE","NOOP","createNewItem","original","methods","final","HotPatcher","constructor","_configuration","registry","getEmptyAction","__type__","configuration","newAction","control","allowTargetOverrides","Object","keys","forEach","foreignKey","hasOwnProperty","assign","execute","args","get","item","_this","shift","apply","sequence","isPatched","patch","opts","chain","patchInline","plugin","restore","setFinal","__patcher","NONCE_CHARS","generateDigestAuthHeader","digest","replace","uri","indexOf","slice","toUpperCase","qop","test","ncString","nc","ha1","algorithm","user","realm","pass","nonce","cnonce","ha1Hash","md5","toLowerCase","ha1Compute","username","password","ha2","digestResponse","authValues","opaque","authHeader","k","obj","prototype","call","getPrototypeOf","proto","isPlainObject","setPrototypeOf","merge","output","items","nextItem","mergeObjects","obj1","obj2","isArray","headerPayloads","headerKeys","header","lowerHeader","hasArrayBuffer","ArrayBuffer","objToString","_request","requestOptions","patcher","body","newHeaders","value","isBuffer","isArrayBuffer","requestDataToFetchBody","signal","withCredentials","credentials","httpAgent","httpsAgent","agent","parsedURL","protocol","getFetchOptions","rootPath","defaultRootUrl","generateRemoteUrl","getClient","rootUrl","createClient","requesttoken","getRequestToken","getPatcher","_digest","hasDigestAuth","Authorization","split","re","match","floor","makeNonce","parseDigestAuth","response2","request","hashCode","str","a","b","charCodeAt","resultToNode","props","davParsePermissions","filename","nodeData","lastmod","mime","size","hasPreview","failed","reportPayload","getDavNameSpaces","getDavProperties","getContents","propfindPayload","rootResponse","contentsResponse","includeSelf","contents","generateFavoriteFolderView","View","generateIdFromPath","params","parent","columns","lastTwoWeeksTimestamp","round","now","inheritAttrs","String","required","checked","Number","previewUrl","ratio","failedPreview","computed","nameWithoutExt","realPreviewUrl","mimeIcon","getElementById","pathSections","relativePath","section","encodeFilePath","MimeType","getIconUrl","onCheck","$emit","onFailure","_vm","_c","_self","staticClass","attrs","domProps","on","_v","class","_s","extend","components","NcEmptyContent","NcModal","TemplatePreview","loading","opened","provider","extension","emptyTemplate","mimetypes","selectedTemplate","templates","template","style","width","margin","border","fetchedProvider","getTemplates","app","onSubmit","close","currentDirectory","URL","searchParams","warn","fileInfo","filePath","templatePath","templateType","createFromTemplate","normalize","openfile","_setupProxy","$event","preventDefault","stopPropagation","_b","_l","_e","mixin","TemplatePickerRoot","appendChild","loadState","templatesPath","TemplatePicker","TemplatePickerView","propsData","$mount","addNewFileMenuEntry","initTemplatesFolder","removeNewFileMenuEntry","iconClass","directory","copySystemTemplates","template_path","registerFileAction","deleteAction","downloadAction","editLocallyAction","favoriteAction","moveOrCopyAction","openFolderAction","openInFilesAction","renameAction","sidebarAction","viewInFolderAction","newFolderEntry","favoriteFolders","favoriteFoldersViews","Navigation","getNavigation","register","caption","emptyTitle","emptyCaption","subscribe","addToFavorites","removePathFromFavorites","updateAndSortViews","sort","localeCompare","getLanguage","ignorePunctuation","newFavoriteFolder","findIndex","splice","remove","registerFavoritesView","controller","AbortController","CancelablePromise","onCancel","abort","defaultSortKey","davGetRecentSearch","deep","davRemoteURL","r","navigator","addEventListener","noRewrite","registration","serviceWorker","registerDavProperty","module","exports","_typeof","Symbol","iterator","_exports","_setPrototypeOf","o","p","__proto__","_createSuper","Derived","hasNativeReflectConstruct","Reflect","construct","sham","Proxy","valueOf","_isNativeReflectConstruct","Super","_getPrototypeOf","NewTarget","TypeError","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_createForOfIteratorHelper","allowArrayLike","it","minLen","_arrayLikeToArray","from","_unsupportedIterableToArray","F","s","done","f","err","normalCompletion","didErr","step","next","_e2","return","arr","len","arr2","_classCallCheck","instance","Constructor","_defineProperties","descriptor","enumerable","configurable","writable","defineProperty","_createClass","protoProps","staticProps","_defineProperty","_classPrivateFieldInitSpec","privateMap","privateCollection","has","_checkPrivateRedeclaration","set","_classPrivateFieldGet","receiver","_classApplyDescriptorGet","_classExtractFieldDescriptor","_classPrivateFieldSet","_classApplyDescriptorSet","cancelable","isCancelablePromise","toStringTag","_internals","WeakMap","_promise","CancelablePromiseInternal","_ref","_ref$executor","executor","_ref$internals","internals","isCanceled","onCancelList","_ref$promise","promise","cancel","onfulfilled","onrejected","makeCancelable","then","createCallback","onfinally","runWhenCanceled","finally","callbacks","_step","_iterator","console","_CancelablePromiseInt","subClass","superClass","create","_inherits","_super","iterable","makeAllCancelable","allSettled","any","race","reason","_default","onResult","arg","_step2","_iterator2","resolvable","___CSS_LOADER_URL_IMPORT_0___","___CSS_LOADER_URL_IMPORT_1___","___CSS_LOADER_EXPORT___","___CSS_LOADER_URL_REPLACEMENT_0___","___CSS_LOADER_URL_REPLACEMENT_1___","http","https","validateParams","cb","Stream","Readable","Writable","Duplex","Transform","PassThrough","finished","pipeline","ClientRequest","statusCodes","defaultProtocol","g","search","hostname","port","req","end","IncomingMessage","Agent","defaultMaxSockets","globalAgent","STATUS_CODES","METHODS","xhr","getXHR","XMLHttpRequest","XDomainRequest","checkTypeSupport","responseType","isFunction","ReadableStream","writableStream","WritableStream","abortController","arraybuffer","msstream","mozchunkedarraybuffer","overrideMimeType","capability","inherits","stream","rStates","readyStates","preferBinary","_opts","_body","_headers","auth","setHeader","Buffer","useFetch","mode","_mode","decideMode","_fetchTimer","_socketTimeout","_socketTimer","_onFinish","lowerName","unsafeHeaders","getHeader","removeHeader","_destroyed","timeout","setTimeout","headersObj","Blob","headersList","keyName","v","_fetchAbortController","requestTimeout","_fetchResponse","_resetTimers","_connect","_xhr","process","nextTick","ontimeout","setRequestHeader","_response","onreadystatechange","readyState","DONE","_onXHRProgress","onprogress","onerror","send","statusValid","_write","chunk","encoding","clearTimeout","destroy","once","flushHeaders","setNoDelay","setSocketKeepAlive","UNSENT","OPENED","HEADERS_RECEIVED","resetTimers","rawHeaders","trailers","rawTrailers","statusCode","statusMessage","statusText","write","_resumeFetch","pipeTo","reader","getReader","read","_pos","responseURL","getAllResponseHeaders","matches","_charset","mimeType","charsetMatch","_read","responseText","newData","substr","buffer","alloc","Uint8Array","MSStreamReader","byteLength","onload","readAsArrayBuffer","m","setUid","Ne","_entries","registerEntry","validateEntry","unregisterEntry","getEntryIndex","entries","getEntries","_nc_newfilemenu","C","P","Yt","log","d","pow","toFixed","parseFloat","toLocaleString","Z","DEFAULT","Qt","_action","validateAction","title","inline","renderInline","values","Dt","_nc_fileactions","N","SHARE","j","Y","oc","ir","_nc_dav_properties","_nc_dav_namespaces","prop","namespaces","V","L","sr","or","be","R","J","X","crtime","Q","NEW","FAILED","LOCKED","D","_data","_attributes","_knownDavService","updateMtime","deleteProperty","origin","pop","pathname","move","rename","ye","super","ee","te","ur","setHeaders","u","dr","ve","getcontentlength","Te","_views","_currentView","views","setActive","active","ar","_nc_navigation","Ie","_column","Ae","render","summary","S","O","RegExp","isExist","isEmptyObject","l","c","getValue","isName","getAllMatches","startIndex","lastIndex","nameRegexp","M","Oe","allowBooleanAttributes","unpairedTags","U","G","w","z","validate","trim","Re","xe","H","code","msg","line","tagClosed","tagName","tagStartPos","col","Ve","Ce","Pe","$e","Le","Fe","preserveOrder","attributeNamePrefix","attributesGroupName","textNodeName","ignoreAttributes","removeNSPrefix","parseTagValue","parseAttributeValue","trimValues","cdataPropName","numberParseOptions","hex","leadingZeros","eNotation","tagValueProcessor","attributeValueProcessor","stopNodes","alwaysCreateTextNode","commentPropName","processEntities","htmlEntities","ignoreDeclaration","ignorePiTags","transformTagName","transformAttributeName","updateTag","buildOptions","defaultOptions","Be","Xe","Ue","Ge","ze","He","Ke","We","je","Ye","Je","decimalPoint","B","T","tagname","child","addChild","tt","entityName","val","regx","entities","rt","skipLike","De","lastEntities","regex","st","replaceEntitiesValue","$","ot","charAt","ut","dt","resolveNameSpace","at","y","saveTextToParentTag","lastIndexOf","tagsNodeStack","x","tagExp","attrExpPresent","buildAttributesMap","closeIndex","docTypeEntities","parseTextData","rawTagName","isItStopNode","h","E","readStopNodeData","tagContent","_","lt","ft","ampEntity","ct","ht","pt","gt","ne","ie","Nt","bt","Et","prettify","yt","_t","currentNode","apos","quot","space","cent","pound","yen","euro","copyright","reg","inr","addExternalEntities","parseXml","vt","Tt","se","Pt","xt","oe","K","indentBy","suppressUnpairedNode","suppressEmptyNode","endsWith","suppressBooleanAttributes","Ft","format","Vt","oneListGroup","isAttribute","attrPrefixLen","St","processTextOrObjNode","Lt","indentate","Rt","tagEndChar","newLine","j2x","buildTextValNode","attrStr","buildObjectNode","repeat","arrayNodeName","buildAttrPairStr","closeTag","W","XMLParser","externalEntities","addEntity","XMLValidator","XMLBuilder","cr","_view","Ut","emptyView","sticky","expanded","Xt","hr","pr","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","getter","__esModule","definition","chunkId","Function","script","needAttach","scripts","getElementsByTagName","getAttribute","charset","setAttribute","src","onScriptComplete","prev","event","doneFns","parentNode","removeChild","head","nmd","children","scriptUrl","importScripts","currentScript","baseURI","installedChunks","installedChunkData","errorType","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"files-init.js?v=dfe9d5de499563483db0","mappings":";UAAIA,ECAAC,EACAC,4FCsBJ,SAAeC,EAAAA,EAAAA,MACbC,OAAO,SACPC,aACAC,QCCWC,EAAS,IAAIC,EAAAA,GAAW,CACjCC,GAAI,SACJC,YAAWA,CAACC,EAAOC,IACI,aAAZA,EAAKH,IACNI,EAAAA,EAAAA,IAAE,QAAS,uBACXA,EAAAA,EAAAA,IAAE,QAAS,UAErBC,cAAeA,uMAGfC,QAAQJ,GACGA,EAAMK,OAAS,GAAKL,EACtBM,KAAIC,GAAQA,EAAKC,cACjBC,OAAMC,GAAmD,IAApCA,EAAaC,EAAAA,GAAWC,UAEtD,UAAMC,CAAKN,GACP,IAMI,aALMO,EAAAA,EAAMC,OAAOR,EAAKS,gBAIxBC,EAAAA,EAAAA,IAAK,qBAAsBV,IACpB,CACX,CACA,MAAOW,GAEH,OADAC,EAAOD,MAAM,8BAA+B,CAAEA,QAAOE,O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Ua,EALVT,EAAWt/B,EAAK,GAChB4hC,EAAc5hC,EAAK,GACnB6hC,EAAU7hC,EAAK,GAGIwD,EAAI,EAC3B,GAAG87B,EAAS3gC,MAAM1D,GAAgC,IAAxBqmC,EAAgBrmC,KAAa,CACtD,IAAIikC,KAAY0C,EACZ3C,EAAoB3hB,EAAEskB,EAAa1C,KACrCD,EAAoB9R,EAAE+R,GAAY0C,EAAY1C,IAGhD,GAAG2C,EAAS,IAAIriC,EAASqiC,EAAQ5C,EAClC,CAEA,IADG0C,GAA4BA,EAA2B3hC,GACrDwD,EAAI87B,EAAS9jC,OAAQgI,IACzBu8B,EAAUT,EAAS97B,GAChBy7B,EAAoB3hB,EAAEgkB,EAAiBvB,IAAYuB,EAAgBvB,IACrEuB,EAAgBvB,GAAS,KAE1BuB,EAAgBvB,GAAW,EAE5B,OAAOd,EAAoBrM,EAAEpzB,EAAO,EAGjCsiC,EAAqBp4B,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1Fo4B,EAAmB32B,QAAQu2B,EAAqB73B,KAAK,KAAM,IAC3Di4B,EAAmB76B,KAAOy6B,EAAqB73B,KAAK,KAAMi4B,EAAmB76B,KAAK4C,KAAKi4B,QCvFvF7C,EAAoB9xB,QAAKzO,ECGzB,IAAIqjC,EAAsB9C,EAAoBrM,OAAEl0B,EAAW,CAAC,OAAO,IAAOugC,EAAoB,SAC9F8C,EAAsB9C,EAAoBrM,EAAEmP","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/files/src/logger.js","webpack:///nextcloud/apps/files/src/actions/deleteAction.ts","webpack:///nextcloud/apps/files/src/actions/downloadAction.ts","webpack:///nextcloud/apps/files/src/actions/editLocallyAction.ts","webpack:///nextcloud/apps/files/src/actions/favoriteAction.ts","webpack://nextcloud/./node_modules/@nextcloud/dialogs/dist/style.css?d87c","webpack:///nextcloud/node_modules/axios/index.js","webpack:///nextcloud/apps/files/src/actions/moveOrCopyActionUtils.ts","webpack:///nextcloud/apps/files/src/utils/fileUtils.ts","webpack:///nextcloud/apps/files/src/actions/moveOrCopyAction.ts","webpack:///nextcloud/apps/files/src/actions/openFolderAction.ts","webpack:///nextcloud/apps/files/src/actions/openInFilesAction.ts","webpack:///nextcloud/apps/files/src/actions/renameAction.ts","webpack:///nextcloud/apps/files/src/actions/sidebarAction.ts","webpack:///nextcloud/apps/files/src/actions/viewInFolderAction.ts","webpack:///nextcloud/apps/files/src/newMenu/newFolder.ts","webpack:///nextcloud/node_modules/@buttercup/fetch/dist/index.browser.js","webpack:///nextcloud/node_modules/hot-patcher/dist/patcher.js","webpack:///nextcloud/node_modules/hot-patcher/dist/functions.js","webpack:///nextcloud/node_modules/webdav/dist/node/compat/patcher.js","webpack:///nextcloud/node_modules/webdav/dist/node/auth/digest.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/crypto.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/merge.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/headers.js","webpack:///nextcloud/node_modules/webdav/dist/node/compat/arrayBuffer.js","webpack:///nextcloud/node_modules/webdav/dist/node/request.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/body.js","webpack:///nextcloud/node_modules/webdav/dist/node/compat/buffer.js","webpack:///nextcloud/apps/files/src/services/WebdavClient.ts","webpack:///nextcloud/apps/files/src/utils/hashUtils.ts","webpack:///nextcloud/apps/files/src/services/Files.ts","webpack:///nextcloud/apps/files/src/services/Favorites.ts","webpack:///nextcloud/apps/files/src/views/favorites.ts","webpack:///nextcloud/apps/files/src/services/Recent.ts","webpack:///nextcloud/apps/files/src/views/TemplatePicker.vue","webpack:///nextcloud/apps/files/src/utils/davUtils.js","webpack:///nextcloud/apps/files/src/components/TemplatePreview.vue?vue&type=script&lang=js","webpack:///nextcloud/apps/files/src/components/TemplatePreview.vue","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue?af18","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue?81db","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue?c414","webpack:///nextcloud/apps/files/src/views/TemplatePicker.vue?vue&type=script&lang=ts","webpack:///nextcloud/apps/files/src/services/Templates.js","webpack://nextcloud/./apps/files/src/views/TemplatePicker.vue?0681","webpack://nextcloud/./apps/files/src/views/TemplatePicker.vue?afd8","webpack:///nextcloud/apps/files/src/init-templates.ts","webpack:///nextcloud/apps/files/src/init.ts","webpack:///nextcloud/apps/files/src/views/files.ts","webpack:///nextcloud/apps/files/src/views/recent.ts","webpack:///nextcloud/apps/files/src/services/ServiceWorker.js","webpack:///nextcloud/apps/files/src/services/LivePhotos.ts","webpack:///nextcloud/node_modules/builtin-status-codes/browser.js","webpack:///nextcloud/node_modules/cancelable-promise/umd/CancelablePromise.js","webpack:///nextcloud/node_modules/@nextcloud/dialogs/dist/style.css","webpack:///nextcloud/apps/files/src/components/TemplatePreview.vue?vue&type=style&index=0&id=0859a92c&prod&lang=scss&scoped=true","webpack:///nextcloud/apps/files/src/views/TemplatePicker.vue?vue&type=style&index=0&id=48121b39&prod&lang=scss&scoped=true","webpack:///nextcloud/node_modules/https-browserify/index.js","webpack:///nextcloud/node_modules/readable-stream/readable-browser.js","webpack:///nextcloud/node_modules/stream-http/index.js","webpack:///nextcloud/node_modules/stream-http/lib/capability.js","webpack:///nextcloud/node_modules/stream-http/lib/request.js","webpack:///nextcloud/node_modules/stream-http/lib/response.js","webpack:///nextcloud/node_modules/xtend/immutable.js","webpack:///nextcloud/node_modules/@nextcloud/files/dist/index.mjs","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { emit } from '@nextcloud/event-bus';\nimport { Permission, Node, View, FileAction } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport TrashCanSvg from '@mdi/svg/svg/trash-can.svg?raw';\nimport logger from '../logger.js';\nexport const action = new FileAction({\n id: 'delete',\n displayName(nodes, view) {\n return view.id === 'trashbin'\n ? t('files', 'Delete permanently')\n : t('files', 'Delete');\n },\n iconSvgInline: () => {\n return TrashCanSvg;\n },\n enabled(nodes) {\n return nodes.length > 0 && nodes\n .map(node => node.permissions)\n .every(permission => (permission & Permission.DELETE) !== 0);\n },\n async exec(node) {\n try {\n await axios.delete(node.encodedSource);\n // Let's delete even if it's moved to the trashbin\n // since it has been removed from the current view\n // and changing the view will trigger a reload anyway.\n emit('files:node:deleted', node);\n return true;\n }\n catch (error) {\n logger.error('Error while deleting a file', { error, source: node.source, node });\n return false;\n }\n },\n async execBatch(nodes, view, dir) {\n return Promise.all(nodes.map(node => this.exec(node, view, dir)));\n },\n order: 100,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { generateUrl } from '@nextcloud/router';\nimport { FileAction, Permission, Node, FileType, View } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport ArrowDownSvg from '@mdi/svg/svg/arrow-down.svg?raw';\nconst triggerDownload = function (url) {\n const hiddenElement = document.createElement('a');\n hiddenElement.download = '';\n hiddenElement.href = url;\n hiddenElement.click();\n};\nconst downloadNodes = function (dir, nodes) {\n const secret = Math.random().toString(36).substring(2);\n const url = generateUrl('/apps/files/ajax/download.php?dir={dir}&files={files}&downloadStartSecret={secret}', {\n dir,\n secret,\n files: JSON.stringify(nodes.map(node => node.basename)),\n });\n triggerDownload(url);\n};\nconst isDownloadable = function (node) {\n if ((node.permissions & Permission.READ) === 0) {\n return false;\n }\n // If the mount type is a share, ensure it got download permissions.\n if (node.attributes['mount-type'] === 'shared') {\n const downloadAttribute = JSON.parse(node.attributes['share-attributes']).find((attribute) => attribute.scope === 'permissions' && attribute.key === 'download');\n if (downloadAttribute !== undefined && downloadAttribute.enabled === false) {\n return false;\n }\n }\n return true;\n};\nexport const action = new FileAction({\n id: 'download',\n displayName: () => t('files', 'Download'),\n iconSvgInline: () => ArrowDownSvg,\n enabled(nodes) {\n if (nodes.length === 0) {\n return false;\n }\n // We can download direct dav files. But if we have\n // some folders, we need to use the /apps/files/ajax/download.php\n // endpoint, which only supports user root folder.\n if (nodes.some(node => node.type === FileType.Folder)\n && nodes.some(node => !node.root?.startsWith('/files'))) {\n return false;\n }\n return nodes.every(isDownloadable);\n },\n async exec(node, view, dir) {\n if (node.type === FileType.Folder) {\n downloadNodes(dir, [node]);\n return null;\n }\n triggerDownload(node.encodedSource);\n return null;\n },\n async execBatch(nodes, view, dir) {\n if (nodes.length === 1) {\n this.exec(nodes[0], view, dir);\n return [null];\n }\n downloadNodes(dir, nodes);\n return new Array(nodes.length).fill(null);\n },\n order: 30,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { encodePath } from '@nextcloud/paths';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { FileAction, Permission } from '@nextcloud/files';\nimport { showError } from '@nextcloud/dialogs';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport LaptopSvg from '@mdi/svg/svg/laptop.svg?raw';\nconst openLocalClient = async function (path) {\n const link = generateOcsUrl('apps/files/api/v1') + '/openlocaleditor?format=json';\n try {\n const result = await axios.post(link, { path });\n const uid = getCurrentUser()?.uid;\n let url = `nc://open/${uid}@` + window.location.host + encodePath(path);\n url += '?token=' + result.data.ocs.data.token;\n window.location.href = url;\n }\n catch (error) {\n showError(t('files', 'Failed to redirect to client'));\n }\n};\nexport const action = new FileAction({\n id: 'edit-locally',\n displayName: () => t('files', 'Edit locally'),\n iconSvgInline: () => LaptopSvg,\n // Only works on single files\n enabled(nodes) {\n // Only works on single node\n if (nodes.length !== 1) {\n return false;\n }\n return (nodes[0].permissions & Permission.UPDATE) !== 0;\n },\n async exec(node) {\n openLocalClient(node.path);\n return null;\n },\n order: 25,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { emit } from '@nextcloud/event-bus';\nimport { generateUrl } from '@nextcloud/router';\nimport { Permission, View, FileAction } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport Vue from 'vue';\nimport StarOutlineSvg from '@mdi/svg/svg/star-outline.svg?raw';\nimport StarSvg from '@mdi/svg/svg/star.svg?raw';\nimport logger from '../logger.js';\nimport { encodePath } from '@nextcloud/paths';\n// If any of the nodes is not favorited, we display the favorite action.\nconst shouldFavorite = (nodes) => {\n return nodes.some(node => node.attributes.favorite !== 1);\n};\nexport const favoriteNode = async (node, view, willFavorite) => {\n try {\n // TODO: migrate to webdav tags plugin\n const url = generateUrl('/apps/files/api/v1/files') + encodePath(node.path);\n await axios.post(url, {\n tags: willFavorite\n ? [window.OC.TAG_FAVORITE]\n : [],\n });\n // Let's delete if we are in the favourites view\n // AND if it is removed from the user favorites\n // AND it's in the root of the favorites view\n if (view.id === 'favorites' && !willFavorite && node.dirname === '/') {\n emit('files:node:deleted', node);\n }\n // Update the node webdav attribute\n Vue.set(node.attributes, 'favorite', willFavorite ? 1 : 0);\n // Dispatch event to whoever is interested\n if (willFavorite) {\n emit('files:favorites:added', node);\n }\n else {\n emit('files:favorites:removed', node);\n }\n return true;\n }\n catch (error) {\n const action = willFavorite ? 'adding a file to favourites' : 'removing a file from favourites';\n logger.error('Error while ' + action, { error, source: node.source, node });\n return false;\n }\n};\nexport const action = new FileAction({\n id: 'favorite',\n displayName(nodes) {\n return shouldFavorite(nodes)\n ? t('files', 'Add to favorites')\n : t('files', 'Remove from favorites');\n },\n iconSvgInline: (nodes) => {\n return shouldFavorite(nodes)\n ? StarOutlineSvg\n : StarSvg;\n },\n enabled(nodes) {\n // We can only favorite nodes within files and with permissions\n return !nodes.some(node => !node.root?.startsWith?.('/files'))\n && nodes.every(node => node.permissions !== Permission.NONE);\n },\n async exec(node, view) {\n const willFavorite = shouldFavorite([node]);\n return await favoriteNode(node, view, willFavorite);\n },\n async execBatch(nodes, view) {\n const willFavorite = shouldFavorite(nodes);\n return Promise.all(nodes.map(async (node) => await favoriteNode(node, view, willFavorite)));\n },\n order: -50,\n});\n","\n import API from \"!../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../css-loader/dist/cjs.js!./style.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../css-loader/dist/cjs.js!./style.css\";\n export default content && content.locals ? content.locals : undefined;\n","import axios from './lib/axios.js';\n\n// This module is intended to unwrap Axios default export as named.\n// Keep top-level export same with static properties\n// so that it can keep same with es module or cjs\nconst {\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n} = axios;\n\nexport {\n axios as default,\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n}\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport '@nextcloud/dialogs/style.css';\nimport { Permission } from '@nextcloud/files';\nimport PQueue from 'p-queue';\n// This is the processing queue. We only want to allow 3 concurrent requests\nlet queue;\n/**\n * Get the processing queue\n */\nexport const getQueue = () => {\n if (!queue) {\n queue = new PQueue({ concurrency: 3 });\n }\n return queue;\n};\nexport var MoveCopyAction;\n(function (MoveCopyAction) {\n MoveCopyAction[\"MOVE\"] = \"Move\";\n MoveCopyAction[\"COPY\"] = \"Copy\";\n MoveCopyAction[\"MOVE_OR_COPY\"] = \"move-or-copy\";\n})(MoveCopyAction || (MoveCopyAction = {}));\nexport const canMove = (nodes) => {\n const minPermission = nodes.reduce((min, node) => Math.min(min, node.permissions), Permission.ALL);\n return (minPermission & Permission.UPDATE) !== 0;\n};\nexport const canDownload = (nodes) => {\n return nodes.every(node => {\n const shareAttributes = JSON.parse(node.attributes?.['share-attributes'] ?? '[]');\n return !shareAttributes.some(attribute => attribute.scope === 'permissions' && attribute.enabled === false && attribute.key === 'download');\n });\n};\nexport const canCopy = (nodes) => {\n // For now the only restriction is that a shared file\n // cannot be copied if the download is disabled\n return canDownload(nodes);\n};\n","/**\n * @copyright Copyright (c) 2021 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { FileType } from '@nextcloud/files';\nimport { translate as t, translatePlural as n } from '@nextcloud/l10n';\nimport { basename, extname } from 'path';\n// TODO: move to @nextcloud/files\n/**\n * Create an unique file name\n * @param name The initial name to use\n * @param otherNames Other names that are already used\n * @param suffix A function that takes an index an returns a suffix to add, defaults to '(index)'\n * @return Either the initial name, if unique, or the name with the suffix so that the name is unique\n */\nexport const getUniqueName = (name, otherNames, suffix = (n) => `(${n})`) => {\n let newName = name;\n let i = 1;\n while (otherNames.includes(newName)) {\n const ext = extname(name);\n newName = `${basename(name, ext)} ${suffix(i++)}${ext}`;\n }\n return newName;\n};\nexport const encodeFilePath = function (path) {\n const pathSections = (path.startsWith('/') ? path : `/${path}`).split('/');\n let relativePath = '';\n pathSections.forEach((section) => {\n if (section !== '') {\n relativePath += '/' + encodeURIComponent(section);\n }\n });\n return relativePath;\n};\n/**\n * Extract dir and name from file path\n *\n * @param {string} path the full path\n * @return {string[]} [dirPath, fileName]\n */\nexport const extractFilePaths = function (path) {\n const pathSections = path.split('/');\n const fileName = pathSections[pathSections.length - 1];\n const dirPath = pathSections.slice(0, pathSections.length - 1).join('/');\n return [dirPath, fileName];\n};\n/**\n * Generate a translated summary of an array of nodes\n * @param {Node[]} nodes the nodes to summarize\n * @return {string}\n */\nexport const getSummaryFor = (nodes) => {\n const fileCount = nodes.filter(node => node.type === FileType.File).length;\n const folderCount = nodes.filter(node => node.type === FileType.Folder).length;\n if (fileCount === 0) {\n return n('files', '{folderCount} folder', '{folderCount} folders', folderCount, { folderCount });\n }\n else if (folderCount === 0) {\n return n('files', '{fileCount} file', '{fileCount} files', fileCount, { fileCount });\n }\n if (fileCount === 1) {\n return n('files', '1 file and {folderCount} folder', '1 file and {folderCount} folders', folderCount, { folderCount });\n }\n if (folderCount === 1) {\n return n('files', '{fileCount} file and 1 folder', '{fileCount} files and 1 folder', fileCount, { fileCount });\n }\n return t('files', '{fileCount} files and {folderCount} folders', { fileCount, folderCount });\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport '@nextcloud/dialogs/style.css';\n// eslint-disable-next-line n/no-extraneous-import\nimport { AxiosError } from 'axios';\nimport { basename, join } from 'path';\nimport { emit } from '@nextcloud/event-bus';\nimport { FilePickerClosed, getFilePickerBuilder, showError } from '@nextcloud/dialogs';\nimport { Permission, FileAction, FileType, NodeStatus, davGetClient, davRootPath, davResultToNode, davGetDefaultPropfind } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport Vue from 'vue';\nimport CopyIconSvg from '@mdi/svg/svg/folder-multiple.svg?raw';\nimport FolderMoveSvg from '@mdi/svg/svg/folder-move.svg?raw';\nimport { MoveCopyAction, canCopy, canMove, getQueue } from './moveOrCopyActionUtils';\nimport logger from '../logger';\nimport { getUniqueName } from '../utils/fileUtils';\n/**\n * Return the action that is possible for the given nodes\n * @param {Node[]} nodes The nodes to check against\n * @return {MoveCopyAction} The action that is possible for the given nodes\n */\nconst getActionForNodes = (nodes) => {\n if (canMove(nodes)) {\n if (canCopy(nodes)) {\n return MoveCopyAction.MOVE_OR_COPY;\n }\n return MoveCopyAction.MOVE;\n }\n // Assuming we can copy as the enabled checks for copy permissions\n return MoveCopyAction.COPY;\n};\n/**\n * Handle the copy/move of a node to a destination\n * This can be imported and used by other scripts/components on server\n * @param {Node} node The node to copy/move\n * @param {Folder} destination The destination to copy/move the node to\n * @param {MoveCopyAction} method The method to use for the copy/move\n * @param {boolean} overwrite Whether to overwrite the destination if it exists\n * @return {Promise} A promise that resolves when the copy/move is done\n */\nexport const handleCopyMoveNodeTo = async (node, destination, method, overwrite = false) => {\n if (!destination) {\n return;\n }\n if (destination.type !== FileType.Folder) {\n throw new Error(t('files', 'Destination is not a folder'));\n }\n // Do not allow to MOVE a node to the same folder it is already located\n if (method === MoveCopyAction.MOVE && node.dirname === destination.path) {\n throw new Error(t('files', 'This file/folder is already in that directory'));\n }\n /**\n * Example:\n * - node: /foo/bar/file.txt -> path = /foo/bar/file.txt, destination: /foo\n * Allow move of /foo does not start with /foo/bar/file.txt so allow\n * - node: /foo , destination: /foo/bar\n * Do not allow as it would copy foo within itself\n * - node: /foo/bar.txt, destination: /foo\n * Allow copy a file to the same directory\n * - node: \"/foo/bar\", destination: \"/foo/bar 1\"\n * Allow to move or copy but we need to check with trailing / otherwise it would report false positive\n */\n if (`${destination.path}/`.startsWith(`${node.path}/`)) {\n throw new Error(t('files', 'You cannot move a file/folder onto itself or into a subfolder of itself'));\n }\n // Set loading state\n Vue.set(node, 'status', NodeStatus.LOADING);\n const queue = getQueue();\n return await queue.add(async () => {\n const copySuffix = (index) => {\n if (index === 1) {\n return t('files', '(copy)'); // TRANSLATORS: Mark a file as a copy of another file\n }\n return t('files', '(copy %n)', undefined, index); // TRANSLATORS: Meaning it is the n'th copy of a file\n };\n try {\n const client = davGetClient();\n const currentPath = join(davRootPath, node.path);\n const destinationPath = join(davRootPath, destination.path);\n if (method === MoveCopyAction.COPY) {\n let target = node.basename;\n // If we do not allow overwriting then find an unique name\n if (!overwrite) {\n const otherNodes = await client.getDirectoryContents(destinationPath);\n target = getUniqueName(node.basename, otherNodes.map((n) => n.basename), copySuffix);\n }\n await client.copyFile(currentPath, join(destinationPath, target));\n // If the node is copied into current directory the view needs to be updated\n if (node.dirname === destination.path) {\n const { data } = await client.stat(join(destinationPath, target), {\n details: true,\n data: davGetDefaultPropfind(),\n });\n emit('files:node:created', davResultToNode(data));\n }\n }\n else {\n await client.moveFile(currentPath, join(destinationPath, node.basename));\n // Delete the node as it will be fetched again\n // when navigating to the destination folder\n emit('files:node:deleted', node);\n }\n }\n catch (error) {\n if (error instanceof AxiosError) {\n if (error?.response?.status === 412) {\n throw new Error(t('files', 'A file or folder with that name already exists in this folder'));\n }\n else if (error?.response?.status === 423) {\n throw new Error(t('files', 'The files is locked'));\n }\n else if (error?.response?.status === 404) {\n throw new Error(t('files', 'The file does not exist anymore'));\n }\n else if (error.message) {\n throw new Error(error.message);\n }\n }\n logger.debug(error);\n throw new Error();\n }\n finally {\n Vue.set(node, 'status', undefined);\n }\n });\n};\n/**\n * Open a file picker for the given action\n * @param {MoveCopyAction} action The action to open the file picker for\n * @param {string} dir The directory to start the file picker in\n * @param {Node[]} nodes The nodes to move/copy\n * @return {Promise} The picked destination\n */\nconst openFilePickerForAction = async (action, dir = '/', nodes) => {\n const fileIDs = nodes.map(node => node.fileid).filter(Boolean);\n const filePicker = getFilePickerBuilder(t('files', 'Choose destination'))\n .allowDirectories(true)\n .setFilter((n) => {\n // We only want to show folders that we can create nodes in\n return (n.permissions & Permission.CREATE) !== 0\n // We don't want to show the current nodes in the file picker\n && !fileIDs.includes(n.fileid);\n })\n .setMimeTypeFilter([])\n .setMultiSelect(false)\n .startAt(dir);\n return new Promise((resolve, reject) => {\n filePicker.setButtonFactory((_selection, path) => {\n const buttons = [];\n const target = basename(path);\n const dirnames = nodes.map(node => node.dirname);\n const paths = nodes.map(node => node.path);\n if (action === MoveCopyAction.COPY || action === MoveCopyAction.MOVE_OR_COPY) {\n buttons.push({\n label: target ? t('files', 'Copy to {target}', { target }) : t('files', 'Copy'),\n type: 'primary',\n icon: CopyIconSvg,\n async callback(destination) {\n resolve({\n destination: destination[0],\n action: MoveCopyAction.COPY,\n });\n },\n });\n }\n // Invalid MOVE targets (but valid copy targets)\n if (dirnames.includes(path)) {\n // This file/folder is already in that directory\n return buttons;\n }\n if (paths.includes(path)) {\n // You cannot move a file/folder onto itself\n return buttons;\n }\n if (action === MoveCopyAction.MOVE || action === MoveCopyAction.MOVE_OR_COPY) {\n buttons.push({\n label: target ? t('files', 'Move to {target}', { target }) : t('files', 'Move'),\n type: action === MoveCopyAction.MOVE ? 'primary' : 'secondary',\n icon: FolderMoveSvg,\n async callback(destination) {\n resolve({\n destination: destination[0],\n action: MoveCopyAction.MOVE,\n });\n },\n });\n }\n return buttons;\n });\n const picker = filePicker.build();\n picker.pick().catch((error) => {\n logger.debug(error);\n if (error instanceof FilePickerClosed) {\n reject(new Error(t('files', 'Cancelled move or copy operation')));\n }\n else {\n reject(new Error(t('files', 'Move or copy operation failed')));\n }\n });\n });\n};\nexport const action = new FileAction({\n id: 'move-copy',\n displayName(nodes) {\n switch (getActionForNodes(nodes)) {\n case MoveCopyAction.MOVE:\n return t('files', 'Move');\n case MoveCopyAction.COPY:\n return t('files', 'Copy');\n case MoveCopyAction.MOVE_OR_COPY:\n return t('files', 'Move or copy');\n }\n },\n iconSvgInline: () => FolderMoveSvg,\n enabled(nodes) {\n // We only support moving/copying files within the user folder\n if (!nodes.every(node => node.root?.startsWith('/files/'))) {\n return false;\n }\n return nodes.length > 0 && (canMove(nodes) || canCopy(nodes));\n },\n async exec(node, view, dir) {\n const action = getActionForNodes([node]);\n let result;\n try {\n result = await openFilePickerForAction(action, dir, [node]);\n }\n catch (e) {\n logger.error(e);\n return false;\n }\n try {\n await handleCopyMoveNodeTo(node, result.destination, result.action);\n return true;\n }\n catch (error) {\n if (error instanceof Error && !!error.message) {\n showError(error.message);\n // Silent action as we handle the toast\n return null;\n }\n return false;\n }\n },\n async execBatch(nodes, view, dir) {\n const action = getActionForNodes(nodes);\n const result = await openFilePickerForAction(action, dir, nodes);\n const promises = nodes.map(async (node) => {\n try {\n await handleCopyMoveNodeTo(node, result.destination, result.action);\n return true;\n }\n catch (error) {\n logger.error(`Failed to ${result.action} node`, { node, error });\n return false;\n }\n });\n // We need to keep the selection on error!\n // So we do not return null, and for batch action\n // we let the front handle the error.\n return await Promise.all(promises);\n },\n order: 15,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { Permission, Node, FileType, View, FileAction, DefaultType } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport FolderSvg from '@mdi/svg/svg/folder.svg?raw';\nexport const action = new FileAction({\n id: 'open-folder',\n displayName(files) {\n // Only works on single node\n const displayName = files[0].attributes.displayName || files[0].basename;\n return t('files', 'Open folder {displayName}', { displayName });\n },\n iconSvgInline: () => FolderSvg,\n enabled(nodes) {\n // Only works on single node\n if (nodes.length !== 1) {\n return false;\n }\n const node = nodes[0];\n if (!node.isDavRessource) {\n return false;\n }\n return node.type === FileType.Folder\n && (node.permissions & Permission.READ) !== 0;\n },\n async exec(node, view) {\n if (!node || node.type !== FileType.Folder) {\n return false;\n }\n window.OCP.Files.Router.goToRoute(null, { view: view.id, fileid: node.fileid }, { dir: node.path });\n return null;\n },\n // Main action if enabled, meaning folders only\n default: DefaultType.HIDDEN,\n order: -100,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { translate as t } from '@nextcloud/l10n';\nimport { FileType, FileAction, DefaultType } from '@nextcloud/files';\n/**\n * TODO: Move away from a redirect and handle\n * navigation straight out of the recent view\n */\nexport const action = new FileAction({\n id: 'open-in-files-recent',\n displayName: () => t('files', 'Open in Files'),\n iconSvgInline: () => '',\n enabled: (nodes, view) => view.id === 'recent',\n async exec(node) {\n let dir = node.dirname;\n if (node.type === FileType.Folder) {\n dir = dir + '/' + node.basename;\n }\n window.OCP.Files.Router.goToRoute(null, // use default route\n { view: 'files', fileid: node.fileid }, { dir });\n return null;\n },\n // Before openFolderAction\n order: -1000,\n default: DefaultType.HIDDEN,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { emit } from '@nextcloud/event-bus';\nimport { Permission, FileAction } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport PencilSvg from '@mdi/svg/svg/pencil.svg?raw';\nexport const ACTION_DETAILS = 'details';\nexport const action = new FileAction({\n id: 'rename',\n displayName: () => t('files', 'Rename'),\n iconSvgInline: () => PencilSvg,\n enabled: (nodes) => {\n return nodes.length > 0 && nodes\n .map(node => node.permissions)\n .every(permission => (permission & Permission.UPDATE) !== 0);\n },\n async exec(node) {\n // Renaming is a built-in feature of the files app\n emit('files:node:rename', node);\n return null;\n },\n order: 10,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { Permission, View, FileAction, FileType } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport InformationSvg from '@mdi/svg/svg/information-variant.svg?raw';\nimport logger from '../logger.js';\nexport const ACTION_DETAILS = 'details';\nexport const action = new FileAction({\n id: ACTION_DETAILS,\n displayName: () => t('files', 'Open details'),\n iconSvgInline: () => InformationSvg,\n // Sidebar currently supports user folder only, /files/USER\n enabled: (nodes) => {\n // Only works on single node\n if (nodes.length !== 1) {\n return false;\n }\n if (!nodes[0]) {\n return false;\n }\n // Only work if the sidebar is available\n if (!window?.OCA?.Files?.Sidebar) {\n return false;\n }\n return (nodes[0].root?.startsWith('/files/') && nodes[0].permissions !== Permission.NONE) ?? false;\n },\n async exec(node, view, dir) {\n try {\n // TODO: migrate Sidebar to use a Node instead\n await window.OCA.Files.Sidebar.open(node.path);\n // Silently update current fileid\n window.OCP.Files.Router.goToRoute(null, { view: view.id, fileid: node.fileid }, { dir }, true);\n return null;\n }\n catch (error) {\n logger.error('Error while opening sidebar', { error });\n return false;\n }\n },\n order: -50,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { Node, FileType, Permission, View, FileAction } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport FolderMoveSvg from '@mdi/svg/svg/folder-move.svg?raw';\nexport const action = new FileAction({\n id: 'view-in-folder',\n displayName() {\n return t('files', 'View in folder');\n },\n iconSvgInline: () => FolderMoveSvg,\n enabled(nodes, view) {\n // Only works outside of the main files view\n if (view.id === 'files') {\n return false;\n }\n // Only works on single node\n if (nodes.length !== 1) {\n return false;\n }\n const node = nodes[0];\n if (!node.isDavRessource) {\n return false;\n }\n if (node.permissions === Permission.NONE) {\n return false;\n }\n return node.type === FileType.File;\n },\n async exec(node) {\n if (!node || node.type !== FileType.File) {\n return false;\n }\n window.OCP.Files.Router.goToRoute(null, { view: 'files', fileid: node.fileid }, { dir: node.dirname });\n return null;\n },\n order: 80,\n});\n","import { basename } from 'path';\nimport { emit } from '@nextcloud/event-bus';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { Permission, Folder } from '@nextcloud/files';\nimport { showSuccess } from '@nextcloud/dialogs';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport FolderPlusSvg from '@mdi/svg/svg/folder-plus.svg?raw';\nimport { getUniqueName } from '../utils/fileUtils.ts';\nimport logger from '../logger';\nconst createNewFolder = async (root, name) => {\n const source = root.source + '/' + name;\n const encodedSource = root.encodedSource + '/' + encodeURIComponent(name);\n const response = await axios({\n method: 'MKCOL',\n url: encodedSource,\n headers: {\n Overwrite: 'F',\n },\n });\n return {\n fileid: parseInt(response.headers['oc-fileid']),\n source,\n };\n};\nexport const entry = {\n id: 'newFolder',\n displayName: t('files', 'New folder'),\n enabled: (context) => (context.permissions & Permission.CREATE) !== 0,\n iconSvgInline: FolderPlusSvg,\n order: 0,\n async handler(context, content) {\n const contentNames = content.map((node) => node.basename);\n const name = getUniqueName(t('files', 'New folder'), contentNames);\n const { fileid, source } = await createNewFolder(context, name);\n // Create the folder in the store\n const folder = new Folder({\n source,\n id: fileid,\n mtime: new Date(),\n owner: getCurrentUser()?.uid || null,\n permissions: Permission.ALL,\n root: context?.root || '/files/' + getCurrentUser()?.uid,\n });\n showSuccess(t('files', 'Created new folder \"{name}\"', { name: basename(source) }));\n logger.debug('Created new folder', { folder, source });\n emit('files:node:created', folder);\n emit('files:node:rename', folder);\n },\n};\n","const inWebWorker = typeof WorkerGlobalScope !== \"undefined\" &&\n self instanceof WorkerGlobalScope;\nconst root = inWebWorker\n ? self\n : typeof window !== \"undefined\"\n ? window\n : globalThis;\nexport const fetch = root.fetch.bind(root);\nexport const Headers = root.Headers;\nexport const Request = root.Request;\nexport const Response = root.Response;\n","import { sequence } from \"./functions.js\";\nconst HOT_PATCHER_TYPE = \"@@HOTPATCHER\";\nconst NOOP = () => { };\nfunction createNewItem(method) {\n return {\n original: method,\n methods: [method],\n final: false\n };\n}\n/**\n * Hot patching manager class\n */\nexport class HotPatcher {\n constructor() {\n this._configuration = {\n registry: {},\n getEmptyAction: \"null\"\n };\n this.__type__ = HOT_PATCHER_TYPE;\n }\n /**\n * Configuration object reference\n * @readonly\n */\n get configuration() {\n return this._configuration;\n }\n /**\n * The action to take when a non-set method is requested\n * Possible values: null/throw\n */\n get getEmptyAction() {\n return this.configuration.getEmptyAction;\n }\n set getEmptyAction(newAction) {\n this.configuration.getEmptyAction = newAction;\n }\n /**\n * Control another hot-patcher instance\n * Force the remote instance to use patched methods from calling instance\n * @param target The target instance to control\n * @param allowTargetOverrides Allow the target to override patched methods on\n * the controller (default is false)\n * @returns Returns self\n * @throws {Error} Throws if the target is invalid\n */\n control(target, allowTargetOverrides = false) {\n if (!target || target.__type__ !== HOT_PATCHER_TYPE) {\n throw new Error(\"Failed taking control of target HotPatcher instance: Invalid type or object\");\n }\n Object.keys(target.configuration.registry).forEach(foreignKey => {\n if (this.configuration.registry.hasOwnProperty(foreignKey)) {\n if (allowTargetOverrides) {\n this.configuration.registry[foreignKey] = Object.assign({}, target.configuration.registry[foreignKey]);\n }\n }\n else {\n this.configuration.registry[foreignKey] = Object.assign({}, target.configuration.registry[foreignKey]);\n }\n });\n target._configuration = this.configuration;\n return this;\n }\n /**\n * Execute a patched method\n * @param key The method key\n * @param args Arguments to pass to the method (optional)\n * @see HotPatcher#get\n * @returns The output of the called method\n */\n execute(key, ...args) {\n const method = this.get(key) || NOOP;\n return method(...args);\n }\n /**\n * Get a method for a key\n * @param key The method key\n * @returns Returns the requested function or null if the function\n * does not exist and the host is configured to return null (and not throw)\n * @throws {Error} Throws if the configuration specifies to throw and the method\n * does not exist\n * @throws {Error} Throws if the `getEmptyAction` value is invalid\n */\n get(key) {\n const item = this.configuration.registry[key];\n if (!item) {\n switch (this.getEmptyAction) {\n case \"null\":\n return null;\n case \"throw\":\n throw new Error(`Failed handling method request: No method provided for override: ${key}`);\n default:\n throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`);\n }\n }\n return sequence(...item.methods);\n }\n /**\n * Check if a method has been patched\n * @param key The function key\n * @returns True if already patched\n */\n isPatched(key) {\n return !!this.configuration.registry[key];\n }\n /**\n * Patch a method name\n * @param key The method key to patch\n * @param method The function to set\n * @param opts Patch options\n * @returns Returns self\n */\n patch(key, method, opts = {}) {\n const { chain = false } = opts;\n if (this.configuration.registry[key] && this.configuration.registry[key].final) {\n throw new Error(`Failed patching '${key}': Method marked as being final`);\n }\n if (typeof method !== \"function\") {\n throw new Error(`Failed patching '${key}': Provided method is not a function`);\n }\n if (chain) {\n // Add new method to the chain\n if (!this.configuration.registry[key]) {\n // New key, create item\n this.configuration.registry[key] = createNewItem(method);\n }\n else {\n // Existing, push the method\n this.configuration.registry[key].methods.push(method);\n }\n }\n else {\n // Replace the original\n if (this.isPatched(key)) {\n const { original } = this.configuration.registry[key];\n this.configuration.registry[key] = Object.assign(createNewItem(method), {\n original\n });\n }\n else {\n this.configuration.registry[key] = createNewItem(method);\n }\n }\n return this;\n }\n /**\n * Patch a method inline, execute it and return the value\n * Used for patching contents of functions. This method will not apply a patched\n * function if it has already been patched, allowing for external overrides to\n * function. It also means that the function is cached so that it is not\n * instantiated every time the outer function is invoked.\n * @param key The function key to use\n * @param method The function to patch (once, only if not patched)\n * @param args Arguments to pass to the function\n * @returns The output of the patched function\n * @example\n * function mySpecialFunction(a, b) {\n * return hotPatcher.patchInline(\"func\", (a, b) => {\n * return a + b;\n * }, a, b);\n * }\n */\n patchInline(key, method, ...args) {\n if (!this.isPatched(key)) {\n this.patch(key, method);\n }\n return this.execute(key, ...args);\n }\n /**\n * Patch a method (or methods) in sequential-mode\n * See `patch()` with the option `chain: true`\n * @see patch\n * @param key The key to patch\n * @param methods The methods to patch\n * @returns Returns self\n */\n plugin(key, ...methods) {\n methods.forEach(method => {\n this.patch(key, method, { chain: true });\n });\n return this;\n }\n /**\n * Restore a patched method if it has been overridden\n * @param key The method key\n * @returns Returns self\n */\n restore(key) {\n if (!this.isPatched(key)) {\n throw new Error(`Failed restoring method: No method present for key: ${key}`);\n }\n else if (typeof this.configuration.registry[key].original !== \"function\") {\n throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${key}`);\n }\n this.configuration.registry[key].methods = [this.configuration.registry[key].original];\n return this;\n }\n /**\n * Set a method as being final\n * This sets a method as having been finally overridden. Attempts at overriding\n * again will fail with an error.\n * @param key The key to make final\n * @returns Returns self\n */\n setFinal(key) {\n if (!this.configuration.registry.hasOwnProperty(key)) {\n throw new Error(`Failed marking '${key}' as final: No method found for key`);\n }\n this.configuration.registry[key].final = true;\n return this;\n }\n}\n","export function sequence(...methods) {\n if (methods.length === 0) {\n throw new Error(\"Failed creating sequence: No functions provided\");\n }\n return function __executeSequence(...args) {\n let result = args;\n const _this = this;\n while (methods.length > 0) {\n const method = methods.shift();\n result = [method.apply(_this, result)];\n }\n return result[0];\n };\n}\n","import { HotPatcher } from \"hot-patcher\";\nlet __patcher = null;\nexport function getPatcher() {\n if (!__patcher) {\n __patcher = new HotPatcher();\n }\n return __patcher;\n}\n","import md5 from \"md5\";\nimport { ha1Compute } from \"../tools/crypto.js\";\nconst NONCE_CHARS = \"abcdef0123456789\";\nconst NONCE_SIZE = 32;\nexport function createDigestContext(username, password, ha1) {\n return { username, password, ha1, nc: 0, algorithm: \"md5\", hasDigestAuth: false };\n}\nexport function generateDigestAuthHeader(options, digest) {\n const url = options.url.replace(\"//\", \"\");\n const uri = url.indexOf(\"/\") == -1 ? \"/\" : url.slice(url.indexOf(\"/\"));\n const method = options.method ? options.method.toUpperCase() : \"GET\";\n const qop = /(^|,)\\s*auth\\s*($|,)/.test(digest.qop) ? \"auth\" : false;\n const ncString = `00000000${digest.nc}`.slice(-8);\n const ha1 = ha1Compute(digest.algorithm, digest.username, digest.realm, digest.password, digest.nonce, digest.cnonce, digest.ha1);\n const ha2 = md5(`${method}:${uri}`);\n const digestResponse = qop\n ? md5(`${ha1}:${digest.nonce}:${ncString}:${digest.cnonce}:${qop}:${ha2}`)\n : md5(`${ha1}:${digest.nonce}:${ha2}`);\n const authValues = {\n username: digest.username,\n realm: digest.realm,\n nonce: digest.nonce,\n uri,\n qop,\n response: digestResponse,\n nc: ncString,\n cnonce: digest.cnonce,\n algorithm: digest.algorithm,\n opaque: digest.opaque\n };\n const authHeader = [];\n for (const k in authValues) {\n if (authValues[k]) {\n if (k === \"qop\" || k === \"nc\" || k === \"algorithm\") {\n authHeader.push(`${k}=${authValues[k]}`);\n }\n else {\n authHeader.push(`${k}=\"${authValues[k]}\"`);\n }\n }\n }\n return `Digest ${authHeader.join(\", \")}`;\n}\nfunction makeNonce() {\n let uid = \"\";\n for (let i = 0; i < NONCE_SIZE; ++i) {\n uid = `${uid}${NONCE_CHARS[Math.floor(Math.random() * NONCE_CHARS.length)]}`;\n }\n return uid;\n}\nexport function parseDigestAuth(response, _digest) {\n const authHeader = (response.headers && response.headers.get(\"www-authenticate\")) || \"\";\n if (authHeader.split(/\\s/)[0].toLowerCase() !== \"digest\") {\n return false;\n }\n const re = /([a-z0-9_-]+)=(?:\"([^\"]+)\"|([a-z0-9_-]+))/gi;\n for (;;) {\n const match = re.exec(authHeader);\n if (!match) {\n break;\n }\n _digest[match[1]] = match[2] || match[3];\n }\n _digest.nc += 1;\n _digest.cnonce = makeNonce();\n return true;\n}\n","import md5 from \"md5\";\nexport function ha1Compute(algorithm, user, realm, pass, nonce, cnonce, ha1) {\n const ha1Hash = ha1 || md5(`${user}:${realm}:${pass}`);\n if (algorithm && algorithm.toLowerCase() === \"md5-sess\") {\n return md5(`${ha1Hash}:${nonce}:${cnonce}`);\n }\n return ha1Hash;\n}\n","export function cloneShallow(obj) {\n return isPlainObject(obj)\n ? Object.assign({}, obj)\n : Object.setPrototypeOf(Object.assign({}, obj), Object.getPrototypeOf(obj));\n}\nfunction isPlainObject(obj) {\n if (typeof obj !== \"object\" ||\n obj === null ||\n Object.prototype.toString.call(obj) != \"[object Object]\") {\n // Not an object\n return false;\n }\n if (Object.getPrototypeOf(obj) === null) {\n return true;\n }\n let proto = obj;\n // Find the prototype\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(obj) === proto;\n}\nexport function merge(...args) {\n let output = null, items = [...args];\n while (items.length > 0) {\n const nextItem = items.shift();\n if (!output) {\n output = cloneShallow(nextItem);\n }\n else {\n output = mergeObjects(output, nextItem);\n }\n }\n return output;\n}\nfunction mergeObjects(obj1, obj2) {\n const output = cloneShallow(obj1);\n Object.keys(obj2).forEach(key => {\n if (!output.hasOwnProperty(key)) {\n output[key] = obj2[key];\n return;\n }\n if (Array.isArray(obj2[key])) {\n output[key] = Array.isArray(output[key])\n ? [...output[key], ...obj2[key]]\n : [...obj2[key]];\n }\n else if (typeof obj2[key] === \"object\" && !!obj2[key]) {\n output[key] =\n typeof output[key] === \"object\" && !!output[key]\n ? mergeObjects(output[key], obj2[key])\n : cloneShallow(obj2[key]);\n }\n else {\n output[key] = obj2[key];\n }\n });\n return output;\n}\n","export function convertResponseHeaders(headers) {\n const output = {};\n for (const key of headers.keys()) {\n output[key] = headers.get(key);\n }\n return output;\n}\nexport function mergeHeaders(...headerPayloads) {\n if (headerPayloads.length === 0)\n return {};\n const headerKeys = {};\n return headerPayloads.reduce((output, headers) => {\n Object.keys(headers).forEach(header => {\n const lowerHeader = header.toLowerCase();\n if (headerKeys.hasOwnProperty(lowerHeader)) {\n output[headerKeys[lowerHeader]] = headers[header];\n }\n else {\n headerKeys[lowerHeader] = header;\n output[header] = headers[header];\n }\n });\n return output;\n }, {});\n}\n","const hasArrayBuffer = typeof ArrayBuffer === \"function\";\nconst { toString: objToString } = Object.prototype;\n// Taken from: https://github.com/fengyuanchen/is-array-buffer/blob/master/src/index.js\nexport function isArrayBuffer(value) {\n return (hasArrayBuffer &&\n (value instanceof ArrayBuffer || objToString.call(value) === \"[object ArrayBuffer]\"));\n}\n","import { Agent as HTTPAgent } from \"http\";\nimport { Agent as HTTPSAgent } from \"https\";\nimport { fetch } from \"@buttercup/fetch\";\nimport { getPatcher } from \"./compat/patcher.js\";\nimport { isWeb } from \"./compat/env.js\";\nimport { generateDigestAuthHeader, parseDigestAuth } from \"./auth/digest.js\";\nimport { cloneShallow, merge } from \"./tools/merge.js\";\nimport { mergeHeaders } from \"./tools/headers.js\";\nimport { requestDataToFetchBody } from \"./tools/body.js\";\nfunction _request(requestOptions) {\n const patcher = getPatcher();\n return patcher.patchInline(\"request\", (options) => patcher.patchInline(\"fetch\", fetch, options.url, getFetchOptions(options)), requestOptions);\n}\nfunction getFetchOptions(requestOptions) {\n let headers = {};\n // Handle standard options\n const opts = {\n method: requestOptions.method\n };\n if (requestOptions.headers) {\n headers = mergeHeaders(headers, requestOptions.headers);\n }\n if (typeof requestOptions.data !== \"undefined\") {\n const [body, newHeaders] = requestDataToFetchBody(requestOptions.data);\n opts.body = body;\n headers = mergeHeaders(headers, newHeaders);\n }\n if (requestOptions.signal) {\n opts.signal = requestOptions.signal;\n }\n if (requestOptions.withCredentials) {\n opts.credentials = \"include\";\n }\n // Check for node-specific options\n if (!isWeb()) {\n if (requestOptions.httpAgent || requestOptions.httpsAgent) {\n opts.agent = (parsedURL) => {\n if (parsedURL.protocol === \"http:\") {\n return requestOptions.httpAgent || new HTTPAgent();\n }\n return requestOptions.httpsAgent || new HTTPSAgent();\n };\n }\n }\n // Attach headers\n opts.headers = headers;\n return opts;\n}\nexport function prepareRequestOptions(requestOptions, context, userOptions) {\n const finalOptions = cloneShallow(requestOptions);\n finalOptions.headers = mergeHeaders(context.headers, finalOptions.headers || {}, userOptions.headers || {});\n if (typeof userOptions.data !== \"undefined\") {\n finalOptions.data = userOptions.data;\n }\n if (userOptions.signal) {\n finalOptions.signal = userOptions.signal;\n }\n if (context.httpAgent) {\n finalOptions.httpAgent = context.httpAgent;\n }\n if (context.httpsAgent) {\n finalOptions.httpsAgent = context.httpsAgent;\n }\n if (context.digest) {\n finalOptions._digest = context.digest;\n }\n if (typeof context.withCredentials === \"boolean\") {\n finalOptions.withCredentials = context.withCredentials;\n }\n return finalOptions;\n}\nexport async function request(requestOptions) {\n // Client not configured for digest authentication\n if (!requestOptions._digest) {\n return _request(requestOptions);\n }\n // Remove client's digest authentication object from request options\n const _digest = requestOptions._digest;\n delete requestOptions._digest;\n // If client is already using digest authentication, include the digest authorization header\n if (_digest.hasDigestAuth) {\n requestOptions = merge(requestOptions, {\n headers: {\n Authorization: generateDigestAuthHeader(requestOptions, _digest)\n }\n });\n }\n // Perform digest request + check\n const response = await _request(requestOptions);\n if (response.status == 401) {\n _digest.hasDigestAuth = parseDigestAuth(response, _digest);\n if (_digest.hasDigestAuth) {\n requestOptions = merge(requestOptions, {\n headers: {\n Authorization: generateDigestAuthHeader(requestOptions, _digest)\n }\n });\n const response2 = await _request(requestOptions);\n if (response2.status == 401) {\n _digest.hasDigestAuth = false;\n }\n else {\n _digest.nc++;\n }\n return response2;\n }\n }\n else {\n _digest.nc++;\n }\n return response;\n}\n","import Stream from \"stream\";\nimport { isArrayBuffer } from \"../compat/arrayBuffer.js\";\nimport { isBuffer } from \"../compat/buffer.js\";\nimport { isWeb } from \"../compat/env.js\";\nexport function requestDataToFetchBody(data) {\n if (!isWeb() && data instanceof Stream.Readable) {\n // @ts-ignore\n return [data, {}];\n }\n if (typeof data === \"string\") {\n return [data, {}];\n }\n else if (isBuffer(data)) {\n return [data, {}];\n }\n else if (isArrayBuffer(data)) {\n return [data, {}];\n }\n else if (data && typeof data === \"object\") {\n return [\n JSON.stringify(data),\n {\n \"content-type\": \"application/json\"\n }\n ];\n }\n throw new Error(`Unable to convert request body: Unexpected body type: ${typeof data}`);\n}\n","export function isBuffer(value) {\n return (value != null &&\n value.constructor != null &&\n typeof value.constructor.isBuffer === \"function\" &&\n value.constructor.isBuffer(value));\n}\n","import { createClient, getPatcher } from 'webdav';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser, getRequestToken } from '@nextcloud/auth';\nimport { request } from 'webdav/dist/node/request.js';\nexport const rootPath = `/files/${getCurrentUser()?.uid}`;\nexport const defaultRootUrl = generateRemoteUrl('dav' + rootPath);\nexport const getClient = (rootUrl = defaultRootUrl) => {\n const client = createClient(rootUrl, {\n headers: {\n requesttoken: getRequestToken() || '',\n },\n });\n /**\n * Allow to override the METHOD to support dav REPORT\n *\n * @see https://github.com/perry-mitchell/webdav-client/blob/8d9694613c978ce7404e26a401c39a41f125f87f/source/request.ts\n */\n const patcher = getPatcher();\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // https://github.com/perry-mitchell/hot-patcher/issues/6\n patcher.patch('request', (options) => {\n if (options.headers?.method) {\n options.method = options.headers.method;\n delete options.headers.method;\n }\n return request(options);\n });\n return client;\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nexport const hashCode = function (str) {\n return str.split('').reduce(function (a, b) {\n a = ((a << 5) - a) + b.charCodeAt(0);\n return a & a;\n }, 0);\n};\n","import { CancelablePromise } from 'cancelable-promise';\nimport { File, Folder, davParsePermissions, davGetDefaultPropfind } from '@nextcloud/files';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { getClient, rootPath } from './WebdavClient';\nimport { hashCode } from '../utils/hashUtils';\nimport logger from '../logger';\nconst client = getClient();\nexport const resultToNode = function (node) {\n const userId = getCurrentUser()?.uid;\n if (!userId) {\n throw new Error('No user id found');\n }\n const props = node.props;\n const permissions = davParsePermissions(props?.permissions);\n const owner = (props['owner-id'] || userId).toString();\n const source = generateRemoteUrl('dav' + rootPath + node.filename);\n const id = props?.fileid < 0\n ? hashCode(source)\n : props?.fileid || 0;\n const nodeData = {\n id,\n source,\n mtime: new Date(node.lastmod),\n mime: node.mime || 'application/octet-stream',\n size: props?.size || 0,\n permissions,\n owner,\n root: rootPath,\n attributes: {\n ...node,\n ...props,\n hasPreview: props?.['has-preview'],\n failed: props?.fileid < 0,\n },\n };\n delete nodeData.attributes.props;\n return node.type === 'file'\n ? new File(nodeData)\n : new Folder(nodeData);\n};\nexport const getContents = (path = '/') => {\n const controller = new AbortController();\n const propfindPayload = davGetDefaultPropfind();\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n onCancel(() => controller.abort());\n try {\n const contentsResponse = await client.getDirectoryContents(path, {\n details: true,\n data: propfindPayload,\n includeSelf: true,\n signal: controller.signal,\n });\n const root = contentsResponse.data[0];\n const contents = contentsResponse.data.slice(1);\n if (root.filename !== path) {\n throw new Error('Root node does not match requested path');\n }\n resolve({\n folder: resultToNode(root),\n contents: contents.map(result => {\n try {\n return resultToNode(result);\n }\n catch (error) {\n logger.error(`Invalid node detected '${result.basename}'`, { error });\n return null;\n }\n }).filter(Boolean),\n });\n }\n catch (error) {\n reject(error);\n }\n });\n};\n","import { Folder, getDavNameSpaces, getDavProperties, davGetDefaultPropfind } from '@nextcloud/files';\nimport { getClient } from './WebdavClient';\nimport { resultToNode } from './Files';\nconst client = getClient();\nconst reportPayload = `\n\n\t\n\t\t${getDavProperties()}\n\t\n\t\n\t\t1\n\t\n`;\nexport const getContents = async (path = '/') => {\n const propfindPayload = davGetDefaultPropfind();\n // Get root folder\n let rootResponse;\n if (path === '/') {\n rootResponse = await client.stat(path, {\n details: true,\n data: propfindPayload,\n });\n }\n const contentsResponse = await client.getDirectoryContents(path, {\n details: true,\n // Only filter favorites if we're at the root\n data: path === '/' ? reportPayload : propfindPayload,\n headers: {\n // Patched in WebdavClient.ts\n method: path === '/' ? 'REPORT' : 'PROPFIND',\n },\n includeSelf: true,\n });\n const root = rootResponse?.data || contentsResponse.data[0];\n const contents = contentsResponse.data.filter(node => node.filename !== path);\n return {\n folder: resultToNode(root),\n contents: contents.map(resultToNode),\n };\n};\n","import { subscribe } from '@nextcloud/event-bus';\nimport { FileType, View, getNavigation } from '@nextcloud/files';\nimport { loadState } from '@nextcloud/initial-state';\nimport { getLanguage, translate as t } from '@nextcloud/l10n';\nimport { basename } from 'path';\nimport FolderSvg from '@mdi/svg/svg/folder.svg?raw';\nimport StarSvg from '@mdi/svg/svg/star.svg?raw';\nimport { getContents } from '../services/Favorites';\nimport { hashCode } from '../utils/hashUtils';\nimport logger from '../logger';\nexport const generateFavoriteFolderView = function (folder, index = 0) {\n return new View({\n id: generateIdFromPath(folder.path),\n name: basename(folder.path),\n icon: FolderSvg,\n order: index,\n params: {\n dir: folder.path,\n fileid: folder.fileid.toString(),\n view: 'favorites',\n },\n parent: 'favorites',\n columns: [],\n getContents,\n });\n};\nexport const generateIdFromPath = function (path) {\n return `favorite-${hashCode(path)}`;\n};\nexport default () => {\n // Load state in function for mock testing purposes\n const favoriteFolders = loadState('files', 'favoriteFolders', []);\n const favoriteFoldersViews = favoriteFolders.map((folder, index) => generateFavoriteFolderView(folder, index));\n logger.debug('Generating favorites view', { favoriteFolders });\n const Navigation = getNavigation();\n Navigation.register(new View({\n id: 'favorites',\n name: t('files', 'Favorites'),\n caption: t('files', 'List of favorites files and folders.'),\n emptyTitle: t('files', 'No favorites yet'),\n emptyCaption: t('files', 'Files and folders you mark as favorite will show up here'),\n icon: StarSvg,\n order: 5,\n columns: [],\n getContents,\n }));\n favoriteFoldersViews.forEach(view => Navigation.register(view));\n /**\n * Update favourites navigation when a new folder is added\n */\n subscribe('files:favorites:added', (node) => {\n if (node.type !== FileType.Folder) {\n return;\n }\n // Sanity check\n if (node.path === null || !node.root?.startsWith('/files')) {\n logger.error('Favorite folder is not within user files root', { node });\n return;\n }\n addToFavorites(node);\n });\n /**\n * Remove favourites navigation when a folder is removed\n */\n subscribe('files:favorites:removed', (node) => {\n if (node.type !== FileType.Folder) {\n return;\n }\n // Sanity check\n if (node.path === null || !node.root?.startsWith('/files')) {\n logger.error('Favorite folder is not within user files root', { node });\n return;\n }\n removePathFromFavorites(node.path);\n });\n /**\n * Sort the favorites paths array and\n * update the order property of the existing views\n */\n const updateAndSortViews = function () {\n favoriteFolders.sort((a, b) => a.path.localeCompare(b.path, getLanguage(), { ignorePunctuation: true }));\n favoriteFolders.forEach((folder, index) => {\n const view = favoriteFoldersViews.find((view) => view.id === generateIdFromPath(folder.path));\n if (view) {\n view.order = index;\n }\n });\n };\n // Add a folder to the favorites paths array and update the views\n const addToFavorites = function (node) {\n const newFavoriteFolder = { path: node.path, fileid: node.fileid };\n const view = generateFavoriteFolderView(newFavoriteFolder);\n // Skip if already exists\n if (favoriteFolders.find((folder) => folder.path === node.path)) {\n return;\n }\n // Update arrays\n favoriteFolders.push(newFavoriteFolder);\n favoriteFoldersViews.push(view);\n // Update and sort views\n updateAndSortViews();\n Navigation.register(view);\n };\n // Remove a folder from the favorites paths array and update the views\n const removePathFromFavorites = function (path) {\n const id = generateIdFromPath(path);\n const index = favoriteFolders.findIndex((folder) => folder.path === path);\n // Skip if not exists\n if (index === -1) {\n return;\n }\n // Update arrays\n favoriteFolders.splice(index, 1);\n favoriteFoldersViews.splice(index, 1);\n // Update and sort views\n Navigation.remove(id);\n updateAndSortViews();\n };\n};\n","import { getCurrentUser } from '@nextcloud/auth';\nimport { Folder, Permission, davGetRecentSearch, davGetClient, davResultToNode, davRootPath, davRemoteURL } from '@nextcloud/files';\nconst client = davGetClient();\nconst lastTwoWeeksTimestamp = Math.round((Date.now() / 1000) - (60 * 60 * 24 * 14));\nexport const getContents = async (path = '/') => {\n const contentsResponse = await client.getDirectoryContents(path, {\n details: true,\n data: davGetRecentSearch(lastTwoWeeksTimestamp),\n headers: {\n // Patched in WebdavClient.ts\n method: 'SEARCH',\n // Somehow it's needed to get the correct response\n 'Content-Type': 'application/xml; charset=utf-8',\n },\n deep: true,\n });\n const contents = contentsResponse.data;\n return {\n folder: new Folder({\n id: 0,\n source: `${davRemoteURL}${davRootPath}`,\n root: davRootPath,\n owner: getCurrentUser()?.uid || null,\n permissions: Permission.READ,\n }),\n contents: contents.map((r) => davResultToNode(r)),\n };\n};\n","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return (_vm.opened)?_c('NcModal',{staticClass:\"templates-picker\",attrs:{\"clear-view-delay\":-1,\"size\":\"large\"},on:{\"close\":_vm.close}},[_c('form',{staticClass:\"templates-picker__form\",style:(_vm.style),on:{\"submit\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.onSubmit.apply(null, arguments)}}},[_c('h2',[_vm._v(_vm._s(_vm.t('files', 'Pick a template for {name}', { name: _vm.nameWithoutExt })))]),_vm._v(\" \"),_c('ul',{staticClass:\"templates-picker__list\"},[_c('TemplatePreview',_vm._b({attrs:{\"checked\":_vm.checked === _vm.emptyTemplate.fileid},on:{\"check\":_vm.onCheck}},'TemplatePreview',_vm.emptyTemplate,false)),_vm._v(\" \"),_vm._l((_vm.provider.templates),function(template){return _c('TemplatePreview',_vm._b({key:template.fileid,attrs:{\"checked\":_vm.checked === template.fileid,\"ratio\":_vm.provider.ratio},on:{\"check\":_vm.onCheck}},'TemplatePreview',template,false))})],2),_vm._v(\" \"),_c('div',{staticClass:\"templates-picker__buttons\"},[_c('input',{staticClass:\"primary\",attrs:{\"type\":\"submit\",\"aria-label\":_vm.t('files', 'Create a new file with the selected template')},domProps:{\"value\":_vm.t('files', 'Create')}})])]),_vm._v(\" \"),(_vm.loading)?_c('NcEmptyContent',{staticClass:\"templates-picker__loading\",attrs:{\"icon\":\"icon-loading\"}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('files', 'Creating file'))+\"\\n\\t\")]):_vm._e()],1):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright Copyright (c) 2019 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\n\nimport { generateRemoteUrl } from '@nextcloud/router'\nimport { getCurrentUser } from '@nextcloud/auth'\n\nexport const getRootPath = function() {\n\tif (getCurrentUser()) {\n\t\treturn generateRemoteUrl(`dav/files/${getCurrentUser().uid}`)\n\t} else {\n\t\treturn generateRemoteUrl('webdav').replace('/remote.php', '/public.php')\n\t}\n}\n\nexport const isPublic = function() {\n\treturn !getCurrentUser()\n}\n\nexport const getToken = function() {\n\treturn document.getElementById('sharingToken') && document.getElementById('sharingToken').value\n}\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=script&lang=js\"","\n\n\n\n\n\n\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=style&index=0&id=0859a92c&prod&lang=scss&scoped=true\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=style&index=0&id=0859a92c&prod&lang=scss&scoped=true\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./TemplatePreview.vue?vue&type=template&id=0859a92c&scoped=true\"\nimport script from \"./TemplatePreview.vue?vue&type=script&lang=js\"\nexport * from \"./TemplatePreview.vue?vue&type=script&lang=js\"\nimport style0 from \"./TemplatePreview.vue?vue&type=style&index=0&id=0859a92c&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"0859a92c\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('li',{staticClass:\"template-picker__item\"},[_c('input',{staticClass:\"radio\",attrs:{\"id\":_vm.id,\"type\":\"radio\",\"name\":\"template-picker\"},domProps:{\"checked\":_vm.checked},on:{\"change\":_vm.onCheck}}),_vm._v(\" \"),_c('label',{staticClass:\"template-picker__label\",attrs:{\"for\":_vm.id}},[_c('div',{staticClass:\"template-picker__preview\",class:_vm.failedPreview ? 'template-picker__preview--failed' : ''},[_c('img',{staticClass:\"template-picker__image\",attrs:{\"src\":_vm.realPreviewUrl,\"alt\":\"\",\"draggable\":\"false\"},on:{\"error\":_vm.onFailure}})]),_vm._v(\" \"),_c('span',{staticClass:\"template-picker__title\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.nameWithoutExt)+\"\\n\\t\\t\")])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??clonedRuleSet-4.use[1]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??clonedRuleSet-4.use[1]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=script&lang=ts\"","/**\n * @copyright Copyright (c) 2021 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\n\nimport { generateOcsUrl } from '@nextcloud/router'\nimport axios from '@nextcloud/axios'\n\nexport const getTemplates = async function() {\n\tconst response = await axios.get(generateOcsUrl('apps/files/api/v1/templates'))\n\treturn response.data.ocs.data\n}\n\n/**\n * Create a new file from a specified template\n *\n * @param {string} filePath The new file destination path\n * @param {string} templatePath The template source path\n * @param {string} templateType The template type e.g 'user'\n */\nexport const createFromTemplate = async function(filePath, templatePath, templateType) {\n\tconst response = await axios.post(generateOcsUrl('apps/files/api/v1/templates/create'), {\n\t\tfilePath,\n\t\ttemplatePath,\n\t\ttemplateType,\n\t})\n\treturn response.data.ocs.data\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=style&index=0&id=48121b39&prod&lang=scss&scoped=true\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=style&index=0&id=48121b39&prod&lang=scss&scoped=true\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./TemplatePicker.vue?vue&type=template&id=48121b39&scoped=true\"\nimport script from \"./TemplatePicker.vue?vue&type=script&lang=ts\"\nexport * from \"./TemplatePicker.vue?vue&type=script&lang=ts\"\nimport style0 from \"./TemplatePicker.vue?vue&type=style&index=0&id=48121b39&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"48121b39\",\n null\n \n)\n\nexport default component.exports","import { Folder, Node, Permission, addNewFileMenuEntry, removeNewFileMenuEntry } from '@nextcloud/files';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { getLoggerBuilder } from '@nextcloud/logger';\nimport { join } from 'path';\nimport { loadState } from '@nextcloud/initial-state';\nimport { showError } from '@nextcloud/dialogs';\nimport { translate as t, translatePlural as n } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport Vue from 'vue';\nimport PlusSvg from '@mdi/svg/svg/plus.svg?raw';\nimport TemplatePickerView from './views/TemplatePicker.vue';\nimport { getUniqueName } from './utils/fileUtils.ts';\nimport { getCurrentUser } from '@nextcloud/auth';\n// Set up logger\nconst logger = getLoggerBuilder()\n .setApp('files')\n .detectUser()\n .build();\n// Add translates functions\nVue.mixin({\n methods: {\n t,\n n,\n },\n});\n// Create document root\nconst TemplatePickerRoot = document.createElement('div');\nTemplatePickerRoot.id = 'template-picker';\ndocument.body.appendChild(TemplatePickerRoot);\n// Retrieve and init templates\nlet templates = loadState('files', 'templates', []);\nlet templatesPath = loadState('files', 'templates_path', false);\nlogger.debug('Templates providers', { templates });\nlogger.debug('Templates folder', { templatesPath });\n// Init vue app\nconst View = Vue.extend(TemplatePickerView);\nconst TemplatePicker = new View({\n name: 'TemplatePicker',\n propsData: {\n logger,\n },\n});\nTemplatePicker.$mount('#template-picker');\nif (!templatesPath) {\n logger.debug('Templates folder not initialized');\n addNewFileMenuEntry({\n id: 'template-picker',\n displayName: t('files', 'Create new templates folder'),\n iconSvgInline: PlusSvg,\n order: 10,\n enabled(context) {\n // Allow creation on your own folders only\n if (context.owner !== getCurrentUser()?.uid) {\n return false;\n }\n return (context.permissions & Permission.CREATE) !== 0;\n },\n handler(context, content) {\n // Check for conflicts\n const contentNames = content.map((node) => node.basename);\n const name = getUniqueName(t('files', 'Templates'), contentNames);\n // Create the template folder\n initTemplatesFolder(context, name);\n // Remove the menu entry\n removeNewFileMenuEntry('template-picker');\n },\n });\n}\n// Init template files menu\ntemplates.forEach((provider, index) => {\n addNewFileMenuEntry({\n id: `template-new-${provider.app}-${index}`,\n displayName: provider.label,\n // TODO: migrate to inline svg\n iconClass: provider.iconClass || 'icon-file',\n enabled(context) {\n return (context.permissions & Permission.CREATE) !== 0;\n },\n order: 11,\n handler(context, content) {\n // Check for conflicts\n const contentNames = content.map((node) => node.basename);\n const name = getUniqueName(provider.label + provider.extension, contentNames);\n // Create the file\n TemplatePicker.open(name, provider);\n },\n });\n});\n// Init template folder\nconst initTemplatesFolder = async function (directory, name) {\n const templatePath = join(directory.path, name);\n try {\n logger.debug('Initializing the templates directory', { templatePath });\n const response = await axios.post(generateOcsUrl('apps/files/api/v1/templates/path'), {\n templatePath,\n copySystemTemplates: true,\n });\n // Go to template directory\n window.OCP.Files.Router.goToRoute(null, // use default route\n { view: 'files', fileid: undefined }, { dir: templatePath });\n templates = response.data.ocs.data.templates;\n templatesPath = response.data.ocs.data.template_path;\n }\n catch (error) {\n logger.error('Unable to initialize the templates directory');\n showError(t('files', 'Unable to initialize the templates directory'));\n }\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { addNewFileMenuEntry, registerDavProperty, registerFileAction } from '@nextcloud/files';\nimport { action as deleteAction } from './actions/deleteAction';\nimport { action as downloadAction } from './actions/downloadAction';\nimport { action as editLocallyAction } from './actions/editLocallyAction';\nimport { action as favoriteAction } from './actions/favoriteAction';\nimport { action as moveOrCopyAction } from './actions/moveOrCopyAction';\nimport { action as openFolderAction } from './actions/openFolderAction';\nimport { action as openInFilesAction } from './actions/openInFilesAction';\nimport { action as renameAction } from './actions/renameAction';\nimport { action as sidebarAction } from './actions/sidebarAction';\nimport { action as viewInFolderAction } from './actions/viewInFolderAction';\nimport { entry as newFolderEntry } from './newMenu/newFolder';\nimport registerFavoritesView from './views/favorites';\nimport registerRecentView from './views/recent';\nimport registerFilesView from './views/files';\nimport registerPreviewServiceWorker from './services/ServiceWorker.js';\nimport './init-templates';\nimport { initLivePhotos } from './services/LivePhotos';\n// Register file actions\nregisterFileAction(deleteAction);\nregisterFileAction(downloadAction);\nregisterFileAction(editLocallyAction);\nregisterFileAction(favoriteAction);\nregisterFileAction(moveOrCopyAction);\nregisterFileAction(openFolderAction);\nregisterFileAction(openInFilesAction);\nregisterFileAction(renameAction);\nregisterFileAction(sidebarAction);\nregisterFileAction(viewInFolderAction);\n// Register new menu entry\naddNewFileMenuEntry(newFolderEntry);\n// Register files views\nregisterFavoritesView();\nregisterFilesView();\nregisterRecentView();\n// Register preview service worker\nregisterPreviewServiceWorker();\nregisterDavProperty('nc:hidden', { nc: 'http://nextcloud.org/ns' });\ninitLivePhotos();\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { translate as t } from '@nextcloud/l10n';\nimport FolderSvg from '@mdi/svg/svg/folder.svg?raw';\nimport { getContents } from '../services/Files';\nimport { View, getNavigation } from '@nextcloud/files';\nexport default () => {\n const Navigation = getNavigation();\n Navigation.register(new View({\n id: 'files',\n name: t('files', 'All files'),\n caption: t('files', 'List of your files and folders.'),\n icon: FolderSvg,\n order: 0,\n getContents,\n }));\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { translate as t } from '@nextcloud/l10n';\nimport HistorySvg from '@mdi/svg/svg/history.svg?raw';\nimport { getContents } from '../services/Recent';\nimport { View, getNavigation } from '@nextcloud/files';\nexport default () => {\n const Navigation = getNavigation();\n Navigation.register(new View({\n id: 'recent',\n name: t('files', 'Recent'),\n caption: t('files', 'List of recently modified files and folders.'),\n emptyTitle: t('files', 'No recently modified files'),\n emptyCaption: t('files', 'Files and folders you recently modified will show up here.'),\n icon: HistorySvg,\n order: 2,\n defaultSortKey: 'mtime',\n getContents,\n }));\n};\n","/**\n * @copyright Copyright (c) 2019 Gary Kim \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { generateUrl } from '@nextcloud/router'\nimport logger from '../logger.js'\n\nexport default () => {\n\tif ('serviceWorker' in navigator) {\n\t\t// Use the window load event to keep the page load performant\n\t\twindow.addEventListener('load', async () => {\n\t\t\ttry {\n\t\t\t\tconst url = generateUrl('/apps/files/preview-service-worker.js', {}, { noRewrite: true })\n\t\t\t\tconst registration = await navigator.serviceWorker.register(url, { scope: '/' })\n\t\t\t\tlogger.debug('SW registered: ', { registration })\n\t\t\t} catch (error) {\n\t\t\t\tlogger.error('SW registration failed: ', { error })\n\t\t\t}\n\t\t})\n\t} else {\n\t\tlogger.debug('Service Worker is not enabled on this browser.')\n\t}\n}\n","/**\n * @copyright Copyright (c) 2023 Louis Chmn \n *\n * @author Louis Chmn \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { Node, registerDavProperty } from '@nextcloud/files';\nexport function initLivePhotos() {\n registerDavProperty('nc:metadata-files-live-photo', { nc: 'http://nextcloud.org/ns' });\n}\n/**\n * @param {Node} node - The node\n */\nexport function isLivePhoto(node) {\n return node.attributes['metadata-files-live-photo'] !== undefined;\n}\n","module.exports = {\n \"100\": \"Continue\",\n \"101\": \"Switching Protocols\",\n \"102\": \"Processing\",\n \"200\": \"OK\",\n \"201\": \"Created\",\n \"202\": \"Accepted\",\n \"203\": \"Non-Authoritative Information\",\n \"204\": \"No Content\",\n \"205\": \"Reset Content\",\n \"206\": \"Partial Content\",\n \"207\": \"Multi-Status\",\n \"208\": \"Already Reported\",\n \"226\": \"IM Used\",\n \"300\": \"Multiple Choices\",\n \"301\": \"Moved Permanently\",\n \"302\": \"Found\",\n \"303\": \"See Other\",\n \"304\": \"Not Modified\",\n \"305\": \"Use Proxy\",\n \"307\": \"Temporary Redirect\",\n \"308\": \"Permanent Redirect\",\n \"400\": \"Bad Request\",\n \"401\": \"Unauthorized\",\n \"402\": \"Payment Required\",\n \"403\": \"Forbidden\",\n \"404\": \"Not Found\",\n \"405\": \"Method Not Allowed\",\n \"406\": \"Not Acceptable\",\n \"407\": \"Proxy Authentication Required\",\n \"408\": \"Request Timeout\",\n \"409\": \"Conflict\",\n \"410\": \"Gone\",\n \"411\": \"Length Required\",\n \"412\": \"Precondition Failed\",\n \"413\": \"Payload Too Large\",\n \"414\": \"URI Too Long\",\n \"415\": \"Unsupported Media Type\",\n \"416\": \"Range Not Satisfiable\",\n \"417\": \"Expectation Failed\",\n \"418\": \"I'm a teapot\",\n \"421\": \"Misdirected Request\",\n \"422\": \"Unprocessable Entity\",\n \"423\": \"Locked\",\n \"424\": \"Failed Dependency\",\n \"425\": \"Unordered Collection\",\n \"426\": \"Upgrade Required\",\n \"428\": \"Precondition Required\",\n \"429\": \"Too Many Requests\",\n \"431\": \"Request Header Fields Too Large\",\n \"451\": \"Unavailable For Legal Reasons\",\n \"500\": \"Internal Server Error\",\n \"501\": \"Not Implemented\",\n \"502\": \"Bad Gateway\",\n \"503\": \"Service Unavailable\",\n \"504\": \"Gateway Timeout\",\n \"505\": \"HTTP Version Not Supported\",\n \"506\": \"Variant Also Negotiates\",\n \"507\": \"Insufficient Storage\",\n \"508\": \"Loop Detected\",\n \"509\": \"Bandwidth Limit Exceeded\",\n \"510\": \"Not Extended\",\n \"511\": \"Network Authentication Required\"\n}\n","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([\"exports\"], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports);\n global.CancelablePromise = mod.exports;\n }\n})(typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : this, function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.CancelablePromise = void 0;\n _exports.cancelable = cancelable;\n _exports.default = void 0;\n _exports.isCancelablePromise = isCancelablePromise;\n\n function _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\n function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\n function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\n function _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\n function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\n function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\n function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }\n\n function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\n\n function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"get\"); return _classApplyDescriptorGet(receiver, descriptor); }\n\n function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }\n\n function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"set\"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }\n\n function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError(\"attempted to \" + action + \" private field on non-instance\"); } return privateMap.get(receiver); }\n\n function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError(\"attempted to set read only private field\"); } descriptor.value = value; } }\n\n var toStringTag = typeof Symbol !== 'undefined' ? Symbol.toStringTag : '@@toStringTag';\n\n var _internals = /*#__PURE__*/new WeakMap();\n\n var _promise = /*#__PURE__*/new WeakMap();\n\n var CancelablePromiseInternal = /*#__PURE__*/function () {\n function CancelablePromiseInternal(_ref) {\n var _ref$executor = _ref.executor,\n executor = _ref$executor === void 0 ? function () {} : _ref$executor,\n _ref$internals = _ref.internals,\n internals = _ref$internals === void 0 ? defaultInternals() : _ref$internals,\n _ref$promise = _ref.promise,\n promise = _ref$promise === void 0 ? new Promise(function (resolve, reject) {\n return executor(resolve, reject, function (onCancel) {\n internals.onCancelList.push(onCancel);\n });\n }) : _ref$promise;\n\n _classCallCheck(this, CancelablePromiseInternal);\n\n _classPrivateFieldInitSpec(this, _internals, {\n writable: true,\n value: void 0\n });\n\n _classPrivateFieldInitSpec(this, _promise, {\n writable: true,\n value: void 0\n });\n\n _defineProperty(this, toStringTag, 'CancelablePromise');\n\n this.cancel = this.cancel.bind(this);\n\n _classPrivateFieldSet(this, _internals, internals);\n\n _classPrivateFieldSet(this, _promise, promise || new Promise(function (resolve, reject) {\n return executor(resolve, reject, function (onCancel) {\n internals.onCancelList.push(onCancel);\n });\n }));\n }\n\n _createClass(CancelablePromiseInternal, [{\n key: \"then\",\n value: function then(onfulfilled, onrejected) {\n return makeCancelable(_classPrivateFieldGet(this, _promise).then(createCallback(onfulfilled, _classPrivateFieldGet(this, _internals)), createCallback(onrejected, _classPrivateFieldGet(this, _internals))), _classPrivateFieldGet(this, _internals));\n }\n }, {\n key: \"catch\",\n value: function _catch(onrejected) {\n return makeCancelable(_classPrivateFieldGet(this, _promise).catch(createCallback(onrejected, _classPrivateFieldGet(this, _internals))), _classPrivateFieldGet(this, _internals));\n }\n }, {\n key: \"finally\",\n value: function _finally(onfinally, runWhenCanceled) {\n var _this = this;\n\n if (runWhenCanceled) {\n _classPrivateFieldGet(this, _internals).onCancelList.push(onfinally);\n }\n\n return makeCancelable(_classPrivateFieldGet(this, _promise).finally(createCallback(function () {\n if (onfinally) {\n if (runWhenCanceled) {\n _classPrivateFieldGet(_this, _internals).onCancelList = _classPrivateFieldGet(_this, _internals).onCancelList.filter(function (callback) {\n return callback !== onfinally;\n });\n }\n\n return onfinally();\n }\n }, _classPrivateFieldGet(this, _internals))), _classPrivateFieldGet(this, _internals));\n }\n }, {\n key: \"cancel\",\n value: function cancel() {\n _classPrivateFieldGet(this, _internals).isCanceled = true;\n\n var callbacks = _classPrivateFieldGet(this, _internals).onCancelList;\n\n _classPrivateFieldGet(this, _internals).onCancelList = [];\n\n var _iterator = _createForOfIteratorHelper(callbacks),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var callback = _step.value;\n\n if (typeof callback === 'function') {\n try {\n callback();\n } catch (err) {\n console.error(err);\n }\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n }, {\n key: \"isCanceled\",\n value: function isCanceled() {\n return _classPrivateFieldGet(this, _internals).isCanceled === true;\n }\n }]);\n\n return CancelablePromiseInternal;\n }();\n\n var CancelablePromise = /*#__PURE__*/function (_CancelablePromiseInt) {\n _inherits(CancelablePromise, _CancelablePromiseInt);\n\n var _super = _createSuper(CancelablePromise);\n\n function CancelablePromise(executor) {\n _classCallCheck(this, CancelablePromise);\n\n return _super.call(this, {\n executor: executor\n });\n }\n\n return _createClass(CancelablePromise);\n }(CancelablePromiseInternal);\n\n _exports.CancelablePromise = CancelablePromise;\n\n _defineProperty(CancelablePromise, \"all\", function all(iterable) {\n return makeAllCancelable(iterable, Promise.all(iterable));\n });\n\n _defineProperty(CancelablePromise, \"allSettled\", function allSettled(iterable) {\n return makeAllCancelable(iterable, Promise.allSettled(iterable));\n });\n\n _defineProperty(CancelablePromise, \"any\", function any(iterable) {\n return makeAllCancelable(iterable, Promise.any(iterable));\n });\n\n _defineProperty(CancelablePromise, \"race\", function race(iterable) {\n return makeAllCancelable(iterable, Promise.race(iterable));\n });\n\n _defineProperty(CancelablePromise, \"resolve\", function resolve(value) {\n return cancelable(Promise.resolve(value));\n });\n\n _defineProperty(CancelablePromise, \"reject\", function reject(reason) {\n return cancelable(Promise.reject(reason));\n });\n\n _defineProperty(CancelablePromise, \"isCancelable\", isCancelablePromise);\n\n var _default = CancelablePromise;\n _exports.default = _default;\n\n function cancelable(promise) {\n return makeCancelable(promise, defaultInternals());\n }\n\n function isCancelablePromise(promise) {\n return promise instanceof CancelablePromise || promise instanceof CancelablePromiseInternal;\n }\n\n function createCallback(onResult, internals) {\n if (onResult) {\n return function (arg) {\n if (!internals.isCanceled) {\n var result = onResult(arg);\n\n if (isCancelablePromise(result)) {\n internals.onCancelList.push(result.cancel);\n }\n\n return result;\n }\n\n return arg;\n };\n }\n }\n\n function makeCancelable(promise, internals) {\n return new CancelablePromiseInternal({\n internals: internals,\n promise: promise\n });\n }\n\n function makeAllCancelable(iterable, promise) {\n var internals = defaultInternals();\n internals.onCancelList.push(function () {\n var _iterator2 = _createForOfIteratorHelper(iterable),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var resolvable = _step2.value;\n\n if (isCancelablePromise(resolvable)) {\n resolvable.cancel();\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n });\n return new CancelablePromiseInternal({\n internals: internals,\n promise: promise\n });\n }\n\n function defaultInternals() {\n return {\n isCanceled: false,\n onCancelList: []\n };\n }\n});\n//# sourceMappingURL=CancelablePromise.js.map","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../css-loader/dist/runtime/api.js\";\nimport ___CSS_LOADER_GET_URL_IMPORT___ from \"../../../css-loader/dist/runtime/getUrl.js\";\nvar ___CSS_LOADER_URL_IMPORT_0___ = new URL(\"data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20height=%2716%27%20width=%2716%27%3e%3cpath%20d=%27M14%2012.3L12.3%2014%208%209.7%203.7%2014%202%2012.3%206.3%208%202%203.7%203.7%202%208%206.3%2012.3%202%2014%203.7%209.7%208z%27/%3e%3c/svg%3e\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_1___ = new URL(\"data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20height=%2716%27%20width=%2716%27%3e%3cpath%20d=%27M14%2012.3L12.3%2014%208%209.7%203.7%2014%202%2012.3%206.3%208%202%203.7%203.7%202%208%206.3%2012.3%202%2014%203.7%209.7%208z%27%20style=%27fill-opacity:1;fill:%23ffffff%27/%3e%3c/svg%3e\", import.meta.url);\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\nvar ___CSS_LOADER_URL_REPLACEMENT_1___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `@charset \"UTF-8\";\n/**\n * @copyright Copyright (c) 2019 Julius Härtl \n *\n * @author Julius Härtl \n * @author John Molakvoæ \n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n.toastify.dialogs {\n min-width: 200px;\n background: none;\n background-color: var(--color-main-background);\n color: var(--color-main-text);\n box-shadow: 0 0 6px 0 var(--color-box-shadow);\n padding: 0 12px;\n margin-top: 45px;\n position: fixed;\n z-index: 10100;\n border-radius: var(--border-radius);\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-container {\n display: flex;\n align-items: center;\n}\n.toastify.dialogs .toast-undo-button,\n.toastify.dialogs .toast-close {\n position: static;\n overflow: hidden;\n box-sizing: border-box;\n min-width: 44px;\n height: 100%;\n padding: 12px;\n white-space: nowrap;\n background-repeat: no-repeat;\n background-position: center;\n background-color: transparent;\n min-height: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close,\n.toastify.dialogs .toast-close.toast-close {\n text-indent: 0;\n opacity: .4;\n border: none;\n min-height: 44px;\n margin-left: 10px;\n font-size: 0;\n}\n.toastify.dialogs .toast-undo-button.toast-close:before,\n.toastify.dialogs .toast-close.toast-close:before {\n background-image: url(${___CSS_LOADER_URL_REPLACEMENT_0___});\n content: \" \";\n filter: var(--background-invert-if-dark);\n display: inline-block;\n width: 16px;\n height: 16px;\n}\n.toastify.dialogs .toast-undo-button.toast-undo-button,\n.toastify.dialogs .toast-close.toast-undo-button {\n height: calc(100% - 6px);\n margin: 3px 3px 3px 12px;\n}\n.toastify.dialogs .toast-undo-button:hover,\n.toastify.dialogs .toast-undo-button:focus,\n.toastify.dialogs .toast-undo-button:active,\n.toastify.dialogs .toast-close:hover,\n.toastify.dialogs .toast-close:focus,\n.toastify.dialogs .toast-close:active {\n cursor: pointer;\n opacity: 1;\n}\n.toastify.dialogs.toastify-top {\n right: 10px;\n}\n.toastify.dialogs.toast-with-click {\n cursor: pointer;\n}\n.toastify.dialogs.toast-error {\n border-left: 3px solid var(--color-error);\n}\n.toastify.dialogs.toast-info {\n border-left: 3px solid var(--color-primary);\n}\n.toastify.dialogs.toast-warning {\n border-left: 3px solid var(--color-warning);\n}\n.toastify.dialogs.toast-success,\n.toastify.dialogs.toast-undo {\n border-left: 3px solid var(--color-success);\n}\n.theme--dark .toastify.dialogs .toast-close.toast-close:before {\n background-image: url(${___CSS_LOADER_URL_REPLACEMENT_1___});\n}\n._file-picker__file-icon_1vgv4_5 {\n width: 32px;\n height: 32px;\n min-width: 32px;\n min-height: 32px;\n background-repeat: no-repeat;\n background-size: contain;\n display: flex;\n justify-content: center;\n}\ntr.file-picker__row[data-v-6aded0d9] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-6aded0d9] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td.row-checkbox[data-v-6aded0d9] {\n padding: 0 2px;\n}\ntr.file-picker__row td[data-v-6aded0d9]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-6aded0d9] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-6aded0d9] {\n padding-inline: 2px 0;\n}\n@keyframes gradient-6aded0d9 {\n 0% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n to {\n background-position: 0% 50%;\n }\n}\n.loading-row .row-checkbox[data-v-6aded0d9] {\n text-align: center !important;\n}\n.loading-row span[data-v-6aded0d9] {\n display: inline-block;\n height: 24px;\n background: linear-gradient(to right, var(--color-background-darker), var(--color-text-maxcontrast), var(--color-background-darker));\n background-size: 600px 100%;\n border-radius: var(--border-radius);\n animation: gradient-6aded0d9 12s ease infinite;\n}\n.loading-row .row-wrapper[data-v-6aded0d9] {\n display: inline-flex;\n align-items: center;\n}\n.loading-row .row-checkbox span[data-v-6aded0d9] {\n width: 24px;\n}\n.loading-row .row-name span[data-v-6aded0d9]:last-of-type {\n margin-inline-start: 6px;\n width: 130px;\n}\n.loading-row .row-size span[data-v-6aded0d9] {\n width: 80px;\n}\n.loading-row .row-modified span[data-v-6aded0d9] {\n width: 90px;\n}\ntr.file-picker__row[data-v-48df4f27] {\n height: var(--row-height, 50px);\n}\ntr.file-picker__row td[data-v-48df4f27] {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n border-bottom: none;\n}\ntr.file-picker__row td.row-checkbox[data-v-48df4f27] {\n padding: 0 2px;\n}\ntr.file-picker__row td[data-v-48df4f27]:not(.row-checkbox) {\n padding-inline: 14px 0;\n}\ntr.file-picker__row td.row-size[data-v-48df4f27] {\n text-align: end;\n padding-inline: 0 14px;\n}\ntr.file-picker__row td.row-name[data-v-48df4f27] {\n padding-inline: 2px 0;\n}\n.file-picker__row--selected[data-v-48df4f27] {\n background-color: var(--color-background-dark);\n}\n.file-picker__row[data-v-48df4f27]:hover {\n background-color: var(--color-background-hover);\n}\n.file-picker__name-container[data-v-48df4f27] {\n display: flex;\n justify-content: start;\n align-items: center;\n height: 100%;\n}\n.file-picker__file-name[data-v-48df4f27] {\n padding-inline-start: 6px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.file-picker__file-extension[data-v-48df4f27] {\n color: var(--color-text-maxcontrast);\n min-width: fit-content;\n}\n.file-picker__header-preview[data-v-d3c94818] {\n width: 22px;\n height: 32px;\n flex: 0 0 auto;\n}\n.file-picker__files[data-v-d3c94818] {\n margin: 2px;\n margin-inline-start: 12px;\n overflow: scroll auto;\n}\n.file-picker__files table[data-v-d3c94818] {\n width: 100%;\n max-height: 100%;\n table-layout: fixed;\n}\n.file-picker__files th[data-v-d3c94818] {\n position: sticky;\n z-index: 1;\n top: 0;\n background-color: var(--color-main-background);\n padding: 2px;\n}\n.file-picker__files th .header-wrapper[data-v-d3c94818] {\n display: flex;\n}\n.file-picker__files th.row-checkbox[data-v-d3c94818] {\n width: 44px;\n}\n.file-picker__files th.row-name[data-v-d3c94818] {\n width: 230px;\n}\n.file-picker__files th.row-size[data-v-d3c94818] {\n width: 100px;\n}\n.file-picker__files th.row-modified[data-v-d3c94818] {\n width: 120px;\n}\n.file-picker__files th[data-v-d3c94818]:not(.row-size) .button-vue__wrapper {\n justify-content: start;\n flex-direction: row-reverse;\n}\n.file-picker__files th[data-v-d3c94818]:not(.row-size) .button-vue {\n padding-inline: 16px 4px;\n}\n.file-picker__files th.row-size[data-v-d3c94818] .button-vue__wrapper {\n justify-content: end;\n}\n.file-picker__files th[data-v-d3c94818] .button-vue__wrapper {\n color: var(--color-text-maxcontrast);\n}\n.file-picker__files th[data-v-d3c94818] .button-vue__wrapper .button-vue__text {\n font-weight: 400;\n}\n.file-picker__breadcrumbs[data-v-3bc9efa5] {\n flex-grow: 0 !important;\n}\n.file-picker__side[data-v-e96bec41] {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: .5rem;\n min-width: 200px;\n padding: 2px;\n overflow: auto;\n}\n.file-picker__side[data-v-e96bec41] .button-vue__wrapper {\n justify-content: start;\n}\n.file-picker__filter-input[data-v-e96bec41] {\n margin-block: 7px;\n max-width: 260px;\n}\n@media (max-width: 736px) {\n .file-picker__side[data-v-e96bec41] {\n flex-direction: row;\n min-width: unset;\n }\n}\n@media (max-width: 512px) {\n .file-picker__side[data-v-e96bec41] {\n flex-direction: row;\n min-width: unset;\n }\n .file-picker__filter-input[data-v-e96bec41] {\n max-width: unset;\n }\n}\n.file-picker__navigation {\n padding-inline: 8px 2px;\n}\n.file-picker__navigation,\n.file-picker__navigation * {\n box-sizing: border-box;\n}\n.file-picker__navigation .v-select.select {\n min-width: 220px;\n}\n@media (min-width: 513px) and (max-width: 736px) {\n .file-picker__navigation {\n gap: 11px;\n }\n}\n@media (max-width: 512px) {\n .file-picker__navigation {\n flex-direction: column-reverse !important;\n }\n}\n.file-picker__view[data-v-821451ce] {\n height: 50px;\n display: flex;\n justify-content: start;\n align-items: center;\n}\n.file-picker__view h3[data-v-821451ce] {\n font-weight: 700;\n height: fit-content;\n margin: 0;\n}\n.file-picker__main[data-v-821451ce] {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1;\n padding-inline: 2px;\n}\n.file-picker__main *[data-v-821451ce] {\n box-sizing: border-box;\n}\n[data-v-821451ce] .file-picker {\n height: min(80vh, 800px) !important;\n}\n@media (max-width: 512px) {\n [data-v-821451ce] .file-picker {\n height: calc(100% - 16px - var(--default-clickable-area)) !important;\n }\n}\n[data-v-821451ce] .file-picker__content {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./node_modules/@nextcloud/dialogs/dist/style.css\"],\"names\":[],\"mappings\":\"AAAA,gBAAgB;AAChB;;;;;;;;;;;;;;;;;;;;EAoBE;AACF;EACE,gBAAgB;EAChB,gBAAgB;EAChB,8CAA8C;EAC9C,6BAA6B;EAC7B,6CAA6C;EAC7C,eAAe;EACf,gBAAgB;EAChB,eAAe;EACf,cAAc;EACd,mCAAmC;EACnC,aAAa;EACb,mBAAmB;AACrB;AACA;EACE,aAAa;EACb,mBAAmB;AACrB;AACA;;EAEE,gBAAgB;EAChB,gBAAgB;EAChB,sBAAsB;EACtB,eAAe;EACf,YAAY;EACZ,aAAa;EACb,mBAAmB;EACnB,4BAA4B;EAC5B,2BAA2B;EAC3B,6BAA6B;EAC7B,aAAa;AACf;AACA;;EAEE,cAAc;EACd,WAAW;EACX,YAAY;EACZ,gBAAgB;EAChB,iBAAiB;EACjB,YAAY;AACd;AACA;;EAEE,yDAA8Q;EAC9Q,YAAY;EACZ,wCAAwC;EACxC,qBAAqB;EACrB,WAAW;EACX,YAAY;AACd;AACA;;EAEE,wBAAwB;EACxB,wBAAwB;AAC1B;AACA;;;;;;EAME,eAAe;EACf,UAAU;AACZ;AACA;EACE,WAAW;AACb;AACA;EACE,eAAe;AACjB;AACA;EACE,yCAAyC;AAC3C;AACA;EACE,2CAA2C;AAC7C;AACA;EACE,2CAA2C;AAC7C;AACA;;EAEE,2CAA2C;AAC7C;AACA;EACE,yDAAsT;AACxT;AACA;EACE,WAAW;EACX,YAAY;EACZ,eAAe;EACf,gBAAgB;EAChB,4BAA4B;EAC5B,wBAAwB;EACxB,aAAa;EACb,uBAAuB;AACzB;AACA;EACE,+BAA+B;AACjC;AACA;EACE,eAAe;EACf,gBAAgB;EAChB,uBAAuB;EACvB,mBAAmB;AACrB;AACA;EACE,cAAc;AAChB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,eAAe;EACf,sBAAsB;AACxB;AACA;EACE,qBAAqB;AACvB;AACA;EACE;IACE,2BAA2B;EAC7B;EACA;IACE,6BAA6B;EAC/B;EACA;IACE,2BAA2B;EAC7B;AACF;AACA;EACE,6BAA6B;AAC/B;AACA;EACE,qBAAqB;EACrB,YAAY;EACZ,oIAAoI;EACpI,2BAA2B;EAC3B,mCAAmC;EACnC,8CAA8C;AAChD;AACA;EACE,oBAAoB;EACpB,mBAAmB;AACrB;AACA;EACE,WAAW;AACb;AACA;EACE,wBAAwB;EACxB,YAAY;AACd;AACA;EACE,WAAW;AACb;AACA;EACE,WAAW;AACb;AACA;EACE,+BAA+B;AACjC;AACA;EACE,eAAe;EACf,gBAAgB;EAChB,uBAAuB;EACvB,mBAAmB;AACrB;AACA;EACE,cAAc;AAChB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,eAAe;EACf,sBAAsB;AACxB;AACA;EACE,qBAAqB;AACvB;AACA;EACE,8CAA8C;AAChD;AACA;EACE,+CAA+C;AACjD;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,mBAAmB;EACnB,YAAY;AACd;AACA;EACE,yBAAyB;EACzB,YAAY;EACZ,gBAAgB;EAChB,uBAAuB;AACzB;AACA;EACE,oCAAoC;EACpC,sBAAsB;AACxB;AACA;EACE,WAAW;EACX,YAAY;EACZ,cAAc;AAChB;AACA;EACE,WAAW;EACX,yBAAyB;EACzB,qBAAqB;AACvB;AACA;EACE,WAAW;EACX,gBAAgB;EAChB,mBAAmB;AACrB;AACA;EACE,gBAAgB;EAChB,UAAU;EACV,MAAM;EACN,8CAA8C;EAC9C,YAAY;AACd;AACA;EACE,aAAa;AACf;AACA;EACE,WAAW;AACb;AACA;EACE,YAAY;AACd;AACA;EACE,YAAY;AACd;AACA;EACE,YAAY;AACd;AACA;EACE,sBAAsB;EACtB,2BAA2B;AAC7B;AACA;EACE,wBAAwB;AAC1B;AACA;EACE,oBAAoB;AACtB;AACA;EACE,oCAAoC;AACtC;AACA;EACE,gBAAgB;AAClB;AACA;EACE,uBAAuB;AACzB;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,oBAAoB;EACpB,UAAU;EACV,gBAAgB;EAChB,YAAY;EACZ,cAAc;AAChB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,iBAAiB;EACjB,gBAAgB;AAClB;AACA;EACE;IACE,mBAAmB;IACnB,gBAAgB;EAClB;AACF;AACA;EACE;IACE,mBAAmB;IACnB,gBAAgB;EAClB;EACA;IACE,gBAAgB;EAClB;AACF;AACA;EACE,uBAAuB;AACzB;AACA;;EAEE,sBAAsB;AACxB;AACA;EACE,gBAAgB;AAClB;AACA;EACE;IACE,SAAS;EACX;AACF;AACA;EACE;IACE,yCAAyC;EAC3C;AACF;AACA;EACE,YAAY;EACZ,aAAa;EACb,sBAAsB;EACtB,mBAAmB;AACrB;AACA;EACE,gBAAgB;EAChB,mBAAmB;EACnB,SAAS;AACX;AACA;EACE,sBAAsB;EACtB,WAAW;EACX,aAAa;EACb,sBAAsB;EACtB,aAAa;EACb,OAAO;EACP,mBAAmB;AACrB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,mCAAmC;AACrC;AACA;EACE;IACE,oEAAoE;EACtE;AACF;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,gBAAgB;AAClB\",\"sourcesContent\":[\"@charset \\\"UTF-8\\\";\\n/**\\n * @copyright Copyright (c) 2019 Julius Härtl \\n *\\n * @author Julius Härtl \\n * @author John Molakvoæ \\n *\\n * @license GNU AGPL version 3 or any later version\\n *\\n * This program is free software: you can redistribute it and/or modify\\n * it under the terms of the GNU Affero General Public License as\\n * published by the Free Software Foundation, either version 3 of the\\n * License, or (at your option) any later version.\\n *\\n * This program is distributed in the hope that it will be useful,\\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n * GNU Affero General Public License for more details.\\n *\\n * You should have received a copy of the GNU Affero General Public License\\n * along with this program. If not, see .\\n */\\n.toastify.dialogs {\\n min-width: 200px;\\n background: none;\\n background-color: var(--color-main-background);\\n color: var(--color-main-text);\\n box-shadow: 0 0 6px 0 var(--color-box-shadow);\\n padding: 0 12px;\\n margin-top: 45px;\\n position: fixed;\\n z-index: 10100;\\n border-radius: var(--border-radius);\\n display: flex;\\n align-items: center;\\n}\\n.toastify.dialogs .toast-undo-container {\\n display: flex;\\n align-items: center;\\n}\\n.toastify.dialogs .toast-undo-button,\\n.toastify.dialogs .toast-close {\\n position: static;\\n overflow: hidden;\\n box-sizing: border-box;\\n min-width: 44px;\\n height: 100%;\\n padding: 12px;\\n white-space: nowrap;\\n background-repeat: no-repeat;\\n background-position: center;\\n background-color: transparent;\\n min-height: 0;\\n}\\n.toastify.dialogs .toast-undo-button.toast-close,\\n.toastify.dialogs .toast-close.toast-close {\\n text-indent: 0;\\n opacity: .4;\\n border: none;\\n min-height: 44px;\\n margin-left: 10px;\\n font-size: 0;\\n}\\n.toastify.dialogs .toast-undo-button.toast-close:before,\\n.toastify.dialogs .toast-close.toast-close:before {\\n background-image: url(\\\"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='16'%20width='16'%3e%3cpath%20d='M14%2012.3L12.3%2014%208%209.7%203.7%2014%202%2012.3%206.3%208%202%203.7%203.7%202%208%206.3%2012.3%202%2014%203.7%209.7%208z'/%3e%3c/svg%3e\\\");\\n content: \\\" \\\";\\n filter: var(--background-invert-if-dark);\\n display: inline-block;\\n width: 16px;\\n height: 16px;\\n}\\n.toastify.dialogs .toast-undo-button.toast-undo-button,\\n.toastify.dialogs .toast-close.toast-undo-button {\\n height: calc(100% - 6px);\\n margin: 3px 3px 3px 12px;\\n}\\n.toastify.dialogs .toast-undo-button:hover,\\n.toastify.dialogs .toast-undo-button:focus,\\n.toastify.dialogs .toast-undo-button:active,\\n.toastify.dialogs .toast-close:hover,\\n.toastify.dialogs .toast-close:focus,\\n.toastify.dialogs .toast-close:active {\\n cursor: pointer;\\n opacity: 1;\\n}\\n.toastify.dialogs.toastify-top {\\n right: 10px;\\n}\\n.toastify.dialogs.toast-with-click {\\n cursor: pointer;\\n}\\n.toastify.dialogs.toast-error {\\n border-left: 3px solid var(--color-error);\\n}\\n.toastify.dialogs.toast-info {\\n border-left: 3px solid var(--color-primary);\\n}\\n.toastify.dialogs.toast-warning {\\n border-left: 3px solid var(--color-warning);\\n}\\n.toastify.dialogs.toast-success,\\n.toastify.dialogs.toast-undo {\\n border-left: 3px solid var(--color-success);\\n}\\n.theme--dark .toastify.dialogs .toast-close.toast-close:before {\\n background-image: url(\\\"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='16'%20width='16'%3e%3cpath%20d='M14%2012.3L12.3%2014%208%209.7%203.7%2014%202%2012.3%206.3%208%202%203.7%203.7%202%208%206.3%2012.3%202%2014%203.7%209.7%208z'%20style='fill-opacity:1;fill:%23ffffff'/%3e%3c/svg%3e\\\");\\n}\\n._file-picker__file-icon_1vgv4_5 {\\n width: 32px;\\n height: 32px;\\n min-width: 32px;\\n min-height: 32px;\\n background-repeat: no-repeat;\\n background-size: contain;\\n display: flex;\\n justify-content: center;\\n}\\ntr.file-picker__row[data-v-6aded0d9] {\\n height: var(--row-height, 50px);\\n}\\ntr.file-picker__row td[data-v-6aded0d9] {\\n cursor: pointer;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n border-bottom: none;\\n}\\ntr.file-picker__row td.row-checkbox[data-v-6aded0d9] {\\n padding: 0 2px;\\n}\\ntr.file-picker__row td[data-v-6aded0d9]:not(.row-checkbox) {\\n padding-inline: 14px 0;\\n}\\ntr.file-picker__row td.row-size[data-v-6aded0d9] {\\n text-align: end;\\n padding-inline: 0 14px;\\n}\\ntr.file-picker__row td.row-name[data-v-6aded0d9] {\\n padding-inline: 2px 0;\\n}\\n@keyframes gradient-6aded0d9 {\\n 0% {\\n background-position: 0% 50%;\\n }\\n 50% {\\n background-position: 100% 50%;\\n }\\n to {\\n background-position: 0% 50%;\\n }\\n}\\n.loading-row .row-checkbox[data-v-6aded0d9] {\\n text-align: center !important;\\n}\\n.loading-row span[data-v-6aded0d9] {\\n display: inline-block;\\n height: 24px;\\n background: linear-gradient(to right, var(--color-background-darker), var(--color-text-maxcontrast), var(--color-background-darker));\\n background-size: 600px 100%;\\n border-radius: var(--border-radius);\\n animation: gradient-6aded0d9 12s ease infinite;\\n}\\n.loading-row .row-wrapper[data-v-6aded0d9] {\\n display: inline-flex;\\n align-items: center;\\n}\\n.loading-row .row-checkbox span[data-v-6aded0d9] {\\n width: 24px;\\n}\\n.loading-row .row-name span[data-v-6aded0d9]:last-of-type {\\n margin-inline-start: 6px;\\n width: 130px;\\n}\\n.loading-row .row-size span[data-v-6aded0d9] {\\n width: 80px;\\n}\\n.loading-row .row-modified span[data-v-6aded0d9] {\\n width: 90px;\\n}\\ntr.file-picker__row[data-v-48df4f27] {\\n height: var(--row-height, 50px);\\n}\\ntr.file-picker__row td[data-v-48df4f27] {\\n cursor: pointer;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n border-bottom: none;\\n}\\ntr.file-picker__row td.row-checkbox[data-v-48df4f27] {\\n padding: 0 2px;\\n}\\ntr.file-picker__row td[data-v-48df4f27]:not(.row-checkbox) {\\n padding-inline: 14px 0;\\n}\\ntr.file-picker__row td.row-size[data-v-48df4f27] {\\n text-align: end;\\n padding-inline: 0 14px;\\n}\\ntr.file-picker__row td.row-name[data-v-48df4f27] {\\n padding-inline: 2px 0;\\n}\\n.file-picker__row--selected[data-v-48df4f27] {\\n background-color: var(--color-background-dark);\\n}\\n.file-picker__row[data-v-48df4f27]:hover {\\n background-color: var(--color-background-hover);\\n}\\n.file-picker__name-container[data-v-48df4f27] {\\n display: flex;\\n justify-content: start;\\n align-items: center;\\n height: 100%;\\n}\\n.file-picker__file-name[data-v-48df4f27] {\\n padding-inline-start: 6px;\\n min-width: 0;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n}\\n.file-picker__file-extension[data-v-48df4f27] {\\n color: var(--color-text-maxcontrast);\\n min-width: fit-content;\\n}\\n.file-picker__header-preview[data-v-d3c94818] {\\n width: 22px;\\n height: 32px;\\n flex: 0 0 auto;\\n}\\n.file-picker__files[data-v-d3c94818] {\\n margin: 2px;\\n margin-inline-start: 12px;\\n overflow: scroll auto;\\n}\\n.file-picker__files table[data-v-d3c94818] {\\n width: 100%;\\n max-height: 100%;\\n table-layout: fixed;\\n}\\n.file-picker__files th[data-v-d3c94818] {\\n position: sticky;\\n z-index: 1;\\n top: 0;\\n background-color: var(--color-main-background);\\n padding: 2px;\\n}\\n.file-picker__files th .header-wrapper[data-v-d3c94818] {\\n display: flex;\\n}\\n.file-picker__files th.row-checkbox[data-v-d3c94818] {\\n width: 44px;\\n}\\n.file-picker__files th.row-name[data-v-d3c94818] {\\n width: 230px;\\n}\\n.file-picker__files th.row-size[data-v-d3c94818] {\\n width: 100px;\\n}\\n.file-picker__files th.row-modified[data-v-d3c94818] {\\n width: 120px;\\n}\\n.file-picker__files th[data-v-d3c94818]:not(.row-size) .button-vue__wrapper {\\n justify-content: start;\\n flex-direction: row-reverse;\\n}\\n.file-picker__files th[data-v-d3c94818]:not(.row-size) .button-vue {\\n padding-inline: 16px 4px;\\n}\\n.file-picker__files th.row-size[data-v-d3c94818] .button-vue__wrapper {\\n justify-content: end;\\n}\\n.file-picker__files th[data-v-d3c94818] .button-vue__wrapper {\\n color: var(--color-text-maxcontrast);\\n}\\n.file-picker__files th[data-v-d3c94818] .button-vue__wrapper .button-vue__text {\\n font-weight: 400;\\n}\\n.file-picker__breadcrumbs[data-v-3bc9efa5] {\\n flex-grow: 0 !important;\\n}\\n.file-picker__side[data-v-e96bec41] {\\n display: flex;\\n flex-direction: column;\\n align-items: stretch;\\n gap: .5rem;\\n min-width: 200px;\\n padding: 2px;\\n overflow: auto;\\n}\\n.file-picker__side[data-v-e96bec41] .button-vue__wrapper {\\n justify-content: start;\\n}\\n.file-picker__filter-input[data-v-e96bec41] {\\n margin-block: 7px;\\n max-width: 260px;\\n}\\n@media (max-width: 736px) {\\n .file-picker__side[data-v-e96bec41] {\\n flex-direction: row;\\n min-width: unset;\\n }\\n}\\n@media (max-width: 512px) {\\n .file-picker__side[data-v-e96bec41] {\\n flex-direction: row;\\n min-width: unset;\\n }\\n .file-picker__filter-input[data-v-e96bec41] {\\n max-width: unset;\\n }\\n}\\n.file-picker__navigation {\\n padding-inline: 8px 2px;\\n}\\n.file-picker__navigation,\\n.file-picker__navigation * {\\n box-sizing: border-box;\\n}\\n.file-picker__navigation .v-select.select {\\n min-width: 220px;\\n}\\n@media (min-width: 513px) and (max-width: 736px) {\\n .file-picker__navigation {\\n gap: 11px;\\n }\\n}\\n@media (max-width: 512px) {\\n .file-picker__navigation {\\n flex-direction: column-reverse !important;\\n }\\n}\\n.file-picker__view[data-v-821451ce] {\\n height: 50px;\\n display: flex;\\n justify-content: start;\\n align-items: center;\\n}\\n.file-picker__view h3[data-v-821451ce] {\\n font-weight: 700;\\n height: fit-content;\\n margin: 0;\\n}\\n.file-picker__main[data-v-821451ce] {\\n box-sizing: border-box;\\n width: 100%;\\n display: flex;\\n flex-direction: column;\\n min-height: 0;\\n flex: 1;\\n padding-inline: 2px;\\n}\\n.file-picker__main *[data-v-821451ce] {\\n box-sizing: border-box;\\n}\\n[data-v-821451ce] .file-picker {\\n height: min(80vh, 800px) !important;\\n}\\n@media (max-width: 512px) {\\n [data-v-821451ce] .file-picker {\\n height: calc(100% - 16px - var(--default-clickable-area)) !important;\\n }\\n}\\n[data-v-821451ce] .file-picker__content {\\n display: flex;\\n flex-direction: column;\\n overflow: hidden;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.template-picker__item[data-v-0859a92c]{display:flex}.template-picker__label[data-v-0859a92c]{display:flex;align-items:center;flex:1 1;flex-direction:column}.template-picker__label[data-v-0859a92c],.template-picker__label *[data-v-0859a92c]{cursor:pointer;user-select:none}.template-picker__label[data-v-0859a92c]::before{display:none !important}.template-picker__preview[data-v-0859a92c]{display:block;overflow:hidden;flex:1 1;width:var(--width);min-height:var(--height);max-height:var(--height);padding:0;border:var(--border) solid var(--color-border);border-radius:var(--border-radius-large)}input:checked+label>.template-picker__preview[data-v-0859a92c]{border-color:var(--color-primary-element)}.template-picker__preview--failed[data-v-0859a92c]{display:flex}.template-picker__image[data-v-0859a92c]{max-width:100%;background-color:var(--color-main-background);object-fit:cover}.template-picker__preview--failed .template-picker__image[data-v-0859a92c]{width:calc(var(--margin)*8);margin:auto;background-color:rgba(0,0,0,0) !important;object-fit:initial}.template-picker__title[data-v-0859a92c]{overflow:hidden;max-width:calc(var(--width) + 4px);padding:var(--margin);white-space:nowrap;text-overflow:ellipsis}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files/src/components/TemplatePreview.vue\"],\"names\":[],\"mappings\":\"AAGC,wCACC,YAAA,CAGD,yCACC,YAAA,CAEA,kBAAA,CACA,QAAA,CACA,qBAAA,CAEA,oFACC,cAAA,CACA,gBAAA,CAGD,iDACC,uBAAA,CAIF,2CACC,aAAA,CACA,eAAA,CAEA,QAAA,CACA,kBAAA,CACA,wBAAA,CACA,wBAAA,CACA,SAAA,CACA,8CAAA,CACA,wCAAA,CAEA,+DACC,yCAAA,CAGD,mDAEC,YAAA,CAIF,yCACC,cAAA,CACA,6CAAA,CAEA,gBAAA,CAID,2EACC,2BAAA,CAEA,WAAA,CACA,yCAAA,CAEA,kBAAA,CAGD,yCACC,eAAA,CAEA,kCAAA,CACA,qBAAA,CACA,kBAAA,CACA,sBAAA\",\"sourcesContent\":[\"\\n\\n.template-picker {\\n\\t&__item {\\n\\t\\tdisplay: flex;\\n\\t}\\n\\n\\t&__label {\\n\\t\\tdisplay: flex;\\n\\t\\t// Align in the middle of the grid\\n\\t\\talign-items: center;\\n\\t\\tflex: 1 1;\\n\\t\\tflex-direction: column;\\n\\n\\t\\t&, * {\\n\\t\\t\\tcursor: pointer;\\n\\t\\t\\tuser-select: none;\\n\\t\\t}\\n\\n\\t\\t&::before {\\n\\t\\t\\tdisplay: none !important;\\n\\t\\t}\\n\\t}\\n\\n\\t&__preview {\\n\\t\\tdisplay: block;\\n\\t\\toverflow: hidden;\\n\\t\\t// Stretch so all entries are the same width\\n\\t\\tflex: 1 1;\\n\\t\\twidth: var(--width);\\n\\t\\tmin-height: var(--height);\\n\\t\\tmax-height: var(--height);\\n\\t\\tpadding: 0;\\n\\t\\tborder: var(--border) solid var(--color-border);\\n\\t\\tborder-radius: var(--border-radius-large);\\n\\n\\t\\tinput:checked + label > & {\\n\\t\\t\\tborder-color: var(--color-primary-element);\\n\\t\\t}\\n\\n\\t\\t&--failed {\\n\\t\\t\\t// Make sure to properly center fallback icon\\n\\t\\t\\tdisplay: flex;\\n\\t\\t}\\n\\t}\\n\\n\\t&__image {\\n\\t\\tmax-width: 100%;\\n\\t\\tbackground-color: var(--color-main-background);\\n\\n\\t\\tobject-fit: cover;\\n\\t}\\n\\n\\t// Failed preview, fallback to mime icon\\n\\t&__preview--failed &__image {\\n\\t\\twidth: calc(var(--margin) * 8);\\n\\t\\t// Center mime icon\\n\\t\\tmargin: auto;\\n\\t\\tbackground-color: transparent !important;\\n\\n\\t\\tobject-fit: initial;\\n\\t}\\n\\n\\t&__title {\\n\\t\\toverflow: hidden;\\n\\t\\t// also count preview border\\n\\t\\tmax-width: calc(var(--width) + 2*2px);\\n\\t\\tpadding: var(--margin);\\n\\t\\twhite-space: nowrap;\\n\\t\\ttext-overflow: ellipsis;\\n\\t}\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.templates-picker__form[data-v-48121b39]{padding:calc(var(--margin)*2);padding-bottom:0}.templates-picker__form h2[data-v-48121b39]{text-align:center;font-weight:bold;margin:var(--margin) 0 calc(var(--margin)*2)}.templates-picker__list[data-v-48121b39]{display:grid;grid-gap:calc(var(--margin)*2);grid-auto-columns:1fr;max-width:calc(var(--fullwidth)*6);grid-template-columns:repeat(auto-fit, var(--fullwidth));grid-auto-rows:1fr;justify-content:center}.templates-picker__buttons[data-v-48121b39]{display:flex;justify-content:end;padding:calc(var(--margin)*2) var(--margin);position:sticky;bottom:0;background-image:linear-gradient(0, var(--gradient-main-background))}.templates-picker__buttons button[data-v-48121b39],.templates-picker__buttons input[type=submit][data-v-48121b39]{height:44px}.templates-picker[data-v-48121b39] .modal-container{position:relative}.templates-picker__loading[data-v-48121b39]{position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;margin:0;background-color:var(--color-main-background-translucent)}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files/src/views/TemplatePicker.vue\"],\"names\":[],\"mappings\":\"AAEC,yCACC,6BAAA,CAEA,gBAAA,CAEA,4CACC,iBAAA,CACA,gBAAA,CACA,4CAAA,CAIF,yCACC,YAAA,CACA,8BAAA,CACA,qBAAA,CAEA,kCAAA,CACA,wDAAA,CAEA,kBAAA,CAEA,sBAAA,CAGD,4CACC,YAAA,CACA,mBAAA,CACA,2CAAA,CACA,eAAA,CACA,QAAA,CACA,oEAAA,CAEA,kHACC,WAAA,CAKF,oDACC,iBAAA,CAGD,4CACC,iBAAA,CACA,KAAA,CACA,MAAA,CACA,sBAAA,CACA,UAAA,CACA,WAAA,CACA,QAAA,CACA,yDAAA\",\"sourcesContent\":[\"\\n.templates-picker {\\n\\t&__form {\\n\\t\\tpadding: calc(var(--margin) * 2);\\n\\t\\t// Will be handled by the buttons\\n\\t\\tpadding-bottom: 0;\\n\\n\\t\\th2 {\\n\\t\\t\\ttext-align: center;\\n\\t\\t\\tfont-weight: bold;\\n\\t\\t\\tmargin: var(--margin) 0 calc(var(--margin) * 2);\\n\\t\\t}\\n\\t}\\n\\n\\t&__list {\\n\\t\\tdisplay: grid;\\n\\t\\tgrid-gap: calc(var(--margin) * 2);\\n\\t\\tgrid-auto-columns: 1fr;\\n\\t\\t// We want maximum 5 columns. Putting 6 as we don't count the grid gap. So it will always be lower than 6\\n\\t\\tmax-width: calc(var(--fullwidth) * 6);\\n\\t\\tgrid-template-columns: repeat(auto-fit, var(--fullwidth));\\n\\t\\t// Make sure all rows are the same height\\n\\t\\tgrid-auto-rows: 1fr;\\n\\t\\t// Center the columns set\\n\\t\\tjustify-content: center;\\n\\t}\\n\\n\\t&__buttons {\\n\\t\\tdisplay: flex;\\n\\t\\tjustify-content: end;\\n\\t\\tpadding: calc(var(--margin) * 2) var(--margin);\\n\\t\\tposition: sticky;\\n\\t\\tbottom: 0;\\n\\t\\tbackground-image: linear-gradient(0, var(--gradient-main-background));\\n\\n\\t\\tbutton, input[type='submit'] {\\n\\t\\t\\theight: 44px;\\n\\t\\t}\\n\\t}\\n\\n\\t// Make sure we're relative for the loading emptycontent on top\\n\\t::v-deep .modal-container {\\n\\t\\tposition: relative;\\n\\t}\\n\\n\\t&__loading {\\n\\t\\tposition: absolute;\\n\\t\\ttop: 0;\\n\\t\\tleft: 0;\\n\\t\\tjustify-content: center;\\n\\t\\twidth: 100%;\\n\\t\\theight: 100%;\\n\\t\\tmargin: 0;\\n\\t\\tbackground-color: var(--color-main-background-translucent);\\n\\t}\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var http = require('http')\nvar url = require('url')\n\nvar https = module.exports\n\nfor (var key in http) {\n if (http.hasOwnProperty(key)) https[key] = http[key]\n}\n\nhttps.request = function (params, cb) {\n params = validateParams(params)\n return http.request.call(this, params, cb)\n}\n\nhttps.get = function (params, cb) {\n params = validateParams(params)\n return http.get.call(this, params, cb)\n}\n\nfunction validateParams (params) {\n if (typeof params === 'string') {\n params = url.parse(params)\n }\n if (!params.protocol) {\n params.protocol = 'https:'\n }\n if (params.protocol !== 'https:') {\n throw new Error('Protocol \"' + params.protocol + '\" not supported. Expected \"https:\"')\n }\n return params\n}\n","exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\nexports.finished = require('./lib/internal/streams/end-of-stream.js');\nexports.pipeline = require('./lib/internal/streams/pipeline.js');\n","var ClientRequest = require('./lib/request')\nvar response = require('./lib/response')\nvar extend = require('xtend')\nvar statusCodes = require('builtin-status-codes')\nvar url = require('url')\n\nvar http = exports\n\nhttp.request = function (opts, cb) {\n\tif (typeof opts === 'string')\n\t\topts = url.parse(opts)\n\telse\n\t\topts = extend(opts)\n\n\t// Normally, the page is loaded from http or https, so not specifying a protocol\n\t// will result in a (valid) protocol-relative url. However, this won't work if\n\t// the protocol is something else, like 'file:'\n\tvar defaultProtocol = global.location.protocol.search(/^https?:$/) === -1 ? 'http:' : ''\n\n\tvar protocol = opts.protocol || defaultProtocol\n\tvar host = opts.hostname || opts.host\n\tvar port = opts.port\n\tvar path = opts.path || '/'\n\n\t// Necessary for IPv6 addresses\n\tif (host && host.indexOf(':') !== -1)\n\t\thost = '[' + host + ']'\n\n\t// This may be a relative url. The browser should always be able to interpret it correctly.\n\topts.url = (host ? (protocol + '//' + host) : '') + (port ? ':' + port : '') + path\n\topts.method = (opts.method || 'GET').toUpperCase()\n\topts.headers = opts.headers || {}\n\n\t// Also valid opts.auth, opts.mode\n\n\tvar req = new ClientRequest(opts)\n\tif (cb)\n\t\treq.on('response', cb)\n\treturn req\n}\n\nhttp.get = function get (opts, cb) {\n\tvar req = http.request(opts, cb)\n\treq.end()\n\treturn req\n}\n\nhttp.ClientRequest = ClientRequest\nhttp.IncomingMessage = response.IncomingMessage\n\nhttp.Agent = function () {}\nhttp.Agent.defaultMaxSockets = 4\n\nhttp.globalAgent = new http.Agent()\n\nhttp.STATUS_CODES = statusCodes\n\nhttp.METHODS = [\n\t'CHECKOUT',\n\t'CONNECT',\n\t'COPY',\n\t'DELETE',\n\t'GET',\n\t'HEAD',\n\t'LOCK',\n\t'M-SEARCH',\n\t'MERGE',\n\t'MKACTIVITY',\n\t'MKCOL',\n\t'MOVE',\n\t'NOTIFY',\n\t'OPTIONS',\n\t'PATCH',\n\t'POST',\n\t'PROPFIND',\n\t'PROPPATCH',\n\t'PURGE',\n\t'PUT',\n\t'REPORT',\n\t'SEARCH',\n\t'SUBSCRIBE',\n\t'TRACE',\n\t'UNLOCK',\n\t'UNSUBSCRIBE'\n]","exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableStream)\n\nexports.writableStream = isFunction(global.WritableStream)\n\nexports.abortController = isFunction(global.AbortController)\n\n// The xhr request to example.com may violate some restrictive CSP configurations,\n// so if we're running in a browser that supports `fetch`, avoid calling getXHR()\n// and assume support for certain features below.\nvar xhr\nfunction getXHR () {\n\t// Cache the xhr value\n\tif (xhr !== undefined) return xhr\n\n\tif (global.XMLHttpRequest) {\n\t\txhr = new global.XMLHttpRequest()\n\t\t// If XDomainRequest is available (ie only, where xhr might not work\n\t\t// cross domain), use the page location. Otherwise use example.com\n\t\t// Note: this doesn't actually make an http request.\n\t\ttry {\n\t\t\txhr.open('GET', global.XDomainRequest ? '/' : 'https://example.com')\n\t\t} catch(e) {\n\t\t\txhr = null\n\t\t}\n\t} else {\n\t\t// Service workers don't have XHR\n\t\txhr = null\n\t}\n\treturn xhr\n}\n\nfunction checkTypeSupport (type) {\n\tvar xhr = getXHR()\n\tif (!xhr) return false\n\ttry {\n\t\txhr.responseType = type\n\t\treturn xhr.responseType === type\n\t} catch (e) {}\n\treturn false\n}\n\n// If fetch is supported, then arraybuffer will be supported too. Skip calling\n// checkTypeSupport(), since that calls getXHR().\nexports.arraybuffer = exports.fetch || checkTypeSupport('arraybuffer')\n\n// These next two tests unavoidably show warnings in Chrome. Since fetch will always\n// be used if it's available, just return false for these to avoid the warnings.\nexports.msstream = !exports.fetch && checkTypeSupport('ms-stream')\nexports.mozchunkedarraybuffer = !exports.fetch && checkTypeSupport('moz-chunked-arraybuffer')\n\n// If fetch is supported, then overrideMimeType will be supported too. Skip calling\n// getXHR().\nexports.overrideMimeType = exports.fetch || (getXHR() ? isFunction(getXHR().overrideMimeType) : false)\n\nfunction isFunction (value) {\n\treturn typeof value === 'function'\n}\n\nxhr = null // Help gc\n","var capability = require('./capability')\nvar inherits = require('inherits')\nvar response = require('./response')\nvar stream = require('readable-stream')\n\nvar IncomingMessage = response.IncomingMessage\nvar rStates = response.readyStates\n\nfunction decideMode (preferBinary, useFetch) {\n\tif (capability.fetch && useFetch) {\n\t\treturn 'fetch'\n\t} else if (capability.mozchunkedarraybuffer) {\n\t\treturn 'moz-chunked-arraybuffer'\n\t} else if (capability.msstream) {\n\t\treturn 'ms-stream'\n\t} else if (capability.arraybuffer && preferBinary) {\n\t\treturn 'arraybuffer'\n\t} else {\n\t\treturn 'text'\n\t}\n}\n\nvar ClientRequest = module.exports = function (opts) {\n\tvar self = this\n\tstream.Writable.call(self)\n\n\tself._opts = opts\n\tself._body = []\n\tself._headers = {}\n\tif (opts.auth)\n\t\tself.setHeader('Authorization', 'Basic ' + Buffer.from(opts.auth).toString('base64'))\n\tObject.keys(opts.headers).forEach(function (name) {\n\t\tself.setHeader(name, opts.headers[name])\n\t})\n\n\tvar preferBinary\n\tvar useFetch = true\n\tif (opts.mode === 'disable-fetch' || ('requestTimeout' in opts && !capability.abortController)) {\n\t\t// If the use of XHR should be preferred. Not typically needed.\n\t\tuseFetch = false\n\t\tpreferBinary = true\n\t} else if (opts.mode === 'prefer-streaming') {\n\t\t// If streaming is a high priority but binary compatibility and\n\t\t// the accuracy of the 'content-type' header aren't\n\t\tpreferBinary = false\n\t} else if (opts.mode === 'allow-wrong-content-type') {\n\t\t// If streaming is more important than preserving the 'content-type' header\n\t\tpreferBinary = !capability.overrideMimeType\n\t} else if (!opts.mode || opts.mode === 'default' || opts.mode === 'prefer-fast') {\n\t\t// Use binary if text streaming may corrupt data or the content-type header, or for speed\n\t\tpreferBinary = true\n\t} else {\n\t\tthrow new Error('Invalid value for opts.mode')\n\t}\n\tself._mode = decideMode(preferBinary, useFetch)\n\tself._fetchTimer = null\n\tself._socketTimeout = null\n\tself._socketTimer = null\n\n\tself.on('finish', function () {\n\t\tself._onFinish()\n\t})\n}\n\ninherits(ClientRequest, stream.Writable)\n\nClientRequest.prototype.setHeader = function (name, value) {\n\tvar self = this\n\tvar lowerName = name.toLowerCase()\n\t// This check is not necessary, but it prevents warnings from browsers about setting unsafe\n\t// headers. To be honest I'm not entirely sure hiding these warnings is a good thing, but\n\t// http-browserify did it, so I will too.\n\tif (unsafeHeaders.indexOf(lowerName) !== -1)\n\t\treturn\n\n\tself._headers[lowerName] = {\n\t\tname: name,\n\t\tvalue: value\n\t}\n}\n\nClientRequest.prototype.getHeader = function (name) {\n\tvar header = this._headers[name.toLowerCase()]\n\tif (header)\n\t\treturn header.value\n\treturn null\n}\n\nClientRequest.prototype.removeHeader = function (name) {\n\tvar self = this\n\tdelete self._headers[name.toLowerCase()]\n}\n\nClientRequest.prototype._onFinish = function () {\n\tvar self = this\n\n\tif (self._destroyed)\n\t\treturn\n\tvar opts = self._opts\n\n\tif ('timeout' in opts && opts.timeout !== 0) {\n\t\tself.setTimeout(opts.timeout)\n\t}\n\n\tvar headersObj = self._headers\n\tvar body = null\n\tif (opts.method !== 'GET' && opts.method !== 'HEAD') {\n body = new Blob(self._body, {\n type: (headersObj['content-type'] || {}).value || ''\n });\n }\n\n\t// create flattened list of headers\n\tvar headersList = []\n\tObject.keys(headersObj).forEach(function (keyName) {\n\t\tvar name = headersObj[keyName].name\n\t\tvar value = headersObj[keyName].value\n\t\tif (Array.isArray(value)) {\n\t\t\tvalue.forEach(function (v) {\n\t\t\t\theadersList.push([name, v])\n\t\t\t})\n\t\t} else {\n\t\t\theadersList.push([name, value])\n\t\t}\n\t})\n\n\tif (self._mode === 'fetch') {\n\t\tvar signal = null\n\t\tif (capability.abortController) {\n\t\t\tvar controller = new AbortController()\n\t\t\tsignal = controller.signal\n\t\t\tself._fetchAbortController = controller\n\n\t\t\tif ('requestTimeout' in opts && opts.requestTimeout !== 0) {\n\t\t\t\tself._fetchTimer = global.setTimeout(function () {\n\t\t\t\t\tself.emit('requestTimeout')\n\t\t\t\t\tif (self._fetchAbortController)\n\t\t\t\t\t\tself._fetchAbortController.abort()\n\t\t\t\t}, opts.requestTimeout)\n\t\t\t}\n\t\t}\n\n\t\tglobal.fetch(self._opts.url, {\n\t\t\tmethod: self._opts.method,\n\t\t\theaders: headersList,\n\t\t\tbody: body || undefined,\n\t\t\tmode: 'cors',\n\t\t\tcredentials: opts.withCredentials ? 'include' : 'same-origin',\n\t\t\tsignal: signal\n\t\t}).then(function (response) {\n\t\t\tself._fetchResponse = response\n\t\t\tself._resetTimers(false)\n\t\t\tself._connect()\n\t\t}, function (reason) {\n\t\t\tself._resetTimers(true)\n\t\t\tif (!self._destroyed)\n\t\t\t\tself.emit('error', reason)\n\t\t})\n\t} else {\n\t\tvar xhr = self._xhr = new global.XMLHttpRequest()\n\t\ttry {\n\t\t\txhr.open(self._opts.method, self._opts.url, true)\n\t\t} catch (err) {\n\t\t\tprocess.nextTick(function () {\n\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t\treturn\n\t\t}\n\n\t\t// Can't set responseType on really old browsers\n\t\tif ('responseType' in xhr)\n\t\t\txhr.responseType = self._mode\n\n\t\tif ('withCredentials' in xhr)\n\t\t\txhr.withCredentials = !!opts.withCredentials\n\n\t\tif (self._mode === 'text' && 'overrideMimeType' in xhr)\n\t\t\txhr.overrideMimeType('text/plain; charset=x-user-defined')\n\n\t\tif ('requestTimeout' in opts) {\n\t\t\txhr.timeout = opts.requestTimeout\n\t\t\txhr.ontimeout = function () {\n\t\t\t\tself.emit('requestTimeout')\n\t\t\t}\n\t\t}\n\n\t\theadersList.forEach(function (header) {\n\t\t\txhr.setRequestHeader(header[0], header[1])\n\t\t})\n\n\t\tself._response = null\n\t\txhr.onreadystatechange = function () {\n\t\t\tswitch (xhr.readyState) {\n\t\t\t\tcase rStates.LOADING:\n\t\t\t\tcase rStates.DONE:\n\t\t\t\t\tself._onXHRProgress()\n\t\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\t// Necessary for streaming in Firefox, since xhr.response is ONLY defined\n\t\t// in onprogress, not in onreadystatechange with xhr.readyState = 3\n\t\tif (self._mode === 'moz-chunked-arraybuffer') {\n\t\t\txhr.onprogress = function () {\n\t\t\t\tself._onXHRProgress()\n\t\t\t}\n\t\t}\n\n\t\txhr.onerror = function () {\n\t\t\tif (self._destroyed)\n\t\t\t\treturn\n\t\t\tself._resetTimers(true)\n\t\t\tself.emit('error', new Error('XHR error'))\n\t\t}\n\n\t\ttry {\n\t\t\txhr.send(body)\n\t\t} catch (err) {\n\t\t\tprocess.nextTick(function () {\n\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t\treturn\n\t\t}\n\t}\n}\n\n/**\n * Checks if xhr.status is readable and non-zero, indicating no error.\n * Even though the spec says it should be available in readyState 3,\n * accessing it throws an exception in IE8\n */\nfunction statusValid (xhr) {\n\ttry {\n\t\tvar status = xhr.status\n\t\treturn (status !== null && status !== 0)\n\t} catch (e) {\n\t\treturn false\n\t}\n}\n\nClientRequest.prototype._onXHRProgress = function () {\n\tvar self = this\n\n\tself._resetTimers(false)\n\n\tif (!statusValid(self._xhr) || self._destroyed)\n\t\treturn\n\n\tif (!self._response)\n\t\tself._connect()\n\n\tself._response._onXHRProgress(self._resetTimers.bind(self))\n}\n\nClientRequest.prototype._connect = function () {\n\tvar self = this\n\n\tif (self._destroyed)\n\t\treturn\n\n\tself._response = new IncomingMessage(self._xhr, self._fetchResponse, self._mode, self._resetTimers.bind(self))\n\tself._response.on('error', function(err) {\n\t\tself.emit('error', err)\n\t})\n\n\tself.emit('response', self._response)\n}\n\nClientRequest.prototype._write = function (chunk, encoding, cb) {\n\tvar self = this\n\n\tself._body.push(chunk)\n\tcb()\n}\n\nClientRequest.prototype._resetTimers = function (done) {\n\tvar self = this\n\n\tglobal.clearTimeout(self._socketTimer)\n\tself._socketTimer = null\n\n\tif (done) {\n\t\tglobal.clearTimeout(self._fetchTimer)\n\t\tself._fetchTimer = null\n\t} else if (self._socketTimeout) {\n\t\tself._socketTimer = global.setTimeout(function () {\n\t\t\tself.emit('timeout')\n\t\t}, self._socketTimeout)\n\t}\n}\n\nClientRequest.prototype.abort = ClientRequest.prototype.destroy = function (err) {\n\tvar self = this\n\tself._destroyed = true\n\tself._resetTimers(true)\n\tif (self._response)\n\t\tself._response._destroyed = true\n\tif (self._xhr)\n\t\tself._xhr.abort()\n\telse if (self._fetchAbortController)\n\t\tself._fetchAbortController.abort()\n\n\tif (err)\n\t\tself.emit('error', err)\n}\n\nClientRequest.prototype.end = function (data, encoding, cb) {\n\tvar self = this\n\tif (typeof data === 'function') {\n\t\tcb = data\n\t\tdata = undefined\n\t}\n\n\tstream.Writable.prototype.end.call(self, data, encoding, cb)\n}\n\nClientRequest.prototype.setTimeout = function (timeout, cb) {\n\tvar self = this\n\n\tif (cb)\n\t\tself.once('timeout', cb)\n\n\tself._socketTimeout = timeout\n\tself._resetTimers(false)\n}\n\nClientRequest.prototype.flushHeaders = function () {}\nClientRequest.prototype.setNoDelay = function () {}\nClientRequest.prototype.setSocketKeepAlive = function () {}\n\n// Taken from http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader%28%29-method\nvar unsafeHeaders = [\n\t'accept-charset',\n\t'accept-encoding',\n\t'access-control-request-headers',\n\t'access-control-request-method',\n\t'connection',\n\t'content-length',\n\t'cookie',\n\t'cookie2',\n\t'date',\n\t'dnt',\n\t'expect',\n\t'host',\n\t'keep-alive',\n\t'origin',\n\t'referer',\n\t'te',\n\t'trailer',\n\t'transfer-encoding',\n\t'upgrade',\n\t'via'\n]\n","var capability = require('./capability')\nvar inherits = require('inherits')\nvar stream = require('readable-stream')\n\nvar rStates = exports.readyStates = {\n\tUNSENT: 0,\n\tOPENED: 1,\n\tHEADERS_RECEIVED: 2,\n\tLOADING: 3,\n\tDONE: 4\n}\n\nvar IncomingMessage = exports.IncomingMessage = function (xhr, response, mode, resetTimers) {\n\tvar self = this\n\tstream.Readable.call(self)\n\n\tself._mode = mode\n\tself.headers = {}\n\tself.rawHeaders = []\n\tself.trailers = {}\n\tself.rawTrailers = []\n\n\t// Fake the 'close' event, but only once 'end' fires\n\tself.on('end', function () {\n\t\t// The nextTick is necessary to prevent the 'request' module from causing an infinite loop\n\t\tprocess.nextTick(function () {\n\t\t\tself.emit('close')\n\t\t})\n\t})\n\n\tif (mode === 'fetch') {\n\t\tself._fetchResponse = response\n\n\t\tself.url = response.url\n\t\tself.statusCode = response.status\n\t\tself.statusMessage = response.statusText\n\t\t\n\t\tresponse.headers.forEach(function (header, key){\n\t\t\tself.headers[key.toLowerCase()] = header\n\t\t\tself.rawHeaders.push(key, header)\n\t\t})\n\n\t\tif (capability.writableStream) {\n\t\t\tvar writable = new WritableStream({\n\t\t\t\twrite: function (chunk) {\n\t\t\t\t\tresetTimers(false)\n\t\t\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\t\t\tif (self._destroyed) {\n\t\t\t\t\t\t\treject()\n\t\t\t\t\t\t} else if(self.push(Buffer.from(chunk))) {\n\t\t\t\t\t\t\tresolve()\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tself._resumeFetch = resolve\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t\tclose: function () {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.push(null)\n\t\t\t\t},\n\t\t\t\tabort: function (err) {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.emit('error', err)\n\t\t\t\t}\n\t\t\t})\n\n\t\t\ttry {\n\t\t\t\tresponse.body.pipeTo(writable).catch(function (err) {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.emit('error', err)\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t} catch (e) {} // pipeTo method isn't defined. Can't find a better way to feature test this\n\t\t}\n\t\t// fallback for when writableStream or pipeTo aren't available\n\t\tvar reader = response.body.getReader()\n\t\tfunction read () {\n\t\t\treader.read().then(function (result) {\n\t\t\t\tif (self._destroyed)\n\t\t\t\t\treturn\n\t\t\t\tresetTimers(result.done)\n\t\t\t\tif (result.done) {\n\t\t\t\t\tself.push(null)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tself.push(Buffer.from(result.value))\n\t\t\t\tread()\n\t\t\t}).catch(function (err) {\n\t\t\t\tresetTimers(true)\n\t\t\t\tif (!self._destroyed)\n\t\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t}\n\t\tread()\n\t} else {\n\t\tself._xhr = xhr\n\t\tself._pos = 0\n\n\t\tself.url = xhr.responseURL\n\t\tself.statusCode = xhr.status\n\t\tself.statusMessage = xhr.statusText\n\t\tvar headers = xhr.getAllResponseHeaders().split(/\\r?\\n/)\n\t\theaders.forEach(function (header) {\n\t\t\tvar matches = header.match(/^([^:]+):\\s*(.*)/)\n\t\t\tif (matches) {\n\t\t\t\tvar key = matches[1].toLowerCase()\n\t\t\t\tif (key === 'set-cookie') {\n\t\t\t\t\tif (self.headers[key] === undefined) {\n\t\t\t\t\t\tself.headers[key] = []\n\t\t\t\t\t}\n\t\t\t\t\tself.headers[key].push(matches[2])\n\t\t\t\t} else if (self.headers[key] !== undefined) {\n\t\t\t\t\tself.headers[key] += ', ' + matches[2]\n\t\t\t\t} else {\n\t\t\t\t\tself.headers[key] = matches[2]\n\t\t\t\t}\n\t\t\t\tself.rawHeaders.push(matches[1], matches[2])\n\t\t\t}\n\t\t})\n\n\t\tself._charset = 'x-user-defined'\n\t\tif (!capability.overrideMimeType) {\n\t\t\tvar mimeType = self.rawHeaders['mime-type']\n\t\t\tif (mimeType) {\n\t\t\t\tvar charsetMatch = mimeType.match(/;\\s*charset=([^;])(;|$)/)\n\t\t\t\tif (charsetMatch) {\n\t\t\t\t\tself._charset = charsetMatch[1].toLowerCase()\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!self._charset)\n\t\t\t\tself._charset = 'utf-8' // best guess\n\t\t}\n\t}\n}\n\ninherits(IncomingMessage, stream.Readable)\n\nIncomingMessage.prototype._read = function () {\n\tvar self = this\n\n\tvar resolve = self._resumeFetch\n\tif (resolve) {\n\t\tself._resumeFetch = null\n\t\tresolve()\n\t}\n}\n\nIncomingMessage.prototype._onXHRProgress = function (resetTimers) {\n\tvar self = this\n\n\tvar xhr = self._xhr\n\n\tvar response = null\n\tswitch (self._mode) {\n\t\tcase 'text':\n\t\t\tresponse = xhr.responseText\n\t\t\tif (response.length > self._pos) {\n\t\t\t\tvar newData = response.substr(self._pos)\n\t\t\t\tif (self._charset === 'x-user-defined') {\n\t\t\t\t\tvar buffer = Buffer.alloc(newData.length)\n\t\t\t\t\tfor (var i = 0; i < newData.length; i++)\n\t\t\t\t\t\tbuffer[i] = newData.charCodeAt(i) & 0xff\n\n\t\t\t\t\tself.push(buffer)\n\t\t\t\t} else {\n\t\t\t\t\tself.push(newData, self._charset)\n\t\t\t\t}\n\t\t\t\tself._pos = response.length\n\t\t\t}\n\t\t\tbreak\n\t\tcase 'arraybuffer':\n\t\t\tif (xhr.readyState !== rStates.DONE || !xhr.response)\n\t\t\t\tbreak\n\t\t\tresponse = xhr.response\n\t\t\tself.push(Buffer.from(new Uint8Array(response)))\n\t\t\tbreak\n\t\tcase 'moz-chunked-arraybuffer': // take whole\n\t\t\tresponse = xhr.response\n\t\t\tif (xhr.readyState !== rStates.LOADING || !response)\n\t\t\t\tbreak\n\t\t\tself.push(Buffer.from(new Uint8Array(response)))\n\t\t\tbreak\n\t\tcase 'ms-stream':\n\t\t\tresponse = xhr.response\n\t\t\tif (xhr.readyState !== rStates.LOADING)\n\t\t\t\tbreak\n\t\t\tvar reader = new global.MSStreamReader()\n\t\t\treader.onprogress = function () {\n\t\t\t\tif (reader.result.byteLength > self._pos) {\n\t\t\t\t\tself.push(Buffer.from(new Uint8Array(reader.result.slice(self._pos))))\n\t\t\t\t\tself._pos = reader.result.byteLength\n\t\t\t\t}\n\t\t\t}\n\t\t\treader.onload = function () {\n\t\t\t\tresetTimers(true)\n\t\t\t\tself.push(null)\n\t\t\t}\n\t\t\t// reader.onerror = ??? // TODO: this\n\t\t\treader.readAsArrayBuffer(response)\n\t\t\tbreak\n\t}\n\n\t// The ms-stream case handles end separately in reader.onload()\n\tif (self._xhr.readyState === rStates.DONE && self._mode !== 'ms-stream') {\n\t\tresetTimers(true)\n\t\tself.push(null)\n\t}\n}\n","module.exports = extend\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key]\n }\n }\n }\n\n return target\n}\n","import { getCurrentUser as A, onRequestTokenUpdate as ue, getRequestToken as de } from \"@nextcloud/auth\";\nimport { getLoggerBuilder as q } from \"@nextcloud/logger\";\nimport { getCanonicalLocale as ae } from \"@nextcloud/l10n\";\nimport { join as le, basename as fe, extname as ce, dirname as I } from \"path\";\nimport { encodePath as he } from \"@nextcloud/paths\";\nimport { generateRemoteUrl as pe } from \"@nextcloud/router\";\nimport { createClient as ge, getPatcher as we } from \"webdav\";\n/**\n * @copyright 2019 Christoph Wurst \n *\n * @author Christoph Wurst \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst me = (e) => e === null ? q().setApp(\"files\").build() : q().setApp(\"files\").setUid(e.uid).build(), m = me(A());\n/**\n * @copyright Copyright (c) 2021 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass Ne {\n _entries = [];\n registerEntry(t) {\n this.validateEntry(t), this._entries.push(t);\n }\n unregisterEntry(t) {\n const r = typeof t == \"string\" ? this.getEntryIndex(t) : this.getEntryIndex(t.id);\n if (r === -1) {\n m.warn(\"Entry not found, nothing removed\", { entry: t, entries: this.getEntries() });\n return;\n }\n this._entries.splice(r, 1);\n }\n /**\n * Get the list of registered entries\n *\n * @param {Folder} context the creation context. Usually the current folder\n */\n getEntries(t) {\n return t ? this._entries.filter((r) => typeof r.enabled == \"function\" ? r.enabled(t) : !0) : this._entries;\n }\n getEntryIndex(t) {\n return this._entries.findIndex((r) => r.id === t);\n }\n validateEntry(t) {\n if (!t.id || !t.displayName || !(t.iconSvgInline || t.iconClass) || !t.handler)\n throw new Error(\"Invalid entry\");\n if (typeof t.id != \"string\" || typeof t.displayName != \"string\")\n throw new Error(\"Invalid id or displayName property\");\n if (t.iconClass && typeof t.iconClass != \"string\" || t.iconSvgInline && typeof t.iconSvgInline != \"string\")\n throw new Error(\"Invalid icon provided\");\n if (t.enabled !== void 0 && typeof t.enabled != \"function\")\n throw new Error(\"Invalid enabled property\");\n if (typeof t.handler != \"function\")\n throw new Error(\"Invalid handler property\");\n if (\"order\" in t && typeof t.order != \"number\")\n throw new Error(\"Invalid order property\");\n if (this.getEntryIndex(t.id) !== -1)\n throw new Error(\"Duplicate entry\");\n }\n}\nconst F = function() {\n return typeof window._nc_newfilemenu > \"u\" && (window._nc_newfilemenu = new Ne(), m.debug(\"NewFileMenu initialized\")), window._nc_newfilemenu;\n};\n/**\n * @copyright 2019 Christoph Wurst \n *\n * @author Christoph Wurst \n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst C = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\"], P = [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\"];\nfunction Yt(e, t = !1, r = !1, s = !1) {\n r = r && !s, typeof e == \"string\" && (e = Number(e));\n let n = e > 0 ? Math.floor(Math.log(e) / Math.log(s ? 1e3 : 1024)) : 0;\n n = Math.min((r ? P.length : C.length) - 1, n);\n const i = r ? P[n] : C[n];\n let d = (e / Math.pow(s ? 1e3 : 1024, n)).toFixed(1);\n return t === !0 && n === 0 ? (d !== \"0.0\" ? \"< 1 \" : \"0 \") + (r ? P[1] : C[1]) : (n < 2 ? d = parseFloat(d).toFixed(0) : d = parseFloat(d).toLocaleString(ae()), d + \" \" + i);\n}\nfunction Jt(e, t = !1) {\n try {\n e = `${e}`.toLocaleLowerCase().replaceAll(/\\s+/g, \"\").replaceAll(\",\", \".\");\n } catch {\n return null;\n }\n const r = e.match(/^([0-9]*(\\.[0-9]*)?)([kmgtp]?)(i?)b?$/);\n if (r === null || r[1] === \".\" || r[1] === \"\")\n return null;\n const s = {\n \"\": 0,\n k: 1,\n m: 2,\n g: 3,\n t: 4,\n p: 5,\n e: 6\n }, n = `${r[1]}`, i = r[4] === \"i\" || t ? 1024 : 1e3;\n return Math.round(Number.parseFloat(n) * i ** s[r[3]]);\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nvar Z = /* @__PURE__ */ ((e) => (e.DEFAULT = \"default\", e.HIDDEN = \"hidden\", e))(Z || {});\nclass Qt {\n _action;\n constructor(t) {\n this.validateAction(t), this._action = t;\n }\n get id() {\n return this._action.id;\n }\n get displayName() {\n return this._action.displayName;\n }\n get title() {\n return this._action.title;\n }\n get iconSvgInline() {\n return this._action.iconSvgInline;\n }\n get enabled() {\n return this._action.enabled;\n }\n get exec() {\n return this._action.exec;\n }\n get execBatch() {\n return this._action.execBatch;\n }\n get order() {\n return this._action.order;\n }\n get parent() {\n return this._action.parent;\n }\n get default() {\n return this._action.default;\n }\n get inline() {\n return this._action.inline;\n }\n get renderInline() {\n return this._action.renderInline;\n }\n validateAction(t) {\n if (!t.id || typeof t.id != \"string\")\n throw new Error(\"Invalid id\");\n if (!t.displayName || typeof t.displayName != \"function\")\n throw new Error(\"Invalid displayName function\");\n if (\"title\" in t && typeof t.title != \"function\")\n throw new Error(\"Invalid title function\");\n if (!t.iconSvgInline || typeof t.iconSvgInline != \"function\")\n throw new Error(\"Invalid iconSvgInline function\");\n if (!t.exec || typeof t.exec != \"function\")\n throw new Error(\"Invalid exec function\");\n if (\"enabled\" in t && typeof t.enabled != \"function\")\n throw new Error(\"Invalid enabled function\");\n if (\"execBatch\" in t && typeof t.execBatch != \"function\")\n throw new Error(\"Invalid execBatch function\");\n if (\"order\" in t && typeof t.order != \"number\")\n throw new Error(\"Invalid order\");\n if (\"parent\" in t && typeof t.parent != \"string\")\n throw new Error(\"Invalid parent\");\n if (t.default && !Object.values(Z).includes(t.default))\n throw new Error(\"Invalid default\");\n if (\"inline\" in t && typeof t.inline != \"function\")\n throw new Error(\"Invalid inline function\");\n if (\"renderInline\" in t && typeof t.renderInline != \"function\")\n throw new Error(\"Invalid renderInline function\");\n }\n}\nconst Dt = function(e) {\n if (typeof window._nc_fileactions > \"u\" && (window._nc_fileactions = [], m.debug(\"FileActions initialized\")), window._nc_fileactions.find((t) => t.id === e.id)) {\n m.error(`FileAction ${e.id} already registered`, { action: e });\n return;\n }\n window._nc_fileactions.push(e);\n}, er = function() {\n return typeof window._nc_fileactions > \"u\" && (window._nc_fileactions = [], m.debug(\"FileActions initialized\")), window._nc_fileactions;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass tr {\n _header;\n constructor(t) {\n this.validateHeader(t), this._header = t;\n }\n get id() {\n return this._header.id;\n }\n get order() {\n return this._header.order;\n }\n get enabled() {\n return this._header.enabled;\n }\n get render() {\n return this._header.render;\n }\n get updated() {\n return this._header.updated;\n }\n validateHeader(t) {\n if (!t.id || !t.render || !t.updated)\n throw new Error(\"Invalid header: id, render and updated are required\");\n if (typeof t.id != \"string\")\n throw new Error(\"Invalid id property\");\n if (t.enabled !== void 0 && typeof t.enabled != \"function\")\n throw new Error(\"Invalid enabled property\");\n if (t.render && typeof t.render != \"function\")\n throw new Error(\"Invalid render property\");\n if (t.updated && typeof t.updated != \"function\")\n throw new Error(\"Invalid updated property\");\n }\n}\nconst rr = function(e) {\n if (typeof window._nc_filelistheader > \"u\" && (window._nc_filelistheader = [], m.debug(\"FileListHeaders initialized\")), window._nc_filelistheader.find((t) => t.id === e.id)) {\n m.error(`Header ${e.id} already registered`, { header: e });\n return;\n }\n window._nc_filelistheader.push(e);\n}, nr = function() {\n return typeof window._nc_filelistheader > \"u\" && (window._nc_filelistheader = [], m.debug(\"FileListHeaders initialized\")), window._nc_filelistheader;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nvar N = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = \"NONE\", e[e.CREATE = 4] = \"CREATE\", e[e.READ = 1] = \"READ\", e[e.UPDATE = 2] = \"UPDATE\", e[e.DELETE = 8] = \"DELETE\", e[e.SHARE = 16] = \"SHARE\", e[e.ALL = 31] = \"ALL\", e))(N || {});\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst j = [\n \"d:getcontentlength\",\n \"d:getcontenttype\",\n \"d:getetag\",\n \"d:getlastmodified\",\n \"d:quota-available-bytes\",\n \"d:resourcetype\",\n \"nc:has-preview\",\n \"nc:is-encrypted\",\n \"nc:mount-type\",\n \"nc:share-attributes\",\n \"oc:comments-unread\",\n \"oc:favorite\",\n \"oc:fileid\",\n \"oc:owner-display-name\",\n \"oc:owner-id\",\n \"oc:permissions\",\n \"oc:share-types\",\n \"oc:size\",\n \"ocs:share-permissions\"\n], Y = {\n d: \"DAV:\",\n nc: \"http://nextcloud.org/ns\",\n oc: \"http://owncloud.org/ns\",\n ocs: \"http://open-collaboration-services.org/ns\"\n}, ir = function(e, t = { nc: \"http://nextcloud.org/ns\" }) {\n typeof window._nc_dav_properties > \"u\" && (window._nc_dav_properties = [...j], window._nc_dav_namespaces = { ...Y });\n const r = { ...window._nc_dav_namespaces, ...t };\n if (window._nc_dav_properties.find((n) => n === e))\n return m.error(`${e} already registered`, { prop: e }), !1;\n if (e.startsWith(\"<\") || e.split(\":\").length !== 2)\n return m.error(`${e} is not valid. See example: 'oc:fileid'`, { prop: e }), !1;\n const s = e.split(\":\")[0];\n return r[s] ? (window._nc_dav_properties.push(e), window._nc_dav_namespaces = r, !0) : (m.error(`${e} namespace unknown`, { prop: e, namespaces: r }), !1);\n}, V = function() {\n return typeof window._nc_dav_properties > \"u\" && (window._nc_dav_properties = [...j]), window._nc_dav_properties.map((e) => `<${e} />`).join(\" \");\n}, L = function() {\n return typeof window._nc_dav_namespaces > \"u\" && (window._nc_dav_namespaces = { ...Y }), Object.keys(window._nc_dav_namespaces).map((e) => `xmlns:${e}=\"${window._nc_dav_namespaces?.[e]}\"`).join(\" \");\n}, sr = function() {\n return `\n\t\t\n\t\t\t\n\t\t\t\t${V()}\n\t\t\t\n\t\t`;\n}, Ee = function() {\n return `\n\t\t\n\t\t\t\n\t\t\t\t${V()}\n\t\t\t\n\t\t\t\n\t\t\t\t1\n\t\t\t\n\t\t`;\n}, or = function(e) {\n return `\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${V()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${A()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${e}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst be = function(e = \"\") {\n let t = N.NONE;\n return e && ((e.includes(\"C\") || e.includes(\"K\")) && (t |= N.CREATE), e.includes(\"G\") && (t |= N.READ), (e.includes(\"W\") || e.includes(\"N\") || e.includes(\"V\")) && (t |= N.UPDATE), e.includes(\"D\") && (t |= N.DELETE), e.includes(\"R\") && (t |= N.SHARE)), t;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nvar R = /* @__PURE__ */ ((e) => (e.Folder = \"folder\", e.File = \"file\", e))(R || {});\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst J = function(e, t) {\n return e.match(t) !== null;\n}, X = (e, t) => {\n if (e.id && typeof e.id != \"number\")\n throw new Error(\"Invalid id type of value\");\n if (!e.source)\n throw new Error(\"Missing mandatory source\");\n try {\n new URL(e.source);\n } catch {\n throw new Error(\"Invalid source format, source must be a valid URL\");\n }\n if (!e.source.startsWith(\"http\"))\n throw new Error(\"Invalid source format, only http(s) is supported\");\n if (e.mtime && !(e.mtime instanceof Date))\n throw new Error(\"Invalid mtime type\");\n if (e.crtime && !(e.crtime instanceof Date))\n throw new Error(\"Invalid crtime type\");\n if (!e.mime || typeof e.mime != \"string\" || !e.mime.match(/^[-\\w.]+\\/[-+\\w.]+$/gi))\n throw new Error(\"Missing or invalid mandatory mime\");\n if (\"size\" in e && typeof e.size != \"number\" && e.size !== void 0)\n throw new Error(\"Invalid size type\");\n if (\"permissions\" in e && e.permissions !== void 0 && !(typeof e.permissions == \"number\" && e.permissions >= N.NONE && e.permissions <= N.ALL))\n throw new Error(\"Invalid permissions\");\n if (e.owner && e.owner !== null && typeof e.owner != \"string\")\n throw new Error(\"Invalid owner type\");\n if (e.attributes && typeof e.attributes != \"object\")\n throw new Error(\"Invalid attributes type\");\n if (e.root && typeof e.root != \"string\")\n throw new Error(\"Invalid root type\");\n if (e.root && !e.root.startsWith(\"/\"))\n throw new Error(\"Root must start with a leading slash\");\n if (e.root && !e.source.includes(e.root))\n throw new Error(\"Root must be part of the source\");\n if (e.root && J(e.source, t)) {\n const r = e.source.match(t)[0];\n if (!e.source.includes(le(r, e.root)))\n throw new Error(\"The root must be relative to the service. e.g /files/emma\");\n }\n if (e.status && !Object.values(Q).includes(e.status))\n throw new Error(\"Status must be a valid NodeStatus\");\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nvar Q = /* @__PURE__ */ ((e) => (e.NEW = \"new\", e.FAILED = \"failed\", e.LOADING = \"loading\", e.LOCKED = \"locked\", e))(Q || {});\nclass D {\n _data;\n _attributes;\n _knownDavService = /(remote|public)\\.php\\/(web)?dav/i;\n constructor(t, r) {\n X(t, r || this._knownDavService), this._data = t;\n const s = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set: (n, i, d) => (this.updateMtime(), Reflect.set(n, i, d)),\n deleteProperty: (n, i) => (this.updateMtime(), Reflect.deleteProperty(n, i))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n };\n this._attributes = new Proxy(t.attributes || {}, s), delete this._data.attributes, r && (this._knownDavService = r);\n }\n /**\n * Get the source url to this object\n */\n get source() {\n return this._data.source.replace(/\\/$/i, \"\");\n }\n /**\n * Get the encoded source url to this object for requests purposes\n */\n get encodedSource() {\n const { origin: t } = new URL(this.source);\n return t + he(this.source.slice(t.length));\n }\n /**\n * Get this object name\n */\n get basename() {\n return fe(this.source);\n }\n /**\n * Get this object's extension\n */\n get extension() {\n return ce(this.source);\n }\n /**\n * Get the directory path leading to this object\n * Will use the relative path to root if available\n */\n get dirname() {\n if (this.root) {\n let r = this.source;\n this.isDavRessource && (r = r.split(this._knownDavService).pop());\n const s = r.indexOf(this.root), n = this.root.replace(/\\/$/, \"\");\n return I(r.slice(s + n.length) || \"/\");\n }\n const t = new URL(this.source);\n return I(t.pathname);\n }\n /**\n * Get the file mime\n */\n get mime() {\n return this._data.mime;\n }\n /**\n * Get the file modification time\n */\n get mtime() {\n return this._data.mtime;\n }\n /**\n * Get the file creation time\n */\n get crtime() {\n return this._data.crtime;\n }\n /**\n * Get the file size\n */\n get size() {\n return this._data.size;\n }\n /**\n * Get the file attribute\n */\n get attributes() {\n return this._attributes;\n }\n /**\n * Get the file permissions\n */\n get permissions() {\n return this.owner === null && !this.isDavRessource ? N.READ : this._data.permissions !== void 0 ? this._data.permissions : N.NONE;\n }\n /**\n * Get the file owner\n */\n get owner() {\n return this.isDavRessource ? this._data.owner : null;\n }\n /**\n * Is this a dav-related ressource ?\n */\n get isDavRessource() {\n return J(this.source, this._knownDavService);\n }\n /**\n * Get the dav root of this object\n */\n get root() {\n return this._data.root ? this._data.root.replace(/^(.+)\\/$/, \"$1\") : this.isDavRessource && I(this.source).split(this._knownDavService).pop() || null;\n }\n /**\n * Get the absolute path of this object relative to the root\n */\n get path() {\n if (this.root) {\n let t = this.source;\n this.isDavRessource && (t = t.split(this._knownDavService).pop());\n const r = t.indexOf(this.root), s = this.root.replace(/\\/$/, \"\");\n return t.slice(r + s.length) || \"/\";\n }\n return (this.dirname + \"/\" + this.basename).replace(/\\/\\//g, \"/\");\n }\n /**\n * Get the node id if defined.\n * Will look for the fileid in attributes if undefined.\n */\n get fileid() {\n return this._data?.id || this.attributes?.fileid;\n }\n /**\n * Get the node status.\n */\n get status() {\n return this._data?.status;\n }\n /**\n * Set the node status.\n */\n set status(t) {\n this._data.status = t;\n }\n /**\n * Move the node to a new destination\n *\n * @param {string} destination the new source.\n * e.g. https://cloud.domain.com/remote.php/dav/files/emma/Photos/picture.jpg\n */\n move(t) {\n X({ ...this._data, source: t }, this._knownDavService), this._data.source = t, this.updateMtime();\n }\n /**\n * Rename the node\n * This aliases the move method for easier usage\n *\n * @param basename The new name of the node\n */\n rename(t) {\n if (t.includes(\"/\"))\n throw new Error(\"Invalid basename\");\n this.move(I(this.source) + \"/\" + t);\n }\n /**\n * Update the mtime if exists.\n */\n updateMtime() {\n this._data.mtime && (this._data.mtime = /* @__PURE__ */ new Date());\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass ye extends D {\n get type() {\n return R.File;\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass _e extends D {\n constructor(t) {\n super({\n ...t,\n mime: \"httpd/unix-directory\"\n });\n }\n get type() {\n return R.Folder;\n }\n get extension() {\n return null;\n }\n get mime() {\n return \"httpd/unix-directory\";\n }\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst ee = `/files/${A()?.uid}`, te = pe(\"dav\"), ur = function(e = te, t = {}) {\n const r = ge(e, { headers: t });\n function s(i) {\n r.setHeaders({\n ...t,\n // Add this so the server knows it is an request from the browser\n \"X-Requested-With\": \"XMLHttpRequest\",\n // Inject user auth\n requesttoken: i ?? \"\"\n });\n }\n return ue(s), s(de()), we().patch(\"fetch\", (i, d) => {\n const u = d.headers;\n return u?.method && (d.method = u.method, delete u.method), fetch(i, d);\n }), r;\n}, dr = async (e, t = \"/\", r = ee) => (await e.getDirectoryContents(`${r}${t}`, {\n details: !0,\n data: Ee(),\n headers: {\n // see davGetClient for patched webdav client\n method: \"REPORT\"\n },\n includeSelf: !0\n})).data.filter((n) => n.filename !== t).map((n) => ve(n, r)), ve = function(e, t = ee, r = te) {\n const s = e.props, n = be(s?.permissions), i = s?.[\"owner-id\"] || A()?.uid, d = {\n id: s?.fileid || 0,\n source: `${r}${e.filename}`,\n mtime: new Date(Date.parse(e.lastmod)),\n mime: e.mime,\n size: s?.size || Number.parseInt(s.getcontentlength || \"0\"),\n permissions: n,\n owner: i,\n root: t,\n attributes: {\n ...e,\n ...s,\n hasPreview: s?.[\"has-preview\"]\n }\n };\n return delete d.attributes?.props, e.type === \"file\" ? new ye(d) : new _e(d);\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass Te {\n _views = [];\n _currentView = null;\n register(t) {\n if (this._views.find((r) => r.id === t.id))\n throw new Error(`View id ${t.id} is already registered`);\n this._views.push(t);\n }\n remove(t) {\n const r = this._views.findIndex((s) => s.id === t);\n r !== -1 && this._views.splice(r, 1);\n }\n get views() {\n return this._views;\n }\n setActive(t) {\n this._currentView = t;\n }\n get active() {\n return this._currentView;\n }\n}\nconst ar = function() {\n return typeof window._nc_navigation > \"u\" && (window._nc_navigation = new Te(), m.debug(\"Navigation service initialized\")), window._nc_navigation;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass Ie {\n _column;\n constructor(t) {\n Ae(t), this._column = t;\n }\n get id() {\n return this._column.id;\n }\n get title() {\n return this._column.title;\n }\n get render() {\n return this._column.render;\n }\n get sort() {\n return this._column.sort;\n }\n get summary() {\n return this._column.summary;\n }\n}\nconst Ae = function(e) {\n if (!e.id || typeof e.id != \"string\")\n throw new Error(\"A column id is required\");\n if (!e.title || typeof e.title != \"string\")\n throw new Error(\"A column title is required\");\n if (!e.render || typeof e.render != \"function\")\n throw new Error(\"A render function is required\");\n if (e.sort && typeof e.sort != \"function\")\n throw new Error(\"Column sortFunction must be a function\");\n if (e.summary && typeof e.summary != \"function\")\n throw new Error(\"Column summary must be a function\");\n return !0;\n};\nvar S = {}, O = {};\n(function(e) {\n const t = \":A-Za-z_\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\", r = t + \"\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\", s = \"[\" + t + \"][\" + r + \"]*\", n = new RegExp(\"^\" + s + \"$\"), i = function(u, o) {\n const a = [];\n let l = o.exec(u);\n for (; l; ) {\n const f = [];\n f.startIndex = o.lastIndex - l[0].length;\n const c = l.length;\n for (let g = 0; g < c; g++)\n f.push(l[g]);\n a.push(f), l = o.exec(u);\n }\n return a;\n }, d = function(u) {\n const o = n.exec(u);\n return !(o === null || typeof o > \"u\");\n };\n e.isExist = function(u) {\n return typeof u < \"u\";\n }, e.isEmptyObject = function(u) {\n return Object.keys(u).length === 0;\n }, e.merge = function(u, o, a) {\n if (o) {\n const l = Object.keys(o), f = l.length;\n for (let c = 0; c < f; c++)\n a === \"strict\" ? u[l[c]] = [o[l[c]]] : u[l[c]] = o[l[c]];\n }\n }, e.getValue = function(u) {\n return e.isExist(u) ? u : \"\";\n }, e.isName = d, e.getAllMatches = i, e.nameRegexp = s;\n})(O);\nconst M = O, Oe = {\n allowBooleanAttributes: !1,\n //A tag can have attributes without any value\n unpairedTags: []\n};\nS.validate = function(e, t) {\n t = Object.assign({}, Oe, t);\n const r = [];\n let s = !1, n = !1;\n e[0] === \"\\uFEFF\" && (e = e.substr(1));\n for (let i = 0; i < e.length; i++)\n if (e[i] === \"<\" && e[i + 1] === \"?\") {\n if (i += 2, i = G(e, i), i.err)\n return i;\n } else if (e[i] === \"<\") {\n let d = i;\n if (i++, e[i] === \"!\") {\n i = z(e, i);\n continue;\n } else {\n let u = !1;\n e[i] === \"/\" && (u = !0, i++);\n let o = \"\";\n for (; i < e.length && e[i] !== \">\" && e[i] !== \" \" && e[i] !== \"\t\" && e[i] !== `\n` && e[i] !== \"\\r\"; i++)\n o += e[i];\n if (o = o.trim(), o[o.length - 1] === \"/\" && (o = o.substring(0, o.length - 1), i--), !Re(o)) {\n let f;\n return o.trim().length === 0 ? f = \"Invalid space after '<'.\" : f = \"Tag '\" + o + \"' is an invalid name.\", p(\"InvalidTag\", f, w(e, i));\n }\n const a = xe(e, i);\n if (a === !1)\n return p(\"InvalidAttr\", \"Attributes for '\" + o + \"' have open quote.\", w(e, i));\n let l = a.value;\n if (i = a.index, l[l.length - 1] === \"/\") {\n const f = i - l.length;\n l = l.substring(0, l.length - 1);\n const c = H(l, t);\n if (c === !0)\n s = !0;\n else\n return p(c.err.code, c.err.msg, w(e, f + c.err.line));\n } else if (u)\n if (a.tagClosed) {\n if (l.trim().length > 0)\n return p(\"InvalidTag\", \"Closing tag '\" + o + \"' can't have attributes or invalid starting.\", w(e, d));\n {\n const f = r.pop();\n if (o !== f.tagName) {\n let c = w(e, f.tagStartPos);\n return p(\n \"InvalidTag\",\n \"Expected closing tag '\" + f.tagName + \"' (opened in line \" + c.line + \", col \" + c.col + \") instead of closing tag '\" + o + \"'.\",\n w(e, d)\n );\n }\n r.length == 0 && (n = !0);\n }\n } else\n return p(\"InvalidTag\", \"Closing tag '\" + o + \"' doesn't have proper closing.\", w(e, i));\n else {\n const f = H(l, t);\n if (f !== !0)\n return p(f.err.code, f.err.msg, w(e, i - l.length + f.err.line));\n if (n === !0)\n return p(\"InvalidXml\", \"Multiple possible root nodes found.\", w(e, i));\n t.unpairedTags.indexOf(o) !== -1 || r.push({ tagName: o, tagStartPos: d }), s = !0;\n }\n for (i++; i < e.length; i++)\n if (e[i] === \"<\")\n if (e[i + 1] === \"!\") {\n i++, i = z(e, i);\n continue;\n } else if (e[i + 1] === \"?\") {\n if (i = G(e, ++i), i.err)\n return i;\n } else\n break;\n else if (e[i] === \"&\") {\n const f = Ve(e, i);\n if (f == -1)\n return p(\"InvalidChar\", \"char '&' is not expected.\", w(e, i));\n i = f;\n } else if (n === !0 && !U(e[i]))\n return p(\"InvalidXml\", \"Extra text at the end\", w(e, i));\n e[i] === \"<\" && i--;\n }\n } else {\n if (U(e[i]))\n continue;\n return p(\"InvalidChar\", \"char '\" + e[i] + \"' is not expected.\", w(e, i));\n }\n if (s) {\n if (r.length == 1)\n return p(\"InvalidTag\", \"Unclosed tag '\" + r[0].tagName + \"'.\", w(e, r[0].tagStartPos));\n if (r.length > 0)\n return p(\"InvalidXml\", \"Invalid '\" + JSON.stringify(r.map((i) => i.tagName), null, 4).replace(/\\r?\\n/g, \"\") + \"' found.\", { line: 1, col: 1 });\n } else\n return p(\"InvalidXml\", \"Start tag expected.\", 1);\n return !0;\n};\nfunction U(e) {\n return e === \" \" || e === \"\t\" || e === `\n` || e === \"\\r\";\n}\nfunction G(e, t) {\n const r = t;\n for (; t < e.length; t++)\n if (e[t] == \"?\" || e[t] == \" \") {\n const s = e.substr(r, t - r);\n if (t > 5 && s === \"xml\")\n return p(\"InvalidXml\", \"XML declaration allowed only at the start of the document.\", w(e, t));\n if (e[t] == \"?\" && e[t + 1] == \">\") {\n t++;\n break;\n } else\n continue;\n }\n return t;\n}\nfunction z(e, t) {\n if (e.length > t + 5 && e[t + 1] === \"-\" && e[t + 2] === \"-\") {\n for (t += 3; t < e.length; t++)\n if (e[t] === \"-\" && e[t + 1] === \"-\" && e[t + 2] === \">\") {\n t += 2;\n break;\n }\n } else if (e.length > t + 8 && e[t + 1] === \"D\" && e[t + 2] === \"O\" && e[t + 3] === \"C\" && e[t + 4] === \"T\" && e[t + 5] === \"Y\" && e[t + 6] === \"P\" && e[t + 7] === \"E\") {\n let r = 1;\n for (t += 8; t < e.length; t++)\n if (e[t] === \"<\")\n r++;\n else if (e[t] === \">\" && (r--, r === 0))\n break;\n } else if (e.length > t + 9 && e[t + 1] === \"[\" && e[t + 2] === \"C\" && e[t + 3] === \"D\" && e[t + 4] === \"A\" && e[t + 5] === \"T\" && e[t + 6] === \"A\" && e[t + 7] === \"[\") {\n for (t += 8; t < e.length; t++)\n if (e[t] === \"]\" && e[t + 1] === \"]\" && e[t + 2] === \">\") {\n t += 2;\n break;\n }\n }\n return t;\n}\nconst Ce = '\"', Pe = \"'\";\nfunction xe(e, t) {\n let r = \"\", s = \"\", n = !1;\n for (; t < e.length; t++) {\n if (e[t] === Ce || e[t] === Pe)\n s === \"\" ? s = e[t] : s !== e[t] || (s = \"\");\n else if (e[t] === \">\" && s === \"\") {\n n = !0;\n break;\n }\n r += e[t];\n }\n return s !== \"\" ? !1 : {\n value: r,\n index: t,\n tagClosed: n\n };\n}\nconst $e = new RegExp(`(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*(['\"])(([\\\\s\\\\S])*?)\\\\5)?`, \"g\");\nfunction H(e, t) {\n const r = M.getAllMatches(e, $e), s = {};\n for (let n = 0; n < r.length; n++) {\n if (r[n][1].length === 0)\n return p(\"InvalidAttr\", \"Attribute '\" + r[n][2] + \"' has no space in starting.\", v(r[n]));\n if (r[n][3] !== void 0 && r[n][4] === void 0)\n return p(\"InvalidAttr\", \"Attribute '\" + r[n][2] + \"' is without value.\", v(r[n]));\n if (r[n][3] === void 0 && !t.allowBooleanAttributes)\n return p(\"InvalidAttr\", \"boolean attribute '\" + r[n][2] + \"' is not allowed.\", v(r[n]));\n const i = r[n][2];\n if (!Le(i))\n return p(\"InvalidAttr\", \"Attribute '\" + i + \"' is an invalid name.\", v(r[n]));\n if (!s.hasOwnProperty(i))\n s[i] = 1;\n else\n return p(\"InvalidAttr\", \"Attribute '\" + i + \"' is repeated.\", v(r[n]));\n }\n return !0;\n}\nfunction Fe(e, t) {\n let r = /\\d/;\n for (e[t] === \"x\" && (t++, r = /[\\da-fA-F]/); t < e.length; t++) {\n if (e[t] === \";\")\n return t;\n if (!e[t].match(r))\n break;\n }\n return -1;\n}\nfunction Ve(e, t) {\n if (t++, e[t] === \";\")\n return -1;\n if (e[t] === \"#\")\n return t++, Fe(e, t);\n let r = 0;\n for (; t < e.length; t++, r++)\n if (!(e[t].match(/\\w/) && r < 20)) {\n if (e[t] === \";\")\n break;\n return -1;\n }\n return t;\n}\nfunction p(e, t, r) {\n return {\n err: {\n code: e,\n msg: t,\n line: r.line || r,\n col: r.col\n }\n };\n}\nfunction Le(e) {\n return M.isName(e);\n}\nfunction Re(e) {\n return M.isName(e);\n}\nfunction w(e, t) {\n const r = e.substring(0, t).split(/\\r?\\n/);\n return {\n line: r.length,\n // column number is last line's length + 1, because column numbering starts at 1:\n col: r[r.length - 1].length + 1\n };\n}\nfunction v(e) {\n return e.startIndex + e[1].length;\n}\nvar k = {};\nconst re = {\n preserveOrder: !1,\n attributeNamePrefix: \"@_\",\n attributesGroupName: !1,\n textNodeName: \"#text\",\n ignoreAttributes: !0,\n removeNSPrefix: !1,\n // remove NS from tag name or attribute name if true\n allowBooleanAttributes: !1,\n //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseTagValue: !0,\n parseAttributeValue: !1,\n trimValues: !0,\n //Trim string values of tag and attributes\n cdataPropName: !1,\n numberParseOptions: {\n hex: !0,\n leadingZeros: !0,\n eNotation: !0\n },\n tagValueProcessor: function(e, t) {\n return t;\n },\n attributeValueProcessor: function(e, t) {\n return t;\n },\n stopNodes: [],\n //nested tags will not be parsed even for errors\n alwaysCreateTextNode: !1,\n isArray: () => !1,\n commentPropName: !1,\n unpairedTags: [],\n processEntities: !0,\n htmlEntities: !1,\n ignoreDeclaration: !1,\n ignorePiTags: !1,\n transformTagName: !1,\n transformAttributeName: !1,\n updateTag: function(e, t, r) {\n return e;\n }\n // skipEmptyListItem: false\n}, Se = function(e) {\n return Object.assign({}, re, e);\n};\nk.buildOptions = Se;\nk.defaultOptions = re;\nclass Me {\n constructor(t) {\n this.tagname = t, this.child = [], this[\":@\"] = {};\n }\n add(t, r) {\n t === \"__proto__\" && (t = \"#__proto__\"), this.child.push({ [t]: r });\n }\n addChild(t) {\n t.tagname === \"__proto__\" && (t.tagname = \"#__proto__\"), t[\":@\"] && Object.keys(t[\":@\"]).length > 0 ? this.child.push({ [t.tagname]: t.child, \":@\": t[\":@\"] }) : this.child.push({ [t.tagname]: t.child });\n }\n}\nvar ke = Me;\nconst Be = O;\nfunction qe(e, t) {\n const r = {};\n if (e[t + 3] === \"O\" && e[t + 4] === \"C\" && e[t + 5] === \"T\" && e[t + 6] === \"Y\" && e[t + 7] === \"P\" && e[t + 8] === \"E\") {\n t = t + 9;\n let s = 1, n = !1, i = !1, d = \"\";\n for (; t < e.length; t++)\n if (e[t] === \"<\" && !i) {\n if (n && Ge(e, t))\n t += 7, [entityName, val, t] = Xe(e, t + 1), val.indexOf(\"&\") === -1 && (r[We(entityName)] = {\n regx: RegExp(`&${entityName};`, \"g\"),\n val\n });\n else if (n && ze(e, t))\n t += 8;\n else if (n && He(e, t))\n t += 8;\n else if (n && Ke(e, t))\n t += 9;\n else if (Ue)\n i = !0;\n else\n throw new Error(\"Invalid DOCTYPE\");\n s++, d = \"\";\n } else if (e[t] === \">\") {\n if (i ? e[t - 1] === \"-\" && e[t - 2] === \"-\" && (i = !1, s--) : s--, s === 0)\n break;\n } else\n e[t] === \"[\" ? n = !0 : d += e[t];\n if (s !== 0)\n throw new Error(\"Unclosed DOCTYPE\");\n } else\n throw new Error(\"Invalid Tag instead of DOCTYPE\");\n return { entities: r, i: t };\n}\nfunction Xe(e, t) {\n let r = \"\";\n for (; t < e.length && e[t] !== \"'\" && e[t] !== '\"'; t++)\n r += e[t];\n if (r = r.trim(), r.indexOf(\" \") !== -1)\n throw new Error(\"External entites are not supported\");\n const s = e[t++];\n let n = \"\";\n for (; t < e.length && e[t] !== s; t++)\n n += e[t];\n return [r, n, t];\n}\nfunction Ue(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"-\" && e[t + 3] === \"-\";\n}\nfunction Ge(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"E\" && e[t + 3] === \"N\" && e[t + 4] === \"T\" && e[t + 5] === \"I\" && e[t + 6] === \"T\" && e[t + 7] === \"Y\";\n}\nfunction ze(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"E\" && e[t + 3] === \"L\" && e[t + 4] === \"E\" && e[t + 5] === \"M\" && e[t + 6] === \"E\" && e[t + 7] === \"N\" && e[t + 8] === \"T\";\n}\nfunction He(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"A\" && e[t + 3] === \"T\" && e[t + 4] === \"T\" && e[t + 5] === \"L\" && e[t + 6] === \"I\" && e[t + 7] === \"S\" && e[t + 8] === \"T\";\n}\nfunction Ke(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"N\" && e[t + 3] === \"O\" && e[t + 4] === \"T\" && e[t + 5] === \"A\" && e[t + 6] === \"T\" && e[t + 7] === \"I\" && e[t + 8] === \"O\" && e[t + 9] === \"N\";\n}\nfunction We(e) {\n if (Be.isName(e))\n return e;\n throw new Error(`Invalid entity name ${e}`);\n}\nvar Ze = qe;\nconst je = /^[-+]?0x[a-fA-F0-9]+$/, Ye = /^([\\-\\+])?(0*)(\\.[0-9]+([eE]\\-?[0-9]+)?|[0-9]+(\\.[0-9]+([eE]\\-?[0-9]+)?)?)$/;\n!Number.parseInt && window.parseInt && (Number.parseInt = window.parseInt);\n!Number.parseFloat && window.parseFloat && (Number.parseFloat = window.parseFloat);\nconst Je = {\n hex: !0,\n leadingZeros: !0,\n decimalPoint: \".\",\n eNotation: !0\n //skipLike: /regex/\n};\nfunction Qe(e, t = {}) {\n if (t = Object.assign({}, Je, t), !e || typeof e != \"string\")\n return e;\n let r = e.trim();\n if (t.skipLike !== void 0 && t.skipLike.test(r))\n return e;\n if (t.hex && je.test(r))\n return Number.parseInt(r, 16);\n {\n const s = Ye.exec(r);\n if (s) {\n const n = s[1], i = s[2];\n let d = De(s[3]);\n const u = s[4] || s[6];\n if (!t.leadingZeros && i.length > 0 && n && r[2] !== \".\")\n return e;\n if (!t.leadingZeros && i.length > 0 && !n && r[1] !== \".\")\n return e;\n {\n const o = Number(r), a = \"\" + o;\n return a.search(/[eE]/) !== -1 || u ? t.eNotation ? o : e : r.indexOf(\".\") !== -1 ? a === \"0\" && d === \"\" || a === d || n && a === \"-\" + d ? o : e : i ? d === a || n + d === a ? o : e : r === a || r === n + a ? o : e;\n }\n } else\n return e;\n }\n}\nfunction De(e) {\n return e && e.indexOf(\".\") !== -1 && (e = e.replace(/0+$/, \"\"), e === \".\" ? e = \"0\" : e[0] === \".\" ? e = \"0\" + e : e[e.length - 1] === \".\" && (e = e.substr(0, e.length - 1))), e;\n}\nvar et = Qe;\nconst B = O, T = ke, tt = Ze, rt = et;\n\"<((!\\\\[CDATA\\\\[([\\\\s\\\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\\\/)(NAME)\\\\s*>))([^<]*)\".replace(/NAME/g, B.nameRegexp);\nlet nt = class {\n constructor(t) {\n this.options = t, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = {\n apos: { regex: /&(apos|#39|#x27);/g, val: \"'\" },\n gt: { regex: /&(gt|#62|#x3E);/g, val: \">\" },\n lt: { regex: /&(lt|#60|#x3C);/g, val: \"<\" },\n quot: { regex: /&(quot|#34|#x22);/g, val: '\"' }\n }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: \"&\" }, this.htmlEntities = {\n space: { regex: /&(nbsp|#160);/g, val: \" \" },\n // \"lt\" : { regex: /&(lt|#60);/g, val: \"<\" },\n // \"gt\" : { regex: /&(gt|#62);/g, val: \">\" },\n // \"amp\" : { regex: /&(amp|#38);/g, val: \"&\" },\n // \"quot\" : { regex: /&(quot|#34);/g, val: \"\\\"\" },\n // \"apos\" : { regex: /&(apos|#39);/g, val: \"'\" },\n cent: { regex: /&(cent|#162);/g, val: \"¢\" },\n pound: { regex: /&(pound|#163);/g, val: \"£\" },\n yen: { regex: /&(yen|#165);/g, val: \"¥\" },\n euro: { regex: /&(euro|#8364);/g, val: \"€\" },\n copyright: { regex: /&(copy|#169);/g, val: \"©\" },\n reg: { regex: /&(reg|#174);/g, val: \"®\" },\n inr: { regex: /&(inr|#8377);/g, val: \"₹\" }\n }, this.addExternalEntities = it, this.parseXml = at, this.parseTextData = st, this.resolveNameSpace = ot, this.buildAttributesMap = dt, this.isItStopNode = ht, this.replaceEntitiesValue = ft, this.readStopNodeData = gt, this.saveTextToParentTag = ct, this.addChild = lt;\n }\n};\nfunction it(e) {\n const t = Object.keys(e);\n for (let r = 0; r < t.length; r++) {\n const s = t[r];\n this.lastEntities[s] = {\n regex: new RegExp(\"&\" + s + \";\", \"g\"),\n val: e[s]\n };\n }\n}\nfunction st(e, t, r, s, n, i, d) {\n if (e !== void 0 && (this.options.trimValues && !s && (e = e.trim()), e.length > 0)) {\n d || (e = this.replaceEntitiesValue(e));\n const u = this.options.tagValueProcessor(t, e, r, n, i);\n return u == null ? e : typeof u != typeof e || u !== e ? u : this.options.trimValues ? $(e, this.options.parseTagValue, this.options.numberParseOptions) : e.trim() === e ? $(e, this.options.parseTagValue, this.options.numberParseOptions) : e;\n }\n}\nfunction ot(e) {\n if (this.options.removeNSPrefix) {\n const t = e.split(\":\"), r = e.charAt(0) === \"/\" ? \"/\" : \"\";\n if (t[0] === \"xmlns\")\n return \"\";\n t.length === 2 && (e = r + t[1]);\n }\n return e;\n}\nconst ut = new RegExp(`([^\\\\s=]+)\\\\s*(=\\\\s*(['\"])([\\\\s\\\\S]*?)\\\\3)?`, \"gm\");\nfunction dt(e, t, r) {\n if (!this.options.ignoreAttributes && typeof e == \"string\") {\n const s = B.getAllMatches(e, ut), n = s.length, i = {};\n for (let d = 0; d < n; d++) {\n const u = this.resolveNameSpace(s[d][1]);\n let o = s[d][4], a = this.options.attributeNamePrefix + u;\n if (u.length)\n if (this.options.transformAttributeName && (a = this.options.transformAttributeName(a)), a === \"__proto__\" && (a = \"#__proto__\"), o !== void 0) {\n this.options.trimValues && (o = o.trim()), o = this.replaceEntitiesValue(o);\n const l = this.options.attributeValueProcessor(u, o, t);\n l == null ? i[a] = o : typeof l != typeof o || l !== o ? i[a] = l : i[a] = $(\n o,\n this.options.parseAttributeValue,\n this.options.numberParseOptions\n );\n } else\n this.options.allowBooleanAttributes && (i[a] = !0);\n }\n if (!Object.keys(i).length)\n return;\n if (this.options.attributesGroupName) {\n const d = {};\n return d[this.options.attributesGroupName] = i, d;\n }\n return i;\n }\n}\nconst at = function(e) {\n e = e.replace(/\\r\\n?/g, `\n`);\n const t = new T(\"!xml\");\n let r = t, s = \"\", n = \"\";\n for (let i = 0; i < e.length; i++)\n if (e[i] === \"<\")\n if (e[i + 1] === \"/\") {\n const u = y(e, \">\", i, \"Closing Tag is not closed.\");\n let o = e.substring(i + 2, u).trim();\n if (this.options.removeNSPrefix) {\n const f = o.indexOf(\":\");\n f !== -1 && (o = o.substr(f + 1));\n }\n this.options.transformTagName && (o = this.options.transformTagName(o)), r && (s = this.saveTextToParentTag(s, r, n));\n const a = n.substring(n.lastIndexOf(\".\") + 1);\n if (o && this.options.unpairedTags.indexOf(o) !== -1)\n throw new Error(`Unpaired tag can not be used as closing tag: `);\n let l = 0;\n a && this.options.unpairedTags.indexOf(a) !== -1 ? (l = n.lastIndexOf(\".\", n.lastIndexOf(\".\") - 1), this.tagsNodeStack.pop()) : l = n.lastIndexOf(\".\"), n = n.substring(0, l), r = this.tagsNodeStack.pop(), s = \"\", i = u;\n } else if (e[i + 1] === \"?\") {\n let u = x(e, i, !1, \"?>\");\n if (!u)\n throw new Error(\"Pi Tag is not closed.\");\n if (s = this.saveTextToParentTag(s, r, n), !(this.options.ignoreDeclaration && u.tagName === \"?xml\" || this.options.ignorePiTags)) {\n const o = new T(u.tagName);\n o.add(this.options.textNodeName, \"\"), u.tagName !== u.tagExp && u.attrExpPresent && (o[\":@\"] = this.buildAttributesMap(u.tagExp, n, u.tagName)), this.addChild(r, o, n);\n }\n i = u.closeIndex + 1;\n } else if (e.substr(i + 1, 3) === \"!--\") {\n const u = y(e, \"-->\", i + 4, \"Comment is not closed.\");\n if (this.options.commentPropName) {\n const o = e.substring(i + 4, u - 2);\n s = this.saveTextToParentTag(s, r, n), r.add(this.options.commentPropName, [{ [this.options.textNodeName]: o }]);\n }\n i = u;\n } else if (e.substr(i + 1, 2) === \"!D\") {\n const u = tt(e, i);\n this.docTypeEntities = u.entities, i = u.i;\n } else if (e.substr(i + 1, 2) === \"![\") {\n const u = y(e, \"]]>\", i, \"CDATA is not closed.\") - 2, o = e.substring(i + 9, u);\n if (s = this.saveTextToParentTag(s, r, n), this.options.cdataPropName)\n r.add(this.options.cdataPropName, [{ [this.options.textNodeName]: o }]);\n else {\n let a = this.parseTextData(o, r.tagname, n, !0, !1, !0);\n a == null && (a = \"\"), r.add(this.options.textNodeName, a);\n }\n i = u + 2;\n } else {\n let u = x(e, i, this.options.removeNSPrefix), o = u.tagName;\n const a = u.rawTagName;\n let l = u.tagExp, f = u.attrExpPresent, c = u.closeIndex;\n this.options.transformTagName && (o = this.options.transformTagName(o)), r && s && r.tagname !== \"!xml\" && (s = this.saveTextToParentTag(s, r, n, !1));\n const g = r;\n if (g && this.options.unpairedTags.indexOf(g.tagname) !== -1 && (r = this.tagsNodeStack.pop(), n = n.substring(0, n.lastIndexOf(\".\"))), o !== t.tagname && (n += n ? \".\" + o : o), this.isItStopNode(this.options.stopNodes, n, o)) {\n let h = \"\";\n if (l.length > 0 && l.lastIndexOf(\"/\") === l.length - 1)\n i = u.closeIndex;\n else if (this.options.unpairedTags.indexOf(o) !== -1)\n i = u.closeIndex;\n else {\n const E = this.readStopNodeData(e, a, c + 1);\n if (!E)\n throw new Error(`Unexpected end of ${a}`);\n i = E.i, h = E.tagContent;\n }\n const _ = new T(o);\n o !== l && f && (_[\":@\"] = this.buildAttributesMap(l, n, o)), h && (h = this.parseTextData(h, o, n, !0, f, !0, !0)), n = n.substr(0, n.lastIndexOf(\".\")), _.add(this.options.textNodeName, h), this.addChild(r, _, n);\n } else {\n if (l.length > 0 && l.lastIndexOf(\"/\") === l.length - 1) {\n o[o.length - 1] === \"/\" ? (o = o.substr(0, o.length - 1), n = n.substr(0, n.length - 1), l = o) : l = l.substr(0, l.length - 1), this.options.transformTagName && (o = this.options.transformTagName(o));\n const h = new T(o);\n o !== l && f && (h[\":@\"] = this.buildAttributesMap(l, n, o)), this.addChild(r, h, n), n = n.substr(0, n.lastIndexOf(\".\"));\n } else {\n const h = new T(o);\n this.tagsNodeStack.push(r), o !== l && f && (h[\":@\"] = this.buildAttributesMap(l, n, o)), this.addChild(r, h, n), r = h;\n }\n s = \"\", i = c;\n }\n }\n else\n s += e[i];\n return t.child;\n};\nfunction lt(e, t, r) {\n const s = this.options.updateTag(t.tagname, r, t[\":@\"]);\n s === !1 || (typeof s == \"string\" && (t.tagname = s), e.addChild(t));\n}\nconst ft = function(e) {\n if (this.options.processEntities) {\n for (let t in this.docTypeEntities) {\n const r = this.docTypeEntities[t];\n e = e.replace(r.regx, r.val);\n }\n for (let t in this.lastEntities) {\n const r = this.lastEntities[t];\n e = e.replace(r.regex, r.val);\n }\n if (this.options.htmlEntities)\n for (let t in this.htmlEntities) {\n const r = this.htmlEntities[t];\n e = e.replace(r.regex, r.val);\n }\n e = e.replace(this.ampEntity.regex, this.ampEntity.val);\n }\n return e;\n};\nfunction ct(e, t, r, s) {\n return e && (s === void 0 && (s = Object.keys(t.child).length === 0), e = this.parseTextData(\n e,\n t.tagname,\n r,\n !1,\n t[\":@\"] ? Object.keys(t[\":@\"]).length !== 0 : !1,\n s\n ), e !== void 0 && e !== \"\" && t.add(this.options.textNodeName, e), e = \"\"), e;\n}\nfunction ht(e, t, r) {\n const s = \"*.\" + r;\n for (const n in e) {\n const i = e[n];\n if (s === i || t === i)\n return !0;\n }\n return !1;\n}\nfunction pt(e, t, r = \">\") {\n let s, n = \"\";\n for (let i = t; i < e.length; i++) {\n let d = e[i];\n if (s)\n d === s && (s = \"\");\n else if (d === '\"' || d === \"'\")\n s = d;\n else if (d === r[0])\n if (r[1]) {\n if (e[i + 1] === r[1])\n return {\n data: n,\n index: i\n };\n } else\n return {\n data: n,\n index: i\n };\n else\n d === \"\t\" && (d = \" \");\n n += d;\n }\n}\nfunction y(e, t, r, s) {\n const n = e.indexOf(t, r);\n if (n === -1)\n throw new Error(s);\n return n + t.length - 1;\n}\nfunction x(e, t, r, s = \">\") {\n const n = pt(e, t + 1, s);\n if (!n)\n return;\n let i = n.data;\n const d = n.index, u = i.search(/\\s/);\n let o = i, a = !0;\n u !== -1 && (o = i.substr(0, u).replace(/\\s\\s*$/, \"\"), i = i.substr(u + 1));\n const l = o;\n if (r) {\n const f = o.indexOf(\":\");\n f !== -1 && (o = o.substr(f + 1), a = o !== n.data.substr(f + 1));\n }\n return {\n tagName: o,\n tagExp: i,\n closeIndex: d,\n attrExpPresent: a,\n rawTagName: l\n };\n}\nfunction gt(e, t, r) {\n const s = r;\n let n = 1;\n for (; r < e.length; r++)\n if (e[r] === \"<\")\n if (e[r + 1] === \"/\") {\n const i = y(e, \">\", r, `${t} is not closed`);\n if (e.substring(r + 2, i).trim() === t && (n--, n === 0))\n return {\n tagContent: e.substring(s, r),\n i\n };\n r = i;\n } else if (e[r + 1] === \"?\")\n r = y(e, \"?>\", r + 1, \"StopNode is not closed.\");\n else if (e.substr(r + 1, 3) === \"!--\")\n r = y(e, \"-->\", r + 3, \"StopNode is not closed.\");\n else if (e.substr(r + 1, 2) === \"![\")\n r = y(e, \"]]>\", r, \"StopNode is not closed.\") - 2;\n else {\n const i = x(e, r, \">\");\n i && ((i && i.tagName) === t && i.tagExp[i.tagExp.length - 1] !== \"/\" && n++, r = i.closeIndex);\n }\n}\nfunction $(e, t, r) {\n if (t && typeof e == \"string\") {\n const s = e.trim();\n return s === \"true\" ? !0 : s === \"false\" ? !1 : rt(e, r);\n } else\n return B.isExist(e) ? e : \"\";\n}\nvar wt = nt, ne = {};\nfunction mt(e, t) {\n return ie(e, t);\n}\nfunction ie(e, t, r) {\n let s;\n const n = {};\n for (let i = 0; i < e.length; i++) {\n const d = e[i], u = Nt(d);\n let o = \"\";\n if (r === void 0 ? o = u : o = r + \".\" + u, u === t.textNodeName)\n s === void 0 ? s = d[u] : s += \"\" + d[u];\n else {\n if (u === void 0)\n continue;\n if (d[u]) {\n let a = ie(d[u], t, o);\n const l = bt(a, t);\n d[\":@\"] ? Et(a, d[\":@\"], o, t) : Object.keys(a).length === 1 && a[t.textNodeName] !== void 0 && !t.alwaysCreateTextNode ? a = a[t.textNodeName] : Object.keys(a).length === 0 && (t.alwaysCreateTextNode ? a[t.textNodeName] = \"\" : a = \"\"), n[u] !== void 0 && n.hasOwnProperty(u) ? (Array.isArray(n[u]) || (n[u] = [n[u]]), n[u].push(a)) : t.isArray(u, o, l) ? n[u] = [a] : n[u] = a;\n }\n }\n }\n return typeof s == \"string\" ? s.length > 0 && (n[t.textNodeName] = s) : s !== void 0 && (n[t.textNodeName] = s), n;\n}\nfunction Nt(e) {\n const t = Object.keys(e);\n for (let r = 0; r < t.length; r++) {\n const s = t[r];\n if (s !== \":@\")\n return s;\n }\n}\nfunction Et(e, t, r, s) {\n if (t) {\n const n = Object.keys(t), i = n.length;\n for (let d = 0; d < i; d++) {\n const u = n[d];\n s.isArray(u, r + \".\" + u, !0, !0) ? e[u] = [t[u]] : e[u] = t[u];\n }\n }\n}\nfunction bt(e, t) {\n const { textNodeName: r } = t, s = Object.keys(e).length;\n return !!(s === 0 || s === 1 && (e[r] || typeof e[r] == \"boolean\" || e[r] === 0));\n}\nne.prettify = mt;\nconst { buildOptions: yt } = k, _t = wt, { prettify: vt } = ne, Tt = S;\nlet It = class {\n constructor(t) {\n this.externalEntities = {}, this.options = yt(t);\n }\n /**\n * Parse XML dats to JS object \n * @param {string|Buffer} xmlData \n * @param {boolean|Object} validationOption \n */\n parse(t, r) {\n if (typeof t != \"string\")\n if (t.toString)\n t = t.toString();\n else\n throw new Error(\"XML data is accepted in String or Bytes[] form.\");\n if (r) {\n r === !0 && (r = {});\n const i = Tt.validate(t, r);\n if (i !== !0)\n throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`);\n }\n const s = new _t(this.options);\n s.addExternalEntities(this.externalEntities);\n const n = s.parseXml(t);\n return this.options.preserveOrder || n === void 0 ? n : vt(n, this.options);\n }\n /**\n * Add Entity which is not by default supported by this library\n * @param {string} key \n * @param {string} value \n */\n addEntity(t, r) {\n if (r.indexOf(\"&\") !== -1)\n throw new Error(\"Entity value can't have '&'\");\n if (t.indexOf(\"&\") !== -1 || t.indexOf(\";\") !== -1)\n throw new Error(\"An entity must be set without '&' and ';'. Eg. use '#xD' for ' '\");\n if (r === \"&\")\n throw new Error(\"An entity with value '&' is not permitted\");\n this.externalEntities[t] = r;\n }\n};\nvar At = It;\nconst Ot = `\n`;\nfunction Ct(e, t) {\n let r = \"\";\n return t.format && t.indentBy.length > 0 && (r = Ot), se(e, t, \"\", r);\n}\nfunction se(e, t, r, s) {\n let n = \"\", i = !1;\n for (let d = 0; d < e.length; d++) {\n const u = e[d], o = Pt(u);\n if (o === void 0)\n continue;\n let a = \"\";\n if (r.length === 0 ? a = o : a = `${r}.${o}`, o === t.textNodeName) {\n let h = u[o];\n xt(a, t) || (h = t.tagValueProcessor(o, h), h = oe(h, t)), i && (n += s), n += h, i = !1;\n continue;\n } else if (o === t.cdataPropName) {\n i && (n += s), n += ``, i = !1;\n continue;\n } else if (o === t.commentPropName) {\n n += s + ``, i = !0;\n continue;\n } else if (o[0] === \"?\") {\n const h = K(u[\":@\"], t), _ = o === \"?xml\" ? \"\" : s;\n let E = u[o][0][t.textNodeName];\n E = E.length !== 0 ? \" \" + E : \"\", n += _ + `<${o}${E}${h}?>`, i = !0;\n continue;\n }\n let l = s;\n l !== \"\" && (l += t.indentBy);\n const f = K(u[\":@\"], t), c = s + `<${o}${f}`, g = se(u[o], t, a, l);\n t.unpairedTags.indexOf(o) !== -1 ? t.suppressUnpairedNode ? n += c + \">\" : n += c + \"/>\" : (!g || g.length === 0) && t.suppressEmptyNode ? n += c + \"/>\" : g && g.endsWith(\">\") ? n += c + `>${g}${s}` : (n += c + \">\", g && s !== \"\" && (g.includes(\"/>\") || g.includes(\"`), i = !0;\n }\n return n;\n}\nfunction Pt(e) {\n const t = Object.keys(e);\n for (let r = 0; r < t.length; r++) {\n const s = t[r];\n if (e.hasOwnProperty(s) && s !== \":@\")\n return s;\n }\n}\nfunction K(e, t) {\n let r = \"\";\n if (e && !t.ignoreAttributes)\n for (let s in e) {\n if (!e.hasOwnProperty(s))\n continue;\n let n = t.attributeValueProcessor(s, e[s]);\n n = oe(n, t), n === !0 && t.suppressBooleanAttributes ? r += ` ${s.substr(t.attributeNamePrefix.length)}` : r += ` ${s.substr(t.attributeNamePrefix.length)}=\"${n}\"`;\n }\n return r;\n}\nfunction xt(e, t) {\n e = e.substr(0, e.length - t.textNodeName.length - 1);\n let r = e.substr(e.lastIndexOf(\".\") + 1);\n for (let s in t.stopNodes)\n if (t.stopNodes[s] === e || t.stopNodes[s] === \"*.\" + r)\n return !0;\n return !1;\n}\nfunction oe(e, t) {\n if (e && e.length > 0 && t.processEntities)\n for (let r = 0; r < t.entities.length; r++) {\n const s = t.entities[r];\n e = e.replace(s.regex, s.val);\n }\n return e;\n}\nvar $t = Ct;\nconst Ft = $t, Vt = {\n attributeNamePrefix: \"@_\",\n attributesGroupName: !1,\n textNodeName: \"#text\",\n ignoreAttributes: !0,\n cdataPropName: !1,\n format: !1,\n indentBy: \" \",\n suppressEmptyNode: !1,\n suppressUnpairedNode: !0,\n suppressBooleanAttributes: !0,\n tagValueProcessor: function(e, t) {\n return t;\n },\n attributeValueProcessor: function(e, t) {\n return t;\n },\n preserveOrder: !1,\n commentPropName: !1,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&\" },\n //it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \">\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"<\" },\n { regex: new RegExp(\"'\", \"g\"), val: \"'\" },\n { regex: new RegExp('\"', \"g\"), val: \""\" }\n ],\n processEntities: !0,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: !1\n};\nfunction b(e) {\n this.options = Object.assign({}, Vt, e), this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {\n return !1;\n } : (this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = St), this.processTextOrObjNode = Lt, this.options.format ? (this.indentate = Rt, this.tagEndChar = `>\n`, this.newLine = `\n`) : (this.indentate = function() {\n return \"\";\n }, this.tagEndChar = \">\", this.newLine = \"\");\n}\nb.prototype.build = function(e) {\n return this.options.preserveOrder ? Ft(e, this.options) : (Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = {\n [this.options.arrayNodeName]: e\n }), this.j2x(e, 0).val);\n};\nb.prototype.j2x = function(e, t) {\n let r = \"\", s = \"\";\n for (let n in e)\n if (Object.prototype.hasOwnProperty.call(e, n))\n if (typeof e[n] > \"u\")\n this.isAttribute(n) && (s += \"\");\n else if (e[n] === null)\n this.isAttribute(n) ? s += \"\" : n[0] === \"?\" ? s += this.indentate(t) + \"<\" + n + \"?\" + this.tagEndChar : s += this.indentate(t) + \"<\" + n + \"/\" + this.tagEndChar;\n else if (e[n] instanceof Date)\n s += this.buildTextValNode(e[n], n, \"\", t);\n else if (typeof e[n] != \"object\") {\n const i = this.isAttribute(n);\n if (i)\n r += this.buildAttrPairStr(i, \"\" + e[n]);\n else if (n === this.options.textNodeName) {\n let d = this.options.tagValueProcessor(n, \"\" + e[n]);\n s += this.replaceEntitiesValue(d);\n } else\n s += this.buildTextValNode(e[n], n, \"\", t);\n } else if (Array.isArray(e[n])) {\n const i = e[n].length;\n let d = \"\";\n for (let u = 0; u < i; u++) {\n const o = e[n][u];\n typeof o > \"u\" || (o === null ? n[0] === \"?\" ? s += this.indentate(t) + \"<\" + n + \"?\" + this.tagEndChar : s += this.indentate(t) + \"<\" + n + \"/\" + this.tagEndChar : typeof o == \"object\" ? this.options.oneListGroup ? d += this.j2x(o, t + 1).val : d += this.processTextOrObjNode(o, n, t) : d += this.buildTextValNode(o, n, \"\", t));\n }\n this.options.oneListGroup && (d = this.buildObjectNode(d, n, \"\", t)), s += d;\n } else if (this.options.attributesGroupName && n === this.options.attributesGroupName) {\n const i = Object.keys(e[n]), d = i.length;\n for (let u = 0; u < d; u++)\n r += this.buildAttrPairStr(i[u], \"\" + e[n][i[u]]);\n } else\n s += this.processTextOrObjNode(e[n], n, t);\n return { attrStr: r, val: s };\n};\nb.prototype.buildAttrPairStr = function(e, t) {\n return t = this.options.attributeValueProcessor(e, \"\" + t), t = this.replaceEntitiesValue(t), this.options.suppressBooleanAttributes && t === \"true\" ? \" \" + e : \" \" + e + '=\"' + t + '\"';\n};\nfunction Lt(e, t, r) {\n const s = this.j2x(e, r + 1);\n return e[this.options.textNodeName] !== void 0 && Object.keys(e).length === 1 ? this.buildTextValNode(e[this.options.textNodeName], t, s.attrStr, r) : this.buildObjectNode(s.val, t, s.attrStr, r);\n}\nb.prototype.buildObjectNode = function(e, t, r, s) {\n if (e === \"\")\n return t[0] === \"?\" ? this.indentate(s) + \"<\" + t + r + \"?\" + this.tagEndChar : this.indentate(s) + \"<\" + t + r + this.closeTag(t) + this.tagEndChar;\n {\n let n = \"\" + e + n : this.options.commentPropName !== !1 && t === this.options.commentPropName && i.length === 0 ? this.indentate(s) + `` + this.newLine : this.indentate(s) + \"<\" + t + r + i + this.tagEndChar + e + this.indentate(s) + n;\n }\n};\nb.prototype.closeTag = function(e) {\n let t = \"\";\n return this.options.unpairedTags.indexOf(e) !== -1 ? this.options.suppressUnpairedNode || (t = \"/\") : this.options.suppressEmptyNode ? t = \"/\" : t = `>` + this.newLine;\n if (this.options.commentPropName !== !1 && t === this.options.commentPropName)\n return this.indentate(s) + `` + this.newLine;\n if (t[0] === \"?\")\n return this.indentate(s) + \"<\" + t + r + \"?\" + this.tagEndChar;\n {\n let n = this.options.tagValueProcessor(t, e);\n return n = this.replaceEntitiesValue(n), n === \"\" ? this.indentate(s) + \"<\" + t + r + this.closeTag(t) + this.tagEndChar : this.indentate(s) + \"<\" + t + r + \">\" + n + \" 0 && this.options.processEntities)\n for (let t = 0; t < this.options.entities.length; t++) {\n const r = this.options.entities[t];\n e = e.replace(r.regex, r.val);\n }\n return e;\n};\nfunction Rt(e) {\n return this.options.indentBy.repeat(e);\n}\nfunction St(e) {\n return e.startsWith(this.options.attributeNamePrefix) && e !== this.options.textNodeName ? e.substr(this.attrPrefixLen) : !1;\n}\nvar Mt = b;\nconst kt = S, Bt = At, qt = Mt;\nvar W = {\n XMLParser: Bt,\n XMLValidator: kt,\n XMLBuilder: qt\n};\nfunction Xt(e) {\n if (typeof e != \"string\")\n throw new TypeError(`Expected a \\`string\\`, got \\`${typeof e}\\``);\n if (e = e.trim(), e.length === 0 || W.XMLValidator.validate(e) !== !0)\n return !1;\n let t;\n const r = new W.XMLParser();\n try {\n t = r.parse(e);\n } catch {\n return !1;\n }\n return !(!t || !(\"svg\" in t));\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass cr {\n _view;\n constructor(t) {\n Ut(t), this._view = t;\n }\n get id() {\n return this._view.id;\n }\n get name() {\n return this._view.name;\n }\n get caption() {\n return this._view.caption;\n }\n get emptyTitle() {\n return this._view.emptyTitle;\n }\n get emptyCaption() {\n return this._view.emptyCaption;\n }\n get getContents() {\n return this._view.getContents;\n }\n get icon() {\n return this._view.icon;\n }\n set icon(t) {\n this._view.icon = t;\n }\n get order() {\n return this._view.order;\n }\n set order(t) {\n this._view.order = t;\n }\n get params() {\n return this._view.params;\n }\n set params(t) {\n this._view.params = t;\n }\n get columns() {\n return this._view.columns;\n }\n get emptyView() {\n return this._view.emptyView;\n }\n get parent() {\n return this._view.parent;\n }\n get sticky() {\n return this._view.sticky;\n }\n get expanded() {\n return this._view.expanded;\n }\n set expanded(t) {\n this._view.expanded = t;\n }\n get defaultSortKey() {\n return this._view.defaultSortKey;\n }\n}\nconst Ut = function(e) {\n if (!e.id || typeof e.id != \"string\")\n throw new Error(\"View id is required and must be a string\");\n if (!e.name || typeof e.name != \"string\")\n throw new Error(\"View name is required and must be a string\");\n if (e.columns && e.columns.length > 0 && (!e.caption || typeof e.caption != \"string\"))\n throw new Error(\"View caption is required for top-level views and must be a string\");\n if (!e.getContents || typeof e.getContents != \"function\")\n throw new Error(\"View getContents is required and must be a function\");\n if (!e.icon || typeof e.icon != \"string\" || !Xt(e.icon))\n throw new Error(\"View icon is required and must be a valid svg string\");\n if (!(\"order\" in e) || typeof e.order != \"number\")\n throw new Error(\"View order is required and must be a number\");\n if (e.columns && e.columns.forEach((t) => {\n if (!(t instanceof Ie))\n throw new Error(\"View columns must be an array of Column. Invalid column found\");\n }), e.emptyView && typeof e.emptyView != \"function\")\n throw new Error(\"View emptyView must be a function\");\n if (e.parent && typeof e.parent != \"string\")\n throw new Error(\"View parent must be a string\");\n if (\"sticky\" in e && typeof e.sticky != \"boolean\")\n throw new Error(\"View sticky must be a boolean\");\n if (\"expanded\" in e && typeof e.expanded != \"boolean\")\n throw new Error(\"View expanded must be a boolean\");\n if (e.defaultSortKey && typeof e.defaultSortKey != \"string\")\n throw new Error(\"View defaultSortKey must be a string\");\n return !0;\n};\n/**\n * @copyright 2019 Christoph Wurst \n *\n * @author Christoph Wurst \n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst hr = function(e) {\n return F().registerEntry(e);\n}, pr = function(e) {\n return F().unregisterEntry(e);\n}, gr = function(e) {\n return F().getEntries(e).sort((r, s) => r.order !== void 0 && s.order !== void 0 && r.order !== s.order ? r.order - s.order : r.displayName.localeCompare(s.displayName, void 0, { numeric: !0, sensitivity: \"base\" }));\n};\nexport {\n Ie as Column,\n Z as DefaultType,\n ye as File,\n Qt as FileAction,\n R as FileType,\n _e as Folder,\n tr as Header,\n Te as Navigation,\n D as Node,\n Q as NodeStatus,\n N as Permission,\n cr as View,\n hr as addNewFileMenuEntry,\n ur as davGetClient,\n sr as davGetDefaultPropfind,\n Ee as davGetFavoritesReport,\n or as davGetRecentSearch,\n be as davParsePermissions,\n te as davRemoteURL,\n ve as davResultToNode,\n ee as davRootPath,\n Y as defaultDavNamespaces,\n j as defaultDavProperties,\n Yt as formatFileSize,\n L as getDavNameSpaces,\n V as getDavProperties,\n dr as getFavoriteNodes,\n er as getFileActions,\n nr as getFileListHeaders,\n ar as getNavigation,\n gr as getNewFileMenuEntries,\n Jt as parseFileSize,\n ir as registerDavProperty,\n Dt as registerFileAction,\n rr as registerFileListHeaders,\n pr as removeNewFileMenuEntry\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + chunkId + \".js?v=\" + {\"4720\":\"bf813bc45f5afa044293\",\"6512\":\"a386aad6f01ecddf416d\"}[chunkId] + \"\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 9837;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t9837: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], () => (__webpack_require__(34507)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","getLoggerBuilder","setApp","detectUser","build","action","FileAction","id","displayName","nodes","view","t","iconSvgInline","enabled","length","map","node","permissions","every","permission","Permission","DELETE","exec","axios","delete","encodedSource","emit","error","logger","source","execBatch","dir","Promise","all","this","order","triggerDownload","url","hiddenElement","document","createElement","download","href","click","downloadNodes","secret","Math","random","toString","substring","generateUrl","files","JSON","stringify","basename","isDownloadable","READ","attributes","downloadAttribute","parse","find","attribute","scope","key","undefined","some","type","FileType","Folder","root","startsWith","async","Array","fill","UPDATE","path","link","generateOcsUrl","result","post","uid","getCurrentUser","window","location","host","encodePath","data","ocs","token","showError","openLocalClient","shouldFavorite","favorite","favoriteNode","willFavorite","tags","OC","TAG_FAVORITE","dirname","Vue","StarSvg","NONE","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","Axios","AxiosError","CanceledError","isCancel","CancelToken","VERSION","Cancel","isAxiosError","spread","toFormData","AxiosHeaders","HttpStatusCode","formToJSON","getAdapter","mergeConfig","queue","getQueue","PQueue","concurrency","MoveCopyAction","canMove","reduce","min","ALL","canCopy","canDownload","getUniqueName","name","otherNames","suffix","arguments","n","newName","i","includes","ext","extname","getActionForNodes","MOVE_OR_COPY","MOVE","COPY","handleCopyMoveNodeTo","destination","method","overwrite","Error","NodeStatus","LOADING","add","copySuffix","index","client","davGetClient","currentPath","join","davRootPath","destinationPath","target","otherNodes","getDirectoryContents","copyFile","stat","details","davGetDefaultPropfind","davResultToNode","moveFile","response","status","message","debug","openFilePickerForAction","fileIDs","fileid","filter","Boolean","filePicker","getFilePickerBuilder","allowDirectories","setFilter","CREATE","setMimeTypeFilter","setMultiSelect","startAt","resolve","reject","setButtonFactory","_selection","buttons","dirnames","paths","push","label","icon","CopyIconSvg","callback","FolderMoveSvg","pick","catch","FilePickerClosed","e","promises","FolderSvg","isDavRessource","OCP","Files","Router","goToRoute","default","DefaultType","HIDDEN","InformationSvg","OCA","Sidebar","open","File","entry","context","handler","content","contentNames","encodeURIComponent","headers","Overwrite","parseInt","createNewFolder","folder","mtime","Date","owner","showSuccess","WorkerGlobalScope","self","globalThis","fetch","bind","Headers","Request","Response","HOT_PATCHER_TYPE","NOOP","createNewItem","original","methods","final","HotPatcher","constructor","_configuration","registry","getEmptyAction","__type__","configuration","newAction","control","allowTargetOverrides","Object","keys","forEach","foreignKey","hasOwnProperty","assign","execute","args","get","item","_this","shift","apply","sequence","isPatched","patch","opts","chain","patchInline","plugin","restore","setFinal","__patcher","NONCE_CHARS","generateDigestAuthHeader","digest","replace","uri","indexOf","slice","toUpperCase","qop","test","ncString","nc","ha1","algorithm","user","realm","pass","nonce","cnonce","ha1Hash","md5","toLowerCase","ha1Compute","username","password","ha2","digestResponse","authValues","opaque","authHeader","k","obj","prototype","call","getPrototypeOf","proto","isPlainObject","setPrototypeOf","merge","output","items","nextItem","mergeObjects","obj1","obj2","isArray","headerPayloads","headerKeys","header","lowerHeader","hasArrayBuffer","ArrayBuffer","objToString","_request","requestOptions","patcher","body","newHeaders","value","isBuffer","isArrayBuffer","requestDataToFetchBody","signal","withCredentials","credentials","httpAgent","httpsAgent","agent","parsedURL","protocol","getFetchOptions","rootPath","defaultRootUrl","generateRemoteUrl","getClient","rootUrl","createClient","requesttoken","getRequestToken","getPatcher","_digest","hasDigestAuth","Authorization","split","re","match","floor","makeNonce","parseDigestAuth","response2","request","hashCode","str","a","b","charCodeAt","resultToNode","userId","props","davParsePermissions","filename","nodeData","lastmod","mime","size","hasPreview","failed","reportPayload","getDavNameSpaces","getDavProperties","getContents","propfindPayload","rootResponse","contentsResponse","includeSelf","contents","generateFavoriteFolderView","View","generateIdFromPath","params","parent","columns","lastTwoWeeksTimestamp","round","now","inheritAttrs","String","required","checked","Number","previewUrl","ratio","failedPreview","computed","nameWithoutExt","realPreviewUrl","mimeIcon","getElementById","pathSections","relativePath","section","encodeFilePath","MimeType","getIconUrl","onCheck","$emit","onFailure","_vm","_c","_self","staticClass","attrs","domProps","on","_v","class","_s","extend","components","NcEmptyContent","NcModal","TemplatePreview","loading","opened","provider","extension","emptyTemplate","mimetypes","selectedTemplate","templates","template","style","width","margin","border","fetchedProvider","getTemplates","app","onSubmit","close","currentDirectory","URL","searchParams","warn","fileInfo","filePath","templatePath","templateType","createFromTemplate","normalize","openfile","_setupProxy","$event","preventDefault","stopPropagation","_b","_l","_e","mixin","TemplatePickerRoot","appendChild","loadState","templatesPath","TemplatePicker","TemplatePickerView","propsData","$mount","addNewFileMenuEntry","initTemplatesFolder","removeNewFileMenuEntry","iconClass","directory","copySystemTemplates","template_path","registerFileAction","deleteAction","downloadAction","editLocallyAction","favoriteAction","moveOrCopyAction","openFolderAction","openInFilesAction","renameAction","sidebarAction","viewInFolderAction","newFolderEntry","favoriteFolders","favoriteFoldersViews","Navigation","getNavigation","register","caption","emptyTitle","emptyCaption","subscribe","addToFavorites","removePathFromFavorites","updateAndSortViews","sort","localeCompare","getLanguage","ignorePunctuation","newFavoriteFolder","findIndex","splice","remove","registerFavoritesView","controller","AbortController","CancelablePromise","onCancel","abort","defaultSortKey","davGetRecentSearch","deep","davRemoteURL","r","navigator","addEventListener","noRewrite","registration","serviceWorker","registerDavProperty","module","exports","_typeof","Symbol","iterator","_exports","_setPrototypeOf","o","p","__proto__","_createSuper","Derived","hasNativeReflectConstruct","Reflect","construct","sham","Proxy","valueOf","_isNativeReflectConstruct","Super","_getPrototypeOf","NewTarget","TypeError","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_createForOfIteratorHelper","allowArrayLike","it","minLen","_arrayLikeToArray","from","_unsupportedIterableToArray","F","s","done","f","err","normalCompletion","didErr","step","next","_e2","return","arr","len","arr2","_classCallCheck","instance","Constructor","_defineProperties","descriptor","enumerable","configurable","writable","defineProperty","_createClass","protoProps","staticProps","_defineProperty","_classPrivateFieldInitSpec","privateMap","privateCollection","has","_checkPrivateRedeclaration","set","_classPrivateFieldGet","receiver","_classApplyDescriptorGet","_classExtractFieldDescriptor","_classPrivateFieldSet","_classApplyDescriptorSet","cancelable","isCancelablePromise","toStringTag","_internals","WeakMap","_promise","CancelablePromiseInternal","_ref","_ref$executor","executor","_ref$internals","internals","isCanceled","onCancelList","_ref$promise","promise","cancel","onfulfilled","onrejected","makeCancelable","then","createCallback","onfinally","runWhenCanceled","finally","callbacks","_step","_iterator","console","_CancelablePromiseInt","subClass","superClass","create","_inherits","_super","iterable","makeAllCancelable","allSettled","any","race","reason","_default","onResult","arg","_step2","_iterator2","resolvable","___CSS_LOADER_URL_IMPORT_0___","___CSS_LOADER_URL_IMPORT_1___","___CSS_LOADER_EXPORT___","___CSS_LOADER_URL_REPLACEMENT_0___","___CSS_LOADER_URL_REPLACEMENT_1___","http","https","validateParams","cb","Stream","Readable","Writable","Duplex","Transform","PassThrough","finished","pipeline","ClientRequest","statusCodes","defaultProtocol","g","search","hostname","port","req","end","IncomingMessage","Agent","defaultMaxSockets","globalAgent","STATUS_CODES","METHODS","xhr","getXHR","XMLHttpRequest","XDomainRequest","checkTypeSupport","responseType","isFunction","ReadableStream","writableStream","WritableStream","abortController","arraybuffer","msstream","mozchunkedarraybuffer","overrideMimeType","capability","inherits","stream","rStates","readyStates","preferBinary","_opts","_body","_headers","auth","setHeader","Buffer","useFetch","mode","_mode","decideMode","_fetchTimer","_socketTimeout","_socketTimer","_onFinish","lowerName","unsafeHeaders","getHeader","removeHeader","_destroyed","timeout","setTimeout","headersObj","Blob","headersList","keyName","v","_fetchAbortController","requestTimeout","_fetchResponse","_resetTimers","_connect","_xhr","process","nextTick","ontimeout","setRequestHeader","_response","onreadystatechange","readyState","DONE","_onXHRProgress","onprogress","onerror","send","statusValid","_write","chunk","encoding","clearTimeout","destroy","once","flushHeaders","setNoDelay","setSocketKeepAlive","UNSENT","OPENED","HEADERS_RECEIVED","resetTimers","rawHeaders","trailers","rawTrailers","statusCode","statusMessage","statusText","write","_resumeFetch","pipeTo","reader","getReader","read","_pos","responseURL","getAllResponseHeaders","matches","_charset","mimeType","charsetMatch","_read","responseText","newData","substr","buffer","alloc","Uint8Array","MSStreamReader","byteLength","onload","readAsArrayBuffer","m","setUid","Ne","_entries","registerEntry","validateEntry","unregisterEntry","getEntryIndex","entries","getEntries","_nc_newfilemenu","C","P","Yt","log","d","pow","toFixed","parseFloat","toLocaleString","Z","DEFAULT","Qt","_action","validateAction","title","inline","renderInline","values","Dt","_nc_fileactions","N","SHARE","j","Y","oc","ir","_nc_dav_properties","_nc_dav_namespaces","prop","namespaces","V","L","sr","or","be","R","J","X","crtime","Q","NEW","FAILED","LOCKED","D","_data","_attributes","_knownDavService","updateMtime","deleteProperty","origin","pop","pathname","move","rename","ye","super","ee","te","ur","setHeaders","u","dr","ve","getcontentlength","Te","_views","_currentView","views","setActive","active","ar","_nc_navigation","Ie","_column","Ae","render","summary","S","O","RegExp","isExist","isEmptyObject","l","c","getValue","isName","getAllMatches","startIndex","lastIndex","nameRegexp","M","Oe","allowBooleanAttributes","unpairedTags","U","G","w","z","validate","trim","Re","xe","H","code","msg","line","tagClosed","tagName","tagStartPos","col","Ve","Ce","Pe","$e","Le","Fe","preserveOrder","attributeNamePrefix","attributesGroupName","textNodeName","ignoreAttributes","removeNSPrefix","parseTagValue","parseAttributeValue","trimValues","cdataPropName","numberParseOptions","hex","leadingZeros","eNotation","tagValueProcessor","attributeValueProcessor","stopNodes","alwaysCreateTextNode","commentPropName","processEntities","htmlEntities","ignoreDeclaration","ignorePiTags","transformTagName","transformAttributeName","updateTag","buildOptions","defaultOptions","Be","Xe","Ue","Ge","ze","He","Ke","We","je","Ye","Je","decimalPoint","B","T","tagname","child","addChild","tt","entityName","val","regx","entities","rt","skipLike","De","lastEntities","regex","st","replaceEntitiesValue","$","ot","charAt","ut","dt","resolveNameSpace","at","y","saveTextToParentTag","lastIndexOf","tagsNodeStack","x","tagExp","attrExpPresent","buildAttributesMap","closeIndex","docTypeEntities","parseTextData","rawTagName","isItStopNode","h","E","readStopNodeData","tagContent","_","lt","ft","ampEntity","ct","ht","pt","gt","ne","ie","Nt","bt","Et","prettify","yt","_t","currentNode","apos","quot","space","cent","pound","yen","euro","copyright","reg","inr","addExternalEntities","parseXml","vt","Tt","se","Pt","xt","oe","K","indentBy","suppressUnpairedNode","suppressEmptyNode","endsWith","suppressBooleanAttributes","Ft","format","Vt","oneListGroup","isAttribute","attrPrefixLen","St","processTextOrObjNode","Lt","indentate","Rt","tagEndChar","newLine","j2x","buildTextValNode","attrStr","buildObjectNode","repeat","arrayNodeName","buildAttrPairStr","closeTag","W","XMLParser","externalEntities","addEntity","XMLValidator","XMLBuilder","cr","_view","Ut","emptyView","sticky","expanded","Xt","hr","pr","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","getter","__esModule","definition","chunkId","Function","script","needAttach","scripts","getElementsByTagName","getAttribute","charset","setAttribute","src","onScriptComplete","prev","event","doneFns","parentNode","removeChild","head","nmd","children","scriptUrl","importScripts","currentScript","baseURI","installedChunks","installedChunkData","errorType","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/systemtags-init.js b/dist/systemtags-init.js index 9a2b45a5d8f01..215bce6f9d350 100644 --- a/dist/systemtags-init.js +++ b/dist/systemtags-init.js @@ -1,3 +1,3 @@ /*! For license information please see systemtags-init.js.LICENSE.txt */ -(()=>{var e,t={11057:(e,t,n)=>{"use strict";var r=n(77958),i=n(17499),o=n(31352),s=n(62520),a=n(65358),u=n(79753),l=n(14596);const c=null===(d=(0,r.ts)())?(0,i.IY)().setApp("files").build():(0,i.IY)().setApp("files").setUid(d.uid).build();var d,f=(e=>(e.DEFAULT="default",e.HIDDEN="hidden",e))(f||{}),h=(e=>(e[e.NONE=0]="NONE",e[e.CREATE=4]="CREATE",e[e.READ=1]="READ",e[e.UPDATE=2]="UPDATE",e[e.DELETE=8]="DELETE",e[e.SHARE=16]="SHARE",e[e.ALL=31]="ALL",e))(h||{});const p=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","nc:share-attributes","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:share-types","oc:size","ocs:share-permissions"],g={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"};var m=(e=>(e.Folder="folder",e.File="file",e))(m||{});const y=function(e,t){return null!==e.match(t)},w=(e,t)=>{if(e.id&&"number"!=typeof e.id)throw new Error("Invalid id type of value");if(!e.source)throw new Error("Missing mandatory source");try{new URL(e.source)}catch{throw new Error("Invalid source format, source must be a valid URL")}if(!e.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(e.mtime&&!(e.mtime instanceof Date))throw new Error("Invalid mtime type");if(e.crtime&&!(e.crtime instanceof Date))throw new Error("Invalid crtime type");if(!e.mime||"string"!=typeof e.mime||!e.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in e&&"number"!=typeof e.size&&void 0!==e.size)throw new Error("Invalid size type");if("permissions"in e&&void 0!==e.permissions&&!("number"==typeof e.permissions&&e.permissions>=h.NONE&&e.permissions<=h.ALL))throw new Error("Invalid permissions");if(e.owner&&null!==e.owner&&"string"!=typeof e.owner)throw new Error("Invalid owner type");if(e.attributes&&"object"!=typeof e.attributes)throw new Error("Invalid attributes type");if(e.root&&"string"!=typeof e.root)throw new Error("Invalid root type");if(e.root&&!e.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(e.root&&!e.source.includes(e.root))throw new Error("Root must be part of the source");if(e.root&&y(e.source,t)){const n=e.source.match(t)[0];if(!e.source.includes((0,s.join)(n,e.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(e.status&&!Object.values(v).includes(e.status))throw new Error("Status must be a valid NodeStatus")};var v=(e=>(e.NEW="new",e.FAILED="failed",e.LOADING="loading",e.LOCKED="locked",e))(v||{});class b{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;constructor(e,t){w(e,t||this._knownDavService),this._data=e;const n={set:(e,t,n)=>(this.updateMtime(),Reflect.set(e,t,n)),deleteProperty:(e,t)=>(this.updateMtime(),Reflect.deleteProperty(e,t))};this._attributes=new Proxy(e.attributes||{},n),delete this._data.attributes,t&&(this._knownDavService=t)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:e}=new URL(this.source);return e+(0,a.Ec)(this.source.slice(e.length))}get basename(){return(0,s.basename)(this.source)}get extension(){return(0,s.extname)(this.source)}get dirname(){if(this.root){let e=this.source;this.isDavRessource&&(e=e.split(this._knownDavService).pop());const t=e.indexOf(this.root),n=this.root.replace(/\/$/,"");return(0,s.dirname)(e.slice(t+n.length)||"/")}const e=new URL(this.source);return(0,s.dirname)(e.pathname)}get mime(){return this._data.mime}get mtime(){return this._data.mtime}get crtime(){return this._data.crtime}get size(){return this._data.size}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavRessource?void 0!==this._data.permissions?this._data.permissions:h.NONE:h.READ}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return y(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,s.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){let e=this.source;this.isDavRessource&&(e=e.split(this._knownDavService).pop());const t=e.indexOf(this.root),n=this.root.replace(/\/$/,"");return e.slice(t+n.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id||this.attributes?.fileid}get status(){return this._data?.status}set status(e){this._data.status=e}move(e){w({...this._data,source:e},this._knownDavService),this._data.source=e,this.updateMtime()}rename(e){if(e.includes("/"))throw new Error("Invalid basename");this.move((0,s.dirname)(this.source)+"/"+e)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}}class _ extends b{get type(){return m.File}}class x extends b{constructor(e){super({...e,mime:"httpd/unix-directory"})}get type(){return m.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}(0,u.generateRemoteUrl)("dav");class A{_column;constructor(e){E(e),this._column=e}get id(){return this._column.id}get title(){return this._column.title}get render(){return this._column.render}get sort(){return this._column.sort}get summary(){return this._column.summary}}const E=function(e){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");if(e.sort&&"function"!=typeof e.sort)throw new Error("Column sortFunction must be a function");if(e.summary&&"function"!=typeof e.summary)throw new Error("Column summary must be a function");return!0};var N={},T={};!function(e){const t=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n="["+t+"]["+t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",r=new RegExp("^"+n+"$");e.isExist=function(e){return typeof e<"u"},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,n){if(t){const r=Object.keys(t),i=r.length;for(let o=0;o"u")},e.getAllMatches=function(e,t){const n=[];let r=t.exec(e);for(;r;){const i=[];i.startIndex=t.lastIndex-r[0].length;const o=r.length;for(let e=0;e5&&"xml"===r)return M("InvalidXml","XML declaration allowed only at the start of the document.",q(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}continue}return t}function S(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let n=1;for(t+=8;t"===e[t]&&(n--,0===n))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t"===e[t+2]){t+=2;break}return t}N.validate=function(e,t){t=Object.assign({},O,t);const n=[];let r=!1,i=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let o=0;o"!==e[o]&&" "!==e[o]&&"\t"!==e[o]&&"\n"!==e[o]&&"\r"!==e[o];o++)u+=e[o];if(u=u.trim(),"/"===u[u.length-1]&&(u=u.substring(0,u.length-1),o--),!V(u)){let t;return t=0===u.trim().length?"Invalid space after '<'.":"Tag '"+u+"' is an invalid name.",M("InvalidTag",t,q(e,o))}const l=j(e,o);if(!1===l)return M("InvalidAttr","Attributes for '"+u+"' have open quote.",q(e,o));let c=l.value;if(o=l.index,"/"===c[c.length-1]){const n=o-c.length;c=c.substring(0,c.length-1);const i=D(c,t);if(!0!==i)return M(i.err.code,i.err.msg,q(e,n+i.err.line));r=!0}else if(a){if(!l.tagClosed)return M("InvalidTag","Closing tag '"+u+"' doesn't have proper closing.",q(e,o));if(c.trim().length>0)return M("InvalidTag","Closing tag '"+u+"' can't have attributes or invalid starting.",q(e,s));{const t=n.pop();if(u!==t.tagName){let n=q(e,t.tagStartPos);return M("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+u+"'.",q(e,s))}0==n.length&&(i=!0)}}else{const a=D(c,t);if(!0!==a)return M(a.err.code,a.err.msg,q(e,o-c.length+a.err.line));if(!0===i)return M("InvalidXml","Multiple possible root nodes found.",q(e,o));-1!==t.unpairedTags.indexOf(u)||n.push({tagName:u,tagStartPos:s}),r=!0}for(o++;o0)||M("InvalidXml","Invalid '"+JSON.stringify(n.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):M("InvalidXml","Start tag expected.",1)};const R='"',k="'";function j(e,t){let n="",r="",i=!1;for(;t"===e[t]&&""===r){i=!0;break}n+=e[t]}return""===r&&{value:n,index:t,tagClosed:i}}const L=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function D(e,t){const n=C.getAllMatches(e,L),r={};for(let e=0;e!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e}};U.buildOptions=function(e){return Object.assign({},H,e)},U.defaultOptions=H;const z=T;function G(e,t){let n="";for(;t0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}},ie=function(e,t){const n={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let r=1,i=!1,o=!1,s="";for(;t"===e[t]){if(o?"-"===e[t-1]&&"-"===e[t-2]&&(o=!1,r--):r--,0===r)break}else"["===e[t]?i=!0:s+=e[t];else{if(i&&W(e,t))t+=7,[entityName,val,t]=G(e,t+1),-1===val.indexOf("&")&&(n[J(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(i&&Y(e,t))t+=8;else if(i&&K(e,t))t+=8;else if(i&&Z(e,t))t+=9;else{if(!X)throw new Error("Invalid DOCTYPE");o=!0}r++,s=""}if(0!==r)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:t}},oe=function(e,t={}){if(t=Object.assign({},te,t),!e||"string"!=typeof e)return e;let n=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(n))return e;if(t.hex&&Q.test(n))return Number.parseInt(n,16);{const r=ee.exec(n);if(r){const i=r[1],o=r[2];let s=function(e){return e&&-1!==e.indexOf(".")&&("."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1))),e}(r[3]);const a=r[4]||r[6];if(!t.leadingZeros&&o.length>0&&i&&"."!==n[2])return e;if(!t.leadingZeros&&o.length>0&&!i&&"."!==n[1])return e;{const r=Number(n),u=""+r;return-1!==u.search(/[eE]/)||a?t.eNotation?r:e:-1!==n.indexOf(".")?"0"===u&&""===s||u===s||i&&u==="-"+s?r:e:o?s===u||i+s===u?r:e:n===u||n===i+u?r:e}}return e}};function se(e){const t=Object.keys(e);for(let n=0;n0)){s||(e=this.replaceEntitiesValue(e));const r=this.options.tagValueProcessor(t,e,n,i,o);return null==r?e:typeof r!=typeof e||r!==e?r:this.options.trimValues||e.trim()===e?ve(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function ue(e){if(this.options.removeNSPrefix){const t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,ne.nameRegexp);const le=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function ce(e,t,n){if(!this.options.ignoreAttributes&&"string"==typeof e){const n=ne.getAllMatches(e,le),r=n.length,i={};for(let e=0;e",o,"Closing Tag is not closed.");let s=e.substring(o+2,t).trim();if(this.options.removeNSPrefix){const e=s.indexOf(":");-1!==e&&(s=s.substr(e+1))}this.options.transformTagName&&(s=this.options.transformTagName(s)),n&&(r=this.saveTextToParentTag(r,n,i));const a=i.substring(i.lastIndexOf(".")+1);if(s&&-1!==this.options.unpairedTags.indexOf(s))throw new Error(`Unpaired tag can not be used as closing tag: `);let u=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(u=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):u=i.lastIndexOf("."),i=i.substring(0,u),n=this.tagsNodeStack.pop(),r="",o=t}else if("?"===e[o+1]){let t=ye(e,o,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(r=this.saveTextToParentTag(r,n,i),!(this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags)){const e=new re(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,i,t.tagName)),this.addChild(n,e,i)}o=t.closeIndex+1}else if("!--"===e.substr(o+1,3)){const t=me(e,"--\x3e",o+4,"Comment is not closed.");if(this.options.commentPropName){const s=e.substring(o+4,t-2);r=this.saveTextToParentTag(r,n,i),n.add(this.options.commentPropName,[{[this.options.textNodeName]:s}])}o=t}else if("!D"===e.substr(o+1,2)){const t=ie(e,o);this.docTypeEntities=t.entities,o=t.i}else if("!["===e.substr(o+1,2)){const t=me(e,"]]>",o,"CDATA is not closed.")-2,s=e.substring(o+9,t);if(r=this.saveTextToParentTag(r,n,i),this.options.cdataPropName)n.add(this.options.cdataPropName,[{[this.options.textNodeName]:s}]);else{let e=this.parseTextData(s,n.tagname,i,!0,!1,!0);null==e&&(e=""),n.add(this.options.textNodeName,e)}o=t+2}else{let s=ye(e,o,this.options.removeNSPrefix),a=s.tagName;const u=s.rawTagName;let l=s.tagExp,c=s.attrExpPresent,d=s.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),n&&r&&"!xml"!==n.tagname&&(r=this.saveTextToParentTag(r,n,i,!1));const f=n;if(f&&-1!==this.options.unpairedTags.indexOf(f.tagname)&&(n=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),a!==t.tagname&&(i+=i?"."+a:a),this.isItStopNode(this.options.stopNodes,i,a)){let t="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)o=s.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))o=s.closeIndex;else{const n=this.readStopNodeData(e,u,d+1);if(!n)throw new Error(`Unexpected end of ${u}`);o=n.i,t=n.tagContent}const r=new re(a);a!==l&&c&&(r[":@"]=this.buildAttributesMap(l,i,a)),t&&(t=this.parseTextData(t,a,i,!0,c,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),r.add(this.options.textNodeName,t),this.addChild(n,r,i)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),i=i.substr(0,i.length-1),l=a):l=l.substr(0,l.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const e=new re(a);a!==l&&c&&(e[":@"]=this.buildAttributesMap(l,i,a)),this.addChild(n,e,i),i=i.substr(0,i.lastIndexOf("."))}else{const e=new re(a);this.tagsNodeStack.push(n),a!==l&&c&&(e[":@"]=this.buildAttributesMap(l,i,a)),this.addChild(n,e,i),n=e}r="",o=d}}else r+=e[o];return t.child};function fe(e,t,n){const r=this.options.updateTag(t.tagname,n,t[":@"]);!1===r||("string"==typeof r&&(t.tagname=r),e.addChild(t))}const he=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){const n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function pe(e,t,n,r){return e&&(void 0===r&&(r=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,r))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function ge(e,t,n){const r="*."+n;for(const n in e){const i=e[n];if(r===i||t===i)return!0}return!1}function me(e,t,n,r){const i=e.indexOf(t,n);if(-1===i)throw new Error(r);return i+t.length-1}function ye(e,t,n,r=">"){const i=function(e,t,n=">"){let r,i="";for(let o=t;o",n,`${t} is not closed`);if(e.substring(n+2,o).trim()===t&&(i--,0===i))return{tagContent:e.substring(r,n),i:o};n=o}else if("?"===e[n+1])n=me(e,"?>",n+1,"StopNode is not closed.");else if("!--"===e.substr(n+1,3))n=me(e,"--\x3e",n+3,"StopNode is not closed.");else if("!["===e.substr(n+1,2))n=me(e,"]]>",n,"StopNode is not closed.")-2;else{const r=ye(e,n,">");r&&((r&&r.tagName)===t&&"/"!==r.tagExp[r.tagExp.length-1]&&i++,n=r.closeIndex)}}function ve(e,t,n){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&oe(e,n)}return ne.isExist(e)?e:""}var be={};function _e(e,t,n){let r;const i={};for(let o=0;o0&&(i[t.textNodeName]=r):void 0!==r&&(i[t.textNodeName]=r),i}function xe(e){const t=Object.keys(e);for(let e=0;e"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"}},this.addExternalEntities=se,this.parseXml=de,this.parseTextData=ae,this.resolveNameSpace=ue,this.buildAttributesMap=ce,this.isItStopNode=ge,this.replaceEntitiesValue=he,this.readStopNodeData=we,this.saveTextToParentTag=pe,this.addChild=fe}},{prettify:Ce}=be,Oe=N;function Pe(e,t,n,r){let i="",o=!1;for(let s=0;s`,o=!1;continue}if(u===t.commentPropName){i+=r+`\x3c!--${a[u][0][t.textNodeName]}--\x3e`,o=!0;continue}if("?"===u[0]){const e=Se(a[":@"],t),n="?xml"===u?"":r;let s=a[u][0][t.textNodeName];s=0!==s.length?" "+s:"",i+=n+`<${u}${s}${e}?>`,o=!0;continue}let c=r;""!==c&&(c+=t.indentBy);const d=r+`<${u}${Se(a[":@"],t)}`,f=Pe(a[u],t,l,c);-1!==t.unpairedTags.indexOf(u)?t.suppressUnpairedNode?i+=d+">":i+=d+"/>":f&&0!==f.length||!t.suppressEmptyNode?f&&f.endsWith(">")?i+=d+`>${f}${r}`:(i+=d+">",f&&""!==r&&(f.includes("/>")||f.includes("`):i+=d+"/>",o=!0}return i}function Ie(e){const t=Object.keys(e);for(let n=0;n0&&t.processEntities)for(let n=0;n0&&(n="\n"),Pe(e,t,"",n)},Le={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function De(e){this.options=Object.assign({},Le,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Fe),this.processTextOrObjNode=$e,this.options.format?(this.indentate=Me,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function $e(e,t,n){const r=this.j2x(e,n+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,r.attrStr,n):this.buildObjectNode(r.val,t,r.attrStr,n)}function Me(e){return this.options.indentBy.repeat(e)}function Fe(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}De.prototype.build=function(e){return this.options.preserveOrder?je(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},De.prototype.j2x=function(e,t){let n="",r="";for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i))if(typeof e[i]>"u")this.isAttribute(i)&&(r+="");else if(null===e[i])this.isAttribute(i)?r+="":"?"===i[0]?r+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:r+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(e[i]instanceof Date)r+=this.buildTextValNode(e[i],i,"",t);else if("object"!=typeof e[i]){const o=this.isAttribute(i);if(o)n+=this.buildAttrPairStr(o,""+e[i]);else if(i===this.options.textNodeName){let t=this.options.tagValueProcessor(i,""+e[i]);r+=this.replaceEntitiesValue(t)}else r+=this.buildTextValNode(e[i],i,"",t)}else if(Array.isArray(e[i])){const n=e[i].length;let o="";for(let s=0;s"u"||(null===n?"?"===i[0]?r+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:r+=this.indentate(t)+"<"+i+"/"+this.tagEndChar:"object"==typeof n?this.options.oneListGroup?o+=this.j2x(n,t+1).val:o+=this.processTextOrObjNode(n,i,t):o+=this.buildTextValNode(n,i,"",t))}this.options.oneListGroup&&(o=this.buildObjectNode(o,i,"",t)),r+=o}else if(this.options.attributesGroupName&&i===this.options.attributesGroupName){const t=Object.keys(e[i]),r=t.length;for(let o=0;o"+e+i}},De.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(r)+"<"+t+n+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),""===i?this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+"<"+t+n+">"+i+"0&&this.options.processEntities)for(let t=0;t1&&void 0!==arguments[1]&&arguments[1];const n=document.createElement("li");return n.classList.add("files-list__system-tag"),n.textContent=e,t&&n.classList.add("files-list__system-tag--more"),n},rt=new class{_action;constructor(e){this.validateAction(e),this._action=e}get id(){return this._action.id}get displayName(){return this._action.displayName}get title(){return this._action.title}get iconSvgInline(){return this._action.iconSvgInline}get enabled(){return this._action.enabled}get exec(){return this._action.exec}get execBatch(){return this._action.execBatch}get order(){return this._action.order}get parent(){return this._action.parent}get default(){return this._action.default}get inline(){return this._action.inline}get renderInline(){return this._action.renderInline}validateAction(e){if(!e.id||"string"!=typeof e.id)throw new Error("Invalid id");if(!e.displayName||"function"!=typeof e.displayName)throw new Error("Invalid displayName function");if("title"in e&&"function"!=typeof e.title)throw new Error("Invalid title function");if(!e.iconSvgInline||"function"!=typeof e.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!e.exec||"function"!=typeof e.exec)throw new Error("Invalid exec function");if("enabled"in e&&"function"!=typeof e.enabled)throw new Error("Invalid enabled function");if("execBatch"in e&&"function"!=typeof e.execBatch)throw new Error("Invalid execBatch function");if("order"in e&&"number"!=typeof e.order)throw new Error("Invalid order");if("parent"in e&&"string"!=typeof e.parent)throw new Error("Invalid parent");if(e.default&&!Object.values(f).includes(e.default))throw new Error("Invalid default");if("inline"in e&&"function"!=typeof e.inline)throw new Error("Invalid inline function");if("renderInline"in e&&"function"!=typeof e.renderInline)throw new Error("Invalid renderInline function")}}({id:"system-tags",displayName:()=>"",iconSvgInline:()=>"",enabled(e){if(1!==e.length)return!1;const t=e[0];return 0!==tt(t).length},exec:async()=>null,async renderInline(e){const t=tt(e);if(0===t.length)return null;const n=document.createElement("ul");if(n.classList.add("files-list__system-tags"),1===t.length)n.setAttribute("aria-label",(0,o.Iu)("files","This file has the tag {tag}",{tag:t[0]}));else{const e=t.slice(0,-1).join(", "),r=t[t.length-1];n.setAttribute("aria-label",(0,o.Iu)("files","This file has the tags {firstTags} and {lastTag}",{firstTags:e,lastTag:r}))}if(n.append(nt(t[0])),t.length>1){const e=nt("+"+(t.length-1),!0);e.setAttribute("title",t.slice(1).join(", ")),n.append(e)}return n},order:0});!function(e,t={nc:"http://nextcloud.org/ns"}){typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...p],window._nc_dav_namespaces={...g});const n={...window._nc_dav_namespaces,...t};window._nc_dav_properties.find((t=>t===e))?c.error(`${e} already registered`,{prop:e}):e.startsWith("<")||2!==e.split(":").length?c.error(`${e} is not valid. See example: 'oc:fileid'`,{prop:e}):n[e.split(":")[0]]?(window._nc_dav_properties.push(e),window._nc_dav_namespaces=n):c.error(`${e} namespace unknown`,{prop:e,namespaces:n})}("nc:system-tags"),function(e){typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],c.debug("FileActions initialized")),window._nc_fileactions.find((t=>t.id===e.id))?c.error(`FileAction ${e.id} already registered`,{action:e}):window._nc_fileactions.push(e)}(rt),n(93664);const it=(0,u.generateRemoteUrl)("dav"),ot=(0,l.eI)(it,{headers:{requesttoken:(0,r.IH)()??""}});var st=n(36906);const at=(0,i.IY)().setApp("systemtags").detectUser().build();var ut=n(8501),lt=n(79267);const ct="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:"undefined"!=typeof window?window:globalThis,dt=ct.fetch.bind(ct);ct.Headers,ct.Request,ct.Response;const ft="@@HOTPATCHER",ht=()=>{};function pt(e){return{original:e,methods:[e],final:!1}}class gt{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=ft}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(e){this.configuration.getEmptyAction=e}control(e,t=!1){if(!e||e.__type__!==ft)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(e.configuration.registry).forEach((n=>{this.configuration.registry.hasOwnProperty(n)?t&&(this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])):this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])})),e._configuration=this.configuration,this}execute(e,...t){return(this.get(e)||ht)(...t)}get(e){const t=this.configuration.registry[e];if(!t)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${e}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return function(...e){if(0===e.length)throw new Error("Failed creating sequence: No functions provided");return function(...t){let n=t;const r=this;for(;e.length>0;)n=[e.shift().apply(r,n)];return n[0]}}(...t.methods)}isPatched(e){return!!this.configuration.registry[e]}patch(e,t,n={}){const{chain:r=!1}=n;if(this.configuration.registry[e]&&this.configuration.registry[e].final)throw new Error(`Failed patching '${e}': Method marked as being final`);if("function"!=typeof t)throw new Error(`Failed patching '${e}': Provided method is not a function`);if(r)this.configuration.registry[e]?this.configuration.registry[e].methods.push(t):this.configuration.registry[e]=pt(t);else if(this.isPatched(e)){const{original:n}=this.configuration.registry[e];this.configuration.registry[e]=Object.assign(pt(t),{original:n})}else this.configuration.registry[e]=pt(t);return this}patchInline(e,t,...n){return this.isPatched(e)||this.patch(e,t),this.execute(e,...n)}plugin(e,...t){return t.forEach((t=>{this.patch(e,t,{chain:!0})})),this}restore(e){if(!this.isPatched(e))throw new Error(`Failed restoring method: No method present for key: ${e}`);if("function"!=typeof this.configuration.registry[e].original)throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${e}`);return this.configuration.registry[e].methods=[this.configuration.registry[e].original],this}setFinal(e){if(!this.configuration.registry.hasOwnProperty(e))throw new Error(`Failed marking '${e}' as final: No method found for key`);return this.configuration.registry[e].final=!0,this}}let mt=null;var yt=n(62639),wt=n(2568);const vt="abcdef0123456789";function bt(e,t){const n=e.url.replace("//",""),r=-1==n.indexOf("/")?"/":n.slice(n.indexOf("/")),i=e.method?e.method.toUpperCase():"GET",o=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&"auth",s=`00000000${t.nc}`.slice(-8),a=function(e,t,n,r,i,o,s){const a=s||wt(`${t}:${n}:${r}`);return e&&"md5-sess"===e.toLowerCase()?wt(`${a}:${i}:${o}`):a}(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),u=wt(`${i}:${r}`),l=wt(o?`${a}:${t.nonce}:${s}:${t.cnonce}:${o}:${u}`:`${a}:${t.nonce}:${u}`),c={username:t.username,realm:t.realm,nonce:t.nonce,uri:r,qop:o,response:l,nc:s,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},d=[];for(const e in c)c[e]&&("qop"===e||"nc"===e||"algorithm"===e?d.push(`${e}=${c[e]}`):d.push(`${e}="${c[e]}"`));return`Digest ${d.join(", ")}`}function _t(e){return function(e){if("object"!=typeof e||null===e||"[object Object]"!=Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e)?Object.assign({},e):Object.setPrototypeOf(Object.assign({},e),Object.getPrototypeOf(e))}function xt(...e){let t=null,n=[...e];for(;n.length>0;){const e=n.shift();t=t?At(t,e):_t(e)}return t}function At(e,t){const n=_t(e);return Object.keys(t).forEach((e=>{n.hasOwnProperty(e)?Array.isArray(t[e])?n[e]=Array.isArray(n[e])?[...n[e],...t[e]]:[...t[e]]:"object"==typeof t[e]&&t[e]?n[e]="object"==typeof n[e]&&n[e]?At(n[e],t[e]):_t(t[e]):n[e]=t[e]:n[e]=t[e]})),n}function Et(...e){if(0===e.length)return{};const t={};return e.reduce(((e,n)=>(Object.keys(n).forEach((r=>{const i=r.toLowerCase();t.hasOwnProperty(i)?e[t[i]]=n[r]:(t[i]=r,e[r]=n[r])})),e)),{})}var Nt=n(42830);const Tt="function"==typeof ArrayBuffer,{toString:Ct}=Object.prototype;function Ot(e){const t=(mt||(mt=new gt),mt);return t.patchInline("request",(e=>t.patchInline("fetch",dt,e.url,function(e){let t={};const n={method:e.method};if(e.headers&&(t=Et(t,e.headers)),void 0!==e.data){const[r,i]=function(e){if(!(0,yt.$)()&&e instanceof Nt.Readable)return[e,{}];if("string"==typeof e)return[e,{}];if(null!=(t=e)&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))return[e,{}];if(function(e){return Tt&&(e instanceof ArrayBuffer||"[object ArrayBuffer]"===Ct.call(e))}(e))return[e,{}];if(e&&"object"==typeof e)return[JSON.stringify(e),{"content-type":"application/json"}];var t;throw new Error("Unable to convert request body: Unexpected body type: "+typeof e)}(e.data);n.body=r,t=Et(t,i)}return e.signal&&(n.signal=e.signal),e.withCredentials&&(n.credentials="include"),(0,yt.$)()||(e.httpAgent||e.httpsAgent)&&(n.agent=t=>"http:"===t.protocol?e.httpAgent||new ut.Agent:e.httpsAgent||new lt.Agent),n.headers=t,n}(e))),e)}const Pt=`/files/${(0,r.ts)()?.uid}`,It=(0,u.generateRemoteUrl)("dav"+Pt),St=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:It;const t=(0,l.eI)(e,{headers:{requesttoken:(0,r.IH)()||""}});return(0,l.lD)().patch("request",(e=>(e.headers?.method&&(e.method=e.headers.method,delete e.headers.method),async function(e){if(!e._digest)return Ot(e);const t=e._digest;delete e._digest,t.hasDigestAuth&&(e=xt(e,{headers:{Authorization:bt(e,t)}}));const n=await Ot(e);if(401==n.status){if(t.hasDigestAuth=function(e,t){const n=e.headers&&e.headers.get("www-authenticate")||"";if("digest"!==n.split(/\s/)[0].toLowerCase())return!1;const r=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const e=r.exec(n);if(!e)break;t[e[1]]=e[2]||e[3]}return t.nc+=1,t.cnonce=function(){let e="";for(let t=0;t<32;++t)e=`${e}${vt[Math.floor(16*Math.random())]}`;return e}(),!0}(n,t),t.hasDigestAuth){e=xt(e,{headers:{Authorization:bt(e,t)}});const n=await Ot(e);return 401==n.status?t.hasDigestAuth=!1:t.nc++,n}}else t.nc++;return n}(e)))),t};n(3443),(0,i.IY)().setApp("files").detectUser().build(),St();const Rt=function(e){const t=e.props,n=function(e=""){let t=h.NONE;return e&&((e.includes("C")||e.includes("K"))&&(t|=h.CREATE),e.includes("G")&&(t|=h.READ),(e.includes("W")||e.includes("N")||e.includes("V"))&&(t|=h.UPDATE),e.includes("D")&&(t|=h.DELETE),e.includes("R")&&(t|=h.SHARE)),t}(t?.permissions),i=t["owner-id"]||(0,r.ts)()?.uid,o=(0,u.generateRemoteUrl)("dav"+Pt+e.filename),s=t?.fileid<0?o.split("").reduce((function(e,t){return(e=(e<<5)-e+t.charCodeAt(0))&e}),0):t?.fileid||0,a={id:s,source:o,mtime:new Date(e.lastmod),mime:e.mime,size:t?.size||0,permissions:n,owner:i,root:Pt,attributes:{...e,...t,hasPreview:t?.["has-preview"],failed:t?.fileid<0}};return delete a.attributes.props,"file"===e.type?new _(a):new x(a)},kt=e=>`\n"u"&&(window._nc_dav_namespaces={...g}),Object.keys(window._nc_dav_namespaces).map((e=>`xmlns:${e}="${window._nc_dav_namespaces?.[e]}"`)).join(" ")}>\n\t\n\t\t${typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...p]),window._nc_dav_properties.map((e=>`<${e} />`)).join(" ")}\n\t\n \n ${e}\n \n`,jt=function(e){return new x({id:e.id,source:(0,u.generateRemoteUrl)("dav/systemtags/"+e.id),owner:(0,r.ts)()?.uid,root:"/systemtags",permissions:h.READ,attributes:{...e,"is-tag":!0}})};(typeof window._nc_navigation>"u"&&(window._nc_navigation=new class{_views=[];_currentView=null;register(e){if(this._views.find((t=>t.id===e.id)))throw new Error(`View id ${e.id} is already registered`);this._views.push(e)}remove(e){const t=this._views.findIndex((t=>t.id===e));-1!==t&&this._views.splice(t,1)}get views(){return this._views}setActive(e){this._currentView=e}get active(){return this._currentView}},c.debug("Navigation service initialized")),window._nc_navigation).register(new class{_view;constructor(e){(function(e){if(!e.id||"string"!=typeof e.id)throw new Error("View id is required and must be a string");if(!e.name||"string"!=typeof e.name)throw new Error("View name is required and must be a string");if(e.columns&&e.columns.length>0&&(!e.caption||"string"!=typeof e.caption))throw new Error("View caption is required for top-level views 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.icon||"string"!=typeof e.icon||!function(e){if("string"!=typeof e)throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);if(0===(e=e.trim()).length||!0!==Ve.XMLValidator.validate(e))return!1;let t;const n=new Ve.XMLParser;try{t=n.parse(e)}catch{return!1}return!(!t||!("svg"in t))}(e.icon))throw new Error("View icon is required and must be a valid svg string");if(!("order"in e)||"number"!=typeof e.order)throw new Error("View order is required and must be a number");if(e.columns&&e.columns.forEach((e=>{if(!(e instanceof A))throw new Error("View columns must be an array of Column. Invalid column found")})),e.emptyView&&"function"!=typeof e.emptyView)throw new Error("View emptyView must be a function");if(e.parent&&"string"!=typeof e.parent)throw new Error("View parent must be a string");if("sticky"in e&&"boolean"!=typeof e.sticky)throw new Error("View sticky must be a boolean");if("expanded"in e&&"boolean"!=typeof e.expanded)throw new Error("View expanded must be a boolean");if(e.defaultSortKey&&"string"!=typeof e.defaultSortKey)throw new Error("View defaultSortKey must be a string")})(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 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}}({id:"tags",name:(0,o.Iu)("systemtags","Tags"),caption:(0,o.Iu)("systemtags","List of tags and their associated files and folders."),emptyTitle:(0,o.Iu)("systemtags","No tags found"),emptyCaption:(0,o.Iu)("systemtags","Tags you have created will show up here."),icon:'',order:25,getContents:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const t=(await(async()=>{try{const{data:e}=await ot.getDirectoryContents("/systemtags",{data:'\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n',details:!0,glob:"/systemtags/*"});return(e=>e.map((e=>{let{props:t}=e;return Object.fromEntries(Object.entries(t).map((e=>{let[t,n]=e;return[(0,st.Z)(t),"displayName"===(0,st.Z)(t)?String(n):n]})))})))(e)}catch(e){throw at.error((0,o.Iu)("systemtags","Failed to load tags"),{error:e}),new Error((0,o.Iu)("systemtags","Failed to load tags"))}})()).filter((e=>e.userVisible));if("/"===e)return{folder:new x({id:0,source:(0,u.generateRemoteUrl)("dav/systemtags"),owner:(0,r.ts)()?.uid,root:"/systemtags",permissions:h.NONE}),contents:t.map(jt)};const n=parseInt(e.replace("/",""),10),i=t.find((e=>e.id===n));if(!i)throw new Error("Tag not found");return{folder:jt(i),contents:(await St().getDirectoryContents("/",{details:!0,data:kt(n),headers:{method:"REPORT"}})).data.map(Rt)}}}))},50584:e=>{e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},3443:function(e,t,n){var r,i,o=n(25108);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=function(e){"use strict";function t(e,n){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},t(e,n)}function n(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=r(e);if(t){var o=r(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw o}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{Z:()=>a});var r=n(87537),i=n.n(r),o=n(23645),s=n.n(o)()(i());s.push([e.id,".files-list__system-tags{--min-size: 32px;display:none;justify-content:center;align-items:center;min-width:calc(var(--min-size)*2);max-width:300px}.files-list__system-tag{padding:5px 10px;border:1px solid;border-radius:var(--border-radius-pill);border-color:var(--color-border);color:var(--color-text-maxcontrast);height:var(--min-size);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:22px;text-align:center}.files-list__system-tag--more{overflow:visible;text-overflow:initial}.files-list__system-tag+.files-list__system-tag{margin-left:5px}@media(min-width: 512px){.files-list__system-tags{display:flex}}","",{version:3,sources:["webpack://./apps/systemtags/src/css/fileEntryInlineSystemTags.scss"],names:[],mappings:"AAsBA,yBACC,gBAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,iCAAA,CACA,eAAA,CAGD,wBACC,gBAAA,CACA,gBAAA,CACA,uCAAA,CACA,gCAAA,CACA,mCAAA,CACA,sBAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CACA,gBAAA,CACA,iBAAA,CAEA,8BACC,gBAAA,CACA,qBAAA,CAID,gDACC,eAAA,CAIF,yBACC,yBACC,YAAA,CAAA",sourcesContent:["/**\n * @copyright Copyright (c) 2023 Lucas Azevedo \n *\n * @author Lucas Azevedo \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\n\n.files-list__system-tags {\n\t--min-size: 32px;\n\tdisplay: none;\n\tjustify-content: center;\n\talign-items: center;\n\tmin-width: calc(var(--min-size) * 2);\n\tmax-width: 300px;\n}\n\n.files-list__system-tag {\n\tpadding: 5px 10px;\n\tborder: 1px solid;\n\tborder-radius: var(--border-radius-pill);\n\tborder-color: var(--color-border);\n\tcolor: var(--color-text-maxcontrast);\n\theight: var(--min-size);\n\twhite-space: nowrap;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tline-height: 22px; // min-size - 2 * 5px padding\n\ttext-align: center;\n\n\t&--more {\n\t\toverflow: visible;\n\t\ttext-overflow: initial;\n\t}\n\n\t// Proper spacing if multiple shown\n\t& + .files-list__system-tag {\n\t\tmargin-left: 5px;\n\t}\n}\n\n@media (min-width: 512px) {\n\t.files-list__system-tags {\n\t\tdisplay: flex;\n\t}\n}\n"],sourceRoot:""}]);const a=s},79267:(e,t,n)=>{var r=n(8501),i=n(8575),o=e.exports;for(var s in r)r.hasOwnProperty(s)&&(o[s]=r[s]);function a(e){if("string"==typeof e&&(e=i.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}o.request=function(e,t){return e=a(e),r.request.call(this,e,t)},o.get=function(e,t){return e=a(e),r.get.call(this,e,t)}},88473:(e,t,n)=>{(t=e.exports=n(79481)).Stream=t,t.Readable=t,t.Writable=n(64229),t.Duplex=n(56753),t.Transform=n(74605),t.PassThrough=n(82725),t.finished=n(8610),t.pipeline=n(59946)},8501:(e,t,n)=>{var r=n(11989),i=n(55676),o=n(47529),s=n(50584),a=n(8575),u=t;u.request=function(e,t){e="string"==typeof e?a.parse(e):o(e);var i=-1===n.g.location.protocol.search(/^https?:$/)?"http:":"",s=e.protocol||i,u=e.hostname||e.host,l=e.port,c=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?s+"//"+u:"")+(l?":"+l:"")+c,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var d=new r(e);return t&&d.on("response",t),d},u.get=function(e,t){var n=u.request(e,t);return n.end(),n},u.ClientRequest=r,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=s,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},8725:(e,t,n)=>{var r;function i(){if(void 0!==r)return r;if(n.g.XMLHttpRequest){r=new n.g.XMLHttpRequest;try{r.open("GET",n.g.XDomainRequest?"/":"https://example.com")}catch(e){r=null}}else r=null;return r}function o(e){var t=i();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function s(e){return"function"==typeof e}t.fetch=s(n.g.fetch)&&s(n.g.ReadableStream),t.writableStream=s(n.g.WritableStream),t.abortController=s(n.g.AbortController),t.arraybuffer=t.fetch||o("arraybuffer"),t.msstream=!t.fetch&&o("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&o("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!i()&&s(i().overrideMimeType),r=null},11989:(e,t,n)=>{var r=n(48764).Buffer,i=n(34155),o=n(8725),s=n(35717),a=n(55676),u=n(88473),l=a.IncomingMessage,c=a.readyStates,d=e.exports=function(e){var t,n=this;u.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+r.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var i=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)i=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!o.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}n._mode=function(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":"text"}(t,i),n._fetchTimer=null,n._socketTimeout=null,n._socketTimer=null,n.on("finish",(function(){n._onFinish()}))};s(d,u.Writable),d.prototype.setHeader=function(e,t){var n=e.toLowerCase();-1===f.indexOf(n)&&(this._headers[n]={name:e,value:t})},d.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},d.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},d.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var r=e._headers,s=null;"GET"!==t.method&&"HEAD"!==t.method&&(s=new Blob(e._body,{type:(r["content-type"]||{}).value||""}));var a=[];if(Object.keys(r).forEach((function(e){var t=r[e].name,n=r[e].value;Array.isArray(n)?n.forEach((function(e){a.push([t,e])})):a.push([t,n])})),"fetch"===e._mode){var u=null;if(o.abortController){var l=new AbortController;u=l.signal,e._fetchAbortController=l,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=n.g.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}n.g.fetch(e._opts.url,{method:e._opts.method,headers:a,body:s||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:u}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var d=e._xhr=new n.g.XMLHttpRequest;try{d.open(e._opts.method,e._opts.url,!0)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}"responseType"in d&&(d.responseType=e._mode),"withCredentials"in d&&(d.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in d&&d.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(d.timeout=t.requestTimeout,d.ontimeout=function(){e.emit("requestTimeout")}),a.forEach((function(e){d.setRequestHeader(e[0],e[1])})),e._response=null,d.onreadystatechange=function(){switch(d.readyState){case c.LOADING:case c.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(d.onprogress=function(){e._onXHRProgress()}),d.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{d.send(s)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}}}},d.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},d.prototype._connect=function(){var e=this;e._destroyed||(e._response=new l(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},d.prototype._write=function(e,t,n){this._body.push(e),n()},d.prototype._resetTimers=function(e){var t=this;n.g.clearTimeout(t._socketTimer),t._socketTimer=null,e?(n.g.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=n.g.setTimeout((function(){t.emit("timeout")}),t._socketTimeout))},d.prototype.abort=d.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},d.prototype.end=function(e,t,n){"function"==typeof e&&(n=e,e=void 0),u.Writable.prototype.end.call(this,e,t,n)},d.prototype.setTimeout=function(e,t){var n=this;t&&n.once("timeout",t),n._socketTimeout=e,n._resetTimers(!1)},d.prototype.flushHeaders=function(){},d.prototype.setNoDelay=function(){},d.prototype.setSocketKeepAlive=function(){};var f=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},55676:(e,t,n)=>{var r=n(34155),i=n(48764).Buffer,o=n(8725),s=n(35717),a=n(88473),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=t.IncomingMessage=function(e,t,n,s){var u=this;if(a.Readable.call(u),u._mode=n,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",(function(){r.nextTick((function(){u.emit("close")}))})),"fetch"===n){if(u._fetchResponse=t,u.url=t.url,u.statusCode=t.status,u.statusMessage=t.statusText,t.headers.forEach((function(e,t){u.headers[t.toLowerCase()]=e,u.rawHeaders.push(t,e)})),o.writableStream){var l=new WritableStream({write:function(e){return s(!1),new Promise((function(t,n){u._destroyed?n():u.push(i.from(e))?t():u._resumeFetch=t}))},close:function(){s(!0),u._destroyed||u.push(null)},abort:function(e){s(!0),u._destroyed||u.emit("error",e)}});try{return void t.body.pipeTo(l).catch((function(e){s(!0),u._destroyed||u.emit("error",e)}))}catch(e){}}var c=t.body.getReader();!function e(){c.read().then((function(t){u._destroyed||(s(t.done),t.done?u.push(null):(u.push(i.from(t.value)),e()))})).catch((function(e){s(!0),u._destroyed||u.emit("error",e)}))}()}else if(u._xhr=e,u._pos=0,u.url=e.responseURL,u.statusCode=e.status,u.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===u.headers[n]&&(u.headers[n]=[]),u.headers[n].push(t[2])):void 0!==u.headers[n]?u.headers[n]+=", "+t[2]:u.headers[n]=t[2],u.rawHeaders.push(t[1],t[2])}})),u._charset="x-user-defined",!o.overrideMimeType){var d=u.rawHeaders["mime-type"];if(d){var f=d.match(/;\s*charset=([^;])(;|$)/);f&&(u._charset=f[1].toLowerCase())}u._charset||(u._charset="utf-8")}};s(l,a.Readable),l.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},l.prototype._onXHRProgress=function(e){var t=this,r=t._xhr,o=null;switch(t._mode){case"text":if((o=r.responseText).length>t._pos){var s=o.substr(t._pos);if("x-user-defined"===t._charset){for(var a=i.alloc(s.length),l=0;lt._pos&&(t.push(i.from(new Uint8Array(c.result.slice(t._pos)))),t._pos=c.result.byteLength)},c.onload=function(){e(!0),t.push(null)},c.readAsArrayBuffer(o)}t._xhr.readyState===u.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}},47529:e=>{e.exports=function(){for(var e={},n=0;n{},52361:()=>{},94616:()=>{}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.m=t,e=[],r.O=(t,n,i,o)=>{if(!n){var s=1/0;for(c=0;c=o)&&Object.keys(r.O).every((e=>r.O[e](n[u])))?n.splice(u--,1):(a=!1,o0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[n,i,o]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.e=()=>Promise.resolve(),r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&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=5191,(()=>{r.b=document.baseURI||self.location.href;var e={5191:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var i,o,s=n[0],a=n[1],u=n[2],l=0;if(s.some((t=>0!==e[t]))){for(i in a)r.o(a,i)&&(r.m[i]=a[i]);if(u)var c=u(r)}for(t&&t(n);lr(11057)));i=r.O(i)})(); -//# sourceMappingURL=systemtags-init.js.map?v=19b4130c00f49a140966 \ No newline at end of file +(()=>{var e,t={11057:(e,t,n)=>{"use strict";var r=n(77958),i=n(17499),o=n(31352),s=n(62520),a=n(65358),u=n(79753),l=n(14596);const c=null===(d=(0,r.ts)())?(0,i.IY)().setApp("files").build():(0,i.IY)().setApp("files").setUid(d.uid).build();var d,f=(e=>(e.DEFAULT="default",e.HIDDEN="hidden",e))(f||{}),h=(e=>(e[e.NONE=0]="NONE",e[e.CREATE=4]="CREATE",e[e.READ=1]="READ",e[e.UPDATE=2]="UPDATE",e[e.DELETE=8]="DELETE",e[e.SHARE=16]="SHARE",e[e.ALL=31]="ALL",e))(h||{});const p=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","nc:share-attributes","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:share-types","oc:size","ocs:share-permissions"],g={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"};var m=(e=>(e.Folder="folder",e.File="file",e))(m||{});const y=function(e,t){return null!==e.match(t)},w=(e,t)=>{if(e.id&&"number"!=typeof e.id)throw new Error("Invalid id type of value");if(!e.source)throw new Error("Missing mandatory source");try{new URL(e.source)}catch{throw new Error("Invalid source format, source must be a valid URL")}if(!e.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(e.mtime&&!(e.mtime instanceof Date))throw new Error("Invalid mtime type");if(e.crtime&&!(e.crtime instanceof Date))throw new Error("Invalid crtime type");if(!e.mime||"string"!=typeof e.mime||!e.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in e&&"number"!=typeof e.size&&void 0!==e.size)throw new Error("Invalid size type");if("permissions"in e&&void 0!==e.permissions&&!("number"==typeof e.permissions&&e.permissions>=h.NONE&&e.permissions<=h.ALL))throw new Error("Invalid permissions");if(e.owner&&null!==e.owner&&"string"!=typeof e.owner)throw new Error("Invalid owner type");if(e.attributes&&"object"!=typeof e.attributes)throw new Error("Invalid attributes type");if(e.root&&"string"!=typeof e.root)throw new Error("Invalid root type");if(e.root&&!e.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(e.root&&!e.source.includes(e.root))throw new Error("Root must be part of the source");if(e.root&&y(e.source,t)){const n=e.source.match(t)[0];if(!e.source.includes((0,s.join)(n,e.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(e.status&&!Object.values(v).includes(e.status))throw new Error("Status must be a valid NodeStatus")};var v=(e=>(e.NEW="new",e.FAILED="failed",e.LOADING="loading",e.LOCKED="locked",e))(v||{});class b{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;constructor(e,t){w(e,t||this._knownDavService),this._data=e;const n={set:(e,t,n)=>(this.updateMtime(),Reflect.set(e,t,n)),deleteProperty:(e,t)=>(this.updateMtime(),Reflect.deleteProperty(e,t))};this._attributes=new Proxy(e.attributes||{},n),delete this._data.attributes,t&&(this._knownDavService=t)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:e}=new URL(this.source);return e+(0,a.Ec)(this.source.slice(e.length))}get basename(){return(0,s.basename)(this.source)}get extension(){return(0,s.extname)(this.source)}get dirname(){if(this.root){let e=this.source;this.isDavRessource&&(e=e.split(this._knownDavService).pop());const t=e.indexOf(this.root),n=this.root.replace(/\/$/,"");return(0,s.dirname)(e.slice(t+n.length)||"/")}const e=new URL(this.source);return(0,s.dirname)(e.pathname)}get mime(){return this._data.mime}get mtime(){return this._data.mtime}get crtime(){return this._data.crtime}get size(){return this._data.size}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavRessource?void 0!==this._data.permissions?this._data.permissions:h.NONE:h.READ}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return y(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,s.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){let e=this.source;this.isDavRessource&&(e=e.split(this._knownDavService).pop());const t=e.indexOf(this.root),n=this.root.replace(/\/$/,"");return e.slice(t+n.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id||this.attributes?.fileid}get status(){return this._data?.status}set status(e){this._data.status=e}move(e){w({...this._data,source:e},this._knownDavService),this._data.source=e,this.updateMtime()}rename(e){if(e.includes("/"))throw new Error("Invalid basename");this.move((0,s.dirname)(this.source)+"/"+e)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}}class _ extends b{get type(){return m.File}}class x extends b{constructor(e){super({...e,mime:"httpd/unix-directory"})}get type(){return m.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}(0,u.generateRemoteUrl)("dav");class A{_column;constructor(e){E(e),this._column=e}get id(){return this._column.id}get title(){return this._column.title}get render(){return this._column.render}get sort(){return this._column.sort}get summary(){return this._column.summary}}const E=function(e){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");if(e.sort&&"function"!=typeof e.sort)throw new Error("Column sortFunction must be a function");if(e.summary&&"function"!=typeof e.summary)throw new Error("Column summary must be a function");return!0};var N={},T={};!function(e){const t=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n="["+t+"]["+t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",r=new RegExp("^"+n+"$");e.isExist=function(e){return typeof e<"u"},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,n){if(t){const r=Object.keys(t),i=r.length;for(let o=0;o"u")},e.getAllMatches=function(e,t){const n=[];let r=t.exec(e);for(;r;){const i=[];i.startIndex=t.lastIndex-r[0].length;const o=r.length;for(let e=0;e5&&"xml"===r)return M("InvalidXml","XML declaration allowed only at the start of the document.",q(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}continue}return t}function S(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let n=1;for(t+=8;t"===e[t]&&(n--,0===n))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t"===e[t+2]){t+=2;break}return t}N.validate=function(e,t){t=Object.assign({},O,t);const n=[];let r=!1,i=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let o=0;o"!==e[o]&&" "!==e[o]&&"\t"!==e[o]&&"\n"!==e[o]&&"\r"!==e[o];o++)u+=e[o];if(u=u.trim(),"/"===u[u.length-1]&&(u=u.substring(0,u.length-1),o--),!V(u)){let t;return t=0===u.trim().length?"Invalid space after '<'.":"Tag '"+u+"' is an invalid name.",M("InvalidTag",t,q(e,o))}const l=j(e,o);if(!1===l)return M("InvalidAttr","Attributes for '"+u+"' have open quote.",q(e,o));let c=l.value;if(o=l.index,"/"===c[c.length-1]){const n=o-c.length;c=c.substring(0,c.length-1);const i=D(c,t);if(!0!==i)return M(i.err.code,i.err.msg,q(e,n+i.err.line));r=!0}else if(a){if(!l.tagClosed)return M("InvalidTag","Closing tag '"+u+"' doesn't have proper closing.",q(e,o));if(c.trim().length>0)return M("InvalidTag","Closing tag '"+u+"' can't have attributes or invalid starting.",q(e,s));{const t=n.pop();if(u!==t.tagName){let n=q(e,t.tagStartPos);return M("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+u+"'.",q(e,s))}0==n.length&&(i=!0)}}else{const a=D(c,t);if(!0!==a)return M(a.err.code,a.err.msg,q(e,o-c.length+a.err.line));if(!0===i)return M("InvalidXml","Multiple possible root nodes found.",q(e,o));-1!==t.unpairedTags.indexOf(u)||n.push({tagName:u,tagStartPos:s}),r=!0}for(o++;o0)||M("InvalidXml","Invalid '"+JSON.stringify(n.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):M("InvalidXml","Start tag expected.",1)};const R='"',k="'";function j(e,t){let n="",r="",i=!1;for(;t"===e[t]&&""===r){i=!0;break}n+=e[t]}return""===r&&{value:n,index:t,tagClosed:i}}const L=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function D(e,t){const n=C.getAllMatches(e,L),r={};for(let e=0;e!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e}};U.buildOptions=function(e){return Object.assign({},H,e)},U.defaultOptions=H;const z=T;function G(e,t){let n="";for(;t0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}},ie=function(e,t){const n={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let r=1,i=!1,o=!1,s="";for(;t"===e[t]){if(o?"-"===e[t-1]&&"-"===e[t-2]&&(o=!1,r--):r--,0===r)break}else"["===e[t]?i=!0:s+=e[t];else{if(i&&W(e,t))t+=7,[entityName,val,t]=G(e,t+1),-1===val.indexOf("&")&&(n[J(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(i&&Y(e,t))t+=8;else if(i&&K(e,t))t+=8;else if(i&&Z(e,t))t+=9;else{if(!X)throw new Error("Invalid DOCTYPE");o=!0}r++,s=""}if(0!==r)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:t}},oe=function(e,t={}){if(t=Object.assign({},te,t),!e||"string"!=typeof e)return e;let n=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(n))return e;if(t.hex&&Q.test(n))return Number.parseInt(n,16);{const r=ee.exec(n);if(r){const i=r[1],o=r[2];let s=function(e){return e&&-1!==e.indexOf(".")&&("."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1))),e}(r[3]);const a=r[4]||r[6];if(!t.leadingZeros&&o.length>0&&i&&"."!==n[2])return e;if(!t.leadingZeros&&o.length>0&&!i&&"."!==n[1])return e;{const r=Number(n),u=""+r;return-1!==u.search(/[eE]/)||a?t.eNotation?r:e:-1!==n.indexOf(".")?"0"===u&&""===s||u===s||i&&u==="-"+s?r:e:o?s===u||i+s===u?r:e:n===u||n===i+u?r:e}}return e}};function se(e){const t=Object.keys(e);for(let n=0;n0)){s||(e=this.replaceEntitiesValue(e));const r=this.options.tagValueProcessor(t,e,n,i,o);return null==r?e:typeof r!=typeof e||r!==e?r:this.options.trimValues||e.trim()===e?ve(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function ue(e){if(this.options.removeNSPrefix){const t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,ne.nameRegexp);const le=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function ce(e,t,n){if(!this.options.ignoreAttributes&&"string"==typeof e){const n=ne.getAllMatches(e,le),r=n.length,i={};for(let e=0;e",o,"Closing Tag is not closed.");let s=e.substring(o+2,t).trim();if(this.options.removeNSPrefix){const e=s.indexOf(":");-1!==e&&(s=s.substr(e+1))}this.options.transformTagName&&(s=this.options.transformTagName(s)),n&&(r=this.saveTextToParentTag(r,n,i));const a=i.substring(i.lastIndexOf(".")+1);if(s&&-1!==this.options.unpairedTags.indexOf(s))throw new Error(`Unpaired tag can not be used as closing tag: `);let u=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(u=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):u=i.lastIndexOf("."),i=i.substring(0,u),n=this.tagsNodeStack.pop(),r="",o=t}else if("?"===e[o+1]){let t=ye(e,o,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(r=this.saveTextToParentTag(r,n,i),!(this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags)){const e=new re(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,i,t.tagName)),this.addChild(n,e,i)}o=t.closeIndex+1}else if("!--"===e.substr(o+1,3)){const t=me(e,"--\x3e",o+4,"Comment is not closed.");if(this.options.commentPropName){const s=e.substring(o+4,t-2);r=this.saveTextToParentTag(r,n,i),n.add(this.options.commentPropName,[{[this.options.textNodeName]:s}])}o=t}else if("!D"===e.substr(o+1,2)){const t=ie(e,o);this.docTypeEntities=t.entities,o=t.i}else if("!["===e.substr(o+1,2)){const t=me(e,"]]>",o,"CDATA is not closed.")-2,s=e.substring(o+9,t);if(r=this.saveTextToParentTag(r,n,i),this.options.cdataPropName)n.add(this.options.cdataPropName,[{[this.options.textNodeName]:s}]);else{let e=this.parseTextData(s,n.tagname,i,!0,!1,!0);null==e&&(e=""),n.add(this.options.textNodeName,e)}o=t+2}else{let s=ye(e,o,this.options.removeNSPrefix),a=s.tagName;const u=s.rawTagName;let l=s.tagExp,c=s.attrExpPresent,d=s.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),n&&r&&"!xml"!==n.tagname&&(r=this.saveTextToParentTag(r,n,i,!1));const f=n;if(f&&-1!==this.options.unpairedTags.indexOf(f.tagname)&&(n=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),a!==t.tagname&&(i+=i?"."+a:a),this.isItStopNode(this.options.stopNodes,i,a)){let t="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)o=s.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))o=s.closeIndex;else{const n=this.readStopNodeData(e,u,d+1);if(!n)throw new Error(`Unexpected end of ${u}`);o=n.i,t=n.tagContent}const r=new re(a);a!==l&&c&&(r[":@"]=this.buildAttributesMap(l,i,a)),t&&(t=this.parseTextData(t,a,i,!0,c,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),r.add(this.options.textNodeName,t),this.addChild(n,r,i)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),i=i.substr(0,i.length-1),l=a):l=l.substr(0,l.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const e=new re(a);a!==l&&c&&(e[":@"]=this.buildAttributesMap(l,i,a)),this.addChild(n,e,i),i=i.substr(0,i.lastIndexOf("."))}else{const e=new re(a);this.tagsNodeStack.push(n),a!==l&&c&&(e[":@"]=this.buildAttributesMap(l,i,a)),this.addChild(n,e,i),n=e}r="",o=d}}else r+=e[o];return t.child};function fe(e,t,n){const r=this.options.updateTag(t.tagname,n,t[":@"]);!1===r||("string"==typeof r&&(t.tagname=r),e.addChild(t))}const he=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){const n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function pe(e,t,n,r){return e&&(void 0===r&&(r=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,r))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function ge(e,t,n){const r="*."+n;for(const n in e){const i=e[n];if(r===i||t===i)return!0}return!1}function me(e,t,n,r){const i=e.indexOf(t,n);if(-1===i)throw new Error(r);return i+t.length-1}function ye(e,t,n,r=">"){const i=function(e,t,n=">"){let r,i="";for(let o=t;o",n,`${t} is not closed`);if(e.substring(n+2,o).trim()===t&&(i--,0===i))return{tagContent:e.substring(r,n),i:o};n=o}else if("?"===e[n+1])n=me(e,"?>",n+1,"StopNode is not closed.");else if("!--"===e.substr(n+1,3))n=me(e,"--\x3e",n+3,"StopNode is not closed.");else if("!["===e.substr(n+1,2))n=me(e,"]]>",n,"StopNode is not closed.")-2;else{const r=ye(e,n,">");r&&((r&&r.tagName)===t&&"/"!==r.tagExp[r.tagExp.length-1]&&i++,n=r.closeIndex)}}function ve(e,t,n){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&oe(e,n)}return ne.isExist(e)?e:""}var be={};function _e(e,t,n){let r;const i={};for(let o=0;o0&&(i[t.textNodeName]=r):void 0!==r&&(i[t.textNodeName]=r),i}function xe(e){const t=Object.keys(e);for(let e=0;e"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"}},this.addExternalEntities=se,this.parseXml=de,this.parseTextData=ae,this.resolveNameSpace=ue,this.buildAttributesMap=ce,this.isItStopNode=ge,this.replaceEntitiesValue=he,this.readStopNodeData=we,this.saveTextToParentTag=pe,this.addChild=fe}},{prettify:Ce}=be,Oe=N;function Pe(e,t,n,r){let i="",o=!1;for(let s=0;s`,o=!1;continue}if(u===t.commentPropName){i+=r+`\x3c!--${a[u][0][t.textNodeName]}--\x3e`,o=!0;continue}if("?"===u[0]){const e=Se(a[":@"],t),n="?xml"===u?"":r;let s=a[u][0][t.textNodeName];s=0!==s.length?" "+s:"",i+=n+`<${u}${s}${e}?>`,o=!0;continue}let c=r;""!==c&&(c+=t.indentBy);const d=r+`<${u}${Se(a[":@"],t)}`,f=Pe(a[u],t,l,c);-1!==t.unpairedTags.indexOf(u)?t.suppressUnpairedNode?i+=d+">":i+=d+"/>":f&&0!==f.length||!t.suppressEmptyNode?f&&f.endsWith(">")?i+=d+`>${f}${r}`:(i+=d+">",f&&""!==r&&(f.includes("/>")||f.includes("`):i+=d+"/>",o=!0}return i}function Ie(e){const t=Object.keys(e);for(let n=0;n0&&t.processEntities)for(let n=0;n0&&(n="\n"),Pe(e,t,"",n)},Le={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function De(e){this.options=Object.assign({},Le,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Fe),this.processTextOrObjNode=$e,this.options.format?(this.indentate=Me,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function $e(e,t,n){const r=this.j2x(e,n+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,r.attrStr,n):this.buildObjectNode(r.val,t,r.attrStr,n)}function Me(e){return this.options.indentBy.repeat(e)}function Fe(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}De.prototype.build=function(e){return this.options.preserveOrder?je(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},De.prototype.j2x=function(e,t){let n="",r="";for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i))if(typeof e[i]>"u")this.isAttribute(i)&&(r+="");else if(null===e[i])this.isAttribute(i)?r+="":"?"===i[0]?r+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:r+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(e[i]instanceof Date)r+=this.buildTextValNode(e[i],i,"",t);else if("object"!=typeof e[i]){const o=this.isAttribute(i);if(o)n+=this.buildAttrPairStr(o,""+e[i]);else if(i===this.options.textNodeName){let t=this.options.tagValueProcessor(i,""+e[i]);r+=this.replaceEntitiesValue(t)}else r+=this.buildTextValNode(e[i],i,"",t)}else if(Array.isArray(e[i])){const n=e[i].length;let o="";for(let s=0;s"u"||(null===n?"?"===i[0]?r+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:r+=this.indentate(t)+"<"+i+"/"+this.tagEndChar:"object"==typeof n?this.options.oneListGroup?o+=this.j2x(n,t+1).val:o+=this.processTextOrObjNode(n,i,t):o+=this.buildTextValNode(n,i,"",t))}this.options.oneListGroup&&(o=this.buildObjectNode(o,i,"",t)),r+=o}else if(this.options.attributesGroupName&&i===this.options.attributesGroupName){const t=Object.keys(e[i]),r=t.length;for(let o=0;o"+e+i}},De.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(r)+"<"+t+n+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),""===i?this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+"<"+t+n+">"+i+"0&&this.options.processEntities)for(let t=0;t1&&void 0!==arguments[1]&&arguments[1];const n=document.createElement("li");return n.classList.add("files-list__system-tag"),n.textContent=e,t&&n.classList.add("files-list__system-tag--more"),n},rt=new class{_action;constructor(e){this.validateAction(e),this._action=e}get id(){return this._action.id}get displayName(){return this._action.displayName}get title(){return this._action.title}get iconSvgInline(){return this._action.iconSvgInline}get enabled(){return this._action.enabled}get exec(){return this._action.exec}get execBatch(){return this._action.execBatch}get order(){return this._action.order}get parent(){return this._action.parent}get default(){return this._action.default}get inline(){return this._action.inline}get renderInline(){return this._action.renderInline}validateAction(e){if(!e.id||"string"!=typeof e.id)throw new Error("Invalid id");if(!e.displayName||"function"!=typeof e.displayName)throw new Error("Invalid displayName function");if("title"in e&&"function"!=typeof e.title)throw new Error("Invalid title function");if(!e.iconSvgInline||"function"!=typeof e.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!e.exec||"function"!=typeof e.exec)throw new Error("Invalid exec function");if("enabled"in e&&"function"!=typeof e.enabled)throw new Error("Invalid enabled function");if("execBatch"in e&&"function"!=typeof e.execBatch)throw new Error("Invalid execBatch function");if("order"in e&&"number"!=typeof e.order)throw new Error("Invalid order");if("parent"in e&&"string"!=typeof e.parent)throw new Error("Invalid parent");if(e.default&&!Object.values(f).includes(e.default))throw new Error("Invalid default");if("inline"in e&&"function"!=typeof e.inline)throw new Error("Invalid inline function");if("renderInline"in e&&"function"!=typeof e.renderInline)throw new Error("Invalid renderInline function")}}({id:"system-tags",displayName:()=>"",iconSvgInline:()=>"",enabled(e){if(1!==e.length)return!1;const t=e[0];return 0!==tt(t).length},exec:async()=>null,async renderInline(e){const t=tt(e);if(0===t.length)return null;const n=document.createElement("ul");if(n.classList.add("files-list__system-tags"),1===t.length)n.setAttribute("aria-label",(0,o.Iu)("files","This file has the tag {tag}",{tag:t[0]}));else{const e=t.slice(0,-1).join(", "),r=t[t.length-1];n.setAttribute("aria-label",(0,o.Iu)("files","This file has the tags {firstTags} and {lastTag}",{firstTags:e,lastTag:r}))}if(n.append(nt(t[0])),t.length>1){const e=nt("+"+(t.length-1),!0);e.setAttribute("title",t.slice(1).join(", ")),n.append(e)}return n},order:0});!function(e,t={nc:"http://nextcloud.org/ns"}){typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...p],window._nc_dav_namespaces={...g});const n={...window._nc_dav_namespaces,...t};window._nc_dav_properties.find((t=>t===e))?c.error(`${e} already registered`,{prop:e}):e.startsWith("<")||2!==e.split(":").length?c.error(`${e} is not valid. See example: 'oc:fileid'`,{prop:e}):n[e.split(":")[0]]?(window._nc_dav_properties.push(e),window._nc_dav_namespaces=n):c.error(`${e} namespace unknown`,{prop:e,namespaces:n})}("nc:system-tags"),function(e){typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],c.debug("FileActions initialized")),window._nc_fileactions.find((t=>t.id===e.id))?c.error(`FileAction ${e.id} already registered`,{action:e}):window._nc_fileactions.push(e)}(rt),n(93664);const it=(0,u.generateRemoteUrl)("dav"),ot=(0,l.eI)(it,{headers:{requesttoken:(0,r.IH)()??""}});var st=n(36906);const at=(0,i.IY)().setApp("systemtags").detectUser().build();var ut=n(8501),lt=n(79267);const ct="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:"undefined"!=typeof window?window:globalThis,dt=ct.fetch.bind(ct);ct.Headers,ct.Request,ct.Response;const ft="@@HOTPATCHER",ht=()=>{};function pt(e){return{original:e,methods:[e],final:!1}}class gt{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=ft}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(e){this.configuration.getEmptyAction=e}control(e,t=!1){if(!e||e.__type__!==ft)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(e.configuration.registry).forEach((n=>{this.configuration.registry.hasOwnProperty(n)?t&&(this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])):this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])})),e._configuration=this.configuration,this}execute(e,...t){return(this.get(e)||ht)(...t)}get(e){const t=this.configuration.registry[e];if(!t)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${e}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return function(...e){if(0===e.length)throw new Error("Failed creating sequence: No functions provided");return function(...t){let n=t;const r=this;for(;e.length>0;)n=[e.shift().apply(r,n)];return n[0]}}(...t.methods)}isPatched(e){return!!this.configuration.registry[e]}patch(e,t,n={}){const{chain:r=!1}=n;if(this.configuration.registry[e]&&this.configuration.registry[e].final)throw new Error(`Failed patching '${e}': Method marked as being final`);if("function"!=typeof t)throw new Error(`Failed patching '${e}': Provided method is not a function`);if(r)this.configuration.registry[e]?this.configuration.registry[e].methods.push(t):this.configuration.registry[e]=pt(t);else if(this.isPatched(e)){const{original:n}=this.configuration.registry[e];this.configuration.registry[e]=Object.assign(pt(t),{original:n})}else this.configuration.registry[e]=pt(t);return this}patchInline(e,t,...n){return this.isPatched(e)||this.patch(e,t),this.execute(e,...n)}plugin(e,...t){return t.forEach((t=>{this.patch(e,t,{chain:!0})})),this}restore(e){if(!this.isPatched(e))throw new Error(`Failed restoring method: No method present for key: ${e}`);if("function"!=typeof this.configuration.registry[e].original)throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${e}`);return this.configuration.registry[e].methods=[this.configuration.registry[e].original],this}setFinal(e){if(!this.configuration.registry.hasOwnProperty(e))throw new Error(`Failed marking '${e}' as final: No method found for key`);return this.configuration.registry[e].final=!0,this}}let mt=null;var yt=n(62639),wt=n(2568);const vt="abcdef0123456789";function bt(e,t){const n=e.url.replace("//",""),r=-1==n.indexOf("/")?"/":n.slice(n.indexOf("/")),i=e.method?e.method.toUpperCase():"GET",o=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&"auth",s=`00000000${t.nc}`.slice(-8),a=function(e,t,n,r,i,o,s){const a=s||wt(`${t}:${n}:${r}`);return e&&"md5-sess"===e.toLowerCase()?wt(`${a}:${i}:${o}`):a}(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),u=wt(`${i}:${r}`),l=wt(o?`${a}:${t.nonce}:${s}:${t.cnonce}:${o}:${u}`:`${a}:${t.nonce}:${u}`),c={username:t.username,realm:t.realm,nonce:t.nonce,uri:r,qop:o,response:l,nc:s,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},d=[];for(const e in c)c[e]&&("qop"===e||"nc"===e||"algorithm"===e?d.push(`${e}=${c[e]}`):d.push(`${e}="${c[e]}"`));return`Digest ${d.join(", ")}`}function _t(e){return function(e){if("object"!=typeof e||null===e||"[object Object]"!=Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e)?Object.assign({},e):Object.setPrototypeOf(Object.assign({},e),Object.getPrototypeOf(e))}function xt(...e){let t=null,n=[...e];for(;n.length>0;){const e=n.shift();t=t?At(t,e):_t(e)}return t}function At(e,t){const n=_t(e);return Object.keys(t).forEach((e=>{n.hasOwnProperty(e)?Array.isArray(t[e])?n[e]=Array.isArray(n[e])?[...n[e],...t[e]]:[...t[e]]:"object"==typeof t[e]&&t[e]?n[e]="object"==typeof n[e]&&n[e]?At(n[e],t[e]):_t(t[e]):n[e]=t[e]:n[e]=t[e]})),n}function Et(...e){if(0===e.length)return{};const t={};return e.reduce(((e,n)=>(Object.keys(n).forEach((r=>{const i=r.toLowerCase();t.hasOwnProperty(i)?e[t[i]]=n[r]:(t[i]=r,e[r]=n[r])})),e)),{})}var Nt=n(42830);const Tt="function"==typeof ArrayBuffer,{toString:Ct}=Object.prototype;function Ot(e){const t=(mt||(mt=new gt),mt);return t.patchInline("request",(e=>t.patchInline("fetch",dt,e.url,function(e){let t={};const n={method:e.method};if(e.headers&&(t=Et(t,e.headers)),void 0!==e.data){const[r,i]=function(e){if(!(0,yt.$)()&&e instanceof Nt.Readable)return[e,{}];if("string"==typeof e)return[e,{}];if(null!=(t=e)&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))return[e,{}];if(function(e){return Tt&&(e instanceof ArrayBuffer||"[object ArrayBuffer]"===Ct.call(e))}(e))return[e,{}];if(e&&"object"==typeof e)return[JSON.stringify(e),{"content-type":"application/json"}];var t;throw new Error("Unable to convert request body: Unexpected body type: "+typeof e)}(e.data);n.body=r,t=Et(t,i)}return e.signal&&(n.signal=e.signal),e.withCredentials&&(n.credentials="include"),(0,yt.$)()||(e.httpAgent||e.httpsAgent)&&(n.agent=t=>"http:"===t.protocol?e.httpAgent||new ut.Agent:e.httpsAgent||new lt.Agent),n.headers=t,n}(e))),e)}const Pt=`/files/${(0,r.ts)()?.uid}`,It=(0,u.generateRemoteUrl)("dav"+Pt),St=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:It;const t=(0,l.eI)(e,{headers:{requesttoken:(0,r.IH)()||""}});return(0,l.lD)().patch("request",(e=>(e.headers?.method&&(e.method=e.headers.method,delete e.headers.method),async function(e){if(!e._digest)return Ot(e);const t=e._digest;delete e._digest,t.hasDigestAuth&&(e=xt(e,{headers:{Authorization:bt(e,t)}}));const n=await Ot(e);if(401==n.status){if(t.hasDigestAuth=function(e,t){const n=e.headers&&e.headers.get("www-authenticate")||"";if("digest"!==n.split(/\s/)[0].toLowerCase())return!1;const r=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const e=r.exec(n);if(!e)break;t[e[1]]=e[2]||e[3]}return t.nc+=1,t.cnonce=function(){let e="";for(let t=0;t<32;++t)e=`${e}${vt[Math.floor(16*Math.random())]}`;return e}(),!0}(n,t),t.hasDigestAuth){e=xt(e,{headers:{Authorization:bt(e,t)}});const n=await Ot(e);return 401==n.status?t.hasDigestAuth=!1:t.nc++,n}}else t.nc++;return n}(e)))),t};n(3443),(0,i.IY)().setApp("files").detectUser().build(),St();const Rt=function(e){const t=(0,r.ts)()?.uid;if(!t)throw new Error("No user id found");const n=e.props,i=function(e=""){let t=h.NONE;return e&&((e.includes("C")||e.includes("K"))&&(t|=h.CREATE),e.includes("G")&&(t|=h.READ),(e.includes("W")||e.includes("N")||e.includes("V"))&&(t|=h.UPDATE),e.includes("D")&&(t|=h.DELETE),e.includes("R")&&(t|=h.SHARE)),t}(n?.permissions),o=(n["owner-id"]||t).toString(),s=(0,u.generateRemoteUrl)("dav"+Pt+e.filename),a=n?.fileid<0?s.split("").reduce((function(e,t){return(e=(e<<5)-e+t.charCodeAt(0))&e}),0):n?.fileid||0,l={id:a,source:s,mtime:new Date(e.lastmod),mime:e.mime||"application/octet-stream",size:n?.size||0,permissions:i,owner:o,root:Pt,attributes:{...e,...n,hasPreview:n?.["has-preview"],failed:n?.fileid<0}};return delete l.attributes.props,"file"===e.type?new _(l):new x(l)},kt=e=>`\n"u"&&(window._nc_dav_namespaces={...g}),Object.keys(window._nc_dav_namespaces).map((e=>`xmlns:${e}="${window._nc_dav_namespaces?.[e]}"`)).join(" ")}>\n\t\n\t\t${typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...p]),window._nc_dav_properties.map((e=>`<${e} />`)).join(" ")}\n\t\n \n ${e}\n \n`,jt=function(e){return new x({id:e.id,source:(0,u.generateRemoteUrl)("dav/systemtags/"+e.id),owner:(0,r.ts)()?.uid,root:"/systemtags",permissions:h.READ,attributes:{...e,"is-tag":!0}})};(typeof window._nc_navigation>"u"&&(window._nc_navigation=new class{_views=[];_currentView=null;register(e){if(this._views.find((t=>t.id===e.id)))throw new Error(`View id ${e.id} is already registered`);this._views.push(e)}remove(e){const t=this._views.findIndex((t=>t.id===e));-1!==t&&this._views.splice(t,1)}get views(){return this._views}setActive(e){this._currentView=e}get active(){return this._currentView}},c.debug("Navigation service initialized")),window._nc_navigation).register(new class{_view;constructor(e){(function(e){if(!e.id||"string"!=typeof e.id)throw new Error("View id is required and must be a string");if(!e.name||"string"!=typeof e.name)throw new Error("View name is required and must be a string");if(e.columns&&e.columns.length>0&&(!e.caption||"string"!=typeof e.caption))throw new Error("View caption is required for top-level views 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.icon||"string"!=typeof e.icon||!function(e){if("string"!=typeof e)throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);if(0===(e=e.trim()).length||!0!==Ve.XMLValidator.validate(e))return!1;let t;const n=new Ve.XMLParser;try{t=n.parse(e)}catch{return!1}return!(!t||!("svg"in t))}(e.icon))throw new Error("View icon is required and must be a valid svg string");if(!("order"in e)||"number"!=typeof e.order)throw new Error("View order is required and must be a number");if(e.columns&&e.columns.forEach((e=>{if(!(e instanceof A))throw new Error("View columns must be an array of Column. Invalid column found")})),e.emptyView&&"function"!=typeof e.emptyView)throw new Error("View emptyView must be a function");if(e.parent&&"string"!=typeof e.parent)throw new Error("View parent must be a string");if("sticky"in e&&"boolean"!=typeof e.sticky)throw new Error("View sticky must be a boolean");if("expanded"in e&&"boolean"!=typeof e.expanded)throw new Error("View expanded must be a boolean");if(e.defaultSortKey&&"string"!=typeof e.defaultSortKey)throw new Error("View defaultSortKey must be a string")})(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 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}}({id:"tags",name:(0,o.Iu)("systemtags","Tags"),caption:(0,o.Iu)("systemtags","List of tags and their associated files and folders."),emptyTitle:(0,o.Iu)("systemtags","No tags found"),emptyCaption:(0,o.Iu)("systemtags","Tags you have created will show up here."),icon:'',order:25,getContents:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const t=(await(async()=>{try{const{data:e}=await ot.getDirectoryContents("/systemtags",{data:'\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n',details:!0,glob:"/systemtags/*"});return(e=>e.map((e=>{let{props:t}=e;return Object.fromEntries(Object.entries(t).map((e=>{let[t,n]=e;return[(0,st.Z)(t),"displayName"===(0,st.Z)(t)?String(n):n]})))})))(e)}catch(e){throw at.error((0,o.Iu)("systemtags","Failed to load tags"),{error:e}),new Error((0,o.Iu)("systemtags","Failed to load tags"))}})()).filter((e=>e.userVisible));if("/"===e)return{folder:new x({id:0,source:(0,u.generateRemoteUrl)("dav/systemtags"),owner:(0,r.ts)()?.uid,root:"/systemtags",permissions:h.NONE}),contents:t.map(jt)};const n=parseInt(e.replace("/",""),10),i=t.find((e=>e.id===n));if(!i)throw new Error("Tag not found");return{folder:jt(i),contents:(await St().getDirectoryContents("/",{details:!0,data:kt(n),headers:{method:"REPORT"}})).data.map(Rt)}}}))},50584:e=>{e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},3443:function(e,t,n){var r,i,o=n(25108);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=function(e){"use strict";function t(e,n){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},t(e,n)}function n(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=r(e);if(t){var o=r(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw o}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{Z:()=>a});var r=n(87537),i=n.n(r),o=n(23645),s=n.n(o)()(i());s.push([e.id,".files-list__system-tags{--min-size: 32px;display:none;justify-content:center;align-items:center;min-width:calc(var(--min-size)*2);max-width:300px}.files-list__system-tag{padding:5px 10px;border:1px solid;border-radius:var(--border-radius-pill);border-color:var(--color-border);color:var(--color-text-maxcontrast);height:var(--min-size);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:22px;text-align:center}.files-list__system-tag--more{overflow:visible;text-overflow:initial}.files-list__system-tag+.files-list__system-tag{margin-left:5px}@media(min-width: 512px){.files-list__system-tags{display:flex}}","",{version:3,sources:["webpack://./apps/systemtags/src/css/fileEntryInlineSystemTags.scss"],names:[],mappings:"AAsBA,yBACC,gBAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,iCAAA,CACA,eAAA,CAGD,wBACC,gBAAA,CACA,gBAAA,CACA,uCAAA,CACA,gCAAA,CACA,mCAAA,CACA,sBAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CACA,gBAAA,CACA,iBAAA,CAEA,8BACC,gBAAA,CACA,qBAAA,CAID,gDACC,eAAA,CAIF,yBACC,yBACC,YAAA,CAAA",sourcesContent:["/**\n * @copyright Copyright (c) 2023 Lucas Azevedo \n *\n * @author Lucas Azevedo \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\n\n.files-list__system-tags {\n\t--min-size: 32px;\n\tdisplay: none;\n\tjustify-content: center;\n\talign-items: center;\n\tmin-width: calc(var(--min-size) * 2);\n\tmax-width: 300px;\n}\n\n.files-list__system-tag {\n\tpadding: 5px 10px;\n\tborder: 1px solid;\n\tborder-radius: var(--border-radius-pill);\n\tborder-color: var(--color-border);\n\tcolor: var(--color-text-maxcontrast);\n\theight: var(--min-size);\n\twhite-space: nowrap;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tline-height: 22px; // min-size - 2 * 5px padding\n\ttext-align: center;\n\n\t&--more {\n\t\toverflow: visible;\n\t\ttext-overflow: initial;\n\t}\n\n\t// Proper spacing if multiple shown\n\t& + .files-list__system-tag {\n\t\tmargin-left: 5px;\n\t}\n}\n\n@media (min-width: 512px) {\n\t.files-list__system-tags {\n\t\tdisplay: flex;\n\t}\n}\n"],sourceRoot:""}]);const a=s},79267:(e,t,n)=>{var r=n(8501),i=n(8575),o=e.exports;for(var s in r)r.hasOwnProperty(s)&&(o[s]=r[s]);function a(e){if("string"==typeof e&&(e=i.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}o.request=function(e,t){return e=a(e),r.request.call(this,e,t)},o.get=function(e,t){return e=a(e),r.get.call(this,e,t)}},88473:(e,t,n)=>{(t=e.exports=n(79481)).Stream=t,t.Readable=t,t.Writable=n(64229),t.Duplex=n(56753),t.Transform=n(74605),t.PassThrough=n(82725),t.finished=n(8610),t.pipeline=n(59946)},8501:(e,t,n)=>{var r=n(11989),i=n(55676),o=n(47529),s=n(50584),a=n(8575),u=t;u.request=function(e,t){e="string"==typeof e?a.parse(e):o(e);var i=-1===n.g.location.protocol.search(/^https?:$/)?"http:":"",s=e.protocol||i,u=e.hostname||e.host,l=e.port,c=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?s+"//"+u:"")+(l?":"+l:"")+c,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var d=new r(e);return t&&d.on("response",t),d},u.get=function(e,t){var n=u.request(e,t);return n.end(),n},u.ClientRequest=r,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=s,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},8725:(e,t,n)=>{var r;function i(){if(void 0!==r)return r;if(n.g.XMLHttpRequest){r=new n.g.XMLHttpRequest;try{r.open("GET",n.g.XDomainRequest?"/":"https://example.com")}catch(e){r=null}}else r=null;return r}function o(e){var t=i();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function s(e){return"function"==typeof e}t.fetch=s(n.g.fetch)&&s(n.g.ReadableStream),t.writableStream=s(n.g.WritableStream),t.abortController=s(n.g.AbortController),t.arraybuffer=t.fetch||o("arraybuffer"),t.msstream=!t.fetch&&o("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&o("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!i()&&s(i().overrideMimeType),r=null},11989:(e,t,n)=>{var r=n(48764).Buffer,i=n(34155),o=n(8725),s=n(35717),a=n(55676),u=n(88473),l=a.IncomingMessage,c=a.readyStates,d=e.exports=function(e){var t,n=this;u.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+r.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var i=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)i=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!o.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}n._mode=function(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":"text"}(t,i),n._fetchTimer=null,n._socketTimeout=null,n._socketTimer=null,n.on("finish",(function(){n._onFinish()}))};s(d,u.Writable),d.prototype.setHeader=function(e,t){var n=e.toLowerCase();-1===f.indexOf(n)&&(this._headers[n]={name:e,value:t})},d.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},d.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},d.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var r=e._headers,s=null;"GET"!==t.method&&"HEAD"!==t.method&&(s=new Blob(e._body,{type:(r["content-type"]||{}).value||""}));var a=[];if(Object.keys(r).forEach((function(e){var t=r[e].name,n=r[e].value;Array.isArray(n)?n.forEach((function(e){a.push([t,e])})):a.push([t,n])})),"fetch"===e._mode){var u=null;if(o.abortController){var l=new AbortController;u=l.signal,e._fetchAbortController=l,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=n.g.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}n.g.fetch(e._opts.url,{method:e._opts.method,headers:a,body:s||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:u}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var d=e._xhr=new n.g.XMLHttpRequest;try{d.open(e._opts.method,e._opts.url,!0)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}"responseType"in d&&(d.responseType=e._mode),"withCredentials"in d&&(d.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in d&&d.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(d.timeout=t.requestTimeout,d.ontimeout=function(){e.emit("requestTimeout")}),a.forEach((function(e){d.setRequestHeader(e[0],e[1])})),e._response=null,d.onreadystatechange=function(){switch(d.readyState){case c.LOADING:case c.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(d.onprogress=function(){e._onXHRProgress()}),d.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{d.send(s)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}}}},d.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},d.prototype._connect=function(){var e=this;e._destroyed||(e._response=new l(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},d.prototype._write=function(e,t,n){this._body.push(e),n()},d.prototype._resetTimers=function(e){var t=this;n.g.clearTimeout(t._socketTimer),t._socketTimer=null,e?(n.g.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=n.g.setTimeout((function(){t.emit("timeout")}),t._socketTimeout))},d.prototype.abort=d.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},d.prototype.end=function(e,t,n){"function"==typeof e&&(n=e,e=void 0),u.Writable.prototype.end.call(this,e,t,n)},d.prototype.setTimeout=function(e,t){var n=this;t&&n.once("timeout",t),n._socketTimeout=e,n._resetTimers(!1)},d.prototype.flushHeaders=function(){},d.prototype.setNoDelay=function(){},d.prototype.setSocketKeepAlive=function(){};var f=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},55676:(e,t,n)=>{var r=n(34155),i=n(48764).Buffer,o=n(8725),s=n(35717),a=n(88473),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=t.IncomingMessage=function(e,t,n,s){var u=this;if(a.Readable.call(u),u._mode=n,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",(function(){r.nextTick((function(){u.emit("close")}))})),"fetch"===n){if(u._fetchResponse=t,u.url=t.url,u.statusCode=t.status,u.statusMessage=t.statusText,t.headers.forEach((function(e,t){u.headers[t.toLowerCase()]=e,u.rawHeaders.push(t,e)})),o.writableStream){var l=new WritableStream({write:function(e){return s(!1),new Promise((function(t,n){u._destroyed?n():u.push(i.from(e))?t():u._resumeFetch=t}))},close:function(){s(!0),u._destroyed||u.push(null)},abort:function(e){s(!0),u._destroyed||u.emit("error",e)}});try{return void t.body.pipeTo(l).catch((function(e){s(!0),u._destroyed||u.emit("error",e)}))}catch(e){}}var c=t.body.getReader();!function e(){c.read().then((function(t){u._destroyed||(s(t.done),t.done?u.push(null):(u.push(i.from(t.value)),e()))})).catch((function(e){s(!0),u._destroyed||u.emit("error",e)}))}()}else if(u._xhr=e,u._pos=0,u.url=e.responseURL,u.statusCode=e.status,u.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===u.headers[n]&&(u.headers[n]=[]),u.headers[n].push(t[2])):void 0!==u.headers[n]?u.headers[n]+=", "+t[2]:u.headers[n]=t[2],u.rawHeaders.push(t[1],t[2])}})),u._charset="x-user-defined",!o.overrideMimeType){var d=u.rawHeaders["mime-type"];if(d){var f=d.match(/;\s*charset=([^;])(;|$)/);f&&(u._charset=f[1].toLowerCase())}u._charset||(u._charset="utf-8")}};s(l,a.Readable),l.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},l.prototype._onXHRProgress=function(e){var t=this,r=t._xhr,o=null;switch(t._mode){case"text":if((o=r.responseText).length>t._pos){var s=o.substr(t._pos);if("x-user-defined"===t._charset){for(var a=i.alloc(s.length),l=0;lt._pos&&(t.push(i.from(new Uint8Array(c.result.slice(t._pos)))),t._pos=c.result.byteLength)},c.onload=function(){e(!0),t.push(null)},c.readAsArrayBuffer(o)}t._xhr.readyState===u.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}},47529:e=>{e.exports=function(){for(var e={},n=0;n{},52361:()=>{},94616:()=>{}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.m=t,e=[],r.O=(t,n,i,o)=>{if(!n){var s=1/0;for(c=0;c=o)&&Object.keys(r.O).every((e=>r.O[e](n[u])))?n.splice(u--,1):(a=!1,o0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[n,i,o]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.e=()=>Promise.resolve(),r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&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=5191,(()=>{r.b=document.baseURI||self.location.href;var e={5191:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var i,o,s=n[0],a=n[1],u=n[2],l=0;if(s.some((t=>0!==e[t]))){for(i in a)r.o(a,i)&&(r.m[i]=a[i]);if(u)var c=u(r)}for(t&&t(n);lr(11057)));i=r.O(i)})(); +//# sourceMappingURL=systemtags-init.js.map?v=89c89733fef82c56babe \ No newline at end of file diff --git a/dist/systemtags-init.js.map b/dist/systemtags-init.js.map index 347d17566e64c..b889a3f5e1d06 100644 --- a/dist/systemtags-init.js.map +++ b/dist/systemtags-init.js.map @@ -1 +1 @@ -{"version":3,"file":"systemtags-init.js?v=19b4130c00f49a140966","mappings":";UAAIA,mHC4BJ,MAAwGC,EAAhF,QAAZC,GAAmG,YAAhF,UAAIC,OAAO,SAASC,SAAU,UAAID,OAAO,SA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ECGzB,IAAI0gB,EAAsB7B,EAAoBztB,OAAE4O,EAAW,CAAC,OAAO,IAAO6e,EAAoB,SAC9F6B,EAAsB7B,EAAoBztB,EAAEsvB","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/node_modules/@nextcloud/files/dist/index.mjs","webpack://nextcloud/./apps/systemtags/src/css/fileEntryInlineSystemTags.scss?0a01","webpack:///nextcloud/apps/systemtags/src/actions/inlineSystemTagsAction.ts","webpack:///nextcloud/apps/systemtags/src/services/davClient.ts","webpack:///nextcloud/apps/systemtags/src/utils.ts","webpack:///nextcloud/apps/systemtags/src/logger.ts","webpack:///nextcloud/node_modules/@buttercup/fetch/dist/index.browser.js","webpack:///nextcloud/node_modules/hot-patcher/dist/patcher.js","webpack:///nextcloud/node_modules/hot-patcher/dist/functions.js","webpack:///nextcloud/node_modules/webdav/dist/node/compat/patcher.js","webpack:///nextcloud/node_modules/webdav/dist/node/auth/digest.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/crypto.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/merge.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/headers.js","webpack:///nextcloud/node_modules/webdav/dist/node/compat/arrayBuffer.js","webpack:///nextcloud/node_modules/webdav/dist/node/request.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/body.js","webpack:///nextcloud/node_modules/webdav/dist/node/compat/buffer.js","webpack:///nextcloud/apps/files/src/services/WebdavClient.ts","webpack:///nextcloud/apps/files/src/logger.js","webpack:///nextcloud/apps/files/src/services/Files.ts","webpack:///nextcloud/apps/files/src/utils/hashUtils.ts","webpack:///nextcloud/apps/systemtags/src/services/systemtags.ts","webpack:///nextcloud/apps/systemtags/src/init.ts","webpack:///nextcloud/apps/systemtags/src/services/api.ts","webpack:///nextcloud/node_modules/builtin-status-codes/browser.js","webpack:///nextcloud/node_modules/cancelable-promise/umd/CancelablePromise.js","webpack:///nextcloud/apps/systemtags/src/css/fileEntryInlineSystemTags.scss","webpack:///nextcloud/node_modules/https-browserify/index.js","webpack:///nextcloud/node_modules/readable-stream/readable-browser.js","webpack:///nextcloud/node_modules/stream-http/index.js","webpack:///nextcloud/node_modules/stream-http/lib/capability.js","webpack:///nextcloud/node_modules/stream-http/lib/request.js","webpack:///nextcloud/node_modules/stream-http/lib/response.js","webpack:///nextcloud/node_modules/xtend/immutable.js","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","import { getCurrentUser as A, onRequestTokenUpdate as ue, getRequestToken as de } from \"@nextcloud/auth\";\nimport { getLoggerBuilder as q } from \"@nextcloud/logger\";\nimport { getCanonicalLocale as ae } from \"@nextcloud/l10n\";\nimport { join as le, basename as fe, extname as ce, dirname as I } from \"path\";\nimport { encodePath as he } from \"@nextcloud/paths\";\nimport { generateRemoteUrl as pe } from \"@nextcloud/router\";\nimport { createClient as ge, getPatcher as we } from \"webdav\";\n/**\n * @copyright 2019 Christoph Wurst \n *\n * @author Christoph Wurst \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst me = (e) => e === null ? q().setApp(\"files\").build() : q().setApp(\"files\").setUid(e.uid).build(), m = me(A());\n/**\n * @copyright Copyright (c) 2021 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass Ne {\n _entries = [];\n registerEntry(t) {\n this.validateEntry(t), this._entries.push(t);\n }\n unregisterEntry(t) {\n const r = typeof t == \"string\" ? this.getEntryIndex(t) : this.getEntryIndex(t.id);\n if (r === -1) {\n m.warn(\"Entry not found, nothing removed\", { entry: t, entries: this.getEntries() });\n return;\n }\n this._entries.splice(r, 1);\n }\n /**\n * Get the list of registered entries\n *\n * @param {Folder} context the creation context. Usually the current folder\n */\n getEntries(t) {\n return t ? this._entries.filter((r) => typeof r.enabled == \"function\" ? r.enabled(t) : !0) : this._entries;\n }\n getEntryIndex(t) {\n return this._entries.findIndex((r) => r.id === t);\n }\n validateEntry(t) {\n if (!t.id || !t.displayName || !(t.iconSvgInline || t.iconClass) || !t.handler)\n throw new Error(\"Invalid entry\");\n if (typeof t.id != \"string\" || typeof t.displayName != \"string\")\n throw new Error(\"Invalid id or displayName property\");\n if (t.iconClass && typeof t.iconClass != \"string\" || t.iconSvgInline && typeof t.iconSvgInline != \"string\")\n throw new Error(\"Invalid icon provided\");\n if (t.enabled !== void 0 && typeof t.enabled != \"function\")\n throw new Error(\"Invalid enabled property\");\n if (typeof t.handler != \"function\")\n throw new Error(\"Invalid handler property\");\n if (\"order\" in t && typeof t.order != \"number\")\n throw new Error(\"Invalid order property\");\n if (this.getEntryIndex(t.id) !== -1)\n throw new Error(\"Duplicate entry\");\n }\n}\nconst F = function() {\n return typeof window._nc_newfilemenu > \"u\" && (window._nc_newfilemenu = new Ne(), m.debug(\"NewFileMenu initialized\")), window._nc_newfilemenu;\n};\n/**\n * @copyright 2019 Christoph Wurst \n *\n * @author Christoph Wurst \n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst C = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\"], P = [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\"];\nfunction Yt(e, t = !1, r = !1, s = !1) {\n r = r && !s, typeof e == \"string\" && (e = Number(e));\n let n = e > 0 ? Math.floor(Math.log(e) / Math.log(s ? 1e3 : 1024)) : 0;\n n = Math.min((r ? P.length : C.length) - 1, n);\n const i = r ? P[n] : C[n];\n let d = (e / Math.pow(s ? 1e3 : 1024, n)).toFixed(1);\n return t === !0 && n === 0 ? (d !== \"0.0\" ? \"< 1 \" : \"0 \") + (r ? P[1] : C[1]) : (n < 2 ? d = parseFloat(d).toFixed(0) : d = parseFloat(d).toLocaleString(ae()), d + \" \" + i);\n}\nfunction Jt(e, t = !1) {\n try {\n e = `${e}`.toLocaleLowerCase().replaceAll(/\\s+/g, \"\").replaceAll(\",\", \".\");\n } catch {\n return null;\n }\n const r = e.match(/^([0-9]*(\\.[0-9]*)?)([kmgtp]?)(i?)b?$/);\n if (r === null || r[1] === \".\" || r[1] === \"\")\n return null;\n const s = {\n \"\": 0,\n k: 1,\n m: 2,\n g: 3,\n t: 4,\n p: 5,\n e: 6\n }, n = `${r[1]}`, i = r[4] === \"i\" || t ? 1024 : 1e3;\n return Math.round(Number.parseFloat(n) * i ** s[r[3]]);\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nvar Z = /* @__PURE__ */ ((e) => (e.DEFAULT = \"default\", e.HIDDEN = \"hidden\", e))(Z || {});\nclass Qt {\n _action;\n constructor(t) {\n this.validateAction(t), this._action = t;\n }\n get id() {\n return this._action.id;\n }\n get displayName() {\n return this._action.displayName;\n }\n get title() {\n return this._action.title;\n }\n get iconSvgInline() {\n return this._action.iconSvgInline;\n }\n get enabled() {\n return this._action.enabled;\n }\n get exec() {\n return this._action.exec;\n }\n get execBatch() {\n return this._action.execBatch;\n }\n get order() {\n return this._action.order;\n }\n get parent() {\n return this._action.parent;\n }\n get default() {\n return this._action.default;\n }\n get inline() {\n return this._action.inline;\n }\n get renderInline() {\n return this._action.renderInline;\n }\n validateAction(t) {\n if (!t.id || typeof t.id != \"string\")\n throw new Error(\"Invalid id\");\n if (!t.displayName || typeof t.displayName != \"function\")\n throw new Error(\"Invalid displayName function\");\n if (\"title\" in t && typeof t.title != \"function\")\n throw new Error(\"Invalid title function\");\n if (!t.iconSvgInline || typeof t.iconSvgInline != \"function\")\n throw new Error(\"Invalid iconSvgInline function\");\n if (!t.exec || typeof t.exec != \"function\")\n throw new Error(\"Invalid exec function\");\n if (\"enabled\" in t && typeof t.enabled != \"function\")\n throw new Error(\"Invalid enabled function\");\n if (\"execBatch\" in t && typeof t.execBatch != \"function\")\n throw new Error(\"Invalid execBatch function\");\n if (\"order\" in t && typeof t.order != \"number\")\n throw new Error(\"Invalid order\");\n if (\"parent\" in t && typeof t.parent != \"string\")\n throw new Error(\"Invalid parent\");\n if (t.default && !Object.values(Z).includes(t.default))\n throw new Error(\"Invalid default\");\n if (\"inline\" in t && typeof t.inline != \"function\")\n throw new Error(\"Invalid inline function\");\n if (\"renderInline\" in t && typeof t.renderInline != \"function\")\n throw new Error(\"Invalid renderInline function\");\n }\n}\nconst Dt = function(e) {\n if (typeof window._nc_fileactions > \"u\" && (window._nc_fileactions = [], m.debug(\"FileActions initialized\")), window._nc_fileactions.find((t) => t.id === e.id)) {\n m.error(`FileAction ${e.id} already registered`, { action: e });\n return;\n }\n window._nc_fileactions.push(e);\n}, er = function() {\n return typeof window._nc_fileactions > \"u\" && (window._nc_fileactions = [], m.debug(\"FileActions initialized\")), window._nc_fileactions;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass tr {\n _header;\n constructor(t) {\n this.validateHeader(t), this._header = t;\n }\n get id() {\n return this._header.id;\n }\n get order() {\n return this._header.order;\n }\n get enabled() {\n return this._header.enabled;\n }\n get render() {\n return this._header.render;\n }\n get updated() {\n return this._header.updated;\n }\n validateHeader(t) {\n if (!t.id || !t.render || !t.updated)\n throw new Error(\"Invalid header: id, render and updated are required\");\n if (typeof t.id != \"string\")\n throw new Error(\"Invalid id property\");\n if (t.enabled !== void 0 && typeof t.enabled != \"function\")\n throw new Error(\"Invalid enabled property\");\n if (t.render && typeof t.render != \"function\")\n throw new Error(\"Invalid render property\");\n if (t.updated && typeof t.updated != \"function\")\n throw new Error(\"Invalid updated property\");\n }\n}\nconst rr = function(e) {\n if (typeof window._nc_filelistheader > \"u\" && (window._nc_filelistheader = [], m.debug(\"FileListHeaders initialized\")), window._nc_filelistheader.find((t) => t.id === e.id)) {\n m.error(`Header ${e.id} already registered`, { header: e });\n return;\n }\n window._nc_filelistheader.push(e);\n}, nr = function() {\n return typeof window._nc_filelistheader > \"u\" && (window._nc_filelistheader = [], m.debug(\"FileListHeaders initialized\")), window._nc_filelistheader;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nvar N = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = \"NONE\", e[e.CREATE = 4] = \"CREATE\", e[e.READ = 1] = \"READ\", e[e.UPDATE = 2] = \"UPDATE\", e[e.DELETE = 8] = \"DELETE\", e[e.SHARE = 16] = \"SHARE\", e[e.ALL = 31] = \"ALL\", e))(N || {});\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst j = [\n \"d:getcontentlength\",\n \"d:getcontenttype\",\n \"d:getetag\",\n \"d:getlastmodified\",\n \"d:quota-available-bytes\",\n \"d:resourcetype\",\n \"nc:has-preview\",\n \"nc:is-encrypted\",\n \"nc:mount-type\",\n \"nc:share-attributes\",\n \"oc:comments-unread\",\n \"oc:favorite\",\n \"oc:fileid\",\n \"oc:owner-display-name\",\n \"oc:owner-id\",\n \"oc:permissions\",\n \"oc:share-types\",\n \"oc:size\",\n \"ocs:share-permissions\"\n], Y = {\n d: \"DAV:\",\n nc: \"http://nextcloud.org/ns\",\n oc: \"http://owncloud.org/ns\",\n ocs: \"http://open-collaboration-services.org/ns\"\n}, ir = function(e, t = { nc: \"http://nextcloud.org/ns\" }) {\n typeof window._nc_dav_properties > \"u\" && (window._nc_dav_properties = [...j], window._nc_dav_namespaces = { ...Y });\n const r = { ...window._nc_dav_namespaces, ...t };\n if (window._nc_dav_properties.find((n) => n === e))\n return m.error(`${e} already registered`, { prop: e }), !1;\n if (e.startsWith(\"<\") || e.split(\":\").length !== 2)\n return m.error(`${e} is not valid. See example: 'oc:fileid'`, { prop: e }), !1;\n const s = e.split(\":\")[0];\n return r[s] ? (window._nc_dav_properties.push(e), window._nc_dav_namespaces = r, !0) : (m.error(`${e} namespace unknown`, { prop: e, namespaces: r }), !1);\n}, V = function() {\n return typeof window._nc_dav_properties > \"u\" && (window._nc_dav_properties = [...j]), window._nc_dav_properties.map((e) => `<${e} />`).join(\" \");\n}, L = function() {\n return typeof window._nc_dav_namespaces > \"u\" && (window._nc_dav_namespaces = { ...Y }), Object.keys(window._nc_dav_namespaces).map((e) => `xmlns:${e}=\"${window._nc_dav_namespaces?.[e]}\"`).join(\" \");\n}, sr = function() {\n return `\n\t\t\n\t\t\t\n\t\t\t\t${V()}\n\t\t\t\n\t\t`;\n}, Ee = function() {\n return `\n\t\t\n\t\t\t\n\t\t\t\t${V()}\n\t\t\t\n\t\t\t\n\t\t\t\t1\n\t\t\t\n\t\t`;\n}, or = function(e) {\n return `\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${V()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${A()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${e}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst be = function(e = \"\") {\n let t = N.NONE;\n return e && ((e.includes(\"C\") || e.includes(\"K\")) && (t |= N.CREATE), e.includes(\"G\") && (t |= N.READ), (e.includes(\"W\") || e.includes(\"N\") || e.includes(\"V\")) && (t |= N.UPDATE), e.includes(\"D\") && (t |= N.DELETE), e.includes(\"R\") && (t |= N.SHARE)), t;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nvar R = /* @__PURE__ */ ((e) => (e.Folder = \"folder\", e.File = \"file\", e))(R || {});\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst J = function(e, t) {\n return e.match(t) !== null;\n}, X = (e, t) => {\n if (e.id && typeof e.id != \"number\")\n throw new Error(\"Invalid id type of value\");\n if (!e.source)\n throw new Error(\"Missing mandatory source\");\n try {\n new URL(e.source);\n } catch {\n throw new Error(\"Invalid source format, source must be a valid URL\");\n }\n if (!e.source.startsWith(\"http\"))\n throw new Error(\"Invalid source format, only http(s) is supported\");\n if (e.mtime && !(e.mtime instanceof Date))\n throw new Error(\"Invalid mtime type\");\n if (e.crtime && !(e.crtime instanceof Date))\n throw new Error(\"Invalid crtime type\");\n if (!e.mime || typeof e.mime != \"string\" || !e.mime.match(/^[-\\w.]+\\/[-+\\w.]+$/gi))\n throw new Error(\"Missing or invalid mandatory mime\");\n if (\"size\" in e && typeof e.size != \"number\" && e.size !== void 0)\n throw new Error(\"Invalid size type\");\n if (\"permissions\" in e && e.permissions !== void 0 && !(typeof e.permissions == \"number\" && e.permissions >= N.NONE && e.permissions <= N.ALL))\n throw new Error(\"Invalid permissions\");\n if (e.owner && e.owner !== null && typeof e.owner != \"string\")\n throw new Error(\"Invalid owner type\");\n if (e.attributes && typeof e.attributes != \"object\")\n throw new Error(\"Invalid attributes type\");\n if (e.root && typeof e.root != \"string\")\n throw new Error(\"Invalid root type\");\n if (e.root && !e.root.startsWith(\"/\"))\n throw new Error(\"Root must start with a leading slash\");\n if (e.root && !e.source.includes(e.root))\n throw new Error(\"Root must be part of the source\");\n if (e.root && J(e.source, t)) {\n const r = e.source.match(t)[0];\n if (!e.source.includes(le(r, e.root)))\n throw new Error(\"The root must be relative to the service. e.g /files/emma\");\n }\n if (e.status && !Object.values(Q).includes(e.status))\n throw new Error(\"Status must be a valid NodeStatus\");\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nvar Q = /* @__PURE__ */ ((e) => (e.NEW = \"new\", e.FAILED = \"failed\", e.LOADING = \"loading\", e.LOCKED = \"locked\", e))(Q || {});\nclass D {\n _data;\n _attributes;\n _knownDavService = /(remote|public)\\.php\\/(web)?dav/i;\n constructor(t, r) {\n X(t, r || this._knownDavService), this._data = t;\n const s = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set: (n, i, d) => (this.updateMtime(), Reflect.set(n, i, d)),\n deleteProperty: (n, i) => (this.updateMtime(), Reflect.deleteProperty(n, i))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n };\n this._attributes = new Proxy(t.attributes || {}, s), delete this._data.attributes, r && (this._knownDavService = r);\n }\n /**\n * Get the source url to this object\n */\n get source() {\n return this._data.source.replace(/\\/$/i, \"\");\n }\n /**\n * Get the encoded source url to this object for requests purposes\n */\n get encodedSource() {\n const { origin: t } = new URL(this.source);\n return t + he(this.source.slice(t.length));\n }\n /**\n * Get this object name\n */\n get basename() {\n return fe(this.source);\n }\n /**\n * Get this object's extension\n */\n get extension() {\n return ce(this.source);\n }\n /**\n * Get the directory path leading to this object\n * Will use the relative path to root if available\n */\n get dirname() {\n if (this.root) {\n let r = this.source;\n this.isDavRessource && (r = r.split(this._knownDavService).pop());\n const s = r.indexOf(this.root), n = this.root.replace(/\\/$/, \"\");\n return I(r.slice(s + n.length) || \"/\");\n }\n const t = new URL(this.source);\n return I(t.pathname);\n }\n /**\n * Get the file mime\n */\n get mime() {\n return this._data.mime;\n }\n /**\n * Get the file modification time\n */\n get mtime() {\n return this._data.mtime;\n }\n /**\n * Get the file creation time\n */\n get crtime() {\n return this._data.crtime;\n }\n /**\n * Get the file size\n */\n get size() {\n return this._data.size;\n }\n /**\n * Get the file attribute\n */\n get attributes() {\n return this._attributes;\n }\n /**\n * Get the file permissions\n */\n get permissions() {\n return this.owner === null && !this.isDavRessource ? N.READ : this._data.permissions !== void 0 ? this._data.permissions : N.NONE;\n }\n /**\n * Get the file owner\n */\n get owner() {\n return this.isDavRessource ? this._data.owner : null;\n }\n /**\n * Is this a dav-related ressource ?\n */\n get isDavRessource() {\n return J(this.source, this._knownDavService);\n }\n /**\n * Get the dav root of this object\n */\n get root() {\n return this._data.root ? this._data.root.replace(/^(.+)\\/$/, \"$1\") : this.isDavRessource && I(this.source).split(this._knownDavService).pop() || null;\n }\n /**\n * Get the absolute path of this object relative to the root\n */\n get path() {\n if (this.root) {\n let t = this.source;\n this.isDavRessource && (t = t.split(this._knownDavService).pop());\n const r = t.indexOf(this.root), s = this.root.replace(/\\/$/, \"\");\n return t.slice(r + s.length) || \"/\";\n }\n return (this.dirname + \"/\" + this.basename).replace(/\\/\\//g, \"/\");\n }\n /**\n * Get the node id if defined.\n * Will look for the fileid in attributes if undefined.\n */\n get fileid() {\n return this._data?.id || this.attributes?.fileid;\n }\n /**\n * Get the node status.\n */\n get status() {\n return this._data?.status;\n }\n /**\n * Set the node status.\n */\n set status(t) {\n this._data.status = t;\n }\n /**\n * Move the node to a new destination\n *\n * @param {string} destination the new source.\n * e.g. https://cloud.domain.com/remote.php/dav/files/emma/Photos/picture.jpg\n */\n move(t) {\n X({ ...this._data, source: t }, this._knownDavService), this._data.source = t, this.updateMtime();\n }\n /**\n * Rename the node\n * This aliases the move method for easier usage\n *\n * @param basename The new name of the node\n */\n rename(t) {\n if (t.includes(\"/\"))\n throw new Error(\"Invalid basename\");\n this.move(I(this.source) + \"/\" + t);\n }\n /**\n * Update the mtime if exists.\n */\n updateMtime() {\n this._data.mtime && (this._data.mtime = /* @__PURE__ */ new Date());\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass ye extends D {\n get type() {\n return R.File;\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass _e extends D {\n constructor(t) {\n super({\n ...t,\n mime: \"httpd/unix-directory\"\n });\n }\n get type() {\n return R.Folder;\n }\n get extension() {\n return null;\n }\n get mime() {\n return \"httpd/unix-directory\";\n }\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst ee = `/files/${A()?.uid}`, te = pe(\"dav\"), ur = function(e = te, t = {}) {\n const r = ge(e, { headers: t });\n function s(i) {\n r.setHeaders({\n ...t,\n // Add this so the server knows it is an request from the browser\n \"X-Requested-With\": \"XMLHttpRequest\",\n // Inject user auth\n requesttoken: i ?? \"\"\n });\n }\n return ue(s), s(de()), we().patch(\"fetch\", (i, d) => {\n const u = d.headers;\n return u?.method && (d.method = u.method, delete u.method), fetch(i, d);\n }), r;\n}, dr = async (e, t = \"/\", r = ee) => (await e.getDirectoryContents(`${r}${t}`, {\n details: !0,\n data: Ee(),\n headers: {\n // see davGetClient for patched webdav client\n method: \"REPORT\"\n },\n includeSelf: !0\n})).data.filter((n) => n.filename !== t).map((n) => ve(n, r)), ve = function(e, t = ee, r = te) {\n const s = e.props, n = be(s?.permissions), i = s?.[\"owner-id\"] || A()?.uid, d = {\n id: s?.fileid || 0,\n source: `${r}${e.filename}`,\n mtime: new Date(Date.parse(e.lastmod)),\n mime: e.mime,\n size: s?.size || Number.parseInt(s.getcontentlength || \"0\"),\n permissions: n,\n owner: i,\n root: t,\n attributes: {\n ...e,\n ...s,\n hasPreview: s?.[\"has-preview\"]\n }\n };\n return delete d.attributes?.props, e.type === \"file\" ? new ye(d) : new _e(d);\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass Te {\n _views = [];\n _currentView = null;\n register(t) {\n if (this._views.find((r) => r.id === t.id))\n throw new Error(`View id ${t.id} is already registered`);\n this._views.push(t);\n }\n remove(t) {\n const r = this._views.findIndex((s) => s.id === t);\n r !== -1 && this._views.splice(r, 1);\n }\n get views() {\n return this._views;\n }\n setActive(t) {\n this._currentView = t;\n }\n get active() {\n return this._currentView;\n }\n}\nconst ar = function() {\n return typeof window._nc_navigation > \"u\" && (window._nc_navigation = new Te(), m.debug(\"Navigation service initialized\")), window._nc_navigation;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass Ie {\n _column;\n constructor(t) {\n Ae(t), this._column = t;\n }\n get id() {\n return this._column.id;\n }\n get title() {\n return this._column.title;\n }\n get render() {\n return this._column.render;\n }\n get sort() {\n return this._column.sort;\n }\n get summary() {\n return this._column.summary;\n }\n}\nconst Ae = function(e) {\n if (!e.id || typeof e.id != \"string\")\n throw new Error(\"A column id is required\");\n if (!e.title || typeof e.title != \"string\")\n throw new Error(\"A column title is required\");\n if (!e.render || typeof e.render != \"function\")\n throw new Error(\"A render function is required\");\n if (e.sort && typeof e.sort != \"function\")\n throw new Error(\"Column sortFunction must be a function\");\n if (e.summary && typeof e.summary != \"function\")\n throw new Error(\"Column summary must be a function\");\n return !0;\n};\nvar S = {}, O = {};\n(function(e) {\n const t = \":A-Za-z_\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\", r = t + \"\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\", s = \"[\" + t + \"][\" + r + \"]*\", n = new RegExp(\"^\" + s + \"$\"), i = function(u, o) {\n const a = [];\n let l = o.exec(u);\n for (; l; ) {\n const f = [];\n f.startIndex = o.lastIndex - l[0].length;\n const c = l.length;\n for (let g = 0; g < c; g++)\n f.push(l[g]);\n a.push(f), l = o.exec(u);\n }\n return a;\n }, d = function(u) {\n const o = n.exec(u);\n return !(o === null || typeof o > \"u\");\n };\n e.isExist = function(u) {\n return typeof u < \"u\";\n }, e.isEmptyObject = function(u) {\n return Object.keys(u).length === 0;\n }, e.merge = function(u, o, a) {\n if (o) {\n const l = Object.keys(o), f = l.length;\n for (let c = 0; c < f; c++)\n a === \"strict\" ? u[l[c]] = [o[l[c]]] : u[l[c]] = o[l[c]];\n }\n }, e.getValue = function(u) {\n return e.isExist(u) ? u : \"\";\n }, e.isName = d, e.getAllMatches = i, e.nameRegexp = s;\n})(O);\nconst M = O, Oe = {\n allowBooleanAttributes: !1,\n //A tag can have attributes without any value\n unpairedTags: []\n};\nS.validate = function(e, t) {\n t = Object.assign({}, Oe, t);\n const r = [];\n let s = !1, n = !1;\n e[0] === \"\\uFEFF\" && (e = e.substr(1));\n for (let i = 0; i < e.length; i++)\n if (e[i] === \"<\" && e[i + 1] === \"?\") {\n if (i += 2, i = G(e, i), i.err)\n return i;\n } else if (e[i] === \"<\") {\n let d = i;\n if (i++, e[i] === \"!\") {\n i = z(e, i);\n continue;\n } else {\n let u = !1;\n e[i] === \"/\" && (u = !0, i++);\n let o = \"\";\n for (; i < e.length && e[i] !== \">\" && e[i] !== \" \" && e[i] !== \"\t\" && e[i] !== `\n` && e[i] !== \"\\r\"; i++)\n o += e[i];\n if (o = o.trim(), o[o.length - 1] === \"/\" && (o = o.substring(0, o.length - 1), i--), !Re(o)) {\n let f;\n return o.trim().length === 0 ? f = \"Invalid space after '<'.\" : f = \"Tag '\" + o + \"' is an invalid name.\", p(\"InvalidTag\", f, w(e, i));\n }\n const a = xe(e, i);\n if (a === !1)\n return p(\"InvalidAttr\", \"Attributes for '\" + o + \"' have open quote.\", w(e, i));\n let l = a.value;\n if (i = a.index, l[l.length - 1] === \"/\") {\n const f = i - l.length;\n l = l.substring(0, l.length - 1);\n const c = H(l, t);\n if (c === !0)\n s = !0;\n else\n return p(c.err.code, c.err.msg, w(e, f + c.err.line));\n } else if (u)\n if (a.tagClosed) {\n if (l.trim().length > 0)\n return p(\"InvalidTag\", \"Closing tag '\" + o + \"' can't have attributes or invalid starting.\", w(e, d));\n {\n const f = r.pop();\n if (o !== f.tagName) {\n let c = w(e, f.tagStartPos);\n return p(\n \"InvalidTag\",\n \"Expected closing tag '\" + f.tagName + \"' (opened in line \" + c.line + \", col \" + c.col + \") instead of closing tag '\" + o + \"'.\",\n w(e, d)\n );\n }\n r.length == 0 && (n = !0);\n }\n } else\n return p(\"InvalidTag\", \"Closing tag '\" + o + \"' doesn't have proper closing.\", w(e, i));\n else {\n const f = H(l, t);\n if (f !== !0)\n return p(f.err.code, f.err.msg, w(e, i - l.length + f.err.line));\n if (n === !0)\n return p(\"InvalidXml\", \"Multiple possible root nodes found.\", w(e, i));\n t.unpairedTags.indexOf(o) !== -1 || r.push({ tagName: o, tagStartPos: d }), s = !0;\n }\n for (i++; i < e.length; i++)\n if (e[i] === \"<\")\n if (e[i + 1] === \"!\") {\n i++, i = z(e, i);\n continue;\n } else if (e[i + 1] === \"?\") {\n if (i = G(e, ++i), i.err)\n return i;\n } else\n break;\n else if (e[i] === \"&\") {\n const f = Ve(e, i);\n if (f == -1)\n return p(\"InvalidChar\", \"char '&' is not expected.\", w(e, i));\n i = f;\n } else if (n === !0 && !U(e[i]))\n return p(\"InvalidXml\", \"Extra text at the end\", w(e, i));\n e[i] === \"<\" && i--;\n }\n } else {\n if (U(e[i]))\n continue;\n return p(\"InvalidChar\", \"char '\" + e[i] + \"' is not expected.\", w(e, i));\n }\n if (s) {\n if (r.length == 1)\n return p(\"InvalidTag\", \"Unclosed tag '\" + r[0].tagName + \"'.\", w(e, r[0].tagStartPos));\n if (r.length > 0)\n return p(\"InvalidXml\", \"Invalid '\" + JSON.stringify(r.map((i) => i.tagName), null, 4).replace(/\\r?\\n/g, \"\") + \"' found.\", { line: 1, col: 1 });\n } else\n return p(\"InvalidXml\", \"Start tag expected.\", 1);\n return !0;\n};\nfunction U(e) {\n return e === \" \" || e === \"\t\" || e === `\n` || e === \"\\r\";\n}\nfunction G(e, t) {\n const r = t;\n for (; t < e.length; t++)\n if (e[t] == \"?\" || e[t] == \" \") {\n const s = e.substr(r, t - r);\n if (t > 5 && s === \"xml\")\n return p(\"InvalidXml\", \"XML declaration allowed only at the start of the document.\", w(e, t));\n if (e[t] == \"?\" && e[t + 1] == \">\") {\n t++;\n break;\n } else\n continue;\n }\n return t;\n}\nfunction z(e, t) {\n if (e.length > t + 5 && e[t + 1] === \"-\" && e[t + 2] === \"-\") {\n for (t += 3; t < e.length; t++)\n if (e[t] === \"-\" && e[t + 1] === \"-\" && e[t + 2] === \">\") {\n t += 2;\n break;\n }\n } else if (e.length > t + 8 && e[t + 1] === \"D\" && e[t + 2] === \"O\" && e[t + 3] === \"C\" && e[t + 4] === \"T\" && e[t + 5] === \"Y\" && e[t + 6] === \"P\" && e[t + 7] === \"E\") {\n let r = 1;\n for (t += 8; t < e.length; t++)\n if (e[t] === \"<\")\n r++;\n else if (e[t] === \">\" && (r--, r === 0))\n break;\n } else if (e.length > t + 9 && e[t + 1] === \"[\" && e[t + 2] === \"C\" && e[t + 3] === \"D\" && e[t + 4] === \"A\" && e[t + 5] === \"T\" && e[t + 6] === \"A\" && e[t + 7] === \"[\") {\n for (t += 8; t < e.length; t++)\n if (e[t] === \"]\" && e[t + 1] === \"]\" && e[t + 2] === \">\") {\n t += 2;\n break;\n }\n }\n return t;\n}\nconst Ce = '\"', Pe = \"'\";\nfunction xe(e, t) {\n let r = \"\", s = \"\", n = !1;\n for (; t < e.length; t++) {\n if (e[t] === Ce || e[t] === Pe)\n s === \"\" ? s = e[t] : s !== e[t] || (s = \"\");\n else if (e[t] === \">\" && s === \"\") {\n n = !0;\n break;\n }\n r += e[t];\n }\n return s !== \"\" ? !1 : {\n value: r,\n index: t,\n tagClosed: n\n };\n}\nconst $e = new RegExp(`(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*(['\"])(([\\\\s\\\\S])*?)\\\\5)?`, \"g\");\nfunction H(e, t) {\n const r = M.getAllMatches(e, $e), s = {};\n for (let n = 0; n < r.length; n++) {\n if (r[n][1].length === 0)\n return p(\"InvalidAttr\", \"Attribute '\" + r[n][2] + \"' has no space in starting.\", v(r[n]));\n if (r[n][3] !== void 0 && r[n][4] === void 0)\n return p(\"InvalidAttr\", \"Attribute '\" + r[n][2] + \"' is without value.\", v(r[n]));\n if (r[n][3] === void 0 && !t.allowBooleanAttributes)\n return p(\"InvalidAttr\", \"boolean attribute '\" + r[n][2] + \"' is not allowed.\", v(r[n]));\n const i = r[n][2];\n if (!Le(i))\n return p(\"InvalidAttr\", \"Attribute '\" + i + \"' is an invalid name.\", v(r[n]));\n if (!s.hasOwnProperty(i))\n s[i] = 1;\n else\n return p(\"InvalidAttr\", \"Attribute '\" + i + \"' is repeated.\", v(r[n]));\n }\n return !0;\n}\nfunction Fe(e, t) {\n let r = /\\d/;\n for (e[t] === \"x\" && (t++, r = /[\\da-fA-F]/); t < e.length; t++) {\n if (e[t] === \";\")\n return t;\n if (!e[t].match(r))\n break;\n }\n return -1;\n}\nfunction Ve(e, t) {\n if (t++, e[t] === \";\")\n return -1;\n if (e[t] === \"#\")\n return t++, Fe(e, t);\n let r = 0;\n for (; t < e.length; t++, r++)\n if (!(e[t].match(/\\w/) && r < 20)) {\n if (e[t] === \";\")\n break;\n return -1;\n }\n return t;\n}\nfunction p(e, t, r) {\n return {\n err: {\n code: e,\n msg: t,\n line: r.line || r,\n col: r.col\n }\n };\n}\nfunction Le(e) {\n return M.isName(e);\n}\nfunction Re(e) {\n return M.isName(e);\n}\nfunction w(e, t) {\n const r = e.substring(0, t).split(/\\r?\\n/);\n return {\n line: r.length,\n // column number is last line's length + 1, because column numbering starts at 1:\n col: r[r.length - 1].length + 1\n };\n}\nfunction v(e) {\n return e.startIndex + e[1].length;\n}\nvar k = {};\nconst re = {\n preserveOrder: !1,\n attributeNamePrefix: \"@_\",\n attributesGroupName: !1,\n textNodeName: \"#text\",\n ignoreAttributes: !0,\n removeNSPrefix: !1,\n // remove NS from tag name or attribute name if true\n allowBooleanAttributes: !1,\n //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseTagValue: !0,\n parseAttributeValue: !1,\n trimValues: !0,\n //Trim string values of tag and attributes\n cdataPropName: !1,\n numberParseOptions: {\n hex: !0,\n leadingZeros: !0,\n eNotation: !0\n },\n tagValueProcessor: function(e, t) {\n return t;\n },\n attributeValueProcessor: function(e, t) {\n return t;\n },\n stopNodes: [],\n //nested tags will not be parsed even for errors\n alwaysCreateTextNode: !1,\n isArray: () => !1,\n commentPropName: !1,\n unpairedTags: [],\n processEntities: !0,\n htmlEntities: !1,\n ignoreDeclaration: !1,\n ignorePiTags: !1,\n transformTagName: !1,\n transformAttributeName: !1,\n updateTag: function(e, t, r) {\n return e;\n }\n // skipEmptyListItem: false\n}, Se = function(e) {\n return Object.assign({}, re, e);\n};\nk.buildOptions = Se;\nk.defaultOptions = re;\nclass Me {\n constructor(t) {\n this.tagname = t, this.child = [], this[\":@\"] = {};\n }\n add(t, r) {\n t === \"__proto__\" && (t = \"#__proto__\"), this.child.push({ [t]: r });\n }\n addChild(t) {\n t.tagname === \"__proto__\" && (t.tagname = \"#__proto__\"), t[\":@\"] && Object.keys(t[\":@\"]).length > 0 ? this.child.push({ [t.tagname]: t.child, \":@\": t[\":@\"] }) : this.child.push({ [t.tagname]: t.child });\n }\n}\nvar ke = Me;\nconst Be = O;\nfunction qe(e, t) {\n const r = {};\n if (e[t + 3] === \"O\" && e[t + 4] === \"C\" && e[t + 5] === \"T\" && e[t + 6] === \"Y\" && e[t + 7] === \"P\" && e[t + 8] === \"E\") {\n t = t + 9;\n let s = 1, n = !1, i = !1, d = \"\";\n for (; t < e.length; t++)\n if (e[t] === \"<\" && !i) {\n if (n && Ge(e, t))\n t += 7, [entityName, val, t] = Xe(e, t + 1), val.indexOf(\"&\") === -1 && (r[We(entityName)] = {\n regx: RegExp(`&${entityName};`, \"g\"),\n val\n });\n else if (n && ze(e, t))\n t += 8;\n else if (n && He(e, t))\n t += 8;\n else if (n && Ke(e, t))\n t += 9;\n else if (Ue)\n i = !0;\n else\n throw new Error(\"Invalid DOCTYPE\");\n s++, d = \"\";\n } else if (e[t] === \">\") {\n if (i ? e[t - 1] === \"-\" && e[t - 2] === \"-\" && (i = !1, s--) : s--, s === 0)\n break;\n } else\n e[t] === \"[\" ? n = !0 : d += e[t];\n if (s !== 0)\n throw new Error(\"Unclosed DOCTYPE\");\n } else\n throw new Error(\"Invalid Tag instead of DOCTYPE\");\n return { entities: r, i: t };\n}\nfunction Xe(e, t) {\n let r = \"\";\n for (; t < e.length && e[t] !== \"'\" && e[t] !== '\"'; t++)\n r += e[t];\n if (r = r.trim(), r.indexOf(\" \") !== -1)\n throw new Error(\"External entites are not supported\");\n const s = e[t++];\n let n = \"\";\n for (; t < e.length && e[t] !== s; t++)\n n += e[t];\n return [r, n, t];\n}\nfunction Ue(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"-\" && e[t + 3] === \"-\";\n}\nfunction Ge(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"E\" && e[t + 3] === \"N\" && e[t + 4] === \"T\" && e[t + 5] === \"I\" && e[t + 6] === \"T\" && e[t + 7] === \"Y\";\n}\nfunction ze(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"E\" && e[t + 3] === \"L\" && e[t + 4] === \"E\" && e[t + 5] === \"M\" && e[t + 6] === \"E\" && e[t + 7] === \"N\" && e[t + 8] === \"T\";\n}\nfunction He(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"A\" && e[t + 3] === \"T\" && e[t + 4] === \"T\" && e[t + 5] === \"L\" && e[t + 6] === \"I\" && e[t + 7] === \"S\" && e[t + 8] === \"T\";\n}\nfunction Ke(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"N\" && e[t + 3] === \"O\" && e[t + 4] === \"T\" && e[t + 5] === \"A\" && e[t + 6] === \"T\" && e[t + 7] === \"I\" && e[t + 8] === \"O\" && e[t + 9] === \"N\";\n}\nfunction We(e) {\n if (Be.isName(e))\n return e;\n throw new Error(`Invalid entity name ${e}`);\n}\nvar Ze = qe;\nconst je = /^[-+]?0x[a-fA-F0-9]+$/, Ye = /^([\\-\\+])?(0*)(\\.[0-9]+([eE]\\-?[0-9]+)?|[0-9]+(\\.[0-9]+([eE]\\-?[0-9]+)?)?)$/;\n!Number.parseInt && window.parseInt && (Number.parseInt = window.parseInt);\n!Number.parseFloat && window.parseFloat && (Number.parseFloat = window.parseFloat);\nconst Je = {\n hex: !0,\n leadingZeros: !0,\n decimalPoint: \".\",\n eNotation: !0\n //skipLike: /regex/\n};\nfunction Qe(e, t = {}) {\n if (t = Object.assign({}, Je, t), !e || typeof e != \"string\")\n return e;\n let r = e.trim();\n if (t.skipLike !== void 0 && t.skipLike.test(r))\n return e;\n if (t.hex && je.test(r))\n return Number.parseInt(r, 16);\n {\n const s = Ye.exec(r);\n if (s) {\n const n = s[1], i = s[2];\n let d = De(s[3]);\n const u = s[4] || s[6];\n if (!t.leadingZeros && i.length > 0 && n && r[2] !== \".\")\n return e;\n if (!t.leadingZeros && i.length > 0 && !n && r[1] !== \".\")\n return e;\n {\n const o = Number(r), a = \"\" + o;\n return a.search(/[eE]/) !== -1 || u ? t.eNotation ? o : e : r.indexOf(\".\") !== -1 ? a === \"0\" && d === \"\" || a === d || n && a === \"-\" + d ? o : e : i ? d === a || n + d === a ? o : e : r === a || r === n + a ? o : e;\n }\n } else\n return e;\n }\n}\nfunction De(e) {\n return e && e.indexOf(\".\") !== -1 && (e = e.replace(/0+$/, \"\"), e === \".\" ? e = \"0\" : e[0] === \".\" ? e = \"0\" + e : e[e.length - 1] === \".\" && (e = e.substr(0, e.length - 1))), e;\n}\nvar et = Qe;\nconst B = O, T = ke, tt = Ze, rt = et;\n\"<((!\\\\[CDATA\\\\[([\\\\s\\\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\\\/)(NAME)\\\\s*>))([^<]*)\".replace(/NAME/g, B.nameRegexp);\nlet nt = class {\n constructor(t) {\n this.options = t, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = {\n apos: { regex: /&(apos|#39|#x27);/g, val: \"'\" },\n gt: { regex: /&(gt|#62|#x3E);/g, val: \">\" },\n lt: { regex: /&(lt|#60|#x3C);/g, val: \"<\" },\n quot: { regex: /&(quot|#34|#x22);/g, val: '\"' }\n }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: \"&\" }, this.htmlEntities = {\n space: { regex: /&(nbsp|#160);/g, val: \" \" },\n // \"lt\" : { regex: /&(lt|#60);/g, val: \"<\" },\n // \"gt\" : { regex: /&(gt|#62);/g, val: \">\" },\n // \"amp\" : { regex: /&(amp|#38);/g, val: \"&\" },\n // \"quot\" : { regex: /&(quot|#34);/g, val: \"\\\"\" },\n // \"apos\" : { regex: /&(apos|#39);/g, val: \"'\" },\n cent: { regex: /&(cent|#162);/g, val: \"¢\" },\n pound: { regex: /&(pound|#163);/g, val: \"£\" },\n yen: { regex: /&(yen|#165);/g, val: \"¥\" },\n euro: { regex: /&(euro|#8364);/g, val: \"€\" },\n copyright: { regex: /&(copy|#169);/g, val: \"©\" },\n reg: { regex: /&(reg|#174);/g, val: \"®\" },\n inr: { regex: /&(inr|#8377);/g, val: \"₹\" }\n }, this.addExternalEntities = it, this.parseXml = at, this.parseTextData = st, this.resolveNameSpace = ot, this.buildAttributesMap = dt, this.isItStopNode = ht, this.replaceEntitiesValue = ft, this.readStopNodeData = gt, this.saveTextToParentTag = ct, this.addChild = lt;\n }\n};\nfunction it(e) {\n const t = Object.keys(e);\n for (let r = 0; r < t.length; r++) {\n const s = t[r];\n this.lastEntities[s] = {\n regex: new RegExp(\"&\" + s + \";\", \"g\"),\n val: e[s]\n };\n }\n}\nfunction st(e, t, r, s, n, i, d) {\n if (e !== void 0 && (this.options.trimValues && !s && (e = e.trim()), e.length > 0)) {\n d || (e = this.replaceEntitiesValue(e));\n const u = this.options.tagValueProcessor(t, e, r, n, i);\n return u == null ? e : typeof u != typeof e || u !== e ? u : this.options.trimValues ? $(e, this.options.parseTagValue, this.options.numberParseOptions) : e.trim() === e ? $(e, this.options.parseTagValue, this.options.numberParseOptions) : e;\n }\n}\nfunction ot(e) {\n if (this.options.removeNSPrefix) {\n const t = e.split(\":\"), r = e.charAt(0) === \"/\" ? \"/\" : \"\";\n if (t[0] === \"xmlns\")\n return \"\";\n t.length === 2 && (e = r + t[1]);\n }\n return e;\n}\nconst ut = new RegExp(`([^\\\\s=]+)\\\\s*(=\\\\s*(['\"])([\\\\s\\\\S]*?)\\\\3)?`, \"gm\");\nfunction dt(e, t, r) {\n if (!this.options.ignoreAttributes && typeof e == \"string\") {\n const s = B.getAllMatches(e, ut), n = s.length, i = {};\n for (let d = 0; d < n; d++) {\n const u = this.resolveNameSpace(s[d][1]);\n let o = s[d][4], a = this.options.attributeNamePrefix + u;\n if (u.length)\n if (this.options.transformAttributeName && (a = this.options.transformAttributeName(a)), a === \"__proto__\" && (a = \"#__proto__\"), o !== void 0) {\n this.options.trimValues && (o = o.trim()), o = this.replaceEntitiesValue(o);\n const l = this.options.attributeValueProcessor(u, o, t);\n l == null ? i[a] = o : typeof l != typeof o || l !== o ? i[a] = l : i[a] = $(\n o,\n this.options.parseAttributeValue,\n this.options.numberParseOptions\n );\n } else\n this.options.allowBooleanAttributes && (i[a] = !0);\n }\n if (!Object.keys(i).length)\n return;\n if (this.options.attributesGroupName) {\n const d = {};\n return d[this.options.attributesGroupName] = i, d;\n }\n return i;\n }\n}\nconst at = function(e) {\n e = e.replace(/\\r\\n?/g, `\n`);\n const t = new T(\"!xml\");\n let r = t, s = \"\", n = \"\";\n for (let i = 0; i < e.length; i++)\n if (e[i] === \"<\")\n if (e[i + 1] === \"/\") {\n const u = y(e, \">\", i, \"Closing Tag is not closed.\");\n let o = e.substring(i + 2, u).trim();\n if (this.options.removeNSPrefix) {\n const f = o.indexOf(\":\");\n f !== -1 && (o = o.substr(f + 1));\n }\n this.options.transformTagName && (o = this.options.transformTagName(o)), r && (s = this.saveTextToParentTag(s, r, n));\n const a = n.substring(n.lastIndexOf(\".\") + 1);\n if (o && this.options.unpairedTags.indexOf(o) !== -1)\n throw new Error(`Unpaired tag can not be used as closing tag: `);\n let l = 0;\n a && this.options.unpairedTags.indexOf(a) !== -1 ? (l = n.lastIndexOf(\".\", n.lastIndexOf(\".\") - 1), this.tagsNodeStack.pop()) : l = n.lastIndexOf(\".\"), n = n.substring(0, l), r = this.tagsNodeStack.pop(), s = \"\", i = u;\n } else if (e[i + 1] === \"?\") {\n let u = x(e, i, !1, \"?>\");\n if (!u)\n throw new Error(\"Pi Tag is not closed.\");\n if (s = this.saveTextToParentTag(s, r, n), !(this.options.ignoreDeclaration && u.tagName === \"?xml\" || this.options.ignorePiTags)) {\n const o = new T(u.tagName);\n o.add(this.options.textNodeName, \"\"), u.tagName !== u.tagExp && u.attrExpPresent && (o[\":@\"] = this.buildAttributesMap(u.tagExp, n, u.tagName)), this.addChild(r, o, n);\n }\n i = u.closeIndex + 1;\n } else if (e.substr(i + 1, 3) === \"!--\") {\n const u = y(e, \"-->\", i + 4, \"Comment is not closed.\");\n if (this.options.commentPropName) {\n const o = e.substring(i + 4, u - 2);\n s = this.saveTextToParentTag(s, r, n), r.add(this.options.commentPropName, [{ [this.options.textNodeName]: o }]);\n }\n i = u;\n } else if (e.substr(i + 1, 2) === \"!D\") {\n const u = tt(e, i);\n this.docTypeEntities = u.entities, i = u.i;\n } else if (e.substr(i + 1, 2) === \"![\") {\n const u = y(e, \"]]>\", i, \"CDATA is not closed.\") - 2, o = e.substring(i + 9, u);\n if (s = this.saveTextToParentTag(s, r, n), this.options.cdataPropName)\n r.add(this.options.cdataPropName, [{ [this.options.textNodeName]: o }]);\n else {\n let a = this.parseTextData(o, r.tagname, n, !0, !1, !0);\n a == null && (a = \"\"), r.add(this.options.textNodeName, a);\n }\n i = u + 2;\n } else {\n let u = x(e, i, this.options.removeNSPrefix), o = u.tagName;\n const a = u.rawTagName;\n let l = u.tagExp, f = u.attrExpPresent, c = u.closeIndex;\n this.options.transformTagName && (o = this.options.transformTagName(o)), r && s && r.tagname !== \"!xml\" && (s = this.saveTextToParentTag(s, r, n, !1));\n const g = r;\n if (g && this.options.unpairedTags.indexOf(g.tagname) !== -1 && (r = this.tagsNodeStack.pop(), n = n.substring(0, n.lastIndexOf(\".\"))), o !== t.tagname && (n += n ? \".\" + o : o), this.isItStopNode(this.options.stopNodes, n, o)) {\n let h = \"\";\n if (l.length > 0 && l.lastIndexOf(\"/\") === l.length - 1)\n i = u.closeIndex;\n else if (this.options.unpairedTags.indexOf(o) !== -1)\n i = u.closeIndex;\n else {\n const E = this.readStopNodeData(e, a, c + 1);\n if (!E)\n throw new Error(`Unexpected end of ${a}`);\n i = E.i, h = E.tagContent;\n }\n const _ = new T(o);\n o !== l && f && (_[\":@\"] = this.buildAttributesMap(l, n, o)), h && (h = this.parseTextData(h, o, n, !0, f, !0, !0)), n = n.substr(0, n.lastIndexOf(\".\")), _.add(this.options.textNodeName, h), this.addChild(r, _, n);\n } else {\n if (l.length > 0 && l.lastIndexOf(\"/\") === l.length - 1) {\n o[o.length - 1] === \"/\" ? (o = o.substr(0, o.length - 1), n = n.substr(0, n.length - 1), l = o) : l = l.substr(0, l.length - 1), this.options.transformTagName && (o = this.options.transformTagName(o));\n const h = new T(o);\n o !== l && f && (h[\":@\"] = this.buildAttributesMap(l, n, o)), this.addChild(r, h, n), n = n.substr(0, n.lastIndexOf(\".\"));\n } else {\n const h = new T(o);\n this.tagsNodeStack.push(r), o !== l && f && (h[\":@\"] = this.buildAttributesMap(l, n, o)), this.addChild(r, h, n), r = h;\n }\n s = \"\", i = c;\n }\n }\n else\n s += e[i];\n return t.child;\n};\nfunction lt(e, t, r) {\n const s = this.options.updateTag(t.tagname, r, t[\":@\"]);\n s === !1 || (typeof s == \"string\" && (t.tagname = s), e.addChild(t));\n}\nconst ft = function(e) {\n if (this.options.processEntities) {\n for (let t in this.docTypeEntities) {\n const r = this.docTypeEntities[t];\n e = e.replace(r.regx, r.val);\n }\n for (let t in this.lastEntities) {\n const r = this.lastEntities[t];\n e = e.replace(r.regex, r.val);\n }\n if (this.options.htmlEntities)\n for (let t in this.htmlEntities) {\n const r = this.htmlEntities[t];\n e = e.replace(r.regex, r.val);\n }\n e = e.replace(this.ampEntity.regex, this.ampEntity.val);\n }\n return e;\n};\nfunction ct(e, t, r, s) {\n return e && (s === void 0 && (s = Object.keys(t.child).length === 0), e = this.parseTextData(\n e,\n t.tagname,\n r,\n !1,\n t[\":@\"] ? Object.keys(t[\":@\"]).length !== 0 : !1,\n s\n ), e !== void 0 && e !== \"\" && t.add(this.options.textNodeName, e), e = \"\"), e;\n}\nfunction ht(e, t, r) {\n const s = \"*.\" + r;\n for (const n in e) {\n const i = e[n];\n if (s === i || t === i)\n return !0;\n }\n return !1;\n}\nfunction pt(e, t, r = \">\") {\n let s, n = \"\";\n for (let i = t; i < e.length; i++) {\n let d = e[i];\n if (s)\n d === s && (s = \"\");\n else if (d === '\"' || d === \"'\")\n s = d;\n else if (d === r[0])\n if (r[1]) {\n if (e[i + 1] === r[1])\n return {\n data: n,\n index: i\n };\n } else\n return {\n data: n,\n index: i\n };\n else\n d === \"\t\" && (d = \" \");\n n += d;\n }\n}\nfunction y(e, t, r, s) {\n const n = e.indexOf(t, r);\n if (n === -1)\n throw new Error(s);\n return n + t.length - 1;\n}\nfunction x(e, t, r, s = \">\") {\n const n = pt(e, t + 1, s);\n if (!n)\n return;\n let i = n.data;\n const d = n.index, u = i.search(/\\s/);\n let o = i, a = !0;\n u !== -1 && (o = i.substr(0, u).replace(/\\s\\s*$/, \"\"), i = i.substr(u + 1));\n const l = o;\n if (r) {\n const f = o.indexOf(\":\");\n f !== -1 && (o = o.substr(f + 1), a = o !== n.data.substr(f + 1));\n }\n return {\n tagName: o,\n tagExp: i,\n closeIndex: d,\n attrExpPresent: a,\n rawTagName: l\n };\n}\nfunction gt(e, t, r) {\n const s = r;\n let n = 1;\n for (; r < e.length; r++)\n if (e[r] === \"<\")\n if (e[r + 1] === \"/\") {\n const i = y(e, \">\", r, `${t} is not closed`);\n if (e.substring(r + 2, i).trim() === t && (n--, n === 0))\n return {\n tagContent: e.substring(s, r),\n i\n };\n r = i;\n } else if (e[r + 1] === \"?\")\n r = y(e, \"?>\", r + 1, \"StopNode is not closed.\");\n else if (e.substr(r + 1, 3) === \"!--\")\n r = y(e, \"-->\", r + 3, \"StopNode is not closed.\");\n else if (e.substr(r + 1, 2) === \"![\")\n r = y(e, \"]]>\", r, \"StopNode is not closed.\") - 2;\n else {\n const i = x(e, r, \">\");\n i && ((i && i.tagName) === t && i.tagExp[i.tagExp.length - 1] !== \"/\" && n++, r = i.closeIndex);\n }\n}\nfunction $(e, t, r) {\n if (t && typeof e == \"string\") {\n const s = e.trim();\n return s === \"true\" ? !0 : s === \"false\" ? !1 : rt(e, r);\n } else\n return B.isExist(e) ? e : \"\";\n}\nvar wt = nt, ne = {};\nfunction mt(e, t) {\n return ie(e, t);\n}\nfunction ie(e, t, r) {\n let s;\n const n = {};\n for (let i = 0; i < e.length; i++) {\n const d = e[i], u = Nt(d);\n let o = \"\";\n if (r === void 0 ? o = u : o = r + \".\" + u, u === t.textNodeName)\n s === void 0 ? s = d[u] : s += \"\" + d[u];\n else {\n if (u === void 0)\n continue;\n if (d[u]) {\n let a = ie(d[u], t, o);\n const l = bt(a, t);\n d[\":@\"] ? Et(a, d[\":@\"], o, t) : Object.keys(a).length === 1 && a[t.textNodeName] !== void 0 && !t.alwaysCreateTextNode ? a = a[t.textNodeName] : Object.keys(a).length === 0 && (t.alwaysCreateTextNode ? a[t.textNodeName] = \"\" : a = \"\"), n[u] !== void 0 && n.hasOwnProperty(u) ? (Array.isArray(n[u]) || (n[u] = [n[u]]), n[u].push(a)) : t.isArray(u, o, l) ? n[u] = [a] : n[u] = a;\n }\n }\n }\n return typeof s == \"string\" ? s.length > 0 && (n[t.textNodeName] = s) : s !== void 0 && (n[t.textNodeName] = s), n;\n}\nfunction Nt(e) {\n const t = Object.keys(e);\n for (let r = 0; r < t.length; r++) {\n const s = t[r];\n if (s !== \":@\")\n return s;\n }\n}\nfunction Et(e, t, r, s) {\n if (t) {\n const n = Object.keys(t), i = n.length;\n for (let d = 0; d < i; d++) {\n const u = n[d];\n s.isArray(u, r + \".\" + u, !0, !0) ? e[u] = [t[u]] : e[u] = t[u];\n }\n }\n}\nfunction bt(e, t) {\n const { textNodeName: r } = t, s = Object.keys(e).length;\n return !!(s === 0 || s === 1 && (e[r] || typeof e[r] == \"boolean\" || e[r] === 0));\n}\nne.prettify = mt;\nconst { buildOptions: yt } = k, _t = wt, { prettify: vt } = ne, Tt = S;\nlet It = class {\n constructor(t) {\n this.externalEntities = {}, this.options = yt(t);\n }\n /**\n * Parse XML dats to JS object \n * @param {string|Buffer} xmlData \n * @param {boolean|Object} validationOption \n */\n parse(t, r) {\n if (typeof t != \"string\")\n if (t.toString)\n t = t.toString();\n else\n throw new Error(\"XML data is accepted in String or Bytes[] form.\");\n if (r) {\n r === !0 && (r = {});\n const i = Tt.validate(t, r);\n if (i !== !0)\n throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`);\n }\n const s = new _t(this.options);\n s.addExternalEntities(this.externalEntities);\n const n = s.parseXml(t);\n return this.options.preserveOrder || n === void 0 ? n : vt(n, this.options);\n }\n /**\n * Add Entity which is not by default supported by this library\n * @param {string} key \n * @param {string} value \n */\n addEntity(t, r) {\n if (r.indexOf(\"&\") !== -1)\n throw new Error(\"Entity value can't have '&'\");\n if (t.indexOf(\"&\") !== -1 || t.indexOf(\";\") !== -1)\n throw new Error(\"An entity must be set without '&' and ';'. Eg. use '#xD' for ' '\");\n if (r === \"&\")\n throw new Error(\"An entity with value '&' is not permitted\");\n this.externalEntities[t] = r;\n }\n};\nvar At = It;\nconst Ot = `\n`;\nfunction Ct(e, t) {\n let r = \"\";\n return t.format && t.indentBy.length > 0 && (r = Ot), se(e, t, \"\", r);\n}\nfunction se(e, t, r, s) {\n let n = \"\", i = !1;\n for (let d = 0; d < e.length; d++) {\n const u = e[d], o = Pt(u);\n if (o === void 0)\n continue;\n let a = \"\";\n if (r.length === 0 ? a = o : a = `${r}.${o}`, o === t.textNodeName) {\n let h = u[o];\n xt(a, t) || (h = t.tagValueProcessor(o, h), h = oe(h, t)), i && (n += s), n += h, i = !1;\n continue;\n } else if (o === t.cdataPropName) {\n i && (n += s), n += ``, i = !1;\n continue;\n } else if (o === t.commentPropName) {\n n += s + ``, i = !0;\n continue;\n } else if (o[0] === \"?\") {\n const h = K(u[\":@\"], t), _ = o === \"?xml\" ? \"\" : s;\n let E = u[o][0][t.textNodeName];\n E = E.length !== 0 ? \" \" + E : \"\", n += _ + `<${o}${E}${h}?>`, i = !0;\n continue;\n }\n let l = s;\n l !== \"\" && (l += t.indentBy);\n const f = K(u[\":@\"], t), c = s + `<${o}${f}`, g = se(u[o], t, a, l);\n t.unpairedTags.indexOf(o) !== -1 ? t.suppressUnpairedNode ? n += c + \">\" : n += c + \"/>\" : (!g || g.length === 0) && t.suppressEmptyNode ? n += c + \"/>\" : g && g.endsWith(\">\") ? n += c + `>${g}${s}` : (n += c + \">\", g && s !== \"\" && (g.includes(\"/>\") || g.includes(\"`), i = !0;\n }\n return n;\n}\nfunction Pt(e) {\n const t = Object.keys(e);\n for (let r = 0; r < t.length; r++) {\n const s = t[r];\n if (e.hasOwnProperty(s) && s !== \":@\")\n return s;\n }\n}\nfunction K(e, t) {\n let r = \"\";\n if (e && !t.ignoreAttributes)\n for (let s in e) {\n if (!e.hasOwnProperty(s))\n continue;\n let n = t.attributeValueProcessor(s, e[s]);\n n = oe(n, t), n === !0 && t.suppressBooleanAttributes ? r += ` ${s.substr(t.attributeNamePrefix.length)}` : r += ` ${s.substr(t.attributeNamePrefix.length)}=\"${n}\"`;\n }\n return r;\n}\nfunction xt(e, t) {\n e = e.substr(0, e.length - t.textNodeName.length - 1);\n let r = e.substr(e.lastIndexOf(\".\") + 1);\n for (let s in t.stopNodes)\n if (t.stopNodes[s] === e || t.stopNodes[s] === \"*.\" + r)\n return !0;\n return !1;\n}\nfunction oe(e, t) {\n if (e && e.length > 0 && t.processEntities)\n for (let r = 0; r < t.entities.length; r++) {\n const s = t.entities[r];\n e = e.replace(s.regex, s.val);\n }\n return e;\n}\nvar $t = Ct;\nconst Ft = $t, Vt = {\n attributeNamePrefix: \"@_\",\n attributesGroupName: !1,\n textNodeName: \"#text\",\n ignoreAttributes: !0,\n cdataPropName: !1,\n format: !1,\n indentBy: \" \",\n suppressEmptyNode: !1,\n suppressUnpairedNode: !0,\n suppressBooleanAttributes: !0,\n tagValueProcessor: function(e, t) {\n return t;\n },\n attributeValueProcessor: function(e, t) {\n return t;\n },\n preserveOrder: !1,\n commentPropName: !1,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&\" },\n //it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \">\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"<\" },\n { regex: new RegExp(\"'\", \"g\"), val: \"'\" },\n { regex: new RegExp('\"', \"g\"), val: \""\" }\n ],\n processEntities: !0,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: !1\n};\nfunction b(e) {\n this.options = Object.assign({}, Vt, e), this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {\n return !1;\n } : (this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = St), this.processTextOrObjNode = Lt, this.options.format ? (this.indentate = Rt, this.tagEndChar = `>\n`, this.newLine = `\n`) : (this.indentate = function() {\n return \"\";\n }, this.tagEndChar = \">\", this.newLine = \"\");\n}\nb.prototype.build = function(e) {\n return this.options.preserveOrder ? Ft(e, this.options) : (Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = {\n [this.options.arrayNodeName]: e\n }), this.j2x(e, 0).val);\n};\nb.prototype.j2x = function(e, t) {\n let r = \"\", s = \"\";\n for (let n in e)\n if (Object.prototype.hasOwnProperty.call(e, n))\n if (typeof e[n] > \"u\")\n this.isAttribute(n) && (s += \"\");\n else if (e[n] === null)\n this.isAttribute(n) ? s += \"\" : n[0] === \"?\" ? s += this.indentate(t) + \"<\" + n + \"?\" + this.tagEndChar : s += this.indentate(t) + \"<\" + n + \"/\" + this.tagEndChar;\n else if (e[n] instanceof Date)\n s += this.buildTextValNode(e[n], n, \"\", t);\n else if (typeof e[n] != \"object\") {\n const i = this.isAttribute(n);\n if (i)\n r += this.buildAttrPairStr(i, \"\" + e[n]);\n else if (n === this.options.textNodeName) {\n let d = this.options.tagValueProcessor(n, \"\" + e[n]);\n s += this.replaceEntitiesValue(d);\n } else\n s += this.buildTextValNode(e[n], n, \"\", t);\n } else if (Array.isArray(e[n])) {\n const i = e[n].length;\n let d = \"\";\n for (let u = 0; u < i; u++) {\n const o = e[n][u];\n typeof o > \"u\" || (o === null ? n[0] === \"?\" ? s += this.indentate(t) + \"<\" + n + \"?\" + this.tagEndChar : s += this.indentate(t) + \"<\" + n + \"/\" + this.tagEndChar : typeof o == \"object\" ? this.options.oneListGroup ? d += this.j2x(o, t + 1).val : d += this.processTextOrObjNode(o, n, t) : d += this.buildTextValNode(o, n, \"\", t));\n }\n this.options.oneListGroup && (d = this.buildObjectNode(d, n, \"\", t)), s += d;\n } else if (this.options.attributesGroupName && n === this.options.attributesGroupName) {\n const i = Object.keys(e[n]), d = i.length;\n for (let u = 0; u < d; u++)\n r += this.buildAttrPairStr(i[u], \"\" + e[n][i[u]]);\n } else\n s += this.processTextOrObjNode(e[n], n, t);\n return { attrStr: r, val: s };\n};\nb.prototype.buildAttrPairStr = function(e, t) {\n return t = this.options.attributeValueProcessor(e, \"\" + t), t = this.replaceEntitiesValue(t), this.options.suppressBooleanAttributes && t === \"true\" ? \" \" + e : \" \" + e + '=\"' + t + '\"';\n};\nfunction Lt(e, t, r) {\n const s = this.j2x(e, r + 1);\n return e[this.options.textNodeName] !== void 0 && Object.keys(e).length === 1 ? this.buildTextValNode(e[this.options.textNodeName], t, s.attrStr, r) : this.buildObjectNode(s.val, t, s.attrStr, r);\n}\nb.prototype.buildObjectNode = function(e, t, r, s) {\n if (e === \"\")\n return t[0] === \"?\" ? this.indentate(s) + \"<\" + t + r + \"?\" + this.tagEndChar : this.indentate(s) + \"<\" + t + r + this.closeTag(t) + this.tagEndChar;\n {\n let n = \"\" + e + n : this.options.commentPropName !== !1 && t === this.options.commentPropName && i.length === 0 ? this.indentate(s) + `` + this.newLine : this.indentate(s) + \"<\" + t + r + i + this.tagEndChar + e + this.indentate(s) + n;\n }\n};\nb.prototype.closeTag = function(e) {\n let t = \"\";\n return this.options.unpairedTags.indexOf(e) !== -1 ? this.options.suppressUnpairedNode || (t = \"/\") : this.options.suppressEmptyNode ? t = \"/\" : t = `>` + this.newLine;\n if (this.options.commentPropName !== !1 && t === this.options.commentPropName)\n return this.indentate(s) + `` + this.newLine;\n if (t[0] === \"?\")\n return this.indentate(s) + \"<\" + t + r + \"?\" + this.tagEndChar;\n {\n let n = this.options.tagValueProcessor(t, e);\n return n = this.replaceEntitiesValue(n), n === \"\" ? this.indentate(s) + \"<\" + t + r + this.closeTag(t) + this.tagEndChar : this.indentate(s) + \"<\" + t + r + \">\" + n + \" 0 && this.options.processEntities)\n for (let t = 0; t < this.options.entities.length; t++) {\n const r = this.options.entities[t];\n e = e.replace(r.regex, r.val);\n }\n return e;\n};\nfunction Rt(e) {\n return this.options.indentBy.repeat(e);\n}\nfunction St(e) {\n return e.startsWith(this.options.attributeNamePrefix) && e !== this.options.textNodeName ? e.substr(this.attrPrefixLen) : !1;\n}\nvar Mt = b;\nconst kt = S, Bt = At, qt = Mt;\nvar W = {\n XMLParser: Bt,\n XMLValidator: kt,\n XMLBuilder: qt\n};\nfunction Xt(e) {\n if (typeof e != \"string\")\n throw new TypeError(`Expected a \\`string\\`, got \\`${typeof e}\\``);\n if (e = e.trim(), e.length === 0 || W.XMLValidator.validate(e) !== !0)\n return !1;\n let t;\n const r = new W.XMLParser();\n try {\n t = r.parse(e);\n } catch {\n return !1;\n }\n return !(!t || !(\"svg\" in t));\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass cr {\n _view;\n constructor(t) {\n Ut(t), this._view = t;\n }\n get id() {\n return this._view.id;\n }\n get name() {\n return this._view.name;\n }\n get caption() {\n return this._view.caption;\n }\n get emptyTitle() {\n return this._view.emptyTitle;\n }\n get emptyCaption() {\n return this._view.emptyCaption;\n }\n get getContents() {\n return this._view.getContents;\n }\n get icon() {\n return this._view.icon;\n }\n set icon(t) {\n this._view.icon = t;\n }\n get order() {\n return this._view.order;\n }\n set order(t) {\n this._view.order = t;\n }\n get params() {\n return this._view.params;\n }\n set params(t) {\n this._view.params = t;\n }\n get columns() {\n return this._view.columns;\n }\n get emptyView() {\n return this._view.emptyView;\n }\n get parent() {\n return this._view.parent;\n }\n get sticky() {\n return this._view.sticky;\n }\n get expanded() {\n return this._view.expanded;\n }\n set expanded(t) {\n this._view.expanded = t;\n }\n get defaultSortKey() {\n return this._view.defaultSortKey;\n }\n}\nconst Ut = function(e) {\n if (!e.id || typeof e.id != \"string\")\n throw new Error(\"View id is required and must be a string\");\n if (!e.name || typeof e.name != \"string\")\n throw new Error(\"View name is required and must be a string\");\n if (e.columns && e.columns.length > 0 && (!e.caption || typeof e.caption != \"string\"))\n throw new Error(\"View caption is required for top-level views and must be a string\");\n if (!e.getContents || typeof e.getContents != \"function\")\n throw new Error(\"View getContents is required and must be a function\");\n if (!e.icon || typeof e.icon != \"string\" || !Xt(e.icon))\n throw new Error(\"View icon is required and must be a valid svg string\");\n if (!(\"order\" in e) || typeof e.order != \"number\")\n throw new Error(\"View order is required and must be a number\");\n if (e.columns && e.columns.forEach((t) => {\n if (!(t instanceof Ie))\n throw new Error(\"View columns must be an array of Column. Invalid column found\");\n }), e.emptyView && typeof e.emptyView != \"function\")\n throw new Error(\"View emptyView must be a function\");\n if (e.parent && typeof e.parent != \"string\")\n throw new Error(\"View parent must be a string\");\n if (\"sticky\" in e && typeof e.sticky != \"boolean\")\n throw new Error(\"View sticky must be a boolean\");\n if (\"expanded\" in e && typeof e.expanded != \"boolean\")\n throw new Error(\"View expanded must be a boolean\");\n if (e.defaultSortKey && typeof e.defaultSortKey != \"string\")\n throw new Error(\"View defaultSortKey must be a string\");\n return !0;\n};\n/**\n * @copyright 2019 Christoph Wurst \n *\n * @author Christoph Wurst \n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst hr = function(e) {\n return F().registerEntry(e);\n}, pr = function(e) {\n return F().unregisterEntry(e);\n}, gr = function(e) {\n return F().getEntries(e).sort((r, s) => r.order !== void 0 && s.order !== void 0 && r.order !== s.order ? r.order - s.order : r.displayName.localeCompare(s.displayName, void 0, { numeric: !0, sensitivity: \"base\" }));\n};\nexport {\n Ie as Column,\n Z as DefaultType,\n ye as File,\n Qt as FileAction,\n R as FileType,\n _e as Folder,\n tr as Header,\n Te as Navigation,\n D as Node,\n Q as NodeStatus,\n N as Permission,\n cr as View,\n hr as addNewFileMenuEntry,\n ur as davGetClient,\n sr as davGetDefaultPropfind,\n Ee as davGetFavoritesReport,\n or as davGetRecentSearch,\n be as davParsePermissions,\n te as davRemoteURL,\n ve as davResultToNode,\n ee as davRootPath,\n Y as defaultDavNamespaces,\n j as defaultDavProperties,\n Yt as formatFileSize,\n L as getDavNameSpaces,\n V as getDavProperties,\n dr as getFavoriteNodes,\n er as getFileActions,\n nr as getFileListHeaders,\n ar as getNavigation,\n gr as getNewFileMenuEntries,\n Jt as parseFileSize,\n ir as registerDavProperty,\n Dt as registerFileAction,\n rr as registerFileListHeaders,\n pr as removeNewFileMenuEntry\n};\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./fileEntryInlineSystemTags.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./fileEntryInlineSystemTags.scss\";\n export default content && content.locals ? content.locals : undefined;\n","/**\n * @copyright Copyright (c) 2023 Lucas Azevedo \n *\n * @author Lucas Azevedo \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { FileAction, Node, registerDavProperty, registerFileAction } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport '../css/fileEntryInlineSystemTags.scss';\nconst getNodeSystemTags = function (node) {\n const tags = node.attributes?.['system-tags']?.['system-tag'];\n if (tags === undefined) {\n return [];\n }\n return [tags].flat();\n};\nconst renderTag = function (tag, isMore = false) {\n const tagElement = document.createElement('li');\n tagElement.classList.add('files-list__system-tag');\n tagElement.textContent = tag;\n if (isMore) {\n tagElement.classList.add('files-list__system-tag--more');\n }\n return tagElement;\n};\nexport const action = new FileAction({\n id: 'system-tags',\n displayName: () => '',\n iconSvgInline: () => '',\n enabled(nodes) {\n // Only show the action on single nodes\n if (nodes.length !== 1) {\n return false;\n }\n const node = nodes[0];\n const tags = getNodeSystemTags(node);\n // Only show the action if the node has system tags\n if (tags.length === 0) {\n return false;\n }\n return true;\n },\n exec: async () => null,\n async renderInline(node) {\n // Ensure we have the system tags as an array\n const tags = getNodeSystemTags(node);\n if (tags.length === 0) {\n return null;\n }\n const systemTagsElement = document.createElement('ul');\n systemTagsElement.classList.add('files-list__system-tags');\n if (tags.length === 1) {\n systemTagsElement.setAttribute('aria-label', t('files', 'This file has the tag {tag}', { tag: tags[0] }));\n }\n else {\n const firstTags = tags.slice(0, -1).join(', ');\n const lastTag = tags[tags.length - 1];\n systemTagsElement.setAttribute('aria-label', t('files', 'This file has the tags {firstTags} and {lastTag}', { firstTags, lastTag }));\n }\n systemTagsElement.append(renderTag(tags[0]));\n // More tags than the one we're showing\n if (tags.length > 1) {\n const moreTagElement = renderTag('+' + (tags.length - 1), true);\n moreTagElement.setAttribute('title', tags.slice(1).join(', '));\n systemTagsElement.append(moreTagElement);\n }\n return systemTagsElement;\n },\n order: 0,\n});\nregisterDavProperty('nc:system-tags');\nregisterFileAction(action);\n","/**\n * @copyright 2023 Christopher Ng \n *\n * @author Christopher Ng \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { createClient } from 'webdav';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getRequestToken } from '@nextcloud/auth';\nconst rootUrl = generateRemoteUrl('dav');\nexport const davClient = createClient(rootUrl, {\n headers: {\n requesttoken: getRequestToken() ?? '',\n },\n});\n","/**\n * @copyright 2023 Christopher Ng \n *\n * @author Christopher Ng \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport camelCase from 'camelcase';\nexport const defaultBaseTag = {\n userVisible: true,\n userAssignable: true,\n canAssign: true,\n};\nexport const parseTags = (tags) => {\n return tags.map(({ props }) => Object.fromEntries(Object.entries(props)\n .map(([key, value]) => [camelCase(key), camelCase(key) === 'displayName' ? String(value) : value])));\n};\n/**\n * Parse id from `Content-Location` header\n * @param url URL to parse\n */\nexport const parseIdFromLocation = (url) => {\n const queryPos = url.indexOf('?');\n if (queryPos > 0) {\n url = url.substring(0, queryPos);\n }\n const parts = url.split('/');\n let result;\n do {\n result = parts[parts.length - 1];\n parts.pop();\n // note: first result can be empty when there is a trailing slash,\n // so we take the part before that\n } while (!result && parts.length > 0);\n return Number(result);\n};\nexport const formatTag = (initialTag) => {\n const tag = { ...initialTag };\n if (tag.name && !tag.displayName) {\n return tag;\n }\n tag.name = tag.displayName;\n delete tag.displayName;\n return tag;\n};\n","/**\n * @copyright 2023 Christopher Ng \n *\n * @author Christopher Ng \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger';\nexport const logger = getLoggerBuilder()\n .setApp('systemtags')\n .detectUser()\n .build();\n","const inWebWorker = typeof WorkerGlobalScope !== \"undefined\" &&\n self instanceof WorkerGlobalScope;\nconst root = inWebWorker\n ? self\n : typeof window !== \"undefined\"\n ? window\n : globalThis;\nexport const fetch = root.fetch.bind(root);\nexport const Headers = root.Headers;\nexport const Request = root.Request;\nexport const Response = root.Response;\n","import { sequence } from \"./functions.js\";\nconst HOT_PATCHER_TYPE = \"@@HOTPATCHER\";\nconst NOOP = () => { };\nfunction createNewItem(method) {\n return {\n original: method,\n methods: [method],\n final: false\n };\n}\n/**\n * Hot patching manager class\n */\nexport class HotPatcher {\n constructor() {\n this._configuration = {\n registry: {},\n getEmptyAction: \"null\"\n };\n this.__type__ = HOT_PATCHER_TYPE;\n }\n /**\n * Configuration object reference\n * @readonly\n */\n get configuration() {\n return this._configuration;\n }\n /**\n * The action to take when a non-set method is requested\n * Possible values: null/throw\n */\n get getEmptyAction() {\n return this.configuration.getEmptyAction;\n }\n set getEmptyAction(newAction) {\n this.configuration.getEmptyAction = newAction;\n }\n /**\n * Control another hot-patcher instance\n * Force the remote instance to use patched methods from calling instance\n * @param target The target instance to control\n * @param allowTargetOverrides Allow the target to override patched methods on\n * the controller (default is false)\n * @returns Returns self\n * @throws {Error} Throws if the target is invalid\n */\n control(target, allowTargetOverrides = false) {\n if (!target || target.__type__ !== HOT_PATCHER_TYPE) {\n throw new Error(\"Failed taking control of target HotPatcher instance: Invalid type or object\");\n }\n Object.keys(target.configuration.registry).forEach(foreignKey => {\n if (this.configuration.registry.hasOwnProperty(foreignKey)) {\n if (allowTargetOverrides) {\n this.configuration.registry[foreignKey] = Object.assign({}, target.configuration.registry[foreignKey]);\n }\n }\n else {\n this.configuration.registry[foreignKey] = Object.assign({}, target.configuration.registry[foreignKey]);\n }\n });\n target._configuration = this.configuration;\n return this;\n }\n /**\n * Execute a patched method\n * @param key The method key\n * @param args Arguments to pass to the method (optional)\n * @see HotPatcher#get\n * @returns The output of the called method\n */\n execute(key, ...args) {\n const method = this.get(key) || NOOP;\n return method(...args);\n }\n /**\n * Get a method for a key\n * @param key The method key\n * @returns Returns the requested function or null if the function\n * does not exist and the host is configured to return null (and not throw)\n * @throws {Error} Throws if the configuration specifies to throw and the method\n * does not exist\n * @throws {Error} Throws if the `getEmptyAction` value is invalid\n */\n get(key) {\n const item = this.configuration.registry[key];\n if (!item) {\n switch (this.getEmptyAction) {\n case \"null\":\n return null;\n case \"throw\":\n throw new Error(`Failed handling method request: No method provided for override: ${key}`);\n default:\n throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`);\n }\n }\n return sequence(...item.methods);\n }\n /**\n * Check if a method has been patched\n * @param key The function key\n * @returns True if already patched\n */\n isPatched(key) {\n return !!this.configuration.registry[key];\n }\n /**\n * Patch a method name\n * @param key The method key to patch\n * @param method The function to set\n * @param opts Patch options\n * @returns Returns self\n */\n patch(key, method, opts = {}) {\n const { chain = false } = opts;\n if (this.configuration.registry[key] && this.configuration.registry[key].final) {\n throw new Error(`Failed patching '${key}': Method marked as being final`);\n }\n if (typeof method !== \"function\") {\n throw new Error(`Failed patching '${key}': Provided method is not a function`);\n }\n if (chain) {\n // Add new method to the chain\n if (!this.configuration.registry[key]) {\n // New key, create item\n this.configuration.registry[key] = createNewItem(method);\n }\n else {\n // Existing, push the method\n this.configuration.registry[key].methods.push(method);\n }\n }\n else {\n // Replace the original\n if (this.isPatched(key)) {\n const { original } = this.configuration.registry[key];\n this.configuration.registry[key] = Object.assign(createNewItem(method), {\n original\n });\n }\n else {\n this.configuration.registry[key] = createNewItem(method);\n }\n }\n return this;\n }\n /**\n * Patch a method inline, execute it and return the value\n * Used for patching contents of functions. This method will not apply a patched\n * function if it has already been patched, allowing for external overrides to\n * function. It also means that the function is cached so that it is not\n * instantiated every time the outer function is invoked.\n * @param key The function key to use\n * @param method The function to patch (once, only if not patched)\n * @param args Arguments to pass to the function\n * @returns The output of the patched function\n * @example\n * function mySpecialFunction(a, b) {\n * return hotPatcher.patchInline(\"func\", (a, b) => {\n * return a + b;\n * }, a, b);\n * }\n */\n patchInline(key, method, ...args) {\n if (!this.isPatched(key)) {\n this.patch(key, method);\n }\n return this.execute(key, ...args);\n }\n /**\n * Patch a method (or methods) in sequential-mode\n * See `patch()` with the option `chain: true`\n * @see patch\n * @param key The key to patch\n * @param methods The methods to patch\n * @returns Returns self\n */\n plugin(key, ...methods) {\n methods.forEach(method => {\n this.patch(key, method, { chain: true });\n });\n return this;\n }\n /**\n * Restore a patched method if it has been overridden\n * @param key The method key\n * @returns Returns self\n */\n restore(key) {\n if (!this.isPatched(key)) {\n throw new Error(`Failed restoring method: No method present for key: ${key}`);\n }\n else if (typeof this.configuration.registry[key].original !== \"function\") {\n throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${key}`);\n }\n this.configuration.registry[key].methods = [this.configuration.registry[key].original];\n return this;\n }\n /**\n * Set a method as being final\n * This sets a method as having been finally overridden. Attempts at overriding\n * again will fail with an error.\n * @param key The key to make final\n * @returns Returns self\n */\n setFinal(key) {\n if (!this.configuration.registry.hasOwnProperty(key)) {\n throw new Error(`Failed marking '${key}' as final: No method found for key`);\n }\n this.configuration.registry[key].final = true;\n return this;\n }\n}\n","export function sequence(...methods) {\n if (methods.length === 0) {\n throw new Error(\"Failed creating sequence: No functions provided\");\n }\n return function __executeSequence(...args) {\n let result = args;\n const _this = this;\n while (methods.length > 0) {\n const method = methods.shift();\n result = [method.apply(_this, result)];\n }\n return result[0];\n };\n}\n","import { HotPatcher } from \"hot-patcher\";\nlet __patcher = null;\nexport function getPatcher() {\n if (!__patcher) {\n __patcher = new HotPatcher();\n }\n return __patcher;\n}\n","import md5 from \"md5\";\nimport { ha1Compute } from \"../tools/crypto.js\";\nconst NONCE_CHARS = \"abcdef0123456789\";\nconst NONCE_SIZE = 32;\nexport function createDigestContext(username, password, ha1) {\n return { username, password, ha1, nc: 0, algorithm: \"md5\", hasDigestAuth: false };\n}\nexport function generateDigestAuthHeader(options, digest) {\n const url = options.url.replace(\"//\", \"\");\n const uri = url.indexOf(\"/\") == -1 ? \"/\" : url.slice(url.indexOf(\"/\"));\n const method = options.method ? options.method.toUpperCase() : \"GET\";\n const qop = /(^|,)\\s*auth\\s*($|,)/.test(digest.qop) ? \"auth\" : false;\n const ncString = `00000000${digest.nc}`.slice(-8);\n const ha1 = ha1Compute(digest.algorithm, digest.username, digest.realm, digest.password, digest.nonce, digest.cnonce, digest.ha1);\n const ha2 = md5(`${method}:${uri}`);\n const digestResponse = qop\n ? md5(`${ha1}:${digest.nonce}:${ncString}:${digest.cnonce}:${qop}:${ha2}`)\n : md5(`${ha1}:${digest.nonce}:${ha2}`);\n const authValues = {\n username: digest.username,\n realm: digest.realm,\n nonce: digest.nonce,\n uri,\n qop,\n response: digestResponse,\n nc: ncString,\n cnonce: digest.cnonce,\n algorithm: digest.algorithm,\n opaque: digest.opaque\n };\n const authHeader = [];\n for (const k in authValues) {\n if (authValues[k]) {\n if (k === \"qop\" || k === \"nc\" || k === \"algorithm\") {\n authHeader.push(`${k}=${authValues[k]}`);\n }\n else {\n authHeader.push(`${k}=\"${authValues[k]}\"`);\n }\n }\n }\n return `Digest ${authHeader.join(\", \")}`;\n}\nfunction makeNonce() {\n let uid = \"\";\n for (let i = 0; i < NONCE_SIZE; ++i) {\n uid = `${uid}${NONCE_CHARS[Math.floor(Math.random() * NONCE_CHARS.length)]}`;\n }\n return uid;\n}\nexport function parseDigestAuth(response, _digest) {\n const authHeader = (response.headers && response.headers.get(\"www-authenticate\")) || \"\";\n if (authHeader.split(/\\s/)[0].toLowerCase() !== \"digest\") {\n return false;\n }\n const re = /([a-z0-9_-]+)=(?:\"([^\"]+)\"|([a-z0-9_-]+))/gi;\n for (;;) {\n const match = re.exec(authHeader);\n if (!match) {\n break;\n }\n _digest[match[1]] = match[2] || match[3];\n }\n _digest.nc += 1;\n _digest.cnonce = makeNonce();\n return true;\n}\n","import md5 from \"md5\";\nexport function ha1Compute(algorithm, user, realm, pass, nonce, cnonce, ha1) {\n const ha1Hash = ha1 || md5(`${user}:${realm}:${pass}`);\n if (algorithm && algorithm.toLowerCase() === \"md5-sess\") {\n return md5(`${ha1Hash}:${nonce}:${cnonce}`);\n }\n return ha1Hash;\n}\n","export function cloneShallow(obj) {\n return isPlainObject(obj)\n ? Object.assign({}, obj)\n : Object.setPrototypeOf(Object.assign({}, obj), Object.getPrototypeOf(obj));\n}\nfunction isPlainObject(obj) {\n if (typeof obj !== \"object\" ||\n obj === null ||\n Object.prototype.toString.call(obj) != \"[object Object]\") {\n // Not an object\n return false;\n }\n if (Object.getPrototypeOf(obj) === null) {\n return true;\n }\n let proto = obj;\n // Find the prototype\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(obj) === proto;\n}\nexport function merge(...args) {\n let output = null, items = [...args];\n while (items.length > 0) {\n const nextItem = items.shift();\n if (!output) {\n output = cloneShallow(nextItem);\n }\n else {\n output = mergeObjects(output, nextItem);\n }\n }\n return output;\n}\nfunction mergeObjects(obj1, obj2) {\n const output = cloneShallow(obj1);\n Object.keys(obj2).forEach(key => {\n if (!output.hasOwnProperty(key)) {\n output[key] = obj2[key];\n return;\n }\n if (Array.isArray(obj2[key])) {\n output[key] = Array.isArray(output[key])\n ? [...output[key], ...obj2[key]]\n : [...obj2[key]];\n }\n else if (typeof obj2[key] === \"object\" && !!obj2[key]) {\n output[key] =\n typeof output[key] === \"object\" && !!output[key]\n ? mergeObjects(output[key], obj2[key])\n : cloneShallow(obj2[key]);\n }\n else {\n output[key] = obj2[key];\n }\n });\n return output;\n}\n","export function convertResponseHeaders(headers) {\n const output = {};\n for (const key of headers.keys()) {\n output[key] = headers.get(key);\n }\n return output;\n}\nexport function mergeHeaders(...headerPayloads) {\n if (headerPayloads.length === 0)\n return {};\n const headerKeys = {};\n return headerPayloads.reduce((output, headers) => {\n Object.keys(headers).forEach(header => {\n const lowerHeader = header.toLowerCase();\n if (headerKeys.hasOwnProperty(lowerHeader)) {\n output[headerKeys[lowerHeader]] = headers[header];\n }\n else {\n headerKeys[lowerHeader] = header;\n output[header] = headers[header];\n }\n });\n return output;\n }, {});\n}\n","const hasArrayBuffer = typeof ArrayBuffer === \"function\";\nconst { toString: objToString } = Object.prototype;\n// Taken from: https://github.com/fengyuanchen/is-array-buffer/blob/master/src/index.js\nexport function isArrayBuffer(value) {\n return (hasArrayBuffer &&\n (value instanceof ArrayBuffer || objToString.call(value) === \"[object ArrayBuffer]\"));\n}\n","import { Agent as HTTPAgent } from \"http\";\nimport { Agent as HTTPSAgent } from \"https\";\nimport { fetch } from \"@buttercup/fetch\";\nimport { getPatcher } from \"./compat/patcher.js\";\nimport { isWeb } from \"./compat/env.js\";\nimport { generateDigestAuthHeader, parseDigestAuth } from \"./auth/digest.js\";\nimport { cloneShallow, merge } from \"./tools/merge.js\";\nimport { mergeHeaders } from \"./tools/headers.js\";\nimport { requestDataToFetchBody } from \"./tools/body.js\";\nfunction _request(requestOptions) {\n const patcher = getPatcher();\n return patcher.patchInline(\"request\", (options) => patcher.patchInline(\"fetch\", fetch, options.url, getFetchOptions(options)), requestOptions);\n}\nfunction getFetchOptions(requestOptions) {\n let headers = {};\n // Handle standard options\n const opts = {\n method: requestOptions.method\n };\n if (requestOptions.headers) {\n headers = mergeHeaders(headers, requestOptions.headers);\n }\n if (typeof requestOptions.data !== \"undefined\") {\n const [body, newHeaders] = requestDataToFetchBody(requestOptions.data);\n opts.body = body;\n headers = mergeHeaders(headers, newHeaders);\n }\n if (requestOptions.signal) {\n opts.signal = requestOptions.signal;\n }\n if (requestOptions.withCredentials) {\n opts.credentials = \"include\";\n }\n // Check for node-specific options\n if (!isWeb()) {\n if (requestOptions.httpAgent || requestOptions.httpsAgent) {\n opts.agent = (parsedURL) => {\n if (parsedURL.protocol === \"http:\") {\n return requestOptions.httpAgent || new HTTPAgent();\n }\n return requestOptions.httpsAgent || new HTTPSAgent();\n };\n }\n }\n // Attach headers\n opts.headers = headers;\n return opts;\n}\nexport function prepareRequestOptions(requestOptions, context, userOptions) {\n const finalOptions = cloneShallow(requestOptions);\n finalOptions.headers = mergeHeaders(context.headers, finalOptions.headers || {}, userOptions.headers || {});\n if (typeof userOptions.data !== \"undefined\") {\n finalOptions.data = userOptions.data;\n }\n if (userOptions.signal) {\n finalOptions.signal = userOptions.signal;\n }\n if (context.httpAgent) {\n finalOptions.httpAgent = context.httpAgent;\n }\n if (context.httpsAgent) {\n finalOptions.httpsAgent = context.httpsAgent;\n }\n if (context.digest) {\n finalOptions._digest = context.digest;\n }\n if (typeof context.withCredentials === \"boolean\") {\n finalOptions.withCredentials = context.withCredentials;\n }\n return finalOptions;\n}\nexport async function request(requestOptions) {\n // Client not configured for digest authentication\n if (!requestOptions._digest) {\n return _request(requestOptions);\n }\n // Remove client's digest authentication object from request options\n const _digest = requestOptions._digest;\n delete requestOptions._digest;\n // If client is already using digest authentication, include the digest authorization header\n if (_digest.hasDigestAuth) {\n requestOptions = merge(requestOptions, {\n headers: {\n Authorization: generateDigestAuthHeader(requestOptions, _digest)\n }\n });\n }\n // Perform digest request + check\n const response = await _request(requestOptions);\n if (response.status == 401) {\n _digest.hasDigestAuth = parseDigestAuth(response, _digest);\n if (_digest.hasDigestAuth) {\n requestOptions = merge(requestOptions, {\n headers: {\n Authorization: generateDigestAuthHeader(requestOptions, _digest)\n }\n });\n const response2 = await _request(requestOptions);\n if (response2.status == 401) {\n _digest.hasDigestAuth = false;\n }\n else {\n _digest.nc++;\n }\n return response2;\n }\n }\n else {\n _digest.nc++;\n }\n return response;\n}\n","import Stream from \"stream\";\nimport { isArrayBuffer } from \"../compat/arrayBuffer.js\";\nimport { isBuffer } from \"../compat/buffer.js\";\nimport { isWeb } from \"../compat/env.js\";\nexport function requestDataToFetchBody(data) {\n if (!isWeb() && data instanceof Stream.Readable) {\n // @ts-ignore\n return [data, {}];\n }\n if (typeof data === \"string\") {\n return [data, {}];\n }\n else if (isBuffer(data)) {\n return [data, {}];\n }\n else if (isArrayBuffer(data)) {\n return [data, {}];\n }\n else if (data && typeof data === \"object\") {\n return [\n JSON.stringify(data),\n {\n \"content-type\": \"application/json\"\n }\n ];\n }\n throw new Error(`Unable to convert request body: Unexpected body type: ${typeof data}`);\n}\n","export function isBuffer(value) {\n return (value != null &&\n value.constructor != null &&\n typeof value.constructor.isBuffer === \"function\" &&\n value.constructor.isBuffer(value));\n}\n","import { createClient, getPatcher } from 'webdav';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser, getRequestToken } from '@nextcloud/auth';\nimport { request } from 'webdav/dist/node/request.js';\nexport const rootPath = `/files/${getCurrentUser()?.uid}`;\nexport const defaultRootUrl = generateRemoteUrl('dav' + rootPath);\nexport const getClient = (rootUrl = defaultRootUrl) => {\n const client = createClient(rootUrl, {\n headers: {\n requesttoken: getRequestToken() || '',\n },\n });\n /**\n * Allow to override the METHOD to support dav REPORT\n *\n * @see https://github.com/perry-mitchell/webdav-client/blob/8d9694613c978ce7404e26a401c39a41f125f87f/source/request.ts\n */\n const patcher = getPatcher();\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // https://github.com/perry-mitchell/hot-patcher/issues/6\n patcher.patch('request', (options) => {\n if (options.headers?.method) {\n options.method = options.headers.method;\n delete options.headers.method;\n }\n return request(options);\n });\n return client;\n};\n","/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n","import { CancelablePromise } from 'cancelable-promise';\nimport { File, Folder, davParsePermissions, davGetDefaultPropfind } from '@nextcloud/files';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { getClient, rootPath } from './WebdavClient';\nimport { hashCode } from '../utils/hashUtils';\nimport logger from '../logger';\nconst client = getClient();\nexport const resultToNode = function (node) {\n const props = node.props;\n const permissions = davParsePermissions(props?.permissions);\n const owner = (props['owner-id'] || getCurrentUser()?.uid);\n const source = generateRemoteUrl('dav' + rootPath + node.filename);\n const id = props?.fileid < 0\n ? hashCode(source)\n : props?.fileid || 0;\n const nodeData = {\n id,\n source,\n mtime: new Date(node.lastmod),\n mime: node.mime,\n size: props?.size || 0,\n permissions,\n owner,\n root: rootPath,\n attributes: {\n ...node,\n ...props,\n hasPreview: props?.['has-preview'],\n failed: props?.fileid < 0,\n },\n };\n delete nodeData.attributes.props;\n return node.type === 'file'\n ? new File(nodeData)\n : new Folder(nodeData);\n};\nexport const getContents = (path = '/') => {\n const controller = new AbortController();\n const propfindPayload = davGetDefaultPropfind();\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n onCancel(() => controller.abort());\n try {\n const contentsResponse = await client.getDirectoryContents(path, {\n details: true,\n data: propfindPayload,\n includeSelf: true,\n signal: controller.signal,\n });\n const root = contentsResponse.data[0];\n const contents = contentsResponse.data.slice(1);\n if (root.filename !== path) {\n throw new Error('Root node does not match requested path');\n }\n resolve({\n folder: resultToNode(root),\n contents: contents.map(result => {\n try {\n return resultToNode(result);\n }\n catch (error) {\n logger.error(`Invalid node detected '${result.basename}'`, { error });\n return null;\n }\n }).filter(Boolean),\n });\n }\n catch (error) {\n reject(error);\n }\n });\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nexport const hashCode = function (str) {\n return str.split('').reduce(function (a, b) {\n a = ((a << 5) - a) + b.charCodeAt(0);\n return a & a;\n }, 0);\n};\n","import { Folder, Permission, getDavNameSpaces, getDavProperties } from '@nextcloud/files';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { fetchTags } from './api';\nimport { getClient } from '../../../files/src/services/WebdavClient';\nimport { resultToNode } from '../../../files/src/services/Files';\nconst formatReportPayload = (tagId) => `\n\n\t\n\t\t${getDavProperties()}\n\t\n \n ${tagId}\n \n`;\nconst tagToNode = function (tag) {\n return new Folder({\n id: tag.id,\n source: generateRemoteUrl('dav/systemtags/' + tag.id),\n owner: getCurrentUser()?.uid,\n root: '/systemtags',\n permissions: Permission.READ,\n attributes: {\n ...tag,\n 'is-tag': true,\n },\n });\n};\nexport const getContents = async (path = '/') => {\n // List tags in the root\n const tagsCache = (await fetchTags()).filter(tag => tag.userVisible);\n if (path === '/') {\n return {\n folder: new Folder({\n id: 0,\n source: generateRemoteUrl('dav/systemtags'),\n owner: getCurrentUser()?.uid,\n root: '/systemtags',\n permissions: Permission.NONE,\n }),\n contents: tagsCache.map(tagToNode),\n };\n }\n const tagId = parseInt(path.replace('/', ''), 10);\n const tag = tagsCache.find(tag => tag.id === tagId);\n if (!tag) {\n throw new Error('Tag not found');\n }\n const folder = tagToNode(tag);\n const contentsResponse = await getClient().getDirectoryContents('/', {\n details: true,\n // Only filter favorites if we're at the root\n data: formatReportPayload(tagId),\n headers: {\n // Patched in WebdavClient.ts\n method: 'REPORT',\n },\n });\n return {\n folder,\n contents: contentsResponse.data.map(resultToNode),\n };\n};\n","/**\n * @copyright Copyright (c) 2016 Roeland Jago Douma \n *\n * @author John Molakvoæ \n * @author Roeland Jago Douma \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport './actions/inlineSystemTagsAction.js';\nimport { translate as t } from '@nextcloud/l10n';\nimport { View, getNavigation } from '@nextcloud/files';\nimport TagMultipleSvg from '@mdi/svg/svg/tag-multiple.svg?raw';\nimport { getContents } from './services/systemtags.js';\nconst Navigation = getNavigation();\nNavigation.register(new View({\n id: 'tags',\n name: t('systemtags', 'Tags'),\n caption: t('systemtags', 'List of tags and their associated files and folders.'),\n emptyTitle: t('systemtags', 'No tags found'),\n emptyCaption: t('systemtags', 'Tags you have created will show up here.'),\n icon: TagMultipleSvg,\n order: 25,\n getContents,\n}));\n","/**\n * @copyright 2023 Christopher Ng \n *\n * @author Christopher Ng \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport axios from '@nextcloud/axios';\nimport { generateUrl } from '@nextcloud/router';\nimport { translate as t } from '@nextcloud/l10n';\nimport { davClient } from './davClient.js';\nimport { formatTag, parseIdFromLocation, parseTags } from '../utils';\nimport { logger } from '../logger.js';\nexport const fetchTagsPayload = `\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n`;\nexport const fetchTags = async () => {\n const path = '/systemtags';\n try {\n const { data: tags } = await davClient.getDirectoryContents(path, {\n data: fetchTagsPayload,\n details: true,\n glob: '/systemtags/*', // Filter out first empty tag\n });\n return parseTags(tags);\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to load tags'), { error });\n throw new Error(t('systemtags', 'Failed to load tags'));\n }\n};\nexport const fetchLastUsedTagIds = async () => {\n const url = generateUrl('/apps/systemtags/lastused');\n try {\n const { data: lastUsedTagIds } = await axios.get(url);\n return lastUsedTagIds.map(Number);\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to load last used tags'), { error });\n throw new Error(t('systemtags', 'Failed to load last used tags'));\n }\n};\n/**\n * @return created tag id\n */\nexport const createTag = async (tag) => {\n const path = '/systemtags';\n const tagToPost = formatTag(tag);\n try {\n const { headers } = await davClient.customRequest(path, {\n method: 'POST',\n data: tagToPost,\n });\n const contentLocation = headers.get('content-location');\n if (contentLocation) {\n return parseIdFromLocation(contentLocation);\n }\n logger.error(t('systemtags', 'Missing \"Content-Location\" header'));\n throw new Error(t('systemtags', 'Missing \"Content-Location\" header'));\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to create tag'), { error });\n throw new Error(t('systemtags', 'Failed to create tag'));\n }\n};\nexport const updateTag = async (tag) => {\n const path = '/systemtags/' + tag.id;\n const data = `\n\t\n\t\t\n\t\t\t\n\t\t\t\t${tag.displayName}\n\t\t\t\t${tag.userVisible}\n\t\t\t\t${tag.userAssignable}\n\t\t\t\n\t\t\n\t`;\n try {\n await davClient.customRequest(path, {\n method: 'PROPPATCH',\n data,\n });\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to update tag'), { error });\n throw new Error(t('systemtags', 'Failed to update tag'));\n }\n};\nexport const deleteTag = async (tag) => {\n const path = '/systemtags/' + tag.id;\n try {\n await davClient.deleteFile(path);\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to delete tag'), { error });\n throw new Error(t('systemtags', 'Failed to delete tag'));\n }\n};\n","module.exports = {\n \"100\": \"Continue\",\n \"101\": \"Switching Protocols\",\n \"102\": \"Processing\",\n \"200\": \"OK\",\n \"201\": \"Created\",\n \"202\": \"Accepted\",\n \"203\": \"Non-Authoritative Information\",\n \"204\": \"No Content\",\n \"205\": \"Reset Content\",\n \"206\": \"Partial Content\",\n \"207\": \"Multi-Status\",\n \"208\": \"Already Reported\",\n \"226\": \"IM Used\",\n \"300\": \"Multiple Choices\",\n \"301\": \"Moved Permanently\",\n \"302\": \"Found\",\n \"303\": \"See Other\",\n \"304\": \"Not Modified\",\n \"305\": \"Use Proxy\",\n \"307\": \"Temporary Redirect\",\n \"308\": \"Permanent Redirect\",\n \"400\": \"Bad Request\",\n \"401\": \"Unauthorized\",\n \"402\": \"Payment Required\",\n \"403\": \"Forbidden\",\n \"404\": \"Not Found\",\n \"405\": \"Method Not Allowed\",\n \"406\": \"Not Acceptable\",\n \"407\": \"Proxy Authentication Required\",\n \"408\": \"Request Timeout\",\n \"409\": \"Conflict\",\n \"410\": \"Gone\",\n \"411\": \"Length Required\",\n \"412\": \"Precondition Failed\",\n \"413\": \"Payload Too Large\",\n \"414\": \"URI Too Long\",\n \"415\": \"Unsupported Media Type\",\n \"416\": \"Range Not Satisfiable\",\n \"417\": \"Expectation Failed\",\n \"418\": \"I'm a teapot\",\n \"421\": \"Misdirected Request\",\n \"422\": \"Unprocessable Entity\",\n \"423\": \"Locked\",\n \"424\": \"Failed Dependency\",\n \"425\": \"Unordered Collection\",\n \"426\": \"Upgrade Required\",\n \"428\": \"Precondition Required\",\n \"429\": \"Too Many Requests\",\n \"431\": \"Request Header Fields Too Large\",\n \"451\": \"Unavailable For Legal Reasons\",\n \"500\": \"Internal Server Error\",\n \"501\": \"Not Implemented\",\n \"502\": \"Bad Gateway\",\n \"503\": \"Service Unavailable\",\n \"504\": \"Gateway Timeout\",\n \"505\": \"HTTP Version Not Supported\",\n \"506\": \"Variant Also Negotiates\",\n \"507\": \"Insufficient Storage\",\n \"508\": \"Loop Detected\",\n \"509\": \"Bandwidth Limit Exceeded\",\n \"510\": \"Not Extended\",\n \"511\": \"Network Authentication Required\"\n}\n","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([\"exports\"], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports);\n global.CancelablePromise = mod.exports;\n }\n})(typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : this, function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.CancelablePromise = void 0;\n _exports.cancelable = cancelable;\n _exports.default = void 0;\n _exports.isCancelablePromise = isCancelablePromise;\n\n function _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\n function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\n function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\n function _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\n function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\n function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\n function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }\n\n function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\n\n function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"get\"); return _classApplyDescriptorGet(receiver, descriptor); }\n\n function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }\n\n function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"set\"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }\n\n function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError(\"attempted to \" + action + \" private field on non-instance\"); } return privateMap.get(receiver); }\n\n function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError(\"attempted to set read only private field\"); } descriptor.value = value; } }\n\n var toStringTag = typeof Symbol !== 'undefined' ? Symbol.toStringTag : '@@toStringTag';\n\n var _internals = /*#__PURE__*/new WeakMap();\n\n var _promise = /*#__PURE__*/new WeakMap();\n\n var CancelablePromiseInternal = /*#__PURE__*/function () {\n function CancelablePromiseInternal(_ref) {\n var _ref$executor = _ref.executor,\n executor = _ref$executor === void 0 ? function () {} : _ref$executor,\n _ref$internals = _ref.internals,\n internals = _ref$internals === void 0 ? defaultInternals() : _ref$internals,\n _ref$promise = _ref.promise,\n promise = _ref$promise === void 0 ? new Promise(function (resolve, reject) {\n return executor(resolve, reject, function (onCancel) {\n internals.onCancelList.push(onCancel);\n });\n }) : _ref$promise;\n\n _classCallCheck(this, CancelablePromiseInternal);\n\n _classPrivateFieldInitSpec(this, _internals, {\n writable: true,\n value: void 0\n });\n\n _classPrivateFieldInitSpec(this, _promise, {\n writable: true,\n value: void 0\n });\n\n _defineProperty(this, toStringTag, 'CancelablePromise');\n\n this.cancel = this.cancel.bind(this);\n\n _classPrivateFieldSet(this, _internals, internals);\n\n _classPrivateFieldSet(this, _promise, promise || new Promise(function (resolve, reject) {\n return executor(resolve, reject, function (onCancel) {\n internals.onCancelList.push(onCancel);\n });\n }));\n }\n\n _createClass(CancelablePromiseInternal, [{\n key: \"then\",\n value: function then(onfulfilled, onrejected) {\n return makeCancelable(_classPrivateFieldGet(this, _promise).then(createCallback(onfulfilled, _classPrivateFieldGet(this, _internals)), createCallback(onrejected, _classPrivateFieldGet(this, _internals))), _classPrivateFieldGet(this, _internals));\n }\n }, {\n key: \"catch\",\n value: function _catch(onrejected) {\n return makeCancelable(_classPrivateFieldGet(this, _promise).catch(createCallback(onrejected, _classPrivateFieldGet(this, _internals))), _classPrivateFieldGet(this, _internals));\n }\n }, {\n key: \"finally\",\n value: function _finally(onfinally, runWhenCanceled) {\n var _this = this;\n\n if (runWhenCanceled) {\n _classPrivateFieldGet(this, _internals).onCancelList.push(onfinally);\n }\n\n return makeCancelable(_classPrivateFieldGet(this, _promise).finally(createCallback(function () {\n if (onfinally) {\n if (runWhenCanceled) {\n _classPrivateFieldGet(_this, _internals).onCancelList = _classPrivateFieldGet(_this, _internals).onCancelList.filter(function (callback) {\n return callback !== onfinally;\n });\n }\n\n return onfinally();\n }\n }, _classPrivateFieldGet(this, _internals))), _classPrivateFieldGet(this, _internals));\n }\n }, {\n key: \"cancel\",\n value: function cancel() {\n _classPrivateFieldGet(this, _internals).isCanceled = true;\n\n var callbacks = _classPrivateFieldGet(this, _internals).onCancelList;\n\n _classPrivateFieldGet(this, _internals).onCancelList = [];\n\n var _iterator = _createForOfIteratorHelper(callbacks),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var callback = _step.value;\n\n if (typeof callback === 'function') {\n try {\n callback();\n } catch (err) {\n console.error(err);\n }\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n }, {\n key: \"isCanceled\",\n value: function isCanceled() {\n return _classPrivateFieldGet(this, _internals).isCanceled === true;\n }\n }]);\n\n return CancelablePromiseInternal;\n }();\n\n var CancelablePromise = /*#__PURE__*/function (_CancelablePromiseInt) {\n _inherits(CancelablePromise, _CancelablePromiseInt);\n\n var _super = _createSuper(CancelablePromise);\n\n function CancelablePromise(executor) {\n _classCallCheck(this, CancelablePromise);\n\n return _super.call(this, {\n executor: executor\n });\n }\n\n return _createClass(CancelablePromise);\n }(CancelablePromiseInternal);\n\n _exports.CancelablePromise = CancelablePromise;\n\n _defineProperty(CancelablePromise, \"all\", function all(iterable) {\n return makeAllCancelable(iterable, Promise.all(iterable));\n });\n\n _defineProperty(CancelablePromise, \"allSettled\", function allSettled(iterable) {\n return makeAllCancelable(iterable, Promise.allSettled(iterable));\n });\n\n _defineProperty(CancelablePromise, \"any\", function any(iterable) {\n return makeAllCancelable(iterable, Promise.any(iterable));\n });\n\n _defineProperty(CancelablePromise, \"race\", function race(iterable) {\n return makeAllCancelable(iterable, Promise.race(iterable));\n });\n\n _defineProperty(CancelablePromise, \"resolve\", function resolve(value) {\n return cancelable(Promise.resolve(value));\n });\n\n _defineProperty(CancelablePromise, \"reject\", function reject(reason) {\n return cancelable(Promise.reject(reason));\n });\n\n _defineProperty(CancelablePromise, \"isCancelable\", isCancelablePromise);\n\n var _default = CancelablePromise;\n _exports.default = _default;\n\n function cancelable(promise) {\n return makeCancelable(promise, defaultInternals());\n }\n\n function isCancelablePromise(promise) {\n return promise instanceof CancelablePromise || promise instanceof CancelablePromiseInternal;\n }\n\n function createCallback(onResult, internals) {\n if (onResult) {\n return function (arg) {\n if (!internals.isCanceled) {\n var result = onResult(arg);\n\n if (isCancelablePromise(result)) {\n internals.onCancelList.push(result.cancel);\n }\n\n return result;\n }\n\n return arg;\n };\n }\n }\n\n function makeCancelable(promise, internals) {\n return new CancelablePromiseInternal({\n internals: internals,\n promise: promise\n });\n }\n\n function makeAllCancelable(iterable, promise) {\n var internals = defaultInternals();\n internals.onCancelList.push(function () {\n var _iterator2 = _createForOfIteratorHelper(iterable),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var resolvable = _step2.value;\n\n if (isCancelablePromise(resolvable)) {\n resolvable.cancel();\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n });\n return new CancelablePromiseInternal({\n internals: internals,\n promise: promise\n });\n }\n\n function defaultInternals() {\n return {\n isCanceled: false,\n onCancelList: []\n };\n }\n});\n//# sourceMappingURL=CancelablePromise.js.map","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.files-list__system-tags{--min-size: 32px;display:none;justify-content:center;align-items:center;min-width:calc(var(--min-size)*2);max-width:300px}.files-list__system-tag{padding:5px 10px;border:1px solid;border-radius:var(--border-radius-pill);border-color:var(--color-border);color:var(--color-text-maxcontrast);height:var(--min-size);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:22px;text-align:center}.files-list__system-tag--more{overflow:visible;text-overflow:initial}.files-list__system-tag+.files-list__system-tag{margin-left:5px}@media(min-width: 512px){.files-list__system-tags{display:flex}}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/systemtags/src/css/fileEntryInlineSystemTags.scss\"],\"names\":[],\"mappings\":\"AAsBA,yBACC,gBAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,iCAAA,CACA,eAAA,CAGD,wBACC,gBAAA,CACA,gBAAA,CACA,uCAAA,CACA,gCAAA,CACA,mCAAA,CACA,sBAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CACA,gBAAA,CACA,iBAAA,CAEA,8BACC,gBAAA,CACA,qBAAA,CAID,gDACC,eAAA,CAIF,yBACC,yBACC,YAAA,CAAA\",\"sourcesContent\":[\"/**\\n * @copyright Copyright (c) 2023 Lucas Azevedo \\n *\\n * @author Lucas Azevedo \\n *\\n * @license AGPL-3.0-or-later\\n *\\n * This program is free software: you can redistribute it and/or modify\\n * it under the terms of the GNU Affero General Public License as\\n * published by the Free Software Foundation, either version 3 of the\\n * License, or (at your option) any later version.\\n *\\n * This program is distributed in the hope that it will be useful,\\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n * GNU Affero General Public License for more details.\\n *\\n * You should have received a copy of the GNU Affero General Public License\\n * along with this program. If not, see .\\n *\\n */\\n\\n.files-list__system-tags {\\n\\t--min-size: 32px;\\n\\tdisplay: none;\\n\\tjustify-content: center;\\n\\talign-items: center;\\n\\tmin-width: calc(var(--min-size) * 2);\\n\\tmax-width: 300px;\\n}\\n\\n.files-list__system-tag {\\n\\tpadding: 5px 10px;\\n\\tborder: 1px solid;\\n\\tborder-radius: var(--border-radius-pill);\\n\\tborder-color: var(--color-border);\\n\\tcolor: var(--color-text-maxcontrast);\\n\\theight: var(--min-size);\\n\\twhite-space: nowrap;\\n\\toverflow: hidden;\\n\\ttext-overflow: ellipsis;\\n\\tline-height: 22px; // min-size - 2 * 5px padding\\n\\ttext-align: center;\\n\\n\\t&--more {\\n\\t\\toverflow: visible;\\n\\t\\ttext-overflow: initial;\\n\\t}\\n\\n\\t// Proper spacing if multiple shown\\n\\t& + .files-list__system-tag {\\n\\t\\tmargin-left: 5px;\\n\\t}\\n}\\n\\n@media (min-width: 512px) {\\n\\t.files-list__system-tags {\\n\\t\\tdisplay: flex;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var http = require('http')\nvar url = require('url')\n\nvar https = module.exports\n\nfor (var key in http) {\n if (http.hasOwnProperty(key)) https[key] = http[key]\n}\n\nhttps.request = function (params, cb) {\n params = validateParams(params)\n return http.request.call(this, params, cb)\n}\n\nhttps.get = function (params, cb) {\n params = validateParams(params)\n return http.get.call(this, params, cb)\n}\n\nfunction validateParams (params) {\n if (typeof params === 'string') {\n params = url.parse(params)\n }\n if (!params.protocol) {\n params.protocol = 'https:'\n }\n if (params.protocol !== 'https:') {\n throw new Error('Protocol \"' + params.protocol + '\" not supported. Expected \"https:\"')\n }\n return params\n}\n","exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\nexports.finished = require('./lib/internal/streams/end-of-stream.js');\nexports.pipeline = require('./lib/internal/streams/pipeline.js');\n","var ClientRequest = require('./lib/request')\nvar response = require('./lib/response')\nvar extend = require('xtend')\nvar statusCodes = require('builtin-status-codes')\nvar url = require('url')\n\nvar http = exports\n\nhttp.request = function (opts, cb) {\n\tif (typeof opts === 'string')\n\t\topts = url.parse(opts)\n\telse\n\t\topts = extend(opts)\n\n\t// Normally, the page is loaded from http or https, so not specifying a protocol\n\t// will result in a (valid) protocol-relative url. However, this won't work if\n\t// the protocol is something else, like 'file:'\n\tvar defaultProtocol = global.location.protocol.search(/^https?:$/) === -1 ? 'http:' : ''\n\n\tvar protocol = opts.protocol || defaultProtocol\n\tvar host = opts.hostname || opts.host\n\tvar port = opts.port\n\tvar path = opts.path || '/'\n\n\t// Necessary for IPv6 addresses\n\tif (host && host.indexOf(':') !== -1)\n\t\thost = '[' + host + ']'\n\n\t// This may be a relative url. The browser should always be able to interpret it correctly.\n\topts.url = (host ? (protocol + '//' + host) : '') + (port ? ':' + port : '') + path\n\topts.method = (opts.method || 'GET').toUpperCase()\n\topts.headers = opts.headers || {}\n\n\t// Also valid opts.auth, opts.mode\n\n\tvar req = new ClientRequest(opts)\n\tif (cb)\n\t\treq.on('response', cb)\n\treturn req\n}\n\nhttp.get = function get (opts, cb) {\n\tvar req = http.request(opts, cb)\n\treq.end()\n\treturn req\n}\n\nhttp.ClientRequest = ClientRequest\nhttp.IncomingMessage = response.IncomingMessage\n\nhttp.Agent = function () {}\nhttp.Agent.defaultMaxSockets = 4\n\nhttp.globalAgent = new http.Agent()\n\nhttp.STATUS_CODES = statusCodes\n\nhttp.METHODS = [\n\t'CHECKOUT',\n\t'CONNECT',\n\t'COPY',\n\t'DELETE',\n\t'GET',\n\t'HEAD',\n\t'LOCK',\n\t'M-SEARCH',\n\t'MERGE',\n\t'MKACTIVITY',\n\t'MKCOL',\n\t'MOVE',\n\t'NOTIFY',\n\t'OPTIONS',\n\t'PATCH',\n\t'POST',\n\t'PROPFIND',\n\t'PROPPATCH',\n\t'PURGE',\n\t'PUT',\n\t'REPORT',\n\t'SEARCH',\n\t'SUBSCRIBE',\n\t'TRACE',\n\t'UNLOCK',\n\t'UNSUBSCRIBE'\n]","exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableStream)\n\nexports.writableStream = isFunction(global.WritableStream)\n\nexports.abortController = isFunction(global.AbortController)\n\n// The xhr request to example.com may violate some restrictive CSP configurations,\n// so if we're running in a browser that supports `fetch`, avoid calling getXHR()\n// and assume support for certain features below.\nvar xhr\nfunction getXHR () {\n\t// Cache the xhr value\n\tif (xhr !== undefined) return xhr\n\n\tif (global.XMLHttpRequest) {\n\t\txhr = new global.XMLHttpRequest()\n\t\t// If XDomainRequest is available (ie only, where xhr might not work\n\t\t// cross domain), use the page location. Otherwise use example.com\n\t\t// Note: this doesn't actually make an http request.\n\t\ttry {\n\t\t\txhr.open('GET', global.XDomainRequest ? '/' : 'https://example.com')\n\t\t} catch(e) {\n\t\t\txhr = null\n\t\t}\n\t} else {\n\t\t// Service workers don't have XHR\n\t\txhr = null\n\t}\n\treturn xhr\n}\n\nfunction checkTypeSupport (type) {\n\tvar xhr = getXHR()\n\tif (!xhr) return false\n\ttry {\n\t\txhr.responseType = type\n\t\treturn xhr.responseType === type\n\t} catch (e) {}\n\treturn false\n}\n\n// If fetch is supported, then arraybuffer will be supported too. Skip calling\n// checkTypeSupport(), since that calls getXHR().\nexports.arraybuffer = exports.fetch || checkTypeSupport('arraybuffer')\n\n// These next two tests unavoidably show warnings in Chrome. Since fetch will always\n// be used if it's available, just return false for these to avoid the warnings.\nexports.msstream = !exports.fetch && checkTypeSupport('ms-stream')\nexports.mozchunkedarraybuffer = !exports.fetch && checkTypeSupport('moz-chunked-arraybuffer')\n\n// If fetch is supported, then overrideMimeType will be supported too. Skip calling\n// getXHR().\nexports.overrideMimeType = exports.fetch || (getXHR() ? isFunction(getXHR().overrideMimeType) : false)\n\nfunction isFunction (value) {\n\treturn typeof value === 'function'\n}\n\nxhr = null // Help gc\n","var capability = require('./capability')\nvar inherits = require('inherits')\nvar response = require('./response')\nvar stream = require('readable-stream')\n\nvar IncomingMessage = response.IncomingMessage\nvar rStates = response.readyStates\n\nfunction decideMode (preferBinary, useFetch) {\n\tif (capability.fetch && useFetch) {\n\t\treturn 'fetch'\n\t} else if (capability.mozchunkedarraybuffer) {\n\t\treturn 'moz-chunked-arraybuffer'\n\t} else if (capability.msstream) {\n\t\treturn 'ms-stream'\n\t} else if (capability.arraybuffer && preferBinary) {\n\t\treturn 'arraybuffer'\n\t} else {\n\t\treturn 'text'\n\t}\n}\n\nvar ClientRequest = module.exports = function (opts) {\n\tvar self = this\n\tstream.Writable.call(self)\n\n\tself._opts = opts\n\tself._body = []\n\tself._headers = {}\n\tif (opts.auth)\n\t\tself.setHeader('Authorization', 'Basic ' + Buffer.from(opts.auth).toString('base64'))\n\tObject.keys(opts.headers).forEach(function (name) {\n\t\tself.setHeader(name, opts.headers[name])\n\t})\n\n\tvar preferBinary\n\tvar useFetch = true\n\tif (opts.mode === 'disable-fetch' || ('requestTimeout' in opts && !capability.abortController)) {\n\t\t// If the use of XHR should be preferred. Not typically needed.\n\t\tuseFetch = false\n\t\tpreferBinary = true\n\t} else if (opts.mode === 'prefer-streaming') {\n\t\t// If streaming is a high priority but binary compatibility and\n\t\t// the accuracy of the 'content-type' header aren't\n\t\tpreferBinary = false\n\t} else if (opts.mode === 'allow-wrong-content-type') {\n\t\t// If streaming is more important than preserving the 'content-type' header\n\t\tpreferBinary = !capability.overrideMimeType\n\t} else if (!opts.mode || opts.mode === 'default' || opts.mode === 'prefer-fast') {\n\t\t// Use binary if text streaming may corrupt data or the content-type header, or for speed\n\t\tpreferBinary = true\n\t} else {\n\t\tthrow new Error('Invalid value for opts.mode')\n\t}\n\tself._mode = decideMode(preferBinary, useFetch)\n\tself._fetchTimer = null\n\tself._socketTimeout = null\n\tself._socketTimer = null\n\n\tself.on('finish', function () {\n\t\tself._onFinish()\n\t})\n}\n\ninherits(ClientRequest, stream.Writable)\n\nClientRequest.prototype.setHeader = function (name, value) {\n\tvar self = this\n\tvar lowerName = name.toLowerCase()\n\t// This check is not necessary, but it prevents warnings from browsers about setting unsafe\n\t// headers. To be honest I'm not entirely sure hiding these warnings is a good thing, but\n\t// http-browserify did it, so I will too.\n\tif (unsafeHeaders.indexOf(lowerName) !== -1)\n\t\treturn\n\n\tself._headers[lowerName] = {\n\t\tname: name,\n\t\tvalue: value\n\t}\n}\n\nClientRequest.prototype.getHeader = function (name) {\n\tvar header = this._headers[name.toLowerCase()]\n\tif (header)\n\t\treturn header.value\n\treturn null\n}\n\nClientRequest.prototype.removeHeader = function (name) {\n\tvar self = this\n\tdelete self._headers[name.toLowerCase()]\n}\n\nClientRequest.prototype._onFinish = function () {\n\tvar self = this\n\n\tif (self._destroyed)\n\t\treturn\n\tvar opts = self._opts\n\n\tif ('timeout' in opts && opts.timeout !== 0) {\n\t\tself.setTimeout(opts.timeout)\n\t}\n\n\tvar headersObj = self._headers\n\tvar body = null\n\tif (opts.method !== 'GET' && opts.method !== 'HEAD') {\n body = new Blob(self._body, {\n type: (headersObj['content-type'] || {}).value || ''\n });\n }\n\n\t// create flattened list of headers\n\tvar headersList = []\n\tObject.keys(headersObj).forEach(function (keyName) {\n\t\tvar name = headersObj[keyName].name\n\t\tvar value = headersObj[keyName].value\n\t\tif (Array.isArray(value)) {\n\t\t\tvalue.forEach(function (v) {\n\t\t\t\theadersList.push([name, v])\n\t\t\t})\n\t\t} else {\n\t\t\theadersList.push([name, value])\n\t\t}\n\t})\n\n\tif (self._mode === 'fetch') {\n\t\tvar signal = null\n\t\tif (capability.abortController) {\n\t\t\tvar controller = new AbortController()\n\t\t\tsignal = controller.signal\n\t\t\tself._fetchAbortController = controller\n\n\t\t\tif ('requestTimeout' in opts && opts.requestTimeout !== 0) {\n\t\t\t\tself._fetchTimer = global.setTimeout(function () {\n\t\t\t\t\tself.emit('requestTimeout')\n\t\t\t\t\tif (self._fetchAbortController)\n\t\t\t\t\t\tself._fetchAbortController.abort()\n\t\t\t\t}, opts.requestTimeout)\n\t\t\t}\n\t\t}\n\n\t\tglobal.fetch(self._opts.url, {\n\t\t\tmethod: self._opts.method,\n\t\t\theaders: headersList,\n\t\t\tbody: body || undefined,\n\t\t\tmode: 'cors',\n\t\t\tcredentials: opts.withCredentials ? 'include' : 'same-origin',\n\t\t\tsignal: signal\n\t\t}).then(function (response) {\n\t\t\tself._fetchResponse = response\n\t\t\tself._resetTimers(false)\n\t\t\tself._connect()\n\t\t}, function (reason) {\n\t\t\tself._resetTimers(true)\n\t\t\tif (!self._destroyed)\n\t\t\t\tself.emit('error', reason)\n\t\t})\n\t} else {\n\t\tvar xhr = self._xhr = new global.XMLHttpRequest()\n\t\ttry {\n\t\t\txhr.open(self._opts.method, self._opts.url, true)\n\t\t} catch (err) {\n\t\t\tprocess.nextTick(function () {\n\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t\treturn\n\t\t}\n\n\t\t// Can't set responseType on really old browsers\n\t\tif ('responseType' in xhr)\n\t\t\txhr.responseType = self._mode\n\n\t\tif ('withCredentials' in xhr)\n\t\t\txhr.withCredentials = !!opts.withCredentials\n\n\t\tif (self._mode === 'text' && 'overrideMimeType' in xhr)\n\t\t\txhr.overrideMimeType('text/plain; charset=x-user-defined')\n\n\t\tif ('requestTimeout' in opts) {\n\t\t\txhr.timeout = opts.requestTimeout\n\t\t\txhr.ontimeout = function () {\n\t\t\t\tself.emit('requestTimeout')\n\t\t\t}\n\t\t}\n\n\t\theadersList.forEach(function (header) {\n\t\t\txhr.setRequestHeader(header[0], header[1])\n\t\t})\n\n\t\tself._response = null\n\t\txhr.onreadystatechange = function () {\n\t\t\tswitch (xhr.readyState) {\n\t\t\t\tcase rStates.LOADING:\n\t\t\t\tcase rStates.DONE:\n\t\t\t\t\tself._onXHRProgress()\n\t\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\t// Necessary for streaming in Firefox, since xhr.response is ONLY defined\n\t\t// in onprogress, not in onreadystatechange with xhr.readyState = 3\n\t\tif (self._mode === 'moz-chunked-arraybuffer') {\n\t\t\txhr.onprogress = function () {\n\t\t\t\tself._onXHRProgress()\n\t\t\t}\n\t\t}\n\n\t\txhr.onerror = function () {\n\t\t\tif (self._destroyed)\n\t\t\t\treturn\n\t\t\tself._resetTimers(true)\n\t\t\tself.emit('error', new Error('XHR error'))\n\t\t}\n\n\t\ttry {\n\t\t\txhr.send(body)\n\t\t} catch (err) {\n\t\t\tprocess.nextTick(function () {\n\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t\treturn\n\t\t}\n\t}\n}\n\n/**\n * Checks if xhr.status is readable and non-zero, indicating no error.\n * Even though the spec says it should be available in readyState 3,\n * accessing it throws an exception in IE8\n */\nfunction statusValid (xhr) {\n\ttry {\n\t\tvar status = xhr.status\n\t\treturn (status !== null && status !== 0)\n\t} catch (e) {\n\t\treturn false\n\t}\n}\n\nClientRequest.prototype._onXHRProgress = function () {\n\tvar self = this\n\n\tself._resetTimers(false)\n\n\tif (!statusValid(self._xhr) || self._destroyed)\n\t\treturn\n\n\tif (!self._response)\n\t\tself._connect()\n\n\tself._response._onXHRProgress(self._resetTimers.bind(self))\n}\n\nClientRequest.prototype._connect = function () {\n\tvar self = this\n\n\tif (self._destroyed)\n\t\treturn\n\n\tself._response = new IncomingMessage(self._xhr, self._fetchResponse, self._mode, self._resetTimers.bind(self))\n\tself._response.on('error', function(err) {\n\t\tself.emit('error', err)\n\t})\n\n\tself.emit('response', self._response)\n}\n\nClientRequest.prototype._write = function (chunk, encoding, cb) {\n\tvar self = this\n\n\tself._body.push(chunk)\n\tcb()\n}\n\nClientRequest.prototype._resetTimers = function (done) {\n\tvar self = this\n\n\tglobal.clearTimeout(self._socketTimer)\n\tself._socketTimer = null\n\n\tif (done) {\n\t\tglobal.clearTimeout(self._fetchTimer)\n\t\tself._fetchTimer = null\n\t} else if (self._socketTimeout) {\n\t\tself._socketTimer = global.setTimeout(function () {\n\t\t\tself.emit('timeout')\n\t\t}, self._socketTimeout)\n\t}\n}\n\nClientRequest.prototype.abort = ClientRequest.prototype.destroy = function (err) {\n\tvar self = this\n\tself._destroyed = true\n\tself._resetTimers(true)\n\tif (self._response)\n\t\tself._response._destroyed = true\n\tif (self._xhr)\n\t\tself._xhr.abort()\n\telse if (self._fetchAbortController)\n\t\tself._fetchAbortController.abort()\n\n\tif (err)\n\t\tself.emit('error', err)\n}\n\nClientRequest.prototype.end = function (data, encoding, cb) {\n\tvar self = this\n\tif (typeof data === 'function') {\n\t\tcb = data\n\t\tdata = undefined\n\t}\n\n\tstream.Writable.prototype.end.call(self, data, encoding, cb)\n}\n\nClientRequest.prototype.setTimeout = function (timeout, cb) {\n\tvar self = this\n\n\tif (cb)\n\t\tself.once('timeout', cb)\n\n\tself._socketTimeout = timeout\n\tself._resetTimers(false)\n}\n\nClientRequest.prototype.flushHeaders = function () {}\nClientRequest.prototype.setNoDelay = function () {}\nClientRequest.prototype.setSocketKeepAlive = function () {}\n\n// Taken from http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader%28%29-method\nvar unsafeHeaders = [\n\t'accept-charset',\n\t'accept-encoding',\n\t'access-control-request-headers',\n\t'access-control-request-method',\n\t'connection',\n\t'content-length',\n\t'cookie',\n\t'cookie2',\n\t'date',\n\t'dnt',\n\t'expect',\n\t'host',\n\t'keep-alive',\n\t'origin',\n\t'referer',\n\t'te',\n\t'trailer',\n\t'transfer-encoding',\n\t'upgrade',\n\t'via'\n]\n","var capability = require('./capability')\nvar inherits = require('inherits')\nvar stream = require('readable-stream')\n\nvar rStates = exports.readyStates = {\n\tUNSENT: 0,\n\tOPENED: 1,\n\tHEADERS_RECEIVED: 2,\n\tLOADING: 3,\n\tDONE: 4\n}\n\nvar IncomingMessage = exports.IncomingMessage = function (xhr, response, mode, resetTimers) {\n\tvar self = this\n\tstream.Readable.call(self)\n\n\tself._mode = mode\n\tself.headers = {}\n\tself.rawHeaders = []\n\tself.trailers = {}\n\tself.rawTrailers = []\n\n\t// Fake the 'close' event, but only once 'end' fires\n\tself.on('end', function () {\n\t\t// The nextTick is necessary to prevent the 'request' module from causing an infinite loop\n\t\tprocess.nextTick(function () {\n\t\t\tself.emit('close')\n\t\t})\n\t})\n\n\tif (mode === 'fetch') {\n\t\tself._fetchResponse = response\n\n\t\tself.url = response.url\n\t\tself.statusCode = response.status\n\t\tself.statusMessage = response.statusText\n\t\t\n\t\tresponse.headers.forEach(function (header, key){\n\t\t\tself.headers[key.toLowerCase()] = header\n\t\t\tself.rawHeaders.push(key, header)\n\t\t})\n\n\t\tif (capability.writableStream) {\n\t\t\tvar writable = new WritableStream({\n\t\t\t\twrite: function (chunk) {\n\t\t\t\t\tresetTimers(false)\n\t\t\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\t\t\tif (self._destroyed) {\n\t\t\t\t\t\t\treject()\n\t\t\t\t\t\t} else if(self.push(Buffer.from(chunk))) {\n\t\t\t\t\t\t\tresolve()\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tself._resumeFetch = resolve\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t\tclose: function () {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.push(null)\n\t\t\t\t},\n\t\t\t\tabort: function (err) {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.emit('error', err)\n\t\t\t\t}\n\t\t\t})\n\n\t\t\ttry {\n\t\t\t\tresponse.body.pipeTo(writable).catch(function (err) {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.emit('error', err)\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t} catch (e) {} // pipeTo method isn't defined. Can't find a better way to feature test this\n\t\t}\n\t\t// fallback for when writableStream or pipeTo aren't available\n\t\tvar reader = response.body.getReader()\n\t\tfunction read () {\n\t\t\treader.read().then(function (result) {\n\t\t\t\tif (self._destroyed)\n\t\t\t\t\treturn\n\t\t\t\tresetTimers(result.done)\n\t\t\t\tif (result.done) {\n\t\t\t\t\tself.push(null)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tself.push(Buffer.from(result.value))\n\t\t\t\tread()\n\t\t\t}).catch(function (err) {\n\t\t\t\tresetTimers(true)\n\t\t\t\tif (!self._destroyed)\n\t\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t}\n\t\tread()\n\t} else {\n\t\tself._xhr = xhr\n\t\tself._pos = 0\n\n\t\tself.url = xhr.responseURL\n\t\tself.statusCode = xhr.status\n\t\tself.statusMessage = xhr.statusText\n\t\tvar headers = xhr.getAllResponseHeaders().split(/\\r?\\n/)\n\t\theaders.forEach(function (header) {\n\t\t\tvar matches = header.match(/^([^:]+):\\s*(.*)/)\n\t\t\tif (matches) {\n\t\t\t\tvar key = matches[1].toLowerCase()\n\t\t\t\tif (key === 'set-cookie') {\n\t\t\t\t\tif (self.headers[key] === undefined) {\n\t\t\t\t\t\tself.headers[key] = []\n\t\t\t\t\t}\n\t\t\t\t\tself.headers[key].push(matches[2])\n\t\t\t\t} else if (self.headers[key] !== undefined) {\n\t\t\t\t\tself.headers[key] += ', ' + matches[2]\n\t\t\t\t} else {\n\t\t\t\t\tself.headers[key] = matches[2]\n\t\t\t\t}\n\t\t\t\tself.rawHeaders.push(matches[1], matches[2])\n\t\t\t}\n\t\t})\n\n\t\tself._charset = 'x-user-defined'\n\t\tif (!capability.overrideMimeType) {\n\t\t\tvar mimeType = self.rawHeaders['mime-type']\n\t\t\tif (mimeType) {\n\t\t\t\tvar charsetMatch = mimeType.match(/;\\s*charset=([^;])(;|$)/)\n\t\t\t\tif (charsetMatch) {\n\t\t\t\t\tself._charset = charsetMatch[1].toLowerCase()\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!self._charset)\n\t\t\t\tself._charset = 'utf-8' // best guess\n\t\t}\n\t}\n}\n\ninherits(IncomingMessage, stream.Readable)\n\nIncomingMessage.prototype._read = function () {\n\tvar self = this\n\n\tvar resolve = self._resumeFetch\n\tif (resolve) {\n\t\tself._resumeFetch = null\n\t\tresolve()\n\t}\n}\n\nIncomingMessage.prototype._onXHRProgress = function (resetTimers) {\n\tvar self = this\n\n\tvar xhr = self._xhr\n\n\tvar response = null\n\tswitch (self._mode) {\n\t\tcase 'text':\n\t\t\tresponse = xhr.responseText\n\t\t\tif (response.length > self._pos) {\n\t\t\t\tvar newData = response.substr(self._pos)\n\t\t\t\tif (self._charset === 'x-user-defined') {\n\t\t\t\t\tvar buffer = Buffer.alloc(newData.length)\n\t\t\t\t\tfor (var i = 0; i < newData.length; i++)\n\t\t\t\t\t\tbuffer[i] = newData.charCodeAt(i) & 0xff\n\n\t\t\t\t\tself.push(buffer)\n\t\t\t\t} else {\n\t\t\t\t\tself.push(newData, self._charset)\n\t\t\t\t}\n\t\t\t\tself._pos = response.length\n\t\t\t}\n\t\t\tbreak\n\t\tcase 'arraybuffer':\n\t\t\tif (xhr.readyState !== rStates.DONE || !xhr.response)\n\t\t\t\tbreak\n\t\t\tresponse = xhr.response\n\t\t\tself.push(Buffer.from(new Uint8Array(response)))\n\t\t\tbreak\n\t\tcase 'moz-chunked-arraybuffer': // take whole\n\t\t\tresponse = xhr.response\n\t\t\tif (xhr.readyState !== rStates.LOADING || !response)\n\t\t\t\tbreak\n\t\t\tself.push(Buffer.from(new Uint8Array(response)))\n\t\t\tbreak\n\t\tcase 'ms-stream':\n\t\t\tresponse = xhr.response\n\t\t\tif (xhr.readyState !== rStates.LOADING)\n\t\t\t\tbreak\n\t\t\tvar reader = new global.MSStreamReader()\n\t\t\treader.onprogress = function () {\n\t\t\t\tif (reader.result.byteLength > self._pos) {\n\t\t\t\t\tself.push(Buffer.from(new Uint8Array(reader.result.slice(self._pos))))\n\t\t\t\t\tself._pos = reader.result.byteLength\n\t\t\t\t}\n\t\t\t}\n\t\t\treader.onload = function () {\n\t\t\t\tresetTimers(true)\n\t\t\t\tself.push(null)\n\t\t\t}\n\t\t\t// reader.onerror = ??? // TODO: this\n\t\t\treader.readAsArrayBuffer(response)\n\t\t\tbreak\n\t}\n\n\t// The ms-stream case handles end separately in reader.onload()\n\tif (self._xhr.readyState === rStates.DONE && self._mode !== 'ms-stream') {\n\t\tresetTimers(true)\n\t\tself.push(null)\n\t}\n}\n","module.exports = extend\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key]\n }\n }\n }\n\n return target\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","// The chunk loading function for additional chunks\n// Since all referenced chunks are already included\n// in this file, this function is empty here.\n__webpack_require__.e = () => (Promise.resolve());","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 5191;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t5191: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], () => (__webpack_require__(11057)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","m","e","setApp","build","setUid","uid","Z","DEFAULT","HIDDEN","N","NONE","CREATE","READ","UPDATE","DELETE","SHARE","ALL","j","Y","d","nc","oc","ocs","R","Folder","File","J","t","match","X","id","Error","source","URL","startsWith","mtime","Date","crtime","mime","size","permissions","owner","attributes","root","includes","r","status","Object","values","Q","NEW","FAILED","LOADING","LOCKED","D","_data","_attributes","_knownDavService","constructor","this","s","set","n","i","updateMtime","Reflect","deleteProperty","Proxy","replace","encodedSource","origin","slice","length","basename","extension","dirname","isDavRessource","split","pop","indexOf","pathname","path","fileid","move","rename","ye","type","_e","super","Ie","_column","Ae","title","render","sort","summary","S","O","RegExp","isExist","u","isEmptyObject","keys","merge","o","a","l","f","c","getValue","isName","exec","getAllMatches","startIndex","lastIndex","g","push","nameRegexp","M","Oe","allowBooleanAttributes","unpairedTags","U","G","substr","p","w","z","validate","assign","err","trim","substring","Re","xe","value","index","H","code","msg","line","tagClosed","tagName","tagStartPos","col","Ve","JSON","stringify","map","Ce","Pe","$e","v","Le","hasOwnProperty","Fe","k","re","preserveOrder","attributeNamePrefix","attributesGroupName","textNodeName","ignoreAttributes","removeNSPrefix","parseTagValue","parseAttributeValue","trimValues","cdataPropName","numberParseOptions","hex","leadingZeros","eNotation","tagValueProcessor","attributeValueProcessor","stopNodes","alwaysCreateTextNode","isArray","commentPropName","processEntities","htmlEntities","ignoreDeclaration","ignorePiTags","transformTagName","transformAttributeName","updateTag","buildOptions","defaultOptions","Be","Xe","Ue","Ge","ze","He","Ke","We","je","Ye","Number","parseInt","window","parseFloat","Je","decimalPoint","B","T","tagname","child","add","addChild","tt","entityName","val","regx","entities","rt","skipLike","test","De","search","it","lastEntities","regex","st","options","replaceEntitiesValue","$","ot","charAt","ut","dt","resolveNameSpace","at","y","saveTextToParentTag","lastIndexOf","tagsNodeStack","x","tagExp","attrExpPresent","buildAttributesMap","closeIndex","docTypeEntities","parseTextData","rawTagName","isItStopNode","h","E","readStopNodeData","tagContent","_","lt","ft","ampEntity","ct","ht","data","pt","gt","ne","ie","Nt","bt","Et","Array","prettify","yt","_t","currentNode","apos","quot","space","cent","pound","yen","euro","copyright","reg","inr","addExternalEntities","parseXml","vt","Tt","se","Pt","xt","oe","K","indentBy","suppressUnpairedNode","suppressEmptyNode","endsWith","suppressBooleanAttributes","Ft","format","Vt","oneListGroup","b","isAttribute","attrPrefixLen","St","processTextOrObjNode","Lt","indentate","Rt","tagEndChar","newLine","j2x","buildTextValNode","attrStr","buildObjectNode","repeat","prototype","arrayNodeName","call","buildAttrPairStr","closeTag","W","XMLParser","externalEntities","parse","toString","addEntity","XMLValidator","XMLBuilder","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","getNodeSystemTags","node","tags","undefined","flat","renderTag","tag","isMore","arguments","tagElement","document","createElement","classList","textContent","action","_action","validateAction","displayName","iconSvgInline","enabled","execBatch","order","parent","default","inline","renderInline","nodes","async","systemTagsElement","setAttribute","firstTags","join","lastTag","append","moreTagElement","_nc_dav_properties","_nc_dav_namespaces","find","error","prop","namespaces","registerDavProperty","_nc_fileactions","debug","registerFileAction","rootUrl","generateRemoteUrl","davClient","createClient","headers","requesttoken","getRequestToken","logger","getLoggerBuilder","detectUser","WorkerGlobalScope","self","globalThis","fetch","bind","Headers","Request","Response","HOT_PATCHER_TYPE","NOOP","createNewItem","method","original","methods","final","HotPatcher","_configuration","registry","getEmptyAction","__type__","configuration","newAction","control","target","allowTargetOverrides","forEach","foreignKey","execute","key","args","get","item","result","_this","shift","apply","sequence","isPatched","patch","opts","chain","patchInline","plugin","restore","setFinal","__patcher","NONCE_CHARS","generateDigestAuthHeader","digest","url","uri","toUpperCase","qop","ncString","ha1","algorithm","user","realm","pass","nonce","cnonce","ha1Hash","md5","toLowerCase","ha1Compute","username","password","ha2","digestResponse","authValues","response","opaque","authHeader","obj","getPrototypeOf","proto","isPlainObject","setPrototypeOf","output","items","nextItem","mergeObjects","obj1","obj2","headerPayloads","headerKeys","reduce","header","lowerHeader","hasArrayBuffer","ArrayBuffer","objToString","_request","requestOptions","patcher","body","newHeaders","isBuffer","isArrayBuffer","requestDataToFetchBody","signal","withCredentials","credentials","httpAgent","httpsAgent","agent","parsedURL","protocol","getFetchOptions","rootPath","getCurrentUser","defaultRootUrl","getClient","client","getPatcher","_digest","hasDigestAuth","Authorization","Math","floor","random","makeNonce","parseDigestAuth","response2","request","resultToNode","props","davParsePermissions","filename","charCodeAt","nodeData","lastmod","hasPreview","failed","formatReportPayload","tagId","tagToNode","Permission","_nc_navigation","_views","_currentView","register","remove","findIndex","splice","views","setActive","active","_view","name","columns","caption","getContents","icon","TypeError","Xt","emptyView","sticky","expanded","defaultSortKey","Ut","emptyTitle","emptyCaption","params","tagsCache","getDirectoryContents","details","glob","_ref","fromEntries","entries","_ref2","camelCase","String","parseTags","fetchTags","filter","userVisible","folder","contents","module","exports","_typeof","Symbol","iterator","_exports","_setPrototypeOf","__proto__","_createSuper","Derived","hasNativeReflectConstruct","construct","sham","Boolean","valueOf","_isNativeReflectConstruct","Super","_getPrototypeOf","NewTarget","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_createForOfIteratorHelper","allowArrayLike","minLen","_arrayLikeToArray","from","_unsupportedIterableToArray","F","done","normalCompletion","didErr","step","next","_e2","return","arr","len","arr2","_classCallCheck","instance","Constructor","_defineProperties","descriptor","enumerable","configurable","writable","defineProperty","_createClass","protoProps","staticProps","_defineProperty","_classPrivateFieldInitSpec","privateMap","privateCollection","has","_checkPrivateRedeclaration","_classPrivateFieldGet","receiver","_classApplyDescriptorGet","_classExtractFieldDescriptor","_classPrivateFieldSet","_classApplyDescriptorSet","CancelablePromise","cancelable","isCancelablePromise","toStringTag","_internals","WeakMap","_promise","CancelablePromiseInternal","_ref$executor","executor","_ref$internals","internals","isCanceled","onCancelList","_ref$promise","promise","Promise","resolve","reject","onCancel","cancel","onfulfilled","onrejected","makeCancelable","then","createCallback","catch","onfinally","runWhenCanceled","finally","callback","callbacks","_step","_iterator","console","_CancelablePromiseInt","subClass","superClass","create","_inherits","_super","iterable","makeAllCancelable","all","allSettled","any","race","reason","_default","onResult","arg","_step2","_iterator2","resolvable","___CSS_LOADER_EXPORT___","http","https","validateParams","cb","Stream","Readable","Writable","Duplex","Transform","PassThrough","finished","pipeline","ClientRequest","extend","statusCodes","defaultProtocol","location","host","hostname","port","req","on","end","IncomingMessage","Agent","defaultMaxSockets","globalAgent","STATUS_CODES","METHODS","xhr","getXHR","XMLHttpRequest","open","XDomainRequest","checkTypeSupport","responseType","isFunction","ReadableStream","writableStream","WritableStream","abortController","AbortController","arraybuffer","msstream","mozchunkedarraybuffer","overrideMimeType","capability","inherits","stream","rStates","readyStates","preferBinary","_opts","_body","_headers","auth","setHeader","Buffer","useFetch","mode","_mode","decideMode","_fetchTimer","_socketTimeout","_socketTimer","_onFinish","lowerName","unsafeHeaders","getHeader","removeHeader","_destroyed","timeout","setTimeout","headersObj","Blob","headersList","keyName","controller","_fetchAbortController","requestTimeout","emit","abort","_fetchResponse","_resetTimers","_connect","_xhr","process","nextTick","ontimeout","setRequestHeader","_response","onreadystatechange","readyState","DONE","_onXHRProgress","onprogress","onerror","send","statusValid","_write","chunk","encoding","clearTimeout","destroy","once","flushHeaders","setNoDelay","setSocketKeepAlive","UNSENT","OPENED","HEADERS_RECEIVED","resetTimers","rawHeaders","trailers","rawTrailers","statusCode","statusMessage","statusText","write","_resumeFetch","close","pipeTo","reader","getReader","read","_pos","responseURL","getAllResponseHeaders","matches","_charset","mimeType","charsetMatch","_read","responseText","newData","buffer","alloc","Uint8Array","MSStreamReader","byteLength","onload","readAsArrayBuffer","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","every","getter","__esModule","definition","Function","nmd","paths","children","baseURI","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"systemtags-init.js?v=89c89733fef82c56babe","mappings":";UAAIA,mHC4BJ,MAAwGC,EAAhF,QAAZC,GAAmG,YAAhF,UAAIC,OAAO,SAASC,SAAU,UAAID,OAAO,SAASE,OAAOH,EAAEI,KAAKF,QAApF,IAACF,EA0IRK,EAAoB,CAAEL,IAAOA,EAAEM,QAAU,UAAWN,EAAEO,OAAS,SAAUP,GAArD,CAAyDK,GAAK,CAAC,GAkKnFG,EAAoB,CAAER,IAAOA,EAAEA,EAAES,KAAO,GAAK,OAAQT,EAAEA,EAAEU,OAAS,GAAK,SAAUV,EAAEA,EAAEW,KAAO,GAAK,OAAQX,EAAEA,EAAEY,OAAS,GAAK,SAAUZ,EAA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/index.mjs","webpack://nextcloud/./apps/systemtags/src/css/fileEntryInlineSystemTags.scss?0a01","webpack:///nextcloud/apps/systemtags/src/actions/inlineSystemTagsAction.ts","webpack:///nextcloud/apps/systemtags/src/services/davClient.ts","webpack:///nextcloud/apps/systemtags/src/utils.ts","webpack:///nextcloud/apps/systemtags/src/logger.ts","webpack:///nextcloud/node_modules/@buttercup/fetch/dist/index.browser.js","webpack:///nextcloud/node_modules/hot-patcher/dist/patcher.js","webpack:///nextcloud/node_modules/hot-patcher/dist/functions.js","webpack:///nextcloud/node_modules/webdav/dist/node/compat/patcher.js","webpack:///nextcloud/node_modules/webdav/dist/node/auth/digest.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/crypto.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/merge.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/headers.js","webpack:///nextcloud/node_modules/webdav/dist/node/compat/arrayBuffer.js","webpack:///nextcloud/node_modules/webdav/dist/node/request.js","webpack:///nextcloud/node_modules/webdav/dist/node/tools/body.js","webpack:///nextcloud/node_modules/webdav/dist/node/compat/buffer.js","webpack:///nextcloud/apps/files/src/services/WebdavClient.ts","webpack:///nextcloud/apps/files/src/logger.js","webpack:///nextcloud/apps/files/src/services/Files.ts","webpack:///nextcloud/apps/files/src/utils/hashUtils.ts","webpack:///nextcloud/apps/systemtags/src/services/systemtags.ts","webpack:///nextcloud/apps/systemtags/src/init.ts","webpack:///nextcloud/apps/systemtags/src/services/api.ts","webpack:///nextcloud/node_modules/builtin-status-codes/browser.js","webpack:///nextcloud/node_modules/cancelable-promise/umd/CancelablePromise.js","webpack:///nextcloud/apps/systemtags/src/css/fileEntryInlineSystemTags.scss","webpack:///nextcloud/node_modules/https-browserify/index.js","webpack:///nextcloud/node_modules/readable-stream/readable-browser.js","webpack:///nextcloud/node_modules/stream-http/index.js","webpack:///nextcloud/node_modules/stream-http/lib/capability.js","webpack:///nextcloud/node_modules/stream-http/lib/request.js","webpack:///nextcloud/node_modules/stream-http/lib/response.js","webpack:///nextcloud/node_modules/xtend/immutable.js","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","import { getCurrentUser as A, onRequestTokenUpdate as ue, getRequestToken as de } from \"@nextcloud/auth\";\nimport { getLoggerBuilder as q } from \"@nextcloud/logger\";\nimport { getCanonicalLocale as ae } from \"@nextcloud/l10n\";\nimport { join as le, basename as fe, extname as ce, dirname as I } from \"path\";\nimport { encodePath as he } from \"@nextcloud/paths\";\nimport { generateRemoteUrl as pe } from \"@nextcloud/router\";\nimport { createClient as ge, getPatcher as we } from \"webdav\";\n/**\n * @copyright 2019 Christoph Wurst \n *\n * @author Christoph Wurst \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst me = (e) => e === null ? q().setApp(\"files\").build() : q().setApp(\"files\").setUid(e.uid).build(), m = me(A());\n/**\n * @copyright Copyright (c) 2021 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass Ne {\n _entries = [];\n registerEntry(t) {\n this.validateEntry(t), this._entries.push(t);\n }\n unregisterEntry(t) {\n const r = typeof t == \"string\" ? this.getEntryIndex(t) : this.getEntryIndex(t.id);\n if (r === -1) {\n m.warn(\"Entry not found, nothing removed\", { entry: t, entries: this.getEntries() });\n return;\n }\n this._entries.splice(r, 1);\n }\n /**\n * Get the list of registered entries\n *\n * @param {Folder} context the creation context. Usually the current folder\n */\n getEntries(t) {\n return t ? this._entries.filter((r) => typeof r.enabled == \"function\" ? r.enabled(t) : !0) : this._entries;\n }\n getEntryIndex(t) {\n return this._entries.findIndex((r) => r.id === t);\n }\n validateEntry(t) {\n if (!t.id || !t.displayName || !(t.iconSvgInline || t.iconClass) || !t.handler)\n throw new Error(\"Invalid entry\");\n if (typeof t.id != \"string\" || typeof t.displayName != \"string\")\n throw new Error(\"Invalid id or displayName property\");\n if (t.iconClass && typeof t.iconClass != \"string\" || t.iconSvgInline && typeof t.iconSvgInline != \"string\")\n throw new Error(\"Invalid icon provided\");\n if (t.enabled !== void 0 && typeof t.enabled != \"function\")\n throw new Error(\"Invalid enabled property\");\n if (typeof t.handler != \"function\")\n throw new Error(\"Invalid handler property\");\n if (\"order\" in t && typeof t.order != \"number\")\n throw new Error(\"Invalid order property\");\n if (this.getEntryIndex(t.id) !== -1)\n throw new Error(\"Duplicate entry\");\n }\n}\nconst F = function() {\n return typeof window._nc_newfilemenu > \"u\" && (window._nc_newfilemenu = new Ne(), m.debug(\"NewFileMenu initialized\")), window._nc_newfilemenu;\n};\n/**\n * @copyright 2019 Christoph Wurst \n *\n * @author Christoph Wurst \n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst C = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\"], P = [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\"];\nfunction Yt(e, t = !1, r = !1, s = !1) {\n r = r && !s, typeof e == \"string\" && (e = Number(e));\n let n = e > 0 ? Math.floor(Math.log(e) / Math.log(s ? 1e3 : 1024)) : 0;\n n = Math.min((r ? P.length : C.length) - 1, n);\n const i = r ? P[n] : C[n];\n let d = (e / Math.pow(s ? 1e3 : 1024, n)).toFixed(1);\n return t === !0 && n === 0 ? (d !== \"0.0\" ? \"< 1 \" : \"0 \") + (r ? P[1] : C[1]) : (n < 2 ? d = parseFloat(d).toFixed(0) : d = parseFloat(d).toLocaleString(ae()), d + \" \" + i);\n}\nfunction Jt(e, t = !1) {\n try {\n e = `${e}`.toLocaleLowerCase().replaceAll(/\\s+/g, \"\").replaceAll(\",\", \".\");\n } catch {\n return null;\n }\n const r = e.match(/^([0-9]*(\\.[0-9]*)?)([kmgtp]?)(i?)b?$/);\n if (r === null || r[1] === \".\" || r[1] === \"\")\n return null;\n const s = {\n \"\": 0,\n k: 1,\n m: 2,\n g: 3,\n t: 4,\n p: 5,\n e: 6\n }, n = `${r[1]}`, i = r[4] === \"i\" || t ? 1024 : 1e3;\n return Math.round(Number.parseFloat(n) * i ** s[r[3]]);\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nvar Z = /* @__PURE__ */ ((e) => (e.DEFAULT = \"default\", e.HIDDEN = \"hidden\", e))(Z || {});\nclass Qt {\n _action;\n constructor(t) {\n this.validateAction(t), this._action = t;\n }\n get id() {\n return this._action.id;\n }\n get displayName() {\n return this._action.displayName;\n }\n get title() {\n return this._action.title;\n }\n get iconSvgInline() {\n return this._action.iconSvgInline;\n }\n get enabled() {\n return this._action.enabled;\n }\n get exec() {\n return this._action.exec;\n }\n get execBatch() {\n return this._action.execBatch;\n }\n get order() {\n return this._action.order;\n }\n get parent() {\n return this._action.parent;\n }\n get default() {\n return this._action.default;\n }\n get inline() {\n return this._action.inline;\n }\n get renderInline() {\n return this._action.renderInline;\n }\n validateAction(t) {\n if (!t.id || typeof t.id != \"string\")\n throw new Error(\"Invalid id\");\n if (!t.displayName || typeof t.displayName != \"function\")\n throw new Error(\"Invalid displayName function\");\n if (\"title\" in t && typeof t.title != \"function\")\n throw new Error(\"Invalid title function\");\n if (!t.iconSvgInline || typeof t.iconSvgInline != \"function\")\n throw new Error(\"Invalid iconSvgInline function\");\n if (!t.exec || typeof t.exec != \"function\")\n throw new Error(\"Invalid exec function\");\n if (\"enabled\" in t && typeof t.enabled != \"function\")\n throw new Error(\"Invalid enabled function\");\n if (\"execBatch\" in t && typeof t.execBatch != \"function\")\n throw new Error(\"Invalid execBatch function\");\n if (\"order\" in t && typeof t.order != \"number\")\n throw new Error(\"Invalid order\");\n if (\"parent\" in t && typeof t.parent != \"string\")\n throw new Error(\"Invalid parent\");\n if (t.default && !Object.values(Z).includes(t.default))\n throw new Error(\"Invalid default\");\n if (\"inline\" in t && typeof t.inline != \"function\")\n throw new Error(\"Invalid inline function\");\n if (\"renderInline\" in t && typeof t.renderInline != \"function\")\n throw new Error(\"Invalid renderInline function\");\n }\n}\nconst Dt = function(e) {\n if (typeof window._nc_fileactions > \"u\" && (window._nc_fileactions = [], m.debug(\"FileActions initialized\")), window._nc_fileactions.find((t) => t.id === e.id)) {\n m.error(`FileAction ${e.id} already registered`, { action: e });\n return;\n }\n window._nc_fileactions.push(e);\n}, er = function() {\n return typeof window._nc_fileactions > \"u\" && (window._nc_fileactions = [], m.debug(\"FileActions initialized\")), window._nc_fileactions;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass tr {\n _header;\n constructor(t) {\n this.validateHeader(t), this._header = t;\n }\n get id() {\n return this._header.id;\n }\n get order() {\n return this._header.order;\n }\n get enabled() {\n return this._header.enabled;\n }\n get render() {\n return this._header.render;\n }\n get updated() {\n return this._header.updated;\n }\n validateHeader(t) {\n if (!t.id || !t.render || !t.updated)\n throw new Error(\"Invalid header: id, render and updated are required\");\n if (typeof t.id != \"string\")\n throw new Error(\"Invalid id property\");\n if (t.enabled !== void 0 && typeof t.enabled != \"function\")\n throw new Error(\"Invalid enabled property\");\n if (t.render && typeof t.render != \"function\")\n throw new Error(\"Invalid render property\");\n if (t.updated && typeof t.updated != \"function\")\n throw new Error(\"Invalid updated property\");\n }\n}\nconst rr = function(e) {\n if (typeof window._nc_filelistheader > \"u\" && (window._nc_filelistheader = [], m.debug(\"FileListHeaders initialized\")), window._nc_filelistheader.find((t) => t.id === e.id)) {\n m.error(`Header ${e.id} already registered`, { header: e });\n return;\n }\n window._nc_filelistheader.push(e);\n}, nr = function() {\n return typeof window._nc_filelistheader > \"u\" && (window._nc_filelistheader = [], m.debug(\"FileListHeaders initialized\")), window._nc_filelistheader;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nvar N = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = \"NONE\", e[e.CREATE = 4] = \"CREATE\", e[e.READ = 1] = \"READ\", e[e.UPDATE = 2] = \"UPDATE\", e[e.DELETE = 8] = \"DELETE\", e[e.SHARE = 16] = \"SHARE\", e[e.ALL = 31] = \"ALL\", e))(N || {});\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst j = [\n \"d:getcontentlength\",\n \"d:getcontenttype\",\n \"d:getetag\",\n \"d:getlastmodified\",\n \"d:quota-available-bytes\",\n \"d:resourcetype\",\n \"nc:has-preview\",\n \"nc:is-encrypted\",\n \"nc:mount-type\",\n \"nc:share-attributes\",\n \"oc:comments-unread\",\n \"oc:favorite\",\n \"oc:fileid\",\n \"oc:owner-display-name\",\n \"oc:owner-id\",\n \"oc:permissions\",\n \"oc:share-types\",\n \"oc:size\",\n \"ocs:share-permissions\"\n], Y = {\n d: \"DAV:\",\n nc: \"http://nextcloud.org/ns\",\n oc: \"http://owncloud.org/ns\",\n ocs: \"http://open-collaboration-services.org/ns\"\n}, ir = function(e, t = { nc: \"http://nextcloud.org/ns\" }) {\n typeof window._nc_dav_properties > \"u\" && (window._nc_dav_properties = [...j], window._nc_dav_namespaces = { ...Y });\n const r = { ...window._nc_dav_namespaces, ...t };\n if (window._nc_dav_properties.find((n) => n === e))\n return m.error(`${e} already registered`, { prop: e }), !1;\n if (e.startsWith(\"<\") || e.split(\":\").length !== 2)\n return m.error(`${e} is not valid. See example: 'oc:fileid'`, { prop: e }), !1;\n const s = e.split(\":\")[0];\n return r[s] ? (window._nc_dav_properties.push(e), window._nc_dav_namespaces = r, !0) : (m.error(`${e} namespace unknown`, { prop: e, namespaces: r }), !1);\n}, V = function() {\n return typeof window._nc_dav_properties > \"u\" && (window._nc_dav_properties = [...j]), window._nc_dav_properties.map((e) => `<${e} />`).join(\" \");\n}, L = function() {\n return typeof window._nc_dav_namespaces > \"u\" && (window._nc_dav_namespaces = { ...Y }), Object.keys(window._nc_dav_namespaces).map((e) => `xmlns:${e}=\"${window._nc_dav_namespaces?.[e]}\"`).join(\" \");\n}, sr = function() {\n return `\n\t\t\n\t\t\t\n\t\t\t\t${V()}\n\t\t\t\n\t\t`;\n}, Ee = function() {\n return `\n\t\t\n\t\t\t\n\t\t\t\t${V()}\n\t\t\t\n\t\t\t\n\t\t\t\t1\n\t\t\t\n\t\t`;\n}, or = function(e) {\n return `\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${V()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${A()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${e}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst be = function(e = \"\") {\n let t = N.NONE;\n return e && ((e.includes(\"C\") || e.includes(\"K\")) && (t |= N.CREATE), e.includes(\"G\") && (t |= N.READ), (e.includes(\"W\") || e.includes(\"N\") || e.includes(\"V\")) && (t |= N.UPDATE), e.includes(\"D\") && (t |= N.DELETE), e.includes(\"R\") && (t |= N.SHARE)), t;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nvar R = /* @__PURE__ */ ((e) => (e.Folder = \"folder\", e.File = \"file\", e))(R || {});\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst J = function(e, t) {\n return e.match(t) !== null;\n}, X = (e, t) => {\n if (e.id && typeof e.id != \"number\")\n throw new Error(\"Invalid id type of value\");\n if (!e.source)\n throw new Error(\"Missing mandatory source\");\n try {\n new URL(e.source);\n } catch {\n throw new Error(\"Invalid source format, source must be a valid URL\");\n }\n if (!e.source.startsWith(\"http\"))\n throw new Error(\"Invalid source format, only http(s) is supported\");\n if (e.mtime && !(e.mtime instanceof Date))\n throw new Error(\"Invalid mtime type\");\n if (e.crtime && !(e.crtime instanceof Date))\n throw new Error(\"Invalid crtime type\");\n if (!e.mime || typeof e.mime != \"string\" || !e.mime.match(/^[-\\w.]+\\/[-+\\w.]+$/gi))\n throw new Error(\"Missing or invalid mandatory mime\");\n if (\"size\" in e && typeof e.size != \"number\" && e.size !== void 0)\n throw new Error(\"Invalid size type\");\n if (\"permissions\" in e && e.permissions !== void 0 && !(typeof e.permissions == \"number\" && e.permissions >= N.NONE && e.permissions <= N.ALL))\n throw new Error(\"Invalid permissions\");\n if (e.owner && e.owner !== null && typeof e.owner != \"string\")\n throw new Error(\"Invalid owner type\");\n if (e.attributes && typeof e.attributes != \"object\")\n throw new Error(\"Invalid attributes type\");\n if (e.root && typeof e.root != \"string\")\n throw new Error(\"Invalid root type\");\n if (e.root && !e.root.startsWith(\"/\"))\n throw new Error(\"Root must start with a leading slash\");\n if (e.root && !e.source.includes(e.root))\n throw new Error(\"Root must be part of the source\");\n if (e.root && J(e.source, t)) {\n const r = e.source.match(t)[0];\n if (!e.source.includes(le(r, e.root)))\n throw new Error(\"The root must be relative to the service. e.g /files/emma\");\n }\n if (e.status && !Object.values(Q).includes(e.status))\n throw new Error(\"Status must be a valid NodeStatus\");\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nvar Q = /* @__PURE__ */ ((e) => (e.NEW = \"new\", e.FAILED = \"failed\", e.LOADING = \"loading\", e.LOCKED = \"locked\", e))(Q || {});\nclass D {\n _data;\n _attributes;\n _knownDavService = /(remote|public)\\.php\\/(web)?dav/i;\n constructor(t, r) {\n X(t, r || this._knownDavService), this._data = t;\n const s = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set: (n, i, d) => (this.updateMtime(), Reflect.set(n, i, d)),\n deleteProperty: (n, i) => (this.updateMtime(), Reflect.deleteProperty(n, i))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n };\n this._attributes = new Proxy(t.attributes || {}, s), delete this._data.attributes, r && (this._knownDavService = r);\n }\n /**\n * Get the source url to this object\n */\n get source() {\n return this._data.source.replace(/\\/$/i, \"\");\n }\n /**\n * Get the encoded source url to this object for requests purposes\n */\n get encodedSource() {\n const { origin: t } = new URL(this.source);\n return t + he(this.source.slice(t.length));\n }\n /**\n * Get this object name\n */\n get basename() {\n return fe(this.source);\n }\n /**\n * Get this object's extension\n */\n get extension() {\n return ce(this.source);\n }\n /**\n * Get the directory path leading to this object\n * Will use the relative path to root if available\n */\n get dirname() {\n if (this.root) {\n let r = this.source;\n this.isDavRessource && (r = r.split(this._knownDavService).pop());\n const s = r.indexOf(this.root), n = this.root.replace(/\\/$/, \"\");\n return I(r.slice(s + n.length) || \"/\");\n }\n const t = new URL(this.source);\n return I(t.pathname);\n }\n /**\n * Get the file mime\n */\n get mime() {\n return this._data.mime;\n }\n /**\n * Get the file modification time\n */\n get mtime() {\n return this._data.mtime;\n }\n /**\n * Get the file creation time\n */\n get crtime() {\n return this._data.crtime;\n }\n /**\n * Get the file size\n */\n get size() {\n return this._data.size;\n }\n /**\n * Get the file attribute\n */\n get attributes() {\n return this._attributes;\n }\n /**\n * Get the file permissions\n */\n get permissions() {\n return this.owner === null && !this.isDavRessource ? N.READ : this._data.permissions !== void 0 ? this._data.permissions : N.NONE;\n }\n /**\n * Get the file owner\n */\n get owner() {\n return this.isDavRessource ? this._data.owner : null;\n }\n /**\n * Is this a dav-related ressource ?\n */\n get isDavRessource() {\n return J(this.source, this._knownDavService);\n }\n /**\n * Get the dav root of this object\n */\n get root() {\n return this._data.root ? this._data.root.replace(/^(.+)\\/$/, \"$1\") : this.isDavRessource && I(this.source).split(this._knownDavService).pop() || null;\n }\n /**\n * Get the absolute path of this object relative to the root\n */\n get path() {\n if (this.root) {\n let t = this.source;\n this.isDavRessource && (t = t.split(this._knownDavService).pop());\n const r = t.indexOf(this.root), s = this.root.replace(/\\/$/, \"\");\n return t.slice(r + s.length) || \"/\";\n }\n return (this.dirname + \"/\" + this.basename).replace(/\\/\\//g, \"/\");\n }\n /**\n * Get the node id if defined.\n * Will look for the fileid in attributes if undefined.\n */\n get fileid() {\n return this._data?.id || this.attributes?.fileid;\n }\n /**\n * Get the node status.\n */\n get status() {\n return this._data?.status;\n }\n /**\n * Set the node status.\n */\n set status(t) {\n this._data.status = t;\n }\n /**\n * Move the node to a new destination\n *\n * @param {string} destination the new source.\n * e.g. https://cloud.domain.com/remote.php/dav/files/emma/Photos/picture.jpg\n */\n move(t) {\n X({ ...this._data, source: t }, this._knownDavService), this._data.source = t, this.updateMtime();\n }\n /**\n * Rename the node\n * This aliases the move method for easier usage\n *\n * @param basename The new name of the node\n */\n rename(t) {\n if (t.includes(\"/\"))\n throw new Error(\"Invalid basename\");\n this.move(I(this.source) + \"/\" + t);\n }\n /**\n * Update the mtime if exists.\n */\n updateMtime() {\n this._data.mtime && (this._data.mtime = /* @__PURE__ */ new Date());\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass ye extends D {\n get type() {\n return R.File;\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass _e extends D {\n constructor(t) {\n super({\n ...t,\n mime: \"httpd/unix-directory\"\n });\n }\n get type() {\n return R.Folder;\n }\n get extension() {\n return null;\n }\n get mime() {\n return \"httpd/unix-directory\";\n }\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst ee = `/files/${A()?.uid}`, te = pe(\"dav\"), ur = function(e = te, t = {}) {\n const r = ge(e, { headers: t });\n function s(i) {\n r.setHeaders({\n ...t,\n // Add this so the server knows it is an request from the browser\n \"X-Requested-With\": \"XMLHttpRequest\",\n // Inject user auth\n requesttoken: i ?? \"\"\n });\n }\n return ue(s), s(de()), we().patch(\"fetch\", (i, d) => {\n const u = d.headers;\n return u?.method && (d.method = u.method, delete u.method), fetch(i, d);\n }), r;\n}, dr = async (e, t = \"/\", r = ee) => (await e.getDirectoryContents(`${r}${t}`, {\n details: !0,\n data: Ee(),\n headers: {\n // see davGetClient for patched webdav client\n method: \"REPORT\"\n },\n includeSelf: !0\n})).data.filter((n) => n.filename !== t).map((n) => ve(n, r)), ve = function(e, t = ee, r = te) {\n const s = e.props, n = be(s?.permissions), i = s?.[\"owner-id\"] || A()?.uid, d = {\n id: s?.fileid || 0,\n source: `${r}${e.filename}`,\n mtime: new Date(Date.parse(e.lastmod)),\n mime: e.mime,\n size: s?.size || Number.parseInt(s.getcontentlength || \"0\"),\n permissions: n,\n owner: i,\n root: t,\n attributes: {\n ...e,\n ...s,\n hasPreview: s?.[\"has-preview\"]\n }\n };\n return delete d.attributes?.props, e.type === \"file\" ? new ye(d) : new _e(d);\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass Te {\n _views = [];\n _currentView = null;\n register(t) {\n if (this._views.find((r) => r.id === t.id))\n throw new Error(`View id ${t.id} is already registered`);\n this._views.push(t);\n }\n remove(t) {\n const r = this._views.findIndex((s) => s.id === t);\n r !== -1 && this._views.splice(r, 1);\n }\n get views() {\n return this._views;\n }\n setActive(t) {\n this._currentView = t;\n }\n get active() {\n return this._currentView;\n }\n}\nconst ar = function() {\n return typeof window._nc_navigation > \"u\" && (window._nc_navigation = new Te(), m.debug(\"Navigation service initialized\")), window._nc_navigation;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass Ie {\n _column;\n constructor(t) {\n Ae(t), this._column = t;\n }\n get id() {\n return this._column.id;\n }\n get title() {\n return this._column.title;\n }\n get render() {\n return this._column.render;\n }\n get sort() {\n return this._column.sort;\n }\n get summary() {\n return this._column.summary;\n }\n}\nconst Ae = function(e) {\n if (!e.id || typeof e.id != \"string\")\n throw new Error(\"A column id is required\");\n if (!e.title || typeof e.title != \"string\")\n throw new Error(\"A column title is required\");\n if (!e.render || typeof e.render != \"function\")\n throw new Error(\"A render function is required\");\n if (e.sort && typeof e.sort != \"function\")\n throw new Error(\"Column sortFunction must be a function\");\n if (e.summary && typeof e.summary != \"function\")\n throw new Error(\"Column summary must be a function\");\n return !0;\n};\nvar S = {}, O = {};\n(function(e) {\n const t = \":A-Za-z_\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\", r = t + \"\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\", s = \"[\" + t + \"][\" + r + \"]*\", n = new RegExp(\"^\" + s + \"$\"), i = function(u, o) {\n const a = [];\n let l = o.exec(u);\n for (; l; ) {\n const f = [];\n f.startIndex = o.lastIndex - l[0].length;\n const c = l.length;\n for (let g = 0; g < c; g++)\n f.push(l[g]);\n a.push(f), l = o.exec(u);\n }\n return a;\n }, d = function(u) {\n const o = n.exec(u);\n return !(o === null || typeof o > \"u\");\n };\n e.isExist = function(u) {\n return typeof u < \"u\";\n }, e.isEmptyObject = function(u) {\n return Object.keys(u).length === 0;\n }, e.merge = function(u, o, a) {\n if (o) {\n const l = Object.keys(o), f = l.length;\n for (let c = 0; c < f; c++)\n a === \"strict\" ? u[l[c]] = [o[l[c]]] : u[l[c]] = o[l[c]];\n }\n }, e.getValue = function(u) {\n return e.isExist(u) ? u : \"\";\n }, e.isName = d, e.getAllMatches = i, e.nameRegexp = s;\n})(O);\nconst M = O, Oe = {\n allowBooleanAttributes: !1,\n //A tag can have attributes without any value\n unpairedTags: []\n};\nS.validate = function(e, t) {\n t = Object.assign({}, Oe, t);\n const r = [];\n let s = !1, n = !1;\n e[0] === \"\\uFEFF\" && (e = e.substr(1));\n for (let i = 0; i < e.length; i++)\n if (e[i] === \"<\" && e[i + 1] === \"?\") {\n if (i += 2, i = G(e, i), i.err)\n return i;\n } else if (e[i] === \"<\") {\n let d = i;\n if (i++, e[i] === \"!\") {\n i = z(e, i);\n continue;\n } else {\n let u = !1;\n e[i] === \"/\" && (u = !0, i++);\n let o = \"\";\n for (; i < e.length && e[i] !== \">\" && e[i] !== \" \" && e[i] !== \"\t\" && e[i] !== `\n` && e[i] !== \"\\r\"; i++)\n o += e[i];\n if (o = o.trim(), o[o.length - 1] === \"/\" && (o = o.substring(0, o.length - 1), i--), !Re(o)) {\n let f;\n return o.trim().length === 0 ? f = \"Invalid space after '<'.\" : f = \"Tag '\" + o + \"' is an invalid name.\", p(\"InvalidTag\", f, w(e, i));\n }\n const a = xe(e, i);\n if (a === !1)\n return p(\"InvalidAttr\", \"Attributes for '\" + o + \"' have open quote.\", w(e, i));\n let l = a.value;\n if (i = a.index, l[l.length - 1] === \"/\") {\n const f = i - l.length;\n l = l.substring(0, l.length - 1);\n const c = H(l, t);\n if (c === !0)\n s = !0;\n else\n return p(c.err.code, c.err.msg, w(e, f + c.err.line));\n } else if (u)\n if (a.tagClosed) {\n if (l.trim().length > 0)\n return p(\"InvalidTag\", \"Closing tag '\" + o + \"' can't have attributes or invalid starting.\", w(e, d));\n {\n const f = r.pop();\n if (o !== f.tagName) {\n let c = w(e, f.tagStartPos);\n return p(\n \"InvalidTag\",\n \"Expected closing tag '\" + f.tagName + \"' (opened in line \" + c.line + \", col \" + c.col + \") instead of closing tag '\" + o + \"'.\",\n w(e, d)\n );\n }\n r.length == 0 && (n = !0);\n }\n } else\n return p(\"InvalidTag\", \"Closing tag '\" + o + \"' doesn't have proper closing.\", w(e, i));\n else {\n const f = H(l, t);\n if (f !== !0)\n return p(f.err.code, f.err.msg, w(e, i - l.length + f.err.line));\n if (n === !0)\n return p(\"InvalidXml\", \"Multiple possible root nodes found.\", w(e, i));\n t.unpairedTags.indexOf(o) !== -1 || r.push({ tagName: o, tagStartPos: d }), s = !0;\n }\n for (i++; i < e.length; i++)\n if (e[i] === \"<\")\n if (e[i + 1] === \"!\") {\n i++, i = z(e, i);\n continue;\n } else if (e[i + 1] === \"?\") {\n if (i = G(e, ++i), i.err)\n return i;\n } else\n break;\n else if (e[i] === \"&\") {\n const f = Ve(e, i);\n if (f == -1)\n return p(\"InvalidChar\", \"char '&' is not expected.\", w(e, i));\n i = f;\n } else if (n === !0 && !U(e[i]))\n return p(\"InvalidXml\", \"Extra text at the end\", w(e, i));\n e[i] === \"<\" && i--;\n }\n } else {\n if (U(e[i]))\n continue;\n return p(\"InvalidChar\", \"char '\" + e[i] + \"' is not expected.\", w(e, i));\n }\n if (s) {\n if (r.length == 1)\n return p(\"InvalidTag\", \"Unclosed tag '\" + r[0].tagName + \"'.\", w(e, r[0].tagStartPos));\n if (r.length > 0)\n return p(\"InvalidXml\", \"Invalid '\" + JSON.stringify(r.map((i) => i.tagName), null, 4).replace(/\\r?\\n/g, \"\") + \"' found.\", { line: 1, col: 1 });\n } else\n return p(\"InvalidXml\", \"Start tag expected.\", 1);\n return !0;\n};\nfunction U(e) {\n return e === \" \" || e === \"\t\" || e === `\n` || e === \"\\r\";\n}\nfunction G(e, t) {\n const r = t;\n for (; t < e.length; t++)\n if (e[t] == \"?\" || e[t] == \" \") {\n const s = e.substr(r, t - r);\n if (t > 5 && s === \"xml\")\n return p(\"InvalidXml\", \"XML declaration allowed only at the start of the document.\", w(e, t));\n if (e[t] == \"?\" && e[t + 1] == \">\") {\n t++;\n break;\n } else\n continue;\n }\n return t;\n}\nfunction z(e, t) {\n if (e.length > t + 5 && e[t + 1] === \"-\" && e[t + 2] === \"-\") {\n for (t += 3; t < e.length; t++)\n if (e[t] === \"-\" && e[t + 1] === \"-\" && e[t + 2] === \">\") {\n t += 2;\n break;\n }\n } else if (e.length > t + 8 && e[t + 1] === \"D\" && e[t + 2] === \"O\" && e[t + 3] === \"C\" && e[t + 4] === \"T\" && e[t + 5] === \"Y\" && e[t + 6] === \"P\" && e[t + 7] === \"E\") {\n let r = 1;\n for (t += 8; t < e.length; t++)\n if (e[t] === \"<\")\n r++;\n else if (e[t] === \">\" && (r--, r === 0))\n break;\n } else if (e.length > t + 9 && e[t + 1] === \"[\" && e[t + 2] === \"C\" && e[t + 3] === \"D\" && e[t + 4] === \"A\" && e[t + 5] === \"T\" && e[t + 6] === \"A\" && e[t + 7] === \"[\") {\n for (t += 8; t < e.length; t++)\n if (e[t] === \"]\" && e[t + 1] === \"]\" && e[t + 2] === \">\") {\n t += 2;\n break;\n }\n }\n return t;\n}\nconst Ce = '\"', Pe = \"'\";\nfunction xe(e, t) {\n let r = \"\", s = \"\", n = !1;\n for (; t < e.length; t++) {\n if (e[t] === Ce || e[t] === Pe)\n s === \"\" ? s = e[t] : s !== e[t] || (s = \"\");\n else if (e[t] === \">\" && s === \"\") {\n n = !0;\n break;\n }\n r += e[t];\n }\n return s !== \"\" ? !1 : {\n value: r,\n index: t,\n tagClosed: n\n };\n}\nconst $e = new RegExp(`(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*(['\"])(([\\\\s\\\\S])*?)\\\\5)?`, \"g\");\nfunction H(e, t) {\n const r = M.getAllMatches(e, $e), s = {};\n for (let n = 0; n < r.length; n++) {\n if (r[n][1].length === 0)\n return p(\"InvalidAttr\", \"Attribute '\" + r[n][2] + \"' has no space in starting.\", v(r[n]));\n if (r[n][3] !== void 0 && r[n][4] === void 0)\n return p(\"InvalidAttr\", \"Attribute '\" + r[n][2] + \"' is without value.\", v(r[n]));\n if (r[n][3] === void 0 && !t.allowBooleanAttributes)\n return p(\"InvalidAttr\", \"boolean attribute '\" + r[n][2] + \"' is not allowed.\", v(r[n]));\n const i = r[n][2];\n if (!Le(i))\n return p(\"InvalidAttr\", \"Attribute '\" + i + \"' is an invalid name.\", v(r[n]));\n if (!s.hasOwnProperty(i))\n s[i] = 1;\n else\n return p(\"InvalidAttr\", \"Attribute '\" + i + \"' is repeated.\", v(r[n]));\n }\n return !0;\n}\nfunction Fe(e, t) {\n let r = /\\d/;\n for (e[t] === \"x\" && (t++, r = /[\\da-fA-F]/); t < e.length; t++) {\n if (e[t] === \";\")\n return t;\n if (!e[t].match(r))\n break;\n }\n return -1;\n}\nfunction Ve(e, t) {\n if (t++, e[t] === \";\")\n return -1;\n if (e[t] === \"#\")\n return t++, Fe(e, t);\n let r = 0;\n for (; t < e.length; t++, r++)\n if (!(e[t].match(/\\w/) && r < 20)) {\n if (e[t] === \";\")\n break;\n return -1;\n }\n return t;\n}\nfunction p(e, t, r) {\n return {\n err: {\n code: e,\n msg: t,\n line: r.line || r,\n col: r.col\n }\n };\n}\nfunction Le(e) {\n return M.isName(e);\n}\nfunction Re(e) {\n return M.isName(e);\n}\nfunction w(e, t) {\n const r = e.substring(0, t).split(/\\r?\\n/);\n return {\n line: r.length,\n // column number is last line's length + 1, because column numbering starts at 1:\n col: r[r.length - 1].length + 1\n };\n}\nfunction v(e) {\n return e.startIndex + e[1].length;\n}\nvar k = {};\nconst re = {\n preserveOrder: !1,\n attributeNamePrefix: \"@_\",\n attributesGroupName: !1,\n textNodeName: \"#text\",\n ignoreAttributes: !0,\n removeNSPrefix: !1,\n // remove NS from tag name or attribute name if true\n allowBooleanAttributes: !1,\n //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseTagValue: !0,\n parseAttributeValue: !1,\n trimValues: !0,\n //Trim string values of tag and attributes\n cdataPropName: !1,\n numberParseOptions: {\n hex: !0,\n leadingZeros: !0,\n eNotation: !0\n },\n tagValueProcessor: function(e, t) {\n return t;\n },\n attributeValueProcessor: function(e, t) {\n return t;\n },\n stopNodes: [],\n //nested tags will not be parsed even for errors\n alwaysCreateTextNode: !1,\n isArray: () => !1,\n commentPropName: !1,\n unpairedTags: [],\n processEntities: !0,\n htmlEntities: !1,\n ignoreDeclaration: !1,\n ignorePiTags: !1,\n transformTagName: !1,\n transformAttributeName: !1,\n updateTag: function(e, t, r) {\n return e;\n }\n // skipEmptyListItem: false\n}, Se = function(e) {\n return Object.assign({}, re, e);\n};\nk.buildOptions = Se;\nk.defaultOptions = re;\nclass Me {\n constructor(t) {\n this.tagname = t, this.child = [], this[\":@\"] = {};\n }\n add(t, r) {\n t === \"__proto__\" && (t = \"#__proto__\"), this.child.push({ [t]: r });\n }\n addChild(t) {\n t.tagname === \"__proto__\" && (t.tagname = \"#__proto__\"), t[\":@\"] && Object.keys(t[\":@\"]).length > 0 ? this.child.push({ [t.tagname]: t.child, \":@\": t[\":@\"] }) : this.child.push({ [t.tagname]: t.child });\n }\n}\nvar ke = Me;\nconst Be = O;\nfunction qe(e, t) {\n const r = {};\n if (e[t + 3] === \"O\" && e[t + 4] === \"C\" && e[t + 5] === \"T\" && e[t + 6] === \"Y\" && e[t + 7] === \"P\" && e[t + 8] === \"E\") {\n t = t + 9;\n let s = 1, n = !1, i = !1, d = \"\";\n for (; t < e.length; t++)\n if (e[t] === \"<\" && !i) {\n if (n && Ge(e, t))\n t += 7, [entityName, val, t] = Xe(e, t + 1), val.indexOf(\"&\") === -1 && (r[We(entityName)] = {\n regx: RegExp(`&${entityName};`, \"g\"),\n val\n });\n else if (n && ze(e, t))\n t += 8;\n else if (n && He(e, t))\n t += 8;\n else if (n && Ke(e, t))\n t += 9;\n else if (Ue)\n i = !0;\n else\n throw new Error(\"Invalid DOCTYPE\");\n s++, d = \"\";\n } else if (e[t] === \">\") {\n if (i ? e[t - 1] === \"-\" && e[t - 2] === \"-\" && (i = !1, s--) : s--, s === 0)\n break;\n } else\n e[t] === \"[\" ? n = !0 : d += e[t];\n if (s !== 0)\n throw new Error(\"Unclosed DOCTYPE\");\n } else\n throw new Error(\"Invalid Tag instead of DOCTYPE\");\n return { entities: r, i: t };\n}\nfunction Xe(e, t) {\n let r = \"\";\n for (; t < e.length && e[t] !== \"'\" && e[t] !== '\"'; t++)\n r += e[t];\n if (r = r.trim(), r.indexOf(\" \") !== -1)\n throw new Error(\"External entites are not supported\");\n const s = e[t++];\n let n = \"\";\n for (; t < e.length && e[t] !== s; t++)\n n += e[t];\n return [r, n, t];\n}\nfunction Ue(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"-\" && e[t + 3] === \"-\";\n}\nfunction Ge(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"E\" && e[t + 3] === \"N\" && e[t + 4] === \"T\" && e[t + 5] === \"I\" && e[t + 6] === \"T\" && e[t + 7] === \"Y\";\n}\nfunction ze(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"E\" && e[t + 3] === \"L\" && e[t + 4] === \"E\" && e[t + 5] === \"M\" && e[t + 6] === \"E\" && e[t + 7] === \"N\" && e[t + 8] === \"T\";\n}\nfunction He(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"A\" && e[t + 3] === \"T\" && e[t + 4] === \"T\" && e[t + 5] === \"L\" && e[t + 6] === \"I\" && e[t + 7] === \"S\" && e[t + 8] === \"T\";\n}\nfunction Ke(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"N\" && e[t + 3] === \"O\" && e[t + 4] === \"T\" && e[t + 5] === \"A\" && e[t + 6] === \"T\" && e[t + 7] === \"I\" && e[t + 8] === \"O\" && e[t + 9] === \"N\";\n}\nfunction We(e) {\n if (Be.isName(e))\n return e;\n throw new Error(`Invalid entity name ${e}`);\n}\nvar Ze = qe;\nconst je = /^[-+]?0x[a-fA-F0-9]+$/, Ye = /^([\\-\\+])?(0*)(\\.[0-9]+([eE]\\-?[0-9]+)?|[0-9]+(\\.[0-9]+([eE]\\-?[0-9]+)?)?)$/;\n!Number.parseInt && window.parseInt && (Number.parseInt = window.parseInt);\n!Number.parseFloat && window.parseFloat && (Number.parseFloat = window.parseFloat);\nconst Je = {\n hex: !0,\n leadingZeros: !0,\n decimalPoint: \".\",\n eNotation: !0\n //skipLike: /regex/\n};\nfunction Qe(e, t = {}) {\n if (t = Object.assign({}, Je, t), !e || typeof e != \"string\")\n return e;\n let r = e.trim();\n if (t.skipLike !== void 0 && t.skipLike.test(r))\n return e;\n if (t.hex && je.test(r))\n return Number.parseInt(r, 16);\n {\n const s = Ye.exec(r);\n if (s) {\n const n = s[1], i = s[2];\n let d = De(s[3]);\n const u = s[4] || s[6];\n if (!t.leadingZeros && i.length > 0 && n && r[2] !== \".\")\n return e;\n if (!t.leadingZeros && i.length > 0 && !n && r[1] !== \".\")\n return e;\n {\n const o = Number(r), a = \"\" + o;\n return a.search(/[eE]/) !== -1 || u ? t.eNotation ? o : e : r.indexOf(\".\") !== -1 ? a === \"0\" && d === \"\" || a === d || n && a === \"-\" + d ? o : e : i ? d === a || n + d === a ? o : e : r === a || r === n + a ? o : e;\n }\n } else\n return e;\n }\n}\nfunction De(e) {\n return e && e.indexOf(\".\") !== -1 && (e = e.replace(/0+$/, \"\"), e === \".\" ? e = \"0\" : e[0] === \".\" ? e = \"0\" + e : e[e.length - 1] === \".\" && (e = e.substr(0, e.length - 1))), e;\n}\nvar et = Qe;\nconst B = O, T = ke, tt = Ze, rt = et;\n\"<((!\\\\[CDATA\\\\[([\\\\s\\\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\\\/)(NAME)\\\\s*>))([^<]*)\".replace(/NAME/g, B.nameRegexp);\nlet nt = class {\n constructor(t) {\n this.options = t, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = {\n apos: { regex: /&(apos|#39|#x27);/g, val: \"'\" },\n gt: { regex: /&(gt|#62|#x3E);/g, val: \">\" },\n lt: { regex: /&(lt|#60|#x3C);/g, val: \"<\" },\n quot: { regex: /&(quot|#34|#x22);/g, val: '\"' }\n }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: \"&\" }, this.htmlEntities = {\n space: { regex: /&(nbsp|#160);/g, val: \" \" },\n // \"lt\" : { regex: /&(lt|#60);/g, val: \"<\" },\n // \"gt\" : { regex: /&(gt|#62);/g, val: \">\" },\n // \"amp\" : { regex: /&(amp|#38);/g, val: \"&\" },\n // \"quot\" : { regex: /&(quot|#34);/g, val: \"\\\"\" },\n // \"apos\" : { regex: /&(apos|#39);/g, val: \"'\" },\n cent: { regex: /&(cent|#162);/g, val: \"¢\" },\n pound: { regex: /&(pound|#163);/g, val: \"£\" },\n yen: { regex: /&(yen|#165);/g, val: \"¥\" },\n euro: { regex: /&(euro|#8364);/g, val: \"€\" },\n copyright: { regex: /&(copy|#169);/g, val: \"©\" },\n reg: { regex: /&(reg|#174);/g, val: \"®\" },\n inr: { regex: /&(inr|#8377);/g, val: \"₹\" }\n }, this.addExternalEntities = it, this.parseXml = at, this.parseTextData = st, this.resolveNameSpace = ot, this.buildAttributesMap = dt, this.isItStopNode = ht, this.replaceEntitiesValue = ft, this.readStopNodeData = gt, this.saveTextToParentTag = ct, this.addChild = lt;\n }\n};\nfunction it(e) {\n const t = Object.keys(e);\n for (let r = 0; r < t.length; r++) {\n const s = t[r];\n this.lastEntities[s] = {\n regex: new RegExp(\"&\" + s + \";\", \"g\"),\n val: e[s]\n };\n }\n}\nfunction st(e, t, r, s, n, i, d) {\n if (e !== void 0 && (this.options.trimValues && !s && (e = e.trim()), e.length > 0)) {\n d || (e = this.replaceEntitiesValue(e));\n const u = this.options.tagValueProcessor(t, e, r, n, i);\n return u == null ? e : typeof u != typeof e || u !== e ? u : this.options.trimValues ? $(e, this.options.parseTagValue, this.options.numberParseOptions) : e.trim() === e ? $(e, this.options.parseTagValue, this.options.numberParseOptions) : e;\n }\n}\nfunction ot(e) {\n if (this.options.removeNSPrefix) {\n const t = e.split(\":\"), r = e.charAt(0) === \"/\" ? \"/\" : \"\";\n if (t[0] === \"xmlns\")\n return \"\";\n t.length === 2 && (e = r + t[1]);\n }\n return e;\n}\nconst ut = new RegExp(`([^\\\\s=]+)\\\\s*(=\\\\s*(['\"])([\\\\s\\\\S]*?)\\\\3)?`, \"gm\");\nfunction dt(e, t, r) {\n if (!this.options.ignoreAttributes && typeof e == \"string\") {\n const s = B.getAllMatches(e, ut), n = s.length, i = {};\n for (let d = 0; d < n; d++) {\n const u = this.resolveNameSpace(s[d][1]);\n let o = s[d][4], a = this.options.attributeNamePrefix + u;\n if (u.length)\n if (this.options.transformAttributeName && (a = this.options.transformAttributeName(a)), a === \"__proto__\" && (a = \"#__proto__\"), o !== void 0) {\n this.options.trimValues && (o = o.trim()), o = this.replaceEntitiesValue(o);\n const l = this.options.attributeValueProcessor(u, o, t);\n l == null ? i[a] = o : typeof l != typeof o || l !== o ? i[a] = l : i[a] = $(\n o,\n this.options.parseAttributeValue,\n this.options.numberParseOptions\n );\n } else\n this.options.allowBooleanAttributes && (i[a] = !0);\n }\n if (!Object.keys(i).length)\n return;\n if (this.options.attributesGroupName) {\n const d = {};\n return d[this.options.attributesGroupName] = i, d;\n }\n return i;\n }\n}\nconst at = function(e) {\n e = e.replace(/\\r\\n?/g, `\n`);\n const t = new T(\"!xml\");\n let r = t, s = \"\", n = \"\";\n for (let i = 0; i < e.length; i++)\n if (e[i] === \"<\")\n if (e[i + 1] === \"/\") {\n const u = y(e, \">\", i, \"Closing Tag is not closed.\");\n let o = e.substring(i + 2, u).trim();\n if (this.options.removeNSPrefix) {\n const f = o.indexOf(\":\");\n f !== -1 && (o = o.substr(f + 1));\n }\n this.options.transformTagName && (o = this.options.transformTagName(o)), r && (s = this.saveTextToParentTag(s, r, n));\n const a = n.substring(n.lastIndexOf(\".\") + 1);\n if (o && this.options.unpairedTags.indexOf(o) !== -1)\n throw new Error(`Unpaired tag can not be used as closing tag: `);\n let l = 0;\n a && this.options.unpairedTags.indexOf(a) !== -1 ? (l = n.lastIndexOf(\".\", n.lastIndexOf(\".\") - 1), this.tagsNodeStack.pop()) : l = n.lastIndexOf(\".\"), n = n.substring(0, l), r = this.tagsNodeStack.pop(), s = \"\", i = u;\n } else if (e[i + 1] === \"?\") {\n let u = x(e, i, !1, \"?>\");\n if (!u)\n throw new Error(\"Pi Tag is not closed.\");\n if (s = this.saveTextToParentTag(s, r, n), !(this.options.ignoreDeclaration && u.tagName === \"?xml\" || this.options.ignorePiTags)) {\n const o = new T(u.tagName);\n o.add(this.options.textNodeName, \"\"), u.tagName !== u.tagExp && u.attrExpPresent && (o[\":@\"] = this.buildAttributesMap(u.tagExp, n, u.tagName)), this.addChild(r, o, n);\n }\n i = u.closeIndex + 1;\n } else if (e.substr(i + 1, 3) === \"!--\") {\n const u = y(e, \"-->\", i + 4, \"Comment is not closed.\");\n if (this.options.commentPropName) {\n const o = e.substring(i + 4, u - 2);\n s = this.saveTextToParentTag(s, r, n), r.add(this.options.commentPropName, [{ [this.options.textNodeName]: o }]);\n }\n i = u;\n } else if (e.substr(i + 1, 2) === \"!D\") {\n const u = tt(e, i);\n this.docTypeEntities = u.entities, i = u.i;\n } else if (e.substr(i + 1, 2) === \"![\") {\n const u = y(e, \"]]>\", i, \"CDATA is not closed.\") - 2, o = e.substring(i + 9, u);\n if (s = this.saveTextToParentTag(s, r, n), this.options.cdataPropName)\n r.add(this.options.cdataPropName, [{ [this.options.textNodeName]: o }]);\n else {\n let a = this.parseTextData(o, r.tagname, n, !0, !1, !0);\n a == null && (a = \"\"), r.add(this.options.textNodeName, a);\n }\n i = u + 2;\n } else {\n let u = x(e, i, this.options.removeNSPrefix), o = u.tagName;\n const a = u.rawTagName;\n let l = u.tagExp, f = u.attrExpPresent, c = u.closeIndex;\n this.options.transformTagName && (o = this.options.transformTagName(o)), r && s && r.tagname !== \"!xml\" && (s = this.saveTextToParentTag(s, r, n, !1));\n const g = r;\n if (g && this.options.unpairedTags.indexOf(g.tagname) !== -1 && (r = this.tagsNodeStack.pop(), n = n.substring(0, n.lastIndexOf(\".\"))), o !== t.tagname && (n += n ? \".\" + o : o), this.isItStopNode(this.options.stopNodes, n, o)) {\n let h = \"\";\n if (l.length > 0 && l.lastIndexOf(\"/\") === l.length - 1)\n i = u.closeIndex;\n else if (this.options.unpairedTags.indexOf(o) !== -1)\n i = u.closeIndex;\n else {\n const E = this.readStopNodeData(e, a, c + 1);\n if (!E)\n throw new Error(`Unexpected end of ${a}`);\n i = E.i, h = E.tagContent;\n }\n const _ = new T(o);\n o !== l && f && (_[\":@\"] = this.buildAttributesMap(l, n, o)), h && (h = this.parseTextData(h, o, n, !0, f, !0, !0)), n = n.substr(0, n.lastIndexOf(\".\")), _.add(this.options.textNodeName, h), this.addChild(r, _, n);\n } else {\n if (l.length > 0 && l.lastIndexOf(\"/\") === l.length - 1) {\n o[o.length - 1] === \"/\" ? (o = o.substr(0, o.length - 1), n = n.substr(0, n.length - 1), l = o) : l = l.substr(0, l.length - 1), this.options.transformTagName && (o = this.options.transformTagName(o));\n const h = new T(o);\n o !== l && f && (h[\":@\"] = this.buildAttributesMap(l, n, o)), this.addChild(r, h, n), n = n.substr(0, n.lastIndexOf(\".\"));\n } else {\n const h = new T(o);\n this.tagsNodeStack.push(r), o !== l && f && (h[\":@\"] = this.buildAttributesMap(l, n, o)), this.addChild(r, h, n), r = h;\n }\n s = \"\", i = c;\n }\n }\n else\n s += e[i];\n return t.child;\n};\nfunction lt(e, t, r) {\n const s = this.options.updateTag(t.tagname, r, t[\":@\"]);\n s === !1 || (typeof s == \"string\" && (t.tagname = s), e.addChild(t));\n}\nconst ft = function(e) {\n if (this.options.processEntities) {\n for (let t in this.docTypeEntities) {\n const r = this.docTypeEntities[t];\n e = e.replace(r.regx, r.val);\n }\n for (let t in this.lastEntities) {\n const r = this.lastEntities[t];\n e = e.replace(r.regex, r.val);\n }\n if (this.options.htmlEntities)\n for (let t in this.htmlEntities) {\n const r = this.htmlEntities[t];\n e = e.replace(r.regex, r.val);\n }\n e = e.replace(this.ampEntity.regex, this.ampEntity.val);\n }\n return e;\n};\nfunction ct(e, t, r, s) {\n return e && (s === void 0 && (s = Object.keys(t.child).length === 0), e = this.parseTextData(\n e,\n t.tagname,\n r,\n !1,\n t[\":@\"] ? Object.keys(t[\":@\"]).length !== 0 : !1,\n s\n ), e !== void 0 && e !== \"\" && t.add(this.options.textNodeName, e), e = \"\"), e;\n}\nfunction ht(e, t, r) {\n const s = \"*.\" + r;\n for (const n in e) {\n const i = e[n];\n if (s === i || t === i)\n return !0;\n }\n return !1;\n}\nfunction pt(e, t, r = \">\") {\n let s, n = \"\";\n for (let i = t; i < e.length; i++) {\n let d = e[i];\n if (s)\n d === s && (s = \"\");\n else if (d === '\"' || d === \"'\")\n s = d;\n else if (d === r[0])\n if (r[1]) {\n if (e[i + 1] === r[1])\n return {\n data: n,\n index: i\n };\n } else\n return {\n data: n,\n index: i\n };\n else\n d === \"\t\" && (d = \" \");\n n += d;\n }\n}\nfunction y(e, t, r, s) {\n const n = e.indexOf(t, r);\n if (n === -1)\n throw new Error(s);\n return n + t.length - 1;\n}\nfunction x(e, t, r, s = \">\") {\n const n = pt(e, t + 1, s);\n if (!n)\n return;\n let i = n.data;\n const d = n.index, u = i.search(/\\s/);\n let o = i, a = !0;\n u !== -1 && (o = i.substr(0, u).replace(/\\s\\s*$/, \"\"), i = i.substr(u + 1));\n const l = o;\n if (r) {\n const f = o.indexOf(\":\");\n f !== -1 && (o = o.substr(f + 1), a = o !== n.data.substr(f + 1));\n }\n return {\n tagName: o,\n tagExp: i,\n closeIndex: d,\n attrExpPresent: a,\n rawTagName: l\n };\n}\nfunction gt(e, t, r) {\n const s = r;\n let n = 1;\n for (; r < e.length; r++)\n if (e[r] === \"<\")\n if (e[r + 1] === \"/\") {\n const i = y(e, \">\", r, `${t} is not closed`);\n if (e.substring(r + 2, i).trim() === t && (n--, n === 0))\n return {\n tagContent: e.substring(s, r),\n i\n };\n r = i;\n } else if (e[r + 1] === \"?\")\n r = y(e, \"?>\", r + 1, \"StopNode is not closed.\");\n else if (e.substr(r + 1, 3) === \"!--\")\n r = y(e, \"-->\", r + 3, \"StopNode is not closed.\");\n else if (e.substr(r + 1, 2) === \"![\")\n r = y(e, \"]]>\", r, \"StopNode is not closed.\") - 2;\n else {\n const i = x(e, r, \">\");\n i && ((i && i.tagName) === t && i.tagExp[i.tagExp.length - 1] !== \"/\" && n++, r = i.closeIndex);\n }\n}\nfunction $(e, t, r) {\n if (t && typeof e == \"string\") {\n const s = e.trim();\n return s === \"true\" ? !0 : s === \"false\" ? !1 : rt(e, r);\n } else\n return B.isExist(e) ? e : \"\";\n}\nvar wt = nt, ne = {};\nfunction mt(e, t) {\n return ie(e, t);\n}\nfunction ie(e, t, r) {\n let s;\n const n = {};\n for (let i = 0; i < e.length; i++) {\n const d = e[i], u = Nt(d);\n let o = \"\";\n if (r === void 0 ? o = u : o = r + \".\" + u, u === t.textNodeName)\n s === void 0 ? s = d[u] : s += \"\" + d[u];\n else {\n if (u === void 0)\n continue;\n if (d[u]) {\n let a = ie(d[u], t, o);\n const l = bt(a, t);\n d[\":@\"] ? Et(a, d[\":@\"], o, t) : Object.keys(a).length === 1 && a[t.textNodeName] !== void 0 && !t.alwaysCreateTextNode ? a = a[t.textNodeName] : Object.keys(a).length === 0 && (t.alwaysCreateTextNode ? a[t.textNodeName] = \"\" : a = \"\"), n[u] !== void 0 && n.hasOwnProperty(u) ? (Array.isArray(n[u]) || (n[u] = [n[u]]), n[u].push(a)) : t.isArray(u, o, l) ? n[u] = [a] : n[u] = a;\n }\n }\n }\n return typeof s == \"string\" ? s.length > 0 && (n[t.textNodeName] = s) : s !== void 0 && (n[t.textNodeName] = s), n;\n}\nfunction Nt(e) {\n const t = Object.keys(e);\n for (let r = 0; r < t.length; r++) {\n const s = t[r];\n if (s !== \":@\")\n return s;\n }\n}\nfunction Et(e, t, r, s) {\n if (t) {\n const n = Object.keys(t), i = n.length;\n for (let d = 0; d < i; d++) {\n const u = n[d];\n s.isArray(u, r + \".\" + u, !0, !0) ? e[u] = [t[u]] : e[u] = t[u];\n }\n }\n}\nfunction bt(e, t) {\n const { textNodeName: r } = t, s = Object.keys(e).length;\n return !!(s === 0 || s === 1 && (e[r] || typeof e[r] == \"boolean\" || e[r] === 0));\n}\nne.prettify = mt;\nconst { buildOptions: yt } = k, _t = wt, { prettify: vt } = ne, Tt = S;\nlet It = class {\n constructor(t) {\n this.externalEntities = {}, this.options = yt(t);\n }\n /**\n * Parse XML dats to JS object \n * @param {string|Buffer} xmlData \n * @param {boolean|Object} validationOption \n */\n parse(t, r) {\n if (typeof t != \"string\")\n if (t.toString)\n t = t.toString();\n else\n throw new Error(\"XML data is accepted in String or Bytes[] form.\");\n if (r) {\n r === !0 && (r = {});\n const i = Tt.validate(t, r);\n if (i !== !0)\n throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`);\n }\n const s = new _t(this.options);\n s.addExternalEntities(this.externalEntities);\n const n = s.parseXml(t);\n return this.options.preserveOrder || n === void 0 ? n : vt(n, this.options);\n }\n /**\n * Add Entity which is not by default supported by this library\n * @param {string} key \n * @param {string} value \n */\n addEntity(t, r) {\n if (r.indexOf(\"&\") !== -1)\n throw new Error(\"Entity value can't have '&'\");\n if (t.indexOf(\"&\") !== -1 || t.indexOf(\";\") !== -1)\n throw new Error(\"An entity must be set without '&' and ';'. Eg. use '#xD' for ' '\");\n if (r === \"&\")\n throw new Error(\"An entity with value '&' is not permitted\");\n this.externalEntities[t] = r;\n }\n};\nvar At = It;\nconst Ot = `\n`;\nfunction Ct(e, t) {\n let r = \"\";\n return t.format && t.indentBy.length > 0 && (r = Ot), se(e, t, \"\", r);\n}\nfunction se(e, t, r, s) {\n let n = \"\", i = !1;\n for (let d = 0; d < e.length; d++) {\n const u = e[d], o = Pt(u);\n if (o === void 0)\n continue;\n let a = \"\";\n if (r.length === 0 ? a = o : a = `${r}.${o}`, o === t.textNodeName) {\n let h = u[o];\n xt(a, t) || (h = t.tagValueProcessor(o, h), h = oe(h, t)), i && (n += s), n += h, i = !1;\n continue;\n } else if (o === t.cdataPropName) {\n i && (n += s), n += ``, i = !1;\n continue;\n } else if (o === t.commentPropName) {\n n += s + ``, i = !0;\n continue;\n } else if (o[0] === \"?\") {\n const h = K(u[\":@\"], t), _ = o === \"?xml\" ? \"\" : s;\n let E = u[o][0][t.textNodeName];\n E = E.length !== 0 ? \" \" + E : \"\", n += _ + `<${o}${E}${h}?>`, i = !0;\n continue;\n }\n let l = s;\n l !== \"\" && (l += t.indentBy);\n const f = K(u[\":@\"], t), c = s + `<${o}${f}`, g = se(u[o], t, a, l);\n t.unpairedTags.indexOf(o) !== -1 ? t.suppressUnpairedNode ? n += c + \">\" : n += c + \"/>\" : (!g || g.length === 0) && t.suppressEmptyNode ? n += c + \"/>\" : g && g.endsWith(\">\") ? n += c + `>${g}${s}` : (n += c + \">\", g && s !== \"\" && (g.includes(\"/>\") || g.includes(\"`), i = !0;\n }\n return n;\n}\nfunction Pt(e) {\n const t = Object.keys(e);\n for (let r = 0; r < t.length; r++) {\n const s = t[r];\n if (e.hasOwnProperty(s) && s !== \":@\")\n return s;\n }\n}\nfunction K(e, t) {\n let r = \"\";\n if (e && !t.ignoreAttributes)\n for (let s in e) {\n if (!e.hasOwnProperty(s))\n continue;\n let n = t.attributeValueProcessor(s, e[s]);\n n = oe(n, t), n === !0 && t.suppressBooleanAttributes ? r += ` ${s.substr(t.attributeNamePrefix.length)}` : r += ` ${s.substr(t.attributeNamePrefix.length)}=\"${n}\"`;\n }\n return r;\n}\nfunction xt(e, t) {\n e = e.substr(0, e.length - t.textNodeName.length - 1);\n let r = e.substr(e.lastIndexOf(\".\") + 1);\n for (let s in t.stopNodes)\n if (t.stopNodes[s] === e || t.stopNodes[s] === \"*.\" + r)\n return !0;\n return !1;\n}\nfunction oe(e, t) {\n if (e && e.length > 0 && t.processEntities)\n for (let r = 0; r < t.entities.length; r++) {\n const s = t.entities[r];\n e = e.replace(s.regex, s.val);\n }\n return e;\n}\nvar $t = Ct;\nconst Ft = $t, Vt = {\n attributeNamePrefix: \"@_\",\n attributesGroupName: !1,\n textNodeName: \"#text\",\n ignoreAttributes: !0,\n cdataPropName: !1,\n format: !1,\n indentBy: \" \",\n suppressEmptyNode: !1,\n suppressUnpairedNode: !0,\n suppressBooleanAttributes: !0,\n tagValueProcessor: function(e, t) {\n return t;\n },\n attributeValueProcessor: function(e, t) {\n return t;\n },\n preserveOrder: !1,\n commentPropName: !1,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&\" },\n //it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \">\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"<\" },\n { regex: new RegExp(\"'\", \"g\"), val: \"'\" },\n { regex: new RegExp('\"', \"g\"), val: \""\" }\n ],\n processEntities: !0,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: !1\n};\nfunction b(e) {\n this.options = Object.assign({}, Vt, e), this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {\n return !1;\n } : (this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = St), this.processTextOrObjNode = Lt, this.options.format ? (this.indentate = Rt, this.tagEndChar = `>\n`, this.newLine = `\n`) : (this.indentate = function() {\n return \"\";\n }, this.tagEndChar = \">\", this.newLine = \"\");\n}\nb.prototype.build = function(e) {\n return this.options.preserveOrder ? Ft(e, this.options) : (Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = {\n [this.options.arrayNodeName]: e\n }), this.j2x(e, 0).val);\n};\nb.prototype.j2x = function(e, t) {\n let r = \"\", s = \"\";\n for (let n in e)\n if (Object.prototype.hasOwnProperty.call(e, n))\n if (typeof e[n] > \"u\")\n this.isAttribute(n) && (s += \"\");\n else if (e[n] === null)\n this.isAttribute(n) ? s += \"\" : n[0] === \"?\" ? s += this.indentate(t) + \"<\" + n + \"?\" + this.tagEndChar : s += this.indentate(t) + \"<\" + n + \"/\" + this.tagEndChar;\n else if (e[n] instanceof Date)\n s += this.buildTextValNode(e[n], n, \"\", t);\n else if (typeof e[n] != \"object\") {\n const i = this.isAttribute(n);\n if (i)\n r += this.buildAttrPairStr(i, \"\" + e[n]);\n else if (n === this.options.textNodeName) {\n let d = this.options.tagValueProcessor(n, \"\" + e[n]);\n s += this.replaceEntitiesValue(d);\n } else\n s += this.buildTextValNode(e[n], n, \"\", t);\n } else if (Array.isArray(e[n])) {\n const i = e[n].length;\n let d = \"\";\n for (let u = 0; u < i; u++) {\n const o = e[n][u];\n typeof o > \"u\" || (o === null ? n[0] === \"?\" ? s += this.indentate(t) + \"<\" + n + \"?\" + this.tagEndChar : s += this.indentate(t) + \"<\" + n + \"/\" + this.tagEndChar : typeof o == \"object\" ? this.options.oneListGroup ? d += this.j2x(o, t + 1).val : d += this.processTextOrObjNode(o, n, t) : d += this.buildTextValNode(o, n, \"\", t));\n }\n this.options.oneListGroup && (d = this.buildObjectNode(d, n, \"\", t)), s += d;\n } else if (this.options.attributesGroupName && n === this.options.attributesGroupName) {\n const i = Object.keys(e[n]), d = i.length;\n for (let u = 0; u < d; u++)\n r += this.buildAttrPairStr(i[u], \"\" + e[n][i[u]]);\n } else\n s += this.processTextOrObjNode(e[n], n, t);\n return { attrStr: r, val: s };\n};\nb.prototype.buildAttrPairStr = function(e, t) {\n return t = this.options.attributeValueProcessor(e, \"\" + t), t = this.replaceEntitiesValue(t), this.options.suppressBooleanAttributes && t === \"true\" ? \" \" + e : \" \" + e + '=\"' + t + '\"';\n};\nfunction Lt(e, t, r) {\n const s = this.j2x(e, r + 1);\n return e[this.options.textNodeName] !== void 0 && Object.keys(e).length === 1 ? this.buildTextValNode(e[this.options.textNodeName], t, s.attrStr, r) : this.buildObjectNode(s.val, t, s.attrStr, r);\n}\nb.prototype.buildObjectNode = function(e, t, r, s) {\n if (e === \"\")\n return t[0] === \"?\" ? this.indentate(s) + \"<\" + t + r + \"?\" + this.tagEndChar : this.indentate(s) + \"<\" + t + r + this.closeTag(t) + this.tagEndChar;\n {\n let n = \"\" + e + n : this.options.commentPropName !== !1 && t === this.options.commentPropName && i.length === 0 ? this.indentate(s) + `` + this.newLine : this.indentate(s) + \"<\" + t + r + i + this.tagEndChar + e + this.indentate(s) + n;\n }\n};\nb.prototype.closeTag = function(e) {\n let t = \"\";\n return this.options.unpairedTags.indexOf(e) !== -1 ? this.options.suppressUnpairedNode || (t = \"/\") : this.options.suppressEmptyNode ? t = \"/\" : t = `>` + this.newLine;\n if (this.options.commentPropName !== !1 && t === this.options.commentPropName)\n return this.indentate(s) + `` + this.newLine;\n if (t[0] === \"?\")\n return this.indentate(s) + \"<\" + t + r + \"?\" + this.tagEndChar;\n {\n let n = this.options.tagValueProcessor(t, e);\n return n = this.replaceEntitiesValue(n), n === \"\" ? this.indentate(s) + \"<\" + t + r + this.closeTag(t) + this.tagEndChar : this.indentate(s) + \"<\" + t + r + \">\" + n + \" 0 && this.options.processEntities)\n for (let t = 0; t < this.options.entities.length; t++) {\n const r = this.options.entities[t];\n e = e.replace(r.regex, r.val);\n }\n return e;\n};\nfunction Rt(e) {\n return this.options.indentBy.repeat(e);\n}\nfunction St(e) {\n return e.startsWith(this.options.attributeNamePrefix) && e !== this.options.textNodeName ? e.substr(this.attrPrefixLen) : !1;\n}\nvar Mt = b;\nconst kt = S, Bt = At, qt = Mt;\nvar W = {\n XMLParser: Bt,\n XMLValidator: kt,\n XMLBuilder: qt\n};\nfunction Xt(e) {\n if (typeof e != \"string\")\n throw new TypeError(`Expected a \\`string\\`, got \\`${typeof e}\\``);\n if (e = e.trim(), e.length === 0 || W.XMLValidator.validate(e) !== !0)\n return !1;\n let t;\n const r = new W.XMLParser();\n try {\n t = r.parse(e);\n } catch {\n return !1;\n }\n return !(!t || !(\"svg\" in t));\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nclass cr {\n _view;\n constructor(t) {\n Ut(t), this._view = t;\n }\n get id() {\n return this._view.id;\n }\n get name() {\n return this._view.name;\n }\n get caption() {\n return this._view.caption;\n }\n get emptyTitle() {\n return this._view.emptyTitle;\n }\n get emptyCaption() {\n return this._view.emptyCaption;\n }\n get getContents() {\n return this._view.getContents;\n }\n get icon() {\n return this._view.icon;\n }\n set icon(t) {\n this._view.icon = t;\n }\n get order() {\n return this._view.order;\n }\n set order(t) {\n this._view.order = t;\n }\n get params() {\n return this._view.params;\n }\n set params(t) {\n this._view.params = t;\n }\n get columns() {\n return this._view.columns;\n }\n get emptyView() {\n return this._view.emptyView;\n }\n get parent() {\n return this._view.parent;\n }\n get sticky() {\n return this._view.sticky;\n }\n get expanded() {\n return this._view.expanded;\n }\n set expanded(t) {\n this._view.expanded = t;\n }\n get defaultSortKey() {\n return this._view.defaultSortKey;\n }\n}\nconst Ut = function(e) {\n if (!e.id || typeof e.id != \"string\")\n throw new Error(\"View id is required and must be a string\");\n if (!e.name || typeof e.name != \"string\")\n throw new Error(\"View name is required and must be a string\");\n if (e.columns && e.columns.length > 0 && (!e.caption || typeof e.caption != \"string\"))\n throw new Error(\"View caption is required for top-level views and must be a string\");\n if (!e.getContents || typeof e.getContents != \"function\")\n throw new Error(\"View getContents is required and must be a function\");\n if (!e.icon || typeof e.icon != \"string\" || !Xt(e.icon))\n throw new Error(\"View icon is required and must be a valid svg string\");\n if (!(\"order\" in e) || typeof e.order != \"number\")\n throw new Error(\"View order is required and must be a number\");\n if (e.columns && e.columns.forEach((t) => {\n if (!(t instanceof Ie))\n throw new Error(\"View columns must be an array of Column. Invalid column found\");\n }), e.emptyView && typeof e.emptyView != \"function\")\n throw new Error(\"View emptyView must be a function\");\n if (e.parent && typeof e.parent != \"string\")\n throw new Error(\"View parent must be a string\");\n if (\"sticky\" in e && typeof e.sticky != \"boolean\")\n throw new Error(\"View sticky must be a boolean\");\n if (\"expanded\" in e && typeof e.expanded != \"boolean\")\n throw new Error(\"View expanded must be a boolean\");\n if (e.defaultSortKey && typeof e.defaultSortKey != \"string\")\n throw new Error(\"View defaultSortKey must be a string\");\n return !0;\n};\n/**\n * @copyright 2019 Christoph Wurst \n *\n * @author Christoph Wurst \n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nconst hr = function(e) {\n return F().registerEntry(e);\n}, pr = function(e) {\n return F().unregisterEntry(e);\n}, gr = function(e) {\n return F().getEntries(e).sort((r, s) => r.order !== void 0 && s.order !== void 0 && r.order !== s.order ? r.order - s.order : r.displayName.localeCompare(s.displayName, void 0, { numeric: !0, sensitivity: \"base\" }));\n};\nexport {\n Ie as Column,\n Z as DefaultType,\n ye as File,\n Qt as FileAction,\n R as FileType,\n _e as Folder,\n tr as Header,\n Te as Navigation,\n D as Node,\n Q as NodeStatus,\n N as Permission,\n cr as View,\n hr as addNewFileMenuEntry,\n ur as davGetClient,\n sr as davGetDefaultPropfind,\n Ee as davGetFavoritesReport,\n or as davGetRecentSearch,\n be as davParsePermissions,\n te as davRemoteURL,\n ve as davResultToNode,\n ee as davRootPath,\n Y as defaultDavNamespaces,\n j as defaultDavProperties,\n Yt as formatFileSize,\n L as getDavNameSpaces,\n V as getDavProperties,\n dr as getFavoriteNodes,\n er as getFileActions,\n nr as getFileListHeaders,\n ar as getNavigation,\n gr as getNewFileMenuEntries,\n Jt as parseFileSize,\n ir as registerDavProperty,\n Dt as registerFileAction,\n rr as registerFileListHeaders,\n pr as removeNewFileMenuEntry\n};\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./fileEntryInlineSystemTags.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./fileEntryInlineSystemTags.scss\";\n export default content && content.locals ? content.locals : undefined;\n","/**\n * @copyright Copyright (c) 2023 Lucas Azevedo \n *\n * @author Lucas Azevedo \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { FileAction, Node, registerDavProperty, registerFileAction } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport '../css/fileEntryInlineSystemTags.scss';\nconst getNodeSystemTags = function (node) {\n const tags = node.attributes?.['system-tags']?.['system-tag'];\n if (tags === undefined) {\n return [];\n }\n return [tags].flat();\n};\nconst renderTag = function (tag, isMore = false) {\n const tagElement = document.createElement('li');\n tagElement.classList.add('files-list__system-tag');\n tagElement.textContent = tag;\n if (isMore) {\n tagElement.classList.add('files-list__system-tag--more');\n }\n return tagElement;\n};\nexport const action = new FileAction({\n id: 'system-tags',\n displayName: () => '',\n iconSvgInline: () => '',\n enabled(nodes) {\n // Only show the action on single nodes\n if (nodes.length !== 1) {\n return false;\n }\n const node = nodes[0];\n const tags = getNodeSystemTags(node);\n // Only show the action if the node has system tags\n if (tags.length === 0) {\n return false;\n }\n return true;\n },\n exec: async () => null,\n async renderInline(node) {\n // Ensure we have the system tags as an array\n const tags = getNodeSystemTags(node);\n if (tags.length === 0) {\n return null;\n }\n const systemTagsElement = document.createElement('ul');\n systemTagsElement.classList.add('files-list__system-tags');\n if (tags.length === 1) {\n systemTagsElement.setAttribute('aria-label', t('files', 'This file has the tag {tag}', { tag: tags[0] }));\n }\n else {\n const firstTags = tags.slice(0, -1).join(', ');\n const lastTag = tags[tags.length - 1];\n systemTagsElement.setAttribute('aria-label', t('files', 'This file has the tags {firstTags} and {lastTag}', { firstTags, lastTag }));\n }\n systemTagsElement.append(renderTag(tags[0]));\n // More tags than the one we're showing\n if (tags.length > 1) {\n const moreTagElement = renderTag('+' + (tags.length - 1), true);\n moreTagElement.setAttribute('title', tags.slice(1).join(', '));\n systemTagsElement.append(moreTagElement);\n }\n return systemTagsElement;\n },\n order: 0,\n});\nregisterDavProperty('nc:system-tags');\nregisterFileAction(action);\n","/**\n * @copyright 2023 Christopher Ng \n *\n * @author Christopher Ng \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { createClient } from 'webdav';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getRequestToken } from '@nextcloud/auth';\nconst rootUrl = generateRemoteUrl('dav');\nexport const davClient = createClient(rootUrl, {\n headers: {\n requesttoken: getRequestToken() ?? '',\n },\n});\n","/**\n * @copyright 2023 Christopher Ng \n *\n * @author Christopher Ng \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport camelCase from 'camelcase';\nexport const defaultBaseTag = {\n userVisible: true,\n userAssignable: true,\n canAssign: true,\n};\nexport const parseTags = (tags) => {\n return tags.map(({ props }) => Object.fromEntries(Object.entries(props)\n .map(([key, value]) => [camelCase(key), camelCase(key) === 'displayName' ? String(value) : value])));\n};\n/**\n * Parse id from `Content-Location` header\n * @param url URL to parse\n */\nexport const parseIdFromLocation = (url) => {\n const queryPos = url.indexOf('?');\n if (queryPos > 0) {\n url = url.substring(0, queryPos);\n }\n const parts = url.split('/');\n let result;\n do {\n result = parts[parts.length - 1];\n parts.pop();\n // note: first result can be empty when there is a trailing slash,\n // so we take the part before that\n } while (!result && parts.length > 0);\n return Number(result);\n};\nexport const formatTag = (initialTag) => {\n const tag = { ...initialTag };\n if (tag.name && !tag.displayName) {\n return tag;\n }\n tag.name = tag.displayName;\n delete tag.displayName;\n return tag;\n};\n","/**\n * @copyright 2023 Christopher Ng \n *\n * @author Christopher Ng \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger';\nexport const logger = getLoggerBuilder()\n .setApp('systemtags')\n .detectUser()\n .build();\n","const inWebWorker = typeof WorkerGlobalScope !== \"undefined\" &&\n self instanceof WorkerGlobalScope;\nconst root = inWebWorker\n ? self\n : typeof window !== \"undefined\"\n ? window\n : globalThis;\nexport const fetch = root.fetch.bind(root);\nexport const Headers = root.Headers;\nexport const Request = root.Request;\nexport const Response = root.Response;\n","import { sequence } from \"./functions.js\";\nconst HOT_PATCHER_TYPE = \"@@HOTPATCHER\";\nconst NOOP = () => { };\nfunction createNewItem(method) {\n return {\n original: method,\n methods: [method],\n final: false\n };\n}\n/**\n * Hot patching manager class\n */\nexport class HotPatcher {\n constructor() {\n this._configuration = {\n registry: {},\n getEmptyAction: \"null\"\n };\n this.__type__ = HOT_PATCHER_TYPE;\n }\n /**\n * Configuration object reference\n * @readonly\n */\n get configuration() {\n return this._configuration;\n }\n /**\n * The action to take when a non-set method is requested\n * Possible values: null/throw\n */\n get getEmptyAction() {\n return this.configuration.getEmptyAction;\n }\n set getEmptyAction(newAction) {\n this.configuration.getEmptyAction = newAction;\n }\n /**\n * Control another hot-patcher instance\n * Force the remote instance to use patched methods from calling instance\n * @param target The target instance to control\n * @param allowTargetOverrides Allow the target to override patched methods on\n * the controller (default is false)\n * @returns Returns self\n * @throws {Error} Throws if the target is invalid\n */\n control(target, allowTargetOverrides = false) {\n if (!target || target.__type__ !== HOT_PATCHER_TYPE) {\n throw new Error(\"Failed taking control of target HotPatcher instance: Invalid type or object\");\n }\n Object.keys(target.configuration.registry).forEach(foreignKey => {\n if (this.configuration.registry.hasOwnProperty(foreignKey)) {\n if (allowTargetOverrides) {\n this.configuration.registry[foreignKey] = Object.assign({}, target.configuration.registry[foreignKey]);\n }\n }\n else {\n this.configuration.registry[foreignKey] = Object.assign({}, target.configuration.registry[foreignKey]);\n }\n });\n target._configuration = this.configuration;\n return this;\n }\n /**\n * Execute a patched method\n * @param key The method key\n * @param args Arguments to pass to the method (optional)\n * @see HotPatcher#get\n * @returns The output of the called method\n */\n execute(key, ...args) {\n const method = this.get(key) || NOOP;\n return method(...args);\n }\n /**\n * Get a method for a key\n * @param key The method key\n * @returns Returns the requested function or null if the function\n * does not exist and the host is configured to return null (and not throw)\n * @throws {Error} Throws if the configuration specifies to throw and the method\n * does not exist\n * @throws {Error} Throws if the `getEmptyAction` value is invalid\n */\n get(key) {\n const item = this.configuration.registry[key];\n if (!item) {\n switch (this.getEmptyAction) {\n case \"null\":\n return null;\n case \"throw\":\n throw new Error(`Failed handling method request: No method provided for override: ${key}`);\n default:\n throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`);\n }\n }\n return sequence(...item.methods);\n }\n /**\n * Check if a method has been patched\n * @param key The function key\n * @returns True if already patched\n */\n isPatched(key) {\n return !!this.configuration.registry[key];\n }\n /**\n * Patch a method name\n * @param key The method key to patch\n * @param method The function to set\n * @param opts Patch options\n * @returns Returns self\n */\n patch(key, method, opts = {}) {\n const { chain = false } = opts;\n if (this.configuration.registry[key] && this.configuration.registry[key].final) {\n throw new Error(`Failed patching '${key}': Method marked as being final`);\n }\n if (typeof method !== \"function\") {\n throw new Error(`Failed patching '${key}': Provided method is not a function`);\n }\n if (chain) {\n // Add new method to the chain\n if (!this.configuration.registry[key]) {\n // New key, create item\n this.configuration.registry[key] = createNewItem(method);\n }\n else {\n // Existing, push the method\n this.configuration.registry[key].methods.push(method);\n }\n }\n else {\n // Replace the original\n if (this.isPatched(key)) {\n const { original } = this.configuration.registry[key];\n this.configuration.registry[key] = Object.assign(createNewItem(method), {\n original\n });\n }\n else {\n this.configuration.registry[key] = createNewItem(method);\n }\n }\n return this;\n }\n /**\n * Patch a method inline, execute it and return the value\n * Used for patching contents of functions. This method will not apply a patched\n * function if it has already been patched, allowing for external overrides to\n * function. It also means that the function is cached so that it is not\n * instantiated every time the outer function is invoked.\n * @param key The function key to use\n * @param method The function to patch (once, only if not patched)\n * @param args Arguments to pass to the function\n * @returns The output of the patched function\n * @example\n * function mySpecialFunction(a, b) {\n * return hotPatcher.patchInline(\"func\", (a, b) => {\n * return a + b;\n * }, a, b);\n * }\n */\n patchInline(key, method, ...args) {\n if (!this.isPatched(key)) {\n this.patch(key, method);\n }\n return this.execute(key, ...args);\n }\n /**\n * Patch a method (or methods) in sequential-mode\n * See `patch()` with the option `chain: true`\n * @see patch\n * @param key The key to patch\n * @param methods The methods to patch\n * @returns Returns self\n */\n plugin(key, ...methods) {\n methods.forEach(method => {\n this.patch(key, method, { chain: true });\n });\n return this;\n }\n /**\n * Restore a patched method if it has been overridden\n * @param key The method key\n * @returns Returns self\n */\n restore(key) {\n if (!this.isPatched(key)) {\n throw new Error(`Failed restoring method: No method present for key: ${key}`);\n }\n else if (typeof this.configuration.registry[key].original !== \"function\") {\n throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${key}`);\n }\n this.configuration.registry[key].methods = [this.configuration.registry[key].original];\n return this;\n }\n /**\n * Set a method as being final\n * This sets a method as having been finally overridden. Attempts at overriding\n * again will fail with an error.\n * @param key The key to make final\n * @returns Returns self\n */\n setFinal(key) {\n if (!this.configuration.registry.hasOwnProperty(key)) {\n throw new Error(`Failed marking '${key}' as final: No method found for key`);\n }\n this.configuration.registry[key].final = true;\n return this;\n }\n}\n","export function sequence(...methods) {\n if (methods.length === 0) {\n throw new Error(\"Failed creating sequence: No functions provided\");\n }\n return function __executeSequence(...args) {\n let result = args;\n const _this = this;\n while (methods.length > 0) {\n const method = methods.shift();\n result = [method.apply(_this, result)];\n }\n return result[0];\n };\n}\n","import { HotPatcher } from \"hot-patcher\";\nlet __patcher = null;\nexport function getPatcher() {\n if (!__patcher) {\n __patcher = new HotPatcher();\n }\n return __patcher;\n}\n","import md5 from \"md5\";\nimport { ha1Compute } from \"../tools/crypto.js\";\nconst NONCE_CHARS = \"abcdef0123456789\";\nconst NONCE_SIZE = 32;\nexport function createDigestContext(username, password, ha1) {\n return { username, password, ha1, nc: 0, algorithm: \"md5\", hasDigestAuth: false };\n}\nexport function generateDigestAuthHeader(options, digest) {\n const url = options.url.replace(\"//\", \"\");\n const uri = url.indexOf(\"/\") == -1 ? \"/\" : url.slice(url.indexOf(\"/\"));\n const method = options.method ? options.method.toUpperCase() : \"GET\";\n const qop = /(^|,)\\s*auth\\s*($|,)/.test(digest.qop) ? \"auth\" : false;\n const ncString = `00000000${digest.nc}`.slice(-8);\n const ha1 = ha1Compute(digest.algorithm, digest.username, digest.realm, digest.password, digest.nonce, digest.cnonce, digest.ha1);\n const ha2 = md5(`${method}:${uri}`);\n const digestResponse = qop\n ? md5(`${ha1}:${digest.nonce}:${ncString}:${digest.cnonce}:${qop}:${ha2}`)\n : md5(`${ha1}:${digest.nonce}:${ha2}`);\n const authValues = {\n username: digest.username,\n realm: digest.realm,\n nonce: digest.nonce,\n uri,\n qop,\n response: digestResponse,\n nc: ncString,\n cnonce: digest.cnonce,\n algorithm: digest.algorithm,\n opaque: digest.opaque\n };\n const authHeader = [];\n for (const k in authValues) {\n if (authValues[k]) {\n if (k === \"qop\" || k === \"nc\" || k === \"algorithm\") {\n authHeader.push(`${k}=${authValues[k]}`);\n }\n else {\n authHeader.push(`${k}=\"${authValues[k]}\"`);\n }\n }\n }\n return `Digest ${authHeader.join(\", \")}`;\n}\nfunction makeNonce() {\n let uid = \"\";\n for (let i = 0; i < NONCE_SIZE; ++i) {\n uid = `${uid}${NONCE_CHARS[Math.floor(Math.random() * NONCE_CHARS.length)]}`;\n }\n return uid;\n}\nexport function parseDigestAuth(response, _digest) {\n const authHeader = (response.headers && response.headers.get(\"www-authenticate\")) || \"\";\n if (authHeader.split(/\\s/)[0].toLowerCase() !== \"digest\") {\n return false;\n }\n const re = /([a-z0-9_-]+)=(?:\"([^\"]+)\"|([a-z0-9_-]+))/gi;\n for (;;) {\n const match = re.exec(authHeader);\n if (!match) {\n break;\n }\n _digest[match[1]] = match[2] || match[3];\n }\n _digest.nc += 1;\n _digest.cnonce = makeNonce();\n return true;\n}\n","import md5 from \"md5\";\nexport function ha1Compute(algorithm, user, realm, pass, nonce, cnonce, ha1) {\n const ha1Hash = ha1 || md5(`${user}:${realm}:${pass}`);\n if (algorithm && algorithm.toLowerCase() === \"md5-sess\") {\n return md5(`${ha1Hash}:${nonce}:${cnonce}`);\n }\n return ha1Hash;\n}\n","export function cloneShallow(obj) {\n return isPlainObject(obj)\n ? Object.assign({}, obj)\n : Object.setPrototypeOf(Object.assign({}, obj), Object.getPrototypeOf(obj));\n}\nfunction isPlainObject(obj) {\n if (typeof obj !== \"object\" ||\n obj === null ||\n Object.prototype.toString.call(obj) != \"[object Object]\") {\n // Not an object\n return false;\n }\n if (Object.getPrototypeOf(obj) === null) {\n return true;\n }\n let proto = obj;\n // Find the prototype\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(obj) === proto;\n}\nexport function merge(...args) {\n let output = null, items = [...args];\n while (items.length > 0) {\n const nextItem = items.shift();\n if (!output) {\n output = cloneShallow(nextItem);\n }\n else {\n output = mergeObjects(output, nextItem);\n }\n }\n return output;\n}\nfunction mergeObjects(obj1, obj2) {\n const output = cloneShallow(obj1);\n Object.keys(obj2).forEach(key => {\n if (!output.hasOwnProperty(key)) {\n output[key] = obj2[key];\n return;\n }\n if (Array.isArray(obj2[key])) {\n output[key] = Array.isArray(output[key])\n ? [...output[key], ...obj2[key]]\n : [...obj2[key]];\n }\n else if (typeof obj2[key] === \"object\" && !!obj2[key]) {\n output[key] =\n typeof output[key] === \"object\" && !!output[key]\n ? mergeObjects(output[key], obj2[key])\n : cloneShallow(obj2[key]);\n }\n else {\n output[key] = obj2[key];\n }\n });\n return output;\n}\n","export function convertResponseHeaders(headers) {\n const output = {};\n for (const key of headers.keys()) {\n output[key] = headers.get(key);\n }\n return output;\n}\nexport function mergeHeaders(...headerPayloads) {\n if (headerPayloads.length === 0)\n return {};\n const headerKeys = {};\n return headerPayloads.reduce((output, headers) => {\n Object.keys(headers).forEach(header => {\n const lowerHeader = header.toLowerCase();\n if (headerKeys.hasOwnProperty(lowerHeader)) {\n output[headerKeys[lowerHeader]] = headers[header];\n }\n else {\n headerKeys[lowerHeader] = header;\n output[header] = headers[header];\n }\n });\n return output;\n }, {});\n}\n","const hasArrayBuffer = typeof ArrayBuffer === \"function\";\nconst { toString: objToString } = Object.prototype;\n// Taken from: https://github.com/fengyuanchen/is-array-buffer/blob/master/src/index.js\nexport function isArrayBuffer(value) {\n return (hasArrayBuffer &&\n (value instanceof ArrayBuffer || objToString.call(value) === \"[object ArrayBuffer]\"));\n}\n","import { Agent as HTTPAgent } from \"http\";\nimport { Agent as HTTPSAgent } from \"https\";\nimport { fetch } from \"@buttercup/fetch\";\nimport { getPatcher } from \"./compat/patcher.js\";\nimport { isWeb } from \"./compat/env.js\";\nimport { generateDigestAuthHeader, parseDigestAuth } from \"./auth/digest.js\";\nimport { cloneShallow, merge } from \"./tools/merge.js\";\nimport { mergeHeaders } from \"./tools/headers.js\";\nimport { requestDataToFetchBody } from \"./tools/body.js\";\nfunction _request(requestOptions) {\n const patcher = getPatcher();\n return patcher.patchInline(\"request\", (options) => patcher.patchInline(\"fetch\", fetch, options.url, getFetchOptions(options)), requestOptions);\n}\nfunction getFetchOptions(requestOptions) {\n let headers = {};\n // Handle standard options\n const opts = {\n method: requestOptions.method\n };\n if (requestOptions.headers) {\n headers = mergeHeaders(headers, requestOptions.headers);\n }\n if (typeof requestOptions.data !== \"undefined\") {\n const [body, newHeaders] = requestDataToFetchBody(requestOptions.data);\n opts.body = body;\n headers = mergeHeaders(headers, newHeaders);\n }\n if (requestOptions.signal) {\n opts.signal = requestOptions.signal;\n }\n if (requestOptions.withCredentials) {\n opts.credentials = \"include\";\n }\n // Check for node-specific options\n if (!isWeb()) {\n if (requestOptions.httpAgent || requestOptions.httpsAgent) {\n opts.agent = (parsedURL) => {\n if (parsedURL.protocol === \"http:\") {\n return requestOptions.httpAgent || new HTTPAgent();\n }\n return requestOptions.httpsAgent || new HTTPSAgent();\n };\n }\n }\n // Attach headers\n opts.headers = headers;\n return opts;\n}\nexport function prepareRequestOptions(requestOptions, context, userOptions) {\n const finalOptions = cloneShallow(requestOptions);\n finalOptions.headers = mergeHeaders(context.headers, finalOptions.headers || {}, userOptions.headers || {});\n if (typeof userOptions.data !== \"undefined\") {\n finalOptions.data = userOptions.data;\n }\n if (userOptions.signal) {\n finalOptions.signal = userOptions.signal;\n }\n if (context.httpAgent) {\n finalOptions.httpAgent = context.httpAgent;\n }\n if (context.httpsAgent) {\n finalOptions.httpsAgent = context.httpsAgent;\n }\n if (context.digest) {\n finalOptions._digest = context.digest;\n }\n if (typeof context.withCredentials === \"boolean\") {\n finalOptions.withCredentials = context.withCredentials;\n }\n return finalOptions;\n}\nexport async function request(requestOptions) {\n // Client not configured for digest authentication\n if (!requestOptions._digest) {\n return _request(requestOptions);\n }\n // Remove client's digest authentication object from request options\n const _digest = requestOptions._digest;\n delete requestOptions._digest;\n // If client is already using digest authentication, include the digest authorization header\n if (_digest.hasDigestAuth) {\n requestOptions = merge(requestOptions, {\n headers: {\n Authorization: generateDigestAuthHeader(requestOptions, _digest)\n }\n });\n }\n // Perform digest request + check\n const response = await _request(requestOptions);\n if (response.status == 401) {\n _digest.hasDigestAuth = parseDigestAuth(response, _digest);\n if (_digest.hasDigestAuth) {\n requestOptions = merge(requestOptions, {\n headers: {\n Authorization: generateDigestAuthHeader(requestOptions, _digest)\n }\n });\n const response2 = await _request(requestOptions);\n if (response2.status == 401) {\n _digest.hasDigestAuth = false;\n }\n else {\n _digest.nc++;\n }\n return response2;\n }\n }\n else {\n _digest.nc++;\n }\n return response;\n}\n","import Stream from \"stream\";\nimport { isArrayBuffer } from \"../compat/arrayBuffer.js\";\nimport { isBuffer } from \"../compat/buffer.js\";\nimport { isWeb } from \"../compat/env.js\";\nexport function requestDataToFetchBody(data) {\n if (!isWeb() && data instanceof Stream.Readable) {\n // @ts-ignore\n return [data, {}];\n }\n if (typeof data === \"string\") {\n return [data, {}];\n }\n else if (isBuffer(data)) {\n return [data, {}];\n }\n else if (isArrayBuffer(data)) {\n return [data, {}];\n }\n else if (data && typeof data === \"object\") {\n return [\n JSON.stringify(data),\n {\n \"content-type\": \"application/json\"\n }\n ];\n }\n throw new Error(`Unable to convert request body: Unexpected body type: ${typeof data}`);\n}\n","export function isBuffer(value) {\n return (value != null &&\n value.constructor != null &&\n typeof value.constructor.isBuffer === \"function\" &&\n value.constructor.isBuffer(value));\n}\n","import { createClient, getPatcher } from 'webdav';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser, getRequestToken } from '@nextcloud/auth';\nimport { request } from 'webdav/dist/node/request.js';\nexport const rootPath = `/files/${getCurrentUser()?.uid}`;\nexport const defaultRootUrl = generateRemoteUrl('dav' + rootPath);\nexport const getClient = (rootUrl = defaultRootUrl) => {\n const client = createClient(rootUrl, {\n headers: {\n requesttoken: getRequestToken() || '',\n },\n });\n /**\n * Allow to override the METHOD to support dav REPORT\n *\n * @see https://github.com/perry-mitchell/webdav-client/blob/8d9694613c978ce7404e26a401c39a41f125f87f/source/request.ts\n */\n const patcher = getPatcher();\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // https://github.com/perry-mitchell/hot-patcher/issues/6\n patcher.patch('request', (options) => {\n if (options.headers?.method) {\n options.method = options.headers.method;\n delete options.headers.method;\n }\n return request(options);\n });\n return client;\n};\n","/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n","import { CancelablePromise } from 'cancelable-promise';\nimport { File, Folder, davParsePermissions, davGetDefaultPropfind } from '@nextcloud/files';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { getClient, rootPath } from './WebdavClient';\nimport { hashCode } from '../utils/hashUtils';\nimport logger from '../logger';\nconst client = getClient();\nexport const resultToNode = function (node) {\n const userId = getCurrentUser()?.uid;\n if (!userId) {\n throw new Error('No user id found');\n }\n const props = node.props;\n const permissions = davParsePermissions(props?.permissions);\n const owner = (props['owner-id'] || userId).toString();\n const source = generateRemoteUrl('dav' + rootPath + node.filename);\n const id = props?.fileid < 0\n ? hashCode(source)\n : props?.fileid || 0;\n const nodeData = {\n id,\n source,\n mtime: new Date(node.lastmod),\n mime: node.mime || 'application/octet-stream',\n size: props?.size || 0,\n permissions,\n owner,\n root: rootPath,\n attributes: {\n ...node,\n ...props,\n hasPreview: props?.['has-preview'],\n failed: props?.fileid < 0,\n },\n };\n delete nodeData.attributes.props;\n return node.type === 'file'\n ? new File(nodeData)\n : new Folder(nodeData);\n};\nexport const getContents = (path = '/') => {\n const controller = new AbortController();\n const propfindPayload = davGetDefaultPropfind();\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n onCancel(() => controller.abort());\n try {\n const contentsResponse = await client.getDirectoryContents(path, {\n details: true,\n data: propfindPayload,\n includeSelf: true,\n signal: controller.signal,\n });\n const root = contentsResponse.data[0];\n const contents = contentsResponse.data.slice(1);\n if (root.filename !== path) {\n throw new Error('Root node does not match requested path');\n }\n resolve({\n folder: resultToNode(root),\n contents: contents.map(result => {\n try {\n return resultToNode(result);\n }\n catch (error) {\n logger.error(`Invalid node detected '${result.basename}'`, { error });\n return null;\n }\n }).filter(Boolean),\n });\n }\n catch (error) {\n reject(error);\n }\n });\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nexport const hashCode = function (str) {\n return str.split('').reduce(function (a, b) {\n a = ((a << 5) - a) + b.charCodeAt(0);\n return a & a;\n }, 0);\n};\n","import { Folder, Permission, getDavNameSpaces, getDavProperties } from '@nextcloud/files';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { fetchTags } from './api';\nimport { getClient } from '../../../files/src/services/WebdavClient';\nimport { resultToNode } from '../../../files/src/services/Files';\nconst formatReportPayload = (tagId) => `\n\n\t\n\t\t${getDavProperties()}\n\t\n \n ${tagId}\n \n`;\nconst tagToNode = function (tag) {\n return new Folder({\n id: tag.id,\n source: generateRemoteUrl('dav/systemtags/' + tag.id),\n owner: getCurrentUser()?.uid,\n root: '/systemtags',\n permissions: Permission.READ,\n attributes: {\n ...tag,\n 'is-tag': true,\n },\n });\n};\nexport const getContents = async (path = '/') => {\n // List tags in the root\n const tagsCache = (await fetchTags()).filter(tag => tag.userVisible);\n if (path === '/') {\n return {\n folder: new Folder({\n id: 0,\n source: generateRemoteUrl('dav/systemtags'),\n owner: getCurrentUser()?.uid,\n root: '/systemtags',\n permissions: Permission.NONE,\n }),\n contents: tagsCache.map(tagToNode),\n };\n }\n const tagId = parseInt(path.replace('/', ''), 10);\n const tag = tagsCache.find(tag => tag.id === tagId);\n if (!tag) {\n throw new Error('Tag not found');\n }\n const folder = tagToNode(tag);\n const contentsResponse = await getClient().getDirectoryContents('/', {\n details: true,\n // Only filter favorites if we're at the root\n data: formatReportPayload(tagId),\n headers: {\n // Patched in WebdavClient.ts\n method: 'REPORT',\n },\n });\n return {\n folder,\n contents: contentsResponse.data.map(resultToNode),\n };\n};\n","/**\n * @copyright Copyright (c) 2016 Roeland Jago Douma \n *\n * @author John Molakvoæ \n * @author Roeland Jago Douma \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport './actions/inlineSystemTagsAction.js';\nimport { translate as t } from '@nextcloud/l10n';\nimport { View, getNavigation } from '@nextcloud/files';\nimport TagMultipleSvg from '@mdi/svg/svg/tag-multiple.svg?raw';\nimport { getContents } from './services/systemtags.js';\nconst Navigation = getNavigation();\nNavigation.register(new View({\n id: 'tags',\n name: t('systemtags', 'Tags'),\n caption: t('systemtags', 'List of tags and their associated files and folders.'),\n emptyTitle: t('systemtags', 'No tags found'),\n emptyCaption: t('systemtags', 'Tags you have created will show up here.'),\n icon: TagMultipleSvg,\n order: 25,\n getContents,\n}));\n","/**\n * @copyright 2023 Christopher Ng \n *\n * @author Christopher Ng \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport axios from '@nextcloud/axios';\nimport { generateUrl } from '@nextcloud/router';\nimport { translate as t } from '@nextcloud/l10n';\nimport { davClient } from './davClient.js';\nimport { formatTag, parseIdFromLocation, parseTags } from '../utils';\nimport { logger } from '../logger.js';\nexport const fetchTagsPayload = `\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n`;\nexport const fetchTags = async () => {\n const path = '/systemtags';\n try {\n const { data: tags } = await davClient.getDirectoryContents(path, {\n data: fetchTagsPayload,\n details: true,\n glob: '/systemtags/*', // Filter out first empty tag\n });\n return parseTags(tags);\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to load tags'), { error });\n throw new Error(t('systemtags', 'Failed to load tags'));\n }\n};\nexport const fetchLastUsedTagIds = async () => {\n const url = generateUrl('/apps/systemtags/lastused');\n try {\n const { data: lastUsedTagIds } = await axios.get(url);\n return lastUsedTagIds.map(Number);\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to load last used tags'), { error });\n throw new Error(t('systemtags', 'Failed to load last used tags'));\n }\n};\n/**\n * @return created tag id\n */\nexport const createTag = async (tag) => {\n const path = '/systemtags';\n const tagToPost = formatTag(tag);\n try {\n const { headers } = await davClient.customRequest(path, {\n method: 'POST',\n data: tagToPost,\n });\n const contentLocation = headers.get('content-location');\n if (contentLocation) {\n return parseIdFromLocation(contentLocation);\n }\n logger.error(t('systemtags', 'Missing \"Content-Location\" header'));\n throw new Error(t('systemtags', 'Missing \"Content-Location\" header'));\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to create tag'), { error });\n throw new Error(t('systemtags', 'Failed to create tag'));\n }\n};\nexport const updateTag = async (tag) => {\n const path = '/systemtags/' + tag.id;\n const data = `\n\t\n\t\t\n\t\t\t\n\t\t\t\t${tag.displayName}\n\t\t\t\t${tag.userVisible}\n\t\t\t\t${tag.userAssignable}\n\t\t\t\n\t\t\n\t`;\n try {\n await davClient.customRequest(path, {\n method: 'PROPPATCH',\n data,\n });\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to update tag'), { error });\n throw new Error(t('systemtags', 'Failed to update tag'));\n }\n};\nexport const deleteTag = async (tag) => {\n const path = '/systemtags/' + tag.id;\n try {\n await davClient.deleteFile(path);\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to delete tag'), { error });\n throw new Error(t('systemtags', 'Failed to delete tag'));\n }\n};\n","module.exports = {\n \"100\": \"Continue\",\n \"101\": \"Switching Protocols\",\n \"102\": \"Processing\",\n \"200\": \"OK\",\n \"201\": \"Created\",\n \"202\": \"Accepted\",\n \"203\": \"Non-Authoritative Information\",\n \"204\": \"No Content\",\n \"205\": \"Reset Content\",\n \"206\": \"Partial Content\",\n \"207\": \"Multi-Status\",\n \"208\": \"Already Reported\",\n \"226\": \"IM Used\",\n \"300\": \"Multiple Choices\",\n \"301\": \"Moved Permanently\",\n \"302\": \"Found\",\n \"303\": \"See Other\",\n \"304\": \"Not Modified\",\n \"305\": \"Use Proxy\",\n \"307\": \"Temporary Redirect\",\n \"308\": \"Permanent Redirect\",\n \"400\": \"Bad Request\",\n \"401\": \"Unauthorized\",\n \"402\": \"Payment Required\",\n \"403\": \"Forbidden\",\n \"404\": \"Not Found\",\n \"405\": \"Method Not Allowed\",\n \"406\": \"Not Acceptable\",\n \"407\": \"Proxy Authentication Required\",\n \"408\": \"Request Timeout\",\n \"409\": \"Conflict\",\n \"410\": \"Gone\",\n \"411\": \"Length Required\",\n \"412\": \"Precondition Failed\",\n \"413\": \"Payload Too Large\",\n \"414\": \"URI Too Long\",\n \"415\": \"Unsupported Media Type\",\n \"416\": \"Range Not Satisfiable\",\n \"417\": \"Expectation Failed\",\n \"418\": \"I'm a teapot\",\n \"421\": \"Misdirected Request\",\n \"422\": \"Unprocessable Entity\",\n \"423\": \"Locked\",\n \"424\": \"Failed Dependency\",\n \"425\": \"Unordered Collection\",\n \"426\": \"Upgrade Required\",\n \"428\": \"Precondition Required\",\n \"429\": \"Too Many Requests\",\n \"431\": \"Request Header Fields Too Large\",\n \"451\": \"Unavailable For Legal Reasons\",\n \"500\": \"Internal Server Error\",\n \"501\": \"Not Implemented\",\n \"502\": \"Bad Gateway\",\n \"503\": \"Service Unavailable\",\n \"504\": \"Gateway Timeout\",\n \"505\": \"HTTP Version Not Supported\",\n \"506\": \"Variant Also Negotiates\",\n \"507\": \"Insufficient Storage\",\n \"508\": \"Loop Detected\",\n \"509\": \"Bandwidth Limit Exceeded\",\n \"510\": \"Not Extended\",\n \"511\": \"Network Authentication Required\"\n}\n","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([\"exports\"], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports);\n global.CancelablePromise = mod.exports;\n }\n})(typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : this, function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.CancelablePromise = void 0;\n _exports.cancelable = cancelable;\n _exports.default = void 0;\n _exports.isCancelablePromise = isCancelablePromise;\n\n function _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\n function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\n function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\n function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\n function _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\n function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\n function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\n function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }\n\n function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\n\n function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"get\"); return _classApplyDescriptorGet(receiver, descriptor); }\n\n function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }\n\n function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"set\"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }\n\n function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError(\"attempted to \" + action + \" private field on non-instance\"); } return privateMap.get(receiver); }\n\n function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError(\"attempted to set read only private field\"); } descriptor.value = value; } }\n\n var toStringTag = typeof Symbol !== 'undefined' ? Symbol.toStringTag : '@@toStringTag';\n\n var _internals = /*#__PURE__*/new WeakMap();\n\n var _promise = /*#__PURE__*/new WeakMap();\n\n var CancelablePromiseInternal = /*#__PURE__*/function () {\n function CancelablePromiseInternal(_ref) {\n var _ref$executor = _ref.executor,\n executor = _ref$executor === void 0 ? function () {} : _ref$executor,\n _ref$internals = _ref.internals,\n internals = _ref$internals === void 0 ? defaultInternals() : _ref$internals,\n _ref$promise = _ref.promise,\n promise = _ref$promise === void 0 ? new Promise(function (resolve, reject) {\n return executor(resolve, reject, function (onCancel) {\n internals.onCancelList.push(onCancel);\n });\n }) : _ref$promise;\n\n _classCallCheck(this, CancelablePromiseInternal);\n\n _classPrivateFieldInitSpec(this, _internals, {\n writable: true,\n value: void 0\n });\n\n _classPrivateFieldInitSpec(this, _promise, {\n writable: true,\n value: void 0\n });\n\n _defineProperty(this, toStringTag, 'CancelablePromise');\n\n this.cancel = this.cancel.bind(this);\n\n _classPrivateFieldSet(this, _internals, internals);\n\n _classPrivateFieldSet(this, _promise, promise || new Promise(function (resolve, reject) {\n return executor(resolve, reject, function (onCancel) {\n internals.onCancelList.push(onCancel);\n });\n }));\n }\n\n _createClass(CancelablePromiseInternal, [{\n key: \"then\",\n value: function then(onfulfilled, onrejected) {\n return makeCancelable(_classPrivateFieldGet(this, _promise).then(createCallback(onfulfilled, _classPrivateFieldGet(this, _internals)), createCallback(onrejected, _classPrivateFieldGet(this, _internals))), _classPrivateFieldGet(this, _internals));\n }\n }, {\n key: \"catch\",\n value: function _catch(onrejected) {\n return makeCancelable(_classPrivateFieldGet(this, _promise).catch(createCallback(onrejected, _classPrivateFieldGet(this, _internals))), _classPrivateFieldGet(this, _internals));\n }\n }, {\n key: \"finally\",\n value: function _finally(onfinally, runWhenCanceled) {\n var _this = this;\n\n if (runWhenCanceled) {\n _classPrivateFieldGet(this, _internals).onCancelList.push(onfinally);\n }\n\n return makeCancelable(_classPrivateFieldGet(this, _promise).finally(createCallback(function () {\n if (onfinally) {\n if (runWhenCanceled) {\n _classPrivateFieldGet(_this, _internals).onCancelList = _classPrivateFieldGet(_this, _internals).onCancelList.filter(function (callback) {\n return callback !== onfinally;\n });\n }\n\n return onfinally();\n }\n }, _classPrivateFieldGet(this, _internals))), _classPrivateFieldGet(this, _internals));\n }\n }, {\n key: \"cancel\",\n value: function cancel() {\n _classPrivateFieldGet(this, _internals).isCanceled = true;\n\n var callbacks = _classPrivateFieldGet(this, _internals).onCancelList;\n\n _classPrivateFieldGet(this, _internals).onCancelList = [];\n\n var _iterator = _createForOfIteratorHelper(callbacks),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var callback = _step.value;\n\n if (typeof callback === 'function') {\n try {\n callback();\n } catch (err) {\n console.error(err);\n }\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n }, {\n key: \"isCanceled\",\n value: function isCanceled() {\n return _classPrivateFieldGet(this, _internals).isCanceled === true;\n }\n }]);\n\n return CancelablePromiseInternal;\n }();\n\n var CancelablePromise = /*#__PURE__*/function (_CancelablePromiseInt) {\n _inherits(CancelablePromise, _CancelablePromiseInt);\n\n var _super = _createSuper(CancelablePromise);\n\n function CancelablePromise(executor) {\n _classCallCheck(this, CancelablePromise);\n\n return _super.call(this, {\n executor: executor\n });\n }\n\n return _createClass(CancelablePromise);\n }(CancelablePromiseInternal);\n\n _exports.CancelablePromise = CancelablePromise;\n\n _defineProperty(CancelablePromise, \"all\", function all(iterable) {\n return makeAllCancelable(iterable, Promise.all(iterable));\n });\n\n _defineProperty(CancelablePromise, \"allSettled\", function allSettled(iterable) {\n return makeAllCancelable(iterable, Promise.allSettled(iterable));\n });\n\n _defineProperty(CancelablePromise, \"any\", function any(iterable) {\n return makeAllCancelable(iterable, Promise.any(iterable));\n });\n\n _defineProperty(CancelablePromise, \"race\", function race(iterable) {\n return makeAllCancelable(iterable, Promise.race(iterable));\n });\n\n _defineProperty(CancelablePromise, \"resolve\", function resolve(value) {\n return cancelable(Promise.resolve(value));\n });\n\n _defineProperty(CancelablePromise, \"reject\", function reject(reason) {\n return cancelable(Promise.reject(reason));\n });\n\n _defineProperty(CancelablePromise, \"isCancelable\", isCancelablePromise);\n\n var _default = CancelablePromise;\n _exports.default = _default;\n\n function cancelable(promise) {\n return makeCancelable(promise, defaultInternals());\n }\n\n function isCancelablePromise(promise) {\n return promise instanceof CancelablePromise || promise instanceof CancelablePromiseInternal;\n }\n\n function createCallback(onResult, internals) {\n if (onResult) {\n return function (arg) {\n if (!internals.isCanceled) {\n var result = onResult(arg);\n\n if (isCancelablePromise(result)) {\n internals.onCancelList.push(result.cancel);\n }\n\n return result;\n }\n\n return arg;\n };\n }\n }\n\n function makeCancelable(promise, internals) {\n return new CancelablePromiseInternal({\n internals: internals,\n promise: promise\n });\n }\n\n function makeAllCancelable(iterable, promise) {\n var internals = defaultInternals();\n internals.onCancelList.push(function () {\n var _iterator2 = _createForOfIteratorHelper(iterable),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var resolvable = _step2.value;\n\n if (isCancelablePromise(resolvable)) {\n resolvable.cancel();\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n });\n return new CancelablePromiseInternal({\n internals: internals,\n promise: promise\n });\n }\n\n function defaultInternals() {\n return {\n isCanceled: false,\n onCancelList: []\n };\n }\n});\n//# sourceMappingURL=CancelablePromise.js.map","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.files-list__system-tags{--min-size: 32px;display:none;justify-content:center;align-items:center;min-width:calc(var(--min-size)*2);max-width:300px}.files-list__system-tag{padding:5px 10px;border:1px solid;border-radius:var(--border-radius-pill);border-color:var(--color-border);color:var(--color-text-maxcontrast);height:var(--min-size);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:22px;text-align:center}.files-list__system-tag--more{overflow:visible;text-overflow:initial}.files-list__system-tag+.files-list__system-tag{margin-left:5px}@media(min-width: 512px){.files-list__system-tags{display:flex}}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/systemtags/src/css/fileEntryInlineSystemTags.scss\"],\"names\":[],\"mappings\":\"AAsBA,yBACC,gBAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,iCAAA,CACA,eAAA,CAGD,wBACC,gBAAA,CACA,gBAAA,CACA,uCAAA,CACA,gCAAA,CACA,mCAAA,CACA,sBAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CACA,gBAAA,CACA,iBAAA,CAEA,8BACC,gBAAA,CACA,qBAAA,CAID,gDACC,eAAA,CAIF,yBACC,yBACC,YAAA,CAAA\",\"sourcesContent\":[\"/**\\n * @copyright Copyright (c) 2023 Lucas Azevedo \\n *\\n * @author Lucas Azevedo \\n *\\n * @license AGPL-3.0-or-later\\n *\\n * This program is free software: you can redistribute it and/or modify\\n * it under the terms of the GNU Affero General Public License as\\n * published by the Free Software Foundation, either version 3 of the\\n * License, or (at your option) any later version.\\n *\\n * This program is distributed in the hope that it will be useful,\\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n * GNU Affero General Public License for more details.\\n *\\n * You should have received a copy of the GNU Affero General Public License\\n * along with this program. If not, see .\\n *\\n */\\n\\n.files-list__system-tags {\\n\\t--min-size: 32px;\\n\\tdisplay: none;\\n\\tjustify-content: center;\\n\\talign-items: center;\\n\\tmin-width: calc(var(--min-size) * 2);\\n\\tmax-width: 300px;\\n}\\n\\n.files-list__system-tag {\\n\\tpadding: 5px 10px;\\n\\tborder: 1px solid;\\n\\tborder-radius: var(--border-radius-pill);\\n\\tborder-color: var(--color-border);\\n\\tcolor: var(--color-text-maxcontrast);\\n\\theight: var(--min-size);\\n\\twhite-space: nowrap;\\n\\toverflow: hidden;\\n\\ttext-overflow: ellipsis;\\n\\tline-height: 22px; // min-size - 2 * 5px padding\\n\\ttext-align: center;\\n\\n\\t&--more {\\n\\t\\toverflow: visible;\\n\\t\\ttext-overflow: initial;\\n\\t}\\n\\n\\t// Proper spacing if multiple shown\\n\\t& + .files-list__system-tag {\\n\\t\\tmargin-left: 5px;\\n\\t}\\n}\\n\\n@media (min-width: 512px) {\\n\\t.files-list__system-tags {\\n\\t\\tdisplay: flex;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var http = require('http')\nvar url = require('url')\n\nvar https = module.exports\n\nfor (var key in http) {\n if (http.hasOwnProperty(key)) https[key] = http[key]\n}\n\nhttps.request = function (params, cb) {\n params = validateParams(params)\n return http.request.call(this, params, cb)\n}\n\nhttps.get = function (params, cb) {\n params = validateParams(params)\n return http.get.call(this, params, cb)\n}\n\nfunction validateParams (params) {\n if (typeof params === 'string') {\n params = url.parse(params)\n }\n if (!params.protocol) {\n params.protocol = 'https:'\n }\n if (params.protocol !== 'https:') {\n throw new Error('Protocol \"' + params.protocol + '\" not supported. Expected \"https:\"')\n }\n return params\n}\n","exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\nexports.finished = require('./lib/internal/streams/end-of-stream.js');\nexports.pipeline = require('./lib/internal/streams/pipeline.js');\n","var ClientRequest = require('./lib/request')\nvar response = require('./lib/response')\nvar extend = require('xtend')\nvar statusCodes = require('builtin-status-codes')\nvar url = require('url')\n\nvar http = exports\n\nhttp.request = function (opts, cb) {\n\tif (typeof opts === 'string')\n\t\topts = url.parse(opts)\n\telse\n\t\topts = extend(opts)\n\n\t// Normally, the page is loaded from http or https, so not specifying a protocol\n\t// will result in a (valid) protocol-relative url. However, this won't work if\n\t// the protocol is something else, like 'file:'\n\tvar defaultProtocol = global.location.protocol.search(/^https?:$/) === -1 ? 'http:' : ''\n\n\tvar protocol = opts.protocol || defaultProtocol\n\tvar host = opts.hostname || opts.host\n\tvar port = opts.port\n\tvar path = opts.path || '/'\n\n\t// Necessary for IPv6 addresses\n\tif (host && host.indexOf(':') !== -1)\n\t\thost = '[' + host + ']'\n\n\t// This may be a relative url. The browser should always be able to interpret it correctly.\n\topts.url = (host ? (protocol + '//' + host) : '') + (port ? ':' + port : '') + path\n\topts.method = (opts.method || 'GET').toUpperCase()\n\topts.headers = opts.headers || {}\n\n\t// Also valid opts.auth, opts.mode\n\n\tvar req = new ClientRequest(opts)\n\tif (cb)\n\t\treq.on('response', cb)\n\treturn req\n}\n\nhttp.get = function get (opts, cb) {\n\tvar req = http.request(opts, cb)\n\treq.end()\n\treturn req\n}\n\nhttp.ClientRequest = ClientRequest\nhttp.IncomingMessage = response.IncomingMessage\n\nhttp.Agent = function () {}\nhttp.Agent.defaultMaxSockets = 4\n\nhttp.globalAgent = new http.Agent()\n\nhttp.STATUS_CODES = statusCodes\n\nhttp.METHODS = [\n\t'CHECKOUT',\n\t'CONNECT',\n\t'COPY',\n\t'DELETE',\n\t'GET',\n\t'HEAD',\n\t'LOCK',\n\t'M-SEARCH',\n\t'MERGE',\n\t'MKACTIVITY',\n\t'MKCOL',\n\t'MOVE',\n\t'NOTIFY',\n\t'OPTIONS',\n\t'PATCH',\n\t'POST',\n\t'PROPFIND',\n\t'PROPPATCH',\n\t'PURGE',\n\t'PUT',\n\t'REPORT',\n\t'SEARCH',\n\t'SUBSCRIBE',\n\t'TRACE',\n\t'UNLOCK',\n\t'UNSUBSCRIBE'\n]","exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableStream)\n\nexports.writableStream = isFunction(global.WritableStream)\n\nexports.abortController = isFunction(global.AbortController)\n\n// The xhr request to example.com may violate some restrictive CSP configurations,\n// so if we're running in a browser that supports `fetch`, avoid calling getXHR()\n// and assume support for certain features below.\nvar xhr\nfunction getXHR () {\n\t// Cache the xhr value\n\tif (xhr !== undefined) return xhr\n\n\tif (global.XMLHttpRequest) {\n\t\txhr = new global.XMLHttpRequest()\n\t\t// If XDomainRequest is available (ie only, where xhr might not work\n\t\t// cross domain), use the page location. Otherwise use example.com\n\t\t// Note: this doesn't actually make an http request.\n\t\ttry {\n\t\t\txhr.open('GET', global.XDomainRequest ? '/' : 'https://example.com')\n\t\t} catch(e) {\n\t\t\txhr = null\n\t\t}\n\t} else {\n\t\t// Service workers don't have XHR\n\t\txhr = null\n\t}\n\treturn xhr\n}\n\nfunction checkTypeSupport (type) {\n\tvar xhr = getXHR()\n\tif (!xhr) return false\n\ttry {\n\t\txhr.responseType = type\n\t\treturn xhr.responseType === type\n\t} catch (e) {}\n\treturn false\n}\n\n// If fetch is supported, then arraybuffer will be supported too. Skip calling\n// checkTypeSupport(), since that calls getXHR().\nexports.arraybuffer = exports.fetch || checkTypeSupport('arraybuffer')\n\n// These next two tests unavoidably show warnings in Chrome. Since fetch will always\n// be used if it's available, just return false for these to avoid the warnings.\nexports.msstream = !exports.fetch && checkTypeSupport('ms-stream')\nexports.mozchunkedarraybuffer = !exports.fetch && checkTypeSupport('moz-chunked-arraybuffer')\n\n// If fetch is supported, then overrideMimeType will be supported too. Skip calling\n// getXHR().\nexports.overrideMimeType = exports.fetch || (getXHR() ? isFunction(getXHR().overrideMimeType) : false)\n\nfunction isFunction (value) {\n\treturn typeof value === 'function'\n}\n\nxhr = null // Help gc\n","var capability = require('./capability')\nvar inherits = require('inherits')\nvar response = require('./response')\nvar stream = require('readable-stream')\n\nvar IncomingMessage = response.IncomingMessage\nvar rStates = response.readyStates\n\nfunction decideMode (preferBinary, useFetch) {\n\tif (capability.fetch && useFetch) {\n\t\treturn 'fetch'\n\t} else if (capability.mozchunkedarraybuffer) {\n\t\treturn 'moz-chunked-arraybuffer'\n\t} else if (capability.msstream) {\n\t\treturn 'ms-stream'\n\t} else if (capability.arraybuffer && preferBinary) {\n\t\treturn 'arraybuffer'\n\t} else {\n\t\treturn 'text'\n\t}\n}\n\nvar ClientRequest = module.exports = function (opts) {\n\tvar self = this\n\tstream.Writable.call(self)\n\n\tself._opts = opts\n\tself._body = []\n\tself._headers = {}\n\tif (opts.auth)\n\t\tself.setHeader('Authorization', 'Basic ' + Buffer.from(opts.auth).toString('base64'))\n\tObject.keys(opts.headers).forEach(function (name) {\n\t\tself.setHeader(name, opts.headers[name])\n\t})\n\n\tvar preferBinary\n\tvar useFetch = true\n\tif (opts.mode === 'disable-fetch' || ('requestTimeout' in opts && !capability.abortController)) {\n\t\t// If the use of XHR should be preferred. Not typically needed.\n\t\tuseFetch = false\n\t\tpreferBinary = true\n\t} else if (opts.mode === 'prefer-streaming') {\n\t\t// If streaming is a high priority but binary compatibility and\n\t\t// the accuracy of the 'content-type' header aren't\n\t\tpreferBinary = false\n\t} else if (opts.mode === 'allow-wrong-content-type') {\n\t\t// If streaming is more important than preserving the 'content-type' header\n\t\tpreferBinary = !capability.overrideMimeType\n\t} else if (!opts.mode || opts.mode === 'default' || opts.mode === 'prefer-fast') {\n\t\t// Use binary if text streaming may corrupt data or the content-type header, or for speed\n\t\tpreferBinary = true\n\t} else {\n\t\tthrow new Error('Invalid value for opts.mode')\n\t}\n\tself._mode = decideMode(preferBinary, useFetch)\n\tself._fetchTimer = null\n\tself._socketTimeout = null\n\tself._socketTimer = null\n\n\tself.on('finish', function () {\n\t\tself._onFinish()\n\t})\n}\n\ninherits(ClientRequest, stream.Writable)\n\nClientRequest.prototype.setHeader = function (name, value) {\n\tvar self = this\n\tvar lowerName = name.toLowerCase()\n\t// This check is not necessary, but it prevents warnings from browsers about setting unsafe\n\t// headers. To be honest I'm not entirely sure hiding these warnings is a good thing, but\n\t// http-browserify did it, so I will too.\n\tif (unsafeHeaders.indexOf(lowerName) !== -1)\n\t\treturn\n\n\tself._headers[lowerName] = {\n\t\tname: name,\n\t\tvalue: value\n\t}\n}\n\nClientRequest.prototype.getHeader = function (name) {\n\tvar header = this._headers[name.toLowerCase()]\n\tif (header)\n\t\treturn header.value\n\treturn null\n}\n\nClientRequest.prototype.removeHeader = function (name) {\n\tvar self = this\n\tdelete self._headers[name.toLowerCase()]\n}\n\nClientRequest.prototype._onFinish = function () {\n\tvar self = this\n\n\tif (self._destroyed)\n\t\treturn\n\tvar opts = self._opts\n\n\tif ('timeout' in opts && opts.timeout !== 0) {\n\t\tself.setTimeout(opts.timeout)\n\t}\n\n\tvar headersObj = self._headers\n\tvar body = null\n\tif (opts.method !== 'GET' && opts.method !== 'HEAD') {\n body = new Blob(self._body, {\n type: (headersObj['content-type'] || {}).value || ''\n });\n }\n\n\t// create flattened list of headers\n\tvar headersList = []\n\tObject.keys(headersObj).forEach(function (keyName) {\n\t\tvar name = headersObj[keyName].name\n\t\tvar value = headersObj[keyName].value\n\t\tif (Array.isArray(value)) {\n\t\t\tvalue.forEach(function (v) {\n\t\t\t\theadersList.push([name, v])\n\t\t\t})\n\t\t} else {\n\t\t\theadersList.push([name, value])\n\t\t}\n\t})\n\n\tif (self._mode === 'fetch') {\n\t\tvar signal = null\n\t\tif (capability.abortController) {\n\t\t\tvar controller = new AbortController()\n\t\t\tsignal = controller.signal\n\t\t\tself._fetchAbortController = controller\n\n\t\t\tif ('requestTimeout' in opts && opts.requestTimeout !== 0) {\n\t\t\t\tself._fetchTimer = global.setTimeout(function () {\n\t\t\t\t\tself.emit('requestTimeout')\n\t\t\t\t\tif (self._fetchAbortController)\n\t\t\t\t\t\tself._fetchAbortController.abort()\n\t\t\t\t}, opts.requestTimeout)\n\t\t\t}\n\t\t}\n\n\t\tglobal.fetch(self._opts.url, {\n\t\t\tmethod: self._opts.method,\n\t\t\theaders: headersList,\n\t\t\tbody: body || undefined,\n\t\t\tmode: 'cors',\n\t\t\tcredentials: opts.withCredentials ? 'include' : 'same-origin',\n\t\t\tsignal: signal\n\t\t}).then(function (response) {\n\t\t\tself._fetchResponse = response\n\t\t\tself._resetTimers(false)\n\t\t\tself._connect()\n\t\t}, function (reason) {\n\t\t\tself._resetTimers(true)\n\t\t\tif (!self._destroyed)\n\t\t\t\tself.emit('error', reason)\n\t\t})\n\t} else {\n\t\tvar xhr = self._xhr = new global.XMLHttpRequest()\n\t\ttry {\n\t\t\txhr.open(self._opts.method, self._opts.url, true)\n\t\t} catch (err) {\n\t\t\tprocess.nextTick(function () {\n\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t\treturn\n\t\t}\n\n\t\t// Can't set responseType on really old browsers\n\t\tif ('responseType' in xhr)\n\t\t\txhr.responseType = self._mode\n\n\t\tif ('withCredentials' in xhr)\n\t\t\txhr.withCredentials = !!opts.withCredentials\n\n\t\tif (self._mode === 'text' && 'overrideMimeType' in xhr)\n\t\t\txhr.overrideMimeType('text/plain; charset=x-user-defined')\n\n\t\tif ('requestTimeout' in opts) {\n\t\t\txhr.timeout = opts.requestTimeout\n\t\t\txhr.ontimeout = function () {\n\t\t\t\tself.emit('requestTimeout')\n\t\t\t}\n\t\t}\n\n\t\theadersList.forEach(function (header) {\n\t\t\txhr.setRequestHeader(header[0], header[1])\n\t\t})\n\n\t\tself._response = null\n\t\txhr.onreadystatechange = function () {\n\t\t\tswitch (xhr.readyState) {\n\t\t\t\tcase rStates.LOADING:\n\t\t\t\tcase rStates.DONE:\n\t\t\t\t\tself._onXHRProgress()\n\t\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\t// Necessary for streaming in Firefox, since xhr.response is ONLY defined\n\t\t// in onprogress, not in onreadystatechange with xhr.readyState = 3\n\t\tif (self._mode === 'moz-chunked-arraybuffer') {\n\t\t\txhr.onprogress = function () {\n\t\t\t\tself._onXHRProgress()\n\t\t\t}\n\t\t}\n\n\t\txhr.onerror = function () {\n\t\t\tif (self._destroyed)\n\t\t\t\treturn\n\t\t\tself._resetTimers(true)\n\t\t\tself.emit('error', new Error('XHR error'))\n\t\t}\n\n\t\ttry {\n\t\t\txhr.send(body)\n\t\t} catch (err) {\n\t\t\tprocess.nextTick(function () {\n\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t\treturn\n\t\t}\n\t}\n}\n\n/**\n * Checks if xhr.status is readable and non-zero, indicating no error.\n * Even though the spec says it should be available in readyState 3,\n * accessing it throws an exception in IE8\n */\nfunction statusValid (xhr) {\n\ttry {\n\t\tvar status = xhr.status\n\t\treturn (status !== null && status !== 0)\n\t} catch (e) {\n\t\treturn false\n\t}\n}\n\nClientRequest.prototype._onXHRProgress = function () {\n\tvar self = this\n\n\tself._resetTimers(false)\n\n\tif (!statusValid(self._xhr) || self._destroyed)\n\t\treturn\n\n\tif (!self._response)\n\t\tself._connect()\n\n\tself._response._onXHRProgress(self._resetTimers.bind(self))\n}\n\nClientRequest.prototype._connect = function () {\n\tvar self = this\n\n\tif (self._destroyed)\n\t\treturn\n\n\tself._response = new IncomingMessage(self._xhr, self._fetchResponse, self._mode, self._resetTimers.bind(self))\n\tself._response.on('error', function(err) {\n\t\tself.emit('error', err)\n\t})\n\n\tself.emit('response', self._response)\n}\n\nClientRequest.prototype._write = function (chunk, encoding, cb) {\n\tvar self = this\n\n\tself._body.push(chunk)\n\tcb()\n}\n\nClientRequest.prototype._resetTimers = function (done) {\n\tvar self = this\n\n\tglobal.clearTimeout(self._socketTimer)\n\tself._socketTimer = null\n\n\tif (done) {\n\t\tglobal.clearTimeout(self._fetchTimer)\n\t\tself._fetchTimer = null\n\t} else if (self._socketTimeout) {\n\t\tself._socketTimer = global.setTimeout(function () {\n\t\t\tself.emit('timeout')\n\t\t}, self._socketTimeout)\n\t}\n}\n\nClientRequest.prototype.abort = ClientRequest.prototype.destroy = function (err) {\n\tvar self = this\n\tself._destroyed = true\n\tself._resetTimers(true)\n\tif (self._response)\n\t\tself._response._destroyed = true\n\tif (self._xhr)\n\t\tself._xhr.abort()\n\telse if (self._fetchAbortController)\n\t\tself._fetchAbortController.abort()\n\n\tif (err)\n\t\tself.emit('error', err)\n}\n\nClientRequest.prototype.end = function (data, encoding, cb) {\n\tvar self = this\n\tif (typeof data === 'function') {\n\t\tcb = data\n\t\tdata = undefined\n\t}\n\n\tstream.Writable.prototype.end.call(self, data, encoding, cb)\n}\n\nClientRequest.prototype.setTimeout = function (timeout, cb) {\n\tvar self = this\n\n\tif (cb)\n\t\tself.once('timeout', cb)\n\n\tself._socketTimeout = timeout\n\tself._resetTimers(false)\n}\n\nClientRequest.prototype.flushHeaders = function () {}\nClientRequest.prototype.setNoDelay = function () {}\nClientRequest.prototype.setSocketKeepAlive = function () {}\n\n// Taken from http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader%28%29-method\nvar unsafeHeaders = [\n\t'accept-charset',\n\t'accept-encoding',\n\t'access-control-request-headers',\n\t'access-control-request-method',\n\t'connection',\n\t'content-length',\n\t'cookie',\n\t'cookie2',\n\t'date',\n\t'dnt',\n\t'expect',\n\t'host',\n\t'keep-alive',\n\t'origin',\n\t'referer',\n\t'te',\n\t'trailer',\n\t'transfer-encoding',\n\t'upgrade',\n\t'via'\n]\n","var capability = require('./capability')\nvar inherits = require('inherits')\nvar stream = require('readable-stream')\n\nvar rStates = exports.readyStates = {\n\tUNSENT: 0,\n\tOPENED: 1,\n\tHEADERS_RECEIVED: 2,\n\tLOADING: 3,\n\tDONE: 4\n}\n\nvar IncomingMessage = exports.IncomingMessage = function (xhr, response, mode, resetTimers) {\n\tvar self = this\n\tstream.Readable.call(self)\n\n\tself._mode = mode\n\tself.headers = {}\n\tself.rawHeaders = []\n\tself.trailers = {}\n\tself.rawTrailers = []\n\n\t// Fake the 'close' event, but only once 'end' fires\n\tself.on('end', function () {\n\t\t// The nextTick is necessary to prevent the 'request' module from causing an infinite loop\n\t\tprocess.nextTick(function () {\n\t\t\tself.emit('close')\n\t\t})\n\t})\n\n\tif (mode === 'fetch') {\n\t\tself._fetchResponse = response\n\n\t\tself.url = response.url\n\t\tself.statusCode = response.status\n\t\tself.statusMessage = response.statusText\n\t\t\n\t\tresponse.headers.forEach(function (header, key){\n\t\t\tself.headers[key.toLowerCase()] = header\n\t\t\tself.rawHeaders.push(key, header)\n\t\t})\n\n\t\tif (capability.writableStream) {\n\t\t\tvar writable = new WritableStream({\n\t\t\t\twrite: function (chunk) {\n\t\t\t\t\tresetTimers(false)\n\t\t\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\t\t\tif (self._destroyed) {\n\t\t\t\t\t\t\treject()\n\t\t\t\t\t\t} else if(self.push(Buffer.from(chunk))) {\n\t\t\t\t\t\t\tresolve()\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tself._resumeFetch = resolve\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t\tclose: function () {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.push(null)\n\t\t\t\t},\n\t\t\t\tabort: function (err) {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.emit('error', err)\n\t\t\t\t}\n\t\t\t})\n\n\t\t\ttry {\n\t\t\t\tresponse.body.pipeTo(writable).catch(function (err) {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.emit('error', err)\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t} catch (e) {} // pipeTo method isn't defined. Can't find a better way to feature test this\n\t\t}\n\t\t// fallback for when writableStream or pipeTo aren't available\n\t\tvar reader = response.body.getReader()\n\t\tfunction read () {\n\t\t\treader.read().then(function (result) {\n\t\t\t\tif (self._destroyed)\n\t\t\t\t\treturn\n\t\t\t\tresetTimers(result.done)\n\t\t\t\tif (result.done) {\n\t\t\t\t\tself.push(null)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tself.push(Buffer.from(result.value))\n\t\t\t\tread()\n\t\t\t}).catch(function (err) {\n\t\t\t\tresetTimers(true)\n\t\t\t\tif (!self._destroyed)\n\t\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t}\n\t\tread()\n\t} else {\n\t\tself._xhr = xhr\n\t\tself._pos = 0\n\n\t\tself.url = xhr.responseURL\n\t\tself.statusCode = xhr.status\n\t\tself.statusMessage = xhr.statusText\n\t\tvar headers = xhr.getAllResponseHeaders().split(/\\r?\\n/)\n\t\theaders.forEach(function (header) {\n\t\t\tvar matches = header.match(/^([^:]+):\\s*(.*)/)\n\t\t\tif (matches) {\n\t\t\t\tvar key = matches[1].toLowerCase()\n\t\t\t\tif (key === 'set-cookie') {\n\t\t\t\t\tif (self.headers[key] === undefined) {\n\t\t\t\t\t\tself.headers[key] = []\n\t\t\t\t\t}\n\t\t\t\t\tself.headers[key].push(matches[2])\n\t\t\t\t} else if (self.headers[key] !== undefined) {\n\t\t\t\t\tself.headers[key] += ', ' + matches[2]\n\t\t\t\t} else {\n\t\t\t\t\tself.headers[key] = matches[2]\n\t\t\t\t}\n\t\t\t\tself.rawHeaders.push(matches[1], matches[2])\n\t\t\t}\n\t\t})\n\n\t\tself._charset = 'x-user-defined'\n\t\tif (!capability.overrideMimeType) {\n\t\t\tvar mimeType = self.rawHeaders['mime-type']\n\t\t\tif (mimeType) {\n\t\t\t\tvar charsetMatch = mimeType.match(/;\\s*charset=([^;])(;|$)/)\n\t\t\t\tif (charsetMatch) {\n\t\t\t\t\tself._charset = charsetMatch[1].toLowerCase()\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!self._charset)\n\t\t\t\tself._charset = 'utf-8' // best guess\n\t\t}\n\t}\n}\n\ninherits(IncomingMessage, stream.Readable)\n\nIncomingMessage.prototype._read = function () {\n\tvar self = this\n\n\tvar resolve = self._resumeFetch\n\tif (resolve) {\n\t\tself._resumeFetch = null\n\t\tresolve()\n\t}\n}\n\nIncomingMessage.prototype._onXHRProgress = function (resetTimers) {\n\tvar self = this\n\n\tvar xhr = self._xhr\n\n\tvar response = null\n\tswitch (self._mode) {\n\t\tcase 'text':\n\t\t\tresponse = xhr.responseText\n\t\t\tif (response.length > self._pos) {\n\t\t\t\tvar newData = response.substr(self._pos)\n\t\t\t\tif (self._charset === 'x-user-defined') {\n\t\t\t\t\tvar buffer = Buffer.alloc(newData.length)\n\t\t\t\t\tfor (var i = 0; i < newData.length; i++)\n\t\t\t\t\t\tbuffer[i] = newData.charCodeAt(i) & 0xff\n\n\t\t\t\t\tself.push(buffer)\n\t\t\t\t} else {\n\t\t\t\t\tself.push(newData, self._charset)\n\t\t\t\t}\n\t\t\t\tself._pos = response.length\n\t\t\t}\n\t\t\tbreak\n\t\tcase 'arraybuffer':\n\t\t\tif (xhr.readyState !== rStates.DONE || !xhr.response)\n\t\t\t\tbreak\n\t\t\tresponse = xhr.response\n\t\t\tself.push(Buffer.from(new Uint8Array(response)))\n\t\t\tbreak\n\t\tcase 'moz-chunked-arraybuffer': // take whole\n\t\t\tresponse = xhr.response\n\t\t\tif (xhr.readyState !== rStates.LOADING || !response)\n\t\t\t\tbreak\n\t\t\tself.push(Buffer.from(new Uint8Array(response)))\n\t\t\tbreak\n\t\tcase 'ms-stream':\n\t\t\tresponse = xhr.response\n\t\t\tif (xhr.readyState !== rStates.LOADING)\n\t\t\t\tbreak\n\t\t\tvar reader = new global.MSStreamReader()\n\t\t\treader.onprogress = function () {\n\t\t\t\tif (reader.result.byteLength > self._pos) {\n\t\t\t\t\tself.push(Buffer.from(new Uint8Array(reader.result.slice(self._pos))))\n\t\t\t\t\tself._pos = reader.result.byteLength\n\t\t\t\t}\n\t\t\t}\n\t\t\treader.onload = function () {\n\t\t\t\tresetTimers(true)\n\t\t\t\tself.push(null)\n\t\t\t}\n\t\t\t// reader.onerror = ??? // TODO: this\n\t\t\treader.readAsArrayBuffer(response)\n\t\t\tbreak\n\t}\n\n\t// The ms-stream case handles end separately in reader.onload()\n\tif (self._xhr.readyState === rStates.DONE && self._mode !== 'ms-stream') {\n\t\tresetTimers(true)\n\t\tself.push(null)\n\t}\n}\n","module.exports = extend\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key]\n }\n }\n }\n\n return target\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","// The chunk loading function for additional chunks\n// Since all referenced chunks are already included\n// in this file, this function is empty here.\n__webpack_require__.e = () => (Promise.resolve());","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 5191;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t5191: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], () => (__webpack_require__(11057)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","m","e","setApp","build","setUid","uid","Z","DEFAULT","HIDDEN","N","NONE","CREATE","READ","UPDATE","DELETE","SHARE","ALL","j","Y","d","nc","oc","ocs","R","Folder","File","J","t","match","X","id","Error","source","URL","startsWith","mtime","Date","crtime","mime","size","permissions","owner","attributes","root","includes","r","status","Object","values","Q","NEW","FAILED","LOADING","LOCKED","D","_data","_attributes","_knownDavService","constructor","this","s","set","n","i","updateMtime","Reflect","deleteProperty","Proxy","replace","encodedSource","origin","slice","length","basename","extension","dirname","isDavRessource","split","pop","indexOf","pathname","path","fileid","move","rename","ye","type","_e","super","Ie","_column","Ae","title","render","sort","summary","S","O","RegExp","isExist","u","isEmptyObject","keys","merge","o","a","l","f","c","getValue","isName","exec","getAllMatches","startIndex","lastIndex","g","push","nameRegexp","M","Oe","allowBooleanAttributes","unpairedTags","U","G","substr","p","w","z","validate","assign","err","trim","substring","Re","xe","value","index","H","code","msg","line","tagClosed","tagName","tagStartPos","col","Ve","JSON","stringify","map","Ce","Pe","$e","v","Le","hasOwnProperty","Fe","k","re","preserveOrder","attributeNamePrefix","attributesGroupName","textNodeName","ignoreAttributes","removeNSPrefix","parseTagValue","parseAttributeValue","trimValues","cdataPropName","numberParseOptions","hex","leadingZeros","eNotation","tagValueProcessor","attributeValueProcessor","stopNodes","alwaysCreateTextNode","isArray","commentPropName","processEntities","htmlEntities","ignoreDeclaration","ignorePiTags","transformTagName","transformAttributeName","updateTag","buildOptions","defaultOptions","Be","Xe","Ue","Ge","ze","He","Ke","We","je","Ye","Number","parseInt","window","parseFloat","Je","decimalPoint","B","T","tagname","child","add","addChild","tt","entityName","val","regx","entities","rt","skipLike","test","De","search","it","lastEntities","regex","st","options","replaceEntitiesValue","$","ot","charAt","ut","dt","resolveNameSpace","at","y","saveTextToParentTag","lastIndexOf","tagsNodeStack","x","tagExp","attrExpPresent","buildAttributesMap","closeIndex","docTypeEntities","parseTextData","rawTagName","isItStopNode","h","E","readStopNodeData","tagContent","_","lt","ft","ampEntity","ct","ht","data","pt","gt","ne","ie","Nt","bt","Et","Array","prettify","yt","_t","currentNode","apos","quot","space","cent","pound","yen","euro","copyright","reg","inr","addExternalEntities","parseXml","vt","Tt","se","Pt","xt","oe","K","indentBy","suppressUnpairedNode","suppressEmptyNode","endsWith","suppressBooleanAttributes","Ft","format","Vt","oneListGroup","b","isAttribute","attrPrefixLen","St","processTextOrObjNode","Lt","indentate","Rt","tagEndChar","newLine","j2x","buildTextValNode","attrStr","buildObjectNode","repeat","prototype","arrayNodeName","call","buildAttrPairStr","closeTag","W","XMLParser","externalEntities","parse","toString","addEntity","XMLValidator","XMLBuilder","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","getNodeSystemTags","node","tags","undefined","flat","renderTag","tag","isMore","arguments","tagElement","document","createElement","classList","textContent","action","_action","validateAction","displayName","iconSvgInline","enabled","execBatch","order","parent","default","inline","renderInline","nodes","async","systemTagsElement","setAttribute","firstTags","join","lastTag","append","moreTagElement","_nc_dav_properties","_nc_dav_namespaces","find","error","prop","namespaces","registerDavProperty","_nc_fileactions","debug","registerFileAction","rootUrl","generateRemoteUrl","davClient","createClient","headers","requesttoken","getRequestToken","logger","getLoggerBuilder","detectUser","WorkerGlobalScope","self","globalThis","fetch","bind","Headers","Request","Response","HOT_PATCHER_TYPE","NOOP","createNewItem","method","original","methods","final","HotPatcher","_configuration","registry","getEmptyAction","__type__","configuration","newAction","control","target","allowTargetOverrides","forEach","foreignKey","execute","key","args","get","item","result","_this","shift","apply","sequence","isPatched","patch","opts","chain","patchInline","plugin","restore","setFinal","__patcher","NONCE_CHARS","generateDigestAuthHeader","digest","url","uri","toUpperCase","qop","ncString","ha1","algorithm","user","realm","pass","nonce","cnonce","ha1Hash","md5","toLowerCase","ha1Compute","username","password","ha2","digestResponse","authValues","response","opaque","authHeader","obj","getPrototypeOf","proto","isPlainObject","setPrototypeOf","output","items","nextItem","mergeObjects","obj1","obj2","headerPayloads","headerKeys","reduce","header","lowerHeader","hasArrayBuffer","ArrayBuffer","objToString","_request","requestOptions","patcher","body","newHeaders","isBuffer","isArrayBuffer","requestDataToFetchBody","signal","withCredentials","credentials","httpAgent","httpsAgent","agent","parsedURL","protocol","getFetchOptions","rootPath","getCurrentUser","defaultRootUrl","getClient","client","getPatcher","_digest","hasDigestAuth","Authorization","Math","floor","random","makeNonce","parseDigestAuth","response2","request","resultToNode","userId","props","davParsePermissions","filename","charCodeAt","nodeData","lastmod","hasPreview","failed","formatReportPayload","tagId","tagToNode","Permission","_nc_navigation","_views","_currentView","register","remove","findIndex","splice","views","setActive","active","_view","name","columns","caption","getContents","icon","TypeError","Xt","emptyView","sticky","expanded","defaultSortKey","Ut","emptyTitle","emptyCaption","params","tagsCache","getDirectoryContents","details","glob","_ref","fromEntries","entries","_ref2","camelCase","String","parseTags","fetchTags","filter","userVisible","folder","contents","module","exports","_typeof","Symbol","iterator","_exports","_setPrototypeOf","__proto__","_createSuper","Derived","hasNativeReflectConstruct","construct","sham","Boolean","valueOf","_isNativeReflectConstruct","Super","_getPrototypeOf","NewTarget","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_createForOfIteratorHelper","allowArrayLike","minLen","_arrayLikeToArray","from","_unsupportedIterableToArray","F","done","normalCompletion","didErr","step","next","_e2","return","arr","len","arr2","_classCallCheck","instance","Constructor","_defineProperties","descriptor","enumerable","configurable","writable","defineProperty","_createClass","protoProps","staticProps","_defineProperty","_classPrivateFieldInitSpec","privateMap","privateCollection","has","_checkPrivateRedeclaration","_classPrivateFieldGet","receiver","_classApplyDescriptorGet","_classExtractFieldDescriptor","_classPrivateFieldSet","_classApplyDescriptorSet","CancelablePromise","cancelable","isCancelablePromise","toStringTag","_internals","WeakMap","_promise","CancelablePromiseInternal","_ref$executor","executor","_ref$internals","internals","isCanceled","onCancelList","_ref$promise","promise","Promise","resolve","reject","onCancel","cancel","onfulfilled","onrejected","makeCancelable","then","createCallback","catch","onfinally","runWhenCanceled","finally","callback","callbacks","_step","_iterator","console","_CancelablePromiseInt","subClass","superClass","create","_inherits","_super","iterable","makeAllCancelable","all","allSettled","any","race","reason","_default","onResult","arg","_step2","_iterator2","resolvable","___CSS_LOADER_EXPORT___","http","https","validateParams","cb","Stream","Readable","Writable","Duplex","Transform","PassThrough","finished","pipeline","ClientRequest","extend","statusCodes","defaultProtocol","location","host","hostname","port","req","on","end","IncomingMessage","Agent","defaultMaxSockets","globalAgent","STATUS_CODES","METHODS","xhr","getXHR","XMLHttpRequest","open","XDomainRequest","checkTypeSupport","responseType","isFunction","ReadableStream","writableStream","WritableStream","abortController","AbortController","arraybuffer","msstream","mozchunkedarraybuffer","overrideMimeType","capability","inherits","stream","rStates","readyStates","preferBinary","_opts","_body","_headers","auth","setHeader","Buffer","useFetch","mode","_mode","decideMode","_fetchTimer","_socketTimeout","_socketTimer","_onFinish","lowerName","unsafeHeaders","getHeader","removeHeader","_destroyed","timeout","setTimeout","headersObj","Blob","headersList","keyName","controller","_fetchAbortController","requestTimeout","emit","abort","_fetchResponse","_resetTimers","_connect","_xhr","process","nextTick","ontimeout","setRequestHeader","_response","onreadystatechange","readyState","DONE","_onXHRProgress","onprogress","onerror","send","statusValid","_write","chunk","encoding","clearTimeout","destroy","once","flushHeaders","setNoDelay","setSocketKeepAlive","UNSENT","OPENED","HEADERS_RECEIVED","resetTimers","rawHeaders","trailers","rawTrailers","statusCode","statusMessage","statusText","write","_resumeFetch","close","pipeTo","reader","getReader","read","_pos","responseURL","getAllResponseHeaders","matches","_charset","mimeType","charsetMatch","_read","responseText","newData","buffer","alloc","Uint8Array","MSStreamReader","byteLength","onload","readAsArrayBuffer","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","every","getter","__esModule","definition","Function","nmd","paths","children","baseURI","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file