@griddo/cx 10.4.19 → 10.4.20

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.
Files changed (68) hide show
  1. package/build/adapters/gatsby/index.d.ts +2 -0
  2. package/build/adapters/gatsby/utils.d.ts +26 -0
  3. package/build/adapters/index.d.ts +3 -0
  4. package/build/browser/index.d.ts +5 -0
  5. package/build/build-complete.d.ts +18 -0
  6. package/build/build-complete.js +22 -22
  7. package/build/index.d.ts +29 -0
  8. package/build/index.js +35 -35
  9. package/build/move-assets.d.ts +1 -0
  10. package/build/react/index.d.ts +2 -0
  11. package/build/reset-render.d.ts +1 -0
  12. package/build/reset-render.js +22 -22
  13. package/build/run-start-render.d.ts +1 -0
  14. package/build/run-start-render.js +35 -35
  15. package/build/services/auth.d.ts +21 -0
  16. package/build/services/distributors.d.ts +45 -0
  17. package/build/services/domains.d.ts +8 -0
  18. package/build/services/navigation.d.ts +77 -0
  19. package/build/services/robots.d.ts +21 -0
  20. package/build/services/settings.d.ts +23 -0
  21. package/build/services/sites.d.ts +42 -0
  22. package/build/services/store.d.ts +6 -0
  23. package/build/start-render.d.ts +3 -0
  24. package/build/start-render.js +35 -35
  25. package/build/types/api.d.ts +130 -0
  26. package/build/types/global.d.ts +78 -0
  27. package/build/types/navigation.d.ts +28 -0
  28. package/build/types/pages.d.ts +128 -0
  29. package/build/types/sites.d.ts +43 -0
  30. package/build/types/templates.d.ts +8 -0
  31. package/build/upload-search-content.d.ts +1 -0
  32. package/build/upload-search-content.js +21 -21
  33. package/build/utils/api.d.ts +23 -0
  34. package/build/utils/cache.d.ts +35 -0
  35. package/build/utils/create-build-data.d.ts +8 -0
  36. package/build/utils/domains.d.ts +5 -0
  37. package/build/utils/folders.d.ts +48 -0
  38. package/build/utils/health-checks.d.ts +7 -0
  39. package/build/utils/instance.d.ts +21 -0
  40. package/build/utils/messages.d.ts +2 -0
  41. package/build/utils/pages.d.ts +34 -0
  42. package/build/utils/searches.d.ts +14 -0
  43. package/build/utils/shared.d.ts +110 -0
  44. package/build/utils/sites.d.ts +36 -0
  45. package/build/utils/store.d.ts +79 -0
  46. package/build/utils/temp-utils.d.ts +10 -0
  47. package/cx.config.js +1 -1
  48. package/exporter/adapters/gatsby/index.ts +11 -5
  49. package/exporter/index.ts +6 -4
  50. package/exporter/services/robots.ts +4 -3
  51. package/exporter/services/store.ts +13 -4
  52. package/exporter/types/global.ts +1 -1
  53. package/exporter/utils/cache.ts +25 -11
  54. package/exporter/utils/create-build-data.ts +3 -10
  55. package/exporter/utils/folders.ts +14 -15
  56. package/exporter/utils/searches.ts +4 -4
  57. package/exporter/utils/shared.ts +12 -7
  58. package/exporter/utils/sites.ts +10 -10
  59. package/exporter/utils/store.ts +77 -27
  60. package/exporter/utils/temp-utils.ts +12 -11
  61. package/gatsby-config.ts +1 -1
  62. package/gatsby-node.ts +9 -10
  63. package/package.json +12 -6
  64. package/src/components/Head.tsx +1 -1
  65. package/src/components/template.tsx +1 -1
  66. package/src/gatsby-node-utils.ts +1 -1
  67. package/src/types.ts +1 -1
  68. package/tsconfig.json +13 -3
@@ -1,52 +1,52 @@
1
- "use strict";var Wh=Object.create;var Mr=Object.defineProperty;var Vh=Object.getOwnPropertyDescriptor;var Yh=Object.getOwnPropertyNames;var Kh=Object.getPrototypeOf,Qh=Object.prototype.hasOwnProperty;var Xo=(t,e)=>()=>(t&&(e=t(t=0)),e);var y=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Zh=(t,e)=>{for(var r in e)Mr(t,r,{get:e[r],enumerable:!0})},Go=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Yh(e))!Qh.call(t,i)&&i!==r&&Mr(t,i,{get:()=>e[i],enumerable:!(n=Vh(e,i))||n.enumerable});return t};var A=(t,e,r)=>(r=t!=null?Wh(Kh(t)):{},Go(e||!t||!t.__esModule?Mr(r,"default",{value:t,enumerable:!0}):r,t)),ep=t=>Go(Mr({},"__esModule",{value:!0}),t);var tt=y((Sb,ci)=>{var tp=require("fs"),rp=require("path");function Ho(t){console.log(`[dotenv][DEBUG] ${t}`)}var np=`
2
- `,ip=/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/,sp=/\\n/g,op=/\n|\r|\r\n/;function Jo(t,e){let r=!!(e&&e.debug),n={};return t.toString().split(op).forEach(function(i,s){let o=i.match(ip);if(o!=null){let a=o[1],c=o[2]||"",d=c.length-1,u=c[0]==='"'&&c[d]==='"';c[0]==="'"&&c[d]==="'"||u?(c=c.substring(1,d),u&&(c=c.replace(sp,np))):c=c.trim(),n[a]=c}else r&&Ho(`did not match key and value when parsing line ${s+1}: ${i}`)}),n}function ap(t){let e=rp.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=Jo(tp.readFileSync(e,{encoding:r}),{debug:n});return Object.keys(i).forEach(function(s){Object.prototype.hasOwnProperty.call(process.env,s)?n&&Ho(`"${s}" is already defined in \`process.env\` and will not be overwritten`):process.env[s]=i[s]}),{parsed:i}}catch(i){return{error:i}}}ci.exports.config=ap;ci.exports.parse=Jo});var Ee=y(ui=>{"use strict";ui.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,s)=>i!=null?n(i):r(s))})},"name",{value:t.name})};ui.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 Wo=y((Eb,zo)=>{var rt=require("constants"),cp=process.cwd,qr=null,up=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return qr||(qr=cp.call(process)),qr};try{process.cwd()}catch{}typeof process.chdir=="function"&&(li=process.chdir,process.chdir=function(t){qr=null,li.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,li));var li;zo.exports=lp;function lp(t){rt.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||r(t),t.chown=s(t.chown),t.fchown=s(t.fchown),t.lchown=s(t.lchown),t.chmod=n(t.chmod),t.fchmod=n(t.fchmod),t.lchmod=n(t.lchmod),t.chownSync=o(t.chownSync),t.fchownSync=o(t.fchownSync),t.lchownSync=o(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(){}),up==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(u){function p(g,m,b){var S=Date.now(),x=0;u(g,m,function F(j){if(j&&(j.code==="EACCES"||j.code==="EPERM")&&Date.now()-S<6e4){setTimeout(function(){t.stat(m,function(L,$){L&&L.code==="ENOENT"?u(g,m,F):b(j)})},x),x<100&&(x+=10);return}b&&b(j)})}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,S,x,F){var j;if(F&&typeof F=="function"){var L=0;j=function($,H,ne){if($&&$.code==="EAGAIN"&&L<10)return L++,u.call(t,g,m,b,S,x,j);F.apply(this,arguments)}}return u.call(t,g,m,b,S,x,j)}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,S){for(var x=0;;)try{return u.call(t,p,g,m,b,S)}catch(F){if(F.code==="EAGAIN"&&x<10){x++;continue}throw F}}}(t.readSync);function e(u){u.lchmod=function(p,g,m){u.open(p,rt.O_WRONLY|rt.O_SYMLINK,g,function(b,S){if(b){m&&m(b);return}u.fchmod(S,g,function(x){u.close(S,function(F){m&&m(x||F)})})})},u.lchmodSync=function(p,g){var m=u.openSync(p,rt.O_WRONLY|rt.O_SYMLINK,g),b=!0,S;try{S=u.fchmodSync(m,g),b=!1}finally{if(b)try{u.closeSync(m)}catch{}else u.closeSync(m)}return S}}function r(u){rt.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(p,g,m,b){u.open(p,rt.O_SYMLINK,function(S,x){if(S){b&&b(S);return}u.futimes(x,g,m,function(F){u.close(x,function(j){b&&b(F||j)})})})},u.lutimesSync=function(p,g,m){var b=u.openSync(p,rt.O_SYMLINK),S,x=!0;try{S=u.futimesSync(b,g,m),x=!1}finally{if(x)try{u.closeSync(b)}catch{}else u.closeSync(b)}return S}):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 s(u){return u&&function(p,g,m,b){return u.call(t,p,g,m,function(S){d(S)&&(S=null),b&&b.apply(this,arguments)})}}function o(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(S,x){x&&(x.uid<0&&(x.uid+=4294967296),x.gid<0&&(x.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 Ko=y((Cb,Yo)=>{var Vo=require("stream").Stream;Yo.exports=fp;function fp(t){return{ReadStream:e,WriteStream:r};function e(n,i){if(!(this instanceof e))return new e(n,i);Vo.call(this);var s=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 o=Object.keys(i),a=0,c=o.length;a<c;a++){var d=o[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(){s._read()});return}t.open(this.path,this.flags,this.mode,function(u,p){if(u){s.emit("error",u),s.readable=!1;return}s.fd=p,s.emit("open",p),s._read()})}function r(n,i){if(!(this instanceof r))return new r(n,i);Vo.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 s=Object.keys(i),o=0,a=s.length;o<a;o++){var c=s[o];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 Zo=y((Pb,Qo)=>{"use strict";Qo.exports=hp;var dp=Object.getPrototypeOf||function(t){return t.__proto__};function hp(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:dp(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}});var le=y((Db,hi)=>{var W=require("fs"),pp=Wo(),mp=Ko(),gp=Zo(),Nr=require("util"),se,Lr;typeof Symbol=="function"&&typeof Symbol.for=="function"?(se=Symbol.for("graceful-fs.queue"),Lr=Symbol.for("graceful-fs.previous")):(se="___graceful-fs.queue",Lr="___graceful-fs.previous");function yp(){}function ra(t,e){Object.defineProperty(t,se,{get:function(){return e}})}var pt=yp;Nr.debuglog?pt=Nr.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(pt=function(){var t=Nr.format.apply(Nr,arguments);t="GFS4: "+t.split(/\n/).join(`
3
- GFS4: `),console.error(t)});W[se]||(ea=global[se]||[],ra(W,ea),W.close=function(t){function e(r,n){return t.call(W,r,function(i){i||ta(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,Lr,{value:t}),e}(W.close),W.closeSync=function(t){function e(r){t.apply(W,arguments),ta()}return Object.defineProperty(e,Lr,{value:t}),e}(W.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){pt(W[se]),require("assert").equal(W[se].length,0)}));var ea;global[se]||ra(global,W[se]);hi.exports=fi(gp(W));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!W.__patched&&(hi.exports=fi(W),W.__patched=!0);function fi(t){pp(t),t.gracefulify=fi,t.createReadStream=H,t.createWriteStream=ne;var e=t.readFile;t.readFile=r;function r(D,q,T){return typeof q=="function"&&(T=q,q=null),J(D,q,T);function J(I,X,O,B){return e(I,X,function(M){M&&(M.code==="EMFILE"||M.code==="ENFILE")?Ot([J,[I,X,O],M,B||Date.now(),Date.now()]):typeof O=="function"&&O.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=i;function i(D,q,T,J){return typeof T=="function"&&(J=T,T=null),I(D,q,T,J);function I(X,O,B,M,P){return n(X,O,B,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Ot([I,[X,O,B,M],R,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var s=t.appendFile;s&&(t.appendFile=o);function o(D,q,T,J){return typeof T=="function"&&(J=T,T=null),I(D,q,T,J);function I(X,O,B,M,P){return s(X,O,B,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Ot([I,[X,O,B,M],R,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=c);function c(D,q,T,J){return typeof T=="function"&&(J=T,T=0),I(D,q,T,J);function I(X,O,B,M,P){return a(X,O,B,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Ot([I,[X,O,B,M],R,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var d=t.readdir;t.readdir=p;var u=/^v[0-5]\./;function p(D,q,T){typeof q=="function"&&(T=q,q=null);var J=u.test(process.version)?function(O,B,M,P){return d(O,I(O,B,M,P))}:function(O,B,M,P){return d(O,B,I(O,B,M,P))};return J(D,q,T);function I(X,O,B,M){return function(P,R){P&&(P.code==="EMFILE"||P.code==="ENFILE")?Ot([J,[X,O,B],P,M||Date.now(),Date.now()]):(R&&R.sort&&R.sort(),typeof B=="function"&&B.call(this,P,R))}}}if(process.version.substr(0,4)==="v0.8"){var g=mp(t);F=g.ReadStream,L=g.WriteStream}var m=t.ReadStream;m&&(F.prototype=Object.create(m.prototype),F.prototype.open=j);var b=t.WriteStream;b&&(L.prototype=Object.create(b.prototype),L.prototype.open=$),Object.defineProperty(t,"ReadStream",{get:function(){return F},set:function(D){F=D},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return L},set:function(D){L=D},enumerable:!0,configurable:!0});var S=F;Object.defineProperty(t,"FileReadStream",{get:function(){return S},set:function(D){S=D},enumerable:!0,configurable:!0});var x=L;Object.defineProperty(t,"FileWriteStream",{get:function(){return x},set:function(D){x=D},enumerable:!0,configurable:!0});function F(D,q){return this instanceof F?(m.apply(this,arguments),this):F.apply(Object.create(F.prototype),arguments)}function j(){var D=this;Y(D.path,D.flags,D.mode,function(q,T){q?(D.autoClose&&D.destroy(),D.emit("error",q)):(D.fd=T,D.emit("open",T),D.read())})}function L(D,q){return this instanceof L?(b.apply(this,arguments),this):L.apply(Object.create(L.prototype),arguments)}function $(){var D=this;Y(D.path,D.flags,D.mode,function(q,T){q?(D.destroy(),D.emit("error",q)):(D.fd=T,D.emit("open",T))})}function H(D,q){return new t.ReadStream(D,q)}function ne(D,q){return new t.WriteStream(D,q)}var Se=t.open;t.open=Y;function Y(D,q,T,J){return typeof T=="function"&&(J=T,T=null),I(D,q,T,J);function I(X,O,B,M,P){return Se(X,O,B,function(R,Ue){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Ot([I,[X,O,B,M],R,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}return t}function Ot(t){pt("ENQUEUE",t[0].name,t[1]),W[se].push(t),di()}var jr;function ta(){for(var t=Date.now(),e=0;e<W[se].length;++e)W[se][e].length>2&&(W[se][e][3]=t,W[se][e][4]=t);di()}function di(){if(clearTimeout(jr),jr=void 0,W[se].length!==0){var t=W[se].shift(),e=t[0],r=t[1],n=t[2],i=t[3],s=t[4];if(i===void 0)pt("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-i>=6e4){pt("TIMEOUT",e.name,r);var o=r.pop();typeof o=="function"&&o.call(null,n)}else{var a=Date.now()-s,c=Math.max(s-i,1),d=Math.min(c*1.2,100);a>=d?(pt("RETRY",e.name,r),e.apply(null,r.concat([i]))):W[se].push(t)}jr===void 0&&(jr=setTimeout(di,0))}}});var tr=y(nt=>{"use strict";var na=Ee().fromCallback,ge=le(),vp=["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"&&(nt[t]=ge[t])});vp.forEach(t=>{nt[t]=na(ge[t])});nt.exists=function(t,e){return typeof e=="function"?ge.exists(t,e):new Promise(r=>ge.exists(t,r))};nt.read=function(t,e,r,n,i,s){return typeof s=="function"?ge.read(t,e,r,n,i,s):new Promise((o,a)=>{ge.read(t,e,r,n,i,(c,d,u)=>{if(c)return a(c);o({bytesRead:d,buffer:u})})})};nt.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,(s,o,a)=>{if(s)return i(s);n({bytesWritten:o,buffer:a})})})};typeof ge.writev=="function"&&(nt.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,(s,o,a)=>{if(s)return i(s);n({bytesWritten:o,buffers:a})})})});typeof ge.realpath.native=="function"&&(nt.realpath.native=na(ge.realpath.native))});var pi=y((Ib,ia)=>{ia.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 ua=y((Ab,mi)=>{"use strict";var It=tr(),Ve=require("path"),bp=pi(),sa=bp("10.12.0"),oa=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}},aa=t=>{let e={mode:511};return typeof t=="number"&&(t={mode:t}),{...e,...t}},ca=t=>{let e=new Error(`operation not permitted, mkdir '${t}'`);return e.code="EPERM",e.errno=-4048,e.path=t,e.syscall="mkdir",e};mi.exports.makeDir=async(t,e)=>{if(oa(t),e=aa(e),sa){let n=Ve.resolve(t);return It.mkdir(n,{mode:e.mode,recursive:!0})}let r=async n=>{try{await It.mkdir(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(Ve.dirname(n)===n)throw ca(n);if(i.message.includes("null bytes"))throw i;return await r(Ve.dirname(n)),r(n)}try{if(!(await It.stat(n)).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(Ve.resolve(t))};mi.exports.makeDirSync=(t,e)=>{if(oa(t),e=aa(e),sa){let n=Ve.resolve(t);return It.mkdirSync(n,{mode:e.mode,recursive:!0})}let r=n=>{try{It.mkdirSync(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(Ve.dirname(n)===n)throw ca(n);if(i.message.includes("null bytes"))throw i;return r(Ve.dirname(n)),r(n)}try{if(!It.statSync(n).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(Ve.resolve(t))}});var Me=y((Fb,la)=>{"use strict";var wp=Ee().fromPromise,{makeDir:_p,makeDirSync:gi}=ua(),yi=wp(_p);la.exports={mkdirs:yi,mkdirsSync:gi,mkdirp:yi,mkdirpSync:gi,ensureDir:yi,ensureDirSync:gi}});var vi=y((Rb,fa)=>{"use strict";var At=le();function Sp(t,e,r,n){At.open(t,"r+",(i,s)=>{if(i)return n(i);At.futimes(s,e,r,o=>{At.close(s,a=>{n&&n(o||a)})})})}function xp(t,e,r){let n=At.openSync(t,"r+");return At.futimesSync(n,e,r),At.closeSync(n)}fa.exports={utimesMillis:Sp,utimesMillisSync:xp}});var rr=y((kb,ma)=>{"use strict";var Ft=tr(),Ce=require("path"),Ep=require("util"),Cp=pi(),$r=Cp("10.5.0"),da=t=>$r?Ft.stat(t,{bigint:!0}):Ft.stat(t),bi=t=>$r?Ft.statSync(t,{bigint:!0}):Ft.statSync(t);function Pp(t,e){return Promise.all([da(t),da(e).catch(r=>{if(r.code==="ENOENT")return null;throw r})]).then(([r,n])=>({srcStat:r,destStat:n}))}function Dp(t,e){let r,n=bi(t);try{r=bi(e)}catch(i){if(i.code==="ENOENT")return{srcStat:n,destStat:null};throw i}return{srcStat:n,destStat:r}}function Op(t,e,r,n){Ep.callbackify(Pp)(t,e,(i,s)=>{if(i)return n(i);let{srcStat:o,destStat:a}=s;return a&&Br(o,a)?n(new Error("Source and destination must not be the same.")):o.isDirectory()&&wi(t,e)?n(new Error(Ur(t,e,r))):n(null,{srcStat:o,destStat:a})})}function Ip(t,e,r){let{srcStat:n,destStat:i}=Dp(t,e);if(i&&Br(n,i))throw new Error("Source and destination must not be the same.");if(n.isDirectory()&&wi(t,e))throw new Error(Ur(t,e,r));return{srcStat:n,destStat:i}}function ha(t,e,r,n,i){let s=Ce.resolve(Ce.dirname(t)),o=Ce.resolve(Ce.dirname(r));if(o===s||o===Ce.parse(o).root)return i();let a=(c,d)=>c?c.code==="ENOENT"?i():i(c):Br(e,d)?i(new Error(Ur(t,r,n))):ha(t,e,o,n,i);$r?Ft.stat(o,{bigint:!0},a):Ft.stat(o,a)}function pa(t,e,r,n){let i=Ce.resolve(Ce.dirname(t)),s=Ce.resolve(Ce.dirname(r));if(s===i||s===Ce.parse(s).root)return;let o;try{o=bi(s)}catch(a){if(a.code==="ENOENT")return;throw a}if(Br(e,o))throw new Error(Ur(t,r,n));return pa(t,e,s,n)}function Br(t,e){return!!(e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev&&($r||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 wi(t,e){let r=Ce.resolve(t).split(Ce.sep).filter(i=>i),n=Ce.resolve(e).split(Ce.sep).filter(i=>i);return r.reduce((i,s,o)=>i&&n[o]===s,!0)}function Ur(t,e,r){return`Cannot ${r} '${t}' to a subdirectory of itself, '${e}'.`}ma.exports={checkPaths:Op,checkPathsSync:Ip,checkParentPaths:ha,checkParentPathsSync:pa,isSrcSubdir:wi}});var wa=y((Tb,ba)=>{"use strict";var fe=le(),nr=require("path"),Ap=Me().mkdirsSync,Fp=vi().utimesMillisSync,ir=rr();function Rp(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;
1
+ "use strict";var zd=Object.create;var Lr=Object.defineProperty;var Wd=Object.getOwnPropertyDescriptor;var Vd=Object.getOwnPropertyNames;var Yd=Object.getPrototypeOf,Kd=Object.prototype.hasOwnProperty;var Ho=(t,e)=>()=>(t&&(e=t(t=0)),e);var y=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Qd=(t,e)=>{for(var r in e)Lr(t,r,{get:e[r],enumerable:!0})},Jo=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Vd(e))!Kd.call(t,i)&&i!==r&&Lr(t,i,{get:()=>e[i],enumerable:!(n=Wd(e,i))||n.enumerable});return t};var F=(t,e,r)=>(r=t!=null?zd(Yd(t)):{},Jo(e||!t||!t.__esModule?Lr(r,"default",{value:t,enumerable:!0}):r,t)),Zd=t=>Jo(Lr({},"__esModule",{value:!0}),t);var it=y((Eb,fi)=>{var ep=require("fs"),tp=require("path");function zo(t){console.log(`[dotenv][DEBUG] ${t}`)}var rp=`
2
+ `,np=/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/,ip=/\\n/g,sp=/\n|\r|\r\n/;function Wo(t,e){let r=!!(e&&e.debug),n={};return t.toString().split(sp).forEach(function(i,s){let o=i.match(np);if(o!=null){let a=o[1],c=o[2]||"",f=c.length-1,u=c[0]==='"'&&c[f]==='"';c[0]==="'"&&c[f]==="'"||u?(c=c.substring(1,f),u&&(c=c.replace(ip,rp))):c=c.trim(),n[a]=c}else r&&zo(`did not match key and value when parsing line ${s+1}: ${i}`)}),n}function op(t){let e=tp.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=Wo(ep.readFileSync(e,{encoding:r}),{debug:n});return Object.keys(i).forEach(function(s){Object.prototype.hasOwnProperty.call(process.env,s)?n&&zo(`"${s}" is already defined in \`process.env\` and will not be overwritten`):process.env[s]=i[s]}),{parsed:i}}catch(i){return{error:i}}}fi.exports.config=op;fi.exports.parse=Wo});var xe=y(hi=>{"use strict";hi.fromCallback=function(t){return Object.defineProperty(function(...e){if(typeof e[e.length-1]=="function")t.apply(this,e);else return new Promise((r,n)=>{t.call(this,...e,(i,s)=>i!=null?n(i):r(s))})},"name",{value:t.name})};hi.fromPromise=function(t){return Object.defineProperty(function(...e){let r=e[e.length-1];if(typeof r!="function")return t.apply(this,e);t.apply(this,e.slice(0,-1)).then(n=>r(null,n),r)},"name",{value:t.name})}});var Yo=y((Pb,Vo)=>{var st=require("constants"),ap=process.cwd,$r=null,cp=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return $r||($r=ap.call(process)),$r};try{process.cwd()}catch{}typeof process.chdir=="function"&&(di=process.chdir,process.chdir=function(t){$r=null,di.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,di));var di;Vo.exports=up;function up(t){st.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||r(t),t.chown=s(t.chown),t.fchown=s(t.fchown),t.lchown=s(t.lchown),t.chmod=n(t.chmod),t.fchmod=n(t.fchmod),t.lchmod=n(t.lchmod),t.chownSync=o(t.chownSync),t.fchownSync=o(t.fchownSync),t.lchownSync=o(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(){}),cp==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(u){function p(g,m,b){var _=Date.now(),x=0;u(g,m,function A($){if($&&($.code==="EACCES"||$.code==="EPERM")&&Date.now()-_<6e4){setTimeout(function(){t.stat(m,function(U,q){U&&U.code==="ENOENT"?u(g,m,A):b($)})},x),x<100&&(x+=10);return}b&&b($)})}return Object.setPrototypeOf&&Object.setPrototypeOf(p,u),p}(t.rename)),t.read=typeof t.read!="function"?t.read:function(u){function p(g,m,b,_,x,A){var $;if(A&&typeof A=="function"){var U=0;$=function(q,W,ce){if(q&&q.code==="EAGAIN"&&U<10)return U++,u.call(t,g,m,b,_,x,$);A.apply(this,arguments)}}return u.call(t,g,m,b,_,x,$)}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,_){for(var x=0;;)try{return u.call(t,p,g,m,b,_)}catch(A){if(A.code==="EAGAIN"&&x<10){x++;continue}throw A}}}(t.readSync);function e(u){u.lchmod=function(p,g,m){u.open(p,st.O_WRONLY|st.O_SYMLINK,g,function(b,_){if(b){m&&m(b);return}u.fchmod(_,g,function(x){u.close(_,function(A){m&&m(x||A)})})})},u.lchmodSync=function(p,g){var m=u.openSync(p,st.O_WRONLY|st.O_SYMLINK,g),b=!0,_;try{_=u.fchmodSync(m,g),b=!1}finally{if(b)try{u.closeSync(m)}catch{}else u.closeSync(m)}return _}}function r(u){st.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(p,g,m,b){u.open(p,st.O_SYMLINK,function(_,x){if(_){b&&b(_);return}u.futimes(x,g,m,function(A){u.close(x,function($){b&&b(A||$)})})})},u.lutimesSync=function(p,g,m){var b=u.openSync(p,st.O_SYMLINK),_,x=!0;try{_=u.futimesSync(b,g,m),x=!1}finally{if(x)try{u.closeSync(b)}catch{}else u.closeSync(b)}return _}):u.futimes&&(u.lutimes=function(p,g,m,b){b&&process.nextTick(b)},u.lutimesSync=function(){})}function n(u){return u&&function(p,g,m){return u.call(t,p,g,function(b){f(b)&&(b=null),m&&m.apply(this,arguments)})}}function i(u){return u&&function(p,g){try{return u.call(t,p,g)}catch(m){if(!f(m))throw m}}}function s(u){return u&&function(p,g,m,b){return u.call(t,p,g,m,function(_){f(_)&&(_=null),b&&b.apply(this,arguments)})}}function o(u){return u&&function(p,g,m){try{return u.call(t,p,g,m)}catch(b){if(!f(b))throw b}}}function a(u){return u&&function(p,g,m){typeof g=="function"&&(m=g,g=null);function b(_,x){x&&(x.uid<0&&(x.uid+=4294967296),x.gid<0&&(x.gid+=4294967296)),m&&m.apply(this,arguments)}return g?u.call(t,p,g,b):u.call(t,p,b)}}function c(u){return u&&function(p,g){var m=g?u.call(t,p,g):u.call(t,p);return m&&(m.uid<0&&(m.uid+=4294967296),m.gid<0&&(m.gid+=4294967296)),m}}function f(u){if(!u||u.code==="ENOSYS")return!0;var p=!process.getuid||process.getuid()!==0;return!!(p&&(u.code==="EINVAL"||u.code==="EPERM"))}}});var Zo=y((Db,Qo)=>{var Ko=require("stream").Stream;Qo.exports=lp;function lp(t){return{ReadStream:e,WriteStream:r};function e(n,i){if(!(this instanceof e))return new e(n,i);Ko.call(this);var s=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 o=Object.keys(i),a=0,c=o.length;a<c;a++){var f=o[a];this[f]=i[f]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}t.open(this.path,this.flags,this.mode,function(u,p){if(u){s.emit("error",u),s.readable=!1;return}s.fd=p,s.emit("open",p),s._read()})}function r(n,i){if(!(this instanceof r))return new r(n,i);Ko.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 s=Object.keys(i),o=0,a=s.length;o<a;o++){var c=s[o];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 ta=y((Ob,ea)=>{"use strict";ea.exports=hp;var fp=Object.getPrototypeOf||function(t){return t.__proto__};function hp(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:fp(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}});var fe=y((Ib,gi)=>{var z=require("fs"),dp=Yo(),pp=Zo(),mp=ta(),Br=require("util"),ie,Xr;typeof Symbol=="function"&&typeof Symbol.for=="function"?(ie=Symbol.for("graceful-fs.queue"),Xr=Symbol.for("graceful-fs.previous")):(ie="___graceful-fs.queue",Xr="___graceful-fs.previous");function gp(){}function ia(t,e){Object.defineProperty(t,ie,{get:function(){return e}})}var mt=gp;Br.debuglog?mt=Br.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(mt=function(){var t=Br.format.apply(Br,arguments);t="GFS4: "+t.split(/\n/).join(`
3
+ GFS4: `),console.error(t)});z[ie]||(ra=global[ie]||[],ia(z,ra),z.close=function(t){function e(r,n){return t.call(z,r,function(i){i||na(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,Xr,{value:t}),e}(z.close),z.closeSync=function(t){function e(r){t.apply(z,arguments),na()}return Object.defineProperty(e,Xr,{value:t}),e}(z.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){mt(z[ie]),require("assert").equal(z[ie].length,0)}));var ra;global[ie]||ia(global,z[ie]);gi.exports=pi(mp(z));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!z.__patched&&(gi.exports=pi(z),z.__patched=!0);function pi(t){dp(t),t.gracefulify=pi,t.createReadStream=W,t.createWriteStream=ce;var e=t.readFile;t.readFile=r;function r(D,j,T){return typeof j=="function"&&(T=j,j=null),H(D,j,T);function H(I,X,O,B){return e(I,X,function(M){M&&(M.code==="EMFILE"||M.code==="ENFILE")?It([H,[I,X,O],M,B||Date.now(),Date.now()]):typeof O=="function"&&O.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=i;function i(D,j,T,H){return typeof T=="function"&&(H=T,T=null),I(D,j,T,H);function I(X,O,B,M,P){return n(X,O,B,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?It([I,[X,O,B,M],R,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var s=t.appendFile;s&&(t.appendFile=o);function o(D,j,T,H){return typeof T=="function"&&(H=T,T=null),I(D,j,T,H);function I(X,O,B,M,P){return s(X,O,B,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?It([I,[X,O,B,M],R,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=c);function c(D,j,T,H){return typeof T=="function"&&(H=T,T=0),I(D,j,T,H);function I(X,O,B,M,P){return a(X,O,B,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?It([I,[X,O,B,M],R,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var f=t.readdir;t.readdir=p;var u=/^v[0-5]\./;function p(D,j,T){typeof j=="function"&&(T=j,j=null);var H=u.test(process.version)?function(O,B,M,P){return f(O,I(O,B,M,P))}:function(O,B,M,P){return f(O,B,I(O,B,M,P))};return H(D,j,T);function I(X,O,B,M){return function(P,R){P&&(P.code==="EMFILE"||P.code==="ENFILE")?It([H,[X,O,B],P,M||Date.now(),Date.now()]):(R&&R.sort&&R.sort(),typeof B=="function"&&B.call(this,P,R))}}}if(process.version.substr(0,4)==="v0.8"){var g=pp(t);A=g.ReadStream,U=g.WriteStream}var m=t.ReadStream;m&&(A.prototype=Object.create(m.prototype),A.prototype.open=$);var b=t.WriteStream;b&&(U.prototype=Object.create(b.prototype),U.prototype.open=q),Object.defineProperty(t,"ReadStream",{get:function(){return A},set:function(D){A=D},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return U},set:function(D){U=D},enumerable:!0,configurable:!0});var _=A;Object.defineProperty(t,"FileReadStream",{get:function(){return _},set:function(D){_=D},enumerable:!0,configurable:!0});var x=U;Object.defineProperty(t,"FileWriteStream",{get:function(){return x},set:function(D){x=D},enumerable:!0,configurable:!0});function A(D,j){return this instanceof A?(m.apply(this,arguments),this):A.apply(Object.create(A.prototype),arguments)}function $(){var D=this;Y(D.path,D.flags,D.mode,function(j,T){j?(D.autoClose&&D.destroy(),D.emit("error",j)):(D.fd=T,D.emit("open",T),D.read())})}function U(D,j){return this instanceof U?(b.apply(this,arguments),this):U.apply(Object.create(U.prototype),arguments)}function q(){var D=this;Y(D.path,D.flags,D.mode,function(j,T){j?(D.destroy(),D.emit("error",j)):(D.fd=T,D.emit("open",T))})}function W(D,j){return new t.ReadStream(D,j)}function ce(D,j){return new t.WriteStream(D,j)}var ge=t.open;t.open=Y;function Y(D,j,T,H){return typeof T=="function"&&(H=T,T=null),I(D,j,T,H);function I(X,O,B,M,P){return ge(X,O,B,function(R,Be){R&&(R.code==="EMFILE"||R.code==="ENFILE")?It([I,[X,O,B,M],R,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}return t}function It(t){mt("ENQUEUE",t[0].name,t[1]),z[ie].push(t),mi()}var Ur;function na(){for(var t=Date.now(),e=0;e<z[ie].length;++e)z[ie][e].length>2&&(z[ie][e][3]=t,z[ie][e][4]=t);mi()}function mi(){if(clearTimeout(Ur),Ur=void 0,z[ie].length!==0){var t=z[ie].shift(),e=t[0],r=t[1],n=t[2],i=t[3],s=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 o=r.pop();typeof o=="function"&&o.call(null,n)}else{var a=Date.now()-s,c=Math.max(s-i,1),f=Math.min(c*1.2,100);a>=f?(mt("RETRY",e.name,r),e.apply(null,r.concat([i]))):z[ie].push(t)}Ur===void 0&&(Ur=setTimeout(mi,0))}}});var nr=y(ot=>{"use strict";var sa=xe().fromCallback,ve=fe(),yp=["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 ve[t]=="function");Object.keys(ve).forEach(t=>{t!=="promises"&&(ot[t]=ve[t])});yp.forEach(t=>{ot[t]=sa(ve[t])});ot.exists=function(t,e){return typeof e=="function"?ve.exists(t,e):new Promise(r=>ve.exists(t,r))};ot.read=function(t,e,r,n,i,s){return typeof s=="function"?ve.read(t,e,r,n,i,s):new Promise((o,a)=>{ve.read(t,e,r,n,i,(c,f,u)=>{if(c)return a(c);o({bytesRead:f,buffer:u})})})};ot.write=function(t,e,...r){return typeof r[r.length-1]=="function"?ve.write(t,e,...r):new Promise((n,i)=>{ve.write(t,e,...r,(s,o,a)=>{if(s)return i(s);n({bytesWritten:o,buffer:a})})})};typeof ve.writev=="function"&&(ot.writev=function(t,e,...r){return typeof r[r.length-1]=="function"?ve.writev(t,e,...r):new Promise((n,i)=>{ve.writev(t,e,...r,(s,o,a)=>{if(s)return i(s);n({bytesWritten:o,buffers:a})})})});typeof ve.realpath.native=="function"&&(ot.realpath.native=sa(ve.realpath.native))});var yi=y((Fb,oa)=>{oa.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 fa=y((Rb,vi)=>{"use strict";var At=nr(),Ye=require("path"),vp=yi(),aa=vp("10.12.0"),ca=t=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(t.replace(Ye.parse(t).root,""))){let r=new Error(`Path contains invalid characters: ${t}`);throw r.code="EINVAL",r}},ua=t=>{let e={mode:511};return typeof t=="number"&&(t={mode:t}),{...e,...t}},la=t=>{let e=new Error(`operation not permitted, mkdir '${t}'`);return e.code="EPERM",e.errno=-4048,e.path=t,e.syscall="mkdir",e};vi.exports.makeDir=async(t,e)=>{if(ca(t),e=ua(e),aa){let n=Ye.resolve(t);return At.mkdir(n,{mode:e.mode,recursive:!0})}let r=async n=>{try{await At.mkdir(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(Ye.dirname(n)===n)throw la(n);if(i.message.includes("null bytes"))throw i;return await r(Ye.dirname(n)),r(n)}try{if(!(await At.stat(n)).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(Ye.resolve(t))};vi.exports.makeDirSync=(t,e)=>{if(ca(t),e=ua(e),aa){let n=Ye.resolve(t);return At.mkdirSync(n,{mode:e.mode,recursive:!0})}let r=n=>{try{At.mkdirSync(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(Ye.dirname(n)===n)throw la(n);if(i.message.includes("null bytes"))throw i;return r(Ye.dirname(n)),r(n)}try{if(!At.statSync(n).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(Ye.resolve(t))}});var Me=y((kb,ha)=>{"use strict";var bp=xe().fromPromise,{makeDir:wp,makeDirSync:bi}=fa(),wi=bp(wp);ha.exports={mkdirs:wi,mkdirsSync:bi,mkdirp:wi,mkdirpSync:bi,ensureDir:wi,ensureDirSync:bi}});var _i=y((Tb,da)=>{"use strict";var Ft=fe();function _p(t,e,r,n){Ft.open(t,"r+",(i,s)=>{if(i)return n(i);Ft.futimes(s,e,r,o=>{Ft.close(s,a=>{n&&n(o||a)})})})}function Sp(t,e,r){let n=Ft.openSync(t,"r+");return Ft.futimesSync(n,e,r),Ft.closeSync(n)}da.exports={utimesMillis:_p,utimesMillisSync:Sp}});var ir=y((Mb,ya)=>{"use strict";var Rt=nr(),Ee=require("path"),xp=require("util"),Ep=yi(),Gr=Ep("10.5.0"),pa=t=>Gr?Rt.stat(t,{bigint:!0}):Rt.stat(t),Si=t=>Gr?Rt.statSync(t,{bigint:!0}):Rt.statSync(t);function Cp(t,e){return Promise.all([pa(t),pa(e).catch(r=>{if(r.code==="ENOENT")return null;throw r})]).then(([r,n])=>({srcStat:r,destStat:n}))}function Pp(t,e){let r,n=Si(t);try{r=Si(e)}catch(i){if(i.code==="ENOENT")return{srcStat:n,destStat:null};throw i}return{srcStat:n,destStat:r}}function Dp(t,e,r,n){xp.callbackify(Cp)(t,e,(i,s)=>{if(i)return n(i);let{srcStat:o,destStat:a}=s;return a&&Hr(o,a)?n(new Error("Source and destination must not be the same.")):o.isDirectory()&&xi(t,e)?n(new Error(Jr(t,e,r))):n(null,{srcStat:o,destStat:a})})}function Op(t,e,r){let{srcStat:n,destStat:i}=Pp(t,e);if(i&&Hr(n,i))throw new Error("Source and destination must not be the same.");if(n.isDirectory()&&xi(t,e))throw new Error(Jr(t,e,r));return{srcStat:n,destStat:i}}function ma(t,e,r,n,i){let s=Ee.resolve(Ee.dirname(t)),o=Ee.resolve(Ee.dirname(r));if(o===s||o===Ee.parse(o).root)return i();let a=(c,f)=>c?c.code==="ENOENT"?i():i(c):Hr(e,f)?i(new Error(Jr(t,r,n))):ma(t,e,o,n,i);Gr?Rt.stat(o,{bigint:!0},a):Rt.stat(o,a)}function ga(t,e,r,n){let i=Ee.resolve(Ee.dirname(t)),s=Ee.resolve(Ee.dirname(r));if(s===i||s===Ee.parse(s).root)return;let o;try{o=Si(s)}catch(a){if(a.code==="ENOENT")return;throw a}if(Hr(e,o))throw new Error(Jr(t,r,n));return ga(t,e,s,n)}function Hr(t,e){return!!(e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev&&(Gr||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 xi(t,e){let r=Ee.resolve(t).split(Ee.sep).filter(i=>i),n=Ee.resolve(e).split(Ee.sep).filter(i=>i);return r.reduce((i,s,o)=>i&&n[o]===s,!0)}function Jr(t,e,r){return`Cannot ${r} '${t}' to a subdirectory of itself, '${e}'.`}ya.exports={checkPaths:Dp,checkPathsSync:Op,checkParentPaths:ma,checkParentPathsSync:ga,isSrcSubdir:xi}});var Sa=y((qb,_a)=>{"use strict";var he=fe(),sr=require("path"),Ip=Me().mkdirsSync,Ap=_i().utimesMillisSync,or=ir();function Fp(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;
4
4
 
5
- see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:n,destStat:i}=ir.checkPathsSync(t,e,"copy");return ir.checkParentPathsSync(t,n,e,"copy"),kp(i,t,e,r)}function kp(t,e,r,n){if(n.filter&&!n.filter(e,r))return;let i=nr.dirname(r);return fe.existsSync(i)||Ap(i),ga(t,e,r,n)}function ga(t,e,r,n){if(!(n.filter&&!n.filter(e,r)))return Tp(t,e,r,n)}function Tp(t,e,r,n){let s=(n.dereference?fe.statSync:fe.lstatSync)(e);if(s.isDirectory())return Bp(s,t,e,r,n);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return Mp(s,t,e,r,n);if(s.isSymbolicLink())return Gp(t,e,r,n)}function Mp(t,e,r,n,i){return e?qp(t,r,n,i):ya(t,r,n,i)}function qp(t,e,r,n){if(n.overwrite)return fe.unlinkSync(r),ya(t,e,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function ya(t,e,r,n){return fe.copyFileSync(e,r),n.preserveTimestamps&&Np(t.mode,e,r),_i(r,t.mode)}function Np(t,e,r){return jp(t)&&Lp(r,t),$p(e,r)}function jp(t){return(t&128)===0}function Lp(t,e){return _i(t,e|128)}function _i(t,e){return fe.chmodSync(t,e)}function $p(t,e){let r=fe.statSync(t);return Fp(e,r.atime,r.mtime)}function Bp(t,e,r,n,i){if(!e)return Up(t.mode,r,n,i);if(e&&!e.isDirectory())throw new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`);return va(r,n,i)}function Up(t,e,r,n){return fe.mkdirSync(r),va(e,r,n),_i(r,t)}function va(t,e,r){fe.readdirSync(t).forEach(n=>Xp(n,t,e,r))}function Xp(t,e,r,n){let i=nr.join(e,t),s=nr.join(r,t),{destStat:o}=ir.checkPathsSync(i,s,"copy");return ga(o,i,s,n)}function Gp(t,e,r,n){let i=fe.readlinkSync(e);if(n.dereference&&(i=nr.resolve(process.cwd(),i)),t){let s;try{s=fe.readlinkSync(r)}catch(o){if(o.code==="EINVAL"||o.code==="UNKNOWN")return fe.symlinkSync(i,r);throw o}if(n.dereference&&(s=nr.resolve(process.cwd(),s)),ir.isSrcSubdir(i,s))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${s}'.`);if(fe.statSync(r).isDirectory()&&ir.isSrcSubdir(s,i))throw new Error(`Cannot overwrite '${s}' with '${i}'.`);return Hp(i,r)}else return fe.symlinkSync(i,r)}function Hp(t,e){return fe.unlinkSync(e),fe.symlinkSync(t,e)}ba.exports=Rp});var Si=y((Mb,_a)=>{"use strict";_a.exports={copySync:wa()}});var it=y((qb,xa)=>{"use strict";var Jp=Ee().fromPromise,Sa=tr();function zp(t){return Sa.access(t).then(()=>!0).catch(()=>!1)}xa.exports={pathExists:Jp(zp),pathExistsSync:Sa.existsSync}});var Ra=y((Nb,Fa)=>{"use strict";var Pe=le(),sr=require("path"),Wp=Me().mkdirs,Vp=it().pathExists,Yp=vi().utimesMillis,or=rr();function Kp(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;
5
+ see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:n,destStat:i}=or.checkPathsSync(t,e,"copy");return or.checkParentPathsSync(t,n,e,"copy"),Rp(i,t,e,r)}function Rp(t,e,r,n){if(n.filter&&!n.filter(e,r))return;let i=sr.dirname(r);return he.existsSync(i)||Ip(i),va(t,e,r,n)}function va(t,e,r,n){if(!(n.filter&&!n.filter(e,r)))return kp(t,e,r,n)}function kp(t,e,r,n){let s=(n.dereference?he.statSync:he.lstatSync)(e);if(s.isDirectory())return $p(s,t,e,r,n);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return Tp(s,t,e,r,n);if(s.isSymbolicLink())return Xp(t,e,r,n)}function Tp(t,e,r,n,i){return e?Mp(t,r,n,i):ba(t,r,n,i)}function Mp(t,e,r,n){if(n.overwrite)return he.unlinkSync(r),ba(t,e,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function ba(t,e,r,n){return he.copyFileSync(e,r),n.preserveTimestamps&&qp(t.mode,e,r),Ei(r,t.mode)}function qp(t,e,r){return jp(t)&&Np(r,t),Lp(e,r)}function jp(t){return(t&128)===0}function Np(t,e){return Ei(t,e|128)}function Ei(t,e){return he.chmodSync(t,e)}function Lp(t,e){let r=he.statSync(t);return Ap(e,r.atime,r.mtime)}function $p(t,e,r,n,i){if(!e)return Bp(t.mode,r,n,i);if(e&&!e.isDirectory())throw new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`);return wa(r,n,i)}function Bp(t,e,r,n){return he.mkdirSync(r),wa(e,r,n),Ei(r,t)}function wa(t,e,r){he.readdirSync(t).forEach(n=>Up(n,t,e,r))}function Up(t,e,r,n){let i=sr.join(e,t),s=sr.join(r,t),{destStat:o}=or.checkPathsSync(i,s,"copy");return va(o,i,s,n)}function Xp(t,e,r,n){let i=he.readlinkSync(e);if(n.dereference&&(i=sr.resolve(process.cwd(),i)),t){let s;try{s=he.readlinkSync(r)}catch(o){if(o.code==="EINVAL"||o.code==="UNKNOWN")return he.symlinkSync(i,r);throw o}if(n.dereference&&(s=sr.resolve(process.cwd(),s)),or.isSrcSubdir(i,s))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${s}'.`);if(he.statSync(r).isDirectory()&&or.isSrcSubdir(s,i))throw new Error(`Cannot overwrite '${s}' with '${i}'.`);return Gp(i,r)}else return he.symlinkSync(i,r)}function Gp(t,e){return he.unlinkSync(e),he.symlinkSync(t,e)}_a.exports=Fp});var Ci=y((jb,xa)=>{"use strict";xa.exports={copySync:Sa()}});var at=y((Nb,Ca)=>{"use strict";var Hp=xe().fromPromise,Ea=nr();function Jp(t){return Ea.access(t).then(()=>!0).catch(()=>!1)}Ca.exports={pathExists:Hp(Jp),pathExistsSync:Ea.existsSync}});var Ta=y((Lb,ka)=>{"use strict";var Ce=fe(),ar=require("path"),zp=Me().mkdirs,Wp=at().pathExists,Vp=_i().utimesMillis,cr=ir();function Yp(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;
6
6
 
7
- see https://github.com/jprichardson/node-fs-extra/issues/269`),or.checkPaths(t,e,"copy",(i,s)=>{if(i)return n(i);let{srcStat:o,destStat:a}=s;or.checkParentPaths(t,o,e,"copy",c=>c?n(c):r.filter?Da(Ea,a,t,e,r,n):Ea(a,t,e,r,n))})}function Ea(t,e,r,n,i){let s=sr.dirname(r);Vp(s,(o,a)=>{if(o)return i(o);if(a)return xi(t,e,r,n,i);Wp(s,c=>c?i(c):xi(t,e,r,n,i))})}function Da(t,e,r,n,i,s){Promise.resolve(i.filter(r,n)).then(o=>o?t(e,r,n,i,s):s(),o=>s(o))}function xi(t,e,r,n,i){return n.filter?Da(Ca,t,e,r,n,i):Ca(t,e,r,n,i)}function Ca(t,e,r,n,i){(n.dereference?Pe.stat:Pe.lstat)(e,(o,a)=>{if(o)return i(o);if(a.isDirectory())return i0(a,t,e,r,n,i);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return Qp(a,t,e,r,n,i);if(a.isSymbolicLink())return a0(t,e,r,n,i)})}function Qp(t,e,r,n,i,s){return e?Zp(t,r,n,i,s):Oa(t,r,n,i,s)}function Zp(t,e,r,n,i){if(n.overwrite)Pe.unlink(r,s=>s?i(s):Oa(t,e,r,n,i));else return n.errorOnExist?i(new Error(`'${r}' already exists`)):i()}function Oa(t,e,r,n,i){Pe.copyFile(e,r,s=>s?i(s):n.preserveTimestamps?e0(t.mode,e,r,i):Xr(r,t.mode,i))}function e0(t,e,r,n){return t0(t)?r0(r,t,i=>i?n(i):Pa(t,e,r,n)):Pa(t,e,r,n)}function t0(t){return(t&128)===0}function r0(t,e,r){return Xr(t,e|128,r)}function Pa(t,e,r,n){n0(e,r,i=>i?n(i):Xr(r,t,n))}function Xr(t,e,r){return Pe.chmod(t,e,r)}function n0(t,e,r){Pe.stat(t,(n,i)=>n?r(n):Yp(e,i.atime,i.mtime,r))}function i0(t,e,r,n,i,s){return e?e&&!e.isDirectory()?s(new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`)):Ia(r,n,i,s):s0(t.mode,r,n,i,s)}function s0(t,e,r,n,i){Pe.mkdir(r,s=>{if(s)return i(s);Ia(e,r,n,o=>o?i(o):Xr(r,t,i))})}function Ia(t,e,r,n){Pe.readdir(t,(i,s)=>i?n(i):Aa(s,t,e,r,n))}function Aa(t,e,r,n,i){let s=t.pop();return s?o0(t,s,e,r,n,i):i()}function o0(t,e,r,n,i,s){let o=sr.join(r,e),a=sr.join(n,e);or.checkPaths(o,a,"copy",(c,d)=>{if(c)return s(c);let{destStat:u}=d;xi(u,o,a,i,p=>p?s(p):Aa(t,r,n,i,s))})}function a0(t,e,r,n,i){Pe.readlink(e,(s,o)=>{if(s)return i(s);if(n.dereference&&(o=sr.resolve(process.cwd(),o)),t)Pe.readlink(r,(a,c)=>a?a.code==="EINVAL"||a.code==="UNKNOWN"?Pe.symlink(o,r,i):i(a):(n.dereference&&(c=sr.resolve(process.cwd(),c)),or.isSrcSubdir(o,c)?i(new Error(`Cannot copy '${o}' to a subdirectory of itself, '${c}'.`)):t.isDirectory()&&or.isSrcSubdir(c,o)?i(new Error(`Cannot overwrite '${c}' with '${o}'.`)):c0(o,r,i)));else return Pe.symlink(o,r,i)})}function c0(t,e,r){Pe.unlink(e,n=>n?r(n):Pe.symlink(t,e,r))}Fa.exports=Kp});var Ei=y((jb,ka)=>{"use strict";var u0=Ee().fromCallback;ka.exports={copy:u0(Ra())}});var Ua=y((Lb,Ba)=>{"use strict";var Ta=le(),ja=require("path"),G=require("assert"),ar=process.platform==="win32";function La(t){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(r=>{t[r]=t[r]||Ta[r],r=r+"Sync",t[r]=t[r]||Ta[r]}),t.maxBusyTries=t.maxBusyTries||3}function Ci(t,e,r){let n=0;typeof e=="function"&&(r=e,e={}),G(t,"rimraf: missing path"),G.strictEqual(typeof t,"string","rimraf: path should be a string"),G.strictEqual(typeof r,"function","rimraf: callback function required"),G(e,"rimraf: invalid options argument provided"),G.strictEqual(typeof e,"object","rimraf: options should be object"),La(e),Ma(t,e,function i(s){if(s){if((s.code==="EBUSY"||s.code==="ENOTEMPTY"||s.code==="EPERM")&&n<e.maxBusyTries){n++;let o=n*100;return setTimeout(()=>Ma(t,e,i),o)}s.code==="ENOENT"&&(s=null)}r(s)})}function Ma(t,e,r){G(t),G(e),G(typeof r=="function"),e.lstat(t,(n,i)=>{if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&ar)return qa(t,e,n,r);if(i&&i.isDirectory())return Gr(t,e,n,r);e.unlink(t,s=>{if(s){if(s.code==="ENOENT")return r(null);if(s.code==="EPERM")return ar?qa(t,e,s,r):Gr(t,e,s,r);if(s.code==="EISDIR")return Gr(t,e,s,r)}return r(s)})})}function qa(t,e,r,n){G(t),G(e),G(typeof n=="function"),e.chmod(t,438,i=>{i?n(i.code==="ENOENT"?null:r):e.stat(t,(s,o)=>{s?n(s.code==="ENOENT"?null:r):o.isDirectory()?Gr(t,e,r,n):e.unlink(t,n)})})}function Na(t,e,r){let n;G(t),G(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()?Hr(t,e,r):e.unlinkSync(t)}function Gr(t,e,r,n){G(t),G(e),G(typeof n=="function"),e.rmdir(t,i=>{i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")?l0(t,e,n):i&&i.code==="ENOTDIR"?n(r):n(i)})}function l0(t,e,r){G(t),G(e),G(typeof r=="function"),e.readdir(t,(n,i)=>{if(n)return r(n);let s=i.length,o;if(s===0)return e.rmdir(t,r);i.forEach(a=>{Ci(ja.join(t,a),e,c=>{if(!o){if(c)return r(o=c);--s===0&&e.rmdir(t,r)}})})})}function $a(t,e){let r;e=e||{},La(e),G(t,"rimraf: missing path"),G.strictEqual(typeof t,"string","rimraf: path should be a string"),G(e,"rimraf: missing options"),G.strictEqual(typeof e,"object","rimraf: options should be object");try{r=e.lstatSync(t)}catch(n){if(n.code==="ENOENT")return;n.code==="EPERM"&&ar&&Na(t,e,n)}try{r&&r.isDirectory()?Hr(t,e,null):e.unlinkSync(t)}catch(n){if(n.code==="ENOENT")return;if(n.code==="EPERM")return ar?Na(t,e,n):Hr(t,e,n);if(n.code!=="EISDIR")throw n;Hr(t,e,n)}}function Hr(t,e,r){G(t),G(e);try{e.rmdirSync(t)}catch(n){if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")f0(t,e);else if(n.code!=="ENOENT")throw n}}function f0(t,e){if(G(t),G(e),e.readdirSync(t).forEach(r=>$a(ja.join(t,r),e)),ar){let r=Date.now();do try{return e.rmdirSync(t,e)}catch{}while(Date.now()-r<500)}else return e.rmdirSync(t,e)}Ba.exports=Ci;Ci.sync=$a});var cr=y(($b,Ga)=>{"use strict";var d0=Ee().fromCallback,Xa=Ua();Ga.exports={remove:d0(Xa),removeSync:Xa.sync}});var Qa=y((Bb,Ka)=>{"use strict";var h0=Ee().fromCallback,za=le(),Wa=require("path"),Va=Me(),Ya=cr(),Ha=h0(function(e,r){r=r||function(){},za.readdir(e,(n,i)=>{if(n)return Va.mkdirs(e,r);i=i.map(o=>Wa.join(e,o)),s();function s(){let o=i.pop();if(!o)return r();Ya.remove(o,a=>{if(a)return r(a);s()})}})});function Ja(t){let e;try{e=za.readdirSync(t)}catch{return Va.mkdirsSync(t)}e.forEach(r=>{r=Wa.join(t,r),Ya.removeSync(r)})}Ka.exports={emptyDirSync:Ja,emptydirSync:Ja,emptyDir:Ha,emptydir:Ha}});var rc=y((Ub,tc)=>{"use strict";var p0=Ee().fromCallback,Za=require("path"),st=le(),ec=Me();function m0(t,e){function r(){st.writeFile(t,"",n=>{if(n)return e(n);e()})}st.stat(t,(n,i)=>{if(!n&&i.isFile())return e();let s=Za.dirname(t);st.stat(s,(o,a)=>{if(o)return o.code==="ENOENT"?ec.mkdirs(s,c=>{if(c)return e(c);r()}):e(o);a.isDirectory()?r():st.readdir(s,c=>{if(c)return e(c)})})})}function g0(t){let e;try{e=st.statSync(t)}catch{}if(e&&e.isFile())return;let r=Za.dirname(t);try{st.statSync(r).isDirectory()||st.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")ec.mkdirsSync(r);else throw n}st.writeFileSync(t,"")}tc.exports={createFile:p0(m0),createFileSync:g0}});var ac=y((Xb,oc)=>{"use strict";var y0=Ee().fromCallback,ic=require("path"),mt=le(),sc=Me(),nc=it().pathExists;function v0(t,e,r){function n(i,s){mt.link(i,s,o=>{if(o)return r(o);r(null)})}nc(e,(i,s)=>{if(i)return r(i);if(s)return r(null);mt.lstat(t,o=>{if(o)return o.message=o.message.replace("lstat","ensureLink"),r(o);let a=ic.dirname(e);nc(a,(c,d)=>{if(c)return r(c);if(d)return n(t,e);sc.mkdirs(a,u=>{if(u)return r(u);n(t,e)})})})})}function b0(t,e){if(mt.existsSync(e))return;try{mt.lstatSync(t)}catch(s){throw s.message=s.message.replace("lstat","ensureLink"),s}let n=ic.dirname(e);return mt.existsSync(n)||sc.mkdirsSync(n),mt.linkSync(t,e)}oc.exports={createLink:y0(v0),createLinkSync:b0}});var uc=y((Gb,cc)=>{"use strict";var ot=require("path"),ur=le(),w0=it().pathExists;function _0(t,e,r){if(ot.isAbsolute(t))return ur.lstat(t,n=>n?(n.message=n.message.replace("lstat","ensureSymlink"),r(n)):r(null,{toCwd:t,toDst:t}));{let n=ot.dirname(e),i=ot.join(n,t);return w0(i,(s,o)=>s?r(s):o?r(null,{toCwd:i,toDst:t}):ur.lstat(t,a=>a?(a.message=a.message.replace("lstat","ensureSymlink"),r(a)):r(null,{toCwd:t,toDst:ot.relative(n,t)})))}}function S0(t,e){let r;if(ot.isAbsolute(t)){if(r=ur.existsSync(t),!r)throw new Error("absolute srcpath does not exist");return{toCwd:t,toDst:t}}else{let n=ot.dirname(e),i=ot.join(n,t);if(r=ur.existsSync(i),r)return{toCwd:i,toDst:t};if(r=ur.existsSync(t),!r)throw new Error("relative srcpath does not exist");return{toCwd:t,toDst:ot.relative(n,t)}}}cc.exports={symlinkPaths:_0,symlinkPathsSync:S0}});var dc=y((Hb,fc)=>{"use strict";var lc=le();function x0(t,e,r){if(r=typeof e=="function"?e:r,e=typeof e=="function"?!1:e,e)return r(null,e);lc.lstat(t,(n,i)=>{if(n)return r(null,"file");e=i&&i.isDirectory()?"dir":"file",r(null,e)})}function E0(t,e){let r;if(e)return e;try{r=lc.lstatSync(t)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}fc.exports={symlinkType:x0,symlinkTypeSync:E0}});var bc=y((Jb,vc)=>{"use strict";var C0=Ee().fromCallback,pc=require("path"),Rt=le(),mc=Me(),P0=mc.mkdirs,D0=mc.mkdirsSync,gc=uc(),O0=gc.symlinkPaths,I0=gc.symlinkPathsSync,yc=dc(),A0=yc.symlinkType,F0=yc.symlinkTypeSync,hc=it().pathExists;function R0(t,e,r,n){n=typeof r=="function"?r:n,r=typeof r=="function"?!1:r,hc(e,(i,s)=>{if(i)return n(i);if(s)return n(null);O0(t,e,(o,a)=>{if(o)return n(o);t=a.toDst,A0(a.toCwd,r,(c,d)=>{if(c)return n(c);let u=pc.dirname(e);hc(u,(p,g)=>{if(p)return n(p);if(g)return Rt.symlink(t,e,d,n);P0(u,m=>{if(m)return n(m);Rt.symlink(t,e,d,n)})})})})})}function k0(t,e,r){if(Rt.existsSync(e))return;let i=I0(t,e);t=i.toDst,r=F0(i.toCwd,r);let s=pc.dirname(e);return Rt.existsSync(s)||D0(s),Rt.symlinkSync(t,e,r)}vc.exports={createSymlink:C0(R0),createSymlinkSync:k0}});var _c=y((zb,wc)=>{"use strict";var Jr=rc(),zr=ac(),Wr=bc();wc.exports={createFile:Jr.createFile,createFileSync:Jr.createFileSync,ensureFile:Jr.createFile,ensureFileSync:Jr.createFileSync,createLink:zr.createLink,createLinkSync:zr.createLinkSync,ensureLink:zr.createLink,ensureLinkSync:zr.createLinkSync,createSymlink:Wr.createSymlink,createSymlinkSync:Wr.createSymlinkSync,ensureSymlink:Wr.createSymlink,ensureSymlinkSync:Wr.createSymlinkSync}});var Vr=y((Wb,Sc)=>{function T0(t,{EOL:e=`
8
- `,finalEOL:r=!0,replacer:n=null,spaces:i}={}){let s=r?e:"";return JSON.stringify(t,n,i).replace(/\n/g,e)+s}function M0(t){return Buffer.isBuffer(t)&&(t=t.toString("utf8")),t.replace(/^\uFEFF/,"")}Sc.exports={stringify:T0,stripBom:M0}});var Pc=y((Vb,Cc)=>{var kt;try{kt=le()}catch{kt=require("fs")}var Yr=Ee(),{stringify:xc,stripBom:Ec}=Vr();async function q0(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||kt,n="throws"in e?e.throws:!0,i=await Yr.fromCallback(r.readFile)(t,e);i=Ec(i);let s;try{s=JSON.parse(i,e?e.reviver:null)}catch(o){if(n)throw o.message=`${t}: ${o.message}`,o;return null}return s}var N0=Yr.fromPromise(q0);function j0(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||kt,n="throws"in e?e.throws:!0;try{let i=r.readFileSync(t,e);return i=Ec(i),JSON.parse(i,e.reviver)}catch(i){if(n)throw i.message=`${t}: ${i.message}`,i;return null}}async function L0(t,e,r={}){let n=r.fs||kt,i=xc(e,r);await Yr.fromCallback(n.writeFile)(t,i,r)}var $0=Yr.fromPromise(L0);function B0(t,e,r={}){let n=r.fs||kt,i=xc(e,r);return n.writeFileSync(t,i,r)}var U0={readFile:N0,readFileSync:j0,writeFile:$0,writeFileSync:B0};Cc.exports=U0});var Oc=y((Yb,Dc)=>{"use strict";var Kr=Pc();Dc.exports={readJson:Kr.readFile,readJsonSync:Kr.readFileSync,writeJson:Kr.writeFile,writeJsonSync:Kr.writeFileSync}});var Qr=y((Kb,Fc)=>{"use strict";var X0=Ee().fromCallback,lr=le(),Ic=require("path"),Ac=Me(),G0=it().pathExists;function H0(t,e,r,n){typeof r=="function"&&(n=r,r="utf8");let i=Ic.dirname(t);G0(i,(s,o)=>{if(s)return n(s);if(o)return lr.writeFile(t,e,r,n);Ac.mkdirs(i,a=>{if(a)return n(a);lr.writeFile(t,e,r,n)})})}function J0(t,...e){let r=Ic.dirname(t);if(lr.existsSync(r))return lr.writeFileSync(t,...e);Ac.mkdirsSync(r),lr.writeFileSync(t,...e)}Fc.exports={outputFile:X0(H0),outputFileSync:J0}});var kc=y((Qb,Rc)=>{"use strict";var{stringify:z0}=Vr(),{outputFile:W0}=Qr();async function V0(t,e,r={}){let n=z0(e,r);await W0(t,n,r)}Rc.exports=V0});var Mc=y((Zb,Tc)=>{"use strict";var{stringify:Y0}=Vr(),{outputFileSync:K0}=Qr();function Q0(t,e,r){let n=Y0(e,r);K0(t,n,r)}Tc.exports=Q0});var Nc=y((e2,qc)=>{"use strict";var Z0=Ee().fromPromise,ye=Oc();ye.outputJson=Z0(kc());ye.outputJsonSync=Mc();ye.outputJSON=ye.outputJson;ye.outputJSONSync=ye.outputJsonSync;ye.writeJSON=ye.writeJson;ye.writeJSONSync=ye.writeJsonSync;ye.readJSON=ye.readJson;ye.readJSONSync=ye.readJsonSync;qc.exports=ye});var Xc=y((t2,Uc)=>{"use strict";var $c=le(),em=require("path"),tm=Si().copySync,Bc=cr().removeSync,rm=Me().mkdirpSync,jc=rr();function nm(t,e,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:i}=jc.checkPathsSync(t,e,"move");return jc.checkParentPathsSync(t,i,e,"move"),rm(em.dirname(e)),im(t,e,n)}function im(t,e,r){if(r)return Bc(e),Lc(t,e,r);if($c.existsSync(e))throw new Error("dest already exists.");return Lc(t,e,r)}function Lc(t,e,r){try{$c.renameSync(t,e)}catch(n){if(n.code!=="EXDEV")throw n;return sm(t,e,r)}}function sm(t,e,r){return tm(t,e,{overwrite:r,errorOnExist:!0}),Bc(t)}Uc.exports=nm});var Hc=y((r2,Gc)=>{"use strict";Gc.exports={moveSync:Xc()}});var Yc=y((n2,Vc)=>{"use strict";var om=le(),am=require("path"),cm=Ei().copy,Wc=cr().remove,um=Me().mkdirp,lm=it().pathExists,Jc=rr();function fm(t,e,r,n){typeof r=="function"&&(n=r,r={});let i=r.overwrite||r.clobber||!1;Jc.checkPaths(t,e,"move",(s,o)=>{if(s)return n(s);let{srcStat:a}=o;Jc.checkParentPaths(t,a,e,"move",c=>{if(c)return n(c);um(am.dirname(e),d=>d?n(d):dm(t,e,i,n))})})}function dm(t,e,r,n){if(r)return Wc(e,i=>i?n(i):zc(t,e,r,n));lm(e,(i,s)=>i?n(i):s?n(new Error("dest already exists.")):zc(t,e,r,n))}function zc(t,e,r,n){om.rename(t,e,i=>i?i.code!=="EXDEV"?n(i):hm(t,e,r,n):n())}function hm(t,e,r,n){cm(t,e,{overwrite:r,errorOnExist:!0},s=>s?n(s):Wc(t,n))}Vc.exports=fm});var Qc=y((i2,Kc)=>{"use strict";var pm=Ee().fromCallback;Kc.exports={move:pm(Yc())}});var gt=y((s2,Pi)=>{"use strict";Pi.exports={...tr(),...Si(),...Ei(),...Qa(),..._c(),...Nc(),...Me(),...Hc(),...Qc(),...Qr(),...it(),...cr()};var Zc=require("fs");Object.getOwnPropertyDescriptor(Zc,"promises")&&Object.defineProperty(Pi.exports,"promises",{get(){return Zc.promises}})});var tu=y((o2,eu)=>{"use strict";var mm=/[|\\{}()[\]^$+*?.]/g;eu.exports=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(mm,"\\$&")}});var nu=y((a2,ru)=>{"use strict";ru.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 Di=y((c2,au)=>{var yt=nu(),ou={};for(Zr in yt)yt.hasOwnProperty(Zr)&&(ou[yt[Zr]]=Zr);var Zr,E=au.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(ve in E)if(E.hasOwnProperty(ve)){if(!("channels"in E[ve]))throw new Error("missing channels property: "+ve);if(!("labels"in E[ve]))throw new Error("missing channel labels property: "+ve);if(E[ve].labels.length!==E[ve].channels)throw new Error("channel and label counts mismatch: "+ve);iu=E[ve].channels,su=E[ve].labels,delete E[ve].channels,delete E[ve].labels,Object.defineProperty(E[ve],"channels",{value:iu}),Object.defineProperty(E[ve],"labels",{value:su})}var iu,su,ve;E.rgb.hsl=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),s=Math.max(e,r,n),o=s-i,a,c,d;return s===i?a=0:e===s?a=(r-n)/o:r===s?a=2+(n-e)/o:n===s&&(a=4+(e-r)/o),a=Math.min(a*60,360),a<0&&(a+=360),d=(i+s)/2,s===i?c=0:d<=.5?c=o/(s+i):c=o/(2-s-i),[a,c*100,d*100]};E.rgb.hsv=function(t){var e,r,n,i,s,o=t[0]/255,a=t[1]/255,c=t[2]/255,d=Math.max(o,a,c),u=d-Math.min(o,a,c),p=function(g){return(d-g)/6/u+1/2};return u===0?i=s=0:(s=u/d,e=p(o),r=p(a),n=p(c),o===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,s*100,d*100]};E.rgb.hwb=function(t){var e=t[0],r=t[1],n=t[2],i=E.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,s*100,n*100]};E.rgb.cmyk=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i,s,o,a;return a=Math.min(1-e,1-r,1-n),i=(1-e-a)/(1-a)||0,s=(1-r-a)/(1-a)||0,o=(1-n-a)/(1-a)||0,[i*100,s*100,o*100,a*100]};function gm(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}E.rgb.keyword=function(t){var e=ou[t];if(e)return e;var r=1/0,n;for(var i in yt)if(yt.hasOwnProperty(i)){var s=yt[i],o=gm(t,s);o<r&&(r=o,n=i)}return n};E.keyword.rgb=function(t){return yt[t]};E.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,s=e*.2126+r*.7152+n*.0722,o=e*.0193+r*.1192+n*.9505;return[i*100,s*100,o*100]};E.rgb.lab=function(t){var e=E.rgb.xyz(t),r=e[0],n=e[1],i=e[2],s,o,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,s=116*n-16,o=500*(r-n),a=200*(n-i),[s,o,a]};E.hsl.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i,s,o,a,c;if(r===0)return c=n*255,[c,c,c];n<.5?s=n*(1+r):s=n+r-n*r,i=2*n-s,a=[0,0,0];for(var d=0;d<3;d++)o=e+1/3*-(d-1),o<0&&o++,o>1&&o--,6*o<1?c=i+(s-i)*6*o:2*o<1?c=s:3*o<2?c=i+(s-i)*(2/3-o)*6:c=i,a[d]=c*255;return a};E.hsl.hsv=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=r,s=Math.max(n,.01),o,a;return n*=2,r*=n<=1?n:2-n,i*=s<=1?s:2-s,a=(n+r)/2,o=n===0?2*i/(s+i):2*r/(n+r),[e,o*100,a*100]};E.hsv.rgb=function(t){var e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,s=e-Math.floor(e),o=255*n*(1-r),a=255*n*(1-r*s),c=255*n*(1-r*(1-s));switch(n*=255,i){case 0:return[n,c,o];case 1:return[a,n,o];case 2:return[o,n,c];case 3:return[o,a,n];case 4:return[c,o,n];case 5:return[n,o,a]}};E.hsv.hsl=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),s,o,a;return a=(2-r)*n,s=(2-r)*i,o=r*i,o/=s<=1?s:2-s,o=o||0,a/=2,[e,o*100,a*100]};E.hwb.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,s,o,a,c;i>1&&(r/=i,n/=i),s=Math.floor(6*e),o=1-n,a=6*e-s,s&1&&(a=1-a),c=r+a*(o-r);var d,u,p;switch(s){default:case 6:case 0:d=o,u=c,p=r;break;case 1:d=c,u=o,p=r;break;case 2:d=r,u=o,p=c;break;case 3:d=r,u=c,p=o;break;case 4:d=c,u=r,p=o;break;case 5:d=o,u=r,p=c;break}return[d*255,u*255,p*255]};E.cmyk.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,s,o,a;return s=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i),[s*255,o*255,a*255]};E.xyz.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,i,s,o;return i=e*3.2406+r*-1.5372+n*-.4986,s=e*-.9689+r*1.8758+n*.0415,o=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[i*255,s*255,o*255]};E.xyz.lab=function(t){var e=t[0],r=t[1],n=t[2],i,s,o;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,s=500*(e-r),o=200*(r-n),[i,s,o]};E.lab.xyz=function(t){var e=t[0],r=t[1],n=t[2],i,s,o;s=(e+16)/116,i=r/500+s,o=s-n/200;var a=Math.pow(s,3),c=Math.pow(i,3),d=Math.pow(o,3);return s=a>.008856?a:(s-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,o=d>.008856?d:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};E.lab.lch=function(t){var e=t[0],r=t[1],n=t[2],i,s,o;return i=Math.atan2(n,r),s=i*360/2/Math.PI,s<0&&(s+=360),o=Math.sqrt(r*r+n*n),[e,o,s]};E.lch.lab=function(t){var e=t[0],r=t[1],n=t[2],i,s,o;return o=n/360*2*Math.PI,i=r*Math.cos(o),s=r*Math.sin(o),[e,i,s]};E.rgb.ansi16=function(t){var e=t[0],r=t[1],n=t[2],i=1 in arguments?arguments[1]:E.rgb.hsv(t)[2];if(i=Math.round(i/50),i===0)return 30;var s=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return i===2&&(s+=60),s};E.hsv.ansi16=function(t){return E.rgb.ansi16(E.hsv.rgb(t),t[2])};E.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};E.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,s=(e>>2&1)*r*255;return[n,i,s]};E.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,s=r%6/5*255;return[n,i,s]};E.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};E.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,s=n>>8&255,o=n&255;return[i,s,o]};E.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),s=Math.min(Math.min(e,r),n),o=i-s,a,c;return o<1?a=s/(1-o):a=0,o<=0?c=0:i===e?c=(r-n)/o%6:i===r?c=2+(n-e)/o:c=4+(e-r)/o+4,c/=6,c%=1,[c*360,o*100,a*100]};E.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]};E.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]};E.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],s=e%1*6,o=s%1,a=1-o,c=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=o,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]=o;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=o,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]};E.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]};E.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]};E.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]};E.hwb.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=1-r,i=n-e,s=0;return i<1&&(s=(n-i)/(1-i)),[t[0],i*100,s*100]};E.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};E.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};E.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};E.gray.hsl=E.gray.hsv=function(t){return[0,0,t[0]]};E.gray.hwb=function(t){return[0,100,t[0]]};E.gray.cmyk=function(t){return[0,0,0,t[0]]};E.gray.lab=function(t){return[t[0],0,0]};E.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};E.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]}});var uu=y((u2,cu)=>{var en=Di();function ym(){for(var t={},e=Object.keys(en),r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function vm(t){var e=ym(),r=[t];for(e[t].distance=0;r.length;)for(var n=r.pop(),i=Object.keys(en[n]),s=i.length,o=0;o<s;o++){var a=i[o],c=e[a];c.distance===-1&&(c.distance=e[n].distance+1,c.parent=n,r.unshift(a))}return e}function bm(t,e){return function(r){return e(t(r))}}function wm(t,e){for(var r=[e[t].parent,t],n=en[e[t].parent][t],i=e[t].parent;e[i].parent;)r.unshift(e[i].parent),n=bm(en[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}cu.exports=function(t){for(var e=vm(t),r={},n=Object.keys(e),i=n.length,s=0;s<i;s++){var o=n[s],a=e[o];a.parent!==null&&(r[o]=wm(o,e))}return r}});var fu=y((l2,lu)=>{var Oi=Di(),_m=uu(),Tt={},Sm=Object.keys(Oi);function xm(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 Em(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,s=0;s<i;s++)n[s]=Math.round(n[s]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}Sm.forEach(function(t){Tt[t]={},Object.defineProperty(Tt[t],"channels",{value:Oi[t].channels}),Object.defineProperty(Tt[t],"labels",{value:Oi[t].labels});var e=_m(t),r=Object.keys(e);r.forEach(function(n){var i=e[n];Tt[t][n]=Em(i),Tt[t][n].raw=xm(i)})});lu.exports=Tt});var hu=y((f2,du)=>{"use strict";var Mt=fu(),tn=(t,e)=>function(){return`\x1B[${t.apply(Mt,arguments)+e}m`},rn=(t,e)=>function(){let r=t.apply(Mt,arguments);return`\x1B[${38+e};5;${r}m`},nn=(t,e)=>function(){let r=t.apply(Mt,arguments);return`\x1B[${38+e};2;${r[0]};${r[1]};${r[2]}m`};function Cm(){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 s=e[i];for(let o of Object.keys(s)){let a=s[o];e[o]={open:`\x1B[${a[0]}m`,close:`\x1B[${a[1]}m`},s[o]=e[o],t.set(a[0],a[1])}Object.defineProperty(e,i,{value:s,enumerable:!1}),Object.defineProperty(e,"codes",{value:t,enumerable:!1})}let r=i=>i,n=(i,s,o)=>[i,s,o];e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi={ansi:tn(r,0)},e.color.ansi256={ansi256:rn(r,0)},e.color.ansi16m={rgb:nn(n,0)},e.bgColor.ansi={ansi:tn(r,10)},e.bgColor.ansi256={ansi256:rn(r,10)},e.bgColor.ansi16m={rgb:nn(n,10)};for(let i of Object.keys(Mt)){if(typeof Mt[i]!="object")continue;let s=Mt[i];i==="ansi16"&&(i="ansi"),"ansi16"in s&&(e.color.ansi[i]=tn(s.ansi16,0),e.bgColor.ansi[i]=tn(s.ansi16,10)),"ansi256"in s&&(e.color.ansi256[i]=rn(s.ansi256,0),e.bgColor.ansi256[i]=rn(s.ansi256,10)),"rgb"in s&&(e.color.ansi16m[i]=nn(s.rgb,0),e.bgColor.ansi16m[i]=nn(s.rgb,10))}return e}Object.defineProperty(du,"exports",{enumerable:!0,get:Cm})});var mu=y((d2,pu)=>{"use strict";pu.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 yu=y((h2,gu)=>{"use strict";var Pm=require("os"),qe=mu(),de=process.env,qt;qe("no-color")||qe("no-colors")||qe("color=false")?qt=!1:(qe("color")||qe("colors")||qe("color=true")||qe("color=always"))&&(qt=!0);"FORCE_COLOR"in de&&(qt=de.FORCE_COLOR.length===0||parseInt(de.FORCE_COLOR,10)!==0);function Dm(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Om(t){if(qt===!1)return 0;if(qe("color=16m")||qe("color=full")||qe("color=truecolor"))return 3;if(qe("color=256"))return 2;if(t&&!t.isTTY&&qt!==!0)return 0;let e=qt?1:0;if(process.platform==="win32"){let r=Pm.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 de)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in de)||de.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in de)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(de.TEAMCITY_VERSION)?1:0;if(de.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in de){let r=parseInt((de.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(de.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(de.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(de.TERM)||"COLORTERM"in de?1:(de.TERM==="dumb",e)}function Ii(t){let e=Om(t);return Dm(e)}gu.exports={supportsColor:Ii,stdout:Ii(process.stdout),stderr:Ii(process.stderr)}});var Su=y((p2,_u)=>{"use strict";var Im=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,vu=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Am=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Fm=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,Rm=new Map([["n",`
9
- `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function wu(t){return t[0]==="u"&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):Rm.get(t)||t}function km(t,e){let r=[],n=e.trim().split(/\s*,\s*/g),i;for(let s of n)if(!isNaN(s))r.push(Number(s));else if(i=s.match(Am))r.push(i[2].replace(Fm,(o,a,c)=>a?wu(a):c));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${t}')`);return r}function Tm(t){vu.lastIndex=0;let e=[],r;for(;(r=vu.exec(t))!==null;){let n=r[1];if(r[2]){let i=km(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function bu(t,e){let r={};for(let i of e)for(let s of i.styles)r[s[0]]=i.inverse?null:s.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}_u.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(Im,(s,o,a,c,d,u)=>{if(o)i.push(wu(o));else if(c){let p=i.join("");i=[],n.push(r.length===0?p:bu(t,r)(p)),r.push({inverse:a,styles:Tm(c)})}else if(d){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(bu(t,r)(i.join(""))),i=[],r.pop()}else i.push(u)}),n.push(i.join("")),r.length>0){let s=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(s)}return n.join("")}});var on=y((m2,dr)=>{"use strict";var Fi=tu(),Q=hu(),Ai=yu().stdout,Mm=Su(),Eu=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),Cu=["ansi","ansi","ansi256","ansi16m"],Pu=new Set(["gray"]),Nt=Object.create(null);function xu(t,e){e=e||{};let r=Ai?Ai.level:0;t.level=e.level===void 0?r:e.level,t.enabled="enabled"in e?e.enabled:t.level>0}function fr(t){if(!this||!(this instanceof fr)||this.template){let e={};return xu(e,t),e.template=function(){let r=[].slice.call(arguments);return jm.apply(null,[e.template].concat(r))},Object.setPrototypeOf(e,fr.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=fr,e.template}xu(this,t)}Eu&&(Q.blue.open="\x1B[94m");for(let t of Object.keys(Q))Q[t].closeRe=new RegExp(Fi(Q[t].close),"g"),Nt[t]={get(){let e=Q[t];return sn.call(this,this._styles?this._styles.concat(e):[e],this._empty,t)}};Nt.visible={get(){return sn.call(this,this._styles||[],!0,"visible")}};Q.color.closeRe=new RegExp(Fi(Q.color.close),"g");for(let t of Object.keys(Q.color.ansi))Pu.has(t)||(Nt[t]={get(){let e=this.level;return function(){let n={open:Q.color[Cu[e]][t].apply(null,arguments),close:Q.color.close,closeRe:Q.color.closeRe};return sn.call(this,this._styles?this._styles.concat(n):[n],this._empty,t)}}});Q.bgColor.closeRe=new RegExp(Fi(Q.bgColor.close),"g");for(let t of Object.keys(Q.bgColor.ansi)){if(Pu.has(t))continue;let e="bg"+t[0].toUpperCase()+t.slice(1);Nt[e]={get(){let r=this.level;return function(){let i={open:Q.bgColor[Cu[r]][t].apply(null,arguments),close:Q.bgColor.close,closeRe:Q.bgColor.closeRe};return sn.call(this,this._styles?this._styles.concat(i):[i],this._empty,t)}}}}var qm=Object.defineProperties(()=>{},Nt);function sn(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(s){i.level=s}}),Object.defineProperty(n,"enabled",{enumerable:!0,get(){return i.enabled},set(s){i.enabled=s}}),n.hasGrey=this.hasGrey||r==="gray"||r==="grey",n.__proto__=qm,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=Q.dim.open;Eu&&this.hasGrey&&(Q.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 Q.dim.open=n,r}function jm(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 Mm(t,n.join(""))}Object.defineProperties(fr.prototype,Nt);dr.exports=fr();dr.exports.supportsColor=Ai;dr.exports.default=dr.exports});var Ou=y((g2,Du)=>{"use strict";Du.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 Ri=y((y2,Au)=>{var hr=Ou(),Iu={};for(let t of Object.keys(hr))Iu[hr[t]]=t;var C={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"]}};Au.exports=C;for(let t of Object.keys(C)){if(!("channels"in C[t]))throw new Error("missing channels property: "+t);if(!("labels"in C[t]))throw new Error("missing channel labels property: "+t);if(C[t].labels.length!==C[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=C[t];delete C[t].channels,delete C[t].labels,Object.defineProperty(C[t],"channels",{value:e}),Object.defineProperty(C[t],"labels",{value:r})}C.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),s=Math.max(e,r,n),o=s-i,a,c;s===i?a=0:e===s?a=(r-n)/o:r===s?a=2+(n-e)/o:n===s&&(a=4+(e-r)/o),a=Math.min(a*60,360),a<0&&(a+=360);let d=(i+s)/2;return s===i?c=0:d<=.5?c=o/(s+i):c=o/(2-s-i),[a,c*100,d*100]};C.rgb.hsv=function(t){let e,r,n,i,s,o=t[0]/255,a=t[1]/255,c=t[2]/255,d=Math.max(o,a,c),u=d-Math.min(o,a,c),p=function(g){return(d-g)/6/u+1/2};return u===0?(i=0,s=0):(s=u/d,e=p(o),r=p(a),n=p(c),o===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,s*100,d*100]};C.rgb.hwb=function(t){let e=t[0],r=t[1],n=t[2],i=C.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,s*100,n*100]};C.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),s=(1-e-i)/(1-i)||0,o=(1-r-i)/(1-i)||0,a=(1-n-i)/(1-i)||0;return[s*100,o*100,a*100,i*100]};function Lm(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}C.rgb.keyword=function(t){let e=Iu[t];if(e)return e;let r=1/0,n;for(let i of Object.keys(hr)){let s=hr[i],o=Lm(t,s);o<r&&(r=o,n=i)}return n};C.keyword.rgb=function(t){return hr[t]};C.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,s=e*.2126+r*.7152+n*.0722,o=e*.0193+r*.1192+n*.9505;return[i*100,s*100,o*100]};C.rgb.lab=function(t){let e=C.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 s=116*n-16,o=500*(r-n),a=200*(n-i);return[s,o,a]};C.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i,s,o;if(r===0)return o=n*255,[o,o,o];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++)s=e+1/3*-(d-1),s<0&&s++,s>1&&s--,6*s<1?o=a+(i-a)*6*s:2*s<1?o=i:3*s<2?o=a+(i-a)*(2/3-s)*6:o=a,c[d]=o*255;return c};C.hsl.hsv=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=r,s=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=s<=1?s:2-s;let o=(n+r)/2,a=n===0?2*i/(s+i):2*r/(n+r);return[e,a*100,o*100]};C.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,s=e-Math.floor(e),o=255*n*(1-r),a=255*n*(1-r*s),c=255*n*(1-r*(1-s));switch(n*=255,i){case 0:return[n,c,o];case 1:return[a,n,o];case 2:return[o,n,c];case 3:return[o,a,n];case 4:return[c,o,n];case 5:return[n,o,a]}};C.hsv.hsl=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),s,o;o=(2-r)*n;let a=(2-r)*i;return s=r*i,s/=a<=1?a:2-a,s=s||0,o/=2,[e,s*100,o*100]};C.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,s;i>1&&(r/=i,n/=i);let o=Math.floor(6*e),a=1-n;s=6*e-o,o&1&&(s=1-s);let c=r+s*(a-r),d,u,p;switch(o){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]};C.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,s=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i);return[s*255,o*255,a*255]};C.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i,s,o;return i=e*3.2406+r*-1.5372+n*-.4986,s=e*-.9689+r*1.8758+n*.0415,o=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[i*255,s*255,o*255]};C.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,s=500*(e-r),o=200*(r-n);return[i,s,o]};C.lab.xyz=function(t){let e=t[0],r=t[1],n=t[2],i,s,o;s=(e+16)/116,i=r/500+s,o=s-n/200;let a=s**3,c=i**3,d=o**3;return s=a>.008856?a:(s-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,o=d>.008856?d:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};C.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 o=Math.sqrt(r*r+n*n);return[e,o,i]};C.lch.lab=function(t){let e=t[0],r=t[1],i=t[2]/360*2*Math.PI,s=r*Math.cos(i),o=r*Math.sin(i);return[e,s,o]};C.rgb.ansi16=function(t,e=null){let[r,n,i]=t,s=e===null?C.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return s===2&&(o+=60),o};C.hsv.ansi16=function(t){return C.rgb.ansi16(C.hsv.rgb(t),t[2])};C.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)};C.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,s=(e>>2&1)*r*255;return[n,i,s]};C.ansi256.rgb=function(t){if(t>=232){let s=(t-232)*10+8;return[s,s,s]}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]};C.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};C.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,s=n>>8&255,o=n&255;return[i,s,o]};C.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),s=Math.min(Math.min(e,r),n),o=i-s,a,c;return o<1?a=s/(1-o):a=0,o<=0?c=0:i===e?c=(r-n)/o%6:i===r?c=2+(n-e)/o:c=4+(e-r)/o,c/=6,c%=1,[c*360,o*100,a*100]};C.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]};C.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]};C.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],s=e%1*6,o=s%1,a=1-o,c=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=o,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]=o;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=o,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]};C.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]};C.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]};C.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]};C.hwb.hcg=function(t){let e=t[1]/100,n=1-t[2]/100,i=n-e,s=0;return i<1&&(s=(n-i)/(1-i)),[t[0],i*100,s*100]};C.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};C.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};C.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};C.gray.hsl=function(t){return[0,0,t[0]]};C.gray.hsv=C.gray.hsl;C.gray.hwb=function(t){return[0,100,t[0]]};C.gray.cmyk=function(t){return[0,0,0,t[0]]};C.gray.lab=function(t){return[t[0],0,0]};C.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};C.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var Ru=y((v2,Fu)=>{var an=Ri();function $m(){let t={},e=Object.keys(an);for(let r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function Bm(t){let e=$m(),r=[t];for(e[t].distance=0;r.length;){let n=r.pop(),i=Object.keys(an[n]);for(let s=i.length,o=0;o<s;o++){let a=i[o],c=e[a];c.distance===-1&&(c.distance=e[n].distance+1,c.parent=n,r.unshift(a))}}return e}function Um(t,e){return function(r){return e(t(r))}}function Xm(t,e){let r=[e[t].parent,t],n=an[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=Um(an[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}Fu.exports=function(t){let e=Bm(t),r={},n=Object.keys(e);for(let i=n.length,s=0;s<i;s++){let o=n[s];e[o].parent!==null&&(r[o]=Xm(o,e))}return r}});var Tu=y((b2,ku)=>{var ki=Ri(),Gm=Ru(),jt={},Hm=Object.keys(ki);function Jm(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 zm(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 s=i.length,o=0;o<s;o++)i[o]=Math.round(i[o]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}Hm.forEach(t=>{jt[t]={},Object.defineProperty(jt[t],"channels",{value:ki[t].channels}),Object.defineProperty(jt[t],"labels",{value:ki[t].labels});let e=Gm(t);Object.keys(e).forEach(n=>{let i=e[n];jt[t][n]=zm(i),jt[t][n].raw=Jm(i)})});ku.exports=jt});var $u=y((w2,Lu)=>{"use strict";var Mu=(t,e)=>(...r)=>`\x1B[${t(...r)+e}m`,qu=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};5;${n}m`},Nu=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};2;${n[0]};${n[1]};${n[2]}m`},cn=t=>t,ju=(t,e,r)=>[t,e,r],Lt=(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})},Ti,$t=(t,e,r,n)=>{Ti===void 0&&(Ti=Tu());let i=n?10:0,s={};for(let[o,a]of Object.entries(Ti)){let c=o==="ansi16"?"ansi":o;o===e?s[c]=t(r,i):typeof a=="object"&&(s[c]=t(a[e],i))}return s};function Wm(){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,s]of Object.entries(n))e[i]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},n[i]=e[i],t.set(s[0],s[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",Lt(e.color,"ansi",()=>$t(Mu,"ansi16",cn,!1)),Lt(e.color,"ansi256",()=>$t(qu,"ansi256",cn,!1)),Lt(e.color,"ansi16m",()=>$t(Nu,"rgb",ju,!1)),Lt(e.bgColor,"ansi",()=>$t(Mu,"ansi16",cn,!0)),Lt(e.bgColor,"ansi256",()=>$t(qu,"ansi256",cn,!0)),Lt(e.bgColor,"ansi16m",()=>$t(Nu,"rgb",ju,!0)),e}Object.defineProperty(Lu,"exports",{enumerable:!0,get:Wm})});var Uu=y((_2,Bu)=>{"use strict";Bu.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 Ni=y((S2,Gu)=>{"use strict";var Vm=require("os"),Xu=require("tty"),ke=Uu(),{env:ee}=process,at;ke("no-color")||ke("no-colors")||ke("color=false")||ke("color=never")?at=0:(ke("color")||ke("colors")||ke("color=true")||ke("color=always"))&&(at=1);"FORCE_COLOR"in ee&&(ee.FORCE_COLOR==="true"?at=1:ee.FORCE_COLOR==="false"?at=0:at=ee.FORCE_COLOR.length===0?1:Math.min(parseInt(ee.FORCE_COLOR,10),3));function Mi(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function qi(t,e){if(at===0)return 0;if(ke("color=16m")||ke("color=full")||ke("color=truecolor"))return 3;if(ke("color=256"))return 2;if(t&&!e&&at===void 0)return 0;let r=at||0;if(ee.TERM==="dumb")return r;if(process.platform==="win32"){let n=Vm.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 Ym(t){let e=qi(t,t&&t.isTTY);return Mi(e)}Gu.exports={supportsColor:Ym,stdout:Mi(qi(!0,Xu.isatty(1))),stderr:Mi(qi(!0,Xu.isatty(2)))}});var Ju=y((x2,Hu)=>{"use strict";var Km=(t,e,r)=>{let n=t.indexOf(e);if(n===-1)return t;let i=e.length,s=0,o="";do o+=t.substr(s,n-s)+e+r,s=n+i,n=t.indexOf(e,s);while(n!==-1);return o+=t.substr(s),o},Qm=(t,e,r,n)=>{let i=0,s="";do{let o=t[n-1]==="\r";s+=t.substr(i,(o?n-1:n)-i)+e+(o?`\r
7
+ see https://github.com/jprichardson/node-fs-extra/issues/269`),cr.checkPaths(t,e,"copy",(i,s)=>{if(i)return n(i);let{srcStat:o,destStat:a}=s;cr.checkParentPaths(t,o,e,"copy",c=>c?n(c):r.filter?Ia(Pa,a,t,e,r,n):Pa(a,t,e,r,n))})}function Pa(t,e,r,n,i){let s=ar.dirname(r);Wp(s,(o,a)=>{if(o)return i(o);if(a)return Pi(t,e,r,n,i);zp(s,c=>c?i(c):Pi(t,e,r,n,i))})}function Ia(t,e,r,n,i,s){Promise.resolve(i.filter(r,n)).then(o=>o?t(e,r,n,i,s):s(),o=>s(o))}function Pi(t,e,r,n,i){return n.filter?Ia(Da,t,e,r,n,i):Da(t,e,r,n,i)}function Da(t,e,r,n,i){(n.dereference?Ce.stat:Ce.lstat)(e,(o,a)=>{if(o)return i(o);if(a.isDirectory())return n0(a,t,e,r,n,i);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return Kp(a,t,e,r,n,i);if(a.isSymbolicLink())return o0(t,e,r,n,i)})}function Kp(t,e,r,n,i,s){return e?Qp(t,r,n,i,s):Aa(t,r,n,i,s)}function Qp(t,e,r,n,i){if(n.overwrite)Ce.unlink(r,s=>s?i(s):Aa(t,e,r,n,i));else return n.errorOnExist?i(new Error(`'${r}' already exists`)):i()}function Aa(t,e,r,n,i){Ce.copyFile(e,r,s=>s?i(s):n.preserveTimestamps?Zp(t.mode,e,r,i):zr(r,t.mode,i))}function Zp(t,e,r,n){return e0(t)?t0(r,t,i=>i?n(i):Oa(t,e,r,n)):Oa(t,e,r,n)}function e0(t){return(t&128)===0}function t0(t,e,r){return zr(t,e|128,r)}function Oa(t,e,r,n){r0(e,r,i=>i?n(i):zr(r,t,n))}function zr(t,e,r){return Ce.chmod(t,e,r)}function r0(t,e,r){Ce.stat(t,(n,i)=>n?r(n):Vp(e,i.atime,i.mtime,r))}function n0(t,e,r,n,i,s){return e?e&&!e.isDirectory()?s(new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`)):Fa(r,n,i,s):i0(t.mode,r,n,i,s)}function i0(t,e,r,n,i){Ce.mkdir(r,s=>{if(s)return i(s);Fa(e,r,n,o=>o?i(o):zr(r,t,i))})}function Fa(t,e,r,n){Ce.readdir(t,(i,s)=>i?n(i):Ra(s,t,e,r,n))}function Ra(t,e,r,n,i){let s=t.pop();return s?s0(t,s,e,r,n,i):i()}function s0(t,e,r,n,i,s){let o=ar.join(r,e),a=ar.join(n,e);cr.checkPaths(o,a,"copy",(c,f)=>{if(c)return s(c);let{destStat:u}=f;Pi(u,o,a,i,p=>p?s(p):Ra(t,r,n,i,s))})}function o0(t,e,r,n,i){Ce.readlink(e,(s,o)=>{if(s)return i(s);if(n.dereference&&(o=ar.resolve(process.cwd(),o)),t)Ce.readlink(r,(a,c)=>a?a.code==="EINVAL"||a.code==="UNKNOWN"?Ce.symlink(o,r,i):i(a):(n.dereference&&(c=ar.resolve(process.cwd(),c)),cr.isSrcSubdir(o,c)?i(new Error(`Cannot copy '${o}' to a subdirectory of itself, '${c}'.`)):t.isDirectory()&&cr.isSrcSubdir(c,o)?i(new Error(`Cannot overwrite '${c}' with '${o}'.`)):a0(o,r,i)));else return Ce.symlink(o,r,i)})}function a0(t,e,r){Ce.unlink(e,n=>n?r(n):Ce.symlink(t,e,r))}ka.exports=Yp});var Di=y(($b,Ma)=>{"use strict";var c0=xe().fromCallback;Ma.exports={copy:c0(Ta())}});var Ga=y((Bb,Xa)=>{"use strict";var qa=fe(),$a=require("path"),G=require("assert"),ur=process.platform==="win32";function Ba(t){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(r=>{t[r]=t[r]||qa[r],r=r+"Sync",t[r]=t[r]||qa[r]}),t.maxBusyTries=t.maxBusyTries||3}function Oi(t,e,r){let n=0;typeof e=="function"&&(r=e,e={}),G(t,"rimraf: missing path"),G.strictEqual(typeof t,"string","rimraf: path should be a string"),G.strictEqual(typeof r,"function","rimraf: callback function required"),G(e,"rimraf: invalid options argument provided"),G.strictEqual(typeof e,"object","rimraf: options should be object"),Ba(e),ja(t,e,function i(s){if(s){if((s.code==="EBUSY"||s.code==="ENOTEMPTY"||s.code==="EPERM")&&n<e.maxBusyTries){n++;let o=n*100;return setTimeout(()=>ja(t,e,i),o)}s.code==="ENOENT"&&(s=null)}r(s)})}function ja(t,e,r){G(t),G(e),G(typeof r=="function"),e.lstat(t,(n,i)=>{if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&ur)return Na(t,e,n,r);if(i&&i.isDirectory())return Wr(t,e,n,r);e.unlink(t,s=>{if(s){if(s.code==="ENOENT")return r(null);if(s.code==="EPERM")return ur?Na(t,e,s,r):Wr(t,e,s,r);if(s.code==="EISDIR")return Wr(t,e,s,r)}return r(s)})})}function Na(t,e,r,n){G(t),G(e),G(typeof n=="function"),e.chmod(t,438,i=>{i?n(i.code==="ENOENT"?null:r):e.stat(t,(s,o)=>{s?n(s.code==="ENOENT"?null:r):o.isDirectory()?Wr(t,e,r,n):e.unlink(t,n)})})}function La(t,e,r){let n;G(t),G(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()?Vr(t,e,r):e.unlinkSync(t)}function Wr(t,e,r,n){G(t),G(e),G(typeof n=="function"),e.rmdir(t,i=>{i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")?u0(t,e,n):i&&i.code==="ENOTDIR"?n(r):n(i)})}function u0(t,e,r){G(t),G(e),G(typeof r=="function"),e.readdir(t,(n,i)=>{if(n)return r(n);let s=i.length,o;if(s===0)return e.rmdir(t,r);i.forEach(a=>{Oi($a.join(t,a),e,c=>{if(!o){if(c)return r(o=c);--s===0&&e.rmdir(t,r)}})})})}function Ua(t,e){let r;e=e||{},Ba(e),G(t,"rimraf: missing path"),G.strictEqual(typeof t,"string","rimraf: path should be a string"),G(e,"rimraf: missing options"),G.strictEqual(typeof e,"object","rimraf: options should be object");try{r=e.lstatSync(t)}catch(n){if(n.code==="ENOENT")return;n.code==="EPERM"&&ur&&La(t,e,n)}try{r&&r.isDirectory()?Vr(t,e,null):e.unlinkSync(t)}catch(n){if(n.code==="ENOENT")return;if(n.code==="EPERM")return ur?La(t,e,n):Vr(t,e,n);if(n.code!=="EISDIR")throw n;Vr(t,e,n)}}function Vr(t,e,r){G(t),G(e);try{e.rmdirSync(t)}catch(n){if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")l0(t,e);else if(n.code!=="ENOENT")throw n}}function l0(t,e){if(G(t),G(e),e.readdirSync(t).forEach(r=>Ua($a.join(t,r),e)),ur){let r=Date.now();do try{return e.rmdirSync(t,e)}catch{}while(Date.now()-r<500)}else return e.rmdirSync(t,e)}Xa.exports=Oi;Oi.sync=Ua});var lr=y((Ub,Ja)=>{"use strict";var f0=xe().fromCallback,Ha=Ga();Ja.exports={remove:f0(Ha),removeSync:Ha.sync}});var ec=y((Xb,Za)=>{"use strict";var h0=xe().fromCallback,Va=fe(),Ya=require("path"),Ka=Me(),Qa=lr(),za=h0(function(e,r){r=r||function(){},Va.readdir(e,(n,i)=>{if(n)return Ka.mkdirs(e,r);i=i.map(o=>Ya.join(e,o)),s();function s(){let o=i.pop();if(!o)return r();Qa.remove(o,a=>{if(a)return r(a);s()})}})});function Wa(t){let e;try{e=Va.readdirSync(t)}catch{return Ka.mkdirsSync(t)}e.forEach(r=>{r=Ya.join(t,r),Qa.removeSync(r)})}Za.exports={emptyDirSync:Wa,emptydirSync:Wa,emptyDir:za,emptydir:za}});var ic=y((Gb,nc)=>{"use strict";var d0=xe().fromCallback,tc=require("path"),ct=fe(),rc=Me();function p0(t,e){function r(){ct.writeFile(t,"",n=>{if(n)return e(n);e()})}ct.stat(t,(n,i)=>{if(!n&&i.isFile())return e();let s=tc.dirname(t);ct.stat(s,(o,a)=>{if(o)return o.code==="ENOENT"?rc.mkdirs(s,c=>{if(c)return e(c);r()}):e(o);a.isDirectory()?r():ct.readdir(s,c=>{if(c)return e(c)})})})}function m0(t){let e;try{e=ct.statSync(t)}catch{}if(e&&e.isFile())return;let r=tc.dirname(t);try{ct.statSync(r).isDirectory()||ct.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")rc.mkdirsSync(r);else throw n}ct.writeFileSync(t,"")}nc.exports={createFile:d0(p0),createFileSync:m0}});var uc=y((Hb,cc)=>{"use strict";var g0=xe().fromCallback,oc=require("path"),gt=fe(),ac=Me(),sc=at().pathExists;function y0(t,e,r){function n(i,s){gt.link(i,s,o=>{if(o)return r(o);r(null)})}sc(e,(i,s)=>{if(i)return r(i);if(s)return r(null);gt.lstat(t,o=>{if(o)return o.message=o.message.replace("lstat","ensureLink"),r(o);let a=oc.dirname(e);sc(a,(c,f)=>{if(c)return r(c);if(f)return n(t,e);ac.mkdirs(a,u=>{if(u)return r(u);n(t,e)})})})})}function v0(t,e){if(gt.existsSync(e))return;try{gt.lstatSync(t)}catch(s){throw s.message=s.message.replace("lstat","ensureLink"),s}let n=oc.dirname(e);return gt.existsSync(n)||ac.mkdirsSync(n),gt.linkSync(t,e)}cc.exports={createLink:g0(y0),createLinkSync:v0}});var fc=y((Jb,lc)=>{"use strict";var ut=require("path"),fr=fe(),b0=at().pathExists;function w0(t,e,r){if(ut.isAbsolute(t))return fr.lstat(t,n=>n?(n.message=n.message.replace("lstat","ensureSymlink"),r(n)):r(null,{toCwd:t,toDst:t}));{let n=ut.dirname(e),i=ut.join(n,t);return b0(i,(s,o)=>s?r(s):o?r(null,{toCwd:i,toDst:t}):fr.lstat(t,a=>a?(a.message=a.message.replace("lstat","ensureSymlink"),r(a)):r(null,{toCwd:t,toDst:ut.relative(n,t)})))}}function _0(t,e){let r;if(ut.isAbsolute(t)){if(r=fr.existsSync(t),!r)throw new Error("absolute srcpath does not exist");return{toCwd:t,toDst:t}}else{let n=ut.dirname(e),i=ut.join(n,t);if(r=fr.existsSync(i),r)return{toCwd:i,toDst:t};if(r=fr.existsSync(t),!r)throw new Error("relative srcpath does not exist");return{toCwd:t,toDst:ut.relative(n,t)}}}lc.exports={symlinkPaths:w0,symlinkPathsSync:_0}});var pc=y((zb,dc)=>{"use strict";var hc=fe();function S0(t,e,r){if(r=typeof e=="function"?e:r,e=typeof e=="function"?!1:e,e)return r(null,e);hc.lstat(t,(n,i)=>{if(n)return r(null,"file");e=i&&i.isDirectory()?"dir":"file",r(null,e)})}function x0(t,e){let r;if(e)return e;try{r=hc.lstatSync(t)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}dc.exports={symlinkType:S0,symlinkTypeSync:x0}});var _c=y((Wb,wc)=>{"use strict";var E0=xe().fromCallback,gc=require("path"),kt=fe(),yc=Me(),C0=yc.mkdirs,P0=yc.mkdirsSync,vc=fc(),D0=vc.symlinkPaths,O0=vc.symlinkPathsSync,bc=pc(),I0=bc.symlinkType,A0=bc.symlinkTypeSync,mc=at().pathExists;function F0(t,e,r,n){n=typeof r=="function"?r:n,r=typeof r=="function"?!1:r,mc(e,(i,s)=>{if(i)return n(i);if(s)return n(null);D0(t,e,(o,a)=>{if(o)return n(o);t=a.toDst,I0(a.toCwd,r,(c,f)=>{if(c)return n(c);let u=gc.dirname(e);mc(u,(p,g)=>{if(p)return n(p);if(g)return kt.symlink(t,e,f,n);C0(u,m=>{if(m)return n(m);kt.symlink(t,e,f,n)})})})})})}function R0(t,e,r){if(kt.existsSync(e))return;let i=O0(t,e);t=i.toDst,r=A0(i.toCwd,r);let s=gc.dirname(e);return kt.existsSync(s)||P0(s),kt.symlinkSync(t,e,r)}wc.exports={createSymlink:E0(F0),createSymlinkSync:R0}});var xc=y((Vb,Sc)=>{"use strict";var Yr=ic(),Kr=uc(),Qr=_c();Sc.exports={createFile:Yr.createFile,createFileSync:Yr.createFileSync,ensureFile:Yr.createFile,ensureFileSync:Yr.createFileSync,createLink:Kr.createLink,createLinkSync:Kr.createLinkSync,ensureLink:Kr.createLink,ensureLinkSync:Kr.createLinkSync,createSymlink:Qr.createSymlink,createSymlinkSync:Qr.createSymlinkSync,ensureSymlink:Qr.createSymlink,ensureSymlinkSync:Qr.createSymlinkSync}});var Zr=y((Yb,Ec)=>{function k0(t,{EOL:e=`
8
+ `,finalEOL:r=!0,replacer:n=null,spaces:i}={}){let s=r?e:"";return JSON.stringify(t,n,i).replace(/\n/g,e)+s}function T0(t){return Buffer.isBuffer(t)&&(t=t.toString("utf8")),t.replace(/^\uFEFF/,"")}Ec.exports={stringify:k0,stripBom:T0}});var Oc=y((Kb,Dc)=>{var Tt;try{Tt=fe()}catch{Tt=require("fs")}var en=xe(),{stringify:Cc,stripBom:Pc}=Zr();async function M0(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||Tt,n="throws"in e?e.throws:!0,i=await en.fromCallback(r.readFile)(t,e);i=Pc(i);let s;try{s=JSON.parse(i,e?e.reviver:null)}catch(o){if(n)throw o.message=`${t}: ${o.message}`,o;return null}return s}var q0=en.fromPromise(M0);function j0(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||Tt,n="throws"in e?e.throws:!0;try{let i=r.readFileSync(t,e);return i=Pc(i),JSON.parse(i,e.reviver)}catch(i){if(n)throw i.message=`${t}: ${i.message}`,i;return null}}async function N0(t,e,r={}){let n=r.fs||Tt,i=Cc(e,r);await en.fromCallback(n.writeFile)(t,i,r)}var L0=en.fromPromise(N0);function $0(t,e,r={}){let n=r.fs||Tt,i=Cc(e,r);return n.writeFileSync(t,i,r)}var B0={readFile:q0,readFileSync:j0,writeFile:L0,writeFileSync:$0};Dc.exports=B0});var Ac=y((Qb,Ic)=>{"use strict";var tn=Oc();Ic.exports={readJson:tn.readFile,readJsonSync:tn.readFileSync,writeJson:tn.writeFile,writeJsonSync:tn.writeFileSync}});var rn=y((Zb,kc)=>{"use strict";var U0=xe().fromCallback,hr=fe(),Fc=require("path"),Rc=Me(),X0=at().pathExists;function G0(t,e,r,n){typeof r=="function"&&(n=r,r="utf8");let i=Fc.dirname(t);X0(i,(s,o)=>{if(s)return n(s);if(o)return hr.writeFile(t,e,r,n);Rc.mkdirs(i,a=>{if(a)return n(a);hr.writeFile(t,e,r,n)})})}function H0(t,...e){let r=Fc.dirname(t);if(hr.existsSync(r))return hr.writeFileSync(t,...e);Rc.mkdirsSync(r),hr.writeFileSync(t,...e)}kc.exports={outputFile:U0(G0),outputFileSync:H0}});var Mc=y((e2,Tc)=>{"use strict";var{stringify:J0}=Zr(),{outputFile:z0}=rn();async function W0(t,e,r={}){let n=J0(e,r);await z0(t,n,r)}Tc.exports=W0});var jc=y((t2,qc)=>{"use strict";var{stringify:V0}=Zr(),{outputFileSync:Y0}=rn();function K0(t,e,r){let n=V0(e,r);Y0(t,n,r)}qc.exports=K0});var Lc=y((r2,Nc)=>{"use strict";var Q0=xe().fromPromise,be=Ac();be.outputJson=Q0(Mc());be.outputJsonSync=jc();be.outputJSON=be.outputJson;be.outputJSONSync=be.outputJsonSync;be.writeJSON=be.writeJson;be.writeJSONSync=be.writeJsonSync;be.readJSON=be.readJson;be.readJSONSync=be.readJsonSync;Nc.exports=be});var Hc=y((n2,Gc)=>{"use strict";var Uc=fe(),Z0=require("path"),em=Ci().copySync,Xc=lr().removeSync,tm=Me().mkdirpSync,$c=ir();function rm(t,e,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:i}=$c.checkPathsSync(t,e,"move");return $c.checkParentPathsSync(t,i,e,"move"),tm(Z0.dirname(e)),nm(t,e,n)}function nm(t,e,r){if(r)return Xc(e),Bc(t,e,r);if(Uc.existsSync(e))throw new Error("dest already exists.");return Bc(t,e,r)}function Bc(t,e,r){try{Uc.renameSync(t,e)}catch(n){if(n.code!=="EXDEV")throw n;return im(t,e,r)}}function im(t,e,r){return em(t,e,{overwrite:r,errorOnExist:!0}),Xc(t)}Gc.exports=rm});var zc=y((i2,Jc)=>{"use strict";Jc.exports={moveSync:Hc()}});var Qc=y((s2,Kc)=>{"use strict";var sm=fe(),om=require("path"),am=Di().copy,Yc=lr().remove,cm=Me().mkdirp,um=at().pathExists,Wc=ir();function lm(t,e,r,n){typeof r=="function"&&(n=r,r={});let i=r.overwrite||r.clobber||!1;Wc.checkPaths(t,e,"move",(s,o)=>{if(s)return n(s);let{srcStat:a}=o;Wc.checkParentPaths(t,a,e,"move",c=>{if(c)return n(c);cm(om.dirname(e),f=>f?n(f):fm(t,e,i,n))})})}function fm(t,e,r,n){if(r)return Yc(e,i=>i?n(i):Vc(t,e,r,n));um(e,(i,s)=>i?n(i):s?n(new Error("dest already exists.")):Vc(t,e,r,n))}function Vc(t,e,r,n){sm.rename(t,e,i=>i?i.code!=="EXDEV"?n(i):hm(t,e,r,n):n())}function hm(t,e,r,n){am(t,e,{overwrite:r,errorOnExist:!0},s=>s?n(s):Yc(t,n))}Kc.exports=lm});var eu=y((o2,Zc)=>{"use strict";var dm=xe().fromCallback;Zc.exports={move:dm(Qc())}});var yt=y((a2,Ii)=>{"use strict";Ii.exports={...nr(),...Ci(),...Di(),...ec(),...xc(),...Lc(),...Me(),...zc(),...eu(),...rn(),...at(),...lr()};var tu=require("fs");Object.getOwnPropertyDescriptor(tu,"promises")&&Object.defineProperty(Ii.exports,"promises",{get(){return tu.promises}})});var nu=y((c2,ru)=>{"use strict";var pm=/[|\\{}()[\]^$+*?.]/g;ru.exports=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(pm,"\\$&")}});var su=y((u2,iu)=>{"use strict";iu.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 Ai=y((l2,uu)=>{var vt=su(),cu={};for(nn in vt)vt.hasOwnProperty(nn)&&(cu[vt[nn]]=nn);var nn,E=uu.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(we in E)if(E.hasOwnProperty(we)){if(!("channels"in E[we]))throw new Error("missing channels property: "+we);if(!("labels"in E[we]))throw new Error("missing channel labels property: "+we);if(E[we].labels.length!==E[we].channels)throw new Error("channel and label counts mismatch: "+we);ou=E[we].channels,au=E[we].labels,delete E[we].channels,delete E[we].labels,Object.defineProperty(E[we],"channels",{value:ou}),Object.defineProperty(E[we],"labels",{value:au})}var ou,au,we;E.rgb.hsl=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),s=Math.max(e,r,n),o=s-i,a,c,f;return s===i?a=0:e===s?a=(r-n)/o:r===s?a=2+(n-e)/o:n===s&&(a=4+(e-r)/o),a=Math.min(a*60,360),a<0&&(a+=360),f=(i+s)/2,s===i?c=0:f<=.5?c=o/(s+i):c=o/(2-s-i),[a,c*100,f*100]};E.rgb.hsv=function(t){var e,r,n,i,s,o=t[0]/255,a=t[1]/255,c=t[2]/255,f=Math.max(o,a,c),u=f-Math.min(o,a,c),p=function(g){return(f-g)/6/u+1/2};return u===0?i=s=0:(s=u/f,e=p(o),r=p(a),n=p(c),o===f?i=n-r:a===f?i=1/3+e-n:c===f&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,f*100]};E.rgb.hwb=function(t){var e=t[0],r=t[1],n=t[2],i=E.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,s*100,n*100]};E.rgb.cmyk=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i,s,o,a;return a=Math.min(1-e,1-r,1-n),i=(1-e-a)/(1-a)||0,s=(1-r-a)/(1-a)||0,o=(1-n-a)/(1-a)||0,[i*100,s*100,o*100,a*100]};function mm(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}E.rgb.keyword=function(t){var e=cu[t];if(e)return e;var r=1/0,n;for(var i in vt)if(vt.hasOwnProperty(i)){var s=vt[i],o=mm(t,s);o<r&&(r=o,n=i)}return n};E.keyword.rgb=function(t){return vt[t]};E.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,s=e*.2126+r*.7152+n*.0722,o=e*.0193+r*.1192+n*.9505;return[i*100,s*100,o*100]};E.rgb.lab=function(t){var e=E.rgb.xyz(t),r=e[0],n=e[1],i=e[2],s,o,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,s=116*n-16,o=500*(r-n),a=200*(n-i),[s,o,a]};E.hsl.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i,s,o,a,c;if(r===0)return c=n*255,[c,c,c];n<.5?s=n*(1+r):s=n+r-n*r,i=2*n-s,a=[0,0,0];for(var f=0;f<3;f++)o=e+1/3*-(f-1),o<0&&o++,o>1&&o--,6*o<1?c=i+(s-i)*6*o:2*o<1?c=s:3*o<2?c=i+(s-i)*(2/3-o)*6:c=i,a[f]=c*255;return a};E.hsl.hsv=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=r,s=Math.max(n,.01),o,a;return n*=2,r*=n<=1?n:2-n,i*=s<=1?s:2-s,a=(n+r)/2,o=n===0?2*i/(s+i):2*r/(n+r),[e,o*100,a*100]};E.hsv.rgb=function(t){var e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,s=e-Math.floor(e),o=255*n*(1-r),a=255*n*(1-r*s),c=255*n*(1-r*(1-s));switch(n*=255,i){case 0:return[n,c,o];case 1:return[a,n,o];case 2:return[o,n,c];case 3:return[o,a,n];case 4:return[c,o,n];case 5:return[n,o,a]}};E.hsv.hsl=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),s,o,a;return a=(2-r)*n,s=(2-r)*i,o=r*i,o/=s<=1?s:2-s,o=o||0,a/=2,[e,o*100,a*100]};E.hwb.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,s,o,a,c;i>1&&(r/=i,n/=i),s=Math.floor(6*e),o=1-n,a=6*e-s,s&1&&(a=1-a),c=r+a*(o-r);var f,u,p;switch(s){default:case 6:case 0:f=o,u=c,p=r;break;case 1:f=c,u=o,p=r;break;case 2:f=r,u=o,p=c;break;case 3:f=r,u=c,p=o;break;case 4:f=c,u=r,p=o;break;case 5:f=o,u=r,p=c;break}return[f*255,u*255,p*255]};E.cmyk.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,s,o,a;return s=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i),[s*255,o*255,a*255]};E.xyz.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,i,s,o;return i=e*3.2406+r*-1.5372+n*-.4986,s=e*-.9689+r*1.8758+n*.0415,o=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[i*255,s*255,o*255]};E.xyz.lab=function(t){var e=t[0],r=t[1],n=t[2],i,s,o;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,s=500*(e-r),o=200*(r-n),[i,s,o]};E.lab.xyz=function(t){var e=t[0],r=t[1],n=t[2],i,s,o;s=(e+16)/116,i=r/500+s,o=s-n/200;var a=Math.pow(s,3),c=Math.pow(i,3),f=Math.pow(o,3);return s=a>.008856?a:(s-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,o=f>.008856?f:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};E.lab.lch=function(t){var e=t[0],r=t[1],n=t[2],i,s,o;return i=Math.atan2(n,r),s=i*360/2/Math.PI,s<0&&(s+=360),o=Math.sqrt(r*r+n*n),[e,o,s]};E.lch.lab=function(t){var e=t[0],r=t[1],n=t[2],i,s,o;return o=n/360*2*Math.PI,i=r*Math.cos(o),s=r*Math.sin(o),[e,i,s]};E.rgb.ansi16=function(t){var e=t[0],r=t[1],n=t[2],i=1 in arguments?arguments[1]:E.rgb.hsv(t)[2];if(i=Math.round(i/50),i===0)return 30;var s=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return i===2&&(s+=60),s};E.hsv.ansi16=function(t){return E.rgb.ansi16(E.hsv.rgb(t),t[2])};E.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};E.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,s=(e>>2&1)*r*255;return[n,i,s]};E.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,s=r%6/5*255;return[n,i,s]};E.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};E.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,s=n>>8&255,o=n&255;return[i,s,o]};E.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),s=Math.min(Math.min(e,r),n),o=i-s,a,c;return o<1?a=s/(1-o):a=0,o<=0?c=0:i===e?c=(r-n)/o%6:i===r?c=2+(n-e)/o:c=4+(e-r)/o+4,c/=6,c%=1,[c*360,o*100,a*100]};E.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]};E.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]};E.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],s=e%1*6,o=s%1,a=1-o,c=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=o,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]=o;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=o,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]};E.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]};E.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]};E.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]};E.hwb.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=1-r,i=n-e,s=0;return i<1&&(s=(n-i)/(1-i)),[t[0],i*100,s*100]};E.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};E.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};E.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};E.gray.hsl=E.gray.hsv=function(t){return[0,0,t[0]]};E.gray.hwb=function(t){return[0,100,t[0]]};E.gray.cmyk=function(t){return[0,0,0,t[0]]};E.gray.lab=function(t){return[t[0],0,0]};E.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};E.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]}});var fu=y((f2,lu)=>{var sn=Ai();function gm(){for(var t={},e=Object.keys(sn),r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function ym(t){var e=gm(),r=[t];for(e[t].distance=0;r.length;)for(var n=r.pop(),i=Object.keys(sn[n]),s=i.length,o=0;o<s;o++){var a=i[o],c=e[a];c.distance===-1&&(c.distance=e[n].distance+1,c.parent=n,r.unshift(a))}return e}function vm(t,e){return function(r){return e(t(r))}}function bm(t,e){for(var r=[e[t].parent,t],n=sn[e[t].parent][t],i=e[t].parent;e[i].parent;)r.unshift(e[i].parent),n=vm(sn[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}lu.exports=function(t){for(var e=ym(t),r={},n=Object.keys(e),i=n.length,s=0;s<i;s++){var o=n[s],a=e[o];a.parent!==null&&(r[o]=bm(o,e))}return r}});var du=y((h2,hu)=>{var Fi=Ai(),wm=fu(),Mt={},_m=Object.keys(Fi);function Sm(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 xm(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,s=0;s<i;s++)n[s]=Math.round(n[s]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}_m.forEach(function(t){Mt[t]={},Object.defineProperty(Mt[t],"channels",{value:Fi[t].channels}),Object.defineProperty(Mt[t],"labels",{value:Fi[t].labels});var e=wm(t),r=Object.keys(e);r.forEach(function(n){var i=e[n];Mt[t][n]=xm(i),Mt[t][n].raw=Sm(i)})});hu.exports=Mt});var mu=y((d2,pu)=>{"use strict";var qt=du(),on=(t,e)=>function(){return`\x1B[${t.apply(qt,arguments)+e}m`},an=(t,e)=>function(){let r=t.apply(qt,arguments);return`\x1B[${38+e};5;${r}m`},cn=(t,e)=>function(){let r=t.apply(qt,arguments);return`\x1B[${38+e};2;${r[0]};${r[1]};${r[2]}m`};function Em(){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 s=e[i];for(let o of Object.keys(s)){let a=s[o];e[o]={open:`\x1B[${a[0]}m`,close:`\x1B[${a[1]}m`},s[o]=e[o],t.set(a[0],a[1])}Object.defineProperty(e,i,{value:s,enumerable:!1}),Object.defineProperty(e,"codes",{value:t,enumerable:!1})}let r=i=>i,n=(i,s,o)=>[i,s,o];e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi={ansi:on(r,0)},e.color.ansi256={ansi256:an(r,0)},e.color.ansi16m={rgb:cn(n,0)},e.bgColor.ansi={ansi:on(r,10)},e.bgColor.ansi256={ansi256:an(r,10)},e.bgColor.ansi16m={rgb:cn(n,10)};for(let i of Object.keys(qt)){if(typeof qt[i]!="object")continue;let s=qt[i];i==="ansi16"&&(i="ansi"),"ansi16"in s&&(e.color.ansi[i]=on(s.ansi16,0),e.bgColor.ansi[i]=on(s.ansi16,10)),"ansi256"in s&&(e.color.ansi256[i]=an(s.ansi256,0),e.bgColor.ansi256[i]=an(s.ansi256,10)),"rgb"in s&&(e.color.ansi16m[i]=cn(s.rgb,0),e.bgColor.ansi16m[i]=cn(s.rgb,10))}return e}Object.defineProperty(pu,"exports",{enumerable:!0,get:Em})});var yu=y((p2,gu)=>{"use strict";gu.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 bu=y((m2,vu)=>{"use strict";var Cm=require("os"),qe=yu(),de=process.env,jt;qe("no-color")||qe("no-colors")||qe("color=false")?jt=!1:(qe("color")||qe("colors")||qe("color=true")||qe("color=always"))&&(jt=!0);"FORCE_COLOR"in de&&(jt=de.FORCE_COLOR.length===0||parseInt(de.FORCE_COLOR,10)!==0);function Pm(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Dm(t){if(jt===!1)return 0;if(qe("color=16m")||qe("color=full")||qe("color=truecolor"))return 3;if(qe("color=256"))return 2;if(t&&!t.isTTY&&jt!==!0)return 0;let e=jt?1:0;if(process.platform==="win32"){let r=Cm.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 de)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in de)||de.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in de)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(de.TEAMCITY_VERSION)?1:0;if(de.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in de){let r=parseInt((de.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(de.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(de.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(de.TERM)||"COLORTERM"in de?1:(de.TERM==="dumb",e)}function Ri(t){let e=Dm(t);return Pm(e)}vu.exports={supportsColor:Ri,stdout:Ri(process.stdout),stderr:Ri(process.stderr)}});var Eu=y((g2,xu)=>{"use strict";var Om=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,wu=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Im=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Am=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,Fm=new Map([["n",`
9
+ `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Su(t){return t[0]==="u"&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):Fm.get(t)||t}function Rm(t,e){let r=[],n=e.trim().split(/\s*,\s*/g),i;for(let s of n)if(!isNaN(s))r.push(Number(s));else if(i=s.match(Im))r.push(i[2].replace(Am,(o,a,c)=>a?Su(a):c));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${t}')`);return r}function km(t){wu.lastIndex=0;let e=[],r;for(;(r=wu.exec(t))!==null;){let n=r[1];if(r[2]){let i=Rm(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function _u(t,e){let r={};for(let i of e)for(let s of i.styles)r[s[0]]=i.inverse?null:s.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}xu.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(Om,(s,o,a,c,f,u)=>{if(o)i.push(Su(o));else if(c){let p=i.join("");i=[],n.push(r.length===0?p:_u(t,r)(p)),r.push({inverse:a,styles:km(c)})}else if(f){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(_u(t,r)(i.join(""))),i=[],r.pop()}else i.push(u)}),n.push(i.join("")),r.length>0){let s=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(s)}return n.join("")}});var ln=y((y2,pr)=>{"use strict";var Ti=nu(),K=mu(),ki=bu().stdout,Tm=Eu(),Pu=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),Du=["ansi","ansi","ansi256","ansi16m"],Ou=new Set(["gray"]),Nt=Object.create(null);function Cu(t,e){e=e||{};let r=ki?ki.level:0;t.level=e.level===void 0?r:e.level,t.enabled="enabled"in e?e.enabled:t.level>0}function dr(t){if(!this||!(this instanceof dr)||this.template){let e={};return Cu(e,t),e.template=function(){let r=[].slice.call(arguments);return jm.apply(null,[e.template].concat(r))},Object.setPrototypeOf(e,dr.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=dr,e.template}Cu(this,t)}Pu&&(K.blue.open="\x1B[94m");for(let t of Object.keys(K))K[t].closeRe=new RegExp(Ti(K[t].close),"g"),Nt[t]={get(){let e=K[t];return un.call(this,this._styles?this._styles.concat(e):[e],this._empty,t)}};Nt.visible={get(){return un.call(this,this._styles||[],!0,"visible")}};K.color.closeRe=new RegExp(Ti(K.color.close),"g");for(let t of Object.keys(K.color.ansi))Ou.has(t)||(Nt[t]={get(){let e=this.level;return function(){let n={open:K.color[Du[e]][t].apply(null,arguments),close:K.color.close,closeRe:K.color.closeRe};return un.call(this,this._styles?this._styles.concat(n):[n],this._empty,t)}}});K.bgColor.closeRe=new RegExp(Ti(K.bgColor.close),"g");for(let t of Object.keys(K.bgColor.ansi)){if(Ou.has(t))continue;let e="bg"+t[0].toUpperCase()+t.slice(1);Nt[e]={get(){let r=this.level;return function(){let i={open:K.bgColor[Du[r]][t].apply(null,arguments),close:K.bgColor.close,closeRe:K.bgColor.closeRe};return un.call(this,this._styles?this._styles.concat(i):[i],this._empty,t)}}}}var Mm=Object.defineProperties(()=>{},Nt);function un(t,e,r){let n=function(){return qm.apply(n,arguments)};n._styles=t,n._empty=e;let i=this;return Object.defineProperty(n,"level",{enumerable:!0,get(){return i.level},set(s){i.level=s}}),Object.defineProperty(n,"enabled",{enumerable:!0,get(){return i.enabled},set(s){i.enabled=s}}),n.hasGrey=this.hasGrey||r==="gray"||r==="grey",n.__proto__=Mm,n}function qm(){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=K.dim.open;Pu&&this.hasGrey&&(K.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 K.dim.open=n,r}function jm(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(dr.prototype,Nt);pr.exports=dr();pr.exports.supportsColor=ki;pr.exports.default=pr.exports});var Au=y((v2,Iu)=>{"use strict";Iu.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 Mi=y((b2,Ru)=>{var mr=Au(),Fu={};for(let t of Object.keys(mr))Fu[mr[t]]=t;var C={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"]}};Ru.exports=C;for(let t of Object.keys(C)){if(!("channels"in C[t]))throw new Error("missing channels property: "+t);if(!("labels"in C[t]))throw new Error("missing channel labels property: "+t);if(C[t].labels.length!==C[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=C[t];delete C[t].channels,delete C[t].labels,Object.defineProperty(C[t],"channels",{value:e}),Object.defineProperty(C[t],"labels",{value:r})}C.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),s=Math.max(e,r,n),o=s-i,a,c;s===i?a=0:e===s?a=(r-n)/o:r===s?a=2+(n-e)/o:n===s&&(a=4+(e-r)/o),a=Math.min(a*60,360),a<0&&(a+=360);let f=(i+s)/2;return s===i?c=0:f<=.5?c=o/(s+i):c=o/(2-s-i),[a,c*100,f*100]};C.rgb.hsv=function(t){let e,r,n,i,s,o=t[0]/255,a=t[1]/255,c=t[2]/255,f=Math.max(o,a,c),u=f-Math.min(o,a,c),p=function(g){return(f-g)/6/u+1/2};return u===0?(i=0,s=0):(s=u/f,e=p(o),r=p(a),n=p(c),o===f?i=n-r:a===f?i=1/3+e-n:c===f&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,f*100]};C.rgb.hwb=function(t){let e=t[0],r=t[1],n=t[2],i=C.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,s*100,n*100]};C.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),s=(1-e-i)/(1-i)||0,o=(1-r-i)/(1-i)||0,a=(1-n-i)/(1-i)||0;return[s*100,o*100,a*100,i*100]};function Nm(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}C.rgb.keyword=function(t){let e=Fu[t];if(e)return e;let r=1/0,n;for(let i of Object.keys(mr)){let s=mr[i],o=Nm(t,s);o<r&&(r=o,n=i)}return n};C.keyword.rgb=function(t){return mr[t]};C.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,s=e*.2126+r*.7152+n*.0722,o=e*.0193+r*.1192+n*.9505;return[i*100,s*100,o*100]};C.rgb.lab=function(t){let e=C.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 s=116*n-16,o=500*(r-n),a=200*(n-i);return[s,o,a]};C.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i,s,o;if(r===0)return o=n*255,[o,o,o];n<.5?i=n*(1+r):i=n+r-n*r;let a=2*n-i,c=[0,0,0];for(let f=0;f<3;f++)s=e+1/3*-(f-1),s<0&&s++,s>1&&s--,6*s<1?o=a+(i-a)*6*s:2*s<1?o=i:3*s<2?o=a+(i-a)*(2/3-s)*6:o=a,c[f]=o*255;return c};C.hsl.hsv=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=r,s=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=s<=1?s:2-s;let o=(n+r)/2,a=n===0?2*i/(s+i):2*r/(n+r);return[e,a*100,o*100]};C.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,s=e-Math.floor(e),o=255*n*(1-r),a=255*n*(1-r*s),c=255*n*(1-r*(1-s));switch(n*=255,i){case 0:return[n,c,o];case 1:return[a,n,o];case 2:return[o,n,c];case 3:return[o,a,n];case 4:return[c,o,n];case 5:return[n,o,a]}};C.hsv.hsl=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),s,o;o=(2-r)*n;let a=(2-r)*i;return s=r*i,s/=a<=1?a:2-a,s=s||0,o/=2,[e,s*100,o*100]};C.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,s;i>1&&(r/=i,n/=i);let o=Math.floor(6*e),a=1-n;s=6*e-o,o&1&&(s=1-s);let c=r+s*(a-r),f,u,p;switch(o){default:case 6:case 0:f=a,u=c,p=r;break;case 1:f=c,u=a,p=r;break;case 2:f=r,u=a,p=c;break;case 3:f=r,u=c,p=a;break;case 4:f=c,u=r,p=a;break;case 5:f=a,u=r,p=c;break}return[f*255,u*255,p*255]};C.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,s=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i);return[s*255,o*255,a*255]};C.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i,s,o;return i=e*3.2406+r*-1.5372+n*-.4986,s=e*-.9689+r*1.8758+n*.0415,o=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[i*255,s*255,o*255]};C.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,s=500*(e-r),o=200*(r-n);return[i,s,o]};C.lab.xyz=function(t){let e=t[0],r=t[1],n=t[2],i,s,o;s=(e+16)/116,i=r/500+s,o=s-n/200;let a=s**3,c=i**3,f=o**3;return s=a>.008856?a:(s-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,o=f>.008856?f:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};C.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 o=Math.sqrt(r*r+n*n);return[e,o,i]};C.lch.lab=function(t){let e=t[0],r=t[1],i=t[2]/360*2*Math.PI,s=r*Math.cos(i),o=r*Math.sin(i);return[e,s,o]};C.rgb.ansi16=function(t,e=null){let[r,n,i]=t,s=e===null?C.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return s===2&&(o+=60),o};C.hsv.ansi16=function(t){return C.rgb.ansi16(C.hsv.rgb(t),t[2])};C.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)};C.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,s=(e>>2&1)*r*255;return[n,i,s]};C.ansi256.rgb=function(t){if(t>=232){let s=(t-232)*10+8;return[s,s,s]}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]};C.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};C.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,s=n>>8&255,o=n&255;return[i,s,o]};C.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),s=Math.min(Math.min(e,r),n),o=i-s,a,c;return o<1?a=s/(1-o):a=0,o<=0?c=0:i===e?c=(r-n)/o%6:i===r?c=2+(n-e)/o:c=4+(e-r)/o,c/=6,c%=1,[c*360,o*100,a*100]};C.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]};C.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]};C.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],s=e%1*6,o=s%1,a=1-o,c=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=o,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]=o;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=o,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]};C.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]};C.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]};C.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]};C.hwb.hcg=function(t){let e=t[1]/100,n=1-t[2]/100,i=n-e,s=0;return i<1&&(s=(n-i)/(1-i)),[t[0],i*100,s*100]};C.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};C.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};C.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};C.gray.hsl=function(t){return[0,0,t[0]]};C.gray.hsv=C.gray.hsl;C.gray.hwb=function(t){return[0,100,t[0]]};C.gray.cmyk=function(t){return[0,0,0,t[0]]};C.gray.lab=function(t){return[t[0],0,0]};C.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};C.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var Tu=y((w2,ku)=>{var fn=Mi();function Lm(){let t={},e=Object.keys(fn);for(let r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function $m(t){let e=Lm(),r=[t];for(e[t].distance=0;r.length;){let n=r.pop(),i=Object.keys(fn[n]);for(let s=i.length,o=0;o<s;o++){let a=i[o],c=e[a];c.distance===-1&&(c.distance=e[n].distance+1,c.parent=n,r.unshift(a))}}return e}function Bm(t,e){return function(r){return e(t(r))}}function Um(t,e){let r=[e[t].parent,t],n=fn[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=Bm(fn[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}ku.exports=function(t){let e=$m(t),r={},n=Object.keys(e);for(let i=n.length,s=0;s<i;s++){let o=n[s];e[o].parent!==null&&(r[o]=Um(o,e))}return r}});var qu=y((_2,Mu)=>{var qi=Mi(),Xm=Tu(),Lt={},Gm=Object.keys(qi);function Hm(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 Jm(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 s=i.length,o=0;o<s;o++)i[o]=Math.round(i[o]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}Gm.forEach(t=>{Lt[t]={},Object.defineProperty(Lt[t],"channels",{value:qi[t].channels}),Object.defineProperty(Lt[t],"labels",{value:qi[t].labels});let e=Xm(t);Object.keys(e).forEach(n=>{let i=e[n];Lt[t][n]=Jm(i),Lt[t][n].raw=Hm(i)})});Mu.exports=Lt});var Uu=y((S2,Bu)=>{"use strict";var ju=(t,e)=>(...r)=>`\x1B[${t(...r)+e}m`,Nu=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};5;${n}m`},Lu=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};2;${n[0]};${n[1]};${n[2]}m`},hn=t=>t,$u=(t,e,r)=>[t,e,r],$t=(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})},ji,Bt=(t,e,r,n)=>{ji===void 0&&(ji=qu());let i=n?10:0,s={};for(let[o,a]of Object.entries(ji)){let c=o==="ansi16"?"ansi":o;o===e?s[c]=t(r,i):typeof a=="object"&&(s[c]=t(a[e],i))}return s};function zm(){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,s]of Object.entries(n))e[i]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},n[i]=e[i],t.set(s[0],s[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",$t(e.color,"ansi",()=>Bt(ju,"ansi16",hn,!1)),$t(e.color,"ansi256",()=>Bt(Nu,"ansi256",hn,!1)),$t(e.color,"ansi16m",()=>Bt(Lu,"rgb",$u,!1)),$t(e.bgColor,"ansi",()=>Bt(ju,"ansi16",hn,!0)),$t(e.bgColor,"ansi256",()=>Bt(Nu,"ansi256",hn,!0)),$t(e.bgColor,"ansi16m",()=>Bt(Lu,"rgb",$u,!0)),e}Object.defineProperty(Bu,"exports",{enumerable:!0,get:zm})});var Gu=y((x2,Xu)=>{"use strict";Xu.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}});var $i=y((E2,Ju)=>{"use strict";var Wm=require("os"),Hu=require("tty"),ke=Gu(),{env:ee}=process,lt;ke("no-color")||ke("no-colors")||ke("color=false")||ke("color=never")?lt=0:(ke("color")||ke("colors")||ke("color=true")||ke("color=always"))&&(lt=1);"FORCE_COLOR"in ee&&(ee.FORCE_COLOR==="true"?lt=1:ee.FORCE_COLOR==="false"?lt=0:lt=ee.FORCE_COLOR.length===0?1:Math.min(parseInt(ee.FORCE_COLOR,10),3));function Ni(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Li(t,e){if(lt===0)return 0;if(ke("color=16m")||ke("color=full")||ke("color=truecolor"))return 3;if(ke("color=256"))return 2;if(t&&!e&&lt===void 0)return 0;let r=lt||0;if(ee.TERM==="dumb")return r;if(process.platform==="win32"){let n=Wm.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 Vm(t){let e=Li(t,t&&t.isTTY);return Ni(e)}Ju.exports={supportsColor:Vm,stdout:Ni(Li(!0,Hu.isatty(1))),stderr:Ni(Li(!0,Hu.isatty(2)))}});var Wu=y((C2,zu)=>{"use strict";var Ym=(t,e,r)=>{let n=t.indexOf(e);if(n===-1)return t;let i=e.length,s=0,o="";do o+=t.substr(s,n-s)+e+r,s=n+i,n=t.indexOf(e,s);while(n!==-1);return o+=t.substr(s),o},Km=(t,e,r,n)=>{let i=0,s="";do{let o=t[n-1]==="\r";s+=t.substr(i,(o?n-1:n)-i)+e+(o?`\r
10
10
  `:`
11
11
  `)+r,i=n+1,n=t.indexOf(`
12
- `,i)}while(n!==-1);return s+=t.substr(i),s};Hu.exports={stringReplaceAll:Km,stringEncaseCRLFWithFirstIndex:Qm}});var Ku=y((E2,Yu)=>{"use strict";var Zm=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,zu=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,eg=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,tg=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,rg=new Map([["n",`
13
- `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Vu(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)):rg.get(t)||t}function ng(t,e){let r=[],n=e.trim().split(/\s*,\s*/g),i;for(let s of n){let o=Number(s);if(!Number.isNaN(o))r.push(o);else if(i=s.match(eg))r.push(i[2].replace(tg,(a,c,d)=>c?Vu(c):d));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${t}')`)}return r}function ig(t){zu.lastIndex=0;let e=[],r;for(;(r=zu.exec(t))!==null;){let n=r[1];if(r[2]){let i=ng(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function Wu(t,e){let r={};for(let i of e)for(let s of i.styles)r[s[0]]=i.inverse?null:s.slice(1);let n=t;for(let[i,s]of Object.entries(r))if(Array.isArray(s)){if(!(i in n))throw new Error(`Unknown Chalk style: ${i}`);n=s.length>0?n[i](...s):n[i]}return n}Yu.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(Zm,(s,o,a,c,d,u)=>{if(o)i.push(Vu(o));else if(c){let p=i.join("");i=[],n.push(r.length===0?p:Wu(t,r)(p)),r.push({inverse:a,styles:ig(c)})}else if(d){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(Wu(t,r)(i.join(""))),i=[],r.pop()}else i.push(u)}),n.push(i.join("")),r.length>0){let s=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(s)}return n.join("")}});var il=y((C2,nl)=>{"use strict";var pr=$u(),{stdout:Li,stderr:$i}=Ni(),{stringReplaceAll:sg,stringEncaseCRLFWithFirstIndex:og}=Ju(),{isArray:un}=Array,Zu=["ansi","ansi","ansi256","ansi16m"],Bt=Object.create(null),ag=(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=Li?Li.level:0;t.level=e.level===void 0?r:e.level},Bi=class{constructor(e){return el(e)}},el=t=>{let e={};return ag(e,t),e.template=(...r)=>rl(e.template,...r),Object.setPrototypeOf(e,ln.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=Bi,e.template};function ln(t){return el(t)}for(let[t,e]of Object.entries(pr))Bt[t]={get(){let r=fn(this,Ui(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Bt.visible={get(){let t=fn(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var tl=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of tl)Bt[t]={get(){let{level:e}=this;return function(...r){let n=Ui(pr.color[Zu[e]][t](...r),pr.color.close,this._styler);return fn(this,n,this._isEmpty)}}};for(let t of tl){let e="bg"+t[0].toUpperCase()+t.slice(1);Bt[e]={get(){let{level:r}=this;return function(...n){let i=Ui(pr.bgColor[Zu[r]][t](...n),pr.bgColor.close,this._styler);return fn(this,i,this._isEmpty)}}}}var cg=Object.defineProperties(()=>{},{...Bt,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),Ui=(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}},fn=(t,e,r)=>{let n=(...i)=>un(i[0])&&un(i[0].raw)?Qu(n,rl(n,...i)):Qu(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,cg),n._generator=t,n._styler=e,n._isEmpty=r,n},Qu=(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=sg(e,r.close,r.open),r=r.parent;let s=e.indexOf(`
14
- `);return s!==-1&&(e=og(e,i,n,s)),n+e+i},ji,rl=(t,...e)=>{let[r]=e;if(!un(r)||!un(r.raw))return e.join(" ");let n=e.slice(1),i=[r.raw[0]];for(let s=1;s<r.length;s++)i.push(String(n[s-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[s]));return ji===void 0&&(ji=Ku()),ji(t,i.join(""))};Object.defineProperties(ln.prototype,Bt);var dn=ln();dn.supportsColor=Li;dn.stderr=ln({level:$i?$i.level:0});dn.stderr.supportsColor=$i;nl.exports=dn});var sl=y((Xi,Gi)=>{(function(t,e){typeof Xi=="object"&&typeof Gi<"u"?Gi.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.tinycolor=e())})(Xi,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,_,w,N,U;return f=h.r/255,v=h.g/255,_=h.b/255,f<=.03928?w=f/12.92:w=Math.pow((f+.055)/1.055,2.4),v<=.03928?N=v/12.92:N=Math.pow((v+.055)/1.055,2.4),_<=.03928?U=_/12.92:U=Math.pow((_+.055)/1.055,2.4),.2126*w+.7152*N+.0722*U},setAlpha:function(h){return this._a=J(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),_=Math.round(h.v*100);return this._a==1?"hsv("+f+", "+v+"%, "+_+"%)":"hsva("+f+", "+v+"%, "+_+"%, "+this._roundA+")"},toHsl:function(){var h=o(this._r,this._g,this._b);return{h:h.h*360,s:h.s,l:h.l,a:this._a}},toHslString:function(){var h=o(this._r,this._g,this._b),f=Math.round(h.h*360),v=Math.round(h.s*100),_=Math.round(h.l*100);return this._a==1?"hsl("+f+", "+v+"%, "+_+"%)":"hsla("+f+", "+v+"%, "+_+"%, "+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(I(this._r,255)*100)+"%",g:Math.round(I(this._g,255)*100)+"%",b:Math.round(I(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(I(this._r,255)*100)+"%, "+Math.round(I(this._g,255)*100)+"%, "+Math.round(I(this._b,255)*100)+"%)":"rgba("+Math.round(I(this._r,255)*100)+"%, "+Math.round(I(this._g,255)*100)+"%, "+Math.round(I(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:q[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,_=this._gradientType?"GradientType = 1, ":"";if(h){var w=n(h);v="#"+g(w._r,w._g,w._b,w._a)}return"progid:DXImageTransform.Microsoft.gradient("+_+"startColorstr="+f+",endColorstr="+v+")"},toString:function(h){var f=!!h;h=h||this._format;var v=!1,_=this._a<1&&this._a>=0,w=!f&&_&&(h==="hex"||h==="hex6"||h==="hex3"||h==="hex4"||h==="hex8"||h==="name");return w?h==="name"&&this._a===0?this.toName():this.toRgbString():(h==="rgb"&&(v=this.toRgbString()),h==="prgb"&&(v=this.toPercentageRgbString()),(h==="hex"||h==="hex6")&&(v=this.toHexString()),h==="hex3"&&(v=this.toHexString(!0)),h==="hex4"&&(v=this.toHex8String(!0)),h==="hex8"&&(v=this.toHex8String()),h==="name"&&(v=this.toName()),h==="hsl"&&(v=this.toHslString()),h==="hsv"&&(v=this.toHsvString()),v||this.toHexString())},clone:function(){return n(this.toString())},_applyModification:function(h,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(x,arguments)},brighten:function(){return this._applyModification(F,arguments)},darken:function(){return this._applyModification(j,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(S,arguments)},spin:function(){return this._applyModification(L,arguments)},_applyCombination:function(h,f){return h.apply(null,[this].concat([].slice.call(f)))},analogous:function(){return this._applyCombination(Se,arguments)},complement:function(){return this._applyCombination($,arguments)},monochromatic:function(){return this._applyCombination(Y,arguments)},splitcomplement:function(){return this._applyCombination(ne,arguments)},triad:function(){return this._applyCombination(H,[3])},tetrad:function(){return this._applyCombination(H,[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]=R(l[v]));l=f}return n(l,h)};function i(l){var h={r:0,g:0,b:0},f=1,v=null,_=null,w=null,N=!1,U=!1;return typeof l=="string"&&(l=et(l)),t(l)=="object"&&(ue(l.r)&&ue(l.g)&&ue(l.b)?(h=s(l.r,l.g,l.b),N=!0,U=String(l.r).substr(-1)==="%"?"prgb":"rgb"):ue(l.h)&&ue(l.s)&&ue(l.v)?(v=R(l.s),_=R(l.v),h=d(l.h,v,_),N=!0,U="hsv"):ue(l.h)&&ue(l.s)&&ue(l.l)&&(v=R(l.s),w=R(l.l),h=a(l.h,v,w),N=!0,U="hsl"),l.hasOwnProperty("a")&&(f=l.a)),f=J(f),{ok:N,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 s(l,h,f){return{r:I(l,255)*255,g:I(h,255)*255,b:I(f,255)*255}}function o(l,h,f){l=I(l,255),h=I(h,255),f=I(f,255);var v=Math.max(l,h,f),_=Math.min(l,h,f),w,N,U=(v+_)/2;if(v==_)w=N=0;else{var z=v-_;switch(N=U>.5?z/(2-v-_):z/(v+_),v){case l:w=(h-f)/z+(h<f?6:0);break;case h:w=(f-l)/z+2;break;case f:w=(l-h)/z+4;break}w/=6}return{h:w,s:N,l:U}}function a(l,h,f){var v,_,w;l=I(l,360),h=I(h,100),f=I(f,100);function N(me,ht,V){return V<0&&(V+=1),V>1&&(V-=1),V<1/6?me+(ht-me)*6*V:V<1/2?ht:V<2/3?me+(ht-me)*(2/3-V)*6:me}if(h===0)v=_=w=f;else{var U=f<.5?f*(1+h):f+h-f*h,z=2*f-U;v=N(z,U,l+1/3),_=N(z,U,l),w=N(z,U,l-1/3)}return{r:v*255,g:_*255,b:w*255}}function c(l,h,f){l=I(l,255),h=I(h,255),f=I(f,255);var v=Math.max(l,h,f),_=Math.min(l,h,f),w,N,U=v,z=v-_;if(N=v===0?0:z/v,v==_)w=0;else{switch(v){case l:w=(h-f)/z+(h<f?6:0);break;case h:w=(f-l)/z+2;break;case f:w=(l-h)/z+4;break}w/=6}return{h:w,s:N,v:U}}function d(l,h,f){l=I(l,360)*6,h=I(h,100),f=I(f,100);var v=Math.floor(l),_=l-v,w=f*(1-h),N=f*(1-_*h),U=f*(1-(1-_)*h),z=v%6,me=[f,N,w,w,U,f][z],ht=[U,f,f,N,w,w][z],V=[w,w,U,f,f,N][z];return{r:me*255,g:ht*255,b:V*255}}function u(l,h,f,v){var _=[P(Math.round(l).toString(16)),P(Math.round(h).toString(16)),P(Math.round(f).toString(16))];return v&&_[0].charAt(0)==_[0].charAt(1)&&_[1].charAt(0)==_[1].charAt(1)&&_[2].charAt(0)==_[2].charAt(1)?_[0].charAt(0)+_[1].charAt(0)+_[2].charAt(0):_.join("")}function p(l,h,f,v,_){var w=[P(Math.round(l).toString(16)),P(Math.round(h).toString(16)),P(Math.round(f).toString(16)),P(Ue(v))];return _&&w[0].charAt(0)==w[0].charAt(1)&&w[1].charAt(0)==w[1].charAt(1)&&w[2].charAt(0)==w[2].charAt(1)&&w[3].charAt(0)==w[3].charAt(1)?w[0].charAt(0)+w[1].charAt(0)+w[2].charAt(0)+w[3].charAt(0):w.join("")}function g(l,h,f,v){var _=[P(Ue(v)),P(Math.round(l).toString(16)),P(Math.round(h).toString(16)),P(Math.round(f).toString(16))];return _.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=X(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=X(f.s),n(f)}function S(l){return n(l).desaturate(100)}function x(l,h){h=h===0?0:h||10;var f=n(l).toHsl();return f.l+=h/100,f.l=X(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 j(l,h){h=h===0?0:h||10;var f=n(l).toHsl();return f.l-=h/100,f.l=X(f.l),n(f)}function L(l,h){var f=n(l).toHsl(),v=(f.h+h)%360;return f.h=v<0?360+v:v,n(f)}function $(l){var h=n(l).toHsl();return h.h=(h.h+180)%360,n(h)}function H(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)],_=360/h,w=1;w<h;w++)v.push(n({h:(f.h+w*_)%360,s:f.s,l:f.l}));return v}function ne(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 Se(l,h,f){h=h||6,f=f||30;var v=n(l).toHsl(),_=360/f,w=[n(l)];for(v.h=(v.h-(_*h>>1)+720)%360;--h;)v.h=(v.h+_)%360,w.push(n(v));return w}function Y(l,h){h=h||6;for(var f=n(l).toHsv(),v=f.h,_=f.s,w=f.v,N=[],U=1/h;h--;)N.push(n({h:v,s:_,v:w})),w=(w+U)%1;return N}n.mix=function(l,h,f){f=f===0?0:f||50;var v=n(l).toRgb(),_=n(h).toRgb(),w=f/100,N={r:(_.r-v.r)*w+v.r,g:(_.g-v.g)*w+v.g,b:(_.b-v.b)*w+v.b,a:(_.a-v.a)*w+v.a};return n(N)},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),_,w;switch(w=!1,_=xe(f),_.level+_.size){case"AAsmall":case"AAAlarge":w=v>=4.5;break;case"AAlarge":w=v>=3;break;case"AAAsmall":w=v>=7;break}return w},n.mostReadable=function(l,h,f){var v=null,_=0,w,N,U,z;f=f||{},N=f.includeFallbackColors,U=f.level,z=f.size;for(var me=0;me<h.length;me++)w=n.readability(l,h[me]),w>_&&(_=w,v=n(h[me]));return n.isReadable(l,v,{level:U,size:z})||!N?v:(f.includeFallbackColors=!1,n.mostReadable(l,["#fff","#000"],f))};var D=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"},q=n.hexNames=T(D);function T(l){var h={};for(var f in l)l.hasOwnProperty(f)&&(h[l[f]]=f);return h}function J(l){return l=parseFloat(l),(isNaN(l)||l<0||l>1)&&(l=1),l}function I(l,h){B(l)&&(l="100%");var f=M(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 X(l){return Math.min(1,Math.max(0,l))}function O(l){return parseInt(l,16)}function B(l){return typeof l=="string"&&l.indexOf(".")!=-1&&parseFloat(l)===1}function M(l){return typeof l=="string"&&l.indexOf("%")!=-1}function P(l){return l.length==1?"0"+l:""+l}function R(l){return l<=1&&(l=l*100+"%"),l}function Ue(l){return Math.round(parseFloat(l)*255).toString(16)}function Xe(l){return O(l)/255}var ie=function(){var l="[-\\+]?\\d+%?",h="[-\\+]?\\d*\\.\\d+%?",f="(?:"+h+")|(?:"+l+")",v="[\\s|\\(]+("+f+")[,|\\s]+("+f+")[,|\\s]+("+f+")\\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"+_),hsl:new RegExp("hsl"+v),hsla:new RegExp("hsla"+_),hsv:new RegExp("hsv"+v),hsva:new RegExp("hsva"+_),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 ue(l){return!!ie.CSS_UNIT.exec(l)}function et(l){l=l.replace(e,"").replace(r,"").toLowerCase();var h=!1;if(D[l])l=D[l],h=!0;else if(l=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var f;return(f=ie.rgb.exec(l))?{r:f[1],g:f[2],b:f[3]}:(f=ie.rgba.exec(l))?{r:f[1],g:f[2],b:f[3],a:f[4]}:(f=ie.hsl.exec(l))?{h:f[1],s:f[2],l:f[3]}:(f=ie.hsla.exec(l))?{h:f[1],s:f[2],l:f[3],a:f[4]}:(f=ie.hsv.exec(l))?{h:f[1],s:f[2],v:f[3]}:(f=ie.hsva.exec(l))?{h:f[1],s:f[2],v:f[3],a:f[4]}:(f=ie.hex8.exec(l))?{r:O(f[1]),g:O(f[2]),b:O(f[3]),a:Xe(f[4]),format:h?"name":"hex8"}:(f=ie.hex6.exec(l))?{r:O(f[1]),g:O(f[2]),b:O(f[3]),format:h?"name":"hex"}:(f=ie.hex4.exec(l))?{r:O(f[1]+""+f[1]),g:O(f[2]+""+f[2]),b:O(f[3]+""+f[3]),a:Xe(f[4]+""+f[4]),format:h?"name":"hex8"}:(f=ie.hex3.exec(l))?{r:O(f[1]+""+f[1]),g:O(f[2]+""+f[2]),b:O(f[3]+""+f[3]),format:h?"name":"hex"}:!1}function xe(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 dl=y((P2,fl)=>{var mr=sl(),ul={r:256,g:256,b:256,a:1},ll={h:360,s:1,v:1,a:1};function Ji(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 zi(t,e,r,n){let i={};for(let s in e)e.hasOwnProperty(s)&&(i[s]=t[s]*r+e[s],i[s]=i[s]<0?i[s]+n[s]:n[s]!==1?i[s]%n[s]:i[s]);return i}function Hi(t,e,r){let n=t.color.toRgb(),i=e.color.toRgb(),s=Ji(n,i,r),o=[t.color];for(let a=1;a<r;a++){let c=zi(s,n,a,ul);o.push(mr(c))}return o}function ol(t,e,r,n){let i=t.color.toHsv(),s=e.color.toHsv();if(i.s===0||s.s===0)return Hi(t,e,r);let o;if(typeof n=="boolean")o=n;else{let u=i.h<s.h&&s.h-i.h<180||i.h>s.h&&i.h-s.h>180;o=n==="long"&&u||n==="short"&&!u}let a=Ji(i,s,r),c=[t.color],d;i.h<=s.h&&!o||i.h>=s.h&&o?d=s.h-i.h:o?d=360-s.h+i.h:d=360-i.h+s.h,a.h=Math.pow(-1,o?1:0)*Math.abs(d)/r;for(let u=1;u<r;u++){let p=zi(a,i,u,ll);c.push(mr(p))}return c}function al(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 s=1;s<r;s++){let o=(e-1)*(t[s].pos-t[s-1].pos);n.push(Math.max(1,Math.round(o)))}let i=1;for(let s=r-1;s--;)i+=n[s];for(;i!==e;)if(i<e){let s=Math.min.apply(null,n);n[n.indexOf(s)]++,i++}else{let s=Math.max.apply(null,n);n[n.indexOf(s)]--,i--}return n}function cl(t,e,r,n){if(e<0||e>1)throw new Error("Position must be between 0 and 1");let i,s;for(let c=0,d=t.length;c<d-1;c++)if(e>=t[c].pos&&e<t[c+1].pos){i=t[c],s=t[c+1];break}i||(i=s=t[t.length-1]);let o=Ji(i.color[r](),s.color[r](),(s.pos-i.pos)*100),a=zi(o,i.color[r](),(e-i.pos)*100,n);return mr(a)}var Ut=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,s=!1;this.stops=e.map((o,a)=>{let c=o.pos!==void 0;if(r^c)throw new Error("Cannot mix positionned and not posionned color stops");if(c){let d=o.color!==void 0;if(!d&&(s||a===0||a===n-1))throw new Error("Cannot define two consecutive position-only stops");if(s=!d,o={color:d?mr(o.color):null,colorLess:!d,pos:o.pos},o.pos<0||o.pos>1)throw new Error("Color stops positions must be between 0 and 1");if(o.pos<i)throw new Error("Color stops positions are not ordered");i=o.pos}else o={color:mr(o.color!==void 0?o.color:o),pos:a/(n-1)};return o}),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 Ut(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 Ut(e.concat(r.reverse()))}rgb(e){let r=al(this.stops,e),n=[];this.stops.forEach((i,s)=>{i.colorLess&&(i.color=Hi(this.stops[s-1],this.stops[s+1],2)[1])});for(let i=0,s=this.stops.length;i<s-1;i++){let o=Hi(this.stops[i],this.stops[i+1],r[i]);n.splice(n.length,0,...o)}return n.push(this.stops[this.stops.length-1].color),n}hsv(e,r){let n=al(this.stops,e),i=[];this.stops.forEach((s,o)=>{s.colorLess&&(s.color=ol(this.stops[o-1],this.stops[o+1],2,r)[1])});for(let s=0,o=this.stops.length;s<o-1;s++){let a=ol(this.stops[s],this.stops[s+1],n[s],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 cl(this.stops,e,"toRgb",ul)}hsvAt(e){return cl(this.stops,e,"toHsv",ll)}};fl.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 Ut(t)}});var yl=y((D2,hn)=>{"use strict";var pl=il(),ug=dl(),hl=/\s/g;function Wi(...t){let e=ug.apply(this,t),r=(n,i)=>lg(n?n.toString():"",e,i);return r.multiline=(n,i)=>fg(n?n.toString():"",e,i),r}var ml=(t,e,r)=>e.interpolation.toLowerCase()==="hsv"?t.hsv(r,e.hsvSpin.toLowerCase()):t.rgb(r);function lg(t,e,r){let n=gl(r),i=Math.max(t.replace(hl,"").length,e.stops.length),s=ml(e,n,i),o="";for(let a of t)o+=a.match(hl)?a:pl.hex(s.shift().toHex())(a);return o}function fg(t,e,r){let n=gl(r),i=t.split(`
15
- `),s=Math.max.apply(null,i.map(c=>c.length).concat([e.stops.length])),o=ml(e,n,s),a=[];for(let c of i){let d=o.slice(0),u="";for(let p of c)u+=pl.hex(d.shift().toHex())(p);a.push(u)}return a.join(`
16
- `)}function gl(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 gr={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"}}};hn.exports=Wi;for(let t in gr)hn.exports[t]=e=>new Wi(gr[t].colors)(e,gr[t].options),hn.exports[t].multiline=e=>new Wi(gr[t].colors).multiline(e,gr[t].options)});var bl=y((O2,vl)=>{var Vi=class{constructor(e){this.value=e,this.next=void 0}},Yi=class{constructor(){this.clear()}enqueue(e){let r=new Vi(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}};vl.exports=Yi});var Ki=y((I2,wl)=>{"use strict";var dg=bl(),hg=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 dg,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()},s=(a,c,...d)=>{e.enqueue(i.bind(null,a,c,...d)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},o=(a,...c)=>new Promise(d=>{s(a,d,...c)});return Object.defineProperties(o,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),o};wl.exports=hg});var xl=y((A2,Sl)=>{"use strict";var _l=Ki(),pn=class extends Error{constructor(e){super(),this.value=e}},pg=async(t,e)=>e(await t),mg=async t=>{let e=await Promise.all(t);if(e[1]===!0)throw new pn(e[0]);return!1},gg=async(t,e,r)=>{r={concurrency:1/0,preserveOrder:!0,...r};let n=_l(r.concurrency),i=[...t].map(o=>[o,n(pg,o,e)]),s=_l(r.preserveOrder?1:1/0);try{await Promise.all(i.map(o=>s(mg,o)))}catch(o){if(o instanceof pn)return o.value;throw o}};Sl.exports=gg});var Il=y((F2,Qi)=>{"use strict";var El=require("path"),mn=require("fs"),{promisify:Cl}=require("util"),yg=xl(),vg=Cl(mn.stat),bg=Cl(mn.lstat),Pl={directory:"isDirectory",file:"isFile"};function Dl({type:t}){if(!(t in Pl))throw new Error(`Invalid type specified: ${t}`)}var Ol=(t,e)=>t===void 0||e[Pl[t]]();Qi.exports=async(t,e)=>{e={cwd:process.cwd(),type:"file",allowSymlinks:!0,...e},Dl(e);let r=e.allowSymlinks?vg:bg;return yg(t,async n=>{try{let i=await r(El.resolve(e.cwd,n));return Ol(e.type,i)}catch{return!1}},e)};Qi.exports.sync=(t,e)=>{e={cwd:process.cwd(),allowSymlinks:!0,type:"file",...e},Dl(e);let r=e.allowSymlinks?mn.statSync:mn.lstatSync;for(let n of t)try{let i=r(El.resolve(e.cwd,n));if(Ol(e.type,i))return n}catch{}}});var Fl=y((R2,Zi)=>{"use strict";var Al=require("fs"),{promisify:wg}=require("util"),_g=wg(Al.access);Zi.exports=async t=>{try{return await _g(t),!0}catch{return!1}};Zi.exports.sync=t=>{try{return Al.accessSync(t),!0}catch{return!1}}});var ts=y((k2,Xt)=>{"use strict";var ct=require("path"),gn=Il(),Rl=Fl(),es=Symbol("findUp.stop");Xt.exports=async(t,e={})=>{let r=ct.resolve(e.cwd||""),{root:n}=ct.parse(r),i=[].concat(t),s=async o=>{if(typeof t!="function")return gn(i,o);let a=await t(o.cwd);return typeof a=="string"?gn([a],o):a};for(;;){let o=await s({...e,cwd:r});if(o===es)return;if(o)return ct.resolve(r,o);if(r===n)return;r=ct.dirname(r)}};Xt.exports.sync=(t,e={})=>{let r=ct.resolve(e.cwd||""),{root:n}=ct.parse(r),i=[].concat(t),s=o=>{if(typeof t!="function")return gn.sync(i,o);let a=t(o.cwd);return typeof a=="string"?gn.sync([a],o):a};for(;;){let o=s({...e,cwd:r});if(o===es)return;if(o)return ct.resolve(r,o);if(r===n)return;r=ct.dirname(r)}};Xt.exports.exists=Rl;Xt.exports.sync.exists=Rl.sync;Xt.exports.stop=es});var yn=y((T2,rs)=>{"use strict";var kl=require("path"),Tl=ts(),Sg=async t=>{let e=await Tl("package.json",{cwd:t});return e&&kl.dirname(e)};rs.exports=Sg;rs.exports.sync=t=>{let e=Tl.sync("package.json",{cwd:t});return e&&kl.dirname(e)}});function Ht(t=""){return Dg?hs.default.resolve(ms.default.sync(__dirname),"../../../",t):hs.default.resolve(ms.default.sync(__dirname),"../griddo-components",t)}function Og(){let t=ps.default.sync("jsconfig.json",{cwd:Ht()});return ps.default.sync("tsconfig.json",{cwd:Ht()})||t}function Ig(){let t=require(Og());return Object.keys(t?.compilerOptions?.paths).reduce((e,r)=>{let[n]=r.split("/"),[i]=t&&t.compilerOptions&&t.compilerOptions.paths&&t.compilerOptions.paths[r],[s]=i.split("/*"),o=Ht(s);return{...e,[n]:o}},{"@griddo-instance":`${Ht()}/src/index.js`})}var hs,ps,ms,Dg,J2,Ql=Xo(()=>{"use strict";hs=A(require("node:path")),ps=A(ts()),ms=A(yn()),Dg=__dirname.includes("node_modules"),J2=Ig()});var rf={};Zh(rf,{CXDir:()=>Mg,default:()=>Tg});var bt,Sn,Zl,ef,Ag,Fg,Rg,kg,tf,Tg,Mg,nf=Xo(()=>{"use strict";bt=A(require("node:path")),Sn=A(yn());Ql();Zl=Sn.default.sync(bt.default.resolve(__dirname,"../..")),ef=Sn.default.sync(__dirname),Ag=bt.default.resolve(Sn.default.sync(__dirname)),Fg=bt.default.resolve(ef,"caches"),Rg=Ht(),kg=bt.default.join(Zl,"exports/sites"),tf={proDomain:"pro-",CXDir:{EXPORTS:"__exports",CACHE:"__caches",CX:"__cx",SSG:"__ssg",COMPONENTS:"__components",ROOT:"__root"},dirs:t=>({__caches:bt.default.join(Fg,t||""),__components:Rg,__cx:ef,__exports:bt.default.join(kg,t||""),__root:Zl,__ssg:Ag})},Tg=tf,Mg=tf.CXDir});var ys=y((Z2,cf)=>{"use strict";cf.exports=function(e,r){return function(){for(var i=new Array(arguments.length),s=0;s<i.length;s++)i[s]=arguments[s];return e.apply(r,i)}}});var _e=y((ew,ff)=>{"use strict";var jg=ys(),wt=Object.prototype.toString;function ws(t){return wt.call(t)==="[object Array]"}function vs(t){return typeof t>"u"}function Lg(t){return t!==null&&!vs(t)&&t.constructor!==null&&!vs(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function $g(t){return wt.call(t)==="[object ArrayBuffer]"}function Bg(t){return typeof FormData<"u"&&t instanceof FormData}function Ug(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function Xg(t){return typeof t=="string"}function Gg(t){return typeof t=="number"}function uf(t){return t!==null&&typeof t=="object"}function xn(t){if(wt.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function Hg(t){return wt.call(t)==="[object Date]"}function Jg(t){return wt.call(t)==="[object File]"}function zg(t){return wt.call(t)==="[object Blob]"}function lf(t){return wt.call(t)==="[object Function]"}function Wg(t){return uf(t)&&lf(t.pipe)}function Vg(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}function Yg(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Kg(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function _s(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),ws(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 bs(){var t={};function e(i,s){xn(t[s])&&xn(i)?t[s]=bs(t[s],i):xn(i)?t[s]=bs({},i):ws(i)?t[s]=i.slice():t[s]=i}for(var r=0,n=arguments.length;r<n;r++)_s(arguments[r],e);return t}function Qg(t,e,r){return _s(e,function(i,s){r&&typeof i=="function"?t[s]=jg(i,r):t[s]=i}),t}function Zg(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}ff.exports={isArray:ws,isArrayBuffer:$g,isBuffer:Lg,isFormData:Bg,isArrayBufferView:Ug,isString:Xg,isNumber:Gg,isObject:uf,isPlainObject:xn,isUndefined:vs,isDate:Hg,isFile:Jg,isBlob:zg,isFunction:lf,isStream:Wg,isURLSearchParams:Vg,isStandardBrowserEnv:Kg,forEach:_s,merge:bs,extend:Qg,trim:Yg,stripBOM:Zg}});var En=y((tw,hf)=>{"use strict";var Jt=_e();function df(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}hf.exports=function(e,r,n){if(!r)return e;var i;if(n)i=n(r);else if(Jt.isURLSearchParams(r))i=r.toString();else{var s=[];Jt.forEach(r,function(c,d){c===null||typeof c>"u"||(Jt.isArray(c)?d=d+"[]":c=[c],Jt.forEach(c,function(p){Jt.isDate(p)?p=p.toISOString():Jt.isObject(p)&&(p=JSON.stringify(p)),s.push(df(d)+"="+df(p))}))}),i=s.join("&")}if(i){var o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}});var mf=y((rw,pf)=>{"use strict";var ey=_e();function Cn(){this.handlers=[]}Cn.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};Cn.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};Cn.prototype.forEach=function(e){ey.forEach(this.handlers,function(n){n!==null&&e(n)})};pf.exports=Cn});var yf=y((nw,gf)=>{"use strict";var ty=_e();gf.exports=function(e,r){ty.forEach(e,function(i,s){s!==r&&s.toUpperCase()===r.toUpperCase()&&(e[r]=i,delete e[s])})}});var Pn=y((iw,vf)=>{"use strict";vf.exports=function(e,r,n,i,s){return e.config=r,n&&(e.code=n),e.request=i,e.response=s,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 Dn=y((sw,bf)=>{"use strict";var ry=Pn();bf.exports=function(e,r,n,i,s){var o=new Error(e);return ry(o,r,n,i,s)}});var Ss=y((ow,wf)=>{"use strict";var ny=Dn();wf.exports=function(e,r,n){var i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):r(ny("Request failed with status code "+n.status,n.config,null,n.request,n))}});var Sf=y((aw,_f)=>{"use strict";var On=_e();_f.exports=On.isStandardBrowserEnv()?function(){return{write:function(r,n,i,s,o,a){var c=[];c.push(r+"="+encodeURIComponent(n)),On.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),On.isString(s)&&c.push("path="+s),On.isString(o)&&c.push("domain="+o),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 Ef=y((cw,xf)=>{"use strict";xf.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}});var Pf=y((uw,Cf)=>{"use strict";Cf.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}});var xs=y((lw,Df)=>{"use strict";var iy=Ef(),sy=Pf();Df.exports=function(e,r){return e&&!iy(r)?sy(e,r):r}});var If=y((fw,Of)=>{"use strict";var Es=_e(),oy=["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"];Of.exports=function(e){var r={},n,i,s;return e&&Es.forEach(e.split(`
17
- `),function(a){if(s=a.indexOf(":"),n=Es.trim(a.substr(0,s)).toLowerCase(),i=Es.trim(a.substr(s+1)),n){if(r[n]&&oy.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 Rf=y((dw,Ff)=>{"use strict";var Af=_e();Ff.exports=Af.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function i(s){var o=s;return e&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{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(o){var a=Af.isString(o)?i(o):o;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}()});var Tf=y((hw,kf)=>{"use strict";var In=_e(),ay=Ss(),cy=Sf(),uy=En(),ly=xs(),fy=If(),dy=Rf(),Cs=Dn();kf.exports=function(e){return new Promise(function(n,i){var s=e.data,o=e.headers,a=e.responseType;In.isFormData(s)&&delete o["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var d=e.auth.username||"",u=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(d+":"+u)}var p=ly(e.baseURL,e.url);c.open(e.method.toUpperCase(),uy(p,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function g(){if(c){var b="getAllResponseHeaders"in c?fy(c.getAllResponseHeaders()):null,S=!a||a==="text"||a==="json"?c.responseText:c.response,x={data:S,status:c.status,statusText:c.statusText,headers:b,config:e,request:c};ay(n,i,x),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(Cs("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){i(Cs("Network Error",e,null,c)),c=null},c.ontimeout=function(){var S="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(S=e.timeoutErrorMessage),i(Cs(S,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},In.isStandardBrowserEnv()){var m=(e.withCredentials||dy(p))&&e.xsrfCookieName?cy.read(e.xsrfCookieName):void 0;m&&(o[e.xsrfHeaderName]=m)}"setRequestHeader"in c&&In.forEach(o,function(S,x){typeof s>"u"&&x.toLowerCase()==="content-type"?delete o[x]:c.setRequestHeader(x,S)}),In.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(S){c&&(c.abort(),i(S),c=null)}),s||(s=null),c.send(s)})}});var qf=y((pw,Mf)=>{var zt=1e3,Wt=zt*60,Vt=Wt*60,_t=Vt*24,hy=_t*7,py=_t*365.25;Mf.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return my(t);if(r==="number"&&isFinite(t))return e.long?yy(t):gy(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function my(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*py;case"weeks":case"week":case"w":return r*hy;case"days":case"day":case"d":return r*_t;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Vt;case"minutes":case"minute":case"mins":case"min":case"m":return r*Wt;case"seconds":case"second":case"secs":case"sec":case"s":return r*zt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function gy(t){var e=Math.abs(t);return e>=_t?Math.round(t/_t)+"d":e>=Vt?Math.round(t/Vt)+"h":e>=Wt?Math.round(t/Wt)+"m":e>=zt?Math.round(t/zt)+"s":t+"ms"}function yy(t){var e=Math.abs(t);return e>=_t?An(t,e,_t,"day"):e>=Vt?An(t,e,Vt,"hour"):e>=Wt?An(t,e,Wt,"minute"):e>=zt?An(t,e,zt,"second"):t+" ms"}function An(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var Ps=y((mw,Nf)=>{function vy(t){r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=i,r.enabled=o,r.humanize=qf(),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 S(...x){if(!S.enabled)return;let F=S,j=Number(new Date),L=j-(p||j);F.diff=L,F.prev=p,F.curr=j,p=j,x[0]=r.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let $=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(ne,Se)=>{if(ne==="%%")return"%";$++;let Y=r.formatters[Se];if(typeof Y=="function"){let D=x[$];ne=Y.call(F,D),x.splice($,1),$--}return ne}),r.formatArgs.call(F,x),(F.log||r.log).apply(F,x)}return S.namespace=u,S.useColors=r.useColors(),S.color=r.selectColor(u),S.extend=n,S.destroy=r.destroy,Object.defineProperty(S,"enabled",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(m!==r.namespaces&&(m=r.namespaces,b=r.enabled(u)),b),set:x=>{g=x}}),typeof r.init=="function"&&r.init(S),S}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 s(){let u=[...r.names.map(a),...r.skips.map(a).map(p=>"-"+p)].join(",");return r.enable(""),u}function o(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}Nf.exports=vy});var jf=y((Fe,Fn)=>{Fe.formatArgs=wy;Fe.save=_y;Fe.load=Sy;Fe.useColors=by;Fe.storage=xy();Fe.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`."))}})();Fe.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 by(){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 wy(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Fn.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)}Fe.log=console.debug||console.log||(()=>{});function _y(t){try{t?Fe.storage.setItem("debug",t):Fe.storage.removeItem("debug")}catch{}}function Sy(){let t;try{t=Fe.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function xy(){try{return localStorage}catch{}}Fn.exports=Ps()(Fe);var{formatters:Ey}=Fn.exports;Ey.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var $f=y((oe,kn)=>{var Cy=require("tty"),Rn=require("util");oe.init=Ry;oe.log=Iy;oe.formatArgs=Dy;oe.save=Ay;oe.load=Fy;oe.useColors=Py;oe.destroy=Rn.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");oe.colors=[6,2,3,4,5,1];try{let t=Ni();t&&(t.stderr||t).level>=2&&(oe.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{}oe.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,s)=>s.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 Py(){return"colors"in oe.inspectOpts?!!oe.inspectOpts.colors:Cy.isatty(process.stderr.fd)}function Dy(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${i};1m${e} \x1B[0m`;t[0]=s+t[0].split(`
12
+ `,i)}while(n!==-1);return s+=t.substr(i),s};zu.exports={stringReplaceAll:Ym,stringEncaseCRLFWithFirstIndex:Km}});var Zu=y((P2,Qu)=>{"use strict";var Qm=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Vu=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Zm=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,eg=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,tg=new Map([["n",`
13
+ `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Ku(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)):tg.get(t)||t}function rg(t,e){let r=[],n=e.trim().split(/\s*,\s*/g),i;for(let s of n){let o=Number(s);if(!Number.isNaN(o))r.push(o);else if(i=s.match(Zm))r.push(i[2].replace(eg,(a,c,f)=>c?Ku(c):f));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${t}')`)}return r}function ng(t){Vu.lastIndex=0;let e=[],r;for(;(r=Vu.exec(t))!==null;){let n=r[1];if(r[2]){let i=rg(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function Yu(t,e){let r={};for(let i of e)for(let s of i.styles)r[s[0]]=i.inverse?null:s.slice(1);let n=t;for(let[i,s]of Object.entries(r))if(Array.isArray(s)){if(!(i in n))throw new Error(`Unknown Chalk style: ${i}`);n=s.length>0?n[i](...s):n[i]}return n}Qu.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(Qm,(s,o,a,c,f,u)=>{if(o)i.push(Ku(o));else if(c){let p=i.join("");i=[],n.push(r.length===0?p:Yu(t,r)(p)),r.push({inverse:a,styles:ng(c)})}else if(f){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(Yu(t,r)(i.join(""))),i=[],r.pop()}else i.push(u)}),n.push(i.join("")),r.length>0){let s=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(s)}return n.join("")}});var ol=y((D2,sl)=>{"use strict";var gr=Uu(),{stdout:Ui,stderr:Xi}=$i(),{stringReplaceAll:ig,stringEncaseCRLFWithFirstIndex:sg}=Wu(),{isArray:dn}=Array,tl=["ansi","ansi","ansi256","ansi16m"],Ut=Object.create(null),og=(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=Ui?Ui.level:0;t.level=e.level===void 0?r:e.level},Gi=class{constructor(e){return rl(e)}},rl=t=>{let e={};return og(e,t),e.template=(...r)=>il(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=Gi,e.template};function pn(t){return rl(t)}for(let[t,e]of Object.entries(gr))Ut[t]={get(){let r=mn(this,Hi(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Ut.visible={get(){let t=mn(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var nl=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of nl)Ut[t]={get(){let{level:e}=this;return function(...r){let n=Hi(gr.color[tl[e]][t](...r),gr.color.close,this._styler);return mn(this,n,this._isEmpty)}}};for(let t of nl){let e="bg"+t[0].toUpperCase()+t.slice(1);Ut[e]={get(){let{level:r}=this;return function(...n){let i=Hi(gr.bgColor[tl[r]][t](...n),gr.bgColor.close,this._styler);return mn(this,i,this._isEmpty)}}}}var ag=Object.defineProperties(()=>{},{...Ut,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),Hi=(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}},mn=(t,e,r)=>{let n=(...i)=>dn(i[0])&&dn(i[0].raw)?el(n,il(n,...i)):el(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,ag),n._generator=t,n._styler=e,n._isEmpty=r,n},el=(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=ig(e,r.close,r.open),r=r.parent;let s=e.indexOf(`
14
+ `);return s!==-1&&(e=sg(e,i,n,s)),n+e+i},Bi,il=(t,...e)=>{let[r]=e;if(!dn(r)||!dn(r.raw))return e.join(" ");let n=e.slice(1),i=[r.raw[0]];for(let s=1;s<r.length;s++)i.push(String(n[s-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[s]));return Bi===void 0&&(Bi=Zu()),Bi(t,i.join(""))};Object.defineProperties(pn.prototype,Ut);var gn=pn();gn.supportsColor=Ui;gn.stderr=pn({level:Xi?Xi.level:0});gn.stderr.supportsColor=Xi;sl.exports=gn});var al=y((Ji,zi)=>{(function(t,e){typeof Ji=="object"&&typeof zi<"u"?zi.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.tinycolor=e())})(Ji,function(){"use strict";function t(l){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},t(l)}var e=/^\s+/,r=/\s+$/;function n(l,d){if(l=l||"",d=d||{},l instanceof n)return l;if(!(this instanceof n))return new n(l,d);var h=i(l);this._originalInput=l,this._r=h.r,this._g=h.g,this._b=h.b,this._a=h.a,this._roundA=Math.round(100*this._a)/100,this._format=d.format||h.format,this._gradientType=d.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=h.ok}n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var d=this.toRgb();return(d.r*299+d.g*587+d.b*114)/1e3},getLuminance:function(){var d=this.toRgb(),h,v,S,w,N,L;return h=d.r/255,v=d.g/255,S=d.b/255,h<=.03928?w=h/12.92:w=Math.pow((h+.055)/1.055,2.4),v<=.03928?N=v/12.92:N=Math.pow((v+.055)/1.055,2.4),S<=.03928?L=S/12.92:L=Math.pow((S+.055)/1.055,2.4),.2126*w+.7152*N+.0722*L},setAlpha:function(d){return this._a=H(d),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var d=c(this._r,this._g,this._b);return{h:d.h*360,s:d.s,v:d.v,a:this._a}},toHsvString:function(){var d=c(this._r,this._g,this._b),h=Math.round(d.h*360),v=Math.round(d.s*100),S=Math.round(d.v*100);return this._a==1?"hsv("+h+", "+v+"%, "+S+"%)":"hsva("+h+", "+v+"%, "+S+"%, "+this._roundA+")"},toHsl:function(){var d=o(this._r,this._g,this._b);return{h:d.h*360,s:d.s,l:d.l,a:this._a}},toHslString:function(){var d=o(this._r,this._g,this._b),h=Math.round(d.h*360),v=Math.round(d.s*100),S=Math.round(d.l*100);return this._a==1?"hsl("+h+", "+v+"%, "+S+"%)":"hsla("+h+", "+v+"%, "+S+"%, "+this._roundA+")"},toHex:function(d){return u(this._r,this._g,this._b,d)},toHexString:function(d){return"#"+this.toHex(d)},toHex8:function(d){return p(this._r,this._g,this._b,this._a,d)},toHex8String:function(d){return"#"+this.toHex8(d)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(I(this._r,255)*100)+"%",g:Math.round(I(this._g,255)*100)+"%",b:Math.round(I(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(I(this._r,255)*100)+"%, "+Math.round(I(this._g,255)*100)+"%, "+Math.round(I(this._b,255)*100)+"%)":"rgba("+Math.round(I(this._r,255)*100)+"%, "+Math.round(I(this._g,255)*100)+"%, "+Math.round(I(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:j[u(this._r,this._g,this._b,!0)]||!1},toFilter:function(d){var h="#"+g(this._r,this._g,this._b,this._a),v=h,S=this._gradientType?"GradientType = 1, ":"";if(d){var w=n(d);v="#"+g(w._r,w._g,w._b,w._a)}return"progid:DXImageTransform.Microsoft.gradient("+S+"startColorstr="+h+",endColorstr="+v+")"},toString:function(d){var h=!!d;d=d||this._format;var v=!1,S=this._a<1&&this._a>=0,w=!h&&S&&(d==="hex"||d==="hex6"||d==="hex3"||d==="hex4"||d==="hex8"||d==="name");return w?d==="name"&&this._a===0?this.toName():this.toRgbString():(d==="rgb"&&(v=this.toRgbString()),d==="prgb"&&(v=this.toPercentageRgbString()),(d==="hex"||d==="hex6")&&(v=this.toHexString()),d==="hex3"&&(v=this.toHexString(!0)),d==="hex4"&&(v=this.toHex8String(!0)),d==="hex8"&&(v=this.toHex8String()),d==="name"&&(v=this.toName()),d==="hsl"&&(v=this.toHslString()),d==="hsv"&&(v=this.toHsvString()),v||this.toHexString())},clone:function(){return n(this.toString())},_applyModification:function(d,h){var v=d.apply(null,[this].concat([].slice.call(h)));return this._r=v._r,this._g=v._g,this._b=v._b,this.setAlpha(v._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(A,arguments)},darken:function(){return this._applyModification($,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(_,arguments)},spin:function(){return this._applyModification(U,arguments)},_applyCombination:function(d,h){return d.apply(null,[this].concat([].slice.call(h)))},analogous:function(){return this._applyCombination(ge,arguments)},complement:function(){return this._applyCombination(q,arguments)},monochromatic:function(){return this._applyCombination(Y,arguments)},splitcomplement:function(){return this._applyCombination(ce,arguments)},triad:function(){return this._applyCombination(W,[3])},tetrad:function(){return this._applyCombination(W,[4])}},n.fromRatio=function(l,d){if(t(l)=="object"){var h={};for(var v in l)l.hasOwnProperty(v)&&(v==="a"?h[v]=l[v]:h[v]=R(l[v]));l=h}return n(l,d)};function i(l){var d={r:0,g:0,b:0},h=1,v=null,S=null,w=null,N=!1,L=!1;return typeof l=="string"&&(l=rt(l)),t(l)=="object"&&(ye(l.r)&&ye(l.g)&&ye(l.b)?(d=s(l.r,l.g,l.b),N=!0,L=String(l.r).substr(-1)==="%"?"prgb":"rgb"):ye(l.h)&&ye(l.s)&&ye(l.v)?(v=R(l.s),S=R(l.v),d=f(l.h,v,S),N=!0,L="hsv"):ye(l.h)&&ye(l.s)&&ye(l.l)&&(v=R(l.s),w=R(l.l),d=a(l.h,v,w),N=!0,L="hsl"),l.hasOwnProperty("a")&&(h=l.a)),h=H(h),{ok:N,format:l.format||L,r:Math.min(255,Math.max(d.r,0)),g:Math.min(255,Math.max(d.g,0)),b:Math.min(255,Math.max(d.b,0)),a:h}}function s(l,d,h){return{r:I(l,255)*255,g:I(d,255)*255,b:I(h,255)*255}}function o(l,d,h){l=I(l,255),d=I(d,255),h=I(h,255);var v=Math.max(l,d,h),S=Math.min(l,d,h),w,N,L=(v+S)/2;if(v==S)w=N=0;else{var J=v-S;switch(N=L>.5?J/(2-v-S):J/(v+S),v){case l:w=(d-h)/J+(d<h?6:0);break;case d:w=(h-l)/J+2;break;case h:w=(l-d)/J+4;break}w/=6}return{h:w,s:N,l:L}}function a(l,d,h){var v,S,w;l=I(l,360),d=I(d,100),h=I(h,100);function N(le,nt,Ae){return Ae<0&&(Ae+=1),Ae>1&&(Ae-=1),Ae<1/6?le+(nt-le)*6*Ae:Ae<1/2?nt:Ae<2/3?le+(nt-le)*(2/3-Ae)*6:le}if(d===0)v=S=w=h;else{var L=h<.5?h*(1+d):h+d-h*d,J=2*h-L;v=N(J,L,l+1/3),S=N(J,L,l),w=N(J,L,l-1/3)}return{r:v*255,g:S*255,b:w*255}}function c(l,d,h){l=I(l,255),d=I(d,255),h=I(h,255);var v=Math.max(l,d,h),S=Math.min(l,d,h),w,N,L=v,J=v-S;if(N=v===0?0:J/v,v==S)w=0;else{switch(v){case l:w=(d-h)/J+(d<h?6:0);break;case d:w=(h-l)/J+2;break;case h:w=(l-d)/J+4;break}w/=6}return{h:w,s:N,v:L}}function f(l,d,h){l=I(l,360)*6,d=I(d,100),h=I(h,100);var v=Math.floor(l),S=l-v,w=h*(1-d),N=h*(1-S*d),L=h*(1-(1-S)*d),J=v%6,le=[h,N,w,w,L,h][J],nt=[L,h,h,N,w,w][J],Ae=[w,w,L,h,h,N][J];return{r:le*255,g:nt*255,b:Ae*255}}function u(l,d,h,v){var S=[P(Math.round(l).toString(16)),P(Math.round(d).toString(16)),P(Math.round(h).toString(16))];return v&&S[0].charAt(0)==S[0].charAt(1)&&S[1].charAt(0)==S[1].charAt(1)&&S[2].charAt(0)==S[2].charAt(1)?S[0].charAt(0)+S[1].charAt(0)+S[2].charAt(0):S.join("")}function p(l,d,h,v,S){var w=[P(Math.round(l).toString(16)),P(Math.round(d).toString(16)),P(Math.round(h).toString(16)),P(Be(v))];return S&&w[0].charAt(0)==w[0].charAt(1)&&w[1].charAt(0)==w[1].charAt(1)&&w[2].charAt(0)==w[2].charAt(1)&&w[3].charAt(0)==w[3].charAt(1)?w[0].charAt(0)+w[1].charAt(0)+w[2].charAt(0)+w[3].charAt(0):w.join("")}function g(l,d,h,v){var S=[P(Be(v)),P(Math.round(l).toString(16)),P(Math.round(d).toString(16)),P(Math.round(h).toString(16))];return S.join("")}n.equals=function(l,d){return!l||!d?!1:n(l).toRgbString()==n(d).toRgbString()},n.random=function(){return n.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function m(l,d){d=d===0?0:d||10;var h=n(l).toHsl();return h.s-=d/100,h.s=X(h.s),n(h)}function b(l,d){d=d===0?0:d||10;var h=n(l).toHsl();return h.s+=d/100,h.s=X(h.s),n(h)}function _(l){return n(l).desaturate(100)}function x(l,d){d=d===0?0:d||10;var h=n(l).toHsl();return h.l+=d/100,h.l=X(h.l),n(h)}function A(l,d){d=d===0?0:d||10;var h=n(l).toRgb();return h.r=Math.max(0,Math.min(255,h.r-Math.round(255*-(d/100)))),h.g=Math.max(0,Math.min(255,h.g-Math.round(255*-(d/100)))),h.b=Math.max(0,Math.min(255,h.b-Math.round(255*-(d/100)))),n(h)}function $(l,d){d=d===0?0:d||10;var h=n(l).toHsl();return h.l-=d/100,h.l=X(h.l),n(h)}function U(l,d){var h=n(l).toHsl(),v=(h.h+d)%360;return h.h=v<0?360+v:v,n(h)}function q(l){var d=n(l).toHsl();return d.h=(d.h+180)%360,n(d)}function W(l,d){if(isNaN(d)||d<=0)throw new Error("Argument to polyad must be a positive number");for(var h=n(l).toHsl(),v=[n(l)],S=360/d,w=1;w<d;w++)v.push(n({h:(h.h+w*S)%360,s:h.s,l:h.l}));return v}function ce(l){var d=n(l).toHsl(),h=d.h;return[n(l),n({h:(h+72)%360,s:d.s,l:d.l}),n({h:(h+216)%360,s:d.s,l:d.l})]}function ge(l,d,h){d=d||6,h=h||30;var v=n(l).toHsl(),S=360/h,w=[n(l)];for(v.h=(v.h-(S*d>>1)+720)%360;--d;)v.h=(v.h+S)%360,w.push(n(v));return w}function Y(l,d){d=d||6;for(var h=n(l).toHsv(),v=h.h,S=h.s,w=h.v,N=[],L=1/d;d--;)N.push(n({h:v,s:S,v:w})),w=(w+L)%1;return N}n.mix=function(l,d,h){h=h===0?0:h||50;var v=n(l).toRgb(),S=n(d).toRgb(),w=h/100,N={r:(S.r-v.r)*w+v.r,g:(S.g-v.g)*w+v.g,b:(S.b-v.b)*w+v.b,a:(S.a-v.a)*w+v.a};return n(N)},n.readability=function(l,d){var h=n(l),v=n(d);return(Math.max(h.getLuminance(),v.getLuminance())+.05)/(Math.min(h.getLuminance(),v.getLuminance())+.05)},n.isReadable=function(l,d,h){var v=n.readability(l,d),S,w;switch(w=!1,S=ue(h),S.level+S.size){case"AAsmall":case"AAAlarge":w=v>=4.5;break;case"AAlarge":w=v>=3;break;case"AAAsmall":w=v>=7;break}return w},n.mostReadable=function(l,d,h){var v=null,S=0,w,N,L,J;h=h||{},N=h.includeFallbackColors,L=h.level,J=h.size;for(var le=0;le<d.length;le++)w=n.readability(l,d[le]),w>S&&(S=w,v=n(d[le]));return n.isReadable(l,v,{level:L,size:J})||!N?v:(h.includeFallbackColors=!1,n.mostReadable(l,["#fff","#000"],h))};var D=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"},j=n.hexNames=T(D);function T(l){var d={};for(var h in l)l.hasOwnProperty(h)&&(d[l[h]]=h);return d}function H(l){return l=parseFloat(l),(isNaN(l)||l<0||l>1)&&(l=1),l}function I(l,d){B(l)&&(l="100%");var h=M(l);return l=Math.min(d,Math.max(0,parseFloat(l))),h&&(l=parseInt(l*d,10)/100),Math.abs(l-d)<1e-6?1:l%d/parseFloat(d)}function X(l){return Math.min(1,Math.max(0,l))}function O(l){return parseInt(l,16)}function B(l){return typeof l=="string"&&l.indexOf(".")!=-1&&parseFloat(l)===1}function M(l){return typeof l=="string"&&l.indexOf("%")!=-1}function P(l){return l.length==1?"0"+l:""+l}function R(l){return l<=1&&(l=l*100+"%"),l}function Be(l){return Math.round(parseFloat(l)*255).toString(16)}function Ve(l){return O(l)/255}var ne=function(){var l="[-\\+]?\\d+%?",d="[-\\+]?\\d*\\.\\d+%?",h="(?:"+d+")|(?:"+l+")",v="[\\s|\\(]+("+h+")[,|\\s]+("+h+")[,|\\s]+("+h+")\\s*\\)?",S="[\\s|\\(]+("+h+")[,|\\s]+("+h+")[,|\\s]+("+h+")[,|\\s]+("+h+")\\s*\\)?";return{CSS_UNIT:new RegExp(h),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 ye(l){return!!ne.CSS_UNIT.exec(l)}function rt(l){l=l.replace(e,"").replace(r,"").toLowerCase();var d=!1;if(D[l])l=D[l],d=!0;else if(l=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var h;return(h=ne.rgb.exec(l))?{r:h[1],g:h[2],b:h[3]}:(h=ne.rgba.exec(l))?{r:h[1],g:h[2],b:h[3],a:h[4]}:(h=ne.hsl.exec(l))?{h:h[1],s:h[2],l:h[3]}:(h=ne.hsla.exec(l))?{h:h[1],s:h[2],l:h[3],a:h[4]}:(h=ne.hsv.exec(l))?{h:h[1],s:h[2],v:h[3]}:(h=ne.hsva.exec(l))?{h:h[1],s:h[2],v:h[3],a:h[4]}:(h=ne.hex8.exec(l))?{r:O(h[1]),g:O(h[2]),b:O(h[3]),a:Ve(h[4]),format:d?"name":"hex8"}:(h=ne.hex6.exec(l))?{r:O(h[1]),g:O(h[2]),b:O(h[3]),format:d?"name":"hex"}:(h=ne.hex4.exec(l))?{r:O(h[1]+""+h[1]),g:O(h[2]+""+h[2]),b:O(h[3]+""+h[3]),a:Ve(h[4]+""+h[4]),format:d?"name":"hex8"}:(h=ne.hex3.exec(l))?{r:O(h[1]+""+h[1]),g:O(h[2]+""+h[2]),b:O(h[3]+""+h[3]),format:d?"name":"hex"}:!1}function ue(l){var d,h;return l=l||{level:"AA",size:"small"},d=(l.level||"AA").toUpperCase(),h=(l.size||"small").toLowerCase(),d!=="AA"&&d!=="AAA"&&(d="AA"),h!=="small"&&h!=="large"&&(h="small"),{level:d,size:h}}return n})});var pl=y((O2,dl)=>{var yr=al(),fl={r:256,g:256,b:256,a:1},hl={h:360,s:1,v:1,a:1};function Vi(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 Yi(t,e,r,n){let i={};for(let s in e)e.hasOwnProperty(s)&&(i[s]=t[s]*r+e[s],i[s]=i[s]<0?i[s]+n[s]:n[s]!==1?i[s]%n[s]:i[s]);return i}function Wi(t,e,r){let n=t.color.toRgb(),i=e.color.toRgb(),s=Vi(n,i,r),o=[t.color];for(let a=1;a<r;a++){let c=Yi(s,n,a,fl);o.push(yr(c))}return o}function cl(t,e,r,n){let i=t.color.toHsv(),s=e.color.toHsv();if(i.s===0||s.s===0)return Wi(t,e,r);let o;if(typeof n=="boolean")o=n;else{let u=i.h<s.h&&s.h-i.h<180||i.h>s.h&&i.h-s.h>180;o=n==="long"&&u||n==="short"&&!u}let a=Vi(i,s,r),c=[t.color],f;i.h<=s.h&&!o||i.h>=s.h&&o?f=s.h-i.h:o?f=360-s.h+i.h:f=360-i.h+s.h,a.h=Math.pow(-1,o?1:0)*Math.abs(f)/r;for(let u=1;u<r;u++){let p=Yi(a,i,u,hl);c.push(yr(p))}return c}function ul(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 s=1;s<r;s++){let o=(e-1)*(t[s].pos-t[s-1].pos);n.push(Math.max(1,Math.round(o)))}let i=1;for(let s=r-1;s--;)i+=n[s];for(;i!==e;)if(i<e){let s=Math.min.apply(null,n);n[n.indexOf(s)]++,i++}else{let s=Math.max.apply(null,n);n[n.indexOf(s)]--,i--}return n}function ll(t,e,r,n){if(e<0||e>1)throw new Error("Position must be between 0 and 1");let i,s;for(let c=0,f=t.length;c<f-1;c++)if(e>=t[c].pos&&e<t[c+1].pos){i=t[c],s=t[c+1];break}i||(i=s=t[t.length-1]);let o=Vi(i.color[r](),s.color[r](),(s.pos-i.pos)*100),a=Yi(o,i.color[r](),(e-i.pos)*100,n);return yr(a)}var Xt=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,s=!1;this.stops=e.map((o,a)=>{let c=o.pos!==void 0;if(r^c)throw new Error("Cannot mix positionned and not posionned color stops");if(c){let f=o.color!==void 0;if(!f&&(s||a===0||a===n-1))throw new Error("Cannot define two consecutive position-only stops");if(s=!f,o={color:f?yr(o.color):null,colorLess:!f,pos:o.pos},o.pos<0||o.pos>1)throw new Error("Color stops positions must be between 0 and 1");if(o.pos<i)throw new Error("Color stops positions are not ordered");i=o.pos}else o={color:yr(o.color!==void 0?o.color:o),pos:a/(n-1)};return o}),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 Xt(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 Xt(e.concat(r.reverse()))}rgb(e){let r=ul(this.stops,e),n=[];this.stops.forEach((i,s)=>{i.colorLess&&(i.color=Wi(this.stops[s-1],this.stops[s+1],2)[1])});for(let i=0,s=this.stops.length;i<s-1;i++){let o=Wi(this.stops[i],this.stops[i+1],r[i]);n.splice(n.length,0,...o)}return n.push(this.stops[this.stops.length-1].color),n}hsv(e,r){let n=ul(this.stops,e),i=[];this.stops.forEach((s,o)=>{s.colorLess&&(s.color=cl(this.stops[o-1],this.stops[o+1],2,r)[1])});for(let s=0,o=this.stops.length;s<o-1;s++){let a=cl(this.stops[s],this.stops[s+1],n[s],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 ll(this.stops,e,"toRgb",fl)}hsvAt(e){return ll(this.stops,e,"toHsv",hl)}};dl.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 Xt(t)}});var bl=y((I2,yn)=>{"use strict";var gl=ol(),cg=pl(),ml=/\s/g;function Ki(...t){let e=cg.apply(this,t),r=(n,i)=>ug(n?n.toString():"",e,i);return r.multiline=(n,i)=>lg(n?n.toString():"",e,i),r}var yl=(t,e,r)=>e.interpolation.toLowerCase()==="hsv"?t.hsv(r,e.hsvSpin.toLowerCase()):t.rgb(r);function ug(t,e,r){let n=vl(r),i=Math.max(t.replace(ml,"").length,e.stops.length),s=yl(e,n,i),o="";for(let a of t)o+=a.match(ml)?a:gl.hex(s.shift().toHex())(a);return o}function lg(t,e,r){let n=vl(r),i=t.split(`
15
+ `),s=Math.max.apply(null,i.map(c=>c.length).concat([e.stops.length])),o=yl(e,n,s),a=[];for(let c of i){let f=o.slice(0),u="";for(let p of c)u+=gl.hex(f.shift().toHex())(p);a.push(u)}return a.join(`
16
+ `)}function vl(t){let e={interpolation:"rgb",hsvSpin:"short",...t};if(t!==void 0&&typeof t!="object")throw new TypeError(`Expected \`options\` to be an \`object\`, got \`${typeof t}\``);if(typeof e.interpolation!="string")throw new TypeError(`Expected \`options.interpolation\` to be a \`string\`, got \`${typeof e.interpolation}\``);if(e.interpolation.toLowerCase()==="hsv"&&typeof e.hsvSpin!="string")throw new TypeError(`Expected \`options.hsvSpin\` to be a \`string\`, got \`${typeof e.hsvSpin}\``);return e}var vr={atlas:{colors:["#feac5e","#c779d0","#4bc0c8"],options:{}},cristal:{colors:["#bdfff3","#4ac29a"],options:{}},teen:{colors:["#77a1d3","#79cbca","#e684ae"],options:{}},mind:{colors:["#473b7b","#3584a7","#30d2be"],options:{}},morning:{colors:["#ff5f6d","#ffc371"],options:{interpolation:"hsv"}},vice:{colors:["#5ee7df","#b490ca"],options:{interpolation:"hsv"}},passion:{colors:["#f43b47","#453a94"],options:{}},fruit:{colors:["#ff4e50","#f9d423"],options:{}},instagram:{colors:["#833ab4","#fd1d1d","#fcb045"],options:{}},retro:{colors:["#3f51b1","#5a55ae","#7b5fac","#8f6aae","#a86aa4","#cc6b8e","#f18271","#f3a469","#f7c978"],options:{}},summer:{colors:["#fdbb2d","#22c1c3"],options:{}},rainbow:{colors:["#ff0000","#ff0100"],options:{interpolation:"hsv",hsvSpin:"long"}},pastel:{colors:["#74ebd5","#74ecd5"],options:{interpolation:"hsv",hsvSpin:"long"}}};yn.exports=Ki;for(let t in vr)yn.exports[t]=e=>new Ki(vr[t].colors)(e,vr[t].options),yn.exports[t].multiline=e=>new Ki(vr[t].colors).multiline(e,vr[t].options)});var _l=y((A2,wl)=>{var Qi=class{constructor(e){this.value=e,this.next=void 0}},Zi=class{constructor(){this.clear()}enqueue(e){let r=new Qi(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}};wl.exports=Zi});var es=y((F2,Sl)=>{"use strict";var fg=_l(),hg=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 fg,r=0,n=()=>{r--,e.size>0&&e.dequeue()()},i=async(a,c,...f)=>{r++;let u=(async()=>a(...f))();c(u);try{await u}catch{}n()},s=(a,c,...f)=>{e.enqueue(i.bind(null,a,c,...f)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},o=(a,...c)=>new Promise(f=>{s(a,f,...c)});return Object.defineProperties(o,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),o};Sl.exports=hg});var Cl=y((R2,El)=>{"use strict";var xl=es(),vn=class extends Error{constructor(e){super(),this.value=e}},dg=async(t,e)=>e(await t),pg=async t=>{let e=await Promise.all(t);if(e[1]===!0)throw new vn(e[0]);return!1},mg=async(t,e,r)=>{r={concurrency:1/0,preserveOrder:!0,...r};let n=xl(r.concurrency),i=[...t].map(o=>[o,n(dg,o,e)]),s=xl(r.preserveOrder?1:1/0);try{await Promise.all(i.map(o=>s(pg,o)))}catch(o){if(o instanceof vn)return o.value;throw o}};El.exports=mg});var Fl=y((k2,ts)=>{"use strict";var Pl=require("path"),bn=require("fs"),{promisify:Dl}=require("util"),gg=Cl(),yg=Dl(bn.stat),vg=Dl(bn.lstat),Ol={directory:"isDirectory",file:"isFile"};function Il({type:t}){if(!(t in Ol))throw new Error(`Invalid type specified: ${t}`)}var Al=(t,e)=>t===void 0||e[Ol[t]]();ts.exports=async(t,e)=>{e={cwd:process.cwd(),type:"file",allowSymlinks:!0,...e},Il(e);let r=e.allowSymlinks?yg:vg;return gg(t,async n=>{try{let i=await r(Pl.resolve(e.cwd,n));return Al(e.type,i)}catch{return!1}},e)};ts.exports.sync=(t,e)=>{e={cwd:process.cwd(),allowSymlinks:!0,type:"file",...e},Il(e);let r=e.allowSymlinks?bn.statSync:bn.lstatSync;for(let n of t)try{let i=r(Pl.resolve(e.cwd,n));if(Al(e.type,i))return n}catch{}}});var kl=y((T2,rs)=>{"use strict";var Rl=require("fs"),{promisify:bg}=require("util"),wg=bg(Rl.access);rs.exports=async t=>{try{return await wg(t),!0}catch{return!1}};rs.exports.sync=t=>{try{return Rl.accessSync(t),!0}catch{return!1}}});var is=y((M2,Gt)=>{"use strict";var ft=require("path"),wn=Fl(),Tl=kl(),ns=Symbol("findUp.stop");Gt.exports=async(t,e={})=>{let r=ft.resolve(e.cwd||""),{root:n}=ft.parse(r),i=[].concat(t),s=async o=>{if(typeof t!="function")return wn(i,o);let a=await t(o.cwd);return typeof a=="string"?wn([a],o):a};for(;;){let o=await s({...e,cwd:r});if(o===ns)return;if(o)return ft.resolve(r,o);if(r===n)return;r=ft.dirname(r)}};Gt.exports.sync=(t,e={})=>{let r=ft.resolve(e.cwd||""),{root:n}=ft.parse(r),i=[].concat(t),s=o=>{if(typeof t!="function")return wn.sync(i,o);let a=t(o.cwd);return typeof a=="string"?wn.sync([a],o):a};for(;;){let o=s({...e,cwd:r});if(o===ns)return;if(o)return ft.resolve(r,o);if(r===n)return;r=ft.dirname(r)}};Gt.exports.exists=Tl;Gt.exports.sync.exists=Tl.sync;Gt.exports.stop=ns});var _n=y((q2,ss)=>{"use strict";var Ml=require("path"),ql=is(),_g=async t=>{let e=await ql("package.json",{cwd:t});return e&&Ml.dirname(e)};ss.exports=_g;ss.exports.sync=t=>{let e=ql.sync("package.json",{cwd:t});return e&&Ml.dirname(e)}});function zt(t=""){return Dg?gs.default.resolve(vs.default.sync(__dirname),"../../../",t):gs.default.resolve(vs.default.sync(__dirname),"../griddo-components",t)}function Og(){let t=ys.default.sync("jsconfig.json",{cwd:zt()});return ys.default.sync("tsconfig.json",{cwd:zt()})||t}function Ig(){let t=require(Og());return Object.keys(t?.compilerOptions?.paths).reduce((e,r)=>{let[n]=r.split("/"),[i]=t&&t.compilerOptions&&t.compilerOptions.paths&&t.compilerOptions.paths[r],[s]=i.split("/*"),o=zt(s);return{...e,[n]:o}},{"@griddo-instance":`${zt()}/src/index.js`})}var gs,ys,vs,Dg,W2,Zl=Ho(()=>{"use strict";gs=F(require("node:path")),ys=F(is()),vs=F(_n()),Dg=__dirname.includes("node_modules"),W2=Ig()});var nf={};Qd(nf,{CXDir:()=>Mg,default:()=>Tg});var wt,Pn,ef,tf,Ag,Fg,Rg,kg,rf,Tg,Mg,sf=Ho(()=>{"use strict";wt=F(require("node:path")),Pn=F(_n());Zl();ef=Pn.default.sync(wt.default.resolve(__dirname,"../..")),tf=Pn.default.sync(__dirname),Ag=wt.default.resolve(Pn.default.sync(__dirname)),Fg=wt.default.resolve(tf,"caches"),Rg=zt(),kg=wt.default.join(ef,"exports/sites"),rf={proDomain:"pro-",CXDir:{EXPORTS:"__exports",CACHE:"__caches",CX:"__cx",SSG:"__ssg",COMPONENTS:"__components",ROOT:"__root"},paths:t=>({__caches:wt.default.join(Fg,t||""),__components:Rg,__cx:tf,__exports:wt.default.join(kg,t||""),__root:ef,__ssg:Ag})},Tg=rf,Mg=rf.CXDir});var ws=y((tw,uf)=>{"use strict";uf.exports=function(e,r){return function(){for(var i=new Array(arguments.length),s=0;s<i.length;s++)i[s]=arguments[s];return e.apply(r,i)}}});var Se=y((rw,hf)=>{"use strict";var Lg=ws(),_t=Object.prototype.toString;function xs(t){return _t.call(t)==="[object Array]"}function _s(t){return typeof t>"u"}function $g(t){return t!==null&&!_s(t)&&t.constructor!==null&&!_s(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function Bg(t){return _t.call(t)==="[object ArrayBuffer]"}function Ug(t){return typeof FormData<"u"&&t instanceof FormData}function Xg(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function Gg(t){return typeof t=="string"}function Hg(t){return typeof t=="number"}function lf(t){return t!==null&&typeof t=="object"}function Dn(t){if(_t.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function Jg(t){return _t.call(t)==="[object Date]"}function zg(t){return _t.call(t)==="[object File]"}function Wg(t){return _t.call(t)==="[object Blob]"}function ff(t){return _t.call(t)==="[object Function]"}function Vg(t){return lf(t)&&ff(t.pipe)}function Yg(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}function Kg(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Qg(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Es(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),xs(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 Ss(){var t={};function e(i,s){Dn(t[s])&&Dn(i)?t[s]=Ss(t[s],i):Dn(i)?t[s]=Ss({},i):xs(i)?t[s]=i.slice():t[s]=i}for(var r=0,n=arguments.length;r<n;r++)Es(arguments[r],e);return t}function Zg(t,e,r){return Es(e,function(i,s){r&&typeof i=="function"?t[s]=Lg(i,r):t[s]=i}),t}function ey(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}hf.exports={isArray:xs,isArrayBuffer:Bg,isBuffer:$g,isFormData:Ug,isArrayBufferView:Xg,isString:Gg,isNumber:Hg,isObject:lf,isPlainObject:Dn,isUndefined:_s,isDate:Jg,isFile:zg,isBlob:Wg,isFunction:ff,isStream:Vg,isURLSearchParams:Yg,isStandardBrowserEnv:Qg,forEach:Es,merge:Ss,extend:Zg,trim:Kg,stripBOM:ey}});var On=y((nw,pf)=>{"use strict";var Wt=Se();function df(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}pf.exports=function(e,r,n){if(!r)return e;var i;if(n)i=n(r);else if(Wt.isURLSearchParams(r))i=r.toString();else{var s=[];Wt.forEach(r,function(c,f){c===null||typeof c>"u"||(Wt.isArray(c)?f=f+"[]":c=[c],Wt.forEach(c,function(p){Wt.isDate(p)?p=p.toISOString():Wt.isObject(p)&&(p=JSON.stringify(p)),s.push(df(f)+"="+df(p))}))}),i=s.join("&")}if(i){var o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}});var gf=y((iw,mf)=>{"use strict";var ty=Se();function In(){this.handlers=[]}In.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};In.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};In.prototype.forEach=function(e){ty.forEach(this.handlers,function(n){n!==null&&e(n)})};mf.exports=In});var vf=y((sw,yf)=>{"use strict";var ry=Se();yf.exports=function(e,r){ry.forEach(e,function(i,s){s!==r&&s.toUpperCase()===r.toUpperCase()&&(e[r]=i,delete e[s])})}});var An=y((ow,bf)=>{"use strict";bf.exports=function(e,r,n,i,s){return e.config=r,n&&(e.code=n),e.request=i,e.response=s,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 Fn=y((aw,wf)=>{"use strict";var ny=An();wf.exports=function(e,r,n,i,s){var o=new Error(e);return ny(o,r,n,i,s)}});var Cs=y((cw,_f)=>{"use strict";var iy=Fn();_f.exports=function(e,r,n){var i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):r(iy("Request failed with status code "+n.status,n.config,null,n.request,n))}});var xf=y((uw,Sf)=>{"use strict";var Rn=Se();Sf.exports=Rn.isStandardBrowserEnv()?function(){return{write:function(r,n,i,s,o,a){var c=[];c.push(r+"="+encodeURIComponent(n)),Rn.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),Rn.isString(s)&&c.push("path="+s),Rn.isString(o)&&c.push("domain="+o),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 Cf=y((lw,Ef)=>{"use strict";Ef.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}});var Df=y((fw,Pf)=>{"use strict";Pf.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}});var Ps=y((hw,Of)=>{"use strict";var sy=Cf(),oy=Df();Of.exports=function(e,r){return e&&!sy(r)?oy(e,r):r}});var Af=y((dw,If)=>{"use strict";var Ds=Se(),ay=["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"];If.exports=function(e){var r={},n,i,s;return e&&Ds.forEach(e.split(`
17
+ `),function(a){if(s=a.indexOf(":"),n=Ds.trim(a.substr(0,s)).toLowerCase(),i=Ds.trim(a.substr(s+1)),n){if(r[n]&&ay.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 kf=y((pw,Rf)=>{"use strict";var Ff=Se();Rf.exports=Ff.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function i(s){var o=s;return e&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{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(o){var a=Ff.isString(o)?i(o):o;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}()});var Mf=y((mw,Tf)=>{"use strict";var kn=Se(),cy=Cs(),uy=xf(),ly=On(),fy=Ps(),hy=Af(),dy=kf(),Os=Fn();Tf.exports=function(e){return new Promise(function(n,i){var s=e.data,o=e.headers,a=e.responseType;kn.isFormData(s)&&delete o["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var f=e.auth.username||"",u=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(f+":"+u)}var p=fy(e.baseURL,e.url);c.open(e.method.toUpperCase(),ly(p,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function g(){if(c){var b="getAllResponseHeaders"in c?hy(c.getAllResponseHeaders()):null,_=!a||a==="text"||a==="json"?c.responseText:c.response,x={data:_,status:c.status,statusText:c.statusText,headers:b,config:e,request:c};cy(n,i,x),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(Os("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){i(Os("Network Error",e,null,c)),c=null},c.ontimeout=function(){var _="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(_=e.timeoutErrorMessage),i(Os(_,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},kn.isStandardBrowserEnv()){var m=(e.withCredentials||dy(p))&&e.xsrfCookieName?uy.read(e.xsrfCookieName):void 0;m&&(o[e.xsrfHeaderName]=m)}"setRequestHeader"in c&&kn.forEach(o,function(_,x){typeof s>"u"&&x.toLowerCase()==="content-type"?delete o[x]:c.setRequestHeader(x,_)}),kn.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.abort(),i(_),c=null)}),s||(s=null),c.send(s)})}});var jf=y((gw,qf)=>{var Vt=1e3,Yt=Vt*60,Kt=Yt*60,St=Kt*24,py=St*7,my=St*365.25;qf.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return gy(t);if(r==="number"&&isFinite(t))return e.long?vy(t):yy(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function gy(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*my;case"weeks":case"week":case"w":return r*py;case"days":case"day":case"d":return r*St;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Kt;case"minutes":case"minute":case"mins":case"min":case"m":return r*Yt;case"seconds":case"second":case"secs":case"sec":case"s":return r*Vt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function yy(t){var e=Math.abs(t);return e>=St?Math.round(t/St)+"d":e>=Kt?Math.round(t/Kt)+"h":e>=Yt?Math.round(t/Yt)+"m":e>=Vt?Math.round(t/Vt)+"s":t+"ms"}function vy(t){var e=Math.abs(t);return e>=St?Tn(t,e,St,"day"):e>=Kt?Tn(t,e,Kt,"hour"):e>=Yt?Tn(t,e,Yt,"minute"):e>=Vt?Tn(t,e,Vt,"second"):t+" ms"}function Tn(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var Is=y((yw,Nf)=>{function by(t){r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=i,r.enabled=o,r.humanize=jf(),r.destroy=f,Object.keys(t).forEach(u=>{r[u]=t[u]}),r.names=[],r.skips=[],r.formatters={};function e(u){let p=0;for(let g=0;g<u.length;g++)p=(p<<5)-p+u.charCodeAt(g),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=e;function r(u){let p,g=null,m,b;function _(...x){if(!_.enabled)return;let A=_,$=Number(new Date),U=$-(p||$);A.diff=U,A.prev=p,A.curr=$,p=$,x[0]=r.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let q=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(ce,ge)=>{if(ce==="%%")return"%";q++;let Y=r.formatters[ge];if(typeof Y=="function"){let D=x[q];ce=Y.call(A,D),x.splice(q,1),q--}return ce}),r.formatArgs.call(A,x),(A.log||r.log).apply(A,x)}return _.namespace=u,_.useColors=r.useColors(),_.color=r.selectColor(u),_.extend=n,_.destroy=r.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(m!==r.namespaces&&(m=r.namespaces,b=r.enabled(u)),b),set:x=>{g=x}}),typeof r.init=="function"&&r.init(_),_}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 s(){let u=[...r.names.map(a),...r.skips.map(a).map(p=>"-"+p)].join(",");return r.enable(""),u}function o(u){if(u[u.length-1]==="*")return!0;let p,g;for(p=0,g=r.skips.length;p<g;p++)if(r.skips[p].test(u))return!1;for(p=0,g=r.names.length;p<g;p++)if(r.names[p].test(u))return!0;return!1}function a(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function c(u){return u instanceof Error?u.stack||u.message:u}function f(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Nf.exports=by});var Lf=y((Fe,Mn)=>{Fe.formatArgs=_y;Fe.save=Sy;Fe.load=xy;Fe.useColors=wy;Fe.storage=Ey();Fe.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`."))}})();Fe.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 wy(){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 _y(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Mn.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)}Fe.log=console.debug||console.log||(()=>{});function Sy(t){try{t?Fe.storage.setItem("debug",t):Fe.storage.removeItem("debug")}catch{}}function xy(){let t;try{t=Fe.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function Ey(){try{return localStorage}catch{}}Mn.exports=Is()(Fe);var{formatters:Cy}=Mn.exports;Cy.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Bf=y((se,jn)=>{var Py=require("tty"),qn=require("util");se.init=ky;se.log=Ay;se.formatArgs=Oy;se.save=Fy;se.load=Ry;se.useColors=Dy;se.destroy=qn.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");se.colors=[6,2,3,4,5,1];try{let t=$i();t&&(t.stderr||t).level>=2&&(se.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{}se.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,s)=>s.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 Dy(){return"colors"in se.inspectOpts?!!se.inspectOpts.colors:Py.isatty(process.stderr.fd)}function Oy(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${i};1m${e} \x1B[0m`;t[0]=s+t[0].split(`
18
18
  `).join(`
19
- `+s),t.push(i+"m+"+kn.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Oy()+e+" "+t[0]}function Oy(){return oe.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Iy(...t){return process.stderr.write(Rn.format(...t)+`
20
- `)}function Ay(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function Fy(){return process.env.DEBUG}function Ry(t){t.inspectOpts={};let e=Object.keys(oe.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=oe.inspectOpts[e[r]]}kn.exports=Ps()(oe);var{formatters:Lf}=kn.exports;Lf.o=function(t){return this.inspectOpts.colors=this.useColors,Rn.inspect(t,this.inspectOpts).split(`
21
- `).map(e=>e.trim()).join(" ")};Lf.O=function(t){return this.inspectOpts.colors=this.useColors,Rn.inspect(t,this.inspectOpts)}});var Bf=y((gw,Ds)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Ds.exports=jf():Ds.exports=$f()});var Xf=y((yw,Uf)=>{var vr;Uf.exports=function(){if(!vr){try{vr=Bf()("follow-redirects")}catch{}typeof vr!="function"&&(vr=function(){})}vr.apply(null,arguments)}});var ks=y((vw,Rs)=>{var St=require("url"),Os=St.URL,ky=require("http"),Ty=require("https"),Jf=require("stream").Writable,zf=require("assert"),Wf=Xf(),As=["abort","aborted","connect","error","socket","timeout"],Fs=Object.create(null);As.forEach(function(t){Fs[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}});var My=wr("ERR_INVALID_URL","Invalid URL",TypeError),Gf=wr("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),qy=wr("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),Ny=wr("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),jy=wr("ERR_STREAM_WRITE_AFTER_END","write after end");function Re(t,e){Jf.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()}Re.prototype=Object.create(Jf.prototype);Re.prototype.abort=function(){Yf(this._currentRequest),this.emit("abort")};Re.prototype.write=function(t,e,r){if(this._ending)throw new jy;if(!xt(t)&&!By(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(br(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 Ny),this.abort())};Re.prototype.end=function(t,e,r){if(br(t)?(r=t,t=e=null):br(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}};Re.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};Re.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};Re.prototype.setTimeout=function(t,e){var r=this;function n(o){o.setTimeout(t),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy)}function i(o){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),s()},t),n(o)}function s(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",s),r.removeListener("error",s),r.removeListener("response",s),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",s),this.on("error",s),this.on("response",s),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){Re.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(Re.prototype,t,{get:function(){return this._currentRequest[t]}})});Re.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))}};Re.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 As)n.on(i,Fs[i]);if(this._currentUrl=/^\//.test(this._options.path)?St.format(this._options):this._options.path,this._isRedirect){var s=0,o=this,a=this._requestBodyBuffers;(function c(d){if(n===o._currentRequest)if(d)o.emit("error",d);else if(s<a.length){var u=a[s++];n.finished||n.write(u.data,u.encoding,c)}else o._ended&&n.end()})()}};Re.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(Yf(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects){this.emit("error",new qy);return}var n,i=this._options.beforeRedirect;i&&(n=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var s=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=[],Is(/^content-/i,this._options.headers));var o=Is(/^host$/i,this._options.headers),a=St.parse(this._currentUrl),c=o||a.host,d=/^\w+:/.test(r)?this._currentUrl:St.format(Object.assign(a,{host:c})),u;try{u=St.resolve(d,r)}catch(b){this.emit("error",new Gf({cause:b}));return}Wf("redirecting to",u),this._isRedirect=!0;var p=St.parse(u);if(Object.assign(this._options,p),(p.protocol!==a.protocol&&p.protocol!=="https:"||p.host!==c&&!$y(p.host,c))&&Is(/^(?:authorization|cookie)$/i,this._options.headers),br(i)){var g={headers:t.headers,statusCode:e},m={url:d,method:s,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 Gf({cause:b}))}};function Vf(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(n){var i=n+":",s=r[i]=t[n],o=e[n]=Object.create(s);function a(d,u,p){if(xt(d)){var g;try{g=Hf(new Os(d))}catch{g=St.parse(d)}if(!xt(g.protocol))throw new My({input:d});d=g}else Os&&d instanceof Os?d=Hf(d):(p=u,u=d,d={protocol:i});return br(u)&&(p=u,u=null),u=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},d,u),u.nativeProtocols=r,!xt(u.host)&&!xt(u.hostname)&&(u.hostname="::1"),zf.equal(u.protocol,i,"protocol mismatch"),Wf("options",u),new Re(u,p)}function c(d,u,p){var g=o.request(d,u,p);return g.end(),g}Object.defineProperties(o,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function Ly(){}function Hf(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 Is(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 wr(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 Yf(t){for(var e of As)t.removeListener(e,Fs[e]);t.on("error",Ly),t.abort()}function $y(t,e){zf(xt(t)&&xt(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function xt(t){return typeof t=="string"||t instanceof String}function br(t){return typeof t=="function"}function By(t){return typeof t=="object"&&"length"in t}Rs.exports=Vf({http:ky,https:Ty});Rs.exports.wrap=Vf});var Ts=y((bw,Uy)=>{Uy.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 rd=y((ww,td)=>{"use strict";var _r=_e(),Kf=Ss(),Xy=xs(),Gy=En(),Hy=require("http"),Jy=require("https"),zy=ks().http,Wy=ks().https,Qf=require("url"),Vy=require("zlib"),Yy=Ts(),Tn=Dn(),Ms=Pn(),Zf=/https:?/;function ed(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(s){s.headers.host=s.host,ed(s,e,s.href)}}td.exports=function(e){return new Promise(function(n,i){var s=function(P){n(P)},o=function(P){i(P)},a=e.data,c=e.headers;if("User-Agent"in c||"user-agent"in c?!c["User-Agent"]&&!c["user-agent"]&&(delete c["User-Agent"],delete c["user-agent"]):c["User-Agent"]="axios/"+Yy.version,a&&!_r.isStream(a)){if(!Buffer.isBuffer(a))if(_r.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(_r.isString(a))a=Buffer.from(a,"utf-8");else return o(Tn("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=Xy(e.baseURL,e.url),m=Qf.parse(g),b=m.protocol||"http:";if(!d&&m.auth){var S=m.auth.split(":"),x=S[0]||"",F=S[1]||"";d=x+":"+F}d&&delete c.Authorization;var j=Zf.test(b),L=j?e.httpsAgent:e.httpAgent,$={path:Gy(m.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:c,agent:L,agents:{http:e.httpAgent,https:e.httpsAgent},auth:d};e.socketPath?$.socketPath=e.socketPath:($.hostname=m.hostname,$.port=m.port);var H=e.proxy;if(!H&&H!==!1){var ne=b.slice(0,-1)+"_proxy",Se=process.env[ne]||process.env[ne.toUpperCase()];if(Se){var Y=Qf.parse(Se),D=process.env.no_proxy||process.env.NO_PROXY,q=!0;if(D){var T=D.split(",").map(function(P){return P.trim()});q=!T.some(function(P){return P?P==="*"||P[0]==="."&&m.hostname.substr(m.hostname.length-P.length)===P?!0:m.hostname===P:!1})}if(q&&(H={host:Y.hostname,port:Y.port,protocol:Y.protocol},Y.auth)){var J=Y.auth.split(":");H.auth={username:J[0],password:J[1]}}}}H&&($.headers.host=m.hostname+(m.port?":"+m.port:""),ed($,H,b+"//"+m.hostname+(m.port?":"+m.port:"")+$.path));var I,X=j&&(H?Zf.test(H.protocol):!0);e.transport?I=e.transport:e.maxRedirects===0?I=X?Jy:Hy:(e.maxRedirects&&($.maxRedirects=e.maxRedirects),I=X?Wy:zy),e.maxBodyLength>-1&&($.maxBodyLength=e.maxBodyLength);var O=I.request($,function(P){if(!O.aborted){var R=P,Ue=P.req||O;if(P.statusCode!==204&&Ue.method!=="HEAD"&&e.decompress!==!1)switch(P.headers["content-encoding"]){case"gzip":case"compress":case"deflate":R=R.pipe(Vy.createUnzip()),delete P.headers["content-encoding"];break}var Xe={status:P.statusCode,statusText:P.statusMessage,headers:P.headers,config:e,request:Ue};if(e.responseType==="stream")Xe.data=R,Kf(s,o,Xe);else{var ie=[],ue=0;R.on("data",function(xe){ie.push(xe),ue+=xe.length,e.maxContentLength>-1&&ue>e.maxContentLength&&(R.destroy(),o(Tn("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,Ue)))}),R.on("error",function(xe){O.aborted||o(Ms(xe,e,null,Ue))}),R.on("end",function(){var xe=Buffer.concat(ie);e.responseType!=="arraybuffer"&&(xe=xe.toString(e.responseEncoding),(!e.responseEncoding||e.responseEncoding==="utf8")&&(xe=_r.stripBOM(xe))),Xe.data=xe,Kf(s,o,Xe)})}}});if(O.on("error",function(P){O.aborted&&P.code!=="ERR_FR_TOO_MANY_REDIRECTS"||o(Ms(P,e,null,O))}),e.timeout){var B=parseInt(e.timeout,10);if(isNaN(B)){o(Tn("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",O));return}O.setTimeout(B,function(){O.abort(),o(Tn("timeout of "+B+"ms exceeded",e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",O))})}e.cancelToken&&e.cancelToken.promise.then(function(P){O.aborted||(O.abort(),o(P))}),_r.isStream(a)?a.on("error",function(P){o(Ms(P,e,null,O))}).pipe(O):O.end(a)})}});var qn=y((_w,sd)=>{"use strict";var ae=_e(),nd=yf(),Ky=Pn(),Qy={"Content-Type":"application/x-www-form-urlencoded"};function id(t,e){!ae.isUndefined(t)&&ae.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function Zy(){var t;return typeof XMLHttpRequest<"u"?t=Tf():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(t=rd()),t}function ev(t,e,r){if(ae.isString(t))try{return(e||JSON.parse)(t),ae.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var Mn={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:Zy(),transformRequest:[function(e,r){return nd(r,"Accept"),nd(r,"Content-Type"),ae.isFormData(e)||ae.isArrayBuffer(e)||ae.isBuffer(e)||ae.isStream(e)||ae.isFile(e)||ae.isBlob(e)?e:ae.isArrayBufferView(e)?e.buffer:ae.isURLSearchParams(e)?(id(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):ae.isObject(e)||r&&r["Content-Type"]==="application/json"?(id(r,"application/json"),ev(e)):e}],transformResponse:[function(e){var r=this.transitional,n=r&&r.silentJSONParsing,i=r&&r.forcedJSONParsing,s=!n&&this.responseType==="json";if(s||i&&ae.isString(e)&&e.length)try{return JSON.parse(e)}catch(o){if(s)throw o.name==="SyntaxError"?Ky(o,this,"E_JSON_PARSE"):o}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};Mn.headers={common:{Accept:"application/json, text/plain, */*"}};ae.forEach(["delete","get","head"],function(e){Mn.headers[e]={}});ae.forEach(["post","put","patch"],function(e){Mn.headers[e]=ae.merge(Qy)});sd.exports=Mn});var ad=y((Sw,od)=>{"use strict";var tv=_e(),rv=qn();od.exports=function(e,r,n){var i=this||rv;return tv.forEach(n,function(o){e=o.call(i,e,r)}),e}});var qs=y((xw,cd)=>{"use strict";cd.exports=function(e){return!!(e&&e.__CANCEL__)}});var fd=y((Ew,ld)=>{"use strict";var ud=_e(),Ns=ad(),nv=qs(),iv=qn();function js(t){t.cancelToken&&t.cancelToken.throwIfRequested()}ld.exports=function(e){js(e),e.headers=e.headers||{},e.data=Ns.call(e,e.data,e.headers,e.transformRequest),e.headers=ud.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),ud.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var r=e.adapter||iv.adapter;return r(e).then(function(i){return js(e),i.data=Ns.call(e,i.data,i.headers,e.transformResponse),i},function(i){return nv(i)||(js(e),i&&i.response&&(i.response.data=Ns.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})}});var Ls=y((Cw,dd)=>{"use strict";var he=_e();dd.exports=function(e,r){r=r||{};var n={},i=["url","method","data"],s=["headers","auth","proxy","params"],o=["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 he.isPlainObject(g)&&he.isPlainObject(m)?he.merge(g,m):he.isPlainObject(m)?he.merge({},m):he.isArray(m)?m.slice():m}function d(g){he.isUndefined(r[g])?he.isUndefined(e[g])||(n[g]=c(void 0,e[g])):n[g]=c(e[g],r[g])}he.forEach(i,function(m){he.isUndefined(r[m])||(n[m]=c(void 0,r[m]))}),he.forEach(s,d),he.forEach(o,function(m){he.isUndefined(r[m])?he.isUndefined(e[m])||(n[m]=c(void 0,e[m])):n[m]=c(void 0,r[m])}),he.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(s).concat(o).concat(a),p=Object.keys(e).concat(Object.keys(r)).filter(function(m){return u.indexOf(m)===-1});return he.forEach(p,d),n}});var yd=y((Pw,gd)=>{"use strict";var pd=Ts(),$s={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){$s[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var hd={},sv=pd.version.split(".");function md(t,e){for(var r=e?e.split("."):sv,n=t.split("."),i=0;i<3;i++){if(r[i]>n[i])return!0;if(r[i]<n[i])return!1}return!1}$s.transitional=function(e,r,n){var i=r&&md(r);function s(o,a){return"[Axios v"+pd.version+"] Transitional option '"+o+"'"+a+(n?". "+n:"")}return function(o,a,c){if(e===!1)throw new Error(s(a," has been removed in "+r));return i&&!hd[a]&&(hd[a]=!0,console.warn(s(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(o,a,c):!0}};function ov(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 s=n[i],o=e[s];if(o){var a=t[s],c=a===void 0||o(a,s,t);if(c!==!0)throw new TypeError("option "+s+" must be "+c);continue}if(r!==!0)throw Error("Unknown option "+s)}}gd.exports={isOlderVersion:md,assertOptions:ov,validators:$s}});var xd=y((Dw,Sd)=>{"use strict";var wd=_e(),av=En(),vd=mf(),bd=fd(),Nn=Ls(),_d=yd(),Yt=_d.validators;function Sr(t){this.defaults=t,this.interceptors={request:new vd,response:new vd}}Sr.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=Nn(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&&_d.assertOptions(r,{silentJSONParsing:Yt.transitional(Yt.boolean,"1.0.0"),forcedJSONParsing:Yt.transitional(Yt.boolean,"1.0.0"),clarifyTimeoutError:Yt.transitional(Yt.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 s=[];this.interceptors.response.forEach(function(g){s.push(g.fulfilled,g.rejected)});var o;if(!i){var a=[bd,void 0];for(Array.prototype.unshift.apply(a,n),a=a.concat(s),o=Promise.resolve(e);a.length;)o=o.then(a.shift(),a.shift());return o}for(var c=e;n.length;){var d=n.shift(),u=n.shift();try{c=d(c)}catch(p){u(p);break}}try{o=bd(c)}catch(p){return Promise.reject(p)}for(;s.length;)o=o.then(s.shift(),s.shift());return o};Sr.prototype.getUri=function(e){return e=Nn(this.defaults,e),av(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};wd.forEach(["delete","get","head","options"],function(e){Sr.prototype[e]=function(r,n){return this.request(Nn(n||{},{method:e,url:r,data:(n||{}).data}))}});wd.forEach(["post","put","patch"],function(e){Sr.prototype[e]=function(r,n,i){return this.request(Nn(i||{},{method:e,url:r,data:n}))}});Sd.exports=Sr});var Us=y((Ow,Ed)=>{"use strict";function Bs(t){this.message=t}Bs.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};Bs.prototype.__CANCEL__=!0;Ed.exports=Bs});var Pd=y((Iw,Cd)=>{"use strict";var cv=Us();function jn(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 cv(i),e(r.reason))})}jn.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};jn.source=function(){var e,r=new jn(function(i){e=i});return{token:r,cancel:e}};Cd.exports=jn});var Od=y((Aw,Dd)=>{"use strict";Dd.exports=function(e){return function(n){return e.apply(null,n)}}});var Ad=y((Fw,Id)=>{"use strict";Id.exports=function(e){return typeof e=="object"&&e.isAxiosError===!0}});var kd=y((Rw,Xs)=>{"use strict";var Fd=_e(),uv=ys(),Ln=xd(),lv=Ls(),fv=qn();function Rd(t){var e=new Ln(t),r=uv(Ln.prototype.request,e);return Fd.extend(r,Ln.prototype,e),Fd.extend(r,e),r}var $e=Rd(fv);$e.Axios=Ln;$e.create=function(e){return Rd(lv($e.defaults,e))};$e.Cancel=Us();$e.CancelToken=Pd();$e.isCancel=qs();$e.all=function(e){return Promise.all(e)};$e.spread=Od();$e.isAxiosError=Ad();Xs.exports=$e;Xs.exports.default=$e});var Gs=y((kw,Td)=>{Td.exports=kd()});var Z=y(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.isUndefined=Ie.fixName=Ie.validateName=Ie.validateSingleChar=Ie.fixChar=Ie.validateChar=void 0;function wv(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}Ie.validateChar=wv;function _v(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}Ie.fixChar=_v;function Sv(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}Ie.validateSingleChar=Sv;function xv(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 s=i?2:1,o=s;o<t.length;o++){var a=t.charCodeAt(o);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(o+1===t.length)return!1;var c=t.charCodeAt(o+1);if(a>=55296&&a<=56191&&c>=56320&&c<=57343){o++;continue}return!1}}return!0}Ie.validateName=xv;function Ev(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),s=r>=55296&&r<=56191&&i>=56320&&i<=57343;s?e=t[0]+t[1]:n?e=t[0]:e="\uFFFD";for(var o=s?2:1,a=o;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}Ie.fixName=Ev;function Cv(t){return Object.prototype.toString.call(t)==="[object Undefined]"}Ie.isUndefined=Cv});var Kt=y(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.StringOptions=void 0;var Xn=Z(),Pv=function(){function t(e){this.doubleQuotes=!1,this.indent=" ",this.newline=`
22
- `,this.pretty=!0,(0,Xn.isUndefined)(e.doubleQuotes)||(this.doubleQuotes=e.doubleQuotes),(0,Xn.isUndefined)(e.indent)||(this.indent=e.indent),(0,Xn.isUndefined)(e.newline)||(this.newline=e.newline),(0,Xn.isUndefined)(e.pretty)||(this.pretty=e.pretty)}return t}();Gn.StringOptions=Pv});var Hn=y(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.escapeDoubleQuotes=Te.escapeSingleQuotes=Te.escapeRightAngleBracketsInCdataTerminator=Te.escapeLeftAngleBrackets=Te.escapeAmpersands=void 0;function Dv(t){return t.replace(/&/g,"&amp;")}Te.escapeAmpersands=Dv;function Ov(t){return t.replace(/</g,"&lt;")}Te.escapeLeftAngleBrackets=Ov;function Iv(t){return t.replace(/]]>/g,"]]&gt;")}Te.escapeRightAngleBracketsInCdataTerminator=Iv;function Av(t){return t.replace(/'/g,"&apos;")}Te.escapeSingleQuotes=Av;function Fv(t){return t.replace(/"/g,"&quot;")}Te.escapeDoubleQuotes=Fv});var so=y(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});var Rv=ce(),sh=Hn(),no=Z(),kv=function(){function t(e,r,n){this._validation=r,(0,no.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,no.fixChar)(e);else if(this._validation&&!(0,no.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,sh.escapeAmpersands)(e),e=(0,sh.escapeLeftAngleBrackets)(e),e},t.prototype.up=function(){return this._parent},t}();io.default=kv});var Jn=y(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});var oh=ce(),ah=Z(),Tv=function(){function t(e,r,n){this._hex=!1,this._validation=r,this._parent=e,this.char=n.char,(0,ah.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,ah.validateSingleChar)(e))throw new Error((0,oh.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,oh.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}();oo.default=Tv});var zn=y(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});var Mv=ce(),qv=Z(),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())+": 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}();ao.default=Nv});var Wn=y(Er=>{"use strict";var lo=Er&&Er.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Er,"__esModule",{value:!0});var co=ce(),ch=Hn(),jv=Kt(),uo=Z(),Lv=lo(so()),$v=lo(Jn()),Bv=lo(zn()),Uv=function(){function t(e,r,n){this._validation=r,(0,uo.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,uo.fixName)(e),e.length===0)throw new Error((0,co.getContext)(this.up())+": attribute name should not be empty")}else if(this._validation&&!(0,uo.validateName)(e))throw e.length===0?new Error((0,co.getContext)(this.up())+": attribute name should not be empty"):new Error((0,co.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 $v.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entityRef=function(e){var r=new Bv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.text=function(e){var r=new Lv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});for(var r=new jv.StringOptions(e),n=r.doubleQuotes?'"':"'",i=this._name+"="+n,s=0,o=this._children;s<o.length;s++){var a=o[s];r.doubleQuotes?i+=(0,ch.escapeDoubleQuotes)(a.toString()):i+=(0,ch.escapeSingleQuotes)(a.toString())}return i+=n,i},t.prototype.up=function(){return this._parent},t}();Er.default=Uv});var ho=y(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});var Xv=ce(),Gv=Z(),Hv=function(){function t(e,r,n){this._validation=r,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._validation&&!(0,Gv.validateChar)(e))throw new Error((0,Xv.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}();fo.default=Hv});var mo=y(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});var Jv=ce(),zv=Z(),Wv=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,zv.validateChar)(e))throw new Error((0,Jv.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}();po.default=Wv});var yo=y(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});var Vv=ce(),Yv=Z(),Kv=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,Vv.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}();go.default=Kv});var bo=y(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});var Qv=ce(),Zv=Z(),e1=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,Zv.validateChar)(e))throw new Error((0,Qv.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}();vo.default=e1});var _o=y(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});var t1=ce(),r1=Z(),n1=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,r1.validateName)(e))throw new Error((0,t1.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}();wo.default=n1});var Cr=y(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});var Vn=ce(),Yn=Z(),i1=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,Yn.isUndefined)(e)){if(this._validation&&!(0,Yn.validateChar)(e))throw new Error((0,Vn.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,Vn.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,Yn.validateName)(e))throw new Error((0,Vn.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,Vn.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,Yn.isUndefined)(this._content)?"<?"+this._target+"?>":"<?"+this._target+" "+this._content+"?>"},t.prototype.up=function(){return this._parent},t}();So.default=i1});var Kn=y(Ct=>{"use strict";var Pt=Ct&&Ct.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ct,"__esModule",{value:!0});Ct.validatePubId=void 0;var ft=ce(),s1=Kt(),We=Z(),o1=Pt(Pr()),a1=Pt(ho()),c1=Pt(mo()),u1=Pt(yo()),l1=Pt(bo()),f1=Pt(_o()),d1=Pt(Cr()),h1=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,ft.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&&!uh(e))throw new Error((0,ft.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,ft.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,ft.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,ft.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 a1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new o1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.element=function(e){var r=new c1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entity=function(e){var r=new u1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.notation=function(e){var r=new l1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.paramEntityRef=function(e){var r=new f1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new d1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});var r=new s1.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,ft.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,s=this._children;i<s.length;i++){var o=s[i];r.pretty&&(n+=r.newline+r.indent),n+=o.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,ft.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,ft.getContext)(this)+": doubleQuotes option inconsistent with DTD system identifier or public identifier");n+="'"+r+"'"}return n},t}();Ct.default=h1;function uh(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}Ct.validatePubId=uh});var Co=y(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});var lh=ce(),xo=Z(),p1=function(){function t(e,r,n){this._validation=r,(0,xo.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,xo.fixChar)(e);else if(this._validation&&!(0,xo.validateChar)(e))throw new Error((0,lh.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,lh.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}();Eo.default=p1});var Io=y(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});var m1=ce(),Po=Hn(),Do=Z(),g1=function(){function t(e,r,n){this._validation=r,(0,Do.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,Do.fixChar)(e);else if(this._validation&&!(0,Do.validateChar)(e))throw new Error((0,m1.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,Po.escapeAmpersands)(e),e=(0,Po.escapeLeftAngleBrackets)(e),e=(0,Po.escapeRightAngleBracketsInCdataTerminator)(e),e},t.prototype.up=function(){return this._parent},t}();Oo.default=g1});var ti=y(Ir=>{"use strict";var Dt=Ir&&Ir.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ir,"__esModule",{value:!0});var Qn=ce(),y1=Kt(),Dr=Z(),fh=Dt(Wn()),v1=Dt(Co()),Or=Dt(Io()),Zn=Dt(Jn()),b1=Dt(Pr()),ei=Dt(zn()),w1=Dt(Cr()),_1=function(){function t(e,r,n){this._validation=r,(0,Dr.isUndefined)(n.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=n.replaceInvalidCharsInName,(0,Dr.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,Dr.fixName)(e),e.length===0)throw new Error((0,Qn.getContext)(this.up())+": element name should not be empty")}else if(this._validation&&!(0,Dr.validateName)(e))throw e.length===0?new Error((0,Qn.getContext)(this.up())+": element name should not be empty"):new Error((0,Qn.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,Qn.getContext)(this.up())+': element "'+this.name+'" already contains an attribute with the'+(' name "'+e.name+'"'));var r=new fh.default(this,this._validation,e);return this._children.push(r),this._attributeNames.push(e.name),r},t.prototype.cdata=function(e){var r=new v1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.charData=function(e){var r=new Or.default(this,this._validation,e);return this._children.push(r),r},t.prototype.charRef=function(e){var r=new Zn.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new b1.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 ei.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new w1.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 y1.StringOptions(e),i=r+n.indent,s="<"+this._name,o=[],a=0,c=this._children;a<c.length;a++){var d=c[a];d instanceof fh.default?s+=" "+d.toString(e):o.push(d)}if(o.length>0){for(var u="",p=0;p<o.length;p++){var g=o[p],m="";g instanceof t?m+=g.toStringWithIndent(n,i):m+=g.toString();var b=p>0?o[p-1]:void 0;g instanceof Or.default&&g.toString()===""||(n.pretty&&(this.allSameLineNodes(o)||p>0&&this.onSameLine(g,b)||(m=n.newline+i+m)),u+=m)}n.pretty&&(this.allSameLineNodes(o)||(u+=n.newline+r)),u.length===0&&this._useSelfClosingTagIfEmpty?s+="/>":s+=">"+u+"</"+this._name+">"}else this._useSelfClosingTagIfEmpty?s+="/>":s+="></"+this._name+">";return s},t.prototype.allSameLineNodes=function(e){for(var r=0,n=e;r<n.length;r++){var i=n[r];if(!(i instanceof Zn.default||i instanceof ei.default||i instanceof Or.default))return!1}return!0},t.prototype.onSameLine=function(e,r){return(e instanceof Zn.default||e instanceof ei.default||e instanceof Or.default)&&!(0,Dr.isUndefined)(r)&&(r instanceof Zn.default||r instanceof ei.default||r instanceof Or.default)},t}();Ir.default=_1});var ce=y(Qt=>{"use strict";var ni=Qt&&Qt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Qt,"__esModule",{value:!0});Qt.getContext=void 0;var S1=ni(Wn()),x1=ni(ii()),E1=ni(Kn()),C1=ni(ti());function ri(t){if(t instanceof S1.default)return ri(t.up())+(' > attribute "'+t.name+'"');if(t instanceof x1.default)return"in XML document";if(t instanceof E1.default)return ri(t.up())+" > DTD";if(t instanceof C1.default)return ri(t.up())+(' > element "'+t.name+'"');throw new Error("Unrecognized object of type "+Object.prototype.toString.call(t))}Qt.getContext=ri});var Pr=y(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});var Ao=ce(),Fo=Z(),P1=function(){function t(e,r,n){this._validation=r,(0,Fo.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,Fo.fixChar)(e);else if(this._validation&&!(0,Fo.validateChar)(e))throw new Error((0,Ao.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,Ao.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,Ao.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}();Ro.default=P1});var Mo=y(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});var ko=ce(),D1=Kt(),Ar=Z(),O1=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,Ar.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,Ar.isUndefined)(e)&&!I1(e))throw new Error((0,ko.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,Ar.isUndefined)(e)&&e!=="yes"&&e!=="no")throw new Error((0,ko.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&&!A1(e))throw new Error((0,ko.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 D1.StringOptions(e),n=r.doubleQuotes?'"':"'",i="<?xml version="+n+this._version+n;return(0,Ar.isUndefined)(this._encoding)||(i+=" encoding="+n+this._encoding+n),(0,Ar.isUndefined)(this._standalone)||(i+=" standalone="+n+this._standalone+n),i+="?>",i},t.prototype.up=function(){return this._parent},t}();To.default=O1;function I1(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 A1(t){for(var e=0;e<=9;e++)if(t==="1."+e)return!0;return!1}});var ii=y(Rr=>{"use strict";var kr=Rr&&Rr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Rr,"__esModule",{value:!0});var F1=Kt(),R1=Z(),k1=kr(Pr()),dh=kr(Mo()),hh=kr(Kn()),Fr=kr(ti()),T1=kr(Cr()),M1=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 k1.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 dh.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 Fr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: DTD must precede the root element");var n=new hh.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 Fr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: only one root element is permitted");var n=new Fr.default(this,this._validation,e);return this._children.push(n),n},t.prototype.procInst=function(e){var r=new T1.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 Fr.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="",s=0,o=this._children;s<o.length;s++){var a=o[s];a instanceof dh.default||a instanceof hh.default||a instanceof Fr.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}();Rr.default=M1});var ph=y(k=>{"use strict";var te=k&&k.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(k,"__esModule",{value:!0});k.document=k.XmlProcInst=k.XmlEntityRef=k.XmlElement=k.XmlDtdParamEntityRef=k.XmlDtdNotation=k.XmlDtdEntity=k.XmlDtdElement=k.XmlDtdAttlist=k.XmlDtd=k.XmlDocument=k.XmlDecl=k.XmlComment=k.XmlCharRef=k.XmlCharData=k.XmlCdata=k.XmlAttributeText=k.XmlAttribute=void 0;var q1=te(ii()),N1=Wn();Object.defineProperty(k,"XmlAttribute",{enumerable:!0,get:function(){return te(N1).default}});var j1=so();Object.defineProperty(k,"XmlAttributeText",{enumerable:!0,get:function(){return te(j1).default}});var L1=Co();Object.defineProperty(k,"XmlCdata",{enumerable:!0,get:function(){return te(L1).default}});var $1=Io();Object.defineProperty(k,"XmlCharData",{enumerable:!0,get:function(){return te($1).default}});var B1=Jn();Object.defineProperty(k,"XmlCharRef",{enumerable:!0,get:function(){return te(B1).default}});var U1=Pr();Object.defineProperty(k,"XmlComment",{enumerable:!0,get:function(){return te(U1).default}});var X1=Mo();Object.defineProperty(k,"XmlDecl",{enumerable:!0,get:function(){return te(X1).default}});var G1=ii();Object.defineProperty(k,"XmlDocument",{enumerable:!0,get:function(){return te(G1).default}});var H1=Kn();Object.defineProperty(k,"XmlDtd",{enumerable:!0,get:function(){return te(H1).default}});var J1=ho();Object.defineProperty(k,"XmlDtdAttlist",{enumerable:!0,get:function(){return te(J1).default}});var z1=mo();Object.defineProperty(k,"XmlDtdElement",{enumerable:!0,get:function(){return te(z1).default}});var W1=yo();Object.defineProperty(k,"XmlDtdEntity",{enumerable:!0,get:function(){return te(W1).default}});var V1=bo();Object.defineProperty(k,"XmlDtdNotation",{enumerable:!0,get:function(){return te(V1).default}});var Y1=_o();Object.defineProperty(k,"XmlDtdParamEntityRef",{enumerable:!0,get:function(){return te(Y1).default}});var K1=ti();Object.defineProperty(k,"XmlElement",{enumerable:!0,get:function(){return te(K1).default}});var Q1=zn();Object.defineProperty(k,"XmlEntityRef",{enumerable:!0,get:function(){return te(Q1).default}});var Z1=Cr();Object.defineProperty(k,"XmlProcInst",{enumerable:!0,get:function(){return te(Z1).default}});function eb(t){return t===void 0&&(t={}),new q1.default(t)}k.document=eb});var qo=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 mh(t){return Object.prototype.toString.call(t)==="[object Undefined]"}re.isUndefined=mh;function gh(t){return Object.prototype.toString.call(t)==="[object Null]"}re.isNull=gh;function tb(t){return Object.prototype.toString.call(t)==="[object Object]"}re.isObject=tb;function rb(t){return Object.prototype.toString.call(t)==="[object Array]"}re.isArray=rb;function yh(t){return Object.prototype.toString.call(t)==="[object Function]"}re.isFunction=yh;function nb(t){return Object.prototype.toString.call(t)==="[object Set]"}re.isSet=nb;function ib(t){return Object.prototype.toString.call(t)==="[object Map]"}re.isMap=ib;function sb(t){return!mh(t)&&!gh(t)&&yh(t?.toString)&&(t=t.toString()),String(t)}re.stringify=sb});var xh=y(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.WrapHandlers=Ae.TypeHandlers=Ae.FormatOptions=Ae.DtdOptions=Ae.DeclarationOptions=Ae.Options=void 0;var Be=qo(),ob=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 vh(e.declaration),this.dtd=new bh(this.validation,e.dtd),this.format=new wh(e.format),(0,Be.isUndefined)(e.replaceInvalidChars)||(this.replaceInvalidChars=e.replaceInvalidChars),this.typeHandlers=new _h(e.typeHandlers),(0,Be.isUndefined)(e.useSelfClosingTagIfEmpty)||(this.useSelfClosingTagIfEmpty=e.useSelfClosingTagIfEmpty),(0,Be.isUndefined)(e.valueString)||(this.valueString=e.valueString),this.wrapHandlers=new Sh(e.wrapHandlers)}return t}();Ae.Options=ob;var vh=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}();Ae.DeclarationOptions=vh;var bh=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}();Ae.DtdOptions=bh;var wh=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}();Ae.FormatOptions=wh;var _h=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}();Ae.TypeHandlers=_h;var Sh=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}();Ae.WrapHandlers=Sh});var Ih=y(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.parse=dt.parseToExistingElement=dt.Absent=void 0;var Ch=ph(),Ph=xh(),K=qo(),No=function(){function t(){}return Object.defineProperty(t,"instance",{get:function(){return t._instance},enumerable:!1,configurable:!0}),t._instance=new t,t}();dt.Absent=No;function jo(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 Dh(t,e,r){var n=function(o){return r.cdataInvalidChars&&(o.indexOf("<")!==-1||o.indexOf("&")!==-1)||r.cdataKeys.indexOf(e.name)!==-1||r.cdataKeys.indexOf("*")!==-1};if(e instanceof Ch.XmlElement)if(n(t))for(var i=t.split("]]>"),s=0;s<i.length;s++)n(i[s])?e.cdata({charData:i[s],replaceInvalidCharsInCharData:r.replaceInvalidChars}):e.charData({charData:i[s],replaceInvalidCharsInCharData:r.replaceInvalidChars}),s<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 ab(t,e,r,n){var i=r.attribute({name:t,replaceInvalidCharsInName:n.replaceInvalidChars});Dh((0,K.stringify)(e),i,n)}function Eh(t,e,r,n){if(t===n.aliasString){r.name=(0,K.stringify)(e);return}if(t.indexOf(n.attributeString)===0&&(0,K.isObject)(e)){for(var i=0,s=Object.keys(e);i<s.length;i++){var o=s[i];ab(o,(0,K.stringify)(e[o]),r,n)}return}if(t.indexOf(n.valueString)===0){si(t,(0,K.stringify)(e),r,n);return}var a=r;if(!(0,K.isArray)(e)&&!(0,K.isSet)(e)){var c=jo(e,n);if(!(0,K.isUndefined)(c)&&c(e)===No.instance)return;a=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}si(t,e,a,n)}function cb(t,e,r){if((0,K.isMap)(t))t.forEach(function(o,a){Eh((0,K.stringify)(a),o,e,r)});else for(var n=0,i=Object.keys(t);n<i.length;n++){var s=i[n];Eh(s,t[s],e,r)}}function ub(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 s=t,o=r;if(!(0,K.isUndefined)(i)){var a=i(s,e);(0,K.isNull)(a)||(s=a,o=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty}))}e.forEach(function(c){var d=o;if(!(0,K.isArray)(c)&&!(0,K.isSet)(c)){var u=jo(c,n);if(!(0,K.isUndefined)(u)&&u(c)===No.instance)return;d=o.element({name:s,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}si(s,c,d,n)})}function si(t,e,r,n){var i=jo(e,n);if((0,K.isUndefined)(i)||(e=i(e)),(0,K.isObject)(e)||(0,K.isMap)(e)){cb(e,r,n);return}if((0,K.isArray)(e)||(0,K.isSet)(e)){ub(t,e,r,n);return}Dh((0,K.stringify)(e),r,n)}function Oh(t,e,r){var n=new Ph.Options(r);si(t.name,e,t,n)}dt.parseToExistingElement=Oh;function lb(t,e,r){var n=new Ph.Options(r),i=new Ch.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 s=i.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty});return Oh(s,e,r),i.toString(n.format)}dt.parse=lb});var Jh=require("node:child_process"),Bo=A(require("node:fs")),ai=A(require("node:path"));var of=A(tt());var Ye=A(require("node:path")),Le=A(gt());var je=A(require("node:fs")),Ne=A(require("node:path")),we=A(gt());var Ml=A(require("node:path")),ns=A(on()),ql=A(tt()),Ge=A(gt()),Nl=A(yl()),is=A(yn());ql.default.config();var M2=!!process.env.GRIDDO_DEBUG_LOGS&&!!JSON.parse(process.env.GRIDDO_DEBUG_LOGS),xg=!!process.env.GRIDDO_BUILD_LOGS&&!!JSON.parse(process.env.GRIDDO_BUILD_LOGS)||!!process.env.LOGS&&!!JSON.parse(process.env.LOGS),jl=is.default.sync(__dirname),q2=is.default.sync();function Ll(t){let e=[];return Ge.default.readdirSync(t).forEach(n=>{let i=`${t}/${n}`;e.push(i)}),e}function He(t,e="",r=1,n=1){let i=t.split(`
23
- `).map(b=>b.trim()),s=e?` ${e} `:"",o=e?s.length:0,a=Math.max(...i.map(b=>b.length))+r*2,c=Math.max(a,o),d=`\u2502${" ".repeat(c)}\u2502
19
+ `+s),t.push(i+"m+"+jn.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Iy()+e+" "+t[0]}function Iy(){return se.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Ay(...t){return process.stderr.write(qn.format(...t)+`
20
+ `)}function Fy(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function Ry(){return process.env.DEBUG}function ky(t){t.inspectOpts={};let e=Object.keys(se.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=se.inspectOpts[e[r]]}jn.exports=Is()(se);var{formatters:$f}=jn.exports;$f.o=function(t){return this.inspectOpts.colors=this.useColors,qn.inspect(t,this.inspectOpts).split(`
21
+ `).map(e=>e.trim()).join(" ")};$f.O=function(t){return this.inspectOpts.colors=this.useColors,qn.inspect(t,this.inspectOpts)}});var Uf=y((vw,As)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?As.exports=Lf():As.exports=Bf()});var Gf=y((bw,Xf)=>{var wr;Xf.exports=function(){if(!wr){try{wr=Uf()("follow-redirects")}catch{}typeof wr!="function"&&(wr=function(){})}wr.apply(null,arguments)}});var qs=y((ww,Ms)=>{var xt=require("url"),Fs=xt.URL,Ty=require("http"),My=require("https"),zf=require("stream").Writable,Wf=require("assert"),Vf=Gf(),ks=["abort","aborted","connect","error","socket","timeout"],Ts=Object.create(null);ks.forEach(function(t){Ts[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}});var qy=Sr("ERR_INVALID_URL","Invalid URL",TypeError),Hf=Sr("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),jy=Sr("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),Ny=Sr("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Ly=Sr("ERR_STREAM_WRITE_AFTER_END","write after end");function Re(t,e){zf.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()}Re.prototype=Object.create(zf.prototype);Re.prototype.abort=function(){Kf(this._currentRequest),this.emit("abort")};Re.prototype.write=function(t,e,r){if(this._ending)throw new Ly;if(!Et(t)&&!Uy(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(_r(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 Ny),this.abort())};Re.prototype.end=function(t,e,r){if(_r(t)?(r=t,t=e=null):_r(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}};Re.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};Re.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};Re.prototype.setTimeout=function(t,e){var r=this;function n(o){o.setTimeout(t),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy)}function i(o){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),s()},t),n(o)}function s(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",s),r.removeListener("error",s),r.removeListener("response",s),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",s),this.on("error",s),this.on("response",s),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){Re.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(Re.prototype,t,{get:function(){return this._currentRequest[t]}})});Re.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))}};Re.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 ks)n.on(i,Ts[i]);if(this._currentUrl=/^\//.test(this._options.path)?xt.format(this._options):this._options.path,this._isRedirect){var s=0,o=this,a=this._requestBodyBuffers;(function c(f){if(n===o._currentRequest)if(f)o.emit("error",f);else if(s<a.length){var u=a[s++];n.finished||n.write(u.data,u.encoding,c)}else o._ended&&n.end()})()}};Re.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(Kf(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects){this.emit("error",new jy);return}var n,i=this._options.beforeRedirect;i&&(n=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var s=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=[],Rs(/^content-/i,this._options.headers));var o=Rs(/^host$/i,this._options.headers),a=xt.parse(this._currentUrl),c=o||a.host,f=/^\w+:/.test(r)?this._currentUrl:xt.format(Object.assign(a,{host:c})),u;try{u=xt.resolve(f,r)}catch(b){this.emit("error",new Hf({cause:b}));return}Vf("redirecting to",u),this._isRedirect=!0;var p=xt.parse(u);if(Object.assign(this._options,p),(p.protocol!==a.protocol&&p.protocol!=="https:"||p.host!==c&&!By(p.host,c))&&Rs(/^(?:authorization|cookie)$/i,this._options.headers),_r(i)){var g={headers:t.headers,statusCode:e},m={url:f,method:s,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 Hf({cause:b}))}};function Yf(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(n){var i=n+":",s=r[i]=t[n],o=e[n]=Object.create(s);function a(f,u,p){if(Et(f)){var g;try{g=Jf(new Fs(f))}catch{g=xt.parse(f)}if(!Et(g.protocol))throw new qy({input:f});f=g}else Fs&&f instanceof Fs?f=Jf(f):(p=u,u=f,f={protocol:i});return _r(u)&&(p=u,u=null),u=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},f,u),u.nativeProtocols=r,!Et(u.host)&&!Et(u.hostname)&&(u.hostname="::1"),Wf.equal(u.protocol,i,"protocol mismatch"),Vf("options",u),new Re(u,p)}function c(f,u,p){var g=o.request(f,u,p);return g.end(),g}Object.defineProperties(o,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function $y(){}function Jf(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 Rs(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 Sr(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 Kf(t){for(var e of ks)t.removeListener(e,Ts[e]);t.on("error",$y),t.abort()}function By(t,e){Wf(Et(t)&&Et(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function Et(t){return typeof t=="string"||t instanceof String}function _r(t){return typeof t=="function"}function Uy(t){return typeof t=="object"&&"length"in t}Ms.exports=Yf({http:Ty,https:My});Ms.exports.wrap=Yf});var js=y((_w,Xy)=>{Xy.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 nh=y((Sw,rh)=>{"use strict";var xr=Se(),Qf=Cs(),Gy=Ps(),Hy=On(),Jy=require("http"),zy=require("https"),Wy=qs().http,Vy=qs().https,Zf=require("url"),Yy=require("zlib"),Ky=js(),Nn=Fn(),Ns=An(),eh=/https:?/;function th(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(s){s.headers.host=s.host,th(s,e,s.href)}}rh.exports=function(e){return new Promise(function(n,i){var s=function(P){n(P)},o=function(P){i(P)},a=e.data,c=e.headers;if("User-Agent"in c||"user-agent"in c?!c["User-Agent"]&&!c["user-agent"]&&(delete c["User-Agent"],delete c["user-agent"]):c["User-Agent"]="axios/"+Ky.version,a&&!xr.isStream(a)){if(!Buffer.isBuffer(a))if(xr.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(xr.isString(a))a=Buffer.from(a,"utf-8");else return o(Nn("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));c["Content-Length"]=a.length}var f=void 0;if(e.auth){var u=e.auth.username||"",p=e.auth.password||"";f=u+":"+p}var g=Gy(e.baseURL,e.url),m=Zf.parse(g),b=m.protocol||"http:";if(!f&&m.auth){var _=m.auth.split(":"),x=_[0]||"",A=_[1]||"";f=x+":"+A}f&&delete c.Authorization;var $=eh.test(b),U=$?e.httpsAgent:e.httpAgent,q={path:Hy(m.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:c,agent:U,agents:{http:e.httpAgent,https:e.httpsAgent},auth:f};e.socketPath?q.socketPath=e.socketPath:(q.hostname=m.hostname,q.port=m.port);var W=e.proxy;if(!W&&W!==!1){var ce=b.slice(0,-1)+"_proxy",ge=process.env[ce]||process.env[ce.toUpperCase()];if(ge){var Y=Zf.parse(ge),D=process.env.no_proxy||process.env.NO_PROXY,j=!0;if(D){var T=D.split(",").map(function(P){return P.trim()});j=!T.some(function(P){return P?P==="*"||P[0]==="."&&m.hostname.substr(m.hostname.length-P.length)===P?!0:m.hostname===P:!1})}if(j&&(W={host:Y.hostname,port:Y.port,protocol:Y.protocol},Y.auth)){var H=Y.auth.split(":");W.auth={username:H[0],password:H[1]}}}}W&&(q.headers.host=m.hostname+(m.port?":"+m.port:""),th(q,W,b+"//"+m.hostname+(m.port?":"+m.port:"")+q.path));var I,X=$&&(W?eh.test(W.protocol):!0);e.transport?I=e.transport:e.maxRedirects===0?I=X?zy:Jy:(e.maxRedirects&&(q.maxRedirects=e.maxRedirects),I=X?Vy:Wy),e.maxBodyLength>-1&&(q.maxBodyLength=e.maxBodyLength);var O=I.request(q,function(P){if(!O.aborted){var R=P,Be=P.req||O;if(P.statusCode!==204&&Be.method!=="HEAD"&&e.decompress!==!1)switch(P.headers["content-encoding"]){case"gzip":case"compress":case"deflate":R=R.pipe(Yy.createUnzip()),delete P.headers["content-encoding"];break}var Ve={status:P.statusCode,statusText:P.statusMessage,headers:P.headers,config:e,request:Be};if(e.responseType==="stream")Ve.data=R,Qf(s,o,Ve);else{var ne=[],ye=0;R.on("data",function(ue){ne.push(ue),ye+=ue.length,e.maxContentLength>-1&&ye>e.maxContentLength&&(R.destroy(),o(Nn("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,Be)))}),R.on("error",function(ue){O.aborted||o(Ns(ue,e,null,Be))}),R.on("end",function(){var ue=Buffer.concat(ne);e.responseType!=="arraybuffer"&&(ue=ue.toString(e.responseEncoding),(!e.responseEncoding||e.responseEncoding==="utf8")&&(ue=xr.stripBOM(ue))),Ve.data=ue,Qf(s,o,Ve)})}}});if(O.on("error",function(P){O.aborted&&P.code!=="ERR_FR_TOO_MANY_REDIRECTS"||o(Ns(P,e,null,O))}),e.timeout){var B=parseInt(e.timeout,10);if(isNaN(B)){o(Nn("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",O));return}O.setTimeout(B,function(){O.abort(),o(Nn("timeout of "+B+"ms exceeded",e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",O))})}e.cancelToken&&e.cancelToken.promise.then(function(P){O.aborted||(O.abort(),o(P))}),xr.isStream(a)?a.on("error",function(P){o(Ns(P,e,null,O))}).pipe(O):O.end(a)})}});var $n=y((xw,oh)=>{"use strict";var oe=Se(),ih=vf(),Qy=An(),Zy={"Content-Type":"application/x-www-form-urlencoded"};function sh(t,e){!oe.isUndefined(t)&&oe.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function ev(){var t;return typeof XMLHttpRequest<"u"?t=Mf():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(t=nh()),t}function tv(t,e,r){if(oe.isString(t))try{return(e||JSON.parse)(t),oe.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var Ln={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:ev(),transformRequest:[function(e,r){return ih(r,"Accept"),ih(r,"Content-Type"),oe.isFormData(e)||oe.isArrayBuffer(e)||oe.isBuffer(e)||oe.isStream(e)||oe.isFile(e)||oe.isBlob(e)?e:oe.isArrayBufferView(e)?e.buffer:oe.isURLSearchParams(e)?(sh(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):oe.isObject(e)||r&&r["Content-Type"]==="application/json"?(sh(r,"application/json"),tv(e)):e}],transformResponse:[function(e){var r=this.transitional,n=r&&r.silentJSONParsing,i=r&&r.forcedJSONParsing,s=!n&&this.responseType==="json";if(s||i&&oe.isString(e)&&e.length)try{return JSON.parse(e)}catch(o){if(s)throw o.name==="SyntaxError"?Qy(o,this,"E_JSON_PARSE"):o}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};Ln.headers={common:{Accept:"application/json, text/plain, */*"}};oe.forEach(["delete","get","head"],function(e){Ln.headers[e]={}});oe.forEach(["post","put","patch"],function(e){Ln.headers[e]=oe.merge(Zy)});oh.exports=Ln});var ch=y((Ew,ah)=>{"use strict";var rv=Se(),nv=$n();ah.exports=function(e,r,n){var i=this||nv;return rv.forEach(n,function(o){e=o.call(i,e,r)}),e}});var Ls=y((Cw,uh)=>{"use strict";uh.exports=function(e){return!!(e&&e.__CANCEL__)}});var hh=y((Pw,fh)=>{"use strict";var lh=Se(),$s=ch(),iv=Ls(),sv=$n();function Bs(t){t.cancelToken&&t.cancelToken.throwIfRequested()}fh.exports=function(e){Bs(e),e.headers=e.headers||{},e.data=$s.call(e,e.data,e.headers,e.transformRequest),e.headers=lh.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),lh.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var r=e.adapter||sv.adapter;return r(e).then(function(i){return Bs(e),i.data=$s.call(e,i.data,i.headers,e.transformResponse),i},function(i){return iv(i)||(Bs(e),i&&i.response&&(i.response.data=$s.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})}});var Us=y((Dw,dh)=>{"use strict";var pe=Se();dh.exports=function(e,r){r=r||{};var n={},i=["url","method","data"],s=["headers","auth","proxy","params"],o=["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 pe.isPlainObject(g)&&pe.isPlainObject(m)?pe.merge(g,m):pe.isPlainObject(m)?pe.merge({},m):pe.isArray(m)?m.slice():m}function f(g){pe.isUndefined(r[g])?pe.isUndefined(e[g])||(n[g]=c(void 0,e[g])):n[g]=c(e[g],r[g])}pe.forEach(i,function(m){pe.isUndefined(r[m])||(n[m]=c(void 0,r[m]))}),pe.forEach(s,f),pe.forEach(o,function(m){pe.isUndefined(r[m])?pe.isUndefined(e[m])||(n[m]=c(void 0,e[m])):n[m]=c(void 0,r[m])}),pe.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(s).concat(o).concat(a),p=Object.keys(e).concat(Object.keys(r)).filter(function(m){return u.indexOf(m)===-1});return pe.forEach(p,f),n}});var vh=y((Ow,yh)=>{"use strict";var mh=js(),Xs={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Xs[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var ph={},ov=mh.version.split(".");function gh(t,e){for(var r=e?e.split("."):ov,n=t.split("."),i=0;i<3;i++){if(r[i]>n[i])return!0;if(r[i]<n[i])return!1}return!1}Xs.transitional=function(e,r,n){var i=r&&gh(r);function s(o,a){return"[Axios v"+mh.version+"] Transitional option '"+o+"'"+a+(n?". "+n:"")}return function(o,a,c){if(e===!1)throw new Error(s(a," has been removed in "+r));return i&&!ph[a]&&(ph[a]=!0,console.warn(s(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(o,a,c):!0}};function av(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 s=n[i],o=e[s];if(o){var a=t[s],c=a===void 0||o(a,s,t);if(c!==!0)throw new TypeError("option "+s+" must be "+c);continue}if(r!==!0)throw Error("Unknown option "+s)}}yh.exports={isOlderVersion:gh,assertOptions:av,validators:Xs}});var Eh=y((Iw,xh)=>{"use strict";var _h=Se(),cv=On(),bh=gf(),wh=hh(),Bn=Us(),Sh=vh(),Qt=Sh.validators;function Er(t){this.defaults=t,this.interceptors={request:new bh,response:new bh}}Er.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=Bn(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&&Sh.assertOptions(r,{silentJSONParsing:Qt.transitional(Qt.boolean,"1.0.0"),forcedJSONParsing:Qt.transitional(Qt.boolean,"1.0.0"),clarifyTimeoutError:Qt.transitional(Qt.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 s=[];this.interceptors.response.forEach(function(g){s.push(g.fulfilled,g.rejected)});var o;if(!i){var a=[wh,void 0];for(Array.prototype.unshift.apply(a,n),a=a.concat(s),o=Promise.resolve(e);a.length;)o=o.then(a.shift(),a.shift());return o}for(var c=e;n.length;){var f=n.shift(),u=n.shift();try{c=f(c)}catch(p){u(p);break}}try{o=wh(c)}catch(p){return Promise.reject(p)}for(;s.length;)o=o.then(s.shift(),s.shift());return o};Er.prototype.getUri=function(e){return e=Bn(this.defaults,e),cv(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};_h.forEach(["delete","get","head","options"],function(e){Er.prototype[e]=function(r,n){return this.request(Bn(n||{},{method:e,url:r,data:(n||{}).data}))}});_h.forEach(["post","put","patch"],function(e){Er.prototype[e]=function(r,n,i){return this.request(Bn(i||{},{method:e,url:r,data:n}))}});xh.exports=Er});var Hs=y((Aw,Ch)=>{"use strict";function Gs(t){this.message=t}Gs.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};Gs.prototype.__CANCEL__=!0;Ch.exports=Gs});var Dh=y((Fw,Ph)=>{"use strict";var uv=Hs();function Un(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 uv(i),e(r.reason))})}Un.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};Un.source=function(){var e,r=new Un(function(i){e=i});return{token:r,cancel:e}};Ph.exports=Un});var Ih=y((Rw,Oh)=>{"use strict";Oh.exports=function(e){return function(n){return e.apply(null,n)}}});var Fh=y((kw,Ah)=>{"use strict";Ah.exports=function(e){return typeof e=="object"&&e.isAxiosError===!0}});var Th=y((Tw,Js)=>{"use strict";var Rh=Se(),lv=ws(),Xn=Eh(),fv=Us(),hv=$n();function kh(t){var e=new Xn(t),r=lv(Xn.prototype.request,e);return Rh.extend(r,Xn.prototype,e),Rh.extend(r,e),r}var Le=kh(hv);Le.Axios=Xn;Le.create=function(e){return kh(fv(Le.defaults,e))};Le.Cancel=Hs();Le.CancelToken=Dh();Le.isCancel=Ls();Le.all=function(e){return Promise.all(e)};Le.spread=Ih();Le.isAxiosError=Fh();Js.exports=Le;Js.exports.default=Le});var zs=y((Mw,Mh)=>{Mh.exports=Th()});var Z=y(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.isUndefined=Oe.fixName=Oe.validateName=Oe.validateSingleChar=Oe.fixChar=Oe.validateChar=void 0;function Sv(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}Oe.validateChar=Sv;function xv(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}Oe.fixChar=xv;function Ev(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}Oe.validateSingleChar=Ev;function Cv(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 s=i?2:1,o=s;o<t.length;o++){var a=t.charCodeAt(o);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(o+1===t.length)return!1;var c=t.charCodeAt(o+1);if(a>=55296&&a<=56191&&c>=56320&&c<=57343){o++;continue}return!1}}return!0}Oe.validateName=Cv;function Pv(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),s=r>=55296&&r<=56191&&i>=56320&&i<=57343;s?e=t[0]+t[1]:n?e=t[0]:e="\uFFFD";for(var o=s?2:1,a=o;a<t.length;a++){var c=t.charCodeAt(a);if(c===58||c===95||c===45||c===46||c===183||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||c>=192&&c<=214||c>=216&&c<=246||c>=248&&c<=767||c>=768&&c<=879||c>=880&&c<=893||c>=895&&c<=8191||c>=8204&&c<=8205||c>=8255&&c<=8256||c>=8304&&c<=8591||c>=11264&&c<=12271||c>=12289&&c<=55295||c>=63744&&c<=64975||c>=65008&&c<=65533){e+=t[a];continue}if(a+1===t.length)return e+="\uFFFD",e;var f=t.charCodeAt(a+1);if(c>=55296&&c<=56191&&f>=56320&&f<=57343){e+=t[a]+t[a+1],a++;continue}e+="\uFFFD"}return e}Oe.fixName=Pv;function Dv(t){return Object.prototype.toString.call(t)==="[object Undefined]"}Oe.isUndefined=Dv});var er=y(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.StringOptions=void 0;var zn=Z(),Ov=function(){function t(e){this.doubleQuotes=!1,this.indent=" ",this.newline=`
22
+ `,this.pretty=!0,(0,zn.isUndefined)(e.doubleQuotes)||(this.doubleQuotes=e.doubleQuotes),(0,zn.isUndefined)(e.indent)||(this.indent=e.indent),(0,zn.isUndefined)(e.newline)||(this.newline=e.newline),(0,zn.isUndefined)(e.pretty)||(this.pretty=e.pretty)}return t}();Wn.StringOptions=Ov});var Vn=y(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.escapeDoubleQuotes=Te.escapeSingleQuotes=Te.escapeRightAngleBracketsInCdataTerminator=Te.escapeLeftAngleBrackets=Te.escapeAmpersands=void 0;function Iv(t){return t.replace(/&/g,"&amp;")}Te.escapeAmpersands=Iv;function Av(t){return t.replace(/</g,"&lt;")}Te.escapeLeftAngleBrackets=Av;function Fv(t){return t.replace(/]]>/g,"]]&gt;")}Te.escapeRightAngleBracketsInCdataTerminator=Fv;function Rv(t){return t.replace(/'/g,"&apos;")}Te.escapeSingleQuotes=Rv;function kv(t){return t.replace(/"/g,"&quot;")}Te.escapeDoubleQuotes=kv});var ao=y(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});var Tv=ae(),sd=Vn(),so=Z(),Mv=function(){function t(e,r,n){this._validation=r,(0,so.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,so.fixChar)(e);else if(this._validation&&!(0,so.validateChar)(e))throw new Error((0,Tv.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,sd.escapeAmpersands)(e),e=(0,sd.escapeLeftAngleBrackets)(e),e},t.prototype.up=function(){return this._parent},t}();oo.default=Mv});var Yn=y(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});var od=ae(),ad=Z(),qv=function(){function t(e,r,n){this._hex=!1,this._validation=r,this._parent=e,this.char=n.char,(0,ad.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,ad.validateSingleChar)(e))throw new Error((0,od.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,od.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}();co.default=qv});var Kn=y(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});var jv=ae(),Nv=Z(),Lv=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,Nv.validateName)(e))throw new Error((0,jv.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}();uo.default=Lv});var Qn=y(Pr=>{"use strict";var ho=Pr&&Pr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Pr,"__esModule",{value:!0});var lo=ae(),cd=Vn(),$v=er(),fo=Z(),Bv=ho(ao()),Uv=ho(Yn()),Xv=ho(Kn()),Gv=function(){function t(e,r,n){this._validation=r,(0,fo.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,fo.fixName)(e),e.length===0)throw new Error((0,lo.getContext)(this.up())+": attribute name should not be empty")}else if(this._validation&&!(0,fo.validateName)(e))throw e.length===0?new Error((0,lo.getContext)(this.up())+": attribute name should not be empty"):new Error((0,lo.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 Uv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entityRef=function(e){var r=new Xv.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 $v.StringOptions(e),n=r.doubleQuotes?'"':"'",i=this._name+"="+n,s=0,o=this._children;s<o.length;s++){var a=o[s];r.doubleQuotes?i+=(0,cd.escapeDoubleQuotes)(a.toString()):i+=(0,cd.escapeSingleQuotes)(a.toString())}return i+=n,i},t.prototype.up=function(){return this._parent},t}();Pr.default=Gv});var mo=y(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});var Hv=ae(),Jv=Z(),zv=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,Jv.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}();po.default=zv});var yo=y(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});var Wv=ae(),Vv=Z(),Yv=function(){function t(e,r,n){this._validation=r,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._validation&&!(0,Vv.validateChar)(e))throw new Error((0,Wv.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}();go.default=Yv});var bo=y(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});var Kv=ae(),Qv=Z(),Zv=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,Qv.validateChar)(e))throw new Error((0,Kv.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}();vo.default=Zv});var _o=y(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});var e1=ae(),t1=Z(),r1=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,t1.validateChar)(e))throw new Error((0,e1.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}();wo.default=r1});var xo=y(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});var n1=ae(),i1=Z(),s1=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,i1.validateName)(e))throw new Error((0,n1.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}();So.default=s1});var Dr=y(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});var Zn=ae(),ei=Z(),o1=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,ei.isUndefined)(e)){if(this._validation&&!(0,ei.validateChar)(e))throw new Error((0,Zn.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,Zn.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,ei.validateName)(e))throw new Error((0,Zn.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,Zn.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,ei.isUndefined)(this._content)?"<?"+this._target+"?>":"<?"+this._target+" "+this._content+"?>"},t.prototype.up=function(){return this._parent},t}();Eo.default=o1});var ti=y(Pt=>{"use strict";var Dt=Pt&&Pt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Pt,"__esModule",{value:!0});Pt.validatePubId=void 0;var dt=ae(),a1=er(),We=Z(),c1=Dt(Or()),u1=Dt(mo()),l1=Dt(yo()),f1=Dt(bo()),h1=Dt(_o()),d1=Dt(xo()),p1=Dt(Dr()),m1=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,dt.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&&!ud(e))throw new Error((0,dt.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,dt.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,dt.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,dt.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 u1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new c1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.element=function(e){var r=new l1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entity=function(e){var r=new f1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.notation=function(e){var r=new h1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.paramEntityRef=function(e){var r=new d1.default(this,this._validation,e);return this._children.push(r),r},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=new a1.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,dt.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,s=this._children;i<s.length;i++){var o=s[i];r.pretty&&(n+=r.newline+r.indent),n+=o.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,dt.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,dt.getContext)(this)+": doubleQuotes option inconsistent with DTD system identifier or public identifier");n+="'"+r+"'"}return n},t}();Pt.default=m1;function ud(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}Pt.validatePubId=ud});var Do=y(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});var ld=ae(),Co=Z(),g1=function(){function t(e,r,n){this._validation=r,(0,Co.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,Co.fixChar)(e);else if(this._validation&&!(0,Co.validateChar)(e))throw new Error((0,ld.getContext)(this.up())+": CDATA section"+(' "'+e+'" should not contain characters')+" not allowed in XML");if(this._replaceInvalidCharsInCharData)e=e.replace("]]>","\uFFFD\uFFFD\uFFFD");else if(this._validation&&e.indexOf("]]>")!==-1)throw new Error((0,ld.getContext)(this.up())+": CDATA section"+(' "'+e+'" should not contain the string')+" ']]>'");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<![CDATA["+this._charData+"]]>"},t.prototype.up=function(){return this._parent},t}();Po.default=g1});var Fo=y(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});var y1=ae(),Oo=Vn(),Io=Z(),v1=function(){function t(e,r,n){this._validation=r,(0,Io.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,Io.fixChar)(e);else if(this._validation&&!(0,Io.validateChar)(e))throw new Error((0,y1.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,Oo.escapeAmpersands)(e),e=(0,Oo.escapeLeftAngleBrackets)(e),e=(0,Oo.escapeRightAngleBracketsInCdataTerminator)(e),e},t.prototype.up=function(){return this._parent},t}();Ao.default=v1});var si=y(Fr=>{"use strict";var Ot=Fr&&Fr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Fr,"__esModule",{value:!0});var ri=ae(),b1=er(),Ir=Z(),fd=Ot(Qn()),w1=Ot(Do()),Ar=Ot(Fo()),ni=Ot(Yn()),_1=Ot(Or()),ii=Ot(Kn()),S1=Ot(Dr()),x1=function(){function t(e,r,n){this._validation=r,(0,Ir.isUndefined)(n.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=n.replaceInvalidCharsInName,(0,Ir.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,Ir.fixName)(e),e.length===0)throw new Error((0,ri.getContext)(this.up())+": element name should not be empty")}else if(this._validation&&!(0,Ir.validateName)(e))throw e.length===0?new Error((0,ri.getContext)(this.up())+": element name should not be empty"):new Error((0,ri.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,ri.getContext)(this.up())+': element "'+this.name+'" already contains an attribute with the'+(' name "'+e.name+'"'));var r=new fd.default(this,this._validation,e);return this._children.push(r),this._attributeNames.push(e.name),r},t.prototype.cdata=function(e){var r=new w1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.charData=function(e){var r=new Ar.default(this,this._validation,e);return this._children.push(r),r},t.prototype.charRef=function(e){var r=new ni.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new _1.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 ii.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new S1.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 b1.StringOptions(e),i=r+n.indent,s="<"+this._name,o=[],a=0,c=this._children;a<c.length;a++){var f=c[a];f instanceof fd.default?s+=" "+f.toString(e):o.push(f)}if(o.length>0){for(var u="",p=0;p<o.length;p++){var g=o[p],m="";g instanceof t?m+=g.toStringWithIndent(n,i):m+=g.toString();var b=p>0?o[p-1]:void 0;g instanceof Ar.default&&g.toString()===""||(n.pretty&&(this.allSameLineNodes(o)||p>0&&this.onSameLine(g,b)||(m=n.newline+i+m)),u+=m)}n.pretty&&(this.allSameLineNodes(o)||(u+=n.newline+r)),u.length===0&&this._useSelfClosingTagIfEmpty?s+="/>":s+=">"+u+"</"+this._name+">"}else this._useSelfClosingTagIfEmpty?s+="/>":s+="></"+this._name+">";return s},t.prototype.allSameLineNodes=function(e){for(var r=0,n=e;r<n.length;r++){var i=n[r];if(!(i instanceof ni.default||i instanceof ii.default||i instanceof Ar.default))return!1}return!0},t.prototype.onSameLine=function(e,r){return(e instanceof ni.default||e instanceof ii.default||e instanceof Ar.default)&&!(0,Ir.isUndefined)(r)&&(r instanceof ni.default||r instanceof ii.default||r instanceof Ar.default)},t}();Fr.default=x1});var ae=y(tr=>{"use strict";var ai=tr&&tr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(tr,"__esModule",{value:!0});tr.getContext=void 0;var E1=ai(Qn()),C1=ai(ci()),P1=ai(ti()),D1=ai(si());function oi(t){if(t instanceof E1.default)return oi(t.up())+(' > attribute "'+t.name+'"');if(t instanceof C1.default)return"in XML document";if(t instanceof P1.default)return oi(t.up())+" > DTD";if(t instanceof D1.default)return oi(t.up())+(' > element "'+t.name+'"');throw new Error("Unrecognized object of type "+Object.prototype.toString.call(t))}tr.getContext=oi});var Or=y(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});var Ro=ae(),ko=Z(),O1=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,Ro.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,Ro.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,Ro.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}();To.default=O1});var jo=y(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});var Mo=ae(),I1=er(),Rr=Z(),A1=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,Rr.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,Rr.isUndefined)(e)&&!F1(e))throw new Error((0,Mo.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,Rr.isUndefined)(e)&&e!=="yes"&&e!=="no")throw new Error((0,Mo.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&&!R1(e))throw new Error((0,Mo.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 I1.StringOptions(e),n=r.doubleQuotes?'"':"'",i="<?xml version="+n+this._version+n;return(0,Rr.isUndefined)(this._encoding)||(i+=" encoding="+n+this._encoding+n),(0,Rr.isUndefined)(this._standalone)||(i+=" standalone="+n+this._standalone+n),i+="?>",i},t.prototype.up=function(){return this._parent},t}();qo.default=A1;function F1(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 R1(t){for(var e=0;e<=9;e++)if(t==="1."+e)return!0;return!1}});var ci=y(Tr=>{"use strict";var Mr=Tr&&Tr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Tr,"__esModule",{value:!0});var k1=er(),T1=Z(),M1=Mr(Or()),hd=Mr(jo()),dd=Mr(ti()),kr=Mr(si()),q1=Mr(Dr()),j1=function(){function t(e){this._children=[],this._validation=(0,T1.isUndefined)(e.validation)?!0:e.validation}return t.prototype.comment=function(e){var r=new M1.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 hd.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 kr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: DTD must precede the root element");var n=new dd.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 kr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: only one root element is permitted");var n=new kr.default(this,this._validation,e);return this._children.push(n),n},t.prototype.procInst=function(e){var r=new q1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});var r=this._children.filter(function(f){return f instanceof kr.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 k1.StringOptions(e),i="",s=0,o=this._children;s<o.length;s++){var a=o[s];a instanceof hd.default||a instanceof dd.default||a instanceof kr.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}();Tr.default=j1});var pd=y(k=>{"use strict";var te=k&&k.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(k,"__esModule",{value:!0});k.document=k.XmlProcInst=k.XmlEntityRef=k.XmlElement=k.XmlDtdParamEntityRef=k.XmlDtdNotation=k.XmlDtdEntity=k.XmlDtdElement=k.XmlDtdAttlist=k.XmlDtd=k.XmlDocument=k.XmlDecl=k.XmlComment=k.XmlCharRef=k.XmlCharData=k.XmlCdata=k.XmlAttributeText=k.XmlAttribute=void 0;var N1=te(ci()),L1=Qn();Object.defineProperty(k,"XmlAttribute",{enumerable:!0,get:function(){return te(L1).default}});var $1=ao();Object.defineProperty(k,"XmlAttributeText",{enumerable:!0,get:function(){return te($1).default}});var B1=Do();Object.defineProperty(k,"XmlCdata",{enumerable:!0,get:function(){return te(B1).default}});var U1=Fo();Object.defineProperty(k,"XmlCharData",{enumerable:!0,get:function(){return te(U1).default}});var X1=Yn();Object.defineProperty(k,"XmlCharRef",{enumerable:!0,get:function(){return te(X1).default}});var G1=Or();Object.defineProperty(k,"XmlComment",{enumerable:!0,get:function(){return te(G1).default}});var H1=jo();Object.defineProperty(k,"XmlDecl",{enumerable:!0,get:function(){return te(H1).default}});var J1=ci();Object.defineProperty(k,"XmlDocument",{enumerable:!0,get:function(){return te(J1).default}});var z1=ti();Object.defineProperty(k,"XmlDtd",{enumerable:!0,get:function(){return te(z1).default}});var W1=mo();Object.defineProperty(k,"XmlDtdAttlist",{enumerable:!0,get:function(){return te(W1).default}});var V1=yo();Object.defineProperty(k,"XmlDtdElement",{enumerable:!0,get:function(){return te(V1).default}});var Y1=bo();Object.defineProperty(k,"XmlDtdEntity",{enumerable:!0,get:function(){return te(Y1).default}});var K1=_o();Object.defineProperty(k,"XmlDtdNotation",{enumerable:!0,get:function(){return te(K1).default}});var Q1=xo();Object.defineProperty(k,"XmlDtdParamEntityRef",{enumerable:!0,get:function(){return te(Q1).default}});var Z1=si();Object.defineProperty(k,"XmlElement",{enumerable:!0,get:function(){return te(Z1).default}});var eb=Kn();Object.defineProperty(k,"XmlEntityRef",{enumerable:!0,get:function(){return te(eb).default}});var tb=Dr();Object.defineProperty(k,"XmlProcInst",{enumerable:!0,get:function(){return te(tb).default}});function rb(t){return t===void 0&&(t={}),new N1.default(t)}k.document=rb});var No=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 md(t){return Object.prototype.toString.call(t)==="[object Undefined]"}re.isUndefined=md;function gd(t){return Object.prototype.toString.call(t)==="[object Null]"}re.isNull=gd;function nb(t){return Object.prototype.toString.call(t)==="[object Object]"}re.isObject=nb;function ib(t){return Object.prototype.toString.call(t)==="[object Array]"}re.isArray=ib;function yd(t){return Object.prototype.toString.call(t)==="[object Function]"}re.isFunction=yd;function sb(t){return Object.prototype.toString.call(t)==="[object Set]"}re.isSet=sb;function ob(t){return Object.prototype.toString.call(t)==="[object Map]"}re.isMap=ob;function ab(t){return!md(t)&&!gd(t)&&yd(t?.toString)&&(t=t.toString()),String(t)}re.stringify=ab});var xd=y(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.WrapHandlers=Ie.TypeHandlers=Ie.FormatOptions=Ie.DtdOptions=Ie.DeclarationOptions=Ie.Options=void 0;var $e=No(),cb=function(){function t(e){e===void 0&&(e={}),this.aliasString="=",this.attributeString="@",this.cdataInvalidChars=!1,this.cdataKeys=[],this.replaceInvalidChars=!1,this.useSelfClosingTagIfEmpty=!0,this.validation=!0,this.valueString="#",(0,$e.isUndefined)(e.validation)||(this.validation=e.validation),(0,$e.isUndefined)(e.aliasString)||(this.aliasString=e.aliasString),(0,$e.isUndefined)(e.attributeString)||(this.attributeString=e.attributeString),(0,$e.isUndefined)(e.cdataInvalidChars)||(this.cdataInvalidChars=e.cdataInvalidChars),(0,$e.isUndefined)(e.cdataKeys)||(this.cdataKeys=e.cdataKeys),this.declaration=new vd(e.declaration),this.dtd=new bd(this.validation,e.dtd),this.format=new wd(e.format),(0,$e.isUndefined)(e.replaceInvalidChars)||(this.replaceInvalidChars=e.replaceInvalidChars),this.typeHandlers=new _d(e.typeHandlers),(0,$e.isUndefined)(e.useSelfClosingTagIfEmpty)||(this.useSelfClosingTagIfEmpty=e.useSelfClosingTagIfEmpty),(0,$e.isUndefined)(e.valueString)||(this.valueString=e.valueString),this.wrapHandlers=new Sd(e.wrapHandlers)}return t}();Ie.Options=cb;var vd=function(){function t(e){e===void 0&&(e={}),this.include=!0,(0,$e.isUndefined)(e.include)||(this.include=e.include),this.encoding=e.encoding,this.standalone=e.standalone,this.version=e.version}return t}();Ie.DeclarationOptions=vd;var bd=function(){function t(e,r){if(r===void 0&&(r={}),this.include=!1,(0,$e.isUndefined)(r.include)||(this.include=r.include),e&&(0,$e.isUndefined)(r.name)&&this.include)throw new Error("options.dtd.name should be defined if options.dtd.include is true");this.name=r.name,this.sysId=r.sysId,this.pubId=r.pubId}return t}();Ie.DtdOptions=bd;var wd=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}();Ie.FormatOptions=wd;var _d=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}();Ie.TypeHandlers=_d;var Sd=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}();Ie.WrapHandlers=Sd});var Id=y(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.parse=pt.parseToExistingElement=pt.Absent=void 0;var Cd=pd(),Pd=xd(),V=No(),Lo=function(){function t(){}return Object.defineProperty(t,"instance",{get:function(){return t._instance},enumerable:!1,configurable:!0}),t._instance=new t,t}();pt.Absent=Lo;function $o(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 Dd(t,e,r){var n=function(o){return r.cdataInvalidChars&&(o.indexOf("<")!==-1||o.indexOf("&")!==-1)||r.cdataKeys.indexOf(e.name)!==-1||r.cdataKeys.indexOf("*")!==-1};if(e instanceof Cd.XmlElement)if(n(t))for(var i=t.split("]]>"),s=0;s<i.length;s++)n(i[s])?e.cdata({charData:i[s],replaceInvalidCharsInCharData:r.replaceInvalidChars}):e.charData({charData:i[s],replaceInvalidCharsInCharData:r.replaceInvalidChars}),s<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 ub(t,e,r,n){var i=r.attribute({name:t,replaceInvalidCharsInName:n.replaceInvalidChars});Dd((0,V.stringify)(e),i,n)}function Ed(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,s=Object.keys(e);i<s.length;i++){var o=s[i];ub(o,(0,V.stringify)(e[o]),r,n)}return}if(t.indexOf(n.valueString)===0){ui(t,(0,V.stringify)(e),r,n);return}var a=r;if(!(0,V.isArray)(e)&&!(0,V.isSet)(e)){var c=$o(e,n);if(!(0,V.isUndefined)(c)&&c(e)===Lo.instance)return;a=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}ui(t,e,a,n)}function lb(t,e,r){if((0,V.isMap)(t))t.forEach(function(o,a){Ed((0,V.stringify)(a),o,e,r)});else for(var n=0,i=Object.keys(t);n<i.length;n++){var s=i[n];Ed(s,t[s],e,r)}}function fb(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 s=t,o=r;if(!(0,V.isUndefined)(i)){var a=i(s,e);(0,V.isNull)(a)||(s=a,o=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty}))}e.forEach(function(c){var f=o;if(!(0,V.isArray)(c)&&!(0,V.isSet)(c)){var u=$o(c,n);if(!(0,V.isUndefined)(u)&&u(c)===Lo.instance)return;f=o.element({name:s,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}ui(s,c,f,n)})}function ui(t,e,r,n){var i=$o(e,n);if((0,V.isUndefined)(i)||(e=i(e)),(0,V.isObject)(e)||(0,V.isMap)(e)){lb(e,r,n);return}if((0,V.isArray)(e)||(0,V.isSet)(e)){fb(t,e,r,n);return}Dd((0,V.stringify)(e),r,n)}function Od(t,e,r){var n=new Pd.Options(r);ui(t.name,e,t,n)}pt.parseToExistingElement=Od;function hb(t,e,r){var n=new Pd.Options(r),i=new Cd.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 s=i.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty});return Od(s,e,r),i.toString(n.format)}pt.parse=hb});var Hd=require("node:child_process"),Xo=F(require("node:fs")),Nr=F(require("node:path"));var af=F(it());var Qe=F(require("node:path")),Ne=F(yt());var je=F(require("node:fs")),ze=F(require("node:path")),_e=F(yt());var Ke=F(require("node:fs")),Pe=F(require("node:path")),Sn=F(yt());var as=F(require("node:path")),os=F(ln()),jl=F(it()),Xe=F(yt()),Nl=F(bl()),Ll=F(_n());var $l=Q();jl.default.config();var N2=!!process.env.GRIDDO_DEBUG_LOGS&&!!JSON.parse(process.env.GRIDDO_DEBUG_LOGS),Sg=!!process.env.GRIDDO_BUILD_LOGS&&!!JSON.parse(process.env.GRIDDO_BUILD_LOGS)||!!process.env.LOGS&&!!JSON.parse(process.env.LOGS),L2=Ll.default.sync();function Bl(t){let e=[];return Xe.default.readdirSync(t).forEach(n=>{let i=`${t}/${n}`;e.push(i)}),e}function Ge(t,e="",r=1,n=1){let i=t.split(`
23
+ `).map(b=>b.trim()),s=e?` ${e} `:"",o=e?s.length:0,a=Math.max(...i.map(b=>b.length))+r*2,c=Math.max(a,o),f=`\u2502${" ".repeat(c)}\u2502
24
24
  `.repeat(n),u=c,p=`\u256D${s}${"\u2500".repeat(u-o)}\u256E
25
- `,g=`\u2570${"\u2500".repeat(u)}\u256F`,m=i.map(b=>{let S=" ".repeat(c-b.length-r);return`\u2502${" ".repeat(r)}${b}${S}\u2502
26
- `}).join("");console.log(`${p}${d}${m}${d}${g}`)}function vt(t){xg&&console.info(t.replace(/(\s)\s+/g,"$1"))}function $l(t){return new Promise(e=>setTimeout(e,t))}function ss(t,e=3){return(t/1e3).toFixed(e)}function os(t){return"site"in t&&t.site?t?.site:void 0}function as(t,e){for(let r in t)e.includes(r)?delete t[r]:typeof t[r]=="object"&&as(t[r],e)}function cs(t){return t.map(({name:e,id:r})=>`${e} (${r})`).join(", ")}function Bl(t){let{version:e}=JSON.parse(Ge.default.readFileSync(Ml.default.resolve(__dirname,"../package.json"),"utf-8")),r=`
25
+ `,g=`\u2570${"\u2500".repeat(u)}\u256F`,m=i.map(b=>{let _=" ".repeat(c-b.length-r);return`\u2502${" ".repeat(r)}${b}${_}\u2502
26
+ `}).join("");console.log(`${p}${f}${m}${f}${g}`)}function bt(t){Sg&&console.info(t.replace(/(\s)\s+/g,"$1"))}function Ul(t){return new Promise(e=>setTimeout(e,t))}function cs(t,e=3){return(t/1e3).toFixed(e)}function us(t){return"site"in t&&t.site?t?.site:void 0}function ls(t,e){for(let r in t)e.includes(r)?delete t[r]:typeof t[r]=="object"&&ls(t[r],e)}function fs(t){return t.map(({name:e,id:r})=>`${e} (${r})`).join(", ")}function Xl(t){let{__cx:e}=$l.paths(),{version:r}=JSON.parse(Xe.default.readFileSync(as.default.join(e,"package.json"),"utf-8")),n=`
27
27
  \xB7\xB7
28
- \xB7\xB7 Griddo Exporter ${e}
28
+ \xB7\xB7 Griddo Exporter ${r}
29
29
  \xB7\xB7 Adapter: ${t}
30
30
  \xB7\xB7
31
- `;console.log(Nl.default.cristal(r))}function Ul(t){let e=Ge.default.readdirSync(t),r={},n=e.filter(s=>{let o=`${t}/${s}`,a=Ge.default.readJSONSync(o,"utf-8"),{id:c,entity:d,fullUrl:u}=a;return!!(c&&d&&u)});for(let s of n){let o=`${t}/${s}`,a=Ge.default.readJSONSync(o,"utf-8"),c=Ge.default.statSync(o).mtimeMs,{id:d}=a;(!r[d]||c>Ge.default.statSync(`${t}/${r[d]}`).mtimeMs)&&(r[d]=s)}let i=0;for(let s of n){let o=`${t}/${s}`,a=Ge.default.readJSONSync(o,"utf-8"),{id:c}=a;s!==r[c]&&(Ge.default.unlinkSync(o),i++)}console.log(`Sanitize apiCache dir for ${i} files`)}async function us(...t){let e=process.hrtime();for(let s of t)await s();let[r,n]=process.hrtime(e);return+(r+n/1e9).toFixed(3)}function Je(t){if(JSON.parse(process.env.GRIDDO_RENDER_BREAKPOINTS_FEATURE||"false"))return new Promise(r=>{console.log(`
32
- `),He(`\u231B\uFE0F ${t}`,"",1,0),process.stdin.once("data",()=>{r()})})}async function ze(t){let{steps:e,name:r,attempts:n}=t,i=0,s=n||1;for(;i<s;)try{console.info(`
33
- ${ns.default.blue("info")} start ${r} life-cycle`);let o=await us(...e);console.info(`${ns.default.green("success")} ${r} - ${o}s`);break}catch{console.log(`Error in ${r}. Attempt (${i+1})`),i++}if(i===s)throw new Error(`Exceeded maximum retry attempts (${s}) for ${r} LifeCycle`)}var ut=A(require("node:fs")),Xl=A(require("node:fs/promises")),be=A(require("node:path")),vn=A(gt());async function*Eg(t){let e=be.default.resolve(t),r=Ll(e).filter(n=>be.default.extname(n)===".json");for(let n of r)try{let i=await Xl.default.stat(n),s=await vn.default.readJSON(n,{encoding:"utf-8"});s.size=i.size/1024,s.path&&(yield s)}catch(i){console.error(`Error: The file ${n} doesn't exist`,i)}}async function ls(){let e=De().dirs(),r=be.default.join(e.__cx,"store"),{sitesToPublish:n,createdPages:i,buildProcessData:s}=vn.default.readJSONSync(be.default.resolve(r,"metadata","render-info.json"));return{buildProcessData:s,createdPages:i,sitesToPublish:n}}function Gl(t){ut.default.existsSync(t)||(ut.default.mkdirSync(t),ut.default.mkdirSync(be.default.resolve(t,"metadata"))),console.info("Store initialized")}function Hl(t,e){ut.default.writeFileSync(be.default.resolve(t,"metadata","render-info.json"),JSON.stringify(e))}function Cg(t,e){return fs(t).filter(i=>e.includes(i))}function fs(t){return ut.default.readdirSync(t).filter(r=>{let n=`${t}/${r}`,i=ut.default.statSync(n);if(i&&i.isDirectory()||be.default.extname(r)!==".json")return!1;let s=be.default.basename(r,be.default.extname(r));return!isNaN(parseInt(s))}).map(r=>{let n=be.default.basename(r,be.default.extname(r));return parseInt(n)})}function Jl(t,e){e.forEach(r=>{as(r,["editorID","parentEditorID"]);let n=`${r.context.page.id}.json`,i=be.default.resolve(t,n);vn.default.writeJSONSync(i,r)})}function bn(t,e){e.length!==0&&e.forEach(r=>{let n=be.default.resolve(t,`${r}.json`);try{ut.default.unlinkSync(n)}catch(i){console.log(`Error removing file ${r}`,i.message)}})}async function zl(t,e){let{changedPages:r,pages:n,validPagesIds:i,sitesToPublish:s}=e,o=Cg(t,n),a=i.filter(m=>!o.includes(m)),c=a.concat(r),d=o.filter(m=>!i.includes(m)),u=Array.from(new Set(c)).filter(m=>!d.includes(m)),p=Eg(be.default.resolve(__dirname,"../store")),g=[];for await(let m of p){let b=m.context.page.site,S=m.context.page.id;s.map(x=>x.id).includes(b)||g.push(S)}return{pagesInStore:o,pagesMissingInStore:a,pagesToDeleteFromStore:[...d,...g],pagesToWriteToStore:u}}var ds=t=>{let e=t||Ne.default.resolve(jl,"dist");if(!we.default.statSync(e).isDirectory())return;let n=we.default.readdirSync(e);if(n.length>0){let s=n.length,o=n.filter(a=>Ne.default.extname(a).toLowerCase()===".xml").length;s===o&&(n.forEach(function(a){let c=Ne.default.join(e,a);we.default.rmSync(c)}),n=we.default.readdirSync(e)),n.forEach(function(a){let c=Ne.default.join(e,a);ds(c)}),n=we.default.readdirSync(e)}if(n.length===0){we.default.rmdirSync(e);return}};function wn(t,e){for(let r of t)je.default.existsSync(r)||je.default.mkdirSync(r,{recursive:!0,...e})}function _n(t,e,r,n={withBackup:!1}){let{withBackup:i}=n;for(let s of r){let o=Ne.default.join(t,s),a=Ne.default.join(e,s);if(!we.default.existsSync(o)){console.log(`Source directory does not exist: ${o}`);continue}i&&Yl(a);try{we.default.existsSync(a)&&je.default.rmSync(a,{recursive:!0,force:!0}),je.default.cpSync(o,a,{recursive:!0}),i&&Vl(a)}catch{console.log("Copy failed!"),i&&(Wl(a),console.log("Backup has been restored."))}}}function Gt(t,e,r,n){let{override:i,withBackup:s}=n||{};for(let o of r){let a=Ne.default.join(t,o),c=Ne.default.join(e,o);if(we.default.existsSync(a)){s&&Yl(c);try{i&&we.default.existsSync(c)&&je.default.rmSync(c,{recursive:!0,force:!0}),je.default.renameSync(a,c),s&&Vl(c)}catch{console.log("Move failed!"),s&&(Wl(c),console.log("Backup has been restored."))}}}}function yr(t,e){for(let r of e){if(!r)continue;let n=Ne.default.join(t,r);we.default.existsSync(n)&&je.default.rmSync(n,{recursive:!0,force:!0})}}function Wl(t,e="-BACKUP"){let r=t+e;try{je.default.renameSync(r,t),console.log(`Backup ${r} has been restored`)}catch{console.log(`Error while delete ${r} backup`)}}function Vl(t,e="-BACKUP"){let r=t+e;if(we.default.existsSync(r))try{je.default.rmSync(r,{recursive:!0,force:!0}),console.log(`Backup ${r} has been deleted`)}catch{console.log(`Error while delete ${r} backup`)}}function Yl(t,e="-BACKUP"){let r=t+e;if(we.default.existsSync(t)){if(we.default.existsSync(r)){console.log(`Destination ${r} already exists`);return}try{je.default.renameSync(t,r),console.log(`Backup of ${t} has been created in ${r}`)}catch{console.log(`Error while coping ${t} to ${r} backup`)}}}function Pg(t){return Number.isInteger(t)&&t<0}async function Kl(){let e=De().dirs(),r=Ne.default.join(e.__cx,"store");try{let n=fs(r).filter(Pg);bn(r,n)}catch{console.info("`store` folder does not exist. Skipping multipage or static list template cleaning.")}}function De(){try{return(nf(),ep(rf)).default}catch{console.log("Error while reading configuration file"),process.exit(1)}}async function sf(t,e){let n=De().dirs(t),i=Ye.default.resolve(n.__cx,"dist"),s=Ye.default.resolve(n.__cx,"assets"),o=Ye.default.join(n.__cx,"dist",t),a=Ye.default.resolve(n.__ssg,"public");console.log(a);let c=Le.default.readdirSync(a).filter(S=>Ye.default.extname(S)===".js"||Ye.default.extname(S)===".json"||Ye.default.extname(S)===".css"),d=`${a}/page-data`,u=`${s}/page-data`,p=Ye.default.resolve(n.__ssg,"static"),g=s,m=`${i}/static`,b=`${s}/static`;try{Le.default.mkdirSync(s,{recursive:!0}),Le.default.copySync(a,i),e&&(Le.default.copySync(d,u),Le.default.existsSync(p)&&Le.default.copySync(p,g,{overwrite:!1}),Le.default.copySync(m,b,{overwrite:!1}),Le.default.existsSync(p)&&Le.default.copySync(p,o,{overwrite:!1}),c.map(async S=>{let x=`${a}/${S}`,F=`${s}/${S}`;Le.default.copySync(x,F)}))}catch(S){console.error(S)}}of.default.config();var Ke={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 af(t){let{proDomain:e}=De(),r=process.env.GRIDDO_ASSET_PREFIX||process.env.ASSET_PREFIX;return!r||!t||!t.startsWith(e)?"":`${r}/${t}`}function gs(t,e,r,n="jpg"){let i=typeof t=="string"?t:t?.url;return i?i.split("/")[2].includes("cloudinary.com")?Ng(i,`c_fill,w_${e},h_${r}`):qg(i,`f/${n}/w/${e}/h/${r}`):null}function qg(t,e){let r=t.split("/"),n=r.slice(0,-1).join("/"),i=r.slice(-1)[0];return`${n}/${e}/${i}`}function Ng(t,e){let r=t.replace("https://",""),n=r.split("/").slice(0,4).join("/"),i=r.replace(n,"");return`https://${n}/${e}${i}`}var Vs=A(require("node:fs")),Ys=A(require("node:path")),Wd=A(tt());var Hd=A(Gs()),Jd=A(on()),zd=A(tt());var Md=A(require("node:crypto")),Et=A(require("node:fs")),Hs=A(require("node:path")),Js=A(gt()),$n=Hs.default.resolve(__dirname,"./../apiCache"),qd=`${$n}/siteHash.json`;function Nd(){Et.default.existsSync($n)||Et.default.mkdirSync($n),console.info("Cache initialized")}function jd(t){let e=Md.default.createHash("sha256");return e.update(JSON.stringify(t)),`${$n}/${e.digest("hex")}`}function Ld(t,e){let r=typeof e=="string"?e:JSON.stringify(e),n=jd(t),i=Hs.default.dirname(n);Et.default.existsSync(i)||Et.default.mkdirSync(i,{recursive:!0}),Et.default.writeFileSync(n,r,"utf8")}function $d(t){try{let e=jd(t);return Js.default.readJSONSync(e,{encoding:"utf-8"})}catch{return null}}function dv(){try{return Js.default.readJSONSync(qd,{encoding:"utf-8"})||{}}catch{return{}}}function Bd(t,e){let r=dv(),n=r[t],i=e||n||new Date().valueOf();return i!==n&&(r[t]=i,Et.default.writeFileSync(qd,JSON.stringify(r),{encoding:"utf-8"})),i.toString()}var Ud=A(Gs()),Xd=A(on()),zs=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,Ud.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(Xd.default.red(`
31
+ `;console.log(Nl.default.cristal(n))}function Gl(){let{__cx:t}=$l.paths(),e=as.default.join(t,"apiCache"),r=Xe.default.readdirSync(e),n={},i=r.filter(o=>{let a=`${e}/${o}`,c=Xe.default.readJSONSync(a,"utf-8"),{id:f,entity:u,fullUrl:p}=c;return!!(f&&u&&p)});for(let o of i){let a=`${e}/${o}`,c=Xe.default.readJSONSync(a,"utf-8"),f=Xe.default.statSync(a).mtimeMs,{id:u}=c;(!n[u]||f>Xe.default.statSync(`${e}/${n[u]}`).mtimeMs)&&(n[u]=o)}let s=0;for(let o of i){let a=`${e}/${o}`,c=Xe.default.readJSONSync(a,"utf-8"),{id:f}=c;o!==n[f]&&(Xe.default.unlinkSync(a),s++)}console.log(`Sanitize apiCache dir for ${s} files`)}async function hs(...t){let e=process.hrtime();for(let s of t)await s();let[r,n]=process.hrtime(e);return+(r+n/1e9).toFixed(3)}function He(t){if(JSON.parse(process.env.GRIDDO_RENDER_BREAKPOINTS_FEATURE||"false"))return new Promise(r=>{console.log(`
32
+ `),Ge(`\u231B\uFE0F ${t}`,"",1,0),process.stdin.once("data",()=>{r()})})}async function Je(t){let{steps:e,name:r,attempts:n}=t,i=0,s=n||1;for(;i<s;)try{console.info(`
33
+ ${os.default.blue("info")} start ${r} life-cycle`);let o=await hs(...e);console.info(`${os.default.green("success")} ${r} - ${o}s`);break}catch{console.log(`Error in ${r}. Attempt (${i+1})`),i++}if(i===s)throw new Error(`Exceeded maximum retry attempts (${s}) for ${r} LifeCycle`)}var Ht=Q();function*xg(t){let{basePath:e,withSizeProp:r}=t||{},{__cx:n}=Ht.paths(),i=e||Pe.default.join(n,"store"),s=Bl(i).filter(o=>Pe.default.extname(o)===".json");for(let o of s)try{let a=Sn.default.readJsonSync(o,{encoding:"utf-8"});if(r){let c=Ke.default.statSync(o);a.size=c.size/1024}a.path&&(yield a)}catch(a){console.error(`Error: The file ${o} doesn't exist`,a)}}async function ds(){let{__cx:t}=Ht.paths(),{sitesToPublish:e,createdPages:r,buildProcessData:n}=Sn.default.readJSONSync(Pe.default.join(t,"store","metadata","render-info.json"));return{buildProcessData:n,createdPages:r,sitesToPublish:e}}function Hl(){let{__cx:t}=Ht.paths(),e=Pe.default.join(t,"store");Ke.default.existsSync(e)||(Ke.default.mkdirSync(e),Ke.default.mkdirSync(Pe.default.join(e,"metadata"))),console.info("Store initialized")}function Jl(t,e){let{__cx:r}=Ht.paths();Ke.default.writeFileSync(Pe.default.join(r,"store","metadata","render-info.json"),JSON.stringify(e))}function Eg(t,e){return ps(t).filter(i=>e.includes(i))}function ps(t){return Ke.default.readdirSync(t).filter(r=>{let n=`${t}/${r}`,i=Ke.default.statSync(n);if(i&&i.isDirectory()||Pe.default.extname(r)!==".json")return!1;let s=Pe.default.basename(r,Pe.default.extname(r));return!isNaN(parseInt(s))}).map(r=>{let n=Pe.default.basename(r,Pe.default.extname(r));return parseInt(n)})}function zl(t){let{__cx:e}=Ht.paths();t.forEach(r=>{ls(r,["editorID","parentEditorID"]);let n=`${r.context.page.id}.json`,i=Pe.default.join(e,"store",n);Sn.default.writeJSONSync(i,r)})}function xn(t){let{__cx:e}=Ht.paths();t.length!==0&&t.forEach(r=>{let n=Pe.default.join(e,"store",`${r}.json`);try{Ke.default.unlinkSync(n)}catch(i){console.log(`Error removing file ${r}`,i.message)}})}async function Wl(t,e){let{changedPages:r,pages:n,validPagesIds:i,sitesToPublish:s}=e,o=Eg(t,n),a=i.filter(m=>!o.includes(m)),c=a.concat(r),f=o.filter(m=>!i.includes(m)),u=Array.from(new Set(c)).filter(m=>!f.includes(m)),p=xg(),g=[];for await(let m of p){let b=m.context.page.site,_=m.context.page.id;s.map(x=>x.id).includes(b)||g.push(_)}return{pagesInStore:o,pagesMissingInStore:a,pagesToDeleteFromStore:[...f,...g],pagesToWriteToStore:u}}var Cg=Q(),ms=t=>{if(!_e.default.statSync(t).isDirectory())return;let r=_e.default.readdirSync(t);if(r.length>0){let i=r.length,s=r.filter(o=>ze.default.extname(o).toLowerCase()===".xml").length;i===s&&(r.forEach(function(o){let a=ze.default.join(t,o);_e.default.rmSync(a)}),r=_e.default.readdirSync(t)),r.forEach(function(o){let a=ze.default.join(t,o);ms(a)}),r=_e.default.readdirSync(t)}if(r.length===0){_e.default.rmdirSync(t);return}};function En(t,e){for(let r of t)je.default.existsSync(r)||je.default.mkdirSync(r,{recursive:!0,...e})}function Cn(t,e,r,n={withBackup:!1}){let{withBackup:i}=n;for(let s of r){let o=ze.default.join(t,s),a=ze.default.join(e,s);if(!_e.default.existsSync(o)){console.log(`Source directory does not exist: ${o}`);continue}i&&Kl(a);try{_e.default.existsSync(a)&&je.default.rmSync(a,{recursive:!0,force:!0}),je.default.cpSync(o,a,{recursive:!0}),i&&Yl(a)}catch{console.log("Copy failed!"),i&&(Vl(a),console.log("Backup has been restored."))}}}function Jt(t,e,r,n){let{override:i,withBackup:s}=n||{};for(let o of r){let a=ze.default.join(t,o),c=ze.default.join(e,o);if(_e.default.existsSync(a)){s&&Kl(c);try{i&&_e.default.existsSync(c)&&je.default.rmSync(c,{recursive:!0,force:!0}),je.default.renameSync(a,c),s&&Yl(c)}catch{console.log("Move failed!"),s&&(Vl(c),console.log("Backup has been restored."))}}}}function br(t,e){for(let r of e){if(!r)continue;let n=ze.default.join(t,r);_e.default.existsSync(n)&&je.default.rmSync(n,{recursive:!0,force:!0})}}function Vl(t,e="-BACKUP"){let r=t+e;try{je.default.renameSync(r,t),console.log(`Backup ${r} has been restored`)}catch{console.log(`Error while delete ${r} backup`)}}function Yl(t,e="-BACKUP"){let r=t+e;if(_e.default.existsSync(r))try{je.default.rmSync(r,{recursive:!0,force:!0}),console.log(`Backup ${r} has been deleted`)}catch{console.log(`Error while delete ${r} backup`)}}function Kl(t,e="-BACKUP"){let r=t+e;if(_e.default.existsSync(t)){if(_e.default.existsSync(r)){console.log(`Destination ${r} already exists`);return}try{je.default.renameSync(t,r),console.log(`Backup of ${t} has been created in ${r}`)}catch{console.log(`Error while coping ${t} to ${r} backup`)}}}function Pg(t){return Number.isInteger(t)&&t<0}async function Ql(){let{__cx:t}=Cg.paths(),e=ze.default.join(t,"store");try{let r=ps(e).filter(Pg);xn(r)}catch{console.info("`store` folder does not exist. Skipping multipage or static list template cleaning.")}}var qg=Q();function Q(){try{return(sf(),Zd(nf)).default}catch{console.log("Error while reading configuration file"),process.exit(1)}}async function of(t,e){let{__cx:r,__ssg:n}=qg.paths(t),i=Qe.default.join(r,"dist"),s=Qe.default.join(r,"assets"),o=Qe.default.join(r,"dist",t),a=Qe.default.join(n,"public");console.log(a);let c=Ne.default.readdirSync(a).filter(_=>Qe.default.extname(_)===".js"||Qe.default.extname(_)===".json"||Qe.default.extname(_)===".css"),f=`${a}/page-data`,u=`${s}/page-data`,p=Qe.default.join(n,"static"),g=s,m=`${i}/static`,b=`${s}/static`;try{Ne.default.mkdirSync(s,{recursive:!0}),Ne.default.copySync(a,i),e&&(Ne.default.copySync(f,u),Ne.default.existsSync(p)&&Ne.default.copySync(p,g,{overwrite:!1}),Ne.default.copySync(m,b,{overwrite:!1}),Ne.default.existsSync(p)&&Ne.default.copySync(p,o,{overwrite:!1}),c.map(async _=>{let x=`${a}/${_}`,A=`${s}/${_}`;Ne.default.copySync(x,A)}))}catch(_){console.error(_)}}af.default.config();var Ze={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 cf(t){let{proDomain:e}=Q(),r=process.env.GRIDDO_ASSET_PREFIX||process.env.ASSET_PREFIX;return!r||!t||!t.startsWith(e)?"":`${r}/${t}`}function bs(t,e,r,n="jpg"){let i=typeof t=="string"?t:t?.url;return i?i.split("/")[2].includes("cloudinary.com")?Ng(i,`c_fill,w_${e},h_${r}`):jg(i,`f/${n}/w/${e}/h/${r}`):null}function jg(t,e){let r=t.split("/"),n=r.slice(0,-1).join("/"),i=r.slice(-1)[0];return`${n}/${e}/${i}`}function Ng(t,e){let r=t.replace("https://",""),n=r.split("/").slice(0,4).join("/"),i=r.replace(n,"");return`https://${n}/${e}${i}`}var Ks=F(require("node:fs")),Qs=F(require("node:path")),Wh=F(it());var Hh=F(zs()),Jh=F(ln()),zh=F(it());var qh=F(require("node:crypto")),Ct=F(require("node:fs")),Zt=F(require("node:path")),Ws=F(yt());var Gn=Q();function jh(){let{__cx:t}=Gn.paths(),e=Zt.default.join(t,"apiCache");Ct.default.existsSync(e)||Ct.default.mkdirSync(e),console.info("Cache initialized")}function Nh(t){let{__cx:e}=Gn.paths(),r=Zt.default.join(e,"apiCache"),n=qh.default.createHash("sha256");return n.update(JSON.stringify(t)),`${r}/${n.digest("hex")}`}function Lh(t,e){let r=typeof e=="string"?e:JSON.stringify(e),n=Nh(t),i=Zt.default.dirname(n);Ct.default.existsSync(i)||Ct.default.mkdirSync(i,{recursive:!0}),Ct.default.writeFileSync(n,r,"utf8")}function $h(t){try{let e=Nh(t);return Ws.default.readJSONSync(e,{encoding:"utf-8"})}catch{return null}}function dv(){let{__cx:t}=Gn.paths(),r=`${Zt.default.join(t,"apiCache")}/siteHash.json`;try{return Ws.default.readJSONSync(r,{encoding:"utf-8"})||{}}catch{return{}}}function Bh(t,e){let r=dv(),n=r[t],i=e||n||new Date().valueOf(),{__cx:s}=Gn.paths(),a=`${Zt.default.join(s,"apiCache")}/siteHash.json`;return i!==n&&(r[t]=i,Ct.default.writeFileSync(a,JSON.stringify(r),{encoding:"utf-8"})),i.toString()}var Uh=F(zs()),Xh=F(ln()),Vs=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,Uh.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(Xh.default.red(`
34
34
  \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
35
35
  \u2502 Access credentials failure \u2502
36
36
  \u2502 Check that the login details are correct in your .env file \u2502
37
37
  \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
38
- `)),process.exit(1)}}},Qe=new zs;zd.default.config();var{env:{RETRY_WAIT_SECONDS:hv="4",RETRY_ATTEMPTS:Gd="4"}}=process;async function Ws(t,e,r=""){let{endpoint:n,body:i,cacheKey:s="",attempt:o=1,headers:a}=t,c={endpoint:n,body:i,headers:a,cacheKey:s};if(s){let d=new Date,u=$d(c);if(u){let p=os(u),g=p?`site: ${p}`:"",m=ss(new Date().getTime()-d.getTime());return vt(`${e} (cache) ${g} ${n} - ${m}s ${r}`),u}}try{let d=new Date,{data:u}=await(0,Hd.default)({url:n,method:e,headers:Object.assign({},a,Qe.headers),data:i}),p=os(u),g=p?`site: ${p}`:"",m=ss(new Date().getTime()-d.getTime());return vt(`${e} (fetch) ${g} ${n} - ${m}s ${r}`),Ld(c,u),u}catch(d){let u=d;return u.response?.status===404?null:(o>parseInt(Gd)&&(console.log(`
39
- Max attempts ${Gd} reached
38
+ `)),process.exit(1)}}},et=new Vs;zh.default.config();var{env:{RETRY_WAIT_SECONDS:pv="4",RETRY_ATTEMPTS:Gh="4"}}=process;async function Ys(t,e,r=""){let{endpoint:n,body:i,cacheKey:s="",attempt:o=1,headers:a}=t,c={endpoint:n,body:i,headers:a,cacheKey:s};if(s){let f=new Date,u=$h(c);if(u){let p=us(u),g=p?`site: ${p}`:"",m=cs(new Date().getTime()-f.getTime());return bt(`${e} (cache) ${g} ${n} - ${m}s ${r}`),u}}try{let f=new Date,{data:u}=await(0,Hh.default)({url:n,method:e,headers:Object.assign({},a,et.headers),data:i}),p=us(u),g=p?`site: ${p}`:"",m=cs(new Date().getTime()-f.getTime());return bt(`${e} (fetch) ${g} ${n} - ${m}s ${r}`),Lh(c,u),u}catch(f){let u=f;return u.response?.status===404?null:(o>parseInt(Gh)&&(console.log(`
39
+ Max attempts ${Gh} reached
40
40
  --------------------------------------
41
41
  - ${e.toUpperCase()} ${n}
42
42
  - BODY: ${JSON.stringify(i)}
43
43
  - HEADERS: ${JSON.stringify(a)}
44
44
  - RESPONSE: ${u.response?.status,JSON.stringify(u.response?.data)}
45
45
  --------------------------------------
46
- `),process.exit(1)),u.response||(console.log("Unknown error occurred"),console.log(JSON.stringify(u,null,2)),process.exit(1)),pv(u,{callInfo:{endpoint:n,body:i}}),console.warn(`Waiting for retry: ${e}`,n),await $l(parseInt(hv)*1e3),Ws({endpoint:n,body:i,headers:a,cacheKey:s,attempt:o+1},e,r))}}async function Oe(t){return await Ws(t,"get")}async function xr(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 Ws(t,"post",i||"")}function pv(t,e){let{response:r,message:n,stack:i}=t,{callInfo:s}=e,{status:o,statusText:a,data:c}=r||{},d=[];for(let m of Object.keys(s))d.push(`${m}: ${typeof s[m]=="object"?JSON.stringify(s[m]):s[m]}`);let u=d.join(`
46
+ `),process.exit(1)),u.response||(console.log("Unknown error occurred"),console.log(JSON.stringify(u,null,2)),process.exit(1)),mv(u,{callInfo:{endpoint:n,body:i}}),console.warn(`Waiting for retry: ${e}`,n),await Ul(parseInt(pv)*1e3),Ys({endpoint:n,body:i,headers:a,cacheKey:s,attempt:o+1},e,r))}}async function De(t){return await Ys(t,"get")}async function Cr(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 Ys(t,"post",i||"")}function mv(t,e){let{response:r,message:n,stack:i}=t,{callInfo:s}=e,{status:o,statusText:a,data:c}=r||{},f=[];for(let m of Object.keys(s))f.push(`${m}: ${typeof s[m]=="object"?JSON.stringify(s[m]):s[m]}`);let u=f.join(`
47
47
  `),p=r?`Code: ${o} - ${a}
48
48
  Response: ${JSON.stringify(c)}`:"",g=`${n}
49
- ${i}`;console.warn(Jd.default.bold.red(`
49
+ ${i}`;console.warn(Jh.default.bold.red(`
50
50
  =============
51
51
 
52
52
  { Call info }
@@ -59,11 +59,11 @@ ${p}
59
59
  ${g}
60
60
 
61
61
  =============
62
- `))}Wd.default.config();var Ks=class{robots;baseURL;settings;endpoint;constructor(){this.robots=[],this.baseURL=process.env.API_URL,this.settings={},this.endpoint=`${this.baseURL}/domains/robots`}async getRobots(){try{let e=await Oe({endpoint:this.endpoint});this.robots=e?.filter(r=>!!r.path).map(({path:r,content:n})=>({path:r,content:n||`User-agent: *
62
+ `))}Wh.default.config();var gv=Q(),Zs=class{robots;baseURL;settings;endpoint;constructor(){this.robots=[],this.baseURL=process.env.API_URL,this.settings={},this.endpoint=`${this.baseURL}/domains/robots`}async getRobots(){try{let e=await De({endpoint:this.endpoint});this.robots=e?.filter(r=>!!r.path).map(({path:r,content:n})=>({path:r,content:n||`User-agent: *
63
63
  \r
64
- \rAllow: /`}))||[]}catch(e){console.warn(`${this.constructor.name}: ${e.message}`)}}async writeFiles(e){let n=De().dirs(e),i=Ys.default.join(n.__cx,"dist");await this.getRobots();let s=this.robots.find(({path:o})=>o===`/${e}`);if(!s){console.log(`Robots not found for ${e}`);return}if(Vs.default.existsSync(i)){let o=Ys.default.join(i,"robots.txt");Vs.default.writeFileSync(o,s?.content)}else console.log(`${i} not found`)}},Vd=new Ks;var $o=A(require("node:path"));var jh=A(require("node:fs")),Lh=A(require("node:path")),$h=A(tt()),Bh=A(Ki());var Yd=A(tt());Yd.default.config();var Qs=process.env.API_URL,lt=`${Qs}/site/`,Ze={GET_ALL:`${Qs}/sites/all`,GET_PAGE:[`${Qs}/page/`,""],INFO:[`${lt}`,"/all"],LANGUAGES:[`${lt}`,"/languages"],BUILD_START:[`${lt}`,"/build/start"],BUILD_END:[`${lt}`,"/build/end"],GET_DISTRIBUTOR_DATA:[`${lt}`,"/distributor"],GET_SITEMAP:[`${lt}`,"/sitemap"],SOCIALS:[`${lt}`,"/socials"],GET_PAGES:[`${lt}`,"/pages?pagination=false"]},pe=class{static async getAll(){let{GET_ALL:e}=Ze;return await Oe({endpoint:e})}static async getPage(e,r){let{GET_PAGE:[n,i]}=Ze;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async getInfo(e,r=""){let{INFO:[n,i]}=Ze;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async getLanguages(e,r=""){let{LANGUAGES:[n,i]}=Ze;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async startSiteRender(e){let{BUILD_START:[r,n]}=Ze;return await Oe({endpoint:`${r}${e}${n}`})}static async endSiteRender(e,r){let{BUILD_END:[n,i]}=Ze;return await xr({endpoint:`${n}${e}${i}`,body:r})}static async getDistributorData(e,r,n,i,s){let{GET_DISTRIBUTOR_DATA:[o,a]}=Ze,c=i||e.site,d=s||e.language;return await xr({endpoint:`${o}${c}${a}`,body:r,headers:{lang:d},cacheKey:n})}static async getSitemap(e){let{GET_SITEMAP:[r,n]}=Ze;return await Oe({endpoint:`${r}${e}${n}`})}static async getSocials(e,r=""){let{SOCIALS:[n,i]}=Ze;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:r})}};var Bn=class{static getBody(e,r){let{order:n,sources:i,quantity:s,mode:o,fixed:a,fullRelations:c=!1,allLanguages:d=!1,preferenceLanguage:u=!1,referenceId:p}=e;return o==="auto"?{mode:o,order:n,sources:i,quantity:s,fullRelations:c,allLanguages:d,preferenceLanguage:u}:o==="manual"?{mode:o,fixed:a,fullRelations:c}:o==="navigation"?{mode:o,order:n,quantity:s,fullRelations:c,referenceId:p||r?.structuredDataContent?.id}:(console.log(`Error: Distribuidor mode: ${o} is not recognized on page ${r?.id}.`),e)}static async fetchContentTypeData(e){let{page:r,component:{data:n},cacheKey:i}=e;if(!n)return He(`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 He(`Warning: Page with id: ${r.id} has a ReferenceField with empty \`data.sources\``,"Empty data.sources in ReferenceField"),[];let{site:s,lang:o}=n,a=this.getBody(n,r);return await pe.getDistributorData(r,a,i,s,o)}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 Un=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,s)=>{let{language:o}=s;return{...i,[o]:s}},{})}getDefaultHeaders(){return[...this.navigations.headers].filter(i=>!!i.setAsDefault).reduce((i,s)=>{let{language:o}=s;return{...i,[o]:s}},{})}getRightLanguage(e,r,n){if(!e||!r)return null;let s=e.find(o=>o.language===n&&o.navigationLanguages?.find(a=>a.navigationId===r))||e.find(o=>o.id===r);return s?{...s}: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:s},templateConfig:{defaultHeader:o,defaultFooter:a,templates:c}}=e,d=b=>{let S=b.find(x=>typeof x=="number");return typeof S=="number"?S:null},u=d([r,c?.[s]?.defaultHeader,o]),p=d([n,c?.[s]?.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 Zs=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 Oe({endpoint:e});this.settings=r}async resetRender(){let{resetRender:e}=this.ENDPOINTS;await xr({endpoint:e})}},eo=new Zs;var Zd=A(tt());Zd.default.config();var mv=25;function gv({socialTitle:t,socialDescription:e,socialImage:r}){return{type:"website",title:t,description:e,image:r?gs(r,1280,768):"",twitterImage:r?gs(r,1280,768):""}}function yv(t){let{title:e,metaTitle:r,metaDescription:n,canonicalURL:i,locale:s,url:o,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:s,url:o,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 ro(t,e){let{id:r,title:n,fullPath:i,language:s,breadcrumb:o,socialDescription:a,socialImage:c,socialTitle:d}=t,{baseUrl:u,cloudinaryName:p,griddoVersion:g,siteLangs:m,siteMetadata:b,siteOptions:S,siteScript:x,siteSlug:F,socials:j,theme:L,navigations:{header:$,footer:H}}=e;t.breadcrumb=o,t.siteSlug=F,t.apiUrl=u,t.publicApiUrl=e.publicBaseUrl,t.instance=e.instance;let Se=m.find(({id:I})=>I===t?.language)?.locale.replace(/_/g,"-"),Y=yv(t),D=gv({socialDescription:a,socialImage:c,socialTitle:d}),q=i.compose,T=new Date().toString();return{path:q,size:void 0,context:{id:r,title:n,fullPath:i,locale:Se,languageId:s,theme:L,siteMetadata:b,pageMetadata:Y,openGraph:D,socials:j,siteLangs:m,cloudinaryName:p,siteOptions:S,griddoVersion:g,renderDate:T,siteScript:x,header:$,footer:H,page:t}}}async function eh(t,e){return await ro(t,e)}async function th({page:t,pages:e,isRoot:r=!1,defaultLang:n,template:i,totalQueriedItems:s},o){let a=e.map(async(c,d)=>{let u=d===0,p=d+1,{domainUrl:g,compose:m}=t.fullPath,b={...t,id:parseInt("-"+t.id+d),fullPath:{...t.fullPath,compose:to(m,p,{addEndingSlash:!0})},fullUrl:to(t.fullUrl,p,{addEndingSlash:!0}),slug:to(t.slug,p),title:Qd(t.title,p),metaTitle:Qd(t.metaTitle||"",p),disableHrefLangs:p>1,template:{...i,isFirstPage:u,pageNumber:p,totalPages:e.length,baseLink:`${g}${m}`,queriedItems:c,totalQueriedItems:s?.length},isRoot:r,defaultLang:n};return await ro(b,o)});return Promise.all(a)}function rh(t,e){let{multiPageElements:r,...n}=t,i=JSON.parse(JSON.stringify(r));i.find(({sectionSlug:o})=>o==="/")||i.push({});let s=i.map(async(o,a)=>{let c=JSON.parse(JSON.stringify(n)),{sectionSlug:d="/",title:u="",metaTitle:p="",metaDescription:g=""}=o,m=typeof u=="string"?u:u.content,b=c.fullPath.compose||"",S=c.fullUrl.endsWith("/")?c.fullUrl.slice(0,-1):c.fullUrl,x=d?.replace(/\//g,""),j=d==="/"?x:x+"/",L=b.endsWith("/")?"":"/",$=`${b}${L}${j}`;return m.trim()&&(c.title=m),g.trim()&&(c.metaDescription=g),c.id=parseInt("-"+c.id+a),c.fullUrl=`${S}/${j}`,c.fullPath.compose=$,c.slug=$,c.template.activeSectionSlug=d,c.template.activeSectionBase=S,c.metaTitle=p.trim()||m.trim()||c.metaTitle,await ro(c,e)});return Promise.all(s)}function nh(t){return new Promise(r=>{let n=(i,s=0)=>{if(!(!i||typeof i!="object")){for(let o in i){let a=i[o],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,s+1)}s||r(null)}};n([t])})}function vv(t,e,r){return e?.slice(t*(r-1),t*r)}function bv(t,e){let r=Math.ceil(e.length/t)||1;return Array.from({length:r},(i,s)=>s+1)?.map(i=>vv(t,e,i))}function ih(t){let e=t.queriedItems||[],r=t?.itemsPerPage||mv;return bv(r,e)}function Kd(t){return t.replace(/\/+$/,"/")}function to(t,e,r){let n=t.endsWith("/")?"":"/",i=r?.addEndingSlash?"/":"";return e<=1?Kd(`${t}${i}`):Kd(`${t}${n}${e}${i}`)}function Qd(t,e){return!t||e<=1?t:`${t} - ${e}`}var er=A(require("node:path")),Tr=A(gt()),Lo=A(Ih());var fb=process.env.API_URL,db=!!process.env.GRIDDO_RENDER_ALL_SITES||!!process.env.updateAllSites,Zt=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);async function Rh(t){console.info(`API URL ${fb}`),await Qe.login();let e=await pe.getAll(),r=db?e.filter(s=>!Zt||s.id===Zt):e.filter(s=>Zt?s.id===Zt:!!s.shouldBeUpdated);if(r.length)for(let s of r){let{items:o}=await pe.getLanguages(s.id);s.domains=o.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(s=>Zt?s.id===Zt:!!s.isPublished&&s.domains.length>0),i=r.filter(s=>!s.isPublished&&s.shouldBeUpdated);return{sitesToPublish:n,sitesToUnpublish:i}}async function kh(t){for(let e of t){let r=await pe.startSiteRender(e.id),{siteHash:n}=r,i={siteHash:n,publishHashes:[],unpublishHashes:[]};await pe.endSiteRender(e.id,i)}}async function Th(t){let e=await pe.startSiteRender(t),r=await pe.getInfo(t),n=await pe.getLanguages(t),i=await pe.getSocials(t),s=n.items,o=s.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:s,defaultLang:o,headers:u,footers:p,socials:i}}async function Mh(){let e=De().dirs(),r=er.default.join(e.__cx,"dist"),{buildProcessData:n}=await ls(),i=er.default.join(r,"__build-report__.json"),s=await Qe.login(),o=Object.keys(n).map(c=>({...n[c],siteId:parseInt(c)})),a={authControl:s,sites:o};Tr.default.writeFileSync(i,JSON.stringify(a)),vt(`Build report saved for ${o.length} site(s)`)}async function qh(){let{sitesToPublish:t}=await ls(),r=De().dirs(),n=er.default.resolve(r.__cx,"dist"),i=t.map(async s=>{let{id:o,languages:a}=s,c=a.map(async d=>{Qe.headers&&(Qe.headers.lang=d.id.toString());let u=await pe.getSitemap(o);if(!u)return;let{items:p,url:{home:g,domain:m}}=u;if(!g)return;let b=s.domains.find(H=>Object.keys(H)[0]==d.id.toString());if(!b)return;let S=Object.values(b)[0],x=[],F=Object.keys(p),j=er.default.join(n,S.replace(m,""));for(let H of F){let ne=p[H];if(!ne.length)continue;let Se=(0,Lo.parse)("urlset",{"@":{xmlns:"http://www.sitemaps.org/schemas/sitemap/0.9","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation":"http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"},url:ne}),Y=`/sitemap-${H.toLowerCase()}.xml`,D=`${j}${Y}`;Fh(D,Se),x.push(`${g.endsWith("/")?g.slice(0,-1):g}${Y}`)}if(!x.length)return;let L=(0,Lo.parse)("sitemapindex",{"@":{xmlns:"http://www.sitemaps.org/schemas/sitemap/0.9"},sitemap:x.map(H=>({loc:H}))}),$=`${j}/sitemap.xml`;Fh($,L)});return Promise.all(c)});await Promise.all(i)}function Fh(t,e){try{let r=er.default.dirname(t);Tr.default.existsSync(r)||Tr.default.mkdirSync(r,{recursive:!0}),Tr.default.writeFileSync(t,e)}catch(r){console.error(`Error saving file: ${r}`)}}$h.default.config();var hb=process.env.API_URL,pb=process.env.GRIDDO_REACT_APP_INSTANCE||process.env.REACT_APP_INSTANCE,Nh=parseInt(process.env.GRIDDO_API_CONCURRENCY_COUNT||"10"),mb=process.env.PUBLIC_API_URL,gb=new Date().valueOf().toString();async function Uh(t,e){console.info(`API calls with ${Nh} threads`);let{version:r}=JSON.parse(jh.default.readFileSync(Lh.default.resolve(__dirname,"../package.json"),"utf-8"));try{let n=[],i={},{sitesToPublish:s,sitesToUnpublish:o}=await Rh(e);await eo.getAll(),s.length||o.length||(console.warn("There are no sites to update"),process.exit(0)),console.info(`Sites to publish: ${cs(s)}`),console.info(`Sites to unpublish: ${cs(o)}`),await kh(o);for(let a of s){let{id:c,slug:d,theme:u,favicon:p,changedPages:g=[],pages:m=[]}=a,{siteInfo:b,validPagesIds:S,siteHash:x,unpublishHashes:F,siteLangs:j,defaultLang:L,headers:$,footers:H,socials:ne}=await Th(c),{cloudinaryName:Se,useMetaTitle:Y,useMetaKeywords:D,showBasicMetaRobots:q,avoidHrefLangsOnCanonicals:T,avoidSelfReferenceCanonicals:J,avoidHrefLangXDefault:I,avoidDebugMetas:X}=eo.settings;i[c]={siteHash:x,unpublishHashes:F,publishHashes:[]};let O=new Un;O.navigations={headers:$,footers:H},a.languages=j;let B=Bd(c,x),M=b.siteScript,P={siteUrl:b.slug,title:b.name,favicon:p},R={baseUrl:hb,publicBaseUrl:mb,instance:pb,siteSlug:d,theme:u,siteMetadata:P,socials:ne,siteLangs:j,cloudinaryName:Se,griddoVersion:r,siteOptions:{useMetaTitle:Y,useMetaKeywords:D,showBasicMetaRobots:q,avoidHrefLangsOnCanonicals:T,avoidSelfReferenceCanonicals:J,avoidHrefLangXDefault:I,avoidDebugMetas:X},siteScript:M};vt(`${a.name} site`);let Ue=async f=>{let v=[],_=await pe.getPage(f,B);if(!_)return;n.push(f);let w=JSON.parse(JSON.stringify(R));w.navigations=O.getPageNavigations(_);let N=await Bn.getDistributorData({page:_,cacheKey:gb}),U=await nh(N),z=_?.mode==="list",me=!z&&U,ht=!me&&!z;if(z){let V={page:_,pages:ih(N),isRoot:!1,defaultLang:L,template:N,totalQueriedItems:N.queriedItems};v=await th(V,w)}if(me){let V=_;V.template=N,V.multiPageElements=U,V.defaultLang=L,v=await rh(V,w)}if(ht){let V=_;V.template=N,V.defaultLang=L,v=[await eh(V,w)]}_.hash!==null&&i[c].publishHashes.push(_.hash),Jl(t,v)},{pagesInStore:Xe,pagesMissingInStore:ie,pagesToDeleteFromStore:ue,pagesToWriteToStore:et}=await zl(t,{sitesToPublish:s,pages:m,validPagesIds:S,changedPages:g});bn(t,ue);let xe=`Store: ${Xe.length} -> ${Xe}
65
- ValidPages: ${S.length} -> ${S}
66
- Changed: ${g.length} -> ${g}
67
- Deleted/Unpublished: ${ue.length} -> ${ue}
68
- Missing in store: ${ie.length} -> ${ie}
69
- Finally to store: ${et.length} -> ${et}`;JSON.parse(process.env.GRIDDO_DEBUG_LOGS||"false")&&He(xe,`Site store: ${a.name}`,1,0);let l=(0,Bh.default)(Nh),h=et.map(f=>l(()=>Ue(f)));await Promise.all(h)}Hl(t,{buildProcessData:i,createdPages:n,sitesToPublish:s})}catch(n){console.error(n.message),process.exit(1)}}var Xh=$o.default.resolve(__dirname,"../store/"),yb=$o.default.resolve(__dirname,"../apiCache");async function Gh(t){Nd(),Gl(Xh),await Uh(Xh,t),Ul(yb)}var vb=process.env.API_URL,bb={GET_ALL:`${vb}/domains`},oi=class{static async getAll(){let{GET_ALL:e}=bb;return await Oe({endpoint:e})}};async function Hh(){await Qe.login();let t=await oi.getAll();return wb(t)}function wb(t){let e=t.filter(({slug:r})=>!!r).map(({slug:r})=>r.replace("/",""));return[...new Set(e)]}async function Uo(){Bl("gatsby");let t=await Hh(),e=De();for(let r of t){let{__ssg:n,__exports:i,__caches:s,__cx:o,__components:a}=e.dirs(r);He(`Initializing render for the domain ${r}`,"",1,0);let c=af(r),d=!!c&&c!=="";await ze({name:"Clean",attempts:Ke.clean,steps:[()=>yr(o,["store","apiCache","dist"]),()=>yr(n,["dist","public","static",".cache"]),()=>Je("Clean LifeCycle")]}),await ze({name:"Prepare",attempts:Ke.prepare,steps:[()=>wn([i]),()=>wn([s]),()=>Je("Prepare LifeCycle")]}),await ze({name:"Restore",attempts:Ke.restore,steps:[()=>_n(a,n,["static"]),()=>_n(i,o,["assets"]),()=>_n(i,n,["dist"]),()=>{Bo.default.existsSync(ai.default.join(n,"dist"))&&Bo.default.renameSync(ai.default.join(n,"dist"),ai.default.join(n,"public"))},()=>Gt(s,o,["apiCache","store"]),()=>Gt(s,n,[".cache"]),()=>Je("Restore LifeCycle")]}),await ze({name:"Data",attempts:Ke.data,steps:[()=>Gh(r),()=>Je("Data LifeCycle")]}),await ze({name:"SSG",attempts:Ke.ssg,steps:[()=>(0,Jh.spawnSync)("yarn",["gatsby-build"],{cwd:n,stdio:["ignore","inherit","ignore"],encoding:"utf8",shell:!0,env:Object.assign(process.env,{GRIDDO_EXPORTER:"true",GRIDDO_ASSET_PREFIX:c})}),()=>Je("SSG LifeCycle")]}),await ze({name:"Relocation",steps:[()=>sf(r,d),()=>Je("Relocation LifeCycle")]}),await ze({name:"Meta",attempts:Ke.meta,steps:[()=>Mh(),()=>Vd.writeFiles(r),()=>qh(),()=>Je("Meta LifeCycle")]}),await ze({name:"Archive",attempts:Ke.archive,steps:[()=>Kl(),()=>ds(),()=>Gt(o,i,["dist","assets"],{withBackup:!0}),()=>Gt(o,s,["apiCache","store"]),()=>Gt(n,s,[".cache"]),()=>Je("Archive LifeCycle")]}),await ze({name:"Clean",steps:[()=>yr(n,["static","public","dist"]),()=>Je("Clean LifeCycle")],attempts:Ke.clean})}}async function zh(){let t=await us(Uo).catch(e=>{console.log(e),console.log("<[ Render will be reset ]>"),process.exit(1)});He(`All domains rendered in ${t}s.`,"",1,0),process.exit(0)}zh();
64
+ \rAllow: /`}))||[]}catch(e){console.warn(`${this.constructor.name}: ${e.message}`)}}async writeFiles(e){let{__cx:r}=gv.paths(e),n=Qs.default.join(r,"dist");await this.getRobots();let i=this.robots.find(({path:s})=>s===`/${e}`);if(!i){console.log(`Robots not found for ${e}`);return}if(Ks.default.existsSync(n)){let s=Qs.default.join(n,"robots.txt");Ks.default.writeFileSync(s,i?.content)}else console.log(`${n} not found`)}},Vh=new Zs;var Ld=F(require("node:fs")),Uo=F(require("node:path")),$d=F(it()),Bd=F(es());var Yh=F(it());Yh.default.config();var eo=process.env.API_URL,ht=`${eo}/site/`,tt={GET_ALL:`${eo}/sites/all`,GET_PAGE:[`${eo}/page/`,""],INFO:[`${ht}`,"/all"],LANGUAGES:[`${ht}`,"/languages"],BUILD_START:[`${ht}`,"/build/start"],BUILD_END:[`${ht}`,"/build/end"],GET_DISTRIBUTOR_DATA:[`${ht}`,"/distributor"],GET_SITEMAP:[`${ht}`,"/sitemap"],SOCIALS:[`${ht}`,"/socials"],GET_PAGES:[`${ht}`,"/pages?pagination=false"]},me=class{static async getAll(){let{GET_ALL:e}=tt;return await De({endpoint:e})}static async getPage(e,r){let{GET_PAGE:[n,i]}=tt;return await De({endpoint:`${n}${e}${i}`,cacheKey:r})}static async getInfo(e,r=""){let{INFO:[n,i]}=tt;return await De({endpoint:`${n}${e}${i}`,cacheKey:r})}static async getLanguages(e,r=""){let{LANGUAGES:[n,i]}=tt;return await De({endpoint:`${n}${e}${i}`,cacheKey:r})}static async startSiteRender(e){let{BUILD_START:[r,n]}=tt;return await De({endpoint:`${r}${e}${n}`})}static async endSiteRender(e,r){let{BUILD_END:[n,i]}=tt;return await Cr({endpoint:`${n}${e}${i}`,body:r})}static async getDistributorData(e,r,n,i,s){let{GET_DISTRIBUTOR_DATA:[o,a]}=tt,c=i||e.site,f=s||e.language;return await Cr({endpoint:`${o}${c}${a}`,body:r,headers:{lang:f},cacheKey:n})}static async getSitemap(e){let{GET_SITEMAP:[r,n]}=tt;return await De({endpoint:`${r}${e}${n}`})}static async getSocials(e,r=""){let{SOCIALS:[n,i]}=tt;return await De({endpoint:`${n}${e}${i}`,cacheKey:r})}};var Hn=class{static getBody(e,r){let{order:n,sources:i,quantity:s,mode:o,fixed:a,fullRelations:c=!1,allLanguages:f=!1,preferenceLanguage:u=!1,referenceId:p}=e;return o==="auto"?{mode:o,order:n,sources:i,quantity:s,fullRelations:c,allLanguages:f,preferenceLanguage:u}:o==="manual"?{mode:o,fixed:a,fullRelations:c}:o==="navigation"?{mode:o,order:n,quantity:s,fullRelations:c,referenceId:p||r?.structuredDataContent?.id}:(console.log(`Error: Distribuidor mode: ${o} is not recognized on page ${r?.id}.`),e)}static async fetchContentTypeData(e){let{page:r,component:{data:n},cacheKey:i}=e;if(!n)return Ge(`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 Ge(`Warning: Page with id: ${r.id} has a ReferenceField with empty \`data.sources\``,"Empty data.sources in ReferenceField"),[];let{site:s,lang:o}=n,a=this.getBody(n,r);return await me.getDistributorData(r,a,i,s,o)}static async getDistributorData({page:e,cacheKey:r=""}){try{let{template:n}=e,i=async(a,c=1)=>{if(!(!a||typeof a!="object")&&JSON.stringify(a).includes('"hasDistributorData":true'))for(let f in a){if(f==="queriedItems")continue;let p=a[f];!p||typeof p!="object"||(p.hasDistributorData&&(p.queriedItems=await this.fetchContentTypeData({page:e,cacheKey:r,component:p})),await i(p,c+1))}};return await(async a=>(await i([a]),a))(n)}catch(n){console.error(`Error en get distributor ${n}`),process.exit(1)}}};var Jn=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,s)=>{let{language:o}=s;return{...i,[o]:s}},{})}getDefaultHeaders(){return[...this.navigations.headers].filter(i=>!!i.setAsDefault).reduce((i,s)=>{let{language:o}=s;return{...i,[o]:s}},{})}getRightLanguage(e,r,n){if(!e||!r)return null;let s=e.find(o=>o.language===n&&o.navigationLanguages?.find(a=>a.navigationId===r))||e.find(o=>o.id===r);return s?{...s}: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:s},templateConfig:{defaultHeader:o,defaultFooter:a,templates:c}}=e,f=b=>{let _=b.find(x=>typeof x=="number");return typeof _=="number"?_:null},u=f([r,c?.[s]?.defaultHeader,o]),p=f([n,c?.[s]?.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 to=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 De({endpoint:e});this.settings=r}async resetRender(){let{resetRender:e}=this.ENDPOINTS;await Cr({endpoint:e})}},ro=new to;var Zh=F(it());Zh.default.config();var yv=25;function vv({socialTitle:t,socialDescription:e,socialImage:r}){return{type:"website",title:t,description:e,image:r?bs(r,1280,768):"",twitterImage:r?bs(r,1280,768):""}}function bv(t){let{title:e,metaTitle:r,metaDescription:n,canonicalURL:i,locale:s,url:o,isIndexed:a,follow:c,metasAdvanced:f,pageLanguages:u,fullUrl:p,metaKeywords:g}=t,m=f?.split(",").filter(Boolean).map(b=>b.trim().toLowerCase())||[];return{title:(r||e||"").trim(),description:n,canonical:i&&i.trim()&&i!==p?i.trim():a?p:void 0,locale:s,url:o,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 io(t,e){let{id:r,title:n,fullPath:i,language:s,breadcrumb:o,socialDescription:a,socialImage:c,socialTitle:f}=t,{baseUrl:u,cloudinaryName:p,griddoVersion:g,siteLangs:m,siteMetadata:b,siteOptions:_,siteScript:x,siteSlug:A,socials:$,theme:U,navigations:{header:q,footer:W}}=e;t.breadcrumb=o,t.siteSlug=A,t.apiUrl=u,t.publicApiUrl=e.publicBaseUrl,t.instance=e.instance;let ge=m.find(({id:I})=>I===t?.language)?.locale.replace(/_/g,"-"),Y=bv(t),D=vv({socialDescription:a,socialImage:c,socialTitle:f}),j=i.compose,T=new Date().toString();return{path:j,size:void 0,context:{id:r,title:n,fullPath:i,locale:ge,languageId:s,theme:U,siteMetadata:b,pageMetadata:Y,openGraph:D,socials:$,siteLangs:m,cloudinaryName:p,siteOptions:_,griddoVersion:g,renderDate:T,siteScript:x,header:q,footer:W,page:t}}}async function ed(t,e){return await io(t,e)}async function td({page:t,pages:e,isRoot:r=!1,defaultLang:n,template:i,totalQueriedItems:s},o){let a=e.map(async(c,f)=>{let u=f===0,p=f+1,{domainUrl:g,compose:m}=t.fullPath,b={...t,id:parseInt("-"+t.id+f),fullPath:{...t.fullPath,compose:no(m,p,{addEndingSlash:!0})},fullUrl:no(t.fullUrl,p,{addEndingSlash:!0}),slug:no(t.slug,p),title:Qh(t.title,p),metaTitle:Qh(t.metaTitle||"",p),disableHrefLangs:p>1,template:{...i,isFirstPage:u,pageNumber:p,totalPages:e.length,baseLink:`${g}${m}`,queriedItems:c,totalQueriedItems:s?.length},isRoot:r,defaultLang:n};return await io(b,o)});return Promise.all(a)}function rd(t,e){let{multiPageElements:r,...n}=t,i=JSON.parse(JSON.stringify(r));i.find(({sectionSlug:o})=>o==="/")||i.push({});let s=i.map(async(o,a)=>{let c=JSON.parse(JSON.stringify(n)),{sectionSlug:f="/",title:u="",metaTitle:p="",metaDescription:g=""}=o,m=typeof u=="string"?u:u.content,b=c.fullPath.compose||"",_=c.fullUrl.endsWith("/")?c.fullUrl.slice(0,-1):c.fullUrl,x=f?.replace(/\//g,""),$=f==="/"?x:x+"/",U=b.endsWith("/")?"":"/",q=`${b}${U}${$}`;return m.trim()&&(c.title=m),g.trim()&&(c.metaDescription=g),c.id=parseInt("-"+c.id+a),c.fullUrl=`${_}/${$}`,c.fullPath.compose=q,c.slug=q,c.template.activeSectionSlug=f,c.template.activeSectionBase=_,c.metaTitle=p.trim()||m.trim()||c.metaTitle,await io(c,e)});return Promise.all(s)}function nd(t){return new Promise(r=>{let n=(i,s=0)=>{if(!(!i||typeof i!="object")){for(let o in i){let a=i[o],c=a||typeof a=="object",f=JSON.stringify(a).includes('"hasGriddoMultiPage":true');if(!c||!f)continue;let{component:u,hasGriddoMultiPage:p,elements:g}=a;u&&p&&r(g||[]),n(a,s+1)}s||r(null)}};n([t])})}function wv(t,e,r){return e?.slice(t*(r-1),t*r)}function _v(t,e){let r=Math.ceil(e.length/t)||1;return Array.from({length:r},(i,s)=>s+1)?.map(i=>wv(t,e,i))}function id(t){let e=t.queriedItems||[],r=t?.itemsPerPage||yv;return _v(r,e)}function Kh(t){return t.replace(/\/+$/,"/")}function no(t,e,r){let n=t.endsWith("/")?"":"/",i=r?.addEndingSlash?"/":"";return e<=1?Kh(`${t}${i}`):Kh(`${t}${n}${e}${i}`)}function Qh(t,e){return!t||e<=1?t:`${t} - ${e}`}var jr=F(require("node:path")),qr=F(yt()),Bo=F(Id());var db=process.env.API_URL,pb=!!process.env.GRIDDO_RENDER_ALL_SITES||!!process.env.updateAllSites,rr=process.env.GRIDDO_RENDER_SITE&&parseInt(process.env.GRIDDO_RENDER_SITE)||process.env.testSite&&parseInt(process.env.testSite),Ad=(process.env.GRIDDO_RENDER_PAGES||process.env.testPage||"").split(",").map(t=>parseInt(t)).filter(Boolean),Rd=Q();async function kd(t){console.info(`API URL ${db}`),await et.login();let e=await me.getAll(),r=pb?e.filter(s=>!rr||s.id===rr):e.filter(s=>rr?s.id===rr:!!s.shouldBeUpdated);if(r.length)for(let s of r){let{items:o}=await me.getLanguages(s.id);s.domains=o.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(s=>rr?s.id===rr:!!s.isPublished&&s.domains.length>0),i=r.filter(s=>!s.isPublished&&s.shouldBeUpdated);return{sitesToPublish:n,sitesToUnpublish:i}}async function Td(t){for(let e of t){let r=await me.startSiteRender(e.id),{siteHash:n}=r,i={siteHash:n,publishHashes:[],unpublishHashes:[]};await me.endSiteRender(e.id,i)}}async function Md(t){let e=await me.startSiteRender(t),r=await me.getInfo(t),n=await me.getLanguages(t),i=await me.getSocials(t),s=n.items,o=s.find(b=>b.isDefault),{siteHash:a,unpublishHashes:c,publishIds:f}=e,{headers:u,footers:p}=r,g=Ad.length?Ad.filter(b=>f.includes(b)):f;return{siteInfo:r,validPagesIds:g,siteHash:a,unpublishHashes:c,siteLangs:s,defaultLang:o,headers:u,footers:p,socials:i}}async function qd(){let{__cx:t}=Rd.paths(),{buildProcessData:e}=await ds(),r=await et.login(),n=Object.keys(e).map(s=>({...e[s],siteId:parseInt(s)})),i={authControl:r,sites:n};qr.default.writeFileSync(jr.default.join(t,"dist","__build-report__.json"),JSON.stringify(i)),bt(`Build report saved for ${n.length} site(s)`)}async function jd(){let{sitesToPublish:t}=await ds(),{__cx:e}=Rd.paths(),r=jr.default.join(e,"dist"),n=t.map(async i=>{let{id:s,languages:o}=i,a=o.map(async c=>{et.headers&&(et.headers.lang=c.id.toString());let f=await me.getSitemap(s);if(!f)return;let{items:u,url:{home:p,domain:g}}=f;if(!p)return;let m=i.domains.find(q=>Object.keys(q)[0]==c.id.toString());if(!m)return;let b=Object.values(m)[0],_=[],x=Object.keys(u),A=jr.default.join(r,b.replace(g,""));for(let q of x){let W=u[q];if(!W.length)continue;let ce=(0,Bo.parse)("urlset",{"@":{xmlns:"http://www.sitemaps.org/schemas/sitemap/0.9","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation":"http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"},url:W}),ge=`/sitemap-${q.toLowerCase()}.xml`,Y=`${A}${ge}`;Fd(Y,ce),_.push(`${p.endsWith("/")?p.slice(0,-1):p}${ge}`)}if(!_.length)return;let $=(0,Bo.parse)("sitemapindex",{"@":{xmlns:"http://www.sitemaps.org/schemas/sitemap/0.9"},sitemap:_.map(q=>({loc:q}))}),U=`${A}/sitemap.xml`;Fd(U,$)});return Promise.all(a)});await Promise.all(n)}function Fd(t,e){try{let r=jr.default.dirname(t);qr.default.existsSync(r)||qr.default.mkdirSync(r,{recursive:!0}),qr.default.writeFileSync(t,e)}catch(r){console.error(`Error saving file: ${r}`)}}var mb=Q();$d.default.config();var gb=process.env.API_URL,yb=process.env.GRIDDO_REACT_APP_INSTANCE||process.env.REACT_APP_INSTANCE,Nd=parseInt(process.env.GRIDDO_API_CONCURRENCY_COUNT||"10"),vb=process.env.PUBLIC_API_URL,bb=new Date().valueOf().toString();async function Ud(t){Hl(),console.info(`API calls with ${Nd} threads`);let{__cx:e}=mb.paths(),r=Uo.default.join(e,"store"),{version:n}=JSON.parse(Ld.default.readFileSync(Uo.default.join(e,"package.json"),"utf-8"));try{let i=[],s={},{sitesToPublish:o,sitesToUnpublish:a}=await kd(t);await ro.getAll(),o.length||a.length||(console.warn("There are no sites to update"),process.exit(0)),console.info(`Sites to publish: ${fs(o)}`),console.info(`Sites to unpublish: ${fs(a)}`),await Td(a);for(let c of o){let{id:f,slug:u,theme:p,favicon:g,changedPages:m=[],pages:b=[]}=c,{siteInfo:_,validPagesIds:x,siteHash:A,unpublishHashes:$,siteLangs:U,defaultLang:q,headers:W,footers:ce,socials:ge}=await Md(f),{cloudinaryName:Y,useMetaTitle:D,useMetaKeywords:j,showBasicMetaRobots:T,avoidHrefLangsOnCanonicals:H,avoidSelfReferenceCanonicals:I,avoidHrefLangXDefault:X,avoidDebugMetas:O}=ro.settings;s[f]={siteHash:A,unpublishHashes:$,publishHashes:[]};let B=new Jn;B.navigations={headers:W,footers:ce},c.languages=U;let M=Bh(f,A),P=_.siteScript,R={siteUrl:_.slug,title:_.name,favicon:g},Be={baseUrl:gb,publicBaseUrl:vb,instance:yb,siteSlug:u,theme:p,siteMetadata:R,socials:ge,siteLangs:U,cloudinaryName:Y,griddoVersion:n,siteOptions:{useMetaTitle:D,useMetaKeywords:j,showBasicMetaRobots:T,avoidHrefLangsOnCanonicals:H,avoidSelfReferenceCanonicals:I,avoidHrefLangXDefault:X,avoidDebugMetas:O},siteScript:P};bt(`${c.name} site`);let Ve=async v=>{let S=[],w=await me.getPage(v,M);if(!w)return;i.push(v);let N=JSON.parse(JSON.stringify(Be));N.navigations=B.getPageNavigations(w);let L=await Hn.getDistributorData({page:w,cacheKey:bb}),J=await nd(L),le=w?.mode==="list",nt=!le&&J,Ae=!nt&&!le;if(le){let Ue={page:w,pages:id(L),isRoot:!1,defaultLang:q,template:L,totalQueriedItems:L.queriedItems};S=await td(Ue,N)}if(nt){let Ue=w;Ue.template=L,Ue.multiPageElements=J,Ue.defaultLang=q,S=await rd(Ue,N)}if(Ae){let Ue=w;Ue.template=L,Ue.defaultLang=q,S=[await ed(Ue,N)]}w.hash!==null&&s[f].publishHashes.push(w.hash),zl(S)},{pagesInStore:ne,pagesMissingInStore:ye,pagesToDeleteFromStore:rt,pagesToWriteToStore:ue}=await Wl(r,{sitesToPublish:o,pages:b,validPagesIds:x,changedPages:m});xn(rt);let l=`Store: ${ne.length} -> ${ne}
65
+ ValidPages: ${x.length} -> ${x}
66
+ Changed: ${m.length} -> ${m}
67
+ Deleted/Unpublished: ${rt.length} -> ${rt}
68
+ Missing in store: ${ye.length} -> ${ye}
69
+ Finally to store: ${ue.length} -> ${ue}`;JSON.parse(process.env.GRIDDO_DEBUG_LOGS||"false")&&Ge(l,`Site store: ${c.name}`,1,0);let d=(0,Bd.default)(Nd),h=ue.map(v=>d(()=>Ve(v)));await Promise.all(h)}Jl(r,{buildProcessData:s,createdPages:i,sitesToPublish:o})}catch(i){console.error(i.message),process.exit(1)}}async function Xd(t){jh(),await Ud(t),Gl()}var wb=process.env.API_URL,_b={GET_ALL:`${wb}/domains`},li=class{static async getAll(){let{GET_ALL:e}=_b;return await De({endpoint:e})}};async function Gd(){await et.login();let t=await li.getAll();return Sb(t)}function Sb(t){let e=t.filter(({slug:r})=>!!r).map(({slug:r})=>r.replace("/",""));return[...new Set(e)]}async function Go(){Xl("gatsby");let t=await Gd(),e=Q();for(let r of t){let{__ssg:n,__exports:i,__caches:s,__cx:o,__components:a}=e.paths(r);Ge(`Initializing render for the domain ${r}`,"",1,0);let c=cf(r),f=!!c&&c!=="";await Je({name:"Clean",attempts:Ze.clean,steps:[()=>br(o,["store","apiCache","dist"]),()=>br(n,["dist","public","static",".cache"]),()=>He("Clean LifeCycle")]}),await Je({name:"Prepare",attempts:Ze.prepare,steps:[()=>En([i]),()=>En([s]),()=>He("Prepare LifeCycle")]}),await Je({name:"Restore",attempts:Ze.restore,steps:[()=>Cn(a,n,["static"]),()=>Cn(i,o,["assets"]),()=>Cn(i,n,["dist"]),()=>{Xo.default.existsSync(Nr.default.join(n,"dist"))&&Xo.default.renameSync(Nr.default.join(n,"dist"),Nr.default.join(n,"public"))},()=>Jt(s,o,["apiCache","store"]),()=>Jt(s,n,[".cache"]),()=>He("Restore LifeCycle")]}),await Je({name:"Data",attempts:Ze.data,steps:[()=>Xd(r),()=>He("Data LifeCycle")]}),await Je({name:"SSG",attempts:Ze.ssg,steps:[()=>{if((0,Hd.spawnSync)("yarn",["gatsby-build"],{cwd:n,stdio:["ignore","inherit","ignore"],encoding:"utf8",shell:!0,env:Object.assign(process.env,{GRIDDO_EXPORTER:"true",GRIDDO_ASSET_PREFIX:c})}).status!==0)throw new Error("Error in 'yarn gatsby-build'")},()=>He("SSG LifeCycle")]}),await Je({name:"Relocation",steps:[()=>of(r,f),()=>He("Relocation LifeCycle")]}),await Je({name:"Meta",attempts:Ze.meta,steps:[()=>qd(),()=>Vh.writeFiles(r),()=>jd(),()=>He("Meta LifeCycle")]}),await Je({name:"Archive",attempts:Ze.archive,steps:[()=>Ql(),()=>ms(Nr.default.join(o,"dist")),()=>Jt(o,i,["dist","assets"],{withBackup:!0}),()=>Jt(o,s,["apiCache","store"]),()=>Jt(n,s,[".cache"]),()=>He("Archive LifeCycle")]}),await Je({name:"Clean",steps:[()=>br(n,["static","public","dist"]),()=>He("Clean LifeCycle")],attempts:Ze.clean})}}async function Jd(){let t=await hs(Go).catch(e=>{console.log(e),console.log("<[ Render will be reset ]>"),process.exit(1)});Ge(`All domains rendered in ${t}s.`,"",1,0),process.exit(0)}Jd();