/*! For license information please see mail.3646.75ddf585075d01e987a8.js.LICENSE.txt */ (globalThis.webpackChunknextcloud_mail=globalThis.webpackChunknextcloud_mail||[]).push([[3646],{5481(t,e,n){"use strict";n.d(e,{pt:()=>Er,di:()=>hi,nF:()=>li,aX:()=>vr,H4:()=>Dr,VL:()=>Sr,R3:()=>Cr,Al:()=>jr,lJ:()=>Rr,v7:()=>gi,Q$:()=>$r,Yc:()=>xr,ur:()=>Ei,KT:()=>fi});var r=n(21777),i=n(32505),o=n(63814),s=n(36117),a=n(65606),c={2:t=>{function e(t,e,i){t instanceof RegExp&&(t=n(t,i)),e instanceof RegExp&&(e=n(e,i));var o=r(t,e,i);return o&&{start:o[0],end:o[1],pre:i.slice(0,o[0]),body:i.slice(o[0]+t.length,o[1]),post:i.slice(o[1]+e.length)}}function n(t,e){var n=e.match(t);return n?n[0]:null}function r(t,e,n){var r,i,o,s,a,c=n.indexOf(t),u=n.indexOf(e,c+1),l=c;if(c>=0&&u>0){for(r=[],o=n.length;l>=0&&!a;)l==c?(r.push(l),c=n.indexOf(t,l+1)):1==r.length?a=[r.pop(),u]:((i=r.pop())=0?c:u;r.length&&(a=[o,s])}return a}t.exports=e,e.range=r},47:(t,e,n)=>{var r=n(410),i=function(t){return"string"==typeof t};function o(t,e){for(var n=[],r=0;r=-1&&!e;n--){var r=n>=0?arguments[n]:a.cwd();if(!i(r))throw new TypeError("Arguments to path.resolve must be strings");r&&(t=r+"/"+t,e="/"===r.charAt(0))}return(e?"/":"")+(t=o(t.split("/"),!e).join("/"))||"."},c.normalize=function(t){var e=c.isAbsolute(t),n="/"===t.substr(-1);return(t=o(t.split("/"),!e).join("/"))||e||(t="."),t&&n&&(t+="/"),(e?"/":"")+t},c.isAbsolute=function(t){return"/"===t.charAt(0)},c.join=function(){for(var t="",e=0;e=0&&""===t[n];n--);return e>n?[]:t.slice(e,n+1)}t=c.resolve(t).substr(1),e=c.resolve(e).substr(1);for(var r=n(t.split("/")),i=n(e.split("/")),o=Math.min(r.length,i.length),s=o,a=0;a>18&63)+a.charAt(i>>12&63)+a.charAt(i>>6&63)+a.charAt(63&i);return 2==o?(e=t.charCodeAt(u)<<8,n=t.charCodeAt(++u),c+=a.charAt((i=e+n)>>10)+a.charAt(i>>4&63)+a.charAt(i<<2&63)+"="):1==o&&(i=t.charCodeAt(u),c+=a.charAt(i>>2)+a.charAt(i<<4&63)+"=="),c},decode:function(t){var e=(t=String(t).replace(c,"")).length;e%4==0&&(e=(t=t.replace(/==?$/,"")).length),(e%4==1||/[^+a-zA-Z0-9/]/.test(t))&&s("Invalid character: the string to be decoded is not correctly encoded.");for(var n,r,i=0,o="",u=-1;++u>(-2*i&6)));return o},version:"1.0.0"};void 0===(r=function(){return u}.call(e,n,e,t))||(t.exports=r)}()},135:t=>{function e(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}t.exports=function(t){return null!=t&&(e(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&e(t.slice(0,0))}(t)||!!t._isBuffer)}},172:(t,e)=>{e.d=function(t){if(!t)return 0;for(var e=(t=t.toString()).length,n=t.length;n--;){var r=t.charCodeAt(n);56320<=r&&r<=57343&&n--,127{var r=n(2);t.exports=function(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),m(function(t){return t.split("\\\\").join(i).split("\\{").join(o).split("\\}").join(s).split("\\,").join(a).split("\\.").join(c)}(t),!0).map(l)):[]};var i="\0SLASH"+Math.random()+"\0",o="\0OPEN"+Math.random()+"\0",s="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0";function u(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function l(t){return t.split(i).join("\\").split(o).join("{").split(s).join("}").split(a).join(",").split(c).join(".")}function h(t){if(!t)return[""];var e=[],n=r("{","}",t);if(!n)return t.split(",");var i=n.pre,o=n.body,s=n.post,a=i.split(",");a[a.length-1]+="{"+o+"}";var c=h(s);return s.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),e.push.apply(e,a),e}function f(t){return"{"+t+"}"}function p(t){return/^-?0\d/.test(t)}function d(t,e){return t<=e}function g(t,e){return t>=e}function m(t,e){var n=[],i=r("{","}",t);if(!i)return[t];var o=i.pre,a=i.post.length?m(i.post,!1):[""];if(/\$$/.test(i.pre))for(var c=0;c=0;if(!w&&!T)return i.post.match(/,(?!,).*\}/)?m(t=i.pre+"{"+i.body+s+i.post):[t];if(w)E=i.body.split(/\.\./);else if(1===(E=h(i.body)).length&&1===(E=m(E[0],!1).map(f)).length)return a.map((function(t){return i.pre+E[0]+t}));if(w){var N=u(E[0]),A=u(E[1]),I=Math.max(E[0].length,E[1].length),O=3==E.length?Math.abs(u(E[2])):1,x=d;A0){var R=new Array(C+1).join("0");S=P<0?"-"+R+S.slice(1):R+S}}v.push(S)}}else{v=[];for(var L=0;L{var e,n;e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(t,e){return t<>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&n.rotl(t,8)|4278255360&n.rotl(t,24);for(var e=0;e0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],n=0,r=0;n>>5]|=t[n]<<24-r%32;return e},wordsToBytes:function(t){for(var e=[],n=0;n<32*t.length;n+=8)e.push(t[n>>>5]>>>24-n%32&255);return e},bytesToHex:function(t){for(var e=[],n=0;n>>4).toString(16)),e.push((15&t[n]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],n=0;n>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,i=0;r>>6-2*i);return n}},t.exports=n},345:()=>{},388:()=>{},410:()=>{},526:t=>{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 e=[],n=0;n{!function(){var e=n(298),r=n(526).utf8,i=n(135),o=n(526).bin,s=function(t,n){t.constructor==String?t=n&&"binary"===n.encoding?o.stringToBytes(t):r.stringToBytes(t):i(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||t.constructor===Uint8Array||(t=t.toString());for(var a=e.bytesToWords(t),c=8*t.length,u=1732584193,l=-271733879,h=-1732584194,f=271733878,p=0;p>>24)|4278255360&(a[p]<<24|a[p]>>>8);a[c>>>5]|=128<>>9<<4)]=c;var d=s._ff,g=s._gg,m=s._hh,E=s._ii;for(p=0;p>>0,l=l+y>>>0,h=h+b>>>0,f=f+w>>>0}return e.endian([u,l,h,f])};s._ff=function(t,e,n,r,i,o,s){var a=t+(e&n|~e&r)+(i>>>0)+s;return(a<>>32-o)+e},s._gg=function(t,e,n,r,i,o,s){var a=t+(e&r|n&~r)+(i>>>0)+s;return(a<>>32-o)+e},s._hh=function(t,e,n,r,i,o,s){var a=t+(e^n^r)+(i>>>0)+s;return(a<>>32-o)+e},s._ii=function(t,e,n,r,i,o,s){var a=t+(n^(e|~r))+(i>>>0)+s;return(a<>>32-o)+e},s._blocksize=16,s._digestsize=16,t.exports=function(t,n){if(null==t)throw new Error("Illegal argument "+t);var r=e.wordsToBytes(s(t,n));return n&&n.asBytes?r:n&&n.asString?o.bytesToString(r):e.bytesToHex(r)}}()},647:(t,e)=>{var n=Object.prototype.hasOwnProperty;function r(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function i(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){e=e||"";var r,o,s=[];for(o in"string"!=typeof e&&(e="?"),t)if(n.call(t,o)){if((r=t[o])||null!=r&&!isNaN(r)||(r=""),o=i(o),r=i(r),null===o||null===r)continue;s.push(o+"="+r)}return s.length?e+s.join("&"):""},e.parse=function(t){for(var e,n=/([^=?#&]+)=?([^&]*)/g,i={};e=n.exec(t);){var o=r(e[1]),s=r(e[2]);null===o||null===s||o in i||(i[o]=s)}return i}},670:t=>{t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},737:(t,e,n)=>{var r=n(670),i=n(647),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,s=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,l=/^[a-zA-Z]:/;function h(t){return(t||"").toString().replace(o,"")}var f=[["#","hash"],["?","query"],function(t,e){return g(e.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],p={hash:1,query:1};function d(t){var e,n=("undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).location||{},r={},i=typeof(t=t||n);if("blob:"===t.protocol)r=new E(unescape(t.pathname),{});else if("string"===i)for(e in r=new E(t,{}),p)delete r[e];else if("object"===i){for(e in t)e in p||(r[e]=t[e]);void 0===r.slashes&&(r.slashes=a.test(t.href))}return r}function g(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function m(t,e){t=(t=h(t)).replace(s,""),e=e||{};var n,r=u.exec(t),i=r[1]?r[1].toLowerCase():"",o=!!r[2],a=!!r[3],c=0;return o?a?(n=r[2]+r[3]+r[4],c=r[2].length+r[3].length):(n=r[2]+r[4],c=r[2].length):a?(n=r[3]+r[4],c=r[3].length):n=r[4],"file:"===i?c>=2&&(n=n.slice(2)):g(i)?n=r[4]:i?o&&(n=n.slice(2)):c>=2&&g(e.protocol)&&(n=r[4]),{protocol:i,slashes:o||g(i),slashesCount:c,rest:n}}function E(t,e,n){if(t=(t=h(t)).replace(s,""),!(this instanceof E))return new E(t,e,n);var o,a,c,u,p,v,y=f.slice(),b=typeof e,w=this,T=0;for("object"!==b&&"string"!==b&&(n=e,e=null),n&&"function"!=typeof n&&(n=i.parse),o=!(a=m(t||"",e=d(e))).protocol&&!a.slashes,w.slashes=a.slashes||o&&e.slashes,w.protocol=a.protocol||e.protocol||"",t=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||l.test(t))||!a.slashes&&(a.protocol||a.slashesCount<2||!g(w.protocol)))&&(y[3]=[/(.*)/,"pathname"]);T{},805:()=>{},829:t=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t){var e="function"==typeof Map?new Map:void 0;return n=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,s)}function s(){return r(t,arguments,o(this).constructor)}return s.prototype=Object.create(t.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),i(s,t)},n(t)}function r(t,e,n){return r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&i(o,n.prototype),o},r.apply(null,arguments)}function i(t,e){return i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}function o(t){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},o(t)}var s=function(t){function n(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(r=function(t,n){return!n||"object"!==e(n)&&"function"!=typeof n?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):n}(this,o(n).call(this,t))).name="ObjectPrototypeMutationError",r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(n,t),n}(n(Error));function a(t,n){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},i=n.split("."),o=i.length,s=function(e){var n=i[e];if(!t)return{v:void 0};if("+"===n){if(Array.isArray(t))return{v:t.map((function(n,o){var s=i.slice(e+1);return s.length>0?a(n,s.join("."),r):r(t,o,i,e)}))};var o=i.slice(0,e).join(".");throw new Error("Object at wildcard (".concat(o,") is not an array"))}t=r(t,n,i,e)},c=0;c2&&void 0!==arguments[2]?arguments[2]:{};if("object"!=e(t)||null===t)return!1;if(void 0===n)return!1;if("number"==typeof n)return n in t;try{var i=!1;return a(t,n,(function(t,e,n,o){if(!c(n,o))return t&&t[e];i=r.own?t.hasOwnProperty(e):e in t})),i}catch(t){return!1}},hasOwn:function(t,e,n){return this.has(t,e,n||{own:!0})},isIn:function(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("object"!=e(t)||null===t)return!1;if(void 0===n)return!1;try{var o=!1,s=!1;return a(t,n,(function(t,n,i,a){return o=o||t===r||!!t&&t[n]===r,s=c(i,a)&&"object"===e(t)&&n in t,t&&t[n]})),i.validPath?o&&s:o}catch(t){return!1}},ObjectPrototypeMutationError:s}}},u={};function l(t){var e=u[t];if(void 0!==e)return e.exports;var n=u[t]={id:t,loaded:!1,exports:{}};return c[t].call(n.exports,n,n.exports,l),n.loaded=!0,n.exports}l.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return l.d(e,{a:e}),e},l.d=(t,e)=>{for(var n in e)l.o(e,n)&&!l.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},l.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),l.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var h=l(737),f=l.n(h);function p(t){if(!d(t))throw new Error("Parameter was not an error")}function d(t){return!!t&&"object"==typeof t&&"[object Error]"===(e=t,Object.prototype.toString.call(e))||t instanceof Error;var e}class g extends Error{constructor(t,e){const n=[...arguments],{options:r,shortMessage:i}=function(t){let e,n="";if(0===t.length)e={};else if(d(t[0]))e={cause:t[0]},n=t.slice(1).join(" ")||"";else if(t[0]&&"object"==typeof t[0])e=Object.assign({},t[0]),n=t.slice(1).join(" ")||"";else{if("string"!=typeof t[0])throw new Error("Invalid arguments passed to Layerr");e={},n=n=t.join(" ")||""}return{options:e,shortMessage:n}}(n);let o=i;if(r.cause&&(o=`${o}: ${r.cause.message}`),super(o),this.message=o,r.name&&"string"==typeof r.name?this.name=r.name:this.name="Layerr",r.cause&&Object.defineProperty(this,"_cause",{value:r.cause}),Object.defineProperty(this,"_info",{value:{}}),r.info&&"object"==typeof r.info&&Object.assign(this._info,r.info),Error.captureStackTrace){const t=r.constructorOpt||this.constructor;Error.captureStackTrace(this,t)}}static cause(t){return p(t),t._cause&&d(t._cause)?t._cause:null}static fullStack(t){p(t);const e=g.cause(t);return e?`${t.stack}\ncaused by: ${g.fullStack(e)}`:t.stack??""}static info(t){p(t);const e={},n=g.cause(t);return n&&Object.assign(e,g.info(n)),t._info&&Object.assign(e,t._info),e}toString(){let t=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(t=`${t}: ${this.message}`),t}}var m=l(47),E=l.n(m);const v="__PATH_SEPARATOR_POSIX__",y="__PATH_SEPARATOR_WINDOWS__";function b(t){try{const e=t.replace(/\//g,v).replace(/\\\\/g,y);return encodeURIComponent(e).split(y).join("\\\\").split(v).join("/")}catch(t){throw new g(t,"Failed encoding path")}}function w(t){return t.startsWith("/")?t:"/"+t}function T(t){let e=t;return"/"!==e[0]&&(e="/"+e),/^.+\/$/.test(e)&&(e=e.substr(0,e.length-1)),e}function N(t){let e=new(f())(t).pathname;return e.length<=0&&(e="/"),T(e)}function A(){for(var t=arguments.length,e=new Array(t),n=0;n1){var n=t.shift();t[0]=n+t[0]}t[0].match(/^file:\/\/\//)?t[0]=t[0].replace(/^([^/:]+):\/*/,"$1:///"):t[0]=t[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r0&&(i=i.replace(/^[\/]+/,"")),i=r0?"?":"")+s.join("&")}("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}(e.reduce(((t,e,n)=>((0===n||"/"!==e||"/"===e&&"/"!==t[t.length-1])&&t.push(e),t)),[]))}var I=l(542),O=l.n(I);function x(t,e){const n=t.url.replace("//",""),r=-1==n.indexOf("/")?"/":n.slice(n.indexOf("/")),i=t.method?t.method.toUpperCase():"GET",o=!!/(^|,)\s*auth\s*($|,)/.test(e.qop)&&"auth",s=`00000000${e.nc}`.slice(-8),a=function(t,e,n,r,i,o,s){const a=s||O()(`${e}:${n}:${r}`);return t&&"md5-sess"===t.toLowerCase()?O()(`${a}:${i}:${o}`):a}(e.algorithm,e.username,e.realm,e.password,e.nonce,e.cnonce,e.ha1),c=O()(`${i}:${r}`),u=o?O()(`${a}:${e.nonce}:${s}:${e.cnonce}:${o}:${c}`):O()(`${a}:${e.nonce}:${c}`),l={username:e.username,realm:e.realm,nonce:e.nonce,uri:r,qop:o,response:u,nc:s,cnonce:e.cnonce,algorithm:e.algorithm,opaque:e.opaque},h=[];for(const t in l)l[t]&&("qop"===t||"nc"===t||"algorithm"===t?h.push(`${t}=${l[t]}`):h.push(`${t}="${l[t]}"`));return`Digest ${h.join(", ")}`}function _(t){return"digest"===(t.headers&&t.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()}var P=l(101),S=l.n(P);function C(t){return S().decode(t)}function R(t,e){var n;return`Basic ${n=`${t}:${e}`,S().encode(n)}`}const L="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:"undefined"!=typeof window?window:globalThis,D=L.fetch.bind(L);L.Headers,L.Request,L.Response;let $=function(t){return t.Auto="auto",t.Digest="digest",t.None="none",t.Password="password",t.Token="token",t}({}),j=function(t){return t.DataTypeNoLength="data-type-no-length",t.InvalidAuthType="invalid-auth-type",t.InvalidOutputFormat="invalid-output-format",t.LinkUnsupportedAuthType="link-unsupported-auth",t.InvalidUpdateRange="invalid-update-range",t.NotSupported="not-supported",t}({});function F(t,e,n,r,i){switch(t.authType){case $.Auto:e&&n&&(t.headers.Authorization=R(e,n));break;case $.Digest:t.digest=function(t,e,n){return{username:t,password:e,ha1:n,nc:0,algorithm:"md5",hasDigestAuth:!1}}(e,n,i);break;case $.None:break;case $.Password:t.headers.Authorization=R(e,n);break;case $.Token:t.headers.Authorization=`${(o=r).token_type} ${o.access_token}`;break;default:throw new g({info:{code:j.InvalidAuthType}},`Invalid auth type: ${t.authType}`)}var o}l(345),l(800);const U="@@HOTPATCHER",M=()=>{};function k(t){return{original:t,methods:[t],final:!1}}class B{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=U}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(t){this.configuration.getEmptyAction=t}control(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t||t.__type__!==U)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(t.configuration.registry).forEach((n=>{this.configuration.registry.hasOwnProperty(n)?e&&(this.configuration.registry[n]=Object.assign({},t.configuration.registry[n])):this.configuration.registry[n]=Object.assign({},t.configuration.registry[n])})),t._configuration=this.configuration,this}execute(t){const e=this.get(t)||M;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i0;)i=[e.shift().apply(o,i)];return i[0]}}(...e.methods)}isPatched(t){return!!this.configuration.registry[t]}patch(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{chain:r=!1}=n;if(this.configuration.registry[t]&&this.configuration.registry[t].final)throw new Error(`Failed patching '${t}': Method marked as being final`);if("function"!=typeof e)throw new Error(`Failed patching '${t}': Provided method is not a function`);if(r)this.configuration.registry[t]?this.configuration.registry[t].methods.push(e):this.configuration.registry[t]=k(e);else if(this.isPatched(t)){const{original:n}=this.configuration.registry[t];this.configuration.registry[t]=Object.assign(k(e),{original:n})}else this.configuration.registry[t]=k(e);return this}patchInline(t,e){this.isPatched(t)||this.patch(t,e);for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i1?e-1:0),r=1;r{this.patch(t,e,{chain:!0})})),this}restore(t){if(!this.isPatched(t))throw new Error(`Failed restoring method: No method present for key: ${t}`);if("function"!=typeof this.configuration.registry[t].original)throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${t}`);return this.configuration.registry[t].methods=[this.configuration.registry[t].original],this}setFinal(t){if(!this.configuration.registry.hasOwnProperty(t))throw new Error(`Failed marking '${t}' as final: No method found for key`);return this.configuration.registry[t].final=!0,this}}let G=null;function V(){return G||(G=new B),G}function W(t){return function(t){if("object"!=typeof t||null===t||"[object Object]"!=Object.prototype.toString.call(t))return!1;if(null===Object.getPrototypeOf(t))return!0;let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t)?Object.assign({},t):Object.setPrototypeOf(Object.assign({},t),Object.getPrototypeOf(t))}function X(){for(var t=arguments.length,e=new Array(t),n=0;n0;){const t=i.shift();r=r?q(r,t):W(t)}return r}function q(t,e){const n=W(t);return Object.keys(e).forEach((t=>{n.hasOwnProperty(t)?Array.isArray(e[t])?n[t]=Array.isArray(n[t])?[...n[t],...e[t]]:[...e[t]]:"object"==typeof e[t]&&e[t]?n[t]="object"==typeof n[t]&&n[t]?q(n[t],e[t]):W(e[t]):n[t]=e[t]:n[t]=e[t]})),n}function z(t){const e={};for(const n of t.keys())e[n]=t.get(n);return e}function H(){for(var t=arguments.length,e=new Array(t),n=0;n(Object.keys(e).forEach((n=>{const i=n.toLowerCase();r.hasOwnProperty(i)?t[r[i]]=e[n]:(r[i]=n,t[n]=e[n])})),t)),{})}l(805);const Y="function"==typeof ArrayBuffer,{toString:Q}=Object.prototype;function Z(t){return Y&&(t instanceof ArrayBuffer||"[object ArrayBuffer]"===Q.call(t))}function K(t){return null!=t&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function J(t){return function(){for(var e=[],n=0;ne.patchInline("fetch",D,t.url,function(t){let e={};const n={method:t.method};if(t.headers&&(e=H(e,t.headers)),void 0!==t.data){const[r,i]=function(t){if("string"==typeof t)return[t,{}];if(K(t))return[t,{}];if(Z(t))return[t,{}];if(t&&"object"==typeof t)return[JSON.stringify(t),{"content-type":"application/json"}];throw new Error("Unable to convert request body: Unexpected body type: "+typeof t)}(t.data);n.body=r,e=H(e,i)}return t.signal&&(n.signal=t.signal),t.withCredentials&&(n.credentials="include"),n.headers=e,n}(t))),t)}var st=l(285);const at=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},ct={"[: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]},ut=t=>t.replace(/[[\]\\-]/g,"\\$&"),lt=t=>t.join(""),ht=(t,e)=>{const n=e;if("["!==t.charAt(n))throw new Error("not in a brace expression");const r=[],i=[];let o=n+1,s=!1,a=!1,c=!1,u=!1,l=n,h="";t:for(;oh?r.push(ut(h)+"-"+ut(e)):e===h&&r.push(ut(e)),h="",o++):t.startsWith("-]",o+1)?(r.push(ut(e+"-")),o+=2):t.startsWith("-",o+1)?(h=e,o+=2):(r.push(ut(e)),o++)}else c=!0,o++}else u=!0,o++}if(l1&&void 0!==arguments[1]?arguments[1]:{};return e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},pt=new Set(["!","?","+","*","@"]),dt=t=>pt.has(t),gt="(?!\\.)",mt=new Set(["[","."]),Et=new Set(["..","."]),vt=new Set("().*{}+?[]^$\\!"),yt="[^/]",bt=yt+"*?",wt=yt+"+?";class Tt{type;#t;#e;#n=!1;#r=[];#i;#o;#s;#a=!1;#c;#u;#l=!1;constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.type=t,t&&(this.#e=!0),this.#i=e,this.#t=this.#i?this.#i.#t:this,this.#c=this.#t===this?n:this.#t.#c,this.#s=this.#t===this?[]:this.#t.#s,"!"!==t||this.#t.#a||this.#s.push(this),this.#o=this.#i?this.#i.#r.length:0}get hasMagic(){if(void 0!==this.#e)return this.#e;for(const t of this.#r)if("string"!=typeof t&&(t.type||t.hasMagic))return this.#e=!0;return this.#e}toString(){return void 0!==this.#u?this.#u:this.type?this.#u=this.type+"("+this.#r.map((t=>String(t))).join("|")+")":this.#u=this.#r.map((t=>String(t))).join("")}#h(){if(this!==this.#t)throw new Error("should only call on root");if(this.#a)return this;let t;for(this.toString(),this.#a=!0;t=this.#s.pop();){if("!"!==t.type)continue;let e=t,n=e.#i;for(;n;){for(let r=e.#o+1;!n.type&&r"string"==typeof t?t:t.toJSON())):[this.type,...this.#r.map((t=>t.toJSON()))];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#a&&"!"===this.#i?.type)&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#i?.isStart())return!1;if(0===this.#o)return!0;const t=this.#i;for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:{};const n=new Tt(null,void 0,e);return Tt.#f(t,n,0,e),n}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();const t=this.toString(),[e,n,r,i]=this.toRegExpSource();if(!(r||this.#e||this.#c.nocase&&!this.#c.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;const o=(this.#c.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${e}$`,o),{_src:e,_glob:t})}get options(){return this.#c}toRegExpSource(t){const e=t??!!this.#c.dot;if(this.#t===this&&this.#h(),!this.type){const n=this.isStart()&&this.isEnd(),r=this.#r.map((e=>{const[r,i,o,s]="string"==typeof e?Tt.#p(e,this.#e,n):e.toRegExpSource(t);return this.#e=this.#e||o,this.#n=this.#n||s,r})).join("");let i="";if(this.isStart()&&"string"==typeof this.#r[0]&&(1!==this.#r.length||!Et.has(this.#r[0]))){const n=mt,o=e&&n.has(r.charAt(0))||r.startsWith("\\.")&&n.has(r.charAt(2))||r.startsWith("\\.\\.")&&n.has(r.charAt(4)),s=!e&&!t&&n.has(r.charAt(0));i=o?"(?!(?:^|/)\\.\\.?(?:$|/))":s?gt:""}let o="";return this.isEnd()&&this.#t.#a&&"!"===this.#i?.type&&(o="(?:$|\\/)"),[i+r+o,ft(r),this.#e=!!this.#e,this.#n]}const n="*"===this.type||"+"===this.type,r="!"===this.type?"(?:(?!(?:":"(?:";let i=this.#d(e);if(this.isStart()&&this.isEnd()&&!i&&"!"!==this.type){const t=this.toString();return this.#r=[t],this.type=null,this.#e=void 0,[t,ft(this.toString()),!1,!1]}let o=!n||t||e?"":this.#d(!0);o===i&&(o=""),o&&(i=`(?:${i})(?:${o})*?`);let s="";return s="!"===this.type&&this.#l?(this.isStart()&&!e?gt:"")+wt:r+i+("!"===this.type?"))"+(!this.isStart()||e||t?"":gt)+bt+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&o?")":"*"===this.type&&o?")?":`)${this.type}`),[s,ft(i),this.#e=!!this.#e,this.#n]}#d(t){return this.#r.map((e=>{if("string"==typeof e)throw new Error("string type in extglob ast??");const[n,r,i,o]=e.toRegExpSource(t);return this.#n=this.#n||o,n})).filter((t=>!(this.isStart()&&this.isEnd()&&!t))).join("|")}static#p(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!1,i="",o=!1;for(let s=0;s2&&void 0!==arguments[2]?arguments[2]:{};return at(e),!(!n.nocomment&&"#"===e.charAt(0))&&new Yt(e,n).match(t)},At=/^\*+([^+@!?\*\[\(]*)$/,It=t=>e=>!e.startsWith(".")&&e.endsWith(t),Ot=t=>e=>e.endsWith(t),xt=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),_t=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),Pt=/^\*+\.\*+$/,St=t=>!t.startsWith(".")&&t.includes("."),Ct=t=>"."!==t&&".."!==t&&t.includes("."),Rt=/^\.\*+$/,Lt=t=>"."!==t&&".."!==t&&t.startsWith("."),Dt=/^\*+$/,$t=t=>0!==t.length&&!t.startsWith("."),jt=t=>0!==t.length&&"."!==t&&".."!==t,Ft=/^\?+([^+@!?\*\[\(]*)?$/,Ut=t=>{let[e,n=""]=t;const r=Gt([e]);return n?(n=n.toLowerCase(),t=>r(t)&&t.toLowerCase().endsWith(n)):r},Mt=t=>{let[e,n=""]=t;const r=Vt([e]);return n?(n=n.toLowerCase(),t=>r(t)&&t.toLowerCase().endsWith(n)):r},kt=t=>{let[e,n=""]=t;const r=Vt([e]);return n?t=>r(t)&&t.endsWith(n):r},Bt=t=>{let[e,n=""]=t;const r=Gt([e]);return n?t=>r(t)&&t.endsWith(n):r},Gt=t=>{let[e]=t;const n=e.length;return t=>t.length===n&&!t.startsWith(".")},Vt=t=>{let[e]=t;const n=e.length;return t=>t.length===n&&"."!==t&&".."!==t},Wt="object"==typeof a&&a?"object"==typeof a.env&&a.env&&a.env.__MINIMATCH_TESTING_PLATFORM__||a.platform:"posix";Nt.sep="win32"===Wt?"\\":"/";const Xt=Symbol("globstar **");Nt.GLOBSTAR=Xt,Nt.filter=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>Nt(n,t,e)};const qt=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign({},t,e)};Nt.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return Nt;const e=Nt;return Object.assign((function(n,r){return e(n,r,qt(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}))}),{Minimatch:class extends e.Minimatch{constructor(e){super(e,qt(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))}static defaults(n){return e.defaults(qt(t,n)).Minimatch}},AST:class extends e.AST{constructor(e,n){super(e,n,qt(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}))}static fromGlob(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.AST.fromGlob(n,qt(t,r))}},unescape:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.unescape(n,qt(t,r))},escape:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.escape(n,qt(t,r))},filter:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.filter(n,qt(t,r))},defaults:n=>e.defaults(qt(t,n)),makeRe:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.makeRe(n,qt(t,r))},braceExpand:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.braceExpand(n,qt(t,r))},match:function(n,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.match(n,r,qt(t,i))},sep:e.sep,GLOBSTAR:Xt})};const zt=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return at(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:st(t)};Nt.braceExpand=zt,Nt.makeRe=function(t){return new Yt(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).makeRe()},Nt.match=function(t,e){const n=new Yt(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{});return t=t.filter((t=>n.match(t))),n.options.nonull&&!t.length&&t.push(e),t};const Ht=/[?*]|[+@!]\(.*?\)|\[|\]/;class Yt{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};at(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||Wt,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if("string"!=typeof e)return!0;return!1}debug(){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=function(){return console.error(...arguments)}),this.debug(this.pattern,this.globSet);const n=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map(((t,e,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(""!==t[0]||""!==t[1]||"?"!==t[2]&&Ht.test(t[2])||Ht.test(t[3])),n=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))];if(n)return[t[0],...t.slice(1).map((t=>this.parse(t)))]}return t.map((t=>this.parse(t)))}));if(this.debug(this.pattern,r),this.set=r.filter((t=>-1===t.indexOf(!1))),this.isWindows)for(let t=0;t=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let n=e;for(;"**"===t[n+1];)n++;n!==e&&t.splice(e,n-e)}return t}))}levelOneOptimize(t){return t.map((t=>0===(t=t.reduce(((t,e)=>{const n=t[t.length-1];return"**"===e&&"**"===n?t:".."===e&&n&&".."!==n&&"."!==n&&"**"!==n?(t.pop(),t):(t.push(e),t)}),[])).length?[""]:t))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let n=1;nr&&n.splice(r+1,i-r);let o=n[r+1];const s=n[r+2],a=n[r+3];if(".."!==o)continue;if(!s||"."===s||".."===s||!a||"."===a||".."===a)continue;e=!0,n.splice(r,1);const c=n.slice(0);c[r]="**",t.push(c),r--}if(!this.preserveMultipleSlashes){for(let t=1;tt.length))}partsMatch(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=0,i=0,o=[],s="";for(;r2&&void 0!==arguments[2]&&arguments[2];const r=this.options;if(this.isWindows){const n="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),r=!n&&""===t[0]&&""===t[1]&&"?"===t[2]&&/^[a-z]:$/i.test(t[3]),i="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),o=r?3:n?0:void 0,s=!i&&""===e[0]&&""===e[1]&&"?"===e[2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])?3:i?0:void 0;if("number"==typeof o&&"number"==typeof s){const[n,r]=[t[o],e[s]];n.toLowerCase()===r.toLowerCase()&&(e[s]=n,s>o?e=e.slice(s):o>s&&(t=t.slice(o)))}}const{optimizationLevel:i=1}=this.options;i>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,s=0,a=t.length,c=e.length;o>> no match, partial?",t,h,e,f),h!==a))}let i;if("string"==typeof u?(i=l===u,this.debug("string match",u,l,i)):(i=u.test(l),this.debug("pattern match",u,l,i)),!i)return!1}if(o===a&&s===c)return!0;if(o===a)return n;if(s===c)return o===a-1&&""===t[o];throw new Error("wtf?")}braceExpand(){return zt(this.pattern,this.options)}parse(t){at(t);const e=this.options;if("**"===t)return Xt;if(""===t)return"";let n,r=null;(n=t.match(Dt))?r=e.dot?jt:$t:(n=t.match(At))?r=(e.nocase?e.dot?_t:xt:e.dot?Ot:It)(n[1]):(n=t.match(Ft))?r=(e.nocase?e.dot?Mt:Ut:e.dot?kt:Bt)(n):(n=t.match(Pt))?r=e.dot?Ct:St:(n=t.match(Rt))&&(r=Lt);const i=Tt.fromGlob(t,this.options).toMMPattern();return r&&"object"==typeof i&&Reflect.defineProperty(i,"test",{value:r}),i}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,n=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=new Set(e.nocase?["i"]:[]);let i=t.map((t=>{const e=t.map((t=>{if(t instanceof RegExp)for(const e of t.flags.split(""))r.add(e);return"string"==typeof t?t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):t===Xt?Xt:t._src}));return e.forEach(((t,r)=>{const i=e[r+1],o=e[r-1];t===Xt&&o!==Xt&&(void 0===o?void 0!==i&&i!==Xt?e[r+1]="(?:\\/|"+n+"\\/)?"+i:e[r]=n:void 0===i?e[r-1]=o+"(?:\\/|"+n+")?":i!==Xt&&(e[r-1]=o+"(?:\\/|\\/"+n+"\\/)"+i,e[r+1]=Xt))})),e.filter((t=>t!==Xt)).join("/")})).join("|");const[o,s]=t.length>1?["(?:",")"]:["",""];i="^"+o+i+s+"$",this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...r].join(""))}catch(t){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.partial;if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const r=this.slashSplit(t);this.debug(this.pattern,"split",r);const i=this.set;this.debug(this.pattern,"set",i);let o=r[r.length-1];if(!o)for(let t=r.length-2;!o&&t>=0;t--)o=r[t];for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:""}Invalid response: ${t.status} ${t.statusText}`);return e.status=t.status,e.response=t,e}function Zt(t,e){const{status:n}=e;if(401===n&&t.digest)return e;if(n>=400)throw Qt(e);return e}function Kt(t,e){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?{data:e,headers:t.headers?z(t.headers):{},status:t.status,statusText:t.statusText}:e}Nt.AST=Tt,Nt.Minimatch=Yt,Nt.escape=function(t){let{windowsPathsNoEscape:e=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&")},Nt.unescape=ft;const Jt=(te=function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=it({url:A(t.remoteURL,b(e)),method:"COPY",headers:{Destination:A(t.remoteURL,b(n)),Overwrite:!1===r.overwrite?"F":"T",Depth:r.shallow?"0":"infinity"}},t,r);return s=function(e){Zt(t,e)},(o=rt(i,t))&&o.then||(o=Promise.resolve(o)),s?o.then(s):o;var o,s},function(){for(var t=[],e=0;e!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t},captureMetaData:!1},ne=":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",re=new RegExp("^["+ne+"]["+ne+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function ie(t,e){const n=[];let r=e.exec(t);for(;r;){const i=[];i.startIndex=e.lastIndex-r[0].length;const o=r.length;for(let t=0;t0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),void 0!==e&&(this.child[this.child.length-1][se]={startIndex:e})}static getMetaDataSymbol(){return se}}class ce{constructor(t){this.suppressValidationErr=!t}readDocType(t,e){const n={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let r=1,i=!1,o=!1,s="";for(;e"===t[e]){if(o?"-"===t[e-1]&&"-"===t[e-2]&&(o=!1,r--):r--,0===r)break}else"["===t[e]?i=!0:s+=t[e];else{if(i&&le(t,"!ENTITY",e)){let r,i;e+=7,[r,i,e]=this.readEntityExp(t,e+1,this.suppressValidationErr),-1===i.indexOf("&")&&(n[r]={regx:RegExp(`&${r};`,"g"),val:i})}else if(i&&le(t,"!ELEMENT",e)){e+=8;const{index:n}=this.readElementExp(t,e+1);e=n}else if(i&&le(t,"!ATTLIST",e))e+=8;else if(i&&le(t,"!NOTATION",e)){e+=9;const{index:n}=this.readNotationExp(t,e+1,this.suppressValidationErr);e=n}else{if(!le(t,"!--",e))throw new Error("Invalid DOCTYPE");o=!0}r++,s=""}if(0!==r)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}}readEntityExp(t,e){e=ue(t,e);let n="";for(;e{for(;e{for(const n of t){if("string"==typeof n&&e===n)return!0;if(n instanceof RegExp&&n.test(e))return!0}}:()=>!1}class Ee{constructor(t){if(this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>Re(e,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>Re(e,16,"&#x")}},this.addExternalEntities=ve,this.parseXml=Ne,this.parseTextData=ye,this.resolveNameSpace=be,this.buildAttributesMap=Te,this.isItStopNode=xe,this.replaceEntitiesValue=Ie,this.readStopNodeData=Se,this.saveTextToParentTag=Oe,this.addChild=Ae,this.ignoreAttributesFn=me(this.options.ignoreAttributes),this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let t=0;t0)){s||(t=this.replaceEntitiesValue(t));const r=this.options.tagValueProcessor(e,t,n,i,o);return null==r?t:typeof r!=typeof t||r!==t?r:this.options.trimValues||t.trim()===t?Ce(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function be(t){if(this.options.removeNSPrefix){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}const we=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function Te(t,e){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const n=ie(t,we),r=n.length,i={};for(let t=0;t",s,"Closing Tag is not closed.");let o=t.substring(s+2,e).trim();if(this.options.removeNSPrefix){const t=o.indexOf(":");-1!==t&&(o=o.substr(t+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),n&&(r=this.saveTextToParentTag(r,n,i));const a=i.substring(i.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: `);let c=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(c=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=i.lastIndexOf("."),i=i.substring(0,c),n=this.tagsNodeStack.pop(),r="",s=e}else if("?"===t[s+1]){let e=Pe(t,s,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(r=this.saveTextToParentTag(r,n,i),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new ae(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,i)),this.addChild(n,t,i,s)}s=e.closeIndex+1}else if("!--"===t.substr(s+1,3)){const e=_e(t,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const o=t.substring(s+4,e-2);r=this.saveTextToParentTag(r,n,i),n.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}s=e}else if("!D"===t.substr(s+1,2)){const e=o.readDocType(t,s);this.docTypeEntities=e.entities,s=e.i}else if("!["===t.substr(s+1,2)){const e=_e(t,"]]>",s,"CDATA is not closed.")-2,o=t.substring(s+9,e);r=this.saveTextToParentTag(r,n,i);let a=this.parseTextData(o,n.tagname,i,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):n.add(this.options.textNodeName,a),s=e+2}else{let o=Pe(t,s,this.options.removeNSPrefix),a=o.tagName;const c=o.rawTagName;let u=o.tagExp,l=o.attrExpPresent,h=o.closeIndex;if(this.options.transformTagName){const t=this.options.transformTagName(a);u===a&&(u=t),a=t}n&&r&&"!xml"!==n.tagname&&(r=this.saveTextToParentTag(r,n,i,!1));const f=n;f&&-1!==this.options.unpairedTags.indexOf(f.tagname)&&(n=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),a!==e.tagname&&(i+=i?"."+a:a);const p=s;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,i,a)){let e="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===a[a.length-1]?(a=a.substr(0,a.length-1),i=i.substr(0,i.length-1),u=a):u=u.substr(0,u.length-1),s=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))s=o.closeIndex;else{const n=this.readStopNodeData(t,c,h+1);if(!n)throw new Error(`Unexpected end of ${c}`);s=n.i,e=n.tagContent}const r=new ae(a);a!==u&&l&&(r[":@"]=this.buildAttributesMap(u,i)),e&&(e=this.parseTextData(e,a,i,!0,l,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),r.add(this.options.textNodeName,e),this.addChild(n,r,i,p)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){if("/"===a[a.length-1]?(a=a.substr(0,a.length-1),i=i.substr(0,i.length-1),u=a):u=u.substr(0,u.length-1),this.options.transformTagName){const t=this.options.transformTagName(a);u===a&&(u=t),a=t}const t=new ae(a);a!==u&&l&&(t[":@"]=this.buildAttributesMap(u,i)),this.addChild(n,t,i,p),i=i.substr(0,i.lastIndexOf("."))}else{const t=new ae(a);this.tagsNodeStack.push(n),a!==u&&l&&(t[":@"]=this.buildAttributesMap(u,i)),this.addChild(n,t,i,p),n=t}r="",s=h}}else r+=t[s];return e.child};function Ae(t,e,n,r){this.options.captureMetaData||(r=void 0);const i=this.options.updateTag(e.tagname,n,e[":@"]);!1===i||("string"==typeof i?(e.tagname=i,t.addChild(e,r)):t.addChild(e,r))}const Ie=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const n=this.docTypeEntities[e];t=t.replace(n.regx,n.val)}for(let e in this.lastEntities){const n=this.lastEntities[e];t=t.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const n=this.htmlEntities[e];t=t.replace(n.regex,n.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function Oe(t,e,n,r){return t&&(void 0===r&&(r=0===e.child.length),void 0!==(t=this.parseTextData(t,e.tagname,n,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,r))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function xe(t,e,n,r){return!(!e||!e.has(r))||!(!t||!t.has(n))}function _e(t,e,n,r){const i=t.indexOf(e,n);if(-1===i)throw new Error(r);return i+e.length-1}function Pe(t,e,n){const r=function(t,e){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:">",i="";for(let o=e;o3&&void 0!==arguments[3]?arguments[3]:">");if(!r)return;let i=r.data;const o=r.index,s=i.search(/\s/);let a=i,c=!0;-1!==s&&(a=i.substring(0,s),i=i.substring(s+1).trimStart());const u=a;if(n){const t=a.indexOf(":");-1!==t&&(a=a.substr(t+1),c=a!==r.data.substr(t+1))}return{tagName:a,tagExp:i,closeIndex:o,attrExpPresent:c,rawTagName:u}}function Se(t,e,n){const r=n;let i=1;for(;n",n,`${e} is not closed`);if(t.substring(n+2,o).trim()===e&&(i--,0===i))return{tagContent:t.substring(r,n),i:o};n=o}else if("?"===t[n+1])n=_e(t,"?>",n+1,"StopNode is not closed.");else if("!--"===t.substr(n+1,3))n=_e(t,"--\x3e",n+3,"StopNode is not closed.");else if("!["===t.substr(n+1,2))n=_e(t,"]]>",n,"StopNode is not closed.")-2;else{const r=Pe(t,n,">");r&&((r&&r.tagName)===e&&"/"!==r.tagExp[r.tagExp.length-1]&&i++,n=r.closeIndex)}}function Ce(t,e,n){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e=Object.assign({},de,e),!t||"string"!=typeof t)return t;let n=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(n))return t;if("0"===t)return 0;if(e.hex&&fe.test(n))return function(t){if(parseInt)return parseInt(t,16);if(Number.parseInt)return Number.parseInt(t,16);if(window&&window.parseInt)return window.parseInt(t,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(n);if(n.includes("e")||n.includes("E"))return function(t,e,n){if(!n.eNotation)return t;const r=e.match(ge);if(r){let i=r[1]||"";const o=-1===r[3].indexOf("e")?"E":"e",s=r[2],a=i?t[s.length+1]===o:t[s.length]===o;return s.length>1&&a?t:1!==s.length||!r[3].startsWith(`.${o}`)&&r[3][0]!==o?n.leadingZeros&&!a?(e=(r[1]||"")+r[3],Number(e)):t:Number(e)}return t}(t,n,e);{const i=pe.exec(n);if(i){const o=i[1]||"",s=i[2];let a=(r=i[3])&&-1!==r.indexOf(".")?("."===(r=r.replace(/0+$/,""))?r="0":"."===r[0]?r="0"+r:"."===r[r.length-1]&&(r=r.substring(0,r.length-1)),r):r;const c=o?"."===t[s.length+1]:"."===t[s.length];if(!e.leadingZeros&&(s.length>1||1===s.length&&!c))return t;{const r=Number(n),i=String(r);if(0===r)return r;if(-1!==i.search(/[eE]/))return e.eNotation?r:t;if(-1!==n.indexOf("."))return"0"===i||i===a||i===`${o}${a}`?r:t;let c=s?a:n;return s?c===i||o+c===i?r:t:c===i||c===o+i?r:t}}return t}var r}(t,n)}return void 0!==t?t:""}function Re(t,e,n){const r=Number.parseInt(t,e);return r>=0&&r<=1114111?String.fromCodePoint(r):n+t+";"}const Le=ae.getMetaDataSymbol();function De(t,e){return $e(t,e)}function $e(t,e,n){let r;const i={};for(let o=0;o0&&(i[e.textNodeName]=r):void 0!==r&&(i[e.textNodeName]=r),i}function je(t){const e=Object.keys(t);for(let t=0;t5&&"xml"===r)return ze("InvalidXml","XML declaration allowed only at the start of the document.",Ye(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function Ge(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e"===t[e+2]){e+=2;break}return e}function Ve(t,e){let n="",r="",i=!1;for(;e"===t[e]&&""===r){i=!0;break}n+=t[e]}return""===r&&{value:n,index:e,tagClosed:i}}const We=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function Xe(t,e){const n=ie(t,We),r={};for(let t=0;t"!==t[o]&&" "!==t[o]&&"\t"!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)c+=t[o];if(c=c.trim(),"/"===c[c.length-1]&&(c=c.substring(0,c.length-1),o--),!oe(c)){let e;return e=0===c.trim().length?"Invalid space after '<'.":"Tag '"+c+"' is an invalid name.",ze("InvalidTag",e,Ye(t,o))}const u=Ve(t,o);if(!1===u)return ze("InvalidAttr","Attributes for '"+c+"' have open quote.",Ye(t,o));let l=u.value;if(o=u.index,"/"===l[l.length-1]){const n=o-l.length;l=l.substring(0,l.length-1);const i=Xe(l,e);if(!0!==i)return ze(i.err.code,i.err.msg,Ye(t,n+i.err.line));r=!0}else if(a){if(!u.tagClosed)return ze("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",Ye(t,o));if(l.trim().length>0)return ze("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",Ye(t,s));if(0===n.length)return ze("InvalidTag","Closing tag '"+c+"' has not been opened.",Ye(t,s));{const e=n.pop();if(c!==e.tagName){let n=Ye(t,e.tagStartPos);return ze("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+c+"'.",Ye(t,s))}0==n.length&&(i=!0)}}else{const a=Xe(l,e);if(!0!==a)return ze(a.err.code,a.err.msg,Ye(t,o-l.length+a.err.line));if(!0===i)return ze("InvalidXml","Multiple possible root nodes found.",Ye(t,o));-1!==e.unpairedTags.indexOf(c)||n.push({tagName:c,tagStartPos:s}),r=!0}for(o++;o0)||ze("InvalidXml","Invalid '"+JSON.stringify(n.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):ze("InvalidXml","Start tag expected.",1)}(t,e);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new Ee(this.options);n.addExternalEntities(this.externalEntities);const r=n.parseXml(t);return this.options.preserveOrder||void 0===r?r:De(r,this.options)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}static getMetaDataSymbol(){return ae.getMetaDataSymbol()}}var Ke=l(829),Je=l.n(Ke),tn=function(t){return t.Array="array",t.Object="object",t.Original="original",t}(tn||{});function en(t,e){if(!t.endsWith("propstat.prop.displayname"))return e}function nn(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tn.Original;const r=Je().get(t,e);return"array"===n&&!1===Array.isArray(r)?[r]:"object"===n&&Array.isArray(r)?r[0]:r}function rn(t,e){return e=e??{attributeNamePrefix:"@",attributeParsers:[],tagParsers:[en]},new Promise((n=>{n(function(t){const{multistatus:e}=t;if(""===e)return{multistatus:{response:[]}};if(!e)throw new Error("Invalid response: No root multistatus found");const n={multistatus:Array.isArray(e)?e[0]:e};return Je().set(n,"multistatus.response",nn(n,"multistatus.response",tn.Array)),Je().set(n,"multistatus.response",Je().get(n,"multistatus.response").map((t=>function(t){const e=Object.assign({},t);return e.status?Je().set(e,"status",nn(e,"status",tn.Object)):(Je().set(e,"propstat",nn(e,"propstat",tn.Object)),Je().set(e,"propstat.prop",nn(e,"propstat.prop",tn.Object))),e}(t)))),n}(function(t){let{attributeNamePrefix:e,attributeParsers:n,tagParsers:r}=t;return new Ze({allowBooleanAttributes:!0,attributeNamePrefix:e,textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor(t,e,r){for(const i of n)try{const t=i(r,e);if(t!==e)return t}catch(t){}return e},tagValueProcessor(t,e,n){for(const i of r)try{const t=i(n,e);if(t!==e)return t}catch(t){}return e}})}(e).parse(t)))}))}function on(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{getlastmodified:r=null,getcontentlength:i="0",resourcetype:o=null,getcontenttype:s=null,getetag:a=null}=t,c=o&&"object"==typeof o&&void 0!==o.collection?"directory":"file",u={filename:e,basename:E().basename(e),lastmod:r,size:parseInt(i,10),type:c,etag:"string"==typeof a?a.replace(/"/g,""):null};return"file"===c&&(u.mime=s&&"string"==typeof s?s.split(";")[0]:""),n&&(void 0!==t.displayname&&(t.displayname=String(t.displayname)),u.props=t),u}function sn(t){switch(String(t)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(t),10)}}function an(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const cn=function(t){return function(){for(var e=[],n=0;n2&&void 0!==arguments[2]?arguments[2]:{};const{details:r=!1}=n,i=it({url:A(t.remoteURL,b(e)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},t,n);return an(rt(i,t),(function(n){return Zt(t,n),an(n.text(),(function(i){return an(rn(i,t.parsing),(function(t){const i=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=null;try{t.multistatus.response[0].propstat&&(r=t.multistatus.response[0])}catch(t){}if(!r)throw new Error("Failed getting item stat: bad response");const{propstat:{prop:i,status:o}}=r,[s,a,c]=o.split(" ",3),u=parseInt(a,10);if(u>=400){const t=new Error(`Invalid response: ${u} ${c}`);throw t.status=u,t}return on(i,T(e),n)}(t,e,r);return Kt(n,i,r)}))}))}))}));function un(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const ln=hn((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(t){if(!t||"/"===t)return[];let e=t;const n=[];do{n.push(e),e=E().dirname(e)}while(e&&"/"!==e);return n}(T(e));r.sort(((t,e)=>t.length>e.length?1:e.length>t.length?-1:0));let i=!1;return function(t,e){if("function"==typeof t[dn]){var n,r,i,o=t[dn]();function u(t){try{for(;!(n=o.next()).done;)if((t=e(n.value))&&t.then){if(!En(t))return void t.then(u,i||(i=gn.bind(null,r=new mn,2)));t=t.v}r?gn(r,1,t):r=t}catch(t){gn(r||(r=new mn),2,t)}}if(u(),o.return){var s=function(t){try{n.done||o.return()}catch(t){}return t};if(r&&r.then)return r.then(s,(function(t){throw s(t)}));s()}return r}if(!("length"in t))throw new TypeError("Object is not iterable");for(var a=[],c=0;c2&&void 0!==arguments[2]?arguments[2]:{};if(!0===n.recursive)return ln(t,e,n);const r=it({url:A(t.remoteURL,(i=b(e),i.endsWith("/")?i:i+"/")),method:"MKCOL"},t,n);var i;return un(rt(r,t),(function(e){Zt(t,e)}))}));var yn=l(388),bn=l.n(yn);const wn=function(t){return function(){for(var e=[],n=0;n2&&void 0!==arguments[2]?arguments[2]:{};const r={};if("object"==typeof n.range&&"number"==typeof n.range.start){let t=`bytes=${n.range.start}-`;"number"==typeof n.range.end&&(t=`${t}${n.range.end}`),r.Range=t}const i=it({url:A(t.remoteURL,b(e)),method:"GET",headers:r},t,n);return s=function(e){if(Zt(t,e),r.Range&&206!==e.status){const t=new Error(`Invalid response code for partial request: ${e.status}`);throw t.status=e.status,t}return n.callback&&setTimeout((()=>{n.callback(e)}),0),e.body},(o=rt(i,t))&&o.then||(o=Promise.resolve(o)),s?o.then(s):o;var o,s})),Tn=()=>{},Nn=function(t){return function(){for(var e=[],n=0;n2&&void 0!==arguments[2]?arguments[2]:{};const r=it({url:A(t.remoteURL,b(e)),method:"DELETE"},t,n);return o=function(e){Zt(t,e)},(i=rt(r,t))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o})),In=function(t){return function(){for(var e=[],n=0;n2&&void 0!==arguments[2]?arguments[2]:{};return function(r,i){try{var o=(s=cn(t,e,n),a=function(){return!0},s&&s.then||(s=Promise.resolve(s)),a?s.then(a):s)}catch(t){return i(t)}var s,a;return o&&o.then?o.then(void 0,i):o}(0,(function(t){if(404===t.status)return!1;throw t}))}));function On(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const xn=function(t){return function(){for(var e=[],n=0;n2&&void 0!==arguments[2]?arguments[2]:{};const r=it({url:A(t.remoteURL,b(e),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:n.deep?"infinity":"1"}},t,n);return On(rt(r,t),(function(r){return Zt(t,r),On(r.text(),(function(i){if(!i)throw new Error("Failed parsing directory contents: Empty response");return On(rn(i,t.parsing),(function(i){const o=w(e);let s=function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const o=E().join(e,"/"),{multistatus:{response:s}}=t,a=s.map((t=>{const e=function(t){try{return t.replace(/^https?:\/\/[^\/]+/,"")}catch(t){throw new g(t,"Failed normalising HREF")}}(t.href),{propstat:{prop:n}}=t;return on(n,"/"===o?decodeURIComponent(T(e)):T(E().relative(decodeURIComponent(o),decodeURIComponent(e))),r)}));return i?a:a.filter((t=>t.basename&&("file"===t.type||t.filename!==n.replace(/\/$/,""))))}(i,w(t.remoteBasePath||t.remotePath),o,n.details,n.includeSelf);return n.glob&&(s=function(t,e){return t.filter((t=>Nt(t.filename,e,{matchBase:!0})))}(s,n.glob)),Kt(r,s,n.details)}))}))}))}));function _n(t){return function(){for(var e=[],n=0;n2&&void 0!==arguments[2]?arguments[2]:{};const r=it({url:A(t.remoteURL,b(e)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[Ln]},t,n);return Sn(rt(r,t),(function(e){return Zt(t,e),Sn(e.text(),(function(t){return Kt(e,t,n.details)}))}))}));function Sn(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const Cn=_n((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=it({url:A(t.remoteURL,b(e)),method:"GET"},t,n);return Sn(rt(r,t),(function(e){let r;return Zt(t,e),function(t,e){var n=t();return n&&n.then?n.then(e):e()}((function(){return Sn(e.arrayBuffer(),(function(t){r=t}))}),(function(){return Kt(e,r,n.details)}))}))})),Rn=_n((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{format:r="binary"}=n;if("binary"!==r&&"text"!==r)throw new g({info:{code:j.InvalidOutputFormat}},`Invalid output format: ${r}`);return"text"===r?Pn(t,e,n):Cn(t,e,n)})),Ln=t=>t;function Dn(t,e){let n="";return e.format&&e.indentBy.length>0&&(n="\n"),$n(t,e,"",n)}function $n(t,e,n,r){let i="",o=!1;for(let s=0;s`,o=!1;continue}if(c===e.commentPropName){i+=r+`\x3c!--${a[c][0][e.textNodeName]}--\x3e`,o=!0;continue}if("?"===c[0]){const t=Fn(a[":@"],e),n="?xml"===c?"":r;let s=a[c][0][e.textNodeName];s=0!==s.length?" "+s:"",i+=n+`<${c}${s}${t}?>`,o=!0;continue}let l=r;""!==l&&(l+=e.indentBy);const h=r+`<${c}${Fn(a[":@"],e)}`,f=$n(a[c],e,u,l);-1!==e.unpairedTags.indexOf(c)?e.suppressUnpairedNode?i+=h+">":i+=h+"/>":f&&0!==f.length||!e.suppressEmptyNode?f&&f.endsWith(">")?i+=h+`>${f}${r}`:(i+=h+">",f&&""!==r&&(f.includes("/>")||f.includes("`):i+=h+"/>",o=!0}return i}function jn(t){const e=Object.keys(t);for(let n=0;n0&&e.processEntities)for(let n=0;n","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Bn(t){this.options=Object.assign({},kn,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=me(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Wn),this.processTextOrObjNode=Gn,this.options.format?(this.indentate=Vn,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function Gn(t,e,n,r){const i=this.j2x(t,n+1,r.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,i.attrStr,n):this.buildObjectNode(i.val,e,i.attrStr,n)}function Vn(t){return this.options.indentBy.repeat(t)}function Wn(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}function Xn(t){return new Bn({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(qn({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:t}}},"d"))}function qn(t,e){const n={...t};for(const t in n)n.hasOwnProperty(t)&&(n[t]&&"object"==typeof n[t]&&-1===t.indexOf(":")?(n[`${e}:${t}`]=qn(n[t],e),delete n[t]):!1===/^@_/.test(t)&&(n[`${e}:${t}`]=n[t],delete n[t]));return n}function zn(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function Hn(t){return function(){for(var e=[],n=0;n1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},Bn.prototype.j2x=function(t,e,n){let r="",i="";const o=n.join(".");for(let s in t)if(Object.prototype.hasOwnProperty.call(t,s))if(void 0===t[s])this.isAttribute(s)&&(i+="");else if(null===t[s])this.isAttribute(s)||s===this.options.cdataPropName?i+="":"?"===s[0]?i+=this.indentate(e)+"<"+s+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+s+"/"+this.tagEndChar;else if(t[s]instanceof Date)i+=this.buildTextValNode(t[s],s,"",e);else if("object"!=typeof t[s]){const n=this.isAttribute(s);if(n&&!this.ignoreAttributesFn(n,o))r+=this.buildAttrPairStr(n,""+t[s]);else if(!n)if(s===this.options.textNodeName){let e=this.options.tagValueProcessor(s,""+t[s]);i+=this.replaceEntitiesValue(e)}else i+=this.buildTextValNode(t[s],s,"",e)}else if(Array.isArray(t[s])){const r=t[s].length;let o="",a="";for(let c=0;c"+t+i}},Bn.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(r)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(r)+"<"+e+n+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(e,t);return i=this.replaceEntitiesValue(i),""===i?this.indentate(r)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(r)+"<"+e+n+">"+i+"0&&this.options.processEntities)for(let e=0;e3&&void 0!==arguments[3]?arguments[3]:{};const i=it({url:A(t.remoteURL,b(e)),method:"UNLOCK",headers:{"Lock-Token":n}},t,r);return zn(rt(i,t),(function(e){if(Zt(t,e),204!==e.status&&200!==e.status)throw Qt(e)}))})),Qn=Hn((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{refreshToken:r,timeout:i=Zn}=n,o={Accept:"text/plain,application/xml",Timeout:i};r&&(o.If=r);const s=it({url:A(t.remoteURL,b(e)),method:"LOCK",headers:o,data:Xn(t.contactHref)},t,n);return zn(rt(s,t),(function(e){return Zt(t,e),zn(e.text(),(function(t){const n=(o=t,new Ze({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(o)),r=Je().get(n,"prop.lockdiscovery.activelock.locktoken.href"),i=Je().get(n,"prop.lockdiscovery.activelock.timeout");var o;if(!r)throw Qt(e,"No lock token received: ");return{token:r,serverTimeout:i}}))}))})),Zn="Infinite, Second-4100000000";function Kn(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const Jn=function(t){return function(){for(var e=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:{};const n=e.path||"/",r=it({url:A(t.remoteURL,n),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},t,e);return Kn(rt(r,t),(function(n){return Zt(t,n),Kn(n.text(),(function(r){return Kn(rn(r,t.parsing),(function(t){const r=function(t){try{const[e]=t.multistatus.response,{propstat:{prop:{"quota-used-bytes":n,"quota-available-bytes":r}}}=e;return void 0!==n&&void 0!==r?{used:parseInt(String(n),10),available:sn(r)}:null}catch(t){}return null}(t);return Kt(n,r,e.details)}))}))}))}));function tr(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const er=function(t){return function(){for(var e=[],n=0;n2&&void 0!==arguments[2]?arguments[2]:{};const{details:r=!1}=n,i=it({url:A(t.remoteURL,b(e)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":t.headers["Content-Type"]||"application/xml; charset=utf-8"}},t,n);return tr(rt(i,t),(function(n){return Zt(t,n),tr(n.text(),(function(i){return tr(rn(i,t.parsing),(function(t){const i=function(t,e,n){const r={truncated:!1,results:[]};return r.truncated=t.multistatus.response.some((t=>"507"===(t.status||t.propstat?.status).split(" ",3)?.[1]&&t.href.replace(/\/$/,"").endsWith(b(e).replace(/\/$/,"")))),t.multistatus.response.forEach((t=>{if(void 0===t.propstat)return;const e=t.href.split("/").map(decodeURIComponent).join("/");r.results.push(on(t.propstat.prop,e,n))})),r}(t,e,r);return Kt(n,i,r)}))}))}))})),nr=function(t){return function(){for(var e=[],n=0;n3&&void 0!==arguments[3]?arguments[3]:{};const i=it({url:A(t.remoteURL,b(e)),method:"MOVE",headers:{Destination:A(t.remoteURL,b(n)),Overwrite:!1===r.overwrite?"F":"T"}},t,r);return s=function(e){Zt(t,e)},(o=rt(i,t))&&o.then||(o=Promise.resolve(o)),s?o.then(s):o;var o,s}));var rr=l(172);function ir(t){if(Z(t))return t.byteLength;if(K(t))return t.length;if("string"==typeof t)return(0,rr.d)(t);throw new g({info:{code:j.DataTypeNoLength}},"Cannot calculate data length: Invalid type")}const or=function(t){return function(){for(var e=[],n=0;n3&&void 0!==arguments[3]?arguments[3]:{};const{contentLength:i=!0,overwrite:o=!0}=r,s={"Content-Type":"application/octet-stream"};!1===i||(s["Content-Length"]="number"==typeof i?`${i}`:`${ir(n)}`),o||(s["If-None-Match"]="*");const a=it({url:A(t.remoteURL,b(e)),method:"PUT",headers:s,data:n},t,r);return u=function(e){try{Zt(t,e)}catch(t){const e=t;if(412!==e.status||o)throw e;return!1}return!0},(c=rt(a,t))&&c.then||(c=Promise.resolve(c)),u?c.then(u):c;var c,u})),sr=function(t){return function(){for(var e=[],n=0;n2&&void 0!==arguments[2]?arguments[2]:{};const r=it({url:A(t.remoteURL,b(e)),method:"OPTIONS"},t,n);return o=function(e){try{Zt(t,e)}catch(t){throw t}return{compliance:(e.headers.get("DAV")??"").split(",").map((t=>t.trim())),server:e.headers.get("Server")??""}},(i=rt(r,t))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o}));function ar(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const cr=hr((function(t,e,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(n>r||n<0)throw new g({info:{code:j.InvalidUpdateRange}},`Invalid update range ${n} for partial update`);const s={"Content-Type":"application/octet-stream","Content-Length":""+(r-n+1),"Content-Range":`bytes ${n}-${r}/*`},a=it({url:A(t.remoteURL,b(e)),method:"PUT",headers:s,data:i},t,o);return ar(rt(a,t),(function(e){Zt(t,e)}))}));function ur(t,e){var n=t();return n&&n.then?n.then(e):e(n)}const lr=hr((function(t,e,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(n>r||n<0)throw new g({info:{code:j.InvalidUpdateRange}},`Invalid update range ${n} for partial update`);const s={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(r-n+1),"X-Update-Range":`bytes=${n}-${r}`},a=it({url:A(t.remoteURL,b(e)),method:"PATCH",headers:s,data:i},t,o);return ar(rt(a,t),(function(e){Zt(t,e)}))}));function hr(t){return function(){for(var e=[],n=0;n5&&void 0!==arguments[5]?arguments[5]:{};return ar(sr(t,e,o),(function(s){let a=!1;return ur((function(){if(s.compliance.includes("sabredav-partialupdate"))return ar(lr(t,e,n,r,i,o),(function(t){return a=!0,t}))}),(function(c){let u=!1;return a?c:ur((function(){if(s.server.includes("Apache")&&s.compliance.includes(""))return ar(cr(t,e,n,r,i,o),(function(t){return u=!0,t}))}),(function(t){if(u)return t;throw new g({info:{code:j.NotSupported}},"Not supported")}))}))}))})),pr="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";var dr=n(35947),gr=n(71225);const mr=(0,dr.YK)().setApp("@nextcloud/files").detectUser().build();var Er=(t=>(t.Folder="folder",t.File="file",t))(Er||{}),vr=(t=>(t[t.NONE=0]="NONE",t[t.CREATE=4]="CREATE",t[t.READ=1]="READ",t[t.UPDATE=2]="UPDATE",t[t.DELETE=8]="DELETE",t[t.SHARE=16]="SHARE",t[t.ALL=31]="ALL",t))(vr||{});const yr=function(t,e){return null!==t.match(e)},br=(t,e)=>{if(t.id&&"number"!=typeof t.id)throw new Error("Invalid id type of value");if(!t.source)throw new Error("Missing mandatory source");try{new URL(t.source)}catch(t){throw new Error("Invalid source format, source must be a valid URL")}if(!t.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(t.displayname&&"string"!=typeof t.displayname)throw new Error("Invalid displayname type");if(t.mtime&&!(t.mtime instanceof Date))throw new Error("Invalid mtime type");if(t.crtime&&!(t.crtime instanceof Date))throw new Error("Invalid crtime type");if(!t.mime||"string"!=typeof t.mime||!t.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in t&&"number"!=typeof t.size&&void 0!==t.size)throw new Error("Invalid size type");if("permissions"in t&&void 0!==t.permissions&&!("number"==typeof t.permissions&&t.permissions>=vr.NONE&&t.permissions<=vr.ALL))throw new Error("Invalid permissions");if(t.owner&&null!==t.owner&&"string"!=typeof t.owner)throw new Error("Invalid owner type");if(t.attributes&&"object"!=typeof t.attributes)throw new Error("Invalid attributes type");if(t.root&&"string"!=typeof t.root)throw new Error("Invalid root type");if(t.root&&!t.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(t.root&&!t.source.includes(t.root))throw new Error("Root must be part of the source");if(t.root&&yr(t.source,e)){const n=t.source.match(e)[0];if(!t.source.includes((0,gr.fj)(n,t.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(t.status&&!Object.values(wr).includes(t.status))throw new Error("Status must be a valid NodeStatus")};var wr=(t=>(t.NEW="new",t.FAILED="failed",t.LOADING="loading",t.LOCKED="locked",t))(wr||{});class Tr{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;readonlyAttributes=Object.entries(Object.getOwnPropertyDescriptors(Tr.prototype)).filter((t=>"function"==typeof t[1].get&&"__proto__"!==t[0])).map((t=>t[0]));handler={set:(t,e,n)=>!this.readonlyAttributes.includes(e)&&Reflect.set(t,e,n),deleteProperty:(t,e)=>!this.readonlyAttributes.includes(e)&&Reflect.deleteProperty(t,e),get:(t,e,n)=>this.readonlyAttributes.includes(e)?(mr.warn(`Accessing "Node.attributes.${e}" is deprecated, access it directly on the Node instance.`),Reflect.get(this,e)):Reflect.get(t,e,n)};constructor(t,e){t.mime||(t.mime="application/octet-stream"),br(t,e||this._knownDavService),this._data={displayname:t.attributes?.displayname,...t,attributes:{}},this._attributes=new Proxy(this._data.attributes,this.handler),this.update(t.attributes??{}),e&&(this._knownDavService=e)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:t}=new URL(this.source);return t+(0,gr.O0)(this.source.slice(t.length))}get basename(){return(0,gr.P8)(this.source)}get displayname(){return this._data.displayname||this.basename}set displayname(t){br({...this._data,displayname:t},this._knownDavService),this._data.displayname=t}get extension(){return(0,gr.LC)(this.source)}get dirname(){if(this.root){let t=this.source;this.isDavResource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),n=this.root.replace(/\/$/,"");return(0,gr.pD)(t.slice(e+n.length)||"/")}const t=new URL(this.source);return(0,gr.pD)(t.pathname)}get mime(){return this._data.mime||"application/octet-stream"}set mime(t){t??="application/octet-stream",br({...this._data,mime:t},this._knownDavService),this._data.mime=t}get mtime(){return this._data.mtime}set mtime(t){br({...this._data,mtime:t},this._knownDavService),this._data.mtime=t}get crtime(){return this._data.crtime}get size(){return this._data.size}set size(t){br({...this._data,size:t},this._knownDavService),this.updateMtime(),this._data.size=t}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavResource?void 0!==this._data.permissions?this._data.permissions:vr.NONE:vr.READ}set permissions(t){br({...this._data,permissions:t},this._knownDavService),this.updateMtime(),this._data.permissions=t}get owner(){return this.isDavResource?this._data.owner:null}get isDavResource(){return yr(this.source,this._knownDavService)}get isDavRessource(){return this.isDavResource}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavResource&&(0,gr.pD)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){let t=this.source;this.isDavResource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),n=this.root.replace(/\/$/,"");return t.slice(e+n.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id}get status(){return this._data?.status}set status(t){br({...this._data,status:t},this._knownDavService),this._data.status=t}get data(){return structuredClone(this._data)}move(t){br({...this._data,source:t},this._knownDavService);const e=this.basename;this._data.source=t,this.displayname===e&&this.basename!==e&&(this.displayname=this.basename)}rename(t){if(t.includes("/"))throw new Error("Invalid basename");this.move((0,gr.pD)(this.source)+"/"+t)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}update(t){for(const[e,n]of Object.entries(t))try{void 0===n?delete this.attributes[e]:this.attributes[e]=n}catch(t){if(t instanceof TypeError)continue;throw t}}}class Nr extends Tr{get type(){return Er.File}clone(){return new Nr(this.data)}}class Ar extends Tr{constructor(t){super({...t,mime:"httpd/unix-directory"})}get type(){return Er.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}clone(){return new Ar(this.data)}}const Ir=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:creationdate","d:displayname","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:size"],Or={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},xr=function(t,e={nc:"http://nextcloud.org/ns"}){void 0===window._nc_dav_properties&&(window._nc_dav_properties=[...Ir],window._nc_dav_namespaces={...Or});const n={...window._nc_dav_namespaces,...e};return window._nc_dav_properties.find((e=>e===t))?(mr.warn(`${t} already registered`,{prop:t}),!1):t.startsWith("<")||2!==t.split(":").length?(mr.error(`${t} is not valid. See example: 'oc:fileid'`,{prop:t}),!1):n[t.split(":")[0]]?(window._nc_dav_properties.push(t),window._nc_dav_namespaces=n,!0):(mr.error(`${t} namespace unknown`,{prop:t,namespaces:n}),!1)},_r=function(){return void 0===window._nc_dav_properties&&(window._nc_dav_properties=[...Ir]),window._nc_dav_properties.map((t=>`<${t} />`)).join(" ")},Pr=function(){return void 0===window._nc_dav_namespaces&&(window._nc_dav_namespaces={...Or}),Object.keys(window._nc_dav_namespaces).map((t=>`xmlns:${t}="${window._nc_dav_namespaces?.[t]}"`)).join(" ")},Sr=function(){return`\n\t\t\n\t\t\t\n\t\t\t\t${_r()}\n\t\t\t\n\t\t`},Cr=function(t){return`\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${_r()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${(0,r.HW)()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${t}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`},Rr=(0,i.f)()?`/files/${(0,i.G)()}`:`/files/${(0,r.HW)()?.uid}`,Lr=function(){const t=(0,o.dC)("dav");return(0,i.f)()?t.replace("remote.php","public.php"):t}(),Dr=function(t=Lr,e={}){const n=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{authType:n=null,remoteBasePath:r,contactHref:i=pr,ha1:o,headers:s={},httpAgent:a,httpsAgent:c,password:u,token:l,username:h,withCredentials:f}=e;let p=n;p||(p=h||u?$.Password:$.None);const d={authType:p,remoteBasePath:r,contactHref:i,ha1:o,headers:Object.assign({},s),httpAgent:a,httpsAgent:c,password:u,parsing:{attributeNamePrefix:e.attributeNamePrefix??"@",attributeParsers:[],tagParsers:[en]},remotePath:N(t),remoteURL:t,token:l,username:h,withCredentials:f};return F(d,h,u,l,o),{copyFile:(t,e,n)=>Jt(d,t,e,n),createDirectory:(t,e)=>vn(d,t,e),createReadStream:(t,e)=>function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=new(0,bn().PassThrough);return wn(t,e,n).then((t=>{t.pipe(r)})).catch((t=>{r.emit("error",t)})),r}(d,t,e),createWriteStream:(t,e,n)=>function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Tn;const i=new(0,bn().PassThrough),o={};!1===n.overwrite&&(o["If-None-Match"]="*");const s=it({url:A(t.remoteURL,b(e)),method:"PUT",headers:o,data:i,maxRedirects:0},t,n);return rt(s,t).then((e=>Zt(t,e))).then((t=>{setTimeout((()=>{r(t)}),0)})).catch((t=>{i.emit("error",t)})),i}(d,t,e,n),customRequest:(t,e)=>Nn(d,t,e),deleteFile:(t,e)=>An(d,t,e),exists:(t,e)=>In(d,t,e),getDirectoryContents:(t,e)=>xn(d,t,e),getFileContents:(t,e)=>Rn(d,t,e),getFileDownloadLink:t=>function(t,e){let n=A(t.remoteURL,b(e));const r=/^https:/i.test(n)?"https":"http";switch(t.authType){case $.None:break;case $.Password:{const e=C(t.headers.Authorization.replace(/^Basic /i,"").trim());n=n.replace(/^https?:\/\//,`${r}://${e}@`);break}default:throw new g({info:{code:j.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${t.authType}`)}return n}(d,t),getFileUploadLink:t=>function(t,e){let n=`${A(t.remoteURL,b(e))}?Content-Type=application/octet-stream`;const r=/^https:/i.test(n)?"https":"http";switch(t.authType){case $.None:break;case $.Password:{const e=C(t.headers.Authorization.replace(/^Basic /i,"").trim());n=n.replace(/^https?:\/\//,`${r}://${e}@`);break}default:throw new g({info:{code:j.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${t.authType}`)}return n}(d,t),getHeaders:()=>Object.assign({},d.headers),getQuota:t=>Jn(d,t),lock:(t,e)=>Qn(d,t,e),moveFile:(t,e,n)=>nr(d,t,e,n),putFileContents:(t,e,n)=>or(d,t,e,n),partialUpdateFileContents:(t,e,n,r,i)=>fr(d,t,e,n,r,i),getDAVCompliance:t=>sr(d,t),search:(t,e)=>er(d,t,e),setHeaders:t=>{d.headers=Object.assign({},t)},stat:(t,e)=>cn(d,t,e),unlock:(t,e,n)=>Yn(d,t,e,n),registerAttributeParser:t=>{d.parsing.attributeParsers.push(t)},registerTagParser:t=>{d.parsing.tagParsers.push(t)}}}(t,{headers:e});function i(t){n.setHeaders({...e,"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})}return(0,r.zo)(i),i((0,r.do)()),V().patch("fetch",((t,e)=>{const n=e.headers;return n?.method&&(e.method=n.method,delete n.method),fetch(t,e)})),n},$r=(t,e="/",n=Rr)=>{const r=new AbortController;return new s.CancelablePromise((async(i,o,s)=>{s((()=>r.abort()));try{i((await t.getDirectoryContents(`${n}${e}`,{signal:r.signal,details:!0,data:`\n\t\t\n\t\t\t\n\t\t\t\t${_r()}\n\t\t\t\n\t\t\t\n\t\t\t\t1\n\t\t\t\n\t\t`,headers:{method:"REPORT"},includeSelf:!0})).data.filter((t=>t.filename!==e)).map((t=>jr(t,n))))}catch(t){o(t)}}))},jr=function(t,e=Rr,n=Lr){let o=(0,r.HW)()?.uid;if((0,i.f)())o=o??"anonymous";else if(!o)throw new Error("No user id found");const s=t.props,a=function(t=""){let e=vr.NONE;return t?((t.includes("C")||t.includes("K"))&&(e|=vr.CREATE),t.includes("G")&&(e|=vr.READ),(t.includes("W")||t.includes("N")||t.includes("V"))&&(e|=vr.UPDATE),t.includes("D")&&(e|=vr.DELETE),t.includes("R")&&(e|=vr.SHARE),e):e}(s?.permissions),c=String(s?.["owner-id"]||o),u=s.fileid||0,l=new Date(Date.parse(t.lastmod)),h=new Date(Date.parse(s.creationdate)),f={id:u,source:`${n}${t.filename}`,mtime:isNaN(l.getTime())||0===l.getTime()?void 0:l,crtime:isNaN(h.getTime())||0===h.getTime()?void 0:h,mime:t.mime||"application/octet-stream",displayname:void 0!==s.displayname?String(s.displayname):void 0,size:s?.size||Number.parseInt(s.getcontentlength||"0"),status:u<0?wr.FAILED:void 0,permissions:a,owner:c,root:e,attributes:{...t,...s,hasPreview:s?.["has-preview"]}};return delete f.attributes?.props,"file"===t.type?new Nr(f):new Ar(f)};EventTarget;var Fr,Ur,Mr,kr,Br=n(83141),Gr=n(87485),Vr=n(53334),Wr=n(65606),Xr=n(48287).Buffer;function qr(){if(Ur)return Fr;Ur=1;const t="object"==typeof Wr&&Wr.env&&Wr.env.NODE_DEBUG&&/\bsemver\b/i.test(Wr.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};return Fr=t}function zr(){if(kr)return Mr;kr=1;const t=Number.MAX_SAFE_INTEGER||9007199254740991;return Mr={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}var Hr,Yr,Qr,Zr,Kr,Jr,ti,ei,ni,ri,ii,oi,si,ai={exports:{}};function ci(){if(ti)return Jr;ti=1;const t=qr(),{MAX_LENGTH:e,MAX_SAFE_INTEGER:n}=zr(),{safeRe:r,t:i}=(Hr||(Hr=1,function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=zr(),o=qr(),s=(e=t.exports={}).re=[],a=e.safeRe=[],c=e.src=[],u=e.safeSrc=[],l=e.t={};let h=0;const f="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",i],[f,r]],d=(t,e,n)=>{const r=(t=>{for(const[e,n]of p)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t})(e),i=h++;o(t,i,e),l[t]=i,c[i]=e,u[i]=r,s[i]=new RegExp(e,n?"g":void 0),a[i]=new RegExp(r,n?"g":void 0)};d("NUMERICIDENTIFIER","0|[1-9]\\d*"),d("NUMERICIDENTIFIERLOOSE","\\d+"),d("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),d("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),d("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),d("PRERELEASEIDENTIFIER",`(?:${c[l.NONNUMERICIDENTIFIER]}|${c[l.NUMERICIDENTIFIER]})`),d("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NONNUMERICIDENTIFIER]}|${c[l.NUMERICIDENTIFIERLOOSE]})`),d("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),d("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),d("BUILDIDENTIFIER",`${f}+`),d("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),d("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),d("FULL",`^${c[l.FULLPLAIN]}$`),d("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),d("LOOSE",`^${c[l.LOOSEPLAIN]}$`),d("GTLT","((?:<|>)?=?)"),d("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),d("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),d("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),d("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),d("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),d("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),d("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),d("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`),d("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`),d("COERCERTL",c[l.COERCE],!0),d("COERCERTLFULL",c[l.COERCEFULL],!0),d("LONETILDE","(?:~>?)"),d("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",d("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),d("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),d("LONECARET","(?:\\^)"),d("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",d("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),d("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),d("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),d("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),d("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",d("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),d("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),d("STAR","(<|>)?=?\\s*\\*"),d("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),d("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(ai,ai.exports)),ai.exports),o=function(){if(Qr)return Yr;Qr=1;const t=Object.freeze({loose:!0}),e=Object.freeze({});return Yr=n=>n?"object"!=typeof n?t:n:e}(),{compareIdentifiers:s}=function(){if(Kr)return Zr;Kr=1;const t=/^[0-9]+$/,e=(e,n)=>{if("number"==typeof e&&"number"==typeof n)return e===n?0:ee(n,t)}}();class a{constructor(s,c){if(c=o(c),s instanceof a){if(s.loose===!!c.loose&&s.includePrerelease===!!c.includePrerelease)return s;s=s.version}else if("string"!=typeof s)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof s}".`);if(s.length>e)throw new TypeError(`version is longer than ${e} characters`);t("SemVer",s,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;const u=s.trim().match(c.loose?r[i.LOOSE]:r[i.FULL]);if(!u)throw new TypeError(`Invalid Version: ${s}`);if(this.raw=s,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");u[4]?this.prerelease=u[4].split(".").map((t=>{if(/^[0-9]+$/.test(t)){const e=+t;if(e>=0&&et.major?1:this.minort.minor?1:this.patcht.patch?1:0}comparePre(e){if(e instanceof a||(e=new a(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{const r=this.prerelease[n],i=e.prerelease[n];if(t("prerelease compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return s(r,i)}while(++n)}compareBuild(e){e instanceof a||(e=new a(e,this.options));let n=0;do{const r=this.build[n],i=e.build[n];if(t("build compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return s(r,i)}while(++n)}inc(t,e,n){if(t.startsWith("pre")){if(!e&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(e){const t=`-${e}`.match(this.options.loose?r[i.PRERELEASELOOSE]:r[i.PRERELEASE]);if(!t||t[1]!==e)throw new Error(`invalid identifier: ${e}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e,n),this.inc("pre",e,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",e,n),this.inc("pre",e,n);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const t=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[t];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(e===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(t)}}if(e){let r=[e,t];!1===n&&(r=[e]),0===s(this.prerelease[0],e)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Jr=a}!function(){if(ni)return ei;ni=1;const t=ci();ei=(e,n)=>new t(e,n).major}(),function(){if(si)return oi;si=1;const t=function(){if(ii)return ri;ii=1;const t=ci();return ri=(e,n,r=!1)=>{if(e instanceof t)return e;try{return new t(e,n)}catch(t){if(!r)return null;throw t}},ri}();oi=(e,n)=>{const r=t(e,n);return r?r.version:null}}();var ui;ui||(ui=1,function(t){t.parser=function(t,e){return new r(t,e)},t.SAXParser=r,t.SAXStream=o,t.createStream=function(t,e){return new o(t,e)},t.MAX_BUFFER_LENGTH=65536;var e,n=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function r(e,i){if(!(this instanceof r))return new r(e,i);var o=this;!function(t){for(var e=0,r=n.length;e"===o?(O(r,"onsgmldeclaration",r.sgmlDecl),r.sgmlDecl="",r.state=N.TEXT):m(o)?(r.state=N.SGML_DECL_QUOTED,r.sgmlDecl+=o):r.sgmlDecl+=o;continue;case N.SGML_DECL_QUOTED:o===r.q&&(r.state=N.SGML_DECL,r.q=""),r.sgmlDecl+=o;continue;case N.DOCTYPE:">"===o?(r.state=N.TEXT,O(r,"ondoctype",r.doctype),r.doctype=!0):(r.doctype+=o,"["===o?r.state=N.DOCTYPE_DTD:m(o)&&(r.state=N.DOCTYPE_QUOTED,r.q=o));continue;case N.DOCTYPE_QUOTED:r.doctype+=o,o===r.q&&(r.q="",r.state=N.DOCTYPE);continue;case N.DOCTYPE_DTD:"]"===o?(r.doctype+=o,r.state=N.DOCTYPE):"<"===o?(r.state=N.OPEN_WAKA,r.startTagPosition=r.position):m(o)?(r.doctype+=o,r.state=N.DOCTYPE_DTD_QUOTED,r.q=o):r.doctype+=o;continue;case N.DOCTYPE_DTD_QUOTED:r.doctype+=o,o===r.q&&(r.state=N.DOCTYPE_DTD,r.q="");continue;case N.COMMENT:"-"===o?r.state=N.COMMENT_ENDING:r.comment+=o;continue;case N.COMMENT_ENDING:"-"===o?(r.state=N.COMMENT_ENDED,r.comment=_(r.opt,r.comment),r.comment&&O(r,"oncomment",r.comment),r.comment=""):(r.comment+="-"+o,r.state=N.COMMENT);continue;case N.COMMENT_ENDED:">"!==o?(C(r,"Malformed comment"),r.comment+="--"+o,r.state=N.COMMENT):r.doctype&&!0!==r.doctype?r.state=N.DOCTYPE_DTD:r.state=N.TEXT;continue;case N.CDATA:"]"===o?r.state=N.CDATA_ENDING:r.cdata+=o;continue;case N.CDATA_ENDING:"]"===o?r.state=N.CDATA_ENDING_2:(r.cdata+="]"+o,r.state=N.CDATA);continue;case N.CDATA_ENDING_2:">"===o?(r.cdata&&O(r,"oncdata",r.cdata),O(r,"onclosecdata"),r.cdata="",r.state=N.TEXT):"]"===o?r.cdata+="]":(r.cdata+="]]"+o,r.state=N.CDATA);continue;case N.PROC_INST:"?"===o?r.state=N.PROC_INST_ENDING:g(o)?r.state=N.PROC_INST_BODY:r.procInstName+=o;continue;case N.PROC_INST_BODY:if(!r.procInstBody&&g(o))continue;"?"===o?r.state=N.PROC_INST_ENDING:r.procInstBody+=o;continue;case N.PROC_INST_ENDING:">"===o?(O(r,"onprocessinginstruction",{name:r.procInstName,body:r.procInstBody}),r.procInstName=r.procInstBody="",r.state=N.TEXT):(r.procInstBody+="?"+o,r.state=N.PROC_INST_BODY);continue;case N.OPEN_TAG:v(f,o)?r.tagName+=o:(R(r),">"===o?$(r):"/"===o?r.state=N.OPEN_TAG_SLASH:(g(o)||C(r,"Invalid character in tag name"),r.state=N.ATTRIB));continue;case N.OPEN_TAG_SLASH:">"===o?($(r,!0),j(r)):(C(r,"Forward-slash in opening tag not followed by >"),r.state=N.ATTRIB);continue;case N.ATTRIB:if(g(o))continue;">"===o?$(r):"/"===o?r.state=N.OPEN_TAG_SLASH:v(h,o)?(r.attribName=o,r.attribValue="",r.state=N.ATTRIB_NAME):C(r,"Invalid attribute name");continue;case N.ATTRIB_NAME:"="===o?r.state=N.ATTRIB_VALUE:">"===o?(C(r,"Attribute without value"),r.attribValue=r.attribName,D(r),$(r)):g(o)?r.state=N.ATTRIB_NAME_SAW_WHITE:v(f,o)?r.attribName+=o:C(r,"Invalid attribute name");continue;case N.ATTRIB_NAME_SAW_WHITE:if("="===o)r.state=N.ATTRIB_VALUE;else{if(g(o))continue;C(r,"Attribute without value"),r.tag.attributes[r.attribName]="",r.attribValue="",O(r,"onattribute",{name:r.attribName,value:""}),r.attribName="",">"===o?$(r):v(h,o)?(r.attribName=o,r.state=N.ATTRIB_NAME):(C(r,"Invalid attribute name"),r.state=N.ATTRIB)}continue;case N.ATTRIB_VALUE:if(g(o))continue;m(o)?(r.q=o,r.state=N.ATTRIB_VALUE_QUOTED):(r.opt.unquotedAttributeValues||P(r,"Unquoted attribute value"),r.state=N.ATTRIB_VALUE_UNQUOTED,r.attribValue=o);continue;case N.ATTRIB_VALUE_QUOTED:if(o!==r.q){"&"===o?r.state=N.ATTRIB_VALUE_ENTITY_Q:r.attribValue+=o;continue}D(r),r.q="",r.state=N.ATTRIB_VALUE_CLOSED;continue;case N.ATTRIB_VALUE_CLOSED:g(o)?r.state=N.ATTRIB:">"===o?$(r):"/"===o?r.state=N.OPEN_TAG_SLASH:v(h,o)?(C(r,"No whitespace between attributes"),r.attribName=o,r.attribValue="",r.state=N.ATTRIB_NAME):C(r,"Invalid attribute name");continue;case N.ATTRIB_VALUE_UNQUOTED:if(!E(o)){"&"===o?r.state=N.ATTRIB_VALUE_ENTITY_U:r.attribValue+=o;continue}D(r),">"===o?$(r):r.state=N.ATTRIB;continue;case N.CLOSE_TAG:if(r.tagName)">"===o?j(r):v(f,o)?r.tagName+=o:r.script?(r.script+=""===o?j(r):C(r,"Invalid characters in closing tag");continue;case N.TEXT_ENTITY:case N.ATTRIB_VALUE_ENTITY_Q:case N.ATTRIB_VALUE_ENTITY_U:var l,b;switch(r.state){case N.TEXT_ENTITY:l=N.TEXT,b="textNode";break;case N.ATTRIB_VALUE_ENTITY_Q:l=N.ATTRIB_VALUE_QUOTED,b="attribValue";break;case N.ATTRIB_VALUE_ENTITY_U:l=N.ATTRIB_VALUE_UNQUOTED,b="attribValue"}if(";"===o){var w=F(r);r.opt.unparsedEntities&&!Object.values(t.XML_ENTITIES).includes(w)?(r.entity="",r.state=l,r.write(w)):(r[b]+=w,r.entity="",r.state=l)}else v(r.entity.length?d:p,o)?r.entity+=o:(C(r,"Invalid character in entity name"),r[b]+="&"+r.entity+o,r.entity="",r.state=l);continue;default:throw new Error(r,"Unknown state: "+r.state)}return r.position>=r.bufferCheckPosition&&function(e){for(var r=Math.max(t.MAX_BUFFER_LENGTH,10),i=0,o=0,s=n.length;or)switch(n[o]){case"textNode":x(e);break;case"cdata":O(e,"oncdata",e.cdata),e.cdata="";break;case"script":O(e,"onscript",e.script),e.script="";break;default:P(e,"Max buffer length exceeded: "+n[o])}i=Math.max(i,a)}var c=t.MAX_BUFFER_LENGTH-i;e.bufferCheckPosition=c+e.position}(r),r},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var t;x(t=this),""!==t.cdata&&(O(t,"oncdata",t.cdata),t.cdata=""),""!==t.script&&(O(t,"onscript",t.script),t.script="")}};try{e=require("stream").Stream}catch(t){e=function(){}}e||(e=function(){});var i=t.EVENTS.filter((function(t){return"error"!==t&&"end"!==t}));function o(t,n){if(!(this instanceof o))return new o(t,n);e.apply(this),this._parser=new r(t,n),this.writable=!0,this.readable=!0;var s=this;this._parser.onend=function(){s.emit("end")},this._parser.onerror=function(t){s.emit("error",t),s._parser.error=null},this._decoder=null,i.forEach((function(t){Object.defineProperty(s,"on"+t,{get:function(){return s._parser["on"+t]},set:function(e){if(!e)return s.removeAllListeners(t),s._parser["on"+t]=e,e;s.on(t,e)},enumerable:!0,configurable:!1})}))}o.prototype=Object.create(e.prototype,{constructor:{value:o}}),o.prototype.write=function(t){if("function"==typeof Xr&&"function"==typeof Xr.isBuffer&&Xr.isBuffer(t)){if(!this._decoder){var e=Br.I;this._decoder=new e("utf8")}t=this._decoder.write(t)}return this._parser.write(t.toString()),this.emit("data",t),!0},o.prototype.end=function(t){return t&&t.length&&this.write(t),this._parser.end(),!0},o.prototype.on=function(t,n){var r=this;return r._parser["on"+t]||-1===i.indexOf(t)||(r._parser["on"+t]=function(){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);e.splice(0,0,t),r.emit.apply(r,e)}),e.prototype.on.call(r,t,n)};var s="[CDATA[",a="DOCTYPE",c="http://www.w3.org/XML/1998/namespace",u="http://www.w3.org/2000/xmlns/",l={xml:c,xmlns:u},h=/[:_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]/,f=/[:_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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,p=/[#:_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]/,d=/[#:_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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function g(t){return" "===t||"\n"===t||"\r"===t||"\t"===t}function m(t){return'"'===t||"'"===t}function E(t){return">"===t||g(t)}function v(t,e){return t.test(e)}function y(t,e){return!v(t,e)}var b,w,T,N=0;for(var A in t.STATE={BEGIN:N++,BEGIN_WHITESPACE:N++,TEXT:N++,TEXT_ENTITY:N++,OPEN_WAKA:N++,SGML_DECL:N++,SGML_DECL_QUOTED:N++,DOCTYPE:N++,DOCTYPE_QUOTED:N++,DOCTYPE_DTD:N++,DOCTYPE_DTD_QUOTED:N++,COMMENT_STARTING:N++,COMMENT:N++,COMMENT_ENDING:N++,COMMENT_ENDED:N++,CDATA:N++,CDATA_ENDING:N++,CDATA_ENDING_2:N++,PROC_INST:N++,PROC_INST_BODY:N++,PROC_INST_ENDING:N++,OPEN_TAG:N++,OPEN_TAG_SLASH:N++,ATTRIB:N++,ATTRIB_NAME:N++,ATTRIB_NAME_SAW_WHITE:N++,ATTRIB_VALUE:N++,ATTRIB_VALUE_QUOTED:N++,ATTRIB_VALUE_CLOSED:N++,ATTRIB_VALUE_UNQUOTED:N++,ATTRIB_VALUE_ENTITY_Q:N++,ATTRIB_VALUE_ENTITY_U:N++,CLOSE_TAG:N++,CLOSE_TAG_SAW_WHITE:N++,SCRIPT:N++,SCRIPT_ENDING:N++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach((function(e){var n=t.ENTITIES[e],r="number"==typeof n?String.fromCharCode(n):n;t.ENTITIES[e]=r})),t.STATE)t.STATE[t.STATE[A]]=A;function I(t,e,n){t[e]&&t[e](n)}function O(t,e,n){t.textNode&&x(t),I(t,e,n)}function x(t){t.textNode=_(t.opt,t.textNode),t.textNode&&I(t,"ontext",t.textNode),t.textNode=""}function _(t,e){return t.trim&&(e=e.trim()),t.normalize&&(e=e.replace(/\s+/g," ")),e}function P(t,e){return x(t),t.trackPosition&&(e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c),e=new Error(e),t.error=e,I(t,"onerror",e),t}function S(t){return t.sawRoot&&!t.closedRoot&&C(t,"Unclosed root tag"),t.state!==N.BEGIN&&t.state!==N.BEGIN_WHITESPACE&&t.state!==N.TEXT&&P(t,"Unexpected end"),x(t),t.c="",t.closed=!0,I(t,"onend"),r.call(t,t.strict,t.opt),t}function C(t,e){if("object"!=typeof t||!(t instanceof r))throw new Error("bad call to strictFail");t.strict&&P(t,e)}function R(t){t.strict||(t.tagName=t.tagName[t.looseCase]());var e=t.tags[t.tags.length-1]||t,n=t.tag={name:t.tagName,attributes:{}};t.opt.xmlns&&(n.ns=e.ns),t.attribList.length=0,O(t,"onopentagstart",n)}function L(t,e){var n=t.indexOf(":")<0?["",t]:t.split(":"),r=n[0],i=n[1];return e&&"xmlns"===t&&(r="xmlns",i=""),{prefix:r,local:i}}function D(t){if(t.strict||(t.attribName=t.attribName[t.looseCase]()),-1!==t.attribList.indexOf(t.attribName)||t.tag.attributes.hasOwnProperty(t.attribName))t.attribName=t.attribValue="";else{if(t.opt.xmlns){var e=L(t.attribName,!0),n=e.prefix,r=e.local;if("xmlns"===n)if("xml"===r&&t.attribValue!==c)C(t,"xml: prefix must be bound to "+c+"\nActual: "+t.attribValue);else if("xmlns"===r&&t.attribValue!==u)C(t,"xmlns: prefix must be bound to "+u+"\nActual: "+t.attribValue);else{var i=t.tag,o=t.tags[t.tags.length-1]||t;i.ns===o.ns&&(i.ns=Object.create(o.ns)),i.ns[r]=t.attribValue}t.attribList.push([t.attribName,t.attribValue])}else t.tag.attributes[t.attribName]=t.attribValue,O(t,"onattribute",{name:t.attribName,value:t.attribValue});t.attribName=t.attribValue=""}}function $(t,e){if(t.opt.xmlns){var n=t.tag,r=L(t.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(C(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName)),n.uri=r.prefix);var i=t.tags[t.tags.length-1]||t;n.ns&&i.ns!==n.ns&&Object.keys(n.ns).forEach((function(e){O(t,"onopennamespace",{prefix:e,uri:n.ns[e]})}));for(var o=0,s=t.attribList.length;o",t.tagName="",void(t.state=N.SCRIPT);O(t,"onscript",t.script),t.script=""}var e=t.tags.length,n=t.tagName;t.strict||(n=n[t.looseCase]());for(var r=n;e--&&t.tags[e].name!==r;)C(t,"Unexpected close tag");if(e<0)return C(t,"Unmatched closing tag: "+t.tagName),t.textNode+="",void(t.state=N.TEXT);t.tagName=n;for(var i=t.tags.length;i-- >e;){var o=t.tag=t.tags.pop();t.tagName=t.tag.name,O(t,"onclosetag",t.tagName);var s={};for(var a in o.ns)s[a]=o.ns[a];var c=t.tags[t.tags.length-1]||t;t.opt.xmlns&&o.ns!==c.ns&&Object.keys(o.ns).forEach((function(e){var n=o.ns[e];O(t,"onclosenamespace",{prefix:e,uri:n})}))}0===e&&(t.closedRoot=!0),t.tagName=t.attribValue=t.attribName="",t.attribList.length=0,t.state=N.TEXT}function F(t){var e,n=t.entity,r=n.toLowerCase(),i="";return t.ENTITIES[n]?t.ENTITIES[n]:t.ENTITIES[r]?t.ENTITIES[r]:("#"===(n=r).charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),i=(e=parseInt(n,16)).toString(16)):(n=n.slice(1),i=(e=parseInt(n,10)).toString(10))),n=n.replace(/^0+/,""),isNaN(e)||i.toLowerCase()!==n?(C(t,"Invalid character entity"),"&"+t.entity+";"):String.fromCodePoint(e))}function U(t,e){"<"===e?(t.state=N.OPEN_WAKA,t.startTagPosition=t.position):g(e)||(C(t,"Non-whitespace before first tag."),t.textNode=e,t.state=N.TEXT)}function M(t,e){var n="";return e1114111||w(s)!==s)throw RangeError("Invalid code point: "+s);s<=65535?n.push(s):(t=55296+((s-=65536)>>10),e=s%1024+56320,n.push(t,e)),(r+1===i||n.length>16384)&&(o+=b.apply(null,n),n.length=0)}return o},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:T,configurable:!0,writable:!0}):String.fromCodePoint=T)}({}));var li=(t=>(t.ReservedName="reserved name",t.Character="character",t.Extension="extension",t))(li||{});class hi extends Error{constructor(t){super(`Invalid ${t.reason} '${t.segment}' in filename '${t.filename}'`,{cause:t})}get filename(){return this.cause.filename}get reason(){return this.cause.reason}get segment(){return this.cause.segment}}function fi(t){const e=(0,Gr.F)().files,n=e.forbidden_filename_characters??window._oc_config?.forbidden_filenames_characters??["/","\\"];for(const e of n)if(t.includes(e))throw new hi({segment:e,reason:"character",filename:t});if(t=t.toLocaleLowerCase(),(e.forbidden_filenames??[".htaccess"]).includes(t))throw new hi({filename:t,segment:t,reason:"reserved name"});const r=t.indexOf(".",1),i=t.substring(0,-1===r?void 0:r);if((e.forbidden_filename_basenames??[]).includes(i))throw new hi({filename:t,segment:i,reason:"reserved name"});const o=e.forbidden_filename_extensions??[".part",".filepart"];for(const e of o)if(t.length>e.length&&t.endsWith(e))throw new hi({segment:e,reason:"extension",filename:t})}const pi=["B","KB","MB","GB","TB","PB"],di=["B","KiB","MiB","GiB","TiB","PiB"];function gi(t,e=!1,n=!1,r=!1){n=n&&!r,"string"==typeof t&&(t=Number(t));let i=t>0?Math.floor(Math.log(t)/Math.log(r?1e3:1024)):0;i=Math.min((n?di.length:pi.length)-1,i);const o=n?di[i]:pi[i];let s=(t/Math.pow(r?1e3:1024,i)).toFixed(1);return!0===e&&0===i?("0.0"!==s?"< 1 ":"0 ")+(n?di[1]:pi[1]):(s=i<2?parseFloat(s).toFixed(0):parseFloat(s).toLocaleString((0,Vr.lO)()),s+" "+o)}function mi(t){return t instanceof Date?t.toISOString():String(t)}function Ei(t,e={}){const n={sortingMode:"basename",sortingOrder:"asc",...e},r=[...n.sortFavoritesFirst?[t=>1!==t.attributes?.favorite]:[],...n.sortFoldersFirst?[t=>"folder"!==t.type]:[],..."basename"!==n.sortingMode?[t=>t[n.sortingMode]??t.attributes[n.sortingMode]]:[],t=>function(t){const e=t.displayname||t.attributes?.displayname||t.basename||"";return t.type===Er.Folder?e:e.lastIndexOf(".")>0?e.slice(0,e.lastIndexOf(".")):e}(t),t=>t.basename];return function(t,e,n){n=n??[];const r=(e=e??[t=>t]).map(((t,e)=>"asc"===(n[e]??"asc")?1:-1)),i=Intl.Collator([(0,Vr.Z0)(),(0,Vr.lO)()],{numeric:!0,usage:"sort"});return[...t].sort(((t,n)=>{for(const[o,s]of e.entries()){const e=i.compare(mi(s(t)),mi(s(n)));if(0!==e)return e*r[o]}return 0}))}(t,r,[...n.sortFavoritesFirst?["asc"]:[],...n.sortFoldersFirst?["asc"]:[],..."mtime"===n.sortingMode?["asc"===n.sortingOrder?"desc":"asc"]:[],..."mtime"!==n.sortingMode&&"basename"!==n.sortingMode?[n.sortingOrder]:[],n.sortingOrder,n.sortingOrder])}},32505(t,e,n){"use strict";n.d(e,{G:()=>o,f:()=>i});var r=n(81222);function i(){return(0,r.C)("files_sharing","isPublic",null)??null!==document.querySelector('input#isPublic[type="hidden"][name="isPublic"][value="1"]')}function o(){return(0,r.C)("files_sharing","sharingToken",null)??document.querySelector('input#sharingToken[type="hidden"]')?.value??null}},36117(t,e){var n,r;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,n=function(t){"use strict";function e(t,n){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},e(t,n)}function n(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=r(t);if(e){var s=r(this).constructor;n=Reflect.construct(o,arguments,s)}else n=o.apply(this,arguments);return function(t,e){if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0?e.substring(n):""}function a(...t){if(arguments.length<1)return"";const e=t.filter((t=>t.length>0));if(e.length<1)return"";const n=e[e.length-1],r="/"===e[0].charAt(0),i="/"===n.charAt(n.length-1),o=e.reduce(((t,e)=>t.concat(e.split("/"))),[]);let s=!r;const a=o.reduce(((t,e)=>""===e?t:s?(s=!1,t+e):t+"/"+e),"");return i?a+"/":a}n.d(e,{LC:()=>s,O0:()=>r,P8:()=>i,fj:()=>a,pD:()=>o})},82182(t,e,n){"use strict";n.d(e,{A:()=>r.N});var r=n(40959)},83141(t,e,n){"use strict";var r=n(92861).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=c,this.end=u,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=l,this.end=h,e=3;break;default:return this.write=f,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,n=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function c(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function l(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function f(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.I=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(i>0&&(t.lastNeed=i-1),i):--r=0?(i>0&&(t.lastNeed=i-2),i):--r=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},87485(t,e,n){"use strict";n.d(e,{F:()=>i});var r=n(81222);function i(){try{return(0,r.C)("core","capabilities")}catch(t){return console.debug("Could not find capabilities initial state fall back to _oc_capabilities"),"_oc_capabilities"in window?window._oc_capabilities:{}}}},92861(t,e,n){var r=n(48287),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function s(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},s.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}}}]); //# sourceMappingURL=mail.3646.75ddf585075d01e987a8.js.map