@griddo/cx 10.6.3 → 10.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/build/adapters/gatsby/index.d.ts +1 -1
- package/build/build-complete.js +69 -30
- package/build/constants/endpoints.d.ts +18 -0
- package/build/constants/envs.d.ts +33 -0
- package/build/constants/index.d.ts +53 -0
- package/build/index.d.ts +4 -3
- package/build/index.js +90 -49
- package/build/reset-render.js +69 -30
- package/build/run-start-render.js +90 -49
- package/build/services/settings.d.ts +3 -22
- package/build/services/sites.d.ts +34 -36
- package/build/start-render.js +90 -49
- package/build/types/global.d.ts +1 -1
- package/build/upload-search-content.js +70 -31
- package/build/utils/core-utils.d.ts +9 -60
- package/build/utils/domains.d.ts +5 -1
- package/build/utils/loggin.d.ts +49 -0
- package/build/utils/render.d.ts +11 -0
- package/cx.config.js +3 -4
- package/exporter/adapters/gatsby/index.ts +95 -257
- package/exporter/adapters/gatsby/utils.ts +11 -10
- package/exporter/browser/index.ts +4 -4
- package/exporter/constants/endpoints.ts +42 -0
- package/exporter/constants/envs.ts +86 -0
- package/exporter/constants/index.ts +120 -0
- package/exporter/errors/index.ts +2 -2
- package/exporter/index.ts +11 -10
- package/exporter/react/GriddoIntegrations/index.tsx +3 -3
- package/exporter/{build-complete.ts → scripts/build-complete.ts} +4 -4
- package/exporter/{reset-render.ts → scripts/reset-render.ts} +3 -3
- package/exporter/scripts/start-render.ts +26 -0
- package/exporter/{upload-search-content.ts → scripts/upload-search-content.ts} +3 -3
- package/exporter/services/auth.ts +7 -5
- package/exporter/services/distributors.ts +12 -18
- package/exporter/services/domains.ts +2 -12
- package/exporter/services/navigation.ts +10 -8
- package/exporter/services/robots.ts +2 -6
- package/exporter/services/settings.ts +7 -44
- package/exporter/services/sites.ts +115 -159
- package/exporter/services/store.ts +24 -29
- package/exporter/types/api.ts +1 -1
- package/exporter/types/global.ts +1 -0
- package/exporter/utils/api.ts +11 -10
- package/exporter/utils/core-utils.ts +49 -180
- package/exporter/utils/domains.ts +21 -3
- package/exporter/utils/folders.ts +3 -3
- package/exporter/utils/health-checks.ts +4 -4
- package/exporter/utils/instance.ts +3 -3
- package/exporter/utils/integrations.ts +12 -12
- package/exporter/utils/loggin.ts +159 -0
- package/exporter/utils/pages.ts +15 -15
- package/exporter/utils/render.ts +49 -0
- package/exporter/utils/searches.ts +5 -5
- package/exporter/utils/sites.ts +42 -48
- package/exporter/utils/store.ts +9 -9
- package/gatsby-browser.tsx +46 -48
- package/gatsby-config.ts +5 -5
- package/gatsby-node.ts +7 -7
- package/package.json +21 -26
- package/src/components/Head.tsx +1 -1
- package/src/gatsby-node-utils.ts +1 -1
- package/src/utils.ts +1 -1
- package/exporter/start-render.ts +0 -18
- /package/build/{build-complete.d.ts → scripts/build-complete.d.ts} +0 -0
- /package/build/{move-assets.d.ts → scripts/move-assets.d.ts} +0 -0
- /package/build/{reset-render.d.ts → scripts/reset-render.d.ts} +0 -0
- /package/build/{run-start-render.d.ts → scripts/run-start-render.d.ts} +0 -0
- /package/build/{start-render.d.ts → scripts/start-render.d.ts} +0 -0
- /package/build/{upload-search-content.d.ts → scripts/upload-search-content.d.ts} +0 -0
- /package/exporter/{move-assets.ts → scripts/move-assets.ts} +0 -0
- /package/exporter/{run-start-render.ts → scripts/run-start-render.ts} +0 -0
package/build/start-render.js
CHANGED
|
@@ -1,73 +1,114 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var
|
|
3
|
-
`,
|
|
4
|
-
GFS4: `),console.error(t)});J[ie]||(oa=global[ie]||[],ca(J,oa),J.close=function(t){function e(r,n){return t.call(J,r,function(i){i||aa(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,Hr,{value:t}),e}(J.close),J.closeSync=function(t){function e(r){t.apply(J,arguments),aa()}return Object.defineProperty(e,Hr,{value:t}),e}(J.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){mt(J[ie]),require("assert").equal(J[ie].length,0)}));var oa;global[ie]||ca(global,J[ie]);_i.exports=vi(Cp(J));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!J.__patched&&(_i.exports=vi(J),J.__patched=!0);function vi(t){xp(t),t.gracefulify=vi,t.createReadStream=V,t.createWriteStream=ce;var e=t.readFile;t.readFile=r;function r(D,q,k){return typeof q=="function"&&(k=q,q=null),z(D,q,k);function z(I,G,O,U){return e(I,G,function(M){M&&(M.code==="EMFILE"||M.code==="ENFILE")?Ft([z,[I,G,O],M,U||Date.now(),Date.now()]):typeof O=="function"&&O.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=i;function i(D,q,k,z){return typeof k=="function"&&(z=k,k=null),I(D,q,k,z);function I(G,O,U,M,P){return n(G,O,U,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Ft([I,[G,O,U,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,k,z){return typeof k=="function"&&(z=k,k=null),I(D,q,k,z);function I(G,O,U,M,P){return s(G,O,U,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Ft([I,[G,O,U,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,k,z){return typeof k=="function"&&(z=k,k=0),I(D,q,k,z);function I(G,O,U,M,P){return a(G,O,U,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Ft([I,[G,O,U,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,k){typeof q=="function"&&(k=q,q=null);var z=u.test(process.version)?function(O,U,M,P){return d(O,I(O,U,M,P))}:function(O,U,M,P){return d(O,U,I(O,U,M,P))};return z(D,q,k);function I(G,O,U,M){return function(P,R){P&&(P.code==="EMFILE"||P.code==="ENFILE")?Ft([z,[G,O,U],P,M||Date.now(),Date.now()]):(R&&R.sort&&R.sort(),typeof U=="function"&&U.call(this,P,R))}}}if(process.version.substr(0,4)==="v0.8"){var g=Ep(t);F=g.ReadStream,B=g.WriteStream}var m=t.ReadStream;m&&(F.prototype=Object.create(m.prototype),F.prototype.open=j);var b=t.WriteStream;b&&(B.prototype=Object.create(b.prototype),B.prototype.open=L),Object.defineProperty(t,"ReadStream",{get:function(){return F},set:function(D){F=D},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return B},set:function(D){B=D},enumerable:!0,configurable:!0});var w=F;Object.defineProperty(t,"FileReadStream",{get:function(){return w},set:function(D){w=D},enumerable:!0,configurable:!0});var x=B;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;Z(D.path,D.flags,D.mode,function(q,k){q?(D.autoClose&&D.destroy(),D.emit("error",q)):(D.fd=k,D.emit("open",k),D.read())})}function B(D,q){return this instanceof B?(b.apply(this,arguments),this):B.apply(Object.create(B.prototype),arguments)}function L(){var D=this;Z(D.path,D.flags,D.mode,function(q,k){q?(D.destroy(),D.emit("error",q)):(D.fd=k,D.emit("open",k))})}function V(D,q){return new t.ReadStream(D,q)}function ce(D,q){return new t.WriteStream(D,q)}var Te=t.open;t.open=Z;function Z(D,q,k,z){return typeof k=="function"&&(z=k,k=null),I(D,q,k,z);function I(G,O,U,M,P){return Te(G,O,U,function(R,He){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Ft([I,[G,O,U,M],R,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}return t}function Ft(t){mt("ENQUEUE",t[0].name,t[1]),J[ie].push(t),bi()}var Gr;function aa(){for(var t=Date.now(),e=0;e<J[ie].length;++e)J[ie][e].length>2&&(J[ie][e][3]=t,J[ie][e][4]=t);bi()}function bi(){if(clearTimeout(Gr),Gr=void 0,J[ie].length!==0){var t=J[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),d=Math.min(c*1.2,100);a>=d?(mt("RETRY",e.name,r),e.apply(null,r.concat([i]))):J[ie].push(t)}Gr===void 0&&(Gr=setTimeout(bi,0))}}});var or=y(st=>{"use strict";var ua=Ee().fromCallback,ye=fe(),Dp=["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 ye[t]=="function");Object.keys(ye).forEach(t=>{t!=="promises"&&(st[t]=ye[t])});Dp.forEach(t=>{st[t]=ua(ye[t])});st.exists=function(t,e){return typeof e=="function"?ye.exists(t,e):new Promise(r=>ye.exists(t,r))};st.read=function(t,e,r,n,i,s){return typeof s=="function"?ye.read(t,e,r,n,i,s):new Promise((o,a)=>{ye.read(t,e,r,n,i,(c,d,u)=>{if(c)return a(c);o({bytesRead:d,buffer:u})})})};st.write=function(t,e,...r){return typeof r[r.length-1]=="function"?ye.write(t,e,...r):new Promise((n,i)=>{ye.write(t,e,...r,(s,o,a)=>{if(s)return i(s);n({bytesWritten:o,buffer:a})})})};typeof ye.writev=="function"&&(st.writev=function(t,e,...r){return typeof r[r.length-1]=="function"?ye.writev(t,e,...r):new Promise((n,i)=>{ye.writev(t,e,...r,(s,o,a)=>{if(s)return i(s);n({bytesWritten:o,buffers:a})})})});typeof ye.realpath.native=="function"&&(st.realpath.native=ua(ye.realpath.native))});var wi=y((Xb,la)=>{la.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 ma=y((Gb,Si)=>{"use strict";var At=or(),Qe=require("path"),Op=wi(),fa=Op("10.12.0"),da=t=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(t.replace(Qe.parse(t).root,""))){let r=new Error(`Path contains invalid characters: ${t}`);throw r.code="EINVAL",r}},ha=t=>{let e={mode:511};return typeof t=="number"&&(t={mode:t}),{...e,...t}},pa=t=>{let e=new Error(`operation not permitted, mkdir '${t}'`);return e.code="EPERM",e.errno=-4048,e.path=t,e.syscall="mkdir",e};Si.exports.makeDir=async(t,e)=>{if(da(t),e=ha(e),fa){let n=Qe.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(Qe.dirname(n)===n)throw pa(n);if(i.message.includes("null bytes"))throw i;return await r(Qe.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(Qe.resolve(t))};Si.exports.makeDirSync=(t,e)=>{if(da(t),e=ha(e),fa){let n=Qe.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(Qe.dirname(n)===n)throw pa(n);if(i.message.includes("null bytes"))throw i;return r(Qe.dirname(n)),r(n)}try{if(!At.statSync(n).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(Qe.resolve(t))}});var je=y((Hb,ga)=>{"use strict";var Ip=Ee().fromPromise,{makeDir:Fp,makeDirSync:xi}=ma(),Ei=Ip(Fp);ga.exports={mkdirs:Ei,mkdirsSync:xi,mkdirp:Ei,mkdirpSync:xi,ensureDir:Ei,ensureDirSync:xi}});var Ci=y((zb,ya)=>{"use strict";var Rt=fe();function Ap(t,e,r,n){Rt.open(t,"r+",(i,s)=>{if(i)return n(i);Rt.futimes(s,e,r,o=>{Rt.close(s,a=>{n&&n(o||a)})})})}function Rp(t,e,r){let n=Rt.openSync(t,"r+");return Rt.futimesSync(n,e,r),Rt.closeSync(n)}ya.exports={utimesMillis:Ap,utimesMillisSync:Rp}});var ar=y((Wb,wa)=>{"use strict";var Tt=or(),Ce=require("path"),Tp=require("util"),kp=wi(),zr=kp("10.5.0"),va=t=>zr?Tt.stat(t,{bigint:!0}):Tt.stat(t),Pi=t=>zr?Tt.statSync(t,{bigint:!0}):Tt.statSync(t);function Mp(t,e){return Promise.all([va(t),va(e).catch(r=>{if(r.code==="ENOENT")return null;throw r})]).then(([r,n])=>({srcStat:r,destStat:n}))}function qp(t,e){let r,n=Pi(t);try{r=Pi(e)}catch(i){if(i.code==="ENOENT")return{srcStat:n,destStat:null};throw i}return{srcStat:n,destStat:r}}function jp(t,e,r,n){Tp.callbackify(Mp)(t,e,(i,s)=>{if(i)return n(i);let{srcStat:o,destStat:a}=s;return a&&Wr(o,a)?n(new Error("Source and destination must not be the same.")):o.isDirectory()&&Di(t,e)?n(new Error(Jr(t,e,r))):n(null,{srcStat:o,destStat:a})})}function Np(t,e,r){let{srcStat:n,destStat:i}=qp(t,e);if(i&&Wr(n,i))throw new Error("Source and destination must not be the same.");if(n.isDirectory()&&Di(t,e))throw new Error(Jr(t,e,r));return{srcStat:n,destStat:i}}function ba(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):Wr(e,d)?i(new Error(Jr(t,r,n))):ba(t,e,o,n,i);zr?Tt.stat(o,{bigint:!0},a):Tt.stat(o,a)}function _a(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=Pi(s)}catch(a){if(a.code==="ENOENT")return;throw a}if(Wr(e,o))throw new Error(Jr(t,r,n));return _a(t,e,s,n)}function Wr(t,e){return!!(e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev&&(zr||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 Di(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 Jr(t,e,r){return`Cannot ${r} '${t}' to a subdirectory of itself, '${e}'.`}wa.exports={checkPaths:jp,checkPathsSync:Np,checkParentPaths:ba,checkParentPathsSync:_a,isSrcSubdir:Di}});var Pa=y((Jb,Ca)=>{"use strict";var de=fe(),cr=require("path"),Lp=je().mkdirsSync,$p=Ci().utimesMillisSync,ur=ar();function Bp(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;
|
|
2
|
+
"use strict";var Uy=Object.create;var pn=Object.defineProperty;var Xy=Object.getOwnPropertyDescriptor;var Hy=Object.getOwnPropertyNames;var Wy=Object.getPrototypeOf,Yy=Object.prototype.hasOwnProperty;var ou=(e,t)=>()=>(e&&(t=e(e=0)),t);var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),au=(e,t)=>{for(var r in t)pn(e,r,{get:t[r],enumerable:!0})},su=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Hy(t))!Yy.call(e,i)&&i!==r&&pn(e,i,{get:()=>t[i],enumerable:!(n=Xy(t,i))||n.enumerable});return e};var T=(e,t,r)=>(r=e!=null?Uy(Wy(e)):{},su(t||!e||!e.__esModule?pn(r,"default",{value:e,enumerable:!0}):r,e)),uu=e=>su(pn({},"__esModule",{value:!0}),e);var Ot=v((sw,Qi)=>{var Vy=require("fs"),zy=require("path");function cu(e){console.log(`[dotenv][DEBUG] ${e}`)}var Jy=`
|
|
3
|
+
`,Ky=/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/,Qy=/\\n/g,Zy=/\n|\r|\r\n/;function lu(e,t){let r=!!(t&&t.debug),n={};return e.toString().split(Zy).forEach(function(i,o){let a=i.match(Ky);if(a!=null){let s=a[1],c=a[2]||"",d=c.length-1,l=c[0]==='"'&&c[d]==='"';c[0]==="'"&&c[d]==="'"||l?(c=c.substring(1,d),l&&(c=c.replace(Qy,Jy))):c=c.trim(),n[s]=c}else r&&cu(`did not match key and value when parsing line ${o+1}: ${i}`)}),n}function eg(e){let t=zy.resolve(process.cwd(),".env"),r="utf8",n=!1;e&&(e.path!=null&&(t=e.path),e.encoding!=null&&(r=e.encoding),e.debug!=null&&(n=!0));try{let i=lu(Vy.readFileSync(t,{encoding:r}),{debug:n});return Object.keys(i).forEach(function(o){Object.prototype.hasOwnProperty.call(process.env,o)?n&&cu(`"${o}" is already defined in \`process.env\` and will not be overwritten`):process.env[o]=i[o]}),{parsed:i}}catch(i){return{error:i}}}Qi.exports.config=eg;Qi.exports.parse=lu});var Ae=v(Zi=>{"use strict";Zi.fromCallback=function(e){return Object.defineProperty(function(...t){if(typeof t[t.length-1]=="function")e.apply(this,t);else return new Promise((r,n)=>{e.call(this,...t,(i,o)=>i!=null?n(i):r(o))})},"name",{value:e.name})};Zi.fromPromise=function(e){return Object.defineProperty(function(...t){let r=t[t.length-1];if(typeof r!="function")return e.apply(this,t);e.apply(this,t.slice(0,-1)).then(n=>r(null,n),r)},"name",{value:e.name})}});var du=v((cw,fu)=>{var gt=require("constants"),tg=process.cwd,hn=null,rg=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return hn||(hn=tg.call(process)),hn};try{process.cwd()}catch{}typeof process.chdir=="function"&&(eo=process.chdir,process.chdir=function(e){hn=null,eo.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,eo));var eo;fu.exports=ng;function ng(e){gt.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=o(e.chown),e.fchown=o(e.fchown),e.lchown=o(e.lchown),e.chmod=n(e.chmod),e.fchmod=n(e.fchmod),e.lchmod=n(e.lchmod),e.chownSync=a(e.chownSync),e.fchownSync=a(e.fchownSync),e.lchownSync=a(e.lchownSync),e.chmodSync=i(e.chmodSync),e.fchmodSync=i(e.fchmodSync),e.lchmodSync=i(e.lchmodSync),e.stat=s(e.stat),e.fstat=s(e.fstat),e.lstat=s(e.lstat),e.statSync=c(e.statSync),e.fstatSync=c(e.fstatSync),e.lstatSync=c(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(l,p,m){m&&process.nextTick(m)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(l,p,m,h){h&&process.nextTick(h)},e.lchownSync=function(){}),rg==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:function(l){function p(m,h,_){var b=Date.now(),w=0;l(m,h,function I(F){if(F&&(F.code==="EACCES"||F.code==="EPERM")&&Date.now()-b<6e4){setTimeout(function(){e.stat(h,function(P,L){P&&P.code==="ENOENT"?l(m,h,I):_(F)})},w),w<100&&(w+=10);return}_&&_(F)})}return Object.setPrototypeOf&&Object.setPrototypeOf(p,l),p}(e.rename)),e.read=typeof e.read!="function"?e.read:function(l){function p(m,h,_,b,w,I){var F;if(I&&typeof I=="function"){var P=0;F=function(L,K,se){if(L&&L.code==="EAGAIN"&&P<10)return P++,l.call(e,m,h,_,b,w,F);I.apply(this,arguments)}}return l.call(e,m,h,_,b,w,F)}return Object.setPrototypeOf&&Object.setPrototypeOf(p,l),p}(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:function(l){return function(p,m,h,_,b){for(var w=0;;)try{return l.call(e,p,m,h,_,b)}catch(I){if(I.code==="EAGAIN"&&w<10){w++;continue}throw I}}}(e.readSync);function t(l){l.lchmod=function(p,m,h){l.open(p,gt.O_WRONLY|gt.O_SYMLINK,m,function(_,b){if(_){h&&h(_);return}l.fchmod(b,m,function(w){l.close(b,function(I){h&&h(w||I)})})})},l.lchmodSync=function(p,m){var h=l.openSync(p,gt.O_WRONLY|gt.O_SYMLINK,m),_=!0,b;try{b=l.fchmodSync(h,m),_=!1}finally{if(_)try{l.closeSync(h)}catch{}else l.closeSync(h)}return b}}function r(l){gt.hasOwnProperty("O_SYMLINK")&&l.futimes?(l.lutimes=function(p,m,h,_){l.open(p,gt.O_SYMLINK,function(b,w){if(b){_&&_(b);return}l.futimes(w,m,h,function(I){l.close(w,function(F){_&&_(I||F)})})})},l.lutimesSync=function(p,m,h){var _=l.openSync(p,gt.O_SYMLINK),b,w=!0;try{b=l.futimesSync(_,m,h),w=!1}finally{if(w)try{l.closeSync(_)}catch{}else l.closeSync(_)}return b}):l.futimes&&(l.lutimes=function(p,m,h,_){_&&process.nextTick(_)},l.lutimesSync=function(){})}function n(l){return l&&function(p,m,h){return l.call(e,p,m,function(_){d(_)&&(_=null),h&&h.apply(this,arguments)})}}function i(l){return l&&function(p,m){try{return l.call(e,p,m)}catch(h){if(!d(h))throw h}}}function o(l){return l&&function(p,m,h,_){return l.call(e,p,m,h,function(b){d(b)&&(b=null),_&&_.apply(this,arguments)})}}function a(l){return l&&function(p,m,h){try{return l.call(e,p,m,h)}catch(_){if(!d(_))throw _}}}function s(l){return l&&function(p,m,h){typeof m=="function"&&(h=m,m=null);function _(b,w){w&&(w.uid<0&&(w.uid+=4294967296),w.gid<0&&(w.gid+=4294967296)),h&&h.apply(this,arguments)}return m?l.call(e,p,m,_):l.call(e,p,_)}}function c(l){return l&&function(p,m){var h=m?l.call(e,p,m):l.call(e,p);return h&&(h.uid<0&&(h.uid+=4294967296),h.gid<0&&(h.gid+=4294967296)),h}}function d(l){if(!l||l.code==="ENOSYS")return!0;var p=!process.getuid||process.getuid()!==0;return!!(p&&(l.code==="EINVAL"||l.code==="EPERM"))}}});var mu=v((lw,hu)=>{var pu=require("stream").Stream;hu.exports=ig;function ig(e){return{ReadStream:t,WriteStream:r};function t(n,i){if(!(this instanceof t))return new t(n,i);pu.call(this);var o=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var a=Object.keys(i),s=0,c=a.length;s<c;s++){var d=a[s];this[d]=i[d]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){o._read()});return}e.open(this.path,this.flags,this.mode,function(l,p){if(l){o.emit("error",l),o.readable=!1;return}o.fd=p,o.emit("open",p),o._read()})}function r(n,i){if(!(this instanceof r))return new r(n,i);pu.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var o=Object.keys(i),a=0,s=o.length;a<s;a++){var c=o[a];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=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var gu=v((fw,yu)=>{"use strict";yu.exports=ag;var og=Object.getPrototypeOf||function(e){return e.__proto__};function ag(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:og(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}});var be=v((dw,no)=>{var re=require("fs"),sg=du(),ug=mu(),cg=gu(),mn=require("util"),ye,gn;typeof Symbol=="function"&&typeof Symbol.for=="function"?(ye=Symbol.for("graceful-fs.queue"),gn=Symbol.for("graceful-fs.previous")):(ye="___graceful-fs.queue",gn="___graceful-fs.previous");function lg(){}function Eu(e,t){Object.defineProperty(e,ye,{get:function(){return t}})}var It=lg;mn.debuglog?It=mn.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(It=function(){var e=mn.format.apply(mn,arguments);e="GFS4: "+e.split(/\n/).join(`
|
|
4
|
+
GFS4: `),console.error(e)});re[ye]||(vu=global[ye]||[],Eu(re,vu),re.close=function(e){function t(r,n){return e.call(re,r,function(i){i||_u(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(t,gn,{value:e}),t}(re.close),re.closeSync=function(e){function t(r){e.apply(re,arguments),_u()}return Object.defineProperty(t,gn,{value:e}),t}(re.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){It(re[ye]),require("assert").equal(re[ye].length,0)}));var vu;global[ye]||Eu(global,re[ye]);no.exports=to(cg(re));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!re.__patched&&(no.exports=to(re),re.__patched=!0);function to(e){sg(e),e.gracefulify=to,e.createReadStream=K,e.createWriteStream=se;var t=e.readFile;e.readFile=r;function r(x,q,M){return typeof q=="function"&&(M=q,q=null),Q(x,q,M);function Q(U,W,S,H){return t(U,W,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Vt([Q,[U,W,S],k,H||Date.now(),Date.now()]):typeof S=="function"&&S.apply(this,arguments)})}}var n=e.writeFile;e.writeFile=i;function i(x,q,M,Q){return typeof M=="function"&&(Q=M,M=null),U(x,q,M,Q);function U(W,S,H,k,R){return n(W,S,H,function(j){j&&(j.code==="EMFILE"||j.code==="ENFILE")?Vt([U,[W,S,H,k],j,R||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments)})}}var o=e.appendFile;o&&(e.appendFile=a);function a(x,q,M,Q){return typeof M=="function"&&(Q=M,M=null),U(x,q,M,Q);function U(W,S,H,k,R){return o(W,S,H,function(j){j&&(j.code==="EMFILE"||j.code==="ENFILE")?Vt([U,[W,S,H,k],j,R||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments)})}}var s=e.copyFile;s&&(e.copyFile=c);function c(x,q,M,Q){return typeof M=="function"&&(Q=M,M=0),U(x,q,M,Q);function U(W,S,H,k,R){return s(W,S,H,function(j){j&&(j.code==="EMFILE"||j.code==="ENFILE")?Vt([U,[W,S,H,k],j,R||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments)})}}var d=e.readdir;e.readdir=p;var l=/^v[0-5]\./;function p(x,q,M){typeof q=="function"&&(M=q,q=null);var Q=l.test(process.version)?function(S,H,k,R){return d(S,U(S,H,k,R))}:function(S,H,k,R){return d(S,H,U(S,H,k,R))};return Q(x,q,M);function U(W,S,H,k){return function(R,j){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Vt([Q,[W,S,H],R,k||Date.now(),Date.now()]):(j&&j.sort&&j.sort(),typeof H=="function"&&H.call(this,R,j))}}}if(process.version.substr(0,4)==="v0.8"){var m=ug(e);I=m.ReadStream,P=m.WriteStream}var h=e.ReadStream;h&&(I.prototype=Object.create(h.prototype),I.prototype.open=F);var _=e.WriteStream;_&&(P.prototype=Object.create(_.prototype),P.prototype.open=L),Object.defineProperty(e,"ReadStream",{get:function(){return I},set:function(x){I=x},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return P},set:function(x){P=x},enumerable:!0,configurable:!0});var b=I;Object.defineProperty(e,"FileReadStream",{get:function(){return b},set:function(x){b=x},enumerable:!0,configurable:!0});var w=P;Object.defineProperty(e,"FileWriteStream",{get:function(){return w},set:function(x){w=x},enumerable:!0,configurable:!0});function I(x,q){return this instanceof I?(h.apply(this,arguments),this):I.apply(Object.create(I.prototype),arguments)}function F(){var x=this;ce(x.path,x.flags,x.mode,function(q,M){q?(x.autoClose&&x.destroy(),x.emit("error",q)):(x.fd=M,x.emit("open",M),x.read())})}function P(x,q){return this instanceof P?(_.apply(this,arguments),this):P.apply(Object.create(P.prototype),arguments)}function L(){var x=this;ce(x.path,x.flags,x.mode,function(q,M){q?(x.destroy(),x.emit("error",q)):(x.fd=M,x.emit("open",M))})}function K(x,q){return new e.ReadStream(x,q)}function se(x,q){return new e.WriteStream(x,q)}var $e=e.open;e.open=ce;function ce(x,q,M,Q){return typeof M=="function"&&(Q=M,M=null),U(x,q,M,Q);function U(W,S,H,k,R){return $e(W,S,H,function(j,he){j&&(j.code==="EMFILE"||j.code==="ENFILE")?Vt([U,[W,S,H,k],j,R||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments)})}}return e}function Vt(e){It("ENQUEUE",e[0].name,e[1]),re[ye].push(e),ro()}var yn;function _u(){for(var e=Date.now(),t=0;t<re[ye].length;++t)re[ye][t].length>2&&(re[ye][t][3]=e,re[ye][t][4]=e);ro()}function ro(){if(clearTimeout(yn),yn=void 0,re[ye].length!==0){var e=re[ye].shift(),t=e[0],r=e[1],n=e[2],i=e[3],o=e[4];if(i===void 0)It("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-i>=6e4){It("TIMEOUT",t.name,r);var a=r.pop();typeof a=="function"&&a.call(null,n)}else{var s=Date.now()-o,c=Math.max(o-i,1),d=Math.min(c*1.2,100);s>=d?(It("RETRY",t.name,r),t.apply(null,r.concat([i]))):re[ye].push(e)}yn===void 0&&(yn=setTimeout(ro,0))}}});var wr=v(vt=>{"use strict";var bu=Ae().fromCallback,xe=be(),fg=["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(e=>typeof xe[e]=="function");Object.keys(xe).forEach(e=>{e!=="promises"&&(vt[e]=xe[e])});fg.forEach(e=>{vt[e]=bu(xe[e])});vt.exists=function(e,t){return typeof t=="function"?xe.exists(e,t):new Promise(r=>xe.exists(e,r))};vt.read=function(e,t,r,n,i,o){return typeof o=="function"?xe.read(e,t,r,n,i,o):new Promise((a,s)=>{xe.read(e,t,r,n,i,(c,d,l)=>{if(c)return s(c);a({bytesRead:d,buffer:l})})})};vt.write=function(e,t,...r){return typeof r[r.length-1]=="function"?xe.write(e,t,...r):new Promise((n,i)=>{xe.write(e,t,...r,(o,a,s)=>{if(o)return i(o);n({bytesWritten:a,buffer:s})})})};typeof xe.writev=="function"&&(vt.writev=function(e,t,...r){return typeof r[r.length-1]=="function"?xe.writev(e,t,...r):new Promise((n,i)=>{xe.writev(e,t,...r,(o,a,s)=>{if(o)return i(o);n({bytesWritten:a,buffers:s})})})});typeof xe.realpath.native=="function"&&(vt.realpath.native=bu(xe.realpath.native))});var io=v((hw,Su)=>{Su.exports=e=>{let t=process.versions.node.split(".").map(r=>parseInt(r,10));return e=e.split(".").map(r=>parseInt(r,10)),t[0]>e[0]||t[0]===e[0]&&(t[1]>e[1]||t[1]===e[1]&&t[2]>=e[2])}});var Ru=v((mw,oo)=>{"use strict";var zt=wr(),lt=require("path"),dg=io(),wu=dg("10.12.0"),Du=e=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(lt.parse(e).root,""))){let r=new Error(`Path contains invalid characters: ${e}`);throw r.code="EINVAL",r}},Cu=e=>{let t={mode:511};return typeof e=="number"&&(e={mode:e}),{...t,...e}},xu=e=>{let t=new Error(`operation not permitted, mkdir '${e}'`);return t.code="EPERM",t.errno=-4048,t.path=e,t.syscall="mkdir",t};oo.exports.makeDir=async(e,t)=>{if(Du(e),t=Cu(t),wu){let n=lt.resolve(e);return zt.mkdir(n,{mode:t.mode,recursive:!0})}let r=async n=>{try{await zt.mkdir(n,t.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(lt.dirname(n)===n)throw xu(n);if(i.message.includes("null bytes"))throw i;return await r(lt.dirname(n)),r(n)}try{if(!(await zt.stat(n)).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(lt.resolve(e))};oo.exports.makeDirSync=(e,t)=>{if(Du(e),t=Cu(t),wu){let n=lt.resolve(e);return zt.mkdirSync(n,{mode:t.mode,recursive:!0})}let r=n=>{try{zt.mkdirSync(n,t.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(lt.dirname(n)===n)throw xu(n);if(i.message.includes("null bytes"))throw i;return r(lt.dirname(n)),r(n)}try{if(!zt.statSync(n).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(lt.resolve(e))}});var Ke=v((yw,Ou)=>{"use strict";var pg=Ae().fromPromise,{makeDir:hg,makeDirSync:ao}=Ru(),so=pg(hg);Ou.exports={mkdirs:so,mkdirsSync:ao,mkdirp:so,mkdirpSync:ao,ensureDir:so,ensureDirSync:ao}});var uo=v((gw,Iu)=>{"use strict";var Jt=be();function mg(e,t,r,n){Jt.open(e,"r+",(i,o)=>{if(i)return n(i);Jt.futimes(o,t,r,a=>{Jt.close(o,s=>{n&&n(a||s)})})})}function yg(e,t,r){let n=Jt.openSync(e,"r+");return Jt.futimesSync(n,t,r),Jt.closeSync(n)}Iu.exports={utimesMillis:mg,utimesMillisSync:yg}});var Dr=v((vw,Fu)=>{"use strict";var Kt=wr(),Fe=require("path"),gg=require("util"),vg=io(),vn=vg("10.5.0"),Pu=e=>vn?Kt.stat(e,{bigint:!0}):Kt.stat(e),co=e=>vn?Kt.statSync(e,{bigint:!0}):Kt.statSync(e);function _g(e,t){return Promise.all([Pu(e),Pu(t).catch(r=>{if(r.code==="ENOENT")return null;throw r})]).then(([r,n])=>({srcStat:r,destStat:n}))}function Eg(e,t){let r,n=co(e);try{r=co(t)}catch(i){if(i.code==="ENOENT")return{srcStat:n,destStat:null};throw i}return{srcStat:n,destStat:r}}function bg(e,t,r,n){gg.callbackify(_g)(e,t,(i,o)=>{if(i)return n(i);let{srcStat:a,destStat:s}=o;return s&&_n(a,s)?n(new Error("Source and destination must not be the same.")):a.isDirectory()&&lo(e,t)?n(new Error(En(e,t,r))):n(null,{srcStat:a,destStat:s})})}function Sg(e,t,r){let{srcStat:n,destStat:i}=Eg(e,t);if(i&&_n(n,i))throw new Error("Source and destination must not be the same.");if(n.isDirectory()&&lo(e,t))throw new Error(En(e,t,r));return{srcStat:n,destStat:i}}function Tu(e,t,r,n,i){let o=Fe.resolve(Fe.dirname(e)),a=Fe.resolve(Fe.dirname(r));if(a===o||a===Fe.parse(a).root)return i();let s=(c,d)=>c?c.code==="ENOENT"?i():i(c):_n(t,d)?i(new Error(En(e,r,n))):Tu(e,t,a,n,i);vn?Kt.stat(a,{bigint:!0},s):Kt.stat(a,s)}function Au(e,t,r,n){let i=Fe.resolve(Fe.dirname(e)),o=Fe.resolve(Fe.dirname(r));if(o===i||o===Fe.parse(o).root)return;let a;try{a=co(o)}catch(s){if(s.code==="ENOENT")return;throw s}if(_n(t,a))throw new Error(En(e,r,n));return Au(e,t,o,n)}function _n(e,t){return!!(t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev&&(vn||t.ino<Number.MAX_SAFE_INTEGER||t.size===e.size&&t.mode===e.mode&&t.nlink===e.nlink&&t.atimeMs===e.atimeMs&&t.mtimeMs===e.mtimeMs&&t.ctimeMs===e.ctimeMs&&t.birthtimeMs===e.birthtimeMs))}function lo(e,t){let r=Fe.resolve(e).split(Fe.sep).filter(i=>i),n=Fe.resolve(t).split(Fe.sep).filter(i=>i);return r.reduce((i,o,a)=>i&&n[a]===o,!0)}function En(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}Fu.exports={checkPaths:bg,checkPathsSync:Sg,checkParentPaths:Tu,checkParentPathsSync:Au,isSrcSubdir:lo}});var qu=v((_w,Mu)=>{"use strict";var Se=be(),Cr=require("path"),wg=Ke().mkdirsSync,Dg=uo().utimesMillisSync,xr=Dr();function Cg(e,t,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;
|
|
5
5
|
|
|
6
|
-
see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:n,destStat:i}=
|
|
6
|
+
see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:n,destStat:i}=xr.checkPathsSync(e,t,"copy");return xr.checkParentPathsSync(e,n,t,"copy"),xg(i,e,t,r)}function xg(e,t,r,n){if(n.filter&&!n.filter(t,r))return;let i=Cr.dirname(r);return Se.existsSync(i)||wg(i),Lu(e,t,r,n)}function Lu(e,t,r,n){if(!(n.filter&&!n.filter(t,r)))return Rg(e,t,r,n)}function Rg(e,t,r,n){let o=(n.dereference?Se.statSync:Se.lstatSync)(t);if(o.isDirectory())return Lg(o,e,t,r,n);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return Og(o,e,t,r,n);if(o.isSymbolicLink())return Mg(e,t,r,n)}function Og(e,t,r,n,i){return t?Ig(e,r,n,i):ku(e,r,n,i)}function Ig(e,t,r,n){if(n.overwrite)return Se.unlinkSync(r),ku(e,t,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function ku(e,t,r,n){return Se.copyFileSync(t,r),n.preserveTimestamps&&Pg(e.mode,t,r),fo(r,e.mode)}function Pg(e,t,r){return Tg(e)&&Ag(r,e),Fg(t,r)}function Tg(e){return(e&128)===0}function Ag(e,t){return fo(e,t|128)}function fo(e,t){return Se.chmodSync(e,t)}function Fg(e,t){let r=Se.statSync(e);return Dg(t,r.atime,r.mtime)}function Lg(e,t,r,n,i){if(!t)return kg(e.mode,r,n,i);if(t&&!t.isDirectory())throw new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`);return Nu(r,n,i)}function kg(e,t,r,n){return Se.mkdirSync(r),Nu(t,r,n),fo(r,e)}function Nu(e,t,r){Se.readdirSync(e).forEach(n=>Ng(n,e,t,r))}function Ng(e,t,r,n){let i=Cr.join(t,e),o=Cr.join(r,e),{destStat:a}=xr.checkPathsSync(i,o,"copy");return Lu(a,i,o,n)}function Mg(e,t,r,n){let i=Se.readlinkSync(t);if(n.dereference&&(i=Cr.resolve(process.cwd(),i)),e){let o;try{o=Se.readlinkSync(r)}catch(a){if(a.code==="EINVAL"||a.code==="UNKNOWN")return Se.symlinkSync(i,r);throw a}if(n.dereference&&(o=Cr.resolve(process.cwd(),o)),xr.isSrcSubdir(i,o))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${o}'.`);if(Se.statSync(r).isDirectory()&&xr.isSrcSubdir(o,i))throw new Error(`Cannot overwrite '${o}' with '${i}'.`);return qg(i,r)}else return Se.symlinkSync(i,r)}function qg(e,t){return Se.unlinkSync(t),Se.symlinkSync(e,t)}Mu.exports=Cg});var po=v((Ew,ju)=>{"use strict";ju.exports={copySync:qu()}});var _t=v((bw,Gu)=>{"use strict";var jg=Ae().fromPromise,$u=wr();function $g(e){return $u.access(e).then(()=>!0).catch(()=>!1)}Gu.exports={pathExists:jg($g),pathExistsSync:$u.existsSync}});var Ju=v((Sw,zu)=>{"use strict";var Le=be(),Rr=require("path"),Gg=Ke().mkdirs,Bg=_t().pathExists,Ug=uo().utimesMillis,Or=Dr();function Xg(e,t,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;
|
|
7
7
|
|
|
8
|
-
see https://github.com/jprichardson/node-fs-extra/issues/269`),
|
|
9
|
-
`,finalEOL:r=!0,replacer:n=null,spaces:i}={}){let s=r?e:"";return JSON.stringify(t,n,i).replace(/\n/g,e)+s}function G0(t){return Buffer.isBuffer(t)&&(t=t.toString("utf8")),t.replace(/^\uFEFF/,"")}Oc.exports={stringify:X0,stripBom:G0}});var Rc=y((u2,Ac)=>{var Mt;try{Mt=fe()}catch{Mt=require("fs")}var rn=Ee(),{stringify:Ic,stripBom:Fc}=tn();async function H0(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||Mt,n="throws"in e?e.throws:!0,i=await rn.fromCallback(r.readFile)(t,e);i=Fc(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 z0=rn.fromPromise(H0);function W0(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||Mt,n="throws"in e?e.throws:!0;try{let i=r.readFileSync(t,e);return i=Fc(i),JSON.parse(i,e.reviver)}catch(i){if(n)throw i.message=`${t}: ${i.message}`,i;return null}}async function J0(t,e,r={}){let n=r.fs||Mt,i=Ic(e,r);await rn.fromCallback(n.writeFile)(t,i,r)}var V0=rn.fromPromise(J0);function Y0(t,e,r={}){let n=r.fs||Mt,i=Ic(e,r);return n.writeFileSync(t,i,r)}var K0={readFile:z0,readFileSync:W0,writeFile:V0,writeFileSync:Y0};Ac.exports=K0});var kc=y((l2,Tc)=>{"use strict";var nn=Rc();Tc.exports={readJson:nn.readFile,readJsonSync:nn.readFileSync,writeJson:nn.writeFile,writeJsonSync:nn.writeFileSync}});var sn=y((f2,jc)=>{"use strict";var Q0=Ee().fromCallback,mr=fe(),Mc=require("path"),qc=je(),Z0=ot().pathExists;function em(t,e,r,n){typeof r=="function"&&(n=r,r="utf8");let i=Mc.dirname(t);Z0(i,(s,o)=>{if(s)return n(s);if(o)return mr.writeFile(t,e,r,n);qc.mkdirs(i,a=>{if(a)return n(a);mr.writeFile(t,e,r,n)})})}function tm(t,...e){let r=Mc.dirname(t);if(mr.existsSync(r))return mr.writeFileSync(t,...e);qc.mkdirsSync(r),mr.writeFileSync(t,...e)}jc.exports={outputFile:Q0(em),outputFileSync:tm}});var Lc=y((d2,Nc)=>{"use strict";var{stringify:rm}=tn(),{outputFile:nm}=sn();async function im(t,e,r={}){let n=rm(e,r);await nm(t,n,r)}Nc.exports=im});var Bc=y((h2,$c)=>{"use strict";var{stringify:sm}=tn(),{outputFileSync:om}=sn();function am(t,e,r){let n=sm(e,r);om(t,n,r)}$c.exports=am});var Xc=y((p2,Uc)=>{"use strict";var cm=Ee().fromPromise,ve=kc();ve.outputJson=cm(Lc());ve.outputJsonSync=Bc();ve.outputJSON=ve.outputJson;ve.outputJSONSync=ve.outputJsonSync;ve.writeJSON=ve.writeJson;ve.writeJSONSync=ve.writeJsonSync;ve.readJSON=ve.readJson;ve.readJSONSync=ve.readJsonSync;Uc.exports=ve});var Vc=y((m2,Jc)=>{"use strict";var zc=fe(),um=require("path"),lm=Ii().copySync,Wc=hr().removeSync,fm=je().mkdirpSync,Gc=ar();function dm(t,e,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:i}=Gc.checkPathsSync(t,e,"move");return Gc.checkParentPathsSync(t,i,e,"move"),fm(um.dirname(e)),hm(t,e,n)}function hm(t,e,r){if(r)return Wc(e),Hc(t,e,r);if(zc.existsSync(e))throw new Error("dest already exists.");return Hc(t,e,r)}function Hc(t,e,r){try{zc.renameSync(t,e)}catch(n){if(n.code!=="EXDEV")throw n;return pm(t,e,r)}}function pm(t,e,r){return lm(t,e,{overwrite:r,errorOnExist:!0}),Wc(t)}Jc.exports=dm});var Kc=y((g2,Yc)=>{"use strict";Yc.exports={moveSync:Vc()}});var ru=y((y2,tu)=>{"use strict";var mm=fe(),gm=require("path"),ym=Ai().copy,eu=hr().remove,vm=je().mkdirp,bm=ot().pathExists,Qc=ar();function _m(t,e,r,n){typeof r=="function"&&(n=r,r={});let i=r.overwrite||r.clobber||!1;Qc.checkPaths(t,e,"move",(s,o)=>{if(s)return n(s);let{srcStat:a}=o;Qc.checkParentPaths(t,a,e,"move",c=>{if(c)return n(c);vm(gm.dirname(e),d=>d?n(d):wm(t,e,i,n))})})}function wm(t,e,r,n){if(r)return eu(e,i=>i?n(i):Zc(t,e,r,n));bm(e,(i,s)=>i?n(i):s?n(new Error("dest already exists.")):Zc(t,e,r,n))}function Zc(t,e,r,n){mm.rename(t,e,i=>i?i.code!=="EXDEV"?n(i):Sm(t,e,r,n):n())}function Sm(t,e,r,n){ym(t,e,{overwrite:r,errorOnExist:!0},s=>s?n(s):eu(t,n))}tu.exports=_m});var iu=y((v2,nu)=>{"use strict";var xm=Ee().fromCallback;nu.exports={move:xm(ru())}});var yt=y((b2,Ti)=>{"use strict";Ti.exports={...or(),...Ii(),...Ai(),...ic(),...Dc(),...Xc(),...je(),...Kc(),...iu(),...sn(),...ot(),...hr()};var su=require("fs");Object.getOwnPropertyDescriptor(su,"promises")&&Object.defineProperty(Ti.exports,"promises",{get(){return su.promises}})});var au=y((_2,ou)=>{"use strict";var Em=/[|\\{}()[\]^$+*?.]/g;ou.exports=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(Em,"\\$&")}});var uu=y((w2,cu)=>{"use strict";cu.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 ki=y((S2,hu)=>{var vt=uu(),du={};for(on in vt)vt.hasOwnProperty(on)&&(du[vt[on]]=on);var on,E=hu.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(be in E)if(E.hasOwnProperty(be)){if(!("channels"in E[be]))throw new Error("missing channels property: "+be);if(!("labels"in E[be]))throw new Error("missing channel labels property: "+be);if(E[be].labels.length!==E[be].channels)throw new Error("channel and label counts mismatch: "+be);lu=E[be].channels,fu=E[be].labels,delete E[be].channels,delete E[be].labels,Object.defineProperty(E[be],"channels",{value:lu}),Object.defineProperty(E[be],"labels",{value:fu})}var lu,fu,be;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 Cm(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=du[t];if(e)return e;var r=1/0,n;for(var i in vt)if(vt.hasOwnProperty(i)){var s=vt[i],o=Cm(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 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 mu=y((x2,pu)=>{var an=ki();function Pm(){for(var t={},e=Object.keys(an),r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function Dm(t){var e=Pm(),r=[t];for(e[t].distance=0;r.length;)for(var n=r.pop(),i=Object.keys(an[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 Om(t,e){return function(r){return e(t(r))}}function Im(t,e){for(var r=[e[t].parent,t],n=an[e[t].parent][t],i=e[t].parent;e[i].parent;)r.unshift(e[i].parent),n=Om(an[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}pu.exports=function(t){for(var e=Dm(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]=Im(o,e))}return r}});var yu=y((E2,gu)=>{var Mi=ki(),Fm=mu(),qt={},Am=Object.keys(Mi);function Rm(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 Tm(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}Am.forEach(function(t){qt[t]={},Object.defineProperty(qt[t],"channels",{value:Mi[t].channels}),Object.defineProperty(qt[t],"labels",{value:Mi[t].labels});var e=Fm(t),r=Object.keys(e);r.forEach(function(n){var i=e[n];qt[t][n]=Tm(i),qt[t][n].raw=Rm(i)})});gu.exports=qt});var bu=y((C2,vu)=>{"use strict";var jt=yu(),cn=(t,e)=>function(){return`\x1B[${t.apply(jt,arguments)+e}m`},un=(t,e)=>function(){let r=t.apply(jt,arguments);return`\x1B[${38+e};5;${r}m`},ln=(t,e)=>function(){let r=t.apply(jt,arguments);return`\x1B[${38+e};2;${r[0]};${r[1]};${r[2]}m`};function km(){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:cn(r,0)},e.color.ansi256={ansi256:un(r,0)},e.color.ansi16m={rgb:ln(n,0)},e.bgColor.ansi={ansi:cn(r,10)},e.bgColor.ansi256={ansi256:un(r,10)},e.bgColor.ansi16m={rgb:ln(n,10)};for(let i of Object.keys(jt)){if(typeof jt[i]!="object")continue;let s=jt[i];i==="ansi16"&&(i="ansi"),"ansi16"in s&&(e.color.ansi[i]=cn(s.ansi16,0),e.bgColor.ansi[i]=cn(s.ansi16,10)),"ansi256"in s&&(e.color.ansi256[i]=un(s.ansi256,0),e.bgColor.ansi256[i]=un(s.ansi256,10)),"rgb"in s&&(e.color.ansi16m[i]=ln(s.rgb,0),e.bgColor.ansi16m[i]=ln(s.rgb,10))}return e}Object.defineProperty(vu,"exports",{enumerable:!0,get:km})});var wu=y((P2,_u)=>{"use strict";_u.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 xu=y((D2,Su)=>{"use strict";var Mm=require("os"),Ne=wu(),he=process.env,Nt;Ne("no-color")||Ne("no-colors")||Ne("color=false")?Nt=!1:(Ne("color")||Ne("colors")||Ne("color=true")||Ne("color=always"))&&(Nt=!0);"FORCE_COLOR"in he&&(Nt=he.FORCE_COLOR.length===0||parseInt(he.FORCE_COLOR,10)!==0);function qm(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function jm(t){if(Nt===!1)return 0;if(Ne("color=16m")||Ne("color=full")||Ne("color=truecolor"))return 3;if(Ne("color=256"))return 2;if(t&&!t.isTTY&&Nt!==!0)return 0;let e=Nt?1:0;if(process.platform==="win32"){let r=Mm.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 he)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in he)||he.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in he)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(he.TEAMCITY_VERSION)?1:0;if(he.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in he){let r=parseInt((he.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(he.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(he.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(he.TERM)||"COLORTERM"in he?1:(he.TERM==="dumb",e)}function qi(t){let e=jm(t);return qm(e)}Su.exports={supportsColor:qi,stdout:qi(process.stdout),stderr:qi(process.stderr)}});var Ou=y((O2,Du)=>{"use strict";var Nm=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Eu=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Lm=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,$m=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,Bm=new Map([["n",`
|
|
10
|
-
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Pu(t){return t[0]==="u"&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):Bm.get(t)||t}function Um(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(Lm))r.push(i[2].replace($m,(o,a,c)=>a?Pu(a):c));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${t}')`);return r}function Xm(t){Eu.lastIndex=0;let e=[],r;for(;(r=Eu.exec(t))!==null;){let n=r[1];if(r[2]){let i=Um(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function Cu(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}Du.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(Nm,(s,o,a,c,d,u)=>{if(o)i.push(Pu(o));else if(c){let p=i.join("");i=[],n.push(r.length===0?p:Cu(t,r)(p)),r.push({inverse:a,styles:Xm(c)})}else if(d){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(Cu(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 dn=y((I2,yr)=>{"use strict";var Ni=au(),K=bu(),ji=xu().stdout,Gm=Ou(),Fu=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),Au=["ansi","ansi","ansi256","ansi16m"],Ru=new Set(["gray"]),Lt=Object.create(null);function Iu(t,e){e=e||{};let r=ji?ji.level:0;t.level=e.level===void 0?r:e.level,t.enabled="enabled"in e?e.enabled:t.level>0}function gr(t){if(!this||!(this instanceof gr)||this.template){let e={};return Iu(e,t),e.template=function(){let r=[].slice.call(arguments);return Wm.apply(null,[e.template].concat(r))},Object.setPrototypeOf(e,gr.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=gr,e.template}Iu(this,t)}Fu&&(K.blue.open="\x1B[94m");for(let t of Object.keys(K))K[t].closeRe=new RegExp(Ni(K[t].close),"g"),Lt[t]={get(){let e=K[t];return fn.call(this,this._styles?this._styles.concat(e):[e],this._empty,t)}};Lt.visible={get(){return fn.call(this,this._styles||[],!0,"visible")}};K.color.closeRe=new RegExp(Ni(K.color.close),"g");for(let t of Object.keys(K.color.ansi))Ru.has(t)||(Lt[t]={get(){let e=this.level;return function(){let n={open:K.color[Au[e]][t].apply(null,arguments),close:K.color.close,closeRe:K.color.closeRe};return fn.call(this,this._styles?this._styles.concat(n):[n],this._empty,t)}}});K.bgColor.closeRe=new RegExp(Ni(K.bgColor.close),"g");for(let t of Object.keys(K.bgColor.ansi)){if(Ru.has(t))continue;let e="bg"+t[0].toUpperCase()+t.slice(1);Lt[e]={get(){let r=this.level;return function(){let i={open:K.bgColor[Au[r]][t].apply(null,arguments),close:K.bgColor.close,closeRe:K.bgColor.closeRe};return fn.call(this,this._styles?this._styles.concat(i):[i],this._empty,t)}}}}var Hm=Object.defineProperties(()=>{},Lt);function fn(t,e,r){let n=function(){return zm.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__=Hm,n}function zm(){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;Fu&&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 Wm(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 Gm(t,n.join(""))}Object.defineProperties(gr.prototype,Lt);yr.exports=gr();yr.exports.supportsColor=ji;yr.exports.default=yr.exports});var ku=y((F2,Tu)=>{"use strict";Tu.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Li=y((A2,qu)=>{var vr=ku(),Mu={};for(let t of Object.keys(vr))Mu[vr[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"]}};qu.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 Jm(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=Mu[t];if(e)return e;let r=1/0,n;for(let i of Object.keys(vr)){let s=vr[i],o=Jm(t,s);o<r&&(r=o,n=i)}return n};C.keyword.rgb=function(t){return vr[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 Nu=y((R2,ju)=>{var hn=Li();function Vm(){let t={},e=Object.keys(hn);for(let r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function Ym(t){let e=Vm(),r=[t];for(e[t].distance=0;r.length;){let n=r.pop(),i=Object.keys(hn[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 Km(t,e){return function(r){return e(t(r))}}function Qm(t,e){let r=[e[t].parent,t],n=hn[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=Km(hn[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}ju.exports=function(t){let e=Ym(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]=Qm(o,e))}return r}});var $u=y((T2,Lu)=>{var $i=Li(),Zm=Nu(),$t={},eg=Object.keys($i);function tg(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 rg(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}eg.forEach(t=>{$t[t]={},Object.defineProperty($t[t],"channels",{value:$i[t].channels}),Object.defineProperty($t[t],"labels",{value:$i[t].labels});let e=Zm(t);Object.keys(e).forEach(n=>{let i=e[n];$t[t][n]=rg(i),$t[t][n].raw=tg(i)})});Lu.exports=$t});var zu=y((k2,Hu)=>{"use strict";var Bu=(t,e)=>(...r)=>`\x1B[${t(...r)+e}m`,Uu=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};5;${n}m`},Xu=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};2;${n[0]};${n[1]};${n[2]}m`},pn=t=>t,Gu=(t,e,r)=>[t,e,r],Bt=(t,e,r)=>{Object.defineProperty(t,e,{get:()=>{let n=r();return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})},Bi,Ut=(t,e,r,n)=>{Bi===void 0&&(Bi=$u());let i=n?10:0,s={};for(let[o,a]of Object.entries(Bi)){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 ng(){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",Bt(e.color,"ansi",()=>Ut(Bu,"ansi16",pn,!1)),Bt(e.color,"ansi256",()=>Ut(Uu,"ansi256",pn,!1)),Bt(e.color,"ansi16m",()=>Ut(Xu,"rgb",Gu,!1)),Bt(e.bgColor,"ansi",()=>Ut(Bu,"ansi16",pn,!0)),Bt(e.bgColor,"ansi256",()=>Ut(Uu,"ansi256",pn,!0)),Bt(e.bgColor,"ansi16m",()=>Ut(Xu,"rgb",Gu,!0)),e}Object.defineProperty(Hu,"exports",{enumerable:!0,get:ng})});var Ju=y((M2,Wu)=>{"use strict";Wu.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 Gi=y((q2,Yu)=>{"use strict";var ig=require("os"),Vu=require("tty"),ke=Ju(),{env:ee}=process,ut;ke("no-color")||ke("no-colors")||ke("color=false")||ke("color=never")?ut=0:(ke("color")||ke("colors")||ke("color=true")||ke("color=always"))&&(ut=1);"FORCE_COLOR"in ee&&(ee.FORCE_COLOR==="true"?ut=1:ee.FORCE_COLOR==="false"?ut=0:ut=ee.FORCE_COLOR.length===0?1:Math.min(parseInt(ee.FORCE_COLOR,10),3));function Ui(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Xi(t,e){if(ut===0)return 0;if(ke("color=16m")||ke("color=full")||ke("color=truecolor"))return 3;if(ke("color=256"))return 2;if(t&&!e&&ut===void 0)return 0;let r=ut||0;if(ee.TERM==="dumb")return r;if(process.platform==="win32"){let n=ig.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 sg(t){let e=Xi(t,t&&t.isTTY);return Ui(e)}Yu.exports={supportsColor:sg,stdout:Ui(Xi(!0,Vu.isatty(1))),stderr:Ui(Xi(!0,Vu.isatty(2)))}});var Qu=y((j2,Ku)=>{"use strict";var og=(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},ag=(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
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
`);return s!==-1&&(e=mg(e,i,n,s)),n+e+i},Hi,cl=(t,...e)=>{let[r]=e;if(!mn(r)||!mn(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 Hi===void 0&&(Hi=nl()),Hi(t,i.join(""))};Object.defineProperties(gn.prototype,Xt);var vn=gn();vn.supportsColor=zi;vn.stderr=gn({level:Wi?Wi.level:0});vn.stderr.supportsColor=Wi;ul.exports=vn});var fl=y((Yi,Ki)=>{(function(t,e){typeof Yi=="object"&&typeof Ki<"u"?Ki.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.tinycolor=e())})(Yi,function(){"use strict";function t(l){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},t(l)}var e=/^\s+/,r=/\s+$/;function n(l,h){if(l=l||"",h=h||{},l instanceof n)return l;if(!(this instanceof n))return new n(l,h);var f=i(l);this._originalInput=l,this._r=f.r,this._g=f.g,this._b=f.b,this._a=f.a,this._roundA=Math.round(100*this._a)/100,this._format=h.format||f.format,this._gradientType=h.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=f.ok}n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var h=this.toRgb();return(h.r*299+h.g*587+h.b*114)/1e3},getLuminance:function(){var h=this.toRgb(),f,v,S,_,N,X;return f=h.r/255,v=h.g/255,S=h.b/255,f<=.03928?_=f/12.92:_=Math.pow((f+.055)/1.055,2.4),v<=.03928?N=v/12.92:N=Math.pow((v+.055)/1.055,2.4),S<=.03928?X=S/12.92:X=Math.pow((S+.055)/1.055,2.4),.2126*_+.7152*N+.0722*X},setAlpha:function(h){return this._a=z(h),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var h=c(this._r,this._g,this._b);return{h:h.h*360,s:h.s,v:h.v,a:this._a}},toHsvString:function(){var h=c(this._r,this._g,this._b),f=Math.round(h.h*360),v=Math.round(h.s*100),S=Math.round(h.v*100);return this._a==1?"hsv("+f+", "+v+"%, "+S+"%)":"hsva("+f+", "+v+"%, "+S+"%, "+this._roundA+")"},toHsl:function(){var h=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),S=Math.round(h.l*100);return this._a==1?"hsl("+f+", "+v+"%, "+S+"%)":"hsla("+f+", "+v+"%, "+S+"%, "+this._roundA+")"},toHex:function(h){return u(this._r,this._g,this._b,h)},toHexString:function(h){return"#"+this.toHex(h)},toHex8:function(h){return p(this._r,this._g,this._b,this._a,h)},toHex8String:function(h){return"#"+this.toHex8(h)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(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,S=this._gradientType?"GradientType = 1, ":"";if(h){var _=n(h);v="#"+g(_._r,_._g,_._b,_._a)}return"progid:DXImageTransform.Microsoft.gradient("+S+"startColorstr="+f+",endColorstr="+v+")"},toString:function(h){var f=!!h;h=h||this._format;var v=!1,S=this._a<1&&this._a>=0,_=!f&&S&&(h==="hex"||h==="hex6"||h==="hex3"||h==="hex4"||h==="hex8"||h==="name");return _?h==="name"&&this._a===0?this.toName():this.toRgbString():(h==="rgb"&&(v=this.toRgbString()),h==="prgb"&&(v=this.toPercentageRgbString()),(h==="hex"||h==="hex6")&&(v=this.toHexString()),h==="hex3"&&(v=this.toHexString(!0)),h==="hex4"&&(v=this.toHex8String(!0)),h==="hex8"&&(v=this.toHex8String()),h==="name"&&(v=this.toName()),h==="hsl"&&(v=this.toHslString()),h==="hsv"&&(v=this.toHsvString()),v||this.toHexString())},clone:function(){return n(this.toString())},_applyModification:function(h,f){var v=h.apply(null,[this].concat([].slice.call(f)));return this._r=v._r,this._g=v._g,this._b=v._b,this.setAlpha(v._a),this},lighten:function(){return this._applyModification(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(w,arguments)},spin:function(){return this._applyModification(B,arguments)},_applyCombination:function(h,f){return h.apply(null,[this].concat([].slice.call(f)))},analogous:function(){return this._applyCombination(Te,arguments)},complement:function(){return this._applyCombination(L,arguments)},monochromatic:function(){return this._applyCombination(Z,arguments)},splitcomplement:function(){return this._applyCombination(ce,arguments)},triad:function(){return this._applyCombination(V,[3])},tetrad:function(){return this._applyCombination(V,[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,S=null,_=null,N=!1,X=!1;return typeof l=="string"&&(l=pt(l)),t(l)=="object"&&(ge(l.r)&&ge(l.g)&&ge(l.b)?(h=s(l.r,l.g,l.b),N=!0,X=String(l.r).substr(-1)==="%"?"prgb":"rgb"):ge(l.h)&&ge(l.s)&&ge(l.v)?(v=R(l.s),S=R(l.v),h=d(l.h,v,S),N=!0,X="hsv"):ge(l.h)&&ge(l.s)&&ge(l.l)&&(v=R(l.s),_=R(l.l),h=a(l.h,v,_),N=!0,X="hsl"),l.hasOwnProperty("a")&&(f=l.a)),f=z(f),{ok:N,format:l.format||X,r:Math.min(255,Math.max(h.r,0)),g:Math.min(255,Math.max(h.g,0)),b:Math.min(255,Math.max(h.b,0)),a: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),S=Math.min(l,h,f),_,N,X=(v+S)/2;if(v==S)_=N=0;else{var W=v-S;switch(N=X>.5?W/(2-v-S):W/(v+S),v){case l:_=(h-f)/W+(h<f?6:0);break;case h:_=(f-l)/W+2;break;case f:_=(l-h)/W+4;break}_/=6}return{h:_,s:N,l:X}}function a(l,h,f){var v,S,_;l=I(l,360),h=I(h,100),f=I(f,100);function N(xe,le,qe){return qe<0&&(qe+=1),qe>1&&(qe-=1),qe<1/6?xe+(le-xe)*6*qe:qe<1/2?le:qe<2/3?xe+(le-xe)*(2/3-qe)*6:xe}if(h===0)v=S=_=f;else{var X=f<.5?f*(1+h):f+h-f*h,W=2*f-X;v=N(W,X,l+1/3),S=N(W,X,l),_=N(W,X,l-1/3)}return{r:v*255,g:S*255,b:_*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),S=Math.min(l,h,f),_,N,X=v,W=v-S;if(N=v===0?0:W/v,v==S)_=0;else{switch(v){case l:_=(h-f)/W+(h<f?6:0);break;case h:_=(f-l)/W+2;break;case f:_=(l-h)/W+4;break}_/=6}return{h:_,s:N,v:X}}function d(l,h,f){l=I(l,360)*6,h=I(h,100),f=I(f,100);var v=Math.floor(l),S=l-v,_=f*(1-h),N=f*(1-S*h),X=f*(1-(1-S)*h),W=v%6,xe=[f,N,_,_,X,f][W],le=[X,f,f,N,_,_][W],qe=[_,_,X,f,f,N][W];return{r:xe*255,g:le*255,b:qe*255}}function u(l,h,f,v){var S=[P(Math.round(l).toString(16)),P(Math.round(h).toString(16)),P(Math.round(f).toString(16))];return v&&S[0].charAt(0)==S[0].charAt(1)&&S[1].charAt(0)==S[1].charAt(1)&&S[2].charAt(0)==S[2].charAt(1)?S[0].charAt(0)+S[1].charAt(0)+S[2].charAt(0):S.join("")}function p(l,h,f,v,S){var _=[P(Math.round(l).toString(16)),P(Math.round(h).toString(16)),P(Math.round(f).toString(16)),P(He(v))];return S&&_[0].charAt(0)==_[0].charAt(1)&&_[1].charAt(0)==_[1].charAt(1)&&_[2].charAt(0)==_[2].charAt(1)&&_[3].charAt(0)==_[3].charAt(1)?_[0].charAt(0)+_[1].charAt(0)+_[2].charAt(0)+_[3].charAt(0):_.join("")}function g(l,h,f,v){var S=[P(He(v)),P(Math.round(l).toString(16)),P(Math.round(h).toString(16)),P(Math.round(f).toString(16))];return S.join("")}n.equals=function(l,h){return!l||!h?!1:n(l).toRgbString()==n(h).toRgbString()},n.random=function(){return n.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function m(l,h){h=h===0?0:h||10;var f=n(l).toHsl();return f.s-=h/100,f.s=G(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=G(f.s),n(f)}function w(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=G(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=G(f.l),n(f)}function B(l,h){var f=n(l).toHsl(),v=(f.h+h)%360;return f.h=v<0?360+v:v,n(f)}function L(l){var h=n(l).toHsl();return h.h=(h.h+180)%360,n(h)}function V(l,h){if(isNaN(h)||h<=0)throw new Error("Argument to polyad must be a positive number");for(var f=n(l).toHsl(),v=[n(l)],S=360/h,_=1;_<h;_++)v.push(n({h:(f.h+_*S)%360,s:f.s,l:f.l}));return v}function ce(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 Te(l,h,f){h=h||6,f=f||30;var v=n(l).toHsl(),S=360/f,_=[n(l)];for(v.h=(v.h-(S*h>>1)+720)%360;--h;)v.h=(v.h+S)%360,_.push(n(v));return _}function Z(l,h){h=h||6;for(var f=n(l).toHsv(),v=f.h,S=f.s,_=f.v,N=[],X=1/h;h--;)N.push(n({h:v,s:S,v:_})),_=(_+X)%1;return N}n.mix=function(l,h,f){f=f===0?0:f||50;var v=n(l).toRgb(),S=n(h).toRgb(),_=f/100,N={r:(S.r-v.r)*_+v.r,g:(S.g-v.g)*_+v.g,b:(S.b-v.b)*_+v.b,a:(S.a-v.a)*_+v.a};return n(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),S,_;switch(_=!1,S=Se(f),S.level+S.size){case"AAsmall":case"AAAlarge":_=v>=4.5;break;case"AAlarge":_=v>=3;break;case"AAAsmall":_=v>=7;break}return _},n.mostReadable=function(l,h,f){var v=null,S=0,_,N,X,W;f=f||{},N=f.includeFallbackColors,X=f.level,W=f.size;for(var xe=0;xe<h.length;xe++)_=n.readability(l,h[xe]),_>S&&(S=_,v=n(h[xe]));return n.isReadable(l,v,{level:X,size:W})||!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=k(D);function k(l){var h={};for(var f in l)l.hasOwnProperty(f)&&(h[l[f]]=f);return h}function z(l){return l=parseFloat(l),(isNaN(l)||l<0||l>1)&&(l=1),l}function I(l,h){U(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 G(l){return Math.min(1,Math.max(0,l))}function O(l){return parseInt(l,16)}function U(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 He(l){return Math.round(parseFloat(l)*255).toString(16)}function Ke(l){return O(l)/255}var ue=function(){var l="[-\\+]?\\d+%?",h="[-\\+]?\\d*\\.\\d+%?",f="(?:"+h+")|(?:"+l+")",v="[\\s|\\(]+("+f+")[,|\\s]+("+f+")[,|\\s]+("+f+")\\s*\\)?",S="[\\s|\\(]+("+f+")[,|\\s]+("+f+")[,|\\s]+("+f+")[,|\\s]+("+f+")\\s*\\)?";return{CSS_UNIT:new RegExp(f),rgb:new RegExp("rgb"+v),rgba:new RegExp("rgba"+S),hsl:new RegExp("hsl"+v),hsla:new RegExp("hsla"+S),hsv:new RegExp("hsv"+v),hsva:new RegExp("hsva"+S),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function ge(l){return!!ue.CSS_UNIT.exec(l)}function pt(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=ue.rgb.exec(l))?{r:f[1],g:f[2],b:f[3]}:(f=ue.rgba.exec(l))?{r:f[1],g:f[2],b:f[3],a:f[4]}:(f=ue.hsl.exec(l))?{h:f[1],s:f[2],l:f[3]}:(f=ue.hsla.exec(l))?{h:f[1],s:f[2],l:f[3],a:f[4]}:(f=ue.hsv.exec(l))?{h:f[1],s:f[2],v:f[3]}:(f=ue.hsva.exec(l))?{h:f[1],s:f[2],v:f[3],a:f[4]}:(f=ue.hex8.exec(l))?{r:O(f[1]),g:O(f[2]),b:O(f[3]),a:Ke(f[4]),format:h?"name":"hex8"}:(f=ue.hex6.exec(l))?{r:O(f[1]),g:O(f[2]),b:O(f[3]),format:h?"name":"hex"}:(f=ue.hex4.exec(l))?{r:O(f[1]+""+f[1]),g:O(f[2]+""+f[2]),b:O(f[3]+""+f[3]),a:Ke(f[4]+""+f[4]),format:h?"name":"hex8"}:(f=ue.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 Se(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 vl=y(($2,yl)=>{var _r=fl(),ml={r:256,g:256,b:256,a:1},gl={h:360,s:1,v:1,a:1};function Zi(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 es(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 Qi(t,e,r){let n=t.color.toRgb(),i=e.color.toRgb(),s=Zi(n,i,r),o=[t.color];for(let a=1;a<r;a++){let c=es(s,n,a,ml);o.push(_r(c))}return o}function dl(t,e,r,n){let i=t.color.toHsv(),s=e.color.toHsv();if(i.s===0||s.s===0)return Qi(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=Zi(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=es(a,i,u,gl);c.push(_r(p))}return c}function hl(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 pl(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=Zi(i.color[r](),s.color[r](),(s.pos-i.pos)*100),a=es(o,i.color[r](),(e-i.pos)*100,n);return _r(a)}var Gt=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?_r(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:_r(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 Gt(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 Gt(e.concat(r.reverse()))}rgb(e){let r=hl(this.stops,e),n=[];this.stops.forEach((i,s)=>{i.colorLess&&(i.color=Qi(this.stops[s-1],this.stops[s+1],2)[1])});for(let i=0,s=this.stops.length;i<s-1;i++){let o=Qi(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=hl(this.stops,e),i=[];this.stops.forEach((s,o)=>{s.colorLess&&(s.color=dl(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=dl(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 pl(this.stops,e,"toRgb",ml)}hsvAt(e){return pl(this.stops,e,"toHsv",gl)}};yl.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 Gt(t)}});var xl=y((B2,bn)=>{"use strict";var _l=ll(),vg=vl(),bl=/\s/g;function ts(...t){let e=vg.apply(this,t),r=(n,i)=>bg(n?n.toString():"",e,i);return r.multiline=(n,i)=>_g(n?n.toString():"",e,i),r}var wl=(t,e,r)=>e.interpolation.toLowerCase()==="hsv"?t.hsv(r,e.hsvSpin.toLowerCase()):t.rgb(r);function bg(t,e,r){let n=Sl(r),i=Math.max(t.replace(bl,"").length,e.stops.length),s=wl(e,n,i),o="";for(let a of t)o+=a.match(bl)?a:_l.hex(s.shift().toHex())(a);return o}function _g(t,e,r){let n=Sl(r),i=t.split(`
|
|
16
|
-
|
|
17
|
-
`)}function Sl(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 wr={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"}}};bn.exports=ts;for(let t in wr)bn.exports[t]=e=>new ts(wr[t].colors)(e,wr[t].options),bn.exports[t].multiline=e=>new ts(wr[t].colors).multiline(e,wr[t].options)});var Cl=y((U2,El)=>{var rs=class{constructor(e){this.value=e,this.next=void 0}},ns=class{constructor(){this.clear()}enqueue(e){let r=new rs(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}};El.exports=ns});var is=y((X2,Pl)=>{"use strict";var wg=Cl(),Sg=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 wg,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};Pl.exports=Sg});var Il=y((G2,Ol)=>{"use strict";var Dl=is(),_n=class extends Error{constructor(e){super(),this.value=e}},xg=async(t,e)=>e(await t),Eg=async t=>{let e=await Promise.all(t);if(e[1]===!0)throw new _n(e[0]);return!1},Cg=async(t,e,r)=>{r={concurrency:1/0,preserveOrder:!0,...r};let n=Dl(r.concurrency),i=[...t].map(o=>[o,n(xg,o,e)]),s=Dl(r.preserveOrder?1:1/0);try{await Promise.all(i.map(o=>s(Eg,o)))}catch(o){if(o instanceof _n)return o.value;throw o}};Ol.exports=Cg});var Ml=y((H2,ss)=>{"use strict";var Fl=require("path"),wn=require("fs"),{promisify:Al}=require("util"),Pg=Il(),Dg=Al(wn.stat),Og=Al(wn.lstat),Rl={directory:"isDirectory",file:"isFile"};function Tl({type:t}){if(!(t in Rl))throw new Error(`Invalid type specified: ${t}`)}var kl=(t,e)=>t===void 0||e[Rl[t]]();ss.exports=async(t,e)=>{e={cwd:process.cwd(),type:"file",allowSymlinks:!0,...e},Tl(e);let r=e.allowSymlinks?Dg:Og;return Pg(t,async n=>{try{let i=await r(Fl.resolve(e.cwd,n));return kl(e.type,i)}catch{return!1}},e)};ss.exports.sync=(t,e)=>{e={cwd:process.cwd(),allowSymlinks:!0,type:"file",...e},Tl(e);let r=e.allowSymlinks?wn.statSync:wn.lstatSync;for(let n of t)try{let i=r(Fl.resolve(e.cwd,n));if(kl(e.type,i))return n}catch{}}});var jl=y((z2,os)=>{"use strict";var ql=require("fs"),{promisify:Ig}=require("util"),Fg=Ig(ql.access);os.exports=async t=>{try{return await Fg(t),!0}catch{return!1}};os.exports.sync=t=>{try{return ql.accessSync(t),!0}catch{return!1}}});var cs=y((W2,Ht)=>{"use strict";var lt=require("path"),Sn=Ml(),Nl=jl(),as=Symbol("findUp.stop");Ht.exports=async(t,e={})=>{let r=lt.resolve(e.cwd||""),{root:n}=lt.parse(r),i=[].concat(t),s=async o=>{if(typeof t!="function")return Sn(i,o);let a=await t(o.cwd);return typeof a=="string"?Sn([a],o):a};for(;;){let o=await s({...e,cwd:r});if(o===as)return;if(o)return lt.resolve(r,o);if(r===n)return;r=lt.dirname(r)}};Ht.exports.sync=(t,e={})=>{let r=lt.resolve(e.cwd||""),{root:n}=lt.parse(r),i=[].concat(t),s=o=>{if(typeof t!="function")return Sn.sync(i,o);let a=t(o.cwd);return typeof a=="string"?Sn.sync([a],o):a};for(;;){let o=s({...e,cwd:r});if(o===as)return;if(o)return lt.resolve(r,o);if(r===n)return;r=lt.dirname(r)}};Ht.exports.exists=Nl;Ht.exports.sync.exists=Nl.sync;Ht.exports.stop=as});var xn=y((J2,us)=>{"use strict";var Ll=require("path"),$l=cs(),Ag=async t=>{let e=await $l("package.json",{cwd:t});return e&&Ll.dirname(e)};us.exports=Ag;us.exports.sync=t=>{let e=$l.sync("package.json",{cwd:t});return e&&Ll.dirname(e)}});function Jt(t=""){return qg?ps.default.resolve(gs.default.sync(__dirname),"../../../",t):ps.default.resolve(gs.default.sync(__dirname),"../griddo-components",t)}function jg(){let t=ms.default.sync("jsconfig.json",{cwd:Jt()});return ms.default.sync("tsconfig.json",{cwd:Jt()})||t}function Ng(){let t=require(jg());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=Jt(s);return{...e,[n]:o}},{"@griddo-instance":`${Jt()}/src/index.js`})}var ps,ms,gs,qg,t_,Yl=Wo(()=>{"use strict";ps=A(require("node:path")),ms=A(cs()),gs=A(xn()),qg=__dirname.includes("node_modules"),t_=Ng()});var ef={};Jo(ef,{CXDir:()=>Gg,default:()=>Xg});var We,In,Ql,On,Lg,$g,Bg,Kl,Ug,Zl,Xg,Gg,tf=Wo(()=>{"use strict";We=A(require("node:path")),In=A(xn());Yl();Ql=In.default.sync(We.default.resolve(__dirname,"../..")),On=In.default.sync(__dirname),Lg=We.default.resolve(In.default.sync(__dirname)),$g=We.default.resolve(On,"caches"),Bg=Jt(),Kl=We.default.join(Ql,"exports/sites"),{version:Ug}=require(We.default.join(On,"package.json")),Zl={proDomain:"pro-",griddoVersion:Ug,CXDir:{EXPORTS:"__exports",CACHE:"__caches",CX:"__cx",SSG:"__ssg",COMPONENTS:"__components",ROOT:"__root",EXPORTS_DIST:"__exports_dist",CX_DIST:"__cx_dist"},paths:t=>({__caches:We.default.join($g,t||""),__components:Bg,__cx:On,__exports:We.default.join(Kl,t||""),__root:Ql,__ssg:Lg,__exports_dist:t?We.default.join(Kl,t,"dist"):"",__cx_dist:We.default.join(On,"dist")})},Xg=Zl,Gg=Zl.CXDir});var Es=y((d_,_f)=>{"use strict";_f.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 we=y((h_,xf)=>{"use strict";var Vg=Es(),wt=Object.prototype.toString;function Ds(t){return wt.call(t)==="[object Array]"}function Cs(t){return typeof t>"u"}function Yg(t){return t!==null&&!Cs(t)&&t.constructor!==null&&!Cs(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function Kg(t){return wt.call(t)==="[object ArrayBuffer]"}function Qg(t){return typeof FormData<"u"&&t instanceof FormData}function Zg(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function ey(t){return typeof t=="string"}function ty(t){return typeof t=="number"}function wf(t){return t!==null&&typeof t=="object"}function An(t){if(wt.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function ry(t){return wt.call(t)==="[object Date]"}function ny(t){return wt.call(t)==="[object File]"}function iy(t){return wt.call(t)==="[object Blob]"}function Sf(t){return wt.call(t)==="[object Function]"}function sy(t){return wf(t)&&Sf(t.pipe)}function oy(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}function ay(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function cy(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Os(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),Ds(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 Ps(){var t={};function e(i,s){An(t[s])&&An(i)?t[s]=Ps(t[s],i):An(i)?t[s]=Ps({},i):Ds(i)?t[s]=i.slice():t[s]=i}for(var r=0,n=arguments.length;r<n;r++)Os(arguments[r],e);return t}function uy(t,e,r){return Os(e,function(i,s){r&&typeof i=="function"?t[s]=Vg(i,r):t[s]=i}),t}function ly(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}xf.exports={isArray:Ds,isArrayBuffer:Kg,isBuffer:Yg,isFormData:Qg,isArrayBufferView:Zg,isString:ey,isNumber:ty,isObject:wf,isPlainObject:An,isUndefined:Cs,isDate:ry,isFile:ny,isBlob:iy,isFunction:Sf,isStream:sy,isURLSearchParams:oy,isStandardBrowserEnv:cy,forEach:Os,merge:Ps,extend:uy,trim:ay,stripBOM:ly}});var Rn=y((p_,Cf)=>{"use strict";var Yt=we();function Ef(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}Cf.exports=function(e,r,n){if(!r)return e;var i;if(n)i=n(r);else if(Yt.isURLSearchParams(r))i=r.toString();else{var s=[];Yt.forEach(r,function(c,d){c===null||typeof c>"u"||(Yt.isArray(c)?d=d+"[]":c=[c],Yt.forEach(c,function(p){Yt.isDate(p)?p=p.toISOString():Yt.isObject(p)&&(p=JSON.stringify(p)),s.push(Ef(d)+"="+Ef(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 Df=y((m_,Pf)=>{"use strict";var fy=we();function Tn(){this.handlers=[]}Tn.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};Tn.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};Tn.prototype.forEach=function(e){fy.forEach(this.handlers,function(n){n!==null&&e(n)})};Pf.exports=Tn});var If=y((g_,Of)=>{"use strict";var dy=we();Of.exports=function(e,r){dy.forEach(e,function(i,s){s!==r&&s.toUpperCase()===r.toUpperCase()&&(e[r]=i,delete e[s])})}});var kn=y((y_,Ff)=>{"use strict";Ff.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 Mn=y((v_,Af)=>{"use strict";var hy=kn();Af.exports=function(e,r,n,i,s){var o=new Error(e);return hy(o,r,n,i,s)}});var Is=y((b_,Rf)=>{"use strict";var py=Mn();Rf.exports=function(e,r,n){var i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):r(py("Request failed with status code "+n.status,n.config,null,n.request,n))}});var kf=y((__,Tf)=>{"use strict";var qn=we();Tf.exports=qn.isStandardBrowserEnv()?function(){return{write:function(r,n,i,s,o,a){var c=[];c.push(r+"="+encodeURIComponent(n)),qn.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),qn.isString(s)&&c.push("path="+s),qn.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 qf=y((w_,Mf)=>{"use strict";Mf.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}});var Nf=y((S_,jf)=>{"use strict";jf.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}});var Fs=y((x_,Lf)=>{"use strict";var my=qf(),gy=Nf();Lf.exports=function(e,r){return e&&!my(r)?gy(e,r):r}});var Bf=y((E_,$f)=>{"use strict";var As=we(),yy=["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"];$f.exports=function(e){var r={},n,i,s;return e&&As.forEach(e.split(`
|
|
18
|
-
`),function(a){if(s=a.indexOf(":"),n=As.trim(a.substr(0,s)).toLowerCase(),i=As.trim(a.substr(s+1)),n){if(r[n]&&yy.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 Gf=y((C_,Xf)=>{"use strict";var Uf=we();Xf.exports=Uf.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=Uf.isString(o)?i(o):o;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}()});var zf=y((P_,Hf)=>{"use strict";var jn=we(),vy=Is(),by=kf(),_y=Rn(),wy=Fs(),Sy=Bf(),xy=Gf(),Rs=Mn();Hf.exports=function(e){return new Promise(function(n,i){var s=e.data,o=e.headers,a=e.responseType;jn.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=wy(e.baseURL,e.url);c.open(e.method.toUpperCase(),_y(p,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function g(){if(c){var b="getAllResponseHeaders"in c?Sy(c.getAllResponseHeaders()):null,w=!a||a==="text"||a==="json"?c.responseText:c.response,x={data:w,status:c.status,statusText:c.statusText,headers:b,config:e,request:c};vy(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(Rs("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){i(Rs("Network Error",e,null,c)),c=null},c.ontimeout=function(){var w="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(w=e.timeoutErrorMessage),i(Rs(w,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},jn.isStandardBrowserEnv()){var m=(e.withCredentials||xy(p))&&e.xsrfCookieName?by.read(e.xsrfCookieName):void 0;m&&(o[e.xsrfHeaderName]=m)}"setRequestHeader"in c&&jn.forEach(o,function(w,x){typeof s>"u"&&x.toLowerCase()==="content-type"?delete o[x]:c.setRequestHeader(x,w)}),jn.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(w){c&&(c.abort(),i(w),c=null)}),s||(s=null),c.send(s)})}});var Jf=y((D_,Wf)=>{var Kt=1e3,Qt=Kt*60,Zt=Qt*60,St=Zt*24,Ey=St*7,Cy=St*365.25;Wf.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Py(t);if(r==="number"&&isFinite(t))return e.long?Oy(t):Dy(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Py(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*Cy;case"weeks":case"week":case"w":return r*Ey;case"days":case"day":case"d":return r*St;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Zt;case"minutes":case"minute":case"mins":case"min":case"m":return r*Qt;case"seconds":case"second":case"secs":case"sec":case"s":return r*Kt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Dy(t){var e=Math.abs(t);return e>=St?Math.round(t/St)+"d":e>=Zt?Math.round(t/Zt)+"h":e>=Qt?Math.round(t/Qt)+"m":e>=Kt?Math.round(t/Kt)+"s":t+"ms"}function Oy(t){var e=Math.abs(t);return e>=St?Nn(t,e,St,"day"):e>=Zt?Nn(t,e,Zt,"hour"):e>=Qt?Nn(t,e,Qt,"minute"):e>=Kt?Nn(t,e,Kt,"second"):t+" ms"}function Nn(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var Ts=y((O_,Vf)=>{function Iy(t){r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=i,r.enabled=o,r.humanize=Jf(),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 w(...x){if(!w.enabled)return;let F=w,j=Number(new Date),B=j-(p||j);F.diff=B,F.prev=p,F.curr=j,p=j,x[0]=r.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let L=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(ce,Te)=>{if(ce==="%%")return"%";L++;let Z=r.formatters[Te];if(typeof Z=="function"){let D=x[L];ce=Z.call(F,D),x.splice(L,1),L--}return ce}),r.formatArgs.call(F,x),(F.log||r.log).apply(F,x)}return w.namespace=u,w.useColors=r.useColors(),w.color=r.selectColor(u),w.extend=n,w.destroy=r.destroy,Object.defineProperty(w,"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(w),w}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}Vf.exports=Iy});var Yf=y((Ae,Ln)=>{Ae.formatArgs=Ay;Ae.save=Ry;Ae.load=Ty;Ae.useColors=Fy;Ae.storage=ky();Ae.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`."))}})();Ae.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 Fy(){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 Ay(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Ln.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)}Ae.log=console.debug||console.log||(()=>{});function Ry(t){try{t?Ae.storage.setItem("debug",t):Ae.storage.removeItem("debug")}catch{}}function Ty(){let t;try{t=Ae.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function ky(){try{return localStorage}catch{}}Ln.exports=Ts()(Ae);var{formatters:My}=Ln.exports;My.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Qf=y((se,Bn)=>{var qy=require("tty"),$n=require("util");se.init=Xy;se.log=$y;se.formatArgs=Ny;se.save=By;se.load=Uy;se.useColors=jy;se.destroy=$n.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=Gi();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 jy(){return"colors"in se.inspectOpts?!!se.inspectOpts.colors:qy.isatty(process.stderr.fd)}function Ny(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(`
|
|
8
|
+
see https://github.com/jprichardson/node-fs-extra/issues/269`),Or.checkPaths(e,t,"copy",(i,o)=>{if(i)return n(i);let{srcStat:a,destStat:s}=o;Or.checkParentPaths(e,a,t,"copy",c=>c?n(c):r.filter?Hu(Bu,s,e,t,r,n):Bu(s,e,t,r,n))})}function Bu(e,t,r,n,i){let o=Rr.dirname(r);Bg(o,(a,s)=>{if(a)return i(a);if(s)return ho(e,t,r,n,i);Gg(o,c=>c?i(c):ho(e,t,r,n,i))})}function Hu(e,t,r,n,i,o){Promise.resolve(i.filter(r,n)).then(a=>a?e(t,r,n,i,o):o(),a=>o(a))}function ho(e,t,r,n,i){return n.filter?Hu(Uu,e,t,r,n,i):Uu(e,t,r,n,i)}function Uu(e,t,r,n,i){(n.dereference?Le.stat:Le.lstat)(t,(a,s)=>{if(a)return i(a);if(s.isDirectory())return Kg(s,e,t,r,n,i);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return Hg(s,e,t,r,n,i);if(s.isSymbolicLink())return ev(e,t,r,n,i)})}function Hg(e,t,r,n,i,o){return t?Wg(e,r,n,i,o):Wu(e,r,n,i,o)}function Wg(e,t,r,n,i){if(n.overwrite)Le.unlink(r,o=>o?i(o):Wu(e,t,r,n,i));else return n.errorOnExist?i(new Error(`'${r}' already exists`)):i()}function Wu(e,t,r,n,i){Le.copyFile(t,r,o=>o?i(o):n.preserveTimestamps?Yg(e.mode,t,r,i):bn(r,e.mode,i))}function Yg(e,t,r,n){return Vg(e)?zg(r,e,i=>i?n(i):Xu(e,t,r,n)):Xu(e,t,r,n)}function Vg(e){return(e&128)===0}function zg(e,t,r){return bn(e,t|128,r)}function Xu(e,t,r,n){Jg(t,r,i=>i?n(i):bn(r,e,n))}function bn(e,t,r){return Le.chmod(e,t,r)}function Jg(e,t,r){Le.stat(e,(n,i)=>n?r(n):Ug(t,i.atime,i.mtime,r))}function Kg(e,t,r,n,i,o){return t?t&&!t.isDirectory()?o(new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`)):Yu(r,n,i,o):Qg(e.mode,r,n,i,o)}function Qg(e,t,r,n,i){Le.mkdir(r,o=>{if(o)return i(o);Yu(t,r,n,a=>a?i(a):bn(r,e,i))})}function Yu(e,t,r,n){Le.readdir(e,(i,o)=>i?n(i):Vu(o,e,t,r,n))}function Vu(e,t,r,n,i){let o=e.pop();return o?Zg(e,o,t,r,n,i):i()}function Zg(e,t,r,n,i,o){let a=Rr.join(r,t),s=Rr.join(n,t);Or.checkPaths(a,s,"copy",(c,d)=>{if(c)return o(c);let{destStat:l}=d;ho(l,a,s,i,p=>p?o(p):Vu(e,r,n,i,o))})}function ev(e,t,r,n,i){Le.readlink(t,(o,a)=>{if(o)return i(o);if(n.dereference&&(a=Rr.resolve(process.cwd(),a)),e)Le.readlink(r,(s,c)=>s?s.code==="EINVAL"||s.code==="UNKNOWN"?Le.symlink(a,r,i):i(s):(n.dereference&&(c=Rr.resolve(process.cwd(),c)),Or.isSrcSubdir(a,c)?i(new Error(`Cannot copy '${a}' to a subdirectory of itself, '${c}'.`)):e.isDirectory()&&Or.isSrcSubdir(c,a)?i(new Error(`Cannot overwrite '${c}' with '${a}'.`)):tv(a,r,i)));else return Le.symlink(a,r,i)})}function tv(e,t,r){Le.unlink(t,n=>n?r(n):Le.symlink(e,t,r))}zu.exports=Xg});var mo=v((ww,Ku)=>{"use strict";var rv=Ae().fromCallback;Ku.exports={copy:rv(Ju())}});var ac=v((Dw,oc)=>{"use strict";var Qu=be(),rc=require("path"),z=require("assert"),Ir=process.platform==="win32";function nc(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(r=>{e[r]=e[r]||Qu[r],r=r+"Sync",e[r]=e[r]||Qu[r]}),e.maxBusyTries=e.maxBusyTries||3}function yo(e,t,r){let n=0;typeof t=="function"&&(r=t,t={}),z(e,"rimraf: missing path"),z.strictEqual(typeof e,"string","rimraf: path should be a string"),z.strictEqual(typeof r,"function","rimraf: callback function required"),z(t,"rimraf: invalid options argument provided"),z.strictEqual(typeof t,"object","rimraf: options should be object"),nc(t),Zu(e,t,function i(o){if(o){if((o.code==="EBUSY"||o.code==="ENOTEMPTY"||o.code==="EPERM")&&n<t.maxBusyTries){n++;let a=n*100;return setTimeout(()=>Zu(e,t,i),a)}o.code==="ENOENT"&&(o=null)}r(o)})}function Zu(e,t,r){z(e),z(t),z(typeof r=="function"),t.lstat(e,(n,i)=>{if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&Ir)return ec(e,t,n,r);if(i&&i.isDirectory())return Sn(e,t,n,r);t.unlink(e,o=>{if(o){if(o.code==="ENOENT")return r(null);if(o.code==="EPERM")return Ir?ec(e,t,o,r):Sn(e,t,o,r);if(o.code==="EISDIR")return Sn(e,t,o,r)}return r(o)})})}function ec(e,t,r,n){z(e),z(t),z(typeof n=="function"),t.chmod(e,438,i=>{i?n(i.code==="ENOENT"?null:r):t.stat(e,(o,a)=>{o?n(o.code==="ENOENT"?null:r):a.isDirectory()?Sn(e,t,r,n):t.unlink(e,n)})})}function tc(e,t,r){let n;z(e),z(t);try{t.chmodSync(e,438)}catch(i){if(i.code==="ENOENT")return;throw r}try{n=t.statSync(e)}catch(i){if(i.code==="ENOENT")return;throw r}n.isDirectory()?wn(e,t,r):t.unlinkSync(e)}function Sn(e,t,r,n){z(e),z(t),z(typeof n=="function"),t.rmdir(e,i=>{i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")?nv(e,t,n):i&&i.code==="ENOTDIR"?n(r):n(i)})}function nv(e,t,r){z(e),z(t),z(typeof r=="function"),t.readdir(e,(n,i)=>{if(n)return r(n);let o=i.length,a;if(o===0)return t.rmdir(e,r);i.forEach(s=>{yo(rc.join(e,s),t,c=>{if(!a){if(c)return r(a=c);--o===0&&t.rmdir(e,r)}})})})}function ic(e,t){let r;t=t||{},nc(t),z(e,"rimraf: missing path"),z.strictEqual(typeof e,"string","rimraf: path should be a string"),z(t,"rimraf: missing options"),z.strictEqual(typeof t,"object","rimraf: options should be object");try{r=t.lstatSync(e)}catch(n){if(n.code==="ENOENT")return;n.code==="EPERM"&&Ir&&tc(e,t,n)}try{r&&r.isDirectory()?wn(e,t,null):t.unlinkSync(e)}catch(n){if(n.code==="ENOENT")return;if(n.code==="EPERM")return Ir?tc(e,t,n):wn(e,t,n);if(n.code!=="EISDIR")throw n;wn(e,t,n)}}function wn(e,t,r){z(e),z(t);try{t.rmdirSync(e)}catch(n){if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")iv(e,t);else if(n.code!=="ENOENT")throw n}}function iv(e,t){if(z(e),z(t),t.readdirSync(e).forEach(r=>ic(rc.join(e,r),t)),Ir){let r=Date.now();do try{return t.rmdirSync(e,t)}catch{}while(Date.now()-r<500)}else return t.rmdirSync(e,t)}oc.exports=yo;yo.sync=ic});var Pr=v((Cw,uc)=>{"use strict";var ov=Ae().fromCallback,sc=ac();uc.exports={remove:ov(sc),removeSync:sc.sync}});var yc=v((xw,mc)=>{"use strict";var av=Ae().fromCallback,fc=be(),dc=require("path"),pc=Ke(),hc=Pr(),cc=av(function(t,r){r=r||function(){},fc.readdir(t,(n,i)=>{if(n)return pc.mkdirs(t,r);i=i.map(a=>dc.join(t,a)),o();function o(){let a=i.pop();if(!a)return r();hc.remove(a,s=>{if(s)return r(s);o()})}})});function lc(e){let t;try{t=fc.readdirSync(e)}catch{return pc.mkdirsSync(e)}t.forEach(r=>{r=dc.join(e,r),hc.removeSync(r)})}mc.exports={emptyDirSync:lc,emptydirSync:lc,emptyDir:cc,emptydir:cc}});var Ec=v((Rw,_c)=>{"use strict";var sv=Ae().fromCallback,gc=require("path"),Et=be(),vc=Ke();function uv(e,t){function r(){Et.writeFile(e,"",n=>{if(n)return t(n);t()})}Et.stat(e,(n,i)=>{if(!n&&i.isFile())return t();let o=gc.dirname(e);Et.stat(o,(a,s)=>{if(a)return a.code==="ENOENT"?vc.mkdirs(o,c=>{if(c)return t(c);r()}):t(a);s.isDirectory()?r():Et.readdir(o,c=>{if(c)return t(c)})})})}function cv(e){let t;try{t=Et.statSync(e)}catch{}if(t&&t.isFile())return;let r=gc.dirname(e);try{Et.statSync(r).isDirectory()||Et.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")vc.mkdirsSync(r);else throw n}Et.writeFileSync(e,"")}_c.exports={createFile:sv(uv),createFileSync:cv}});var Cc=v((Ow,Dc)=>{"use strict";var lv=Ae().fromCallback,Sc=require("path"),Pt=be(),wc=Ke(),bc=_t().pathExists;function fv(e,t,r){function n(i,o){Pt.link(i,o,a=>{if(a)return r(a);r(null)})}bc(t,(i,o)=>{if(i)return r(i);if(o)return r(null);Pt.lstat(e,a=>{if(a)return a.message=a.message.replace("lstat","ensureLink"),r(a);let s=Sc.dirname(t);bc(s,(c,d)=>{if(c)return r(c);if(d)return n(e,t);wc.mkdirs(s,l=>{if(l)return r(l);n(e,t)})})})})}function dv(e,t){if(Pt.existsSync(t))return;try{Pt.lstatSync(e)}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let n=Sc.dirname(t);return Pt.existsSync(n)||wc.mkdirsSync(n),Pt.linkSync(e,t)}Dc.exports={createLink:lv(fv),createLinkSync:dv}});var Rc=v((Iw,xc)=>{"use strict";var bt=require("path"),Tr=be(),pv=_t().pathExists;function hv(e,t,r){if(bt.isAbsolute(e))return Tr.lstat(e,n=>n?(n.message=n.message.replace("lstat","ensureSymlink"),r(n)):r(null,{toCwd:e,toDst:e}));{let n=bt.dirname(t),i=bt.join(n,e);return pv(i,(o,a)=>o?r(o):a?r(null,{toCwd:i,toDst:e}):Tr.lstat(e,s=>s?(s.message=s.message.replace("lstat","ensureSymlink"),r(s)):r(null,{toCwd:e,toDst:bt.relative(n,e)})))}}function mv(e,t){let r;if(bt.isAbsolute(e)){if(r=Tr.existsSync(e),!r)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}else{let n=bt.dirname(t),i=bt.join(n,e);if(r=Tr.existsSync(i),r)return{toCwd:i,toDst:e};if(r=Tr.existsSync(e),!r)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:bt.relative(n,e)}}}xc.exports={symlinkPaths:hv,symlinkPathsSync:mv}});var Pc=v((Pw,Ic)=>{"use strict";var Oc=be();function yv(e,t,r){if(r=typeof t=="function"?t:r,t=typeof t=="function"?!1:t,t)return r(null,t);Oc.lstat(e,(n,i)=>{if(n)return r(null,"file");t=i&&i.isDirectory()?"dir":"file",r(null,t)})}function gv(e,t){let r;if(t)return t;try{r=Oc.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}Ic.exports={symlinkType:yv,symlinkTypeSync:gv}});var Mc=v((Tw,Nc)=>{"use strict";var vv=Ae().fromCallback,Ac=require("path"),Qt=be(),Fc=Ke(),_v=Fc.mkdirs,Ev=Fc.mkdirsSync,Lc=Rc(),bv=Lc.symlinkPaths,Sv=Lc.symlinkPathsSync,kc=Pc(),wv=kc.symlinkType,Dv=kc.symlinkTypeSync,Tc=_t().pathExists;function Cv(e,t,r,n){n=typeof r=="function"?r:n,r=typeof r=="function"?!1:r,Tc(t,(i,o)=>{if(i)return n(i);if(o)return n(null);bv(e,t,(a,s)=>{if(a)return n(a);e=s.toDst,wv(s.toCwd,r,(c,d)=>{if(c)return n(c);let l=Ac.dirname(t);Tc(l,(p,m)=>{if(p)return n(p);if(m)return Qt.symlink(e,t,d,n);_v(l,h=>{if(h)return n(h);Qt.symlink(e,t,d,n)})})})})})}function xv(e,t,r){if(Qt.existsSync(t))return;let i=Sv(e,t);e=i.toDst,r=Dv(i.toCwd,r);let o=Ac.dirname(t);return Qt.existsSync(o)||Ev(o),Qt.symlinkSync(e,t,r)}Nc.exports={createSymlink:vv(Cv),createSymlinkSync:xv}});var jc=v((Aw,qc)=>{"use strict";var Dn=Ec(),Cn=Cc(),xn=Mc();qc.exports={createFile:Dn.createFile,createFileSync:Dn.createFileSync,ensureFile:Dn.createFile,ensureFileSync:Dn.createFileSync,createLink:Cn.createLink,createLinkSync:Cn.createLinkSync,ensureLink:Cn.createLink,ensureLinkSync:Cn.createLinkSync,createSymlink:xn.createSymlink,createSymlinkSync:xn.createSymlinkSync,ensureSymlink:xn.createSymlink,ensureSymlinkSync:xn.createSymlinkSync}});var Rn=v((Fw,$c)=>{function Rv(e,{EOL:t=`
|
|
9
|
+
`,finalEOL:r=!0,replacer:n=null,spaces:i}={}){let o=r?t:"";return JSON.stringify(e,n,i).replace(/\n/g,t)+o}function Ov(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}$c.exports={stringify:Rv,stripBom:Ov}});var Xc=v((Lw,Uc)=>{var Zt;try{Zt=be()}catch{Zt=require("fs")}var On=Ae(),{stringify:Gc,stripBom:Bc}=Rn();async function Iv(e,t={}){typeof t=="string"&&(t={encoding:t});let r=t.fs||Zt,n="throws"in t?t.throws:!0,i=await On.fromCallback(r.readFile)(e,t);i=Bc(i);let o;try{o=JSON.parse(i,t?t.reviver:null)}catch(a){if(n)throw a.message=`${e}: ${a.message}`,a;return null}return o}var Pv=On.fromPromise(Iv);function Tv(e,t={}){typeof t=="string"&&(t={encoding:t});let r=t.fs||Zt,n="throws"in t?t.throws:!0;try{let i=r.readFileSync(e,t);return i=Bc(i),JSON.parse(i,t.reviver)}catch(i){if(n)throw i.message=`${e}: ${i.message}`,i;return null}}async function Av(e,t,r={}){let n=r.fs||Zt,i=Gc(t,r);await On.fromCallback(n.writeFile)(e,i,r)}var Fv=On.fromPromise(Av);function Lv(e,t,r={}){let n=r.fs||Zt,i=Gc(t,r);return n.writeFileSync(e,i,r)}var kv={readFile:Pv,readFileSync:Tv,writeFile:Fv,writeFileSync:Lv};Uc.exports=kv});var Wc=v((kw,Hc)=>{"use strict";var In=Xc();Hc.exports={readJson:In.readFile,readJsonSync:In.readFileSync,writeJson:In.writeFile,writeJsonSync:In.writeFileSync}});var Pn=v((Nw,zc)=>{"use strict";var Nv=Ae().fromCallback,Ar=be(),Yc=require("path"),Vc=Ke(),Mv=_t().pathExists;function qv(e,t,r,n){typeof r=="function"&&(n=r,r="utf8");let i=Yc.dirname(e);Mv(i,(o,a)=>{if(o)return n(o);if(a)return Ar.writeFile(e,t,r,n);Vc.mkdirs(i,s=>{if(s)return n(s);Ar.writeFile(e,t,r,n)})})}function jv(e,...t){let r=Yc.dirname(e);if(Ar.existsSync(r))return Ar.writeFileSync(e,...t);Vc.mkdirsSync(r),Ar.writeFileSync(e,...t)}zc.exports={outputFile:Nv(qv),outputFileSync:jv}});var Kc=v((Mw,Jc)=>{"use strict";var{stringify:$v}=Rn(),{outputFile:Gv}=Pn();async function Bv(e,t,r={}){let n=$v(t,r);await Gv(e,n,r)}Jc.exports=Bv});var Zc=v((qw,Qc)=>{"use strict";var{stringify:Uv}=Rn(),{outputFileSync:Xv}=Pn();function Hv(e,t,r){let n=Uv(t,r);Xv(e,n,r)}Qc.exports=Hv});var tl=v((jw,el)=>{"use strict";var Wv=Ae().fromPromise,Re=Wc();Re.outputJson=Wv(Kc());Re.outputJsonSync=Zc();Re.outputJSON=Re.outputJson;Re.outputJSONSync=Re.outputJsonSync;Re.writeJSON=Re.writeJson;Re.writeJSONSync=Re.writeJsonSync;Re.readJSON=Re.readJson;Re.readJSONSync=Re.readJsonSync;el.exports=Re});var sl=v(($w,al)=>{"use strict";var il=be(),Yv=require("path"),Vv=po().copySync,ol=Pr().removeSync,zv=Ke().mkdirpSync,rl=Dr();function Jv(e,t,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:i}=rl.checkPathsSync(e,t,"move");return rl.checkParentPathsSync(e,i,t,"move"),zv(Yv.dirname(t)),Kv(e,t,n)}function Kv(e,t,r){if(r)return ol(t),nl(e,t,r);if(il.existsSync(t))throw new Error("dest already exists.");return nl(e,t,r)}function nl(e,t,r){try{il.renameSync(e,t)}catch(n){if(n.code!=="EXDEV")throw n;return Qv(e,t,r)}}function Qv(e,t,r){return Vv(e,t,{overwrite:r,errorOnExist:!0}),ol(e)}al.exports=Jv});var cl=v((Gw,ul)=>{"use strict";ul.exports={moveSync:sl()}});var hl=v((Bw,pl)=>{"use strict";var Zv=be(),e0=require("path"),t0=mo().copy,dl=Pr().remove,r0=Ke().mkdirp,n0=_t().pathExists,ll=Dr();function i0(e,t,r,n){typeof r=="function"&&(n=r,r={});let i=r.overwrite||r.clobber||!1;ll.checkPaths(e,t,"move",(o,a)=>{if(o)return n(o);let{srcStat:s}=a;ll.checkParentPaths(e,s,t,"move",c=>{if(c)return n(c);r0(e0.dirname(t),d=>d?n(d):o0(e,t,i,n))})})}function o0(e,t,r,n){if(r)return dl(t,i=>i?n(i):fl(e,t,r,n));n0(t,(i,o)=>i?n(i):o?n(new Error("dest already exists.")):fl(e,t,r,n))}function fl(e,t,r,n){Zv.rename(e,t,i=>i?i.code!=="EXDEV"?n(i):a0(e,t,r,n):n())}function a0(e,t,r,n){t0(e,t,{overwrite:r,errorOnExist:!0},o=>o?n(o):dl(e,n))}pl.exports=i0});var yl=v((Uw,ml)=>{"use strict";var s0=Ae().fromCallback;ml.exports={move:s0(hl())}});var Tt=v((Xw,go)=>{"use strict";go.exports={...wr(),...po(),...mo(),...yc(),...jc(),...tl(),...Ke(),...cl(),...yl(),...Pn(),..._t(),...Pr()};var gl=require("fs");Object.getOwnPropertyDescriptor(gl,"promises")&&Object.defineProperty(go.exports,"promises",{get(){return gl.promises}})});var _l=v((Hw,vl)=>{"use strict";var u0=/[|\\{}()[\]^$+*?.]/g;vl.exports=function(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(u0,"\\$&")}});var bl=v((Ww,El)=>{"use strict";El.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var vo=v((Yw,Cl)=>{var At=bl(),Dl={};for(Tn in At)At.hasOwnProperty(Tn)&&(Dl[At[Tn]]=Tn);var Tn,C=Cl.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(Oe in C)if(C.hasOwnProperty(Oe)){if(!("channels"in C[Oe]))throw new Error("missing channels property: "+Oe);if(!("labels"in C[Oe]))throw new Error("missing channel labels property: "+Oe);if(C[Oe].labels.length!==C[Oe].channels)throw new Error("channel and label counts mismatch: "+Oe);Sl=C[Oe].channels,wl=C[Oe].labels,delete C[Oe].channels,delete C[Oe].labels,Object.defineProperty(C[Oe],"channels",{value:Sl}),Object.defineProperty(C[Oe],"labels",{value:wl})}var Sl,wl,Oe;C.rgb.hsl=function(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=o-i,s,c,d;return o===i?s=0:t===o?s=(r-n)/a:r===o?s=2+(n-t)/a:n===o&&(s=4+(t-r)/a),s=Math.min(s*60,360),s<0&&(s+=360),d=(i+o)/2,o===i?c=0:d<=.5?c=a/(o+i):c=a/(2-o-i),[s,c*100,d*100]};C.rgb.hsv=function(e){var t,r,n,i,o,a=e[0]/255,s=e[1]/255,c=e[2]/255,d=Math.max(a,s,c),l=d-Math.min(a,s,c),p=function(m){return(d-m)/6/l+1/2};return l===0?i=o=0:(o=l/d,t=p(a),r=p(s),n=p(c),a===d?i=n-r:s===d?i=1/3+t-n:c===d&&(i=2/3+r-t),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,d*100]};C.rgb.hwb=function(e){var t=e[0],r=e[1],n=e[2],i=C.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[i,o*100,n*100]};C.rgb.cmyk=function(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i,o,a,s;return s=Math.min(1-t,1-r,1-n),i=(1-t-s)/(1-s)||0,o=(1-r-s)/(1-s)||0,a=(1-n-s)/(1-s)||0,[i*100,o*100,a*100,s*100]};function c0(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2)}C.rgb.keyword=function(e){var t=Dl[e];if(t)return t;var r=1/0,n;for(var i in At)if(At.hasOwnProperty(i)){var o=At[i],a=c0(e,o);a<r&&(r=a,n=i)}return n};C.keyword.rgb=function(e){return At[e]};C.rgb.xyz=function(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/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=t*.4124+r*.3576+n*.1805,o=t*.2126+r*.7152+n*.0722,a=t*.0193+r*.1192+n*.9505;return[i*100,o*100,a*100]};C.rgb.lab=function(e){var t=C.rgb.xyz(e),r=t[0],n=t[1],i=t[2],o,a,s;return r/=95.047,n/=100,i/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,o=116*n-16,a=500*(r-n),s=200*(n-i),[o,a,s]};C.hsl.rgb=function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,i,o,a,s,c;if(r===0)return c=n*255,[c,c,c];n<.5?o=n*(1+r):o=n+r-n*r,i=2*n-o,s=[0,0,0];for(var d=0;d<3;d++)a=t+1/3*-(d-1),a<0&&a++,a>1&&a--,6*a<1?c=i+(o-i)*6*a:2*a<1?c=o:3*a<2?c=i+(o-i)*(2/3-a)*6:c=i,s[d]=c*255;return s};C.hsl.hsv=function(e){var t=e[0],r=e[1]/100,n=e[2]/100,i=r,o=Math.max(n,.01),a,s;return n*=2,r*=n<=1?n:2-n,i*=o<=1?o:2-o,s=(n+r)/2,a=n===0?2*i/(o+i):2*r/(n+r),[t,a*100,s*100]};C.hsv.rgb=function(e){var t=e[0]/60,r=e[1]/100,n=e[2]/100,i=Math.floor(t)%6,o=t-Math.floor(t),a=255*n*(1-r),s=255*n*(1-r*o),c=255*n*(1-r*(1-o));switch(n*=255,i){case 0:return[n,c,a];case 1:return[s,n,a];case 2:return[a,n,c];case 3:return[a,s,n];case 4:return[c,a,n];case 5:return[n,a,s]}};C.hsv.hsl=function(e){var t=e[0],r=e[1]/100,n=e[2]/100,i=Math.max(n,.01),o,a,s;return s=(2-r)*n,o=(2-r)*i,a=r*i,a/=o<=1?o:2-o,a=a||0,s/=2,[t,a*100,s*100]};C.hwb.rgb=function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,i=r+n,o,a,s,c;i>1&&(r/=i,n/=i),o=Math.floor(6*t),a=1-n,s=6*t-o,o&1&&(s=1-s),c=r+s*(a-r);var d,l,p;switch(o){default:case 6:case 0:d=a,l=c,p=r;break;case 1:d=c,l=a,p=r;break;case 2:d=r,l=a,p=c;break;case 3:d=r,l=c,p=a;break;case 4:d=c,l=r,p=a;break;case 5:d=a,l=r,p=c;break}return[d*255,l*255,p*255]};C.cmyk.rgb=function(e){var t=e[0]/100,r=e[1]/100,n=e[2]/100,i=e[3]/100,o,a,s;return o=1-Math.min(1,t*(1-i)+i),a=1-Math.min(1,r*(1-i)+i),s=1-Math.min(1,n*(1-i)+i),[o*255,a*255,s*255]};C.xyz.rgb=function(e){var t=e[0]/100,r=e[1]/100,n=e[2]/100,i,o,a;return i=t*3.2406+r*-1.5372+n*-.4986,o=t*-.9689+r*1.8758+n*.0415,a=t*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),[i*255,o*255,a*255]};C.xyz.lab=function(e){var t=e[0],r=e[1],n=e[2],i,o,a;return t/=95.047,r/=100,n/=108.883,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=116*r-16,o=500*(t-r),a=200*(r-n),[i,o,a]};C.lab.xyz=function(e){var t=e[0],r=e[1],n=e[2],i,o,a;o=(t+16)/116,i=r/500+o,a=o-n/200;var s=Math.pow(o,3),c=Math.pow(i,3),d=Math.pow(a,3);return o=s>.008856?s:(o-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,a=d>.008856?d:(a-16/116)/7.787,i*=95.047,o*=100,a*=108.883,[i,o,a]};C.lab.lch=function(e){var t=e[0],r=e[1],n=e[2],i,o,a;return i=Math.atan2(n,r),o=i*360/2/Math.PI,o<0&&(o+=360),a=Math.sqrt(r*r+n*n),[t,a,o]};C.lch.lab=function(e){var t=e[0],r=e[1],n=e[2],i,o,a;return a=n/360*2*Math.PI,i=r*Math.cos(a),o=r*Math.sin(a),[t,i,o]};C.rgb.ansi16=function(e){var t=e[0],r=e[1],n=e[2],i=1 in arguments?arguments[1]:C.rgb.hsv(e)[2];if(i=Math.round(i/50),i===0)return 30;var o=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(t/255));return i===2&&(o+=60),o};C.hsv.ansi16=function(e){return C.rgb.ansi16(C.hsv.rgb(e),e[2])};C.rgb.ansi256=function(e){var t=e[0],r=e[1],n=e[2];if(t===r&&r===n)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;var i=16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5);return i};C.ansi16.rgb=function(e){var t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];var r=(~~(e>50)+1)*.5,n=(t&1)*r*255,i=(t>>1&1)*r*255,o=(t>>2&1)*r*255;return[n,i,o]};C.ansi256.rgb=function(e){if(e>=232){var t=(e-232)*10+8;return[t,t,t]}e-=16;var r,n=Math.floor(e/36)/5*255,i=Math.floor((r=e%36)/6)/5*255,o=r%6/5*255;return[n,i,o]};C.rgb.hex=function(e){var t=((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255),r=t.toString(16).toUpperCase();return"000000".substring(r.length)+r};C.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var r=t[0];t[0].length===3&&(r=r.split("").map(function(s){return s+s}).join(""));var n=parseInt(r,16),i=n>>16&255,o=n>>8&255,a=n&255;return[i,o,a]};C.rgb.hcg=function(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.max(Math.max(t,r),n),o=Math.min(Math.min(t,r),n),a=i-o,s,c;return a<1?s=o/(1-a):s=0,a<=0?c=0:i===t?c=(r-n)/a%6:i===r?c=2+(n-t)/a:c=4+(t-r)/a+4,c/=6,c%=1,[c*360,a*100,s*100]};C.hsl.hcg=function(e){var t=e[1]/100,r=e[2]/100,n=1,i=0;return r<.5?n=2*t*r:n=2*t*(1-r),n<1&&(i=(r-.5*n)/(1-n)),[e[0],n*100,i*100]};C.hsv.hcg=function(e){var t=e[1]/100,r=e[2]/100,n=t*r,i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],n*100,i*100]};C.hcg.rgb=function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return[n*255,n*255,n*255];var i=[0,0,0],o=t%1*6,a=o%1,s=1-a,c=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=a,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=a;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=a,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return c=(1-r)*n,[(r*i[0]+c)*255,(r*i[1]+c)*255,(r*i[2]+c)*255]};C.hcg.hsv=function(e){var t=e[1]/100,r=e[2]/100,n=t+r*(1-t),i=0;return n>0&&(i=t/n),[e[0],i*100,n*100]};C.hcg.hsl=function(e){var t=e[1]/100,r=e[2]/100,n=r*(1-t)+.5*t,i=0;return n>0&&n<.5?i=t/(2*n):n>=.5&&n<1&&(i=t/(2*(1-n))),[e[0],i*100,n*100]};C.hcg.hwb=function(e){var t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return[e[0],(n-t)*100,(1-n)*100]};C.hwb.hcg=function(e){var t=e[1]/100,r=e[2]/100,n=1-r,i=n-t,o=0;return i<1&&(o=(n-i)/(1-i)),[e[0],i*100,o*100]};C.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};C.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};C.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};C.gray.hsl=C.gray.hsv=function(e){return[0,0,e[0]]};C.gray.hwb=function(e){return[0,100,e[0]]};C.gray.cmyk=function(e){return[0,0,0,e[0]]};C.gray.lab=function(e){return[e[0],0,0]};C.gray.hex=function(e){var t=Math.round(e[0]/100*255)&255,r=(t<<16)+(t<<8)+t,n=r.toString(16).toUpperCase();return"000000".substring(n.length)+n};C.rgb.gray=function(e){var t=(e[0]+e[1]+e[2])/3;return[t/255*100]}});var Rl=v((Vw,xl)=>{var An=vo();function l0(){for(var e={},t=Object.keys(An),r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}function f0(e){var t=l0(),r=[e];for(t[e].distance=0;r.length;)for(var n=r.pop(),i=Object.keys(An[n]),o=i.length,a=0;a<o;a++){var s=i[a],c=t[s];c.distance===-1&&(c.distance=t[n].distance+1,c.parent=n,r.unshift(s))}return t}function d0(e,t){return function(r){return t(e(r))}}function p0(e,t){for(var r=[t[e].parent,e],n=An[t[e].parent][e],i=t[e].parent;t[i].parent;)r.unshift(t[i].parent),n=d0(An[t[i].parent][i],n),i=t[i].parent;return n.conversion=r,n}xl.exports=function(e){for(var t=f0(e),r={},n=Object.keys(t),i=n.length,o=0;o<i;o++){var a=n[o],s=t[a];s.parent!==null&&(r[a]=p0(a,t))}return r}});var Il=v((zw,Ol)=>{var _o=vo(),h0=Rl(),er={},m0=Object.keys(_o);function y0(e){var t=function(r){return r==null?r:(arguments.length>1&&(r=Array.prototype.slice.call(arguments)),e(r))};return"conversion"in e&&(t.conversion=e.conversion),t}function g0(e){var t=function(r){if(r==null)return r;arguments.length>1&&(r=Array.prototype.slice.call(arguments));var n=e(r);if(typeof n=="object")for(var i=n.length,o=0;o<i;o++)n[o]=Math.round(n[o]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}m0.forEach(function(e){er[e]={},Object.defineProperty(er[e],"channels",{value:_o[e].channels}),Object.defineProperty(er[e],"labels",{value:_o[e].labels});var t=h0(e),r=Object.keys(t);r.forEach(function(n){var i=t[n];er[e][n]=g0(i),er[e][n].raw=y0(i)})});Ol.exports=er});var Tl=v((Jw,Pl)=>{"use strict";var tr=Il(),Fn=(e,t)=>function(){return`\x1B[${e.apply(tr,arguments)+t}m`},Ln=(e,t)=>function(){let r=e.apply(tr,arguments);return`\x1B[${38+t};5;${r}m`},kn=(e,t)=>function(){let r=e.apply(tr,arguments);return`\x1B[${38+t};2;${r[0]};${r[1]};${r[2]}m`};function v0(){let e=new Map,t={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]}};t.color.grey=t.color.gray;for(let i of Object.keys(t)){let o=t[i];for(let a of Object.keys(o)){let s=o[a];t[a]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},o[a]=t[a],e.set(s[0],s[1])}Object.defineProperty(t,i,{value:o,enumerable:!1}),Object.defineProperty(t,"codes",{value:e,enumerable:!1})}let r=i=>i,n=(i,o,a)=>[i,o,a];t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",t.color.ansi={ansi:Fn(r,0)},t.color.ansi256={ansi256:Ln(r,0)},t.color.ansi16m={rgb:kn(n,0)},t.bgColor.ansi={ansi:Fn(r,10)},t.bgColor.ansi256={ansi256:Ln(r,10)},t.bgColor.ansi16m={rgb:kn(n,10)};for(let i of Object.keys(tr)){if(typeof tr[i]!="object")continue;let o=tr[i];i==="ansi16"&&(i="ansi"),"ansi16"in o&&(t.color.ansi[i]=Fn(o.ansi16,0),t.bgColor.ansi[i]=Fn(o.ansi16,10)),"ansi256"in o&&(t.color.ansi256[i]=Ln(o.ansi256,0),t.bgColor.ansi256[i]=Ln(o.ansi256,10)),"rgb"in o&&(t.color.ansi16m[i]=kn(o.rgb,0),t.bgColor.ansi16m[i]=kn(o.rgb,10))}return t}Object.defineProperty(Pl,"exports",{enumerable:!0,get:v0})});var Fl=v((Kw,Al)=>{"use strict";Al.exports=(e,t)=>{t=t||process.argv;let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1?!0:n<i)}});var kl=v((Qw,Ll)=>{"use strict";var _0=require("os"),Qe=Fl(),we=process.env,rr;Qe("no-color")||Qe("no-colors")||Qe("color=false")?rr=!1:(Qe("color")||Qe("colors")||Qe("color=true")||Qe("color=always"))&&(rr=!0);"FORCE_COLOR"in we&&(rr=we.FORCE_COLOR.length===0||parseInt(we.FORCE_COLOR,10)!==0);function E0(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function b0(e){if(rr===!1)return 0;if(Qe("color=16m")||Qe("color=full")||Qe("color=truecolor"))return 3;if(Qe("color=256"))return 2;if(e&&!e.isTTY&&rr!==!0)return 0;let t=rr?1:0;if(process.platform==="win32"){let r=_0.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 we)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in we)||we.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in we)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(we.TEAMCITY_VERSION)?1:0;if(we.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in we){let r=parseInt((we.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(we.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(we.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(we.TERM)||"COLORTERM"in we?1:(we.TERM==="dumb",t)}function Eo(e){let t=b0(e);return E0(t)}Ll.exports={supportsColor:Eo,stdout:Eo(process.stdout),stderr:Eo(process.stderr)}});var $l=v((Zw,jl)=>{"use strict";var S0=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Nl=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,w0=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,D0=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,C0=new Map([["n",`
|
|
10
|
+
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function ql(e){return e[0]==="u"&&e.length===5||e[0]==="x"&&e.length===3?String.fromCharCode(parseInt(e.slice(1),16)):C0.get(e)||e}function x0(e,t){let r=[],n=t.trim().split(/\s*,\s*/g),i;for(let o of n)if(!isNaN(o))r.push(Number(o));else if(i=o.match(w0))r.push(i[2].replace(D0,(a,s,c)=>s?ql(s):c));else throw new Error(`Invalid Chalk template style argument: ${o} (in style '${e}')`);return r}function R0(e){Nl.lastIndex=0;let t=[],r;for(;(r=Nl.exec(e))!==null;){let n=r[1];if(r[2]){let i=x0(n,r[2]);t.push([n].concat(i))}else t.push([n])}return t}function Ml(e,t){let r={};for(let i of t)for(let o of i.styles)r[o[0]]=i.inverse?null:o.slice(1);let n=e;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}jl.exports=(e,t)=>{let r=[],n=[],i=[];if(t.replace(S0,(o,a,s,c,d,l)=>{if(a)i.push(ql(a));else if(c){let p=i.join("");i=[],n.push(r.length===0?p:Ml(e,r)(p)),r.push({inverse:s,styles:R0(c)})}else if(d){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(Ml(e,r)(i.join(""))),i=[],r.pop()}else i.push(l)}),n.push(i.join("")),r.length>0){let o=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(o)}return n.join("")}});var Mn=v((e1,Lr)=>{"use strict";var So=_l(),ae=Tl(),bo=kl().stdout,O0=$l(),Bl=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),Ul=["ansi","ansi","ansi256","ansi16m"],Xl=new Set(["gray"]),nr=Object.create(null);function Gl(e,t){t=t||{};let r=bo?bo.level:0;e.level=t.level===void 0?r:t.level,e.enabled="enabled"in t?t.enabled:e.level>0}function Fr(e){if(!this||!(this instanceof Fr)||this.template){let t={};return Gl(t,e),t.template=function(){let r=[].slice.call(arguments);return T0.apply(null,[t.template].concat(r))},Object.setPrototypeOf(t,Fr.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=Fr,t.template}Gl(this,e)}Bl&&(ae.blue.open="\x1B[94m");for(let e of Object.keys(ae))ae[e].closeRe=new RegExp(So(ae[e].close),"g"),nr[e]={get(){let t=ae[e];return Nn.call(this,this._styles?this._styles.concat(t):[t],this._empty,e)}};nr.visible={get(){return Nn.call(this,this._styles||[],!0,"visible")}};ae.color.closeRe=new RegExp(So(ae.color.close),"g");for(let e of Object.keys(ae.color.ansi))Xl.has(e)||(nr[e]={get(){let t=this.level;return function(){let n={open:ae.color[Ul[t]][e].apply(null,arguments),close:ae.color.close,closeRe:ae.color.closeRe};return Nn.call(this,this._styles?this._styles.concat(n):[n],this._empty,e)}}});ae.bgColor.closeRe=new RegExp(So(ae.bgColor.close),"g");for(let e of Object.keys(ae.bgColor.ansi)){if(Xl.has(e))continue;let t="bg"+e[0].toUpperCase()+e.slice(1);nr[t]={get(){let r=this.level;return function(){let i={open:ae.bgColor[Ul[r]][e].apply(null,arguments),close:ae.bgColor.close,closeRe:ae.bgColor.closeRe};return Nn.call(this,this._styles?this._styles.concat(i):[i],this._empty,e)}}}}var I0=Object.defineProperties(()=>{},nr);function Nn(e,t,r){let n=function(){return P0.apply(n,arguments)};n._styles=e,n._empty=t;let i=this;return Object.defineProperty(n,"level",{enumerable:!0,get(){return i.level},set(o){i.level=o}}),Object.defineProperty(n,"enabled",{enumerable:!0,get(){return i.enabled},set(o){i.enabled=o}}),n.hasGrey=this.hasGrey||r==="gray"||r==="grey",n.__proto__=I0,n}function P0(){let e=arguments,t=e.length,r=String(arguments[0]);if(t===0)return"";if(t>1)for(let i=1;i<t;i++)r+=" "+e[i];if(!this.enabled||this.level<=0||!r)return this._empty?"":r;let n=ae.dim.open;Bl&&this.hasGrey&&(ae.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 ae.dim.open=n,r}function T0(e,t){if(!Array.isArray(t))return[].slice.call(arguments,1).join(" ");let r=[].slice.call(arguments,2),n=[t.raw[0]];for(let i=1;i<t.length;i++)n.push(String(r[i-1]).replace(/[{}\\]/g,"\\$&")),n.push(String(t.raw[i]));return O0(e,n.join(""))}Object.defineProperties(Fr.prototype,nr);Lr.exports=Fr();Lr.exports.supportsColor=bo;Lr.exports.default=Lr.exports});var Wl=v((t1,Hl)=>{var wo=class{constructor(t){this.value=t,this.next=void 0}},Do=class{constructor(){this.clear()}enqueue(t){let r=new wo(t);this._head?(this._tail.next=r,this._tail=r):(this._head=r,this._tail=r),this._size++}dequeue(){let t=this._head;if(t)return this._head=this._head.next,this._size--,t.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let t=this._head;for(;t;)yield t.value,t=t.next}};Hl.exports=Do});var Co=v((r1,Yl)=>{"use strict";var A0=Wl(),F0=e=>{if(!((Number.isInteger(e)||e===1/0)&&e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let t=new A0,r=0,n=()=>{r--,t.size>0&&t.dequeue()()},i=async(s,c,...d)=>{r++;let l=(async()=>s(...d))();c(l);try{await l}catch{}n()},o=(s,c,...d)=>{t.enqueue(i.bind(null,s,c,...d)),(async()=>(await Promise.resolve(),r<e&&t.size>0&&t.dequeue()()))()},a=(s,...c)=>new Promise(d=>{o(s,d,...c)});return Object.defineProperties(a,{activeCount:{get:()=>r},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),a};Yl.exports=F0});var Jl=v((n1,zl)=>{"use strict";var Vl=Co(),qn=class extends Error{constructor(t){super(),this.value=t}},L0=async(e,t)=>t(await e),k0=async e=>{let t=await Promise.all(e);if(t[1]===!0)throw new qn(t[0]);return!1},N0=async(e,t,r)=>{r={concurrency:1/0,preserveOrder:!0,...r};let n=Vl(r.concurrency),i=[...e].map(a=>[a,n(L0,a,t)]),o=Vl(r.preserveOrder?1:1/0);try{await Promise.all(i.map(a=>o(k0,a)))}catch(a){if(a instanceof qn)return a.value;throw a}};zl.exports=N0});var rf=v((i1,xo)=>{"use strict";var Kl=require("path"),jn=require("fs"),{promisify:Ql}=require("util"),M0=Jl(),q0=Ql(jn.stat),j0=Ql(jn.lstat),Zl={directory:"isDirectory",file:"isFile"};function ef({type:e}){if(!(e in Zl))throw new Error(`Invalid type specified: ${e}`)}var tf=(e,t)=>e===void 0||t[Zl[e]]();xo.exports=async(e,t)=>{t={cwd:process.cwd(),type:"file",allowSymlinks:!0,...t},ef(t);let r=t.allowSymlinks?q0:j0;return M0(e,async n=>{try{let i=await r(Kl.resolve(t.cwd,n));return tf(t.type,i)}catch{return!1}},t)};xo.exports.sync=(e,t)=>{t={cwd:process.cwd(),allowSymlinks:!0,type:"file",...t},ef(t);let r=t.allowSymlinks?jn.statSync:jn.lstatSync;for(let n of e)try{let i=r(Kl.resolve(t.cwd,n));if(tf(t.type,i))return n}catch{}}});var of=v((o1,Ro)=>{"use strict";var nf=require("fs"),{promisify:$0}=require("util"),G0=$0(nf.access);Ro.exports=async e=>{try{return await G0(e),!0}catch{return!1}};Ro.exports.sync=e=>{try{return nf.accessSync(e),!0}catch{return!1}}});var Io=v((a1,ir)=>{"use strict";var St=require("path"),$n=rf(),af=of(),Oo=Symbol("findUp.stop");ir.exports=async(e,t={})=>{let r=St.resolve(t.cwd||""),{root:n}=St.parse(r),i=[].concat(e),o=async a=>{if(typeof e!="function")return $n(i,a);let s=await e(a.cwd);return typeof s=="string"?$n([s],a):s};for(;;){let a=await o({...t,cwd:r});if(a===Oo)return;if(a)return St.resolve(r,a);if(r===n)return;r=St.dirname(r)}};ir.exports.sync=(e,t={})=>{let r=St.resolve(t.cwd||""),{root:n}=St.parse(r),i=[].concat(e),o=a=>{if(typeof e!="function")return $n.sync(i,a);let s=e(a.cwd);return typeof s=="string"?$n.sync([s],a):s};for(;;){let a=o({...t,cwd:r});if(a===Oo)return;if(a)return St.resolve(r,a);if(r===n)return;r=St.dirname(r)}};ir.exports.exists=af;ir.exports.sync.exists=af.sync;ir.exports.stop=Oo});var Gn=v((s1,Po)=>{"use strict";var sf=require("path"),uf=Io(),B0=async e=>{let t=await uf("package.json",{cwd:e});return t&&sf.dirname(t)};Po.exports=B0;Po.exports.sync=e=>{let t=uf.sync("package.json",{cwd:e});return t&&sf.dirname(t)}});var Ef=v((h1,_f)=>{"use strict";var{FORCE_COLOR:Y0,NODE_DISABLE_COLORS:V0,TERM:z0}=process.env,Y={enabled:!V0&&z0!=="dumb"&&Y0!=="0",reset:J(0,0),bold:J(1,22),dim:J(2,22),italic:J(3,23),underline:J(4,24),inverse:J(7,27),hidden:J(8,28),strikethrough:J(9,29),black:J(30,39),red:J(31,39),green:J(32,39),yellow:J(33,39),blue:J(34,39),magenta:J(35,39),cyan:J(36,39),white:J(37,39),gray:J(90,39),grey:J(90,39),bgBlack:J(40,49),bgRed:J(41,49),bgGreen:J(42,49),bgYellow:J(43,49),bgBlue:J(44,49),bgMagenta:J(45,49),bgCyan:J(46,49),bgWhite:J(47,49)};function vf(e,t){let r=0,n,i="",o="";for(;r<e.length;r++)n=e[r],i+=n.open,o+=n.close,t.includes(n.close)&&(t=t.replace(n.rgx,n.close+n.open));return i+t+o}function J0(e,t){let r={has:e,keys:t};return r.reset=Y.reset.bind(r),r.bold=Y.bold.bind(r),r.dim=Y.dim.bind(r),r.italic=Y.italic.bind(r),r.underline=Y.underline.bind(r),r.inverse=Y.inverse.bind(r),r.hidden=Y.hidden.bind(r),r.strikethrough=Y.strikethrough.bind(r),r.black=Y.black.bind(r),r.red=Y.red.bind(r),r.green=Y.green.bind(r),r.yellow=Y.yellow.bind(r),r.blue=Y.blue.bind(r),r.magenta=Y.magenta.bind(r),r.cyan=Y.cyan.bind(r),r.white=Y.white.bind(r),r.gray=Y.gray.bind(r),r.grey=Y.grey.bind(r),r.bgBlack=Y.bgBlack.bind(r),r.bgRed=Y.bgRed.bind(r),r.bgGreen=Y.bgGreen.bind(r),r.bgYellow=Y.bgYellow.bind(r),r.bgBlue=Y.bgBlue.bind(r),r.bgMagenta=Y.bgMagenta.bind(r),r.bgCyan=Y.bgCyan.bind(r),r.bgWhite=Y.bgWhite.bind(r),r}function J(e,t){let r={open:`\x1B[${e}m`,close:`\x1B[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(n){return this!==void 0&&this.has!==void 0?(this.has.includes(e)||(this.has.push(e),this.keys.push(r)),n===void 0?this:Y.enabled?vf(this.keys,n+""):n+""):n===void 0?J0([e],[r]):Y.enabled?vf([r],n+""):n+""}}_f.exports=Y});var Tf=v($=>{"use strict";var Nr=Symbol.for("react.element"),K0=Symbol.for("react.portal"),Q0=Symbol.for("react.fragment"),Z0=Symbol.for("react.strict_mode"),e_=Symbol.for("react.profiler"),t_=Symbol.for("react.provider"),r_=Symbol.for("react.context"),n_=Symbol.for("react.forward_ref"),i_=Symbol.for("react.suspense"),o_=Symbol.for("react.memo"),a_=Symbol.for("react.lazy"),bf=Symbol.iterator;function s_(e){return e===null||typeof e!="object"?null:(e=bf&&e[bf]||e["@@iterator"],typeof e=="function"?e:null)}var Df={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Cf=Object.assign,xf={};function sr(e,t,r){this.props=e,this.context=t,this.refs=xf,this.updater=r||Df}sr.prototype.isReactComponent={};sr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};sr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Rf(){}Rf.prototype=sr.prototype;function No(e,t,r){this.props=e,this.context=t,this.refs=xf,this.updater=r||Df}var Mo=No.prototype=new Rf;Mo.constructor=No;Cf(Mo,sr.prototype);Mo.isPureReactComponent=!0;var Sf=Array.isArray,Of=Object.prototype.hasOwnProperty,qo={current:null},If={key:!0,ref:!0,__self:!0,__source:!0};function Pf(e,t,r){var n,i={},o=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)Of.call(t,n)&&!If.hasOwnProperty(n)&&(i[n]=t[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1<s){for(var c=Array(s),d=0;d<s;d++)c[d]=arguments[d+2];i.children=c}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)i[n]===void 0&&(i[n]=s[n]);return{$$typeof:Nr,type:e,key:o,ref:a,props:i,_owner:qo.current}}function u_(e,t){return{$$typeof:Nr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function jo(e){return typeof e=="object"&&e!==null&&e.$$typeof===Nr}function c_(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var wf=/\/+/g;function ko(e,t){return typeof e=="object"&&e!==null&&e.key!=null?c_(""+e.key):t.toString(36)}function Yn(e,t,r,n,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Nr:case K0:a=!0}}if(a)return a=e,i=i(a),e=n===""?"."+ko(a,0):n,Sf(i)?(r="",e!=null&&(r=e.replace(wf,"$&/")+"/"),Yn(i,t,r,"",function(d){return d})):i!=null&&(jo(i)&&(i=u_(i,r+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(wf,"$&/")+"/")+e)),t.push(i)),1;if(a=0,n=n===""?".":n+":",Sf(e))for(var s=0;s<e.length;s++){o=e[s];var c=n+ko(o,s);a+=Yn(o,t,r,c,i)}else if(c=s_(e),typeof c=="function")for(e=c.call(e),s=0;!(o=e.next()).done;)o=o.value,c=n+ko(o,s++),a+=Yn(o,t,r,c,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Wn(e,t,r){if(e==null)return e;var n=[],i=0;return Yn(e,n,"","",function(o){return t.call(r,o,i++)}),n}function l_(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Pe={current:null},Vn={transition:null},f_={ReactCurrentDispatcher:Pe,ReactCurrentBatchConfig:Vn,ReactCurrentOwner:qo};$.Children={map:Wn,forEach:function(e,t,r){Wn(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Wn(e,function(){t++}),t},toArray:function(e){return Wn(e,function(t){return t})||[]},only:function(e){if(!jo(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};$.Component=sr;$.Fragment=Q0;$.Profiler=e_;$.PureComponent=No;$.StrictMode=Z0;$.Suspense=i_;$.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=f_;$.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=Cf({},e.props),i=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=qo.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)Of.call(t,c)&&!If.hasOwnProperty(c)&&(n[c]=t[c]===void 0&&s!==void 0?s[c]:t[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){s=Array(c);for(var d=0;d<c;d++)s[d]=arguments[d+2];n.children=s}return{$$typeof:Nr,type:e.type,key:i,ref:o,props:n,_owner:a}};$.createContext=function(e){return e={$$typeof:r_,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:t_,_context:e},e.Consumer=e};$.createElement=Pf;$.createFactory=function(e){var t=Pf.bind(null,e);return t.type=e,t};$.createRef=function(){return{current:null}};$.forwardRef=function(e){return{$$typeof:n_,render:e}};$.isValidElement=jo;$.lazy=function(e){return{$$typeof:a_,_payload:{_status:-1,_result:e},_init:l_}};$.memo=function(e,t){return{$$typeof:o_,type:e,compare:t===void 0?null:t}};$.startTransition=function(e){var t=Vn.transition;Vn.transition={};try{e()}finally{Vn.transition=t}};$.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};$.useCallback=function(e,t){return Pe.current.useCallback(e,t)};$.useContext=function(e){return Pe.current.useContext(e)};$.useDebugValue=function(){};$.useDeferredValue=function(e){return Pe.current.useDeferredValue(e)};$.useEffect=function(e,t){return Pe.current.useEffect(e,t)};$.useId=function(){return Pe.current.useId()};$.useImperativeHandle=function(e,t,r){return Pe.current.useImperativeHandle(e,t,r)};$.useInsertionEffect=function(e,t){return Pe.current.useInsertionEffect(e,t)};$.useLayoutEffect=function(e,t){return Pe.current.useLayoutEffect(e,t)};$.useMemo=function(e,t){return Pe.current.useMemo(e,t)};$.useReducer=function(e,t,r){return Pe.current.useReducer(e,t,r)};$.useRef=function(e){return Pe.current.useRef(e)};$.useState=function(e){return Pe.current.useState(e)};$.useSyncExternalStore=function(e,t,r){return Pe.current.useSyncExternalStore(e,t,r)};$.useTransition=function(){return Pe.current.useTransition()};$.version="18.2.0"});var Af=v((G,zn)=>{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e="18.2.0",t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),_=Symbol.iterator,b="@@iterator";function w(u){if(u===null||typeof u!="object")return null;var f=_&&u[_]||u[b];return typeof f=="function"?f:null}var I={current:null},F={transition:null},P={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},L={current:null},K={},se=null;function $e(u){se=u}K.setExtraStackFrame=function(u){se=u},K.getCurrentStack=null,K.getStackAddendum=function(){var u="";se&&(u+=se);var f=K.getCurrentStack;return f&&(u+=f()||""),u};var ce=!1,x=!1,q=!1,M=!1,Q=!1,U={ReactCurrentDispatcher:I,ReactCurrentBatchConfig:F,ReactCurrentOwner:L};U.ReactDebugCurrentFrame=K,U.ReactCurrentActQueue=P;function W(u){{for(var f=arguments.length,y=new Array(f>1?f-1:0),g=1;g<f;g++)y[g-1]=arguments[g];H("warn",u,y)}}function S(u){{for(var f=arguments.length,y=new Array(f>1?f-1:0),g=1;g<f;g++)y[g-1]=arguments[g];H("error",u,y)}}function H(u,f,y){{var g=U.ReactDebugCurrentFrame,E=g.getStackAddendum();E!==""&&(f+="%s",y=y.concat([E]));var O=y.map(function(D){return String(D)});O.unshift("Warning: "+f),Function.prototype.apply.call(console[u],console,O)}}var k={};function R(u,f){{var y=u.constructor,g=y&&(y.displayName||y.name)||"ReactClass",E=g+"."+f;if(k[E])return;S("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",f,g),k[E]=!0}}var j={isMounted:function(u){return!1},enqueueForceUpdate:function(u,f,y){R(u,"forceUpdate")},enqueueReplaceState:function(u,f,y,g){R(u,"replaceState")},enqueueSetState:function(u,f,y,g){R(u,"setState")}},he=Object.assign,it={};Object.freeze(it);function Xe(u,f,y){this.props=u,this.context=f,this.refs=it,this.updater=y||j}Xe.prototype.isReactComponent={},Xe.prototype.setState=function(u,f){if(typeof u!="object"&&typeof u!="function"&&u!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,u,f,"setState")},Xe.prototype.forceUpdate=function(u){this.updater.enqueueForceUpdate(this,u,"forceUpdate")};{var ct={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},Rt=function(u,f){Object.defineProperty(Xe.prototype,u,{get:function(){W("%s(...) is deprecated in plain JavaScript React classes. %s",f[0],f[1])}})};for(var Ee in ct)ct.hasOwnProperty(Ee)&&Rt(Ee,ct[Ee])}function tn(){}tn.prototype=Xe.prototype;function ht(u,f,y){this.props=u,this.context=f,this.refs=it,this.updater=y||j}var mt=ht.prototype=new tn;mt.constructor=ht,he(mt,Xe.prototype),mt.isPureReactComponent=!0;function ze(){var u={current:null};return Object.seal(u),u}var Ut=Array.isArray;function Je(u){return Ut(u)}function rn(u){{var f=typeof Symbol=="function"&&Symbol.toStringTag,y=f&&u[Symbol.toStringTag]||u.constructor.name||"Object";return y}}function vr(u){try{return _r(u),!1}catch{return!0}}function _r(u){return""+u}function Xt(u){if(vr(u))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",rn(u)),_r(u)}function He(u,f,y){var g=u.displayName;if(g)return g;var E=f.displayName||f.name||"";return E!==""?y+"("+E+")":y}function Ds(u){return u.displayName||"Context"}function yt(u){if(u==null)return null;if(typeof u.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case n:return"Fragment";case r:return"Portal";case o:return"Profiler";case i:return"StrictMode";case d:return"Suspense";case l:return"SuspenseList"}if(typeof u=="object")switch(u.$$typeof){case s:var f=u;return Ds(f)+".Consumer";case a:var y=u;return Ds(y._context)+".Provider";case c:return He(u,u.render,"ForwardRef");case p:var g=u.displayName||null;return g!==null?g:yt(u.type)||"Memo";case m:{var E=u,O=E._payload,D=E._init;try{return yt(D(O))}catch{return null}}}return null}var Er=Object.prototype.hasOwnProperty,Cs={key:!0,ref:!0,__self:!0,__source:!0},xs,Rs,$i;$i={};function Os(u){if(Er.call(u,"ref")){var f=Object.getOwnPropertyDescriptor(u,"ref").get;if(f&&f.isReactWarning)return!1}return u.ref!==void 0}function Is(u){if(Er.call(u,"key")){var f=Object.getOwnPropertyDescriptor(u,"key").get;if(f&&f.isReactWarning)return!1}return u.key!==void 0}function Gm(u,f){var y=function(){xs||(xs=!0,S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",f))};y.isReactWarning=!0,Object.defineProperty(u,"key",{get:y,configurable:!0})}function Bm(u,f){var y=function(){Rs||(Rs=!0,S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",f))};y.isReactWarning=!0,Object.defineProperty(u,"ref",{get:y,configurable:!0})}function Um(u){if(typeof u.ref=="string"&&L.current&&u.__self&&L.current.stateNode!==u.__self){var f=yt(L.current.type);$i[f]||(S('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',f,u.ref),$i[f]=!0)}}var Gi=function(u,f,y,g,E,O,D){var A={$$typeof:t,type:u,key:f,ref:y,props:D,_owner:O};return A._store={},Object.defineProperty(A._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(A,"_self",{configurable:!1,enumerable:!1,writable:!1,value:g}),Object.defineProperty(A,"_source",{configurable:!1,enumerable:!1,writable:!1,value:E}),Object.freeze&&(Object.freeze(A.props),Object.freeze(A)),A};function Xm(u,f,y){var g,E={},O=null,D=null,A=null,B=null;if(f!=null){Os(f)&&(D=f.ref,Um(f)),Is(f)&&(Xt(f.key),O=""+f.key),A=f.__self===void 0?null:f.__self,B=f.__source===void 0?null:f.__source;for(g in f)Er.call(f,g)&&!Cs.hasOwnProperty(g)&&(E[g]=f[g])}var V=arguments.length-2;if(V===1)E.children=y;else if(V>1){for(var Z=Array(V),ee=0;ee<V;ee++)Z[ee]=arguments[ee+2];Object.freeze&&Object.freeze(Z),E.children=Z}if(u&&u.defaultProps){var te=u.defaultProps;for(g in te)E[g]===void 0&&(E[g]=te[g])}if(O||D){var oe=typeof u=="function"?u.displayName||u.name||"Unknown":u;O&&Gm(E,oe),D&&Bm(E,oe)}return Gi(u,O,D,A,B,L.current,E)}function Hm(u,f){var y=Gi(u.type,f,u.ref,u._self,u._source,u._owner,u.props);return y}function Wm(u,f,y){if(u==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+u+".");var g,E=he({},u.props),O=u.key,D=u.ref,A=u._self,B=u._source,V=u._owner;if(f!=null){Os(f)&&(D=f.ref,V=L.current),Is(f)&&(Xt(f.key),O=""+f.key);var Z;u.type&&u.type.defaultProps&&(Z=u.type.defaultProps);for(g in f)Er.call(f,g)&&!Cs.hasOwnProperty(g)&&(f[g]===void 0&&Z!==void 0?E[g]=Z[g]:E[g]=f[g])}var ee=arguments.length-2;if(ee===1)E.children=y;else if(ee>1){for(var te=Array(ee),oe=0;oe<ee;oe++)te[oe]=arguments[oe+2];E.children=te}return Gi(u.type,O,D,A,B,V,E)}function Ht(u){return typeof u=="object"&&u!==null&&u.$$typeof===t}var Ps=".",Ym=":";function Vm(u){var f=/[=:]/g,y={"=":"=0",":":"=2"},g=u.replace(f,function(E){return y[E]});return"$"+g}var Ts=!1,zm=/\/+/g;function As(u){return u.replace(zm,"$&/")}function Bi(u,f){return typeof u=="object"&&u!==null&&u.key!=null?(Xt(u.key),Vm(""+u.key)):f.toString(36)}function nn(u,f,y,g,E){var O=typeof u;(O==="undefined"||O==="boolean")&&(u=null);var D=!1;if(u===null)D=!0;else switch(O){case"string":case"number":D=!0;break;case"object":switch(u.$$typeof){case t:case r:D=!0}}if(D){var A=u,B=E(A),V=g===""?Ps+Bi(A,0):g;if(Je(B)){var Z="";V!=null&&(Z=As(V)+"/"),nn(B,f,Z,"",function(By){return By})}else B!=null&&(Ht(B)&&(B.key&&(!A||A.key!==B.key)&&Xt(B.key),B=Hm(B,y+(B.key&&(!A||A.key!==B.key)?As(""+B.key)+"/":"")+V)),f.push(B));return 1}var ee,te,oe=0,me=g===""?Ps:g+Ym;if(Je(u))for(var dn=0;dn<u.length;dn++)ee=u[dn],te=me+Bi(ee,dn),oe+=nn(ee,f,y,te,E);else{var Ki=w(u);if(typeof Ki=="function"){var ru=u;Ki===ru.entries&&(Ts||W("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Ts=!0);for(var $y=Ki.call(ru),nu,Gy=0;!(nu=$y.next()).done;)ee=nu.value,te=me+Bi(ee,Gy++),oe+=nn(ee,f,y,te,E)}else if(O==="object"){var iu=String(u);throw new Error("Objects are not valid as a React child (found: "+(iu==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":iu)+"). If you meant to render a collection of children, use an array instead.")}}return oe}function on(u,f,y){if(u==null)return u;var g=[],E=0;return nn(u,g,"","",function(O){return f.call(y,O,E++)}),g}function Jm(u){var f=0;return on(u,function(){f++}),f}function Km(u,f,y){on(u,function(){f.apply(this,arguments)},y)}function Qm(u){return on(u,function(f){return f})||[]}function Zm(u){if(!Ht(u))throw new Error("React.Children.only expected to receive a single React element child.");return u}function ey(u){var f={$$typeof:s,_currentValue:u,_currentValue2:u,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};f.Provider={$$typeof:a,_context:f};var y=!1,g=!1,E=!1;{var O={$$typeof:s,_context:f};Object.defineProperties(O,{Provider:{get:function(){return g||(g=!0,S("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),f.Provider},set:function(D){f.Provider=D}},_currentValue:{get:function(){return f._currentValue},set:function(D){f._currentValue=D}},_currentValue2:{get:function(){return f._currentValue2},set:function(D){f._currentValue2=D}},_threadCount:{get:function(){return f._threadCount},set:function(D){f._threadCount=D}},Consumer:{get:function(){return y||(y=!0,S("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),f.Consumer}},displayName:{get:function(){return f.displayName},set:function(D){E||(W("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",D),E=!0)}}}),f.Consumer=O}return f._currentRenderer=null,f._currentRenderer2=null,f}var br=-1,Ui=0,Fs=1,ty=2;function ry(u){if(u._status===br){var f=u._result,y=f();if(y.then(function(O){if(u._status===Ui||u._status===br){var D=u;D._status=Fs,D._result=O}},function(O){if(u._status===Ui||u._status===br){var D=u;D._status=ty,D._result=O}}),u._status===br){var g=u;g._status=Ui,g._result=y}}if(u._status===Fs){var E=u._result;return E===void 0&&S(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
11
|
+
|
|
12
|
+
Your code should look like:
|
|
13
|
+
const MyComponent = lazy(() => import('./MyComponent'))
|
|
14
|
+
|
|
15
|
+
Did you accidentally put curly braces around the import?`,E),"default"in E||S(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
16
|
+
|
|
17
|
+
Your code should look like:
|
|
18
|
+
const MyComponent = lazy(() => import('./MyComponent'))`,E),E.default}else throw u._result}function ny(u){var f={_status:br,_result:u},y={$$typeof:m,_payload:f,_init:ry};{var g,E;Object.defineProperties(y,{defaultProps:{configurable:!0,get:function(){return g},set:function(O){S("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),g=O,Object.defineProperty(y,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return E},set:function(O){S("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),E=O,Object.defineProperty(y,"propTypes",{enumerable:!0})}}})}return y}function iy(u){u!=null&&u.$$typeof===p?S("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof u!="function"?S("forwardRef requires a render function but was given %s.",u===null?"null":typeof u):u.length!==0&&u.length!==2&&S("forwardRef render functions accept exactly two parameters: props and ref. %s",u.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),u!=null&&(u.defaultProps!=null||u.propTypes!=null)&&S("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var f={$$typeof:c,render:u};{var y;Object.defineProperty(f,"displayName",{enumerable:!1,configurable:!0,get:function(){return y},set:function(g){y=g,!u.name&&!u.displayName&&(u.displayName=g)}})}return f}var Ls;Ls=Symbol.for("react.module.reference");function ks(u){return!!(typeof u=="string"||typeof u=="function"||u===n||u===o||Q||u===i||u===d||u===l||M||u===h||ce||x||q||typeof u=="object"&&u!==null&&(u.$$typeof===m||u.$$typeof===p||u.$$typeof===a||u.$$typeof===s||u.$$typeof===c||u.$$typeof===Ls||u.getModuleId!==void 0))}function oy(u,f){ks(u)||S("memo: The first argument must be a component. Instead received: %s",u===null?"null":typeof u);var y={$$typeof:p,type:u,compare:f===void 0?null:f};{var g;Object.defineProperty(y,"displayName",{enumerable:!1,configurable:!0,get:function(){return g},set:function(E){g=E,!u.name&&!u.displayName&&(u.displayName=E)}})}return y}function Ce(){var u=I.current;return u===null&&S(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
19
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
20
|
+
2. You might be breaking the Rules of Hooks
|
|
21
|
+
3. You might have more than one copy of React in the same app
|
|
22
|
+
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),u}function ay(u){var f=Ce();if(u._context!==void 0){var y=u._context;y.Consumer===u?S("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):y.Provider===u&&S("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return f.useContext(u)}function sy(u){var f=Ce();return f.useState(u)}function uy(u,f,y){var g=Ce();return g.useReducer(u,f,y)}function cy(u){var f=Ce();return f.useRef(u)}function ly(u,f){var y=Ce();return y.useEffect(u,f)}function fy(u,f){var y=Ce();return y.useInsertionEffect(u,f)}function dy(u,f){var y=Ce();return y.useLayoutEffect(u,f)}function py(u,f){var y=Ce();return y.useCallback(u,f)}function hy(u,f){var y=Ce();return y.useMemo(u,f)}function my(u,f,y){var g=Ce();return g.useImperativeHandle(u,f,y)}function yy(u,f){{var y=Ce();return y.useDebugValue(u,f)}}function gy(){var u=Ce();return u.useTransition()}function vy(u){var f=Ce();return f.useDeferredValue(u)}function _y(){var u=Ce();return u.useId()}function Ey(u,f,y){var g=Ce();return g.useSyncExternalStore(u,f,y)}var Sr=0,Ns,Ms,qs,js,$s,Gs,Bs;function Us(){}Us.__reactDisabledLog=!0;function by(){{if(Sr===0){Ns=console.log,Ms=console.info,qs=console.warn,js=console.error,$s=console.group,Gs=console.groupCollapsed,Bs=console.groupEnd;var u={configurable:!0,enumerable:!0,value:Us,writable:!0};Object.defineProperties(console,{info:u,log:u,warn:u,error:u,group:u,groupCollapsed:u,groupEnd:u})}Sr++}}function Sy(){{if(Sr--,Sr===0){var u={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:he({},u,{value:Ns}),info:he({},u,{value:Ms}),warn:he({},u,{value:qs}),error:he({},u,{value:js}),group:he({},u,{value:$s}),groupCollapsed:he({},u,{value:Gs}),groupEnd:he({},u,{value:Bs})})}Sr<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Xi=U.ReactCurrentDispatcher,Hi;function an(u,f,y){{if(Hi===void 0)try{throw Error()}catch(E){var g=E.stack.trim().match(/\n( *(at )?)/);Hi=g&&g[1]||""}return`
|
|
23
|
+
`+Hi+u}}var Wi=!1,sn;{var wy=typeof WeakMap=="function"?WeakMap:Map;sn=new wy}function Xs(u,f){if(!u||Wi)return"";{var y=sn.get(u);if(y!==void 0)return y}var g;Wi=!0;var E=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var O;O=Xi.current,Xi.current=null,by();try{if(f){var D=function(){throw Error()};if(Object.defineProperty(D.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(D,[])}catch(me){g=me}Reflect.construct(u,[],D)}else{try{D.call()}catch(me){g=me}u.call(D.prototype)}}else{try{throw Error()}catch(me){g=me}u()}}catch(me){if(me&&g&&typeof me.stack=="string"){for(var A=me.stack.split(`
|
|
24
|
+
`),B=g.stack.split(`
|
|
25
|
+
`),V=A.length-1,Z=B.length-1;V>=1&&Z>=0&&A[V]!==B[Z];)Z--;for(;V>=1&&Z>=0;V--,Z--)if(A[V]!==B[Z]){if(V!==1||Z!==1)do if(V--,Z--,Z<0||A[V]!==B[Z]){var ee=`
|
|
26
|
+
`+A[V].replace(" at new "," at ");return u.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",u.displayName)),typeof u=="function"&&sn.set(u,ee),ee}while(V>=1&&Z>=0);break}}}finally{Wi=!1,Xi.current=O,Sy(),Error.prepareStackTrace=E}var te=u?u.displayName||u.name:"",oe=te?an(te):"";return typeof u=="function"&&sn.set(u,oe),oe}function Dy(u,f,y){return Xs(u,!1)}function Cy(u){var f=u.prototype;return!!(f&&f.isReactComponent)}function un(u,f,y){if(u==null)return"";if(typeof u=="function")return Xs(u,Cy(u));if(typeof u=="string")return an(u);switch(u){case d:return an("Suspense");case l:return an("SuspenseList")}if(typeof u=="object")switch(u.$$typeof){case c:return Dy(u.render);case p:return un(u.type,f,y);case m:{var g=u,E=g._payload,O=g._init;try{return un(O(E),f,y)}catch{}}}return""}var Hs={},Ws=U.ReactDebugCurrentFrame;function cn(u){if(u){var f=u._owner,y=un(u.type,u._source,f?f.type:null);Ws.setExtraStackFrame(y)}else Ws.setExtraStackFrame(null)}function xy(u,f,y,g,E){{var O=Function.call.bind(Er);for(var D in u)if(O(u,D)){var A=void 0;try{if(typeof u[D]!="function"){var B=Error((g||"React class")+": "+y+" type `"+D+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof u[D]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw B.name="Invariant Violation",B}A=u[D](f,D,g,y,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(V){A=V}A&&!(A instanceof Error)&&(cn(E),S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",g||"React class",y,D,typeof A),cn(null)),A instanceof Error&&!(A.message in Hs)&&(Hs[A.message]=!0,cn(E),S("Failed %s type: %s",y,A.message),cn(null))}}}function Wt(u){if(u){var f=u._owner,y=un(u.type,u._source,f?f.type:null);$e(y)}else $e(null)}var Yi;Yi=!1;function Ys(){if(L.current){var u=yt(L.current.type);if(u)return`
|
|
27
|
+
|
|
28
|
+
Check the render method of \``+u+"`."}return""}function Ry(u){if(u!==void 0){var f=u.fileName.replace(/^.*[\\\/]/,""),y=u.lineNumber;return`
|
|
29
|
+
|
|
30
|
+
Check your code at `+f+":"+y+"."}return""}function Oy(u){return u!=null?Ry(u.__source):""}var Vs={};function Iy(u){var f=Ys();if(!f){var y=typeof u=="string"?u:u.displayName||u.name;y&&(f=`
|
|
31
|
+
|
|
32
|
+
Check the top-level render call using <`+y+">.")}return f}function zs(u,f){if(!(!u._store||u._store.validated||u.key!=null)){u._store.validated=!0;var y=Iy(f);if(!Vs[y]){Vs[y]=!0;var g="";u&&u._owner&&u._owner!==L.current&&(g=" It was passed a child from "+yt(u._owner.type)+"."),Wt(u),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',y,g),Wt(null)}}}function Js(u,f){if(typeof u=="object"){if(Je(u))for(var y=0;y<u.length;y++){var g=u[y];Ht(g)&&zs(g,f)}else if(Ht(u))u._store&&(u._store.validated=!0);else if(u){var E=w(u);if(typeof E=="function"&&E!==u.entries)for(var O=E.call(u),D;!(D=O.next()).done;)Ht(D.value)&&zs(D.value,f)}}}function Ks(u){{var f=u.type;if(f==null||typeof f=="string")return;var y;if(typeof f=="function")y=f.propTypes;else if(typeof f=="object"&&(f.$$typeof===c||f.$$typeof===p))y=f.propTypes;else return;if(y){var g=yt(f);xy(y,u.props,"prop",g,u)}else if(f.PropTypes!==void 0&&!Yi){Yi=!0;var E=yt(f);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",E||"Unknown")}typeof f.getDefaultProps=="function"&&!f.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Py(u){{for(var f=Object.keys(u.props),y=0;y<f.length;y++){var g=f[y];if(g!=="children"&&g!=="key"){Wt(u),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",g),Wt(null);break}}u.ref!==null&&(Wt(u),S("Invalid attribute `ref` supplied to `React.Fragment`."),Wt(null))}}function Qs(u,f,y){var g=ks(u);if(!g){var E="";(u===void 0||typeof u=="object"&&u!==null&&Object.keys(u).length===0)&&(E+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var O=Oy(f);O?E+=O:E+=Ys();var D;u===null?D="null":Je(u)?D="array":u!==void 0&&u.$$typeof===t?(D="<"+(yt(u.type)||"Unknown")+" />",E=" Did you accidentally export a JSX literal instead of a component?"):D=typeof u,S("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",D,E)}var A=Xm.apply(this,arguments);if(A==null)return A;if(g)for(var B=2;B<arguments.length;B++)Js(arguments[B],u);return u===n?Py(A):Ks(A),A}var Zs=!1;function Ty(u){var f=Qs.bind(null,u);return f.type=u,Zs||(Zs=!0,W("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(f,"type",{enumerable:!1,get:function(){return W("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:u}),u}}),f}function Ay(u,f,y){for(var g=Wm.apply(this,arguments),E=2;E<arguments.length;E++)Js(arguments[E],g.type);return Ks(g),g}function Fy(u,f){var y=F.transition;F.transition={};var g=F.transition;F.transition._updatedFibers=new Set;try{u()}finally{if(F.transition=y,y===null&&g._updatedFibers){var E=g._updatedFibers.size;E>10&&W("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),g._updatedFibers.clear()}}}var eu=!1,ln=null;function Ly(u){if(ln===null)try{var f=("require"+Math.random()).slice(0,7),y=zn&&zn[f];ln=y.call(zn,"timers").setImmediate}catch{ln=function(E){eu===!1&&(eu=!0,typeof MessageChannel>"u"&&S("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var O=new MessageChannel;O.port1.onmessage=E,O.port2.postMessage(void 0)}}return ln(u)}var Yt=0,tu=!1;function ky(u){{var f=Yt;Yt++,P.current===null&&(P.current=[]);var y=P.isBatchingLegacy,g;try{if(P.isBatchingLegacy=!0,g=u(),!y&&P.didScheduleLegacyUpdate){var E=P.current;E!==null&&(P.didScheduleLegacyUpdate=!1,Ji(E))}}catch(te){throw fn(f),te}finally{P.isBatchingLegacy=y}if(g!==null&&typeof g=="object"&&typeof g.then=="function"){var O=g,D=!1,A={then:function(te,oe){D=!0,O.then(function(me){fn(f),Yt===0?Vi(me,te,oe):te(me)},function(me){fn(f),oe(me)})}};return!tu&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){D||(tu=!0,S("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),A}else{var B=g;if(fn(f),Yt===0){var V=P.current;V!==null&&(Ji(V),P.current=null);var Z={then:function(te,oe){P.current===null?(P.current=[],Vi(B,te,oe)):te(B)}};return Z}else{var ee={then:function(te,oe){te(B)}};return ee}}}}function fn(u){u!==Yt-1&&S("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Yt=u}function Vi(u,f,y){{var g=P.current;if(g!==null)try{Ji(g),Ly(function(){g.length===0?(P.current=null,f(u)):Vi(u,f,y)})}catch(E){y(E)}else f(u)}}var zi=!1;function Ji(u){if(!zi){zi=!0;var f=0;try{for(;f<u.length;f++){var y=u[f];do y=y(!0);while(y!==null)}u.length=0}catch(g){throw u=u.slice(f+1),g}finally{zi=!1}}}var Ny=Qs,My=Ay,qy=Ty,jy={map:on,forEach:Km,count:Jm,toArray:Qm,only:Zm};G.Children=jy,G.Component=Xe,G.Fragment=n,G.Profiler=o,G.PureComponent=ht,G.StrictMode=i,G.Suspense=d,G.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U,G.cloneElement=My,G.createContext=ey,G.createElement=Ny,G.createFactory=qy,G.createRef=ze,G.forwardRef=iy,G.isValidElement=Ht,G.lazy=ny,G.memo=oy,G.startTransition=Fy,G.unstable_act=ky,G.useCallback=py,G.useContext=ay,G.useDebugValue=yy,G.useDeferredValue=vy,G.useEffect=ly,G.useId=_y,G.useImperativeHandle=my,G.useInsertionEffect=fy,G.useLayoutEffect=dy,G.useMemo=hy,G.useReducer=uy,G.useRef=cy,G.useState=sy,G.useSyncExternalStore=Ey,G.useTransition=gy,G.version=e,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()});var Ff=v((y1,$o)=>{"use strict";process.env.NODE_ENV==="production"?$o.exports=Tf():$o.exports=Af()});function ur(e=""){return d_?Go.default.resolve(Uo.default.sync(__dirname),"../../../",e):Go.default.resolve(Uo.default.sync(__dirname),"../griddo-components",e)}function p_(){let e=Bo.default.sync("jsconfig.json",{cwd:ur()});return Bo.default.sync("tsconfig.json",{cwd:ur()})||e}function h_(){let e=require(p_());return Object.keys(e?.compilerOptions?.paths).reduce((t,r)=>{let[n]=r.split("/"),[i]=e&&e.compilerOptions&&e.compilerOptions.paths&&e.compilerOptions.paths[r],[o]=i.split("/*"),a=ur(o);return{...t,[n]:a}},{"@griddo-instance":`${ur()}/src/index.js`})}var Go,Bo,Uo,d_,R1,Od=ou(()=>{"use strict";Go=T(require("node:path")),Bo=T(Io()),Uo=T(Gn()),d_=__dirname.includes("node_modules"),R1=h_()});var Ad={};au(Ad,{CXDir:()=>E_,default:()=>__});var st,Qn,Pd,Kn,m_,y_,g_,Id,v_,Td,__,E_,Fd=ou(()=>{"use strict";st=T(require("node:path")),Qn=T(Gn());Od();Pd=Qn.default.sync(st.default.resolve(__dirname,"../..")),Kn=Qn.default.sync(__dirname),m_=st.default.resolve(Qn.default.sync(__dirname)),y_=st.default.resolve(Kn,"caches"),g_=ur(),Id=st.default.join(Pd,"exports/sites"),{version:v_}=require(st.default.join(Kn,"package.json")),Td={proDomain:"pro-",griddoVersion:v_,CXDir:{EXPORTS:"__exports",CACHE:"__caches",CX:"__cx",SSG:"__ssg",COMPONENTS:"__components",ROOT:"__root",EXPORTS_DIST:"__exports_dist",CX_DIST:"__cx_dist"},paths:e=>({__caches:st.default.join(y_,e||""),__components:g_,__cx:Kn,__exports:st.default.join(Id,e||""),__root:Pd,__ssg:m_,__exports_dist:e?st.default.join(Id,e,"dist"):"",__cx_dist:st.default.join(Kn,"dist")})},__=Td,E_=Td.CXDir});var Ko=v((q1,Xd)=>{"use strict";Xd.exports=function(t,r){return function(){for(var i=new Array(arguments.length),o=0;o<i.length;o++)i[o]=arguments[o];return t.apply(r,i)}}});var Te=v((j1,Yd)=>{"use strict";var D_=Ko(),Lt=Object.prototype.toString;function ea(e){return Lt.call(e)==="[object Array]"}function Qo(e){return typeof e>"u"}function C_(e){return e!==null&&!Qo(e)&&e.constructor!==null&&!Qo(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function x_(e){return Lt.call(e)==="[object ArrayBuffer]"}function R_(e){return typeof FormData<"u"&&e instanceof FormData}function O_(e){var t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&e.buffer instanceof ArrayBuffer,t}function I_(e){return typeof e=="string"}function P_(e){return typeof e=="number"}function Hd(e){return e!==null&&typeof e=="object"}function ei(e){if(Lt.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function T_(e){return Lt.call(e)==="[object Date]"}function A_(e){return Lt.call(e)==="[object File]"}function F_(e){return Lt.call(e)==="[object Blob]"}function Wd(e){return Lt.call(e)==="[object Function]"}function L_(e){return Hd(e)&&Wd(e.pipe)}function k_(e){return typeof URLSearchParams<"u"&&e instanceof URLSearchParams}function N_(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function M_(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function ta(e,t){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),ea(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}function Zo(){var e={};function t(i,o){ei(e[o])&&ei(i)?e[o]=Zo(e[o],i):ei(i)?e[o]=Zo({},i):ea(i)?e[o]=i.slice():e[o]=i}for(var r=0,n=arguments.length;r<n;r++)ta(arguments[r],t);return e}function q_(e,t,r){return ta(t,function(i,o){r&&typeof i=="function"?e[o]=D_(i,r):e[o]=i}),e}function j_(e){return e.charCodeAt(0)===65279&&(e=e.slice(1)),e}Yd.exports={isArray:ea,isArrayBuffer:x_,isBuffer:C_,isFormData:R_,isArrayBufferView:O_,isString:I_,isNumber:P_,isObject:Hd,isPlainObject:ei,isUndefined:Qo,isDate:T_,isFile:A_,isBlob:F_,isFunction:Wd,isStream:L_,isURLSearchParams:k_,isStandardBrowserEnv:M_,forEach:ta,merge:Zo,extend:q_,trim:N_,stripBOM:j_}});var ti=v(($1,zd)=>{"use strict";var lr=Te();function Vd(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}zd.exports=function(t,r,n){if(!r)return t;var i;if(n)i=n(r);else if(lr.isURLSearchParams(r))i=r.toString();else{var o=[];lr.forEach(r,function(c,d){c===null||typeof c>"u"||(lr.isArray(c)?d=d+"[]":c=[c],lr.forEach(c,function(p){lr.isDate(p)?p=p.toISOString():lr.isObject(p)&&(p=JSON.stringify(p)),o.push(Vd(d)+"="+Vd(p))}))}),i=o.join("&")}if(i){var a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}});var Kd=v((G1,Jd)=>{"use strict";var $_=Te();function ri(){this.handlers=[]}ri.prototype.use=function(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};ri.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};ri.prototype.forEach=function(t){$_.forEach(this.handlers,function(n){n!==null&&t(n)})};Jd.exports=ri});var Zd=v((B1,Qd)=>{"use strict";var G_=Te();Qd.exports=function(t,r){G_.forEach(t,function(i,o){o!==r&&o.toUpperCase()===r.toUpperCase()&&(t[r]=i,delete t[o])})}});var ni=v((U1,ep)=>{"use strict";ep.exports=function(t,r,n,i,o){return t.config=r,n&&(t.code=n),t.request=i,t.response=o,t.isAxiosError=!0,t.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}},t}});var ii=v((X1,tp)=>{"use strict";var B_=ni();tp.exports=function(t,r,n,i,o){var a=new Error(t);return B_(a,r,n,i,o)}});var ra=v((H1,rp)=>{"use strict";var U_=ii();rp.exports=function(t,r,n){var i=n.config.validateStatus;!n.status||!i||i(n.status)?t(n):r(U_("Request failed with status code "+n.status,n.config,null,n.request,n))}});var ip=v((W1,np)=>{"use strict";var oi=Te();np.exports=oi.isStandardBrowserEnv()?function(){return{write:function(r,n,i,o,a,s){var c=[];c.push(r+"="+encodeURIComponent(n)),oi.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),oi.isString(o)&&c.push("path="+o),oi.isString(a)&&c.push("domain="+a),s===!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 ap=v((Y1,op)=>{"use strict";op.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}});var up=v((V1,sp)=>{"use strict";sp.exports=function(t,r){return r?t.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):t}});var na=v((z1,cp)=>{"use strict";var X_=ap(),H_=up();cp.exports=function(t,r){return t&&!X_(r)?H_(t,r):r}});var fp=v((J1,lp)=>{"use strict";var ia=Te(),W_=["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"];lp.exports=function(t){var r={},n,i,o;return t&&ia.forEach(t.split(`
|
|
33
|
+
`),function(s){if(o=s.indexOf(":"),n=ia.trim(s.substr(0,o)).toLowerCase(),i=ia.trim(s.substr(o+1)),n){if(r[n]&&W_.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 hp=v((K1,pp)=>{"use strict";var dp=Te();pp.exports=dp.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function i(o){var a=o;return t&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{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(a){var s=dp.isString(a)?i(a):a;return s.protocol===n.protocol&&s.host===n.host}}():function(){return function(){return!0}}()});var yp=v((Q1,mp)=>{"use strict";var ai=Te(),Y_=ra(),V_=ip(),z_=ti(),J_=na(),K_=fp(),Q_=hp(),oa=ii();mp.exports=function(t){return new Promise(function(n,i){var o=t.data,a=t.headers,s=t.responseType;ai.isFormData(o)&&delete a["Content-Type"];var c=new XMLHttpRequest;if(t.auth){var d=t.auth.username||"",l=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";a.Authorization="Basic "+btoa(d+":"+l)}var p=J_(t.baseURL,t.url);c.open(t.method.toUpperCase(),z_(p,t.params,t.paramsSerializer),!0),c.timeout=t.timeout;function m(){if(c){var _="getAllResponseHeaders"in c?K_(c.getAllResponseHeaders()):null,b=!s||s==="text"||s==="json"?c.responseText:c.response,w={data:b,status:c.status,statusText:c.statusText,headers:_,config:t,request:c};Y_(n,i,w),c=null}}if("onloadend"in c?c.onloadend=m:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(m)},c.onabort=function(){c&&(i(oa("Request aborted",t,"ECONNABORTED",c)),c=null)},c.onerror=function(){i(oa("Network Error",t,null,c)),c=null},c.ontimeout=function(){var b="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(b=t.timeoutErrorMessage),i(oa(b,t,t.transitional&&t.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},ai.isStandardBrowserEnv()){var h=(t.withCredentials||Q_(p))&&t.xsrfCookieName?V_.read(t.xsrfCookieName):void 0;h&&(a[t.xsrfHeaderName]=h)}"setRequestHeader"in c&&ai.forEach(a,function(b,w){typeof o>"u"&&w.toLowerCase()==="content-type"?delete a[w]:c.setRequestHeader(w,b)}),ai.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),s&&s!=="json"&&(c.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&c.addEventListener("progress",t.onDownloadProgress),typeof t.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(b){c&&(c.abort(),i(b),c=null)}),o||(o=null),c.send(o)})}});var vp=v((Z1,gp)=>{var fr=1e3,dr=fr*60,pr=dr*60,kt=pr*24,Z_=kt*7,eE=kt*365.25;gp.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return tE(e);if(r==="number"&&isFinite(e))return t.long?nE(e):rE(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function tE(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*eE;case"weeks":case"week":case"w":return r*Z_;case"days":case"day":case"d":return r*kt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*pr;case"minutes":case"minute":case"mins":case"min":case"m":return r*dr;case"seconds":case"second":case"secs":case"sec":case"s":return r*fr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function rE(e){var t=Math.abs(e);return t>=kt?Math.round(e/kt)+"d":t>=pr?Math.round(e/pr)+"h":t>=dr?Math.round(e/dr)+"m":t>=fr?Math.round(e/fr)+"s":e+"ms"}function nE(e){var t=Math.abs(e);return t>=kt?si(e,t,kt,"day"):t>=pr?si(e,t,pr,"hour"):t>=dr?si(e,t,dr,"minute"):t>=fr?si(e,t,fr,"second"):e+" ms"}function si(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}});var aa=v((eD,_p)=>{function iE(e){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=a,r.humanize=vp(),r.destroy=d,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let p=0;for(let m=0;m<l.length;m++)p=(p<<5)-p+l.charCodeAt(m),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=t;function r(l){let p,m=null,h,_;function b(...w){if(!b.enabled)return;let I=b,F=Number(new Date),P=F-(p||F);I.diff=P,I.prev=p,I.curr=F,p=F,w[0]=r.coerce(w[0]),typeof w[0]!="string"&&w.unshift("%O");let L=0;w[0]=w[0].replace(/%([a-zA-Z%])/g,(se,$e)=>{if(se==="%%")return"%";L++;let ce=r.formatters[$e];if(typeof ce=="function"){let x=w[L];se=ce.call(I,x),w.splice(L,1),L--}return se}),r.formatArgs.call(I,w),(I.log||r.log).apply(I,w)}return b.namespace=l,b.useColors=r.useColors(),b.color=r.selectColor(l),b.extend=n,b.destroy=r.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(h!==r.namespaces&&(h=r.namespaces,_=r.enabled(l)),_),set:w=>{m=w}}),typeof r.init=="function"&&r.init(b),b}function n(l,p){let m=r(this.namespace+(typeof p>"u"?":":p)+l);return m.log=this.log,m}function i(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let p,m=(typeof l=="string"?l:"").split(/[\s,]+/),h=m.length;for(p=0;p<h;p++)m[p]&&(l=m[p].replace(/\*/g,".*?"),l[0]==="-"?r.skips.push(new RegExp("^"+l.slice(1)+"$")):r.names.push(new RegExp("^"+l+"$")))}function o(){let l=[...r.names.map(s),...r.skips.map(s).map(p=>"-"+p)].join(",");return r.enable(""),l}function a(l){if(l[l.length-1]==="*")return!0;let p,m;for(p=0,m=r.skips.length;p<m;p++)if(r.skips[p].test(l))return!1;for(p=0,m=r.names.length;p<m;p++)if(r.names[p].test(l))return!0;return!1}function s(l){return l.toString().substring(2,l.toString().length-2).replace(/\.\*\?$/,"*")}function c(l){return l instanceof Error?l.stack||l.message:l}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}_p.exports=iE});var Ep=v((Be,ui)=>{Be.formatArgs=aE;Be.save=sE;Be.load=uE;Be.useColors=oE;Be.storage=cE();Be.destroy=(()=>{let e=!1;return()=>{e||(e=!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`."))}})();Be.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 oE(){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 aE(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+ui.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),e.splice(n,0,t)}Be.log=console.debug||console.log||(()=>{});function sE(e){try{e?Be.storage.setItem("debug",e):Be.storage.removeItem("debug")}catch{}}function uE(){let e;try{e=Be.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function cE(){try{return localStorage}catch{}}ui.exports=aa()(Be);var{formatters:lE}=ui.exports;lE.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Sp=v((tD,bp)=>{"use strict";bp.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}});var Cp=v((rD,Dp)=>{"use strict";var fE=require("os"),wp=require("tty"),Ye=Sp(),{env:fe}=process,Dt;Ye("no-color")||Ye("no-colors")||Ye("color=false")||Ye("color=never")?Dt=0:(Ye("color")||Ye("colors")||Ye("color=true")||Ye("color=always"))&&(Dt=1);"FORCE_COLOR"in fe&&(fe.FORCE_COLOR==="true"?Dt=1:fe.FORCE_COLOR==="false"?Dt=0:Dt=fe.FORCE_COLOR.length===0?1:Math.min(parseInt(fe.FORCE_COLOR,10),3));function sa(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function ua(e,t){if(Dt===0)return 0;if(Ye("color=16m")||Ye("color=full")||Ye("color=truecolor"))return 3;if(Ye("color=256"))return 2;if(e&&!t&&Dt===void 0)return 0;let r=Dt||0;if(fe.TERM==="dumb")return r;if(process.platform==="win32"){let n=fE.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in fe)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in fe)||fe.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in fe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(fe.TEAMCITY_VERSION)?1:0;if(fe.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in fe){let n=parseInt((fe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(fe.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(fe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(fe.TERM)||"COLORTERM"in fe?1:r}function dE(e){let t=ua(e,e&&e.isTTY);return sa(t)}Dp.exports={supportsColor:dE,stdout:sa(ua(!0,wp.isatty(1))),stderr:sa(ua(!0,wp.isatty(2)))}});var Rp=v((ge,li)=>{var pE=require("tty"),ci=require("util");ge.init=EE;ge.log=gE;ge.formatArgs=mE;ge.save=vE;ge.load=_E;ge.useColors=hE;ge.destroy=ci.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ge.colors=[6,2,3,4,5,1];try{let e=Cp();e&&(e.stderr||e).level>=2&&(ge.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{}ge.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(i,o)=>o.toUpperCase()),n=process.env[t];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),e[r]=n,e},{});function hE(){return"colors"in ge.inspectOpts?!!ge.inspectOpts.colors:pE.isatty(process.stderr.fd)}function mE(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${i};1m${t} \x1B[0m`;e[0]=o+e[0].split(`
|
|
19
34
|
`).join(`
|
|
20
|
-
`+
|
|
21
|
-
`)}function
|
|
22
|
-
`).map(e=>e.trim()).join(" ")};Kf.O=function(t){return this.inspectOpts.colors=this.useColors,$n.inspect(t,this.inspectOpts)}});var Zf=y((I_,ks)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?ks.exports=Yf():ks.exports=Qf()});var td=y((F_,ed)=>{var xr;ed.exports=function(){if(!xr){try{xr=Zf()("follow-redirects")}catch{}typeof xr!="function"&&(xr=function(){})}xr.apply(null,arguments)}});var $s=y((A_,Ls)=>{var xt=require("url"),Ms=xt.URL,Gy=require("http"),Hy=require("https"),id=require("stream").Writable,sd=require("assert"),od=td(),js=["abort","aborted","connect","error","socket","timeout"],Ns=Object.create(null);js.forEach(function(t){Ns[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}});var zy=Cr("ERR_INVALID_URL","Invalid URL",TypeError),rd=Cr("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Wy=Cr("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),Jy=Cr("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Vy=Cr("ERR_STREAM_WRITE_AFTER_END","write after end");function Re(t,e){id.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(id.prototype);Re.prototype.abort=function(){cd(this._currentRequest),this.emit("abort")};Re.prototype.write=function(t,e,r){if(this._ending)throw new Vy;if(!Et(t)&&!Qy(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Er(e)&&(r=e,e=null),t.length===0){r&&r();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,r)):(this.emit("error",new Jy),this.abort())};Re.prototype.end=function(t,e,r){if(Er(t)?(r=t,t=e=null):Er(e)&&(r=e,e=null),!t)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,i=this._currentRequest;this.write(t,e,function(){n._ended=!0,i.end(null,null,r)}),this._ending=!0}};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 js)n.on(i,Ns[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(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(cd(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects){this.emit("error",new Wy);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=[],qs(/^content-/i,this._options.headers));var o=qs(/^host$/i,this._options.headers),a=xt.parse(this._currentUrl),c=o||a.host,d=/^\w+:/.test(r)?this._currentUrl:xt.format(Object.assign(a,{host:c})),u;try{u=xt.resolve(d,r)}catch(b){this.emit("error",new rd({cause:b}));return}od("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&&!Ky(p.host,c))&&qs(/^(?:authorization|cookie)$/i,this._options.headers),Er(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 rd({cause:b}))}};function ad(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(Et(d)){var g;try{g=nd(new Ms(d))}catch{g=xt.parse(d)}if(!Et(g.protocol))throw new zy({input:d});d=g}else Ms&&d instanceof Ms?d=nd(d):(p=u,u=d,d={protocol:i});return Er(u)&&(p=u,u=null),u=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},d,u),u.nativeProtocols=r,!Et(u.host)&&!Et(u.hostname)&&(u.hostname="::1"),sd.equal(u.protocol,i,"protocol mismatch"),od("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 Yy(){}function nd(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 qs(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 Cr(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 cd(t){for(var e of js)t.removeListener(e,Ns[e]);t.on("error",Yy),t.abort()}function Ky(t,e){sd(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 Er(t){return typeof t=="function"}function Qy(t){return typeof t=="object"&&"length"in t}Ls.exports=ad({http:Gy,https:Hy});Ls.exports.wrap=ad});var Bs=y((R_,Zy)=>{Zy.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 pd=y((T_,hd)=>{"use strict";var Pr=we(),ud=Is(),ev=Fs(),tv=Rn(),rv=require("http"),nv=require("https"),iv=$s().http,sv=$s().https,ld=require("url"),ov=require("zlib"),av=Bs(),Un=Mn(),Us=kn(),fd=/https:?/;function dd(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,dd(s,e,s.href)}}hd.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/"+av.version,a&&!Pr.isStream(a)){if(!Buffer.isBuffer(a))if(Pr.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(Pr.isString(a))a=Buffer.from(a,"utf-8");else return o(Un("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=ev(e.baseURL,e.url),m=ld.parse(g),b=m.protocol||"http:";if(!d&&m.auth){var w=m.auth.split(":"),x=w[0]||"",F=w[1]||"";d=x+":"+F}d&&delete c.Authorization;var j=fd.test(b),B=j?e.httpsAgent:e.httpAgent,L={path:tv(m.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:c,agent:B,agents:{http:e.httpAgent,https:e.httpsAgent},auth:d};e.socketPath?L.socketPath=e.socketPath:(L.hostname=m.hostname,L.port=m.port);var V=e.proxy;if(!V&&V!==!1){var ce=b.slice(0,-1)+"_proxy",Te=process.env[ce]||process.env[ce.toUpperCase()];if(Te){var Z=ld.parse(Te),D=process.env.no_proxy||process.env.NO_PROXY,q=!0;if(D){var k=D.split(",").map(function(P){return P.trim()});q=!k.some(function(P){return P?P==="*"||P[0]==="."&&m.hostname.substr(m.hostname.length-P.length)===P?!0:m.hostname===P:!1})}if(q&&(V={host:Z.hostname,port:Z.port,protocol:Z.protocol},Z.auth)){var z=Z.auth.split(":");V.auth={username:z[0],password:z[1]}}}}V&&(L.headers.host=m.hostname+(m.port?":"+m.port:""),dd(L,V,b+"//"+m.hostname+(m.port?":"+m.port:"")+L.path));var I,G=j&&(V?fd.test(V.protocol):!0);e.transport?I=e.transport:e.maxRedirects===0?I=G?nv:rv:(e.maxRedirects&&(L.maxRedirects=e.maxRedirects),I=G?sv:iv),e.maxBodyLength>-1&&(L.maxBodyLength=e.maxBodyLength);var O=I.request(L,function(P){if(!O.aborted){var R=P,He=P.req||O;if(P.statusCode!==204&&He.method!=="HEAD"&&e.decompress!==!1)switch(P.headers["content-encoding"]){case"gzip":case"compress":case"deflate":R=R.pipe(ov.createUnzip()),delete P.headers["content-encoding"];break}var Ke={status:P.statusCode,statusText:P.statusMessage,headers:P.headers,config:e,request:He};if(e.responseType==="stream")Ke.data=R,ud(s,o,Ke);else{var ue=[],ge=0;R.on("data",function(Se){ue.push(Se),ge+=Se.length,e.maxContentLength>-1&&ge>e.maxContentLength&&(R.destroy(),o(Un("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,He)))}),R.on("error",function(Se){O.aborted||o(Us(Se,e,null,He))}),R.on("end",function(){var Se=Buffer.concat(ue);e.responseType!=="arraybuffer"&&(Se=Se.toString(e.responseEncoding),(!e.responseEncoding||e.responseEncoding==="utf8")&&(Se=Pr.stripBOM(Se))),Ke.data=Se,ud(s,o,Ke)})}}});if(O.on("error",function(P){O.aborted&&P.code!=="ERR_FR_TOO_MANY_REDIRECTS"||o(Us(P,e,null,O))}),e.timeout){var U=parseInt(e.timeout,10);if(isNaN(U)){o(Un("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",O));return}O.setTimeout(U,function(){O.abort(),o(Un("timeout of "+U+"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))}),Pr.isStream(a)?a.on("error",function(P){o(Us(P,e,null,O))}).pipe(O):O.end(a)})}});var Gn=y((k_,yd)=>{"use strict";var oe=we(),md=If(),cv=kn(),uv={"Content-Type":"application/x-www-form-urlencoded"};function gd(t,e){!oe.isUndefined(t)&&oe.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function lv(){var t;return typeof XMLHttpRequest<"u"?t=zf():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(t=pd()),t}function fv(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 Xn={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:lv(),transformRequest:[function(e,r){return md(r,"Accept"),md(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)?(gd(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):oe.isObject(e)||r&&r["Content-Type"]==="application/json"?(gd(r,"application/json"),fv(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"?cv(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}};Xn.headers={common:{Accept:"application/json, text/plain, */*"}};oe.forEach(["delete","get","head"],function(e){Xn.headers[e]={}});oe.forEach(["post","put","patch"],function(e){Xn.headers[e]=oe.merge(uv)});yd.exports=Xn});var bd=y((M_,vd)=>{"use strict";var dv=we(),hv=Gn();vd.exports=function(e,r,n){var i=this||hv;return dv.forEach(n,function(o){e=o.call(i,e,r)}),e}});var Xs=y((q_,_d)=>{"use strict";_d.exports=function(e){return!!(e&&e.__CANCEL__)}});var xd=y((j_,Sd)=>{"use strict";var wd=we(),Gs=bd(),pv=Xs(),mv=Gn();function Hs(t){t.cancelToken&&t.cancelToken.throwIfRequested()}Sd.exports=function(e){Hs(e),e.headers=e.headers||{},e.data=Gs.call(e,e.data,e.headers,e.transformRequest),e.headers=wd.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),wd.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var r=e.adapter||mv.adapter;return r(e).then(function(i){return Hs(e),i.data=Gs.call(e,i.data,i.headers,e.transformResponse),i},function(i){return pv(i)||(Hs(e),i&&i.response&&(i.response.data=Gs.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})}});var zs=y((N_,Ed)=>{"use strict";var pe=we();Ed.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 d(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,d),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,d),n}});var Id=y((L_,Od)=>{"use strict";var Pd=Bs(),Ws={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Ws[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var Cd={},gv=Pd.version.split(".");function Dd(t,e){for(var r=e?e.split("."):gv,n=t.split("."),i=0;i<3;i++){if(r[i]>n[i])return!0;if(r[i]<n[i])return!1}return!1}Ws.transitional=function(e,r,n){var i=r&&Dd(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&&!Cd[a]&&(Cd[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 yv(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)}}Od.exports={isOlderVersion:Dd,assertOptions:yv,validators:Ws}});var Md=y(($_,kd)=>{"use strict";var Rd=we(),vv=Rn(),Fd=Df(),Ad=xd(),Hn=zs(),Td=Id(),er=Td.validators;function Dr(t){this.defaults=t,this.interceptors={request:new Fd,response:new Fd}}Dr.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=Hn(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&&Td.assertOptions(r,{silentJSONParsing:er.transitional(er.boolean,"1.0.0"),forcedJSONParsing:er.transitional(er.boolean,"1.0.0"),clarifyTimeoutError:er.transitional(er.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=[Ad,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=Ad(c)}catch(p){return Promise.reject(p)}for(;s.length;)o=o.then(s.shift(),s.shift());return o};Dr.prototype.getUri=function(e){return e=Hn(this.defaults,e),vv(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};Rd.forEach(["delete","get","head","options"],function(e){Dr.prototype[e]=function(r,n){return this.request(Hn(n||{},{method:e,url:r,data:(n||{}).data}))}});Rd.forEach(["post","put","patch"],function(e){Dr.prototype[e]=function(r,n,i){return this.request(Hn(i||{},{method:e,url:r,data:n}))}});kd.exports=Dr});var Vs=y((B_,qd)=>{"use strict";function Js(t){this.message=t}Js.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};Js.prototype.__CANCEL__=!0;qd.exports=Js});var Nd=y((U_,jd)=>{"use strict";var bv=Vs();function zn(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 bv(i),e(r.reason))})}zn.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};zn.source=function(){var e,r=new zn(function(i){e=i});return{token:r,cancel:e}};jd.exports=zn});var $d=y((X_,Ld)=>{"use strict";Ld.exports=function(e){return function(n){return e.apply(null,n)}}});var Ud=y((G_,Bd)=>{"use strict";Bd.exports=function(e){return typeof e=="object"&&e.isAxiosError===!0}});var Hd=y((H_,Ys)=>{"use strict";var Xd=we(),_v=Es(),Wn=Md(),wv=zs(),Sv=Gn();function Gd(t){var e=new Wn(t),r=_v(Wn.prototype.request,e);return Xd.extend(r,Wn.prototype,e),Xd.extend(r,e),r}var Xe=Gd(Sv);Xe.Axios=Wn;Xe.create=function(e){return Gd(wv(Xe.defaults,e))};Xe.Cancel=Vs();Xe.CancelToken=Nd();Xe.isCancel=Xs();Xe.all=function(e){return Promise.all(e)};Xe.spread=$d();Xe.isAxiosError=Ud();Ys.exports=Xe;Ys.exports.default=Xe});var Ks=y((z_,zd)=>{zd.exports=Hd()});var Q=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 Rv(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=Rv;function Tv(t){for(var e="",r=0;r<t.length;r++){var n=t.charCodeAt(r);if(n===9||n===10||n===13||n>=32&&n<=55295||n>=57344&&n<=65533){e+=t[r];continue}if(r+1===t.length)return e+="\uFFFD",e;var i=t.charCodeAt(r+1);if(n>=55296&&n<=56319&&i>=56320&&i<=57343){e+=t[r]+t[r+1],r++;continue}e+="\uFFFD"}return e}Ie.fixChar=Tv;function kv(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=kv;function Mv(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=Mv;function qv(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=qv;function jv(t){return Object.prototype.toString.call(t)==="[object Undefined]"}Ie.isUndefined=jv});var rr=y(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.StringOptions=void 0;var Kn=Q(),Nv=function(){function t(e){this.doubleQuotes=!1,this.indent=" ",this.newline=`
|
|
23
|
-
`,this.pretty=!0,(0,Kn.isUndefined)(e.doubleQuotes)||(this.doubleQuotes=e.doubleQuotes),(0,Kn.isUndefined)(e.indent)||(this.indent=e.indent),(0,Kn.isUndefined)(e.newline)||(this.newline=e.newline),(0,Kn.isUndefined)(e.pretty)||(this.pretty=e.pretty)}return t}();Qn.StringOptions=Nv});var Zn=y(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.escapeDoubleQuotes=Me.escapeSingleQuotes=Me.escapeRightAngleBracketsInCdataTerminator=Me.escapeLeftAngleBrackets=Me.escapeAmpersands=void 0;function Lv(t){return t.replace(/&/g,"&")}Me.escapeAmpersands=Lv;function $v(t){return t.replace(/</g,"<")}Me.escapeLeftAngleBrackets=$v;function Bv(t){return t.replace(/]]>/g,"]]>")}Me.escapeRightAngleBracketsInCdataTerminator=Bv;function Uv(t){return t.replace(/'/g,"'")}Me.escapeSingleQuotes=Uv;function Xv(t){return t.replace(/"/g,""")}Me.escapeDoubleQuotes=Xv});var fo=y(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});var Gv=ae(),gh=Zn(),uo=Q(),Hv=function(){function t(e,r,n){this._validation=r,(0,uo.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,uo.fixChar)(e);else if(this._validation&&!(0,uo.validateChar)(e))throw new Error((0,Gv.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,gh.escapeAmpersands)(e),e=(0,gh.escapeLeftAngleBrackets)(e),e},t.prototype.up=function(){return this._parent},t}();lo.default=Hv});var ei=y(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});var yh=ae(),vh=Q(),zv=function(){function t(e,r,n){this._hex=!1,this._validation=r,this._parent=e,this.char=n.char,(0,vh.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,vh.validateSingleChar)(e))throw new Error((0,yh.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,yh.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}();ho.default=zv});var ti=y(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});var Wv=ae(),Jv=Q(),Vv=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,Jv.validateName)(e))throw new Error((0,Wv.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}();po.default=Vv});var ri=y(Ir=>{"use strict";var yo=Ir&&Ir.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ir,"__esModule",{value:!0});var mo=ae(),bh=Zn(),Yv=rr(),go=Q(),Kv=yo(fo()),Qv=yo(ei()),Zv=yo(ti()),e1=function(){function t(e,r,n){this._validation=r,(0,go.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,go.fixName)(e),e.length===0)throw new Error((0,mo.getContext)(this.up())+": attribute name should not be empty")}else if(this._validation&&!(0,go.validateName)(e))throw e.length===0?new Error((0,mo.getContext)(this.up())+": attribute name should not be empty"):new Error((0,mo.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 Qv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entityRef=function(e){var r=new Zv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.text=function(e){var r=new Kv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});for(var r=new Yv.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,bh.escapeDoubleQuotes)(a.toString()):i+=(0,bh.escapeSingleQuotes)(a.toString())}return i+=n,i},t.prototype.up=function(){return this._parent},t}();Ir.default=e1});var bo=y(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});var t1=ae(),r1=Q(),n1=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,r1.validateChar)(e))throw new Error((0,t1.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}();vo.default=n1});var wo=y(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});var i1=ae(),s1=Q(),o1=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,s1.validateChar)(e))throw new Error((0,i1.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}();_o.default=o1});var xo=y(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});var a1=ae(),c1=Q(),u1=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,c1.validateChar)(e))throw new Error((0,a1.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}();So.default=u1});var Co=y(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});var l1=ae(),f1=Q(),d1=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,f1.validateChar)(e))throw new Error((0,l1.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}();Eo.default=d1});var Do=y(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});var h1=ae(),p1=Q(),m1=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,p1.validateName)(e))throw new Error((0,h1.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}();Po.default=m1});var Fr=y(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});var ni=ae(),ii=Q(),g1=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,ii.isUndefined)(e)){if(this._validation&&!(0,ii.validateChar)(e))throw new Error((0,ni.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,ni.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,ii.validateName)(e))throw new Error((0,ni.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,ni.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,ii.isUndefined)(this._content)?"<?"+this._target+"?>":"<?"+this._target+" "+this._content+"?>"},t.prototype.up=function(){return this._parent},t}();Oo.default=g1});var si=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(),y1=rr(),Ye=Q(),v1=Dt(Ar()),b1=Dt(bo()),_1=Dt(wo()),w1=Dt(xo()),S1=Dt(Co()),x1=Dt(Do()),E1=Dt(Fr()),C1=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,Ye.isUndefined)(n.sysId)||(this.sysId=n.sysId),(0,Ye.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,Ye.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,Ye.isUndefined)(e)){if(this._validation&&!_h(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,Ye.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,Ye.isUndefined)(e)){if(this._validation&&!(0,Ye.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 b1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new v1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.element=function(e){var r=new _1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entity=function(e){var r=new w1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.notation=function(e){var r=new S1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.paramEntityRef=function(e){var r=new x1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new E1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});var r=new y1.StringOptions(e),n="<!DOCTYPE "+this._name;if((0,Ye.isUndefined)(this._pubId))(0,Ye.isUndefined)(this._sysId)||(n+=" ",n=this.appendId("SYSTEM",this._sysId,n,r));else{if((0,Ye.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=C1;function _h(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=_h});var Ao=y(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});var wh=ae(),Io=Q(),P1=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,wh.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,wh.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}();Fo.default=P1});var Mo=y(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});var D1=ae(),Ro=Zn(),To=Q(),O1=function(){function t(e,r,n){this._validation=r,(0,To.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,To.fixChar)(e);else if(this._validation&&!(0,To.validateChar)(e))throw new Error((0,D1.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,Ro.escapeAmpersands)(e),e=(0,Ro.escapeLeftAngleBrackets)(e),e=(0,Ro.escapeRightAngleBracketsInCdataTerminator)(e),e},t.prototype.up=function(){return this._parent},t}();ko.default=O1});var ui=y(kr=>{"use strict";var Ot=kr&&kr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(kr,"__esModule",{value:!0});var oi=ae(),I1=rr(),Rr=Q(),Sh=Ot(ri()),F1=Ot(Ao()),Tr=Ot(Mo()),ai=Ot(ei()),A1=Ot(Ar()),ci=Ot(ti()),R1=Ot(Fr()),T1=function(){function t(e,r,n){this._validation=r,(0,Rr.isUndefined)(n.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=n.replaceInvalidCharsInName,(0,Rr.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,Rr.fixName)(e),e.length===0)throw new Error((0,oi.getContext)(this.up())+": element name should not be empty")}else if(this._validation&&!(0,Rr.validateName)(e))throw e.length===0?new Error((0,oi.getContext)(this.up())+": element name should not be empty"):new Error((0,oi.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,oi.getContext)(this.up())+': element "'+this.name+'" already contains an attribute with the'+(' name "'+e.name+'"'));var r=new Sh.default(this,this._validation,e);return this._children.push(r),this._attributeNames.push(e.name),r},t.prototype.cdata=function(e){var r=new F1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.charData=function(e){var r=new Tr.default(this,this._validation,e);return this._children.push(r),r},t.prototype.charRef=function(e){var r=new ai.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new A1.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 ci.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new R1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){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 I1.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 Sh.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 Tr.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 ai.default||i instanceof ci.default||i instanceof Tr.default))return!1}return!0},t.prototype.onSameLine=function(e,r){return(e instanceof ai.default||e instanceof ci.default||e instanceof Tr.default)&&!(0,Rr.isUndefined)(r)&&(r instanceof ai.default||r instanceof ci.default||r instanceof Tr.default)},t}();kr.default=T1});var ae=y(nr=>{"use strict";var fi=nr&&nr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(nr,"__esModule",{value:!0});nr.getContext=void 0;var k1=fi(ri()),M1=fi(di()),q1=fi(si()),j1=fi(ui());function li(t){if(t instanceof k1.default)return li(t.up())+(' > attribute "'+t.name+'"');if(t instanceof M1.default)return"in XML document";if(t instanceof q1.default)return li(t.up())+" > DTD";if(t instanceof j1.default)return li(t.up())+(' > element "'+t.name+'"');throw new Error("Unrecognized object of type "+Object.prototype.toString.call(t))}nr.getContext=li});var Ar=y(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});var qo=ae(),jo=Q(),N1=function(){function t(e,r,n){this._validation=r,(0,jo.isUndefined)(n.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=n.replaceInvalidCharsInCharData,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._replaceInvalidCharsInCharData)e=(0,jo.fixChar)(e);else if(this._validation&&!(0,jo.validateChar)(e))throw new Error((0,qo.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,qo.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,qo.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}();No.default=N1});var Bo=y($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});var Lo=ae(),L1=rr(),Mr=Q(),$1=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,Mr.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,Mr.isUndefined)(e)&&!B1(e))throw new Error((0,Lo.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,Mr.isUndefined)(e)&&e!=="yes"&&e!=="no")throw new Error((0,Lo.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&&!U1(e))throw new Error((0,Lo.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 L1.StringOptions(e),n=r.doubleQuotes?'"':"'",i="<?xml version="+n+this._version+n;return(0,Mr.isUndefined)(this._encoding)||(i+=" encoding="+n+this._encoding+n),(0,Mr.isUndefined)(this._standalone)||(i+=" standalone="+n+this._standalone+n),i+="?>",i},t.prototype.up=function(){return this._parent},t}();$o.default=$1;function B1(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 U1(t){for(var e=0;e<=9;e++)if(t==="1."+e)return!0;return!1}});var di=y(jr=>{"use strict";var Nr=jr&&jr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(jr,"__esModule",{value:!0});var X1=rr(),G1=Q(),H1=Nr(Ar()),xh=Nr(Bo()),Eh=Nr(si()),qr=Nr(ui()),z1=Nr(Fr()),W1=function(){function t(e){this._children=[],this._validation=(0,G1.isUndefined)(e.validation)?!0:e.validation}return t.prototype.comment=function(e){var r=new H1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.decl=function(e){if(e===void 0&&(e={}),this._validation&&this._children.length!==0)throw new Error("in XML document: declaration must be the first child");var r=new xh.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 qr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: DTD must precede the root element");var n=new Eh.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 qr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: only one root element is permitted");var n=new qr.default(this,this._validation,e);return this._children.push(n),n},t.prototype.procInst=function(e){var r=new z1.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 qr.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 X1.StringOptions(e),i="",s=0,o=this._children;s<o.length;s++){var a=o[s];a instanceof xh.default||a instanceof Eh.default||a instanceof qr.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}();jr.default=W1});var Ch=y(T=>{"use strict";var re=T&&T.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(T,"__esModule",{value:!0});T.document=T.XmlProcInst=T.XmlEntityRef=T.XmlElement=T.XmlDtdParamEntityRef=T.XmlDtdNotation=T.XmlDtdEntity=T.XmlDtdElement=T.XmlDtdAttlist=T.XmlDtd=T.XmlDocument=T.XmlDecl=T.XmlComment=T.XmlCharRef=T.XmlCharData=T.XmlCdata=T.XmlAttributeText=T.XmlAttribute=void 0;var J1=re(di()),V1=ri();Object.defineProperty(T,"XmlAttribute",{enumerable:!0,get:function(){return re(V1).default}});var Y1=fo();Object.defineProperty(T,"XmlAttributeText",{enumerable:!0,get:function(){return re(Y1).default}});var K1=Ao();Object.defineProperty(T,"XmlCdata",{enumerable:!0,get:function(){return re(K1).default}});var Q1=Mo();Object.defineProperty(T,"XmlCharData",{enumerable:!0,get:function(){return re(Q1).default}});var Z1=ei();Object.defineProperty(T,"XmlCharRef",{enumerable:!0,get:function(){return re(Z1).default}});var eb=Ar();Object.defineProperty(T,"XmlComment",{enumerable:!0,get:function(){return re(eb).default}});var tb=Bo();Object.defineProperty(T,"XmlDecl",{enumerable:!0,get:function(){return re(tb).default}});var rb=di();Object.defineProperty(T,"XmlDocument",{enumerable:!0,get:function(){return re(rb).default}});var nb=si();Object.defineProperty(T,"XmlDtd",{enumerable:!0,get:function(){return re(nb).default}});var ib=bo();Object.defineProperty(T,"XmlDtdAttlist",{enumerable:!0,get:function(){return re(ib).default}});var sb=wo();Object.defineProperty(T,"XmlDtdElement",{enumerable:!0,get:function(){return re(sb).default}});var ob=xo();Object.defineProperty(T,"XmlDtdEntity",{enumerable:!0,get:function(){return re(ob).default}});var ab=Co();Object.defineProperty(T,"XmlDtdNotation",{enumerable:!0,get:function(){return re(ab).default}});var cb=Do();Object.defineProperty(T,"XmlDtdParamEntityRef",{enumerable:!0,get:function(){return re(cb).default}});var ub=ui();Object.defineProperty(T,"XmlElement",{enumerable:!0,get:function(){return re(ub).default}});var lb=ti();Object.defineProperty(T,"XmlEntityRef",{enumerable:!0,get:function(){return re(lb).default}});var fb=Fr();Object.defineProperty(T,"XmlProcInst",{enumerable:!0,get:function(){return re(fb).default}});function db(t){return t===void 0&&(t={}),new J1.default(t)}T.document=db});var Uo=y(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.stringify=ne.isMap=ne.isSet=ne.isFunction=ne.isArray=ne.isObject=ne.isNull=ne.isUndefined=void 0;function Ph(t){return Object.prototype.toString.call(t)==="[object Undefined]"}ne.isUndefined=Ph;function Dh(t){return Object.prototype.toString.call(t)==="[object Null]"}ne.isNull=Dh;function hb(t){return Object.prototype.toString.call(t)==="[object Object]"}ne.isObject=hb;function pb(t){return Object.prototype.toString.call(t)==="[object Array]"}ne.isArray=pb;function Oh(t){return Object.prototype.toString.call(t)==="[object Function]"}ne.isFunction=Oh;function mb(t){return Object.prototype.toString.call(t)==="[object Set]"}ne.isSet=mb;function gb(t){return Object.prototype.toString.call(t)==="[object Map]"}ne.isMap=gb;function yb(t){return!Ph(t)&&!Dh(t)&&Oh(t?.toString)&&(t=t.toString()),String(t)}ne.stringify=yb});var kh=y(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.WrapHandlers=Fe.TypeHandlers=Fe.FormatOptions=Fe.DtdOptions=Fe.DeclarationOptions=Fe.Options=void 0;var Ge=Uo(),vb=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,Ge.isUndefined)(e.validation)||(this.validation=e.validation),(0,Ge.isUndefined)(e.aliasString)||(this.aliasString=e.aliasString),(0,Ge.isUndefined)(e.attributeString)||(this.attributeString=e.attributeString),(0,Ge.isUndefined)(e.cdataInvalidChars)||(this.cdataInvalidChars=e.cdataInvalidChars),(0,Ge.isUndefined)(e.cdataKeys)||(this.cdataKeys=e.cdataKeys),this.declaration=new Ih(e.declaration),this.dtd=new Fh(this.validation,e.dtd),this.format=new Ah(e.format),(0,Ge.isUndefined)(e.replaceInvalidChars)||(this.replaceInvalidChars=e.replaceInvalidChars),this.typeHandlers=new Rh(e.typeHandlers),(0,Ge.isUndefined)(e.useSelfClosingTagIfEmpty)||(this.useSelfClosingTagIfEmpty=e.useSelfClosingTagIfEmpty),(0,Ge.isUndefined)(e.valueString)||(this.valueString=e.valueString),this.wrapHandlers=new Th(e.wrapHandlers)}return t}();Fe.Options=vb;var Ih=function(){function t(e){e===void 0&&(e={}),this.include=!0,(0,Ge.isUndefined)(e.include)||(this.include=e.include),this.encoding=e.encoding,this.standalone=e.standalone,this.version=e.version}return t}();Fe.DeclarationOptions=Ih;var Fh=function(){function t(e,r){if(r===void 0&&(r={}),this.include=!1,(0,Ge.isUndefined)(r.include)||(this.include=r.include),e&&(0,Ge.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}();Fe.DtdOptions=Fh;var Ah=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}();Fe.FormatOptions=Ah;var Rh=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}();Fe.TypeHandlers=Rh;var Th=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}();Fe.WrapHandlers=Th});var $h=y(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.parse=ht.parseToExistingElement=ht.Absent=void 0;var qh=Ch(),jh=kh(),Y=Uo(),Xo=function(){function t(){}return Object.defineProperty(t,"instance",{get:function(){return t._instance},enumerable:!1,configurable:!0}),t._instance=new t,t}();ht.Absent=Xo;function Go(t,e){var r=Object.prototype.toString.call(t),n;return Object.prototype.hasOwnProperty.call(e.typeHandlers,"*")&&(n=e.typeHandlers["*"]),Object.prototype.hasOwnProperty.call(e.typeHandlers,r)&&(n=e.typeHandlers[r]),n}function Nh(t,e,r){var n=function(o){return r.cdataInvalidChars&&(o.indexOf("<")!==-1||o.indexOf("&")!==-1)||r.cdataKeys.indexOf(e.name)!==-1||r.cdataKeys.indexOf("*")!==-1};if(e instanceof qh.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 bb(t,e,r,n){var i=r.attribute({name:t,replaceInvalidCharsInName:n.replaceInvalidChars});Nh((0,Y.stringify)(e),i,n)}function Mh(t,e,r,n){if(t===n.aliasString){r.name=(0,Y.stringify)(e);return}if(t.indexOf(n.attributeString)===0&&(0,Y.isObject)(e)){for(var i=0,s=Object.keys(e);i<s.length;i++){var o=s[i];bb(o,(0,Y.stringify)(e[o]),r,n)}return}if(t.indexOf(n.valueString)===0){hi(t,(0,Y.stringify)(e),r,n);return}var a=r;if(!(0,Y.isArray)(e)&&!(0,Y.isSet)(e)){var c=Go(e,n);if(!(0,Y.isUndefined)(c)&&c(e)===Xo.instance)return;a=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}hi(t,e,a,n)}function _b(t,e,r){if((0,Y.isMap)(t))t.forEach(function(o,a){Mh((0,Y.stringify)(a),o,e,r)});else for(var n=0,i=Object.keys(t);n<i.length;n++){var s=i[n];Mh(s,t[s],e,r)}}function wb(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,Y.isUndefined)(i)){var a=i(s,e);(0,Y.isNull)(a)||(s=a,o=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty}))}e.forEach(function(c){var d=o;if(!(0,Y.isArray)(c)&&!(0,Y.isSet)(c)){var u=Go(c,n);if(!(0,Y.isUndefined)(u)&&u(c)===Xo.instance)return;d=o.element({name:s,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}hi(s,c,d,n)})}function hi(t,e,r,n){var i=Go(e,n);if((0,Y.isUndefined)(i)||(e=i(e)),(0,Y.isObject)(e)||(0,Y.isMap)(e)){_b(e,r,n);return}if((0,Y.isArray)(e)||(0,Y.isSet)(e)){wb(t,e,r,n);return}Nh((0,Y.stringify)(e),r,n)}function Lh(t,e,r){var n=new jh.Options(r);hi(t.name,e,t,n)}ht.parseToExistingElement=Lh;function Sb(t,e,r){var n=new jh.Options(r),i=new qh.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 Lh(s,e,r),i.toString(n.format)}ht.parse=Sb});var kb={};Jo(kb,{startRender:()=>Tb});module.exports=Yo(kb);var $r=A(require("node:fs")),sr=A(require("node:path"));var df=require("node:child_process"),et=A(require("node:path")),hf=A(nt()),Ue=A(yt());var Vt=A(require("node:fs")),rf=A(require("node:path")),bt=A(dn()),nf=A(nt()),Fn=A(yt()),sf=A(xl()),of=A(xn());var Le=A(require("node:fs")),ze=A(require("node:path")),_e=A(yt());var Ze=A(require("node:fs")),De=A(require("node:path")),En=A(yt());var zt=te();function*Rg(t){let{basePath:e,withSizeProp:r}=t||{},{__cx:n}=zt.paths(),i=e||De.default.join(n,"store"),s=Hl(i).filter(o=>De.default.extname(o)===".json");for(let o of s)try{let a=En.default.readJsonSync(o,{encoding:"utf-8"});if(r){let c=Ze.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 ls(){let{__cx:t}=zt.paths(),{sitesToPublish:e,createdPages:r,buildProcessData:n}=En.default.readJSONSync(De.default.join(t,"store","metadata","render-info.json"));return{buildProcessData:n,createdPages:r,sitesToPublish:e}}function Bl(){let{__cx:t}=zt.paths(),e=De.default.join(t,"store");Ze.default.existsSync(e)||(Ze.default.mkdirSync(e),Ze.default.mkdirSync(De.default.join(e,"metadata"))),console.info("Store initialized")}function Ul(t,e){let{__cx:r}=zt.paths();Ze.default.writeFileSync(De.default.join(r,"store","metadata","render-info.json"),JSON.stringify(e))}function Tg(t,e){return fs(t).filter(i=>e.includes(i))}function fs(t){return Ze.default.readdirSync(t).filter(r=>{let n=`${t}/${r}`,i=Ze.default.statSync(n);if(i&&i.isDirectory()||De.default.extname(r)!==".json")return!1;let s=De.default.basename(r,De.default.extname(r));return!isNaN(parseInt(s))}).map(r=>{let n=De.default.basename(r,De.default.extname(r));return parseInt(n)})}function Xl(t){let{__cx:e}=zt.paths();t.forEach(r=>{ds(r,["editorID","parentEditorID"]);let n=`${r.context.page.id}.json`,i=De.default.join(e,"store",n);En.default.writeJSONSync(i,r)})}function Cn(t){let{__cx:e}=zt.paths();t.length!==0&&t.forEach(r=>{let n=De.default.join(e,"store",`${r}.json`);try{Ze.default.unlinkSync(n)}catch(i){console.log(`Error removing file ${r}`,i.message)}})}async function Gl(t,e){let{changedPages:r,pages:n,validPagesIds:i,sitesToPublish:s}=e,o=Tg(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=Rg(),g=[];for await(let m of p){let b=m.context.page.site,w=m.context.page.id;s.map(x=>x.id).includes(b)||g.push(w)}return{pagesInStore:o,pagesMissingInStore:a,pagesToDeleteFromStore:[...d,...g],pagesToWriteToStore:u}}var kg=te(),hs=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);hs(a)}),r=_e.default.readdirSync(t)}if(r.length===0){_e.default.rmdirSync(t);return}};function Pn(t,e){for(let r of t)Le.default.existsSync(r)||Le.default.mkdirSync(r,{recursive:!0,...e})}function Dn(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&&Jl(a);try{_e.default.existsSync(a)&&Le.default.rmSync(a,{recursive:!0,force:!0}),Le.default.cpSync(o,a,{recursive:!0,preserveTimestamps:!0}),i&&Wl(a)}catch{console.log("Copy failed!"),i&&(zl(a),console.log("Backup has been restored."))}}}function Wt(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&&Jl(c);try{i&&_e.default.existsSync(c)&&Le.default.rmSync(c,{recursive:!0,force:!0}),Le.default.renameSync(a,c),s&&Wl(c)}catch{console.log("Move failed!"),s&&(zl(c),console.log("Backup has been restored."))}}}}function Sr(t,e){for(let r of e){if(!r)continue;let n=ze.default.join(t,r);_e.default.existsSync(n)&&Le.default.rmSync(n,{recursive:!0,force:!0})}}function zl(t,e="-BACKUP"){let r=t+e;try{Le.default.renameSync(r,t),console.log(`Backup ${r} has been restored`)}catch{console.log(`Error while delete ${r} backup`)}}function Wl(t,e="-BACKUP"){let r=t+e;if(_e.default.existsSync(r))try{Le.default.rmSync(r,{recursive:!0,force:!0}),console.log(`Backup ${r} has been deleted`)}catch{console.log(`Error while delete ${r} backup`)}}function Jl(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{Le.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 Mg(t){return Number.isInteger(t)&&t<0}async function Vl(){let{__cx:t}=kg.paths(),e=ze.default.join(t,"store");try{let r=fs(e).filter(Mg);Cn(r)}catch{console.info("`store` folder does not exist. Skipping multipage or static list template cleaning.")}}nf.default.config();var af=te(),Hg=cf(process.env.GRIDDO_DEBUG_LOGS),zg=cf(process.env.GRIDDO_BUILD_LOGS),s_=of.default.sync(),Je={clean:JSON.parse(process.env.GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS||"1"),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||"2"),relocation:JSON.parse(process.env.GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS||"1"),meta:JSON.parse(process.env.GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS||"4"),archive:JSON.parse(process.env.GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS||"1")};function te(){try{return(tf(),Yo(ef)).default}catch{console.log("Error while reading configuration file"),process.exit(1)}}function $(t){Hg&&console.log(bt.default.hex("#ffff33")("verbose"),bt.default.gray(t.replace(/(\s)\s+/g,"$1").trim()))}function cf(t){if(typeof t=="boolean")return t;if(t==null)return!1;if(t.toLowerCase()==="true")return!0;if(t.toLowerCase()==="false")return!1;if(t.toLowerCase()==="on")return!0;if(t.toLowerCase()==="off")return!1;let e=parseInt(t,10);return isNaN(e)?!1:e>0}function Hl(t){let e=[];return Vt.default.readdirSync(t).forEach(n=>{let i=`${t}/${n}`;e.push(i)}),e}function $e(t,e="",r=1,n=1){let i=t.split(`
|
|
24
|
-
`).map(
|
|
25
|
-
`.repeat(n),
|
|
26
|
-
`,
|
|
27
|
-
`}).join("");console.log(`${p}${d}${
|
|
35
|
+
`+o),e.push(i+"m+"+li.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=yE()+t+" "+e[0]}function yE(){return ge.inspectOpts.hideDate?"":new Date().toISOString()+" "}function gE(...e){return process.stderr.write(ci.format(...e)+`
|
|
36
|
+
`)}function vE(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function _E(){return process.env.DEBUG}function EE(e){e.inspectOpts={};let t=Object.keys(ge.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=ge.inspectOpts[t[r]]}li.exports=aa()(ge);var{formatters:xp}=li.exports;xp.o=function(e){return this.inspectOpts.colors=this.useColors,ci.inspect(e,this.inspectOpts).split(`
|
|
37
|
+
`).map(t=>t.trim()).join(" ")};xp.O=function(e){return this.inspectOpts.colors=this.useColors,ci.inspect(e,this.inspectOpts)}});var Op=v((nD,ca)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?ca.exports=Ep():ca.exports=Rp()});var Pp=v((iD,Ip)=>{var qr;Ip.exports=function(){if(!qr){try{qr=Op()("follow-redirects")}catch{}typeof qr!="function"&&(qr=function(){})}qr.apply(null,arguments)}});var ma=v((oD,ha)=>{var Nt=require("url"),la=Nt.URL,bE=require("http"),SE=require("https"),Fp=require("stream").Writable,Lp=require("assert"),kp=Pp(),da=["abort","aborted","connect","error","socket","timeout"],pa=Object.create(null);da.forEach(function(e){pa[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}});var wE=$r("ERR_INVALID_URL","Invalid URL",TypeError),Tp=$r("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),DE=$r("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),CE=$r("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),xE=$r("ERR_STREAM_WRITE_AFTER_END","write after end");function Ue(e,t){Fp.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(n){r._processResponse(n)},this._performRequest()}Ue.prototype=Object.create(Fp.prototype);Ue.prototype.abort=function(){Mp(this._currentRequest),this.emit("abort")};Ue.prototype.write=function(e,t,r){if(this._ending)throw new xE;if(!Mt(e)&&!IE(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(jr(t)&&(r=t,t=null),e.length===0){r&&r();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new CE),this.abort())};Ue.prototype.end=function(e,t,r){if(jr(e)?(r=e,e=t=null):jr(t)&&(r=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,i=this._currentRequest;this.write(e,t,function(){n._ended=!0,i.end(null,null,r)}),this._ending=!0}};Ue.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};Ue.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};Ue.prototype.setTimeout=function(e,t){var r=this;function n(a){a.setTimeout(e),a.removeListener("timeout",a.destroy),a.addListener("timeout",a.destroy)}function i(a){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),o()},e),n(a)}function o(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",o),r.removeListener("error",o),r.removeListener("response",o),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",n),this.on("abort",o),this.on("error",o),this.on("response",o),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){Ue.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(Ue.prototype,e,{get:function(){return this._currentRequest[e]}})});Ue.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};Ue.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t){this.emit("error",new TypeError("Unsupported protocol "+e));return}if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var i of da)n.on(i,pa[i]);if(this._currentUrl=/^\//.test(this._options.path)?Nt.format(this._options):this._options.path,this._isRedirect){var o=0,a=this,s=this._requestBodyBuffers;(function c(d){if(n===a._currentRequest)if(d)a.emit("error",d);else if(o<s.length){var l=s[o++];n.finished||n.write(l.data,l.encoding,c)}else a._ended&&n.end()})()}};Ue.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(Mp(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects){this.emit("error",new DE);return}var n,i=this._options.beforeRedirect;i&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var o=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],fa(/^content-/i,this._options.headers));var a=fa(/^host$/i,this._options.headers),s=Nt.parse(this._currentUrl),c=a||s.host,d=/^\w+:/.test(r)?this._currentUrl:Nt.format(Object.assign(s,{host:c})),l;try{l=Nt.resolve(d,r)}catch(_){this.emit("error",new Tp({cause:_}));return}kp("redirecting to",l),this._isRedirect=!0;var p=Nt.parse(l);if(Object.assign(this._options,p),(p.protocol!==s.protocol&&p.protocol!=="https:"||p.host!==c&&!OE(p.host,c))&&fa(/^(?:authorization|cookie)$/i,this._options.headers),jr(i)){var m={headers:e.headers,statusCode:t},h={url:d,method:o,headers:n};try{i(this._options,m,h)}catch(_){this.emit("error",_);return}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(_){this.emit("error",new Tp({cause:_}))}};function Np(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach(function(n){var i=n+":",o=r[i]=e[n],a=t[n]=Object.create(o);function s(d,l,p){if(Mt(d)){var m;try{m=Ap(new la(d))}catch{m=Nt.parse(d)}if(!Mt(m.protocol))throw new wE({input:d});d=m}else la&&d instanceof la?d=Ap(d):(p=l,l=d,d={protocol:i});return jr(l)&&(p=l,l=null),l=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},d,l),l.nativeProtocols=r,!Mt(l.host)&&!Mt(l.hostname)&&(l.hostname="::1"),Lp.equal(l.protocol,i,"protocol mismatch"),kp("options",l),new Ue(l,p)}function c(d,l,p){var m=a.request(d,l,p);return m.end(),m}Object.defineProperties(a,{request:{value:s,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),t}function RE(){}function Ap(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};return e.port!==""&&(t.port=Number(e.port)),t}function fa(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function $r(e,t,r){function n(i){Error.captureStackTrace(this,this.constructor),Object.assign(this,i||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),n.prototype.constructor=n,n.prototype.name="Error ["+e+"]",n}function Mp(e){for(var t of da)e.removeListener(t,pa[t]);e.on("error",RE),e.abort()}function OE(e,t){Lp(Mt(e)&&Mt(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}function Mt(e){return typeof e=="string"||e instanceof String}function jr(e){return typeof e=="function"}function IE(e){return typeof e=="object"&&"length"in e}ha.exports=Np({http:bE,https:SE});ha.exports.wrap=Np});var ya=v((aD,PE)=>{PE.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 Up=v((sD,Bp)=>{"use strict";var Gr=Te(),qp=ra(),TE=na(),AE=ti(),FE=require("http"),LE=require("https"),kE=ma().http,NE=ma().https,jp=require("url"),ME=require("zlib"),qE=ya(),fi=ii(),ga=ni(),$p=/https:?/;function Gp(e,t,r){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=r,t.auth){var n=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+n}e.beforeRedirect=function(o){o.headers.host=o.host,Gp(o,t,o.href)}}Bp.exports=function(t){return new Promise(function(n,i){var o=function(R){n(R)},a=function(R){i(R)},s=t.data,c=t.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/"+qE.version,s&&!Gr.isStream(s)){if(!Buffer.isBuffer(s))if(Gr.isArrayBuffer(s))s=Buffer.from(new Uint8Array(s));else if(Gr.isString(s))s=Buffer.from(s,"utf-8");else return a(fi("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",t));c["Content-Length"]=s.length}var d=void 0;if(t.auth){var l=t.auth.username||"",p=t.auth.password||"";d=l+":"+p}var m=TE(t.baseURL,t.url),h=jp.parse(m),_=h.protocol||"http:";if(!d&&h.auth){var b=h.auth.split(":"),w=b[0]||"",I=b[1]||"";d=w+":"+I}d&&delete c.Authorization;var F=$p.test(_),P=F?t.httpsAgent:t.httpAgent,L={path:AE(h.path,t.params,t.paramsSerializer).replace(/^\?/,""),method:t.method.toUpperCase(),headers:c,agent:P,agents:{http:t.httpAgent,https:t.httpsAgent},auth:d};t.socketPath?L.socketPath=t.socketPath:(L.hostname=h.hostname,L.port=h.port);var K=t.proxy;if(!K&&K!==!1){var se=_.slice(0,-1)+"_proxy",$e=process.env[se]||process.env[se.toUpperCase()];if($e){var ce=jp.parse($e),x=process.env.no_proxy||process.env.NO_PROXY,q=!0;if(x){var M=x.split(",").map(function(R){return R.trim()});q=!M.some(function(R){return R?R==="*"||R[0]==="."&&h.hostname.substr(h.hostname.length-R.length)===R?!0:h.hostname===R:!1})}if(q&&(K={host:ce.hostname,port:ce.port,protocol:ce.protocol},ce.auth)){var Q=ce.auth.split(":");K.auth={username:Q[0],password:Q[1]}}}}K&&(L.headers.host=h.hostname+(h.port?":"+h.port:""),Gp(L,K,_+"//"+h.hostname+(h.port?":"+h.port:"")+L.path));var U,W=F&&(K?$p.test(K.protocol):!0);t.transport?U=t.transport:t.maxRedirects===0?U=W?LE:FE:(t.maxRedirects&&(L.maxRedirects=t.maxRedirects),U=W?NE:kE),t.maxBodyLength>-1&&(L.maxBodyLength=t.maxBodyLength);var S=U.request(L,function(R){if(!S.aborted){var j=R,he=R.req||S;if(R.statusCode!==204&&he.method!=="HEAD"&&t.decompress!==!1)switch(R.headers["content-encoding"]){case"gzip":case"compress":case"deflate":j=j.pipe(ME.createUnzip()),delete R.headers["content-encoding"];break}var it={status:R.statusCode,statusText:R.statusMessage,headers:R.headers,config:t,request:he};if(t.responseType==="stream")it.data=j,qp(o,a,it);else{var Xe=[],ct=0;j.on("data",function(Ee){Xe.push(Ee),ct+=Ee.length,t.maxContentLength>-1&&ct>t.maxContentLength&&(j.destroy(),a(fi("maxContentLength size of "+t.maxContentLength+" exceeded",t,null,he)))}),j.on("error",function(Ee){S.aborted||a(ga(Ee,t,null,he))}),j.on("end",function(){var Ee=Buffer.concat(Xe);t.responseType!=="arraybuffer"&&(Ee=Ee.toString(t.responseEncoding),(!t.responseEncoding||t.responseEncoding==="utf8")&&(Ee=Gr.stripBOM(Ee))),it.data=Ee,qp(o,a,it)})}}});if(S.on("error",function(R){S.aborted&&R.code!=="ERR_FR_TOO_MANY_REDIRECTS"||a(ga(R,t,null,S))}),t.timeout){var H=parseInt(t.timeout,10);if(isNaN(H)){a(fi("error trying to parse `config.timeout` to int",t,"ERR_PARSE_TIMEOUT",S));return}S.setTimeout(H,function(){S.abort(),a(fi("timeout of "+H+"ms exceeded",t,t.transitional&&t.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",S))})}t.cancelToken&&t.cancelToken.promise.then(function(R){S.aborted||(S.abort(),a(R))}),Gr.isStream(s)?s.on("error",function(R){a(ga(R,t,null,S))}).pipe(S):S.end(s)})}});var pi=v((uD,Wp)=>{"use strict";var ve=Te(),Xp=Zd(),jE=ni(),$E={"Content-Type":"application/x-www-form-urlencoded"};function Hp(e,t){!ve.isUndefined(e)&&ve.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function GE(){var e;return typeof XMLHttpRequest<"u"?e=yp():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(e=Up()),e}function BE(e,t,r){if(ve.isString(e))try{return(t||JSON.parse)(e),ve.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var di={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:GE(),transformRequest:[function(t,r){return Xp(r,"Accept"),Xp(r,"Content-Type"),ve.isFormData(t)||ve.isArrayBuffer(t)||ve.isBuffer(t)||ve.isStream(t)||ve.isFile(t)||ve.isBlob(t)?t:ve.isArrayBufferView(t)?t.buffer:ve.isURLSearchParams(t)?(Hp(r,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):ve.isObject(t)||r&&r["Content-Type"]==="application/json"?(Hp(r,"application/json"),BE(t)):t}],transformResponse:[function(t){var r=this.transitional,n=r&&r.silentJSONParsing,i=r&&r.forcedJSONParsing,o=!n&&this.responseType==="json";if(o||i&&ve.isString(t)&&t.length)try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?jE(a,this,"E_JSON_PARSE"):a}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300}};di.headers={common:{Accept:"application/json, text/plain, */*"}};ve.forEach(["delete","get","head"],function(t){di.headers[t]={}});ve.forEach(["post","put","patch"],function(t){di.headers[t]=ve.merge($E)});Wp.exports=di});var Vp=v((cD,Yp)=>{"use strict";var UE=Te(),XE=pi();Yp.exports=function(t,r,n){var i=this||XE;return UE.forEach(n,function(a){t=a.call(i,t,r)}),t}});var va=v((lD,zp)=>{"use strict";zp.exports=function(t){return!!(t&&t.__CANCEL__)}});var Qp=v((fD,Kp)=>{"use strict";var Jp=Te(),_a=Vp(),HE=va(),WE=pi();function Ea(e){e.cancelToken&&e.cancelToken.throwIfRequested()}Kp.exports=function(t){Ea(t),t.headers=t.headers||{},t.data=_a.call(t,t.data,t.headers,t.transformRequest),t.headers=Jp.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),Jp.forEach(["delete","get","head","post","put","patch","common"],function(i){delete t.headers[i]});var r=t.adapter||WE.adapter;return r(t).then(function(i){return Ea(t),i.data=_a.call(t,i.data,i.headers,t.transformResponse),i},function(i){return HE(i)||(Ea(t),i&&i.response&&(i.response.data=_a.call(t,i.response.data,i.response.headers,t.transformResponse))),Promise.reject(i)})}});var ba=v((dD,Zp)=>{"use strict";var De=Te();Zp.exports=function(t,r){r=r||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function c(m,h){return De.isPlainObject(m)&&De.isPlainObject(h)?De.merge(m,h):De.isPlainObject(h)?De.merge({},h):De.isArray(h)?h.slice():h}function d(m){De.isUndefined(r[m])?De.isUndefined(t[m])||(n[m]=c(void 0,t[m])):n[m]=c(t[m],r[m])}De.forEach(i,function(h){De.isUndefined(r[h])||(n[h]=c(void 0,r[h]))}),De.forEach(o,d),De.forEach(a,function(h){De.isUndefined(r[h])?De.isUndefined(t[h])||(n[h]=c(void 0,t[h])):n[h]=c(void 0,r[h])}),De.forEach(s,function(h){h in r?n[h]=c(t[h],r[h]):h in t&&(n[h]=c(void 0,t[h]))});var l=i.concat(o).concat(a).concat(s),p=Object.keys(t).concat(Object.keys(r)).filter(function(h){return l.indexOf(h)===-1});return De.forEach(p,d),n}});var ih=v((pD,nh)=>{"use strict";var th=ya(),Sa={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){Sa[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var eh={},YE=th.version.split(".");function rh(e,t){for(var r=t?t.split("."):YE,n=e.split("."),i=0;i<3;i++){if(r[i]>n[i])return!0;if(r[i]<n[i])return!1}return!1}Sa.transitional=function(t,r,n){var i=r&&rh(r);function o(a,s){return"[Axios v"+th.version+"] Transitional option '"+a+"'"+s+(n?". "+n:"")}return function(a,s,c){if(t===!1)throw new Error(o(s," has been removed in "+r));return i&&!eh[s]&&(eh[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,s,c):!0}};function VE(e,t,r){if(typeof e!="object")throw new TypeError("options must be an object");for(var n=Object.keys(e),i=n.length;i-- >0;){var o=n[i],a=t[o];if(a){var s=e[o],c=s===void 0||a(s,o,e);if(c!==!0)throw new TypeError("option "+o+" must be "+c);continue}if(r!==!0)throw Error("Unknown option "+o)}}nh.exports={isOlderVersion:rh,assertOptions:VE,validators:Sa}});var lh=v((hD,ch)=>{"use strict";var sh=Te(),zE=ti(),oh=Kd(),ah=Qp(),hi=ba(),uh=ih(),hr=uh.validators;function Br(e){this.defaults=e,this.interceptors={request:new oh,response:new oh}}Br.prototype.request=function(t){typeof t=="string"?(t=arguments[1]||{},t.url=arguments[0]):t=t||{},t=hi(this.defaults,t),t.method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;r!==void 0&&uh.assertOptions(r,{silentJSONParsing:hr.transitional(hr.boolean,"1.0.0"),forcedJSONParsing:hr.transitional(hr.boolean,"1.0.0"),clarifyTimeoutError:hr.transitional(hr.boolean,"1.0.0")},!1);var n=[],i=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(t)===!1||(i=i&&m.synchronous,n.unshift(m.fulfilled,m.rejected))});var o=[];this.interceptors.response.forEach(function(m){o.push(m.fulfilled,m.rejected)});var a;if(!i){var s=[ah,void 0];for(Array.prototype.unshift.apply(s,n),s=s.concat(o),a=Promise.resolve(t);s.length;)a=a.then(s.shift(),s.shift());return a}for(var c=t;n.length;){var d=n.shift(),l=n.shift();try{c=d(c)}catch(p){l(p);break}}try{a=ah(c)}catch(p){return Promise.reject(p)}for(;o.length;)a=a.then(o.shift(),o.shift());return a};Br.prototype.getUri=function(t){return t=hi(this.defaults,t),zE(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};sh.forEach(["delete","get","head","options"],function(t){Br.prototype[t]=function(r,n){return this.request(hi(n||{},{method:t,url:r,data:(n||{}).data}))}});sh.forEach(["post","put","patch"],function(t){Br.prototype[t]=function(r,n,i){return this.request(hi(i||{},{method:t,url:r,data:n}))}});ch.exports=Br});var Da=v((mD,fh)=>{"use strict";function wa(e){this.message=e}wa.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};wa.prototype.__CANCEL__=!0;fh.exports=wa});var ph=v((yD,dh)=>{"use strict";var JE=Da();function mi(e){if(typeof e!="function")throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(i){t=i});var r=this;e(function(i){r.reason||(r.reason=new JE(i),t(r.reason))})}mi.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};mi.source=function(){var t,r=new mi(function(i){t=i});return{token:r,cancel:t}};dh.exports=mi});var mh=v((gD,hh)=>{"use strict";hh.exports=function(t){return function(n){return t.apply(null,n)}}});var gh=v((vD,yh)=>{"use strict";yh.exports=function(t){return typeof t=="object"&&t.isAxiosError===!0}});var Eh=v((_D,Ca)=>{"use strict";var vh=Te(),KE=Ko(),yi=lh(),QE=ba(),ZE=pi();function _h(e){var t=new yi(e),r=KE(yi.prototype.request,t);return vh.extend(r,yi.prototype,t),vh.extend(r,t),r}var rt=_h(ZE);rt.Axios=yi;rt.create=function(t){return _h(QE(rt.defaults,t))};rt.Cancel=Da();rt.CancelToken=ph();rt.isCancel=va();rt.all=function(t){return Promise.all(t)};rt.spread=mh();rt.isAxiosError=gh();Ca.exports=rt;Ca.exports.default=rt});var xa=v((ED,bh)=>{bh.exports=Eh()});var ue=v(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.isUndefined=qe.fixName=qe.validateName=qe.validateSingleChar=qe.fixChar=qe.validateChar=void 0;function cb(e){for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(!(r===9||r===10||r===13||r>=32&&r<=55295||r>=57344&&r<=65533)){if(t+1===e.length)return!1;var n=e.charCodeAt(t+1);if(r>=55296&&r<=56319&&n>=56320&&n<=57343){t++;continue}return!1}}return!0}qe.validateChar=cb;function lb(e){for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n===9||n===10||n===13||n>=32&&n<=55295||n>=57344&&n<=65533){t+=e[r];continue}if(r+1===e.length)return t+="\uFFFD",t;var i=e.charCodeAt(r+1);if(n>=55296&&n<=56319&&i>=56320&&i<=57343){t+=e[r]+e[r+1],r++;continue}t+="\uFFFD"}return t}qe.fixChar=lb;function fb(e){if(e.length===0)return!1;var t=e.charCodeAt(0);if(e.length===1)return t===9||t===10||t===13||t>=32&&t<=55295||t>=57344&&t<=65533;if(e.length!==2)return!1;var r=e.charCodeAt(1);return t>=55296&&t<=56319&&r>=56320&&r<=57343}qe.validateSingleChar=fb;function db(e){if(e.length===0)return!1;var t=e.charCodeAt(0),r=t===58||t===95||t>=65&&t<=90||t>=97&&t<=122||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=767||t>=880&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533;if(e.length===1)return r;var n=e.charCodeAt(1),i=t>=55296&&t<=56191&&n>=56320&&n<=57343;if(!r&&!i)return!1;for(var o=i?2:1,a=o;a<e.length;a++){var s=e.charCodeAt(a);if(!(s===58||s===95||s===45||s===46||s===183||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||s>=192&&s<=214||s>=216&&s<=246||s>=248&&s<=767||s>=768&&s<=879||s>=880&&s<=893||s>=895&&s<=8191||s>=8204&&s<=8205||s>=8255&&s<=8256||s>=8304&&s<=8591||s>=11264&&s<=12271||s>=12289&&s<=55295||s>=63744&&s<=64975||s>=65008&&s<=65533)){if(a+1===e.length)return!1;var c=e.charCodeAt(a+1);if(s>=55296&&s<=56191&&c>=56320&&c<=57343){a++;continue}return!1}}return!0}qe.validateName=db;function pb(e){var t="";if(e.length===0)return t;var r=e.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(e.length===1)return n?t=e[0]:t="\uFFFD",t;var i=e.charCodeAt(1),o=r>=55296&&r<=56191&&i>=56320&&i<=57343;o?t=e[0]+e[1]:n?t=e[0]:t="\uFFFD";for(var a=o?2:1,s=a;s<e.length;s++){var c=e.charCodeAt(s);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){t+=e[s];continue}if(s+1===e.length)return t+="\uFFFD",t;var d=e.charCodeAt(s+1);if(c>=55296&&c<=56191&&d>=56320&&d<=57343){t+=e[s]+e[s+1],s++;continue}t+="\uFFFD"}return t}qe.fixName=pb;function hb(e){return Object.prototype.toString.call(e)==="[object Undefined]"}qe.isUndefined=hb});var yr=v(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.StringOptions=void 0;var bi=ue(),mb=function(){function e(t){this.doubleQuotes=!1,this.indent=" ",this.newline=`
|
|
38
|
+
`,this.pretty=!0,(0,bi.isUndefined)(t.doubleQuotes)||(this.doubleQuotes=t.doubleQuotes),(0,bi.isUndefined)(t.indent)||(this.indent=t.indent),(0,bi.isUndefined)(t.newline)||(this.newline=t.newline),(0,bi.isUndefined)(t.pretty)||(this.pretty=t.pretty)}return e}();Si.StringOptions=mb});var wi=v(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.escapeDoubleQuotes=Ve.escapeSingleQuotes=Ve.escapeRightAngleBracketsInCdataTerminator=Ve.escapeLeftAngleBrackets=Ve.escapeAmpersands=void 0;function yb(e){return e.replace(/&/g,"&")}Ve.escapeAmpersands=yb;function gb(e){return e.replace(/</g,"<")}Ve.escapeLeftAngleBrackets=gb;function vb(e){return e.replace(/]]>/g,"]]>")}Ve.escapeRightAngleBracketsInCdataTerminator=vb;function _b(e){return e.replace(/'/g,"'")}Ve.escapeSingleQuotes=_b;function Eb(e){return e.replace(/"/g,""")}Ve.escapeDoubleQuotes=Eb});var ja=v(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});var bb=_e(),Kh=wi(),Ma=ue(),Sb=function(){function e(t,r,n){this._validation=r,(0,Ma.isUndefined)(n.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=n.replaceInvalidCharsInCharData,this._parent=t,this.charData=n.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._replaceInvalidCharsInCharData)t=(0,Ma.fixChar)(t);else if(this._validation&&!(0,Ma.validateChar)(t))throw new Error((0,bb.getContext)(this.up())+": attribute text"+(' "'+t+'" should not contain characters not')+" allowed in XML");this._charData=t},enumerable:!1,configurable:!0}),e.prototype.toString=function(){var t=this._charData;return t=(0,Kh.escapeAmpersands)(t),t=(0,Kh.escapeLeftAngleBrackets)(t),t},e.prototype.up=function(){return this._parent},e}();qa.default=Sb});var Di=v($a=>{"use strict";Object.defineProperty($a,"__esModule",{value:!0});var Qh=_e(),Zh=ue(),wb=function(){function e(t,r,n){this._hex=!1,this._validation=r,this._parent=t,this.char=n.char,(0,Zh.isUndefined)(n.hex)||(this.hex=n.hex)}return Object.defineProperty(e.prototype,"char",{get:function(){return this._char},set:function(t){if(this._validation&&!(0,Zh.validateSingleChar)(t))throw new Error((0,Qh.getContext)(this.up())+": character reference"+(' "'+t+'" should reference a single character,')+" and this character should be allowed in XML");this._char=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hex",{get:function(){return this._hex},set:function(t){this._hex=t},enumerable:!1,configurable:!0}),e.prototype.toString=function(){var t;if(this._char.length===1)t=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)t=(r-55296)*1024+n-56320+65536;else throw new Error((0,Qh.getContext)(this.up())+": character"+(' reference "'+this.char+'" should')+" reference a valid Unicode character")}else t=r}return this._hex?"&#x"+t.toString(16)+";":"&#"+t+";"},e.prototype.up=function(){return this._parent},e}();$a.default=wb});var Ci=v(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});var Db=_e(),Cb=ue(),xb=function(){function e(t,r,n){this._validation=r,this._parent=t,this.name=n.name}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(t){if(this._validation&&!(0,Cb.validateName)(t))throw new Error((0,Db.getContext)(this.up())+": entity reference name"+(' "'+t+'" should not contain characters not')+" allowed in XML names");this._name=t},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"&"+this._name+";"},e.prototype.up=function(){return this._parent},e}();Ga.default=xb});var xi=v(Ur=>{"use strict";var Xa=Ur&&Ur.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ur,"__esModule",{value:!0});var Ba=_e(),em=wi(),Rb=yr(),Ua=ue(),Ob=Xa(ja()),Ib=Xa(Di()),Pb=Xa(Ci()),Tb=function(){function e(t,r,n){this._validation=r,(0,Ua.isUndefined)(n.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=n.replaceInvalidCharsInName,this._children=[],this._parent=t,this.name=n.name}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(t){if(this._replaceInvalidCharsInName){if(t=(0,Ua.fixName)(t),t.length===0)throw new Error((0,Ba.getContext)(this.up())+": attribute name should not be empty")}else if(this._validation&&!(0,Ua.validateName)(t))throw t.length===0?new Error((0,Ba.getContext)(this.up())+": attribute name should not be empty"):new Error((0,Ba.getContext)(this.up())+": attribute name"+(' "'+t+'" should not contain characters not')+" allowed in XML names");this._name=t},enumerable:!1,configurable:!0}),e.prototype.charRef=function(t){var r=new Ib.default(this,this._validation,t);return this._children.push(r),r},e.prototype.entityRef=function(t){var r=new Pb.default(this,this._validation,t);return this._children.push(r),r},e.prototype.text=function(t){var r=new Ob.default(this,this._validation,t);return this._children.push(r),r},e.prototype.toString=function(t){t===void 0&&(t={});for(var r=new Rb.StringOptions(t),n=r.doubleQuotes?'"':"'",i=this._name+"="+n,o=0,a=this._children;o<a.length;o++){var s=a[o];r.doubleQuotes?i+=(0,em.escapeDoubleQuotes)(s.toString()):i+=(0,em.escapeSingleQuotes)(s.toString())}return i+=n,i},e.prototype.up=function(){return this._parent},e}();Ur.default=Tb});var Wa=v(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});var Ab=_e(),Fb=ue(),Lb=function(){function e(t,r,n){this._validation=r,this._parent=t,this.charData=n.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._validation&&!(0,Fb.validateChar)(t))throw new Error((0,Ab.getContext)(this.up())+": attribute-list"+(' declaration "'+t+'" should not contain')+" characters not allowed in XML");this._charData=t},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"<!ATTLIST "+this._charData+">"},e.prototype.up=function(){return this._parent},e}();Ha.default=Lb});var Va=v(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});var kb=_e(),Nb=ue(),Mb=function(){function e(t,r,n){this._validation=r,this._parent=t,this.charData=n.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._validation&&!(0,Nb.validateChar)(t))throw new Error((0,kb.getContext)(this.up())+": element declaration"+(' "'+t+'" should not contain characters')+" not allowed in XML");this._charData=t},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"<!ELEMENT "+this._charData+">"},e.prototype.up=function(){return this._parent},e}();Ya.default=Mb});var Ja=v(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});var qb=_e(),jb=ue(),$b=function(){function e(t,r,n){this._validation=r,this._parent=t,this.charData=n.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._validation&&!(0,jb.validateChar)(t))throw new Error((0,qb.getContext)(this.up())+": entity declaration"+(' "'+t+'" should not contain characters')+" not allowed in XML");this._charData=t},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"<!ENTITY "+this._charData+">"},e.prototype.up=function(){return this._parent},e}();za.default=$b});var Qa=v(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});var Gb=_e(),Bb=ue(),Ub=function(){function e(t,r,n){this._validation=r,this._parent=t,this.charData=n.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._validation&&!(0,Bb.validateChar)(t))throw new Error((0,Gb.getContext)(this.up())+": notation declaration"+(' "'+t+'" should not contain characters')+" not allowed in XML");this._charData=t},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"<!NOTATION "+this._charData+">"},e.prototype.up=function(){return this._parent},e}();Ka.default=Ub});var es=v(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});var Xb=_e(),Hb=ue(),Wb=function(){function e(t,r,n){this._validation=r,this._parent=t,this.name=n.name}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(t){if(this._validation&&!(0,Hb.validateName)(t))throw new Error((0,Xb.getContext)(this.up())+": parameter entity"+(' reference name "'+t+'" should not contain')+" characters not allowed in XML names");this._name=t},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"%"+this._name+";"},e.prototype.up=function(){return this._parent},e}();Za.default=Wb});var Xr=v(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});var Ri=_e(),Oi=ue(),Yb=function(){function e(t,r,n){this._validation=r,this._parent=t,this.content=n.content,this.target=n.target}return Object.defineProperty(e.prototype,"content",{get:function(){return this._content},set:function(t){if(!(0,Oi.isUndefined)(t)){if(this._validation&&!(0,Oi.validateChar)(t))throw new Error((0,Ri.getContext)(this.up())+": processing"+(' instruction content "'+t+'" should')+" not contain characters not allowed in XML");if(this._validation&&t.indexOf("?>")!==-1)throw new Error((0,Ri.getContext)(this.up())+": processing"+(' instruction content "'+t+'" should')+" not contain the string '?>'")}this._content=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},set:function(t){if(this._validation&&!(0,Oi.validateName)(t))throw new Error((0,Ri.getContext)(this.up())+": processing"+(' instruction target "'+t+'" should')+" not contain characters not allowed in XML names");if(this._validation&&t==="xml")throw new Error((0,Ri.getContext)(this.up())+": processing"+(' instruction target "'+t+'" should')+" not be the string 'xml'");this._target=t},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return(0,Oi.isUndefined)(this._content)?"<?"+this._target+"?>":"<?"+this._target+" "+this._content+"?>"},e.prototype.up=function(){return this._parent},e}();ts.default=Yb});var Ii=v(jt=>{"use strict";var $t=jt&&jt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jt,"__esModule",{value:!0});jt.validatePubId=void 0;var Ct=_e(),Vb=yr(),ut=ue(),zb=$t(Hr()),Jb=$t(Wa()),Kb=$t(Va()),Qb=$t(Ja()),Zb=$t(Qa()),eS=$t(es()),tS=$t(Xr()),rS=function(){function e(t,r,n){this._pubId=void 0,this._sysId=void 0,this._validation=r,this._children=[],this._parent=t,this.name=n.name,(0,ut.isUndefined)(n.sysId)||(this.sysId=n.sysId),(0,ut.isUndefined)(n.pubId)||(this.pubId=n.pubId)}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(t){if(this._validation&&!(0,ut.validateName)(t))throw new Error((0,Ct.getContext)(this.up())+': DTD name "'+t+'" should not contain characters not allowed in XML names');this._name=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pubId",{get:function(){return this._pubId},set:function(t){if(!(0,ut.isUndefined)(t)){if(this._validation&&!tm(t))throw new Error((0,Ct.getContext)(this.up())+": DTD public"+(' identifier "'+t+'" should not contain')+" characters not allowed in public identifiers");if(this._validation&&(0,ut.isUndefined)(this._sysId))throw new Error((0,Ct.getContext)(this.up())+": DTD public"+(' identifier "'+t+'" should not be defined')+" if system identifier is undefined")}this._pubId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sysId",{get:function(){return this._sysId},set:function(t){if(!(0,ut.isUndefined)(t)){if(this._validation&&!(0,ut.validateChar)(t))throw new Error((0,Ct.getContext)(this.up())+": DTD system"+(' identifier "'+t+'" should not contain')+" characters not allowed in XML");if(this._validation&&t.indexOf("'")!==-1&&t.indexOf('"')!==-1)throw new Error((0,Ct.getContext)(this.up())+": DTD system"+(' identifier "'+t+'" should not contain')+" both single quotes and double quotes")}this._sysId=t},enumerable:!1,configurable:!0}),e.prototype.attlist=function(t){var r=new Jb.default(this,this._validation,t);return this._children.push(r),r},e.prototype.comment=function(t){var r=new zb.default(this,this._validation,t);return this._children.push(r),r},e.prototype.element=function(t){var r=new Kb.default(this,this._validation,t);return this._children.push(r),r},e.prototype.entity=function(t){var r=new Qb.default(this,this._validation,t);return this._children.push(r),r},e.prototype.notation=function(t){var r=new Zb.default(this,this._validation,t);return this._children.push(r),r},e.prototype.paramEntityRef=function(t){var r=new eS.default(this,this._validation,t);return this._children.push(r),r},e.prototype.procInst=function(t){var r=new tS.default(this,this._validation,t);return this._children.push(r),r},e.prototype.toString=function(t){t===void 0&&(t={});var r=new Vb.StringOptions(t),n="<!DOCTYPE "+this._name;if((0,ut.isUndefined)(this._pubId))(0,ut.isUndefined)(this._sysId)||(n+=" ",n=this.appendId("SYSTEM",this._sysId,n,r));else{if((0,ut.isUndefined)(this._sysId))throw new Error((0,Ct.getContext)(this.up())+": DTD system identifier is not undefined");n+=" ",n=this.appendId("PUBLIC",this._pubId,n,r),n=this.appendId("",this._sysId,n,r)}if(this._children.length!==0){n+=" [";for(var i=0,o=this._children;i<o.length;i++){var a=o[i];r.pretty&&(n+=r.newline+r.indent),n+=a.toString()}r.pretty&&(n+=r.newline),n+="]>"}else n+=">";return n},e.prototype.up=function(){return this._parent},e.prototype.appendId=function(t,r,n,i){if(n+=t+" ",i.doubleQuotes){if(this._validation&&r.indexOf('"')!==-1)throw new Error((0,Ct.getContext)(this.up())+": doubleQuotes option inconsistent with DTD system identifier or public identifier");n+='"'+r+'"'}else{if(this._validation&&r.indexOf("'")!==-1)throw new Error((0,Ct.getContext)(this)+": doubleQuotes option inconsistent with DTD system identifier or public identifier");n+="'"+r+"'"}return n},e}();jt.default=rS;function tm(e){for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);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 t+1===e.length,!1}return!0}jt.validatePubId=tm});var is=v(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});var rm=_e(),rs=ue(),nS=function(){function e(t,r,n){this._validation=r,(0,rs.isUndefined)(n.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=n.replaceInvalidCharsInCharData,this._parent=t,this.charData=n.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._replaceInvalidCharsInCharData)t=(0,rs.fixChar)(t);else if(this._validation&&!(0,rs.validateChar)(t))throw new Error((0,rm.getContext)(this.up())+": CDATA section"+(' "'+t+'" should not contain characters')+" not allowed in XML");if(this._replaceInvalidCharsInCharData)t=t.replace("]]>","\uFFFD\uFFFD\uFFFD");else if(this._validation&&t.indexOf("]]>")!==-1)throw new Error((0,rm.getContext)(this.up())+": CDATA section"+(' "'+t+'" should not contain the string')+" ']]>'");this._charData=t},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"<![CDATA["+this._charData+"]]>"},e.prototype.up=function(){return this._parent},e}();ns.default=nS});var us=v(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});var iS=_e(),os=wi(),as=ue(),oS=function(){function e(t,r,n){this._validation=r,(0,as.isUndefined)(n.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=n.replaceInvalidCharsInCharData,this._parent=t,this.charData=n.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._replaceInvalidCharsInCharData)t=(0,as.fixChar)(t);else if(this._validation&&!(0,as.validateChar)(t))throw new Error((0,iS.getContext)(this.up())+": character data"+('"'+t+'" should not contain characters not')+" allowed in XML");this._charData=t},enumerable:!1,configurable:!0}),e.prototype.toString=function(){var t=this._charData;return t=(0,os.escapeAmpersands)(t),t=(0,os.escapeLeftAngleBrackets)(t),t=(0,os.escapeRightAngleBracketsInCdataTerminator)(t),t},e.prototype.up=function(){return this._parent},e}();ss.default=oS});var Fi=v(Vr=>{"use strict";var Gt=Vr&&Vr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vr,"__esModule",{value:!0});var Pi=_e(),aS=yr(),Wr=ue(),nm=Gt(xi()),sS=Gt(is()),Yr=Gt(us()),Ti=Gt(Di()),uS=Gt(Hr()),Ai=Gt(Ci()),cS=Gt(Xr()),lS=function(){function e(t,r,n){this._validation=r,(0,Wr.isUndefined)(n.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=n.replaceInvalidCharsInName,(0,Wr.isUndefined)(n.useSelfClosingTagIfEmpty)?this._useSelfClosingTagIfEmpty=!0:this._useSelfClosingTagIfEmpty=n.useSelfClosingTagIfEmpty,this._children=[],this._attributeNames=[],this._parent=t,this.name=n.name}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(t){if(this._replaceInvalidCharsInName){if(t=(0,Wr.fixName)(t),t.length===0)throw new Error((0,Pi.getContext)(this.up())+": element name should not be empty")}else if(this._validation&&!(0,Wr.validateName)(t))throw t.length===0?new Error((0,Pi.getContext)(this.up())+": element name should not be empty"):new Error((0,Pi.getContext)(this.up())+": element name"+(' "'+t+'" should not contain characters not')+" allowed in XML names");this._name=t},enumerable:!1,configurable:!0}),e.prototype.attribute=function(t){if(this._validation&&this._attributeNames.indexOf(t.name)!==-1)throw new Error((0,Pi.getContext)(this.up())+': element "'+this.name+'" already contains an attribute with the'+(' name "'+t.name+'"'));var r=new nm.default(this,this._validation,t);return this._children.push(r),this._attributeNames.push(t.name),r},e.prototype.cdata=function(t){var r=new sS.default(this,this._validation,t);return this._children.push(r),r},e.prototype.charData=function(t){var r=new Yr.default(this,this._validation,t);return this._children.push(r),r},e.prototype.charRef=function(t){var r=new Ti.default(this,this._validation,t);return this._children.push(r),r},e.prototype.comment=function(t){var r=new uS.default(this,this._validation,t);return this._children.push(r),r},e.prototype.element=function(t){var r=new e(this,this._validation,t);return this._children.push(r),r},e.prototype.entityRef=function(t){var r=new Ai.default(this,this._validation,t);return this._children.push(r),r},e.prototype.procInst=function(t){var r=new cS.default(this,this._validation,t);return this._children.push(r),r},e.prototype.toString=function(t){return t===void 0&&(t={}),this.toStringWithIndent(t,"")},e.prototype.up=function(){return this._parent},e.prototype.toStringWithIndent=function(t,r){for(var n=new aS.StringOptions(t),i=r+n.indent,o="<"+this._name,a=[],s=0,c=this._children;s<c.length;s++){var d=c[s];d instanceof nm.default?o+=" "+d.toString(t):a.push(d)}if(a.length>0){for(var l="",p=0;p<a.length;p++){var m=a[p],h="";m instanceof e?h+=m.toStringWithIndent(n,i):h+=m.toString();var _=p>0?a[p-1]:void 0;m instanceof Yr.default&&m.toString()===""||(n.pretty&&(this.allSameLineNodes(a)||p>0&&this.onSameLine(m,_)||(h=n.newline+i+h)),l+=h)}n.pretty&&(this.allSameLineNodes(a)||(l+=n.newline+r)),l.length===0&&this._useSelfClosingTagIfEmpty?o+="/>":o+=">"+l+"</"+this._name+">"}else this._useSelfClosingTagIfEmpty?o+="/>":o+="></"+this._name+">";return o},e.prototype.allSameLineNodes=function(t){for(var r=0,n=t;r<n.length;r++){var i=n[r];if(!(i instanceof Ti.default||i instanceof Ai.default||i instanceof Yr.default))return!1}return!0},e.prototype.onSameLine=function(t,r){return(t instanceof Ti.default||t instanceof Ai.default||t instanceof Yr.default)&&!(0,Wr.isUndefined)(r)&&(r instanceof Ti.default||r instanceof Ai.default||r instanceof Yr.default)},e}();Vr.default=lS});var _e=v(gr=>{"use strict";var ki=gr&&gr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gr,"__esModule",{value:!0});gr.getContext=void 0;var fS=ki(xi()),dS=ki(Ni()),pS=ki(Ii()),hS=ki(Fi());function Li(e){if(e instanceof fS.default)return Li(e.up())+(' > attribute "'+e.name+'"');if(e instanceof dS.default)return"in XML document";if(e instanceof pS.default)return Li(e.up())+" > DTD";if(e instanceof hS.default)return Li(e.up())+(' > element "'+e.name+'"');throw new Error("Unrecognized object of type "+Object.prototype.toString.call(e))}gr.getContext=Li});var Hr=v(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});var cs=_e(),ls=ue(),mS=function(){function e(t,r,n){this._validation=r,(0,ls.isUndefined)(n.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=n.replaceInvalidCharsInCharData,this._parent=t,this.charData=n.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._replaceInvalidCharsInCharData)t=(0,ls.fixChar)(t);else if(this._validation&&!(0,ls.validateChar)(t))throw new Error((0,cs.getContext)(this.up())+": comment content"+(' "'+t+'" should not contain characters')+" not allowed in XML");if(this._replaceInvalidCharsInCharData)t=t.replace("--","\uFFFD\uFFFD");else if(this._validation&&t.indexOf("--")!==-1)throw new Error((0,cs.getContext)(this.up())+": comment content"+(' "'+t+'" should not contain the string')+" '--'");if(this._replaceInvalidCharsInCharData)t.lastIndexOf("-")===t.length-1&&(t=t.substr(0,t.length-1)+"\uFFFD");else if(this._validation&&t.lastIndexOf("-")===t.length-1)throw new Error((0,cs.getContext)(this.up())+": comment content"+(' "'+t+'" should not end with the string')+" '-'");this._charData=t},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"<!--"+this._charData+"-->"},e.prototype.up=function(){return this._parent},e}();fs.default=mS});var hs=v(ps=>{"use strict";Object.defineProperty(ps,"__esModule",{value:!0});var ds=_e(),yS=yr(),zr=ue(),gS=function(){function e(t,r,n){this._version="1.0",this._validation=r,this._parent=t,this.encoding=n.encoding,this.standalone=n.standalone,(0,zr.isUndefined)(n.version)||(this.version=n.version)}return Object.defineProperty(e.prototype,"encoding",{get:function(){return this._encoding},set:function(t){if(this._validation&&!(0,zr.isUndefined)(t)&&!vS(t))throw new Error((0,ds.getContext)(this.up())+": declaration"+(" encoding attribute "+t+" should be a")+" valid encoding");this._encoding=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"standalone",{get:function(){return this._standalone},set:function(t){if(this._validation&&!(0,zr.isUndefined)(t)&&t!=="yes"&&t!=="no")throw new Error((0,ds.getContext)(this.up())+": declaration"+(" standalone attribute "+t+" should")+" be the string 'yes' or the string 'no'");this._standalone=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},set:function(t){if(this._validation&&!_S(t))throw new Error((0,ds.getContext)(this.up())+": declaration version"+(" attribute "+t+" should be a valid XML")+" version");this._version=t},enumerable:!1,configurable:!0}),e.prototype.toString=function(t){t===void 0&&(t={});var r=new yS.StringOptions(t),n=r.doubleQuotes?'"':"'",i="<?xml version="+n+this._version+n;return(0,zr.isUndefined)(this._encoding)||(i+=" encoding="+n+this._encoding+n),(0,zr.isUndefined)(this._standalone)||(i+=" standalone="+n+this._standalone+n),i+="?>",i},e.prototype.up=function(){return this._parent},e}();ps.default=gS;function vS(e){if(e.length===0)return!1;var t=e.charCodeAt(0);if(!(t>=65&&t<=90||t>=97&&t<=122))return!1;for(var r=1;r<e.length;r++){var n=e.charCodeAt(r);if(!(n===95||n===45||n===46||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122))return r+1===e.length,!1}return!0}function _S(e){for(var t=0;t<=9;t++)if(e==="1."+t)return!0;return!1}});var Ni=v(Kr=>{"use strict";var Qr=Kr&&Kr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Kr,"__esModule",{value:!0});var ES=yr(),bS=ue(),SS=Qr(Hr()),im=Qr(hs()),om=Qr(Ii()),Jr=Qr(Fi()),wS=Qr(Xr()),DS=function(){function e(t){this._children=[],this._validation=(0,bS.isUndefined)(t.validation)?!0:t.validation}return e.prototype.comment=function(t){var r=new SS.default(this,this._validation,t);return this._children.push(r),r},e.prototype.decl=function(t){if(t===void 0&&(t={}),this._validation&&this._children.length!==0)throw new Error("in XML document: declaration must be the first child");var r=new im.default(this,this._validation,t);return this._children.push(r),r},e.prototype.dtd=function(t){var r=this._children.filter(function(i){return i instanceof Jr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: DTD must precede the root element");var n=new om.default(this,this._validation,t);return this._children.push(n),n},e.prototype.element=function(t){var r=this._children.filter(function(i){return i instanceof Jr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: only one root element is permitted");var n=new Jr.default(this,this._validation,t);return this._children.push(n),n},e.prototype.procInst=function(t){var r=new wS.default(this,this._validation,t);return this._children.push(r),r},e.prototype.toString=function(t){t===void 0&&(t={});var r=this._children.filter(function(d){return d instanceof Jr.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 ES.StringOptions(t),i="",o=0,a=this._children;o<a.length;o++){var s=a[o];s instanceof im.default||s instanceof om.default||s instanceof Jr.default?i+=s.toString(t):i+=s.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},e}();Kr.default=DS});var am=v(N=>{"use strict";var de=N&&N.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(N,"__esModule",{value:!0});N.document=N.XmlProcInst=N.XmlEntityRef=N.XmlElement=N.XmlDtdParamEntityRef=N.XmlDtdNotation=N.XmlDtdEntity=N.XmlDtdElement=N.XmlDtdAttlist=N.XmlDtd=N.XmlDocument=N.XmlDecl=N.XmlComment=N.XmlCharRef=N.XmlCharData=N.XmlCdata=N.XmlAttributeText=N.XmlAttribute=void 0;var CS=de(Ni()),xS=xi();Object.defineProperty(N,"XmlAttribute",{enumerable:!0,get:function(){return de(xS).default}});var RS=ja();Object.defineProperty(N,"XmlAttributeText",{enumerable:!0,get:function(){return de(RS).default}});var OS=is();Object.defineProperty(N,"XmlCdata",{enumerable:!0,get:function(){return de(OS).default}});var IS=us();Object.defineProperty(N,"XmlCharData",{enumerable:!0,get:function(){return de(IS).default}});var PS=Di();Object.defineProperty(N,"XmlCharRef",{enumerable:!0,get:function(){return de(PS).default}});var TS=Hr();Object.defineProperty(N,"XmlComment",{enumerable:!0,get:function(){return de(TS).default}});var AS=hs();Object.defineProperty(N,"XmlDecl",{enumerable:!0,get:function(){return de(AS).default}});var FS=Ni();Object.defineProperty(N,"XmlDocument",{enumerable:!0,get:function(){return de(FS).default}});var LS=Ii();Object.defineProperty(N,"XmlDtd",{enumerable:!0,get:function(){return de(LS).default}});var kS=Wa();Object.defineProperty(N,"XmlDtdAttlist",{enumerable:!0,get:function(){return de(kS).default}});var NS=Va();Object.defineProperty(N,"XmlDtdElement",{enumerable:!0,get:function(){return de(NS).default}});var MS=Ja();Object.defineProperty(N,"XmlDtdEntity",{enumerable:!0,get:function(){return de(MS).default}});var qS=Qa();Object.defineProperty(N,"XmlDtdNotation",{enumerable:!0,get:function(){return de(qS).default}});var jS=es();Object.defineProperty(N,"XmlDtdParamEntityRef",{enumerable:!0,get:function(){return de(jS).default}});var $S=Fi();Object.defineProperty(N,"XmlElement",{enumerable:!0,get:function(){return de($S).default}});var GS=Ci();Object.defineProperty(N,"XmlEntityRef",{enumerable:!0,get:function(){return de(GS).default}});var BS=Xr();Object.defineProperty(N,"XmlProcInst",{enumerable:!0,get:function(){return de(BS).default}});function US(e){return e===void 0&&(e={}),new CS.default(e)}N.document=US});var ms=v(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.stringify=pe.isMap=pe.isSet=pe.isFunction=pe.isArray=pe.isObject=pe.isNull=pe.isUndefined=void 0;function sm(e){return Object.prototype.toString.call(e)==="[object Undefined]"}pe.isUndefined=sm;function um(e){return Object.prototype.toString.call(e)==="[object Null]"}pe.isNull=um;function XS(e){return Object.prototype.toString.call(e)==="[object Object]"}pe.isObject=XS;function HS(e){return Object.prototype.toString.call(e)==="[object Array]"}pe.isArray=HS;function cm(e){return Object.prototype.toString.call(e)==="[object Function]"}pe.isFunction=cm;function WS(e){return Object.prototype.toString.call(e)==="[object Set]"}pe.isSet=WS;function YS(e){return Object.prototype.toString.call(e)==="[object Map]"}pe.isMap=YS;function VS(e){return!sm(e)&&!um(e)&&cm(e?.toString)&&(e=e.toString()),String(e)}pe.stringify=VS});var mm=v(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.WrapHandlers=je.TypeHandlers=je.FormatOptions=je.DtdOptions=je.DeclarationOptions=je.Options=void 0;var nt=ms(),zS=function(){function e(t){t===void 0&&(t={}),this.aliasString="=",this.attributeString="@",this.cdataInvalidChars=!1,this.cdataKeys=[],this.replaceInvalidChars=!1,this.useSelfClosingTagIfEmpty=!0,this.validation=!0,this.valueString="#",(0,nt.isUndefined)(t.validation)||(this.validation=t.validation),(0,nt.isUndefined)(t.aliasString)||(this.aliasString=t.aliasString),(0,nt.isUndefined)(t.attributeString)||(this.attributeString=t.attributeString),(0,nt.isUndefined)(t.cdataInvalidChars)||(this.cdataInvalidChars=t.cdataInvalidChars),(0,nt.isUndefined)(t.cdataKeys)||(this.cdataKeys=t.cdataKeys),this.declaration=new lm(t.declaration),this.dtd=new fm(this.validation,t.dtd),this.format=new dm(t.format),(0,nt.isUndefined)(t.replaceInvalidChars)||(this.replaceInvalidChars=t.replaceInvalidChars),this.typeHandlers=new pm(t.typeHandlers),(0,nt.isUndefined)(t.useSelfClosingTagIfEmpty)||(this.useSelfClosingTagIfEmpty=t.useSelfClosingTagIfEmpty),(0,nt.isUndefined)(t.valueString)||(this.valueString=t.valueString),this.wrapHandlers=new hm(t.wrapHandlers)}return e}();je.Options=zS;var lm=function(){function e(t){t===void 0&&(t={}),this.include=!0,(0,nt.isUndefined)(t.include)||(this.include=t.include),this.encoding=t.encoding,this.standalone=t.standalone,this.version=t.version}return e}();je.DeclarationOptions=lm;var fm=function(){function e(t,r){if(r===void 0&&(r={}),this.include=!1,(0,nt.isUndefined)(r.include)||(this.include=r.include),t&&(0,nt.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 e}();je.DtdOptions=fm;var dm=function(){function e(t){t===void 0&&(t={}),this.doubleQuotes=t.doubleQuotes,this.indent=t.indent,this.newline=t.newline,this.pretty=t.pretty}return e}();je.FormatOptions=dm;var pm=function(){function e(t){t===void 0&&(t={});for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this[r]=t[r])}return e}();je.TypeHandlers=pm;var hm=function(){function e(t){t===void 0&&(t={});for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this[r]=t[r])}return e}();je.WrapHandlers=hm});var bm=v(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.parse=xt.parseToExistingElement=xt.Absent=void 0;var gm=am(),vm=mm(),ie=ms(),ys=function(){function e(){}return Object.defineProperty(e,"instance",{get:function(){return e._instance},enumerable:!1,configurable:!0}),e._instance=new e,e}();xt.Absent=ys;function gs(e,t){var r=Object.prototype.toString.call(e),n;return Object.prototype.hasOwnProperty.call(t.typeHandlers,"*")&&(n=t.typeHandlers["*"]),Object.prototype.hasOwnProperty.call(t.typeHandlers,r)&&(n=t.typeHandlers[r]),n}function _m(e,t,r){var n=function(a){return r.cdataInvalidChars&&(a.indexOf("<")!==-1||a.indexOf("&")!==-1)||r.cdataKeys.indexOf(t.name)!==-1||r.cdataKeys.indexOf("*")!==-1};if(t instanceof gm.XmlElement)if(n(e))for(var i=e.split("]]>"),o=0;o<i.length;o++)n(i[o])?t.cdata({charData:i[o],replaceInvalidCharsInCharData:r.replaceInvalidChars}):t.charData({charData:i[o],replaceInvalidCharsInCharData:r.replaceInvalidChars}),o<i.length-1&&t.charData({charData:"]]>",replaceInvalidCharsInCharData:r.replaceInvalidChars});else t.charData({charData:e,replaceInvalidCharsInCharData:r.replaceInvalidChars});else t.text({charData:e,replaceInvalidCharsInCharData:r.replaceInvalidChars})}function JS(e,t,r,n){var i=r.attribute({name:e,replaceInvalidCharsInName:n.replaceInvalidChars});_m((0,ie.stringify)(t),i,n)}function ym(e,t,r,n){if(e===n.aliasString){r.name=(0,ie.stringify)(t);return}if(e.indexOf(n.attributeString)===0&&(0,ie.isObject)(t)){for(var i=0,o=Object.keys(t);i<o.length;i++){var a=o[i];JS(a,(0,ie.stringify)(t[a]),r,n)}return}if(e.indexOf(n.valueString)===0){Mi(e,(0,ie.stringify)(t),r,n);return}var s=r;if(!(0,ie.isArray)(t)&&!(0,ie.isSet)(t)){var c=gs(t,n);if(!(0,ie.isUndefined)(c)&&c(t)===ys.instance)return;s=r.element({name:e,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}Mi(e,t,s,n)}function KS(e,t,r){if((0,ie.isMap)(e))e.forEach(function(a,s){ym((0,ie.stringify)(s),a,t,r)});else for(var n=0,i=Object.keys(e);n<i.length;n++){var o=i[n];ym(o,e[o],t,r)}}function QS(e,t,r,n){var i;Object.prototype.hasOwnProperty.call(n.wrapHandlers,"*")&&(i=n.wrapHandlers["*"]),Object.prototype.hasOwnProperty.call(n.wrapHandlers,e)&&(i=n.wrapHandlers[e]);var o=e,a=r;if(!(0,ie.isUndefined)(i)){var s=i(o,t);(0,ie.isNull)(s)||(o=s,a=r.element({name:e,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty}))}t.forEach(function(c){var d=a;if(!(0,ie.isArray)(c)&&!(0,ie.isSet)(c)){var l=gs(c,n);if(!(0,ie.isUndefined)(l)&&l(c)===ys.instance)return;d=a.element({name:o,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}Mi(o,c,d,n)})}function Mi(e,t,r,n){var i=gs(t,n);if((0,ie.isUndefined)(i)||(t=i(t)),(0,ie.isObject)(t)||(0,ie.isMap)(t)){KS(t,r,n);return}if((0,ie.isArray)(t)||(0,ie.isSet)(t)){QS(e,t,r,n);return}_m((0,ie.stringify)(t),r,n)}function Em(e,t,r){var n=new vm.Options(r);Mi(e.name,t,e,n)}xt.parseToExistingElement=Em;function ZS(e,t,r){var n=new vm.Options(r),i=new gm.XmlDocument({validation:n.validation});n.declaration.include&&i.decl(n.declaration),n.dtd.include&&i.dtd({name:n.dtd.name,pubId:n.dtd.pubId,sysId:n.dtd.sysId});var o=i.element({name:e,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty});return Em(o,t,r),i.toString(n.format)}xt.parse=ZS});var ow={};au(ow,{startRender:()=>iw});module.exports=uu(ow);var Ss=T(require("node:fs")),en=T(require("node:path"));var qd=require("node:child_process"),dt=T(require("node:path")),jd=T(Ot()),tt=T(Tt());var cr=T(require("node:fs")),Ld=T(require("node:path")),Mr=T(Mn()),kd=T(Ot()),Zn=T(Tt()),Nd=T(Gn());var Ze=T(require("node:fs")),ot=T(require("node:path")),Ie=T(Tt());var ft=T(require("node:fs")),ke=T(require("node:path")),Bn=T(Tt());var or=ne();function*U0(e){let{basePath:t,withSizeProp:r}=e||{},{__cx:n}=or.paths(),i=t||ke.default.join(n,"store"),o=pf(i).filter(a=>ke.default.extname(a)===".json");for(let a of o)try{let s=Bn.default.readJsonSync(a,{encoding:"utf-8"});if(r){let c=ft.default.statSync(a);s.size=c.size/1024}s.path&&(yield s)}catch(s){console.error(`Error: The file ${a} doesn't exist`,s)}}async function To(){let{__cx:e}=or.paths(),{sitesToPublish:t,createdPages:r,buildProcessData:n}=Bn.default.readJSONSync(ke.default.join(e,"store","metadata","render-info.json"));return{buildProcessData:n,createdPages:r,sitesToPublish:t}}function cf(){let{__cx:e}=or.paths(),t=ke.default.join(e,"store");ft.default.existsSync(t)||(ft.default.mkdirSync(t),ft.default.mkdirSync(ke.default.join(t,"metadata"))),console.info("Store initialized")}function lf(e,t){let{__cx:r}=or.paths();ft.default.writeFileSync(ke.default.join(r,"store","metadata","render-info.json"),JSON.stringify(t))}function X0(e,t){return Ao(e).filter(i=>t.includes(i))}function Ao(e){return ft.default.readdirSync(e).filter(r=>{let n=`${e}/${r}`,i=ft.default.statSync(n);if(i&&i.isDirectory()||ke.default.extname(r)!==".json")return!1;let o=ke.default.basename(r,ke.default.extname(r));return!isNaN(parseInt(o))}).map(r=>{let n=ke.default.basename(r,ke.default.extname(r));return parseInt(n)})}function ff(e){let{__cx:t}=or.paths();e.forEach(r=>{Fo(r,["editorID","parentEditorID"]);let n=`${r.context.page.id}.json`,i=ke.default.join(t,"store",n);Bn.default.writeJSONSync(i,r)})}function Un(e){let{__cx:t}=or.paths();e.length!==0&&e.forEach(r=>{let n=ke.default.join(t,"store",`${r}.json`);try{ft.default.unlinkSync(n)}catch(i){console.log(`Error removing file ${r}`,i.message)}})}async function df(e,t){let{changedPages:r,pages:n,validPagesIds:i,sitesToPublish:o}=t,a=X0(e,n),s=i.filter(h=>!a.includes(h)),c=s.concat(r),d=a.filter(h=>!i.includes(h)),l=Array.from(new Set(c)).filter(h=>!d.includes(h)),p=U0(),m=[];for await(let h of p){let _=h.context.page.site,b=h.context.page.id;o.map(w=>w.id).includes(_)||m.push(b)}return{pagesInStore:a,pagesMissingInStore:s,pagesToDeleteFromStore:[...d,...m],pagesToWriteToStore:l}}var H0=ne(),Lo=e=>{if(!Ie.default.statSync(e).isDirectory())return;let r=Ie.default.readdirSync(e);if(r.length>0){let i=r.length,o=r.filter(a=>ot.default.extname(a).toLowerCase()===".xml").length;i===o&&(r.forEach(function(a){let s=ot.default.join(e,a);Ie.default.rmSync(s)}),r=Ie.default.readdirSync(e)),r.forEach(function(a){let s=ot.default.join(e,a);Lo(s)}),r=Ie.default.readdirSync(e)}if(r.length===0){Ie.default.rmdirSync(e);return}};function Xn(e,t){for(let r of e)Ze.default.existsSync(r)||Ze.default.mkdirSync(r,{recursive:!0,...t})}function Hn(e,t,r,n={withBackup:!1}){let{withBackup:i}=n;for(let o of r){let a=ot.default.join(e,o),s=ot.default.join(t,o);if(!Ie.default.existsSync(a)){console.log(`Source directory does not exist: ${a}`);continue}i&&yf(s);try{Ie.default.existsSync(s)&&Ze.default.rmSync(s,{recursive:!0,force:!0}),Ze.default.cpSync(a,s,{recursive:!0,preserveTimestamps:!0}),i&&mf(s)}catch{console.log("Copy failed!"),i&&(hf(s),console.log("Backup has been restored."))}}}function ar(e,t,r,n){let{override:i,withBackup:o}=n||{};for(let a of r){let s=ot.default.join(e,a),c=ot.default.join(t,a);if(Ie.default.existsSync(s)){o&&yf(c);try{i&&Ie.default.existsSync(c)&&Ze.default.rmSync(c,{recursive:!0,force:!0}),Ze.default.renameSync(s,c),o&&mf(c)}catch{console.log("Move failed!"),o&&(hf(c),console.log("Backup has been restored."))}}}}function kr(e,t){for(let r of t){if(!r)continue;let n=ot.default.join(e,r);Ie.default.existsSync(n)&&Ze.default.rmSync(n,{recursive:!0,force:!0})}}function hf(e,t="-BACKUP"){let r=e+t;try{Ze.default.renameSync(r,e),console.log(`Backup ${r} has been restored`)}catch{console.log(`Error while delete ${r} backup`)}}function mf(e,t="-BACKUP"){let r=e+t;if(Ie.default.existsSync(r))try{Ze.default.rmSync(r,{recursive:!0,force:!0}),console.log(`Backup ${r} has been deleted`)}catch{console.log(`Error while delete ${r} backup`)}}function yf(e,t="-BACKUP"){let r=e+t;if(Ie.default.existsSync(e)){if(Ie.default.existsSync(r)){console.log(`Destination ${r} already exists`);return}try{Ze.default.renameSync(e,r),console.log(`Backup of ${e} has been created in ${r}`)}catch{console.log(`Error while coping ${e} to ${r} backup`)}}}function W0(e){return Number.isInteger(e)&&e<0}async function gf(){let{__cx:e}=H0.paths(),t=ot.default.join(e,"store");try{let r=Ao(t).filter(W0);Un(r)}catch{console.info("`store` folder does not exist. Skipping multipage or static list template cleaning.")}}var Jn=T(Ef()),xd=T(Ff());var Lf=T(Ot());Lf.default.config();var Ge=process.env.GRIDDO_API_URL||process.env.API_URL,kf=process.env.GRIDDO_PUBLIC_API_URL||process.env.PUBLIC_API_URL,Nf=process.env.botEmail,Mf=process.env.botPassword,qf=Number.parseInt(process.env.GRIDDO_API_CONCURRENCY_COUNT||"10"),jf=at(process.env.GRIDDO_RENDER_ALL_SITES||process.env.updateAllSites),$f=Number.parseInt(process.env.GRIDDO_RENDER_SITE||""),Gf=(process.env.GRIDDO_RENDER_PAGES||"").split(",").map(e=>Number.parseInt(e)).filter(Boolean),Bf=at(process.env.GRIDDO_SKIP_BUILD_CHECKS),Uf=at(process.env.GRIDDO_DEBUG_LOGS),Xf=at(process.env.GRIDDO_BUILD_LOGS),Hf=at(process.env.GRIDDO_RENDER_BREAKPOINTS_FEATURE),Wf=at(process.env.GRIDDO_SSG_VERBOSE_LOGS),Yf=at(process.env.GRIDGRIDDO_SEARCH_FEATURE_FEATURE),Vf=process.env.GRIDDO_ASSET_PREFIX||process.env.ASSET_PREFIX,zf=process.env.GRIDDO_REACT_APP_INSTANCE||process.env.REACT_APP_INSTANCE,Jf=at(process.env.GRIDDO_AI_EMBEDDINGS),Kf=at(process.env.GRIDDO_VERBOSE_LOGS),Qf=Number.parseInt(process.env.GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS||"1"),Zf=Number.parseInt(process.env.GRIDDO_CLOSE_LIFECYCLE_MAX_ATTEMPTS||"1"),ed=Number.parseInt(process.env.GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS||"1"),td=Number.parseInt(process.env.GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS||"1"),rd=Number.parseInt(process.env.GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS||"1"),nd=Number.parseInt(process.env.GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS||"2"),id=Number.parseInt(process.env.GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS||"1"),od=Number.parseInt(process.env.GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS||"4"),ad=Number.parseInt(process.env.GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS||"1"),sd=process.env.GRIDDO_CX_FIXTURES_DOMAIN_NAMES,ud=process.env.GRIDDO_CX_FIXTURES_SITE_NAMES;var wt=`${Ge}/site/`,cd=`${Ge}/sites/all`,ld=`${Ge}/settings`,fd=`${Ge}/debug/reset-render`,dd=`${Ge}/page`,pd=`${Ge}/search`,hd=`${Ge}/domains`,md=`${Ge}/domains/robots`,yd=`${Ge}/login_check`,gd=`${Ge}/ai/embeddings`,vd=[wt,"/all"],_d=[wt,"/languages"],Ed=[wt,"/build/start"],bd=[wt,"/build/end"],Sd=[wt,"/distributor"],wd=[wt,"/sitemap"],Dd=[wt,"/socials"],Cd=[wt,"/pages?pagination=false"];var le={AI_EMBEDDINGS:gd,BUILD_END:bd,BUILD_START:Ed,DOMAINS:hd,GET_ALL:cd,GET_PAGE:dd,GET_PAGES:Cd,GET_REFERENCE_FIELD_DATA:Sd,GET_SITEMAP:wd,INFO:vd,LANGUAGES:_d,LOGIN:yd,RESET_RENDER:fd,ROBOTS:md,SEARCH:pd,SETTINGS:ld,SOCIALS:Dd},X={GRIDDO_AI_EMBEDDINGS:Jf,GRIDDO_API_CONCURRENCY_COUNT:qf,GRIDDO_API_URL:Ge,GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS:ad,GRIDDO_ASSET_PREFIX:Vf,GRIDDO_BOT_PASSWORD:Mf,GRIDDO_BOT_USER:Nf,GRIDDO_BUILD_LOGS:Xf,GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS:Qf,GRIDDO_CLOSE_LIFECYCLE_MAX_ATTEMPTS:Zf,GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS:rd,GRIDDO_DEBUG_LOGS:Uf,GRIDDO_FIXTURES_DOMAIN_NAMES:sd,GRIDDO_FIXTURES_SITE_NAMES:ud,GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS:od,GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS:ed,GRIDDO_PUBLIC_API_URL:kf,GRIDDO_REACT_APP_INSTANCE:zf,GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS:id,GRIDDO_RENDER_ALL_SITES:jf,GRIDDO_RENDER_BREAKPOINTS_FEATURE:Hf,GRIDDO_RENDER_PAGES:Gf,GRIDDO_RENDER_SITE:$f,GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS:td,GRIDDO_SEARCH_FEATURE:Yf,GRIDDO_SKIP_BUILD_CHECKS:Bf,GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS:nd,GRIDDO_SSG_VERBOSE_LOGS:Wf,GRIDDO_VERBOSE_LOGS:Kf};function Ne(e){X.GRIDDO_VERBOSE_LOGS&&console.log(Jn.default.yellow("verbose"),Jn.default.dim(e.replace(/(\s)\s+/g,"$1").trim()))}function We(e,t="",r=1,n=1){let i=e.split(`
|
|
39
|
+
`).map(_=>_.trim()),o=t?` ${t} `:"",a=t?o.length:0,s=Math.max(...i.map(_=>_.length))+r*2,c=Math.max(s,a),d=`\u2502${" ".repeat(c)}\u2502
|
|
40
|
+
`.repeat(n),l=c,p=`\u256D${o}${"\u2500".repeat(l-a)}\u256E
|
|
41
|
+
`,m=`\u2570${"\u2500".repeat(l)}\u256F`,h=i.map(_=>{let b=" ".repeat(c-_.length-r);return`\u2502${" ".repeat(r)}${_}${b}\u2502
|
|
42
|
+
`}).join("");console.log(`${p}${d}${h}${d}${m}`)}function Ft(e){console.info(`${Jn.default.blue("info")} ${e}`)}function Rd(e){let t=ne(),r=process.version,{griddoVersion:n}=t,i=`
|
|
28
43
|
\xB7\xB7
|
|
29
|
-
\xB7\xB7 Griddo
|
|
30
|
-
\xB7\xB7 Adapter: ${t}
|
|
31
|
-
\xB7\xB7 Node: ${e}
|
|
44
|
+
\xB7\xB7 Griddo ${n}
|
|
32
45
|
\xB7\xB7
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
`)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
The files generated in this render will not be published.`};var to=A(require("node:fs")),ro=A(require("node:path")),sh=A(nt());var rh=A(Ks()),nh=A(dn()),ih=A(nt());var Wd=A(require("node:crypto")),Ct=A(require("node:fs")),tr=A(require("node:path")),Qs=A(yt());var Jn=te();function Jd(){let{__cx:t}=Jn.paths(),e=tr.default.join(t,"apiCache");Ct.default.existsSync(e)||Ct.default.mkdirSync(e),console.info("Cache initialized")}function Vd(t){let{__cx:e}=Jn.paths(),r=tr.default.join(e,"apiCache"),n=Wd.default.createHash("sha256");return n.update(JSON.stringify(t)),`${r}/${n.digest("hex")}`}function Yd(t,e){let r=typeof e=="string"?e:JSON.stringify(e),n=Vd(t),i=tr.default.dirname(n);Ct.default.existsSync(i)||Ct.default.mkdirSync(i,{recursive:!0}),Ct.default.writeFileSync(n,r,"utf8")}function Kd(t){try{let e=Vd(t);return Qs.default.readJSONSync(e,{encoding:"utf-8"})}catch{return null}}function xv(){let{__cx:t}=Jn.paths(),r=`${tr.default.join(t,"apiCache")}/siteHash.json`;try{return Qs.default.readJSONSync(r,{encoding:"utf-8"})||{}}catch{return{}}}function Qd(t,e){let r=xv(),n=r[t],i=e||n||new Date().valueOf(),{__cx:s}=Jn.paths(),a=`${tr.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 Zd=A(Ks()),eh=A(dn()),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,Zd.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(eh.default.red(`
|
|
46
|
+
\xB7\xB7 Adapter: ${e}
|
|
47
|
+
\xB7\xB7 Node: ${r}
|
|
48
|
+
\xB7\xB7 React: ${xd.version}
|
|
49
|
+
\xB7\xB7
|
|
50
|
+
`;console.log(i)}kd.default.config();var b_=ne(),F1=Nd.default.sync();function ne(){try{return(Fd(),uu(Ad)).default}catch{console.log("Error while reading configuration file"),process.exit(1)}}function at(e){if(typeof e=="boolean")return e;if(e==null)return!1;if(e.toLowerCase()==="true")return!0;if(e.toLowerCase()==="false")return!1;if(e.toLowerCase()==="on")return!0;if(e.toLowerCase()==="off")return!1;let t=parseInt(e,10);return isNaN(t)?!1:t>0}function pf(e){let t=[];return cr.default.readdirSync(e).forEach(n=>{let i=`${e}/${n}`;t.push(i)}),t}function Xo(e){return new Promise(t=>setTimeout(t,e))}function Ho(e,t=3){return(e/1e3).toFixed(t)}function Wo(e){if(typeof e!="string")return"site"in e&&e.site?e?.site:void 0}function Fo(e,t){for(let r in e)t.includes(r)?delete e[r]:typeof e[r]=="object"&&Fo(e[r],t)}function Yo(e){return e.map(({name:t,id:r})=>`${t} (${r})`).join(", ")}function Md(){let{__cx:e}=b_.paths(),t=Ld.default.join(e,"apiCache"),r=cr.default.readdirSync(t),n={},i=r.filter(a=>{let s=`${t}/${a}`,c=Zn.default.readJSONSync(s,"utf-8"),{id:d,entity:l,fullUrl:p}=c;return!!(d&&l&&p)});for(let a of i){let s=`${t}/${a}`,c=Zn.default.readJSONSync(s,"utf-8"),d=cr.default.statSync(s).mtimeMs,{id:l}=c;(!n[l]||d>cr.default.statSync(`${t}/${n[l]}`).mtimeMs)&&(n[l]=a)}let o=0;for(let a of i){let s=`${t}/${a}`,c=Zn.default.readJSONSync(s,"utf-8"),{id:d}=c;a!==n[d]&&(cr.default.unlinkSync(s),o++)}console.log(`Sanitize apiCache dir for ${o} files`)}async function Vo(e,t=0){let r=process.hrtime();for(let a of e)await a(),t>0&&await Xo(t);let[n,i]=process.hrtime(r);return+(n+i/1e9).toFixed(3)}function zo(e){if(JSON.parse(process.env.GRIDDO_RENDER_BREAKPOINTS_FEATURE||"false"))return new Promise(r=>{console.log(`
|
|
51
|
+
`),We(`\u231B\uFE0F ${e}`,"",1,0),process.stdin.once("data",()=>{r()})})}async function et(e,t){let{steps:r,bypass:n,delay:i}=t;if(n)return;let o={Archive:X.GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS,Data:X.GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS,Meta:X.GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS,Relocation:X.GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS,Clean:X.GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS,Restore:X.GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS,Prepare:X.GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS,Close:X.GRIDDO_CLOSE_LIFECYCLE_MAX_ATTEMPTS,SSG:X.GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS,HealthCheck:1,__DEBUG__:1},a=0,s=o[e]||1;for(;a<s;)try{console.info(`
|
|
52
|
+
${Mr.default.blue("info")} start ${e} life-cycle`);let c=await Vo(r,i);console.info(`${Mr.default.green("success")} ${e} - ${c}s`),await zo(`${e} LifeCycle`);break}catch(c){let d=Mr.default.bgRed.black(` Error in ${e} LifeCycle `),l=Mr.default.yellow(`Attempt (${a+1})`);console.log(`
|
|
53
|
+
${d} ${l}
|
|
54
|
+
`),console.log(c),console.log(),a++}if(a===s)throw new Error(`Exceeded maximum retry attempts (${s}) for ${e} LifeCycle`)}jd.default.config();var $d=ne();function Gd(e){let{proDomain:t}=ne(),r=process.env.GRIDDO_ASSET_PREFIX||process.env.ASSET_PREFIX;if(!r||!e||!e.startsWith(t))return"";let n=`${r}/${e}`;return Ne(`Reading env.GRIDDO_ASSET_PREFIX, ${process.env.GRIDDO_ASSET_PREFIX}`),Ne(`Setting the asset prefix with the domain concatenated, ${n}`),n}function Jo(e,t,r,n="jpg"){let i=typeof e=="string"?e:e?.url;return i?i.split("/")[2].includes("cloudinary.com")?w_(i,`c_fill,w_${t},h_${r}`):S_(i,`f/${n}/w/${t}/h/${r}`):null}function S_(e,t){let r=e.split("/"),n=r.slice(0,-1).join("/"),i=r.slice(-1)[0];return`${n}/${t}/${i}`}function w_(e,t){let r=e.replace("https://",""),n=r.split("/").slice(0,4).join("/"),i=r.replace(n,"");return`https://${n}/${t}${i}`}function Bd(e){Ne(`read assetPrefixWithDomain, ${e}`);let{__ssg:t}=$d.paths(),r=(0,qd.spawnSync)("yarn",["gatsby-build",process.env.GRIDDO_SSG_VERBOSE?"--verbose":""],{cwd:t,stdio:["ignore","inherit","ignore"],encoding:"utf8",shell:!0,env:Object.assign(process.env,{GRIDDO_EXPORTER:"true",SPAWN_ASSET_PREFIX_WITH_DOMAIN:e})});if(r.status!==0)throw new Error(`Error in gatsby build ${JSON.stringify(r)}`)}async function Ud(e,t){let{__cx:r,__ssg:n}=$d.paths(e),i=dt.default.join(r,"dist"),o=dt.default.join(r,"assets"),a=dt.default.join(r,"dist",e),s=dt.default.join(n,"public"),c=tt.default.readdirSync(s).filter(b=>dt.default.extname(b)===".js"||dt.default.extname(b)===".json"||dt.default.extname(b)===".css"),d=`${s}/page-data`,l=`${o}/page-data`,p=dt.default.join(n,"static"),m=o,h=`${i}/static`,_=`${o}/static`;try{tt.default.mkdirSync(o,{recursive:!0}),tt.default.copySync(s,i,{preserveTimestamps:!0}),t&&(tt.default.copySync(d,l,{preserveTimestamps:!0}),tt.default.existsSync(p)&&tt.default.copySync(p,m,{overwrite:!1,preserveTimestamps:!0}),tt.default.copySync(h,_,{overwrite:!1,preserveTimestamps:!0}),tt.default.existsSync(p)&&tt.default.copySync(p,a,{overwrite:!1,preserveTimestamps:!0}),c.map(async b=>{let w=`${s}/${b}`,I=`${o}/${b}`;tt.default.copySync(w,I,{preserveTimestamps:!0})}))}catch(b){console.error(b)}}var Pa=T(require("node:fs")),Ta=T(require("node:path"));var Th=T(xa()),Ah=T(Mn()),Fh=T(Ot());var Sh=T(require("node:crypto")),qt=T(require("node:fs")),mr=T(require("node:path")),Ra=T(Tt());var gi=ne();function wh(){let{__cx:e}=gi.paths(),t=mr.default.join(e,"apiCache");qt.default.existsSync(t)||qt.default.mkdirSync(t),console.info("Cache initialized")}function Dh(e){let{__cx:t}=gi.paths(),r=mr.default.join(t,"apiCache"),n=Sh.default.createHash("sha256");return n.update(JSON.stringify(e)),`${r}/${n.digest("hex")}`}function Ch(e,t){let r=typeof t=="string"?t:JSON.stringify(t),n=Dh(e),i=mr.default.dirname(n);qt.default.existsSync(i)||qt.default.mkdirSync(i,{recursive:!0}),qt.default.writeFileSync(n,r,"utf8")}function xh(e){try{let t=Dh(e);return Ra.default.readJSONSync(t,{encoding:"utf-8"})}catch{return null}}function eb(){let{__cx:e}=gi.paths(),r=`${mr.default.join(e,"apiCache")}/siteHash.json`;try{return Ra.default.readJSONSync(r,{encoding:"utf-8"})||{}}catch{return{}}}function Rh(e,t){let r=eb(),n=r[e],i=t||n||new Date().valueOf(),{__cx:o}=gi.paths(),s=`${mr.default.join(o,"apiCache")}/siteHash.json`;return i!==n&&(r[e]=i,qt.default.writeFileSync(s,JSON.stringify(r),{encoding:"utf-8"})),i.toString()}var Oh=T(xa()),Ih=T(Mn());var Oa=class{user;password;baseUrl;headers;constructor(){this.user=X.GRIDDO_BOT_USER,this.password=X.GRIDDO_BOT_PASSWORD,this.baseUrl=X.GRIDDO_API_URL}async login(){try{let t=await(0,Oh.default)({url:le.LOGIN,method:"POST",headers:{"Content-Type":"application/json"},data:{username:this.user,password:this.password}});if(t.status===200){let{data:{token:r}}=t;this.headers={Authorization:"bearer "+r,"Cache-Control":"no-store"}}return this.headers}catch{console.error(Ih.default.red(`
|
|
43
55
|
\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
|
|
44
56
|
\u2502 Access credentials failure \u2502
|
|
45
57
|
\u2502 Check that the login details are correct in your .env file \u2502
|
|
46
58
|
\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
|
|
47
|
-
`)),process.exit(1)}}},
|
|
48
|
-
Max attempts ${
|
|
59
|
+
`)),process.exit(1)}}},pt=new Oa;Fh.default.config();var{env:{RETRY_WAIT_SECONDS:tb="4",RETRY_ATTEMPTS:Ph="4"}}=process;async function Ia(e,t,r=""){let{endpoint:n,body:i,cacheKey:o="",attempt:a=1,headers:s}=e,c={endpoint:n,body:i,headers:s,cacheKey:o};if(o){let d=new Date,l=xh(c);if(l){let p=Wo(l),m=p?`site: ${p}`:"",h=Ho(new Date().getTime()-d.getTime());return Ft(`${t} (cache) ${m} ${n} - ${h}s ${r}`),l}}try{let d=new Date,{data:l}=await(0,Th.default)({url:n,method:t,headers:Object.assign({},s,pt.headers),data:i}),p=Wo(l),m=p?`site: ${p}`:"",h=Ho(new Date().getTime()-d.getTime());return Ft(`${t} (fetch) ${m} ${n} - ${h}s ${r}`),Ch(c,l),l}catch(d){let l=d;return l.response?.status===404?null:(a>parseInt(Ph)&&(console.log(`
|
|
60
|
+
Max attempts ${Ph} reached
|
|
49
61
|
--------------------------------------
|
|
50
|
-
- ${
|
|
62
|
+
- ${t.toUpperCase()} ${n}
|
|
51
63
|
- BODY: ${JSON.stringify(i)}
|
|
52
|
-
- HEADERS: ${JSON.stringify(
|
|
53
|
-
- RESPONSE: ${
|
|
64
|
+
- HEADERS: ${JSON.stringify(s)}
|
|
65
|
+
- RESPONSE: ${l.response?.status,JSON.stringify(l.response?.data)}
|
|
54
66
|
--------------------------------------
|
|
55
|
-
`),process.exit(1)),
|
|
56
|
-
`),p=r?`Code: ${
|
|
57
|
-
Response: ${JSON.stringify(c)}`:"",
|
|
58
|
-
${i}`;console.warn(
|
|
67
|
+
`),process.exit(1)),l.response||(console.log("Unknown error occurred"),console.log(JSON.stringify(l,null,2)),process.exit(1)),rb(l,{callInfo:{endpoint:n,body:i}}),console.warn(`Waiting for retry: ${t}`,n),await Xo(parseInt(tb)*1e3),Ia({endpoint:n,body:i,headers:s,cacheKey:o,attempt:a+1},t,r))}}async function Me(e){return await Ia(e,"get")}async function vi(e){let{endpoint:t,body:r,headers:n}=e,i=t.endsWith("/distributor")&&`# Distributor body: ${JSON.stringify(r)} lang: ${JSON.stringify(n?.lang)}`;return await Ia(e,"post",i||"")}function rb(e,t){let{response:r,message:n,stack:i}=e,{callInfo:o}=t,{status:a,statusText:s,data:c}=r||{},d=[];for(let h of Object.keys(o))d.push(`${h}: ${typeof o[h]=="object"?JSON.stringify(o[h]):o[h]}`);let l=d.join(`
|
|
68
|
+
`),p=r?`Code: ${a} - ${s}
|
|
69
|
+
Response: ${JSON.stringify(c)}`:"",m=`${n}
|
|
70
|
+
${i}`;console.warn(Ah.default.bold.red(`
|
|
59
71
|
=============
|
|
60
72
|
|
|
61
73
|
{ Call info }
|
|
62
|
-
${
|
|
74
|
+
${l}
|
|
63
75
|
|
|
64
76
|
{ API Response }
|
|
65
77
|
${p}
|
|
66
78
|
|
|
67
79
|
{ Error details }
|
|
68
|
-
${
|
|
80
|
+
${m}
|
|
69
81
|
|
|
70
82
|
=============
|
|
71
|
-
`))}
|
|
83
|
+
`))}var nb=ne(),Aa=class{robots;baseURL;settings;endpoint;constructor(){this.robots=[],this.settings={},this.endpoint=le.ROBOTS}async getRobots(){try{let t=await Me({endpoint:this.endpoint});this.robots=t?.filter(r=>!!r.path).map(({path:r,content:n})=>({path:r,content:n||`User-agent: *
|
|
72
84
|
\r
|
|
73
|
-
\rAllow: /`}))||[]}catch(e){console.warn(`${this.constructor.name}: ${e.message}`)}}async writeFiles(e){let{__cx:r}=Pv.paths(e),n=ro.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(to.default.existsSync(n)){let s=ro.default.join(n,"robots.txt");to.default.writeFileSync(s,i?.content)}else console.log(`${n} not found`)}},oh=new no;var Kh=A(require("node:path")),Qh=A(nt()),Zh=A(is());var ah=A(nt());ah.default.config();var io=process.env.API_URL,ft=`${io}/site/`,rt={GET_ALL:`${io}/sites/all`,GET_PAGE:[`${io}/page/`,""],INFO:[`${ft}`,"/all"],LANGUAGES:[`${ft}`,"/languages"],BUILD_START:[`${ft}`,"/build/start"],BUILD_END:[`${ft}`,"/build/end"],GET_DISTRIBUTOR_DATA:[`${ft}`,"/distributor"],GET_SITEMAP:[`${ft}`,"/sitemap"],SOCIALS:[`${ft}`,"/socials"],GET_PAGES:[`${ft}`,"/pages?pagination=false"]},me=class{static async getAll(){let{GET_ALL:e}=rt;return await Oe({endpoint:e})}static async getPage(e,r){let{GET_PAGE:[n,i]}=rt;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async getInfo(e,r=""){let{INFO:[n,i]}=rt;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async getLanguages(e,r=""){let{LANGUAGES:[n,i]}=rt;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async startSiteRender(e){let{BUILD_START:[r,n]}=rt;return await Oe({endpoint:`${r}${e}${n}`})}static async endSiteRender(e,r){let{BUILD_END:[n,i]}=rt;return await Or({endpoint:`${n}${e}${i}`,body:r})}static async getDistributorData(e,r,n,i,s){let{GET_DISTRIBUTOR_DATA:[o,a]}=rt,c=i||e.site,d=s||e.language;return await Or({endpoint:`${o}${c}${a}`,body:r,headers:{lang:d},cacheKey:n})}static async getSitemap(e){let{GET_SITEMAP:[r,n]}=rt;return await Oe({endpoint:`${r}${e}${n}`})}static async getSocials(e,r=""){let{SOCIALS:[n,i]}=rt;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:r})}};var Vn=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 $e(`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 $e(`Warning: Page with id: ${r.id} has a ReferenceField with empty \`data.sources\``,"Empty data.sources in ReferenceField"),[];let{site:s,lang:o}=n;!n.sources&&n.mode==="auto"&&$e(`Warning: Page with id: ${r.id} has a ReferenceField with \`undefined\` \`data.sources\``,"undefined data.sources in ReferenceField");let 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 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 Yn=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 w=b.find(x=>typeof x=="number");return typeof w=="number"?w: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 so=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 Or({endpoint:e})}},oo=new so;var lh=A(nt());lh.default.config();var Dv=25;function Ov({socialTitle:t,socialDescription:e,socialImage:r}){return{type:"website",title:t,description:e,image:r?ws(r,1280,768):"",twitterImage:r?ws(r,1280,768):""}}function Iv(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 co(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:w,siteScript:x,siteSlug:F,socials:j,theme:B,navigations:{header:L,footer:V}}=e;t.breadcrumb=o,t.siteSlug=F,t.apiUrl=u,t.publicApiUrl=e.publicBaseUrl,t.instance=e.instance;let Te=m.find(({id:I})=>I===t?.language)?.locale.replace(/_/g,"-"),Z=Iv(t),D=Ov({socialDescription:a,socialImage:c,socialTitle:d}),q=i.compose,k=new Date().toString();return{path:q,size:void 0,context:{id:r,title:n,fullPath:i,locale:Te,languageId:s,theme:B,siteMetadata:b,pageMetadata:Z,openGraph:D,socials:j,siteLangs:m,cloudinaryName:p,siteOptions:w,griddoVersion:g,renderDate:k,siteScript:x,header:L,footer:V,page:t}}}async function fh(t,e){return await co(t,e)}async function dh({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:ao(m,p,{addEndingSlash:!0})},fullUrl:ao(t.fullUrl,p,{addEndingSlash:!0}),slug:ao(t.slug,p),title:uh(t.title,p),metaTitle:uh(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 co(b,o)});return Promise.all(a)}function hh(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||"",w=c.fullUrl.endsWith("/")?c.fullUrl.slice(0,-1):c.fullUrl,x=d?.replace(/\//g,""),j=d==="/"?x:x+"/",B=b.endsWith("/")?"":"/",L=`${b}${B}${j}`;return m.trim()&&(c.title=m),g.trim()&&(c.metaDescription=g),c.id=parseInt("-"+c.id+a),c.fullUrl=`${w}/${j}`,c.fullPath.compose=L,c.slug=L,c.template.activeSectionSlug=d,c.template.activeSectionBase=w,c.metaTitle=p.trim()||m.trim()||c.metaTitle,await co(c,e)});return Promise.all(s)}function ph(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 Fv(t,e,r){return e?.slice(t*(r-1),t*r)}function Av(t,e){let r=Math.ceil(e.length/t)||1;return Array.from({length:r},(i,s)=>s+1)?.map(i=>Fv(t,e,i))}function mh(t){let e=t.queriedItems||[],r=t?.itemsPerPage||Dv;return Av(r,e)}function ch(t){return t.replace(/\/+$/,"/")}function ao(t,e,r){let n=t.endsWith("/")?"":"/",i=r?.addEndingSlash?"/":"";return e<=1?ch(`${t}${i}`):ch(`${t}${n}${e}${i}`)}function uh(t,e){return!t||e<=1?t:`${t} - ${e}`}var It=A(require("node:path")),Lr=A(yt()),Ho=A($h());var xb=process.env.API_URL,Eb=!!process.env.GRIDDO_RENDER_ALL_SITES||!!process.env.updateAllSites,ir=process.env.GRIDDO_RENDER_SITE&&parseInt(process.env.GRIDDO_RENDER_SITE)||process.env.testSite&&parseInt(process.env.testSite),Bh=(process.env.GRIDDO_RENDER_PAGES||process.env.testPage||"").split(",").map(t=>parseInt(t)).filter(Boolean),Xh=te();async function Gh(t){console.info(`API URL ${xb}`),await tt.login();let e=await me.getAll(),r=Eb?e.filter(s=>!ir||s.id===ir):e.filter(s=>ir?s.id===ir:!!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=>ir?s.id===ir:!!s.isPublished&&s.domains.length>0),i=r.filter(s=>!s.isPublished&&s.shouldBeUpdated);return{sitesToPublish:n,sitesToUnpublish:i}}async function Hh(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 zh(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:d}=e,{headers:u,footers:p}=r,g=Bh.length?Bh.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 Wh(){let{__cx:t}=Xh.paths(),{buildProcessData:e}=await ls(),r=await tt.login(),n=Object.keys(e).map(s=>({...e[s],siteId:parseInt(s)})),i={authControl:r,sites:n};Lr.default.writeFileSync(It.default.join(t,"dist","__build-report__.json"),JSON.stringify(i)),_t(`Build report saved for ${n.length} site(s)`)}async function Jh(){let{sitesToPublish:t}=await ls(),{__cx:e}=Xh.paths(),r=It.default.join(e,"dist");for(let n of t){let{id:i,languages:s}=n;for(let o of s){tt.headers&&(tt.headers.lang=o.id.toString());let a=await me.getSitemap(i);if(!a)continue;let{items:c,url:{home:d,domain:u}}=a;if(!d)continue;let p=n.domains.find(j=>Object.keys(j)[0]==o.id.toString());if(!p)continue;let g=Object.values(p)[0],m=[],b=Object.keys(c),w=It.default.join(r,g.replace(u,""));for(let j of b){let B=c[j];if(!B.length)continue;let L=(0,Ho.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:B}),V=`/sitemap-${j.toLowerCase()}.xml`,ce=It.default.join(w,V);Uh(ce,L),m.push(`${d.endsWith("/")?d.slice(0,-1):d}${V}`)}if(!m.length)continue;let x=(0,Ho.parse)("sitemapindex",{"@":{xmlns:"http://www.sitemaps.org/schemas/sitemap/0.9"},sitemap:m.map(j=>({loc:j}))}),F=It.default.join(w,"sitemap.xml");Uh(F,x)}}}function Uh(t,e){try{let r=It.default.dirname(t);Lr.default.existsSync(r)||Lr.default.mkdirSync(r,{recursive:!0}),Lr.default.writeFileSync(t,e)}catch(r){console.error(`Error saving file: ${r}`)}}var Vh=te();Qh.default.config();var Cb=process.env.API_URL,Pb=process.env.GRIDDO_REACT_APP_INSTANCE||process.env.REACT_APP_INSTANCE,Yh=parseInt(process.env.GRIDDO_API_CONCURRENCY_COUNT||"10"),Db=process.env.PUBLIC_API_URL,Ob=new Date().valueOf().toString();async function ep(t){Bl(),console.info(`API calls with ${Yh} threads`);let{__cx:e}=Vh.paths(),{griddoVersion:r}=Vh,n=Kh.default.join(e,"store");try{let i=[],s={},{sitesToPublish:o,sitesToUnpublish:a}=await Gh(t);await oo.getAll(),o.length||a.length||(console.warn("There are no sites to update"),process.exit(0)),console.info(`Sites to publish: ${bs(o)}`),console.info(`Sites to unpublish: ${bs(a)}`),await Hh(a);for(let c of o){let{id:d,slug:u,theme:p,favicon:g,changedPages:m=[],pages:b=[]}=c,{siteInfo:w,validPagesIds:x,siteHash:F,unpublishHashes:j,siteLangs:B,defaultLang:L,headers:V,footers:ce,socials:Te}=await zh(d),{cloudinaryName:Z,useMetaTitle:D,useMetaKeywords:q,showBasicMetaRobots:k,avoidHrefLangsOnCanonicals:z,avoidSelfReferenceCanonicals:I,avoidHrefLangXDefault:G,avoidDebugMetas:O}=oo.settings;s[d]={siteHash:F,unpublishHashes:j,publishHashes:[]};let U=new Yn;U.navigations={headers:V,footers:ce},c.languages=B;let M=Qd(d,F),P=w.siteScript,R={siteUrl:w.slug,title:w.name,favicon:g},He={baseUrl:Cb,publicBaseUrl:Db,instance:Pb,siteSlug:u,theme:p,siteMetadata:R,socials:Te,siteLangs:B,cloudinaryName:Z,griddoVersion:r,siteOptions:{useMetaTitle:D,useMetaKeywords:q,showBasicMetaRobots:k,avoidHrefLangsOnCanonicals:z,avoidSelfReferenceCanonicals:I,avoidHrefLangXDefault:G,avoidDebugMetas:O},siteScript:P};_t(`${c.name} site`);let Ke=async h=>{let f=[],v=await me.getPage(h,M);if(!v)return;i.push(h);let S=JSON.parse(JSON.stringify(He));S.navigations=U.getPageNavigations(v);let _=await Vn.getDistributorData({page:v,cacheKey:Ob}),N=await ph(_),X=v?.mode==="list",W=!X&&N,xe=!W&&!X;if(X){let le={page:v,pages:mh(_),isRoot:!1,defaultLang:L,template:_,totalQueriedItems:_.queriedItems};f=await dh(le,S)}if(W){let le=v;le.template=_,le.multiPageElements=N,le.defaultLang=L,f=await hh(le,S)}if(xe){let le=v;le.template=_,le.defaultLang=L,f=[await fh(le,S)]}v.hash!==null&&s[d].publishHashes.push(v.hash),Xl(f)},{pagesMissingInStore:ue,pagesToDeleteFromStore:ge,pagesToWriteToStore:pt}=await Gl(n,{sitesToPublish:o,pages:b,validPagesIds:x,changedPages:m});Cn(ge),$(`Store site: ${c.name}`),$(`${x.length} valid pages from API`),$(`changed ${m.length} pages from API`),$(`deleted ${ge.length} pages from store`),$(`missing ${ue.length} pages in store`),$(`write ${pt.length} pages to store`);let Se=(0,Zh.default)(Yh),l=pt.map(h=>Se(()=>Ke(h)));await Promise.all(l)}Ul(n,{buildProcessData:s,createdPages:i,sitesToPublish:o})}catch(i){console.error(i.message),process.exit(1)}}async function tp(t){Jd(),await ep(t),ff()}var Ib=process.env.API_URL,Fb={GET_ALL:`${Ib}/domains`},pi=class{static async getAll(){let{GET_ALL:e}=Fb;return await Oe({endpoint:e})}};async function rp(){await tt.login();let t=await pi.getAll();return $(`Getting domains slugs (${t.length})`),Ab(t)}function Ab(t){let e=t.filter(({slug:r})=>!!r).map(({slug:r})=>r.replace("/",""));return[...new Set(e)]}var ip=te(),{__cx:Rb}=ip.paths(),np=sr.default.join(Rb,".render-sentinel");async function zo(){lf("gatsby"),$r.default.writeFileSync(np,new Date().toISOString());let t=await rp();t.length||xs(vf);for(let e of t){let{__ssg:r,__exports:n,__caches:i,__cx:s,__components:o}=ip.paths(e);$e(`Initializing render for the domain ${e}`,"",1,0);let a=mf(e),c=!!a&&a!=="";await Be({name:"Clean",attempts:Je.clean,steps:[()=>Sr(s,["store","apiCache","dist"]),()=>$("clean `store`, `apiCache` and `dist` directories from `__cx`"),()=>Sr(r,["dist","public","static",".cache"]),()=>$("clean `dist`, `public`, `static` and `.cache` directories from `__ssg`"),()=>Ve("Clean LifeCycle")]}),await Be({name:"Prepare",attempts:Je.prepare,steps:[()=>Pn([n]),()=>$("create `exports/sites/<domain>` directory"),()=>Pn([i]),()=>$("create `caches/<domain>` directory"),()=>Ve("prepare LifeCycle")]}),await Be({name:"Restore",attempts:Je.restore,steps:[()=>Dn(o,r,["static"]),()=>$("copy `static` directory from `__components` to `__ssg`"),()=>Dn(n,s,["assets"]),()=>$("copy `assets` directory from `__exports` to `__cx`"),()=>Dn(n,r,["dist"]),()=>{$r.default.existsSync(sr.default.join(r,"dist"))&&$r.default.renameSync(sr.default.join(r,"dist"),sr.default.join(r,"public"))},()=>$("rename `__ssg/dist` to `__ssg/public` directory."),()=>Wt(i,s,["apiCache","store"]),()=>$("move `apiCache` and `store` directories from `__caches` to `__cx`"),()=>Wt(i,r,[".cache"]),()=>$("move `.cache` directory from `__caches` to `__ssg`"),()=>Ve("Restore LifeCycle")]}),await Be({name:"Data",attempts:Je.data,steps:[()=>tp(e),()=>Ve("Data LifeCycle")]}),await Be({name:"SSG",attempts:Je.ssg,steps:[()=>gf(a),()=>Ve("SSG LifeCycle")]}),await Be({name:"Relocation",attempts:Je.relocation,steps:[()=>yf(e,c),()=>$("create an `assets` directory from `public`"),()=>Ve("Relocation LifeCycle")]}),await Be({name:"Meta",attempts:Je.meta,steps:[()=>Wh(),()=>$("create build report from `store/metadata/render-info.json`"),()=>oh.writeFiles(e),()=>$("create Robots.txt"),()=>Jh(),()=>$("generate sitemaps"),()=>Ve("Meta LifeCycle")]}),await Be({name:"Archive",attempts:Je.archive,steps:[()=>Vl(),()=>$("remove virtual pages from store (multipage and static list)"),()=>hs(sr.default.join(s,"dist")),()=>$("remove empty site directories from `__cx/dist`"),()=>Wt(s,n,["dist","assets"],{withBackup:!0}),()=>$("move `dist` and `assets` directories from `__cx` to `__exports`"),()=>Wt(s,i,["apiCache","store"]),()=>$("move `apiCache` and `store` directories from `__cx` to `__caches`"),()=>Wt(r,i,[".cache"]),()=>$("move `.cache` directory from `__ssg` to `__caches`"),()=>Ve("Archive LifeCycle")]}),await Be({name:"Clean",attempts:Je.clean,steps:[()=>Sr(r,["static","public","dist"]),()=>Ve("Clean LifeCycle")]}),await Be({name:"HealthCheck",attempts:1,steps:[()=>{$r.default.existsSync(np)||xs(bf)}]})}}async function Tb(){try{let t=await _s(zo);$e(`All domains rendered in ${t}s.`,"",1,0),process.exit(0)}catch(t){console.log(t),process.exit(1)}}0&&(module.exports={startRender});
|
|
85
|
+
\rAllow: /`}))||[]}catch(t){console.warn(`${this.constructor.name}: ${t.message}`)}}async writeFiles(t){let{__cx:r}=nb.paths(t),n=Ta.default.join(r,"dist");await this.getRobots();let i=this.robots.find(({path:o})=>o===`/${t}`);if(!i){console.log(`Robots not found for ${t}`);return}if(Pa.default.existsSync(n)){let o=Ta.default.join(n,"robots.txt");Pa.default.writeFileSync(o,i?.content)}else console.log(`${n} not found`)}},Lh=new Aa;var Pm=T(require("node:path")),Tm=T(Ot()),Am=T(Co());async function kh(){return await Me({endpoint:le.GET_ALL})}async function Nh(e,t){return await Me({endpoint:`${le.GET_PAGE}/${e}`,cacheKey:t})}async function Mh(e,t=""){let[r,n]=le.INFO;return await Me({endpoint:`${r}${e}${n}`,cacheKey:t})}async function Fa(e,t=""){let[r,n]=le.LANGUAGES;return await Me({endpoint:`${r}${e}${n}`,cacheKey:t})}async function La(e){let[t,r]=le.BUILD_START;return await Me({endpoint:`${t}${e}${r}`})}async function qh(e,t){let[r,n]=le.BUILD_END;return await vi({endpoint:`${r}${e}${n}`,body:t})}async function jh(e,t,r,n,i){let[o,a]=le.GET_REFERENCE_FIELD_DATA,s=n||e.site,c=i||e.language;return await vi({endpoint:`${o}${s}${a}`,body:t,headers:{lang:c},cacheKey:r})}async function $h(e){let[t,r]=le.GET_SITEMAP;return await Me({endpoint:`${t}${e}${r}`})}async function Gh(e,t=""){let[r,n]=le.SOCIALS;return await Me({endpoint:`${r}${e}${n}`,cacheKey:t})}var _i=class{static getBody(t,r){let{order:n,sources:i,quantity:o,mode:a,fixed:s,fullRelations:c=!1,allLanguages:d=!1,preferenceLanguage:l=!1,referenceId:p}=t;return a==="auto"?{mode:a,order:n,sources:i,quantity:o,fullRelations:c,allLanguages:d,preferenceLanguage:l}:a==="manual"?{mode:a,fixed:s,fullRelations:c}:a==="navigation"?{mode:a,order:n,quantity:o,fullRelations:c,referenceId:p||r?.structuredDataContent?.id}:(console.log(`Error: Distribuidor mode: ${a} is not recognized on page ${r?.id}.`),t)}static async fetchContentTypeData(t){let{page:r,component:{data:n},cacheKey:i}=t;if(!n)return We(`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 We(`Warning: Page with id: ${r.id} has a ReferenceField with empty \`data.sources\``,"Empty data.sources in ReferenceField"),[];let{site:o,lang:a}=n;!n.sources&&n.mode==="auto"&&We(`Warning: Page with id: ${r.id} has a ReferenceField with \`undefined\` \`data.sources\``,"undefined data.sources in ReferenceField");let s=this.getBody(n,r);return await jh(r,s,i,o,a)}static async getDistributorData({page:t,cacheKey:r=""}){try{let{template:n}=t,i=async(s,c=1)=>{if(!(!s||typeof s!="object")&&JSON.stringify(s).includes('"hasDistributorData":true'))for(let d in s){if(d==="queriedItems")continue;let p=s[d];!p||typeof p!="object"||(p.hasDistributorData&&(p.queriedItems=await this.fetchContentTypeData({page:t,cacheKey:r,component:p})),await i(p,c+1))}};return await(async s=>(await i([s]),s))(n)}catch(n){console.error(`Error en get distributor ${n}`),process.exit(1)}}};var Ei=class{_defaultHeaders;_defaultFooters;_navigations;constructor(){this._navigations={footers:[],headers:[]},this._defaultHeaders={},this._defaultFooters={}}set navigations(t){this._navigations=t,this._defaultFooters=this.getDefaultFooters(),this._defaultHeaders=this.getDefaultHeaders()}get navigations(){return this._navigations}getDefaultFooters(){return[...this.navigations.footers].filter(i=>!!i.setAsDefault).reduce((i,o)=>{let{language:a}=o;return{...i,[a]:o}},{})}getDefaultHeaders(){return[...this.navigations.headers].filter(i=>!!i.setAsDefault).reduce((i,o)=>{let{language:a}=o;return{...i,[a]:o}},{})}getRightLanguage(t,r,n){if(!t||!r)return null;let o=t.find(a=>a.language===n&&a.navigationLanguages?.find(s=>s.navigationId===r))||t.find(a=>a.id===r);return o?{...o}:null}getPageHeader(t,r){return this.getRightLanguage(this.navigations.headers,t,r)}getPageFooter(t,r){return this.getRightLanguage(this.navigations.footers,t,r)}getPageNavigations(t){let{header:r,footer:n,language:i,template:{templateType:o},templateConfig:{defaultHeader:a,defaultFooter:s,templates:c}}=t,d=_=>{let b=_.find(w=>typeof w=="number");return typeof b=="number"?b:null},l=d([r,c?.[o]?.defaultHeader,a]),p=d([n,c?.[o]?.defaultFooter,s]),m=l?this.getPageHeader(l,i):l===0?null:this._defaultHeaders[i],h=p?this.getPageFooter(p,i):p===0?null:this._defaultFooters[i];return{header:m,footer:h}}};async function Bh(){return await Me({endpoint:le.SETTINGS})}var Hh=T(Ot());Hh.default.config();var ib=25;function ob({socialTitle:e,socialDescription:t,socialImage:r}){return{type:"website",title:e,description:t,image:r?Jo(r,1280,768):"",twitterImage:r?Jo(r,1280,768):""}}function ab(e){let{title:t,metaTitle:r,metaDescription:n,canonicalURL:i,locale:o,url:a,isIndexed:s,follow:c,metasAdvanced:d,pageLanguages:l,fullUrl:p,metaKeywords:m}=e,h=d?.split(",").filter(Boolean).map(_=>_.trim().toLowerCase())||[];return{title:(r||t||"").trim(),description:n,canonical:i&&i.trim()&&i!==p?i.trim():s?p:void 0,locale:o,url:a,index:s?"index":"noindex",follow:c?"follow":"nofollow",translate:h.includes("notranslate")?"notranslate":"",metasAdvanced:h.filter(_=>_!=="notranslate").join(),pageLanguages:l,metaKeywords:m?.filter(Boolean).map(_=>_.replace(/"/g,"'")).join(", ")}}async function Na(e,t){let{id:r,title:n,fullPath:i,language:o,breadcrumb:a,socialDescription:s,socialImage:c,socialTitle:d}=e,{baseUrl:l,cloudinaryName:p,griddoVersion:m,siteLangs:h,siteMetadata:_,siteOptions:b,siteScript:w,siteSlug:I,socials:F,theme:P,navigations:{header:L,footer:K}}=t;e.breadcrumb=a,e.siteSlug=I,e.apiUrl=l,e.publicApiUrl=t.publicBaseUrl,e.instance=t.instance;let $e=h.find(({id:U})=>U===e?.language)?.locale.replace(/_/g,"-"),ce=ab(e),x=ob({socialDescription:s,socialImage:c,socialTitle:d}),q=i.compose,M=new Date().toString();return{path:q,size:void 0,context:{id:r,title:n,fullPath:i,locale:$e,languageId:o,theme:P,siteMetadata:_,pageMetadata:ce,openGraph:x,socials:F,siteLangs:h,cloudinaryName:p,siteOptions:b,griddoVersion:m,renderDate:M,siteScript:w,header:L,footer:K,page:e}}}async function Wh(e,t){return await Na(e,t)}async function Yh({page:e,pages:t,isRoot:r=!1,defaultLang:n,template:i,totalQueriedItems:o},a){let s=t.map(async(c,d)=>{let l=d===0,p=d+1,{domainUrl:m,compose:h}=e.fullPath,_={...e,id:parseInt("-"+e.id+d),fullPath:{...e.fullPath,compose:ka(h,p,{addEndingSlash:!0})},fullUrl:ka(e.fullUrl,p,{addEndingSlash:!0}),slug:ka(e.slug,p),title:Xh(e.title,p),metaTitle:Xh(e.metaTitle||"",p),disableHrefLangs:p>1,template:{...i,isFirstPage:l,pageNumber:p,totalPages:t.length,baseLink:`${m}${h}`,queriedItems:c,totalQueriedItems:o?.length},isRoot:r,defaultLang:n};return await Na(_,a)});return Promise.all(s)}function Vh(e,t){let{multiPageElements:r,...n}=e,i=JSON.parse(JSON.stringify(r));i.find(({sectionSlug:a})=>a==="/")||i.push({});let o=i.map(async(a,s)=>{let c=JSON.parse(JSON.stringify(n)),{sectionSlug:d="/",title:l="",metaTitle:p="",metaDescription:m=""}=a,h=typeof l=="string"?l:l.content,_=c.fullPath.compose||"",b=c.fullUrl.endsWith("/")?c.fullUrl.slice(0,-1):c.fullUrl,w=d?.replace(/\//g,""),F=d==="/"?w:w+"/",P=_.endsWith("/")?"":"/",L=`${_}${P}${F}`;return h.trim()&&(c.title=h),m.trim()&&(c.metaDescription=m),c.id=parseInt("-"+c.id+s),c.fullUrl=`${b}/${F}`,c.fullPath.compose=L,c.slug=L,c.template.activeSectionSlug=d,c.template.activeSectionBase=b,c.metaTitle=p.trim()||h.trim()||c.metaTitle,await Na(c,t)});return Promise.all(o)}function zh(e){return new Promise(r=>{let n=(i,o=0)=>{if(!(!i||typeof i!="object")){for(let a in i){let s=i[a],c=s||typeof s=="object",d=JSON.stringify(s).includes('"hasGriddoMultiPage":true');if(!c||!d)continue;let{component:l,hasGriddoMultiPage:p,elements:m}=s;l&&p&&r(m||[]),n(s,o+1)}o||r(null)}};n([e])})}function sb(e,t,r){return t?.slice(e*(r-1),e*r)}function ub(e,t){let r=Math.ceil(t.length/e)||1;return Array.from({length:r},(i,o)=>o+1)?.map(i=>sb(e,t,i))}function Jh(e){let t=e.queriedItems||[],r=e?.itemsPerPage||ib;return ub(r,t)}function Uh(e){return e.replace(/\/+$/,"/")}function ka(e,t,r){let n=e.endsWith("/")?"":"/",i=r?.addEndingSlash?"/":"";return t<=1?Uh(`${e}${i}`):Uh(`${e}${n}${t}${i}`)}function Xh(e,t){return!e||t<=1?e:`${e} - ${t}`}var Bt=T(require("node:path")),Zr=T(Tt()),vs=T(bm());var wm=ne();async function Dm(e){console.info(`API URL ${X.GRIDDO_API_URL}`),await pt.login();let t=await kh(),r=X.GRIDDO_RENDER_ALL_SITES?t.filter(o=>!X.GRIDDO_RENDER_SITE||o.id===X.GRIDDO_RENDER_SITE):t.filter(o=>X.GRIDDO_RENDER_SITE?o.id===X.GRIDDO_RENDER_SITE:!!o.shouldBeUpdated);if(r.length)for(let o of r){let{items:a}=await Fa(o.id);o.domains=a.filter(s=>s.domain&&(s.domain.slug===e||s.domain.slug===`/${e}`)).map(s=>({[s.id]:`${s.domain.slug}${s.path}`}))}let n=r.filter(o=>X.GRIDDO_RENDER_SITE?o.id===X.GRIDDO_RENDER_SITE:!!o.isPublished&&o.domains.length>0),i=r.filter(o=>!o.isPublished&&o.shouldBeUpdated);return{sitesToPublish:n,sitesToUnpublish:i}}async function Cm(e){for(let t of e){let r=await La(t.id),{siteHash:n}=r,i={siteHash:n,publishHashes:[],unpublishHashes:[]};await qh(t.id,i)}}async function xm(e){let t=await La(e),r=await Mh(e),n=await Fa(e),i=await Gh(e),o=n.items,a=o.find(_=>_.isDefault),{siteHash:s,unpublishHashes:c,publishIds:d}=t,{headers:l,footers:p}=r,m=X.GRIDDO_RENDER_PAGES.length?X.GRIDDO_RENDER_PAGES.filter(_=>d.includes(_)):d;return{siteInfo:r,validPagesIds:m,siteHash:s,unpublishHashes:c,siteLangs:o,defaultLang:a,headers:l,footers:p,socials:i}}async function Rm(){let{__cx:e}=wm.paths(),{buildProcessData:t}=await To(),r=await pt.login(),n=Object.keys(t).map(o=>({...t[o],siteId:parseInt(o)})),i={authControl:r,sites:n};Zr.default.writeFileSync(Bt.default.join(e,"dist","__build-report__.json"),JSON.stringify(i)),Ft(`Build report saved for ${n.length} site(s)`)}async function Om(){let{sitesToPublish:e}=await To(),{__cx:t}=wm.paths(),r=Bt.default.join(t,"dist");for(let n of e){let{id:i,languages:o}=n;for(let a of o){pt.headers&&(pt.headers.lang=a.id.toString());let s=await $h(i);if(!s)continue;let{items:c,url:{home:d,domain:l}}=s;if(!d)continue;let p=n.domains.find(F=>Object.keys(F)[0]==a.id.toString());if(!p)continue;let m=Object.values(p)[0],h=[],_=Object.keys(c),b=Bt.default.join(r,m.replace(l,""));for(let F of _){let P=c[F];if(!P.length)continue;let L=(0,vs.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:P}),K=`/sitemap-${F.toLowerCase()}.xml`,se=Bt.default.join(b,K);Sm(se,L),h.push(`${d.endsWith("/")?d.slice(0,-1):d}${K}`)}if(!h.length)continue;let w=(0,vs.parse)("sitemapindex",{"@":{xmlns:"http://www.sitemaps.org/schemas/sitemap/0.9"},sitemap:h.map(F=>({loc:F}))}),I=Bt.default.join(b,"sitemap.xml");Sm(I,w)}}}function Sm(e,t){try{let r=Bt.default.dirname(e);Zr.default.existsSync(r)||Zr.default.mkdirSync(r,{recursive:!0}),Zr.default.writeFileSync(e,t)}catch(r){console.error(`Error saving file: ${r}`)}}var Im=ne();Tm.default.config();var ew=new Date().valueOf().toString();async function Fm(e){cf(),console.info(`API calls with ${X.GRIDDO_API_CONCURRENCY_COUNT} threads`);let{__cx:t}=Im.paths(),{griddoVersion:r}=Im,n=Pm.default.join(t,"store");try{let i=[],o={},{sitesToPublish:a,sitesToUnpublish:s}=await Dm(e);a.length||s.length||(console.warn("There are no sites to update"),process.exit(0)),console.info(`Sites to publish: ${Yo(a)}`),console.info(`Sites to unpublish: ${Yo(s)}`),await Cm(s);for(let c of a){let{id:d,slug:l,theme:p,favicon:m,changedPages:h=[],pages:_=[]}=c,{siteInfo:b,validPagesIds:w,siteHash:I,unpublishHashes:F,siteLangs:P,defaultLang:L,headers:K,footers:se,socials:$e}=await xm(d),{cloudinaryName:ce,useMetaTitle:x,useMetaKeywords:q,showBasicMetaRobots:M,avoidHrefLangsOnCanonicals:Q,avoidSelfReferenceCanonicals:U,avoidHrefLangXDefault:W,avoidDebugMetas:S}=await Bh();o[d]={siteHash:I,unpublishHashes:F,publishHashes:[]};let H=new Ei;H.navigations={headers:K,footers:se},c.languages=P;let k=Rh(d,I),R=b.siteScript,j={siteUrl:b.slug,title:b.name,favicon:m},he={baseUrl:X.GRIDDO_API_URL,publicBaseUrl:X.GRIDDO_PUBLIC_API_URL,instance:X.GRIDDO_REACT_APP_INSTANCE,siteSlug:l,theme:p,siteMetadata:j,socials:$e,siteLangs:P,cloudinaryName:ce,griddoVersion:r,siteOptions:{useMetaTitle:x,useMetaKeywords:q,showBasicMetaRobots:M,avoidHrefLangsOnCanonicals:Q,avoidSelfReferenceCanonicals:U,avoidHrefLangXDefault:W,avoidDebugMetas:S},siteScript:R};Ft(`${c.name} site`);let it=async ht=>{let mt=[],ze=await Nh(ht,k);if(!ze)return;i.push(ht);let Ut=JSON.parse(JSON.stringify(he));Ut.navigations=H.getPageNavigations(ze);let Je=await _i.getDistributorData({page:ze,cacheKey:ew}),rn=await zh(Je),vr=ze?.mode==="list",_r=!vr&&rn,Xt=!_r&&!vr;if(vr){let He={page:ze,pages:Jh(Je),isRoot:!1,defaultLang:L,template:Je,totalQueriedItems:Je.queriedItems};mt=await Yh(He,Ut)}if(_r){let He=ze;He.template=Je,He.multiPageElements=rn,He.defaultLang=L,mt=await Vh(He,Ut)}if(Xt){let He=ze;He.template=Je,He.defaultLang=L,mt=[await Wh(He,Ut)]}ze.hash!==null&&o[d].publishHashes.push(ze.hash),ff(mt)},{pagesMissingInStore:Xe,pagesToDeleteFromStore:ct,pagesToWriteToStore:Rt}=await df(n,{sitesToPublish:a,pages:_,validPagesIds:w,changedPages:h});Un(ct),Ne(`Store site: ${c.name}`),Ne(`${w.length} valid pages from API`),Ne(`changed ${h.length} pages from API`),Ne(`deleted ${ct.length} pages from store`),Ne(`missing ${Xe.length} pages in store`),Ne(`write ${Rt.length} pages to store`);let Ee=(0,Am.default)(X.GRIDDO_API_CONCURRENCY_COUNT),tn=Rt.map(ht=>Ee(()=>it(ht)));await Promise.all(tn)}lf(n,{buildProcessData:o,createdPages:i,sitesToPublish:a})}catch(i){console.error(i.message),process.exit(1)}}async function Lm(e){wh(),await Fm(e),Md()}var Es=T(require("node:fs")),bs=T(require("node:path"));var _s=class extends Error{constructor(){super(),this.name="InternalCXError",this.stack=""}};function qi({error:e,message:t,expected:r="",hint:n=""}){let i=[t,r,n].filter(Boolean).join(`
|
|
86
|
+
`);throw We(i,e,1,0),new _s}var km={id:100,error:"NoDomainsFoundError",message:"No domains found in this instance. The process cannot continue.",expected:"This can happen if the API is not functioning or the site is not properly configured, or the domains are not registered.",hint:"You can contact the instance administrator."},Nm={id:101,error:"RenderUUIDError",message:`Render sentinel file does not exist.
|
|
87
|
+
The rendering uuid cannot be read safely.
|
|
88
|
+
There was probably a instance deployment during the render and files were deleted.
|
|
89
|
+
|
|
90
|
+
The files generated in this render will not be published.`};var Mm=ne();function qm(){let{__cx:e}=Mm.paths(),t=bs.default.join(e,".render-sentinel");Es.default.writeFileSync(t,new Date().toISOString())}function jm(){let{__cx:e}=Mm.paths(),t=bs.default.join(e,".render-sentinel");Es.default.existsSync(t)||qi(Nm)}var tw=ne();async function rw(e){We(`Initializing render for the domain ${e}`,"",1,0),qm();let{__ssg:t,__exports:r,__caches:n,__cx:i,__components:o}=tw.paths(e),a=Gd(e),s=!!a&&a!=="";await et("Clean",{steps:[()=>kr(i,["store","apiCache","dist"]),()=>kr(t,["dist","public","static",".cache"])]}),await et("Prepare",{steps:[()=>Xn([r]),()=>Xn([n])]}),await et("Restore",{steps:[()=>Hn(o,t,["static"]),()=>Hn(r,i,["assets"]),()=>Hn(r,t,["dist"]),()=>{Ss.default.existsSync(en.default.join(t,"dist"))&&Ss.default.renameSync(en.default.join(t,"dist"),en.default.join(t,"public"))},()=>ar(n,i,["apiCache","store"]),()=>ar(n,t,[".cache"])]}),await et("Data",{steps:[()=>Lm(e)]}),await et("SSG",{steps:[()=>Bd(a)]}),await et("Relocation",{steps:[()=>Ud(e,s)]}),await et("Meta",{steps:[()=>Rm(),()=>Lh.writeFiles(e),()=>Om(),()=>zo("Meta LifeCycle")]}),await et("Archive",{steps:[()=>gf(),()=>Lo(en.default.join(i,"dist")),()=>ar(i,r,["dist","assets"],{withBackup:!0}),()=>ar(i,n,["apiCache","store"]),()=>ar(t,n,[".cache"])]}),await et("Clean",{steps:[()=>kr(t,["static","public","dist"])]}),await et("HealthCheck",{steps:[()=>jm()]})}async function ws(e){Rd("gatsby");for(let t of e)await rw(t)}var ji=class{static async getAll(){return await Me({endpoint:le.DOMAINS})}};async function $m(){await pt.login();let e=await ji.getAll();return e.length||qi(km),Ne(`getting domains names (${e.length})`),nw(e)}function nw(e){let t=e.filter(({slug:r})=>!!r).map(({slug:r})=>r.replace("/",""));return[...new Set(t)]}async function iw(){try{let e=await $m(),t=await Vo([()=>ws(e)]);We(`All domains rendered in ${t}s.`,"",1,0),process.exit(0)}catch(e){console.log(e),process.exit(1)}}0&&(module.exports={startRender});
|
|
91
|
+
/*! Bundled license information:
|
|
92
|
+
|
|
93
|
+
react/cjs/react.production.min.js:
|
|
94
|
+
(**
|
|
95
|
+
* @license React
|
|
96
|
+
* react.production.min.js
|
|
97
|
+
*
|
|
98
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
99
|
+
*
|
|
100
|
+
* This source code is licensed under the MIT license found in the
|
|
101
|
+
* LICENSE file in the root directory of this source tree.
|
|
102
|
+
*)
|
|
103
|
+
|
|
104
|
+
react/cjs/react.development.js:
|
|
105
|
+
(**
|
|
106
|
+
* @license React
|
|
107
|
+
* react.development.js
|
|
108
|
+
*
|
|
109
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
110
|
+
*
|
|
111
|
+
* This source code is licensed under the MIT license found in the
|
|
112
|
+
* LICENSE file in the root directory of this source tree.
|
|
113
|
+
*)
|
|
114
|
+
*/
|