]> source.dussan.org Git - nextcloud-server.git/commitdiff
Change to capital letter
authorValdnet <47037905+Valdnet@users.noreply.github.com>
Sun, 26 Nov 2023 10:32:03 +0000 (11:32 +0100)
committerAndy Scherzinger <info@andy-scherzinger.de>
Tue, 28 Nov 2023 14:48:58 +0000 (15:48 +0100)
Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
apps/files_external/src/actions/openInFilesAction.ts
dist/files_external-init.js
dist/files_external-init.js.map

index 8033caed1236faf4fe8d5c248edd4b43b7f98a3f..36b434fee9cdc81b703d5bf0a4489d3f3fb3b11f 100644 (file)
@@ -35,7 +35,7 @@ export const action = new FileAction({
                if (config.status !== STORAGE_STATUS.SUCCESS) {
                        return t('files_external', 'Examine this faulty external storage configuration')
                }
-               return t('files', 'Open in files')
+               return t('files', 'Open in Files')
        },
        iconSvgInline: () => '',
 
index 2e71b6a3d929e18c2e19b147a997b25a9faecd01..e1a5aa6929fd7b7079822dd429541fe4b57f3f48 100644 (file)
@@ -1,3 +1,3 @@
 /*! For license information please see files_external-init.js.LICENSE.txt */
-(()=>{"use strict";var t,e,n,i={5220:(t,e,n)=>{var i,r=n(43554),s=n(31352),o=n(5656),a=n(79753),l=n(64024),u=n(93664),c=n(20144);!function(t){t[t.SUCCESS=0]="SUCCESS",t[t.ERROR=1]="ERROR",t[t.INDETERMINATE=2]="INDETERMINATE",t[t.INCOMPLETE_CONF=3]="INCOMPLETE_CONF",t[t.UNAUTHORIZED=4]="UNAUTHORIZED",t[t.TIMEOUT=5]="TIMEOUT",t[t.NETWORK_ERROR=6]="NETWORK_ERROR"}(i||(i={}));const d=function(t){return!(!t.status||t.status===i.SUCCESS)&&(t.userProvided||"password::global::user"===t.authMechanism)},p=function(t){if(t.type===o.Tv.File)return!1;const e=t.attributes;return!(!e.scope||!e.backend||"personal"!==e.scope&&"system"!==e.scope)},h=new o.p$({id:"credentials-external-storage",displayName:()=>(0,s.Iu)("files","Enter missing credentials"),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-login" viewBox="0 0 24 24"><path d="M11 7L9.6 8.4L12.2 11H2V13H12.2L9.6 15.6L11 17L16 12L11 7M20 19H12V21H20C21.1 21 22 20.1 22 19V5C22 3.9 21.1 3 20 3H12V5H20V19Z" /></svg>',enabled:t=>{if(1!==t.length)return!1;const e=t[0];if(!p(e))return!1;const n=e.attributes?.config||{};return!!d(n)},async exec(t){const e=await fetch((0,a.generateOcsUrl)("/apps/files_external/api/v1/auth"),{headers:new Headers({Accept:"application/json"}),credentials:"include"}),n=await(e?.json())||{};if(n.ocs.data.user&&n.ocs.data.password){const e=(await u.Z.put((0,a.generateUrl)("apps/files_external/userglobalstorages/{id}",t.attributes),{backendOptions:n.ocs.data})).data;if(e.status!==i.SUCCESS)return(0,l.x2)((0,s.Iu)("files_external","Unable to update this external storage config. {statusMessage}",{statusMessage:e?.statusMessage||""})),null;(0,l.s$)((0,s.Iu)("files_external","New configuration successfully saved")),c.default.set(t.attributes,"config",e)}return null},order:-1e3,default:o.DT.DEFAULT,inline:()=>!0});var f=n(93379),g=n.n(f),m=n(7795),w=n.n(m),v=n(90569),b=n.n(v),x=n(3565),y=n.n(x),E=n(19216),A=n.n(E),N=n(44589),_=n.n(N),T=n(17150),C={};C.styleTagTransform=_(),C.setAttributes=y(),C.insert=b().bind(null,"head"),C.domAPI=w(),C.insertStyleElement=A(),g()(T.Z,C),T.Z&&T.Z.locals&&T.Z.locals;var I=n(77958);const O=`/files/${(0,I.ts)()?.uid}`,S=t=>{const e=(t.path+"/"+t.name).replace(/^\//gm,"");return new o.gt({id:t.id,source:(0,a.generateRemoteUrl)("dav"+O+"/"+e),root:O,owner:(0,I.ts)()?.uid||null,permissions:t.config.status!==i.SUCCESS?o.y3.NONE:t?.permissions||o.y3.READ,attributes:{displayName:e,...t}})},P=new o.p$({id:"check-external-storage",displayName:()=>"",iconSvgInline:()=>"",enabled:t=>t.every((t=>!0===p(t))),exec:async()=>null,async renderInline(t){let e=null;try{const n=await function(t){const e=arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?"userstorages":"userglobalstorages";return u.Z.get((0,a.generateUrl)(`apps/files_external/${e}/${t}?testOnly=false`))}(t.attributes.id,"system"===t.attributes.scope);if(e=n.data,c.default.set(t.attributes,"config",e),e.status!==i.SUCCESS)throw new Error(e?.statusMessage||(0,s.Iu)("files_external","There was an error with this external storage."));return null}catch(n){if(n.response&&!e)return(0,l.K2)((0,s.Iu)("files_external","We were unable to check the external storage {basename}",{basename:t.basename})),null;const i=d(e),r=document.createElement("span");r.classList.add("files-list__row-status--"+(i?"warning":"error"));const o=document.createElement("span");return o.className="files-list__row-status",i||(o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-alert-circle" viewBox="0 0 24 24"><path d="M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" /></svg>',o.title=n.message),o.prepend(r),o}},order:10}),D=new o.p$({id:"open-in-files-external-storage",displayName:t=>(t?.[0]?.attributes?.config||{status:i.INDETERMINATE}).status!==i.SUCCESS?(0,s.Iu)("files_external","Examine this faulty external storage configuration"):(0,s.Iu)("files","Open in files"),iconSvgInline:()=>"",enabled:(t,e)=>"extstoragemounts"===e.id,async exec(t){const e=t.attributes.config;return e?.status!==i.SUCCESS?(window.OC.dialogs.confirm((0,s.Iu)("files_external","There was an error with this external storage. Do you want to review this mount point config in the settings page?"),(0,s.Iu)("files_external","External mount error"),(e=>{if(!0===e){const e="personal"===t.attributes.scope?"user":"admin";window.location.href=(0,a.generateUrl)(`/settings/${e}/externalstorages`)}})),null):(window.OCP.Files.Router.goToRoute(null,{view:"files"},{dir:t.path}),null)},order:-1e3,default:o.DT.HIDDEN}),k=(0,r.j)("files_external","allowUserMounting",!1);(0,o.Ti)().register(new o.G7({id:"extstoragemounts",name:(0,s.Iu)("files_external","External storage"),caption:(0,s.Iu)("files_external","List of external storage."),emptyCaption:k?(0,s.Iu)("files_external","There is no external storage configured. You can configure them in your Personal settings."):(0,s.Iu)("files_external","There is no external storage configured and you don't have the permission to configure them."),emptyTitle:(0,s.Iu)("files_external","No external storage"),icon:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-folder-network" viewBox="0 0 24 24"><path d="M3,15V5A2,2 0 0,1 5,3H11L13,5H19A2,2 0 0,1 21,7V15A2,2 0 0,1 19,17H13V19H14A1,1 0 0,1 15,20H22V22H15A1,1 0 0,1 14,23H10A1,1 0 0,1 9,22H2V20H9A1,1 0 0,1 10,19H11V17H5A2,2 0 0,1 3,15Z" /></svg>',order:30,columns:[new o.sg({id:"storage-type",title:(0,s.Iu)("files_external","Storage type"),render(t){const e=t.attributes?.backend||(0,s.Iu)("files_external","Unknown"),n=document.createElement("span");return n.textContent=e,n}}),new o.sg({id:"scope",title:(0,s.Iu)("files_external","Scope"),render(t){const e=document.createElement("span");let n=(0,s.Iu)("files_external","Personal");return"system"===t.attributes?.scope&&(n=(0,s.Iu)("files_external","System")),e.textContent=n,e}})],getContents:async()=>{const t=(await u.Z.get((0,a.generateOcsUrl)("apps/files_external/api/v1/mounts"))).data.ocs.data.map(S);return{folder:new o.gt({id:0,source:(0,a.generateRemoteUrl)("dav"+O),root:O,owner:(0,I.ts)()?.uid||null,permissions:o.y3.READ}),contents:t}}})),(0,o.p4)(h),(0,o.p4)(P),(0,o.p4)(D)},17150:(t,e,n)=>{n.d(e,{Z:()=>a});var i=n(87537),r=n.n(i),s=n(23645),o=n.n(s)()(r());o.push([t.id,".files-list__row-status{display:flex;width:44px;justify-content:center;align-items:center;height:100%}.files-list__row-status svg{width:24px;height:24px}.files-list__row-status svg path{fill:currentColor}.files-list__row-status--error,.files-list__row-status--warning{position:absolute;display:block;top:0;left:0;right:0;bottom:0;opacity:.1;z-index:-1}.files-list__row-status--error{background:var(--color-error)}.files-list__row-status--warning{background:var(--color-warning)}","",{version:3,sources:["webpack://./apps/files_external/src/css/fileEntryStatus.scss"],names:[],mappings:"AAAA,wBACC,YAAA,CACA,UAAA,CACA,sBAAA,CACA,kBAAA,CACA,WAAA,CAEA,4BACC,UAAA,CACA,WAAA,CAEA,iCACC,iBAAA,CAIF,gEAEC,iBAAA,CACA,aAAA,CACA,KAAA,CACA,MAAA,CACA,OAAA,CACA,QAAA,CACA,UAAA,CACA,UAAA,CAGD,+BACC,6BAAA,CAGD,iCACC,+BAAA",sourcesContent:[".files-list__row-status {\n\tdisplay: flex;\n\twidth: 44px;\n\tjustify-content: center;\n\talign-items: center;\n\theight: 100%;\n\n\tsvg {\n\t\twidth: 24px;\n\t\theight: 24px;\n\n\t\tpath {\n\t\t\tfill: currentColor;\n\t\t}\n\t}\n\n\t&--error,\n\t&--warning {\n\t\tposition: absolute;\n\t\tdisplay: block;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\topacity: .1;\n\t\tz-index: -1;\n\t}\n\n\t&--error {\n\t\tbackground: var(--color-error);\n\t}\n\n\t&--warning {\n\t\tbackground: var(--color-warning);\n\t}\n}\n"],sourceRoot:""}]);const a=o},5656:(t,e,n)=>{n.d(e,{DT:()=>g,G7:()=>ie,RL:()=>$,Ti:()=>j,Tv:()=>_,_o:()=>D,gt:()=>P,h7:()=>A,p$:()=>m,p4:()=>w,pC:()=>R,rp:()=>V,sS:()=>f,sg:()=>L,tB:()=>N,y3:()=>v});var i=n(77958),r=n(17499),s=n(31352),o=n(62520),a=n(65358),l=n(79753),u=n(14596);const c=null===(d=(0,i.ts)())?(0,r.IY)().setApp("files").build():(0,r.IY)().setApp("files").setUid(d.uid).build();var d;const p=["B","KB","MB","GB","TB","PB"],h=["B","KiB","MiB","GiB","TiB","PiB"];function f(t,e=!1,n=!1,i=!1){n=n&&!i,"string"==typeof t&&(t=Number(t));let r=t>0?Math.floor(Math.log(t)/Math.log(i?1e3:1024)):0;r=Math.min((n?h.length:p.length)-1,r);const o=n?h[r]:p[r];let a=(t/Math.pow(i?1e3:1024,r)).toFixed(1);return!0===e&&0===r?("0.0"!==a?"< 1 ":"0 ")+(n?h[1]:p[1]):(a=r<2?parseFloat(a).toFixed(0):parseFloat(a).toLocaleString((0,s.aj)()),a+" "+o)}var g=(t=>(t.DEFAULT="default",t.HIDDEN="hidden",t))(g||{});class m{_action;constructor(t){this.validateAction(t),this._action=t}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(t){if(!t.id||"string"!=typeof t.id)throw new Error("Invalid id");if(!t.displayName||"function"!=typeof t.displayName)throw new Error("Invalid displayName function");if("title"in t&&"function"!=typeof t.title)throw new Error("Invalid title function");if(!t.iconSvgInline||"function"!=typeof t.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!t.exec||"function"!=typeof t.exec)throw new Error("Invalid exec function");if("enabled"in t&&"function"!=typeof t.enabled)throw new Error("Invalid enabled function");if("execBatch"in t&&"function"!=typeof t.execBatch)throw new Error("Invalid execBatch function");if("order"in t&&"number"!=typeof t.order)throw new Error("Invalid order");if("parent"in t&&"string"!=typeof t.parent)throw new Error("Invalid parent");if(t.default&&!Object.values(g).includes(t.default))throw new Error("Invalid default");if("inline"in t&&"function"!=typeof t.inline)throw new Error("Invalid inline function");if("renderInline"in t&&"function"!=typeof t.renderInline)throw new Error("Invalid renderInline function")}}const w=function(t){typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],c.debug("FileActions initialized")),window._nc_fileactions.find((e=>e.id===t.id))?c.error(`FileAction ${t.id} already registered`,{action:t}):window._nc_fileactions.push(t)};var v=(t=>(t[t.NONE=0]="NONE",t[t.CREATE=4]="CREATE",t[t.READ=1]="READ",t[t.UPDATE=2]="UPDATE",t[t.DELETE=8]="DELETE",t[t.SHARE=16]="SHARE",t[t.ALL=31]="ALL",t))(v||{});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"],x={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},y=function(){return typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...b]),window._nc_dav_properties.map((t=>`<${t} />`)).join(" ")},E=function(){return typeof window._nc_dav_namespaces>"u"&&(window._nc_dav_namespaces={...x}),Object.keys(window._nc_dav_namespaces).map((t=>`xmlns:${t}="${window._nc_dav_namespaces?.[t]}"`)).join(" ")},A=function(){return`<?xml version="1.0"?>\n\t\t<d:propfind ${E()}>\n\t\t\t<d:prop>\n\t\t\t\t${y()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`},N=function(t){return`<?xml version="1.0" encoding="UTF-8"?>\n<d:searchrequest ${E()}\n\txmlns:ns="https://github.com/icewind1991/SearchDAV/ns">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${y()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${(0,i.ts)()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${t}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`};var _=(t=>(t.Folder="folder",t.File="file",t))(_||{});const T=function(t,e){return null!==t.match(e)},C=(t,e)=>{if(t.id&&"number"!=typeof t.id)throw new Error("Invalid id type of value");if(!t.source)throw new Error("Missing mandatory source");try{new URL(t.source)}catch{throw new Error("Invalid source format, source must be a valid URL")}if(!t.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(t.mtime&&!(t.mtime instanceof Date))throw new Error("Invalid mtime type");if(t.crtime&&!(t.crtime instanceof Date))throw new Error("Invalid crtime type");if(!t.mime||"string"!=typeof t.mime||!t.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in t&&"number"!=typeof t.size&&void 0!==t.size)throw new Error("Invalid size type");if("permissions"in t&&void 0!==t.permissions&&!("number"==typeof t.permissions&&t.permissions>=v.NONE&&t.permissions<=v.ALL))throw new Error("Invalid permissions");if(t.owner&&null!==t.owner&&"string"!=typeof t.owner)throw new Error("Invalid owner type");if(t.attributes&&"object"!=typeof t.attributes)throw new Error("Invalid attributes type");if(t.root&&"string"!=typeof t.root)throw new Error("Invalid root type");if(t.root&&!t.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(t.root&&!t.source.includes(t.root))throw new Error("Root must be part of the source");if(t.root&&T(t.source,e)){const n=t.source.match(e)[0];if(!t.source.includes((0,o.join)(n,t.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(t.status&&!Object.values(I).includes(t.status))throw new Error("Status must be a valid NodeStatus")};var I=(t=>(t.NEW="new",t.FAILED="failed",t.LOADING="loading",t.LOCKED="locked",t))(I||{});class O{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;constructor(t,e){C(t,e||this._knownDavService),this._data=t;const n={set:(t,e,n)=>(this.updateMtime(),Reflect.set(t,e,n)),deleteProperty:(t,e)=>(this.updateMtime(),Reflect.deleteProperty(t,e))};this._attributes=new Proxy(t.attributes||{},n),delete this._data.attributes,e&&(this._knownDavService=e)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:t}=new URL(this.source);return t+(0,a.Ec)(this.source.slice(t.length))}get basename(){return(0,o.basename)(this.source)}get extension(){return(0,o.extname)(this.source)}get dirname(){if(this.root){const t=this.source.indexOf(this.root);return(0,o.dirname)(this.source.slice(t+this.root.length)||"/")}const t=new URL(this.source);return(0,o.dirname)(t.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:v.NONE:v.READ}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return T(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,o.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){const t=this.source.indexOf(this.root);return this.source.slice(t+this.root.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(t){this._data.status=t}move(t){C({...this._data,source:t},this._knownDavService),this._data.source=t,this.updateMtime()}rename(t){if(t.includes("/"))throw new Error("Invalid basename");this.move((0,o.dirname)(this.source)+"/"+t)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}}class S extends O{get type(){return _.File}}class P extends O{constructor(t){super({...t,mime:"httpd/unix-directory"})}get type(){return _.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}const D=`/files/${(0,i.ts)()?.uid}`,k=(0,l.generateRemoteUrl)("dav"),V=function(t=k){const e=(0,u.eI)(t);function n(t){e.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})}return(0,i._S)(n),n((0,i.IH)()),(0,u.lD)().patch("fetch",((t,e)=>{const n=e.headers;return n?.method&&(e.method=n.method,delete n.method),fetch(t,e)})),e},R=async(t,e="/",n=D)=>(await t.getDirectoryContents(`${n}${e}`,{details:!0,data:`<?xml version="1.0"?>\n\t\t<oc:filter-files ${E()}>\n\t\t\t<d:prop>\n\t\t\t\t${y()}\n\t\t\t</d:prop>\n\t\t\t<oc:filter-rules>\n\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t</oc:filter-rules>\n\t\t</oc:filter-files>`,headers:{method:"REPORT"},includeSelf:!0})).data.filter((t=>t.filename!==e)).map((t=>$(t,n))),$=function(t,e=D,n=k){const r=t.props,s=function(t=""){let e=v.NONE;return t&&((t.includes("C")||t.includes("K"))&&(e|=v.CREATE),t.includes("G")&&(e|=v.READ),(t.includes("W")||t.includes("N")||t.includes("V"))&&(e|=v.UPDATE),t.includes("D")&&(e|=v.DELETE),t.includes("R")&&(e|=v.SHARE)),e}(r?.permissions),o=(0,i.ts)()?.uid,a={id:r?.fileid||0,source:`${n}${t.filename}`,mtime:new Date(Date.parse(t.lastmod)),mime:t.mime,size:r?.size||Number.parseInt(r.getcontentlength||"0"),permissions:s,owner:o,root:e,attributes:{...t,...r,hasPreview:r?.["has-preview"]}};return delete a.attributes?.props,"file"===t.type?new S(a):new P(a)};class M{_views=[];_currentView=null;register(t){if(this._views.find((e=>e.id===t.id)))throw new Error(`View id ${t.id} is already registered`);this._views.push(t)}remove(t){const e=this._views.findIndex((e=>e.id===t));-1!==e&&this._views.splice(e,1)}get views(){return this._views}setActive(t){this._currentView=t}get active(){return this._currentView}}const j=function(){return typeof window._nc_navigation>"u"&&(window._nc_navigation=new M,c.debug("Navigation service initialized")),window._nc_navigation};class L{_column;constructor(t){F(t),this._column=t}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 F=function(t){if(!t.id||"string"!=typeof t.id)throw new Error("A column id is required");if(!t.title||"string"!=typeof t.title)throw new Error("A column title is required");if(!t.render||"function"!=typeof t.render)throw new Error("A render function is required");if(t.sort&&"function"!=typeof t.sort)throw new Error("Column sortFunction must be a function");if(t.summary&&"function"!=typeof t.summary)throw new Error("Column summary must be a function");return!0};var U={},B={};!function(t){const e=":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="["+e+"]["+e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=new RegExp("^"+n+"$");t.isExist=function(t){return typeof t<"u"},t.isEmptyObject=function(t){return 0===Object.keys(t).length},t.merge=function(t,e,n){if(e){const i=Object.keys(e),r=i.length;for(let s=0;s<r;s++)t[i[s]]="strict"===n?[e[i[s]]]:e[i[s]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(t){const e=i.exec(t);return!(null===e||typeof e>"u")},t.getAllMatches=function(t,e){const n=[];let i=e.exec(t);for(;i;){const r=[];r.startIndex=e.lastIndex-i[0].length;const s=i.length;for(let t=0;t<s;t++)r.push(i[t]);n.push(r),i=e.exec(t)}return n},t.nameRegexp=n}(B);const H=B,q={allowBooleanAttributes:!1,unpairedTags:[]};function G(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function Z(t,e){const n=e;for(;e<t.length;e++)if("?"==t[e]||" "==t[e]){const i=t.substr(n,e-n);if(e>5&&"xml"===i)return tt("InvalidXml","XML declaration allowed only at the start of the document.",it(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}continue}return e}function X(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e<t.length;e++)if("<"===t[e])n++;else if(">"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e<t.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}U.validate=function(t,e){e=Object.assign({},q,e);const n=[];let i=!1,r=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let s=0;s<t.length;s++)if("<"===t[s]&&"?"===t[s+1]){if(s+=2,s=Z(t,s),s.err)return s}else{if("<"!==t[s]){if(G(t[s]))continue;return tt("InvalidChar","char '"+t[s]+"' is not expected.",it(t,s))}{let o=s;if(s++,"!"===t[s]){s=X(t,s);continue}{let a=!1;"/"===t[s]&&(a=!0,s++);let l="";for(;s<t.length&&">"!==t[s]&&" "!==t[s]&&"\t"!==t[s]&&"\n"!==t[s]&&"\r"!==t[s];s++)l+=t[s];if(l=l.trim(),"/"===l[l.length-1]&&(l=l.substring(0,l.length-1),s--),!nt(l)){let e;return e=0===l.trim().length?"Invalid space after '<'.":"Tag '"+l+"' is an invalid name.",tt("InvalidTag",e,it(t,s))}const u=W(t,s);if(!1===u)return tt("InvalidAttr","Attributes for '"+l+"' have open quote.",it(t,s));let c=u.value;if(s=u.index,"/"===c[c.length-1]){const n=s-c.length;c=c.substring(0,c.length-1);const r=J(c,e);if(!0!==r)return tt(r.err.code,r.err.msg,it(t,n+r.err.line));i=!0}else if(a){if(!u.tagClosed)return tt("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",it(t,s));if(c.trim().length>0)return tt("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",it(t,o));{const e=n.pop();if(l!==e.tagName){let n=it(t,e.tagStartPos);return tt("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+l+"'.",it(t,o))}0==n.length&&(r=!0)}}else{const a=J(c,e);if(!0!==a)return tt(a.err.code,a.err.msg,it(t,s-c.length+a.err.line));if(!0===r)return tt("InvalidXml","Multiple possible root nodes found.",it(t,s));-1!==e.unpairedTags.indexOf(l)||n.push({tagName:l,tagStartPos:o}),i=!0}for(s++;s<t.length;s++)if("<"===t[s]){if("!"===t[s+1]){s++,s=X(t,s);continue}if("?"!==t[s+1])break;if(s=Z(t,++s),s.err)return s}else if("&"===t[s]){const e=Q(t,s);if(-1==e)return tt("InvalidChar","char '&' is not expected.",it(t,s));s=e}else if(!0===r&&!G(t[s]))return tt("InvalidXml","Extra text at the end",it(t,s));"<"===t[s]&&s--}}}return i?1==n.length?tt("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",it(t,n[0].tagStartPos)):!(n.length>0)||tt("InvalidXml","Invalid '"+JSON.stringify(n.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):tt("InvalidXml","Start tag expected.",1)};const z='"',K="'";function W(t,e){let n="",i="",r=!1;for(;e<t.length;e++){if(t[e]===z||t[e]===K)""===i?i=t[e]:i!==t[e]||(i="");else if(">"===t[e]&&""===i){r=!0;break}n+=t[e]}return""===i&&{value:n,index:e,tagClosed:r}}const Y=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function J(t,e){const n=H.getAllMatches(t,Y),i={};for(let t=0;t<n.length;t++){if(0===n[t][1].length)return tt("InvalidAttr","Attribute '"+n[t][2]+"' has no space in starting.",rt(n[t]));if(void 0!==n[t][3]&&void 0===n[t][4])return tt("InvalidAttr","Attribute '"+n[t][2]+"' is without value.",rt(n[t]));if(void 0===n[t][3]&&!e.allowBooleanAttributes)return tt("InvalidAttr","boolean attribute '"+n[t][2]+"' is not allowed.",rt(n[t]));const r=n[t][2];if(!et(r))return tt("InvalidAttr","Attribute '"+r+"' is an invalid name.",rt(n[t]));if(i.hasOwnProperty(r))return tt("InvalidAttr","Attribute '"+r+"' is repeated.",rt(n[t]));i[r]=1}return!0}function Q(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let n=/\d/;for("x"===t[e]&&(e++,n=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(n))break}return-1}(t,++e);let n=0;for(;e<t.length;e++,n++)if(!(t[e].match(/\w/)&&n<20)){if(";"===t[e])break;return-1}return e}function tt(t,e,n){return{err:{code:t,msg:e,line:n.line||n,col:n.col}}}function et(t){return H.isName(t)}function nt(t){return H.isName(t)}function it(t,e){const n=t.substring(0,e).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function rt(t){return t.startIndex+t[1].length}var st={};const ot={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t}};st.buildOptions=function(t){return Object.assign({},ot,t)},st.defaultOptions=ot;const at=B;function lt(t,e){let n="";for(;e<t.length&&"'"!==t[e]&&'"'!==t[e];e++)n+=t[e];if(n=n.trim(),-1!==n.indexOf(" "))throw new Error("External entites are not supported");const i=t[e++];let r="";for(;e<t.length&&t[e]!==i;e++)r+=t[e];return[n,r,e]}function ut(t,e){return"!"===t[e+1]&&"-"===t[e+2]&&"-"===t[e+3]}function ct(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"N"===t[e+3]&&"T"===t[e+4]&&"I"===t[e+5]&&"T"===t[e+6]&&"Y"===t[e+7]}function dt(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"L"===t[e+3]&&"E"===t[e+4]&&"M"===t[e+5]&&"E"===t[e+6]&&"N"===t[e+7]&&"T"===t[e+8]}function pt(t,e){return"!"===t[e+1]&&"A"===t[e+2]&&"T"===t[e+3]&&"T"===t[e+4]&&"L"===t[e+5]&&"I"===t[e+6]&&"S"===t[e+7]&&"T"===t[e+8]}function ht(t,e){return"!"===t[e+1]&&"N"===t[e+2]&&"O"===t[e+3]&&"T"===t[e+4]&&"A"===t[e+5]&&"T"===t[e+6]&&"I"===t[e+7]&&"O"===t[e+8]&&"N"===t[e+9]}function ft(t){if(at.isName(t))return t;throw new Error(`Invalid entity name ${t}`)}const gt=/^[-+]?0x[a-fA-F0-9]+$/,mt=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const wt={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};const vt=B,bt=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}},xt=function(t,e){const n={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let i=1,r=!1,s=!1,o="";for(;e<t.length;e++)if("<"!==t[e]||s)if(">"===t[e]){if(s?"-"===t[e-1]&&"-"===t[e-2]&&(s=!1,i--):i--,0===i)break}else"["===t[e]?r=!0:o+=t[e];else{if(r&&ct(t,e))e+=7,[entityName,val,e]=lt(t,e+1),-1===val.indexOf("&")&&(n[ft(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(r&&dt(t,e))e+=8;else if(r&&pt(t,e))e+=8;else if(r&&ht(t,e))e+=9;else{if(!ut)throw new Error("Invalid DOCTYPE");s=!0}i++,o=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}},yt=function(t,e={}){if(e=Object.assign({},wt,e),!t||"string"!=typeof t)return t;let n=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(n))return t;if(e.hex&&gt.test(n))return Number.parseInt(n,16);{const i=mt.exec(n);if(i){const r=i[1],s=i[2];let o=function(t){return t&&-1!==t.indexOf(".")&&("."===(t=t.replace(/0+$/,""))?t="0":"."===t[0]?t="0"+t:"."===t[t.length-1]&&(t=t.substr(0,t.length-1))),t}(i[3]);const a=i[4]||i[6];if(!e.leadingZeros&&s.length>0&&r&&"."!==n[2])return t;if(!e.leadingZeros&&s.length>0&&!r&&"."!==n[1])return t;{const i=Number(n),l=""+i;return-1!==l.search(/[eE]/)||a?e.eNotation?i:t:-1!==n.indexOf(".")?"0"===l&&""===o||l===o||r&&l==="-"+o?i:t:s?o===l||r+o===l?i:t:n===l||n===r+l?i:t}}return t}};function Et(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const i=e[n];this.lastEntities[i]={regex:new RegExp("&"+i+";","g"),val:t[i]}}}function At(t,e,n,i,r,s,o){if(void 0!==t&&(this.options.trimValues&&!i&&(t=t.trim()),t.length>0)){o||(t=this.replaceEntitiesValue(t));const i=this.options.tagValueProcessor(e,t,n,r,s);return null==i?t:typeof i!=typeof t||i!==t?i:this.options.trimValues||t.trim()===t?Rt(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function Nt(t){if(this.options.removeNSPrefix){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,vt.nameRegexp);const _t=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function Tt(t,e,n){if(!this.options.ignoreAttributes&&"string"==typeof t){const n=vt.getAllMatches(t,_t),i=n.length,r={};for(let t=0;t<i;t++){const i=this.resolveNameSpace(n[t][1]);let s=n[t][4],o=this.options.attributeNamePrefix+i;if(i.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),"__proto__"===o&&(o="#__proto__"),void 0!==s){this.options.trimValues&&(s=s.trim()),s=this.replaceEntitiesValue(s);const t=this.options.attributeValueProcessor(i,s,e);r[o]=null==t?s:typeof t!=typeof s||t!==s?t:Rt(s,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(r[o]=!0)}if(!Object.keys(r).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=r,t}return r}}const Ct=function(t){t=t.replace(/\r\n?/g,"\n");const e=new bt("!xml");let n=e,i="",r="";for(let s=0;s<t.length;s++)if("<"===t[s])if("/"===t[s+1]){const e=Dt(t,">",s,"Closing Tag is not closed.");let o=t.substring(s+2,e).trim();if(this.options.removeNSPrefix){const t=o.indexOf(":");-1!==t&&(o=o.substr(t+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),n&&(i=this.saveTextToParentTag(i,n,r));const a=r.substring(r.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=r.lastIndexOf(".",r.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=r.lastIndexOf("."),r=r.substring(0,l),n=this.tagsNodeStack.pop(),i="",s=e}else if("?"===t[s+1]){let e=kt(t,s,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,n,r),!(this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags)){const t=new bt(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,r,e.tagName)),this.addChild(n,t,r)}s=e.closeIndex+1}else if("!--"===t.substr(s+1,3)){const e=Dt(t,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const o=t.substring(s+4,e-2);i=this.saveTextToParentTag(i,n,r),n.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}s=e}else if("!D"===t.substr(s+1,2)){const e=xt(t,s);this.docTypeEntities=e.entities,s=e.i}else if("!["===t.substr(s+1,2)){const e=Dt(t,"]]>",s,"CDATA is not closed.")-2,o=t.substring(s+9,e);if(i=this.saveTextToParentTag(i,n,r),this.options.cdataPropName)n.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]);else{let t=this.parseTextData(o,n.tagname,r,!0,!1,!0);null==t&&(t=""),n.add(this.options.textNodeName,t)}s=e+2}else{let o=kt(t,s,this.options.removeNSPrefix),a=o.tagName;const l=o.rawTagName;let u=o.tagExp,c=o.attrExpPresent,d=o.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),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("."))),a!==e.tagname&&(r+=r?"."+a:a),this.isItStopNode(this.options.stopNodes,r,a)){let e="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)s=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))s=o.closeIndex;else{const n=this.readStopNodeData(t,l,d+1);if(!n)throw new Error(`Unexpected end of ${l}`);s=n.i,e=n.tagContent}const i=new bt(a);a!==u&&c&&(i[":@"]=this.buildAttributesMap(u,r,a)),e&&(e=this.parseTextData(e,a,r,!0,c,!0,!0)),r=r.substr(0,r.lastIndexOf(".")),i.add(this.options.textNodeName,e),this.addChild(n,i,r)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),r=r.substr(0,r.length-1),u=a):u=u.substr(0,u.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const t=new bt(a);a!==u&&c&&(t[":@"]=this.buildAttributesMap(u,r,a)),this.addChild(n,t,r),r=r.substr(0,r.lastIndexOf("."))}else{const t=new bt(a);this.tagsNodeStack.push(n),a!==u&&c&&(t[":@"]=this.buildAttributesMap(u,r,a)),this.addChild(n,t,r),n=t}i="",s=d}}else i+=t[s];return e.child};function It(t,e,n){const i=this.options.updateTag(e.tagname,n,e[":@"]);!1===i||("string"==typeof i&&(e.tagname=i),t.addChild(e))}const Ot=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const n=this.docTypeEntities[e];t=t.replace(n.regx,n.val)}for(let e in this.lastEntities){const n=this.lastEntities[e];t=t.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const n=this.htmlEntities[e];t=t.replace(n.regex,n.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function St(t,e,n,i){return t&&(void 0===i&&(i=0===Object.keys(e.child).length),void 0!==(t=this.parseTextData(t,e.tagname,n,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,i))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function Pt(t,e,n){const i="*."+n;for(const n in t){const r=t[n];if(i===r||e===r)return!0}return!1}function Dt(t,e,n,i){const r=t.indexOf(e,n);if(-1===r)throw new Error(i);return r+e.length-1}function kt(t,e,n,i=">"){const r=function(t,e,n=">"){let i,r="";for(let s=e;s<t.length;s++){let e=t[s];if(i)e===i&&(i="");else if('"'===e||"'"===e)i=e;else if(e===n[0]){if(!n[1])return{data:r,index:s};if(t[s+1]===n[1])return{data:r,index:s}}else"\t"===e&&(e=" ");r+=e}}(t,e+1,i);if(!r)return;let s=r.data;const o=r.index,a=s.search(/\s/);let l=s,u=!0;-1!==a&&(l=s.substr(0,a).replace(/\s\s*$/,""),s=s.substr(a+1));const c=l;if(n){const t=l.indexOf(":");-1!==t&&(l=l.substr(t+1),u=l!==r.data.substr(t+1))}return{tagName:l,tagExp:s,closeIndex:o,attrExpPresent:u,rawTagName:c}}function Vt(t,e,n){const i=n;let r=1;for(;n<t.length;n++)if("<"===t[n])if("/"===t[n+1]){const s=Dt(t,">",n,`${e} is not closed`);if(t.substring(n+2,s).trim()===e&&(r--,0===r))return{tagContent:t.substring(i,n),i:s};n=s}else if("?"===t[n+1])n=Dt(t,"?>",n+1,"StopNode is not closed.");else if("!--"===t.substr(n+1,3))n=Dt(t,"--\x3e",n+3,"StopNode is not closed.");else if("!["===t.substr(n+1,2))n=Dt(t,"]]>",n,"StopNode is not closed.")-2;else{const i=kt(t,n,">");i&&((i&&i.tagName)===e&&"/"!==i.tagExp[i.tagExp.length-1]&&r++,n=i.closeIndex)}}function Rt(t,e,n){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&yt(t,n)}return vt.isExist(t)?t:""}var $t={};function Mt(t,e,n){let i;const r={};for(let s=0;s<t.length;s++){const o=t[s],a=jt(o);let l="";if(l=void 0===n?a:n+"."+a,a===e.textNodeName)void 0===i?i=o[a]:i+=""+o[a];else{if(void 0===a)continue;if(o[a]){let t=Mt(o[a],e,l);const n=Ft(t,e);o[":@"]?Lt(t,o[":@"],l,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==r[a]&&r.hasOwnProperty(a)?(Array.isArray(r[a])||(r[a]=[r[a]]),r[a].push(t)):e.isArray(a,l,n)?r[a]=[t]:r[a]=t}}}return"string"==typeof i?i.length>0&&(r[e.textNodeName]=i):void 0!==i&&(r[e.textNodeName]=i),r}function jt(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=e[t];if(":@"!==n)return n}}function Lt(t,e,n,i){if(e){const r=Object.keys(e),s=r.length;for(let o=0;o<s;o++){const s=r[o];i.isArray(s,n+"."+s,!0,!0)?t[s]=[e[s]]:t[s]=e[s]}}}function Ft(t,e){const{textNodeName:n}=e,i=Object.keys(t).length;return!(0!==i&&(1!==i||!t[n]&&"boolean"!=typeof t[n]&&0!==t[n]))}$t.prettify=function(t,e){return Mt(t,e)};const{buildOptions:Ut}=st,Bt=class{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},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=Et,this.parseXml=Ct,this.parseTextData=At,this.resolveNameSpace=Nt,this.buildAttributesMap=Tt,this.isItStopNode=Pt,this.replaceEntitiesValue=Ot,this.readStopNodeData=Vt,this.saveTextToParentTag=St,this.addChild=It}},{prettify:Ht}=$t,qt=U;function Gt(t,e,n,i){let r="",s=!1;for(let o=0;o<t.length;o++){const a=t[o],l=Zt(a);if(void 0===l)continue;let u="";if(u=0===n.length?l:`${n}.${l}`,l===e.textNodeName){let t=a[l];zt(u,e)||(t=e.tagValueProcessor(l,t),t=Kt(t,e)),s&&(r+=i),r+=t,s=!1;continue}if(l===e.cdataPropName){s&&(r+=i),r+=`<![CDATA[${a[l][0][e.textNodeName]}]]>`,s=!1;continue}if(l===e.commentPropName){r+=i+`\x3c!--${a[l][0][e.textNodeName]}--\x3e`,s=!0;continue}if("?"===l[0]){const t=Xt(a[":@"],e),n="?xml"===l?"":i;let o=a[l][0][e.textNodeName];o=0!==o.length?" "+o:"",r+=n+`<${l}${o}${t}?>`,s=!0;continue}let c=i;""!==c&&(c+=e.indentBy);const d=i+`<${l}${Xt(a[":@"],e)}`,p=Gt(a[l],e,u,c);-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?r+=d+">":r+=d+"/>":p&&0!==p.length||!e.suppressEmptyNode?p&&p.endsWith(">")?r+=d+`>${p}${i}</${l}>`:(r+=d+">",p&&""!==i&&(p.includes("/>")||p.includes("</"))?r+=i+e.indentBy+p+i:r+=p,r+=`</${l}>`):r+=d+"/>",s=!0}return r}function Zt(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const i=e[n];if(t.hasOwnProperty(i)&&":@"!==i)return i}}function Xt(t,e){let n="";if(t&&!e.ignoreAttributes)for(let i in t){if(!t.hasOwnProperty(i))continue;let r=e.attributeValueProcessor(i,t[i]);r=Kt(r,e),!0===r&&e.suppressBooleanAttributes?n+=` ${i.substr(e.attributeNamePrefix.length)}`:n+=` ${i.substr(e.attributeNamePrefix.length)}="${r}"`}return n}function zt(t,e){let n=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let i in e.stopNodes)if(e.stopNodes[i]===t||e.stopNodes[i]==="*."+n)return!0;return!1}function Kt(t,e){if(t&&t.length>0&&e.processEntities)for(let n=0;n<e.entities.length;n++){const i=e.entities[n];t=t.replace(i.regex,i.val)}return t}const Wt=function(t,e){let n="";return e.format&&e.indentBy.length>0&&(n="\n"),Gt(t,e,"",n)},Yt={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:"  ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Jt(t){this.options=Object.assign({},Yt,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=ee),this.processTextOrObjNode=Qt,this.options.format?(this.indentate=te,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function Qt(t,e,n){const i=this.j2x(t,n+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,i.attrStr,n):this.buildObjectNode(i.val,e,i.attrStr,n)}function te(t){return this.options.indentBy.repeat(t)}function ee(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}Jt.prototype.build=function(t){return this.options.preserveOrder?Wt(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},Jt.prototype.j2x=function(t,e){let n="",i="";for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r))if(typeof t[r]>"u")this.isAttribute(r)&&(i+="");else if(null===t[r])this.isAttribute(r)?i+="":"?"===r[0]?i+=this.indentate(e)+"<"+r+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+r+"/"+this.tagEndChar;else if(t[r]instanceof Date)i+=this.buildTextValNode(t[r],r,"",e);else if("object"!=typeof t[r]){const s=this.isAttribute(r);if(s)n+=this.buildAttrPairStr(s,""+t[r]);else if(r===this.options.textNodeName){let e=this.options.tagValueProcessor(r,""+t[r]);i+=this.replaceEntitiesValue(e)}else i+=this.buildTextValNode(t[r],r,"",e)}else if(Array.isArray(t[r])){const n=t[r].length;let s="";for(let o=0;o<n;o++){const n=t[r][o];typeof n>"u"||(null===n?"?"===r[0]?i+=this.indentate(e)+"<"+r+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+r+"/"+this.tagEndChar:"object"==typeof n?this.options.oneListGroup?s+=this.j2x(n,e+1).val:s+=this.processTextOrObjNode(n,r,e):s+=this.buildTextValNode(n,r,"",e))}this.options.oneListGroup&&(s=this.buildObjectNode(s,r,"",e)),i+=s}else if(this.options.attributesGroupName&&r===this.options.attributesGroupName){const e=Object.keys(t[r]),i=e.length;for(let s=0;s<i;s++)n+=this.buildAttrPairStr(e[s],""+t[r][e[s]])}else i+=this.processTextOrObjNode(t[r],r,e);return{attrStr:n,val:i}},Jt.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},Jt.prototype.buildObjectNode=function(t,e,n,i){if(""===t)return"?"===e[0]?this.indentate(i)+"<"+e+n+"?"+this.tagEndChar:this.indentate(i)+"<"+e+n+this.closeTag(e)+this.tagEndChar;{let r="</"+e+this.tagEndChar,s="";return"?"===e[0]&&(s="?",r=""),!n&&""!==n||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===s.length?this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(i)+"<"+e+n+s+this.tagEndChar+t+this.indentate(i)+r:this.indentate(i)+"<"+e+n+s+">"+t+r}},Jt.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},Jt.prototype.buildTextValNode=function(t,e,n,i){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(i)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(i)+"<"+e+n+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(e,t);return r=this.replaceEntitiesValue(r),""===r?this.indentate(i)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(i)+"<"+e+n+">"+r+"</"+e+this.tagEndChar}},Jt.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const n=this.options.entities[e];t=t.replace(n.regex,n.val)}return t};var ne={XMLParser:class{constructor(t){this.externalEntities={},this.options=Ut(t)}parse(t,e){if("string"!=typeof t){if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString()}if(e){!0===e&&(e={});const n=qt.validate(t,e);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new Bt(this.options);n.addExternalEntities(this.externalEntities);const i=n.parseXml(t);return this.options.preserveOrder||void 0===i?i:Ht(i,this.options)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}},XMLValidator:U,XMLBuilder:Jt};class ie{_view;constructor(t){re(t),this._view=t}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(t){this._view.icon=t}get order(){return this._view.order}set order(t){this._view.order=t}get params(){return this._view.params}set params(t){this._view.params=t}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(t){this._view.expanded=t}get defaultSortKey(){return this._view.defaultSortKey}}const re=function(t){if(!t.id||"string"!=typeof t.id)throw new Error("View id is required and must be a string");if(!t.name||"string"!=typeof t.name)throw new Error("View name is required and must be a string");if(t.columns&&t.columns.length>0&&(!t.caption||"string"!=typeof t.caption))throw new Error("View caption is required for top-level views and must be a string");if(!t.getContents||"function"!=typeof t.getContents)throw new Error("View getContents is required and must be a function");if(!t.icon||"string"!=typeof t.icon||!function(t){if("string"!=typeof t)throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);if(0===(t=t.trim()).length||!0!==ne.XMLValidator.validate(t))return!1;let e;const n=new ne.XMLParser;try{e=n.parse(t)}catch{return!1}return!(!e||!("svg"in e))}(t.icon))throw new Error("View icon is required and must be a valid svg string");if(!("order"in t)||"number"!=typeof t.order)throw new Error("View order is required and must be a number");if(t.columns&&t.columns.forEach((t=>{if(!(t instanceof L))throw new Error("View columns must be an array of Column. Invalid column found")})),t.emptyView&&"function"!=typeof t.emptyView)throw new Error("View emptyView must be a function");if(t.parent&&"string"!=typeof t.parent)throw new Error("View parent must be a string");if("sticky"in t&&"boolean"!=typeof t.sticky)throw new Error("View sticky must be a boolean");if("expanded"in t&&"boolean"!=typeof t.expanded)throw new Error("View expanded must be a boolean");if(t.defaultSortKey&&"string"!=typeof t.defaultSortKey)throw new Error("View defaultSortKey must be a string");return!0}}},r={};function s(t){var e=r[t];if(void 0!==e)return e.exports;var n=r[t]={id:t,loaded:!1,exports:{}};return i[t].call(n.exports,n,n.exports,s),n.loaded=!0,n.exports}s.m=i,t=[],s.O=(e,n,i,r)=>{if(!n){var o=1/0;for(c=0;c<t.length;c++){n=t[c][0],i=t[c][1],r=t[c][2];for(var a=!0,l=0;l<n.length;l++)(!1&r||o>=r)&&Object.keys(s.O).every((t=>s.O[t](n[l])))?n.splice(l--,1):(a=!1,r<o&&(o=r));if(a){t.splice(c--,1);var u=i();void 0!==u&&(e=u)}}return e}r=r||0;for(var c=t.length;c>0&&t[c-1][2]>r;c--)t[c]=t[c-1];t[c]=[n,i,r]},s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var n in e)s.o(e,n)&&!s.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},s.f={},s.e=t=>Promise.all(Object.keys(s.f).reduce(((e,n)=>(s.f[n](t,e),e)),[])),s.u=t=>t+"-"+t+".js?v="+{2048:"78a82614529a3cefcde7",4180:"fe82f3a2dac70d6b82bc"}[t],s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),e={},n="nextcloud:",s.l=(t,i,r,o)=>{if(e[t])e[t].push(i);else{var a,l;if(void 0!==r)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var d=u[c];if(d.getAttribute("src")==t||d.getAttribute("data-webpack")==n+r){a=d;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,s.nc&&a.setAttribute("nonce",s.nc),a.setAttribute("data-webpack",n+r),a.src=t),e[t]=[i];var p=(n,i)=>{a.onerror=a.onload=null,clearTimeout(h);var r=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((t=>t(i))),n)return n(i)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),l&&document.head.appendChild(a)}},s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),s.j=8213,(()=>{var t;s.g.importScripts&&(t=s.g.location+"");var e=s.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var i=n.length-1;i>-1&&!t;)t=n[i--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=t})(),(()=>{s.b=document.baseURI||self.location.href;var t={8213:0};s.f.j=(e,n)=>{var i=s.o(t,e)?t[e]:void 0;if(0!==i)if(i)n.push(i[2]);else{var r=new Promise(((n,r)=>i=t[e]=[n,r]));n.push(i[2]=r);var o=s.p+s.u(e),a=new Error;s.l(o,(n=>{if(s.o(t,e)&&(0!==(i=t[e])&&(t[e]=void 0),i)){var r=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",a.name="ChunkLoadError",a.type=r,a.request=o,i[1](a)}}),"chunk-"+e,e)}},s.O.j=e=>0===t[e];var e=(e,n)=>{var i,r,o=n[0],a=n[1],l=n[2],u=0;if(o.some((e=>0!==t[e]))){for(i in a)s.o(a,i)&&(s.m[i]=a[i]);if(l)var c=l(s)}for(e&&e(n);u<o.length;u++)r=o[u],s.o(t,r)&&t[r]&&t[r][0](),t[r]=0;return s.O(c)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})(),s.nc=void 0;var o=s.O(void 0,[7874],(()=>s(5220)));o=s.O(o)})();
-//# sourceMappingURL=files_external-init.js.map?v=9c59d33c79a8e6b4e46f
\ No newline at end of file
+(()=>{"use strict";var t,e,n,i={5220:(t,e,n)=>{var i,r=n(43554),s=n(31352),o=n(5656),a=n(79753),l=n(64024),u=n(93664),c=n(20144);!function(t){t[t.SUCCESS=0]="SUCCESS",t[t.ERROR=1]="ERROR",t[t.INDETERMINATE=2]="INDETERMINATE",t[t.INCOMPLETE_CONF=3]="INCOMPLETE_CONF",t[t.UNAUTHORIZED=4]="UNAUTHORIZED",t[t.TIMEOUT=5]="TIMEOUT",t[t.NETWORK_ERROR=6]="NETWORK_ERROR"}(i||(i={}));const d=function(t){return!(!t.status||t.status===i.SUCCESS)&&(t.userProvided||"password::global::user"===t.authMechanism)},p=function(t){if(t.type===o.Tv.File)return!1;const e=t.attributes;return!(!e.scope||!e.backend||"personal"!==e.scope&&"system"!==e.scope)},h=new o.p$({id:"credentials-external-storage",displayName:()=>(0,s.Iu)("files","Enter missing credentials"),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-login" viewBox="0 0 24 24"><path d="M11 7L9.6 8.4L12.2 11H2V13H12.2L9.6 15.6L11 17L16 12L11 7M20 19H12V21H20C21.1 21 22 20.1 22 19V5C22 3.9 21.1 3 20 3H12V5H20V19Z" /></svg>',enabled:t=>{if(1!==t.length)return!1;const e=t[0];if(!p(e))return!1;const n=e.attributes?.config||{};return!!d(n)},async exec(t){const e=await fetch((0,a.generateOcsUrl)("/apps/files_external/api/v1/auth"),{headers:new Headers({Accept:"application/json"}),credentials:"include"}),n=await(e?.json())||{};if(n.ocs.data.user&&n.ocs.data.password){const e=(await u.Z.put((0,a.generateUrl)("apps/files_external/userglobalstorages/{id}",t.attributes),{backendOptions:n.ocs.data})).data;if(e.status!==i.SUCCESS)return(0,l.x2)((0,s.Iu)("files_external","Unable to update this external storage config. {statusMessage}",{statusMessage:e?.statusMessage||""})),null;(0,l.s$)((0,s.Iu)("files_external","New configuration successfully saved")),c.default.set(t.attributes,"config",e)}return null},order:-1e3,default:o.DT.DEFAULT,inline:()=>!0});var f=n(93379),g=n.n(f),m=n(7795),w=n.n(m),v=n(90569),b=n.n(v),x=n(3565),y=n.n(x),E=n(19216),A=n.n(E),N=n(44589),_=n.n(N),T=n(17150),C={};C.styleTagTransform=_(),C.setAttributes=y(),C.insert=b().bind(null,"head"),C.domAPI=w(),C.insertStyleElement=A(),g()(T.Z,C),T.Z&&T.Z.locals&&T.Z.locals;var I=n(77958);const O=`/files/${(0,I.ts)()?.uid}`,S=t=>{const e=(t.path+"/"+t.name).replace(/^\//gm,"");return new o.gt({id:t.id,source:(0,a.generateRemoteUrl)("dav"+O+"/"+e),root:O,owner:(0,I.ts)()?.uid||null,permissions:t.config.status!==i.SUCCESS?o.y3.NONE:t?.permissions||o.y3.READ,attributes:{displayName:e,...t}})},P=new o.p$({id:"check-external-storage",displayName:()=>"",iconSvgInline:()=>"",enabled:t=>t.every((t=>!0===p(t))),exec:async()=>null,async renderInline(t){let e=null;try{const n=await function(t){const e=arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?"userstorages":"userglobalstorages";return u.Z.get((0,a.generateUrl)(`apps/files_external/${e}/${t}?testOnly=false`))}(t.attributes.id,"system"===t.attributes.scope);if(e=n.data,c.default.set(t.attributes,"config",e),e.status!==i.SUCCESS)throw new Error(e?.statusMessage||(0,s.Iu)("files_external","There was an error with this external storage."));return null}catch(n){if(n.response&&!e)return(0,l.K2)((0,s.Iu)("files_external","We were unable to check the external storage {basename}",{basename:t.basename})),null;const i=d(e),r=document.createElement("span");r.classList.add("files-list__row-status--"+(i?"warning":"error"));const o=document.createElement("span");return o.className="files-list__row-status",i||(o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-alert-circle" viewBox="0 0 24 24"><path d="M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" /></svg>',o.title=n.message),o.prepend(r),o}},order:10}),D=new o.p$({id:"open-in-files-external-storage",displayName:t=>(t?.[0]?.attributes?.config||{status:i.INDETERMINATE}).status!==i.SUCCESS?(0,s.Iu)("files_external","Examine this faulty external storage configuration"):(0,s.Iu)("files","Open in Files"),iconSvgInline:()=>"",enabled:(t,e)=>"extstoragemounts"===e.id,async exec(t){const e=t.attributes.config;return e?.status!==i.SUCCESS?(window.OC.dialogs.confirm((0,s.Iu)("files_external","There was an error with this external storage. Do you want to review this mount point config in the settings page?"),(0,s.Iu)("files_external","External mount error"),(e=>{if(!0===e){const e="personal"===t.attributes.scope?"user":"admin";window.location.href=(0,a.generateUrl)(`/settings/${e}/externalstorages`)}})),null):(window.OCP.Files.Router.goToRoute(null,{view:"files"},{dir:t.path}),null)},order:-1e3,default:o.DT.HIDDEN}),k=(0,r.j)("files_external","allowUserMounting",!1);(0,o.Ti)().register(new o.G7({id:"extstoragemounts",name:(0,s.Iu)("files_external","External storage"),caption:(0,s.Iu)("files_external","List of external storage."),emptyCaption:k?(0,s.Iu)("files_external","There is no external storage configured. You can configure them in your Personal settings."):(0,s.Iu)("files_external","There is no external storage configured and you don't have the permission to configure them."),emptyTitle:(0,s.Iu)("files_external","No external storage"),icon:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-folder-network" viewBox="0 0 24 24"><path d="M3,15V5A2,2 0 0,1 5,3H11L13,5H19A2,2 0 0,1 21,7V15A2,2 0 0,1 19,17H13V19H14A1,1 0 0,1 15,20H22V22H15A1,1 0 0,1 14,23H10A1,1 0 0,1 9,22H2V20H9A1,1 0 0,1 10,19H11V17H5A2,2 0 0,1 3,15Z" /></svg>',order:30,columns:[new o.sg({id:"storage-type",title:(0,s.Iu)("files_external","Storage type"),render(t){const e=t.attributes?.backend||(0,s.Iu)("files_external","Unknown"),n=document.createElement("span");return n.textContent=e,n}}),new o.sg({id:"scope",title:(0,s.Iu)("files_external","Scope"),render(t){const e=document.createElement("span");let n=(0,s.Iu)("files_external","Personal");return"system"===t.attributes?.scope&&(n=(0,s.Iu)("files_external","System")),e.textContent=n,e}})],getContents:async()=>{const t=(await u.Z.get((0,a.generateOcsUrl)("apps/files_external/api/v1/mounts"))).data.ocs.data.map(S);return{folder:new o.gt({id:0,source:(0,a.generateRemoteUrl)("dav"+O),root:O,owner:(0,I.ts)()?.uid||null,permissions:o.y3.READ}),contents:t}}})),(0,o.p4)(h),(0,o.p4)(P),(0,o.p4)(D)},17150:(t,e,n)=>{n.d(e,{Z:()=>a});var i=n(87537),r=n.n(i),s=n(23645),o=n.n(s)()(r());o.push([t.id,".files-list__row-status{display:flex;width:44px;justify-content:center;align-items:center;height:100%}.files-list__row-status svg{width:24px;height:24px}.files-list__row-status svg path{fill:currentColor}.files-list__row-status--error,.files-list__row-status--warning{position:absolute;display:block;top:0;left:0;right:0;bottom:0;opacity:.1;z-index:-1}.files-list__row-status--error{background:var(--color-error)}.files-list__row-status--warning{background:var(--color-warning)}","",{version:3,sources:["webpack://./apps/files_external/src/css/fileEntryStatus.scss"],names:[],mappings:"AAAA,wBACC,YAAA,CACA,UAAA,CACA,sBAAA,CACA,kBAAA,CACA,WAAA,CAEA,4BACC,UAAA,CACA,WAAA,CAEA,iCACC,iBAAA,CAIF,gEAEC,iBAAA,CACA,aAAA,CACA,KAAA,CACA,MAAA,CACA,OAAA,CACA,QAAA,CACA,UAAA,CACA,UAAA,CAGD,+BACC,6BAAA,CAGD,iCACC,+BAAA",sourcesContent:[".files-list__row-status {\n\tdisplay: flex;\n\twidth: 44px;\n\tjustify-content: center;\n\talign-items: center;\n\theight: 100%;\n\n\tsvg {\n\t\twidth: 24px;\n\t\theight: 24px;\n\n\t\tpath {\n\t\t\tfill: currentColor;\n\t\t}\n\t}\n\n\t&--error,\n\t&--warning {\n\t\tposition: absolute;\n\t\tdisplay: block;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\topacity: .1;\n\t\tz-index: -1;\n\t}\n\n\t&--error {\n\t\tbackground: var(--color-error);\n\t}\n\n\t&--warning {\n\t\tbackground: var(--color-warning);\n\t}\n}\n"],sourceRoot:""}]);const a=o},5656:(t,e,n)=>{n.d(e,{DT:()=>g,G7:()=>ie,RL:()=>$,Ti:()=>j,Tv:()=>_,_o:()=>D,gt:()=>P,h7:()=>A,p$:()=>m,p4:()=>w,pC:()=>R,rp:()=>V,sS:()=>f,sg:()=>L,tB:()=>N,y3:()=>v});var i=n(77958),r=n(17499),s=n(31352),o=n(62520),a=n(65358),l=n(79753),u=n(14596);const c=null===(d=(0,i.ts)())?(0,r.IY)().setApp("files").build():(0,r.IY)().setApp("files").setUid(d.uid).build();var d;const p=["B","KB","MB","GB","TB","PB"],h=["B","KiB","MiB","GiB","TiB","PiB"];function f(t,e=!1,n=!1,i=!1){n=n&&!i,"string"==typeof t&&(t=Number(t));let r=t>0?Math.floor(Math.log(t)/Math.log(i?1e3:1024)):0;r=Math.min((n?h.length:p.length)-1,r);const o=n?h[r]:p[r];let a=(t/Math.pow(i?1e3:1024,r)).toFixed(1);return!0===e&&0===r?("0.0"!==a?"< 1 ":"0 ")+(n?h[1]:p[1]):(a=r<2?parseFloat(a).toFixed(0):parseFloat(a).toLocaleString((0,s.aj)()),a+" "+o)}var g=(t=>(t.DEFAULT="default",t.HIDDEN="hidden",t))(g||{});class m{_action;constructor(t){this.validateAction(t),this._action=t}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(t){if(!t.id||"string"!=typeof t.id)throw new Error("Invalid id");if(!t.displayName||"function"!=typeof t.displayName)throw new Error("Invalid displayName function");if("title"in t&&"function"!=typeof t.title)throw new Error("Invalid title function");if(!t.iconSvgInline||"function"!=typeof t.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!t.exec||"function"!=typeof t.exec)throw new Error("Invalid exec function");if("enabled"in t&&"function"!=typeof t.enabled)throw new Error("Invalid enabled function");if("execBatch"in t&&"function"!=typeof t.execBatch)throw new Error("Invalid execBatch function");if("order"in t&&"number"!=typeof t.order)throw new Error("Invalid order");if("parent"in t&&"string"!=typeof t.parent)throw new Error("Invalid parent");if(t.default&&!Object.values(g).includes(t.default))throw new Error("Invalid default");if("inline"in t&&"function"!=typeof t.inline)throw new Error("Invalid inline function");if("renderInline"in t&&"function"!=typeof t.renderInline)throw new Error("Invalid renderInline function")}}const w=function(t){typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],c.debug("FileActions initialized")),window._nc_fileactions.find((e=>e.id===t.id))?c.error(`FileAction ${t.id} already registered`,{action:t}):window._nc_fileactions.push(t)};var v=(t=>(t[t.NONE=0]="NONE",t[t.CREATE=4]="CREATE",t[t.READ=1]="READ",t[t.UPDATE=2]="UPDATE",t[t.DELETE=8]="DELETE",t[t.SHARE=16]="SHARE",t[t.ALL=31]="ALL",t))(v||{});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"],x={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},y=function(){return typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...b]),window._nc_dav_properties.map((t=>`<${t} />`)).join(" ")},E=function(){return typeof window._nc_dav_namespaces>"u"&&(window._nc_dav_namespaces={...x}),Object.keys(window._nc_dav_namespaces).map((t=>`xmlns:${t}="${window._nc_dav_namespaces?.[t]}"`)).join(" ")},A=function(){return`<?xml version="1.0"?>\n\t\t<d:propfind ${E()}>\n\t\t\t<d:prop>\n\t\t\t\t${y()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`},N=function(t){return`<?xml version="1.0" encoding="UTF-8"?>\n<d:searchrequest ${E()}\n\txmlns:ns="https://github.com/icewind1991/SearchDAV/ns">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${y()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${(0,i.ts)()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${t}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`};var _=(t=>(t.Folder="folder",t.File="file",t))(_||{});const T=function(t,e){return null!==t.match(e)},C=(t,e)=>{if(t.id&&"number"!=typeof t.id)throw new Error("Invalid id type of value");if(!t.source)throw new Error("Missing mandatory source");try{new URL(t.source)}catch{throw new Error("Invalid source format, source must be a valid URL")}if(!t.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(t.mtime&&!(t.mtime instanceof Date))throw new Error("Invalid mtime type");if(t.crtime&&!(t.crtime instanceof Date))throw new Error("Invalid crtime type");if(!t.mime||"string"!=typeof t.mime||!t.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in t&&"number"!=typeof t.size&&void 0!==t.size)throw new Error("Invalid size type");if("permissions"in t&&void 0!==t.permissions&&!("number"==typeof t.permissions&&t.permissions>=v.NONE&&t.permissions<=v.ALL))throw new Error("Invalid permissions");if(t.owner&&null!==t.owner&&"string"!=typeof t.owner)throw new Error("Invalid owner type");if(t.attributes&&"object"!=typeof t.attributes)throw new Error("Invalid attributes type");if(t.root&&"string"!=typeof t.root)throw new Error("Invalid root type");if(t.root&&!t.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(t.root&&!t.source.includes(t.root))throw new Error("Root must be part of the source");if(t.root&&T(t.source,e)){const n=t.source.match(e)[0];if(!t.source.includes((0,o.join)(n,t.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(t.status&&!Object.values(I).includes(t.status))throw new Error("Status must be a valid NodeStatus")};var I=(t=>(t.NEW="new",t.FAILED="failed",t.LOADING="loading",t.LOCKED="locked",t))(I||{});class O{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;constructor(t,e){C(t,e||this._knownDavService),this._data=t;const n={set:(t,e,n)=>(this.updateMtime(),Reflect.set(t,e,n)),deleteProperty:(t,e)=>(this.updateMtime(),Reflect.deleteProperty(t,e))};this._attributes=new Proxy(t.attributes||{},n),delete this._data.attributes,e&&(this._knownDavService=e)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:t}=new URL(this.source);return t+(0,a.Ec)(this.source.slice(t.length))}get basename(){return(0,o.basename)(this.source)}get extension(){return(0,o.extname)(this.source)}get dirname(){if(this.root){const t=this.source.indexOf(this.root);return(0,o.dirname)(this.source.slice(t+this.root.length)||"/")}const t=new URL(this.source);return(0,o.dirname)(t.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:v.NONE:v.READ}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return T(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,o.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){const t=this.source.indexOf(this.root);return this.source.slice(t+this.root.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(t){this._data.status=t}move(t){C({...this._data,source:t},this._knownDavService),this._data.source=t,this.updateMtime()}rename(t){if(t.includes("/"))throw new Error("Invalid basename");this.move((0,o.dirname)(this.source)+"/"+t)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}}class S extends O{get type(){return _.File}}class P extends O{constructor(t){super({...t,mime:"httpd/unix-directory"})}get type(){return _.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}const D=`/files/${(0,i.ts)()?.uid}`,k=(0,l.generateRemoteUrl)("dav"),V=function(t=k){const e=(0,u.eI)(t);function n(t){e.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})}return(0,i._S)(n),n((0,i.IH)()),(0,u.lD)().patch("fetch",((t,e)=>{const n=e.headers;return n?.method&&(e.method=n.method,delete n.method),fetch(t,e)})),e},R=async(t,e="/",n=D)=>(await t.getDirectoryContents(`${n}${e}`,{details:!0,data:`<?xml version="1.0"?>\n\t\t<oc:filter-files ${E()}>\n\t\t\t<d:prop>\n\t\t\t\t${y()}\n\t\t\t</d:prop>\n\t\t\t<oc:filter-rules>\n\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t</oc:filter-rules>\n\t\t</oc:filter-files>`,headers:{method:"REPORT"},includeSelf:!0})).data.filter((t=>t.filename!==e)).map((t=>$(t,n))),$=function(t,e=D,n=k){const r=t.props,s=function(t=""){let e=v.NONE;return t&&((t.includes("C")||t.includes("K"))&&(e|=v.CREATE),t.includes("G")&&(e|=v.READ),(t.includes("W")||t.includes("N")||t.includes("V"))&&(e|=v.UPDATE),t.includes("D")&&(e|=v.DELETE),t.includes("R")&&(e|=v.SHARE)),e}(r?.permissions),o=(0,i.ts)()?.uid,a={id:r?.fileid||0,source:`${n}${t.filename}`,mtime:new Date(Date.parse(t.lastmod)),mime:t.mime,size:r?.size||Number.parseInt(r.getcontentlength||"0"),permissions:s,owner:o,root:e,attributes:{...t,...r,hasPreview:r?.["has-preview"]}};return delete a.attributes?.props,"file"===t.type?new S(a):new P(a)};class M{_views=[];_currentView=null;register(t){if(this._views.find((e=>e.id===t.id)))throw new Error(`View id ${t.id} is already registered`);this._views.push(t)}remove(t){const e=this._views.findIndex((e=>e.id===t));-1!==e&&this._views.splice(e,1)}get views(){return this._views}setActive(t){this._currentView=t}get active(){return this._currentView}}const j=function(){return typeof window._nc_navigation>"u"&&(window._nc_navigation=new M,c.debug("Navigation service initialized")),window._nc_navigation};class L{_column;constructor(t){F(t),this._column=t}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 F=function(t){if(!t.id||"string"!=typeof t.id)throw new Error("A column id is required");if(!t.title||"string"!=typeof t.title)throw new Error("A column title is required");if(!t.render||"function"!=typeof t.render)throw new Error("A render function is required");if(t.sort&&"function"!=typeof t.sort)throw new Error("Column sortFunction must be a function");if(t.summary&&"function"!=typeof t.summary)throw new Error("Column summary must be a function");return!0};var U={},B={};!function(t){const e=":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="["+e+"]["+e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=new RegExp("^"+n+"$");t.isExist=function(t){return typeof t<"u"},t.isEmptyObject=function(t){return 0===Object.keys(t).length},t.merge=function(t,e,n){if(e){const i=Object.keys(e),r=i.length;for(let s=0;s<r;s++)t[i[s]]="strict"===n?[e[i[s]]]:e[i[s]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(t){const e=i.exec(t);return!(null===e||typeof e>"u")},t.getAllMatches=function(t,e){const n=[];let i=e.exec(t);for(;i;){const r=[];r.startIndex=e.lastIndex-i[0].length;const s=i.length;for(let t=0;t<s;t++)r.push(i[t]);n.push(r),i=e.exec(t)}return n},t.nameRegexp=n}(B);const H=B,q={allowBooleanAttributes:!1,unpairedTags:[]};function G(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function Z(t,e){const n=e;for(;e<t.length;e++)if("?"==t[e]||" "==t[e]){const i=t.substr(n,e-n);if(e>5&&"xml"===i)return tt("InvalidXml","XML declaration allowed only at the start of the document.",it(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}continue}return e}function X(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e<t.length;e++)if("<"===t[e])n++;else if(">"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e<t.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}U.validate=function(t,e){e=Object.assign({},q,e);const n=[];let i=!1,r=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let s=0;s<t.length;s++)if("<"===t[s]&&"?"===t[s+1]){if(s+=2,s=Z(t,s),s.err)return s}else{if("<"!==t[s]){if(G(t[s]))continue;return tt("InvalidChar","char '"+t[s]+"' is not expected.",it(t,s))}{let o=s;if(s++,"!"===t[s]){s=X(t,s);continue}{let a=!1;"/"===t[s]&&(a=!0,s++);let l="";for(;s<t.length&&">"!==t[s]&&" "!==t[s]&&"\t"!==t[s]&&"\n"!==t[s]&&"\r"!==t[s];s++)l+=t[s];if(l=l.trim(),"/"===l[l.length-1]&&(l=l.substring(0,l.length-1),s--),!nt(l)){let e;return e=0===l.trim().length?"Invalid space after '<'.":"Tag '"+l+"' is an invalid name.",tt("InvalidTag",e,it(t,s))}const u=W(t,s);if(!1===u)return tt("InvalidAttr","Attributes for '"+l+"' have open quote.",it(t,s));let c=u.value;if(s=u.index,"/"===c[c.length-1]){const n=s-c.length;c=c.substring(0,c.length-1);const r=J(c,e);if(!0!==r)return tt(r.err.code,r.err.msg,it(t,n+r.err.line));i=!0}else if(a){if(!u.tagClosed)return tt("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",it(t,s));if(c.trim().length>0)return tt("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",it(t,o));{const e=n.pop();if(l!==e.tagName){let n=it(t,e.tagStartPos);return tt("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+l+"'.",it(t,o))}0==n.length&&(r=!0)}}else{const a=J(c,e);if(!0!==a)return tt(a.err.code,a.err.msg,it(t,s-c.length+a.err.line));if(!0===r)return tt("InvalidXml","Multiple possible root nodes found.",it(t,s));-1!==e.unpairedTags.indexOf(l)||n.push({tagName:l,tagStartPos:o}),i=!0}for(s++;s<t.length;s++)if("<"===t[s]){if("!"===t[s+1]){s++,s=X(t,s);continue}if("?"!==t[s+1])break;if(s=Z(t,++s),s.err)return s}else if("&"===t[s]){const e=Q(t,s);if(-1==e)return tt("InvalidChar","char '&' is not expected.",it(t,s));s=e}else if(!0===r&&!G(t[s]))return tt("InvalidXml","Extra text at the end",it(t,s));"<"===t[s]&&s--}}}return i?1==n.length?tt("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",it(t,n[0].tagStartPos)):!(n.length>0)||tt("InvalidXml","Invalid '"+JSON.stringify(n.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):tt("InvalidXml","Start tag expected.",1)};const z='"',K="'";function W(t,e){let n="",i="",r=!1;for(;e<t.length;e++){if(t[e]===z||t[e]===K)""===i?i=t[e]:i!==t[e]||(i="");else if(">"===t[e]&&""===i){r=!0;break}n+=t[e]}return""===i&&{value:n,index:e,tagClosed:r}}const Y=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function J(t,e){const n=H.getAllMatches(t,Y),i={};for(let t=0;t<n.length;t++){if(0===n[t][1].length)return tt("InvalidAttr","Attribute '"+n[t][2]+"' has no space in starting.",rt(n[t]));if(void 0!==n[t][3]&&void 0===n[t][4])return tt("InvalidAttr","Attribute '"+n[t][2]+"' is without value.",rt(n[t]));if(void 0===n[t][3]&&!e.allowBooleanAttributes)return tt("InvalidAttr","boolean attribute '"+n[t][2]+"' is not allowed.",rt(n[t]));const r=n[t][2];if(!et(r))return tt("InvalidAttr","Attribute '"+r+"' is an invalid name.",rt(n[t]));if(i.hasOwnProperty(r))return tt("InvalidAttr","Attribute '"+r+"' is repeated.",rt(n[t]));i[r]=1}return!0}function Q(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let n=/\d/;for("x"===t[e]&&(e++,n=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(n))break}return-1}(t,++e);let n=0;for(;e<t.length;e++,n++)if(!(t[e].match(/\w/)&&n<20)){if(";"===t[e])break;return-1}return e}function tt(t,e,n){return{err:{code:t,msg:e,line:n.line||n,col:n.col}}}function et(t){return H.isName(t)}function nt(t){return H.isName(t)}function it(t,e){const n=t.substring(0,e).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function rt(t){return t.startIndex+t[1].length}var st={};const ot={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t}};st.buildOptions=function(t){return Object.assign({},ot,t)},st.defaultOptions=ot;const at=B;function lt(t,e){let n="";for(;e<t.length&&"'"!==t[e]&&'"'!==t[e];e++)n+=t[e];if(n=n.trim(),-1!==n.indexOf(" "))throw new Error("External entites are not supported");const i=t[e++];let r="";for(;e<t.length&&t[e]!==i;e++)r+=t[e];return[n,r,e]}function ut(t,e){return"!"===t[e+1]&&"-"===t[e+2]&&"-"===t[e+3]}function ct(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"N"===t[e+3]&&"T"===t[e+4]&&"I"===t[e+5]&&"T"===t[e+6]&&"Y"===t[e+7]}function dt(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"L"===t[e+3]&&"E"===t[e+4]&&"M"===t[e+5]&&"E"===t[e+6]&&"N"===t[e+7]&&"T"===t[e+8]}function pt(t,e){return"!"===t[e+1]&&"A"===t[e+2]&&"T"===t[e+3]&&"T"===t[e+4]&&"L"===t[e+5]&&"I"===t[e+6]&&"S"===t[e+7]&&"T"===t[e+8]}function ht(t,e){return"!"===t[e+1]&&"N"===t[e+2]&&"O"===t[e+3]&&"T"===t[e+4]&&"A"===t[e+5]&&"T"===t[e+6]&&"I"===t[e+7]&&"O"===t[e+8]&&"N"===t[e+9]}function ft(t){if(at.isName(t))return t;throw new Error(`Invalid entity name ${t}`)}const gt=/^[-+]?0x[a-fA-F0-9]+$/,mt=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const wt={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};const vt=B,bt=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}},xt=function(t,e){const n={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let i=1,r=!1,s=!1,o="";for(;e<t.length;e++)if("<"!==t[e]||s)if(">"===t[e]){if(s?"-"===t[e-1]&&"-"===t[e-2]&&(s=!1,i--):i--,0===i)break}else"["===t[e]?r=!0:o+=t[e];else{if(r&&ct(t,e))e+=7,[entityName,val,e]=lt(t,e+1),-1===val.indexOf("&")&&(n[ft(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(r&&dt(t,e))e+=8;else if(r&&pt(t,e))e+=8;else if(r&&ht(t,e))e+=9;else{if(!ut)throw new Error("Invalid DOCTYPE");s=!0}i++,o=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}},yt=function(t,e={}){if(e=Object.assign({},wt,e),!t||"string"!=typeof t)return t;let n=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(n))return t;if(e.hex&&gt.test(n))return Number.parseInt(n,16);{const i=mt.exec(n);if(i){const r=i[1],s=i[2];let o=function(t){return t&&-1!==t.indexOf(".")&&("."===(t=t.replace(/0+$/,""))?t="0":"."===t[0]?t="0"+t:"."===t[t.length-1]&&(t=t.substr(0,t.length-1))),t}(i[3]);const a=i[4]||i[6];if(!e.leadingZeros&&s.length>0&&r&&"."!==n[2])return t;if(!e.leadingZeros&&s.length>0&&!r&&"."!==n[1])return t;{const i=Number(n),l=""+i;return-1!==l.search(/[eE]/)||a?e.eNotation?i:t:-1!==n.indexOf(".")?"0"===l&&""===o||l===o||r&&l==="-"+o?i:t:s?o===l||r+o===l?i:t:n===l||n===r+l?i:t}}return t}};function Et(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const i=e[n];this.lastEntities[i]={regex:new RegExp("&"+i+";","g"),val:t[i]}}}function At(t,e,n,i,r,s,o){if(void 0!==t&&(this.options.trimValues&&!i&&(t=t.trim()),t.length>0)){o||(t=this.replaceEntitiesValue(t));const i=this.options.tagValueProcessor(e,t,n,r,s);return null==i?t:typeof i!=typeof t||i!==t?i:this.options.trimValues||t.trim()===t?Rt(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function Nt(t){if(this.options.removeNSPrefix){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,vt.nameRegexp);const _t=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function Tt(t,e,n){if(!this.options.ignoreAttributes&&"string"==typeof t){const n=vt.getAllMatches(t,_t),i=n.length,r={};for(let t=0;t<i;t++){const i=this.resolveNameSpace(n[t][1]);let s=n[t][4],o=this.options.attributeNamePrefix+i;if(i.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),"__proto__"===o&&(o="#__proto__"),void 0!==s){this.options.trimValues&&(s=s.trim()),s=this.replaceEntitiesValue(s);const t=this.options.attributeValueProcessor(i,s,e);r[o]=null==t?s:typeof t!=typeof s||t!==s?t:Rt(s,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(r[o]=!0)}if(!Object.keys(r).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=r,t}return r}}const Ct=function(t){t=t.replace(/\r\n?/g,"\n");const e=new bt("!xml");let n=e,i="",r="";for(let s=0;s<t.length;s++)if("<"===t[s])if("/"===t[s+1]){const e=Dt(t,">",s,"Closing Tag is not closed.");let o=t.substring(s+2,e).trim();if(this.options.removeNSPrefix){const t=o.indexOf(":");-1!==t&&(o=o.substr(t+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),n&&(i=this.saveTextToParentTag(i,n,r));const a=r.substring(r.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=r.lastIndexOf(".",r.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=r.lastIndexOf("."),r=r.substring(0,l),n=this.tagsNodeStack.pop(),i="",s=e}else if("?"===t[s+1]){let e=kt(t,s,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,n,r),!(this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags)){const t=new bt(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,r,e.tagName)),this.addChild(n,t,r)}s=e.closeIndex+1}else if("!--"===t.substr(s+1,3)){const e=Dt(t,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const o=t.substring(s+4,e-2);i=this.saveTextToParentTag(i,n,r),n.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}s=e}else if("!D"===t.substr(s+1,2)){const e=xt(t,s);this.docTypeEntities=e.entities,s=e.i}else if("!["===t.substr(s+1,2)){const e=Dt(t,"]]>",s,"CDATA is not closed.")-2,o=t.substring(s+9,e);if(i=this.saveTextToParentTag(i,n,r),this.options.cdataPropName)n.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]);else{let t=this.parseTextData(o,n.tagname,r,!0,!1,!0);null==t&&(t=""),n.add(this.options.textNodeName,t)}s=e+2}else{let o=kt(t,s,this.options.removeNSPrefix),a=o.tagName;const l=o.rawTagName;let u=o.tagExp,c=o.attrExpPresent,d=o.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),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("."))),a!==e.tagname&&(r+=r?"."+a:a),this.isItStopNode(this.options.stopNodes,r,a)){let e="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)s=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))s=o.closeIndex;else{const n=this.readStopNodeData(t,l,d+1);if(!n)throw new Error(`Unexpected end of ${l}`);s=n.i,e=n.tagContent}const i=new bt(a);a!==u&&c&&(i[":@"]=this.buildAttributesMap(u,r,a)),e&&(e=this.parseTextData(e,a,r,!0,c,!0,!0)),r=r.substr(0,r.lastIndexOf(".")),i.add(this.options.textNodeName,e),this.addChild(n,i,r)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),r=r.substr(0,r.length-1),u=a):u=u.substr(0,u.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const t=new bt(a);a!==u&&c&&(t[":@"]=this.buildAttributesMap(u,r,a)),this.addChild(n,t,r),r=r.substr(0,r.lastIndexOf("."))}else{const t=new bt(a);this.tagsNodeStack.push(n),a!==u&&c&&(t[":@"]=this.buildAttributesMap(u,r,a)),this.addChild(n,t,r),n=t}i="",s=d}}else i+=t[s];return e.child};function It(t,e,n){const i=this.options.updateTag(e.tagname,n,e[":@"]);!1===i||("string"==typeof i&&(e.tagname=i),t.addChild(e))}const Ot=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const n=this.docTypeEntities[e];t=t.replace(n.regx,n.val)}for(let e in this.lastEntities){const n=this.lastEntities[e];t=t.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const n=this.htmlEntities[e];t=t.replace(n.regex,n.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function St(t,e,n,i){return t&&(void 0===i&&(i=0===Object.keys(e.child).length),void 0!==(t=this.parseTextData(t,e.tagname,n,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,i))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function Pt(t,e,n){const i="*."+n;for(const n in t){const r=t[n];if(i===r||e===r)return!0}return!1}function Dt(t,e,n,i){const r=t.indexOf(e,n);if(-1===r)throw new Error(i);return r+e.length-1}function kt(t,e,n,i=">"){const r=function(t,e,n=">"){let i,r="";for(let s=e;s<t.length;s++){let e=t[s];if(i)e===i&&(i="");else if('"'===e||"'"===e)i=e;else if(e===n[0]){if(!n[1])return{data:r,index:s};if(t[s+1]===n[1])return{data:r,index:s}}else"\t"===e&&(e=" ");r+=e}}(t,e+1,i);if(!r)return;let s=r.data;const o=r.index,a=s.search(/\s/);let l=s,u=!0;-1!==a&&(l=s.substr(0,a).replace(/\s\s*$/,""),s=s.substr(a+1));const c=l;if(n){const t=l.indexOf(":");-1!==t&&(l=l.substr(t+1),u=l!==r.data.substr(t+1))}return{tagName:l,tagExp:s,closeIndex:o,attrExpPresent:u,rawTagName:c}}function Vt(t,e,n){const i=n;let r=1;for(;n<t.length;n++)if("<"===t[n])if("/"===t[n+1]){const s=Dt(t,">",n,`${e} is not closed`);if(t.substring(n+2,s).trim()===e&&(r--,0===r))return{tagContent:t.substring(i,n),i:s};n=s}else if("?"===t[n+1])n=Dt(t,"?>",n+1,"StopNode is not closed.");else if("!--"===t.substr(n+1,3))n=Dt(t,"--\x3e",n+3,"StopNode is not closed.");else if("!["===t.substr(n+1,2))n=Dt(t,"]]>",n,"StopNode is not closed.")-2;else{const i=kt(t,n,">");i&&((i&&i.tagName)===e&&"/"!==i.tagExp[i.tagExp.length-1]&&r++,n=i.closeIndex)}}function Rt(t,e,n){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&yt(t,n)}return vt.isExist(t)?t:""}var $t={};function Mt(t,e,n){let i;const r={};for(let s=0;s<t.length;s++){const o=t[s],a=jt(o);let l="";if(l=void 0===n?a:n+"."+a,a===e.textNodeName)void 0===i?i=o[a]:i+=""+o[a];else{if(void 0===a)continue;if(o[a]){let t=Mt(o[a],e,l);const n=Ft(t,e);o[":@"]?Lt(t,o[":@"],l,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==r[a]&&r.hasOwnProperty(a)?(Array.isArray(r[a])||(r[a]=[r[a]]),r[a].push(t)):e.isArray(a,l,n)?r[a]=[t]:r[a]=t}}}return"string"==typeof i?i.length>0&&(r[e.textNodeName]=i):void 0!==i&&(r[e.textNodeName]=i),r}function jt(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=e[t];if(":@"!==n)return n}}function Lt(t,e,n,i){if(e){const r=Object.keys(e),s=r.length;for(let o=0;o<s;o++){const s=r[o];i.isArray(s,n+"."+s,!0,!0)?t[s]=[e[s]]:t[s]=e[s]}}}function Ft(t,e){const{textNodeName:n}=e,i=Object.keys(t).length;return!(0!==i&&(1!==i||!t[n]&&"boolean"!=typeof t[n]&&0!==t[n]))}$t.prettify=function(t,e){return Mt(t,e)};const{buildOptions:Ut}=st,Bt=class{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},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=Et,this.parseXml=Ct,this.parseTextData=At,this.resolveNameSpace=Nt,this.buildAttributesMap=Tt,this.isItStopNode=Pt,this.replaceEntitiesValue=Ot,this.readStopNodeData=Vt,this.saveTextToParentTag=St,this.addChild=It}},{prettify:Ht}=$t,qt=U;function Gt(t,e,n,i){let r="",s=!1;for(let o=0;o<t.length;o++){const a=t[o],l=Zt(a);if(void 0===l)continue;let u="";if(u=0===n.length?l:`${n}.${l}`,l===e.textNodeName){let t=a[l];zt(u,e)||(t=e.tagValueProcessor(l,t),t=Kt(t,e)),s&&(r+=i),r+=t,s=!1;continue}if(l===e.cdataPropName){s&&(r+=i),r+=`<![CDATA[${a[l][0][e.textNodeName]}]]>`,s=!1;continue}if(l===e.commentPropName){r+=i+`\x3c!--${a[l][0][e.textNodeName]}--\x3e`,s=!0;continue}if("?"===l[0]){const t=Xt(a[":@"],e),n="?xml"===l?"":i;let o=a[l][0][e.textNodeName];o=0!==o.length?" "+o:"",r+=n+`<${l}${o}${t}?>`,s=!0;continue}let c=i;""!==c&&(c+=e.indentBy);const d=i+`<${l}${Xt(a[":@"],e)}`,p=Gt(a[l],e,u,c);-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?r+=d+">":r+=d+"/>":p&&0!==p.length||!e.suppressEmptyNode?p&&p.endsWith(">")?r+=d+`>${p}${i}</${l}>`:(r+=d+">",p&&""!==i&&(p.includes("/>")||p.includes("</"))?r+=i+e.indentBy+p+i:r+=p,r+=`</${l}>`):r+=d+"/>",s=!0}return r}function Zt(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const i=e[n];if(t.hasOwnProperty(i)&&":@"!==i)return i}}function Xt(t,e){let n="";if(t&&!e.ignoreAttributes)for(let i in t){if(!t.hasOwnProperty(i))continue;let r=e.attributeValueProcessor(i,t[i]);r=Kt(r,e),!0===r&&e.suppressBooleanAttributes?n+=` ${i.substr(e.attributeNamePrefix.length)}`:n+=` ${i.substr(e.attributeNamePrefix.length)}="${r}"`}return n}function zt(t,e){let n=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let i in e.stopNodes)if(e.stopNodes[i]===t||e.stopNodes[i]==="*."+n)return!0;return!1}function Kt(t,e){if(t&&t.length>0&&e.processEntities)for(let n=0;n<e.entities.length;n++){const i=e.entities[n];t=t.replace(i.regex,i.val)}return t}const Wt=function(t,e){let n="";return e.format&&e.indentBy.length>0&&(n="\n"),Gt(t,e,"",n)},Yt={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:"  ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Jt(t){this.options=Object.assign({},Yt,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=ee),this.processTextOrObjNode=Qt,this.options.format?(this.indentate=te,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function Qt(t,e,n){const i=this.j2x(t,n+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,i.attrStr,n):this.buildObjectNode(i.val,e,i.attrStr,n)}function te(t){return this.options.indentBy.repeat(t)}function ee(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}Jt.prototype.build=function(t){return this.options.preserveOrder?Wt(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},Jt.prototype.j2x=function(t,e){let n="",i="";for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r))if(typeof t[r]>"u")this.isAttribute(r)&&(i+="");else if(null===t[r])this.isAttribute(r)?i+="":"?"===r[0]?i+=this.indentate(e)+"<"+r+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+r+"/"+this.tagEndChar;else if(t[r]instanceof Date)i+=this.buildTextValNode(t[r],r,"",e);else if("object"!=typeof t[r]){const s=this.isAttribute(r);if(s)n+=this.buildAttrPairStr(s,""+t[r]);else if(r===this.options.textNodeName){let e=this.options.tagValueProcessor(r,""+t[r]);i+=this.replaceEntitiesValue(e)}else i+=this.buildTextValNode(t[r],r,"",e)}else if(Array.isArray(t[r])){const n=t[r].length;let s="";for(let o=0;o<n;o++){const n=t[r][o];typeof n>"u"||(null===n?"?"===r[0]?i+=this.indentate(e)+"<"+r+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+r+"/"+this.tagEndChar:"object"==typeof n?this.options.oneListGroup?s+=this.j2x(n,e+1).val:s+=this.processTextOrObjNode(n,r,e):s+=this.buildTextValNode(n,r,"",e))}this.options.oneListGroup&&(s=this.buildObjectNode(s,r,"",e)),i+=s}else if(this.options.attributesGroupName&&r===this.options.attributesGroupName){const e=Object.keys(t[r]),i=e.length;for(let s=0;s<i;s++)n+=this.buildAttrPairStr(e[s],""+t[r][e[s]])}else i+=this.processTextOrObjNode(t[r],r,e);return{attrStr:n,val:i}},Jt.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},Jt.prototype.buildObjectNode=function(t,e,n,i){if(""===t)return"?"===e[0]?this.indentate(i)+"<"+e+n+"?"+this.tagEndChar:this.indentate(i)+"<"+e+n+this.closeTag(e)+this.tagEndChar;{let r="</"+e+this.tagEndChar,s="";return"?"===e[0]&&(s="?",r=""),!n&&""!==n||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===s.length?this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(i)+"<"+e+n+s+this.tagEndChar+t+this.indentate(i)+r:this.indentate(i)+"<"+e+n+s+">"+t+r}},Jt.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},Jt.prototype.buildTextValNode=function(t,e,n,i){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(i)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(i)+"<"+e+n+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(e,t);return r=this.replaceEntitiesValue(r),""===r?this.indentate(i)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(i)+"<"+e+n+">"+r+"</"+e+this.tagEndChar}},Jt.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const n=this.options.entities[e];t=t.replace(n.regex,n.val)}return t};var ne={XMLParser:class{constructor(t){this.externalEntities={},this.options=Ut(t)}parse(t,e){if("string"!=typeof t){if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString()}if(e){!0===e&&(e={});const n=qt.validate(t,e);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new Bt(this.options);n.addExternalEntities(this.externalEntities);const i=n.parseXml(t);return this.options.preserveOrder||void 0===i?i:Ht(i,this.options)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}},XMLValidator:U,XMLBuilder:Jt};class ie{_view;constructor(t){re(t),this._view=t}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(t){this._view.icon=t}get order(){return this._view.order}set order(t){this._view.order=t}get params(){return this._view.params}set params(t){this._view.params=t}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(t){this._view.expanded=t}get defaultSortKey(){return this._view.defaultSortKey}}const re=function(t){if(!t.id||"string"!=typeof t.id)throw new Error("View id is required and must be a string");if(!t.name||"string"!=typeof t.name)throw new Error("View name is required and must be a string");if(t.columns&&t.columns.length>0&&(!t.caption||"string"!=typeof t.caption))throw new Error("View caption is required for top-level views and must be a string");if(!t.getContents||"function"!=typeof t.getContents)throw new Error("View getContents is required and must be a function");if(!t.icon||"string"!=typeof t.icon||!function(t){if("string"!=typeof t)throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);if(0===(t=t.trim()).length||!0!==ne.XMLValidator.validate(t))return!1;let e;const n=new ne.XMLParser;try{e=n.parse(t)}catch{return!1}return!(!e||!("svg"in e))}(t.icon))throw new Error("View icon is required and must be a valid svg string");if(!("order"in t)||"number"!=typeof t.order)throw new Error("View order is required and must be a number");if(t.columns&&t.columns.forEach((t=>{if(!(t instanceof L))throw new Error("View columns must be an array of Column. Invalid column found")})),t.emptyView&&"function"!=typeof t.emptyView)throw new Error("View emptyView must be a function");if(t.parent&&"string"!=typeof t.parent)throw new Error("View parent must be a string");if("sticky"in t&&"boolean"!=typeof t.sticky)throw new Error("View sticky must be a boolean");if("expanded"in t&&"boolean"!=typeof t.expanded)throw new Error("View expanded must be a boolean");if(t.defaultSortKey&&"string"!=typeof t.defaultSortKey)throw new Error("View defaultSortKey must be a string");return!0}}},r={};function s(t){var e=r[t];if(void 0!==e)return e.exports;var n=r[t]={id:t,loaded:!1,exports:{}};return i[t].call(n.exports,n,n.exports,s),n.loaded=!0,n.exports}s.m=i,t=[],s.O=(e,n,i,r)=>{if(!n){var o=1/0;for(c=0;c<t.length;c++){n=t[c][0],i=t[c][1],r=t[c][2];for(var a=!0,l=0;l<n.length;l++)(!1&r||o>=r)&&Object.keys(s.O).every((t=>s.O[t](n[l])))?n.splice(l--,1):(a=!1,r<o&&(o=r));if(a){t.splice(c--,1);var u=i();void 0!==u&&(e=u)}}return e}r=r||0;for(var c=t.length;c>0&&t[c-1][2]>r;c--)t[c]=t[c-1];t[c]=[n,i,r]},s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var n in e)s.o(e,n)&&!s.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},s.f={},s.e=t=>Promise.all(Object.keys(s.f).reduce(((e,n)=>(s.f[n](t,e),e)),[])),s.u=t=>t+"-"+t+".js?v="+{2048:"78a82614529a3cefcde7",4180:"fe82f3a2dac70d6b82bc"}[t],s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),e={},n="nextcloud:",s.l=(t,i,r,o)=>{if(e[t])e[t].push(i);else{var a,l;if(void 0!==r)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var d=u[c];if(d.getAttribute("src")==t||d.getAttribute("data-webpack")==n+r){a=d;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,s.nc&&a.setAttribute("nonce",s.nc),a.setAttribute("data-webpack",n+r),a.src=t),e[t]=[i];var p=(n,i)=>{a.onerror=a.onload=null,clearTimeout(h);var r=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((t=>t(i))),n)return n(i)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),l&&document.head.appendChild(a)}},s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),s.j=8213,(()=>{var t;s.g.importScripts&&(t=s.g.location+"");var e=s.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var i=n.length-1;i>-1&&!t;)t=n[i--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=t})(),(()=>{s.b=document.baseURI||self.location.href;var t={8213:0};s.f.j=(e,n)=>{var i=s.o(t,e)?t[e]:void 0;if(0!==i)if(i)n.push(i[2]);else{var r=new Promise(((n,r)=>i=t[e]=[n,r]));n.push(i[2]=r);var o=s.p+s.u(e),a=new Error;s.l(o,(n=>{if(s.o(t,e)&&(0!==(i=t[e])&&(t[e]=void 0),i)){var r=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",a.name="ChunkLoadError",a.type=r,a.request=o,i[1](a)}}),"chunk-"+e,e)}},s.O.j=e=>0===t[e];var e=(e,n)=>{var i,r,o=n[0],a=n[1],l=n[2],u=0;if(o.some((e=>0!==t[e]))){for(i in a)s.o(a,i)&&(s.m[i]=a[i]);if(l)var c=l(s)}for(e&&e(n);u<o.length;u++)r=o[u],s.o(t,r)&&t[r]&&t[r][0](),t[r]=0;return s.O(c)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})(),s.nc=void 0;var o=s.O(void 0,[7874],(()=>s(5220)));o=s.O(o)})();
+//# sourceMappingURL=files_external-init.js.map?v=c58ab5fd409b45fc1bcb
\ No newline at end of file
index 6c1ea13b149c10fac99eb3cbeafadc224a7ef751..3d3e6f24055758669ca3d72fc2acb07178c5b49a 100644 (file)
@@ -1 +1 @@
-{"version":3,"file":"files_external-init.js?v=9c59d33c79a8e6b4e46f","mappings":";uBAAIA,ECAAC,EACAC,wBCAOC,+EACX,SAAWA,GACPA,EAAeA,EAAwB,QAAI,GAAK,UAChDA,EAAeA,EAAsB,MAAI,GAAK,QAC9CA,EAAeA,EAA8B,cAAI,GAAK,gBACtDA,EAAeA,EAAgC,gBAAI,GAAK,kBACxDA,EAAeA,EAA6B,aAAI,GAAK,eACrDA,EAAeA,EAAwB,QAAI,GAAK,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WFnB,EAAoBnO,EAAE3F,EAAKiV,GAA0C,IAA7B4C,EAAgB5C,GAGxD,IAAIoD,EAAuB,CAACC,EAA4BzhB,KACvD,IAKIkd,EAAUkB,EALVZ,EAAWxd,EAAK,GAChB0hB,EAAc1hB,EAAK,GACnB2hB,EAAU3hB,EAAK,GAGIwH,EAAI,EAC3B,GAAGgW,EAASoE,MAAM3iB,GAAgC,IAAxB+hB,EAAgB/hB,KAAa,CACtD,IAAIie,KAAYwE,EACZzE,EAAoB7N,EAAEsS,EAAaxE,KACrCD,EAAoBzW,EAAE0W,GAAYwE,EAAYxE,IAGhD,GAAGyE,EAAS,IAAIpE,EAASoE,EAAQ1E,EAClC,CAEA,IADGwE,GAA4BA,EAA2BzhB,GACrDwH,EAAIgW,EAASje,OAAQiI,IACzB4W,EAAUZ,EAAShW,GAChByV,EAAoB7N,EAAE4R,EAAiB5C,IAAY4C,EAAgB5C,IACrE4C,EAAgB5C,GAAS,KAE1B4C,EAAgB5C,GAAW,EAE5B,OAAOnB,EAAoBnO,EAAEyO,EAAO,EAGjCsE,EAAqBd,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1Fc,EAAmB9E,QAAQyE,EAAqBtB,KAAK,KAAM,IAC3D2B,EAAmBvb,KAAOkb,EAAqBtB,KAAK,KAAM2B,EAAmBvb,KAAK4Z,KAAK2B,QCvFvF5E,EAAoB5T,QAAKvG,ECGzB,IAAIgf,EAAsB7E,EAAoBnO,OAAEhM,EAAW,CAAC,OAAO,IAAOma,EAAoB,QAC9F6E,EAAsB7E,EAAoBnO,EAAEgT","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/files_external/src/utils/credentialsUtils.ts","webpack:///nextcloud/apps/files_external/src/utils/externalStorageUtils.ts","webpack:///nextcloud/apps/files_external/src/actions/enterCredentialsAction.ts","webpack://nextcloud/./apps/files_external/src/css/fileEntryStatus.scss?3c5c","webpack:///nextcloud/apps/files_external/src/services/externalStorage.ts","webpack:///nextcloud/apps/files_external/src/actions/inlineStorageCheckAction.ts","webpack:///nextcloud/apps/files_external/src/actions/openInFilesAction.ts","webpack:///nextcloud/apps/files_external/src/init.ts","webpack:///nextcloud/apps/files_external/src/css/fileEntryStatus.scss","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};","// @see https://github.com/nextcloud/server/blob/ac2bc2384efe3c15ff987b87a7432bc60d545c67/lib/public/Files/StorageNotAvailableException.php#L41\nexport var STORAGE_STATUS;\n(function (STORAGE_STATUS) {\n    STORAGE_STATUS[STORAGE_STATUS[\"SUCCESS\"] = 0] = \"SUCCESS\";\n    STORAGE_STATUS[STORAGE_STATUS[\"ERROR\"] = 1] = \"ERROR\";\n    STORAGE_STATUS[STORAGE_STATUS[\"INDETERMINATE\"] = 2] = \"INDETERMINATE\";\n    STORAGE_STATUS[STORAGE_STATUS[\"INCOMPLETE_CONF\"] = 3] = \"INCOMPLETE_CONF\";\n    STORAGE_STATUS[STORAGE_STATUS[\"UNAUTHORIZED\"] = 4] = \"UNAUTHORIZED\";\n    STORAGE_STATUS[STORAGE_STATUS[\"TIMEOUT\"] = 5] = \"TIMEOUT\";\n    STORAGE_STATUS[STORAGE_STATUS[\"NETWORK_ERROR\"] = 6] = \"NETWORK_ERROR\";\n})(STORAGE_STATUS || (STORAGE_STATUS = {}));\nexport const isMissingAuthConfig = function (config) {\n    // If we don't know the status, assume it is ok\n    if (!config.status || config.status === STORAGE_STATUS.SUCCESS) {\n        return false;\n    }\n    return config.userProvided || config.authMechanism === 'password::global::user';\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\n *\n */\nimport { FileType, Node } from '@nextcloud/files';\nexport const isNodeExternalStorage = function (node) {\n    // Not a folder, not a storage\n    if (node.type === FileType.File) {\n        return false;\n    }\n    // No backend or scope, not a storage\n    const attributes = node.attributes;\n    if (!attributes.scope || !attributes.backend) {\n        return false;\n    }\n    // Specific markers that we're sure are ext storage only\n    return attributes.scope === 'personal' || attributes.scope === 'system';\n};\n","import { generateOcsUrl, generateUrl } from '@nextcloud/router';\nimport { showError, showSuccess } from '@nextcloud/dialogs';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport LoginSvg from '@mdi/svg/svg/login.svg?raw';\nimport Vue from 'vue';\nimport { FileAction, DefaultType } from '@nextcloud/files';\nimport { STORAGE_STATUS, isMissingAuthConfig } from '../utils/credentialsUtils';\nimport { isNodeExternalStorage } from '../utils/externalStorageUtils';\nexport const action = new FileAction({\n    id: 'credentials-external-storage',\n    displayName: () => t('files', 'Enter missing credentials'),\n    iconSvgInline: () => LoginSvg,\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 (!isNodeExternalStorage(node)) {\n            return false;\n        }\n        const config = (node.attributes?.config || {});\n        if (isMissingAuthConfig(config)) {\n            return true;\n        }\n        return false;\n    },\n    async exec(node) {\n        // always resolve auth request, we'll process the data afterwards\n        // Using fetch as axios have integrated auth handling and X-Requested-With header\n        const response = await fetch(generateOcsUrl('/apps/files_external/api/v1/auth'), {\n            headers: new Headers({ Accept: 'application/json' }),\n            credentials: 'include',\n        });\n        const data = (await response?.json() || {});\n        if (data.ocs.data.user && data.ocs.data.password) {\n            const configResponse = await axios.put(generateUrl('apps/files_external/userglobalstorages/{id}', node.attributes), {\n                backendOptions: data.ocs.data,\n            });\n            const config = configResponse.data;\n            if (config.status !== STORAGE_STATUS.SUCCESS) {\n                showError(t('files_external', 'Unable to update this external storage config. {statusMessage}', {\n                    statusMessage: config?.statusMessage || '',\n                }));\n                return null;\n            }\n            // Success update config attribute\n            showSuccess(t('files_external', 'New configuration successfully saved'));\n            Vue.set(node.attributes, 'config', config);\n        }\n        return null;\n    },\n    // Before openFolderAction\n    order: -1000,\n    default: DefaultType.DEFAULT,\n    inline: () => true,\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!./fileEntryStatus.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!./fileEntryStatus.scss\";\n       export default content && content.locals ? content.locals : undefined;\n","import { Folder, Permission } from '@nextcloud/files';\nimport { generateOcsUrl, generateRemoteUrl, generateUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport axios from '@nextcloud/axios';\nimport { STORAGE_STATUS } from '../utils/credentialsUtils';\nexport const rootPath = `/files/${getCurrentUser()?.uid}`;\nconst entryToFolder = (ocsEntry) => {\n    const path = (ocsEntry.path + '/' + ocsEntry.name).replace(/^\\//gm, '');\n    return new Folder({\n        id: ocsEntry.id,\n        source: generateRemoteUrl('dav' + rootPath + '/' + path),\n        root: rootPath,\n        owner: getCurrentUser()?.uid || null,\n        permissions: ocsEntry.config.status !== STORAGE_STATUS.SUCCESS\n            ? Permission.NONE\n            : ocsEntry?.permissions || Permission.READ,\n        attributes: {\n            displayName: path,\n            ...ocsEntry,\n        },\n    });\n};\nexport const getContents = async () => {\n    const response = await axios.get(generateOcsUrl('apps/files_external/api/v1/mounts'));\n    const contents = response.data.ocs.data.map(entryToFolder);\n    return {\n        folder: new Folder({\n            id: 0,\n            source: generateRemoteUrl('dav' + rootPath),\n            root: rootPath,\n            owner: getCurrentUser()?.uid || null,\n            permissions: Permission.READ,\n        }),\n        contents,\n    };\n};\nexport const getStatus = function (id, global = true) {\n    const type = global ? 'userglobalstorages' : 'userstorages';\n    return axios.get(generateUrl(`apps/files_external/${type}/${id}?testOnly=false`));\n};\n","import { showWarning } from '@nextcloud/dialogs';\nimport { translate as t } from '@nextcloud/l10n';\nimport AlertSvg from '@mdi/svg/svg/alert-circle.svg?raw';\nimport Vue from 'vue';\nimport '../css/fileEntryStatus.scss';\nimport { getStatus } from '../services/externalStorage';\nimport { isMissingAuthConfig, STORAGE_STATUS } from '../utils/credentialsUtils';\nimport { isNodeExternalStorage } from '../utils/externalStorageUtils';\nimport { FileAction } from '@nextcloud/files';\nexport const action = new FileAction({\n    id: 'check-external-storage',\n    displayName: () => '',\n    iconSvgInline: () => '',\n    enabled: (nodes) => {\n        return nodes.every(node => isNodeExternalStorage(node) === true);\n    },\n    exec: async () => null,\n    /**\n     * Use this function to check the storage availability\n     * We then update the node attributes directly.\n     */\n    async renderInline(node) {\n        let config = null;\n        try {\n            const response = await getStatus(node.attributes.id, node.attributes.scope === 'system');\n            config = response.data;\n            Vue.set(node.attributes, 'config', config);\n            if (config.status !== STORAGE_STATUS.SUCCESS) {\n                throw new Error(config?.statusMessage || t('files_external', 'There was an error with this external storage.'));\n            }\n            return null;\n        }\n        catch (error) {\n            // If axios failed or if something else prevented\n            // us from getting the config\n            if (error.response && !config) {\n                showWarning(t('files_external', 'We were unable to check the external storage {basename}', {\n                    basename: node.basename,\n                }));\n                return null;\n            }\n            // Checking if we really have an error\n            const isWarning = isMissingAuthConfig(config);\n            const overlay = document.createElement('span');\n            overlay.classList.add(`files-list__row-status--${isWarning ? 'warning' : 'error'}`);\n            const span = document.createElement('span');\n            span.className = 'files-list__row-status';\n            // Only show an icon for errors, warning like missing credentials\n            // have a dedicated inline action button\n            if (!isWarning) {\n                span.innerHTML = AlertSvg;\n                span.title = error.message;\n            }\n            span.prepend(overlay);\n            return span;\n        }\n    },\n    order: 10,\n});\n","import { generateUrl } from '@nextcloud/router';\nimport { translate as t } from '@nextcloud/l10n';\nimport { FileAction, DefaultType } from '@nextcloud/files';\nimport { STORAGE_STATUS } from '../utils/credentialsUtils';\nexport const action = new FileAction({\n    id: 'open-in-files-external-storage',\n    displayName: (nodes) => {\n        const config = nodes?.[0]?.attributes?.config || { status: STORAGE_STATUS.INDETERMINATE };\n        if (config.status !== STORAGE_STATUS.SUCCESS) {\n            return t('files_external', 'Examine this faulty external storage configuration');\n        }\n        return t('files', 'Open in files');\n    },\n    iconSvgInline: () => '',\n    enabled: (nodes, view) => view.id === 'extstoragemounts',\n    async exec(node) {\n        const config = node.attributes.config;\n        if (config?.status !== STORAGE_STATUS.SUCCESS) {\n            window.OC.dialogs.confirm(t('files_external', 'There was an error with this external storage. Do you want to review this mount point config in the settings page?'), t('files_external', 'External mount error'), (redirect) => {\n                if (redirect === true) {\n                    const scope = node.attributes.scope === 'personal' ? 'user' : 'admin';\n                    window.location.href = generateUrl(`/settings/${scope}/externalstorages`);\n                }\n            });\n            return null;\n        }\n        // Do not use fileid as we don't have that information\n        // from the external storage api\n        window.OCP.Files.Router.goToRoute(null, // use default route\n        { view: 'files' }, { dir: node.path });\n        return null;\n    },\n    // Before openFolderAction\n    order: -1000,\n    default: DefaultType.HIDDEN,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\n *\n */\nimport { loadState } from '@nextcloud/initial-state';\nimport { translate as t } from '@nextcloud/l10n';\nimport { View, getNavigation, Column, registerFileAction } from '@nextcloud/files';\nimport FolderNetworkSvg from '@mdi/svg/svg/folder-network.svg?raw';\nimport { action as enterCredentialsAction } from './actions/enterCredentialsAction';\nimport { action as inlineStorageCheckAction } from './actions/inlineStorageCheckAction';\nimport { action as openInFilesAction } from './actions/openInFilesAction';\nimport { getContents } from './services/externalStorage';\nconst allowUserMounting = loadState('files_external', 'allowUserMounting', false);\n// Register view\nconst Navigation = getNavigation();\nNavigation.register(new View({\n    id: 'extstoragemounts',\n    name: t('files_external', 'External storage'),\n    caption: t('files_external', 'List of external storage.'),\n    emptyCaption: allowUserMounting\n        ? t('files_external', 'There is no external storage configured. You can configure them in your Personal settings.')\n        : t('files_external', 'There is no external storage configured and you don\\'t have the permission to configure them.'),\n    emptyTitle: t('files_external', 'No external storage'),\n    icon: FolderNetworkSvg,\n    order: 30,\n    columns: [\n        new Column({\n            id: 'storage-type',\n            title: t('files_external', 'Storage type'),\n            render(node) {\n                const backend = node.attributes?.backend || t('files_external', 'Unknown');\n                const span = document.createElement('span');\n                span.textContent = backend;\n                return span;\n            },\n        }),\n        new Column({\n            id: 'scope',\n            title: t('files_external', 'Scope'),\n            render(node) {\n                const span = document.createElement('span');\n                let scope = t('files_external', 'Personal');\n                if (node.attributes?.scope === 'system') {\n                    scope = t('files_external', 'System');\n                }\n                span.textContent = scope;\n                return span;\n            },\n        }),\n    ],\n    getContents,\n}));\n// Register actions\nregisterFileAction(enterCredentialsAction);\nregisterFileAction(inlineStorageCheckAction);\nregisterFileAction(openInFilesAction);\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, `.files-list__row-status{display:flex;width:44px;justify-content:center;align-items:center;height:100%}.files-list__row-status svg{width:24px;height:24px}.files-list__row-status svg path{fill:currentColor}.files-list__row-status--error,.files-list__row-status--warning{position:absolute;display:block;top:0;left:0;right:0;bottom:0;opacity:.1;z-index:-1}.files-list__row-status--error{background:var(--color-error)}.files-list__row-status--warning{background:var(--color-warning)}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files_external/src/css/fileEntryStatus.scss\"],\"names\":[],\"mappings\":\"AAAA,wBACC,YAAA,CACA,UAAA,CACA,sBAAA,CACA,kBAAA,CACA,WAAA,CAEA,4BACC,UAAA,CACA,WAAA,CAEA,iCACC,iBAAA,CAIF,gEAEC,iBAAA,CACA,aAAA,CACA,KAAA,CACA,MAAA,CACA,OAAA,CACA,QAAA,CACA,UAAA,CACA,UAAA,CAGD,+BACC,6BAAA,CAGD,iCACC,+BAAA\",\"sourcesContent\":[\".files-list__row-status {\\n\\tdisplay: flex;\\n\\twidth: 44px;\\n\\tjustify-content: center;\\n\\talign-items: center;\\n\\theight: 100%;\\n\\n\\tsvg {\\n\\t\\twidth: 24px;\\n\\t\\theight: 24px;\\n\\n\\t\\tpath {\\n\\t\\t\\tfill: currentColor;\\n\\t\\t}\\n\\t}\\n\\n\\t&--error,\\n\\t&--warning {\\n\\t\\tposition: absolute;\\n\\t\\tdisplay: block;\\n\\t\\ttop: 0;\\n\\t\\tleft: 0;\\n\\t\\tright: 0;\\n\\t\\tbottom: 0;\\n\\t\\topacity: .1;\\n\\t\\tz-index: -1;\\n\\t}\\n\\n\\t&--error {\\n\\t\\tbackground: var(--color-error);\\n\\t}\\n\\n\\t&--warning {\\n\\t\\tbackground: var(--color-warning);\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\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 <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\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 <http://www.gnu.org/licenses/>.\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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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 <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\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 <http://www.gnu.org/licenses/>.\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 `<?xml version=\"1.0\"?>\n\t\t<d:propfind ${L()}>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`;\n}, Ee = function() {\n  return `<?xml version=\"1.0\"?>\n\t\t<oc:filter-files ${L()}>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t\t<oc:filter-rules>\n\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t</oc:filter-rules>\n\t\t</oc:filter-files>`;\n}, or = function(e) {\n  return `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<d:searchrequest ${L()}\n\txmlns:ns=\"https://github.com/icewind1991/SearchDAV/ns\">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${A()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${e}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\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 <http://www.gnu.org/licenses/>.\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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\n *\n */\nvar R = /* @__PURE__ */ ((e) => (e.Folder = \"folder\", e.File = \"file\", e))(R || {});\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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      const r = this.source.indexOf(this.root);\n      return I(this.source.slice(r + this.root.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      const t = this.source.indexOf(this.root);\n      return this.source.slice(t + this.root.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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\n *\n */\nclass ye extends D {\n  get type() {\n    return R.File;\n  }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\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 <http://www.gnu.org/licenses/>.\n *\n */\nconst ee = `/files/${A()?.uid}`, te = pe(\"dav\"), ur = function(e = te) {\n  const t = ge(e);\n  function r(n) {\n    t.setHeaders({\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: n ?? \"\"\n    });\n  }\n  return ue(r), r(de()), we().patch(\"fetch\", (n, i) => {\n    const d = i.headers;\n    return d?.method && (i.method = d.method, delete d.method), fetch(n, i);\n  }), t;\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 = 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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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 B = {};\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};\nB.buildOptions = Se;\nB.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 Be = Me;\nconst ke = 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 (ke.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 k = O, T = Be, tt = Ze, rt = et;\n\"<((!\\\\[CDATA\\\\[([\\\\s\\\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\\\/)(NAME)\\\\s*>))([^<]*)\".replace(/NAME/g, k.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 = k.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: </${o}>`);\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 k.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 } = B, _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 '&#xD;'\");\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 += `<![CDATA[${u[o][0][t.textNodeName]}]]>`, i = !1;\n      continue;\n    } else if (o === t.commentPropName) {\n      n += s + `<!--${u[o][0][t.textNodeName]}-->`, 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}</${o}>` : (n += c + \">\", g && s !== \"\" && (g.includes(\"/>\") || g.includes(\"</\")) ? n += s + t.indentBy + g + s : n += g, n += `</${o}>`), 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: \"&amp;\" },\n    //it must be on top\n    { regex: new RegExp(\">\", \"g\"), val: \"&gt;\" },\n    { regex: new RegExp(\"<\", \"g\"), val: \"&lt;\" },\n    { regex: new RegExp(\"'\", \"g\"), val: \"&apos;\" },\n    { regex: new RegExp('\"', \"g\"), val: \"&quot;\" }\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 = \"</\" + t + this.tagEndChar, i = \"\";\n    return t[0] === \"?\" && (i = \"?\", n = \"\"), (r || r === \"\") && e.indexOf(\"<\") === -1 ? this.indentate(s) + \"<\" + t + r + i + \">\" + e + n : this.options.commentPropName !== !1 && t === this.options.commentPropName && i.length === 0 ? this.indentate(s) + `<!--${e}-->` + 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 = `></${e}`, t;\n};\nb.prototype.buildTextValNode = function(e, t, r, s) {\n  if (this.options.cdataPropName !== !1 && t === this.options.cdataPropName)\n    return this.indentate(s) + `<![CDATA[${e}]]>` + this.newLine;\n  if (this.options.commentPropName !== !1 && t === this.options.commentPropName)\n    return this.indentate(s) + `<!--${e}-->` + 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 + \"</\" + t + this.tagEndChar;\n  }\n};\nb.prototype.replaceEntitiesValue = function(e) {\n  if (e && e.length > 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 Bt = S, kt = At, qt = Mt;\nvar W = {\n  XMLParser: kt,\n  XMLValidator: Bt,\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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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 <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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=\" + {\"2048\":\"78a82614529a3cefcde7\",\"4180\":\"fe82f3a2dac70d6b82bc\"}[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 = 8213;","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\t8213: 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__(5220)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","STORAGE_STATUS","isMissingAuthConfig","config","status","SUCCESS","userProvided","authMechanism","isNodeExternalStorage","node","type","FileType","File","attributes","scope","backend","action","FileAction","id","displayName","t","iconSvgInline","enabled","nodes","length","exec","response","fetch","generateOcsUrl","headers","Headers","Accept","credentials","data","json","ocs","user","password","axios","put","generateUrl","backendOptions","showError","statusMessage","showSuccess","Vue","order","default","DefaultType","DEFAULT","inline","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","rootPath","getCurrentUser","uid","entryToFolder","ocsEntry","path","name","replace","Folder","source","generateRemoteUrl","root","owner","permissions","Permission","NONE","READ","every","async","renderInline","arguments","undefined","get","getStatus","Error","error","showWarning","basename","isWarning","overlay","document","createElement","classList","add","span","className","innerHTML","title","message","prepend","INDETERMINATE","view","window","OC","dialogs","confirm","redirect","location","href","OCP","Files","Router","goToRoute","dir","HIDDEN","allowUserMounting","loadState","getNavigation","register","View","caption","emptyCaption","emptyTitle","icon","columns","Column","render","textContent","getContents","contents","map","folder","registerFileAction","enterCredentialsAction","inlineStorageCheckAction","openInFilesAction","___CSS_LOADER_EXPORT___","push","module","m","e","setApp","build","setUid","C","P","Yt","r","s","Number","n","Math","floor","log","min","i","d","pow","toFixed","parseFloat","toLocaleString","Z","Qt","_action","constructor","this","validateAction","execBatch","parent","Object","values","includes","Dt","_nc_fileactions","debug","find","N","CREATE","UPDATE","DELETE","SHARE","ALL","j","Y","nc","oc","V","_nc_dav_properties","join","L","_nc_dav_namespaces","keys","sr","or","R","J","match","X","URL","startsWith","mtime","Date","crtime","mime","size","Q","NEW","FAILED","LOADING","LOCKED","D","_data","_attributes","_knownDavService","set","updateMtime","Reflect","deleteProperty","Proxy","encodedSource","origin","slice","extension","dirname","indexOf","pathname","isDavRessource","split","pop","fileid","move","rename","ye","_e","super","ee","te","ur","setHeaders","requesttoken","patch","method","dr","getDirectoryContents","details","includeSelf","filter","filename","ve","props","be","parse","lastmod","parseInt","getcontentlength","hasPreview","Te","_views","_currentView","remove","findIndex","splice","views","setActive","active","ar","_nc_navigation","Ie","_column","Ae","sort","summary","S","O","RegExp","isExist","u","isEmptyObject","merge","o","a","l","f","c","getValue","isName","getAllMatches","startIndex","lastIndex","g","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","Ce","Pe","$e","v","Le","hasOwnProperty","Fe","B","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","ke","Xe","Ue","Ge","ze","He","Ke","We","je","Ye","Je","decimalPoint","k","T","tagname","child","addChild","tt","entityName","val","regx","entities","rt","skipLike","test","De","search","it","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","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","toString","addEntity","XMLValidator","XMLBuilder","cr","_view","Ut","params","emptyView","sticky","expanded","defaultSortKey","TypeError","Xt","forEach","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","loaded","__webpack_modules__","result","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","key","getter","__esModule","definition","defineProperty","enumerable","chunkId","Promise","all","reduce","promises","globalThis","Function","obj","prop","url","done","script","needAttach","scripts","getElementsByTagName","getAttribute","charset","timeout","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","setTimeout","bind","target","head","appendChild","Symbol","toStringTag","nmd","paths","children","scriptUrl","importScripts","currentScript","baseURI","self","installedChunks","installedChunkData","promise","resolve","reject","errorType","realSrc","request","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"files_external-init.js?v=c58ab5fd409b45fc1bcb","mappings":";uBAAIA,ECAAC,EACAC,wBCAOC,+EACX,SAAWA,GACPA,EAAeA,EAAwB,QAAI,GAAK,UAChDA,EAAeA,EAAsB,MAAI,GAAK,QAC9CA,EAAeA,EAA8B,cAAI,GAAK,gBACtDA,EAAeA,EAAgC,gBAAI,GAAK,kBACxDA,EAAeA,EAA6B,aAAI,GAAK,eACrDA,EAAeA,EAAwB,QAAI,GAAK,UAChDA,EAAeA,EAA8B,cAAI,GAAK,eACzD,CARD,CAQGA,IAAmBA,EAAiB,CAAC,IACjC,MAAMC,EAAsB,SAAUC,GAEzC,SAAKA,EAAOC,QAAUD,EAAOC,SAAWH,EAAeI,WAGhDF,EAAOG,cAAyC,2BAAzBH,EAAOI,cACzC,ECKaC,EAAwB,SAAUC,GAE3C,GAAIA,EAAKC,OAASC,EAAAA,GAASC,KACvB,OAAO,EAGX,MAAMC,EAAaJ,EAAKI,WACxB,SAAKA,EAAWC,QAAUD,EAAWE,SAIT,aAArBF,EAAWC,OAA6C,WAArBD,EAAWC,MACzD,ECzBaE,EAAS,IAAIC,EAAAA,GAAW,CACjCC,GAAI,+BACJC,YAAaA,KAAMC,EAAAA,EAAAA,IAAE,QAAS,6BAC9BC,cAA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B4W,EAAUZ,EAAShW,GAChByV,EAAoB7N,EAAE4R,EAAiB5C,IAAY4C,EAAgB5C,IACrE4C,EAAgB5C,GAAS,KAE1B4C,EAAgB5C,GAAW,EAE5B,OAAOnB,EAAoBnO,EAAEyO,EAAO,EAGjCsE,EAAqBd,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1Fc,EAAmB9E,QAAQyE,EAAqBtB,KAAK,KAAM,IAC3D2B,EAAmBvb,KAAOkb,EAAqBtB,KAAK,KAAM2B,EAAmBvb,KAAK4Z,KAAK2B,QCvFvF5E,EAAoB5T,QAAKvG,ECGzB,IAAIgf,EAAsB7E,EAAoBnO,OAAEhM,EAAW,CAAC,OAAO,IAAOma,EAAoB,QAC9F6E,EAAsB7E,EAAoBnO,EAAEgT","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/files_external/src/utils/credentialsUtils.ts","webpack:///nextcloud/apps/files_external/src/utils/externalStorageUtils.ts","webpack:///nextcloud/apps/files_external/src/actions/enterCredentialsAction.ts","webpack://nextcloud/./apps/files_external/src/css/fileEntryStatus.scss?3c5c","webpack:///nextcloud/apps/files_external/src/services/externalStorage.ts","webpack:///nextcloud/apps/files_external/src/actions/inlineStorageCheckAction.ts","webpack:///nextcloud/apps/files_external/src/actions/openInFilesAction.ts","webpack:///nextcloud/apps/files_external/src/init.ts","webpack:///nextcloud/apps/files_external/src/css/fileEntryStatus.scss","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};","// @see https://github.com/nextcloud/server/blob/ac2bc2384efe3c15ff987b87a7432bc60d545c67/lib/public/Files/StorageNotAvailableException.php#L41\nexport var STORAGE_STATUS;\n(function (STORAGE_STATUS) {\n    STORAGE_STATUS[STORAGE_STATUS[\"SUCCESS\"] = 0] = \"SUCCESS\";\n    STORAGE_STATUS[STORAGE_STATUS[\"ERROR\"] = 1] = \"ERROR\";\n    STORAGE_STATUS[STORAGE_STATUS[\"INDETERMINATE\"] = 2] = \"INDETERMINATE\";\n    STORAGE_STATUS[STORAGE_STATUS[\"INCOMPLETE_CONF\"] = 3] = \"INCOMPLETE_CONF\";\n    STORAGE_STATUS[STORAGE_STATUS[\"UNAUTHORIZED\"] = 4] = \"UNAUTHORIZED\";\n    STORAGE_STATUS[STORAGE_STATUS[\"TIMEOUT\"] = 5] = \"TIMEOUT\";\n    STORAGE_STATUS[STORAGE_STATUS[\"NETWORK_ERROR\"] = 6] = \"NETWORK_ERROR\";\n})(STORAGE_STATUS || (STORAGE_STATUS = {}));\nexport const isMissingAuthConfig = function (config) {\n    // If we don't know the status, assume it is ok\n    if (!config.status || config.status === STORAGE_STATUS.SUCCESS) {\n        return false;\n    }\n    return config.userProvided || config.authMechanism === 'password::global::user';\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\n *\n */\nimport { FileType, Node } from '@nextcloud/files';\nexport const isNodeExternalStorage = function (node) {\n    // Not a folder, not a storage\n    if (node.type === FileType.File) {\n        return false;\n    }\n    // No backend or scope, not a storage\n    const attributes = node.attributes;\n    if (!attributes.scope || !attributes.backend) {\n        return false;\n    }\n    // Specific markers that we're sure are ext storage only\n    return attributes.scope === 'personal' || attributes.scope === 'system';\n};\n","import { generateOcsUrl, generateUrl } from '@nextcloud/router';\nimport { showError, showSuccess } from '@nextcloud/dialogs';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport LoginSvg from '@mdi/svg/svg/login.svg?raw';\nimport Vue from 'vue';\nimport { FileAction, DefaultType } from '@nextcloud/files';\nimport { STORAGE_STATUS, isMissingAuthConfig } from '../utils/credentialsUtils';\nimport { isNodeExternalStorage } from '../utils/externalStorageUtils';\nexport const action = new FileAction({\n    id: 'credentials-external-storage',\n    displayName: () => t('files', 'Enter missing credentials'),\n    iconSvgInline: () => LoginSvg,\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 (!isNodeExternalStorage(node)) {\n            return false;\n        }\n        const config = (node.attributes?.config || {});\n        if (isMissingAuthConfig(config)) {\n            return true;\n        }\n        return false;\n    },\n    async exec(node) {\n        // always resolve auth request, we'll process the data afterwards\n        // Using fetch as axios have integrated auth handling and X-Requested-With header\n        const response = await fetch(generateOcsUrl('/apps/files_external/api/v1/auth'), {\n            headers: new Headers({ Accept: 'application/json' }),\n            credentials: 'include',\n        });\n        const data = (await response?.json() || {});\n        if (data.ocs.data.user && data.ocs.data.password) {\n            const configResponse = await axios.put(generateUrl('apps/files_external/userglobalstorages/{id}', node.attributes), {\n                backendOptions: data.ocs.data,\n            });\n            const config = configResponse.data;\n            if (config.status !== STORAGE_STATUS.SUCCESS) {\n                showError(t('files_external', 'Unable to update this external storage config. {statusMessage}', {\n                    statusMessage: config?.statusMessage || '',\n                }));\n                return null;\n            }\n            // Success update config attribute\n            showSuccess(t('files_external', 'New configuration successfully saved'));\n            Vue.set(node.attributes, 'config', config);\n        }\n        return null;\n    },\n    // Before openFolderAction\n    order: -1000,\n    default: DefaultType.DEFAULT,\n    inline: () => true,\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!./fileEntryStatus.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!./fileEntryStatus.scss\";\n       export default content && content.locals ? content.locals : undefined;\n","import { Folder, Permission } from '@nextcloud/files';\nimport { generateOcsUrl, generateRemoteUrl, generateUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport axios from '@nextcloud/axios';\nimport { STORAGE_STATUS } from '../utils/credentialsUtils';\nexport const rootPath = `/files/${getCurrentUser()?.uid}`;\nconst entryToFolder = (ocsEntry) => {\n    const path = (ocsEntry.path + '/' + ocsEntry.name).replace(/^\\//gm, '');\n    return new Folder({\n        id: ocsEntry.id,\n        source: generateRemoteUrl('dav' + rootPath + '/' + path),\n        root: rootPath,\n        owner: getCurrentUser()?.uid || null,\n        permissions: ocsEntry.config.status !== STORAGE_STATUS.SUCCESS\n            ? Permission.NONE\n            : ocsEntry?.permissions || Permission.READ,\n        attributes: {\n            displayName: path,\n            ...ocsEntry,\n        },\n    });\n};\nexport const getContents = async () => {\n    const response = await axios.get(generateOcsUrl('apps/files_external/api/v1/mounts'));\n    const contents = response.data.ocs.data.map(entryToFolder);\n    return {\n        folder: new Folder({\n            id: 0,\n            source: generateRemoteUrl('dav' + rootPath),\n            root: rootPath,\n            owner: getCurrentUser()?.uid || null,\n            permissions: Permission.READ,\n        }),\n        contents,\n    };\n};\nexport const getStatus = function (id, global = true) {\n    const type = global ? 'userglobalstorages' : 'userstorages';\n    return axios.get(generateUrl(`apps/files_external/${type}/${id}?testOnly=false`));\n};\n","import { showWarning } from '@nextcloud/dialogs';\nimport { translate as t } from '@nextcloud/l10n';\nimport AlertSvg from '@mdi/svg/svg/alert-circle.svg?raw';\nimport Vue from 'vue';\nimport '../css/fileEntryStatus.scss';\nimport { getStatus } from '../services/externalStorage';\nimport { isMissingAuthConfig, STORAGE_STATUS } from '../utils/credentialsUtils';\nimport { isNodeExternalStorage } from '../utils/externalStorageUtils';\nimport { FileAction } from '@nextcloud/files';\nexport const action = new FileAction({\n    id: 'check-external-storage',\n    displayName: () => '',\n    iconSvgInline: () => '',\n    enabled: (nodes) => {\n        return nodes.every(node => isNodeExternalStorage(node) === true);\n    },\n    exec: async () => null,\n    /**\n     * Use this function to check the storage availability\n     * We then update the node attributes directly.\n     */\n    async renderInline(node) {\n        let config = null;\n        try {\n            const response = await getStatus(node.attributes.id, node.attributes.scope === 'system');\n            config = response.data;\n            Vue.set(node.attributes, 'config', config);\n            if (config.status !== STORAGE_STATUS.SUCCESS) {\n                throw new Error(config?.statusMessage || t('files_external', 'There was an error with this external storage.'));\n            }\n            return null;\n        }\n        catch (error) {\n            // If axios failed or if something else prevented\n            // us from getting the config\n            if (error.response && !config) {\n                showWarning(t('files_external', 'We were unable to check the external storage {basename}', {\n                    basename: node.basename,\n                }));\n                return null;\n            }\n            // Checking if we really have an error\n            const isWarning = isMissingAuthConfig(config);\n            const overlay = document.createElement('span');\n            overlay.classList.add(`files-list__row-status--${isWarning ? 'warning' : 'error'}`);\n            const span = document.createElement('span');\n            span.className = 'files-list__row-status';\n            // Only show an icon for errors, warning like missing credentials\n            // have a dedicated inline action button\n            if (!isWarning) {\n                span.innerHTML = AlertSvg;\n                span.title = error.message;\n            }\n            span.prepend(overlay);\n            return span;\n        }\n    },\n    order: 10,\n});\n","import { generateUrl } from '@nextcloud/router';\nimport { translate as t } from '@nextcloud/l10n';\nimport { FileAction, DefaultType } from '@nextcloud/files';\nimport { STORAGE_STATUS } from '../utils/credentialsUtils';\nexport const action = new FileAction({\n    id: 'open-in-files-external-storage',\n    displayName: (nodes) => {\n        const config = nodes?.[0]?.attributes?.config || { status: STORAGE_STATUS.INDETERMINATE };\n        if (config.status !== STORAGE_STATUS.SUCCESS) {\n            return t('files_external', 'Examine this faulty external storage configuration');\n        }\n        return t('files', 'Open in Files');\n    },\n    iconSvgInline: () => '',\n    enabled: (nodes, view) => view.id === 'extstoragemounts',\n    async exec(node) {\n        const config = node.attributes.config;\n        if (config?.status !== STORAGE_STATUS.SUCCESS) {\n            window.OC.dialogs.confirm(t('files_external', 'There was an error with this external storage. Do you want to review this mount point config in the settings page?'), t('files_external', 'External mount error'), (redirect) => {\n                if (redirect === true) {\n                    const scope = node.attributes.scope === 'personal' ? 'user' : 'admin';\n                    window.location.href = generateUrl(`/settings/${scope}/externalstorages`);\n                }\n            });\n            return null;\n        }\n        // Do not use fileid as we don't have that information\n        // from the external storage api\n        window.OCP.Files.Router.goToRoute(null, // use default route\n        { view: 'files' }, { dir: node.path });\n        return null;\n    },\n    // Before openFolderAction\n    order: -1000,\n    default: DefaultType.HIDDEN,\n});\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\n *\n */\nimport { loadState } from '@nextcloud/initial-state';\nimport { translate as t } from '@nextcloud/l10n';\nimport { View, getNavigation, Column, registerFileAction } from '@nextcloud/files';\nimport FolderNetworkSvg from '@mdi/svg/svg/folder-network.svg?raw';\nimport { action as enterCredentialsAction } from './actions/enterCredentialsAction';\nimport { action as inlineStorageCheckAction } from './actions/inlineStorageCheckAction';\nimport { action as openInFilesAction } from './actions/openInFilesAction';\nimport { getContents } from './services/externalStorage';\nconst allowUserMounting = loadState('files_external', 'allowUserMounting', false);\n// Register view\nconst Navigation = getNavigation();\nNavigation.register(new View({\n    id: 'extstoragemounts',\n    name: t('files_external', 'External storage'),\n    caption: t('files_external', 'List of external storage.'),\n    emptyCaption: allowUserMounting\n        ? t('files_external', 'There is no external storage configured. You can configure them in your Personal settings.')\n        : t('files_external', 'There is no external storage configured and you don\\'t have the permission to configure them.'),\n    emptyTitle: t('files_external', 'No external storage'),\n    icon: FolderNetworkSvg,\n    order: 30,\n    columns: [\n        new Column({\n            id: 'storage-type',\n            title: t('files_external', 'Storage type'),\n            render(node) {\n                const backend = node.attributes?.backend || t('files_external', 'Unknown');\n                const span = document.createElement('span');\n                span.textContent = backend;\n                return span;\n            },\n        }),\n        new Column({\n            id: 'scope',\n            title: t('files_external', 'Scope'),\n            render(node) {\n                const span = document.createElement('span');\n                let scope = t('files_external', 'Personal');\n                if (node.attributes?.scope === 'system') {\n                    scope = t('files_external', 'System');\n                }\n                span.textContent = scope;\n                return span;\n            },\n        }),\n    ],\n    getContents,\n}));\n// Register actions\nregisterFileAction(enterCredentialsAction);\nregisterFileAction(inlineStorageCheckAction);\nregisterFileAction(openInFilesAction);\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, `.files-list__row-status{display:flex;width:44px;justify-content:center;align-items:center;height:100%}.files-list__row-status svg{width:24px;height:24px}.files-list__row-status svg path{fill:currentColor}.files-list__row-status--error,.files-list__row-status--warning{position:absolute;display:block;top:0;left:0;right:0;bottom:0;opacity:.1;z-index:-1}.files-list__row-status--error{background:var(--color-error)}.files-list__row-status--warning{background:var(--color-warning)}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files_external/src/css/fileEntryStatus.scss\"],\"names\":[],\"mappings\":\"AAAA,wBACC,YAAA,CACA,UAAA,CACA,sBAAA,CACA,kBAAA,CACA,WAAA,CAEA,4BACC,UAAA,CACA,WAAA,CAEA,iCACC,iBAAA,CAIF,gEAEC,iBAAA,CACA,aAAA,CACA,KAAA,CACA,MAAA,CACA,OAAA,CACA,QAAA,CACA,UAAA,CACA,UAAA,CAGD,+BACC,6BAAA,CAGD,iCACC,+BAAA\",\"sourcesContent\":[\".files-list__row-status {\\n\\tdisplay: flex;\\n\\twidth: 44px;\\n\\tjustify-content: center;\\n\\talign-items: center;\\n\\theight: 100%;\\n\\n\\tsvg {\\n\\t\\twidth: 24px;\\n\\t\\theight: 24px;\\n\\n\\t\\tpath {\\n\\t\\t\\tfill: currentColor;\\n\\t\\t}\\n\\t}\\n\\n\\t&--error,\\n\\t&--warning {\\n\\t\\tposition: absolute;\\n\\t\\tdisplay: block;\\n\\t\\ttop: 0;\\n\\t\\tleft: 0;\\n\\t\\tright: 0;\\n\\t\\tbottom: 0;\\n\\t\\topacity: .1;\\n\\t\\tz-index: -1;\\n\\t}\\n\\n\\t&--error {\\n\\t\\tbackground: var(--color-error);\\n\\t}\\n\\n\\t&--warning {\\n\\t\\tbackground: var(--color-warning);\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\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 <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\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 <http://www.gnu.org/licenses/>.\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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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 <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\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 <http://www.gnu.org/licenses/>.\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 `<?xml version=\"1.0\"?>\n\t\t<d:propfind ${L()}>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`;\n}, Ee = function() {\n  return `<?xml version=\"1.0\"?>\n\t\t<oc:filter-files ${L()}>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t\t<oc:filter-rules>\n\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t</oc:filter-rules>\n\t\t</oc:filter-files>`;\n}, or = function(e) {\n  return `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<d:searchrequest ${L()}\n\txmlns:ns=\"https://github.com/icewind1991/SearchDAV/ns\">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${A()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${e}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\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 <http://www.gnu.org/licenses/>.\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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\n *\n */\nvar R = /* @__PURE__ */ ((e) => (e.Folder = \"folder\", e.File = \"file\", e))(R || {});\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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      const r = this.source.indexOf(this.root);\n      return I(this.source.slice(r + this.root.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      const t = this.source.indexOf(this.root);\n      return this.source.slice(t + this.root.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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\n *\n */\nclass ye extends D {\n  get type() {\n    return R.File;\n  }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\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 <http://www.gnu.org/licenses/>.\n *\n */\nconst ee = `/files/${A()?.uid}`, te = pe(\"dav\"), ur = function(e = te) {\n  const t = ge(e);\n  function r(n) {\n    t.setHeaders({\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: n ?? \"\"\n    });\n  }\n  return ue(r), r(de()), we().patch(\"fetch\", (n, i) => {\n    const d = i.headers;\n    return d?.method && (i.method = d.method, delete d.method), fetch(n, i);\n  }), t;\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 = 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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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 B = {};\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};\nB.buildOptions = Se;\nB.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 Be = Me;\nconst ke = 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 (ke.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 k = O, T = Be, tt = Ze, rt = et;\n\"<((!\\\\[CDATA\\\\[([\\\\s\\\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\\\/)(NAME)\\\\s*>))([^<]*)\".replace(/NAME/g, k.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 = k.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: </${o}>`);\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 k.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 } = B, _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 '&#xD;'\");\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 += `<![CDATA[${u[o][0][t.textNodeName]}]]>`, i = !1;\n      continue;\n    } else if (o === t.commentPropName) {\n      n += s + `<!--${u[o][0][t.textNodeName]}-->`, 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}</${o}>` : (n += c + \">\", g && s !== \"\" && (g.includes(\"/>\") || g.includes(\"</\")) ? n += s + t.indentBy + g + s : n += g, n += `</${o}>`), 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: \"&amp;\" },\n    //it must be on top\n    { regex: new RegExp(\">\", \"g\"), val: \"&gt;\" },\n    { regex: new RegExp(\"<\", \"g\"), val: \"&lt;\" },\n    { regex: new RegExp(\"'\", \"g\"), val: \"&apos;\" },\n    { regex: new RegExp('\"', \"g\"), val: \"&quot;\" }\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 = \"</\" + t + this.tagEndChar, i = \"\";\n    return t[0] === \"?\" && (i = \"?\", n = \"\"), (r || r === \"\") && e.indexOf(\"<\") === -1 ? this.indentate(s) + \"<\" + t + r + i + \">\" + e + n : this.options.commentPropName !== !1 && t === this.options.commentPropName && i.length === 0 ? this.indentate(s) + `<!--${e}-->` + 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 = `></${e}`, t;\n};\nb.prototype.buildTextValNode = function(e, t, r, s) {\n  if (this.options.cdataPropName !== !1 && t === this.options.cdataPropName)\n    return this.indentate(s) + `<![CDATA[${e}]]>` + this.newLine;\n  if (this.options.commentPropName !== !1 && t === this.options.commentPropName)\n    return this.indentate(s) + `<!--${e}-->` + 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 + \"</\" + t + this.tagEndChar;\n  }\n};\nb.prototype.replaceEntitiesValue = function(e) {\n  if (e && e.length > 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 Bt = S, kt = At, qt = Mt;\nvar W = {\n  XMLParser: kt,\n  XMLValidator: Bt,\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æ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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 <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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 <http://www.gnu.org/licenses/>.\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=\" + {\"2048\":\"78a82614529a3cefcde7\",\"4180\":\"fe82f3a2dac70d6b82bc\"}[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 = 8213;","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\t8213: 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__(5220)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","STORAGE_STATUS","isMissingAuthConfig","config","status","SUCCESS","userProvided","authMechanism","isNodeExternalStorage","node","type","FileType","File","attributes","scope","backend","action","FileAction","id","displayName","t","iconSvgInline","enabled","nodes","length","exec","response","fetch","generateOcsUrl","headers","Headers","Accept","credentials","data","json","ocs","user","password","axios","put","generateUrl","backendOptions","showError","statusMessage","showSuccess","Vue","order","default","DefaultType","DEFAULT","inline","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","rootPath","getCurrentUser","uid","entryToFolder","ocsEntry","path","name","replace","Folder","source","generateRemoteUrl","root","owner","permissions","Permission","NONE","READ","every","async","renderInline","arguments","undefined","get","getStatus","Error","error","showWarning","basename","isWarning","overlay","document","createElement","classList","add","span","className","innerHTML","title","message","prepend","INDETERMINATE","view","window","OC","dialogs","confirm","redirect","location","href","OCP","Files","Router","goToRoute","dir","HIDDEN","allowUserMounting","loadState","getNavigation","register","View","caption","emptyCaption","emptyTitle","icon","columns","Column","render","textContent","getContents","contents","map","folder","registerFileAction","enterCredentialsAction","inlineStorageCheckAction","openInFilesAction","___CSS_LOADER_EXPORT___","push","module","m","e","setApp","build","setUid","C","P","Yt","r","s","Number","n","Math","floor","log","min","i","d","pow","toFixed","parseFloat","toLocaleString","Z","Qt","_action","constructor","this","validateAction","execBatch","parent","Object","values","includes","Dt","_nc_fileactions","debug","find","N","CREATE","UPDATE","DELETE","SHARE","ALL","j","Y","nc","oc","V","_nc_dav_properties","join","L","_nc_dav_namespaces","keys","sr","or","R","J","match","X","URL","startsWith","mtime","Date","crtime","mime","size","Q","NEW","FAILED","LOADING","LOCKED","D","_data","_attributes","_knownDavService","set","updateMtime","Reflect","deleteProperty","Proxy","encodedSource","origin","slice","extension","dirname","indexOf","pathname","isDavRessource","split","pop","fileid","move","rename","ye","_e","super","ee","te","ur","setHeaders","requesttoken","patch","method","dr","getDirectoryContents","details","includeSelf","filter","filename","ve","props","be","parse","lastmod","parseInt","getcontentlength","hasPreview","Te","_views","_currentView","remove","findIndex","splice","views","setActive","active","ar","_nc_navigation","Ie","_column","Ae","sort","summary","S","O","RegExp","isExist","u","isEmptyObject","merge","o","a","l","f","c","getValue","isName","getAllMatches","startIndex","lastIndex","g","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","Ce","Pe","$e","v","Le","hasOwnProperty","Fe","B","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","ke","Xe","Ue","Ge","ze","He","Ke","We","je","Ye","Je","decimalPoint","k","T","tagname","child","addChild","tt","entityName","val","regx","entities","rt","skipLike","test","De","search","it","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","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","toString","addEntity","XMLValidator","XMLBuilder","cr","_view","Ut","params","emptyView","sticky","expanded","defaultSortKey","TypeError","Xt","forEach","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","loaded","__webpack_modules__","result","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","key","getter","__esModule","definition","defineProperty","enumerable","chunkId","Promise","all","reduce","promises","globalThis","Function","obj","prop","url","done","script","needAttach","scripts","getElementsByTagName","getAttribute","charset","timeout","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","setTimeout","bind","target","head","appendChild","Symbol","toStringTag","nmd","paths","children","scriptUrl","importScripts","currentScript","baseURI","self","installedChunks","installedChunkData","promise","resolve","reject","errorType","realSrc","request","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file