@opencloud-eu/web-client 3.2.0 → 4.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.
Files changed (39) hide show
  1. package/dist/functions-DP8s29Wg.cjs +1 -0
  2. package/dist/functions-DnZZKUk0.js +1183 -0
  3. package/dist/index-BIL0cW_q.js +1755 -0
  4. package/dist/index-CcmRJ1qB.cjs +1 -0
  5. package/dist/index-CiqYiARd.js +688 -0
  6. package/dist/index-DAa_DzDf.cjs +6 -0
  7. package/dist/{index-C6VnMvgz.cjs → index-D_NPkUGY.cjs} +1 -1
  8. package/dist/{index-Pl8khka8.js → index-JHVTaNRI.js} +2 -2
  9. package/dist/index-YVg9jNP5.cjs +16 -0
  10. package/dist/{index-DxUgq3ag.js → index-bmR3iLuG.js} +1934 -1953
  11. package/dist/src/graph/driveItems/types.d.ts +6 -2
  12. package/dist/src/graph/generated/api.d.ts +120 -98
  13. package/dist/src/helpers/resource/types.d.ts +1 -0
  14. package/dist/src/helpers/share/constants.d.ts +0 -1
  15. package/dist/src/ocs/capabilities.d.ts +1 -0
  16. package/dist/src/webdav/constants/dav.d.ts +1 -0
  17. package/dist/toString-CgHWCW2N.cjs +1 -0
  18. package/dist/{toString-Cn0xCZ28.js → toString-XlfBosfh.js} +4 -4
  19. package/dist/web-client/graph/generated.cjs +1 -1
  20. package/dist/web-client/graph/generated.js +1984 -2066
  21. package/dist/web-client/graph.cjs +1 -1
  22. package/dist/web-client/graph.js +1 -1
  23. package/dist/web-client/ocs.cjs +12 -12
  24. package/dist/web-client/ocs.js +1889 -1857
  25. package/dist/web-client/sse.cjs +2 -2
  26. package/dist/web-client/sse.js +95 -105
  27. package/dist/web-client/webdav.cjs +1 -1
  28. package/dist/web-client/webdav.js +3 -3
  29. package/dist/web-client.cjs +1 -1
  30. package/dist/web-client.js +82 -82
  31. package/package.json +2 -2
  32. package/dist/functions-CYOnwClV.js +0 -1178
  33. package/dist/functions-DEaUzlbB.cjs +0 -1
  34. package/dist/index-B3tdq56F.cjs +0 -16
  35. package/dist/index-BTGj2rHD.js +0 -1705
  36. package/dist/index-C-U4KVPG.cjs +0 -6
  37. package/dist/index-D3QfKFAH.cjs +0 -1
  38. package/dist/index-oCdLZPEA.js +0 -699
  39. package/dist/toString-hHr716Th.cjs +0 -1
