← Back
Editing: index-kwZOOyqh.chunk.mjs
import{p as Qt,g as Je,a as Wr,o as Yr}from"./index-CdM8BgQf.chunk.mjs";import{B as Ie,g as Hr,e as lr}from"./NcLoadingIcon-CBTC2zMe.chunk.mjs";import{i as tn,g as Zr,d as Qr}from"./NcNoteCard-CwNXZ4vV-Dyi378DT.chunk.mjs";import{b as Kr}from"./index-DCzdQJ7L.chunk.mjs";import{g as re}from"./vue.runtime.esm-B7-PK3p1.chunk.mjs";import{g as Jr}from"./index-Bnw2WuIx.chunk.mjs";import{g as ti}from"./emoji-picker-hi3Hwbeu.chunk.mjs";function Ut(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function On(e,t,n){ei(e,t),t.set(e,n)}function ei(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function pt(e,t){var n=hr(e,t,"get");return ni(e,n)}function ni(e,t){return t.get?t.get.call(e):t.value}function In(e,t,n){var i=hr(e,t,"set");return ri(e,i,n),n}function hr(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function ri(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}var ii=typeof Symbol<"u"?Symbol.toStringTag:"@@toStringTag",dt=new WeakMap,Wt=new WeakMap;class ye{constructor(t){var{executor:n=()=>{},internals:i=nn(),promise:a=new Promise((u,c)=>n(u,c,l=>{i.onCancelList.push(l)}))}=t;On(this,dt,{writable:!0,value:void 0}),On(this,Wt,{writable:!0,value:void 0}),Ut(this,ii,"CancelablePromise"),this.cancel=this.cancel.bind(this),In(this,dt,i),In(this,Wt,a||new Promise((u,c)=>n(u,c,l=>{i.onCancelList.push(l)})))}then(t,n){return ce(pt(this,Wt).then(ie(t,pt(this,dt)),ie(n,pt(this,dt))),pt(this,dt))}catch(t){return ce(pt(this,Wt).catch(ie(t,pt(this,dt))),pt(this,dt))}finally(t,n){return n&&pt(this,dt).onCancelList.push(t),ce(pt(this,Wt).finally(ie(()=>{if(t)return n&&(pt(this,dt).onCancelList=pt(this,dt).onCancelList.filter(i=>i!==t)),t()},pt(this,dt))),pt(this,dt))}cancel(){pt(this,dt).isCanceled=!0;var t=pt(this,dt).onCancelList;pt(this,dt).onCancelList=[];for(var n of t)if(typeof n=="function")try{n()}catch(i){console.error(i)}}isCanceled(){return pt(this,dt).isCanceled===!0}}class Pt extends ye{constructor(t){super({executor:t})}}Ut(Pt,"all",function(e){return se(e,Promise.all(e))}),Ut(Pt,"allSettled",function(e){return se(e,Promise.allSettled(e))}),Ut(Pt,"any",function(e){return se(e,Promise.any(e))}),Ut(Pt,"race",function(e){return se(e,Promise.race(e))}),Ut(Pt,"resolve",function(e){return Tn(Promise.resolve(e))}),Ut(Pt,"reject",function(e){return Tn(Promise.reject(e))}),Ut(Pt,"isCancelable",en);function Tn(e){return ce(e,nn())}function en(e){return e instanceof Pt||e instanceof ye}function ie(e,t){if(e)return n=>{if(!t.isCanceled){var i=e(n);return en(i)&&t.onCancelList.push(i.cancel),i}return n}}function ce(e,t){return new ye({internals:t,promise:e})}function se(e,t){var n=nn();return n.onCancelList.push(()=>{for(var i of e)en(i)&&i.cancel()}),new ye({internals:n,promise:t})}function nn(){return{isCanceled:!1,onCancelList:[]}}var Te={},si={2:e=>{function t(a,u,c){a instanceof RegExp&&(a=n(a,c)),u instanceof RegExp&&(u=n(u,c));var l=i(a,u,c);return l&&{start:l[0],end:l[1],pre:c.slice(0,l[0]),body:c.slice(l[0]+a.length,l[1]),post:c.slice(l[1]+u.length)}}function n(a,u){var c=u.match(a);return c?c[0]:null}function i(a,u,c){var l,m,f,s,d,p=c.indexOf(a),v=c.indexOf(u,p+1),w=p;if(p>=0&&v>0){for(l=[],f=c.length;w>=0&&!d;)w==p?(l.push(w),p=c.indexOf(a,w+1)):l.length==1?d=[l.pop(),v]:((m=l.pop())<f&&(f=m,s=v),v=c.indexOf(u,w+1)),w=p<v&&p>=0?p:v;l.length&&(d=[f,s])}return d}e.exports=t,t.range=i},101:function(e,t,n){var i;e=n.nmd(e),(function(a){var u=(e&&e.exports,typeof re=="object"&&re);u.global!==u&&u.window;var c=function(d){this.message=d};(c.prototype=new Error).name="InvalidCharacterError";var l=function(d){throw new c(d)},m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=/[\t\n\f\r ]/g,s={encode:function(d){d=String(d),/[^\0-\xFF]/.test(d)&&l("The string to be encoded contains characters outside of the Latin1 range.");for(var p,v,w,E,O=d.length%3,I="",h=-1,b=d.length-O;++h<b;)p=d.charCodeAt(h)<<16,v=d.charCodeAt(++h)<<8,w=d.charCodeAt(++h),I+=m.charAt((E=p+v+w)>>18&63)+m.charAt(E>>12&63)+m.charAt(E>>6&63)+m.charAt(63&E);return O==2?(p=d.charCodeAt(h)<<8,v=d.charCodeAt(++h),I+=m.charAt((E=p+v)>>10)+m.charAt(E>>4&63)+m.charAt(E<<2&63)+"="):O==1&&(E=d.charCodeAt(h),I+=m.charAt(E>>2)+m.charAt(E<<4&63)+"=="),I},decode:function(d){var p=(d=String(d).replace(f,"")).length;p%4==0&&(p=(d=d.replace(/==?$/,"")).length),(p%4==1||/[^+a-zA-Z0-9/]/.test(d))&&l("Invalid character: the string to be decoded is not correctly encoded.");for(var v,w,E=0,O="",I=-1;++I<p;)w=m.indexOf(d.charAt(I)),v=E%4?64*v+w:w,E++%4&&(O+=String.fromCharCode(255&v>>(-2*E&6)));return O},version:"1.0.0"};(i=function(){return s}.call(t,n,t,e))===void 0||(e.exports=i)})()},172:(e,t)=>{t.d=function(n){if(!n)return 0;for(var i=(n=n.toString()).length,a=n.length;a--;){var u=n.charCodeAt(a);56320<=u&&u<=57343&&a--,127<u&&u<=2047?i++:2047<u&&u<=65535&&(i+=2)}return i}},526:e=>{var t={utf8:{stringToBytes:function(n){return t.bin.stringToBytes(unescape(encodeURIComponent(n)))},bytesToString:function(n){return decodeURIComponent(escape(t.bin.bytesToString(n)))}},bin:{stringToBytes:function(n){for(var i=[],a=0;a<n.length;a++)i.push(255&n.charCodeAt(a));return i},bytesToString:function(n){for(var i=[],a=0;a<n.length;a++)i.push(String.fromCharCode(n[a]));return i.join("")}}};e.exports=t},298:e=>{var t,n;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(i,a){return i<<a|i>>>32-a},rotr:function(i,a){return i<<32-a|i>>>a},endian:function(i){if(i.constructor==Number)return 16711935&n.rotl(i,8)|4278255360&n.rotl(i,24);for(var a=0;a<i.length;a++)i[a]=n.endian(i[a]);return i},randomBytes:function(i){for(var a=[];i>0;i--)a.push(Math.floor(256*Math.random()));return a},bytesToWords:function(i){for(var a=[],u=0,c=0;u<i.length;u++,c+=8)a[c>>>5]|=i[u]<<24-c%32;return a},wordsToBytes:function(i){for(var a=[],u=0;u<32*i.length;u+=8)a.push(i[u>>>5]>>>24-u%32&255);return a},bytesToHex:function(i){for(var a=[],u=0;u<i.length;u++)a.push((i[u]>>>4).toString(16)),a.push((15&i[u]).toString(16));return a.join("")},hexToBytes:function(i){for(var a=[],u=0;u<i.length;u+=2)a.push(parseInt(i.substr(u,2),16));return a},bytesToBase64:function(i){for(var a=[],u=0;u<i.length;u+=3)for(var c=i[u]<<16|i[u+1]<<8|i[u+2],l=0;l<4;l++)8*u+6*l<=8*i.length?a.push(t.charAt(c>>>6*(3-l)&63)):a.push("=");return a.join("")},base64ToBytes:function(i){i=i.replace(/[^A-Z0-9+\/]/gi,"");for(var a=[],u=0,c=0;u<i.length;c=++u%4)c!=0&&a.push((t.indexOf(i.charAt(u-1))&Math.pow(2,-2*c+8)-1)<<2*c|t.indexOf(i.charAt(u))>>>6-2*c);return a}},e.exports=n},635:(e,t,n)=>{const i=n(31),a=n(338),u=n(221);e.exports={XMLParser:a,XMLValidator:i,XMLBuilder:u}},118:e=>{e.exports=function(t){return typeof t=="function"?t:Array.isArray(t)?n=>{for(const i of t)if(typeof i=="string"&&n===i||i instanceof RegExp&&i.test(n))return!0}:()=>!1}},705:(e,t)=>{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",i="["+n+"]["+n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",a=new RegExp("^"+i+"$");t.isExist=function(u){return u!==void 0},t.isEmptyObject=function(u){return Object.keys(u).length===0},t.merge=function(u,c,l){if(c){const m=Object.keys(c),f=m.length;for(let s=0;s<f;s++)u[m[s]]=l==="strict"?[c[m[s]]]:c[m[s]]}},t.getValue=function(u){return t.isExist(u)?u:""},t.isName=function(u){return a.exec(u)!=null},t.getAllMatches=function(u,c){const l=[];let m=c.exec(u);for(;m;){const f=[];f.startIndex=c.lastIndex-m[0].length;const s=m.length;for(let d=0;d<s;d++)f.push(m[d]);l.push(f),m=c.exec(u)}return l},t.nameRegexp=i},31:(e,t,n)=>{const i=n(705),a={allowBooleanAttributes:!1,unpairedTags:[]};function u(h){return h===" "||h===" "||h===` `||h==="\r"}function c(h,b){const T=b;for(;b<h.length;b++)if(!(h[b]!="?"&&h[b]!=" ")){const P=h.substr(T,b-T);if(b>5&&P==="xml")return w("InvalidXml","XML declaration allowed only at the start of the document.",O(h,b));if(h[b]=="?"&&h[b+1]==">"){b++;break}}return b}function l(h,b){if(h.length>b+5&&h[b+1]==="-"&&h[b+2]==="-"){for(b+=3;b<h.length;b++)if(h[b]==="-"&&h[b+1]==="-"&&h[b+2]===">"){b+=2;break}}else if(h.length>b+8&&h[b+1]==="D"&&h[b+2]==="O"&&h[b+3]==="C"&&h[b+4]==="T"&&h[b+5]==="Y"&&h[b+6]==="P"&&h[b+7]==="E"){let T=1;for(b+=8;b<h.length;b++)if(h[b]==="<")T++;else if(h[b]===">"&&(T--,T===0))break}else if(h.length>b+9&&h[b+1]==="["&&h[b+2]==="C"&&h[b+3]==="D"&&h[b+4]==="A"&&h[b+5]==="T"&&h[b+6]==="A"&&h[b+7]==="["){for(b+=8;b<h.length;b++)if(h[b]==="]"&&h[b+1]==="]"&&h[b+2]===">"){b+=2;break}}return b}t.validate=function(h,b){b=Object.assign({},a,b);const T=[];let P=!1,R=!1;h[0]==="\uFEFF"&&(h=h.substr(1));for(let S=0;S<h.length;S++)if(h[S]==="<"&&h[S+1]==="?"){if(S+=2,S=c(h,S),S.err)return S}else{if(h[S]!=="<"){if(u(h[S]))continue;return w("InvalidChar","char '"+h[S]+"' is not expected.",O(h,S))}{let A=S;if(S++,h[S]==="!"){S=l(h,S);continue}{let U=!1;h[S]==="/"&&(U=!0,S++);let M="";for(;S<h.length&&h[S]!==">"&&h[S]!==" "&&h[S]!==" "&&h[S]!==` `&&h[S]!=="\r";S++)M+=h[S];if(M=M.trim(),M[M.length-1]==="/"&&(M=M.substring(0,M.length-1),S--),L=M,!i.isName(L)){let F;return F=M.trim().length===0?"Invalid space after '<'.":"Tag '"+M+"' is an invalid name.",w("InvalidTag",F,O(h,S))}const C=s(h,S);if(C===!1)return w("InvalidAttr","Attributes for '"+M+"' have open quote.",O(h,S));let D=C.value;if(S=C.index,D[D.length-1]==="/"){const F=S-D.length;D=D.substring(0,D.length-1);const G=p(D,b);if(G!==!0)return w(G.err.code,G.err.msg,O(h,F+G.err.line));P=!0}else if(U){if(!C.tagClosed)return w("InvalidTag","Closing tag '"+M+"' doesn't have proper closing.",O(h,S));if(D.trim().length>0)return w("InvalidTag","Closing tag '"+M+"' can't have attributes or invalid starting.",O(h,A));if(T.length===0)return w("InvalidTag","Closing tag '"+M+"' has not been opened.",O(h,A));{const F=T.pop();if(M!==F.tagName){let G=O(h,F.tagStartPos);return w("InvalidTag","Expected closing tag '"+F.tagName+"' (opened in line "+G.line+", col "+G.col+") instead of closing tag '"+M+"'.",O(h,A))}T.length==0&&(R=!0)}}else{const F=p(D,b);if(F!==!0)return w(F.err.code,F.err.msg,O(h,S-D.length+F.err.line));if(R===!0)return w("InvalidXml","Multiple possible root nodes found.",O(h,S));b.unpairedTags.indexOf(M)!==-1||T.push({tagName:M,tagStartPos:A}),P=!0}for(S++;S<h.length;S++)if(h[S]==="<"){if(h[S+1]==="!"){S++,S=l(h,S);continue}if(h[S+1]!=="?")break;if(S=c(h,++S),S.err)return S}else if(h[S]==="&"){const F=v(h,S);if(F==-1)return w("InvalidChar","char '&' is not expected.",O(h,S));S=F}else if(R===!0&&!u(h[S]))return w("InvalidXml","Extra text at the end",O(h,S));h[S]==="<"&&S--}}}var L;return P?T.length==1?w("InvalidTag","Unclosed tag '"+T[0].tagName+"'.",O(h,T[0].tagStartPos)):!(T.length>0)||w("InvalidXml","Invalid '"+JSON.stringify(T.map((S=>S.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):w("InvalidXml","Start tag expected.",1)};const m='"',f="'";function s(h,b){let T="",P="",R=!1;for(;b<h.length;b++){if(h[b]===m||h[b]===f)P===""?P=h[b]:P!==h[b]||(P="");else if(h[b]===">"&&P===""){R=!0;break}T+=h[b]}return P===""&&{value:T,index:b,tagClosed:R}}const d=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function p(h,b){const T=i.getAllMatches(h,d),P={};for(let R=0;R<T.length;R++){if(T[R][1].length===0)return w("InvalidAttr","Attribute '"+T[R][2]+"' has no space in starting.",I(T[R]));if(T[R][3]!==void 0&&T[R][4]===void 0)return w("InvalidAttr","Attribute '"+T[R][2]+"' is without value.",I(T[R]));if(T[R][3]===void 0&&!b.allowBooleanAttributes)return w("InvalidAttr","boolean attribute '"+T[R][2]+"' is not allowed.",I(T[R]));const L=T[R][2];if(!E(L))return w("InvalidAttr","Attribute '"+L+"' is an invalid name.",I(T[R]));if(P.hasOwnProperty(L))return w("InvalidAttr","Attribute '"+L+"' is repeated.",I(T[R]));P[L]=1}return!0}function v(h,b){if(h[++b]===";")return-1;if(h[b]==="#")return(function(P,R){let L=/\d/;for(P[R]==="x"&&(R++,L=/[\da-fA-F]/);R<P.length;R++){if(P[R]===";")return R;if(!P[R].match(L))break}return-1})(h,++b);let T=0;for(;b<h.length;b++,T++)if(!(h[b].match(/\w/)&&T<20)){if(h[b]===";")break;return-1}return b}function w(h,b,T){return{err:{code:h,msg:b,line:T.line||T,col:T.col}}}function E(h){return i.isName(h)}function O(h,b){const T=h.substring(0,b).split(/\r?\n/);return{line:T.length,col:T[T.length-1].length+1}}function I(h){return h.startIndex+h[1].length}},221:(e,t,n)=>{const i=n(87),a=n(118),u={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(s,d){return d},attributeValueProcessor:function(s,d){return d},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function c(s){this.options=Object.assign({},u,s),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=a(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=f),this.processTextOrObjNode=l,this.options.format?(this.indentate=m,this.tagEndChar=`> `,this.newLine=` `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function l(s,d,p,v){const w=this.j2x(s,p+1,v.concat(d));return s[this.options.textNodeName]!==void 0&&Object.keys(s).length===1?this.buildTextValNode(s[this.options.textNodeName],d,w.attrStr,p):this.buildObjectNode(w.val,d,w.attrStr,p)}function m(s){return this.options.indentBy.repeat(s)}function f(s){return!(!s.startsWith(this.options.attributeNamePrefix)||s===this.options.textNodeName)&&s.substr(this.attrPrefixLen)}c.prototype.build=function(s){return this.options.preserveOrder?i(s,this.options):(Array.isArray(s)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(s={[this.options.arrayNodeName]:s}),this.j2x(s,0,[]).val)},c.prototype.j2x=function(s,d,p){let v="",w="";const E=p.join(".");for(let O in s)if(Object.prototype.hasOwnProperty.call(s,O))if(s[O]===void 0)this.isAttribute(O)&&(w+="");else if(s[O]===null)this.isAttribute(O)?w+="":O[0]==="?"?w+=this.indentate(d)+"<"+O+"?"+this.tagEndChar:w+=this.indentate(d)+"<"+O+"/"+this.tagEndChar;else if(s[O]instanceof Date)w+=this.buildTextValNode(s[O],O,"",d);else if(typeof s[O]!="object"){const I=this.isAttribute(O);if(I&&!this.ignoreAttributesFn(I,E))v+=this.buildAttrPairStr(I,""+s[O]);else if(!I)if(O===this.options.textNodeName){let h=this.options.tagValueProcessor(O,""+s[O]);w+=this.replaceEntitiesValue(h)}else w+=this.buildTextValNode(s[O],O,"",d)}else if(Array.isArray(s[O])){const I=s[O].length;let h="",b="";for(let T=0;T<I;T++){const P=s[O][T];if(P!==void 0)if(P===null)O[0]==="?"?w+=this.indentate(d)+"<"+O+"?"+this.tagEndChar:w+=this.indentate(d)+"<"+O+"/"+this.tagEndChar;else if(typeof P=="object")if(this.options.oneListGroup){const R=this.j2x(P,d+1,p.concat(O));h+=R.val,this.options.attributesGroupName&&P.hasOwnProperty(this.options.attributesGroupName)&&(b+=R.attrStr)}else h+=this.processTextOrObjNode(P,O,d,p);else if(this.options.oneListGroup){let R=this.options.tagValueProcessor(O,P);R=this.replaceEntitiesValue(R),h+=R}else h+=this.buildTextValNode(P,O,"",d)}this.options.oneListGroup&&(h=this.buildObjectNode(h,O,b,d)),w+=h}else if(this.options.attributesGroupName&&O===this.options.attributesGroupName){const I=Object.keys(s[O]),h=I.length;for(let b=0;b<h;b++)v+=this.buildAttrPairStr(I[b],""+s[O][I[b]])}else w+=this.processTextOrObjNode(s[O],O,d,p);return{attrStr:v,val:w}},c.prototype.buildAttrPairStr=function(s,d){return d=this.options.attributeValueProcessor(s,""+d),d=this.replaceEntitiesValue(d),this.options.suppressBooleanAttributes&&d==="true"?" "+s:" "+s+'="'+d+'"'},c.prototype.buildObjectNode=function(s,d,p,v){if(s==="")return d[0]==="?"?this.indentate(v)+"<"+d+p+"?"+this.tagEndChar:this.indentate(v)+"<"+d+p+this.closeTag(d)+this.tagEndChar;{let w="</"+d+this.tagEndChar,E="";return d[0]==="?"&&(E="?",w=""),!p&&p!==""||s.indexOf("<")!==-1?this.options.commentPropName!==!1&&d===this.options.commentPropName&&E.length===0?this.indentate(v)+`<!--${s}-->`+this.newLine:this.indentate(v)+"<"+d+p+E+this.tagEndChar+s+this.indentate(v)+w:this.indentate(v)+"<"+d+p+E+">"+s+w}},c.prototype.closeTag=function(s){let d="";return this.options.unpairedTags.indexOf(s)!==-1?this.options.suppressUnpairedNode||(d="/"):d=this.options.suppressEmptyNode?"/":`></${s}`,d},c.prototype.buildTextValNode=function(s,d,p,v){if(this.options.cdataPropName!==!1&&d===this.options.cdataPropName)return this.indentate(v)+`<![CDATA[${s}]]>`+this.newLine;if(this.options.commentPropName!==!1&&d===this.options.commentPropName)return this.indentate(v)+`<!--${s}-->`+this.newLine;if(d[0]==="?")return this.indentate(v)+"<"+d+p+"?"+this.tagEndChar;{let w=this.options.tagValueProcessor(d,s);return w=this.replaceEntitiesValue(w),w===""?this.indentate(v)+"<"+d+p+this.closeTag(d)+this.tagEndChar:this.indentate(v)+"<"+d+p+">"+w+"</"+d+this.tagEndChar}},c.prototype.replaceEntitiesValue=function(s){if(s&&s.length>0&&this.options.processEntities)for(let d=0;d<this.options.entities.length;d++){const p=this.options.entities[d];s=s.replace(p.regex,p.val)}return s},e.exports=c},87:e=>{function t(c,l,m,f){let s="",d=!1;for(let p=0;p<c.length;p++){const v=c[p],w=n(v);if(w===void 0)continue;let E="";if(E=m.length===0?w:`${m}.${w}`,w===l.textNodeName){let b=v[w];a(E,l)||(b=l.tagValueProcessor(w,b),b=u(b,l)),d&&(s+=f),s+=b,d=!1;continue}if(w===l.cdataPropName){d&&(s+=f),s+=`<![CDATA[${v[w][0][l.textNodeName]}]]>`,d=!1;continue}if(w===l.commentPropName){s+=f+`<!--${v[w][0][l.textNodeName]}-->`,d=!0;continue}if(w[0]==="?"){const b=i(v[":@"],l),T=w==="?xml"?"":f;let P=v[w][0][l.textNodeName];P=P.length!==0?" "+P:"",s+=T+`<${w}${P}${b}?>`,d=!0;continue}let O=f;O!==""&&(O+=l.indentBy);const I=f+`<${w}${i(v[":@"],l)}`,h=t(v[w],l,E,O);l.unpairedTags.indexOf(w)!==-1?l.suppressUnpairedNode?s+=I+">":s+=I+"/>":h&&h.length!==0||!l.suppressEmptyNode?h&&h.endsWith(">")?s+=I+`>${h}${f}</${w}>`:(s+=I+">",h&&f!==""&&(h.includes("/>")||h.includes("</"))?s+=f+l.indentBy+h+f:s+=h,s+=`</${w}>`):s+=I+"/>",d=!0}return s}function n(c){const l=Object.keys(c);for(let m=0;m<l.length;m++){const f=l[m];if(c.hasOwnProperty(f)&&f!==":@")return f}}function i(c,l){let m="";if(c&&!l.ignoreAttributes)for(let f in c){if(!c.hasOwnProperty(f))continue;let s=l.attributeValueProcessor(f,c[f]);s=u(s,l),s===!0&&l.suppressBooleanAttributes?m+=` ${f.substr(l.attributeNamePrefix.length)}`:m+=` ${f.substr(l.attributeNamePrefix.length)}="${s}"`}return m}function a(c,l){let m=(c=c.substr(0,c.length-l.textNodeName.length-1)).substr(c.lastIndexOf(".")+1);for(let f in l.stopNodes)if(l.stopNodes[f]===c||l.stopNodes[f]==="*."+m)return!0;return!1}function u(c,l){if(c&&c.length>0&&l.processEntities)for(let m=0;m<l.entities.length;m++){const f=l.entities[m];c=c.replace(f.regex,f.val)}return c}e.exports=function(c,l){let m="";return l.format&&l.indentBy.length>0&&(m=` `),t(c,l,"",m)}},193:(e,t,n)=>{const i=n(705);function a(d,p){let v="";for(;p<d.length&&d[p]!=="'"&&d[p]!=='"';p++)v+=d[p];if(v=v.trim(),v.indexOf(" ")!==-1)throw new Error("External entites are not supported");const w=d[p++];let E="";for(;p<d.length&&d[p]!==w;p++)E+=d[p];return[v,E,p]}function u(d,p){return d[p+1]==="!"&&d[p+2]==="-"&&d[p+3]==="-"}function c(d,p){return d[p+1]==="!"&&d[p+2]==="E"&&d[p+3]==="N"&&d[p+4]==="T"&&d[p+5]==="I"&&d[p+6]==="T"&&d[p+7]==="Y"}function l(d,p){return d[p+1]==="!"&&d[p+2]==="E"&&d[p+3]==="L"&&d[p+4]==="E"&&d[p+5]==="M"&&d[p+6]==="E"&&d[p+7]==="N"&&d[p+8]==="T"}function m(d,p){return d[p+1]==="!"&&d[p+2]==="A"&&d[p+3]==="T"&&d[p+4]==="T"&&d[p+5]==="L"&&d[p+6]==="I"&&d[p+7]==="S"&&d[p+8]==="T"}function f(d,p){return d[p+1]==="!"&&d[p+2]==="N"&&d[p+3]==="O"&&d[p+4]==="T"&&d[p+5]==="A"&&d[p+6]==="T"&&d[p+7]==="I"&&d[p+8]==="O"&&d[p+9]==="N"}function s(d){if(i.isName(d))return d;throw new Error(`Invalid entity name ${d}`)}e.exports=function(d,p){const v={};if(d[p+3]!=="O"||d[p+4]!=="C"||d[p+5]!=="T"||d[p+6]!=="Y"||d[p+7]!=="P"||d[p+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{p+=9;let w=1,E=!1,O=!1,I="";for(;p<d.length;p++)if(d[p]!=="<"||O)if(d[p]===">"){if(O?d[p-1]==="-"&&d[p-2]==="-"&&(O=!1,w--):w--,w===0)break}else d[p]==="["?E=!0:I+=d[p];else{if(E&&c(d,p)){let h,b;p+=7,[h,b,p]=a(d,p+1),b.indexOf("&")===-1&&(v[s(h)]={regx:RegExp(`&${h};`,"g"),val:b})}else if(E&&l(d,p))p+=8;else if(E&&m(d,p))p+=8;else if(E&&f(d,p))p+=9;else{if(!u)throw new Error("Invalid DOCTYPE");O=!0}w++,I=""}if(w!==0)throw new Error("Unclosed DOCTYPE")}return{entities:v,i:p}}},63:(e,t)=>{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(i,a){return a},attributeValueProcessor:function(i,a){return a},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(i,a,u){return i}};t.buildOptions=function(i){return Object.assign({},n,i)},t.defaultOptions=n},299:(e,t,n)=>{const i=n(705),a=n(365),u=n(193),c=n(494),l=n(118);function m(R){const L=Object.keys(R);for(let S=0;S<L.length;S++){const A=L[S];this.lastEntities[A]={regex:new RegExp("&"+A+";","g"),val:R[A]}}}function f(R,L,S,A,U,M,C){if(R!==void 0&&(this.options.trimValues&&!A&&(R=R.trim()),R.length>0)){C||(R=this.replaceEntitiesValue(R));const D=this.options.tagValueProcessor(L,R,S,U,M);return D==null?R:typeof D!=typeof R||D!==R?D:this.options.trimValues||R.trim()===R?P(R,this.options.parseTagValue,this.options.numberParseOptions):R}}function s(R){if(this.options.removeNSPrefix){const L=R.split(":"),S=R.charAt(0)==="/"?"/":"";if(L[0]==="xmlns")return"";L.length===2&&(R=S+L[1])}return R}const d=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function p(R,L,S){if(this.options.ignoreAttributes!==!0&&typeof R=="string"){const A=i.getAllMatches(R,d),U=A.length,M={};for(let C=0;C<U;C++){const D=this.resolveNameSpace(A[C][1]);if(this.ignoreAttributesFn(D,L))continue;let F=A[C][4],G=this.options.attributeNamePrefix+D;if(D.length)if(this.options.transformAttributeName&&(G=this.options.transformAttributeName(G)),G==="__proto__"&&(G="#__proto__"),F!==void 0){this.options.trimValues&&(F=F.trim()),F=this.replaceEntitiesValue(F);const X=this.options.attributeValueProcessor(D,F,L);M[G]=X==null?F:typeof X!=typeof F||X!==F?X:P(F,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(M[G]=!0)}if(!Object.keys(M).length)return;if(this.options.attributesGroupName){const C={};return C[this.options.attributesGroupName]=M,C}return M}}const v=function(R){R=R.replace(/\r\n?/g,` `);const L=new a("!xml");let S=L,A="",U="";for(let M=0;M<R.length;M++)if(R[M]==="<")if(R[M+1]==="/"){const C=h(R,">",M,"Closing Tag is not closed.");let D=R.substring(M+2,C).trim();if(this.options.removeNSPrefix){const X=D.indexOf(":");X!==-1&&(D=D.substr(X+1))}this.options.transformTagName&&(D=this.options.transformTagName(D)),S&&(A=this.saveTextToParentTag(A,S,U));const F=U.substring(U.lastIndexOf(".")+1);if(D&&this.options.unpairedTags.indexOf(D)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${D}>`);let G=0;F&&this.options.unpairedTags.indexOf(F)!==-1?(G=U.lastIndexOf(".",U.lastIndexOf(".")-1),this.tagsNodeStack.pop()):G=U.lastIndexOf("."),U=U.substring(0,G),S=this.tagsNodeStack.pop(),A="",M=C}else if(R[M+1]==="?"){let C=b(R,M,!1,"?>");if(!C)throw new Error("Pi Tag is not closed.");if(A=this.saveTextToParentTag(A,S,U),!(this.options.ignoreDeclaration&&C.tagName==="?xml"||this.options.ignorePiTags)){const D=new a(C.tagName);D.add(this.options.textNodeName,""),C.tagName!==C.tagExp&&C.attrExpPresent&&(D[":@"]=this.buildAttributesMap(C.tagExp,U,C.tagName)),this.addChild(S,D,U)}M=C.closeIndex+1}else if(R.substr(M+1,3)==="!--"){const C=h(R,"-->",M+4,"Comment is not closed.");if(this.options.commentPropName){const D=R.substring(M+4,C-2);A=this.saveTextToParentTag(A,S,U),S.add(this.options.commentPropName,[{[this.options.textNodeName]:D}])}M=C}else if(R.substr(M+1,2)==="!D"){const C=u(R,M);this.docTypeEntities=C.entities,M=C.i}else if(R.substr(M+1,2)==="!["){const C=h(R,"]]>",M,"CDATA is not closed.")-2,D=R.substring(M+9,C);A=this.saveTextToParentTag(A,S,U);let F=this.parseTextData(D,S.tagname,U,!0,!1,!0,!0);F==null&&(F=""),this.options.cdataPropName?S.add(this.options.cdataPropName,[{[this.options.textNodeName]:D}]):S.add(this.options.textNodeName,F),M=C+2}else{let C=b(R,M,this.options.removeNSPrefix),D=C.tagName;const F=C.rawTagName;let G=C.tagExp,X=C.attrExpPresent,V=C.closeIndex;this.options.transformTagName&&(D=this.options.transformTagName(D)),S&&A&&S.tagname!=="!xml"&&(A=this.saveTextToParentTag(A,S,U,!1));const Z=S;if(Z&&this.options.unpairedTags.indexOf(Z.tagname)!==-1&&(S=this.tagsNodeStack.pop(),U=U.substring(0,U.lastIndexOf("."))),D!==L.tagname&&(U+=U?"."+D:D),this.isItStopNode(this.options.stopNodes,U,D)){let W="";if(G.length>0&&G.lastIndexOf("/")===G.length-1)D[D.length-1]==="/"?(D=D.substr(0,D.length-1),U=U.substr(0,U.length-1),G=D):G=G.substr(0,G.length-1),M=C.closeIndex;else if(this.options.unpairedTags.indexOf(D)!==-1)M=C.closeIndex;else{const q=this.readStopNodeData(R,F,V+1);if(!q)throw new Error(`Unexpected end of ${F}`);M=q.i,W=q.tagContent}const ot=new a(D);D!==G&&X&&(ot[":@"]=this.buildAttributesMap(G,U,D)),W&&(W=this.parseTextData(W,D,U,!0,X,!0,!0)),U=U.substr(0,U.lastIndexOf(".")),ot.add(this.options.textNodeName,W),this.addChild(S,ot,U)}else{if(G.length>0&&G.lastIndexOf("/")===G.length-1){D[D.length-1]==="/"?(D=D.substr(0,D.length-1),U=U.substr(0,U.length-1),G=D):G=G.substr(0,G.length-1),this.options.transformTagName&&(D=this.options.transformTagName(D));const W=new a(D);D!==G&&X&&(W[":@"]=this.buildAttributesMap(G,U,D)),this.addChild(S,W,U),U=U.substr(0,U.lastIndexOf("."))}else{const W=new a(D);this.tagsNodeStack.push(S),D!==G&&X&&(W[":@"]=this.buildAttributesMap(G,U,D)),this.addChild(S,W,U),S=W}A="",M=V}}else A+=R[M];return L.child};function w(R,L,S){const A=this.options.updateTag(L.tagname,S,L[":@"]);A===!1||(typeof A=="string"&&(L.tagname=A),R.addChild(L))}const E=function(R){if(this.options.processEntities){for(let L in this.docTypeEntities){const S=this.docTypeEntities[L];R=R.replace(S.regx,S.val)}for(let L in this.lastEntities){const S=this.lastEntities[L];R=R.replace(S.regex,S.val)}if(this.options.htmlEntities)for(let L in this.htmlEntities){const S=this.htmlEntities[L];R=R.replace(S.regex,S.val)}R=R.replace(this.ampEntity.regex,this.ampEntity.val)}return R};function O(R,L,S,A){return R&&(A===void 0&&(A=Object.keys(L.child).length===0),(R=this.parseTextData(R,L.tagname,S,!1,!!L[":@"]&&Object.keys(L[":@"]).length!==0,A))!==void 0&&R!==""&&L.add(this.options.textNodeName,R),R=""),R}function I(R,L,S){const A="*."+S;for(const U in R){const M=R[U];if(A===M||L===M)return!0}return!1}function h(R,L,S,A){const U=R.indexOf(L,S);if(U===-1)throw new Error(A);return U+L.length-1}function b(R,L,S){const A=(function(X,V){let Z,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:">",ot="";for(let q=V;q<X.length;q++){let Q=X[q];if(Z)Q===Z&&(Z="");else if(Q==='"'||Q==="'")Z=Q;else if(Q===W[0]){if(!W[1])return{data:ot,index:q};if(X[q+1]===W[1])return{data:ot,index:q}}else Q===" "&&(Q=" ");ot+=Q}})(R,L+1,arguments.length>3&&arguments[3]!==void 0?arguments[3]:">");if(!A)return;let U=A.data;const M=A.index,C=U.search(/\s/);let D=U,F=!0;C!==-1&&(D=U.substring(0,C),U=U.substring(C+1).trimStart());const G=D;if(S){const X=D.indexOf(":");X!==-1&&(D=D.substr(X+1),F=D!==A.data.substr(X+1))}return{tagName:D,tagExp:U,closeIndex:M,attrExpPresent:F,rawTagName:G}}function T(R,L,S){const A=S;let U=1;for(;S<R.length;S++)if(R[S]==="<")if(R[S+1]==="/"){const M=h(R,">",S,`${L} is not closed`);if(R.substring(S+2,M).trim()===L&&(U--,U===0))return{tagContent:R.substring(A,S),i:M};S=M}else if(R[S+1]==="?")S=h(R,"?>",S+1,"StopNode is not closed.");else if(R.substr(S+1,3)==="!--")S=h(R,"-->",S+3,"StopNode is not closed.");else if(R.substr(S+1,2)==="![")S=h(R,"]]>",S,"StopNode is not closed.")-2;else{const M=b(R,S,">");M&&((M&&M.tagName)===L&&M.tagExp[M.tagExp.length-1]!=="/"&&U++,S=M.closeIndex)}}function P(R,L,S){if(L&&typeof R=="string"){const A=R.trim();return A==="true"||A!=="false"&&c(R,S)}return i.isExist(R)?R:""}e.exports=class{constructor(R){this.options=R,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:(L,S)=>String.fromCharCode(Number.parseInt(S,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(L,S)=>String.fromCharCode(Number.parseInt(S,16))}},this.addExternalEntities=m,this.parseXml=v,this.parseTextData=f,this.resolveNameSpace=s,this.buildAttributesMap=p,this.isItStopNode=I,this.replaceEntitiesValue=E,this.readStopNodeData=T,this.saveTextToParentTag=O,this.addChild=w,this.ignoreAttributesFn=l(this.options.ignoreAttributes)}}},338:(e,t,n)=>{const{buildOptions:i}=n(63),a=n(299),{prettify:u}=n(728),c=n(31);e.exports=class{constructor(l){this.externalEntities={},this.options=i(l)}parse(l,m){if(typeof l!="string"){if(!l.toString)throw new Error("XML data is accepted in String or Bytes[] form.");l=l.toString()}if(m){m===!0&&(m={});const d=c.validate(l,m);if(d!==!0)throw Error(`${d.err.msg}:${d.err.line}:${d.err.col}`)}const f=new a(this.options);f.addExternalEntities(this.externalEntities);const s=f.parseXml(l);return this.options.preserveOrder||s===void 0?s:u(s,this.options)}addEntity(l,m){if(m.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(l.indexOf("&")!==-1||l.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if(m==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[l]=m}}},728:(e,t)=>{function n(c,l,m){let f;const s={};for(let d=0;d<c.length;d++){const p=c[d],v=i(p);let w="";if(w=m===void 0?v:m+"."+v,v===l.textNodeName)f===void 0?f=p[v]:f+=""+p[v];else{if(v===void 0)continue;if(p[v]){let E=n(p[v],l,w);const O=u(E,l);p[":@"]?a(E,p[":@"],w,l):Object.keys(E).length!==1||E[l.textNodeName]===void 0||l.alwaysCreateTextNode?Object.keys(E).length===0&&(l.alwaysCreateTextNode?E[l.textNodeName]="":E=""):E=E[l.textNodeName],s[v]!==void 0&&s.hasOwnProperty(v)?(Array.isArray(s[v])||(s[v]=[s[v]]),s[v].push(E)):l.isArray(v,w,O)?s[v]=[E]:s[v]=E}}}return typeof f=="string"?f.length>0&&(s[l.textNodeName]=f):f!==void 0&&(s[l.textNodeName]=f),s}function i(c){const l=Object.keys(c);for(let m=0;m<l.length;m++){const f=l[m];if(f!==":@")return f}}function a(c,l,m,f){if(l){const s=Object.keys(l),d=s.length;for(let p=0;p<d;p++){const v=s[p];f.isArray(v,m+"."+v,!0,!0)?c[v]=[l[v]]:c[v]=l[v]}}}function u(c,l){const{textNodeName:m}=l,f=Object.keys(c).length;return f===0||!(f!==1||!c[m]&&typeof c[m]!="boolean"&&c[m]!==0)}t.prettify=function(c,l){return n(c,l)}},365:e=>{e.exports=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,n){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:n})}addChild(t){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}},135:e=>{function t(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}e.exports=function(n){return n!=null&&(t(n)||(function(i){return typeof i.readFloatLE=="function"&&typeof i.slice=="function"&&t(i.slice(0,0))})(n)||!!n._isBuffer)}},542:(e,t,n)=>{(function(){var i=n(298),a=n(526).utf8,u=n(135),c=n(526).bin,l=function(m,f){m.constructor==String?m=f&&f.encoding==="binary"?c.stringToBytes(m):a.stringToBytes(m):u(m)?m=Array.prototype.slice.call(m,0):Array.isArray(m)||m.constructor===Uint8Array||(m=m.toString());for(var s=i.bytesToWords(m),d=8*m.length,p=1732584193,v=-271733879,w=-1732584194,E=271733878,O=0;O<s.length;O++)s[O]=16711935&(s[O]<<8|s[O]>>>24)|4278255360&(s[O]<<24|s[O]>>>8);s[d>>>5]|=128<<d%32,s[14+(d+64>>>9<<4)]=d;var I=l._ff,h=l._gg,b=l._hh,T=l._ii;for(O=0;O<s.length;O+=16){var P=p,R=v,L=w,S=E;p=I(p,v,w,E,s[O+0],7,-680876936),E=I(E,p,v,w,s[O+1],12,-389564586),w=I(w,E,p,v,s[O+2],17,606105819),v=I(v,w,E,p,s[O+3],22,-1044525330),p=I(p,v,w,E,s[O+4],7,-176418897),E=I(E,p,v,w,s[O+5],12,1200080426),w=I(w,E,p,v,s[O+6],17,-1473231341),v=I(v,w,E,p,s[O+7],22,-45705983),p=I(p,v,w,E,s[O+8],7,1770035416),E=I(E,p,v,w,s[O+9],12,-1958414417),w=I(w,E,p,v,s[O+10],17,-42063),v=I(v,w,E,p,s[O+11],22,-1990404162),p=I(p,v,w,E,s[O+12],7,1804603682),E=I(E,p,v,w,s[O+13],12,-40341101),w=I(w,E,p,v,s[O+14],17,-1502002290),p=h(p,v=I(v,w,E,p,s[O+15],22,1236535329),w,E,s[O+1],5,-165796510),E=h(E,p,v,w,s[O+6],9,-1069501632),w=h(w,E,p,v,s[O+11],14,643717713),v=h(v,w,E,p,s[O+0],20,-373897302),p=h(p,v,w,E,s[O+5],5,-701558691),E=h(E,p,v,w,s[O+10],9,38016083),w=h(w,E,p,v,s[O+15],14,-660478335),v=h(v,w,E,p,s[O+4],20,-405537848),p=h(p,v,w,E,s[O+9],5,568446438),E=h(E,p,v,w,s[O+14],9,-1019803690),w=h(w,E,p,v,s[O+3],14,-187363961),v=h(v,w,E,p,s[O+8],20,1163531501),p=h(p,v,w,E,s[O+13],5,-1444681467),E=h(E,p,v,w,s[O+2],9,-51403784),w=h(w,E,p,v,s[O+7],14,1735328473),p=b(p,v=h(v,w,E,p,s[O+12],20,-1926607734),w,E,s[O+5],4,-378558),E=b(E,p,v,w,s[O+8],11,-2022574463),w=b(w,E,p,v,s[O+11],16,1839030562),v=b(v,w,E,p,s[O+14],23,-35309556),p=b(p,v,w,E,s[O+1],4,-1530992060),E=b(E,p,v,w,s[O+4],11,1272893353),w=b(w,E,p,v,s[O+7],16,-155497632),v=b(v,w,E,p,s[O+10],23,-1094730640),p=b(p,v,w,E,s[O+13],4,681279174),E=b(E,p,v,w,s[O+0],11,-358537222),w=b(w,E,p,v,s[O+3],16,-722521979),v=b(v,w,E,p,s[O+6],23,76029189),p=b(p,v,w,E,s[O+9],4,-640364487),E=b(E,p,v,w,s[O+12],11,-421815835),w=b(w,E,p,v,s[O+15],16,530742520),p=T(p,v=b(v,w,E,p,s[O+2],23,-995338651),w,E,s[O+0],6,-198630844),E=T(E,p,v,w,s[O+7],10,1126891415),w=T(w,E,p,v,s[O+14],15,-1416354905),v=T(v,w,E,p,s[O+5],21,-57434055),p=T(p,v,w,E,s[O+12],6,1700485571),E=T(E,p,v,w,s[O+3],10,-1894986606),w=T(w,E,p,v,s[O+10],15,-1051523),v=T(v,w,E,p,s[O+1],21,-2054922799),p=T(p,v,w,E,s[O+8],6,1873313359),E=T(E,p,v,w,s[O+15],10,-30611744),w=T(w,E,p,v,s[O+6],15,-1560198380),v=T(v,w,E,p,s[O+13],21,1309151649),p=T(p,v,w,E,s[O+4],6,-145523070),E=T(E,p,v,w,s[O+11],10,-1120210379),w=T(w,E,p,v,s[O+2],15,718787259),v=T(v,w,E,p,s[O+9],21,-343485551),p=p+P>>>0,v=v+R>>>0,w=w+L>>>0,E=E+S>>>0}return i.endian([p,v,w,E])};l._ff=function(m,f,s,d,p,v,w){var E=m+(f&s|~f&d)+(p>>>0)+w;return(E<<v|E>>>32-v)+f},l._gg=function(m,f,s,d,p,v,w){var E=m+(f&d|s&~d)+(p>>>0)+w;return(E<<v|E>>>32-v)+f},l._hh=function(m,f,s,d,p,v,w){var E=m+(f^s^d)+(p>>>0)+w;return(E<<v|E>>>32-v)+f},l._ii=function(m,f,s,d,p,v,w){var E=m+(s^(f|~d))+(p>>>0)+w;return(E<<v|E>>>32-v)+f},l._blocksize=16,l._digestsize=16,e.exports=function(m,f){if(m==null)throw new Error("Illegal argument "+m);var s=i.wordsToBytes(l(m,f));return f&&f.asBytes?s:f&&f.asString?c.bytesToString(s):i.bytesToHex(s)}})()},285:(e,t,n)=>{var i=n(2);e.exports=function(I){return I?(I.substr(0,2)==="{}"&&(I="\\{\\}"+I.substr(2)),O((function(h){return h.split("\\\\").join(a).split("\\{").join(u).split("\\}").join(c).split("\\,").join(l).split("\\.").join(m)})(I),!0).map(s)):[]};var a="\0SLASH"+Math.random()+"\0",u="\0OPEN"+Math.random()+"\0",c="\0CLOSE"+Math.random()+"\0",l="\0COMMA"+Math.random()+"\0",m="\0PERIOD"+Math.random()+"\0";function f(I){return parseInt(I,10)==I?parseInt(I,10):I.charCodeAt(0)}function s(I){return I.split(a).join("\\").split(u).join("{").split(c).join("}").split(l).join(",").split(m).join(".")}function d(I){if(!I)return[""];var h=[],b=i("{","}",I);if(!b)return I.split(",");var T=b.pre,P=b.body,R=b.post,L=T.split(",");L[L.length-1]+="{"+P+"}";var S=d(R);return R.length&&(L[L.length-1]+=S.shift(),L.push.apply(L,S)),h.push.apply(h,L),h}function p(I){return"{"+I+"}"}function v(I){return/^-?0\d/.test(I)}function w(I,h){return I<=h}function E(I,h){return I>=h}function O(I,h){var b=[],T=i("{","}",I);if(!T)return[I];var P=T.pre,R=T.post.length?O(T.post,!1):[""];if(/\$$/.test(T.pre))for(var L=0;L<R.length;L++){var S=P+"{"+T.body+"}"+R[L];b.push(S)}else{var A,U,M=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(T.body),C=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(T.body),D=M||C,F=T.body.indexOf(",")>=0;if(!D&&!F)return T.post.match(/,.*\}/)?O(I=T.pre+"{"+T.body+c+T.post):[I];if(D)A=T.body.split(/\.\./);else if((A=d(T.body)).length===1&&(A=O(A[0],!1).map(p)).length===1)return R.map((function(Tt){return T.pre+A[0]+Tt}));if(D){var G=f(A[0]),X=f(A[1]),V=Math.max(A[0].length,A[1].length),Z=A.length==3?Math.abs(f(A[2])):1,W=w;X<G&&(Z*=-1,W=E);var ot=A.some(v);U=[];for(var q=G;W(q,X);q+=Z){var Q;if(C)(Q=String.fromCharCode(q))==="\\"&&(Q="");else if(Q=String(q),ot){var kt=V-Q.length;if(kt>0){var $t=new Array(kt+1).join("0");Q=q<0?"-"+$t+Q.slice(1):$t+Q}}U.push(Q)}}else{U=[];for(var Nt=0;Nt<A.length;Nt++)U.push.apply(U,O(A[Nt],!1))}for(Nt=0;Nt<U.length;Nt++)for(L=0;L<R.length;L++)S=P+U[Nt]+R[L],(!h||D||S)&&b.push(S)}return b}},829:e=>{function t(f){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},t(f)}function n(f){var s=typeof Map=="function"?new Map:void 0;return n=function(d){if(d===null||(p=d,Function.toString.call(p).indexOf("[native code]")===-1))return d;var p;if(typeof d!="function")throw new TypeError("Super expression must either be null or a function");if(s!==void 0){if(s.has(d))return s.get(d);s.set(d,v)}function v(){return i(d,arguments,u(this).constructor)}return v.prototype=Object.create(d.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),a(v,d)},n(f)}function i(f,s,d){return i=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch{return!1}})()?Reflect.construct:function(p,v,w){var E=[null];E.push.apply(E,v);var O=new(Function.bind.apply(p,E));return w&&a(O,w.prototype),O},i.apply(null,arguments)}function a(f,s){return a=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},a(f,s)}function u(f){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},u(f)}var c=(function(f){function s(d){var p;return(function(v,w){if(!(v instanceof w))throw new TypeError("Cannot call a class as a function")})(this,s),(p=(function(v,w){return!w||t(w)!=="object"&&typeof w!="function"?(function(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E})(v):w})(this,u(s).call(this,d))).name="ObjectPrototypeMutationError",p}return(function(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(p&&p.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),p&&a(d,p)})(s,f),s})(n(Error));function l(f,s){for(var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},p=s.split("."),v=p.length,w=function(I){var h=p[I];if(!f)return{v:void 0};if(h==="+"){if(Array.isArray(f))return{v:f.map((function(T,P){var R=p.slice(I+1);return R.length>0?l(T,R.join("."),d):d(f,P,p,I)}))};var b=p.slice(0,I).join(".");throw new Error("Object at wildcard (".concat(b,") is not an array"))}f=d(f,h,p,I)},E=0;E<v;E++){var O=w(E);if(t(O)==="object")return O.v}return f}function m(f,s){return f.length===s+1}e.exports={set:function(f,s,d){if(t(f)!="object"||f===null||s===void 0)return f;if(typeof s=="number")return f[s]=d,f[s];try{return l(f,s,(function(p,v,w,E){if(p===Reflect.getPrototypeOf({}))throw new c("Attempting to mutate Object.prototype");if(!p[v]){var O=Number.isInteger(Number(w[E+1])),I=w[E+1]==="+";p[v]=O||I?[]:{}}return m(w,E)&&(p[v]=d),p[v]}))}catch(p){if(p instanceof c)throw p;return f}},get:function(f,s){if(t(f)!="object"||f===null||s===void 0)return f;if(typeof s=="number")return f[s];try{return l(f,s,(function(d,p){return d[p]}))}catch{return f}},has:function(f,s){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(t(f)!="object"||f===null||s===void 0)return!1;if(typeof s=="number")return s in f;try{var p=!1;return l(f,s,(function(v,w,E,O){if(!m(E,O))return v&&v[w];p=d.own?v.hasOwnProperty(w):w in v})),p}catch{return!1}},hasOwn:function(f,s,d){return this.has(f,s,d||{own:!0})},isIn:function(f,s,d){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(t(f)!="object"||f===null||s===void 0)return!1;try{var v=!1,w=!1;return l(f,s,(function(E,O,I,h){return v=v||E===d||!!E&&E[O]===d,w=m(I,h)&&t(E)==="object"&&O in E,E&&E[O]})),p.validPath?v&&w:v}catch{return!1}},ObjectPrototypeMutationError:c}},47:(e,t,n)=>{var i=n(410),a=function(f){return typeof f=="string"};function u(f,s){for(var d=[],p=0;p<f.length;p++){var v=f[p];v&&v!=="."&&(v===".."?d.length&&d[d.length-1]!==".."?d.pop():s&&d.push(".."):d.push(v))}return d}var c=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,l={};function m(f){return c.exec(f).slice(1)}l.resolve=function(){for(var f="",s=!1,d=arguments.length-1;d>=-1&&!s;d--){var p=d>=0?arguments[d]:Qt.cwd();if(!a(p))throw new TypeError("Arguments to path.resolve must be strings");p&&(f=p+"/"+f,s=p.charAt(0)==="/")}return(s?"/":"")+(f=u(f.split("/"),!s).join("/"))||"."},l.normalize=function(f){var s=l.isAbsolute(f),d=f.substr(-1)==="/";return(f=u(f.split("/"),!s).join("/"))||s||(f="."),f&&d&&(f+="/"),(s?"/":"")+f},l.isAbsolute=function(f){return f.charAt(0)==="/"},l.join=function(){for(var f="",s=0;s<arguments.length;s++){var d=arguments[s];if(!a(d))throw new TypeError("Arguments to path.join must be strings");d&&(f+=f?"/"+d:d)}return l.normalize(f)},l.relative=function(f,s){function d(h){for(var b=0;b<h.length&&h[b]==="";b++);for(var T=h.length-1;T>=0&&h[T]==="";T--);return b>T?[]:h.slice(b,T+1)}f=l.resolve(f).substr(1),s=l.resolve(s).substr(1);for(var p=d(f.split("/")),v=d(s.split("/")),w=Math.min(p.length,v.length),E=w,O=0;O<w;O++)if(p[O]!==v[O]){E=O;break}var I=[];for(O=E;O<p.length;O++)I.push("..");return(I=I.concat(v.slice(E))).join("/")},l._makeLong=function(f){return f},l.dirname=function(f){var s=m(f),d=s[0],p=s[1];return d||p?(p&&(p=p.substr(0,p.length-1)),d+p):"."},l.basename=function(f,s){var d=m(f)[2];return s&&d.substr(-1*s.length)===s&&(d=d.substr(0,d.length-s.length)),d},l.extname=function(f){return m(f)[3]},l.format=function(f){if(!i.isObject(f))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof f);var s=f.root||"";if(!a(s))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof f.root);return(f.dir?f.dir+l.sep:"")+(f.base||"")},l.parse=function(f){if(!a(f))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof f);var s=m(f);if(!s||s.length!==4)throw new TypeError("Invalid path '"+f+"'");return s[1]=s[1]||"",s[2]=s[2]||"",s[3]=s[3]||"",{root:s[0],dir:s[0]+s[1].slice(0,s[1].length-1),base:s[2],ext:s[3],name:s[2].slice(0,s[2].length-s[3].length)}},l.sep="/",l.delimiter=":",e.exports=l},647:(e,t)=>{var n=Object.prototype.hasOwnProperty;function i(u){try{return decodeURIComponent(u.replace(/\+/g," "))}catch{return null}}function a(u){try{return encodeURIComponent(u)}catch{return null}}t.stringify=function(u,c){c=c||"";var l,m,f=[];for(m in typeof c!="string"&&(c="?"),u)if(n.call(u,m)){if((l=u[m])||l!=null&&!isNaN(l)||(l=""),m=a(m),l=a(l),m===null||l===null)continue;f.push(m+"="+l)}return f.length?c+f.join("&"):""},t.parse=function(u){for(var c,l=/([^=?#&]+)=?([^&]*)/g,m={};c=l.exec(u);){var f=i(c[1]),s=i(c[2]);f===null||s===null||f in m||(m[f]=s)}return m}},670:e=>{e.exports=function(t,n){if(n=n.split(":")[0],!(t=+t))return!1;switch(n){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0}},494:e=>{const t=/^[-+]?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 i={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};e.exports=function(a){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(u=Object.assign({},i,u),!a||typeof a!="string")return a;let c=a.trim();if(u.skipLike!==void 0&&u.skipLike.test(c))return a;if(u.hex&&t.test(c))return Number.parseInt(c,16);{const m=n.exec(c);if(m){const f=m[1],s=m[2];let d=((l=m[3])&&l.indexOf(".")!==-1&&((l=l.replace(/0+$/,""))==="."?l="0":l[0]==="."?l="0"+l:l[l.length-1]==="."&&(l=l.substr(0,l.length-1))),l);const p=m[4]||m[6];if(!u.leadingZeros&&s.length>0&&f&&c[2]!=="."||!u.leadingZeros&&s.length>0&&!f&&c[1]!==".")return a;{const v=Number(c),w=""+v;return w.search(/[eE]/)!==-1||p?u.eNotation?v:a:c.indexOf(".")!==-1?w==="0"&&d===""||w===d||f&&w==="-"+d?v:a:s?d===w||f+d===w?v:a:c===w||c===f+w?v:a}}return a}var l}},737:(e,t,n)=>{var i=n(670),a=n(647),u=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,c=/[\n\r\t]/g,l=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,m=/:\d+$/,f=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,s=/^[a-zA-Z]:/;function d(h){return(h||"").toString().replace(u,"")}var p=[["#","hash"],["?","query"],function(h,b){return E(b.protocol)?h.replace(/\\/g,"/"):h},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],v={hash:1,query:1};function w(h){var b,T=(typeof window<"u"?window:typeof re<"u"?re:typeof self<"u"?self:{}).location||{},P={},R=typeof(h=h||T);if(h.protocol==="blob:")P=new I(unescape(h.pathname),{});else if(R==="string")for(b in P=new I(h,{}),v)delete P[b];else if(R==="object"){for(b in h)b in v||(P[b]=h[b]);P.slashes===void 0&&(P.slashes=l.test(h.href))}return P}function E(h){return h==="file:"||h==="ftp:"||h==="http:"||h==="https:"||h==="ws:"||h==="wss:"}function O(h,b){h=(h=d(h)).replace(c,""),b=b||{};var T,P=f.exec(h),R=P[1]?P[1].toLowerCase():"",L=!!P[2],S=!!P[3],A=0;return L?S?(T=P[2]+P[3]+P[4],A=P[2].length+P[3].length):(T=P[2]+P[4],A=P[2].length):S?(T=P[3]+P[4],A=P[3].length):T=P[4],R==="file:"?A>=2&&(T=T.slice(2)):E(R)?T=P[4]:R?L&&(T=T.slice(2)):A>=2&&E(b.protocol)&&(T=P[4]),{protocol:R,slashes:L||E(R),slashesCount:A,rest:T}}function I(h,b,T){if(h=(h=d(h)).replace(c,""),!(this instanceof I))return new I(h,b,T);var P,R,L,S,A,U,M=p.slice(),C=typeof b,D=this,F=0;for(C!=="object"&&C!=="string"&&(T=b,b=null),T&&typeof T!="function"&&(T=a.parse),P=!(R=O(h||"",b=w(b))).protocol&&!R.slashes,D.slashes=R.slashes||P&&b.slashes,D.protocol=R.protocol||b.protocol||"",h=R.rest,(R.protocol==="file:"&&(R.slashesCount!==2||s.test(h))||!R.slashes&&(R.protocol||R.slashesCount<2||!E(D.protocol)))&&(M[3]=[/(.*)/,"pathname"]);F<M.length;F++)typeof(S=M[F])!="function"?(L=S[0],U=S[1],L!=L?D[U]=h:typeof L=="string"?~(A=L==="@"?h.lastIndexOf(L):h.indexOf(L))&&(typeof S[2]=="number"?(D[U]=h.slice(0,A),h=h.slice(A+S[2])):(D[U]=h.slice(A),h=h.slice(0,A))):(A=L.exec(h))&&(D[U]=A[1],h=h.slice(0,A.index)),D[U]=D[U]||P&&S[3]&&b[U]||"",S[4]&&(D[U]=D[U].toLowerCase())):h=S(h,D);T&&(D.query=T(D.query)),P&&b.slashes&&D.pathname.charAt(0)!=="/"&&(D.pathname!==""||b.pathname!=="")&&(D.pathname=(function(G,X){if(G==="")return X;for(var V=(X||"/").split("/").slice(0,-1).concat(G.split("/")),Z=V.length,W=V[Z-1],ot=!1,q=0;Z--;)V[Z]==="."?V.splice(Z,1):V[Z]===".."?(V.splice(Z,1),q++):q&&(Z===0&&(ot=!0),V.splice(Z,1),q--);return ot&&V.unshift(""),W!=="."&&W!==".."||V.push(""),V.join("/")})(D.pathname,b.pathname)),D.pathname.charAt(0)!=="/"&&E(D.protocol)&&(D.pathname="/"+D.pathname),i(D.port,D.protocol)||(D.host=D.hostname,D.port=""),D.username=D.password="",D.auth&&(~(A=D.auth.indexOf(":"))?(D.username=D.auth.slice(0,A),D.username=encodeURIComponent(decodeURIComponent(D.username)),D.password=D.auth.slice(A+1),D.password=encodeURIComponent(decodeURIComponent(D.password))):D.username=encodeURIComponent(decodeURIComponent(D.auth)),D.auth=D.password?D.username+":"+D.password:D.username),D.origin=D.protocol!=="file:"&&E(D.protocol)&&D.host?D.protocol+"//"+D.host:"null",D.href=D.toString()}I.prototype={set:function(h,b,T){var P=this;switch(h){case"query":typeof b=="string"&&b.length&&(b=(T||a.parse)(b)),P[h]=b;break;case"port":P[h]=b,i(b,P.protocol)?b&&(P.host=P.hostname+":"+b):(P.host=P.hostname,P[h]="");break;case"hostname":P[h]=b,P.port&&(b+=":"+P.port),P.host=b;break;case"host":P[h]=b,m.test(b)?(b=b.split(":"),P.port=b.pop(),P.hostname=b.join(":")):(P.hostname=b,P.port="");break;case"protocol":P.protocol=b.toLowerCase(),P.slashes=!T;break;case"pathname":case"hash":if(b){var R=h==="pathname"?"/":"#";P[h]=b.charAt(0)!==R?R+b:b}else P[h]=b;break;case"username":case"password":P[h]=encodeURIComponent(b);break;case"auth":var L=b.indexOf(":");~L?(P.username=b.slice(0,L),P.username=encodeURIComponent(decodeURIComponent(P.username)),P.password=b.slice(L+1),P.password=encodeURIComponent(decodeURIComponent(P.password))):P.username=encodeURIComponent(decodeURIComponent(b))}for(var S=0;S<p.length;S++){var A=p[S];A[4]&&(P[A[1]]=P[A[1]].toLowerCase())}return P.auth=P.password?P.username+":"+P.password:P.username,P.origin=P.protocol!=="file:"&&E(P.protocol)&&P.host?P.protocol+"//"+P.host:"null",P.href=P.toString(),P},toString:function(h){h&&typeof h=="function"||(h=a.stringify);var b,T=this,P=T.host,R=T.protocol;R&&R.charAt(R.length-1)!==":"&&(R+=":");var L=R+(T.protocol&&T.slashes||E(T.protocol)?"//":"");return T.username?(L+=T.username,T.password&&(L+=":"+T.password),L+="@"):T.password?(L+=":"+T.password,L+="@"):T.protocol!=="file:"&&E(T.protocol)&&!P&&T.pathname!=="/"&&(L+="@"),(P[P.length-1]===":"||m.test(T.hostname)&&!T.port)&&(P+=":"),L+=P+T.pathname,(b=typeof T.query=="object"?h(T.query):T.query)&&(L+=b.charAt(0)!=="?"?"?"+b:b),T.hash&&(L+=T.hash),L}},I.extractProtocol=O,I.location=w,I.trimLeft=d,I.qs=a,e.exports=I},410:()=>{},388:()=>{},805:()=>{},345:()=>{},800:()=>{}},Rn={};function Y(e){var t=Rn[e];if(t!==void 0)return t.exports;var n=Rn[e]={id:e,loaded:!1,exports:{}};return si[e].call(n.exports,n,n.exports,Y),n.loaded=!0,n.exports}Y.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return Y.d(t,{a:t}),t},Y.d=(e,t)=>{for(var n in t)Y.o(t,n)&&!Y.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},Y.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Y.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var It={};Y.d(It,{hT:()=>Et,O4:()=>_t,Kd:()=>gi,YK:()=>di,UU:()=>ws,Gu:()=>dr,ky:()=>Or,h4:()=>te,ch:()=>Ee,hq:()=>Mt,i5:()=>Ir});var oi=Y(737),ai=Y.n(oi);function Re(e){if(!Ye(e))throw new Error("Parameter was not an error")}function Ye(e){return!!e&&typeof e=="object"&&(t=e,Object.prototype.toString.call(t)==="[object Error]")||e instanceof Error;var t}class vt extends Error{constructor(t,n){const i=[...arguments],{options:a,shortMessage:u}=(function(l){let m,f="";if(l.length===0)m={};else if(Ye(l[0]))m={cause:l[0]},f=l.slice(1).join(" ")||"";else if(l[0]&&typeof l[0]=="object")m=Object.assign({},l[0]),f=l.slice(1).join(" ")||"";else{if(typeof l[0]!="string")throw new Error("Invalid arguments passed to Layerr");m={},f=f=l.join(" ")||""}return{options:m,shortMessage:f}})(i);let c=u;if(a.cause&&(c=`${c}: ${a.cause.message}`),super(c),this.message=c,a.name&&typeof a.name=="string"?this.name=a.name:this.name="Layerr",a.cause&&Object.defineProperty(this,"_cause",{value:a.cause}),Object.defineProperty(this,"_info",{value:{}}),a.info&&typeof a.info=="object"&&Object.assign(this._info,a.info),Error.captureStackTrace){const l=a.constructorOpt||this.constructor;Error.captureStackTrace(this,l)}}static cause(t){return Re(t),t._cause&&Ye(t._cause)?t._cause:null}static fullStack(t){Re(t);const n=vt.cause(t);return n?`${t.stack} caused by: ${vt.fullStack(n)}`:t.stack??""}static info(t){Re(t);const n={},i=vt.cause(t);return i&&Object.assign(n,vt.info(i)),t._info&&Object.assign(n,t._info),n}toString(){let t=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(t=`${t}: ${this.message}`),t}}var ui=Y(47),le=Y.n(ui);const Cn="__PATH_SEPARATOR_POSIX__",Sn="__PATH_SEPARATOR_WINDOWS__";function tt(e){try{const t=e.replace(/\//g,Cn).replace(/\\\\/g,Sn);return encodeURIComponent(t).split(Sn).join("\\\\").split(Cn).join("/")}catch(t){throw new vt(t,"Failed encoding path")}}function xn(e){return e.startsWith("/")?e:"/"+e}function Jt(e){let t=e;return t[0]!=="/"&&(t="/"+t),/^.+\/$/.test(t)&&(t=t.substr(0,t.length-1)),t}function ci(e){let t=new(ai())(e).pathname;return t.length<=0&&(t="/"),Jt(t)}function et(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(function(){return(function(i){var a=[];if(i.length===0)return"";if(typeof i[0]!="string")throw new TypeError("Url must be a string. Received "+i[0]);if(i[0].match(/^[^/:]+:\/*$/)&&i.length>1){var u=i.shift();i[0]=u+i[0]}i[0].match(/^file:\/\/\//)?i[0]=i[0].replace(/^([^/:]+):\/*/,"$1:///"):i[0]=i[0].replace(/^([^/:]+):\/*/,"$1://");for(var c=0;c<i.length;c++){var l=i[c];if(typeof l!="string")throw new TypeError("Url must be a string. Received "+l);l!==""&&(c>0&&(l=l.replace(/^[\/]+/,"")),l=c<i.length-1?l.replace(/[\/]+$/,""):l.replace(/[\/]+$/,"/"),a.push(l))}var m=a.join("/"),f=(m=m.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return f.shift()+(f.length>0?"?":"")+f.join("&")})(typeof arguments[0]=="object"?arguments[0]:[].slice.call(arguments))})(t.reduce(((i,a,u)=>((u===0||a!=="/"||a==="/"&&i[i.length-1]!=="/")&&i.push(a),i)),[]))}var li=Y(542),Yt=Y.n(li);const hi="abcdef0123456789";function Pn(e,t){const n=e.url.replace("//",""),i=n.indexOf("/")==-1?"/":n.slice(n.indexOf("/")),a=e.method?e.method.toUpperCase():"GET",u=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&"auth",c=`00000000${t.nc}`.slice(-8),l=(function(p,v,w,E,O,I,h){const b=h||Yt()(`${v}:${w}:${E}`);return p&&p.toLowerCase()==="md5-sess"?Yt()(`${b}:${O}:${I}`):b})(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),m=Yt()(`${a}:${i}`),f=u?Yt()(`${l}:${t.nonce}:${c}:${t.cnonce}:${u}:${m}`):Yt()(`${l}:${t.nonce}:${m}`),s={username:t.username,realm:t.realm,nonce:t.nonce,uri:i,qop:u,response:f,nc:c,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},d=[];for(const p in s)s[p]&&(p==="qop"||p==="nc"||p==="algorithm"?d.push(`${p}=${s[p]}`):d.push(`${p}="${s[p]}"`));return`Digest ${d.join(", ")}`}function fr(e){return(e.headers&&e.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()==="digest"}var fi=Y(101),pr=Y.n(fi);function Ln(e){return pr().decode(e)}function _n(e,t){var n;return`Basic ${n=`${e}:${t}`,pr().encode(n)}`}const he=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:typeof window<"u"?window:globalThis,pi=he.fetch.bind(he),gi=he.Request,di=he.Response;let Et=(function(e){return e.Auto="auto",e.Digest="digest",e.None="none",e.Password="password",e.Token="token",e})({}),_t=(function(e){return e.DataTypeNoLength="data-type-no-length",e.InvalidAuthType="invalid-auth-type",e.InvalidOutputFormat="invalid-output-format",e.LinkUnsupportedAuthType="link-unsupported-auth",e.InvalidUpdateRange="invalid-update-range",e.NotSupported="not-supported",e})({});function gr(e,t,n,i,a){switch(e.authType){case Et.Auto:t&&n&&(e.headers.Authorization=_n(t,n));break;case Et.Digest:e.digest=(function(c,l,m){return{username:c,password:l,ha1:m,nc:0,algorithm:"md5",hasDigestAuth:!1}})(t,n,a);break;case Et.None:break;case Et.Password:e.headers.Authorization=_n(t,n);break;case Et.Token:e.headers.Authorization=`${(u=i).token_type} ${u.access_token}`;break;default:throw new vt({info:{code:_t.InvalidAuthType}},`Invalid auth type: ${e.authType}`)}var u}Y(345),Y(800);const $n="@@HOTPATCHER",mi=()=>{};function Ce(e){return{original:e,methods:[e],final:!1}}class yi{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=$n}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(t){this.configuration.getEmptyAction=t}control(t){let n=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!t||t.__type__!==$n)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(t.configuration.registry).forEach((i=>{this.configuration.registry.hasOwnProperty(i)?n&&(this.configuration.registry[i]=Object.assign({},t.configuration.registry[i])):this.configuration.registry[i]=Object.assign({},t.configuration.registry[i])})),t._configuration=this.configuration,this}execute(t){const n=this.get(t)||mi;for(var i=arguments.length,a=new Array(i>1?i-1:0),u=1;u<i;u++)a[u-1]=arguments[u];return n(...a)}get(t){const n=this.configuration.registry[t];if(!n)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 i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];if(a.length===0)throw new Error("Failed creating sequence: No functions provided");return function(){for(var c=arguments.length,l=new Array(c),m=0;m<c;m++)l[m]=arguments[m];let f=l;const s=this;for(;a.length>0;)f=[a.shift().apply(s,f)];return f[0]}})(...n.methods)}isPatched(t){return!!this.configuration.registry[t]}patch(t,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{chain:a=!1}=i;if(this.configuration.registry[t]&&this.configuration.registry[t].final)throw new Error(`Failed patching '${t}': Method marked as being final`);if(typeof n!="function")throw new Error(`Failed patching '${t}': Provided method is not a function`);if(a)this.configuration.registry[t]?this.configuration.registry[t].methods.push(n):this.configuration.registry[t]=Ce(n);else if(this.isPatched(t)){const{original:u}=this.configuration.registry[t];this.configuration.registry[t]=Object.assign(Ce(n),{original:u})}else this.configuration.registry[t]=Ce(n);return this}patchInline(t,n){this.isPatched(t)||this.patch(t,n);for(var i=arguments.length,a=new Array(i>2?i-2:0),u=2;u<i;u++)a[u-2]=arguments[u];return this.execute(t,...a)}plugin(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return i.forEach((u=>{this.patch(t,u,{chain:!0})})),this}restore(t){if(!this.isPatched(t))throw new Error(`Failed restoring method: No method present for key: ${t}`);if(typeof this.configuration.registry[t].original!="function")throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${t}`);return this.configuration.registry[t].methods=[this.configuration.registry[t].original],this}setFinal(t){if(!this.configuration.registry.hasOwnProperty(t))throw new Error(`Failed marking '${t}' as final: No method found for key`);return this.configuration.registry[t].final=!0,this}}let Se=null;function dr(){return Se||(Se=new yi),Se}function fe(e){return(function(t){if(typeof t!="object"||t===null||Object.prototype.toString.call(t)!="[object Object]")return!1;if(Object.getPrototypeOf(t)===null)return!0;let n=t;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n})(e)?Object.assign({},e):Object.setPrototypeOf(Object.assign({},e),Object.getPrototypeOf(e))}function Dn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];let i=null,a=[...t];for(;a.length>0;){const u=a.shift();i=i?mr(i,u):fe(u)}return i}function mr(e,t){const n=fe(e);return Object.keys(t).forEach((i=>{n.hasOwnProperty(i)?Array.isArray(t[i])?n[i]=Array.isArray(n[i])?[...n[i],...t[i]]:[...t[i]]:typeof t[i]=="object"&&t[i]?n[i]=typeof n[i]=="object"&&n[i]?mr(n[i],t[i]):fe(t[i]):n[i]=t[i]:n[i]=t[i]})),n}function Ei(e){const t={};for(const n of e.keys())t[n]=e.get(n);return t}function He(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length===0)return{};const i={};return t.reduce(((a,u)=>(Object.keys(u).forEach((c=>{const l=c.toLowerCase();i.hasOwnProperty(l)?a[i[l]]=u[c]:(i[l]=c,a[c]=u[c])})),a)),{})}Y(805);const bi=typeof ArrayBuffer=="function",{toString:vi}=Object.prototype;function yr(e){return bi&&(e instanceof ArrayBuffer||vi.call(e)==="[object ArrayBuffer]")}function Er(e){return e!=null&&e.constructor!=null&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function rn(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(i){return Promise.reject(i)}}}function Ze(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const br=rn((function(e){const t=e._digest;return delete e._digest,t.hasDigestAuth&&(e=Dn(e,{headers:{Authorization:Pn(e,t)}})),Ze(pe(e),(function(n){let i=!1;return a=function(c){return i?c:n},(u=(function(){if(n.status==401)return t.hasDigestAuth=(function(c,l){if(!fr(c))return!1;const m=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const f=c.headers&&c.headers.get("www-authenticate")||"",s=m.exec(f);if(!s)break;l[s[1]]=s[2]||s[3]}return l.nc+=1,l.cnonce=(function(){let f="";for(let s=0;s<32;++s)f=`${f}${hi[Math.floor(16*Math.random())]}`;return f})(),!0})(n,t),(function(){if(t.hasDigestAuth)return Ze(pe(e=Dn(e,{headers:{Authorization:Pn(e,t)}})),(function(c){return c.status==401?t.hasDigestAuth=!1:t.nc++,i=!0,c}))})();t.nc++})())&&u.then?u.then(a):a(u);var a,u}))})),wi=rn((function(e,t){return Ze(pe(e),(function(n){return n.ok?(t.authType=Et.Password,n):n.status==401&&fr(n)?(t.authType=Et.Digest,gr(t,t.username,t.password,void 0,void 0),e._digest=t.digest,br(e)):n}))})),ut=rn((function(e,t){return t.authType===Et.Auto?wi(e,t):e._digest?br(e):pe(e)}));function ct(e,t,n){const i=fe(e);return i.headers=He(t.headers,i.headers||{},n.headers||{}),n.data!==void 0&&(i.data=n.data),n.signal&&(i.signal=n.signal),t.httpAgent&&(i.httpAgent=t.httpAgent),t.httpsAgent&&(i.httpsAgent=t.httpsAgent),t.digest&&(i._digest=t.digest),typeof t.withCredentials=="boolean"&&(i.withCredentials=t.withCredentials),i}function pe(e){const t=dr();return t.patchInline("request",(n=>t.patchInline("fetch",pi,n.url,(function(i){let a={};const u={method:i.method};if(i.headers&&(a=He(a,i.headers)),i.data!==void 0){const[c,l]=(function(m){if(typeof m=="string")return[m,{}];if(Er(m))return[m,{}];if(yr(m))return[m,{}];if(m&&typeof m=="object")return[JSON.stringify(m),{"content-type":"application/json"}];throw new Error("Unable to convert request body: Unexpected body type: "+typeof m)})(i.data);u.body=c,a=He(a,l)}return i.signal&&(u.signal=i.signal),i.withCredentials&&(u.credentials="include"),u.headers=a,u})(n))),e)}var Ni=Y(285);const ge=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},Ai={"[: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]},Ht=e=>e.replace(/[[\]\\-]/g,"\\$&"),Bn=e=>e.join(""),Oi=(e,t)=>{const n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");const i=[],a=[];let u=n+1,c=!1,l=!1,m=!1,f=!1,s=n,d="";t:for(;u<e.length;){const E=e.charAt(u);if(E!=="!"&&E!=="^"||u!==n+1){if(E==="]"&&c&&!m){s=u+1;break}if(c=!0,E!=="\\"||m){if(E==="["&&!m){for(const[O,[I,h,b]]of Object.entries(Ai))if(e.startsWith(O,u)){if(d)return["$.",!1,e.length-n,!0];u+=O.length,b?a.push(I):i.push(I),l=l||h;continue t}}m=!1,d?(E>d?i.push(Ht(d)+"-"+Ht(E)):E===d&&i.push(Ht(E)),d="",u++):e.startsWith("-]",u+1)?(i.push(Ht(E+"-")),u+=2):e.startsWith("-",u+1)?(d=E,u+=2):(i.push(Ht(E)),u++)}else m=!0,u++}else f=!0,u++}if(s<u)return["",!1,0,!1];if(!i.length&&!a.length)return["$.",!1,e.length-n,!0];if(a.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!f)return[(p=i[0].length===2?i[0].slice(-1):i[0],p.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,s-n,!1];var p;const v="["+(f?"^":"")+Bn(i)+"]",w="["+(f?"":"^")+Bn(a)+"]";return[i.length&&a.length?"("+v+"|"+w+")":i.length?v:w,l,s-n,!0]},Zt=function(e){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},Ii=new Set(["!","?","+","*","@"]),Un=e=>Ii.has(e),xe="(?!\\.)",Ti=new Set(["[","."]),Ri=new Set(["..","."]),Ci=new Set("().*{}+?[]^$\\!"),sn="[^/]",jn=sn+"*?",Mn=sn+"+?";class yt{type;#n;#r;#s=!1;#t=[];#e;#o;#u;#a=!1;#i;#c;#h=!1;constructor(t,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.type=t,t&&(this.#r=!0),this.#e=n,this.#n=this.#e?this.#e.#n:this,this.#i=this.#n===this?i:this.#n.#i,this.#u=this.#n===this?[]:this.#n.#u,t!=="!"||this.#n.#a||this.#u.push(this),this.#o=this.#e?this.#e.#t.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(const t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#c!==void 0?this.#c:this.type?this.#c=this.type+"("+this.#t.map((t=>String(t))).join("|")+")":this.#c=this.#t.map((t=>String(t))).join("")}#p(){if(this!==this.#n)throw new Error("should only call on root");if(this.#a)return this;let t;for(this.toString(),this.#a=!0;t=this.#u.pop();){if(t.type!=="!")continue;let n=t,i=n.#e;for(;i;){for(let a=n.#o+1;!i.type&&a<i.#t.length;a++)for(const u of t.#t){if(typeof u=="string")throw new Error("string part in extglob AST??");u.copyIn(i.#t[a])}n=i,i=n.#e}}return this}push(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];for(const a of n)if(a!==""){if(typeof a!="string"&&!(a instanceof yt&&a.#e===this))throw new Error("invalid part: "+a);this.#t.push(a)}}toJSON(){const t=this.type===null?this.#t.slice().map((n=>typeof n=="string"?n:n.toJSON())):[this.type,...this.#t.map((n=>n.toJSON()))];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#n||this.#n.#a&&this.#e?.type==="!")&&t.push({}),t}isStart(){if(this.#n===this)return!0;if(!this.#e?.isStart())return!1;if(this.#o===0)return!0;const t=this.#e;for(let n=0;n<this.#o;n++){const i=t.#t[n];if(!(i instanceof yt&&i.type==="!"))return!1}return!0}isEnd(){if(this.#n===this||this.#e?.type==="!")return!0;if(!this.#e?.isEnd())return!1;if(!this.type)return this.#e?.isEnd();const t=this.#e?this.#e.#t.length:0;return this.#o===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const n=new yt(this.type,t);for(const i of this.#t)n.copyIn(i);return n}static#l(t,n,i,a){let u=!1,c=!1,l=-1,m=!1;if(n.type===null){let v=i,w="";for(;v<t.length;){const E=t.charAt(v++);if(u||E==="\\")u=!u,w+=E;else if(c)v===l+1?E!=="^"&&E!=="!"||(m=!0):E!=="]"||v===l+2&&m||(c=!1),w+=E;else if(E!=="[")if(a.noext||!Un(E)||t.charAt(v)!=="(")w+=E;else{n.push(w),w="";const O=new yt(E,n);v=yt.#l(t,O,v,a),n.push(O)}else c=!0,l=v,m=!1,w+=E}return n.push(w),v}let f=i+1,s=new yt(null,n);const d=[];let p="";for(;f<t.length;){const v=t.charAt(f++);if(u||v==="\\")u=!u,p+=v;else if(c)f===l+1?v!=="^"&&v!=="!"||(m=!0):v!=="]"||f===l+2&&m||(c=!1),p+=v;else if(v!=="[")if(Un(v)&&t.charAt(f)==="("){s.push(p),p="";const w=new yt(v,s);s.push(w),f=yt.#l(t,w,f,a)}else if(v!=="|"){if(v===")")return p===""&&n.#t.length===0&&(n.#h=!0),s.push(p),p="",n.push(...d,s),f;p+=v}else s.push(p),p="",d.push(s),s=new yt(null,n);else c=!0,l=f,m=!1,p+=v}return n.type=null,n.#r=void 0,n.#t=[t.substring(i-1)],f}static fromGlob(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=new yt(null,void 0,n);return yt.#l(t,i,0,n),i}toMMPattern(){if(this!==this.#n)return this.#n.toMMPattern();const t=this.toString(),[n,i,a,u]=this.toRegExpSource();if(!(a||this.#r||this.#i.nocase&&!this.#i.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;const c=(this.#i.nocase?"i":"")+(u?"u":"");return Object.assign(new RegExp(`^${n}$`,c),{_src:n,_glob:t})}get options(){return this.#i}toRegExpSource(t){const n=t??!!this.#i.dot;if(this.#n===this&&this.#p(),!this.type){const m=this.isStart()&&this.isEnd(),f=this.#t.map((p=>{const[v,w,E,O]=typeof p=="string"?yt.#g(p,this.#r,m):p.toRegExpSource(t);return this.#r=this.#r||E,this.#s=this.#s||O,v})).join("");let s="";if(this.isStart()&&typeof this.#t[0]=="string"&&(this.#t.length!==1||!Ri.has(this.#t[0]))){const p=Ti,v=n&&p.has(f.charAt(0))||f.startsWith("\\.")&&p.has(f.charAt(2))||f.startsWith("\\.\\.")&&p.has(f.charAt(4)),w=!n&&!t&&p.has(f.charAt(0));s=v?"(?!(?:^|/)\\.\\.?(?:$|/))":w?xe:""}let d="";return this.isEnd()&&this.#n.#a&&this.#e?.type==="!"&&(d="(?:$|\\/)"),[s+f+d,Zt(f),this.#r=!!this.#r,this.#s]}const i=this.type==="*"||this.type==="+",a=this.type==="!"?"(?:(?!(?:":"(?:";let u=this.#f(n);if(this.isStart()&&this.isEnd()&&!u&&this.type!=="!"){const m=this.toString();return this.#t=[m],this.type=null,this.#r=void 0,[m,Zt(this.toString()),!1,!1]}let c=!i||t||n?"":this.#f(!0);c===u&&(c=""),c&&(u=`(?:${u})(?:${c})*?`);let l="";return l=this.type==="!"&&this.#h?(this.isStart()&&!n?xe:"")+Mn:a+u+(this.type==="!"?"))"+(!this.isStart()||n||t?"":xe)+jn+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&c?")":this.type==="*"&&c?")?":`)${this.type}`),[l,Zt(u),this.#r=!!this.#r,this.#s]}#f(t){return this.#t.map((n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");const[i,a,u,c]=n.toRegExpSource(t);return this.#s=this.#s||c,i})).filter((n=>!(this.isStart()&&this.isEnd()&&!n))).join("|")}static#g(t,n){let i=arguments.length>2&&arguments[2]!==void 0&&arguments[2],a=!1,u="",c=!1;for(let l=0;l<t.length;l++){const m=t.charAt(l);if(a)a=!1,u+=(Ci.has(m)?"\\":"")+m;else if(m!=="\\"){if(m==="["){const[f,s,d,p]=Oi(t,l);if(d){u+=f,c=c||s,l+=d-1,n=n||p;continue}}m!=="*"?m!=="?"?u+=m.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(u+=sn,n=!0):(u+=i&&t==="*"?Mn:jn,n=!0)}else l===t.length-1?u+="\\\\":a=!0}return[u,Zt(t),!!n,c]}}const mt=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ge(t),!(!n.nocomment&&t.charAt(0)==="#")&&new de(t,n).match(e)},Si=/^\*+([^+@!?\*\[\(]*)$/,xi=e=>t=>!t.startsWith(".")&&t.endsWith(e),Pi=e=>t=>t.endsWith(e),Li=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),_i=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),$i=/^\*+\.\*+$/,Di=e=>!e.startsWith(".")&&e.includes("."),Bi=e=>e!=="."&&e!==".."&&e.includes("."),Ui=/^\.\*+$/,ji=e=>e!=="."&&e!==".."&&e.startsWith("."),Mi=/^\*+$/,ki=e=>e.length!==0&&!e.startsWith("."),Gi=e=>e.length!==0&&e!=="."&&e!=="..",Fi=/^\?+([^+@!?\*\[\(]*)?$/,Vi=e=>{let[t,n=""]=e;const i=vr([t]);return n?(n=n.toLowerCase(),a=>i(a)&&a.toLowerCase().endsWith(n)):i},Xi=e=>{let[t,n=""]=e;const i=wr([t]);return n?(n=n.toLowerCase(),a=>i(a)&&a.toLowerCase().endsWith(n)):i},zi=e=>{let[t,n=""]=e;const i=wr([t]);return n?a=>i(a)&&a.endsWith(n):i},qi=e=>{let[t,n=""]=e;const i=vr([t]);return n?a=>i(a)&&a.endsWith(n):i},vr=e=>{let[t]=e;const n=t.length;return i=>i.length===n&&!i.startsWith(".")},wr=e=>{let[t]=e;const n=t.length;return i=>i.length===n&&i!=="."&&i!==".."},Nr=typeof Qt=="object"&&Qt?typeof Te=="object"&&Te&&Te.__MINIMATCH_TESTING_PLATFORM__||Qt.platform:"posix";mt.sep=Nr==="win32"?"\\":"/";const Ot=Symbol("globstar **");mt.GLOBSTAR=Ot,mt.filter=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return n=>mt(n,e,t)};const At=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.assign({},e,t)};mt.defaults=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return mt;const t=mt;return Object.assign((function(n,i){return t(n,i,At(e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}),{Minimatch:class extends t.Minimatch{constructor(n){super(n,At(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}))}static defaults(n){return t.defaults(At(e,n)).Minimatch}},AST:class extends t.AST{constructor(n,i){super(n,i,At(e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}static fromGlob(n){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.AST.fromGlob(n,At(e,i))}},unescape:function(n){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.unescape(n,At(e,i))},escape:function(n){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.escape(n,At(e,i))},filter:function(n){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.filter(n,At(e,i))},defaults:n=>t.defaults(At(e,n)),makeRe:function(n){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.makeRe(n,At(e,i))},braceExpand:function(n){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.braceExpand(n,At(e,i))},match:function(n,i){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t.match(n,i,At(e,a))},sep:t.sep,GLOBSTAR:Ot})};const Ar=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return ge(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Ni(e)};mt.braceExpand=Ar,mt.makeRe=function(e){return new de(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).makeRe()},mt.match=function(e,t){const n=new de(t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{});return e=e.filter((i=>n.match(i))),n.options.nonull&&!e.length&&e.push(t),e};const kn=/[?*]|[+@!]\(.*?\)|\[|\]/;class de{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ge(t),n=n||{},this.options=n,this.pattern=t,this.platform=n.platform||Nr,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.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 n of t)if(typeof n!="string")return!0;return!1}debug(){}make(){const t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#")return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=function(){return console.error(...arguments)}),this.debug(this.pattern,this.globSet);const i=this.globSet.map((u=>this.slashSplit(u)));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let a=this.globParts.map(((u,c,l)=>{if(this.isWindows&&this.windowsNoMagicRoot){const m=!(u[0]!==""||u[1]!==""||u[2]!=="?"&&kn.test(u[2])||kn.test(u[3])),f=/^[a-z]:/i.test(u[0]);if(m)return[...u.slice(0,4),...u.slice(4).map((s=>this.parse(s)))];if(f)return[u[0],...u.slice(1).map((s=>this.parse(s)))]}return u.map((m=>this.parse(m)))}));if(this.debug(this.pattern,a),this.set=a.filter((u=>u.indexOf(!1)===-1)),this.isWindows)for(let u=0;u<this.set.length;u++){const c=this.set[u];c[0]===""&&c[1]===""&&this.globParts[u][2]==="?"&&typeof c[3]=="string"&&/^[a-z]:$/i.test(c[3])&&(c[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let i=0;i<t.length;i++)for(let a=0;a<t[i].length;a++)t[i][a]==="**"&&(t[i][a]="*");const{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=n>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((n=>{let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let a=i;for(;n[a+1]==="**";)a++;a!==i&&n.splice(i,a-i)}return n}))}levelOneOptimize(t){return t.map((n=>(n=n.reduce(((i,a)=>{const u=i[i.length-1];return a==="**"&&u==="**"?i:a===".."&&u&&u!==".."&&u!=="."&&u!=="**"?(i.pop(),i):(i.push(a),i)}),[])).length===0?[""]:n))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let a=1;a<t.length-1;a++){const u=t[a];a===1&&u===""&&t[0]===""||u!=="."&&u!==""||(n=!0,t.splice(a,1),a--)}t[0]!=="."||t.length!==2||t[1]!=="."&&t[1]!==""||(n=!0,t.pop())}let i=0;for(;(i=t.indexOf("..",i+1))!==-1;){const a=t[i-1];a&&a!=="."&&a!==".."&&a!=="**"&&(n=!0,t.splice(i-1,2),i-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let i of t){let a=-1;for(;(a=i.indexOf("**",a+1))!==-1;){let c=a;for(;i[c+1]==="**";)c++;c>a&&i.splice(a+1,c-a);let l=i[a+1];const m=i[a+2],f=i[a+3];if(l!==".."||!m||m==="."||m===".."||!f||f==="."||f==="..")continue;n=!0,i.splice(a,1);const s=i.slice(0);s[a]="**",t.push(s),a--}if(!this.preserveMultipleSlashes){for(let c=1;c<i.length-1;c++){const l=i[c];c===1&&l===""&&i[0]===""||l!=="."&&l!==""||(n=!0,i.splice(c,1),c--)}i[0]!=="."||i.length!==2||i[1]!=="."&&i[1]!==""||(n=!0,i.pop())}let u=0;for(;(u=i.indexOf("..",u+1))!==-1;){const c=i[u-1];if(c&&c!=="."&&c!==".."&&c!=="**"){n=!0;const l=u===1&&i[u+1]==="**"?["."]:[];i.splice(u-1,2,...l),i.length===0&&i.push(""),u-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let i=n+1;i<t.length;i++){const a=this.partsMatch(t[n],t[i],!this.preserveMultipleSlashes);if(a){t[n]=[],t[i]=a;break}}return t.filter((n=>n.length))}partsMatch(t,n){let i=arguments.length>2&&arguments[2]!==void 0&&arguments[2],a=0,u=0,c=[],l="";for(;a<t.length&&u<n.length;)if(t[a]===n[u])c.push(l==="b"?n[u]:t[a]),a++,u++;else if(i&&t[a]==="**"&&n[u]===t[a+1])c.push(t[a]),a++;else if(i&&n[u]==="**"&&t[a]===n[u+1])c.push(n[u]),u++;else if(t[a]!=="*"||!n[u]||!this.options.dot&&n[u].startsWith(".")||n[u]==="**"){if(n[u]!=="*"||!t[a]||!this.options.dot&&t[a].startsWith(".")||t[a]==="**"||l==="a")return!1;l="b",c.push(n[u]),a++,u++}else{if(l==="b")return!1;l="a",c.push(t[a]),a++,u++}return t.length===n.length&&c}parseNegate(){if(this.nonegate)return;const t=this.pattern;let n=!1,i=0;for(let a=0;a<t.length&&t.charAt(a)==="!";a++)n=!n,i++;i&&(this.pattern=t.slice(i)),this.negate=n}matchOne(t,n){let i=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const a=this.options;if(this.isWindows){const E=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),O=!E&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),I=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),h=O?3:E?0:void 0,b=!I&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3])?3:I?0:void 0;if(typeof h=="number"&&typeof b=="number"){const[T,P]=[t[h],n[b]];T.toLowerCase()===P.toLowerCase()&&(n[b]=T,b>h?n=n.slice(b):h>b&&(t=t.slice(h)))}}const{optimizationLevel:u=1}=this.options;u>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:n}),this.debug("matchOne",t.length,n.length);for(var c=0,l=0,m=t.length,f=n.length;c<m&&l<f;c++,l++){this.debug("matchOne loop");var s=n[l],d=t[c];if(this.debug(n,s,d),s===!1)return!1;if(s===Ot){this.debug("GLOBSTAR",[n,s,d]);var p=c,v=l+1;if(v===f){for(this.debug("** at the end");c<m;c++)if(t[c]==="."||t[c]===".."||!a.dot&&t[c].charAt(0)===".")return!1;return!0}for(;p<m;){var w=t[p];if(this.debug(` globstar while`,t,p,n,v,w),this.matchOne(t.slice(p),n.slice(v),i))return this.debug("globstar found match!",p,m,w),!0;if(w==="."||w===".."||!a.dot&&w.charAt(0)==="."){this.debug("dot detected!",t,p,n,v);break}this.debug("globstar swallow a segment, and continue"),p++}return!(!i||(this.debug(` >>> no match, partial?`,t,p,n,v),p!==m))}let E;if(typeof s=="string"?(E=d===s,this.debug("string match",s,d,E)):(E=s.test(d),this.debug("pattern match",s,d,E)),!E)return!1}if(c===m&&l===f)return!0;if(c===m)return i;if(l===f)return c===m-1&&t[c]==="";throw new Error("wtf?")}braceExpand(){return Ar(this.pattern,this.options)}parse(t){ge(t);const n=this.options;if(t==="**")return Ot;if(t==="")return"";let i,a=null;(i=t.match(Mi))?a=n.dot?Gi:ki:(i=t.match(Si))?a=(n.nocase?n.dot?_i:Li:n.dot?Pi:xi)(i[1]):(i=t.match(Fi))?a=(n.nocase?n.dot?Xi:Vi:n.dot?zi:qi)(i):(i=t.match($i))?a=n.dot?Bi:Di:(i=t.match(Ui))&&(a=ji);const u=yt.fromGlob(t,this.options).toMMPattern();return a&&typeof u=="object"&&Reflect.defineProperty(u,"test",{value:a}),u}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const n=this.options,i=n.noglobstar?"[^/]*?":n.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",a=new Set(n.nocase?["i"]:[]);let u=t.map((m=>{const f=m.map((s=>{if(s instanceof RegExp)for(const d of s.flags.split(""))a.add(d);return typeof s=="string"?s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):s===Ot?Ot:s._src}));return f.forEach(((s,d)=>{const p=f[d+1],v=f[d-1];s===Ot&&v!==Ot&&(v===void 0?p!==void 0&&p!==Ot?f[d+1]="(?:\\/|"+i+"\\/)?"+p:f[d]=i:p===void 0?f[d-1]=v+"(?:\\/|"+i+")?":p!==Ot&&(f[d-1]=v+"(?:\\/|\\/"+i+"\\/)"+p,f[d+1]=Ot))})),f.filter((s=>s!==Ot)).join("/")})).join("|");const[c,l]=t.length>1?["(?:",")"]:["",""];u="^"+c+u+l+"$",this.negate&&(u="^(?!"+u+").+$");try{this.regexp=new RegExp(u,[...a].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.partial;if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;const i=this.options;this.isWindows&&(t=t.split("\\").join("/"));const a=this.slashSplit(t);this.debug(this.pattern,"split",a);const u=this.set;this.debug(this.pattern,"set",u);let c=a[a.length-1];if(!c)for(let l=a.length-2;!c&&l>=0;l--)c=a[l];for(let l=0;l<u.length;l++){const m=u[l];let f=a;if(i.matchBase&&m.length===1&&(f=[c]),this.matchOne(f,m,n))return!!i.flipNegate||!this.negate}return!i.flipNegate&&this.negate}static defaults(t){return mt.defaults(t).Minimatch}}function on(e){const t=new Error(`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:""}Invalid response: ${e.status} ${e.statusText}`);return t.status=e.status,t.response=e,t}function lt(e,t){const{status:n}=t;if(n===401&&e.digest)return t;if(n>=400)throw on(t);return t}function Mt(e,t){return arguments.length>2&&arguments[2]!==void 0&&arguments[2]?{data:t,headers:e.headers?Ei(e.headers):{},status:e.status,statusText:e.statusText}:t}mt.AST=yt,mt.Minimatch=de,mt.escape=function(e){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&")},mt.unescape=Zt;const Wi=(Gn=function(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=ct({url:et(e.remoteURL,tt(t)),method:"COPY",headers:{Destination:et(e.remoteURL,tt(n)),Overwrite:i.overwrite===!1?"F":"T",Depth:i.shallow?"0":"infinity"}},e,i);return c=function(l){lt(e,l)},(u=ut(a,e))&&u.then||(u=Promise.resolve(u)),c?u.then(c):u;var u,c},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(Gn.apply(this,e))}catch(n){return Promise.reject(n)}});var Gn,an=Y(635),Yi=Y(829),Lt=Y.n(Yi),Vt=(function(e){return e.Array="array",e.Object="object",e.Original="original",e})(Vt||{});function oe(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Vt.Original;const i=Lt().get(e,t);return n==="array"&&Array.isArray(i)===!1?[i]:n==="object"&&Array.isArray(i)?i[0]:i}function te(e){return new Promise((t=>{t((function(n){const{multistatus:i}=n;if(i==="")return{multistatus:{response:[]}};if(!i)throw new Error("Invalid response: No root multistatus found");const a={multistatus:Array.isArray(i)?i[0]:i};return Lt().set(a,"multistatus.response",oe(a,"multistatus.response",Vt.Array)),Lt().set(a,"multistatus.response",Lt().get(a,"multistatus.response").map((u=>(function(c){const l=Object.assign({},c);return l.status?Lt().set(l,"status",oe(l,"status",Vt.Object)):(Lt().set(l,"propstat",oe(l,"propstat",Vt.Object)),Lt().set(l,"propstat.prop",oe(l,"propstat.prop",Vt.Object))),l})(u)))),a})(new an.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor:(n,i,a)=>i==="true"||i==="false"?i==="true":i,tagValueProcessor(n,i,a){if(!a.endsWith("propstat.prop.displayname"))return i}}).parse(e)))}))}function Ee(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const{getlastmodified:i=null,getcontentlength:a="0",resourcetype:u=null,getcontenttype:c=null,getetag:l=null}=e,m=u&&typeof u=="object"&&u.collection!==void 0?"directory":"file",f={filename:t,basename:le().basename(t),lastmod:i,size:parseInt(a,10),type:m,etag:typeof l=="string"?l.replace(/"/g,""):null};return m==="file"&&(f.mime=c&&typeof c=="string"?c.split(";")[0]:""),n&&(e.displayname!==void 0&&(e.displayname=String(e.displayname)),f.props=e),f}function Or(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],i=null;try{e.multistatus.response[0].propstat&&(i=e.multistatus.response[0])}catch{}if(!i)throw new Error("Failed getting item stat: bad response");const{propstat:{prop:a,status:u}}=i,[c,l,m]=u.split(" ",3),f=parseInt(l,10);if(f>=400){const s=new Error(`Invalid response: ${f} ${m}`);throw s.status=f,s}return Ee(a,Jt(t),n)}function Ir(e){switch(String(e)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(e),10)}}function Pe(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const un=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(i){return Promise.reject(i)}}})((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:i=!1}=n,a=ct({url:et(e.remoteURL,tt(t)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},e,n);return Pe(ut(a,e),(function(u){return lt(e,u),Pe(u.text(),(function(c){return Pe(te(c),(function(l){const m=Or(l,t,i);return Mt(u,m,i)}))}))}))}));function Tr(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Hi=Rr((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=(function(u){if(!u||u==="/")return[];let c=u;const l=[];do l.push(c),c=le().dirname(c);while(c&&c!=="/");return l})(Jt(t));i.sort(((u,c)=>u.length>c.length?1:c.length>u.length?-1:0));let a=!1;return(function(u,c,l){if(typeof u[Vn]=="function"){let E=function(O){try{for(;!(m=d.next()).done;)if((O=c(m.value))&&O.then){if(!Xn(O))return void O.then(E,s||(s=bt.bind(null,f=new Xt,2)));O=O.v}f?bt(f,1,O):f=O}catch(I){bt(f||(f=new Xt),2,I)}};var m,f,s,d=u[Vn]();if(E(),d.return){var p=function(O){try{m.done||d.return()}catch{}return O};if(f&&f.then)return f.then(p,(function(O){throw p(O)}));p()}return f}if(!("length"in u))throw new TypeError("Object is not iterable");for(var v=[],w=0;w<u.length;w++)v.push(u[w]);return(function(E,O,I){var h,b,T=-1;return(function P(R){try{for(;++T<E.length&&(!I||!I());)if((R=O(T))&&R.then){if(!Xn(R))return void R.then(P,b||(b=bt.bind(null,h=new Xt,2)));R=R.v}h?bt(h,1,R):h=R}catch(L){bt(h||(h=new Xt),2,L)}})(),h})(v,(function(E){return c(v[E])}),l)})(i,(function(u){return c=function(){return(function(m,f){try{var s=Tr(un(e,u),(function(d){if(d.type!=="directory")throw new Error(`Path includes a file: ${t}`)}))}catch(d){return f(d)}return s&&s.then?s.then(void 0,f):s})(0,(function(m){const f=m;return(function(){if(f.status===404)return a=!0,Fn(Qe(e,u,{...n,recursive:!1}));throw m})()}))},(l=(function(){if(a)return Fn(Qe(e,u,{...n,recursive:!1}))})())&&l.then?l.then(c):c();var c,l}),(function(){return!1}))}));function Rr(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(i){return Promise.reject(i)}}}function Zi(){}function Fn(e,t){return e&&e.then?e.then(Zi):Promise.resolve()}const Vn=typeof Symbol<"u"?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function bt(e,t,n){if(!e.s){if(n instanceof Xt){if(!n.s)return void(n.o=bt.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(bt.bind(null,e,t),bt.bind(null,e,2));e.s=t,e.v=n;const i=e.o;i&&i(e)}}const Xt=(function(){function e(){}return e.prototype.then=function(t,n){const i=new e,a=this.s;if(a){const u=1&a?t:n;if(u){try{bt(i,1,u(this.v))}catch(c){bt(i,2,c)}return i}return this}return this.o=function(u){try{const c=u.v;1&u.s?bt(i,1,t?t(c):c):n?bt(i,1,n(c)):bt(i,2,c)}catch(c){bt(i,2,c)}},i},e})();function Xn(e){return e instanceof Xt&&1&e.s}const Qe=Rr((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(n.recursive===!0)return Hi(e,t,n);const i=ct({url:et(e.remoteURL,(a=tt(t),a.endsWith("/")?a:a+"/")),method:"MKCOL"},e,n);var a;return Tr(ut(i,e),(function(u){lt(e,u)}))}));var Qi=Y(388),zn=Y.n(Qi);const Ki=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(i){return Promise.reject(i)}}})((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i={};if(typeof n.range=="object"&&typeof n.range.start=="number"){let l=`bytes=${n.range.start}-`;typeof n.range.end=="number"&&(l=`${l}${n.range.end}`),i.Range=l}const a=ct({url:et(e.remoteURL,tt(t)),method:"GET",headers:i},e,n);return c=function(l){if(lt(e,l),i.Range&&l.status!==206){const m=new Error(`Invalid response code for partial request: ${l.status}`);throw m.status=l.status,m}return n.callback&&setTimeout((()=>{n.callback(l)}),0),l.body},(u=ut(a,e))&&u.then||(u=Promise.resolve(u)),c?u.then(c):u;var u,c})),Ji=()=>{},ts=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(i){return Promise.reject(i)}}})((function(e,t,n){n.url||(n.url=et(e.remoteURL,tt(t)));const i=ct(n,e,{});return u=function(c){return lt(e,c),c},(a=ut(i,e))&&a.then||(a=Promise.resolve(a)),u?a.then(u):a;var a,u})),es=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(i){return Promise.reject(i)}}})((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=ct({url:et(e.remoteURL,tt(t)),method:"DELETE"},e,n);return u=function(c){lt(e,c)},(a=ut(i,e))&&a.then||(a=Promise.resolve(a)),u?a.then(u):a;var a,u})),ns=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(i){return Promise.reject(i)}}})((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function(i,a){try{var u=(c=un(e,t,n),l=function(){return!0},m?l?l(c):c:(c&&c.then||(c=Promise.resolve(c)),l?c.then(l):c))}catch(f){return a(f)}var c,l,m;return u&&u.then?u.then(void 0,a):u})(0,(function(i){if(i.status===404)return!1;throw i}))}));function Le(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const rs=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(i){return Promise.reject(i)}}})((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=ct({url:et(e.remoteURL,tt(t),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:n.deep?"infinity":"1"}},e,n);return Le(ut(i,e),(function(a){return lt(e,a),Le(a.text(),(function(u){if(!u)throw new Error("Failed parsing directory contents: Empty response");return Le(te(u),(function(c){const l=xn(t);let m=(function(f,s,d){let p=arguments.length>3&&arguments[3]!==void 0&&arguments[3],v=arguments.length>4&&arguments[4]!==void 0&&arguments[4];const w=le().join(s,"/"),{multistatus:{response:E}}=f,O=E.map((I=>{const h=(function(T){try{return T.replace(/^https?:\/\/[^\/]+/,"")}catch(P){throw new vt(P,"Failed normalising HREF")}})(I.href),{propstat:{prop:b}}=I;return Ee(b,w==="/"?decodeURIComponent(Jt(h)):Jt(le().relative(decodeURIComponent(w),decodeURIComponent(h))),p)}));return v?O:O.filter((I=>I.basename&&(I.type==="file"||I.filename!==d.replace(/\/$/,""))))})(c,xn(e.remoteBasePath||e.remotePath),l,n.details,n.includeSelf);return n.glob&&(m=(function(f,s){return f.filter((d=>mt(d.filename,s,{matchBase:!0})))})(m,n.glob)),Mt(a,m,n.details)}))}))}))}));function cn(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(i){return Promise.reject(i)}}}const is=cn((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=ct({url:et(e.remoteURL,tt(t)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[as]},e,n);return me(ut(i,e),(function(a){return lt(e,a),me(a.text(),(function(u){return Mt(a,u,n.details)}))}))}));function me(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const ss=cn((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=ct({url:et(e.remoteURL,tt(t)),method:"GET"},e,n);return me(ut(i,e),(function(a){let u;return lt(e,a),(function(c,l){var m=c();return m&&m.then?m.then(l):l()})((function(){return me(a.arrayBuffer(),(function(c){u=c}))}),(function(){return Mt(a,u,n.details)}))}))})),os=cn((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{format:i="binary"}=n;if(i!=="binary"&&i!=="text")throw new vt({info:{code:_t.InvalidOutputFormat}},`Invalid output format: ${i}`);return i==="text"?is(e,t,n):ss(e,t,n)})),as=e=>e;function us(e){return new an.XMLBuilder({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(Cr({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:e}}},"d"))}function Cr(e,t){const n={...e};for(const i in n)n.hasOwnProperty(i)&&(n[i]&&typeof n[i]=="object"&&i.indexOf(":")===-1?(n[`${t}:${i}`]=Cr(n[i],t),delete n[i]):/^@_/.test(i)===!1&&(n[`${t}:${i}`]=n[i],delete n[i]));return n}function Ke(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function Sr(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(i){return Promise.reject(i)}}}const cs=Sr((function(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=ct({url:et(e.remoteURL,tt(t)),method:"UNLOCK",headers:{"Lock-Token":n}},e,i);return Ke(ut(a,e),(function(u){if(lt(e,u),u.status!==204&&u.status!==200)throw on(u)}))})),ls=Sr((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{refreshToken:i,timeout:a=hs}=n,u={Accept:"text/plain,application/xml",Timeout:a};i&&(u.If=i);const c=ct({url:et(e.remoteURL,tt(t)),method:"LOCK",headers:u,data:us(e.contactHref)},e,n);return Ke(ut(c,e),(function(l){return lt(e,l),Ke(l.text(),(function(m){const f=(p=m,new an.XMLParser({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(p)),s=Lt().get(f,"prop.lockdiscovery.activelock.locktoken.href"),d=Lt().get(f,"prop.lockdiscovery.activelock.timeout");var p;if(!s)throw on(l,"No lock token received: ");return{token:s,serverTimeout:d}}))}))})),hs="Infinite, Second-4100000000";function _e(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const fs=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(i){return Promise.reject(i)}}})((function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=t.path||"/",i=ct({url:et(e.remoteURL,n),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},e,t);return _e(ut(i,e),(function(a){return lt(e,a),_e(a.text(),(function(u){return _e(te(u),(function(c){const l=(function(m){try{const[f]=m.multistatus.response,{propstat:{prop:{"quota-used-bytes":s,"quota-available-bytes":d}}}=f;return s!==void 0&&d!==void 0?{used:parseInt(String(s),10),available:Ir(d)}:null}catch{}return null})(c);return Mt(a,l,t.details)}))}))}))}));function $e(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const ps=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(i){return Promise.reject(i)}}})((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:i=!1}=n,a=ct({url:et(e.remoteURL,tt(t)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":e.headers["Content-Type"]||"application/xml; charset=utf-8"}},e,n);return $e(ut(a,e),(function(u){return lt(e,u),$e(u.text(),(function(c){return $e(te(c),(function(l){const m=(function(f,s,d){const p={truncated:!1,results:[]};return p.truncated=f.multistatus.response.some((v=>(v.status||v.propstat?.status).split(" ",3)?.[1]==="507"&&v.href.replace(/\/$/,"").endsWith(tt(s).replace(/\/$/,"")))),f.multistatus.response.forEach((v=>{if(v.propstat===void 0)return;const w=v.href.split("/").map(decodeURIComponent).join("/");p.results.push(Ee(v.propstat.prop,w,d))})),p})(l,t,i);return Mt(u,m,i)}))}))}))})),gs=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(i){return Promise.reject(i)}}})((function(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=ct({url:et(e.remoteURL,tt(t)),method:"MOVE",headers:{Destination:et(e.remoteURL,tt(n)),Overwrite:i.overwrite===!1?"F":"T"}},e,i);return c=function(l){lt(e,l)},(u=ut(a,e))&&u.then||(u=Promise.resolve(u)),c?u.then(c):u;var u,c}));var ds=Y(172);const ms=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(i){return Promise.reject(i)}}})((function(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const{contentLength:a=!0,overwrite:u=!0}=i,c={"Content-Type":"application/octet-stream"};a===!1||(c["Content-Length"]=typeof a=="number"?`${a}`:`${(function(s){if(yr(s))return s.byteLength;if(Er(s))return s.length;if(typeof s=="string")return(0,ds.d)(s);throw new vt({info:{code:_t.DataTypeNoLength}},"Cannot calculate data length: Invalid type")})(n)}`),u||(c["If-None-Match"]="*");const l=ct({url:et(e.remoteURL,tt(t)),method:"PUT",headers:c,data:n},e,i);return f=function(s){try{lt(e,s)}catch(d){const p=d;if(p.status!==412||u)throw p;return!1}return!0},(m=ut(l,e))&&m.then||(m=Promise.resolve(m)),f?m.then(f):m;var m,f})),xr=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(i){return Promise.reject(i)}}})((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=ct({url:et(e.remoteURL,tt(t)),method:"OPTIONS"},e,n);return u=function(c){try{lt(e,c)}catch(l){throw l}return{compliance:(c.headers.get("DAV")??"").split(",").map((l=>l.trim())),server:c.headers.get("Server")??""}},(a=ut(i,e))&&a.then||(a=Promise.resolve(a)),u?a.then(u):a;var a,u}));function Kt(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const ys=ln((function(e,t,n,i,a){let u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(n>i||n<0)throw new vt({info:{code:_t.InvalidUpdateRange}},`Invalid update range ${n} for partial update`);const c={"Content-Type":"application/octet-stream","Content-Length":""+(i-n+1),"Content-Range":`bytes ${n}-${i}/*`},l=ct({url:et(e.remoteURL,tt(t)),method:"PUT",headers:c,data:a},e,u);return Kt(ut(l,e),(function(m){lt(e,m)}))}));function qn(e,t){var n=e();return n&&n.then?n.then(t):t(n)}const Es=ln((function(e,t,n,i,a){let u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(n>i||n<0)throw new vt({info:{code:_t.InvalidUpdateRange}},`Invalid update range ${n} for partial update`);const c={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(i-n+1),"X-Update-Range":`bytes=${n}-${i}`},l=ct({url:et(e.remoteURL,tt(t)),method:"PATCH",headers:c,data:a},e,u);return Kt(ut(l,e),(function(m){lt(e,m)}))}));function ln(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(i){return Promise.reject(i)}}}const bs=ln((function(e,t,n,i,a){let u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};return Kt(xr(e,t,u),(function(c){let l=!1;return qn((function(){if(c.compliance.includes("sabredav-partialupdate"))return Kt(Es(e,t,n,i,a,u),(function(m){return l=!0,m}))}),(function(m){let f=!1;return l?m:qn((function(){if(c.server.includes("Apache")&&c.compliance.includes("<http://apache.org/dav/propset/fs/1>"))return Kt(ys(e,t,n,i,a,u),(function(s){return f=!0,s}))}),(function(s){if(f)return s;throw new vt({info:{code:_t.NotSupported}},"Not supported")}))}))}))})),vs="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function ws(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{authType:n=null,remoteBasePath:i,contactHref:a=vs,ha1:u,headers:c={},httpAgent:l,httpsAgent:m,password:f,token:s,username:d,withCredentials:p}=t;let v=n;v||(v=d||f?Et.Password:Et.None);const w={authType:v,remoteBasePath:i,contactHref:a,ha1:u,headers:Object.assign({},c),httpAgent:l,httpsAgent:m,password:f,remotePath:ci(e),remoteURL:e,token:s,username:d,withCredentials:p};return gr(w,d,f,s,u),{copyFile:(E,O,I)=>Wi(w,E,O,I),createDirectory:(E,O)=>Qe(w,E,O),createReadStream:(E,O)=>(function(I,h){let b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const T=new(zn()).PassThrough;return Ki(I,h,b).then((P=>{P.pipe(T)})).catch((P=>{T.emit("error",P)})),T})(w,E,O),createWriteStream:(E,O,I)=>(function(h,b){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},P=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Ji;const R=new(zn()).PassThrough,L={};T.overwrite===!1&&(L["If-None-Match"]="*");const S=ct({url:et(h.remoteURL,tt(b)),method:"PUT",headers:L,data:R,maxRedirects:0},h,T);return ut(S,h).then((A=>lt(h,A))).then((A=>{setTimeout((()=>{P(A)}),0)})).catch((A=>{R.emit("error",A)})),R})(w,E,O,I),customRequest:(E,O)=>ts(w,E,O),deleteFile:(E,O)=>es(w,E,O),exists:(E,O)=>ns(w,E,O),getDirectoryContents:(E,O)=>rs(w,E,O),getFileContents:(E,O)=>os(w,E,O),getFileDownloadLink:E=>(function(O,I){let h=et(O.remoteURL,tt(I));const b=/^https:/i.test(h)?"https":"http";switch(O.authType){case Et.None:break;case Et.Password:{const T=Ln(O.headers.Authorization.replace(/^Basic /i,"").trim());h=h.replace(/^https?:\/\//,`${b}://${T}@`);break}default:throw new vt({info:{code:_t.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${O.authType}`)}return h})(w,E),getFileUploadLink:E=>(function(O,I){let h=`${et(O.remoteURL,tt(I))}?Content-Type=application/octet-stream`;const b=/^https:/i.test(h)?"https":"http";switch(O.authType){case Et.None:break;case Et.Password:{const T=Ln(O.headers.Authorization.replace(/^Basic /i,"").trim());h=h.replace(/^https?:\/\//,`${b}://${T}@`);break}default:throw new vt({info:{code:_t.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${O.authType}`)}return h})(w,E),getHeaders:()=>Object.assign({},w.headers),getQuota:E=>fs(w,E),lock:(E,O)=>ls(w,E,O),moveFile:(E,O,I)=>gs(w,E,O,I),putFileContents:(E,O,I)=>ms(w,E,O,I),partialUpdateFileContents:(E,O,I,h,b)=>bs(w,E,O,I,h,b),getDAVCompliance:E=>xr(w,E),search:(E,O)=>ps(w,E,O),setHeaders:E=>{w.headers=Object.assign({},E)},stat:(E,O)=>un(w,E,O),unlock:(E,O,I)=>cs(w,E,O,I)}}It.hT,It.O4,It.Kd,It.YK;var Ns=It.UU,As=It.Gu;It.ky,It.h4,It.ch,It.hq,It.i5;function Os(e){return e&&e.split("/").map(encodeURIComponent).join("/")}function Pr(e,t){return e=e.replace(/\\/g,"/").replace(/\/+$/g,"").replace(/.*\//,""),e}function ae(e){e=e.replaceAll(/\\/g,"/");const t=e.split("/");return t.length<=1?".":(t.pop(),t.length===1&&t[0]===""?"/":t.join("/"))}function Is(e){const t=Pr(e),n=t.lastIndexOf(".");return n>0?t.substring(n):""}function Ts(...e){if(arguments.length<1)return"";const t=e.filter(m=>m.length>0);if(t.length<1)return"";const n=t[t.length-1],i=t[0].charAt(0)==="/",a=n.charAt(n.length-1)==="/",u=t.reduce((m,f)=>m.concat(f.split("/")),[]);let c=!i;const l=u.reduce((m,f)=>f===""?m:c?(c=!1,m+f):m+"/"+f,"");return a?l+"/":l}const jt=Jr().setApp("@nextcloud/files").detectUser().build();var be=(e=>(e.Folder="folder",e.File="file",e))(be||{}),Ct=(e=>(e[e.NONE=0]="NONE",e[e.CREATE=4]="CREATE",e[e.READ=1]="READ",e[e.UPDATE=2]="UPDATE",e[e.DELETE=8]="DELETE",e[e.SHARE=16]="SHARE",e[e.ALL=31]="ALL",e))(Ct||{});const Lr=function(e,t){return e.match(t)!==null},Bt=(e,t)=>{if(e.id&&typeof e.id!="number")throw new Error("Invalid id type of value");if(!e.source)throw new Error("Missing mandatory source");try{new URL(e.source)}catch{throw new Error("Invalid source format, source must be a valid URL")}if(!e.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(e.displayname&&typeof e.displayname!="string")throw new Error("Invalid displayname type");if(e.mtime&&!(e.mtime instanceof Date))throw new Error("Invalid mtime type");if(e.crtime&&!(e.crtime instanceof Date))throw new Error("Invalid crtime type");if(!e.mime||typeof e.mime!="string"||!e.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in e&&typeof e.size!="number"&&e.size!==void 0)throw new Error("Invalid size type");if("permissions"in e&&e.permissions!==void 0&&!(typeof e.permissions=="number"&&e.permissions>=Ct.NONE&&e.permissions<=Ct.ALL))throw new Error("Invalid permissions");if(e.owner&&e.owner!==null&&typeof e.owner!="string")throw new Error("Invalid owner type");if(e.attributes&&typeof e.attributes!="object")throw new Error("Invalid attributes type");if(e.root&&typeof e.root!="string")throw new Error("Invalid root type");if(e.root&&!e.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(e.root&&!e.source.includes(e.root))throw new Error("Root must be part of the source");if(e.root&&Lr(e.source,t)){const n=e.source.match(t)[0];if(!e.source.includes(Ts(n,e.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(e.status&&!Object.values(hn).includes(e.status))throw new Error("Status must be a valid NodeStatus")};var hn=(e=>(e.NEW="new",e.FAILED="failed",e.LOADING="loading",e.LOCKED="locked",e))(hn||{});class ve{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;readonlyAttributes=Object.entries(Object.getOwnPropertyDescriptors(ve.prototype)).filter(t=>typeof t[1].get=="function"&&t[0]!=="__proto__").map(t=>t[0]);handler={set:(t,n,i)=>this.readonlyAttributes.includes(n)?!1:Reflect.set(t,n,i),deleteProperty:(t,n)=>this.readonlyAttributes.includes(n)?!1:Reflect.deleteProperty(t,n),get:(t,n,i)=>this.readonlyAttributes.includes(n)?(jt.warn(`Accessing "Node.attributes.${n}" is deprecated, access it directly on the Node instance.`),Reflect.get(this,n)):Reflect.get(t,n,i)};constructor(t,n){t.mime||(t.mime="application/octet-stream"),Bt(t,n||this._knownDavService),this._data={displayname:t.attributes?.displayname,...t,attributes:{}},this._attributes=new Proxy(this._data.attributes,this.handler),this.update(t.attributes??{}),n&&(this._knownDavService=n)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:t}=new URL(this.source);return t+Os(this.source.slice(t.length))}get basename(){return Pr(this.source)}get displayname(){return this._data.displayname||this.basename}set displayname(t){Bt({...this._data,displayname:t},this._knownDavService),this._data.displayname=t}get extension(){return Is(this.source)}get dirname(){if(this.root){let n=this.source;this.isDavResource&&(n=n.split(this._knownDavService).pop());const i=n.indexOf(this.root),a=this.root.replace(/\/$/,"");return ae(n.slice(i+a.length)||"/")}const t=new URL(this.source);return ae(t.pathname)}get mime(){return this._data.mime||"application/octet-stream"}set mime(t){t??="application/octet-stream",Bt({...this._data,mime:t},this._knownDavService),this._data.mime=t}get mtime(){return this._data.mtime}set mtime(t){Bt({...this._data,mtime:t},this._knownDavService),this._data.mtime=t}get crtime(){return this._data.crtime}get size(){return this._data.size}set size(t){Bt({...this._data,size:t},this._knownDavService),this.updateMtime(),this._data.size=t}get attributes(){return this._attributes}get permissions(){return this.owner===null&&!this.isDavResource?Ct.READ:this._data.permissions!==void 0?this._data.permissions:Ct.NONE}set permissions(t){Bt({...this._data,permissions:t},this._knownDavService),this.updateMtime(),this._data.permissions=t}get owner(){return this.isDavResource?this._data.owner:null}get isDavResource(){return Lr(this.source,this._knownDavService)}get isDavRessource(){return this.isDavResource}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavResource&&ae(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){let t=this.source;this.isDavResource&&(t=t.split(this._knownDavService).pop());const n=t.indexOf(this.root),i=this.root.replace(/\/$/,"");return t.slice(n+i.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id}get status(){return this._data?.status}set status(t){Bt({...this._data,status:t},this._knownDavService),this._data.status=t}get data(){return structuredClone(this._data)}move(t){Bt({...this._data,source:t},this._knownDavService);const n=this.basename;this._data.source=t,this.displayname===n&&this.basename!==n&&(this.displayname=this.basename)}rename(t){if(t.includes("/"))throw new Error("Invalid basename");this.move(ae(this.source)+"/"+t)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}update(t){for(const[n,i]of Object.entries(t))try{i===void 0?delete this.attributes[n]:this.attributes[n]=i}catch(a){if(a instanceof TypeError)continue;throw a}}}class fn extends ve{get type(){return be.File}clone(){return new fn(this.data)}}class pn extends ve{constructor(t){super({...t,mime:"httpd/unix-directory"})}get type(){return be.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}clone(){return new pn(this.data)}}const Rs=function(e=""){let t=Ct.NONE;return e&&((e.includes("C")||e.includes("K"))&&(t|=Ct.CREATE),e.includes("G")&&(t|=Ct.READ),(e.includes("W")||e.includes("N")||e.includes("V"))&&(t|=Ct.UPDATE),e.includes("D")&&(t|=Ct.DELETE),e.includes("R")&&(t|=Ct.SHARE)),t},_r=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:creationdate","d:displayname","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:size"],$r={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},no=function(e,t={nc:"http://nextcloud.org/ns"}){typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[..._r],window._nc_dav_namespaces={...$r});const n={...window._nc_dav_namespaces,...t};if(window._nc_dav_properties.find(a=>a===e))return jt.warn(`${e} already registered`,{prop:e}),!1;if(e.startsWith("<")||e.split(":").length!==2)return jt.error(`${e} is not valid. See example: 'oc:fileid'`,{prop:e}),!1;const i=e.split(":")[0];return n[i]?(window._nc_dav_properties.push(e),window._nc_dav_namespaces=n,!0):(jt.error(`${e} namespace unknown`,{prop:e,namespaces:n}),!1)},gn=function(){return typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[..._r]),window._nc_dav_properties.map(e=>`<${e} />`).join(" ")},dn=function(){return typeof window._nc_dav_namespaces>"u"&&(window._nc_dav_namespaces={...$r}),Object.keys(window._nc_dav_namespaces).map(e=>`xmlns:${e}="${window._nc_dav_namespaces?.[e]}"`).join(" ")},ro=function(){return`<?xml version="1.0"?> <d:propfind ${dn()}> <d:prop> ${gn()} </d:prop> </d:propfind>`},Cs=function(){return`<?xml version="1.0"?> <oc:filter-files ${dn()}> <d:prop> ${gn()} </d:prop> <oc:filter-rules> <oc:favorite>1</oc:favorite> </oc:filter-rules> </oc:filter-files>`},io=function(e){return`<?xml version="1.0" encoding="UTF-8"?> <d:searchrequest ${dn()} xmlns:ns="https://github.com/icewind1991/SearchDAV/ns"> <d:basicsearch> <d:select> <d:prop> ${gn()} </d:prop> </d:select> <d:from> <d:scope> <d:href>/files/${Je()?.uid}/</d:href> <d:depth>infinity</d:depth> </d:scope> </d:from> <d:where> <d:and> <d:or> <d:not> <d:eq> <d:prop> <d:getcontenttype/> </d:prop> <d:literal>httpd/unix-directory</d:literal> </d:eq> </d:not> <d:eq> <d:prop> <oc:size/> </d:prop> <d:literal>0</d:literal> </d:eq> </d:or> <d:gt> <d:prop> <d:getlastmodified/> </d:prop> <d:literal>${e}</d:literal> </d:gt> </d:and> </d:where> <d:orderby> <d:order> <d:prop> <d:getlastmodified/> </d:prop> <d:descending/> </d:order> </d:orderby> <d:limit> <d:nresults>100</d:nresults> <ns:firstresult>0</ns:firstresult> </d:limit> </d:basicsearch> </d:searchrequest>`};function Ss(){return tn()?`/files/${Zr()}`:`/files/${Je()?.uid}`}const Dr=Ss();function xs(){const e=Kr("dav");return tn()?e.replace("remote.php","public.php"):e}const Br=xs(),so=function(e=Br,t={}){const n=Ns(e,{headers:t});function i(a){n.setHeaders({...t,"X-Requested-With":"XMLHttpRequest",requesttoken:a??""})}return Yr(i),i(Wr()),As().patch("fetch",(a,u)=>{const c=u.headers;return c?.method&&(u.method=c.method,delete c.method),fetch(a,u)}),n},oo=(e,t="/",n=Dr)=>{const i=new AbortController;return new Pt(async(a,u,c)=>{c(()=>i.abort());try{const l=(await e.getDirectoryContents(`${n}${t}`,{signal:i.signal,details:!0,data:Cs(),headers:{method:"REPORT"},includeSelf:!0})).data.filter(m=>m.filename!==t).map(m=>Ps(m,n));a(l)}catch(l){u(l)}})},Ps=function(e,t=Dr,n=Br){let i=Je()?.uid;if(tn())i=i??"anonymous";else if(!i)throw new Error("No user id found");const a=e.props,u=Rs(a?.permissions),c=String(a?.["owner-id"]||i),l=a.fileid||0,m=new Date(Date.parse(e.lastmod)),f=new Date(Date.parse(a.creationdate)),s={id:l,source:`${n}${e.filename}`,mtime:!isNaN(m.getTime())&&m.getTime()!==0?m:void 0,crtime:!isNaN(f.getTime())&&f.getTime()!==0?f:void 0,mime:e.mime||"application/octet-stream",displayname:a.displayname!==void 0?String(a.displayname):void 0,size:a?.size||Number.parseInt(a.getcontentlength||"0"),status:l<0?hn.FAILED:void 0,permissions:u,owner:c,root:t,attributes:{...e,...a,hasPreview:a?.["has-preview"]}};return delete s.attributes?.props,e.type==="file"?new fn(s):new pn(s)};var De={},Be={exports:{}},Wn={},Yn;function Ls(){return Yn||(Yn=1,(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var t={},n={};n.byteLength=s,n.toByteArray=p,n.fromByteArray=E;for(var i=[],a=[],u=typeof Uint8Array<"u"?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,m=c.length;l<m;++l)i[l]=c[l],a[c.charCodeAt(l)]=l;a[45]=62,a[95]=63;function f(h){var b=h.length;if(b%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var T=h.indexOf("=");T===-1&&(T=b);var P=T===b?0:4-T%4;return[T,P]}function s(h){var b=f(h),T=b[0],P=b[1];return(T+P)*3/4-P}function d(h,b,T){return(b+T)*3/4-T}function p(h){var b,T=f(h),P=T[0],R=T[1],L=new u(d(h,P,R)),S=0,A=R>0?P-4:P,U;for(U=0;U<A;U+=4)b=a[h.charCodeAt(U)]<<18|a[h.charCodeAt(U+1)]<<12|a[h.charCodeAt(U+2)]<<6|a[h.charCodeAt(U+3)],L[S++]=b>>16&255,L[S++]=b>>8&255,L[S++]=b&255;return R===2&&(b=a[h.charCodeAt(U)]<<2|a[h.charCodeAt(U+1)]>>4,L[S++]=b&255),R===1&&(b=a[h.charCodeAt(U)]<<10|a[h.charCodeAt(U+1)]<<4|a[h.charCodeAt(U+2)]>>2,L[S++]=b>>8&255,L[S++]=b&255),L}function v(h){return i[h>>18&63]+i[h>>12&63]+i[h>>6&63]+i[h&63]}function w(h,b,T){for(var P,R=[],L=b;L<T;L+=3)P=(h[L]<<16&16711680)+(h[L+1]<<8&65280)+(h[L+2]&255),R.push(v(P));return R.join("")}function E(h){for(var b,T=h.length,P=T%3,R=[],L=16383,S=0,A=T-P;S<A;S+=L)R.push(w(h,S,S+L>A?A:S+L));return P===1?(b=h[T-1],R.push(i[b>>2]+i[b<<4&63]+"==")):P===2&&(b=(h[T-2]<<8)+h[T-1],R.push(i[b>>10]+i[b>>4&63]+i[b<<2&63]+"=")),R.join("")}var O={};O.read=function(h,b,T,P,R){var L,S,A=R*8-P-1,U=(1<<A)-1,M=U>>1,C=-7,D=T?R-1:0,F=T?-1:1,G=h[b+D];for(D+=F,L=G&(1<<-C)-1,G>>=-C,C+=A;C>0;L=L*256+h[b+D],D+=F,C-=8);for(S=L&(1<<-C)-1,L>>=-C,C+=P;C>0;S=S*256+h[b+D],D+=F,C-=8);if(L===0)L=1-M;else{if(L===U)return S?NaN:(G?-1:1)*(1/0);S=S+Math.pow(2,P),L=L-M}return(G?-1:1)*S*Math.pow(2,L-P)},O.write=function(h,b,T,P,R,L){var S,A,U,M=L*8-R-1,C=(1<<M)-1,D=C>>1,F=R===23?Math.pow(2,-24)-Math.pow(2,-77):0,G=P?0:L-1,X=P?1:-1,V=b<0||b===0&&1/b<0?1:0;for(b=Math.abs(b),isNaN(b)||b===1/0?(A=isNaN(b)?1:0,S=C):(S=Math.floor(Math.log(b)/Math.LN2),b*(U=Math.pow(2,-S))<1&&(S--,U*=2),S+D>=1?b+=F/U:b+=F*Math.pow(2,1-D),b*U>=2&&(S++,U/=2),S+D>=C?(A=0,S=C):S+D>=1?(A=(b*U-1)*Math.pow(2,R),S=S+D):(A=b*Math.pow(2,D-1)*Math.pow(2,R),S=0));R>=8;h[T+G]=A&255,G+=X,A/=256,R-=8);for(S=S<<R|A,M+=R;M>0;h[T+G]=S&255,G+=X,S/=256,M-=8);h[T+G-X]|=V*128},(function(h){const b=n,T=O,P=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;h.Buffer=C,h.SlowBuffer=kt,h.INSPECT_MAX_BYTES=50;const R=2147483647;h.kMaxLength=R;const{Uint8Array:L,ArrayBuffer:S,SharedArrayBuffer:A}=globalThis;C.TYPED_ARRAY_SUPPORT=U(),!C.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function U(){try{const r=new L(1),o={foo:function(){return 42}};return Object.setPrototypeOf(o,L.prototype),Object.setPrototypeOf(r,o),r.foo()===42}catch{return!1}}Object.defineProperty(C.prototype,"parent",{enumerable:!0,get:function(){if(C.isBuffer(this))return this.buffer}}),Object.defineProperty(C.prototype,"offset",{enumerable:!0,get:function(){if(C.isBuffer(this))return this.byteOffset}});function M(r){if(r>R)throw new RangeError('The value "'+r+'" is invalid for option "size"');const o=new L(r);return Object.setPrototypeOf(o,C.prototype),o}function C(r,o,g){if(typeof r=="number"){if(typeof o=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return X(r)}return D(r,o,g)}C.poolSize=8192;function D(r,o,g){if(typeof r=="string")return V(r,o);if(S.isView(r))return W(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(St(r,S)||r&&St(r.buffer,S)||typeof A<"u"&&(St(r,A)||r&&St(r.buffer,A)))return ot(r,o,g);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const x=r.valueOf&&r.valueOf();if(x!=null&&x!==r)return C.from(x,o,g);const $=q(r);if($)return $;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return C.from(r[Symbol.toPrimitive]("string"),o,g);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}C.from=function(r,o,g){return D(r,o,g)},Object.setPrototypeOf(C.prototype,L.prototype),Object.setPrototypeOf(C,L);function F(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function G(r,o,g){return F(r),r<=0?M(r):o!==void 0?typeof g=="string"?M(r).fill(o,g):M(r).fill(o):M(r)}C.alloc=function(r,o,g){return G(r,o,g)};function X(r){return F(r),M(r<0?0:Q(r)|0)}C.allocUnsafe=function(r){return X(r)},C.allocUnsafeSlow=function(r){return X(r)};function V(r,o){if((typeof o!="string"||o==="")&&(o="utf8"),!C.isEncoding(o))throw new TypeError("Unknown encoding: "+o);const g=$t(r,o)|0;let x=M(g);const $=x.write(r,o);return $!==g&&(x=x.slice(0,$)),x}function Z(r){const o=r.length<0?0:Q(r.length)|0,g=M(o);for(let x=0;x<o;x+=1)g[x]=r[x]&255;return g}function W(r){if(St(r,L)){const o=new L(r);return ot(o.buffer,o.byteOffset,o.byteLength)}return Z(r)}function ot(r,o,g){if(o<0||r.byteLength<o)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<o+(g||0))throw new RangeError('"length" is outside of buffer bounds');let x;return o===void 0&&g===void 0?x=new L(r):g===void 0?x=new L(r,o):x=new L(r,o,g),Object.setPrototypeOf(x,C.prototype),x}function q(r){if(C.isBuffer(r)){const o=Q(r.length)|0,g=M(o);return g.length===0||r.copy(g,0,0,o),g}if(r.length!==void 0)return typeof r.length!="number"||Oe(r.length)?M(0):Z(r);if(r.type==="Buffer"&&Array.isArray(r.data))return Z(r.data)}function Q(r){if(r>=R)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+R.toString(16)+" bytes");return r|0}function kt(r){return+r!=r&&(r=0),C.alloc(+r)}C.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==C.prototype},C.compare=function(r,o){if(St(r,L)&&(r=C.from(r,r.offset,r.byteLength)),St(o,L)&&(o=C.from(o,o.offset,o.byteLength)),!C.isBuffer(r)||!C.isBuffer(o))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===o)return 0;let g=r.length,x=o.length;for(let $=0,B=Math.min(g,x);$<B;++$)if(r[$]!==o[$]){g=r[$],x=o[$];break}return g<x?-1:x<g?1:0},C.isEncoding=function(r){switch(String(r).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}},C.concat=function(r,o){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return C.alloc(0);let g;if(o===void 0)for(o=0,g=0;g<r.length;++g)o+=r[g].length;const x=C.allocUnsafe(o);let $=0;for(g=0;g<r.length;++g){let B=r[g];if(St(B,L))$+B.length>x.length?(C.isBuffer(B)||(B=C.from(B)),B.copy(x,$)):L.prototype.set.call(x,B,$);else if(C.isBuffer(B))B.copy(x,$);else throw new TypeError('"list" argument must be an Array of Buffers');$+=B.length}return x};function $t(r,o){if(C.isBuffer(r))return r.length;if(S.isView(r)||St(r,S))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);const g=r.length,x=arguments.length>2&&arguments[2]===!0;if(!x&&g===0)return 0;let $=!1;for(;;)switch(o){case"ascii":case"latin1":case"binary":return g;case"utf8":case"utf-8":return Ae(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g*2;case"hex":return g>>>1;case"base64":return An(r).length;default:if($)return x?-1:Ae(r).length;o=(""+o).toLowerCase(),$=!0}}C.byteLength=$t;function Nt(r,o,g){let x=!1;if((o===void 0||o<0)&&(o=0),o>this.length||((g===void 0||g>this.length)&&(g=this.length),g<=0)||(g>>>=0,o>>>=0,g<=o))return"";for(r||(r="utf8");;)switch(r){case"hex":return ee(this,o,g);case"utf8":case"utf-8":return ht(this,o,g);case"ascii":return Rt(this,o,g);case"latin1":case"binary":return we(this,o,g);case"base64":return gt(this,o,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return zt(this,o,g);default:if(x)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),x=!0}}C.prototype._isBuffer=!0;function Tt(r,o,g){const x=r[o];r[o]=r[g],r[g]=x}C.prototype.swap16=function(){const r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let o=0;o<r;o+=2)Tt(this,o,o+1);return this},C.prototype.swap32=function(){const r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let o=0;o<r;o+=4)Tt(this,o,o+3),Tt(this,o+1,o+2);return this},C.prototype.swap64=function(){const r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let o=0;o<r;o+=8)Tt(this,o,o+7),Tt(this,o+1,o+6),Tt(this,o+2,o+5),Tt(this,o+3,o+4);return this},C.prototype.toString=function(){const r=this.length;return r===0?"":arguments.length===0?ht(this,0,r):Nt.apply(this,arguments)},C.prototype.toLocaleString=C.prototype.toString,C.prototype.equals=function(r){if(!C.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:C.compare(this,r)===0},C.prototype.inspect=function(){let r="";const o=h.INSPECT_MAX_BYTES;return r=this.toString("hex",0,o).replace(/(.{2})/g,"$1 ").trim(),this.length>o&&(r+=" ... "),"<Buffer "+r+">"},P&&(C.prototype[P]=C.prototype.inspect),C.prototype.compare=function(r,o,g,x,$){if(St(r,L)&&(r=C.from(r,r.offset,r.byteLength)),!C.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(o===void 0&&(o=0),g===void 0&&(g=r?r.length:0),x===void 0&&(x=0),$===void 0&&($=this.length),o<0||g>r.length||x<0||$>this.length)throw new RangeError("out of range index");if(x>=$&&o>=g)return 0;if(x>=$)return-1;if(o>=g)return 1;if(o>>>=0,g>>>=0,x>>>=0,$>>>=0,this===r)return 0;let B=$-x,k=g-o;const K=Math.min(B,k),ft=this.slice(x,$),J=r.slice(o,g);for(let H=0;H<K;++H)if(ft[H]!==J[H]){B=ft[H],k=J[H];break}return B<k?-1:k<B?1:0};function N(r,o,g,x,$){if(r.length===0)return-1;if(typeof g=="string"?(x=g,g=0):g>2147483647?g=2147483647:g<-2147483648&&(g=-2147483648),g=+g,Oe(g)&&(g=$?0:r.length-1),g<0&&(g=r.length+g),g>=r.length){if($)return-1;g=r.length-1}else if(g<0)if($)g=0;else return-1;if(typeof o=="string"&&(o=C.from(o,x)),C.isBuffer(o))return o.length===0?-1:y(r,o,g,x,$);if(typeof o=="number")return o=o&255,typeof L.prototype.indexOf=="function"?$?L.prototype.indexOf.call(r,o,g):L.prototype.lastIndexOf.call(r,o,g):y(r,[o],g,x,$);throw new TypeError("val must be string, number or Buffer")}function y(r,o,g,x,$){let B=1,k=r.length,K=o.length;if(x!==void 0&&(x=String(x).toLowerCase(),x==="ucs2"||x==="ucs-2"||x==="utf16le"||x==="utf-16le")){if(r.length<2||o.length<2)return-1;B=2,k/=2,K/=2,g/=2}function ft(H,st){return B===1?H[st]:H.readUInt16BE(st*B)}let J;if($){let H=-1;for(J=g;J<k;J++)if(ft(r,J)===ft(o,H===-1?0:J-H)){if(H===-1&&(H=J),J-H+1===K)return H*B}else H!==-1&&(J-=J-H),H=-1}else for(g+K>k&&(g=k-K),J=g;J>=0;J--){let H=!0;for(let st=0;st<K;st++)if(ft(r,J+st)!==ft(o,st)){H=!1;break}if(H)return J}return-1}C.prototype.includes=function(r,o,g){return this.indexOf(r,o,g)!==-1},C.prototype.indexOf=function(r,o,g){return N(this,r,o,g,!0)},C.prototype.lastIndexOf=function(r,o,g){return N(this,r,o,g,!1)};function j(r,o,g,x){g=Number(g)||0;const $=r.length-g;x?(x=Number(x),x>$&&(x=$)):x=$;const B=o.length;x>B/2&&(x=B/2);let k;for(k=0;k<x;++k){const K=parseInt(o.substr(k*2,2),16);if(Oe(K))return k;r[g+k]=K}return k}function _(r,o,g,x){return ne(Ae(o,r.length-g),r,g,x)}function z(r,o,g,x){return ne(Vr(o),r,g,x)}function nt(r,o,g,x){return ne(An(o),r,g,x)}function rt(r,o,g,x){return ne(Xr(o,r.length-g),r,g,x)}C.prototype.write=function(r,o,g,x){if(o===void 0)x="utf8",g=this.length,o=0;else if(g===void 0&&typeof o=="string")x=o,g=this.length,o=0;else if(isFinite(o))o=o>>>0,isFinite(g)?(g=g>>>0,x===void 0&&(x="utf8")):(x=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const $=this.length-o;if((g===void 0||g>$)&&(g=$),r.length>0&&(g<0||o<0)||o>this.length)throw new RangeError("Attempt to write outside buffer bounds");x||(x="utf8");let B=!1;for(;;)switch(x){case"hex":return j(this,r,o,g);case"utf8":case"utf-8":return _(this,r,o,g);case"ascii":case"latin1":case"binary":return z(this,r,o,g);case"base64":return nt(this,r,o,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rt(this,r,o,g);default:if(B)throw new TypeError("Unknown encoding: "+x);x=(""+x).toLowerCase(),B=!0}},C.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function gt(r,o,g){return o===0&&g===r.length?b.fromByteArray(r):b.fromByteArray(r.slice(o,g))}function ht(r,o,g){g=Math.min(r.length,g);const x=[];let $=o;for(;$<g;){const B=r[$];let k=null,K=B>239?4:B>223?3:B>191?2:1;if($+K<=g){let ft,J,H,st;switch(K){case 1:B<128&&(k=B);break;case 2:ft=r[$+1],(ft&192)===128&&(st=(B&31)<<6|ft&63,st>127&&(k=st));break;case 3:ft=r[$+1],J=r[$+2],(ft&192)===128&&(J&192)===128&&(st=(B&15)<<12|(ft&63)<<6|J&63,st>2047&&(st<55296||st>57343)&&(k=st));break;case 4:ft=r[$+1],J=r[$+2],H=r[$+3],(ft&192)===128&&(J&192)===128&&(H&192)===128&&(st=(B&15)<<18|(ft&63)<<12|(J&63)<<6|H&63,st>65535&&st<1114112&&(k=st))}}k===null?(k=65533,K=1):k>65535&&(k-=65536,x.push(k>>>10&1023|55296),k=56320|k&1023),x.push(k),$+=K}return at(x)}const xt=4096;function at(r){const o=r.length;if(o<=xt)return String.fromCharCode.apply(String,r);let g="",x=0;for(;x<o;)g+=String.fromCharCode.apply(String,r.slice(x,x+=xt));return g}function Rt(r,o,g){let x="";g=Math.min(r.length,g);for(let $=o;$<g;++$)x+=String.fromCharCode(r[$]&127);return x}function we(r,o,g){let x="";g=Math.min(r.length,g);for(let $=o;$<g;++$)x+=String.fromCharCode(r[$]);return x}function ee(r,o,g){const x=r.length;(!o||o<0)&&(o=0),(!g||g<0||g>x)&&(g=x);let $="";for(let B=o;B<g;++B)$+=zr[r[B]];return $}function zt(r,o,g){const x=r.slice(o,g);let $="";for(let B=0;B<x.length-1;B+=2)$+=String.fromCharCode(x[B]+x[B+1]*256);return $}C.prototype.slice=function(r,o){const g=this.length;r=~~r,o=o===void 0?g:~~o,r<0?(r+=g,r<0&&(r=0)):r>g&&(r=g),o<0?(o+=g,o<0&&(o=0)):o>g&&(o=g),o<r&&(o=r);const x=this.subarray(r,o);return Object.setPrototypeOf(x,C.prototype),x};function it(r,o,g){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+o>g)throw new RangeError("Trying to access beyond buffer length")}C.prototype.readUintLE=C.prototype.readUIntLE=function(r,o,g){r=r>>>0,o=o>>>0,g||it(r,o,this.length);let x=this[r],$=1,B=0;for(;++B<o&&($*=256);)x+=this[r+B]*$;return x},C.prototype.readUintBE=C.prototype.readUIntBE=function(r,o,g){r=r>>>0,o=o>>>0,g||it(r,o,this.length);let x=this[r+--o],$=1;for(;o>0&&($*=256);)x+=this[r+--o]*$;return x},C.prototype.readUint8=C.prototype.readUInt8=function(r,o){return r=r>>>0,o||it(r,1,this.length),this[r]},C.prototype.readUint16LE=C.prototype.readUInt16LE=function(r,o){return r=r>>>0,o||it(r,2,this.length),this[r]|this[r+1]<<8},C.prototype.readUint16BE=C.prototype.readUInt16BE=function(r,o){return r=r>>>0,o||it(r,2,this.length),this[r]<<8|this[r+1]},C.prototype.readUint32LE=C.prototype.readUInt32LE=function(r,o){return r=r>>>0,o||it(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216},C.prototype.readUint32BE=C.prototype.readUInt32BE=function(r,o){return r=r>>>0,o||it(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])},C.prototype.readBigUInt64LE=Dt(function(r){r=r>>>0,Ft(r,"offset");const o=this[r],g=this[r+7];(o===void 0||g===void 0)&&qt(r,this.length-8);const x=o+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,$=this[++r]+this[++r]*2**8+this[++r]*2**16+g*2**24;return BigInt(x)+(BigInt($)<<BigInt(32))}),C.prototype.readBigUInt64BE=Dt(function(r){r=r>>>0,Ft(r,"offset");const o=this[r],g=this[r+7];(o===void 0||g===void 0)&&qt(r,this.length-8);const x=o*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],$=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+g;return(BigInt(x)<<BigInt(32))+BigInt($)}),C.prototype.readIntLE=function(r,o,g){r=r>>>0,o=o>>>0,g||it(r,o,this.length);let x=this[r],$=1,B=0;for(;++B<o&&($*=256);)x+=this[r+B]*$;return $*=128,x>=$&&(x-=Math.pow(2,8*o)),x},C.prototype.readIntBE=function(r,o,g){r=r>>>0,o=o>>>0,g||it(r,o,this.length);let x=o,$=1,B=this[r+--x];for(;x>0&&($*=256);)B+=this[r+--x]*$;return $*=128,B>=$&&(B-=Math.pow(2,8*o)),B},C.prototype.readInt8=function(r,o){return r=r>>>0,o||it(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]},C.prototype.readInt16LE=function(r,o){r=r>>>0,o||it(r,2,this.length);const g=this[r]|this[r+1]<<8;return g&32768?g|4294901760:g},C.prototype.readInt16BE=function(r,o){r=r>>>0,o||it(r,2,this.length);const g=this[r+1]|this[r]<<8;return g&32768?g|4294901760:g},C.prototype.readInt32LE=function(r,o){return r=r>>>0,o||it(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},C.prototype.readInt32BE=function(r,o){return r=r>>>0,o||it(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},C.prototype.readBigInt64LE=Dt(function(r){r=r>>>0,Ft(r,"offset");const o=this[r],g=this[r+7];(o===void 0||g===void 0)&&qt(r,this.length-8);const x=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(g<<24);return(BigInt(x)<<BigInt(32))+BigInt(o+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24)}),C.prototype.readBigInt64BE=Dt(function(r){r=r>>>0,Ft(r,"offset");const o=this[r],g=this[r+7];(o===void 0||g===void 0)&&qt(r,this.length-8);const x=(o<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(x)<<BigInt(32))+BigInt(this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+g)}),C.prototype.readFloatLE=function(r,o){return r=r>>>0,o||it(r,4,this.length),T.read(this,r,!0,23,4)},C.prototype.readFloatBE=function(r,o){return r=r>>>0,o||it(r,4,this.length),T.read(this,r,!1,23,4)},C.prototype.readDoubleLE=function(r,o){return r=r>>>0,o||it(r,8,this.length),T.read(this,r,!0,52,8)},C.prototype.readDoubleBE=function(r,o){return r=r>>>0,o||it(r,8,this.length),T.read(this,r,!1,52,8)};function wt(r,o,g,x,$,B){if(!C.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(o>$||o<B)throw new RangeError('"value" argument is out of bounds');if(g+x>r.length)throw new RangeError("Index out of range")}C.prototype.writeUintLE=C.prototype.writeUIntLE=function(r,o,g,x){if(r=+r,o=o>>>0,g=g>>>0,!x){const k=Math.pow(2,8*g)-1;wt(this,r,o,g,k,0)}let $=1,B=0;for(this[o]=r&255;++B<g&&($*=256);)this[o+B]=r/$&255;return o+g},C.prototype.writeUintBE=C.prototype.writeUIntBE=function(r,o,g,x){if(r=+r,o=o>>>0,g=g>>>0,!x){const k=Math.pow(2,8*g)-1;wt(this,r,o,g,k,0)}let $=g-1,B=1;for(this[o+$]=r&255;--$>=0&&(B*=256);)this[o+$]=r/B&255;return o+g},C.prototype.writeUint8=C.prototype.writeUInt8=function(r,o,g){return r=+r,o=o>>>0,g||wt(this,r,o,1,255,0),this[o]=r&255,o+1},C.prototype.writeUint16LE=C.prototype.writeUInt16LE=function(r,o,g){return r=+r,o=o>>>0,g||wt(this,r,o,2,65535,0),this[o]=r&255,this[o+1]=r>>>8,o+2},C.prototype.writeUint16BE=C.prototype.writeUInt16BE=function(r,o,g){return r=+r,o=o>>>0,g||wt(this,r,o,2,65535,0),this[o]=r>>>8,this[o+1]=r&255,o+2},C.prototype.writeUint32LE=C.prototype.writeUInt32LE=function(r,o,g){return r=+r,o=o>>>0,g||wt(this,r,o,4,4294967295,0),this[o+3]=r>>>24,this[o+2]=r>>>16,this[o+1]=r>>>8,this[o]=r&255,o+4},C.prototype.writeUint32BE=C.prototype.writeUInt32BE=function(r,o,g){return r=+r,o=o>>>0,g||wt(this,r,o,4,4294967295,0),this[o]=r>>>24,this[o+1]=r>>>16,this[o+2]=r>>>8,this[o+3]=r&255,o+4};function mn(r,o,g,x,$){Nn(o,x,$,r,g,7);let B=Number(o&BigInt(4294967295));r[g++]=B,B=B>>8,r[g++]=B,B=B>>8,r[g++]=B,B=B>>8,r[g++]=B;let k=Number(o>>BigInt(32)&BigInt(4294967295));return r[g++]=k,k=k>>8,r[g++]=k,k=k>>8,r[g++]=k,k=k>>8,r[g++]=k,g}function yn(r,o,g,x,$){Nn(o,x,$,r,g,7);let B=Number(o&BigInt(4294967295));r[g+7]=B,B=B>>8,r[g+6]=B,B=B>>8,r[g+5]=B,B=B>>8,r[g+4]=B;let k=Number(o>>BigInt(32)&BigInt(4294967295));return r[g+3]=k,k=k>>8,r[g+2]=k,k=k>>8,r[g+1]=k,k=k>>8,r[g]=k,g+8}C.prototype.writeBigUInt64LE=Dt(function(r,o=0){return mn(this,r,o,BigInt(0),BigInt("0xffffffffffffffff"))}),C.prototype.writeBigUInt64BE=Dt(function(r,o=0){return yn(this,r,o,BigInt(0),BigInt("0xffffffffffffffff"))}),C.prototype.writeIntLE=function(r,o,g,x){if(r=+r,o=o>>>0,!x){const K=Math.pow(2,8*g-1);wt(this,r,o,g,K-1,-K)}let $=0,B=1,k=0;for(this[o]=r&255;++$<g&&(B*=256);)r<0&&k===0&&this[o+$-1]!==0&&(k=1),this[o+$]=(r/B>>0)-k&255;return o+g},C.prototype.writeIntBE=function(r,o,g,x){if(r=+r,o=o>>>0,!x){const K=Math.pow(2,8*g-1);wt(this,r,o,g,K-1,-K)}let $=g-1,B=1,k=0;for(this[o+$]=r&255;--$>=0&&(B*=256);)r<0&&k===0&&this[o+$+1]!==0&&(k=1),this[o+$]=(r/B>>0)-k&255;return o+g},C.prototype.writeInt8=function(r,o,g){return r=+r,o=o>>>0,g||wt(this,r,o,1,127,-128),r<0&&(r=255+r+1),this[o]=r&255,o+1},C.prototype.writeInt16LE=function(r,o,g){return r=+r,o=o>>>0,g||wt(this,r,o,2,32767,-32768),this[o]=r&255,this[o+1]=r>>>8,o+2},C.prototype.writeInt16BE=function(r,o,g){return r=+r,o=o>>>0,g||wt(this,r,o,2,32767,-32768),this[o]=r>>>8,this[o+1]=r&255,o+2},C.prototype.writeInt32LE=function(r,o,g){return r=+r,o=o>>>0,g||wt(this,r,o,4,2147483647,-2147483648),this[o]=r&255,this[o+1]=r>>>8,this[o+2]=r>>>16,this[o+3]=r>>>24,o+4},C.prototype.writeInt32BE=function(r,o,g){return r=+r,o=o>>>0,g||wt(this,r,o,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[o]=r>>>24,this[o+1]=r>>>16,this[o+2]=r>>>8,this[o+3]=r&255,o+4},C.prototype.writeBigInt64LE=Dt(function(r,o=0){return mn(this,r,o,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),C.prototype.writeBigInt64BE=Dt(function(r,o=0){return yn(this,r,o,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function En(r,o,g,x,$,B){if(g+x>r.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("Index out of range")}function bn(r,o,g,x,$){return o=+o,g=g>>>0,$||En(r,o,g,4),T.write(r,o,g,x,23,4),g+4}C.prototype.writeFloatLE=function(r,o,g){return bn(this,r,o,!0,g)},C.prototype.writeFloatBE=function(r,o,g){return bn(this,r,o,!1,g)};function vn(r,o,g,x,$){return o=+o,g=g>>>0,$||En(r,o,g,8),T.write(r,o,g,x,52,8),g+8}C.prototype.writeDoubleLE=function(r,o,g){return vn(this,r,o,!0,g)},C.prototype.writeDoubleBE=function(r,o,g){return vn(this,r,o,!1,g)},C.prototype.copy=function(r,o,g,x){if(!C.isBuffer(r))throw new TypeError("argument should be a Buffer");if(g||(g=0),!x&&x!==0&&(x=this.length),o>=r.length&&(o=r.length),o||(o=0),x>0&&x<g&&(x=g),x===g||r.length===0||this.length===0)return 0;if(o<0)throw new RangeError("targetStart out of bounds");if(g<0||g>=this.length)throw new RangeError("Index out of range");if(x<0)throw new RangeError("sourceEnd out of bounds");x>this.length&&(x=this.length),r.length-o<x-g&&(x=r.length-o+g);const $=x-g;return this===r&&typeof L.prototype.copyWithin=="function"?this.copyWithin(o,g,x):L.prototype.set.call(r,this.subarray(g,x),o),$},C.prototype.fill=function(r,o,g,x){if(typeof r=="string"){if(typeof o=="string"?(x=o,o=0,g=this.length):typeof g=="string"&&(x=g,g=this.length),x!==void 0&&typeof x!="string")throw new TypeError("encoding must be a string");if(typeof x=="string"&&!C.isEncoding(x))throw new TypeError("Unknown encoding: "+x);if(r.length===1){const B=r.charCodeAt(0);(x==="utf8"&&B<128||x==="latin1")&&(r=B)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(o<0||this.length<o||this.length<g)throw new RangeError("Out of range index");if(g<=o)return this;o=o>>>0,g=g===void 0?this.length:g>>>0,r||(r=0);let $;if(typeof r=="number")for($=o;$<g;++$)this[$]=r;else{const B=C.isBuffer(r)?r:C.from(r,x),k=B.length;if(k===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for($=0;$<g-o;++$)this[$+o]=B[$%k]}return this};const Gt={};function Ne(r,o,g){Gt[r]=class extends g{constructor(){super(),Object.defineProperty(this,"message",{value:o.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${r}]`,this.stack,delete this.name}get code(){return r}set code(x){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:x,writable:!0})}toString(){return`${this.name} [${r}]: ${this.message}`}}}Ne("ERR_BUFFER_OUT_OF_BOUNDS",function(r){return r?`${r} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Ne("ERR_INVALID_ARG_TYPE",function(r,o){return`The "${r}" argument must be of type number. Received type ${typeof o}`},TypeError),Ne("ERR_OUT_OF_RANGE",function(r,o,g){let x=`The value of "${r}" is out of range.`,$=g;return Number.isInteger(g)&&Math.abs(g)>2**32?$=wn(String(g)):typeof g=="bigint"&&($=String(g),(g>BigInt(2)**BigInt(32)||g<-(BigInt(2)**BigInt(32)))&&($=wn($)),$+="n"),x+=` It must be ${o}. Received ${$}`,x},RangeError);function wn(r){let o="",g=r.length;const x=r[0]==="-"?1:0;for(;g>=x+4;g-=3)o=`_${r.slice(g-3,g)}${o}`;return`${r.slice(0,g)}${o}`}function kr(r,o,g){Ft(o,"offset"),(r[o]===void 0||r[o+g]===void 0)&&qt(o,r.length-(g+1))}function Nn(r,o,g,x,$,B){if(r>g||r<o){const k=typeof o=="bigint"?"n":"";let K;throw o===0||o===BigInt(0)?K=`>= 0${k} and < 2${k} ** ${(B+1)*8}${k}`:K=`>= -(2${k} ** ${(B+1)*8-1}${k}) and < 2 ** ${(B+1)*8-1}${k}`,new Gt.ERR_OUT_OF_RANGE("value",K,r)}kr(x,$,B)}function Ft(r,o){if(typeof r!="number")throw new Gt.ERR_INVALID_ARG_TYPE(o,"number",r)}function qt(r,o,g){throw Math.floor(r)!==r?(Ft(r,g),new Gt.ERR_OUT_OF_RANGE("offset","an integer",r)):o<0?new Gt.ERR_BUFFER_OUT_OF_BOUNDS:new Gt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${o}`,r)}const Gr=/[^+/0-9A-Za-z-_]/g;function Fr(r){if(r=r.split("=")[0],r=r.trim().replace(Gr,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function Ae(r,o){o=o||1/0;let g;const x=r.length;let $=null;const B=[];for(let k=0;k<x;++k){if(g=r.charCodeAt(k),g>55295&&g<57344){if(!$){if(g>56319){(o-=3)>-1&&B.push(239,191,189);continue}else if(k+1===x){(o-=3)>-1&&B.push(239,191,189);continue}$=g;continue}if(g<56320){(o-=3)>-1&&B.push(239,191,189),$=g;continue}g=($-55296<<10|g-56320)+65536}else $&&(o-=3)>-1&&B.push(239,191,189);if($=null,g<128){if((o-=1)<0)break;B.push(g)}else if(g<2048){if((o-=2)<0)break;B.push(g>>6|192,g&63|128)}else if(g<65536){if((o-=3)<0)break;B.push(g>>12|224,g>>6&63|128,g&63|128)}else if(g<1114112){if((o-=4)<0)break;B.push(g>>18|240,g>>12&63|128,g>>6&63|128,g&63|128)}else throw new Error("Invalid code point")}return B}function Vr(r){const o=[];for(let g=0;g<r.length;++g)o.push(r.charCodeAt(g)&255);return o}function Xr(r,o){let g,x,$;const B=[];for(let k=0;k<r.length&&!((o-=2)<0);++k)g=r.charCodeAt(k),x=g>>8,$=g%256,B.push($),B.push(x);return B}function An(r){return b.toByteArray(Fr(r))}function ne(r,o,g,x){let $;for($=0;$<x&&!($+g>=o.length||$>=r.length);++$)o[$+g]=r[$];return $}function St(r,o){return r instanceof o||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===o.name}function Oe(r){return r!==r}const zr=(function(){const r="0123456789abcdef",o=new Array(256);for(let g=0;g<16;++g){const x=g*16;for(let $=0;$<16;++$)o[x+$]=r[g]+r[$]}return o})();function Dt(r){return typeof BigInt>"u"?qr:r}function qr(){throw new Error("BigInt not supported")}})(t);const I=t.Buffer;e.Blob=t.Blob,e.BlobOptions=t.BlobOptions,e.Buffer=t.Buffer,e.File=t.File,e.FileOptions=t.FileOptions,e.INSPECT_MAX_BYTES=t.INSPECT_MAX_BYTES,e.SlowBuffer=t.SlowBuffer,e.TranscodeEncoding=t.TranscodeEncoding,e.atob=t.atob,e.btoa=t.btoa,e.constants=t.constants,e.default=I,e.isAscii=t.isAscii,e.isUtf8=t.isUtf8,e.kMaxLength=t.kMaxLength,e.kStringMaxLength=t.kStringMaxLength,e.resolveObjectURL=t.resolveObjectURL,e.transcode=t.transcode})(Wn)),Wn}var Hn;function _s(){return Hn||(Hn=1,(function(e,t){var n=Ls(),i=n.Buffer;function a(c,l){for(var m in c)l[m]=c[m]}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(a(n,t),t.Buffer=u);function u(c,l,m){return i(c,l,m)}u.prototype=Object.create(i.prototype),a(i,u),u.from=function(c,l,m){if(typeof c=="number")throw new TypeError("Argument must not be a number");return i(c,l,m)},u.alloc=function(c,l,m){if(typeof c!="number")throw new TypeError("Argument must be a number");var f=i(c);return l!==void 0?typeof m=="string"?f.fill(l,m):f.fill(l):f.fill(0),f},u.allocUnsafe=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return i(c)},u.allocUnsafeSlow=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(c)}})(Be,Be.exports)),Be.exports}var Zn;function $s(){if(Zn)return De;Zn=1;var e=_s().Buffer,t=e.isEncoding||function(I){switch(I=""+I,I&&I.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 n(I){if(!I)return"utf8";for(var h;;)switch(I){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 I;default:if(h)return;I=(""+I).toLowerCase(),h=!0}}function i(I){var h=n(I);if(typeof h!="string"&&(e.isEncoding===t||!t(I)))throw new Error("Unknown encoding: "+I);return h||I}De.StringDecoder=a;function a(I){this.encoding=i(I);var h;switch(this.encoding){case"utf16le":this.text=d,this.end=p,h=4;break;case"utf8":this.fillLast=m,h=4;break;case"base64":this.text=v,this.end=w,h=3;break;default:this.write=E,this.end=O;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(h)}a.prototype.write=function(I){if(I.length===0)return"";var h,b;if(this.lastNeed){if(h=this.fillLast(I),h===void 0)return"";b=this.lastNeed,this.lastNeed=0}else b=0;return b<I.length?h?h+this.text(I,b):this.text(I,b):h||""},a.prototype.end=s,a.prototype.text=f,a.prototype.fillLast=function(I){if(this.lastNeed<=I.length)return I.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);I.copy(this.lastChar,this.lastTotal-this.lastNeed,0,I.length),this.lastNeed-=I.length};function u(I){return I<=127?0:I>>5===6?2:I>>4===14?3:I>>3===30?4:I>>6===2?-1:-2}function c(I,h,b){var T=h.length-1;if(T<b)return 0;var P=u(h[T]);return P>=0?(P>0&&(I.lastNeed=P-1),P):--T<b||P===-2?0:(P=u(h[T]),P>=0?(P>0&&(I.lastNeed=P-2),P):--T<b||P===-2?0:(P=u(h[T]),P>=0?(P>0&&(P===2?P=0:I.lastNeed=P-3),P):0))}function l(I,h,b){if((h[0]&192)!==128)return I.lastNeed=0,"�";if(I.lastNeed>1&&h.length>1){if((h[1]&192)!==128)return I.lastNeed=1,"�";if(I.lastNeed>2&&h.length>2&&(h[2]&192)!==128)return I.lastNeed=2,"�"}}function m(I){var h=this.lastTotal-this.lastNeed,b=l(this,I);if(b!==void 0)return b;if(this.lastNeed<=I.length)return I.copy(this.lastChar,h,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);I.copy(this.lastChar,h,0,I.length),this.lastNeed-=I.length}function f(I,h){var b=c(this,I,h);if(!this.lastNeed)return I.toString("utf8",h);this.lastTotal=b;var T=I.length-(b-this.lastNeed);return I.copy(this.lastChar,0,T),I.toString("utf8",h,T)}function s(I){var h=I&&I.length?this.write(I):"";return this.lastNeed?h+"�":h}function d(I,h){if((I.length-h)%2===0){var b=I.toString("utf16le",h);if(b){var T=b.charCodeAt(b.length-1);if(T>=55296&&T<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=I[I.length-2],this.lastChar[1]=I[I.length-1],b.slice(0,-1)}return b}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=I[I.length-1],I.toString("utf16le",h,I.length-1)}function p(I){var h=I&&I.length?this.write(I):"";if(this.lastNeed){var b=this.lastTotal-this.lastNeed;return h+this.lastChar.toString("utf16le",0,b)}return h}function v(I,h){var b=(I.length-h)%3;return b===0?I.toString("base64",h):(this.lastNeed=3-b,this.lastTotal=3,b===1?this.lastChar[0]=I[I.length-1]:(this.lastChar[0]=I[I.length-2],this.lastChar[1]=I[I.length-1]),I.toString("base64",h,I.length-b))}function w(I){var h=I&&I.length?this.write(I):"";return this.lastNeed?h+this.lastChar.toString("base64",0,3-this.lastNeed):h}function E(I){return I.toString(this.encoding)}function O(I){return I&&I.length?this.write(I):""}return De}var Ds=$s();const Bs=ti(Ds);var Ue={},Qn,Kn;function Ur(){return Kn||(Kn=1,Qn=typeof Qt=="object"&&Ue&&Ue.NODE_DEBUG&&/\bsemver\b/i.test(Ue.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}),Qn}var je,Jn;function jr(){if(Jn)return je;Jn=1;const e="2.0.0",t=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,i=16,a=t-6;return je={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:a,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},je}var Me={exports:{}},tr;function Us(){return tr||(tr=1,(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:a}=jr(),u=Ur();t=e.exports={};const c=t.re=[],l=t.safeRe=[],m=t.src=[],f=t.safeSrc=[],s=t.t={};let d=0;const p="[a-zA-Z0-9-]",v=[["\\s",1],["\\d",a],[p,i]],w=O=>{for(const[I,h]of v)O=O.split(`${I}*`).join(`${I}{0,${h}}`).split(`${I}+`).join(`${I}{1,${h}}`);return O},E=(O,I,h)=>{const b=w(I),T=d++;u(O,T,I),s[O]=T,m[T]=I,f[T]=b,c[T]=new RegExp(I,h?"g":void 0),l[T]=new RegExp(b,h?"g":void 0)};E("NUMERICIDENTIFIER","0|[1-9]\\d*"),E("NUMERICIDENTIFIERLOOSE","\\d+"),E("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),E("MAINVERSION",`(${m[s.NUMERICIDENTIFIER]})\\.(${m[s.NUMERICIDENTIFIER]})\\.(${m[s.NUMERICIDENTIFIER]})`),E("MAINVERSIONLOOSE",`(${m[s.NUMERICIDENTIFIERLOOSE]})\\.(${m[s.NUMERICIDENTIFIERLOOSE]})\\.(${m[s.NUMERICIDENTIFIERLOOSE]})`),E("PRERELEASEIDENTIFIER",`(?:${m[s.NONNUMERICIDENTIFIER]}|${m[s.NUMERICIDENTIFIER]})`),E("PRERELEASEIDENTIFIERLOOSE",`(?:${m[s.NONNUMERICIDENTIFIER]}|${m[s.NUMERICIDENTIFIERLOOSE]})`),E("PRERELEASE",`(?:-(${m[s.PRERELEASEIDENTIFIER]}(?:\\.${m[s.PRERELEASEIDENTIFIER]})*))`),E("PRERELEASELOOSE",`(?:-?(${m[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${m[s.PRERELEASEIDENTIFIERLOOSE]})*))`),E("BUILDIDENTIFIER",`${p}+`),E("BUILD",`(?:\\+(${m[s.BUILDIDENTIFIER]}(?:\\.${m[s.BUILDIDENTIFIER]})*))`),E("FULLPLAIN",`v?${m[s.MAINVERSION]}${m[s.PRERELEASE]}?${m[s.BUILD]}?`),E("FULL",`^${m[s.FULLPLAIN]}$`),E("LOOSEPLAIN",`[v=\\s]*${m[s.MAINVERSIONLOOSE]}${m[s.PRERELEASELOOSE]}?${m[s.BUILD]}?`),E("LOOSE",`^${m[s.LOOSEPLAIN]}$`),E("GTLT","((?:<|>)?=?)"),E("XRANGEIDENTIFIERLOOSE",`${m[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),E("XRANGEIDENTIFIER",`${m[s.NUMERICIDENTIFIER]}|x|X|\\*`),E("XRANGEPLAIN",`[v=\\s]*(${m[s.XRANGEIDENTIFIER]})(?:\\.(${m[s.XRANGEIDENTIFIER]})(?:\\.(${m[s.XRANGEIDENTIFIER]})(?:${m[s.PRERELEASE]})?${m[s.BUILD]}?)?)?`),E("XRANGEPLAINLOOSE",`[v=\\s]*(${m[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${m[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${m[s.XRANGEIDENTIFIERLOOSE]})(?:${m[s.PRERELEASELOOSE]})?${m[s.BUILD]}?)?)?`),E("XRANGE",`^${m[s.GTLT]}\\s*${m[s.XRANGEPLAIN]}$`),E("XRANGELOOSE",`^${m[s.GTLT]}\\s*${m[s.XRANGEPLAINLOOSE]}$`),E("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),E("COERCE",`${m[s.COERCEPLAIN]}(?:$|[^\\d])`),E("COERCEFULL",m[s.COERCEPLAIN]+`(?:${m[s.PRERELEASE]})?(?:${m[s.BUILD]})?(?:$|[^\\d])`),E("COERCERTL",m[s.COERCE],!0),E("COERCERTLFULL",m[s.COERCEFULL],!0),E("LONETILDE","(?:~>?)"),E("TILDETRIM",`(\\s*)${m[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",E("TILDE",`^${m[s.LONETILDE]}${m[s.XRANGEPLAIN]}$`),E("TILDELOOSE",`^${m[s.LONETILDE]}${m[s.XRANGEPLAINLOOSE]}$`),E("LONECARET","(?:\\^)"),E("CARETTRIM",`(\\s*)${m[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",E("CARET",`^${m[s.LONECARET]}${m[s.XRANGEPLAIN]}$`),E("CARETLOOSE",`^${m[s.LONECARET]}${m[s.XRANGEPLAINLOOSE]}$`),E("COMPARATORLOOSE",`^${m[s.GTLT]}\\s*(${m[s.LOOSEPLAIN]})$|^$`),E("COMPARATOR",`^${m[s.GTLT]}\\s*(${m[s.FULLPLAIN]})$|^$`),E("COMPARATORTRIM",`(\\s*)${m[s.GTLT]}\\s*(${m[s.LOOSEPLAIN]}|${m[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",E("HYPHENRANGE",`^\\s*(${m[s.XRANGEPLAIN]})\\s+-\\s+(${m[s.XRANGEPLAIN]})\\s*$`),E("HYPHENRANGELOOSE",`^\\s*(${m[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${m[s.XRANGEPLAINLOOSE]})\\s*$`),E("STAR","(<|>)?=?\\s*\\*"),E("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),E("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Me,Me.exports)),Me.exports}var ke,er;function js(){if(er)return ke;er=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return ke=n=>n?typeof n!="object"?e:n:t,ke}var Ge,nr;function Ms(){if(nr)return Ge;nr=1;const e=/^[0-9]+$/,t=(n,i)=>{if(typeof n=="number"&&typeof i=="number")return n===i?0:n<i?-1:1;const a=e.test(n),u=e.test(i);return a&&u&&(n=+n,i=+i),n===i?0:a&&!u?-1:u&&!a?1:n<i?-1:1};return Ge={compareIdentifiers:t,rcompareIdentifiers:(n,i)=>t(i,n)},Ge}var Fe,rr;function Mr(){if(rr)return Fe;rr=1;const e=Ur(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=jr(),{safeRe:i,t:a}=Us(),u=js(),{compareIdentifiers:c}=Ms();class l{constructor(f,s){if(s=u(s),f instanceof l){if(f.loose===!!s.loose&&f.includePrerelease===!!s.includePrerelease)return f;f=f.version}else if(typeof f!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof f}".`);if(f.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",f,s),this.options=s,this.loose=!!s.loose,this.includePrerelease=!!s.includePrerelease;const d=f.trim().match(s.loose?i[a.LOOSE]:i[a.FULL]);if(!d)throw new TypeError(`Invalid Version: ${f}`);if(this.raw=f,this.major=+d[1],this.minor=+d[2],this.patch=+d[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");d[4]?this.prerelease=d[4].split(".").map(p=>{if(/^[0-9]+$/.test(p)){const v=+p;if(v>=0&&v<n)return v}return p}):this.prerelease=[],this.build=d[5]?d[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(f){if(e("SemVer.compare",this.version,this.options,f),!(f instanceof l)){if(typeof f=="string"&&f===this.version)return 0;f=new l(f,this.options)}return f.version===this.version?0:this.compareMain(f)||this.comparePre(f)}compareMain(f){return f instanceof l||(f=new l(f,this.options)),this.major<f.major?-1:this.major>f.major?1:this.minor<f.minor?-1:this.minor>f.minor?1:this.patch<f.patch?-1:this.patch>f.patch?1:0}comparePre(f){if(f instanceof l||(f=new l(f,this.options)),this.prerelease.length&&!f.prerelease.length)return-1;if(!this.prerelease.length&&f.prerelease.length)return 1;if(!this.prerelease.length&&!f.prerelease.length)return 0;let s=0;do{const d=this.prerelease[s],p=f.prerelease[s];if(e("prerelease compare",s,d,p),d===void 0&&p===void 0)return 0;if(p===void 0)return 1;if(d===void 0)return-1;if(d!==p)return c(d,p)}while(++s)}compareBuild(f){f instanceof l||(f=new l(f,this.options));let s=0;do{const d=this.build[s],p=f.build[s];if(e("build compare",s,d,p),d===void 0&&p===void 0)return 0;if(p===void 0)return 1;if(d===void 0)return-1;if(d!==p)return c(d,p)}while(++s)}inc(f,s,d){if(f.startsWith("pre")){if(!s&&d===!1)throw new Error("invalid increment argument: identifier is empty");if(s){const p=`-${s}`.match(this.options.loose?i[a.PRERELEASELOOSE]:i[a.PRERELEASE]);if(!p||p[1]!==s)throw new Error(`invalid identifier: ${s}`)}}switch(f){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",s,d);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",s,d);break;case"prepatch":this.prerelease.length=0,this.inc("patch",s,d),this.inc("pre",s,d);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",s,d),this.inc("pre",s,d);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const p=Number(d)?1:0;if(this.prerelease.length===0)this.prerelease=[p];else{let v=this.prerelease.length;for(;--v>=0;)typeof this.prerelease[v]=="number"&&(this.prerelease[v]++,v=-2);if(v===-1){if(s===this.prerelease.join(".")&&d===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(p)}}if(s){let v=[s,p];d===!1&&(v=[s]),c(this.prerelease[0],s)===0?isNaN(this.prerelease[1])&&(this.prerelease=v):this.prerelease=v}break}default:throw new Error(`invalid increment argument: ${f}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Fe=l,Fe}var Ve,ir;function ks(){if(ir)return Ve;ir=1;const e=Mr();return Ve=(t,n)=>new e(t,n).major,Ve}ks();var Xe,sr;function Gs(){if(sr)return Xe;sr=1;const e=Mr();return Xe=(t,n,i=!1)=>{if(t instanceof e)return t;try{return new e(t,n)}catch(a){if(!i)return null;throw a}},Xe}var ze,or;function Fs(){if(or)return ze;or=1;const e=Gs();return ze=(t,n)=>{const i=e(t,n);return i?i.version:null},ze}Fs();class ao{_header;constructor(t){this.validateHeader(t),this._header=t}get id(){return this._header.id}get order(){return this._header.order}get enabled(){return this._header.enabled}get render(){return this._header.render}get updated(){return this._header.updated}validateHeader(t){if(!t.id||!t.render||!t.updated)throw new Error("Invalid header: id, render and updated are required");if(typeof t.id!="string")throw new Error("Invalid id property");if(t.enabled!==void 0&&typeof t.enabled!="function")throw new Error("Invalid enabled property");if(t.render&&typeof t.render!="function")throw new Error("Invalid render property");if(t.updated&&typeof t.updated!="function")throw new Error("Invalid updated property")}}const uo=function(e){if(typeof window._nc_filelistheader>"u"&&(window._nc_filelistheader=[],jt.debug("FileListHeaders initialized")),window._nc_filelistheader.find(t=>t.id===e.id)){jt.error(`Header ${e.id} already registered`,{header:e});return}window._nc_filelistheader.push(e)};var ar={},ur;function Vs(){return ur||(ur=1,(function(e){(function(t){t.parser=function(N,y){return new i(N,y)},t.SAXParser=i,t.SAXStream=s,t.createStream=f,t.MAX_BUFFER_LENGTH=64*1024;var n=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function i(N,y){if(!(this instanceof i))return new i(N,y);var j=this;u(j),j.q=j.c="",j.bufferCheckPosition=t.MAX_BUFFER_LENGTH,j.opt=y||{},j.opt.lowercase=j.opt.lowercase||j.opt.lowercasetags,j.looseCase=j.opt.lowercase?"toLowerCase":"toUpperCase",j.tags=[],j.closed=j.closedRoot=j.sawRoot=!1,j.tag=j.error=null,j.strict=!!N,j.noscript=!!(N||j.opt.noscript),j.state=A.BEGIN,j.strictEntities=j.opt.strictEntities,j.ENTITIES=j.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),j.attribList=[],j.opt.xmlns&&(j.ns=Object.create(E)),j.opt.unquotedAttributeValues===void 0&&(j.opt.unquotedAttributeValues=!N),j.trackPosition=j.opt.position!==!1,j.trackPosition&&(j.position=j.line=j.column=0),M(j,"onready")}Object.create||(Object.create=function(N){function y(){}y.prototype=N;var j=new y;return j}),Object.keys||(Object.keys=function(N){var y=[];for(var j in N)N.hasOwnProperty(j)&&y.push(j);return y});function a(N){for(var y=Math.max(t.MAX_BUFFER_LENGTH,10),j=0,_=0,z=n.length;_<z;_++){var nt=N[n[_]].length;if(nt>y)switch(n[_]){case"textNode":D(N);break;case"cdata":C(N,"oncdata",N.cdata),N.cdata="";break;case"script":C(N,"onscript",N.script),N.script="";break;default:G(N,"Max buffer length exceeded: "+n[_])}j=Math.max(j,nt)}var rt=t.MAX_BUFFER_LENGTH-j;N.bufferCheckPosition=rt+N.position}function u(N){for(var y=0,j=n.length;y<j;y++)N[n[y]]=""}function c(N){D(N),N.cdata!==""&&(C(N,"oncdata",N.cdata),N.cdata=""),N.script!==""&&(C(N,"onscript",N.script),N.script="")}i.prototype={end:function(){X(this)},write:Tt,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){c(this)}};var l;try{l=require("stream").Stream}catch{l=function(){}}l||(l=function(){});var m=t.EVENTS.filter(function(N){return N!=="error"&&N!=="end"});function f(N,y){return new s(N,y)}function s(N,y){if(!(this instanceof s))return new s(N,y);l.apply(this),this._parser=new i(N,y),this.writable=!0,this.readable=!0;var j=this;this._parser.onend=function(){j.emit("end")},this._parser.onerror=function(_){j.emit("error",_),j._parser.error=null},this._decoder=null,m.forEach(function(_){Object.defineProperty(j,"on"+_,{get:function(){return j._parser["on"+_]},set:function(z){if(!z)return j.removeAllListeners(_),j._parser["on"+_]=z,z;j.on(_,z)},enumerable:!0,configurable:!1})})}s.prototype=Object.create(l.prototype,{constructor:{value:s}}),s.prototype.write=function(N){if(typeof Ie=="function"&&typeof Ie.isBuffer=="function"&&Ie.isBuffer(N)){if(!this._decoder){var y=Bs.StringDecoder;this._decoder=new y("utf8")}N=this._decoder.write(N)}return this._parser.write(N.toString()),this.emit("data",N),!0},s.prototype.end=function(N){return N&&N.length&&this.write(N),this._parser.end(),!0},s.prototype.on=function(N,y){var j=this;return!j._parser["on"+N]&&m.indexOf(N)!==-1&&(j._parser["on"+N]=function(){var _=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);_.splice(0,0,N),j.emit.apply(j,_)}),l.prototype.on.call(j,N,y)};var d="[CDATA[",p="DOCTYPE",v="http://www.w3.org/XML/1998/namespace",w="http://www.w3.org/2000/xmlns/",E={xml:v,xmlns:w},O=/[:_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]/,I=/[:_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-]/,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]/,b=/[#:_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 T(N){return N===" "||N===` `||N==="\r"||N===" "}function P(N){return N==='"'||N==="'"}function R(N){return N===">"||T(N)}function L(N,y){return N.test(y)}function S(N,y){return!L(N,y)}var A=0;t.STATE={BEGIN:A++,BEGIN_WHITESPACE:A++,TEXT:A++,TEXT_ENTITY:A++,OPEN_WAKA:A++,SGML_DECL:A++,SGML_DECL_QUOTED:A++,DOCTYPE:A++,DOCTYPE_QUOTED:A++,DOCTYPE_DTD:A++,DOCTYPE_DTD_QUOTED:A++,COMMENT_STARTING:A++,COMMENT:A++,COMMENT_ENDING:A++,COMMENT_ENDED:A++,CDATA:A++,CDATA_ENDING:A++,CDATA_ENDING_2:A++,PROC_INST:A++,PROC_INST_BODY:A++,PROC_INST_ENDING:A++,OPEN_TAG:A++,OPEN_TAG_SLASH:A++,ATTRIB:A++,ATTRIB_NAME:A++,ATTRIB_NAME_SAW_WHITE:A++,ATTRIB_VALUE:A++,ATTRIB_VALUE_QUOTED:A++,ATTRIB_VALUE_CLOSED:A++,ATTRIB_VALUE_UNQUOTED:A++,ATTRIB_VALUE_ENTITY_Q:A++,ATTRIB_VALUE_ENTITY_U:A++,CLOSE_TAG:A++,CLOSE_TAG_SAW_WHITE:A++,SCRIPT:A++,SCRIPT_ENDING:A++},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(N){var y=t.ENTITIES[N],j=typeof y=="number"?String.fromCharCode(y):y;t.ENTITIES[N]=j});for(var U in t.STATE)t.STATE[t.STATE[U]]=U;A=t.STATE;function M(N,y,j){N[y]&&N[y](j)}function C(N,y,j){N.textNode&&D(N),M(N,y,j)}function D(N){N.textNode=F(N.opt,N.textNode),N.textNode&&M(N,"ontext",N.textNode),N.textNode=""}function F(N,y){return N.trim&&(y=y.trim()),N.normalize&&(y=y.replace(/\s+/g," ")),y}function G(N,y){return D(N),N.trackPosition&&(y+=` Line: `+N.line+` Column: `+N.column+` Char: `+N.c),y=new Error(y),N.error=y,M(N,"onerror",y),N}function X(N){return N.sawRoot&&!N.closedRoot&&V(N,"Unclosed root tag"),N.state!==A.BEGIN&&N.state!==A.BEGIN_WHITESPACE&&N.state!==A.TEXT&&G(N,"Unexpected end"),D(N),N.c="",N.closed=!0,M(N,"onend"),i.call(N,N.strict,N.opt),N}function V(N,y){if(typeof N!="object"||!(N instanceof i))throw new Error("bad call to strictFail");N.strict&&G(N,y)}function Z(N){N.strict||(N.tagName=N.tagName[N.looseCase]());var y=N.tags[N.tags.length-1]||N,j=N.tag={name:N.tagName,attributes:{}};N.opt.xmlns&&(j.ns=y.ns),N.attribList.length=0,C(N,"onopentagstart",j)}function W(N,y){var j=N.indexOf(":"),_=j<0?["",N]:N.split(":"),z=_[0],nt=_[1];return y&&N==="xmlns"&&(z="xmlns",nt=""),{prefix:z,local:nt}}function ot(N){if(N.strict||(N.attribName=N.attribName[N.looseCase]()),N.attribList.indexOf(N.attribName)!==-1||N.tag.attributes.hasOwnProperty(N.attribName)){N.attribName=N.attribValue="";return}if(N.opt.xmlns){var y=W(N.attribName,!0),j=y.prefix,_=y.local;if(j==="xmlns")if(_==="xml"&&N.attribValue!==v)V(N,"xml: prefix must be bound to "+v+` Actual: `+N.attribValue);else if(_==="xmlns"&&N.attribValue!==w)V(N,"xmlns: prefix must be bound to "+w+` Actual: `+N.attribValue);else{var z=N.tag,nt=N.tags[N.tags.length-1]||N;z.ns===nt.ns&&(z.ns=Object.create(nt.ns)),z.ns[_]=N.attribValue}N.attribList.push([N.attribName,N.attribValue])}else N.tag.attributes[N.attribName]=N.attribValue,C(N,"onattribute",{name:N.attribName,value:N.attribValue});N.attribName=N.attribValue=""}function q(N,y){if(N.opt.xmlns){var j=N.tag,_=W(N.tagName);j.prefix=_.prefix,j.local=_.local,j.uri=j.ns[_.prefix]||"",j.prefix&&!j.uri&&(V(N,"Unbound namespace prefix: "+JSON.stringify(N.tagName)),j.uri=_.prefix);var z=N.tags[N.tags.length-1]||N;j.ns&&z.ns!==j.ns&&Object.keys(j.ns).forEach(function(it){C(N,"onopennamespace",{prefix:it,uri:j.ns[it]})});for(var nt=0,rt=N.attribList.length;nt<rt;nt++){var gt=N.attribList[nt],ht=gt[0],xt=gt[1],at=W(ht,!0),Rt=at.prefix,we=at.local,ee=Rt===""?"":j.ns[Rt]||"",zt={name:ht,value:xt,prefix:Rt,local:we,uri:ee};Rt&&Rt!=="xmlns"&&!ee&&(V(N,"Unbound namespace prefix: "+JSON.stringify(Rt)),zt.uri=Rt),N.tag.attributes[ht]=zt,C(N,"onattribute",zt)}N.attribList.length=0}N.tag.isSelfClosing=!!y,N.sawRoot=!0,N.tags.push(N.tag),C(N,"onopentag",N.tag),y||(!N.noscript&&N.tagName.toLowerCase()==="script"?N.state=A.SCRIPT:N.state=A.TEXT,N.tag=null,N.tagName=""),N.attribName=N.attribValue="",N.attribList.length=0}function Q(N){if(!N.tagName){V(N,"Weird empty close tag."),N.textNode+="</>",N.state=A.TEXT;return}if(N.script){if(N.tagName!=="script"){N.script+="</"+N.tagName+">",N.tagName="",N.state=A.SCRIPT;return}C(N,"onscript",N.script),N.script=""}var y=N.tags.length,j=N.tagName;N.strict||(j=j[N.looseCase]());for(var _=j;y--;){var z=N.tags[y];if(z.name!==_)V(N,"Unexpected close tag");else break}if(y<0){V(N,"Unmatched closing tag: "+N.tagName),N.textNode+="</"+N.tagName+">",N.state=A.TEXT;return}N.tagName=j;for(var nt=N.tags.length;nt-- >y;){var rt=N.tag=N.tags.pop();N.tagName=N.tag.name,C(N,"onclosetag",N.tagName);var gt={};for(var ht in rt.ns)gt[ht]=rt.ns[ht];var xt=N.tags[N.tags.length-1]||N;N.opt.xmlns&&rt.ns!==xt.ns&&Object.keys(rt.ns).forEach(function(at){var Rt=rt.ns[at];C(N,"onclosenamespace",{prefix:at,uri:Rt})})}y===0&&(N.closedRoot=!0),N.tagName=N.attribValue=N.attribName="",N.attribList.length=0,N.state=A.TEXT}function kt(N){var y=N.entity,j=y.toLowerCase(),_,z="";return N.ENTITIES[y]?N.ENTITIES[y]:N.ENTITIES[j]?N.ENTITIES[j]:(y=j,y.charAt(0)==="#"&&(y.charAt(1)==="x"?(y=y.slice(2),_=parseInt(y,16),z=_.toString(16)):(y=y.slice(1),_=parseInt(y,10),z=_.toString(10))),y=y.replace(/^0+/,""),isNaN(_)||z.toLowerCase()!==y?(V(N,"Invalid character entity"),"&"+N.entity+";"):String.fromCodePoint(_))}function $t(N,y){y==="<"?(N.state=A.OPEN_WAKA,N.startTagPosition=N.position):T(y)||(V(N,"Non-whitespace before first tag."),N.textNode=y,N.state=A.TEXT)}function Nt(N,y){var j="";return y<N.length&&(j=N.charAt(y)),j}function Tt(N){var y=this;if(this.error)throw this.error;if(y.closed)return G(y,"Cannot write after close. Assign an onready handler.");if(N===null)return X(y);typeof N=="object"&&(N=N.toString());for(var j=0,_="";_=Nt(N,j++),y.c=_,!!_;)switch(y.trackPosition&&(y.position++,_===` `?(y.line++,y.column=0):y.column++),y.state){case A.BEGIN:if(y.state=A.BEGIN_WHITESPACE,_==="\uFEFF")continue;$t(y,_);continue;case A.BEGIN_WHITESPACE:$t(y,_);continue;case A.TEXT:if(y.sawRoot&&!y.closedRoot){for(var z=j-1;_&&_!=="<"&&_!=="&";)_=Nt(N,j++),_&&y.trackPosition&&(y.position++,_===` `?(y.line++,y.column=0):y.column++);y.textNode+=N.substring(z,j-1)}_==="<"&&!(y.sawRoot&&y.closedRoot&&!y.strict)?(y.state=A.OPEN_WAKA,y.startTagPosition=y.position):(!T(_)&&(!y.sawRoot||y.closedRoot)&&V(y,"Text data outside of root node."),_==="&"?y.state=A.TEXT_ENTITY:y.textNode+=_);continue;case A.SCRIPT:_==="<"?y.state=A.SCRIPT_ENDING:y.script+=_;continue;case A.SCRIPT_ENDING:_==="/"?y.state=A.CLOSE_TAG:(y.script+="<"+_,y.state=A.SCRIPT);continue;case A.OPEN_WAKA:if(_==="!")y.state=A.SGML_DECL,y.sgmlDecl="";else if(!T(_))if(L(O,_))y.state=A.OPEN_TAG,y.tagName=_;else if(_==="/")y.state=A.CLOSE_TAG,y.tagName="";else if(_==="?")y.state=A.PROC_INST,y.procInstName=y.procInstBody="";else{if(V(y,"Unencoded <"),y.startTagPosition+1<y.position){var nt=y.position-y.startTagPosition;_=new Array(nt).join(" ")+_}y.textNode+="<"+_,y.state=A.TEXT}continue;case A.SGML_DECL:if(y.sgmlDecl+_==="--"){y.state=A.COMMENT,y.comment="",y.sgmlDecl="";continue}y.doctype&&y.doctype!==!0&&y.sgmlDecl?(y.state=A.DOCTYPE_DTD,y.doctype+="<!"+y.sgmlDecl+_,y.sgmlDecl=""):(y.sgmlDecl+_).toUpperCase()===d?(C(y,"onopencdata"),y.state=A.CDATA,y.sgmlDecl="",y.cdata=""):(y.sgmlDecl+_).toUpperCase()===p?(y.state=A.DOCTYPE,(y.doctype||y.sawRoot)&&V(y,"Inappropriately located doctype declaration"),y.doctype="",y.sgmlDecl=""):_===">"?(C(y,"onsgmldeclaration",y.sgmlDecl),y.sgmlDecl="",y.state=A.TEXT):(P(_)&&(y.state=A.SGML_DECL_QUOTED),y.sgmlDecl+=_);continue;case A.SGML_DECL_QUOTED:_===y.q&&(y.state=A.SGML_DECL,y.q=""),y.sgmlDecl+=_;continue;case A.DOCTYPE:_===">"?(y.state=A.TEXT,C(y,"ondoctype",y.doctype),y.doctype=!0):(y.doctype+=_,_==="["?y.state=A.DOCTYPE_DTD:P(_)&&(y.state=A.DOCTYPE_QUOTED,y.q=_));continue;case A.DOCTYPE_QUOTED:y.doctype+=_,_===y.q&&(y.q="",y.state=A.DOCTYPE);continue;case A.DOCTYPE_DTD:_==="]"?(y.doctype+=_,y.state=A.DOCTYPE):_==="<"?(y.state=A.OPEN_WAKA,y.startTagPosition=y.position):P(_)?(y.doctype+=_,y.state=A.DOCTYPE_DTD_QUOTED,y.q=_):y.doctype+=_;continue;case A.DOCTYPE_DTD_QUOTED:y.doctype+=_,_===y.q&&(y.state=A.DOCTYPE_DTD,y.q="");continue;case A.COMMENT:_==="-"?y.state=A.COMMENT_ENDING:y.comment+=_;continue;case A.COMMENT_ENDING:_==="-"?(y.state=A.COMMENT_ENDED,y.comment=F(y.opt,y.comment),y.comment&&C(y,"oncomment",y.comment),y.comment=""):(y.comment+="-"+_,y.state=A.COMMENT);continue;case A.COMMENT_ENDED:_!==">"?(V(y,"Malformed comment"),y.comment+="--"+_,y.state=A.COMMENT):y.doctype&&y.doctype!==!0?y.state=A.DOCTYPE_DTD:y.state=A.TEXT;continue;case A.CDATA:_==="]"?y.state=A.CDATA_ENDING:y.cdata+=_;continue;case A.CDATA_ENDING:_==="]"?y.state=A.CDATA_ENDING_2:(y.cdata+="]"+_,y.state=A.CDATA);continue;case A.CDATA_ENDING_2:_===">"?(y.cdata&&C(y,"oncdata",y.cdata),C(y,"onclosecdata"),y.cdata="",y.state=A.TEXT):_==="]"?y.cdata+="]":(y.cdata+="]]"+_,y.state=A.CDATA);continue;case A.PROC_INST:_==="?"?y.state=A.PROC_INST_ENDING:T(_)?y.state=A.PROC_INST_BODY:y.procInstName+=_;continue;case A.PROC_INST_BODY:if(!y.procInstBody&&T(_))continue;_==="?"?y.state=A.PROC_INST_ENDING:y.procInstBody+=_;continue;case A.PROC_INST_ENDING:_===">"?(C(y,"onprocessinginstruction",{name:y.procInstName,body:y.procInstBody}),y.procInstName=y.procInstBody="",y.state=A.TEXT):(y.procInstBody+="?"+_,y.state=A.PROC_INST_BODY);continue;case A.OPEN_TAG:L(I,_)?y.tagName+=_:(Z(y),_===">"?q(y):_==="/"?y.state=A.OPEN_TAG_SLASH:(T(_)||V(y,"Invalid character in tag name"),y.state=A.ATTRIB));continue;case A.OPEN_TAG_SLASH:_===">"?(q(y,!0),Q(y)):(V(y,"Forward-slash in opening tag not followed by >"),y.state=A.ATTRIB);continue;case A.ATTRIB:if(T(_))continue;_===">"?q(y):_==="/"?y.state=A.OPEN_TAG_SLASH:L(O,_)?(y.attribName=_,y.attribValue="",y.state=A.ATTRIB_NAME):V(y,"Invalid attribute name");continue;case A.ATTRIB_NAME:_==="="?y.state=A.ATTRIB_VALUE:_===">"?(V(y,"Attribute without value"),y.attribValue=y.attribName,ot(y),q(y)):T(_)?y.state=A.ATTRIB_NAME_SAW_WHITE:L(I,_)?y.attribName+=_:V(y,"Invalid attribute name");continue;case A.ATTRIB_NAME_SAW_WHITE:if(_==="=")y.state=A.ATTRIB_VALUE;else{if(T(_))continue;V(y,"Attribute without value"),y.tag.attributes[y.attribName]="",y.attribValue="",C(y,"onattribute",{name:y.attribName,value:""}),y.attribName="",_===">"?q(y):L(O,_)?(y.attribName=_,y.state=A.ATTRIB_NAME):(V(y,"Invalid attribute name"),y.state=A.ATTRIB)}continue;case A.ATTRIB_VALUE:if(T(_))continue;P(_)?(y.q=_,y.state=A.ATTRIB_VALUE_QUOTED):(y.opt.unquotedAttributeValues||G(y,"Unquoted attribute value"),y.state=A.ATTRIB_VALUE_UNQUOTED,y.attribValue=_);continue;case A.ATTRIB_VALUE_QUOTED:if(_!==y.q){_==="&"?y.state=A.ATTRIB_VALUE_ENTITY_Q:y.attribValue+=_;continue}ot(y),y.q="",y.state=A.ATTRIB_VALUE_CLOSED;continue;case A.ATTRIB_VALUE_CLOSED:T(_)?y.state=A.ATTRIB:_===">"?q(y):_==="/"?y.state=A.OPEN_TAG_SLASH:L(O,_)?(V(y,"No whitespace between attributes"),y.attribName=_,y.attribValue="",y.state=A.ATTRIB_NAME):V(y,"Invalid attribute name");continue;case A.ATTRIB_VALUE_UNQUOTED:if(!R(_)){_==="&"?y.state=A.ATTRIB_VALUE_ENTITY_U:y.attribValue+=_;continue}ot(y),_===">"?q(y):y.state=A.ATTRIB;continue;case A.CLOSE_TAG:if(y.tagName)_===">"?Q(y):L(I,_)?y.tagName+=_:y.script?(y.script+="</"+y.tagName,y.tagName="",y.state=A.SCRIPT):(T(_)||V(y,"Invalid tagname in closing tag"),y.state=A.CLOSE_TAG_SAW_WHITE);else{if(T(_))continue;S(O,_)?y.script?(y.script+="</"+_,y.state=A.SCRIPT):V(y,"Invalid tagname in closing tag."):y.tagName=_}continue;case A.CLOSE_TAG_SAW_WHITE:if(T(_))continue;_===">"?Q(y):V(y,"Invalid characters in closing tag");continue;case A.TEXT_ENTITY:case A.ATTRIB_VALUE_ENTITY_Q:case A.ATTRIB_VALUE_ENTITY_U:var rt,gt;switch(y.state){case A.TEXT_ENTITY:rt=A.TEXT,gt="textNode";break;case A.ATTRIB_VALUE_ENTITY_Q:rt=A.ATTRIB_VALUE_QUOTED,gt="attribValue";break;case A.ATTRIB_VALUE_ENTITY_U:rt=A.ATTRIB_VALUE_UNQUOTED,gt="attribValue";break}if(_===";"){var ht=kt(y);y.opt.unparsedEntities&&!Object.values(t.XML_ENTITIES).includes(ht)?(y.entity="",y.state=rt,y.write(ht)):(y[gt]+=ht,y.entity="",y.state=rt)}else L(y.entity.length?b:h,_)?y.entity+=_:(V(y,"Invalid character in entity name"),y[gt]+="&"+y.entity+_,y.entity="",y.state=rt);continue;default:throw new Error(y,"Unknown state: "+y.state)}return y.position>=y.bufferCheckPosition&&a(y),y}String.fromCodePoint||(function(){var N=String.fromCharCode,y=Math.floor,j=function(){var _=16384,z=[],nt,rt,gt=-1,ht=arguments.length;if(!ht)return"";for(var xt="";++gt<ht;){var at=Number(arguments[gt]);if(!isFinite(at)||at<0||at>1114111||y(at)!==at)throw RangeError("Invalid code point: "+at);at<=65535?z.push(at):(at-=65536,nt=(at>>10)+55296,rt=at%1024+56320,z.push(nt,rt)),(gt+1===ht||z.length>_)&&(xt+=N.apply(null,z),z.length=0)}return xt};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:j,configurable:!0,writable:!0}):String.fromCodePoint=j})()})(e)})(ar)),ar}Vs();var Xs=(e=>(e[e.UploadFromDevice=0]="UploadFromDevice",e[e.CreateNew=1]="CreateNew",e[e.Other=2]="Other",e))(Xs||{});class zs{_entries=[];registerEntry(t){this.validateEntry(t),t.category=t.category??1,this._entries.push(t)}unregisterEntry(t){const n=typeof t=="string"?this.getEntryIndex(t):this.getEntryIndex(t.id);if(n===-1){jt.warn("Entry not found, nothing removed",{entry:t,entries:this.getEntries()});return}this._entries.splice(n,1)}getEntries(t){return t?this._entries.filter(n=>typeof n.enabled=="function"?n.enabled(t):!0):this._entries}getEntryIndex(t){return this._entries.findIndex(n=>n.id===t)}validateEntry(t){if(!t.id||!t.displayName||!(t.iconSvgInline||t.iconClass)||!t.handler)throw new Error("Invalid entry");if(typeof t.id!="string"||typeof t.displayName!="string")throw new Error("Invalid id or displayName property");if(t.iconClass&&typeof t.iconClass!="string"||t.iconSvgInline&&typeof t.iconSvgInline!="string")throw new Error("Invalid icon provided");if(t.enabled!==void 0&&typeof t.enabled!="function")throw new Error("Invalid enabled property");if(typeof t.handler!="function")throw new Error("Invalid handler property");if("order"in t&&typeof t.order!="number")throw new Error("Invalid order property");if(this.getEntryIndex(t.id)!==-1)throw new Error("Duplicate entry")}}function qs(){return typeof window._nc_newfilemenu>"u"&&(window._nc_newfilemenu=new zs,jt.debug("NewFileMenu initialized")),window._nc_newfilemenu}function co(e){return qs().registerEntry(e)}var Ws=(e=>(e.ReservedName="reserved name",e.Character="character",e.Extension="extension",e))(Ws||{});class ue extends Error{constructor(t){super(`Invalid ${t.reason} '${t.segment}' in filename '${t.filename}'`,{cause:t})}get filename(){return this.cause.filename}get reason(){return this.cause.reason}get segment(){return this.cause.segment}}function lo(e){const t=Qr().files,n=t.forbidden_filename_characters??window._oc_config?.forbidden_filenames_characters??["/","\\"];for(const c of n)if(e.includes(c))throw new ue({segment:c,reason:"character",filename:e});if(e=e.toLocaleLowerCase(),(t.forbidden_filenames??[".htaccess"]).includes(e))throw new ue({filename:e,segment:e,reason:"reserved name"});const i=e.indexOf(".",1),a=e.substring(0,i===-1?void 0:i);if((t.forbidden_filename_basenames??[]).includes(a))throw new ue({filename:e,segment:a,reason:"reserved name"});const u=t.forbidden_filename_extensions??[".part",".filepart"];for(const c of u)if(e.length>c.length&&e.endsWith(c))throw new ue({segment:c,reason:"extension",filename:e})}const qe=["B","KB","MB","GB","TB","PB"],We=["B","KiB","MiB","GiB","TiB","PiB"];function ho(e,t=!1,n=!1,i=!1){n=n&&!i,typeof e=="string"&&(e=Number(e));let a=e>0?Math.floor(Math.log(e)/Math.log(i?1e3:1024)):0;a=Math.min((n?We.length:qe.length)-1,a);const u=n?We[a]:qe[a];let c=(e/Math.pow(i?1e3:1024,a)).toFixed(1);return t===!0&&a===0?(c!=="0.0"?"< 1 ":"0 ")+(n?We[1]:qe[1]):(a<2?c=parseFloat(c).toFixed(0):c=parseFloat(c).toLocaleString(lr()),c+" "+u)}function cr(e){return e instanceof Date?e.toISOString():String(e)}function Ys(e,t,n){t=t??[u=>u],n=n??[];const i=t.map((u,c)=>(n[c]??"asc")==="asc"?1:-1),a=Intl.Collator([Hr(),lr()],{numeric:!0,usage:"sort"});return[...e].sort((u,c)=>{for(const[l,m]of t.entries()){const f=a.compare(cr(m(u)),cr(m(c)));if(f!==0)return f*i[l]}return 0})}function fo(e,t={}){const n={sortingMode:"basename",sortingOrder:"asc",...t};function i(c){const l=c.displayname||c.attributes?.displayname||c.basename||"";return c.type===be.Folder?l:l.lastIndexOf(".")>0?l.slice(0,l.lastIndexOf(".")):l}const a=[...n.sortFavoritesFirst?[c=>c.attributes?.favorite!==1]:[],...n.sortFoldersFirst?[c=>c.type!=="folder"]:[],...n.sortingMode!=="basename"?[c=>c[n.sortingMode]??c.attributes[n.sortingMode]]:[],c=>i(c),c=>c.basename],u=[...n.sortFavoritesFirst?["asc"]:[],...n.sortFoldersFirst?["asc"]:[],...n.sortingMode==="mtime"?[n.sortingOrder==="asc"?"desc":"asc"]:[],...n.sortingMode!=="mtime"&&n.sortingMode!=="basename"?[n.sortingOrder]:[],n.sortingOrder,n.sortingOrder];return Ys(e,a,u)}export{Pt as C,fn as F,ao as H,ue as I,Xs as N,Ct as P,co as a,uo as b,Ss as c,oo as d,Dr as e,Ws as f,so as g,be as h,io as i,Ps as j,ro as k,ho as l,no as r,fo as s,lo as v}; //# sourceMappingURL=index-kwZOOyqh.chunk.mjs.map
Save File
Cancel