@griddo/cx 10.4.7 → 10.4.8

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,53 +1,53 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var Sh=Object.create;var Ts=Object.defineProperty;var Eh=Object.getOwnPropertyDescriptor;var Ch=Object.getOwnPropertyNames;var Ph=Object.getPrototypeOf,Dh=Object.prototype.hasOwnProperty;var y=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Oh=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ch(e))!Dh.call(t,i)&&i!==r&&Ts(t,i,{get:()=>e[i],enumerable:!(n=Eh(e,i))||n.enumerable});return t};var q=(t,e,r)=>(r=t!=null?Sh(Ph(t)):{},Oh(e||!t||!t.__esModule?Ts(r,"default",{value:t,enumerable:!0}):r,t));var Je=y((ib,ri)=>{var Ah=require("fs"),Ih=require("path");function Ms(t){console.log(`[dotenv][DEBUG] ${t}`)}var Rh=`
3
- `,Fh=/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/,kh=/\\n/g,Th=/\n|\r|\r\n/;function qs(t,e){let r=!!(e&&e.debug),n={};return t.toString().split(Th).forEach(function(i,o){let s=i.match(Fh);if(s!=null){let a=s[1],c=s[2]||"",d=c.length-1,u=c[0]==='"'&&c[d]==='"';c[0]==="'"&&c[d]==="'"||u?(c=c.substring(1,d),u&&(c=c.replace(kh,Rh))):c=c.trim(),n[a]=c}else r&&Ms(`did not match key and value when parsing line ${o+1}: ${i}`)}),n}function Mh(t){let e=Ih.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=qs(Ah.readFileSync(e,{encoding:r}),{debug:n});return Object.keys(i).forEach(function(o){Object.prototype.hasOwnProperty.call(process.env,o)?n&&Ms(`"${o}" is already defined in \`process.env\` and will not be overwritten`):process.env[o]=i[o]}),{parsed:i}}catch(i){return{error:i}}}ri.exports.config=Mh;ri.exports.parse=qs});var js=y((ob,Ns)=>{var ni=class{constructor(e){this.value=e,this.next=void 0}},ii=class{constructor(){this.clear()}enqueue(e){let r=new ni(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}};Ns.exports=ii});var oi=y((sb,Ls)=>{"use strict";var qh=js(),Nh=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 qh,r=0,n=()=>{r--,e.size>0&&e.dequeue()()},i=async(a,c,...d)=>{r++;let u=(async()=>a(...d))();c(u);try{await u}catch{}n()},o=(a,c,...d)=>{e.enqueue(i.bind(null,a,c,...d)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},s=(a,...c)=>new Promise(d=>{o(a,d,...c)});return Object.defineProperties(s,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),s};Ls.exports=Nh});var Us=y((ab,Bs)=>{"use strict";var $s=oi(),Ir=class extends Error{constructor(e){super(),this.value=e}},jh=async(t,e)=>e(await t),Lh=async t=>{let e=await Promise.all(t);if(e[1]===!0)throw new Ir(e[0]);return!1},$h=async(t,e,r)=>{r={concurrency:1/0,preserveOrder:!0,...r};let n=$s(r.concurrency),i=[...t].map(s=>[s,n(jh,s,e)]),o=$s(r.preserveOrder?1:1/0);try{await Promise.all(i.map(s=>o(Lh,s)))}catch(s){if(s instanceof Ir)return s.value;throw s}};Bs.exports=$h});var Js=y((cb,si)=>{"use strict";var Xs=require("path"),Rr=require("fs"),{promisify:Gs}=require("util"),Bh=Us(),Uh=Gs(Rr.stat),Xh=Gs(Rr.lstat),Hs={directory:"isDirectory",file:"isFile"};function Ws({type:t}){if(!(t in Hs))throw new Error(`Invalid type specified: ${t}`)}var zs=(t,e)=>t===void 0||e[Hs[t]]();si.exports=async(t,e)=>{e={cwd:process.cwd(),type:"file",allowSymlinks:!0,...e},Ws(e);let r=e.allowSymlinks?Uh:Xh;return Bh(t,async n=>{try{let i=await r(Xs.resolve(e.cwd,n));return zs(e.type,i)}catch{return!1}},e)};si.exports.sync=(t,e)=>{e={cwd:process.cwd(),allowSymlinks:!0,type:"file",...e},Ws(e);let r=e.allowSymlinks?Rr.statSync:Rr.lstatSync;for(let n of t)try{let i=r(Xs.resolve(e.cwd,n));if(zs(e.type,i))return n}catch{}}});var Ys=y((ub,ai)=>{"use strict";var Vs=require("fs"),{promisify:Gh}=require("util"),Hh=Gh(Vs.access);ai.exports=async t=>{try{return await Hh(t),!0}catch{return!1}};ai.exports.sync=t=>{try{return Vs.accessSync(t),!0}catch{return!1}}});var Qs=y((lb,St)=>{"use strict";var Qe=require("path"),Fr=Js(),Ks=Ys(),ci=Symbol("findUp.stop");St.exports=async(t,e={})=>{let r=Qe.resolve(e.cwd||""),{root:n}=Qe.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===ci)return;if(s)return Qe.resolve(r,s);if(r===n)return;r=Qe.dirname(r)}};St.exports.sync=(t,e={})=>{let r=Qe.resolve(e.cwd||""),{root:n}=Qe.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===ci)return;if(s)return Qe.resolve(r,s);if(r===n)return;r=Qe.dirname(r)}};St.exports.exists=Ks;St.exports.sync.exists=Ks.sync;St.exports.stop=ci});var kr=y((fb,ui)=>{"use strict";var Zs=require("path"),ea=Qs(),Wh=async t=>{let e=await ea("package.json",{cwd:t});return e&&Zs.dirname(e)};ui.exports=Wh;ui.exports.sync=t=>{let e=ea.sync("package.json",{cwd:t});return e&&Zs.dirname(e)}});var fi=y((mb,oa)=>{"use strict";oa.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 pe=y((gb,ca)=>{"use strict";var Vh=fi(),lt=Object.prototype.toString;function pi(t){return lt.call(t)==="[object Array]"}function di(t){return typeof t>"u"}function Yh(t){return t!==null&&!di(t)&&t.constructor!==null&&!di(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function Kh(t){return lt.call(t)==="[object ArrayBuffer]"}function Qh(t){return typeof FormData<"u"&&t instanceof FormData}function Zh(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function ep(t){return typeof t=="string"}function tp(t){return typeof t=="number"}function sa(t){return t!==null&&typeof t=="object"}function Tr(t){if(lt.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function rp(t){return lt.call(t)==="[object Date]"}function np(t){return lt.call(t)==="[object File]"}function ip(t){return lt.call(t)==="[object Blob]"}function aa(t){return lt.call(t)==="[object Function]"}function op(t){return sa(t)&&aa(t.pipe)}function sp(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}function ap(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function cp(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function mi(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),pi(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 hi(){var t={};function e(i,o){Tr(t[o])&&Tr(i)?t[o]=hi(t[o],i):Tr(i)?t[o]=hi({},i):pi(i)?t[o]=i.slice():t[o]=i}for(var r=0,n=arguments.length;r<n;r++)mi(arguments[r],e);return t}function up(t,e,r){return mi(e,function(i,o){r&&typeof i=="function"?t[o]=Vh(i,r):t[o]=i}),t}function lp(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}ca.exports={isArray:pi,isArrayBuffer:Kh,isBuffer:Yh,isFormData:Qh,isArrayBufferView:Zh,isString:ep,isNumber:tp,isObject:sa,isPlainObject:Tr,isUndefined:di,isDate:rp,isFile:np,isBlob:ip,isFunction:aa,isStream:op,isURLSearchParams:sp,isStandardBrowserEnv:cp,forEach:mi,merge:hi,extend:up,trim:ap,stripBOM:lp}});var Mr=y((yb,la)=>{"use strict";var Et=pe();function ua(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}la.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,d){c===null||typeof c>"u"||(Et.isArray(c)?d=d+"[]":c=[c],Et.forEach(c,function(p){Et.isDate(p)?p=p.toISOString():Et.isObject(p)&&(p=JSON.stringify(p)),o.push(ua(d)+"="+ua(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 da=y((vb,fa)=>{"use strict";var fp=pe();function qr(){this.handlers=[]}qr.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};qr.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};qr.prototype.forEach=function(e){fp.forEach(this.handlers,function(n){n!==null&&e(n)})};fa.exports=qr});var pa=y((bb,ha)=>{"use strict";var dp=pe();ha.exports=function(e,r){dp.forEach(e,function(i,o){o!==r&&o.toUpperCase()===r.toUpperCase()&&(e[r]=i,delete e[o])})}});var Nr=y((wb,ma)=>{"use strict";ma.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 jr=y((_b,ga)=>{"use strict";var hp=Nr();ga.exports=function(e,r,n,i,o){var s=new Error(e);return hp(s,r,n,i,o)}});var gi=y((xb,ya)=>{"use strict";var pp=jr();ya.exports=function(e,r,n){var i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):r(pp("Request failed with status code "+n.status,n.config,null,n.request,n))}});var ba=y((Sb,va)=>{"use strict";var Lr=pe();va.exports=Lr.isStandardBrowserEnv()?function(){return{write:function(r,n,i,o,s,a){var c=[];c.push(r+"="+encodeURIComponent(n)),Lr.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),Lr.isString(o)&&c.push("path="+o),Lr.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 _a=y((Eb,wa)=>{"use strict";wa.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}});var Sa=y((Cb,xa)=>{"use strict";xa.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}});var yi=y((Pb,Ea)=>{"use strict";var mp=_a(),gp=Sa();Ea.exports=function(e,r){return e&&!mp(r)?gp(e,r):r}});var Pa=y((Db,Ca)=>{"use strict";var vi=pe(),yp=["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"];Ca.exports=function(e){var r={},n,i,o;return e&&vi.forEach(e.split(`
4
- `),function(a){if(o=a.indexOf(":"),n=vi.trim(a.substr(0,o)).toLowerCase(),i=vi.trim(a.substr(o+1)),n){if(r[n]&&yp.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 Aa=y((Ob,Oa)=>{"use strict";var Da=pe();Oa.exports=Da.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=Da.isString(s)?i(s):s;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}()});var Ra=y((Ab,Ia)=>{"use strict";var $r=pe(),vp=gi(),bp=ba(),wp=Mr(),_p=yi(),xp=Pa(),Sp=Aa(),bi=jr();Ia.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 d=e.auth.username||"",u=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.Authorization="Basic "+btoa(d+":"+u)}var p=_p(e.baseURL,e.url);c.open(e.method.toUpperCase(),wp(p,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function g(){if(c){var b="getAllResponseHeaders"in c?xp(c.getAllResponseHeaders()):null,C=!a||a==="text"||a==="json"?c.responseText:c.response,P={data:C,status:c.status,statusText:c.statusText,headers:b,config:e,request:c};vp(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(bi("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){i(bi("Network Error",e,null,c)),c=null},c.ontimeout=function(){var C="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(C=e.timeoutErrorMessage),i(bi(C,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},$r.isStandardBrowserEnv()){var m=(e.withCredentials||Sp(p))&&e.xsrfCookieName?bp.read(e.xsrfCookieName):void 0;m&&(s[e.xsrfHeaderName]=m)}"setRequestHeader"in c&&$r.forEach(s,function(C,P){typeof o>"u"&&P.toLowerCase()==="content-type"?delete s[P]:c.setRequestHeader(P,C)}),$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(C){c&&(c.abort(),i(C),c=null)}),o||(o=null),c.send(o)})}});var ka=y((Ib,Fa)=>{var Ct=1e3,Pt=Ct*60,Dt=Pt*60,ft=Dt*24,Ep=ft*7,Cp=ft*365.25;Fa.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Pp(t);if(r==="number"&&isFinite(t))return e.long?Op(t):Dp(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Pp(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*Cp;case"weeks":case"week":case"w":return r*Ep;case"days":case"day":case"d":return r*ft;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*Pt;case"seconds":case"second":case"secs":case"sec":case"s":return r*Ct;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Dp(t){var e=Math.abs(t);return e>=ft?Math.round(t/ft)+"d":e>=Dt?Math.round(t/Dt)+"h":e>=Pt?Math.round(t/Pt)+"m":e>=Ct?Math.round(t/Ct)+"s":t+"ms"}function Op(t){var e=Math.abs(t);return e>=ft?Br(t,e,ft,"day"):e>=Dt?Br(t,e,Dt,"hour"):e>=Pt?Br(t,e,Pt,"minute"):e>=Ct?Br(t,e,Ct,"second"):t+" ms"}function Br(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var wi=y((Rb,Ta)=>{function Ap(t){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=s,r.humanize=ka(),r.destroy=d,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 C(...P){if(!C.enabled)return;let F=C,N=Number(new Date),G=N-(p||N);F.diff=G,F.prev=p,F.curr=N,p=N,P[0]=r.coerce(P[0]),typeof P[0]!="string"&&P.unshift("%O");let B=0;P[0]=P[0].replace(/%([a-zA-Z%])/g,(ae,be)=>{if(ae==="%%")return"%";B++;let K=r.formatters[be];if(typeof K=="function"){let w=P[B];ae=K.call(F,w),P.splice(B,1),B--}return ae}),r.formatArgs.call(F,P),(F.log||r.log).apply(F,P)}return C.namespace=u,C.useColors=r.useColors(),C.color=r.selectColor(u),C.extend=n,C.destroy=r.destroy,Object.defineProperty(C,"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(C),C}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 d(){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}Ta.exports=Ap});var Ma=y((Oe,Ur)=>{Oe.formatArgs=Rp;Oe.save=Fp;Oe.load=kp;Oe.useColors=Ip;Oe.storage=Tp();Oe.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`."))}})();Oe.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 Ip(){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 Rp(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Ur.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)}Oe.log=console.debug||console.log||(()=>{});function Fp(t){try{t?Oe.storage.setItem("debug",t):Oe.storage.removeItem("debug")}catch{}}function kp(){let t;try{t=Oe.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function Tp(){try{return localStorage}catch{}}Ur.exports=wi()(Oe);var{formatters:Mp}=Ur.exports;Mp.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Na=y((Fb,qa)=>{"use strict";qa.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 Si=y((kb,La)=>{"use strict";var qp=require("os"),ja=require("tty"),Re=Na(),{env:ee}=process,Ze;Re("no-color")||Re("no-colors")||Re("color=false")||Re("color=never")?Ze=0:(Re("color")||Re("colors")||Re("color=true")||Re("color=always"))&&(Ze=1);"FORCE_COLOR"in ee&&(ee.FORCE_COLOR==="true"?Ze=1:ee.FORCE_COLOR==="false"?Ze=0:Ze=ee.FORCE_COLOR.length===0?1:Math.min(parseInt(ee.FORCE_COLOR,10),3));function _i(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function xi(t,e){if(Ze===0)return 0;if(Re("color=16m")||Re("color=full")||Re("color=truecolor"))return 3;if(Re("color=256"))return 2;if(t&&!e&&Ze===void 0)return 0;let r=Ze||0;if(ee.TERM==="dumb")return r;if(process.platform==="win32"){let n=qp.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in ee)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in ee)||ee.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in ee)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ee.TEAMCITY_VERSION)?1:0;if(ee.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ee){let n=parseInt((ee.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ee.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ee.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ee.TERM)||"COLORTERM"in ee?1:r}function Np(t){let e=xi(t,t&&t.isTTY);return _i(e)}La.exports={supportsColor:Np,stdout:_i(xi(!0,ja.isatty(1))),stderr:_i(xi(!0,ja.isatty(2)))}});var Ba=y((ne,Gr)=>{var jp=require("tty"),Xr=require("util");ne.init=Hp;ne.log=Up;ne.formatArgs=$p;ne.save=Xp;ne.load=Gp;ne.useColors=Lp;ne.destroy=Xr.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=Si();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 Lp(){return"colors"in ne.inspectOpts?!!ne.inspectOpts.colors:jp.isatty(process.stderr.fd)}function $p(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 Fh=Object.create;var ni=Object.defineProperty;var kh=Object.getOwnPropertyDescriptor;var Th=Object.getOwnPropertyNames;var Mh=Object.getPrototypeOf,qh=Object.prototype.hasOwnProperty;var $s=(t,e)=>()=>(t&&(e=t(t=0)),e);var y=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Nh=(t,e)=>{for(var r in e)ni(t,r,{get:e[r],enumerable:!0})},jh=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Th(e))!qh.call(t,i)&&i!==r&&ni(t,i,{get:()=>e[i],enumerable:!(n=kh(e,i))||n.enumerable});return t};var T=(t,e,r)=>(r=t!=null?Fh(Mh(t)):{},jh(e||!t||!t.__esModule?ni(r,"default",{value:t,enumerable:!0}):r,t));var ze=y((wb,ii)=>{var Lh=require("fs"),$h=require("path");function Bs(t){console.log(`[dotenv][DEBUG] ${t}`)}var Bh=`
3
+ `,Uh=/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/,Xh=/\\n/g,Gh=/\n|\r|\r\n/;function Us(t,e){let r=!!(e&&e.debug),n={};return t.toString().split(Gh).forEach(function(i,o){let s=i.match(Uh);if(s!=null){let a=s[1],c=s[2]||"",d=c.length-1,u=c[0]==='"'&&c[d]==='"';c[0]==="'"&&c[d]==="'"||u?(c=c.substring(1,d),u&&(c=c.replace(Xh,Bh))):c=c.trim(),n[a]=c}else r&&Bs(`did not match key and value when parsing line ${o+1}: ${i}`)}),n}function Hh(t){let e=$h.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=Us(Lh.readFileSync(e,{encoding:r}),{debug:n});return Object.keys(i).forEach(function(o){Object.prototype.hasOwnProperty.call(process.env,o)?n&&Bs(`"${o}" is already defined in \`process.env\` and will not be overwritten`):process.env[o]=i[o]}),{parsed:i}}catch(i){return{error:i}}}ii.exports.config=Hh;ii.exports.parse=Us});var Gs=y((_b,Xs)=>{var oi=class{constructor(e){this.value=e,this.next=void 0}},si=class{constructor(){this.clear()}enqueue(e){let r=new oi(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}};Xs.exports=si});var ai=y((xb,Hs)=>{"use strict";var Jh=Gs(),Wh=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 Jh,r=0,n=()=>{r--,e.size>0&&e.dequeue()()},i=async(a,c,...d)=>{r++;let u=(async()=>a(...d))();c(u);try{await u}catch{}n()},o=(a,c,...d)=>{e.enqueue(i.bind(null,a,c,...d)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},s=(a,...c)=>new Promise(d=>{o(a,d,...c)});return Object.defineProperties(s,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),s};Hs.exports=Wh});var zs=y((Sb,Ws)=>{"use strict";var Js=ai(),Fr=class extends Error{constructor(e){super(),this.value=e}},zh=async(t,e)=>e(await t),Vh=async t=>{let e=await Promise.all(t);if(e[1]===!0)throw new Fr(e[0]);return!1},Yh=async(t,e,r)=>{r={concurrency:1/0,preserveOrder:!0,...r};let n=Js(r.concurrency),i=[...t].map(s=>[s,n(zh,s,e)]),o=Js(r.preserveOrder?1:1/0);try{await Promise.all(i.map(s=>o(Vh,s)))}catch(s){if(s instanceof Fr)return s.value;throw s}};Ws.exports=Yh});var ea=y((Eb,ci)=>{"use strict";var Vs=require("path"),kr=require("fs"),{promisify:Ys}=require("util"),Kh=zs(),Qh=Ys(kr.stat),Zh=Ys(kr.lstat),Ks={directory:"isDirectory",file:"isFile"};function Qs({type:t}){if(!(t in Ks))throw new Error(`Invalid type specified: ${t}`)}var Zs=(t,e)=>t===void 0||e[Ks[t]]();ci.exports=async(t,e)=>{e={cwd:process.cwd(),type:"file",allowSymlinks:!0,...e},Qs(e);let r=e.allowSymlinks?Qh:Zh;return Kh(t,async n=>{try{let i=await r(Vs.resolve(e.cwd,n));return Zs(e.type,i)}catch{return!1}},e)};ci.exports.sync=(t,e)=>{e={cwd:process.cwd(),allowSymlinks:!0,type:"file",...e},Qs(e);let r=e.allowSymlinks?kr.statSync:kr.lstatSync;for(let n of t)try{let i=r(Vs.resolve(e.cwd,n));if(Zs(e.type,i))return n}catch{}}});var ra=y((Cb,ui)=>{"use strict";var ta=require("fs"),{promisify:ep}=require("util"),tp=ep(ta.access);ui.exports=async t=>{try{return await tp(t),!0}catch{return!1}};ui.exports.sync=t=>{try{return ta.accessSync(t),!0}catch{return!1}}});var fi=y((Pb,St)=>{"use strict";var Qe=require("path"),Tr=ea(),na=ra(),li=Symbol("findUp.stop");St.exports=async(t,e={})=>{let r=Qe.resolve(e.cwd||""),{root:n}=Qe.parse(r),i=[].concat(t),o=async s=>{if(typeof t!="function")return Tr(i,s);let a=await t(s.cwd);return typeof a=="string"?Tr([a],s):a};for(;;){let s=await o({...e,cwd:r});if(s===li)return;if(s)return Qe.resolve(r,s);if(r===n)return;r=Qe.dirname(r)}};St.exports.sync=(t,e={})=>{let r=Qe.resolve(e.cwd||""),{root:n}=Qe.parse(r),i=[].concat(t),o=s=>{if(typeof t!="function")return Tr.sync(i,s);let a=t(s.cwd);return typeof a=="string"?Tr.sync([a],s):a};for(;;){let s=o({...e,cwd:r});if(s===li)return;if(s)return Qe.resolve(r,s);if(r===n)return;r=Qe.dirname(r)}};St.exports.exists=na;St.exports.sync.exists=na.sync;St.exports.stop=li});var Zt=y((Db,di)=>{"use strict";var ia=require("path"),oa=fi(),rp=async t=>{let e=await oa("package.json",{cwd:t});return e&&ia.dirname(e)};di.exports=rp;di.exports.sync=t=>{let e=oa.sync("package.json",{cwd:t});return e&&ia.dirname(e)}});var pi=y((Rb,la)=>{"use strict";la.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 pe=y((Fb,ha)=>{"use strict";var op=pi(),lt=Object.prototype.toString;function yi(t){return lt.call(t)==="[object Array]"}function mi(t){return typeof t>"u"}function sp(t){return t!==null&&!mi(t)&&t.constructor!==null&&!mi(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function ap(t){return lt.call(t)==="[object ArrayBuffer]"}function cp(t){return typeof FormData<"u"&&t instanceof FormData}function up(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function lp(t){return typeof t=="string"}function fp(t){return typeof t=="number"}function fa(t){return t!==null&&typeof t=="object"}function Mr(t){if(lt.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function dp(t){return lt.call(t)==="[object Date]"}function hp(t){return lt.call(t)==="[object File]"}function pp(t){return lt.call(t)==="[object Blob]"}function da(t){return lt.call(t)==="[object Function]"}function mp(t){return fa(t)&&da(t.pipe)}function gp(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}function yp(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function vp(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function vi(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),yi(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 gi(){var t={};function e(i,o){Mr(t[o])&&Mr(i)?t[o]=gi(t[o],i):Mr(i)?t[o]=gi({},i):yi(i)?t[o]=i.slice():t[o]=i}for(var r=0,n=arguments.length;r<n;r++)vi(arguments[r],e);return t}function bp(t,e,r){return vi(e,function(i,o){r&&typeof i=="function"?t[o]=op(i,r):t[o]=i}),t}function wp(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}ha.exports={isArray:yi,isArrayBuffer:ap,isBuffer:sp,isFormData:cp,isArrayBufferView:up,isString:lp,isNumber:fp,isObject:fa,isPlainObject:Mr,isUndefined:mi,isDate:dp,isFile:hp,isBlob:pp,isFunction:da,isStream:mp,isURLSearchParams:gp,isStandardBrowserEnv:vp,forEach:vi,merge:gi,extend:bp,trim:yp,stripBOM:wp}});var qr=y((kb,ma)=>{"use strict";var Et=pe();function pa(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}ma.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,d){c===null||typeof c>"u"||(Et.isArray(c)?d=d+"[]":c=[c],Et.forEach(c,function(p){Et.isDate(p)?p=p.toISOString():Et.isObject(p)&&(p=JSON.stringify(p)),o.push(pa(d)+"="+pa(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 ya=y((Tb,ga)=>{"use strict";var _p=pe();function Nr(){this.handlers=[]}Nr.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};Nr.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};Nr.prototype.forEach=function(e){_p.forEach(this.handlers,function(n){n!==null&&e(n)})};ga.exports=Nr});var ba=y((Mb,va)=>{"use strict";var xp=pe();va.exports=function(e,r){xp.forEach(e,function(i,o){o!==r&&o.toUpperCase()===r.toUpperCase()&&(e[r]=i,delete e[o])})}});var jr=y((qb,wa)=>{"use strict";wa.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 Lr=y((Nb,_a)=>{"use strict";var Sp=jr();_a.exports=function(e,r,n,i,o){var s=new Error(e);return Sp(s,r,n,i,o)}});var bi=y((jb,xa)=>{"use strict";var Ep=Lr();xa.exports=function(e,r,n){var i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):r(Ep("Request failed with status code "+n.status,n.config,null,n.request,n))}});var Ea=y((Lb,Sa)=>{"use strict";var $r=pe();Sa.exports=$r.isStandardBrowserEnv()?function(){return{write:function(r,n,i,o,s,a){var c=[];c.push(r+"="+encodeURIComponent(n)),$r.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),$r.isString(o)&&c.push("path="+o),$r.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 Pa=y(($b,Ca)=>{"use strict";Ca.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}});var Oa=y((Bb,Da)=>{"use strict";Da.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}});var wi=y((Ub,Aa)=>{"use strict";var Cp=Pa(),Pp=Oa();Aa.exports=function(e,r){return e&&!Cp(r)?Pp(e,r):r}});var Ra=y((Xb,Ia)=>{"use strict";var _i=pe(),Dp=["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"];Ia.exports=function(e){var r={},n,i,o;return e&&_i.forEach(e.split(`
4
+ `),function(a){if(o=a.indexOf(":"),n=_i.trim(a.substr(0,o)).toLowerCase(),i=_i.trim(a.substr(o+1)),n){if(r[n]&&Dp.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 Ta=y((Gb,ka)=>{"use strict";var Fa=pe();ka.exports=Fa.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=Fa.isString(s)?i(s):s;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}()});var qa=y((Hb,Ma)=>{"use strict";var Br=pe(),Op=bi(),Ap=Ea(),Ip=qr(),Rp=wi(),Fp=Ra(),kp=Ta(),xi=Lr();Ma.exports=function(e){return new Promise(function(n,i){var o=e.data,s=e.headers,a=e.responseType;Br.isFormData(o)&&delete s["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var d=e.auth.username||"",u=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.Authorization="Basic "+btoa(d+":"+u)}var p=Rp(e.baseURL,e.url);c.open(e.method.toUpperCase(),Ip(p,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function g(){if(c){var b="getAllResponseHeaders"in c?Fp(c.getAllResponseHeaders()):null,C=!a||a==="text"||a==="json"?c.responseText:c.response,P={data:C,status:c.status,statusText:c.statusText,headers:b,config:e,request:c};Op(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(xi("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){i(xi("Network Error",e,null,c)),c=null},c.ontimeout=function(){var C="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(C=e.timeoutErrorMessage),i(xi(C,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},Br.isStandardBrowserEnv()){var m=(e.withCredentials||kp(p))&&e.xsrfCookieName?Ap.read(e.xsrfCookieName):void 0;m&&(s[e.xsrfHeaderName]=m)}"setRequestHeader"in c&&Br.forEach(s,function(C,P){typeof o>"u"&&P.toLowerCase()==="content-type"?delete s[P]:c.setRequestHeader(P,C)}),Br.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(C){c&&(c.abort(),i(C),c=null)}),o||(o=null),c.send(o)})}});var ja=y((Jb,Na)=>{var Ct=1e3,Pt=Ct*60,Dt=Pt*60,ft=Dt*24,Tp=ft*7,Mp=ft*365.25;Na.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return qp(t);if(r==="number"&&isFinite(t))return e.long?jp(t):Np(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function qp(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*Mp;case"weeks":case"week":case"w":return r*Tp;case"days":case"day":case"d":return r*ft;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*Pt;case"seconds":case"second":case"secs":case"sec":case"s":return r*Ct;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Np(t){var e=Math.abs(t);return e>=ft?Math.round(t/ft)+"d":e>=Dt?Math.round(t/Dt)+"h":e>=Pt?Math.round(t/Pt)+"m":e>=Ct?Math.round(t/Ct)+"s":t+"ms"}function jp(t){var e=Math.abs(t);return e>=ft?Ur(t,e,ft,"day"):e>=Dt?Ur(t,e,Dt,"hour"):e>=Pt?Ur(t,e,Pt,"minute"):e>=Ct?Ur(t,e,Ct,"second"):t+" ms"}function Ur(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var Si=y((Wb,La)=>{function Lp(t){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=s,r.humanize=ja(),r.destroy=d,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 C(...P){if(!C.enabled)return;let F=C,N=Number(new Date),G=N-(p||N);F.diff=G,F.prev=p,F.curr=N,p=N,P[0]=r.coerce(P[0]),typeof P[0]!="string"&&P.unshift("%O");let B=0;P[0]=P[0].replace(/%([a-zA-Z%])/g,(ae,be)=>{if(ae==="%%")return"%";B++;let K=r.formatters[be];if(typeof K=="function"){let w=P[B];ae=K.call(F,w),P.splice(B,1),B--}return ae}),r.formatArgs.call(F,P),(F.log||r.log).apply(F,P)}return C.namespace=u,C.useColors=r.useColors(),C.color=r.selectColor(u),C.extend=n,C.destroy=r.destroy,Object.defineProperty(C,"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(C),C}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 d(){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}La.exports=Lp});var $a=y((Oe,Xr)=>{Oe.formatArgs=Bp;Oe.save=Up;Oe.load=Xp;Oe.useColors=$p;Oe.storage=Gp();Oe.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`."))}})();Oe.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 $p(){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 Bp(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Xr.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)}Oe.log=console.debug||console.log||(()=>{});function Up(t){try{t?Oe.storage.setItem("debug",t):Oe.storage.removeItem("debug")}catch{}}function Xp(){let t;try{t=Oe.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function Gp(){try{return localStorage}catch{}}Xr.exports=Si()(Oe);var{formatters:Hp}=Xr.exports;Hp.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Ua=y((zb,Ba)=>{"use strict";Ba.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 Pi=y((Vb,Ga)=>{"use strict";var Jp=require("os"),Xa=require("tty"),Re=Ua(),{env:ee}=process,Ze;Re("no-color")||Re("no-colors")||Re("color=false")||Re("color=never")?Ze=0:(Re("color")||Re("colors")||Re("color=true")||Re("color=always"))&&(Ze=1);"FORCE_COLOR"in ee&&(ee.FORCE_COLOR==="true"?Ze=1:ee.FORCE_COLOR==="false"?Ze=0:Ze=ee.FORCE_COLOR.length===0?1:Math.min(parseInt(ee.FORCE_COLOR,10),3));function Ei(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Ci(t,e){if(Ze===0)return 0;if(Re("color=16m")||Re("color=full")||Re("color=truecolor"))return 3;if(Re("color=256"))return 2;if(t&&!e&&Ze===void 0)return 0;let r=Ze||0;if(ee.TERM==="dumb")return r;if(process.platform==="win32"){let n=Jp.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in ee)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in ee)||ee.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in ee)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ee.TEAMCITY_VERSION)?1:0;if(ee.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ee){let n=parseInt((ee.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ee.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ee.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ee.TERM)||"COLORTERM"in ee?1:r}function Wp(t){let e=Ci(t,t&&t.isTTY);return Ei(e)}Ga.exports={supportsColor:Wp,stdout:Ei(Ci(!0,Xa.isatty(1))),stderr:Ei(Ci(!0,Xa.isatty(2)))}});var Ja=y((ne,Hr)=>{var zp=require("tty"),Gr=require("util");ne.init=t0;ne.log=Qp;ne.formatArgs=Yp;ne.save=Zp;ne.load=e0;ne.useColors=Vp;ne.destroy=Gr.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=Pi();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 Vp(){return"colors"in ne.inspectOpts?!!ne.inspectOpts.colors:zp.isatty(process.stderr.fd)}function Yp(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]=Bp()+e+" "+t[0]}function Bp(){return ne.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Up(...t){return process.stderr.write(Xr.format(...t)+`
7
- `)}function Xp(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function Gp(){return process.env.DEBUG}function Hp(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=wi()(ne);var{formatters:$a}=Gr.exports;$a.o=function(t){return this.inspectOpts.colors=this.useColors,Xr.inspect(t,this.inspectOpts).split(`
8
- `).map(e=>e.trim()).join(" ")};$a.O=function(t){return this.inspectOpts.colors=this.useColors,Xr.inspect(t,this.inspectOpts)}});var Ua=y((Tb,Ei)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Ei.exports=Ma():Ei.exports=Ba()});var Ga=y((Mb,Xa)=>{var Qt;Xa.exports=function(){if(!Qt){try{Qt=Ua()("follow-redirects")}catch{}typeof Qt!="function"&&(Qt=function(){})}Qt.apply(null,arguments)}});var Ii=y((qb,Ai)=>{var dt=require("url"),Ci=dt.URL,Wp=require("http"),zp=require("https"),za=require("stream").Writable,Ja=require("assert"),Va=Ga(),Di=["abort","aborted","connect","error","socket","timeout"],Oi=Object.create(null);Di.forEach(function(t){Oi[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}});var Jp=er("ERR_INVALID_URL","Invalid URL",TypeError),Ha=er("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Vp=er("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),Yp=er("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Kp=er("ERR_STREAM_WRITE_AFTER_END","write after end");function Ae(t,e){za.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()}Ae.prototype=Object.create(za.prototype);Ae.prototype.abort=function(){Ka(this._currentRequest),this.emit("abort")};Ae.prototype.write=function(t,e,r){if(this._ending)throw new Kp;if(!ht(t)&&!e0(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Zt(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 Yp),this.abort())};Ae.prototype.end=function(t,e,r){if(Zt(t)?(r=t,t=e=null):Zt(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}};Ae.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};Ae.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};Ae.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){Ae.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(Ae.prototype,t,{get:function(){return this._currentRequest[t]}})});Ae.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))}};Ae.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 Di)n.on(i,Oi[i]);if(this._currentUrl=/^\//.test(this._options.path)?dt.format(this._options):this._options.path,this._isRedirect){var o=0,s=this,a=this._requestBodyBuffers;(function c(d){if(n===s._currentRequest)if(d)s.emit("error",d);else if(o<a.length){var u=a[o++];n.finished||n.write(u.data,u.encoding,c)}else s._ended&&n.end()})()}};Ae.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(Ka(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects){this.emit("error",new Vp);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=[],Pi(/^content-/i,this._options.headers));var s=Pi(/^host$/i,this._options.headers),a=dt.parse(this._currentUrl),c=s||a.host,d=/^\w+:/.test(r)?this._currentUrl:dt.format(Object.assign(a,{host:c})),u;try{u=dt.resolve(d,r)}catch(b){this.emit("error",new Ha({cause:b}));return}Va("redirecting to",u),this._isRedirect=!0;var p=dt.parse(u);if(Object.assign(this._options,p),(p.protocol!==a.protocol&&p.protocol!=="https:"||p.host!==c&&!Zp(p.host,c))&&Pi(/^(?:authorization|cookie)$/i,this._options.headers),Zt(i)){var g={headers:t.headers,statusCode:e},m={url:d,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 Ha({cause:b}))}};function Ya(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(d,u,p){if(ht(d)){var g;try{g=Wa(new Ci(d))}catch{g=dt.parse(d)}if(!ht(g.protocol))throw new Jp({input:d});d=g}else Ci&&d instanceof Ci?d=Wa(d):(p=u,u=d,d={protocol:i});return Zt(u)&&(p=u,u=null),u=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},d,u),u.nativeProtocols=r,!ht(u.host)&&!ht(u.hostname)&&(u.hostname="::1"),Ja.equal(u.protocol,i,"protocol mismatch"),Va("options",u),new Ae(u,p)}function c(d,u,p){var g=s.request(d,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 Qp(){}function Wa(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 Pi(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 er(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 Ka(t){for(var e of Di)t.removeListener(e,Oi[e]);t.on("error",Qp),t.abort()}function Zp(t,e){Ja(ht(t)&&ht(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function ht(t){return typeof t=="string"||t instanceof String}function Zt(t){return typeof t=="function"}function e0(t){return typeof t=="object"&&"length"in t}Ai.exports=Ya({http:Wp,https:zp});Ai.exports.wrap=Ya});var Ri=y((Nb,t0)=>{t0.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 nc=y((jb,rc)=>{"use strict";var tr=pe(),Qa=gi(),r0=yi(),n0=Mr(),i0=require("http"),o0=require("https"),s0=Ii().http,a0=Ii().https,Za=require("url"),c0=require("zlib"),u0=Ri(),Hr=jr(),Fi=Nr(),ec=/https:?/;function tc(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,tc(o,e,o.href)}}rc.exports=function(e){return new Promise(function(n,i){var o=function(A){n(A)},s=function(A){i(A)},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/"+u0.version,a&&!tr.isStream(a)){if(!Buffer.isBuffer(a))if(tr.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(tr.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 d=void 0;if(e.auth){var u=e.auth.username||"",p=e.auth.password||"";d=u+":"+p}var g=r0(e.baseURL,e.url),m=Za.parse(g),b=m.protocol||"http:";if(!d&&m.auth){var C=m.auth.split(":"),P=C[0]||"",F=C[1]||"";d=P+":"+F}d&&delete c.Authorization;var N=ec.test(b),G=N?e.httpsAgent:e.httpAgent,B={path:n0(m.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:c,agent:G,agents:{http:e.httpAgent,https:e.httpsAgent},auth:d};e.socketPath?B.socketPath=e.socketPath:(B.hostname=m.hostname,B.port=m.port);var J=e.proxy;if(!J&&J!==!1){var ae=b.slice(0,-1)+"_proxy",be=process.env[ae]||process.env[ae.toUpperCase()];if(be){var K=Za.parse(be),w=process.env.no_proxy||process.env.NO_PROXY,x=!0;if(w){var E=w.split(",").map(function(A){return A.trim()});x=!E.some(function(A){return A?A==="*"||A[0]==="."&&m.hostname.substr(m.hostname.length-A.length)===A?!0:m.hostname===A:!1})}if(x&&(J={host:K.hostname,port:K.port,protocol:K.protocol},K.auth)){var X=K.auth.split(":");J.auth={username:X[0],password:X[1]}}}}J&&(B.headers.host=m.hostname+(m.port?":"+m.port:""),tc(B,J,b+"//"+m.hostname+(m.port?":"+m.port:"")+B.path));var R,L=N&&(J?ec.test(J.protocol):!0);e.transport?R=e.transport:e.maxRedirects===0?R=L?o0:i0:(e.maxRedirects&&(B.maxRedirects=e.maxRedirects),R=L?a0:s0),e.maxBodyLength>-1&&(B.maxBodyLength=e.maxBodyLength);var I=R.request(B,function(A){if(!I.aborted){var T=A,Me=A.req||I;if(A.statusCode!==204&&Me.method!=="HEAD"&&e.decompress!==!1)switch(A.headers["content-encoding"]){case"gzip":case"compress":case"deflate":T=T.pipe(c0.createUnzip()),delete A.headers["content-encoding"];break}var Ge={status:A.statusCode,statusText:A.statusMessage,headers:A.headers,config:e,request:Me};if(e.responseType==="stream")Ge.data=T,Qa(o,s,Ge);else{var Z=[],ce=0;T.on("data",function(we){Z.push(we),ce+=we.length,e.maxContentLength>-1&&ce>e.maxContentLength&&(T.destroy(),s(Hr("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,Me)))}),T.on("error",function(we){I.aborted||s(Fi(we,e,null,Me))}),T.on("end",function(){var we=Buffer.concat(Z);e.responseType!=="arraybuffer"&&(we=we.toString(e.responseEncoding),(!e.responseEncoding||e.responseEncoding==="utf8")&&(we=tr.stripBOM(we))),Ge.data=we,Qa(o,s,Ge)})}}});if(I.on("error",function(A){I.aborted&&A.code!=="ERR_FR_TOO_MANY_REDIRECTS"||s(Fi(A,e,null,I))}),e.timeout){var $=parseInt(e.timeout,10);if(isNaN($)){s(Hr("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",I));return}I.setTimeout($,function(){I.abort(),s(Hr("timeout of "+$+"ms exceeded",e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",I))})}e.cancelToken&&e.cancelToken.promise.then(function(A){I.aborted||(I.abort(),s(A))}),tr.isStream(a)?a.on("error",function(A){s(Fi(A,e,null,I))}).pipe(I):I.end(a)})}});var zr=y((Lb,sc)=>{"use strict";var ie=pe(),ic=pa(),l0=Nr(),f0={"Content-Type":"application/x-www-form-urlencoded"};function oc(t,e){!ie.isUndefined(t)&&ie.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function d0(){var t;return typeof XMLHttpRequest<"u"?t=Ra():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(t=nc()),t}function h0(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 Wr={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:d0(),transformRequest:[function(e,r){return ic(r,"Accept"),ic(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)?(oc(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):ie.isObject(e)||r&&r["Content-Type"]==="application/json"?(oc(r,"application/json"),h0(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"?l0(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}};Wr.headers={common:{Accept:"application/json, text/plain, */*"}};ie.forEach(["delete","get","head"],function(e){Wr.headers[e]={}});ie.forEach(["post","put","patch"],function(e){Wr.headers[e]=ie.merge(f0)});sc.exports=Wr});var cc=y(($b,ac)=>{"use strict";var p0=pe(),m0=zr();ac.exports=function(e,r,n){var i=this||m0;return p0.forEach(n,function(s){e=s.call(i,e,r)}),e}});var ki=y((Bb,uc)=>{"use strict";uc.exports=function(e){return!!(e&&e.__CANCEL__)}});var dc=y((Ub,fc)=>{"use strict";var lc=pe(),Ti=cc(),g0=ki(),y0=zr();function Mi(t){t.cancelToken&&t.cancelToken.throwIfRequested()}fc.exports=function(e){Mi(e),e.headers=e.headers||{},e.data=Ti.call(e,e.data,e.headers,e.transformRequest),e.headers=lc.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),lc.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var r=e.adapter||y0.adapter;return r(e).then(function(i){return Mi(e),i.data=Ti.call(e,i.data,i.headers,e.transformResponse),i},function(i){return g0(i)||(Mi(e),i&&i.response&&(i.response.data=Ti.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})}});var qi=y((Xb,hc)=>{"use strict";var le=pe();hc.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 le.isPlainObject(g)&&le.isPlainObject(m)?le.merge(g,m):le.isPlainObject(m)?le.merge({},m):le.isArray(m)?m.slice():m}function d(g){le.isUndefined(r[g])?le.isUndefined(e[g])||(n[g]=c(void 0,e[g])):n[g]=c(e[g],r[g])}le.forEach(i,function(m){le.isUndefined(r[m])||(n[m]=c(void 0,r[m]))}),le.forEach(o,d),le.forEach(s,function(m){le.isUndefined(r[m])?le.isUndefined(e[m])||(n[m]=c(void 0,e[m])):n[m]=c(void 0,r[m])}),le.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 le.forEach(p,d),n}});var vc=y((Gb,yc)=>{"use strict";var mc=Ri(),Ni={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Ni[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var pc={},v0=mc.version.split(".");function gc(t,e){for(var r=e?e.split("."):v0,n=t.split("."),i=0;i<3;i++){if(r[i]>n[i])return!0;if(r[i]<n[i])return!1}return!1}Ni.transitional=function(e,r,n){var i=r&&gc(r);function o(s,a){return"[Axios v"+mc.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&&!pc[a]&&(pc[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 b0(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)}}yc.exports={isOlderVersion:gc,assertOptions:b0,validators:Ni}});var Ec=y((Hb,Sc)=>{"use strict";var _c=pe(),w0=Mr(),bc=da(),wc=dc(),Jr=qi(),xc=vc(),Ot=xc.validators;function rr(t){this.defaults=t,this.interceptors={request:new bc,response:new bc}}rr.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=Jr(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&&xc.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=[wc,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 d=n.shift(),u=n.shift();try{c=d(c)}catch(p){u(p);break}}try{s=wc(c)}catch(p){return Promise.reject(p)}for(;o.length;)s=s.then(o.shift(),o.shift());return s};rr.prototype.getUri=function(e){return e=Jr(this.defaults,e),w0(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};_c.forEach(["delete","get","head","options"],function(e){rr.prototype[e]=function(r,n){return this.request(Jr(n||{},{method:e,url:r,data:(n||{}).data}))}});_c.forEach(["post","put","patch"],function(e){rr.prototype[e]=function(r,n,i){return this.request(Jr(i||{},{method:e,url:r,data:n}))}});Sc.exports=rr});var Li=y((Wb,Cc)=>{"use strict";function ji(t){this.message=t}ji.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};ji.prototype.__CANCEL__=!0;Cc.exports=ji});var Dc=y((zb,Pc)=>{"use strict";var _0=Li();function Vr(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 _0(i),e(r.reason))})}Vr.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};Vr.source=function(){var e,r=new Vr(function(i){e=i});return{token:r,cancel:e}};Pc.exports=Vr});var Ac=y((Jb,Oc)=>{"use strict";Oc.exports=function(e){return function(n){return e.apply(null,n)}}});var Rc=y((Vb,Ic)=>{"use strict";Ic.exports=function(e){return typeof e=="object"&&e.isAxiosError===!0}});var Tc=y((Yb,$i)=>{"use strict";var Fc=pe(),x0=fi(),Yr=Ec(),S0=qi(),E0=zr();function kc(t){var e=new Yr(t),r=x0(Yr.prototype.request,e);return Fc.extend(r,Yr.prototype,e),Fc.extend(r,e),r}var Ne=kc(E0);Ne.Axios=Yr;Ne.create=function(e){return kc(S0(Ne.defaults,e))};Ne.Cancel=Li();Ne.CancelToken=Dc();Ne.isCancel=ki();Ne.all=function(e){return Promise.all(e)};Ne.spread=Ac();Ne.isAxiosError=Rc();$i.exports=Ne;$i.exports.default=Ne});var Bi=y((Kb,Mc)=>{Mc.exports=Tc()});var Nc=y((Qb,qc)=>{"use strict";var C0=/[|\\{}()[\]^$+*?.]/g;qc.exports=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(C0,"\\$&")}});var Lc=y((Zb,jc)=>{"use strict";jc.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 Ui=y((e2,Xc)=>{var pt=Lc(),Uc={};for(Kr in pt)pt.hasOwnProperty(Kr)&&(Uc[pt[Kr]]=Kr);var Kr,D=Xc.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(me in D)if(D.hasOwnProperty(me)){if(!("channels"in D[me]))throw new Error("missing channels property: "+me);if(!("labels"in D[me]))throw new Error("missing channel labels property: "+me);if(D[me].labels.length!==D[me].channels)throw new Error("channel and label counts mismatch: "+me);$c=D[me].channels,Bc=D[me].labels,delete D[me].channels,delete D[me].labels,Object.defineProperty(D[me],"channels",{value:$c}),Object.defineProperty(D[me],"labels",{value:Bc})}var $c,Bc,me;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,d;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),d=(i+o)/2,o===i?c=0:d<=.5?c=s/(o+i):c=s/(2-o-i),[a,c*100,d*100]};D.rgb.hsv=function(t){var e,r,n,i,o,s=t[0]/255,a=t[1]/255,c=t[2]/255,d=Math.max(s,a,c),u=d-Math.min(s,a,c),p=function(g){return(d-g)/6/u+1/2};return u===0?i=o=0:(o=u/d,e=p(s),r=p(a),n=p(c),s===d?i=n-r:a===d?i=1/3+e-n:c===d&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,d*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 P0(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=Uc[t];if(e)return e;var r=1/0,n;for(var i in pt)if(pt.hasOwnProperty(i)){var o=pt[i],s=P0(t,o);s<r&&(r=s,n=i)}return n};D.keyword.rgb=function(t){return pt[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 d=0;d<3;d++)s=e+1/3*-(d-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[d]=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 d,u,p;switch(o){default:case 6:case 0:d=s,u=c,p=r;break;case 1:d=c,u=s,p=r;break;case 2:d=r,u=s,p=c;break;case 3:d=r,u=c,p=s;break;case 4:d=c,u=r,p=s;break;case 5:d=s,u=r,p=c;break}return[d*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),d=Math.pow(s,3);return o=a>.008856?a:(o-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,s=d>.008856?d:(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 Hc=y((t2,Gc)=>{var Qr=Ui();function D0(){for(var t={},e=Object.keys(Qr),r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function O0(t){var e=D0(),r=[t];for(e[t].distance=0;r.length;)for(var n=r.pop(),i=Object.keys(Qr[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 A0(t,e){return function(r){return e(t(r))}}function I0(t,e){for(var r=[e[t].parent,t],n=Qr[e[t].parent][t],i=e[t].parent;e[i].parent;)r.unshift(e[i].parent),n=A0(Qr[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}Gc.exports=function(t){for(var e=O0(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]=I0(s,e))}return r}});var zc=y((r2,Wc)=>{var Xi=Ui(),R0=Hc(),At={},F0=Object.keys(Xi);function k0(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 T0(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}F0.forEach(function(t){At[t]={},Object.defineProperty(At[t],"channels",{value:Xi[t].channels}),Object.defineProperty(At[t],"labels",{value:Xi[t].labels});var e=R0(t),r=Object.keys(e);r.forEach(function(n){var i=e[n];At[t][n]=T0(i),At[t][n].raw=k0(i)})});Wc.exports=At});var Vc=y((n2,Jc)=>{"use strict";var It=zc(),Zr=(t,e)=>function(){return`\x1B[${t.apply(It,arguments)+e}m`},en=(t,e)=>function(){let r=t.apply(It,arguments);return`\x1B[${38+e};5;${r}m`},tn=(t,e)=>function(){let r=t.apply(It,arguments);return`\x1B[${38+e};2;${r[0]};${r[1]};${r[2]}m`};function M0(){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:Zr(r,0)},e.color.ansi256={ansi256:en(r,0)},e.color.ansi16m={rgb:tn(n,0)},e.bgColor.ansi={ansi:Zr(r,10)},e.bgColor.ansi256={ansi256:en(r,10)},e.bgColor.ansi16m={rgb:tn(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]=Zr(o.ansi16,0),e.bgColor.ansi[i]=Zr(o.ansi16,10)),"ansi256"in o&&(e.color.ansi256[i]=en(o.ansi256,0),e.bgColor.ansi256[i]=en(o.ansi256,10)),"rgb"in o&&(e.color.ansi16m[i]=tn(o.rgb,0),e.bgColor.ansi16m[i]=tn(o.rgb,10))}return e}Object.defineProperty(Jc,"exports",{enumerable:!0,get:M0})});var Kc=y((i2,Yc)=>{"use strict";Yc.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 Zc=y((o2,Qc)=>{"use strict";var q0=require("os"),je=Kc(),fe=process.env,Rt;je("no-color")||je("no-colors")||je("color=false")?Rt=!1:(je("color")||je("colors")||je("color=true")||je("color=always"))&&(Rt=!0);"FORCE_COLOR"in fe&&(Rt=fe.FORCE_COLOR.length===0||parseInt(fe.FORCE_COLOR,10)!==0);function N0(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function j0(t){if(Rt===!1)return 0;if(je("color=16m")||je("color=full")||je("color=truecolor"))return 3;if(je("color=256"))return 2;if(t&&!t.isTTY&&Rt!==!0)return 0;let e=Rt?1:0;if(process.platform==="win32"){let r=q0.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 fe)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in fe)||fe.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in fe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(fe.TEAMCITY_VERSION)?1:0;if(fe.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in fe){let r=parseInt((fe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(fe.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(fe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(fe.TERM)||"COLORTERM"in fe?1:(fe.TERM==="dumb",e)}function Gi(t){let e=j0(t);return N0(e)}Qc.exports={supportsColor:Gi,stdout:Gi(process.stdout),stderr:Gi(process.stderr)}});var iu=y((s2,nu)=>{"use strict";var L0=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,eu=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,$0=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,B0=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,U0=new Map([["n",`
9
- `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function ru(t){return t[0]==="u"&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):U0.get(t)||t}function X0(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($0))r.push(i[2].replace(B0,(s,a,c)=>a?ru(a):c));else throw new Error(`Invalid Chalk template style argument: ${o} (in style '${t}')`);return r}function G0(t){eu.lastIndex=0;let e=[],r;for(;(r=eu.exec(t))!==null;){let n=r[1];if(r[2]){let i=X0(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function tu(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}nu.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(L0,(o,s,a,c,d,u)=>{if(s)i.push(ru(s));else if(c){let p=i.join("");i=[],n.push(r.length===0?p:tu(t,r)(p)),r.push({inverse:a,styles:G0(c)})}else if(d){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(tu(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 or=y((a2,ir)=>{"use strict";var Wi=Nc(),Y=Vc(),Hi=Zc().stdout,H0=iu(),su=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),au=["ansi","ansi","ansi256","ansi16m"],cu=new Set(["gray"]),Ft=Object.create(null);function ou(t,e){e=e||{};let r=Hi?Hi.level:0;t.level=e.level===void 0?r:e.level,t.enabled="enabled"in e?e.enabled:t.level>0}function nr(t){if(!this||!(this instanceof nr)||this.template){let e={};return ou(e,t),e.template=function(){let r=[].slice.call(arguments);return J0.apply(null,[e.template].concat(r))},Object.setPrototypeOf(e,nr.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=nr,e.template}ou(this,t)}su&&(Y.blue.open="\x1B[94m");for(let t of Object.keys(Y))Y[t].closeRe=new RegExp(Wi(Y[t].close),"g"),Ft[t]={get(){let e=Y[t];return rn.call(this,this._styles?this._styles.concat(e):[e],this._empty,t)}};Ft.visible={get(){return rn.call(this,this._styles||[],!0,"visible")}};Y.color.closeRe=new RegExp(Wi(Y.color.close),"g");for(let t of Object.keys(Y.color.ansi))cu.has(t)||(Ft[t]={get(){let e=this.level;return function(){let n={open:Y.color[au[e]][t].apply(null,arguments),close:Y.color.close,closeRe:Y.color.closeRe};return rn.call(this,this._styles?this._styles.concat(n):[n],this._empty,t)}}});Y.bgColor.closeRe=new RegExp(Wi(Y.bgColor.close),"g");for(let t of Object.keys(Y.bgColor.ansi)){if(cu.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[au[r]][t].apply(null,arguments),close:Y.bgColor.close,closeRe:Y.bgColor.closeRe};return rn.call(this,this._styles?this._styles.concat(i):[i],this._empty,t)}}}}var W0=Object.defineProperties(()=>{},Ft);function rn(t,e,r){let n=function(){return z0.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__=W0,n}function z0(){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;su&&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 J0(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 H0(t,n.join(""))}Object.defineProperties(nr.prototype,Ft);ir.exports=nr();ir.exports.supportsColor=Hi;ir.exports.default=ir.exports});var xe=y(Ji=>{"use strict";Ji.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})};Ji.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 du=y((l2,fu)=>{var et=require("constants"),V0=process.cwd,nn=null,Y0=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return nn||(nn=V0.call(process)),nn};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Vi=process.chdir,process.chdir=function(t){nn=null,Vi.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Vi));var Vi;fu.exports=K0;function K0(t){et.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(){}),Y0==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(u){function p(g,m,b){var C=Date.now(),P=0;u(g,m,function F(N){if(N&&(N.code==="EACCES"||N.code==="EPERM")&&Date.now()-C<6e4){setTimeout(function(){t.stat(m,function(G,B){G&&G.code==="ENOENT"?u(g,m,F):b(N)})},P),P<100&&(P+=10);return}b&&b(N)})}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,C,P,F){var N;if(F&&typeof F=="function"){var G=0;N=function(B,J,ae){if(B&&B.code==="EAGAIN"&&G<10)return G++,u.call(t,g,m,b,C,P,N);F.apply(this,arguments)}}return u.call(t,g,m,b,C,P,N)}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,C){for(var P=0;;)try{return u.call(t,p,g,m,b,C)}catch(F){if(F.code==="EAGAIN"&&P<10){P++;continue}throw F}}}(t.readSync);function e(u){u.lchmod=function(p,g,m){u.open(p,et.O_WRONLY|et.O_SYMLINK,g,function(b,C){if(b){m&&m(b);return}u.fchmod(C,g,function(P){u.close(C,function(F){m&&m(P||F)})})})},u.lchmodSync=function(p,g){var m=u.openSync(p,et.O_WRONLY|et.O_SYMLINK,g),b=!0,C;try{C=u.fchmodSync(m,g),b=!1}finally{if(b)try{u.closeSync(m)}catch{}else u.closeSync(m)}return C}}function r(u){et.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(p,g,m,b){u.open(p,et.O_SYMLINK,function(C,P){if(C){b&&b(C);return}u.futimes(P,g,m,function(F){u.close(P,function(N){b&&b(F||N)})})})},u.lutimesSync=function(p,g,m){var b=u.openSync(p,et.O_SYMLINK),C,P=!0;try{C=u.futimesSync(b,g,m),P=!1}finally{if(P)try{u.closeSync(b)}catch{}else u.closeSync(b)}return C}):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){d(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(!d(m))throw m}}}function o(u){return u&&function(p,g,m,b){return u.call(t,p,g,m,function(C){d(C)&&(C=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(!d(b))throw b}}}function a(u){return u&&function(p,g,m){typeof g=="function"&&(m=g,g=null);function b(C,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 d(u){if(!u||u.code==="ENOSYS")return!0;var p=!process.getuid||process.getuid()!==0;return!!(p&&(u.code==="EINVAL"||u.code==="EPERM"))}}});var mu=y((f2,pu)=>{var hu=require("stream").Stream;pu.exports=Q0;function Q0(t){return{ReadStream:e,WriteStream:r};function e(n,i){if(!(this instanceof e))return new e(n,i);hu.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 d=s[a];this[d]=i[d]}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);hu.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 yu=y((d2,gu)=>{"use strict";gu.exports=em;var Z0=Object.getPrototypeOf||function(t){return t.__proto__};function em(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:Z0(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}});var de=y((h2,Qi)=>{var z=require("fs"),tm=du(),rm=mu(),nm=yu(),on=require("util"),oe,an;typeof Symbol=="function"&&typeof Symbol.for=="function"?(oe=Symbol.for("graceful-fs.queue"),an=Symbol.for("graceful-fs.previous")):(oe="___graceful-fs.queue",an="___graceful-fs.previous");function im(){}function wu(t,e){Object.defineProperty(t,oe,{get:function(){return e}})}var mt=im;on.debuglog?mt=on.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(mt=function(){var t=on.format.apply(on,arguments);t="GFS4: "+t.split(/\n/).join(`
10
- GFS4: `),console.error(t)});z[oe]||(vu=global[oe]||[],wu(z,vu),z.close=function(t){function e(r,n){return t.call(z,r,function(i){i||bu(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,an,{value:t}),e}(z.close),z.closeSync=function(t){function e(r){t.apply(z,arguments),bu()}return Object.defineProperty(e,an,{value:t}),e}(z.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){mt(z[oe]),require("assert").equal(z[oe].length,0)}));var vu;global[oe]||wu(global,z[oe]);Qi.exports=Yi(nm(z));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!z.__patched&&(Qi.exports=Yi(z),z.__patched=!0);function Yi(t){tm(t),t.gracefulify=Yi,t.createReadStream=J,t.createWriteStream=ae;var e=t.readFile;t.readFile=r;function r(w,x,E){return typeof x=="function"&&(E=x,x=null),X(w,x,E);function X(R,L,I,$){return e(R,L,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Tt([X,[R,L,I],k,$||Date.now(),Date.now()]):typeof I=="function"&&I.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=i;function i(w,x,E,X){return typeof E=="function"&&(X=E,E=null),R(w,x,E,X);function R(L,I,$,k,A){return n(L,I,$,function(T){T&&(T.code==="EMFILE"||T.code==="ENFILE")?Tt([R,[L,I,$,k],T,A||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments)})}}var o=t.appendFile;o&&(t.appendFile=s);function s(w,x,E,X){return typeof E=="function"&&(X=E,E=null),R(w,x,E,X);function R(L,I,$,k,A){return o(L,I,$,function(T){T&&(T.code==="EMFILE"||T.code==="ENFILE")?Tt([R,[L,I,$,k],T,A||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=c);function c(w,x,E,X){return typeof E=="function"&&(X=E,E=0),R(w,x,E,X);function R(L,I,$,k,A){return a(L,I,$,function(T){T&&(T.code==="EMFILE"||T.code==="ENFILE")?Tt([R,[L,I,$,k],T,A||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments)})}}var d=t.readdir;t.readdir=p;var u=/^v[0-5]\./;function p(w,x,E){typeof x=="function"&&(E=x,x=null);var X=u.test(process.version)?function(I,$,k,A){return d(I,R(I,$,k,A))}:function(I,$,k,A){return d(I,$,R(I,$,k,A))};return X(w,x,E);function R(L,I,$,k){return function(A,T){A&&(A.code==="EMFILE"||A.code==="ENFILE")?Tt([X,[L,I,$],A,k||Date.now(),Date.now()]):(T&&T.sort&&T.sort(),typeof $=="function"&&$.call(this,A,T))}}}if(process.version.substr(0,4)==="v0.8"){var g=rm(t);F=g.ReadStream,G=g.WriteStream}var m=t.ReadStream;m&&(F.prototype=Object.create(m.prototype),F.prototype.open=N);var b=t.WriteStream;b&&(G.prototype=Object.create(b.prototype),G.prototype.open=B),Object.defineProperty(t,"ReadStream",{get:function(){return F},set:function(w){F=w},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return G},set:function(w){G=w},enumerable:!0,configurable:!0});var C=F;Object.defineProperty(t,"FileReadStream",{get:function(){return C},set:function(w){C=w},enumerable:!0,configurable:!0});var P=G;Object.defineProperty(t,"FileWriteStream",{get:function(){return P},set:function(w){P=w},enumerable:!0,configurable:!0});function F(w,x){return this instanceof F?(m.apply(this,arguments),this):F.apply(Object.create(F.prototype),arguments)}function N(){var w=this;K(w.path,w.flags,w.mode,function(x,E){x?(w.autoClose&&w.destroy(),w.emit("error",x)):(w.fd=E,w.emit("open",E),w.read())})}function G(w,x){return this instanceof G?(b.apply(this,arguments),this):G.apply(Object.create(G.prototype),arguments)}function B(){var w=this;K(w.path,w.flags,w.mode,function(x,E){x?(w.destroy(),w.emit("error",x)):(w.fd=E,w.emit("open",E))})}function J(w,x){return new t.ReadStream(w,x)}function ae(w,x){return new t.WriteStream(w,x)}var be=t.open;t.open=K;function K(w,x,E,X){return typeof E=="function"&&(X=E,E=null),R(w,x,E,X);function R(L,I,$,k,A){return be(L,I,$,function(T,Me){T&&(T.code==="EMFILE"||T.code==="ENFILE")?Tt([R,[L,I,$,k],T,A||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments)})}}return t}function Tt(t){mt("ENQUEUE",t[0].name,t[1]),z[oe].push(t),Ki()}var sn;function bu(){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);Ki()}function Ki(){if(clearTimeout(sn),sn=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)mt("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-i>=6e4){mt("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),d=Math.min(c*1.2,100);a>=d?(mt("RETRY",e.name,r),e.apply(null,r.concat([i]))):z[oe].push(t)}sn===void 0&&(sn=setTimeout(Ki,0))}}});var sr=y(tt=>{"use strict";var _u=xe().fromCallback,ge=de(),om=["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 ge[t]=="function");Object.keys(ge).forEach(t=>{t!=="promises"&&(tt[t]=ge[t])});om.forEach(t=>{tt[t]=_u(ge[t])});tt.exists=function(t,e){return typeof e=="function"?ge.exists(t,e):new Promise(r=>ge.exists(t,r))};tt.read=function(t,e,r,n,i,o){return typeof o=="function"?ge.read(t,e,r,n,i,o):new Promise((s,a)=>{ge.read(t,e,r,n,i,(c,d,u)=>{if(c)return a(c);s({bytesRead:d,buffer:u})})})};tt.write=function(t,e,...r){return typeof r[r.length-1]=="function"?ge.write(t,e,...r):new Promise((n,i)=>{ge.write(t,e,...r,(o,s,a)=>{if(o)return i(o);n({bytesWritten:s,buffer:a})})})};typeof ge.writev=="function"&&(tt.writev=function(t,e,...r){return typeof r[r.length-1]=="function"?ge.writev(t,e,...r):new Promise((n,i)=>{ge.writev(t,e,...r,(o,s,a)=>{if(o)return i(o);n({bytesWritten:s,buffers:a})})})});typeof ge.realpath.native=="function"&&(tt.realpath.native=_u(ge.realpath.native))});var Zi=y((m2,xu)=>{xu.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 Du=y((g2,eo)=>{"use strict";var Mt=sr(),Ve=require("path"),sm=Zi(),Su=sm("10.12.0"),Eu=t=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(t.replace(Ve.parse(t).root,""))){let r=new Error(`Path contains invalid characters: ${t}`);throw r.code="EINVAL",r}},Cu=t=>{let e={mode:511};return typeof t=="number"&&(t={mode:t}),{...e,...t}},Pu=t=>{let e=new Error(`operation not permitted, mkdir '${t}'`);return e.code="EPERM",e.errno=-4048,e.path=t,e.syscall="mkdir",e};eo.exports.makeDir=async(t,e)=>{if(Eu(t),e=Cu(e),Su){let n=Ve.resolve(t);return Mt.mkdir(n,{mode:e.mode,recursive:!0})}let r=async n=>{try{await Mt.mkdir(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(Ve.dirname(n)===n)throw Pu(n);if(i.message.includes("null bytes"))throw i;return await r(Ve.dirname(n)),r(n)}try{if(!(await Mt.stat(n)).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(Ve.resolve(t))};eo.exports.makeDirSync=(t,e)=>{if(Eu(t),e=Cu(e),Su){let n=Ve.resolve(t);return Mt.mkdirSync(n,{mode:e.mode,recursive:!0})}let r=n=>{try{Mt.mkdirSync(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(Ve.dirname(n)===n)throw Pu(n);if(i.message.includes("null bytes"))throw i;return r(Ve.dirname(n)),r(n)}try{if(!Mt.statSync(n).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(Ve.resolve(t))}});var Le=y((y2,Ou)=>{"use strict";var am=xe().fromPromise,{makeDir:cm,makeDirSync:to}=Du(),ro=am(cm);Ou.exports={mkdirs:ro,mkdirsSync:to,mkdirp:ro,mkdirpSync:to,ensureDir:ro,ensureDirSync:to}});var no=y((v2,Au)=>{"use strict";var qt=de();function um(t,e,r,n){qt.open(t,"r+",(i,o)=>{if(i)return n(i);qt.futimes(o,e,r,s=>{qt.close(o,a=>{n&&n(s||a)})})})}function lm(t,e,r){let n=qt.openSync(t,"r+");return qt.futimesSync(n,e,r),qt.closeSync(n)}Au.exports={utimesMillis:um,utimesMillisSync:lm}});var ar=y((b2,ku)=>{"use strict";var Nt=sr(),Se=require("path"),fm=require("util"),dm=Zi(),cn=dm("10.5.0"),Iu=t=>cn?Nt.stat(t,{bigint:!0}):Nt.stat(t),io=t=>cn?Nt.statSync(t,{bigint:!0}):Nt.statSync(t);function hm(t,e){return Promise.all([Iu(t),Iu(e).catch(r=>{if(r.code==="ENOENT")return null;throw r})]).then(([r,n])=>({srcStat:r,destStat:n}))}function pm(t,e){let r,n=io(t);try{r=io(e)}catch(i){if(i.code==="ENOENT")return{srcStat:n,destStat:null};throw i}return{srcStat:n,destStat:r}}function mm(t,e,r,n){fm.callbackify(hm)(t,e,(i,o)=>{if(i)return n(i);let{srcStat:s,destStat:a}=o;return a&&un(s,a)?n(new Error("Source and destination must not be the same.")):s.isDirectory()&&oo(t,e)?n(new Error(ln(t,e,r))):n(null,{srcStat:s,destStat:a})})}function gm(t,e,r){let{srcStat:n,destStat:i}=pm(t,e);if(i&&un(n,i))throw new Error("Source and destination must not be the same.");if(n.isDirectory()&&oo(t,e))throw new Error(ln(t,e,r));return{srcStat:n,destStat:i}}function Ru(t,e,r,n,i){let o=Se.resolve(Se.dirname(t)),s=Se.resolve(Se.dirname(r));if(s===o||s===Se.parse(s).root)return i();let a=(c,d)=>c?c.code==="ENOENT"?i():i(c):un(e,d)?i(new Error(ln(t,r,n))):Ru(t,e,s,n,i);cn?Nt.stat(s,{bigint:!0},a):Nt.stat(s,a)}function Fu(t,e,r,n){let i=Se.resolve(Se.dirname(t)),o=Se.resolve(Se.dirname(r));if(o===i||o===Se.parse(o).root)return;let s;try{s=io(o)}catch(a){if(a.code==="ENOENT")return;throw a}if(un(e,s))throw new Error(ln(t,r,n));return Fu(t,e,o,n)}function un(t,e){return!!(e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev&&(cn||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 oo(t,e){let r=Se.resolve(t).split(Se.sep).filter(i=>i),n=Se.resolve(e).split(Se.sep).filter(i=>i);return r.reduce((i,o,s)=>i&&n[s]===o,!0)}function ln(t,e,r){return`Cannot ${r} '${t}' to a subdirectory of itself, '${e}'.`}ku.exports={checkPaths:mm,checkPathsSync:gm,checkParentPaths:Ru,checkParentPathsSync:Fu,isSrcSubdir:oo}});var ju=y((w2,Nu)=>{"use strict";var he=de(),cr=require("path"),ym=Le().mkdirsSync,vm=no().utimesMillisSync,ur=ar();function bm(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+"+Hr.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Kp()+e+" "+t[0]}function Kp(){return ne.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Qp(...t){return process.stderr.write(Gr.format(...t)+`
7
+ `)}function Zp(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function e0(){return process.env.DEBUG}function t0(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]]}Hr.exports=Si()(ne);var{formatters:Ha}=Hr.exports;Ha.o=function(t){return this.inspectOpts.colors=this.useColors,Gr.inspect(t,this.inspectOpts).split(`
8
+ `).map(e=>e.trim()).join(" ")};Ha.O=function(t){return this.inspectOpts.colors=this.useColors,Gr.inspect(t,this.inspectOpts)}});var Wa=y((Yb,Di)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Di.exports=$a():Di.exports=Ja()});var Va=y((Kb,za)=>{var er;za.exports=function(){if(!er){try{er=Wa()("follow-redirects")}catch{}typeof er!="function"&&(er=function(){})}er.apply(null,arguments)}});var ki=y((Qb,Fi)=>{var dt=require("url"),Oi=dt.URL,r0=require("http"),n0=require("https"),Qa=require("stream").Writable,Za=require("assert"),ec=Va(),Ii=["abort","aborted","connect","error","socket","timeout"],Ri=Object.create(null);Ii.forEach(function(t){Ri[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}});var i0=rr("ERR_INVALID_URL","Invalid URL",TypeError),Ya=rr("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),o0=rr("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),s0=rr("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),a0=rr("ERR_STREAM_WRITE_AFTER_END","write after end");function Ae(t,e){Qa.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()}Ae.prototype=Object.create(Qa.prototype);Ae.prototype.abort=function(){rc(this._currentRequest),this.emit("abort")};Ae.prototype.write=function(t,e,r){if(this._ending)throw new a0;if(!ht(t)&&!l0(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(tr(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 s0),this.abort())};Ae.prototype.end=function(t,e,r){if(tr(t)?(r=t,t=e=null):tr(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}};Ae.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};Ae.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};Ae.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){Ae.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(Ae.prototype,t,{get:function(){return this._currentRequest[t]}})});Ae.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))}};Ae.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 Ii)n.on(i,Ri[i]);if(this._currentUrl=/^\//.test(this._options.path)?dt.format(this._options):this._options.path,this._isRedirect){var o=0,s=this,a=this._requestBodyBuffers;(function c(d){if(n===s._currentRequest)if(d)s.emit("error",d);else if(o<a.length){var u=a[o++];n.finished||n.write(u.data,u.encoding,c)}else s._ended&&n.end()})()}};Ae.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(rc(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects){this.emit("error",new o0);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=[],Ai(/^content-/i,this._options.headers));var s=Ai(/^host$/i,this._options.headers),a=dt.parse(this._currentUrl),c=s||a.host,d=/^\w+:/.test(r)?this._currentUrl:dt.format(Object.assign(a,{host:c})),u;try{u=dt.resolve(d,r)}catch(b){this.emit("error",new Ya({cause:b}));return}ec("redirecting to",u),this._isRedirect=!0;var p=dt.parse(u);if(Object.assign(this._options,p),(p.protocol!==a.protocol&&p.protocol!=="https:"||p.host!==c&&!u0(p.host,c))&&Ai(/^(?:authorization|cookie)$/i,this._options.headers),tr(i)){var g={headers:t.headers,statusCode:e},m={url:d,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 Ya({cause:b}))}};function tc(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(d,u,p){if(ht(d)){var g;try{g=Ka(new Oi(d))}catch{g=dt.parse(d)}if(!ht(g.protocol))throw new i0({input:d});d=g}else Oi&&d instanceof Oi?d=Ka(d):(p=u,u=d,d={protocol:i});return tr(u)&&(p=u,u=null),u=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},d,u),u.nativeProtocols=r,!ht(u.host)&&!ht(u.hostname)&&(u.hostname="::1"),Za.equal(u.protocol,i,"protocol mismatch"),ec("options",u),new Ae(u,p)}function c(d,u,p){var g=s.request(d,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 c0(){}function Ka(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 Ai(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 rr(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 rc(t){for(var e of Ii)t.removeListener(e,Ri[e]);t.on("error",c0),t.abort()}function u0(t,e){Za(ht(t)&&ht(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function ht(t){return typeof t=="string"||t instanceof String}function tr(t){return typeof t=="function"}function l0(t){return typeof t=="object"&&"length"in t}Fi.exports=tc({http:r0,https:n0});Fi.exports.wrap=tc});var Ti=y((Zb,f0)=>{f0.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 cc=y((e2,ac)=>{"use strict";var nr=pe(),nc=bi(),d0=wi(),h0=qr(),p0=require("http"),m0=require("https"),g0=ki().http,y0=ki().https,ic=require("url"),v0=require("zlib"),b0=Ti(),Jr=Lr(),Mi=jr(),oc=/https:?/;function sc(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,sc(o,e,o.href)}}ac.exports=function(e){return new Promise(function(n,i){var o=function(A){n(A)},s=function(A){i(A)},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/"+b0.version,a&&!nr.isStream(a)){if(!Buffer.isBuffer(a))if(nr.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(nr.isString(a))a=Buffer.from(a,"utf-8");else return s(Jr("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));c["Content-Length"]=a.length}var d=void 0;if(e.auth){var u=e.auth.username||"",p=e.auth.password||"";d=u+":"+p}var g=d0(e.baseURL,e.url),m=ic.parse(g),b=m.protocol||"http:";if(!d&&m.auth){var C=m.auth.split(":"),P=C[0]||"",F=C[1]||"";d=P+":"+F}d&&delete c.Authorization;var N=oc.test(b),G=N?e.httpsAgent:e.httpAgent,B={path:h0(m.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:c,agent:G,agents:{http:e.httpAgent,https:e.httpsAgent},auth:d};e.socketPath?B.socketPath=e.socketPath:(B.hostname=m.hostname,B.port=m.port);var z=e.proxy;if(!z&&z!==!1){var ae=b.slice(0,-1)+"_proxy",be=process.env[ae]||process.env[ae.toUpperCase()];if(be){var K=ic.parse(be),w=process.env.no_proxy||process.env.NO_PROXY,x=!0;if(w){var E=w.split(",").map(function(A){return A.trim()});x=!E.some(function(A){return A?A==="*"||A[0]==="."&&m.hostname.substr(m.hostname.length-A.length)===A?!0:m.hostname===A:!1})}if(x&&(z={host:K.hostname,port:K.port,protocol:K.protocol},K.auth)){var X=K.auth.split(":");z.auth={username:X[0],password:X[1]}}}}z&&(B.headers.host=m.hostname+(m.port?":"+m.port:""),sc(B,z,b+"//"+m.hostname+(m.port?":"+m.port:"")+B.path));var R,L=N&&(z?oc.test(z.protocol):!0);e.transport?R=e.transport:e.maxRedirects===0?R=L?m0:p0:(e.maxRedirects&&(B.maxRedirects=e.maxRedirects),R=L?y0:g0),e.maxBodyLength>-1&&(B.maxBodyLength=e.maxBodyLength);var I=R.request(B,function(A){if(!I.aborted){var M=A,Me=A.req||I;if(A.statusCode!==204&&Me.method!=="HEAD"&&e.decompress!==!1)switch(A.headers["content-encoding"]){case"gzip":case"compress":case"deflate":M=M.pipe(v0.createUnzip()),delete A.headers["content-encoding"];break}var Ge={status:A.statusCode,statusText:A.statusMessage,headers:A.headers,config:e,request:Me};if(e.responseType==="stream")Ge.data=M,nc(o,s,Ge);else{var Z=[],ce=0;M.on("data",function(we){Z.push(we),ce+=we.length,e.maxContentLength>-1&&ce>e.maxContentLength&&(M.destroy(),s(Jr("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,Me)))}),M.on("error",function(we){I.aborted||s(Mi(we,e,null,Me))}),M.on("end",function(){var we=Buffer.concat(Z);e.responseType!=="arraybuffer"&&(we=we.toString(e.responseEncoding),(!e.responseEncoding||e.responseEncoding==="utf8")&&(we=nr.stripBOM(we))),Ge.data=we,nc(o,s,Ge)})}}});if(I.on("error",function(A){I.aborted&&A.code!=="ERR_FR_TOO_MANY_REDIRECTS"||s(Mi(A,e,null,I))}),e.timeout){var $=parseInt(e.timeout,10);if(isNaN($)){s(Jr("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",I));return}I.setTimeout($,function(){I.abort(),s(Jr("timeout of "+$+"ms exceeded",e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",I))})}e.cancelToken&&e.cancelToken.promise.then(function(A){I.aborted||(I.abort(),s(A))}),nr.isStream(a)?a.on("error",function(A){s(Mi(A,e,null,I))}).pipe(I):I.end(a)})}});var zr=y((t2,fc)=>{"use strict";var ie=pe(),uc=ba(),w0=jr(),_0={"Content-Type":"application/x-www-form-urlencoded"};function lc(t,e){!ie.isUndefined(t)&&ie.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function x0(){var t;return typeof XMLHttpRequest<"u"?t=qa():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(t=cc()),t}function S0(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 Wr={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:x0(),transformRequest:[function(e,r){return uc(r,"Accept"),uc(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)?(lc(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):ie.isObject(e)||r&&r["Content-Type"]==="application/json"?(lc(r,"application/json"),S0(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"?w0(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}};Wr.headers={common:{Accept:"application/json, text/plain, */*"}};ie.forEach(["delete","get","head"],function(e){Wr.headers[e]={}});ie.forEach(["post","put","patch"],function(e){Wr.headers[e]=ie.merge(_0)});fc.exports=Wr});var hc=y((r2,dc)=>{"use strict";var E0=pe(),C0=zr();dc.exports=function(e,r,n){var i=this||C0;return E0.forEach(n,function(s){e=s.call(i,e,r)}),e}});var qi=y((n2,pc)=>{"use strict";pc.exports=function(e){return!!(e&&e.__CANCEL__)}});var yc=y((i2,gc)=>{"use strict";var mc=pe(),Ni=hc(),P0=qi(),D0=zr();function ji(t){t.cancelToken&&t.cancelToken.throwIfRequested()}gc.exports=function(e){ji(e),e.headers=e.headers||{},e.data=Ni.call(e,e.data,e.headers,e.transformRequest),e.headers=mc.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),mc.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var r=e.adapter||D0.adapter;return r(e).then(function(i){return ji(e),i.data=Ni.call(e,i.data,i.headers,e.transformResponse),i},function(i){return P0(i)||(ji(e),i&&i.response&&(i.response.data=Ni.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})}});var Li=y((o2,vc)=>{"use strict";var le=pe();vc.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 le.isPlainObject(g)&&le.isPlainObject(m)?le.merge(g,m):le.isPlainObject(m)?le.merge({},m):le.isArray(m)?m.slice():m}function d(g){le.isUndefined(r[g])?le.isUndefined(e[g])||(n[g]=c(void 0,e[g])):n[g]=c(e[g],r[g])}le.forEach(i,function(m){le.isUndefined(r[m])||(n[m]=c(void 0,r[m]))}),le.forEach(o,d),le.forEach(s,function(m){le.isUndefined(r[m])?le.isUndefined(e[m])||(n[m]=c(void 0,e[m])):n[m]=c(void 0,r[m])}),le.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 le.forEach(p,d),n}});var Sc=y((s2,xc)=>{"use strict";var wc=Ti(),$i={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){$i[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var bc={},O0=wc.version.split(".");function _c(t,e){for(var r=e?e.split("."):O0,n=t.split("."),i=0;i<3;i++){if(r[i]>n[i])return!0;if(r[i]<n[i])return!1}return!1}$i.transitional=function(e,r,n){var i=r&&_c(r);function o(s,a){return"[Axios v"+wc.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&&!bc[a]&&(bc[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 A0(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)}}xc.exports={isOlderVersion:_c,assertOptions:A0,validators:$i}});var Ac=y((a2,Oc)=>{"use strict";var Pc=pe(),I0=qr(),Ec=ya(),Cc=yc(),Vr=Li(),Dc=Sc(),Ot=Dc.validators;function ir(t){this.defaults=t,this.interceptors={request:new Ec,response:new Ec}}ir.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=Vr(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&&Dc.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=[Cc,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 d=n.shift(),u=n.shift();try{c=d(c)}catch(p){u(p);break}}try{s=Cc(c)}catch(p){return Promise.reject(p)}for(;o.length;)s=s.then(o.shift(),o.shift());return s};ir.prototype.getUri=function(e){return e=Vr(this.defaults,e),I0(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};Pc.forEach(["delete","get","head","options"],function(e){ir.prototype[e]=function(r,n){return this.request(Vr(n||{},{method:e,url:r,data:(n||{}).data}))}});Pc.forEach(["post","put","patch"],function(e){ir.prototype[e]=function(r,n,i){return this.request(Vr(i||{},{method:e,url:r,data:n}))}});Oc.exports=ir});var Ui=y((c2,Ic)=>{"use strict";function Bi(t){this.message=t}Bi.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};Bi.prototype.__CANCEL__=!0;Ic.exports=Bi});var Fc=y((u2,Rc)=>{"use strict";var R0=Ui();function Yr(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 R0(i),e(r.reason))})}Yr.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};Yr.source=function(){var e,r=new Yr(function(i){e=i});return{token:r,cancel:e}};Rc.exports=Yr});var Tc=y((l2,kc)=>{"use strict";kc.exports=function(e){return function(n){return e.apply(null,n)}}});var qc=y((f2,Mc)=>{"use strict";Mc.exports=function(e){return typeof e=="object"&&e.isAxiosError===!0}});var Lc=y((d2,Xi)=>{"use strict";var Nc=pe(),F0=pi(),Kr=Ac(),k0=Li(),T0=zr();function jc(t){var e=new Kr(t),r=F0(Kr.prototype.request,e);return Nc.extend(r,Kr.prototype,e),Nc.extend(r,e),r}var Ne=jc(T0);Ne.Axios=Kr;Ne.create=function(e){return jc(k0(Ne.defaults,e))};Ne.Cancel=Ui();Ne.CancelToken=Fc();Ne.isCancel=qi();Ne.all=function(e){return Promise.all(e)};Ne.spread=Tc();Ne.isAxiosError=qc();Xi.exports=Ne;Xi.exports.default=Ne});var Gi=y((h2,$c)=>{$c.exports=Lc()});var Uc=y((p2,Bc)=>{"use strict";var M0=/[|\\{}()[\]^$+*?.]/g;Bc.exports=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(M0,"\\$&")}});var Gc=y((m2,Xc)=>{"use strict";Xc.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 Hi=y((g2,zc)=>{var pt=Gc(),Wc={};for(Qr in pt)pt.hasOwnProperty(Qr)&&(Wc[pt[Qr]]=Qr);var Qr,D=zc.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(me in D)if(D.hasOwnProperty(me)){if(!("channels"in D[me]))throw new Error("missing channels property: "+me);if(!("labels"in D[me]))throw new Error("missing channel labels property: "+me);if(D[me].labels.length!==D[me].channels)throw new Error("channel and label counts mismatch: "+me);Hc=D[me].channels,Jc=D[me].labels,delete D[me].channels,delete D[me].labels,Object.defineProperty(D[me],"channels",{value:Hc}),Object.defineProperty(D[me],"labels",{value:Jc})}var Hc,Jc,me;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,d;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),d=(i+o)/2,o===i?c=0:d<=.5?c=s/(o+i):c=s/(2-o-i),[a,c*100,d*100]};D.rgb.hsv=function(t){var e,r,n,i,o,s=t[0]/255,a=t[1]/255,c=t[2]/255,d=Math.max(s,a,c),u=d-Math.min(s,a,c),p=function(g){return(d-g)/6/u+1/2};return u===0?i=o=0:(o=u/d,e=p(s),r=p(a),n=p(c),s===d?i=n-r:a===d?i=1/3+e-n:c===d&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,d*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 q0(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=Wc[t];if(e)return e;var r=1/0,n;for(var i in pt)if(pt.hasOwnProperty(i)){var o=pt[i],s=q0(t,o);s<r&&(r=s,n=i)}return n};D.keyword.rgb=function(t){return pt[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 d=0;d<3;d++)s=e+1/3*-(d-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[d]=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 d,u,p;switch(o){default:case 6:case 0:d=s,u=c,p=r;break;case 1:d=c,u=s,p=r;break;case 2:d=r,u=s,p=c;break;case 3:d=r,u=c,p=s;break;case 4:d=c,u=r,p=s;break;case 5:d=s,u=r,p=c;break}return[d*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),d=Math.pow(s,3);return o=a>.008856?a:(o-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,s=d>.008856?d:(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 Yc=y((y2,Vc)=>{var Zr=Hi();function N0(){for(var t={},e=Object.keys(Zr),r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function j0(t){var e=N0(),r=[t];for(e[t].distance=0;r.length;)for(var n=r.pop(),i=Object.keys(Zr[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 L0(t,e){return function(r){return e(t(r))}}function $0(t,e){for(var r=[e[t].parent,t],n=Zr[e[t].parent][t],i=e[t].parent;e[i].parent;)r.unshift(e[i].parent),n=L0(Zr[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}Vc.exports=function(t){for(var e=j0(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]=$0(s,e))}return r}});var Qc=y((v2,Kc)=>{var Ji=Hi(),B0=Yc(),At={},U0=Object.keys(Ji);function X0(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 G0(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}U0.forEach(function(t){At[t]={},Object.defineProperty(At[t],"channels",{value:Ji[t].channels}),Object.defineProperty(At[t],"labels",{value:Ji[t].labels});var e=B0(t),r=Object.keys(e);r.forEach(function(n){var i=e[n];At[t][n]=G0(i),At[t][n].raw=X0(i)})});Kc.exports=At});var eu=y((b2,Zc)=>{"use strict";var It=Qc(),en=(t,e)=>function(){return`\x1B[${t.apply(It,arguments)+e}m`},tn=(t,e)=>function(){let r=t.apply(It,arguments);return`\x1B[${38+e};5;${r}m`},rn=(t,e)=>function(){let r=t.apply(It,arguments);return`\x1B[${38+e};2;${r[0]};${r[1]};${r[2]}m`};function H0(){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:en(r,0)},e.color.ansi256={ansi256:tn(r,0)},e.color.ansi16m={rgb:rn(n,0)},e.bgColor.ansi={ansi:en(r,10)},e.bgColor.ansi256={ansi256:tn(r,10)},e.bgColor.ansi16m={rgb:rn(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]=en(o.ansi16,0),e.bgColor.ansi[i]=en(o.ansi16,10)),"ansi256"in o&&(e.color.ansi256[i]=tn(o.ansi256,0),e.bgColor.ansi256[i]=tn(o.ansi256,10)),"rgb"in o&&(e.color.ansi16m[i]=rn(o.rgb,0),e.bgColor.ansi16m[i]=rn(o.rgb,10))}return e}Object.defineProperty(Zc,"exports",{enumerable:!0,get:H0})});var ru=y((w2,tu)=>{"use strict";tu.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 iu=y((_2,nu)=>{"use strict";var J0=require("os"),je=ru(),fe=process.env,Rt;je("no-color")||je("no-colors")||je("color=false")?Rt=!1:(je("color")||je("colors")||je("color=true")||je("color=always"))&&(Rt=!0);"FORCE_COLOR"in fe&&(Rt=fe.FORCE_COLOR.length===0||parseInt(fe.FORCE_COLOR,10)!==0);function W0(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function z0(t){if(Rt===!1)return 0;if(je("color=16m")||je("color=full")||je("color=truecolor"))return 3;if(je("color=256"))return 2;if(t&&!t.isTTY&&Rt!==!0)return 0;let e=Rt?1:0;if(process.platform==="win32"){let r=J0.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 fe)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in fe)||fe.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in fe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(fe.TEAMCITY_VERSION)?1:0;if(fe.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in fe){let r=parseInt((fe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(fe.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(fe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(fe.TERM)||"COLORTERM"in fe?1:(fe.TERM==="dumb",e)}function Wi(t){let e=z0(t);return W0(e)}nu.exports={supportsColor:Wi,stdout:Wi(process.stdout),stderr:Wi(process.stderr)}});var uu=y((x2,cu)=>{"use strict";var V0=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,ou=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Y0=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,K0=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,Q0=new Map([["n",`
9
+ `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function au(t){return t[0]==="u"&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):Q0.get(t)||t}function Z0(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(Y0))r.push(i[2].replace(K0,(s,a,c)=>a?au(a):c));else throw new Error(`Invalid Chalk template style argument: ${o} (in style '${t}')`);return r}function em(t){ou.lastIndex=0;let e=[],r;for(;(r=ou.exec(t))!==null;){let n=r[1];if(r[2]){let i=Z0(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function su(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}cu.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(V0,(o,s,a,c,d,u)=>{if(s)i.push(au(s));else if(c){let p=i.join("");i=[],n.push(r.length===0?p:su(t,r)(p)),r.push({inverse:a,styles:em(c)})}else if(d){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(su(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 ar=y((S2,sr)=>{"use strict";var Vi=Uc(),Y=eu(),zi=iu().stdout,tm=uu(),fu=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),du=["ansi","ansi","ansi256","ansi16m"],hu=new Set(["gray"]),Ft=Object.create(null);function lu(t,e){e=e||{};let r=zi?zi.level:0;t.level=e.level===void 0?r:e.level,t.enabled="enabled"in e?e.enabled:t.level>0}function or(t){if(!this||!(this instanceof or)||this.template){let e={};return lu(e,t),e.template=function(){let r=[].slice.call(arguments);return im.apply(null,[e.template].concat(r))},Object.setPrototypeOf(e,or.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=or,e.template}lu(this,t)}fu&&(Y.blue.open="\x1B[94m");for(let t of Object.keys(Y))Y[t].closeRe=new RegExp(Vi(Y[t].close),"g"),Ft[t]={get(){let e=Y[t];return nn.call(this,this._styles?this._styles.concat(e):[e],this._empty,t)}};Ft.visible={get(){return nn.call(this,this._styles||[],!0,"visible")}};Y.color.closeRe=new RegExp(Vi(Y.color.close),"g");for(let t of Object.keys(Y.color.ansi))hu.has(t)||(Ft[t]={get(){let e=this.level;return function(){let n={open:Y.color[du[e]][t].apply(null,arguments),close:Y.color.close,closeRe:Y.color.closeRe};return nn.call(this,this._styles?this._styles.concat(n):[n],this._empty,t)}}});Y.bgColor.closeRe=new RegExp(Vi(Y.bgColor.close),"g");for(let t of Object.keys(Y.bgColor.ansi)){if(hu.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[du[r]][t].apply(null,arguments),close:Y.bgColor.close,closeRe:Y.bgColor.closeRe};return nn.call(this,this._styles?this._styles.concat(i):[i],this._empty,t)}}}}var rm=Object.defineProperties(()=>{},Ft);function nn(t,e,r){let n=function(){return nm.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__=rm,n}function nm(){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;fu&&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 im(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 tm(t,n.join(""))}Object.defineProperties(or.prototype,Ft);sr.exports=or();sr.exports.supportsColor=zi;sr.exports.default=sr.exports});var xe=y(Ki=>{"use strict";Ki.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})};Ki.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 yu=y((P2,gu)=>{var et=require("constants"),om=process.cwd,on=null,sm=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return on||(on=om.call(process)),on};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Qi=process.chdir,process.chdir=function(t){on=null,Qi.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Qi));var Qi;gu.exports=am;function am(t){et.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(){}),sm==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(u){function p(g,m,b){var C=Date.now(),P=0;u(g,m,function F(N){if(N&&(N.code==="EACCES"||N.code==="EPERM")&&Date.now()-C<6e4){setTimeout(function(){t.stat(m,function(G,B){G&&G.code==="ENOENT"?u(g,m,F):b(N)})},P),P<100&&(P+=10);return}b&&b(N)})}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,C,P,F){var N;if(F&&typeof F=="function"){var G=0;N=function(B,z,ae){if(B&&B.code==="EAGAIN"&&G<10)return G++,u.call(t,g,m,b,C,P,N);F.apply(this,arguments)}}return u.call(t,g,m,b,C,P,N)}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,C){for(var P=0;;)try{return u.call(t,p,g,m,b,C)}catch(F){if(F.code==="EAGAIN"&&P<10){P++;continue}throw F}}}(t.readSync);function e(u){u.lchmod=function(p,g,m){u.open(p,et.O_WRONLY|et.O_SYMLINK,g,function(b,C){if(b){m&&m(b);return}u.fchmod(C,g,function(P){u.close(C,function(F){m&&m(P||F)})})})},u.lchmodSync=function(p,g){var m=u.openSync(p,et.O_WRONLY|et.O_SYMLINK,g),b=!0,C;try{C=u.fchmodSync(m,g),b=!1}finally{if(b)try{u.closeSync(m)}catch{}else u.closeSync(m)}return C}}function r(u){et.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(p,g,m,b){u.open(p,et.O_SYMLINK,function(C,P){if(C){b&&b(C);return}u.futimes(P,g,m,function(F){u.close(P,function(N){b&&b(F||N)})})})},u.lutimesSync=function(p,g,m){var b=u.openSync(p,et.O_SYMLINK),C,P=!0;try{C=u.futimesSync(b,g,m),P=!1}finally{if(P)try{u.closeSync(b)}catch{}else u.closeSync(b)}return C}):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){d(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(!d(m))throw m}}}function o(u){return u&&function(p,g,m,b){return u.call(t,p,g,m,function(C){d(C)&&(C=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(!d(b))throw b}}}function a(u){return u&&function(p,g,m){typeof g=="function"&&(m=g,g=null);function b(C,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 d(u){if(!u||u.code==="ENOSYS")return!0;var p=!process.getuid||process.getuid()!==0;return!!(p&&(u.code==="EINVAL"||u.code==="EPERM"))}}});var wu=y((D2,bu)=>{var vu=require("stream").Stream;bu.exports=cm;function cm(t){return{ReadStream:e,WriteStream:r};function e(n,i){if(!(this instanceof e))return new e(n,i);vu.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 d=s[a];this[d]=i[d]}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);vu.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 xu=y((O2,_u)=>{"use strict";_u.exports=lm;var um=Object.getPrototypeOf||function(t){return t.__proto__};function lm(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:um(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}});var de=y((A2,to)=>{var W=require("fs"),fm=yu(),dm=wu(),hm=xu(),sn=require("util"),oe,cn;typeof Symbol=="function"&&typeof Symbol.for=="function"?(oe=Symbol.for("graceful-fs.queue"),cn=Symbol.for("graceful-fs.previous")):(oe="___graceful-fs.queue",cn="___graceful-fs.previous");function pm(){}function Cu(t,e){Object.defineProperty(t,oe,{get:function(){return e}})}var mt=pm;sn.debuglog?mt=sn.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(mt=function(){var t=sn.format.apply(sn,arguments);t="GFS4: "+t.split(/\n/).join(`
10
+ GFS4: `),console.error(t)});W[oe]||(Su=global[oe]||[],Cu(W,Su),W.close=function(t){function e(r,n){return t.call(W,r,function(i){i||Eu(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,cn,{value:t}),e}(W.close),W.closeSync=function(t){function e(r){t.apply(W,arguments),Eu()}return Object.defineProperty(e,cn,{value:t}),e}(W.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){mt(W[oe]),require("assert").equal(W[oe].length,0)}));var Su;global[oe]||Cu(global,W[oe]);to.exports=Zi(hm(W));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!W.__patched&&(to.exports=Zi(W),W.__patched=!0);function Zi(t){fm(t),t.gracefulify=Zi,t.createReadStream=z,t.createWriteStream=ae;var e=t.readFile;t.readFile=r;function r(w,x,E){return typeof x=="function"&&(E=x,x=null),X(w,x,E);function X(R,L,I,$){return e(R,L,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Tt([X,[R,L,I],k,$||Date.now(),Date.now()]):typeof I=="function"&&I.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=i;function i(w,x,E,X){return typeof E=="function"&&(X=E,E=null),R(w,x,E,X);function R(L,I,$,k,A){return n(L,I,$,function(M){M&&(M.code==="EMFILE"||M.code==="ENFILE")?Tt([R,[L,I,$,k],M,A||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments)})}}var o=t.appendFile;o&&(t.appendFile=s);function s(w,x,E,X){return typeof E=="function"&&(X=E,E=null),R(w,x,E,X);function R(L,I,$,k,A){return o(L,I,$,function(M){M&&(M.code==="EMFILE"||M.code==="ENFILE")?Tt([R,[L,I,$,k],M,A||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=c);function c(w,x,E,X){return typeof E=="function"&&(X=E,E=0),R(w,x,E,X);function R(L,I,$,k,A){return a(L,I,$,function(M){M&&(M.code==="EMFILE"||M.code==="ENFILE")?Tt([R,[L,I,$,k],M,A||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments)})}}var d=t.readdir;t.readdir=p;var u=/^v[0-5]\./;function p(w,x,E){typeof x=="function"&&(E=x,x=null);var X=u.test(process.version)?function(I,$,k,A){return d(I,R(I,$,k,A))}:function(I,$,k,A){return d(I,$,R(I,$,k,A))};return X(w,x,E);function R(L,I,$,k){return function(A,M){A&&(A.code==="EMFILE"||A.code==="ENFILE")?Tt([X,[L,I,$],A,k||Date.now(),Date.now()]):(M&&M.sort&&M.sort(),typeof $=="function"&&$.call(this,A,M))}}}if(process.version.substr(0,4)==="v0.8"){var g=dm(t);F=g.ReadStream,G=g.WriteStream}var m=t.ReadStream;m&&(F.prototype=Object.create(m.prototype),F.prototype.open=N);var b=t.WriteStream;b&&(G.prototype=Object.create(b.prototype),G.prototype.open=B),Object.defineProperty(t,"ReadStream",{get:function(){return F},set:function(w){F=w},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return G},set:function(w){G=w},enumerable:!0,configurable:!0});var C=F;Object.defineProperty(t,"FileReadStream",{get:function(){return C},set:function(w){C=w},enumerable:!0,configurable:!0});var P=G;Object.defineProperty(t,"FileWriteStream",{get:function(){return P},set:function(w){P=w},enumerable:!0,configurable:!0});function F(w,x){return this instanceof F?(m.apply(this,arguments),this):F.apply(Object.create(F.prototype),arguments)}function N(){var w=this;K(w.path,w.flags,w.mode,function(x,E){x?(w.autoClose&&w.destroy(),w.emit("error",x)):(w.fd=E,w.emit("open",E),w.read())})}function G(w,x){return this instanceof G?(b.apply(this,arguments),this):G.apply(Object.create(G.prototype),arguments)}function B(){var w=this;K(w.path,w.flags,w.mode,function(x,E){x?(w.destroy(),w.emit("error",x)):(w.fd=E,w.emit("open",E))})}function z(w,x){return new t.ReadStream(w,x)}function ae(w,x){return new t.WriteStream(w,x)}var be=t.open;t.open=K;function K(w,x,E,X){return typeof E=="function"&&(X=E,E=null),R(w,x,E,X);function R(L,I,$,k,A){return be(L,I,$,function(M,Me){M&&(M.code==="EMFILE"||M.code==="ENFILE")?Tt([R,[L,I,$,k],M,A||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments)})}}return t}function Tt(t){mt("ENQUEUE",t[0].name,t[1]),W[oe].push(t),eo()}var an;function Eu(){for(var t=Date.now(),e=0;e<W[oe].length;++e)W[oe][e].length>2&&(W[oe][e][3]=t,W[oe][e][4]=t);eo()}function eo(){if(clearTimeout(an),an=void 0,W[oe].length!==0){var t=W[oe].shift(),e=t[0],r=t[1],n=t[2],i=t[3],o=t[4];if(i===void 0)mt("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-i>=6e4){mt("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),d=Math.min(c*1.2,100);a>=d?(mt("RETRY",e.name,r),e.apply(null,r.concat([i]))):W[oe].push(t)}an===void 0&&(an=setTimeout(eo,0))}}});var cr=y(tt=>{"use strict";var Pu=xe().fromCallback,ge=de(),mm=["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 ge[t]=="function");Object.keys(ge).forEach(t=>{t!=="promises"&&(tt[t]=ge[t])});mm.forEach(t=>{tt[t]=Pu(ge[t])});tt.exists=function(t,e){return typeof e=="function"?ge.exists(t,e):new Promise(r=>ge.exists(t,r))};tt.read=function(t,e,r,n,i,o){return typeof o=="function"?ge.read(t,e,r,n,i,o):new Promise((s,a)=>{ge.read(t,e,r,n,i,(c,d,u)=>{if(c)return a(c);s({bytesRead:d,buffer:u})})})};tt.write=function(t,e,...r){return typeof r[r.length-1]=="function"?ge.write(t,e,...r):new Promise((n,i)=>{ge.write(t,e,...r,(o,s,a)=>{if(o)return i(o);n({bytesWritten:s,buffer:a})})})};typeof ge.writev=="function"&&(tt.writev=function(t,e,...r){return typeof r[r.length-1]=="function"?ge.writev(t,e,...r):new Promise((n,i)=>{ge.writev(t,e,...r,(o,s,a)=>{if(o)return i(o);n({bytesWritten:s,buffers:a})})})});typeof ge.realpath.native=="function"&&(tt.realpath.native=Pu(ge.realpath.native))});var ro=y((R2,Du)=>{Du.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 Fu=y((F2,no)=>{"use strict";var Mt=cr(),Ve=require("path"),gm=ro(),Ou=gm("10.12.0"),Au=t=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(t.replace(Ve.parse(t).root,""))){let r=new Error(`Path contains invalid characters: ${t}`);throw r.code="EINVAL",r}},Iu=t=>{let e={mode:511};return typeof t=="number"&&(t={mode:t}),{...e,...t}},Ru=t=>{let e=new Error(`operation not permitted, mkdir '${t}'`);return e.code="EPERM",e.errno=-4048,e.path=t,e.syscall="mkdir",e};no.exports.makeDir=async(t,e)=>{if(Au(t),e=Iu(e),Ou){let n=Ve.resolve(t);return Mt.mkdir(n,{mode:e.mode,recursive:!0})}let r=async n=>{try{await Mt.mkdir(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(Ve.dirname(n)===n)throw Ru(n);if(i.message.includes("null bytes"))throw i;return await r(Ve.dirname(n)),r(n)}try{if(!(await Mt.stat(n)).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(Ve.resolve(t))};no.exports.makeDirSync=(t,e)=>{if(Au(t),e=Iu(e),Ou){let n=Ve.resolve(t);return Mt.mkdirSync(n,{mode:e.mode,recursive:!0})}let r=n=>{try{Mt.mkdirSync(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(Ve.dirname(n)===n)throw Ru(n);if(i.message.includes("null bytes"))throw i;return r(Ve.dirname(n)),r(n)}try{if(!Mt.statSync(n).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(Ve.resolve(t))}});var Le=y((k2,ku)=>{"use strict";var ym=xe().fromPromise,{makeDir:vm,makeDirSync:io}=Fu(),oo=ym(vm);ku.exports={mkdirs:oo,mkdirsSync:io,mkdirp:oo,mkdirpSync:io,ensureDir:oo,ensureDirSync:io}});var so=y((T2,Tu)=>{"use strict";var qt=de();function bm(t,e,r,n){qt.open(t,"r+",(i,o)=>{if(i)return n(i);qt.futimes(o,e,r,s=>{qt.close(o,a=>{n&&n(s||a)})})})}function wm(t,e,r){let n=qt.openSync(t,"r+");return qt.futimesSync(n,e,r),qt.closeSync(n)}Tu.exports={utimesMillis:bm,utimesMillisSync:wm}});var ur=y((M2,ju)=>{"use strict";var Nt=cr(),Se=require("path"),_m=require("util"),xm=ro(),un=xm("10.5.0"),Mu=t=>un?Nt.stat(t,{bigint:!0}):Nt.stat(t),ao=t=>un?Nt.statSync(t,{bigint:!0}):Nt.statSync(t);function Sm(t,e){return Promise.all([Mu(t),Mu(e).catch(r=>{if(r.code==="ENOENT")return null;throw r})]).then(([r,n])=>({srcStat:r,destStat:n}))}function Em(t,e){let r,n=ao(t);try{r=ao(e)}catch(i){if(i.code==="ENOENT")return{srcStat:n,destStat:null};throw i}return{srcStat:n,destStat:r}}function Cm(t,e,r,n){_m.callbackify(Sm)(t,e,(i,o)=>{if(i)return n(i);let{srcStat:s,destStat:a}=o;return a&&ln(s,a)?n(new Error("Source and destination must not be the same.")):s.isDirectory()&&co(t,e)?n(new Error(fn(t,e,r))):n(null,{srcStat:s,destStat:a})})}function Pm(t,e,r){let{srcStat:n,destStat:i}=Em(t,e);if(i&&ln(n,i))throw new Error("Source and destination must not be the same.");if(n.isDirectory()&&co(t,e))throw new Error(fn(t,e,r));return{srcStat:n,destStat:i}}function qu(t,e,r,n,i){let o=Se.resolve(Se.dirname(t)),s=Se.resolve(Se.dirname(r));if(s===o||s===Se.parse(s).root)return i();let a=(c,d)=>c?c.code==="ENOENT"?i():i(c):ln(e,d)?i(new Error(fn(t,r,n))):qu(t,e,s,n,i);un?Nt.stat(s,{bigint:!0},a):Nt.stat(s,a)}function Nu(t,e,r,n){let i=Se.resolve(Se.dirname(t)),o=Se.resolve(Se.dirname(r));if(o===i||o===Se.parse(o).root)return;let s;try{s=ao(o)}catch(a){if(a.code==="ENOENT")return;throw a}if(ln(e,s))throw new Error(fn(t,r,n));return Nu(t,e,o,n)}function ln(t,e){return!!(e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev&&(un||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 co(t,e){let r=Se.resolve(t).split(Se.sep).filter(i=>i),n=Se.resolve(e).split(Se.sep).filter(i=>i);return r.reduce((i,o,s)=>i&&n[s]===o,!0)}function fn(t,e,r){return`Cannot ${r} '${t}' to a subdirectory of itself, '${e}'.`}ju.exports={checkPaths:Cm,checkPathsSync:Pm,checkParentPaths:qu,checkParentPathsSync:Nu,isSrcSubdir:co}});var Xu=y((q2,Uu)=>{"use strict";var he=de(),lr=require("path"),Dm=Le().mkdirsSync,Om=so().utimesMillisSync,fr=ur();function Am(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"),wm(i,t,e,r)}function wm(t,e,r,n){if(n.filter&&!n.filter(e,r))return;let i=cr.dirname(r);return he.existsSync(i)||ym(i),Tu(t,e,r,n)}function Tu(t,e,r,n){if(!(n.filter&&!n.filter(e,r)))return _m(t,e,r,n)}function _m(t,e,r,n){let o=(n.dereference?he.statSync:he.lstatSync)(e);if(o.isDirectory())return Om(o,t,e,r,n);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return xm(o,t,e,r,n);if(o.isSymbolicLink())return Rm(t,e,r,n)}function xm(t,e,r,n,i){return e?Sm(t,r,n,i):Mu(t,r,n,i)}function Sm(t,e,r,n){if(n.overwrite)return he.unlinkSync(r),Mu(t,e,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function Mu(t,e,r,n){return he.copyFileSync(e,r),n.preserveTimestamps&&Em(t.mode,e,r),so(r,t.mode)}function Em(t,e,r){return Cm(t)&&Pm(r,t),Dm(e,r)}function Cm(t){return(t&128)===0}function Pm(t,e){return so(t,e|128)}function so(t,e){return he.chmodSync(t,e)}function Dm(t,e){let r=he.statSync(t);return vm(e,r.atime,r.mtime)}function Om(t,e,r,n,i){if(!e)return Am(t.mode,r,n,i);if(e&&!e.isDirectory())throw new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`);return qu(r,n,i)}function Am(t,e,r,n){return he.mkdirSync(r),qu(e,r,n),so(r,t)}function qu(t,e,r){he.readdirSync(t).forEach(n=>Im(n,t,e,r))}function Im(t,e,r,n){let i=cr.join(e,t),o=cr.join(r,t),{destStat:s}=ur.checkPathsSync(i,o,"copy");return Tu(s,i,o,n)}function Rm(t,e,r,n){let i=he.readlinkSync(e);if(n.dereference&&(i=cr.resolve(process.cwd(),i)),t){let o;try{o=he.readlinkSync(r)}catch(s){if(s.code==="EINVAL"||s.code==="UNKNOWN")return he.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(he.statSync(r).isDirectory()&&ur.isSrcSubdir(o,i))throw new Error(`Cannot overwrite '${o}' with '${i}'.`);return Fm(i,r)}else return he.symlinkSync(i,r)}function Fm(t,e){return he.unlinkSync(e),he.symlinkSync(t,e)}Nu.exports=bm});var ao=y((_2,Lu)=>{"use strict";Lu.exports={copySync:ju()}});var rt=y((x2,Bu)=>{"use strict";var km=xe().fromPromise,$u=sr();function Tm(t){return $u.access(t).then(()=>!0).catch(()=>!1)}Bu.exports={pathExists:km(Tm),pathExistsSync:$u.existsSync}});var Yu=y((S2,Vu)=>{"use strict";var Ee=de(),lr=require("path"),Mm=Le().mkdirs,qm=rt().pathExists,Nm=no().utimesMillis,fr=ar();function jm(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}=fr.checkPathsSync(t,e,"copy");return fr.checkParentPathsSync(t,n,e,"copy"),Im(i,t,e,r)}function Im(t,e,r,n){if(n.filter&&!n.filter(e,r))return;let i=lr.dirname(r);return he.existsSync(i)||Dm(i),Lu(t,e,r,n)}function Lu(t,e,r,n){if(!(n.filter&&!n.filter(e,r)))return Rm(t,e,r,n)}function Rm(t,e,r,n){let o=(n.dereference?he.statSync:he.lstatSync)(e);if(o.isDirectory())return jm(o,t,e,r,n);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return Fm(o,t,e,r,n);if(o.isSymbolicLink())return Bm(t,e,r,n)}function Fm(t,e,r,n,i){return e?km(t,r,n,i):$u(t,r,n,i)}function km(t,e,r,n){if(n.overwrite)return he.unlinkSync(r),$u(t,e,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function $u(t,e,r,n){return he.copyFileSync(e,r),n.preserveTimestamps&&Tm(t.mode,e,r),uo(r,t.mode)}function Tm(t,e,r){return Mm(t)&&qm(r,t),Nm(e,r)}function Mm(t){return(t&128)===0}function qm(t,e){return uo(t,e|128)}function uo(t,e){return he.chmodSync(t,e)}function Nm(t,e){let r=he.statSync(t);return Om(e,r.atime,r.mtime)}function jm(t,e,r,n,i){if(!e)return Lm(t.mode,r,n,i);if(e&&!e.isDirectory())throw new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`);return Bu(r,n,i)}function Lm(t,e,r,n){return he.mkdirSync(r),Bu(e,r,n),uo(r,t)}function Bu(t,e,r){he.readdirSync(t).forEach(n=>$m(n,t,e,r))}function $m(t,e,r,n){let i=lr.join(e,t),o=lr.join(r,t),{destStat:s}=fr.checkPathsSync(i,o,"copy");return Lu(s,i,o,n)}function Bm(t,e,r,n){let i=he.readlinkSync(e);if(n.dereference&&(i=lr.resolve(process.cwd(),i)),t){let o;try{o=he.readlinkSync(r)}catch(s){if(s.code==="EINVAL"||s.code==="UNKNOWN")return he.symlinkSync(i,r);throw s}if(n.dereference&&(o=lr.resolve(process.cwd(),o)),fr.isSrcSubdir(i,o))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${o}'.`);if(he.statSync(r).isDirectory()&&fr.isSrcSubdir(o,i))throw new Error(`Cannot overwrite '${o}' with '${i}'.`);return Um(i,r)}else return he.symlinkSync(i,r)}function Um(t,e){return he.unlinkSync(e),he.symlinkSync(t,e)}Uu.exports=Am});var lo=y((N2,Gu)=>{"use strict";Gu.exports={copySync:Xu()}});var rt=y((j2,Ju)=>{"use strict";var Xm=xe().fromPromise,Hu=cr();function Gm(t){return Hu.access(t).then(()=>!0).catch(()=>!1)}Ju.exports={pathExists:Xm(Gm),pathExistsSync:Hu.existsSync}});var tl=y((L2,el)=>{"use strict";var Ee=de(),dr=require("path"),Hm=Le().mkdirs,Jm=rt().pathExists,Wm=so().utimesMillis,hr=ur();function zm(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?Hu(Uu,a,t,e,r,n):Uu(a,t,e,r,n))})}function Uu(t,e,r,n,i){let o=lr.dirname(r);qm(o,(s,a)=>{if(s)return i(s);if(a)return co(t,e,r,n,i);Mm(o,c=>c?i(c):co(t,e,r,n,i))})}function Hu(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 co(t,e,r,n,i){return n.filter?Hu(Xu,t,e,r,n,i):Xu(t,e,r,n,i)}function Xu(t,e,r,n,i){(n.dereference?Ee.stat:Ee.lstat)(e,(s,a)=>{if(s)return i(s);if(a.isDirectory())return Hm(a,t,e,r,n,i);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return Lm(a,t,e,r,n,i);if(a.isSymbolicLink())return Jm(t,e,r,n,i)})}function Lm(t,e,r,n,i,o){return e?$m(t,r,n,i,o):Wu(t,r,n,i,o)}function $m(t,e,r,n,i){if(n.overwrite)Ee.unlink(r,o=>o?i(o):Wu(t,e,r,n,i));else return n.errorOnExist?i(new Error(`'${r}' already exists`)):i()}function Wu(t,e,r,n,i){Ee.copyFile(e,r,o=>o?i(o):n.preserveTimestamps?Bm(t.mode,e,r,i):fn(r,t.mode,i))}function Bm(t,e,r,n){return Um(t)?Xm(r,t,i=>i?n(i):Gu(t,e,r,n)):Gu(t,e,r,n)}function Um(t){return(t&128)===0}function Xm(t,e,r){return fn(t,e|128,r)}function Gu(t,e,r,n){Gm(e,r,i=>i?n(i):fn(r,t,n))}function fn(t,e,r){return Ee.chmod(t,e,r)}function Gm(t,e,r){Ee.stat(t,(n,i)=>n?r(n):Nm(e,i.atime,i.mtime,r))}function Hm(t,e,r,n,i,o){return e?e&&!e.isDirectory()?o(new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`)):zu(r,n,i,o):Wm(t.mode,r,n,i,o)}function Wm(t,e,r,n,i){Ee.mkdir(r,o=>{if(o)return i(o);zu(e,r,n,s=>s?i(s):fn(r,t,i))})}function zu(t,e,r,n){Ee.readdir(t,(i,o)=>i?n(i):Ju(o,t,e,r,n))}function Ju(t,e,r,n,i){let o=t.pop();return o?zm(t,o,e,r,n,i):i()}function zm(t,e,r,n,i,o){let s=lr.join(r,e),a=lr.join(n,e);fr.checkPaths(s,a,"copy",(c,d)=>{if(c)return o(c);let{destStat:u}=d;co(u,s,a,i,p=>p?o(p):Ju(t,r,n,i,o))})}function Jm(t,e,r,n,i){Ee.readlink(e,(o,s)=>{if(o)return i(o);if(n.dereference&&(s=lr.resolve(process.cwd(),s)),t)Ee.readlink(r,(a,c)=>a?a.code==="EINVAL"||a.code==="UNKNOWN"?Ee.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}'.`)):Vm(s,r,i)));else return Ee.symlink(s,r,i)})}function Vm(t,e,r){Ee.unlink(e,n=>n?r(n):Ee.symlink(t,e,r))}Vu.exports=jm});var uo=y((E2,Ku)=>{"use strict";var Ym=xe().fromCallback;Ku.exports={copy:Ym(Yu())}});var sl=y((C2,ol)=>{"use strict";var Qu=de(),rl=require("path"),H=require("assert"),dr=process.platform==="win32";function nl(t){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(r=>{t[r]=t[r]||Qu[r],r=r+"Sync",t[r]=t[r]||Qu[r]}),t.maxBusyTries=t.maxBusyTries||3}function lo(t,e,r){let n=0;typeof e=="function"&&(r=e,e={}),H(t,"rimraf: missing path"),H.strictEqual(typeof t,"string","rimraf: path should be a string"),H.strictEqual(typeof r,"function","rimraf: callback function required"),H(e,"rimraf: invalid options argument provided"),H.strictEqual(typeof e,"object","rimraf: options should be object"),nl(e),Zu(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(()=>Zu(t,e,i),s)}o.code==="ENOENT"&&(o=null)}r(o)})}function Zu(t,e,r){H(t),H(e),H(typeof r=="function"),e.lstat(t,(n,i)=>{if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&dr)return el(t,e,n,r);if(i&&i.isDirectory())return dn(t,e,n,r);e.unlink(t,o=>{if(o){if(o.code==="ENOENT")return r(null);if(o.code==="EPERM")return dr?el(t,e,o,r):dn(t,e,o,r);if(o.code==="EISDIR")return dn(t,e,o,r)}return r(o)})})}function el(t,e,r,n){H(t),H(e),H(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()?dn(t,e,r,n):e.unlink(t,n)})})}function tl(t,e,r){let n;H(t),H(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()?hn(t,e,r):e.unlinkSync(t)}function dn(t,e,r,n){H(t),H(e),H(typeof n=="function"),e.rmdir(t,i=>{i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")?Km(t,e,n):i&&i.code==="ENOTDIR"?n(r):n(i)})}function Km(t,e,r){H(t),H(e),H(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=>{lo(rl.join(t,a),e,c=>{if(!s){if(c)return r(s=c);--o===0&&e.rmdir(t,r)}})})})}function il(t,e){let r;e=e||{},nl(e),H(t,"rimraf: missing path"),H.strictEqual(typeof t,"string","rimraf: path should be a string"),H(e,"rimraf: missing options"),H.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&&tl(t,e,n)}try{r&&r.isDirectory()?hn(t,e,null):e.unlinkSync(t)}catch(n){if(n.code==="ENOENT")return;if(n.code==="EPERM")return dr?tl(t,e,n):hn(t,e,n);if(n.code!=="EISDIR")throw n;hn(t,e,n)}}function hn(t,e,r){H(t),H(e);try{e.rmdirSync(t)}catch(n){if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")Qm(t,e);else if(n.code!=="ENOENT")throw n}}function Qm(t,e){if(H(t),H(e),e.readdirSync(t).forEach(r=>il(rl.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)}ol.exports=lo;lo.sync=il});var hr=y((P2,cl)=>{"use strict";var Zm=xe().fromCallback,al=sl();cl.exports={remove:Zm(al),removeSync:al.sync}});var gl=y((D2,ml)=>{"use strict";var eg=xe().fromCallback,fl=de(),dl=require("path"),hl=Le(),pl=hr(),ul=eg(function(e,r){r=r||function(){},fl.readdir(e,(n,i)=>{if(n)return hl.mkdirs(e,r);i=i.map(s=>dl.join(e,s)),o();function o(){let s=i.pop();if(!s)return r();pl.remove(s,a=>{if(a)return r(a);o()})}})});function ll(t){let e;try{e=fl.readdirSync(t)}catch{return hl.mkdirsSync(t)}e.forEach(r=>{r=dl.join(t,r),pl.removeSync(r)})}ml.exports={emptyDirSync:ll,emptydirSync:ll,emptyDir:ul,emptydir:ul}});var wl=y((O2,bl)=>{"use strict";var tg=xe().fromCallback,yl=require("path"),nt=de(),vl=Le();function rg(t,e){function r(){nt.writeFile(t,"",n=>{if(n)return e(n);e()})}nt.stat(t,(n,i)=>{if(!n&&i.isFile())return e();let o=yl.dirname(t);nt.stat(o,(s,a)=>{if(s)return s.code==="ENOENT"?vl.mkdirs(o,c=>{if(c)return e(c);r()}):e(s);a.isDirectory()?r():nt.readdir(o,c=>{if(c)return e(c)})})})}function ng(t){let e;try{e=nt.statSync(t)}catch{}if(e&&e.isFile())return;let r=yl.dirname(t);try{nt.statSync(r).isDirectory()||nt.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")vl.mkdirsSync(r);else throw n}nt.writeFileSync(t,"")}bl.exports={createFile:tg(rg),createFileSync:ng}});var Cl=y((A2,El)=>{"use strict";var ig=xe().fromCallback,xl=require("path"),gt=de(),Sl=Le(),_l=rt().pathExists;function og(t,e,r){function n(i,o){gt.link(i,o,s=>{if(s)return r(s);r(null)})}_l(e,(i,o)=>{if(i)return r(i);if(o)return r(null);gt.lstat(t,s=>{if(s)return s.message=s.message.replace("lstat","ensureLink"),r(s);let a=xl.dirname(e);_l(a,(c,d)=>{if(c)return r(c);if(d)return n(t,e);Sl.mkdirs(a,u=>{if(u)return r(u);n(t,e)})})})})}function sg(t,e){if(gt.existsSync(e))return;try{gt.lstatSync(t)}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let n=xl.dirname(e);return gt.existsSync(n)||Sl.mkdirsSync(n),gt.linkSync(t,e)}El.exports={createLink:ig(og),createLinkSync:sg}});var Dl=y((I2,Pl)=>{"use strict";var it=require("path"),pr=de(),ag=rt().pathExists;function cg(t,e,r){if(it.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=it.dirname(e),i=it.join(n,t);return ag(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:it.relative(n,t)})))}}function ug(t,e){let r;if(it.isAbsolute(t)){if(r=pr.existsSync(t),!r)throw new Error("absolute srcpath does not exist");return{toCwd:t,toDst:t}}else{let n=it.dirname(e),i=it.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:it.relative(n,t)}}}Pl.exports={symlinkPaths:cg,symlinkPathsSync:ug}});var Il=y((R2,Al)=>{"use strict";var Ol=de();function lg(t,e,r){if(r=typeof e=="function"?e:r,e=typeof e=="function"?!1:e,e)return r(null,e);Ol.lstat(t,(n,i)=>{if(n)return r(null,"file");e=i&&i.isDirectory()?"dir":"file",r(null,e)})}function fg(t,e){let r;if(e)return e;try{r=Ol.lstatSync(t)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}Al.exports={symlinkType:lg,symlinkTypeSync:fg}});var Nl=y((F2,ql)=>{"use strict";var dg=xe().fromCallback,Fl=require("path"),jt=de(),kl=Le(),hg=kl.mkdirs,pg=kl.mkdirsSync,Tl=Dl(),mg=Tl.symlinkPaths,gg=Tl.symlinkPathsSync,Ml=Il(),yg=Ml.symlinkType,vg=Ml.symlinkTypeSync,Rl=rt().pathExists;function bg(t,e,r,n){n=typeof r=="function"?r:n,r=typeof r=="function"?!1:r,Rl(e,(i,o)=>{if(i)return n(i);if(o)return n(null);mg(t,e,(s,a)=>{if(s)return n(s);t=a.toDst,yg(a.toCwd,r,(c,d)=>{if(c)return n(c);let u=Fl.dirname(e);Rl(u,(p,g)=>{if(p)return n(p);if(g)return jt.symlink(t,e,d,n);hg(u,m=>{if(m)return n(m);jt.symlink(t,e,d,n)})})})})})}function wg(t,e,r){if(jt.existsSync(e))return;let i=gg(t,e);t=i.toDst,r=vg(i.toCwd,r);let o=Fl.dirname(e);return jt.existsSync(o)||pg(o),jt.symlinkSync(t,e,r)}ql.exports={createSymlink:dg(bg),createSymlinkSync:wg}});var Ll=y((k2,jl)=>{"use strict";var pn=wl(),mn=Cl(),gn=Nl();jl.exports={createFile:pn.createFile,createFileSync:pn.createFileSync,ensureFile:pn.createFile,ensureFileSync:pn.createFileSync,createLink:mn.createLink,createLinkSync:mn.createLinkSync,ensureLink:mn.createLink,ensureLinkSync:mn.createLinkSync,createSymlink:gn.createSymlink,createSymlinkSync:gn.createSymlinkSync,ensureSymlink:gn.createSymlink,ensureSymlinkSync:gn.createSymlinkSync}});var yn=y((T2,$l)=>{function _g(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 xg(t){return Buffer.isBuffer(t)&&(t=t.toString("utf8")),t.replace(/^\uFEFF/,"")}$l.exports={stringify:_g,stripBom:xg}});var Gl=y((M2,Xl)=>{var Lt;try{Lt=de()}catch{Lt=require("fs")}var vn=xe(),{stringify:Bl,stripBom:Ul}=yn();async function Sg(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||Lt,n="throws"in e?e.throws:!0,i=await vn.fromCallback(r.readFile)(t,e);i=Ul(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 Eg=vn.fromPromise(Sg);function Cg(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=Ul(i),JSON.parse(i,e.reviver)}catch(i){if(n)throw i.message=`${t}: ${i.message}`,i;return null}}async function Pg(t,e,r={}){let n=r.fs||Lt,i=Bl(e,r);await vn.fromCallback(n.writeFile)(t,i,r)}var Dg=vn.fromPromise(Pg);function Og(t,e,r={}){let n=r.fs||Lt,i=Bl(e,r);return n.writeFileSync(t,i,r)}var Ag={readFile:Eg,readFileSync:Cg,writeFile:Dg,writeFileSync:Og};Xl.exports=Ag});var Wl=y((q2,Hl)=>{"use strict";var bn=Gl();Hl.exports={readJson:bn.readFile,readJsonSync:bn.readFileSync,writeJson:bn.writeFile,writeJsonSync:bn.writeFileSync}});var wn=y((N2,Vl)=>{"use strict";var Ig=xe().fromCallback,mr=de(),zl=require("path"),Jl=Le(),Rg=rt().pathExists;function Fg(t,e,r,n){typeof r=="function"&&(n=r,r="utf8");let i=zl.dirname(t);Rg(i,(o,s)=>{if(o)return n(o);if(s)return mr.writeFile(t,e,r,n);Jl.mkdirs(i,a=>{if(a)return n(a);mr.writeFile(t,e,r,n)})})}function kg(t,...e){let r=zl.dirname(t);if(mr.existsSync(r))return mr.writeFileSync(t,...e);Jl.mkdirsSync(r),mr.writeFileSync(t,...e)}Vl.exports={outputFile:Ig(Fg),outputFileSync:kg}});var Kl=y((j2,Yl)=>{"use strict";var{stringify:Tg}=yn(),{outputFile:Mg}=wn();async function qg(t,e,r={}){let n=Tg(e,r);await Mg(t,n,r)}Yl.exports=qg});var Zl=y((L2,Ql)=>{"use strict";var{stringify:Ng}=yn(),{outputFileSync:jg}=wn();function Lg(t,e,r){let n=Ng(e,r);jg(t,n,r)}Ql.exports=Lg});var tf=y(($2,ef)=>{"use strict";var $g=xe().fromPromise,ye=Wl();ye.outputJson=$g(Kl());ye.outputJsonSync=Zl();ye.outputJSON=ye.outputJson;ye.outputJSONSync=ye.outputJsonSync;ye.writeJSON=ye.writeJson;ye.writeJSONSync=ye.writeJsonSync;ye.readJSON=ye.readJson;ye.readJSONSync=ye.readJsonSync;ef.exports=ye});var cf=y((B2,af)=>{"use strict";var of=de(),Bg=require("path"),Ug=ao().copySync,sf=hr().removeSync,Xg=Le().mkdirpSync,rf=ar();function Gg(t,e,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:i}=rf.checkPathsSync(t,e,"move");return rf.checkParentPathsSync(t,i,e,"move"),Xg(Bg.dirname(e)),Hg(t,e,n)}function Hg(t,e,r){if(r)return sf(e),nf(t,e,r);if(of.existsSync(e))throw new Error("dest already exists.");return nf(t,e,r)}function nf(t,e,r){try{of.renameSync(t,e)}catch(n){if(n.code!=="EXDEV")throw n;return Wg(t,e,r)}}function Wg(t,e,r){return Ug(t,e,{overwrite:r,errorOnExist:!0}),sf(t)}af.exports=Gg});var lf=y((U2,uf)=>{"use strict";uf.exports={moveSync:cf()}});var mf=y((X2,pf)=>{"use strict";var zg=de(),Jg=require("path"),Vg=uo().copy,hf=hr().remove,Yg=Le().mkdirp,Kg=rt().pathExists,ff=ar();function Qg(t,e,r,n){typeof r=="function"&&(n=r,r={});let i=r.overwrite||r.clobber||!1;ff.checkPaths(t,e,"move",(o,s)=>{if(o)return n(o);let{srcStat:a}=s;ff.checkParentPaths(t,a,e,"move",c=>{if(c)return n(c);Yg(Jg.dirname(e),d=>d?n(d):Zg(t,e,i,n))})})}function Zg(t,e,r,n){if(r)return hf(e,i=>i?n(i):df(t,e,r,n));Kg(e,(i,o)=>i?n(i):o?n(new Error("dest already exists.")):df(t,e,r,n))}function df(t,e,r,n){zg.rename(t,e,i=>i?i.code!=="EXDEV"?n(i):ey(t,e,r,n):n())}function ey(t,e,r,n){Vg(t,e,{overwrite:r,errorOnExist:!0},o=>o?n(o):hf(t,n))}pf.exports=Qg});var yf=y((G2,gf)=>{"use strict";var ty=xe().fromCallback;gf.exports={move:ty(mf())}});var $t=y((H2,fo)=>{"use strict";fo.exports={...sr(),...ao(),...uo(),...gl(),...Ll(),...tf(),...Le(),...lf(),...yf(),...wn(),...rt(),...hr()};var vf=require("fs");Object.getOwnPropertyDescriptor(vf,"promises")&&Object.defineProperty(fo.exports,"promises",{get(){return vf.promises}})});var Df=y((z2,Pf)=>{"use strict";Pf.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 mo=y((J2,Af)=>{var gr=Df(),Of={};for(let t of Object.keys(gr))Of[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"]}};Af.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 d=(i+o)/2;return o===i?c=0:d<=.5?c=s/(o+i):c=s/(2-o-i),[a,c*100,d*100]};O.rgb.hsv=function(t){let e,r,n,i,o,s=t[0]/255,a=t[1]/255,c=t[2]/255,d=Math.max(s,a,c),u=d-Math.min(s,a,c),p=function(g){return(d-g)/6/u+1/2};return u===0?(i=0,o=0):(o=u/d,e=p(s),r=p(a),n=p(c),s===d?i=n-r:a===d?i=1/3+e-n:c===d&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,d*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 ny(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=Of[t];if(e)return e;let r=1/0,n;for(let i of Object.keys(gr)){let o=gr[i],s=ny(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 d=0;d<3;d++)o=e+1/3*-(d-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[d]=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),d,u,p;switch(s){default:case 6:case 0:d=a,u=c,p=r;break;case 1:d=c,u=a,p=r;break;case 2:d=r,u=a,p=c;break;case 3:d=r,u=c,p=a;break;case 4:d=c,u=r,p=a;break;case 5:d=a,u=r,p=c;break}return[d*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,d=s**3;return o=a>.008856?a:(o-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,s=d>.008856?d:(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 Rf=y((V2,If)=>{var xn=mo();function iy(){let t={},e=Object.keys(xn);for(let r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function oy(t){let e=iy(),r=[t];for(e[t].distance=0;r.length;){let n=r.pop(),i=Object.keys(xn[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 sy(t,e){return function(r){return e(t(r))}}function ay(t,e){let r=[e[t].parent,t],n=xn[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=sy(xn[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}If.exports=function(t){let e=oy(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]=ay(s,e))}return r}});var kf=y((Y2,Ff)=>{var go=mo(),cy=Rf(),Bt={},uy=Object.keys(go);function ly(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 fy(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}uy.forEach(t=>{Bt[t]={},Object.defineProperty(Bt[t],"channels",{value:go[t].channels}),Object.defineProperty(Bt[t],"labels",{value:go[t].labels});let e=cy(t);Object.keys(e).forEach(n=>{let i=e[n];Bt[t][n]=fy(i),Bt[t][n].raw=ly(i)})});Ff.exports=Bt});var Lf=y((K2,jf)=>{"use strict";var Tf=(t,e)=>(...r)=>`\x1B[${t(...r)+e}m`,Mf=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};5;${n}m`},qf=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};2;${n[0]};${n[1]};${n[2]}m`},Sn=t=>t,Nf=(t,e,r)=>[t,e,r],Ut=(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})},yo,Xt=(t,e,r,n)=>{yo===void 0&&(yo=kf());let i=n?10:0,o={};for(let[s,a]of Object.entries(yo)){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 dy(){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",Ut(e.color,"ansi",()=>Xt(Tf,"ansi16",Sn,!1)),Ut(e.color,"ansi256",()=>Xt(Mf,"ansi256",Sn,!1)),Ut(e.color,"ansi16m",()=>Xt(qf,"rgb",Nf,!1)),Ut(e.bgColor,"ansi",()=>Xt(Tf,"ansi16",Sn,!0)),Ut(e.bgColor,"ansi256",()=>Xt(Mf,"ansi256",Sn,!0)),Ut(e.bgColor,"ansi16m",()=>Xt(qf,"rgb",Nf,!0)),e}Object.defineProperty(jf,"exports",{enumerable:!0,get:dy})});var Bf=y((Q2,$f)=>{"use strict";var hy=(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},py=(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`),hr.checkPaths(t,e,"copy",(i,o)=>{if(i)return n(i);let{srcStat:s,destStat:a}=o;hr.checkParentPaths(t,s,e,"copy",c=>c?n(c):r.filter?Yu(Wu,a,t,e,r,n):Wu(a,t,e,r,n))})}function Wu(t,e,r,n,i){let o=dr.dirname(r);Jm(o,(s,a)=>{if(s)return i(s);if(a)return fo(t,e,r,n,i);Hm(o,c=>c?i(c):fo(t,e,r,n,i))})}function Yu(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 fo(t,e,r,n,i){return n.filter?Yu(zu,t,e,r,n,i):zu(t,e,r,n,i)}function zu(t,e,r,n,i){(n.dereference?Ee.stat:Ee.lstat)(e,(s,a)=>{if(s)return i(s);if(a.isDirectory())return tg(a,t,e,r,n,i);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return Vm(a,t,e,r,n,i);if(a.isSymbolicLink())return ig(t,e,r,n,i)})}function Vm(t,e,r,n,i,o){return e?Ym(t,r,n,i,o):Ku(t,r,n,i,o)}function Ym(t,e,r,n,i){if(n.overwrite)Ee.unlink(r,o=>o?i(o):Ku(t,e,r,n,i));else return n.errorOnExist?i(new Error(`'${r}' already exists`)):i()}function Ku(t,e,r,n,i){Ee.copyFile(e,r,o=>o?i(o):n.preserveTimestamps?Km(t.mode,e,r,i):dn(r,t.mode,i))}function Km(t,e,r,n){return Qm(t)?Zm(r,t,i=>i?n(i):Vu(t,e,r,n)):Vu(t,e,r,n)}function Qm(t){return(t&128)===0}function Zm(t,e,r){return dn(t,e|128,r)}function Vu(t,e,r,n){eg(e,r,i=>i?n(i):dn(r,t,n))}function dn(t,e,r){return Ee.chmod(t,e,r)}function eg(t,e,r){Ee.stat(t,(n,i)=>n?r(n):Wm(e,i.atime,i.mtime,r))}function tg(t,e,r,n,i,o){return e?e&&!e.isDirectory()?o(new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`)):Qu(r,n,i,o):rg(t.mode,r,n,i,o)}function rg(t,e,r,n,i){Ee.mkdir(r,o=>{if(o)return i(o);Qu(e,r,n,s=>s?i(s):dn(r,t,i))})}function Qu(t,e,r,n){Ee.readdir(t,(i,o)=>i?n(i):Zu(o,t,e,r,n))}function Zu(t,e,r,n,i){let o=t.pop();return o?ng(t,o,e,r,n,i):i()}function ng(t,e,r,n,i,o){let s=dr.join(r,e),a=dr.join(n,e);hr.checkPaths(s,a,"copy",(c,d)=>{if(c)return o(c);let{destStat:u}=d;fo(u,s,a,i,p=>p?o(p):Zu(t,r,n,i,o))})}function ig(t,e,r,n,i){Ee.readlink(e,(o,s)=>{if(o)return i(o);if(n.dereference&&(s=dr.resolve(process.cwd(),s)),t)Ee.readlink(r,(a,c)=>a?a.code==="EINVAL"||a.code==="UNKNOWN"?Ee.symlink(s,r,i):i(a):(n.dereference&&(c=dr.resolve(process.cwd(),c)),hr.isSrcSubdir(s,c)?i(new Error(`Cannot copy '${s}' to a subdirectory of itself, '${c}'.`)):t.isDirectory()&&hr.isSrcSubdir(c,s)?i(new Error(`Cannot overwrite '${c}' with '${s}'.`)):og(s,r,i)));else return Ee.symlink(s,r,i)})}function og(t,e,r){Ee.unlink(e,n=>n?r(n):Ee.symlink(t,e,r))}el.exports=zm});var ho=y(($2,rl)=>{"use strict";var sg=xe().fromCallback;rl.exports={copy:sg(tl())}});var fl=y((B2,ll)=>{"use strict";var nl=de(),al=require("path"),H=require("assert"),pr=process.platform==="win32";function cl(t){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(r=>{t[r]=t[r]||nl[r],r=r+"Sync",t[r]=t[r]||nl[r]}),t.maxBusyTries=t.maxBusyTries||3}function po(t,e,r){let n=0;typeof e=="function"&&(r=e,e={}),H(t,"rimraf: missing path"),H.strictEqual(typeof t,"string","rimraf: path should be a string"),H.strictEqual(typeof r,"function","rimraf: callback function required"),H(e,"rimraf: invalid options argument provided"),H.strictEqual(typeof e,"object","rimraf: options should be object"),cl(e),il(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(()=>il(t,e,i),s)}o.code==="ENOENT"&&(o=null)}r(o)})}function il(t,e,r){H(t),H(e),H(typeof r=="function"),e.lstat(t,(n,i)=>{if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&pr)return ol(t,e,n,r);if(i&&i.isDirectory())return hn(t,e,n,r);e.unlink(t,o=>{if(o){if(o.code==="ENOENT")return r(null);if(o.code==="EPERM")return pr?ol(t,e,o,r):hn(t,e,o,r);if(o.code==="EISDIR")return hn(t,e,o,r)}return r(o)})})}function ol(t,e,r,n){H(t),H(e),H(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()?hn(t,e,r,n):e.unlink(t,n)})})}function sl(t,e,r){let n;H(t),H(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()?pn(t,e,r):e.unlinkSync(t)}function hn(t,e,r,n){H(t),H(e),H(typeof n=="function"),e.rmdir(t,i=>{i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")?ag(t,e,n):i&&i.code==="ENOTDIR"?n(r):n(i)})}function ag(t,e,r){H(t),H(e),H(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=>{po(al.join(t,a),e,c=>{if(!s){if(c)return r(s=c);--o===0&&e.rmdir(t,r)}})})})}function ul(t,e){let r;e=e||{},cl(e),H(t,"rimraf: missing path"),H.strictEqual(typeof t,"string","rimraf: path should be a string"),H(e,"rimraf: missing options"),H.strictEqual(typeof e,"object","rimraf: options should be object");try{r=e.lstatSync(t)}catch(n){if(n.code==="ENOENT")return;n.code==="EPERM"&&pr&&sl(t,e,n)}try{r&&r.isDirectory()?pn(t,e,null):e.unlinkSync(t)}catch(n){if(n.code==="ENOENT")return;if(n.code==="EPERM")return pr?sl(t,e,n):pn(t,e,n);if(n.code!=="EISDIR")throw n;pn(t,e,n)}}function pn(t,e,r){H(t),H(e);try{e.rmdirSync(t)}catch(n){if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")cg(t,e);else if(n.code!=="ENOENT")throw n}}function cg(t,e){if(H(t),H(e),e.readdirSync(t).forEach(r=>ul(al.join(t,r),e)),pr){let r=Date.now();do try{return e.rmdirSync(t,e)}catch{}while(Date.now()-r<500)}else return e.rmdirSync(t,e)}ll.exports=po;po.sync=ul});var mr=y((U2,hl)=>{"use strict";var ug=xe().fromCallback,dl=fl();hl.exports={remove:ug(dl),removeSync:dl.sync}});var _l=y((X2,wl)=>{"use strict";var lg=xe().fromCallback,gl=de(),yl=require("path"),vl=Le(),bl=mr(),pl=lg(function(e,r){r=r||function(){},gl.readdir(e,(n,i)=>{if(n)return vl.mkdirs(e,r);i=i.map(s=>yl.join(e,s)),o();function o(){let s=i.pop();if(!s)return r();bl.remove(s,a=>{if(a)return r(a);o()})}})});function ml(t){let e;try{e=gl.readdirSync(t)}catch{return vl.mkdirsSync(t)}e.forEach(r=>{r=yl.join(t,r),bl.removeSync(r)})}wl.exports={emptyDirSync:ml,emptydirSync:ml,emptyDir:pl,emptydir:pl}});var Cl=y((G2,El)=>{"use strict";var fg=xe().fromCallback,xl=require("path"),nt=de(),Sl=Le();function dg(t,e){function r(){nt.writeFile(t,"",n=>{if(n)return e(n);e()})}nt.stat(t,(n,i)=>{if(!n&&i.isFile())return e();let o=xl.dirname(t);nt.stat(o,(s,a)=>{if(s)return s.code==="ENOENT"?Sl.mkdirs(o,c=>{if(c)return e(c);r()}):e(s);a.isDirectory()?r():nt.readdir(o,c=>{if(c)return e(c)})})})}function hg(t){let e;try{e=nt.statSync(t)}catch{}if(e&&e.isFile())return;let r=xl.dirname(t);try{nt.statSync(r).isDirectory()||nt.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")Sl.mkdirsSync(r);else throw n}nt.writeFileSync(t,"")}El.exports={createFile:fg(dg),createFileSync:hg}});var Il=y((H2,Al)=>{"use strict";var pg=xe().fromCallback,Dl=require("path"),gt=de(),Ol=Le(),Pl=rt().pathExists;function mg(t,e,r){function n(i,o){gt.link(i,o,s=>{if(s)return r(s);r(null)})}Pl(e,(i,o)=>{if(i)return r(i);if(o)return r(null);gt.lstat(t,s=>{if(s)return s.message=s.message.replace("lstat","ensureLink"),r(s);let a=Dl.dirname(e);Pl(a,(c,d)=>{if(c)return r(c);if(d)return n(t,e);Ol.mkdirs(a,u=>{if(u)return r(u);n(t,e)})})})})}function gg(t,e){if(gt.existsSync(e))return;try{gt.lstatSync(t)}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let n=Dl.dirname(e);return gt.existsSync(n)||Ol.mkdirsSync(n),gt.linkSync(t,e)}Al.exports={createLink:pg(mg),createLinkSync:gg}});var Fl=y((J2,Rl)=>{"use strict";var it=require("path"),gr=de(),yg=rt().pathExists;function vg(t,e,r){if(it.isAbsolute(t))return gr.lstat(t,n=>n?(n.message=n.message.replace("lstat","ensureSymlink"),r(n)):r(null,{toCwd:t,toDst:t}));{let n=it.dirname(e),i=it.join(n,t);return yg(i,(o,s)=>o?r(o):s?r(null,{toCwd:i,toDst:t}):gr.lstat(t,a=>a?(a.message=a.message.replace("lstat","ensureSymlink"),r(a)):r(null,{toCwd:t,toDst:it.relative(n,t)})))}}function bg(t,e){let r;if(it.isAbsolute(t)){if(r=gr.existsSync(t),!r)throw new Error("absolute srcpath does not exist");return{toCwd:t,toDst:t}}else{let n=it.dirname(e),i=it.join(n,t);if(r=gr.existsSync(i),r)return{toCwd:i,toDst:t};if(r=gr.existsSync(t),!r)throw new Error("relative srcpath does not exist");return{toCwd:t,toDst:it.relative(n,t)}}}Rl.exports={symlinkPaths:vg,symlinkPathsSync:bg}});var Ml=y((W2,Tl)=>{"use strict";var kl=de();function wg(t,e,r){if(r=typeof e=="function"?e:r,e=typeof e=="function"?!1:e,e)return r(null,e);kl.lstat(t,(n,i)=>{if(n)return r(null,"file");e=i&&i.isDirectory()?"dir":"file",r(null,e)})}function _g(t,e){let r;if(e)return e;try{r=kl.lstatSync(t)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}Tl.exports={symlinkType:wg,symlinkTypeSync:_g}});var Ul=y((z2,Bl)=>{"use strict";var xg=xe().fromCallback,Nl=require("path"),jt=de(),jl=Le(),Sg=jl.mkdirs,Eg=jl.mkdirsSync,Ll=Fl(),Cg=Ll.symlinkPaths,Pg=Ll.symlinkPathsSync,$l=Ml(),Dg=$l.symlinkType,Og=$l.symlinkTypeSync,ql=rt().pathExists;function Ag(t,e,r,n){n=typeof r=="function"?r:n,r=typeof r=="function"?!1:r,ql(e,(i,o)=>{if(i)return n(i);if(o)return n(null);Cg(t,e,(s,a)=>{if(s)return n(s);t=a.toDst,Dg(a.toCwd,r,(c,d)=>{if(c)return n(c);let u=Nl.dirname(e);ql(u,(p,g)=>{if(p)return n(p);if(g)return jt.symlink(t,e,d,n);Sg(u,m=>{if(m)return n(m);jt.symlink(t,e,d,n)})})})})})}function Ig(t,e,r){if(jt.existsSync(e))return;let i=Pg(t,e);t=i.toDst,r=Og(i.toCwd,r);let o=Nl.dirname(e);return jt.existsSync(o)||Eg(o),jt.symlinkSync(t,e,r)}Bl.exports={createSymlink:xg(Ag),createSymlinkSync:Ig}});var Gl=y((V2,Xl)=>{"use strict";var mn=Cl(),gn=Il(),yn=Ul();Xl.exports={createFile:mn.createFile,createFileSync:mn.createFileSync,ensureFile:mn.createFile,ensureFileSync:mn.createFileSync,createLink:gn.createLink,createLinkSync:gn.createLinkSync,ensureLink:gn.createLink,ensureLinkSync:gn.createLinkSync,createSymlink:yn.createSymlink,createSymlinkSync:yn.createSymlinkSync,ensureSymlink:yn.createSymlink,ensureSymlinkSync:yn.createSymlinkSync}});var vn=y((Y2,Hl)=>{function Rg(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 Fg(t){return Buffer.isBuffer(t)&&(t=t.toString("utf8")),t.replace(/^\uFEFF/,"")}Hl.exports={stringify:Rg,stripBom:Fg}});var Vl=y((K2,zl)=>{var Lt;try{Lt=de()}catch{Lt=require("fs")}var bn=xe(),{stringify:Jl,stripBom:Wl}=vn();async function kg(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||Lt,n="throws"in e?e.throws:!0,i=await bn.fromCallback(r.readFile)(t,e);i=Wl(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 Tg=bn.fromPromise(kg);function Mg(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=Wl(i),JSON.parse(i,e.reviver)}catch(i){if(n)throw i.message=`${t}: ${i.message}`,i;return null}}async function qg(t,e,r={}){let n=r.fs||Lt,i=Jl(e,r);await bn.fromCallback(n.writeFile)(t,i,r)}var Ng=bn.fromPromise(qg);function jg(t,e,r={}){let n=r.fs||Lt,i=Jl(e,r);return n.writeFileSync(t,i,r)}var Lg={readFile:Tg,readFileSync:Mg,writeFile:Ng,writeFileSync:jg};zl.exports=Lg});var Kl=y((Q2,Yl)=>{"use strict";var wn=Vl();Yl.exports={readJson:wn.readFile,readJsonSync:wn.readFileSync,writeJson:wn.writeFile,writeJsonSync:wn.writeFileSync}});var _n=y((Z2,ef)=>{"use strict";var $g=xe().fromCallback,yr=de(),Ql=require("path"),Zl=Le(),Bg=rt().pathExists;function Ug(t,e,r,n){typeof r=="function"&&(n=r,r="utf8");let i=Ql.dirname(t);Bg(i,(o,s)=>{if(o)return n(o);if(s)return yr.writeFile(t,e,r,n);Zl.mkdirs(i,a=>{if(a)return n(a);yr.writeFile(t,e,r,n)})})}function Xg(t,...e){let r=Ql.dirname(t);if(yr.existsSync(r))return yr.writeFileSync(t,...e);Zl.mkdirsSync(r),yr.writeFileSync(t,...e)}ef.exports={outputFile:$g(Ug),outputFileSync:Xg}});var rf=y((ew,tf)=>{"use strict";var{stringify:Gg}=vn(),{outputFile:Hg}=_n();async function Jg(t,e,r={}){let n=Gg(e,r);await Hg(t,n,r)}tf.exports=Jg});var of=y((tw,nf)=>{"use strict";var{stringify:Wg}=vn(),{outputFileSync:zg}=_n();function Vg(t,e,r){let n=Wg(e,r);zg(t,n,r)}nf.exports=Vg});var af=y((rw,sf)=>{"use strict";var Yg=xe().fromPromise,ye=Kl();ye.outputJson=Yg(rf());ye.outputJsonSync=of();ye.outputJSON=ye.outputJson;ye.outputJSONSync=ye.outputJsonSync;ye.writeJSON=ye.writeJson;ye.writeJSONSync=ye.writeJsonSync;ye.readJSON=ye.readJson;ye.readJSONSync=ye.readJsonSync;sf.exports=ye});var hf=y((nw,df)=>{"use strict";var lf=de(),Kg=require("path"),Qg=lo().copySync,ff=mr().removeSync,Zg=Le().mkdirpSync,cf=ur();function ey(t,e,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:i}=cf.checkPathsSync(t,e,"move");return cf.checkParentPathsSync(t,i,e,"move"),Zg(Kg.dirname(e)),ty(t,e,n)}function ty(t,e,r){if(r)return ff(e),uf(t,e,r);if(lf.existsSync(e))throw new Error("dest already exists.");return uf(t,e,r)}function uf(t,e,r){try{lf.renameSync(t,e)}catch(n){if(n.code!=="EXDEV")throw n;return ry(t,e,r)}}function ry(t,e,r){return Qg(t,e,{overwrite:r,errorOnExist:!0}),ff(t)}df.exports=ey});var mf=y((iw,pf)=>{"use strict";pf.exports={moveSync:hf()}});var wf=y((ow,bf)=>{"use strict";var ny=de(),iy=require("path"),oy=ho().copy,vf=mr().remove,sy=Le().mkdirp,ay=rt().pathExists,gf=ur();function cy(t,e,r,n){typeof r=="function"&&(n=r,r={});let i=r.overwrite||r.clobber||!1;gf.checkPaths(t,e,"move",(o,s)=>{if(o)return n(o);let{srcStat:a}=s;gf.checkParentPaths(t,a,e,"move",c=>{if(c)return n(c);sy(iy.dirname(e),d=>d?n(d):uy(t,e,i,n))})})}function uy(t,e,r,n){if(r)return vf(e,i=>i?n(i):yf(t,e,r,n));ay(e,(i,o)=>i?n(i):o?n(new Error("dest already exists.")):yf(t,e,r,n))}function yf(t,e,r,n){ny.rename(t,e,i=>i?i.code!=="EXDEV"?n(i):ly(t,e,r,n):n())}function ly(t,e,r,n){oy(t,e,{overwrite:r,errorOnExist:!0},o=>o?n(o):vf(t,n))}bf.exports=cy});var xf=y((sw,_f)=>{"use strict";var fy=xe().fromCallback;_f.exports={move:fy(wf())}});var $t=y((aw,mo)=>{"use strict";mo.exports={...cr(),...lo(),...ho(),..._l(),...Gl(),...af(),...Le(),...mf(),...xf(),..._n(),...rt(),...mr()};var Sf=require("fs");Object.getOwnPropertyDescriptor(Sf,"promises")&&Object.defineProperty(mo.exports,"promises",{get(){return Sf.promises}})});var Ff=y((uw,Rf)=>{"use strict";Rf.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 vo=y((lw,Tf)=>{var vr=Ff(),kf={};for(let t of Object.keys(vr))kf[vr[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"]}};Tf.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 d=(i+o)/2;return o===i?c=0:d<=.5?c=s/(o+i):c=s/(2-o-i),[a,c*100,d*100]};O.rgb.hsv=function(t){let e,r,n,i,o,s=t[0]/255,a=t[1]/255,c=t[2]/255,d=Math.max(s,a,c),u=d-Math.min(s,a,c),p=function(g){return(d-g)/6/u+1/2};return u===0?(i=0,o=0):(o=u/d,e=p(s),r=p(a),n=p(c),s===d?i=n-r:a===d?i=1/3+e-n:c===d&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,d*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 hy(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=kf[t];if(e)return e;let r=1/0,n;for(let i of Object.keys(vr)){let o=vr[i],s=hy(t,o);s<r&&(r=s,n=i)}return n};O.keyword.rgb=function(t){return vr[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 d=0;d<3;d++)o=e+1/3*-(d-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[d]=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),d,u,p;switch(s){default:case 6:case 0:d=a,u=c,p=r;break;case 1:d=c,u=a,p=r;break;case 2:d=r,u=a,p=c;break;case 3:d=r,u=c,p=a;break;case 4:d=c,u=r,p=a;break;case 5:d=a,u=r,p=c;break}return[d*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,d=s**3;return o=a>.008856?a:(o-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,s=d>.008856?d:(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 qf=y((fw,Mf)=>{var Sn=vo();function py(){let t={},e=Object.keys(Sn);for(let r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function my(t){let e=py(),r=[t];for(e[t].distance=0;r.length;){let n=r.pop(),i=Object.keys(Sn[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 gy(t,e){return function(r){return e(t(r))}}function yy(t,e){let r=[e[t].parent,t],n=Sn[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=gy(Sn[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}Mf.exports=function(t){let e=my(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]=yy(s,e))}return r}});var jf=y((dw,Nf)=>{var bo=vo(),vy=qf(),Bt={},by=Object.keys(bo);function wy(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 _y(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}by.forEach(t=>{Bt[t]={},Object.defineProperty(Bt[t],"channels",{value:bo[t].channels}),Object.defineProperty(Bt[t],"labels",{value:bo[t].labels});let e=vy(t);Object.keys(e).forEach(n=>{let i=e[n];Bt[t][n]=_y(i),Bt[t][n].raw=wy(i)})});Nf.exports=Bt});var Gf=y((hw,Xf)=>{"use strict";var Lf=(t,e)=>(...r)=>`\x1B[${t(...r)+e}m`,$f=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};5;${n}m`},Bf=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};2;${n[0]};${n[1]};${n[2]}m`},En=t=>t,Uf=(t,e,r)=>[t,e,r],Ut=(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})},wo,Xt=(t,e,r,n)=>{wo===void 0&&(wo=jf());let i=n?10:0,o={};for(let[s,a]of Object.entries(wo)){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 xy(){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",Ut(e.color,"ansi",()=>Xt(Lf,"ansi16",En,!1)),Ut(e.color,"ansi256",()=>Xt($f,"ansi256",En,!1)),Ut(e.color,"ansi16m",()=>Xt(Bf,"rgb",Uf,!1)),Ut(e.bgColor,"ansi",()=>Xt(Lf,"ansi16",En,!0)),Ut(e.bgColor,"ansi256",()=>Xt($f,"ansi256",En,!0)),Ut(e.bgColor,"ansi16m",()=>Xt(Bf,"rgb",Uf,!0)),e}Object.defineProperty(Xf,"exports",{enumerable:!0,get:xy})});var Jf=y((pw,Hf)=>{"use strict";var Sy=(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},Ey=(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};$f.exports={stringReplaceAll:hy,stringEncaseCRLFWithFirstIndex:py}});var Wf=y((Z2,Hf)=>{"use strict";var my=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Uf=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,gy=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,yy=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,vy=new Map([["n",`
19
- `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Gf(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)):vy.get(t)||t}function by(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(gy))r.push(i[2].replace(yy,(a,c,d)=>c?Gf(c):d));else throw new Error(`Invalid Chalk template style argument: ${o} (in style '${t}')`)}return r}function wy(t){Uf.lastIndex=0;let e=[],r;for(;(r=Uf.exec(t))!==null;){let n=r[1];if(r[2]){let i=by(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function Xf(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}Hf.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(my,(o,s,a,c,d,u)=>{if(s)i.push(Gf(s));else if(c){let p=i.join("");i=[],n.push(r.length===0?p:Xf(t,r)(p)),r.push({inverse:a,styles:wy(c)})}else if(d){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(Xf(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 Zf=y((ew,Qf)=>{"use strict";var yr=Lf(),{stdout:bo,stderr:wo}=Si(),{stringReplaceAll:_y,stringEncaseCRLFWithFirstIndex:xy}=Bf(),{isArray:En}=Array,Jf=["ansi","ansi","ansi256","ansi16m"],Gt=Object.create(null),Sy=(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=bo?bo.level:0;t.level=e.level===void 0?r:e.level},_o=class{constructor(e){return Vf(e)}},Vf=t=>{let e={};return Sy(e,t),e.template=(...r)=>Kf(e.template,...r),Object.setPrototypeOf(e,Cn.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=_o,e.template};function Cn(t){return Vf(t)}for(let[t,e]of Object.entries(yr))Gt[t]={get(){let r=Pn(this,xo(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Gt.visible={get(){let t=Pn(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var Yf=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of Yf)Gt[t]={get(){let{level:e}=this;return function(...r){let n=xo(yr.color[Jf[e]][t](...r),yr.color.close,this._styler);return Pn(this,n,this._isEmpty)}}};for(let t of Yf){let e="bg"+t[0].toUpperCase()+t.slice(1);Gt[e]={get(){let{level:r}=this;return function(...n){let i=xo(yr.bgColor[Jf[r]][t](...n),yr.bgColor.close,this._styler);return Pn(this,i,this._isEmpty)}}}}var Ey=Object.defineProperties(()=>{},{...Gt,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),xo=(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)=>En(i[0])&&En(i[0].raw)?zf(n,Kf(n,...i)):zf(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,Ey),n._generator=t,n._styler=e,n._isEmpty=r,n},zf=(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=_y(e,r.close,r.open),r=r.parent;let o=e.indexOf(`
20
- `);return o!==-1&&(e=xy(e,i,n,o)),n+e+i},vo,Kf=(t,...e)=>{let[r]=e;if(!En(r)||!En(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 vo===void 0&&(vo=Wf()),vo(t,i.join(""))};Object.defineProperties(Cn.prototype,Gt);var Dn=Cn();Dn.supportsColor=bo;Dn.stderr=Cn({level:wo?wo.level:0});Dn.stderr.supportsColor=wo;Qf.exports=Dn});var ed=y((So,Eo)=>{(function(t,e){typeof So=="object"&&typeof Eo<"u"?Eo.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.tinycolor=e())})(So,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 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=h.format||f.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=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 h=this.toRgb();return(h.r*299+h.g*587+h.b*114)/1e3},getLuminance:function(){var h=this.toRgb(),f,v,S,_,j,U;return f=h.r/255,v=h.g/255,S=h.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?U=S/12.92:U=Math.pow((S+.055)/1.055,2.4),.2126*_+.7152*j+.0722*U},setAlpha:function(h){return this._a=X(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),f=Math.round(h.h*360),v=Math.round(h.s*100),S=Math.round(h.v*100);return this._a==1?"hsv("+f+", "+v+"%, "+S+"%)":"hsva("+f+", "+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),f=Math.round(h.h*360),v=Math.round(h.s*100),S=Math.round(h.l*100);return this._a==1?"hsl("+f+", "+v+"%, "+S+"%)":"hsla("+f+", "+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(R(this._r,255)*100)+"%",g:Math.round(R(this._g,255)*100)+"%",b:Math.round(R(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(R(this._r,255)*100)+"%, "+Math.round(R(this._g,255)*100)+"%, "+Math.round(R(this._b,255)*100)+"%)":"rgba("+Math.round(R(this._r,255)*100)+"%, "+Math.round(R(this._g,255)*100)+"%, "+Math.round(R(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 f="#"+g(this._r,this._g,this._b,this._a),v=f,S=this._gradientType?"GradientType = 1, ":"";if(h){var _=n(h);v="#"+g(_._r,_._g,_._b,_._a)}return"progid:DXImageTransform.Microsoft.gradient("+S+"startColorstr="+f+",endColorstr="+v+")"},toString:function(h){var f=!!h;h=h||this._format;var v=!1,S=this._a<1&&this._a>=0,_=!f&&S&&(h==="hex"||h==="hex6"||h==="hex3"||h==="hex4"||h==="hex8"||h==="name");return _?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,f){var v=h.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(P,arguments)},brighten:function(){return this._applyModification(F,arguments)},darken:function(){return this._applyModification(N,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(C,arguments)},spin:function(){return this._applyModification(G,arguments)},_applyCombination:function(h,f){return h.apply(null,[this].concat([].slice.call(f)))},analogous:function(){return this._applyCombination(be,arguments)},complement:function(){return this._applyCombination(B,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 f={};for(var v in l)l.hasOwnProperty(v)&&(v==="a"?f[v]=l[v]:f[v]=T(l[v]));l=f}return n(l,h)};function i(l){var h={r:0,g:0,b:0},f=1,v=null,S=null,_=null,j=!1,U=!1;return typeof l=="string"&&(l=xt(l)),t(l)=="object"&&(ce(l.r)&&ce(l.g)&&ce(l.b)?(h=o(l.r,l.g,l.b),j=!0,U=String(l.r).substr(-1)==="%"?"prgb":"rgb"):ce(l.h)&&ce(l.s)&&ce(l.v)?(v=T(l.s),S=T(l.v),h=d(l.h,v,S),j=!0,U="hsv"):ce(l.h)&&ce(l.s)&&ce(l.l)&&(v=T(l.s),_=T(l.l),h=a(l.h,v,_),j=!0,U="hsl"),l.hasOwnProperty("a")&&(f=l.a)),f=X(f),{ok:j,format:l.format||U,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:f}}function o(l,h,f){return{r:R(l,255)*255,g:R(h,255)*255,b:R(f,255)*255}}function s(l,h,f){l=R(l,255),h=R(h,255),f=R(f,255);var v=Math.max(l,h,f),S=Math.min(l,h,f),_,j,U=(v+S)/2;if(v==S)_=j=0;else{var W=v-S;switch(j=U>.5?W/(2-v-S):W/(v+S),v){case l:_=(h-f)/W+(h<f?6:0);break;case h:_=(f-l)/W+2;break;case f:_=(l-h)/W+4;break}_/=6}return{h:_,s:j,l:U}}function a(l,h,f){var v,S,_;l=R(l,360),h=R(h,100),f=R(f,100);function j(_e,ue,qe){return qe<0&&(qe+=1),qe>1&&(qe-=1),qe<1/6?_e+(ue-_e)*6*qe:qe<1/2?ue:qe<2/3?_e+(ue-_e)*(2/3-qe)*6:_e}if(h===0)v=S=_=f;else{var U=f<.5?f*(1+h):f+h-f*h,W=2*f-U;v=j(W,U,l+1/3),S=j(W,U,l),_=j(W,U,l-1/3)}return{r:v*255,g:S*255,b:_*255}}function c(l,h,f){l=R(l,255),h=R(h,255),f=R(f,255);var v=Math.max(l,h,f),S=Math.min(l,h,f),_,j,U=v,W=v-S;if(j=v===0?0:W/v,v==S)_=0;else{switch(v){case l:_=(h-f)/W+(h<f?6:0);break;case h:_=(f-l)/W+2;break;case f:_=(l-h)/W+4;break}_/=6}return{h:_,s:j,v:U}}function d(l,h,f){l=R(l,360)*6,h=R(h,100),f=R(f,100);var v=Math.floor(l),S=l-v,_=f*(1-h),j=f*(1-S*h),U=f*(1-(1-S)*h),W=v%6,_e=[f,j,_,_,U,f][W],ue=[U,f,f,j,_,_][W],qe=[_,_,U,f,f,j][W];return{r:_e*255,g:ue*255,b:qe*255}}function u(l,h,f,v){var S=[A(Math.round(l).toString(16)),A(Math.round(h).toString(16)),A(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,h,f,v,S){var _=[A(Math.round(l).toString(16)),A(Math.round(h).toString(16)),A(Math.round(f).toString(16)),A(Me(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,h,f,v){var S=[A(Me(v)),A(Math.round(l).toString(16)),A(Math.round(h).toString(16)),A(Math.round(f).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 f=n(l).toHsl();return f.s-=h/100,f.s=L(f.s),n(f)}function b(l,h){h=h===0?0:h||10;var f=n(l).toHsl();return f.s+=h/100,f.s=L(f.s),n(f)}function C(l){return n(l).desaturate(100)}function P(l,h){h=h===0?0:h||10;var f=n(l).toHsl();return f.l+=h/100,f.l=L(f.l),n(f)}function F(l,h){h=h===0?0:h||10;var f=n(l).toRgb();return f.r=Math.max(0,Math.min(255,f.r-Math.round(255*-(h/100)))),f.g=Math.max(0,Math.min(255,f.g-Math.round(255*-(h/100)))),f.b=Math.max(0,Math.min(255,f.b-Math.round(255*-(h/100)))),n(f)}function N(l,h){h=h===0?0:h||10;var f=n(l).toHsl();return f.l-=h/100,f.l=L(f.l),n(f)}function G(l,h){var f=n(l).toHsl(),v=(f.h+h)%360;return f.h=v<0?360+v:v,n(f)}function B(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 f=n(l).toHsl(),v=[n(l)],S=360/h,_=1;_<h;_++)v.push(n({h:(f.h+_*S)%360,s:f.s,l:f.l}));return v}function ae(l){var h=n(l).toHsl(),f=h.h;return[n(l),n({h:(f+72)%360,s:h.s,l:h.l}),n({h:(f+216)%360,s:h.s,l:h.l})]}function be(l,h,f){h=h||6,f=f||30;var v=n(l).toHsl(),S=360/f,_=[n(l)];for(v.h=(v.h-(S*h>>1)+720)%360;--h;)v.h=(v.h+S)%360,_.push(n(v));return _}function K(l,h){h=h||6;for(var f=n(l).toHsv(),v=f.h,S=f.s,_=f.v,j=[],U=1/h;h--;)j.push(n({h:v,s:S,v:_})),_=(_+U)%1;return j}n.mix=function(l,h,f){f=f===0?0:f||50;var v=n(l).toRgb(),S=n(h).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,h){var f=n(l),v=n(h);return(Math.max(f.getLuminance(),v.getLuminance())+.05)/(Math.min(f.getLuminance(),v.getLuminance())+.05)},n.isReadable=function(l,h,f){var v=n.readability(l,h),S,_;switch(_=!1,S=we(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,h,f){var v=null,S=0,_,j,U,W;f=f||{},j=f.includeFallbackColors,U=f.level,W=f.size;for(var _e=0;_e<h.length;_e++)_=n.readability(l,h[_e]),_>S&&(S=_,v=n(h[_e]));return n.isReadable(l,v,{level:U,size:W})||!j?v:(f.includeFallbackColors=!1,n.mostReadable(l,["#fff","#000"],f))};var w=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=E(w);function E(l){var h={};for(var f in l)l.hasOwnProperty(f)&&(h[l[f]]=f);return h}function X(l){return l=parseFloat(l),(isNaN(l)||l<0||l>1)&&(l=1),l}function R(l,h){$(l)&&(l="100%");var f=k(l);return l=Math.min(h,Math.max(0,parseFloat(l))),f&&(l=parseInt(l*h,10)/100),Math.abs(l-h)<1e-6?1:l%h/parseFloat(h)}function L(l){return Math.min(1,Math.max(0,l))}function I(l){return parseInt(l,16)}function $(l){return typeof l=="string"&&l.indexOf(".")!=-1&&parseFloat(l)===1}function k(l){return typeof l=="string"&&l.indexOf("%")!=-1}function A(l){return l.length==1?"0"+l:""+l}function T(l){return l<=1&&(l=l*100+"%"),l}function Me(l){return Math.round(parseFloat(l)*255).toString(16)}function Ge(l){return I(l)/255}var Z=function(){var l="[-\\+]?\\d+%?",h="[-\\+]?\\d*\\.\\d+%?",f="(?:"+h+")|(?:"+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 ce(l){return!!Z.CSS_UNIT.exec(l)}function xt(l){l=l.replace(e,"").replace(r,"").toLowerCase();var h=!1;if(w[l])l=w[l],h=!0;else if(l=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var f;return(f=Z.rgb.exec(l))?{r:f[1],g:f[2],b:f[3]}:(f=Z.rgba.exec(l))?{r:f[1],g:f[2],b:f[3],a:f[4]}:(f=Z.hsl.exec(l))?{h:f[1],s:f[2],l:f[3]}:(f=Z.hsla.exec(l))?{h:f[1],s:f[2],l:f[3],a:f[4]}:(f=Z.hsv.exec(l))?{h:f[1],s:f[2],v:f[3]}:(f=Z.hsva.exec(l))?{h:f[1],s:f[2],v:f[3],a:f[4]}:(f=Z.hex8.exec(l))?{r:I(f[1]),g:I(f[2]),b:I(f[3]),a:Ge(f[4]),format:h?"name":"hex8"}:(f=Z.hex6.exec(l))?{r:I(f[1]),g:I(f[2]),b:I(f[3]),format:h?"name":"hex"}:(f=Z.hex4.exec(l))?{r:I(f[1]+""+f[1]),g:I(f[2]+""+f[2]),b:I(f[3]+""+f[3]),a:Ge(f[4]+""+f[4]),format:h?"name":"hex8"}:(f=Z.hex3.exec(l))?{r:I(f[1]+""+f[1]),g:I(f[2]+""+f[2]),b:I(f[3]+""+f[3]),format:h?"name":"hex"}:!1}function we(l){var h,f;return l=l||{level:"AA",size:"small"},h=(l.level||"AA").toUpperCase(),f=(l.size||"small").toLowerCase(),h!=="AA"&&h!=="AAA"&&(h="AA"),f!=="small"&&f!=="large"&&(f="small"),{level:h,size:f}}return n})});var ad=y((tw,sd)=>{var vr=ed(),id={r:256,g:256,b:256,a:1},od={h:360,s:1,v:1,a:1};function Po(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 Do(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 Co(t,e,r){let n=t.color.toRgb(),i=e.color.toRgb(),o=Po(n,i,r),s=[t.color];for(let a=1;a<r;a++){let c=Do(o,n,a,id);s.push(vr(c))}return s}function td(t,e,r,n){let i=t.color.toHsv(),o=e.color.toHsv();if(i.s===0||o.s===0)return Co(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=Po(i,o,r),c=[t.color],d;i.h<=o.h&&!s||i.h>=o.h&&s?d=o.h-i.h:s?d=360-o.h+i.h:d=360-i.h+o.h,a.h=Math.pow(-1,s?1:0)*Math.abs(d)/r;for(let u=1;u<r;u++){let p=Do(a,i,u,od);c.push(vr(p))}return c}function rd(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 nd(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,d=t.length;c<d-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=Po(i.color[r](),o.color[r](),(o.pos-i.pos)*100),a=Do(s,i.color[r](),(e-i.pos)*100,n);return vr(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 d=s.color!==void 0;if(!d&&(o||a===0||a===n-1))throw new Error("Cannot define two consecutive position-only stops");if(o=!d,s={color:d?vr(s.color):null,colorLess:!d,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 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=rd(this.stops,e),n=[];this.stops.forEach((i,o)=>{i.colorLess&&(i.color=Co(this.stops[o-1],this.stops[o+1],2)[1])});for(let i=0,o=this.stops.length;i<o-1;i++){let s=Co(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=rd(this.stops,e),i=[];this.stops.forEach((o,s)=>{o.colorLess&&(o.color=td(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=td(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 nd(this.stops,e,"toRgb",id)}hsvAt(e){return nd(this.stops,e,"toHsv",od)}};sd.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 dd=y((rw,On)=>{"use strict";var ud=Zf(),Cy=ad(),cd=/\s/g;function Oo(...t){let e=Cy.apply(this,t),r=(n,i)=>Py(n?n.toString():"",e,i);return r.multiline=(n,i)=>Dy(n?n.toString():"",e,i),r}var ld=(t,e,r)=>e.interpolation.toLowerCase()==="hsv"?t.hsv(r,e.hsvSpin.toLowerCase()):t.rgb(r);function Py(t,e,r){let n=fd(r),i=Math.max(t.replace(cd,"").length,e.stops.length),o=ld(e,n,i),s="";for(let a of t)s+=a.match(cd)?a:ud.hex(o.shift().toHex())(a);return s}function Dy(t,e,r){let n=fd(r),i=t.split(`
21
- `),o=Math.max.apply(null,i.map(c=>c.length).concat([e.stops.length])),s=ld(e,n,o),a=[];for(let c of i){let d=s.slice(0),u="";for(let p of c)u+=ud.hex(d.shift().toHex())(p);a.push(u)}return a.join(`
22
- `)}function fd(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"}}};On.exports=Oo;for(let t in br)On.exports[t]=e=>new Oo(br[t].colors)(e,br[t].options),On.exports[t].multiline=e=>new Oo(br[t].colors).multiline(e,br[t].options)});var Q=y(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.isUndefined=Ce.fixName=Ce.validateName=Ce.validateSingleChar=Ce.fixChar=Ce.validateChar=void 0;function Gy(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}Ce.validateChar=Gy;function Hy(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}Ce.fixChar=Hy;function Wy(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}Ce.validateSingleChar=Wy;function zy(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}Ce.validateName=zy;function Jy(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 d=t.charCodeAt(a+1);if(c>=55296&&c<=56191&&d>=56320&&d<=57343){e+=t[a]+t[a+1],a++;continue}e+="\uFFFD"}return e}Ce.fixName=Jy;function Vy(t){return Object.prototype.toString.call(t)==="[object Undefined]"}Ce.isUndefined=Vy});var zt=y(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.StringOptions=void 0;var qn=Q(),Yy=function(){function t(e){this.doubleQuotes=!1,this.indent=" ",this.newline=`
23
- `,this.pretty=!0,(0,qn.isUndefined)(e.doubleQuotes)||(this.doubleQuotes=e.doubleQuotes),(0,qn.isUndefined)(e.indent)||(this.indent=e.indent),(0,qn.isUndefined)(e.newline)||(this.newline=e.newline),(0,qn.isUndefined)(e.pretty)||(this.pretty=e.pretty)}return t}();Nn.StringOptions=Yy});var jn=y(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.escapeDoubleQuotes=ke.escapeSingleQuotes=ke.escapeRightAngleBracketsInCdataTerminator=ke.escapeLeftAngleBrackets=ke.escapeAmpersands=void 0;function Ky(t){return t.replace(/&/g,"&amp;")}ke.escapeAmpersands=Ky;function Qy(t){return t.replace(/</g,"&lt;")}ke.escapeLeftAngleBrackets=Qy;function Zy(t){return t.replace(/]]>/g,"]]&gt;")}ke.escapeRightAngleBracketsInCdataTerminator=Zy;function ev(t){return t.replace(/'/g,"&apos;")}ke.escapeSingleQuotes=ev;function tv(t){return t.replace(/"/g,"&quot;")}ke.escapeDoubleQuotes=tv});var Yo=y(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});var rv=se(),qd=jn(),Jo=Q(),nv=function(){function t(e,r,n){this._validation=r,(0,Jo.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,Jo.fixChar)(e);else if(this._validation&&!(0,Jo.validateChar)(e))throw new Error((0,rv.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,qd.escapeAmpersands)(e),e=(0,qd.escapeLeftAngleBrackets)(e),e},t.prototype.up=function(){return this._parent},t}();Vo.default=nv});var Ln=y(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});var Nd=se(),jd=Q(),iv=function(){function t(e,r,n){this._hex=!1,this._validation=r,this._parent=e,this.char=n.char,(0,jd.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,jd.validateSingleChar)(e))throw new Error((0,Nd.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,Nd.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}();Ko.default=iv});var $n=y(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});var ov=se(),sv=Q(),av=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,sv.validateName)(e))throw new Error((0,ov.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}();Qo.default=av});var Bn=y(wr=>{"use strict";var ts=wr&&wr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(wr,"__esModule",{value:!0});var Zo=se(),Ld=jn(),cv=zt(),es=Q(),uv=ts(Yo()),lv=ts(Ln()),fv=ts($n()),dv=function(){function t(e,r,n){this._validation=r,(0,es.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,es.fixName)(e),e.length===0)throw new Error((0,Zo.getContext)(this.up())+": attribute name should not be empty")}else if(this._validation&&!(0,es.validateName)(e))throw e.length===0?new Error((0,Zo.getContext)(this.up())+": attribute name should not be empty"):new Error((0,Zo.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 lv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entityRef=function(e){var r=new fv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.text=function(e){var r=new uv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});for(var r=new cv.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,Ld.escapeDoubleQuotes)(a.toString()):i+=(0,Ld.escapeSingleQuotes)(a.toString())}return i+=n,i},t.prototype.up=function(){return this._parent},t}();wr.default=dv});var ns=y(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});var hv=se(),pv=Q(),mv=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,pv.validateChar)(e))throw new Error((0,hv.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}();rs.default=mv});var os=y(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});var gv=se(),yv=Q(),vv=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,yv.validateChar)(e))throw new Error((0,gv.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}();is.default=vv});var as=y(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});var bv=se(),wv=Q(),_v=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,bv.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}();ss.default=_v});var us=y(cs=>{"use strict";Object.defineProperty(cs,"__esModule",{value:!0});var xv=se(),Sv=Q(),Ev=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,Sv.validateChar)(e))throw new Error((0,xv.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}();cs.default=Ev});var fs=y(ls=>{"use strict";Object.defineProperty(ls,"__esModule",{value:!0});var Cv=se(),Pv=Q(),Dv=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,Pv.validateName)(e))throw new Error((0,Cv.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}();ls.default=Dv});var _r=y(ds=>{"use strict";Object.defineProperty(ds,"__esModule",{value:!0});var Un=se(),Xn=Q(),Ov=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,Xn.isUndefined)(e)){if(this._validation&&!(0,Xn.validateChar)(e))throw new Error((0,Un.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,Un.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,Xn.validateName)(e))throw new Error((0,Un.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,Un.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,Xn.isUndefined)(this._content)?"<?"+this._target+"?>":"<?"+this._target+" "+this._content+"?>"},t.prototype.up=function(){return this._parent},t}();ds.default=Ov});var Gn=y(bt=>{"use strict";var wt=bt&&bt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bt,"__esModule",{value:!0});bt.validatePubId=void 0;var ct=se(),Av=zt(),We=Q(),Iv=wt(xr()),Rv=wt(ns()),Fv=wt(os()),kv=wt(as()),Tv=wt(us()),Mv=wt(fs()),qv=wt(_r()),Nv=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,We.isUndefined)(n.sysId)||(this.sysId=n.sysId),(0,We.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,We.validateName)(e))throw new Error((0,ct.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,We.isUndefined)(e)){if(this._validation&&!$d(e))throw new Error((0,ct.getContext)(this.up())+": DTD public"+(' identifier "'+e+'" should not contain')+" characters not allowed in public identifiers");if(this._validation&&(0,We.isUndefined)(this._sysId))throw new Error((0,ct.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,We.isUndefined)(e)){if(this._validation&&!(0,We.validateChar)(e))throw new Error((0,ct.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,ct.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 Rv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new Iv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.element=function(e){var r=new Fv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entity=function(e){var r=new kv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.notation=function(e){var r=new Tv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.paramEntityRef=function(e){var r=new Mv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new qv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});var r=new Av.StringOptions(e),n="<!DOCTYPE "+this._name;if((0,We.isUndefined)(this._pubId))(0,We.isUndefined)(this._sysId)||(n+=" ",n=this.appendId("SYSTEM",this._sysId,n,r));else{if((0,We.isUndefined)(this._sysId))throw new Error((0,ct.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,ct.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,ct.getContext)(this)+": doubleQuotes option inconsistent with DTD system identifier or public identifier");n+="'"+r+"'"}return n},t}();bt.default=Nv;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}bt.validatePubId=$d});var ms=y(ps=>{"use strict";Object.defineProperty(ps,"__esModule",{value:!0});var Bd=se(),hs=Q(),jv=function(){function t(e,r,n){this._validation=r,(0,hs.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,hs.fixChar)(e);else if(this._validation&&!(0,hs.validateChar)(e))throw new Error((0,Bd.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,Bd.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}();ps.default=jv});var bs=y(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});var Lv=se(),gs=jn(),ys=Q(),$v=function(){function t(e,r,n){this._validation=r,(0,ys.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,ys.fixChar)(e);else if(this._validation&&!(0,ys.validateChar)(e))throw new Error((0,Lv.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,gs.escapeAmpersands)(e),e=(0,gs.escapeLeftAngleBrackets)(e),e=(0,gs.escapeRightAngleBracketsInCdataTerminator)(e),e},t.prototype.up=function(){return this._parent},t}();vs.default=$v});var Jn=y(Cr=>{"use strict";var _t=Cr&&Cr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Cr,"__esModule",{value:!0});var Hn=se(),Bv=zt(),Sr=Q(),Ud=_t(Bn()),Uv=_t(ms()),Er=_t(bs()),Wn=_t(Ln()),Xv=_t(xr()),zn=_t($n()),Gv=_t(_r()),Hv=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,Hn.getContext)(this.up())+": element name should not be empty")}else if(this._validation&&!(0,Sr.validateName)(e))throw e.length===0?new Error((0,Hn.getContext)(this.up())+": element name should not be empty"):new Error((0,Hn.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,Hn.getContext)(this.up())+': element "'+this.name+'" already contains an attribute with the'+(' name "'+e.name+'"'));var r=new Ud.default(this,this._validation,e);return this._children.push(r),this._attributeNames.push(e.name),r},t.prototype.cdata=function(e){var r=new Uv.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 Wn.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new Xv.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 zn.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new Gv.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 Bv.StringOptions(e),i=r+n.indent,o="<"+this._name,s=[],a=0,c=this._children;a<c.length;a++){var d=c[a];d instanceof Ud.default?o+=" "+d.toString(e):s.push(d)}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 Wn.default||i instanceof zn.default||i instanceof Er.default))return!1}return!0},t.prototype.onSameLine=function(e,r){return(e instanceof Wn.default||e instanceof zn.default||e instanceof Er.default)&&!(0,Sr.isUndefined)(r)&&(r instanceof Wn.default||r instanceof zn.default||r instanceof Er.default)},t}();Cr.default=Hv});var se=y(Jt=>{"use strict";var Yn=Jt&&Jt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Jt,"__esModule",{value:!0});Jt.getContext=void 0;var Wv=Yn(Bn()),zv=Yn(Kn()),Jv=Yn(Gn()),Vv=Yn(Jn());function Vn(t){if(t instanceof Wv.default)return Vn(t.up())+(' > attribute "'+t.name+'"');if(t instanceof zv.default)return"in XML document";if(t instanceof Jv.default)return Vn(t.up())+" > DTD";if(t instanceof Vv.default)return Vn(t.up())+(' > element "'+t.name+'"');throw new Error("Unrecognized object of type "+Object.prototype.toString.call(t))}Jt.getContext=Vn});var xr=y(xs=>{"use strict";Object.defineProperty(xs,"__esModule",{value:!0});var ws=se(),_s=Q(),Yv=function(){function t(e,r,n){this._validation=r,(0,_s.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,_s.fixChar)(e);else if(this._validation&&!(0,_s.validateChar)(e))throw new Error((0,ws.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,ws.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,ws.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}();xs.default=Yv});var Cs=y(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});var Ss=se(),Kv=zt(),Pr=Q(),Qv=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,Pr.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,Pr.isUndefined)(e)&&!Zv(e))throw new Error((0,Ss.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,Pr.isUndefined)(e)&&e!=="yes"&&e!=="no")throw new Error((0,Ss.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&&!e1(e))throw new Error((0,Ss.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 Kv.StringOptions(e),n=r.doubleQuotes?'"':"'",i="<?xml version="+n+this._version+n;return(0,Pr.isUndefined)(this._encoding)||(i+=" encoding="+n+this._encoding+n),(0,Pr.isUndefined)(this._standalone)||(i+=" standalone="+n+this._standalone+n),i+="?>",i},t.prototype.up=function(){return this._parent},t}();Es.default=Qv;function Zv(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 e1(t){for(var e=0;e<=9;e++)if(t==="1."+e)return!0;return!1}});var Kn=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 t1=zt(),r1=Q(),n1=Ar(xr()),Xd=Ar(Cs()),Gd=Ar(Gn()),Dr=Ar(Jn()),i1=Ar(_r()),o1=function(){function t(e){this._children=[],this._validation=(0,r1.isUndefined)(e.validation)?!0:e.validation}return t.prototype.comment=function(e){var r=new n1.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 Xd.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 Gd.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 i1.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(d){return d 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 t1.StringOptions(e),i="",o=0,s=this._children;o<s.length;o++){var a=s[o];a instanceof Xd.default||a instanceof Gd.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=o1});var Hd=y(M=>{"use strict";var te=M&&M.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(M,"__esModule",{value:!0});M.document=M.XmlProcInst=M.XmlEntityRef=M.XmlElement=M.XmlDtdParamEntityRef=M.XmlDtdNotation=M.XmlDtdEntity=M.XmlDtdElement=M.XmlDtdAttlist=M.XmlDtd=M.XmlDocument=M.XmlDecl=M.XmlComment=M.XmlCharRef=M.XmlCharData=M.XmlCdata=M.XmlAttributeText=M.XmlAttribute=void 0;var s1=te(Kn()),a1=Bn();Object.defineProperty(M,"XmlAttribute",{enumerable:!0,get:function(){return te(a1).default}});var c1=Yo();Object.defineProperty(M,"XmlAttributeText",{enumerable:!0,get:function(){return te(c1).default}});var u1=ms();Object.defineProperty(M,"XmlCdata",{enumerable:!0,get:function(){return te(u1).default}});var l1=bs();Object.defineProperty(M,"XmlCharData",{enumerable:!0,get:function(){return te(l1).default}});var f1=Ln();Object.defineProperty(M,"XmlCharRef",{enumerable:!0,get:function(){return te(f1).default}});var d1=xr();Object.defineProperty(M,"XmlComment",{enumerable:!0,get:function(){return te(d1).default}});var h1=Cs();Object.defineProperty(M,"XmlDecl",{enumerable:!0,get:function(){return te(h1).default}});var p1=Kn();Object.defineProperty(M,"XmlDocument",{enumerable:!0,get:function(){return te(p1).default}});var m1=Gn();Object.defineProperty(M,"XmlDtd",{enumerable:!0,get:function(){return te(m1).default}});var g1=ns();Object.defineProperty(M,"XmlDtdAttlist",{enumerable:!0,get:function(){return te(g1).default}});var y1=os();Object.defineProperty(M,"XmlDtdElement",{enumerable:!0,get:function(){return te(y1).default}});var v1=as();Object.defineProperty(M,"XmlDtdEntity",{enumerable:!0,get:function(){return te(v1).default}});var b1=us();Object.defineProperty(M,"XmlDtdNotation",{enumerable:!0,get:function(){return te(b1).default}});var w1=fs();Object.defineProperty(M,"XmlDtdParamEntityRef",{enumerable:!0,get:function(){return te(w1).default}});var _1=Jn();Object.defineProperty(M,"XmlElement",{enumerable:!0,get:function(){return te(_1).default}});var x1=$n();Object.defineProperty(M,"XmlEntityRef",{enumerable:!0,get:function(){return te(x1).default}});var S1=_r();Object.defineProperty(M,"XmlProcInst",{enumerable:!0,get:function(){return te(S1).default}});function E1(t){return t===void 0&&(t={}),new s1.default(t)}M.document=E1});var Ps=y(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.stringify=re.isMap=re.isSet=re.isFunction=re.isArray=re.isObject=re.isNull=re.isUndefined=void 0;function Wd(t){return Object.prototype.toString.call(t)==="[object Undefined]"}re.isUndefined=Wd;function zd(t){return Object.prototype.toString.call(t)==="[object Null]"}re.isNull=zd;function C1(t){return Object.prototype.toString.call(t)==="[object Object]"}re.isObject=C1;function P1(t){return Object.prototype.toString.call(t)==="[object Array]"}re.isArray=P1;function Jd(t){return Object.prototype.toString.call(t)==="[object Function]"}re.isFunction=Jd;function D1(t){return Object.prototype.toString.call(t)==="[object Set]"}re.isSet=D1;function O1(t){return Object.prototype.toString.call(t)==="[object Map]"}re.isMap=O1;function A1(t){return!Wd(t)&&!zd(t)&&Jd(t?.toString)&&(t=t.toString()),String(t)}re.stringify=A1});var eh=y(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.WrapHandlers=Pe.TypeHandlers=Pe.FormatOptions=Pe.DtdOptions=Pe.DeclarationOptions=Pe.Options=void 0;var Be=Ps(),I1=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,Be.isUndefined)(e.validation)||(this.validation=e.validation),(0,Be.isUndefined)(e.aliasString)||(this.aliasString=e.aliasString),(0,Be.isUndefined)(e.attributeString)||(this.attributeString=e.attributeString),(0,Be.isUndefined)(e.cdataInvalidChars)||(this.cdataInvalidChars=e.cdataInvalidChars),(0,Be.isUndefined)(e.cdataKeys)||(this.cdataKeys=e.cdataKeys),this.declaration=new Vd(e.declaration),this.dtd=new Yd(this.validation,e.dtd),this.format=new Kd(e.format),(0,Be.isUndefined)(e.replaceInvalidChars)||(this.replaceInvalidChars=e.replaceInvalidChars),this.typeHandlers=new Qd(e.typeHandlers),(0,Be.isUndefined)(e.useSelfClosingTagIfEmpty)||(this.useSelfClosingTagIfEmpty=e.useSelfClosingTagIfEmpty),(0,Be.isUndefined)(e.valueString)||(this.valueString=e.valueString),this.wrapHandlers=new Zd(e.wrapHandlers)}return t}();Pe.Options=I1;var Vd=function(){function t(e){e===void 0&&(e={}),this.include=!0,(0,Be.isUndefined)(e.include)||(this.include=e.include),this.encoding=e.encoding,this.standalone=e.standalone,this.version=e.version}return t}();Pe.DeclarationOptions=Vd;var Yd=function(){function t(e,r){if(r===void 0&&(r={}),this.include=!1,(0,Be.isUndefined)(r.include)||(this.include=r.include),e&&(0,Be.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}();Pe.DtdOptions=Yd;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}();Pe.FormatOptions=Kd;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}();Pe.TypeHandlers=Qd;var Zd=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}();Pe.WrapHandlers=Zd});var sh=y(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});ut.parse=ut.parseToExistingElement=ut.Absent=void 0;var rh=Hd(),nh=eh(),V=Ps(),Ds=function(){function t(){}return Object.defineProperty(t,"instance",{get:function(){return t._instance},enumerable:!1,configurable:!0}),t._instance=new t,t}();ut.Absent=Ds;function Os(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 ih(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 rh.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 R1(t,e,r,n){var i=r.attribute({name:t,replaceInvalidCharsInName:n.replaceInvalidChars});ih((0,V.stringify)(e),i,n)}function th(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];R1(s,(0,V.stringify)(e[s]),r,n)}return}if(t.indexOf(n.valueString)===0){Qn(t,(0,V.stringify)(e),r,n);return}var a=r;if(!(0,V.isArray)(e)&&!(0,V.isSet)(e)){var c=Os(e,n);if(!(0,V.isUndefined)(c)&&c(e)===Ds.instance)return;a=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}Qn(t,e,a,n)}function F1(t,e,r){if((0,V.isMap)(t))t.forEach(function(s,a){th((0,V.stringify)(a),s,e,r)});else for(var n=0,i=Object.keys(t);n<i.length;n++){var o=i[n];th(o,t[o],e,r)}}function k1(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 d=s;if(!(0,V.isArray)(c)&&!(0,V.isSet)(c)){var u=Os(c,n);if(!(0,V.isUndefined)(u)&&u(c)===Ds.instance)return;d=s.element({name:o,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}Qn(o,c,d,n)})}function Qn(t,e,r,n){var i=Os(e,n);if((0,V.isUndefined)(i)||(e=i(e)),(0,V.isObject)(e)||(0,V.isMap)(e)){F1(e,r,n);return}if((0,V.isArray)(e)||(0,V.isSet)(e)){k1(t,e,r,n);return}ih((0,V.stringify)(e),r,n)}function oh(t,e,r){var n=new nh.Options(r);Qn(t.name,e,t,n)}ut.parseToExistingElement=oh;function T1(t,e,r){var n=new nh.Options(r),i=new rh.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 oh(o,e,r),i.toString(n.format)}ut.parse=T1});var ia=q(Je());var ta=require("node:child_process"),ra=q(Je()),na=q(kr());ra.default.config();var zh=na.default.sync(__dirname);function li(t){return e=>Jh(e,t)}function Jh(t,e){let[r,...n]=t.split(" "),{error:i,status:o}=(0,ta.spawnSync)(r,n,{cwd:zh,stdio:["ignore","inherit","ignore"],encoding:"utf8",shell:!0,env:Object.assign({GRIDDO_EXPORTER:"true"},process.env,e)});if(i)throw console.error(i),new Error(i.toString());if(o!==0)throw new Error(`Command \`${t}\` exited with code ${o}`)}ia.default.config();var uu=q(Bi()),lu=q(or()),zi=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,uu.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(lu.default.red(`
18
+ `,i)}while(n!==-1);return o+=t.substr(i),o};Hf.exports={stringReplaceAll:Sy,stringEncaseCRLFWithFirstIndex:Ey}});var Kf=y((mw,Yf)=>{"use strict";var Cy=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Wf=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Py=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Dy=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,Oy=new Map([["n",`
19
+ `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Vf(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)):Oy.get(t)||t}function Ay(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(Py))r.push(i[2].replace(Dy,(a,c,d)=>c?Vf(c):d));else throw new Error(`Invalid Chalk template style argument: ${o} (in style '${t}')`)}return r}function Iy(t){Wf.lastIndex=0;let e=[],r;for(;(r=Wf.exec(t))!==null;){let n=r[1];if(r[2]){let i=Ay(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function zf(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}Yf.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(Cy,(o,s,a,c,d,u)=>{if(s)i.push(Vf(s));else if(c){let p=i.join("");i=[],n.push(r.length===0?p:zf(t,r)(p)),r.push({inverse:a,styles:Iy(c)})}else if(d){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(zf(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 id=y((gw,nd)=>{"use strict";var br=Gf(),{stdout:xo,stderr:So}=Pi(),{stringReplaceAll:Ry,stringEncaseCRLFWithFirstIndex:Fy}=Jf(),{isArray:Cn}=Array,Zf=["ansi","ansi","ansi256","ansi16m"],Gt=Object.create(null),ky=(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=xo?xo.level:0;t.level=e.level===void 0?r:e.level},Eo=class{constructor(e){return ed(e)}},ed=t=>{let e={};return ky(e,t),e.template=(...r)=>rd(e.template,...r),Object.setPrototypeOf(e,Pn.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=Eo,e.template};function Pn(t){return ed(t)}for(let[t,e]of Object.entries(br))Gt[t]={get(){let r=Dn(this,Co(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Gt.visible={get(){let t=Dn(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var td=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of td)Gt[t]={get(){let{level:e}=this;return function(...r){let n=Co(br.color[Zf[e]][t](...r),br.color.close,this._styler);return Dn(this,n,this._isEmpty)}}};for(let t of td){let e="bg"+t[0].toUpperCase()+t.slice(1);Gt[e]={get(){let{level:r}=this;return function(...n){let i=Co(br.bgColor[Zf[r]][t](...n),br.bgColor.close,this._styler);return Dn(this,i,this._isEmpty)}}}}var Ty=Object.defineProperties(()=>{},{...Gt,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),Co=(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}},Dn=(t,e,r)=>{let n=(...i)=>Cn(i[0])&&Cn(i[0].raw)?Qf(n,rd(n,...i)):Qf(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,Ty),n._generator=t,n._styler=e,n._isEmpty=r,n},Qf=(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=Ry(e,r.close,r.open),r=r.parent;let o=e.indexOf(`
20
+ `);return o!==-1&&(e=Fy(e,i,n,o)),n+e+i},_o,rd=(t,...e)=>{let[r]=e;if(!Cn(r)||!Cn(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 _o===void 0&&(_o=Kf()),_o(t,i.join(""))};Object.defineProperties(Pn.prototype,Gt);var On=Pn();On.supportsColor=xo;On.stderr=Pn({level:So?So.level:0});On.stderr.supportsColor=So;nd.exports=On});var od=y((Po,Do)=>{(function(t,e){typeof Po=="object"&&typeof Do<"u"?Do.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.tinycolor=e())})(Po,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 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=h.format||f.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=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 h=this.toRgb();return(h.r*299+h.g*587+h.b*114)/1e3},getLuminance:function(){var h=this.toRgb(),f,v,S,_,j,U;return f=h.r/255,v=h.g/255,S=h.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?U=S/12.92:U=Math.pow((S+.055)/1.055,2.4),.2126*_+.7152*j+.0722*U},setAlpha:function(h){return this._a=X(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),f=Math.round(h.h*360),v=Math.round(h.s*100),S=Math.round(h.v*100);return this._a==1?"hsv("+f+", "+v+"%, "+S+"%)":"hsva("+f+", "+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),f=Math.round(h.h*360),v=Math.round(h.s*100),S=Math.round(h.l*100);return this._a==1?"hsl("+f+", "+v+"%, "+S+"%)":"hsla("+f+", "+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(R(this._r,255)*100)+"%",g:Math.round(R(this._g,255)*100)+"%",b:Math.round(R(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(R(this._r,255)*100)+"%, "+Math.round(R(this._g,255)*100)+"%, "+Math.round(R(this._b,255)*100)+"%)":"rgba("+Math.round(R(this._r,255)*100)+"%, "+Math.round(R(this._g,255)*100)+"%, "+Math.round(R(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 f="#"+g(this._r,this._g,this._b,this._a),v=f,S=this._gradientType?"GradientType = 1, ":"";if(h){var _=n(h);v="#"+g(_._r,_._g,_._b,_._a)}return"progid:DXImageTransform.Microsoft.gradient("+S+"startColorstr="+f+",endColorstr="+v+")"},toString:function(h){var f=!!h;h=h||this._format;var v=!1,S=this._a<1&&this._a>=0,_=!f&&S&&(h==="hex"||h==="hex6"||h==="hex3"||h==="hex4"||h==="hex8"||h==="name");return _?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,f){var v=h.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(P,arguments)},brighten:function(){return this._applyModification(F,arguments)},darken:function(){return this._applyModification(N,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(C,arguments)},spin:function(){return this._applyModification(G,arguments)},_applyCombination:function(h,f){return h.apply(null,[this].concat([].slice.call(f)))},analogous:function(){return this._applyCombination(be,arguments)},complement:function(){return this._applyCombination(B,arguments)},monochromatic:function(){return this._applyCombination(K,arguments)},splitcomplement:function(){return this._applyCombination(ae,arguments)},triad:function(){return this._applyCombination(z,[3])},tetrad:function(){return this._applyCombination(z,[4])}},n.fromRatio=function(l,h){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,h)};function i(l){var h={r:0,g:0,b:0},f=1,v=null,S=null,_=null,j=!1,U=!1;return typeof l=="string"&&(l=xt(l)),t(l)=="object"&&(ce(l.r)&&ce(l.g)&&ce(l.b)?(h=o(l.r,l.g,l.b),j=!0,U=String(l.r).substr(-1)==="%"?"prgb":"rgb"):ce(l.h)&&ce(l.s)&&ce(l.v)?(v=M(l.s),S=M(l.v),h=d(l.h,v,S),j=!0,U="hsv"):ce(l.h)&&ce(l.s)&&ce(l.l)&&(v=M(l.s),_=M(l.l),h=a(l.h,v,_),j=!0,U="hsl"),l.hasOwnProperty("a")&&(f=l.a)),f=X(f),{ok:j,format:l.format||U,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:f}}function o(l,h,f){return{r:R(l,255)*255,g:R(h,255)*255,b:R(f,255)*255}}function s(l,h,f){l=R(l,255),h=R(h,255),f=R(f,255);var v=Math.max(l,h,f),S=Math.min(l,h,f),_,j,U=(v+S)/2;if(v==S)_=j=0;else{var J=v-S;switch(j=U>.5?J/(2-v-S):J/(v+S),v){case l:_=(h-f)/J+(h<f?6:0);break;case h:_=(f-l)/J+2;break;case f:_=(l-h)/J+4;break}_/=6}return{h:_,s:j,l:U}}function a(l,h,f){var v,S,_;l=R(l,360),h=R(h,100),f=R(f,100);function j(_e,ue,qe){return qe<0&&(qe+=1),qe>1&&(qe-=1),qe<1/6?_e+(ue-_e)*6*qe:qe<1/2?ue:qe<2/3?_e+(ue-_e)*(2/3-qe)*6:_e}if(h===0)v=S=_=f;else{var U=f<.5?f*(1+h):f+h-f*h,J=2*f-U;v=j(J,U,l+1/3),S=j(J,U,l),_=j(J,U,l-1/3)}return{r:v*255,g:S*255,b:_*255}}function c(l,h,f){l=R(l,255),h=R(h,255),f=R(f,255);var v=Math.max(l,h,f),S=Math.min(l,h,f),_,j,U=v,J=v-S;if(j=v===0?0:J/v,v==S)_=0;else{switch(v){case l:_=(h-f)/J+(h<f?6:0);break;case h:_=(f-l)/J+2;break;case f:_=(l-h)/J+4;break}_/=6}return{h:_,s:j,v:U}}function d(l,h,f){l=R(l,360)*6,h=R(h,100),f=R(f,100);var v=Math.floor(l),S=l-v,_=f*(1-h),j=f*(1-S*h),U=f*(1-(1-S)*h),J=v%6,_e=[f,j,_,_,U,f][J],ue=[U,f,f,j,_,_][J],qe=[_,_,U,f,f,j][J];return{r:_e*255,g:ue*255,b:qe*255}}function u(l,h,f,v){var S=[A(Math.round(l).toString(16)),A(Math.round(h).toString(16)),A(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,h,f,v,S){var _=[A(Math.round(l).toString(16)),A(Math.round(h).toString(16)),A(Math.round(f).toString(16)),A(Me(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,h,f,v){var S=[A(Me(v)),A(Math.round(l).toString(16)),A(Math.round(h).toString(16)),A(Math.round(f).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 f=n(l).toHsl();return f.s-=h/100,f.s=L(f.s),n(f)}function b(l,h){h=h===0?0:h||10;var f=n(l).toHsl();return f.s+=h/100,f.s=L(f.s),n(f)}function C(l){return n(l).desaturate(100)}function P(l,h){h=h===0?0:h||10;var f=n(l).toHsl();return f.l+=h/100,f.l=L(f.l),n(f)}function F(l,h){h=h===0?0:h||10;var f=n(l).toRgb();return f.r=Math.max(0,Math.min(255,f.r-Math.round(255*-(h/100)))),f.g=Math.max(0,Math.min(255,f.g-Math.round(255*-(h/100)))),f.b=Math.max(0,Math.min(255,f.b-Math.round(255*-(h/100)))),n(f)}function N(l,h){h=h===0?0:h||10;var f=n(l).toHsl();return f.l-=h/100,f.l=L(f.l),n(f)}function G(l,h){var f=n(l).toHsl(),v=(f.h+h)%360;return f.h=v<0?360+v:v,n(f)}function B(l){var h=n(l).toHsl();return h.h=(h.h+180)%360,n(h)}function z(l,h){if(isNaN(h)||h<=0)throw new Error("Argument to polyad must be a positive number");for(var f=n(l).toHsl(),v=[n(l)],S=360/h,_=1;_<h;_++)v.push(n({h:(f.h+_*S)%360,s:f.s,l:f.l}));return v}function ae(l){var h=n(l).toHsl(),f=h.h;return[n(l),n({h:(f+72)%360,s:h.s,l:h.l}),n({h:(f+216)%360,s:h.s,l:h.l})]}function be(l,h,f){h=h||6,f=f||30;var v=n(l).toHsl(),S=360/f,_=[n(l)];for(v.h=(v.h-(S*h>>1)+720)%360;--h;)v.h=(v.h+S)%360,_.push(n(v));return _}function K(l,h){h=h||6;for(var f=n(l).toHsv(),v=f.h,S=f.s,_=f.v,j=[],U=1/h;h--;)j.push(n({h:v,s:S,v:_})),_=(_+U)%1;return j}n.mix=function(l,h,f){f=f===0?0:f||50;var v=n(l).toRgb(),S=n(h).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,h){var f=n(l),v=n(h);return(Math.max(f.getLuminance(),v.getLuminance())+.05)/(Math.min(f.getLuminance(),v.getLuminance())+.05)},n.isReadable=function(l,h,f){var v=n.readability(l,h),S,_;switch(_=!1,S=we(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,h,f){var v=null,S=0,_,j,U,J;f=f||{},j=f.includeFallbackColors,U=f.level,J=f.size;for(var _e=0;_e<h.length;_e++)_=n.readability(l,h[_e]),_>S&&(S=_,v=n(h[_e]));return n.isReadable(l,v,{level:U,size:J})||!j?v:(f.includeFallbackColors=!1,n.mostReadable(l,["#fff","#000"],f))};var w=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=E(w);function E(l){var h={};for(var f in l)l.hasOwnProperty(f)&&(h[l[f]]=f);return h}function X(l){return l=parseFloat(l),(isNaN(l)||l<0||l>1)&&(l=1),l}function R(l,h){$(l)&&(l="100%");var f=k(l);return l=Math.min(h,Math.max(0,parseFloat(l))),f&&(l=parseInt(l*h,10)/100),Math.abs(l-h)<1e-6?1:l%h/parseFloat(h)}function L(l){return Math.min(1,Math.max(0,l))}function I(l){return parseInt(l,16)}function $(l){return typeof l=="string"&&l.indexOf(".")!=-1&&parseFloat(l)===1}function k(l){return typeof l=="string"&&l.indexOf("%")!=-1}function A(l){return l.length==1?"0"+l:""+l}function M(l){return l<=1&&(l=l*100+"%"),l}function Me(l){return Math.round(parseFloat(l)*255).toString(16)}function Ge(l){return I(l)/255}var Z=function(){var l="[-\\+]?\\d+%?",h="[-\\+]?\\d*\\.\\d+%?",f="(?:"+h+")|(?:"+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 ce(l){return!!Z.CSS_UNIT.exec(l)}function xt(l){l=l.replace(e,"").replace(r,"").toLowerCase();var h=!1;if(w[l])l=w[l],h=!0;else if(l=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var f;return(f=Z.rgb.exec(l))?{r:f[1],g:f[2],b:f[3]}:(f=Z.rgba.exec(l))?{r:f[1],g:f[2],b:f[3],a:f[4]}:(f=Z.hsl.exec(l))?{h:f[1],s:f[2],l:f[3]}:(f=Z.hsla.exec(l))?{h:f[1],s:f[2],l:f[3],a:f[4]}:(f=Z.hsv.exec(l))?{h:f[1],s:f[2],v:f[3]}:(f=Z.hsva.exec(l))?{h:f[1],s:f[2],v:f[3],a:f[4]}:(f=Z.hex8.exec(l))?{r:I(f[1]),g:I(f[2]),b:I(f[3]),a:Ge(f[4]),format:h?"name":"hex8"}:(f=Z.hex6.exec(l))?{r:I(f[1]),g:I(f[2]),b:I(f[3]),format:h?"name":"hex"}:(f=Z.hex4.exec(l))?{r:I(f[1]+""+f[1]),g:I(f[2]+""+f[2]),b:I(f[3]+""+f[3]),a:Ge(f[4]+""+f[4]),format:h?"name":"hex8"}:(f=Z.hex3.exec(l))?{r:I(f[1]+""+f[1]),g:I(f[2]+""+f[2]),b:I(f[3]+""+f[3]),format:h?"name":"hex"}:!1}function we(l){var h,f;return l=l||{level:"AA",size:"small"},h=(l.level||"AA").toUpperCase(),f=(l.size||"small").toLowerCase(),h!=="AA"&&h!=="AAA"&&(h="AA"),f!=="small"&&f!=="large"&&(f="small"),{level:h,size:f}}return n})});var dd=y((yw,fd)=>{var wr=od(),ud={r:256,g:256,b:256,a:1},ld={h:360,s:1,v:1,a:1};function Ao(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 Io(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 Oo(t,e,r){let n=t.color.toRgb(),i=e.color.toRgb(),o=Ao(n,i,r),s=[t.color];for(let a=1;a<r;a++){let c=Io(o,n,a,ud);s.push(wr(c))}return s}function sd(t,e,r,n){let i=t.color.toHsv(),o=e.color.toHsv();if(i.s===0||o.s===0)return Oo(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=Ao(i,o,r),c=[t.color],d;i.h<=o.h&&!s||i.h>=o.h&&s?d=o.h-i.h:s?d=360-o.h+i.h:d=360-i.h+o.h,a.h=Math.pow(-1,s?1:0)*Math.abs(d)/r;for(let u=1;u<r;u++){let p=Io(a,i,u,ld);c.push(wr(p))}return c}function ad(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 cd(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,d=t.length;c<d-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=Ao(i.color[r](),o.color[r](),(o.pos-i.pos)*100),a=Io(s,i.color[r](),(e-i.pos)*100,n);return wr(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 d=s.color!==void 0;if(!d&&(o||a===0||a===n-1))throw new Error("Cannot define two consecutive position-only stops");if(o=!d,s={color:d?wr(s.color):null,colorLess:!d,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:wr(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=ad(this.stops,e),n=[];this.stops.forEach((i,o)=>{i.colorLess&&(i.color=Oo(this.stops[o-1],this.stops[o+1],2)[1])});for(let i=0,o=this.stops.length;i<o-1;i++){let s=Oo(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=ad(this.stops,e),i=[];this.stops.forEach((o,s)=>{o.colorLess&&(o.color=sd(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=sd(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 cd(this.stops,e,"toRgb",ud)}hsvAt(e){return cd(this.stops,e,"toHsv",ld)}};fd.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 yd=y((vw,An)=>{"use strict";var pd=id(),My=dd(),hd=/\s/g;function Ro(...t){let e=My.apply(this,t),r=(n,i)=>qy(n?n.toString():"",e,i);return r.multiline=(n,i)=>Ny(n?n.toString():"",e,i),r}var md=(t,e,r)=>e.interpolation.toLowerCase()==="hsv"?t.hsv(r,e.hsvSpin.toLowerCase()):t.rgb(r);function qy(t,e,r){let n=gd(r),i=Math.max(t.replace(hd,"").length,e.stops.length),o=md(e,n,i),s="";for(let a of t)s+=a.match(hd)?a:pd.hex(o.shift().toHex())(a);return s}function Ny(t,e,r){let n=gd(r),i=t.split(`
21
+ `),o=Math.max.apply(null,i.map(c=>c.length).concat([e.stops.length])),s=md(e,n,o),a=[];for(let c of i){let d=s.slice(0),u="";for(let p of c)u+=pd.hex(d.shift().toHex())(p);a.push(u)}return a.join(`
22
+ `)}function gd(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 _r={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"}}};An.exports=Ro;for(let t in _r)An.exports[t]=e=>new Ro(_r[t].colors)(e,_r[t].options),An.exports[t].multiline=e=>new Ro(_r[t].colors).multiline(e,_r[t].options)});var Q=y(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.isUndefined=Ce.fixName=Ce.validateName=Ce.validateSingleChar=Ce.fixChar=Ce.validateChar=void 0;function ev(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}Ce.validateChar=ev;function tv(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}Ce.fixChar=tv;function rv(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}Ce.validateSingleChar=rv;function nv(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}Ce.validateName=nv;function iv(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 d=t.charCodeAt(a+1);if(c>=55296&&c<=56191&&d>=56320&&d<=57343){e+=t[a]+t[a+1],a++;continue}e+="\uFFFD"}return e}Ce.fixName=iv;function ov(t){return Object.prototype.toString.call(t)==="[object Undefined]"}Ce.isUndefined=ov});var Wt=y(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.StringOptions=void 0;var Nn=Q(),sv=function(){function t(e){this.doubleQuotes=!1,this.indent=" ",this.newline=`
23
+ `,this.pretty=!0,(0,Nn.isUndefined)(e.doubleQuotes)||(this.doubleQuotes=e.doubleQuotes),(0,Nn.isUndefined)(e.indent)||(this.indent=e.indent),(0,Nn.isUndefined)(e.newline)||(this.newline=e.newline),(0,Nn.isUndefined)(e.pretty)||(this.pretty=e.pretty)}return t}();jn.StringOptions=sv});var Ln=y(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.escapeDoubleQuotes=ke.escapeSingleQuotes=ke.escapeRightAngleBracketsInCdataTerminator=ke.escapeLeftAngleBrackets=ke.escapeAmpersands=void 0;function av(t){return t.replace(/&/g,"&amp;")}ke.escapeAmpersands=av;function cv(t){return t.replace(/</g,"&lt;")}ke.escapeLeftAngleBrackets=cv;function uv(t){return t.replace(/]]>/g,"]]&gt;")}ke.escapeRightAngleBracketsInCdataTerminator=uv;function lv(t){return t.replace(/'/g,"&apos;")}ke.escapeSingleQuotes=lv;function fv(t){return t.replace(/"/g,"&quot;")}ke.escapeDoubleQuotes=fv});var Zo=y(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});var dv=se(),Bd=Ln(),Ko=Q(),hv=function(){function t(e,r,n){this._validation=r,(0,Ko.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,Ko.fixChar)(e);else if(this._validation&&!(0,Ko.validateChar)(e))throw new Error((0,dv.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,Bd.escapeAmpersands)(e),e=(0,Bd.escapeLeftAngleBrackets)(e),e},t.prototype.up=function(){return this._parent},t}();Qo.default=hv});var $n=y(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});var Ud=se(),Xd=Q(),pv=function(){function t(e,r,n){this._hex=!1,this._validation=r,this._parent=e,this.char=n.char,(0,Xd.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,Xd.validateSingleChar)(e))throw new Error((0,Ud.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,Ud.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}();es.default=pv});var Bn=y(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});var mv=se(),gv=Q(),yv=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,gv.validateName)(e))throw new Error((0,mv.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}();ts.default=yv});var Un=y(xr=>{"use strict";var is=xr&&xr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xr,"__esModule",{value:!0});var rs=se(),Gd=Ln(),vv=Wt(),ns=Q(),bv=is(Zo()),wv=is($n()),_v=is(Bn()),xv=function(){function t(e,r,n){this._validation=r,(0,ns.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,ns.fixName)(e),e.length===0)throw new Error((0,rs.getContext)(this.up())+": attribute name should not be empty")}else if(this._validation&&!(0,ns.validateName)(e))throw e.length===0?new Error((0,rs.getContext)(this.up())+": attribute name should not be empty"):new Error((0,rs.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 wv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entityRef=function(e){var r=new _v.default(this,this._validation,e);return this._children.push(r),r},t.prototype.text=function(e){var r=new bv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});for(var r=new vv.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,Gd.escapeDoubleQuotes)(a.toString()):i+=(0,Gd.escapeSingleQuotes)(a.toString())}return i+=n,i},t.prototype.up=function(){return this._parent},t}();xr.default=xv});var ss=y(os=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});var Sv=se(),Ev=Q(),Cv=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,Ev.validateChar)(e))throw new Error((0,Sv.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}();os.default=Cv});var cs=y(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});var Pv=se(),Dv=Q(),Ov=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,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}();as.default=Ov});var ls=y(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});var Av=se(),Iv=Q(),Rv=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,Iv.validateChar)(e))throw new Error((0,Av.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}();us.default=Rv});var ds=y(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});var Fv=se(),kv=Q(),Tv=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,kv.validateChar)(e))throw new Error((0,Fv.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}();fs.default=Tv});var ps=y(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});var Mv=se(),qv=Q(),Nv=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,qv.validateName)(e))throw new Error((0,Mv.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}();hs.default=Nv});var Sr=y(ms=>{"use strict";Object.defineProperty(ms,"__esModule",{value:!0});var Xn=se(),Gn=Q(),jv=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,Gn.isUndefined)(e)){if(this._validation&&!(0,Gn.validateChar)(e))throw new Error((0,Xn.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,Xn.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,Gn.validateName)(e))throw new Error((0,Xn.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,Xn.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,Gn.isUndefined)(this._content)?"<?"+this._target+"?>":"<?"+this._target+" "+this._content+"?>"},t.prototype.up=function(){return this._parent},t}();ms.default=jv});var Hn=y(bt=>{"use strict";var wt=bt&&bt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bt,"__esModule",{value:!0});bt.validatePubId=void 0;var ct=se(),Lv=Wt(),Je=Q(),$v=wt(Er()),Bv=wt(ss()),Uv=wt(cs()),Xv=wt(ls()),Gv=wt(ds()),Hv=wt(ps()),Jv=wt(Sr()),Wv=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,Je.isUndefined)(n.sysId)||(this.sysId=n.sysId),(0,Je.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,Je.validateName)(e))throw new Error((0,ct.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,Je.isUndefined)(e)){if(this._validation&&!Hd(e))throw new Error((0,ct.getContext)(this.up())+": DTD public"+(' identifier "'+e+'" should not contain')+" characters not allowed in public identifiers");if(this._validation&&(0,Je.isUndefined)(this._sysId))throw new Error((0,ct.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,Je.isUndefined)(e)){if(this._validation&&!(0,Je.validateChar)(e))throw new Error((0,ct.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,ct.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 Bv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new $v.default(this,this._validation,e);return this._children.push(r),r},t.prototype.element=function(e){var r=new Uv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entity=function(e){var r=new Xv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.notation=function(e){var r=new Gv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.paramEntityRef=function(e){var r=new Hv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new Jv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});var r=new Lv.StringOptions(e),n="<!DOCTYPE "+this._name;if((0,Je.isUndefined)(this._pubId))(0,Je.isUndefined)(this._sysId)||(n+=" ",n=this.appendId("SYSTEM",this._sysId,n,r));else{if((0,Je.isUndefined)(this._sysId))throw new Error((0,ct.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,ct.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,ct.getContext)(this)+": doubleQuotes option inconsistent with DTD system identifier or public identifier");n+="'"+r+"'"}return n},t}();bt.default=Wv;function Hd(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}bt.validatePubId=Hd});var vs=y(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});var Jd=se(),gs=Q(),zv=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,Jd.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,Jd.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}();ys.default=zv});var xs=y(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});var Vv=se(),bs=Ln(),ws=Q(),Yv=function(){function t(e,r,n){this._validation=r,(0,ws.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,ws.fixChar)(e);else if(this._validation&&!(0,ws.validateChar)(e))throw new Error((0,Vv.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,bs.escapeAmpersands)(e),e=(0,bs.escapeLeftAngleBrackets)(e),e=(0,bs.escapeRightAngleBracketsInCdataTerminator)(e),e},t.prototype.up=function(){return this._parent},t}();_s.default=Yv});var Vn=y(Dr=>{"use strict";var _t=Dr&&Dr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Dr,"__esModule",{value:!0});var Jn=se(),Kv=Wt(),Cr=Q(),Wd=_t(Un()),Qv=_t(vs()),Pr=_t(xs()),Wn=_t($n()),Zv=_t(Er()),zn=_t(Bn()),e1=_t(Sr()),t1=function(){function t(e,r,n){this._validation=r,(0,Cr.isUndefined)(n.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=n.replaceInvalidCharsInName,(0,Cr.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,Cr.fixName)(e),e.length===0)throw new Error((0,Jn.getContext)(this.up())+": element name should not be empty")}else if(this._validation&&!(0,Cr.validateName)(e))throw e.length===0?new Error((0,Jn.getContext)(this.up())+": element name should not be empty"):new Error((0,Jn.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,Jn.getContext)(this.up())+': element "'+this.name+'" already contains an attribute with the'+(' name "'+e.name+'"'));var r=new Wd.default(this,this._validation,e);return this._children.push(r),this._attributeNames.push(e.name),r},t.prototype.cdata=function(e){var r=new Qv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.charData=function(e){var r=new Pr.default(this,this._validation,e);return this._children.push(r),r},t.prototype.charRef=function(e){var r=new Wn.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new Zv.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 zn.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new e1.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 Kv.StringOptions(e),i=r+n.indent,o="<"+this._name,s=[],a=0,c=this._children;a<c.length;a++){var d=c[a];d instanceof Wd.default?o+=" "+d.toString(e):s.push(d)}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 Pr.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 Wn.default||i instanceof zn.default||i instanceof Pr.default))return!1}return!0},t.prototype.onSameLine=function(e,r){return(e instanceof Wn.default||e instanceof zn.default||e instanceof Pr.default)&&!(0,Cr.isUndefined)(r)&&(r instanceof Wn.default||r instanceof zn.default||r instanceof Pr.default)},t}();Dr.default=t1});var se=y(zt=>{"use strict";var Kn=zt&&zt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(zt,"__esModule",{value:!0});zt.getContext=void 0;var r1=Kn(Un()),n1=Kn(Qn()),i1=Kn(Hn()),o1=Kn(Vn());function Yn(t){if(t instanceof r1.default)return Yn(t.up())+(' > attribute "'+t.name+'"');if(t instanceof n1.default)return"in XML document";if(t instanceof i1.default)return Yn(t.up())+" > DTD";if(t instanceof o1.default)return Yn(t.up())+(' > element "'+t.name+'"');throw new Error("Unrecognized object of type "+Object.prototype.toString.call(t))}zt.getContext=Yn});var Er=y(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});var Ss=se(),Es=Q(),s1=function(){function t(e,r,n){this._validation=r,(0,Es.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,Es.fixChar)(e);else if(this._validation&&!(0,Es.validateChar)(e))throw new Error((0,Ss.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,Ss.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,Ss.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}();Cs.default=s1});var Os=y(Ds=>{"use strict";Object.defineProperty(Ds,"__esModule",{value:!0});var Ps=se(),a1=Wt(),Or=Q(),c1=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,Or.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,Or.isUndefined)(e)&&!u1(e))throw new Error((0,Ps.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,Or.isUndefined)(e)&&e!=="yes"&&e!=="no")throw new Error((0,Ps.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&&!l1(e))throw new Error((0,Ps.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 a1.StringOptions(e),n=r.doubleQuotes?'"':"'",i="<?xml version="+n+this._version+n;return(0,Or.isUndefined)(this._encoding)||(i+=" encoding="+n+this._encoding+n),(0,Or.isUndefined)(this._standalone)||(i+=" standalone="+n+this._standalone+n),i+="?>",i},t.prototype.up=function(){return this._parent},t}();Ds.default=c1;function u1(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 l1(t){for(var e=0;e<=9;e++)if(t==="1."+e)return!0;return!1}});var Qn=y(Ir=>{"use strict";var Rr=Ir&&Ir.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ir,"__esModule",{value:!0});var f1=Wt(),d1=Q(),h1=Rr(Er()),zd=Rr(Os()),Vd=Rr(Hn()),Ar=Rr(Vn()),p1=Rr(Sr()),m1=function(){function t(e){this._children=[],this._validation=(0,d1.isUndefined)(e.validation)?!0:e.validation}return t.prototype.comment=function(e){var r=new h1.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 zd.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 Ar.default});if(this._validation&&r.length!==0)throw new Error("in XML document: DTD must precede the root element");var n=new Vd.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 Ar.default});if(this._validation&&r.length!==0)throw new Error("in XML document: only one root element is permitted");var n=new Ar.default(this,this._validation,e);return this._children.push(n),n},t.prototype.procInst=function(e){var r=new p1.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(d){return d instanceof Ar.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 f1.StringOptions(e),i="",o=0,s=this._children;o<s.length;o++){var a=s[o];a instanceof zd.default||a instanceof Vd.default||a instanceof Ar.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}();Ir.default=m1});var Yd=y(q=>{"use strict";var te=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 g1=te(Qn()),y1=Un();Object.defineProperty(q,"XmlAttribute",{enumerable:!0,get:function(){return te(y1).default}});var v1=Zo();Object.defineProperty(q,"XmlAttributeText",{enumerable:!0,get:function(){return te(v1).default}});var b1=vs();Object.defineProperty(q,"XmlCdata",{enumerable:!0,get:function(){return te(b1).default}});var w1=xs();Object.defineProperty(q,"XmlCharData",{enumerable:!0,get:function(){return te(w1).default}});var _1=$n();Object.defineProperty(q,"XmlCharRef",{enumerable:!0,get:function(){return te(_1).default}});var x1=Er();Object.defineProperty(q,"XmlComment",{enumerable:!0,get:function(){return te(x1).default}});var S1=Os();Object.defineProperty(q,"XmlDecl",{enumerable:!0,get:function(){return te(S1).default}});var E1=Qn();Object.defineProperty(q,"XmlDocument",{enumerable:!0,get:function(){return te(E1).default}});var C1=Hn();Object.defineProperty(q,"XmlDtd",{enumerable:!0,get:function(){return te(C1).default}});var P1=ss();Object.defineProperty(q,"XmlDtdAttlist",{enumerable:!0,get:function(){return te(P1).default}});var D1=cs();Object.defineProperty(q,"XmlDtdElement",{enumerable:!0,get:function(){return te(D1).default}});var O1=ls();Object.defineProperty(q,"XmlDtdEntity",{enumerable:!0,get:function(){return te(O1).default}});var A1=ds();Object.defineProperty(q,"XmlDtdNotation",{enumerable:!0,get:function(){return te(A1).default}});var I1=ps();Object.defineProperty(q,"XmlDtdParamEntityRef",{enumerable:!0,get:function(){return te(I1).default}});var R1=Vn();Object.defineProperty(q,"XmlElement",{enumerable:!0,get:function(){return te(R1).default}});var F1=Bn();Object.defineProperty(q,"XmlEntityRef",{enumerable:!0,get:function(){return te(F1).default}});var k1=Sr();Object.defineProperty(q,"XmlProcInst",{enumerable:!0,get:function(){return te(k1).default}});function T1(t){return t===void 0&&(t={}),new g1.default(t)}q.document=T1});var As=y(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.stringify=re.isMap=re.isSet=re.isFunction=re.isArray=re.isObject=re.isNull=re.isUndefined=void 0;function Kd(t){return Object.prototype.toString.call(t)==="[object Undefined]"}re.isUndefined=Kd;function Qd(t){return Object.prototype.toString.call(t)==="[object Null]"}re.isNull=Qd;function M1(t){return Object.prototype.toString.call(t)==="[object Object]"}re.isObject=M1;function q1(t){return Object.prototype.toString.call(t)==="[object Array]"}re.isArray=q1;function Zd(t){return Object.prototype.toString.call(t)==="[object Function]"}re.isFunction=Zd;function N1(t){return Object.prototype.toString.call(t)==="[object Set]"}re.isSet=N1;function j1(t){return Object.prototype.toString.call(t)==="[object Map]"}re.isMap=j1;function L1(t){return!Kd(t)&&!Qd(t)&&Zd(t?.toString)&&(t=t.toString()),String(t)}re.stringify=L1});var oh=y(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.WrapHandlers=Pe.TypeHandlers=Pe.FormatOptions=Pe.DtdOptions=Pe.DeclarationOptions=Pe.Options=void 0;var Be=As(),$1=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,Be.isUndefined)(e.validation)||(this.validation=e.validation),(0,Be.isUndefined)(e.aliasString)||(this.aliasString=e.aliasString),(0,Be.isUndefined)(e.attributeString)||(this.attributeString=e.attributeString),(0,Be.isUndefined)(e.cdataInvalidChars)||(this.cdataInvalidChars=e.cdataInvalidChars),(0,Be.isUndefined)(e.cdataKeys)||(this.cdataKeys=e.cdataKeys),this.declaration=new eh(e.declaration),this.dtd=new th(this.validation,e.dtd),this.format=new rh(e.format),(0,Be.isUndefined)(e.replaceInvalidChars)||(this.replaceInvalidChars=e.replaceInvalidChars),this.typeHandlers=new nh(e.typeHandlers),(0,Be.isUndefined)(e.useSelfClosingTagIfEmpty)||(this.useSelfClosingTagIfEmpty=e.useSelfClosingTagIfEmpty),(0,Be.isUndefined)(e.valueString)||(this.valueString=e.valueString),this.wrapHandlers=new ih(e.wrapHandlers)}return t}();Pe.Options=$1;var eh=function(){function t(e){e===void 0&&(e={}),this.include=!0,(0,Be.isUndefined)(e.include)||(this.include=e.include),this.encoding=e.encoding,this.standalone=e.standalone,this.version=e.version}return t}();Pe.DeclarationOptions=eh;var th=function(){function t(e,r){if(r===void 0&&(r={}),this.include=!1,(0,Be.isUndefined)(r.include)||(this.include=r.include),e&&(0,Be.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}();Pe.DtdOptions=th;var rh=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}();Pe.FormatOptions=rh;var nh=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}();Pe.TypeHandlers=nh;var ih=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}();Pe.WrapHandlers=ih});var fh=y(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});ut.parse=ut.parseToExistingElement=ut.Absent=void 0;var ah=Yd(),ch=oh(),V=As(),Is=function(){function t(){}return Object.defineProperty(t,"instance",{get:function(){return t._instance},enumerable:!1,configurable:!0}),t._instance=new t,t}();ut.Absent=Is;function Rs(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 uh(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 ah.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 B1(t,e,r,n){var i=r.attribute({name:t,replaceInvalidCharsInName:n.replaceInvalidChars});uh((0,V.stringify)(e),i,n)}function sh(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];B1(s,(0,V.stringify)(e[s]),r,n)}return}if(t.indexOf(n.valueString)===0){Zn(t,(0,V.stringify)(e),r,n);return}var a=r;if(!(0,V.isArray)(e)&&!(0,V.isSet)(e)){var c=Rs(e,n);if(!(0,V.isUndefined)(c)&&c(e)===Is.instance)return;a=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}Zn(t,e,a,n)}function U1(t,e,r){if((0,V.isMap)(t))t.forEach(function(s,a){sh((0,V.stringify)(a),s,e,r)});else for(var n=0,i=Object.keys(t);n<i.length;n++){var o=i[n];sh(o,t[o],e,r)}}function X1(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 d=s;if(!(0,V.isArray)(c)&&!(0,V.isSet)(c)){var u=Rs(c,n);if(!(0,V.isUndefined)(u)&&u(c)===Is.instance)return;d=s.element({name:o,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}Zn(o,c,d,n)})}function Zn(t,e,r,n){var i=Rs(e,n);if((0,V.isUndefined)(i)||(e=i(e)),(0,V.isObject)(e)||(0,V.isMap)(e)){U1(e,r,n);return}if((0,V.isArray)(e)||(0,V.isSet)(e)){X1(t,e,r,n);return}uh((0,V.stringify)(e),r,n)}function lh(t,e,r){var n=new ch.Options(r);Zn(t.name,e,t,n)}ut.parseToExistingElement=lh;function G1(t,e,r){var n=new ch.Options(r),i=new ah.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 lh(o,e,r),i.toString(n.format)}ut.parse=G1});function Yt(t=""){return eb?Ts.default.resolve(qs.default.sync(__dirname),"../../../",t):Ts.default.resolve(qs.default.sync(__dirname),"../griddo-components",t)}function tb(){let t=Ms.default.sync("jsconfig.json",{cwd:Yt()});return Ms.default.sync("tsconfig.json",{cwd:Yt()})||t}function rb(){let t=require(tb());return Object.keys(t?.compilerOptions?.paths).reduce((e,r)=>{let[n]=r.split("/"),[i]=t&&t.compilerOptions&&t.compilerOptions.paths&&t.compilerOptions.paths[r],[o]=i.split("/*"),s=Yt(o);return{...e,[n]:s}},{components:`${Yt()}/src/index.js`})}var Ts,Ms,qs,eb,X_,wh=$s(()=>{"use strict";Ts=T(require("node:path")),Ms=T(fi()),qs=T(Zt()),eb=__dirname.includes("node_modules"),X_=rb()});var Eh={};Nh(Eh,{CXDir:()=>ub,artifacts:()=>ab,default:()=>cb});var Kt,ti,_h,xh,nb,ib,ob,sb,ab,Sh,cb,ub,Ch=$s(()=>{"use strict";Kt=T(require("node:path")),ti=T(Zt());wh();_h=ti.default.sync(Kt.default.resolve(__dirname,"../..")),xh=ti.default.sync(__dirname),nb=ti.default.sync(__dirname),ib=Kt.default.resolve(xh,"caches"),ob=Yt(),sb=Kt.default.join(_h,"exports/sites"),ab=["public",".cache","static"],Sh={proDomain:"pro-",CXDir:{EXPORTS:"__exports",CACHE:"__cache",CX:"__cx",SSG:"__ssg",COMPONENTS:"__components",ROOT:"__root"},dirs:t=>({__cache:Kt.default.join(ib,t||""),__components:ob,__cx:xh,__exports:Kt.default.join(sb,t||""),__root:_h,__ssg:nb})},cb=Sh,ub=Sh.CXDir});var ua=T(ze());var sa=require("node:child_process"),aa=T(ze()),ca=T(Zt());aa.default.config();var np=ca.default.sync(__dirname);function hi(t){return e=>ip(e,t)}function ip(t,e){let[r,...n]=t.split(" "),{error:i,status:o}=(0,sa.spawnSync)(r,n,{cwd:np,stdio:["ignore","inherit","ignore"],encoding:"utf8",shell:!0,env:Object.assign({GRIDDO_EXPORTER:"true"},process.env,e)});if(i)throw console.error(i),new Error(i.toString());if(o!==0)throw new Error(`Command \`${t}\` exited with code ${o}`)}ua.default.config();var pu=T(Gi()),mu=T(ar()),Yi=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,pu.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(mu.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)}}},kt=new zi;var bd=q(Bi()),wd=q(or()),_d=q(Je());var bf=q(require("node:crypto")),yt=q(require("node:fs")),ho=q(require("node:path")),po=q($t()),_n=ho.default.resolve(__dirname,"./../apiCache"),wf=`${_n}/siteHash.json`;function _f(){yt.default.existsSync(_n)||yt.default.mkdirSync(_n),console.info("Cache initialized")}function xf(t){let e=bf.default.createHash("sha256");return e.update(JSON.stringify(t)),`${_n}/${e.digest("hex")}`}function Sf(t,e){let r=typeof e=="string"?e:JSON.stringify(e),n=xf(t),i=ho.default.dirname(n);yt.default.existsSync(i)||yt.default.mkdirSync(i,{recursive:!0}),yt.default.writeFileSync(n,r,"utf8")}function Ef(t){try{let e=xf(t);return po.default.readJSONSync(e,{encoding:"utf-8"})}catch{return null}}function ry(){try{return po.default.readJSONSync(wf,{encoding:"utf-8"})||{}}catch{return{}}}function Cf(t,e){let r=ry(),n=r[t],i=e||n||new Date().valueOf();return i!==n&&(r[t]=i,yt.default.writeFileSync(wf,JSON.stringify(r),{encoding:"utf-8"})),i.toString()}var Ao=q(or()),hd=q(Je()),Ye=q($t()),pd=q(dd()),Io=q(kr());var An="10.4.7";hd.default.config();var ow=!!process.env.GRIDDO_DEBUG_LOGS&&!!JSON.parse(process.env.GRIDDO_DEBUG_LOGS),Ay=!!process.env.GRIDDO_BUILD_LOGS&&!!JSON.parse(process.env.GRIDDO_BUILD_LOGS)||!!process.env.LOGS&&!!JSON.parse(process.env.LOGS),In=Io.default.sync(__dirname),Rn=Io.default.sync();function md(t){let e=[];return Ye.default.readdirSync(t).forEach(n=>{let i=`${t}/${n}`;e.push(i)}),e}function ot(t,e="",r=1,n=1){let i=t.split(`
28
+ `)),process.exit(1)}}},kt=new Yi;var Ed=T(Gi()),Cd=T(ar()),Pd=T(ze());var Ef=T(require("node:crypto")),yt=T(require("node:fs")),go=T(require("node:path")),yo=T($t()),xn=go.default.resolve(__dirname,"./../apiCache"),Cf=`${xn}/siteHash.json`;function Pf(){yt.default.existsSync(xn)||yt.default.mkdirSync(xn),console.info("Cache initialized")}function Df(t){let e=Ef.default.createHash("sha256");return e.update(JSON.stringify(t)),`${xn}/${e.digest("hex")}`}function Of(t,e){let r=typeof e=="string"?e:JSON.stringify(e),n=Df(t),i=go.default.dirname(n);yt.default.existsSync(i)||yt.default.mkdirSync(i,{recursive:!0}),yt.default.writeFileSync(n,r,"utf8")}function Af(t){try{let e=Df(t);return yo.default.readJSONSync(e,{encoding:"utf-8"})}catch{return null}}function dy(){try{return yo.default.readJSONSync(Cf,{encoding:"utf-8"})||{}}catch{return{}}}function If(t,e){let r=dy(),n=r[t],i=e||n||new Date().valueOf();return i!==n&&(r[t]=i,yt.default.writeFileSync(Cf,JSON.stringify(r),{encoding:"utf-8"})),i.toString()}var Fo=T(ar()),vd=T(ze()),Ye=T($t()),bd=T(yd()),ko=T(Zt());var In="10.4.8";vd.default.config();var _w=!!process.env.GRIDDO_DEBUG_LOGS&&!!JSON.parse(process.env.GRIDDO_DEBUG_LOGS),Ly=!!process.env.GRIDDO_BUILD_LOGS&&!!JSON.parse(process.env.GRIDDO_BUILD_LOGS)||!!process.env.LOGS&&!!JSON.parse(process.env.LOGS),Rn=ko.default.sync(__dirname),Fn=ko.default.sync();function wd(t){let e=[];return Ye.default.readdirSync(t).forEach(n=>{let i=`${t}/${n}`;e.push(i)}),e}function ot(t,e="",r=1,n=1){let i=t.split(`
29
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),d=`\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 C=" ".repeat(c-b.length-r);return`\u2502${" ".repeat(r)}${b}${C}\u2502
32
- `}).join("");console.log(`${p}${d}${m}${d}${g}`)}function He(t){Ay&&console.info(t.replace(/(\s)\s+/g,"$1"))}function gd(t){return new Promise(e=>setTimeout(e,t))}function Ro(t,e=3){return(t/1e3).toFixed(e)}function Fo(t){return"site"in t&&t.site?t?.site:void 0}function ko(t,e){for(let r in t)e.includes(r)?delete t[r]:typeof t[r]=="object"&&ko(t[r],e)}function To(t){return t.map(({name:e,id:r})=>`${e} (${r})`).join(", ")}function Mo(t){let e=`
32
+ `}).join("");console.log(`${p}${d}${m}${d}${g}`)}function He(t){Ly&&console.info(t.replace(/(\s)\s+/g,"$1"))}function _d(t){return new Promise(e=>setTimeout(e,t))}function To(t,e=3){return(t/1e3).toFixed(e)}function Mo(t){return"site"in t&&t.site?t?.site:void 0}function qo(t,e){for(let r in t)e.includes(r)?delete t[r]:typeof t[r]=="object"&&qo(t[r],e)}function No(t){return t.map(({name:e,id:r})=>`${e} (${r})`).join(", ")}function jo(t){let e=`
33
33
  \xB7\xB7
34
- \xB7\xB7 Griddo Exporter ${An}
34
+ \xB7\xB7 Griddo Exporter ${In}
35
35
  \xB7\xB7 Adapter: ${t}
36
36
  \xB7\xB7
37
- `;console.log(pd.default.cristal(e))}function yd(t){let e=Ye.default.readdirSync(t),r={},n=e.filter(o=>{let s=`${t}/${o}`,a=Ye.default.readJSONSync(s,"utf-8"),{id:c,entity:d,fullUrl:u}=a;return!!(c&&d&&u)});for(let o of n){let s=`${t}/${o}`,a=Ye.default.readJSONSync(s,"utf-8"),c=Ye.default.statSync(s).mtimeMs,{id:d}=a;(!r[d]||c>Ye.default.statSync(`${t}/${r[d]}`).mtimeMs)&&(r[d]=o)}let i=0;for(let o of n){let s=`${t}/${o}`,a=Ye.default.readJSONSync(s,"utf-8"),{id:c}=a;o!==r[c]&&(Ye.default.unlinkSync(s),i++)}console.log(`Sanitize apiCache dir for ${i} files`)}async function qo(...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 $e(t){if(JSON.parse(process.env.GRIDDO_RENDER_BREAKPOINTS_FEATURE||"false"))return new Promise(r=>{console.log(`
38
- `),ot(t,"\u{1F953}",1,0),process.stdin.once("data",()=>{r()})})}async function Wt(t){let{steps:e,name:r,attempts:n}=t,i=0,o=n||1;for(;i<o;)try{console.info(`
39
- ${Ao.default.blue("info")} start ${r} life-cycle`);let s=await qo(...e);console.info(`${Ao.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`)}_d.default.config();var{env:{RETRY_WAIT_SECONDS:Iy="4",RETRY_ATTEMPTS:vd="4"}}=process;async function No(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 d=new Date,u=Ef(c);if(u){let p=Fo(u),g=p?`site: ${p}`:"",m=Ro(new Date().getTime()-d.getTime());return He(`${e} (cache) ${g} ${n} - ${m}s ${r}`),u}}try{let d=new Date,{data:u}=await(0,bd.default)({url:n,method:e,headers:Object.assign({},a,kt.headers),data:i}),p=Fo(u),g=p?`site: ${p}`:"",m=Ro(new Date().getTime()-d.getTime());return He(`${e} (fetch) ${g} ${n} - ${m}s ${r}`),Sf(c,u),u}catch(d){let u=d;return u.response?.status===404?null:(s>parseInt(vd)&&(console.log(`
40
- Max attempts ${vd} reached
37
+ `;console.log(bd.default.cristal(e))}function xd(t){let e=Ye.default.readdirSync(t),r={},n=e.filter(o=>{let s=`${t}/${o}`,a=Ye.default.readJSONSync(s,"utf-8"),{id:c,entity:d,fullUrl:u}=a;return!!(c&&d&&u)});for(let o of n){let s=`${t}/${o}`,a=Ye.default.readJSONSync(s,"utf-8"),c=Ye.default.statSync(s).mtimeMs,{id:d}=a;(!r[d]||c>Ye.default.statSync(`${t}/${r[d]}`).mtimeMs)&&(r[d]=o)}let i=0;for(let o of n){let s=`${t}/${o}`,a=Ye.default.readJSONSync(s,"utf-8"),{id:c}=a;o!==r[c]&&(Ye.default.unlinkSync(s),i++)}console.log(`Sanitize apiCache dir for ${i} files`)}async function Lo(...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 $e(t){if(JSON.parse(process.env.GRIDDO_RENDER_BREAKPOINTS_FEATURE||"false"))return new Promise(r=>{console.log(`
38
+ `),ot(t,"\u{1F953}",1,0),process.stdin.once("data",()=>{r()})})}async function Jt(t){let{steps:e,name:r,attempts:n}=t,i=0,o=n||1;for(;i<o;)try{console.info(`
39
+ ${Fo.default.blue("info")} start ${r} life-cycle`);let s=await Lo(...e);console.info(`${Fo.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`)}Pd.default.config();var{env:{RETRY_WAIT_SECONDS:$y="4",RETRY_ATTEMPTS:Sd="4"}}=process;async function $o(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 d=new Date,u=Af(c);if(u){let p=Mo(u),g=p?`site: ${p}`:"",m=To(new Date().getTime()-d.getTime());return He(`${e} (cache) ${g} ${n} - ${m}s ${r}`),u}}try{let d=new Date,{data:u}=await(0,Ed.default)({url:n,method:e,headers:Object.assign({},a,kt.headers),data:i}),p=Mo(u),g=p?`site: ${p}`:"",m=To(new Date().getTime()-d.getTime());return He(`${e} (fetch) ${g} ${n} - ${m}s ${r}`),Of(c,u),u}catch(d){let u=d;return u.response?.status===404?null:(s>parseInt(Sd)&&(console.log(`
40
+ Max attempts ${Sd} reached
41
41
  --------------------------------------
42
42
  - ${e.toUpperCase()} ${n}
43
43
  - BODY: ${JSON.stringify(i)}
44
44
  - HEADERS: ${JSON.stringify(a)}
45
45
  - RESPONSE: ${u.response?.status,JSON.stringify(u.response?.data)}
46
46
  --------------------------------------
47
- `),process.exit(1)),u.response||(console.log("Unknown error occurred"),console.log(JSON.stringify(u,null,2)),process.exit(1)),Ry(u,{callInfo:{endpoint:n,body:i}}),console.warn(`Waiting for retry: ${e}`,n),await gd(parseInt(Iy)*1e3),No({endpoint:n,body:i,headers:a,cacheKey:o,attempt:s+1},e,r))}}async function Fe(t){return await No(t,"get")}async function vt(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 No(t,"post",i||"")}function Ry(t,e){let{response:r,message:n,stack:i}=t,{callInfo:o}=e,{status:s,statusText:a,data:c}=r||{},d=[];for(let m of Object.keys(o))d.push(`${m}: ${typeof o[m]=="object"?JSON.stringify(o[m]):o[m]}`);let u=d.join(`
47
+ `),process.exit(1)),u.response||(console.log("Unknown error occurred"),console.log(JSON.stringify(u,null,2)),process.exit(1)),By(u,{callInfo:{endpoint:n,body:i}}),console.warn(`Waiting for retry: ${e}`,n),await _d(parseInt($y)*1e3),$o({endpoint:n,body:i,headers:a,cacheKey:o,attempt:s+1},e,r))}}async function Fe(t){return await $o(t,"get")}async function vt(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 $o(t,"post",i||"")}function By(t,e){let{response:r,message:n,stack:i}=t,{callInfo:o}=e,{status:s,statusText:a,data:c}=r||{},d=[];for(let m of Object.keys(o))d.push(`${m}: ${typeof o[m]=="object"?JSON.stringify(o[m]):o[m]}`);let u=d.join(`
48
48
  `),p=r?`Code: ${s} - ${a}
49
49
  Response: ${JSON.stringify(c)}`:"",g=`${n}
50
- ${i}`;console.warn(wd.default.bold.red(`
50
+ ${i}`;console.warn(Cd.default.bold.red(`
51
51
  =============
52
52
 
53
53
  { Call info }
@@ -60,9 +60,9 @@ ${p}
60
60
  ${g}
61
61
 
62
62
  =============
63
- `))}var Fy=process.env.API_URL,ky={GET_ALL:`${Fy}/domains`},Fn=class{static async getAll(){let{GET_ALL:e}=ky;return await Fe({endpoint:e})}};async function jo(){await kt.login();let t=await Fn.getAll();return Ty(t)}function Ty(t){let e=t.filter(({slug:r})=>!!r).map(({slug:r})=>r.replace("/",""));return[...new Set(e)]}var As=q(require("node:path"));var st=q(require("node:fs")),xd=q(require("node:fs/promises")),Ie=q(require("node:path")),Lo=q($t());async function*$o(t){let e=Ie.default.resolve(t),r=md(e).filter(n=>Ie.default.extname(n)===".json");for(let n of r)try{let i=await xd.default.stat(n),o=await Lo.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 Sd(t){st.default.existsSync(t)||(st.default.mkdirSync(t),st.default.mkdirSync(Ie.default.resolve(t,"metadata"))),console.info("Store initialized")}function Ed(t,e){st.default.writeFileSync(Ie.default.resolve(t,"metadata","render-info.json"),JSON.stringify(e))}function My(t,e){return Bo(t).filter(i=>e.includes(i))}function Bo(t){return st.default.readdirSync(t).filter(r=>{let n=`${t}/${r}`,i=st.default.statSync(n);if(i&&i.isDirectory()||Ie.default.extname(r)!==".json")return!1;let o=Ie.default.basename(r,Ie.default.extname(r));return!isNaN(parseInt(o))}).map(r=>{let n=Ie.default.basename(r,Ie.default.extname(r));return parseInt(n)})}function Cd(t,e){e.forEach(r=>{ko(r,["editorID","parentEditorID"]);let n=`${r.context.page.id}.json`,i=Ie.default.resolve(t,n);Lo.default.writeJSONSync(i,r)})}function kn(t,e){e.length!==0&&e.forEach(r=>{let n=Ie.default.resolve(t,`${r}.json`);try{st.default.unlinkSync(n)}catch(i){console.log(`Error removing file ${r}`,i.message)}})}async function Pd(t,e){let{changedPages:r,pages:n,validPagesIds:i,sitesToPublish:o}=e,s=My(t,n),a=i.filter(m=>!s.includes(m)),c=a.concat(r),d=s.filter(m=>!i.includes(m)),u=Array.from(new Set(c)).filter(m=>!d.includes(m)),p=$o(Ie.default.resolve(__dirname,"../store")),g=[];for await(let m of p){let b=m.context.page.site,C=m.context.page.id;o.map(P=>P.id).includes(b)||g.push(C)}return{pagesInStore:s,pagesMissingInStore:a,pagesToDeleteFromStore:[...d,...g],pagesToWriteToStore:u}}var fh=q(Je()),dh=q(oi());var Dd=q(Je());Dd.default.config();var Uo=process.env.API_URL,at=`${Uo}/site/`,Ke={GET_ALL:`${Uo}/sites/all`,GET_PAGE:[`${Uo}/page/`,""],INFO:[`${at}`,"/all"],LANGUAGES:[`${at}`,"/languages"],BUILD_START:[`${at}`,"/build/start"],BUILD_END:[`${at}`,"/build/end"],GET_DISTRIBUTOR_DATA:[`${at}`,"/distributor"],GET_SITEMAP:[`${at}`,"/sitemap"],SOCIALS:[`${at}`,"/socials"],GET_PAGES:[`${at}`,"/pages?pagination=false"]},ve=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 vt({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,d=o||e.language;return await vt({endpoint:`${s}${c}${a}`,body:r,headers:{lang:d},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 Tn=class{static getBody(e,r){let{order:n,sources:i,quantity:o,mode:s,fixed:a,fullRelations:c=!1,allLanguages:d=!1,preferenceLanguage:u=!1,referenceId:p}=e;return s==="auto"?{mode:s,order:n,sources:i,quantity:o,fullRelations:c,allLanguages:d,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 ot(`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 ot(`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 ve.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 d in a){if(d==="queriedItems")continue;let p=a[d];!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 Mn=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,d=b=>{let C=b.find(P=>typeof P=="number");return typeof C=="number"?C:null},u=d([r,c?.[o]?.defaultHeader,s]),p=d([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 Xo=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 vt({endpoint:e})}},Go=new Xo;var Id=q(Je());function Ho(t,e,r,n="jpg"){let i=typeof t=="string"?t:t?.url;return i?i.split("/")[2].includes("cloudinary.com")?Ny(i,`c_fill,w_${e},h_${r}`):qy(i,`f/${n}/w/${e}/h/${r}`):null}function qy(t,e){let r=t.split("/"),n=r.slice(0,-1).join("/"),i=r.slice(-1)[0];return`${n}/${e}/${i}`}function Ny(t,e){let r=t.replace("https://",""),n=r.split("/").slice(0,4).join("/"),i=r.replace(n,"");return`https://${n}/${e}${i}`}Id.default.config();var jy=JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false"),Ly=25;function $y({socialTitle:t,socialDescription:e,socialImage:r}){return{type:"website",title:t,description:e,image:r?Ho(r,1280,768):"",twitterImage:r?Ho(r,1280,768):""}}function By(t){let{title:e,metaTitle:r,metaDescription:n,canonicalURL:i,locale:o,url:s,isIndexed:a,follow:c,metasAdvanced:d,pageLanguages:u,fullUrl:p,metaKeywords:g}=t,m=d?.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 zo(t,e){let{id:r,title:n,fullPath:i,language:o,breadcrumb:s,socialDescription:a,socialImage:c,socialTitle:d}=t,{baseUrl:u,cloudinaryName:p,griddoVersion:g,siteLangs:m,siteMetadata:b,siteOptions:C,siteScript:P,siteSlug:F,socials:N,theme:G,navigations:{header:B,footer:J}}=e;t.breadcrumb=s,t.siteSlug=F,t.apiUrl=u,t.publicApiUrl=e.publicBaseUrl,t.instance=e.instance;let be=m.find(({id:R})=>R===t?.language)?.locale.replace(/_/g,"-"),K=By(t),w=$y({socialDescription:a,socialImage:c,socialTitle:d}),x=jy?i.compose:`${i.domain}${i.compose}`,E=new Date().toString();return{path:x,size:void 0,context:{id:r,title:n,fullPath:i,locale:be,languageId:o,theme:G,siteMetadata:b,pageMetadata:K,openGraph:w,socials:N,siteLangs:m,cloudinaryName:p,siteOptions:C,griddoVersion:g,renderDate:E,siteScript:P,header:B,footer:J,page:t}}}async function Rd(t,e){return await zo(t,e)}async function Fd({page:t,pages:e,isRoot:r=!1,defaultLang:n,template:i,totalQueriedItems:o},s){let a=e.map(async(c,d)=>{let u=d===0,p=d+1,{domainUrl:g,compose:m}=t.fullPath,b={...t,fullPath:{...t.fullPath,compose:Wo(m,p,{addEndingSlash:!0})},fullUrl:Wo(t.fullUrl,p,{addEndingSlash:!0}),slug:Wo(t.slug,p),title:Ad(t.title,p),metaTitle:Ad(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 zo(b,s)});return Promise.all(a)}function kd(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,a)=>{let c=JSON.parse(JSON.stringify(n)),{sectionSlug:d="/",title:u="",metaTitle:p="",metaDescription:g=""}=s,m=typeof u=="string"?u:u.content,b=c.fullPath.compose||"",C=c.fullUrl.endsWith("/")?c.fullUrl.slice(0,-1):c.fullUrl,P=d?.replace(/\//g,""),N=d==="/"?P:P+"/",G=b.endsWith("/")?"":"/",B=`${b}${G}${N}`;return m.trim()&&(c.title=m),g.trim()&&(c.metaDescription=g),c.id=parseInt("-"+c.id+a),c.fullUrl=`${C}/${N}`,c.fullPath.compose=B,c.slug=B,c.template.activeSectionSlug=d,c.template.activeSectionBase=C,c.metaTitle=p.trim()||m.trim()||c.metaTitle,await zo(c,e)});return Promise.all(o)}function Td(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",d=JSON.stringify(a).includes('"hasGriddoMultiPage":true');if(!c||!d)continue;let{component:u,hasGriddoMultiPage:p,elements:g}=a;u&&p&&r(g||[]),n(a,o+1)}o||r(null)}};n([t])})}function Uy(t,e,r){return e?.slice(t*(r-1),t*r)}function Xy(t,e){let r=Math.ceil(e.length/t)||1;return Array.from({length:r},(i,o)=>o+1)?.map(i=>Uy(t,e,i))}function Md(t){let e=t.queriedItems||[],r=t?.itemsPerPage||Ly;return Xy(r,e)}function Od(t){return t.replace(/\/+$/,"/")}function Wo(t,e,r){let n=t.endsWith("/")?"":"/",i=r?.addEndingSlash?"/":"";return e<=1?Od(`${t}${i}`):Od(`${t}${n}${e}${i}`)}function Ad(t,e){return!t||e<=1?t:`${t} - ${e}`}var M1=q($t()),q1=q(sh());var N1=process.env.API_URL,j1=!!process.env.GRIDDO_RENDER_ALL_SITES||!!process.env.updateAllSites,Vt=process.env.GRIDDO_RENDER_SITE&&parseInt(process.env.GRIDDO_RENDER_SITE)||process.env.testSite&&parseInt(process.env.testSite),ah=(process.env.GRIDDO_RENDER_PAGES||process.env.testPage||"").split(",").map(t=>parseInt(t)).filter(Boolean),n_=JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false");async function Zn(t){console.info(`API URL ${N1}`),await kt.login();let e=await ve.getAll(),r=j1?e.filter(o=>!Vt||o.id===Vt):e.filter(o=>Vt?o.id===Vt:!!o.shouldBeUpdated);if(r.length)for(let o of r){let{items:s}=await ve.getLanguages(o.id);o.domains=s.filter(a=>a.domain&&(a.domain.slug===t||a.domain.slug===`/${t}`)).map(a=>({[a.id]:`${a.domain.slug}${a.path}`}))}let n=r.filter(o=>Vt?o.id===Vt:!!o.isPublished&&o.domains.length>0),i=r.filter(o=>!o.isPublished&&o.shouldBeUpdated);return{sitesToPublish:n,sitesToUnpublish:i}}async function ch(t){for(let e of t){let r=await ve.startSiteRender(e.id),{siteHash:n}=r,i={siteHash:n,publishHashes:[],unpublishHashes:[]};await ve.endSiteRender(e.id,i)}}async function uh(t){let e=await ve.startSiteRender(t),r=await ve.getInfo(t),n=await ve.getLanguages(t),i=await ve.getSocials(t),o=n.items,s=o.find(b=>b.isDefault),{siteHash:a,unpublishHashes:c,publishIds:d}=e,{headers:u,footers:p}=r,g=ah.length?ah.filter(b=>d.includes(b)):d;return{siteInfo:r,validPagesIds:g,siteHash:a,unpublishHashes:c,siteLangs:o,defaultLang:s,headers:u,footers:p,socials:i}}fh.default.config();var L1=process.env.API_URL,$1=process.env.GRIDDO_REACT_APP_INSTANCE||process.env.REACT_APP_INSTANCE,lh=parseInt(process.env.GRIDDO_API_CONCURRENCY_COUNT||"10"),B1=process.env.PUBLIC_API_URL,U1=process.env.GRIDDO_RENDERID||new Date().valueOf().toString();async function hh(t,e){console.info(`API calls with ${lh} threads`);try{let r=[],n={},{sitesToPublish:i,sitesToUnpublish:o}=await Zn(e);await Go.getAll(),i.length||o.length||(console.warn("There are no sites to update"),process.exit(0)),console.info(`Sites to publish: ${To(i)}`),console.info(`Sites to unpublish: ${To(o)}`),await ch(o);for(let s of i){let{id:a,slug:c,theme:d,favicon:u,changedPages:p=[],pages:g=[]}=s,{siteInfo:m,validPagesIds:b,siteHash:C,unpublishHashes:P,siteLangs:F,defaultLang:N,headers:G,footers:B,socials:J}=await uh(a),{cloudinaryName:ae,useMetaTitle:be,useMetaKeywords:K,showBasicMetaRobots:w,avoidHrefLangsOnCanonicals:x,avoidSelfReferenceCanonicals:E,avoidHrefLangXDefault:X,avoidDebugMetas:R}=Go.settings;n[a]={siteHash:C,unpublishHashes:P,publishHashes:[]};let L=new Mn;L.navigations={headers:G,footers:B},s.languages=F;let I=Cf(a,C),$=m.siteScript,k={siteUrl:m.slug,title:m.name,favicon:u},A={baseUrl:L1,publicBaseUrl:B1,instance:$1,siteSlug:c,theme:d,siteMetadata:k,socials:J,siteLangs:F,cloudinaryName:ae,griddoVersion:An,siteOptions:{useMetaTitle:be,useMetaKeywords:K,showBasicMetaRobots:w,avoidHrefLangsOnCanonicals:x,avoidSelfReferenceCanonicals:E,avoidHrefLangXDefault:X,avoidDebugMetas:R},siteScript:$};He(`${s.name} site`);let T=async h=>{let f=[],v=await ve.getPage(h,I);if(!v)return;r.push(h);let S=JSON.parse(JSON.stringify(A));S.navigations=L.getPageNavigations(v);let _=await Tn.getDistributorData({page:v,cacheKey:U1}),j=await Td(_),U=v?.mode==="list",W=!U&&j,_e=!W&&!U;if(U){let ue={page:v,pages:Md(_),isRoot:!1,defaultLang:N,template:_,totalQueriedItems:_.queriedItems};f=await Fd(ue,S)}if(W){let ue=v;ue.template=_,ue.multiPageElements=j,ue.defaultLang=N,f=await kd(ue,S)}if(_e){let ue=v;ue.template=_,ue.defaultLang=N,f=[await Rd(ue,S)]}v.hash!==null&&n[a].publishHashes.push(v.hash),Cd(t,f)},{pagesInStore:Me,pagesMissingInStore:Ge,pagesToDeleteFromStore:Z,pagesToWriteToStore:ce}=await Pd(t,{sitesToPublish:i,pages:g,validPagesIds:b,changedPages:p});kn(t,Z);let xt=`Store: ${Me.length} -> ${Me}
63
+ `))}var Uy=process.env.API_URL,Xy={GET_ALL:`${Uy}/domains`},kn=class{static async getAll(){let{GET_ALL:e}=Xy;return await Fe({endpoint:e})}};async function Bo(){await kt.login();let t=await kn.getAll();return Gy(t)}function Gy(t){let e=t.filter(({slug:r})=>!!r).map(({slug:r})=>r.replace("/",""));return[...new Set(e)]}var Fs=T(require("node:path"));var st=T(require("node:fs")),Dd=T(require("node:fs/promises")),Ie=T(require("node:path")),Uo=T($t());async function*Xo(t){let e=Ie.default.resolve(t),r=wd(e).filter(n=>Ie.default.extname(n)===".json");for(let n of r)try{let i=await Dd.default.stat(n),o=await Uo.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 Od(t){st.default.existsSync(t)||(st.default.mkdirSync(t),st.default.mkdirSync(Ie.default.resolve(t,"metadata"))),console.info("Store initialized")}function Ad(t,e){st.default.writeFileSync(Ie.default.resolve(t,"metadata","render-info.json"),JSON.stringify(e))}function Hy(t,e){return Go(t).filter(i=>e.includes(i))}function Go(t){return st.default.readdirSync(t).filter(r=>{let n=`${t}/${r}`,i=st.default.statSync(n);if(i&&i.isDirectory()||Ie.default.extname(r)!==".json")return!1;let o=Ie.default.basename(r,Ie.default.extname(r));return!isNaN(parseInt(o))}).map(r=>{let n=Ie.default.basename(r,Ie.default.extname(r));return parseInt(n)})}function Id(t,e){e.forEach(r=>{qo(r,["editorID","parentEditorID"]);let n=`${r.context.page.id}.json`,i=Ie.default.resolve(t,n);Uo.default.writeJSONSync(i,r)})}function Tn(t,e){e.length!==0&&e.forEach(r=>{let n=Ie.default.resolve(t,`${r}.json`);try{st.default.unlinkSync(n)}catch(i){console.log(`Error removing file ${r}`,i.message)}})}async function Rd(t,e){let{changedPages:r,pages:n,validPagesIds:i,sitesToPublish:o}=e,s=Hy(t,n),a=i.filter(m=>!s.includes(m)),c=a.concat(r),d=s.filter(m=>!i.includes(m)),u=Array.from(new Set(c)).filter(m=>!d.includes(m)),p=Xo(Ie.default.resolve(__dirname,"../store")),g=[];for await(let m of p){let b=m.context.page.site,C=m.context.page.id;o.map(P=>P.id).includes(b)||g.push(C)}return{pagesInStore:s,pagesMissingInStore:a,pagesToDeleteFromStore:[...d,...g],pagesToWriteToStore:u}}var gh=T(ze()),yh=T(ai());var Fd=T(ze());Fd.default.config();var Ho=process.env.API_URL,at=`${Ho}/site/`,Ke={GET_ALL:`${Ho}/sites/all`,GET_PAGE:[`${Ho}/page/`,""],INFO:[`${at}`,"/all"],LANGUAGES:[`${at}`,"/languages"],BUILD_START:[`${at}`,"/build/start"],BUILD_END:[`${at}`,"/build/end"],GET_DISTRIBUTOR_DATA:[`${at}`,"/distributor"],GET_SITEMAP:[`${at}`,"/sitemap"],SOCIALS:[`${at}`,"/socials"],GET_PAGES:[`${at}`,"/pages?pagination=false"]},ve=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 vt({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,d=o||e.language;return await vt({endpoint:`${s}${c}${a}`,body:r,headers:{lang:d},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 Mn=class{static getBody(e,r){let{order:n,sources:i,quantity:o,mode:s,fixed:a,fullRelations:c=!1,allLanguages:d=!1,preferenceLanguage:u=!1,referenceId:p}=e;return s==="auto"?{mode:s,order:n,sources:i,quantity:o,fullRelations:c,allLanguages:d,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 ot(`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 ot(`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 ve.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 d in a){if(d==="queriedItems")continue;let p=a[d];!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 qn=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,d=b=>{let C=b.find(P=>typeof P=="number");return typeof C=="number"?C:null},u=d([r,c?.[o]?.defaultHeader,s]),p=d([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 vt({endpoint:e})}},Wo=new Jo;var Md=T(ze());function zo(t,e,r,n="jpg"){let i=typeof t=="string"?t:t?.url;return i?i.split("/")[2].includes("cloudinary.com")?Wy(i,`c_fill,w_${e},h_${r}`):Jy(i,`f/${n}/w/${e}/h/${r}`):null}function Jy(t,e){let r=t.split("/"),n=r.slice(0,-1).join("/"),i=r.slice(-1)[0];return`${n}/${e}/${i}`}function Wy(t,e){let r=t.replace("https://",""),n=r.split("/").slice(0,4).join("/"),i=r.replace(n,"");return`https://${n}/${e}${i}`}Md.default.config();var zy=JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false"),Vy=25;function Yy({socialTitle:t,socialDescription:e,socialImage:r}){return{type:"website",title:t,description:e,image:r?zo(r,1280,768):"",twitterImage:r?zo(r,1280,768):""}}function Ky(t){let{title:e,metaTitle:r,metaDescription:n,canonicalURL:i,locale:o,url:s,isIndexed:a,follow:c,metasAdvanced:d,pageLanguages:u,fullUrl:p,metaKeywords:g}=t,m=d?.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 Yo(t,e){let{id:r,title:n,fullPath:i,language:o,breadcrumb:s,socialDescription:a,socialImage:c,socialTitle:d}=t,{baseUrl:u,cloudinaryName:p,griddoVersion:g,siteLangs:m,siteMetadata:b,siteOptions:C,siteScript:P,siteSlug:F,socials:N,theme:G,navigations:{header:B,footer:z}}=e;t.breadcrumb=s,t.siteSlug=F,t.apiUrl=u,t.publicApiUrl=e.publicBaseUrl,t.instance=e.instance;let be=m.find(({id:R})=>R===t?.language)?.locale.replace(/_/g,"-"),K=Ky(t),w=Yy({socialDescription:a,socialImage:c,socialTitle:d}),x=zy?i.compose:`${i.domain}${i.compose}`,E=new Date().toString();return{path:x,size:void 0,context:{id:r,title:n,fullPath:i,locale:be,languageId:o,theme:G,siteMetadata:b,pageMetadata:K,openGraph:w,socials:N,siteLangs:m,cloudinaryName:p,siteOptions:C,griddoVersion:g,renderDate:E,siteScript:P,header:B,footer:z,page:t}}}async function qd(t,e){return await Yo(t,e)}async function Nd({page:t,pages:e,isRoot:r=!1,defaultLang:n,template:i,totalQueriedItems:o},s){let a=e.map(async(c,d)=>{let u=d===0,p=d+1,{domainUrl:g,compose:m}=t.fullPath,b={...t,fullPath:{...t.fullPath,compose:Vo(m,p,{addEndingSlash:!0})},fullUrl:Vo(t.fullUrl,p,{addEndingSlash:!0}),slug:Vo(t.slug,p),title:Td(t.title,p),metaTitle:Td(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 Yo(b,s)});return Promise.all(a)}function jd(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,a)=>{let c=JSON.parse(JSON.stringify(n)),{sectionSlug:d="/",title:u="",metaTitle:p="",metaDescription:g=""}=s,m=typeof u=="string"?u:u.content,b=c.fullPath.compose||"",C=c.fullUrl.endsWith("/")?c.fullUrl.slice(0,-1):c.fullUrl,P=d?.replace(/\//g,""),N=d==="/"?P:P+"/",G=b.endsWith("/")?"":"/",B=`${b}${G}${N}`;return m.trim()&&(c.title=m),g.trim()&&(c.metaDescription=g),c.id=parseInt("-"+c.id+a),c.fullUrl=`${C}/${N}`,c.fullPath.compose=B,c.slug=B,c.template.activeSectionSlug=d,c.template.activeSectionBase=C,c.metaTitle=p.trim()||m.trim()||c.metaTitle,await Yo(c,e)});return Promise.all(o)}function Ld(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",d=JSON.stringify(a).includes('"hasGriddoMultiPage":true');if(!c||!d)continue;let{component:u,hasGriddoMultiPage:p,elements:g}=a;u&&p&&r(g||[]),n(a,o+1)}o||r(null)}};n([t])})}function Qy(t,e,r){return e?.slice(t*(r-1),t*r)}function Zy(t,e){let r=Math.ceil(e.length/t)||1;return Array.from({length:r},(i,o)=>o+1)?.map(i=>Qy(t,e,i))}function $d(t){let e=t.queriedItems||[],r=t?.itemsPerPage||Vy;return Zy(r,e)}function kd(t){return t.replace(/\/+$/,"/")}function Vo(t,e,r){let n=t.endsWith("/")?"":"/",i=r?.addEndingSlash?"/":"";return e<=1?kd(`${t}${i}`):kd(`${t}${n}${e}${i}`)}function Td(t,e){return!t||e<=1?t:`${t} - ${e}`}var H1=T($t()),J1=T(fh());var W1=process.env.API_URL,z1=!!process.env.GRIDDO_RENDER_ALL_SITES||!!process.env.updateAllSites,Vt=process.env.GRIDDO_RENDER_SITE&&parseInt(process.env.GRIDDO_RENDER_SITE)||process.env.testSite&&parseInt(process.env.testSite),dh=(process.env.GRIDDO_RENDER_PAGES||process.env.testPage||"").split(",").map(t=>parseInt(t)).filter(Boolean),b_=JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false");async function ei(t){console.info(`API URL ${W1}`),await kt.login();let e=await ve.getAll(),r=z1?e.filter(o=>!Vt||o.id===Vt):e.filter(o=>Vt?o.id===Vt:!!o.shouldBeUpdated);if(r.length)for(let o of r){let{items:s}=await ve.getLanguages(o.id);o.domains=s.filter(a=>a.domain&&(a.domain.slug===t||a.domain.slug===`/${t}`)).map(a=>({[a.id]:`${a.domain.slug}${a.path}`}))}let n=r.filter(o=>Vt?o.id===Vt:!!o.isPublished&&o.domains.length>0),i=r.filter(o=>!o.isPublished&&o.shouldBeUpdated);return{sitesToPublish:n,sitesToUnpublish:i}}async function hh(t){for(let e of t){let r=await ve.startSiteRender(e.id),{siteHash:n}=r,i={siteHash:n,publishHashes:[],unpublishHashes:[]};await ve.endSiteRender(e.id,i)}}async function ph(t){let e=await ve.startSiteRender(t),r=await ve.getInfo(t),n=await ve.getLanguages(t),i=await ve.getSocials(t),o=n.items,s=o.find(b=>b.isDefault),{siteHash:a,unpublishHashes:c,publishIds:d}=e,{headers:u,footers:p}=r,g=dh.length?dh.filter(b=>d.includes(b)):d;return{siteInfo:r,validPagesIds:g,siteHash:a,unpublishHashes:c,siteLangs:o,defaultLang:s,headers:u,footers:p,socials:i}}gh.default.config();var V1=process.env.API_URL,Y1=process.env.GRIDDO_REACT_APP_INSTANCE||process.env.REACT_APP_INSTANCE,mh=parseInt(process.env.GRIDDO_API_CONCURRENCY_COUNT||"10"),K1=process.env.PUBLIC_API_URL,Q1=process.env.GRIDDO_RENDERID||new Date().valueOf().toString();async function vh(t,e){console.info(`API calls with ${mh} threads`);try{let r=[],n={},{sitesToPublish:i,sitesToUnpublish:o}=await ei(e);await Wo.getAll(),i.length||o.length||(console.warn("There are no sites to update"),process.exit(0)),console.info(`Sites to publish: ${No(i)}`),console.info(`Sites to unpublish: ${No(o)}`),await hh(o);for(let s of i){let{id:a,slug:c,theme:d,favicon:u,changedPages:p=[],pages:g=[]}=s,{siteInfo:m,validPagesIds:b,siteHash:C,unpublishHashes:P,siteLangs:F,defaultLang:N,headers:G,footers:B,socials:z}=await ph(a),{cloudinaryName:ae,useMetaTitle:be,useMetaKeywords:K,showBasicMetaRobots:w,avoidHrefLangsOnCanonicals:x,avoidSelfReferenceCanonicals:E,avoidHrefLangXDefault:X,avoidDebugMetas:R}=Wo.settings;n[a]={siteHash:C,unpublishHashes:P,publishHashes:[]};let L=new qn;L.navigations={headers:G,footers:B},s.languages=F;let I=If(a,C),$=m.siteScript,k={siteUrl:m.slug,title:m.name,favicon:u},A={baseUrl:V1,publicBaseUrl:K1,instance:Y1,siteSlug:c,theme:d,siteMetadata:k,socials:z,siteLangs:F,cloudinaryName:ae,griddoVersion:In,siteOptions:{useMetaTitle:be,useMetaKeywords:K,showBasicMetaRobots:w,avoidHrefLangsOnCanonicals:x,avoidSelfReferenceCanonicals:E,avoidHrefLangXDefault:X,avoidDebugMetas:R},siteScript:$};He(`${s.name} site`);let M=async h=>{let f=[],v=await ve.getPage(h,I);if(!v)return;r.push(h);let S=JSON.parse(JSON.stringify(A));S.navigations=L.getPageNavigations(v);let _=await Mn.getDistributorData({page:v,cacheKey:Q1}),j=await Ld(_),U=v?.mode==="list",J=!U&&j,_e=!J&&!U;if(U){let ue={page:v,pages:$d(_),isRoot:!1,defaultLang:N,template:_,totalQueriedItems:_.queriedItems};f=await Nd(ue,S)}if(J){let ue=v;ue.template=_,ue.multiPageElements=j,ue.defaultLang=N,f=await jd(ue,S)}if(_e){let ue=v;ue.template=_,ue.defaultLang=N,f=[await qd(ue,S)]}v.hash!==null&&n[a].publishHashes.push(v.hash),Id(t,f)},{pagesInStore:Me,pagesMissingInStore:Ge,pagesToDeleteFromStore:Z,pagesToWriteToStore:ce}=await Rd(t,{sitesToPublish:i,pages:g,validPagesIds:b,changedPages:p});Tn(t,Z);let xt=`Store: ${Me.length} -> ${Me}
64
64
  ValidPages: ${b.length} -> ${b}
65
65
  Changed: ${p.length} -> ${p}
66
66
  Deleted/Unpublished: ${Z.length} -> ${Z}
67
67
  Missing in store: ${Ge.length} -> ${Ge}
68
- Finally to store: ${ce.length} -> ${ce}`;JSON.parse(process.env.GRIDDO_DEBUG_LOGS||"false")&&ot(xt,`Site store: ${s.name}`,1,0);let we=(0,dh.default)(lh),l=ce.map(h=>we(()=>T(h)));await Promise.all(l)}Ed(t,{buildProcessData:n,createdPages:r,sitesToPublish:i})}catch(r){console.error(r.message),process.exit(1)}}var ph=As.default.resolve(__dirname,"../store/"),X1=As.default.resolve(__dirname,"../apiCache");async function Is(t){_f(),Sd(ph),await hh(ph,t),yd(X1)}var Xe=q(require("node:fs")),ze=q(require("node:path")),De=q(or()),bh=q(Je());var Te=q(require("node:path")),Ue=q($t());var Yt=q(require("node:path")),ei=q(kr()),G1=ei.default.sync(Yt.default.resolve(__dirname,"../..")),mh=ei.default.sync(__dirname),H1=ei.default.sync(__dirname),W1=Yt.default.resolve(mh,"caches"),z1=Yt.default.resolve(G1,"exports/sites"),gh={proDomain:"pro-",CXDir:{EXPORTS:"__exports",CACHE:"__cache",CX:"__cx",SSG:"__ssg"},dirs:t=>({__exports:Yt.default.join(z1,t),__cache:Yt.default.join(W1,t),__cx:mh,__ssg:H1})},yh=gh,D_=gh.CXDir;var F_=Te.default.resolve(__dirname,"../store/"),k_=Te.default.resolve(__dirname,"../dist/"),T_=Te.default.resolve(__dirname,"../"),M_=Te.default.resolve(Rn,"exports/sites");async function Rs(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=Te.default.resolve(__dirname,`../public${o}`),a=Te.default.resolve(__dirname,`../public/page-data${o}`);if(He(`Site dir ${s}`),He(`Page data dir ${a}`),!!Ue.default.existsSync(s)){try{await Ue.default.rm(s,{recursive:!0}),He(`${s} was deleted!`)}catch(c){console.log(c)}if(Ue.default.existsSync(a))try{await Ue.default.rm(a,{recursive:!0}),console.info(`${a} was deleted!`)}catch(c){console.log(c)}}}}var Fs=t=>{let e=t||Te.default.resolve(In,"dist");if(!Ue.default.statSync(e).isDirectory())return;let n=Ue.default.readdirSync(e);if(n.length>0){let o=n.length,s=n.filter(a=>Te.default.extname(a).toLowerCase()===".xml").length;o===s&&(n.forEach(function(a){let c=Te.default.join(e,a);Ue.default.rmSync(c)}),n=Ue.default.readdirSync(e)),n.forEach(function(a){let c=Te.default.join(e,a);Fs(c)}),n=Ue.default.readdirSync(e)}if(n.length===0){Ue.default.rmdirSync(e);return}};function J1(t){return Number.isInteger(t)&&t<0}function vh(){let t=yh.dirs(""),e=Te.default.join(t.__cx,"store");try{let r=Bo(e).filter(J1);kn(e,r)}catch{console.info("`store` folder does not exist. Skipping multipage clean up.")}}bh.default.config();var Kt={prepare:JSON.parse(process.env.GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS||"1"),restore:JSON.parse(process.env.GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS||"1"),data:JSON.parse(process.env.GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS||"1"),ssg:JSON.parse(process.env.GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS||"1"),relocation:JSON.parse(process.env.GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS||"1"),meta:JSON.parse(process.env.GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS||"1"),archive:JSON.parse(process.env.GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS||"1"),clean:JSON.parse(process.env.GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS||"1")};function wh(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=ze.default.resolve(Rn,"exports/sites"),s=ze.default.resolve(__dirname,"../caches"),a=V1(t),c=li({DOMAIN:t,GRIDDO_ASSET_PREFIX:a,NEEDS_ASSET_DOMAIN_PREFIX:a&&a!=="",GRIDDO_RENDERID:new Date().valueOf()}),d=()=>{console.info(`Initializing exporter for the domain ${t}`),g(),m()},u=()=>{for(let w of e){let{currentExportArchivePath:x,currentExportWorkingPath:E}=p(w);Xe.default.existsSync(x)&&(console.log(`\uFE0FRestoring ${De.default.gray(x)}`),c(`cp -R ${x} ${E}`))}be()},p=(w="")=>{if(w==="/")throw new Error(`Artifact path cannot be root: ${w}`);let x=ze.default.resolve(o,t),E=ze.default.resolve(x,w),X=ze.default.resolve(E,t),R=ze.default.resolve(s,t),L=ze.default.resolve(R,w),I=ze.default.resolve(L,t),$=`${E}-BACKUP`,k=ze.default.resolve(In,w);return{domainExportArchiveBasePath:x,currentExportArchivePath:E,currentExportBackupPath:$,currentExportWorkingPath:k,currentExportArchivePathInDomain:X,domainCacheArchiveBasePath:R,currentExportArchiveCachePath:L,currentExportArchiveCachePathInDomain:I}},g=()=>{for(let w of[...e,...r,...n]){let{currentExportWorkingPath:x}=p(w);Xe.default.existsSync(x)&&(console.log(`Cleanup dirty ${De.default.gray(x)}`),c(`rm -rf ${x}`))}},m=()=>{let{domainExportArchiveBasePath:w,domainCacheArchiveBasePath:x}=p();for(let E of[w,x])Xe.default.existsSync(E)||(console.info(`Creating ${E}`),c(`mkdir -p ${E}`))},b=w=>{let{currentExportArchivePath:x,currentExportWorkingPath:E}=p(w);console.info(`Moving files from ${De.default.gray(E)} to ${De.default.gray(x)}`),c(`mv ${E} ${x}`)},C=()=>{for(let w of e){let{currentExportWorkingPath:x,currentExportArchivePath:E}=p(w);if(!Xe.default.existsSync(x)){console.log("Source directory has not been created:",x);continue}try{P(w),b(w),N(w)}catch(X){console.log(`Error moving files to ${E}`,X.message),F(w);continue}}},P=w=>{let{currentExportArchivePath:x,currentExportBackupPath:E}=p(w);Xe.default.existsSync(x)&&(console.info(`Creating backup of ${De.default.gray(x)}`),c(`mv ${x} ${E}`))},F=w=>{let{currentExportArchivePath:x,currentExportBackupPath:E}=p(w);Xe.default.existsSync(E)&&(console.log(`\uFE0FRestoring backup ${De.default.gray(x)}`),c(`mv ${E} ${x}`))},N=w=>{let{currentExportArchivePath:x,currentExportBackupPath:E}=p(w);console.log(`\uFE0FRemoving backup ${De.default.gray(x)}`),c(`rm -rf ${E}`)},G=()=>{for(let w of n){let{currentExportArchiveCachePath:x,currentExportWorkingPath:E}=p(w);if(Xe.default.existsSync(E))console.info(`Moving files from ${De.default.gray(E)} to ${De.default.gray(x)}`),c(`mv ${E} ${x}`);else throw new Error(`Error moving files from ${E}: Path does not exist.`)}},B=async()=>{let{sitesToPublish:w,sitesToUnpublish:x}=await Zn(t);await Rs(x,t),await Rs(w,t)},J=()=>{for(let w of n){let{currentExportArchiveCachePath:x,currentExportWorkingPath:E}=p(w);Xe.default.existsSync(x)&&(console.log(`\uFE0FRestoring ${De.default.gray(x)}`),c(`mv ${x} ${E}`))}},ae=()=>{c("yarn gatsby-build")},be=()=>{let{currentExportWorkingPath:w}=p("dist"),{currentExportWorkingPath:x}=p("public");Xe.default.existsSync(w)&&(console.log(`Moving ${De.default.gray(w)} to ${De.default.gray(x)}`),c(`mv ${w} ${x}`))};return{init:d,getArtifactPaths:p,archiveExportArtifact:b,archiveArtifacts:C,restoreArtifacts:u,createArtifactBackup:P,restoreArtifactBackup:F,deleteArtifactBackup:N,archiveCacheArtifacts:G,restoreCacheArtifacts:J,cleanUpSites:B,runGatsbyBuild:ae,removeDisposableArtifacts:()=>{for(let w of r){let{currentExportWorkingPath:x}=p(w);Xe.default.existsSync(x)&&(console.log(`\uFE0FRemoving ${De.default.gray(x)}`),c(`rm -rf ${x}`))}}}}function V1(t){let e=process.env.GRIDDO_ASSET_PREFIX||process.env.ASSET_PREFIX;return!e||!t||!t.startsWith("pro-")?"":`${e}/${t}`}var _h=q(require("node:fs")),ti=q(require("node:path"));var Y1=process.env.API_URL;async function K1(t){let{title:e,description:r,image:n,pageId:i,languageId:o,siteId:s,url:a,content:c,template:d}=t;return await vt({endpoint:`${Y1}/search`,body:{title:e,description:r,image:n,pageId:i,languageId:o,siteId:s,url:a,template:d,content:Q1(c)}})}function Q1(t){let e=Z1(["meta","link","style","script","noscript","nav","header","footer"],t),r=eb(e);return tb(r)}function Z1(t,e){let r=e;return t.forEach(n=>{r=r.replace(new RegExp(`<${n}.*?>.*?</${n}>`,"gis")," ").replace(new RegExp(`(<${n}([^>]+)>)`,"gis")," ")}),r}function eb(t){return t.replace(/(<([^>]+)>)/gis," ")}function tb(t){return t.replace(/\s+/g," ")}async function xh(){let t=ti.default.resolve(__dirname,"../store"),e=JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false");for await(let r of $o(t)){let{context:{page:n,openGraph:i}}=r,{compose:o,domain:s}=n.fullPath,a=e?ti.default.resolve(__dirname,`../dist/${o}/index.html`):ti.default.resolve(__dirname,`../dist${s}${o}/index.html`),c=_h.default.readFileSync(a).toString(),d={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 K1(d)}}async function ks(){Mo("gatsby");let t=await jo();for(let e of t){let r=wh(e);await Wt({name:"Restore",attempts:Kt.restore,steps:[r.init,()=>$e("init done!"),r.restoreArtifacts,()=>$e("Restore `dist` and `assets` dirs done!"),r.restoreCacheArtifacts,()=>$e("Restore `apiCache`, `store` and `.cache` restored!")]}),await Wt({name:"Data",attempts:Kt.data,steps:[()=>Is(e),()=>$e("Download data from API to `store` done!")]}),await Wt({name:"SSG",attempts:Kt.ssg,steps:[r.runGatsbyBuild,()=>$e("Gatsby build done!")]});let n=JSON.parse(process.env.GRIDDO_SEARCH_FEATURE||"false");await Wt({name:"Meta",attempts:Kt.meta,steps:[()=>n?xh():void 0]}),await Wt({name:"Archive",attempts:Kt.archive,steps:[vh,()=>$e("MultiPages removed from `store`"),()=>Fs(),()=>$e("Clean empty dirs done!"),r.removeDisposableArtifacts,()=>$e("Clean `public` done!"),r.archiveArtifacts,()=>$e("Archive `dist` and `assets` done!"),r.archiveCacheArtifacts,()=>$e("Archive `apiCache`, `.cache` and `store` done!")]})}}async function rb(){let t=await qo(()=>ks()).catch(e=>{console.log(e),console.log("[[[ Render will be reset ]]]"),process.exit(1)});ot(`All domains rendered in ${t}s.`,"",1,0),process.exit(0)}rb().catch(t=>{console.error("Error in main():",t?.stdout?.toString()||t),process.exit(1)});
68
+ Finally to store: ${ce.length} -> ${ce}`;JSON.parse(process.env.GRIDDO_DEBUG_LOGS||"false")&&ot(xt,`Site store: ${s.name}`,1,0);let we=(0,yh.default)(mh),l=ce.map(h=>we(()=>M(h)));await Promise.all(l)}Ad(t,{buildProcessData:n,createdPages:r,sitesToPublish:i})}catch(r){console.error(r.message),process.exit(1)}}var bh=Fs.default.resolve(__dirname,"../store/"),Z1=Fs.default.resolve(__dirname,"../apiCache");async function ks(t){Pf(),Od(bh),await vh(bh,t),xd(Z1)}var Xe=T(require("node:fs")),We=T(require("node:path")),De=T(ar()),Oh=T(ze());var Te=T(require("node:path")),Ue=T($t());async function Ph(){try{return(await Promise.resolve().then(()=>(Ch(),Eh))).default}catch{process.exit(1)}}var Y_=Te.default.resolve(__dirname,"../store/"),K_=Te.default.resolve(__dirname,"../dist/"),Q_=Te.default.resolve(__dirname,"../"),Z_=Te.default.resolve(Fn,"exports/sites");async function Ns(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=Te.default.resolve(__dirname,`../public${o}`),a=Te.default.resolve(__dirname,`../public/page-data${o}`);if(He(`Site dir ${s}`),He(`Page data dir ${a}`),!!Ue.default.existsSync(s)){try{await Ue.default.rm(s,{recursive:!0}),He(`${s} was deleted!`)}catch(c){console.log(c)}if(Ue.default.existsSync(a))try{await Ue.default.rm(a,{recursive:!0}),console.info(`${a} was deleted!`)}catch(c){console.log(c)}}}}var js=t=>{let e=t||Te.default.resolve(Rn,"dist");if(!Ue.default.statSync(e).isDirectory())return;let n=Ue.default.readdirSync(e);if(n.length>0){let o=n.length,s=n.filter(a=>Te.default.extname(a).toLowerCase()===".xml").length;o===s&&(n.forEach(function(a){let c=Te.default.join(e,a);Ue.default.rmSync(c)}),n=Ue.default.readdirSync(e)),n.forEach(function(a){let c=Te.default.join(e,a);js(c)}),n=Ue.default.readdirSync(e)}if(n.length===0){Ue.default.rmdirSync(e);return}};function lb(t){return Number.isInteger(t)&&t<0}async function Dh(){let e=(await Ph()).dirs(),r=Te.default.join(e.__cx,"store");try{let n=Go(r).filter(lb);Tn(r,n)}catch{console.info("`store` folder does not exist. Skipping multipage clean up.")}}Oh.default.config();var Qt={prepare:JSON.parse(process.env.GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS||"1"),restore:JSON.parse(process.env.GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS||"1"),data:JSON.parse(process.env.GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS||"1"),ssg:JSON.parse(process.env.GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS||"1"),relocation:JSON.parse(process.env.GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS||"1"),meta:JSON.parse(process.env.GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS||"1"),archive:JSON.parse(process.env.GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS||"1"),clean:JSON.parse(process.env.GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS||"1")};function Ah(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(Fn,"exports/sites"),s=We.default.resolve(__dirname,"../caches"),a=fb(t),c=hi({DOMAIN:t,GRIDDO_ASSET_PREFIX:a,NEEDS_ASSET_DOMAIN_PREFIX:a&&a!=="",GRIDDO_RENDERID:new Date().valueOf()}),d=()=>{console.info(`Initializing exporter for the domain ${t}`),g(),m()},u=()=>{for(let w of e){let{currentExportArchivePath:x,currentExportWorkingPath:E}=p(w);Xe.default.existsSync(x)&&(console.log(`\uFE0FRestoring ${De.default.gray(x)}`),c(`cp -R ${x} ${E}`))}be()},p=(w="")=>{if(w==="/")throw new Error(`Artifact path cannot be root: ${w}`);let x=We.default.resolve(o,t),E=We.default.resolve(x,w),X=We.default.resolve(E,t),R=We.default.resolve(s,t),L=We.default.resolve(R,w),I=We.default.resolve(L,t),$=`${E}-BACKUP`,k=We.default.resolve(Rn,w);return{domainExportArchiveBasePath:x,currentExportArchivePath:E,currentExportBackupPath:$,currentExportWorkingPath:k,currentExportArchivePathInDomain:X,domainCacheArchiveBasePath:R,currentExportArchiveCachePath:L,currentExportArchiveCachePathInDomain:I}},g=()=>{for(let w of[...e,...r,...n]){let{currentExportWorkingPath:x}=p(w);Xe.default.existsSync(x)&&(console.log(`Cleanup dirty ${De.default.gray(x)}`),c(`rm -rf ${x}`))}},m=()=>{let{domainExportArchiveBasePath:w,domainCacheArchiveBasePath:x}=p();for(let E of[w,x])Xe.default.existsSync(E)||(console.info(`Creating ${E}`),c(`mkdir -p ${E}`))},b=w=>{let{currentExportArchivePath:x,currentExportWorkingPath:E}=p(w);console.info(`Moving files from ${De.default.gray(E)} to ${De.default.gray(x)}`),c(`mv ${E} ${x}`)},C=()=>{for(let w of e){let{currentExportWorkingPath:x,currentExportArchivePath:E}=p(w);if(!Xe.default.existsSync(x)){console.log("Source directory has not been created:",x);continue}try{P(w),b(w),N(w)}catch(X){console.log(`Error moving files to ${E}`,X.message),F(w);continue}}},P=w=>{let{currentExportArchivePath:x,currentExportBackupPath:E}=p(w);Xe.default.existsSync(x)&&(console.info(`Creating backup of ${De.default.gray(x)}`),c(`mv ${x} ${E}`))},F=w=>{let{currentExportArchivePath:x,currentExportBackupPath:E}=p(w);Xe.default.existsSync(E)&&(console.log(`\uFE0FRestoring backup ${De.default.gray(x)}`),c(`mv ${E} ${x}`))},N=w=>{let{currentExportArchivePath:x,currentExportBackupPath:E}=p(w);console.log(`\uFE0FRemoving backup ${De.default.gray(x)}`),c(`rm -rf ${E}`)},G=()=>{for(let w of n){let{currentExportArchiveCachePath:x,currentExportWorkingPath:E}=p(w);if(Xe.default.existsSync(E))console.info(`Moving files from ${De.default.gray(E)} to ${De.default.gray(x)}`),c(`mv ${E} ${x}`);else throw new Error(`Error moving files from ${E}: Path does not exist.`)}},B=async()=>{let{sitesToPublish:w,sitesToUnpublish:x}=await ei(t);await Ns(x,t),await Ns(w,t)},z=()=>{for(let w of n){let{currentExportArchiveCachePath:x,currentExportWorkingPath:E}=p(w);Xe.default.existsSync(x)&&(console.log(`\uFE0FRestoring ${De.default.gray(x)}`),c(`mv ${x} ${E}`))}},ae=()=>{c("yarn gatsby-build")},be=()=>{let{currentExportWorkingPath:w}=p("dist"),{currentExportWorkingPath:x}=p("public");Xe.default.existsSync(w)&&(console.log(`Moving ${De.default.gray(w)} to ${De.default.gray(x)}`),c(`mv ${w} ${x}`))};return{init:d,getArtifactPaths:p,archiveExportArtifact:b,archiveArtifacts:C,restoreArtifacts:u,createArtifactBackup:P,restoreArtifactBackup:F,deleteArtifactBackup:N,archiveCacheArtifacts:G,restoreCacheArtifacts:z,cleanUpSites:B,runGatsbyBuild:ae,removeDisposableArtifacts:()=>{for(let w of r){let{currentExportWorkingPath:x}=p(w);Xe.default.existsSync(x)&&(console.log(`\uFE0FRemoving ${De.default.gray(x)}`),c(`rm -rf ${x}`))}}}}function fb(t){let e=process.env.GRIDDO_ASSET_PREFIX||process.env.ASSET_PREFIX;return!e||!t||!t.startsWith("pro-")?"":`${e}/${t}`}var Ih=T(require("node:fs")),ri=T(require("node:path"));var db=process.env.API_URL;async function hb(t){let{title:e,description:r,image:n,pageId:i,languageId:o,siteId:s,url:a,content:c,template:d}=t;return await vt({endpoint:`${db}/search`,body:{title:e,description:r,image:n,pageId:i,languageId:o,siteId:s,url:a,template:d,content:pb(c)}})}function pb(t){let e=mb(["meta","link","style","script","noscript","nav","header","footer"],t),r=gb(e);return yb(r)}function mb(t,e){let r=e;return t.forEach(n=>{r=r.replace(new RegExp(`<${n}.*?>.*?</${n}>`,"gis")," ").replace(new RegExp(`(<${n}([^>]+)>)`,"gis")," ")}),r}function gb(t){return t.replace(/(<([^>]+)>)/gis," ")}function yb(t){return t.replace(/\s+/g," ")}async function Rh(){let t=ri.default.resolve(__dirname,"../store"),e=JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false");for await(let r of Xo(t)){let{context:{page:n,openGraph:i}}=r,{compose:o,domain:s}=n.fullPath,a=e?ri.default.resolve(__dirname,`../dist/${o}/index.html`):ri.default.resolve(__dirname,`../dist${s}${o}/index.html`),c=Ih.default.readFileSync(a).toString(),d={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 hb(d)}}async function Ls(){jo("gatsby");let t=await Bo();for(let e of t){let r=Ah(e);await Jt({name:"Restore",attempts:Qt.restore,steps:[r.init,()=>$e("init done!"),r.restoreArtifacts,()=>$e("Restore `dist` and `assets` dirs done!"),r.restoreCacheArtifacts,()=>$e("Restore `apiCache`, `store` and `.cache` restored!")]}),await Jt({name:"Data",attempts:Qt.data,steps:[()=>ks(e),()=>$e("Download data from API to `store` done!")]}),await Jt({name:"SSG",attempts:Qt.ssg,steps:[r.runGatsbyBuild,()=>$e("Gatsby build done!")]});let n=JSON.parse(process.env.GRIDDO_SEARCH_FEATURE||"false");await Jt({name:"Meta",attempts:Qt.meta,steps:[()=>n?Rh():void 0]}),await Jt({name:"Archive",attempts:Qt.archive,steps:[Dh,()=>$e("MultiPages removed from `store`"),()=>js(),()=>$e("Clean empty dirs done!"),r.removeDisposableArtifacts,()=>$e("Clean `public` done!"),r.archiveArtifacts,()=>$e("Archive `dist` and `assets` done!"),r.archiveCacheArtifacts,()=>$e("Archive `apiCache`, `.cache` and `store` done!")]})}}async function vb(){let t=await Lo(()=>Ls()).catch(e=>{console.log(e),console.log("[[[ Render will be reset ]]]"),process.exit(1)});ot(`All domains rendered in ${t}s.`,"",1,0),process.exit(0)}vb().catch(t=>{console.error("Error in main():",t?.stdout?.toString()||t),process.exit(1)});