@@ -0,0 +1,16 @@
1
+ "use strict";const mr=require("./index-DAa_DzDf.cjs"),R=require("./functions-DP8s29Wg.cjs"),V=require("./toString-CgHWCW2N.cjs"),br=require("./web-client/ocs.cjs"),re=require("./index-D_NPkUGY.cjs"),fe=r=>encodeURIComponent(r).split("%2F").join("/");class et extends Error{response;statusCode;constructor(e,t,n=null){super(e),this.response=t,this.statusCode=n}}class Jt extends et{errorCode;constructor(e,t,n,o=null){super(e,n,o),this.errorCode=t}}const se=(r,{fileId:e,path:t,name:n})=>{if(t!==void 0)return V.urlJoin(r.webDavPath,t);if(e!==void 0){if(R.isPublicSpaceResource(r))throw new Error("public spaces need a path provided");return V.urlJoin("spaces",e,n||"")}return r.webDavPath},yr=(r,e)=>({copyFiles(t,{path:n,fileId:o},u,{path:c,parentFolderId:i,name:h},{overwrite:a,...s}={}){const f=se(t,{fileId:o,path:n}),l=se(u,{fileId:i,path:c,name:h});return r.copy(f,l,{overwrite:a||!1,...s})}}),vr=(r,e,t)=>({async createFolder(n,{path:o,parentFolderId:u,folderName:c,fetchFolder:i=!0,...h}){const a=se(n,{fileId:u,path:o,name:c});if(await r.mkcol(a),i)return e.getFileInfo(n,{path:o},h)}}),wr=(r,{axiosClient:e})=>({async getFileContents(t,{fileId:n,path:o},{responseType:u="text",noCache:c=!0,headers:i,...h}={}){try{const a=se(t,{fileId:n,path:o}),s=await e.get(r.getFileUrl(a),{responseType:u,headers:{...c&&{"Cache-Control":"no-cache"},...i||{}},...h});return{response:s,body:s.data,headers:{ETag:s.headers.etag,"OC-ETag":s.headers["oc-etag"],"OC-FileId":s.headers["oc-fileid"]}}}catch(a){const{message:s,response:f}=a;throw new et(s,f,f.status)}}}),Nr=(r,e)=>({async getFileInfo(t,n,o){return(await r.listFiles(t,n,{depth:0,...o})).resource}}),xr=(r,e,{axiosClient:t,baseUrl:n})=>({async getFileUrl(o,u,{disposition:c="attachment",isUrlSigningEnabled:i=!1,signUrlTimeout:h=86400,version:a=null,doHeadRequest:s=!1,username:f="",...l}){const g=c==="inline";let{downloadURL:d}=u,m=!0;if(!d&&!g&&(d=a?r.getFileUrl(V.urlJoin("meta",u.fileId,"v",a)):r.getFileUrl(u.webDavPath),f&&s&&await t.head(d),i&&f?d=await br.ocs(n,t).signUrl(d,f):m=!1),!m||g){const w=await e.getFileContents(o,u,{responseType:"blob",...l});d=URL.createObjectURL(w.body)}return d},revokeUrl:o=>{o&&o.startsWith("blob:")&&URL.revokeObjectURL(o)}}),Pr=(r,e)=>({getPublicFileUrl(t,n){return r.getFileUrl(V.urlJoin("public-files",n))}}),Er=(r,e,t)=>({async listFiles(n,{path:o,fileId:u}={},{depth:c=1,davProperties:i,isTrash:h=!1,...a}={}){let s;if(R.isPublicSpaceResource(n)){s=await r.propfind(V.urlJoin(n.webDavPath,o),{depth:c,properties:i||R.DavProperties.PublicLink,...a}),s.forEach(d=>{d.filename=d.filename.split("/").slice(1).join("/")}),s.length===1&&(s[0].filename=V.urlJoin(n.id,o,{leadingSlash:!0})),s.forEach(d=>{d.filename=d.filename.split("/").slice(2).join("/")});const l=n.driveAlias.startsWith("ocm/")?"ocm":"public-link";if((!o||o==="/")&&c>0&&l==="ocm"&&s[0].props[R.DavProperty.PublicLinkItemType]==="file"&&(s=[{basename:n.fileId,type:"directory",filename:"",props:{}},...s]),!o){const[d,...m]=s;return{resource:R.buildPublicSpaceResource({...d,id:n.id,driveAlias:n.driveAlias,webDavPath:n.webDavPath,publicLinkType:l}),children:m.map(w=>R.buildResource(w,r.extraProps))}}const g=s.map(d=>R.buildResource(d,r.extraProps));return{resource:g[0],children:g.slice(1)}}const f=async()=>{const l=await e.getPathForFileId(u);return this.listFiles(n,{path:l},{depth:c,davProperties:i})};try{let l="";if(h?l=R.buildWebDavSpacesTrashPath(n.id):l=se(n,{fileId:u,path:o}),s=await r.propfind(l,{depth:c,properties:i||R.DavProperties.Default,...a}),h)return{resource:R.buildResource(s[0],r.extraProps),children:s.slice(1).map(R.buildDeletedResource)};const g=s.map(m=>R.buildResource(m,r.extraProps)),d=u===n.id;return u&&!d&&u!==g[0].fileId?f():{resource:g[0],children:g.slice(1)}}catch(l){if(l.statusCode===404&&u)return f();throw l}}}),Ar=(r,e)=>({moveFiles(t,{path:n,fileId:o},u,{path:c,parentFolderId:i,name:h},{overwrite:a,...s}={}){const f=se(t,{fileId:o,path:n}),l=se(u,{fileId:i,path:c,name:h});return r.move(f,l,{overwrite:a||!1,...s})}}),Tr=(r,e,t)=>({async putFileContents(n,{fileName:o,path:u,parentFolderId:c,content:i="",previousEntityTag:h="",overwrite:a,onUploadProgress:s=null,...f}){const l=se(n,{fileId:c,name:o,path:u}),{result:g}=await r.put(l,i,{previousEntityTag:h,overwrite:a,onUploadProgress:s,...f});return e.getFileInfo(n,{fileId:g.headers.get("Oc-Fileid"),path:u})}}),Or=(r,e)=>({deleteFile(t,{path:n,...o}){return r.delete(V.urlJoin(t.webDavPath,n),o)}}),Cr=(r,e)=>({restoreFile(t,{id:n},{path:o},{overwrite:u,...c}={}){if(R.isPublicSpaceResource(t))return;const i=V.urlJoin(t.webDavPath,o);return r.move(V.urlJoin(t.webDavTrashPath,n),i,{overwrite:u,...c})}}),Ir=(r,e)=>({restoreFileVersion(t,{parentFolderId:n,name:o,path:u},c,i={}){const h=se(t,{path:u,fileId:n,name:o}),a=V.urlJoin("meta",n,"v",c,{leadingSlash:!0}),s=V.urlJoin("files",h,{leadingSlash:!0});return r.copy(a,s,i)}}),Sr=(r,e)=>({clearTrashBin(t,{id:n,...o}={}){let u=R.buildWebDavSpacesTrashPath(t.id);return n&&(u=V.urlJoin(u,n)),r.delete(u,o)}}),Fr=(r,e)=>({async search(t,{davProperties:n=R.DavProperties.Default,searchLimit:o,...u}){const c="/spaces/",{range:i,results:h}=await r.report(c,{pattern:t,limit:o,properties:n,...u});return{resources:h.map(a=>({...R.buildResource(a,r.extraProps),highlights:a.props[R.DavProperty.Highlights]||""})),totalResults:i?parseInt(i?.split("/")[1]):null}}}),$r=(r,e)=>({async getPathForFileId(t,n={}){return(await r.propfind(V.urlJoin("meta",t,{leadingSlash:!0}),{properties:[R.DavProperty.MetaPathForUser],...n}))[0].props[R.DavProperty.MetaPathForUser]}});/*! For license information please see index.js.LICENSE.txt */var jr={2:r=>{function e(o,u,c){o instanceof RegExp&&(o=t(o,c)),u instanceof RegExp&&(u=t(u,c));var i=n(o,u,c);return i&&{start:i[0],end:i[1],pre:c.slice(0,i[0]),body:c.slice(i[0]+o.length,i[1]),post:c.slice(i[1]+u.length)}}function t(o,u){var c=u.match(o);return c?c[0]:null}function n(o,u,c){var i,h,a,s,f,l=c.indexOf(o),g=c.indexOf(u,l+1),d=l;if(l>=0&&g>0){for(i=[],a=c.length;d>=0&&!f;)d==l?(i.push(d),l=c.indexOf(o,d+1)):i.length==1?f=[i.pop(),g]:((h=i.pop())<a&&(a=h,s=g),g=c.indexOf(u,d+1)),d=l<g&&l>=0?l:g;i.length&&(f=[a,s])}return f}r.exports=e,e.range=n},101:function(r,e,t){var n;r=t.nmd(r),(function(o){var u=(r&&r.exports,typeof re.global=="object"&&re.global);u.global!==u&&u.window;var c=function(f){this.message=f};(c.prototype=new Error).name="InvalidCharacterError";var i=function(f){throw new c(f)},h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=/[\t\n\f\r ]/g,s={encode:function(f){f=String(f),/[^\0-\xFF]/.test(f)&&i("The string to be encoded contains characters outside of the Latin1 range.");for(var l,g,d,m,w=f.length%3,v="",p=-1,y=f.length-w;++p<y;)l=f.charCodeAt(p)<<16,g=f.charCodeAt(++p)<<8,d=f.charCodeAt(++p),v+=h.charAt((m=l+g+d)>>18&63)+h.charAt(m>>12&63)+h.charAt(m>>6&63)+h.charAt(63&m);return w==2?(l=f.charCodeAt(p)<<8,g=f.charCodeAt(++p),v+=h.charAt((m=l+g)>>10)+h.charAt(m>>4&63)+h.charAt(m<<2&63)+"="):w==1&&(m=f.charCodeAt(p),v+=h.charAt(m>>2)+h.charAt(m<<4&63)+"=="),v},decode:function(f){var l=(f=String(f).replace(a,"")).length;l%4==0&&(l=(f=f.replace(/==?$/,"")).length),(l%4==1||/[^+a-zA-Z0-9/]/.test(f))&&i("Invalid character: the string to be decoded is not correctly encoded.");for(var g,d,m=0,w="",v=-1;++v<l;)d=h.indexOf(f.charAt(v)),g=m%4?64*g+d:d,m++%4&&(w+=String.fromCharCode(255&g>>(-2*m&6)));return w},version:"1.0.0"};(n=(function(){return s}).call(e,t,e,r))===void 0||(r.exports=n)})()},172:(r,e)=>{e.d=function(t){if(!t)return 0;for(var n=(t=t.toString()).length,o=t.length;o--;){var u=t.charCodeAt(o);56320<=u&&u<=57343&&o--,127<u&&u<=2047?n++:2047<u&&u<=65535&&(n+=2)}return n}},526:r=>{var e={utf8:{stringToBytes:function(t){return e.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(e.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var n=[],o=0;o<t.length;o++)n.push(255&t.charCodeAt(o));return n},bytesToString:function(t){for(var n=[],o=0;o<t.length;o++)n.push(String.fromCharCode(t[o]));return n.join("")}}};r.exports=e},298:r=>{var e,t;e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(n,o){return n<<o|n>>>32-o},rotr:function(n,o){return n<<32-o|n>>>o},endian:function(n){if(n.constructor==Number)return 16711935&t.rotl(n,8)|4278255360&t.rotl(n,24);for(var o=0;o<n.length;o++)n[o]=t.endian(n[o]);return n},randomBytes:function(n){for(var o=[];n>0;n--)o.push(Math.floor(256*Math.random()));return o},bytesToWords:function(n){for(var o=[],u=0,c=0;u<n.length;u++,c+=8)o[c>>>5]|=n[u]<<24-c%32;return o},wordsToBytes:function(n){for(var o=[],u=0;u<32*n.length;u+=8)o.push(n[u>>>5]>>>24-u%32&255);return o},bytesToHex:function(n){for(var o=[],u=0;u<n.length;u++)o.push((n[u]>>>4).toString(16)),o.push((15&n[u]).toString(16));return o.join("")},hexToBytes:function(n){for(var o=[],u=0;u<n.length;u+=2)o.push(parseInt(n.substr(u,2),16));return o},bytesToBase64:function(n){for(var o=[],u=0;u<n.length;u+=3)for(var c=n[u]<<16|n[u+1]<<8|n[u+2],i=0;i<4;i++)8*u+6*i<=8*n.length?o.push(e.charAt(c>>>6*(3-i)&63)):o.push("=");return o.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/gi,"");for(var o=[],u=0,c=0;u<n.length;c=++u%4)c!=0&&o.push((e.indexOf(n.charAt(u-1))&Math.pow(2,-2*c+8)-1)<<2*c|e.indexOf(n.charAt(u))>>>6-2*c);return o}},r.exports=t},635:(r,e,t)=>{const n=t(31),o=t(338),u=t(221);r.exports={XMLParser:o,XMLValidator:n,XMLBuilder:u}},118:r=>{r.exports=function(e){return typeof e=="function"?e:Array.isArray(e)?t=>{for(const n of e)if(typeof n=="string"&&t===n||n instanceof RegExp&&n.test(t))return!0}:()=>!1}},705:(r,e)=>{const t=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n="["+t+"]["+t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",o=new RegExp("^"+n+"$");e.isExist=function(u){return u!==void 0},e.isEmptyObject=function(u){return Object.keys(u).length===0},e.merge=function(u,c,i){if(c){const h=Object.keys(c),a=h.length;for(let s=0;s<a;s++)u[h[s]]=i==="strict"?[c[h[s]]]:c[h[s]]}},e.getValue=function(u){return e.isExist(u)?u:""},e.isName=function(u){return o.exec(u)!=null},e.getAllMatches=function(u,c){const i=[];let h=c.exec(u);for(;h;){const a=[];a.startIndex=c.lastIndex-h[0].length;const s=h.length;for(let f=0;f<s;f++)a.push(h[f]);i.push(a),h=c.exec(u)}return i},e.nameRegexp=n},31:(r,e,t)=>{const n=t(705),o={allowBooleanAttributes:!1,unpairedTags:[]};function u(p){return p===" "||p===" "||p===`
2
+ `||p==="\r"}function c(p,y){const A=y;for(;y<p.length;y++)if(!(p[y]!="?"&&p[y]!=" ")){const N=p.substr(A,y-A);if(y>5&&N==="xml")return d("InvalidXml","XML declaration allowed only at the start of the document.",w(p,y));if(p[y]=="?"&&p[y+1]==">"){y++;break}}return y}function i(p,y){if(p.length>y+5&&p[y+1]==="-"&&p[y+2]==="-"){for(y+=3;y<p.length;y++)if(p[y]==="-"&&p[y+1]==="-"&&p[y+2]===">"){y+=2;break}}else if(p.length>y+8&&p[y+1]==="D"&&p[y+2]==="O"&&p[y+3]==="C"&&p[y+4]==="T"&&p[y+5]==="Y"&&p[y+6]==="P"&&p[y+7]==="E"){let A=1;for(y+=8;y<p.length;y++)if(p[y]==="<")A++;else if(p[y]===">"&&(A--,A===0))break}else if(p.length>y+9&&p[y+1]==="["&&p[y+2]==="C"&&p[y+3]==="D"&&p[y+4]==="A"&&p[y+5]==="T"&&p[y+6]==="A"&&p[y+7]==="["){for(y+=8;y<p.length;y++)if(p[y]==="]"&&p[y+1]==="]"&&p[y+2]===">"){y+=2;break}}return y}e.validate=function(p,y){y=Object.assign({},o,y);const A=[];let N=!1,b=!1;p[0]==="\uFEFF"&&(p=p.substr(1));for(let x=0;x<p.length;x++)if(p[x]==="<"&&p[x+1]==="?"){if(x+=2,x=c(p,x),x.err)return x}else{if(p[x]!=="<"){if(u(p[x]))continue;return d("InvalidChar","char '"+p[x]+"' is not expected.",w(p,x))}{let T=x;if(x++,p[x]==="!"){x=i(p,x);continue}{let O=!1;p[x]==="/"&&(O=!0,x++);let I="";for(;x<p.length&&p[x]!==">"&&p[x]!==" "&&p[x]!==" "&&p[x]!==`
3
+ `&&p[x]!=="\r";x++)I+=p[x];if(I=I.trim(),I[I.length-1]==="/"&&(I=I.substring(0,I.length-1),x--),E=I,!n.isName(E)){let F;return F=I.trim().length===0?"Invalid space after '<'.":"Tag '"+I+"' is an invalid name.",d("InvalidTag",F,w(p,x))}const C=s(p,x);if(C===!1)return d("InvalidAttr","Attributes for '"+I+"' have open quote.",w(p,x));let P=C.value;if(x=C.index,P[P.length-1]==="/"){const F=x-P.length;P=P.substring(0,P.length-1);const S=l(P,y);if(S!==!0)return d(S.err.code,S.err.msg,w(p,F+S.err.line));N=!0}else if(O){if(!C.tagClosed)return d("InvalidTag","Closing tag '"+I+"' doesn't have proper closing.",w(p,x));if(P.trim().length>0)return d("InvalidTag","Closing tag '"+I+"' can't have attributes or invalid starting.",w(p,T));if(A.length===0)return d("InvalidTag","Closing tag '"+I+"' has not been opened.",w(p,T));{const F=A.pop();if(I!==F.tagName){let S=w(p,F.tagStartPos);return d("InvalidTag","Expected closing tag '"+F.tagName+"' (opened in line "+S.line+", col "+S.col+") instead of closing tag '"+I+"'.",w(p,T))}A.length==0&&(b=!0)}}else{const F=l(P,y);if(F!==!0)return d(F.err.code,F.err.msg,w(p,x-P.length+F.err.line));if(b===!0)return d("InvalidXml","Multiple possible root nodes found.",w(p,x));y.unpairedTags.indexOf(I)!==-1||A.push({tagName:I,tagStartPos:T}),N=!0}for(x++;x<p.length;x++)if(p[x]==="<"){if(p[x+1]==="!"){x++,x=i(p,x);continue}if(p[x+1]!=="?")break;if(x=c(p,++x),x.err)return x}else if(p[x]==="&"){const F=g(p,x);if(F==-1)return d("InvalidChar","char '&' is not expected.",w(p,x));x=F}else if(b===!0&&!u(p[x]))return d("InvalidXml","Extra text at the end",w(p,x));p[x]==="<"&&x--}}}var E;return N?A.length==1?d("InvalidTag","Unclosed tag '"+A[0].tagName+"'.",w(p,A[0].tagStartPos)):!(A.length>0)||d("InvalidXml","Invalid '"+JSON.stringify(A.map((x=>x.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):d("InvalidXml","Start tag expected.",1)};const h='"',a="'";function s(p,y){let A="",N="",b=!1;for(;y<p.length;y++){if(p[y]===h||p[y]===a)N===""?N=p[y]:N!==p[y]||(N="");else if(p[y]===">"&&N===""){b=!0;break}A+=p[y]}return N===""&&{value:A,index:y,tagClosed:b}}const f=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function l(p,y){const A=n.getAllMatches(p,f),N={};for(let b=0;b<A.length;b++){if(A[b][1].length===0)return d("InvalidAttr","Attribute '"+A[b][2]+"' has no space in starting.",v(A[b]));if(A[b][3]!==void 0&&A[b][4]===void 0)return d("InvalidAttr","Attribute '"+A[b][2]+"' is without value.",v(A[b]));if(A[b][3]===void 0&&!y.allowBooleanAttributes)return d("InvalidAttr","boolean attribute '"+A[b][2]+"' is not allowed.",v(A[b]));const E=A[b][2];if(!m(E))return d("InvalidAttr","Attribute '"+E+"' is an invalid name.",v(A[b]));if(N.hasOwnProperty(E))return d("InvalidAttr","Attribute '"+E+"' is repeated.",v(A[b]));N[E]=1}return!0}function g(p,y){if(p[++y]===";")return-1;if(p[y]==="#")return(function(N,b){let E=/\d/;for(N[b]==="x"&&(b++,E=/[\da-fA-F]/);b<N.length;b++){if(N[b]===";")return b;if(!N[b].match(E))break}return-1})(p,++y);let A=0;for(;y<p.length;y++,A++)if(!(p[y].match(/\w/)&&A<20)){if(p[y]===";")break;return-1}return y}function d(p,y,A){return{err:{code:p,msg:y,line:A.line||A,col:A.col}}}function m(p){return n.isName(p)}function w(p,y){const A=p.substring(0,y).split(/\r?\n/);return{line:A.length,col:A[A.length-1].length+1}}function v(p){return p.startIndex+p[1].length}},221:(r,e,t)=>{const n=t(87),o=t(118),u={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(s,f){return f},attributeValueProcessor:function(s,f){return f},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function c(s){this.options=Object.assign({},u,s),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=o(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=a),this.processTextOrObjNode=i,this.options.format?(this.indentate=h,this.tagEndChar=`>
4
+ `,this.newLine=`
5
+ `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function i(s,f,l,g){const d=this.j2x(s,l+1,g.concat(f));return s[this.options.textNodeName]!==void 0&&Object.keys(s).length===1?this.buildTextValNode(s[this.options.textNodeName],f,d.attrStr,l):this.buildObjectNode(d.val,f,d.attrStr,l)}function h(s){return this.options.indentBy.repeat(s)}function a(s){return!(!s.startsWith(this.options.attributeNamePrefix)||s===this.options.textNodeName)&&s.substr(this.attrPrefixLen)}c.prototype.build=function(s){return this.options.preserveOrder?n(s,this.options):(Array.isArray(s)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(s={[this.options.arrayNodeName]:s}),this.j2x(s,0,[]).val)},c.prototype.j2x=function(s,f,l){let g="",d="";const m=l.join(".");for(let w in s)if(Object.prototype.hasOwnProperty.call(s,w))if(s[w]===void 0)this.isAttribute(w)&&(d+="");else if(s[w]===null)this.isAttribute(w)?d+="":w[0]==="?"?d+=this.indentate(f)+"<"+w+"?"+this.tagEndChar:d+=this.indentate(f)+"<"+w+"/"+this.tagEndChar;else if(s[w]instanceof Date)d+=this.buildTextValNode(s[w],w,"",f);else if(typeof s[w]!="object"){const v=this.isAttribute(w);if(v&&!this.ignoreAttributesFn(v,m))g+=this.buildAttrPairStr(v,""+s[w]);else if(!v)if(w===this.options.textNodeName){let p=this.options.tagValueProcessor(w,""+s[w]);d+=this.replaceEntitiesValue(p)}else d+=this.buildTextValNode(s[w],w,"",f)}else if(Array.isArray(s[w])){const v=s[w].length;let p="",y="";for(let A=0;A<v;A++){const N=s[w][A];if(N!==void 0)if(N===null)w[0]==="?"?d+=this.indentate(f)+"<"+w+"?"+this.tagEndChar:d+=this.indentate(f)+"<"+w+"/"+this.tagEndChar;else if(typeof N=="object")if(this.options.oneListGroup){const b=this.j2x(N,f+1,l.concat(w));p+=b.val,this.options.attributesGroupName&&N.hasOwnProperty(this.options.attributesGroupName)&&(y+=b.attrStr)}else p+=this.processTextOrObjNode(N,w,f,l);else if(this.options.oneListGroup){let b=this.options.tagValueProcessor(w,N);b=this.replaceEntitiesValue(b),p+=b}else p+=this.buildTextValNode(N,w,"",f)}this.options.oneListGroup&&(p=this.buildObjectNode(p,w,y,f)),d+=p}else if(this.options.attributesGroupName&&w===this.options.attributesGroupName){const v=Object.keys(s[w]),p=v.length;for(let y=0;y<p;y++)g+=this.buildAttrPairStr(v[y],""+s[w][v[y]])}else d+=this.processTextOrObjNode(s[w],w,f,l);return{attrStr:g,val:d}},c.prototype.buildAttrPairStr=function(s,f){return f=this.options.attributeValueProcessor(s,""+f),f=this.replaceEntitiesValue(f),this.options.suppressBooleanAttributes&&f==="true"?" "+s:" "+s+'="'+f+'"'},c.prototype.buildObjectNode=function(s,f,l,g){if(s==="")return f[0]==="?"?this.indentate(g)+"<"+f+l+"?"+this.tagEndChar:this.indentate(g)+"<"+f+l+this.closeTag(f)+this.tagEndChar;{let d="</"+f+this.tagEndChar,m="";return f[0]==="?"&&(m="?",d=""),!l&&l!==""||s.indexOf("<")!==-1?this.options.commentPropName!==!1&&f===this.options.commentPropName&&m.length===0?this.indentate(g)+`<!--${s}-->`+this.newLine:this.indentate(g)+"<"+f+l+m+this.tagEndChar+s+this.indentate(g)+d:this.indentate(g)+"<"+f+l+m+">"+s+d}},c.prototype.closeTag=function(s){let f="";return this.options.unpairedTags.indexOf(s)!==-1?this.options.suppressUnpairedNode||(f="/"):f=this.options.suppressEmptyNode?"/":`></${s}`,f},c.prototype.buildTextValNode=function(s,f,l,g){if(this.options.cdataPropName!==!1&&f===this.options.cdataPropName)return this.indentate(g)+`<![CDATA[${s}]]>`+this.newLine;if(this.options.commentPropName!==!1&&f===this.options.commentPropName)return this.indentate(g)+`<!--${s}-->`+this.newLine;if(f[0]==="?")return this.indentate(g)+"<"+f+l+"?"+this.tagEndChar;{let d=this.options.tagValueProcessor(f,s);return d=this.replaceEntitiesValue(d),d===""?this.indentate(g)+"<"+f+l+this.closeTag(f)+this.tagEndChar:this.indentate(g)+"<"+f+l+">"+d+"</"+f+this.tagEndChar}},c.prototype.replaceEntitiesValue=function(s){if(s&&s.length>0&&this.options.processEntities)for(let f=0;f<this.options.entities.length;f++){const l=this.options.entities[f];s=s.replace(l.regex,l.val)}return s},r.exports=c},87:r=>{function e(c,i,h,a){let s="",f=!1;for(let l=0;l<c.length;l++){const g=c[l],d=t(g);if(d===void 0)continue;let m="";if(m=h.length===0?d:`${h}.${d}`,d===i.textNodeName){let y=g[d];o(m,i)||(y=i.tagValueProcessor(d,y),y=u(y,i)),f&&(s+=a),s+=y,f=!1;continue}if(d===i.cdataPropName){f&&(s+=a),s+=`<![CDATA[${g[d][0][i.textNodeName]}]]>`,f=!1;continue}if(d===i.commentPropName){s+=a+`<!--${g[d][0][i.textNodeName]}-->`,f=!0;continue}if(d[0]==="?"){const y=n(g[":@"],i),A=d==="?xml"?"":a;let N=g[d][0][i.textNodeName];N=N.length!==0?" "+N:"",s+=A+`<${d}${N}${y}?>`,f=!0;continue}let w=a;w!==""&&(w+=i.indentBy);const v=a+`<${d}${n(g[":@"],i)}`,p=e(g[d],i,m,w);i.unpairedTags.indexOf(d)!==-1?i.suppressUnpairedNode?s+=v+">":s+=v+"/>":p&&p.length!==0||!i.suppressEmptyNode?p&&p.endsWith(">")?s+=v+`>${p}${a}</${d}>`:(s+=v+">",p&&a!==""&&(p.includes("/>")||p.includes("</"))?s+=a+i.indentBy+p+a:s+=p,s+=`</${d}>`):s+=v+"/>",f=!0}return s}function t(c){const i=Object.keys(c);for(let h=0;h<i.length;h++){const a=i[h];if(c.hasOwnProperty(a)&&a!==":@")return a}}function n(c,i){let h="";if(c&&!i.ignoreAttributes)for(let a in c){if(!c.hasOwnProperty(a))continue;let s=i.attributeValueProcessor(a,c[a]);s=u(s,i),s===!0&&i.suppressBooleanAttributes?h+=` ${a.substr(i.attributeNamePrefix.length)}`:h+=` ${a.substr(i.attributeNamePrefix.length)}="${s}"`}return h}function o(c,i){let h=(c=c.substr(0,c.length-i.textNodeName.length-1)).substr(c.lastIndexOf(".")+1);for(let a in i.stopNodes)if(i.stopNodes[a]===c||i.stopNodes[a]==="*."+h)return!0;return!1}function u(c,i){if(c&&c.length>0&&i.processEntities)for(let h=0;h<i.entities.length;h++){const a=i.entities[h];c=c.replace(a.regex,a.val)}return c}r.exports=function(c,i){let h="";return i.format&&i.indentBy.length>0&&(h=`
6
+ `),e(c,i,"",h)}},193:(r,e,t)=>{const n=t(705);function o(f,l){let g="";for(;l<f.length&&f[l]!=="'"&&f[l]!=='"';l++)g+=f[l];if(g=g.trim(),g.indexOf(" ")!==-1)throw new Error("External entites are not supported");const d=f[l++];let m="";for(;l<f.length&&f[l]!==d;l++)m+=f[l];return[g,m,l]}function u(f,l){return f[l+1]==="!"&&f[l+2]==="-"&&f[l+3]==="-"}function c(f,l){return f[l+1]==="!"&&f[l+2]==="E"&&f[l+3]==="N"&&f[l+4]==="T"&&f[l+5]==="I"&&f[l+6]==="T"&&f[l+7]==="Y"}function i(f,l){return f[l+1]==="!"&&f[l+2]==="E"&&f[l+3]==="L"&&f[l+4]==="E"&&f[l+5]==="M"&&f[l+6]==="E"&&f[l+7]==="N"&&f[l+8]==="T"}function h(f,l){return f[l+1]==="!"&&f[l+2]==="A"&&f[l+3]==="T"&&f[l+4]==="T"&&f[l+5]==="L"&&f[l+6]==="I"&&f[l+7]==="S"&&f[l+8]==="T"}function a(f,l){return f[l+1]==="!"&&f[l+2]==="N"&&f[l+3]==="O"&&f[l+4]==="T"&&f[l+5]==="A"&&f[l+6]==="T"&&f[l+7]==="I"&&f[l+8]==="O"&&f[l+9]==="N"}function s(f){if(n.isName(f))return f;throw new Error(`Invalid entity name ${f}`)}r.exports=function(f,l){const g={};if(f[l+3]!=="O"||f[l+4]!=="C"||f[l+5]!=="T"||f[l+6]!=="Y"||f[l+7]!=="P"||f[l+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{l+=9;let d=1,m=!1,w=!1,v="";for(;l<f.length;l++)if(f[l]!=="<"||w)if(f[l]===">"){if(w?f[l-1]==="-"&&f[l-2]==="-"&&(w=!1,d--):d--,d===0)break}else f[l]==="["?m=!0:v+=f[l];else{if(m&&c(f,l)){let p,y;l+=7,[p,y,l]=o(f,l+1),y.indexOf("&")===-1&&(g[s(p)]={regx:RegExp(`&${p};`,"g"),val:y})}else if(m&&i(f,l))l+=8;else if(m&&h(f,l))l+=8;else if(m&&a(f,l))l+=9;else{if(!u)throw new Error("Invalid DOCTYPE");w=!0}d++,v=""}if(d!==0)throw new Error("Unclosed DOCTYPE")}return{entities:g,i:l}}},63:(r,e)=>{const t={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(n,o){return o},attributeValueProcessor:function(n,o){return o},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(n,o,u){return n}};e.buildOptions=function(n){return Object.assign({},t,n)},e.defaultOptions=t},299:(r,e,t)=>{const n=t(705),o=t(365),u=t(193),c=t(494),i=t(118);function h(b){const E=Object.keys(b);for(let x=0;x<E.length;x++){const T=E[x];this.lastEntities[T]={regex:new RegExp("&"+T+";","g"),val:b[T]}}}function a(b,E,x,T,O,I,C){if(b!==void 0&&(this.options.trimValues&&!T&&(b=b.trim()),b.length>0)){C||(b=this.replaceEntitiesValue(b));const P=this.options.tagValueProcessor(E,b,x,O,I);return P==null?b:typeof P!=typeof b||P!==b?P:this.options.trimValues||b.trim()===b?N(b,this.options.parseTagValue,this.options.numberParseOptions):b}}function s(b){if(this.options.removeNSPrefix){const E=b.split(":"),x=b.charAt(0)==="/"?"/":"";if(E[0]==="xmlns")return"";E.length===2&&(b=x+E[1])}return b}const f=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function l(b,E,x){if(this.options.ignoreAttributes!==!0&&typeof b=="string"){const T=n.getAllMatches(b,f),O=T.length,I={};for(let C=0;C<O;C++){const P=this.resolveNameSpace(T[C][1]);if(this.ignoreAttributesFn(P,E))continue;let F=T[C][4],S=this.options.attributeNamePrefix+P;if(P.length)if(this.options.transformAttributeName&&(S=this.options.transformAttributeName(S)),S==="__proto__"&&(S="#__proto__"),F!==void 0){this.options.trimValues&&(F=F.trim()),F=this.replaceEntitiesValue(F);const $=this.options.attributeValueProcessor(P,F,E);I[S]=$==null?F:typeof $!=typeof F||$!==F?$:N(F,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(I[S]=!0)}if(!Object.keys(I).length)return;if(this.options.attributesGroupName){const C={};return C[this.options.attributesGroupName]=I,C}return I}}const g=function(b){b=b.replace(/\r\n?/g,`
7
+ `);const E=new o("!xml");let x=E,T="",O="";for(let I=0;I<b.length;I++)if(b[I]==="<")if(b[I+1]==="/"){const C=p(b,">",I,"Closing Tag is not closed.");let P=b.substring(I+2,C).trim();if(this.options.removeNSPrefix){const $=P.indexOf(":");$!==-1&&(P=P.substr($+1))}this.options.transformTagName&&(P=this.options.transformTagName(P)),x&&(T=this.saveTextToParentTag(T,x,O));const F=O.substring(O.lastIndexOf(".")+1);if(P&&this.options.unpairedTags.indexOf(P)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${P}>`);let S=0;F&&this.options.unpairedTags.indexOf(F)!==-1?(S=O.lastIndexOf(".",O.lastIndexOf(".")-1),this.tagsNodeStack.pop()):S=O.lastIndexOf("."),O=O.substring(0,S),x=this.tagsNodeStack.pop(),T="",I=C}else if(b[I+1]==="?"){let C=y(b,I,!1,"?>");if(!C)throw new Error("Pi Tag is not closed.");if(T=this.saveTextToParentTag(T,x,O),!(this.options.ignoreDeclaration&&C.tagName==="?xml"||this.options.ignorePiTags)){const P=new o(C.tagName);P.add(this.options.textNodeName,""),C.tagName!==C.tagExp&&C.attrExpPresent&&(P[":@"]=this.buildAttributesMap(C.tagExp,O,C.tagName)),this.addChild(x,P,O)}I=C.closeIndex+1}else if(b.substr(I+1,3)==="!--"){const C=p(b,"-->",I+4,"Comment is not closed.");if(this.options.commentPropName){const P=b.substring(I+4,C-2);T=this.saveTextToParentTag(T,x,O),x.add(this.options.commentPropName,[{[this.options.textNodeName]:P}])}I=C}else if(b.substr(I+1,2)==="!D"){const C=u(b,I);this.docTypeEntities=C.entities,I=C.i}else if(b.substr(I+1,2)==="!["){const C=p(b,"]]>",I,"CDATA is not closed.")-2,P=b.substring(I+9,C);T=this.saveTextToParentTag(T,x,O);let F=this.parseTextData(P,x.tagname,O,!0,!1,!0,!0);F==null&&(F=""),this.options.cdataPropName?x.add(this.options.cdataPropName,[{[this.options.textNodeName]:P}]):x.add(this.options.textNodeName,F),I=C+2}else{let C=y(b,I,this.options.removeNSPrefix),P=C.tagName;const F=C.rawTagName;let S=C.tagExp,$=C.attrExpPresent,B=C.closeIndex;this.options.transformTagName&&(P=this.options.transformTagName(P)),x&&T&&x.tagname!=="!xml"&&(T=this.saveTextToParentTag(T,x,O,!1));const M=x;if(M&&this.options.unpairedTags.indexOf(M.tagname)!==-1&&(x=this.tagsNodeStack.pop(),O=O.substring(0,O.lastIndexOf("."))),P!==E.tagname&&(O+=O?"."+P:P),this.isItStopNode(this.options.stopNodes,O,P)){let j="";if(S.length>0&&S.lastIndexOf("/")===S.length-1)P[P.length-1]==="/"?(P=P.substr(0,P.length-1),O=O.substr(0,O.length-1),S=P):S=S.substr(0,S.length-1),I=C.closeIndex;else if(this.options.unpairedTags.indexOf(P)!==-1)I=C.closeIndex;else{const k=this.readStopNodeData(b,F,B+1);if(!k)throw new Error(`Unexpected end of ${F}`);I=k.i,j=k.tagContent}const J=new o(P);P!==S&&$&&(J[":@"]=this.buildAttributesMap(S,O,P)),j&&(j=this.parseTextData(j,P,O,!0,$,!0,!0)),O=O.substr(0,O.lastIndexOf(".")),J.add(this.options.textNodeName,j),this.addChild(x,J,O)}else{if(S.length>0&&S.lastIndexOf("/")===S.length-1){P[P.length-1]==="/"?(P=P.substr(0,P.length-1),O=O.substr(0,O.length-1),S=P):S=S.substr(0,S.length-1),this.options.transformTagName&&(P=this.options.transformTagName(P));const j=new o(P);P!==S&&$&&(j[":@"]=this.buildAttributesMap(S,O,P)),this.addChild(x,j,O),O=O.substr(0,O.lastIndexOf("."))}else{const j=new o(P);this.tagsNodeStack.push(x),P!==S&&$&&(j[":@"]=this.buildAttributesMap(S,O,P)),this.addChild(x,j,O),x=j}T="",I=B}}else T+=b[I];return E.child};function d(b,E,x){const T=this.options.updateTag(E.tagname,x,E[":@"]);T===!1||(typeof T=="string"&&(E.tagname=T),b.addChild(E))}const m=function(b){if(this.options.processEntities){for(let E in this.docTypeEntities){const x=this.docTypeEntities[E];b=b.replace(x.regx,x.val)}for(let E in this.lastEntities){const x=this.lastEntities[E];b=b.replace(x.regex,x.val)}if(this.options.htmlEntities)for(let E in this.htmlEntities){const x=this.htmlEntities[E];b=b.replace(x.regex,x.val)}b=b.replace(this.ampEntity.regex,this.ampEntity.val)}return b};function w(b,E,x,T){return b&&(T===void 0&&(T=Object.keys(E.child).length===0),(b=this.parseTextData(b,E.tagname,x,!1,!!E[":@"]&&Object.keys(E[":@"]).length!==0,T))!==void 0&&b!==""&&E.add(this.options.textNodeName,b),b=""),b}function v(b,E,x){const T="*."+x;for(const O in b){const I=b[O];if(T===I||E===I)return!0}return!1}function p(b,E,x,T){const O=b.indexOf(E,x);if(O===-1)throw new Error(T);return O+E.length-1}function y(b,E,x){const T=(function($,B){let M,j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:">",J="";for(let k=B;k<$.length;k++){let G=$[k];if(M)G===M&&(M="");else if(G==='"'||G==="'")M=G;else if(G===j[0]){if(!j[1])return{data:J,index:k};if($[k+1]===j[1])return{data:J,index:k}}else G===" "&&(G=" ");J+=G}})(b,E+1,arguments.length>3&&arguments[3]!==void 0?arguments[3]:">");if(!T)return;let O=T.data;const I=T.index,C=O.search(/\s/);let P=O,F=!0;C!==-1&&(P=O.substring(0,C),O=O.substring(C+1).trimStart());const S=P;if(x){const $=P.indexOf(":");$!==-1&&(P=P.substr($+1),F=P!==T.data.substr($+1))}return{tagName:P,tagExp:O,closeIndex:I,attrExpPresent:F,rawTagName:S}}function A(b,E,x){const T=x;let O=1;for(;x<b.length;x++)if(b[x]==="<")if(b[x+1]==="/"){const I=p(b,">",x,`${E} is not closed`);if(b.substring(x+2,I).trim()===E&&(O--,O===0))return{tagContent:b.substring(T,x),i:I};x=I}else if(b[x+1]==="?")x=p(b,"?>",x+1,"StopNode is not closed.");else if(b.substr(x+1,3)==="!--")x=p(b,"-->",x+3,"StopNode is not closed.");else if(b.substr(x+1,2)==="![")x=p(b,"]]>",x,"StopNode is not closed.")-2;else{const I=y(b,x,">");I&&((I&&I.tagName)===E&&I.tagExp[I.tagExp.length-1]!=="/"&&O++,x=I.closeIndex)}}function N(b,E,x){if(E&&typeof b=="string"){const T=b.trim();return T==="true"||T!=="false"&&c(b,x)}return n.isExist(b)?b:""}r.exports=class{constructor(b){this.options=b,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,x)=>String.fromCharCode(Number.parseInt(x,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(E,x)=>String.fromCharCode(Number.parseInt(x,16))}},this.addExternalEntities=h,this.parseXml=g,this.parseTextData=a,this.resolveNameSpace=s,this.buildAttributesMap=l,this.isItStopNode=v,this.replaceEntitiesValue=m,this.readStopNodeData=A,this.saveTextToParentTag=w,this.addChild=d,this.ignoreAttributesFn=i(this.options.ignoreAttributes)}}},338:(r,e,t)=>{const{buildOptions:n}=t(63),o=t(299),{prettify:u}=t(728),c=t(31);r.exports=class{constructor(i){this.externalEntities={},this.options=n(i)}parse(i,h){if(typeof i!="string"){if(!i.toString)throw new Error("XML data is accepted in String or Bytes[] form.");i=i.toString()}if(h){h===!0&&(h={});const f=c.validate(i,h);if(f!==!0)throw Error(`${f.err.msg}:${f.err.line}:${f.err.col}`)}const a=new o(this.options);a.addExternalEntities(this.externalEntities);const s=a.parseXml(i);return this.options.preserveOrder||s===void 0?s:u(s,this.options)}addEntity(i,h){if(h.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(i.indexOf("&")!==-1||i.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(h==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[i]=h}}},728:(r,e)=>{function t(c,i,h){let a;const s={};for(let f=0;f<c.length;f++){const l=c[f],g=n(l);let d="";if(d=h===void 0?g:h+"."+g,g===i.textNodeName)a===void 0?a=l[g]:a+=""+l[g];else{if(g===void 0)continue;if(l[g]){let m=t(l[g],i,d);const w=u(m,i);l[":@"]?o(m,l[":@"],d,i):Object.keys(m).length!==1||m[i.textNodeName]===void 0||i.alwaysCreateTextNode?Object.keys(m).length===0&&(i.alwaysCreateTextNode?m[i.textNodeName]="":m=""):m=m[i.textNodeName],s[g]!==void 0&&s.hasOwnProperty(g)?(Array.isArray(s[g])||(s[g]=[s[g]]),s[g].push(m)):i.isArray(g,d,w)?s[g]=[m]:s[g]=m}}}return typeof a=="string"?a.length>0&&(s[i.textNodeName]=a):a!==void 0&&(s[i.textNodeName]=a),s}function n(c){const i=Object.keys(c);for(let h=0;h<i.length;h++){const a=i[h];if(a!==":@")return a}}function o(c,i,h,a){if(i){const s=Object.keys(i),f=s.length;for(let l=0;l<f;l++){const g=s[l];a.isArray(g,h+"."+g,!0,!0)?c[g]=[i[g]]:c[g]=i[g]}}}function u(c,i){const{textNodeName:h}=i,a=Object.keys(c).length;return a===0||!(a!==1||!c[h]&&typeof c[h]!="boolean"&&c[h]!==0)}e.prettify=function(c,i){return t(c,i)}},365:r=>{r.exports=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}},135:r=>{function e(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}r.exports=function(t){return t!=null&&(e(t)||(function(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&e(n.slice(0,0))})(t)||!!t._isBuffer)}},542:(r,e,t)=>{(function(){var n=t(298),o=t(526).utf8,u=t(135),c=t(526).bin,i=function(h,a){h.constructor==String?h=a&&a.encoding==="binary"?c.stringToBytes(h):o.stringToBytes(h):u(h)?h=Array.prototype.slice.call(h,0):Array.isArray(h)||h.constructor===Uint8Array||(h=h.toString());for(var s=n.bytesToWords(h),f=8*h.length,l=1732584193,g=-271733879,d=-1732584194,m=271733878,w=0;w<s.length;w++)s[w]=16711935&(s[w]<<8|s[w]>>>24)|4278255360&(s[w]<<24|s[w]>>>8);s[f>>>5]|=128<<f%32,s[14+(f+64>>>9<<4)]=f;var v=i._ff,p=i._gg,y=i._hh,A=i._ii;for(w=0;w<s.length;w+=16){var N=l,b=g,E=d,x=m;l=v(l,g,d,m,s[w+0],7,-680876936),m=v(m,l,g,d,s[w+1],12,-389564586),d=v(d,m,l,g,s[w+2],17,606105819),g=v(g,d,m,l,s[w+3],22,-1044525330),l=v(l,g,d,m,s[w+4],7,-176418897),m=v(m,l,g,d,s[w+5],12,1200080426),d=v(d,m,l,g,s[w+6],17,-1473231341),g=v(g,d,m,l,s[w+7],22,-45705983),l=v(l,g,d,m,s[w+8],7,1770035416),m=v(m,l,g,d,s[w+9],12,-1958414417),d=v(d,m,l,g,s[w+10],17,-42063),g=v(g,d,m,l,s[w+11],22,-1990404162),l=v(l,g,d,m,s[w+12],7,1804603682),m=v(m,l,g,d,s[w+13],12,-40341101),d=v(d,m,l,g,s[w+14],17,-1502002290),l=p(l,g=v(g,d,m,l,s[w+15],22,1236535329),d,m,s[w+1],5,-165796510),m=p(m,l,g,d,s[w+6],9,-1069501632),d=p(d,m,l,g,s[w+11],14,643717713),g=p(g,d,m,l,s[w+0],20,-373897302),l=p(l,g,d,m,s[w+5],5,-701558691),m=p(m,l,g,d,s[w+10],9,38016083),d=p(d,m,l,g,s[w+15],14,-660478335),g=p(g,d,m,l,s[w+4],20,-405537848),l=p(l,g,d,m,s[w+9],5,568446438),m=p(m,l,g,d,s[w+14],9,-1019803690),d=p(d,m,l,g,s[w+3],14,-187363961),g=p(g,d,m,l,s[w+8],20,1163531501),l=p(l,g,d,m,s[w+13],5,-1444681467),m=p(m,l,g,d,s[w+2],9,-51403784),d=p(d,m,l,g,s[w+7],14,1735328473),l=y(l,g=p(g,d,m,l,s[w+12],20,-1926607734),d,m,s[w+5],4,-378558),m=y(m,l,g,d,s[w+8],11,-2022574463),d=y(d,m,l,g,s[w+11],16,1839030562),g=y(g,d,m,l,s[w+14],23,-35309556),l=y(l,g,d,m,s[w+1],4,-1530992060),m=y(m,l,g,d,s[w+4],11,1272893353),d=y(d,m,l,g,s[w+7],16,-155497632),g=y(g,d,m,l,s[w+10],23,-1094730640),l=y(l,g,d,m,s[w+13],4,681279174),m=y(m,l,g,d,s[w+0],11,-358537222),d=y(d,m,l,g,s[w+3],16,-722521979),g=y(g,d,m,l,s[w+6],23,76029189),l=y(l,g,d,m,s[w+9],4,-640364487),m=y(m,l,g,d,s[w+12],11,-421815835),d=y(d,m,l,g,s[w+15],16,530742520),l=A(l,g=y(g,d,m,l,s[w+2],23,-995338651),d,m,s[w+0],6,-198630844),m=A(m,l,g,d,s[w+7],10,1126891415),d=A(d,m,l,g,s[w+14],15,-1416354905),g=A(g,d,m,l,s[w+5],21,-57434055),l=A(l,g,d,m,s[w+12],6,1700485571),m=A(m,l,g,d,s[w+3],10,-1894986606),d=A(d,m,l,g,s[w+10],15,-1051523),g=A(g,d,m,l,s[w+1],21,-2054922799),l=A(l,g,d,m,s[w+8],6,1873313359),m=A(m,l,g,d,s[w+15],10,-30611744),d=A(d,m,l,g,s[w+6],15,-1560198380),g=A(g,d,m,l,s[w+13],21,1309151649),l=A(l,g,d,m,s[w+4],6,-145523070),m=A(m,l,g,d,s[w+11],10,-1120210379),d=A(d,m,l,g,s[w+2],15,718787259),g=A(g,d,m,l,s[w+9],21,-343485551),l=l+N>>>0,g=g+b>>>0,d=d+E>>>0,m=m+x>>>0}return n.endian([l,g,d,m])};i._ff=function(h,a,s,f,l,g,d){var m=h+(a&s|~a&f)+(l>>>0)+d;return(m<<g|m>>>32-g)+a},i._gg=function(h,a,s,f,l,g,d){var m=h+(a&f|s&~f)+(l>>>0)+d;return(m<<g|m>>>32-g)+a},i._hh=function(h,a,s,f,l,g,d){var m=h+(a^s^f)+(l>>>0)+d;return(m<<g|m>>>32-g)+a},i._ii=function(h,a,s,f,l,g,d){var m=h+(s^(a|~f))+(l>>>0)+d;return(m<<g|m>>>32-g)+a},i._blocksize=16,i._digestsize=16,r.exports=function(h,a){if(h==null)throw new Error("Illegal argument "+h);var s=n.wordsToBytes(i(h,a));return a&&a.asBytes?s:a&&a.asString?c.bytesToString(s):n.bytesToHex(s)}})()},285:(r,e,t)=>{var n=t(2);r.exports=function(v){return v?(v.substr(0,2)==="{}"&&(v="\\{\\}"+v.substr(2)),w((function(p){return p.split("\\\\").join(o).split("\\{").join(u).split("\\}").join(c).split("\\,").join(i).split("\\.").join(h)})(v),!0).map(s)):[]};var o="\0SLASH"+Math.random()+"\0",u="\0OPEN"+Math.random()+"\0",c="\0CLOSE"+Math.random()+"\0",i="\0COMMA"+Math.random()+"\0",h="\0PERIOD"+Math.random()+"\0";function a(v){return parseInt(v,10)==v?parseInt(v,10):v.charCodeAt(0)}function s(v){return v.split(o).join("\\").split(u).join("{").split(c).join("}").split(i).join(",").split(h).join(".")}function f(v){if(!v)return[""];var p=[],y=n("{","}",v);if(!y)return v.split(",");var A=y.pre,N=y.body,b=y.post,E=A.split(",");E[E.length-1]+="{"+N+"}";var x=f(b);return b.length&&(E[E.length-1]+=x.shift(),E.push.apply(E,x)),p.push.apply(p,E),p}function l(v){return"{"+v+"}"}function g(v){return/^-?0\d/.test(v)}function d(v,p){return v<=p}function m(v,p){return v>=p}function w(v,p){var y=[],A=n("{","}",v);if(!A)return[v];var N=A.pre,b=A.post.length?w(A.post,!1):[""];if(/\$$/.test(A.pre))for(var E=0;E<b.length;E++){var x=N+"{"+A.body+"}"+b[E];y.push(x)}else{var T,O,I=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(A.body),C=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(A.body),P=I||C,F=A.body.indexOf(",")>=0;if(!P&&!F)return A.post.match(/,.*\}/)?w(v=A.pre+"{"+A.body+c+A.post):[v];if(P)T=A.body.split(/\.\./);else if((T=f(A.body)).length===1&&(T=w(T[0],!1).map(l)).length===1)return b.map((function(dr){return A.pre+T[0]+dr}));if(P){var S=a(T[0]),$=a(T[1]),B=Math.max(T[0].length,T[1].length),M=T.length==3?Math.abs(a(T[2])):1,j=d;$<S&&(M*=-1,j=m);var J=T.some(g);O=[];for(var k=S;j(k,$);k+=M){var G;if(C)(G=String.fromCharCode(k))==="\\"&&(G="");else if(G=String(k),J){var ct=B-G.length;if(ct>0){var ht=new Array(ct+1).join("0");G=k<0?"-"+ht+G.slice(1):ht+G}}O.push(G)}}else{O=[];for(var oe=0;oe<T.length;oe++)O.push.apply(O,w(T[oe],!1))}for(oe=0;oe<O.length;oe++)for(E=0;E<b.length;E++)x=N+O[oe]+b[E],(!p||P||x)&&y.push(x)}return y}},829:r=>{function e(a){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},e(a)}function t(a){var s=typeof Map=="function"?new Map:void 0;return t=function(f){if(f===null||(l=f,Function.toString.call(l).indexOf("[native code]")===-1))return f;var l;if(typeof f!="function")throw new TypeError("Super expression must either be null or a function");if(s!==void 0){if(s.has(f))return s.get(f);s.set(f,g)}function g(){return n(f,arguments,u(this).constructor)}return g.prototype=Object.create(f.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),o(g,f)},t(a)}function n(a,s,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(l,g,d){var m=[null];m.push.apply(m,g);var w=new(Function.bind.apply(l,m));return d&&o(w,d.prototype),w},n.apply(null,arguments)}function o(a,s){return o=Object.setPrototypeOf||function(f,l){return f.__proto__=l,f},o(a,s)}function u(a){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},u(a)}var c=(function(a){function s(f){var l;return(function(g,d){if(!(g instanceof d))throw new TypeError("Cannot call a class as a function")})(this,s),(l=(function(g,d){return!d||e(d)!=="object"&&typeof d!="function"?(function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m})(g):d})(this,u(s).call(this,f))).name="ObjectPrototypeMutationError",l}return(function(f,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(l&&l.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),l&&o(f,l)})(s,a),s})(t(Error));function i(a,s){for(var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},l=s.split("."),g=l.length,d=function(v){var p=l[v];if(!a)return{v:void 0};if(p==="+"){if(Array.isArray(a))return{v:a.map((function(A,N){var b=l.slice(v+1);return b.length>0?i(A,b.join("."),f):f(a,N,l,v)}))};var y=l.slice(0,v).join(".");throw new Error("Object at wildcard (".concat(y,") is not an array"))}a=f(a,p,l,v)},m=0;m<g;m++){var w=d(m);if(e(w)==="object")return w.v}return a}function h(a,s){return a.length===s+1}r.exports={set:function(a,s,f){if(e(a)!="object"||a===null||s===void 0)return a;if(typeof s=="number")return a[s]=f,a[s];try{return i(a,s,(function(l,g,d,m){if(l===Reflect.getPrototypeOf({}))throw new c("Attempting to mutate Object.prototype");if(!l[g]){var w=Number.isInteger(Number(d[m+1])),v=d[m+1]==="+";l[g]=w||v?[]:{}}return h(d,m)&&(l[g]=f),l[g]}))}catch(l){if(l instanceof c)throw l;return a}},get:function(a,s){if(e(a)!="object"||a===null||s===void 0)return a;if(typeof s=="number")return a[s];try{return i(a,s,(function(f,l){return f[l]}))}catch{return a}},has:function(a,s){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e(a)!="object"||a===null||s===void 0)return!1;if(typeof s=="number")return s in a;try{var l=!1;return i(a,s,(function(g,d,m,w){if(!h(m,w))return g&&g[d];l=f.own?g.hasOwnProperty(d):d in g})),l}catch{return!1}},hasOwn:function(a,s,f){return this.has(a,s,f||{own:!0})},isIn:function(a,s,f){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(e(a)!="object"||a===null||s===void 0)return!1;try{var g=!1,d=!1;return i(a,s,(function(m,w,v,p){return g=g||m===f||!!m&&m[w]===f,d=h(v,p)&&e(m)==="object"&&w in m,m&&m[w]})),l.validPath?g&&d:g}catch{return!1}},ObjectPrototypeMutationError:c}},47:(r,e,t)=>{var n=t(410),o=function(a){return typeof a=="string"};function u(a,s){for(var f=[],l=0;l<a.length;l++){var g=a[l];g&&g!=="."&&(g===".."?f.length&&f[f.length-1]!==".."?f.pop():s&&f.push(".."):f.push(g))}return f}var c=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i={};function h(a){return c.exec(a).slice(1)}i.resolve=function(){for(var a="",s=!1,f=arguments.length-1;f>=-1&&!s;f--){var l=f>=0?arguments[f]:re.process$1.cwd();if(!o(l))throw new TypeError("Arguments to path.resolve must be strings");l&&(a=l+"/"+a,s=l.charAt(0)==="/")}return(s?"/":"")+(a=u(a.split("/"),!s).join("/"))||"."},i.normalize=function(a){var s=i.isAbsolute(a),f=a.substr(-1)==="/";return(a=u(a.split("/"),!s).join("/"))||s||(a="."),a&&f&&(a+="/"),(s?"/":"")+a},i.isAbsolute=function(a){return a.charAt(0)==="/"},i.join=function(){for(var a="",s=0;s<arguments.length;s++){var f=arguments[s];if(!o(f))throw new TypeError("Arguments to path.join must be strings");f&&(a+=a?"/"+f:f)}return i.normalize(a)},i.relative=function(a,s){function f(p){for(var y=0;y<p.length&&p[y]==="";y++);for(var A=p.length-1;A>=0&&p[A]==="";A--);return y>A?[]:p.slice(y,A+1)}a=i.resolve(a).substr(1),s=i.resolve(s).substr(1);for(var l=f(a.split("/")),g=f(s.split("/")),d=Math.min(l.length,g.length),m=d,w=0;w<d;w++)if(l[w]!==g[w]){m=w;break}var v=[];for(w=m;w<l.length;w++)v.push("..");return(v=v.concat(g.slice(m))).join("/")},i._makeLong=function(a){return a},i.dirname=function(a){var s=h(a),f=s[0],l=s[1];return f||l?(l&&(l=l.substr(0,l.length-1)),f+l):"."},i.basename=function(a,s){var f=h(a)[2];return s&&f.substr(-1*s.length)===s&&(f=f.substr(0,f.length-s.length)),f},i.extname=function(a){return h(a)[3]},i.format=function(a){if(!n.isObject(a))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof a);var s=a.root||"";if(!o(s))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof a.root);return(a.dir?a.dir+i.sep:"")+(a.base||"")},i.parse=function(a){if(!o(a))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof a);var s=h(a);if(!s||s.length!==4)throw new TypeError("Invalid path '"+a+"'");return s[1]=s[1]||"",s[2]=s[2]||"",s[3]=s[3]||"",{root:s[0],dir:s[0]+s[1].slice(0,s[1].length-1),base:s[2],ext:s[3],name:s[2].slice(0,s[2].length-s[3].length)}},i.sep="/",i.delimiter=":",r.exports=i},647:(r,e)=>{var t=Object.prototype.hasOwnProperty;function n(u){try{return decodeURIComponent(u.replace(/\+/g," "))}catch{return null}}function o(u){try{return encodeURIComponent(u)}catch{return null}}e.stringify=function(u,c){c=c||"";var i,h,a=[];for(h in typeof c!="string"&&(c="?"),u)if(t.call(u,h)){if((i=u[h])||i!=null&&!isNaN(i)||(i=""),h=o(h),i=o(i),h===null||i===null)continue;a.push(h+"="+i)}return a.length?c+a.join("&"):""},e.parse=function(u){for(var c,i=/([^=?#&]+)=?([^&]*)/g,h={};c=i.exec(u);){var a=n(c[1]),s=n(c[2]);a===null||s===null||a in h||(h[a]=s)}return h}},670:r=>{r.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443;case"ftp":return e!==21;case"gopher":return e!==70;case"file":return!1}return e!==0}},494:r=>{const e=/^[-+]?0x[a-fA-F0-9]+$/,t=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const n={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};r.exports=function(o){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(u=Object.assign({},n,u),!o||typeof o!="string")return o;let c=o.trim();if(u.skipLike!==void 0&&u.skipLike.test(c))return o;if(u.hex&&e.test(c))return Number.parseInt(c,16);{const h=t.exec(c);if(h){const a=h[1],s=h[2];let f=((i=h[3])&&i.indexOf(".")!==-1&&((i=i.replace(/0+$/,""))==="."?i="0":i[0]==="."?i="0"+i:i[i.length-1]==="."&&(i=i.substr(0,i.length-1))),i);const l=h[4]||h[6];if(!u.leadingZeros&&s.length>0&&a&&c[2]!=="."||!u.leadingZeros&&s.length>0&&!a&&c[1]!==".")return o;{const g=Number(c),d=""+g;return d.search(/[eE]/)!==-1||l?u.eNotation?g:o:c.indexOf(".")!==-1?d==="0"&&f===""||d===f||a&&d==="-"+f?g:o:s?f===d||a+f===d?g:o:c===d||c===a+d?g:o}}return o}var i}},737:(r,e,t)=>{var n=t(670),o=t(647),u=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,c=/[\n\r\t]/g,i=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,h=/:\d+$/,a=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,s=/^[a-zA-Z]:/;function f(p){return(p||"").toString().replace(u,"")}var l=[["#","hash"],["?","query"],function(p,y){return m(y.protocol)?p.replace(/\\/g,"/"):p},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],g={hash:1,query:1};function d(p){var y,A=(typeof window<"u"?window:typeof re.global<"u"?re.global:typeof self<"u"?self:{}).location||{},N={},b=typeof(p=p||A);if(p.protocol==="blob:")N=new v(unescape(p.pathname),{});else if(b==="string")for(y in N=new v(p,{}),g)delete N[y];else if(b==="object"){for(y in p)y in g||(N[y]=p[y]);N.slashes===void 0&&(N.slashes=i.test(p.href))}return N}function m(p){return p==="file:"||p==="ftp:"||p==="http:"||p==="https:"||p==="ws:"||p==="wss:"}function w(p,y){p=(p=f(p)).replace(c,""),y=y||{};var A,N=a.exec(p),b=N[1]?N[1].toLowerCase():"",E=!!N[2],x=!!N[3],T=0;return E?x?(A=N[2]+N[3]+N[4],T=N[2].length+N[3].length):(A=N[2]+N[4],T=N[2].length):x?(A=N[3]+N[4],T=N[3].length):A=N[4],b==="file:"?T>=2&&(A=A.slice(2)):m(b)?A=N[4]:b?E&&(A=A.slice(2)):T>=2&&m(y.protocol)&&(A=N[4]),{protocol:b,slashes:E||m(b),slashesCount:T,rest:A}}function v(p,y,A){if(p=(p=f(p)).replace(c,""),!(this instanceof v))return new v(p,y,A);var N,b,E,x,T,O,I=l.slice(),C=typeof y,P=this,F=0;for(C!=="object"&&C!=="string"&&(A=y,y=null),A&&typeof A!="function"&&(A=o.parse),N=!(b=w(p||"",y=d(y))).protocol&&!b.slashes,P.slashes=b.slashes||N&&y.slashes,P.protocol=b.protocol||y.protocol||"",p=b.rest,(b.protocol==="file:"&&(b.slashesCount!==2||s.test(p))||!b.slashes&&(b.protocol||b.slashesCount<2||!m(P.protocol)))&&(I[3]=[/(.*)/,"pathname"]);F<I.length;F++)typeof(x=I[F])!="function"?(E=x[0],O=x[1],E!=E?P[O]=p:typeof E=="string"?~(T=E==="@"?p.lastIndexOf(E):p.indexOf(E))&&(typeof x[2]=="number"?(P[O]=p.slice(0,T),p=p.slice(T+x[2])):(P[O]=p.slice(T),p=p.slice(0,T))):(T=E.exec(p))&&(P[O]=T[1],p=p.slice(0,T.index)),P[O]=P[O]||N&&x[3]&&y[O]||"",x[4]&&(P[O]=P[O].toLowerCase())):p=x(p,P);A&&(P.query=A(P.query)),N&&y.slashes&&P.pathname.charAt(0)!=="/"&&(P.pathname!==""||y.pathname!=="")&&(P.pathname=(function(S,$){if(S==="")return $;for(var B=($||"/").split("/").slice(0,-1).concat(S.split("/")),M=B.length,j=B[M-1],J=!1,k=0;M--;)B[M]==="."?B.splice(M,1):B[M]===".."?(B.splice(M,1),k++):k&&(M===0&&(J=!0),B.splice(M,1),k--);return J&&B.unshift(""),j!=="."&&j!==".."||B.push(""),B.join("/")})(P.pathname,y.pathname)),P.pathname.charAt(0)!=="/"&&m(P.protocol)&&(P.pathname="/"+P.pathname),n(P.port,P.protocol)||(P.host=P.hostname,P.port=""),P.username=P.password="",P.auth&&(~(T=P.auth.indexOf(":"))?(P.username=P.auth.slice(0,T),P.username=encodeURIComponent(decodeURIComponent(P.username)),P.password=P.auth.slice(T+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:"&&m(P.protocol)&&P.host?P.protocol+"//"+P.host:"null",P.href=P.toString()}v.prototype={set:function(p,y,A){var N=this;switch(p){case"query":typeof y=="string"&&y.length&&(y=(A||o.parse)(y)),N[p]=y;break;case"port":N[p]=y,n(y,N.protocol)?y&&(N.host=N.hostname+":"+y):(N.host=N.hostname,N[p]="");break;case"hostname":N[p]=y,N.port&&(y+=":"+N.port),N.host=y;break;case"host":N[p]=y,h.test(y)?(y=y.split(":"),N.port=y.pop(),N.hostname=y.join(":")):(N.hostname=y,N.port="");break;case"protocol":N.protocol=y.toLowerCase(),N.slashes=!A;break;case"pathname":case"hash":if(y){var b=p==="pathname"?"/":"#";N[p]=y.charAt(0)!==b?b+y:y}else N[p]=y;break;case"username":case"password":N[p]=encodeURIComponent(y);break;case"auth":var E=y.indexOf(":");~E?(N.username=y.slice(0,E),N.username=encodeURIComponent(decodeURIComponent(N.username)),N.password=y.slice(E+1),N.password=encodeURIComponent(decodeURIComponent(N.password))):N.username=encodeURIComponent(decodeURIComponent(y))}for(var x=0;x<l.length;x++){var T=l[x];T[4]&&(N[T[1]]=N[T[1]].toLowerCase())}return N.auth=N.password?N.username+":"+N.password:N.username,N.origin=N.protocol!=="file:"&&m(N.protocol)&&N.host?N.protocol+"//"+N.host:"null",N.href=N.toString(),N},toString:function(p){p&&typeof p=="function"||(p=o.stringify);var y,A=this,N=A.host,b=A.protocol;b&&b.charAt(b.length-1)!==":"&&(b+=":");var E=b+(A.protocol&&A.slashes||m(A.protocol)?"//":"");return A.username?(E+=A.username,A.password&&(E+=":"+A.password),E+="@"):A.password?(E+=":"+A.password,E+="@"):A.protocol!=="file:"&&m(A.protocol)&&!N&&A.pathname!=="/"&&(E+="@"),(N[N.length-1]===":"||h.test(A.hostname)&&!A.port)&&(N+=":"),E+=N+A.pathname,(y=typeof A.query=="object"?p(A.query):A.query)&&(E+=y.charAt(0)!=="?"?"?"+y:y),A.hash&&(E+=A.hash),E}},v.extractProtocol=w,v.location=d,v.trimLeft=f,v.qs=o,r.exports=v},410:()=>{},388:()=>{},805:()=>{},345:()=>{},800:()=>{}},ft={};function L(r){var e=ft[r];if(e!==void 0)return e.exports;var t=ft[r]={id:r,loaded:!1,exports:{}};return jr[r].call(t.exports,t,t.exports,L),t.loaded=!0,t.exports}L.n=r=>{var e=r&&r.__esModule?()=>r.default:()=>r;return L.d(e,{a:e}),e},L.d=(r,e)=>{for(var t in e)L.o(e,t)&&!L.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:e[t]})},L.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),L.nmd=r=>(r.paths=[],r.children||(r.children=[]),r);var te={};L.d(te,{hT:()=>Y,O4:()=>ie,Kd:()=>qr,YK:()=>Wr,UU:()=>Yn,Gu:()=>Kt,ky:()=>or,h4:()=>me,ch:()=>Te,hq:()=>ae,i5:()=>ar});var Rr=L(737),Lr=L.n(Rr);function Oe(r){if(!He(r))throw new Error("Parameter was not an error")}function He(r){return!!r&&typeof r=="object"&&(e=r,Object.prototype.toString.call(e)==="[object Error]")||r instanceof Error;var e}class Q extends Error{constructor(e,t){const n=[...arguments],{options:o,shortMessage:u}=(function(i){let h,a="";if(i.length===0)h={};else if(He(i[0]))h={cause:i[0]},a=i.slice(1).join(" ")||"";else if(i[0]&&typeof i[0]=="object")h=Object.assign({},i[0]),a=i.slice(1).join(" ")||"";else{if(typeof i[0]!="string")throw new Error("Invalid arguments passed to Layerr");h={},a=a=i.join(" ")||""}return{options:h,shortMessage:a}})(n);let c=u;if(o.cause&&(c=`${c}: ${o.cause.message}`),super(c),this.message=c,o.name&&typeof o.name=="string"?this.name=o.name:this.name="Layerr",o.cause&&Object.defineProperty(this,"_cause",{value:o.cause}),Object.defineProperty(this,"_info",{value:{}}),o.info&&typeof o.info=="object"&&Object.assign(this._info,o.info),Error.captureStackTrace){const i=o.constructorOpt||this.constructor;Error.captureStackTrace(this,i)}}static cause(e){return Oe(e),e._cause&&He(e._cause)?e._cause:null}static fullStack(e){Oe(e);const t=Q.cause(e);return t?`${e.stack}
8
+ caused by: ${Q.fullStack(t)}`:e.stack??""}static info(e){Oe(e);const t={},n=Q.cause(e);return n&&Object.assign(t,Q.info(n)),e._info&&Object.assign(t,e._info),t}toString(){let e=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(e=`${e}: ${this.message}`),e}}var kr=L(47),ve=L.n(kr);const pt="__PATH_SEPARATOR_POSIX__",gt="__PATH_SEPARATOR_WINDOWS__";function U(r){try{const e=r.replace(/\//g,pt).replace(/\\\\/g,gt);return encodeURIComponent(e).split(gt).join("\\\\").split(pt).join("/")}catch(e){throw new Q(e,"Failed encoding path")}}function dt(r){return r.startsWith("/")?r:"/"+r}function de(r){let e=r;return e[0]!=="/"&&(e="/"+e),/^.+\/$/.test(e)&&(e=e.substr(0,e.length-1)),e}function Ur(r){let e=new(Lr())(r).pathname;return e.length<=0&&(e="/"),de(e)}function _(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return(function(){return(function(n){var o=[];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 u=n.shift();n[0]=u+n[0]}n[0].match(/^file:\/\/\//)?n[0]=n[0].replace(/^([^/:]+):\/*/,"$1:///"):n[0]=n[0].replace(/^([^/:]+):\/*/,"$1://");for(var c=0;c<n.length;c++){var i=n[c];if(typeof i!="string")throw new TypeError("Url must be a string. Received "+i);i!==""&&(c>0&&(i=i.replace(/^[\/]+/,"")),i=c<n.length-1?i.replace(/[\/]+$/,""):i.replace(/[\/]+$/,"/"),o.push(i))}var h=o.join("/"),a=(h=h.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return a.shift()+(a.length>0?"?":"")+a.join("&")})(typeof arguments[0]=="object"?arguments[0]:[].slice.call(arguments))})(e.reduce(((n,o,u)=>((u===0||o!=="/"||o==="/"&&n[n.length-1]!=="/")&&n.push(o),n)),[]))}var _r=L(542),ce=L.n(_r);const Mr="abcdef0123456789";function mt(r,e){const t=r.url.replace("//",""),n=t.indexOf("/")==-1?"/":t.slice(t.indexOf("/")),o=r.method?r.method.toUpperCase():"GET",u=!!/(^|,)\s*auth\s*($|,)/.test(e.qop)&&"auth",c=`00000000${e.nc}`.slice(-8),i=(function(l,g,d,m,w,v,p){const y=p||ce()(`${g}:${d}:${m}`);return l&&l.toLowerCase()==="md5-sess"?ce()(`${y}:${w}:${v}`):y})(e.algorithm,e.username,e.realm,e.password,e.nonce,e.cnonce,e.ha1),h=ce()(`${o}:${n}`),a=u?ce()(`${i}:${e.nonce}:${c}:${e.cnonce}:${u}:${h}`):ce()(`${i}:${e.nonce}:${h}`),s={username:e.username,realm:e.realm,nonce:e.nonce,uri:n,qop:u,response:a,nc:c,cnonce:e.cnonce,algorithm:e.algorithm,opaque:e.opaque},f=[];for(const l in s)s[l]&&(l==="qop"||l==="nc"||l==="algorithm"?f.push(`${l}=${s[l]}`):f.push(`${l}="${s[l]}"`));return`Digest ${f.join(", ")}`}function Ht(r){return(r.headers&&r.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()==="digest"}var Vr=L(101),Zt=L.n(Vr);function bt(r){return Zt().decode(r)}function yt(r,e){var t;return`Basic ${t=`${r}:${e}`,Zt().encode(t)}`}const we=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:typeof window<"u"?window:globalThis,Br=we.fetch.bind(we),qr=we.Request,Wr=we.Response;let Y=(function(r){return r.Auto="auto",r.Digest="digest",r.None="none",r.Password="password",r.Token="token",r})({}),ie=(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 Yt(r,e,t,n,o){switch(r.authType){case Y.Auto:e&&t&&(r.headers.Authorization=yt(e,t));break;case Y.Digest:r.digest=(function(c,i,h){return{username:c,password:i,ha1:h,nc:0,algorithm:"md5",hasDigestAuth:!1}})(e,t,o);break;case Y.None:break;case Y.Password:r.headers.Authorization=yt(e,t);break;case Y.Token:r.headers.Authorization=`${(u=n).token_type} ${u.access_token}`;break;default:throw new Q({info:{code:ie.InvalidAuthType}},`Invalid auth type: ${r.authType}`)}var u}L(345),L(800);const vt="@@HOTPATCHER",Xr=()=>{};function Ce(r){return{original:r,methods:[r],final:!1}}class Gr{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=vt}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(e){this.configuration.getEmptyAction=e}control(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!e||e.__type__!==vt)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(e.configuration.registry).forEach((n=>{this.configuration.registry.hasOwnProperty(n)?t&&(this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])):this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])})),e._configuration=this.configuration,this}execute(e){const t=this.get(e)||Xr;for(var n=arguments.length,o=new Array(n>1?n-1:0),u=1;u<n;u++)o[u-1]=arguments[u];return t(...o)}get(e){const t=this.configuration.registry[e];if(!t)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${e}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return(function(){for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];if(o.length===0)throw new Error("Failed creating sequence: No functions provided");return function(){for(var c=arguments.length,i=new Array(c),h=0;h<c;h++)i[h]=arguments[h];let a=i;const s=this;for(;o.length>0;)a=[o.shift().apply(s,a)];return a[0]}})(...t.methods)}isPatched(e){return!!this.configuration.registry[e]}patch(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{chain:o=!1}=n;if(this.configuration.registry[e]&&this.configuration.registry[e].final)throw new Error(`Failed patching '${e}': Method marked as being final`);if(typeof t!="function")throw new Error(`Failed patching '${e}': Provided method is not a function`);if(o)this.configuration.registry[e]?this.configuration.registry[e].methods.push(t):this.configuration.registry[e]=Ce(t);else if(this.isPatched(e)){const{original:u}=this.configuration.registry[e];this.configuration.registry[e]=Object.assign(Ce(t),{original:u})}else this.configuration.registry[e]=Ce(t);return this}patchInline(e,t){this.isPatched(e)||this.patch(e,t);for(var n=arguments.length,o=new Array(n>2?n-2:0),u=2;u<n;u++)o[u-2]=arguments[u];return this.execute(e,...o)}plugin(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return n.forEach((u=>{this.patch(e,u,{chain:!0})})),this}restore(e){if(!this.isPatched(e))throw new Error(`Failed restoring method: No method present for key: ${e}`);if(typeof this.configuration.registry[e].original!="function")throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${e}`);return this.configuration.registry[e].methods=[this.configuration.registry[e].original],this}setFinal(e){if(!this.configuration.registry.hasOwnProperty(e))throw new Error(`Failed marking '${e}' as final: No method found for key`);return this.configuration.registry[e].final=!0,this}}let Ie=null;function Kt(){return Ie||(Ie=new Gr),Ie}function Ne(r){return(function(e){if(typeof e!="object"||e===null||Object.prototype.toString.call(e)!="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t})(r)?Object.assign({},r):Object.setPrototypeOf(Object.assign({},r),Object.getPrototypeOf(r))}function wt(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];let n=null,o=[...e];for(;o.length>0;){const u=o.shift();n=n?Qt(n,u):Ne(u)}return n}function Qt(r,e){const t=Ne(r);return Object.keys(e).forEach((n=>{t.hasOwnProperty(n)?Array.isArray(e[n])?t[n]=Array.isArray(t[n])?[...t[n],...e[n]]:[...e[n]]:typeof e[n]=="object"&&e[n]?t[n]=typeof t[n]=="object"&&t[n]?Qt(t[n],e[n]):Ne(e[n]):t[n]=e[n]:t[n]=e[n]})),t}function zr(r){const e={};for(const t of r.keys())e[t]=r.get(t);return e}function Ze(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(e.length===0)return{};const n={};return e.reduce(((o,u)=>(Object.keys(u).forEach((c=>{const i=c.toLowerCase();n.hasOwnProperty(i)?o[n[i]]=u[c]:(n[i]=c,o[c]=u[c])})),o)),{})}L(805);const Jr=typeof ArrayBuffer=="function",{toString:Hr}=Object.prototype;function Dt(r){return Jr&&(r instanceof ArrayBuffer||Hr.call(r)==="[object ArrayBuffer]")}function er(r){return r!=null&&r.constructor!=null&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function tt(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}function Ye(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const tr=tt((function(r){const e=r._digest;return delete r._digest,e.hasDigestAuth&&(r=wt(r,{headers:{Authorization:mt(r,e)}})),Ye(xe(r),(function(t){let n=!1;return o=function(c){return n?c:t},(u=(function(){if(t.status==401)return e.hasDigestAuth=(function(c,i){if(!Ht(c))return!1;const h=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const a=c.headers&&c.headers.get("www-authenticate")||"",s=h.exec(a);if(!s)break;i[s[1]]=s[2]||s[3]}return i.nc+=1,i.cnonce=(function(){let a="";for(let s=0;s<32;++s)a=`${a}${Mr[Math.floor(16*Math.random())]}`;return a})(),!0})(t,e),(function(){if(e.hasDigestAuth)return Ye(xe(r=wt(r,{headers:{Authorization:mt(r,e)}})),(function(c){return c.status==401?e.hasDigestAuth=!1:e.nc++,n=!0,c}))})();e.nc++})())&&u.then?u.then(o):o(u);var o,u}))})),Zr=tt((function(r,e){return Ye(xe(r),(function(t){return t.ok?(e.authType=Y.Password,t):t.status==401&&Ht(t)?(e.authType=Y.Digest,Yt(e,e.username,e.password,void 0,void 0),r._digest=e.digest,tr(r)):t}))})),q=tt((function(r,e){return e.authType===Y.Auto?Zr(r,e):r._digest?tr(r):xe(r)}));function W(r,e,t){const n=Ne(r);return n.headers=Ze(e.headers,n.headers||{},t.headers||{}),t.data!==void 0&&(n.data=t.data),t.signal&&(n.signal=t.signal),e.httpAgent&&(n.httpAgent=e.httpAgent),e.httpsAgent&&(n.httpsAgent=e.httpsAgent),e.digest&&(n._digest=e.digest),typeof e.withCredentials=="boolean"&&(n.withCredentials=e.withCredentials),n}function xe(r){const e=Kt();return e.patchInline("request",(t=>e.patchInline("fetch",Br,t.url,(function(n){let o={};const u={method:n.method};if(n.headers&&(o=Ze(o,n.headers)),n.data!==void 0){const[c,i]=(function(h){if(typeof h=="string")return[h,{}];if(er(h))return[h,{}];if(Dt(h))return[h,{}];if(h&&typeof h=="object")return[JSON.stringify(h),{"content-type":"application/json"}];throw new Error("Unable to convert request body: Unexpected body type: "+typeof h)})(n.data);u.body=c,o=Ze(o,i)}return n.signal&&(u.signal=n.signal),n.withCredentials&&(u.credentials="include"),u.headers=o,u})(t))),r)}var Yr=L(285);const Pe=r=>{if(typeof r!="string")throw new TypeError("invalid pattern");if(r.length>65536)throw new TypeError("pattern is too long")},Kr={"[: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]},he=r=>r.replace(/[[\]\\-]/g,"\\$&"),Nt=r=>r.join(""),Qr=(r,e)=>{const t=e;if(r.charAt(t)!=="[")throw new Error("not in a brace expression");const n=[],o=[];let u=t+1,c=!1,i=!1,h=!1,a=!1,s=t,f="";e:for(;u<r.length;){const m=r.charAt(u);if(m!=="!"&&m!=="^"||u!==t+1){if(m==="]"&&c&&!h){s=u+1;break}if(c=!0,m!=="\\"||h){if(m==="["&&!h){for(const[w,[v,p,y]]of Object.entries(Kr))if(r.startsWith(w,u)){if(f)return["$.",!1,r.length-t,!0];u+=w.length,y?o.push(v):n.push(v),i=i||p;continue e}}h=!1,f?(m>f?n.push(he(f)+"-"+he(m)):m===f&&n.push(he(m)),f="",u++):r.startsWith("-]",u+1)?(n.push(he(m+"-")),u+=2):r.startsWith("-",u+1)?(f=m,u+=2):(n.push(he(m)),u++)}else h=!0,u++}else a=!0,u++}if(s<u)return["",!1,0,!1];if(!n.length&&!o.length)return["$.",!1,r.length-t,!0];if(o.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!a)return[(l=n[0].length===2?n[0].slice(-1):n[0],l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,s-t,!1];var l;const g="["+(a?"^":"")+Nt(n)+"]",d="["+(a?"":"^")+Nt(o)+"]";return[n.length&&o.length?"("+g+"|"+d+")":n.length?g:d,i,s-t,!0]},pe=function(r){let{windowsPathsNoEscape:e=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e?r.replace(/\[([^\/\\])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},Dr=new Set(["!","?","+","*","@"]),xt=r=>Dr.has(r),Se="(?!\\.)",en=new Set(["[","."]),tn=new Set(["..","."]),rn=new Set("().*{}+?[]^$\\!"),rt="[^/]",Pt=rt+"*?",Et=rt+"+?";class Z{type;#r;#n;#i=!1;#e=[];#t;#o;#u;#a=!1;#s;#l;#h=!1;constructor(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.type=e,e&&(this.#n=!0),this.#t=t,this.#r=this.#t?this.#t.#r:this,this.#s=this.#r===this?n:this.#r.#s,this.#u=this.#r===this?[]:this.#r.#u,e!=="!"||this.#r.#a||this.#u.push(this),this.#o=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(const e of this.#e)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#l!==void 0?this.#l:this.type?this.#l=this.type+"("+this.#e.map((e=>String(e))).join("|")+")":this.#l=this.#e.map((e=>String(e))).join("")}#p(){if(this!==this.#r)throw new Error("should only call on root");if(this.#a)return this;let e;for(this.toString(),this.#a=!0;e=this.#u.pop();){if(e.type!=="!")continue;let t=e,n=t.#t;for(;n;){for(let o=t.#o+1;!n.type&&o<n.#e.length;o++)for(const u of e.#e){if(typeof u=="string")throw new Error("string part in extglob AST??");u.copyIn(n.#e[o])}t=n,n=t.#t}}return this}push(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(const o of t)if(o!==""){if(typeof o!="string"&&!(o instanceof Z&&o.#t===this))throw new Error("invalid part: "+o);this.#e.push(o)}}toJSON(){const e=this.type===null?this.#e.slice().map((t=>typeof t=="string"?t:t.toJSON())):[this.type,...this.#e.map((t=>t.toJSON()))];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#r||this.#r.#a&&this.#t?.type==="!")&&e.push({}),e}isStart(){if(this.#r===this)return!0;if(!this.#t?.isStart())return!1;if(this.#o===0)return!0;const e=this.#t;for(let t=0;t<this.#o;t++){const n=e.#e[t];if(!(n instanceof Z&&n.type==="!"))return!1}return!0}isEnd(){if(this.#r===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();const e=this.#t?this.#t.#e.length:0;return this.#o===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){const t=new Z(this.type,e);for(const n of this.#e)t.copyIn(n);return t}static#c(e,t,n,o){let u=!1,c=!1,i=-1,h=!1;if(t.type===null){let g=n,d="";for(;g<e.length;){const m=e.charAt(g++);if(u||m==="\\")u=!u,d+=m;else if(c)g===i+1?m!=="^"&&m!=="!"||(h=!0):m!=="]"||g===i+2&&h||(c=!1),d+=m;else if(m!=="[")if(o.noext||!xt(m)||e.charAt(g)!=="(")d+=m;else{t.push(d),d="";const w=new Z(m,t);g=Z.#c(e,w,g,o),t.push(w)}else c=!0,i=g,h=!1,d+=m}return t.push(d),g}let a=n+1,s=new Z(null,t);const f=[];let l="";for(;a<e.length;){const g=e.charAt(a++);if(u||g==="\\")u=!u,l+=g;else if(c)a===i+1?g!=="^"&&g!=="!"||(h=!0):g!=="]"||a===i+2&&h||(c=!1),l+=g;else if(g!=="[")if(xt(g)&&e.charAt(a)==="("){s.push(l),l="";const d=new Z(g,s);s.push(d),a=Z.#c(e,d,a,o)}else if(g!=="|"){if(g===")")return l===""&&t.#e.length===0&&(t.#h=!0),s.push(l),l="",t.push(...f,s),a;l+=g}else s.push(l),l="",f.push(s),s=new Z(null,t);else c=!0,i=a,h=!1,l+=g}return t.type=null,t.#n=void 0,t.#e=[e.substring(n-1)],a}static fromGlob(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=new Z(null,void 0,t);return Z.#c(e,n,0,t),n}toMMPattern(){if(this!==this.#r)return this.#r.toMMPattern();const e=this.toString(),[t,n,o,u]=this.toRegExpSource();if(!(o||this.#n||this.#s.nocase&&!this.#s.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;const c=(this.#s.nocase?"i":"")+(u?"u":"");return Object.assign(new RegExp(`^${t}$`,c),{_src:t,_glob:e})}get options(){return this.#s}toRegExpSource(e){const t=e??!!this.#s.dot;if(this.#r===this&&this.#p(),!this.type){const h=this.isStart()&&this.isEnd(),a=this.#e.map((l=>{const[g,d,m,w]=typeof l=="string"?Z.#g(l,this.#n,h):l.toRegExpSource(e);return this.#n=this.#n||m,this.#i=this.#i||w,g})).join("");let s="";if(this.isStart()&&typeof this.#e[0]=="string"&&(this.#e.length!==1||!tn.has(this.#e[0]))){const l=en,g=t&&l.has(a.charAt(0))||a.startsWith("\\.")&&l.has(a.charAt(2))||a.startsWith("\\.\\.")&&l.has(a.charAt(4)),d=!t&&!e&&l.has(a.charAt(0));s=g?"(?!(?:^|/)\\.\\.?(?:$|/))":d?Se:""}let f="";return this.isEnd()&&this.#r.#a&&this.#t?.type==="!"&&(f="(?:$|\\/)"),[s+a+f,pe(a),this.#n=!!this.#n,this.#i]}const n=this.type==="*"||this.type==="+",o=this.type==="!"?"(?:(?!(?:":"(?:";let u=this.#f(t);if(this.isStart()&&this.isEnd()&&!u&&this.type!=="!"){const h=this.toString();return this.#e=[h],this.type=null,this.#n=void 0,[h,pe(this.toString()),!1,!1]}let c=!n||e||t?"":this.#f(!0);c===u&&(c=""),c&&(u=`(?:${u})(?:${c})*?`);let i="";return i=this.type==="!"&&this.#h?(this.isStart()&&!t?Se:"")+Et:o+u+(this.type==="!"?"))"+(!this.isStart()||t||e?"":Se)+Pt+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&c?")":this.type==="*"&&c?")?":`)${this.type}`),[i,pe(u),this.#n=!!this.#n,this.#i]}#f(e){return this.#e.map((t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");const[n,o,u,c]=t.toRegExpSource(e);return this.#i=this.#i||c,n})).filter((t=>!(this.isStart()&&this.isEnd()&&!t))).join("|")}static#g(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],o=!1,u="",c=!1;for(let i=0;i<e.length;i++){const h=e.charAt(i);if(o)o=!1,u+=(rn.has(h)?"\\":"")+h;else if(h!=="\\"){if(h==="["){const[a,s,f,l]=Qr(e,i);if(f){u+=a,c=c||s,i+=f-1,t=t||l;continue}}h!=="*"?h!=="?"?u+=h.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(u+=rt,t=!0):(u+=n&&e==="*"?Et:Pt,t=!0)}else i===e.length-1?u+="\\\\":o=!0}return[u,pe(e),!!t,c]}}const H=function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Pe(e),!(!t.nocomment&&e.charAt(0)==="#")&&new Ee(e,t).match(r)},nn=/^\*+([^+@!?\*\[\(]*)$/,sn=r=>e=>!e.startsWith(".")&&e.endsWith(r),on=r=>e=>e.endsWith(r),an=r=>(r=r.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(r)),un=r=>(r=r.toLowerCase(),e=>e.toLowerCase().endsWith(r)),ln=/^\*+\.\*+$/,cn=r=>!r.startsWith(".")&&r.includes("."),hn=r=>r!=="."&&r!==".."&&r.includes("."),fn=/^\.\*+$/,pn=r=>r!=="."&&r!==".."&&r.startsWith("."),gn=/^\*+$/,dn=r=>r.length!==0&&!r.startsWith("."),mn=r=>r.length!==0&&r!=="."&&r!=="..",bn=/^\?+([^+@!?\*\[\(]*)?$/,yn=r=>{let[e,t=""]=r;const n=rr([e]);return t?(t=t.toLowerCase(),o=>n(o)&&o.toLowerCase().endsWith(t)):n},vn=r=>{let[e,t=""]=r;const n=nr([e]);return t?(t=t.toLowerCase(),o=>n(o)&&o.toLowerCase().endsWith(t)):n},wn=r=>{let[e,t=""]=r;const n=nr([e]);return t?o=>n(o)&&o.endsWith(t):n},Nn=r=>{let[e,t=""]=r;const n=rr([e]);return t?o=>n(o)&&o.endsWith(t):n},rr=r=>{let[e]=r;const t=e.length;return n=>n.length===t&&!n.startsWith(".")},nr=r=>{let[e]=r;const t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},sr=typeof re.process$1=="object"&&re.process$1?typeof re.process$1.env=="object"&&re.process$1.env&&re.process$1.env.__MINIMATCH_TESTING_PLATFORM__||re.process$1.platform:"posix";H.sep=sr==="win32"?"\\":"/";const ee=Symbol("globstar **");H.GLOBSTAR=ee,H.filter=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t=>H(t,r,e)};const D=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.assign({},r,e)};H.defaults=r=>{if(!r||typeof r!="object"||!Object.keys(r).length)return H;const e=H;return Object.assign((function(t,n){return e(t,n,D(r,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}),{Minimatch:class extends e.Minimatch{constructor(t){super(t,D(r,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}))}static defaults(t){return e.defaults(D(r,t)).Minimatch}},AST:class extends e.AST{constructor(t,n){super(t,n,D(r,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}static fromGlob(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.AST.fromGlob(t,D(r,n))}},unescape:function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.unescape(t,D(r,n))},escape:function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.escape(t,D(r,n))},filter:function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.filter(t,D(r,n))},defaults:t=>e.defaults(D(r,t)),makeRe:function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.makeRe(t,D(r,n))},braceExpand:function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.braceExpand(t,D(r,n))},match:function(t,n){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return e.match(t,n,D(r,o))},sep:e.sep,GLOBSTAR:ee})};const ir=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Pe(r),e.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:Yr(r)};H.braceExpand=ir,H.makeRe=function(r){return new Ee(r,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).makeRe()},H.match=function(r,e){const t=new Ee(e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{});return r=r.filter((n=>t.match(n))),t.options.nonull&&!r.length&&r.push(e),r};const At=/[?*]|[+@!]\(.*?\)|\[|\]/;class Ee{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Pe(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||sr,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.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 e of this.set)for(const t of e)if(typeof t!="string")return!0;return!1}debug(){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#")return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=function(){return console.error(...arguments)}),this.debug(this.pattern,this.globSet);const n=this.globSet.map((u=>this.slashSplit(u)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let o=this.globParts.map(((u,c,i)=>{if(this.isWindows&&this.windowsNoMagicRoot){const h=!(u[0]!==""||u[1]!==""||u[2]!=="?"&&At.test(u[2])||At.test(u[3])),a=/^[a-z]:/i.test(u[0]);if(h)return[...u.slice(0,4),...u.slice(4).map((s=>this.parse(s)))];if(a)return[u[0],...u.slice(1).map((s=>this.parse(s)))]}return u.map((h=>this.parse(h)))}));if(this.debug(this.pattern,o),this.set=o.filter((u=>u.indexOf(!1)===-1)),this.isWindows)for(let u=0;u<this.set.length;u++){const c=this.set[u];c[0]===""&&c[1]===""&&this.globParts[u][2]==="?"&&typeof c[3]=="string"&&/^[a-z]:$/i.test(c[3])&&(c[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let n=0;n<e.length;n++)for(let o=0;o<e[n].length;o++)e[n][o]==="**"&&(e[n][o]="*");const{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map((t=>{let n=-1;for(;(n=t.indexOf("**",n+1))!==-1;){let o=n;for(;t[o+1]==="**";)o++;o!==n&&t.splice(n,o-n)}return t}))}levelOneOptimize(e){return e.map((t=>(t=t.reduce(((n,o)=>{const u=n[n.length-1];return o==="**"&&u==="**"?n:o===".."&&u&&u!==".."&&u!=="."&&u!=="**"?(n.pop(),n):(n.push(o),n)}),[])).length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let o=1;o<e.length-1;o++){const u=e[o];o===1&&u===""&&e[0]===""||u!=="."&&u!==""||(t=!0,e.splice(o,1),o--)}e[0]!=="."||e.length!==2||e[1]!=="."&&e[1]!==""||(t=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){const o=e[n-1];o&&o!=="."&&o!==".."&&o!=="**"&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let o=-1;for(;(o=n.indexOf("**",o+1))!==-1;){let c=o;for(;n[c+1]==="**";)c++;c>o&&n.splice(o+1,c-o);let i=n[o+1];const h=n[o+2],a=n[o+3];if(i!==".."||!h||h==="."||h===".."||!a||a==="."||a==="..")continue;t=!0,n.splice(o,1);const s=n.slice(0);s[o]="**",e.push(s),o--}if(!this.preserveMultipleSlashes){for(let c=1;c<n.length-1;c++){const i=n[c];c===1&&i===""&&n[0]===""||i!=="."&&i!==""||(t=!0,n.splice(c,1),c--)}n[0]!=="."||n.length!==2||n[1]!=="."&&n[1]!==""||(t=!0,n.pop())}let u=0;for(;(u=n.indexOf("..",u+1))!==-1;){const c=n[u-1];if(c&&c!=="."&&c!==".."&&c!=="**"){t=!0;const i=u===1&&n[u+1]==="**"?["."]:[];n.splice(u-1,2,...i),n.length===0&&n.push(""),u-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){const o=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(o){e[t]=[],e[n]=o;break}}return e.filter((t=>t.length))}partsMatch(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],o=0,u=0,c=[],i="";for(;o<e.length&&u<t.length;)if(e[o]===t[u])c.push(i==="b"?t[u]:e[o]),o++,u++;else if(n&&e[o]==="**"&&t[u]===e[o+1])c.push(e[o]),o++;else if(n&&t[u]==="**"&&e[o]===t[u+1])c.push(t[u]),u++;else if(e[o]!=="*"||!t[u]||!this.options.dot&&t[u].startsWith(".")||t[u]==="**"){if(t[u]!=="*"||!e[o]||!this.options.dot&&e[o].startsWith(".")||e[o]==="**"||i==="a")return!1;i="b",c.push(t[u]),o++,u++}else{if(i==="b")return!1;i="a",c.push(e[o]),o++,u++}return e.length===t.length&&c}parseNegate(){if(this.nonegate)return;const e=this.pattern;let t=!1,n=0;for(let o=0;o<e.length&&e.charAt(o)==="!";o++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const o=this.options;if(this.isWindows){const m=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),w=!m&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),v=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),p=w?3:m?0:void 0,y=!v&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3])?3:v?0:void 0;if(typeof p=="number"&&typeof y=="number"){const[A,N]=[e[p],t[y]];A.toLowerCase()===N.toLowerCase()&&(t[y]=A,y>p?t=t.slice(y):p>y&&(e=e.slice(p)))}}const{optimizationLevel:u=1}=this.options;u>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var c=0,i=0,h=e.length,a=t.length;c<h&&i<a;c++,i++){this.debug("matchOne loop");var s=t[i],f=e[c];if(this.debug(t,s,f),s===!1)return!1;if(s===ee){this.debug("GLOBSTAR",[t,s,f]);var l=c,g=i+1;if(g===a){for(this.debug("** at the end");c<h;c++)if(e[c]==="."||e[c]===".."||!o.dot&&e[c].charAt(0)===".")return!1;return!0}for(;l<h;){var d=e[l];if(this.debug(`
9
+ globstar while`,e,l,t,g,d),this.matchOne(e.slice(l),t.slice(g),n))return this.debug("globstar found match!",l,h,d),!0;if(d==="."||d===".."||!o.dot&&d.charAt(0)==="."){this.debug("dot detected!",e,l,t,g);break}this.debug("globstar swallow a segment, and continue"),l++}return!(!n||(this.debug(`
10
+ >>> no match, partial?`,e,l,t,g),l!==h))}let m;if(typeof s=="string"?(m=f===s,this.debug("string match",s,f,m)):(m=s.test(f),this.debug("pattern match",s,f,m)),!m)return!1}if(c===h&&i===a)return!0;if(c===h)return n;if(i===a)return c===h-1&&e[c]==="";throw new Error("wtf?")}braceExpand(){return ir(this.pattern,this.options)}parse(e){Pe(e);const t=this.options;if(e==="**")return ee;if(e==="")return"";let n,o=null;(n=e.match(gn))?o=t.dot?mn:dn:(n=e.match(nn))?o=(t.nocase?t.dot?un:an:t.dot?on:sn)(n[1]):(n=e.match(bn))?o=(t.nocase?t.dot?vn:yn:t.dot?wn:Nn)(n):(n=e.match(ln))?o=t.dot?hn:cn:(n=e.match(fn))&&(o=pn);const u=Z.fromGlob(e,this.options).toMMPattern();return o&&typeof u=="object"&&Reflect.defineProperty(u,"test",{value:o}),u}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const t=this.options,n=t.noglobstar?"[^/]*?":t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",o=new Set(t.nocase?["i"]:[]);let u=e.map((h=>{const a=h.map((s=>{if(s instanceof RegExp)for(const f of s.flags.split(""))o.add(f);return typeof s=="string"?s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):s===ee?ee:s._src}));return a.forEach(((s,f)=>{const l=a[f+1],g=a[f-1];s===ee&&g!==ee&&(g===void 0?l!==void 0&&l!==ee?a[f+1]="(?:\\/|"+n+"\\/)?"+l:a[f]=n:l===void 0?a[f-1]=g+"(?:\\/|"+n+")?":l!==ee&&(a[f-1]=g+"(?:\\/|\\/"+n+"\\/)"+l,a[f+1]=ee))})),a.filter((s=>s!==ee)).join("/")})).join("|");const[c,i]=e.length>1?["(?:",")"]:["",""];u="^"+c+u+i+"$",this.negate&&(u="^(?!"+u+").+$");try{this.regexp=new RegExp(u,[...o].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.partial;if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;const n=this.options;this.isWindows&&(e=e.split("\\").join("/"));const o=this.slashSplit(e);this.debug(this.pattern,"split",o);const u=this.set;this.debug(this.pattern,"set",u);let c=o[o.length-1];if(!c)for(let i=o.length-2;!c&&i>=0;i--)c=o[i];for(let i=0;i<u.length;i++){const h=u[i];let a=o;if(n.matchBase&&h.length===1&&(a=[c]),this.matchOne(a,h,t))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return H.defaults(e).Minimatch}}function nt(r){const e=new Error(`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:""}Invalid response: ${r.status} ${r.statusText}`);return e.status=r.status,e.response=r,e}function X(r,e){const{status:t}=e;if(t===401&&r.digest)return e;if(t>=400)throw nt(e);return e}function ae(r,e){return arguments.length>2&&arguments[2]!==void 0&&arguments[2]?{data:e,headers:r.headers?zr(r.headers):{},status:r.status,statusText:r.statusText}:e}H.AST=Z,H.Minimatch=Ee,H.escape=function(r){let{windowsPathsNoEscape:e=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e?r.replace(/[?*()[\]]/g,"[$&]"):r.replace(/[?*()[\]\\]/g,"\\$&")},H.unescape=pe;const xn=(Tt=function(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=W({url:_(r.remoteURL,U(e)),method:"COPY",headers:{Destination:_(r.remoteURL,U(t)),Overwrite:n.overwrite===!1?"F":"T",Depth:n.shallow?"0":"infinity"}},r,n);return c=function(i){X(r,i)},(u=q(o,r))&&u.then||(u=Promise.resolve(u)),c?u.then(c):u;var u,c},function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];try{return Promise.resolve(Tt.apply(this,r))}catch(t){return Promise.reject(t)}});var Tt,st=L(635),Pn=L(829),ne=L.n(Pn),ue=(function(r){return r.Array="array",r.Object="object",r.Original="original",r})(ue||{});function be(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ue.Original;const n=ne().get(r,e);return t==="array"&&Array.isArray(n)===!1?[n]:t==="object"&&Array.isArray(n)?n[0]:n}function me(r){return new Promise((e=>{e((function(t){const{multistatus:n}=t;if(n==="")return{multistatus:{response:[]}};if(!n)throw new Error("Invalid response: No root multistatus found");const o={multistatus:Array.isArray(n)?n[0]:n};return ne().set(o,"multistatus.response",be(o,"multistatus.response",ue.Array)),ne().set(o,"multistatus.response",ne().get(o,"multistatus.response").map((u=>(function(c){const i=Object.assign({},c);return i.status?ne().set(i,"status",be(i,"status",ue.Object)):(ne().set(i,"propstat",be(i,"propstat",ue.Object)),ne().set(i,"propstat.prop",be(i,"propstat.prop",ue.Object))),i})(u)))),o})(new st.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor:(t,n,o)=>n==="true"||n==="false"?n==="true":n,tagValueProcessor(t,n,o){if(!o.endsWith("propstat.prop.displayname"))return n}}).parse(r)))}))}function Te(r,e){let t=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const{getlastmodified:n=null,getcontentlength:o="0",resourcetype:u=null,getcontenttype:c=null,getetag:i=null}=r,h=u&&typeof u=="object"&&u.collection!==void 0?"directory":"file",a={filename:e,basename:ve().basename(e),lastmod:n,size:parseInt(o,10),type:h,etag:typeof i=="string"?i.replace(/"/g,""):null};return h==="file"&&(a.mime=c&&typeof c=="string"?c.split(";")[0]:""),t&&(r.displayname!==void 0&&(r.displayname=String(r.displayname)),a.props=r),a}function or(r,e){let t=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:o,status:u}}=n,[c,i,h]=u.split(" ",3),a=parseInt(i,10);if(a>=400){const s=new Error(`Invalid response: ${a} ${h}`);throw s.status=a,s}return Te(o,de(e),t)}function ar(r){switch(String(r)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(r),10)}}function Fe(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const it=(function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:n=!1}=t,o=W({url:_(r.remoteURL,U(e)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},r,t);return Fe(q(o,r),(function(u){return X(r,u),Fe(u.text(),(function(c){return Fe(me(c),(function(i){const h=or(i,e,n);return ae(u,h,n)}))}))}))}));function ur(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const En=lr((function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=(function(u){if(!u||u==="/")return[];let c=u;const i=[];do i.push(c),c=ve().dirname(c);while(c&&c!=="/");return i})(de(e));n.sort(((u,c)=>u.length>c.length?1:c.length>u.length?-1:0));let o=!1;return(function(u,c,i){if(typeof u[Ct]=="function"){let m=function(w){try{for(;!(h=f.next()).done;)if((w=c(h.value))&&w.then){if(!It(w))return void w.then(m,s||(s=K.bind(null,a=new le,2)));w=w.v}a?K(a,1,w):a=w}catch(v){K(a||(a=new le),2,v)}};var h,a,s,f=u[Ct]();if(m(),f.return){var l=function(w){try{h.done||f.return()}catch{}return w};if(a&&a.then)return a.then(l,(function(w){throw l(w)}));l()}return a}if(!("length"in u))throw new TypeError("Object is not iterable");for(var g=[],d=0;d<u.length;d++)g.push(u[d]);return(function(m,w,v){var p,y,A=-1;return(function N(b){try{for(;++A<m.length&&(!v||!v());)if((b=w(A))&&b.then){if(!It(b))return void b.then(N,y||(y=K.bind(null,p=new le,2)));b=b.v}p?K(p,1,b):p=b}catch(E){K(p||(p=new le),2,E)}})(),p})(g,(function(m){return c(g[m])}),i)})(n,(function(u){return c=function(){return(function(h,a){try{var s=ur(it(r,u),(function(f){if(f.type!=="directory")throw new Error(`Path includes a file: ${e}`)}))}catch(f){return a(f)}return s&&s.then?s.then(void 0,a):s})(0,(function(h){const a=h;return(function(){if(a.status===404)return o=!0,Ot(Ke(r,u,{...t,recursive:!1}));throw h})()}))},(i=(function(){if(o)return Ot(Ke(r,u,{...t,recursive:!1}))})())&&i.then?i.then(c):c();var c,i}),(function(){return!1}))}));function lr(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}function An(){}function Ot(r,e){return r&&r.then?r.then(An):Promise.resolve()}const Ct=typeof Symbol<"u"?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function K(r,e,t){if(!r.s){if(t instanceof le){if(!t.s)return void(t.o=K.bind(null,r,e));1&e&&(e=t.s),t=t.v}if(t&&t.then)return void t.then(K.bind(null,r,e),K.bind(null,r,2));r.s=e,r.v=t;const n=r.o;n&&n(r)}}const le=(function(){function r(){}return r.prototype.then=function(e,t){const n=new r,o=this.s;if(o){const u=1&o?e:t;if(u){try{K(n,1,u(this.v))}catch(c){K(n,2,c)}return n}return this}return this.o=function(u){try{const c=u.v;1&u.s?K(n,1,e?e(c):c):t?K(n,1,t(c)):K(n,2,c)}catch(c){K(n,2,c)}},n},r})();function It(r){return r instanceof le&&1&r.s}const Ke=lr((function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(t.recursive===!0)return En(r,e,t);const n=W({url:_(r.remoteURL,(o=U(e),o.endsWith("/")?o:o+"/")),method:"MKCOL"},r,t);var o;return ur(q(n,r),(function(u){X(r,u)}))}));var Tn=L(388),St=L.n(Tn);const On=(function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n={};if(typeof t.range=="object"&&typeof t.range.start=="number"){let i=`bytes=${t.range.start}-`;typeof t.range.end=="number"&&(i=`${i}${t.range.end}`),n.Range=i}const o=W({url:_(r.remoteURL,U(e)),method:"GET",headers:n},r,t);return c=function(i){if(X(r,i),n.Range&&i.status!==206){const h=new Error(`Invalid response code for partial request: ${i.status}`);throw h.status=i.status,h}return t.callback&&setTimeout((()=>{t.callback(i)}),0),i.body},(u=q(o,r))&&u.then||(u=Promise.resolve(u)),c?u.then(c):u;var u,c})),Cn=()=>{},In=(function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(r,e,t){t.url||(t.url=_(r.remoteURL,U(e)));const n=W(t,r,{});return u=function(c){return X(r,c),c},(o=q(n,r))&&o.then||(o=Promise.resolve(o)),u?o.then(u):o;var o,u})),Sn=(function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=W({url:_(r.remoteURL,U(e)),method:"DELETE"},r,t);return u=function(c){X(r,c)},(o=q(n,r))&&o.then||(o=Promise.resolve(o)),u?o.then(u):o;var o,u})),Fn=(function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function(n,o){try{var u=(c=it(r,e,t),i=function(){return!0},h?i?i(c):c:(c&&c.then||(c=Promise.resolve(c)),i?c.then(i):c))}catch(a){return o(a)}var c,i,h;return u&&u.then?u.then(void 0,o):u})(0,(function(n){if(n.status===404)return!1;throw n}))}));function $e(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const $n=(function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=W({url:_(r.remoteURL,U(e),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:t.deep?"infinity":"1"}},r,t);return $e(q(n,r),(function(o){return X(r,o),$e(o.text(),(function(u){if(!u)throw new Error("Failed parsing directory contents: Empty response");return $e(me(u),(function(c){const i=dt(e);let h=(function(a,s,f){let l=arguments.length>3&&arguments[3]!==void 0&&arguments[3],g=arguments.length>4&&arguments[4]!==void 0&&arguments[4];const d=ve().join(s,"/"),{multistatus:{response:m}}=a,w=m.map((v=>{const p=(function(A){try{return A.replace(/^https?:\/\/[^\/]+/,"")}catch(N){throw new Q(N,"Failed normalising HREF")}})(v.href),{propstat:{prop:y}}=v;return Te(y,d==="/"?decodeURIComponent(de(p)):de(ve().relative(decodeURIComponent(d),decodeURIComponent(p))),l)}));return g?w:w.filter((v=>v.basename&&(v.type==="file"||v.filename!==f.replace(/\/$/,""))))})(c,dt(r.remoteBasePath||r.remotePath),i,t.details,t.includeSelf);return t.glob&&(h=(function(a,s){return a.filter((f=>H(f.filename,s,{matchBase:!0})))})(h,t.glob)),ae(o,h,t.details)}))}))}))}));function ot(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}const jn=ot((function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=W({url:_(r.remoteURL,U(e)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[kn]},r,t);return Ae(q(n,r),(function(o){return X(r,o),Ae(o.text(),(function(u){return ae(o,u,t.details)}))}))}));function Ae(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const Rn=ot((function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=W({url:_(r.remoteURL,U(e)),method:"GET"},r,t);return Ae(q(n,r),(function(o){let u;return X(r,o),(function(c,i){var h=c();return h&&h.then?h.then(i):i()})((function(){return Ae(o.arrayBuffer(),(function(c){u=c}))}),(function(){return ae(o,u,t.details)}))}))})),Ln=ot((function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{format:n="binary"}=t;if(n!=="binary"&&n!=="text")throw new Q({info:{code:ie.InvalidOutputFormat}},`Invalid output format: ${n}`);return n==="text"?jn(r,e,t):Rn(r,e,t)})),kn=r=>r;function Un(r){return new st.XMLBuilder({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(cr({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:r}}},"d"))}function cr(r,e){const t={...r};for(const n in t)t.hasOwnProperty(n)&&(t[n]&&typeof t[n]=="object"&&n.indexOf(":")===-1?(t[`${e}:${n}`]=cr(t[n],e),delete t[n]):/^@_/.test(n)===!1&&(t[`${e}:${n}`]=t[n],delete t[n]));return t}function Qe(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}function hr(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}const _n=hr((function(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=W({url:_(r.remoteURL,U(e)),method:"UNLOCK",headers:{"Lock-Token":t}},r,n);return Qe(q(o,r),(function(u){if(X(r,u),u.status!==204&&u.status!==200)throw nt(u)}))})),Mn=hr((function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{refreshToken:n,timeout:o=Vn}=t,u={Accept:"text/plain,application/xml",Timeout:o};n&&(u.If=n);const c=W({url:_(r.remoteURL,U(e)),method:"LOCK",headers:u,data:Un(r.contactHref)},r,t);return Qe(q(c,r),(function(i){return X(r,i),Qe(i.text(),(function(h){const a=(l=h,new st.XMLParser({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(l)),s=ne().get(a,"prop.lockdiscovery.activelock.locktoken.href"),f=ne().get(a,"prop.lockdiscovery.activelock.timeout");var l;if(!s)throw nt(i,"No lock token received: ");return{token:s,serverTimeout:f}}))}))})),Vn="Infinite, Second-4100000000";function je(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const Bn=(function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const t=e.path||"/",n=W({url:_(r.remoteURL,t),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},r,e);return je(q(n,r),(function(o){return X(r,o),je(o.text(),(function(u){return je(me(u),(function(c){const i=(function(h){try{const[a]=h.multistatus.response,{propstat:{prop:{"quota-used-bytes":s,"quota-available-bytes":f}}}=a;return s!==void 0&&f!==void 0?{used:parseInt(String(s),10),available:ar(f)}:null}catch{}return null})(c);return ae(o,i,e.details)}))}))}))}));function Re(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const qn=(function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:n=!1}=t,o=W({url:_(r.remoteURL,U(e)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":r.headers["Content-Type"]||"application/xml; charset=utf-8"}},r,t);return Re(q(o,r),(function(u){return X(r,u),Re(u.text(),(function(c){return Re(me(c),(function(i){const h=(function(a,s,f){const l={truncated:!1,results:[]};return l.truncated=a.multistatus.response.some((g=>(g.status||g.propstat?.status).split(" ",3)?.[1]==="507"&&g.href.replace(/\/$/,"").endsWith(U(s).replace(/\/$/,"")))),a.multistatus.response.forEach((g=>{if(g.propstat===void 0)return;const d=g.href.split("/").map(decodeURIComponent).join("/");l.results.push(Te(g.propstat.prop,d,f))})),l})(i,e,n);return ae(u,h,n)}))}))}))})),Wn=(function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=W({url:_(r.remoteURL,U(e)),method:"MOVE",headers:{Destination:_(r.remoteURL,U(t)),Overwrite:n.overwrite===!1?"F":"T"}},r,n);return c=function(i){X(r,i)},(u=q(o,r))&&u.then||(u=Promise.resolve(u)),c?u.then(c):u;var u,c}));var Xn=L(172);const Gn=(function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const{contentLength:o=!0,overwrite:u=!0}=n,c={"Content-Type":"application/octet-stream"};o===!1||(c["Content-Length"]=typeof o=="number"?`${o}`:`${(function(s){if(Dt(s))return s.byteLength;if(er(s))return s.length;if(typeof s=="string")return(0,Xn.d)(s);throw new Q({info:{code:ie.DataTypeNoLength}},"Cannot calculate data length: Invalid type")})(t)}`),u||(c["If-None-Match"]="*");const i=W({url:_(r.remoteURL,U(e)),method:"PUT",headers:c,data:t},r,n);return a=function(s){try{X(r,s)}catch(f){const l=f;if(l.status!==412||u)throw l;return!1}return!0},(h=q(i,r))&&h.then||(h=Promise.resolve(h)),a?h.then(a):h;var h,a})),fr=(function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=W({url:_(r.remoteURL,U(e)),method:"OPTIONS"},r,t);return u=function(c){try{X(r,c)}catch(i){throw i}return{compliance:(c.headers.get("DAV")??"").split(",").map((i=>i.trim())),server:c.headers.get("Server")??""}},(o=q(n,r))&&o.then||(o=Promise.resolve(o)),u?o.then(u):o;var o,u}));function ge(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const zn=at((function(r,e,t,n,o){let u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(t>n||t<0)throw new Q({info:{code:ie.InvalidUpdateRange}},`Invalid update range ${t} for partial update`);const c={"Content-Type":"application/octet-stream","Content-Length":""+(n-t+1),"Content-Range":`bytes ${t}-${n}/*`},i=W({url:_(r.remoteURL,U(e)),method:"PUT",headers:c,data:o},r,u);return ge(q(i,r),(function(h){X(r,h)}))}));function Ft(r,e){var t=r();return t&&t.then?t.then(e):e(t)}const Jn=at((function(r,e,t,n,o){let u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(t>n||t<0)throw new Q({info:{code:ie.InvalidUpdateRange}},`Invalid update range ${t} for partial update`);const c={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(n-t+1),"X-Update-Range":`bytes=${t}-${n}`},i=W({url:_(r.remoteURL,U(e)),method:"PATCH",headers:c,data:o},r,u);return ge(q(i,r),(function(h){X(r,h)}))}));function at(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}const Hn=at((function(r,e,t,n,o){let u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};return ge(fr(r,e,u),(function(c){let i=!1;return Ft((function(){if(c.compliance.includes("sabredav-partialupdate"))return ge(Jn(r,e,t,n,o,u),(function(h){return i=!0,h}))}),(function(h){let a=!1;return i?h:Ft((function(){if(c.server.includes("Apache")&&c.compliance.includes("<http://apache.org/dav/propset/fs/1>"))return ge(zn(r,e,t,n,o,u),(function(s){return a=!0,s}))}),(function(s){if(a)return s;throw new Q({info:{code:ie.NotSupported}},"Not supported")}))}))}))})),Zn="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function Yn(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{authType:t=null,remoteBasePath:n,contactHref:o=Zn,ha1:u,headers:c={},httpAgent:i,httpsAgent:h,password:a,token:s,username:f,withCredentials:l}=e;let g=t;g||(g=f||a?Y.Password:Y.None);const d={authType:g,remoteBasePath:n,contactHref:o,ha1:u,headers:Object.assign({},c),httpAgent:i,httpsAgent:h,password:a,remotePath:Ur(r),remoteURL:r,token:s,username:f,withCredentials:l};return Yt(d,f,a,s,u),{copyFile:(m,w,v)=>xn(d,m,w,v),createDirectory:(m,w)=>Ke(d,m,w),createReadStream:(m,w)=>(function(v,p){let y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const A=new(St()).PassThrough;return On(v,p,y).then((N=>{N.pipe(A)})).catch((N=>{A.emit("error",N)})),A})(d,m,w),createWriteStream:(m,w,v)=>(function(p,y){let A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},N=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Cn;const b=new(St()).PassThrough,E={};A.overwrite===!1&&(E["If-None-Match"]="*");const x=W({url:_(p.remoteURL,U(y)),method:"PUT",headers:E,data:b,maxRedirects:0},p,A);return q(x,p).then((T=>X(p,T))).then((T=>{setTimeout((()=>{N(T)}),0)})).catch((T=>{b.emit("error",T)})),b})(d,m,w,v),customRequest:(m,w)=>In(d,m,w),deleteFile:(m,w)=>Sn(d,m,w),exists:(m,w)=>Fn(d,m,w),getDirectoryContents:(m,w)=>$n(d,m,w),getFileContents:(m,w)=>Ln(d,m,w),getFileDownloadLink:m=>(function(w,v){let p=_(w.remoteURL,U(v));const y=/^https:/i.test(p)?"https":"http";switch(w.authType){case Y.None:break;case Y.Password:{const A=bt(w.headers.Authorization.replace(/^Basic /i,"").trim());p=p.replace(/^https?:\/\//,`${y}://${A}@`);break}default:throw new Q({info:{code:ie.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${w.authType}`)}return p})(d,m),getFileUploadLink:m=>(function(w,v){let p=`${_(w.remoteURL,U(v))}?Content-Type=application/octet-stream`;const y=/^https:/i.test(p)?"https":"http";switch(w.authType){case Y.None:break;case Y.Password:{const A=bt(w.headers.Authorization.replace(/^Basic /i,"").trim());p=p.replace(/^https?:\/\//,`${y}://${A}@`);break}default:throw new Q({info:{code:ie.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${w.authType}`)}return p})(d,m),getHeaders:()=>Object.assign({},d.headers),getQuota:m=>Bn(d,m),lock:(m,w)=>Mn(d,m,w),moveFile:(m,w,v)=>Wn(d,m,w,v),putFileContents:(m,w,v)=>Gn(d,m,w,v),partialUpdateFileContents:(m,w,v,p,y)=>Hn(d,m,w,v,p,y),getDAVCompliance:m=>fr(d,m),search:(m,w)=>qn(d,m,w),setHeaders:m=>{d.headers=Object.assign({},m)},stat:(m,w)=>it(d,m,w),unlock:(m,w,v)=>_n(d,m,w,v)}}te.hT;te.O4;te.Kd;te.YK;var Kn=te.UU;te.Gu;te.ky;var Qn=te.h4,Dn=te.ch;te.hq;te.i5;const z=[];for(let r=0;r<256;++r)z.push((r+256).toString(16).slice(1));function es(r,e=0){return(z[r[e+0]]+z[r[e+1]]+z[r[e+2]]+z[r[e+3]]+"-"+z[r[e+4]]+z[r[e+5]]+"-"+z[r[e+6]]+z[r[e+7]]+"-"+z[r[e+8]]+z[r[e+9]]+"-"+z[r[e+10]]+z[r[e+11]]+z[r[e+12]]+z[r[e+13]]+z[r[e+14]]+z[r[e+15]]).toLowerCase()}let Le;const ts=new Uint8Array(16);function rs(){if(!Le){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Le=crypto.getRandomValues.bind(crypto)}return Le(ts)}const ns=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),$t={randomUUID:ns};function ss(r,e,t){r=r||{};const n=r.random??r.rng?.()??rs();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,es(n)}function is(r,e,t){return $t.randomUUID&&!r?$t.randomUUID():ss(r)}var ke={},Ue={},jt;function ut(){return jt||(jt=1,(function(r){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",t=e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",n="["+e+"]["+t+"]*",o=new RegExp("^"+n+"$"),u=function(i,h){const a=[];let s=h.exec(i);for(;s;){const f=[];f.startIndex=h.lastIndex-s[0].length;const l=s.length;for(let g=0;g<l;g++)f.push(s[g]);a.push(f),s=h.exec(i)}return a},c=function(i){const h=o.exec(i);return!(h===null||typeof h>"u")};r.isExist=function(i){return typeof i<"u"},r.isEmptyObject=function(i){return Object.keys(i).length===0},r.merge=function(i,h,a){if(h){const s=Object.keys(h),f=s.length;for(let l=0;l<f;l++)a==="strict"?i[s[l]]=[h[s[l]]]:i[s[l]]=h[s[l]]}},r.getValue=function(i){return r.isExist(i)?i:""},r.isName=c,r.getAllMatches=u,r.nameRegexp=n})(Ue)),Ue}var Rt;function pr(){if(Rt)return ke;Rt=1;const r=ut(),e={allowBooleanAttributes:!1,unpairedTags:[]};ke.validate=function(v,p){p=Object.assign({},e,p);const y=[];let A=!1,N=!1;v[0]==="\uFEFF"&&(v=v.substr(1));for(let b=0;b<v.length;b++)if(v[b]==="<"&&v[b+1]==="?"){if(b+=2,b=n(v,b),b.err)return b}else if(v[b]==="<"){let E=b;if(b++,v[b]==="!"){b=o(v,b);continue}else{let x=!1;v[b]==="/"&&(x=!0,b++);let T="";for(;b<v.length&&v[b]!==">"&&v[b]!==" "&&v[b]!==" "&&v[b]!==`
11
+ `&&v[b]!=="\r";b++)T+=v[b];if(T=T.trim(),T[T.length-1]==="/"&&(T=T.substring(0,T.length-1),b--),!d(T)){let C;return T.trim().length===0?C="Invalid space after '<'.":C="Tag '"+T+"' is an invalid name.",l("InvalidTag",C,m(v,b))}const O=i(v,b);if(O===!1)return l("InvalidAttr","Attributes for '"+T+"' have open quote.",m(v,b));let I=O.value;if(b=O.index,I[I.length-1]==="/"){const C=b-I.length;I=I.substring(0,I.length-1);const P=a(I,p);if(P===!0)A=!0;else return l(P.err.code,P.err.msg,m(v,C+P.err.line))}else if(x)if(O.tagClosed){if(I.trim().length>0)return l("InvalidTag","Closing tag '"+T+"' can't have attributes or invalid starting.",m(v,E));if(y.length===0)return l("InvalidTag","Closing tag '"+T+"' has not been opened.",m(v,E));{const C=y.pop();if(T!==C.tagName){let P=m(v,C.tagStartPos);return l("InvalidTag","Expected closing tag '"+C.tagName+"' (opened in line "+P.line+", col "+P.col+") instead of closing tag '"+T+"'.",m(v,E))}y.length==0&&(N=!0)}}else return l("InvalidTag","Closing tag '"+T+"' doesn't have proper closing.",m(v,b));else{const C=a(I,p);if(C!==!0)return l(C.err.code,C.err.msg,m(v,b-I.length+C.err.line));if(N===!0)return l("InvalidXml","Multiple possible root nodes found.",m(v,b));p.unpairedTags.indexOf(T)!==-1||y.push({tagName:T,tagStartPos:E}),A=!0}for(b++;b<v.length;b++)if(v[b]==="<")if(v[b+1]==="!"){b++,b=o(v,b);continue}else if(v[b+1]==="?"){if(b=n(v,++b),b.err)return b}else break;else if(v[b]==="&"){const C=f(v,b);if(C==-1)return l("InvalidChar","char '&' is not expected.",m(v,b));b=C}else if(N===!0&&!t(v[b]))return l("InvalidXml","Extra text at the end",m(v,b));v[b]==="<"&&b--}}else{if(t(v[b]))continue;return l("InvalidChar","char '"+v[b]+"' is not expected.",m(v,b))}if(A){if(y.length==1)return l("InvalidTag","Unclosed tag '"+y[0].tagName+"'.",m(v,y[0].tagStartPos));if(y.length>0)return l("InvalidXml","Invalid '"+JSON.stringify(y.map(b=>b.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return l("InvalidXml","Start tag expected.",1);return!0};function t(v){return v===" "||v===" "||v===`
12
+ `||v==="\r"}function n(v,p){const y=p;for(;p<v.length;p++)if(v[p]=="?"||v[p]==" "){const A=v.substr(y,p-y);if(p>5&&A==="xml")return l("InvalidXml","XML declaration allowed only at the start of the document.",m(v,p));if(v[p]=="?"&&v[p+1]==">"){p++;break}else continue}return p}function o(v,p){if(v.length>p+5&&v[p+1]==="-"&&v[p+2]==="-"){for(p+=3;p<v.length;p++)if(v[p]==="-"&&v[p+1]==="-"&&v[p+2]===">"){p+=2;break}}else if(v.length>p+8&&v[p+1]==="D"&&v[p+2]==="O"&&v[p+3]==="C"&&v[p+4]==="T"&&v[p+5]==="Y"&&v[p+6]==="P"&&v[p+7]==="E"){let y=1;for(p+=8;p<v.length;p++)if(v[p]==="<")y++;else if(v[p]===">"&&(y--,y===0))break}else if(v.length>p+9&&v[p+1]==="["&&v[p+2]==="C"&&v[p+3]==="D"&&v[p+4]==="A"&&v[p+5]==="T"&&v[p+6]==="A"&&v[p+7]==="["){for(p+=8;p<v.length;p++)if(v[p]==="]"&&v[p+1]==="]"&&v[p+2]===">"){p+=2;break}}return p}const u='"',c="'";function i(v,p){let y="",A="",N=!1;for(;p<v.length;p++){if(v[p]===u||v[p]===c)A===""?A=v[p]:A!==v[p]||(A="");else if(v[p]===">"&&A===""){N=!0;break}y+=v[p]}return A!==""?!1:{value:y,index:p,tagClosed:N}}const h=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function a(v,p){const y=r.getAllMatches(v,h),A={};for(let N=0;N<y.length;N++){if(y[N][1].length===0)return l("InvalidAttr","Attribute '"+y[N][2]+"' has no space in starting.",w(y[N]));if(y[N][3]!==void 0&&y[N][4]===void 0)return l("InvalidAttr","Attribute '"+y[N][2]+"' is without value.",w(y[N]));if(y[N][3]===void 0&&!p.allowBooleanAttributes)return l("InvalidAttr","boolean attribute '"+y[N][2]+"' is not allowed.",w(y[N]));const b=y[N][2];if(!g(b))return l("InvalidAttr","Attribute '"+b+"' is an invalid name.",w(y[N]));if(!A.hasOwnProperty(b))A[b]=1;else return l("InvalidAttr","Attribute '"+b+"' is repeated.",w(y[N]))}return!0}function s(v,p){let y=/\d/;for(v[p]==="x"&&(p++,y=/[\da-fA-F]/);p<v.length;p++){if(v[p]===";")return p;if(!v[p].match(y))break}return-1}function f(v,p){if(p++,v[p]===";")return-1;if(v[p]==="#")return p++,s(v,p);let y=0;for(;p<v.length;p++,y++)if(!(v[p].match(/\w/)&&y<20)){if(v[p]===";")break;return-1}return p}function l(v,p,y){return{err:{code:v,msg:p,line:y.line||y,col:y.col}}}function g(v){return r.isName(v)}function d(v){return r.isName(v)}function m(v,p){const y=v.substring(0,p).split(/\r?\n/);return{line:y.length,col:y[y.length-1].length+1}}function w(v){return v.startIndex+v[1].length}return ke}var ye={},Lt;function os(){if(Lt)return ye;Lt=1;const r={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,n){return n},attributeValueProcessor:function(t,n){return n},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,n,o){return t}},e=function(t){return Object.assign({},r,t)};return ye.buildOptions=e,ye.defaultOptions=r,ye}var _e,kt;function as(){if(kt)return _e;kt=1;class r{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,n){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:n})}addChild(t){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})}}return _e=r,_e}var Me,Ut;function us(){if(Ut)return Me;Ut=1;const r=ut();function e(a,s){const f={};if(a[s+3]==="O"&&a[s+4]==="C"&&a[s+5]==="T"&&a[s+6]==="Y"&&a[s+7]==="P"&&a[s+8]==="E"){s=s+9;let l=1,g=!1,d=!1,m="";for(;s<a.length;s++)if(a[s]==="<"&&!d){if(g&&o(a,s)){s+=7;let w,v;[w,v,s]=t(a,s+1),v.indexOf("&")===-1&&(f[h(w)]={regx:RegExp(`&${w};`,"g"),val:v})}else if(g&&u(a,s))s+=8;else if(g&&c(a,s))s+=8;else if(g&&i(a,s))s+=9;else if(n)d=!0;else throw new Error("Invalid DOCTYPE");l++,m=""}else if(a[s]===">"){if(d?a[s-1]==="-"&&a[s-2]==="-"&&(d=!1,l--):l--,l===0)break}else a[s]==="["?g=!0:m+=a[s];if(l!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:f,i:s}}function t(a,s){let f="";for(;s<a.length&&a[s]!=="'"&&a[s]!=='"';s++)f+=a[s];if(f=f.trim(),f.indexOf(" ")!==-1)throw new Error("External entites are not supported");const l=a[s++];let g="";for(;s<a.length&&a[s]!==l;s++)g+=a[s];return[f,g,s]}function n(a,s){return a[s+1]==="!"&&a[s+2]==="-"&&a[s+3]==="-"}function o(a,s){return a[s+1]==="!"&&a[s+2]==="E"&&a[s+3]==="N"&&a[s+4]==="T"&&a[s+5]==="I"&&a[s+6]==="T"&&a[s+7]==="Y"}function u(a,s){return a[s+1]==="!"&&a[s+2]==="E"&&a[s+3]==="L"&&a[s+4]==="E"&&a[s+5]==="M"&&a[s+6]==="E"&&a[s+7]==="N"&&a[s+8]==="T"}function c(a,s){return a[s+1]==="!"&&a[s+2]==="A"&&a[s+3]==="T"&&a[s+4]==="T"&&a[s+5]==="L"&&a[s+6]==="I"&&a[s+7]==="S"&&a[s+8]==="T"}function i(a,s){return a[s+1]==="!"&&a[s+2]==="N"&&a[s+3]==="O"&&a[s+4]==="T"&&a[s+5]==="A"&&a[s+6]==="T"&&a[s+7]==="I"&&a[s+8]==="O"&&a[s+9]==="N"}function h(a){if(r.isName(a))return a;throw new Error(`Invalid entity name ${a}`)}return Me=e,Me}var Ve,_t;function ls(){if(_t)return Ve;_t=1;const r=/^[-+]?0x[a-fA-F0-9]+$/,e=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,t={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function n(c,i={}){if(i=Object.assign({},t,i),!c||typeof c!="string")return c;let h=c.trim();if(i.skipLike!==void 0&&i.skipLike.test(h))return c;if(c==="0")return 0;if(i.hex&&r.test(h))return u(h,16);if(h.search(/[eE]/)!==-1){const a=h.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(a){if(i.leadingZeros)h=(a[1]||"")+a[3];else if(!(a[2]==="0"&&a[3][0]==="."))return c;return i.eNotation?Number(h):c}else return c}else{const a=e.exec(h);if(a){const s=a[1],f=a[2];let l=o(a[3]);if(!i.leadingZeros&&f.length>0&&s&&h[2]!==".")return c;if(!i.leadingZeros&&f.length>0&&!s&&h[1]!==".")return c;if(i.leadingZeros&&f===c)return 0;{const g=Number(h),d=""+g;return d.search(/[eE]/)!==-1?i.eNotation?g:c:h.indexOf(".")!==-1?d==="0"&&l===""||d===l||s&&d==="-"+l?g:c:f?l===d||s+l===d?g:c:h===d||h===s+d?g:c}}else return c}}function o(c){return c&&c.indexOf(".")!==-1&&(c=c.replace(/0+$/,""),c==="."?c="0":c[0]==="."?c="0"+c:c[c.length-1]==="."&&(c=c.substr(0,c.length-1))),c}function u(c,i){if(parseInt)return parseInt(c,i);if(Number.parseInt)return Number.parseInt(c,i);if(window&&window.parseInt)return window.parseInt(c,i);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}return Ve=n,Ve}var Be,Mt;function gr(){if(Mt)return Be;Mt=1;function r(e){return typeof e=="function"?e:Array.isArray(e)?t=>{for(const n of e)if(typeof n=="string"&&t===n||n instanceof RegExp&&n.test(t))return!0}:()=>!1}return Be=r,Be}var qe,Vt;function cs(){if(Vt)return qe;Vt=1;const r=ut(),e=as(),t=us(),n=ls(),o=gr();class u{constructor(b){this.options=b,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,x)=>String.fromCharCode(Number.parseInt(x,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(E,x)=>String.fromCharCode(Number.parseInt(x,16))}},this.addExternalEntities=c,this.parseXml=f,this.parseTextData=i,this.resolveNameSpace=h,this.buildAttributesMap=s,this.isItStopNode=m,this.replaceEntitiesValue=g,this.readStopNodeData=y,this.saveTextToParentTag=d,this.addChild=l,this.ignoreAttributesFn=o(this.options.ignoreAttributes)}}function c(N){const b=Object.keys(N);for(let E=0;E<b.length;E++){const x=b[E];this.lastEntities[x]={regex:new RegExp("&"+x+";","g"),val:N[x]}}}function i(N,b,E,x,T,O,I){if(N!==void 0&&(this.options.trimValues&&!x&&(N=N.trim()),N.length>0)){I||(N=this.replaceEntitiesValue(N));const C=this.options.tagValueProcessor(b,N,E,T,O);return C==null?N:typeof C!=typeof N||C!==N?C:this.options.trimValues?A(N,this.options.parseTagValue,this.options.numberParseOptions):N.trim()===N?A(N,this.options.parseTagValue,this.options.numberParseOptions):N}}function h(N){if(this.options.removeNSPrefix){const b=N.split(":"),E=N.charAt(0)==="/"?"/":"";if(b[0]==="xmlns")return"";b.length===2&&(N=E+b[1])}return N}const a=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function s(N,b,E){if(this.options.ignoreAttributes!==!0&&typeof N=="string"){const x=r.getAllMatches(N,a),T=x.length,O={};for(let I=0;I<T;I++){const C=this.resolveNameSpace(x[I][1]);if(this.ignoreAttributesFn(C,b))continue;let P=x[I][4],F=this.options.attributeNamePrefix+C;if(C.length)if(this.options.transformAttributeName&&(F=this.options.transformAttributeName(F)),F==="__proto__"&&(F="#__proto__"),P!==void 0){this.options.trimValues&&(P=P.trim()),P=this.replaceEntitiesValue(P);const S=this.options.attributeValueProcessor(C,P,b);S==null?O[F]=P:typeof S!=typeof P||S!==P?O[F]=S:O[F]=A(P,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(O[F]=!0)}if(!Object.keys(O).length)return;if(this.options.attributesGroupName){const I={};return I[this.options.attributesGroupName]=O,I}return O}}const f=function(N){N=N.replace(/\r\n?/g,`
13
+ `);const b=new e("!xml");let E=b,x="",T="";for(let O=0;O<N.length;O++)if(N[O]==="<")if(N[O+1]==="/"){const C=v(N,">",O,"Closing Tag is not closed.");let P=N.substring(O+2,C).trim();if(this.options.removeNSPrefix){const $=P.indexOf(":");$!==-1&&(P=P.substr($+1))}this.options.transformTagName&&(P=this.options.transformTagName(P)),E&&(x=this.saveTextToParentTag(x,E,T));const F=T.substring(T.lastIndexOf(".")+1);if(P&&this.options.unpairedTags.indexOf(P)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${P}>`);let S=0;F&&this.options.unpairedTags.indexOf(F)!==-1?(S=T.lastIndexOf(".",T.lastIndexOf(".")-1),this.tagsNodeStack.pop()):S=T.lastIndexOf("."),T=T.substring(0,S),E=this.tagsNodeStack.pop(),x="",O=C}else if(N[O+1]==="?"){let C=p(N,O,!1,"?>");if(!C)throw new Error("Pi Tag is not closed.");if(x=this.saveTextToParentTag(x,E,T),!(this.options.ignoreDeclaration&&C.tagName==="?xml"||this.options.ignorePiTags)){const P=new e(C.tagName);P.add(this.options.textNodeName,""),C.tagName!==C.tagExp&&C.attrExpPresent&&(P[":@"]=this.buildAttributesMap(C.tagExp,T,C.tagName)),this.addChild(E,P,T)}O=C.closeIndex+1}else if(N.substr(O+1,3)==="!--"){const C=v(N,"-->",O+4,"Comment is not closed.");if(this.options.commentPropName){const P=N.substring(O+4,C-2);x=this.saveTextToParentTag(x,E,T),E.add(this.options.commentPropName,[{[this.options.textNodeName]:P}])}O=C}else if(N.substr(O+1,2)==="!D"){const C=t(N,O);this.docTypeEntities=C.entities,O=C.i}else if(N.substr(O+1,2)==="!["){const C=v(N,"]]>",O,"CDATA is not closed.")-2,P=N.substring(O+9,C);x=this.saveTextToParentTag(x,E,T);let F=this.parseTextData(P,E.tagname,T,!0,!1,!0,!0);F==null&&(F=""),this.options.cdataPropName?E.add(this.options.cdataPropName,[{[this.options.textNodeName]:P}]):E.add(this.options.textNodeName,F),O=C+2}else{let C=p(N,O,this.options.removeNSPrefix),P=C.tagName;const F=C.rawTagName;let S=C.tagExp,$=C.attrExpPresent,B=C.closeIndex;this.options.transformTagName&&(P=this.options.transformTagName(P)),E&&x&&E.tagname!=="!xml"&&(x=this.saveTextToParentTag(x,E,T,!1));const M=E;if(M&&this.options.unpairedTags.indexOf(M.tagname)!==-1&&(E=this.tagsNodeStack.pop(),T=T.substring(0,T.lastIndexOf("."))),P!==b.tagname&&(T+=T?"."+P:P),this.isItStopNode(this.options.stopNodes,T,P)){let j="";if(S.length>0&&S.lastIndexOf("/")===S.length-1)P[P.length-1]==="/"?(P=P.substr(0,P.length-1),T=T.substr(0,T.length-1),S=P):S=S.substr(0,S.length-1),O=C.closeIndex;else if(this.options.unpairedTags.indexOf(P)!==-1)O=C.closeIndex;else{const k=this.readStopNodeData(N,F,B+1);if(!k)throw new Error(`Unexpected end of ${F}`);O=k.i,j=k.tagContent}const J=new e(P);P!==S&&$&&(J[":@"]=this.buildAttributesMap(S,T,P)),j&&(j=this.parseTextData(j,P,T,!0,$,!0,!0)),T=T.substr(0,T.lastIndexOf(".")),J.add(this.options.textNodeName,j),this.addChild(E,J,T)}else{if(S.length>0&&S.lastIndexOf("/")===S.length-1){P[P.length-1]==="/"?(P=P.substr(0,P.length-1),T=T.substr(0,T.length-1),S=P):S=S.substr(0,S.length-1),this.options.transformTagName&&(P=this.options.transformTagName(P));const j=new e(P);P!==S&&$&&(j[":@"]=this.buildAttributesMap(S,T,P)),this.addChild(E,j,T),T=T.substr(0,T.lastIndexOf("."))}else{const j=new e(P);this.tagsNodeStack.push(E),P!==S&&$&&(j[":@"]=this.buildAttributesMap(S,T,P)),this.addChild(E,j,T),E=j}x="",O=B}}else x+=N[O];return b.child};function l(N,b,E){const x=this.options.updateTag(b.tagname,E,b[":@"]);x===!1||(typeof x=="string"&&(b.tagname=x),N.addChild(b))}const g=function(N){if(this.options.processEntities){for(let b in this.docTypeEntities){const E=this.docTypeEntities[b];N=N.replace(E.regx,E.val)}for(let b in this.lastEntities){const E=this.lastEntities[b];N=N.replace(E.regex,E.val)}if(this.options.htmlEntities)for(let b in this.htmlEntities){const E=this.htmlEntities[b];N=N.replace(E.regex,E.val)}N=N.replace(this.ampEntity.regex,this.ampEntity.val)}return N};function d(N,b,E,x){return N&&(x===void 0&&(x=b.child.length===0),N=this.parseTextData(N,b.tagname,E,!1,b[":@"]?Object.keys(b[":@"]).length!==0:!1,x),N!==void 0&&N!==""&&b.add(this.options.textNodeName,N),N=""),N}function m(N,b,E){const x="*."+E;for(const T in N){const O=N[T];if(x===O||b===O)return!0}return!1}function w(N,b,E=">"){let x,T="";for(let O=b;O<N.length;O++){let I=N[O];if(x)I===x&&(x="");else if(I==='"'||I==="'")x=I;else if(I===E[0])if(E[1]){if(N[O+1]===E[1])return{data:T,index:O}}else return{data:T,index:O};else I===" "&&(I=" ");T+=I}}function v(N,b,E,x){const T=N.indexOf(b,E);if(T===-1)throw new Error(x);return T+b.length-1}function p(N,b,E,x=">"){const T=w(N,b+1,x);if(!T)return;let O=T.data;const I=T.index,C=O.search(/\s/);let P=O,F=!0;C!==-1&&(P=O.substring(0,C),O=O.substring(C+1).trimStart());const S=P;if(E){const $=P.indexOf(":");$!==-1&&(P=P.substr($+1),F=P!==T.data.substr($+1))}return{tagName:P,tagExp:O,closeIndex:I,attrExpPresent:F,rawTagName:S}}function y(N,b,E){const x=E;let T=1;for(;E<N.length;E++)if(N[E]==="<")if(N[E+1]==="/"){const O=v(N,">",E,`${b} is not closed`);if(N.substring(E+2,O).trim()===b&&(T--,T===0))return{tagContent:N.substring(x,E),i:O};E=O}else if(N[E+1]==="?")E=v(N,"?>",E+1,"StopNode is not closed.");else if(N.substr(E+1,3)==="!--")E=v(N,"-->",E+3,"StopNode is not closed.");else if(N.substr(E+1,2)==="![")E=v(N,"]]>",E,"StopNode is not closed.")-2;else{const O=p(N,E,">");O&&((O&&O.tagName)===b&&O.tagExp[O.tagExp.length-1]!=="/"&&T++,E=O.closeIndex)}}function A(N,b,E){if(b&&typeof N=="string"){const x=N.trim();return x==="true"?!0:x==="false"?!1:n(N,E)}else return r.isExist(N)?N:""}return qe=u,qe}var We={},Bt;function hs(){if(Bt)return We;Bt=1;function r(u,c){return e(u,c)}function e(u,c,i){let h;const a={};for(let s=0;s<u.length;s++){const f=u[s],l=t(f);let g="";if(i===void 0?g=l:g=i+"."+l,l===c.textNodeName)h===void 0?h=f[l]:h+=""+f[l];else{if(l===void 0)continue;if(f[l]){let d=e(f[l],c,g);const m=o(d,c);f[":@"]?n(d,f[":@"],g,c):Object.keys(d).length===1&&d[c.textNodeName]!==void 0&&!c.alwaysCreateTextNode?d=d[c.textNodeName]:Object.keys(d).length===0&&(c.alwaysCreateTextNode?d[c.textNodeName]="":d=""),a[l]!==void 0&&a.hasOwnProperty(l)?(Array.isArray(a[l])||(a[l]=[a[l]]),a[l].push(d)):c.isArray(l,g,m)?a[l]=[d]:a[l]=d}}}return typeof h=="string"?h.length>0&&(a[c.textNodeName]=h):h!==void 0&&(a[c.textNodeName]=h),a}function t(u){const c=Object.keys(u);for(let i=0;i<c.length;i++){const h=c[i];if(h!==":@")return h}}function n(u,c,i,h){if(c){const a=Object.keys(c),s=a.length;for(let f=0;f<s;f++){const l=a[f];h.isArray(l,i+"."+l,!0,!0)?u[l]=[c[l]]:u[l]=c[l]}}}function o(u,c){const{textNodeName:i}=c,h=Object.keys(u).length;return!!(h===0||h===1&&(u[i]||typeof u[i]=="boolean"||u[i]===0))}return We.prettify=r,We}var Xe,qt;function fs(){if(qt)return Xe;qt=1;const{buildOptions:r}=os(),e=cs(),{prettify:t}=hs(),n=pr();class o{constructor(c){this.externalEntities={},this.options=r(c)}parse(c,i){if(typeof c!="string")if(c.toString)c=c.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(i){i===!0&&(i={});const s=n.validate(c,i);if(s!==!0)throw Error(`${s.err.msg}:${s.err.line}:${s.err.col}`)}const h=new e(this.options);h.addExternalEntities(this.externalEntities);const a=h.parseXml(c);return this.options.preserveOrder||a===void 0?a:t(a,this.options)}addEntity(c,i){if(i.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(c.indexOf("&")!==-1||c.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(i==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[c]=i}}return Xe=o,Xe}var Ge,Wt;function ps(){if(Wt)return Ge;Wt=1;const r=`
14
+ `;function e(i,h){let a="";return h.format&&h.indentBy.length>0&&(a=r),t(i,h,"",a)}function t(i,h,a,s){let f="",l=!1;for(let g=0;g<i.length;g++){const d=i[g],m=n(d);if(m===void 0)continue;let w="";if(a.length===0?w=m:w=`${a}.${m}`,m===h.textNodeName){let N=d[m];u(w,h)||(N=h.tagValueProcessor(m,N),N=c(N,h)),l&&(f+=s),f+=N,l=!1;continue}else if(m===h.cdataPropName){l&&(f+=s),f+=`<![CDATA[${d[m][0][h.textNodeName]}]]>`,l=!1;continue}else if(m===h.commentPropName){f+=s+`<!--${d[m][0][h.textNodeName]}-->`,l=!0;continue}else if(m[0]==="?"){const N=o(d[":@"],h),b=m==="?xml"?"":s;let E=d[m][0][h.textNodeName];E=E.length!==0?" "+E:"",f+=b+`<${m}${E}${N}?>`,l=!0;continue}let v=s;v!==""&&(v+=h.indentBy);const p=o(d[":@"],h),y=s+`<${m}${p}`,A=t(d[m],h,w,v);h.unpairedTags.indexOf(m)!==-1?h.suppressUnpairedNode?f+=y+">":f+=y+"/>":(!A||A.length===0)&&h.suppressEmptyNode?f+=y+"/>":A&&A.endsWith(">")?f+=y+`>${A}${s}</${m}>`:(f+=y+">",A&&s!==""&&(A.includes("/>")||A.includes("</"))?f+=s+h.indentBy+A+s:f+=A,f+=`</${m}>`),l=!0}return f}function n(i){const h=Object.keys(i);for(let a=0;a<h.length;a++){const s=h[a];if(i.hasOwnProperty(s)&&s!==":@")return s}}function o(i,h){let a="";if(i&&!h.ignoreAttributes)for(let s in i){if(!i.hasOwnProperty(s))continue;let f=h.attributeValueProcessor(s,i[s]);f=c(f,h),f===!0&&h.suppressBooleanAttributes?a+=` ${s.substr(h.attributeNamePrefix.length)}`:a+=` ${s.substr(h.attributeNamePrefix.length)}="${f}"`}return a}function u(i,h){i=i.substr(0,i.length-h.textNodeName.length-1);let a=i.substr(i.lastIndexOf(".")+1);for(let s in h.stopNodes)if(h.stopNodes[s]===i||h.stopNodes[s]==="*."+a)return!0;return!1}function c(i,h){if(i&&i.length>0&&h.processEntities)for(let a=0;a<h.entities.length;a++){const s=h.entities[a];i=i.replace(s.regex,s.val)}return i}return Ge=e,Ge}var ze,Xt;function gs(){if(Xt)return ze;Xt=1;const r=ps(),e=gr(),t={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(i,h){return h},attributeValueProcessor:function(i,h){return h},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function n(i){this.options=Object.assign({},t,i),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=e(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=c),this.processTextOrObjNode=o,this.options.format?(this.indentate=u,this.tagEndChar=`>
15
+ `,this.newLine=`
16
+ `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}n.prototype.build=function(i){return this.options.preserveOrder?r(i,this.options):(Array.isArray(i)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(i={[this.options.arrayNodeName]:i}),this.j2x(i,0,[]).val)},n.prototype.j2x=function(i,h,a){let s="",f="";const l=a.join(".");for(let g in i)if(Object.prototype.hasOwnProperty.call(i,g))if(typeof i[g]>"u")this.isAttribute(g)&&(f+="");else if(i[g]===null)this.isAttribute(g)||g===this.options.cdataPropName?f+="":g[0]==="?"?f+=this.indentate(h)+"<"+g+"?"+this.tagEndChar:f+=this.indentate(h)+"<"+g+"/"+this.tagEndChar;else if(i[g]instanceof Date)f+=this.buildTextValNode(i[g],g,"",h);else if(typeof i[g]!="object"){const d=this.isAttribute(g);if(d&&!this.ignoreAttributesFn(d,l))s+=this.buildAttrPairStr(d,""+i[g]);else if(!d)if(g===this.options.textNodeName){let m=this.options.tagValueProcessor(g,""+i[g]);f+=this.replaceEntitiesValue(m)}else f+=this.buildTextValNode(i[g],g,"",h)}else if(Array.isArray(i[g])){const d=i[g].length;let m="",w="";for(let v=0;v<d;v++){const p=i[g][v];if(!(typeof p>"u"))if(p===null)g[0]==="?"?f+=this.indentate(h)+"<"+g+"?"+this.tagEndChar:f+=this.indentate(h)+"<"+g+"/"+this.tagEndChar;else if(typeof p=="object")if(this.options.oneListGroup){const y=this.j2x(p,h+1,a.concat(g));m+=y.val,this.options.attributesGroupName&&p.hasOwnProperty(this.options.attributesGroupName)&&(w+=y.attrStr)}else m+=this.processTextOrObjNode(p,g,h,a);else if(this.options.oneListGroup){let y=this.options.tagValueProcessor(g,p);y=this.replaceEntitiesValue(y),m+=y}else m+=this.buildTextValNode(p,g,"",h)}this.options.oneListGroup&&(m=this.buildObjectNode(m,g,w,h)),f+=m}else if(this.options.attributesGroupName&&g===this.options.attributesGroupName){const d=Object.keys(i[g]),m=d.length;for(let w=0;w<m;w++)s+=this.buildAttrPairStr(d[w],""+i[g][d[w]])}else f+=this.processTextOrObjNode(i[g],g,h,a);return{attrStr:s,val:f}},n.prototype.buildAttrPairStr=function(i,h){return h=this.options.attributeValueProcessor(i,""+h),h=this.replaceEntitiesValue(h),this.options.suppressBooleanAttributes&&h==="true"?" "+i:" "+i+'="'+h+'"'};function o(i,h,a,s){const f=this.j2x(i,a+1,s.concat(h));return i[this.options.textNodeName]!==void 0&&Object.keys(i).length===1?this.buildTextValNode(i[this.options.textNodeName],h,f.attrStr,a):this.buildObjectNode(f.val,h,f.attrStr,a)}n.prototype.buildObjectNode=function(i,h,a,s){if(i==="")return h[0]==="?"?this.indentate(s)+"<"+h+a+"?"+this.tagEndChar:this.indentate(s)+"<"+h+a+this.closeTag(h)+this.tagEndChar;{let f="</"+h+this.tagEndChar,l="";return h[0]==="?"&&(l="?",f=""),(a||a==="")&&i.indexOf("<")===-1?this.indentate(s)+"<"+h+a+l+">"+i+f:this.options.commentPropName!==!1&&h===this.options.commentPropName&&l.length===0?this.indentate(s)+`<!--${i}-->`+this.newLine:this.indentate(s)+"<"+h+a+l+this.tagEndChar+i+this.indentate(s)+f}},n.prototype.closeTag=function(i){let h="";return this.options.unpairedTags.indexOf(i)!==-1?this.options.suppressUnpairedNode||(h="/"):this.options.suppressEmptyNode?h="/":h=`></${i}`,h},n.prototype.buildTextValNode=function(i,h,a,s){if(this.options.cdataPropName!==!1&&h===this.options.cdataPropName)return this.indentate(s)+`<![CDATA[${i}]]>`+this.newLine;if(this.options.commentPropName!==!1&&h===this.options.commentPropName)return this.indentate(s)+`<!--${i}-->`+this.newLine;if(h[0]==="?")return this.indentate(s)+"<"+h+a+"?"+this.tagEndChar;{let f=this.options.tagValueProcessor(h,i);return f=this.replaceEntitiesValue(f),f===""?this.indentate(s)+"<"+h+a+this.closeTag(h)+this.tagEndChar:this.indentate(s)+"<"+h+a+">"+f+"</"+h+this.tagEndChar}},n.prototype.replaceEntitiesValue=function(i){if(i&&i.length>0&&this.options.processEntities)for(let h=0;h<this.options.entities.length;h++){const a=this.options.entities[h];i=i.replace(a.regex,a.val)}return i};function u(i){return this.options.indentBy.repeat(i)}function c(i){return i.startsWith(this.options.attributeNamePrefix)&&i!==this.options.textNodeName?i.substr(this.attrPrefixLen):!1}return ze=n,ze}var Je,Gt;function ds(){if(Gt)return Je;Gt=1;const r=pr(),e=fs(),t=gs();return Je={XMLParser:e,XMLValidator:r,XMLBuilder:t},Je}var lt=ds();const De=(r,e)=>Object.fromEntries(Object.entries(r).map(([t,n])=>e.includes(t)?[t,n||""]:[R.DavProperties.DavNamespace.includes(t)?`d:${t}`:`oc:${t}`,n||""])),zt=(r=[],{pattern:e,filterRules:t,limit:n=0,extraProps:o=[]})=>{let u="d:propfind";e&&(u="oc:search-files"),t&&(u="oc:filter-files");const c=r.reduce((s,f)=>Object.assign(s,{[f]:null}),{}),i=De(c,o),h={[u]:{"d:prop":i,"@@xmlns:d":"DAV:","@@xmlns:oc":"http://owncloud.org/ns",...e&&{"oc:search":{"oc:pattern":e,"oc:limit":n}},...t&&{"oc:filter-rules":De(t,[])}}};return new lt.XMLBuilder({format:!0,ignoreAttributes:!1,attributeNamePrefix:"@@",suppressEmptyNode:!0}).build(h)},ms=r=>{const e={"d:propertyupdate":{"d:set":{"d:prop":De(r,[])},"@@xmlns:d":"DAV:","@@xmlns:oc":"http://owncloud.org/ns"}};return new lt.XMLBuilder({format:!0,ignoreAttributes:!1,attributeNamePrefix:"@@",suppressEmptyNode:!0}).build(e)},bs=r=>{const e={},t=r.get("tus-version");return t?(e.version=t.split(","),r.get("tus-extension")&&(e.extension=r.get("tus-extension").split(",")),r.get("tus-resumable")&&(e.resumable=r.get("tus-resumable")),r.get("tus-max-size")&&(e.maxSize=parseInt(r.get("tus-max-size"),10)),e):null},ys=async r=>{const e=n=>{const o=decodeURIComponent(n);return n?.startsWith("/remote.php/dav/")?V.urlJoin(o.replace("/remote.php/dav/",""),{leadingSlash:!0,trailingSlash:!1}):o};return(await Qn(r)).multistatus.response.map(({href:n,propstat:o})=>{const u={...Dn(o.prop,e(n),!0),processing:o.status==="HTTP/1.1 425 TOO EARLY"};return u.props.name&&(u.props.name=u.props.name.toString()),u})},vs=r=>{const e=new lt.XMLParser,t={message:"Unknown error",errorCode:void 0};try{const n=e.parse(r);if(!n["d:error"])return t;if(n["d:error"]["s:message"]){const o=n["d:error"]["s:message"];typeof o=="string"&&(t.message=o)}if(n["d:error"]["s:errorcode"]){const o=n["d:error"]["s:errorcode"];typeof o=="string"&&(t.errorCode=o)}}catch{return t}return t};class ws{client;davPath;headers;extraProps;constructor({baseUrl:e,headers:t}){this.davPath=V.urlJoin(e,"remote.php/dav"),this.client=Kn(this.davPath,{}),this.headers=t,this.extraProps=[]}mkcol(e,t={}){return this.request(e,{method:R.DavMethod.mkcol,...t})}async propfind(e,{depth:t=1,properties:n=[],headers:o={},...u}={}){const c={...o,Depth:t.toString()},{body:i,result:h}=await this.request(e,{method:R.DavMethod.propfind,data:zt(n,{extraProps:this.extraProps}),headers:c,...u});return i?.length&&(i[0].tusSupport=bs(h.headers)),i}async report(e,{pattern:t="",filterRules:n=null,limit:o=30,properties:u,...c}={}){const{body:i,result:h}=await this.request(e,{method:R.DavMethod.report,data:zt(u,{pattern:t,filterRules:n,limit:o,extraProps:this.extraProps}),...c});return{results:i,range:h.headers.get("content-range")}}copy(e,t,{overwrite:n=!1,headers:o={},...u}={}){const c=V.urlJoin(this.davPath,fe(t));return this.request(e,{method:R.DavMethod.copy,headers:{...o,Destination:c,overwrite:n?"T":"F"},...u})}move(e,t,{overwrite:n=!1,headers:o={},...u}={}){const c=V.urlJoin(this.davPath,fe(t));return this.request(e,{method:R.DavMethod.move,headers:{...o,Destination:c,overwrite:n?"T":"F"},...u})}put(e,t,{headers:n={},onUploadProgress:o,previousEntityTag:u,overwrite:c,...i}={}){const h={...n};return u?h["If-Match"]=u:c||(h["If-None-Match"]="*"),this.request(e,{method:R.DavMethod.put,data:t,headers:h,onUploadProgress:o,...i})}delete(e,t={}){return this.request(e,{method:R.DavMethod.delete,...t})}propPatch(e,t,n={}){const o=ms(t);return this.request(e,{method:R.DavMethod.proppatch,data:o,...n})}getFileUrl(e){return V.urlJoin(this.davPath,fe(e))}buildHeaders(e={}){return{"Content-Type":"application/xml; charset=utf-8","X-Requested-With":"XMLHttpRequest","X-Request-ID":is(),...this.headers&&{...this.headers()},...e}}async request(e,t){const n=V.urlJoin(this.davPath,fe(e),{leadingSlash:!0}),o={...t,url:n,headers:this.buildHeaders(t.headers||{})};try{const u=await this.client.customRequest("",o);let c;if(u.status===207){const i=await u.text();c=await ys(i)}return{body:c,status:u.status,result:u}}catch(u){const{response:c}=u,i=await c.text(),h=vs(i);throw new Jt(h.message,h.errorCode,c,c.status)}}}const Ns=(r,e)=>({async listFileVersions(t,n={}){const[o,...u]=await r.propfind(V.urlJoin("meta",t,"v",{leadingSlash:!0}),n);return u.map(c=>R.buildResource(c,r.extraProps))}}),xs=(r,e)=>({setFavorite(t,{path:n},o,u={}){const c={[R.DavProperty.IsFavorite]:o?"true":"false"};return r.propPatch(V.urlJoin(t.webDavPath,n),c,u)}}),Ps=(r,e)=>({listFavoriteFiles({davProperties:t=R.DavProperties.Default,username:n="",...o}={}){return r.report(V.urlJoin("files",n),{properties:t,filterRules:{favorite:1},...o})}}),Es=(r,e)=>{const t=mr.axios.create();e&&t.interceptors.request.use(P=>(Object.assign(P.headers,e()),P));const n={axiosClient:t,baseUrl:r},o=new ws({baseUrl:r,headers:e}),u=P=>{o.extraProps.push(P)},c=$r(o),{getPathForFileId:i}=c,h=Er(o,c),{listFiles:a}=h,s=Nr(h),{getFileInfo:f}=s,{createFolder:l}=vr(o,s),g=wr(o,n),{getFileContents:d}=g,{putFileContents:m}=Tr(o,s),{getFileUrl:w,revokeUrl:v}=xr(o,g,n),{getPublicFileUrl:p}=Pr(o),{copyFiles:y}=yr(o),{moveFiles:A}=Ar(o),{deleteFile:N}=Or(o),{restoreFile:b}=Cr(o),{listFileVersions:E}=Ns(o),{restoreFileVersion:x}=Ir(o),{clearTrashBin:T}=Sr(o),{search:O}=Fr(o),{listFavoriteFiles:I}=Ps(o),{setFavorite:C}=xs(o);return{copyFiles:y,createFolder:l,deleteFile:N,restoreFile:b,restoreFileVersion:x,getFileContents:d,getFileInfo:f,getFileUrl:w,getPublicFileUrl:p,getPathForFileId:i,listFiles:a,listFileVersions:E,moveFiles:A,putFileContents:m,revokeUrl:v,clearTrashBin:T,search:O,listFavoriteFiles:I,setFavorite:C,registerExtraProp:u}};exports.DavHttpError=Jt;exports.HttpError=et;exports.encodePath=fe;exports.webdav=Es;