@opencloud-eu/web-client 5.1.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{functions-JSgappH3.js → functions-BBKWOL6l.js} +1 -1
- package/dist/{functions-K2XX5sqY.cjs → functions-VxhUeT1u.cjs} +1 -1
- package/dist/{index-Dn0XwAD_.cjs → index-BYnmk_Nt.cjs} +10 -10
- package/dist/{index-YuBBVVCr.js → index-Bf956okn.js} +172 -158
- package/dist/{index-CRMq09Yn.js → index-Bjx4f50a.js} +630 -564
- package/dist/index-C32gBO3b.cjs +6 -0
- package/dist/index-Di51ZQKD.cjs +4 -0
- package/dist/index-Dn8UfKx7.js +1520 -0
- package/dist/{index-Brk6gzFd.js → index-Sp7XASDj.js} +1 -1
- package/dist/{index-CDNcS2Ra.cjs → index-_S-l3FmE.cjs} +1 -1
- package/dist/web-client/graph/generated.cjs +1 -1
- package/dist/web-client/graph/generated.js +1 -1
- package/dist/web-client/graph.cjs +1 -1
- package/dist/web-client/graph.js +1 -1
- package/dist/web-client/ocs.cjs +1 -1
- package/dist/web-client/ocs.js +1 -1
- package/dist/web-client/webdav.cjs +1 -1
- package/dist/web-client/webdav.js +3 -3
- package/dist/web-client.cjs +1 -1
- package/dist/web-client.js +5 -5
- package/package.json +1 -1
- package/dist/index-Bjk4YP4o.js +0 -1447
- package/dist/index-_QOU-c0Z.cjs +0 -4
- package/dist/index-mNoGEl9R.cjs +0 -6
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";const et=require("./index-
|
|
2
|
-
`;function mr(r,t){let e="";return t.format&&t.indentBy.length>0&&(e=dr),
|
|
1
|
+
"use strict";const et=require("./index-C32gBO3b.cjs"),T=require("./functions-VxhUeT1u.cjs"),I=require("./toString-DsGM1XcL.cjs"),Ve=require("./index-Di51ZQKD.cjs"),Tt=require("./index-D0bnLDAA.cjs"),wt=r=>encodeURIComponent(r).split("%2F").join("/");class ee extends Error{response;statusCode;constructor(t,e,n=null){super(t),this.response=e,this.statusCode=n}}class Be extends ee{errorCode;constructor(t,e,n,s=null){super(t,n,s),this.errorCode=e}}const dr=`
|
|
2
|
+
`;function mr(r,t){let e="";return t.format&&t.indentBy.length>0&&(e=dr),We(r,t,"",e)}function We(r,t,e,n){let s="",o=!1;if(!Array.isArray(r)){if(r!=null){let i=r.toString();return i=zt(i,t),i}return""}for(let i=0;i<r.length;i++){const a=r[i],l=yr(a);if(l===void 0)continue;let c="";if(e.length===0?c=l:c=`${e}.${l}`,l===t.textNodeName){let g=a[l];br(c,t)||(g=t.tagValueProcessor(l,g),g=zt(g,t)),o&&(s+=n),s+=g,o=!1;continue}else if(l===t.cdataPropName){o&&(s+=n),s+=`<![CDATA[${a[l][0][t.textNodeName]}]]>`,o=!1;continue}else if(l===t.commentPropName){s+=n+`<!--${a[l][0][t.textNodeName]}-->`,o=!0;continue}else if(l[0]==="?"){const g=ce(a[":@"],t),p=l==="?xml"?"":n;let m=a[l][0][t.textNodeName];m=m.length!==0?" "+m:"",s+=p+`<${l}${m}${g}?>`,o=!0;continue}let u=n;u!==""&&(u+=t.indentBy);const f=ce(a[":@"],t),h=n+`<${l}${f}`,d=We(a[l],t,c,u);t.unpairedTags.indexOf(l)!==-1?t.suppressUnpairedNode?s+=h+">":s+=h+"/>":(!d||d.length===0)&&t.suppressEmptyNode?s+=h+"/>":d&&d.endsWith(">")?s+=h+`>${d}${n}</${l}>`:(s+=h+">",d&&n!==""&&(d.includes("/>")||d.includes("</"))?s+=n+t.indentBy+d+n:s+=d,s+=`</${l}>`),o=!0}return s}function yr(r){const t=Object.keys(r);for(let e=0;e<t.length;e++){const n=t[e];if(Object.prototype.hasOwnProperty.call(r,n)&&n!==":@")return n}}function ce(r,t){let e="";if(r&&!t.ignoreAttributes)for(let n in r){if(!Object.prototype.hasOwnProperty.call(r,n))continue;let s=t.attributeValueProcessor(n,r[n]);s=zt(s,t),s===!0&&t.suppressBooleanAttributes?e+=` ${n.substr(t.attributeNamePrefix.length)}`:e+=` ${n.substr(t.attributeNamePrefix.length)}="${s}"`}return e}function br(r,t){r=r.substr(0,r.length-t.textNodeName.length-1);let e=r.substr(r.lastIndexOf(".")+1);for(let n in t.stopNodes)if(t.stopNodes[n]===r||t.stopNodes[n]==="*."+e)return!0;return!1}function zt(r,t){if(r&&r.length>0&&t.processEntities)for(let e=0;e<t.entities.length;e++){const n=t.entities[e];r=r.replace(n.regex,n.val)}return r}function vr(r){return typeof r=="function"?r:Array.isArray(r)?t=>{for(const e of r)if(typeof e=="string"&&t===e||e instanceof RegExp&&e.test(t))return!0}:()=>!1}const wr={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(r,t){return t},attributeValueProcessor:function(r,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function K(r){this.options=Object.assign({},wr,r),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=vr(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Nr),this.processTextOrObjNode=xr,this.options.format?(this.indentate=Pr,this.tagEndChar=`>
|
|
3
3
|
`,this.newLine=`
|
|
4
|
-
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}K.prototype.build=function(r){return this.options.preserveOrder?mr(r,this.options):(Array.isArray(r)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(r={[this.options.arrayNodeName]:r}),this.j2x(r,0,[]).val)};K.prototype.j2x=function(r,t,e){let n="",s="";const o=e.join(".");for(let i in r)if(Object.prototype.hasOwnProperty.call(r,i))if(typeof r[i]>"u")this.isAttribute(i)&&(s+="");else if(r[i]===null)this.isAttribute(i)||i===this.options.cdataPropName?s+="":i[0]==="?"?s+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:s+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(r[i]instanceof Date)s+=this.buildTextValNode(r[i],i,"",t);else if(typeof r[i]!="object"){const a=this.isAttribute(i);if(a&&!this.ignoreAttributesFn(a,o))n+=this.buildAttrPairStr(a,""+r[i]);else if(!a)if(i===this.options.textNodeName){let l=this.options.tagValueProcessor(i,""+r[i]);s+=this.replaceEntitiesValue(l)}else s+=this.buildTextValNode(r[i],i,"",t)}else if(Array.isArray(r[i])){const a=r[i].length;let l="",c="";for(let u=0;u<a;u++){const f=r[i][u];if(!(typeof f>"u"))if(f===null)i[0]==="?"?s+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:s+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(typeof f=="object")if(this.options.oneListGroup){const h=this.j2x(f,t+1,e.concat(i));l+=h.val,this.options.attributesGroupName&&f.hasOwnProperty(this.options.attributesGroupName)&&(c+=h.attrStr)}else l+=this.processTextOrObjNode(f,i,t,e);else if(this.options.oneListGroup){let h=this.options.tagValueProcessor(i,f);h=this.replaceEntitiesValue(h),l+=h}else l+=this.buildTextValNode(f,i,"",t)}this.options.oneListGroup&&(l=this.buildObjectNode(l,i,c,t)),s+=l}else if(this.options.attributesGroupName&&i===this.options.attributesGroupName){const a=Object.keys(r[i]),l=a.length;for(let c=0;c<l;c++)n+=this.buildAttrPairStr(a[c],""+r[i][a[c]])}else s+=this.processTextOrObjNode(r[i],i,t,e);return{attrStr:n,val:s}};K.prototype.buildAttrPairStr=function(r,t){return t=this.options.attributeValueProcessor(r,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&t==="true"?" "+r:" "+r+'="'+t+'"'};function wr(r,t,e,n){const s=this.j2x(r,e+1,n.concat(t));return r[this.options.textNodeName]!==void 0&&Object.keys(r).length===1?this.buildTextValNode(r[this.options.textNodeName],t,s.attrStr,e):this.buildObjectNode(s.val,t,s.attrStr,e)}K.prototype.buildObjectNode=function(r,t,e,n){if(r==="")return t[0]==="?"?this.indentate(n)+"<"+t+e+"?"+this.tagEndChar:this.indentate(n)+"<"+t+e+this.closeTag(t)+this.tagEndChar;{let s="</"+t+this.tagEndChar,o="";return t[0]==="?"&&(o="?",s=""),(e||e==="")&&r.indexOf("<")===-1?this.indentate(n)+"<"+t+e+o+">"+r+s:this.options.commentPropName!==!1&&t===this.options.commentPropName&&o.length===0?this.indentate(n)+`<!--${r}-->`+this.newLine:this.indentate(n)+"<"+t+e+o+this.tagEndChar+r+this.indentate(n)+s}};K.prototype.closeTag=function(r){let t="";return this.options.unpairedTags.indexOf(r)!==-1?this.options.suppressUnpairedNode||(t="/"):this.options.suppressEmptyNode?t="/":t=`></${r}`,t};K.prototype.buildTextValNode=function(r,t,e,n){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${r}]]>`+this.newLine;if(this.options.commentPropName!==!1&&t===this.options.commentPropName)return this.indentate(n)+`<!--${r}-->`+this.newLine;if(t[0]==="?")return this.indentate(n)+"<"+t+e+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(t,r);return s=this.replaceEntitiesValue(s),s===""?this.indentate(n)+"<"+t+e+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+e+">"+s+"</"+t+this.tagEndChar}};K.prototype.replaceEntitiesValue=function(r){if(r&&r.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const e=this.options.entities[t];r=r.replace(e.regex,e.val)}return r};function xr(r){return this.options.indentBy.repeat(r)}function Pr(r){return r.startsWith(this.options.attributeNamePrefix)&&r!==this.options.textNodeName?r.substr(this.attrPrefixLen):!1}const Z=(r,{fileId:t,path:e,name:n})=>{if(e!==void 0)return I.urlJoin(r.webDavPath,e);if(t!==void 0){if(T.isPublicSpaceResource(r))throw new Error("public spaces need a path provided");return I.urlJoin("spaces",t,n||"")}return r.webDavPath},Nr=(r,t)=>({copyFiles(e,{path:n,fileId:s},o,{path:i,parentFolderId:a,name:l},{overwrite:c,...u}={}){const f=Z(e,{fileId:s,path:n}),h=Z(o,{fileId:a,path:i,name:l});return r.copy(f,h,{overwrite:c||!1,...u})}}),Er=(r,t,e)=>({async createFolder(n,{path:s,parentFolderId:o,folderName:i,fetchFolder:a=!0,...l}){const c=Z(n,{fileId:o,path:s,name:i});if(await r.mkcol(c),a)return t.getFileInfo(n,{path:s},l)}}),Ar=(r,{axiosClient:t})=>({async getFileContents(e,{fileId:n,path:s},{responseType:o="text",noCache:i=!0,headers:a,...l}={}){try{const c=Z(e,{fileId:n,path:s}),u=await t.get(r.getFileUrl(c),{responseType:o,headers:{...i&&{"Cache-Control":"no-cache"},...a||{}},...l});return{response:u,body:u.data,headers:{ETag:u.headers.etag,"OC-ETag":u.headers["oc-etag"],"OC-FileId":u.headers["oc-fileid"]}}}catch(c){const{message:u,response:f}=c;throw new ee(u,f,f.status)}}}),Tr=(r,t)=>({async getFileInfo(e,n,s){return(await r.listFiles(e,n,{depth:0,...s})).resource}}),Or=(r,t,e,{axiosClient:n,baseUrl:s})=>({async getFileUrl(o,i,{disposition:a="attachment",version:l=null,username:c="",...u}){if(a==="inline"){const h=await t.getFileContents(o,i,{responseType:"blob",...u});return URL.createObjectURL(h.body)}if(l){if(!c)throw new Error("username is required for URL signing");const h=r.getFileUrl(I.urlJoin("meta",i.fileId,"v",l));return await te.ocs(s,n).signUrl(h,c)}if(i.downloadURL)return i.downloadURL;const{downloadURL:f}=await e.getFileInfo(o,i,{davProperties:[T.DavProperty.DownloadURL]});return f},revokeUrl:o=>{o&&o.startsWith("blob:")&&URL.revokeObjectURL(o)}}),Sr=(r,t)=>({getPublicFileUrl(e,n){return r.getFileUrl(I.urlJoin("public-files",n))}}),Cr=(r,t,e)=>({async listFiles(n,{path:s,fileId:o}={},{depth:i=1,davProperties:a,isTrash:l=!1,...c}={}){let u;if(T.isPublicSpaceResource(n)){u=await r.propfind(I.urlJoin(n.webDavPath,s),{depth:i,properties:a||T.DavProperties.PublicLink,...c}),u.forEach(g=>{g.filename=g.filename.split("/").slice(1).join("/")}),u.length===1&&(u[0].filename=I.urlJoin(n.id,s,{leadingSlash:!0})),u.forEach(g=>{g.filename=g.filename.split("/").slice(2).join("/")});const h=n.driveAlias.startsWith("ocm/")?"ocm":"public-link";if((!s||s==="/")&&i>0&&h==="ocm"&&u[0].props[T.DavProperty.PublicLinkItemType]==="file"&&(u=[{basename:n.fileId,type:"directory",filename:"",props:{}},...u]),!s){const[g,...p]=u;return{resource:T.buildPublicSpaceResource({...g,id:n.id,driveAlias:n.driveAlias,webDavPath:n.webDavPath,publicLinkType:h}),children:p.map(m=>T.buildResource(m,r.extraProps))}}const d=u.map(g=>T.buildResource(g,r.extraProps));return{resource:d[0],children:d.slice(1)}}const f=async()=>{const h=await t.getPathForFileId(o);return this.listFiles(n,{path:h},{depth:i,davProperties:a})};try{let h="";if(l?h=T.buildWebDavSpacesTrashPath(n.id):h=Z(n,{fileId:o,path:s}),u=await r.propfind(h,{depth:i,properties:a||T.DavProperties.Default,...c}),l)return{resource:T.buildResource(u[0],r.extraProps),children:u.slice(1).map(T.buildDeletedResource)};const d=u.map(p=>T.buildResource(p,r.extraProps)),g=o===n.id;return o&&!g&&d[0].fileId&&o!==d[0].fileId?f():{resource:d[0],children:d.slice(1)}}catch(h){if(h.statusCode===404&&o)return f();throw h}}}),$r=(r,t)=>({moveFiles(e,{path:n,fileId:s},o,{path:i,parentFolderId:a,name:l},{overwrite:c,...u}={}){const f=Z(e,{fileId:s,path:n}),h=Z(o,{fileId:a,path:i,name:l});return r.move(f,h,{overwrite:c||!1,...u})}}),Ir=(r,t,e)=>({async putFileContents(n,{fileName:s,path:o,parentFolderId:i,content:a="",previousEntityTag:l="",overwrite:c,onUploadProgress:u=null,...f}){const h=Z(n,{fileId:i,name:s,path:o}),{result:d}=await r.put(h,a,{previousEntityTag:l,overwrite:c,onUploadProgress:u,...f});return t.getFileInfo(n,{fileId:d.headers.get("Oc-Fileid"),path:o})}}),Fr=(r,t)=>({deleteFile(e,{path:n,...s}){return r.delete(I.urlJoin(e.webDavPath,n),s)}}),jr=(r,t)=>({restoreFile(e,{id:n},{path:s},{overwrite:o,...i}={}){if(T.isPublicSpaceResource(e))return;const a=I.urlJoin(e.webDavPath,s);return r.move(I.urlJoin(e.webDavTrashPath,n),a,{overwrite:o,...i})}}),Rr=(r,t)=>({restoreFileVersion(e,{parentFolderId:n,name:s,path:o},i,a={}){const l=Z(e,{path:o,fileId:n,name:s}),c=I.urlJoin("meta",n,"v",i,{leadingSlash:!0}),u=I.urlJoin("files",l,{leadingSlash:!0});return r.copy(c,u,a)}}),Dr=(r,t)=>({clearTrashBin(e,{id:n,...s}={}){let o=T.buildWebDavSpacesTrashPath(e.id);return n&&(o=I.urlJoin(o,n)),r.delete(o,s)}}),Lr=(r,t)=>({async search(e,{davProperties:n=T.DavProperties.Default,searchLimit:s,...o}){const i="/spaces/",{range:a,results:l}=await r.report(i,{pattern:e,limit:s,properties:n,...o});return{resources:l.map(c=>({...T.buildResource(c,r.extraProps),highlights:c.props[T.DavProperty.Highlights]||""})),totalResults:a?parseInt(a?.split("/")[1]):null}}}),Ur=(r,t)=>({async getPathForFileId(e,n={}){return(await r.propfind(I.urlJoin("meta",e,{leadingSlash:!0}),{properties:[T.DavProperty.MetaPathForUser],...n}))[0].props[T.DavProperty.MetaPathForUser]}});var kr={2:r=>{function t(s,o,i){s instanceof RegExp&&(s=e(s,i)),o instanceof RegExp&&(o=e(o,i));var a=n(s,o,i);return a&&{start:a[0],end:a[1],pre:i.slice(0,a[0]),body:i.slice(a[0]+s.length,a[1]),post:i.slice(a[1]+o.length)}}function e(s,o){var i=o.match(s);return i?i[0]:null}function n(s,o,i){var a,l,c,u,f,h=i.indexOf(s),d=i.indexOf(o,h+1),g=h;if(h>=0&&d>0){for(a=[],c=i.length;g>=0&&!f;)g==h?(a.push(g),h=i.indexOf(s,g+1)):a.length==1?f=[a.pop(),d]:((l=a.pop())<c&&(c=l,u=d),d=i.indexOf(o,g+1)),g=h<d&&h>=0?h:d;a.length&&(f=[c,u])}return f}r.exports=t,t.range=n},47:(r,t,e)=>{var n=e(410),s=function(c){return typeof c=="string"};function o(c,u){for(var f=[],h=0;h<c.length;h++){var d=c[h];d&&d!=="."&&(d===".."?f.length&&f[f.length-1]!==".."?f.pop():u&&f.push(".."):f.push(d))}return f}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a={};function l(c){return i.exec(c).slice(1)}a.resolve=function(){for(var c="",u=!1,f=arguments.length-1;f>=-1&&!u;f--){var h=f>=0?arguments[f]:et.process$1.cwd();if(!s(h))throw new TypeError("Arguments to path.resolve must be strings");h&&(c=h+"/"+c,u=h.charAt(0)==="/")}return(u?"/":"")+(c=o(c.split("/"),!u).join("/"))||"."},a.normalize=function(c){var u=a.isAbsolute(c),f=c.substr(-1)==="/";return(c=o(c.split("/"),!u).join("/"))||u||(c="."),c&&f&&(c+="/"),(u?"/":"")+c},a.isAbsolute=function(c){return c.charAt(0)==="/"},a.join=function(){for(var c="",u=0;u<arguments.length;u++){var f=arguments[u];if(!s(f))throw new TypeError("Arguments to path.join must be strings");f&&(c+=c?"/"+f:f)}return a.normalize(c)},a.relative=function(c,u){function f(y){for(var v=0;v<y.length&&y[v]==="";v++);for(var w=y.length-1;w>=0&&y[w]==="";w--);return v>w?[]:y.slice(v,w+1)}c=a.resolve(c).substr(1),u=a.resolve(u).substr(1);for(var h=f(c.split("/")),d=f(u.split("/")),g=Math.min(h.length,d.length),p=g,m=0;m<g;m++)if(h[m]!==d[m]){p=m;break}var b=[];for(m=p;m<h.length;m++)b.push("..");return(b=b.concat(d.slice(p))).join("/")},a._makeLong=function(c){return c},a.dirname=function(c){var u=l(c),f=u[0],h=u[1];return f||h?(h&&(h=h.substr(0,h.length-1)),f+h):"."},a.basename=function(c,u){var f=l(c)[2];return u&&f.substr(-1*u.length)===u&&(f=f.substr(0,f.length-u.length)),f},a.extname=function(c){return l(c)[3]},a.format=function(c){if(!n.isObject(c))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof c);var u=c.root||"";if(!s(u))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof c.root);return(c.dir?c.dir+a.sep:"")+(c.base||"")},a.parse=function(c){if(!s(c))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof c);var u=l(c);if(!u||u.length!==4)throw new TypeError("Invalid path '"+c+"'");return u[1]=u[1]||"",u[2]=u[2]||"",u[3]=u[3]||"",{root:u[0],dir:u[0]+u[1].slice(0,u[1].length-1),base:u[2],ext:u[3],name:u[2].slice(0,u[2].length-u[3].length)}},a.sep="/",a.delimiter=":",r.exports=a},101:function(r,t,e){var n;r=e.nmd(r),(function(){var s=(r&&r.exports,typeof Tt.global=="object"&&Tt.global);s.global!==s&&s.window;var o=function(u){this.message=u};(o.prototype=new Error).name="InvalidCharacterError";var i=function(u){throw new o(u)},a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=/[\t\n\f\r ]/g,c={encode:function(u){u=String(u),/[^\0-\xFF]/.test(u)&&i("The string to be encoded contains characters outside of the Latin1 range.");for(var f,h,d,g,p=u.length%3,m="",b=-1,y=u.length-p;++b<y;)f=u.charCodeAt(b)<<16,h=u.charCodeAt(++b)<<8,d=u.charCodeAt(++b),m+=a.charAt((g=f+h+d)>>18&63)+a.charAt(g>>12&63)+a.charAt(g>>6&63)+a.charAt(63&g);return p==2?(f=u.charCodeAt(b)<<8,h=u.charCodeAt(++b),m+=a.charAt((g=f+h)>>10)+a.charAt(g>>4&63)+a.charAt(g<<2&63)+"="):p==1&&(g=u.charCodeAt(b),m+=a.charAt(g>>2)+a.charAt(g<<4&63)+"=="),m},decode:function(u){var f=(u=String(u).replace(l,"")).length;f%4==0&&(f=(u=u.replace(/==?$/,"")).length),(f%4==1||/[^+a-zA-Z0-9/]/.test(u))&&i("Invalid character: the string to be decoded is not correctly encoded.");for(var h,d,g=0,p="",m=-1;++m<f;)d=a.indexOf(u.charAt(m)),h=g%4?64*h+d:d,g++%4&&(p+=String.fromCharCode(255&h>>(-2*g&6)));return p},version:"1.0.0"};(n=(function(){return c}).call(t,e,t,r))===void 0||(r.exports=n)})()},135:r=>{function t(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}r.exports=function(e){return e!=null&&(t(e)||(function(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&t(n.slice(0,0))})(e)||!!e._isBuffer)}},172:(r,t)=>{t.d=function(e){if(!e)return 0;for(var n=(e=e.toString()).length,s=e.length;s--;){var o=e.charCodeAt(s);56320<=o&&o<=57343&&s--,127<o&&o<=2047?n++:2047<o&&o<=65535&&(n+=2)}return n}},285:(r,t,e)=>{var n=e(2);r.exports=function(b){return b?(b.substr(0,2)==="{}"&&(b="\\{\\}"+b.substr(2)),m((function(y){return y.split("\\\\").join(s).split("\\{").join(o).split("\\}").join(i).split("\\,").join(a).split("\\.").join(l)})(b),!0).map(u)):[]};var s="\0SLASH"+Math.random()+"\0",o="\0OPEN"+Math.random()+"\0",i="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(b){return parseInt(b,10)==b?parseInt(b,10):b.charCodeAt(0)}function u(b){return b.split(s).join("\\").split(o).join("{").split(i).join("}").split(a).join(",").split(l).join(".")}function f(b){if(!b)return[""];var y=[],v=n("{","}",b);if(!v)return b.split(",");var w=v.pre,x=v.body,N=v.post,E=w.split(",");E[E.length-1]+="{"+x+"}";var O=f(N);return N.length&&(E[E.length-1]+=O.shift(),E.push.apply(E,O)),y.push.apply(y,E),y}function h(b){return"{"+b+"}"}function d(b){return/^-?0\d/.test(b)}function g(b,y){return b<=y}function p(b,y){return b>=y}function m(b,y){var v=[],w=n("{","}",b);if(!w)return[b];var x=w.pre,N=w.post.length?m(w.post,!1):[""];if(/\$$/.test(w.pre))for(var E=0;E<N.length;E++){var O=x+"{"+w.body+"}"+N[E];v.push(O)}else{var A,j,nt=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(w.body),st=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(w.body),P=nt||st,ft=w.body.indexOf(",")>=0;if(!P&&!ft)return w.post.match(/,(?!,).*\}/)?m(b=w.pre+"{"+w.body+i+w.post):[b];if(P)A=w.body.split(/\.\./);else if((A=f(w.body)).length===1&&(A=m(A[0],!1).map(h)).length===1)return N.map((function(gr){return w.pre+A[0]+gr}));if(P){var pt=c(A[0]),gt=c(A[1]),G=Math.max(A[0].length,A[1].length),J=A.length==3?Math.abs(c(A[2])):1,dt=g;gt<pt&&(J*=-1,dt=p);var At=A.some(d);j=[];for(var X=pt;dt(X,gt);X+=J){var Q;if(st)(Q=String.fromCharCode(X))==="\\"&&(Q="");else if(Q=String(X),At){var ue=G-Q.length;if(ue>0){var le=new Array(ue+1).join("0");Q=X<0?"-"+le+Q.slice(1):le+Q}}j.push(Q)}}else{j=[];for(var ot=0;ot<A.length;ot++)j.push.apply(j,m(A[ot],!1))}for(ot=0;ot<j.length;ot++)for(E=0;E<N.length;E++)O=x+j[ot]+N[E],(!y||P||O)&&v.push(O)}return v}},298:r=>{var t,e;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={rotl:function(n,s){return n<<s|n>>>32-s},rotr:function(n,s){return n<<32-s|n>>>s},endian:function(n){if(n.constructor==Number)return 16711935&e.rotl(n,8)|4278255360&e.rotl(n,24);for(var s=0;s<n.length;s++)n[s]=e.endian(n[s]);return n},randomBytes:function(n){for(var s=[];n>0;n--)s.push(Math.floor(256*Math.random()));return s},bytesToWords:function(n){for(var s=[],o=0,i=0;o<n.length;o++,i+=8)s[i>>>5]|=n[o]<<24-i%32;return s},wordsToBytes:function(n){for(var s=[],o=0;o<32*n.length;o+=8)s.push(n[o>>>5]>>>24-o%32&255);return s},bytesToHex:function(n){for(var s=[],o=0;o<n.length;o++)s.push((n[o]>>>4).toString(16)),s.push((15&n[o]).toString(16));return s.join("")},hexToBytes:function(n){for(var s=[],o=0;o<n.length;o+=2)s.push(parseInt(n.substr(o,2),16));return s},bytesToBase64:function(n){for(var s=[],o=0;o<n.length;o+=3)for(var i=n[o]<<16|n[o+1]<<8|n[o+2],a=0;a<4;a++)8*o+6*a<=8*n.length?s.push(t.charAt(i>>>6*(3-a)&63)):s.push("=");return s.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/gi,"");for(var s=[],o=0,i=0;o<n.length;i=++o%4)i!=0&&s.push((t.indexOf(n.charAt(o-1))&Math.pow(2,-2*i+8)-1)<<2*i|t.indexOf(n.charAt(o))>>>6-2*i);return s}},r.exports=e},345:()=>{},388:()=>{},410:()=>{},526:r=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var n=[],s=0;s<e.length;s++)n.push(255&e.charCodeAt(s));return n},bytesToString:function(e){for(var n=[],s=0;s<e.length;s++)n.push(String.fromCharCode(e[s]));return n.join("")}}};r.exports=t},542:(r,t,e)=>{(function(){var n=e(298),s=e(526).utf8,o=e(135),i=e(526).bin,a=function(l,c){l.constructor==String?l=c&&c.encoding==="binary"?i.stringToBytes(l):s.stringToBytes(l):o(l)?l=Array.prototype.slice.call(l,0):Array.isArray(l)||l.constructor===Uint8Array||(l=l.toString());for(var u=n.bytesToWords(l),f=8*l.length,h=1732584193,d=-271733879,g=-1732584194,p=271733878,m=0;m<u.length;m++)u[m]=16711935&(u[m]<<8|u[m]>>>24)|4278255360&(u[m]<<24|u[m]>>>8);u[f>>>5]|=128<<f%32,u[14+(f+64>>>9<<4)]=f;var b=a._ff,y=a._gg,v=a._hh,w=a._ii;for(m=0;m<u.length;m+=16){var x=h,N=d,E=g,O=p;h=b(h,d,g,p,u[m+0],7,-680876936),p=b(p,h,d,g,u[m+1],12,-389564586),g=b(g,p,h,d,u[m+2],17,606105819),d=b(d,g,p,h,u[m+3],22,-1044525330),h=b(h,d,g,p,u[m+4],7,-176418897),p=b(p,h,d,g,u[m+5],12,1200080426),g=b(g,p,h,d,u[m+6],17,-1473231341),d=b(d,g,p,h,u[m+7],22,-45705983),h=b(h,d,g,p,u[m+8],7,1770035416),p=b(p,h,d,g,u[m+9],12,-1958414417),g=b(g,p,h,d,u[m+10],17,-42063),d=b(d,g,p,h,u[m+11],22,-1990404162),h=b(h,d,g,p,u[m+12],7,1804603682),p=b(p,h,d,g,u[m+13],12,-40341101),g=b(g,p,h,d,u[m+14],17,-1502002290),h=y(h,d=b(d,g,p,h,u[m+15],22,1236535329),g,p,u[m+1],5,-165796510),p=y(p,h,d,g,u[m+6],9,-1069501632),g=y(g,p,h,d,u[m+11],14,643717713),d=y(d,g,p,h,u[m+0],20,-373897302),h=y(h,d,g,p,u[m+5],5,-701558691),p=y(p,h,d,g,u[m+10],9,38016083),g=y(g,p,h,d,u[m+15],14,-660478335),d=y(d,g,p,h,u[m+4],20,-405537848),h=y(h,d,g,p,u[m+9],5,568446438),p=y(p,h,d,g,u[m+14],9,-1019803690),g=y(g,p,h,d,u[m+3],14,-187363961),d=y(d,g,p,h,u[m+8],20,1163531501),h=y(h,d,g,p,u[m+13],5,-1444681467),p=y(p,h,d,g,u[m+2],9,-51403784),g=y(g,p,h,d,u[m+7],14,1735328473),h=v(h,d=y(d,g,p,h,u[m+12],20,-1926607734),g,p,u[m+5],4,-378558),p=v(p,h,d,g,u[m+8],11,-2022574463),g=v(g,p,h,d,u[m+11],16,1839030562),d=v(d,g,p,h,u[m+14],23,-35309556),h=v(h,d,g,p,u[m+1],4,-1530992060),p=v(p,h,d,g,u[m+4],11,1272893353),g=v(g,p,h,d,u[m+7],16,-155497632),d=v(d,g,p,h,u[m+10],23,-1094730640),h=v(h,d,g,p,u[m+13],4,681279174),p=v(p,h,d,g,u[m+0],11,-358537222),g=v(g,p,h,d,u[m+3],16,-722521979),d=v(d,g,p,h,u[m+6],23,76029189),h=v(h,d,g,p,u[m+9],4,-640364487),p=v(p,h,d,g,u[m+12],11,-421815835),g=v(g,p,h,d,u[m+15],16,530742520),h=w(h,d=v(d,g,p,h,u[m+2],23,-995338651),g,p,u[m+0],6,-198630844),p=w(p,h,d,g,u[m+7],10,1126891415),g=w(g,p,h,d,u[m+14],15,-1416354905),d=w(d,g,p,h,u[m+5],21,-57434055),h=w(h,d,g,p,u[m+12],6,1700485571),p=w(p,h,d,g,u[m+3],10,-1894986606),g=w(g,p,h,d,u[m+10],15,-1051523),d=w(d,g,p,h,u[m+1],21,-2054922799),h=w(h,d,g,p,u[m+8],6,1873313359),p=w(p,h,d,g,u[m+15],10,-30611744),g=w(g,p,h,d,u[m+6],15,-1560198380),d=w(d,g,p,h,u[m+13],21,1309151649),h=w(h,d,g,p,u[m+4],6,-145523070),p=w(p,h,d,g,u[m+11],10,-1120210379),g=w(g,p,h,d,u[m+2],15,718787259),d=w(d,g,p,h,u[m+9],21,-343485551),h=h+x>>>0,d=d+N>>>0,g=g+E>>>0,p=p+O>>>0}return n.endian([h,d,g,p])};a._ff=function(l,c,u,f,h,d,g){var p=l+(c&u|~c&f)+(h>>>0)+g;return(p<<d|p>>>32-d)+c},a._gg=function(l,c,u,f,h,d,g){var p=l+(c&f|u&~f)+(h>>>0)+g;return(p<<d|p>>>32-d)+c},a._hh=function(l,c,u,f,h,d,g){var p=l+(c^u^f)+(h>>>0)+g;return(p<<d|p>>>32-d)+c},a._ii=function(l,c,u,f,h,d,g){var p=l+(u^(c|~f))+(h>>>0)+g;return(p<<d|p>>>32-d)+c},a._blocksize=16,a._digestsize=16,r.exports=function(l,c){if(l==null)throw new Error("Illegal argument "+l);var u=n.wordsToBytes(a(l,c));return c&&c.asBytes?u:c&&c.asString?i.bytesToString(u):n.bytesToHex(u)}})()},647:(r,t)=>{var e=Object.prototype.hasOwnProperty;function n(o){try{return decodeURIComponent(o.replace(/\+/g," "))}catch{return null}}function s(o){try{return encodeURIComponent(o)}catch{return null}}t.stringify=function(o,i){i=i||"";var a,l,c=[];for(l in typeof i!="string"&&(i="?"),o)if(e.call(o,l)){if((a=o[l])||a!=null&&!isNaN(a)||(a=""),l=s(l),a=s(a),l===null||a===null)continue;c.push(l+"="+a)}return c.length?i+c.join("&"):""},t.parse=function(o){for(var i,a=/([^=?#&]+)=?([^&]*)/g,l={};i=a.exec(o);){var c=n(i[1]),u=n(i[2]);c===null||u===null||c in l||(l[c]=u)}return l}},670:r=>{r.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0}},737:(r,t,e)=>{var n=e(670),s=e(647),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,l=/:\d+$/,c=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,u=/^[a-zA-Z]:/;function f(y){return(y||"").toString().replace(o,"")}var h=[["#","hash"],["?","query"],function(y,v){return p(v.protocol)?y.replace(/\\/g,"/"):y},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],d={hash:1,query:1};function g(y){var v,w=(typeof window<"u"?window:typeof Tt.global<"u"?Tt.global:typeof self<"u"?self:{}).location||{},x={},N=typeof(y=y||w);if(y.protocol==="blob:")x=new b(unescape(y.pathname),{});else if(N==="string")for(v in x=new b(y,{}),d)delete x[v];else if(N==="object"){for(v in y)v in d||(x[v]=y[v]);x.slashes===void 0&&(x.slashes=a.test(y.href))}return x}function p(y){return y==="file:"||y==="ftp:"||y==="http:"||y==="https:"||y==="ws:"||y==="wss:"}function m(y,v){y=(y=f(y)).replace(i,""),v=v||{};var w,x=c.exec(y),N=x[1]?x[1].toLowerCase():"",E=!!x[2],O=!!x[3],A=0;return E?O?(w=x[2]+x[3]+x[4],A=x[2].length+x[3].length):(w=x[2]+x[4],A=x[2].length):O?(w=x[3]+x[4],A=x[3].length):w=x[4],N==="file:"?A>=2&&(w=w.slice(2)):p(N)?w=x[4]:N?E&&(w=w.slice(2)):A>=2&&p(v.protocol)&&(w=x[4]),{protocol:N,slashes:E||p(N),slashesCount:A,rest:w}}function b(y,v,w){if(y=(y=f(y)).replace(i,""),!(this instanceof b))return new b(y,v,w);var x,N,E,O,A,j,nt=h.slice(),st=typeof v,P=this,ft=0;for(st!=="object"&&st!=="string"&&(w=v,v=null),w&&typeof w!="function"&&(w=s.parse),x=!(N=m(y||"",v=g(v))).protocol&&!N.slashes,P.slashes=N.slashes||x&&v.slashes,P.protocol=N.protocol||v.protocol||"",y=N.rest,(N.protocol==="file:"&&(N.slashesCount!==2||u.test(y))||!N.slashes&&(N.protocol||N.slashesCount<2||!p(P.protocol)))&&(nt[3]=[/(.*)/,"pathname"]);ft<nt.length;ft++)typeof(O=nt[ft])!="function"?(E=O[0],j=O[1],E!=E?P[j]=y:typeof E=="string"?~(A=E==="@"?y.lastIndexOf(E):y.indexOf(E))&&(typeof O[2]=="number"?(P[j]=y.slice(0,A),y=y.slice(A+O[2])):(P[j]=y.slice(A),y=y.slice(0,A))):(A=E.exec(y))&&(P[j]=A[1],y=y.slice(0,A.index)),P[j]=P[j]||x&&O[3]&&v[j]||"",O[4]&&(P[j]=P[j].toLowerCase())):y=O(y,P);w&&(P.query=w(P.query)),x&&v.slashes&&P.pathname.charAt(0)!=="/"&&(P.pathname!==""||v.pathname!=="")&&(P.pathname=(function(pt,gt){if(pt==="")return gt;for(var G=(gt||"/").split("/").slice(0,-1).concat(pt.split("/")),J=G.length,dt=G[J-1],At=!1,X=0;J--;)G[J]==="."?G.splice(J,1):G[J]===".."?(G.splice(J,1),X++):X&&(J===0&&(At=!0),G.splice(J,1),X--);return At&&G.unshift(""),dt!=="."&&dt!==".."||G.push(""),G.join("/")})(P.pathname,v.pathname)),P.pathname.charAt(0)!=="/"&&p(P.protocol)&&(P.pathname="/"+P.pathname),n(P.port,P.protocol)||(P.host=P.hostname,P.port=""),P.username=P.password="",P.auth&&(~(A=P.auth.indexOf(":"))?(P.username=P.auth.slice(0,A),P.username=encodeURIComponent(decodeURIComponent(P.username)),P.password=P.auth.slice(A+1),P.password=encodeURIComponent(decodeURIComponent(P.password))):P.username=encodeURIComponent(decodeURIComponent(P.auth)),P.auth=P.password?P.username+":"+P.password:P.username),P.origin=P.protocol!=="file:"&&p(P.protocol)&&P.host?P.protocol+"//"+P.host:"null",P.href=P.toString()}b.prototype={set:function(y,v,w){var x=this;switch(y){case"query":typeof v=="string"&&v.length&&(v=(w||s.parse)(v)),x[y]=v;break;case"port":x[y]=v,n(v,x.protocol)?v&&(x.host=x.hostname+":"+v):(x.host=x.hostname,x[y]="");break;case"hostname":x[y]=v,x.port&&(v+=":"+x.port),x.host=v;break;case"host":x[y]=v,l.test(v)?(v=v.split(":"),x.port=v.pop(),x.hostname=v.join(":")):(x.hostname=v,x.port="");break;case"protocol":x.protocol=v.toLowerCase(),x.slashes=!w;break;case"pathname":case"hash":if(v){var N=y==="pathname"?"/":"#";x[y]=v.charAt(0)!==N?N+v:v}else x[y]=v;break;case"username":case"password":x[y]=encodeURIComponent(v);break;case"auth":var E=v.indexOf(":");~E?(x.username=v.slice(0,E),x.username=encodeURIComponent(decodeURIComponent(x.username)),x.password=v.slice(E+1),x.password=encodeURIComponent(decodeURIComponent(x.password))):x.username=encodeURIComponent(decodeURIComponent(v))}for(var O=0;O<h.length;O++){var A=h[O];A[4]&&(x[A[1]]=x[A[1]].toLowerCase())}return x.auth=x.password?x.username+":"+x.password:x.username,x.origin=x.protocol!=="file:"&&p(x.protocol)&&x.host?x.protocol+"//"+x.host:"null",x.href=x.toString(),x},toString:function(y){y&&typeof y=="function"||(y=s.stringify);var v,w=this,x=w.host,N=w.protocol;N&&N.charAt(N.length-1)!==":"&&(N+=":");var E=N+(w.protocol&&w.slashes||p(w.protocol)?"//":"");return w.username?(E+=w.username,w.password&&(E+=":"+w.password),E+="@"):w.password?(E+=":"+w.password,E+="@"):w.protocol!=="file:"&&p(w.protocol)&&!x&&w.pathname!=="/"&&(E+="@"),(x[x.length-1]===":"||l.test(w.hostname)&&!w.port)&&(x+=":"),E+=x+w.pathname,(v=typeof w.query=="object"?y(w.query):w.query)&&(E+=v.charAt(0)!=="?"?"?"+v:v),w.hash&&(E+=w.hash),E}},b.extractProtocol=m,b.location=g,b.trimLeft=f,b.qs=s,r.exports=b},800:()=>{},805:()=>{},829:r=>{function t(c){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},t(c)}function e(c){var u=typeof Map=="function"?new Map:void 0;return e=function(f){if(f===null||(h=f,Function.toString.call(h).indexOf("[native code]")===-1))return f;var h;if(typeof f!="function")throw new TypeError("Super expression must either be null or a function");if(u!==void 0){if(u.has(f))return u.get(f);u.set(f,d)}function d(){return n(f,arguments,o(this).constructor)}return d.prototype=Object.create(f.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),s(d,f)},e(c)}function n(c,u,f){return n=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch{return!1}})()?Reflect.construct:function(h,d,g){var p=[null];p.push.apply(p,d);var m=new(Function.bind.apply(h,p));return g&&s(m,g.prototype),m},n.apply(null,arguments)}function s(c,u){return s=Object.setPrototypeOf||function(f,h){return f.__proto__=h,f},s(c,u)}function o(c){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},o(c)}var i=(function(c){function u(f){var h;return(function(d,g){if(!(d instanceof g))throw new TypeError("Cannot call a class as a function")})(this,u),(h=(function(d,g){return!g||t(g)!=="object"&&typeof g!="function"?(function(p){if(p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p})(d):g})(this,o(u).call(this,f))).name="ObjectPrototypeMutationError",h}return(function(f,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(h&&h.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),h&&s(f,h)})(u,c),u})(e(Error));function a(c,u){for(var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},h=u.split("."),d=h.length,g=function(b){var y=h[b];if(!c)return{v:void 0};if(y==="+"){if(Array.isArray(c))return{v:c.map((function(w,x){var N=h.slice(b+1);return N.length>0?a(w,N.join("."),f):f(c,x,h,b)}))};var v=h.slice(0,b).join(".");throw new Error("Object at wildcard (".concat(v,") is not an array"))}c=f(c,y,h,b)},p=0;p<d;p++){var m=g(p);if(t(m)==="object")return m.v}return c}function l(c,u){return c.length===u+1}r.exports={set:function(c,u,f){if(t(c)!="object"||c===null||u===void 0)return c;if(typeof u=="number")return c[u]=f,c[u];try{return a(c,u,(function(h,d,g,p){if(h===Reflect.getPrototypeOf({}))throw new i("Attempting to mutate Object.prototype");if(!h[d]){var m=Number.isInteger(Number(g[p+1])),b=g[p+1]==="+";h[d]=m||b?[]:{}}return l(g,p)&&(h[d]=f),h[d]}))}catch(h){if(h instanceof i)throw h;return c}},get:function(c,u){if(t(c)!="object"||c===null||u===void 0)return c;if(typeof u=="number")return c[u];try{return a(c,u,(function(f,h){return f[h]}))}catch{return c}},has:function(c,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(t(c)!="object"||c===null||u===void 0)return!1;if(typeof u=="number")return u in c;try{var h=!1;return a(c,u,(function(d,g,p,m){if(!l(p,m))return d&&d[g];h=f.own?d.hasOwnProperty(g):g in d})),h}catch{return!1}},hasOwn:function(c,u,f){return this.has(c,u,f||{own:!0})},isIn:function(c,u,f){var h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(t(c)!="object"||c===null||u===void 0)return!1;try{var d=!1,g=!1;return a(c,u,(function(p,m,b,y){return d=d||p===f||!!p&&p[m]===f,g=l(b,y)&&t(p)==="object"&&m in p,p&&p[m]})),h.validPath?d&&g:d}catch{return!1}},ObjectPrototypeMutationError:i}}},he={};function S(r){var t=he[r];if(t!==void 0)return t.exports;var e=he[r]={id:r,loaded:!1,exports:{}};return kr[r].call(e.exports,e,e.exports,S),e.loaded=!0,e.exports}S.n=r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return S.d(t,{a:t}),t},S.d=(r,t)=>{for(var e in t)S.o(t,e)&&!S.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:t[e]})},S.o=(r,t)=>Object.prototype.hasOwnProperty.call(r,t),S.nmd=r=>(r.paths=[],r.children||(r.children=[]),r);var Mr=S(737),_r=S.n(Mr);function Lt(r){if(!zt(r))throw new Error("Parameter was not an error")}function zt(r){return!!r&&typeof r=="object"&&(t=r,Object.prototype.toString.call(t)==="[object Error]")||r instanceof Error;var t}class B extends Error{constructor(t,e){const n=[...arguments],{options:s,shortMessage:o}=(function(a){let l,c="";if(a.length===0)l={};else if(zt(a[0]))l={cause:a[0]},c=a.slice(1).join(" ")||"";else if(a[0]&&typeof a[0]=="object")l=Object.assign({},a[0]),c=a.slice(1).join(" ")||"";else{if(typeof a[0]!="string")throw new Error("Invalid arguments passed to Layerr");l={},c=c=a.join(" ")||""}return{options:l,shortMessage:c}})(n);let i=o;if(s.cause&&(i=`${i}: ${s.cause.message}`),super(i),this.message=i,s.name&&typeof s.name=="string"?this.name=s.name:this.name="Layerr",s.cause&&Object.defineProperty(this,"_cause",{value:s.cause}),Object.defineProperty(this,"_info",{value:{}}),s.info&&typeof s.info=="object"&&Object.assign(this._info,s.info),Error.captureStackTrace){const a=s.constructorOpt||this.constructor;Error.captureStackTrace(this,a)}}static cause(t){return Lt(t),t._cause&&zt(t._cause)?t._cause:null}static fullStack(t){Lt(t);const e=B.cause(t);return e?`${t.stack}
|
|
5
|
-
caused by: ${B.fullStack(e)}`:t.stack??""}static info(t){Lt(t);const e={},n=B.cause(t);return n&&Object.assign(e,B.info(n)),t._info&&Object.assign(e,t._info),e}toString(){let t=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(t=`${t}: ${this.message}`),t}}var Vr=S(47),St=S.n(Vr);const fe="__PATH_SEPARATOR_POSIX__",pe="__PATH_SEPARATOR_WINDOWS__";function C(r){try{const t=r.replace(/\//g,fe).replace(/\\\\/g,pe);return encodeURIComponent(t).split(pe).join("\\\\").split(fe).join("/")}catch(t){throw new B(t,"Failed encoding path")}}function ge(r){return r.startsWith("/")?r:"/"+r}function Nt(r){let t=r;return t[0]!=="/"&&(t="/"+t),/^.+\/$/.test(t)&&(t=t.substr(0,t.length-1)),t}function Br(r){let t=new(_r())(r).pathname;return t.length<=0&&(t="/"),Nt(t)}function $(){for(var r=arguments.length,t=new Array(r),e=0;e<r;e++)t[e]=arguments[e];return(function(){return(function(n){var s=[];if(n.length===0)return"";if(typeof n[0]!="string")throw new TypeError("Url must be a string. Received "+n[0]);if(n[0].match(/^[^/:]+:\/*$/)&&n.length>1){var o=n.shift();n[0]=o+n[0]}n[0].match(/^file:\/\/\//)?n[0]=n[0].replace(/^([^/:]+):\/*/,"$1:///"):n[0]=n[0].replace(/^([^/:]+):\/*/,"$1://");for(var i=0;i<n.length;i++){var a=n[i];if(typeof a!="string")throw new TypeError("Url must be a string. Received "+a);a!==""&&(i>0&&(a=a.replace(/^[\/]+/,"")),a=i<n.length-1?a.replace(/[\/]+$/,""):a.replace(/[\/]+$/,"/"),s.push(a))}var l=s.join("/"),c=(l=l.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return c.shift()+(c.length>0?"?":"")+c.join("&")})(typeof arguments[0]=="object"?arguments[0]:[].slice.call(arguments))})(t.reduce(((n,s,o)=>((o===0||s!=="/"||s==="/"&&n[n.length-1]!=="/")&&n.push(s),n)),[]))}var Wr=S(542),mt=S.n(Wr);function de(r,t){const e=r.url.replace("//",""),n=e.indexOf("/")==-1?"/":e.slice(e.indexOf("/")),s=r.method?r.method.toUpperCase():"GET",o=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&"auth",i=`00000000${t.nc}`.slice(-8),a=(function(h,d,g,p,m,b,y){const v=y||mt()(`${d}:${g}:${p}`);return h&&h.toLowerCase()==="md5-sess"?mt()(`${v}:${m}:${b}`):v})(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),l=mt()(`${s}:${n}`),c=o?mt()(`${a}:${t.nonce}:${i}:${t.cnonce}:${o}:${l}`):mt()(`${a}:${t.nonce}:${l}`),u={username:t.username,realm:t.realm,nonce:t.nonce,uri:n,qop:o,response:c,nc:i,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},f=[];for(const h in u)u[h]&&(h==="qop"||h==="nc"||h==="algorithm"?f.push(`${h}=${u[h]}`):f.push(`${h}="${u[h]}"`));return`Digest ${f.join(", ")}`}function qe(r){return(r.headers&&r.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()==="digest"}var qr=S(101),Ge=S.n(qr);function me(r){return Ge().decode(r)}function ye(r,t){var e;return`Basic ${e=`${r}:${t}`,Ge().encode(e)}`}const be=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:typeof window<"u"?window:globalThis,Gr=be.fetch.bind(be);let q=(function(r){return r.Auto="auto",r.Digest="digest",r.None="none",r.Password="password",r.Token="token",r})({}),rt=(function(r){return r.DataTypeNoLength="data-type-no-length",r.InvalidAuthType="invalid-auth-type",r.InvalidOutputFormat="invalid-output-format",r.LinkUnsupportedAuthType="link-unsupported-auth",r.InvalidUpdateRange="invalid-update-range",r.NotSupported="not-supported",r})({});function ze(r,t,e,n,s){switch(r.authType){case q.Auto:t&&e&&(r.headers.Authorization=ye(t,e));break;case q.Digest:r.digest=(function(i,a,l){return{username:i,password:a,ha1:l,nc:0,algorithm:"md5",hasDigestAuth:!1}})(t,e,s);break;case q.None:break;case q.Password:r.headers.Authorization=ye(t,e);break;case q.Token:r.headers.Authorization=`${(o=n).token_type} ${o.access_token}`;break;default:throw new B({info:{code:rt.InvalidAuthType}},`Invalid auth type: ${r.authType}`)}var o}S(345),S(800);const ve="@@HOTPATCHER",zr=()=>{};function Ut(r){return{original:r,methods:[r],final:!1}}class Hr{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=ve}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(t){this.configuration.getEmptyAction=t}control(t){let e=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!t||t.__type__!==ve)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(t.configuration.registry).forEach((n=>{this.configuration.registry.hasOwnProperty(n)?e&&(this.configuration.registry[n]=Object.assign({},t.configuration.registry[n])):this.configuration.registry[n]=Object.assign({},t.configuration.registry[n])})),t._configuration=this.configuration,this}execute(t){const e=this.get(t)||zr;for(var n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];return e(...s)}get(t){const e=this.configuration.registry[t];if(!e)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${t}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return(function(){for(var n=arguments.length,s=new Array(n),o=0;o<n;o++)s[o]=arguments[o];if(s.length===0)throw new Error("Failed creating sequence: No functions provided");return function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];let c=a;const u=this;for(;s.length>0;)c=[s.shift().apply(u,c)];return c[0]}})(...e.methods)}isPatched(t){return!!this.configuration.registry[t]}patch(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{chain:s=!1}=n;if(this.configuration.registry[t]&&this.configuration.registry[t].final)throw new Error(`Failed patching '${t}': Method marked as being final`);if(typeof e!="function")throw new Error(`Failed patching '${t}': Provided method is not a function`);if(s)this.configuration.registry[t]?this.configuration.registry[t].methods.push(e):this.configuration.registry[t]=Ut(e);else if(this.isPatched(t)){const{original:o}=this.configuration.registry[t];this.configuration.registry[t]=Object.assign(Ut(e),{original:o})}else this.configuration.registry[t]=Ut(e);return this}patchInline(t,e){this.isPatched(t)||this.patch(t,e);for(var n=arguments.length,s=new Array(n>2?n-2:0),o=2;o<n;o++)s[o-2]=arguments[o];return this.execute(t,...s)}plugin(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),s=1;s<e;s++)n[s-1]=arguments[s];return n.forEach((o=>{this.patch(t,o,{chain:!0})})),this}restore(t){if(!this.isPatched(t))throw new Error(`Failed restoring method: No method present for key: ${t}`);if(typeof this.configuration.registry[t].original!="function")throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${t}`);return this.configuration.registry[t].methods=[this.configuration.registry[t].original],this}setFinal(t){if(!this.configuration.registry.hasOwnProperty(t))throw new Error(`Failed marking '${t}' as final: No method found for key`);return this.configuration.registry[t].final=!0,this}}let kt=null;function Jr(){return kt||(kt=new Hr),kt}function Ct(r){return(function(t){if(typeof t!="object"||t===null||Object.prototype.toString.call(t)!="[object Object]")return!1;if(Object.getPrototypeOf(t)===null)return!0;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e})(r)?Object.assign({},r):Object.setPrototypeOf(Object.assign({},r),Object.getPrototypeOf(r))}function we(){for(var r=arguments.length,t=new Array(r),e=0;e<r;e++)t[e]=arguments[e];let n=null,s=[...t];for(;s.length>0;){const o=s.shift();n=n?He(n,o):Ct(o)}return n}function He(r,t){const e=Ct(r);return Object.keys(t).forEach((n=>{e.hasOwnProperty(n)?Array.isArray(t[n])?e[n]=Array.isArray(e[n])?[...e[n],...t[n]]:[...t[n]]:typeof t[n]=="object"&&t[n]?e[n]=typeof e[n]=="object"&&e[n]?He(e[n],t[n]):Ct(t[n]):e[n]=t[n]:e[n]=t[n]})),e}function Xr(r){const t={};for(const e of r.keys())t[e]=r.get(e);return t}function Ht(){for(var r=arguments.length,t=new Array(r),e=0;e<r;e++)t[e]=arguments[e];if(t.length===0)return{};const n={};return t.reduce(((s,o)=>(Object.keys(o).forEach((i=>{const a=i.toLowerCase();n.hasOwnProperty(a)?s[n[a]]=o[i]:(n[a]=i,s[i]=o[i])})),s)),{})}S(805);const Yr=typeof ArrayBuffer=="function",{toString:Zr}=Object.prototype;function Je(r){return Yr&&(r instanceof ArrayBuffer||Zr.call(r)==="[object ArrayBuffer]")}function Xe(r){return r!=null&&r.constructor!=null&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function re(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}}function Jt(r,t,e){return e?t?t(r):r:(r&&r.then||(r=Promise.resolve(r)),t?r.then(t):r)}const Ye=re((function(r){const t=r._digest;return delete r._digest,t.hasDigestAuth&&(r=we(r,{headers:{Authorization:de(r,t)}})),Jt($t(r),(function(e){let n=!1;return s=function(i){return n?i:e},(o=(function(){if(e.status==401)return t.hasDigestAuth=(function(i,a){if(!qe(i))return!1;const l=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const c=i.headers&&i.headers.get("www-authenticate")||"",u=l.exec(c);if(!u)break;a[u[1]]=u[2]||u[3]}return a.nc+=1,a.cnonce=(function(){let c="";for(let u=0;u<32;++u)c=`${c}${"abcdef0123456789"[Math.floor(16*Math.random())]}`;return c})(),!0})(e,t),(function(){if(t.hasDigestAuth)return Jt($t(r=we(r,{headers:{Authorization:de(r,t)}})),(function(i){return i.status==401?t.hasDigestAuth=!1:t.nc++,n=!0,i}))})();t.nc++})())&&o.then?o.then(s):s(o);var s,o}))})),Kr=re((function(r,t){return Jt($t(r),(function(e){return e.ok?(t.authType=q.Password,e):e.status==401&&qe(e)?(t.authType=q.Digest,ze(t,t.username,t.password,void 0,void 0),r._digest=t.digest,Ye(r)):e}))})),R=re((function(r,t){return t.authType===q.Auto?Kr(r,t):r._digest?Ye(r):$t(r)}));function D(r,t,e){const n=Ct(r);return n.headers=Ht(t.headers,n.headers||{},e.headers||{}),e.data!==void 0&&(n.data=e.data),e.signal&&(n.signal=e.signal),t.httpAgent&&(n.httpAgent=t.httpAgent),t.httpsAgent&&(n.httpsAgent=t.httpsAgent),t.digest&&(n._digest=t.digest),typeof t.withCredentials=="boolean"&&(n.withCredentials=t.withCredentials),n}function $t(r){const t=Jr();return t.patchInline("request",(e=>t.patchInline("fetch",Gr,e.url,(function(n){let s={};const o={method:n.method};if(n.headers&&(s=Ht(s,n.headers)),n.data!==void 0){const[i,a]=(function(l){if(typeof l=="string")return[l,{}];if(Xe(l))return[l,{}];if(Je(l))return[l,{}];if(l&&typeof l=="object")return[JSON.stringify(l),{"content-type":"application/json"}];throw new Error("Unable to convert request body: Unexpected body type: "+typeof l)})(n.data);o.body=i,s=Ht(s,a)}return n.signal&&(o.signal=n.signal),n.withCredentials&&(o.credentials="include"),o.headers=s,o})(e))),r)}var Qr=S(285);const It=r=>{if(typeof r!="string")throw new TypeError("invalid pattern");if(r.length>65536)throw new TypeError("pattern is too long")},tn={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},yt=r=>r.replace(/[[\]\\-]/g,"\\$&"),xe=r=>r.join(""),en=(r,t)=>{const e=t;if(r.charAt(e)!=="[")throw new Error("not in a brace expression");const n=[],s=[];let o=e+1,i=!1,a=!1,l=!1,c=!1,u=e,f="";t:for(;o<r.length;){const p=r.charAt(o);if(p!=="!"&&p!=="^"||o!==e+1){if(p==="]"&&i&&!l){u=o+1;break}if(i=!0,p!=="\\"||l){if(p==="["&&!l){for(const[m,[b,y,v]]of Object.entries(tn))if(r.startsWith(m,o)){if(f)return["$.",!1,r.length-e,!0];o+=m.length,v?s.push(b):n.push(b),a=a||y;continue t}}l=!1,f?(p>f?n.push(yt(f)+"-"+yt(p)):p===f&&n.push(yt(p)),f="",o++):r.startsWith("-]",o+1)?(n.push(yt(p+"-")),o+=2):r.startsWith("-",o+1)?(f=p,o+=2):(n.push(yt(p)),o++)}else l=!0,o++}else c=!0,o++}if(u<o)return["",!1,0,!1];if(!n.length&&!s.length)return["$.",!1,r.length-e,!0];if(s.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!c)return[(h=n[0].length===2?n[0].slice(-1):n[0],h.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,u-e,!1];var h;const d="["+(c?"^":"")+xe(n)+"]",g="["+(c?"":"^")+xe(s)+"]";return[n.length&&s.length?"("+d+"|"+g+")":n.length?d:g,a,u-e,!0]},xt=function(r){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t?r.replace(/\[([^\/\\])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},rn=new Set(["!","?","+","*","@"]),Pe=r=>rn.has(r),Mt="(?!\\.)",nn=new Set(["[","."]),sn=new Set(["..","."]),on=new Set("().*{}+?[]^$\\!"),ne="[^/]",Ne=ne+"*?",Ee=ne+"+?";class _{type;#r;#n;#o=!1;#t=[];#e;#i;#u;#a=!1;#s;#l;#h=!1;constructor(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.type=t,t&&(this.#n=!0),this.#e=e,this.#r=this.#e?this.#e.#r:this,this.#s=this.#r===this?n:this.#r.#s,this.#u=this.#r===this?[]:this.#r.#u,t!=="!"||this.#r.#a||this.#u.push(this),this.#i=this.#e?this.#e.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(const t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#l!==void 0?this.#l:this.type?this.#l=this.type+"("+this.#t.map((t=>String(t))).join("|")+")":this.#l=this.#t.map((t=>String(t))).join("")}#p(){if(this!==this.#r)throw new Error("should only call on root");if(this.#a)return this;let t;for(this.toString(),this.#a=!0;t=this.#u.pop();){if(t.type!=="!")continue;let e=t,n=e.#e;for(;n;){for(let s=e.#i+1;!n.type&&s<n.#t.length;s++)for(const o of t.#t){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(n.#t[s])}e=n,n=e.#e}}return this}push(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(const s of e)if(s!==""){if(typeof s!="string"&&!(s instanceof _&&s.#e===this))throw new Error("invalid part: "+s);this.#t.push(s)}}toJSON(){const t=this.type===null?this.#t.slice().map((e=>typeof e=="string"?e:e.toJSON())):[this.type,...this.#t.map((e=>e.toJSON()))];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#r||this.#r.#a&&this.#e?.type==="!")&&t.push({}),t}isStart(){if(this.#r===this)return!0;if(!this.#e?.isStart())return!1;if(this.#i===0)return!0;const t=this.#e;for(let e=0;e<this.#i;e++){const n=t.#t[e];if(!(n instanceof _&&n.type==="!"))return!1}return!0}isEnd(){if(this.#r===this||this.#e?.type==="!")return!0;if(!this.#e?.isEnd())return!1;if(!this.type)return this.#e?.isEnd();const t=this.#e?this.#e.#t.length:0;return this.#i===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const e=new _(this.type,t);for(const n of this.#t)e.copyIn(n);return e}static#c(t,e,n,s){let o=!1,i=!1,a=-1,l=!1;if(e.type===null){let d=n,g="";for(;d<t.length;){const p=t.charAt(d++);if(o||p==="\\")o=!o,g+=p;else if(i)d===a+1?p!=="^"&&p!=="!"||(l=!0):p!=="]"||d===a+2&&l||(i=!1),g+=p;else if(p!=="[")if(s.noext||!Pe(p)||t.charAt(d)!=="(")g+=p;else{e.push(g),g="";const m=new _(p,e);d=_.#c(t,m,d,s),e.push(m)}else i=!0,a=d,l=!1,g+=p}return e.push(g),d}let c=n+1,u=new _(null,e);const f=[];let h="";for(;c<t.length;){const d=t.charAt(c++);if(o||d==="\\")o=!o,h+=d;else if(i)c===a+1?d!=="^"&&d!=="!"||(l=!0):d!=="]"||c===a+2&&l||(i=!1),h+=d;else if(d!=="[")if(Pe(d)&&t.charAt(c)==="("){u.push(h),h="";const g=new _(d,u);u.push(g),c=_.#c(t,g,c,s)}else if(d!=="|"){if(d===")")return h===""&&e.#t.length===0&&(e.#h=!0),u.push(h),h="",e.push(...f,u),c;h+=d}else u.push(h),h="",f.push(u),u=new _(null,e);else i=!0,a=c,l=!1,h+=d}return e.type=null,e.#n=void 0,e.#t=[t.substring(n-1)],c}static fromGlob(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=new _(null,void 0,e);return _.#c(t,n,0,e),n}toMMPattern(){if(this!==this.#r)return this.#r.toMMPattern();const t=this.toString(),[e,n,s,o]=this.toRegExpSource();if(!(s||this.#n||this.#s.nocase&&!this.#s.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;const i=(this.#s.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${e}$`,i),{_src:e,_glob:t})}get options(){return this.#s}toRegExpSource(t){const e=t??!!this.#s.dot;if(this.#r===this&&this.#p(),!this.type){const l=this.isStart()&&this.isEnd(),c=this.#t.map((h=>{const[d,g,p,m]=typeof h=="string"?_.#g(h,this.#n,l):h.toRegExpSource(t);return this.#n=this.#n||p,this.#o=this.#o||m,d})).join("");let u="";if(this.isStart()&&typeof this.#t[0]=="string"&&(this.#t.length!==1||!sn.has(this.#t[0]))){const h=nn,d=e&&h.has(c.charAt(0))||c.startsWith("\\.")&&h.has(c.charAt(2))||c.startsWith("\\.\\.")&&h.has(c.charAt(4)),g=!e&&!t&&h.has(c.charAt(0));u=d?"(?!(?:^|/)\\.\\.?(?:$|/))":g?Mt:""}let f="";return this.isEnd()&&this.#r.#a&&this.#e?.type==="!"&&(f="(?:$|\\/)"),[u+c+f,xt(c),this.#n=!!this.#n,this.#o]}const n=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:";let o=this.#f(e);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){const l=this.toString();return this.#t=[l],this.type=null,this.#n=void 0,[l,xt(this.toString()),!1,!1]}let i=!n||t||e?"":this.#f(!0);i===o&&(i=""),i&&(o=`(?:${o})(?:${i})*?`);let a="";return a=this.type==="!"&&this.#h?(this.isStart()&&!e?Mt:"")+Ee:s+o+(this.type==="!"?"))"+(!this.isStart()||e||t?"":Mt)+Ne+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&i?")":this.type==="*"&&i?")?":`)${this.type}`),[a,xt(o),this.#n=!!this.#n,this.#o]}#f(t){return this.#t.map((e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");const[n,s,o,i]=e.toRegExpSource(t);return this.#o=this.#o||i,n})).filter((e=>!(this.isStart()&&this.isEnd()&&!e))).join("|")}static#g(t,e){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],s=!1,o="",i=!1;for(let a=0;a<t.length;a++){const l=t.charAt(a);if(s)s=!1,o+=(on.has(l)?"\\":"")+l;else if(l!=="\\"){if(l==="["){const[c,u,f,h]=en(t,a);if(f){o+=c,i=i||u,a+=f-1,e=e||h;continue}}l!=="*"?l!=="?"?o+=l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(o+=ne,e=!0):(o+=n&&t==="*"?Ee:Ne,e=!0)}else a===t.length-1?o+="\\\\":s=!0}return[o,xt(t),!!e,i]}}const k=function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return It(t),!(!e.nocomment&&t.charAt(0)==="#")&&new Ft(t,e).match(r)},an=/^\*+([^+@!?\*\[\(]*)$/,un=r=>t=>!t.startsWith(".")&&t.endsWith(r),ln=r=>t=>t.endsWith(r),cn=r=>(r=r.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(r)),hn=r=>(r=r.toLowerCase(),t=>t.toLowerCase().endsWith(r)),fn=/^\*+\.\*+$/,pn=r=>!r.startsWith(".")&&r.includes("."),gn=r=>r!=="."&&r!==".."&&r.includes("."),dn=/^\.\*+$/,mn=r=>r!=="."&&r!==".."&&r.startsWith("."),yn=/^\*+$/,bn=r=>r.length!==0&&!r.startsWith("."),vn=r=>r.length!==0&&r!=="."&&r!=="..",wn=/^\?+([^+@!?\*\[\(]*)?$/,xn=r=>{let[t,e=""]=r;const n=Ze([t]);return e?(e=e.toLowerCase(),s=>n(s)&&s.toLowerCase().endsWith(e)):n},Pn=r=>{let[t,e=""]=r;const n=Ke([t]);return e?(e=e.toLowerCase(),s=>n(s)&&s.toLowerCase().endsWith(e)):n},Nn=r=>{let[t,e=""]=r;const n=Ke([t]);return e?s=>n(s)&&s.endsWith(e):n},En=r=>{let[t,e=""]=r;const n=Ze([t]);return e?s=>n(s)&&s.endsWith(e):n},Ze=r=>{let[t]=r;const e=t.length;return n=>n.length===e&&!n.startsWith(".")},Ke=r=>{let[t]=r;const e=t.length;return n=>n.length===e&&n!=="."&&n!==".."},Qe=typeof et.process$1=="object"&&et.process$1?typeof et.process$1.env=="object"&&et.process$1.env&&et.process$1.env.__MINIMATCH_TESTING_PLATFORM__||et.process$1.platform:"posix";k.sep=Qe==="win32"?"\\":"/";const H=Symbol("globstar **");k.GLOBSTAR=H,k.filter=function(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e=>k(e,r,t)};const z=function(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.assign({},r,t)};k.defaults=r=>{if(!r||typeof r!="object"||!Object.keys(r).length)return k;const t=k;return Object.assign((function(e,n){return t(e,n,z(r,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}),{Minimatch:class extends t.Minimatch{constructor(e){super(e,z(r,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}))}static defaults(e){return t.defaults(z(r,e)).Minimatch}},AST:class extends t.AST{constructor(e,n){super(e,n,z(r,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}static fromGlob(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.AST.fromGlob(e,z(r,n))}},unescape:function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.unescape(e,z(r,n))},escape:function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.escape(e,z(r,n))},filter:function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.filter(e,z(r,n))},defaults:e=>t.defaults(z(r,e)),makeRe:function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.makeRe(e,z(r,n))},braceExpand:function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.braceExpand(e,z(r,n))},match:function(e,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t.match(e,n,z(r,s))},sep:t.sep,GLOBSTAR:H})};const tr=function(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return It(r),t.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:Qr(r)};k.braceExpand=tr,k.makeRe=function(r){return new Ft(r,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).makeRe()},k.match=function(r,t){const e=new Ft(t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{});return r=r.filter((n=>e.match(n))),e.options.nonull&&!r.length&&r.push(t),r};const Ae=/[?*]|[+@!]\(.*?\)|\[|\]/;class Ft{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};It(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||Qe,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if(typeof e!="string")return!0;return!1}debug(){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#")return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=function(){return console.error(...arguments)}),this.debug(this.pattern,this.globSet);const n=this.globSet.map((o=>this.slashSplit(o)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let s=this.globParts.map(((o,i,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){const l=!(o[0]!==""||o[1]!==""||o[2]!=="?"&&Ae.test(o[2])||Ae.test(o[3])),c=/^[a-z]:/i.test(o[0]);if(l)return[...o.slice(0,4),...o.slice(4).map((u=>this.parse(u)))];if(c)return[o[0],...o.slice(1).map((u=>this.parse(u)))]}return o.map((l=>this.parse(l)))}));if(this.debug(this.pattern,s),this.set=s.filter((o=>o.indexOf(!1)===-1)),this.isWindows)for(let o=0;o<this.set.length;o++){const i=this.set[o];i[0]===""&&i[1]===""&&this.globParts[o][2]==="?"&&typeof i[3]=="string"&&/^[a-z]:$/i.test(i[3])&&(i[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let n=0;n<t.length;n++)for(let s=0;s<t[n].length;s++)t[n][s]==="**"&&(t[n][s]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((e=>{let n=-1;for(;(n=e.indexOf("**",n+1))!==-1;){let s=n;for(;e[s+1]==="**";)s++;s!==n&&e.splice(n,s-n)}return e}))}levelOneOptimize(t){return t.map((e=>(e=e.reduce(((n,s)=>{const o=n[n.length-1];return s==="**"&&o==="**"?n:s===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(n.pop(),n):(n.push(s),n)}),[])).length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let s=1;s<t.length-1;s++){const o=t[s];s===1&&o===""&&t[0]===""||o!=="."&&o!==""||(e=!0,t.splice(s,1),s--)}t[0]!=="."||t.length!==2||t[1]!=="."&&t[1]!==""||(e=!0,t.pop())}let n=0;for(;(n=t.indexOf("..",n+1))!==-1;){const s=t[n-1];s&&s!=="."&&s!==".."&&s!=="**"&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let s=-1;for(;(s=n.indexOf("**",s+1))!==-1;){let i=s;for(;n[i+1]==="**";)i++;i>s&&n.splice(s+1,i-s);let a=n[s+1];const l=n[s+2],c=n[s+3];if(a!==".."||!l||l==="."||l===".."||!c||c==="."||c==="..")continue;e=!0,n.splice(s,1);const u=n.slice(0);u[s]="**",t.push(u),s--}if(!this.preserveMultipleSlashes){for(let i=1;i<n.length-1;i++){const a=n[i];i===1&&a===""&&n[0]===""||a!=="."&&a!==""||(e=!0,n.splice(i,1),i--)}n[0]!=="."||n.length!==2||n[1]!=="."&&n[1]!==""||(e=!0,n.pop())}let o=0;for(;(o=n.indexOf("..",o+1))!==-1;){const i=n[o-1];if(i&&i!=="."&&i!==".."&&i!=="**"){e=!0;const a=o===1&&n[o+1]==="**"?["."]:[];n.splice(o-1,2,...a),n.length===0&&n.push(""),o-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const s=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);if(s){t[e]=[],t[n]=s;break}}return t.filter((e=>e.length))}partsMatch(t,e){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],s=0,o=0,i=[],a="";for(;s<t.length&&o<e.length;)if(t[s]===e[o])i.push(a==="b"?e[o]:t[s]),s++,o++;else if(n&&t[s]==="**"&&e[o]===t[s+1])i.push(t[s]),s++;else if(n&&e[o]==="**"&&t[s]===e[o+1])i.push(e[o]),o++;else if(t[s]!=="*"||!e[o]||!this.options.dot&&e[o].startsWith(".")||e[o]==="**"){if(e[o]!=="*"||!t[s]||!this.options.dot&&t[s].startsWith(".")||t[s]==="**"||a==="a")return!1;a="b",i.push(e[o]),s++,o++}else{if(a==="b")return!1;a="a",i.push(t[s]),s++,o++}return t.length===e.length&&i}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let s=0;s<t.length&&t.charAt(s)==="!";s++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(t,e){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const s=this.options;if(this.isWindows){const p=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),m=!p&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),b=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),y=m?3:p?0:void 0,v=!b&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3])?3:b?0:void 0;if(typeof y=="number"&&typeof v=="number"){const[w,x]=[t[y],e[v]];w.toLowerCase()===x.toLowerCase()&&(e[v]=w,v>y?e=e.slice(v):y>v&&(t=t.slice(y)))}}const{optimizationLevel:o=1}=this.options;o>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var i=0,a=0,l=t.length,c=e.length;i<l&&a<c;i++,a++){this.debug("matchOne loop");var u=e[a],f=t[i];if(this.debug(e,u,f),u===!1)return!1;if(u===H){this.debug("GLOBSTAR",[e,u,f]);var h=i,d=a+1;if(d===c){for(this.debug("** at the end");i<l;i++)if(t[i]==="."||t[i]===".."||!s.dot&&t[i].charAt(0)===".")return!1;return!0}for(;h<l;){var g=t[h];if(this.debug(`
|
|
4
|
+
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}K.prototype.build=function(r){return this.options.preserveOrder?mr(r,this.options):(Array.isArray(r)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(r={[this.options.arrayNodeName]:r}),this.j2x(r,0,[]).val)};K.prototype.j2x=function(r,t,e){let n="",s="";const o=e.join(".");for(let i in r)if(Object.prototype.hasOwnProperty.call(r,i))if(typeof r[i]>"u")this.isAttribute(i)&&(s+="");else if(r[i]===null)this.isAttribute(i)||i===this.options.cdataPropName?s+="":i[0]==="?"?s+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:s+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(r[i]instanceof Date)s+=this.buildTextValNode(r[i],i,"",t);else if(typeof r[i]!="object"){const a=this.isAttribute(i);if(a&&!this.ignoreAttributesFn(a,o))n+=this.buildAttrPairStr(a,""+r[i]);else if(!a)if(i===this.options.textNodeName){let l=this.options.tagValueProcessor(i,""+r[i]);s+=this.replaceEntitiesValue(l)}else s+=this.buildTextValNode(r[i],i,"",t)}else if(Array.isArray(r[i])){const a=r[i].length;let l="",c="";for(let u=0;u<a;u++){const f=r[i][u];if(!(typeof f>"u"))if(f===null)i[0]==="?"?s+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:s+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(typeof f=="object")if(this.options.oneListGroup){const h=this.j2x(f,t+1,e.concat(i));l+=h.val,this.options.attributesGroupName&&f.hasOwnProperty(this.options.attributesGroupName)&&(c+=h.attrStr)}else l+=this.processTextOrObjNode(f,i,t,e);else if(this.options.oneListGroup){let h=this.options.tagValueProcessor(i,f);h=this.replaceEntitiesValue(h),l+=h}else l+=this.buildTextValNode(f,i,"",t)}this.options.oneListGroup&&(l=this.buildObjectNode(l,i,c,t)),s+=l}else if(this.options.attributesGroupName&&i===this.options.attributesGroupName){const a=Object.keys(r[i]),l=a.length;for(let c=0;c<l;c++)n+=this.buildAttrPairStr(a[c],""+r[i][a[c]])}else s+=this.processTextOrObjNode(r[i],i,t,e);return{attrStr:n,val:s}};K.prototype.buildAttrPairStr=function(r,t){return t=this.options.attributeValueProcessor(r,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&t==="true"?" "+r:" "+r+'="'+t+'"'};function xr(r,t,e,n){const s=this.j2x(r,e+1,n.concat(t));return r[this.options.textNodeName]!==void 0&&Object.keys(r).length===1?this.buildTextValNode(r[this.options.textNodeName],t,s.attrStr,e):this.buildObjectNode(s.val,t,s.attrStr,e)}K.prototype.buildObjectNode=function(r,t,e,n){if(r==="")return t[0]==="?"?this.indentate(n)+"<"+t+e+"?"+this.tagEndChar:this.indentate(n)+"<"+t+e+this.closeTag(t)+this.tagEndChar;{let s="</"+t+this.tagEndChar,o="";return t[0]==="?"&&(o="?",s=""),(e||e==="")&&r.indexOf("<")===-1?this.indentate(n)+"<"+t+e+o+">"+r+s:this.options.commentPropName!==!1&&t===this.options.commentPropName&&o.length===0?this.indentate(n)+`<!--${r}-->`+this.newLine:this.indentate(n)+"<"+t+e+o+this.tagEndChar+r+this.indentate(n)+s}};K.prototype.closeTag=function(r){let t="";return this.options.unpairedTags.indexOf(r)!==-1?this.options.suppressUnpairedNode||(t="/"):this.options.suppressEmptyNode?t="/":t=`></${r}`,t};K.prototype.buildTextValNode=function(r,t,e,n){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${r}]]>`+this.newLine;if(this.options.commentPropName!==!1&&t===this.options.commentPropName)return this.indentate(n)+`<!--${r}-->`+this.newLine;if(t[0]==="?")return this.indentate(n)+"<"+t+e+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(t,r);return s=this.replaceEntitiesValue(s),s===""?this.indentate(n)+"<"+t+e+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+e+">"+s+"</"+t+this.tagEndChar}};K.prototype.replaceEntitiesValue=function(r){if(r&&r.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const e=this.options.entities[t];r=r.replace(e.regex,e.val)}return r};function Pr(r){return this.options.indentBy.repeat(r)}function Nr(r){return r.startsWith(this.options.attributeNamePrefix)&&r!==this.options.textNodeName?r.substr(this.attrPrefixLen):!1}const Z=(r,{fileId:t,path:e,name:n})=>{if(e!==void 0)return I.urlJoin(r.webDavPath,e);if(t!==void 0){if(T.isPublicSpaceResource(r))throw new Error("public spaces need a path provided");return I.urlJoin("spaces",t,n||"")}return r.webDavPath},Er=(r,t)=>({copyFiles(e,{path:n,fileId:s},o,{path:i,parentFolderId:a,name:l},{overwrite:c,...u}={}){const f=Z(e,{fileId:s,path:n}),h=Z(o,{fileId:a,path:i,name:l});return r.copy(f,h,{overwrite:c||!1,...u})}}),Ar=(r,t,e)=>({async createFolder(n,{path:s,parentFolderId:o,folderName:i,fetchFolder:a=!0,...l}){const c=Z(n,{fileId:o,path:s,name:i});if(await r.mkcol(c),a)return t.getFileInfo(n,{path:s},l)}}),Tr=(r,{axiosClient:t})=>({async getFileContents(e,{fileId:n,path:s},{responseType:o="text",noCache:i=!0,headers:a,...l}={}){try{const c=Z(e,{fileId:n,path:s}),u=await t.get(r.getFileUrl(c),{responseType:o,headers:{...i&&{"Cache-Control":"no-cache"},...a||{}},...l});return{response:u,body:u.data,headers:{ETag:u.headers.etag,"OC-ETag":u.headers["oc-etag"],"OC-FileId":u.headers["oc-fileid"]}}}catch(c){const{message:u,response:f}=c;throw new ee(u,f,f.status)}}}),Or=(r,t)=>({async getFileInfo(e,n,s){return(await r.listFiles(e,n,{depth:0,...s})).resource}}),Sr=(r,t,e,{axiosClient:n,baseUrl:s})=>({async getFileUrl(o,i,{disposition:a="attachment",version:l=null,username:c="",...u}){if(a==="inline"){const h=await t.getFileContents(o,i,{responseType:"blob",...u});return URL.createObjectURL(h.body)}if(l){if(!c)throw new Error("username is required for URL signing");const h=r.getFileUrl(I.urlJoin("meta",i.fileId,"v",l));return await Ve.ocs(s,n).signUrl(h,c)}if(i.downloadURL)return i.downloadURL;const{downloadURL:f}=await e.getFileInfo(o,i,{davProperties:[T.DavProperty.DownloadURL]});return f},revokeUrl:o=>{o&&o.startsWith("blob:")&&URL.revokeObjectURL(o)}}),Cr=(r,t)=>({getPublicFileUrl(e,n){return r.getFileUrl(I.urlJoin("public-files",n))}}),$r=(r,t,e)=>({async listFiles(n,{path:s,fileId:o}={},{depth:i=1,davProperties:a,isTrash:l=!1,...c}={}){let u;if(T.isPublicSpaceResource(n)){u=await r.propfind(I.urlJoin(n.webDavPath,s),{depth:i,properties:a||T.DavProperties.PublicLink,...c}),u.forEach(g=>{g.filename=g.filename.split("/").slice(1).join("/")}),u.length===1&&(u[0].filename=I.urlJoin(n.id,s,{leadingSlash:!0})),u.forEach(g=>{g.filename=g.filename.split("/").slice(2).join("/")});const h=n.driveAlias.startsWith("ocm/")?"ocm":"public-link";if((!s||s==="/")&&i>0&&h==="ocm"&&u[0].props[T.DavProperty.PublicLinkItemType]==="file"&&(u=[{basename:n.fileId,type:"directory",filename:"",props:{}},...u]),!s){const[g,...p]=u;return{resource:T.buildPublicSpaceResource({...g,id:n.id,driveAlias:n.driveAlias,webDavPath:n.webDavPath,publicLinkType:h}),children:p.map(m=>T.buildResource(m,r.extraProps))}}const d=u.map(g=>T.buildResource(g,r.extraProps));return{resource:d[0],children:d.slice(1)}}const f=async()=>{const h=await t.getPathForFileId(o);return this.listFiles(n,{path:h},{depth:i,davProperties:a})};try{let h="";if(l?h=T.buildWebDavSpacesTrashPath(n.id):h=Z(n,{fileId:o,path:s}),u=await r.propfind(h,{depth:i,properties:a||T.DavProperties.Default,...c}),l)return{resource:T.buildResource(u[0],r.extraProps),children:u.slice(1).map(T.buildDeletedResource)};const d=u.map(p=>T.buildResource(p,r.extraProps)),g=o===n.id;return o&&!g&&d[0].fileId&&o!==d[0].fileId?f():{resource:d[0],children:d.slice(1)}}catch(h){if(h.statusCode===404&&o)return f();throw h}}}),Ir=(r,t)=>({moveFiles(e,{path:n,fileId:s},o,{path:i,parentFolderId:a,name:l},{overwrite:c,...u}={}){const f=Z(e,{fileId:s,path:n}),h=Z(o,{fileId:a,path:i,name:l});return r.move(f,h,{overwrite:c||!1,...u})}}),Fr=(r,t,e)=>({async putFileContents(n,{fileName:s,path:o,parentFolderId:i,content:a="",previousEntityTag:l="",overwrite:c,onUploadProgress:u=null,...f}){const h=Z(n,{fileId:i,name:s,path:o}),{result:d}=await r.put(h,a,{previousEntityTag:l,overwrite:c,onUploadProgress:u,...f});return t.getFileInfo(n,{fileId:d.headers.get("Oc-Fileid"),path:o})}}),jr=(r,t)=>({deleteFile(e,{path:n,...s}){return r.delete(I.urlJoin(e.webDavPath,n),s)}}),Rr=(r,t)=>({restoreFile(e,{id:n},{path:s},{overwrite:o,...i}={}){if(T.isPublicSpaceResource(e))return;const a=I.urlJoin(e.webDavPath,s);return r.move(I.urlJoin(e.webDavTrashPath,n),a,{overwrite:o,...i})}}),Dr=(r,t)=>({restoreFileVersion(e,{parentFolderId:n,name:s,path:o},i,a={}){const l=Z(e,{path:o,fileId:n,name:s}),c=I.urlJoin("meta",n,"v",i,{leadingSlash:!0}),u=I.urlJoin("files",l,{leadingSlash:!0});return r.copy(c,u,a)}}),Lr=(r,t)=>({clearTrashBin(e,{id:n,...s}={}){let o=T.buildWebDavSpacesTrashPath(e.id);return n&&(o=I.urlJoin(o,n)),r.delete(o,s)}}),Ur=(r,t)=>({async search(e,{davProperties:n=T.DavProperties.Default,searchLimit:s,...o}){const i="/spaces/",{range:a,results:l}=await r.report(i,{pattern:e,limit:s,properties:n,...o});return{resources:l.map(c=>({...T.buildResource(c,r.extraProps),highlights:c.props[T.DavProperty.Highlights]||""})),totalResults:a?parseInt(a?.split("/")[1]):null}}}),kr=(r,t)=>({async getPathForFileId(e,n={}){return(await r.propfind(I.urlJoin("meta",e,{leadingSlash:!0}),{properties:[T.DavProperty.MetaPathForUser],...n}))[0].props[T.DavProperty.MetaPathForUser]}});var Mr={2:r=>{function t(s,o,i){s instanceof RegExp&&(s=e(s,i)),o instanceof RegExp&&(o=e(o,i));var a=n(s,o,i);return a&&{start:a[0],end:a[1],pre:i.slice(0,a[0]),body:i.slice(a[0]+s.length,a[1]),post:i.slice(a[1]+o.length)}}function e(s,o){var i=o.match(s);return i?i[0]:null}function n(s,o,i){var a,l,c,u,f,h=i.indexOf(s),d=i.indexOf(o,h+1),g=h;if(h>=0&&d>0){for(a=[],c=i.length;g>=0&&!f;)g==h?(a.push(g),h=i.indexOf(s,g+1)):a.length==1?f=[a.pop(),d]:((l=a.pop())<c&&(c=l,u=d),d=i.indexOf(o,g+1)),g=h<d&&h>=0?h:d;a.length&&(f=[c,u])}return f}r.exports=t,t.range=n},47:(r,t,e)=>{var n=e(410),s=function(c){return typeof c=="string"};function o(c,u){for(var f=[],h=0;h<c.length;h++){var d=c[h];d&&d!=="."&&(d===".."?f.length&&f[f.length-1]!==".."?f.pop():u&&f.push(".."):f.push(d))}return f}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a={};function l(c){return i.exec(c).slice(1)}a.resolve=function(){for(var c="",u=!1,f=arguments.length-1;f>=-1&&!u;f--){var h=f>=0?arguments[f]:et.process$1.cwd();if(!s(h))throw new TypeError("Arguments to path.resolve must be strings");h&&(c=h+"/"+c,u=h.charAt(0)==="/")}return(u?"/":"")+(c=o(c.split("/"),!u).join("/"))||"."},a.normalize=function(c){var u=a.isAbsolute(c),f=c.substr(-1)==="/";return(c=o(c.split("/"),!u).join("/"))||u||(c="."),c&&f&&(c+="/"),(u?"/":"")+c},a.isAbsolute=function(c){return c.charAt(0)==="/"},a.join=function(){for(var c="",u=0;u<arguments.length;u++){var f=arguments[u];if(!s(f))throw new TypeError("Arguments to path.join must be strings");f&&(c+=c?"/"+f:f)}return a.normalize(c)},a.relative=function(c,u){function f(y){for(var v=0;v<y.length&&y[v]==="";v++);for(var w=y.length-1;w>=0&&y[w]==="";w--);return v>w?[]:y.slice(v,w+1)}c=a.resolve(c).substr(1),u=a.resolve(u).substr(1);for(var h=f(c.split("/")),d=f(u.split("/")),g=Math.min(h.length,d.length),p=g,m=0;m<g;m++)if(h[m]!==d[m]){p=m;break}var b=[];for(m=p;m<h.length;m++)b.push("..");return(b=b.concat(d.slice(p))).join("/")},a._makeLong=function(c){return c},a.dirname=function(c){var u=l(c),f=u[0],h=u[1];return f||h?(h&&(h=h.substr(0,h.length-1)),f+h):"."},a.basename=function(c,u){var f=l(c)[2];return u&&f.substr(-1*u.length)===u&&(f=f.substr(0,f.length-u.length)),f},a.extname=function(c){return l(c)[3]},a.format=function(c){if(!n.isObject(c))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof c);var u=c.root||"";if(!s(u))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof c.root);return(c.dir?c.dir+a.sep:"")+(c.base||"")},a.parse=function(c){if(!s(c))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof c);var u=l(c);if(!u||u.length!==4)throw new TypeError("Invalid path '"+c+"'");return u[1]=u[1]||"",u[2]=u[2]||"",u[3]=u[3]||"",{root:u[0],dir:u[0]+u[1].slice(0,u[1].length-1),base:u[2],ext:u[3],name:u[2].slice(0,u[2].length-u[3].length)}},a.sep="/",a.delimiter=":",r.exports=a},101:function(r,t,e){var n;r=e.nmd(r),(function(){var s=(r&&r.exports,typeof Tt.global=="object"&&Tt.global);s.global!==s&&s.window;var o=function(u){this.message=u};(o.prototype=new Error).name="InvalidCharacterError";var i=function(u){throw new o(u)},a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=/[\t\n\f\r ]/g,c={encode:function(u){u=String(u),/[^\0-\xFF]/.test(u)&&i("The string to be encoded contains characters outside of the Latin1 range.");for(var f,h,d,g,p=u.length%3,m="",b=-1,y=u.length-p;++b<y;)f=u.charCodeAt(b)<<16,h=u.charCodeAt(++b)<<8,d=u.charCodeAt(++b),m+=a.charAt((g=f+h+d)>>18&63)+a.charAt(g>>12&63)+a.charAt(g>>6&63)+a.charAt(63&g);return p==2?(f=u.charCodeAt(b)<<8,h=u.charCodeAt(++b),m+=a.charAt((g=f+h)>>10)+a.charAt(g>>4&63)+a.charAt(g<<2&63)+"="):p==1&&(g=u.charCodeAt(b),m+=a.charAt(g>>2)+a.charAt(g<<4&63)+"=="),m},decode:function(u){var f=(u=String(u).replace(l,"")).length;f%4==0&&(f=(u=u.replace(/==?$/,"")).length),(f%4==1||/[^+a-zA-Z0-9/]/.test(u))&&i("Invalid character: the string to be decoded is not correctly encoded.");for(var h,d,g=0,p="",m=-1;++m<f;)d=a.indexOf(u.charAt(m)),h=g%4?64*h+d:d,g++%4&&(p+=String.fromCharCode(255&h>>(-2*g&6)));return p},version:"1.0.0"};(n=(function(){return c}).call(t,e,t,r))===void 0||(r.exports=n)})()},135:r=>{function t(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}r.exports=function(e){return e!=null&&(t(e)||(function(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&t(n.slice(0,0))})(e)||!!e._isBuffer)}},172:(r,t)=>{t.d=function(e){if(!e)return 0;for(var n=(e=e.toString()).length,s=e.length;s--;){var o=e.charCodeAt(s);56320<=o&&o<=57343&&s--,127<o&&o<=2047?n++:2047<o&&o<=65535&&(n+=2)}return n}},285:(r,t,e)=>{var n=e(2);r.exports=function(b){return b?(b.substr(0,2)==="{}"&&(b="\\{\\}"+b.substr(2)),m((function(y){return y.split("\\\\").join(s).split("\\{").join(o).split("\\}").join(i).split("\\,").join(a).split("\\.").join(l)})(b),!0).map(u)):[]};var s="\0SLASH"+Math.random()+"\0",o="\0OPEN"+Math.random()+"\0",i="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(b){return parseInt(b,10)==b?parseInt(b,10):b.charCodeAt(0)}function u(b){return b.split(s).join("\\").split(o).join("{").split(i).join("}").split(a).join(",").split(l).join(".")}function f(b){if(!b)return[""];var y=[],v=n("{","}",b);if(!v)return b.split(",");var w=v.pre,x=v.body,N=v.post,E=w.split(",");E[E.length-1]+="{"+x+"}";var O=f(N);return N.length&&(E[E.length-1]+=O.shift(),E.push.apply(E,O)),y.push.apply(y,E),y}function h(b){return"{"+b+"}"}function d(b){return/^-?0\d/.test(b)}function g(b,y){return b<=y}function p(b,y){return b>=y}function m(b,y){var v=[],w=n("{","}",b);if(!w)return[b];var x=w.pre,N=w.post.length?m(w.post,!1):[""];if(/\$$/.test(w.pre))for(var E=0;E<N.length;E++){var O=x+"{"+w.body+"}"+N[E];v.push(O)}else{var A,j,nt=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(w.body),st=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(w.body),P=nt||st,ft=w.body.indexOf(",")>=0;if(!P&&!ft)return w.post.match(/,(?!,).*\}/)?m(b=w.pre+"{"+w.body+i+w.post):[b];if(P)A=w.body.split(/\.\./);else if((A=f(w.body)).length===1&&(A=m(A[0],!1).map(h)).length===1)return N.map((function(gr){return w.pre+A[0]+gr}));if(P){var pt=c(A[0]),gt=c(A[1]),G=Math.max(A[0].length,A[1].length),J=A.length==3?Math.abs(c(A[2])):1,dt=g;gt<pt&&(J*=-1,dt=p);var At=A.some(d);j=[];for(var X=pt;dt(X,gt);X+=J){var Q;if(st)(Q=String.fromCharCode(X))==="\\"&&(Q="");else if(Q=String(X),At){var ue=G-Q.length;if(ue>0){var le=new Array(ue+1).join("0");Q=X<0?"-"+le+Q.slice(1):le+Q}}j.push(Q)}}else{j=[];for(var ot=0;ot<A.length;ot++)j.push.apply(j,m(A[ot],!1))}for(ot=0;ot<j.length;ot++)for(E=0;E<N.length;E++)O=x+j[ot]+N[E],(!y||P||O)&&v.push(O)}return v}},298:r=>{var t,e;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={rotl:function(n,s){return n<<s|n>>>32-s},rotr:function(n,s){return n<<32-s|n>>>s},endian:function(n){if(n.constructor==Number)return 16711935&e.rotl(n,8)|4278255360&e.rotl(n,24);for(var s=0;s<n.length;s++)n[s]=e.endian(n[s]);return n},randomBytes:function(n){for(var s=[];n>0;n--)s.push(Math.floor(256*Math.random()));return s},bytesToWords:function(n){for(var s=[],o=0,i=0;o<n.length;o++,i+=8)s[i>>>5]|=n[o]<<24-i%32;return s},wordsToBytes:function(n){for(var s=[],o=0;o<32*n.length;o+=8)s.push(n[o>>>5]>>>24-o%32&255);return s},bytesToHex:function(n){for(var s=[],o=0;o<n.length;o++)s.push((n[o]>>>4).toString(16)),s.push((15&n[o]).toString(16));return s.join("")},hexToBytes:function(n){for(var s=[],o=0;o<n.length;o+=2)s.push(parseInt(n.substr(o,2),16));return s},bytesToBase64:function(n){for(var s=[],o=0;o<n.length;o+=3)for(var i=n[o]<<16|n[o+1]<<8|n[o+2],a=0;a<4;a++)8*o+6*a<=8*n.length?s.push(t.charAt(i>>>6*(3-a)&63)):s.push("=");return s.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/gi,"");for(var s=[],o=0,i=0;o<n.length;i=++o%4)i!=0&&s.push((t.indexOf(n.charAt(o-1))&Math.pow(2,-2*i+8)-1)<<2*i|t.indexOf(n.charAt(o))>>>6-2*i);return s}},r.exports=e},345:()=>{},388:()=>{},410:()=>{},526:r=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var n=[],s=0;s<e.length;s++)n.push(255&e.charCodeAt(s));return n},bytesToString:function(e){for(var n=[],s=0;s<e.length;s++)n.push(String.fromCharCode(e[s]));return n.join("")}}};r.exports=t},542:(r,t,e)=>{(function(){var n=e(298),s=e(526).utf8,o=e(135),i=e(526).bin,a=function(l,c){l.constructor==String?l=c&&c.encoding==="binary"?i.stringToBytes(l):s.stringToBytes(l):o(l)?l=Array.prototype.slice.call(l,0):Array.isArray(l)||l.constructor===Uint8Array||(l=l.toString());for(var u=n.bytesToWords(l),f=8*l.length,h=1732584193,d=-271733879,g=-1732584194,p=271733878,m=0;m<u.length;m++)u[m]=16711935&(u[m]<<8|u[m]>>>24)|4278255360&(u[m]<<24|u[m]>>>8);u[f>>>5]|=128<<f%32,u[14+(f+64>>>9<<4)]=f;var b=a._ff,y=a._gg,v=a._hh,w=a._ii;for(m=0;m<u.length;m+=16){var x=h,N=d,E=g,O=p;h=b(h,d,g,p,u[m+0],7,-680876936),p=b(p,h,d,g,u[m+1],12,-389564586),g=b(g,p,h,d,u[m+2],17,606105819),d=b(d,g,p,h,u[m+3],22,-1044525330),h=b(h,d,g,p,u[m+4],7,-176418897),p=b(p,h,d,g,u[m+5],12,1200080426),g=b(g,p,h,d,u[m+6],17,-1473231341),d=b(d,g,p,h,u[m+7],22,-45705983),h=b(h,d,g,p,u[m+8],7,1770035416),p=b(p,h,d,g,u[m+9],12,-1958414417),g=b(g,p,h,d,u[m+10],17,-42063),d=b(d,g,p,h,u[m+11],22,-1990404162),h=b(h,d,g,p,u[m+12],7,1804603682),p=b(p,h,d,g,u[m+13],12,-40341101),g=b(g,p,h,d,u[m+14],17,-1502002290),h=y(h,d=b(d,g,p,h,u[m+15],22,1236535329),g,p,u[m+1],5,-165796510),p=y(p,h,d,g,u[m+6],9,-1069501632),g=y(g,p,h,d,u[m+11],14,643717713),d=y(d,g,p,h,u[m+0],20,-373897302),h=y(h,d,g,p,u[m+5],5,-701558691),p=y(p,h,d,g,u[m+10],9,38016083),g=y(g,p,h,d,u[m+15],14,-660478335),d=y(d,g,p,h,u[m+4],20,-405537848),h=y(h,d,g,p,u[m+9],5,568446438),p=y(p,h,d,g,u[m+14],9,-1019803690),g=y(g,p,h,d,u[m+3],14,-187363961),d=y(d,g,p,h,u[m+8],20,1163531501),h=y(h,d,g,p,u[m+13],5,-1444681467),p=y(p,h,d,g,u[m+2],9,-51403784),g=y(g,p,h,d,u[m+7],14,1735328473),h=v(h,d=y(d,g,p,h,u[m+12],20,-1926607734),g,p,u[m+5],4,-378558),p=v(p,h,d,g,u[m+8],11,-2022574463),g=v(g,p,h,d,u[m+11],16,1839030562),d=v(d,g,p,h,u[m+14],23,-35309556),h=v(h,d,g,p,u[m+1],4,-1530992060),p=v(p,h,d,g,u[m+4],11,1272893353),g=v(g,p,h,d,u[m+7],16,-155497632),d=v(d,g,p,h,u[m+10],23,-1094730640),h=v(h,d,g,p,u[m+13],4,681279174),p=v(p,h,d,g,u[m+0],11,-358537222),g=v(g,p,h,d,u[m+3],16,-722521979),d=v(d,g,p,h,u[m+6],23,76029189),h=v(h,d,g,p,u[m+9],4,-640364487),p=v(p,h,d,g,u[m+12],11,-421815835),g=v(g,p,h,d,u[m+15],16,530742520),h=w(h,d=v(d,g,p,h,u[m+2],23,-995338651),g,p,u[m+0],6,-198630844),p=w(p,h,d,g,u[m+7],10,1126891415),g=w(g,p,h,d,u[m+14],15,-1416354905),d=w(d,g,p,h,u[m+5],21,-57434055),h=w(h,d,g,p,u[m+12],6,1700485571),p=w(p,h,d,g,u[m+3],10,-1894986606),g=w(g,p,h,d,u[m+10],15,-1051523),d=w(d,g,p,h,u[m+1],21,-2054922799),h=w(h,d,g,p,u[m+8],6,1873313359),p=w(p,h,d,g,u[m+15],10,-30611744),g=w(g,p,h,d,u[m+6],15,-1560198380),d=w(d,g,p,h,u[m+13],21,1309151649),h=w(h,d,g,p,u[m+4],6,-145523070),p=w(p,h,d,g,u[m+11],10,-1120210379),g=w(g,p,h,d,u[m+2],15,718787259),d=w(d,g,p,h,u[m+9],21,-343485551),h=h+x>>>0,d=d+N>>>0,g=g+E>>>0,p=p+O>>>0}return n.endian([h,d,g,p])};a._ff=function(l,c,u,f,h,d,g){var p=l+(c&u|~c&f)+(h>>>0)+g;return(p<<d|p>>>32-d)+c},a._gg=function(l,c,u,f,h,d,g){var p=l+(c&f|u&~f)+(h>>>0)+g;return(p<<d|p>>>32-d)+c},a._hh=function(l,c,u,f,h,d,g){var p=l+(c^u^f)+(h>>>0)+g;return(p<<d|p>>>32-d)+c},a._ii=function(l,c,u,f,h,d,g){var p=l+(u^(c|~f))+(h>>>0)+g;return(p<<d|p>>>32-d)+c},a._blocksize=16,a._digestsize=16,r.exports=function(l,c){if(l==null)throw new Error("Illegal argument "+l);var u=n.wordsToBytes(a(l,c));return c&&c.asBytes?u:c&&c.asString?i.bytesToString(u):n.bytesToHex(u)}})()},647:(r,t)=>{var e=Object.prototype.hasOwnProperty;function n(o){try{return decodeURIComponent(o.replace(/\+/g," "))}catch{return null}}function s(o){try{return encodeURIComponent(o)}catch{return null}}t.stringify=function(o,i){i=i||"";var a,l,c=[];for(l in typeof i!="string"&&(i="?"),o)if(e.call(o,l)){if((a=o[l])||a!=null&&!isNaN(a)||(a=""),l=s(l),a=s(a),l===null||a===null)continue;c.push(l+"="+a)}return c.length?i+c.join("&"):""},t.parse=function(o){for(var i,a=/([^=?#&]+)=?([^&]*)/g,l={};i=a.exec(o);){var c=n(i[1]),u=n(i[2]);c===null||u===null||c in l||(l[c]=u)}return l}},670:r=>{r.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0}},737:(r,t,e)=>{var n=e(670),s=e(647),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,l=/:\d+$/,c=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,u=/^[a-zA-Z]:/;function f(y){return(y||"").toString().replace(o,"")}var h=[["#","hash"],["?","query"],function(y,v){return p(v.protocol)?y.replace(/\\/g,"/"):y},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],d={hash:1,query:1};function g(y){var v,w=(typeof window<"u"?window:typeof Tt.global<"u"?Tt.global:typeof self<"u"?self:{}).location||{},x={},N=typeof(y=y||w);if(y.protocol==="blob:")x=new b(unescape(y.pathname),{});else if(N==="string")for(v in x=new b(y,{}),d)delete x[v];else if(N==="object"){for(v in y)v in d||(x[v]=y[v]);x.slashes===void 0&&(x.slashes=a.test(y.href))}return x}function p(y){return y==="file:"||y==="ftp:"||y==="http:"||y==="https:"||y==="ws:"||y==="wss:"}function m(y,v){y=(y=f(y)).replace(i,""),v=v||{};var w,x=c.exec(y),N=x[1]?x[1].toLowerCase():"",E=!!x[2],O=!!x[3],A=0;return E?O?(w=x[2]+x[3]+x[4],A=x[2].length+x[3].length):(w=x[2]+x[4],A=x[2].length):O?(w=x[3]+x[4],A=x[3].length):w=x[4],N==="file:"?A>=2&&(w=w.slice(2)):p(N)?w=x[4]:N?E&&(w=w.slice(2)):A>=2&&p(v.protocol)&&(w=x[4]),{protocol:N,slashes:E||p(N),slashesCount:A,rest:w}}function b(y,v,w){if(y=(y=f(y)).replace(i,""),!(this instanceof b))return new b(y,v,w);var x,N,E,O,A,j,nt=h.slice(),st=typeof v,P=this,ft=0;for(st!=="object"&&st!=="string"&&(w=v,v=null),w&&typeof w!="function"&&(w=s.parse),x=!(N=m(y||"",v=g(v))).protocol&&!N.slashes,P.slashes=N.slashes||x&&v.slashes,P.protocol=N.protocol||v.protocol||"",y=N.rest,(N.protocol==="file:"&&(N.slashesCount!==2||u.test(y))||!N.slashes&&(N.protocol||N.slashesCount<2||!p(P.protocol)))&&(nt[3]=[/(.*)/,"pathname"]);ft<nt.length;ft++)typeof(O=nt[ft])!="function"?(E=O[0],j=O[1],E!=E?P[j]=y:typeof E=="string"?~(A=E==="@"?y.lastIndexOf(E):y.indexOf(E))&&(typeof O[2]=="number"?(P[j]=y.slice(0,A),y=y.slice(A+O[2])):(P[j]=y.slice(A),y=y.slice(0,A))):(A=E.exec(y))&&(P[j]=A[1],y=y.slice(0,A.index)),P[j]=P[j]||x&&O[3]&&v[j]||"",O[4]&&(P[j]=P[j].toLowerCase())):y=O(y,P);w&&(P.query=w(P.query)),x&&v.slashes&&P.pathname.charAt(0)!=="/"&&(P.pathname!==""||v.pathname!=="")&&(P.pathname=(function(pt,gt){if(pt==="")return gt;for(var G=(gt||"/").split("/").slice(0,-1).concat(pt.split("/")),J=G.length,dt=G[J-1],At=!1,X=0;J--;)G[J]==="."?G.splice(J,1):G[J]===".."?(G.splice(J,1),X++):X&&(J===0&&(At=!0),G.splice(J,1),X--);return At&&G.unshift(""),dt!=="."&&dt!==".."||G.push(""),G.join("/")})(P.pathname,v.pathname)),P.pathname.charAt(0)!=="/"&&p(P.protocol)&&(P.pathname="/"+P.pathname),n(P.port,P.protocol)||(P.host=P.hostname,P.port=""),P.username=P.password="",P.auth&&(~(A=P.auth.indexOf(":"))?(P.username=P.auth.slice(0,A),P.username=encodeURIComponent(decodeURIComponent(P.username)),P.password=P.auth.slice(A+1),P.password=encodeURIComponent(decodeURIComponent(P.password))):P.username=encodeURIComponent(decodeURIComponent(P.auth)),P.auth=P.password?P.username+":"+P.password:P.username),P.origin=P.protocol!=="file:"&&p(P.protocol)&&P.host?P.protocol+"//"+P.host:"null",P.href=P.toString()}b.prototype={set:function(y,v,w){var x=this;switch(y){case"query":typeof v=="string"&&v.length&&(v=(w||s.parse)(v)),x[y]=v;break;case"port":x[y]=v,n(v,x.protocol)?v&&(x.host=x.hostname+":"+v):(x.host=x.hostname,x[y]="");break;case"hostname":x[y]=v,x.port&&(v+=":"+x.port),x.host=v;break;case"host":x[y]=v,l.test(v)?(v=v.split(":"),x.port=v.pop(),x.hostname=v.join(":")):(x.hostname=v,x.port="");break;case"protocol":x.protocol=v.toLowerCase(),x.slashes=!w;break;case"pathname":case"hash":if(v){var N=y==="pathname"?"/":"#";x[y]=v.charAt(0)!==N?N+v:v}else x[y]=v;break;case"username":case"password":x[y]=encodeURIComponent(v);break;case"auth":var E=v.indexOf(":");~E?(x.username=v.slice(0,E),x.username=encodeURIComponent(decodeURIComponent(x.username)),x.password=v.slice(E+1),x.password=encodeURIComponent(decodeURIComponent(x.password))):x.username=encodeURIComponent(decodeURIComponent(v))}for(var O=0;O<h.length;O++){var A=h[O];A[4]&&(x[A[1]]=x[A[1]].toLowerCase())}return x.auth=x.password?x.username+":"+x.password:x.username,x.origin=x.protocol!=="file:"&&p(x.protocol)&&x.host?x.protocol+"//"+x.host:"null",x.href=x.toString(),x},toString:function(y){y&&typeof y=="function"||(y=s.stringify);var v,w=this,x=w.host,N=w.protocol;N&&N.charAt(N.length-1)!==":"&&(N+=":");var E=N+(w.protocol&&w.slashes||p(w.protocol)?"//":"");return w.username?(E+=w.username,w.password&&(E+=":"+w.password),E+="@"):w.password?(E+=":"+w.password,E+="@"):w.protocol!=="file:"&&p(w.protocol)&&!x&&w.pathname!=="/"&&(E+="@"),(x[x.length-1]===":"||l.test(w.hostname)&&!w.port)&&(x+=":"),E+=x+w.pathname,(v=typeof w.query=="object"?y(w.query):w.query)&&(E+=v.charAt(0)!=="?"?"?"+v:v),w.hash&&(E+=w.hash),E}},b.extractProtocol=m,b.location=g,b.trimLeft=f,b.qs=s,r.exports=b},800:()=>{},805:()=>{},829:r=>{function t(c){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},t(c)}function e(c){var u=typeof Map=="function"?new Map:void 0;return e=function(f){if(f===null||(h=f,Function.toString.call(h).indexOf("[native code]")===-1))return f;var h;if(typeof f!="function")throw new TypeError("Super expression must either be null or a function");if(u!==void 0){if(u.has(f))return u.get(f);u.set(f,d)}function d(){return n(f,arguments,o(this).constructor)}return d.prototype=Object.create(f.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),s(d,f)},e(c)}function n(c,u,f){return n=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch{return!1}})()?Reflect.construct:function(h,d,g){var p=[null];p.push.apply(p,d);var m=new(Function.bind.apply(h,p));return g&&s(m,g.prototype),m},n.apply(null,arguments)}function s(c,u){return s=Object.setPrototypeOf||function(f,h){return f.__proto__=h,f},s(c,u)}function o(c){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},o(c)}var i=(function(c){function u(f){var h;return(function(d,g){if(!(d instanceof g))throw new TypeError("Cannot call a class as a function")})(this,u),(h=(function(d,g){return!g||t(g)!=="object"&&typeof g!="function"?(function(p){if(p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p})(d):g})(this,o(u).call(this,f))).name="ObjectPrototypeMutationError",h}return(function(f,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(h&&h.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),h&&s(f,h)})(u,c),u})(e(Error));function a(c,u){for(var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},h=u.split("."),d=h.length,g=function(b){var y=h[b];if(!c)return{v:void 0};if(y==="+"){if(Array.isArray(c))return{v:c.map((function(w,x){var N=h.slice(b+1);return N.length>0?a(w,N.join("."),f):f(c,x,h,b)}))};var v=h.slice(0,b).join(".");throw new Error("Object at wildcard (".concat(v,") is not an array"))}c=f(c,y,h,b)},p=0;p<d;p++){var m=g(p);if(t(m)==="object")return m.v}return c}function l(c,u){return c.length===u+1}r.exports={set:function(c,u,f){if(t(c)!="object"||c===null||u===void 0)return c;if(typeof u=="number")return c[u]=f,c[u];try{return a(c,u,(function(h,d,g,p){if(h===Reflect.getPrototypeOf({}))throw new i("Attempting to mutate Object.prototype");if(!h[d]){var m=Number.isInteger(Number(g[p+1])),b=g[p+1]==="+";h[d]=m||b?[]:{}}return l(g,p)&&(h[d]=f),h[d]}))}catch(h){if(h instanceof i)throw h;return c}},get:function(c,u){if(t(c)!="object"||c===null||u===void 0)return c;if(typeof u=="number")return c[u];try{return a(c,u,(function(f,h){return f[h]}))}catch{return c}},has:function(c,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(t(c)!="object"||c===null||u===void 0)return!1;if(typeof u=="number")return u in c;try{var h=!1;return a(c,u,(function(d,g,p,m){if(!l(p,m))return d&&d[g];h=f.own?d.hasOwnProperty(g):g in d})),h}catch{return!1}},hasOwn:function(c,u,f){return this.has(c,u,f||{own:!0})},isIn:function(c,u,f){var h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(t(c)!="object"||c===null||u===void 0)return!1;try{var d=!1,g=!1;return a(c,u,(function(p,m,b,y){return d=d||p===f||!!p&&p[m]===f,g=l(b,y)&&t(p)==="object"&&m in p,p&&p[m]})),h.validPath?d&&g:d}catch{return!1}},ObjectPrototypeMutationError:i}}},he={};function S(r){var t=he[r];if(t!==void 0)return t.exports;var e=he[r]={id:r,loaded:!1,exports:{}};return Mr[r].call(e.exports,e,e.exports,S),e.loaded=!0,e.exports}S.n=r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return S.d(t,{a:t}),t},S.d=(r,t)=>{for(var e in t)S.o(t,e)&&!S.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:t[e]})},S.o=(r,t)=>Object.prototype.hasOwnProperty.call(r,t),S.nmd=r=>(r.paths=[],r.children||(r.children=[]),r);var _r=S(737),Vr=S.n(_r);function Lt(r){if(!Ht(r))throw new Error("Parameter was not an error")}function Ht(r){return!!r&&typeof r=="object"&&(t=r,Object.prototype.toString.call(t)==="[object Error]")||r instanceof Error;var t}class B extends Error{constructor(t,e){const n=[...arguments],{options:s,shortMessage:o}=(function(a){let l,c="";if(a.length===0)l={};else if(Ht(a[0]))l={cause:a[0]},c=a.slice(1).join(" ")||"";else if(a[0]&&typeof a[0]=="object")l=Object.assign({},a[0]),c=a.slice(1).join(" ")||"";else{if(typeof a[0]!="string")throw new Error("Invalid arguments passed to Layerr");l={},c=c=a.join(" ")||""}return{options:l,shortMessage:c}})(n);let i=o;if(s.cause&&(i=`${i}: ${s.cause.message}`),super(i),this.message=i,s.name&&typeof s.name=="string"?this.name=s.name:this.name="Layerr",s.cause&&Object.defineProperty(this,"_cause",{value:s.cause}),Object.defineProperty(this,"_info",{value:{}}),s.info&&typeof s.info=="object"&&Object.assign(this._info,s.info),Error.captureStackTrace){const a=s.constructorOpt||this.constructor;Error.captureStackTrace(this,a)}}static cause(t){return Lt(t),t._cause&&Ht(t._cause)?t._cause:null}static fullStack(t){Lt(t);const e=B.cause(t);return e?`${t.stack}
|
|
5
|
+
caused by: ${B.fullStack(e)}`:t.stack??""}static info(t){Lt(t);const e={},n=B.cause(t);return n&&Object.assign(e,B.info(n)),t._info&&Object.assign(e,t._info),e}toString(){let t=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(t=`${t}: ${this.message}`),t}}var Br=S(47),St=S.n(Br);const fe="__PATH_SEPARATOR_POSIX__",pe="__PATH_SEPARATOR_WINDOWS__";function C(r){try{const t=r.replace(/\//g,fe).replace(/\\\\/g,pe);return encodeURIComponent(t).split(pe).join("\\\\").split(fe).join("/")}catch(t){throw new B(t,"Failed encoding path")}}function ge(r){return r.startsWith("/")?r:"/"+r}function Nt(r){let t=r;return t[0]!=="/"&&(t="/"+t),/^.+\/$/.test(t)&&(t=t.substr(0,t.length-1)),t}function Wr(r){let t=new(Vr())(r).pathname;return t.length<=0&&(t="/"),Nt(t)}function $(){for(var r=arguments.length,t=new Array(r),e=0;e<r;e++)t[e]=arguments[e];return(function(){return(function(n){var s=[];if(n.length===0)return"";if(typeof n[0]!="string")throw new TypeError("Url must be a string. Received "+n[0]);if(n[0].match(/^[^/:]+:\/*$/)&&n.length>1){var o=n.shift();n[0]=o+n[0]}n[0].match(/^file:\/\/\//)?n[0]=n[0].replace(/^([^/:]+):\/*/,"$1:///"):n[0]=n[0].replace(/^([^/:]+):\/*/,"$1://");for(var i=0;i<n.length;i++){var a=n[i];if(typeof a!="string")throw new TypeError("Url must be a string. Received "+a);a!==""&&(i>0&&(a=a.replace(/^[\/]+/,"")),a=i<n.length-1?a.replace(/[\/]+$/,""):a.replace(/[\/]+$/,"/"),s.push(a))}var l=s.join("/"),c=(l=l.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return c.shift()+(c.length>0?"?":"")+c.join("&")})(typeof arguments[0]=="object"?arguments[0]:[].slice.call(arguments))})(t.reduce(((n,s,o)=>((o===0||s!=="/"||s==="/"&&n[n.length-1]!=="/")&&n.push(s),n)),[]))}var qr=S(542),mt=S.n(qr);function de(r,t){const e=r.url.replace("//",""),n=e.indexOf("/")==-1?"/":e.slice(e.indexOf("/")),s=r.method?r.method.toUpperCase():"GET",o=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&"auth",i=`00000000${t.nc}`.slice(-8),a=(function(h,d,g,p,m,b,y){const v=y||mt()(`${d}:${g}:${p}`);return h&&h.toLowerCase()==="md5-sess"?mt()(`${v}:${m}:${b}`):v})(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),l=mt()(`${s}:${n}`),c=o?mt()(`${a}:${t.nonce}:${i}:${t.cnonce}:${o}:${l}`):mt()(`${a}:${t.nonce}:${l}`),u={username:t.username,realm:t.realm,nonce:t.nonce,uri:n,qop:o,response:c,nc:i,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},f=[];for(const h in u)u[h]&&(h==="qop"||h==="nc"||h==="algorithm"?f.push(`${h}=${u[h]}`):f.push(`${h}="${u[h]}"`));return`Digest ${f.join(", ")}`}function qe(r){return(r.headers&&r.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()==="digest"}var Gr=S(101),Ge=S.n(Gr);function me(r){return Ge().decode(r)}function ye(r,t){var e;return`Basic ${e=`${r}:${t}`,Ge().encode(e)}`}const be=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:typeof window<"u"?window:globalThis,zr=be.fetch.bind(be);let q=(function(r){return r.Auto="auto",r.Digest="digest",r.None="none",r.Password="password",r.Token="token",r})({}),rt=(function(r){return r.DataTypeNoLength="data-type-no-length",r.InvalidAuthType="invalid-auth-type",r.InvalidOutputFormat="invalid-output-format",r.LinkUnsupportedAuthType="link-unsupported-auth",r.InvalidUpdateRange="invalid-update-range",r.NotSupported="not-supported",r})({});function ze(r,t,e,n,s){switch(r.authType){case q.Auto:t&&e&&(r.headers.Authorization=ye(t,e));break;case q.Digest:r.digest=(function(i,a,l){return{username:i,password:a,ha1:l,nc:0,algorithm:"md5",hasDigestAuth:!1}})(t,e,s);break;case q.None:break;case q.Password:r.headers.Authorization=ye(t,e);break;case q.Token:r.headers.Authorization=`${(o=n).token_type} ${o.access_token}`;break;default:throw new B({info:{code:rt.InvalidAuthType}},`Invalid auth type: ${r.authType}`)}var o}S(345),S(800);const ve="@@HOTPATCHER",Hr=()=>{};function Ut(r){return{original:r,methods:[r],final:!1}}class Jr{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=ve}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(t){this.configuration.getEmptyAction=t}control(t){let e=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!t||t.__type__!==ve)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(t.configuration.registry).forEach((n=>{this.configuration.registry.hasOwnProperty(n)?e&&(this.configuration.registry[n]=Object.assign({},t.configuration.registry[n])):this.configuration.registry[n]=Object.assign({},t.configuration.registry[n])})),t._configuration=this.configuration,this}execute(t){const e=this.get(t)||Hr;for(var n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];return e(...s)}get(t){const e=this.configuration.registry[t];if(!e)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${t}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return(function(){for(var n=arguments.length,s=new Array(n),o=0;o<n;o++)s[o]=arguments[o];if(s.length===0)throw new Error("Failed creating sequence: No functions provided");return function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];let c=a;const u=this;for(;s.length>0;)c=[s.shift().apply(u,c)];return c[0]}})(...e.methods)}isPatched(t){return!!this.configuration.registry[t]}patch(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{chain:s=!1}=n;if(this.configuration.registry[t]&&this.configuration.registry[t].final)throw new Error(`Failed patching '${t}': Method marked as being final`);if(typeof e!="function")throw new Error(`Failed patching '${t}': Provided method is not a function`);if(s)this.configuration.registry[t]?this.configuration.registry[t].methods.push(e):this.configuration.registry[t]=Ut(e);else if(this.isPatched(t)){const{original:o}=this.configuration.registry[t];this.configuration.registry[t]=Object.assign(Ut(e),{original:o})}else this.configuration.registry[t]=Ut(e);return this}patchInline(t,e){this.isPatched(t)||this.patch(t,e);for(var n=arguments.length,s=new Array(n>2?n-2:0),o=2;o<n;o++)s[o-2]=arguments[o];return this.execute(t,...s)}plugin(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),s=1;s<e;s++)n[s-1]=arguments[s];return n.forEach((o=>{this.patch(t,o,{chain:!0})})),this}restore(t){if(!this.isPatched(t))throw new Error(`Failed restoring method: No method present for key: ${t}`);if(typeof this.configuration.registry[t].original!="function")throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${t}`);return this.configuration.registry[t].methods=[this.configuration.registry[t].original],this}setFinal(t){if(!this.configuration.registry.hasOwnProperty(t))throw new Error(`Failed marking '${t}' as final: No method found for key`);return this.configuration.registry[t].final=!0,this}}let kt=null;function Xr(){return kt||(kt=new Jr),kt}function Ct(r){return(function(t){if(typeof t!="object"||t===null||Object.prototype.toString.call(t)!="[object Object]")return!1;if(Object.getPrototypeOf(t)===null)return!0;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e})(r)?Object.assign({},r):Object.setPrototypeOf(Object.assign({},r),Object.getPrototypeOf(r))}function we(){for(var r=arguments.length,t=new Array(r),e=0;e<r;e++)t[e]=arguments[e];let n=null,s=[...t];for(;s.length>0;){const o=s.shift();n=n?He(n,o):Ct(o)}return n}function He(r,t){const e=Ct(r);return Object.keys(t).forEach((n=>{e.hasOwnProperty(n)?Array.isArray(t[n])?e[n]=Array.isArray(e[n])?[...e[n],...t[n]]:[...t[n]]:typeof t[n]=="object"&&t[n]?e[n]=typeof e[n]=="object"&&e[n]?He(e[n],t[n]):Ct(t[n]):e[n]=t[n]:e[n]=t[n]})),e}function Yr(r){const t={};for(const e of r.keys())t[e]=r.get(e);return t}function Jt(){for(var r=arguments.length,t=new Array(r),e=0;e<r;e++)t[e]=arguments[e];if(t.length===0)return{};const n={};return t.reduce(((s,o)=>(Object.keys(o).forEach((i=>{const a=i.toLowerCase();n.hasOwnProperty(a)?s[n[a]]=o[i]:(n[a]=i,s[i]=o[i])})),s)),{})}S(805);const Zr=typeof ArrayBuffer=="function",{toString:Kr}=Object.prototype;function Je(r){return Zr&&(r instanceof ArrayBuffer||Kr.call(r)==="[object ArrayBuffer]")}function Xe(r){return r!=null&&r.constructor!=null&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function re(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}}function Xt(r,t,e){return e?t?t(r):r:(r&&r.then||(r=Promise.resolve(r)),t?r.then(t):r)}const Ye=re((function(r){const t=r._digest;return delete r._digest,t.hasDigestAuth&&(r=we(r,{headers:{Authorization:de(r,t)}})),Xt($t(r),(function(e){let n=!1;return s=function(i){return n?i:e},(o=(function(){if(e.status==401)return t.hasDigestAuth=(function(i,a){if(!qe(i))return!1;const l=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const c=i.headers&&i.headers.get("www-authenticate")||"",u=l.exec(c);if(!u)break;a[u[1]]=u[2]||u[3]}return a.nc+=1,a.cnonce=(function(){let c="";for(let u=0;u<32;++u)c=`${c}${"abcdef0123456789"[Math.floor(16*Math.random())]}`;return c})(),!0})(e,t),(function(){if(t.hasDigestAuth)return Xt($t(r=we(r,{headers:{Authorization:de(r,t)}})),(function(i){return i.status==401?t.hasDigestAuth=!1:t.nc++,n=!0,i}))})();t.nc++})())&&o.then?o.then(s):s(o);var s,o}))})),Qr=re((function(r,t){return Xt($t(r),(function(e){return e.ok?(t.authType=q.Password,e):e.status==401&&qe(e)?(t.authType=q.Digest,ze(t,t.username,t.password,void 0,void 0),r._digest=t.digest,Ye(r)):e}))})),R=re((function(r,t){return t.authType===q.Auto?Qr(r,t):r._digest?Ye(r):$t(r)}));function D(r,t,e){const n=Ct(r);return n.headers=Jt(t.headers,n.headers||{},e.headers||{}),e.data!==void 0&&(n.data=e.data),e.signal&&(n.signal=e.signal),t.httpAgent&&(n.httpAgent=t.httpAgent),t.httpsAgent&&(n.httpsAgent=t.httpsAgent),t.digest&&(n._digest=t.digest),typeof t.withCredentials=="boolean"&&(n.withCredentials=t.withCredentials),n}function $t(r){const t=Xr();return t.patchInline("request",(e=>t.patchInline("fetch",zr,e.url,(function(n){let s={};const o={method:n.method};if(n.headers&&(s=Jt(s,n.headers)),n.data!==void 0){const[i,a]=(function(l){if(typeof l=="string")return[l,{}];if(Xe(l))return[l,{}];if(Je(l))return[l,{}];if(l&&typeof l=="object")return[JSON.stringify(l),{"content-type":"application/json"}];throw new Error("Unable to convert request body: Unexpected body type: "+typeof l)})(n.data);o.body=i,s=Jt(s,a)}return n.signal&&(o.signal=n.signal),n.withCredentials&&(o.credentials="include"),o.headers=s,o})(e))),r)}var tn=S(285);const It=r=>{if(typeof r!="string")throw new TypeError("invalid pattern");if(r.length>65536)throw new TypeError("pattern is too long")},en={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},yt=r=>r.replace(/[[\]\\-]/g,"\\$&"),xe=r=>r.join(""),rn=(r,t)=>{const e=t;if(r.charAt(e)!=="[")throw new Error("not in a brace expression");const n=[],s=[];let o=e+1,i=!1,a=!1,l=!1,c=!1,u=e,f="";t:for(;o<r.length;){const p=r.charAt(o);if(p!=="!"&&p!=="^"||o!==e+1){if(p==="]"&&i&&!l){u=o+1;break}if(i=!0,p!=="\\"||l){if(p==="["&&!l){for(const[m,[b,y,v]]of Object.entries(en))if(r.startsWith(m,o)){if(f)return["$.",!1,r.length-e,!0];o+=m.length,v?s.push(b):n.push(b),a=a||y;continue t}}l=!1,f?(p>f?n.push(yt(f)+"-"+yt(p)):p===f&&n.push(yt(p)),f="",o++):r.startsWith("-]",o+1)?(n.push(yt(p+"-")),o+=2):r.startsWith("-",o+1)?(f=p,o+=2):(n.push(yt(p)),o++)}else l=!0,o++}else c=!0,o++}if(u<o)return["",!1,0,!1];if(!n.length&&!s.length)return["$.",!1,r.length-e,!0];if(s.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!c)return[(h=n[0].length===2?n[0].slice(-1):n[0],h.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,u-e,!1];var h;const d="["+(c?"^":"")+xe(n)+"]",g="["+(c?"":"^")+xe(s)+"]";return[n.length&&s.length?"("+d+"|"+g+")":n.length?d:g,a,u-e,!0]},xt=function(r){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t?r.replace(/\[([^\/\\])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},nn=new Set(["!","?","+","*","@"]),Pe=r=>nn.has(r),Mt="(?!\\.)",sn=new Set(["[","."]),on=new Set(["..","."]),an=new Set("().*{}+?[]^$\\!"),ne="[^/]",Ne=ne+"*?",Ee=ne+"+?";class _{type;#r;#n;#o=!1;#t=[];#e;#i;#u;#a=!1;#s;#l;#h=!1;constructor(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.type=t,t&&(this.#n=!0),this.#e=e,this.#r=this.#e?this.#e.#r:this,this.#s=this.#r===this?n:this.#r.#s,this.#u=this.#r===this?[]:this.#r.#u,t!=="!"||this.#r.#a||this.#u.push(this),this.#i=this.#e?this.#e.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(const t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#l!==void 0?this.#l:this.type?this.#l=this.type+"("+this.#t.map((t=>String(t))).join("|")+")":this.#l=this.#t.map((t=>String(t))).join("")}#p(){if(this!==this.#r)throw new Error("should only call on root");if(this.#a)return this;let t;for(this.toString(),this.#a=!0;t=this.#u.pop();){if(t.type!=="!")continue;let e=t,n=e.#e;for(;n;){for(let s=e.#i+1;!n.type&&s<n.#t.length;s++)for(const o of t.#t){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(n.#t[s])}e=n,n=e.#e}}return this}push(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(const s of e)if(s!==""){if(typeof s!="string"&&!(s instanceof _&&s.#e===this))throw new Error("invalid part: "+s);this.#t.push(s)}}toJSON(){const t=this.type===null?this.#t.slice().map((e=>typeof e=="string"?e:e.toJSON())):[this.type,...this.#t.map((e=>e.toJSON()))];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#r||this.#r.#a&&this.#e?.type==="!")&&t.push({}),t}isStart(){if(this.#r===this)return!0;if(!this.#e?.isStart())return!1;if(this.#i===0)return!0;const t=this.#e;for(let e=0;e<this.#i;e++){const n=t.#t[e];if(!(n instanceof _&&n.type==="!"))return!1}return!0}isEnd(){if(this.#r===this||this.#e?.type==="!")return!0;if(!this.#e?.isEnd())return!1;if(!this.type)return this.#e?.isEnd();const t=this.#e?this.#e.#t.length:0;return this.#i===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const e=new _(this.type,t);for(const n of this.#t)e.copyIn(n);return e}static#c(t,e,n,s){let o=!1,i=!1,a=-1,l=!1;if(e.type===null){let d=n,g="";for(;d<t.length;){const p=t.charAt(d++);if(o||p==="\\")o=!o,g+=p;else if(i)d===a+1?p!=="^"&&p!=="!"||(l=!0):p!=="]"||d===a+2&&l||(i=!1),g+=p;else if(p!=="[")if(s.noext||!Pe(p)||t.charAt(d)!=="(")g+=p;else{e.push(g),g="";const m=new _(p,e);d=_.#c(t,m,d,s),e.push(m)}else i=!0,a=d,l=!1,g+=p}return e.push(g),d}let c=n+1,u=new _(null,e);const f=[];let h="";for(;c<t.length;){const d=t.charAt(c++);if(o||d==="\\")o=!o,h+=d;else if(i)c===a+1?d!=="^"&&d!=="!"||(l=!0):d!=="]"||c===a+2&&l||(i=!1),h+=d;else if(d!=="[")if(Pe(d)&&t.charAt(c)==="("){u.push(h),h="";const g=new _(d,u);u.push(g),c=_.#c(t,g,c,s)}else if(d!=="|"){if(d===")")return h===""&&e.#t.length===0&&(e.#h=!0),u.push(h),h="",e.push(...f,u),c;h+=d}else u.push(h),h="",f.push(u),u=new _(null,e);else i=!0,a=c,l=!1,h+=d}return e.type=null,e.#n=void 0,e.#t=[t.substring(n-1)],c}static fromGlob(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=new _(null,void 0,e);return _.#c(t,n,0,e),n}toMMPattern(){if(this!==this.#r)return this.#r.toMMPattern();const t=this.toString(),[e,n,s,o]=this.toRegExpSource();if(!(s||this.#n||this.#s.nocase&&!this.#s.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;const i=(this.#s.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${e}$`,i),{_src:e,_glob:t})}get options(){return this.#s}toRegExpSource(t){const e=t??!!this.#s.dot;if(this.#r===this&&this.#p(),!this.type){const l=this.isStart()&&this.isEnd(),c=this.#t.map((h=>{const[d,g,p,m]=typeof h=="string"?_.#g(h,this.#n,l):h.toRegExpSource(t);return this.#n=this.#n||p,this.#o=this.#o||m,d})).join("");let u="";if(this.isStart()&&typeof this.#t[0]=="string"&&(this.#t.length!==1||!on.has(this.#t[0]))){const h=sn,d=e&&h.has(c.charAt(0))||c.startsWith("\\.")&&h.has(c.charAt(2))||c.startsWith("\\.\\.")&&h.has(c.charAt(4)),g=!e&&!t&&h.has(c.charAt(0));u=d?"(?!(?:^|/)\\.\\.?(?:$|/))":g?Mt:""}let f="";return this.isEnd()&&this.#r.#a&&this.#e?.type==="!"&&(f="(?:$|\\/)"),[u+c+f,xt(c),this.#n=!!this.#n,this.#o]}const n=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:";let o=this.#f(e);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){const l=this.toString();return this.#t=[l],this.type=null,this.#n=void 0,[l,xt(this.toString()),!1,!1]}let i=!n||t||e?"":this.#f(!0);i===o&&(i=""),i&&(o=`(?:${o})(?:${i})*?`);let a="";return a=this.type==="!"&&this.#h?(this.isStart()&&!e?Mt:"")+Ee:s+o+(this.type==="!"?"))"+(!this.isStart()||e||t?"":Mt)+Ne+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&i?")":this.type==="*"&&i?")?":`)${this.type}`),[a,xt(o),this.#n=!!this.#n,this.#o]}#f(t){return this.#t.map((e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");const[n,s,o,i]=e.toRegExpSource(t);return this.#o=this.#o||i,n})).filter((e=>!(this.isStart()&&this.isEnd()&&!e))).join("|")}static#g(t,e){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],s=!1,o="",i=!1;for(let a=0;a<t.length;a++){const l=t.charAt(a);if(s)s=!1,o+=(an.has(l)?"\\":"")+l;else if(l!=="\\"){if(l==="["){const[c,u,f,h]=rn(t,a);if(f){o+=c,i=i||u,a+=f-1,e=e||h;continue}}l!=="*"?l!=="?"?o+=l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(o+=ne,e=!0):(o+=n&&t==="*"?Ee:Ne,e=!0)}else a===t.length-1?o+="\\\\":s=!0}return[o,xt(t),!!e,i]}}const k=function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return It(t),!(!e.nocomment&&t.charAt(0)==="#")&&new Ft(t,e).match(r)},un=/^\*+([^+@!?\*\[\(]*)$/,ln=r=>t=>!t.startsWith(".")&&t.endsWith(r),cn=r=>t=>t.endsWith(r),hn=r=>(r=r.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(r)),fn=r=>(r=r.toLowerCase(),t=>t.toLowerCase().endsWith(r)),pn=/^\*+\.\*+$/,gn=r=>!r.startsWith(".")&&r.includes("."),dn=r=>r!=="."&&r!==".."&&r.includes("."),mn=/^\.\*+$/,yn=r=>r!=="."&&r!==".."&&r.startsWith("."),bn=/^\*+$/,vn=r=>r.length!==0&&!r.startsWith("."),wn=r=>r.length!==0&&r!=="."&&r!=="..",xn=/^\?+([^+@!?\*\[\(]*)?$/,Pn=r=>{let[t,e=""]=r;const n=Ze([t]);return e?(e=e.toLowerCase(),s=>n(s)&&s.toLowerCase().endsWith(e)):n},Nn=r=>{let[t,e=""]=r;const n=Ke([t]);return e?(e=e.toLowerCase(),s=>n(s)&&s.toLowerCase().endsWith(e)):n},En=r=>{let[t,e=""]=r;const n=Ke([t]);return e?s=>n(s)&&s.endsWith(e):n},An=r=>{let[t,e=""]=r;const n=Ze([t]);return e?s=>n(s)&&s.endsWith(e):n},Ze=r=>{let[t]=r;const e=t.length;return n=>n.length===e&&!n.startsWith(".")},Ke=r=>{let[t]=r;const e=t.length;return n=>n.length===e&&n!=="."&&n!==".."},Qe=typeof et.process$1=="object"&&et.process$1?typeof et.process$1.env=="object"&&et.process$1.env&&et.process$1.env.__MINIMATCH_TESTING_PLATFORM__||et.process$1.platform:"posix";k.sep=Qe==="win32"?"\\":"/";const H=Symbol("globstar **");k.GLOBSTAR=H,k.filter=function(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e=>k(e,r,t)};const z=function(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.assign({},r,t)};k.defaults=r=>{if(!r||typeof r!="object"||!Object.keys(r).length)return k;const t=k;return Object.assign((function(e,n){return t(e,n,z(r,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}),{Minimatch:class extends t.Minimatch{constructor(e){super(e,z(r,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}))}static defaults(e){return t.defaults(z(r,e)).Minimatch}},AST:class extends t.AST{constructor(e,n){super(e,n,z(r,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}static fromGlob(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.AST.fromGlob(e,z(r,n))}},unescape:function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.unescape(e,z(r,n))},escape:function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.escape(e,z(r,n))},filter:function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.filter(e,z(r,n))},defaults:e=>t.defaults(z(r,e)),makeRe:function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.makeRe(e,z(r,n))},braceExpand:function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.braceExpand(e,z(r,n))},match:function(e,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t.match(e,n,z(r,s))},sep:t.sep,GLOBSTAR:H})};const tr=function(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return It(r),t.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:tn(r)};k.braceExpand=tr,k.makeRe=function(r){return new Ft(r,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).makeRe()},k.match=function(r,t){const e=new Ft(t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{});return r=r.filter((n=>e.match(n))),e.options.nonull&&!r.length&&r.push(t),r};const Ae=/[?*]|[+@!]\(.*?\)|\[|\]/;class Ft{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};It(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||Qe,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if(typeof e!="string")return!0;return!1}debug(){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#")return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=function(){return console.error(...arguments)}),this.debug(this.pattern,this.globSet);const n=this.globSet.map((o=>this.slashSplit(o)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let s=this.globParts.map(((o,i,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){const l=!(o[0]!==""||o[1]!==""||o[2]!=="?"&&Ae.test(o[2])||Ae.test(o[3])),c=/^[a-z]:/i.test(o[0]);if(l)return[...o.slice(0,4),...o.slice(4).map((u=>this.parse(u)))];if(c)return[o[0],...o.slice(1).map((u=>this.parse(u)))]}return o.map((l=>this.parse(l)))}));if(this.debug(this.pattern,s),this.set=s.filter((o=>o.indexOf(!1)===-1)),this.isWindows)for(let o=0;o<this.set.length;o++){const i=this.set[o];i[0]===""&&i[1]===""&&this.globParts[o][2]==="?"&&typeof i[3]=="string"&&/^[a-z]:$/i.test(i[3])&&(i[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let n=0;n<t.length;n++)for(let s=0;s<t[n].length;s++)t[n][s]==="**"&&(t[n][s]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((e=>{let n=-1;for(;(n=e.indexOf("**",n+1))!==-1;){let s=n;for(;e[s+1]==="**";)s++;s!==n&&e.splice(n,s-n)}return e}))}levelOneOptimize(t){return t.map((e=>(e=e.reduce(((n,s)=>{const o=n[n.length-1];return s==="**"&&o==="**"?n:s===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(n.pop(),n):(n.push(s),n)}),[])).length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let s=1;s<t.length-1;s++){const o=t[s];s===1&&o===""&&t[0]===""||o!=="."&&o!==""||(e=!0,t.splice(s,1),s--)}t[0]!=="."||t.length!==2||t[1]!=="."&&t[1]!==""||(e=!0,t.pop())}let n=0;for(;(n=t.indexOf("..",n+1))!==-1;){const s=t[n-1];s&&s!=="."&&s!==".."&&s!=="**"&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let s=-1;for(;(s=n.indexOf("**",s+1))!==-1;){let i=s;for(;n[i+1]==="**";)i++;i>s&&n.splice(s+1,i-s);let a=n[s+1];const l=n[s+2],c=n[s+3];if(a!==".."||!l||l==="."||l===".."||!c||c==="."||c==="..")continue;e=!0,n.splice(s,1);const u=n.slice(0);u[s]="**",t.push(u),s--}if(!this.preserveMultipleSlashes){for(let i=1;i<n.length-1;i++){const a=n[i];i===1&&a===""&&n[0]===""||a!=="."&&a!==""||(e=!0,n.splice(i,1),i--)}n[0]!=="."||n.length!==2||n[1]!=="."&&n[1]!==""||(e=!0,n.pop())}let o=0;for(;(o=n.indexOf("..",o+1))!==-1;){const i=n[o-1];if(i&&i!=="."&&i!==".."&&i!=="**"){e=!0;const a=o===1&&n[o+1]==="**"?["."]:[];n.splice(o-1,2,...a),n.length===0&&n.push(""),o-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const s=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);if(s){t[e]=[],t[n]=s;break}}return t.filter((e=>e.length))}partsMatch(t,e){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],s=0,o=0,i=[],a="";for(;s<t.length&&o<e.length;)if(t[s]===e[o])i.push(a==="b"?e[o]:t[s]),s++,o++;else if(n&&t[s]==="**"&&e[o]===t[s+1])i.push(t[s]),s++;else if(n&&e[o]==="**"&&t[s]===e[o+1])i.push(e[o]),o++;else if(t[s]!=="*"||!e[o]||!this.options.dot&&e[o].startsWith(".")||e[o]==="**"){if(e[o]!=="*"||!t[s]||!this.options.dot&&t[s].startsWith(".")||t[s]==="**"||a==="a")return!1;a="b",i.push(e[o]),s++,o++}else{if(a==="b")return!1;a="a",i.push(t[s]),s++,o++}return t.length===e.length&&i}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let s=0;s<t.length&&t.charAt(s)==="!";s++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(t,e){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const s=this.options;if(this.isWindows){const p=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),m=!p&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),b=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),y=m?3:p?0:void 0,v=!b&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3])?3:b?0:void 0;if(typeof y=="number"&&typeof v=="number"){const[w,x]=[t[y],e[v]];w.toLowerCase()===x.toLowerCase()&&(e[v]=w,v>y?e=e.slice(v):y>v&&(t=t.slice(y)))}}const{optimizationLevel:o=1}=this.options;o>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var i=0,a=0,l=t.length,c=e.length;i<l&&a<c;i++,a++){this.debug("matchOne loop");var u=e[a],f=t[i];if(this.debug(e,u,f),u===!1)return!1;if(u===H){this.debug("GLOBSTAR",[e,u,f]);var h=i,d=a+1;if(d===c){for(this.debug("** at the end");i<l;i++)if(t[i]==="."||t[i]===".."||!s.dot&&t[i].charAt(0)===".")return!1;return!0}for(;h<l;){var g=t[h];if(this.debug(`
|
|
6
6
|
globstar while`,t,h,e,d,g),this.matchOne(t.slice(h),e.slice(d),n))return this.debug("globstar found match!",h,l,g),!0;if(g==="."||g===".."||!s.dot&&g.charAt(0)==="."){this.debug("dot detected!",t,h,e,d);break}this.debug("globstar swallow a segment, and continue"),h++}return!(!n||(this.debug(`
|
|
7
|
-
>>> no match, partial?`,t,h,e,d),h!==l))}let p;if(typeof u=="string"?(p=f===u,this.debug("string match",u,f,p)):(p=u.test(f),this.debug("pattern match",u,f,p)),!p)return!1}if(i===l&&a===c)return!0;if(i===l)return n;if(a===c)return i===l-1&&t[i]==="";throw new Error("wtf?")}braceExpand(){return tr(this.pattern,this.options)}parse(t){It(t);const e=this.options;if(t==="**")return H;if(t==="")return"";let n,s=null;(n=t.match(yn))?s=e.dot?vn:bn:(n=t.match(an))?s=(e.nocase?e.dot?hn:cn:e.dot?ln:un)(n[1]):(n=t.match(wn))?s=(e.nocase?e.dot?Pn:xn:e.dot?Nn:En)(n):(n=t.match(fn))?s=e.dot?gn:pn:(n=t.match(dn))&&(s=mn);const o=_.fromGlob(t,this.options).toMMPattern();return s&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:s}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,n=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",s=new Set(e.nocase?["i"]:[]);let o=t.map((l=>{const c=l.map((u=>{if(u instanceof RegExp)for(const f of u.flags.split(""))s.add(f);return typeof u=="string"?u.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):u===H?H:u._src}));return c.forEach(((u,f)=>{const h=c[f+1],d=c[f-1];u===H&&d!==H&&(d===void 0?h!==void 0&&h!==H?c[f+1]="(?:\\/|"+n+"\\/)?"+h:c[f]=n:h===void 0?c[f-1]=d+"(?:\\/|"+n+")?":h!==H&&(c[f-1]=d+"(?:\\/|\\/"+n+"\\/)"+h,c[f+1]=H))})),c.filter((u=>u!==H)).join("/")})).join("|");const[i,a]=t.length>1?["(?:",")"]:["",""];o="^"+i+o+a+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...s].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.partial;if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const s=this.slashSplit(t);this.debug(this.pattern,"split",s);const o=this.set;this.debug(this.pattern,"set",o);let i=s[s.length-1];if(!i)for(let a=s.length-2;!i&&a>=0;a--)i=s[a];for(let a=0;a<o.length;a++){const l=o[a];let c=s;if(n.matchBase&&l.length===1&&(c=[i]),this.matchOne(c,l,e))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(t){return k.defaults(t).Minimatch}}function se(r){const t=new Error(`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:""}Invalid response: ${r.status} ${r.statusText}`);return t.status=r.status,t.response=r,t}function L(r,t){const{status:e}=t;if(e===401&&r.digest)return t;if(e>=400)throw se(t);return t}function ht(r,t){return arguments.length>2&&arguments[2]!==void 0&&arguments[2]?{data:t,headers:r.headers?Xr(r.headers):{},status:r.status,statusText:r.statusText}:t}k.AST=_,k.Minimatch=Ft,k.escape=function(r){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t?r.replace(/[?*()[\]]/g,"[$&]"):r.replace(/[?*()[\]\\]/g,"\\$&")},k.unescape=xt;const An=(Te=function(r,t,e){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=D({url:$(r.remoteURL,C(t)),method:"COPY",headers:{Destination:$(r.remoteURL,C(e)),Overwrite:n.overwrite===!1?"F":"T",Depth:n.shallow?"0":"infinity"}},r,n);return i=function(a){L(r,a)},(o=R(s,r))&&o.then||(o=Promise.resolve(o)),i?o.then(i):o;var o,i},function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];try{return Promise.resolve(Te.apply(this,r))}catch(e){return Promise.reject(e)}});var Te;const Tn={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(r,t){return t},attributeValueProcessor:function(r,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(r,t,e){return r},captureMetaData:!1},Oe=":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",On=new RegExp("^["+Oe+"]["+Oe+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function er(r,t){const e=[];let n=t.exec(r);for(;n;){const s=[];s.startIndex=t.lastIndex-n[0].length;const o=n.length;for(let i=0;i<o;i++)s.push(n[i]);e.push(s),n=t.exec(r)}return e}const Rt=function(r){return On.exec(r)!=null};let Xt;Xt=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class at{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t,e){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}),e!==void 0&&(this.child[this.child.length-1][Xt]={startIndex:e})}static getMetaDataSymbol(){return Xt}}class Sn{constructor(t){this.suppressValidationErr=!t}readDocType(t,e){const n={};if(t[e+3]!=="O"||t[e+4]!=="C"||t[e+5]!=="T"||t[e+6]!=="Y"||t[e+7]!=="P"||t[e+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let s=1,o=!1,i=!1,a="";for(;e<t.length;e++)if(t[e]!=="<"||i)if(t[e]===">"){if(i?t[e-1]==="-"&&t[e-2]==="-"&&(i=!1,s--):s--,s===0)break}else t[e]==="["?o=!0:a+=t[e];else{if(o&&it(t,"!ENTITY",e)){let l,c;e+=7,[l,c,e]=this.readEntityExp(t,e+1,this.suppressValidationErr),c.indexOf("&")===-1&&(n[l]={regx:RegExp(`&${l};`,"g"),val:c})}else if(o&&it(t,"!ELEMENT",e)){e+=8;const{index:l}=this.readElementExp(t,e+1);e=l}else if(o&&it(t,"!ATTLIST",e))e+=8;else if(o&&it(t,"!NOTATION",e)){e+=9;const{index:l}=this.readNotationExp(t,e+1,this.suppressValidationErr);e=l}else{if(!it(t,"!--",e))throw new Error("Invalid DOCTYPE");i=!0}s++,a=""}if(s!==0)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}}readEntityExp(t,e){e=W(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e])&&t[e]!=='"'&&t[e]!=="'";)n+=t[e],e++;if(bt(n),e=W(t,e),!this.suppressValidationErr){if(t.substring(e,e+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(t[e]==="%")throw new Error("Parameter entities are not supported")}let s="";return[e,s]=this.readIdentifierVal(t,e,"entity"),[n,s,--e]}readNotationExp(t,e){e=W(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;!this.suppressValidationErr&&bt(n),e=W(t,e);const s=t.substring(e,e+6).toUpperCase();if(!this.suppressValidationErr&&s!=="SYSTEM"&&s!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${s}"`);e+=s.length,e=W(t,e);let o=null,i=null;if(s==="PUBLIC")[e,o]=this.readIdentifierVal(t,e,"publicIdentifier"),t[e=W(t,e)]!=='"'&&t[e]!=="'"||([e,i]=this.readIdentifierVal(t,e,"systemIdentifier"));else if(s==="SYSTEM"&&([e,i]=this.readIdentifierVal(t,e,"systemIdentifier"),!this.suppressValidationErr&&!i))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:o,systemIdentifier:i,index:--e}}readIdentifierVal(t,e,n){let s="";const o=t[e];if(o!=='"'&&o!=="'")throw new Error(`Expected quoted string, found "${o}"`);for(e++;e<t.length&&t[e]!==o;)s+=t[e],e++;if(t[e]!==o)throw new Error(`Unterminated ${n} value`);return[++e,s]}readElementExp(t,e){e=W(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;if(!this.suppressValidationErr&&!Rt(n))throw new Error(`Invalid element name: "${n}"`);let s="";if(t[e=W(t,e)]==="E"&&it(t,"MPTY",e))e+=4;else if(t[e]==="A"&&it(t,"NY",e))e+=2;else if(t[e]==="("){for(e++;e<t.length&&t[e]!==")";)s+=t[e],e++;if(t[e]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${t[e]}"`);return{elementName:n,contentModel:s.trim(),index:e}}readAttlistExp(t,e){e=W(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;bt(n),e=W(t,e);let s="";for(;e<t.length&&!/\s/.test(t[e]);)s+=t[e],e++;if(!bt(s))throw new Error(`Invalid attribute name: "${s}"`);e=W(t,e);let o="";if(t.substring(e,e+8).toUpperCase()==="NOTATION"){if(o="NOTATION",t[e=W(t,e+=8)]!=="(")throw new Error(`Expected '(', found "${t[e]}"`);e++;let a=[];for(;e<t.length&&t[e]!==")";){let l="";for(;e<t.length&&t[e]!=="|"&&t[e]!==")";)l+=t[e],e++;if(l=l.trim(),!bt(l))throw new Error(`Invalid notation name: "${l}"`);a.push(l),t[e]==="|"&&(e++,e=W(t,e))}if(t[e]!==")")throw new Error("Unterminated list of notations");e++,o+=" ("+a.join("|")+")"}else{for(;e<t.length&&!/\s/.test(t[e]);)o+=t[e],e++;const a=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!a.includes(o.toUpperCase()))throw new Error(`Invalid attribute type: "${o}"`)}e=W(t,e);let i="";return t.substring(e,e+8).toUpperCase()==="#REQUIRED"?(i="#REQUIRED",e+=8):t.substring(e,e+7).toUpperCase()==="#IMPLIED"?(i="#IMPLIED",e+=7):[e,i]=this.readIdentifierVal(t,e,"ATTLIST"),{elementName:n,attributeName:s,attributeType:o,defaultValue:i,index:e}}}const W=(r,t)=>{for(;t<r.length&&/\s/.test(r[t]);)t++;return t};function it(r,t,e){for(let n=0;n<t.length;n++)if(t[n]!==r[e+n+1])return!1;return!0}function bt(r){if(Rt(r))return r;throw new Error(`Invalid entity name ${r}`)}const Cn=/^[-+]?0x[a-fA-F0-9]+$/,$n=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,In={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0},Fn=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function rr(r){return typeof r=="function"?r:Array.isArray(r)?t=>{for(const e of r)if(typeof e=="string"&&t===e||e instanceof RegExp&&e.test(t))return!0}:()=>!1}class jn{constructor(t){if(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:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,n)=>Se(n,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,n)=>Se(n,16,"&#x")}},this.addExternalEntities=Rn,this.parseXml=Mn,this.parseTextData=Dn,this.resolveNameSpace=Ln,this.buildAttributesMap=kn,this.isItStopNode=Wn,this.replaceEntitiesValue=Vn,this.readStopNodeData=qn,this.saveTextToParentTag=Bn,this.addChild=_n,this.ignoreAttributesFn=rr(this.options.ignoreAttributes),this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let e=0;e<this.options.stopNodes.length;e++){const n=this.options.stopNodes[e];typeof n=="string"&&(n.startsWith("*.")?this.stopNodesWildcard.add(n.substring(2)):this.stopNodesExact.add(n))}}}}function Rn(r){const t=Object.keys(r);for(let e=0;e<t.length;e++){const n=t[e];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:r[n]}}}function Dn(r,t,e,n,s,o,i){if(r!==void 0&&(this.options.trimValues&&!n&&(r=r.trim()),r.length>0)){i||(r=this.replaceEntitiesValue(r));const a=this.options.tagValueProcessor(t,r,e,s,o);return a==null?r:typeof a!=typeof r||a!==r?a:this.options.trimValues||r.trim()===r?nr(r,this.options.parseTagValue,this.options.numberParseOptions):r}}function Ln(r){if(this.options.removeNSPrefix){const t=r.split(":"),e=r.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(r=e+t[1])}return r}const Un=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function kn(r,t){if(this.options.ignoreAttributes!==!0&&typeof r=="string"){const e=er(r,Un),n=e.length,s={};for(let o=0;o<n;o++){const i=this.resolveNameSpace(e[o][1]);if(this.ignoreAttributesFn(i,t))continue;let a=e[o][4],l=this.options.attributeNamePrefix+i;if(i.length)if(this.options.transformAttributeName&&(l=this.options.transformAttributeName(l)),l==="__proto__"&&(l="#__proto__"),a!==void 0){this.options.trimValues&&(a=a.trim()),a=this.replaceEntitiesValue(a);const c=this.options.attributeValueProcessor(i,a,t);s[l]=c==null?a:typeof c!=typeof a||c!==a?c:nr(a,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(s[l]=!0)}if(!Object.keys(s).length)return;if(this.options.attributesGroupName){const o={};return o[this.options.attributesGroupName]=s,o}return s}}const Mn=function(r){r=r.replace(/\r\n?/g,`
|
|
8
|
-
`);const t=new at("!xml");let e=t,n="",s="";const o=new
|
|
9
|
-
`||r==="\r"}function $e(r,t){const e=t;for(;t<r.length;t++)if(!(r[t]!="?"&&r[t]!=" ")){const n=r.substr(e,t-e);if(t>5&&n==="xml")return F("InvalidXml","XML declaration allowed only at the start of the document.",M(r,t));if(r[t]=="?"&&r[t+1]==">"){t++;break}}return t}function Ie(r,t){if(r.length>t+5&&r[t+1]==="-"&&r[t+2]==="-"){for(t+=3;t<r.length;t++)if(r[t]==="-"&&r[t+1]==="-"&&r[t+2]===">"){t+=2;break}}else if(r.length>t+8&&r[t+1]==="D"&&r[t+2]==="O"&&r[t+3]==="C"&&r[t+4]==="T"&&r[t+5]==="Y"&&r[t+6]==="P"&&r[t+7]==="E"){let e=1;for(t+=8;t<r.length;t++)if(r[t]==="<")e++;else if(r[t]===">"&&(e--,e===0))break}else if(r.length>t+9&&r[t+1]==="["&&r[t+2]==="C"&&r[t+3]==="D"&&r[t+4]==="A"&&r[t+5]==="T"&&r[t+6]==="A"&&r[t+7]==="["){for(t+=8;t<r.length;t++)if(r[t]==="]"&&r[t+1]==="]"&&r[t+2]===">"){t+=2;break}}return t}function
|
|
10
|
-
`&&i[f]!=="\r";f++)g+=i[f];if(g=g.trim(),g[g.length-1]==="/"&&(g=g.substring(0,g.length-1),f--),!Rt(g)){let b;return b=g.trim().length===0?"Invalid space after '<'.":"Tag '"+g+"' is an invalid name.",F("InvalidTag",b,M(i,f))}const p=Yn(i,f);if(p===!1)return F("InvalidAttr","Attributes for '"+g+"' have open quote.",M(i,f));let m=p.value;if(f=p.index,m[m.length-1]==="/"){const b=f-m.length;m=m.substring(0,m.length-1);const y=Fe(m,a);if(y!==!0)return F(y.err.code,y.err.msg,M(i,b+y.err.line));c=!0}else if(d){if(!p.tagClosed)return F("InvalidTag","Closing tag '"+g+"' doesn't have proper closing.",M(i,f));if(m.trim().length>0)return F("InvalidTag","Closing tag '"+g+"' can't have attributes or invalid starting.",M(i,h));if(l.length===0)return F("InvalidTag","Closing tag '"+g+"' has not been opened.",M(i,h));{const b=l.pop();if(g!==b.tagName){let y=M(i,b.tagStartPos);return F("InvalidTag","Expected closing tag '"+b.tagName+"' (opened in line "+y.line+", col "+y.col+") instead of closing tag '"+g+"'.",M(i,h))}l.length==0&&(u=!0)}}else{const b=Fe(m,a);if(b!==!0)return F(b.err.code,b.err.msg,M(i,f-m.length+b.err.line));if(u===!0)return F("InvalidXml","Multiple possible root nodes found.",M(i,f));a.unpairedTags.indexOf(g)!==-1||l.push({tagName:g,tagStartPos:h}),c=!0}for(f++;f<i.length;f++)if(i[f]==="<"){if(i[f+1]==="!"){f++,f=Ie(i,f);continue}if(i[f+1]!=="?")break;if(f=$e(i,++f),f.err)return f}else if(i[f]==="&"){const b=Kn(i,f);if(b==-1)return F("InvalidChar","char '&' is not expected.",M(i,f));f=b}else if(u===!0&&!Ce(i[f]))return F("InvalidXml","Extra text at the end",M(i,f));i[f]==="<"&&f--}}}return c?l.length==1?F("InvalidTag","Unclosed tag '"+l[0].tagName+"'.",M(i,l[0].tagStartPos)):!(l.length>0)||F("InvalidXml","Invalid '"+JSON.stringify(l.map((f=>f.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):F("InvalidXml","Start tag expected.",1)})(t,e);if(o!==!0)throw Error(`${o.err.msg}:${o.err.line}:${o.err.col}`)}const n=new jn(this.options);n.addExternalEntities(this.externalEntities);const s=n.parseXml(t);return this.options.preserveOrder||s===void 0?s:Gn(s,this.options)}addEntity(t,e){if(e.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(t.indexOf("&")!==-1||t.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if(e==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}static getMetaDataSymbol(){return at.getMetaDataSymbol()}}var ts=S(829),Y=S.n(ts),lt=(function(r){return r.Array="array",r.Object="object",r.Original="original",r})(lt||{});function ir(r,t){if(!r.endsWith("propstat.prop.displayname"))return t}function Ot(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:lt.Original;const n=Y().get(r,t);return e==="array"&&Array.isArray(n)===!1?[n]:e==="object"&&Array.isArray(n)?n[0]:n}function Et(r,t){return t=t??{attributeNamePrefix:"@",attributeParsers:[],tagParsers:[ir]},new Promise((e=>{e((function(n){const{multistatus:s}=n;if(s==="")return{multistatus:{response:[]}};if(!s)throw new Error("Invalid response: No root multistatus found");const o={multistatus:Array.isArray(s)?s[0]:s};return Y().set(o,"multistatus.response",Ot(o,"multistatus.response",lt.Array)),Y().set(o,"multistatus.response",Y().get(o,"multistatus.response").map((i=>(function(a){const l=Object.assign({},a);return l.status?Y().set(l,"status",Ot(l,"status",lt.Object)):(Y().set(l,"propstat",Ot(l,"propstat",lt.Object)),Y().set(l,"propstat.prop",Ot(l,"propstat.prop",lt.Object))),l})(i)))),o})((function(n){let{attributeNamePrefix:s,attributeParsers:o,tagParsers:i}=n;return new or({allowBooleanAttributes:!0,attributeNamePrefix:s,textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor(a,l,c){for(const u of o)try{const f=u(c,l);if(f!==l)return f}catch{}return l},tagValueProcessor(a,l,c){for(const u of i)try{const f=u(c,l);if(f!==l)return f}catch{}return l}})})(t).parse(r)))}))}function Dt(r,t){let e=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const{getlastmodified:n=null,getcontentlength:s="0",resourcetype:o=null,getcontenttype:i=null,getetag:a=null}=r,l=o&&typeof o=="object"&&o.collection!==void 0?"directory":"file",c={filename:t,basename:St().basename(t),lastmod:n,size:parseInt(s,10),type:l,etag:typeof a=="string"?a.replace(/"/g,""):null};return l==="file"&&(c.mime=i&&typeof i=="string"?i.split(";")[0]:""),e&&(r.displayname!==void 0&&(r.displayname=String(r.displayname)),c.props=r),c}function es(r,t){let e=arguments.length>2&&arguments[2]!==void 0&&arguments[2],n=null;try{r.multistatus.response[0].propstat&&(n=r.multistatus.response[0])}catch{}if(!n)throw new Error("Failed getting item stat: bad response");const{propstat:{prop:s,status:o}}=n,[i,a,l]=o.split(" ",3),c=parseInt(a,10);if(c>=400){const u=new Error(`Invalid response: ${c} ${l}`);throw u.status=c,u}return Dt(s,Nt(t),e)}function rs(r){switch(String(r)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(r),10)}}function Vt(r,t,e){return e?t?t(r):r:(r&&r.then||(r=Promise.resolve(r)),t?r.then(t):r)}const oe=(function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}})((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:n=!1}=e,s=D({url:$(r.remoteURL,C(t)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},r,e);return Vt(R(s,r),(function(o){return L(r,o),Vt(o.text(),(function(i){return Vt(Et(i,r.parsing),(function(a){const l=es(a,t,n);return ht(o,l,n)}))}))}))}));function ar(r,t,e){return e?t?t(r):r:(r&&r.then||(r=Promise.resolve(r)),t?r.then(t):r)}const ns=ur((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=(function(o){if(!o||o==="/")return[];let i=o;const a=[];do a.push(i),i=St().dirname(i);while(i&&i!=="/");return a})(Nt(t));n.sort(((o,i)=>o.length>i.length?1:i.length>o.length?-1:0));let s=!1;return(function(o,i,a){if(typeof o[Re]=="function"){let p=function(m){try{for(;!(l=f.next()).done;)if((m=i(l.value))&&m.then){if(!De(m))return void m.then(p,u||(u=V.bind(null,c=new ct,2)));m=m.v}c?V(c,1,m):c=m}catch(b){V(c||(c=new ct),2,b)}};var l,c,u,f=o[Re]();if(p(),f.return){var h=function(m){try{l.done||f.return()}catch{}return m};if(c&&c.then)return c.then(h,(function(m){throw h(m)}));h()}return c}if(!("length"in o))throw new TypeError("Object is not iterable");for(var d=[],g=0;g<o.length;g++)d.push(o[g]);return(function(p,m,b){var y,v,w=-1;return(function x(N){try{for(;++w<p.length&&(!b||!b());)if((N=m(w))&&N.then){if(!De(N))return void N.then(x,v||(v=V.bind(null,y=new ct,2)));N=N.v}y?V(y,1,N):y=N}catch(E){V(y||(y=new ct),2,E)}})(),y})(d,(function(p){return i(d[p])}),a)})(n,(function(o){return i=function(){return(function(l,c){try{var u=ar(oe(r,o),(function(f){if(f.type!=="directory")throw new Error(`Path includes a file: ${t}`)}))}catch(f){return c(f)}return u&&u.then?u.then(void 0,c):u})(0,(function(l){const c=l;return(function(){if(c.status===404)return s=!0,je(Zt(r,o,{...e,recursive:!1}));throw l})()}))},(a=(function(){if(s)return je(Zt(r,o,{...e,recursive:!1}))})())&&a.then?a.then(i):i();var i,a}),(function(){return!1}))}));function ur(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}}function ss(){}function je(r,t){return r&&r.then?r.then(ss):Promise.resolve()}const Re=typeof Symbol<"u"?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function V(r,t,e){if(!r.s){if(e instanceof ct){if(!e.s)return void(e.o=V.bind(null,r,t));1&t&&(t=e.s),e=e.v}if(e&&e.then)return void e.then(V.bind(null,r,t),V.bind(null,r,2));r.s=t,r.v=e;const n=r.o;n&&n(r)}}const ct=(function(){function r(){}return r.prototype.then=function(t,e){const n=new r,s=this.s;if(s){const o=1&s?t:e;if(o){try{V(n,1,o(this.v))}catch(i){V(n,2,i)}return n}return this}return this.o=function(o){try{const i=o.v;1&o.s?V(n,1,t?t(i):i):e?V(n,1,e(i)):V(n,2,i)}catch(i){V(n,2,i)}},n},r})();function De(r){return r instanceof ct&&1&r.s}const Zt=ur((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e.recursive===!0)return ns(r,t,e);const n=D({url:$(r.remoteURL,(s=C(t),s.endsWith("/")?s:s+"/")),method:"MKCOL"},r,e);var s;return ar(R(n,r),(function(o){L(r,o)}))}));var os=S(388),Le=S.n(os);const is=(function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}})((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n={};if(typeof e.range=="object"&&typeof e.range.start=="number"){let a=`bytes=${e.range.start}-`;typeof e.range.end=="number"&&(a=`${a}${e.range.end}`),n.Range=a}const s=D({url:$(r.remoteURL,C(t)),method:"GET",headers:n},r,e);return i=function(a){if(L(r,a),n.Range&&a.status!==206){const l=new Error(`Invalid response code for partial request: ${a.status}`);throw l.status=a.status,l}return e.callback&&setTimeout((()=>{e.callback(a)}),0),a.body},(o=R(s,r))&&o.then||(o=Promise.resolve(o)),i?o.then(i):o;var o,i})),as=()=>{},us=(function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}})((function(r,t,e){e.url||(e.url=$(r.remoteURL,C(t)));const n=D(e,r,{});return o=function(i){return L(r,i),i},(s=R(n,r))&&s.then||(s=Promise.resolve(s)),o?s.then(o):s;var s,o})),ls=(function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}})((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=D({url:$(r.remoteURL,C(t)),method:"DELETE"},r,e);return o=function(i){L(r,i)},(s=R(n,r))&&s.then||(s=Promise.resolve(s)),o?s.then(o):s;var s,o})),cs=(function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}})((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function(n,s){try{var o=(i=oe(r,t,e),a=function(){return!0},l?a?a(i):i:(i&&i.then||(i=Promise.resolve(i)),a?i.then(a):i))}catch(c){return s(c)}var i,a,l;return o&&o.then?o.then(void 0,s):o})(0,(function(n){if(n.status===404)return!1;throw n}))}));function Bt(r,t,e){return e?t?t(r):r:(r&&r.then||(r=Promise.resolve(r)),t?r.then(t):r)}const hs=(function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}})((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=D({url:$(r.remoteURL,C(t),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:e.deep?"infinity":"1"}},r,e);return Bt(R(n,r),(function(s){return L(r,s),Bt(s.text(),(function(o){if(!o)throw new Error("Failed parsing directory contents: Empty response");return Bt(Et(o,r.parsing),(function(i){const a=ge(t);let l=(function(c,u,f){let h=arguments.length>3&&arguments[3]!==void 0&&arguments[3],d=arguments.length>4&&arguments[4]!==void 0&&arguments[4];const g=St().join(u,"/"),{multistatus:{response:p}}=c,m=p.map((b=>{const y=(function(w){try{return w.replace(/^https?:\/\/[^\/]+/,"")}catch(x){throw new B(x,"Failed normalising HREF")}})(b.href),{propstat:{prop:v}}=b;return Dt(v,g==="/"?decodeURIComponent(Nt(y)):Nt(St().relative(decodeURIComponent(g),decodeURIComponent(y))),h)}));return d?m:m.filter((b=>b.basename&&(b.type==="file"||b.filename!==f.replace(/\/$/,""))))})(i,ge(r.remoteBasePath||r.remotePath),a,e.details,e.includeSelf);return e.glob&&(l=(function(c,u){return c.filter((f=>k(f.filename,u,{matchBase:!0})))})(l,e.glob)),ht(s,l,e.details)}))}))}))}));function ie(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}}const fs=ie((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=D({url:$(r.remoteURL,C(t)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[ds]},r,e);return jt(R(n,r),(function(s){return L(r,s),jt(s.text(),(function(o){return ht(s,o,e.details)}))}))}));function jt(r,t,e){return e?t?t(r):r:(r&&r.then||(r=Promise.resolve(r)),t?r.then(t):r)}const ps=ie((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=D({url:$(r.remoteURL,C(t)),method:"GET"},r,e);return jt(R(n,r),(function(s){let o;return L(r,s),(function(i,a){var l=i();return l&&l.then?l.then(a):a()})((function(){return jt(s.arrayBuffer(),(function(i){o=i}))}),(function(){return ht(s,o,e.details)}))}))})),gs=ie((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{format:n="binary"}=e;if(n!=="binary"&&n!=="text")throw new B({info:{code:rt.InvalidOutputFormat}},`Invalid output format: ${n}`);return n==="text"?fs(r,t,e):ps(r,t,e)})),ds=r=>r;function ms(r,t){let e="";return t.format&&t.indentBy.length>0&&(e=`
|
|
11
|
-
`),lr(r,t,"",e)}function lr(r,t,e,n){let s="",o=!1;for(let i=0;i<r.length;i++){const a=r[i],l=
|
|
7
|
+
>>> no match, partial?`,t,h,e,d),h!==l))}let p;if(typeof u=="string"?(p=f===u,this.debug("string match",u,f,p)):(p=u.test(f),this.debug("pattern match",u,f,p)),!p)return!1}if(i===l&&a===c)return!0;if(i===l)return n;if(a===c)return i===l-1&&t[i]==="";throw new Error("wtf?")}braceExpand(){return tr(this.pattern,this.options)}parse(t){It(t);const e=this.options;if(t==="**")return H;if(t==="")return"";let n,s=null;(n=t.match(bn))?s=e.dot?wn:vn:(n=t.match(un))?s=(e.nocase?e.dot?fn:hn:e.dot?cn:ln)(n[1]):(n=t.match(xn))?s=(e.nocase?e.dot?Nn:Pn:e.dot?En:An)(n):(n=t.match(pn))?s=e.dot?dn:gn:(n=t.match(mn))&&(s=yn);const o=_.fromGlob(t,this.options).toMMPattern();return s&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:s}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,n=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",s=new Set(e.nocase?["i"]:[]);let o=t.map((l=>{const c=l.map((u=>{if(u instanceof RegExp)for(const f of u.flags.split(""))s.add(f);return typeof u=="string"?u.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):u===H?H:u._src}));return c.forEach(((u,f)=>{const h=c[f+1],d=c[f-1];u===H&&d!==H&&(d===void 0?h!==void 0&&h!==H?c[f+1]="(?:\\/|"+n+"\\/)?"+h:c[f]=n:h===void 0?c[f-1]=d+"(?:\\/|"+n+")?":h!==H&&(c[f-1]=d+"(?:\\/|\\/"+n+"\\/)"+h,c[f+1]=H))})),c.filter((u=>u!==H)).join("/")})).join("|");const[i,a]=t.length>1?["(?:",")"]:["",""];o="^"+i+o+a+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...s].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.partial;if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const s=this.slashSplit(t);this.debug(this.pattern,"split",s);const o=this.set;this.debug(this.pattern,"set",o);let i=s[s.length-1];if(!i)for(let a=s.length-2;!i&&a>=0;a--)i=s[a];for(let a=0;a<o.length;a++){const l=o[a];let c=s;if(n.matchBase&&l.length===1&&(c=[i]),this.matchOne(c,l,e))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(t){return k.defaults(t).Minimatch}}function se(r){const t=new Error(`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:""}Invalid response: ${r.status} ${r.statusText}`);return t.status=r.status,t.response=r,t}function L(r,t){const{status:e}=t;if(e===401&&r.digest)return t;if(e>=400)throw se(t);return t}function ht(r,t){return arguments.length>2&&arguments[2]!==void 0&&arguments[2]?{data:t,headers:r.headers?Yr(r.headers):{},status:r.status,statusText:r.statusText}:t}k.AST=_,k.Minimatch=Ft,k.escape=function(r){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t?r.replace(/[?*()[\]]/g,"[$&]"):r.replace(/[?*()[\]\\]/g,"\\$&")},k.unescape=xt;const Tn=(Te=function(r,t,e){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=D({url:$(r.remoteURL,C(t)),method:"COPY",headers:{Destination:$(r.remoteURL,C(e)),Overwrite:n.overwrite===!1?"F":"T",Depth:n.shallow?"0":"infinity"}},r,n);return i=function(a){L(r,a)},(o=R(s,r))&&o.then||(o=Promise.resolve(o)),i?o.then(i):o;var o,i},function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];try{return Promise.resolve(Te.apply(this,r))}catch(e){return Promise.reject(e)}});var Te;const On={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(r,t){return t},attributeValueProcessor:function(r,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(r,t,e){return r},captureMetaData:!1},Oe=":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",Sn=new RegExp("^["+Oe+"]["+Oe+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function er(r,t){const e=[];let n=t.exec(r);for(;n;){const s=[];s.startIndex=t.lastIndex-n[0].length;const o=n.length;for(let i=0;i<o;i++)s.push(n[i]);e.push(s),n=t.exec(r)}return e}const Rt=function(r){return Sn.exec(r)!=null};let Yt;Yt=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class at{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t,e){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}),e!==void 0&&(this.child[this.child.length-1][Yt]={startIndex:e})}static getMetaDataSymbol(){return Yt}}class Cn{constructor(t){this.suppressValidationErr=!t}readDocType(t,e){const n={};if(t[e+3]!=="O"||t[e+4]!=="C"||t[e+5]!=="T"||t[e+6]!=="Y"||t[e+7]!=="P"||t[e+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let s=1,o=!1,i=!1,a="";for(;e<t.length;e++)if(t[e]!=="<"||i)if(t[e]===">"){if(i?t[e-1]==="-"&&t[e-2]==="-"&&(i=!1,s--):s--,s===0)break}else t[e]==="["?o=!0:a+=t[e];else{if(o&&it(t,"!ENTITY",e)){let l,c;e+=7,[l,c,e]=this.readEntityExp(t,e+1,this.suppressValidationErr),c.indexOf("&")===-1&&(n[l]={regx:RegExp(`&${l};`,"g"),val:c})}else if(o&&it(t,"!ELEMENT",e)){e+=8;const{index:l}=this.readElementExp(t,e+1);e=l}else if(o&&it(t,"!ATTLIST",e))e+=8;else if(o&&it(t,"!NOTATION",e)){e+=9;const{index:l}=this.readNotationExp(t,e+1,this.suppressValidationErr);e=l}else{if(!it(t,"!--",e))throw new Error("Invalid DOCTYPE");i=!0}s++,a=""}if(s!==0)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}}readEntityExp(t,e){e=W(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e])&&t[e]!=='"'&&t[e]!=="'";)n+=t[e],e++;if(bt(n),e=W(t,e),!this.suppressValidationErr){if(t.substring(e,e+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(t[e]==="%")throw new Error("Parameter entities are not supported")}let s="";return[e,s]=this.readIdentifierVal(t,e,"entity"),[n,s,--e]}readNotationExp(t,e){e=W(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;!this.suppressValidationErr&&bt(n),e=W(t,e);const s=t.substring(e,e+6).toUpperCase();if(!this.suppressValidationErr&&s!=="SYSTEM"&&s!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${s}"`);e+=s.length,e=W(t,e);let o=null,i=null;if(s==="PUBLIC")[e,o]=this.readIdentifierVal(t,e,"publicIdentifier"),t[e=W(t,e)]!=='"'&&t[e]!=="'"||([e,i]=this.readIdentifierVal(t,e,"systemIdentifier"));else if(s==="SYSTEM"&&([e,i]=this.readIdentifierVal(t,e,"systemIdentifier"),!this.suppressValidationErr&&!i))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:o,systemIdentifier:i,index:--e}}readIdentifierVal(t,e,n){let s="";const o=t[e];if(o!=='"'&&o!=="'")throw new Error(`Expected quoted string, found "${o}"`);for(e++;e<t.length&&t[e]!==o;)s+=t[e],e++;if(t[e]!==o)throw new Error(`Unterminated ${n} value`);return[++e,s]}readElementExp(t,e){e=W(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;if(!this.suppressValidationErr&&!Rt(n))throw new Error(`Invalid element name: "${n}"`);let s="";if(t[e=W(t,e)]==="E"&&it(t,"MPTY",e))e+=4;else if(t[e]==="A"&&it(t,"NY",e))e+=2;else if(t[e]==="("){for(e++;e<t.length&&t[e]!==")";)s+=t[e],e++;if(t[e]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${t[e]}"`);return{elementName:n,contentModel:s.trim(),index:e}}readAttlistExp(t,e){e=W(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;bt(n),e=W(t,e);let s="";for(;e<t.length&&!/\s/.test(t[e]);)s+=t[e],e++;if(!bt(s))throw new Error(`Invalid attribute name: "${s}"`);e=W(t,e);let o="";if(t.substring(e,e+8).toUpperCase()==="NOTATION"){if(o="NOTATION",t[e=W(t,e+=8)]!=="(")throw new Error(`Expected '(', found "${t[e]}"`);e++;let a=[];for(;e<t.length&&t[e]!==")";){let l="";for(;e<t.length&&t[e]!=="|"&&t[e]!==")";)l+=t[e],e++;if(l=l.trim(),!bt(l))throw new Error(`Invalid notation name: "${l}"`);a.push(l),t[e]==="|"&&(e++,e=W(t,e))}if(t[e]!==")")throw new Error("Unterminated list of notations");e++,o+=" ("+a.join("|")+")"}else{for(;e<t.length&&!/\s/.test(t[e]);)o+=t[e],e++;const a=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!a.includes(o.toUpperCase()))throw new Error(`Invalid attribute type: "${o}"`)}e=W(t,e);let i="";return t.substring(e,e+8).toUpperCase()==="#REQUIRED"?(i="#REQUIRED",e+=8):t.substring(e,e+7).toUpperCase()==="#IMPLIED"?(i="#IMPLIED",e+=7):[e,i]=this.readIdentifierVal(t,e,"ATTLIST"),{elementName:n,attributeName:s,attributeType:o,defaultValue:i,index:e}}}const W=(r,t)=>{for(;t<r.length&&/\s/.test(r[t]);)t++;return t};function it(r,t,e){for(let n=0;n<t.length;n++)if(t[n]!==r[e+n+1])return!1;return!0}function bt(r){if(Rt(r))return r;throw new Error(`Invalid entity name ${r}`)}const $n=/^[-+]?0x[a-fA-F0-9]+$/,In=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Fn={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0},jn=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function rr(r){return typeof r=="function"?r:Array.isArray(r)?t=>{for(const e of r)if(typeof e=="string"&&t===e||e instanceof RegExp&&e.test(t))return!0}:()=>!1}class Rn{constructor(t){if(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:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,n)=>Se(n,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,n)=>Se(n,16,"&#x")}},this.addExternalEntities=Dn,this.parseXml=_n,this.parseTextData=Ln,this.resolveNameSpace=Un,this.buildAttributesMap=Mn,this.isItStopNode=qn,this.replaceEntitiesValue=Bn,this.readStopNodeData=Gn,this.saveTextToParentTag=Wn,this.addChild=Vn,this.ignoreAttributesFn=rr(this.options.ignoreAttributes),this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let e=0;e<this.options.stopNodes.length;e++){const n=this.options.stopNodes[e];typeof n=="string"&&(n.startsWith("*.")?this.stopNodesWildcard.add(n.substring(2)):this.stopNodesExact.add(n))}}}}function Dn(r){const t=Object.keys(r);for(let e=0;e<t.length;e++){const n=t[e];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:r[n]}}}function Ln(r,t,e,n,s,o,i){if(r!==void 0&&(this.options.trimValues&&!n&&(r=r.trim()),r.length>0)){i||(r=this.replaceEntitiesValue(r));const a=this.options.tagValueProcessor(t,r,e,s,o);return a==null?r:typeof a!=typeof r||a!==r?a:this.options.trimValues||r.trim()===r?nr(r,this.options.parseTagValue,this.options.numberParseOptions):r}}function Un(r){if(this.options.removeNSPrefix){const t=r.split(":"),e=r.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(r=e+t[1])}return r}const kn=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Mn(r,t){if(this.options.ignoreAttributes!==!0&&typeof r=="string"){const e=er(r,kn),n=e.length,s={};for(let o=0;o<n;o++){const i=this.resolveNameSpace(e[o][1]);if(this.ignoreAttributesFn(i,t))continue;let a=e[o][4],l=this.options.attributeNamePrefix+i;if(i.length)if(this.options.transformAttributeName&&(l=this.options.transformAttributeName(l)),l==="__proto__"&&(l="#__proto__"),a!==void 0){this.options.trimValues&&(a=a.trim()),a=this.replaceEntitiesValue(a);const c=this.options.attributeValueProcessor(i,a,t);s[l]=c==null?a:typeof c!=typeof a||c!==a?c:nr(a,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(s[l]=!0)}if(!Object.keys(s).length)return;if(this.options.attributesGroupName){const o={};return o[this.options.attributesGroupName]=s,o}return s}}const _n=function(r){r=r.replace(/\r\n?/g,`
|
|
8
|
+
`);const t=new at("!xml");let e=t,n="",s="";const o=new Cn(this.options.processEntities);for(let i=0;i<r.length;i++)if(r[i]==="<")if(r[i+1]==="/"){const a=ut(r,">",i,"Closing Tag is not closed.");let l=r.substring(i+2,a).trim();if(this.options.removeNSPrefix){const f=l.indexOf(":");f!==-1&&(l=l.substr(f+1))}this.options.transformTagName&&(l=this.options.transformTagName(l)),e&&(n=this.saveTextToParentTag(n,e,s));const c=s.substring(s.lastIndexOf(".")+1);if(l&&this.options.unpairedTags.indexOf(l)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${l}>`);let u=0;c&&this.options.unpairedTags.indexOf(c)!==-1?(u=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):u=s.lastIndexOf("."),s=s.substring(0,u),e=this.tagsNodeStack.pop(),n="",i=a}else if(r[i+1]==="?"){let a=Zt(r,i,!1,"?>");if(!a)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,e,s),!(this.options.ignoreDeclaration&&a.tagName==="?xml"||this.options.ignorePiTags)){const l=new at(a.tagName);l.add(this.options.textNodeName,""),a.tagName!==a.tagExp&&a.attrExpPresent&&(l[":@"]=this.buildAttributesMap(a.tagExp,s)),this.addChild(e,l,s,i)}i=a.closeIndex+1}else if(r.substr(i+1,3)==="!--"){const a=ut(r,"-->",i+4,"Comment is not closed.");if(this.options.commentPropName){const l=r.substring(i+4,a-2);n=this.saveTextToParentTag(n,e,s),e.add(this.options.commentPropName,[{[this.options.textNodeName]:l}])}i=a}else if(r.substr(i+1,2)==="!D"){const a=o.readDocType(r,i);this.docTypeEntities=a.entities,i=a.i}else if(r.substr(i+1,2)==="!["){const a=ut(r,"]]>",i,"CDATA is not closed.")-2,l=r.substring(i+9,a);n=this.saveTextToParentTag(n,e,s);let c=this.parseTextData(l,e.tagname,s,!0,!1,!0,!0);c==null&&(c=""),this.options.cdataPropName?e.add(this.options.cdataPropName,[{[this.options.textNodeName]:l}]):e.add(this.options.textNodeName,c),i=a+2}else{let a=Zt(r,i,this.options.removeNSPrefix),l=a.tagName;const c=a.rawTagName;let u=a.tagExp,f=a.attrExpPresent,h=a.closeIndex;if(this.options.transformTagName){const p=this.options.transformTagName(l);u===l&&(u=p),l=p}e&&n&&e.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,e,s,!1));const d=e;d&&this.options.unpairedTags.indexOf(d.tagname)!==-1&&(e=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),l!==t.tagname&&(s+=s?"."+l:l);const g=i;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,s,l)){let p="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)l[l.length-1]==="/"?(l=l.substr(0,l.length-1),s=s.substr(0,s.length-1),u=l):u=u.substr(0,u.length-1),i=a.closeIndex;else if(this.options.unpairedTags.indexOf(l)!==-1)i=a.closeIndex;else{const b=this.readStopNodeData(r,c,h+1);if(!b)throw new Error(`Unexpected end of ${c}`);i=b.i,p=b.tagContent}const m=new at(l);l!==u&&f&&(m[":@"]=this.buildAttributesMap(u,s)),p&&(p=this.parseTextData(p,l,s,!0,f,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),m.add(this.options.textNodeName,p),this.addChild(e,m,s,g)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){if(l[l.length-1]==="/"?(l=l.substr(0,l.length-1),s=s.substr(0,s.length-1),u=l):u=u.substr(0,u.length-1),this.options.transformTagName){const m=this.options.transformTagName(l);u===l&&(u=m),l=m}const p=new at(l);l!==u&&f&&(p[":@"]=this.buildAttributesMap(u,s)),this.addChild(e,p,s,g),s=s.substr(0,s.lastIndexOf("."))}else{const p=new at(l);this.tagsNodeStack.push(e),l!==u&&f&&(p[":@"]=this.buildAttributesMap(u,s)),this.addChild(e,p,s,g),e=p}n="",i=h}}else n+=r[i];return t.child};function Vn(r,t,e,n){this.options.captureMetaData||(n=void 0);const s=this.options.updateTag(t.tagname,e,t[":@"]);s===!1||(typeof s=="string"&&(t.tagname=s),r.addChild(t,n))}const Bn=function(r){if(this.options.processEntities){for(let t in this.docTypeEntities){const e=this.docTypeEntities[t];r=r.replace(e.regx,e.val)}for(let t in this.lastEntities){const e=this.lastEntities[t];r=r.replace(e.regex,e.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const e=this.htmlEntities[t];r=r.replace(e.regex,e.val)}r=r.replace(this.ampEntity.regex,this.ampEntity.val)}return r};function Wn(r,t,e,n){return r&&(n===void 0&&(n=t.child.length===0),(r=this.parseTextData(r,t.tagname,e,!1,!!t[":@"]&&Object.keys(t[":@"]).length!==0,n))!==void 0&&r!==""&&t.add(this.options.textNodeName,r),r=""),r}function qn(r,t,e,n){return!(!t||!t.has(n))||!(!r||!r.has(e))}function ut(r,t,e,n){const s=r.indexOf(t,e);if(s===-1)throw new Error(n);return s+t.length-1}function Zt(r,t,e){const n=(function(u,f){let h,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:">",g="";for(let p=f;p<u.length;p++){let m=u[p];if(h)m===h&&(h="");else if(m==='"'||m==="'")h=m;else if(m===d[0]){if(!d[1])return{data:g,index:p};if(u[p+1]===d[1])return{data:g,index:p}}else m===" "&&(m=" ");g+=m}})(r,t+1,arguments.length>3&&arguments[3]!==void 0?arguments[3]:">");if(!n)return;let s=n.data;const o=n.index,i=s.search(/\s/);let a=s,l=!0;i!==-1&&(a=s.substring(0,i),s=s.substring(i+1).trimStart());const c=a;if(e){const u=a.indexOf(":");u!==-1&&(a=a.substr(u+1),l=a!==n.data.substr(u+1))}return{tagName:a,tagExp:s,closeIndex:o,attrExpPresent:l,rawTagName:c}}function Gn(r,t,e){const n=e;let s=1;for(;e<r.length;e++)if(r[e]==="<")if(r[e+1]==="/"){const o=ut(r,">",e,`${t} is not closed`);if(r.substring(e+2,o).trim()===t&&(s--,s===0))return{tagContent:r.substring(n,e),i:o};e=o}else if(r[e+1]==="?")e=ut(r,"?>",e+1,"StopNode is not closed.");else if(r.substr(e+1,3)==="!--")e=ut(r,"-->",e+3,"StopNode is not closed.");else if(r.substr(e+1,2)==="![")e=ut(r,"]]>",e,"StopNode is not closed.")-2;else{const o=Zt(r,e,">");o&&((o&&o.tagName)===t&&o.tagExp[o.tagExp.length-1]!=="/"&&s++,e=o.closeIndex)}}function nr(r,t,e){if(t&&typeof r=="string"){const n=r.trim();return n==="true"||n!=="false"&&(function(s){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(o=Object.assign({},Fn,o),!s||typeof s!="string")return s;let i=s.trim();if(o.skipLike!==void 0&&o.skipLike.test(i))return s;if(s==="0")return 0;if(o.hex&&$n.test(i))return(function(l){if(parseInt)return parseInt(l,16);if(Number.parseInt)return Number.parseInt(l,16);if(window&&window.parseInt)return window.parseInt(l,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")})(i);if(i.includes("e")||i.includes("E"))return(function(l,c,u){if(!u.eNotation)return l;const f=c.match(jn);if(f){let h=f[1]||"";const d=f[3].indexOf("e")===-1?"E":"e",g=f[2],p=h?l[g.length+1]===d:l[g.length]===d;return g.length>1&&p?l:g.length!==1||!f[3].startsWith(`.${d}`)&&f[3][0]!==d?u.leadingZeros&&!p?(c=(f[1]||"")+f[3],Number(c)):l:Number(c)}return l})(s,i,o);{const l=In.exec(i);if(l){const c=l[1]||"",u=l[2];let f=((a=l[3])&&a.indexOf(".")!==-1&&((a=a.replace(/0+$/,""))==="."?a="0":a[0]==="."?a="0"+a:a[a.length-1]==="."&&(a=a.substring(0,a.length-1))),a);const h=c?s[u.length+1]===".":s[u.length]===".";if(!o.leadingZeros&&(u.length>1||u.length===1&&!h))return s;{const d=Number(i),g=String(d);if(d===0)return d;if(g.search(/[eE]/)!==-1)return o.eNotation?d:s;if(i.indexOf(".")!==-1)return g==="0"||g===f||g===`${c}${f}`?d:s;let p=u?f:i;return u?p===g||c+p===g?d:s:p===g||p===c+g?d:s}}return s}var a})(r,e)}return r!==void 0?r:""}function Se(r,t,e){const n=Number.parseInt(r,t);return n>=0&&n<=1114111?String.fromCodePoint(n):e+r+";"}const _t=at.getMetaDataSymbol();function zn(r,t){return sr(r,t)}function sr(r,t,e){let n;const s={};for(let o=0;o<r.length;o++){const i=r[o],a=Hn(i);let l="";if(l=e===void 0?a:e+"."+a,a===t.textNodeName)n===void 0?n=i[a]:n+=""+i[a];else{if(a===void 0)continue;if(i[a]){let c=sr(i[a],t,l);const u=Xn(c,t);i[_t]!==void 0&&(c[_t]=i[_t]),i[":@"]?Jn(c,i[":@"],l,t):Object.keys(c).length!==1||c[t.textNodeName]===void 0||t.alwaysCreateTextNode?Object.keys(c).length===0&&(t.alwaysCreateTextNode?c[t.textNodeName]="":c=""):c=c[t.textNodeName],s[a]!==void 0&&s.hasOwnProperty(a)?(Array.isArray(s[a])||(s[a]=[s[a]]),s[a].push(c)):t.isArray(a,l,u)?s[a]=[c]:s[a]=c}}}return typeof n=="string"?n.length>0&&(s[t.textNodeName]=n):n!==void 0&&(s[t.textNodeName]=n),s}function Hn(r){const t=Object.keys(r);for(let e=0;e<t.length;e++){const n=t[e];if(n!==":@")return n}}function Jn(r,t,e,n){if(t){const s=Object.keys(t),o=s.length;for(let i=0;i<o;i++){const a=s[i];n.isArray(a,e+"."+a,!0,!0)?r[a]=[t[a]]:r[a]=t[a]}}}function Xn(r,t){const{textNodeName:e}=t,n=Object.keys(r).length;return n===0||!(n!==1||!r[e]&&typeof r[e]!="boolean"&&r[e]!==0)}const Yn={allowBooleanAttributes:!1,unpairedTags:[]};function Ce(r){return r===" "||r===" "||r===`
|
|
9
|
+
`||r==="\r"}function $e(r,t){const e=t;for(;t<r.length;t++)if(!(r[t]!="?"&&r[t]!=" ")){const n=r.substr(e,t-e);if(t>5&&n==="xml")return F("InvalidXml","XML declaration allowed only at the start of the document.",M(r,t));if(r[t]=="?"&&r[t+1]==">"){t++;break}}return t}function Ie(r,t){if(r.length>t+5&&r[t+1]==="-"&&r[t+2]==="-"){for(t+=3;t<r.length;t++)if(r[t]==="-"&&r[t+1]==="-"&&r[t+2]===">"){t+=2;break}}else if(r.length>t+8&&r[t+1]==="D"&&r[t+2]==="O"&&r[t+3]==="C"&&r[t+4]==="T"&&r[t+5]==="Y"&&r[t+6]==="P"&&r[t+7]==="E"){let e=1;for(t+=8;t<r.length;t++)if(r[t]==="<")e++;else if(r[t]===">"&&(e--,e===0))break}else if(r.length>t+9&&r[t+1]==="["&&r[t+2]==="C"&&r[t+3]==="D"&&r[t+4]==="A"&&r[t+5]==="T"&&r[t+6]==="A"&&r[t+7]==="["){for(t+=8;t<r.length;t++)if(r[t]==="]"&&r[t+1]==="]"&&r[t+2]===">"){t+=2;break}}return t}function Zn(r,t){let e="",n="",s=!1;for(;t<r.length;t++){if(r[t]==='"'||r[t]==="'")n===""?n=r[t]:n!==r[t]||(n="");else if(r[t]===">"&&n===""){s=!0;break}e+=r[t]}return n===""&&{value:e,index:t,tagClosed:s}}const Kn=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Fe(r,t){const e=er(r,Kn),n={};for(let s=0;s<e.length;s++){if(e[s][1].length===0)return F("InvalidAttr","Attribute '"+e[s][2]+"' has no space in starting.",vt(e[s]));if(e[s][3]!==void 0&&e[s][4]===void 0)return F("InvalidAttr","Attribute '"+e[s][2]+"' is without value.",vt(e[s]));if(e[s][3]===void 0&&!t.allowBooleanAttributes)return F("InvalidAttr","boolean attribute '"+e[s][2]+"' is not allowed.",vt(e[s]));const o=e[s][2];if(!ts(o))return F("InvalidAttr","Attribute '"+o+"' is an invalid name.",vt(e[s]));if(n.hasOwnProperty(o))return F("InvalidAttr","Attribute '"+o+"' is repeated.",vt(e[s]));n[o]=1}return!0}function Qn(r,t){if(r[++t]===";")return-1;if(r[t]==="#")return(function(n,s){let o=/\d/;for(n[s]==="x"&&(s++,o=/[\da-fA-F]/);s<n.length;s++){if(n[s]===";")return s;if(!n[s].match(o))break}return-1})(r,++t);let e=0;for(;t<r.length;t++,e++)if(!(r[t].match(/\w/)&&e<20)){if(r[t]===";")break;return-1}return t}function F(r,t,e){return{err:{code:r,msg:t,line:e.line||e,col:e.col}}}function ts(r){return Rt(r)}function M(r,t){const e=r.substring(0,t).split(/\r?\n/);return{line:e.length,col:e[e.length-1].length+1}}function vt(r){return r.startIndex+r[1].length}class or{constructor(t){this.externalEntities={},this.options=(function(e){return Object.assign({},On,e)})(t)}parse(t,e){if(typeof t!="string"&&t.toString)t=t.toString();else if(typeof t!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(e){e===!0&&(e={});const o=(function(i,a){a=Object.assign({},Yn,a);const l=[];let c=!1,u=!1;i[0]==="\uFEFF"&&(i=i.substr(1));for(let f=0;f<i.length;f++)if(i[f]==="<"&&i[f+1]==="?"){if(f+=2,f=$e(i,f),f.err)return f}else{if(i[f]!=="<"){if(Ce(i[f]))continue;return F("InvalidChar","char '"+i[f]+"' is not expected.",M(i,f))}{let h=f;if(f++,i[f]==="!"){f=Ie(i,f);continue}{let d=!1;i[f]==="/"&&(d=!0,f++);let g="";for(;f<i.length&&i[f]!==">"&&i[f]!==" "&&i[f]!==" "&&i[f]!==`
|
|
10
|
+
`&&i[f]!=="\r";f++)g+=i[f];if(g=g.trim(),g[g.length-1]==="/"&&(g=g.substring(0,g.length-1),f--),!Rt(g)){let b;return b=g.trim().length===0?"Invalid space after '<'.":"Tag '"+g+"' is an invalid name.",F("InvalidTag",b,M(i,f))}const p=Zn(i,f);if(p===!1)return F("InvalidAttr","Attributes for '"+g+"' have open quote.",M(i,f));let m=p.value;if(f=p.index,m[m.length-1]==="/"){const b=f-m.length;m=m.substring(0,m.length-1);const y=Fe(m,a);if(y!==!0)return F(y.err.code,y.err.msg,M(i,b+y.err.line));c=!0}else if(d){if(!p.tagClosed)return F("InvalidTag","Closing tag '"+g+"' doesn't have proper closing.",M(i,f));if(m.trim().length>0)return F("InvalidTag","Closing tag '"+g+"' can't have attributes or invalid starting.",M(i,h));if(l.length===0)return F("InvalidTag","Closing tag '"+g+"' has not been opened.",M(i,h));{const b=l.pop();if(g!==b.tagName){let y=M(i,b.tagStartPos);return F("InvalidTag","Expected closing tag '"+b.tagName+"' (opened in line "+y.line+", col "+y.col+") instead of closing tag '"+g+"'.",M(i,h))}l.length==0&&(u=!0)}}else{const b=Fe(m,a);if(b!==!0)return F(b.err.code,b.err.msg,M(i,f-m.length+b.err.line));if(u===!0)return F("InvalidXml","Multiple possible root nodes found.",M(i,f));a.unpairedTags.indexOf(g)!==-1||l.push({tagName:g,tagStartPos:h}),c=!0}for(f++;f<i.length;f++)if(i[f]==="<"){if(i[f+1]==="!"){f++,f=Ie(i,f);continue}if(i[f+1]!=="?")break;if(f=$e(i,++f),f.err)return f}else if(i[f]==="&"){const b=Qn(i,f);if(b==-1)return F("InvalidChar","char '&' is not expected.",M(i,f));f=b}else if(u===!0&&!Ce(i[f]))return F("InvalidXml","Extra text at the end",M(i,f));i[f]==="<"&&f--}}}return c?l.length==1?F("InvalidTag","Unclosed tag '"+l[0].tagName+"'.",M(i,l[0].tagStartPos)):!(l.length>0)||F("InvalidXml","Invalid '"+JSON.stringify(l.map((f=>f.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):F("InvalidXml","Start tag expected.",1)})(t,e);if(o!==!0)throw Error(`${o.err.msg}:${o.err.line}:${o.err.col}`)}const n=new Rn(this.options);n.addExternalEntities(this.externalEntities);const s=n.parseXml(t);return this.options.preserveOrder||s===void 0?s:zn(s,this.options)}addEntity(t,e){if(e.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(t.indexOf("&")!==-1||t.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if(e==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}static getMetaDataSymbol(){return at.getMetaDataSymbol()}}var es=S(829),Y=S.n(es),lt=(function(r){return r.Array="array",r.Object="object",r.Original="original",r})(lt||{});function ir(r,t){if(!r.endsWith("propstat.prop.displayname"))return t}function Ot(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:lt.Original;const n=Y().get(r,t);return e==="array"&&Array.isArray(n)===!1?[n]:e==="object"&&Array.isArray(n)?n[0]:n}function Et(r,t){return t=t??{attributeNamePrefix:"@",attributeParsers:[],tagParsers:[ir]},new Promise((e=>{e((function(n){const{multistatus:s}=n;if(s==="")return{multistatus:{response:[]}};if(!s)throw new Error("Invalid response: No root multistatus found");const o={multistatus:Array.isArray(s)?s[0]:s};return Y().set(o,"multistatus.response",Ot(o,"multistatus.response",lt.Array)),Y().set(o,"multistatus.response",Y().get(o,"multistatus.response").map((i=>(function(a){const l=Object.assign({},a);return l.status?Y().set(l,"status",Ot(l,"status",lt.Object)):(Y().set(l,"propstat",Ot(l,"propstat",lt.Object)),Y().set(l,"propstat.prop",Ot(l,"propstat.prop",lt.Object))),l})(i)))),o})((function(n){let{attributeNamePrefix:s,attributeParsers:o,tagParsers:i}=n;return new or({allowBooleanAttributes:!0,attributeNamePrefix:s,textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor(a,l,c){for(const u of o)try{const f=u(c,l);if(f!==l)return f}catch{}return l},tagValueProcessor(a,l,c){for(const u of i)try{const f=u(c,l);if(f!==l)return f}catch{}return l}})})(t).parse(r)))}))}function Dt(r,t){let e=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const{getlastmodified:n=null,getcontentlength:s="0",resourcetype:o=null,getcontenttype:i=null,getetag:a=null}=r,l=o&&typeof o=="object"&&o.collection!==void 0?"directory":"file",c={filename:t,basename:St().basename(t),lastmod:n,size:parseInt(s,10),type:l,etag:typeof a=="string"?a.replace(/"/g,""):null};return l==="file"&&(c.mime=i&&typeof i=="string"?i.split(";")[0]:""),e&&(r.displayname!==void 0&&(r.displayname=String(r.displayname)),c.props=r),c}function rs(r,t){let e=arguments.length>2&&arguments[2]!==void 0&&arguments[2],n=null;try{r.multistatus.response[0].propstat&&(n=r.multistatus.response[0])}catch{}if(!n)throw new Error("Failed getting item stat: bad response");const{propstat:{prop:s,status:o}}=n,[i,a,l]=o.split(" ",3),c=parseInt(a,10);if(c>=400){const u=new Error(`Invalid response: ${c} ${l}`);throw u.status=c,u}return Dt(s,Nt(t),e)}function ns(r){switch(String(r)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(r),10)}}function Vt(r,t,e){return e?t?t(r):r:(r&&r.then||(r=Promise.resolve(r)),t?r.then(t):r)}const oe=(function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}})((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:n=!1}=e,s=D({url:$(r.remoteURL,C(t)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},r,e);return Vt(R(s,r),(function(o){return L(r,o),Vt(o.text(),(function(i){return Vt(Et(i,r.parsing),(function(a){const l=rs(a,t,n);return ht(o,l,n)}))}))}))}));function ar(r,t,e){return e?t?t(r):r:(r&&r.then||(r=Promise.resolve(r)),t?r.then(t):r)}const ss=ur((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=(function(o){if(!o||o==="/")return[];let i=o;const a=[];do a.push(i),i=St().dirname(i);while(i&&i!=="/");return a})(Nt(t));n.sort(((o,i)=>o.length>i.length?1:i.length>o.length?-1:0));let s=!1;return(function(o,i,a){if(typeof o[Re]=="function"){let p=function(m){try{for(;!(l=f.next()).done;)if((m=i(l.value))&&m.then){if(!De(m))return void m.then(p,u||(u=V.bind(null,c=new ct,2)));m=m.v}c?V(c,1,m):c=m}catch(b){V(c||(c=new ct),2,b)}};var l,c,u,f=o[Re]();if(p(),f.return){var h=function(m){try{l.done||f.return()}catch{}return m};if(c&&c.then)return c.then(h,(function(m){throw h(m)}));h()}return c}if(!("length"in o))throw new TypeError("Object is not iterable");for(var d=[],g=0;g<o.length;g++)d.push(o[g]);return(function(p,m,b){var y,v,w=-1;return(function x(N){try{for(;++w<p.length&&(!b||!b());)if((N=m(w))&&N.then){if(!De(N))return void N.then(x,v||(v=V.bind(null,y=new ct,2)));N=N.v}y?V(y,1,N):y=N}catch(E){V(y||(y=new ct),2,E)}})(),y})(d,(function(p){return i(d[p])}),a)})(n,(function(o){return i=function(){return(function(l,c){try{var u=ar(oe(r,o),(function(f){if(f.type!=="directory")throw new Error(`Path includes a file: ${t}`)}))}catch(f){return c(f)}return u&&u.then?u.then(void 0,c):u})(0,(function(l){const c=l;return(function(){if(c.status===404)return s=!0,je(Kt(r,o,{...e,recursive:!1}));throw l})()}))},(a=(function(){if(s)return je(Kt(r,o,{...e,recursive:!1}))})())&&a.then?a.then(i):i();var i,a}),(function(){return!1}))}));function ur(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}}function os(){}function je(r,t){return r&&r.then?r.then(os):Promise.resolve()}const Re=typeof Symbol<"u"?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function V(r,t,e){if(!r.s){if(e instanceof ct){if(!e.s)return void(e.o=V.bind(null,r,t));1&t&&(t=e.s),e=e.v}if(e&&e.then)return void e.then(V.bind(null,r,t),V.bind(null,r,2));r.s=t,r.v=e;const n=r.o;n&&n(r)}}const ct=(function(){function r(){}return r.prototype.then=function(t,e){const n=new r,s=this.s;if(s){const o=1&s?t:e;if(o){try{V(n,1,o(this.v))}catch(i){V(n,2,i)}return n}return this}return this.o=function(o){try{const i=o.v;1&o.s?V(n,1,t?t(i):i):e?V(n,1,e(i)):V(n,2,i)}catch(i){V(n,2,i)}},n},r})();function De(r){return r instanceof ct&&1&r.s}const Kt=ur((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e.recursive===!0)return ss(r,t,e);const n=D({url:$(r.remoteURL,(s=C(t),s.endsWith("/")?s:s+"/")),method:"MKCOL"},r,e);var s;return ar(R(n,r),(function(o){L(r,o)}))}));var is=S(388),Le=S.n(is);const as=(function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}})((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n={};if(typeof e.range=="object"&&typeof e.range.start=="number"){let a=`bytes=${e.range.start}-`;typeof e.range.end=="number"&&(a=`${a}${e.range.end}`),n.Range=a}const s=D({url:$(r.remoteURL,C(t)),method:"GET",headers:n},r,e);return i=function(a){if(L(r,a),n.Range&&a.status!==206){const l=new Error(`Invalid response code for partial request: ${a.status}`);throw l.status=a.status,l}return e.callback&&setTimeout((()=>{e.callback(a)}),0),a.body},(o=R(s,r))&&o.then||(o=Promise.resolve(o)),i?o.then(i):o;var o,i})),us=()=>{},ls=(function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}})((function(r,t,e){e.url||(e.url=$(r.remoteURL,C(t)));const n=D(e,r,{});return o=function(i){return L(r,i),i},(s=R(n,r))&&s.then||(s=Promise.resolve(s)),o?s.then(o):s;var s,o})),cs=(function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}})((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=D({url:$(r.remoteURL,C(t)),method:"DELETE"},r,e);return o=function(i){L(r,i)},(s=R(n,r))&&s.then||(s=Promise.resolve(s)),o?s.then(o):s;var s,o})),hs=(function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}})((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function(n,s){try{var o=(i=oe(r,t,e),a=function(){return!0},l?a?a(i):i:(i&&i.then||(i=Promise.resolve(i)),a?i.then(a):i))}catch(c){return s(c)}var i,a,l;return o&&o.then?o.then(void 0,s):o})(0,(function(n){if(n.status===404)return!1;throw n}))}));function Bt(r,t,e){return e?t?t(r):r:(r&&r.then||(r=Promise.resolve(r)),t?r.then(t):r)}const fs=(function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}})((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=D({url:$(r.remoteURL,C(t),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:e.deep?"infinity":"1"}},r,e);return Bt(R(n,r),(function(s){return L(r,s),Bt(s.text(),(function(o){if(!o)throw new Error("Failed parsing directory contents: Empty response");return Bt(Et(o,r.parsing),(function(i){const a=ge(t);let l=(function(c,u,f){let h=arguments.length>3&&arguments[3]!==void 0&&arguments[3],d=arguments.length>4&&arguments[4]!==void 0&&arguments[4];const g=St().join(u,"/"),{multistatus:{response:p}}=c,m=p.map((b=>{const y=(function(w){try{return w.replace(/^https?:\/\/[^\/]+/,"")}catch(x){throw new B(x,"Failed normalising HREF")}})(b.href),{propstat:{prop:v}}=b;return Dt(v,g==="/"?decodeURIComponent(Nt(y)):Nt(St().relative(decodeURIComponent(g),decodeURIComponent(y))),h)}));return d?m:m.filter((b=>b.basename&&(b.type==="file"||b.filename!==f.replace(/\/$/,""))))})(i,ge(r.remoteBasePath||r.remotePath),a,e.details,e.includeSelf);return e.glob&&(l=(function(c,u){return c.filter((f=>k(f.filename,u,{matchBase:!0})))})(l,e.glob)),ht(s,l,e.details)}))}))}))}));function ie(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}}const ps=ie((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=D({url:$(r.remoteURL,C(t)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[ms]},r,e);return jt(R(n,r),(function(s){return L(r,s),jt(s.text(),(function(o){return ht(s,o,e.details)}))}))}));function jt(r,t,e){return e?t?t(r):r:(r&&r.then||(r=Promise.resolve(r)),t?r.then(t):r)}const gs=ie((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=D({url:$(r.remoteURL,C(t)),method:"GET"},r,e);return jt(R(n,r),(function(s){let o;return L(r,s),(function(i,a){var l=i();return l&&l.then?l.then(a):a()})((function(){return jt(s.arrayBuffer(),(function(i){o=i}))}),(function(){return ht(s,o,e.details)}))}))})),ds=ie((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{format:n="binary"}=e;if(n!=="binary"&&n!=="text")throw new B({info:{code:rt.InvalidOutputFormat}},`Invalid output format: ${n}`);return n==="text"?ps(r,t,e):gs(r,t,e)})),ms=r=>r;function ys(r,t){let e="";return t.format&&t.indentBy.length>0&&(e=`
|
|
11
|
+
`),lr(r,t,"",e)}function lr(r,t,e,n){let s="",o=!1;for(let i=0;i<r.length;i++){const a=r[i],l=bs(a);if(l===void 0)continue;let c="";if(c=e.length===0?l:`${e}.${l}`,l===t.textNodeName){let d=a[l];vs(c,t)||(d=t.tagValueProcessor(l,d),d=cr(d,t)),o&&(s+=n),s+=d,o=!1;continue}if(l===t.cdataPropName){o&&(s+=n),s+=`<![CDATA[${a[l][0][t.textNodeName]}]]>`,o=!1;continue}if(l===t.commentPropName){s+=n+`<!--${a[l][0][t.textNodeName]}-->`,o=!0;continue}if(l[0]==="?"){const d=Ue(a[":@"],t),g=l==="?xml"?"":n;let p=a[l][0][t.textNodeName];p=p.length!==0?" "+p:"",s+=g+`<${l}${p}${d}?>`,o=!0;continue}let u=n;u!==""&&(u+=t.indentBy);const f=n+`<${l}${Ue(a[":@"],t)}`,h=lr(a[l],t,c,u);t.unpairedTags.indexOf(l)!==-1?t.suppressUnpairedNode?s+=f+">":s+=f+"/>":h&&h.length!==0||!t.suppressEmptyNode?h&&h.endsWith(">")?s+=f+`>${h}${n}</${l}>`:(s+=f+">",h&&n!==""&&(h.includes("/>")||h.includes("</"))?s+=n+t.indentBy+h+n:s+=h,s+=`</${l}>`):s+=f+"/>",o=!0}return s}function bs(r){const t=Object.keys(r);for(let e=0;e<t.length;e++){const n=t[e];if(r.hasOwnProperty(n)&&n!==":@")return n}}function Ue(r,t){let e="";if(r&&!t.ignoreAttributes)for(let n in r){if(!r.hasOwnProperty(n))continue;let s=t.attributeValueProcessor(n,r[n]);s=cr(s,t),s===!0&&t.suppressBooleanAttributes?e+=` ${n.substr(t.attributeNamePrefix.length)}`:e+=` ${n.substr(t.attributeNamePrefix.length)}="${s}"`}return e}function vs(r,t){let e=(r=r.substr(0,r.length-t.textNodeName.length-1)).substr(r.lastIndexOf(".")+1);for(let n in t.stopNodes)if(t.stopNodes[n]===r||t.stopNodes[n]==="*."+e)return!0;return!1}function cr(r,t){if(r&&r.length>0&&t.processEntities)for(let e=0;e<t.entities.length;e++){const n=t.entities[e];r=r.replace(n.regex,n.val)}return r}const ws={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(r,t){return t},attributeValueProcessor:function(r,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function tt(r){this.options=Object.assign({},ws,r),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=rr(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Ns),this.processTextOrObjNode=xs,this.options.format?(this.indentate=Ps,this.tagEndChar=`>
|
|
12
12
|
`,this.newLine=`
|
|
13
|
-
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function ws(r,t,e,n){const s=this.j2x(r,e+1,n.concat(t));return r[this.options.textNodeName]!==void 0&&Object.keys(r).length===1?this.buildTextValNode(r[this.options.textNodeName],t,s.attrStr,e):this.buildObjectNode(s.val,t,s.attrStr,e)}function xs(r){return this.options.indentBy.repeat(r)}function Ps(r){return!(!r.startsWith(this.options.attributeNamePrefix)||r===this.options.textNodeName)&&r.substr(this.attrPrefixLen)}function Ns(r){return new tt({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(hr({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:r}}},"d"))}function hr(r,t){const e={...r};for(const n in e)e.hasOwnProperty(n)&&(e[n]&&typeof e[n]=="object"&&n.indexOf(":")===-1?(e[`${t}:${n}`]=hr(e[n],t),delete e[n]):/^@_/.test(n)===!1&&(e[`${t}:${n}`]=e[n],delete e[n]));return e}function Kt(r,t,e){return e?t?t(r):r:(r&&r.then||(r=Promise.resolve(r)),t?r.then(t):r)}function fr(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}}tt.prototype.build=function(r){return this.options.preserveOrder?ms(r,this.options):(Array.isArray(r)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(r={[this.options.arrayNodeName]:r}),this.j2x(r,0,[]).val)},tt.prototype.j2x=function(r,t,e){let n="",s="";const o=e.join(".");for(let i in r)if(Object.prototype.hasOwnProperty.call(r,i))if(r[i]===void 0)this.isAttribute(i)&&(s+="");else if(r[i]===null)this.isAttribute(i)||i===this.options.cdataPropName?s+="":i[0]==="?"?s+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:s+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(r[i]instanceof Date)s+=this.buildTextValNode(r[i],i,"",t);else if(typeof r[i]!="object"){const a=this.isAttribute(i);if(a&&!this.ignoreAttributesFn(a,o))n+=this.buildAttrPairStr(a,""+r[i]);else if(!a)if(i===this.options.textNodeName){let l=this.options.tagValueProcessor(i,""+r[i]);s+=this.replaceEntitiesValue(l)}else s+=this.buildTextValNode(r[i],i,"",t)}else if(Array.isArray(r[i])){const a=r[i].length;let l="",c="";for(let u=0;u<a;u++){const f=r[i][u];if(f!==void 0)if(f===null)i[0]==="?"?s+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:s+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(typeof f=="object")if(this.options.oneListGroup){const h=this.j2x(f,t+1,e.concat(i));l+=h.val,this.options.attributesGroupName&&f.hasOwnProperty(this.options.attributesGroupName)&&(c+=h.attrStr)}else l+=this.processTextOrObjNode(f,i,t,e);else if(this.options.oneListGroup){let h=this.options.tagValueProcessor(i,f);h=this.replaceEntitiesValue(h),l+=h}else l+=this.buildTextValNode(f,i,"",t)}this.options.oneListGroup&&(l=this.buildObjectNode(l,i,c,t)),s+=l}else if(this.options.attributesGroupName&&i===this.options.attributesGroupName){const a=Object.keys(r[i]),l=a.length;for(let c=0;c<l;c++)n+=this.buildAttrPairStr(a[c],""+r[i][a[c]])}else s+=this.processTextOrObjNode(r[i],i,t,e);return{attrStr:n,val:s}},tt.prototype.buildAttrPairStr=function(r,t){return t=this.options.attributeValueProcessor(r,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&t==="true"?" "+r:" "+r+'="'+t+'"'},tt.prototype.buildObjectNode=function(r,t,e,n){if(r==="")return t[0]==="?"?this.indentate(n)+"<"+t+e+"?"+this.tagEndChar:this.indentate(n)+"<"+t+e+this.closeTag(t)+this.tagEndChar;{let s="</"+t+this.tagEndChar,o="";return t[0]==="?"&&(o="?",s=""),!e&&e!==""||r.indexOf("<")!==-1?this.options.commentPropName!==!1&&t===this.options.commentPropName&&o.length===0?this.indentate(n)+`<!--${r}-->`+this.newLine:this.indentate(n)+"<"+t+e+o+this.tagEndChar+r+this.indentate(n)+s:this.indentate(n)+"<"+t+e+o+">"+r+s}},tt.prototype.closeTag=function(r){let t="";return this.options.unpairedTags.indexOf(r)!==-1?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${r}`,t},tt.prototype.buildTextValNode=function(r,t,e,n){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${r}]]>`+this.newLine;if(this.options.commentPropName!==!1&&t===this.options.commentPropName)return this.indentate(n)+`<!--${r}-->`+this.newLine;if(t[0]==="?")return this.indentate(n)+"<"+t+e+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(t,r);return s=this.replaceEntitiesValue(s),s===""?this.indentate(n)+"<"+t+e+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+e+">"+s+"</"+t+this.tagEndChar}},tt.prototype.replaceEntitiesValue=function(r){if(r&&r.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const e=this.options.entities[t];r=r.replace(e.regex,e.val)}return r};const Es=fr((function(r,t,e){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=D({url:$(r.remoteURL,C(t)),method:"UNLOCK",headers:{"Lock-Token":e}},r,n);return Kt(R(s,r),(function(o){if(L(r,o),o.status!==204&&o.status!==200)throw se(o)}))})),As=fr((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{refreshToken:n,timeout:s=Ts}=e,o={Accept:"text/plain,application/xml",Timeout:s};n&&(o.If=n);const i=D({url:$(r.remoteURL,C(t)),method:"LOCK",headers:o,data:Ns(r.contactHref)},r,e);return Kt(R(i,r),(function(a){return L(r,a),Kt(a.text(),(function(l){const c=(h=l,new or({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(h)),u=Y().get(c,"prop.lockdiscovery.activelock.locktoken.href"),f=Y().get(c,"prop.lockdiscovery.activelock.timeout");var h;if(!u)throw se(a,"No lock token received: ");return{token:u,serverTimeout:f}}))}))})),Ts="Infinite, Second-4100000000";function Wt(r,t,e){return e?t?t(r):r:(r&&r.then||(r=Promise.resolve(r)),t?r.then(t):r)}const Os=(function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}})((function(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const e=t.path||"/",n=D({url:$(r.remoteURL,e),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},r,t);return Wt(R(n,r),(function(s){return L(r,s),Wt(s.text(),(function(o){return Wt(Et(o,r.parsing),(function(i){const a=(function(l){try{const[c]=l.multistatus.response,{propstat:{prop:{"quota-used-bytes":u,"quota-available-bytes":f}}}=c;return u!==void 0&&f!==void 0?{used:parseInt(String(u),10),available:rs(f)}:null}catch{}return null})(i);return ht(s,a,t.details)}))}))}))}));function qt(r,t,e){return e?t?t(r):r:(r&&r.then||(r=Promise.resolve(r)),t?r.then(t):r)}const Ss=(function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}})((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:n=!1}=e,s=D({url:$(r.remoteURL,C(t)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":r.headers["Content-Type"]||"application/xml; charset=utf-8"}},r,e);return qt(R(s,r),(function(o){return L(r,o),qt(o.text(),(function(i){return qt(Et(i,r.parsing),(function(a){const l=(function(c,u,f){const h={truncated:!1,results:[]};return h.truncated=c.multistatus.response.some((d=>(d.status||d.propstat?.status).split(" ",3)?.[1]==="507"&&d.href.replace(/\/$/,"").endsWith(C(u).replace(/\/$/,"")))),c.multistatus.response.forEach((d=>{if(d.propstat===void 0)return;const g=d.href.split("/").map(decodeURIComponent).join("/");h.results.push(Dt(d.propstat.prop,g,f))})),h})(a,t,n);return ht(o,l,n)}))}))}))})),Cs=(function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}})((function(r,t,e){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=D({url:$(r.remoteURL,C(t)),method:"MOVE",headers:{Destination:$(r.remoteURL,C(e)),Overwrite:n.overwrite===!1?"F":"T"}},r,n);return i=function(a){L(r,a)},(o=R(s,r))&&o.then||(o=Promise.resolve(o)),i?o.then(i):o;var o,i}));var $s=S(172);function Is(r){if(Je(r))return r.byteLength;if(Xe(r))return r.length;if(typeof r=="string")return(0,$s.d)(r);throw new B({info:{code:rt.DataTypeNoLength}},"Cannot calculate data length: Invalid type")}const Fs=(function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}})((function(r,t,e){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const{contentLength:s=!0,overwrite:o=!0}=n,i={"Content-Type":"application/octet-stream"};s===!1||(i["Content-Length"]=typeof s=="number"?`${s}`:`${Is(e)}`),o||(i["If-None-Match"]="*");const a=D({url:$(r.remoteURL,C(t)),method:"PUT",headers:i,data:e},r,n);return c=function(u){try{L(r,u)}catch(f){const h=f;if(h.status!==412||o)throw h;return!1}return!0},(l=R(a,r))&&l.then||(l=Promise.resolve(l)),c?l.then(c):l;var l,c})),pr=(function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}})((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=D({url:$(r.remoteURL,C(t)),method:"OPTIONS"},r,e);return o=function(i){try{L(r,i)}catch(a){throw a}return{compliance:(i.headers.get("DAV")??"").split(",").map((a=>a.trim())),server:i.headers.get("Server")??""}},(s=R(n,r))&&s.then||(s=Promise.resolve(s)),o?s.then(o):s;var s,o}));function Pt(r,t,e){return e?t?t(r):r:(r&&r.then||(r=Promise.resolve(r)),t?r.then(t):r)}const js=ae((function(r,t,e,n,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(e>n||e<0)throw new B({info:{code:rt.InvalidUpdateRange}},`Invalid update range ${e} for partial update`);const i={"Content-Type":"application/octet-stream","Content-Length":""+(n-e+1),"Content-Range":`bytes ${e}-${n}/*`},a=D({url:$(r.remoteURL,C(t)),method:"PUT",headers:i,data:s},r,o);return Pt(R(a,r),(function(l){L(r,l)}))}));function ke(r,t){var e=r();return e&&e.then?e.then(t):t(e)}const Rs=ae((function(r,t,e,n,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(e>n||e<0)throw new B({info:{code:rt.InvalidUpdateRange}},`Invalid update range ${e} for partial update`);const i={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(n-e+1),"X-Update-Range":`bytes=${e}-${n}`},a=D({url:$(r.remoteURL,C(t)),method:"PATCH",headers:i,data:s},r,o);return Pt(R(a,r),(function(l){L(r,l)}))}));function ae(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}}const Ds=ae((function(r,t,e,n,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};return Pt(pr(r,t,o),(function(i){let a=!1;return ke((function(){if(i.compliance.includes("sabredav-partialupdate"))return Pt(Rs(r,t,e,n,s,o),(function(l){return a=!0,l}))}),(function(l){let c=!1;return a?l:ke((function(){if(i.server.includes("Apache")&&i.compliance.includes("<http://apache.org/dav/propset/fs/1>"))return Pt(js(r,t,e,n,s,o),(function(u){return c=!0,u}))}),(function(u){if(c)return u;throw new B({info:{code:rt.NotSupported}},"Not supported")}))}))}))})),Ls="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function Us(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{authType:e=null,remoteBasePath:n,contactHref:s=Ls,ha1:o,headers:i={},httpAgent:a,httpsAgent:l,password:c,token:u,username:f,withCredentials:h}=t;let d=e;d||(d=f||c?q.Password:q.None);const g={authType:d,remoteBasePath:n,contactHref:s,ha1:o,headers:Object.assign({},i),httpAgent:a,httpsAgent:l,password:c,parsing:{attributeNamePrefix:t.attributeNamePrefix??"@",attributeParsers:[],tagParsers:[ir]},remotePath:Br(r),remoteURL:r,token:u,username:f,withCredentials:h};return ze(g,f,c,u,o),{copyFile:(p,m,b)=>An(g,p,m,b),createDirectory:(p,m)=>Zt(g,p,m),createReadStream:(p,m)=>(function(b,y){let v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const w=new(Le()).PassThrough;return is(b,y,v).then((x=>{x.pipe(w)})).catch((x=>{w.emit("error",x)})),w})(g,p,m),createWriteStream:(p,m,b)=>(function(y,v){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:as;const N=new(Le()).PassThrough,E={};w.overwrite===!1&&(E["If-None-Match"]="*");const O=D({url:$(y.remoteURL,C(v)),method:"PUT",headers:E,data:N,maxRedirects:0},y,w);return R(O,y).then((A=>L(y,A))).then((A=>{setTimeout((()=>{x(A)}),0)})).catch((A=>{N.emit("error",A)})),N})(g,p,m,b),customRequest:(p,m)=>us(g,p,m),deleteFile:(p,m)=>ls(g,p,m),exists:(p,m)=>cs(g,p,m),getDirectoryContents:(p,m)=>hs(g,p,m),getFileContents:(p,m)=>gs(g,p,m),getFileDownloadLink:p=>(function(m,b){let y=$(m.remoteURL,C(b));const v=/^https:/i.test(y)?"https":"http";switch(m.authType){case q.None:break;case q.Password:{const w=me(m.headers.Authorization.replace(/^Basic /i,"").trim());y=y.replace(/^https?:\/\//,`${v}://${w}@`);break}default:throw new B({info:{code:rt.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${m.authType}`)}return y})(g,p),getFileUploadLink:p=>(function(m,b){let y=`${$(m.remoteURL,C(b))}?Content-Type=application/octet-stream`;const v=/^https:/i.test(y)?"https":"http";switch(m.authType){case q.None:break;case q.Password:{const w=me(m.headers.Authorization.replace(/^Basic /i,"").trim());y=y.replace(/^https?:\/\//,`${v}://${w}@`);break}default:throw new B({info:{code:rt.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${m.authType}`)}return y})(g,p),getHeaders:()=>Object.assign({},g.headers),getQuota:p=>Os(g,p),lock:(p,m)=>As(g,p,m),moveFile:(p,m,b)=>Cs(g,p,m,b),putFileContents:(p,m,b)=>Fs(g,p,m,b),partialUpdateFileContents:(p,m,b,y,v)=>Ds(g,p,m,b,y,v),getDAVCompliance:p=>pr(g,p),search:(p,m)=>Ss(g,p,m),setHeaders:p=>{g.headers=Object.assign({},p)},stat:(p,m)=>oe(g,p,m),unlock:(p,m,b)=>Es(g,p,m,b),registerAttributeParser:p=>{g.parsing.attributeParsers.push(p)},registerTagParser:p=>{g.parsing.tagParsers.push(p)}}}const U=[];for(let r=0;r<256;++r)U.push((r+256).toString(16).slice(1));function ks(r,t=0){return(U[r[t+0]]+U[r[t+1]]+U[r[t+2]]+U[r[t+3]]+"-"+U[r[t+4]]+U[r[t+5]]+"-"+U[r[t+6]]+U[r[t+7]]+"-"+U[r[t+8]]+U[r[t+9]]+"-"+U[r[t+10]]+U[r[t+11]]+U[r[t+12]]+U[r[t+13]]+U[r[t+14]]+U[r[t+15]]).toLowerCase()}let Gt;const Ms=new Uint8Array(16);function _s(){if(!Gt){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Gt=crypto.getRandomValues.bind(crypto)}return Gt(Ms)}const Vs=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Me={randomUUID:Vs};function Bs(r,t,e){r=r||{};const n=r.random??r.rng?.()??_s();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,ks(n)}function Ws(r,t,e){return Me.randomUUID&&!r?Me.randomUUID():Bs(r)}const Qt=(r,t)=>Object.fromEntries(Object.entries(r).map(([e,n])=>t.includes(e)?[e,n||""]:[T.DavProperties.DavNamespace.includes(e)?`d:${e}`:`oc:${e}`,n||""])),_e=(r=[],{pattern:t,filterRules:e,limit:n=0,extraProps:s=[]})=>{let o="d:propfind";t&&(o="oc:search-files"),e&&(o="oc:filter-files");const i=r.reduce((u,f)=>Object.assign(u,{[f]:null}),{}),a=Qt(i,s),l={[o]:{"d:prop":a,"@@xmlns:d":"DAV:","@@xmlns:oc":"http://owncloud.org/ns",...t&&{"oc:search":{"oc:pattern":t,"oc:limit":n}},...e&&{"oc:filter-rules":Qt(e,[])}}};return new K({format:!0,ignoreAttributes:!1,attributeNamePrefix:"@@",suppressEmptyNode:!0}).build(l)},qs=r=>{const t={"d:propertyupdate":{"d:set":{"d:prop":Qt(r,[])},"@@xmlns:d":"DAV:","@@xmlns:oc":"http://owncloud.org/ns"}};return new K({format:!0,ignoreAttributes:!1,attributeNamePrefix:"@@",suppressEmptyNode:!0}).build(t)},Gs=r=>{const t={},e=r.get("tus-version");return e?(t.version=e.split(","),r.get("tus-extension")&&(t.extension=r.get("tus-extension").split(",")),r.get("tus-resumable")&&(t.resumable=r.get("tus-resumable")),r.get("tus-max-size")&&(t.maxSize=parseInt(r.get("tus-max-size"),10)),t):null},zs=async r=>{const t=n=>{const s=decodeURIComponent(n);return n?.startsWith("/remote.php/dav/")?I.urlJoin(s.replace("/remote.php/dav/",""),{leadingSlash:!0,trailingSlash:!1}):s};return(await Et(r)).multistatus.response.map(({href:n,propstat:s})=>{const o={...Dt(s.prop,t(n),!0),processing:s.status==="HTTP/1.1 425 TOO EARLY"};return o.props.name&&(o.props.name=o.props.name.toString()),o})},Hs=r=>{const t=new te.XMLParser,e={message:"Unknown error",errorCode:void 0};try{const n=t.parse(r);if(!n["d:error"])return e;if(n["d:error"]["s:message"]){const s=n["d:error"]["s:message"];typeof s=="string"&&(e.message=s)}if(n["d:error"]["s:errorcode"]){const s=n["d:error"]["s:errorcode"];typeof s=="string"&&(e.errorCode=s)}}catch{return e}return e};class Js{client;davPath;headers;extraProps;constructor({baseUrl:t,headers:e}){this.davPath=I.urlJoin(t,"remote.php/dav"),this.client=Us(this.davPath,{}),this.headers=e,this.extraProps=[]}mkcol(t,e={}){return this.request(t,{method:T.DavMethod.mkcol,...e})}async propfind(t,{depth:e=1,properties:n=[],headers:s={},...o}={}){const i={...s,Depth:e.toString()},{body:a,result:l}=await this.request(t,{method:T.DavMethod.propfind,data:_e(n,{extraProps:this.extraProps}),headers:i,...o});return a?.length&&(a[0].tusSupport=Gs(l.headers)),a}async report(t,{pattern:e="",filterRules:n=null,limit:s=30,properties:o,...i}={}){const{body:a,result:l}=await this.request(t,{method:T.DavMethod.report,data:_e(o,{pattern:e,filterRules:n,limit:s,extraProps:this.extraProps}),...i});return{results:a,range:l.headers.get("content-range")}}copy(t,e,{overwrite:n=!1,headers:s={},...o}={}){const i=I.urlJoin(this.davPath,wt(e));return this.request(t,{method:T.DavMethod.copy,headers:{...s,Destination:i,overwrite:n?"T":"F"},...o})}move(t,e,{overwrite:n=!1,headers:s={},...o}={}){const i=I.urlJoin(this.davPath,wt(e));return this.request(t,{method:T.DavMethod.move,headers:{...s,Destination:i,overwrite:n?"T":"F"},...o})}put(t,e,{headers:n={},onUploadProgress:s,previousEntityTag:o,overwrite:i,...a}={}){const l={...n};return o?l["If-Match"]=o:i||(l["If-None-Match"]="*"),this.request(t,{method:T.DavMethod.put,data:e,headers:l,onUploadProgress:s,...a})}delete(t,e={}){return this.request(t,{method:T.DavMethod.delete,...e})}propPatch(t,e,n={}){const s=qs(e);return this.request(t,{method:T.DavMethod.proppatch,data:s,...n})}getFileUrl(t){return I.urlJoin(this.davPath,wt(t))}buildHeaders(t={}){return{"Content-Type":"application/xml; charset=utf-8","X-Requested-With":"XMLHttpRequest","X-Request-ID":Ws(),...this.headers&&{...this.headers()},...t}}async request(t,e){const n=I.urlJoin(this.davPath,wt(t),{leadingSlash:!0}),s={...e,url:n,headers:this.buildHeaders(e.headers||{})};try{const o=await this.client.customRequest("",s);let i;if(o.status===207){const a=await o.text();i=await zs(a)}return{body:i,status:o.status,result:o}}catch(o){const{response:i}=o,a=await i.text(),l=Hs(a);throw new Ve(l.message,l.errorCode,i,i.status)}}}const Xs=(r,t)=>({async listFileVersions(e,n={}){const[s,...o]=await r.propfind(I.urlJoin("meta",e,"v",{leadingSlash:!0}),n);return o.map(i=>T.buildResource(i,r.extraProps))}}),Ys=(r,t)=>({setFavorite(e,{path:n},s,o={}){const i={[T.DavProperty.IsFavorite]:s?"true":"false"};return r.propPatch(I.urlJoin(e.webDavPath,n),i,o)}}),Zs=(r,t)=>({listFavoriteFiles({davProperties:e=T.DavProperties.Default,username:n="",...s}={}){return r.report(I.urlJoin("files",n),{properties:e,filterRules:{favorite:1},...s})}}),Ks=(r,t)=>{const e=et.axios.create();t&&e.interceptors.request.use(P=>(Object.assign(P.headers,t()),P));const n={axiosClient:e,baseUrl:r},s=new Js({baseUrl:r,headers:t}),o=P=>{s.extraProps.push(P)},i=Ur(s),{getPathForFileId:a}=i,l=Cr(s,i),{listFiles:c}=l,u=Tr(l),{getFileInfo:f}=u,{createFolder:h}=Er(s,u),d=Ar(s,n),{getFileContents:g}=d,{putFileContents:p}=Ir(s,u),{getFileUrl:m,revokeUrl:b}=Or(s,d,u,n),{getPublicFileUrl:y}=Sr(s),{copyFiles:v}=Nr(s),{moveFiles:w}=$r(s),{deleteFile:x}=Fr(s),{restoreFile:N}=jr(s),{listFileVersions:E}=Xs(s),{restoreFileVersion:O}=Rr(s),{clearTrashBin:A}=Dr(s),{search:j}=Lr(s),{listFavoriteFiles:nt}=Zs(s),{setFavorite:st}=Ys(s);return{copyFiles:v,createFolder:h,deleteFile:x,restoreFile:N,restoreFileVersion:O,getFileContents:g,getFileInfo:f,getFileUrl:m,getPublicFileUrl:y,getPathForFileId:a,listFiles:c,listFileVersions:E,moveFiles:w,putFileContents:p,revokeUrl:b,clearTrashBin:A,search:j,listFavoriteFiles:nt,setFavorite:st,registerExtraProp:o}};exports.DavHttpError=Ve;exports.HttpError=ee;exports.encodePath=wt;exports.webdav=Ks;
|
|
13
|
+
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function xs(r,t,e,n){const s=this.j2x(r,e+1,n.concat(t));return r[this.options.textNodeName]!==void 0&&Object.keys(r).length===1?this.buildTextValNode(r[this.options.textNodeName],t,s.attrStr,e):this.buildObjectNode(s.val,t,s.attrStr,e)}function Ps(r){return this.options.indentBy.repeat(r)}function Ns(r){return!(!r.startsWith(this.options.attributeNamePrefix)||r===this.options.textNodeName)&&r.substr(this.attrPrefixLen)}function Es(r){return new tt({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(hr({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:r}}},"d"))}function hr(r,t){const e={...r};for(const n in e)e.hasOwnProperty(n)&&(e[n]&&typeof e[n]=="object"&&n.indexOf(":")===-1?(e[`${t}:${n}`]=hr(e[n],t),delete e[n]):/^@_/.test(n)===!1&&(e[`${t}:${n}`]=e[n],delete e[n]));return e}function Qt(r,t,e){return e?t?t(r):r:(r&&r.then||(r=Promise.resolve(r)),t?r.then(t):r)}function fr(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}}tt.prototype.build=function(r){return this.options.preserveOrder?ys(r,this.options):(Array.isArray(r)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(r={[this.options.arrayNodeName]:r}),this.j2x(r,0,[]).val)},tt.prototype.j2x=function(r,t,e){let n="",s="";const o=e.join(".");for(let i in r)if(Object.prototype.hasOwnProperty.call(r,i))if(r[i]===void 0)this.isAttribute(i)&&(s+="");else if(r[i]===null)this.isAttribute(i)||i===this.options.cdataPropName?s+="":i[0]==="?"?s+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:s+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(r[i]instanceof Date)s+=this.buildTextValNode(r[i],i,"",t);else if(typeof r[i]!="object"){const a=this.isAttribute(i);if(a&&!this.ignoreAttributesFn(a,o))n+=this.buildAttrPairStr(a,""+r[i]);else if(!a)if(i===this.options.textNodeName){let l=this.options.tagValueProcessor(i,""+r[i]);s+=this.replaceEntitiesValue(l)}else s+=this.buildTextValNode(r[i],i,"",t)}else if(Array.isArray(r[i])){const a=r[i].length;let l="",c="";for(let u=0;u<a;u++){const f=r[i][u];if(f!==void 0)if(f===null)i[0]==="?"?s+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:s+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(typeof f=="object")if(this.options.oneListGroup){const h=this.j2x(f,t+1,e.concat(i));l+=h.val,this.options.attributesGroupName&&f.hasOwnProperty(this.options.attributesGroupName)&&(c+=h.attrStr)}else l+=this.processTextOrObjNode(f,i,t,e);else if(this.options.oneListGroup){let h=this.options.tagValueProcessor(i,f);h=this.replaceEntitiesValue(h),l+=h}else l+=this.buildTextValNode(f,i,"",t)}this.options.oneListGroup&&(l=this.buildObjectNode(l,i,c,t)),s+=l}else if(this.options.attributesGroupName&&i===this.options.attributesGroupName){const a=Object.keys(r[i]),l=a.length;for(let c=0;c<l;c++)n+=this.buildAttrPairStr(a[c],""+r[i][a[c]])}else s+=this.processTextOrObjNode(r[i],i,t,e);return{attrStr:n,val:s}},tt.prototype.buildAttrPairStr=function(r,t){return t=this.options.attributeValueProcessor(r,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&t==="true"?" "+r:" "+r+'="'+t+'"'},tt.prototype.buildObjectNode=function(r,t,e,n){if(r==="")return t[0]==="?"?this.indentate(n)+"<"+t+e+"?"+this.tagEndChar:this.indentate(n)+"<"+t+e+this.closeTag(t)+this.tagEndChar;{let s="</"+t+this.tagEndChar,o="";return t[0]==="?"&&(o="?",s=""),!e&&e!==""||r.indexOf("<")!==-1?this.options.commentPropName!==!1&&t===this.options.commentPropName&&o.length===0?this.indentate(n)+`<!--${r}-->`+this.newLine:this.indentate(n)+"<"+t+e+o+this.tagEndChar+r+this.indentate(n)+s:this.indentate(n)+"<"+t+e+o+">"+r+s}},tt.prototype.closeTag=function(r){let t="";return this.options.unpairedTags.indexOf(r)!==-1?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${r}`,t},tt.prototype.buildTextValNode=function(r,t,e,n){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${r}]]>`+this.newLine;if(this.options.commentPropName!==!1&&t===this.options.commentPropName)return this.indentate(n)+`<!--${r}-->`+this.newLine;if(t[0]==="?")return this.indentate(n)+"<"+t+e+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(t,r);return s=this.replaceEntitiesValue(s),s===""?this.indentate(n)+"<"+t+e+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+e+">"+s+"</"+t+this.tagEndChar}},tt.prototype.replaceEntitiesValue=function(r){if(r&&r.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const e=this.options.entities[t];r=r.replace(e.regex,e.val)}return r};const As=fr((function(r,t,e){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=D({url:$(r.remoteURL,C(t)),method:"UNLOCK",headers:{"Lock-Token":e}},r,n);return Qt(R(s,r),(function(o){if(L(r,o),o.status!==204&&o.status!==200)throw se(o)}))})),Ts=fr((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{refreshToken:n,timeout:s=Os}=e,o={Accept:"text/plain,application/xml",Timeout:s};n&&(o.If=n);const i=D({url:$(r.remoteURL,C(t)),method:"LOCK",headers:o,data:Es(r.contactHref)},r,e);return Qt(R(i,r),(function(a){return L(r,a),Qt(a.text(),(function(l){const c=(h=l,new or({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(h)),u=Y().get(c,"prop.lockdiscovery.activelock.locktoken.href"),f=Y().get(c,"prop.lockdiscovery.activelock.timeout");var h;if(!u)throw se(a,"No lock token received: ");return{token:u,serverTimeout:f}}))}))})),Os="Infinite, Second-4100000000";function Wt(r,t,e){return e?t?t(r):r:(r&&r.then||(r=Promise.resolve(r)),t?r.then(t):r)}const Ss=(function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}})((function(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const e=t.path||"/",n=D({url:$(r.remoteURL,e),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},r,t);return Wt(R(n,r),(function(s){return L(r,s),Wt(s.text(),(function(o){return Wt(Et(o,r.parsing),(function(i){const a=(function(l){try{const[c]=l.multistatus.response,{propstat:{prop:{"quota-used-bytes":u,"quota-available-bytes":f}}}=c;return u!==void 0&&f!==void 0?{used:parseInt(String(u),10),available:ns(f)}:null}catch{}return null})(i);return ht(s,a,t.details)}))}))}))}));function qt(r,t,e){return e?t?t(r):r:(r&&r.then||(r=Promise.resolve(r)),t?r.then(t):r)}const Cs=(function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}})((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:n=!1}=e,s=D({url:$(r.remoteURL,C(t)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":r.headers["Content-Type"]||"application/xml; charset=utf-8"}},r,e);return qt(R(s,r),(function(o){return L(r,o),qt(o.text(),(function(i){return qt(Et(i,r.parsing),(function(a){const l=(function(c,u,f){const h={truncated:!1,results:[]};return h.truncated=c.multistatus.response.some((d=>(d.status||d.propstat?.status).split(" ",3)?.[1]==="507"&&d.href.replace(/\/$/,"").endsWith(C(u).replace(/\/$/,"")))),c.multistatus.response.forEach((d=>{if(d.propstat===void 0)return;const g=d.href.split("/").map(decodeURIComponent).join("/");h.results.push(Dt(d.propstat.prop,g,f))})),h})(a,t,n);return ht(o,l,n)}))}))}))})),$s=(function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}})((function(r,t,e){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=D({url:$(r.remoteURL,C(t)),method:"MOVE",headers:{Destination:$(r.remoteURL,C(e)),Overwrite:n.overwrite===!1?"F":"T"}},r,n);return i=function(a){L(r,a)},(o=R(s,r))&&o.then||(o=Promise.resolve(o)),i?o.then(i):o;var o,i}));var Is=S(172);function Fs(r){if(Je(r))return r.byteLength;if(Xe(r))return r.length;if(typeof r=="string")return(0,Is.d)(r);throw new B({info:{code:rt.DataTypeNoLength}},"Cannot calculate data length: Invalid type")}const js=(function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}})((function(r,t,e){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const{contentLength:s=!0,overwrite:o=!0}=n,i={"Content-Type":"application/octet-stream"};s===!1||(i["Content-Length"]=typeof s=="number"?`${s}`:`${Fs(e)}`),o||(i["If-None-Match"]="*");const a=D({url:$(r.remoteURL,C(t)),method:"PUT",headers:i,data:e},r,n);return c=function(u){try{L(r,u)}catch(f){const h=f;if(h.status!==412||o)throw h;return!1}return!0},(l=R(a,r))&&l.then||(l=Promise.resolve(l)),c?l.then(c):l;var l,c})),pr=(function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}})((function(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=D({url:$(r.remoteURL,C(t)),method:"OPTIONS"},r,e);return o=function(i){try{L(r,i)}catch(a){throw a}return{compliance:(i.headers.get("DAV")??"").split(",").map((a=>a.trim())),server:i.headers.get("Server")??""}},(s=R(n,r))&&s.then||(s=Promise.resolve(s)),o?s.then(o):s;var s,o}));function Pt(r,t,e){return e?t?t(r):r:(r&&r.then||(r=Promise.resolve(r)),t?r.then(t):r)}const Rs=ae((function(r,t,e,n,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(e>n||e<0)throw new B({info:{code:rt.InvalidUpdateRange}},`Invalid update range ${e} for partial update`);const i={"Content-Type":"application/octet-stream","Content-Length":""+(n-e+1),"Content-Range":`bytes ${e}-${n}/*`},a=D({url:$(r.remoteURL,C(t)),method:"PUT",headers:i,data:s},r,o);return Pt(R(a,r),(function(l){L(r,l)}))}));function ke(r,t){var e=r();return e&&e.then?e.then(t):t(e)}const Ds=ae((function(r,t,e,n,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(e>n||e<0)throw new B({info:{code:rt.InvalidUpdateRange}},`Invalid update range ${e} for partial update`);const i={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(n-e+1),"X-Update-Range":`bytes=${e}-${n}`},a=D({url:$(r.remoteURL,C(t)),method:"PATCH",headers:i,data:s},r,o);return Pt(R(a,r),(function(l){L(r,l)}))}));function ae(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(n){return Promise.reject(n)}}}const Ls=ae((function(r,t,e,n,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};return Pt(pr(r,t,o),(function(i){let a=!1;return ke((function(){if(i.compliance.includes("sabredav-partialupdate"))return Pt(Ds(r,t,e,n,s,o),(function(l){return a=!0,l}))}),(function(l){let c=!1;return a?l:ke((function(){if(i.server.includes("Apache")&&i.compliance.includes("<http://apache.org/dav/propset/fs/1>"))return Pt(Rs(r,t,e,n,s,o),(function(u){return c=!0,u}))}),(function(u){if(c)return u;throw new B({info:{code:rt.NotSupported}},"Not supported")}))}))}))})),Us="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function ks(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{authType:e=null,remoteBasePath:n,contactHref:s=Us,ha1:o,headers:i={},httpAgent:a,httpsAgent:l,password:c,token:u,username:f,withCredentials:h}=t;let d=e;d||(d=f||c?q.Password:q.None);const g={authType:d,remoteBasePath:n,contactHref:s,ha1:o,headers:Object.assign({},i),httpAgent:a,httpsAgent:l,password:c,parsing:{attributeNamePrefix:t.attributeNamePrefix??"@",attributeParsers:[],tagParsers:[ir]},remotePath:Wr(r),remoteURL:r,token:u,username:f,withCredentials:h};return ze(g,f,c,u,o),{copyFile:(p,m,b)=>Tn(g,p,m,b),createDirectory:(p,m)=>Kt(g,p,m),createReadStream:(p,m)=>(function(b,y){let v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const w=new(Le()).PassThrough;return as(b,y,v).then((x=>{x.pipe(w)})).catch((x=>{w.emit("error",x)})),w})(g,p,m),createWriteStream:(p,m,b)=>(function(y,v){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:us;const N=new(Le()).PassThrough,E={};w.overwrite===!1&&(E["If-None-Match"]="*");const O=D({url:$(y.remoteURL,C(v)),method:"PUT",headers:E,data:N,maxRedirects:0},y,w);return R(O,y).then((A=>L(y,A))).then((A=>{setTimeout((()=>{x(A)}),0)})).catch((A=>{N.emit("error",A)})),N})(g,p,m,b),customRequest:(p,m)=>ls(g,p,m),deleteFile:(p,m)=>cs(g,p,m),exists:(p,m)=>hs(g,p,m),getDirectoryContents:(p,m)=>fs(g,p,m),getFileContents:(p,m)=>ds(g,p,m),getFileDownloadLink:p=>(function(m,b){let y=$(m.remoteURL,C(b));const v=/^https:/i.test(y)?"https":"http";switch(m.authType){case q.None:break;case q.Password:{const w=me(m.headers.Authorization.replace(/^Basic /i,"").trim());y=y.replace(/^https?:\/\//,`${v}://${w}@`);break}default:throw new B({info:{code:rt.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${m.authType}`)}return y})(g,p),getFileUploadLink:p=>(function(m,b){let y=`${$(m.remoteURL,C(b))}?Content-Type=application/octet-stream`;const v=/^https:/i.test(y)?"https":"http";switch(m.authType){case q.None:break;case q.Password:{const w=me(m.headers.Authorization.replace(/^Basic /i,"").trim());y=y.replace(/^https?:\/\//,`${v}://${w}@`);break}default:throw new B({info:{code:rt.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${m.authType}`)}return y})(g,p),getHeaders:()=>Object.assign({},g.headers),getQuota:p=>Ss(g,p),lock:(p,m)=>Ts(g,p,m),moveFile:(p,m,b)=>$s(g,p,m,b),putFileContents:(p,m,b)=>js(g,p,m,b),partialUpdateFileContents:(p,m,b,y,v)=>Ls(g,p,m,b,y,v),getDAVCompliance:p=>pr(g,p),search:(p,m)=>Cs(g,p,m),setHeaders:p=>{g.headers=Object.assign({},p)},stat:(p,m)=>oe(g,p,m),unlock:(p,m,b)=>As(g,p,m,b),registerAttributeParser:p=>{g.parsing.attributeParsers.push(p)},registerTagParser:p=>{g.parsing.tagParsers.push(p)}}}const U=[];for(let r=0;r<256;++r)U.push((r+256).toString(16).slice(1));function Ms(r,t=0){return(U[r[t+0]]+U[r[t+1]]+U[r[t+2]]+U[r[t+3]]+"-"+U[r[t+4]]+U[r[t+5]]+"-"+U[r[t+6]]+U[r[t+7]]+"-"+U[r[t+8]]+U[r[t+9]]+"-"+U[r[t+10]]+U[r[t+11]]+U[r[t+12]]+U[r[t+13]]+U[r[t+14]]+U[r[t+15]]).toLowerCase()}let Gt;const _s=new Uint8Array(16);function Vs(){if(!Gt){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Gt=crypto.getRandomValues.bind(crypto)}return Gt(_s)}const Bs=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Me={randomUUID:Bs};function Ws(r,t,e){r=r||{};const n=r.random??r.rng?.()??Vs();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Ms(n)}function qs(r,t,e){return Me.randomUUID&&!r?Me.randomUUID():Ws(r)}const te=(r,t)=>Object.fromEntries(Object.entries(r).map(([e,n])=>t.includes(e)?[e,n||""]:[T.DavProperties.DavNamespace.includes(e)?`d:${e}`:`oc:${e}`,n||""])),_e=(r=[],{pattern:t,filterRules:e,limit:n=0,extraProps:s=[]})=>{let o="d:propfind";t&&(o="oc:search-files"),e&&(o="oc:filter-files");const i=r.reduce((u,f)=>Object.assign(u,{[f]:null}),{}),a=te(i,s),l={[o]:{"d:prop":a,"@@xmlns:d":"DAV:","@@xmlns:oc":"http://owncloud.org/ns",...t&&{"oc:search":{"oc:pattern":t,"oc:limit":n}},...e&&{"oc:filter-rules":te(e,[])}}};return new K({format:!0,ignoreAttributes:!1,attributeNamePrefix:"@@",suppressEmptyNode:!0}).build(l)},Gs=r=>{const t={"d:propertyupdate":{"d:set":{"d:prop":te(r,[])},"@@xmlns:d":"DAV:","@@xmlns:oc":"http://owncloud.org/ns"}};return new K({format:!0,ignoreAttributes:!1,attributeNamePrefix:"@@",suppressEmptyNode:!0}).build(t)},zs=r=>{const t={},e=r.get("tus-version");return e?(t.version=e.split(","),r.get("tus-extension")&&(t.extension=r.get("tus-extension").split(",")),r.get("tus-resumable")&&(t.resumable=r.get("tus-resumable")),r.get("tus-max-size")&&(t.maxSize=parseInt(r.get("tus-max-size"),10)),t):null},Hs=async r=>{const t=n=>{const s=decodeURIComponent(n);return n?.startsWith("/remote.php/dav/")?I.urlJoin(s.replace("/remote.php/dav/",""),{leadingSlash:!0,trailingSlash:!1}):s};return(await Et(r)).multistatus.response.map(({href:n,propstat:s})=>{const o={...Dt(s.prop,t(n),!0),processing:s.status==="HTTP/1.1 425 TOO EARLY"};return o.props.name&&(o.props.name=o.props.name.toString()),o})},Js=r=>{const t=new Ve.XMLParser,e={message:"Unknown error",errorCode:void 0};try{const n=t.parse(r);if(!n["d:error"])return e;if(n["d:error"]["s:message"]){const s=n["d:error"]["s:message"];typeof s=="string"&&(e.message=s)}if(n["d:error"]["s:errorcode"]){const s=n["d:error"]["s:errorcode"];typeof s=="string"&&(e.errorCode=s)}}catch{return e}return e};class Xs{client;davPath;headers;extraProps;constructor({baseUrl:t,headers:e}){this.davPath=I.urlJoin(t,"remote.php/dav"),this.client=ks(this.davPath,{}),this.headers=e,this.extraProps=[]}mkcol(t,e={}){return this.request(t,{method:T.DavMethod.mkcol,...e})}async propfind(t,{depth:e=1,properties:n=[],headers:s={},...o}={}){const i={...s,Depth:e.toString()},{body:a,result:l}=await this.request(t,{method:T.DavMethod.propfind,data:_e(n,{extraProps:this.extraProps}),headers:i,...o});return a?.length&&(a[0].tusSupport=zs(l.headers)),a}async report(t,{pattern:e="",filterRules:n=null,limit:s=30,properties:o,...i}={}){const{body:a,result:l}=await this.request(t,{method:T.DavMethod.report,data:_e(o,{pattern:e,filterRules:n,limit:s,extraProps:this.extraProps}),...i});return{results:a,range:l.headers.get("content-range")}}copy(t,e,{overwrite:n=!1,headers:s={},...o}={}){const i=I.urlJoin(this.davPath,wt(e));return this.request(t,{method:T.DavMethod.copy,headers:{...s,Destination:i,overwrite:n?"T":"F"},...o})}move(t,e,{overwrite:n=!1,headers:s={},...o}={}){const i=I.urlJoin(this.davPath,wt(e));return this.request(t,{method:T.DavMethod.move,headers:{...s,Destination:i,overwrite:n?"T":"F"},...o})}put(t,e,{headers:n={},onUploadProgress:s,previousEntityTag:o,overwrite:i,...a}={}){const l={...n};return o?l["If-Match"]=o:i||(l["If-None-Match"]="*"),this.request(t,{method:T.DavMethod.put,data:e,headers:l,onUploadProgress:s,...a})}delete(t,e={}){return this.request(t,{method:T.DavMethod.delete,...e})}propPatch(t,e,n={}){const s=Gs(e);return this.request(t,{method:T.DavMethod.proppatch,data:s,...n})}getFileUrl(t){return I.urlJoin(this.davPath,wt(t))}buildHeaders(t={}){return{"Content-Type":"application/xml; charset=utf-8","X-Requested-With":"XMLHttpRequest","X-Request-ID":qs(),...this.headers&&{...this.headers()},...t}}async request(t,e){const n=I.urlJoin(this.davPath,wt(t),{leadingSlash:!0}),s={...e,url:n,headers:this.buildHeaders(e.headers||{})};try{const o=await this.client.customRequest("",s);let i;if(o.status===207){const a=await o.text();i=await Hs(a)}return{body:i,status:o.status,result:o}}catch(o){const{response:i}=o,a=await i.text(),l=Js(a);throw new Be(l.message,l.errorCode,i,i.status)}}}const Ys=(r,t)=>({async listFileVersions(e,n={}){const[s,...o]=await r.propfind(I.urlJoin("meta",e,"v",{leadingSlash:!0}),n);return o.map(i=>T.buildResource(i,r.extraProps))}}),Zs=(r,t)=>({setFavorite(e,{path:n},s,o={}){const i={[T.DavProperty.IsFavorite]:s?"true":"false"};return r.propPatch(I.urlJoin(e.webDavPath,n),i,o)}}),Ks=(r,t)=>({listFavoriteFiles({davProperties:e=T.DavProperties.Default,username:n="",...s}={}){return r.report(I.urlJoin("files",n),{properties:e,filterRules:{favorite:1},...s})}}),Qs=(r,t)=>{const e=et.axios.create();t&&e.interceptors.request.use(P=>(Object.assign(P.headers,t()),P));const n={axiosClient:e,baseUrl:r},s=new Xs({baseUrl:r,headers:t}),o=P=>{s.extraProps.push(P)},i=kr(s),{getPathForFileId:a}=i,l=$r(s,i),{listFiles:c}=l,u=Or(l),{getFileInfo:f}=u,{createFolder:h}=Ar(s,u),d=Tr(s,n),{getFileContents:g}=d,{putFileContents:p}=Fr(s,u),{getFileUrl:m,revokeUrl:b}=Sr(s,d,u,n),{getPublicFileUrl:y}=Cr(s),{copyFiles:v}=Er(s),{moveFiles:w}=Ir(s),{deleteFile:x}=jr(s),{restoreFile:N}=Rr(s),{listFileVersions:E}=Ys(s),{restoreFileVersion:O}=Dr(s),{clearTrashBin:A}=Lr(s),{search:j}=Ur(s),{listFavoriteFiles:nt}=Ks(s),{setFavorite:st}=Zs(s);return{copyFiles:v,createFolder:h,deleteFile:x,restoreFile:N,restoreFileVersion:O,getFileContents:g,getFileInfo:f,getFileUrl:m,getPublicFileUrl:y,getPathForFileId:a,listFiles:c,listFileVersions:E,moveFiles:w,putFileContents:p,revokeUrl:b,clearTrashBin:A,search:j,listFavoriteFiles:nt,setFavorite:st,registerExtraProp:o}};exports.DavHttpError=Be;exports.HttpError=ee;exports.encodePath=wt;exports.webdav=Qs;
|