@griddo/cx 10.4.2 → 10.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -1,57 +1,53 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var _h=Object.create;var Is=Object.defineProperty;var wh=Object.getOwnPropertyDescriptor;var xh=Object.getOwnPropertyNames;var Sh=Object.getPrototypeOf,Eh=Object.prototype.hasOwnProperty;var y=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ph=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of xh(e))!Eh.call(t,i)&&i!==r&&Is(t,i,{get:()=>e[i],enumerable:!(n=wh(e,i))||n.enumerable});return t};var N=(t,e,r)=>(r=t!=null?_h(Sh(t)):{},Ph(e||!t||!t.__esModule?Is(r,"default",{value:t,enumerable:!0}):r,t));var We=y((Y1,Qn)=>{var Ch=require("fs"),Dh=require("path");function Rs(t){console.log(`[dotenv][DEBUG] ${t}`)}var Oh=`
3
- `,Ah=/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/,Ih=/\\n/g,Rh=/\n|\r|\r\n/;function Fs(t,e){let r=!!(e&&e.debug),n={};return t.toString().split(Rh).forEach(function(i,o){let s=i.match(Ah);if(s!=null){let a=s[1],c=s[2]||"",f=c.length-1,u=c[0]==='"'&&c[f]==='"';c[0]==="'"&&c[f]==="'"||u?(c=c.substring(1,f),u&&(c=c.replace(Ih,Oh))):c=c.trim(),n[a]=c}else r&&Rs(`did not match key and value when parsing line ${o+1}: ${i}`)}),n}function Fh(t){let e=Dh.resolve(process.cwd(),".env"),r="utf8",n=!1;t&&(t.path!=null&&(e=t.path),t.encoding!=null&&(r=t.encoding),t.debug!=null&&(n=!0));try{let i=Fs(Ch.readFileSync(e,{encoding:r}),{debug:n});return Object.keys(i).forEach(function(o){Object.prototype.hasOwnProperty.call(process.env,o)?n&&Rs(`"${o}" is already defined in \`process.env\` and will not be overwritten`):process.env[o]=i[o]}),{parsed:i}}catch(i){return{error:i}}}Qn.exports.config=Fh;Qn.exports.parse=Fs});var Ms=y((Q1,ks)=>{var Zn=class{constructor(e){this.value=e,this.next=void 0}},ei=class{constructor(){this.clear()}enqueue(e){let r=new Zn(e);this._head?(this._tail.next=r,this._tail=r):(this._head=r,this._tail=r),this._size++}dequeue(){let e=this._head;if(e)return this._head=this._head.next,this._size--,e.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let e=this._head;for(;e;)yield e.value,e=e.next}};ks.exports=ei});var ti=y((Z1,Ts)=>{"use strict";var kh=Ms(),Mh=t=>{if(!((Number.isInteger(t)||t===1/0)&&t>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=new kh,r=0,n=()=>{r--,e.size>0&&e.dequeue()()},i=async(a,c,...f)=>{r++;let u=(async()=>a(...f))();c(u);try{await u}catch{}n()},o=(a,c,...f)=>{e.enqueue(i.bind(null,a,c,...f)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},s=(a,...c)=>new Promise(f=>{o(a,f,...c)});return Object.defineProperties(s,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),s};Ts.exports=Mh});var js=y((eb,Ns)=>{"use strict";var qs=ti(),Ir=class extends Error{constructor(e){super(),this.value=e}},Th=async(t,e)=>e(await t),qh=async t=>{let e=await Promise.all(t);if(e[1]===!0)throw new Ir(e[0]);return!1},Nh=async(t,e,r)=>{r={concurrency:1/0,preserveOrder:!0,...r};let n=qs(r.concurrency),i=[...t].map(s=>[s,n(Th,s,e)]),o=qs(r.preserveOrder?1:1/0);try{await Promise.all(i.map(s=>o(qh,s)))}catch(s){if(s instanceof Ir)return s.value;throw s}};Ns.exports=Nh});var Xs=y((tb,ri)=>{"use strict";var $s=require("path"),Rr=require("fs"),{promisify:Ls}=require("util"),jh=js(),$h=Ls(Rr.stat),Lh=Ls(Rr.lstat),Bs={directory:"isDirectory",file:"isFile"};function Us({type:t}){if(!(t in Bs))throw new Error(`Invalid type specified: ${t}`)}var Gs=(t,e)=>t===void 0||e[Bs[t]]();ri.exports=async(t,e)=>{e={cwd:process.cwd(),type:"file",allowSymlinks:!0,...e},Us(e);let r=e.allowSymlinks?$h:Lh;return jh(t,async n=>{try{let i=await r($s.resolve(e.cwd,n));return Gs(e.type,i)}catch{return!1}},e)};ri.exports.sync=(t,e)=>{e={cwd:process.cwd(),allowSymlinks:!0,type:"file",...e},Us(e);let r=e.allowSymlinks?Rr.statSync:Rr.lstatSync;for(let n of t)try{let i=r($s.resolve(e.cwd,n));if(Gs(e.type,i))return n}catch{}}});var Ws=y((rb,ni)=>{"use strict";var Hs=require("fs"),{promisify:Bh}=require("util"),Uh=Bh(Hs.access);ni.exports=async t=>{try{return await Uh(t),!0}catch{return!1}};ni.exports.sync=t=>{try{return Hs.accessSync(t),!0}catch{return!1}}});var Js=y((nb,St)=>{"use strict";var Ke=require("path"),Fr=Xs(),zs=Ws(),ii=Symbol("findUp.stop");St.exports=async(t,e={})=>{let r=Ke.resolve(e.cwd||""),{root:n}=Ke.parse(r),i=[].concat(t),o=async s=>{if(typeof t!="function")return Fr(i,s);let a=await t(s.cwd);return typeof a=="string"?Fr([a],s):a};for(;;){let s=await o({...e,cwd:r});if(s===ii)return;if(s)return Ke.resolve(r,s);if(r===n)return;r=Ke.dirname(r)}};St.exports.sync=(t,e={})=>{let r=Ke.resolve(e.cwd||""),{root:n}=Ke.parse(r),i=[].concat(t),o=s=>{if(typeof t!="function")return Fr.sync(i,s);let a=t(s.cwd);return typeof a=="string"?Fr.sync([a],s):a};for(;;){let s=o({...e,cwd:r});if(s===ii)return;if(s)return Ke.resolve(r,s);if(r===n)return;r=Ke.dirname(r)}};St.exports.exists=zs;St.exports.sync.exists=zs.sync;St.exports.stop=ii});var si=y((ib,oi)=>{"use strict";var Vs=require("path"),Ks=Js(),Gh=async t=>{let e=await Ks("package.json",{cwd:t});return e&&Vs.dirname(e)};oi.exports=Gh;oi.exports.sync=t=>{let e=Ks.sync("package.json",{cwd:t});return e&&Vs.dirname(e)}});var ci=y((cb,ta)=>{"use strict";ta.exports=function(e,r){return function(){for(var i=new Array(arguments.length),o=0;o<i.length;o++)i[o]=arguments[o];return e.apply(r,i)}}});var he=y((ub,ia)=>{"use strict";var Wh=ci(),ut=Object.prototype.toString;function fi(t){return ut.call(t)==="[object Array]"}function ui(t){return typeof t>"u"}function zh(t){return t!==null&&!ui(t)&&t.constructor!==null&&!ui(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function Jh(t){return ut.call(t)==="[object ArrayBuffer]"}function Vh(t){return typeof FormData<"u"&&t instanceof FormData}function Kh(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function Yh(t){return typeof t=="string"}function Qh(t){return typeof t=="number"}function ra(t){return t!==null&&typeof t=="object"}function kr(t){if(ut.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function Zh(t){return ut.call(t)==="[object Date]"}function ep(t){return ut.call(t)==="[object File]"}function tp(t){return ut.call(t)==="[object Blob]"}function na(t){return ut.call(t)==="[object Function]"}function rp(t){return ra(t)&&na(t.pipe)}function np(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}function ip(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function op(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function di(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),fi(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}function li(){var t={};function e(i,o){kr(t[o])&&kr(i)?t[o]=li(t[o],i):kr(i)?t[o]=li({},i):fi(i)?t[o]=i.slice():t[o]=i}for(var r=0,n=arguments.length;r<n;r++)di(arguments[r],e);return t}function sp(t,e,r){return di(e,function(i,o){r&&typeof i=="function"?t[o]=Wh(i,r):t[o]=i}),t}function ap(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}ia.exports={isArray:fi,isArrayBuffer:Jh,isBuffer:zh,isFormData:Vh,isArrayBufferView:Kh,isString:Yh,isNumber:Qh,isObject:ra,isPlainObject:kr,isUndefined:ui,isDate:Zh,isFile:ep,isBlob:tp,isFunction:na,isStream:rp,isURLSearchParams:np,isStandardBrowserEnv:op,forEach:di,merge:li,extend:sp,trim:ip,stripBOM:ap}});var Mr=y((lb,sa)=>{"use strict";var Et=he();function oa(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}sa.exports=function(e,r,n){if(!r)return e;var i;if(n)i=n(r);else if(Et.isURLSearchParams(r))i=r.toString();else{var o=[];Et.forEach(r,function(c,f){c===null||typeof c>"u"||(Et.isArray(c)?f=f+"[]":c=[c],Et.forEach(c,function(p){Et.isDate(p)?p=p.toISOString():Et.isObject(p)&&(p=JSON.stringify(p)),o.push(oa(f)+"="+oa(p))}))}),i=o.join("&")}if(i){var s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}});var ca=y((fb,aa)=>{"use strict";var cp=he();function Tr(){this.handlers=[]}Tr.prototype.use=function(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};Tr.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};Tr.prototype.forEach=function(e){cp.forEach(this.handlers,function(n){n!==null&&e(n)})};aa.exports=Tr});var la=y((db,ua)=>{"use strict";var up=he();ua.exports=function(e,r){up.forEach(e,function(i,o){o!==r&&o.toUpperCase()===r.toUpperCase()&&(e[r]=i,delete e[o])})}});var qr=y((hb,fa)=>{"use strict";fa.exports=function(e,r,n,i,o){return e.config=r,n&&(e.code=n),e.request=i,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}});var Nr=y((pb,da)=>{"use strict";var lp=qr();da.exports=function(e,r,n,i,o){var s=new Error(e);return lp(s,r,n,i,o)}});var hi=y((mb,ha)=>{"use strict";var fp=Nr();ha.exports=function(e,r,n){var i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):r(fp("Request failed with status code "+n.status,n.config,null,n.request,n))}});var ma=y((gb,pa)=>{"use strict";var jr=he();pa.exports=jr.isStandardBrowserEnv()?function(){return{write:function(r,n,i,o,s,a){var c=[];c.push(r+"="+encodeURIComponent(n)),jr.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),jr.isString(o)&&c.push("path="+o),jr.isString(s)&&c.push("domain="+s),a===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(r){var n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()});var ya=y((yb,ga)=>{"use strict";ga.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}});var ba=y((vb,va)=>{"use strict";va.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}});var pi=y((bb,_a)=>{"use strict";var dp=ya(),hp=ba();_a.exports=function(e,r){return e&&!dp(r)?hp(e,r):r}});var xa=y((_b,wa)=>{"use strict";var mi=he(),pp=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];wa.exports=function(e){var r={},n,i,o;return e&&mi.forEach(e.split(`
4
- `),function(a){if(o=a.indexOf(":"),n=mi.trim(a.substr(0,o)).toLowerCase(),i=mi.trim(a.substr(o+1)),n){if(r[n]&&pp.indexOf(n)>=0)return;n==="set-cookie"?r[n]=(r[n]?r[n]:[]).concat([i]):r[n]=r[n]?r[n]+", "+i:i}}),r}});var Pa=y((wb,Ea)=>{"use strict";var Sa=he();Ea.exports=Sa.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function i(o){var s=o;return e&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=i(window.location.href),function(s){var a=Sa.isString(s)?i(s):s;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}()});var Da=y((xb,Ca)=>{"use strict";var $r=he(),mp=hi(),gp=ma(),yp=Mr(),vp=pi(),bp=xa(),_p=Pa(),gi=Nr();Ca.exports=function(e){return new Promise(function(n,i){var o=e.data,s=e.headers,a=e.responseType;$r.isFormData(o)&&delete s["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var f=e.auth.username||"",u=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.Authorization="Basic "+btoa(f+":"+u)}var p=vp(e.baseURL,e.url);c.open(e.method.toUpperCase(),yp(p,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function g(){if(c){var b="getAllResponseHeaders"in c?bp(c.getAllResponseHeaders()):null,E=!a||a==="text"||a==="json"?c.responseText:c.response,P={data:E,status:c.status,statusText:c.statusText,headers:b,config:e,request:c};mp(n,i,P),c=null}}if("onloadend"in c?c.onloadend=g:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(g)},c.onabort=function(){c&&(i(gi("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){i(gi("Network Error",e,null,c)),c=null},c.ontimeout=function(){var E="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(E=e.timeoutErrorMessage),i(gi(E,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},$r.isStandardBrowserEnv()){var m=(e.withCredentials||_p(p))&&e.xsrfCookieName?gp.read(e.xsrfCookieName):void 0;m&&(s[e.xsrfHeaderName]=m)}"setRequestHeader"in c&&$r.forEach(s,function(E,P){typeof o>"u"&&P.toLowerCase()==="content-type"?delete s[P]:c.setRequestHeader(P,E)}),$r.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&a!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(E){c&&(c.abort(),i(E),c=null)}),o||(o=null),c.send(o)})}});var Aa=y((Sb,Oa)=>{var Pt=1e3,Ct=Pt*60,Dt=Ct*60,lt=Dt*24,wp=lt*7,xp=lt*365.25;Oa.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Sp(t);if(r==="number"&&isFinite(t))return e.long?Pp(t):Ep(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Sp(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*xp;case"weeks":case"week":case"w":return r*wp;case"days":case"day":case"d":return r*lt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Dt;case"minutes":case"minute":case"mins":case"min":case"m":return r*Ct;case"seconds":case"second":case"secs":case"sec":case"s":return r*Pt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Ep(t){var e=Math.abs(t);return e>=lt?Math.round(t/lt)+"d":e>=Dt?Math.round(t/Dt)+"h":e>=Ct?Math.round(t/Ct)+"m":e>=Pt?Math.round(t/Pt)+"s":t+"ms"}function Pp(t){var e=Math.abs(t);return e>=lt?Lr(t,e,lt,"day"):e>=Dt?Lr(t,e,Dt,"hour"):e>=Ct?Lr(t,e,Ct,"minute"):e>=Pt?Lr(t,e,Pt,"second"):t+" ms"}function Lr(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var yi=y((Eb,Ia)=>{function Cp(t){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=s,r.humanize=Aa(),r.destroy=f,Object.keys(t).forEach(u=>{r[u]=t[u]}),r.names=[],r.skips=[],r.formatters={};function e(u){let p=0;for(let g=0;g<u.length;g++)p=(p<<5)-p+u.charCodeAt(g),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=e;function r(u){let p,g=null,m,b;function E(...P){if(!E.enabled)return;let k=E,$=Number(new Date),G=$-(p||$);k.diff=G,k.prev=p,k.curr=$,p=$,P[0]=r.coerce(P[0]),typeof P[0]!="string"&&P.unshift("%O");let H=0;P[0]=P[0].replace(/%([a-zA-Z%])/g,(ae,ve)=>{if(ae==="%%")return"%";H++;let K=r.formatters[ve];if(typeof K=="function"){let I=P[H];ae=K.call(k,I),P.splice(H,1),H--}return ae}),r.formatArgs.call(k,P),(k.log||r.log).apply(k,P)}return E.namespace=u,E.useColors=r.useColors(),E.color=r.selectColor(u),E.extend=n,E.destroy=r.destroy,Object.defineProperty(E,"enabled",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(m!==r.namespaces&&(m=r.namespaces,b=r.enabled(u)),b),set:P=>{g=P}}),typeof r.init=="function"&&r.init(E),E}function n(u,p){let g=r(this.namespace+(typeof p>"u"?":":p)+u);return g.log=this.log,g}function i(u){r.save(u),r.namespaces=u,r.names=[],r.skips=[];let p,g=(typeof u=="string"?u:"").split(/[\s,]+/),m=g.length;for(p=0;p<m;p++)g[p]&&(u=g[p].replace(/\*/g,".*?"),u[0]==="-"?r.skips.push(new RegExp("^"+u.slice(1)+"$")):r.names.push(new RegExp("^"+u+"$")))}function o(){let u=[...r.names.map(a),...r.skips.map(a).map(p=>"-"+p)].join(",");return r.enable(""),u}function s(u){if(u[u.length-1]==="*")return!0;let p,g;for(p=0,g=r.skips.length;p<g;p++)if(r.skips[p].test(u))return!1;for(p=0,g=r.names.length;p<g;p++)if(r.names[p].test(u))return!0;return!1}function a(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function c(u){return u instanceof Error?u.stack||u.message:u}function f(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Ia.exports=Cp});var Ra=y((Ce,Br)=>{Ce.formatArgs=Op;Ce.save=Ap;Ce.load=Ip;Ce.useColors=Dp;Ce.storage=Rp();Ce.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ce.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Dp(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Op(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Br.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),t.splice(n,0,e)}Ce.log=console.debug||console.log||(()=>{});function Ap(t){try{t?Ce.storage.setItem("debug",t):Ce.storage.removeItem("debug")}catch{}}function Ip(){let t;try{t=Ce.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function Rp(){try{return localStorage}catch{}}Br.exports=yi()(Ce);var{formatters:Fp}=Br.exports;Fp.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var ka=y((Pb,Fa)=>{"use strict";Fa.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}});var _i=y((Cb,Ta)=>{"use strict";var kp=require("os"),Ma=require("tty"),Re=ka(),{env:Z}=process,Ye;Re("no-color")||Re("no-colors")||Re("color=false")||Re("color=never")?Ye=0:(Re("color")||Re("colors")||Re("color=true")||Re("color=always"))&&(Ye=1);"FORCE_COLOR"in Z&&(Z.FORCE_COLOR==="true"?Ye=1:Z.FORCE_COLOR==="false"?Ye=0:Ye=Z.FORCE_COLOR.length===0?1:Math.min(parseInt(Z.FORCE_COLOR,10),3));function vi(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function bi(t,e){if(Ye===0)return 0;if(Re("color=16m")||Re("color=full")||Re("color=truecolor"))return 3;if(Re("color=256"))return 2;if(t&&!e&&Ye===void 0)return 0;let r=Ye||0;if(Z.TERM==="dumb")return r;if(process.platform==="win32"){let n=kp.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Z)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Z)||Z.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Z)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Z.TEAMCITY_VERSION)?1:0;if(Z.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Z){let n=parseInt((Z.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Z.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Z.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Z.TERM)||"COLORTERM"in Z?1:r}function Mp(t){let e=bi(t,t&&t.isTTY);return vi(e)}Ta.exports={supportsColor:Mp,stdout:vi(bi(!0,Ma.isatty(1))),stderr:vi(bi(!0,Ma.isatty(2)))}});var Na=y((ne,Gr)=>{var Tp=require("tty"),Ur=require("util");ne.init=Up;ne.log=$p;ne.formatArgs=Np;ne.save=Lp;ne.load=Bp;ne.useColors=qp;ne.destroy=Ur.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ne.colors=[6,2,3,4,5,1];try{let t=_i();t&&(t.stderr||t).level>=2&&(ne.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}ne.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,o)=>o.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function qp(){return"colors"in ne.inspectOpts?!!ne.inspectOpts.colors:Tp.isatty(process.stderr.fd)}function Np(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${i};1m${e} \x1B[0m`;t[0]=o+t[0].split(`
2
+ "use strict";var wh=Object.create;var Fs=Object.defineProperty;var _h=Object.getOwnPropertyDescriptor;var xh=Object.getOwnPropertyNames;var Sh=Object.getPrototypeOf,Eh=Object.prototype.hasOwnProperty;var y=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ch=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of xh(e))!Eh.call(t,i)&&i!==r&&Fs(t,i,{get:()=>e[i],enumerable:!(n=_h(e,i))||n.enumerable});return t};var N=(t,e,r)=>(r=t!=null?wh(Sh(t)):{},Ch(e||!t||!t.__esModule?Fs(r,"default",{value:t,enumerable:!0}):r,t));var ze=y((rb,ei)=>{var Ph=require("fs"),Dh=require("path");function ks(t){console.log(`[dotenv][DEBUG] ${t}`)}var Oh=`
3
+ `,Ah=/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/,Ih=/\\n/g,Rh=/\n|\r|\r\n/;function Ts(t,e){let r=!!(e&&e.debug),n={};return t.toString().split(Rh).forEach(function(i,o){let s=i.match(Ah);if(s!=null){let a=s[1],c=s[2]||"",h=c.length-1,u=c[0]==='"'&&c[h]==='"';c[0]==="'"&&c[h]==="'"||u?(c=c.substring(1,h),u&&(c=c.replace(Ih,Oh))):c=c.trim(),n[a]=c}else r&&ks(`did not match key and value when parsing line ${o+1}: ${i}`)}),n}function Fh(t){let e=Dh.resolve(process.cwd(),".env"),r="utf8",n=!1;t&&(t.path!=null&&(e=t.path),t.encoding!=null&&(r=t.encoding),t.debug!=null&&(n=!0));try{let i=Ts(Ph.readFileSync(e,{encoding:r}),{debug:n});return Object.keys(i).forEach(function(o){Object.prototype.hasOwnProperty.call(process.env,o)?n&&ks(`"${o}" is already defined in \`process.env\` and will not be overwritten`):process.env[o]=i[o]}),{parsed:i}}catch(i){return{error:i}}}ei.exports.config=Fh;ei.exports.parse=Ts});var qs=y((nb,Ms)=>{var ti=class{constructor(e){this.value=e,this.next=void 0}},ri=class{constructor(){this.clear()}enqueue(e){let r=new ti(e);this._head?(this._tail.next=r,this._tail=r):(this._head=r,this._tail=r),this._size++}dequeue(){let e=this._head;if(e)return this._head=this._head.next,this._size--,e.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let e=this._head;for(;e;)yield e.value,e=e.next}};Ms.exports=ri});var ni=y((ib,Ns)=>{"use strict";var kh=qs(),Th=t=>{if(!((Number.isInteger(t)||t===1/0)&&t>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=new kh,r=0,n=()=>{r--,e.size>0&&e.dequeue()()},i=async(a,c,...h)=>{r++;let u=(async()=>a(...h))();c(u);try{await u}catch{}n()},o=(a,c,...h)=>{e.enqueue(i.bind(null,a,c,...h)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},s=(a,...c)=>new Promise(h=>{o(a,h,...c)});return Object.defineProperties(s,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),s};Ns.exports=Th});var Ls=y((ob,$s)=>{"use strict";var js=ni(),Ar=class extends Error{constructor(e){super(),this.value=e}},Mh=async(t,e)=>e(await t),qh=async t=>{let e=await Promise.all(t);if(e[1]===!0)throw new Ar(e[0]);return!1},Nh=async(t,e,r)=>{r={concurrency:1/0,preserveOrder:!0,...r};let n=js(r.concurrency),i=[...t].map(s=>[s,n(Mh,s,e)]),o=js(r.preserveOrder?1:1/0);try{await Promise.all(i.map(s=>o(qh,s)))}catch(s){if(s instanceof Ar)return s.value;throw s}};$s.exports=Nh});var Ws=y((sb,ii)=>{"use strict";var Bs=require("path"),Ir=require("fs"),{promisify:Us}=require("util"),jh=Ls(),$h=Us(Ir.stat),Lh=Us(Ir.lstat),Xs={directory:"isDirectory",file:"isFile"};function Hs({type:t}){if(!(t in Xs))throw new Error(`Invalid type specified: ${t}`)}var Gs=(t,e)=>t===void 0||e[Xs[t]]();ii.exports=async(t,e)=>{e={cwd:process.cwd(),type:"file",allowSymlinks:!0,...e},Hs(e);let r=e.allowSymlinks?$h:Lh;return jh(t,async n=>{try{let i=await r(Bs.resolve(e.cwd,n));return Gs(e.type,i)}catch{return!1}},e)};ii.exports.sync=(t,e)=>{e={cwd:process.cwd(),allowSymlinks:!0,type:"file",...e},Hs(e);let r=e.allowSymlinks?Ir.statSync:Ir.lstatSync;for(let n of t)try{let i=r(Bs.resolve(e.cwd,n));if(Gs(e.type,i))return n}catch{}}});var Js=y((ab,oi)=>{"use strict";var zs=require("fs"),{promisify:Bh}=require("util"),Uh=Bh(zs.access);oi.exports=async t=>{try{return await Uh(t),!0}catch{return!1}};oi.exports.sync=t=>{try{return zs.accessSync(t),!0}catch{return!1}}});var Ks=y((cb,xt)=>{"use strict";var Ye=require("path"),Rr=Ws(),Vs=Js(),si=Symbol("findUp.stop");xt.exports=async(t,e={})=>{let r=Ye.resolve(e.cwd||""),{root:n}=Ye.parse(r),i=[].concat(t),o=async s=>{if(typeof t!="function")return Rr(i,s);let a=await t(s.cwd);return typeof a=="string"?Rr([a],s):a};for(;;){let s=await o({...e,cwd:r});if(s===si)return;if(s)return Ye.resolve(r,s);if(r===n)return;r=Ye.dirname(r)}};xt.exports.sync=(t,e={})=>{let r=Ye.resolve(e.cwd||""),{root:n}=Ye.parse(r),i=[].concat(t),o=s=>{if(typeof t!="function")return Rr.sync(i,s);let a=t(s.cwd);return typeof a=="string"?Rr.sync([a],s):a};for(;;){let s=o({...e,cwd:r});if(s===si)return;if(s)return Ye.resolve(r,s);if(r===n)return;r=Ye.dirname(r)}};xt.exports.exists=Vs;xt.exports.sync.exists=Vs.sync;xt.exports.stop=si});var Fr=y((ub,ai)=>{"use strict";var Ys=require("path"),Qs=Ks(),Xh=async t=>{let e=await Qs("package.json",{cwd:t});return e&&Ys.dirname(e)};ai.exports=Xh;ai.exports.sync=t=>{let e=Qs.sync("package.json",{cwd:t});return e&&Ys.dirname(e)}});var ui=y((hb,na)=>{"use strict";na.exports=function(e,r){return function(){for(var i=new Array(arguments.length),o=0;o<i.length;o++)i[o]=arguments[o];return e.apply(r,i)}}});var he=y((pb,sa)=>{"use strict";var Wh=ui(),ut=Object.prototype.toString;function di(t){return ut.call(t)==="[object Array]"}function li(t){return typeof t>"u"}function zh(t){return t!==null&&!li(t)&&t.constructor!==null&&!li(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function Jh(t){return ut.call(t)==="[object ArrayBuffer]"}function Vh(t){return typeof FormData<"u"&&t instanceof FormData}function Kh(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function Yh(t){return typeof t=="string"}function Qh(t){return typeof t=="number"}function ia(t){return t!==null&&typeof t=="object"}function kr(t){if(ut.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function Zh(t){return ut.call(t)==="[object Date]"}function ep(t){return ut.call(t)==="[object File]"}function tp(t){return ut.call(t)==="[object Blob]"}function oa(t){return ut.call(t)==="[object Function]"}function rp(t){return ia(t)&&oa(t.pipe)}function np(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}function ip(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function op(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function hi(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),di(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}function fi(){var t={};function e(i,o){kr(t[o])&&kr(i)?t[o]=fi(t[o],i):kr(i)?t[o]=fi({},i):di(i)?t[o]=i.slice():t[o]=i}for(var r=0,n=arguments.length;r<n;r++)hi(arguments[r],e);return t}function sp(t,e,r){return hi(e,function(i,o){r&&typeof i=="function"?t[o]=Wh(i,r):t[o]=i}),t}function ap(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}sa.exports={isArray:di,isArrayBuffer:Jh,isBuffer:zh,isFormData:Vh,isArrayBufferView:Kh,isString:Yh,isNumber:Qh,isObject:ia,isPlainObject:kr,isUndefined:li,isDate:Zh,isFile:ep,isBlob:tp,isFunction:oa,isStream:rp,isURLSearchParams:np,isStandardBrowserEnv:op,forEach:hi,merge:fi,extend:sp,trim:ip,stripBOM:ap}});var Tr=y((mb,ca)=>{"use strict";var St=he();function aa(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}ca.exports=function(e,r,n){if(!r)return e;var i;if(n)i=n(r);else if(St.isURLSearchParams(r))i=r.toString();else{var o=[];St.forEach(r,function(c,h){c===null||typeof c>"u"||(St.isArray(c)?h=h+"[]":c=[c],St.forEach(c,function(p){St.isDate(p)?p=p.toISOString():St.isObject(p)&&(p=JSON.stringify(p)),o.push(aa(h)+"="+aa(p))}))}),i=o.join("&")}if(i){var s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}});var la=y((gb,ua)=>{"use strict";var cp=he();function Mr(){this.handlers=[]}Mr.prototype.use=function(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};Mr.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};Mr.prototype.forEach=function(e){cp.forEach(this.handlers,function(n){n!==null&&e(n)})};ua.exports=Mr});var da=y((yb,fa)=>{"use strict";var up=he();fa.exports=function(e,r){up.forEach(e,function(i,o){o!==r&&o.toUpperCase()===r.toUpperCase()&&(e[r]=i,delete e[o])})}});var qr=y((vb,ha)=>{"use strict";ha.exports=function(e,r,n,i,o){return e.config=r,n&&(e.code=n),e.request=i,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}});var Nr=y((bb,pa)=>{"use strict";var lp=qr();pa.exports=function(e,r,n,i,o){var s=new Error(e);return lp(s,r,n,i,o)}});var pi=y((wb,ma)=>{"use strict";var fp=Nr();ma.exports=function(e,r,n){var i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):r(fp("Request failed with status code "+n.status,n.config,null,n.request,n))}});var ya=y((_b,ga)=>{"use strict";var jr=he();ga.exports=jr.isStandardBrowserEnv()?function(){return{write:function(r,n,i,o,s,a){var c=[];c.push(r+"="+encodeURIComponent(n)),jr.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),jr.isString(o)&&c.push("path="+o),jr.isString(s)&&c.push("domain="+s),a===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(r){var n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()});var ba=y((xb,va)=>{"use strict";va.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}});var _a=y((Sb,wa)=>{"use strict";wa.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}});var mi=y((Eb,xa)=>{"use strict";var dp=ba(),hp=_a();xa.exports=function(e,r){return e&&!dp(r)?hp(e,r):r}});var Ea=y((Cb,Sa)=>{"use strict";var gi=he(),pp=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];Sa.exports=function(e){var r={},n,i,o;return e&&gi.forEach(e.split(`
4
+ `),function(a){if(o=a.indexOf(":"),n=gi.trim(a.substr(0,o)).toLowerCase(),i=gi.trim(a.substr(o+1)),n){if(r[n]&&pp.indexOf(n)>=0)return;n==="set-cookie"?r[n]=(r[n]?r[n]:[]).concat([i]):r[n]=r[n]?r[n]+", "+i:i}}),r}});var Da=y((Pb,Pa)=>{"use strict";var Ca=he();Pa.exports=Ca.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function i(o){var s=o;return e&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=i(window.location.href),function(s){var a=Ca.isString(s)?i(s):s;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}()});var Aa=y((Db,Oa)=>{"use strict";var $r=he(),mp=pi(),gp=ya(),yp=Tr(),vp=mi(),bp=Ea(),wp=Da(),yi=Nr();Oa.exports=function(e){return new Promise(function(n,i){var o=e.data,s=e.headers,a=e.responseType;$r.isFormData(o)&&delete s["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",u=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.Authorization="Basic "+btoa(h+":"+u)}var p=vp(e.baseURL,e.url);c.open(e.method.toUpperCase(),yp(p,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function g(){if(c){var b="getAllResponseHeaders"in c?bp(c.getAllResponseHeaders()):null,E=!a||a==="text"||a==="json"?c.responseText:c.response,C={data:E,status:c.status,statusText:c.statusText,headers:b,config:e,request:c};mp(n,i,C),c=null}}if("onloadend"in c?c.onloadend=g:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(g)},c.onabort=function(){c&&(i(yi("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){i(yi("Network Error",e,null,c)),c=null},c.ontimeout=function(){var E="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(E=e.timeoutErrorMessage),i(yi(E,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},$r.isStandardBrowserEnv()){var m=(e.withCredentials||wp(p))&&e.xsrfCookieName?gp.read(e.xsrfCookieName):void 0;m&&(s[e.xsrfHeaderName]=m)}"setRequestHeader"in c&&$r.forEach(s,function(E,C){typeof o>"u"&&C.toLowerCase()==="content-type"?delete s[C]:c.setRequestHeader(C,E)}),$r.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&a!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(E){c&&(c.abort(),i(E),c=null)}),o||(o=null),c.send(o)})}});var Ra=y((Ob,Ia)=>{var Et=1e3,Ct=Et*60,Pt=Ct*60,lt=Pt*24,_p=lt*7,xp=lt*365.25;Ia.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Sp(t);if(r==="number"&&isFinite(t))return e.long?Cp(t):Ep(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Sp(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*xp;case"weeks":case"week":case"w":return r*_p;case"days":case"day":case"d":return r*lt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Pt;case"minutes":case"minute":case"mins":case"min":case"m":return r*Ct;case"seconds":case"second":case"secs":case"sec":case"s":return r*Et;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Ep(t){var e=Math.abs(t);return e>=lt?Math.round(t/lt)+"d":e>=Pt?Math.round(t/Pt)+"h":e>=Ct?Math.round(t/Ct)+"m":e>=Et?Math.round(t/Et)+"s":t+"ms"}function Cp(t){var e=Math.abs(t);return e>=lt?Lr(t,e,lt,"day"):e>=Pt?Lr(t,e,Pt,"hour"):e>=Ct?Lr(t,e,Ct,"minute"):e>=Et?Lr(t,e,Et,"second"):t+" ms"}function Lr(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var vi=y((Ab,Fa)=>{function Pp(t){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=s,r.humanize=Ra(),r.destroy=h,Object.keys(t).forEach(u=>{r[u]=t[u]}),r.names=[],r.skips=[],r.formatters={};function e(u){let p=0;for(let g=0;g<u.length;g++)p=(p<<5)-p+u.charCodeAt(g),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=e;function r(u){let p,g=null,m,b;function E(...C){if(!E.enabled)return;let k=E,$=Number(new Date),X=$-(p||$);k.diff=X,k.prev=p,k.curr=$,p=$,C[0]=r.coerce(C[0]),typeof C[0]!="string"&&C.unshift("%O");let G=0;C[0]=C[0].replace(/%([a-zA-Z%])/g,(ae,ve)=>{if(ae==="%%")return"%";G++;let K=r.formatters[ve];if(typeof K=="function"){let I=C[G];ae=K.call(k,I),C.splice(G,1),G--}return ae}),r.formatArgs.call(k,C),(k.log||r.log).apply(k,C)}return E.namespace=u,E.useColors=r.useColors(),E.color=r.selectColor(u),E.extend=n,E.destroy=r.destroy,Object.defineProperty(E,"enabled",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(m!==r.namespaces&&(m=r.namespaces,b=r.enabled(u)),b),set:C=>{g=C}}),typeof r.init=="function"&&r.init(E),E}function n(u,p){let g=r(this.namespace+(typeof p>"u"?":":p)+u);return g.log=this.log,g}function i(u){r.save(u),r.namespaces=u,r.names=[],r.skips=[];let p,g=(typeof u=="string"?u:"").split(/[\s,]+/),m=g.length;for(p=0;p<m;p++)g[p]&&(u=g[p].replace(/\*/g,".*?"),u[0]==="-"?r.skips.push(new RegExp("^"+u.slice(1)+"$")):r.names.push(new RegExp("^"+u+"$")))}function o(){let u=[...r.names.map(a),...r.skips.map(a).map(p=>"-"+p)].join(",");return r.enable(""),u}function s(u){if(u[u.length-1]==="*")return!0;let p,g;for(p=0,g=r.skips.length;p<g;p++)if(r.skips[p].test(u))return!1;for(p=0,g=r.names.length;p<g;p++)if(r.names[p].test(u))return!0;return!1}function a(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function c(u){return u instanceof Error?u.stack||u.message:u}function h(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Fa.exports=Pp});var ka=y((Pe,Br)=>{Pe.formatArgs=Op;Pe.save=Ap;Pe.load=Ip;Pe.useColors=Dp;Pe.storage=Rp();Pe.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Pe.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Dp(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Op(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Br.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),t.splice(n,0,e)}Pe.log=console.debug||console.log||(()=>{});function Ap(t){try{t?Pe.storage.setItem("debug",t):Pe.storage.removeItem("debug")}catch{}}function Ip(){let t;try{t=Pe.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function Rp(){try{return localStorage}catch{}}Br.exports=vi()(Pe);var{formatters:Fp}=Br.exports;Fp.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Ma=y((Ib,Ta)=>{"use strict";Ta.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}});var _i=y((Rb,Na)=>{"use strict";var kp=require("os"),qa=require("tty"),Re=Ma(),{env:Z}=process,Qe;Re("no-color")||Re("no-colors")||Re("color=false")||Re("color=never")?Qe=0:(Re("color")||Re("colors")||Re("color=true")||Re("color=always"))&&(Qe=1);"FORCE_COLOR"in Z&&(Z.FORCE_COLOR==="true"?Qe=1:Z.FORCE_COLOR==="false"?Qe=0:Qe=Z.FORCE_COLOR.length===0?1:Math.min(parseInt(Z.FORCE_COLOR,10),3));function bi(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function wi(t,e){if(Qe===0)return 0;if(Re("color=16m")||Re("color=full")||Re("color=truecolor"))return 3;if(Re("color=256"))return 2;if(t&&!e&&Qe===void 0)return 0;let r=Qe||0;if(Z.TERM==="dumb")return r;if(process.platform==="win32"){let n=kp.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Z)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Z)||Z.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Z)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Z.TEAMCITY_VERSION)?1:0;if(Z.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Z){let n=parseInt((Z.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Z.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Z.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Z.TERM)||"COLORTERM"in Z?1:r}function Tp(t){let e=wi(t,t&&t.isTTY);return bi(e)}Na.exports={supportsColor:Tp,stdout:bi(wi(!0,qa.isatty(1))),stderr:bi(wi(!0,qa.isatty(2)))}});var $a=y((ne,Xr)=>{var Mp=require("tty"),Ur=require("util");ne.init=Up;ne.log=$p;ne.formatArgs=Np;ne.save=Lp;ne.load=Bp;ne.useColors=qp;ne.destroy=Ur.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ne.colors=[6,2,3,4,5,1];try{let t=_i();t&&(t.stderr||t).level>=2&&(ne.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}ne.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,o)=>o.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function qp(){return"colors"in ne.inspectOpts?!!ne.inspectOpts.colors:Mp.isatty(process.stderr.fd)}function Np(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${i};1m${e} \x1B[0m`;t[0]=o+t[0].split(`
5
5
  `).join(`
6
- `+o),t.push(i+"m+"+Gr.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=jp()+e+" "+t[0]}function jp(){return ne.inspectOpts.hideDate?"":new Date().toISOString()+" "}function $p(...t){return process.stderr.write(Ur.format(...t)+`
7
- `)}function Lp(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function Bp(){return process.env.DEBUG}function Up(t){t.inspectOpts={};let e=Object.keys(ne.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=ne.inspectOpts[e[r]]}Gr.exports=yi()(ne);var{formatters:qa}=Gr.exports;qa.o=function(t){return this.inspectOpts.colors=this.useColors,Ur.inspect(t,this.inspectOpts).split(`
8
- `).map(e=>e.trim()).join(" ")};qa.O=function(t){return this.inspectOpts.colors=this.useColors,Ur.inspect(t,this.inspectOpts)}});var ja=y((Db,wi)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?wi.exports=Ra():wi.exports=Na()});var La=y((Ob,$a)=>{var Zt;$a.exports=function(){if(!Zt){try{Zt=ja()("follow-redirects")}catch{}typeof Zt!="function"&&(Zt=function(){})}Zt.apply(null,arguments)}});var Di=y((Ab,Ci)=>{var ft=require("url"),xi=ft.URL,Gp=require("http"),Xp=require("https"),Ga=require("stream").Writable,Xa=require("assert"),Ha=La(),Ei=["abort","aborted","connect","error","socket","timeout"],Pi=Object.create(null);Ei.forEach(function(t){Pi[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}});var Hp=tr("ERR_INVALID_URL","Invalid URL",TypeError),Ba=tr("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Wp=tr("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),zp=tr("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Jp=tr("ERR_STREAM_WRITE_AFTER_END","write after end");function De(t,e){Ga.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var r=this;this._onNativeResponse=function(n){r._processResponse(n)},this._performRequest()}De.prototype=Object.create(Ga.prototype);De.prototype.abort=function(){za(this._currentRequest),this.emit("abort")};De.prototype.write=function(t,e,r){if(this._ending)throw new Jp;if(!dt(t)&&!Yp(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(er(e)&&(r=e,e=null),t.length===0){r&&r();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,r)):(this.emit("error",new zp),this.abort())};De.prototype.end=function(t,e,r){if(er(t)?(r=t,t=e=null):er(e)&&(r=e,e=null),!t)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,i=this._currentRequest;this.write(t,e,function(){n._ended=!0,i.end(null,null,r)}),this._ending=!0}};De.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};De.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};De.prototype.setTimeout=function(t,e){var r=this;function n(s){s.setTimeout(t),s.removeListener("timeout",s.destroy),s.addListener("timeout",s.destroy)}function i(s){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),o()},t),n(s)}function o(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",o),r.removeListener("error",o),r.removeListener("response",o),e&&r.removeListener("timeout",e),r.socket||r._currentRequest.removeListener("socket",i)}return e&&this.on("timeout",e),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",n),this.on("abort",o),this.on("error",o),this.on("response",o),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){De.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(De.prototype,t,{get:function(){return this._currentRequest[t]}})});De.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e))}};De.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e){this.emit("error",new TypeError("Unsupported protocol "+t));return}if(this._options.agents){var r=t.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=e.request(this._options,this._onNativeResponse);n._redirectable=this;for(var i of Ei)n.on(i,Pi[i]);if(this._currentUrl=/^\//.test(this._options.path)?ft.format(this._options):this._options.path,this._isRedirect){var o=0,s=this,a=this._requestBodyBuffers;(function c(f){if(n===s._currentRequest)if(f)s.emit("error",f);else if(o<a.length){var u=a[o++];n.finished||n.write(u.data,u.encoding,c)}else s._ended&&n.end()})()}};De.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var r=t.headers.location;if(!r||this._options.followRedirects===!1||e<300||e>=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if(za(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects){this.emit("error",new Wp);return}var n,i=this._options.beforeRedirect;i&&(n=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var o=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Si(/^content-/i,this._options.headers));var s=Si(/^host$/i,this._options.headers),a=ft.parse(this._currentUrl),c=s||a.host,f=/^\w+:/.test(r)?this._currentUrl:ft.format(Object.assign(a,{host:c})),u;try{u=ft.resolve(f,r)}catch(b){this.emit("error",new Ba({cause:b}));return}Ha("redirecting to",u),this._isRedirect=!0;var p=ft.parse(u);if(Object.assign(this._options,p),(p.protocol!==a.protocol&&p.protocol!=="https:"||p.host!==c&&!Kp(p.host,c))&&Si(/^(?:authorization|cookie)$/i,this._options.headers),er(i)){var g={headers:t.headers,statusCode:e},m={url:f,method:o,headers:n};try{i(this._options,g,m)}catch(b){this.emit("error",b);return}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(b){this.emit("error",new Ba({cause:b}))}};function Wa(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(n){var i=n+":",o=r[i]=t[n],s=e[n]=Object.create(o);function a(f,u,p){if(dt(f)){var g;try{g=Ua(new xi(f))}catch{g=ft.parse(f)}if(!dt(g.protocol))throw new Hp({input:f});f=g}else xi&&f instanceof xi?f=Ua(f):(p=u,u=f,f={protocol:i});return er(u)&&(p=u,u=null),u=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},f,u),u.nativeProtocols=r,!dt(u.host)&&!dt(u.hostname)&&(u.hostname="::1"),Xa.equal(u.protocol,i,"protocol mismatch"),Ha("options",u),new De(u,p)}function c(f,u,p){var g=s.request(f,u,p);return g.end(),g}Object.defineProperties(s,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function Vp(){}function Ua(t){var e={protocol:t.protocol,hostname:t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,hash:t.hash,search:t.search,pathname:t.pathname,path:t.pathname+t.search,href:t.href};return t.port!==""&&(e.port=Number(t.port)),e}function Si(t,e){var r;for(var n in e)t.test(n)&&(r=e[n],delete e[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function tr(t,e,r){function n(i){Error.captureStackTrace(this,this.constructor),Object.assign(this,i||{}),this.code=t,this.message=this.cause?e+": "+this.cause.message:e}return n.prototype=new(r||Error),n.prototype.constructor=n,n.prototype.name="Error ["+t+"]",n}function za(t){for(var e of Ei)t.removeListener(e,Pi[e]);t.on("error",Vp),t.abort()}function Kp(t,e){Xa(dt(t)&&dt(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function dt(t){return typeof t=="string"||t instanceof String}function er(t){return typeof t=="function"}function Yp(t){return typeof t=="object"&&"length"in t}Ci.exports=Wa({http:Gp,https:Xp});Ci.exports.wrap=Wa});var Oi=y((Ib,Qp)=>{Qp.exports={name:"axios",version:"0.21.4",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://axios-http.com",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},jsdelivr:"dist/axios.min.js",unpkg:"dist/axios.min.js",typings:"./index.d.ts",dependencies:{"follow-redirects":"^1.14.0"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]}});var Za=y((Rb,Qa)=>{"use strict";var rr=he(),Ja=hi(),Zp=pi(),e0=Mr(),t0=require("http"),r0=require("https"),n0=Di().http,i0=Di().https,Va=require("url"),o0=require("zlib"),s0=Oi(),Xr=Nr(),Ai=qr(),Ka=/https:?/;function Ya(t,e,r){if(t.hostname=e.host,t.host=e.host,t.port=e.port,t.path=r,e.auth){var n=Buffer.from(e.auth.username+":"+e.auth.password,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+n}t.beforeRedirect=function(o){o.headers.host=o.host,Ya(o,e,o.href)}}Qa.exports=function(e){return new Promise(function(n,i){var o=function(C){n(C)},s=function(C){i(C)},a=e.data,c=e.headers;if("User-Agent"in c||"user-agent"in c?!c["User-Agent"]&&!c["user-agent"]&&(delete c["User-Agent"],delete c["user-agent"]):c["User-Agent"]="axios/"+s0.version,a&&!rr.isStream(a)){if(!Buffer.isBuffer(a))if(rr.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(rr.isString(a))a=Buffer.from(a,"utf-8");else return s(Xr("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));c["Content-Length"]=a.length}var f=void 0;if(e.auth){var u=e.auth.username||"",p=e.auth.password||"";f=u+":"+p}var g=Zp(e.baseURL,e.url),m=Va.parse(g),b=m.protocol||"http:";if(!f&&m.auth){var E=m.auth.split(":"),P=E[0]||"",k=E[1]||"";f=P+":"+k}f&&delete c.Authorization;var $=Ka.test(b),G=$?e.httpsAgent:e.httpAgent,H={path:e0(m.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:c,agent:G,agents:{http:e.httpAgent,https:e.httpsAgent},auth:f};e.socketPath?H.socketPath=e.socketPath:(H.hostname=m.hostname,H.port=m.port);var J=e.proxy;if(!J&&J!==!1){var ae=b.slice(0,-1)+"_proxy",ve=process.env[ae]||process.env[ae.toUpperCase()];if(ve){var K=Va.parse(ve),I=process.env.no_proxy||process.env.NO_PROXY,x=!0;if(I){var _=I.split(",").map(function(C){return C.trim()});x=!_.some(function(C){return C?C==="*"||C[0]==="."&&m.hostname.substr(m.hostname.length-C.length)===C?!0:m.hostname===C:!1})}if(x&&(J={host:K.hostname,port:K.port,protocol:K.protocol},K.auth)){var R=K.auth.split(":");J.auth={username:R[0],password:R[1]}}}}J&&(H.headers.host=m.hostname+(m.port?":"+m.port:""),Ya(H,J,b+"//"+m.hostname+(m.port?":"+m.port:"")+H.path));var F,U=$&&(J?Ka.test(J.protocol):!0);e.transport?F=e.transport:e.maxRedirects===0?F=U?r0:t0:(e.maxRedirects&&(H.maxRedirects=e.maxRedirects),F=U?i0:n0),e.maxBodyLength>-1&&(H.maxBodyLength=e.maxBodyLength);var A=F.request(H,function(C){if(!A.aborted){var T=C,Ae=C.req||A;if(C.statusCode!==204&&Ae.method!=="HEAD"&&e.decompress!==!1)switch(C.headers["content-encoding"]){case"gzip":case"compress":case"deflate":T=T.pipe(o0.createUnzip()),delete C.headers["content-encoding"];break}var Me={status:C.statusCode,statusText:C.statusMessage,headers:C.headers,config:e,request:Ae};if(e.responseType==="stream")Me.data=T,Ja(o,s,Me);else{var ce=[],be=0;T.on("data",function(re){ce.push(re),be+=re.length,e.maxContentLength>-1&&be>e.maxContentLength&&(T.destroy(),s(Xr("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,Ae)))}),T.on("error",function(re){A.aborted||s(Ai(re,e,null,Ae))}),T.on("end",function(){var re=Buffer.concat(ce);e.responseType!=="arraybuffer"&&(re=re.toString(e.responseEncoding),(!e.responseEncoding||e.responseEncoding==="utf8")&&(re=rr.stripBOM(re))),Me.data=re,Ja(o,s,Me)})}}});if(A.on("error",function(C){A.aborted&&C.code!=="ERR_FR_TOO_MANY_REDIRECTS"||s(Ai(C,e,null,A))}),e.timeout){var L=parseInt(e.timeout,10);if(isNaN(L)){s(Xr("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",A));return}A.setTimeout(L,function(){A.abort(),s(Xr("timeout of "+L+"ms exceeded",e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",A))})}e.cancelToken&&e.cancelToken.promise.then(function(C){A.aborted||(A.abort(),s(C))}),rr.isStream(a)?a.on("error",function(C){s(Ai(C,e,null,A))}).pipe(A):A.end(a)})}});var Wr=y((Fb,rc)=>{"use strict";var ie=he(),ec=la(),a0=qr(),c0={"Content-Type":"application/x-www-form-urlencoded"};function tc(t,e){!ie.isUndefined(t)&&ie.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function u0(){var t;return typeof XMLHttpRequest<"u"?t=Da():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(t=Za()),t}function l0(t,e,r){if(ie.isString(t))try{return(e||JSON.parse)(t),ie.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var Hr={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:u0(),transformRequest:[function(e,r){return ec(r,"Accept"),ec(r,"Content-Type"),ie.isFormData(e)||ie.isArrayBuffer(e)||ie.isBuffer(e)||ie.isStream(e)||ie.isFile(e)||ie.isBlob(e)?e:ie.isArrayBufferView(e)?e.buffer:ie.isURLSearchParams(e)?(tc(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):ie.isObject(e)||r&&r["Content-Type"]==="application/json"?(tc(r,"application/json"),l0(e)):e}],transformResponse:[function(e){var r=this.transitional,n=r&&r.silentJSONParsing,i=r&&r.forcedJSONParsing,o=!n&&this.responseType==="json";if(o||i&&ie.isString(e)&&e.length)try{return JSON.parse(e)}catch(s){if(o)throw s.name==="SyntaxError"?a0(s,this,"E_JSON_PARSE"):s}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};Hr.headers={common:{Accept:"application/json, text/plain, */*"}};ie.forEach(["delete","get","head"],function(e){Hr.headers[e]={}});ie.forEach(["post","put","patch"],function(e){Hr.headers[e]=ie.merge(c0)});rc.exports=Hr});var ic=y((kb,nc)=>{"use strict";var f0=he(),d0=Wr();nc.exports=function(e,r,n){var i=this||d0;return f0.forEach(n,function(s){e=s.call(i,e,r)}),e}});var Ii=y((Mb,oc)=>{"use strict";oc.exports=function(e){return!!(e&&e.__CANCEL__)}});var cc=y((Tb,ac)=>{"use strict";var sc=he(),Ri=ic(),h0=Ii(),p0=Wr();function Fi(t){t.cancelToken&&t.cancelToken.throwIfRequested()}ac.exports=function(e){Fi(e),e.headers=e.headers||{},e.data=Ri.call(e,e.data,e.headers,e.transformRequest),e.headers=sc.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),sc.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var r=e.adapter||p0.adapter;return r(e).then(function(i){return Fi(e),i.data=Ri.call(e,i.data,i.headers,e.transformResponse),i},function(i){return h0(i)||(Fi(e),i&&i.response&&(i.response.data=Ri.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})}});var ki=y((qb,uc)=>{"use strict";var ue=he();uc.exports=function(e,r){r=r||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function c(g,m){return ue.isPlainObject(g)&&ue.isPlainObject(m)?ue.merge(g,m):ue.isPlainObject(m)?ue.merge({},m):ue.isArray(m)?m.slice():m}function f(g){ue.isUndefined(r[g])?ue.isUndefined(e[g])||(n[g]=c(void 0,e[g])):n[g]=c(e[g],r[g])}ue.forEach(i,function(m){ue.isUndefined(r[m])||(n[m]=c(void 0,r[m]))}),ue.forEach(o,f),ue.forEach(s,function(m){ue.isUndefined(r[m])?ue.isUndefined(e[m])||(n[m]=c(void 0,e[m])):n[m]=c(void 0,r[m])}),ue.forEach(a,function(m){m in r?n[m]=c(e[m],r[m]):m in e&&(n[m]=c(void 0,e[m]))});var u=i.concat(o).concat(s).concat(a),p=Object.keys(e).concat(Object.keys(r)).filter(function(m){return u.indexOf(m)===-1});return ue.forEach(p,f),n}});var pc=y((Nb,hc)=>{"use strict";var fc=Oi(),Mi={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Mi[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var lc={},m0=fc.version.split(".");function dc(t,e){for(var r=e?e.split("."):m0,n=t.split("."),i=0;i<3;i++){if(r[i]>n[i])return!0;if(r[i]<n[i])return!1}return!1}Mi.transitional=function(e,r,n){var i=r&&dc(r);function o(s,a){return"[Axios v"+fc.version+"] Transitional option '"+s+"'"+a+(n?". "+n:"")}return function(s,a,c){if(e===!1)throw new Error(o(a," has been removed in "+r));return i&&!lc[a]&&(lc[a]=!0,console.warn(o(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,a,c):!0}};function g0(t,e,r){if(typeof t!="object")throw new TypeError("options must be an object");for(var n=Object.keys(t),i=n.length;i-- >0;){var o=n[i],s=e[o];if(s){var a=t[o],c=a===void 0||s(a,o,t);if(c!==!0)throw new TypeError("option "+o+" must be "+c);continue}if(r!==!0)throw Error("Unknown option "+o)}}hc.exports={isOlderVersion:dc,assertOptions:g0,validators:Mi}});var _c=y((jb,bc)=>{"use strict";var yc=he(),y0=Mr(),mc=ca(),gc=cc(),zr=ki(),vc=pc(),Ot=vc.validators;function nr(t){this.defaults=t,this.interceptors={request:new mc,response:new mc}}nr.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=zr(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var r=e.transitional;r!==void 0&&vc.assertOptions(r,{silentJSONParsing:Ot.transitional(Ot.boolean,"1.0.0"),forcedJSONParsing:Ot.transitional(Ot.boolean,"1.0.0"),clarifyTimeoutError:Ot.transitional(Ot.boolean,"1.0.0")},!1);var n=[],i=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(e)===!1||(i=i&&g.synchronous,n.unshift(g.fulfilled,g.rejected))});var o=[];this.interceptors.response.forEach(function(g){o.push(g.fulfilled,g.rejected)});var s;if(!i){var a=[gc,void 0];for(Array.prototype.unshift.apply(a,n),a=a.concat(o),s=Promise.resolve(e);a.length;)s=s.then(a.shift(),a.shift());return s}for(var c=e;n.length;){var f=n.shift(),u=n.shift();try{c=f(c)}catch(p){u(p);break}}try{s=gc(c)}catch(p){return Promise.reject(p)}for(;o.length;)s=s.then(o.shift(),o.shift());return s};nr.prototype.getUri=function(e){return e=zr(this.defaults,e),y0(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};yc.forEach(["delete","get","head","options"],function(e){nr.prototype[e]=function(r,n){return this.request(zr(n||{},{method:e,url:r,data:(n||{}).data}))}});yc.forEach(["post","put","patch"],function(e){nr.prototype[e]=function(r,n,i){return this.request(zr(i||{},{method:e,url:r,data:n}))}});bc.exports=nr});var qi=y(($b,wc)=>{"use strict";function Ti(t){this.message=t}Ti.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};Ti.prototype.__CANCEL__=!0;wc.exports=Ti});var Sc=y((Lb,xc)=>{"use strict";var v0=qi();function Jr(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(i){e=i});var r=this;t(function(i){r.reason||(r.reason=new v0(i),e(r.reason))})}Jr.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};Jr.source=function(){var e,r=new Jr(function(i){e=i});return{token:r,cancel:e}};xc.exports=Jr});var Pc=y((Bb,Ec)=>{"use strict";Ec.exports=function(e){return function(n){return e.apply(null,n)}}});var Dc=y((Ub,Cc)=>{"use strict";Cc.exports=function(e){return typeof e=="object"&&e.isAxiosError===!0}});var Ic=y((Gb,Ni)=>{"use strict";var Oc=he(),b0=ci(),Vr=_c(),_0=ki(),w0=Wr();function Ac(t){var e=new Vr(t),r=b0(Vr.prototype.request,e);return Oc.extend(r,Vr.prototype,e),Oc.extend(r,e),r}var qe=Ac(w0);qe.Axios=Vr;qe.create=function(e){return Ac(_0(qe.defaults,e))};qe.Cancel=qi();qe.CancelToken=Sc();qe.isCancel=Ii();qe.all=function(e){return Promise.all(e)};qe.spread=Pc();qe.isAxiosError=Dc();Ni.exports=qe;Ni.exports.default=qe});var ji=y((Xb,Rc)=>{Rc.exports=Ic()});var kc=y((Hb,Fc)=>{"use strict";var x0=/[|\\{}()[\]^$+*?.]/g;Fc.exports=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(x0,"\\$&")}});var Tc=y((Wb,Mc)=>{"use strict";Mc.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var $i=y((zb,$c)=>{var ht=Tc(),jc={};for(Kr in ht)ht.hasOwnProperty(Kr)&&(jc[ht[Kr]]=Kr);var Kr,D=$c.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(pe in D)if(D.hasOwnProperty(pe)){if(!("channels"in D[pe]))throw new Error("missing channels property: "+pe);if(!("labels"in D[pe]))throw new Error("missing channel labels property: "+pe);if(D[pe].labels.length!==D[pe].channels)throw new Error("channel and label counts mismatch: "+pe);qc=D[pe].channels,Nc=D[pe].labels,delete D[pe].channels,delete D[pe].labels,Object.defineProperty(D[pe],"channels",{value:qc}),Object.defineProperty(D[pe],"labels",{value:Nc})}var qc,Nc,pe;D.rgb.hsl=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),o=Math.max(e,r,n),s=o-i,a,c,f;return o===i?a=0:e===o?a=(r-n)/s:r===o?a=2+(n-e)/s:n===o&&(a=4+(e-r)/s),a=Math.min(a*60,360),a<0&&(a+=360),f=(i+o)/2,o===i?c=0:f<=.5?c=s/(o+i):c=s/(2-o-i),[a,c*100,f*100]};D.rgb.hsv=function(t){var e,r,n,i,o,s=t[0]/255,a=t[1]/255,c=t[2]/255,f=Math.max(s,a,c),u=f-Math.min(s,a,c),p=function(g){return(f-g)/6/u+1/2};return u===0?i=o=0:(o=u/f,e=p(s),r=p(a),n=p(c),s===f?i=n-r:a===f?i=1/3+e-n:c===f&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,f*100]};D.rgb.hwb=function(t){var e=t[0],r=t[1],n=t[2],i=D.rgb.hsl(t)[0],o=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,o*100,n*100]};D.rgb.cmyk=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i,o,s,a;return a=Math.min(1-e,1-r,1-n),i=(1-e-a)/(1-a)||0,o=(1-r-a)/(1-a)||0,s=(1-n-a)/(1-a)||0,[i*100,o*100,s*100,a*100]};function S0(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}D.rgb.keyword=function(t){var e=jc[t];if(e)return e;var r=1/0,n;for(var i in ht)if(ht.hasOwnProperty(i)){var o=ht[i],s=S0(t,o);s<r&&(r=s,n=i)}return n};D.keyword.rgb=function(t){return ht[t]};D.rgb.xyz=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;var i=e*.4124+r*.3576+n*.1805,o=e*.2126+r*.7152+n*.0722,s=e*.0193+r*.1192+n*.9505;return[i*100,o*100,s*100]};D.rgb.lab=function(t){var e=D.rgb.xyz(t),r=e[0],n=e[1],i=e[2],o,s,a;return r/=95.047,n/=100,i/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,o=116*n-16,s=500*(r-n),a=200*(n-i),[o,s,a]};D.hsl.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i,o,s,a,c;if(r===0)return c=n*255,[c,c,c];n<.5?o=n*(1+r):o=n+r-n*r,i=2*n-o,a=[0,0,0];for(var f=0;f<3;f++)s=e+1/3*-(f-1),s<0&&s++,s>1&&s--,6*s<1?c=i+(o-i)*6*s:2*s<1?c=o:3*s<2?c=i+(o-i)*(2/3-s)*6:c=i,a[f]=c*255;return a};D.hsl.hsv=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=r,o=Math.max(n,.01),s,a;return n*=2,r*=n<=1?n:2-n,i*=o<=1?o:2-o,a=(n+r)/2,s=n===0?2*i/(o+i):2*r/(n+r),[e,s*100,a*100]};D.hsv.rgb=function(t){var e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,o=e-Math.floor(e),s=255*n*(1-r),a=255*n*(1-r*o),c=255*n*(1-r*(1-o));switch(n*=255,i){case 0:return[n,c,s];case 1:return[a,n,s];case 2:return[s,n,c];case 3:return[s,a,n];case 4:return[c,s,n];case 5:return[n,s,a]}};D.hsv.hsl=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),o,s,a;return a=(2-r)*n,o=(2-r)*i,s=r*i,s/=o<=1?o:2-o,s=s||0,a/=2,[e,s*100,a*100]};D.hwb.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,o,s,a,c;i>1&&(r/=i,n/=i),o=Math.floor(6*e),s=1-n,a=6*e-o,o&1&&(a=1-a),c=r+a*(s-r);var f,u,p;switch(o){default:case 6:case 0:f=s,u=c,p=r;break;case 1:f=c,u=s,p=r;break;case 2:f=r,u=s,p=c;break;case 3:f=r,u=c,p=s;break;case 4:f=c,u=r,p=s;break;case 5:f=s,u=r,p=c;break}return[f*255,u*255,p*255]};D.cmyk.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,o,s,a;return o=1-Math.min(1,e*(1-i)+i),s=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i),[o*255,s*255,a*255]};D.xyz.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,i,o,s;return i=e*3.2406+r*-1.5372+n*-.4986,o=e*-.9689+r*1.8758+n*.0415,s=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[i*255,o*255,s*255]};D.xyz.lab=function(t){var e=t[0],r=t[1],n=t[2],i,o,s;return e/=95.047,r/=100,n/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=116*r-16,o=500*(e-r),s=200*(r-n),[i,o,s]};D.lab.xyz=function(t){var e=t[0],r=t[1],n=t[2],i,o,s;o=(e+16)/116,i=r/500+o,s=o-n/200;var a=Math.pow(o,3),c=Math.pow(i,3),f=Math.pow(s,3);return o=a>.008856?a:(o-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,s=f>.008856?f:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]};D.lab.lch=function(t){var e=t[0],r=t[1],n=t[2],i,o,s;return i=Math.atan2(n,r),o=i*360/2/Math.PI,o<0&&(o+=360),s=Math.sqrt(r*r+n*n),[e,s,o]};D.lch.lab=function(t){var e=t[0],r=t[1],n=t[2],i,o,s;return s=n/360*2*Math.PI,i=r*Math.cos(s),o=r*Math.sin(s),[e,i,o]};D.rgb.ansi16=function(t){var e=t[0],r=t[1],n=t[2],i=1 in arguments?arguments[1]:D.rgb.hsv(t)[2];if(i=Math.round(i/50),i===0)return 30;var o=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return i===2&&(o+=60),o};D.hsv.ansi16=function(t){return D.rgb.ansi16(D.hsv.rgb(t),t[2])};D.rgb.ansi256=function(t){var e=t[0],r=t[1],n=t[2];if(e===r&&r===n)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var i=16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5);return i};D.ansi16.rgb=function(t){var e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var r=(~~(t>50)+1)*.5,n=(e&1)*r*255,i=(e>>1&1)*r*255,o=(e>>2&1)*r*255;return[n,i,o]};D.ansi256.rgb=function(t){if(t>=232){var e=(t-232)*10+8;return[e,e,e]}t-=16;var r,n=Math.floor(t/36)/5*255,i=Math.floor((r=t%36)/6)/5*255,o=r%6/5*255;return[n,i,o]};D.rgb.hex=function(t){var e=((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255),r=e.toString(16).toUpperCase();return"000000".substring(r.length)+r};D.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var r=e[0];e[0].length===3&&(r=r.split("").map(function(a){return a+a}).join(""));var n=parseInt(r,16),i=n>>16&255,o=n>>8&255,s=n&255;return[i,o,s]};D.rgb.hcg=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.max(Math.max(e,r),n),o=Math.min(Math.min(e,r),n),s=i-o,a,c;return s<1?a=o/(1-s):a=0,s<=0?c=0:i===e?c=(r-n)/s%6:i===r?c=2+(n-e)/s:c=4+(e-r)/s+4,c/=6,c%=1,[c*360,s*100,a*100]};D.hsl.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=1,i=0;return r<.5?n=2*e*r:n=2*e*(1-r),n<1&&(i=(r-.5*n)/(1-n)),[t[0],n*100,i*100]};D.hsv.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=e*r,i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],n*100,i*100]};D.hcg.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100;if(r===0)return[n*255,n*255,n*255];var i=[0,0,0],o=e%1*6,s=o%1,a=1-s,c=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return c=(1-r)*n,[(r*i[0]+c)*255,(r*i[1]+c)*255,(r*i[2]+c)*255]};D.hcg.hsv=function(t){var e=t[1]/100,r=t[2]/100,n=e+r*(1-e),i=0;return n>0&&(i=e/n),[t[0],i*100,n*100]};D.hcg.hsl=function(t){var e=t[1]/100,r=t[2]/100,n=r*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],i*100,n*100]};D.hcg.hwb=function(t){var e=t[1]/100,r=t[2]/100,n=e+r*(1-e);return[t[0],(n-e)*100,(1-n)*100]};D.hwb.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=1-r,i=n-e,o=0;return i<1&&(o=(n-i)/(1-i)),[t[0],i*100,o*100]};D.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};D.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};D.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};D.gray.hsl=D.gray.hsv=function(t){return[0,0,t[0]]};D.gray.hwb=function(t){return[0,100,t[0]]};D.gray.cmyk=function(t){return[0,0,0,t[0]]};D.gray.lab=function(t){return[t[0],0,0]};D.gray.hex=function(t){var e=Math.round(t[0]/100*255)&255,r=(e<<16)+(e<<8)+e,n=r.toString(16).toUpperCase();return"000000".substring(n.length)+n};D.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]}});var Bc=y((Jb,Lc)=>{var Yr=$i();function E0(){for(var t={},e=Object.keys(Yr),r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function P0(t){var e=E0(),r=[t];for(e[t].distance=0;r.length;)for(var n=r.pop(),i=Object.keys(Yr[n]),o=i.length,s=0;s<o;s++){var a=i[s],c=e[a];c.distance===-1&&(c.distance=e[n].distance+1,c.parent=n,r.unshift(a))}return e}function C0(t,e){return function(r){return e(t(r))}}function D0(t,e){for(var r=[e[t].parent,t],n=Yr[e[t].parent][t],i=e[t].parent;e[i].parent;)r.unshift(e[i].parent),n=C0(Yr[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}Lc.exports=function(t){for(var e=P0(t),r={},n=Object.keys(e),i=n.length,o=0;o<i;o++){var s=n[o],a=e[s];a.parent!==null&&(r[s]=D0(s,e))}return r}});var Gc=y((Vb,Uc)=>{var Li=$i(),O0=Bc(),At={},A0=Object.keys(Li);function I0(t){var e=function(r){return r==null?r:(arguments.length>1&&(r=Array.prototype.slice.call(arguments)),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function R0(t){var e=function(r){if(r==null)return r;arguments.length>1&&(r=Array.prototype.slice.call(arguments));var n=t(r);if(typeof n=="object")for(var i=n.length,o=0;o<i;o++)n[o]=Math.round(n[o]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}A0.forEach(function(t){At[t]={},Object.defineProperty(At[t],"channels",{value:Li[t].channels}),Object.defineProperty(At[t],"labels",{value:Li[t].labels});var e=O0(t),r=Object.keys(e);r.forEach(function(n){var i=e[n];At[t][n]=R0(i),At[t][n].raw=I0(i)})});Uc.exports=At});var Hc=y((Kb,Xc)=>{"use strict";var It=Gc(),Qr=(t,e)=>function(){return`\x1B[${t.apply(It,arguments)+e}m`},Zr=(t,e)=>function(){let r=t.apply(It,arguments);return`\x1B[${38+e};5;${r}m`},en=(t,e)=>function(){let r=t.apply(It,arguments);return`\x1B[${38+e};2;${r[0]};${r[1]};${r[2]}m`};function F0(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.grey=e.color.gray;for(let i of Object.keys(e)){let o=e[i];for(let s of Object.keys(o)){let a=o[s];e[s]={open:`\x1B[${a[0]}m`,close:`\x1B[${a[1]}m`},o[s]=e[s],t.set(a[0],a[1])}Object.defineProperty(e,i,{value:o,enumerable:!1}),Object.defineProperty(e,"codes",{value:t,enumerable:!1})}let r=i=>i,n=(i,o,s)=>[i,o,s];e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi={ansi:Qr(r,0)},e.color.ansi256={ansi256:Zr(r,0)},e.color.ansi16m={rgb:en(n,0)},e.bgColor.ansi={ansi:Qr(r,10)},e.bgColor.ansi256={ansi256:Zr(r,10)},e.bgColor.ansi16m={rgb:en(n,10)};for(let i of Object.keys(It)){if(typeof It[i]!="object")continue;let o=It[i];i==="ansi16"&&(i="ansi"),"ansi16"in o&&(e.color.ansi[i]=Qr(o.ansi16,0),e.bgColor.ansi[i]=Qr(o.ansi16,10)),"ansi256"in o&&(e.color.ansi256[i]=Zr(o.ansi256,0),e.bgColor.ansi256[i]=Zr(o.ansi256,10)),"rgb"in o&&(e.color.ansi16m[i]=en(o.rgb,0),e.bgColor.ansi16m[i]=en(o.rgb,10))}return e}Object.defineProperty(Xc,"exports",{enumerable:!0,get:F0})});var zc=y((Yb,Wc)=>{"use strict";Wc.exports=(t,e)=>{e=e||process.argv;let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1?!0:n<i)}});var Vc=y((Qb,Jc)=>{"use strict";var k0=require("os"),Ne=zc(),le=process.env,Rt;Ne("no-color")||Ne("no-colors")||Ne("color=false")?Rt=!1:(Ne("color")||Ne("colors")||Ne("color=true")||Ne("color=always"))&&(Rt=!0);"FORCE_COLOR"in le&&(Rt=le.FORCE_COLOR.length===0||parseInt(le.FORCE_COLOR,10)!==0);function M0(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function T0(t){if(Rt===!1)return 0;if(Ne("color=16m")||Ne("color=full")||Ne("color=truecolor"))return 3;if(Ne("color=256"))return 2;if(t&&!t.isTTY&&Rt!==!0)return 0;let e=Rt?1:0;if(process.platform==="win32"){let r=k0.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in le)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in le)||le.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in le)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(le.TEAMCITY_VERSION)?1:0;if(le.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in le){let r=parseInt((le.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(le.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(le.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(le.TERM)||"COLORTERM"in le?1:(le.TERM==="dumb",e)}function Bi(t){let e=T0(t);return M0(e)}Jc.exports={supportsColor:Bi,stdout:Bi(process.stdout),stderr:Bi(process.stderr)}});var eu=y((Zb,Zc)=>{"use strict";var q0=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Kc=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,N0=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,j0=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,$0=new Map([["n",`
9
- `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Qc(t){return t[0]==="u"&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):$0.get(t)||t}function L0(t,e){let r=[],n=e.trim().split(/\s*,\s*/g),i;for(let o of n)if(!isNaN(o))r.push(Number(o));else if(i=o.match(N0))r.push(i[2].replace(j0,(s,a,c)=>a?Qc(a):c));else throw new Error(`Invalid Chalk template style argument: ${o} (in style '${t}')`);return r}function B0(t){Kc.lastIndex=0;let e=[],r;for(;(r=Kc.exec(t))!==null;){let n=r[1];if(r[2]){let i=L0(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function Yc(t,e){let r={};for(let i of e)for(let o of i.styles)r[o[0]]=i.inverse?null:o.slice(1);let n=t;for(let i of Object.keys(r))if(Array.isArray(r[i])){if(!(i in n))throw new Error(`Unknown Chalk style: ${i}`);r[i].length>0?n=n[i].apply(n,r[i]):n=n[i]}return n}Zc.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(q0,(o,s,a,c,f,u)=>{if(s)i.push(Qc(s));else if(c){let p=i.join("");i=[],n.push(r.length===0?p:Yc(t,r)(p)),r.push({inverse:a,styles:B0(c)})}else if(f){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(Yc(t,r)(i.join(""))),i=[],r.pop()}else i.push(u)}),n.push(i.join("")),r.length>0){let o=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(o)}return n.join("")}});var kt=y((e2,or)=>{"use strict";var Gi=kc(),Y=Hc(),Ui=Vc().stdout,U0=eu(),ru=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),nu=["ansi","ansi","ansi256","ansi16m"],iu=new Set(["gray"]),Ft=Object.create(null);function tu(t,e){e=e||{};let r=Ui?Ui.level:0;t.level=e.level===void 0?r:e.level,t.enabled="enabled"in e?e.enabled:t.level>0}function ir(t){if(!this||!(this instanceof ir)||this.template){let e={};return tu(e,t),e.template=function(){let r=[].slice.call(arguments);return H0.apply(null,[e.template].concat(r))},Object.setPrototypeOf(e,ir.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=ir,e.template}tu(this,t)}ru&&(Y.blue.open="\x1B[94m");for(let t of Object.keys(Y))Y[t].closeRe=new RegExp(Gi(Y[t].close),"g"),Ft[t]={get(){let e=Y[t];return tn.call(this,this._styles?this._styles.concat(e):[e],this._empty,t)}};Ft.visible={get(){return tn.call(this,this._styles||[],!0,"visible")}};Y.color.closeRe=new RegExp(Gi(Y.color.close),"g");for(let t of Object.keys(Y.color.ansi))iu.has(t)||(Ft[t]={get(){let e=this.level;return function(){let n={open:Y.color[nu[e]][t].apply(null,arguments),close:Y.color.close,closeRe:Y.color.closeRe};return tn.call(this,this._styles?this._styles.concat(n):[n],this._empty,t)}}});Y.bgColor.closeRe=new RegExp(Gi(Y.bgColor.close),"g");for(let t of Object.keys(Y.bgColor.ansi)){if(iu.has(t))continue;let e="bg"+t[0].toUpperCase()+t.slice(1);Ft[e]={get(){let r=this.level;return function(){let i={open:Y.bgColor[nu[r]][t].apply(null,arguments),close:Y.bgColor.close,closeRe:Y.bgColor.closeRe};return tn.call(this,this._styles?this._styles.concat(i):[i],this._empty,t)}}}}var G0=Object.defineProperties(()=>{},Ft);function tn(t,e,r){let n=function(){return X0.apply(n,arguments)};n._styles=t,n._empty=e;let i=this;return Object.defineProperty(n,"level",{enumerable:!0,get(){return i.level},set(o){i.level=o}}),Object.defineProperty(n,"enabled",{enumerable:!0,get(){return i.enabled},set(o){i.enabled=o}}),n.hasGrey=this.hasGrey||r==="gray"||r==="grey",n.__proto__=G0,n}function X0(){let t=arguments,e=t.length,r=String(arguments[0]);if(e===0)return"";if(e>1)for(let i=1;i<e;i++)r+=" "+t[i];if(!this.enabled||this.level<=0||!r)return this._empty?"":r;let n=Y.dim.open;ru&&this.hasGrey&&(Y.dim.open="");for(let i of this._styles.slice().reverse())r=i.open+r.replace(i.closeRe,i.open)+i.close,r=r.replace(/\r?\n/g,`${i.close}$&${i.open}`);return Y.dim.open=n,r}function H0(t,e){if(!Array.isArray(e))return[].slice.call(arguments,1).join(" ");let r=[].slice.call(arguments,2),n=[e.raw[0]];for(let i=1;i<e.length;i++)n.push(String(r[i-1]).replace(/[{}\\]/g,"\\$&")),n.push(String(e.raw[i]));return U0(t,n.join(""))}Object.defineProperties(ir.prototype,Ft);or.exports=ir();or.exports.supportsColor=Ui;or.exports.default=or.exports});var _e=y(Hi=>{"use strict";Hi.fromCallback=function(t){return Object.defineProperty(function(...e){if(typeof e[e.length-1]=="function")t.apply(this,e);else return new Promise((r,n)=>{t.call(this,...e,(i,o)=>i!=null?n(i):r(o))})},"name",{value:t.name})};Hi.fromPromise=function(t){return Object.defineProperty(function(...e){let r=e[e.length-1];if(typeof r!="function")return t.apply(this,e);t.apply(this,e.slice(0,-1)).then(n=>r(null,n),r)},"name",{value:t.name})}});var cu=y((n2,au)=>{var Qe=require("constants"),W0=process.cwd,rn=null,z0=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return rn||(rn=W0.call(process)),rn};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Wi=process.chdir,process.chdir=function(t){rn=null,Wi.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Wi));var Wi;au.exports=J0;function J0(t){Qe.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||r(t),t.chown=o(t.chown),t.fchown=o(t.fchown),t.lchown=o(t.lchown),t.chmod=n(t.chmod),t.fchmod=n(t.fchmod),t.lchmod=n(t.lchmod),t.chownSync=s(t.chownSync),t.fchownSync=s(t.fchownSync),t.lchownSync=s(t.lchownSync),t.chmodSync=i(t.chmodSync),t.fchmodSync=i(t.fchmodSync),t.lchmodSync=i(t.lchmodSync),t.stat=a(t.stat),t.fstat=a(t.fstat),t.lstat=a(t.lstat),t.statSync=c(t.statSync),t.fstatSync=c(t.fstatSync),t.lstatSync=c(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(u,p,g){g&&process.nextTick(g)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(u,p,g,m){m&&process.nextTick(m)},t.lchownSync=function(){}),z0==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(u){function p(g,m,b){var E=Date.now(),P=0;u(g,m,function k($){if($&&($.code==="EACCES"||$.code==="EPERM")&&Date.now()-E<6e4){setTimeout(function(){t.stat(m,function(G,H){G&&G.code==="ENOENT"?u(g,m,k):b($)})},P),P<100&&(P+=10);return}b&&b($)})}return Object.setPrototypeOf&&Object.setPrototypeOf(p,u),p}(t.rename)),t.read=typeof t.read!="function"?t.read:function(u){function p(g,m,b,E,P,k){var $;if(k&&typeof k=="function"){var G=0;$=function(H,J,ae){if(H&&H.code==="EAGAIN"&&G<10)return G++,u.call(t,g,m,b,E,P,$);k.apply(this,arguments)}}return u.call(t,g,m,b,E,P,$)}return Object.setPrototypeOf&&Object.setPrototypeOf(p,u),p}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(u){return function(p,g,m,b,E){for(var P=0;;)try{return u.call(t,p,g,m,b,E)}catch(k){if(k.code==="EAGAIN"&&P<10){P++;continue}throw k}}}(t.readSync);function e(u){u.lchmod=function(p,g,m){u.open(p,Qe.O_WRONLY|Qe.O_SYMLINK,g,function(b,E){if(b){m&&m(b);return}u.fchmod(E,g,function(P){u.close(E,function(k){m&&m(P||k)})})})},u.lchmodSync=function(p,g){var m=u.openSync(p,Qe.O_WRONLY|Qe.O_SYMLINK,g),b=!0,E;try{E=u.fchmodSync(m,g),b=!1}finally{if(b)try{u.closeSync(m)}catch{}else u.closeSync(m)}return E}}function r(u){Qe.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(p,g,m,b){u.open(p,Qe.O_SYMLINK,function(E,P){if(E){b&&b(E);return}u.futimes(P,g,m,function(k){u.close(P,function($){b&&b(k||$)})})})},u.lutimesSync=function(p,g,m){var b=u.openSync(p,Qe.O_SYMLINK),E,P=!0;try{E=u.futimesSync(b,g,m),P=!1}finally{if(P)try{u.closeSync(b)}catch{}else u.closeSync(b)}return E}):u.futimes&&(u.lutimes=function(p,g,m,b){b&&process.nextTick(b)},u.lutimesSync=function(){})}function n(u){return u&&function(p,g,m){return u.call(t,p,g,function(b){f(b)&&(b=null),m&&m.apply(this,arguments)})}}function i(u){return u&&function(p,g){try{return u.call(t,p,g)}catch(m){if(!f(m))throw m}}}function o(u){return u&&function(p,g,m,b){return u.call(t,p,g,m,function(E){f(E)&&(E=null),b&&b.apply(this,arguments)})}}function s(u){return u&&function(p,g,m){try{return u.call(t,p,g,m)}catch(b){if(!f(b))throw b}}}function a(u){return u&&function(p,g,m){typeof g=="function"&&(m=g,g=null);function b(E,P){P&&(P.uid<0&&(P.uid+=4294967296),P.gid<0&&(P.gid+=4294967296)),m&&m.apply(this,arguments)}return g?u.call(t,p,g,b):u.call(t,p,b)}}function c(u){return u&&function(p,g){var m=g?u.call(t,p,g):u.call(t,p);return m&&(m.uid<0&&(m.uid+=4294967296),m.gid<0&&(m.gid+=4294967296)),m}}function f(u){if(!u||u.code==="ENOSYS")return!0;var p=!process.getuid||process.getuid()!==0;return!!(p&&(u.code==="EINVAL"||u.code==="EPERM"))}}});var fu=y((i2,lu)=>{var uu=require("stream").Stream;lu.exports=V0;function V0(t){return{ReadStream:e,WriteStream:r};function e(n,i){if(!(this instanceof e))return new e(n,i);uu.call(this);var o=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var s=Object.keys(i),a=0,c=s.length;a<c;a++){var f=s[a];this[f]=i[f]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){o._read()});return}t.open(this.path,this.flags,this.mode,function(u,p){if(u){o.emit("error",u),o.readable=!1;return}o.fd=p,o.emit("open",p),o._read()})}function r(n,i){if(!(this instanceof r))return new r(n,i);uu.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var o=Object.keys(i),s=0,a=o.length;s<a;s++){var c=o[s];this[c]=i[c]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var hu=y((o2,du)=>{"use strict";du.exports=Y0;var K0=Object.getPrototypeOf||function(t){return t.__proto__};function Y0(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:K0(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}});var fe=y((s2,Vi)=>{var z=require("fs"),Q0=cu(),Z0=fu(),em=hu(),nn=require("util"),oe,sn;typeof Symbol=="function"&&typeof Symbol.for=="function"?(oe=Symbol.for("graceful-fs.queue"),sn=Symbol.for("graceful-fs.previous")):(oe="___graceful-fs.queue",sn="___graceful-fs.previous");function tm(){}function gu(t,e){Object.defineProperty(t,oe,{get:function(){return e}})}var pt=tm;nn.debuglog?pt=nn.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(pt=function(){var t=nn.format.apply(nn,arguments);t="GFS4: "+t.split(/\n/).join(`
10
- GFS4: `),console.error(t)});z[oe]||(pu=global[oe]||[],gu(z,pu),z.close=function(t){function e(r,n){return t.call(z,r,function(i){i||mu(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,sn,{value:t}),e}(z.close),z.closeSync=function(t){function e(r){t.apply(z,arguments),mu()}return Object.defineProperty(e,sn,{value:t}),e}(z.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){pt(z[oe]),require("assert").equal(z[oe].length,0)}));var pu;global[oe]||gu(global,z[oe]);Vi.exports=zi(em(z));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!z.__patched&&(Vi.exports=zi(z),z.__patched=!0);function zi(t){Q0(t),t.gracefulify=zi,t.createReadStream=J,t.createWriteStream=ae;var e=t.readFile;t.readFile=r;function r(I,x,_){return typeof x=="function"&&(_=x,x=null),R(I,x,_);function R(F,U,A,L){return e(F,U,function(M){M&&(M.code==="EMFILE"||M.code==="ENFILE")?Tt([R,[F,U,A],M,L||Date.now(),Date.now()]):typeof A=="function"&&A.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=i;function i(I,x,_,R){return typeof _=="function"&&(R=_,_=null),F(I,x,_,R);function F(U,A,L,M,C){return n(U,A,L,function(T){T&&(T.code==="EMFILE"||T.code==="ENFILE")?Tt([F,[U,A,L,M],T,C||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var o=t.appendFile;o&&(t.appendFile=s);function s(I,x,_,R){return typeof _=="function"&&(R=_,_=null),F(I,x,_,R);function F(U,A,L,M,C){return o(U,A,L,function(T){T&&(T.code==="EMFILE"||T.code==="ENFILE")?Tt([F,[U,A,L,M],T,C||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=c);function c(I,x,_,R){return typeof _=="function"&&(R=_,_=0),F(I,x,_,R);function F(U,A,L,M,C){return a(U,A,L,function(T){T&&(T.code==="EMFILE"||T.code==="ENFILE")?Tt([F,[U,A,L,M],T,C||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var f=t.readdir;t.readdir=p;var u=/^v[0-5]\./;function p(I,x,_){typeof x=="function"&&(_=x,x=null);var R=u.test(process.version)?function(A,L,M,C){return f(A,F(A,L,M,C))}:function(A,L,M,C){return f(A,L,F(A,L,M,C))};return R(I,x,_);function F(U,A,L,M){return function(C,T){C&&(C.code==="EMFILE"||C.code==="ENFILE")?Tt([R,[U,A,L],C,M||Date.now(),Date.now()]):(T&&T.sort&&T.sort(),typeof L=="function"&&L.call(this,C,T))}}}if(process.version.substr(0,4)==="v0.8"){var g=Z0(t);k=g.ReadStream,G=g.WriteStream}var m=t.ReadStream;m&&(k.prototype=Object.create(m.prototype),k.prototype.open=$);var b=t.WriteStream;b&&(G.prototype=Object.create(b.prototype),G.prototype.open=H),Object.defineProperty(t,"ReadStream",{get:function(){return k},set:function(I){k=I},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return G},set:function(I){G=I},enumerable:!0,configurable:!0});var E=k;Object.defineProperty(t,"FileReadStream",{get:function(){return E},set:function(I){E=I},enumerable:!0,configurable:!0});var P=G;Object.defineProperty(t,"FileWriteStream",{get:function(){return P},set:function(I){P=I},enumerable:!0,configurable:!0});function k(I,x){return this instanceof k?(m.apply(this,arguments),this):k.apply(Object.create(k.prototype),arguments)}function $(){var I=this;K(I.path,I.flags,I.mode,function(x,_){x?(I.autoClose&&I.destroy(),I.emit("error",x)):(I.fd=_,I.emit("open",_),I.read())})}function G(I,x){return this instanceof G?(b.apply(this,arguments),this):G.apply(Object.create(G.prototype),arguments)}function H(){var I=this;K(I.path,I.flags,I.mode,function(x,_){x?(I.destroy(),I.emit("error",x)):(I.fd=_,I.emit("open",_))})}function J(I,x){return new t.ReadStream(I,x)}function ae(I,x){return new t.WriteStream(I,x)}var ve=t.open;t.open=K;function K(I,x,_,R){return typeof _=="function"&&(R=_,_=null),F(I,x,_,R);function F(U,A,L,M,C){return ve(U,A,L,function(T,Ae){T&&(T.code==="EMFILE"||T.code==="ENFILE")?Tt([F,[U,A,L,M],T,C||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}return t}function Tt(t){pt("ENQUEUE",t[0].name,t[1]),z[oe].push(t),Ji()}var on;function mu(){for(var t=Date.now(),e=0;e<z[oe].length;++e)z[oe][e].length>2&&(z[oe][e][3]=t,z[oe][e][4]=t);Ji()}function Ji(){if(clearTimeout(on),on=void 0,z[oe].length!==0){var t=z[oe].shift(),e=t[0],r=t[1],n=t[2],i=t[3],o=t[4];if(i===void 0)pt("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-i>=6e4){pt("TIMEOUT",e.name,r);var s=r.pop();typeof s=="function"&&s.call(null,n)}else{var a=Date.now()-o,c=Math.max(o-i,1),f=Math.min(c*1.2,100);a>=f?(pt("RETRY",e.name,r),e.apply(null,r.concat([i]))):z[oe].push(t)}on===void 0&&(on=setTimeout(Ji,0))}}});var sr=y(Ze=>{"use strict";var yu=_e().fromCallback,me=fe(),rm=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(t=>typeof me[t]=="function");Object.keys(me).forEach(t=>{t!=="promises"&&(Ze[t]=me[t])});rm.forEach(t=>{Ze[t]=yu(me[t])});Ze.exists=function(t,e){return typeof e=="function"?me.exists(t,e):new Promise(r=>me.exists(t,r))};Ze.read=function(t,e,r,n,i,o){return typeof o=="function"?me.read(t,e,r,n,i,o):new Promise((s,a)=>{me.read(t,e,r,n,i,(c,f,u)=>{if(c)return a(c);s({bytesRead:f,buffer:u})})})};Ze.write=function(t,e,...r){return typeof r[r.length-1]=="function"?me.write(t,e,...r):new Promise((n,i)=>{me.write(t,e,...r,(o,s,a)=>{if(o)return i(o);n({bytesWritten:s,buffer:a})})})};typeof me.writev=="function"&&(Ze.writev=function(t,e,...r){return typeof r[r.length-1]=="function"?me.writev(t,e,...r):new Promise((n,i)=>{me.writev(t,e,...r,(o,s,a)=>{if(o)return i(o);n({bytesWritten:s,buffers:a})})})});typeof me.realpath.native=="function"&&(Ze.realpath.native=yu(me.realpath.native))});var Ki=y((c2,vu)=>{vu.exports=t=>{let e=process.versions.node.split(".").map(r=>parseInt(r,10));return t=t.split(".").map(r=>parseInt(r,10)),e[0]>t[0]||e[0]===t[0]&&(e[1]>t[1]||e[1]===t[1]&&e[2]>=t[2])}});var Su=y((u2,Yi)=>{"use strict";var qt=sr(),ze=require("path"),nm=Ki(),bu=nm("10.12.0"),_u=t=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(t.replace(ze.parse(t).root,""))){let r=new Error(`Path contains invalid characters: ${t}`);throw r.code="EINVAL",r}},wu=t=>{let e={mode:511};return typeof t=="number"&&(t={mode:t}),{...e,...t}},xu=t=>{let e=new Error(`operation not permitted, mkdir '${t}'`);return e.code="EPERM",e.errno=-4048,e.path=t,e.syscall="mkdir",e};Yi.exports.makeDir=async(t,e)=>{if(_u(t),e=wu(e),bu){let n=ze.resolve(t);return qt.mkdir(n,{mode:e.mode,recursive:!0})}let r=async n=>{try{await qt.mkdir(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(ze.dirname(n)===n)throw xu(n);if(i.message.includes("null bytes"))throw i;return await r(ze.dirname(n)),r(n)}try{if(!(await qt.stat(n)).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(ze.resolve(t))};Yi.exports.makeDirSync=(t,e)=>{if(_u(t),e=wu(e),bu){let n=ze.resolve(t);return qt.mkdirSync(n,{mode:e.mode,recursive:!0})}let r=n=>{try{qt.mkdirSync(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(ze.dirname(n)===n)throw xu(n);if(i.message.includes("null bytes"))throw i;return r(ze.dirname(n)),r(n)}try{if(!qt.statSync(n).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(ze.resolve(t))}});var je=y((l2,Eu)=>{"use strict";var im=_e().fromPromise,{makeDir:om,makeDirSync:Qi}=Su(),Zi=im(om);Eu.exports={mkdirs:Zi,mkdirsSync:Qi,mkdirp:Zi,mkdirpSync:Qi,ensureDir:Zi,ensureDirSync:Qi}});var eo=y((f2,Pu)=>{"use strict";var Nt=fe();function sm(t,e,r,n){Nt.open(t,"r+",(i,o)=>{if(i)return n(i);Nt.futimes(o,e,r,s=>{Nt.close(o,a=>{n&&n(s||a)})})})}function am(t,e,r){let n=Nt.openSync(t,"r+");return Nt.futimesSync(n,e,r),Nt.closeSync(n)}Pu.exports={utimesMillis:sm,utimesMillisSync:am}});var ar=y((d2,Au)=>{"use strict";var jt=sr(),we=require("path"),cm=require("util"),um=Ki(),an=um("10.5.0"),Cu=t=>an?jt.stat(t,{bigint:!0}):jt.stat(t),to=t=>an?jt.statSync(t,{bigint:!0}):jt.statSync(t);function lm(t,e){return Promise.all([Cu(t),Cu(e).catch(r=>{if(r.code==="ENOENT")return null;throw r})]).then(([r,n])=>({srcStat:r,destStat:n}))}function fm(t,e){let r,n=to(t);try{r=to(e)}catch(i){if(i.code==="ENOENT")return{srcStat:n,destStat:null};throw i}return{srcStat:n,destStat:r}}function dm(t,e,r,n){cm.callbackify(lm)(t,e,(i,o)=>{if(i)return n(i);let{srcStat:s,destStat:a}=o;return a&&cn(s,a)?n(new Error("Source and destination must not be the same.")):s.isDirectory()&&ro(t,e)?n(new Error(un(t,e,r))):n(null,{srcStat:s,destStat:a})})}function hm(t,e,r){let{srcStat:n,destStat:i}=fm(t,e);if(i&&cn(n,i))throw new Error("Source and destination must not be the same.");if(n.isDirectory()&&ro(t,e))throw new Error(un(t,e,r));return{srcStat:n,destStat:i}}function Du(t,e,r,n,i){let o=we.resolve(we.dirname(t)),s=we.resolve(we.dirname(r));if(s===o||s===we.parse(s).root)return i();let a=(c,f)=>c?c.code==="ENOENT"?i():i(c):cn(e,f)?i(new Error(un(t,r,n))):Du(t,e,s,n,i);an?jt.stat(s,{bigint:!0},a):jt.stat(s,a)}function Ou(t,e,r,n){let i=we.resolve(we.dirname(t)),o=we.resolve(we.dirname(r));if(o===i||o===we.parse(o).root)return;let s;try{s=to(o)}catch(a){if(a.code==="ENOENT")return;throw a}if(cn(e,s))throw new Error(un(t,r,n));return Ou(t,e,o,n)}function cn(t,e){return!!(e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev&&(an||e.ino<Number.MAX_SAFE_INTEGER||e.size===t.size&&e.mode===t.mode&&e.nlink===t.nlink&&e.atimeMs===t.atimeMs&&e.mtimeMs===t.mtimeMs&&e.ctimeMs===t.ctimeMs&&e.birthtimeMs===t.birthtimeMs))}function ro(t,e){let r=we.resolve(t).split(we.sep).filter(i=>i),n=we.resolve(e).split(we.sep).filter(i=>i);return r.reduce((i,o,s)=>i&&n[s]===o,!0)}function un(t,e,r){return`Cannot ${r} '${t}' to a subdirectory of itself, '${e}'.`}Au.exports={checkPaths:dm,checkPathsSync:hm,checkParentPaths:Du,checkParentPathsSync:Ou,isSrcSubdir:ro}});var Mu=y((h2,ku)=>{"use strict";var de=fe(),cr=require("path"),pm=je().mkdirsSync,mm=eo().utimesMillisSync,ur=ar();function gm(t,e,r){typeof r=="function"&&(r={filter:r}),r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
6
+ `+o),t.push(i+"m+"+Xr.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=jp()+e+" "+t[0]}function jp(){return ne.inspectOpts.hideDate?"":new Date().toISOString()+" "}function $p(...t){return process.stderr.write(Ur.format(...t)+`
7
+ `)}function Lp(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function Bp(){return process.env.DEBUG}function Up(t){t.inspectOpts={};let e=Object.keys(ne.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=ne.inspectOpts[e[r]]}Xr.exports=vi()(ne);var{formatters:ja}=Xr.exports;ja.o=function(t){return this.inspectOpts.colors=this.useColors,Ur.inspect(t,this.inspectOpts).split(`
8
+ `).map(e=>e.trim()).join(" ")};ja.O=function(t){return this.inspectOpts.colors=this.useColors,Ur.inspect(t,this.inspectOpts)}});var La=y((Fb,xi)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?xi.exports=ka():xi.exports=$a()});var Ua=y((kb,Ba)=>{var Yt;Ba.exports=function(){if(!Yt){try{Yt=La()("follow-redirects")}catch{}typeof Yt!="function"&&(Yt=function(){})}Yt.apply(null,arguments)}});var Oi=y((Tb,Di)=>{var ft=require("url"),Si=ft.URL,Xp=require("http"),Hp=require("https"),Ga=require("stream").Writable,Wa=require("assert"),za=Ua(),Ci=["abort","aborted","connect","error","socket","timeout"],Pi=Object.create(null);Ci.forEach(function(t){Pi[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}});var Gp=Zt("ERR_INVALID_URL","Invalid URL",TypeError),Xa=Zt("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Wp=Zt("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),zp=Zt("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Jp=Zt("ERR_STREAM_WRITE_AFTER_END","write after end");function De(t,e){Ga.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var r=this;this._onNativeResponse=function(n){r._processResponse(n)},this._performRequest()}De.prototype=Object.create(Ga.prototype);De.prototype.abort=function(){Va(this._currentRequest),this.emit("abort")};De.prototype.write=function(t,e,r){if(this._ending)throw new Jp;if(!dt(t)&&!Yp(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Qt(e)&&(r=e,e=null),t.length===0){r&&r();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,r)):(this.emit("error",new zp),this.abort())};De.prototype.end=function(t,e,r){if(Qt(t)?(r=t,t=e=null):Qt(e)&&(r=e,e=null),!t)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,i=this._currentRequest;this.write(t,e,function(){n._ended=!0,i.end(null,null,r)}),this._ending=!0}};De.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};De.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};De.prototype.setTimeout=function(t,e){var r=this;function n(s){s.setTimeout(t),s.removeListener("timeout",s.destroy),s.addListener("timeout",s.destroy)}function i(s){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),o()},t),n(s)}function o(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",o),r.removeListener("error",o),r.removeListener("response",o),e&&r.removeListener("timeout",e),r.socket||r._currentRequest.removeListener("socket",i)}return e&&this.on("timeout",e),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",n),this.on("abort",o),this.on("error",o),this.on("response",o),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){De.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(De.prototype,t,{get:function(){return this._currentRequest[t]}})});De.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e))}};De.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e){this.emit("error",new TypeError("Unsupported protocol "+t));return}if(this._options.agents){var r=t.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=e.request(this._options,this._onNativeResponse);n._redirectable=this;for(var i of Ci)n.on(i,Pi[i]);if(this._currentUrl=/^\//.test(this._options.path)?ft.format(this._options):this._options.path,this._isRedirect){var o=0,s=this,a=this._requestBodyBuffers;(function c(h){if(n===s._currentRequest)if(h)s.emit("error",h);else if(o<a.length){var u=a[o++];n.finished||n.write(u.data,u.encoding,c)}else s._ended&&n.end()})()}};De.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var r=t.headers.location;if(!r||this._options.followRedirects===!1||e<300||e>=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if(Va(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects){this.emit("error",new Wp);return}var n,i=this._options.beforeRedirect;i&&(n=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var o=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Ei(/^content-/i,this._options.headers));var s=Ei(/^host$/i,this._options.headers),a=ft.parse(this._currentUrl),c=s||a.host,h=/^\w+:/.test(r)?this._currentUrl:ft.format(Object.assign(a,{host:c})),u;try{u=ft.resolve(h,r)}catch(b){this.emit("error",new Xa({cause:b}));return}za("redirecting to",u),this._isRedirect=!0;var p=ft.parse(u);if(Object.assign(this._options,p),(p.protocol!==a.protocol&&p.protocol!=="https:"||p.host!==c&&!Kp(p.host,c))&&Ei(/^(?:authorization|cookie)$/i,this._options.headers),Qt(i)){var g={headers:t.headers,statusCode:e},m={url:h,method:o,headers:n};try{i(this._options,g,m)}catch(b){this.emit("error",b);return}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(b){this.emit("error",new Xa({cause:b}))}};function Ja(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(n){var i=n+":",o=r[i]=t[n],s=e[n]=Object.create(o);function a(h,u,p){if(dt(h)){var g;try{g=Ha(new Si(h))}catch{g=ft.parse(h)}if(!dt(g.protocol))throw new Gp({input:h});h=g}else Si&&h instanceof Si?h=Ha(h):(p=u,u=h,h={protocol:i});return Qt(u)&&(p=u,u=null),u=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},h,u),u.nativeProtocols=r,!dt(u.host)&&!dt(u.hostname)&&(u.hostname="::1"),Wa.equal(u.protocol,i,"protocol mismatch"),za("options",u),new De(u,p)}function c(h,u,p){var g=s.request(h,u,p);return g.end(),g}Object.defineProperties(s,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function Vp(){}function Ha(t){var e={protocol:t.protocol,hostname:t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,hash:t.hash,search:t.search,pathname:t.pathname,path:t.pathname+t.search,href:t.href};return t.port!==""&&(e.port=Number(t.port)),e}function Ei(t,e){var r;for(var n in e)t.test(n)&&(r=e[n],delete e[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function Zt(t,e,r){function n(i){Error.captureStackTrace(this,this.constructor),Object.assign(this,i||{}),this.code=t,this.message=this.cause?e+": "+this.cause.message:e}return n.prototype=new(r||Error),n.prototype.constructor=n,n.prototype.name="Error ["+t+"]",n}function Va(t){for(var e of Ci)t.removeListener(e,Pi[e]);t.on("error",Vp),t.abort()}function Kp(t,e){Wa(dt(t)&&dt(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function dt(t){return typeof t=="string"||t instanceof String}function Qt(t){return typeof t=="function"}function Yp(t){return typeof t=="object"&&"length"in t}Di.exports=Ja({http:Xp,https:Hp});Di.exports.wrap=Ja});var Ai=y((Mb,Qp)=>{Qp.exports={name:"axios",version:"0.21.4",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://axios-http.com",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},jsdelivr:"dist/axios.min.js",unpkg:"dist/axios.min.js",typings:"./index.d.ts",dependencies:{"follow-redirects":"^1.14.0"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]}});var tc=y((qb,ec)=>{"use strict";var er=he(),Ka=pi(),Zp=mi(),e0=Tr(),t0=require("http"),r0=require("https"),n0=Oi().http,i0=Oi().https,Ya=require("url"),o0=require("zlib"),s0=Ai(),Hr=Nr(),Ii=qr(),Qa=/https:?/;function Za(t,e,r){if(t.hostname=e.host,t.host=e.host,t.port=e.port,t.path=r,e.auth){var n=Buffer.from(e.auth.username+":"+e.auth.password,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+n}t.beforeRedirect=function(o){o.headers.host=o.host,Za(o,e,o.href)}}ec.exports=function(e){return new Promise(function(n,i){var o=function(P){n(P)},s=function(P){i(P)},a=e.data,c=e.headers;if("User-Agent"in c||"user-agent"in c?!c["User-Agent"]&&!c["user-agent"]&&(delete c["User-Agent"],delete c["user-agent"]):c["User-Agent"]="axios/"+s0.version,a&&!er.isStream(a)){if(!Buffer.isBuffer(a))if(er.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(er.isString(a))a=Buffer.from(a,"utf-8");else return s(Hr("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));c["Content-Length"]=a.length}var h=void 0;if(e.auth){var u=e.auth.username||"",p=e.auth.password||"";h=u+":"+p}var g=Zp(e.baseURL,e.url),m=Ya.parse(g),b=m.protocol||"http:";if(!h&&m.auth){var E=m.auth.split(":"),C=E[0]||"",k=E[1]||"";h=C+":"+k}h&&delete c.Authorization;var $=Qa.test(b),X=$?e.httpsAgent:e.httpAgent,G={path:e0(m.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:c,agent:X,agents:{http:e.httpAgent,https:e.httpsAgent},auth:h};e.socketPath?G.socketPath=e.socketPath:(G.hostname=m.hostname,G.port=m.port);var J=e.proxy;if(!J&&J!==!1){var ae=b.slice(0,-1)+"_proxy",ve=process.env[ae]||process.env[ae.toUpperCase()];if(ve){var K=Ya.parse(ve),I=process.env.no_proxy||process.env.NO_PROXY,x=!0;if(I){var w=I.split(",").map(function(P){return P.trim()});x=!w.some(function(P){return P?P==="*"||P[0]==="."&&m.hostname.substr(m.hostname.length-P.length)===P?!0:m.hostname===P:!1})}if(x&&(J={host:K.hostname,port:K.port,protocol:K.protocol},K.auth)){var R=K.auth.split(":");J.auth={username:R[0],password:R[1]}}}}J&&(G.headers.host=m.hostname+(m.port?":"+m.port:""),Za(G,J,b+"//"+m.hostname+(m.port?":"+m.port:"")+G.path));var F,U=$&&(J?Qa.test(J.protocol):!0);e.transport?F=e.transport:e.maxRedirects===0?F=U?r0:t0:(e.maxRedirects&&(G.maxRedirects=e.maxRedirects),F=U?i0:n0),e.maxBodyLength>-1&&(G.maxBodyLength=e.maxBodyLength);var A=F.request(G,function(P){if(!A.aborted){var M=P,Ae=P.req||A;if(P.statusCode!==204&&Ae.method!=="HEAD"&&e.decompress!==!1)switch(P.headers["content-encoding"]){case"gzip":case"compress":case"deflate":M=M.pipe(o0.createUnzip()),delete P.headers["content-encoding"];break}var Te={status:P.statusCode,statusText:P.statusMessage,headers:P.headers,config:e,request:Ae};if(e.responseType==="stream")Te.data=M,Ka(o,s,Te);else{var ce=[],be=0;M.on("data",function(re){ce.push(re),be+=re.length,e.maxContentLength>-1&&be>e.maxContentLength&&(M.destroy(),s(Hr("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,Ae)))}),M.on("error",function(re){A.aborted||s(Ii(re,e,null,Ae))}),M.on("end",function(){var re=Buffer.concat(ce);e.responseType!=="arraybuffer"&&(re=re.toString(e.responseEncoding),(!e.responseEncoding||e.responseEncoding==="utf8")&&(re=er.stripBOM(re))),Te.data=re,Ka(o,s,Te)})}}});if(A.on("error",function(P){A.aborted&&P.code!=="ERR_FR_TOO_MANY_REDIRECTS"||s(Ii(P,e,null,A))}),e.timeout){var L=parseInt(e.timeout,10);if(isNaN(L)){s(Hr("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",A));return}A.setTimeout(L,function(){A.abort(),s(Hr("timeout of "+L+"ms exceeded",e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",A))})}e.cancelToken&&e.cancelToken.promise.then(function(P){A.aborted||(A.abort(),s(P))}),er.isStream(a)?a.on("error",function(P){s(Ii(P,e,null,A))}).pipe(A):A.end(a)})}});var Wr=y((Nb,ic)=>{"use strict";var ie=he(),rc=da(),a0=qr(),c0={"Content-Type":"application/x-www-form-urlencoded"};function nc(t,e){!ie.isUndefined(t)&&ie.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function u0(){var t;return typeof XMLHttpRequest<"u"?t=Aa():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(t=tc()),t}function l0(t,e,r){if(ie.isString(t))try{return(e||JSON.parse)(t),ie.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var Gr={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:u0(),transformRequest:[function(e,r){return rc(r,"Accept"),rc(r,"Content-Type"),ie.isFormData(e)||ie.isArrayBuffer(e)||ie.isBuffer(e)||ie.isStream(e)||ie.isFile(e)||ie.isBlob(e)?e:ie.isArrayBufferView(e)?e.buffer:ie.isURLSearchParams(e)?(nc(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):ie.isObject(e)||r&&r["Content-Type"]==="application/json"?(nc(r,"application/json"),l0(e)):e}],transformResponse:[function(e){var r=this.transitional,n=r&&r.silentJSONParsing,i=r&&r.forcedJSONParsing,o=!n&&this.responseType==="json";if(o||i&&ie.isString(e)&&e.length)try{return JSON.parse(e)}catch(s){if(o)throw s.name==="SyntaxError"?a0(s,this,"E_JSON_PARSE"):s}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};Gr.headers={common:{Accept:"application/json, text/plain, */*"}};ie.forEach(["delete","get","head"],function(e){Gr.headers[e]={}});ie.forEach(["post","put","patch"],function(e){Gr.headers[e]=ie.merge(c0)});ic.exports=Gr});var sc=y((jb,oc)=>{"use strict";var f0=he(),d0=Wr();oc.exports=function(e,r,n){var i=this||d0;return f0.forEach(n,function(s){e=s.call(i,e,r)}),e}});var Ri=y(($b,ac)=>{"use strict";ac.exports=function(e){return!!(e&&e.__CANCEL__)}});var lc=y((Lb,uc)=>{"use strict";var cc=he(),Fi=sc(),h0=Ri(),p0=Wr();function ki(t){t.cancelToken&&t.cancelToken.throwIfRequested()}uc.exports=function(e){ki(e),e.headers=e.headers||{},e.data=Fi.call(e,e.data,e.headers,e.transformRequest),e.headers=cc.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),cc.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var r=e.adapter||p0.adapter;return r(e).then(function(i){return ki(e),i.data=Fi.call(e,i.data,i.headers,e.transformResponse),i},function(i){return h0(i)||(ki(e),i&&i.response&&(i.response.data=Fi.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})}});var Ti=y((Bb,fc)=>{"use strict";var ue=he();fc.exports=function(e,r){r=r||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function c(g,m){return ue.isPlainObject(g)&&ue.isPlainObject(m)?ue.merge(g,m):ue.isPlainObject(m)?ue.merge({},m):ue.isArray(m)?m.slice():m}function h(g){ue.isUndefined(r[g])?ue.isUndefined(e[g])||(n[g]=c(void 0,e[g])):n[g]=c(e[g],r[g])}ue.forEach(i,function(m){ue.isUndefined(r[m])||(n[m]=c(void 0,r[m]))}),ue.forEach(o,h),ue.forEach(s,function(m){ue.isUndefined(r[m])?ue.isUndefined(e[m])||(n[m]=c(void 0,e[m])):n[m]=c(void 0,r[m])}),ue.forEach(a,function(m){m in r?n[m]=c(e[m],r[m]):m in e&&(n[m]=c(void 0,e[m]))});var u=i.concat(o).concat(s).concat(a),p=Object.keys(e).concat(Object.keys(r)).filter(function(m){return u.indexOf(m)===-1});return ue.forEach(p,h),n}});var gc=y((Ub,mc)=>{"use strict";var hc=Ai(),Mi={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Mi[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var dc={},m0=hc.version.split(".");function pc(t,e){for(var r=e?e.split("."):m0,n=t.split("."),i=0;i<3;i++){if(r[i]>n[i])return!0;if(r[i]<n[i])return!1}return!1}Mi.transitional=function(e,r,n){var i=r&&pc(r);function o(s,a){return"[Axios v"+hc.version+"] Transitional option '"+s+"'"+a+(n?". "+n:"")}return function(s,a,c){if(e===!1)throw new Error(o(a," has been removed in "+r));return i&&!dc[a]&&(dc[a]=!0,console.warn(o(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,a,c):!0}};function g0(t,e,r){if(typeof t!="object")throw new TypeError("options must be an object");for(var n=Object.keys(t),i=n.length;i-- >0;){var o=n[i],s=e[o];if(s){var a=t[o],c=a===void 0||s(a,o,t);if(c!==!0)throw new TypeError("option "+o+" must be "+c);continue}if(r!==!0)throw Error("Unknown option "+o)}}mc.exports={isOlderVersion:pc,assertOptions:g0,validators:Mi}});var xc=y((Xb,_c)=>{"use strict";var bc=he(),y0=Tr(),yc=la(),vc=lc(),zr=Ti(),wc=gc(),Dt=wc.validators;function tr(t){this.defaults=t,this.interceptors={request:new yc,response:new yc}}tr.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=zr(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var r=e.transitional;r!==void 0&&wc.assertOptions(r,{silentJSONParsing:Dt.transitional(Dt.boolean,"1.0.0"),forcedJSONParsing:Dt.transitional(Dt.boolean,"1.0.0"),clarifyTimeoutError:Dt.transitional(Dt.boolean,"1.0.0")},!1);var n=[],i=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(e)===!1||(i=i&&g.synchronous,n.unshift(g.fulfilled,g.rejected))});var o=[];this.interceptors.response.forEach(function(g){o.push(g.fulfilled,g.rejected)});var s;if(!i){var a=[vc,void 0];for(Array.prototype.unshift.apply(a,n),a=a.concat(o),s=Promise.resolve(e);a.length;)s=s.then(a.shift(),a.shift());return s}for(var c=e;n.length;){var h=n.shift(),u=n.shift();try{c=h(c)}catch(p){u(p);break}}try{s=vc(c)}catch(p){return Promise.reject(p)}for(;o.length;)s=s.then(o.shift(),o.shift());return s};tr.prototype.getUri=function(e){return e=zr(this.defaults,e),y0(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};bc.forEach(["delete","get","head","options"],function(e){tr.prototype[e]=function(r,n){return this.request(zr(n||{},{method:e,url:r,data:(n||{}).data}))}});bc.forEach(["post","put","patch"],function(e){tr.prototype[e]=function(r,n,i){return this.request(zr(i||{},{method:e,url:r,data:n}))}});_c.exports=tr});var Ni=y((Hb,Sc)=>{"use strict";function qi(t){this.message=t}qi.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};qi.prototype.__CANCEL__=!0;Sc.exports=qi});var Cc=y((Gb,Ec)=>{"use strict";var v0=Ni();function Jr(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(i){e=i});var r=this;t(function(i){r.reason||(r.reason=new v0(i),e(r.reason))})}Jr.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};Jr.source=function(){var e,r=new Jr(function(i){e=i});return{token:r,cancel:e}};Ec.exports=Jr});var Dc=y((Wb,Pc)=>{"use strict";Pc.exports=function(e){return function(n){return e.apply(null,n)}}});var Ac=y((zb,Oc)=>{"use strict";Oc.exports=function(e){return typeof e=="object"&&e.isAxiosError===!0}});var Fc=y((Jb,ji)=>{"use strict";var Ic=he(),b0=ui(),Vr=xc(),w0=Ti(),_0=Wr();function Rc(t){var e=new Vr(t),r=b0(Vr.prototype.request,e);return Ic.extend(r,Vr.prototype,e),Ic.extend(r,e),r}var qe=Rc(_0);qe.Axios=Vr;qe.create=function(e){return Rc(w0(qe.defaults,e))};qe.Cancel=Ni();qe.CancelToken=Cc();qe.isCancel=Ri();qe.all=function(e){return Promise.all(e)};qe.spread=Dc();qe.isAxiosError=Ac();ji.exports=qe;ji.exports.default=qe});var $i=y((Vb,kc)=>{kc.exports=Fc()});var Mc=y((Kb,Tc)=>{"use strict";var x0=/[|\\{}()[\]^$+*?.]/g;Tc.exports=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(x0,"\\$&")}});var Nc=y((Yb,qc)=>{"use strict";qc.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Li=y((Qb,Bc)=>{var ht=Nc(),Lc={};for(Kr in ht)ht.hasOwnProperty(Kr)&&(Lc[ht[Kr]]=Kr);var Kr,D=Bc.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(pe in D)if(D.hasOwnProperty(pe)){if(!("channels"in D[pe]))throw new Error("missing channels property: "+pe);if(!("labels"in D[pe]))throw new Error("missing channel labels property: "+pe);if(D[pe].labels.length!==D[pe].channels)throw new Error("channel and label counts mismatch: "+pe);jc=D[pe].channels,$c=D[pe].labels,delete D[pe].channels,delete D[pe].labels,Object.defineProperty(D[pe],"channels",{value:jc}),Object.defineProperty(D[pe],"labels",{value:$c})}var jc,$c,pe;D.rgb.hsl=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),o=Math.max(e,r,n),s=o-i,a,c,h;return o===i?a=0:e===o?a=(r-n)/s:r===o?a=2+(n-e)/s:n===o&&(a=4+(e-r)/s),a=Math.min(a*60,360),a<0&&(a+=360),h=(i+o)/2,o===i?c=0:h<=.5?c=s/(o+i):c=s/(2-o-i),[a,c*100,h*100]};D.rgb.hsv=function(t){var e,r,n,i,o,s=t[0]/255,a=t[1]/255,c=t[2]/255,h=Math.max(s,a,c),u=h-Math.min(s,a,c),p=function(g){return(h-g)/6/u+1/2};return u===0?i=o=0:(o=u/h,e=p(s),r=p(a),n=p(c),s===h?i=n-r:a===h?i=1/3+e-n:c===h&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,h*100]};D.rgb.hwb=function(t){var e=t[0],r=t[1],n=t[2],i=D.rgb.hsl(t)[0],o=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,o*100,n*100]};D.rgb.cmyk=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i,o,s,a;return a=Math.min(1-e,1-r,1-n),i=(1-e-a)/(1-a)||0,o=(1-r-a)/(1-a)||0,s=(1-n-a)/(1-a)||0,[i*100,o*100,s*100,a*100]};function S0(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}D.rgb.keyword=function(t){var e=Lc[t];if(e)return e;var r=1/0,n;for(var i in ht)if(ht.hasOwnProperty(i)){var o=ht[i],s=S0(t,o);s<r&&(r=s,n=i)}return n};D.keyword.rgb=function(t){return ht[t]};D.rgb.xyz=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;var i=e*.4124+r*.3576+n*.1805,o=e*.2126+r*.7152+n*.0722,s=e*.0193+r*.1192+n*.9505;return[i*100,o*100,s*100]};D.rgb.lab=function(t){var e=D.rgb.xyz(t),r=e[0],n=e[1],i=e[2],o,s,a;return r/=95.047,n/=100,i/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,o=116*n-16,s=500*(r-n),a=200*(n-i),[o,s,a]};D.hsl.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i,o,s,a,c;if(r===0)return c=n*255,[c,c,c];n<.5?o=n*(1+r):o=n+r-n*r,i=2*n-o,a=[0,0,0];for(var h=0;h<3;h++)s=e+1/3*-(h-1),s<0&&s++,s>1&&s--,6*s<1?c=i+(o-i)*6*s:2*s<1?c=o:3*s<2?c=i+(o-i)*(2/3-s)*6:c=i,a[h]=c*255;return a};D.hsl.hsv=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=r,o=Math.max(n,.01),s,a;return n*=2,r*=n<=1?n:2-n,i*=o<=1?o:2-o,a=(n+r)/2,s=n===0?2*i/(o+i):2*r/(n+r),[e,s*100,a*100]};D.hsv.rgb=function(t){var e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,o=e-Math.floor(e),s=255*n*(1-r),a=255*n*(1-r*o),c=255*n*(1-r*(1-o));switch(n*=255,i){case 0:return[n,c,s];case 1:return[a,n,s];case 2:return[s,n,c];case 3:return[s,a,n];case 4:return[c,s,n];case 5:return[n,s,a]}};D.hsv.hsl=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),o,s,a;return a=(2-r)*n,o=(2-r)*i,s=r*i,s/=o<=1?o:2-o,s=s||0,a/=2,[e,s*100,a*100]};D.hwb.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,o,s,a,c;i>1&&(r/=i,n/=i),o=Math.floor(6*e),s=1-n,a=6*e-o,o&1&&(a=1-a),c=r+a*(s-r);var h,u,p;switch(o){default:case 6:case 0:h=s,u=c,p=r;break;case 1:h=c,u=s,p=r;break;case 2:h=r,u=s,p=c;break;case 3:h=r,u=c,p=s;break;case 4:h=c,u=r,p=s;break;case 5:h=s,u=r,p=c;break}return[h*255,u*255,p*255]};D.cmyk.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,o,s,a;return o=1-Math.min(1,e*(1-i)+i),s=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i),[o*255,s*255,a*255]};D.xyz.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,i,o,s;return i=e*3.2406+r*-1.5372+n*-.4986,o=e*-.9689+r*1.8758+n*.0415,s=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[i*255,o*255,s*255]};D.xyz.lab=function(t){var e=t[0],r=t[1],n=t[2],i,o,s;return e/=95.047,r/=100,n/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=116*r-16,o=500*(e-r),s=200*(r-n),[i,o,s]};D.lab.xyz=function(t){var e=t[0],r=t[1],n=t[2],i,o,s;o=(e+16)/116,i=r/500+o,s=o-n/200;var a=Math.pow(o,3),c=Math.pow(i,3),h=Math.pow(s,3);return o=a>.008856?a:(o-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,s=h>.008856?h:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]};D.lab.lch=function(t){var e=t[0],r=t[1],n=t[2],i,o,s;return i=Math.atan2(n,r),o=i*360/2/Math.PI,o<0&&(o+=360),s=Math.sqrt(r*r+n*n),[e,s,o]};D.lch.lab=function(t){var e=t[0],r=t[1],n=t[2],i,o,s;return s=n/360*2*Math.PI,i=r*Math.cos(s),o=r*Math.sin(s),[e,i,o]};D.rgb.ansi16=function(t){var e=t[0],r=t[1],n=t[2],i=1 in arguments?arguments[1]:D.rgb.hsv(t)[2];if(i=Math.round(i/50),i===0)return 30;var o=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return i===2&&(o+=60),o};D.hsv.ansi16=function(t){return D.rgb.ansi16(D.hsv.rgb(t),t[2])};D.rgb.ansi256=function(t){var e=t[0],r=t[1],n=t[2];if(e===r&&r===n)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var i=16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5);return i};D.ansi16.rgb=function(t){var e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var r=(~~(t>50)+1)*.5,n=(e&1)*r*255,i=(e>>1&1)*r*255,o=(e>>2&1)*r*255;return[n,i,o]};D.ansi256.rgb=function(t){if(t>=232){var e=(t-232)*10+8;return[e,e,e]}t-=16;var r,n=Math.floor(t/36)/5*255,i=Math.floor((r=t%36)/6)/5*255,o=r%6/5*255;return[n,i,o]};D.rgb.hex=function(t){var e=((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255),r=e.toString(16).toUpperCase();return"000000".substring(r.length)+r};D.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var r=e[0];e[0].length===3&&(r=r.split("").map(function(a){return a+a}).join(""));var n=parseInt(r,16),i=n>>16&255,o=n>>8&255,s=n&255;return[i,o,s]};D.rgb.hcg=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.max(Math.max(e,r),n),o=Math.min(Math.min(e,r),n),s=i-o,a,c;return s<1?a=o/(1-s):a=0,s<=0?c=0:i===e?c=(r-n)/s%6:i===r?c=2+(n-e)/s:c=4+(e-r)/s+4,c/=6,c%=1,[c*360,s*100,a*100]};D.hsl.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=1,i=0;return r<.5?n=2*e*r:n=2*e*(1-r),n<1&&(i=(r-.5*n)/(1-n)),[t[0],n*100,i*100]};D.hsv.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=e*r,i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],n*100,i*100]};D.hcg.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100;if(r===0)return[n*255,n*255,n*255];var i=[0,0,0],o=e%1*6,s=o%1,a=1-s,c=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return c=(1-r)*n,[(r*i[0]+c)*255,(r*i[1]+c)*255,(r*i[2]+c)*255]};D.hcg.hsv=function(t){var e=t[1]/100,r=t[2]/100,n=e+r*(1-e),i=0;return n>0&&(i=e/n),[t[0],i*100,n*100]};D.hcg.hsl=function(t){var e=t[1]/100,r=t[2]/100,n=r*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],i*100,n*100]};D.hcg.hwb=function(t){var e=t[1]/100,r=t[2]/100,n=e+r*(1-e);return[t[0],(n-e)*100,(1-n)*100]};D.hwb.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=1-r,i=n-e,o=0;return i<1&&(o=(n-i)/(1-i)),[t[0],i*100,o*100]};D.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};D.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};D.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};D.gray.hsl=D.gray.hsv=function(t){return[0,0,t[0]]};D.gray.hwb=function(t){return[0,100,t[0]]};D.gray.cmyk=function(t){return[0,0,0,t[0]]};D.gray.lab=function(t){return[t[0],0,0]};D.gray.hex=function(t){var e=Math.round(t[0]/100*255)&255,r=(e<<16)+(e<<8)+e,n=r.toString(16).toUpperCase();return"000000".substring(n.length)+n};D.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]}});var Xc=y((Zb,Uc)=>{var Yr=Li();function E0(){for(var t={},e=Object.keys(Yr),r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function C0(t){var e=E0(),r=[t];for(e[t].distance=0;r.length;)for(var n=r.pop(),i=Object.keys(Yr[n]),o=i.length,s=0;s<o;s++){var a=i[s],c=e[a];c.distance===-1&&(c.distance=e[n].distance+1,c.parent=n,r.unshift(a))}return e}function P0(t,e){return function(r){return e(t(r))}}function D0(t,e){for(var r=[e[t].parent,t],n=Yr[e[t].parent][t],i=e[t].parent;e[i].parent;)r.unshift(e[i].parent),n=P0(Yr[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}Uc.exports=function(t){for(var e=C0(t),r={},n=Object.keys(e),i=n.length,o=0;o<i;o++){var s=n[o],a=e[s];a.parent!==null&&(r[s]=D0(s,e))}return r}});var Gc=y((e2,Hc)=>{var Bi=Li(),O0=Xc(),Ot={},A0=Object.keys(Bi);function I0(t){var e=function(r){return r==null?r:(arguments.length>1&&(r=Array.prototype.slice.call(arguments)),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function R0(t){var e=function(r){if(r==null)return r;arguments.length>1&&(r=Array.prototype.slice.call(arguments));var n=t(r);if(typeof n=="object")for(var i=n.length,o=0;o<i;o++)n[o]=Math.round(n[o]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}A0.forEach(function(t){Ot[t]={},Object.defineProperty(Ot[t],"channels",{value:Bi[t].channels}),Object.defineProperty(Ot[t],"labels",{value:Bi[t].labels});var e=O0(t),r=Object.keys(e);r.forEach(function(n){var i=e[n];Ot[t][n]=R0(i),Ot[t][n].raw=I0(i)})});Hc.exports=Ot});var zc=y((t2,Wc)=>{"use strict";var At=Gc(),Qr=(t,e)=>function(){return`\x1B[${t.apply(At,arguments)+e}m`},Zr=(t,e)=>function(){let r=t.apply(At,arguments);return`\x1B[${38+e};5;${r}m`},en=(t,e)=>function(){let r=t.apply(At,arguments);return`\x1B[${38+e};2;${r[0]};${r[1]};${r[2]}m`};function F0(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.grey=e.color.gray;for(let i of Object.keys(e)){let o=e[i];for(let s of Object.keys(o)){let a=o[s];e[s]={open:`\x1B[${a[0]}m`,close:`\x1B[${a[1]}m`},o[s]=e[s],t.set(a[0],a[1])}Object.defineProperty(e,i,{value:o,enumerable:!1}),Object.defineProperty(e,"codes",{value:t,enumerable:!1})}let r=i=>i,n=(i,o,s)=>[i,o,s];e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi={ansi:Qr(r,0)},e.color.ansi256={ansi256:Zr(r,0)},e.color.ansi16m={rgb:en(n,0)},e.bgColor.ansi={ansi:Qr(r,10)},e.bgColor.ansi256={ansi256:Zr(r,10)},e.bgColor.ansi16m={rgb:en(n,10)};for(let i of Object.keys(At)){if(typeof At[i]!="object")continue;let o=At[i];i==="ansi16"&&(i="ansi"),"ansi16"in o&&(e.color.ansi[i]=Qr(o.ansi16,0),e.bgColor.ansi[i]=Qr(o.ansi16,10)),"ansi256"in o&&(e.color.ansi256[i]=Zr(o.ansi256,0),e.bgColor.ansi256[i]=Zr(o.ansi256,10)),"rgb"in o&&(e.color.ansi16m[i]=en(o.rgb,0),e.bgColor.ansi16m[i]=en(o.rgb,10))}return e}Object.defineProperty(Wc,"exports",{enumerable:!0,get:F0})});var Vc=y((r2,Jc)=>{"use strict";Jc.exports=(t,e)=>{e=e||process.argv;let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1?!0:n<i)}});var Yc=y((n2,Kc)=>{"use strict";var k0=require("os"),Ne=Vc(),le=process.env,It;Ne("no-color")||Ne("no-colors")||Ne("color=false")?It=!1:(Ne("color")||Ne("colors")||Ne("color=true")||Ne("color=always"))&&(It=!0);"FORCE_COLOR"in le&&(It=le.FORCE_COLOR.length===0||parseInt(le.FORCE_COLOR,10)!==0);function T0(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function M0(t){if(It===!1)return 0;if(Ne("color=16m")||Ne("color=full")||Ne("color=truecolor"))return 3;if(Ne("color=256"))return 2;if(t&&!t.isTTY&&It!==!0)return 0;let e=It?1:0;if(process.platform==="win32"){let r=k0.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in le)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in le)||le.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in le)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(le.TEAMCITY_VERSION)?1:0;if(le.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in le){let r=parseInt((le.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(le.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(le.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(le.TERM)||"COLORTERM"in le?1:(le.TERM==="dumb",e)}function Ui(t){let e=M0(t);return T0(e)}Kc.exports={supportsColor:Ui,stdout:Ui(process.stdout),stderr:Ui(process.stderr)}});var ru=y((i2,tu)=>{"use strict";var q0=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Qc=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,N0=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,j0=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,$0=new Map([["n",`
9
+ `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function eu(t){return t[0]==="u"&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):$0.get(t)||t}function L0(t,e){let r=[],n=e.trim().split(/\s*,\s*/g),i;for(let o of n)if(!isNaN(o))r.push(Number(o));else if(i=o.match(N0))r.push(i[2].replace(j0,(s,a,c)=>a?eu(a):c));else throw new Error(`Invalid Chalk template style argument: ${o} (in style '${t}')`);return r}function B0(t){Qc.lastIndex=0;let e=[],r;for(;(r=Qc.exec(t))!==null;){let n=r[1];if(r[2]){let i=L0(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function Zc(t,e){let r={};for(let i of e)for(let o of i.styles)r[o[0]]=i.inverse?null:o.slice(1);let n=t;for(let i of Object.keys(r))if(Array.isArray(r[i])){if(!(i in n))throw new Error(`Unknown Chalk style: ${i}`);r[i].length>0?n=n[i].apply(n,r[i]):n=n[i]}return n}tu.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(q0,(o,s,a,c,h,u)=>{if(s)i.push(eu(s));else if(c){let p=i.join("");i=[],n.push(r.length===0?p:Zc(t,r)(p)),r.push({inverse:a,styles:B0(c)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(Zc(t,r)(i.join(""))),i=[],r.pop()}else i.push(u)}),n.push(i.join("")),r.length>0){let o=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(o)}return n.join("")}});var ir=y((o2,nr)=>{"use strict";var Hi=Mc(),Y=zc(),Xi=Yc().stdout,U0=ru(),iu=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),ou=["ansi","ansi","ansi256","ansi16m"],su=new Set(["gray"]),Rt=Object.create(null);function nu(t,e){e=e||{};let r=Xi?Xi.level:0;t.level=e.level===void 0?r:e.level,t.enabled="enabled"in e?e.enabled:t.level>0}function rr(t){if(!this||!(this instanceof rr)||this.template){let e={};return nu(e,t),e.template=function(){let r=[].slice.call(arguments);return G0.apply(null,[e.template].concat(r))},Object.setPrototypeOf(e,rr.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=rr,e.template}nu(this,t)}iu&&(Y.blue.open="\x1B[94m");for(let t of Object.keys(Y))Y[t].closeRe=new RegExp(Hi(Y[t].close),"g"),Rt[t]={get(){let e=Y[t];return tn.call(this,this._styles?this._styles.concat(e):[e],this._empty,t)}};Rt.visible={get(){return tn.call(this,this._styles||[],!0,"visible")}};Y.color.closeRe=new RegExp(Hi(Y.color.close),"g");for(let t of Object.keys(Y.color.ansi))su.has(t)||(Rt[t]={get(){let e=this.level;return function(){let n={open:Y.color[ou[e]][t].apply(null,arguments),close:Y.color.close,closeRe:Y.color.closeRe};return tn.call(this,this._styles?this._styles.concat(n):[n],this._empty,t)}}});Y.bgColor.closeRe=new RegExp(Hi(Y.bgColor.close),"g");for(let t of Object.keys(Y.bgColor.ansi)){if(su.has(t))continue;let e="bg"+t[0].toUpperCase()+t.slice(1);Rt[e]={get(){let r=this.level;return function(){let i={open:Y.bgColor[ou[r]][t].apply(null,arguments),close:Y.bgColor.close,closeRe:Y.bgColor.closeRe};return tn.call(this,this._styles?this._styles.concat(i):[i],this._empty,t)}}}}var X0=Object.defineProperties(()=>{},Rt);function tn(t,e,r){let n=function(){return H0.apply(n,arguments)};n._styles=t,n._empty=e;let i=this;return Object.defineProperty(n,"level",{enumerable:!0,get(){return i.level},set(o){i.level=o}}),Object.defineProperty(n,"enabled",{enumerable:!0,get(){return i.enabled},set(o){i.enabled=o}}),n.hasGrey=this.hasGrey||r==="gray"||r==="grey",n.__proto__=X0,n}function H0(){let t=arguments,e=t.length,r=String(arguments[0]);if(e===0)return"";if(e>1)for(let i=1;i<e;i++)r+=" "+t[i];if(!this.enabled||this.level<=0||!r)return this._empty?"":r;let n=Y.dim.open;iu&&this.hasGrey&&(Y.dim.open="");for(let i of this._styles.slice().reverse())r=i.open+r.replace(i.closeRe,i.open)+i.close,r=r.replace(/\r?\n/g,`${i.close}$&${i.open}`);return Y.dim.open=n,r}function G0(t,e){if(!Array.isArray(e))return[].slice.call(arguments,1).join(" ");let r=[].slice.call(arguments,2),n=[e.raw[0]];for(let i=1;i<e.length;i++)n.push(String(r[i-1]).replace(/[{}\\]/g,"\\$&")),n.push(String(e.raw[i]));return U0(t,n.join(""))}Object.defineProperties(rr.prototype,Rt);nr.exports=rr();nr.exports.supportsColor=Xi;nr.exports.default=nr.exports});var we=y(Wi=>{"use strict";Wi.fromCallback=function(t){return Object.defineProperty(function(...e){if(typeof e[e.length-1]=="function")t.apply(this,e);else return new Promise((r,n)=>{t.call(this,...e,(i,o)=>i!=null?n(i):r(o))})},"name",{value:t.name})};Wi.fromPromise=function(t){return Object.defineProperty(function(...e){let r=e[e.length-1];if(typeof r!="function")return t.apply(this,e);t.apply(this,e.slice(0,-1)).then(n=>r(null,n),r)},"name",{value:t.name})}});var lu=y((c2,uu)=>{var Ze=require("constants"),W0=process.cwd,rn=null,z0=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return rn||(rn=W0.call(process)),rn};try{process.cwd()}catch{}typeof process.chdir=="function"&&(zi=process.chdir,process.chdir=function(t){rn=null,zi.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,zi));var zi;uu.exports=J0;function J0(t){Ze.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||r(t),t.chown=o(t.chown),t.fchown=o(t.fchown),t.lchown=o(t.lchown),t.chmod=n(t.chmod),t.fchmod=n(t.fchmod),t.lchmod=n(t.lchmod),t.chownSync=s(t.chownSync),t.fchownSync=s(t.fchownSync),t.lchownSync=s(t.lchownSync),t.chmodSync=i(t.chmodSync),t.fchmodSync=i(t.fchmodSync),t.lchmodSync=i(t.lchmodSync),t.stat=a(t.stat),t.fstat=a(t.fstat),t.lstat=a(t.lstat),t.statSync=c(t.statSync),t.fstatSync=c(t.fstatSync),t.lstatSync=c(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(u,p,g){g&&process.nextTick(g)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(u,p,g,m){m&&process.nextTick(m)},t.lchownSync=function(){}),z0==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(u){function p(g,m,b){var E=Date.now(),C=0;u(g,m,function k($){if($&&($.code==="EACCES"||$.code==="EPERM")&&Date.now()-E<6e4){setTimeout(function(){t.stat(m,function(X,G){X&&X.code==="ENOENT"?u(g,m,k):b($)})},C),C<100&&(C+=10);return}b&&b($)})}return Object.setPrototypeOf&&Object.setPrototypeOf(p,u),p}(t.rename)),t.read=typeof t.read!="function"?t.read:function(u){function p(g,m,b,E,C,k){var $;if(k&&typeof k=="function"){var X=0;$=function(G,J,ae){if(G&&G.code==="EAGAIN"&&X<10)return X++,u.call(t,g,m,b,E,C,$);k.apply(this,arguments)}}return u.call(t,g,m,b,E,C,$)}return Object.setPrototypeOf&&Object.setPrototypeOf(p,u),p}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(u){return function(p,g,m,b,E){for(var C=0;;)try{return u.call(t,p,g,m,b,E)}catch(k){if(k.code==="EAGAIN"&&C<10){C++;continue}throw k}}}(t.readSync);function e(u){u.lchmod=function(p,g,m){u.open(p,Ze.O_WRONLY|Ze.O_SYMLINK,g,function(b,E){if(b){m&&m(b);return}u.fchmod(E,g,function(C){u.close(E,function(k){m&&m(C||k)})})})},u.lchmodSync=function(p,g){var m=u.openSync(p,Ze.O_WRONLY|Ze.O_SYMLINK,g),b=!0,E;try{E=u.fchmodSync(m,g),b=!1}finally{if(b)try{u.closeSync(m)}catch{}else u.closeSync(m)}return E}}function r(u){Ze.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(p,g,m,b){u.open(p,Ze.O_SYMLINK,function(E,C){if(E){b&&b(E);return}u.futimes(C,g,m,function(k){u.close(C,function($){b&&b(k||$)})})})},u.lutimesSync=function(p,g,m){var b=u.openSync(p,Ze.O_SYMLINK),E,C=!0;try{E=u.futimesSync(b,g,m),C=!1}finally{if(C)try{u.closeSync(b)}catch{}else u.closeSync(b)}return E}):u.futimes&&(u.lutimes=function(p,g,m,b){b&&process.nextTick(b)},u.lutimesSync=function(){})}function n(u){return u&&function(p,g,m){return u.call(t,p,g,function(b){h(b)&&(b=null),m&&m.apply(this,arguments)})}}function i(u){return u&&function(p,g){try{return u.call(t,p,g)}catch(m){if(!h(m))throw m}}}function o(u){return u&&function(p,g,m,b){return u.call(t,p,g,m,function(E){h(E)&&(E=null),b&&b.apply(this,arguments)})}}function s(u){return u&&function(p,g,m){try{return u.call(t,p,g,m)}catch(b){if(!h(b))throw b}}}function a(u){return u&&function(p,g,m){typeof g=="function"&&(m=g,g=null);function b(E,C){C&&(C.uid<0&&(C.uid+=4294967296),C.gid<0&&(C.gid+=4294967296)),m&&m.apply(this,arguments)}return g?u.call(t,p,g,b):u.call(t,p,b)}}function c(u){return u&&function(p,g){var m=g?u.call(t,p,g):u.call(t,p);return m&&(m.uid<0&&(m.uid+=4294967296),m.gid<0&&(m.gid+=4294967296)),m}}function h(u){if(!u||u.code==="ENOSYS")return!0;var p=!process.getuid||process.getuid()!==0;return!!(p&&(u.code==="EINVAL"||u.code==="EPERM"))}}});var hu=y((u2,du)=>{var fu=require("stream").Stream;du.exports=V0;function V0(t){return{ReadStream:e,WriteStream:r};function e(n,i){if(!(this instanceof e))return new e(n,i);fu.call(this);var o=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var s=Object.keys(i),a=0,c=s.length;a<c;a++){var h=s[a];this[h]=i[h]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){o._read()});return}t.open(this.path,this.flags,this.mode,function(u,p){if(u){o.emit("error",u),o.readable=!1;return}o.fd=p,o.emit("open",p),o._read()})}function r(n,i){if(!(this instanceof r))return new r(n,i);fu.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var o=Object.keys(i),s=0,a=o.length;s<a;s++){var c=o[s];this[c]=i[c]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var mu=y((l2,pu)=>{"use strict";pu.exports=Y0;var K0=Object.getPrototypeOf||function(t){return t.__proto__};function Y0(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:K0(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}});var fe=y((f2,Ki)=>{var z=require("fs"),Q0=lu(),Z0=hu(),em=mu(),nn=require("util"),oe,sn;typeof Symbol=="function"&&typeof Symbol.for=="function"?(oe=Symbol.for("graceful-fs.queue"),sn=Symbol.for("graceful-fs.previous")):(oe="___graceful-fs.queue",sn="___graceful-fs.previous");function tm(){}function vu(t,e){Object.defineProperty(t,oe,{get:function(){return e}})}var pt=tm;nn.debuglog?pt=nn.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(pt=function(){var t=nn.format.apply(nn,arguments);t="GFS4: "+t.split(/\n/).join(`
10
+ GFS4: `),console.error(t)});z[oe]||(gu=global[oe]||[],vu(z,gu),z.close=function(t){function e(r,n){return t.call(z,r,function(i){i||yu(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,sn,{value:t}),e}(z.close),z.closeSync=function(t){function e(r){t.apply(z,arguments),yu()}return Object.defineProperty(e,sn,{value:t}),e}(z.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){pt(z[oe]),require("assert").equal(z[oe].length,0)}));var gu;global[oe]||vu(global,z[oe]);Ki.exports=Ji(em(z));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!z.__patched&&(Ki.exports=Ji(z),z.__patched=!0);function Ji(t){Q0(t),t.gracefulify=Ji,t.createReadStream=J,t.createWriteStream=ae;var e=t.readFile;t.readFile=r;function r(I,x,w){return typeof x=="function"&&(w=x,x=null),R(I,x,w);function R(F,U,A,L){return e(F,U,function(T){T&&(T.code==="EMFILE"||T.code==="ENFILE")?kt([R,[F,U,A],T,L||Date.now(),Date.now()]):typeof A=="function"&&A.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=i;function i(I,x,w,R){return typeof w=="function"&&(R=w,w=null),F(I,x,w,R);function F(U,A,L,T,P){return n(U,A,L,function(M){M&&(M.code==="EMFILE"||M.code==="ENFILE")?kt([F,[U,A,L,T],M,P||Date.now(),Date.now()]):typeof T=="function"&&T.apply(this,arguments)})}}var o=t.appendFile;o&&(t.appendFile=s);function s(I,x,w,R){return typeof w=="function"&&(R=w,w=null),F(I,x,w,R);function F(U,A,L,T,P){return o(U,A,L,function(M){M&&(M.code==="EMFILE"||M.code==="ENFILE")?kt([F,[U,A,L,T],M,P||Date.now(),Date.now()]):typeof T=="function"&&T.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=c);function c(I,x,w,R){return typeof w=="function"&&(R=w,w=0),F(I,x,w,R);function F(U,A,L,T,P){return a(U,A,L,function(M){M&&(M.code==="EMFILE"||M.code==="ENFILE")?kt([F,[U,A,L,T],M,P||Date.now(),Date.now()]):typeof T=="function"&&T.apply(this,arguments)})}}var h=t.readdir;t.readdir=p;var u=/^v[0-5]\./;function p(I,x,w){typeof x=="function"&&(w=x,x=null);var R=u.test(process.version)?function(A,L,T,P){return h(A,F(A,L,T,P))}:function(A,L,T,P){return h(A,L,F(A,L,T,P))};return R(I,x,w);function F(U,A,L,T){return function(P,M){P&&(P.code==="EMFILE"||P.code==="ENFILE")?kt([R,[U,A,L],P,T||Date.now(),Date.now()]):(M&&M.sort&&M.sort(),typeof L=="function"&&L.call(this,P,M))}}}if(process.version.substr(0,4)==="v0.8"){var g=Z0(t);k=g.ReadStream,X=g.WriteStream}var m=t.ReadStream;m&&(k.prototype=Object.create(m.prototype),k.prototype.open=$);var b=t.WriteStream;b&&(X.prototype=Object.create(b.prototype),X.prototype.open=G),Object.defineProperty(t,"ReadStream",{get:function(){return k},set:function(I){k=I},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return X},set:function(I){X=I},enumerable:!0,configurable:!0});var E=k;Object.defineProperty(t,"FileReadStream",{get:function(){return E},set:function(I){E=I},enumerable:!0,configurable:!0});var C=X;Object.defineProperty(t,"FileWriteStream",{get:function(){return C},set:function(I){C=I},enumerable:!0,configurable:!0});function k(I,x){return this instanceof k?(m.apply(this,arguments),this):k.apply(Object.create(k.prototype),arguments)}function $(){var I=this;K(I.path,I.flags,I.mode,function(x,w){x?(I.autoClose&&I.destroy(),I.emit("error",x)):(I.fd=w,I.emit("open",w),I.read())})}function X(I,x){return this instanceof X?(b.apply(this,arguments),this):X.apply(Object.create(X.prototype),arguments)}function G(){var I=this;K(I.path,I.flags,I.mode,function(x,w){x?(I.destroy(),I.emit("error",x)):(I.fd=w,I.emit("open",w))})}function J(I,x){return new t.ReadStream(I,x)}function ae(I,x){return new t.WriteStream(I,x)}var ve=t.open;t.open=K;function K(I,x,w,R){return typeof w=="function"&&(R=w,w=null),F(I,x,w,R);function F(U,A,L,T,P){return ve(U,A,L,function(M,Ae){M&&(M.code==="EMFILE"||M.code==="ENFILE")?kt([F,[U,A,L,T],M,P||Date.now(),Date.now()]):typeof T=="function"&&T.apply(this,arguments)})}}return t}function kt(t){pt("ENQUEUE",t[0].name,t[1]),z[oe].push(t),Vi()}var on;function yu(){for(var t=Date.now(),e=0;e<z[oe].length;++e)z[oe][e].length>2&&(z[oe][e][3]=t,z[oe][e][4]=t);Vi()}function Vi(){if(clearTimeout(on),on=void 0,z[oe].length!==0){var t=z[oe].shift(),e=t[0],r=t[1],n=t[2],i=t[3],o=t[4];if(i===void 0)pt("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-i>=6e4){pt("TIMEOUT",e.name,r);var s=r.pop();typeof s=="function"&&s.call(null,n)}else{var a=Date.now()-o,c=Math.max(o-i,1),h=Math.min(c*1.2,100);a>=h?(pt("RETRY",e.name,r),e.apply(null,r.concat([i]))):z[oe].push(t)}on===void 0&&(on=setTimeout(Vi,0))}}});var or=y(et=>{"use strict";var bu=we().fromCallback,me=fe(),rm=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(t=>typeof me[t]=="function");Object.keys(me).forEach(t=>{t!=="promises"&&(et[t]=me[t])});rm.forEach(t=>{et[t]=bu(me[t])});et.exists=function(t,e){return typeof e=="function"?me.exists(t,e):new Promise(r=>me.exists(t,r))};et.read=function(t,e,r,n,i,o){return typeof o=="function"?me.read(t,e,r,n,i,o):new Promise((s,a)=>{me.read(t,e,r,n,i,(c,h,u)=>{if(c)return a(c);s({bytesRead:h,buffer:u})})})};et.write=function(t,e,...r){return typeof r[r.length-1]=="function"?me.write(t,e,...r):new Promise((n,i)=>{me.write(t,e,...r,(o,s,a)=>{if(o)return i(o);n({bytesWritten:s,buffer:a})})})};typeof me.writev=="function"&&(et.writev=function(t,e,...r){return typeof r[r.length-1]=="function"?me.writev(t,e,...r):new Promise((n,i)=>{me.writev(t,e,...r,(o,s,a)=>{if(o)return i(o);n({bytesWritten:s,buffers:a})})})});typeof me.realpath.native=="function"&&(et.realpath.native=bu(me.realpath.native))});var Yi=y((h2,wu)=>{wu.exports=t=>{let e=process.versions.node.split(".").map(r=>parseInt(r,10));return t=t.split(".").map(r=>parseInt(r,10)),e[0]>t[0]||e[0]===t[0]&&(e[1]>t[1]||e[1]===t[1]&&e[2]>=t[2])}});var Cu=y((p2,Qi)=>{"use strict";var Tt=or(),Je=require("path"),nm=Yi(),_u=nm("10.12.0"),xu=t=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(t.replace(Je.parse(t).root,""))){let r=new Error(`Path contains invalid characters: ${t}`);throw r.code="EINVAL",r}},Su=t=>{let e={mode:511};return typeof t=="number"&&(t={mode:t}),{...e,...t}},Eu=t=>{let e=new Error(`operation not permitted, mkdir '${t}'`);return e.code="EPERM",e.errno=-4048,e.path=t,e.syscall="mkdir",e};Qi.exports.makeDir=async(t,e)=>{if(xu(t),e=Su(e),_u){let n=Je.resolve(t);return Tt.mkdir(n,{mode:e.mode,recursive:!0})}let r=async n=>{try{await Tt.mkdir(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(Je.dirname(n)===n)throw Eu(n);if(i.message.includes("null bytes"))throw i;return await r(Je.dirname(n)),r(n)}try{if(!(await Tt.stat(n)).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(Je.resolve(t))};Qi.exports.makeDirSync=(t,e)=>{if(xu(t),e=Su(e),_u){let n=Je.resolve(t);return Tt.mkdirSync(n,{mode:e.mode,recursive:!0})}let r=n=>{try{Tt.mkdirSync(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(Je.dirname(n)===n)throw Eu(n);if(i.message.includes("null bytes"))throw i;return r(Je.dirname(n)),r(n)}try{if(!Tt.statSync(n).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(Je.resolve(t))}});var je=y((m2,Pu)=>{"use strict";var im=we().fromPromise,{makeDir:om,makeDirSync:Zi}=Cu(),eo=im(om);Pu.exports={mkdirs:eo,mkdirsSync:Zi,mkdirp:eo,mkdirpSync:Zi,ensureDir:eo,ensureDirSync:Zi}});var to=y((g2,Du)=>{"use strict";var Mt=fe();function sm(t,e,r,n){Mt.open(t,"r+",(i,o)=>{if(i)return n(i);Mt.futimes(o,e,r,s=>{Mt.close(o,a=>{n&&n(s||a)})})})}function am(t,e,r){let n=Mt.openSync(t,"r+");return Mt.futimesSync(n,e,r),Mt.closeSync(n)}Du.exports={utimesMillis:sm,utimesMillisSync:am}});var sr=y((y2,Ru)=>{"use strict";var qt=or(),_e=require("path"),cm=require("util"),um=Yi(),an=um("10.5.0"),Ou=t=>an?qt.stat(t,{bigint:!0}):qt.stat(t),ro=t=>an?qt.statSync(t,{bigint:!0}):qt.statSync(t);function lm(t,e){return Promise.all([Ou(t),Ou(e).catch(r=>{if(r.code==="ENOENT")return null;throw r})]).then(([r,n])=>({srcStat:r,destStat:n}))}function fm(t,e){let r,n=ro(t);try{r=ro(e)}catch(i){if(i.code==="ENOENT")return{srcStat:n,destStat:null};throw i}return{srcStat:n,destStat:r}}function dm(t,e,r,n){cm.callbackify(lm)(t,e,(i,o)=>{if(i)return n(i);let{srcStat:s,destStat:a}=o;return a&&cn(s,a)?n(new Error("Source and destination must not be the same.")):s.isDirectory()&&no(t,e)?n(new Error(un(t,e,r))):n(null,{srcStat:s,destStat:a})})}function hm(t,e,r){let{srcStat:n,destStat:i}=fm(t,e);if(i&&cn(n,i))throw new Error("Source and destination must not be the same.");if(n.isDirectory()&&no(t,e))throw new Error(un(t,e,r));return{srcStat:n,destStat:i}}function Au(t,e,r,n,i){let o=_e.resolve(_e.dirname(t)),s=_e.resolve(_e.dirname(r));if(s===o||s===_e.parse(s).root)return i();let a=(c,h)=>c?c.code==="ENOENT"?i():i(c):cn(e,h)?i(new Error(un(t,r,n))):Au(t,e,s,n,i);an?qt.stat(s,{bigint:!0},a):qt.stat(s,a)}function Iu(t,e,r,n){let i=_e.resolve(_e.dirname(t)),o=_e.resolve(_e.dirname(r));if(o===i||o===_e.parse(o).root)return;let s;try{s=ro(o)}catch(a){if(a.code==="ENOENT")return;throw a}if(cn(e,s))throw new Error(un(t,r,n));return Iu(t,e,o,n)}function cn(t,e){return!!(e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev&&(an||e.ino<Number.MAX_SAFE_INTEGER||e.size===t.size&&e.mode===t.mode&&e.nlink===t.nlink&&e.atimeMs===t.atimeMs&&e.mtimeMs===t.mtimeMs&&e.ctimeMs===t.ctimeMs&&e.birthtimeMs===t.birthtimeMs))}function no(t,e){let r=_e.resolve(t).split(_e.sep).filter(i=>i),n=_e.resolve(e).split(_e.sep).filter(i=>i);return r.reduce((i,o,s)=>i&&n[s]===o,!0)}function un(t,e,r){return`Cannot ${r} '${t}' to a subdirectory of itself, '${e}'.`}Ru.exports={checkPaths:dm,checkPathsSync:hm,checkParentPaths:Au,checkParentPathsSync:Iu,isSrcSubdir:no}});var qu=y((v2,Mu)=>{"use strict";var de=fe(),ar=require("path"),pm=je().mkdirsSync,mm=to().utimesMillisSync,cr=sr();function gm(t,e,r){typeof r=="function"&&(r={filter:r}),r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
11
11
 
12
- see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:n,destStat:i}=ur.checkPathsSync(t,e,"copy");return ur.checkParentPathsSync(t,n,e,"copy"),ym(i,t,e,r)}function ym(t,e,r,n){if(n.filter&&!n.filter(e,r))return;let i=cr.dirname(r);return de.existsSync(i)||pm(i),Iu(t,e,r,n)}function Iu(t,e,r,n){if(!(n.filter&&!n.filter(e,r)))return vm(t,e,r,n)}function vm(t,e,r,n){let o=(n.dereference?de.statSync:de.lstatSync)(e);if(o.isDirectory())return Pm(o,t,e,r,n);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return bm(o,t,e,r,n);if(o.isSymbolicLink())return Om(t,e,r,n)}function bm(t,e,r,n,i){return e?_m(t,r,n,i):Ru(t,r,n,i)}function _m(t,e,r,n){if(n.overwrite)return de.unlinkSync(r),Ru(t,e,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function Ru(t,e,r,n){return de.copyFileSync(e,r),n.preserveTimestamps&&wm(t.mode,e,r),no(r,t.mode)}function wm(t,e,r){return xm(t)&&Sm(r,t),Em(e,r)}function xm(t){return(t&128)===0}function Sm(t,e){return no(t,e|128)}function no(t,e){return de.chmodSync(t,e)}function Em(t,e){let r=de.statSync(t);return mm(e,r.atime,r.mtime)}function Pm(t,e,r,n,i){if(!e)return Cm(t.mode,r,n,i);if(e&&!e.isDirectory())throw new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`);return Fu(r,n,i)}function Cm(t,e,r,n){return de.mkdirSync(r),Fu(e,r,n),no(r,t)}function Fu(t,e,r){de.readdirSync(t).forEach(n=>Dm(n,t,e,r))}function Dm(t,e,r,n){let i=cr.join(e,t),o=cr.join(r,t),{destStat:s}=ur.checkPathsSync(i,o,"copy");return Iu(s,i,o,n)}function Om(t,e,r,n){let i=de.readlinkSync(e);if(n.dereference&&(i=cr.resolve(process.cwd(),i)),t){let o;try{o=de.readlinkSync(r)}catch(s){if(s.code==="EINVAL"||s.code==="UNKNOWN")return de.symlinkSync(i,r);throw s}if(n.dereference&&(o=cr.resolve(process.cwd(),o)),ur.isSrcSubdir(i,o))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${o}'.`);if(de.statSync(r).isDirectory()&&ur.isSrcSubdir(o,i))throw new Error(`Cannot overwrite '${o}' with '${i}'.`);return Am(i,r)}else return de.symlinkSync(i,r)}function Am(t,e){return de.unlinkSync(e),de.symlinkSync(t,e)}ku.exports=gm});var io=y((p2,Tu)=>{"use strict";Tu.exports={copySync:Mu()}});var et=y((m2,Nu)=>{"use strict";var Im=_e().fromPromise,qu=sr();function Rm(t){return qu.access(t).then(()=>!0).catch(()=>!1)}Nu.exports={pathExists:Im(Rm),pathExistsSync:qu.existsSync}});var Wu=y((g2,Hu)=>{"use strict";var xe=fe(),lr=require("path"),Fm=je().mkdirs,km=et().pathExists,Mm=eo().utimesMillis,fr=ar();function Tm(t,e,r,n){typeof r=="function"&&!n?(n=r,r={}):typeof r=="function"&&(r={filter:r}),n=n||function(){},r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
12
+ see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:n,destStat:i}=cr.checkPathsSync(t,e,"copy");return cr.checkParentPathsSync(t,n,e,"copy"),ym(i,t,e,r)}function ym(t,e,r,n){if(n.filter&&!n.filter(e,r))return;let i=ar.dirname(r);return de.existsSync(i)||pm(i),Fu(t,e,r,n)}function Fu(t,e,r,n){if(!(n.filter&&!n.filter(e,r)))return vm(t,e,r,n)}function vm(t,e,r,n){let o=(n.dereference?de.statSync:de.lstatSync)(e);if(o.isDirectory())return Cm(o,t,e,r,n);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return bm(o,t,e,r,n);if(o.isSymbolicLink())return Om(t,e,r,n)}function bm(t,e,r,n,i){return e?wm(t,r,n,i):ku(t,r,n,i)}function wm(t,e,r,n){if(n.overwrite)return de.unlinkSync(r),ku(t,e,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function ku(t,e,r,n){return de.copyFileSync(e,r),n.preserveTimestamps&&_m(t.mode,e,r),io(r,t.mode)}function _m(t,e,r){return xm(t)&&Sm(r,t),Em(e,r)}function xm(t){return(t&128)===0}function Sm(t,e){return io(t,e|128)}function io(t,e){return de.chmodSync(t,e)}function Em(t,e){let r=de.statSync(t);return mm(e,r.atime,r.mtime)}function Cm(t,e,r,n,i){if(!e)return Pm(t.mode,r,n,i);if(e&&!e.isDirectory())throw new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`);return Tu(r,n,i)}function Pm(t,e,r,n){return de.mkdirSync(r),Tu(e,r,n),io(r,t)}function Tu(t,e,r){de.readdirSync(t).forEach(n=>Dm(n,t,e,r))}function Dm(t,e,r,n){let i=ar.join(e,t),o=ar.join(r,t),{destStat:s}=cr.checkPathsSync(i,o,"copy");return Fu(s,i,o,n)}function Om(t,e,r,n){let i=de.readlinkSync(e);if(n.dereference&&(i=ar.resolve(process.cwd(),i)),t){let o;try{o=de.readlinkSync(r)}catch(s){if(s.code==="EINVAL"||s.code==="UNKNOWN")return de.symlinkSync(i,r);throw s}if(n.dereference&&(o=ar.resolve(process.cwd(),o)),cr.isSrcSubdir(i,o))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${o}'.`);if(de.statSync(r).isDirectory()&&cr.isSrcSubdir(o,i))throw new Error(`Cannot overwrite '${o}' with '${i}'.`);return Am(i,r)}else return de.symlinkSync(i,r)}function Am(t,e){return de.unlinkSync(e),de.symlinkSync(t,e)}Mu.exports=gm});var oo=y((b2,Nu)=>{"use strict";Nu.exports={copySync:qu()}});var tt=y((w2,$u)=>{"use strict";var Im=we().fromPromise,ju=or();function Rm(t){return ju.access(t).then(()=>!0).catch(()=>!1)}$u.exports={pathExists:Im(Rm),pathExistsSync:ju.existsSync}});var Ju=y((_2,zu)=>{"use strict";var xe=fe(),ur=require("path"),Fm=je().mkdirs,km=tt().pathExists,Tm=to().utimesMillis,lr=sr();function Mm(t,e,r,n){typeof r=="function"&&!n?(n=r,r={}):typeof r=="function"&&(r={filter:r}),n=n||function(){},r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
13
13
 
14
- see https://github.com/jprichardson/node-fs-extra/issues/269`),fr.checkPaths(t,e,"copy",(i,o)=>{if(i)return n(i);let{srcStat:s,destStat:a}=o;fr.checkParentPaths(t,s,e,"copy",c=>c?n(c):r.filter?Bu(ju,a,t,e,r,n):ju(a,t,e,r,n))})}function ju(t,e,r,n,i){let o=lr.dirname(r);km(o,(s,a)=>{if(s)return i(s);if(a)return oo(t,e,r,n,i);Fm(o,c=>c?i(c):oo(t,e,r,n,i))})}function Bu(t,e,r,n,i,o){Promise.resolve(i.filter(r,n)).then(s=>s?t(e,r,n,i,o):o(),s=>o(s))}function oo(t,e,r,n,i){return n.filter?Bu($u,t,e,r,n,i):$u(t,e,r,n,i)}function $u(t,e,r,n,i){(n.dereference?xe.stat:xe.lstat)(e,(s,a)=>{if(s)return i(s);if(a.isDirectory())return Um(a,t,e,r,n,i);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return qm(a,t,e,r,n,i);if(a.isSymbolicLink())return Hm(t,e,r,n,i)})}function qm(t,e,r,n,i,o){return e?Nm(t,r,n,i,o):Uu(t,r,n,i,o)}function Nm(t,e,r,n,i){if(n.overwrite)xe.unlink(r,o=>o?i(o):Uu(t,e,r,n,i));else return n.errorOnExist?i(new Error(`'${r}' already exists`)):i()}function Uu(t,e,r,n,i){xe.copyFile(e,r,o=>o?i(o):n.preserveTimestamps?jm(t.mode,e,r,i):ln(r,t.mode,i))}function jm(t,e,r,n){return $m(t)?Lm(r,t,i=>i?n(i):Lu(t,e,r,n)):Lu(t,e,r,n)}function $m(t){return(t&128)===0}function Lm(t,e,r){return ln(t,e|128,r)}function Lu(t,e,r,n){Bm(e,r,i=>i?n(i):ln(r,t,n))}function ln(t,e,r){return xe.chmod(t,e,r)}function Bm(t,e,r){xe.stat(t,(n,i)=>n?r(n):Mm(e,i.atime,i.mtime,r))}function Um(t,e,r,n,i,o){return e?e&&!e.isDirectory()?o(new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`)):Gu(r,n,i,o):Gm(t.mode,r,n,i,o)}function Gm(t,e,r,n,i){xe.mkdir(r,o=>{if(o)return i(o);Gu(e,r,n,s=>s?i(s):ln(r,t,i))})}function Gu(t,e,r,n){xe.readdir(t,(i,o)=>i?n(i):Xu(o,t,e,r,n))}function Xu(t,e,r,n,i){let o=t.pop();return o?Xm(t,o,e,r,n,i):i()}function Xm(t,e,r,n,i,o){let s=lr.join(r,e),a=lr.join(n,e);fr.checkPaths(s,a,"copy",(c,f)=>{if(c)return o(c);let{destStat:u}=f;oo(u,s,a,i,p=>p?o(p):Xu(t,r,n,i,o))})}function Hm(t,e,r,n,i){xe.readlink(e,(o,s)=>{if(o)return i(o);if(n.dereference&&(s=lr.resolve(process.cwd(),s)),t)xe.readlink(r,(a,c)=>a?a.code==="EINVAL"||a.code==="UNKNOWN"?xe.symlink(s,r,i):i(a):(n.dereference&&(c=lr.resolve(process.cwd(),c)),fr.isSrcSubdir(s,c)?i(new Error(`Cannot copy '${s}' to a subdirectory of itself, '${c}'.`)):t.isDirectory()&&fr.isSrcSubdir(c,s)?i(new Error(`Cannot overwrite '${c}' with '${s}'.`)):Wm(s,r,i)));else return xe.symlink(s,r,i)})}function Wm(t,e,r){xe.unlink(e,n=>n?r(n):xe.symlink(t,e,r))}Hu.exports=Tm});var so=y((y2,zu)=>{"use strict";var zm=_e().fromCallback;zu.exports={copy:zm(Wu())}});var rl=y((v2,tl)=>{"use strict";var Ju=fe(),Qu=require("path"),W=require("assert"),dr=process.platform==="win32";function Zu(t){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(r=>{t[r]=t[r]||Ju[r],r=r+"Sync",t[r]=t[r]||Ju[r]}),t.maxBusyTries=t.maxBusyTries||3}function ao(t,e,r){let n=0;typeof e=="function"&&(r=e,e={}),W(t,"rimraf: missing path"),W.strictEqual(typeof t,"string","rimraf: path should be a string"),W.strictEqual(typeof r,"function","rimraf: callback function required"),W(e,"rimraf: invalid options argument provided"),W.strictEqual(typeof e,"object","rimraf: options should be object"),Zu(e),Vu(t,e,function i(o){if(o){if((o.code==="EBUSY"||o.code==="ENOTEMPTY"||o.code==="EPERM")&&n<e.maxBusyTries){n++;let s=n*100;return setTimeout(()=>Vu(t,e,i),s)}o.code==="ENOENT"&&(o=null)}r(o)})}function Vu(t,e,r){W(t),W(e),W(typeof r=="function"),e.lstat(t,(n,i)=>{if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&dr)return Ku(t,e,n,r);if(i&&i.isDirectory())return fn(t,e,n,r);e.unlink(t,o=>{if(o){if(o.code==="ENOENT")return r(null);if(o.code==="EPERM")return dr?Ku(t,e,o,r):fn(t,e,o,r);if(o.code==="EISDIR")return fn(t,e,o,r)}return r(o)})})}function Ku(t,e,r,n){W(t),W(e),W(typeof n=="function"),e.chmod(t,438,i=>{i?n(i.code==="ENOENT"?null:r):e.stat(t,(o,s)=>{o?n(o.code==="ENOENT"?null:r):s.isDirectory()?fn(t,e,r,n):e.unlink(t,n)})})}function Yu(t,e,r){let n;W(t),W(e);try{e.chmodSync(t,438)}catch(i){if(i.code==="ENOENT")return;throw r}try{n=e.statSync(t)}catch(i){if(i.code==="ENOENT")return;throw r}n.isDirectory()?dn(t,e,r):e.unlinkSync(t)}function fn(t,e,r,n){W(t),W(e),W(typeof n=="function"),e.rmdir(t,i=>{i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")?Jm(t,e,n):i&&i.code==="ENOTDIR"?n(r):n(i)})}function Jm(t,e,r){W(t),W(e),W(typeof r=="function"),e.readdir(t,(n,i)=>{if(n)return r(n);let o=i.length,s;if(o===0)return e.rmdir(t,r);i.forEach(a=>{ao(Qu.join(t,a),e,c=>{if(!s){if(c)return r(s=c);--o===0&&e.rmdir(t,r)}})})})}function el(t,e){let r;e=e||{},Zu(e),W(t,"rimraf: missing path"),W.strictEqual(typeof t,"string","rimraf: path should be a string"),W(e,"rimraf: missing options"),W.strictEqual(typeof e,"object","rimraf: options should be object");try{r=e.lstatSync(t)}catch(n){if(n.code==="ENOENT")return;n.code==="EPERM"&&dr&&Yu(t,e,n)}try{r&&r.isDirectory()?dn(t,e,null):e.unlinkSync(t)}catch(n){if(n.code==="ENOENT")return;if(n.code==="EPERM")return dr?Yu(t,e,n):dn(t,e,n);if(n.code!=="EISDIR")throw n;dn(t,e,n)}}function dn(t,e,r){W(t),W(e);try{e.rmdirSync(t)}catch(n){if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")Vm(t,e);else if(n.code!=="ENOENT")throw n}}function Vm(t,e){if(W(t),W(e),e.readdirSync(t).forEach(r=>el(Qu.join(t,r),e)),dr){let r=Date.now();do try{return e.rmdirSync(t,e)}catch{}while(Date.now()-r<500)}else return e.rmdirSync(t,e)}tl.exports=ao;ao.sync=el});var hr=y((b2,il)=>{"use strict";var Km=_e().fromCallback,nl=rl();il.exports={remove:Km(nl),removeSync:nl.sync}});var dl=y((_2,fl)=>{"use strict";var Ym=_e().fromCallback,al=fe(),cl=require("path"),ul=je(),ll=hr(),ol=Ym(function(e,r){r=r||function(){},al.readdir(e,(n,i)=>{if(n)return ul.mkdirs(e,r);i=i.map(s=>cl.join(e,s)),o();function o(){let s=i.pop();if(!s)return r();ll.remove(s,a=>{if(a)return r(a);o()})}})});function sl(t){let e;try{e=al.readdirSync(t)}catch{return ul.mkdirsSync(t)}e.forEach(r=>{r=cl.join(t,r),ll.removeSync(r)})}fl.exports={emptyDirSync:sl,emptydirSync:sl,emptyDir:ol,emptydir:ol}});var gl=y((w2,ml)=>{"use strict";var Qm=_e().fromCallback,hl=require("path"),tt=fe(),pl=je();function Zm(t,e){function r(){tt.writeFile(t,"",n=>{if(n)return e(n);e()})}tt.stat(t,(n,i)=>{if(!n&&i.isFile())return e();let o=hl.dirname(t);tt.stat(o,(s,a)=>{if(s)return s.code==="ENOENT"?pl.mkdirs(o,c=>{if(c)return e(c);r()}):e(s);a.isDirectory()?r():tt.readdir(o,c=>{if(c)return e(c)})})})}function eg(t){let e;try{e=tt.statSync(t)}catch{}if(e&&e.isFile())return;let r=hl.dirname(t);try{tt.statSync(r).isDirectory()||tt.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")pl.mkdirsSync(r);else throw n}tt.writeFileSync(t,"")}ml.exports={createFile:Qm(Zm),createFileSync:eg}});var wl=y((x2,_l)=>{"use strict";var tg=_e().fromCallback,vl=require("path"),mt=fe(),bl=je(),yl=et().pathExists;function rg(t,e,r){function n(i,o){mt.link(i,o,s=>{if(s)return r(s);r(null)})}yl(e,(i,o)=>{if(i)return r(i);if(o)return r(null);mt.lstat(t,s=>{if(s)return s.message=s.message.replace("lstat","ensureLink"),r(s);let a=vl.dirname(e);yl(a,(c,f)=>{if(c)return r(c);if(f)return n(t,e);bl.mkdirs(a,u=>{if(u)return r(u);n(t,e)})})})})}function ng(t,e){if(mt.existsSync(e))return;try{mt.lstatSync(t)}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let n=vl.dirname(e);return mt.existsSync(n)||bl.mkdirsSync(n),mt.linkSync(t,e)}_l.exports={createLink:tg(rg),createLinkSync:ng}});var Sl=y((S2,xl)=>{"use strict";var rt=require("path"),pr=fe(),ig=et().pathExists;function og(t,e,r){if(rt.isAbsolute(t))return pr.lstat(t,n=>n?(n.message=n.message.replace("lstat","ensureSymlink"),r(n)):r(null,{toCwd:t,toDst:t}));{let n=rt.dirname(e),i=rt.join(n,t);return ig(i,(o,s)=>o?r(o):s?r(null,{toCwd:i,toDst:t}):pr.lstat(t,a=>a?(a.message=a.message.replace("lstat","ensureSymlink"),r(a)):r(null,{toCwd:t,toDst:rt.relative(n,t)})))}}function sg(t,e){let r;if(rt.isAbsolute(t)){if(r=pr.existsSync(t),!r)throw new Error("absolute srcpath does not exist");return{toCwd:t,toDst:t}}else{let n=rt.dirname(e),i=rt.join(n,t);if(r=pr.existsSync(i),r)return{toCwd:i,toDst:t};if(r=pr.existsSync(t),!r)throw new Error("relative srcpath does not exist");return{toCwd:t,toDst:rt.relative(n,t)}}}xl.exports={symlinkPaths:og,symlinkPathsSync:sg}});var Cl=y((E2,Pl)=>{"use strict";var El=fe();function ag(t,e,r){if(r=typeof e=="function"?e:r,e=typeof e=="function"?!1:e,e)return r(null,e);El.lstat(t,(n,i)=>{if(n)return r(null,"file");e=i&&i.isDirectory()?"dir":"file",r(null,e)})}function cg(t,e){let r;if(e)return e;try{r=El.lstatSync(t)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}Pl.exports={symlinkType:ag,symlinkTypeSync:cg}});var kl=y((P2,Fl)=>{"use strict";var ug=_e().fromCallback,Ol=require("path"),$t=fe(),Al=je(),lg=Al.mkdirs,fg=Al.mkdirsSync,Il=Sl(),dg=Il.symlinkPaths,hg=Il.symlinkPathsSync,Rl=Cl(),pg=Rl.symlinkType,mg=Rl.symlinkTypeSync,Dl=et().pathExists;function gg(t,e,r,n){n=typeof r=="function"?r:n,r=typeof r=="function"?!1:r,Dl(e,(i,o)=>{if(i)return n(i);if(o)return n(null);dg(t,e,(s,a)=>{if(s)return n(s);t=a.toDst,pg(a.toCwd,r,(c,f)=>{if(c)return n(c);let u=Ol.dirname(e);Dl(u,(p,g)=>{if(p)return n(p);if(g)return $t.symlink(t,e,f,n);lg(u,m=>{if(m)return n(m);$t.symlink(t,e,f,n)})})})})})}function yg(t,e,r){if($t.existsSync(e))return;let i=hg(t,e);t=i.toDst,r=mg(i.toCwd,r);let o=Ol.dirname(e);return $t.existsSync(o)||fg(o),$t.symlinkSync(t,e,r)}Fl.exports={createSymlink:ug(gg),createSymlinkSync:yg}});var Tl=y((C2,Ml)=>{"use strict";var hn=gl(),pn=wl(),mn=kl();Ml.exports={createFile:hn.createFile,createFileSync:hn.createFileSync,ensureFile:hn.createFile,ensureFileSync:hn.createFileSync,createLink:pn.createLink,createLinkSync:pn.createLinkSync,ensureLink:pn.createLink,ensureLinkSync:pn.createLinkSync,createSymlink:mn.createSymlink,createSymlinkSync:mn.createSymlinkSync,ensureSymlink:mn.createSymlink,ensureSymlinkSync:mn.createSymlinkSync}});var gn=y((D2,ql)=>{function vg(t,{EOL:e=`
15
- `,finalEOL:r=!0,replacer:n=null,spaces:i}={}){let o=r?e:"";return JSON.stringify(t,n,i).replace(/\n/g,e)+o}function bg(t){return Buffer.isBuffer(t)&&(t=t.toString("utf8")),t.replace(/^\uFEFF/,"")}ql.exports={stringify:vg,stripBom:bg}});var Ll=y((O2,$l)=>{var Lt;try{Lt=fe()}catch{Lt=require("fs")}var yn=_e(),{stringify:Nl,stripBom:jl}=gn();async function _g(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||Lt,n="throws"in e?e.throws:!0,i=await yn.fromCallback(r.readFile)(t,e);i=jl(i);let o;try{o=JSON.parse(i,e?e.reviver:null)}catch(s){if(n)throw s.message=`${t}: ${s.message}`,s;return null}return o}var wg=yn.fromPromise(_g);function xg(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||Lt,n="throws"in e?e.throws:!0;try{let i=r.readFileSync(t,e);return i=jl(i),JSON.parse(i,e.reviver)}catch(i){if(n)throw i.message=`${t}: ${i.message}`,i;return null}}async function Sg(t,e,r={}){let n=r.fs||Lt,i=Nl(e,r);await yn.fromCallback(n.writeFile)(t,i,r)}var Eg=yn.fromPromise(Sg);function Pg(t,e,r={}){let n=r.fs||Lt,i=Nl(e,r);return n.writeFileSync(t,i,r)}var Cg={readFile:wg,readFileSync:xg,writeFile:Eg,writeFileSync:Pg};$l.exports=Cg});var Ul=y((A2,Bl)=>{"use strict";var vn=Ll();Bl.exports={readJson:vn.readFile,readJsonSync:vn.readFileSync,writeJson:vn.writeFile,writeJsonSync:vn.writeFileSync}});var bn=y((I2,Hl)=>{"use strict";var Dg=_e().fromCallback,mr=fe(),Gl=require("path"),Xl=je(),Og=et().pathExists;function Ag(t,e,r,n){typeof r=="function"&&(n=r,r="utf8");let i=Gl.dirname(t);Og(i,(o,s)=>{if(o)return n(o);if(s)return mr.writeFile(t,e,r,n);Xl.mkdirs(i,a=>{if(a)return n(a);mr.writeFile(t,e,r,n)})})}function Ig(t,...e){let r=Gl.dirname(t);if(mr.existsSync(r))return mr.writeFileSync(t,...e);Xl.mkdirsSync(r),mr.writeFileSync(t,...e)}Hl.exports={outputFile:Dg(Ag),outputFileSync:Ig}});var zl=y((R2,Wl)=>{"use strict";var{stringify:Rg}=gn(),{outputFile:Fg}=bn();async function kg(t,e,r={}){let n=Rg(e,r);await Fg(t,n,r)}Wl.exports=kg});var Vl=y((F2,Jl)=>{"use strict";var{stringify:Mg}=gn(),{outputFileSync:Tg}=bn();function qg(t,e,r){let n=Mg(e,r);Tg(t,n,r)}Jl.exports=qg});var Yl=y((k2,Kl)=>{"use strict";var Ng=_e().fromPromise,ge=Ul();ge.outputJson=Ng(zl());ge.outputJsonSync=Vl();ge.outputJSON=ge.outputJson;ge.outputJSONSync=ge.outputJsonSync;ge.writeJSON=ge.writeJson;ge.writeJSONSync=ge.writeJsonSync;ge.readJSON=ge.readJson;ge.readJSONSync=ge.readJsonSync;Kl.exports=ge});var nf=y((M2,rf)=>{"use strict";var ef=fe(),jg=require("path"),$g=io().copySync,tf=hr().removeSync,Lg=je().mkdirpSync,Ql=ar();function Bg(t,e,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:i}=Ql.checkPathsSync(t,e,"move");return Ql.checkParentPathsSync(t,i,e,"move"),Lg(jg.dirname(e)),Ug(t,e,n)}function Ug(t,e,r){if(r)return tf(e),Zl(t,e,r);if(ef.existsSync(e))throw new Error("dest already exists.");return Zl(t,e,r)}function Zl(t,e,r){try{ef.renameSync(t,e)}catch(n){if(n.code!=="EXDEV")throw n;return Gg(t,e,r)}}function Gg(t,e,r){return $g(t,e,{overwrite:r,errorOnExist:!0}),tf(t)}rf.exports=Bg});var sf=y((T2,of)=>{"use strict";of.exports={moveSync:nf()}});var ff=y((q2,lf)=>{"use strict";var Xg=fe(),Hg=require("path"),Wg=so().copy,uf=hr().remove,zg=je().mkdirp,Jg=et().pathExists,af=ar();function Vg(t,e,r,n){typeof r=="function"&&(n=r,r={});let i=r.overwrite||r.clobber||!1;af.checkPaths(t,e,"move",(o,s)=>{if(o)return n(o);let{srcStat:a}=s;af.checkParentPaths(t,a,e,"move",c=>{if(c)return n(c);zg(Hg.dirname(e),f=>f?n(f):Kg(t,e,i,n))})})}function Kg(t,e,r,n){if(r)return uf(e,i=>i?n(i):cf(t,e,r,n));Jg(e,(i,o)=>i?n(i):o?n(new Error("dest already exists.")):cf(t,e,r,n))}function cf(t,e,r,n){Xg.rename(t,e,i=>i?i.code!=="EXDEV"?n(i):Yg(t,e,r,n):n())}function Yg(t,e,r,n){Wg(t,e,{overwrite:r,errorOnExist:!0},o=>o?n(o):uf(t,n))}lf.exports=Vg});var hf=y((N2,df)=>{"use strict";var Qg=_e().fromCallback;df.exports={move:Qg(ff())}});var Bt=y((j2,co)=>{"use strict";co.exports={...sr(),...io(),...so(),...dl(),...Tl(),...Yl(),...je(),...sf(),...hf(),...bn(),...et(),...hr()};var pf=require("fs");Object.getOwnPropertyDescriptor(pf,"promises")&&Object.defineProperty(co.exports,"promises",{get(){return pf.promises}})});var Sf=y((L2,xf)=>{"use strict";xf.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var fo=y((B2,Pf)=>{var gr=Sf(),Ef={};for(let t of Object.keys(gr))Ef[gr[t]]=t;var O={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Pf.exports=O;for(let t of Object.keys(O)){if(!("channels"in O[t]))throw new Error("missing channels property: "+t);if(!("labels"in O[t]))throw new Error("missing channel labels property: "+t);if(O[t].labels.length!==O[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=O[t];delete O[t].channels,delete O[t].labels,Object.defineProperty(O[t],"channels",{value:e}),Object.defineProperty(O[t],"labels",{value:r})}O.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),o=Math.max(e,r,n),s=o-i,a,c;o===i?a=0:e===o?a=(r-n)/s:r===o?a=2+(n-e)/s:n===o&&(a=4+(e-r)/s),a=Math.min(a*60,360),a<0&&(a+=360);let f=(i+o)/2;return o===i?c=0:f<=.5?c=s/(o+i):c=s/(2-o-i),[a,c*100,f*100]};O.rgb.hsv=function(t){let e,r,n,i,o,s=t[0]/255,a=t[1]/255,c=t[2]/255,f=Math.max(s,a,c),u=f-Math.min(s,a,c),p=function(g){return(f-g)/6/u+1/2};return u===0?(i=0,o=0):(o=u/f,e=p(s),r=p(a),n=p(c),s===f?i=n-r:a===f?i=1/3+e-n:c===f&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,f*100]};O.rgb.hwb=function(t){let e=t[0],r=t[1],n=t[2],i=O.rgb.hsl(t)[0],o=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,o*100,n*100]};O.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(1-e,1-r,1-n),o=(1-e-i)/(1-i)||0,s=(1-r-i)/(1-i)||0,a=(1-n-i)/(1-i)||0;return[o*100,s*100,a*100,i*100]};function ey(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}O.rgb.keyword=function(t){let e=Ef[t];if(e)return e;let r=1/0,n;for(let i of Object.keys(gr)){let o=gr[i],s=ey(t,o);s<r&&(r=s,n=i)}return n};O.keyword.rgb=function(t){return gr[t]};O.rgb.xyz=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;let i=e*.4124+r*.3576+n*.1805,o=e*.2126+r*.7152+n*.0722,s=e*.0193+r*.1192+n*.9505;return[i*100,o*100,s*100]};O.rgb.lab=function(t){let e=O.rgb.xyz(t),r=e[0],n=e[1],i=e[2];r/=95.047,n/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;let o=116*n-16,s=500*(r-n),a=200*(n-i);return[o,s,a]};O.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i,o,s;if(r===0)return s=n*255,[s,s,s];n<.5?i=n*(1+r):i=n+r-n*r;let a=2*n-i,c=[0,0,0];for(let f=0;f<3;f++)o=e+1/3*-(f-1),o<0&&o++,o>1&&o--,6*o<1?s=a+(i-a)*6*o:2*o<1?s=i:3*o<2?s=a+(i-a)*(2/3-o)*6:s=a,c[f]=s*255;return c};O.hsl.hsv=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=r,o=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=o<=1?o:2-o;let s=(n+r)/2,a=n===0?2*i/(o+i):2*r/(n+r);return[e,a*100,s*100]};O.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,o=e-Math.floor(e),s=255*n*(1-r),a=255*n*(1-r*o),c=255*n*(1-r*(1-o));switch(n*=255,i){case 0:return[n,c,s];case 1:return[a,n,s];case 2:return[s,n,c];case 3:return[s,a,n];case 4:return[c,s,n];case 5:return[n,s,a]}};O.hsv.hsl=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),o,s;s=(2-r)*n;let a=(2-r)*i;return o=r*i,o/=a<=1?a:2-a,o=o||0,s/=2,[e,o*100,s*100]};O.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,o;i>1&&(r/=i,n/=i);let s=Math.floor(6*e),a=1-n;o=6*e-s,s&1&&(o=1-o);let c=r+o*(a-r),f,u,p;switch(s){default:case 6:case 0:f=a,u=c,p=r;break;case 1:f=c,u=a,p=r;break;case 2:f=r,u=a,p=c;break;case 3:f=r,u=c,p=a;break;case 4:f=c,u=r,p=a;break;case 5:f=a,u=r,p=c;break}return[f*255,u*255,p*255]};O.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,o=1-Math.min(1,e*(1-i)+i),s=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i);return[o*255,s*255,a*255]};O.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i,o,s;return i=e*3.2406+r*-1.5372+n*-.4986,o=e*-.9689+r*1.8758+n*.0415,s=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[i*255,o*255,s*255]};O.xyz.lab=function(t){let e=t[0],r=t[1],n=t[2];e/=95.047,r/=100,n/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let i=116*r-16,o=500*(e-r),s=200*(r-n);return[i,o,s]};O.lab.xyz=function(t){let e=t[0],r=t[1],n=t[2],i,o,s;o=(e+16)/116,i=r/500+o,s=o-n/200;let a=o**3,c=i**3,f=s**3;return o=a>.008856?a:(o-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,s=f>.008856?f:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]};O.lab.lch=function(t){let e=t[0],r=t[1],n=t[2],i;i=Math.atan2(n,r)*360/2/Math.PI,i<0&&(i+=360);let s=Math.sqrt(r*r+n*n);return[e,s,i]};O.lch.lab=function(t){let e=t[0],r=t[1],i=t[2]/360*2*Math.PI,o=r*Math.cos(i),s=r*Math.sin(i);return[e,o,s]};O.rgb.ansi16=function(t,e=null){let[r,n,i]=t,o=e===null?O.rgb.hsv(t)[2]:e;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return o===2&&(s+=60),s};O.hsv.ansi16=function(t){return O.rgb.ansi16(O.hsv.rgb(t),t[2])};O.rgb.ansi256=function(t){let e=t[0],r=t[1],n=t[2];return e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};O.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(~~(t>50)+1)*.5,n=(e&1)*r*255,i=(e>>1&1)*r*255,o=(e>>2&1)*r*255;return[n,i,o]};O.ansi256.rgb=function(t){if(t>=232){let o=(t-232)*10+8;return[o,o,o]}t-=16;let e,r=Math.floor(t/36)/5*255,n=Math.floor((e=t%36)/6)/5*255,i=e%6/5*255;return[r,n,i]};O.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};O.hex.rgb=function(t){let e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=r.split("").map(a=>a+a).join(""));let n=parseInt(r,16),i=n>>16&255,o=n>>8&255,s=n&255;return[i,o,s]};O.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.max(Math.max(e,r),n),o=Math.min(Math.min(e,r),n),s=i-o,a,c;return s<1?a=o/(1-s):a=0,s<=0?c=0:i===e?c=(r-n)/s%6:i===r?c=2+(n-e)/s:c=4+(e-r)/s,c/=6,c%=1,[c*360,s*100,a*100]};O.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,n=r<.5?2*e*r:2*e*(1-r),i=0;return n<1&&(i=(r-.5*n)/(1-n)),[t[0],n*100,i*100]};O.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,n=e*r,i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],n*100,i*100]};O.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100;if(r===0)return[n*255,n*255,n*255];let i=[0,0,0],o=e%1*6,s=o%1,a=1-s,c=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return c=(1-r)*n,[(r*i[0]+c)*255,(r*i[1]+c)*255,(r*i[2]+c)*255]};O.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,n=e+r*(1-e),i=0;return n>0&&(i=e/n),[t[0],i*100,n*100]};O.hcg.hsl=function(t){let e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],i*100,n*100]};O.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,n=e+r*(1-e);return[t[0],(n-e)*100,(1-n)*100]};O.hwb.hcg=function(t){let e=t[1]/100,n=1-t[2]/100,i=n-e,o=0;return i<1&&(o=(n-i)/(1-i)),[t[0],i*100,o*100]};O.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};O.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};O.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};O.gray.hsl=function(t){return[0,0,t[0]]};O.gray.hsv=O.gray.hsl;O.gray.hwb=function(t){return[0,100,t[0]]};O.gray.cmyk=function(t){return[0,0,0,t[0]]};O.gray.lab=function(t){return[t[0],0,0]};O.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n};O.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var Df=y((U2,Cf)=>{var wn=fo();function ty(){let t={},e=Object.keys(wn);for(let r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function ry(t){let e=ty(),r=[t];for(e[t].distance=0;r.length;){let n=r.pop(),i=Object.keys(wn[n]);for(let o=i.length,s=0;s<o;s++){let a=i[s],c=e[a];c.distance===-1&&(c.distance=e[n].distance+1,c.parent=n,r.unshift(a))}}return e}function ny(t,e){return function(r){return e(t(r))}}function iy(t,e){let r=[e[t].parent,t],n=wn[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=ny(wn[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}Cf.exports=function(t){let e=ry(t),r={},n=Object.keys(e);for(let i=n.length,o=0;o<i;o++){let s=n[o];e[s].parent!==null&&(r[s]=iy(s,e))}return r}});var Af=y((G2,Of)=>{var ho=fo(),oy=Df(),Ut={},sy=Object.keys(ho);function ay(t){let e=function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function cy(t){let e=function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let i=t(r);if(typeof i=="object")for(let o=i.length,s=0;s<o;s++)i[s]=Math.round(i[s]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}sy.forEach(t=>{Ut[t]={},Object.defineProperty(Ut[t],"channels",{value:ho[t].channels}),Object.defineProperty(Ut[t],"labels",{value:ho[t].labels});let e=oy(t);Object.keys(e).forEach(n=>{let i=e[n];Ut[t][n]=cy(i),Ut[t][n].raw=ay(i)})});Of.exports=Ut});var Tf=y((X2,Mf)=>{"use strict";var If=(t,e)=>(...r)=>`\x1B[${t(...r)+e}m`,Rf=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};5;${n}m`},Ff=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};2;${n[0]};${n[1]};${n[2]}m`},xn=t=>t,kf=(t,e,r)=>[t,e,r],Gt=(t,e,r)=>{Object.defineProperty(t,e,{get:()=>{let n=r();return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})},po,Xt=(t,e,r,n)=>{po===void 0&&(po=Af());let i=n?10:0,o={};for(let[s,a]of Object.entries(po)){let c=s==="ansi16"?"ansi":s;s===e?o[c]=t(r,i):typeof a=="object"&&(o[c]=t(a[e],i))}return o};function uy(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[r,n]of Object.entries(e)){for(let[i,o]of Object.entries(n))e[i]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},n[i]=e[i],t.set(o[0],o[1]);Object.defineProperty(e,r,{value:n,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",Gt(e.color,"ansi",()=>Xt(If,"ansi16",xn,!1)),Gt(e.color,"ansi256",()=>Xt(Rf,"ansi256",xn,!1)),Gt(e.color,"ansi16m",()=>Xt(Ff,"rgb",kf,!1)),Gt(e.bgColor,"ansi",()=>Xt(If,"ansi16",xn,!0)),Gt(e.bgColor,"ansi256",()=>Xt(Rf,"ansi256",xn,!0)),Gt(e.bgColor,"ansi16m",()=>Xt(Ff,"rgb",kf,!0)),e}Object.defineProperty(Mf,"exports",{enumerable:!0,get:uy})});var Nf=y((H2,qf)=>{"use strict";var ly=(t,e,r)=>{let n=t.indexOf(e);if(n===-1)return t;let i=e.length,o=0,s="";do s+=t.substr(o,n-o)+e+r,o=n+i,n=t.indexOf(e,o);while(n!==-1);return s+=t.substr(o),s},fy=(t,e,r,n)=>{let i=0,o="";do{let s=t[n-1]==="\r";o+=t.substr(i,(s?n-1:n)-i)+e+(s?`\r
14
+ see https://github.com/jprichardson/node-fs-extra/issues/269`),lr.checkPaths(t,e,"copy",(i,o)=>{if(i)return n(i);let{srcStat:s,destStat:a}=o;lr.checkParentPaths(t,s,e,"copy",c=>c?n(c):r.filter?Xu(Lu,a,t,e,r,n):Lu(a,t,e,r,n))})}function Lu(t,e,r,n,i){let o=ur.dirname(r);km(o,(s,a)=>{if(s)return i(s);if(a)return so(t,e,r,n,i);Fm(o,c=>c?i(c):so(t,e,r,n,i))})}function Xu(t,e,r,n,i,o){Promise.resolve(i.filter(r,n)).then(s=>s?t(e,r,n,i,o):o(),s=>o(s))}function so(t,e,r,n,i){return n.filter?Xu(Bu,t,e,r,n,i):Bu(t,e,r,n,i)}function Bu(t,e,r,n,i){(n.dereference?xe.stat:xe.lstat)(e,(s,a)=>{if(s)return i(s);if(a.isDirectory())return Um(a,t,e,r,n,i);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return qm(a,t,e,r,n,i);if(a.isSymbolicLink())return Gm(t,e,r,n,i)})}function qm(t,e,r,n,i,o){return e?Nm(t,r,n,i,o):Hu(t,r,n,i,o)}function Nm(t,e,r,n,i){if(n.overwrite)xe.unlink(r,o=>o?i(o):Hu(t,e,r,n,i));else return n.errorOnExist?i(new Error(`'${r}' already exists`)):i()}function Hu(t,e,r,n,i){xe.copyFile(e,r,o=>o?i(o):n.preserveTimestamps?jm(t.mode,e,r,i):ln(r,t.mode,i))}function jm(t,e,r,n){return $m(t)?Lm(r,t,i=>i?n(i):Uu(t,e,r,n)):Uu(t,e,r,n)}function $m(t){return(t&128)===0}function Lm(t,e,r){return ln(t,e|128,r)}function Uu(t,e,r,n){Bm(e,r,i=>i?n(i):ln(r,t,n))}function ln(t,e,r){return xe.chmod(t,e,r)}function Bm(t,e,r){xe.stat(t,(n,i)=>n?r(n):Tm(e,i.atime,i.mtime,r))}function Um(t,e,r,n,i,o){return e?e&&!e.isDirectory()?o(new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`)):Gu(r,n,i,o):Xm(t.mode,r,n,i,o)}function Xm(t,e,r,n,i){xe.mkdir(r,o=>{if(o)return i(o);Gu(e,r,n,s=>s?i(s):ln(r,t,i))})}function Gu(t,e,r,n){xe.readdir(t,(i,o)=>i?n(i):Wu(o,t,e,r,n))}function Wu(t,e,r,n,i){let o=t.pop();return o?Hm(t,o,e,r,n,i):i()}function Hm(t,e,r,n,i,o){let s=ur.join(r,e),a=ur.join(n,e);lr.checkPaths(s,a,"copy",(c,h)=>{if(c)return o(c);let{destStat:u}=h;so(u,s,a,i,p=>p?o(p):Wu(t,r,n,i,o))})}function Gm(t,e,r,n,i){xe.readlink(e,(o,s)=>{if(o)return i(o);if(n.dereference&&(s=ur.resolve(process.cwd(),s)),t)xe.readlink(r,(a,c)=>a?a.code==="EINVAL"||a.code==="UNKNOWN"?xe.symlink(s,r,i):i(a):(n.dereference&&(c=ur.resolve(process.cwd(),c)),lr.isSrcSubdir(s,c)?i(new Error(`Cannot copy '${s}' to a subdirectory of itself, '${c}'.`)):t.isDirectory()&&lr.isSrcSubdir(c,s)?i(new Error(`Cannot overwrite '${c}' with '${s}'.`)):Wm(s,r,i)));else return xe.symlink(s,r,i)})}function Wm(t,e,r){xe.unlink(e,n=>n?r(n):xe.symlink(t,e,r))}zu.exports=Mm});var ao=y((x2,Vu)=>{"use strict";var zm=we().fromCallback;Vu.exports={copy:zm(Ju())}});var il=y((S2,nl)=>{"use strict";var Ku=fe(),el=require("path"),W=require("assert"),fr=process.platform==="win32";function tl(t){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(r=>{t[r]=t[r]||Ku[r],r=r+"Sync",t[r]=t[r]||Ku[r]}),t.maxBusyTries=t.maxBusyTries||3}function co(t,e,r){let n=0;typeof e=="function"&&(r=e,e={}),W(t,"rimraf: missing path"),W.strictEqual(typeof t,"string","rimraf: path should be a string"),W.strictEqual(typeof r,"function","rimraf: callback function required"),W(e,"rimraf: invalid options argument provided"),W.strictEqual(typeof e,"object","rimraf: options should be object"),tl(e),Yu(t,e,function i(o){if(o){if((o.code==="EBUSY"||o.code==="ENOTEMPTY"||o.code==="EPERM")&&n<e.maxBusyTries){n++;let s=n*100;return setTimeout(()=>Yu(t,e,i),s)}o.code==="ENOENT"&&(o=null)}r(o)})}function Yu(t,e,r){W(t),W(e),W(typeof r=="function"),e.lstat(t,(n,i)=>{if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&fr)return Qu(t,e,n,r);if(i&&i.isDirectory())return fn(t,e,n,r);e.unlink(t,o=>{if(o){if(o.code==="ENOENT")return r(null);if(o.code==="EPERM")return fr?Qu(t,e,o,r):fn(t,e,o,r);if(o.code==="EISDIR")return fn(t,e,o,r)}return r(o)})})}function Qu(t,e,r,n){W(t),W(e),W(typeof n=="function"),e.chmod(t,438,i=>{i?n(i.code==="ENOENT"?null:r):e.stat(t,(o,s)=>{o?n(o.code==="ENOENT"?null:r):s.isDirectory()?fn(t,e,r,n):e.unlink(t,n)})})}function Zu(t,e,r){let n;W(t),W(e);try{e.chmodSync(t,438)}catch(i){if(i.code==="ENOENT")return;throw r}try{n=e.statSync(t)}catch(i){if(i.code==="ENOENT")return;throw r}n.isDirectory()?dn(t,e,r):e.unlinkSync(t)}function fn(t,e,r,n){W(t),W(e),W(typeof n=="function"),e.rmdir(t,i=>{i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")?Jm(t,e,n):i&&i.code==="ENOTDIR"?n(r):n(i)})}function Jm(t,e,r){W(t),W(e),W(typeof r=="function"),e.readdir(t,(n,i)=>{if(n)return r(n);let o=i.length,s;if(o===0)return e.rmdir(t,r);i.forEach(a=>{co(el.join(t,a),e,c=>{if(!s){if(c)return r(s=c);--o===0&&e.rmdir(t,r)}})})})}function rl(t,e){let r;e=e||{},tl(e),W(t,"rimraf: missing path"),W.strictEqual(typeof t,"string","rimraf: path should be a string"),W(e,"rimraf: missing options"),W.strictEqual(typeof e,"object","rimraf: options should be object");try{r=e.lstatSync(t)}catch(n){if(n.code==="ENOENT")return;n.code==="EPERM"&&fr&&Zu(t,e,n)}try{r&&r.isDirectory()?dn(t,e,null):e.unlinkSync(t)}catch(n){if(n.code==="ENOENT")return;if(n.code==="EPERM")return fr?Zu(t,e,n):dn(t,e,n);if(n.code!=="EISDIR")throw n;dn(t,e,n)}}function dn(t,e,r){W(t),W(e);try{e.rmdirSync(t)}catch(n){if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")Vm(t,e);else if(n.code!=="ENOENT")throw n}}function Vm(t,e){if(W(t),W(e),e.readdirSync(t).forEach(r=>rl(el.join(t,r),e)),fr){let r=Date.now();do try{return e.rmdirSync(t,e)}catch{}while(Date.now()-r<500)}else return e.rmdirSync(t,e)}nl.exports=co;co.sync=rl});var dr=y((E2,sl)=>{"use strict";var Km=we().fromCallback,ol=il();sl.exports={remove:Km(ol),removeSync:ol.sync}});var pl=y((C2,hl)=>{"use strict";var Ym=we().fromCallback,ul=fe(),ll=require("path"),fl=je(),dl=dr(),al=Ym(function(e,r){r=r||function(){},ul.readdir(e,(n,i)=>{if(n)return fl.mkdirs(e,r);i=i.map(s=>ll.join(e,s)),o();function o(){let s=i.pop();if(!s)return r();dl.remove(s,a=>{if(a)return r(a);o()})}})});function cl(t){let e;try{e=ul.readdirSync(t)}catch{return fl.mkdirsSync(t)}e.forEach(r=>{r=ll.join(t,r),dl.removeSync(r)})}hl.exports={emptyDirSync:cl,emptydirSync:cl,emptyDir:al,emptydir:al}});var vl=y((P2,yl)=>{"use strict";var Qm=we().fromCallback,ml=require("path"),rt=fe(),gl=je();function Zm(t,e){function r(){rt.writeFile(t,"",n=>{if(n)return e(n);e()})}rt.stat(t,(n,i)=>{if(!n&&i.isFile())return e();let o=ml.dirname(t);rt.stat(o,(s,a)=>{if(s)return s.code==="ENOENT"?gl.mkdirs(o,c=>{if(c)return e(c);r()}):e(s);a.isDirectory()?r():rt.readdir(o,c=>{if(c)return e(c)})})})}function eg(t){let e;try{e=rt.statSync(t)}catch{}if(e&&e.isFile())return;let r=ml.dirname(t);try{rt.statSync(r).isDirectory()||rt.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")gl.mkdirsSync(r);else throw n}rt.writeFileSync(t,"")}yl.exports={createFile:Qm(Zm),createFileSync:eg}});var Sl=y((D2,xl)=>{"use strict";var tg=we().fromCallback,wl=require("path"),mt=fe(),_l=je(),bl=tt().pathExists;function rg(t,e,r){function n(i,o){mt.link(i,o,s=>{if(s)return r(s);r(null)})}bl(e,(i,o)=>{if(i)return r(i);if(o)return r(null);mt.lstat(t,s=>{if(s)return s.message=s.message.replace("lstat","ensureLink"),r(s);let a=wl.dirname(e);bl(a,(c,h)=>{if(c)return r(c);if(h)return n(t,e);_l.mkdirs(a,u=>{if(u)return r(u);n(t,e)})})})})}function ng(t,e){if(mt.existsSync(e))return;try{mt.lstatSync(t)}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let n=wl.dirname(e);return mt.existsSync(n)||_l.mkdirsSync(n),mt.linkSync(t,e)}xl.exports={createLink:tg(rg),createLinkSync:ng}});var Cl=y((O2,El)=>{"use strict";var nt=require("path"),hr=fe(),ig=tt().pathExists;function og(t,e,r){if(nt.isAbsolute(t))return hr.lstat(t,n=>n?(n.message=n.message.replace("lstat","ensureSymlink"),r(n)):r(null,{toCwd:t,toDst:t}));{let n=nt.dirname(e),i=nt.join(n,t);return ig(i,(o,s)=>o?r(o):s?r(null,{toCwd:i,toDst:t}):hr.lstat(t,a=>a?(a.message=a.message.replace("lstat","ensureSymlink"),r(a)):r(null,{toCwd:t,toDst:nt.relative(n,t)})))}}function sg(t,e){let r;if(nt.isAbsolute(t)){if(r=hr.existsSync(t),!r)throw new Error("absolute srcpath does not exist");return{toCwd:t,toDst:t}}else{let n=nt.dirname(e),i=nt.join(n,t);if(r=hr.existsSync(i),r)return{toCwd:i,toDst:t};if(r=hr.existsSync(t),!r)throw new Error("relative srcpath does not exist");return{toCwd:t,toDst:nt.relative(n,t)}}}El.exports={symlinkPaths:og,symlinkPathsSync:sg}});var Ol=y((A2,Dl)=>{"use strict";var Pl=fe();function ag(t,e,r){if(r=typeof e=="function"?e:r,e=typeof e=="function"?!1:e,e)return r(null,e);Pl.lstat(t,(n,i)=>{if(n)return r(null,"file");e=i&&i.isDirectory()?"dir":"file",r(null,e)})}function cg(t,e){let r;if(e)return e;try{r=Pl.lstatSync(t)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}Dl.exports={symlinkType:ag,symlinkTypeSync:cg}});var Ml=y((I2,Tl)=>{"use strict";var ug=we().fromCallback,Il=require("path"),Nt=fe(),Rl=je(),lg=Rl.mkdirs,fg=Rl.mkdirsSync,Fl=Cl(),dg=Fl.symlinkPaths,hg=Fl.symlinkPathsSync,kl=Ol(),pg=kl.symlinkType,mg=kl.symlinkTypeSync,Al=tt().pathExists;function gg(t,e,r,n){n=typeof r=="function"?r:n,r=typeof r=="function"?!1:r,Al(e,(i,o)=>{if(i)return n(i);if(o)return n(null);dg(t,e,(s,a)=>{if(s)return n(s);t=a.toDst,pg(a.toCwd,r,(c,h)=>{if(c)return n(c);let u=Il.dirname(e);Al(u,(p,g)=>{if(p)return n(p);if(g)return Nt.symlink(t,e,h,n);lg(u,m=>{if(m)return n(m);Nt.symlink(t,e,h,n)})})})})})}function yg(t,e,r){if(Nt.existsSync(e))return;let i=hg(t,e);t=i.toDst,r=mg(i.toCwd,r);let o=Il.dirname(e);return Nt.existsSync(o)||fg(o),Nt.symlinkSync(t,e,r)}Tl.exports={createSymlink:ug(gg),createSymlinkSync:yg}});var Nl=y((R2,ql)=>{"use strict";var hn=vl(),pn=Sl(),mn=Ml();ql.exports={createFile:hn.createFile,createFileSync:hn.createFileSync,ensureFile:hn.createFile,ensureFileSync:hn.createFileSync,createLink:pn.createLink,createLinkSync:pn.createLinkSync,ensureLink:pn.createLink,ensureLinkSync:pn.createLinkSync,createSymlink:mn.createSymlink,createSymlinkSync:mn.createSymlinkSync,ensureSymlink:mn.createSymlink,ensureSymlinkSync:mn.createSymlinkSync}});var gn=y((F2,jl)=>{function vg(t,{EOL:e=`
15
+ `,finalEOL:r=!0,replacer:n=null,spaces:i}={}){let o=r?e:"";return JSON.stringify(t,n,i).replace(/\n/g,e)+o}function bg(t){return Buffer.isBuffer(t)&&(t=t.toString("utf8")),t.replace(/^\uFEFF/,"")}jl.exports={stringify:vg,stripBom:bg}});var Ul=y((k2,Bl)=>{var jt;try{jt=fe()}catch{jt=require("fs")}var yn=we(),{stringify:$l,stripBom:Ll}=gn();async function wg(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||jt,n="throws"in e?e.throws:!0,i=await yn.fromCallback(r.readFile)(t,e);i=Ll(i);let o;try{o=JSON.parse(i,e?e.reviver:null)}catch(s){if(n)throw s.message=`${t}: ${s.message}`,s;return null}return o}var _g=yn.fromPromise(wg);function xg(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||jt,n="throws"in e?e.throws:!0;try{let i=r.readFileSync(t,e);return i=Ll(i),JSON.parse(i,e.reviver)}catch(i){if(n)throw i.message=`${t}: ${i.message}`,i;return null}}async function Sg(t,e,r={}){let n=r.fs||jt,i=$l(e,r);await yn.fromCallback(n.writeFile)(t,i,r)}var Eg=yn.fromPromise(Sg);function Cg(t,e,r={}){let n=r.fs||jt,i=$l(e,r);return n.writeFileSync(t,i,r)}var Pg={readFile:_g,readFileSync:xg,writeFile:Eg,writeFileSync:Cg};Bl.exports=Pg});var Hl=y((T2,Xl)=>{"use strict";var vn=Ul();Xl.exports={readJson:vn.readFile,readJsonSync:vn.readFileSync,writeJson:vn.writeFile,writeJsonSync:vn.writeFileSync}});var bn=y((M2,zl)=>{"use strict";var Dg=we().fromCallback,pr=fe(),Gl=require("path"),Wl=je(),Og=tt().pathExists;function Ag(t,e,r,n){typeof r=="function"&&(n=r,r="utf8");let i=Gl.dirname(t);Og(i,(o,s)=>{if(o)return n(o);if(s)return pr.writeFile(t,e,r,n);Wl.mkdirs(i,a=>{if(a)return n(a);pr.writeFile(t,e,r,n)})})}function Ig(t,...e){let r=Gl.dirname(t);if(pr.existsSync(r))return pr.writeFileSync(t,...e);Wl.mkdirsSync(r),pr.writeFileSync(t,...e)}zl.exports={outputFile:Dg(Ag),outputFileSync:Ig}});var Vl=y((q2,Jl)=>{"use strict";var{stringify:Rg}=gn(),{outputFile:Fg}=bn();async function kg(t,e,r={}){let n=Rg(e,r);await Fg(t,n,r)}Jl.exports=kg});var Yl=y((N2,Kl)=>{"use strict";var{stringify:Tg}=gn(),{outputFileSync:Mg}=bn();function qg(t,e,r){let n=Tg(e,r);Mg(t,n,r)}Kl.exports=qg});var Zl=y((j2,Ql)=>{"use strict";var Ng=we().fromPromise,ge=Hl();ge.outputJson=Ng(Vl());ge.outputJsonSync=Yl();ge.outputJSON=ge.outputJson;ge.outputJSONSync=ge.outputJsonSync;ge.writeJSON=ge.writeJson;ge.writeJSONSync=ge.writeJsonSync;ge.readJSON=ge.readJson;ge.readJSONSync=ge.readJsonSync;Ql.exports=ge});var sf=y(($2,of)=>{"use strict";var rf=fe(),jg=require("path"),$g=oo().copySync,nf=dr().removeSync,Lg=je().mkdirpSync,ef=sr();function Bg(t,e,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:i}=ef.checkPathsSync(t,e,"move");return ef.checkParentPathsSync(t,i,e,"move"),Lg(jg.dirname(e)),Ug(t,e,n)}function Ug(t,e,r){if(r)return nf(e),tf(t,e,r);if(rf.existsSync(e))throw new Error("dest already exists.");return tf(t,e,r)}function tf(t,e,r){try{rf.renameSync(t,e)}catch(n){if(n.code!=="EXDEV")throw n;return Xg(t,e,r)}}function Xg(t,e,r){return $g(t,e,{overwrite:r,errorOnExist:!0}),nf(t)}of.exports=Bg});var cf=y((L2,af)=>{"use strict";af.exports={moveSync:sf()}});var hf=y((B2,df)=>{"use strict";var Hg=fe(),Gg=require("path"),Wg=ao().copy,ff=dr().remove,zg=je().mkdirp,Jg=tt().pathExists,uf=sr();function Vg(t,e,r,n){typeof r=="function"&&(n=r,r={});let i=r.overwrite||r.clobber||!1;uf.checkPaths(t,e,"move",(o,s)=>{if(o)return n(o);let{srcStat:a}=s;uf.checkParentPaths(t,a,e,"move",c=>{if(c)return n(c);zg(Gg.dirname(e),h=>h?n(h):Kg(t,e,i,n))})})}function Kg(t,e,r,n){if(r)return ff(e,i=>i?n(i):lf(t,e,r,n));Jg(e,(i,o)=>i?n(i):o?n(new Error("dest already exists.")):lf(t,e,r,n))}function lf(t,e,r,n){Hg.rename(t,e,i=>i?i.code!=="EXDEV"?n(i):Yg(t,e,r,n):n())}function Yg(t,e,r,n){Wg(t,e,{overwrite:r,errorOnExist:!0},o=>o?n(o):ff(t,n))}df.exports=Vg});var mf=y((U2,pf)=>{"use strict";var Qg=we().fromCallback;pf.exports={move:Qg(hf())}});var $t=y((X2,uo)=>{"use strict";uo.exports={...or(),...oo(),...ao(),...pl(),...Nl(),...Zl(),...je(),...cf(),...mf(),...bn(),...tt(),...dr()};var gf=require("fs");Object.getOwnPropertyDescriptor(gf,"promises")&&Object.defineProperty(uo.exports,"promises",{get(){return gf.promises}})});var Cf=y((G2,Ef)=>{"use strict";Ef.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var ho=y((W2,Df)=>{var mr=Cf(),Pf={};for(let t of Object.keys(mr))Pf[mr[t]]=t;var O={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Df.exports=O;for(let t of Object.keys(O)){if(!("channels"in O[t]))throw new Error("missing channels property: "+t);if(!("labels"in O[t]))throw new Error("missing channel labels property: "+t);if(O[t].labels.length!==O[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=O[t];delete O[t].channels,delete O[t].labels,Object.defineProperty(O[t],"channels",{value:e}),Object.defineProperty(O[t],"labels",{value:r})}O.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),o=Math.max(e,r,n),s=o-i,a,c;o===i?a=0:e===o?a=(r-n)/s:r===o?a=2+(n-e)/s:n===o&&(a=4+(e-r)/s),a=Math.min(a*60,360),a<0&&(a+=360);let h=(i+o)/2;return o===i?c=0:h<=.5?c=s/(o+i):c=s/(2-o-i),[a,c*100,h*100]};O.rgb.hsv=function(t){let e,r,n,i,o,s=t[0]/255,a=t[1]/255,c=t[2]/255,h=Math.max(s,a,c),u=h-Math.min(s,a,c),p=function(g){return(h-g)/6/u+1/2};return u===0?(i=0,o=0):(o=u/h,e=p(s),r=p(a),n=p(c),s===h?i=n-r:a===h?i=1/3+e-n:c===h&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,h*100]};O.rgb.hwb=function(t){let e=t[0],r=t[1],n=t[2],i=O.rgb.hsl(t)[0],o=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,o*100,n*100]};O.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(1-e,1-r,1-n),o=(1-e-i)/(1-i)||0,s=(1-r-i)/(1-i)||0,a=(1-n-i)/(1-i)||0;return[o*100,s*100,a*100,i*100]};function ey(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}O.rgb.keyword=function(t){let e=Pf[t];if(e)return e;let r=1/0,n;for(let i of Object.keys(mr)){let o=mr[i],s=ey(t,o);s<r&&(r=s,n=i)}return n};O.keyword.rgb=function(t){return mr[t]};O.rgb.xyz=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;let i=e*.4124+r*.3576+n*.1805,o=e*.2126+r*.7152+n*.0722,s=e*.0193+r*.1192+n*.9505;return[i*100,o*100,s*100]};O.rgb.lab=function(t){let e=O.rgb.xyz(t),r=e[0],n=e[1],i=e[2];r/=95.047,n/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;let o=116*n-16,s=500*(r-n),a=200*(n-i);return[o,s,a]};O.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i,o,s;if(r===0)return s=n*255,[s,s,s];n<.5?i=n*(1+r):i=n+r-n*r;let a=2*n-i,c=[0,0,0];for(let h=0;h<3;h++)o=e+1/3*-(h-1),o<0&&o++,o>1&&o--,6*o<1?s=a+(i-a)*6*o:2*o<1?s=i:3*o<2?s=a+(i-a)*(2/3-o)*6:s=a,c[h]=s*255;return c};O.hsl.hsv=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=r,o=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=o<=1?o:2-o;let s=(n+r)/2,a=n===0?2*i/(o+i):2*r/(n+r);return[e,a*100,s*100]};O.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,o=e-Math.floor(e),s=255*n*(1-r),a=255*n*(1-r*o),c=255*n*(1-r*(1-o));switch(n*=255,i){case 0:return[n,c,s];case 1:return[a,n,s];case 2:return[s,n,c];case 3:return[s,a,n];case 4:return[c,s,n];case 5:return[n,s,a]}};O.hsv.hsl=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),o,s;s=(2-r)*n;let a=(2-r)*i;return o=r*i,o/=a<=1?a:2-a,o=o||0,s/=2,[e,o*100,s*100]};O.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,o;i>1&&(r/=i,n/=i);let s=Math.floor(6*e),a=1-n;o=6*e-s,s&1&&(o=1-o);let c=r+o*(a-r),h,u,p;switch(s){default:case 6:case 0:h=a,u=c,p=r;break;case 1:h=c,u=a,p=r;break;case 2:h=r,u=a,p=c;break;case 3:h=r,u=c,p=a;break;case 4:h=c,u=r,p=a;break;case 5:h=a,u=r,p=c;break}return[h*255,u*255,p*255]};O.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,o=1-Math.min(1,e*(1-i)+i),s=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i);return[o*255,s*255,a*255]};O.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i,o,s;return i=e*3.2406+r*-1.5372+n*-.4986,o=e*-.9689+r*1.8758+n*.0415,s=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[i*255,o*255,s*255]};O.xyz.lab=function(t){let e=t[0],r=t[1],n=t[2];e/=95.047,r/=100,n/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let i=116*r-16,o=500*(e-r),s=200*(r-n);return[i,o,s]};O.lab.xyz=function(t){let e=t[0],r=t[1],n=t[2],i,o,s;o=(e+16)/116,i=r/500+o,s=o-n/200;let a=o**3,c=i**3,h=s**3;return o=a>.008856?a:(o-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,s=h>.008856?h:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]};O.lab.lch=function(t){let e=t[0],r=t[1],n=t[2],i;i=Math.atan2(n,r)*360/2/Math.PI,i<0&&(i+=360);let s=Math.sqrt(r*r+n*n);return[e,s,i]};O.lch.lab=function(t){let e=t[0],r=t[1],i=t[2]/360*2*Math.PI,o=r*Math.cos(i),s=r*Math.sin(i);return[e,o,s]};O.rgb.ansi16=function(t,e=null){let[r,n,i]=t,o=e===null?O.rgb.hsv(t)[2]:e;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return o===2&&(s+=60),s};O.hsv.ansi16=function(t){return O.rgb.ansi16(O.hsv.rgb(t),t[2])};O.rgb.ansi256=function(t){let e=t[0],r=t[1],n=t[2];return e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};O.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(~~(t>50)+1)*.5,n=(e&1)*r*255,i=(e>>1&1)*r*255,o=(e>>2&1)*r*255;return[n,i,o]};O.ansi256.rgb=function(t){if(t>=232){let o=(t-232)*10+8;return[o,o,o]}t-=16;let e,r=Math.floor(t/36)/5*255,n=Math.floor((e=t%36)/6)/5*255,i=e%6/5*255;return[r,n,i]};O.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};O.hex.rgb=function(t){let e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=r.split("").map(a=>a+a).join(""));let n=parseInt(r,16),i=n>>16&255,o=n>>8&255,s=n&255;return[i,o,s]};O.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.max(Math.max(e,r),n),o=Math.min(Math.min(e,r),n),s=i-o,a,c;return s<1?a=o/(1-s):a=0,s<=0?c=0:i===e?c=(r-n)/s%6:i===r?c=2+(n-e)/s:c=4+(e-r)/s,c/=6,c%=1,[c*360,s*100,a*100]};O.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,n=r<.5?2*e*r:2*e*(1-r),i=0;return n<1&&(i=(r-.5*n)/(1-n)),[t[0],n*100,i*100]};O.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,n=e*r,i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],n*100,i*100]};O.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100;if(r===0)return[n*255,n*255,n*255];let i=[0,0,0],o=e%1*6,s=o%1,a=1-s,c=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return c=(1-r)*n,[(r*i[0]+c)*255,(r*i[1]+c)*255,(r*i[2]+c)*255]};O.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,n=e+r*(1-e),i=0;return n>0&&(i=e/n),[t[0],i*100,n*100]};O.hcg.hsl=function(t){let e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],i*100,n*100]};O.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,n=e+r*(1-e);return[t[0],(n-e)*100,(1-n)*100]};O.hwb.hcg=function(t){let e=t[1]/100,n=1-t[2]/100,i=n-e,o=0;return i<1&&(o=(n-i)/(1-i)),[t[0],i*100,o*100]};O.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};O.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};O.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};O.gray.hsl=function(t){return[0,0,t[0]]};O.gray.hsv=O.gray.hsl;O.gray.hwb=function(t){return[0,100,t[0]]};O.gray.cmyk=function(t){return[0,0,0,t[0]]};O.gray.lab=function(t){return[t[0],0,0]};O.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n};O.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var Af=y((z2,Of)=>{var _n=ho();function ty(){let t={},e=Object.keys(_n);for(let r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function ry(t){let e=ty(),r=[t];for(e[t].distance=0;r.length;){let n=r.pop(),i=Object.keys(_n[n]);for(let o=i.length,s=0;s<o;s++){let a=i[s],c=e[a];c.distance===-1&&(c.distance=e[n].distance+1,c.parent=n,r.unshift(a))}}return e}function ny(t,e){return function(r){return e(t(r))}}function iy(t,e){let r=[e[t].parent,t],n=_n[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=ny(_n[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}Of.exports=function(t){let e=ry(t),r={},n=Object.keys(e);for(let i=n.length,o=0;o<i;o++){let s=n[o];e[s].parent!==null&&(r[s]=iy(s,e))}return r}});var Rf=y((J2,If)=>{var po=ho(),oy=Af(),Lt={},sy=Object.keys(po);function ay(t){let e=function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function cy(t){let e=function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let i=t(r);if(typeof i=="object")for(let o=i.length,s=0;s<o;s++)i[s]=Math.round(i[s]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}sy.forEach(t=>{Lt[t]={},Object.defineProperty(Lt[t],"channels",{value:po[t].channels}),Object.defineProperty(Lt[t],"labels",{value:po[t].labels});let e=oy(t);Object.keys(e).forEach(n=>{let i=e[n];Lt[t][n]=cy(i),Lt[t][n].raw=ay(i)})});If.exports=Lt});var Nf=y((V2,qf)=>{"use strict";var Ff=(t,e)=>(...r)=>`\x1B[${t(...r)+e}m`,kf=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};5;${n}m`},Tf=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};2;${n[0]};${n[1]};${n[2]}m`},xn=t=>t,Mf=(t,e,r)=>[t,e,r],Bt=(t,e,r)=>{Object.defineProperty(t,e,{get:()=>{let n=r();return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})},mo,Ut=(t,e,r,n)=>{mo===void 0&&(mo=Rf());let i=n?10:0,o={};for(let[s,a]of Object.entries(mo)){let c=s==="ansi16"?"ansi":s;s===e?o[c]=t(r,i):typeof a=="object"&&(o[c]=t(a[e],i))}return o};function uy(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[r,n]of Object.entries(e)){for(let[i,o]of Object.entries(n))e[i]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},n[i]=e[i],t.set(o[0],o[1]);Object.defineProperty(e,r,{value:n,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",Bt(e.color,"ansi",()=>Ut(Ff,"ansi16",xn,!1)),Bt(e.color,"ansi256",()=>Ut(kf,"ansi256",xn,!1)),Bt(e.color,"ansi16m",()=>Ut(Tf,"rgb",Mf,!1)),Bt(e.bgColor,"ansi",()=>Ut(Ff,"ansi16",xn,!0)),Bt(e.bgColor,"ansi256",()=>Ut(kf,"ansi256",xn,!0)),Bt(e.bgColor,"ansi16m",()=>Ut(Tf,"rgb",Mf,!0)),e}Object.defineProperty(qf,"exports",{enumerable:!0,get:uy})});var $f=y((K2,jf)=>{"use strict";var ly=(t,e,r)=>{let n=t.indexOf(e);if(n===-1)return t;let i=e.length,o=0,s="";do s+=t.substr(o,n-o)+e+r,o=n+i,n=t.indexOf(e,o);while(n!==-1);return s+=t.substr(o),s},fy=(t,e,r,n)=>{let i=0,o="";do{let s=t[n-1]==="\r";o+=t.substr(i,(s?n-1:n)-i)+e+(s?`\r
16
16
  `:`
17
17
  `)+r,i=n+1,n=t.indexOf(`
18
- `,i)}while(n!==-1);return o+=t.substr(i),o};qf.exports={stringReplaceAll:ly,stringEncaseCRLFWithFirstIndex:fy}});var Uf=y((W2,Bf)=>{"use strict";var dy=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,jf=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,hy=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,py=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,my=new Map([["n",`
19
- `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Lf(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):my.get(t)||t}function gy(t,e){let r=[],n=e.trim().split(/\s*,\s*/g),i;for(let o of n){let s=Number(o);if(!Number.isNaN(s))r.push(s);else if(i=o.match(hy))r.push(i[2].replace(py,(a,c,f)=>c?Lf(c):f));else throw new Error(`Invalid Chalk template style argument: ${o} (in style '${t}')`)}return r}function yy(t){jf.lastIndex=0;let e=[],r;for(;(r=jf.exec(t))!==null;){let n=r[1];if(r[2]){let i=gy(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function $f(t,e){let r={};for(let i of e)for(let o of i.styles)r[o[0]]=i.inverse?null:o.slice(1);let n=t;for(let[i,o]of Object.entries(r))if(Array.isArray(o)){if(!(i in n))throw new Error(`Unknown Chalk style: ${i}`);n=o.length>0?n[i](...o):n[i]}return n}Bf.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(dy,(o,s,a,c,f,u)=>{if(s)i.push(Lf(s));else if(c){let p=i.join("");i=[],n.push(r.length===0?p:$f(t,r)(p)),r.push({inverse:a,styles:yy(c)})}else if(f){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push($f(t,r)(i.join(""))),i=[],r.pop()}else i.push(u)}),n.push(i.join("")),r.length>0){let o=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(o)}return n.join("")}});var Vf=y((z2,Jf)=>{"use strict";var yr=Tf(),{stdout:go,stderr:yo}=_i(),{stringReplaceAll:vy,stringEncaseCRLFWithFirstIndex:by}=Nf(),{isArray:Sn}=Array,Xf=["ansi","ansi","ansi256","ansi16m"],Ht=Object.create(null),_y=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=go?go.level:0;t.level=e.level===void 0?r:e.level},vo=class{constructor(e){return Hf(e)}},Hf=t=>{let e={};return _y(e,t),e.template=(...r)=>zf(e.template,...r),Object.setPrototypeOf(e,En.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=vo,e.template};function En(t){return Hf(t)}for(let[t,e]of Object.entries(yr))Ht[t]={get(){let r=Pn(this,bo(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Ht.visible={get(){let t=Pn(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var Wf=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of Wf)Ht[t]={get(){let{level:e}=this;return function(...r){let n=bo(yr.color[Xf[e]][t](...r),yr.color.close,this._styler);return Pn(this,n,this._isEmpty)}}};for(let t of Wf){let e="bg"+t[0].toUpperCase()+t.slice(1);Ht[e]={get(){let{level:r}=this;return function(...n){let i=bo(yr.bgColor[Xf[r]][t](...n),yr.bgColor.close,this._styler);return Pn(this,i,this._isEmpty)}}}}var wy=Object.defineProperties(()=>{},{...Ht,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),bo=(t,e,r)=>{let n,i;return r===void 0?(n=t,i=e):(n=r.openAll+t,i=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:i,parent:r}},Pn=(t,e,r)=>{let n=(...i)=>Sn(i[0])&&Sn(i[0].raw)?Gf(n,zf(n,...i)):Gf(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,wy),n._generator=t,n._styler=e,n._isEmpty=r,n},Gf=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:n,closeAll:i}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=vy(e,r.close,r.open),r=r.parent;let o=e.indexOf(`
20
- `);return o!==-1&&(e=by(e,i,n,o)),n+e+i},mo,zf=(t,...e)=>{let[r]=e;if(!Sn(r)||!Sn(r.raw))return e.join(" ");let n=e.slice(1),i=[r.raw[0]];for(let o=1;o<r.length;o++)i.push(String(n[o-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[o]));return mo===void 0&&(mo=Uf()),mo(t,i.join(""))};Object.defineProperties(En.prototype,Ht);var Cn=En();Cn.supportsColor=go;Cn.stderr=En({level:yo?yo.level:0});Cn.stderr.supportsColor=yo;Jf.exports=Cn});var Kf=y((_o,wo)=>{(function(t,e){typeof _o=="object"&&typeof wo<"u"?wo.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.tinycolor=e())})(_o,function(){"use strict";function t(l){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},t(l)}var e=/^\s+/,r=/\s+$/;function n(l,h){if(l=l||"",h=h||{},l instanceof n)return l;if(!(this instanceof n))return new n(l,h);var d=i(l);this._originalInput=l,this._r=d.r,this._g=d.g,this._b=d.b,this._a=d.a,this._roundA=Math.round(100*this._a)/100,this._format=h.format||d.format,this._gradientType=h.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=d.ok}n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var h=this.toRgb();return(h.r*299+h.g*587+h.b*114)/1e3},getLuminance:function(){var h=this.toRgb(),d,v,S,w,j,X;return d=h.r/255,v=h.g/255,S=h.b/255,d<=.03928?w=d/12.92:w=Math.pow((d+.055)/1.055,2.4),v<=.03928?j=v/12.92:j=Math.pow((v+.055)/1.055,2.4),S<=.03928?X=S/12.92:X=Math.pow((S+.055)/1.055,2.4),.2126*w+.7152*j+.0722*X},setAlpha:function(h){return this._a=R(h),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var h=c(this._r,this._g,this._b);return{h:h.h*360,s:h.s,v:h.v,a:this._a}},toHsvString:function(){var h=c(this._r,this._g,this._b),d=Math.round(h.h*360),v=Math.round(h.s*100),S=Math.round(h.v*100);return this._a==1?"hsv("+d+", "+v+"%, "+S+"%)":"hsva("+d+", "+v+"%, "+S+"%, "+this._roundA+")"},toHsl:function(){var h=s(this._r,this._g,this._b);return{h:h.h*360,s:h.s,l:h.l,a:this._a}},toHslString:function(){var h=s(this._r,this._g,this._b),d=Math.round(h.h*360),v=Math.round(h.s*100),S=Math.round(h.l*100);return this._a==1?"hsl("+d+", "+v+"%, "+S+"%)":"hsla("+d+", "+v+"%, "+S+"%, "+this._roundA+")"},toHex:function(h){return u(this._r,this._g,this._b,h)},toHexString:function(h){return"#"+this.toHex(h)},toHex8:function(h){return p(this._r,this._g,this._b,this._a,h)},toHex8String:function(h){return"#"+this.toHex8(h)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(F(this._r,255)*100)+"%",g:Math.round(F(this._g,255)*100)+"%",b:Math.round(F(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(F(this._r,255)*100)+"%, "+Math.round(F(this._g,255)*100)+"%, "+Math.round(F(this._b,255)*100)+"%)":"rgba("+Math.round(F(this._r,255)*100)+"%, "+Math.round(F(this._g,255)*100)+"%, "+Math.round(F(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:x[u(this._r,this._g,this._b,!0)]||!1},toFilter:function(h){var d="#"+g(this._r,this._g,this._b,this._a),v=d,S=this._gradientType?"GradientType = 1, ":"";if(h){var w=n(h);v="#"+g(w._r,w._g,w._b,w._a)}return"progid:DXImageTransform.Microsoft.gradient("+S+"startColorstr="+d+",endColorstr="+v+")"},toString:function(h){var d=!!h;h=h||this._format;var v=!1,S=this._a<1&&this._a>=0,w=!d&&S&&(h==="hex"||h==="hex6"||h==="hex3"||h==="hex4"||h==="hex8"||h==="name");return w?h==="name"&&this._a===0?this.toName():this.toRgbString():(h==="rgb"&&(v=this.toRgbString()),h==="prgb"&&(v=this.toPercentageRgbString()),(h==="hex"||h==="hex6")&&(v=this.toHexString()),h==="hex3"&&(v=this.toHexString(!0)),h==="hex4"&&(v=this.toHex8String(!0)),h==="hex8"&&(v=this.toHex8String()),h==="name"&&(v=this.toName()),h==="hsl"&&(v=this.toHslString()),h==="hsv"&&(v=this.toHsvString()),v||this.toHexString())},clone:function(){return n(this.toString())},_applyModification:function(h,d){var v=h.apply(null,[this].concat([].slice.call(d)));return this._r=v._r,this._g=v._g,this._b=v._b,this.setAlpha(v._a),this},lighten:function(){return this._applyModification(P,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification($,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(E,arguments)},spin:function(){return this._applyModification(G,arguments)},_applyCombination:function(h,d){return h.apply(null,[this].concat([].slice.call(d)))},analogous:function(){return this._applyCombination(ve,arguments)},complement:function(){return this._applyCombination(H,arguments)},monochromatic:function(){return this._applyCombination(K,arguments)},splitcomplement:function(){return this._applyCombination(ae,arguments)},triad:function(){return this._applyCombination(J,[3])},tetrad:function(){return this._applyCombination(J,[4])}},n.fromRatio=function(l,h){if(t(l)=="object"){var d={};for(var v in l)l.hasOwnProperty(v)&&(v==="a"?d[v]=l[v]:d[v]=T(l[v]));l=d}return n(l,h)};function i(l){var h={r:0,g:0,b:0},d=1,v=null,S=null,w=null,j=!1,X=!1;return typeof l=="string"&&(l=xt(l)),t(l)=="object"&&(be(l.r)&&be(l.g)&&be(l.b)?(h=o(l.r,l.g,l.b),j=!0,X=String(l.r).substr(-1)==="%"?"prgb":"rgb"):be(l.h)&&be(l.s)&&be(l.v)?(v=T(l.s),S=T(l.v),h=f(l.h,v,S),j=!0,X="hsv"):be(l.h)&&be(l.s)&&be(l.l)&&(v=T(l.s),w=T(l.l),h=a(l.h,v,w),j=!0,X="hsl"),l.hasOwnProperty("a")&&(d=l.a)),d=R(d),{ok:j,format:l.format||X,r:Math.min(255,Math.max(h.r,0)),g:Math.min(255,Math.max(h.g,0)),b:Math.min(255,Math.max(h.b,0)),a:d}}function o(l,h,d){return{r:F(l,255)*255,g:F(h,255)*255,b:F(d,255)*255}}function s(l,h,d){l=F(l,255),h=F(h,255),d=F(d,255);var v=Math.max(l,h,d),S=Math.min(l,h,d),w,j,X=(v+S)/2;if(v==S)w=j=0;else{var B=v-S;switch(j=X>.5?B/(2-v-S):B/(v+S),v){case l:w=(h-d)/B+(h<d?6:0);break;case h:w=(d-l)/B+2;break;case d:w=(l-h)/B+4;break}w/=6}return{h:w,s:j,l:X}}function a(l,h,d){var v,S,w;l=F(l,360),h=F(h,100),d=F(d,100);function j(Ie,Qt,Te){return Te<0&&(Te+=1),Te>1&&(Te-=1),Te<1/6?Ie+(Qt-Ie)*6*Te:Te<1/2?Qt:Te<2/3?Ie+(Qt-Ie)*(2/3-Te)*6:Ie}if(h===0)v=S=w=d;else{var X=d<.5?d*(1+h):d+h-d*h,B=2*d-X;v=j(B,X,l+1/3),S=j(B,X,l),w=j(B,X,l-1/3)}return{r:v*255,g:S*255,b:w*255}}function c(l,h,d){l=F(l,255),h=F(h,255),d=F(d,255);var v=Math.max(l,h,d),S=Math.min(l,h,d),w,j,X=v,B=v-S;if(j=v===0?0:B/v,v==S)w=0;else{switch(v){case l:w=(h-d)/B+(h<d?6:0);break;case h:w=(d-l)/B+2;break;case d:w=(l-h)/B+4;break}w/=6}return{h:w,s:j,v:X}}function f(l,h,d){l=F(l,360)*6,h=F(h,100),d=F(d,100);var v=Math.floor(l),S=l-v,w=d*(1-h),j=d*(1-S*h),X=d*(1-(1-S)*h),B=v%6,Ie=[d,j,w,w,X,d][B],Qt=[X,d,d,j,w,w][B],Te=[w,w,X,d,d,j][B];return{r:Ie*255,g:Qt*255,b:Te*255}}function u(l,h,d,v){var S=[C(Math.round(l).toString(16)),C(Math.round(h).toString(16)),C(Math.round(d).toString(16))];return v&&S[0].charAt(0)==S[0].charAt(1)&&S[1].charAt(0)==S[1].charAt(1)&&S[2].charAt(0)==S[2].charAt(1)?S[0].charAt(0)+S[1].charAt(0)+S[2].charAt(0):S.join("")}function p(l,h,d,v,S){var w=[C(Math.round(l).toString(16)),C(Math.round(h).toString(16)),C(Math.round(d).toString(16)),C(Ae(v))];return S&&w[0].charAt(0)==w[0].charAt(1)&&w[1].charAt(0)==w[1].charAt(1)&&w[2].charAt(0)==w[2].charAt(1)&&w[3].charAt(0)==w[3].charAt(1)?w[0].charAt(0)+w[1].charAt(0)+w[2].charAt(0)+w[3].charAt(0):w.join("")}function g(l,h,d,v){var S=[C(Ae(v)),C(Math.round(l).toString(16)),C(Math.round(h).toString(16)),C(Math.round(d).toString(16))];return S.join("")}n.equals=function(l,h){return!l||!h?!1:n(l).toRgbString()==n(h).toRgbString()},n.random=function(){return n.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function m(l,h){h=h===0?0:h||10;var d=n(l).toHsl();return d.s-=h/100,d.s=U(d.s),n(d)}function b(l,h){h=h===0?0:h||10;var d=n(l).toHsl();return d.s+=h/100,d.s=U(d.s),n(d)}function E(l){return n(l).desaturate(100)}function P(l,h){h=h===0?0:h||10;var d=n(l).toHsl();return d.l+=h/100,d.l=U(d.l),n(d)}function k(l,h){h=h===0?0:h||10;var d=n(l).toRgb();return d.r=Math.max(0,Math.min(255,d.r-Math.round(255*-(h/100)))),d.g=Math.max(0,Math.min(255,d.g-Math.round(255*-(h/100)))),d.b=Math.max(0,Math.min(255,d.b-Math.round(255*-(h/100)))),n(d)}function $(l,h){h=h===0?0:h||10;var d=n(l).toHsl();return d.l-=h/100,d.l=U(d.l),n(d)}function G(l,h){var d=n(l).toHsl(),v=(d.h+h)%360;return d.h=v<0?360+v:v,n(d)}function H(l){var h=n(l).toHsl();return h.h=(h.h+180)%360,n(h)}function J(l,h){if(isNaN(h)||h<=0)throw new Error("Argument to polyad must be a positive number");for(var d=n(l).toHsl(),v=[n(l)],S=360/h,w=1;w<h;w++)v.push(n({h:(d.h+w*S)%360,s:d.s,l:d.l}));return v}function ae(l){var h=n(l).toHsl(),d=h.h;return[n(l),n({h:(d+72)%360,s:h.s,l:h.l}),n({h:(d+216)%360,s:h.s,l:h.l})]}function ve(l,h,d){h=h||6,d=d||30;var v=n(l).toHsl(),S=360/d,w=[n(l)];for(v.h=(v.h-(S*h>>1)+720)%360;--h;)v.h=(v.h+S)%360,w.push(n(v));return w}function K(l,h){h=h||6;for(var d=n(l).toHsv(),v=d.h,S=d.s,w=d.v,j=[],X=1/h;h--;)j.push(n({h:v,s:S,v:w})),w=(w+X)%1;return j}n.mix=function(l,h,d){d=d===0?0:d||50;var v=n(l).toRgb(),S=n(h).toRgb(),w=d/100,j={r:(S.r-v.r)*w+v.r,g:(S.g-v.g)*w+v.g,b:(S.b-v.b)*w+v.b,a:(S.a-v.a)*w+v.a};return n(j)},n.readability=function(l,h){var d=n(l),v=n(h);return(Math.max(d.getLuminance(),v.getLuminance())+.05)/(Math.min(d.getLuminance(),v.getLuminance())+.05)},n.isReadable=function(l,h,d){var v=n.readability(l,h),S,w;switch(w=!1,S=re(d),S.level+S.size){case"AAsmall":case"AAAlarge":w=v>=4.5;break;case"AAlarge":w=v>=3;break;case"AAAsmall":w=v>=7;break}return w},n.mostReadable=function(l,h,d){var v=null,S=0,w,j,X,B;d=d||{},j=d.includeFallbackColors,X=d.level,B=d.size;for(var Ie=0;Ie<h.length;Ie++)w=n.readability(l,h[Ie]),w>S&&(S=w,v=n(h[Ie]));return n.isReadable(l,v,{level:X,size:B})||!j?v:(d.includeFallbackColors=!1,n.mostReadable(l,["#fff","#000"],d))};var I=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},x=n.hexNames=_(I);function _(l){var h={};for(var d in l)l.hasOwnProperty(d)&&(h[l[d]]=d);return h}function R(l){return l=parseFloat(l),(isNaN(l)||l<0||l>1)&&(l=1),l}function F(l,h){L(l)&&(l="100%");var d=M(l);return l=Math.min(h,Math.max(0,parseFloat(l))),d&&(l=parseInt(l*h,10)/100),Math.abs(l-h)<1e-6?1:l%h/parseFloat(h)}function U(l){return Math.min(1,Math.max(0,l))}function A(l){return parseInt(l,16)}function L(l){return typeof l=="string"&&l.indexOf(".")!=-1&&parseFloat(l)===1}function M(l){return typeof l=="string"&&l.indexOf("%")!=-1}function C(l){return l.length==1?"0"+l:""+l}function T(l){return l<=1&&(l=l*100+"%"),l}function Ae(l){return Math.round(parseFloat(l)*255).toString(16)}function Me(l){return A(l)/255}var ce=function(){var l="[-\\+]?\\d+%?",h="[-\\+]?\\d*\\.\\d+%?",d="(?:"+h+")|(?:"+l+")",v="[\\s|\\(]+("+d+")[,|\\s]+("+d+")[,|\\s]+("+d+")\\s*\\)?",S="[\\s|\\(]+("+d+")[,|\\s]+("+d+")[,|\\s]+("+d+")[,|\\s]+("+d+")\\s*\\)?";return{CSS_UNIT:new RegExp(d),rgb:new RegExp("rgb"+v),rgba:new RegExp("rgba"+S),hsl:new RegExp("hsl"+v),hsla:new RegExp("hsla"+S),hsv:new RegExp("hsv"+v),hsva:new RegExp("hsva"+S),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function be(l){return!!ce.CSS_UNIT.exec(l)}function xt(l){l=l.replace(e,"").replace(r,"").toLowerCase();var h=!1;if(I[l])l=I[l],h=!0;else if(l=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var d;return(d=ce.rgb.exec(l))?{r:d[1],g:d[2],b:d[3]}:(d=ce.rgba.exec(l))?{r:d[1],g:d[2],b:d[3],a:d[4]}:(d=ce.hsl.exec(l))?{h:d[1],s:d[2],l:d[3]}:(d=ce.hsla.exec(l))?{h:d[1],s:d[2],l:d[3],a:d[4]}:(d=ce.hsv.exec(l))?{h:d[1],s:d[2],v:d[3]}:(d=ce.hsva.exec(l))?{h:d[1],s:d[2],v:d[3],a:d[4]}:(d=ce.hex8.exec(l))?{r:A(d[1]),g:A(d[2]),b:A(d[3]),a:Me(d[4]),format:h?"name":"hex8"}:(d=ce.hex6.exec(l))?{r:A(d[1]),g:A(d[2]),b:A(d[3]),format:h?"name":"hex"}:(d=ce.hex4.exec(l))?{r:A(d[1]+""+d[1]),g:A(d[2]+""+d[2]),b:A(d[3]+""+d[3]),a:Me(d[4]+""+d[4]),format:h?"name":"hex8"}:(d=ce.hex3.exec(l))?{r:A(d[1]+""+d[1]),g:A(d[2]+""+d[2]),b:A(d[3]+""+d[3]),format:h?"name":"hex"}:!1}function re(l){var h,d;return l=l||{level:"AA",size:"small"},h=(l.level||"AA").toUpperCase(),d=(l.size||"small").toLowerCase(),h!=="AA"&&h!=="AAA"&&(h="AA"),d!=="small"&&d!=="large"&&(d="small"),{level:h,size:d}}return n})});var nd=y((J2,rd)=>{var vr=Kf(),ed={r:256,g:256,b:256,a:1},td={h:360,s:1,v:1,a:1};function So(t,e,r){let n={};for(let i in t)t.hasOwnProperty(i)&&(n[i]=r===0?0:(e[i]-t[i])/r);return n}function Eo(t,e,r,n){let i={};for(let o in e)e.hasOwnProperty(o)&&(i[o]=t[o]*r+e[o],i[o]=i[o]<0?i[o]+n[o]:n[o]!==1?i[o]%n[o]:i[o]);return i}function xo(t,e,r){let n=t.color.toRgb(),i=e.color.toRgb(),o=So(n,i,r),s=[t.color];for(let a=1;a<r;a++){let c=Eo(o,n,a,ed);s.push(vr(c))}return s}function Yf(t,e,r,n){let i=t.color.toHsv(),o=e.color.toHsv();if(i.s===0||o.s===0)return xo(t,e,r);let s;if(typeof n=="boolean")s=n;else{let u=i.h<o.h&&o.h-i.h<180||i.h>o.h&&i.h-o.h>180;s=n==="long"&&u||n==="short"&&!u}let a=So(i,o,r),c=[t.color],f;i.h<=o.h&&!s||i.h>=o.h&&s?f=o.h-i.h:s?f=360-o.h+i.h:f=360-i.h+o.h,a.h=Math.pow(-1,s?1:0)*Math.abs(f)/r;for(let u=1;u<r;u++){let p=Eo(a,i,u,td);c.push(vr(p))}return c}function Qf(t,e){let r=t.length;if(e=parseInt(e,10),isNaN(e)||e<2)throw new Error("Invalid number of steps (< 2)");if(e<r)throw new Error("Number of steps cannot be inferior to number of stops");let n=[];for(let o=1;o<r;o++){let s=(e-1)*(t[o].pos-t[o-1].pos);n.push(Math.max(1,Math.round(s)))}let i=1;for(let o=r-1;o--;)i+=n[o];for(;i!==e;)if(i<e){let o=Math.min.apply(null,n);n[n.indexOf(o)]++,i++}else{let o=Math.max.apply(null,n);n[n.indexOf(o)]--,i--}return n}function Zf(t,e,r,n){if(e<0||e>1)throw new Error("Position must be between 0 and 1");let i,o;for(let c=0,f=t.length;c<f-1;c++)if(e>=t[c].pos&&e<t[c+1].pos){i=t[c],o=t[c+1];break}i||(i=o=t[t.length-1]);let s=So(i.color[r](),o.color[r](),(o.pos-i.pos)*100),a=Eo(s,i.color[r](),(e-i.pos)*100,n);return vr(a)}var Wt=class{constructor(e){if(e.length<2)throw new Error("Invalid number of stops (< 2)");let r=e[0].pos!==void 0,n=e.length,i=-1,o=!1;this.stops=e.map((s,a)=>{let c=s.pos!==void 0;if(r^c)throw new Error("Cannot mix positionned and not posionned color stops");if(c){let f=s.color!==void 0;if(!f&&(o||a===0||a===n-1))throw new Error("Cannot define two consecutive position-only stops");if(o=!f,s={color:f?vr(s.color):null,colorLess:!f,pos:s.pos},s.pos<0||s.pos>1)throw new Error("Color stops positions must be between 0 and 1");if(s.pos<i)throw new Error("Color stops positions are not ordered");i=s.pos}else s={color:vr(s.color!==void 0?s.color:s),pos:a/(n-1)};return s}),this.stops[0].pos!==0&&(this.stops.unshift({color:this.stops[0].color,pos:0}),n++),this.stops[n-1].pos!==1&&this.stops.push({color:this.stops[n-1].color,pos:1})}reverse(){let e=[];return this.stops.forEach(function(r){e.push({color:r.color,pos:1-r.pos})}),new Wt(e.reverse())}loop(){let e=[],r=[];return this.stops.forEach(n=>{e.push({color:n.color,pos:n.pos/2})}),this.stops.slice(0,-1).forEach(n=>{r.push({color:n.color,pos:1-n.pos/2})}),new Wt(e.concat(r.reverse()))}rgb(e){let r=Qf(this.stops,e),n=[];this.stops.forEach((i,o)=>{i.colorLess&&(i.color=xo(this.stops[o-1],this.stops[o+1],2)[1])});for(let i=0,o=this.stops.length;i<o-1;i++){let s=xo(this.stops[i],this.stops[i+1],r[i]);n.splice(n.length,0,...s)}return n.push(this.stops[this.stops.length-1].color),n}hsv(e,r){let n=Qf(this.stops,e),i=[];this.stops.forEach((o,s)=>{o.colorLess&&(o.color=Yf(this.stops[s-1],this.stops[s+1],2,r)[1])});for(let o=0,s=this.stops.length;o<s-1;o++){let a=Yf(this.stops[o],this.stops[o+1],n[o],r);i.splice(i.length,0,...a)}return i.push(this.stops[this.stops.length-1].color),i}css(e,r){e=e||"linear",r=r||(e==="linear"?"to right":"ellipse at center");let n=e+"-gradient("+r;return this.stops.forEach(function(i){n+=", "+(i.colorLess?"":i.color.toRgbString()+" ")+i.pos*100+"%"}),n+=")",n}rgbAt(e){return Zf(this.stops,e,"toRgb",ed)}hsvAt(e){return Zf(this.stops,e,"toHsv",td)}};rd.exports=function(t){if(arguments.length===1){if(!Array.isArray(arguments[0]))throw new Error('"stops" is not an array');t=arguments[0]}else t=Array.prototype.slice.call(arguments);return new Wt(t)}});var cd=y((V2,Dn)=>{"use strict";var od=Vf(),xy=nd(),id=/\s/g;function Po(...t){let e=xy.apply(this,t),r=(n,i)=>Sy(n?n.toString():"",e,i);return r.multiline=(n,i)=>Ey(n?n.toString():"",e,i),r}var sd=(t,e,r)=>e.interpolation.toLowerCase()==="hsv"?t.hsv(r,e.hsvSpin.toLowerCase()):t.rgb(r);function Sy(t,e,r){let n=ad(r),i=Math.max(t.replace(id,"").length,e.stops.length),o=sd(e,n,i),s="";for(let a of t)s+=a.match(id)?a:od.hex(o.shift().toHex())(a);return s}function Ey(t,e,r){let n=ad(r),i=t.split(`
21
- `),o=Math.max.apply(null,i.map(c=>c.length).concat([e.stops.length])),s=sd(e,n,o),a=[];for(let c of i){let f=s.slice(0),u="";for(let p of c)u+=od.hex(f.shift().toHex())(p);a.push(u)}return a.join(`
22
- `)}function ad(t){let e={interpolation:"rgb",hsvSpin:"short",...t};if(t!==void 0&&typeof t!="object")throw new TypeError(`Expected \`options\` to be an \`object\`, got \`${typeof t}\``);if(typeof e.interpolation!="string")throw new TypeError(`Expected \`options.interpolation\` to be a \`string\`, got \`${typeof e.interpolation}\``);if(e.interpolation.toLowerCase()==="hsv"&&typeof e.hsvSpin!="string")throw new TypeError(`Expected \`options.hsvSpin\` to be a \`string\`, got \`${typeof e.hsvSpin}\``);return e}var br={atlas:{colors:["#feac5e","#c779d0","#4bc0c8"],options:{}},cristal:{colors:["#bdfff3","#4ac29a"],options:{}},teen:{colors:["#77a1d3","#79cbca","#e684ae"],options:{}},mind:{colors:["#473b7b","#3584a7","#30d2be"],options:{}},morning:{colors:["#ff5f6d","#ffc371"],options:{interpolation:"hsv"}},vice:{colors:["#5ee7df","#b490ca"],options:{interpolation:"hsv"}},passion:{colors:["#f43b47","#453a94"],options:{}},fruit:{colors:["#ff4e50","#f9d423"],options:{}},instagram:{colors:["#833ab4","#fd1d1d","#fcb045"],options:{}},retro:{colors:["#3f51b1","#5a55ae","#7b5fac","#8f6aae","#a86aa4","#cc6b8e","#f18271","#f3a469","#f7c978"],options:{}},summer:{colors:["#fdbb2d","#22c1c3"],options:{}},rainbow:{colors:["#ff0000","#ff0100"],options:{interpolation:"hsv",hsvSpin:"long"}},pastel:{colors:["#74ebd5","#74ecd5"],options:{interpolation:"hsv",hsvSpin:"long"}}};Dn.exports=Po;for(let t in br)Dn.exports[t]=e=>new Po(br[t].colors)(e,br[t].options),Dn.exports[t].multiline=e=>new Po(br[t].colors).multiline(e,br[t].options)});var Q=y(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.isUndefined=Se.fixName=Se.validateName=Se.validateSingleChar=Se.fixChar=Se.validateChar=void 0;function Uy(t){for(var e=0;e<t.length;e++){var r=t.charCodeAt(e);if(!(r===9||r===10||r===13||r>=32&&r<=55295||r>=57344&&r<=65533)){if(e+1===t.length)return!1;var n=t.charCodeAt(e+1);if(r>=55296&&r<=56319&&n>=56320&&n<=57343){e++;continue}return!1}}return!0}Se.validateChar=Uy;function Gy(t){for(var e="",r=0;r<t.length;r++){var n=t.charCodeAt(r);if(n===9||n===10||n===13||n>=32&&n<=55295||n>=57344&&n<=65533){e+=t[r];continue}if(r+1===t.length)return e+="\uFFFD",e;var i=t.charCodeAt(r+1);if(n>=55296&&n<=56319&&i>=56320&&i<=57343){e+=t[r]+t[r+1],r++;continue}e+="\uFFFD"}return e}Se.fixChar=Gy;function Xy(t){if(t.length===0)return!1;var e=t.charCodeAt(0);if(t.length===1)return e===9||e===10||e===13||e>=32&&e<=55295||e>=57344&&e<=65533;if(t.length!==2)return!1;var r=t.charCodeAt(1);return e>=55296&&e<=56319&&r>=56320&&r<=57343}Se.validateSingleChar=Xy;function Hy(t){if(t.length===0)return!1;var e=t.charCodeAt(0),r=e===58||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533;if(t.length===1)return r;var n=t.charCodeAt(1),i=e>=55296&&e<=56191&&n>=56320&&n<=57343;if(!r&&!i)return!1;for(var o=i?2:1,s=o;s<t.length;s++){var a=t.charCodeAt(s);if(!(a===58||a===95||a===45||a===46||a===183||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||a>=192&&a<=214||a>=216&&a<=246||a>=248&&a<=767||a>=768&&a<=879||a>=880&&a<=893||a>=895&&a<=8191||a>=8204&&a<=8205||a>=8255&&a<=8256||a>=8304&&a<=8591||a>=11264&&a<=12271||a>=12289&&a<=55295||a>=63744&&a<=64975||a>=65008&&a<=65533)){if(s+1===t.length)return!1;var c=t.charCodeAt(s+1);if(a>=55296&&a<=56191&&c>=56320&&c<=57343){s++;continue}return!1}}return!0}Se.validateName=Hy;function Wy(t){var e="";if(t.length===0)return e;var r=t.charCodeAt(0),n=r===58||r===95||r>=65&&r<=90||r>=97&&r<=122||r>=192&&r<=214||r>=216&&r<=246||r>=248&&r<=767||r>=880&&r<=893||r>=895&&r<=8191||r>=8204&&r<=8205||r>=8304&&r<=8591||r>=11264&&r<=12271||r>=12289&&r<=55295||r>=63744&&r<=64975||r>=65008&&r<=65533;if(t.length===1)return n?e=t[0]:e="\uFFFD",e;var i=t.charCodeAt(1),o=r>=55296&&r<=56191&&i>=56320&&i<=57343;o?e=t[0]+t[1]:n?e=t[0]:e="\uFFFD";for(var s=o?2:1,a=s;a<t.length;a++){var c=t.charCodeAt(a);if(c===58||c===95||c===45||c===46||c===183||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||c>=192&&c<=214||c>=216&&c<=246||c>=248&&c<=767||c>=768&&c<=879||c>=880&&c<=893||c>=895&&c<=8191||c>=8204&&c<=8205||c>=8255&&c<=8256||c>=8304&&c<=8591||c>=11264&&c<=12271||c>=12289&&c<=55295||c>=63744&&c<=64975||c>=65008&&c<=65533){e+=t[a];continue}if(a+1===t.length)return e+="\uFFFD",e;var f=t.charCodeAt(a+1);if(c>=55296&&c<=56191&&f>=56320&&f<=57343){e+=t[a]+t[a+1],a++;continue}e+="\uFFFD"}return e}Se.fixName=Wy;function zy(t){return Object.prototype.toString.call(t)==="[object Undefined]"}Se.isUndefined=zy});var Vt=y(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.StringOptions=void 0;var kn=Q(),Jy=function(){function t(e){this.doubleQuotes=!1,this.indent=" ",this.newline=`
23
- `,this.pretty=!0,(0,kn.isUndefined)(e.doubleQuotes)||(this.doubleQuotes=e.doubleQuotes),(0,kn.isUndefined)(e.indent)||(this.indent=e.indent),(0,kn.isUndefined)(e.newline)||(this.newline=e.newline),(0,kn.isUndefined)(e.pretty)||(this.pretty=e.pretty)}return t}();Mn.StringOptions=Jy});var Tn=y(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.escapeDoubleQuotes=ke.escapeSingleQuotes=ke.escapeRightAngleBracketsInCdataTerminator=ke.escapeLeftAngleBrackets=ke.escapeAmpersands=void 0;function Vy(t){return t.replace(/&/g,"&amp;")}ke.escapeAmpersands=Vy;function Ky(t){return t.replace(/</g,"&lt;")}ke.escapeLeftAngleBrackets=Ky;function Yy(t){return t.replace(/]]>/g,"]]&gt;")}ke.escapeRightAngleBracketsInCdataTerminator=Yy;function Qy(t){return t.replace(/'/g,"&apos;")}ke.escapeSingleQuotes=Qy;function Zy(t){return t.replace(/"/g,"&quot;")}ke.escapeDoubleQuotes=Zy});var Ho=y(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});var ev=se(),Md=Tn(),Go=Q(),tv=function(){function t(e,r,n){this._validation=r,(0,Go.isUndefined)(n.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=n.replaceInvalidCharsInCharData,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._replaceInvalidCharsInCharData)e=(0,Go.fixChar)(e);else if(this._validation&&!(0,Go.validateChar)(e))throw new Error((0,ev.getContext)(this.up())+": attribute text"+(' "'+e+'" should not contain characters not')+" allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){var e=this._charData;return e=(0,Md.escapeAmpersands)(e),e=(0,Md.escapeLeftAngleBrackets)(e),e},t.prototype.up=function(){return this._parent},t}();Xo.default=tv});var qn=y(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});var Td=se(),qd=Q(),rv=function(){function t(e,r,n){this._hex=!1,this._validation=r,this._parent=e,this.char=n.char,(0,qd.isUndefined)(n.hex)||(this.hex=n.hex)}return Object.defineProperty(t.prototype,"char",{get:function(){return this._char},set:function(e){if(this._validation&&!(0,qd.validateSingleChar)(e))throw new Error((0,Td.getContext)(this.up())+": character reference"+(' "'+e+'" should reference a single character,')+" and this character should be allowed in XML");this._char=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hex",{get:function(){return this._hex},set:function(e){this._hex=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){var e;if(this._char.length===1)e=this._char.charCodeAt(0);else{var r=this._char.charCodeAt(0);if(r>=55296&&r<=56319&&this._char.length>1){var n=this._char.charCodeAt(1);if(n>=56320&&n<=57343)e=(r-55296)*1024+n-56320+65536;else throw new Error((0,Td.getContext)(this.up())+": character"+(' reference "'+this.char+'" should')+" reference a valid Unicode character")}else e=r}return this._hex?"&#x"+e.toString(16)+";":"&#"+e+";"},t.prototype.up=function(){return this._parent},t}();Wo.default=rv});var Nn=y(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});var nv=se(),iv=Q(),ov=function(){function t(e,r,n){this._validation=r,this._parent=e,this.name=n.name}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){if(this._validation&&!(0,iv.validateName)(e))throw new Error((0,nv.getContext)(this.up())+": entity reference name"+(' "'+e+'" should not contain characters not')+" allowed in XML names");this._name=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"&"+this._name+";"},t.prototype.up=function(){return this._parent},t}();zo.default=ov});var jn=y(_r=>{"use strict";var Ko=_r&&_r.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_r,"__esModule",{value:!0});var Jo=se(),Nd=Tn(),sv=Vt(),Vo=Q(),av=Ko(Ho()),cv=Ko(qn()),uv=Ko(Nn()),lv=function(){function t(e,r,n){this._validation=r,(0,Vo.isUndefined)(n.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=n.replaceInvalidCharsInName,this._children=[],this._parent=e,this.name=n.name}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){if(this._replaceInvalidCharsInName){if(e=(0,Vo.fixName)(e),e.length===0)throw new Error((0,Jo.getContext)(this.up())+": attribute name should not be empty")}else if(this._validation&&!(0,Vo.validateName)(e))throw e.length===0?new Error((0,Jo.getContext)(this.up())+": attribute name should not be empty"):new Error((0,Jo.getContext)(this.up())+": attribute name"+(' "'+e+'" should not contain characters not')+" allowed in XML names");this._name=e},enumerable:!1,configurable:!0}),t.prototype.charRef=function(e){var r=new cv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entityRef=function(e){var r=new uv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.text=function(e){var r=new av.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});for(var r=new sv.StringOptions(e),n=r.doubleQuotes?'"':"'",i=this._name+"="+n,o=0,s=this._children;o<s.length;o++){var a=s[o];r.doubleQuotes?i+=(0,Nd.escapeDoubleQuotes)(a.toString()):i+=(0,Nd.escapeSingleQuotes)(a.toString())}return i+=n,i},t.prototype.up=function(){return this._parent},t}();_r.default=lv});var Qo=y(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});var fv=se(),dv=Q(),hv=function(){function t(e,r,n){this._validation=r,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._validation&&!(0,dv.validateChar)(e))throw new Error((0,fv.getContext)(this.up())+": attribute-list"+(' declaration "'+e+'" should not contain')+" characters not allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<!ATTLIST "+this._charData+">"},t.prototype.up=function(){return this._parent},t}();Yo.default=hv});var es=y(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});var pv=se(),mv=Q(),gv=function(){function t(e,r,n){this._validation=r,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._validation&&!(0,mv.validateChar)(e))throw new Error((0,pv.getContext)(this.up())+": element declaration"+(' "'+e+'" should not contain characters')+" not allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<!ELEMENT "+this._charData+">"},t.prototype.up=function(){return this._parent},t}();Zo.default=gv});var rs=y(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});var yv=se(),vv=Q(),bv=function(){function t(e,r,n){this._validation=r,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._validation&&!(0,vv.validateChar)(e))throw new Error((0,yv.getContext)(this.up())+": entity declaration"+(' "'+e+'" should not contain characters')+" not allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<!ENTITY "+this._charData+">"},t.prototype.up=function(){return this._parent},t}();ts.default=bv});var is=y(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});var _v=se(),wv=Q(),xv=function(){function t(e,r,n){this._validation=r,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._validation&&!(0,wv.validateChar)(e))throw new Error((0,_v.getContext)(this.up())+": notation declaration"+(' "'+e+'" should not contain characters')+" not allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<!NOTATION "+this._charData+">"},t.prototype.up=function(){return this._parent},t}();ns.default=xv});var ss=y(os=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});var Sv=se(),Ev=Q(),Pv=function(){function t(e,r,n){this._validation=r,this._parent=e,this.name=n.name}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){if(this._validation&&!(0,Ev.validateName)(e))throw new Error((0,Sv.getContext)(this.up())+": parameter entity"+(' reference name "'+e+'" should not contain')+" characters not allowed in XML names");this._name=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"%"+this._name+";"},t.prototype.up=function(){return this._parent},t}();os.default=Pv});var wr=y(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});var $n=se(),Ln=Q(),Cv=function(){function t(e,r,n){this._validation=r,this._parent=e,this.content=n.content,this.target=n.target}return Object.defineProperty(t.prototype,"content",{get:function(){return this._content},set:function(e){if(!(0,Ln.isUndefined)(e)){if(this._validation&&!(0,Ln.validateChar)(e))throw new Error((0,$n.getContext)(this.up())+": processing"+(' instruction content "'+e+'" should')+" not contain characters not allowed in XML");if(this._validation&&e.indexOf("?>")!==-1)throw new Error((0,$n.getContext)(this.up())+": processing"+(' instruction content "'+e+'" should')+" not contain the string '?>'")}this._content=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){return this._target},set:function(e){if(this._validation&&!(0,Ln.validateName)(e))throw new Error((0,$n.getContext)(this.up())+": processing"+(' instruction target "'+e+'" should')+" not contain characters not allowed in XML names");if(this._validation&&e==="xml")throw new Error((0,$n.getContext)(this.up())+": processing"+(' instruction target "'+e+'" should')+" not be the string 'xml'");this._target=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return(0,Ln.isUndefined)(this._content)?"<?"+this._target+"?>":"<?"+this._target+" "+this._content+"?>"},t.prototype.up=function(){return this._parent},t}();as.default=Cv});var Bn=y(vt=>{"use strict";var bt=vt&&vt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(vt,"__esModule",{value:!0});vt.validatePubId=void 0;var at=se(),Dv=Vt(),Xe=Q(),Ov=bt(xr()),Av=bt(Qo()),Iv=bt(es()),Rv=bt(rs()),Fv=bt(is()),kv=bt(ss()),Mv=bt(wr()),Tv=function(){function t(e,r,n){this._pubId=void 0,this._sysId=void 0,this._validation=r,this._children=[],this._parent=e,this.name=n.name,(0,Xe.isUndefined)(n.sysId)||(this.sysId=n.sysId),(0,Xe.isUndefined)(n.pubId)||(this.pubId=n.pubId)}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){if(this._validation&&!(0,Xe.validateName)(e))throw new Error((0,at.getContext)(this.up())+': DTD name "'+e+'" should not contain characters not allowed in XML names');this._name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pubId",{get:function(){return this._pubId},set:function(e){if(!(0,Xe.isUndefined)(e)){if(this._validation&&!jd(e))throw new Error((0,at.getContext)(this.up())+": DTD public"+(' identifier "'+e+'" should not contain')+" characters not allowed in public identifiers");if(this._validation&&(0,Xe.isUndefined)(this._sysId))throw new Error((0,at.getContext)(this.up())+": DTD public"+(' identifier "'+e+'" should not be defined')+" if system identifier is undefined")}this._pubId=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sysId",{get:function(){return this._sysId},set:function(e){if(!(0,Xe.isUndefined)(e)){if(this._validation&&!(0,Xe.validateChar)(e))throw new Error((0,at.getContext)(this.up())+": DTD system"+(' identifier "'+e+'" should not contain')+" characters not allowed in XML");if(this._validation&&e.indexOf("'")!==-1&&e.indexOf('"')!==-1)throw new Error((0,at.getContext)(this.up())+": DTD system"+(' identifier "'+e+'" should not contain')+" both single quotes and double quotes")}this._sysId=e},enumerable:!1,configurable:!0}),t.prototype.attlist=function(e){var r=new Av.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new Ov.default(this,this._validation,e);return this._children.push(r),r},t.prototype.element=function(e){var r=new Iv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entity=function(e){var r=new Rv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.notation=function(e){var r=new Fv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.paramEntityRef=function(e){var r=new kv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new Mv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});var r=new Dv.StringOptions(e),n="<!DOCTYPE "+this._name;if((0,Xe.isUndefined)(this._pubId))(0,Xe.isUndefined)(this._sysId)||(n+=" ",n=this.appendId("SYSTEM",this._sysId,n,r));else{if((0,Xe.isUndefined)(this._sysId))throw new Error((0,at.getContext)(this.up())+": DTD system identifier is not undefined");n+=" ",n=this.appendId("PUBLIC",this._pubId,n,r),n=this.appendId("",this._sysId,n,r)}if(this._children.length!==0){n+=" [";for(var i=0,o=this._children;i<o.length;i++){var s=o[i];r.pretty&&(n+=r.newline+r.indent),n+=s.toString()}r.pretty&&(n+=r.newline),n+="]>"}else n+=">";return n},t.prototype.up=function(){return this._parent},t.prototype.appendId=function(e,r,n,i){if(n+=e+" ",i.doubleQuotes){if(this._validation&&r.indexOf('"')!==-1)throw new Error((0,at.getContext)(this.up())+": doubleQuotes option inconsistent with DTD system identifier or public identifier");n+='"'+r+'"'}else{if(this._validation&&r.indexOf("'")!==-1)throw new Error((0,at.getContext)(this)+": doubleQuotes option inconsistent with DTD system identifier or public identifier");n+="'"+r+"'"}return n},t}();vt.default=Tv;function jd(t){for(var e=0;e<t.length;e++){var r=t.charCodeAt(e);if(!(r===10||r===13||r===32||r===33||r>=35&&r<=37||r>=39&&r<=47||r>=48&&r<=57||r===58||r===59||r===61||r===63||r>=64&&r<=90||r===95||r>=97&&r<=122))return e+1===t.length,!1}return!0}vt.validatePubId=jd});var ls=y(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});var $d=se(),cs=Q(),qv=function(){function t(e,r,n){this._validation=r,(0,cs.isUndefined)(n.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=n.replaceInvalidCharsInCharData,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._replaceInvalidCharsInCharData)e=(0,cs.fixChar)(e);else if(this._validation&&!(0,cs.validateChar)(e))throw new Error((0,$d.getContext)(this.up())+": CDATA section"+(' "'+e+'" should not contain characters')+" not allowed in XML");if(this._replaceInvalidCharsInCharData)e=e.replace("]]>","\uFFFD\uFFFD\uFFFD");else if(this._validation&&e.indexOf("]]>")!==-1)throw new Error((0,$d.getContext)(this.up())+": CDATA section"+(' "'+e+'" should not contain the string')+" ']]>'");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<![CDATA["+this._charData+"]]>"},t.prototype.up=function(){return this._parent},t}();us.default=qv});var ps=y(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});var Nv=se(),fs=Tn(),ds=Q(),jv=function(){function t(e,r,n){this._validation=r,(0,ds.isUndefined)(n.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=n.replaceInvalidCharsInCharData,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._replaceInvalidCharsInCharData)e=(0,ds.fixChar)(e);else if(this._validation&&!(0,ds.validateChar)(e))throw new Error((0,Nv.getContext)(this.up())+": character data"+('"'+e+'" should not contain characters not')+" allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){var e=this._charData;return e=(0,fs.escapeAmpersands)(e),e=(0,fs.escapeLeftAngleBrackets)(e),e=(0,fs.escapeRightAngleBracketsInCdataTerminator)(e),e},t.prototype.up=function(){return this._parent},t}();hs.default=jv});var Hn=y(Pr=>{"use strict";var _t=Pr&&Pr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Pr,"__esModule",{value:!0});var Un=se(),$v=Vt(),Sr=Q(),Ld=_t(jn()),Lv=_t(ls()),Er=_t(ps()),Gn=_t(qn()),Bv=_t(xr()),Xn=_t(Nn()),Uv=_t(wr()),Gv=function(){function t(e,r,n){this._validation=r,(0,Sr.isUndefined)(n.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=n.replaceInvalidCharsInName,(0,Sr.isUndefined)(n.useSelfClosingTagIfEmpty)?this._useSelfClosingTagIfEmpty=!0:this._useSelfClosingTagIfEmpty=n.useSelfClosingTagIfEmpty,this._children=[],this._attributeNames=[],this._parent=e,this.name=n.name}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){if(this._replaceInvalidCharsInName){if(e=(0,Sr.fixName)(e),e.length===0)throw new Error((0,Un.getContext)(this.up())+": element name should not be empty")}else if(this._validation&&!(0,Sr.validateName)(e))throw e.length===0?new Error((0,Un.getContext)(this.up())+": element name should not be empty"):new Error((0,Un.getContext)(this.up())+": element name"+(' "'+e+'" should not contain characters not')+" allowed in XML names");this._name=e},enumerable:!1,configurable:!0}),t.prototype.attribute=function(e){if(this._validation&&this._attributeNames.indexOf(e.name)!==-1)throw new Error((0,Un.getContext)(this.up())+': element "'+this.name+'" already contains an attribute with the'+(' name "'+e.name+'"'));var r=new Ld.default(this,this._validation,e);return this._children.push(r),this._attributeNames.push(e.name),r},t.prototype.cdata=function(e){var r=new Lv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.charData=function(e){var r=new Er.default(this,this._validation,e);return this._children.push(r),r},t.prototype.charRef=function(e){var r=new Gn.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new Bv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.element=function(e){var r=new t(this,this._validation,e);return this._children.push(r),r},t.prototype.entityRef=function(e){var r=new Xn.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new Uv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){return e===void 0&&(e={}),this.toStringWithIndent(e,"")},t.prototype.up=function(){return this._parent},t.prototype.toStringWithIndent=function(e,r){for(var n=new $v.StringOptions(e),i=r+n.indent,o="<"+this._name,s=[],a=0,c=this._children;a<c.length;a++){var f=c[a];f instanceof Ld.default?o+=" "+f.toString(e):s.push(f)}if(s.length>0){for(var u="",p=0;p<s.length;p++){var g=s[p],m="";g instanceof t?m+=g.toStringWithIndent(n,i):m+=g.toString();var b=p>0?s[p-1]:void 0;g instanceof Er.default&&g.toString()===""||(n.pretty&&(this.allSameLineNodes(s)||p>0&&this.onSameLine(g,b)||(m=n.newline+i+m)),u+=m)}n.pretty&&(this.allSameLineNodes(s)||(u+=n.newline+r)),u.length===0&&this._useSelfClosingTagIfEmpty?o+="/>":o+=">"+u+"</"+this._name+">"}else this._useSelfClosingTagIfEmpty?o+="/>":o+="></"+this._name+">";return o},t.prototype.allSameLineNodes=function(e){for(var r=0,n=e;r<n.length;r++){var i=n[r];if(!(i instanceof Gn.default||i instanceof Xn.default||i instanceof Er.default))return!1}return!0},t.prototype.onSameLine=function(e,r){return(e instanceof Gn.default||e instanceof Xn.default||e instanceof Er.default)&&!(0,Sr.isUndefined)(r)&&(r instanceof Gn.default||r instanceof Xn.default||r instanceof Er.default)},t}();Pr.default=Gv});var se=y(Kt=>{"use strict";var zn=Kt&&Kt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Kt,"__esModule",{value:!0});Kt.getContext=void 0;var Xv=zn(jn()),Hv=zn(Jn()),Wv=zn(Bn()),zv=zn(Hn());function Wn(t){if(t instanceof Xv.default)return Wn(t.up())+(' > attribute "'+t.name+'"');if(t instanceof Hv.default)return"in XML document";if(t instanceof Wv.default)return Wn(t.up())+" > DTD";if(t instanceof zv.default)return Wn(t.up())+(' > element "'+t.name+'"');throw new Error("Unrecognized object of type "+Object.prototype.toString.call(t))}Kt.getContext=Wn});var xr=y(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});var ms=se(),gs=Q(),Jv=function(){function t(e,r,n){this._validation=r,(0,gs.isUndefined)(n.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=n.replaceInvalidCharsInCharData,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._replaceInvalidCharsInCharData)e=(0,gs.fixChar)(e);else if(this._validation&&!(0,gs.validateChar)(e))throw new Error((0,ms.getContext)(this.up())+": comment content"+(' "'+e+'" should not contain characters')+" not allowed in XML");if(this._replaceInvalidCharsInCharData)e=e.replace("--","\uFFFD\uFFFD");else if(this._validation&&e.indexOf("--")!==-1)throw new Error((0,ms.getContext)(this.up())+": comment content"+(' "'+e+'" should not contain the string')+" '--'");if(this._replaceInvalidCharsInCharData)e.lastIndexOf("-")===e.length-1&&(e=e.substr(0,e.length-1)+"\uFFFD");else if(this._validation&&e.lastIndexOf("-")===e.length-1)throw new Error((0,ms.getContext)(this.up())+": comment content"+(' "'+e+'" should not end with the string')+" '-'");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<!--"+this._charData+"-->"},t.prototype.up=function(){return this._parent},t}();ys.default=Jv});var _s=y(bs=>{"use strict";Object.defineProperty(bs,"__esModule",{value:!0});var vs=se(),Vv=Vt(),Cr=Q(),Kv=function(){function t(e,r,n){this._version="1.0",this._validation=r,this._parent=e,this.encoding=n.encoding,this.standalone=n.standalone,(0,Cr.isUndefined)(n.version)||(this.version=n.version)}return Object.defineProperty(t.prototype,"encoding",{get:function(){return this._encoding},set:function(e){if(this._validation&&!(0,Cr.isUndefined)(e)&&!Yv(e))throw new Error((0,vs.getContext)(this.up())+": declaration"+(" encoding attribute "+e+" should be a")+" valid encoding");this._encoding=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"standalone",{get:function(){return this._standalone},set:function(e){if(this._validation&&!(0,Cr.isUndefined)(e)&&e!=="yes"&&e!=="no")throw new Error((0,vs.getContext)(this.up())+": declaration"+(" standalone attribute "+e+" should")+" be the string 'yes' or the string 'no'");this._standalone=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._version},set:function(e){if(this._validation&&!Qv(e))throw new Error((0,vs.getContext)(this.up())+": declaration version"+(" attribute "+e+" should be a valid XML")+" version");this._version=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(e){e===void 0&&(e={});var r=new Vv.StringOptions(e),n=r.doubleQuotes?'"':"'",i="<?xml version="+n+this._version+n;return(0,Cr.isUndefined)(this._encoding)||(i+=" encoding="+n+this._encoding+n),(0,Cr.isUndefined)(this._standalone)||(i+=" standalone="+n+this._standalone+n),i+="?>",i},t.prototype.up=function(){return this._parent},t}();bs.default=Kv;function Yv(t){if(t.length===0)return!1;var e=t.charCodeAt(0);if(!(e>=65&&e<=90||e>=97&&e<=122))return!1;for(var r=1;r<t.length;r++){var n=t.charCodeAt(r);if(!(n===95||n===45||n===46||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122))return r+1===t.length,!1}return!0}function Qv(t){for(var e=0;e<=9;e++)if(t==="1."+e)return!0;return!1}});var Jn=y(Or=>{"use strict";var Ar=Or&&Or.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Or,"__esModule",{value:!0});var Zv=Vt(),e1=Q(),t1=Ar(xr()),Bd=Ar(_s()),Ud=Ar(Bn()),Dr=Ar(Hn()),r1=Ar(wr()),n1=function(){function t(e){this._children=[],this._validation=(0,e1.isUndefined)(e.validation)?!0:e.validation}return t.prototype.comment=function(e){var r=new t1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.decl=function(e){if(e===void 0&&(e={}),this._validation&&this._children.length!==0)throw new Error("in XML document: declaration must be the first child");var r=new Bd.default(this,this._validation,e);return this._children.push(r),r},t.prototype.dtd=function(e){var r=this._children.filter(function(i){return i instanceof Dr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: DTD must precede the root element");var n=new Ud.default(this,this._validation,e);return this._children.push(n),n},t.prototype.element=function(e){var r=this._children.filter(function(i){return i instanceof Dr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: only one root element is permitted");var n=new Dr.default(this,this._validation,e);return this._children.push(n),n},t.prototype.procInst=function(e){var r=new r1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});var r=this._children.filter(function(f){return f instanceof Dr.default});if(this._validation&&r.length!==1)throw new Error("in XML document: no more than one root element is permitted");for(var n=new Zv.StringOptions(e),i="",o=0,s=this._children;o<s.length;o++){var a=s[o];a instanceof Bd.default||a instanceof Ud.default||a instanceof Dr.default?i+=a.toString(e):i+=a.toString(),n.pretty&&(i+=n.newline)}var c=i.length-n.newline.length;return i.substr(c)===n.newline&&(i=i.substr(0,c)),i},t}();Or.default=n1});var Gd=y(q=>{"use strict";var ee=q&&q.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(q,"__esModule",{value:!0});q.document=q.XmlProcInst=q.XmlEntityRef=q.XmlElement=q.XmlDtdParamEntityRef=q.XmlDtdNotation=q.XmlDtdEntity=q.XmlDtdElement=q.XmlDtdAttlist=q.XmlDtd=q.XmlDocument=q.XmlDecl=q.XmlComment=q.XmlCharRef=q.XmlCharData=q.XmlCdata=q.XmlAttributeText=q.XmlAttribute=void 0;var i1=ee(Jn()),o1=jn();Object.defineProperty(q,"XmlAttribute",{enumerable:!0,get:function(){return ee(o1).default}});var s1=Ho();Object.defineProperty(q,"XmlAttributeText",{enumerable:!0,get:function(){return ee(s1).default}});var a1=ls();Object.defineProperty(q,"XmlCdata",{enumerable:!0,get:function(){return ee(a1).default}});var c1=ps();Object.defineProperty(q,"XmlCharData",{enumerable:!0,get:function(){return ee(c1).default}});var u1=qn();Object.defineProperty(q,"XmlCharRef",{enumerable:!0,get:function(){return ee(u1).default}});var l1=xr();Object.defineProperty(q,"XmlComment",{enumerable:!0,get:function(){return ee(l1).default}});var f1=_s();Object.defineProperty(q,"XmlDecl",{enumerable:!0,get:function(){return ee(f1).default}});var d1=Jn();Object.defineProperty(q,"XmlDocument",{enumerable:!0,get:function(){return ee(d1).default}});var h1=Bn();Object.defineProperty(q,"XmlDtd",{enumerable:!0,get:function(){return ee(h1).default}});var p1=Qo();Object.defineProperty(q,"XmlDtdAttlist",{enumerable:!0,get:function(){return ee(p1).default}});var m1=es();Object.defineProperty(q,"XmlDtdElement",{enumerable:!0,get:function(){return ee(m1).default}});var g1=rs();Object.defineProperty(q,"XmlDtdEntity",{enumerable:!0,get:function(){return ee(g1).default}});var y1=is();Object.defineProperty(q,"XmlDtdNotation",{enumerable:!0,get:function(){return ee(y1).default}});var v1=ss();Object.defineProperty(q,"XmlDtdParamEntityRef",{enumerable:!0,get:function(){return ee(v1).default}});var b1=Hn();Object.defineProperty(q,"XmlElement",{enumerable:!0,get:function(){return ee(b1).default}});var _1=Nn();Object.defineProperty(q,"XmlEntityRef",{enumerable:!0,get:function(){return ee(_1).default}});var w1=wr();Object.defineProperty(q,"XmlProcInst",{enumerable:!0,get:function(){return ee(w1).default}});function x1(t){return t===void 0&&(t={}),new i1.default(t)}q.document=x1});var ws=y(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.stringify=te.isMap=te.isSet=te.isFunction=te.isArray=te.isObject=te.isNull=te.isUndefined=void 0;function Xd(t){return Object.prototype.toString.call(t)==="[object Undefined]"}te.isUndefined=Xd;function Hd(t){return Object.prototype.toString.call(t)==="[object Null]"}te.isNull=Hd;function S1(t){return Object.prototype.toString.call(t)==="[object Object]"}te.isObject=S1;function E1(t){return Object.prototype.toString.call(t)==="[object Array]"}te.isArray=E1;function Wd(t){return Object.prototype.toString.call(t)==="[object Function]"}te.isFunction=Wd;function P1(t){return Object.prototype.toString.call(t)==="[object Set]"}te.isSet=P1;function C1(t){return Object.prototype.toString.call(t)==="[object Map]"}te.isMap=C1;function D1(t){return!Xd(t)&&!Hd(t)&&Wd(t?.toString)&&(t=t.toString()),String(t)}te.stringify=D1});var Qd=y(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.WrapHandlers=Ee.TypeHandlers=Ee.FormatOptions=Ee.DtdOptions=Ee.DeclarationOptions=Ee.Options=void 0;var $e=ws(),O1=function(){function t(e){e===void 0&&(e={}),this.aliasString="=",this.attributeString="@",this.cdataInvalidChars=!1,this.cdataKeys=[],this.replaceInvalidChars=!1,this.useSelfClosingTagIfEmpty=!0,this.validation=!0,this.valueString="#",(0,$e.isUndefined)(e.validation)||(this.validation=e.validation),(0,$e.isUndefined)(e.aliasString)||(this.aliasString=e.aliasString),(0,$e.isUndefined)(e.attributeString)||(this.attributeString=e.attributeString),(0,$e.isUndefined)(e.cdataInvalidChars)||(this.cdataInvalidChars=e.cdataInvalidChars),(0,$e.isUndefined)(e.cdataKeys)||(this.cdataKeys=e.cdataKeys),this.declaration=new zd(e.declaration),this.dtd=new Jd(this.validation,e.dtd),this.format=new Vd(e.format),(0,$e.isUndefined)(e.replaceInvalidChars)||(this.replaceInvalidChars=e.replaceInvalidChars),this.typeHandlers=new Kd(e.typeHandlers),(0,$e.isUndefined)(e.useSelfClosingTagIfEmpty)||(this.useSelfClosingTagIfEmpty=e.useSelfClosingTagIfEmpty),(0,$e.isUndefined)(e.valueString)||(this.valueString=e.valueString),this.wrapHandlers=new Yd(e.wrapHandlers)}return t}();Ee.Options=O1;var zd=function(){function t(e){e===void 0&&(e={}),this.include=!0,(0,$e.isUndefined)(e.include)||(this.include=e.include),this.encoding=e.encoding,this.standalone=e.standalone,this.version=e.version}return t}();Ee.DeclarationOptions=zd;var Jd=function(){function t(e,r){if(r===void 0&&(r={}),this.include=!1,(0,$e.isUndefined)(r.include)||(this.include=r.include),e&&(0,$e.isUndefined)(r.name)&&this.include)throw new Error("options.dtd.name should be defined if options.dtd.include is true");this.name=r.name,this.sysId=r.sysId,this.pubId=r.pubId}return t}();Ee.DtdOptions=Jd;var Vd=function(){function t(e){e===void 0&&(e={}),this.doubleQuotes=e.doubleQuotes,this.indent=e.indent,this.newline=e.newline,this.pretty=e.pretty}return t}();Ee.FormatOptions=Vd;var Kd=function(){function t(e){e===void 0&&(e={});for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this[r]=e[r])}return t}();Ee.TypeHandlers=Kd;var Yd=function(){function t(e){e===void 0&&(e={});for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this[r]=e[r])}return t}();Ee.WrapHandlers=Yd});var ih=y(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.parse=ct.parseToExistingElement=ct.Absent=void 0;var eh=Gd(),th=Qd(),V=ws(),xs=function(){function t(){}return Object.defineProperty(t,"instance",{get:function(){return t._instance},enumerable:!1,configurable:!0}),t._instance=new t,t}();ct.Absent=xs;function Ss(t,e){var r=Object.prototype.toString.call(t),n;return Object.prototype.hasOwnProperty.call(e.typeHandlers,"*")&&(n=e.typeHandlers["*"]),Object.prototype.hasOwnProperty.call(e.typeHandlers,r)&&(n=e.typeHandlers[r]),n}function rh(t,e,r){var n=function(s){return r.cdataInvalidChars&&(s.indexOf("<")!==-1||s.indexOf("&")!==-1)||r.cdataKeys.indexOf(e.name)!==-1||r.cdataKeys.indexOf("*")!==-1};if(e instanceof eh.XmlElement)if(n(t))for(var i=t.split("]]>"),o=0;o<i.length;o++)n(i[o])?e.cdata({charData:i[o],replaceInvalidCharsInCharData:r.replaceInvalidChars}):e.charData({charData:i[o],replaceInvalidCharsInCharData:r.replaceInvalidChars}),o<i.length-1&&e.charData({charData:"]]>",replaceInvalidCharsInCharData:r.replaceInvalidChars});else e.charData({charData:t,replaceInvalidCharsInCharData:r.replaceInvalidChars});else e.text({charData:t,replaceInvalidCharsInCharData:r.replaceInvalidChars})}function A1(t,e,r,n){var i=r.attribute({name:t,replaceInvalidCharsInName:n.replaceInvalidChars});rh((0,V.stringify)(e),i,n)}function Zd(t,e,r,n){if(t===n.aliasString){r.name=(0,V.stringify)(e);return}if(t.indexOf(n.attributeString)===0&&(0,V.isObject)(e)){for(var i=0,o=Object.keys(e);i<o.length;i++){var s=o[i];A1(s,(0,V.stringify)(e[s]),r,n)}return}if(t.indexOf(n.valueString)===0){Vn(t,(0,V.stringify)(e),r,n);return}var a=r;if(!(0,V.isArray)(e)&&!(0,V.isSet)(e)){var c=Ss(e,n);if(!(0,V.isUndefined)(c)&&c(e)===xs.instance)return;a=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}Vn(t,e,a,n)}function I1(t,e,r){if((0,V.isMap)(t))t.forEach(function(s,a){Zd((0,V.stringify)(a),s,e,r)});else for(var n=0,i=Object.keys(t);n<i.length;n++){var o=i[n];Zd(o,t[o],e,r)}}function R1(t,e,r,n){var i;Object.prototype.hasOwnProperty.call(n.wrapHandlers,"*")&&(i=n.wrapHandlers["*"]),Object.prototype.hasOwnProperty.call(n.wrapHandlers,t)&&(i=n.wrapHandlers[t]);var o=t,s=r;if(!(0,V.isUndefined)(i)){var a=i(o,e);(0,V.isNull)(a)||(o=a,s=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty}))}e.forEach(function(c){var f=s;if(!(0,V.isArray)(c)&&!(0,V.isSet)(c)){var u=Ss(c,n);if(!(0,V.isUndefined)(u)&&u(c)===xs.instance)return;f=s.element({name:o,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}Vn(o,c,f,n)})}function Vn(t,e,r,n){var i=Ss(e,n);if((0,V.isUndefined)(i)||(e=i(e)),(0,V.isObject)(e)||(0,V.isMap)(e)){I1(e,r,n);return}if((0,V.isArray)(e)||(0,V.isSet)(e)){R1(t,e,r,n);return}rh((0,V.stringify)(e),r,n)}function nh(t,e,r){var n=new th.Options(r);Vn(t.name,e,t,n)}ct.parseToExistingElement=nh;function F1(t,e,r){var n=new th.Options(r),i=new eh.XmlDocument({validation:n.validation});n.declaration.include&&i.decl(n.declaration),n.dtd.include&&i.dtd({name:n.dtd.name,pubId:n.dtd.pubId,sysId:n.dtd.sysId});var o=i.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty});return nh(o,e,r),i.toString(n.format)}ct.parse=F1});var ea=N(We());var Ys=require("node:child_process"),Qs=N(We()),Zs=N(si());Qs.default.config();var Xh=Zs.default.sync(__dirname);function ai(t){return e=>Hh(e,t)}function Hh(t,e){let[r,...n]=t.split(" "),{error:i,status:o}=(0,Ys.spawnSync)(r,n,{cwd:Xh,stdio:["ignore","inherit","ignore"],encoding:"utf8",shell:!0,env:Object.assign({GRIDDO_EXPORTER:"true"},process.env,e)});i&&(console.error(i),process.exit(1)),o!==0&&(console.error(`Command \`${t}\` exited with code ${o}`),process.exit(1))}ea.default.config();var ou=N(ji()),su=N(kt()),Xi=class{user;password;baseUrl;headers;constructor(){this.user=process.env.botEmail,this.password=process.env.botPassword,this.baseUrl=process.env.API_URL}async login(){try{let e=await(0,ou.default)({url:`${this.baseUrl}/login_check`,method:"POST",headers:{"Content-Type":"application/json"},data:{username:this.user,password:this.password}});if(e.status===200){let{data:{token:r}}=e;this.headers={Authorization:"bearer "+r,"Cache-Control":"no-store"}}return this.headers}catch{console.error(su.default.red(`
18
+ `,i)}while(n!==-1);return o+=t.substr(i),o};jf.exports={stringReplaceAll:ly,stringEncaseCRLFWithFirstIndex:fy}});var Hf=y((Y2,Xf)=>{"use strict";var dy=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Lf=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,hy=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,py=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,my=new Map([["n",`
19
+ `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Uf(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):my.get(t)||t}function gy(t,e){let r=[],n=e.trim().split(/\s*,\s*/g),i;for(let o of n){let s=Number(o);if(!Number.isNaN(s))r.push(s);else if(i=o.match(hy))r.push(i[2].replace(py,(a,c,h)=>c?Uf(c):h));else throw new Error(`Invalid Chalk template style argument: ${o} (in style '${t}')`)}return r}function yy(t){Lf.lastIndex=0;let e=[],r;for(;(r=Lf.exec(t))!==null;){let n=r[1];if(r[2]){let i=gy(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function Bf(t,e){let r={};for(let i of e)for(let o of i.styles)r[o[0]]=i.inverse?null:o.slice(1);let n=t;for(let[i,o]of Object.entries(r))if(Array.isArray(o)){if(!(i in n))throw new Error(`Unknown Chalk style: ${i}`);n=o.length>0?n[i](...o):n[i]}return n}Xf.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(dy,(o,s,a,c,h,u)=>{if(s)i.push(Uf(s));else if(c){let p=i.join("");i=[],n.push(r.length===0?p:Bf(t,r)(p)),r.push({inverse:a,styles:yy(c)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(Bf(t,r)(i.join(""))),i=[],r.pop()}else i.push(u)}),n.push(i.join("")),r.length>0){let o=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(o)}return n.join("")}});var Yf=y((Q2,Kf)=>{"use strict";var gr=Nf(),{stdout:yo,stderr:vo}=_i(),{stringReplaceAll:vy,stringEncaseCRLFWithFirstIndex:by}=$f(),{isArray:Sn}=Array,Wf=["ansi","ansi","ansi256","ansi16m"],Xt=Object.create(null),wy=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=yo?yo.level:0;t.level=e.level===void 0?r:e.level},bo=class{constructor(e){return zf(e)}},zf=t=>{let e={};return wy(e,t),e.template=(...r)=>Vf(e.template,...r),Object.setPrototypeOf(e,En.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=bo,e.template};function En(t){return zf(t)}for(let[t,e]of Object.entries(gr))Xt[t]={get(){let r=Cn(this,wo(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Xt.visible={get(){let t=Cn(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var Jf=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of Jf)Xt[t]={get(){let{level:e}=this;return function(...r){let n=wo(gr.color[Wf[e]][t](...r),gr.color.close,this._styler);return Cn(this,n,this._isEmpty)}}};for(let t of Jf){let e="bg"+t[0].toUpperCase()+t.slice(1);Xt[e]={get(){let{level:r}=this;return function(...n){let i=wo(gr.bgColor[Wf[r]][t](...n),gr.bgColor.close,this._styler);return Cn(this,i,this._isEmpty)}}}}var _y=Object.defineProperties(()=>{},{...Xt,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),wo=(t,e,r)=>{let n,i;return r===void 0?(n=t,i=e):(n=r.openAll+t,i=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:i,parent:r}},Cn=(t,e,r)=>{let n=(...i)=>Sn(i[0])&&Sn(i[0].raw)?Gf(n,Vf(n,...i)):Gf(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,_y),n._generator=t,n._styler=e,n._isEmpty=r,n},Gf=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:n,closeAll:i}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=vy(e,r.close,r.open),r=r.parent;let o=e.indexOf(`
20
+ `);return o!==-1&&(e=by(e,i,n,o)),n+e+i},go,Vf=(t,...e)=>{let[r]=e;if(!Sn(r)||!Sn(r.raw))return e.join(" ");let n=e.slice(1),i=[r.raw[0]];for(let o=1;o<r.length;o++)i.push(String(n[o-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[o]));return go===void 0&&(go=Hf()),go(t,i.join(""))};Object.defineProperties(En.prototype,Xt);var Pn=En();Pn.supportsColor=yo;Pn.stderr=En({level:vo?vo.level:0});Pn.stderr.supportsColor=vo;Kf.exports=Pn});var Qf=y((_o,xo)=>{(function(t,e){typeof _o=="object"&&typeof xo<"u"?xo.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.tinycolor=e())})(_o,function(){"use strict";function t(l){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},t(l)}var e=/^\s+/,r=/\s+$/;function n(l,d){if(l=l||"",d=d||{},l instanceof n)return l;if(!(this instanceof n))return new n(l,d);var f=i(l);this._originalInput=l,this._r=f.r,this._g=f.g,this._b=f.b,this._a=f.a,this._roundA=Math.round(100*this._a)/100,this._format=d.format||f.format,this._gradientType=d.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=f.ok}n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var d=this.toRgb();return(d.r*299+d.g*587+d.b*114)/1e3},getLuminance:function(){var d=this.toRgb(),f,v,S,_,j,H;return f=d.r/255,v=d.g/255,S=d.b/255,f<=.03928?_=f/12.92:_=Math.pow((f+.055)/1.055,2.4),v<=.03928?j=v/12.92:j=Math.pow((v+.055)/1.055,2.4),S<=.03928?H=S/12.92:H=Math.pow((S+.055)/1.055,2.4),.2126*_+.7152*j+.0722*H},setAlpha:function(d){return this._a=R(d),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var d=c(this._r,this._g,this._b);return{h:d.h*360,s:d.s,v:d.v,a:this._a}},toHsvString:function(){var d=c(this._r,this._g,this._b),f=Math.round(d.h*360),v=Math.round(d.s*100),S=Math.round(d.v*100);return this._a==1?"hsv("+f+", "+v+"%, "+S+"%)":"hsva("+f+", "+v+"%, "+S+"%, "+this._roundA+")"},toHsl:function(){var d=s(this._r,this._g,this._b);return{h:d.h*360,s:d.s,l:d.l,a:this._a}},toHslString:function(){var d=s(this._r,this._g,this._b),f=Math.round(d.h*360),v=Math.round(d.s*100),S=Math.round(d.l*100);return this._a==1?"hsl("+f+", "+v+"%, "+S+"%)":"hsla("+f+", "+v+"%, "+S+"%, "+this._roundA+")"},toHex:function(d){return u(this._r,this._g,this._b,d)},toHexString:function(d){return"#"+this.toHex(d)},toHex8:function(d){return p(this._r,this._g,this._b,this._a,d)},toHex8String:function(d){return"#"+this.toHex8(d)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(F(this._r,255)*100)+"%",g:Math.round(F(this._g,255)*100)+"%",b:Math.round(F(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(F(this._r,255)*100)+"%, "+Math.round(F(this._g,255)*100)+"%, "+Math.round(F(this._b,255)*100)+"%)":"rgba("+Math.round(F(this._r,255)*100)+"%, "+Math.round(F(this._g,255)*100)+"%, "+Math.round(F(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:x[u(this._r,this._g,this._b,!0)]||!1},toFilter:function(d){var f="#"+g(this._r,this._g,this._b,this._a),v=f,S=this._gradientType?"GradientType = 1, ":"";if(d){var _=n(d);v="#"+g(_._r,_._g,_._b,_._a)}return"progid:DXImageTransform.Microsoft.gradient("+S+"startColorstr="+f+",endColorstr="+v+")"},toString:function(d){var f=!!d;d=d||this._format;var v=!1,S=this._a<1&&this._a>=0,_=!f&&S&&(d==="hex"||d==="hex6"||d==="hex3"||d==="hex4"||d==="hex8"||d==="name");return _?d==="name"&&this._a===0?this.toName():this.toRgbString():(d==="rgb"&&(v=this.toRgbString()),d==="prgb"&&(v=this.toPercentageRgbString()),(d==="hex"||d==="hex6")&&(v=this.toHexString()),d==="hex3"&&(v=this.toHexString(!0)),d==="hex4"&&(v=this.toHex8String(!0)),d==="hex8"&&(v=this.toHex8String()),d==="name"&&(v=this.toName()),d==="hsl"&&(v=this.toHslString()),d==="hsv"&&(v=this.toHsvString()),v||this.toHexString())},clone:function(){return n(this.toString())},_applyModification:function(d,f){var v=d.apply(null,[this].concat([].slice.call(f)));return this._r=v._r,this._g=v._g,this._b=v._b,this.setAlpha(v._a),this},lighten:function(){return this._applyModification(C,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification($,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(E,arguments)},spin:function(){return this._applyModification(X,arguments)},_applyCombination:function(d,f){return d.apply(null,[this].concat([].slice.call(f)))},analogous:function(){return this._applyCombination(ve,arguments)},complement:function(){return this._applyCombination(G,arguments)},monochromatic:function(){return this._applyCombination(K,arguments)},splitcomplement:function(){return this._applyCombination(ae,arguments)},triad:function(){return this._applyCombination(J,[3])},tetrad:function(){return this._applyCombination(J,[4])}},n.fromRatio=function(l,d){if(t(l)=="object"){var f={};for(var v in l)l.hasOwnProperty(v)&&(v==="a"?f[v]=l[v]:f[v]=M(l[v]));l=f}return n(l,d)};function i(l){var d={r:0,g:0,b:0},f=1,v=null,S=null,_=null,j=!1,H=!1;return typeof l=="string"&&(l=_t(l)),t(l)=="object"&&(be(l.r)&&be(l.g)&&be(l.b)?(d=o(l.r,l.g,l.b),j=!0,H=String(l.r).substr(-1)==="%"?"prgb":"rgb"):be(l.h)&&be(l.s)&&be(l.v)?(v=M(l.s),S=M(l.v),d=h(l.h,v,S),j=!0,H="hsv"):be(l.h)&&be(l.s)&&be(l.l)&&(v=M(l.s),_=M(l.l),d=a(l.h,v,_),j=!0,H="hsl"),l.hasOwnProperty("a")&&(f=l.a)),f=R(f),{ok:j,format:l.format||H,r:Math.min(255,Math.max(d.r,0)),g:Math.min(255,Math.max(d.g,0)),b:Math.min(255,Math.max(d.b,0)),a:f}}function o(l,d,f){return{r:F(l,255)*255,g:F(d,255)*255,b:F(f,255)*255}}function s(l,d,f){l=F(l,255),d=F(d,255),f=F(f,255);var v=Math.max(l,d,f),S=Math.min(l,d,f),_,j,H=(v+S)/2;if(v==S)_=j=0;else{var B=v-S;switch(j=H>.5?B/(2-v-S):B/(v+S),v){case l:_=(d-f)/B+(d<f?6:0);break;case d:_=(f-l)/B+2;break;case f:_=(l-d)/B+4;break}_/=6}return{h:_,s:j,l:H}}function a(l,d,f){var v,S,_;l=F(l,360),d=F(d,100),f=F(f,100);function j(Ie,Kt,Me){return Me<0&&(Me+=1),Me>1&&(Me-=1),Me<1/6?Ie+(Kt-Ie)*6*Me:Me<1/2?Kt:Me<2/3?Ie+(Kt-Ie)*(2/3-Me)*6:Ie}if(d===0)v=S=_=f;else{var H=f<.5?f*(1+d):f+d-f*d,B=2*f-H;v=j(B,H,l+1/3),S=j(B,H,l),_=j(B,H,l-1/3)}return{r:v*255,g:S*255,b:_*255}}function c(l,d,f){l=F(l,255),d=F(d,255),f=F(f,255);var v=Math.max(l,d,f),S=Math.min(l,d,f),_,j,H=v,B=v-S;if(j=v===0?0:B/v,v==S)_=0;else{switch(v){case l:_=(d-f)/B+(d<f?6:0);break;case d:_=(f-l)/B+2;break;case f:_=(l-d)/B+4;break}_/=6}return{h:_,s:j,v:H}}function h(l,d,f){l=F(l,360)*6,d=F(d,100),f=F(f,100);var v=Math.floor(l),S=l-v,_=f*(1-d),j=f*(1-S*d),H=f*(1-(1-S)*d),B=v%6,Ie=[f,j,_,_,H,f][B],Kt=[H,f,f,j,_,_][B],Me=[_,_,H,f,f,j][B];return{r:Ie*255,g:Kt*255,b:Me*255}}function u(l,d,f,v){var S=[P(Math.round(l).toString(16)),P(Math.round(d).toString(16)),P(Math.round(f).toString(16))];return v&&S[0].charAt(0)==S[0].charAt(1)&&S[1].charAt(0)==S[1].charAt(1)&&S[2].charAt(0)==S[2].charAt(1)?S[0].charAt(0)+S[1].charAt(0)+S[2].charAt(0):S.join("")}function p(l,d,f,v,S){var _=[P(Math.round(l).toString(16)),P(Math.round(d).toString(16)),P(Math.round(f).toString(16)),P(Ae(v))];return S&&_[0].charAt(0)==_[0].charAt(1)&&_[1].charAt(0)==_[1].charAt(1)&&_[2].charAt(0)==_[2].charAt(1)&&_[3].charAt(0)==_[3].charAt(1)?_[0].charAt(0)+_[1].charAt(0)+_[2].charAt(0)+_[3].charAt(0):_.join("")}function g(l,d,f,v){var S=[P(Ae(v)),P(Math.round(l).toString(16)),P(Math.round(d).toString(16)),P(Math.round(f).toString(16))];return S.join("")}n.equals=function(l,d){return!l||!d?!1:n(l).toRgbString()==n(d).toRgbString()},n.random=function(){return n.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function m(l,d){d=d===0?0:d||10;var f=n(l).toHsl();return f.s-=d/100,f.s=U(f.s),n(f)}function b(l,d){d=d===0?0:d||10;var f=n(l).toHsl();return f.s+=d/100,f.s=U(f.s),n(f)}function E(l){return n(l).desaturate(100)}function C(l,d){d=d===0?0:d||10;var f=n(l).toHsl();return f.l+=d/100,f.l=U(f.l),n(f)}function k(l,d){d=d===0?0:d||10;var f=n(l).toRgb();return f.r=Math.max(0,Math.min(255,f.r-Math.round(255*-(d/100)))),f.g=Math.max(0,Math.min(255,f.g-Math.round(255*-(d/100)))),f.b=Math.max(0,Math.min(255,f.b-Math.round(255*-(d/100)))),n(f)}function $(l,d){d=d===0?0:d||10;var f=n(l).toHsl();return f.l-=d/100,f.l=U(f.l),n(f)}function X(l,d){var f=n(l).toHsl(),v=(f.h+d)%360;return f.h=v<0?360+v:v,n(f)}function G(l){var d=n(l).toHsl();return d.h=(d.h+180)%360,n(d)}function J(l,d){if(isNaN(d)||d<=0)throw new Error("Argument to polyad must be a positive number");for(var f=n(l).toHsl(),v=[n(l)],S=360/d,_=1;_<d;_++)v.push(n({h:(f.h+_*S)%360,s:f.s,l:f.l}));return v}function ae(l){var d=n(l).toHsl(),f=d.h;return[n(l),n({h:(f+72)%360,s:d.s,l:d.l}),n({h:(f+216)%360,s:d.s,l:d.l})]}function ve(l,d,f){d=d||6,f=f||30;var v=n(l).toHsl(),S=360/f,_=[n(l)];for(v.h=(v.h-(S*d>>1)+720)%360;--d;)v.h=(v.h+S)%360,_.push(n(v));return _}function K(l,d){d=d||6;for(var f=n(l).toHsv(),v=f.h,S=f.s,_=f.v,j=[],H=1/d;d--;)j.push(n({h:v,s:S,v:_})),_=(_+H)%1;return j}n.mix=function(l,d,f){f=f===0?0:f||50;var v=n(l).toRgb(),S=n(d).toRgb(),_=f/100,j={r:(S.r-v.r)*_+v.r,g:(S.g-v.g)*_+v.g,b:(S.b-v.b)*_+v.b,a:(S.a-v.a)*_+v.a};return n(j)},n.readability=function(l,d){var f=n(l),v=n(d);return(Math.max(f.getLuminance(),v.getLuminance())+.05)/(Math.min(f.getLuminance(),v.getLuminance())+.05)},n.isReadable=function(l,d,f){var v=n.readability(l,d),S,_;switch(_=!1,S=re(f),S.level+S.size){case"AAsmall":case"AAAlarge":_=v>=4.5;break;case"AAlarge":_=v>=3;break;case"AAAsmall":_=v>=7;break}return _},n.mostReadable=function(l,d,f){var v=null,S=0,_,j,H,B;f=f||{},j=f.includeFallbackColors,H=f.level,B=f.size;for(var Ie=0;Ie<d.length;Ie++)_=n.readability(l,d[Ie]),_>S&&(S=_,v=n(d[Ie]));return n.isReadable(l,v,{level:H,size:B})||!j?v:(f.includeFallbackColors=!1,n.mostReadable(l,["#fff","#000"],f))};var I=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},x=n.hexNames=w(I);function w(l){var d={};for(var f in l)l.hasOwnProperty(f)&&(d[l[f]]=f);return d}function R(l){return l=parseFloat(l),(isNaN(l)||l<0||l>1)&&(l=1),l}function F(l,d){L(l)&&(l="100%");var f=T(l);return l=Math.min(d,Math.max(0,parseFloat(l))),f&&(l=parseInt(l*d,10)/100),Math.abs(l-d)<1e-6?1:l%d/parseFloat(d)}function U(l){return Math.min(1,Math.max(0,l))}function A(l){return parseInt(l,16)}function L(l){return typeof l=="string"&&l.indexOf(".")!=-1&&parseFloat(l)===1}function T(l){return typeof l=="string"&&l.indexOf("%")!=-1}function P(l){return l.length==1?"0"+l:""+l}function M(l){return l<=1&&(l=l*100+"%"),l}function Ae(l){return Math.round(parseFloat(l)*255).toString(16)}function Te(l){return A(l)/255}var ce=function(){var l="[-\\+]?\\d+%?",d="[-\\+]?\\d*\\.\\d+%?",f="(?:"+d+")|(?:"+l+")",v="[\\s|\\(]+("+f+")[,|\\s]+("+f+")[,|\\s]+("+f+")\\s*\\)?",S="[\\s|\\(]+("+f+")[,|\\s]+("+f+")[,|\\s]+("+f+")[,|\\s]+("+f+")\\s*\\)?";return{CSS_UNIT:new RegExp(f),rgb:new RegExp("rgb"+v),rgba:new RegExp("rgba"+S),hsl:new RegExp("hsl"+v),hsla:new RegExp("hsla"+S),hsv:new RegExp("hsv"+v),hsva:new RegExp("hsva"+S),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function be(l){return!!ce.CSS_UNIT.exec(l)}function _t(l){l=l.replace(e,"").replace(r,"").toLowerCase();var d=!1;if(I[l])l=I[l],d=!0;else if(l=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var f;return(f=ce.rgb.exec(l))?{r:f[1],g:f[2],b:f[3]}:(f=ce.rgba.exec(l))?{r:f[1],g:f[2],b:f[3],a:f[4]}:(f=ce.hsl.exec(l))?{h:f[1],s:f[2],l:f[3]}:(f=ce.hsla.exec(l))?{h:f[1],s:f[2],l:f[3],a:f[4]}:(f=ce.hsv.exec(l))?{h:f[1],s:f[2],v:f[3]}:(f=ce.hsva.exec(l))?{h:f[1],s:f[2],v:f[3],a:f[4]}:(f=ce.hex8.exec(l))?{r:A(f[1]),g:A(f[2]),b:A(f[3]),a:Te(f[4]),format:d?"name":"hex8"}:(f=ce.hex6.exec(l))?{r:A(f[1]),g:A(f[2]),b:A(f[3]),format:d?"name":"hex"}:(f=ce.hex4.exec(l))?{r:A(f[1]+""+f[1]),g:A(f[2]+""+f[2]),b:A(f[3]+""+f[3]),a:Te(f[4]+""+f[4]),format:d?"name":"hex8"}:(f=ce.hex3.exec(l))?{r:A(f[1]+""+f[1]),g:A(f[2]+""+f[2]),b:A(f[3]+""+f[3]),format:d?"name":"hex"}:!1}function re(l){var d,f;return l=l||{level:"AA",size:"small"},d=(l.level||"AA").toUpperCase(),f=(l.size||"small").toLowerCase(),d!=="AA"&&d!=="AAA"&&(d="AA"),f!=="small"&&f!=="large"&&(f="small"),{level:d,size:f}}return n})});var od=y((Z2,id)=>{var yr=Qf(),rd={r:256,g:256,b:256,a:1},nd={h:360,s:1,v:1,a:1};function Eo(t,e,r){let n={};for(let i in t)t.hasOwnProperty(i)&&(n[i]=r===0?0:(e[i]-t[i])/r);return n}function Co(t,e,r,n){let i={};for(let o in e)e.hasOwnProperty(o)&&(i[o]=t[o]*r+e[o],i[o]=i[o]<0?i[o]+n[o]:n[o]!==1?i[o]%n[o]:i[o]);return i}function So(t,e,r){let n=t.color.toRgb(),i=e.color.toRgb(),o=Eo(n,i,r),s=[t.color];for(let a=1;a<r;a++){let c=Co(o,n,a,rd);s.push(yr(c))}return s}function Zf(t,e,r,n){let i=t.color.toHsv(),o=e.color.toHsv();if(i.s===0||o.s===0)return So(t,e,r);let s;if(typeof n=="boolean")s=n;else{let u=i.h<o.h&&o.h-i.h<180||i.h>o.h&&i.h-o.h>180;s=n==="long"&&u||n==="short"&&!u}let a=Eo(i,o,r),c=[t.color],h;i.h<=o.h&&!s||i.h>=o.h&&s?h=o.h-i.h:s?h=360-o.h+i.h:h=360-i.h+o.h,a.h=Math.pow(-1,s?1:0)*Math.abs(h)/r;for(let u=1;u<r;u++){let p=Co(a,i,u,nd);c.push(yr(p))}return c}function ed(t,e){let r=t.length;if(e=parseInt(e,10),isNaN(e)||e<2)throw new Error("Invalid number of steps (< 2)");if(e<r)throw new Error("Number of steps cannot be inferior to number of stops");let n=[];for(let o=1;o<r;o++){let s=(e-1)*(t[o].pos-t[o-1].pos);n.push(Math.max(1,Math.round(s)))}let i=1;for(let o=r-1;o--;)i+=n[o];for(;i!==e;)if(i<e){let o=Math.min.apply(null,n);n[n.indexOf(o)]++,i++}else{let o=Math.max.apply(null,n);n[n.indexOf(o)]--,i--}return n}function td(t,e,r,n){if(e<0||e>1)throw new Error("Position must be between 0 and 1");let i,o;for(let c=0,h=t.length;c<h-1;c++)if(e>=t[c].pos&&e<t[c+1].pos){i=t[c],o=t[c+1];break}i||(i=o=t[t.length-1]);let s=Eo(i.color[r](),o.color[r](),(o.pos-i.pos)*100),a=Co(s,i.color[r](),(e-i.pos)*100,n);return yr(a)}var Ht=class{constructor(e){if(e.length<2)throw new Error("Invalid number of stops (< 2)");let r=e[0].pos!==void 0,n=e.length,i=-1,o=!1;this.stops=e.map((s,a)=>{let c=s.pos!==void 0;if(r^c)throw new Error("Cannot mix positionned and not posionned color stops");if(c){let h=s.color!==void 0;if(!h&&(o||a===0||a===n-1))throw new Error("Cannot define two consecutive position-only stops");if(o=!h,s={color:h?yr(s.color):null,colorLess:!h,pos:s.pos},s.pos<0||s.pos>1)throw new Error("Color stops positions must be between 0 and 1");if(s.pos<i)throw new Error("Color stops positions are not ordered");i=s.pos}else s={color:yr(s.color!==void 0?s.color:s),pos:a/(n-1)};return s}),this.stops[0].pos!==0&&(this.stops.unshift({color:this.stops[0].color,pos:0}),n++),this.stops[n-1].pos!==1&&this.stops.push({color:this.stops[n-1].color,pos:1})}reverse(){let e=[];return this.stops.forEach(function(r){e.push({color:r.color,pos:1-r.pos})}),new Ht(e.reverse())}loop(){let e=[],r=[];return this.stops.forEach(n=>{e.push({color:n.color,pos:n.pos/2})}),this.stops.slice(0,-1).forEach(n=>{r.push({color:n.color,pos:1-n.pos/2})}),new Ht(e.concat(r.reverse()))}rgb(e){let r=ed(this.stops,e),n=[];this.stops.forEach((i,o)=>{i.colorLess&&(i.color=So(this.stops[o-1],this.stops[o+1],2)[1])});for(let i=0,o=this.stops.length;i<o-1;i++){let s=So(this.stops[i],this.stops[i+1],r[i]);n.splice(n.length,0,...s)}return n.push(this.stops[this.stops.length-1].color),n}hsv(e,r){let n=ed(this.stops,e),i=[];this.stops.forEach((o,s)=>{o.colorLess&&(o.color=Zf(this.stops[s-1],this.stops[s+1],2,r)[1])});for(let o=0,s=this.stops.length;o<s-1;o++){let a=Zf(this.stops[o],this.stops[o+1],n[o],r);i.splice(i.length,0,...a)}return i.push(this.stops[this.stops.length-1].color),i}css(e,r){e=e||"linear",r=r||(e==="linear"?"to right":"ellipse at center");let n=e+"-gradient("+r;return this.stops.forEach(function(i){n+=", "+(i.colorLess?"":i.color.toRgbString()+" ")+i.pos*100+"%"}),n+=")",n}rgbAt(e){return td(this.stops,e,"toRgb",rd)}hsvAt(e){return td(this.stops,e,"toHsv",nd)}};id.exports=function(t){if(arguments.length===1){if(!Array.isArray(arguments[0]))throw new Error('"stops" is not an array');t=arguments[0]}else t=Array.prototype.slice.call(arguments);return new Ht(t)}});var ld=y((ew,Dn)=>{"use strict";var ad=Yf(),xy=od(),sd=/\s/g;function Po(...t){let e=xy.apply(this,t),r=(n,i)=>Sy(n?n.toString():"",e,i);return r.multiline=(n,i)=>Ey(n?n.toString():"",e,i),r}var cd=(t,e,r)=>e.interpolation.toLowerCase()==="hsv"?t.hsv(r,e.hsvSpin.toLowerCase()):t.rgb(r);function Sy(t,e,r){let n=ud(r),i=Math.max(t.replace(sd,"").length,e.stops.length),o=cd(e,n,i),s="";for(let a of t)s+=a.match(sd)?a:ad.hex(o.shift().toHex())(a);return s}function Ey(t,e,r){let n=ud(r),i=t.split(`
21
+ `),o=Math.max.apply(null,i.map(c=>c.length).concat([e.stops.length])),s=cd(e,n,o),a=[];for(let c of i){let h=s.slice(0),u="";for(let p of c)u+=ad.hex(h.shift().toHex())(p);a.push(u)}return a.join(`
22
+ `)}function ud(t){let e={interpolation:"rgb",hsvSpin:"short",...t};if(t!==void 0&&typeof t!="object")throw new TypeError(`Expected \`options\` to be an \`object\`, got \`${typeof t}\``);if(typeof e.interpolation!="string")throw new TypeError(`Expected \`options.interpolation\` to be a \`string\`, got \`${typeof e.interpolation}\``);if(e.interpolation.toLowerCase()==="hsv"&&typeof e.hsvSpin!="string")throw new TypeError(`Expected \`options.hsvSpin\` to be a \`string\`, got \`${typeof e.hsvSpin}\``);return e}var vr={atlas:{colors:["#feac5e","#c779d0","#4bc0c8"],options:{}},cristal:{colors:["#bdfff3","#4ac29a"],options:{}},teen:{colors:["#77a1d3","#79cbca","#e684ae"],options:{}},mind:{colors:["#473b7b","#3584a7","#30d2be"],options:{}},morning:{colors:["#ff5f6d","#ffc371"],options:{interpolation:"hsv"}},vice:{colors:["#5ee7df","#b490ca"],options:{interpolation:"hsv"}},passion:{colors:["#f43b47","#453a94"],options:{}},fruit:{colors:["#ff4e50","#f9d423"],options:{}},instagram:{colors:["#833ab4","#fd1d1d","#fcb045"],options:{}},retro:{colors:["#3f51b1","#5a55ae","#7b5fac","#8f6aae","#a86aa4","#cc6b8e","#f18271","#f3a469","#f7c978"],options:{}},summer:{colors:["#fdbb2d","#22c1c3"],options:{}},rainbow:{colors:["#ff0000","#ff0100"],options:{interpolation:"hsv",hsvSpin:"long"}},pastel:{colors:["#74ebd5","#74ecd5"],options:{interpolation:"hsv",hsvSpin:"long"}}};Dn.exports=Po;for(let t in vr)Dn.exports[t]=e=>new Po(vr[t].colors)(e,vr[t].options),Dn.exports[t].multiline=e=>new Po(vr[t].colors).multiline(e,vr[t].options)});var Q=y(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.isUndefined=Se.fixName=Se.validateName=Se.validateSingleChar=Se.fixChar=Se.validateChar=void 0;function Uy(t){for(var e=0;e<t.length;e++){var r=t.charCodeAt(e);if(!(r===9||r===10||r===13||r>=32&&r<=55295||r>=57344&&r<=65533)){if(e+1===t.length)return!1;var n=t.charCodeAt(e+1);if(r>=55296&&r<=56319&&n>=56320&&n<=57343){e++;continue}return!1}}return!0}Se.validateChar=Uy;function Xy(t){for(var e="",r=0;r<t.length;r++){var n=t.charCodeAt(r);if(n===9||n===10||n===13||n>=32&&n<=55295||n>=57344&&n<=65533){e+=t[r];continue}if(r+1===t.length)return e+="\uFFFD",e;var i=t.charCodeAt(r+1);if(n>=55296&&n<=56319&&i>=56320&&i<=57343){e+=t[r]+t[r+1],r++;continue}e+="\uFFFD"}return e}Se.fixChar=Xy;function Hy(t){if(t.length===0)return!1;var e=t.charCodeAt(0);if(t.length===1)return e===9||e===10||e===13||e>=32&&e<=55295||e>=57344&&e<=65533;if(t.length!==2)return!1;var r=t.charCodeAt(1);return e>=55296&&e<=56319&&r>=56320&&r<=57343}Se.validateSingleChar=Hy;function Gy(t){if(t.length===0)return!1;var e=t.charCodeAt(0),r=e===58||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533;if(t.length===1)return r;var n=t.charCodeAt(1),i=e>=55296&&e<=56191&&n>=56320&&n<=57343;if(!r&&!i)return!1;for(var o=i?2:1,s=o;s<t.length;s++){var a=t.charCodeAt(s);if(!(a===58||a===95||a===45||a===46||a===183||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||a>=192&&a<=214||a>=216&&a<=246||a>=248&&a<=767||a>=768&&a<=879||a>=880&&a<=893||a>=895&&a<=8191||a>=8204&&a<=8205||a>=8255&&a<=8256||a>=8304&&a<=8591||a>=11264&&a<=12271||a>=12289&&a<=55295||a>=63744&&a<=64975||a>=65008&&a<=65533)){if(s+1===t.length)return!1;var c=t.charCodeAt(s+1);if(a>=55296&&a<=56191&&c>=56320&&c<=57343){s++;continue}return!1}}return!0}Se.validateName=Gy;function Wy(t){var e="";if(t.length===0)return e;var r=t.charCodeAt(0),n=r===58||r===95||r>=65&&r<=90||r>=97&&r<=122||r>=192&&r<=214||r>=216&&r<=246||r>=248&&r<=767||r>=880&&r<=893||r>=895&&r<=8191||r>=8204&&r<=8205||r>=8304&&r<=8591||r>=11264&&r<=12271||r>=12289&&r<=55295||r>=63744&&r<=64975||r>=65008&&r<=65533;if(t.length===1)return n?e=t[0]:e="\uFFFD",e;var i=t.charCodeAt(1),o=r>=55296&&r<=56191&&i>=56320&&i<=57343;o?e=t[0]+t[1]:n?e=t[0]:e="\uFFFD";for(var s=o?2:1,a=s;a<t.length;a++){var c=t.charCodeAt(a);if(c===58||c===95||c===45||c===46||c===183||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||c>=192&&c<=214||c>=216&&c<=246||c>=248&&c<=767||c>=768&&c<=879||c>=880&&c<=893||c>=895&&c<=8191||c>=8204&&c<=8205||c>=8255&&c<=8256||c>=8304&&c<=8591||c>=11264&&c<=12271||c>=12289&&c<=55295||c>=63744&&c<=64975||c>=65008&&c<=65533){e+=t[a];continue}if(a+1===t.length)return e+="\uFFFD",e;var h=t.charCodeAt(a+1);if(c>=55296&&c<=56191&&h>=56320&&h<=57343){e+=t[a]+t[a+1],a++;continue}e+="\uFFFD"}return e}Se.fixName=Wy;function zy(t){return Object.prototype.toString.call(t)==="[object Undefined]"}Se.isUndefined=zy});var Wt=y(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.StringOptions=void 0;var Tn=Q(),Jy=function(){function t(e){this.doubleQuotes=!1,this.indent=" ",this.newline=`
23
+ `,this.pretty=!0,(0,Tn.isUndefined)(e.doubleQuotes)||(this.doubleQuotes=e.doubleQuotes),(0,Tn.isUndefined)(e.indent)||(this.indent=e.indent),(0,Tn.isUndefined)(e.newline)||(this.newline=e.newline),(0,Tn.isUndefined)(e.pretty)||(this.pretty=e.pretty)}return t}();Mn.StringOptions=Jy});var qn=y(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.escapeDoubleQuotes=ke.escapeSingleQuotes=ke.escapeRightAngleBracketsInCdataTerminator=ke.escapeLeftAngleBrackets=ke.escapeAmpersands=void 0;function Vy(t){return t.replace(/&/g,"&amp;")}ke.escapeAmpersands=Vy;function Ky(t){return t.replace(/</g,"&lt;")}ke.escapeLeftAngleBrackets=Ky;function Yy(t){return t.replace(/]]>/g,"]]&gt;")}ke.escapeRightAngleBracketsInCdataTerminator=Yy;function Qy(t){return t.replace(/'/g,"&apos;")}ke.escapeSingleQuotes=Qy;function Zy(t){return t.replace(/"/g,"&quot;")}ke.escapeDoubleQuotes=Zy});var zo=y(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});var ev=se(),Md=qn(),Go=Q(),tv=function(){function t(e,r,n){this._validation=r,(0,Go.isUndefined)(n.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=n.replaceInvalidCharsInCharData,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._replaceInvalidCharsInCharData)e=(0,Go.fixChar)(e);else if(this._validation&&!(0,Go.validateChar)(e))throw new Error((0,ev.getContext)(this.up())+": attribute text"+(' "'+e+'" should not contain characters not')+" allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){var e=this._charData;return e=(0,Md.escapeAmpersands)(e),e=(0,Md.escapeLeftAngleBrackets)(e),e},t.prototype.up=function(){return this._parent},t}();Wo.default=tv});var Nn=y(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});var qd=se(),Nd=Q(),rv=function(){function t(e,r,n){this._hex=!1,this._validation=r,this._parent=e,this.char=n.char,(0,Nd.isUndefined)(n.hex)||(this.hex=n.hex)}return Object.defineProperty(t.prototype,"char",{get:function(){return this._char},set:function(e){if(this._validation&&!(0,Nd.validateSingleChar)(e))throw new Error((0,qd.getContext)(this.up())+": character reference"+(' "'+e+'" should reference a single character,')+" and this character should be allowed in XML");this._char=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hex",{get:function(){return this._hex},set:function(e){this._hex=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){var e;if(this._char.length===1)e=this._char.charCodeAt(0);else{var r=this._char.charCodeAt(0);if(r>=55296&&r<=56319&&this._char.length>1){var n=this._char.charCodeAt(1);if(n>=56320&&n<=57343)e=(r-55296)*1024+n-56320+65536;else throw new Error((0,qd.getContext)(this.up())+": character"+(' reference "'+this.char+'" should')+" reference a valid Unicode character")}else e=r}return this._hex?"&#x"+e.toString(16)+";":"&#"+e+";"},t.prototype.up=function(){return this._parent},t}();Jo.default=rv});var jn=y(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});var nv=se(),iv=Q(),ov=function(){function t(e,r,n){this._validation=r,this._parent=e,this.name=n.name}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){if(this._validation&&!(0,iv.validateName)(e))throw new Error((0,nv.getContext)(this.up())+": entity reference name"+(' "'+e+'" should not contain characters not')+" allowed in XML names");this._name=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"&"+this._name+";"},t.prototype.up=function(){return this._parent},t}();Vo.default=ov});var $n=y(br=>{"use strict";var Qo=br&&br.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(br,"__esModule",{value:!0});var Ko=se(),jd=qn(),sv=Wt(),Yo=Q(),av=Qo(zo()),cv=Qo(Nn()),uv=Qo(jn()),lv=function(){function t(e,r,n){this._validation=r,(0,Yo.isUndefined)(n.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=n.replaceInvalidCharsInName,this._children=[],this._parent=e,this.name=n.name}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){if(this._replaceInvalidCharsInName){if(e=(0,Yo.fixName)(e),e.length===0)throw new Error((0,Ko.getContext)(this.up())+": attribute name should not be empty")}else if(this._validation&&!(0,Yo.validateName)(e))throw e.length===0?new Error((0,Ko.getContext)(this.up())+": attribute name should not be empty"):new Error((0,Ko.getContext)(this.up())+": attribute name"+(' "'+e+'" should not contain characters not')+" allowed in XML names");this._name=e},enumerable:!1,configurable:!0}),t.prototype.charRef=function(e){var r=new cv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entityRef=function(e){var r=new uv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.text=function(e){var r=new av.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});for(var r=new sv.StringOptions(e),n=r.doubleQuotes?'"':"'",i=this._name+"="+n,o=0,s=this._children;o<s.length;o++){var a=s[o];r.doubleQuotes?i+=(0,jd.escapeDoubleQuotes)(a.toString()):i+=(0,jd.escapeSingleQuotes)(a.toString())}return i+=n,i},t.prototype.up=function(){return this._parent},t}();br.default=lv});var es=y(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});var fv=se(),dv=Q(),hv=function(){function t(e,r,n){this._validation=r,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._validation&&!(0,dv.validateChar)(e))throw new Error((0,fv.getContext)(this.up())+": attribute-list"+(' declaration "'+e+'" should not contain')+" characters not allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<!ATTLIST "+this._charData+">"},t.prototype.up=function(){return this._parent},t}();Zo.default=hv});var rs=y(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});var pv=se(),mv=Q(),gv=function(){function t(e,r,n){this._validation=r,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._validation&&!(0,mv.validateChar)(e))throw new Error((0,pv.getContext)(this.up())+": element declaration"+(' "'+e+'" should not contain characters')+" not allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<!ELEMENT "+this._charData+">"},t.prototype.up=function(){return this._parent},t}();ts.default=gv});var is=y(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});var yv=se(),vv=Q(),bv=function(){function t(e,r,n){this._validation=r,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._validation&&!(0,vv.validateChar)(e))throw new Error((0,yv.getContext)(this.up())+": entity declaration"+(' "'+e+'" should not contain characters')+" not allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<!ENTITY "+this._charData+">"},t.prototype.up=function(){return this._parent},t}();ns.default=bv});var ss=y(os=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});var wv=se(),_v=Q(),xv=function(){function t(e,r,n){this._validation=r,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._validation&&!(0,_v.validateChar)(e))throw new Error((0,wv.getContext)(this.up())+": notation declaration"+(' "'+e+'" should not contain characters')+" not allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<!NOTATION "+this._charData+">"},t.prototype.up=function(){return this._parent},t}();os.default=xv});var cs=y(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});var Sv=se(),Ev=Q(),Cv=function(){function t(e,r,n){this._validation=r,this._parent=e,this.name=n.name}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){if(this._validation&&!(0,Ev.validateName)(e))throw new Error((0,Sv.getContext)(this.up())+": parameter entity"+(' reference name "'+e+'" should not contain')+" characters not allowed in XML names");this._name=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"%"+this._name+";"},t.prototype.up=function(){return this._parent},t}();as.default=Cv});var wr=y(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});var Ln=se(),Bn=Q(),Pv=function(){function t(e,r,n){this._validation=r,this._parent=e,this.content=n.content,this.target=n.target}return Object.defineProperty(t.prototype,"content",{get:function(){return this._content},set:function(e){if(!(0,Bn.isUndefined)(e)){if(this._validation&&!(0,Bn.validateChar)(e))throw new Error((0,Ln.getContext)(this.up())+": processing"+(' instruction content "'+e+'" should')+" not contain characters not allowed in XML");if(this._validation&&e.indexOf("?>")!==-1)throw new Error((0,Ln.getContext)(this.up())+": processing"+(' instruction content "'+e+'" should')+" not contain the string '?>'")}this._content=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){return this._target},set:function(e){if(this._validation&&!(0,Bn.validateName)(e))throw new Error((0,Ln.getContext)(this.up())+": processing"+(' instruction target "'+e+'" should')+" not contain characters not allowed in XML names");if(this._validation&&e==="xml")throw new Error((0,Ln.getContext)(this.up())+": processing"+(' instruction target "'+e+'" should')+" not be the string 'xml'");this._target=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return(0,Bn.isUndefined)(this._content)?"<?"+this._target+"?>":"<?"+this._target+" "+this._content+"?>"},t.prototype.up=function(){return this._parent},t}();us.default=Pv});var Un=y(vt=>{"use strict";var bt=vt&&vt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(vt,"__esModule",{value:!0});vt.validatePubId=void 0;var at=se(),Dv=Wt(),Ge=Q(),Ov=bt(_r()),Av=bt(es()),Iv=bt(rs()),Rv=bt(is()),Fv=bt(ss()),kv=bt(cs()),Tv=bt(wr()),Mv=function(){function t(e,r,n){this._pubId=void 0,this._sysId=void 0,this._validation=r,this._children=[],this._parent=e,this.name=n.name,(0,Ge.isUndefined)(n.sysId)||(this.sysId=n.sysId),(0,Ge.isUndefined)(n.pubId)||(this.pubId=n.pubId)}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){if(this._validation&&!(0,Ge.validateName)(e))throw new Error((0,at.getContext)(this.up())+': DTD name "'+e+'" should not contain characters not allowed in XML names');this._name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pubId",{get:function(){return this._pubId},set:function(e){if(!(0,Ge.isUndefined)(e)){if(this._validation&&!$d(e))throw new Error((0,at.getContext)(this.up())+": DTD public"+(' identifier "'+e+'" should not contain')+" characters not allowed in public identifiers");if(this._validation&&(0,Ge.isUndefined)(this._sysId))throw new Error((0,at.getContext)(this.up())+": DTD public"+(' identifier "'+e+'" should not be defined')+" if system identifier is undefined")}this._pubId=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sysId",{get:function(){return this._sysId},set:function(e){if(!(0,Ge.isUndefined)(e)){if(this._validation&&!(0,Ge.validateChar)(e))throw new Error((0,at.getContext)(this.up())+": DTD system"+(' identifier "'+e+'" should not contain')+" characters not allowed in XML");if(this._validation&&e.indexOf("'")!==-1&&e.indexOf('"')!==-1)throw new Error((0,at.getContext)(this.up())+": DTD system"+(' identifier "'+e+'" should not contain')+" both single quotes and double quotes")}this._sysId=e},enumerable:!1,configurable:!0}),t.prototype.attlist=function(e){var r=new Av.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new Ov.default(this,this._validation,e);return this._children.push(r),r},t.prototype.element=function(e){var r=new Iv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entity=function(e){var r=new Rv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.notation=function(e){var r=new Fv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.paramEntityRef=function(e){var r=new kv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new Tv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});var r=new Dv.StringOptions(e),n="<!DOCTYPE "+this._name;if((0,Ge.isUndefined)(this._pubId))(0,Ge.isUndefined)(this._sysId)||(n+=" ",n=this.appendId("SYSTEM",this._sysId,n,r));else{if((0,Ge.isUndefined)(this._sysId))throw new Error((0,at.getContext)(this.up())+": DTD system identifier is not undefined");n+=" ",n=this.appendId("PUBLIC",this._pubId,n,r),n=this.appendId("",this._sysId,n,r)}if(this._children.length!==0){n+=" [";for(var i=0,o=this._children;i<o.length;i++){var s=o[i];r.pretty&&(n+=r.newline+r.indent),n+=s.toString()}r.pretty&&(n+=r.newline),n+="]>"}else n+=">";return n},t.prototype.up=function(){return this._parent},t.prototype.appendId=function(e,r,n,i){if(n+=e+" ",i.doubleQuotes){if(this._validation&&r.indexOf('"')!==-1)throw new Error((0,at.getContext)(this.up())+": doubleQuotes option inconsistent with DTD system identifier or public identifier");n+='"'+r+'"'}else{if(this._validation&&r.indexOf("'")!==-1)throw new Error((0,at.getContext)(this)+": doubleQuotes option inconsistent with DTD system identifier or public identifier");n+="'"+r+"'"}return n},t}();vt.default=Mv;function $d(t){for(var e=0;e<t.length;e++){var r=t.charCodeAt(e);if(!(r===10||r===13||r===32||r===33||r>=35&&r<=37||r>=39&&r<=47||r>=48&&r<=57||r===58||r===59||r===61||r===63||r>=64&&r<=90||r===95||r>=97&&r<=122))return e+1===t.length,!1}return!0}vt.validatePubId=$d});var ds=y(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});var Ld=se(),ls=Q(),qv=function(){function t(e,r,n){this._validation=r,(0,ls.isUndefined)(n.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=n.replaceInvalidCharsInCharData,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._replaceInvalidCharsInCharData)e=(0,ls.fixChar)(e);else if(this._validation&&!(0,ls.validateChar)(e))throw new Error((0,Ld.getContext)(this.up())+": CDATA section"+(' "'+e+'" should not contain characters')+" not allowed in XML");if(this._replaceInvalidCharsInCharData)e=e.replace("]]>","\uFFFD\uFFFD\uFFFD");else if(this._validation&&e.indexOf("]]>")!==-1)throw new Error((0,Ld.getContext)(this.up())+": CDATA section"+(' "'+e+'" should not contain the string')+" ']]>'");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<![CDATA["+this._charData+"]]>"},t.prototype.up=function(){return this._parent},t}();fs.default=qv});var gs=y(ms=>{"use strict";Object.defineProperty(ms,"__esModule",{value:!0});var Nv=se(),hs=qn(),ps=Q(),jv=function(){function t(e,r,n){this._validation=r,(0,ps.isUndefined)(n.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=n.replaceInvalidCharsInCharData,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._replaceInvalidCharsInCharData)e=(0,ps.fixChar)(e);else if(this._validation&&!(0,ps.validateChar)(e))throw new Error((0,Nv.getContext)(this.up())+": character data"+('"'+e+'" should not contain characters not')+" allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){var e=this._charData;return e=(0,hs.escapeAmpersands)(e),e=(0,hs.escapeLeftAngleBrackets)(e),e=(0,hs.escapeRightAngleBracketsInCdataTerminator)(e),e},t.prototype.up=function(){return this._parent},t}();ms.default=jv});var Wn=y(Er=>{"use strict";var wt=Er&&Er.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Er,"__esModule",{value:!0});var Xn=se(),$v=Wt(),xr=Q(),Bd=wt($n()),Lv=wt(ds()),Sr=wt(gs()),Hn=wt(Nn()),Bv=wt(_r()),Gn=wt(jn()),Uv=wt(wr()),Xv=function(){function t(e,r,n){this._validation=r,(0,xr.isUndefined)(n.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=n.replaceInvalidCharsInName,(0,xr.isUndefined)(n.useSelfClosingTagIfEmpty)?this._useSelfClosingTagIfEmpty=!0:this._useSelfClosingTagIfEmpty=n.useSelfClosingTagIfEmpty,this._children=[],this._attributeNames=[],this._parent=e,this.name=n.name}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){if(this._replaceInvalidCharsInName){if(e=(0,xr.fixName)(e),e.length===0)throw new Error((0,Xn.getContext)(this.up())+": element name should not be empty")}else if(this._validation&&!(0,xr.validateName)(e))throw e.length===0?new Error((0,Xn.getContext)(this.up())+": element name should not be empty"):new Error((0,Xn.getContext)(this.up())+": element name"+(' "'+e+'" should not contain characters not')+" allowed in XML names");this._name=e},enumerable:!1,configurable:!0}),t.prototype.attribute=function(e){if(this._validation&&this._attributeNames.indexOf(e.name)!==-1)throw new Error((0,Xn.getContext)(this.up())+': element "'+this.name+'" already contains an attribute with the'+(' name "'+e.name+'"'));var r=new Bd.default(this,this._validation,e);return this._children.push(r),this._attributeNames.push(e.name),r},t.prototype.cdata=function(e){var r=new Lv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.charData=function(e){var r=new Sr.default(this,this._validation,e);return this._children.push(r),r},t.prototype.charRef=function(e){var r=new Hn.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new Bv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.element=function(e){var r=new t(this,this._validation,e);return this._children.push(r),r},t.prototype.entityRef=function(e){var r=new Gn.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new Uv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){return e===void 0&&(e={}),this.toStringWithIndent(e,"")},t.prototype.up=function(){return this._parent},t.prototype.toStringWithIndent=function(e,r){for(var n=new $v.StringOptions(e),i=r+n.indent,o="<"+this._name,s=[],a=0,c=this._children;a<c.length;a++){var h=c[a];h instanceof Bd.default?o+=" "+h.toString(e):s.push(h)}if(s.length>0){for(var u="",p=0;p<s.length;p++){var g=s[p],m="";g instanceof t?m+=g.toStringWithIndent(n,i):m+=g.toString();var b=p>0?s[p-1]:void 0;g instanceof Sr.default&&g.toString()===""||(n.pretty&&(this.allSameLineNodes(s)||p>0&&this.onSameLine(g,b)||(m=n.newline+i+m)),u+=m)}n.pretty&&(this.allSameLineNodes(s)||(u+=n.newline+r)),u.length===0&&this._useSelfClosingTagIfEmpty?o+="/>":o+=">"+u+"</"+this._name+">"}else this._useSelfClosingTagIfEmpty?o+="/>":o+="></"+this._name+">";return o},t.prototype.allSameLineNodes=function(e){for(var r=0,n=e;r<n.length;r++){var i=n[r];if(!(i instanceof Hn.default||i instanceof Gn.default||i instanceof Sr.default))return!1}return!0},t.prototype.onSameLine=function(e,r){return(e instanceof Hn.default||e instanceof Gn.default||e instanceof Sr.default)&&!(0,xr.isUndefined)(r)&&(r instanceof Hn.default||r instanceof Gn.default||r instanceof Sr.default)},t}();Er.default=Xv});var se=y(zt=>{"use strict";var Jn=zt&&zt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(zt,"__esModule",{value:!0});zt.getContext=void 0;var Hv=Jn($n()),Gv=Jn(Vn()),Wv=Jn(Un()),zv=Jn(Wn());function zn(t){if(t instanceof Hv.default)return zn(t.up())+(' > attribute "'+t.name+'"');if(t instanceof Gv.default)return"in XML document";if(t instanceof Wv.default)return zn(t.up())+" > DTD";if(t instanceof zv.default)return zn(t.up())+(' > element "'+t.name+'"');throw new Error("Unrecognized object of type "+Object.prototype.toString.call(t))}zt.getContext=zn});var _r=y(bs=>{"use strict";Object.defineProperty(bs,"__esModule",{value:!0});var ys=se(),vs=Q(),Jv=function(){function t(e,r,n){this._validation=r,(0,vs.isUndefined)(n.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=n.replaceInvalidCharsInCharData,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._replaceInvalidCharsInCharData)e=(0,vs.fixChar)(e);else if(this._validation&&!(0,vs.validateChar)(e))throw new Error((0,ys.getContext)(this.up())+": comment content"+(' "'+e+'" should not contain characters')+" not allowed in XML");if(this._replaceInvalidCharsInCharData)e=e.replace("--","\uFFFD\uFFFD");else if(this._validation&&e.indexOf("--")!==-1)throw new Error((0,ys.getContext)(this.up())+": comment content"+(' "'+e+'" should not contain the string')+" '--'");if(this._replaceInvalidCharsInCharData)e.lastIndexOf("-")===e.length-1&&(e=e.substr(0,e.length-1)+"\uFFFD");else if(this._validation&&e.lastIndexOf("-")===e.length-1)throw new Error((0,ys.getContext)(this.up())+": comment content"+(' "'+e+'" should not end with the string')+" '-'");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<!--"+this._charData+"-->"},t.prototype.up=function(){return this._parent},t}();bs.default=Jv});var xs=y(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});var ws=se(),Vv=Wt(),Cr=Q(),Kv=function(){function t(e,r,n){this._version="1.0",this._validation=r,this._parent=e,this.encoding=n.encoding,this.standalone=n.standalone,(0,Cr.isUndefined)(n.version)||(this.version=n.version)}return Object.defineProperty(t.prototype,"encoding",{get:function(){return this._encoding},set:function(e){if(this._validation&&!(0,Cr.isUndefined)(e)&&!Yv(e))throw new Error((0,ws.getContext)(this.up())+": declaration"+(" encoding attribute "+e+" should be a")+" valid encoding");this._encoding=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"standalone",{get:function(){return this._standalone},set:function(e){if(this._validation&&!(0,Cr.isUndefined)(e)&&e!=="yes"&&e!=="no")throw new Error((0,ws.getContext)(this.up())+": declaration"+(" standalone attribute "+e+" should")+" be the string 'yes' or the string 'no'");this._standalone=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._version},set:function(e){if(this._validation&&!Qv(e))throw new Error((0,ws.getContext)(this.up())+": declaration version"+(" attribute "+e+" should be a valid XML")+" version");this._version=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(e){e===void 0&&(e={});var r=new Vv.StringOptions(e),n=r.doubleQuotes?'"':"'",i="<?xml version="+n+this._version+n;return(0,Cr.isUndefined)(this._encoding)||(i+=" encoding="+n+this._encoding+n),(0,Cr.isUndefined)(this._standalone)||(i+=" standalone="+n+this._standalone+n),i+="?>",i},t.prototype.up=function(){return this._parent},t}();_s.default=Kv;function Yv(t){if(t.length===0)return!1;var e=t.charCodeAt(0);if(!(e>=65&&e<=90||e>=97&&e<=122))return!1;for(var r=1;r<t.length;r++){var n=t.charCodeAt(r);if(!(n===95||n===45||n===46||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122))return r+1===t.length,!1}return!0}function Qv(t){for(var e=0;e<=9;e++)if(t==="1."+e)return!0;return!1}});var Vn=y(Dr=>{"use strict";var Or=Dr&&Dr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Dr,"__esModule",{value:!0});var Zv=Wt(),e1=Q(),t1=Or(_r()),Ud=Or(xs()),Xd=Or(Un()),Pr=Or(Wn()),r1=Or(wr()),n1=function(){function t(e){this._children=[],this._validation=(0,e1.isUndefined)(e.validation)?!0:e.validation}return t.prototype.comment=function(e){var r=new t1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.decl=function(e){if(e===void 0&&(e={}),this._validation&&this._children.length!==0)throw new Error("in XML document: declaration must be the first child");var r=new Ud.default(this,this._validation,e);return this._children.push(r),r},t.prototype.dtd=function(e){var r=this._children.filter(function(i){return i instanceof Pr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: DTD must precede the root element");var n=new Xd.default(this,this._validation,e);return this._children.push(n),n},t.prototype.element=function(e){var r=this._children.filter(function(i){return i instanceof Pr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: only one root element is permitted");var n=new Pr.default(this,this._validation,e);return this._children.push(n),n},t.prototype.procInst=function(e){var r=new r1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});var r=this._children.filter(function(h){return h instanceof Pr.default});if(this._validation&&r.length!==1)throw new Error("in XML document: no more than one root element is permitted");for(var n=new Zv.StringOptions(e),i="",o=0,s=this._children;o<s.length;o++){var a=s[o];a instanceof Ud.default||a instanceof Xd.default||a instanceof Pr.default?i+=a.toString(e):i+=a.toString(),n.pretty&&(i+=n.newline)}var c=i.length-n.newline.length;return i.substr(c)===n.newline&&(i=i.substr(0,c)),i},t}();Dr.default=n1});var Hd=y(q=>{"use strict";var ee=q&&q.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(q,"__esModule",{value:!0});q.document=q.XmlProcInst=q.XmlEntityRef=q.XmlElement=q.XmlDtdParamEntityRef=q.XmlDtdNotation=q.XmlDtdEntity=q.XmlDtdElement=q.XmlDtdAttlist=q.XmlDtd=q.XmlDocument=q.XmlDecl=q.XmlComment=q.XmlCharRef=q.XmlCharData=q.XmlCdata=q.XmlAttributeText=q.XmlAttribute=void 0;var i1=ee(Vn()),o1=$n();Object.defineProperty(q,"XmlAttribute",{enumerable:!0,get:function(){return ee(o1).default}});var s1=zo();Object.defineProperty(q,"XmlAttributeText",{enumerable:!0,get:function(){return ee(s1).default}});var a1=ds();Object.defineProperty(q,"XmlCdata",{enumerable:!0,get:function(){return ee(a1).default}});var c1=gs();Object.defineProperty(q,"XmlCharData",{enumerable:!0,get:function(){return ee(c1).default}});var u1=Nn();Object.defineProperty(q,"XmlCharRef",{enumerable:!0,get:function(){return ee(u1).default}});var l1=_r();Object.defineProperty(q,"XmlComment",{enumerable:!0,get:function(){return ee(l1).default}});var f1=xs();Object.defineProperty(q,"XmlDecl",{enumerable:!0,get:function(){return ee(f1).default}});var d1=Vn();Object.defineProperty(q,"XmlDocument",{enumerable:!0,get:function(){return ee(d1).default}});var h1=Un();Object.defineProperty(q,"XmlDtd",{enumerable:!0,get:function(){return ee(h1).default}});var p1=es();Object.defineProperty(q,"XmlDtdAttlist",{enumerable:!0,get:function(){return ee(p1).default}});var m1=rs();Object.defineProperty(q,"XmlDtdElement",{enumerable:!0,get:function(){return ee(m1).default}});var g1=is();Object.defineProperty(q,"XmlDtdEntity",{enumerable:!0,get:function(){return ee(g1).default}});var y1=ss();Object.defineProperty(q,"XmlDtdNotation",{enumerable:!0,get:function(){return ee(y1).default}});var v1=cs();Object.defineProperty(q,"XmlDtdParamEntityRef",{enumerable:!0,get:function(){return ee(v1).default}});var b1=Wn();Object.defineProperty(q,"XmlElement",{enumerable:!0,get:function(){return ee(b1).default}});var w1=jn();Object.defineProperty(q,"XmlEntityRef",{enumerable:!0,get:function(){return ee(w1).default}});var _1=wr();Object.defineProperty(q,"XmlProcInst",{enumerable:!0,get:function(){return ee(_1).default}});function x1(t){return t===void 0&&(t={}),new i1.default(t)}q.document=x1});var Ss=y(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.stringify=te.isMap=te.isSet=te.isFunction=te.isArray=te.isObject=te.isNull=te.isUndefined=void 0;function Gd(t){return Object.prototype.toString.call(t)==="[object Undefined]"}te.isUndefined=Gd;function Wd(t){return Object.prototype.toString.call(t)==="[object Null]"}te.isNull=Wd;function S1(t){return Object.prototype.toString.call(t)==="[object Object]"}te.isObject=S1;function E1(t){return Object.prototype.toString.call(t)==="[object Array]"}te.isArray=E1;function zd(t){return Object.prototype.toString.call(t)==="[object Function]"}te.isFunction=zd;function C1(t){return Object.prototype.toString.call(t)==="[object Set]"}te.isSet=C1;function P1(t){return Object.prototype.toString.call(t)==="[object Map]"}te.isMap=P1;function D1(t){return!Gd(t)&&!Wd(t)&&zd(t?.toString)&&(t=t.toString()),String(t)}te.stringify=D1});var Zd=y(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.WrapHandlers=Ee.TypeHandlers=Ee.FormatOptions=Ee.DtdOptions=Ee.DeclarationOptions=Ee.Options=void 0;var $e=Ss(),O1=function(){function t(e){e===void 0&&(e={}),this.aliasString="=",this.attributeString="@",this.cdataInvalidChars=!1,this.cdataKeys=[],this.replaceInvalidChars=!1,this.useSelfClosingTagIfEmpty=!0,this.validation=!0,this.valueString="#",(0,$e.isUndefined)(e.validation)||(this.validation=e.validation),(0,$e.isUndefined)(e.aliasString)||(this.aliasString=e.aliasString),(0,$e.isUndefined)(e.attributeString)||(this.attributeString=e.attributeString),(0,$e.isUndefined)(e.cdataInvalidChars)||(this.cdataInvalidChars=e.cdataInvalidChars),(0,$e.isUndefined)(e.cdataKeys)||(this.cdataKeys=e.cdataKeys),this.declaration=new Jd(e.declaration),this.dtd=new Vd(this.validation,e.dtd),this.format=new Kd(e.format),(0,$e.isUndefined)(e.replaceInvalidChars)||(this.replaceInvalidChars=e.replaceInvalidChars),this.typeHandlers=new Yd(e.typeHandlers),(0,$e.isUndefined)(e.useSelfClosingTagIfEmpty)||(this.useSelfClosingTagIfEmpty=e.useSelfClosingTagIfEmpty),(0,$e.isUndefined)(e.valueString)||(this.valueString=e.valueString),this.wrapHandlers=new Qd(e.wrapHandlers)}return t}();Ee.Options=O1;var Jd=function(){function t(e){e===void 0&&(e={}),this.include=!0,(0,$e.isUndefined)(e.include)||(this.include=e.include),this.encoding=e.encoding,this.standalone=e.standalone,this.version=e.version}return t}();Ee.DeclarationOptions=Jd;var Vd=function(){function t(e,r){if(r===void 0&&(r={}),this.include=!1,(0,$e.isUndefined)(r.include)||(this.include=r.include),e&&(0,$e.isUndefined)(r.name)&&this.include)throw new Error("options.dtd.name should be defined if options.dtd.include is true");this.name=r.name,this.sysId=r.sysId,this.pubId=r.pubId}return t}();Ee.DtdOptions=Vd;var Kd=function(){function t(e){e===void 0&&(e={}),this.doubleQuotes=e.doubleQuotes,this.indent=e.indent,this.newline=e.newline,this.pretty=e.pretty}return t}();Ee.FormatOptions=Kd;var Yd=function(){function t(e){e===void 0&&(e={});for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this[r]=e[r])}return t}();Ee.TypeHandlers=Yd;var Qd=function(){function t(e){e===void 0&&(e={});for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this[r]=e[r])}return t}();Ee.WrapHandlers=Qd});var oh=y(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.parse=ct.parseToExistingElement=ct.Absent=void 0;var th=Hd(),rh=Zd(),V=Ss(),Es=function(){function t(){}return Object.defineProperty(t,"instance",{get:function(){return t._instance},enumerable:!1,configurable:!0}),t._instance=new t,t}();ct.Absent=Es;function Cs(t,e){var r=Object.prototype.toString.call(t),n;return Object.prototype.hasOwnProperty.call(e.typeHandlers,"*")&&(n=e.typeHandlers["*"]),Object.prototype.hasOwnProperty.call(e.typeHandlers,r)&&(n=e.typeHandlers[r]),n}function nh(t,e,r){var n=function(s){return r.cdataInvalidChars&&(s.indexOf("<")!==-1||s.indexOf("&")!==-1)||r.cdataKeys.indexOf(e.name)!==-1||r.cdataKeys.indexOf("*")!==-1};if(e instanceof th.XmlElement)if(n(t))for(var i=t.split("]]>"),o=0;o<i.length;o++)n(i[o])?e.cdata({charData:i[o],replaceInvalidCharsInCharData:r.replaceInvalidChars}):e.charData({charData:i[o],replaceInvalidCharsInCharData:r.replaceInvalidChars}),o<i.length-1&&e.charData({charData:"]]>",replaceInvalidCharsInCharData:r.replaceInvalidChars});else e.charData({charData:t,replaceInvalidCharsInCharData:r.replaceInvalidChars});else e.text({charData:t,replaceInvalidCharsInCharData:r.replaceInvalidChars})}function A1(t,e,r,n){var i=r.attribute({name:t,replaceInvalidCharsInName:n.replaceInvalidChars});nh((0,V.stringify)(e),i,n)}function eh(t,e,r,n){if(t===n.aliasString){r.name=(0,V.stringify)(e);return}if(t.indexOf(n.attributeString)===0&&(0,V.isObject)(e)){for(var i=0,o=Object.keys(e);i<o.length;i++){var s=o[i];A1(s,(0,V.stringify)(e[s]),r,n)}return}if(t.indexOf(n.valueString)===0){Kn(t,(0,V.stringify)(e),r,n);return}var a=r;if(!(0,V.isArray)(e)&&!(0,V.isSet)(e)){var c=Cs(e,n);if(!(0,V.isUndefined)(c)&&c(e)===Es.instance)return;a=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}Kn(t,e,a,n)}function I1(t,e,r){if((0,V.isMap)(t))t.forEach(function(s,a){eh((0,V.stringify)(a),s,e,r)});else for(var n=0,i=Object.keys(t);n<i.length;n++){var o=i[n];eh(o,t[o],e,r)}}function R1(t,e,r,n){var i;Object.prototype.hasOwnProperty.call(n.wrapHandlers,"*")&&(i=n.wrapHandlers["*"]),Object.prototype.hasOwnProperty.call(n.wrapHandlers,t)&&(i=n.wrapHandlers[t]);var o=t,s=r;if(!(0,V.isUndefined)(i)){var a=i(o,e);(0,V.isNull)(a)||(o=a,s=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty}))}e.forEach(function(c){var h=s;if(!(0,V.isArray)(c)&&!(0,V.isSet)(c)){var u=Cs(c,n);if(!(0,V.isUndefined)(u)&&u(c)===Es.instance)return;h=s.element({name:o,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}Kn(o,c,h,n)})}function Kn(t,e,r,n){var i=Cs(e,n);if((0,V.isUndefined)(i)||(e=i(e)),(0,V.isObject)(e)||(0,V.isMap)(e)){I1(e,r,n);return}if((0,V.isArray)(e)||(0,V.isSet)(e)){R1(t,e,r,n);return}nh((0,V.stringify)(e),r,n)}function ih(t,e,r){var n=new rh.Options(r);Kn(t.name,e,t,n)}ct.parseToExistingElement=ih;function F1(t,e,r){var n=new rh.Options(r),i=new th.XmlDocument({validation:n.validation});n.declaration.include&&i.decl(n.declaration),n.dtd.include&&i.dtd({name:n.dtd.name,pubId:n.dtd.pubId,sysId:n.dtd.sysId});var o=i.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty});return ih(o,e,r),i.toString(n.format)}ct.parse=F1});var ra=N(ze());var Zs=require("node:child_process"),ea=N(ze()),ta=N(Fr());ea.default.config();var Hh=ta.default.sync(__dirname);function ci(t){return e=>Gh(e,t)}function Gh(t,e){let[r,...n]=t.split(" "),{error:i,status:o}=(0,Zs.spawnSync)(r,n,{cwd:Hh,stdio:["ignore","inherit","ignore"],encoding:"utf8",shell:!0,env:Object.assign({GRIDDO_EXPORTER:"true"},process.env,e)});i&&(console.error(i),process.exit(1)),o!==0&&(console.error(`Command \`${t}\` exited with code ${o}`),process.exit(1))}ra.default.config();var au=N($i()),cu=N(ir()),Gi=class{user;password;baseUrl;headers;constructor(){this.user=process.env.botEmail,this.password=process.env.botPassword,this.baseUrl=process.env.API_URL}async login(){try{let e=await(0,au.default)({url:`${this.baseUrl}/login_check`,method:"POST",headers:{"Content-Type":"application/json"},data:{username:this.user,password:this.password}});if(e.status===200){let{data:{token:r}}=e;this.headers={Authorization:"bearer "+r,"Cache-Control":"no-store"}}return this.headers}catch{console.error(cu.default.red(`
24
24
  \u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E
25
25
  \u2502 Access credentials failure \u2502
26
26
  \u2502 Check that the login details are correct in your .env file \u2502
27
27
  \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F
28
- `)),process.exit(1)}}},Mt=new Xi;var gd=N(ji()),yd=N(kt()),vd=N(We());var mf=N(require("node:crypto")),gt=N(require("node:fs")),uo=N(require("node:path")),lo=N(Bt()),_n=uo.default.resolve(__dirname,"./../apiCache"),gf=`${_n}/siteHash.json`;function yf(){gt.default.existsSync(_n)||gt.default.mkdirSync(_n),console.info("Cache initialized")}function vf(t){let e=mf.default.createHash("sha256");return e.update(JSON.stringify(t)),`${_n}/${e.digest("hex")}`}function bf(t,e){let r=typeof e=="string"?e:JSON.stringify(e),n=vf(t),i=uo.default.dirname(n);gt.default.existsSync(i)||gt.default.mkdirSync(i,{recursive:!0}),gt.default.writeFileSync(n,r,"utf8")}function _f(t){try{let e=vf(t);return lo.default.readJSONSync(e,{encoding:"utf-8"})}catch{return null}}function Zg(){try{return lo.default.readJSONSync(gf,{encoding:"utf-8"})||{}}catch{return{}}}function wf(t,e){let r=Zg(),n=r[t],i=e||n||new Date().valueOf();return i!==n&&(r[t]=i,gt.default.writeFileSync(gf,JSON.stringify(r),{encoding:"utf-8"})),i.toString()}var Co=N(kt()),ud=N(We()),Je=N(Bt()),ld=N(cd()),Do=N(si());var On="10.4.2";ud.default.config();var Q2=!!process.env.GRIDDO_DEBUG_LOGS&&!!JSON.parse(process.env.GRIDDO_DEBUG_LOGS),Cy=!!process.env.GRIDDO_BUILD_LOGS&&!!JSON.parse(process.env.GRIDDO_BUILD_LOGS)||!!process.env.LOGS&&!!JSON.parse(process.env.LOGS),An=Do.default.sync(__dirname),fd=Do.default.sync();function dd(t){let e=[];return Je.default.readdirSync(t).forEach(n=>{let i=`${t}/${n}`;e.push(i)}),e}function nt(t,e="",r=1,n=1){let i=t.split(`
29
- `).map(b=>b.trim()),o=e?` ${e} `:"",s=e?o.length:0,a=Math.max(...i.map(b=>b.length))+r*2,c=Math.max(a,s),f=`\u2502${" ".repeat(c)}\u2502
28
+ `)),process.exit(1)}}},Ft=new Gi;var yd=N($i()),vd=N(ir()),bd=N(ze());var yf=N(require("node:crypto")),gt=N(require("node:fs")),lo=N(require("node:path")),fo=N($t()),wn=lo.default.resolve(__dirname,"./../apiCache"),vf=`${wn}/siteHash.json`;function bf(){gt.default.existsSync(wn)||gt.default.mkdirSync(wn),console.info("Cache initialized")}function wf(t){let e=yf.default.createHash("sha256");return e.update(JSON.stringify(t)),`${wn}/${e.digest("hex")}`}function _f(t,e){let r=typeof e=="string"?e:JSON.stringify(e),n=wf(t),i=lo.default.dirname(n);gt.default.existsSync(i)||gt.default.mkdirSync(i,{recursive:!0}),gt.default.writeFileSync(n,r,"utf8")}function xf(t){try{let e=wf(t);return fo.default.readJSONSync(e,{encoding:"utf-8"})}catch{return null}}function Zg(){try{return fo.default.readJSONSync(vf,{encoding:"utf-8"})||{}}catch{return{}}}function Sf(t,e){let r=Zg(),n=r[t],i=e||n||new Date().valueOf();return i!==n&&(r[t]=i,gt.default.writeFileSync(vf,JSON.stringify(r),{encoding:"utf-8"})),i.toString()}var Do=N(ir()),fd=N(ze()),Ve=N($t()),dd=N(ld()),Oo=N(Fr());var On="10.4.3";fd.default.config();var nw=!!process.env.GRIDDO_DEBUG_LOGS&&!!JSON.parse(process.env.GRIDDO_DEBUG_LOGS),Py=!!process.env.GRIDDO_BUILD_LOGS&&!!JSON.parse(process.env.GRIDDO_BUILD_LOGS)||!!process.env.LOGS&&!!JSON.parse(process.env.LOGS),An=Oo.default.sync(__dirname),In=Oo.default.sync();function hd(t){let e=[];return Ve.default.readdirSync(t).forEach(n=>{let i=`${t}/${n}`;e.push(i)}),e}function it(t,e="",r=1,n=1){let i=t.split(`
29
+ `).map(b=>b.trim()),o=e?` ${e} `:"",s=e?o.length:0,a=Math.max(...i.map(b=>b.length))+r*2,c=Math.max(a,s),h=`\u2502${" ".repeat(c)}\u2502
30
30
  `.repeat(n),u=c,p=`\u256D${o}${"\u2500".repeat(u-s)}\u256E
31
31
  `,g=`\u2570${"\u2500".repeat(u)}\u256F`,m=i.map(b=>{let E=" ".repeat(c-b.length-r);return`\u2502${" ".repeat(r)}${b}${E}\u2502
32
- `}).join("");console.log(`${p}${f}${m}${f}${g}`)}function Ue(t){Cy&&console.info(t.replace(/(\s)\s+/g,"$1"))}function hd(t){return new Promise(e=>setTimeout(e,t))}function Oo(t,e=3){return(t/1e3).toFixed(e)}function Ao(t){return"site"in t&&t.site?t?.site:void 0}function Io(t,e){for(let r in t)e.includes(r)?delete t[r]:typeof t[r]=="object"&&Io(t[r],e)}function Ro(t){return t.map(({name:e,id:r})=>`${e} (${r})`).join(", ")}function Fo(t){let e=`
33
- \xB7\xB7
34
- \xB7\xB7 _______ _ _ _____ _____ ______ _______ _______ ______
35
- \xB7\xB7 |______ \\___/ |_____] | | |_____/ | |______ |_____/
36
- \xB7\xB7 |______ _/ \\_ | |_____| | \\_ | |______ | \\_
32
+ `}).join("");console.log(`${p}${h}${m}${h}${g}`)}function Xe(t){Py&&console.info(t.replace(/(\s)\s+/g,"$1"))}function pd(t){return new Promise(e=>setTimeout(e,t))}function Ao(t,e=3){return(t/1e3).toFixed(e)}function Io(t){return"site"in t&&t.site?t?.site:void 0}function Ro(t,e){for(let r in t)e.includes(r)?delete t[r]:typeof t[r]=="object"&&Ro(t[r],e)}function Fo(t){return t.map(({name:e,id:r})=>`${e} (${r})`).join(", ")}function ko(t){let e=`
37
33
  \xB7\xB7
38
34
  \xB7\xB7 Griddo Exporter ${On}
39
35
  \xB7\xB7 Adapter: ${t}
40
36
  \xB7\xB7
41
- `;console.log(ld.default.cristal(e))}function pd(t){let e=Je.default.readdirSync(t),r={},n=e.filter(o=>{let s=`${t}/${o}`,a=Je.default.readJSONSync(s,"utf-8"),{id:c,entity:f,fullUrl:u}=a;return!!(c&&f&&u)});for(let o of n){let s=`${t}/${o}`,a=Je.default.readJSONSync(s,"utf-8"),c=Je.default.statSync(s).mtimeMs,{id:f}=a;(!r[f]||c>Je.default.statSync(`${t}/${r[f]}`).mtimeMs)&&(r[f]=o)}let i=0;for(let o of n){let s=`${t}/${o}`,a=Je.default.readJSONSync(s,"utf-8"),{id:c}=a;o!==r[c]&&(Je.default.unlinkSync(s),i++)}console.log(`Sanitize apiCache folder for ${i} files`)}async function it(...t){let e=process.hrtime();for(let o of t)await o();let[r,n]=process.hrtime(e);return+(r+n/1e9).toFixed(3)}function Ge(t){if(JSON.parse(process.env.GRIDDO_RENDER_BREAKPOINTS_FEATURE||"false"))return new Promise(r=>{console.log(`
42
- `),nt(t,"\u{1F953}",1,0),process.stdin.once("data",()=>{r()})})}function zt(t){console.info(`
43
- ${Co.default.blue("info")} start ${t} life-cycle`)}function Jt(t){console.info(`${Co.default.green("success")} ${t}`)}vd.default.config();var{env:{RETRY_WAIT_SECONDS:Dy="4",RETRY_ATTEMPTS:md="4"}}=process;async function ko(t,e,r=""){let{endpoint:n,body:i,cacheKey:o="",attempt:s=1,headers:a}=t,c={endpoint:n,body:i,headers:a,cacheKey:o};if(o){let f=new Date,u=_f(c);if(u){let p=Ao(u),g=p?`site: ${p}`:"",m=Oo(new Date().getTime()-f.getTime());return Ue(`${e} (cache) ${g} ${n} - ${m}s ${r}`),u}}try{let f=new Date,{data:u}=await(0,gd.default)({url:n,method:e,headers:Object.assign({},a,Mt.headers),data:i}),p=Ao(u),g=p?`site: ${p}`:"",m=Oo(new Date().getTime()-f.getTime());return Ue(`${e} (fetch) ${g} ${n} - ${m}s ${r}`),bf(c,u),u}catch(f){let u=f;return u.response?.status===404?null:(s>parseInt(md)&&(console.log(`
44
- Max attempts ${md} reached
37
+ `;console.log(dd.default.cristal(e))}function md(t){let e=Ve.default.readdirSync(t),r={},n=e.filter(o=>{let s=`${t}/${o}`,a=Ve.default.readJSONSync(s,"utf-8"),{id:c,entity:h,fullUrl:u}=a;return!!(c&&h&&u)});for(let o of n){let s=`${t}/${o}`,a=Ve.default.readJSONSync(s,"utf-8"),c=Ve.default.statSync(s).mtimeMs,{id:h}=a;(!r[h]||c>Ve.default.statSync(`${t}/${r[h]}`).mtimeMs)&&(r[h]=o)}let i=0;for(let o of n){let s=`${t}/${o}`,a=Ve.default.readJSONSync(s,"utf-8"),{id:c}=a;o!==r[c]&&(Ve.default.unlinkSync(s),i++)}console.log(`Sanitize apiCache dir for ${i} files`)}async function To(...t){let e=process.hrtime();for(let o of t)await o();let[r,n]=process.hrtime(e);return+(r+n/1e9).toFixed(3)}function He(t){if(JSON.parse(process.env.GRIDDO_RENDER_BREAKPOINTS_FEATURE||"false"))return new Promise(r=>{console.log(`
38
+ `),it(t,"\u{1F953}",1,0),process.stdin.once("data",()=>{r()})})}async function Gt(t){let{steps:e,name:r,attempts:n}=t,i=0,o=Number(process.env.GRIDDO_LIFECYCLE_MAX_RETRY_ATTEMPTS)||n||1;for(;i<o;)try{console.info(`
39
+ ${Do.default.blue("info")} start ${r} life-cycle`);let s=await To(...e);console.info(`${Do.default.green("success")} ${r} - ${s}s`);break}catch{console.log(`Error in ${r}. Attempt (${i+1})`),i++}if(i===o)throw new Error(`Exceeded maximum retry attempts (${o}) for ${r} LifeCycle`)}bd.default.config();var{env:{RETRY_WAIT_SECONDS:Dy="4",RETRY_ATTEMPTS:gd="4"}}=process;async function Mo(t,e,r=""){let{endpoint:n,body:i,cacheKey:o="",attempt:s=1,headers:a}=t,c={endpoint:n,body:i,headers:a,cacheKey:o};if(o){let h=new Date,u=xf(c);if(u){let p=Io(u),g=p?`site: ${p}`:"",m=Ao(new Date().getTime()-h.getTime());return Xe(`${e} (cache) ${g} ${n} - ${m}s ${r}`),u}}try{let h=new Date,{data:u}=await(0,yd.default)({url:n,method:e,headers:Object.assign({},a,Ft.headers),data:i}),p=Io(u),g=p?`site: ${p}`:"",m=Ao(new Date().getTime()-h.getTime());return Xe(`${e} (fetch) ${g} ${n} - ${m}s ${r}`),_f(c,u),u}catch(h){let u=h;return u.response?.status===404?null:(s>parseInt(gd)&&(console.log(`
40
+ Max attempts ${gd} reached
45
41
  --------------------------------------
46
42
  - ${e.toUpperCase()} ${n}
47
43
  - BODY: ${JSON.stringify(i)}
48
44
  - HEADERS: ${JSON.stringify(a)}
49
45
  - RESPONSE: ${u.response?.status,JSON.stringify(u.response?.data)}
50
46
  --------------------------------------
51
- `),process.exit(1)),u.response||(console.log("Unknown error occurred"),console.log(JSON.stringify(u,null,2)),process.exit(1)),Oy(u,{callInfo:{endpoint:n,body:i}}),console.warn(`Waiting for retry: ${e}`,n),await hd(parseInt(Dy)*1e3),ko({endpoint:n,body:i,headers:a,cacheKey:o,attempt:s+1},e,r))}}async function Fe(t){return await ko(t,"get")}async function yt(t){let{endpoint:e,body:r,headers:n}=t,i=e.endsWith("/distributor")&&`# Distributor body: ${JSON.stringify(r)} lang: ${JSON.stringify(n?.lang)}`;return await ko(t,"post",i||"")}function Oy(t,e){let{response:r,message:n,stack:i}=t,{callInfo:o}=e,{status:s,statusText:a,data:c}=r||{},f=[];for(let m of Object.keys(o))f.push(`${m}: ${typeof o[m]=="object"?JSON.stringify(o[m]):o[m]}`);let u=f.join(`
47
+ `),process.exit(1)),u.response||(console.log("Unknown error occurred"),console.log(JSON.stringify(u,null,2)),process.exit(1)),Oy(u,{callInfo:{endpoint:n,body:i}}),console.warn(`Waiting for retry: ${e}`,n),await pd(parseInt(Dy)*1e3),Mo({endpoint:n,body:i,headers:a,cacheKey:o,attempt:s+1},e,r))}}async function Fe(t){return await Mo(t,"get")}async function yt(t){let{endpoint:e,body:r,headers:n}=t,i=e.endsWith("/distributor")&&`# Distributor body: ${JSON.stringify(r)} lang: ${JSON.stringify(n?.lang)}`;return await Mo(t,"post",i||"")}function Oy(t,e){let{response:r,message:n,stack:i}=t,{callInfo:o}=e,{status:s,statusText:a,data:c}=r||{},h=[];for(let m of Object.keys(o))h.push(`${m}: ${typeof o[m]=="object"?JSON.stringify(o[m]):o[m]}`);let u=h.join(`
52
48
  `),p=r?`Code: ${s} - ${a}
53
49
  Response: ${JSON.stringify(c)}`:"",g=`${n}
54
- ${i}`;console.warn(yd.default.bold.red(`
50
+ ${i}`;console.warn(vd.default.bold.red(`
55
51
  =============
56
52
 
57
53
  { Call info }
@@ -64,10 +60,9 @@ ${p}
64
60
  ${g}
65
61
 
66
62
  =============
67
- `))}var Ay=process.env.API_URL,Iy={GET_ALL:`${Ay}/domains`},In=class{static async getAll(){let{GET_ALL:e}=Iy;return await Fe({endpoint:e})}};async function Mo(){await Mt.login();let t=await In.getAll();return Ry(t)}function Ry(t){let e=t.filter(({slug:r})=>!!r).map(({slug:r})=>r.replace("/",""));return[...new Set(e)]}var Ps=N(require("node:path"));var ot=N(require("node:fs")),bd=N(require("node:fs/promises")),Oe=N(require("node:path")),To=N(Bt());async function*qo(t){let e=Oe.default.resolve(t),r=dd(e).filter(n=>Oe.default.extname(n)===".json");for(let n of r)try{let i=await bd.default.stat(n),o=await To.default.readJSON(n,{encoding:"utf-8"});o.size=i.size/1024,o.path&&(yield o)}catch(i){console.error(`Error: The file ${n} doesn't exist`,i)}}function _d(t){ot.default.existsSync(t)||(ot.default.mkdirSync(t),ot.default.mkdirSync(Oe.default.resolve(t,"metadata"))),console.info("Store initialized")}function wd(t,e){ot.default.writeFileSync(Oe.default.resolve(t,"metadata","render-info.json"),JSON.stringify(e))}function Fy(t,e){return ky(t).filter(i=>e.includes(i))}function ky(t){return ot.default.readdirSync(t).filter(r=>{let n=`${t}/${r}`,i=ot.default.statSync(n);if(i&&i.isDirectory()||Oe.default.extname(r)!==".json")return!1;let o=Oe.default.basename(r,Oe.default.extname(r));return!isNaN(parseInt(o))}).map(r=>{let n=Oe.default.basename(r,Oe.default.extname(r));return parseInt(n)})}function xd(t,e){e.forEach(r=>{Io(r,["editorID","parentEditorID"]);let n=`${r.context.page.id}.json`,i=Oe.default.resolve(t,n);To.default.writeJSONSync(i,r)})}function Sd(t,e){e.length!==0&&e.forEach(r=>{let n=Oe.default.resolve(t,`${r}.json`);try{ot.default.unlinkSync(n)}catch(i){console.log(`Error removing file ${r}`,i.message)}})}async function Ed(t,e){let{changedPages:r,pages:n,validPagesIds:i,sitesToPublish:o}=e,s=Fy(t,n),a=i.filter(m=>!s.includes(m)),c=a.concat(r),f=s.filter(m=>!i.includes(m)),u=Array.from(new Set(c)).filter(m=>!f.includes(m)),p=qo(Oe.default.resolve(__dirname,"../store")),g=[];for await(let m of p){let b=m.context.page.site,E=m.context.page.id;o.map(P=>P.id).includes(b)||g.push(E)}return{pagesInStore:s,pagesMissingInStore:a,pagesToDeleteFromStore:[...f,...g],pagesToWriteToStore:u}}var lh=N(We()),fh=N(ti());var Pd=N(We());Pd.default.config();var No=process.env.API_URL,st=`${No}/site/`,Ve={GET_ALL:`${No}/sites/all`,GET_PAGE:[`${No}/page/`,""],INFO:[`${st}`,"/all"],LANGUAGES:[`${st}`,"/languages"],BUILD_START:[`${st}`,"/build/start"],BUILD_END:[`${st}`,"/build/end"],GET_DISTRIBUTOR_DATA:[`${st}`,"/distributor"],GET_SITEMAP:[`${st}`,"/sitemap"],SOCIALS:[`${st}`,"/socials"],GET_PAGES:[`${st}`,"/pages?pagination=false"]},ye=class{static async getAll(){let{GET_ALL:e}=Ve;return await Fe({endpoint:e})}static async getPage(e,r){let{GET_PAGE:[n,i]}=Ve;return await Fe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async getInfo(e,r=""){let{INFO:[n,i]}=Ve;return await Fe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async getLanguages(e,r=""){let{LANGUAGES:[n,i]}=Ve;return await Fe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async startSiteRender(e){let{BUILD_START:[r,n]}=Ve;return await Fe({endpoint:`${r}${e}${n}`})}static async endSiteRender(e,r){let{BUILD_END:[n,i]}=Ve;return await yt({endpoint:`${n}${e}${i}`,body:r})}static async getDistributorData(e,r,n,i,o){let{GET_DISTRIBUTOR_DATA:[s,a]}=Ve,c=i||e.site,f=o||e.language;return await yt({endpoint:`${s}${c}${a}`,body:r,headers:{lang:f},cacheKey:n})}static async getSitemap(e){let{GET_SITEMAP:[r,n]}=Ve;return await Fe({endpoint:`${r}${e}${n}`})}static async getSocials(e,r=""){let{SOCIALS:[n,i]}=Ve;return await Fe({endpoint:`${n}${e}${i}`,cacheKey:r})}};var Rn=class{static getBody(e,r){let{order:n,sources:i,quantity:o,mode:s,fixed:a,fullRelations:c=!1,allLanguages:f=!1,preferenceLanguage:u=!1,referenceId:p}=e;return s==="auto"?{mode:s,order:n,sources:i,quantity:o,fullRelations:c,allLanguages:f,preferenceLanguage:u}:s==="manual"?{mode:s,fixed:a,fullRelations:c}:s==="navigation"?{mode:s,order:n,quantity:o,fullRelations:c,referenceId:p||r?.structuredDataContent?.id}:(console.log(`Error: Distribuidor mode: ${s} is not recognized on page ${r?.id}.`),e)}static async fetchContentTypeData(e){let{page:r,component:{data:n},cacheKey:i}=e;if(!n)return nt(`Error: Page ${r.id} has \`hasDistributorData: true\` but it doesn't have a \`data\` prop`,"No data in ReferenceField"),[];if(Array.isArray(n.sources)&&n.sources.length<1)return nt(`Warning: Page with id: ${r.id} has a ReferenceField with empty \`data.sources\``,"Empty data.sources in ReferenceField"),[];let{site:o,lang:s}=n,a=this.getBody(n,r);return await ye.getDistributorData(r,a,i,o,s)}static async getDistributorData({page:e,cacheKey:r=""}){try{let{template:n}=e,i=async(a,c=1)=>{if(!(!a||typeof a!="object")&&JSON.stringify(a).includes('"hasDistributorData":true'))for(let f in a){if(f==="queriedItems")continue;let p=a[f];!p||typeof p!="object"||(p.hasDistributorData&&(p.queriedItems=await this.fetchContentTypeData({page:e,cacheKey:r,component:p})),await i(p,c+1))}};return await(async a=>(await i([a]),a))(n)}catch(n){console.error(`Error en get distributor ${n}`),process.exit(1)}}};var Fn=class{_defaultHeaders;_defaultFooters;_navigations;constructor(){this._navigations={footers:[],headers:[]},this._defaultHeaders={},this._defaultFooters={}}set navigations(e){this._navigations=e,this._defaultFooters=this.getDefaultFooters(),this._defaultHeaders=this.getDefaultHeaders()}get navigations(){return this._navigations}getDefaultFooters(){return[...this.navigations.footers].filter(i=>!!i.setAsDefault).reduce((i,o)=>{let{language:s}=o;return{...i,[s]:o}},{})}getDefaultHeaders(){return[...this.navigations.headers].filter(i=>!!i.setAsDefault).reduce((i,o)=>{let{language:s}=o;return{...i,[s]:o}},{})}getRightLanguage(e,r,n){if(!e||!r)return null;let o=e.find(s=>s.language===n&&s.navigationLanguages?.find(a=>a.navigationId===r))||e.find(s=>s.id===r);return o?{...o}:null}getPageHeader(e,r){return this.getRightLanguage(this.navigations.headers,e,r)}getPageFooter(e,r){return this.getRightLanguage(this.navigations.footers,e,r)}getPageNavigations(e){let{header:r,footer:n,language:i,template:{templateType:o},templateConfig:{defaultHeader:s,defaultFooter:a,templates:c}}=e,f=b=>{let E=b.find(P=>typeof P=="number");return typeof E=="number"?E:null},u=f([r,c?.[o]?.defaultHeader,s]),p=f([n,c?.[o]?.defaultFooter,a]),g=u?this.getPageHeader(u,i):u===0?null:this._defaultHeaders[i],m=p?this.getPageFooter(p,i):p===0?null:this._defaultFooters[i];return{header:g,footer:m}}};var jo=class{baseURL;settings;ENDPOINTS;constructor(){this.baseURL=process.env.API_URL,this.settings={cloudinaryName:"",useMetaTitle:!1,useMetaKeywords:!1,showBasicMetaRobots:!1,avoidHrefLangsOnCanonicals:!1,avoidSelfReferenceCanonicals:!1,avoidHrefLangXDefault:!1,avoidDebugMetas:!1},this.ENDPOINTS={settings:`${this.baseURL}/settings`,resetRender:`${this.baseURL}/debug/reset-render`}}async getAll(){let{settings:e}=this.ENDPOINTS,r=await Fe({endpoint:e});this.settings=r}async resetRender(){let{resetRender:e}=this.ENDPOINTS;await yt({endpoint:e})}},$o=new jo;var Od=N(We());function Lo(t,e,r,n="jpg"){let i=typeof t=="string"?t:t?.url;return i?i.split("/")[2].includes("cloudinary.com")?Ty(i,`c_fill,w_${e},h_${r}`):My(i,`f/${n}/w/${e}/h/${r}`):null}function My(t,e){let r=t.split("/"),n=r.slice(0,-1).join("/"),i=r.slice(-1)[0];return`${n}/${e}/${i}`}function Ty(t,e){let r=t.replace("https://",""),n=r.split("/").slice(0,4).join("/"),i=r.replace(n,"");return`https://${n}/${e}${i}`}Od.default.config();var qy=JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false"),Ny=25;function jy({socialTitle:t,socialDescription:e,socialImage:r}){return{type:"website",title:t,description:e,image:r?Lo(r,1280,768):"",twitterImage:r?Lo(r,1280,768):""}}function $y(t){let{title:e,metaTitle:r,metaDescription:n,canonicalURL:i,locale:o,url:s,isIndexed:a,follow:c,metasAdvanced:f,pageLanguages:u,fullUrl:p,metaKeywords:g}=t,m=f?.split(",").filter(Boolean).map(b=>b.trim().toLowerCase())||[];return{title:(r||e||"").trim(),description:n,canonical:i&&i.trim()&&i!==p?i.trim():a?p:void 0,locale:o,url:s,index:a?"index":"noindex",follow:c?"follow":"nofollow",translate:m.includes("notranslate")?"notranslate":"",metasAdvanced:m.filter(b=>b!=="notranslate").join(),pageLanguages:u,metaKeywords:g?.filter(Boolean).map(b=>b.replace(/"/g,"'")).join(", ")}}async function Uo(t,e){let{id:r,title:n,fullPath:i,language:o,breadcrumb:s,socialDescription:a,socialImage:c,socialTitle:f}=t,{baseUrl:u,cloudinaryName:p,griddoVersion:g,siteLangs:m,siteMetadata:b,siteOptions:E,siteScript:P,siteSlug:k,socials:$,theme:G,navigations:{header:H,footer:J}}=e;t.breadcrumb=s,t.siteSlug=k,t.apiUrl=u,t.publicApiUrl=e.publicBaseUrl,t.instance=e.instance;let ve=m.find(({id:F})=>F===t?.language)?.locale.replace(/_/g,"-"),K=$y(t),I=jy({socialDescription:a,socialImage:c,socialTitle:f}),x=qy?i.compose:`${i.domain}${i.compose}`,_=new Date().toString();return{path:x,size:void 0,context:{id:r,title:n,fullPath:i,locale:ve,languageId:o,theme:G,siteMetadata:b,pageMetadata:K,openGraph:I,socials:$,siteLangs:m,cloudinaryName:p,siteOptions:E,griddoVersion:g,renderDate:_,siteScript:P,header:H,footer:J,page:t}}}async function Ad(t,e){return await Uo(t,e)}async function Id({page:t,pages:e,isRoot:r=!1,defaultLang:n,template:i,totalQueriedItems:o},s){let a=e.map(async(c,f)=>{let u=f===0,p=f+1,{domainUrl:g,compose:m}=t.fullPath,b={...t,fullPath:{...t.fullPath,compose:Bo(m,p,{addEndingSlash:!0})},fullUrl:Bo(t.fullUrl,p,{addEndingSlash:!0}),slug:Bo(t.slug,p),title:Dd(t.title,p),metaTitle:Dd(t.metaTitle||"",p),disableHrefLangs:p>1,template:{...i,isFirstPage:u,pageNumber:p,totalPages:e.length,baseLink:`${g}${m}`,queriedItems:c,totalQueriedItems:o?.length},isRoot:r,defaultLang:n};return await Uo(b,s,!u)});return Promise.all(a)}function Rd(t,e){let{multiPageElements:r,...n}=t,i=JSON.parse(JSON.stringify(r));i.find(({sectionSlug:s})=>s==="/")||i.push({});let o=i.map(async s=>{let a=JSON.parse(JSON.stringify(n)),{sectionSlug:c="/",title:f="",metaTitle:u="",metaDescription:p=""}=s,g=typeof f=="string"?f:f.content,m=a.fullPath.compose||"",b=a.fullUrl.endsWith("/")?a.fullUrl.slice(0,-1):a.fullUrl,E=c?.replace(/\//g,""),k=c==="/"?E:E+"/",$=m.endsWith("/")?"":"/",G=`${m}${$}${k}`;return g.trim()&&(a.title=g),p.trim()&&(a.metaDescription=p),a.fullUrl=`${b}/${k}`,a.fullPath.compose=G,a.slug=G,a.template.activeSectionSlug=c,a.template.activeSectionBase=b,a.metaTitle=u.trim()||g.trim()||a.metaTitle,await Uo(a,e)});return Promise.all(o)}function Fd(t){return new Promise(r=>{let n=(i,o=0)=>{if(!(!i||typeof i!="object")){for(let s in i){let a=i[s],c=a||typeof a=="object",f=JSON.stringify(a).includes('"hasGriddoMultiPage":true');if(!c||!f)continue;let{component:u,hasGriddoMultiPage:p,elements:g}=a;u&&p&&r(g||[]),n(a,o+1)}o||r(null)}};n([t])})}function Ly(t,e,r){return e?.slice(t*(r-1),t*r)}function By(t,e){let r=Math.ceil(e.length/t)||1;return Array.from({length:r},(i,o)=>o+1)?.map(i=>Ly(t,e,i))}function kd(t){let e=t.queriedItems||[],r=t?.itemsPerPage||Ny;return By(r,e)}function Cd(t){return t.replace(/\/+$/,"/")}function Bo(t,e,r){let n=t.endsWith("/")?"":"/",i=r?.addEndingSlash?"/":"";return e<=1?Cd(`${t}${i}`):Cd(`${t}${n}${e}${i}`)}function Dd(t,e){return!t||e<=1?t:`${t} - ${e}`}var k1=N(Bt()),M1=N(ih());var T1=process.env.API_URL,q1=!!process.env.GRIDDO_RENDER_ALL_SITES||!!process.env.updateAllSites,Yt=process.env.GRIDDO_RENDER_SITE&&parseInt(process.env.GRIDDO_RENDER_SITE)||process.env.testSite&&parseInt(process.env.testSite),oh=(process.env.GRIDDO_RENDER_PAGES||process.env.testPage||"").split(",").map(t=>parseInt(t)).filter(Boolean),K_=JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false");async function Kn(t){console.info(`API URL ${T1}`),await Mt.login();let e=await ye.getAll(),r=q1?e.filter(o=>!Yt||o.id===Yt):e.filter(o=>Yt?o.id===Yt:!!o.shouldBeUpdated);if(r.length){let o=r.map(async s=>{let a=await ye.getLanguages(s.id);return s.domains=a.items.filter(c=>c.domain&&c.domain.slug.indexOf(t)>0).map(c=>({[c.id]:`${c.domain.slug}${c.path}`}))});await Promise.all(o)}let n=r.filter(o=>Yt?o.id===Yt:!!o.isPublished&&o.domains.length>0),i=r.filter(o=>!o.isPublished&&o.shouldBeUpdated);return{sitesToPublish:n,sitesToUnpublish:i}}async function sh(t){for(let e of t){let r=await ye.startSiteRender(e.id),{siteHash:n}=r,i={siteHash:n,publishHashes:[],unpublishHashes:[]};await ye.endSiteRender(e.id,i)}}async function ah(t){let e=await ye.startSiteRender(t),r=await ye.getInfo(t),n=await ye.getLanguages(t),i=await ye.getSocials(t),o=n.items,s=o.find(b=>b.isDefault),{siteHash:a,unpublishHashes:c,publishIds:f}=e,{headers:u,footers:p}=r,g=oh.length?oh.filter(b=>f.includes(b)):f;return{siteInfo:r,validPagesIds:g,siteHash:a,unpublishHashes:c,siteLangs:o,defaultLang:s,headers:u,footers:p,socials:i}}lh.default.config();var N1=process.env.API_URL,j1=process.env.GRIDDO_REACT_APP_INSTANCE||process.env.REACT_APP_INSTANCE,ch=parseInt(process.env.GRIDDO_API_CONCURRENCY_COUNT||"10"),$1=process.env.PUBLIC_API_URL,L1=process.env.GRIDDO_RENDERID||new Date().valueOf().toString(),uh=[],Es={};async function dh(t,e){console.info(`API calls with ${ch} threads`);try{let{sitesToPublish:r,sitesToUnpublish:n}=await Kn(e);await $o.getAll(),r.length||n.length||(console.warn("There are no sites to update"),process.exit(0)),console.info(`Sites to publish: ${Ro(r)}`),console.info(`Sites to unpublish: ${Ro(n)}`),await sh(n);for(let i of r){let{id:o,slug:s,theme:a,favicon:c,changedPages:f=[],pages:u=[]}=i,{siteInfo:p,validPagesIds:g,siteHash:m,unpublishHashes:b,siteLangs:E,defaultLang:P,headers:k,footers:$,socials:G}=await ah(o),{cloudinaryName:H,useMetaTitle:J,useMetaKeywords:ae,showBasicMetaRobots:ve,avoidHrefLangsOnCanonicals:K,avoidSelfReferenceCanonicals:I,avoidHrefLangXDefault:x,avoidDebugMetas:_}=$o.settings;Es[o]={siteHash:m,unpublishHashes:b,publishHashes:[]};let R=new Fn;R.navigations={headers:k,footers:$},i.languages=E;let F=wf(o,m),U=p.siteScript,A={siteUrl:p.slug,title:p.name,favicon:c},L={baseUrl:N1,publicBaseUrl:$1,instance:j1,siteSlug:s,theme:a,siteMetadata:A,socials:G,siteLangs:E,cloudinaryName:H,griddoVersion:On,siteOptions:{useMetaTitle:J,useMetaKeywords:ae,showBasicMetaRobots:ve,avoidHrefLangsOnCanonicals:K,avoidSelfReferenceCanonicals:I,avoidHrefLangXDefault:x,avoidDebugMetas:_},siteScript:U};Ue(`${i.name} site`);let M=async re=>{let l=[],h=await ye.getPage(re,F);if(!h)return;uh.push(re);let d=JSON.parse(JSON.stringify(L));d.navigations=R.getPageNavigations(h);let v=await Rn.getDistributorData({page:h,cacheKey:L1}),S=await Fd(v),w=h?.mode==="list",j=!w&&S,X=!j&&!w;if(w){let B={page:h,pages:kd(v),isRoot:!1,defaultLang:P,template:v,totalQueriedItems:v.queriedItems};l=await Id(B,d)}if(j){let B=h;B.template=v,B.multiPageElements=S,B.defaultLang=P,l=await Rd(B,d)}if(X){let B=h;B.template=v,B.defaultLang=P,l=[await Ad(B,d)]}h.hash!==null&&Es[o].publishHashes.push(h.hash),xd(t,l)},{pagesInStore:C,pagesMissingInStore:T,pagesToDeleteFromStore:Ae,pagesToWriteToStore:Me}=await Ed(t,{sitesToPublish:r,pages:u,validPagesIds:g,changedPages:f});Sd(t,Ae);let ce=`Store: ${C.length} -> ${C}
63
+ `))}var Ay=process.env.API_URL,Iy={GET_ALL:`${Ay}/domains`},Rn=class{static async getAll(){let{GET_ALL:e}=Iy;return await Fe({endpoint:e})}};async function qo(){await Ft.login();let t=await Rn.getAll();return Ry(t)}function Ry(t){let e=t.filter(({slug:r})=>!!r).map(({slug:r})=>r.replace("/",""));return[...new Set(e)]}var Ds=N(require("node:path"));var ot=N(require("node:fs")),wd=N(require("node:fs/promises")),Oe=N(require("node:path")),No=N($t());async function*jo(t){let e=Oe.default.resolve(t),r=hd(e).filter(n=>Oe.default.extname(n)===".json");for(let n of r)try{let i=await wd.default.stat(n),o=await No.default.readJSON(n,{encoding:"utf-8"});o.size=i.size/1024,o.path&&(yield o)}catch(i){console.error(`Error: The file ${n} doesn't exist`,i)}}function _d(t){ot.default.existsSync(t)||(ot.default.mkdirSync(t),ot.default.mkdirSync(Oe.default.resolve(t,"metadata"))),console.info("Store initialized")}function xd(t,e){ot.default.writeFileSync(Oe.default.resolve(t,"metadata","render-info.json"),JSON.stringify(e))}function Fy(t,e){return ky(t).filter(i=>e.includes(i))}function ky(t){return ot.default.readdirSync(t).filter(r=>{let n=`${t}/${r}`,i=ot.default.statSync(n);if(i&&i.isDirectory()||Oe.default.extname(r)!==".json")return!1;let o=Oe.default.basename(r,Oe.default.extname(r));return!isNaN(parseInt(o))}).map(r=>{let n=Oe.default.basename(r,Oe.default.extname(r));return parseInt(n)})}function Sd(t,e){e.forEach(r=>{Ro(r,["editorID","parentEditorID"]);let n=`${r.context.page.id}.json`,i=Oe.default.resolve(t,n);No.default.writeJSONSync(i,r)})}function Ed(t,e){e.length!==0&&e.forEach(r=>{let n=Oe.default.resolve(t,`${r}.json`);try{ot.default.unlinkSync(n)}catch(i){console.log(`Error removing file ${r}`,i.message)}})}async function Cd(t,e){let{changedPages:r,pages:n,validPagesIds:i,sitesToPublish:o}=e,s=Fy(t,n),a=i.filter(m=>!s.includes(m)),c=a.concat(r),h=s.filter(m=>!i.includes(m)),u=Array.from(new Set(c)).filter(m=>!h.includes(m)),p=jo(Oe.default.resolve(__dirname,"../store")),g=[];for await(let m of p){let b=m.context.page.site,E=m.context.page.id;o.map(C=>C.id).includes(b)||g.push(E)}return{pagesInStore:s,pagesMissingInStore:a,pagesToDeleteFromStore:[...h,...g],pagesToWriteToStore:u}}var fh=N(ze()),dh=N(ni());var Pd=N(ze());Pd.default.config();var $o=process.env.API_URL,st=`${$o}/site/`,Ke={GET_ALL:`${$o}/sites/all`,GET_PAGE:[`${$o}/page/`,""],INFO:[`${st}`,"/all"],LANGUAGES:[`${st}`,"/languages"],BUILD_START:[`${st}`,"/build/start"],BUILD_END:[`${st}`,"/build/end"],GET_DISTRIBUTOR_DATA:[`${st}`,"/distributor"],GET_SITEMAP:[`${st}`,"/sitemap"],SOCIALS:[`${st}`,"/socials"],GET_PAGES:[`${st}`,"/pages?pagination=false"]},ye=class{static async getAll(){let{GET_ALL:e}=Ke;return await Fe({endpoint:e})}static async getPage(e,r){let{GET_PAGE:[n,i]}=Ke;return await Fe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async getInfo(e,r=""){let{INFO:[n,i]}=Ke;return await Fe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async getLanguages(e,r=""){let{LANGUAGES:[n,i]}=Ke;return await Fe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async startSiteRender(e){let{BUILD_START:[r,n]}=Ke;return await Fe({endpoint:`${r}${e}${n}`})}static async endSiteRender(e,r){let{BUILD_END:[n,i]}=Ke;return await yt({endpoint:`${n}${e}${i}`,body:r})}static async getDistributorData(e,r,n,i,o){let{GET_DISTRIBUTOR_DATA:[s,a]}=Ke,c=i||e.site,h=o||e.language;return await yt({endpoint:`${s}${c}${a}`,body:r,headers:{lang:h},cacheKey:n})}static async getSitemap(e){let{GET_SITEMAP:[r,n]}=Ke;return await Fe({endpoint:`${r}${e}${n}`})}static async getSocials(e,r=""){let{SOCIALS:[n,i]}=Ke;return await Fe({endpoint:`${n}${e}${i}`,cacheKey:r})}};var Fn=class{static getBody(e,r){let{order:n,sources:i,quantity:o,mode:s,fixed:a,fullRelations:c=!1,allLanguages:h=!1,preferenceLanguage:u=!1,referenceId:p}=e;return s==="auto"?{mode:s,order:n,sources:i,quantity:o,fullRelations:c,allLanguages:h,preferenceLanguage:u}:s==="manual"?{mode:s,fixed:a,fullRelations:c}:s==="navigation"?{mode:s,order:n,quantity:o,fullRelations:c,referenceId:p||r?.structuredDataContent?.id}:(console.log(`Error: Distribuidor mode: ${s} is not recognized on page ${r?.id}.`),e)}static async fetchContentTypeData(e){let{page:r,component:{data:n},cacheKey:i}=e;if(!n)return it(`Error: Page ${r.id} has \`hasDistributorData: true\` but it doesn't have a \`data\` prop`,"No data in ReferenceField"),[];if(Array.isArray(n.sources)&&n.sources.length<1)return it(`Warning: Page with id: ${r.id} has a ReferenceField with empty \`data.sources\``,"Empty data.sources in ReferenceField"),[];let{site:o,lang:s}=n,a=this.getBody(n,r);return await ye.getDistributorData(r,a,i,o,s)}static async getDistributorData({page:e,cacheKey:r=""}){try{let{template:n}=e,i=async(a,c=1)=>{if(!(!a||typeof a!="object")&&JSON.stringify(a).includes('"hasDistributorData":true'))for(let h in a){if(h==="queriedItems")continue;let p=a[h];!p||typeof p!="object"||(p.hasDistributorData&&(p.queriedItems=await this.fetchContentTypeData({page:e,cacheKey:r,component:p})),await i(p,c+1))}};return await(async a=>(await i([a]),a))(n)}catch(n){console.error(`Error en get distributor ${n}`),process.exit(1)}}};var kn=class{_defaultHeaders;_defaultFooters;_navigations;constructor(){this._navigations={footers:[],headers:[]},this._defaultHeaders={},this._defaultFooters={}}set navigations(e){this._navigations=e,this._defaultFooters=this.getDefaultFooters(),this._defaultHeaders=this.getDefaultHeaders()}get navigations(){return this._navigations}getDefaultFooters(){return[...this.navigations.footers].filter(i=>!!i.setAsDefault).reduce((i,o)=>{let{language:s}=o;return{...i,[s]:o}},{})}getDefaultHeaders(){return[...this.navigations.headers].filter(i=>!!i.setAsDefault).reduce((i,o)=>{let{language:s}=o;return{...i,[s]:o}},{})}getRightLanguage(e,r,n){if(!e||!r)return null;let o=e.find(s=>s.language===n&&s.navigationLanguages?.find(a=>a.navigationId===r))||e.find(s=>s.id===r);return o?{...o}:null}getPageHeader(e,r){return this.getRightLanguage(this.navigations.headers,e,r)}getPageFooter(e,r){return this.getRightLanguage(this.navigations.footers,e,r)}getPageNavigations(e){let{header:r,footer:n,language:i,template:{templateType:o},templateConfig:{defaultHeader:s,defaultFooter:a,templates:c}}=e,h=b=>{let E=b.find(C=>typeof C=="number");return typeof E=="number"?E:null},u=h([r,c?.[o]?.defaultHeader,s]),p=h([n,c?.[o]?.defaultFooter,a]),g=u?this.getPageHeader(u,i):u===0?null:this._defaultHeaders[i],m=p?this.getPageFooter(p,i):p===0?null:this._defaultFooters[i];return{header:g,footer:m}}};var Lo=class{baseURL;settings;ENDPOINTS;constructor(){this.baseURL=process.env.API_URL,this.settings={cloudinaryName:"",useMetaTitle:!1,useMetaKeywords:!1,showBasicMetaRobots:!1,avoidHrefLangsOnCanonicals:!1,avoidSelfReferenceCanonicals:!1,avoidHrefLangXDefault:!1,avoidDebugMetas:!1},this.ENDPOINTS={settings:`${this.baseURL}/settings`,resetRender:`${this.baseURL}/debug/reset-render`}}async getAll(){let{settings:e}=this.ENDPOINTS,r=await Fe({endpoint:e});this.settings=r}async resetRender(){let{resetRender:e}=this.ENDPOINTS;await yt({endpoint:e})}},Bo=new Lo;var Ad=N(ze());function Uo(t,e,r,n="jpg"){let i=typeof t=="string"?t:t?.url;return i?i.split("/")[2].includes("cloudinary.com")?My(i,`c_fill,w_${e},h_${r}`):Ty(i,`f/${n}/w/${e}/h/${r}`):null}function Ty(t,e){let r=t.split("/"),n=r.slice(0,-1).join("/"),i=r.slice(-1)[0];return`${n}/${e}/${i}`}function My(t,e){let r=t.replace("https://",""),n=r.split("/").slice(0,4).join("/"),i=r.replace(n,"");return`https://${n}/${e}${i}`}Ad.default.config();var qy=JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false"),Ny=25;function jy({socialTitle:t,socialDescription:e,socialImage:r}){return{type:"website",title:t,description:e,image:r?Uo(r,1280,768):"",twitterImage:r?Uo(r,1280,768):""}}function $y(t){let{title:e,metaTitle:r,metaDescription:n,canonicalURL:i,locale:o,url:s,isIndexed:a,follow:c,metasAdvanced:h,pageLanguages:u,fullUrl:p,metaKeywords:g}=t,m=h?.split(",").filter(Boolean).map(b=>b.trim().toLowerCase())||[];return{title:(r||e||"").trim(),description:n,canonical:i&&i.trim()&&i!==p?i.trim():a?p:void 0,locale:o,url:s,index:a?"index":"noindex",follow:c?"follow":"nofollow",translate:m.includes("notranslate")?"notranslate":"",metasAdvanced:m.filter(b=>b!=="notranslate").join(),pageLanguages:u,metaKeywords:g?.filter(Boolean).map(b=>b.replace(/"/g,"'")).join(", ")}}async function Ho(t,e){let{id:r,title:n,fullPath:i,language:o,breadcrumb:s,socialDescription:a,socialImage:c,socialTitle:h}=t,{baseUrl:u,cloudinaryName:p,griddoVersion:g,siteLangs:m,siteMetadata:b,siteOptions:E,siteScript:C,siteSlug:k,socials:$,theme:X,navigations:{header:G,footer:J}}=e;t.breadcrumb=s,t.siteSlug=k,t.apiUrl=u,t.publicApiUrl=e.publicBaseUrl,t.instance=e.instance;let ve=m.find(({id:F})=>F===t?.language)?.locale.replace(/_/g,"-"),K=$y(t),I=jy({socialDescription:a,socialImage:c,socialTitle:h}),x=qy?i.compose:`${i.domain}${i.compose}`,w=new Date().toString();return{path:x,size:void 0,context:{id:r,title:n,fullPath:i,locale:ve,languageId:o,theme:X,siteMetadata:b,pageMetadata:K,openGraph:I,socials:$,siteLangs:m,cloudinaryName:p,siteOptions:E,griddoVersion:g,renderDate:w,siteScript:C,header:G,footer:J,page:t}}}async function Id(t,e){return await Ho(t,e)}async function Rd({page:t,pages:e,isRoot:r=!1,defaultLang:n,template:i,totalQueriedItems:o},s){let a=e.map(async(c,h)=>{let u=h===0,p=h+1,{domainUrl:g,compose:m}=t.fullPath,b={...t,fullPath:{...t.fullPath,compose:Xo(m,p,{addEndingSlash:!0})},fullUrl:Xo(t.fullUrl,p,{addEndingSlash:!0}),slug:Xo(t.slug,p),title:Od(t.title,p),metaTitle:Od(t.metaTitle||"",p),disableHrefLangs:p>1,template:{...i,isFirstPage:u,pageNumber:p,totalPages:e.length,baseLink:`${g}${m}`,queriedItems:c,totalQueriedItems:o?.length},isRoot:r,defaultLang:n};return await Ho(b,s,!u)});return Promise.all(a)}function Fd(t,e){let{multiPageElements:r,...n}=t,i=JSON.parse(JSON.stringify(r));i.find(({sectionSlug:s})=>s==="/")||i.push({});let o=i.map(async s=>{let a=JSON.parse(JSON.stringify(n)),{sectionSlug:c="/",title:h="",metaTitle:u="",metaDescription:p=""}=s,g=typeof h=="string"?h:h.content,m=a.fullPath.compose||"",b=a.fullUrl.endsWith("/")?a.fullUrl.slice(0,-1):a.fullUrl,E=c?.replace(/\//g,""),k=c==="/"?E:E+"/",$=m.endsWith("/")?"":"/",X=`${m}${$}${k}`;return g.trim()&&(a.title=g),p.trim()&&(a.metaDescription=p),a.fullUrl=`${b}/${k}`,a.fullPath.compose=X,a.slug=X,a.template.activeSectionSlug=c,a.template.activeSectionBase=b,a.metaTitle=u.trim()||g.trim()||a.metaTitle,await Ho(a,e)});return Promise.all(o)}function kd(t){return new Promise(r=>{let n=(i,o=0)=>{if(!(!i||typeof i!="object")){for(let s in i){let a=i[s],c=a||typeof a=="object",h=JSON.stringify(a).includes('"hasGriddoMultiPage":true');if(!c||!h)continue;let{component:u,hasGriddoMultiPage:p,elements:g}=a;u&&p&&r(g||[]),n(a,o+1)}o||r(null)}};n([t])})}function Ly(t,e,r){return e?.slice(t*(r-1),t*r)}function By(t,e){let r=Math.ceil(e.length/t)||1;return Array.from({length:r},(i,o)=>o+1)?.map(i=>Ly(t,e,i))}function Td(t){let e=t.queriedItems||[],r=t?.itemsPerPage||Ny;return By(r,e)}function Dd(t){return t.replace(/\/+$/,"/")}function Xo(t,e,r){let n=t.endsWith("/")?"":"/",i=r?.addEndingSlash?"/":"";return e<=1?Dd(`${t}${i}`):Dd(`${t}${n}${e}${i}`)}function Od(t,e){return!t||e<=1?t:`${t} - ${e}`}var k1=N($t()),T1=N(oh());var M1=process.env.API_URL,q1=!!process.env.GRIDDO_RENDER_ALL_SITES||!!process.env.updateAllSites,Jt=process.env.GRIDDO_RENDER_SITE&&parseInt(process.env.GRIDDO_RENDER_SITE)||process.env.testSite&&parseInt(process.env.testSite),sh=(process.env.GRIDDO_RENDER_PAGES||process.env.testPage||"").split(",").map(t=>parseInt(t)).filter(Boolean),t5=JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false");async function Yn(t){console.info(`API URL ${M1}`),await Ft.login();let e=await ye.getAll(),r=q1?e.filter(o=>!Jt||o.id===Jt):e.filter(o=>Jt?o.id===Jt:!!o.shouldBeUpdated);if(r.length){let o=r.map(async s=>{let a=await ye.getLanguages(s.id);return s.domains=a.items.filter(c=>c.domain&&c.domain.slug.indexOf(t)>0).map(c=>({[c.id]:`${c.domain.slug}${c.path}`}))});await Promise.all(o)}let n=r.filter(o=>Jt?o.id===Jt:!!o.isPublished&&o.domains.length>0),i=r.filter(o=>!o.isPublished&&o.shouldBeUpdated);return{sitesToPublish:n,sitesToUnpublish:i}}async function ah(t){for(let e of t){let r=await ye.startSiteRender(e.id),{siteHash:n}=r,i={siteHash:n,publishHashes:[],unpublishHashes:[]};await ye.endSiteRender(e.id,i)}}async function ch(t){let e=await ye.startSiteRender(t),r=await ye.getInfo(t),n=await ye.getLanguages(t),i=await ye.getSocials(t),o=n.items,s=o.find(b=>b.isDefault),{siteHash:a,unpublishHashes:c,publishIds:h}=e,{headers:u,footers:p}=r,g=sh.length?sh.filter(b=>h.includes(b)):h;return{siteInfo:r,validPagesIds:g,siteHash:a,unpublishHashes:c,siteLangs:o,defaultLang:s,headers:u,footers:p,socials:i}}fh.default.config();var N1=process.env.API_URL,j1=process.env.GRIDDO_REACT_APP_INSTANCE||process.env.REACT_APP_INSTANCE,uh=parseInt(process.env.GRIDDO_API_CONCURRENCY_COUNT||"10"),$1=process.env.PUBLIC_API_URL,L1=process.env.GRIDDO_RENDERID||new Date().valueOf().toString(),lh=[],Ps={};async function hh(t,e){console.info(`API calls with ${uh} threads`);try{let{sitesToPublish:r,sitesToUnpublish:n}=await Yn(e);await Bo.getAll(),r.length||n.length||(console.warn("There are no sites to update"),process.exit(0)),console.info(`Sites to publish: ${Fo(r)}`),console.info(`Sites to unpublish: ${Fo(n)}`),await ah(n);for(let i of r){let{id:o,slug:s,theme:a,favicon:c,changedPages:h=[],pages:u=[]}=i,{siteInfo:p,validPagesIds:g,siteHash:m,unpublishHashes:b,siteLangs:E,defaultLang:C,headers:k,footers:$,socials:X}=await ch(o),{cloudinaryName:G,useMetaTitle:J,useMetaKeywords:ae,showBasicMetaRobots:ve,avoidHrefLangsOnCanonicals:K,avoidSelfReferenceCanonicals:I,avoidHrefLangXDefault:x,avoidDebugMetas:w}=Bo.settings;Ps[o]={siteHash:m,unpublishHashes:b,publishHashes:[]};let R=new kn;R.navigations={headers:k,footers:$},i.languages=E;let F=Sf(o,m),U=p.siteScript,A={siteUrl:p.slug,title:p.name,favicon:c},L={baseUrl:N1,publicBaseUrl:$1,instance:j1,siteSlug:s,theme:a,siteMetadata:A,socials:X,siteLangs:E,cloudinaryName:G,griddoVersion:On,siteOptions:{useMetaTitle:J,useMetaKeywords:ae,showBasicMetaRobots:ve,avoidHrefLangsOnCanonicals:K,avoidSelfReferenceCanonicals:I,avoidHrefLangXDefault:x,avoidDebugMetas:w},siteScript:U};Xe(`${i.name} site`);let T=async re=>{let l=[],d=await ye.getPage(re,F);if(!d)return;lh.push(re);let f=JSON.parse(JSON.stringify(L));f.navigations=R.getPageNavigations(d);let v=await Fn.getDistributorData({page:d,cacheKey:L1}),S=await kd(v),_=d?.mode==="list",j=!_&&S,H=!j&&!_;if(_){let B={page:d,pages:Td(v),isRoot:!1,defaultLang:C,template:v,totalQueriedItems:v.queriedItems};l=await Rd(B,f)}if(j){let B=d;B.template=v,B.multiPageElements=S,B.defaultLang=C,l=await Fd(B,f)}if(H){let B=d;B.template=v,B.defaultLang=C,l=[await Id(B,f)]}d.hash!==null&&Ps[o].publishHashes.push(d.hash),Sd(t,l)},{pagesInStore:P,pagesMissingInStore:M,pagesToDeleteFromStore:Ae,pagesToWriteToStore:Te}=await Cd(t,{sitesToPublish:r,pages:u,validPagesIds:g,changedPages:h});Ed(t,Ae);let ce=`Store: ${P.length} -> ${P}
68
64
  ValidPages: ${g.length} -> ${g}
69
- Changed: ${f.length} -> ${f}
65
+ Changed: ${h.length} -> ${h}
70
66
  Deleted/Unpublished: ${Ae.length} -> ${Ae}
71
- Missing in store: ${T.length} -> ${T}
72
- Finally to store: ${Me.length} -> ${Me}`;JSON.parse(process.env.GRIDDO_DEBUG_LOGS||"false")&&nt(ce,`Site store: ${i.name}`,1,0);let be=(0,fh.default)(ch),xt=Me.map(re=>be(()=>M(re)));await Promise.all(xt)}wd(t,{buildProcessData:Es,createdPages:uh,sitesToPublish:r})}catch(r){console.error(r.message),process.exit(1)}}var hh=Ps.default.resolve(__dirname,"../store/"),B1=Ps.default.resolve(__dirname,"../apiCache");async function Cs(t){yf(),_d(hh),await dh(hh,t),pd(B1)}var Be=N(require("node:fs")),He=N(require("node:path")),Pe=N(kt()),ph=N(We());var wt=N(require("node:path")),Le=N(Bt());async function Ds(t,e){for await(let r of t)for(let n of r.domains){let i=Object.values(n)[0],o=JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false")?i.split(e).join(""):i,s=wt.default.resolve(__dirname,`../public${o}`),a=wt.default.resolve(__dirname,`../public/page-data${o}`);if(Ue(`Site dir ${s}`),Ue(`Page data dir ${a}`),!!Le.default.existsSync(s)){try{await Le.default.rm(s,{recursive:!0}),Ue(`${s} was deleted!`)}catch(c){console.log(c)}if(Le.default.existsSync(a))try{await Le.default.rm(a,{recursive:!0}),console.info(`${a} was deleted!`)}catch(c){console.log(c)}}}}var Os=t=>{let e=t||wt.default.resolve(An,"dist");if(!Le.default.statSync(e).isDirectory())return;let n=Le.default.readdirSync(e);if(n.length>0){let o=n.length,s=n.filter(a=>wt.default.extname(a).toLowerCase()===".xml").length;o===s&&(n.forEach(function(a){let c=wt.default.join(e,a);Le.default.rmSync(c)}),n=Le.default.readdirSync(e)),n.forEach(function(a){let c=wt.default.join(e,a);Os(c)}),n=Le.default.readdirSync(e)}if(n.length===0){Le.default.rmdirSync(e);return}};ph.default.config();function mh(t){let e=["dist","assets"],r=["public"],n=["apiCache","store"];JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false")?n.push(".cache"):r.push(".cache");let o=He.default.resolve(fd,"exports/sites"),s=He.default.resolve(__dirname,"../caches"),a=U1(t),c=ai({DOMAIN:t,GRIDDO_ASSET_PREFIX:a,NEEDS_ASSET_DOMAIN_PREFIX:a&&a!=="",GRIDDO_RENDERID:new Date().valueOf()}),f=()=>{console.info(`Initializing exporter for the domain ${t}`),g(),m()},u=()=>{for(let x of e){let{currentExportArchivePath:_,currentExportWorkingPath:R}=p(x);Be.default.existsSync(_)&&(console.log(`\uFE0FRestoring ${Pe.default.gray(_)}`),c(`cp -R ${_} ${R}`))}ve()},p=(x="")=>{if(x==="/")throw new Error(`Artifact path cannot be root: ${x}`);let _=He.default.resolve(o,t),R=He.default.resolve(_,x),F=He.default.resolve(R,t),U=He.default.resolve(s,t),A=He.default.resolve(U,x),L=He.default.resolve(A,t),M=`${R}-BACKUP`,C=He.default.resolve(An,x);return{domainExportArchiveBasePath:_,currentExportArchivePath:R,currentExportBackupPath:M,currentExportWorkingPath:C,currentExportArchivePathInDomain:F,domainCacheArchiveBasePath:U,currentExportArchiveCachePath:A,currentExportArchiveCachePathInDomain:L}},g=()=>{for(let x of[...e,...r,...n]){let{currentExportWorkingPath:_}=p(x);Be.default.existsSync(_)&&(console.log(`Cleanup dirty ${Pe.default.gray(_)}`),c(`rm -rf ${_}`))}},m=()=>{let{domainExportArchiveBasePath:x,domainCacheArchiveBasePath:_}=p();for(let R of[x,_])Be.default.existsSync(R)||(console.info(`Creating ${R}`),c(`mkdir -p ${R}`))},b=x=>{let{currentExportArchivePath:_,currentExportWorkingPath:R}=p(x);console.info(`Moving files from ${Pe.default.gray(R)} to ${Pe.default.gray(_)}`),c(`mv ${R} ${_}`)},E=()=>{for(let x of e){let{currentExportWorkingPath:_,currentExportArchivePath:R}=p(x);if(!Be.default.existsSync(_)){console.log("Source directory has not been created:",_);continue}try{P(x),b(x),$(x)}catch(F){console.log(`Error moving files to ${R}`,F.message),k(x);continue}}},P=x=>{let{currentExportArchivePath:_,currentExportBackupPath:R}=p(x);Be.default.existsSync(_)&&(console.info(`Creating backup of ${Pe.default.gray(_)}`),c(`mv ${_} ${R}`))},k=x=>{let{currentExportArchivePath:_,currentExportBackupPath:R}=p(x);Be.default.existsSync(R)&&(console.log(`\uFE0FRestoring backup ${Pe.default.gray(_)}`),c(`mv ${R} ${_}`))},$=x=>{let{currentExportArchivePath:_,currentExportBackupPath:R}=p(x);console.log(`\uFE0FRemoving backup ${Pe.default.gray(_)}`),c(`rm -rf ${R}`)},G=()=>{for(let x of n){let{currentExportArchiveCachePath:_,currentExportWorkingPath:R}=p(x);if(Be.default.existsSync(R))console.info(`Moving files from ${Pe.default.gray(R)} to ${Pe.default.gray(_)}`),c(`mv ${R} ${_}`);else throw new Error(`Error moving files from ${R}: Path does not exist.`)}},H=async()=>{let{sitesToPublish:x,sitesToUnpublish:_}=await Kn(t);await Ds(_,t),await Ds(x,t)},J=()=>{for(let x of n){let{currentExportArchiveCachePath:_,currentExportWorkingPath:R}=p(x);Be.default.existsSync(_)&&(console.log(`\uFE0FRestoring ${Pe.default.gray(_)}`),c(`mv ${_} ${R}`))}},ae=()=>{c("yarn gatsby-build")},ve=()=>{let{currentExportWorkingPath:x}=p("dist"),{currentExportWorkingPath:_}=p("public");Be.default.existsSync(x)&&(console.log(`Moving ${Pe.default.gray(x)} to ${Pe.default.gray(_)}`),c(`mv ${x} ${_}`))},K=()=>{for(let x of r){let{currentExportWorkingPath:_}=p(x);Be.default.existsSync(_)&&(console.log(`\uFE0FRemoving ${Pe.default.gray(_)}`),c(`rm -rf ${_}`))}},I=()=>{g()};return{init:f,getArtifactPaths:p,archiveExportArtifact:b,archiveArtifacts:E,restoreArtifacts:u,createArtifactBackup:P,restoreArtifactBackup:k,deleteArtifactBackup:$,archiveCacheArtifacts:G,restoreCacheArtifacts:J,cleanUpSites:H,runGatsbyBuild:ae,removeDisposableArtifacts:K}}function U1(t){let e=process.env.GRIDDO_ASSET_PREFIX||process.env.ASSET_PREFIX;return!e||!t||!t.startsWith("pro-")?"":`${e}/${t}`}var gh=N(kt()),yh=(t,e,r)=>{let n=" > PRINT WARNING MESSAGE",i=Math.max(t.length,e.length,n.length,r.length),o="+".padEnd(i+15,"-")+"+";console.log(o),console.log(gh.default.keyword("orange").bold("|"+n.padEnd(i+5))),console.log("|"),console.log("|"+` Location: "${e}"`.padEnd(i+5)),console.log("|"+` Message: ${t}`.padEnd(i+5)),console.log("|"+` Expected: ${r}`.padEnd(i+5)),console.log("|"),console.log(o+`
73
- `)};var vh=N(require("node:fs")),Yn=N(require("node:path"));var G1=process.env.API_URL;async function X1(t){let{title:e,description:r,image:n,pageId:i,languageId:o,siteId:s,url:a,content:c,template:f}=t;return await yt({endpoint:`${G1}/search`,body:{title:e,description:r,image:n,pageId:i,languageId:o,siteId:s,url:a,template:f,content:H1(c)}})}function H1(t){let e=W1(["meta","link","style","script","noscript","nav","header","footer"],t),r=z1(e);return J1(r)}function W1(t,e){let r=e;return t.forEach(n=>{r=r.replace(new RegExp(`<${n}.*?>.*?</${n}>`,"gis")," ").replace(new RegExp(`(<${n}([^>]+)>)`,"gis")," ")}),r}function z1(t){return t.replace(/(<([^>]+)>)/gis," ")}function J1(t){return t.replace(/\s+/g," ")}async function bh(){let t=Yn.default.resolve(__dirname,"../store"),e=JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false");for await(let r of qo(t)){let{context:{page:n,openGraph:i}}=r,{compose:o,domain:s}=n.fullPath,a=e?Yn.default.resolve(__dirname,`../dist/${o}/index.html`):Yn.default.resolve(__dirname,`../dist${s}${o}/index.html`),c=vh.default.readFileSync(a).toString(),f={siteId:n.site,pageId:n.id,title:n.title,languageId:n.language,url:n.fullUrl,template:n.template.templateType||n.templateId,description:i.description,image:i.image,content:c};await X1(f)}}async function As(t){Fo("gatsby");let{doArchive:e,doData:r,doRestore:n,doMeta:i,doSSG:o}=t,s=0,a=await Mo();a.length||(yh("We didn't find any domains to render during the adapter phase.","getInstanceDomains","Function getInstanceDomains returned an empty array of domains. Check if the domains are correctly set in the instance's database."),process.exit(1));for(let c of a){let f=mh(c);n&&(zt(`Restore ${c}`),s=await it(f.init,()=>Ge("init done!"),f.restoreArtifacts,()=>Ge("Restore `dist` and `assets` folders done!"),f.restoreCacheArtifacts,()=>Ge("Restore `apiCache`, `store` and `.cache` restored!")).catch(u=>{console.error("Error in init() || restoreArtifacts() || restoreCacheArtifacts() :",u?.stdout?.toString()||u),process.exit(1)}),Jt(`Restore ${c} - ${s}s`)),r&&(zt(`Data ${c}`),s=await it(async()=>await Cs(c),()=>Ge("Download data from API to store folder done!")).catch(u=>{console.error("Error in createBuildData() :",u?.stdout?.toString()||u),process.exit(1)}),Jt(`Data ${c} - ${s}s`)),o&&(zt(`SSG ${c}`),s=await it(f.runGatsbyBuild,()=>Ge("Gatsby build done!")).catch(u=>{console.error("Error in runGatsbyBuild() :",u?.stdout?.toString()||u),process.exit(1)}),Jt(`SSG ${c} - ${s}s`)),i&&(zt(`Meta ${c}`),JSON.parse(process.env.GRIDDO_SEARCH_FEATURE||"false")&&(s=await it(bh).catch(p=>{console.error("Error while uploads search content in DDBB :",p?.stdout?.toString()||p),process.exit(1)}),Jt(`Meta ${c} - ${s}s`))),e&&(zt(`Archive ${c}`),s=await it(()=>Os(),()=>Ge("Clean empty dirs!"),f.removeDisposableArtifacts,()=>Ge("Clean `public` done!"),f.archiveArtifacts,()=>Ge("Archive dist and assets done!"),f.archiveCacheArtifacts,()=>Ge("Archive apiCache, .cache and store done!")).catch(u=>{console.error("Error in removeDisposableArtifacts() || archiveArtifacts()|| archiveCacheArtifacts() :",u?.stdout?.toString()||u),process.exit(1)}),Jt(`Archive ${c} - ${s}s`))}}async function V1(){let t=await it(()=>As({doRestore:!0,doData:!0,doSSG:!0,doRelocation:!0,doMeta:!0,doArchive:!0}));nt(`All domains rendered in ${t}s.`,"",1,0),process.exit(0)}V1().catch(t=>{console.error("Error in main():",t?.stdout?.toString()||t),process.exit(1)});
67
+ Missing in store: ${M.length} -> ${M}
68
+ Finally to store: ${Te.length} -> ${Te}`;JSON.parse(process.env.GRIDDO_DEBUG_LOGS||"false")&&it(ce,`Site store: ${i.name}`,1,0);let be=(0,dh.default)(uh),_t=Te.map(re=>be(()=>T(re)));await Promise.all(_t)}xd(t,{buildProcessData:Ps,createdPages:lh,sitesToPublish:r})}catch(r){console.error(r.message),process.exit(1)}}var ph=Ds.default.resolve(__dirname,"../store/"),B1=Ds.default.resolve(__dirname,"../apiCache");async function Os(t){bf(),_d(ph),await hh(ph,t),md(B1)}var Ue=N(require("node:fs")),We=N(require("node:path")),Ce=N(ir()),gh=N(ze());var Be=N(require("node:path")),Le=N($t());var Vt=N(require("node:path")),Qn=N(Fr()),U1=Qn.default.sync(Vt.default.resolve(__dirname,"../..")),mh=Qn.default.sync(__dirname),X1=Qn.default.sync(__dirname),H1=Vt.default.resolve(mh,"caches"),G1=Vt.default.resolve(U1,"exports/sites"),W1={proDomain:"pro-",CXDir:{EXPORTS:"__exports",CACHE:"__cache",CX:"__cx",SSG:"__ssg"},dirs:t=>({__exports:Vt.default.join(G1,t),__cache:Vt.default.join(H1,t),__cx:mh,__ssg:X1})};var C5=W1.CXDir;var I5=Be.default.resolve(__dirname,"../store/"),R5=Be.default.resolve(__dirname,"../dist/"),F5=Be.default.resolve(__dirname,"../"),k5=Be.default.resolve(In,"exports/sites");async function As(t,e){for await(let r of t)for(let n of r.domains){let i=Object.values(n)[0],o=JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false")?i.split(e).join(""):i,s=Be.default.resolve(__dirname,`../public${o}`),a=Be.default.resolve(__dirname,`../public/page-data${o}`);if(Xe(`Site dir ${s}`),Xe(`Page data dir ${a}`),!!Le.default.existsSync(s)){try{await Le.default.rm(s,{recursive:!0}),Xe(`${s} was deleted!`)}catch(c){console.log(c)}if(Le.default.existsSync(a))try{await Le.default.rm(a,{recursive:!0}),console.info(`${a} was deleted!`)}catch(c){console.log(c)}}}}var Is=t=>{let e=t||Be.default.resolve(An,"dist");if(!Le.default.statSync(e).isDirectory())return;let n=Le.default.readdirSync(e);if(n.length>0){let o=n.length,s=n.filter(a=>Be.default.extname(a).toLowerCase()===".xml").length;o===s&&(n.forEach(function(a){let c=Be.default.join(e,a);Le.default.rmSync(c)}),n=Le.default.readdirSync(e)),n.forEach(function(a){let c=Be.default.join(e,a);Is(c)}),n=Le.default.readdirSync(e)}if(n.length===0){Le.default.rmdirSync(e);return}};gh.default.config();function yh(t){let e=["dist","assets"],r=["public"],n=["apiCache","store"];JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false")?n.push(".cache"):r.push(".cache");let o=We.default.resolve(In,"exports/sites"),s=We.default.resolve(__dirname,"../caches"),a=z1(t),c=ci({DOMAIN:t,GRIDDO_ASSET_PREFIX:a,NEEDS_ASSET_DOMAIN_PREFIX:a&&a!=="",GRIDDO_RENDERID:new Date().valueOf()}),h=()=>{console.info(`Initializing exporter for the domain ${t}`),g(),m()},u=()=>{for(let x of e){let{currentExportArchivePath:w,currentExportWorkingPath:R}=p(x);Ue.default.existsSync(w)&&(console.log(`\uFE0FRestoring ${Ce.default.gray(w)}`),c(`cp -R ${w} ${R}`))}ve()},p=(x="")=>{if(x==="/")throw new Error(`Artifact path cannot be root: ${x}`);let w=We.default.resolve(o,t),R=We.default.resolve(w,x),F=We.default.resolve(R,t),U=We.default.resolve(s,t),A=We.default.resolve(U,x),L=We.default.resolve(A,t),T=`${R}-BACKUP`,P=We.default.resolve(An,x);return{domainExportArchiveBasePath:w,currentExportArchivePath:R,currentExportBackupPath:T,currentExportWorkingPath:P,currentExportArchivePathInDomain:F,domainCacheArchiveBasePath:U,currentExportArchiveCachePath:A,currentExportArchiveCachePathInDomain:L}},g=()=>{for(let x of[...e,...r,...n]){let{currentExportWorkingPath:w}=p(x);Ue.default.existsSync(w)&&(console.log(`Cleanup dirty ${Ce.default.gray(w)}`),c(`rm -rf ${w}`))}},m=()=>{let{domainExportArchiveBasePath:x,domainCacheArchiveBasePath:w}=p();for(let R of[x,w])Ue.default.existsSync(R)||(console.info(`Creating ${R}`),c(`mkdir -p ${R}`))},b=x=>{let{currentExportArchivePath:w,currentExportWorkingPath:R}=p(x);console.info(`Moving files from ${Ce.default.gray(R)} to ${Ce.default.gray(w)}`),c(`mv ${R} ${w}`)},E=()=>{for(let x of e){let{currentExportWorkingPath:w,currentExportArchivePath:R}=p(x);if(!Ue.default.existsSync(w)){console.log("Source directory has not been created:",w);continue}try{C(x),b(x),$(x)}catch(F){console.log(`Error moving files to ${R}`,F.message),k(x);continue}}},C=x=>{let{currentExportArchivePath:w,currentExportBackupPath:R}=p(x);Ue.default.existsSync(w)&&(console.info(`Creating backup of ${Ce.default.gray(w)}`),c(`mv ${w} ${R}`))},k=x=>{let{currentExportArchivePath:w,currentExportBackupPath:R}=p(x);Ue.default.existsSync(R)&&(console.log(`\uFE0FRestoring backup ${Ce.default.gray(w)}`),c(`mv ${R} ${w}`))},$=x=>{let{currentExportArchivePath:w,currentExportBackupPath:R}=p(x);console.log(`\uFE0FRemoving backup ${Ce.default.gray(w)}`),c(`rm -rf ${R}`)},X=()=>{for(let x of n){let{currentExportArchiveCachePath:w,currentExportWorkingPath:R}=p(x);if(Ue.default.existsSync(R))console.info(`Moving files from ${Ce.default.gray(R)} to ${Ce.default.gray(w)}`),c(`mv ${R} ${w}`);else throw new Error(`Error moving files from ${R}: Path does not exist.`)}},G=async()=>{let{sitesToPublish:x,sitesToUnpublish:w}=await Yn(t);await As(w,t),await As(x,t)},J=()=>{for(let x of n){let{currentExportArchiveCachePath:w,currentExportWorkingPath:R}=p(x);Ue.default.existsSync(w)&&(console.log(`\uFE0FRestoring ${Ce.default.gray(w)}`),c(`mv ${w} ${R}`))}},ae=()=>{c("yarn gatsby-build")},ve=()=>{let{currentExportWorkingPath:x}=p("dist"),{currentExportWorkingPath:w}=p("public");Ue.default.existsSync(x)&&(console.log(`Moving ${Ce.default.gray(x)} to ${Ce.default.gray(w)}`),c(`mv ${x} ${w}`))},K=()=>{for(let x of r){let{currentExportWorkingPath:w}=p(x);Ue.default.existsSync(w)&&(console.log(`\uFE0FRemoving ${Ce.default.gray(w)}`),c(`rm -rf ${w}`))}},I=()=>{g()};return{init:h,getArtifactPaths:p,archiveExportArtifact:b,archiveArtifacts:E,restoreArtifacts:u,createArtifactBackup:C,restoreArtifactBackup:k,deleteArtifactBackup:$,archiveCacheArtifacts:X,restoreCacheArtifacts:J,cleanUpSites:G,runGatsbyBuild:ae,removeDisposableArtifacts:K}}function z1(t){let e=process.env.GRIDDO_ASSET_PREFIX||process.env.ASSET_PREFIX;return!e||!t||!t.startsWith("pro-")?"":`${e}/${t}`}var vh=N(require("node:fs")),Zn=N(require("node:path"));var J1=process.env.API_URL;async function V1(t){let{title:e,description:r,image:n,pageId:i,languageId:o,siteId:s,url:a,content:c,template:h}=t;return await yt({endpoint:`${J1}/search`,body:{title:e,description:r,image:n,pageId:i,languageId:o,siteId:s,url:a,template:h,content:K1(c)}})}function K1(t){let e=Y1(["meta","link","style","script","noscript","nav","header","footer"],t),r=Q1(e);return Z1(r)}function Y1(t,e){let r=e;return t.forEach(n=>{r=r.replace(new RegExp(`<${n}.*?>.*?</${n}>`,"gis")," ").replace(new RegExp(`(<${n}([^>]+)>)`,"gis")," ")}),r}function Q1(t){return t.replace(/(<([^>]+)>)/gis," ")}function Z1(t){return t.replace(/\s+/g," ")}async function bh(){let t=Zn.default.resolve(__dirname,"../store"),e=JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false");for await(let r of jo(t)){let{context:{page:n,openGraph:i}}=r,{compose:o,domain:s}=n.fullPath,a=e?Zn.default.resolve(__dirname,`../dist/${o}/index.html`):Zn.default.resolve(__dirname,`../dist${s}${o}/index.html`),c=vh.default.readFileSync(a).toString(),h={siteId:n.site,pageId:n.id,title:n.title,languageId:n.language,url:n.fullUrl,template:n.template.templateType||n.templateId,description:i.description,image:i.image,content:c};await V1(h)}}async function Rs(){ko("gatsby");let t=await qo();for(let e of t){let r=yh(e);await Gt({name:"Restore",steps:[r.init,()=>He("init done!"),r.restoreArtifacts,()=>He("Restore `dist` and `assets` dirs done!"),r.restoreCacheArtifacts,()=>He("Restore `apiCache`, `store` and `.cache` restored!")]}),await Gt({name:"Data",steps:[async()=>await Os(e),()=>He("Download data from API to `store` dir done!")]}),await Gt({name:"SSG",steps:[r.runGatsbyBuild,()=>He("Gatsby build done!")]});let n=JSON.parse(process.env.GRIDDO_SEARCH_FEATURE||"false");await Gt({name:"Meta",steps:[()=>n?bh():void 0]}),await Gt({name:"Archive",steps:[()=>Is(),()=>He("Clean empty dirs done!"),r.removeDisposableArtifacts,()=>He("Clean `public` done!"),r.archiveArtifacts,()=>He("Archive `dist` and `assets` done!"),r.archiveCacheArtifacts,()=>He("Archive `apiCache`, `.cache` and `store` done!")]})}}async function eb(){let t=await To(()=>Rs()).catch(e=>{console.log(e),console.log("[[[ Render will be reset ]]]"),process.exit(1)});it(`All domains rendered in ${t}s.`,"",1,0),process.exit(0)}eb().catch(t=>{console.error("Error in main():",t?.stdout?.toString()||t),process.exit(1)});