f7cloud_client/apps/richdocuments/js/richdocuments-fileActions.js
root 8b6a0139db f7cloud_client
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-17 22:59:26 +00:00

3 lines
213 KiB
JavaScript
Raw Permalink Blame History

/*! For license information please see richdocuments-fileActions.js.LICENSE.txt */
(()=>{var t={59097:(t,e,n)=>{"use strict";e.c0=function(t){return new r.default(t)};var r=o(n(59457)),i=o(n(50432));function o(t){return t&&t.__esModule?t:{default:t}}function s(t,e){Object.keys(t).filter((t=>!e||e(t))).map(t.removeItem.bind(t))}},50432:(t,e)=>{"use strict";function n(t,e,n){var r;return(e="symbol"==typeof(r=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"))?r:r+"")in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;class r{constructor(t,e,i){n(this,"scope",void 0),n(this,"wrapped",void 0),this.scope="".concat(i?r.GLOBAL_SCOPE_PERSISTENT:r.GLOBAL_SCOPE_VOLATILE,"_").concat(btoa(t),"_"),this.wrapped=e}scopeKey(t){return"".concat(this.scope).concat(t)}setItem(t,e){this.wrapped.setItem(this.scopeKey(t),e)}getItem(t){return this.wrapped.getItem(this.scopeKey(t))}removeItem(t){this.wrapped.removeItem(this.scopeKey(t))}clear(){Object.keys(this.wrapped).filter((t=>t.startsWith(this.scope))).map(this.wrapped.removeItem.bind(this.wrapped))}}e.default=r,n(r,"GLOBAL_SCOPE_VOLATILE","f7cloud_vol"),n(r,"GLOBAL_SCOPE_PERSISTENT","f7cloud_per")},59457:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(50432))&&r.__esModule?r:{default:r};function o(t,e,n){var r;return(e="symbol"==typeof(r=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"))?r:r+"")in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}e.default=class{constructor(t){o(this,"appId",void 0),o(this,"persisted",!1),o(this,"clearedOnLogout",!1),this.appId=t}persist(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.persisted=t,this}clearOnLogout(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.clearedOnLogout=t,this}build(){return new i.default(this.appId,this.persisted?window.localStorage:window.sessionStorage,!this.clearedOnLogout)}}},55950:(t,e,n)=>{const r=n(92322),{MAX_LENGTH:i,MAX_SAFE_INTEGER:o}=n(76692),{safeRe:s,safeSrc:a,t:u}=n(15208),c=n(29901),{compareIdentifiers:l}=n(3229);class h{constructor(t,e){if(e=c(e),t instanceof h){if(t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>i)throw new TypeError(`version is longer than ${i} characters`);r("SemVer",t,e),this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease;const n=t.trim().match(e.loose?s[u.LOOSE]:s[u.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((t=>{if(/^[0-9]+$/.test(t)){const e=+t;if(e>=0&&e<o)return e}return t})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(r("SemVer.compare",this.version,this.options,t),!(t instanceof h)){if("string"==typeof t&&t===this.version)return 0;t=new h(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof h||(t=new h(t,this.options)),l(this.major,t.major)||l(this.minor,t.minor)||l(this.patch,t.patch)}comparePre(t){if(t instanceof h||(t=new h(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let e=0;do{const n=this.prerelease[e],i=t.prerelease[e];if(r("prerelease compare",e,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return l(n,i)}while(++e)}compareBuild(t){t instanceof h||(t=new h(t,this.options));let e=0;do{const n=this.build[e],i=t.build[e];if(r("build compare",e,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return l(n,i)}while(++e)}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=new RegExp(`^${this.options.loose?a[u.PRERELEASELOOSE]:a[u.PRERELEASE]}$`),n=`-${e}`.match(t);if(!n||n[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===l(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}}t.exports=h},38064:(t,e,n)=>{const r=n(55950);t.exports=(t,e)=>new r(t,e).major},68690:(t,e,n)=>{const r=n(55950);t.exports=(t,e,n=!1)=>{if(t instanceof r)return t;try{return new r(t,e)}catch(t){if(!n)return null;throw t}}},38711:(t,e,n)=>{const r=n(68690);t.exports=(t,e)=>{const n=r(t,e);return n?n.version:null}},76692:t=>{const e=Number.MAX_SAFE_INTEGER||9007199254740991;t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},92322:(t,e,n)=>{var r=n(65606);const i="object"==typeof r&&r.env&&r.env.NODE_DEBUG&&/\bsemver\b/i.test(r.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};t.exports=i},3229:t=>{const e=/^[0-9]+$/,n=(t,n)=>{const r=e.test(t),i=e.test(n);return r&&i&&(t=+t,n=+n),t===n?0:r&&!i?-1:i&&!r?1:t<n?-1:1};t.exports={compareIdentifiers:n,rcompareIdentifiers:(t,e)=>n(e,t)}},29901:t=>{const e=Object.freeze({loose:!0}),n=Object.freeze({});t.exports=t=>t?"object"!=typeof t?e:t:n},15208:(t,e,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:o}=n(76692),s=n(92322),a=(e=t.exports={}).re=[],u=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],h=e.t={};let f=0;const p="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",o],[p,i]],g=(t,e,n)=>{const r=(t=>{for(const[e,n]of d)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t})(e),i=f++;s(t,i,e),h[t]=i,c[i]=e,l[i]=r,a[i]=new RegExp(e,n?"g":void 0),u[i]=new RegExp(r,n?"g":void 0)};g("NUMERICIDENTIFIER","0|[1-9]\\d*"),g("NUMERICIDENTIFIERLOOSE","\\d+"),g("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),g("MAINVERSION",`(${c[h.NUMERICIDENTIFIER]})\\.(${c[h.NUMERICIDENTIFIER]})\\.(${c[h.NUMERICIDENTIFIER]})`),g("MAINVERSIONLOOSE",`(${c[h.NUMERICIDENTIFIERLOOSE]})\\.(${c[h.NUMERICIDENTIFIERLOOSE]})\\.(${c[h.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASEIDENTIFIER",`(?:${c[h.NUMERICIDENTIFIER]}|${c[h.NONNUMERICIDENTIFIER]})`),g("PRERELEASEIDENTIFIERLOOSE",`(?:${c[h.NUMERICIDENTIFIERLOOSE]}|${c[h.NONNUMERICIDENTIFIER]})`),g("PRERELEASE",`(?:-(${c[h.PRERELEASEIDENTIFIER]}(?:\\.${c[h.PRERELEASEIDENTIFIER]})*))`),g("PRERELEASELOOSE",`(?:-?(${c[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[h.PRERELEASEIDENTIFIERLOOSE]})*))`),g("BUILDIDENTIFIER",`${p}+`),g("BUILD",`(?:\\+(${c[h.BUILDIDENTIFIER]}(?:\\.${c[h.BUILDIDENTIFIER]})*))`),g("FULLPLAIN",`v?${c[h.MAINVERSION]}${c[h.PRERELEASE]}?${c[h.BUILD]}?`),g("FULL",`^${c[h.FULLPLAIN]}$`),g("LOOSEPLAIN",`[v=\\s]*${c[h.MAINVERSIONLOOSE]}${c[h.PRERELEASELOOSE]}?${c[h.BUILD]}?`),g("LOOSE",`^${c[h.LOOSEPLAIN]}$`),g("GTLT","((?:<|>)?=?)"),g("XRANGEIDENTIFIERLOOSE",`${c[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),g("XRANGEIDENTIFIER",`${c[h.NUMERICIDENTIFIER]}|x|X|\\*`),g("XRANGEPLAIN",`[v=\\s]*(${c[h.XRANGEIDENTIFIER]})(?:\\.(${c[h.XRANGEIDENTIFIER]})(?:\\.(${c[h.XRANGEIDENTIFIER]})(?:${c[h.PRERELEASE]})?${c[h.BUILD]}?)?)?`),g("XRANGEPLAINLOOSE",`[v=\\s]*(${c[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[h.XRANGEIDENTIFIERLOOSE]})(?:${c[h.PRERELEASELOOSE]})?${c[h.BUILD]}?)?)?`),g("XRANGE",`^${c[h.GTLT]}\\s*${c[h.XRANGEPLAIN]}$`),g("XRANGELOOSE",`^${c[h.GTLT]}\\s*${c[h.XRANGEPLAINLOOSE]}$`),g("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),g("COERCE",`${c[h.COERCEPLAIN]}(?:$|[^\\d])`),g("COERCEFULL",c[h.COERCEPLAIN]+`(?:${c[h.PRERELEASE]})?`+`(?:${c[h.BUILD]})?(?:$|[^\\d])`),g("COERCERTL",c[h.COERCE],!0),g("COERCERTLFULL",c[h.COERCEFULL],!0),g("LONETILDE","(?:~>?)"),g("TILDETRIM",`(\\s*)${c[h.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",g("TILDE",`^${c[h.LONETILDE]}${c[h.XRANGEPLAIN]}$`),g("TILDELOOSE",`^${c[h.LONETILDE]}${c[h.XRANGEPLAINLOOSE]}$`),g("LONECARET","(?:\\^)"),g("CARETTRIM",`(\\s*)${c[h.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",g("CARET",`^${c[h.LONECARET]}${c[h.XRANGEPLAIN]}$`),g("CARETLOOSE",`^${c[h.LONECARET]}${c[h.XRANGEPLAINLOOSE]}$`),g("COMPARATORLOOSE",`^${c[h.GTLT]}\\s*(${c[h.LOOSEPLAIN]})$|^$`),g("COMPARATOR",`^${c[h.GTLT]}\\s*(${c[h.FULLPLAIN]})$|^$`),g("COMPARATORTRIM",`(\\s*)${c[h.GTLT]}\\s*(${c[h.LOOSEPLAIN]}|${c[h.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",g("HYPHENRANGE",`^\\s*(${c[h.XRANGEPLAIN]})\\s+-\\s+(${c[h.XRANGEPLAIN]})\\s*$`),g("HYPHENRANGELOOSE",`^\\s*(${c[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[h.XRANGEPLAINLOOSE]})\\s*$`),g("STAR","(<|>)?=?\\s*\\*"),g("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),g("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},67526:(t,e)=>{"use strict";e.byteLength=function(t){var e=a(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,o=a(t),s=o[0],u=o[1],c=new i(function(t,e,n){return 3*(e+n)/4-n}(0,s,u)),l=0,h=u>0?s-4:s;for(n=0;n<h;n+=4)e=r[t.charCodeAt(n)]<<18|r[t.charCodeAt(n+1)]<<12|r[t.charCodeAt(n+2)]<<6|r[t.charCodeAt(n+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;2===u&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,c[l++]=255&e);1===u&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e);return c},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=16383,a=0,c=r-i;a<c;a+=s)o.push(u(t,a,a+s>c?c:a+s));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=o[s],r[o.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function u(t,e,r){for(var i,o,s=[],a=e;a<r;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},48287:(t,e,n)=>{"use strict";const r=n(67526),i=n(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return c(t,e,n)}function c(t,e,n){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|g(t,e);let r=a(n);const i=r.write(t,e);i!==n&&(r=r.slice(0,i));return r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(q(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(q(t,ArrayBuffer)||t&&q(t.buffer,ArrayBuffer))return p(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(q(t,SharedArrayBuffer)||t&&q(t.buffer,SharedArrayBuffer)))return p(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return u.from(r,e,n);const i=function(t){if(u.isBuffer(t)){const e=0|d(t.length),n=a(e);return 0===n.length||t.copy(n,0,0,e),n}if(void 0!==t.length)return"number"!=typeof t.length||Z(t.length)?a(0):f(t);if("Buffer"===t.type&&Array.isArray(t.data))return f(t.data)}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return l(t),a(t<0?0:0|d(t))}function f(t){const e=t.length<0?0:0|d(t.length),n=a(e);for(let r=0;r<e;r+=1)n[r]=255&t[r];return n}function p(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Object.setPrototypeOf(r,u.prototype),r}function d(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function g(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||q(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(t).length;default:if(i)return r?-1:H(t).length;e=(""+e).toLowerCase(),i=!0}}function m(t,e,n){let r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,e,n);case"utf8":case"utf-8":return O(this,e,n);case"ascii":return _(this,e,n);case"latin1":case"binary":return S(this,e,n);case"base64":return I(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function E(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function y(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Z(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:b(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):b(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,n,r,i){let o,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let r=-1;for(o=n;o<a;o++)if(c(t,o)===c(e,-1===r?0:o-r)){if(-1===r&&(r=o),o-r+1===u)return r*s}else-1!==r&&(o-=o-r),r=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){let n=!0;for(let r=0;r<u;r++)if(c(t,o+r)!==c(e,r)){n=!1;break}if(n)return o}return-1}function v(t,e,n,r){n=Number(n)||0;const i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;const o=e.length;let s;for(r>o/2&&(r=o/2),s=0;s<r;++s){const r=parseInt(e.substr(2*s,2),16);if(Z(r))return s;t[n+s]=r}return s}function w(t,e,n,r){return Y(H(e,t.length-n),t,n,r)}function T(t,e,n,r){return Y(function(t){const e=[];for(let n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function N(t,e,n,r){return Y(W(e),t,n,r)}function A(t,e,n,r){return Y(function(t,e){let n,r,i;const o=[];for(let s=0;s<t.length&&!((e-=2)<0);++s)n=t.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function I(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function O(t,e,n){n=Math.min(t.length,n);const r=[];let i=e;for(;i<n;){const e=t[i];let o=null,s=e>239?4:e>223?3:e>191?2:1;if(i+s<=n){let n,r,a,u;switch(s){case 1:e<128&&(o=e);break;case 2:n=t[i+1],128==(192&n)&&(u=(31&e)<<6|63&n,u>127&&(o=u));break;case 3:n=t[i+1],r=t[i+2],128==(192&n)&&128==(192&r)&&(u=(15&e)<<12|(63&n)<<6|63&r,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:n=t[i+1],r=t[i+2],a=t[i+3],128==(192&n)&&128==(192&r)&&128==(192&a)&&(u=(15&e)<<18|(63&n)<<12|(63&r)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return function(t){const e=t.length;if(e<=R)return String.fromCharCode.apply(String,t);let n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=R));return n}(r)}e.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,n){return c(t,e,n)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,n){return function(t,e,n){return l(t),t<=0?a(t):void 0!==e?"string"==typeof n?a(t).fill(e,n):a(t).fill(e):a(t)}(t,e,n)},u.allocUnsafe=function(t){return h(t)},u.allocUnsafeSlow=function(t){return h(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(q(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),q(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,r=e.length;for(let i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);let n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;const r=u.allocUnsafe(e);let i=0;for(n=0;n<t.length;++n){let e=t[n];if(q(e,Uint8Array))i+e.length>r.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(r,i)):Uint8Array.prototype.set.call(r,e,i);else{if(!u.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(r,i)}i+=e.length}return r},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)E(this,e,e+1);return this},u.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)E(this,e,e+3),E(this,e+1,e+2);return this},u.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)E(this,e,e+7),E(this,e+1,e+6),E(this,e+2,e+5),E(this,e+3,e+4);return this},u.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?O(this,0,t):m.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){let t="";const n=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,n,r,i){if(q(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;let o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0);const a=Math.min(o,s),c=this.slice(r,i),l=t.slice(e,n);for(let t=0;t<a;++t)if(c[t]!==l[t]){o=c[t],s=l[t];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return y(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return y(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return v(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":case"latin1":case"binary":return T(this,t,e,n);case"base64":return N(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function _(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function S(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function L(t,e,n){const r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=e;r<n;++r)i+=Q[t[r]];return i}function x(t,e,n){const r=t.slice(e,n);let i="";for(let t=0;t<r.length-1;t+=2)i+=String.fromCharCode(r[t]+256*r[t+1]);return i}function C(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function P(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function D(t,e,n,r,i){G(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s,n}function $(t,e,n,r,i){G(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n+7]=o,o>>=8,t[n+6]=o,o>>=8,t[n+5]=o,o>>=8,t[n+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=s,s>>=8,t[n+2]=s,s>>=8,t[n+1]=s,s>>=8,t[n]=s,n+8}function U(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(t,e,n,r,o){return e=+e,n>>>=0,o||U(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function F(t,e,n,r,o){return e=+e,n>>>=0,o||U(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);const r=this.subarray(t,e);return Object.setPrototypeOf(r,u.prototype),r},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||C(t,e,this.length);let r=this[t],i=1,o=0;for(;++o<e&&(i*=256);)r+=this[t+o]*i;return r},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||C(t,e,this.length);let r=this[t+--e],i=1;for(;e>0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||C(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=K((function(t){V(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||z(t,this.length-8);const r=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=K((function(t){V(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||z(t,this.length-8);const r=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||C(t,e,this.length);let r=this[t],i=1,o=0;for(;++o<e&&(i*=256);)r+=this[t+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||C(t,e,this.length);let r=e,i=1,o=this[t+--r];for(;r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return t>>>=0,e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||C(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){t>>>=0,e||C(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=K((function(t){V(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||z(t,this.length-8);const r=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),u.prototype.readBigInt64BE=K((function(t){V(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||z(t,this.length-8);const r=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(r)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+n)})),u.prototype.readFloatLE=function(t,e){return t>>>=0,e||C(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||C(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||C(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||C(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e>>>=0,n>>>=0,!r){P(this,t,e,n,Math.pow(2,8*n)-1,0)}let i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,n,r){if(t=+t,e>>>=0,n>>>=0,!r){P(this,t,e,n,Math.pow(2,8*n)-1,0)}let i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||P(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||P(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||P(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||P(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||P(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=K((function(t,e=0){return D(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=K((function(t,e=0){return $(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);P(this,t,e,n,r-1,-r)}let i=0,o=1,s=0;for(this[e]=255&t;++i<n&&(o*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/o|0)-s&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);P(this,t,e,n,r-1,-r)}let i=n-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o|0)-s&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||P(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||P(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||P(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||P(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=K((function(t,e=0){return D(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=K((function(t,e=0){return $(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(t,e,n){return M(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return M(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return F(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return F(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);const i=r-n;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,n,r):Uint8Array.prototype.set.call(t,this.subarray(n,r),e),i},u.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){const e=t.charCodeAt(0);("utf8"===r&&e<128||"latin1"===r)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;let i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{const o=u.isBuffer(t)?t:u.from(t,r),s=o.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<n-e;++i)this[i+e]=o[i%s]}return this};const j={};function k(t,e,n){j[t]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function B(t){let e="",n=t.length;const r="-"===t[0]?1:0;for(;n>=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function G(t,e,n,r,i,o){if(t>n||t<e){const r="bigint"==typeof e?"n":"";let i;throw i=o>3?0===e||e===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${e}${r} and <= ${n}${r}`,new j.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,n){V(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||z(e,t.length-(n+1))}(r,i,o)}function V(t,e){if("number"!=typeof t)throw new j.ERR_INVALID_ARG_TYPE(e,"number",t)}function z(t,e,n){if(Math.floor(t)!==t)throw V(t,n),new j.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new j.ERR_BUFFER_OUT_OF_BOUNDS;throw new j.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}k("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),k("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),k("ERR_OUT_OF_RANGE",(function(t,e,n){let r=`The value of "${t}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=B(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=B(i)),i+="n"),r+=` It must be ${e}. Received ${i}`,r}),RangeError);const X=/[^+/0-9A-Za-z-_]/g;function H(t,e){let n;e=e||1/0;const r=t.length;let i=null;const o=[];for(let s=0;s<r;++s){if(n=t.charCodeAt(s),n>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function W(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(X,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Y(t,e,n,r){let i;for(i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Z(t){return t!=t}const Q=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)e[r+i]=t[n]+t[i]}return e}();function K(t){return"undefined"==typeof BigInt?J:t}function J(){throw new Error("BigInt not supported")}},36117:function(t,e){var n,r,i;function o(t){return o="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},o(t)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[e],n=function(t){"use strict";function e(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&n(t,e)}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}function r(t){var e=a();return function(){var n,r=u(t);if(e){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return i(this,n)}}function i(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return s(t)}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function a(){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}}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function c(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=l(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,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function l(t,e){if(t){if("string"==typeof t)return h(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)?h(t,e):void 0}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function d(t,e,n){return e&&p(t.prototype,e),n&&p(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m(t,e,n){E(t,e),e.set(t,n)}function E(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function y(t,e){return b(t,w(t,e,"get"))}function b(t,e){return e.get?e.get.call(t):e.value}function v(t,e,n){return T(t,w(t,e,"set"),n),n}function w(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function T(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}Object.defineProperty(t,"__esModule",{value:!0}),t.CancelablePromise=void 0,t.cancelable=S,t.default=void 0,t.isCancelablePromise=L;var N="undefined"!=typeof Symbol?Symbol.toStringTag:"@@toStringTag",A=new WeakMap,I=new WeakMap,O=function(){function t(e){var n=e.executor,r=void 0===n?function(){}:n,i=e.internals,o=void 0===i?D():i,s=e.promise,a=void 0===s?new Promise((function(t,e){return r(t,e,(function(t){o.onCancelList.push(t)}))})):s;f(this,t),m(this,A,{writable:!0,value:void 0}),m(this,I,{writable:!0,value:void 0}),g(this,N,"CancelablePromise"),this.cancel=this.cancel.bind(this),v(this,A,o),v(this,I,a||new Promise((function(t,e){return r(t,e,(function(t){o.onCancelList.push(t)}))})))}return d(t,[{key:"then",value:function(t,e){return C(y(this,I).then(x(t,y(this,A)),x(e,y(this,A))),y(this,A))}},{key:"catch",value:function(t){return C(y(this,I).catch(x(t,y(this,A))),y(this,A))}},{key:"finally",value:function(t,e){var n=this;return e&&y(this,A).onCancelList.push(t),C(y(this,I).finally(x((function(){if(t)return e&&(y(n,A).onCancelList=y(n,A).onCancelList.filter((function(e){return e!==t}))),t()}),y(this,A))),y(this,A))}},{key:"cancel",value:function(){y(this,A).isCanceled=!0;var t=y(this,A).onCancelList;y(this,A).onCancelList=[];var e,n=c(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if("function"==typeof r)try{r()}catch(t){console.error(t)}}}catch(t){n.e(t)}finally{n.f()}}},{key:"isCanceled",value:function(){return!0===y(this,A).isCanceled}}]),t}(),R=function(t){e(i,t);var n=r(i);function i(t){return f(this,i),n.call(this,{executor:t})}return d(i)}(O);t.CancelablePromise=R,g(R,"all",(function(t){return P(t,Promise.all(t))})),g(R,"allSettled",(function(t){return P(t,Promise.allSettled(t))})),g(R,"any",(function(t){return P(t,Promise.any(t))})),g(R,"race",(function(t){return P(t,Promise.race(t))})),g(R,"resolve",(function(t){return S(Promise.resolve(t))})),g(R,"reject",(function(t){return S(Promise.reject(t))})),g(R,"isCancelable",L);var _=R;function S(t){return C(t,D())}function L(t){return t instanceof R||t instanceof O}function x(t,e){if(t)return function(n){if(!e.isCanceled){var r=t(n);return L(r)&&e.onCancelList.push(r.cancel),r}return n}}function C(t,e){return new O({internals:e,promise:t})}function P(t,e){var n=D();return n.onCancelList.push((function(){var e,n=c(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;L(r)&&r.cancel()}}catch(t){n.e(t)}finally{n.f()}})),new O({internals:n,promise:e})}function D(){return{isCanceled:!1,onCancelList:[]}}t.default=_},void 0===(i="function"==typeof n?n.apply(e,r):n)||(t.exports=i)},70580:t=>{"use strict";var e=/["'&<>]/;t.exports=function(t){var n,r=""+t,i=e.exec(r);if(!i)return r;var o="",s=0,a=0;for(s=i.index;s<r.length;s++){switch(r.charCodeAt(s)){case 34:n="&quot;";break;case 38:n="&amp;";break;case 39:n="&#39;";break;case 60:n="&lt;";break;case 62:n="&gt;";break;default:continue}a!==s&&(o+=r.substring(a,s)),a=s+1,o+=n}return a!==s?o+r.substring(a,s):o}},251:(t,e)=>{e.read=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,l=-7,h=n?i-1:0,f=n?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+h],h+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+t[e+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[n+p]=255&s,p+=d,s/=256,c-=8);t[n+p-d]|=128*g}},57975:(t,e,n)=>{"use strict";var r=n(65606);function i(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function o(t,e){for(var n,r="",i=0,o=-1,s=0,a=0;a<=t.length;++a){if(a<t.length)n=t.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(o===a-1||1===s);else if(o!==a-1&&2===s){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var u=r.lastIndexOf("/");if(u!==r.length-1){-1===u?(r="",i=0):i=(r=r.slice(0,u)).length-1-r.lastIndexOf("/"),o=a,s=0;continue}}else if(2===r.length||1===r.length){r="",i=0,o=a,s=0;continue}e&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+t.slice(o+1,a):r=t.slice(o+1,a),i=a-o-1;o=a,s=0}else 46===n&&-1!==s?++s:s=-1}return r}var s={resolve:function(){for(var t,e="",n=!1,s=arguments.length-1;s>=-1&&!n;s--){var a;s>=0?a=arguments[s]:(void 0===t&&(t=r.cwd()),a=t),i(a),0!==a.length&&(e=a+"/"+e,n=47===a.charCodeAt(0))}return e=o(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(i(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=o(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return i(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];i(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":s.normalize(t)},relative:function(t,e){if(i(t),i(e),t===e)return"";if((t=s.resolve(t))===(e=s.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var r=t.length,o=r-n,a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var u=e.length-a,c=o<u?o:u,l=-1,h=0;h<=c;++h){if(h===c){if(u>c){if(47===e.charCodeAt(a+h))return e.slice(a+h+1);if(0===h)return e.slice(a+h)}else o>c&&(47===t.charCodeAt(n+h)?l=h:0===h&&(l=0));break}var f=t.charCodeAt(n+h);if(f!==e.charCodeAt(a+h))break;47===f&&(l=h)}var p="";for(h=n+l+1;h<=r;++h)h!==r&&47!==t.charCodeAt(h)||(0===p.length?p+="..":p+="/..");return p.length>0?p+e.slice(a+l):(a+=l,47===e.charCodeAt(a)&&++a,e.slice(a))},_makeLong:function(t){return t},dirname:function(t){if(i(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,r=-1,o=!0,s=t.length-1;s>=1;--s)if(47===(e=t.charCodeAt(s))){if(!o){r=s;break}}else o=!1;return-1===r?n?"/":".":n&&1===r?"//":t.slice(0,r)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');i(t);var n,r=0,o=-1,s=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var a=e.length-1,u=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!s){r=n+1;break}}else-1===u&&(s=!1,u=n+1),a>=0&&(c===e.charCodeAt(a)?-1==--a&&(o=n):(a=-1,o=u))}return r===o?o=u:-1===o&&(o=t.length),t.slice(r,o)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!s){r=n+1;break}}else-1===o&&(s=!1,o=n+1);return-1===o?"":t.slice(r,o)},extname:function(t){i(t);for(var e=-1,n=0,r=-1,o=!0,s=0,a=t.length-1;a>=0;--a){var u=t.charCodeAt(a);if(47!==u)-1===r&&(o=!1,r=a+1),46===u?-1===e?e=a:1!==s&&(s=1):-1!==e&&(s=-1);else if(!o){n=a+1;break}}return-1===e||-1===r||0===s||1===s&&e===r-1&&e===n+1?"":t.slice(e,r)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+t+r:r}("/",t)},parse:function(t){i(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,r=t.charCodeAt(0),o=47===r;o?(e.root="/",n=1):n=0;for(var s=-1,a=0,u=-1,c=!0,l=t.length-1,h=0;l>=n;--l)if(47!==(r=t.charCodeAt(l)))-1===u&&(c=!1,u=l+1),46===r?-1===s?s=l:1!==h&&(h=1):-1!==s&&(h=-1);else if(!c){a=l+1;break}return-1===s||-1===u||0===h||1===h&&s===u-1&&s===a+1?-1!==u&&(e.base=e.name=0===a&&o?t.slice(1,u):t.slice(a,u)):(0===a&&o?(e.name=t.slice(1,s),e.base=t.slice(1,u)):(e.name=t.slice(a,s),e.base=t.slice(a,u)),e.ext=t.slice(s,u)),a>0?e.dir=t.slice(0,a-1):o&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};s.posix=s,t.exports=s},65606:t=>{var e,n,r=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var a,u=[],c=!1,l=-1;function h(){c&&a&&(c=!1,a.length?u=a.concat(u):l=-1,u.length&&f())}function f(){if(!c){var t=s(h);c=!0;for(var e=u.length;e;){for(a=u,u=[];++l<e;)a&&a[l].run();l=-1,e=u.length}a=null,c=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{return n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function d(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new p(t,e)),1!==u.length||c||s(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=d,r.addListener=d,r.once=d,r.off=d,r.removeListener=d,r.removeAllListeners=d,r.emit=d,r.prependListener=d,r.prependOnceListener=d,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},83141:(t,e,n)=>{"use strict";var r=n(15003).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=u,this.end=c,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,"<22>";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"<22>";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"<22>"}}(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 u(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 c(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<t.length?e?e+this.text(t,n):this.text(t,n):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"<22>":e},o.prototype.text=function(t,e){var n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var i=s(e[r]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if(i=s(e[r]),i>=0)return i>0&&(t.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if(i=s(e[r]),i>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 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}},15003:(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)}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}(()=>{"use strict";var t=n(38711),e=n(38064);class r{bus;constructor(n){"function"==typeof n.getVersion&&t(n.getVersion())?e(n.getVersion())!==e(this.getVersion())&&console.warn("Proxying an event bus of version "+n.getVersion()+" with "+this.getVersion()):console.warn("Proxying an event bus with an unknown or invalid version"),this.bus=n}getVersion(){return"3.3.2"}subscribe(t,e){this.bus.subscribe(t,e)}unsubscribe(t,e){this.bus.unsubscribe(t,e)}emit(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.bus.emit(t,...n)}}class i{handlers=(()=>new Map)();getVersion(){return"3.3.2"}subscribe(t,e){this.handlers.set(t,(this.handlers.get(t)||[]).concat(e))}unsubscribe(t,e){this.handlers.set(t,(this.handlers.get(t)||[]).filter((t=>t!==e)))}emit(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];(this.handlers.get(t)||[]).forEach((t=>{try{t(n[0])}catch(t){console.error("could not invoke event listener",t)}}))}}let o=null;function s(){return null!==o?o:"undefined"==typeof window?new Proxy({},{get:()=>()=>console.error("Window not available, EventBus can not be established!")}):(window.OC?._eventBus&&void 0===window._nc_event_bus&&(console.warn("found old event bus instance at OC._eventBus. Update your version!"),window._nc_event_bus=window.OC._eventBus),o=void 0!==window?._nc_event_bus?new r(window._nc_event_bus):window._nc_event_bus=new i,o)}var a=n(59097);let u;const c=[];var l,h;l="csrf-token-update",h=t=>{u=t.token,c.forEach((t=>{try{t(u)}catch(t){console.error("Error updating CSRF token observer",t)}}))},s().subscribe(l,h);(0,a.c0)("public").persist().build();let f;function p(t,e){return t?t.getAttribute(e):null}function d(){if(void 0!==f)return f;const t=document?.getElementsByTagName("head")[0];if(!t)return null;const e=p(t,"data-user");return null===e?(f=null,f):(f={uid:e,displayName:p(t,"data-user-displayname"),isAdmin:!!window._oc_isadmin},f)}function g(t,e,n){const r=document.querySelector(`#initial-state-${t}-${e}`);if(null===r){if(void 0!==n)return n;throw new Error(`Could not find initial state ${e} of ${t}`)}try{return JSON.parse(atob(r.value))}catch(n){throw new Error(`Could not parse initial state ${e} of ${t}`)}}function m(){return g("files_sharing","isPublic",null)??null!==document.querySelector('input#isPublic[type="hidden"][name="isPublic"][value="1"]')}const E=()=>window.location.protocol+"//"+window.location.host+y();function y(){let t=window._oc_webroot;if(typeof t>"u"){t=location.pathname;const e=t.indexOf("/index.php/");if(-1!==e)t=t.slice(0,e);else{const e=t.indexOf("/",1);t=t.slice(0,e>0?e:void 0)}}return t}n(36117);var b=n(65606),v={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,u=n.indexOf(t),c=n.indexOf(e,u+1),l=u;if(u>=0&&c>0){for(r=[],o=n.length;l>=0&&!a;)l==u?(r.push(l),u=n.indexOf(t,l+1)):1==r.length?a=[r.pop(),c]:((i=r.pop())<o&&(o=i,s=c),c=n.indexOf(e,l+1)),l=u<c&&u>=0?u:c;r.length&&(a=[o,s])}return a}t.exports=e,e.range=r},101:function(t,e,n){var r;t=n.nmd(t),function(){var i=(t&&t.exports,"object"==typeof global&&global);i.global!==i&&i.window;var o=function(t){this.message=t};(o.prototype=new Error).name="InvalidCharacterError";var s=function(t){throw new o(t)},a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=/[\t\n\f\r ]/g,c={encode:function(t){t=String(t),/[^\0-\xFF]/.test(t)&&s("The string to be encoded contains characters outside of the Latin1 range.");for(var e,n,r,i,o=t.length%3,u="",c=-1,l=t.length-o;++c<l;)e=t.charCodeAt(c)<<16,n=t.charCodeAt(++c)<<8,r=t.charCodeAt(++c),u+=a.charAt((i=e+n+r)>>18&63)+a.charAt(i>>12&63)+a.charAt(i>>6&63)+a.charAt(63&i);return 2==o?(e=t.charCodeAt(c)<<8,n=t.charCodeAt(++c),u+=a.charAt((i=e+n)>>10)+a.charAt(i>>4&63)+a.charAt(i<<2&63)+"="):1==o&&(i=t.charCodeAt(c),u+=a.charAt(i>>2)+a.charAt(i<<4&63)+"=="),u},decode:function(t){var e=(t=String(t).replace(u,"")).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="",c=-1;++c<e;)r=a.indexOf(t.charAt(c)),n=i%4?64*n+r:r,i++%4&&(o+=String.fromCharCode(255&n>>(-2*i&6)));return o},version:"1.0.0"};void 0===(r=function(){return c}.call(e,n,e,t))||(t.exports=r)}()},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<r&&r<=2047?e++:2047<r&&r<=65535&&(e+=2)}return e}},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<t.length;n++)e.push(255&t.charCodeAt(n));return e},bytesToString:function(t){for(var e=[],n=0;n<t.length;n++)e.push(String.fromCharCode(t[n]));return e.join("")}}};t.exports=e},298:t=>{var e,n;e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(t,e){return t<<e|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;e<t.length;e++)t[e]=n.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],n=0,r=0;n<t.length;n++,r+=8)e[r>>>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<t.length;n++)e.push((t[n]>>>4).toString(16)),e.push((15&t[n]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],n=0;n<t.length;n+=2)e.push(parseInt(t.substr(n,2),16));return e},bytesToBase64:function(t){for(var n=[],r=0;r<t.length;r+=3)for(var i=t[r]<<16|t[r+1]<<8|t[r+2],o=0;o<4;o++)8*r+6*o<=8*t.length?n.push(e.charAt(i>>>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<t.length;i=++r%4)0!=i&&n.push((e.indexOf(t.charAt(r-1))&Math.pow(2,-2*i+8)-1)<<2*i|e.indexOf(t.charAt(r))>>>6-2*i);return n}},t.exports=n},635:(t,e,n)=>{const r=n(31),i=n(338),o=n(221);t.exports={XMLParser:i,XMLValidator:r,XMLBuilder:o}},118:t=>{t.exports=function(t){return"function"==typeof t?t:Array.isArray(t)?e=>{for(const n of t){if("string"==typeof n&&e===n)return!0;if(n instanceof RegExp&&n.test(e))return!0}}:()=>!1}},705:(t,e)=>{const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r="["+n+"]["+n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=new RegExp("^"+r+"$");e.isExist=function(t){return void 0!==t},e.isEmptyObject=function(t){return 0===Object.keys(t).length},e.merge=function(t,e,n){if(e){const r=Object.keys(e),i=r.length;for(let o=0;o<i;o++)t[r[o]]="strict"===n?[e[r[o]]]:e[r[o]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(t){return!(null==i.exec(t))},e.getAllMatches=function(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;t<o;t++)i.push(r[t]);n.push(i),r=e.exec(t)}return n},e.nameRegexp=r},31:(t,e,n)=>{const r=n(705),i={allowBooleanAttributes:!1,unpairedTags:[]};function o(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function s(t,e){const n=e;for(;e<t.length;e++)if("?"!=t[e]&&" "!=t[e]);else{const r=t.substr(n,e-n);if(e>5&&"xml"===r)return d("InvalidXml","XML declaration allowed only at the start of the document.",m(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function a(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e<t.length;e++)if("<"===t[e])n++;else if(">"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e<t.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}e.validate=function(t,e){e=Object.assign({},i,e);const n=[];let u=!1,c=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let i=0;i<t.length;i++)if("<"===t[i]&&"?"===t[i+1]){if(i+=2,i=s(t,i),i.err)return i}else{if("<"!==t[i]){if(o(t[i]))continue;return d("InvalidChar","char '"+t[i]+"' is not expected.",m(t,i))}{let g=i;if(i++,"!"===t[i]){i=a(t,i);continue}{let E=!1;"/"===t[i]&&(E=!0,i++);let y="";for(;i<t.length&&">"!==t[i]&&" "!==t[i]&&"\t"!==t[i]&&"\n"!==t[i]&&"\r"!==t[i];i++)y+=t[i];if(y=y.trim(),"/"===y[y.length-1]&&(y=y.substring(0,y.length-1),i--),h=y,!r.isName(h)){let e;return e=0===y.trim().length?"Invalid space after '<'.":"Tag '"+y+"' is an invalid name.",d("InvalidTag",e,m(t,i))}const b=l(t,i);if(!1===b)return d("InvalidAttr","Attributes for '"+y+"' have open quote.",m(t,i));let v=b.value;if(i=b.index,"/"===v[v.length-1]){const n=i-v.length;v=v.substring(0,v.length-1);const r=f(v,e);if(!0!==r)return d(r.err.code,r.err.msg,m(t,n+r.err.line));u=!0}else if(E){if(!b.tagClosed)return d("InvalidTag","Closing tag '"+y+"' doesn't have proper closing.",m(t,i));if(v.trim().length>0)return d("InvalidTag","Closing tag '"+y+"' can't have attributes or invalid starting.",m(t,g));if(0===n.length)return d("InvalidTag","Closing tag '"+y+"' has not been opened.",m(t,g));{const e=n.pop();if(y!==e.tagName){let n=m(t,e.tagStartPos);return d("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+y+"'.",m(t,g))}0==n.length&&(c=!0)}}else{const r=f(v,e);if(!0!==r)return d(r.err.code,r.err.msg,m(t,i-v.length+r.err.line));if(!0===c)return d("InvalidXml","Multiple possible root nodes found.",m(t,i));-1!==e.unpairedTags.indexOf(y)||n.push({tagName:y,tagStartPos:g}),u=!0}for(i++;i<t.length;i++)if("<"===t[i]){if("!"===t[i+1]){i++,i=a(t,i);continue}if("?"!==t[i+1])break;if(i=s(t,++i),i.err)return i}else if("&"===t[i]){const e=p(t,i);if(-1==e)return d("InvalidChar","char '&' is not expected.",m(t,i));i=e}else if(!0===c&&!o(t[i]))return d("InvalidXml","Extra text at the end",m(t,i));"<"===t[i]&&i--}}}var h;return u?1==n.length?d("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",m(t,n[0].tagStartPos)):!(n.length>0)||d("InvalidXml","Invalid '"+JSON.stringify(n.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):d("InvalidXml","Start tag expected.",1)};const u='"',c="'";function l(t,e){let n="",r="",i=!1;for(;e<t.length;e++){if(t[e]===u||t[e]===c)""===r?r=t[e]:r!==t[e]||(r="");else if(">"===t[e]&&""===r){i=!0;break}n+=t[e]}return""===r&&{value:n,index:e,tagClosed:i}}const h=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function f(t,e){const n=r.getAllMatches(t,h),i={};for(let t=0;t<n.length;t++){if(0===n[t][1].length)return d("InvalidAttr","Attribute '"+n[t][2]+"' has no space in starting.",E(n[t]));if(void 0!==n[t][3]&&void 0===n[t][4])return d("InvalidAttr","Attribute '"+n[t][2]+"' is without value.",E(n[t]));if(void 0===n[t][3]&&!e.allowBooleanAttributes)return d("InvalidAttr","boolean attribute '"+n[t][2]+"' is not allowed.",E(n[t]));const r=n[t][2];if(!g(r))return d("InvalidAttr","Attribute '"+r+"' is an invalid name.",E(n[t]));if(i.hasOwnProperty(r))return d("InvalidAttr","Attribute '"+r+"' is repeated.",E(n[t]));i[r]=1}return!0}function p(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let n=/\d/;for("x"===t[e]&&(e++,n=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(n))break}return-1}(t,++e);let n=0;for(;e<t.length;e++,n++)if(!(t[e].match(/\w/)&&n<20)){if(";"===t[e])break;return-1}return e}function d(t,e,n){return{err:{code:t,msg:e,line:n.line||n,col:n.col}}}function g(t){return r.isName(t)}function m(t,e){const n=t.substring(0,e).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function E(t){return t.startIndex+t[1].length}},221:(t,e,n)=>{const r=n(87),i=n(118),o={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function s(t){this.options=Object.assign({},o,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=i(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=c),this.processTextOrObjNode=a,this.options.format?(this.indentate=u,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function a(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 u(t){return this.options.indentBy.repeat(t)}function c(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}s.prototype.build=function(t){return this.options.preserveOrder?r(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},s.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)?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 u=0;u<r;u++){const r=t[s][u];if(void 0===r);else if(null===r)"?"===s[0]?i+=this.indentate(e)+"<"+s+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+s+"/"+this.tagEndChar;else if("object"==typeof r)if(this.options.oneListGroup){const t=this.j2x(r,e+1,n.concat(s));o+=t.val,this.options.attributesGroupName&&r.hasOwnProperty(this.options.attributesGroupName)&&(a+=t.attrStr)}else o+=this.processTextOrObjNode(r,s,e,n);else if(this.options.oneListGroup){let t=this.options.tagValueProcessor(s,r);t=this.replaceEntitiesValue(t),o+=t}else o+=this.buildTextValNode(r,s,"",e)}this.options.oneListGroup&&(o=this.buildObjectNode(o,s,a,e)),i+=o}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){const e=Object.keys(t[s]),n=e.length;for(let i=0;i<n;i++)r+=this.buildAttrPairStr(e[i],""+t[s][e[i]])}else i+=this.processTextOrObjNode(t[s],s,e,n);return{attrStr:r,val:i}},s.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},s.prototype.buildObjectNode=function(t,e,n,r){if(""===t)return"?"===e[0]?this.indentate(r)+"<"+e+n+"?"+this.tagEndChar:this.indentate(r)+"<"+e+n+this.closeTag(e)+this.tagEndChar;{let i="</"+e+this.tagEndChar,o="";return"?"===e[0]&&(o="?",i=""),!n&&""!==n||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===o.length?this.indentate(r)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(r)+"<"+e+n+o+this.tagEndChar+t+this.indentate(r)+i:this.indentate(r)+"<"+e+n+o+">"+t+i}},s.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},s.prototype.buildTextValNode=function(t,e,n,r){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(r)+`<![CDATA[${t}]]>`+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+"</"+e+this.tagEndChar}},s.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const n=this.options.entities[e];t=t.replace(n.regex,n.val)}return t},t.exports=s},87:t=>{function e(t,s,a,u){let c="",l=!1;for(let h=0;h<t.length;h++){const f=t[h],p=n(f);if(void 0===p)continue;let d="";if(d=0===a.length?p:`${a}.${p}`,p===s.textNodeName){let t=f[p];i(d,s)||(t=s.tagValueProcessor(p,t),t=o(t,s)),l&&(c+=u),c+=t,l=!1;continue}if(p===s.cdataPropName){l&&(c+=u),c+=`<![CDATA[${f[p][0][s.textNodeName]}]]>`,l=!1;continue}if(p===s.commentPropName){c+=u+`\x3c!--${f[p][0][s.textNodeName]}--\x3e`,l=!0;continue}if("?"===p[0]){const t=r(f[":@"],s),e="?xml"===p?"":u;let n=f[p][0][s.textNodeName];n=0!==n.length?" "+n:"",c+=e+`<${p}${n}${t}?>`,l=!0;continue}let g=u;""!==g&&(g+=s.indentBy);const m=u+`<${p}${r(f[":@"],s)}`,E=e(f[p],s,d,g);-1!==s.unpairedTags.indexOf(p)?s.suppressUnpairedNode?c+=m+">":c+=m+"/>":E&&0!==E.length||!s.suppressEmptyNode?E&&E.endsWith(">")?c+=m+`>${E}${u}</${p}>`:(c+=m+">",E&&""!==u&&(E.includes("/>")||E.includes("</"))?c+=u+s.indentBy+E+u:c+=E,c+=`</${p}>`):c+=m+"/>",l=!0}return c}function n(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const r=e[n];if(t.hasOwnProperty(r)&&":@"!==r)return r}}function r(t,e){let n="";if(t&&!e.ignoreAttributes)for(let r in t){if(!t.hasOwnProperty(r))continue;let i=e.attributeValueProcessor(r,t[r]);i=o(i,e),!0===i&&e.suppressBooleanAttributes?n+=` ${r.substr(e.attributeNamePrefix.length)}`:n+=` ${r.substr(e.attributeNamePrefix.length)}="${i}"`}return n}function i(t,e){let n=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let r in e.stopNodes)if(e.stopNodes[r]===t||e.stopNodes[r]==="*."+n)return!0;return!1}function o(t,e){if(t&&t.length>0&&e.processEntities)for(let n=0;n<e.entities.length;n++){const r=e.entities[n];t=t.replace(r.regex,r.val)}return t}t.exports=function(t,n){let r="";return n.format&&n.indentBy.length>0&&(r="\n"),e(t,n,"",r)}},193:(t,e,n)=>{const r=n(705);function i(t,e){let n="";for(;e<t.length&&"'"!==t[e]&&'"'!==t[e];e++)n+=t[e];if(n=n.trim(),-1!==n.indexOf(" "))throw new Error("External entites are not supported");const r=t[e++];let i="";for(;e<t.length&&t[e]!==r;e++)i+=t[e];return[n,i,e]}function o(t,e){return"!"===t[e+1]&&"-"===t[e+2]&&"-"===t[e+3]}function s(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"N"===t[e+3]&&"T"===t[e+4]&&"I"===t[e+5]&&"T"===t[e+6]&&"Y"===t[e+7]}function a(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"L"===t[e+3]&&"E"===t[e+4]&&"M"===t[e+5]&&"E"===t[e+6]&&"N"===t[e+7]&&"T"===t[e+8]}function u(t,e){return"!"===t[e+1]&&"A"===t[e+2]&&"T"===t[e+3]&&"T"===t[e+4]&&"L"===t[e+5]&&"I"===t[e+6]&&"S"===t[e+7]&&"T"===t[e+8]}function c(t,e){return"!"===t[e+1]&&"N"===t[e+2]&&"O"===t[e+3]&&"T"===t[e+4]&&"A"===t[e+5]&&"T"===t[e+6]&&"I"===t[e+7]&&"O"===t[e+8]&&"N"===t[e+9]}function l(t){if(r.isName(t))return t;throw new Error(`Invalid entity name ${t}`)}t.exports=function(t,e){const n={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let r=1,h=!1,f=!1,p="";for(;e<t.length;e++)if("<"!==t[e]||f)if(">"===t[e]){if(f?"-"===t[e-1]&&"-"===t[e-2]&&(f=!1,r--):r--,0===r)break}else"["===t[e]?h=!0:p+=t[e];else{if(h&&s(t,e)){let r,o;e+=7,[r,o,e]=i(t,e+1),-1===o.indexOf("&")&&(n[l(r)]={regx:RegExp(`&${r};`,"g"),val:o})}else if(h&&a(t,e))e+=8;else if(h&&u(t,e))e+=8;else if(h&&c(t,e))e+=9;else{if(!o)throw new Error("Invalid DOCTYPE");f=!0}r++,p=""}if(0!==r)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}}},63:(t,e)=>{const n={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t}};e.buildOptions=function(t){return Object.assign({},n,t)},e.defaultOptions=n},299:(t,e,n)=>{const r=n(705),i=n(365),o=n(193),s=n(494),a=n(118);function u(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const r=e[n];this.lastEntities[r]={regex:new RegExp("&"+r+";","g"),val:t[r]}}}function c(t,e,n,r,i,o,s){if(void 0!==t&&(this.options.trimValues&&!r&&(t=t.trim()),t.length>0)){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?w(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function l(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 h=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function f(t,e,n){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const n=r.getAllMatches(t,h),i=n.length,o={};for(let t=0;t<i;t++){const r=this.resolveNameSpace(n[t][1]);if(this.ignoreAttributesFn(r,e))continue;let i=n[t][4],s=this.options.attributeNamePrefix+r;if(r.length)if(this.options.transformAttributeName&&(s=this.options.transformAttributeName(s)),"__proto__"===s&&(s="#__proto__"),void 0!==i){this.options.trimValues&&(i=i.trim()),i=this.replaceEntitiesValue(i);const t=this.options.attributeValueProcessor(r,i,e);o[s]=null==t?i:typeof t!=typeof i||t!==i?t:w(i,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[s]=!0)}if(!Object.keys(o).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=o,t}return o}}const p=function(t){t=t.replace(/\r\n?/g,"\n");const e=new i("!xml");let n=e,r="",s="";for(let a=0;a<t.length;a++)if("<"===t[a])if("/"===t[a+1]){const e=y(t,">",a,"Closing Tag is not closed.");let i=t.substring(a+2,e).trim();if(this.options.removeNSPrefix){const t=i.indexOf(":");-1!==t&&(i=i.substr(t+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),n&&(r=this.saveTextToParentTag(r,n,s));const o=s.substring(s.lastIndexOf(".")+1);if(i&&-1!==this.options.unpairedTags.indexOf(i))throw new Error(`Unpaired tag can not be used as closing tag: </${i}>`);let u=0;o&&-1!==this.options.unpairedTags.indexOf(o)?(u=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):u=s.lastIndexOf("."),s=s.substring(0,u),n=this.tagsNodeStack.pop(),r="",a=e}else if("?"===t[a+1]){let e=b(t,a,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(r=this.saveTextToParentTag(r,n,s),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new i(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,s,e.tagName)),this.addChild(n,t,s)}a=e.closeIndex+1}else if("!--"===t.substr(a+1,3)){const e=y(t,"--\x3e",a+4,"Comment is not closed.");if(this.options.commentPropName){const i=t.substring(a+4,e-2);r=this.saveTextToParentTag(r,n,s),n.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}a=e}else if("!D"===t.substr(a+1,2)){const e=o(t,a);this.docTypeEntities=e.entities,a=e.i}else if("!["===t.substr(a+1,2)){const e=y(t,"]]>",a,"CDATA is not closed.")-2,i=t.substring(a+9,e);r=this.saveTextToParentTag(r,n,s);let o=this.parseTextData(i,n.tagname,s,!0,!1,!0,!0);null==o&&(o=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):n.add(this.options.textNodeName,o),a=e+2}else{let o=b(t,a,this.options.removeNSPrefix),u=o.tagName;const c=o.rawTagName;let l=o.tagExp,h=o.attrExpPresent,f=o.closeIndex;this.options.transformTagName&&(u=this.options.transformTagName(u)),n&&r&&"!xml"!==n.tagname&&(r=this.saveTextToParentTag(r,n,s,!1));const p=n;if(p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(n=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),u!==e.tagname&&(s+=s?"."+u:u),this.isItStopNode(this.options.stopNodes,s,u)){let e="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)"/"===u[u.length-1]?(u=u.substr(0,u.length-1),s=s.substr(0,s.length-1),l=u):l=l.substr(0,l.length-1),a=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(u))a=o.closeIndex;else{const n=this.readStopNodeData(t,c,f+1);if(!n)throw new Error(`Unexpected end of ${c}`);a=n.i,e=n.tagContent}const r=new i(u);u!==l&&h&&(r[":@"]=this.buildAttributesMap(l,s,u)),e&&(e=this.parseTextData(e,u,s,!0,h,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),r.add(this.options.textNodeName,e),this.addChild(n,r,s)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){"/"===u[u.length-1]?(u=u.substr(0,u.length-1),s=s.substr(0,s.length-1),l=u):l=l.substr(0,l.length-1),this.options.transformTagName&&(u=this.options.transformTagName(u));const t=new i(u);u!==l&&h&&(t[":@"]=this.buildAttributesMap(l,s,u)),this.addChild(n,t,s),s=s.substr(0,s.lastIndexOf("."))}else{const t=new i(u);this.tagsNodeStack.push(n),u!==l&&h&&(t[":@"]=this.buildAttributesMap(l,s,u)),this.addChild(n,t,s),n=t}r="",a=f}}else r+=t[a];return e.child};function d(t,e,n){const r=this.options.updateTag(e.tagname,n,e[":@"]);!1===r||("string"==typeof r?(e.tagname=r,t.addChild(e)):t.addChild(e))}const g=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 m(t,e,n,r){return t&&(void 0===r&&(r=0===Object.keys(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 E(t,e,n){const r="*."+n;for(const n in t){const i=t[n];if(r===i||e===i)return!0}return!1}function y(t,e,n,r){const i=t.indexOf(e,n);if(-1===i)throw new Error(r);return i+e.length-1}function b(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;o<t.length;o++){let e=t[o];if(n)e===n&&(n="");else if('"'===e||"'"===e)n=e;else if(e===r[0]){if(!r[1])return{data:i,index:o};if(t[o+1]===r[1])return{data:i,index:o}}else"\t"===e&&(e=" ");i+=e}}(t,e+1,arguments.length>3&&void 0!==arguments[3]?arguments[3]:">");if(!r)return;let i=r.data;const o=r.index,s=i.search(/\s/);let a=i,u=!0;-1!==s&&(a=i.substring(0,s),i=i.substring(s+1).trimStart());const c=a;if(n){const t=a.indexOf(":");-1!==t&&(a=a.substr(t+1),u=a!==r.data.substr(t+1))}return{tagName:a,tagExp:i,closeIndex:o,attrExpPresent:u,rawTagName:c}}function v(t,e,n){const r=n;let i=1;for(;n<t.length;n++)if("<"===t[n])if("/"===t[n+1]){const o=y(t,">",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=y(t,"?>",n+1,"StopNode is not closed.");else if("!--"===t.substr(n+1,3))n=y(t,"--\x3e",n+3,"StopNode is not closed.");else if("!["===t.substr(n+1,2))n=y(t,"]]>",n,"StopNode is not closed.")-2;else{const r=b(t,n,">");r&&((r&&r.tagName)===e&&"/"!==r.tagExp[r.tagExp.length-1]&&i++,n=r.closeIndex)}}function w(t,e,n){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&s(t,n)}return r.isExist(t)?t:""}t.exports=class{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,16))}},this.addExternalEntities=u,this.parseXml=p,this.parseTextData=c,this.resolveNameSpace=l,this.buildAttributesMap=f,this.isItStopNode=E,this.replaceEntitiesValue=g,this.readStopNodeData=v,this.saveTextToParentTag=m,this.addChild=d,this.ignoreAttributesFn=a(this.options.ignoreAttributes)}}},338:(t,e,n)=>{const{buildOptions:r}=n(63),i=n(299),{prettify:o}=n(728),s=n(31);t.exports=class{constructor(t){this.externalEntities={},this.options=r(t)}parse(t,e){if("string"==typeof t);else{if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString()}if(e){!0===e&&(e={});const n=s.validate(t,e);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new i(this.options);n.addExternalEntities(this.externalEntities);const r=n.parseXml(t);return this.options.preserveOrder||void 0===r?r:o(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 '&#xD;'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}}},728:(t,e)=>{function n(t,e,s){let a;const u={};for(let c=0;c<t.length;c++){const l=t[c],h=r(l);let f="";if(f=void 0===s?h:s+"."+h,h===e.textNodeName)void 0===a?a=l[h]:a+=""+l[h];else{if(void 0===h)continue;if(l[h]){let t=n(l[h],e,f);const r=o(t,e);l[":@"]?i(t,l[":@"],f,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==u[h]&&u.hasOwnProperty(h)?(Array.isArray(u[h])||(u[h]=[u[h]]),u[h].push(t)):e.isArray(h,f,r)?u[h]=[t]:u[h]=t}}}return"string"==typeof a?a.length>0&&(u[e.textNodeName]=a):void 0!==a&&(u[e.textNodeName]=a),u}function r(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=e[t];if(":@"!==n)return n}}function i(t,e,n,r){if(e){const i=Object.keys(e),o=i.length;for(let s=0;s<o;s++){const o=i[s];r.isArray(o,n+"."+o,!0,!0)?t[o]=[e[o]]:t[o]=e[o]}}}function o(t,e){const{textNodeName:n}=e,r=Object.keys(t).length;return 0===r||!(1!==r||!t[n]&&"boolean"!=typeof t[n]&&0!==t[n])}e.prettify=function(t,e){return n(t,e)}},365:t=>{t.exports=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}},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)}},542:(t,e,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),u=8*t.length,c=1732584193,l=-271733879,h=-1732584194,f=271733878,p=0;p<a.length;p++)a[p]=16711935&(a[p]<<8|a[p]>>>24)|4278255360&(a[p]<<24|a[p]>>>8);a[u>>>5]|=128<<u%32,a[14+(u+64>>>9<<4)]=u;var d=s._ff,g=s._gg,m=s._hh,E=s._ii;for(p=0;p<a.length;p+=16){var y=c,b=l,v=h,w=f;c=d(c,l,h,f,a[p+0],7,-680876936),f=d(f,c,l,h,a[p+1],12,-389564586),h=d(h,f,c,l,a[p+2],17,606105819),l=d(l,h,f,c,a[p+3],22,-1044525330),c=d(c,l,h,f,a[p+4],7,-176418897),f=d(f,c,l,h,a[p+5],12,1200080426),h=d(h,f,c,l,a[p+6],17,-1473231341),l=d(l,h,f,c,a[p+7],22,-45705983),c=d(c,l,h,f,a[p+8],7,1770035416),f=d(f,c,l,h,a[p+9],12,-1958414417),h=d(h,f,c,l,a[p+10],17,-42063),l=d(l,h,f,c,a[p+11],22,-1990404162),c=d(c,l,h,f,a[p+12],7,1804603682),f=d(f,c,l,h,a[p+13],12,-40341101),h=d(h,f,c,l,a[p+14],17,-1502002290),c=g(c,l=d(l,h,f,c,a[p+15],22,1236535329),h,f,a[p+1],5,-165796510),f=g(f,c,l,h,a[p+6],9,-1069501632),h=g(h,f,c,l,a[p+11],14,643717713),l=g(l,h,f,c,a[p+0],20,-373897302),c=g(c,l,h,f,a[p+5],5,-701558691),f=g(f,c,l,h,a[p+10],9,38016083),h=g(h,f,c,l,a[p+15],14,-660478335),l=g(l,h,f,c,a[p+4],20,-405537848),c=g(c,l,h,f,a[p+9],5,568446438),f=g(f,c,l,h,a[p+14],9,-1019803690),h=g(h,f,c,l,a[p+3],14,-187363961),l=g(l,h,f,c,a[p+8],20,1163531501),c=g(c,l,h,f,a[p+13],5,-1444681467),f=g(f,c,l,h,a[p+2],9,-51403784),h=g(h,f,c,l,a[p+7],14,1735328473),c=m(c,l=g(l,h,f,c,a[p+12],20,-1926607734),h,f,a[p+5],4,-378558),f=m(f,c,l,h,a[p+8],11,-2022574463),h=m(h,f,c,l,a[p+11],16,1839030562),l=m(l,h,f,c,a[p+14],23,-35309556),c=m(c,l,h,f,a[p+1],4,-1530992060),f=m(f,c,l,h,a[p+4],11,1272893353),h=m(h,f,c,l,a[p+7],16,-155497632),l=m(l,h,f,c,a[p+10],23,-1094730640),c=m(c,l,h,f,a[p+13],4,681279174),f=m(f,c,l,h,a[p+0],11,-358537222),h=m(h,f,c,l,a[p+3],16,-722521979),l=m(l,h,f,c,a[p+6],23,76029189),c=m(c,l,h,f,a[p+9],4,-640364487),f=m(f,c,l,h,a[p+12],11,-421815835),h=m(h,f,c,l,a[p+15],16,530742520),c=E(c,l=m(l,h,f,c,a[p+2],23,-995338651),h,f,a[p+0],6,-198630844),f=E(f,c,l,h,a[p+7],10,1126891415),h=E(h,f,c,l,a[p+14],15,-1416354905),l=E(l,h,f,c,a[p+5],21,-57434055),c=E(c,l,h,f,a[p+12],6,1700485571),f=E(f,c,l,h,a[p+3],10,-1894986606),h=E(h,f,c,l,a[p+10],15,-1051523),l=E(l,h,f,c,a[p+1],21,-2054922799),c=E(c,l,h,f,a[p+8],6,1873313359),f=E(f,c,l,h,a[p+15],10,-30611744),h=E(h,f,c,l,a[p+6],15,-1560198380),l=E(l,h,f,c,a[p+13],21,1309151649),c=E(c,l,h,f,a[p+4],6,-145523070),f=E(f,c,l,h,a[p+11],10,-1120210379),h=E(h,f,c,l,a[p+2],15,718787259),l=E(l,h,f,c,a[p+9],21,-343485551),c=c+y>>>0,l=l+b>>>0,h=h+v>>>0,f=f+w>>>0}return e.endian([c,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<<o|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<<o|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<<o|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<<o|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)}}()},285:(t,e,n)=>{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(u)}(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",u="\0PERIOD"+Math.random()+"\0";function c(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(u).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 u=h(s);return s.length&&(a[a.length-1]+=u.shift(),a.push.apply(a,u)),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 u=0;u<a.length;u++){var l=o+"{"+i.body+"}"+a[u];n.push(l)}else{var E,y,b=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),v=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),w=b||v,T=i.body.indexOf(",")>=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=c(E[0]),A=c(E[1]),I=Math.max(E[0].length,E[1].length),O=3==E.length?Math.abs(c(E[2])):1,R=d;A<N&&(O*=-1,R=g);var _=E.some(p);y=[];for(var S=N;R(S,A);S+=O){var L;if(v)"\\"===(L=String.fromCharCode(S))&&(L="");else if(L=String(S),_){var x=I-L.length;if(x>0){var C=new Array(x+1).join("0");L=S<0?"-"+C+L.slice(1):C+L}}y.push(L)}}else{y=[];for(var P=0;P<E.length;P++)y.push.apply(y,m(E[P],!1))}for(P=0;P<y.length;P++)for(u=0;u<a.length;u++)l=o+y[P]+a[u],(!e||w||l)&&n.push(l)}return n}},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)},u=0;u<o;u++){var c=s(u);if("object"===e(c))return c.v}return t}function u(t,e){return t.length===e+1}t.exports={set:function(t,n,r){if("object"!=e(t)||null===t)return t;if(void 0===n)return t;if("number"==typeof n)return t[n]=r,t[n];try{return a(t,n,(function(t,e,n,i){if(t===Reflect.getPrototypeOf({}))throw new s("Attempting to mutate Object.prototype");if(!t[e]){var o=Number.isInteger(Number(n[i+1])),a="+"===n[i+1];t[e]=o||a?[]:{}}return u(n,i)&&(t[e]=r),t[e]}))}catch(e){if(e instanceof s)throw e;return t}},get:function(t,n){if("object"!=e(t)||null===t)return t;if(void 0===n)return t;if("number"==typeof n)return t[n];try{return a(t,n,(function(t,e){return t[e]}))}catch(e){return t}},has:function(t,n){var r=arguments.length>2&&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(!u(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=u(i,a)&&"object"===e(t)&&n in t,t&&t[n]})),i.validPath?o&&s:o}catch(t){return!1}},ObjectPrototypeMutationError:s}},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<t.length;r++){var i=t[r];i&&"."!==i&&(".."===i?n.length&&".."!==n[n.length-1]?n.pop():e&&n.push(".."):n.push(i))}return n}var s=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a={};function u(t){return s.exec(t).slice(1)}a.resolve=function(){for(var t="",e=!1,n=arguments.length-1;n>=-1&&!e;n--){var r=n>=0?arguments[n]:b.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("/"))||"."},a.normalize=function(t){var e=a.isAbsolute(t),n="/"===t.substr(-1);return(t=o(t.split("/"),!e).join("/"))||e||(t="."),t&&n&&(t+="/"),(e?"/":"")+t},a.isAbsolute=function(t){return"/"===t.charAt(0)},a.join=function(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];if(!i(n))throw new TypeError("Arguments to path.join must be strings");n&&(t+=t?"/"+n:n)}return a.normalize(t)},a.relative=function(t,e){function n(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n+1)}t=a.resolve(t).substr(1),e=a.resolve(e).substr(1);for(var r=n(t.split("/")),i=n(e.split("/")),o=Math.min(r.length,i.length),s=o,u=0;u<o;u++)if(r[u]!==i[u]){s=u;break}var c=[];for(u=s;u<r.length;u++)c.push("..");return(c=c.concat(i.slice(s))).join("/")},a._makeLong=function(t){return t},a.dirname=function(t){var e=u(t),n=e[0],r=e[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},a.basename=function(t,e){var n=u(t)[2];return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},a.extname=function(t){return u(t)[3]},a.format=function(t){if(!r.isObject(t))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof t);var e=t.root||"";if(!i(e))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof t.root);return(t.dir?t.dir+a.sep:"")+(t.base||"")},a.parse=function(t){if(!i(t))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof t);var e=u(t);if(!e||4!==e.length)throw new TypeError("Invalid path '"+t+"'");return e[1]=e[1]||"",e[2]=e[2]||"",e[3]=e[3]||"",{root:e[0],dir:e[0]+e[1].slice(0,e[1].length-1),base:e[2],ext:e[3],name:e[2].slice(0,e[2].length-e[3].length)}},a.sep="/",a.delimiter=":",t.exports=a},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}},494:t=>{const e=/^[-+]?0x[a-fA-F0-9]+$/,n=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const r={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};t.exports=function(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(i=Object.assign({},r,i),!t||"string"!=typeof t)return t;let o=t.trim();if(void 0!==i.skipLike&&i.skipLike.test(o))return t;if(i.hex&&e.test(o))return Number.parseInt(o,16);{const e=n.exec(o);if(e){const n=e[1],r=e[2];let a=(s=e[3])&&-1!==s.indexOf(".")?("."===(s=s.replace(/0+$/,""))?s="0":"."===s[0]?s="0"+s:"."===s[s.length-1]&&(s=s.substr(0,s.length-1)),s):s;const u=e[4]||e[6];if(!i.leadingZeros&&r.length>0&&n&&"."!==o[2])return t;if(!i.leadingZeros&&r.length>0&&!n&&"."!==o[1])return t;{const e=Number(o),s=""+e;return-1!==s.search(/[eE]/)||u?i.eNotation?e:t:-1!==o.indexOf(".")?"0"===s&&""===a||s===a||n&&s==="-"+a?e:t:r?a===s||n+a===s?e:t:o===s||o===n+s?e:t}}return t}var s}},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+-.]*:\/\//,u=/:\d+$/,c=/^([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 global?global:"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=c.exec(t),i=r[1]?r[1].toLowerCase():"",o=!!r[2],a=!!r[3],u=0;return o?a?(n=r[2]+r[3]+r[4],u=r[2].length+r[3].length):(n=r[2]+r[4],u=r[2].length):a?(n=r[3]+r[4],u=r[3].length):n=r[4],"file:"===i?u>=2&&(n=n.slice(2)):g(i)?n=r[4]:i?o&&(n=n.slice(2)):u>=2&&g(e.protocol)&&(n=r[4]),{protocol:i,slashes:o||g(i),slashesCount:u,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,u,c,p,y,b=f.slice(),v=typeof e,w=this,T=0;for("object"!==v&&"string"!==v&&(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)))&&(b[3]=[/(.*)/,"pathname"]);T<b.length;T++)"function"!=typeof(c=b[T])?(u=c[0],y=c[1],u!=u?w[y]=t:"string"==typeof u?~(p="@"===u?t.lastIndexOf(u):t.indexOf(u))&&("number"==typeof c[2]?(w[y]=t.slice(0,p),t=t.slice(p+c[2])):(w[y]=t.slice(p),t=t.slice(0,p))):(p=u.exec(t))&&(w[y]=p[1],t=t.slice(0,p.index)),w[y]=w[y]||o&&c[3]&&e[y]||"",c[4]&&(w[y]=w[y].toLowerCase())):t=c(t,w);n&&(w.query=n(w.query)),o&&e.slashes&&"/"!==w.pathname.charAt(0)&&(""!==w.pathname||""!==e.pathname)&&(w.pathname=function(t,e){if(""===t)return e;for(var n=(e||"/").split("/").slice(0,-1).concat(t.split("/")),r=n.length,i=n[r-1],o=!1,s=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),s++):s&&(0===r&&(o=!0),n.splice(r,1),s--);return o&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}(w.pathname,e.pathname)),"/"!==w.pathname.charAt(0)&&g(w.protocol)&&(w.pathname="/"+w.pathname),r(w.port,w.protocol)||(w.host=w.hostname,w.port=""),w.username=w.password="",w.auth&&(~(p=w.auth.indexOf(":"))?(w.username=w.auth.slice(0,p),w.username=encodeURIComponent(decodeURIComponent(w.username)),w.password=w.auth.slice(p+1),w.password=encodeURIComponent(decodeURIComponent(w.password))):w.username=encodeURIComponent(decodeURIComponent(w.auth)),w.auth=w.password?w.username+":"+w.password:w.username),w.origin="file:"!==w.protocol&&g(w.protocol)&&w.host?w.protocol+"//"+w.host:"null",w.href=w.toString()}E.prototype={set:function(t,e,n){var o=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(n||i.parse)(e)),o[t]=e;break;case"port":o[t]=e,r(e,o.protocol)?e&&(o.host=o.hostname+":"+e):(o.host=o.hostname,o[t]="");break;case"hostname":o[t]=e,o.port&&(e+=":"+o.port),o.host=e;break;case"host":o[t]=e,u.test(e)?(e=e.split(":"),o.port=e.pop(),o.hostname=e.join(":")):(o.hostname=e,o.port="");break;case"protocol":o.protocol=e.toLowerCase(),o.slashes=!n;break;case"pathname":case"hash":if(e){var s="pathname"===t?"/":"#";o[t]=e.charAt(0)!==s?s+e:e}else o[t]=e;break;case"username":case"password":o[t]=encodeURIComponent(e);break;case"auth":var a=e.indexOf(":");~a?(o.username=e.slice(0,a),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=e.slice(a+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(e))}for(var c=0;c<f.length;c++){var l=f[c];l[4]&&(o[l[1]]=o[l[1]].toLowerCase())}return o.auth=o.password?o.username+":"+o.password:o.username,o.origin="file:"!==o.protocol&&g(o.protocol)&&o.host?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(t){t&&"function"==typeof t||(t=i.stringify);var e,n=this,r=n.host,o=n.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var s=o+(n.protocol&&n.slashes||g(n.protocol)?"//":"");return n.username?(s+=n.username,n.password&&(s+=":"+n.password),s+="@"):n.password?(s+=":"+n.password,s+="@"):"file:"!==n.protocol&&g(n.protocol)&&!r&&"/"!==n.pathname&&(s+="@"),(":"===r[r.length-1]||u.test(n.hostname)&&!n.port)&&(r+=":"),s+=r+n.pathname,(e="object"==typeof n.query?t(n.query):n.query)&&(s+="?"!==e.charAt(0)?"?"+e:e),n.hash&&(s+=n.hash),s}},E.extractProtocol=m,E.location=d,E.trimLeft=h,E.qs=i,t.exports=E},410:()=>{},388:()=>{},805:()=>{},345:()=>{},800:()=>{}},w={};function T(t){var e=w[t];if(void 0!==e)return e.exports;var n=w[t]={id:t,loaded:!1,exports:{}};return v[t].call(n.exports,n,n.exports,T),n.loaded=!0,n.exports}T.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return T.d(e,{a:e}),e},T.d=(t,e)=>{for(var n in e)T.o(e,n)&&!T.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},T.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),T.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var N={};T.d(N,{hT:()=>Z,O4:()=>Q,Kd:()=>Y,YK:()=>q,UU:()=>wn,Gu:()=>it,ky:()=>Ne,h4:()=>we,ch:()=>Te,hq:()=>pe,i5:()=>Ae});var A=T(737),I=T.n(A);function O(t){if(!R(t))throw new Error("Parameter was not an error")}function R(t){return!!t&&"object"==typeof t&&"[object Error]"===(e=t,Object.prototype.toString.call(e))||t instanceof Error;var e}class _ extends Error{constructor(t,e){const n=[...arguments],{options:r,shortMessage:i}=function(t){let e,n="";if(0===t.length)e={};else if(R(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 O(t),t._cause&&R(t._cause)?t._cause:null}static fullStack(t){O(t);const e=_.cause(t);return e?`${t.stack}\ncaused by: ${_.fullStack(e)}`:t.stack??""}static info(t){O(t);const e={},n=_.cause(t);return n&&Object.assign(e,_.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 S=T(47),L=T.n(S);const x="__PATH_SEPARATOR_POSIX__",C="__PATH_SEPARATOR_WINDOWS__";function P(t){try{const e=t.replace(/\//g,x).replace(/\\\\/g,C);return encodeURIComponent(e).split(C).join("\\\\").split(x).join("/")}catch(t){throw new _(t,"Failed encoding path")}}function D(t){return t.startsWith("/")?t:"/"+t}function $(t){let e=t;return"/"!==e[0]&&(e="/"+e),/^.+\/$/.test(e)&&(e=e.substr(0,e.length-1)),e}function U(t){let e=new(I())(t).pathname;return e.length<=0&&(e="/"),$(e)}function M(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(){return function(t){var e=[];if(0===t.length)return"";if("string"!=typeof t[0])throw new TypeError("Url must be a string. Received "+t[0]);if(t[0].match(/^[^/:]+:\/*$/)&&t.length>1){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;r<t.length;r++){var i=t[r];if("string"!=typeof i)throw new TypeError("Url must be a string. Received "+i);""!==i&&(r>0&&(i=i.replace(/^[\/]+/,"")),i=r<t.length-1?i.replace(/[\/]+$/,""):i.replace(/[\/]+$/,"/"),e.push(i))}var o=e.join("/"),s=(o=o.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return s.shift()+(s.length>0?"?":"")+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 F=T(542),j=T.n(F);function k(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||j()(`${e}:${n}:${r}`);return t&&"md5-sess"===t.toLowerCase()?j()(`${a}:${i}:${o}`):a}(e.algorithm,e.username,e.realm,e.password,e.nonce,e.cnonce,e.ha1),u=j()(`${i}:${r}`),c=o?j()(`${a}:${e.nonce}:${s}:${e.cnonce}:${o}:${u}`):j()(`${a}:${e.nonce}:${u}`),l={username:e.username,realm:e.realm,nonce:e.nonce,uri:r,qop:o,response:c,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 B(t){return"digest"===(t.headers&&t.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()}var G=T(101),V=T.n(G);function z(t){return V().decode(t)}function X(t,e){var n;return`Basic ${n=`${t}:${e}`,V().encode(n)}`}const H="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:"undefined"!=typeof window?window:globalThis,W=H.fetch.bind(H),Y=(H.Headers,H.Request),q=H.Response;let Z=function(t){return t.Auto="auto",t.Digest="digest",t.None="none",t.Password="password",t.Token="token",t}({}),Q=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 K(t,e,n,r,i){switch(t.authType){case Z.Auto:e&&n&&(t.headers.Authorization=X(e,n));break;case Z.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 Z.None:break;case Z.Password:t.headers.Authorization=X(e,n);break;case Z.Token:t.headers.Authorization=`${(o=r).token_type} ${o.access_token}`;break;default:throw new _({info:{code:Q.InvalidAuthType}},`Invalid auth type: ${t.authType}`)}var o}T(345),T(800);const J="@@HOTPATCHER",tt=()=>{};function et(t){return{original:t,methods:[t],final:!1}}class nt{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=J}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__!==J)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)||tt;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return e(...r)}get(t){const e=this.configuration.registry[t];if(!e)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${t}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Failed creating sequence: No functions provided");return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];let i=n;const o=this;for(;e.length>0;)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]=et(e);else if(this.isPatched(t)){const{original:n}=this.configuration.registry[t];this.configuration.registry[t]=Object.assign(et(e),{original:n})}else this.configuration.registry[t]=et(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;i<n;i++)r[i-2]=arguments[i];return this.execute(t,...r)}plugin(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return n.forEach((e=>{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 rt=null;function it(){return rt||(rt=new nt),rt}function ot(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 st(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];let r=null,i=[...e];for(;i.length>0;){const t=i.shift();r=r?at(r,t):ot(t)}return r}function at(t,e){const n=ot(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]?at(n[t],e[t]):ot(e[t]):n[t]=e[t]:n[t]=e[t]})),n}function ut(t){const e={};for(const n of t.keys())e[n]=t.get(n);return e}function ct(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(0===e.length)return{};const r={};return e.reduce(((t,e)=>(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)),{})}T(805);const lt="function"==typeof ArrayBuffer,{toString:ht}=Object.prototype;function ft(t){return lt&&(t instanceof ArrayBuffer||"[object ArrayBuffer]"===ht.call(t))}function pt(t){return null!=t&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function dt(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}function gt(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const mt=dt((function(t){const e=t._digest;return delete t._digest,e.hasDigestAuth&&(t=st(t,{headers:{Authorization:k(t,e)}})),gt(vt(t),(function(n){let r=!1;return i=function(t){return r?t:n},(o=function(){if(401==n.status)return e.hasDigestAuth=function(t,e){if(!B(t))return!1;const n=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const r=t.headers&&t.headers.get("www-authenticate")||"",i=n.exec(r);if(!i)break;e[i[1]]=i[2]||i[3]}return e.nc+=1,e.cnonce=function(){let t="";for(let e=0;e<32;++e)t=`${t}${"abcdef0123456789"[Math.floor(16*Math.random())]}`;return t}(),!0}(n,e),function(){if(e.hasDigestAuth)return gt(vt(t=st(t,{headers:{Authorization:k(t,e)}})),(function(t){return 401==t.status?e.hasDigestAuth=!1:e.nc++,r=!0,t}))}();e.nc++}())&&o.then?o.then(i):i(o);var i,o}))})),Et=dt((function(t,e){return gt(vt(t),(function(n){return n.ok?(e.authType=Z.Password,n):401==n.status&&B(n)?(e.authType=Z.Digest,K(e,e.username,e.password,void 0,void 0),t._digest=e.digest,mt(t)):n}))})),yt=dt((function(t,e){return e.authType===Z.Auto?Et(t,e):t._digest?mt(t):vt(t)}));function bt(t,e,n){const r=ot(t);return r.headers=ct(e.headers,r.headers||{},n.headers||{}),void 0!==n.data&&(r.data=n.data),n.signal&&(r.signal=n.signal),e.httpAgent&&(r.httpAgent=e.httpAgent),e.httpsAgent&&(r.httpsAgent=e.httpsAgent),e.digest&&(r._digest=e.digest),"boolean"==typeof e.withCredentials&&(r.withCredentials=e.withCredentials),r}function vt(t){const e=it();return e.patchInline("request",(t=>e.patchInline("fetch",W,t.url,function(t){let e={};const n={method:t.method};if(t.headers&&(e=ct(e,t.headers)),void 0!==t.data){const[r,i]=function(t){if("string"==typeof t)return[t,{}];if(pt(t))return[t,{}];if(ft(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=ct(e,i)}return t.signal&&(n.signal=t.signal),t.withCredentials&&(n.credentials="include"),n.headers=e,n}(t))),t)}var wt=T(285);const Tt=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},Nt={"[: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]},At=t=>t.replace(/[[\]\\-]/g,"\\$&"),It=t=>t.join(""),Ot=(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,u=!1,c=!1,l=n,h="";t:for(;o<t.length;){const e=t.charAt(o);if("!"!==e&&"^"!==e||o!==n+1){if("]"===e&&s&&!u){l=o+1;break}if(s=!0,"\\"!==e||u){if("["===e&&!u)for(const[e,[s,u,c]]of Object.entries(Nt))if(t.startsWith(e,o)){if(h)return["$.",!1,t.length-n,!0];o+=e.length,c?i.push(s):r.push(s),a=a||u;continue t}u=!1,h?(e>h?r.push(At(h)+"-"+At(e)):e===h&&r.push(At(e)),h="",o++):t.startsWith("-]",o+1)?(r.push(At(e+"-")),o+=2):t.startsWith("-",o+1)?(h=e,o+=2):(r.push(At(e)),o++)}else u=!0,o++}else c=!0,o++}if(l<o)return["",!1,0,!1];if(!r.length&&!i.length)return["$.",!1,t.length-n,!0];if(0===i.length&&1===r.length&&/^\\?.$/.test(r[0])&&!c)return[(f=2===r[0].length?r[0].slice(-1):r[0],f.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,l-n,!1];var f;const p="["+(c?"^":"")+It(r)+"]",d="["+(c?"":"^")+It(i)+"]";return[r.length&&i.length?"("+p+"|"+d+")":r.length?p:d,a,l-n,!0]},Rt=function(t){let{windowsPathsNoEscape:e=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},_t=new Set(["!","?","+","*","@"]),St=t=>_t.has(t),Lt="(?!\\.)",xt=new Set(["[","."]),Ct=new Set(["..","."]),Pt=new Set("().*{}+?[]^$\\!"),Dt="[^/]",$t=Dt+"*?",Ut=Dt+"+?";class Mt{type;#t;#e;#n=!1;#r=[];#i;#o;#s;#a=!1;#u;#c;#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.#u=this.#t===this?n:this.#t.#u,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.#c?this.#c:this.type?this.#c=this.type+"("+this.#r.map((t=>String(t))).join("|")+")":this.#c=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<n.#r.length;r++)for(const e of t.#r){if("string"==typeof e)throw new Error("string part in extglob AST??");e.copyIn(n.#r[r])}e=n,n=e.#i}}return this}push(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(const t of e)if(""!==t){if("string"!=typeof t&&!(t instanceof Mt&&t.#i===this))throw new Error("invalid part: "+t);this.#r.push(t)}}toJSON(){const t=null===this.type?this.#r.slice().map((t=>"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;e<this.#o;e++){const n=t.#r[e];if(!(n instanceof Mt&&"!"===n.type))return!1}return!0}isEnd(){if(this.#t===this)return!0;if("!"===this.#i?.type)return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();const t=this.#i?this.#i.#r.length:0;return this.#o===t-1}copyIn(t){"string"==typeof t?this.push(t):this.push(t.clone(this))}clone(t){const e=new Mt(this.type,t);for(const t of this.#r)e.copyIn(t);return e}static#f(t,e,n,r){let i=!1,o=!1,s=-1,a=!1;if(null===e.type){let u=n,c="";for(;u<t.length;){const n=t.charAt(u++);if(i||"\\"===n)i=!i,c+=n;else if(o)u===s+1?"^"!==n&&"!"!==n||(a=!0):"]"!==n||u===s+2&&a||(o=!1),c+=n;else if("["!==n)if(r.noext||!St(n)||"("!==t.charAt(u))c+=n;else{e.push(c),c="";const i=new Mt(n,e);u=Mt.#f(t,i,u,r),e.push(i)}else o=!0,s=u,a=!1,c+=n}return e.push(c),u}let u=n+1,c=new Mt(null,e);const l=[];let h="";for(;u<t.length;){const n=t.charAt(u++);if(i||"\\"===n)i=!i,h+=n;else if(o)u===s+1?"^"!==n&&"!"!==n||(a=!0):"]"!==n||u===s+2&&a||(o=!1),h+=n;else if("["!==n)if(St(n)&&"("===t.charAt(u)){c.push(h),h="";const e=new Mt(n,c);c.push(e),u=Mt.#f(t,e,u,r)}else if("|"!==n){if(")"===n)return""===h&&0===e.#r.length&&(e.#l=!0),c.push(h),h="",e.push(...l,c),u;h+=n}else c.push(h),h="",l.push(c),c=new Mt(null,e);else o=!0,s=u,a=!1,h+=n}return e.type=null,e.#e=void 0,e.#r=[t.substring(n-1)],u}static fromGlob(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new Mt(null,void 0,e);return Mt.#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.#u.nocase&&!this.#u.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;const o=(this.#u.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${e}$`,o),{_src:e,_glob:t})}get options(){return this.#u}toRegExpSource(t){const e=t??!!this.#u.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?Mt.#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||!Ct.has(this.#r[0]))){const n=xt,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?Lt:""}let o="";return this.isEnd()&&this.#t.#a&&"!"===this.#i?.type&&(o="(?:$|\\/)"),[i+r+o,Rt(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,Rt(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?Lt:"")+Ut:r+i+("!"===this.type?"))"+(!this.isStart()||e||t?"":Lt)+$t+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&o?")":"*"===this.type&&o?")?":`)${this.type}`),[s,Rt(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;s<t.length;s++){const a=t.charAt(s);if(r)r=!1,i+=(Pt.has(a)?"\\":"")+a;else if("\\"!==a){if("["===a){const[n,r,a,u]=Ot(t,s);if(a){i+=n,o=o||r,s+=a-1,e=e||u;continue}}"*"!==a?"?"!==a?i+=a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(i+=Dt,e=!0):(i+=n&&"*"===t?Ut:$t,e=!0)}else s===t.length-1?i+="\\\\":r=!0}return[i,Rt(t),!!e,o]}}const Ft=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Tt(e),!(!n.nocomment&&"#"===e.charAt(0))&&new le(e,n).match(t)},jt=/^\*+([^+@!?\*\[\(]*)$/,kt=t=>e=>!e.startsWith(".")&&e.endsWith(t),Bt=t=>e=>e.endsWith(t),Gt=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),Vt=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),zt=/^\*+\.\*+$/,Xt=t=>!t.startsWith(".")&&t.includes("."),Ht=t=>"."!==t&&".."!==t&&t.includes("."),Wt=/^\.\*+$/,Yt=t=>"."!==t&&".."!==t&&t.startsWith("."),qt=/^\*+$/,Zt=t=>0!==t.length&&!t.startsWith("."),Qt=t=>0!==t.length&&"."!==t&&".."!==t,Kt=/^\?+([^+@!?\*\[\(]*)?$/,Jt=t=>{let[e,n=""]=t;const r=re([e]);return n?(n=n.toLowerCase(),t=>r(t)&&t.toLowerCase().endsWith(n)):r},te=t=>{let[e,n=""]=t;const r=ie([e]);return n?(n=n.toLowerCase(),t=>r(t)&&t.toLowerCase().endsWith(n)):r},ee=t=>{let[e,n=""]=t;const r=ie([e]);return n?t=>r(t)&&t.endsWith(n):r},ne=t=>{let[e,n=""]=t;const r=re([e]);return n?t=>r(t)&&t.endsWith(n):r},re=t=>{let[e]=t;const n=e.length;return t=>t.length===n&&!t.startsWith(".")},ie=t=>{let[e]=t;const n=e.length;return t=>t.length===n&&"."!==t&&".."!==t},oe="object"==typeof b&&b?"object"==typeof b.env&&b.env&&b.env.__MINIMATCH_TESTING_PLATFORM__||b.platform:"posix";Ft.sep="win32"===oe?"\\":"/";const se=Symbol("globstar **");Ft.GLOBSTAR=se,Ft.filter=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>Ft(n,t,e)};const ae=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign({},t,e)};Ft.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return Ft;const e=Ft;return Object.assign((function(n,r){return e(n,r,ae(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}))}),{Minimatch:class extends e.Minimatch{constructor(e){super(e,ae(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))}static defaults(n){return e.defaults(ae(t,n)).Minimatch}},AST:class extends e.AST{constructor(e,n){super(e,n,ae(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,ae(t,r))}},unescape:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.unescape(n,ae(t,r))},escape:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.escape(n,ae(t,r))},filter:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.filter(n,ae(t,r))},defaults:n=>e.defaults(ae(t,n)),makeRe:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.makeRe(n,ae(t,r))},braceExpand:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.braceExpand(n,ae(t,r))},match:function(n,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.match(n,r,ae(t,i))},sep:e.sep,GLOBSTAR:se})};const ue=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Tt(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:wt(t)};Ft.braceExpand=ue,Ft.makeRe=function(t){return new le(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).makeRe()},Ft.match=function(t,e){const n=new le(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 ce=/[?*]|[+@!]\(.*?\)|\[|\]/;class le{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]:{};Tt(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||oe,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]&&ce.test(t[2])||ce.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<this.set.length;t++){const e=this.set[t];""===e[0]&&""===e[1]&&"?"===this.globParts[t][2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let n=0;n<t[e].length;n++)"**"===t[e][n]&&(t[e][n]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((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;n<t.length-1;n++){const r=t[n];1===n&&""===r&&""===t[0]||"."!==r&&""!==r||(e=!0,t.splice(n,1),n--)}"."!==t[0]||2!==t.length||"."!==t[1]&&""!==t[1]||(e=!0,t.pop())}let n=0;for(;-1!==(n=t.indexOf("..",n+1));){const r=t[n-1];r&&"."!==r&&".."!==r&&"**"!==r&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let r=-1;for(;-1!==(r=n.indexOf("**",r+1));){let i=r;for(;"**"===n[i+1];)i++;i>r&&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 u=n.slice(0);u[r]="**",t.push(u),r--}if(!this.preserveMultipleSlashes){for(let t=1;t<n.length-1;t++){const r=n[t];1===t&&""===r&&""===n[0]||"."!==r&&""!==r||(e=!0,n.splice(t,1),t--)}"."!==n[0]||2!==n.length||"."!==n[1]&&""!==n[1]||(e=!0,n.pop())}let i=0;for(;-1!==(i=n.indexOf("..",i+1));){const t=n[i-1];if(t&&"."!==t&&".."!==t&&"**"!==t){e=!0;const t=1===i&&"**"===n[i+1]?["."]:[];n.splice(i-1,2,...t),0===n.length&&n.push(""),i-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const r=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);if(r){t[e]=[],t[n]=r;break}}return t.filter((t=>t.length))}partsMatch(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=0,i=0,o=[],s="";for(;r<t.length&&i<e.length;)if(t[r]===e[i])o.push("b"===s?e[i]:t[r]),r++,i++;else if(n&&"**"===t[r]&&e[i]===t[r+1])o.push(t[r]),r++;else if(n&&"**"===e[i]&&t[r]===e[i+1])o.push(e[i]),i++;else if("*"!==t[r]||!e[i]||!this.options.dot&&e[i].startsWith(".")||"**"===e[i]){if("*"!==e[i]||!t[r]||!this.options.dot&&t[r].startsWith(".")||"**"===t[r])return!1;if("a"===s)return!1;s="b",o.push(e[i]),r++,i++}else{if("b"===s)return!1;s="a",o.push(t[r]),r++,i++}return t.length===e.length&&o}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let r=0;r<t.length&&"!"===t.charAt(r);r++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(t,e){let n=arguments.length>2&&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,u=e.length;o<a&&s<u;o++,s++){this.debug("matchOne loop");var c=e[s],l=t[o];if(this.debug(e,c,l),!1===c)return!1;if(c===se){this.debug("GLOBSTAR",[e,c,l]);var h=o,f=s+1;if(f===u){for(this.debug("** at the end");o<a;o++)if("."===t[o]||".."===t[o]||!r.dot&&"."===t[o].charAt(0))return!1;return!0}for(;h<a;){var p=t[h];if(this.debug("\nglobstar while",t,h,e,f,p),this.matchOne(t.slice(h),e.slice(f),n))return this.debug("globstar found match!",h,a,p),!0;if("."===p||".."===p||!r.dot&&"."===p.charAt(0)){this.debug("dot detected!",t,h,e,f);break}this.debug("globstar swallow a segment, and continue"),h++}return!(!n||(this.debug("\n>>> no match, partial?",t,h,e,f),h!==a))}let i;if("string"==typeof c?(i=l===c,this.debug("string match",c,l,i)):(i=c.test(l),this.debug("pattern match",c,l,i)),!i)return!1}if(o===a&&s===u)return!0;if(o===a)return n;if(s===u)return o===a-1&&""===t[o];throw new Error("wtf?")}braceExpand(){return ue(this.pattern,this.options)}parse(t){Tt(t);const e=this.options;if("**"===t)return se;if(""===t)return"";let n,r=null;(n=t.match(qt))?r=e.dot?Qt:Zt:(n=t.match(jt))?r=(e.nocase?e.dot?Vt:Gt:e.dot?Bt:kt)(n[1]):(n=t.match(Kt))?r=(e.nocase?e.dot?te:Jt:e.dot?ee:ne)(n):(n=t.match(zt))?r=e.dot?Ht:Xt:(n=t.match(Wt))&&(r=Yt);const i=Mt.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===se?se:t._src}));return e.forEach(((t,r)=>{const i=e[r+1],o=e[r-1];t===se&&o!==se&&(void 0===o?void 0!==i&&i!==se?e[r+1]="(?:\\/|"+n+"\\/)?"+i:e[r]=n:void 0===i?e[r-1]=o+"(?:\\/|"+n+")?":i!==se&&(e[r-1]=o+"(?:\\/|\\/"+n+"\\/)"+i,e[r+1]=se))})),e.filter((t=>t!==se)).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;t<i.length;t++){const s=i[t];let a=r;if(n.matchBase&&1===s.length&&(a=[o]),this.matchOne(a,s,e))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(t){return Ft.defaults(t).Minimatch}}function he(t){const e=new Error(`${arguments.length>1&&void 0!==arguments[1]?arguments[1]:""}Invalid response: ${t.status} ${t.statusText}`);return e.status=t.status,e.response=t,e}function fe(t,e){const{status:n}=e;if(401===n&&t.digest)return e;if(n>=400)throw he(e);return e}function pe(t,e){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?{data:e,headers:t.headers?ut(t.headers):{},status:t.status,statusText:t.statusText}:e}Ft.AST=Mt,Ft.Minimatch=le,Ft.escape=function(t){let{windowsPathsNoEscape:e=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&")},Ft.unescape=Rt;const de=(ge=function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=bt({url:M(t.remoteURL,P(e)),method:"COPY",headers:{Destination:M(t.remoteURL,P(n)),Overwrite:!1===r.overwrite?"F":"T",Depth:r.shallow?"0":"infinity"}},t,r);return s=function(e){fe(t,e)},(o=yt(i,t))&&o.then||(o=Promise.resolve(o)),s?o.then(s):o;var o,s},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(ge.apply(this,t))}catch(t){return Promise.reject(t)}});var ge,me=T(635),Ee=T(829),ye=T.n(Ee),be=function(t){return t.Array="array",t.Object="object",t.Original="original",t}(be||{});function ve(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:be.Original;const r=ye().get(t,e);return"array"===n&&!1===Array.isArray(r)?[r]:"object"===n&&Array.isArray(r)?r[0]:r}function we(t){return new Promise((e=>{e(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 ye().set(n,"multistatus.response",ve(n,"multistatus.response",be.Array)),ye().set(n,"multistatus.response",ye().get(n,"multistatus.response").map((t=>function(t){const e=Object.assign({},t);return e.status?ye().set(e,"status",ve(e,"status",be.Object)):(ye().set(e,"propstat",ve(e,"propstat",be.Object)),ye().set(e,"propstat.prop",ve(e,"propstat.prop",be.Object))),e}(t)))),n}(new me.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor:(t,e,n)=>"true"===e||"false"===e?"true"===e:e,tagValueProcessor(t,e,n){if(!n.endsWith("propstat.prop.displayname"))return e}}).parse(t)))}))}function Te(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,u=o&&"object"==typeof o&&void 0!==o.collection?"directory":"file",c={filename:e,basename:L().basename(e),lastmod:r,size:parseInt(i,10),type:u,etag:"string"==typeof a?a.replace(/"/g,""):null};return"file"===u&&(c.mime=s&&"string"==typeof s?s.split(";")[0]:""),n&&(void 0!==t.displayname&&(t.displayname=String(t.displayname)),c.props=t),c}function Ne(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,u]=o.split(" ",3),c=parseInt(a,10);if(c>=400){const t=new Error(`Invalid response: ${c} ${u}`);throw t.status=c,t}return Te(i,$(e),n)}function Ae(t){switch(String(t)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(t),10)}}function Ie(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const Oe=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{details:r=!1}=n,i=bt({url:M(t.remoteURL,P(e)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},t,n);return Ie(yt(i,t),(function(n){return fe(t,n),Ie(n.text(),(function(t){return Ie(we(t),(function(t){const i=Ne(t,e,r);return pe(n,i,r)}))}))}))}));function Re(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const _e=Se((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=L().dirname(e)}while(e&&"/"!==e);return n}($(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[Ce]){var n,r,i,o=t[Ce]();function c(t){try{for(;!(n=o.next()).done;)if((t=e(n.value))&&t.then){if(!$e(t))return void t.then(c,i||(i=Pe.bind(null,r=new De,2)));t=t.v}r?Pe(r,1,t):r=t}catch(t){Pe(r||(r=new De),2,t)}}if(c(),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=[],u=0;u<t.length;u++)a.push(t[u]);return function(t,e,n){var r,i,o=-1;return function s(a){try{for(;++o<t.length&&(!n||!n());)if((a=e(o))&&a.then){if(!$e(a))return void a.then(s,i||(i=Pe.bind(null,r=new De,2)));a=a.v}r?Pe(r,1,a):r=a}catch(t){Pe(r||(r=new De),2,t)}}(),r}(a,(function(t){return e(a[t])}),(function(){return!1}))}(r,(function(r){return o=function(){return function(n,i){try{var o=Re(Oe(t,r),(function(t){if("directory"!==t.type)throw new Error(`Path includes a file: ${e}`)}))}catch(t){return i(t)}return o&&o.then?o.then(void 0,i):o}(0,(function(e){const o=e;return function(){if(404===o.status)return i=!0,xe(Ue(t,r,{...n,recursive:!1}));throw e}()}))},(s=function(){if(i)return xe(Ue(t,r,{...n,recursive:!1}))}())&&s.then?s.then(o):o();var o,s}))}));function Se(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}function Le(){}function xe(t,e){if(!e)return t&&t.then?t.then(Le):Promise.resolve()}const Ce="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function Pe(t,e,n){if(!t.s){if(n instanceof De){if(!n.s)return void(n.o=Pe.bind(null,t,e));1&e&&(e=n.s),n=n.v}if(n&&n.then)return void n.then(Pe.bind(null,t,e),Pe.bind(null,t,2));t.s=e,t.v=n;const r=t.o;r&&r(t)}}const De=function(){function t(){}return t.prototype.then=function(e,n){const r=new t,i=this.s;if(i){const t=1&i?e:n;if(t){try{Pe(r,1,t(this.v))}catch(t){Pe(r,2,t)}return r}return this}return this.o=function(t){try{const i=t.v;1&t.s?Pe(r,1,e?e(i):i):n?Pe(r,1,n(i)):Pe(r,2,i)}catch(t){Pe(r,2,t)}},r},t}();function $e(t){return t instanceof De&&1&t.s}const Ue=Se((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!0===n.recursive)return _e(t,e,n);const r=bt({url:M(t.remoteURL,(i=P(e),i.endsWith("/")?i:i+"/")),method:"MKCOL"},t,n);var i;return Re(yt(r,t),(function(e){fe(t,e)}))}));var Me=T(388),Fe=T.n(Me);const je=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e){let n=arguments.length>2&&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=bt({url:M(t.remoteURL,P(e)),method:"GET",headers:r},t,n);return s=function(e){if(fe(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=yt(i,t))&&o.then||(o=Promise.resolve(o)),s?o.then(s):o;var o,s})),ke=()=>{},Be=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e,n){n.url||(n.url=M(t.remoteURL,P(e)));const r=bt(n,t,{});return o=function(e){return fe(t,e),e},(i=yt(r,t))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o})),Ge=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=bt({url:M(t.remoteURL,P(e)),method:"DELETE"},t,n);return o=function(e){fe(t,e)},(i=yt(r,t))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o})),Ve=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r,i){try{var o=(s=Oe(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 ze(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const Xe=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=bt({url:M(t.remoteURL,P(e),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:n.deep?"infinity":"1"}},t,n);return ze(yt(r,t),(function(r){return fe(t,r),ze(r.text(),(function(i){if(!i)throw new Error("Failed parsing directory contents: Empty response");return ze(we(i),(function(i){const o=D(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=L().join(e,"/"),{multistatus:{response:s}}=t,a=s.map((t=>{const e=function(t){try{return t.replace(/^https?:\/\/[^\/]+/,"")}catch(t){throw new _(t,"Failed normalising HREF")}}(t.href),{propstat:{prop:n}}=t;return Te(n,"/"===o?decodeURIComponent($(e)):$(L().relative(decodeURIComponent(o),decodeURIComponent(e))),r)}));return i?a:a.filter((t=>t.basename&&("file"===t.type||t.filename!==n.replace(/\/$/,""))))}(i,D(t.remoteBasePath||t.remotePath),o,n.details,n.includeSelf);return n.glob&&(s=function(t,e){return t.filter((t=>Ft(t.filename,e,{matchBase:!0})))}(s,n.glob)),pe(r,s,n.details)}))}))}))}));function He(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}const We=He((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=bt({url:M(t.remoteURL,P(e)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[Qe]},t,n);return Ye(yt(r,t),(function(e){return fe(t,e),Ye(e.text(),(function(t){return pe(e,t,n.details)}))}))}));function Ye(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const qe=He((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=bt({url:M(t.remoteURL,P(e)),method:"GET"},t,n);return Ye(yt(r,t),(function(e){let r;return fe(t,e),function(t,e){var n=t();return n&&n.then?n.then(e):e()}((function(){return Ye(e.arrayBuffer(),(function(t){r=t}))}),(function(){return pe(e,r,n.details)}))}))})),Ze=He((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 _({info:{code:Q.InvalidOutputFormat}},`Invalid output format: ${r}`);return"text"===r?We(t,e,n):qe(t,e,n)})),Qe=t=>t;function Ke(t){return new me.XMLBuilder({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(Je({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:t}}},"d"))}function Je(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}`]=Je(n[t],e),delete n[t]):!1===/^@_/.test(t)&&(n[`${e}:${t}`]=n[t],delete n[t]));return n}function tn(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function en(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}const nn=en((function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=bt({url:M(t.remoteURL,P(e)),method:"UNLOCK",headers:{"Lock-Token":n}},t,r);return tn(yt(i,t),(function(e){if(fe(t,e),204!==e.status&&200!==e.status)throw he(e)}))})),rn=en((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{refreshToken:r,timeout:i=on}=n,o={Accept:"text/plain,application/xml",Timeout:i};r&&(o.If=r);const s=bt({url:M(t.remoteURL,P(e)),method:"LOCK",headers:o,data:Ke(t.contactHref)},t,n);return tn(yt(s,t),(function(e){return fe(t,e),tn(e.text(),(function(t){const n=(o=t,new me.XMLParser({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(o)),r=ye().get(n,"prop.lockdiscovery.activelock.locktoken.href"),i=ye().get(n,"prop.lockdiscovery.activelock.timeout");var o;if(!r)throw he(e,"No lock token received: ");return{token:r,serverTimeout:i}}))}))})),on="Infinite, Second-4100000000";function sn(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const an=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.path||"/",r=bt({url:M(t.remoteURL,n),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},t,e);return sn(yt(r,t),(function(n){return fe(t,n),sn(n.text(),(function(t){return sn(we(t),(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:Ae(r)}:null}catch(t){}return null}(t);return pe(n,r,e.details)}))}))}))}));function un(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;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{details:r=!1}=n,i=bt({url:M(t.remoteURL,P(e)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":t.headers["Content-Type"]||"application/xml; charset=utf-8"}},t,n);return un(yt(i,t),(function(n){return fe(t,n),un(n.text(),(function(t){return un(we(t),(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(P(e).replace(/\/$/,"")))),t.multistatus.response.forEach((t=>{if(void 0===t.propstat)return;const e=t.href.split("/").map(decodeURIComponent).join("/");r.results.push(Te(t.propstat.prop,e,n))})),r}(t,e,r);return pe(n,i,r)}))}))}))})),ln=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=bt({url:M(t.remoteURL,P(e)),method:"MOVE",headers:{Destination:M(t.remoteURL,P(n)),Overwrite:!1===r.overwrite?"F":"T"}},t,r);return s=function(e){fe(t,e)},(o=yt(i,t))&&o.then||(o=Promise.resolve(o)),s?o.then(s):o;var o,s}));var hn=T(172);const fn=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e,n){let r=arguments.length>3&&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}`:`${function(t){if(ft(t))return t.byteLength;if(pt(t))return t.length;if("string"==typeof t)return(0,hn.d)(t);throw new _({info:{code:Q.DataTypeNoLength}},"Cannot calculate data length: Invalid type")}(n)}`),o||(s["If-None-Match"]="*");const a=bt({url:M(t.remoteURL,P(e)),method:"PUT",headers:s,data:n},t,r);return c=function(e){try{fe(t,e)}catch(t){const e=t;if(412!==e.status||o)throw e;return!1}return!0},(u=yt(a,t))&&u.then||(u=Promise.resolve(u)),c?u.then(c):u;var u,c})),pn=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=bt({url:M(t.remoteURL,P(e)),method:"OPTIONS"},t,n);return o=function(e){try{fe(t,e)}catch(t){throw t}return{compliance:(e.headers.get("DAV")??"").split(",").map((t=>t.trim())),server:e.headers.get("Server")??""}},(i=yt(r,t))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o}));function dn(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const gn=yn((function(t,e,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(n>r||n<0)throw new _({info:{code:Q.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=bt({url:M(t.remoteURL,P(e)),method:"PUT",headers:s,data:i},t,o);return dn(yt(a,t),(function(e){fe(t,e)}))}));function mn(t,e){var n=t();return n&&n.then?n.then(e):e(n)}const En=yn((function(t,e,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(n>r||n<0)throw new _({info:{code:Q.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=bt({url:M(t.remoteURL,P(e)),method:"PATCH",headers:s,data:i},t,o);return dn(yt(a,t),(function(e){fe(t,e)}))}));function yn(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}const bn=yn((function(t,e,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return dn(pn(t,e,o),(function(s){let a=!1;return mn((function(){if(s.compliance.includes("sabredav-partialupdate"))return dn(En(t,e,n,r,i,o),(function(t){return a=!0,t}))}),(function(u){let c=!1;return a?u:mn((function(){if(s.server.includes("Apache")&&s.compliance.includes("<http://apache.org/dav/propset/fs/1>"))return dn(gn(t,e,n,r,i,o),(function(t){return c=!0,t}))}),(function(t){if(c)return t;throw new _({info:{code:Q.NotSupported}},"Not supported")}))}))}))})),vn="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function wn(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{authType:n=null,remoteBasePath:r,contactHref:i=vn,ha1:o,headers:s={},httpAgent:a,httpsAgent:u,password:c,token:l,username:h,withCredentials:f}=e;let p=n;p||(p=h||c?Z.Password:Z.None);const d={authType:p,remoteBasePath:r,contactHref:i,ha1:o,headers:Object.assign({},s),httpAgent:a,httpsAgent:u,password:c,remotePath:U(t),remoteURL:t,token:l,username:h,withCredentials:f};return K(d,h,c,l,o),{copyFile:(t,e,n)=>de(d,t,e,n),createDirectory:(t,e)=>Ue(d,t,e),createReadStream:(t,e)=>function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=new(0,Fe().PassThrough);return je(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]:ke;const i=new(0,Fe().PassThrough),o={};!1===n.overwrite&&(o["If-None-Match"]="*");const s=bt({url:M(t.remoteURL,P(e)),method:"PUT",headers:o,data:i,maxRedirects:0},t,n);return yt(s,t).then((e=>fe(t,e))).then((t=>{setTimeout((()=>{r(t)}),0)})).catch((t=>{i.emit("error",t)})),i}(d,t,e,n),customRequest:(t,e)=>Be(d,t,e),deleteFile:(t,e)=>Ge(d,t,e),exists:(t,e)=>Ve(d,t,e),getDirectoryContents:(t,e)=>Xe(d,t,e),getFileContents:(t,e)=>Ze(d,t,e),getFileDownloadLink:t=>function(t,e){let n=M(t.remoteURL,P(e));const r=/^https:/i.test(n)?"https":"http";switch(t.authType){case Z.None:break;case Z.Password:{const e=z(t.headers.Authorization.replace(/^Basic /i,"").trim());n=n.replace(/^https?:\/\//,`${r}://${e}@`);break}default:throw new _({info:{code:Q.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${t.authType}`)}return n}(d,t),getFileUploadLink:t=>function(t,e){let n=`${M(t.remoteURL,P(e))}?Content-Type=application/octet-stream`;const r=/^https:/i.test(n)?"https":"http";switch(t.authType){case Z.None:break;case Z.Password:{const e=z(t.headers.Authorization.replace(/^Basic /i,"").trim());n=n.replace(/^https?:\/\//,`${r}://${e}@`);break}default:throw new _({info:{code:Q.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${t.authType}`)}return n}(d,t),getHeaders:()=>Object.assign({},d.headers),getQuota:t=>an(d,t),lock:(t,e)=>rn(d,t,e),moveFile:(t,e,n)=>ln(d,t,e,n),putFileContents:(t,e,n)=>fn(d,t,e,n),partialUpdateFileContents:(t,e,n,r,i)=>bn(d,t,e,n,r,i),getDAVCompliance:t=>pn(d,t),search:(t,e)=>cn(d,t,e),setHeaders:t=>{d.headers=Object.assign({},t)},stat:(t,e)=>Oe(d,t,e),unlock:(t,e,n)=>nn(d,t,e,n)}}var Tn=(t=>(t[t.Debug=0]="Debug",t[t.Info=1]="Info",t[t.Warn=2]="Warn",t[t.Error=3]="Error",t[t.Fatal=4]="Fatal",t))(Tn||{}),Nn=Object.defineProperty,An=(t,e,n)=>(((t,e,n)=>{e in t?Nn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(t,"symbol"!=typeof e?e+"":e,n),n);class In{constructor(t){An(this,"context"),this.context=t||{}}formatMessage(t,e,n){let r="["+Tn[e].toUpperCase()+"] ";return n&&n.app&&(r+=n.app+": "),"string"==typeof t?r+t:(r+="Unexpected ".concat(t.name),t.message&&(r+=' "'.concat(t.message,'"')),e===Tn.Debug&&t.stack&&(r+="\n\nStack trace:\n".concat(t.stack)),r)}log(t,e,n){var r,i;if(!("number"==typeof(null==(r=this.context)?void 0:r.level)&&t<(null==(i=this.context)?void 0:i.level)))switch("object"==typeof e&&void 0===(null==n?void 0:n.error)&&(n.error=e),t){case Tn.Debug:console.debug(this.formatMessage(e,Tn.Debug,n),n);break;case Tn.Info:console.info(this.formatMessage(e,Tn.Info,n),n);break;case Tn.Warn:console.warn(this.formatMessage(e,Tn.Warn,n),n);break;case Tn.Error:console.error(this.formatMessage(e,Tn.Error,n),n);break;case Tn.Fatal:default:console.error(this.formatMessage(e,Tn.Fatal,n),n)}}debug(t,e){this.log(Tn.Debug,t,Object.assign({},this.context,e))}info(t,e){this.log(Tn.Info,t,Object.assign({},this.context,e))}warn(t,e){this.log(Tn.Warn,t,Object.assign({},this.context,e))}error(t,e){this.log(Tn.Error,t,Object.assign({},this.context,e))}fatal(t,e){this.log(Tn.Fatal,t,Object.assign({},this.context,e))}}function On(t){return new In(t)}var Rn=Object.defineProperty,_n=(t,e,n)=>(((t,e,n)=>{e in t?Rn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(t,"symbol"!=typeof e?e+"":e,n),n);class Sn{constructor(t){_n(this,"context"),_n(this,"factory"),this.context={},this.factory=t}setApp(t){return this.context.app=t,this}setLogLevel(t){return this.context.level=t,this}setUid(t){return this.context.uid=t,this}detectUser(){const t=d();return null!==t&&(this.context.uid=t.uid),this}detectLogLevel(){const t=this,e=()=>{var n,r;"complete"===document.readyState||"interactive"===document.readyState?(t.context.level=null!=(r=null==(n=window._oc_config)?void 0:n.loglevel)?r:Tn.Warn,window._oc_debug&&(t.context.level=Tn.Debug),document.removeEventListener("readystatechange",e)):document.addEventListener("readystatechange",e)};return e(),this}build(){return void 0===this.context.level&&this.detectLogLevel(),this.factory(this.context)}}function Ln(){return new Sn(On)}n(57975);const xn=Ln().setApp("@f7cloud/files").detectUser().build();m()?g("files_sharing","sharingToken",null)??document.querySelector('input#sharingToken[type="hidden"]'):d();!function(){const t=((t,e)=>{var n;return(null!=(n=null==e?void 0:e.baseURL)?n:E())+(t=>"/remote.php/"+t)(t)})("dav");m()&&t.replace("remote.php","public.php")}();EventTarget;var Cn=n(83141);const{entries:Pn,setPrototypeOf:Dn,isFrozen:$n,getPrototypeOf:Un,getOwnPropertyDescriptor:Mn}=Object;let{freeze:Fn,seal:jn,create:kn}=Object,{apply:Bn,construct:Gn}="undefined"!=typeof Reflect&&Reflect;Fn||(Fn=function(t){return t}),jn||(jn=function(t){return t}),Bn||(Bn=function(t,e,n){return t.apply(e,n)}),Gn||(Gn=function(t,e){return new t(...e)});const Vn=ir(Array.prototype.forEach),zn=ir(Array.prototype.lastIndexOf),Xn=ir(Array.prototype.pop),Hn=ir(Array.prototype.push),Wn=ir(Array.prototype.splice),Yn=ir(String.prototype.toLowerCase),qn=ir(String.prototype.toString),Zn=ir(String.prototype.match),Qn=ir(String.prototype.replace),Kn=ir(String.prototype.indexOf),Jn=ir(String.prototype.trim),tr=ir(Object.prototype.hasOwnProperty),er=ir(RegExp.prototype.test),nr=(rr=TypeError,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Gn(rr,e)});var rr;function ir(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Bn(t,e,r)}}function or(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Yn;Dn&&Dn(t,null);let r=e.length;for(;r--;){let i=e[r];if("string"==typeof i){const t=n(i);t!==i&&($n(e)||(e[r]=t),i=t)}t[i]=!0}return t}function sr(t){for(let e=0;e<t.length;e++){tr(t,e)||(t[e]=null)}return t}function ar(t){const e=kn(null);for(const[n,r]of Pn(t)){tr(t,n)&&(Array.isArray(r)?e[n]=sr(r):r&&"object"==typeof r&&r.constructor===Object?e[n]=ar(r):e[n]=r)}return e}function ur(t,e){for(;null!==t;){const n=Mn(t,e);if(n){if(n.get)return ir(n.get);if("function"==typeof n.value)return ir(n.value)}t=Un(t)}return function(){return null}}const cr=Fn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),lr=Fn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),hr=Fn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),fr=Fn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),pr=Fn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),dr=Fn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),gr=Fn(["#text"]),mr=Fn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Er=Fn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),yr=Fn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),br=Fn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),vr=jn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),wr=jn(/<%[\w\W]*|[\w\W]*%>/gm),Tr=jn(/\$\{[\w\W]*/gm),Nr=jn(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ar=jn(/^aria-[\-\w]+$/),Ir=jn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Or=jn(/^(?:\w+script|data):/i),Rr=jn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_r=jn(/^html$/i),Sr=jn(/^[a-z][.\w]*(-[.\w]+)+$/i);var Lr=Object.freeze({__proto__:null,ARIA_ATTR:Ar,ATTR_WHITESPACE:Rr,CUSTOM_ELEMENT:Sr,DATA_ATTR:Nr,DOCTYPE_NAME:_r,ERB_EXPR:wr,IS_ALLOWED_URI:Ir,IS_SCRIPT_OR_DATA:Or,MUSTACHE_EXPR:vr,TMPLIT_EXPR:Tr});const xr=1,Cr=3,Pr=7,Dr=8,$r=9,Ur=function(){return"undefined"==typeof window?null:window};var Mr=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ur();const n=e=>t(e);if(n.version="3.2.6",n.removed=[],!e||!e.document||e.document.nodeType!==$r||!e.Element)return n.isSupported=!1,n;let{document:r}=e;const i=r,o=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:u,Element:c,NodeFilter:l,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:p,trustedTypes:d}=e,g=c.prototype,m=ur(g,"cloneNode"),E=ur(g,"remove"),y=ur(g,"nextSibling"),b=ur(g,"childNodes"),v=ur(g,"parentNode");if("function"==typeof a){const t=r.createElement("template");t.content&&t.content.ownerDocument&&(r=t.content.ownerDocument)}let w,T="";const{implementation:N,createNodeIterator:A,createDocumentFragment:I,getElementsByTagName:O}=r,{importNode:R}=i;let _={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof Pn&&"function"==typeof v&&N&&void 0!==N.createHTMLDocument;const{MUSTACHE_EXPR:S,ERB_EXPR:L,TMPLIT_EXPR:x,DATA_ATTR:C,ARIA_ATTR:P,IS_SCRIPT_OR_DATA:D,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:U}=Lr;let{IS_ALLOWED_URI:M}=Lr,F=null;const j=or({},[...cr,...lr,...hr,...pr,...gr]);let k=null;const B=or({},[...mr,...Er,...yr,...br]);let G=Object.seal(kn(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),V=null,z=null,X=!0,H=!0,W=!1,Y=!0,q=!1,Z=!0,Q=!1,K=!1,J=!1,tt=!1,et=!1,nt=!1,rt=!0,it=!1,ot=!0,st=!1,at={},ut=null;const ct=or({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let lt=null;const ht=or({},["audio","video","img","source","image","track"]);let ft=null;const pt=or({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),dt="http://www.w3.org/1998/Math/MathML",gt="http://www.w3.org/2000/svg",mt="http://www.w3.org/1999/xhtml";let Et=mt,yt=!1,bt=null;const vt=or({},[dt,gt,mt],qn);let wt=or({},["mi","mo","mn","ms","mtext"]),Tt=or({},["annotation-xml"]);const Nt=or({},["title","style","font","a","script"]);let At=null;const It=["application/xhtml+xml","text/html"];let Ot=null,Rt=null;const _t=r.createElement("form"),St=function(t){return t instanceof RegExp||t instanceof Function},Lt=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Rt||Rt!==t){if(t&&"object"==typeof t||(t={}),t=ar(t),At=-1===It.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,Ot="application/xhtml+xml"===At?qn:Yn,F=tr(t,"ALLOWED_TAGS")?or({},t.ALLOWED_TAGS,Ot):j,k=tr(t,"ALLOWED_ATTR")?or({},t.ALLOWED_ATTR,Ot):B,bt=tr(t,"ALLOWED_NAMESPACES")?or({},t.ALLOWED_NAMESPACES,qn):vt,ft=tr(t,"ADD_URI_SAFE_ATTR")?or(ar(pt),t.ADD_URI_SAFE_ATTR,Ot):pt,lt=tr(t,"ADD_DATA_URI_TAGS")?or(ar(ht),t.ADD_DATA_URI_TAGS,Ot):ht,ut=tr(t,"FORBID_CONTENTS")?or({},t.FORBID_CONTENTS,Ot):ct,V=tr(t,"FORBID_TAGS")?or({},t.FORBID_TAGS,Ot):ar({}),z=tr(t,"FORBID_ATTR")?or({},t.FORBID_ATTR,Ot):ar({}),at=!!tr(t,"USE_PROFILES")&&t.USE_PROFILES,X=!1!==t.ALLOW_ARIA_ATTR,H=!1!==t.ALLOW_DATA_ATTR,W=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Y=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,q=t.SAFE_FOR_TEMPLATES||!1,Z=!1!==t.SAFE_FOR_XML,Q=t.WHOLE_DOCUMENT||!1,tt=t.RETURN_DOM||!1,et=t.RETURN_DOM_FRAGMENT||!1,nt=t.RETURN_TRUSTED_TYPE||!1,J=t.FORCE_BODY||!1,rt=!1!==t.SANITIZE_DOM,it=t.SANITIZE_NAMED_PROPS||!1,ot=!1!==t.KEEP_CONTENT,st=t.IN_PLACE||!1,M=t.ALLOWED_URI_REGEXP||Ir,Et=t.NAMESPACE||mt,wt=t.MATHML_TEXT_INTEGRATION_POINTS||wt,Tt=t.HTML_INTEGRATION_POINTS||Tt,G=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&St(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&St(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(G.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),q&&(H=!1),et&&(tt=!0),at&&(F=or({},gr),k=[],!0===at.html&&(or(F,cr),or(k,mr)),!0===at.svg&&(or(F,lr),or(k,Er),or(k,br)),!0===at.svgFilters&&(or(F,hr),or(k,Er),or(k,br)),!0===at.mathMl&&(or(F,pr),or(k,yr),or(k,br))),t.ADD_TAGS&&(F===j&&(F=ar(F)),or(F,t.ADD_TAGS,Ot)),t.ADD_ATTR&&(k===B&&(k=ar(k)),or(k,t.ADD_ATTR,Ot)),t.ADD_URI_SAFE_ATTR&&or(ft,t.ADD_URI_SAFE_ATTR,Ot),t.FORBID_CONTENTS&&(ut===ct&&(ut=ar(ut)),or(ut,t.FORBID_CONTENTS,Ot)),ot&&(F["#text"]=!0),Q&&or(F,["html","head","body"]),F.table&&(or(F,["tbody"]),delete V.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw nr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw nr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=t.TRUSTED_TYPES_POLICY,T=w.createHTML("")}else void 0===w&&(w=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(d,o)),null!==w&&"string"==typeof T&&(T=w.createHTML(""));Fn&&Fn(t),Rt=t}},xt=or({},[...lr,...hr,...fr]),Ct=or({},[...pr,...dr]),Pt=function(t){Hn(n.removed,{element:t});try{v(t).removeChild(t)}catch(e){E(t)}},Dt=function(t,e){try{Hn(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){Hn(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(tt||et)try{Pt(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},$t=function(t){let e=null,n=null;if(J)t="<remove></remove>"+t;else{const e=Zn(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===At&&Et===mt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const i=w?w.createHTML(t):t;if(Et===mt)try{e=(new p).parseFromString(i,At)}catch(t){}if(!e||!e.documentElement){e=N.createDocument(Et,"template",null);try{e.documentElement.innerHTML=yt?T:i}catch(t){}}const o=e.body||e.documentElement;return t&&n&&o.insertBefore(r.createTextNode(n),o.childNodes[0]||null),Et===mt?O.call(e,Q?"html":"body")[0]:Q?e.documentElement:o},Ut=function(t){return A.call(t.ownerDocument||t,t,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Mt=function(t){return t instanceof f&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof h)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Ft=function(t){return"function"==typeof u&&t instanceof u};function jt(t,e,r){Vn(t,(t=>{t.call(n,e,r,Rt)}))}const kt=function(t){let e=null;if(jt(_.beforeSanitizeElements,t,null),Mt(t))return Pt(t),!0;const r=Ot(t.nodeName);if(jt(_.uponSanitizeElement,t,{tagName:r,allowedTags:F}),Z&&t.hasChildNodes()&&!Ft(t.firstElementChild)&&er(/<[/\w!]/g,t.innerHTML)&&er(/<[/\w!]/g,t.textContent))return Pt(t),!0;if(t.nodeType===Pr)return Pt(t),!0;if(Z&&t.nodeType===Dr&&er(/<[/\w]/g,t.data))return Pt(t),!0;if(!F[r]||V[r]){if(!V[r]&&Gt(r)){if(G.tagNameCheck instanceof RegExp&&er(G.tagNameCheck,r))return!1;if(G.tagNameCheck instanceof Function&&G.tagNameCheck(r))return!1}if(ot&&!ut[r]){const e=v(t)||t.parentNode,n=b(t)||t.childNodes;if(n&&e){for(let r=n.length-1;r>=0;--r){const i=m(n[r],!0);i.__removalCount=(t.__removalCount||0)+1,e.insertBefore(i,y(t))}}}return Pt(t),!0}return t instanceof c&&!function(t){let e=v(t);e&&e.tagName||(e={namespaceURI:Et,tagName:"template"});const n=Yn(t.tagName),r=Yn(e.tagName);return!!bt[t.namespaceURI]&&(t.namespaceURI===gt?e.namespaceURI===mt?"svg"===n:e.namespaceURI===dt?"svg"===n&&("annotation-xml"===r||wt[r]):Boolean(xt[n]):t.namespaceURI===dt?e.namespaceURI===mt?"math"===n:e.namespaceURI===gt?"math"===n&&Tt[r]:Boolean(Ct[n]):t.namespaceURI===mt?!(e.namespaceURI===gt&&!Tt[r])&&!(e.namespaceURI===dt&&!wt[r])&&!Ct[n]&&(Nt[n]||!xt[n]):!("application/xhtml+xml"!==At||!bt[t.namespaceURI]))}(t)?(Pt(t),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!er(/<\/no(script|embed|frames)/i,t.innerHTML)?(q&&t.nodeType===Cr&&(e=t.textContent,Vn([S,L,x],(t=>{e=Qn(e,t," ")})),t.textContent!==e&&(Hn(n.removed,{element:t.cloneNode()}),t.textContent=e)),jt(_.afterSanitizeElements,t,null),!1):(Pt(t),!0)},Bt=function(t,e,n){if(rt&&("id"===e||"name"===e)&&(n in r||n in _t))return!1;if(H&&!z[e]&&er(C,e));else if(X&&er(P,e));else if(!k[e]||z[e]){if(!(Gt(t)&&(G.tagNameCheck instanceof RegExp&&er(G.tagNameCheck,t)||G.tagNameCheck instanceof Function&&G.tagNameCheck(t))&&(G.attributeNameCheck instanceof RegExp&&er(G.attributeNameCheck,e)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(e))||"is"===e&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&er(G.tagNameCheck,n)||G.tagNameCheck instanceof Function&&G.tagNameCheck(n))))return!1}else if(ft[e]);else if(er(M,Qn(n,$,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==Kn(n,"data:")||!lt[t]){if(W&&!er(D,Qn(n,$,"")));else if(n)return!1}else;return!0},Gt=function(t){return"annotation-xml"!==t&&Zn(t,U)},Vt=function(t){jt(_.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||Mt(t))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:k,forceKeepAttr:void 0};let i=e.length;for(;i--;){const o=e[i],{name:s,namespaceURI:a,value:u}=o,c=Ot(s),l=u;let h="value"===s?l:Jn(l);if(r.attrName=c,r.attrValue=h,r.keepAttr=!0,r.forceKeepAttr=void 0,jt(_.uponSanitizeAttribute,t,r),h=r.attrValue,!it||"id"!==c&&"name"!==c||(Dt(s,t),h="user-content-"+h),Z&&er(/((--!?|])>)|<\/(style|title)/i,h)){Dt(s,t);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Dt(s,t);continue}if(!Y&&er(/\/>/i,h)){Dt(s,t);continue}q&&Vn([S,L,x],(t=>{h=Qn(h,t," ")}));const f=Ot(t.nodeName);if(Bt(f,c,h)){if(w&&"object"==typeof d&&"function"==typeof d.getAttributeType)if(a);else switch(d.getAttributeType(f,c)){case"TrustedHTML":h=w.createHTML(h);break;case"TrustedScriptURL":h=w.createScriptURL(h)}if(h!==l)try{a?t.setAttributeNS(a,s,h):t.setAttribute(s,h),Mt(t)?Pt(t):Xn(n.removed)}catch(e){Dt(s,t)}}else Dt(s,t)}jt(_.afterSanitizeAttributes,t,null)},zt=function t(e){let n=null;const r=Ut(e);for(jt(_.beforeSanitizeShadowDOM,e,null);n=r.nextNode();)jt(_.uponSanitizeShadowNode,n,null),kt(n),Vt(n),n.content instanceof s&&t(n.content);jt(_.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,a=null,c=null;if(yt=!t,yt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Ft(t)){if("function"!=typeof t.toString)throw nr("toString is not a function");if("string"!=typeof(t=t.toString()))throw nr("dirty is not a string, aborting")}if(!n.isSupported)return t;if(K||Lt(e),n.removed=[],"string"==typeof t&&(st=!1),st){if(t.nodeName){const e=Ot(t.nodeName);if(!F[e]||V[e])throw nr("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof u)r=$t("\x3c!----\x3e"),o=r.ownerDocument.importNode(t,!0),o.nodeType===xr&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!tt&&!q&&!Q&&-1===t.indexOf("<"))return w&&nt?w.createHTML(t):t;if(r=$t(t),!r)return tt?null:nt?T:""}r&&J&&Pt(r.firstChild);const l=Ut(st?t:r);for(;a=l.nextNode();)kt(a),Vt(a),a.content instanceof s&&zt(a.content);if(st)return t;if(tt){if(et)for(c=I.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(k.shadowroot||k.shadowrootmode)&&(c=R.call(i,c,!0)),c}let h=Q?r.outerHTML:r.innerHTML;return Q&&F["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&er(_r,r.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+h),q&&Vn([S,L,x],(t=>{h=Qn(h,t," ")})),w&&nt?w.createHTML(h):h},n.setConfig=function(){Lt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),K=!0},n.clearConfig=function(){Rt=null,K=!1},n.isValidAttribute=function(t,e,n){Rt||Lt({});const r=Ot(t),i=Ot(e);return Bt(r,i,n)},n.addHook=function(t,e){"function"==typeof e&&Hn(_[t],e)},n.removeHook=function(t,e){if(void 0!==e){const n=zn(_[t],e);return-1===n?void 0:Wn(_[t],n,1)[0]}return Xn(_[t])},n.removeHooks=function(t){_[t]=[]},n.removeAllHooks=function(){_={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),Fr=n(70580);function jr(t){return{translations:globalThis._oc_l10n_registry_translations[t]??{},pluralFunction:globalThis._oc_l10n_registry_plural_functions[t]??(t=>t)}}function kr(t,e,n,r,i){const o="object"==typeof n?n:void 0,s="number"==typeof r?r:"number"==typeof n?n:void 0,a={escape:!0,sanitize:!0,..."object"==typeof i?i:"object"==typeof r?r:{}},u=t=>t,c=(a.sanitize?Mr.sanitize:u)||u,l=a.escape?Fr:u,h=t=>"string"==typeof t||"number"==typeof t;let f=(i?.bundle??jr(t)).translations[e]||e;return f=Array.isArray(f)?f[0]:f,c("object"==typeof o||void 0!==s?(p=o,d=s,f.replace(/%n/g,""+d).replace(/{([^{}]*)}/g,((t,e)=>{if(void 0===p||!(e in p))return l(t);const n=p[e];return h(n)?l(`${n}`):"object"==typeof n&&h(n.value)?(!1!==n.escape?Fr:u)(`${n.value}`):l(t)}))):f);var p,d}globalThis._nc_l10n_locale??="undefined"!=typeof document&&document.documentElement.dataset.locale||Intl.DateTimeFormat().resolvedOptions().locale.replaceAll(/-/g,"_"),globalThis._nc_l10n_language??="undefined"!=typeof document&&document.documentElement.lang||(globalThis.navigator?.language??"en"),globalThis._oc_l10n_registry_translations??={},globalThis._oc_l10n_registry_plural_functions??={};var Br=n(65606),Gr=n(48287).Buffer,Vr=(t=>(t.DEFAULT="default",t.HIDDEN="hidden",t))(Vr||{});var zr,Xr,Hr,Wr;function Yr(){if(Xr)return zr;Xr=1;const t="object"==typeof Br&&Br.env&&Br.env.NODE_DEBUG&&/\bsemver\b/i.test(Br.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};return zr=t}function qr(){if(Wr)return Hr;Wr=1;const t=Number.MAX_SAFE_INTEGER||9007199254740991;return Hr={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 Zr,Qr,Kr,Jr,ti,ei,ni,ri,ii,oi,si,ai={exports:{}};function ui(){return Zr||(Zr=1,function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=qr(),o=Yr(),s=(e=t.exports={}).re=[],a=e.safeRe=[],u=e.src=[],c=e.t={};let l=0;const h="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",i],[h,r]],p=(t,e,n)=>{const r=(t=>{for(const[e,n]of f)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t})(e),i=l++;o(t,i,e),c[t]=i,u[i]=e,s[i]=new RegExp(e,n?"g":void 0),a[i]=new RegExp(r,n?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`),p("MAINVERSION",`(${u[c.NUMERICIDENTIFIER]})\\.(${u[c.NUMERICIDENTIFIER]})\\.(${u[c.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${u[c.NUMERICIDENTIFIERLOOSE]})\\.(${u[c.NUMERICIDENTIFIERLOOSE]})\\.(${u[c.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${u[c.NUMERICIDENTIFIER]}|${u[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${u[c.NUMERICIDENTIFIERLOOSE]}|${u[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${u[c.PRERELEASEIDENTIFIER]}(?:\\.${u[c.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${u[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[c.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${h}+`),p("BUILD",`(?:\\+(${u[c.BUILDIDENTIFIER]}(?:\\.${u[c.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${u[c.MAINVERSION]}${u[c.PRERELEASE]}?${u[c.BUILD]}?`),p("FULL",`^${u[c.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${u[c.MAINVERSIONLOOSE]}${u[c.PRERELEASELOOSE]}?${u[c.BUILD]}?`),p("LOOSE",`^${u[c.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${u[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${u[c.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${u[c.XRANGEIDENTIFIER]})(?:\\.(${u[c.XRANGEIDENTIFIER]})(?:\\.(${u[c.XRANGEIDENTIFIER]})(?:${u[c.PRERELEASE]})?${u[c.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${u[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[c.XRANGEIDENTIFIERLOOSE]})(?:${u[c.PRERELEASELOOSE]})?${u[c.BUILD]}?)?)?`),p("XRANGE",`^${u[c.GTLT]}\\s*${u[c.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${u[c.GTLT]}\\s*${u[c.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),p("COERCE",`${u[c.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",u[c.COERCEPLAIN]+`(?:${u[c.PRERELEASE]})?(?:${u[c.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",u[c.COERCE],!0),p("COERCERTLFULL",u[c.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${u[c.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",p("TILDE",`^${u[c.LONETILDE]}${u[c.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${u[c.LONETILDE]}${u[c.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${u[c.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",p("CARET",`^${u[c.LONECARET]}${u[c.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${u[c.LONECARET]}${u[c.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${u[c.GTLT]}\\s*(${u[c.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${u[c.GTLT]}\\s*(${u[c.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${u[c.GTLT]}\\s*(${u[c.LOOSEPLAIN]}|${u[c.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${u[c.XRANGEPLAIN]})\\s+-\\s+(${u[c.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${u[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[c.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(ai,ai.exports)),ai.exports}function ci(){if(ni)return ei;ni=1;const t=Yr(),{MAX_LENGTH:e,MAX_SAFE_INTEGER:n}=qr(),{safeRe:r,t:i}=ui(),o=function(){if(Kr)return Qr;Kr=1;const t=Object.freeze({loose:!0}),e=Object.freeze({});return Qr=n=>n?"object"!=typeof n?t:n:e}(),{compareIdentifiers:s}=function(){if(ti)return Jr;ti=1;const t=/^[0-9]+$/,e=(e,n)=>{const r=t.test(e),i=t.test(n);return r&&i&&(e=+e,n=+n),e===n?0:r&&!i?-1:i&&!r?1:e<n?-1:1};return Jr={compareIdentifiers:e,rcompareIdentifiers:(t,n)=>e(n,t)}}();class a{constructor(s,u){if(u=o(u),s instanceof a){if(s.loose===!!u.loose&&s.includePrerelease===!!u.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,u),this.options=u,this.loose=!!u.loose,this.includePrerelease=!!u.includePrerelease;const c=s.trim().match(u.loose?r[i.LOOSE]:r[i.FULL]);if(!c)throw new TypeError(`Invalid Version: ${s}`);if(this.raw=s,this.major=+c[1],this.minor=+c[2],this.patch=+c[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");c[4]?this.prerelease=c[4].split(".").map((t=>{if(/^[0-9]+$/.test(t)){const e=+t;if(e>=0&&e<n)return e}return t})):this.prerelease=[],this.build=c[5]?c[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(t("SemVer.compare",this.version,this.options,e),!(e instanceof a)){if("string"==typeof e&&e===this.version)return 0;e=new a(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(t){return t instanceof a||(t=new a(t,this.options)),s(this.major,t.major)||s(this.minor,t.minor)||s(this.patch,t.patch)}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){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"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(!e&&!1===n)throw new Error("invalid increment argument: identifier is empty");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 ei=a}!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}}}();oi=(e,n)=>{const r=t(e,n);return r?r.version:null}}();var li,hi;!function(){if(hi)return li;hi=1;const t=ci();li=(e,n)=>new t(e,n).major}();var fi,pi={};fi||(fi=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<r;e++)t[n[e]]=""}(o),o.q=o.c="",o.bufferCheckPosition=t.MAX_BUFFER_LENGTH,o.opt=i||{},o.opt.lowercase=o.opt.lowercase||o.opt.lowercasetags,o.looseCase=o.opt.lowercase?"toLowerCase":"toUpperCase",o.tags=[],o.closed=o.closedRoot=o.sawRoot=!1,o.tag=o.error=null,o.strict=!!e,o.noscript=!(!e&&!o.opt.noscript),o.state=N.BEGIN,o.strictEntities=o.opt.strictEntities,o.ENTITIES=o.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),o.attribList=[],o.opt.xmlns&&(o.ns=Object.create(l)),void 0===o.opt.unquotedAttributeValues&&(o.opt.unquotedAttributeValues=!e),o.trackPosition=!1!==o.opt.position,o.trackPosition&&(o.position=o.line=o.column=0),I(o,"onready")}t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(t){function e(){}return e.prototype=t,new e}),Object.keys||(Object.keys=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}),r.prototype={end:function(){L(this)},write:function(e){var r=this;if(this.error)throw this.error;if(r.closed)return S(r,"Cannot write after close. Assign an onready handler.");if(null===e)return L(r);"object"==typeof e&&(e=e.toString());for(var i=0,o="";o=j(e,i++),r.c=o,o;)switch(r.trackPosition&&(r.position++,"\n"===o?(r.line++,r.column=0):r.column++),r.state){case N.BEGIN:if(r.state=N.BEGIN_WHITESPACE,"\ufeff"===o)continue;F(r,o);continue;case N.BEGIN_WHITESPACE:F(r,o);continue;case N.TEXT:if(r.sawRoot&&!r.closedRoot){for(var u=i-1;o&&"<"!==o&&"&"!==o;)(o=j(e,i++))&&r.trackPosition&&(r.position++,"\n"===o?(r.line++,r.column=0):r.column++);r.textNode+=e.substring(u,i-1)}"<"!==o||r.sawRoot&&r.closedRoot&&!r.strict?(g(o)||r.sawRoot&&!r.closedRoot||x(r,"Text data outside of root node."),"&"===o?r.state=N.TEXT_ENTITY:r.textNode+=o):(r.state=N.OPEN_WAKA,r.startTagPosition=r.position);continue;case N.SCRIPT:"<"===o?r.state=N.SCRIPT_ENDING:r.script+=o;continue;case N.SCRIPT_ENDING:"/"===o?r.state=N.CLOSE_TAG:(r.script+="<"+o,r.state=N.SCRIPT);continue;case N.OPEN_WAKA:if("!"===o)r.state=N.SGML_DECL,r.sgmlDecl="";else if(g(o));else if(y(h,o))r.state=N.OPEN_TAG,r.tagName=o;else if("/"===o)r.state=N.CLOSE_TAG,r.tagName="";else if("?"===o)r.state=N.PROC_INST,r.procInstName=r.procInstBody="";else{if(x(r,"Unencoded <"),r.startTagPosition+1<r.position){var c=r.position-r.startTagPosition;o=new Array(c).join(" ")+o}r.textNode+="<"+o,r.state=N.TEXT}continue;case N.SGML_DECL:if(r.sgmlDecl+o==="--"){r.state=N.COMMENT,r.comment="",r.sgmlDecl="";continue}r.doctype&&!0!==r.doctype&&r.sgmlDecl?(r.state=N.DOCTYPE_DTD,r.doctype+="<!"+r.sgmlDecl+o,r.sgmlDecl=""):(r.sgmlDecl+o).toUpperCase()===s?(O(r,"onopencdata"),r.state=N.CDATA,r.sgmlDecl="",r.cdata=""):(r.sgmlDecl+o).toUpperCase()===a?(r.state=N.DOCTYPE,(r.doctype||r.sawRoot)&&x(r,"Inappropriately located doctype declaration"),r.doctype="",r.sgmlDecl=""):">"===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?(x(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:y(f,o)?r.tagName+=o:(C(r),">"===o?$(r):"/"===o?r.state=N.OPEN_TAG_SLASH:(g(o)||x(r,"Invalid character in tag name"),r.state=N.ATTRIB));continue;case N.OPEN_TAG_SLASH:">"===o?($(r,!0),U(r)):(x(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:y(h,o)?(r.attribName=o,r.attribValue="",r.state=N.ATTRIB_NAME):x(r,"Invalid attribute name");continue;case N.ATTRIB_NAME:"="===o?r.state=N.ATTRIB_VALUE:">"===o?(x(r,"Attribute without value"),r.attribValue=r.attribName,D(r),$(r)):g(o)?r.state=N.ATTRIB_NAME_SAW_WHITE:y(f,o)?r.attribName+=o:x(r,"Invalid attribute name");continue;case N.ATTRIB_NAME_SAW_WHITE:if("="===o)r.state=N.ATTRIB_VALUE;else{if(g(o))continue;x(r,"Attribute without value"),r.tag.attributes[r.attribName]="",r.attribValue="",O(r,"onattribute",{name:r.attribName,value:""}),r.attribName="",">"===o?$(r):y(h,o)?(r.attribName=o,r.state=N.ATTRIB_NAME):(x(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||S(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:y(h,o)?(x(r,"No whitespace between attributes"),r.attribName=o,r.attribValue="",r.state=N.ATTRIB_NAME):x(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?U(r):y(f,o)?r.tagName+=o:r.script?(r.script+="</"+r.tagName,r.tagName="",r.state=N.SCRIPT):(g(o)||x(r,"Invalid tagname in closing tag"),r.state=N.CLOSE_TAG_SAW_WHITE);else{if(g(o))continue;b(h,o)?r.script?(r.script+="</"+o,r.state=N.SCRIPT):x(r,"Invalid tagname in closing tag."):r.tagName=o}continue;case N.CLOSE_TAG_SAW_WHITE:if(g(o))continue;">"===o?U(r):x(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,v;switch(r.state){case N.TEXT_ENTITY:l=N.TEXT,v="textNode";break;case N.ATTRIB_VALUE_ENTITY_Q:l=N.ATTRIB_VALUE_QUOTED,v="attribValue";break;case N.ATTRIB_VALUE_ENTITY_U:l=N.ATTRIB_VALUE_UNQUOTED,v="attribValue"}if(";"===o){var w=M(r);r.opt.unparsedEntities&&!Object.values(t.XML_ENTITIES).includes(w)?(r.entity="",r.state=l,r.write(w)):(r[v]+=w,r.entity="",r.state=l)}else y(r.entity.length?d:p,o)?r.entity+=o:(x(r,"Invalid character in entity name"),r[v]+="&"+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;o<s;o++){var a=e[n[o]].length;if(a>r)switch(n[o]){case"textNode":R(e);break;case"cdata":O(e,"oncdata",e.cdata),e.cdata="";break;case"script":O(e,"onscript",e.script),e.script="";break;default:S(e,"Max buffer length exceeded: "+n[o])}i=Math.max(i,a)}var u=t.MAX_BUFFER_LENGTH-i;e.bufferCheckPosition=u+e.position}(r),r},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var t;R(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 Gr&&"function"==typeof Gr.isBuffer&&Gr.isBuffer(t)){if(!this._decoder){var e=Cn.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",u="http://www.w3.org/XML/1998/namespace",c="http://www.w3.org/2000/xmlns/",l={xml:u,xmlns:c},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 y(t,e){return t.test(e)}function b(t,e){return!y(t,e)}var v,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&&R(t),I(t,e,n)}function R(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 S(t,e){return R(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 L(t){return t.sawRoot&&!t.closedRoot&&x(t,"Unclosed root tag"),t.state!==N.BEGIN&&t.state!==N.BEGIN_WHITESPACE&&t.state!==N.TEXT&&S(t,"Unexpected end"),R(t),t.c="",t.closed=!0,I(t,"onend"),r.call(t,t.strict,t.opt),t}function x(t,e){if("object"!=typeof t||!(t instanceof r))throw new Error("bad call to strictFail");t.strict&&S(t,e)}function C(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 P(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=P(t.attribName,!0),n=e.prefix,r=e.local;if("xmlns"===n)if("xml"===r&&t.attribValue!==u)x(t,"xml: prefix must be bound to "+u+"\nActual: "+t.attribValue);else if("xmlns"===r&&t.attribValue!==c)x(t,"xmlns: prefix must be bound to "+c+"\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=P(t.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(x(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<s;o++){var a=t.attribList[o],u=a[0],c=a[1],l=P(u,!0),h=l.prefix,f=l.local,p=""===h?"":n.ns[h]||"",d={name:u,value:c,prefix:h,local:f,uri:p};h&&"xmlns"!==h&&!p&&(x(t,"Unbound namespace prefix: "+JSON.stringify(h)),d.uri=h),t.tag.attributes[u]=d,O(t,"onattribute",d)}t.attribList.length=0}t.tag.isSelfClosing=!!e,t.sawRoot=!0,t.tags.push(t.tag),O(t,"onopentag",t.tag),e||(t.noscript||"script"!==t.tagName.toLowerCase()?t.state=N.TEXT:t.state=N.SCRIPT,t.tag=null,t.tagName=""),t.attribName=t.attribValue="",t.attribList.length=0}function U(t){if(!t.tagName)return x(t,"Weird empty close tag."),t.textNode+="</>",void(t.state=N.TEXT);if(t.script){if("script"!==t.tagName)return t.script+="</"+t.tagName+">",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;)x(t,"Unexpected close tag");if(e<0)return x(t,"Unmatched closing tag: "+t.tagName),t.textNode+="</"+t.tagName+">",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 u=t.tags[t.tags.length-1]||t;t.opt.xmlns&&o.ns!==u.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 M(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?(x(t,"Invalid character entity"),"&"+t.entity+";"):String.fromCodePoint(e))}function F(t,e){"<"===e?(t.state=N.OPEN_WAKA,t.startTagPosition=t.position):g(e)||(x(t,"Non-whitespace before first tag."),t.textNode=e,t.state=N.TEXT)}function j(t,e){var n="";return e<t.length&&(n=t.charAt(e)),n}N=t.STATE,String.fromCodePoint||(v=String.fromCharCode,w=Math.floor,T=function(){var t,e,n=[],r=-1,i=arguments.length;if(!i)return"";for(var o="";++r<i;){var s=Number(arguments[r]);if(!isFinite(s)||s<0||s>1114111||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+=v.apply(null,n),n.length=0)}return o},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:T,configurable:!0,writable:!0}):String.fromCodePoint=T)}(pi));Error;var di=function(){try{return g("core","capabilities")}catch{return console.debug("Could not find capabilities initial state fall back to _oc_capabilities"),"_oc_capabilities"in window?window._oc_capabilities:{}}}(),gi=new(function(){function t(){this.capabilities=di.richdocuments}return t.prototype.getCapabilities=function(){return this.capabilities},t.prototype.setCapabilities=function(t){this.capabilities=t},t.prototype.updateCapability=function(t,e){this.capabilities[t]=e},t}()),mi=function(){return gi.getCapabilities()};const Ei=new class{_action;constructor(t){this.validateAction(t),this._action=t}get id(){return this._action.id}get displayName(){return this._action.displayName}get title(){return this._action.title}get iconSvgInline(){return this._action.iconSvgInline}get enabled(){return this._action.enabled}get exec(){return this._action.exec}get execBatch(){return this._action.execBatch}get hotkey(){return this._action.hotkey}get order(){return this._action.order}get parent(){return this._action.parent}get default(){return this._action.default}get destructive(){return this._action.destructive}get inline(){return this._action.inline}get renderInline(){return this._action.renderInline}validateAction(t){if(!t.id||"string"!=typeof t.id)throw new Error("Invalid id");if(!t.displayName||"function"!=typeof t.displayName)throw new Error("Invalid displayName function");if("title"in t&&"function"!=typeof t.title)throw new Error("Invalid title function");if(!t.iconSvgInline||"function"!=typeof t.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!t.exec||"function"!=typeof t.exec)throw new Error("Invalid exec function");if("enabled"in t&&"function"!=typeof t.enabled)throw new Error("Invalid enabled function");if("execBatch"in t&&"function"!=typeof t.execBatch)throw new Error("Invalid execBatch function");if("order"in t&&"number"!=typeof t.order)throw new Error("Invalid order");if(void 0!==t.destructive&&"boolean"!=typeof t.destructive)throw new Error("Invalid destructive flag");if("parent"in t&&"string"!=typeof t.parent)throw new Error("Invalid parent");if(t.default&&!Object.values(Vr).includes(t.default))throw new Error("Invalid default");if("inline"in t&&"function"!=typeof t.inline)throw new Error("Invalid inline function");if("renderInline"in t&&"function"!=typeof t.renderInline)throw new Error("Invalid renderInline function");if("hotkey"in t&&void 0!==t.hotkey){if("object"!=typeof t.hotkey)throw new Error("Invalid hotkey configuration");if("string"!=typeof t.hotkey.key||!t.hotkey.key)throw new Error("Missing or invalid hotkey key");if("string"!=typeof t.hotkey.description||!t.hotkey.description)throw new Error("Missing or invalid hotkey description")}}}({id:"office-open-pdf",iconSvgInline:()=>'<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg xmlns="http://www.w3.org/2000/svg" height="32" width="32" version="1.0" viewBox="0 0 32 32">\n <path style="color:#000000;block-progression:tb;text-transform:none;text-indent:0" fill="#fff" d="m4.6992 2.004c-0.395 0.0764-0.7062 0.4666-0.6992 0.875v26.244c0 0.46 0.4122 0.876 0.8632 0.876h22.276c0.452 0 0.864-0.416 0.864-0.876v-20.284c-0.008-0.1338-0.046-0.266-0.11-0.383l-6.624-6.3984c-0.086-0.0328-0.178-0.051-0.27-0.0546h-16.137c-0.0532-0.0053-0.11-0.0053-0.1636 0zm3.3008 3.996h12v2h-12v-2zm0 6h10v2h-10v-2zm0 6h16v2h-16v-2zm0 6h8v2h-8v-2z"/>\n</svg>'.replaceAll(/#(fff|0{6})/g,"currentColor"),displayName:()=>kr("richdocuments","Edit with {productName}",{productName:mi().productName}),enabled:t=>{if(1!==t.length)return!1;const e="application/pdf"===t[0].mime,n=mi().mimetypesNoDefaultOpen;return e&&n.includes("application/pdf")},exec:t=>{OCA.Viewer&&OCA.Viewer.openWith("richdocuments",{path:t.path})}});var yi;yi=Ei,void 0===window._nc_fileactions&&(window._nc_fileactions=[],xn.debug("FileActions initialized")),window._nc_fileactions.find((t=>t.id===yi.id))?xn.error(`FileAction ${yi.id} already registered`,{action:yi}):window._nc_fileactions.push(yi)})()})();
//# sourceMappingURL=richdocuments-fileActions.js.map?v=d2bdf2223159349acfdb