@griddo/cx 11.0.12 → 11.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +9 -9
- package/build/index.js.map +2 -2
- package/build/run-start-render.js +10 -10
- package/build/run-start-render.js.map +2 -2
- package/build/start-render.js +10 -10
- package/build/start-render.js.map +2 -2
- package/exporter/services/store.ts +2 -1
- package/package.json +3 -3
package/build/start-render.js
CHANGED
|
@@ -6,7 +6,7 @@ GFS4: `),console.error(e)});H[de]||(Cs=global[de]||[],Is(H,Cs),H.close=function(
|
|
|
6
6
|
|
|
7
7
|
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:i,destStat:a}=await On.checkPaths(e,t,"copy",n);if(await On.checkParentPaths(e,i,t,"copy"),!await Ws(e,t,n))return;let r=Rn.dirname(t);await Ph(r)||await Ih(r),await Vs(a,e,t,n)}async function Ws(e,t,n){return n.filter?n.filter(e,t):!0}async function Vs(e,t,n,i){let o=await(i.dereference?he.stat:he.lstat)(t);if(o.isDirectory())return Nh(o,e,t,n,i);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return kh(o,e,t,n,i);if(o.isSymbolicLink())return qh(e,t,n,i);throw o.isSocket()?new Error(`Cannot copy a socket file: ${t}`):o.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${t}`):new Error(`Unknown file: ${t}`)}async function kh(e,t,n,i,a){if(!t)return Hs(e,n,i,a);if(a.overwrite)return await he.unlink(i),Hs(e,n,i,a);if(a.errorOnExist)throw new Error(`'${i}' already exists`)}async function Hs(e,t,n,i){if(await he.copyFile(t,n),i.preserveTimestamps){jh(e.mode)&&await Lh(n,e.mode);let a=await he.stat(t);await Ah(n,a.atime,a.mtime)}return he.chmod(n,e.mode)}function jh(e){return(e&128)===0}function Lh(e,t){return he.chmod(e,t|128)}async function Nh(e,t,n,i,a){t||await he.mkdir(i);let o=await he.readdir(n);await Promise.all(o.map(async r=>{let s=Rn.join(n,r),p=Rn.join(i,r);if(!await Ws(s,p,a))return;let{destStat:c}=await On.checkPaths(s,p,"copy",a);return Vs(c,s,p,a)})),t||await he.chmod(i,e.mode)}async function qh(e,t,n,i){let a=await he.readlink(t);if(i.dereference&&(a=Rn.resolve(process.cwd(),a)),!e)return he.symlink(a,n);let o=null;try{o=await he.readlink(n)}catch(r){if(r.code==="EINVAL"||r.code==="UNKNOWN")return he.symlink(a,n);throw r}if(i.dereference&&(o=Rn.resolve(process.cwd(),o)),On.isSrcSubdir(a,o))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${o}'.`);if(On.isSrcSubdir(o,a))throw new Error(`Cannot overwrite '${o}' with '${a}'.`);return await he.unlink(n),he.symlink(a,n)}Js.exports=Fh});var tc=g((rS,ec)=>{"use strict";var ge=Wt(),Cn=require("path"),Uh=Le().mkdirsSync,Bh=ja().utimesMillisSync,Tn=Dt();function Mh(e,t,n){typeof n=="function"&&(n={filter:n}),n=n||{},n.clobber="clobber"in n?!!n.clobber:!0,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
8
8
|
|
|
9
|
-
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:i,destStat:a}=Tn.checkPathsSync(e,t,"copy",n);if(Tn.checkParentPathsSync(e,i,t,"copy"),n.filter&&!n.filter(e,t))return;let o=Cn.dirname(t);return ge.existsSync(o)||Uh(o),Ks(a,e,t,n)}function Ks(e,t,n,i){let o=(i.dereference?ge.statSync:ge.lstatSync)(t);if(o.isDirectory())return Vh(o,e,t,n,i);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return $h(o,e,t,n,i);if(o.isSymbolicLink())return Kh(e,t,n,i);throw o.isSocket()?new Error(`Cannot copy a socket file: ${t}`):o.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${t}`):new Error(`Unknown file: ${t}`)}function $h(e,t,n,i,a){return t?Gh(e,n,i,a):Qs(e,n,i,a)}function Gh(e,t,n,i){if(i.overwrite)return ge.unlinkSync(n),Qs(e,t,n,i);if(i.errorOnExist)throw new Error(`'${n}' already exists`)}function Qs(e,t,n,i){return ge.copyFileSync(t,n),i.preserveTimestamps&&zh(e.mode,t,n),Na(n,e.mode)}function zh(e,t,n){return Xh(e)&&Hh(n,e),Wh(t,n)}function Xh(e){return(e&128)===0}function Hh(e,t){return Na(e,t|128)}function Na(e,t){return ge.chmodSync(e,t)}function Wh(e,t){let n=ge.statSync(e);return Bh(t,n.atime,n.mtime)}function Vh(e,t,n,i,a){return t?Zs(n,i,a):Jh(e.mode,n,i,a)}function Jh(e,t,n,i){return ge.mkdirSync(n),Zs(t,n,i),Na(n,e)}function Zs(e,t,n){ge.readdirSync(e).forEach(i=>Yh(i,e,t,n))}function Yh(e,t,n,i){let a=Cn.join(t,e),o=Cn.join(n,e);if(i.filter&&!i.filter(a,o))return;let{destStat:r}=Tn.checkPathsSync(a,o,"copy",i);return Ks(r,a,o,i)}function Kh(e,t,n,i){let a=ge.readlinkSync(t);if(i.dereference&&(a=Cn.resolve(process.cwd(),a)),e){let o;try{o=ge.readlinkSync(n)}catch(r){if(r.code==="EINVAL"||r.code==="UNKNOWN")return ge.symlinkSync(a,n);throw r}if(i.dereference&&(o=Cn.resolve(process.cwd(),o)),Tn.isSrcSubdir(a,o))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${o}'.`);if(Tn.isSrcSubdir(o,a))throw new Error(`Cannot overwrite '${o}' with '${a}'.`);return Qh(a,n)}else return ge.symlinkSync(a,n)}function Qh(e,t){return ge.unlinkSync(t),ge.symlinkSync(e,t)}ec.exports=Mh});var mi=g((sS,nc)=>{"use strict";var Zh=se().fromPromise;nc.exports={copy:Zh(Ys()),copySync:tc()}});var In=g((cS,ac)=>{"use strict";var ic=Wt(),ex=se().fromCallback;function tx(e,t){ic.rm(e,{recursive:!0,force:!0},t)}function nx(e){ic.rmSync(e,{recursive:!0,force:!0})}ac.exports={remove:ex(tx),removeSync:nx}});var dc=g((pS,uc)=>{"use strict";var ix=se().fromPromise,sc=ve(),cc=require("path"),pc=Le(),lc=In(),oc=ix(async function(t){let n;try{n=await sc.readdir(t)}catch{return pc.mkdirs(t)}return Promise.all(n.map(i=>lc.remove(cc.join(t,i))))});function rc(e){let t;try{t=sc.readdirSync(e)}catch{return pc.mkdirsSync(e)}t.forEach(n=>{n=cc.join(e,n),lc.removeSync(n)})}uc.exports={emptyDirSync:rc,emptydirSync:rc,emptyDir:oc,emptydir:oc}});var xc=g((lS,hc)=>{"use strict";var ax=se().fromPromise,mc=require("path"),it=ve(),fc=Le();async function ox(e){let t;try{t=await it.stat(e)}catch{}if(t&&t.isFile())return;let n=mc.dirname(e),i=null;try{i=await it.stat(n)}catch(a){if(a.code==="ENOENT"){await fc.mkdirs(n),await it.writeFile(e,"");return}else throw a}i.isDirectory()?await it.writeFile(e,""):await it.readdir(n)}function rx(e){let t;try{t=it.statSync(e)}catch{}if(t&&t.isFile())return;let n=mc.dirname(e);try{it.statSync(n).isDirectory()||it.readdirSync(n)}catch(i){if(i&&i.code==="ENOENT")fc.mkdirsSync(n);else throw i}it.writeFileSync(e,"")}hc.exports={createFile:ax(ox),createFileSync:rx}});var wc=g((uS,yc)=>{"use strict";var sx=se().fromPromise,vc=require("path"),ut=ve(),gc=Le(),{pathExists:cx}=lt(),{areIdentical:bc}=Dt();async function px(e,t){let n;try{n=await ut.lstat(t)}catch{}let i;try{i=await ut.lstat(e)}catch(r){throw r.message=r.message.replace("lstat","ensureLink"),r}if(n&&bc(i,n))return;let a=vc.dirname(t);await cx(a)||await gc.mkdirs(a),await ut.link(e,t)}function lx(e,t){let n;try{n=ut.lstatSync(t)}catch{}try{let o=ut.lstatSync(e);if(n&&bc(o,n))return}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let i=vc.dirname(t);return ut.existsSync(i)||gc.mkdirsSync(i),ut.linkSync(e,t)}yc.exports={createLink:sx(px),createLinkSync:lx}});var Sc=g((dS,_c)=>{"use strict";var dt=require("path"),Pn=ve(),{pathExists:ux}=lt(),dx=se().fromPromise;async function mx(e,t){if(dt.isAbsolute(e)){try{await Pn.lstat(e)}catch(o){throw o.message=o.message.replace("lstat","ensureSymlink"),o}return{toCwd:e,toDst:e}}let n=dt.dirname(t),i=dt.join(n,e);if(await ux(i))return{toCwd:i,toDst:e};try{await Pn.lstat(e)}catch(o){throw o.message=o.message.replace("lstat","ensureSymlink"),o}return{toCwd:e,toDst:dt.relative(n,e)}}function fx(e,t){if(dt.isAbsolute(e)){if(!Pn.existsSync(e))throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}let n=dt.dirname(t),i=dt.join(n,e);if(Pn.existsSync(i))return{toCwd:i,toDst:e};if(!Pn.existsSync(e))throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:dt.relative(n,e)}}_c.exports={symlinkPaths:dx(mx),symlinkPathsSync:fx}});var Rc=g((mS,Dc)=>{"use strict";var Ec=ve(),hx=se().fromPromise;async function xx(e,t){if(t)return t;let n;try{n=await Ec.lstat(e)}catch{return"file"}return n&&n.isDirectory()?"dir":"file"}function vx(e,t){if(t)return t;let n;try{n=Ec.lstatSync(e)}catch{return"file"}return n&&n.isDirectory()?"dir":"file"}Dc.exports={symlinkType:hx(xx),symlinkTypeSync:vx}});var Ic=g((fS,Tc)=>{"use strict";var gx=se().fromPromise,Oc=require("path"),
|
|
9
|
+
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:i,destStat:a}=Tn.checkPathsSync(e,t,"copy",n);if(Tn.checkParentPathsSync(e,i,t,"copy"),n.filter&&!n.filter(e,t))return;let o=Cn.dirname(t);return ge.existsSync(o)||Uh(o),Ks(a,e,t,n)}function Ks(e,t,n,i){let o=(i.dereference?ge.statSync:ge.lstatSync)(t);if(o.isDirectory())return Vh(o,e,t,n,i);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return $h(o,e,t,n,i);if(o.isSymbolicLink())return Kh(e,t,n,i);throw o.isSocket()?new Error(`Cannot copy a socket file: ${t}`):o.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${t}`):new Error(`Unknown file: ${t}`)}function $h(e,t,n,i,a){return t?Gh(e,n,i,a):Qs(e,n,i,a)}function Gh(e,t,n,i){if(i.overwrite)return ge.unlinkSync(n),Qs(e,t,n,i);if(i.errorOnExist)throw new Error(`'${n}' already exists`)}function Qs(e,t,n,i){return ge.copyFileSync(t,n),i.preserveTimestamps&&zh(e.mode,t,n),Na(n,e.mode)}function zh(e,t,n){return Xh(e)&&Hh(n,e),Wh(t,n)}function Xh(e){return(e&128)===0}function Hh(e,t){return Na(e,t|128)}function Na(e,t){return ge.chmodSync(e,t)}function Wh(e,t){let n=ge.statSync(e);return Bh(t,n.atime,n.mtime)}function Vh(e,t,n,i,a){return t?Zs(n,i,a):Jh(e.mode,n,i,a)}function Jh(e,t,n,i){return ge.mkdirSync(n),Zs(t,n,i),Na(n,e)}function Zs(e,t,n){ge.readdirSync(e).forEach(i=>Yh(i,e,t,n))}function Yh(e,t,n,i){let a=Cn.join(t,e),o=Cn.join(n,e);if(i.filter&&!i.filter(a,o))return;let{destStat:r}=Tn.checkPathsSync(a,o,"copy",i);return Ks(r,a,o,i)}function Kh(e,t,n,i){let a=ge.readlinkSync(t);if(i.dereference&&(a=Cn.resolve(process.cwd(),a)),e){let o;try{o=ge.readlinkSync(n)}catch(r){if(r.code==="EINVAL"||r.code==="UNKNOWN")return ge.symlinkSync(a,n);throw r}if(i.dereference&&(o=Cn.resolve(process.cwd(),o)),Tn.isSrcSubdir(a,o))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${o}'.`);if(Tn.isSrcSubdir(o,a))throw new Error(`Cannot overwrite '${o}' with '${a}'.`);return Qh(a,n)}else return ge.symlinkSync(a,n)}function Qh(e,t){return ge.unlinkSync(t),ge.symlinkSync(e,t)}ec.exports=Mh});var mi=g((sS,nc)=>{"use strict";var Zh=se().fromPromise;nc.exports={copy:Zh(Ys()),copySync:tc()}});var In=g((cS,ac)=>{"use strict";var ic=Wt(),ex=se().fromCallback;function tx(e,t){ic.rm(e,{recursive:!0,force:!0},t)}function nx(e){ic.rmSync(e,{recursive:!0,force:!0})}ac.exports={remove:ex(tx),removeSync:nx}});var dc=g((pS,uc)=>{"use strict";var ix=se().fromPromise,sc=ve(),cc=require("path"),pc=Le(),lc=In(),oc=ix(async function(t){let n;try{n=await sc.readdir(t)}catch{return pc.mkdirs(t)}return Promise.all(n.map(i=>lc.remove(cc.join(t,i))))});function rc(e){let t;try{t=sc.readdirSync(e)}catch{return pc.mkdirsSync(e)}t.forEach(n=>{n=cc.join(e,n),lc.removeSync(n)})}uc.exports={emptyDirSync:rc,emptydirSync:rc,emptyDir:oc,emptydir:oc}});var xc=g((lS,hc)=>{"use strict";var ax=se().fromPromise,mc=require("path"),it=ve(),fc=Le();async function ox(e){let t;try{t=await it.stat(e)}catch{}if(t&&t.isFile())return;let n=mc.dirname(e),i=null;try{i=await it.stat(n)}catch(a){if(a.code==="ENOENT"){await fc.mkdirs(n),await it.writeFile(e,"");return}else throw a}i.isDirectory()?await it.writeFile(e,""):await it.readdir(n)}function rx(e){let t;try{t=it.statSync(e)}catch{}if(t&&t.isFile())return;let n=mc.dirname(e);try{it.statSync(n).isDirectory()||it.readdirSync(n)}catch(i){if(i&&i.code==="ENOENT")fc.mkdirsSync(n);else throw i}it.writeFileSync(e,"")}hc.exports={createFile:ax(ox),createFileSync:rx}});var wc=g((uS,yc)=>{"use strict";var sx=se().fromPromise,vc=require("path"),ut=ve(),gc=Le(),{pathExists:cx}=lt(),{areIdentical:bc}=Dt();async function px(e,t){let n;try{n=await ut.lstat(t)}catch{}let i;try{i=await ut.lstat(e)}catch(r){throw r.message=r.message.replace("lstat","ensureLink"),r}if(n&&bc(i,n))return;let a=vc.dirname(t);await cx(a)||await gc.mkdirs(a),await ut.link(e,t)}function lx(e,t){let n;try{n=ut.lstatSync(t)}catch{}try{let o=ut.lstatSync(e);if(n&&bc(o,n))return}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let i=vc.dirname(t);return ut.existsSync(i)||gc.mkdirsSync(i),ut.linkSync(e,t)}yc.exports={createLink:sx(px),createLinkSync:lx}});var Sc=g((dS,_c)=>{"use strict";var dt=require("path"),Pn=ve(),{pathExists:ux}=lt(),dx=se().fromPromise;async function mx(e,t){if(dt.isAbsolute(e)){try{await Pn.lstat(e)}catch(o){throw o.message=o.message.replace("lstat","ensureSymlink"),o}return{toCwd:e,toDst:e}}let n=dt.dirname(t),i=dt.join(n,e);if(await ux(i))return{toCwd:i,toDst:e};try{await Pn.lstat(e)}catch(o){throw o.message=o.message.replace("lstat","ensureSymlink"),o}return{toCwd:e,toDst:dt.relative(n,e)}}function fx(e,t){if(dt.isAbsolute(e)){if(!Pn.existsSync(e))throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}let n=dt.dirname(t),i=dt.join(n,e);if(Pn.existsSync(i))return{toCwd:i,toDst:e};if(!Pn.existsSync(e))throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:dt.relative(n,e)}}_c.exports={symlinkPaths:dx(mx),symlinkPathsSync:fx}});var Rc=g((mS,Dc)=>{"use strict";var Ec=ve(),hx=se().fromPromise;async function xx(e,t){if(t)return t;let n;try{n=await Ec.lstat(e)}catch{return"file"}return n&&n.isDirectory()?"dir":"file"}function vx(e,t){if(t)return t;let n;try{n=Ec.lstatSync(e)}catch{return"file"}return n&&n.isDirectory()?"dir":"file"}Dc.exports={symlinkType:hx(xx),symlinkTypeSync:vx}});var Ic=g((fS,Tc)=>{"use strict";var gx=se().fromPromise,Oc=require("path"),Ve=ve(),{mkdirs:bx,mkdirsSync:yx}=Le(),{symlinkPaths:wx,symlinkPathsSync:_x}=Sc(),{symlinkType:Sx,symlinkTypeSync:Ex}=Rc(),{pathExists:Dx}=lt(),{areIdentical:Cc}=Dt();async function Rx(e,t,n){let i;try{i=await Ve.lstat(t)}catch{}if(i&&i.isSymbolicLink()){let[s,p]=await Promise.all([Ve.stat(e),Ve.stat(t)]);if(Cc(s,p))return}let a=await wx(e,t);e=a.toDst;let o=await Sx(a.toCwd,n),r=Oc.dirname(t);return await Dx(r)||await bx(r),Ve.symlink(e,t,o)}function Ox(e,t,n){let i;try{i=Ve.lstatSync(t)}catch{}if(i&&i.isSymbolicLink()){let s=Ve.statSync(e),p=Ve.statSync(t);if(Cc(s,p))return}let a=_x(e,t);e=a.toDst,n=Ex(a.toCwd,n);let o=Oc.dirname(t);return Ve.existsSync(o)||yx(o),Ve.symlinkSync(e,t,n)}Tc.exports={createSymlink:gx(Rx),createSymlinkSync:Ox}});var qc=g((hS,Nc)=>{"use strict";var{createFile:Pc,createFileSync:Ac}=xc(),{createLink:Fc,createLinkSync:kc}=wc(),{createSymlink:jc,createSymlinkSync:Lc}=Ic();Nc.exports={createFile:Pc,createFileSync:Ac,ensureFile:Pc,ensureFileSync:Ac,createLink:Fc,createLinkSync:kc,ensureLink:Fc,ensureLinkSync:kc,createSymlink:jc,createSymlinkSync:Lc,ensureSymlink:jc,ensureSymlinkSync:Lc}});var fi=g((xS,Uc)=>{function Cx(e,{EOL:t=`
|
|
10
10
|
`,finalEOL:n=!0,replacer:i=null,spaces:a}={}){let o=n?t:"";return JSON.stringify(e,i,a).replace(/\n/g,t)+o}function Tx(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}Uc.exports={stringify:Cx,stripBom:Tx}});var Gc=g((vS,$c)=>{var Yt;try{Yt=Wt()}catch{Yt=require("fs")}var hi=se(),{stringify:Bc,stripBom:Mc}=fi();async function Ix(e,t={}){typeof t=="string"&&(t={encoding:t});let n=t.fs||Yt,i="throws"in t?t.throws:!0,a=await hi.fromCallback(n.readFile)(e,t);a=Mc(a);let o;try{o=JSON.parse(a,t?t.reviver:null)}catch(r){if(i)throw r.message=`${e}: ${r.message}`,r;return null}return o}var Px=hi.fromPromise(Ix);function Ax(e,t={}){typeof t=="string"&&(t={encoding:t});let n=t.fs||Yt,i="throws"in t?t.throws:!0;try{let a=n.readFileSync(e,t);return a=Mc(a),JSON.parse(a,t.reviver)}catch(a){if(i)throw a.message=`${e}: ${a.message}`,a;return null}}async function Fx(e,t,n={}){let i=n.fs||Yt,a=Bc(t,n);await hi.fromCallback(i.writeFile)(e,a,n)}var kx=hi.fromPromise(Fx);function jx(e,t,n={}){let i=n.fs||Yt,a=Bc(t,n);return i.writeFileSync(e,a,n)}var Lx={readFile:Px,readFileSync:Ax,writeFile:kx,writeFileSync:jx};$c.exports=Lx});var Xc=g((gS,zc)=>{"use strict";var xi=Gc();zc.exports={readJson:xi.readFile,readJsonSync:xi.readFileSync,writeJson:xi.writeFile,writeJsonSync:xi.writeFileSync}});var vi=g((bS,Vc)=>{"use strict";var Nx=se().fromPromise,qa=ve(),Hc=require("path"),Wc=Le(),qx=lt().pathExists;async function Ux(e,t,n="utf-8"){let i=Hc.dirname(e);return await qx(i)||await Wc.mkdirs(i),qa.writeFile(e,t,n)}function Bx(e,...t){let n=Hc.dirname(e);qa.existsSync(n)||Wc.mkdirsSync(n),qa.writeFileSync(e,...t)}Vc.exports={outputFile:Nx(Ux),outputFileSync:Bx}});var Yc=g((yS,Jc)=>{"use strict";var{stringify:Mx}=fi(),{outputFile:$x}=vi();async function Gx(e,t,n={}){let i=Mx(t,n);await $x(e,i,n)}Jc.exports=Gx});var Qc=g((wS,Kc)=>{"use strict";var{stringify:zx}=fi(),{outputFileSync:Xx}=vi();function Hx(e,t,n){let i=zx(t,n);Xx(e,i,n)}Kc.exports=Hx});var ep=g((_S,Zc)=>{"use strict";var Wx=se().fromPromise,be=Xc();be.outputJson=Wx(Yc());be.outputJsonSync=Qc();be.outputJSON=be.outputJson;be.outputJSONSync=be.outputJsonSync;be.writeJSON=be.writeJson;be.writeJSONSync=be.writeJsonSync;be.readJSON=be.readJson;be.readJSONSync=be.readJsonSync;Zc.exports=be});var op=g((SS,ap)=>{"use strict";var Vx=ve(),tp=require("path"),{copy:Jx}=mi(),{remove:ip}=In(),{mkdirp:Yx}=Le(),{pathExists:Kx}=lt(),np=Dt();async function Qx(e,t,n={}){let i=n.overwrite||n.clobber||!1,{srcStat:a,isChangingCase:o=!1}=await np.checkPaths(e,t,"move",n);await np.checkParentPaths(e,a,t,"move");let r=tp.dirname(t);return tp.parse(r).root!==r&&await Yx(r),Zx(e,t,i,o)}async function Zx(e,t,n,i){if(!i){if(n)await ip(t);else if(await Kx(t))throw new Error("dest already exists.")}try{await Vx.rename(e,t)}catch(a){if(a.code!=="EXDEV")throw a;await ev(e,t,n)}}async function ev(e,t,n){return await Jx(e,t,{overwrite:n,errorOnExist:!0,preserveTimestamps:!0}),ip(e)}ap.exports=Qx});var lp=g((ES,pp)=>{"use strict";var sp=Wt(),Ba=require("path"),tv=mi().copySync,cp=In().removeSync,nv=Le().mkdirpSync,rp=Dt();function iv(e,t,n){n=n||{};let i=n.overwrite||n.clobber||!1,{srcStat:a,isChangingCase:o=!1}=rp.checkPathsSync(e,t,"move",n);return rp.checkParentPathsSync(e,a,t,"move"),av(t)||nv(Ba.dirname(t)),ov(e,t,i,o)}function av(e){let t=Ba.dirname(e);return Ba.parse(t).root===t}function ov(e,t,n,i){if(i)return Ua(e,t,n);if(n)return cp(t),Ua(e,t,n);if(sp.existsSync(t))throw new Error("dest already exists.");return Ua(e,t,n)}function Ua(e,t,n){try{sp.renameSync(e,t)}catch(i){if(i.code!=="EXDEV")throw i;return rv(e,t,n)}}function rv(e,t,n){return tv(e,t,{overwrite:n,errorOnExist:!0,preserveTimestamps:!0}),cp(e)}pp.exports=iv});var dp=g((DS,up)=>{"use strict";var sv=se().fromPromise;up.exports={move:sv(op()),moveSync:lp()}});var Rt=g((RS,mp)=>{"use strict";mp.exports={...ve(),...mi(),...dc(),...qc(),...ep(),...Le(),...dp(),...vi(),...lt(),...In()}});var wp=g((QS,yp)=>{var $a=class{constructor(t){this.value=t,this.next=void 0}},Ga=class{constructor(){this.clear()}enqueue(t){let n=new $a(t);this._head?(this._tail.next=n,this._tail=n):(this._head=n,this._tail=n),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}};yp.exports=Ga});var za=g((ZS,_p)=>{"use strict";var pv=wp(),lv=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 pv,n=0,i=()=>{n--,t.size>0&&t.dequeue()()},a=async(s,p,...l)=>{n++;let c=(async()=>s(...l))();p(c);try{await c}catch{}i()},o=(s,p,...l)=>{t.enqueue(a.bind(null,s,p,...l)),(async()=>(await Promise.resolve(),n<e&&t.size>0&&t.dequeue()()))()},r=(s,...p)=>new Promise(l=>{o(s,l,...p)});return Object.defineProperties(r,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),r};_p.exports=lv});var Dp=g((eE,Ep)=>{"use strict";var Sp=za(),gi=class extends Error{constructor(t){super(),this.value=t}},uv=async(e,t)=>t(await e),dv=async e=>{let t=await Promise.all(e);if(t[1]===!0)throw new gi(t[0]);return!1},mv=async(e,t,n)=>{n={concurrency:1/0,preserveOrder:!0,...n};let i=Sp(n.concurrency),a=[...e].map(r=>[r,i(uv,r,t)]),o=Sp(n.preserveOrder?1:1/0);try{await Promise.all(a.map(r=>o(dv,r)))}catch(r){if(r instanceof gi)return r.value;throw r}};Ep.exports=mv});var Pp=g((tE,Xa)=>{"use strict";var Rp=require("path"),bi=require("fs"),{promisify:Op}=require("util"),fv=Dp(),hv=Op(bi.stat),xv=Op(bi.lstat),Cp={directory:"isDirectory",file:"isFile"};function Tp({type:e}){if(!(e in Cp))throw new Error(`Invalid type specified: ${e}`)}var Ip=(e,t)=>e===void 0||t[Cp[e]]();Xa.exports=async(e,t)=>{t={cwd:process.cwd(),type:"file",allowSymlinks:!0,...t},Tp(t);let n=t.allowSymlinks?hv:xv;return fv(e,async i=>{try{let a=await n(Rp.resolve(t.cwd,i));return Ip(t.type,a)}catch{return!1}},t)};Xa.exports.sync=(e,t)=>{t={cwd:process.cwd(),allowSymlinks:!0,type:"file",...t},Tp(t);let n=t.allowSymlinks?bi.statSync:bi.lstatSync;for(let i of e)try{let a=n(Rp.resolve(t.cwd,i));if(Ip(t.type,a))return i}catch{}}});var Fp=g((nE,Ha)=>{"use strict";var Ap=require("fs"),{promisify:vv}=require("util"),gv=vv(Ap.access);Ha.exports=async e=>{try{return await gv(e),!0}catch{return!1}};Ha.exports.sync=e=>{try{return Ap.accessSync(e),!0}catch{return!1}}});var Va=g((iE,Kt)=>{"use strict";var mt=require("path"),yi=Pp(),kp=Fp(),Wa=Symbol("findUp.stop");Kt.exports=async(e,t={})=>{let n=mt.resolve(t.cwd||""),{root:i}=mt.parse(n),a=[].concat(e),o=async r=>{if(typeof e!="function")return yi(a,r);let s=await e(r.cwd);return typeof s=="string"?yi([s],r):s};for(;;){let r=await o({...t,cwd:n});if(r===Wa)return;if(r)return mt.resolve(n,r);if(n===i)return;n=mt.dirname(n)}};Kt.exports.sync=(e,t={})=>{let n=mt.resolve(t.cwd||""),{root:i}=mt.parse(n),a=[].concat(e),o=r=>{if(typeof e!="function")return yi.sync(a,r);let s=e(r.cwd);return typeof s=="string"?yi.sync([s],r):s};for(;;){let r=o({...t,cwd:n});if(r===Wa)return;if(r)return mt.resolve(n,r);if(n===i)return;n=mt.dirname(n)}};Kt.exports.exists=kp;Kt.exports.sync.exists=kp.sync;Kt.exports.stop=Wa});var wi=g((aE,Ja)=>{"use strict";var jp=require("path"),Lp=Va(),bv=async e=>{let t=await Lp("package.json",{cwd:e});return t&&jp.dirname(t)};Ja.exports=bv;Ja.exports.sync=e=>{let t=Lp.sync("package.json",{cwd:e});return t&&jp.dirname(t)}});function K(e,t){let{error:n,message:i,expected:a,hint:o}=e,r=Y.red("[ "+n+" ]"),s=[a,o].filter(Boolean).join(`
|
|
11
11
|
`);throw console.log(`
|
|
12
12
|
${r}
|
|
@@ -14,8 +14,8 @@ ${i}
|
|
|
14
14
|
${s}
|
|
15
15
|
|
|
16
16
|
${Y.red("stack")}
|
|
17
|
-
${JSON.stringify(t,null,2)}`),new An}var An,
|
|
18
|
-
`,this.pretty=!0,(0,Si.isUndefined)(t.doubleQuotes)||(this.doubleQuotes=t.doubleQuotes),(0,Si.isUndefined)(t.indent)||(this.indent=t.indent),(0,Si.isUndefined)(t.newline)||(this.newline=t.newline),(0,Si.isUndefined)(t.pretty)||(this.pretty=t.pretty)}return e}();Ei.StringOptions=Rv});var Di=g(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.escapeDoubleQuotes=ke.escapeSingleQuotes=ke.escapeRightAngleBracketsInCdataTerminator=ke.escapeLeftAngleBrackets=ke.escapeAmpersands=void 0;function Ov(e){return e.replace(/&/g,"&")}ke.escapeAmpersands=Ov;function Cv(e){return e.replace(/</g,"<")}ke.escapeLeftAngleBrackets=Cv;function Tv(e){return e.replace(/]]>/g,"]]>")}ke.escapeRightAngleBracketsInCdataTerminator=Tv;function Iv(e){return e.replace(/'/g,"'")}ke.escapeSingleQuotes=Iv;function Pv(e){return e.replace(/"/g,""")}ke.escapeDoubleQuotes=Pv});var Za=g(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});var Av=me(),Up=Di(),Ka=oe(),Fv=function(){function e(t,n,i){this._validation=n,(0,Ka.isUndefined)(i.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=i.replaceInvalidCharsInCharData,this._parent=t,this.charData=i.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._replaceInvalidCharsInCharData)t=(0,Ka.fixChar)(t);else if(this._validation&&!(0,Ka.validateChar)(t))throw new Error((0,Av.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,Up.escapeAmpersands)(t),t=(0,Up.escapeLeftAngleBrackets)(t),t},e.prototype.up=function(){return this._parent},e}();Qa.default=Fv});var Ri=g(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});var Bp=me(),Mp=oe(),kv=function(){function e(t,n,i){this._hex=!1,this._validation=n,this._parent=t,this.char=i.char,(0,Mp.isUndefined)(i.hex)||(this.hex=i.hex)}return Object.defineProperty(e.prototype,"char",{get:function(){return this._char},set:function(t){if(this._validation&&!(0,Mp.validateSingleChar)(t))throw new Error((0,Bp.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 n=this._char.charCodeAt(0);if(n>=55296&&n<=56319&&this._char.length>1){var i=this._char.charCodeAt(1);if(i>=56320&&i<=57343)t=(n-55296)*1024+i-56320+65536;else throw new Error((0,Bp.getContext)(this.up())+": character"+(' reference "'+this.char+'" should')+" reference a valid Unicode character")}else t=n}return this._hex?"&#x"+t.toString(16)+";":"&#"+t+";"},e.prototype.up=function(){return this._parent},e}();eo.default=kv});var Oi=g(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});var jv=me(),Lv=oe(),Nv=function(){function e(t,n,i){this._validation=n,this._parent=t,this.name=i.name}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(t){if(this._validation&&!(0,Lv.validateName)(t))throw new Error((0,jv.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}();to.default=Nv});var Ci=g(Fn=>{"use strict";var ao=Fn&&Fn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fn,"__esModule",{value:!0});var no=me(),$p=Di(),qv=en(),io=oe(),Uv=ao(Za()),Bv=ao(Ri()),Mv=ao(Oi()),$v=function(){function e(t,n,i){this._validation=n,(0,io.isUndefined)(i.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=i.replaceInvalidCharsInName,this._children=[],this._parent=t,this.name=i.name}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(t){if(this._replaceInvalidCharsInName){if(t=(0,io.fixName)(t),t.length===0)throw new Error((0,no.getContext)(this.up())+": attribute name should not be empty")}else if(this._validation&&!(0,io.validateName)(t))throw t.length===0?new Error((0,no.getContext)(this.up())+": attribute name should not be empty"):new Error((0,no.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 n=new Bv.default(this,this._validation,t);return this._children.push(n),n},e.prototype.entityRef=function(t){var n=new Mv.default(this,this._validation,t);return this._children.push(n),n},e.prototype.text=function(t){var n=new Uv.default(this,this._validation,t);return this._children.push(n),n},e.prototype.toString=function(t){t===void 0&&(t={});for(var n=new qv.StringOptions(t),i=n.doubleQuotes?'"':"'",a=this._name+"="+i,o=0,r=this._children;o<r.length;o++){var s=r[o];n.doubleQuotes?a+=(0,$p.escapeDoubleQuotes)(s.toString()):a+=(0,$p.escapeSingleQuotes)(s.toString())}return a+=i,a},e.prototype.up=function(){return this._parent},e}();Fn.default=$v});var ro=g(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});var Gv=me(),zv=oe(),Xv=function(){function e(t,n,i){this._validation=n,this._parent=t,this.charData=i.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._validation&&!(0,zv.validateChar)(t))throw new Error((0,Gv.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}();oo.default=Xv});var co=g(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});var Hv=me(),Wv=oe(),Vv=function(){function e(t,n,i){this._validation=n,this._parent=t,this.charData=i.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._validation&&!(0,Wv.validateChar)(t))throw new Error((0,Hv.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}();so.default=Vv});var lo=g(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});var Jv=me(),Yv=oe(),Kv=function(){function e(t,n,i){this._validation=n,this._parent=t,this.charData=i.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._validation&&!(0,Yv.validateChar)(t))throw new Error((0,Jv.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}();po.default=Kv});var mo=g(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});var Qv=me(),Zv=oe(),eg=function(){function e(t,n,i){this._validation=n,this._parent=t,this.charData=i.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._validation&&!(0,Zv.validateChar)(t))throw new Error((0,Qv.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}();uo.default=eg});var ho=g(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});var tg=me(),ng=oe(),ig=function(){function e(t,n,i){this._validation=n,this._parent=t,this.name=i.name}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(t){if(this._validation&&!(0,ng.validateName)(t))throw new Error((0,tg.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}();fo.default=ig});var kn=g(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});var Ti=me(),Ii=oe(),ag=function(){function e(t,n,i){this._validation=n,this._parent=t,this.content=i.content,this.target=i.target}return Object.defineProperty(e.prototype,"content",{get:function(){return this._content},set:function(t){if(!(0,Ii.isUndefined)(t)){if(this._validation&&!(0,Ii.validateChar)(t))throw new Error((0,Ti.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,Ti.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,Ii.validateName)(t))throw new Error((0,Ti.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,Ti.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,Ii.isUndefined)(this._content)?"<?"+this._target+"?>":"<?"+this._target+" "+this._content+"?>"},e.prototype.up=function(){return this._parent},e}();xo.default=ag});var Pi=g(Ct=>{"use strict";var Tt=Ct&&Ct.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ct,"__esModule",{value:!0});Ct.validatePubId=void 0;var ft=me(),og=en(),Je=oe(),rg=Tt(jn()),sg=Tt(ro()),cg=Tt(co()),pg=Tt(lo()),lg=Tt(mo()),ug=Tt(ho()),dg=Tt(kn()),mg=function(){function e(t,n,i){this._pubId=void 0,this._sysId=void 0,this._validation=n,this._children=[],this._parent=t,this.name=i.name,(0,Je.isUndefined)(i.sysId)||(this.sysId=i.sysId),(0,Je.isUndefined)(i.pubId)||(this.pubId=i.pubId)}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(t){if(this._validation&&!(0,Je.validateName)(t))throw new Error((0,ft.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,Je.isUndefined)(t)){if(this._validation&&!Gp(t))throw new Error((0,ft.getContext)(this.up())+": DTD public"+(' identifier "'+t+'" should not contain')+" characters not allowed in public identifiers");if(this._validation&&(0,Je.isUndefined)(this._sysId))throw new Error((0,ft.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,Je.isUndefined)(t)){if(this._validation&&!(0,Je.validateChar)(t))throw new Error((0,ft.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,ft.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 n=new sg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.comment=function(t){var n=new rg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.element=function(t){var n=new cg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.entity=function(t){var n=new pg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.notation=function(t){var n=new lg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.paramEntityRef=function(t){var n=new ug.default(this,this._validation,t);return this._children.push(n),n},e.prototype.procInst=function(t){var n=new dg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.toString=function(t){t===void 0&&(t={});var n=new og.StringOptions(t),i="<!DOCTYPE "+this._name;if((0,Je.isUndefined)(this._pubId))(0,Je.isUndefined)(this._sysId)||(i+=" ",i=this.appendId("SYSTEM",this._sysId,i,n));else{if((0,Je.isUndefined)(this._sysId))throw new Error((0,ft.getContext)(this.up())+": DTD system identifier is not undefined");i+=" ",i=this.appendId("PUBLIC",this._pubId,i,n),i=this.appendId("",this._sysId,i,n)}if(this._children.length!==0){i+=" [";for(var a=0,o=this._children;a<o.length;a++){var r=o[a];n.pretty&&(i+=n.newline+n.indent),i+=r.toString()}n.pretty&&(i+=n.newline),i+="]>"}else i+=">";return i},e.prototype.up=function(){return this._parent},e.prototype.appendId=function(t,n,i,a){if(i+=t+" ",a.doubleQuotes){if(this._validation&&n.indexOf('"')!==-1)throw new Error((0,ft.getContext)(this.up())+": doubleQuotes option inconsistent with DTD system identifier or public identifier");i+='"'+n+'"'}else{if(this._validation&&n.indexOf("'")!==-1)throw new Error((0,ft.getContext)(this)+": doubleQuotes option inconsistent with DTD system identifier or public identifier");i+="'"+n+"'"}return i},e}();Ct.default=mg;function Gp(e){for(var t=0;t<e.length;t++){var n=e.charCodeAt(t);if(!(n===10||n===13||n===32||n===33||n>=35&&n<=37||n>=39&&n<=47||n>=48&&n<=57||n===58||n===59||n===61||n===63||n>=64&&n<=90||n===95||n>=97&&n<=122))return t+1===e.length,!1}return!0}Ct.validatePubId=Gp});var bo=g(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});var zp=me(),vo=oe(),fg=function(){function e(t,n,i){this._validation=n,(0,vo.isUndefined)(i.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=i.replaceInvalidCharsInCharData,this._parent=t,this.charData=i.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._replaceInvalidCharsInCharData)t=(0,vo.fixChar)(t);else if(this._validation&&!(0,vo.validateChar)(t))throw new Error((0,zp.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,zp.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}();go.default=fg});var So=g(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});var hg=me(),yo=Di(),wo=oe(),xg=function(){function e(t,n,i){this._validation=n,(0,wo.isUndefined)(i.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=i.replaceInvalidCharsInCharData,this._parent=t,this.charData=i.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._replaceInvalidCharsInCharData)t=(0,wo.fixChar)(t);else if(this._validation&&!(0,wo.validateChar)(t))throw new Error((0,hg.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,yo.escapeAmpersands)(t),t=(0,yo.escapeLeftAngleBrackets)(t),t=(0,yo.escapeRightAngleBracketsInCdataTerminator)(t),t},e.prototype.up=function(){return this._parent},e}();_o.default=xg});var ji=g(qn=>{"use strict";var It=qn&&qn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qn,"__esModule",{value:!0});var Ai=me(),vg=en(),Ln=oe(),Xp=It(Ci()),gg=It(bo()),Nn=It(So()),Fi=It(Ri()),bg=It(jn()),ki=It(Oi()),yg=It(kn()),wg=function(){function e(t,n,i){this._validation=n,(0,Ln.isUndefined)(i.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=i.replaceInvalidCharsInName,(0,Ln.isUndefined)(i.useSelfClosingTagIfEmpty)?this._useSelfClosingTagIfEmpty=!0:this._useSelfClosingTagIfEmpty=i.useSelfClosingTagIfEmpty,this._children=[],this._attributeNames=[],this._parent=t,this.name=i.name}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(t){if(this._replaceInvalidCharsInName){if(t=(0,Ln.fixName)(t),t.length===0)throw new Error((0,Ai.getContext)(this.up())+": element name should not be empty")}else if(this._validation&&!(0,Ln.validateName)(t))throw t.length===0?new Error((0,Ai.getContext)(this.up())+": element name should not be empty"):new Error((0,Ai.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,Ai.getContext)(this.up())+': element "'+this.name+'" already contains an attribute with the'+(' name "'+t.name+'"'));var n=new Xp.default(this,this._validation,t);return this._children.push(n),this._attributeNames.push(t.name),n},e.prototype.cdata=function(t){var n=new gg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.charData=function(t){var n=new Nn.default(this,this._validation,t);return this._children.push(n),n},e.prototype.charRef=function(t){var n=new Fi.default(this,this._validation,t);return this._children.push(n),n},e.prototype.comment=function(t){var n=new bg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.element=function(t){var n=new e(this,this._validation,t);return this._children.push(n),n},e.prototype.entityRef=function(t){var n=new ki.default(this,this._validation,t);return this._children.push(n),n},e.prototype.procInst=function(t){var n=new yg.default(this,this._validation,t);return this._children.push(n),n},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,n){for(var i=new vg.StringOptions(t),a=n+i.indent,o="<"+this._name,r=[],s=0,p=this._children;s<p.length;s++){var l=p[s];l instanceof Xp.default?o+=" "+l.toString(t):r.push(l)}if(r.length>0){for(var c="",u=0;u<r.length;u++){var f=r[u],h="";f instanceof e?h+=f.toStringWithIndent(i,a):h+=f.toString();var m=u>0?r[u-1]:void 0;f instanceof Nn.default&&f.toString()===""||(i.pretty&&(this.allSameLineNodes(r)||u>0&&this.onSameLine(f,m)||(h=i.newline+a+h)),c+=h)}i.pretty&&(this.allSameLineNodes(r)||(c+=i.newline+n)),c.length===0&&this._useSelfClosingTagIfEmpty?o+="/>":o+=">"+c+"</"+this._name+">"}else this._useSelfClosingTagIfEmpty?o+="/>":o+="></"+this._name+">";return o},e.prototype.allSameLineNodes=function(t){for(var n=0,i=t;n<i.length;n++){var a=i[n];if(!(a instanceof Fi.default||a instanceof ki.default||a instanceof Nn.default))return!1}return!0},e.prototype.onSameLine=function(t,n){return(t instanceof Fi.default||t instanceof ki.default||t instanceof Nn.default)&&!(0,Ln.isUndefined)(n)&&(n instanceof Fi.default||n instanceof ki.default||n instanceof Nn.default)},e}();qn.default=wg});var me=g(tn=>{"use strict";var Ni=tn&&tn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tn,"__esModule",{value:!0});tn.getContext=void 0;var _g=Ni(Ci()),Sg=Ni(qi()),Eg=Ni(Pi()),Dg=Ni(ji());function Li(e){if(e instanceof _g.default)return Li(e.up())+(' > attribute "'+e.name+'"');if(e instanceof Sg.default)return"in XML document";if(e instanceof Eg.default)return Li(e.up())+" > DTD";if(e instanceof Dg.default)return Li(e.up())+(' > element "'+e.name+'"');throw new Error("Unrecognized object of type "+Object.prototype.toString.call(e))}tn.getContext=Li});var jn=g(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});var Eo=me(),Do=oe(),Rg=function(){function e(t,n,i){this._validation=n,(0,Do.isUndefined)(i.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=i.replaceInvalidCharsInCharData,this._parent=t,this.charData=i.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._replaceInvalidCharsInCharData)t=(0,Do.fixChar)(t);else if(this._validation&&!(0,Do.validateChar)(t))throw new Error((0,Eo.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,Eo.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,Eo.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}();Ro.default=Rg});var To=g(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});var Oo=me(),Og=en(),Un=oe(),Cg=function(){function e(t,n,i){this._version="1.0",this._validation=n,this._parent=t,this.encoding=i.encoding,this.standalone=i.standalone,(0,Un.isUndefined)(i.version)||(this.version=i.version)}return Object.defineProperty(e.prototype,"encoding",{get:function(){return this._encoding},set:function(t){if(this._validation&&!(0,Un.isUndefined)(t)&&!Tg(t))throw new Error((0,Oo.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,Un.isUndefined)(t)&&t!=="yes"&&t!=="no")throw new Error((0,Oo.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&&!Ig(t))throw new Error((0,Oo.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 n=new Og.StringOptions(t),i=n.doubleQuotes?'"':"'",a="<?xml version="+i+this._version+i;return(0,Un.isUndefined)(this._encoding)||(a+=" encoding="+i+this._encoding+i),(0,Un.isUndefined)(this._standalone)||(a+=" standalone="+i+this._standalone+i),a+="?>",a},e.prototype.up=function(){return this._parent},e}();Co.default=Cg;function Tg(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 n=1;n<e.length;n++){var i=e.charCodeAt(n);if(!(i===95||i===45||i===46||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122))return n+1===e.length,!1}return!0}function Ig(e){for(var t=0;t<=9;t++)if(e==="1."+t)return!0;return!1}});var qi=g(Mn=>{"use strict";var $n=Mn&&Mn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Mn,"__esModule",{value:!0});var Pg=en(),Ag=oe(),Fg=$n(jn()),Hp=$n(To()),Wp=$n(Pi()),Bn=$n(ji()),kg=$n(kn()),jg=function(){function e(t){this._children=[],this._validation=(0,Ag.isUndefined)(t.validation)?!0:t.validation}return e.prototype.comment=function(t){var n=new Fg.default(this,this._validation,t);return this._children.push(n),n},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 n=new Hp.default(this,this._validation,t);return this._children.push(n),n},e.prototype.dtd=function(t){var n=this._children.filter(function(a){return a instanceof Bn.default});if(this._validation&&n.length!==0)throw new Error("in XML document: DTD must precede the root element");var i=new Wp.default(this,this._validation,t);return this._children.push(i),i},e.prototype.element=function(t){var n=this._children.filter(function(a){return a instanceof Bn.default});if(this._validation&&n.length!==0)throw new Error("in XML document: only one root element is permitted");var i=new Bn.default(this,this._validation,t);return this._children.push(i),i},e.prototype.procInst=function(t){var n=new kg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.toString=function(t){t===void 0&&(t={});var n=this._children.filter(function(l){return l instanceof Bn.default});if(this._validation&&n.length!==1)throw new Error("in XML document: no more than one root element is permitted");for(var i=new Pg.StringOptions(t),a="",o=0,r=this._children;o<r.length;o++){var s=r[o];s instanceof Hp.default||s instanceof Wp.default||s instanceof Bn.default?a+=s.toString(t):a+=s.toString(),i.pretty&&(a+=i.newline)}var p=a.length-i.newline.length;return a.substr(p)===i.newline&&(a=a.substr(0,p)),a},e}();Mn.default=jg});var Vp=g(I=>{"use strict";var pe=I&&I.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(I,"__esModule",{value:!0});I.document=I.XmlProcInst=I.XmlEntityRef=I.XmlElement=I.XmlDtdParamEntityRef=I.XmlDtdNotation=I.XmlDtdEntity=I.XmlDtdElement=I.XmlDtdAttlist=I.XmlDtd=I.XmlDocument=I.XmlDecl=I.XmlComment=I.XmlCharRef=I.XmlCharData=I.XmlCdata=I.XmlAttributeText=I.XmlAttribute=void 0;var Lg=pe(qi()),Ng=Ci();Object.defineProperty(I,"XmlAttribute",{enumerable:!0,get:function(){return pe(Ng).default}});var qg=Za();Object.defineProperty(I,"XmlAttributeText",{enumerable:!0,get:function(){return pe(qg).default}});var Ug=bo();Object.defineProperty(I,"XmlCdata",{enumerable:!0,get:function(){return pe(Ug).default}});var Bg=So();Object.defineProperty(I,"XmlCharData",{enumerable:!0,get:function(){return pe(Bg).default}});var Mg=Ri();Object.defineProperty(I,"XmlCharRef",{enumerable:!0,get:function(){return pe(Mg).default}});var $g=jn();Object.defineProperty(I,"XmlComment",{enumerable:!0,get:function(){return pe($g).default}});var Gg=To();Object.defineProperty(I,"XmlDecl",{enumerable:!0,get:function(){return pe(Gg).default}});var zg=qi();Object.defineProperty(I,"XmlDocument",{enumerable:!0,get:function(){return pe(zg).default}});var Xg=Pi();Object.defineProperty(I,"XmlDtd",{enumerable:!0,get:function(){return pe(Xg).default}});var Hg=ro();Object.defineProperty(I,"XmlDtdAttlist",{enumerable:!0,get:function(){return pe(Hg).default}});var Wg=co();Object.defineProperty(I,"XmlDtdElement",{enumerable:!0,get:function(){return pe(Wg).default}});var Vg=lo();Object.defineProperty(I,"XmlDtdEntity",{enumerable:!0,get:function(){return pe(Vg).default}});var Jg=mo();Object.defineProperty(I,"XmlDtdNotation",{enumerable:!0,get:function(){return pe(Jg).default}});var Yg=ho();Object.defineProperty(I,"XmlDtdParamEntityRef",{enumerable:!0,get:function(){return pe(Yg).default}});var Kg=ji();Object.defineProperty(I,"XmlElement",{enumerable:!0,get:function(){return pe(Kg).default}});var Qg=Oi();Object.defineProperty(I,"XmlEntityRef",{enumerable:!0,get:function(){return pe(Qg).default}});var Zg=kn();Object.defineProperty(I,"XmlProcInst",{enumerable:!0,get:function(){return pe(Zg).default}});function eb(e){return e===void 0&&(e={}),new Lg.default(e)}I.document=eb});var Io=g(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.stringify=le.isMap=le.isSet=le.isFunction=le.isArray=le.isObject=le.isNull=le.isUndefined=void 0;function Jp(e){return Object.prototype.toString.call(e)==="[object Undefined]"}le.isUndefined=Jp;function Yp(e){return Object.prototype.toString.call(e)==="[object Null]"}le.isNull=Yp;function tb(e){return Object.prototype.toString.call(e)==="[object Object]"}le.isObject=tb;function nb(e){return Object.prototype.toString.call(e)==="[object Array]"}le.isArray=nb;function Kp(e){return Object.prototype.toString.call(e)==="[object Function]"}le.isFunction=Kp;function ib(e){return Object.prototype.toString.call(e)==="[object Set]"}le.isSet=ib;function ab(e){return Object.prototype.toString.call(e)==="[object Map]"}le.isMap=ab;function ob(e){return!Jp(e)&&!Yp(e)&&Kp(e?.toString)&&(e=e.toString()),String(e)}le.stringify=ob});var il=g(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.WrapHandlers=Se.TypeHandlers=Se.FormatOptions=Se.DtdOptions=Se.DeclarationOptions=Se.Options=void 0;var Ne=Io(),rb=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,Ne.isUndefined)(t.validation)||(this.validation=t.validation),(0,Ne.isUndefined)(t.aliasString)||(this.aliasString=t.aliasString),(0,Ne.isUndefined)(t.attributeString)||(this.attributeString=t.attributeString),(0,Ne.isUndefined)(t.cdataInvalidChars)||(this.cdataInvalidChars=t.cdataInvalidChars),(0,Ne.isUndefined)(t.cdataKeys)||(this.cdataKeys=t.cdataKeys),this.declaration=new Qp(t.declaration),this.dtd=new Zp(this.validation,t.dtd),this.format=new el(t.format),(0,Ne.isUndefined)(t.replaceInvalidChars)||(this.replaceInvalidChars=t.replaceInvalidChars),this.typeHandlers=new tl(t.typeHandlers),(0,Ne.isUndefined)(t.useSelfClosingTagIfEmpty)||(this.useSelfClosingTagIfEmpty=t.useSelfClosingTagIfEmpty),(0,Ne.isUndefined)(t.valueString)||(this.valueString=t.valueString),this.wrapHandlers=new nl(t.wrapHandlers)}return e}();Se.Options=rb;var Qp=function(){function e(t){t===void 0&&(t={}),this.include=!0,(0,Ne.isUndefined)(t.include)||(this.include=t.include),this.encoding=t.encoding,this.standalone=t.standalone,this.version=t.version}return e}();Se.DeclarationOptions=Qp;var Zp=function(){function e(t,n){if(n===void 0&&(n={}),this.include=!1,(0,Ne.isUndefined)(n.include)||(this.include=n.include),t&&(0,Ne.isUndefined)(n.name)&&this.include)throw new Error("options.dtd.name should be defined if options.dtd.include is true");this.name=n.name,this.sysId=n.sysId,this.pubId=n.pubId}return e}();Se.DtdOptions=Zp;var el=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}();Se.FormatOptions=el;var tl=function(){function e(t){t===void 0&&(t={});for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(this[n]=t[n])}return e}();Se.TypeHandlers=tl;var nl=function(){function e(t){t===void 0&&(t={});for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(this[n]=t[n])}return e}();Se.WrapHandlers=nl});var pl=g(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.parse=ht.parseToExistingElement=ht.Absent=void 0;var ol=Vp(),rl=il(),Z=Io(),Ui=function(){function e(){}return Object.defineProperty(e,"instance",{get:function(){return e._instance},enumerable:!1,configurable:!0}),e._instance=new e,e}();ht.Absent=Ui;function Bi(e,t){var n=Object.prototype.toString.call(e),i;return Object.prototype.hasOwnProperty.call(t.typeHandlers,"*")&&(i=t.typeHandlers["*"]),Object.prototype.hasOwnProperty.call(t.typeHandlers,n)&&(i=t.typeHandlers[n]),i}function sl(e,t,n){var i=function(r){return n.cdataInvalidChars&&(r.indexOf("<")!==-1||r.indexOf("&")!==-1)||n.cdataKeys.indexOf(t.name)!==-1||n.cdataKeys.indexOf("*")!==-1};if(t instanceof ol.XmlElement)if(i(e))for(var a=e.split("]]>"),o=0;o<a.length;o++)i(a[o])?t.cdata({charData:a[o],replaceInvalidCharsInCharData:n.replaceInvalidChars}):t.charData({charData:a[o],replaceInvalidCharsInCharData:n.replaceInvalidChars}),o<a.length-1&&t.charData({charData:"]]>",replaceInvalidCharsInCharData:n.replaceInvalidChars});else t.charData({charData:e,replaceInvalidCharsInCharData:n.replaceInvalidChars});else t.text({charData:e,replaceInvalidCharsInCharData:n.replaceInvalidChars})}function sb(e,t,n,i){var a=n.attribute({name:e,replaceInvalidCharsInName:i.replaceInvalidChars});sl((0,Z.stringify)(t),a,i)}function al(e,t,n,i){if(e===i.aliasString){n.name=(0,Z.stringify)(t);return}if(e.indexOf(i.attributeString)===0&&(0,Z.isObject)(t)){for(var a=0,o=Object.keys(t);a<o.length;a++){var r=o[a],s=t[r],p=Bi(s,i);!(0,Z.isUndefined)(p)&&(s=p(s),p(t)===Ui.instance)||sb(r,s,n,i)}return}if(e.indexOf(i.valueString)===0){Mi(e,t,n,i);return}var l=n;if(!(0,Z.isArray)(t)&&!(0,Z.isSet)(t)){var p=Bi(t,i);if(!(0,Z.isUndefined)(p)&&p(t)===Ui.instance)return;l=n.element({name:e,replaceInvalidCharsInName:i.replaceInvalidChars,useSelfClosingTagIfEmpty:i.useSelfClosingTagIfEmpty})}Mi(e,t,l,i)}function cb(e,t,n){if((0,Z.isMap)(e))e.forEach(function(r,s){al((0,Z.stringify)(s),r,t,n)});else for(var i=0,a=Object.keys(e);i<a.length;i++){var o=a[i];al(o,e[o],t,n)}}function pb(e,t,n,i){var a;Object.prototype.hasOwnProperty.call(i.wrapHandlers,"*")&&(a=i.wrapHandlers["*"]),Object.prototype.hasOwnProperty.call(i.wrapHandlers,e)&&(a=i.wrapHandlers[e]);var o=e,r=n;if(!(0,Z.isUndefined)(a)){var s=a(o,t);(0,Z.isNull)(s)||(o=s,r=n.element({name:e,replaceInvalidCharsInName:i.replaceInvalidChars,useSelfClosingTagIfEmpty:i.useSelfClosingTagIfEmpty}))}t.forEach(function(p){var l=r;if(!(0,Z.isArray)(p)&&!(0,Z.isSet)(p)){var c=Bi(p,i);if(!(0,Z.isUndefined)(c)&&c(p)===Ui.instance)return;l=r.element({name:o,replaceInvalidCharsInName:i.replaceInvalidChars,useSelfClosingTagIfEmpty:i.useSelfClosingTagIfEmpty})}Mi(o,p,l,i)})}function Mi(e,t,n,i){var a=Bi(t,i);if((0,Z.isUndefined)(a)||(t=a(t)),(0,Z.isObject)(t)||(0,Z.isMap)(t)){cb(t,n,i);return}if((0,Z.isArray)(t)||(0,Z.isSet)(t)){pb(e,t,n,i);return}sl((0,Z.stringify)(t),n,i)}function cl(e,t,n){var i=new rl.Options(n);Mi(e.name,t,e,i)}ht.parseToExistingElement=cl;function lb(e,t,n){var i=new rl.Options(n),a=new ol.XmlDocument({validation:i.validation});i.declaration.include&&a.decl(i.declaration),i.dtd.include&&a.dtd({name:i.dtd.name,pubId:i.dtd.pubId,sysId:i.dtd.sysId});var o=a.element({name:e,replaceInvalidCharsInName:i.replaceInvalidChars,useSelfClosingTagIfEmpty:i.useSelfClosingTagIfEmpty});return cl(o,t,n),a.toString(i.format)}ht.parse=lb});var Pt,ll,ul,dl,ml,fl,hl,xl,at=Sn(()=>{"use strict";Pt={error:"ArtifactError",message:"There was a problem with an artifact",expected:"An external process may have has modified or deleted one of the artifacts (files and directories).",hint:"Have there been any recent deployments? These can delete directories from the current render."},ll=e=>({error:"ErrorInSSGBuildProcess",message:`Error in SSG build process: ${JSON.stringify(e)}`,expected:"This can happen if there was a problem with the SSG build process."}),ul=(e,t)=>({error:"LifecycleExecutionError",message:`Exceeded maximum retry attempts (${e}) for ${t} LifeCycle`}),dl={error:"LoginError",message:"There was a problem logging in to the API",expected:"This happens if the API is currently not working or the credentials are incorrect."},ml={error:"NoDomainsFoundError",message:"No domains were found in this instance. The process cannot continue.",expected:"This may 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."},fl={error:"NoJSConfigFileFound",message:"Could not find jsconfig.json or tsconfig.json",expected:"This can happen if the instance is not properly configured with a jsconfig.json or tsconfig.json file."},hl={error:"RenderUUIDError",message:`Render sentinel file does not exist.
|
|
17
|
+
${JSON.stringify(t,null,2)}`),new An}var An,Je=Sn(()=>{"use strict";Xt();An=class extends Error{constructor(){super(),this.name="InternalCXError",this.stack=""}}});var oe=g(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.isUndefined=_e.fixName=_e.validateName=_e.validateSingleChar=_e.fixChar=_e.validateChar=void 0;function yv(e){for(var t=0;t<e.length;t++){var n=e.charCodeAt(t);if(!(n===9||n===10||n===13||n>=32&&n<=55295||n>=57344&&n<=65533)){if(t+1===e.length)return!1;var i=e.charCodeAt(t+1);if(n>=55296&&n<=56319&&i>=56320&&i<=57343){t++;continue}return!1}}return!0}_e.validateChar=yv;function wv(e){for(var t="",n=0;n<e.length;n++){var i=e.charCodeAt(n);if(i===9||i===10||i===13||i>=32&&i<=55295||i>=57344&&i<=65533){t+=e[n];continue}if(n+1===e.length)return t+="\uFFFD",t;var a=e.charCodeAt(n+1);if(i>=55296&&i<=56319&&a>=56320&&a<=57343){t+=e[n]+e[n+1],n++;continue}t+="\uFFFD"}return t}_e.fixChar=wv;function _v(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 n=e.charCodeAt(1);return t>=55296&&t<=56319&&n>=56320&&n<=57343}_e.validateSingleChar=_v;function Sv(e){if(e.length===0)return!1;var t=e.charCodeAt(0),n=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 n;var i=e.charCodeAt(1),a=t>=55296&&t<=56191&&i>=56320&&i<=57343;if(!n&&!a)return!1;for(var o=a?2:1,r=o;r<e.length;r++){var s=e.charCodeAt(r);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(r+1===e.length)return!1;var p=e.charCodeAt(r+1);if(s>=55296&&s<=56191&&p>=56320&&p<=57343){r++;continue}return!1}}return!0}_e.validateName=Sv;function Ev(e){var t="";if(e.length===0)return t;var n=e.charCodeAt(0),i=n===58||n===95||n>=65&&n<=90||n>=97&&n<=122||n>=192&&n<=214||n>=216&&n<=246||n>=248&&n<=767||n>=880&&n<=893||n>=895&&n<=8191||n>=8204&&n<=8205||n>=8304&&n<=8591||n>=11264&&n<=12271||n>=12289&&n<=55295||n>=63744&&n<=64975||n>=65008&&n<=65533;if(e.length===1)return i?t=e[0]:t="\uFFFD",t;var a=e.charCodeAt(1),o=n>=55296&&n<=56191&&a>=56320&&a<=57343;o?t=e[0]+e[1]:i?t=e[0]:t="\uFFFD";for(var r=o?2:1,s=r;s<e.length;s++){var p=e.charCodeAt(s);if(p===58||p===95||p===45||p===46||p===183||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||p>=192&&p<=214||p>=216&&p<=246||p>=248&&p<=767||p>=768&&p<=879||p>=880&&p<=893||p>=895&&p<=8191||p>=8204&&p<=8205||p>=8255&&p<=8256||p>=8304&&p<=8591||p>=11264&&p<=12271||p>=12289&&p<=55295||p>=63744&&p<=64975||p>=65008&&p<=65533){t+=e[s];continue}if(s+1===e.length)return t+="\uFFFD",t;var l=e.charCodeAt(s+1);if(p>=55296&&p<=56191&&l>=56320&&l<=57343){t+=e[s]+e[s+1],s++;continue}t+="\uFFFD"}return t}_e.fixName=Ev;function Dv(e){return Object.prototype.toString.call(e)==="[object Undefined]"}_e.isUndefined=Dv});var en=g(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.StringOptions=void 0;var Si=oe(),Rv=function(){function e(t){this.doubleQuotes=!1,this.indent=" ",this.newline=`
|
|
18
|
+
`,this.pretty=!0,(0,Si.isUndefined)(t.doubleQuotes)||(this.doubleQuotes=t.doubleQuotes),(0,Si.isUndefined)(t.indent)||(this.indent=t.indent),(0,Si.isUndefined)(t.newline)||(this.newline=t.newline),(0,Si.isUndefined)(t.pretty)||(this.pretty=t.pretty)}return e}();Ei.StringOptions=Rv});var Di=g(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.escapeDoubleQuotes=ke.escapeSingleQuotes=ke.escapeRightAngleBracketsInCdataTerminator=ke.escapeLeftAngleBrackets=ke.escapeAmpersands=void 0;function Ov(e){return e.replace(/&/g,"&")}ke.escapeAmpersands=Ov;function Cv(e){return e.replace(/</g,"<")}ke.escapeLeftAngleBrackets=Cv;function Tv(e){return e.replace(/]]>/g,"]]>")}ke.escapeRightAngleBracketsInCdataTerminator=Tv;function Iv(e){return e.replace(/'/g,"'")}ke.escapeSingleQuotes=Iv;function Pv(e){return e.replace(/"/g,""")}ke.escapeDoubleQuotes=Pv});var Za=g(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});var Av=me(),Up=Di(),Ka=oe(),Fv=function(){function e(t,n,i){this._validation=n,(0,Ka.isUndefined)(i.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=i.replaceInvalidCharsInCharData,this._parent=t,this.charData=i.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._replaceInvalidCharsInCharData)t=(0,Ka.fixChar)(t);else if(this._validation&&!(0,Ka.validateChar)(t))throw new Error((0,Av.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,Up.escapeAmpersands)(t),t=(0,Up.escapeLeftAngleBrackets)(t),t},e.prototype.up=function(){return this._parent},e}();Qa.default=Fv});var Ri=g(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});var Bp=me(),Mp=oe(),kv=function(){function e(t,n,i){this._hex=!1,this._validation=n,this._parent=t,this.char=i.char,(0,Mp.isUndefined)(i.hex)||(this.hex=i.hex)}return Object.defineProperty(e.prototype,"char",{get:function(){return this._char},set:function(t){if(this._validation&&!(0,Mp.validateSingleChar)(t))throw new Error((0,Bp.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 n=this._char.charCodeAt(0);if(n>=55296&&n<=56319&&this._char.length>1){var i=this._char.charCodeAt(1);if(i>=56320&&i<=57343)t=(n-55296)*1024+i-56320+65536;else throw new Error((0,Bp.getContext)(this.up())+": character"+(' reference "'+this.char+'" should')+" reference a valid Unicode character")}else t=n}return this._hex?"&#x"+t.toString(16)+";":"&#"+t+";"},e.prototype.up=function(){return this._parent},e}();eo.default=kv});var Oi=g(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});var jv=me(),Lv=oe(),Nv=function(){function e(t,n,i){this._validation=n,this._parent=t,this.name=i.name}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(t){if(this._validation&&!(0,Lv.validateName)(t))throw new Error((0,jv.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}();to.default=Nv});var Ci=g(Fn=>{"use strict";var ao=Fn&&Fn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fn,"__esModule",{value:!0});var no=me(),$p=Di(),qv=en(),io=oe(),Uv=ao(Za()),Bv=ao(Ri()),Mv=ao(Oi()),$v=function(){function e(t,n,i){this._validation=n,(0,io.isUndefined)(i.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=i.replaceInvalidCharsInName,this._children=[],this._parent=t,this.name=i.name}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(t){if(this._replaceInvalidCharsInName){if(t=(0,io.fixName)(t),t.length===0)throw new Error((0,no.getContext)(this.up())+": attribute name should not be empty")}else if(this._validation&&!(0,io.validateName)(t))throw t.length===0?new Error((0,no.getContext)(this.up())+": attribute name should not be empty"):new Error((0,no.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 n=new Bv.default(this,this._validation,t);return this._children.push(n),n},e.prototype.entityRef=function(t){var n=new Mv.default(this,this._validation,t);return this._children.push(n),n},e.prototype.text=function(t){var n=new Uv.default(this,this._validation,t);return this._children.push(n),n},e.prototype.toString=function(t){t===void 0&&(t={});for(var n=new qv.StringOptions(t),i=n.doubleQuotes?'"':"'",a=this._name+"="+i,o=0,r=this._children;o<r.length;o++){var s=r[o];n.doubleQuotes?a+=(0,$p.escapeDoubleQuotes)(s.toString()):a+=(0,$p.escapeSingleQuotes)(s.toString())}return a+=i,a},e.prototype.up=function(){return this._parent},e}();Fn.default=$v});var ro=g(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});var Gv=me(),zv=oe(),Xv=function(){function e(t,n,i){this._validation=n,this._parent=t,this.charData=i.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._validation&&!(0,zv.validateChar)(t))throw new Error((0,Gv.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}();oo.default=Xv});var co=g(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});var Hv=me(),Wv=oe(),Vv=function(){function e(t,n,i){this._validation=n,this._parent=t,this.charData=i.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._validation&&!(0,Wv.validateChar)(t))throw new Error((0,Hv.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}();so.default=Vv});var lo=g(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});var Jv=me(),Yv=oe(),Kv=function(){function e(t,n,i){this._validation=n,this._parent=t,this.charData=i.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._validation&&!(0,Yv.validateChar)(t))throw new Error((0,Jv.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}();po.default=Kv});var mo=g(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});var Qv=me(),Zv=oe(),eg=function(){function e(t,n,i){this._validation=n,this._parent=t,this.charData=i.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._validation&&!(0,Zv.validateChar)(t))throw new Error((0,Qv.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}();uo.default=eg});var ho=g(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});var tg=me(),ng=oe(),ig=function(){function e(t,n,i){this._validation=n,this._parent=t,this.name=i.name}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(t){if(this._validation&&!(0,ng.validateName)(t))throw new Error((0,tg.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}();fo.default=ig});var kn=g(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});var Ti=me(),Ii=oe(),ag=function(){function e(t,n,i){this._validation=n,this._parent=t,this.content=i.content,this.target=i.target}return Object.defineProperty(e.prototype,"content",{get:function(){return this._content},set:function(t){if(!(0,Ii.isUndefined)(t)){if(this._validation&&!(0,Ii.validateChar)(t))throw new Error((0,Ti.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,Ti.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,Ii.validateName)(t))throw new Error((0,Ti.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,Ti.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,Ii.isUndefined)(this._content)?"<?"+this._target+"?>":"<?"+this._target+" "+this._content+"?>"},e.prototype.up=function(){return this._parent},e}();xo.default=ag});var Pi=g(Ct=>{"use strict";var Tt=Ct&&Ct.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ct,"__esModule",{value:!0});Ct.validatePubId=void 0;var ft=me(),og=en(),Ye=oe(),rg=Tt(jn()),sg=Tt(ro()),cg=Tt(co()),pg=Tt(lo()),lg=Tt(mo()),ug=Tt(ho()),dg=Tt(kn()),mg=function(){function e(t,n,i){this._pubId=void 0,this._sysId=void 0,this._validation=n,this._children=[],this._parent=t,this.name=i.name,(0,Ye.isUndefined)(i.sysId)||(this.sysId=i.sysId),(0,Ye.isUndefined)(i.pubId)||(this.pubId=i.pubId)}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(t){if(this._validation&&!(0,Ye.validateName)(t))throw new Error((0,ft.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,Ye.isUndefined)(t)){if(this._validation&&!Gp(t))throw new Error((0,ft.getContext)(this.up())+": DTD public"+(' identifier "'+t+'" should not contain')+" characters not allowed in public identifiers");if(this._validation&&(0,Ye.isUndefined)(this._sysId))throw new Error((0,ft.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,Ye.isUndefined)(t)){if(this._validation&&!(0,Ye.validateChar)(t))throw new Error((0,ft.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,ft.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 n=new sg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.comment=function(t){var n=new rg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.element=function(t){var n=new cg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.entity=function(t){var n=new pg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.notation=function(t){var n=new lg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.paramEntityRef=function(t){var n=new ug.default(this,this._validation,t);return this._children.push(n),n},e.prototype.procInst=function(t){var n=new dg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.toString=function(t){t===void 0&&(t={});var n=new og.StringOptions(t),i="<!DOCTYPE "+this._name;if((0,Ye.isUndefined)(this._pubId))(0,Ye.isUndefined)(this._sysId)||(i+=" ",i=this.appendId("SYSTEM",this._sysId,i,n));else{if((0,Ye.isUndefined)(this._sysId))throw new Error((0,ft.getContext)(this.up())+": DTD system identifier is not undefined");i+=" ",i=this.appendId("PUBLIC",this._pubId,i,n),i=this.appendId("",this._sysId,i,n)}if(this._children.length!==0){i+=" [";for(var a=0,o=this._children;a<o.length;a++){var r=o[a];n.pretty&&(i+=n.newline+n.indent),i+=r.toString()}n.pretty&&(i+=n.newline),i+="]>"}else i+=">";return i},e.prototype.up=function(){return this._parent},e.prototype.appendId=function(t,n,i,a){if(i+=t+" ",a.doubleQuotes){if(this._validation&&n.indexOf('"')!==-1)throw new Error((0,ft.getContext)(this.up())+": doubleQuotes option inconsistent with DTD system identifier or public identifier");i+='"'+n+'"'}else{if(this._validation&&n.indexOf("'")!==-1)throw new Error((0,ft.getContext)(this)+": doubleQuotes option inconsistent with DTD system identifier or public identifier");i+="'"+n+"'"}return i},e}();Ct.default=mg;function Gp(e){for(var t=0;t<e.length;t++){var n=e.charCodeAt(t);if(!(n===10||n===13||n===32||n===33||n>=35&&n<=37||n>=39&&n<=47||n>=48&&n<=57||n===58||n===59||n===61||n===63||n>=64&&n<=90||n===95||n>=97&&n<=122))return t+1===e.length,!1}return!0}Ct.validatePubId=Gp});var bo=g(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});var zp=me(),vo=oe(),fg=function(){function e(t,n,i){this._validation=n,(0,vo.isUndefined)(i.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=i.replaceInvalidCharsInCharData,this._parent=t,this.charData=i.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._replaceInvalidCharsInCharData)t=(0,vo.fixChar)(t);else if(this._validation&&!(0,vo.validateChar)(t))throw new Error((0,zp.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,zp.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}();go.default=fg});var So=g(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});var hg=me(),yo=Di(),wo=oe(),xg=function(){function e(t,n,i){this._validation=n,(0,wo.isUndefined)(i.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=i.replaceInvalidCharsInCharData,this._parent=t,this.charData=i.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._replaceInvalidCharsInCharData)t=(0,wo.fixChar)(t);else if(this._validation&&!(0,wo.validateChar)(t))throw new Error((0,hg.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,yo.escapeAmpersands)(t),t=(0,yo.escapeLeftAngleBrackets)(t),t=(0,yo.escapeRightAngleBracketsInCdataTerminator)(t),t},e.prototype.up=function(){return this._parent},e}();_o.default=xg});var ji=g(qn=>{"use strict";var It=qn&&qn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qn,"__esModule",{value:!0});var Ai=me(),vg=en(),Ln=oe(),Xp=It(Ci()),gg=It(bo()),Nn=It(So()),Fi=It(Ri()),bg=It(jn()),ki=It(Oi()),yg=It(kn()),wg=function(){function e(t,n,i){this._validation=n,(0,Ln.isUndefined)(i.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=i.replaceInvalidCharsInName,(0,Ln.isUndefined)(i.useSelfClosingTagIfEmpty)?this._useSelfClosingTagIfEmpty=!0:this._useSelfClosingTagIfEmpty=i.useSelfClosingTagIfEmpty,this._children=[],this._attributeNames=[],this._parent=t,this.name=i.name}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(t){if(this._replaceInvalidCharsInName){if(t=(0,Ln.fixName)(t),t.length===0)throw new Error((0,Ai.getContext)(this.up())+": element name should not be empty")}else if(this._validation&&!(0,Ln.validateName)(t))throw t.length===0?new Error((0,Ai.getContext)(this.up())+": element name should not be empty"):new Error((0,Ai.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,Ai.getContext)(this.up())+': element "'+this.name+'" already contains an attribute with the'+(' name "'+t.name+'"'));var n=new Xp.default(this,this._validation,t);return this._children.push(n),this._attributeNames.push(t.name),n},e.prototype.cdata=function(t){var n=new gg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.charData=function(t){var n=new Nn.default(this,this._validation,t);return this._children.push(n),n},e.prototype.charRef=function(t){var n=new Fi.default(this,this._validation,t);return this._children.push(n),n},e.prototype.comment=function(t){var n=new bg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.element=function(t){var n=new e(this,this._validation,t);return this._children.push(n),n},e.prototype.entityRef=function(t){var n=new ki.default(this,this._validation,t);return this._children.push(n),n},e.prototype.procInst=function(t){var n=new yg.default(this,this._validation,t);return this._children.push(n),n},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,n){for(var i=new vg.StringOptions(t),a=n+i.indent,o="<"+this._name,r=[],s=0,p=this._children;s<p.length;s++){var l=p[s];l instanceof Xp.default?o+=" "+l.toString(t):r.push(l)}if(r.length>0){for(var c="",u=0;u<r.length;u++){var f=r[u],h="";f instanceof e?h+=f.toStringWithIndent(i,a):h+=f.toString();var m=u>0?r[u-1]:void 0;f instanceof Nn.default&&f.toString()===""||(i.pretty&&(this.allSameLineNodes(r)||u>0&&this.onSameLine(f,m)||(h=i.newline+a+h)),c+=h)}i.pretty&&(this.allSameLineNodes(r)||(c+=i.newline+n)),c.length===0&&this._useSelfClosingTagIfEmpty?o+="/>":o+=">"+c+"</"+this._name+">"}else this._useSelfClosingTagIfEmpty?o+="/>":o+="></"+this._name+">";return o},e.prototype.allSameLineNodes=function(t){for(var n=0,i=t;n<i.length;n++){var a=i[n];if(!(a instanceof Fi.default||a instanceof ki.default||a instanceof Nn.default))return!1}return!0},e.prototype.onSameLine=function(t,n){return(t instanceof Fi.default||t instanceof ki.default||t instanceof Nn.default)&&!(0,Ln.isUndefined)(n)&&(n instanceof Fi.default||n instanceof ki.default||n instanceof Nn.default)},e}();qn.default=wg});var me=g(tn=>{"use strict";var Ni=tn&&tn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tn,"__esModule",{value:!0});tn.getContext=void 0;var _g=Ni(Ci()),Sg=Ni(qi()),Eg=Ni(Pi()),Dg=Ni(ji());function Li(e){if(e instanceof _g.default)return Li(e.up())+(' > attribute "'+e.name+'"');if(e instanceof Sg.default)return"in XML document";if(e instanceof Eg.default)return Li(e.up())+" > DTD";if(e instanceof Dg.default)return Li(e.up())+(' > element "'+e.name+'"');throw new Error("Unrecognized object of type "+Object.prototype.toString.call(e))}tn.getContext=Li});var jn=g(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});var Eo=me(),Do=oe(),Rg=function(){function e(t,n,i){this._validation=n,(0,Do.isUndefined)(i.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=i.replaceInvalidCharsInCharData,this._parent=t,this.charData=i.charData}return Object.defineProperty(e.prototype,"charData",{get:function(){return this._charData},set:function(t){if(this._replaceInvalidCharsInCharData)t=(0,Do.fixChar)(t);else if(this._validation&&!(0,Do.validateChar)(t))throw new Error((0,Eo.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,Eo.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,Eo.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}();Ro.default=Rg});var To=g(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});var Oo=me(),Og=en(),Un=oe(),Cg=function(){function e(t,n,i){this._version="1.0",this._validation=n,this._parent=t,this.encoding=i.encoding,this.standalone=i.standalone,(0,Un.isUndefined)(i.version)||(this.version=i.version)}return Object.defineProperty(e.prototype,"encoding",{get:function(){return this._encoding},set:function(t){if(this._validation&&!(0,Un.isUndefined)(t)&&!Tg(t))throw new Error((0,Oo.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,Un.isUndefined)(t)&&t!=="yes"&&t!=="no")throw new Error((0,Oo.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&&!Ig(t))throw new Error((0,Oo.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 n=new Og.StringOptions(t),i=n.doubleQuotes?'"':"'",a="<?xml version="+i+this._version+i;return(0,Un.isUndefined)(this._encoding)||(a+=" encoding="+i+this._encoding+i),(0,Un.isUndefined)(this._standalone)||(a+=" standalone="+i+this._standalone+i),a+="?>",a},e.prototype.up=function(){return this._parent},e}();Co.default=Cg;function Tg(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 n=1;n<e.length;n++){var i=e.charCodeAt(n);if(!(i===95||i===45||i===46||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122))return n+1===e.length,!1}return!0}function Ig(e){for(var t=0;t<=9;t++)if(e==="1."+t)return!0;return!1}});var qi=g(Mn=>{"use strict";var $n=Mn&&Mn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Mn,"__esModule",{value:!0});var Pg=en(),Ag=oe(),Fg=$n(jn()),Hp=$n(To()),Wp=$n(Pi()),Bn=$n(ji()),kg=$n(kn()),jg=function(){function e(t){this._children=[],this._validation=(0,Ag.isUndefined)(t.validation)?!0:t.validation}return e.prototype.comment=function(t){var n=new Fg.default(this,this._validation,t);return this._children.push(n),n},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 n=new Hp.default(this,this._validation,t);return this._children.push(n),n},e.prototype.dtd=function(t){var n=this._children.filter(function(a){return a instanceof Bn.default});if(this._validation&&n.length!==0)throw new Error("in XML document: DTD must precede the root element");var i=new Wp.default(this,this._validation,t);return this._children.push(i),i},e.prototype.element=function(t){var n=this._children.filter(function(a){return a instanceof Bn.default});if(this._validation&&n.length!==0)throw new Error("in XML document: only one root element is permitted");var i=new Bn.default(this,this._validation,t);return this._children.push(i),i},e.prototype.procInst=function(t){var n=new kg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.toString=function(t){t===void 0&&(t={});var n=this._children.filter(function(l){return l instanceof Bn.default});if(this._validation&&n.length!==1)throw new Error("in XML document: no more than one root element is permitted");for(var i=new Pg.StringOptions(t),a="",o=0,r=this._children;o<r.length;o++){var s=r[o];s instanceof Hp.default||s instanceof Wp.default||s instanceof Bn.default?a+=s.toString(t):a+=s.toString(),i.pretty&&(a+=i.newline)}var p=a.length-i.newline.length;return a.substr(p)===i.newline&&(a=a.substr(0,p)),a},e}();Mn.default=jg});var Vp=g(I=>{"use strict";var pe=I&&I.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(I,"__esModule",{value:!0});I.document=I.XmlProcInst=I.XmlEntityRef=I.XmlElement=I.XmlDtdParamEntityRef=I.XmlDtdNotation=I.XmlDtdEntity=I.XmlDtdElement=I.XmlDtdAttlist=I.XmlDtd=I.XmlDocument=I.XmlDecl=I.XmlComment=I.XmlCharRef=I.XmlCharData=I.XmlCdata=I.XmlAttributeText=I.XmlAttribute=void 0;var Lg=pe(qi()),Ng=Ci();Object.defineProperty(I,"XmlAttribute",{enumerable:!0,get:function(){return pe(Ng).default}});var qg=Za();Object.defineProperty(I,"XmlAttributeText",{enumerable:!0,get:function(){return pe(qg).default}});var Ug=bo();Object.defineProperty(I,"XmlCdata",{enumerable:!0,get:function(){return pe(Ug).default}});var Bg=So();Object.defineProperty(I,"XmlCharData",{enumerable:!0,get:function(){return pe(Bg).default}});var Mg=Ri();Object.defineProperty(I,"XmlCharRef",{enumerable:!0,get:function(){return pe(Mg).default}});var $g=jn();Object.defineProperty(I,"XmlComment",{enumerable:!0,get:function(){return pe($g).default}});var Gg=To();Object.defineProperty(I,"XmlDecl",{enumerable:!0,get:function(){return pe(Gg).default}});var zg=qi();Object.defineProperty(I,"XmlDocument",{enumerable:!0,get:function(){return pe(zg).default}});var Xg=Pi();Object.defineProperty(I,"XmlDtd",{enumerable:!0,get:function(){return pe(Xg).default}});var Hg=ro();Object.defineProperty(I,"XmlDtdAttlist",{enumerable:!0,get:function(){return pe(Hg).default}});var Wg=co();Object.defineProperty(I,"XmlDtdElement",{enumerable:!0,get:function(){return pe(Wg).default}});var Vg=lo();Object.defineProperty(I,"XmlDtdEntity",{enumerable:!0,get:function(){return pe(Vg).default}});var Jg=mo();Object.defineProperty(I,"XmlDtdNotation",{enumerable:!0,get:function(){return pe(Jg).default}});var Yg=ho();Object.defineProperty(I,"XmlDtdParamEntityRef",{enumerable:!0,get:function(){return pe(Yg).default}});var Kg=ji();Object.defineProperty(I,"XmlElement",{enumerable:!0,get:function(){return pe(Kg).default}});var Qg=Oi();Object.defineProperty(I,"XmlEntityRef",{enumerable:!0,get:function(){return pe(Qg).default}});var Zg=kn();Object.defineProperty(I,"XmlProcInst",{enumerable:!0,get:function(){return pe(Zg).default}});function eb(e){return e===void 0&&(e={}),new Lg.default(e)}I.document=eb});var Io=g(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.stringify=le.isMap=le.isSet=le.isFunction=le.isArray=le.isObject=le.isNull=le.isUndefined=void 0;function Jp(e){return Object.prototype.toString.call(e)==="[object Undefined]"}le.isUndefined=Jp;function Yp(e){return Object.prototype.toString.call(e)==="[object Null]"}le.isNull=Yp;function tb(e){return Object.prototype.toString.call(e)==="[object Object]"}le.isObject=tb;function nb(e){return Object.prototype.toString.call(e)==="[object Array]"}le.isArray=nb;function Kp(e){return Object.prototype.toString.call(e)==="[object Function]"}le.isFunction=Kp;function ib(e){return Object.prototype.toString.call(e)==="[object Set]"}le.isSet=ib;function ab(e){return Object.prototype.toString.call(e)==="[object Map]"}le.isMap=ab;function ob(e){return!Jp(e)&&!Yp(e)&&Kp(e?.toString)&&(e=e.toString()),String(e)}le.stringify=ob});var il=g(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.WrapHandlers=Se.TypeHandlers=Se.FormatOptions=Se.DtdOptions=Se.DeclarationOptions=Se.Options=void 0;var Ne=Io(),rb=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,Ne.isUndefined)(t.validation)||(this.validation=t.validation),(0,Ne.isUndefined)(t.aliasString)||(this.aliasString=t.aliasString),(0,Ne.isUndefined)(t.attributeString)||(this.attributeString=t.attributeString),(0,Ne.isUndefined)(t.cdataInvalidChars)||(this.cdataInvalidChars=t.cdataInvalidChars),(0,Ne.isUndefined)(t.cdataKeys)||(this.cdataKeys=t.cdataKeys),this.declaration=new Qp(t.declaration),this.dtd=new Zp(this.validation,t.dtd),this.format=new el(t.format),(0,Ne.isUndefined)(t.replaceInvalidChars)||(this.replaceInvalidChars=t.replaceInvalidChars),this.typeHandlers=new tl(t.typeHandlers),(0,Ne.isUndefined)(t.useSelfClosingTagIfEmpty)||(this.useSelfClosingTagIfEmpty=t.useSelfClosingTagIfEmpty),(0,Ne.isUndefined)(t.valueString)||(this.valueString=t.valueString),this.wrapHandlers=new nl(t.wrapHandlers)}return e}();Se.Options=rb;var Qp=function(){function e(t){t===void 0&&(t={}),this.include=!0,(0,Ne.isUndefined)(t.include)||(this.include=t.include),this.encoding=t.encoding,this.standalone=t.standalone,this.version=t.version}return e}();Se.DeclarationOptions=Qp;var Zp=function(){function e(t,n){if(n===void 0&&(n={}),this.include=!1,(0,Ne.isUndefined)(n.include)||(this.include=n.include),t&&(0,Ne.isUndefined)(n.name)&&this.include)throw new Error("options.dtd.name should be defined if options.dtd.include is true");this.name=n.name,this.sysId=n.sysId,this.pubId=n.pubId}return e}();Se.DtdOptions=Zp;var el=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}();Se.FormatOptions=el;var tl=function(){function e(t){t===void 0&&(t={});for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(this[n]=t[n])}return e}();Se.TypeHandlers=tl;var nl=function(){function e(t){t===void 0&&(t={});for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(this[n]=t[n])}return e}();Se.WrapHandlers=nl});var pl=g(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.parse=ht.parseToExistingElement=ht.Absent=void 0;var ol=Vp(),rl=il(),Z=Io(),Ui=function(){function e(){}return Object.defineProperty(e,"instance",{get:function(){return e._instance},enumerable:!1,configurable:!0}),e._instance=new e,e}();ht.Absent=Ui;function Bi(e,t){var n=Object.prototype.toString.call(e),i;return Object.prototype.hasOwnProperty.call(t.typeHandlers,"*")&&(i=t.typeHandlers["*"]),Object.prototype.hasOwnProperty.call(t.typeHandlers,n)&&(i=t.typeHandlers[n]),i}function sl(e,t,n){var i=function(r){return n.cdataInvalidChars&&(r.indexOf("<")!==-1||r.indexOf("&")!==-1)||n.cdataKeys.indexOf(t.name)!==-1||n.cdataKeys.indexOf("*")!==-1};if(t instanceof ol.XmlElement)if(i(e))for(var a=e.split("]]>"),o=0;o<a.length;o++)i(a[o])?t.cdata({charData:a[o],replaceInvalidCharsInCharData:n.replaceInvalidChars}):t.charData({charData:a[o],replaceInvalidCharsInCharData:n.replaceInvalidChars}),o<a.length-1&&t.charData({charData:"]]>",replaceInvalidCharsInCharData:n.replaceInvalidChars});else t.charData({charData:e,replaceInvalidCharsInCharData:n.replaceInvalidChars});else t.text({charData:e,replaceInvalidCharsInCharData:n.replaceInvalidChars})}function sb(e,t,n,i){var a=n.attribute({name:e,replaceInvalidCharsInName:i.replaceInvalidChars});sl((0,Z.stringify)(t),a,i)}function al(e,t,n,i){if(e===i.aliasString){n.name=(0,Z.stringify)(t);return}if(e.indexOf(i.attributeString)===0&&(0,Z.isObject)(t)){for(var a=0,o=Object.keys(t);a<o.length;a++){var r=o[a],s=t[r],p=Bi(s,i);!(0,Z.isUndefined)(p)&&(s=p(s),p(t)===Ui.instance)||sb(r,s,n,i)}return}if(e.indexOf(i.valueString)===0){Mi(e,t,n,i);return}var l=n;if(!(0,Z.isArray)(t)&&!(0,Z.isSet)(t)){var p=Bi(t,i);if(!(0,Z.isUndefined)(p)&&p(t)===Ui.instance)return;l=n.element({name:e,replaceInvalidCharsInName:i.replaceInvalidChars,useSelfClosingTagIfEmpty:i.useSelfClosingTagIfEmpty})}Mi(e,t,l,i)}function cb(e,t,n){if((0,Z.isMap)(e))e.forEach(function(r,s){al((0,Z.stringify)(s),r,t,n)});else for(var i=0,a=Object.keys(e);i<a.length;i++){var o=a[i];al(o,e[o],t,n)}}function pb(e,t,n,i){var a;Object.prototype.hasOwnProperty.call(i.wrapHandlers,"*")&&(a=i.wrapHandlers["*"]),Object.prototype.hasOwnProperty.call(i.wrapHandlers,e)&&(a=i.wrapHandlers[e]);var o=e,r=n;if(!(0,Z.isUndefined)(a)){var s=a(o,t);(0,Z.isNull)(s)||(o=s,r=n.element({name:e,replaceInvalidCharsInName:i.replaceInvalidChars,useSelfClosingTagIfEmpty:i.useSelfClosingTagIfEmpty}))}t.forEach(function(p){var l=r;if(!(0,Z.isArray)(p)&&!(0,Z.isSet)(p)){var c=Bi(p,i);if(!(0,Z.isUndefined)(c)&&c(p)===Ui.instance)return;l=r.element({name:o,replaceInvalidCharsInName:i.replaceInvalidChars,useSelfClosingTagIfEmpty:i.useSelfClosingTagIfEmpty})}Mi(o,p,l,i)})}function Mi(e,t,n,i){var a=Bi(t,i);if((0,Z.isUndefined)(a)||(t=a(t)),(0,Z.isObject)(t)||(0,Z.isMap)(t)){cb(t,n,i);return}if((0,Z.isArray)(t)||(0,Z.isSet)(t)){pb(e,t,n,i);return}sl((0,Z.stringify)(t),n,i)}function cl(e,t,n){var i=new rl.Options(n);Mi(e.name,t,e,i)}ht.parseToExistingElement=cl;function lb(e,t,n){var i=new rl.Options(n),a=new ol.XmlDocument({validation:i.validation});i.declaration.include&&a.decl(i.declaration),i.dtd.include&&a.dtd({name:i.dtd.name,pubId:i.dtd.pubId,sysId:i.dtd.sysId});var o=a.element({name:e,replaceInvalidCharsInName:i.replaceInvalidChars,useSelfClosingTagIfEmpty:i.useSelfClosingTagIfEmpty});return cl(o,t,n),a.toString(i.format)}ht.parse=lb});var Pt,ll,ul,dl,ml,fl,hl,xl,at=Sn(()=>{"use strict";Pt={error:"ArtifactError",message:"There was a problem with an artifact",expected:"An external process may have has modified or deleted one of the artifacts (files and directories).",hint:"Have there been any recent deployments? These can delete directories from the current render."},ll=e=>({error:"ErrorInSSGBuildProcess",message:`Error in SSG build process: ${JSON.stringify(e)}`,expected:"This can happen if there was a problem with the SSG build process."}),ul=(e,t)=>({error:"LifecycleExecutionError",message:`Exceeded maximum retry attempts (${e}) for ${t} LifeCycle`}),dl={error:"LoginError",message:"There was a problem logging in to the API",expected:"This happens if the API is currently not working or the credentials are incorrect."},ml={error:"NoDomainsFoundError",message:"No domains were found in this instance. The process cannot continue.",expected:"This may 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."},fl={error:"NoJSConfigFileFound",message:"Could not find jsconfig.json or tsconfig.json",expected:"This can happen if the instance is not properly configured with a jsconfig.json or tsconfig.json file."},hl={error:"RenderUUIDError",message:`Render sentinel file does not exist.
|
|
19
19
|
The rendering UUID cannot be read safely.
|
|
20
20
|
There was probably an instance deployment during the render, and files were deleted.
|
|
21
21
|
|
|
@@ -24,7 +24,7 @@ The files generated in this render will not be published.`},xl={error:"WriteToSt
|
|
|
24
24
|
`).join(`
|
|
25
25
|
`+o),e.push(a+"m+"+ea.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=vw()+t+" "+e[0]}function vw(){return fe.inspectOpts.hideDate?"":new Date().toISOString()+" "}function gw(...e){return process.stderr.write(Zi.format(...e)+`
|
|
26
26
|
`)}function bw(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function yw(){return process.env.DEBUG}function ww(e){e.inspectOpts={};let t=Object.keys(fe.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=fe.inspectOpts[t[n]]}ea.exports=sr()(fe);var{formatters:Nu}=ea.exports;Nu.o=function(e){return this.inspectOpts.colors=this.useColors,Zi.inspect(e,this.inspectOpts).split(`
|
|
27
|
-
`).map(t=>t.trim()).join(" ")};Nu.O=function(e){return this.inspectOpts.colors=this.useColors,Zi.inspect(e,this.inspectOpts)}});var Uu=g((bD,lr)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?lr.exports=Pu():lr.exports=qu()});var Mu=g((yD,Bu)=>{var Jn;Bu.exports=function(){if(!Jn){try{Jn=Uu()("follow-redirects")}catch{}typeof Jn!="function"&&(Jn=function(){})}Jn.apply(null,arguments)}});var Hu=g((wD,_r)=>{var Kn=require("url"),Yn=Kn.URL,_w=require("http"),Sw=require("https"),hr=require("stream").Writable,xr=require("assert"),$u=Mu();(function(){var t=typeof process<"u",n=typeof window<"u"&&typeof document<"u",i=Nt(Error.captureStackTrace);!t&&(n||!i)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var vr=!1;try{xr(new Yn(""))}catch(e){vr=e.code==="ERR_INVALID_URL"}var Ew=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],gr=["abort","aborted","connect","error","socket","timeout"],br=Object.create(null);gr.forEach(function(e){br[e]=function(t,n,i){this._redirectable.emit(e,t,n,i)}});var dr=Qn("ERR_INVALID_URL","Invalid URL",TypeError),mr=Qn("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Dw=Qn("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",mr),Rw=Qn("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Ow=Qn("ERR_STREAM_WRITE_AFTER_END","write after end"),Cw=hr.prototype.destroy||zu;function Re(e,t){hr.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 n=this;this._onNativeResponse=function(i){try{n._processResponse(i)}catch(a){n.emit("error",a instanceof mr?a:new mr({cause:a}))}},this._performRequest()}Re.prototype=Object.create(hr.prototype);Re.prototype.abort=function(){wr(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Re.prototype.destroy=function(e){return wr(this._currentRequest,e),Cw.call(this,e),this};Re.prototype.write=function(e,t,n){if(this._ending)throw new Ow;if(!Lt(e)&&!Pw(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Nt(t)&&(n=t,t=null),e.length===0){n&&n();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new Rw),this.abort())};Re.prototype.end=function(e,t,n){if(Nt(e)?(n=e,e=t=null):Nt(t)&&(n=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,n);else{var i=this,a=this._currentRequest;this.write(e,t,function(){i._ended=!0,a.end(null,null,n)}),this._ending=!0}};Re.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};Re.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};Re.prototype.setTimeout=function(e,t){var n=this;function i(r){r.setTimeout(e),r.removeListener("timeout",r.destroy),r.addListener("timeout",r.destroy)}function a(r){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout(function(){n.emit("timeout"),o()},e),i(r)}function o(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",o),n.removeListener("error",o),n.removeListener("response",o),n.removeListener("close",o),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",a)}return t&&this.on("timeout",t),this.socket?a(this.socket):this._currentRequest.once("socket",a),this.on("socket",i),this.on("abort",o),this.on("error",o),this.on("response",o),this.on("close",o),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){Re.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(Re.prototype,e,{get:function(){return this._currentRequest[e]}})});Re.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))}};Re.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);i._redirectable=this;for(var a of gr)i.on(a,br[a]);if(this._currentUrl=/^\//.test(this._options.path)?Kn.format(this._options):this._options.path,this._isRedirect){var o=0,r=this,s=this._requestBodyBuffers;(function p(l){if(i===r._currentRequest)if(l)r.emit("error",l);else if(o<s.length){var c=s[o++];i.finished||i.write(c.data,c.encoding,p)}else r._ended&&i.end()})()}};Re.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n=e.headers.location;if(!n||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(wr(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Dw;var i,a=this._options.beforeRedirect;a&&(i=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=[],ur(/^content-/i,this._options.headers));var r=ur(/^host$/i,this._options.headers),s=yr(this._currentUrl),p=r||s.host,l=/^\w+:/.test(n)?this._currentUrl:Kn.format(Object.assign(s,{host:p})),c=Tw(n,l);if($u("redirecting to",c.href),this._isRedirect=!0,fr(c,this._options),(c.protocol!==s.protocol&&c.protocol!=="https:"||c.host!==p&&!Iw(c.host,p))&&ur(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Nt(a)){var u={headers:e.headers,statusCode:t},f={url:l,method:o,headers:i};a(this._options,u,f),this._sanitizeOptions(this._options)}this._performRequest()};function Gu(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach(function(i){var a=i+":",o=n[a]=e[i],r=t[i]=Object.create(o);function s(l,c,u){return Aw(l)?l=fr(l):Lt(l)?l=fr(yr(l)):(u=c,c=Xu(l),l={protocol:a}),Nt(c)&&(u=c,c=null),c=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},l,c),c.nativeProtocols=n,!Lt(c.host)&&!Lt(c.hostname)&&(c.hostname="::1"),xr.equal(c.protocol,a,"protocol mismatch"),$u("options",c),new Re(c,u)}function p(l,c,u){var f=r.request(l,c,u);return f.end(),f}Object.defineProperties(r,{request:{value:s,configurable:!0,enumerable:!0,writable:!0},get:{value:p,configurable:!0,enumerable:!0,writable:!0}})}),t}function zu(){}function yr(e){var t;if(vr)t=new Yn(e);else if(t=Xu(Kn.parse(e)),!Lt(t.protocol))throw new dr({input:e});return t}function Tw(e,t){return vr?new Yn(e,t):yr(Kn.resolve(t,e))}function Xu(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new dr({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new dr({input:e.href||e});return e}function fr(e,t){var n=t||{};for(var i of Ew)n[i]=e[i];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),n.port!==""&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function ur(e,t){var n;for(var i in t)e.test(i)&&(n=t[i],delete t[i]);return n===null||typeof n>"u"?void 0:String(n).trim()}function Qn(e,t,n){function i(a){Nt(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,a||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return i.prototype=new(n||Error),Object.defineProperties(i.prototype,{constructor:{value:i,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),i}function wr(e,t){for(var n of gr)e.removeListener(n,br[n]);e.on("error",zu),e.destroy(t)}function Iw(e,t){xr(Lt(e)&&Lt(t));var n=e.length-t.length-1;return n>0&&e[n]==="."&&e.endsWith(t)}function Lt(e){return typeof e=="string"||e instanceof String}function Nt(e){return typeof e=="function"}function Pw(e){return typeof e=="object"&&"length"in e}function Aw(e){return Yn&&e instanceof Yn}_r.exports=Gu({http:_w,https:Sw});_r.exports.wrap=Gu});function wn(e=""){return f_?Jr.default.resolve(Kr.default.sync(__dirname),"../../../",e):Jr.default.resolve(Kr.default.sync(__dirname),"../griddo-components",e)}function h_(){let e=Yr.default.sync("jsconfig.json",{cwd:wn()});return Yr.default.sync("tsconfig.json",{cwd:wn()})||e}function x_(){let e=require(h_());return e||K(fl),Object.keys(e.compilerOptions?.paths).reduce((t,n)=>{let[i]=n.split("/"),[a]=e.compilerOptions.paths[n],[o]=a.split("/*"),r=wn(o);return{...t,[i]:r}},{"@griddo-instance":`${wn()}/src/index.js`})}var Jr,Yr,Kr,f_,VC,Qd=Sn(()=>{"use strict";Jr=R(require("node:path")),Yr=R(Va()),Kr=R(wi());Ve();at();f_=__dirname.includes("node_modules"),VC=x_()});var tm={};_a(tm,{default:()=>__});var Ke,da,em,ua,v_,g_,b_,Zd,y_,w_,__,nm=Sn(()=>{"use strict";Ke=R(require("node:path")),da=R(wi());Qd();em=da.default.sync(Ke.default.resolve(__dirname,"../..")),ua=da.default.sync(__dirname),v_=Ke.default.resolve(da.default.sync(__dirname)),g_=Ke.default.resolve(ua,".cx-cache"),b_=wn(),Zd=Ke.default.join(em,"exports/sites"),{version:y_}=require(Ke.default.join(ua,"package.json")),w_={proDomain:"pro-",griddoVersion:y_,buildReportFileName:"build-report.json",paths:e=>({__cache:Ke.default.join(g_,e||""),__components:b_,__cx:ua,__exports:Ke.default.join(Zd,e||""),__root:em,__ssg:v_,__exports_dist:e?Ke.default.join(Zd,e,"dist"):"",__cx_dist:Ke.default.join(ua,"dist")})},__=w_});var $_={};_a($_,{startRender:()=>M_});module.exports=us($_);Xt();var ya=R(require("node:path"));var af=require("node:child_process"),ct=R(require("node:path")),of=R(En()),Ge=R(Rt());var cm=R(En());var Qe=R(require("node:fs")),Mt=R(require("node:path")),ma=R(Rt());Xt();var Ma,fp,hp,xp,vp=!0;typeof process<"u"&&({FORCE_COLOR:Ma,NODE_DISABLE_COLORS:fp,NO_COLOR:hp,TERM:xp}=process.env||{},vp=process.stdout&&process.stdout.isTTY);var cv={enabled:!fp&&hp==null&&xp!=="dumb"&&(Ma!=null&&Ma!=="0"||vp)};function G(e,t){let n=new RegExp(`\\x1b\\[${t}m`,"g"),i=`\x1B[${e}m`,a=`\x1B[${t}m`;return function(o){return!cv.enabled||o==null?o:i+(~(""+o).indexOf(a)?o.replace(n,a+i):o)+a}}var OS=G(0,0),CS=G(1,22),TS=G(2,22),IS=G(3,23),PS=G(4,24),AS=G(7,27),FS=G(8,28),kS=G(9,29),gp=G(30,39),jS=G(31,39),LS=G(32,39),NS=G(33,39),qS=G(34,39),US=G(35,39),BS=G(36,39),MS=G(37,39),$S=G(90,39),GS=G(90,39),zS=G(40,49),bp=G(41,49),XS=G(42,49),HS=G(43,49),WS=G(44,49),VS=G(45,49),JS=G(46,49),YS=G(47,49);var im=R(wi());Ve();Xt();function U(e){O.GRIDDO_VERBOSE_LOGS&&console.log(Y.yellow("verbose"),Y.dim(e.replace(/(\s)\s+/g,"$1").trim()))}function Qt(e,t="",n=1,i=1){let a=e.split(`
|
|
27
|
+
`).map(t=>t.trim()).join(" ")};Nu.O=function(e){return this.inspectOpts.colors=this.useColors,Zi.inspect(e,this.inspectOpts)}});var Uu=g((bD,lr)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?lr.exports=Pu():lr.exports=qu()});var Mu=g((yD,Bu)=>{var Jn;Bu.exports=function(){if(!Jn){try{Jn=Uu()("follow-redirects")}catch{}typeof Jn!="function"&&(Jn=function(){})}Jn.apply(null,arguments)}});var Hu=g((wD,_r)=>{var Kn=require("url"),Yn=Kn.URL,_w=require("http"),Sw=require("https"),hr=require("stream").Writable,xr=require("assert"),$u=Mu();(function(){var t=typeof process<"u",n=typeof window<"u"&&typeof document<"u",i=Nt(Error.captureStackTrace);!t&&(n||!i)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var vr=!1;try{xr(new Yn(""))}catch(e){vr=e.code==="ERR_INVALID_URL"}var Ew=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],gr=["abort","aborted","connect","error","socket","timeout"],br=Object.create(null);gr.forEach(function(e){br[e]=function(t,n,i){this._redirectable.emit(e,t,n,i)}});var dr=Qn("ERR_INVALID_URL","Invalid URL",TypeError),mr=Qn("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Dw=Qn("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",mr),Rw=Qn("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Ow=Qn("ERR_STREAM_WRITE_AFTER_END","write after end"),Cw=hr.prototype.destroy||zu;function Re(e,t){hr.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 n=this;this._onNativeResponse=function(i){try{n._processResponse(i)}catch(a){n.emit("error",a instanceof mr?a:new mr({cause:a}))}},this._performRequest()}Re.prototype=Object.create(hr.prototype);Re.prototype.abort=function(){wr(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Re.prototype.destroy=function(e){return wr(this._currentRequest,e),Cw.call(this,e),this};Re.prototype.write=function(e,t,n){if(this._ending)throw new Ow;if(!Lt(e)&&!Pw(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Nt(t)&&(n=t,t=null),e.length===0){n&&n();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new Rw),this.abort())};Re.prototype.end=function(e,t,n){if(Nt(e)?(n=e,e=t=null):Nt(t)&&(n=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,n);else{var i=this,a=this._currentRequest;this.write(e,t,function(){i._ended=!0,a.end(null,null,n)}),this._ending=!0}};Re.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};Re.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};Re.prototype.setTimeout=function(e,t){var n=this;function i(r){r.setTimeout(e),r.removeListener("timeout",r.destroy),r.addListener("timeout",r.destroy)}function a(r){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout(function(){n.emit("timeout"),o()},e),i(r)}function o(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",o),n.removeListener("error",o),n.removeListener("response",o),n.removeListener("close",o),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",a)}return t&&this.on("timeout",t),this.socket?a(this.socket):this._currentRequest.once("socket",a),this.on("socket",i),this.on("abort",o),this.on("error",o),this.on("response",o),this.on("close",o),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){Re.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(Re.prototype,e,{get:function(){return this._currentRequest[e]}})});Re.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))}};Re.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);i._redirectable=this;for(var a of gr)i.on(a,br[a]);if(this._currentUrl=/^\//.test(this._options.path)?Kn.format(this._options):this._options.path,this._isRedirect){var o=0,r=this,s=this._requestBodyBuffers;(function p(l){if(i===r._currentRequest)if(l)r.emit("error",l);else if(o<s.length){var c=s[o++];i.finished||i.write(c.data,c.encoding,p)}else r._ended&&i.end()})()}};Re.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n=e.headers.location;if(!n||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(wr(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Dw;var i,a=this._options.beforeRedirect;a&&(i=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=[],ur(/^content-/i,this._options.headers));var r=ur(/^host$/i,this._options.headers),s=yr(this._currentUrl),p=r||s.host,l=/^\w+:/.test(n)?this._currentUrl:Kn.format(Object.assign(s,{host:p})),c=Tw(n,l);if($u("redirecting to",c.href),this._isRedirect=!0,fr(c,this._options),(c.protocol!==s.protocol&&c.protocol!=="https:"||c.host!==p&&!Iw(c.host,p))&&ur(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Nt(a)){var u={headers:e.headers,statusCode:t},f={url:l,method:o,headers:i};a(this._options,u,f),this._sanitizeOptions(this._options)}this._performRequest()};function Gu(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach(function(i){var a=i+":",o=n[a]=e[i],r=t[i]=Object.create(o);function s(l,c,u){return Aw(l)?l=fr(l):Lt(l)?l=fr(yr(l)):(u=c,c=Xu(l),l={protocol:a}),Nt(c)&&(u=c,c=null),c=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},l,c),c.nativeProtocols=n,!Lt(c.host)&&!Lt(c.hostname)&&(c.hostname="::1"),xr.equal(c.protocol,a,"protocol mismatch"),$u("options",c),new Re(c,u)}function p(l,c,u){var f=r.request(l,c,u);return f.end(),f}Object.defineProperties(r,{request:{value:s,configurable:!0,enumerable:!0,writable:!0},get:{value:p,configurable:!0,enumerable:!0,writable:!0}})}),t}function zu(){}function yr(e){var t;if(vr)t=new Yn(e);else if(t=Xu(Kn.parse(e)),!Lt(t.protocol))throw new dr({input:e});return t}function Tw(e,t){return vr?new Yn(e,t):yr(Kn.resolve(t,e))}function Xu(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new dr({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new dr({input:e.href||e});return e}function fr(e,t){var n=t||{};for(var i of Ew)n[i]=e[i];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),n.port!==""&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function ur(e,t){var n;for(var i in t)e.test(i)&&(n=t[i],delete t[i]);return n===null||typeof n>"u"?void 0:String(n).trim()}function Qn(e,t,n){function i(a){Nt(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,a||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return i.prototype=new(n||Error),Object.defineProperties(i.prototype,{constructor:{value:i,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),i}function wr(e,t){for(var n of gr)e.removeListener(n,br[n]);e.on("error",zu),e.destroy(t)}function Iw(e,t){xr(Lt(e)&&Lt(t));var n=e.length-t.length-1;return n>0&&e[n]==="."&&e.endsWith(t)}function Lt(e){return typeof e=="string"||e instanceof String}function Nt(e){return typeof e=="function"}function Pw(e){return typeof e=="object"&&"length"in e}function Aw(e){return Yn&&e instanceof Yn}_r.exports=Gu({http:_w,https:Sw});_r.exports.wrap=Gu});function wn(e=""){return f_?Jr.default.resolve(Kr.default.sync(__dirname),"../../../",e):Jr.default.resolve(Kr.default.sync(__dirname),"../griddo-components",e)}function h_(){let e=Yr.default.sync("jsconfig.json",{cwd:wn()});return Yr.default.sync("tsconfig.json",{cwd:wn()})||e}function x_(){let e=require(h_());return e||K(fl),Object.keys(e.compilerOptions?.paths).reduce((t,n)=>{let[i]=n.split("/"),[a]=e.compilerOptions.paths[n],[o]=a.split("/*"),r=wn(o);return{...t,[i]:r}},{"@griddo-instance":`${wn()}/src/index.js`})}var Jr,Yr,Kr,f_,VC,Qd=Sn(()=>{"use strict";Jr=R(require("node:path")),Yr=R(Va()),Kr=R(wi());Je();at();f_=__dirname.includes("node_modules"),VC=x_()});var tm={};_a(tm,{default:()=>__});var Qe,da,em,ua,v_,g_,b_,Zd,y_,w_,__,nm=Sn(()=>{"use strict";Qe=R(require("node:path")),da=R(wi());Qd();em=da.default.sync(Qe.default.resolve(__dirname,"../..")),ua=da.default.sync(__dirname),v_=Qe.default.resolve(da.default.sync(__dirname)),g_=Qe.default.resolve(ua,".cx-cache"),b_=wn(),Zd=Qe.default.join(em,"exports/sites"),{version:y_}=require(Qe.default.join(ua,"package.json")),w_={proDomain:"pro-",griddoVersion:y_,buildReportFileName:"build-report.json",paths:e=>({__cache:Qe.default.join(g_,e||""),__components:b_,__cx:ua,__exports:Qe.default.join(Zd,e||""),__root:em,__ssg:v_,__exports_dist:e?Qe.default.join(Zd,e,"dist"):"",__cx_dist:Qe.default.join(ua,"dist")})},__=w_});var $_={};_a($_,{startRender:()=>M_});module.exports=us($_);Xt();var ya=R(require("node:path"));var af=require("node:child_process"),ct=R(require("node:path")),of=R(En()),Ge=R(Rt());var cm=R(En());var Ze=R(require("node:fs")),Mt=R(require("node:path")),ma=R(Rt());Xt();var Ma,fp,hp,xp,vp=!0;typeof process<"u"&&({FORCE_COLOR:Ma,NODE_DISABLE_COLORS:fp,NO_COLOR:hp,TERM:xp}=process.env||{},vp=process.stdout&&process.stdout.isTTY);var cv={enabled:!fp&&hp==null&&xp!=="dumb"&&(Ma!=null&&Ma!=="0"||vp)};function G(e,t){let n=new RegExp(`\\x1b\\[${t}m`,"g"),i=`\x1B[${e}m`,a=`\x1B[${t}m`;return function(o){return!cv.enabled||o==null?o:i+(~(""+o).indexOf(a)?o.replace(n,a+i):o)+a}}var OS=G(0,0),CS=G(1,22),TS=G(2,22),IS=G(3,23),PS=G(4,24),AS=G(7,27),FS=G(8,28),kS=G(9,29),gp=G(30,39),jS=G(31,39),LS=G(32,39),NS=G(33,39),qS=G(34,39),US=G(35,39),BS=G(36,39),MS=G(37,39),$S=G(90,39),GS=G(90,39),zS=G(40,49),bp=G(41,49),XS=G(42,49),HS=G(43,49),WS=G(44,49),VS=G(45,49),JS=G(46,49),YS=G(47,49);var im=R(wi());Je();Xt();function U(e){O.GRIDDO_VERBOSE_LOGS&&console.log(Y.yellow("verbose"),Y.dim(e.replace(/(\s)\s+/g,"$1").trim()))}function Qt(e,t="",n=1,i=1){let a=e.split(`
|
|
28
28
|
`).map(m=>m.trim()),o=t?` ${t} `:"",r=t?o.length:0,s=Math.max(...a.map(m=>m.length))+n*2,p=Math.max(s,r),l=`\u2502${" ".repeat(p)}\u2502
|
|
29
29
|
`.repeat(i),c=p,u=`\u256D${o}${"\u2500".repeat(c-r)}\u256E
|
|
30
30
|
`,f=`\u2570${"\u2500".repeat(c)}\u256F`,h=a.map(m=>{let x=" ".repeat(p-m.length-n);return`\u2502${" ".repeat(n)}${m}${x}\u2502
|
|
@@ -34,10 +34,10 @@ ${Y.bold("Griddo Exporter "+n)} ${Y.dim("~ node "+t)}
|
|
|
34
34
|
${e}
|
|
35
35
|
|
|
36
36
|
${i.join(`
|
|
37
|
-
`)||"---"}`)}var wt=R(require("node:path")),yn=R(Rt()),Xr=R(pl());var xt=R(require("node:fs")),Ee=R(require("node:path")),Po=R(Rt());Ve();at();var nn=V();async function Ao(){let{__cx:e}=nn.paths(),{sitesToPublish:t,createdPages:n,buildProcessData:i}=Po.default.readJSONSync(Ee.default.join(e,"render-metadata.json"));return{buildProcessData:i,createdPages:n,sitesToPublish:t}}function vl(){let{__cx:e}=nn.paths(),t=Ee.default.join(e,"store");xt.default.existsSync(t)||(xt.default.mkdirSync(t),xt.default.mkdirSync(Ee.default.join(t,"metadata"))),console.info("Store initialized")}function Fo(e){let{__cx:t}=nn.paths();xt.default.writeFileSync(Ee.default.join(t,"render-metadata.json"),JSON.stringify(e))}function ub(e){return xt.default.readdirSync(e).filter(n=>{let i=`${e}/${n}`;if(xt.default.statSync(i)?.isDirectory()||Ee.default.extname(n)!==".json")return!1;let o=Ee.default.basename(n,Ee.default.extname(n));return!Number.isNaN(Number.parseInt(o))}).map(n=>{let i=Ee.default.basename(n,Ee.default.extname(n));return Number.parseInt(i)})}function gl(e,t){let{__cx:n}=nn.paths();try{for(let i of t){jo(i,["editorID","parentEditorID"]);let a=`${i.context.page.id}.json`,o=Ee.default.join(n,"store",e,a);Po.default.writeJSONSync(o,i)}}catch(i){K(xl,i)}}function bl(e,t){let{__cx:n}=nn.paths();if(t.length!==0)for(let i of t){let a=Ee.default.join(n,"store",e,`${i}.json`);try{xt.default.unlinkSync(a)}catch(o){throw console.log(o),new Error(`Error removing file ${i}`)}}}async function yl(e){let{__cx:t}=nn.paths(),n=Ee.default.join(t,"store"),{changedPages:i,validPagesIds:a,siteDirName:o}=e,r=Ee.default.join(n,o),s=ub(r),p=a.filter(f=>!s.includes(f)),l=p.concat(i),c=s.filter(f=>!a.includes(f)),u=Array.from(new Set(l)).filter(f=>!c.includes(f));return{pagesInStore:s,pagesMissingInStore:p,pagesToDeleteFromStore:[...c],pagesToWriteToStore:u}}Ve();at();var Lo=class{headers;async login(){try{let t=await fetch(ee.LOGIN,{method:"POST",headers:{"Content-Type":"application/json",Connection:"close"},body:JSON.stringify({username:O.GRIDDO_BOT_USER,password:O.GRIDDO_BOT_PASSWORD})});if(!t.ok)throw new Error("Error while login in the API");let{token:n}=await t.json();return this.headers={Authorization:`bearer ${n}`,"Cache-Control":"no-store"},this.headers}catch(t){K(dl,t)}}},ot=new Lo;function Gn(e,t){return function(){return e.apply(t,arguments)}}var{toString:db}=Object.prototype,{getPrototypeOf:Uo}=Object,Gi=(e=>t=>{let n=db.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),qe=e=>(e=e.toLowerCase(),t=>Gi(t)===e),zi=e=>t=>typeof t===e,{isArray:an}=Array,zn=zi("undefined");function mb(e){return e!==null&&!zn(e)&&e.constructor!==null&&!zn(e.constructor)&&Ie(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Sl=qe("ArrayBuffer");function fb(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Sl(e.buffer),t}var hb=zi("string"),Ie=zi("function"),El=zi("number"),Xi=e=>e!==null&&typeof e=="object",xb=e=>e===!0||e===!1,$i=e=>{if(Gi(e)!=="object")return!1;let t=Uo(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},vb=qe("Date"),gb=qe("File"),bb=qe("Blob"),yb=qe("FileList"),wb=e=>Xi(e)&&Ie(e.pipe),_b=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ie(e.append)&&((t=Gi(e))==="formdata"||t==="object"&&Ie(e.toString)&&e.toString()==="[object FormData]"))},Sb=qe("URLSearchParams"),[Eb,Db,Rb,Ob]=["ReadableStream","Request","Response","Headers"].map(qe),Cb=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Xn(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,a;if(typeof e!="object"&&(e=[e]),an(e))for(i=0,a=e.length;i<a;i++)t.call(null,e[i],i,e);else{let o=n?Object.getOwnPropertyNames(e):Object.keys(e),r=o.length,s;for(i=0;i<r;i++)s=o[i],t.call(null,e[s],s,e)}}function Dl(e,t){t=t.toLowerCase();let n=Object.keys(e),i=n.length,a;for(;i-- >0;)if(a=n[i],t===a.toLowerCase())return a;return null}var At=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Rl=e=>!zn(e)&&e!==At;function qo(){let{caseless:e}=Rl(this)&&this||{},t={},n=(i,a)=>{let o=e&&Dl(t,a)||a;$i(t[o])&&$i(i)?t[o]=qo(t[o],i):$i(i)?t[o]=qo({},i):an(i)?t[o]=i.slice():t[o]=i};for(let i=0,a=arguments.length;i<a;i++)arguments[i]&&Xn(arguments[i],n);return t}var Tb=(e,t,n,{allOwnKeys:i}={})=>(Xn(t,(a,o)=>{n&&Ie(a)?e[o]=Gn(a,n):e[o]=a},{allOwnKeys:i}),e),Ib=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Pb=(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Ab=(e,t,n,i)=>{let a,o,r,s={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),o=a.length;o-- >0;)r=a[o],(!i||i(r,e,t))&&!s[r]&&(t[r]=e[r],s[r]=!0);e=n!==!1&&Uo(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Fb=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let i=e.indexOf(t,n);return i!==-1&&i===n},kb=e=>{if(!e)return null;if(an(e))return e;let t=e.length;if(!El(t))return null;let n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},jb=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Uo(Uint8Array)),Lb=(e,t)=>{let i=(e&&e[Symbol.iterator]).call(e),a;for(;(a=i.next())&&!a.done;){let o=a.value;t.call(e,o[0],o[1])}},Nb=(e,t)=>{let n,i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},qb=qe("HTMLFormElement"),Ub=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,a){return i.toUpperCase()+a}),wl=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Bb=qe("RegExp"),Ol=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),i={};Xn(n,(a,o)=>{let r;(r=t(a,o,e))!==!1&&(i[o]=r||a)}),Object.defineProperties(e,i)},Mb=e=>{Ol(e,(t,n)=>{if(Ie(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let i=e[n];if(Ie(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},$b=(e,t)=>{let n={},i=a=>{a.forEach(o=>{n[o]=!0})};return an(e)?i(e):i(String(e).split(t)),n},Gb=()=>{},zb=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,No="abcdefghijklmnopqrstuvwxyz",_l="0123456789",Cl={DIGIT:_l,ALPHA:No,ALPHA_DIGIT:No+No.toUpperCase()+_l},Xb=(e=16,t=Cl.ALPHA_DIGIT)=>{let n="",{length:i}=t;for(;e--;)n+=t[Math.random()*i|0];return n};function Hb(e){return!!(e&&Ie(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var Wb=e=>{let t=new Array(10),n=(i,a)=>{if(Xi(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[a]=i;let o=an(i)?[]:{};return Xn(i,(r,s)=>{let p=n(r,a+1);!zn(p)&&(o[s]=p)}),t[a]=void 0,o}}return i};return n(e,0)},Vb=qe("AsyncFunction"),Jb=e=>e&&(Xi(e)||Ie(e))&&Ie(e.then)&&Ie(e.catch),Tl=((e,t)=>e?setImmediate:t?((n,i)=>(At.addEventListener("message",({source:a,data:o})=>{a===At&&o===n&&i.length&&i.shift()()},!1),a=>{i.push(a),At.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ie(At.postMessage)),Yb=typeof queueMicrotask<"u"?queueMicrotask.bind(At):typeof process<"u"&&process.nextTick||Tl,d={isArray:an,isArrayBuffer:Sl,isBuffer:mb,isFormData:_b,isArrayBufferView:fb,isString:hb,isNumber:El,isBoolean:xb,isObject:Xi,isPlainObject:$i,isReadableStream:Eb,isRequest:Db,isResponse:Rb,isHeaders:Ob,isUndefined:zn,isDate:vb,isFile:gb,isBlob:bb,isRegExp:Bb,isFunction:Ie,isStream:wb,isURLSearchParams:Sb,isTypedArray:jb,isFileList:yb,forEach:Xn,merge:qo,extend:Tb,trim:Cb,stripBOM:Ib,inherits:Pb,toFlatObject:Ab,kindOf:Gi,kindOfTest:qe,endsWith:Fb,toArray:kb,forEachEntry:Lb,matchAll:Nb,isHTMLForm:qb,hasOwnProperty:wl,hasOwnProp:wl,reduceDescriptors:Ol,freezeMethods:Mb,toObjectSet:$b,toCamelCase:Ub,noop:Gb,toFiniteNumber:zb,findKey:Dl,global:At,isContextDefined:Rl,ALPHABET:Cl,generateString:Xb,isSpecCompliantForm:Hb,toJSONObject:Wb,isAsyncFn:Vb,isThenable:Jb,setImmediate:Tl,asap:Yb};function on(e,t,n,i,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),a&&(this.response=a,this.status=a.status?a.status:null)}d.inherits(on,Error,{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:d.toJSONObject(this.config),code:this.code,status:this.status}}});var Il=on.prototype,Pl={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Pl[e]={value:e}});Object.defineProperties(on,Pl);Object.defineProperty(Il,"isAxiosError",{value:!0});on.from=(e,t,n,i,a,o)=>{let r=Object.create(Il);return d.toFlatObject(e,r,function(p){return p!==Error.prototype},s=>s!=="isAxiosError"),on.call(r,e.message,t,n,i,a),r.cause=e,r.name=e.name,o&&Object.assign(r,o),r};var y=on;var mu=R(du(),1),Vi=mu.default;function Yo(e){return d.isPlainObject(e)||d.isArray(e)}function hu(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function fu(e,t,n){return e?e.concat(t).map(function(a,o){return a=hu(a),!n&&o?"["+a+"]":a}).join(n?".":""):t}function Fy(e){return d.isArray(e)&&!e.some(Yo)}var ky=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function jy(e,t,n){if(!d.isObject(e))throw new TypeError("target must be an object");t=t||new(Vi||FormData),n=d.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,v){return!d.isUndefined(v[x])});let i=n.metaTokens,a=n.visitor||c,o=n.dots,r=n.indexes,p=(n.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(t);if(!d.isFunction(a))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(d.isDate(m))return m.toISOString();if(!p&&d.isBlob(m))throw new y("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(m)||d.isTypedArray(m)?p&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,x,v){let b=m;if(m&&!v&&typeof m=="object"){if(d.endsWith(x,"{}"))x=i?x:x.slice(0,-2),m=JSON.stringify(m);else if(d.isArray(m)&&Fy(m)||(d.isFileList(m)||d.endsWith(x,"[]"))&&(b=d.toArray(m)))return x=hu(x),b.forEach(function(_,T){!(d.isUndefined(_)||_===null)&&t.append(r===!0?fu([x],T,o):r===null?x:x+"[]",l(_))}),!1}return Yo(m)?!0:(t.append(fu(v,x,o),l(m)),!1)}let u=[],f=Object.assign(ky,{defaultVisitor:c,convertValue:l,isVisitable:Yo});function h(m,x){if(!d.isUndefined(m)){if(u.indexOf(m)!==-1)throw Error("Circular reference detected in "+x.join("."));u.push(m),d.forEach(m,function(b,E){(!(d.isUndefined(b)||b===null)&&a.call(t,b,d.isString(E)?E.trim():E,x,f))===!0&&h(b,x?x.concat(E):[E])}),u.pop()}}if(!d.isObject(e))throw new TypeError("data must be an object");return h(e),t}var vt=jy;function xu(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function vu(e,t){this._pairs=[],e&&vt(e,this,t)}var gu=vu.prototype;gu.append=function(t,n){this._pairs.push([t,n])};gu.toString=function(t){let n=t?function(i){return t.call(this,i,xu)}:xu;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};var bu=vu;function Ly(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ft(e,t,n){if(!t)return e;let i=n&&n.encode||Ly,a=n&&n.serialize,o;if(a?o=a(t,n):o=d.isURLSearchParams(t)?t.toString():new bu(t,n).toString(i),o){let r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var Ko=class{constructor(){this.handlers=[]}use(t,n,i){return this.handlers.push({fulfilled:t,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){d.forEach(this.handlers,function(i){i!==null&&t(i)})}},Qo=Ko;var rn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var yu=R(require("url"),1),wu=yu.default.URLSearchParams;var _u={isNode:!0,classes:{URLSearchParams:wu,FormData:Vi,Blob:typeof Blob<"u"&&Blob||null},protocols:["http","https","file","data"]};var tr={};_a(tr,{hasBrowserEnv:()=>er,hasStandardBrowserEnv:()=>Ny,hasStandardBrowserWebWorkerEnv:()=>qy,navigator:()=>Zo,origin:()=>Uy});var er=typeof window<"u"&&typeof document<"u",Zo=typeof navigator=="object"&&navigator||void 0,Ny=er&&(!Zo||["ReactNative","NativeScript","NS"].indexOf(Zo.product)<0),qy=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Uy=er&&window.location.href||"http://localhost";var B={...tr,..._u};function nr(e,t){return vt(e,new B.classes.URLSearchParams,Object.assign({visitor:function(n,i,a,o){return B.isNode&&d.isBuffer(n)?(this.append(i,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function By(e){return d.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function My(e){let t={},n=Object.keys(e),i,a=n.length,o;for(i=0;i<a;i++)o=n[i],t[o]=e[o];return t}function $y(e){function t(n,i,a,o){let r=n[o++];if(r==="__proto__")return!0;let s=Number.isFinite(+r),p=o>=n.length;return r=!r&&d.isArray(a)?a.length:r,p?(d.hasOwnProp(a,r)?a[r]=[a[r],i]:a[r]=i,!s):((!a[r]||!d.isObject(a[r]))&&(a[r]=[]),t(n,i,a[r],o)&&d.isArray(a[r])&&(a[r]=My(a[r])),!s)}if(d.isFormData(e)&&d.isFunction(e.entries)){let n={};return d.forEachEntry(e,(i,a)=>{t(By(i),a,n,0)}),n}return null}var Ji=$y;function Gy(e,t,n){if(d.isString(e))try{return(t||JSON.parse)(e),d.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(e)}var ir={transitional:rn,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){let i=n.getContentType()||"",a=i.indexOf("application/json")>-1,o=d.isObject(t);if(o&&d.isHTMLForm(t)&&(t=new FormData(t)),d.isFormData(t))return a?JSON.stringify(Ji(t)):t;if(d.isArrayBuffer(t)||d.isBuffer(t)||d.isStream(t)||d.isFile(t)||d.isBlob(t)||d.isReadableStream(t))return t;if(d.isArrayBufferView(t))return t.buffer;if(d.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(i.indexOf("application/x-www-form-urlencoded")>-1)return nr(t,this.formSerializer).toString();if((s=d.isFileList(t))||i.indexOf("multipart/form-data")>-1){let p=this.env&&this.env.FormData;return vt(s?{"files[]":t}:t,p&&new p,this.formSerializer)}}return o||a?(n.setContentType("application/json",!1),Gy(t)):t}],transformResponse:[function(t){let n=this.transitional||ir.transitional,i=n&&n.forcedJSONParsing,a=this.responseType==="json";if(d.isResponse(t)||d.isReadableStream(t))return t;if(t&&d.isString(t)&&(i&&!this.responseType||a)){let r=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(s){if(r)throw s.name==="SyntaxError"?y.from(s,y.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:B.classes.FormData,Blob:B.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],e=>{ir.headers[e]={}});var sn=ir;var zy=d.toObjectSet(["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"]),Su=e=>{let t={},n,i,a;return e&&e.split(`
|
|
37
|
+
`)||"---"}`)}var wt=R(require("node:path")),yn=R(Rt()),Xr=R(pl());var xt=R(require("node:fs")),Ee=R(require("node:path")),Po=R(Rt());Je();at();var nn=V();async function Ao(){let{__cx:e}=nn.paths(),{sitesToPublish:t,createdPages:n,buildProcessData:i}=Po.default.readJSONSync(Ee.default.join(e,"render-metadata.json"));return{buildProcessData:i,createdPages:n,sitesToPublish:t}}function vl(){let{__cx:e}=nn.paths(),t=Ee.default.join(e,"store");xt.default.existsSync(t)||(xt.default.mkdirSync(t),xt.default.mkdirSync(Ee.default.join(t,"metadata"))),console.info("Store initialized")}function Fo(e){let{__cx:t}=nn.paths();xt.default.writeFileSync(Ee.default.join(t,"render-metadata.json"),JSON.stringify(e))}function ub(e){return xt.default.readdirSync(e).filter(n=>{let i=`${e}/${n}`;if(xt.default.statSync(i)?.isDirectory()||Ee.default.extname(n)!==".json")return!1;let o=Ee.default.basename(n,Ee.default.extname(n));return!Number.isNaN(Number.parseInt(o))}).map(n=>{let i=Ee.default.basename(n,Ee.default.extname(n));return Number.parseInt(i)})}function gl(e,t){let{__cx:n}=nn.paths();try{for(let i of t){jo(i,["editorID","parentEditorID"]);let a=`${i.context.page.id}.json`,o=Ee.default.join(n,"store",e,a);Po.default.writeJSONSync(o,i)}}catch(i){K(xl,i)}}function bl(e,t){let{__cx:n}=nn.paths();if(t.length!==0)for(let i of t){let a=Ee.default.join(n,"store",e,`${i}.json`);try{xt.default.unlinkSync(a)}catch(o){throw console.log(o),new Error(`Error removing file ${i}`)}}}async function yl(e){let{__cx:t}=nn.paths(),n=Ee.default.join(t,"store"),{changedPages:i,validPagesIds:a,siteDirName:o}=e,r=Ee.default.join(n,o),s=ub(r),p=a.filter(f=>!s.includes(f)),l=p.concat(i),c=s.filter(f=>!a.includes(f)),u=Array.from(new Set(l)).filter(f=>!c.includes(f));return{pagesInStore:s,pagesMissingInStore:p,pagesToDeleteFromStore:[...c],pagesToWriteToStore:u}}Je();at();var Lo=class{headers;async login(){try{let t=await fetch(ee.LOGIN,{method:"POST",headers:{"Content-Type":"application/json",Connection:"close"},body:JSON.stringify({username:O.GRIDDO_BOT_USER,password:O.GRIDDO_BOT_PASSWORD})});if(!t.ok)throw new Error("Error while login in the API");let{token:n}=await t.json();return this.headers={Authorization:`bearer ${n}`,"Cache-Control":"no-store"},this.headers}catch(t){K(dl,t)}}},ot=new Lo;function Gn(e,t){return function(){return e.apply(t,arguments)}}var{toString:db}=Object.prototype,{getPrototypeOf:Uo}=Object,Gi=(e=>t=>{let n=db.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),qe=e=>(e=e.toLowerCase(),t=>Gi(t)===e),zi=e=>t=>typeof t===e,{isArray:an}=Array,zn=zi("undefined");function mb(e){return e!==null&&!zn(e)&&e.constructor!==null&&!zn(e.constructor)&&Ie(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Sl=qe("ArrayBuffer");function fb(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Sl(e.buffer),t}var hb=zi("string"),Ie=zi("function"),El=zi("number"),Xi=e=>e!==null&&typeof e=="object",xb=e=>e===!0||e===!1,$i=e=>{if(Gi(e)!=="object")return!1;let t=Uo(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},vb=qe("Date"),gb=qe("File"),bb=qe("Blob"),yb=qe("FileList"),wb=e=>Xi(e)&&Ie(e.pipe),_b=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ie(e.append)&&((t=Gi(e))==="formdata"||t==="object"&&Ie(e.toString)&&e.toString()==="[object FormData]"))},Sb=qe("URLSearchParams"),[Eb,Db,Rb,Ob]=["ReadableStream","Request","Response","Headers"].map(qe),Cb=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Xn(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,a;if(typeof e!="object"&&(e=[e]),an(e))for(i=0,a=e.length;i<a;i++)t.call(null,e[i],i,e);else{let o=n?Object.getOwnPropertyNames(e):Object.keys(e),r=o.length,s;for(i=0;i<r;i++)s=o[i],t.call(null,e[s],s,e)}}function Dl(e,t){t=t.toLowerCase();let n=Object.keys(e),i=n.length,a;for(;i-- >0;)if(a=n[i],t===a.toLowerCase())return a;return null}var At=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Rl=e=>!zn(e)&&e!==At;function qo(){let{caseless:e}=Rl(this)&&this||{},t={},n=(i,a)=>{let o=e&&Dl(t,a)||a;$i(t[o])&&$i(i)?t[o]=qo(t[o],i):$i(i)?t[o]=qo({},i):an(i)?t[o]=i.slice():t[o]=i};for(let i=0,a=arguments.length;i<a;i++)arguments[i]&&Xn(arguments[i],n);return t}var Tb=(e,t,n,{allOwnKeys:i}={})=>(Xn(t,(a,o)=>{n&&Ie(a)?e[o]=Gn(a,n):e[o]=a},{allOwnKeys:i}),e),Ib=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Pb=(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Ab=(e,t,n,i)=>{let a,o,r,s={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),o=a.length;o-- >0;)r=a[o],(!i||i(r,e,t))&&!s[r]&&(t[r]=e[r],s[r]=!0);e=n!==!1&&Uo(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Fb=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let i=e.indexOf(t,n);return i!==-1&&i===n},kb=e=>{if(!e)return null;if(an(e))return e;let t=e.length;if(!El(t))return null;let n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},jb=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Uo(Uint8Array)),Lb=(e,t)=>{let i=(e&&e[Symbol.iterator]).call(e),a;for(;(a=i.next())&&!a.done;){let o=a.value;t.call(e,o[0],o[1])}},Nb=(e,t)=>{let n,i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},qb=qe("HTMLFormElement"),Ub=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,a){return i.toUpperCase()+a}),wl=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Bb=qe("RegExp"),Ol=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),i={};Xn(n,(a,o)=>{let r;(r=t(a,o,e))!==!1&&(i[o]=r||a)}),Object.defineProperties(e,i)},Mb=e=>{Ol(e,(t,n)=>{if(Ie(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let i=e[n];if(Ie(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},$b=(e,t)=>{let n={},i=a=>{a.forEach(o=>{n[o]=!0})};return an(e)?i(e):i(String(e).split(t)),n},Gb=()=>{},zb=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,No="abcdefghijklmnopqrstuvwxyz",_l="0123456789",Cl={DIGIT:_l,ALPHA:No,ALPHA_DIGIT:No+No.toUpperCase()+_l},Xb=(e=16,t=Cl.ALPHA_DIGIT)=>{let n="",{length:i}=t;for(;e--;)n+=t[Math.random()*i|0];return n};function Hb(e){return!!(e&&Ie(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var Wb=e=>{let t=new Array(10),n=(i,a)=>{if(Xi(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[a]=i;let o=an(i)?[]:{};return Xn(i,(r,s)=>{let p=n(r,a+1);!zn(p)&&(o[s]=p)}),t[a]=void 0,o}}return i};return n(e,0)},Vb=qe("AsyncFunction"),Jb=e=>e&&(Xi(e)||Ie(e))&&Ie(e.then)&&Ie(e.catch),Tl=((e,t)=>e?setImmediate:t?((n,i)=>(At.addEventListener("message",({source:a,data:o})=>{a===At&&o===n&&i.length&&i.shift()()},!1),a=>{i.push(a),At.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ie(At.postMessage)),Yb=typeof queueMicrotask<"u"?queueMicrotask.bind(At):typeof process<"u"&&process.nextTick||Tl,d={isArray:an,isArrayBuffer:Sl,isBuffer:mb,isFormData:_b,isArrayBufferView:fb,isString:hb,isNumber:El,isBoolean:xb,isObject:Xi,isPlainObject:$i,isReadableStream:Eb,isRequest:Db,isResponse:Rb,isHeaders:Ob,isUndefined:zn,isDate:vb,isFile:gb,isBlob:bb,isRegExp:Bb,isFunction:Ie,isStream:wb,isURLSearchParams:Sb,isTypedArray:jb,isFileList:yb,forEach:Xn,merge:qo,extend:Tb,trim:Cb,stripBOM:Ib,inherits:Pb,toFlatObject:Ab,kindOf:Gi,kindOfTest:qe,endsWith:Fb,toArray:kb,forEachEntry:Lb,matchAll:Nb,isHTMLForm:qb,hasOwnProperty:wl,hasOwnProp:wl,reduceDescriptors:Ol,freezeMethods:Mb,toObjectSet:$b,toCamelCase:Ub,noop:Gb,toFiniteNumber:zb,findKey:Dl,global:At,isContextDefined:Rl,ALPHABET:Cl,generateString:Xb,isSpecCompliantForm:Hb,toJSONObject:Wb,isAsyncFn:Vb,isThenable:Jb,setImmediate:Tl,asap:Yb};function on(e,t,n,i,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),a&&(this.response=a,this.status=a.status?a.status:null)}d.inherits(on,Error,{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:d.toJSONObject(this.config),code:this.code,status:this.status}}});var Il=on.prototype,Pl={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Pl[e]={value:e}});Object.defineProperties(on,Pl);Object.defineProperty(Il,"isAxiosError",{value:!0});on.from=(e,t,n,i,a,o)=>{let r=Object.create(Il);return d.toFlatObject(e,r,function(p){return p!==Error.prototype},s=>s!=="isAxiosError"),on.call(r,e.message,t,n,i,a),r.cause=e,r.name=e.name,o&&Object.assign(r,o),r};var y=on;var mu=R(du(),1),Vi=mu.default;function Yo(e){return d.isPlainObject(e)||d.isArray(e)}function hu(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function fu(e,t,n){return e?e.concat(t).map(function(a,o){return a=hu(a),!n&&o?"["+a+"]":a}).join(n?".":""):t}function Fy(e){return d.isArray(e)&&!e.some(Yo)}var ky=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function jy(e,t,n){if(!d.isObject(e))throw new TypeError("target must be an object");t=t||new(Vi||FormData),n=d.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,v){return!d.isUndefined(v[x])});let i=n.metaTokens,a=n.visitor||c,o=n.dots,r=n.indexes,p=(n.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(t);if(!d.isFunction(a))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(d.isDate(m))return m.toISOString();if(!p&&d.isBlob(m))throw new y("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(m)||d.isTypedArray(m)?p&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,x,v){let b=m;if(m&&!v&&typeof m=="object"){if(d.endsWith(x,"{}"))x=i?x:x.slice(0,-2),m=JSON.stringify(m);else if(d.isArray(m)&&Fy(m)||(d.isFileList(m)||d.endsWith(x,"[]"))&&(b=d.toArray(m)))return x=hu(x),b.forEach(function(_,T){!(d.isUndefined(_)||_===null)&&t.append(r===!0?fu([x],T,o):r===null?x:x+"[]",l(_))}),!1}return Yo(m)?!0:(t.append(fu(v,x,o),l(m)),!1)}let u=[],f=Object.assign(ky,{defaultVisitor:c,convertValue:l,isVisitable:Yo});function h(m,x){if(!d.isUndefined(m)){if(u.indexOf(m)!==-1)throw Error("Circular reference detected in "+x.join("."));u.push(m),d.forEach(m,function(b,E){(!(d.isUndefined(b)||b===null)&&a.call(t,b,d.isString(E)?E.trim():E,x,f))===!0&&h(b,x?x.concat(E):[E])}),u.pop()}}if(!d.isObject(e))throw new TypeError("data must be an object");return h(e),t}var vt=jy;function xu(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function vu(e,t){this._pairs=[],e&&vt(e,this,t)}var gu=vu.prototype;gu.append=function(t,n){this._pairs.push([t,n])};gu.toString=function(t){let n=t?function(i){return t.call(this,i,xu)}:xu;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};var bu=vu;function Ly(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ft(e,t,n){if(!t)return e;let i=n&&n.encode||Ly,a=n&&n.serialize,o;if(a?o=a(t,n):o=d.isURLSearchParams(t)?t.toString():new bu(t,n).toString(i),o){let r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var Ko=class{constructor(){this.handlers=[]}use(t,n,i){return this.handlers.push({fulfilled:t,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){d.forEach(this.handlers,function(i){i!==null&&t(i)})}},Qo=Ko;var rn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var yu=R(require("url"),1),wu=yu.default.URLSearchParams;var _u={isNode:!0,classes:{URLSearchParams:wu,FormData:Vi,Blob:typeof Blob<"u"&&Blob||null},protocols:["http","https","file","data"]};var tr={};_a(tr,{hasBrowserEnv:()=>er,hasStandardBrowserEnv:()=>Ny,hasStandardBrowserWebWorkerEnv:()=>qy,navigator:()=>Zo,origin:()=>Uy});var er=typeof window<"u"&&typeof document<"u",Zo=typeof navigator=="object"&&navigator||void 0,Ny=er&&(!Zo||["ReactNative","NativeScript","NS"].indexOf(Zo.product)<0),qy=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Uy=er&&window.location.href||"http://localhost";var B={...tr,..._u};function nr(e,t){return vt(e,new B.classes.URLSearchParams,Object.assign({visitor:function(n,i,a,o){return B.isNode&&d.isBuffer(n)?(this.append(i,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function By(e){return d.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function My(e){let t={},n=Object.keys(e),i,a=n.length,o;for(i=0;i<a;i++)o=n[i],t[o]=e[o];return t}function $y(e){function t(n,i,a,o){let r=n[o++];if(r==="__proto__")return!0;let s=Number.isFinite(+r),p=o>=n.length;return r=!r&&d.isArray(a)?a.length:r,p?(d.hasOwnProp(a,r)?a[r]=[a[r],i]:a[r]=i,!s):((!a[r]||!d.isObject(a[r]))&&(a[r]=[]),t(n,i,a[r],o)&&d.isArray(a[r])&&(a[r]=My(a[r])),!s)}if(d.isFormData(e)&&d.isFunction(e.entries)){let n={};return d.forEachEntry(e,(i,a)=>{t(By(i),a,n,0)}),n}return null}var Ji=$y;function Gy(e,t,n){if(d.isString(e))try{return(t||JSON.parse)(e),d.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(e)}var ir={transitional:rn,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){let i=n.getContentType()||"",a=i.indexOf("application/json")>-1,o=d.isObject(t);if(o&&d.isHTMLForm(t)&&(t=new FormData(t)),d.isFormData(t))return a?JSON.stringify(Ji(t)):t;if(d.isArrayBuffer(t)||d.isBuffer(t)||d.isStream(t)||d.isFile(t)||d.isBlob(t)||d.isReadableStream(t))return t;if(d.isArrayBufferView(t))return t.buffer;if(d.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(i.indexOf("application/x-www-form-urlencoded")>-1)return nr(t,this.formSerializer).toString();if((s=d.isFileList(t))||i.indexOf("multipart/form-data")>-1){let p=this.env&&this.env.FormData;return vt(s?{"files[]":t}:t,p&&new p,this.formSerializer)}}return o||a?(n.setContentType("application/json",!1),Gy(t)):t}],transformResponse:[function(t){let n=this.transitional||ir.transitional,i=n&&n.forcedJSONParsing,a=this.responseType==="json";if(d.isResponse(t)||d.isReadableStream(t))return t;if(t&&d.isString(t)&&(i&&!this.responseType||a)){let r=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(s){if(r)throw s.name==="SyntaxError"?y.from(s,y.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:B.classes.FormData,Blob:B.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],e=>{ir.headers[e]={}});var sn=ir;var zy=d.toObjectSet(["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"]),Su=e=>{let t={},n,i,a;return e&&e.split(`
|
|
38
38
|
`).forEach(function(r){a=r.indexOf(":"),n=r.substring(0,a).trim().toLowerCase(),i=r.substring(a+1).trim(),!(!n||t[n]&&zy[n])&&(n==="set-cookie"?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t};var Eu=Symbol("internals");function Hn(e){return e&&String(e).trim().toLowerCase()}function Yi(e){return e===!1||e==null?e:d.isArray(e)?e.map(Yi):String(e)}function Xy(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}var Hy=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ar(e,t,n,i,a){if(d.isFunction(i))return i.call(this,t,n);if(a&&(t=n),!!d.isString(t)){if(d.isString(i))return t.indexOf(i)!==-1;if(d.isRegExp(i))return i.test(t)}}function Wy(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,i)=>n.toUpperCase()+i)}function Vy(e,t){let n=d.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{value:function(a,o,r){return this[i].call(this,t,a,o,r)},configurable:!0})})}var cn=class{constructor(t){t&&this.set(t)}set(t,n,i){let a=this;function o(s,p,l){let c=Hn(p);if(!c)throw new Error("header name must be a non-empty string");let u=d.findKey(a,c);(!u||a[u]===void 0||l===!0||l===void 0&&a[u]!==!1)&&(a[u||p]=Yi(s))}let r=(s,p)=>d.forEach(s,(l,c)=>o(l,c,p));if(d.isPlainObject(t)||t instanceof this.constructor)r(t,n);else if(d.isString(t)&&(t=t.trim())&&!Hy(t))r(Su(t),n);else if(d.isHeaders(t))for(let[s,p]of t.entries())o(p,s,i);else t!=null&&o(n,t,i);return this}get(t,n){if(t=Hn(t),t){let i=d.findKey(this,t);if(i){let a=this[i];if(!n)return a;if(n===!0)return Xy(a);if(d.isFunction(n))return n.call(this,a,i);if(d.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Hn(t),t){let i=d.findKey(this,t);return!!(i&&this[i]!==void 0&&(!n||ar(this,this[i],i,n)))}return!1}delete(t,n){let i=this,a=!1;function o(r){if(r=Hn(r),r){let s=d.findKey(i,r);s&&(!n||ar(i,i[s],s,n))&&(delete i[s],a=!0)}}return d.isArray(t)?t.forEach(o):o(t),a}clear(t){let n=Object.keys(this),i=n.length,a=!1;for(;i--;){let o=n[i];(!t||ar(this,this[o],o,t,!0))&&(delete this[o],a=!0)}return a}normalize(t){let n=this,i={};return d.forEach(this,(a,o)=>{let r=d.findKey(i,o);if(r){n[r]=Yi(a),delete n[o];return}let s=t?Wy(o):String(o).trim();s!==o&&delete n[o],n[s]=Yi(a),i[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let n=Object.create(null);return d.forEach(this,(i,a)=>{i!=null&&i!==!1&&(n[a]=t&&d.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
39
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){let i=new this(t);return n.forEach(a=>i.set(a)),i}static accessor(t){let i=(this[Eu]=this[Eu]={accessors:{}}).accessors,a=this.prototype;function o(r){let s=Hn(r);i[s]||(Vy(a,r),i[s]=!0)}return d.isArray(t)?t.forEach(o):o(t),this}};cn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(cn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}});d.freezeMethods(cn);var W=cn;function Wn(e,t){let n=this||sn,i=t||n,a=W.from(i.headers),o=i.data;return d.forEach(e,function(s){o=s.call(n,o,a.normalize(),t?t.status:void 0)}),a.normalize(),o}function Vn(e){return!!(e&&e.__CANCEL__)}function Du(e,t,n){y.call(this,e??"canceled",y.ERR_CANCELED,t,n),this.name="CanceledError"}d.inherits(Du,y,{__CANCEL__:!0});var Pe=Du;function
|
|
40
|
-
`,Lw=ei.encode(bt),Nw=2,Or=class{constructor(t,n){let{escapeName:i}=this.constructor,a=d.isString(n),o=`Content-Disposition: form-data; name="${i(t)}"${!a&&n.name?`; filename="${i(n.name)}"`:""}${bt}`;a?n=ei.encode(String(n).replace(/\r?\n|\r\n?/g,bt)):o+=`Content-Type: ${n.type||"application/octet-stream"}${bt}`,this.headers=ei.encode(o+bt),this.contentLength=a?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+Nw,this.name=t,this.value=n}async*encode(){yield this.headers;let{value:t}=this;d.isTypedArray(t)?yield t:yield*ta(t),yield Lw}static escapeName(t){return String(t).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},qw=(e,t,n)=>{let{tag:i="form-data-boundary",size:a=25,boundary:o=i+"-"+d.generateString(a,jw)}=n||{};if(!d.isFormData(e))throw TypeError("FormData instance required");if(o.length<1||o.length>70)throw Error("boundary must be 10-70 characters long");let r=ei.encode("--"+o+bt),s=ei.encode("--"+o+"--"+bt+bt),p=s.byteLength,l=Array.from(e.entries()).map(([u,f])=>{let h=new Or(u,f);return p+=h.size,h});p+=r.byteLength*l.length,p=d.toFiniteNumber(p);let c={"Content-Type":`multipart/form-data; boundary=${o}`};return Number.isFinite(p)&&(c["Content-Length"]=p),t&&t(c),Yu.Readable.from(async function*(){for(let u of l)yield r,yield*u.encode();yield s}())},Ku=qw;var Qu=R(require("stream"),1),Cr=class extends Qu.default.Transform{__transform(t,n,i){this.push(t),i()}_transform(t,n,i){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let a=Buffer.alloc(2);a[0]=120,a[1]=156,this.push(a,n)}this.__transform(t,n,i)}},Zu=Cr;var Uw=(e,t)=>d.isAsyncFn(e)?function(...n){let i=n.pop();e.apply(this,n).then(a=>{try{t?i(null,...t(a)):i(null,a)}catch(o){i(o)}},i)}:e,ed=Uw;function Bw(e,t){e=e||10;let n=new Array(e),i=new Array(e),a=0,o=0,r;return t=t!==void 0?t:1e3,function(p){let l=Date.now(),c=i[o];r||(r=l),n[a]=p,i[a]=l;let u=o,f=0;for(;u!==a;)f+=n[u++],u=u%e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),l-r<t)return;let h=c&&l-c;return h?Math.round(f*1e3/h):void 0}}var td=Bw;function Mw(e,t){let n=0,i=1e3/t,a,o,r=(l,c=Date.now())=>{n=c,a=null,o&&(clearTimeout(o),o=null),e.apply(null,l)};return[(...l)=>{let c=Date.now(),u=c-n;u>=i?r(l,c):(a=l,o||(o=setTimeout(()=>{o=null,r(a)},i-u)))},()=>a&&r(a)]}var nd=Mw;var rt=(e,t,n=3)=>{let i=0,a=td(50,250);return nd(o=>{let r=o.loaded,s=o.lengthComputable?o.total:void 0,p=r-i,l=a(p),c=r<=s;i=r;let u={loaded:r,total:s,progress:s?r/s:void 0,bytes:p,rate:l||void 0,estimated:l&&s&&c?(s-r)/l:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(u)},n)},mn=(e,t)=>{let n=e!=null;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},fn=e=>(...t)=>d.asap(()=>e(...t));var id={flush:st.default.constants.Z_SYNC_FLUSH,finishFlush:st.default.constants.Z_SYNC_FLUSH},$w={flush:st.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:st.default.constants.BROTLI_OPERATION_FLUSH},ad=d.isFunction(st.default.createBrotliDecompress),{http:Gw,https:zw}=dd.default,Xw=/https:?/,od=B.protocols.map(e=>e+":"),rd=(e,[t,n])=>(e.on("end",n).on("error",n),t);function Hw(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function fd(e,t,n){let i=t;if(!i&&i!==!1){let a=(0,cd.getProxyForUrl)(n);a&&(i=new URL(a))}if(i){if(i.username&&(i.auth=(i.username||"")+":"+(i.password||"")),i.auth){(i.auth.username||i.auth.password)&&(i.auth=(i.auth.username||"")+":"+(i.auth.password||""));let o=Buffer.from(i.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+o}e.headers.host=e.hostname+(e.port?":"+e.port:"");let a=i.hostname||i.host;e.hostname=a,e.host=a,e.port=i.port,e.path=n,i.protocol&&(e.protocol=i.protocol.includes(":")?i.protocol:`${i.protocol}:`)}e.beforeRedirects.proxy=function(o){fd(o,t,o.href)}}var Ww=typeof process<"u"&&d.kindOf(process)==="process",Vw=e=>new Promise((t,n)=>{let i,a,o=(p,l)=>{a||(a=!0,i&&i(p,l))},r=p=>{o(p),t(p)},s=p=>{o(p,!0),n(p)};e(r,s,p=>i=p).catch(s)}),Jw=({address:e,family:t})=>{if(!d.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},sd=(e,t)=>Jw(d.isObject(e)?e:{address:e,family:t}),hd=Ww&&function(t){return Vw(async function(i,a,o){let{data:r,lookup:s,family:p}=t,{responseType:l,responseEncoding:c}=t,u=t.method.toUpperCase(),f,h=!1,m;if(s){let w=ed(s,S=>d.isArray(S)?S:[S]);s=(S,C,ze)=>{w(S,C,(ie,Xe,Gt)=>{if(ie)return ze(ie);let Te=d.isArray(Xe)?Xe.map(we=>sd(we)):[sd(Xe,Gt)];C.all?ze(ie,Te):ze(ie,Te[0].address,Te[0].family)})}}let x=new md.EventEmitter,v=()=>{t.cancelToken&&t.cancelToken.unsubscribe(b),t.signal&&t.signal.removeEventListener("abort",b),x.removeAllListeners()};o((w,S)=>{f=!0,S&&(h=!0,v())});function b(w){x.emit("abort",!w||w.type?new Pe(null,t,m):w)}x.once("abort",a),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(b),t.signal&&(t.signal.aborted?b():t.signal.addEventListener("abort",b)));let E=kt(t.baseURL,t.url),_=new URL(E,B.hasBrowserEnv?B.origin:void 0),T=_.protocol||od[0];if(T==="data:"){let w;if(u!=="GET")return Ye(i,a,{status:405,statusText:"method not allowed",headers:{},config:t});try{w=Sr(t.url,l==="blob",{Blob:t.env&&t.env.Blob})}catch(S){throw y.from(S,y.ERR_BAD_REQUEST,t)}return l==="text"?(w=w.toString(c),(!c||c==="utf8")&&(w=d.stripBOM(w))):l==="stream"&&(w=Ut.default.Readable.from(w)),Ye(i,a,{data:w,status:200,statusText:"OK",headers:new W,config:t})}if(od.indexOf(T)===-1)return a(new y("Unsupported protocol "+T,y.ERR_BAD_REQUEST,t));let P=W.from(t.headers).normalize();P.set("User-Agent","axios/"+qt,!1);let{onUploadProgress:z,onDownloadProgress:ne}=t,Q=t.maxRate,D,A;if(d.isSpecCompliantForm(r)){let w=P.getContentType(/boundary=([-_\w\d]{10,70})/i);r=Ku(r,S=>{P.set(S)},{tag:`axios-${qt}-boundary`,boundary:w&&w[1]||void 0})}else if(d.isFormData(r)&&d.isFunction(r.getHeaders)){if(P.set(r.getHeaders()),!P.hasContentLength())try{let w=await ud.default.promisify(r.getLength).call(r);Number.isFinite(w)&&w>=0&&P.setContentLength(w)}catch{}}else if(d.isBlob(r))r.size&&P.setContentType(r.type||"application/octet-stream"),P.setContentLength(r.size||0),r=Ut.default.Readable.from(ta(r));else if(r&&!d.isStream(r)){if(!Buffer.isBuffer(r))if(d.isArrayBuffer(r))r=Buffer.from(new Uint8Array(r));else if(d.isString(r))r=Buffer.from(r,"utf-8");else return a(new y("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",y.ERR_BAD_REQUEST,t));if(P.setContentLength(r.length,!1),t.maxBodyLength>-1&&r.length>t.maxBodyLength)return a(new y("Request body larger than maxBodyLength limit",y.ERR_BAD_REQUEST,t))}let F=d.toFiniteNumber(P.getContentLength());d.isArray(Q)?(D=Q[0],A=Q[1]):D=A=Q,r&&(z||D)&&(d.isStream(r)||(r=Ut.default.Readable.from(r,{objectMode:!1})),r=Ut.default.pipeline([r,new Rr({maxRate:d.toFiniteNumber(D)})],d.noop),z&&r.on("progress",rd(r,mn(F,rt(fn(z),!1,3)))));let M;if(t.auth){let w=t.auth.username||"",S=t.auth.password||"";M=w+":"+S}if(!M&&_.username){let w=_.username,S=_.password;M=w+":"+S}M&&P.delete("authorization");let X;try{X=Ft(_.pathname+_.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(w){let S=new Error(w.message);return S.config=t,S.url=t.url,S.exists=!0,a(S)}P.set("Accept-Encoding","gzip, compress, deflate"+(ad?", br":""),!1);let k={path:X,method:u,headers:P.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:M,protocol:T,family:p,beforeRedirect:Hw,beforeRedirects:{}};!d.isUndefined(s)&&(k.lookup=s),t.socketPath?k.socketPath=t.socketPath:(k.hostname=_.hostname.startsWith("[")?_.hostname.slice(1,-1):_.hostname,k.port=_.port,fd(k,t.proxy,T+"//"+_.hostname+(_.port?":"+_.port:"")+k.path));let L,N=Xw.test(k.protocol);if(k.agent=N?t.httpsAgent:t.httpAgent,t.transport?L=t.transport:t.maxRedirects===0?L=N?ld.default:pd.default:(t.maxRedirects&&(k.maxRedirects=t.maxRedirects),t.beforeRedirect&&(k.beforeRedirects.config=t.beforeRedirect),L=N?zw:Gw),t.maxBodyLength>-1?k.maxBodyLength=t.maxBodyLength:k.maxBodyLength=1/0,t.insecureHTTPParser&&(k.insecureHTTPParser=t.insecureHTTPParser),m=L.request(k,function(S){if(m.destroyed)return;let C=[S],ze=+S.headers["content-length"];if(ne||A){let we=new Rr({maxRate:d.toFiniteNumber(A)});ne&&we.on("progress",rd(we,mn(ze,rt(fn(ne),!0,3)))),C.push(we)}let ie=S,Xe=S.req||m;if(t.decompress!==!1&&S.headers["content-encoding"])switch((u==="HEAD"||S.statusCode===204)&&delete S.headers["content-encoding"],(S.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":C.push(st.default.createUnzip(id)),delete S.headers["content-encoding"];break;case"deflate":C.push(new Zu),C.push(st.default.createUnzip(id)),delete S.headers["content-encoding"];break;case"br":ad&&(C.push(st.default.createBrotliDecompress($w)),delete S.headers["content-encoding"])}ie=C.length>1?Ut.default.pipeline(C,d.noop):C[0];let Gt=Ut.default.finished(ie,()=>{Gt(),v()}),Te={status:S.statusCode,statusText:S.statusMessage,headers:new W(S.headers),config:t,request:Xe};if(l==="stream")Te.data=ie,Ye(i,a,Te);else{let we=[],ii=0;ie.on("data",function(re){we.push(re),ii+=re.length,t.maxContentLength>-1&&ii>t.maxContentLength&&(h=!0,ie.destroy(),a(new y("maxContentLength size of "+t.maxContentLength+" exceeded",y.ERR_BAD_RESPONSE,t,Xe)))}),ie.on("aborted",function(){if(h)return;let re=new y("maxContentLength size of "+t.maxContentLength+" exceeded",y.ERR_BAD_RESPONSE,t,Xe);ie.destroy(re),a(re)}),ie.on("error",function(re){m.destroyed||a(y.from(re,null,t,Xe))}),ie.on("end",function(){try{let re=we.length===1?we[0]:Buffer.concat(we);l!=="arraybuffer"&&(re=re.toString(c),(!c||c==="utf8")&&(re=d.stripBOM(re))),Te.data=re}catch(re){return a(y.from(re,null,t,Te.request,Te))}Ye(i,a,Te)})}x.once("abort",we=>{ie.destroyed||(ie.emit("error",we),ie.destroy())})}),x.once("abort",w=>{a(w),m.destroy(w)}),m.on("error",function(S){a(y.from(S,null,t,m))}),m.on("socket",function(S){S.setKeepAlive(!0,1e3*60)}),t.timeout){let w=parseInt(t.timeout,10);if(Number.isNaN(w)){a(new y("error trying to parse `config.timeout` to int",y.ERR_BAD_OPTION_VALUE,t,m));return}m.setTimeout(w,function(){if(f)return;let C=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",ze=t.transitional||rn;t.timeoutErrorMessage&&(C=t.timeoutErrorMessage),a(new y(C,ze.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,t,m)),b()})}if(d.isStream(r)){let w=!1,S=!1;r.on("end",()=>{w=!0}),r.once("error",C=>{S=!0,m.destroy(C)}),r.on("close",()=>{!w&&!S&&b(new Pe("Request stream has been aborted",t,m))}),r.pipe(m)}else m.end(r)})};var xd=B.hasStandardBrowserEnv?function(){let t=B.navigator&&/(msie|trident)/i.test(B.navigator.userAgent),n=document.createElement("a"),i;function a(o){let r=o;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return i=a(window.location.href),function(r){let s=d.isString(r)?a(r):r;return s.protocol===i.protocol&&s.host===i.host}}():function(){return function(){return!0}}();var vd=B.hasStandardBrowserEnv?{write(e,t,n,i,a,o){let r=[e+"="+encodeURIComponent(t)];d.isNumber(n)&&r.push("expires="+new Date(n).toGMTString()),d.isString(i)&&r.push("path="+i),d.isString(a)&&r.push("domain="+a),o===!0&&r.push("secure"),document.cookie=r.join("; ")},read(e){let t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};var gd=e=>e instanceof W?{...e}:e;function Be(e,t){t=t||{};let n={};function i(l,c,u){return d.isPlainObject(l)&&d.isPlainObject(c)?d.merge.call({caseless:u},l,c):d.isPlainObject(c)?d.merge({},c):d.isArray(c)?c.slice():c}function a(l,c,u){if(d.isUndefined(c)){if(!d.isUndefined(l))return i(void 0,l,u)}else return i(l,c,u)}function o(l,c){if(!d.isUndefined(c))return i(void 0,c)}function r(l,c){if(d.isUndefined(c)){if(!d.isUndefined(l))return i(void 0,l)}else return i(void 0,c)}function s(l,c,u){if(u in t)return i(l,c);if(u in e)return i(void 0,l)}let p={url:o,method:o,data:o,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:s,headers:(l,c)=>a(gd(l),gd(c),!0)};return d.forEach(Object.keys(Object.assign({},e,t)),function(c){let u=p[c]||a,f=u(e[c],t[c],c);d.isUndefined(f)&&u!==s||(n[c]=f)}),n}var na=e=>{let t=Be({},e),{data:n,withXSRFToken:i,xsrfHeaderName:a,xsrfCookieName:o,headers:r,auth:s}=t;t.headers=r=W.from(r),t.url=Ft(kt(t.baseURL,t.url),e.params,e.paramsSerializer),s&&r.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let p;if(d.isFormData(n)){if(B.hasStandardBrowserEnv||B.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if((p=r.getContentType())!==!1){let[l,...c]=p?p.split(";").map(u=>u.trim()).filter(Boolean):[];r.setContentType([l||"multipart/form-data",...c].join("; "))}}if(B.hasStandardBrowserEnv&&(i&&d.isFunction(i)&&(i=i(t)),i||i!==!1&&xd(t.url))){let l=a&&o&&vd.read(o);l&&r.set(a,l)}return t};var Yw=typeof XMLHttpRequest<"u",bd=Yw&&function(e){return new Promise(function(n,i){let a=na(e),o=a.data,r=W.from(a.headers).normalize(),{responseType:s,onUploadProgress:p,onDownloadProgress:l}=a,c,u,f,h,m;function x(){h&&h(),m&&m(),a.cancelToken&&a.cancelToken.unsubscribe(c),a.signal&&a.signal.removeEventListener("abort",c)}let v=new XMLHttpRequest;v.open(a.method.toUpperCase(),a.url,!0),v.timeout=a.timeout;function b(){if(!v)return;let _=W.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),P={data:!s||s==="text"||s==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:_,config:e,request:v};Ye(function(ne){n(ne),x()},function(ne){i(ne),x()},P),v=null}"onloadend"in v?v.onloadend=b:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(b)},v.onabort=function(){v&&(i(new y("Request aborted",y.ECONNABORTED,e,v)),v=null)},v.onerror=function(){i(new y("Network Error",y.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let T=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded",P=a.transitional||rn;a.timeoutErrorMessage&&(T=a.timeoutErrorMessage),i(new y(T,P.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,v)),v=null},o===void 0&&r.setContentType(null),"setRequestHeader"in v&&d.forEach(r.toJSON(),function(T,P){v.setRequestHeader(P,T)}),d.isUndefined(a.withCredentials)||(v.withCredentials=!!a.withCredentials),s&&s!=="json"&&(v.responseType=a.responseType),l&&([f,m]=rt(l,!0),v.addEventListener("progress",f)),p&&v.upload&&([u,h]=rt(p),v.upload.addEventListener("progress",u),v.upload.addEventListener("loadend",h)),(a.cancelToken||a.signal)&&(c=_=>{v&&(i(!_||_.type?new Pe(null,e,v):_),v.abort(),v=null)},a.cancelToken&&a.cancelToken.subscribe(c),a.signal&&(a.signal.aborted?c():a.signal.addEventListener("abort",c)));let E=Zn(a.url);if(E&&B.protocols.indexOf(E)===-1){i(new y("Unsupported protocol "+E+":",y.ERR_BAD_REQUEST,e));return}v.send(o||null)})};var Kw=(e,t)=>{let{length:n}=e=e?e.filter(Boolean):[];if(t||n){let i=new AbortController,a,o=function(l){if(!a){a=!0,s();let c=l instanceof Error?l:this.reason;i.abort(c instanceof y?c:new Pe(c instanceof Error?c.message:c))}},r=t&&setTimeout(()=>{r=null,o(new y(`timeout ${t} of ms exceeded`,y.ETIMEDOUT))},t),s=()=>{e&&(r&&clearTimeout(r),r=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));let{signal:p}=i;return p.unsubscribe=()=>d.asap(s),p}},yd=Kw;var Qw=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let i=0,a;for(;i<n;)a=i+t,yield e.slice(i,a),i=a},Zw=async function*(e,t){for await(let n of e_(e))yield*Qw(n,t)},e_=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:n,value:i}=await t.read();if(n)break;yield i}}finally{await t.cancel()}},Tr=(e,t,n,i)=>{let a=Zw(e,t),o=0,r,s=p=>{r||(r=!0,i&&i(p))};return new ReadableStream({async pull(p){try{let{done:l,value:c}=await a.next();if(l){s(),p.close();return}let u=c.byteLength;if(n){let f=o+=u;n(f)}p.enqueue(new Uint8Array(c))}catch(l){throw s(l),l}},cancel(p){return s(p),a.return()}},{highWaterMark:2})};var aa=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",_d=aa&&typeof ReadableStream=="function",t_=aa&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Sd=(e,...t)=>{try{return!!e(...t)}catch{return!1}},n_=_d&&Sd(()=>{let e=!1,t=new Request(B.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),wd=64*1024,Ir=_d&&Sd(()=>d.isReadableStream(new Response("").body)),ia={stream:Ir&&(e=>e.body)};aa&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ia[t]&&(ia[t]=d.isFunction(e[t])?n=>n[t]():(n,i)=>{throw new y(`Response type '${t}' is not supported`,y.ERR_NOT_SUPPORT,i)})})})(new Response);var i_=async e=>{if(e==null)return 0;if(d.isBlob(e))return e.size;if(d.isSpecCompliantForm(e))return(await new Request(B.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(d.isArrayBufferView(e)||d.isArrayBuffer(e))return e.byteLength;if(d.isURLSearchParams(e)&&(e=e+""),d.isString(e))return(await t_(e)).byteLength},a_=async(e,t)=>{let n=d.toFiniteNumber(e.getContentLength());return n??i_(t)},Ed=aa&&(async e=>{let{url:t,method:n,data:i,signal:a,cancelToken:o,timeout:r,onDownloadProgress:s,onUploadProgress:p,responseType:l,headers:c,withCredentials:u="same-origin",fetchOptions:f}=na(e);l=l?(l+"").toLowerCase():"text";let h=yd([a,o&&o.toAbortSignal()],r),m,x=h&&h.unsubscribe&&(()=>{h.unsubscribe()}),v;try{if(p&&n_&&n!=="get"&&n!=="head"&&(v=await a_(c,i))!==0){let P=new Request(t,{method:"POST",body:i,duplex:"half"}),z;if(d.isFormData(i)&&(z=P.headers.get("content-type"))&&c.setContentType(z),P.body){let[ne,Q]=mn(v,rt(fn(p)));i=Tr(P.body,wd,ne,Q)}}d.isString(u)||(u=u?"include":"omit");let b="credentials"in Request.prototype;m=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:i,duplex:"half",credentials:b?u:void 0});let E=await fetch(m),_=Ir&&(l==="stream"||l==="response");if(Ir&&(s||_&&x)){let P={};["status","statusText","headers"].forEach(D=>{P[D]=E[D]});let z=d.toFiniteNumber(E.headers.get("content-length")),[ne,Q]=s&&mn(z,rt(fn(s),!0))||[];E=new Response(Tr(E.body,wd,ne,()=>{Q&&Q(),x&&x()}),P)}l=l||"text";let T=await ia[d.findKey(ia,l)||"text"](E,e);return!_&&x&&x(),await new Promise((P,z)=>{Ye(P,z,{data:T,headers:W.from(E.headers),status:E.status,statusText:E.statusText,config:e,request:m})})}catch(b){throw x&&x(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,e,m),{cause:b.cause||b}):y.from(b,b&&b.code,e,m)}});var Pr={http:hd,xhr:bd,fetch:Ed};d.forEach(Pr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var Dd=e=>`- ${e}`,o_=e=>d.isFunction(e)||e===null||e===!1,oa={getAdapter:e=>{e=d.isArray(e)?e:[e];let{length:t}=e,n,i,a={};for(let o=0;o<t;o++){n=e[o];let r;if(i=n,!o_(n)&&(i=Pr[(r=String(n)).toLowerCase()],i===void 0))throw new y(`Unknown adapter '${r}'`);if(i)break;a[r||"#"+o]=i}if(!i){let o=Object.entries(a).map(([s,p])=>`adapter ${s} `+(p===!1?"is not supported by the environment":"is not available in the build")),r=t?o.length>1?`since :
|
|
39
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){let i=new this(t);return n.forEach(a=>i.set(a)),i}static accessor(t){let i=(this[Eu]=this[Eu]={accessors:{}}).accessors,a=this.prototype;function o(r){let s=Hn(r);i[s]||(Vy(a,r),i[s]=!0)}return d.isArray(t)?t.forEach(o):o(t),this}};cn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(cn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}});d.freezeMethods(cn);var W=cn;function Wn(e,t){let n=this||sn,i=t||n,a=W.from(i.headers),o=i.data;return d.forEach(e,function(s){o=s.call(n,o,a.normalize(),t?t.status:void 0)}),a.normalize(),o}function Vn(e){return!!(e&&e.__CANCEL__)}function Du(e,t,n){y.call(this,e??"canceled",y.ERR_CANCELED,t,n),this.name="CanceledError"}d.inherits(Du,y,{__CANCEL__:!0});var Pe=Du;function Ke(e,t,n){let i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new y("Request failed with status code "+n.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function or(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function rr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function kt(e,t){return e&&!or(t)?rr(e,t):t}var cd=R(Ou(),1),pd=R(require("http"),1),ld=R(require("https"),1),ud=R(require("util"),1),dd=R(Hu(),1),st=R(require("zlib"),1);var qt="1.7.7";function Zn(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var Fw=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Sr(e,t,n){let i=n&&n.Blob||B.classes.Blob,a=Zn(e);if(t===void 0&&i&&(t=!0),a==="data"){e=a.length?e.slice(a.length+1):e;let o=Fw.exec(e);if(!o)throw new y("Invalid URL",y.ERR_INVALID_URL);let r=o[1],s=o[2],p=o[3],l=Buffer.from(decodeURIComponent(p),s?"base64":"utf8");if(t){if(!i)throw new y("Blob is not supported",y.ERR_NOT_SUPPORT);return new i([l],{type:r})}return l}throw new y("Unsupported protocol "+a,y.ERR_NOT_SUPPORT)}var Ut=R(require("stream"),1);var Wu=R(require("stream"),1);var Er=Symbol("internals"),Dr=class extends Wu.default.Transform{constructor(t){t=d.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(i,a)=>!d.isUndefined(a[i])),super({readableHighWaterMark:t.chunkSize});let n=this[Er]={timeWindow:t.timeWindow,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",i=>{i==="progress"&&(n.isCaptured||(n.isCaptured=!0))})}_read(t){let n=this[Er];return n.onReadCallback&&n.onReadCallback(),super._read(t)}_transform(t,n,i){let a=this[Er],o=a.maxRate,r=this.readableHighWaterMark,s=a.timeWindow,p=1e3/s,l=o/p,c=a.minChunkSize!==!1?Math.max(a.minChunkSize,l*.01):0,u=(h,m)=>{let x=Buffer.byteLength(h);a.bytesSeen+=x,a.bytes+=x,a.isCaptured&&this.emit("progress",a.bytesSeen),this.push(h)?process.nextTick(m):a.onReadCallback=()=>{a.onReadCallback=null,process.nextTick(m)}},f=(h,m)=>{let x=Buffer.byteLength(h),v=null,b=r,E,_=0;if(o){let T=Date.now();(!a.ts||(_=T-a.ts)>=s)&&(a.ts=T,E=l-a.bytes,a.bytes=E<0?-E:0,_=0),E=l-a.bytes}if(o){if(E<=0)return setTimeout(()=>{m(null,h)},s-_);E<b&&(b=E)}b&&x>b&&x-b>c&&(v=h.subarray(b),h=h.subarray(0,b)),u(h,v?()=>{process.nextTick(m,null,v)}:m)};f(t,function h(m,x){if(m)return i(m);x?f(x,h):i(null)})}},Rr=Dr;var md=require("events");var Ju=require("util"),Yu=require("stream");var{asyncIterator:Vu}=Symbol,kw=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[Vu]?yield*e[Vu]():yield e},ta=kw;var jw=d.ALPHABET.ALPHA_DIGIT+"-_",ei=new Ju.TextEncoder,bt=`\r
|
|
40
|
+
`,Lw=ei.encode(bt),Nw=2,Or=class{constructor(t,n){let{escapeName:i}=this.constructor,a=d.isString(n),o=`Content-Disposition: form-data; name="${i(t)}"${!a&&n.name?`; filename="${i(n.name)}"`:""}${bt}`;a?n=ei.encode(String(n).replace(/\r?\n|\r\n?/g,bt)):o+=`Content-Type: ${n.type||"application/octet-stream"}${bt}`,this.headers=ei.encode(o+bt),this.contentLength=a?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+Nw,this.name=t,this.value=n}async*encode(){yield this.headers;let{value:t}=this;d.isTypedArray(t)?yield t:yield*ta(t),yield Lw}static escapeName(t){return String(t).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},qw=(e,t,n)=>{let{tag:i="form-data-boundary",size:a=25,boundary:o=i+"-"+d.generateString(a,jw)}=n||{};if(!d.isFormData(e))throw TypeError("FormData instance required");if(o.length<1||o.length>70)throw Error("boundary must be 10-70 characters long");let r=ei.encode("--"+o+bt),s=ei.encode("--"+o+"--"+bt+bt),p=s.byteLength,l=Array.from(e.entries()).map(([u,f])=>{let h=new Or(u,f);return p+=h.size,h});p+=r.byteLength*l.length,p=d.toFiniteNumber(p);let c={"Content-Type":`multipart/form-data; boundary=${o}`};return Number.isFinite(p)&&(c["Content-Length"]=p),t&&t(c),Yu.Readable.from(async function*(){for(let u of l)yield r,yield*u.encode();yield s}())},Ku=qw;var Qu=R(require("stream"),1),Cr=class extends Qu.default.Transform{__transform(t,n,i){this.push(t),i()}_transform(t,n,i){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let a=Buffer.alloc(2);a[0]=120,a[1]=156,this.push(a,n)}this.__transform(t,n,i)}},Zu=Cr;var Uw=(e,t)=>d.isAsyncFn(e)?function(...n){let i=n.pop();e.apply(this,n).then(a=>{try{t?i(null,...t(a)):i(null,a)}catch(o){i(o)}},i)}:e,ed=Uw;function Bw(e,t){e=e||10;let n=new Array(e),i=new Array(e),a=0,o=0,r;return t=t!==void 0?t:1e3,function(p){let l=Date.now(),c=i[o];r||(r=l),n[a]=p,i[a]=l;let u=o,f=0;for(;u!==a;)f+=n[u++],u=u%e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),l-r<t)return;let h=c&&l-c;return h?Math.round(f*1e3/h):void 0}}var td=Bw;function Mw(e,t){let n=0,i=1e3/t,a,o,r=(l,c=Date.now())=>{n=c,a=null,o&&(clearTimeout(o),o=null),e.apply(null,l)};return[(...l)=>{let c=Date.now(),u=c-n;u>=i?r(l,c):(a=l,o||(o=setTimeout(()=>{o=null,r(a)},i-u)))},()=>a&&r(a)]}var nd=Mw;var rt=(e,t,n=3)=>{let i=0,a=td(50,250);return nd(o=>{let r=o.loaded,s=o.lengthComputable?o.total:void 0,p=r-i,l=a(p),c=r<=s;i=r;let u={loaded:r,total:s,progress:s?r/s:void 0,bytes:p,rate:l||void 0,estimated:l&&s&&c?(s-r)/l:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(u)},n)},mn=(e,t)=>{let n=e!=null;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},fn=e=>(...t)=>d.asap(()=>e(...t));var id={flush:st.default.constants.Z_SYNC_FLUSH,finishFlush:st.default.constants.Z_SYNC_FLUSH},$w={flush:st.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:st.default.constants.BROTLI_OPERATION_FLUSH},ad=d.isFunction(st.default.createBrotliDecompress),{http:Gw,https:zw}=dd.default,Xw=/https:?/,od=B.protocols.map(e=>e+":"),rd=(e,[t,n])=>(e.on("end",n).on("error",n),t);function Hw(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function fd(e,t,n){let i=t;if(!i&&i!==!1){let a=(0,cd.getProxyForUrl)(n);a&&(i=new URL(a))}if(i){if(i.username&&(i.auth=(i.username||"")+":"+(i.password||"")),i.auth){(i.auth.username||i.auth.password)&&(i.auth=(i.auth.username||"")+":"+(i.auth.password||""));let o=Buffer.from(i.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+o}e.headers.host=e.hostname+(e.port?":"+e.port:"");let a=i.hostname||i.host;e.hostname=a,e.host=a,e.port=i.port,e.path=n,i.protocol&&(e.protocol=i.protocol.includes(":")?i.protocol:`${i.protocol}:`)}e.beforeRedirects.proxy=function(o){fd(o,t,o.href)}}var Ww=typeof process<"u"&&d.kindOf(process)==="process",Vw=e=>new Promise((t,n)=>{let i,a,o=(p,l)=>{a||(a=!0,i&&i(p,l))},r=p=>{o(p),t(p)},s=p=>{o(p,!0),n(p)};e(r,s,p=>i=p).catch(s)}),Jw=({address:e,family:t})=>{if(!d.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},sd=(e,t)=>Jw(d.isObject(e)?e:{address:e,family:t}),hd=Ww&&function(t){return Vw(async function(i,a,o){let{data:r,lookup:s,family:p}=t,{responseType:l,responseEncoding:c}=t,u=t.method.toUpperCase(),f,h=!1,m;if(s){let w=ed(s,S=>d.isArray(S)?S:[S]);s=(S,C,ze)=>{w(S,C,(ie,Xe,Gt)=>{if(ie)return ze(ie);let Te=d.isArray(Xe)?Xe.map(we=>sd(we)):[sd(Xe,Gt)];C.all?ze(ie,Te):ze(ie,Te[0].address,Te[0].family)})}}let x=new md.EventEmitter,v=()=>{t.cancelToken&&t.cancelToken.unsubscribe(b),t.signal&&t.signal.removeEventListener("abort",b),x.removeAllListeners()};o((w,S)=>{f=!0,S&&(h=!0,v())});function b(w){x.emit("abort",!w||w.type?new Pe(null,t,m):w)}x.once("abort",a),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(b),t.signal&&(t.signal.aborted?b():t.signal.addEventListener("abort",b)));let E=kt(t.baseURL,t.url),_=new URL(E,B.hasBrowserEnv?B.origin:void 0),T=_.protocol||od[0];if(T==="data:"){let w;if(u!=="GET")return Ke(i,a,{status:405,statusText:"method not allowed",headers:{},config:t});try{w=Sr(t.url,l==="blob",{Blob:t.env&&t.env.Blob})}catch(S){throw y.from(S,y.ERR_BAD_REQUEST,t)}return l==="text"?(w=w.toString(c),(!c||c==="utf8")&&(w=d.stripBOM(w))):l==="stream"&&(w=Ut.default.Readable.from(w)),Ke(i,a,{data:w,status:200,statusText:"OK",headers:new W,config:t})}if(od.indexOf(T)===-1)return a(new y("Unsupported protocol "+T,y.ERR_BAD_REQUEST,t));let P=W.from(t.headers).normalize();P.set("User-Agent","axios/"+qt,!1);let{onUploadProgress:z,onDownloadProgress:ne}=t,Q=t.maxRate,D,A;if(d.isSpecCompliantForm(r)){let w=P.getContentType(/boundary=([-_\w\d]{10,70})/i);r=Ku(r,S=>{P.set(S)},{tag:`axios-${qt}-boundary`,boundary:w&&w[1]||void 0})}else if(d.isFormData(r)&&d.isFunction(r.getHeaders)){if(P.set(r.getHeaders()),!P.hasContentLength())try{let w=await ud.default.promisify(r.getLength).call(r);Number.isFinite(w)&&w>=0&&P.setContentLength(w)}catch{}}else if(d.isBlob(r))r.size&&P.setContentType(r.type||"application/octet-stream"),P.setContentLength(r.size||0),r=Ut.default.Readable.from(ta(r));else if(r&&!d.isStream(r)){if(!Buffer.isBuffer(r))if(d.isArrayBuffer(r))r=Buffer.from(new Uint8Array(r));else if(d.isString(r))r=Buffer.from(r,"utf-8");else return a(new y("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",y.ERR_BAD_REQUEST,t));if(P.setContentLength(r.length,!1),t.maxBodyLength>-1&&r.length>t.maxBodyLength)return a(new y("Request body larger than maxBodyLength limit",y.ERR_BAD_REQUEST,t))}let F=d.toFiniteNumber(P.getContentLength());d.isArray(Q)?(D=Q[0],A=Q[1]):D=A=Q,r&&(z||D)&&(d.isStream(r)||(r=Ut.default.Readable.from(r,{objectMode:!1})),r=Ut.default.pipeline([r,new Rr({maxRate:d.toFiniteNumber(D)})],d.noop),z&&r.on("progress",rd(r,mn(F,rt(fn(z),!1,3)))));let M;if(t.auth){let w=t.auth.username||"",S=t.auth.password||"";M=w+":"+S}if(!M&&_.username){let w=_.username,S=_.password;M=w+":"+S}M&&P.delete("authorization");let X;try{X=Ft(_.pathname+_.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(w){let S=new Error(w.message);return S.config=t,S.url=t.url,S.exists=!0,a(S)}P.set("Accept-Encoding","gzip, compress, deflate"+(ad?", br":""),!1);let k={path:X,method:u,headers:P.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:M,protocol:T,family:p,beforeRedirect:Hw,beforeRedirects:{}};!d.isUndefined(s)&&(k.lookup=s),t.socketPath?k.socketPath=t.socketPath:(k.hostname=_.hostname.startsWith("[")?_.hostname.slice(1,-1):_.hostname,k.port=_.port,fd(k,t.proxy,T+"//"+_.hostname+(_.port?":"+_.port:"")+k.path));let L,N=Xw.test(k.protocol);if(k.agent=N?t.httpsAgent:t.httpAgent,t.transport?L=t.transport:t.maxRedirects===0?L=N?ld.default:pd.default:(t.maxRedirects&&(k.maxRedirects=t.maxRedirects),t.beforeRedirect&&(k.beforeRedirects.config=t.beforeRedirect),L=N?zw:Gw),t.maxBodyLength>-1?k.maxBodyLength=t.maxBodyLength:k.maxBodyLength=1/0,t.insecureHTTPParser&&(k.insecureHTTPParser=t.insecureHTTPParser),m=L.request(k,function(S){if(m.destroyed)return;let C=[S],ze=+S.headers["content-length"];if(ne||A){let we=new Rr({maxRate:d.toFiniteNumber(A)});ne&&we.on("progress",rd(we,mn(ze,rt(fn(ne),!0,3)))),C.push(we)}let ie=S,Xe=S.req||m;if(t.decompress!==!1&&S.headers["content-encoding"])switch((u==="HEAD"||S.statusCode===204)&&delete S.headers["content-encoding"],(S.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":C.push(st.default.createUnzip(id)),delete S.headers["content-encoding"];break;case"deflate":C.push(new Zu),C.push(st.default.createUnzip(id)),delete S.headers["content-encoding"];break;case"br":ad&&(C.push(st.default.createBrotliDecompress($w)),delete S.headers["content-encoding"])}ie=C.length>1?Ut.default.pipeline(C,d.noop):C[0];let Gt=Ut.default.finished(ie,()=>{Gt(),v()}),Te={status:S.statusCode,statusText:S.statusMessage,headers:new W(S.headers),config:t,request:Xe};if(l==="stream")Te.data=ie,Ke(i,a,Te);else{let we=[],ii=0;ie.on("data",function(re){we.push(re),ii+=re.length,t.maxContentLength>-1&&ii>t.maxContentLength&&(h=!0,ie.destroy(),a(new y("maxContentLength size of "+t.maxContentLength+" exceeded",y.ERR_BAD_RESPONSE,t,Xe)))}),ie.on("aborted",function(){if(h)return;let re=new y("maxContentLength size of "+t.maxContentLength+" exceeded",y.ERR_BAD_RESPONSE,t,Xe);ie.destroy(re),a(re)}),ie.on("error",function(re){m.destroyed||a(y.from(re,null,t,Xe))}),ie.on("end",function(){try{let re=we.length===1?we[0]:Buffer.concat(we);l!=="arraybuffer"&&(re=re.toString(c),(!c||c==="utf8")&&(re=d.stripBOM(re))),Te.data=re}catch(re){return a(y.from(re,null,t,Te.request,Te))}Ke(i,a,Te)})}x.once("abort",we=>{ie.destroyed||(ie.emit("error",we),ie.destroy())})}),x.once("abort",w=>{a(w),m.destroy(w)}),m.on("error",function(S){a(y.from(S,null,t,m))}),m.on("socket",function(S){S.setKeepAlive(!0,1e3*60)}),t.timeout){let w=parseInt(t.timeout,10);if(Number.isNaN(w)){a(new y("error trying to parse `config.timeout` to int",y.ERR_BAD_OPTION_VALUE,t,m));return}m.setTimeout(w,function(){if(f)return;let C=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",ze=t.transitional||rn;t.timeoutErrorMessage&&(C=t.timeoutErrorMessage),a(new y(C,ze.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,t,m)),b()})}if(d.isStream(r)){let w=!1,S=!1;r.on("end",()=>{w=!0}),r.once("error",C=>{S=!0,m.destroy(C)}),r.on("close",()=>{!w&&!S&&b(new Pe("Request stream has been aborted",t,m))}),r.pipe(m)}else m.end(r)})};var xd=B.hasStandardBrowserEnv?function(){let t=B.navigator&&/(msie|trident)/i.test(B.navigator.userAgent),n=document.createElement("a"),i;function a(o){let r=o;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return i=a(window.location.href),function(r){let s=d.isString(r)?a(r):r;return s.protocol===i.protocol&&s.host===i.host}}():function(){return function(){return!0}}();var vd=B.hasStandardBrowserEnv?{write(e,t,n,i,a,o){let r=[e+"="+encodeURIComponent(t)];d.isNumber(n)&&r.push("expires="+new Date(n).toGMTString()),d.isString(i)&&r.push("path="+i),d.isString(a)&&r.push("domain="+a),o===!0&&r.push("secure"),document.cookie=r.join("; ")},read(e){let t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};var gd=e=>e instanceof W?{...e}:e;function Be(e,t){t=t||{};let n={};function i(l,c,u){return d.isPlainObject(l)&&d.isPlainObject(c)?d.merge.call({caseless:u},l,c):d.isPlainObject(c)?d.merge({},c):d.isArray(c)?c.slice():c}function a(l,c,u){if(d.isUndefined(c)){if(!d.isUndefined(l))return i(void 0,l,u)}else return i(l,c,u)}function o(l,c){if(!d.isUndefined(c))return i(void 0,c)}function r(l,c){if(d.isUndefined(c)){if(!d.isUndefined(l))return i(void 0,l)}else return i(void 0,c)}function s(l,c,u){if(u in t)return i(l,c);if(u in e)return i(void 0,l)}let p={url:o,method:o,data:o,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:s,headers:(l,c)=>a(gd(l),gd(c),!0)};return d.forEach(Object.keys(Object.assign({},e,t)),function(c){let u=p[c]||a,f=u(e[c],t[c],c);d.isUndefined(f)&&u!==s||(n[c]=f)}),n}var na=e=>{let t=Be({},e),{data:n,withXSRFToken:i,xsrfHeaderName:a,xsrfCookieName:o,headers:r,auth:s}=t;t.headers=r=W.from(r),t.url=Ft(kt(t.baseURL,t.url),e.params,e.paramsSerializer),s&&r.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let p;if(d.isFormData(n)){if(B.hasStandardBrowserEnv||B.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if((p=r.getContentType())!==!1){let[l,...c]=p?p.split(";").map(u=>u.trim()).filter(Boolean):[];r.setContentType([l||"multipart/form-data",...c].join("; "))}}if(B.hasStandardBrowserEnv&&(i&&d.isFunction(i)&&(i=i(t)),i||i!==!1&&xd(t.url))){let l=a&&o&&vd.read(o);l&&r.set(a,l)}return t};var Yw=typeof XMLHttpRequest<"u",bd=Yw&&function(e){return new Promise(function(n,i){let a=na(e),o=a.data,r=W.from(a.headers).normalize(),{responseType:s,onUploadProgress:p,onDownloadProgress:l}=a,c,u,f,h,m;function x(){h&&h(),m&&m(),a.cancelToken&&a.cancelToken.unsubscribe(c),a.signal&&a.signal.removeEventListener("abort",c)}let v=new XMLHttpRequest;v.open(a.method.toUpperCase(),a.url,!0),v.timeout=a.timeout;function b(){if(!v)return;let _=W.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),P={data:!s||s==="text"||s==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:_,config:e,request:v};Ke(function(ne){n(ne),x()},function(ne){i(ne),x()},P),v=null}"onloadend"in v?v.onloadend=b:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(b)},v.onabort=function(){v&&(i(new y("Request aborted",y.ECONNABORTED,e,v)),v=null)},v.onerror=function(){i(new y("Network Error",y.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let T=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded",P=a.transitional||rn;a.timeoutErrorMessage&&(T=a.timeoutErrorMessage),i(new y(T,P.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,v)),v=null},o===void 0&&r.setContentType(null),"setRequestHeader"in v&&d.forEach(r.toJSON(),function(T,P){v.setRequestHeader(P,T)}),d.isUndefined(a.withCredentials)||(v.withCredentials=!!a.withCredentials),s&&s!=="json"&&(v.responseType=a.responseType),l&&([f,m]=rt(l,!0),v.addEventListener("progress",f)),p&&v.upload&&([u,h]=rt(p),v.upload.addEventListener("progress",u),v.upload.addEventListener("loadend",h)),(a.cancelToken||a.signal)&&(c=_=>{v&&(i(!_||_.type?new Pe(null,e,v):_),v.abort(),v=null)},a.cancelToken&&a.cancelToken.subscribe(c),a.signal&&(a.signal.aborted?c():a.signal.addEventListener("abort",c)));let E=Zn(a.url);if(E&&B.protocols.indexOf(E)===-1){i(new y("Unsupported protocol "+E+":",y.ERR_BAD_REQUEST,e));return}v.send(o||null)})};var Kw=(e,t)=>{let{length:n}=e=e?e.filter(Boolean):[];if(t||n){let i=new AbortController,a,o=function(l){if(!a){a=!0,s();let c=l instanceof Error?l:this.reason;i.abort(c instanceof y?c:new Pe(c instanceof Error?c.message:c))}},r=t&&setTimeout(()=>{r=null,o(new y(`timeout ${t} of ms exceeded`,y.ETIMEDOUT))},t),s=()=>{e&&(r&&clearTimeout(r),r=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));let{signal:p}=i;return p.unsubscribe=()=>d.asap(s),p}},yd=Kw;var Qw=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let i=0,a;for(;i<n;)a=i+t,yield e.slice(i,a),i=a},Zw=async function*(e,t){for await(let n of e_(e))yield*Qw(n,t)},e_=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:n,value:i}=await t.read();if(n)break;yield i}}finally{await t.cancel()}},Tr=(e,t,n,i)=>{let a=Zw(e,t),o=0,r,s=p=>{r||(r=!0,i&&i(p))};return new ReadableStream({async pull(p){try{let{done:l,value:c}=await a.next();if(l){s(),p.close();return}let u=c.byteLength;if(n){let f=o+=u;n(f)}p.enqueue(new Uint8Array(c))}catch(l){throw s(l),l}},cancel(p){return s(p),a.return()}},{highWaterMark:2})};var aa=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",_d=aa&&typeof ReadableStream=="function",t_=aa&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Sd=(e,...t)=>{try{return!!e(...t)}catch{return!1}},n_=_d&&Sd(()=>{let e=!1,t=new Request(B.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),wd=64*1024,Ir=_d&&Sd(()=>d.isReadableStream(new Response("").body)),ia={stream:Ir&&(e=>e.body)};aa&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ia[t]&&(ia[t]=d.isFunction(e[t])?n=>n[t]():(n,i)=>{throw new y(`Response type '${t}' is not supported`,y.ERR_NOT_SUPPORT,i)})})})(new Response);var i_=async e=>{if(e==null)return 0;if(d.isBlob(e))return e.size;if(d.isSpecCompliantForm(e))return(await new Request(B.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(d.isArrayBufferView(e)||d.isArrayBuffer(e))return e.byteLength;if(d.isURLSearchParams(e)&&(e=e+""),d.isString(e))return(await t_(e)).byteLength},a_=async(e,t)=>{let n=d.toFiniteNumber(e.getContentLength());return n??i_(t)},Ed=aa&&(async e=>{let{url:t,method:n,data:i,signal:a,cancelToken:o,timeout:r,onDownloadProgress:s,onUploadProgress:p,responseType:l,headers:c,withCredentials:u="same-origin",fetchOptions:f}=na(e);l=l?(l+"").toLowerCase():"text";let h=yd([a,o&&o.toAbortSignal()],r),m,x=h&&h.unsubscribe&&(()=>{h.unsubscribe()}),v;try{if(p&&n_&&n!=="get"&&n!=="head"&&(v=await a_(c,i))!==0){let P=new Request(t,{method:"POST",body:i,duplex:"half"}),z;if(d.isFormData(i)&&(z=P.headers.get("content-type"))&&c.setContentType(z),P.body){let[ne,Q]=mn(v,rt(fn(p)));i=Tr(P.body,wd,ne,Q)}}d.isString(u)||(u=u?"include":"omit");let b="credentials"in Request.prototype;m=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:i,duplex:"half",credentials:b?u:void 0});let E=await fetch(m),_=Ir&&(l==="stream"||l==="response");if(Ir&&(s||_&&x)){let P={};["status","statusText","headers"].forEach(D=>{P[D]=E[D]});let z=d.toFiniteNumber(E.headers.get("content-length")),[ne,Q]=s&&mn(z,rt(fn(s),!0))||[];E=new Response(Tr(E.body,wd,ne,()=>{Q&&Q(),x&&x()}),P)}l=l||"text";let T=await ia[d.findKey(ia,l)||"text"](E,e);return!_&&x&&x(),await new Promise((P,z)=>{Ke(P,z,{data:T,headers:W.from(E.headers),status:E.status,statusText:E.statusText,config:e,request:m})})}catch(b){throw x&&x(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,e,m),{cause:b.cause||b}):y.from(b,b&&b.code,e,m)}});var Pr={http:hd,xhr:bd,fetch:Ed};d.forEach(Pr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var Dd=e=>`- ${e}`,o_=e=>d.isFunction(e)||e===null||e===!1,oa={getAdapter:e=>{e=d.isArray(e)?e:[e];let{length:t}=e,n,i,a={};for(let o=0;o<t;o++){n=e[o];let r;if(i=n,!o_(n)&&(i=Pr[(r=String(n)).toLowerCase()],i===void 0))throw new y(`Unknown adapter '${r}'`);if(i)break;a[r||"#"+o]=i}if(!i){let o=Object.entries(a).map(([s,p])=>`adapter ${s} `+(p===!1?"is not supported by the environment":"is not available in the build")),r=t?o.length>1?`since :
|
|
41
41
|
`+o.map(Dd).join(`
|
|
42
42
|
`):" "+Dd(o[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return i},adapters:Pr};function Ar(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pe(null,e)}function ra(e){return Ar(e),e.headers=W.from(e.headers),e.data=Wn.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),oa.getAdapter(e.adapter||sn.adapter)(e).then(function(i){return Ar(e),i.data=Wn.call(e,e.transformResponse,i),i.headers=W.from(i.headers),i},function(i){return Vn(i)||(Ar(e),i&&i.response&&(i.response.data=Wn.call(e,e.transformResponse,i.response),i.response.headers=W.from(i.response.headers))),Promise.reject(i)})}var Fr={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Fr[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});var Rd={};Fr.transitional=function(t,n,i){function a(o,r){return"[Axios v"+qt+"] Transitional option '"+o+"'"+r+(i?". "+i:"")}return(o,r,s)=>{if(t===!1)throw new y(a(r," has been removed"+(n?" in "+n:"")),y.ERR_DEPRECATED);return n&&!Rd[r]&&(Rd[r]=!0,console.warn(a(r," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,r,s):!0}};function r_(e,t,n){if(typeof e!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);let i=Object.keys(e),a=i.length;for(;a-- >0;){let o=i[a],r=t[o];if(r){let s=e[o],p=s===void 0||r(s,o,e);if(p!==!0)throw new y("option "+o+" must be "+p,y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new y("Unknown option "+o,y.ERR_BAD_OPTION)}}var sa={assertOptions:r_,validators:Fr};var yt=sa.validators,hn=class{constructor(t){this.defaults=t,this.interceptors={request:new Qo,response:new Qo}}async request(t,n){try{return await this._request(t,n)}catch(i){if(i instanceof Error){let a;Error.captureStackTrace?Error.captureStackTrace(a={}):a=new Error;let o=a.stack?a.stack.replace(/^.+\n/,""):"";try{i.stack?o&&!String(i.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
|
43
43
|
`+o):i.stack=o}catch{}}throw i}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Be(this.defaults,n);let{transitional:i,paramsSerializer:a,headers:o}=n;i!==void 0&&sa.assertOptions(i,{silentJSONParsing:yt.transitional(yt.boolean),forcedJSONParsing:yt.transitional(yt.boolean),clarifyTimeoutError:yt.transitional(yt.boolean)},!1),a!=null&&(d.isFunction(a)?n.paramsSerializer={serialize:a}:sa.assertOptions(a,{encode:yt.function,serialize:yt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let r=o&&d.merge(o.common,o[n.method]);o&&d.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),n.headers=W.concat(r,o);let s=[],p=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(p=p&&x.synchronous,s.unshift(x.fulfilled,x.rejected))});let l=[];this.interceptors.response.forEach(function(x){l.push(x.fulfilled,x.rejected)});let c,u=0,f;if(!p){let m=[ra.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,l),f=m.length,c=Promise.resolve(n);u<f;)c=c.then(m[u++],m[u++]);return c}f=s.length;let h=n;for(u=0;u<f;){let m=s[u++],x=s[u++];try{h=m(h)}catch(v){x.call(this,v);break}}try{c=ra.call(this,h)}catch(m){return Promise.reject(m)}for(u=0,f=l.length;u<f;)c=c.then(l[u++],l[u++]);return c}getUri(t){t=Be(this.defaults,t);let n=kt(t.baseURL,t.url);return Ft(n,t.params,t.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(t){hn.prototype[t]=function(n,i){return this.request(Be(i||{},{method:t,url:n,data:(i||{}).data}))}});d.forEach(["post","put","patch"],function(t){function n(i){return function(o,r,s){return this.request(Be(s||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:o,data:r}))}}hn.prototype[t]=n(),hn.prototype[t+"Form"]=n(!0)});var ti=hn;var kr=class e{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});let i=this;this.promise.then(a=>{if(!i._listeners)return;let o=i._listeners.length;for(;o-- >0;)i._listeners[o](a);i._listeners=null}),this.promise.then=a=>{let o,r=new Promise(s=>{i.subscribe(s),o=s}).then(a);return r.cancel=function(){i.unsubscribe(o)},r},t(function(o,r,s){i.reason||(i.reason=new Pe(o,r,s),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){let t=new AbortController,n=i=>{t.abort(i)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new e(function(a){t=a}),cancel:t}}},Od=kr;function jr(e){return function(n){return e.apply(null,n)}}function Lr(e){return d.isObject(e)&&e.isAxiosError===!0}var Nr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Nr).forEach(([e,t])=>{Nr[t]=e});var Cd=Nr;function Td(e){let t=new ti(e),n=Gn(ti.prototype.request,t);return d.extend(n,ti.prototype,t,{allOwnKeys:!0}),d.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return Td(Be(e,a))},n}var te=Td(sn);te.Axios=ti;te.CanceledError=Pe;te.CancelToken=Od;te.isCancel=Vn;te.VERSION=qt;te.toFormData=vt;te.AxiosError=y;te.Cancel=te.CanceledError;te.all=function(t){return Promise.all(t)};te.spread=jr;te.isAxiosError=Lr;te.mergeConfig=Be;te.AxiosHeaders=W;te.formToJSON=e=>Ji(d.isHTMLForm(e)?new FormData(e):e);te.getAdapter=oa.getAdapter;te.HttpStatusCode=Cd;te.default=te;var xn=te;var{Axios:WO,AxiosError:VO,CanceledError:JO,isCancel:YO,CancelToken:KO,VERSION:QO,all:ZO,Cancel:eC,isAxiosError:tC,spread:nC,toFormData:iC,AxiosHeaders:aC,HttpStatusCode:oC,formToJSON:rC,getAdapter:sC,mergeConfig:cC}=xn;var Nd=R(En());Xt();var Id=R(require("node:crypto")),Bt=R(require("node:fs")),vn=R(require("node:path")),qr=R(Rt());var ca=V();function Pd(){let{__cx:e}=ca.paths(),t=vn.default.join(e,"apiCache");Bt.default.existsSync(t)||Bt.default.mkdirSync(t),console.info("Cache initialized")}function Ad(e){let{__cx:t}=ca.paths(),n=vn.default.join(t,"apiCache"),i=Id.default.createHash("sha256");return i.update(JSON.stringify(e)),`${n}/${i.digest("hex")}`}function Fd(e,t){let n=typeof t=="string"?t:JSON.stringify(t),i=Ad(e),a=vn.default.dirname(i);Bt.default.existsSync(a)||Bt.default.mkdirSync(a,{recursive:!0}),Bt.default.writeFileSync(i,n,"utf8")}function kd(e){try{let t=Ad(e);return qr.default.readJSONSync(t,{encoding:"utf-8"})}catch{return null}}function s_(){let{__cx:e}=ca.paths(),n=`${vn.default.join(e,"apiCache")}/siteHash.json`;try{return qr.default.readJSONSync(n,{encoding:"utf-8"})||{}}catch{return{}}}function jd(e,t){let n=s_(),i=n[e],a=t||i||new Date().valueOf(),{__cx:o}=ca.paths(),s=`${vn.default.join(o,"apiCache")}/siteHash.json`;return a!==i&&(n[e]=a,Bt.default.writeFileSync(s,JSON.stringify(n),{encoding:"utf-8"})),a.toString()}var gn=class{entries;constructor(t){this.entries=t}insert(t,n){this.entries[t].entries.push(n)}get(t){return this.entries[t]}getAll(){return this.entries}};var bn=class{strategy;constructor(t){this.strategy=t}insert(t,n){this.strategy.insert(t,n)}get(t){return this.strategy.get(t)}getAll(){return this.strategy.getAll()}};var c_={API_RESPONSE_TOO_BIG:{title:"API response size is too large",description:"API response size is too large and may affect rendering performance",entries:[]}},p_=new bn(new gn(c_)),ni=p_;var l_={GATSBY_PAGE_SIZE_TOO_BIG:{title:"Gatsby JSON page size is too large",description:"The JSON of some Gatsby pages (page-data folder) are too large and may affect rendering performance",entries:[]}},xC=new bn(new gn(l_));Nd.default.config();var{env:{RETRY_WAIT_SECONDS:u_="4",RETRY_ATTEMPTS:Ld="4"}}=process;async function Mr(e,t,n=""){let{endpoint:i,body:a,cacheKey:o="",attempt:r=1,headers:s}=e,p={endpoint:i,body:a,headers:s,cacheKey:o};if(o){let l=new Date,c=kd(p);if(c){let u=Br(c),f=u?`site: ${u}`:"",h=Ur(new Date().getTime()-l.getTime());return Ot(`${t} (cache) ${f} ${i} - ${h}s ${n}`),c}}try{let l=new Date,{data:c,headers:u}=await xn({url:i,method:t,headers:Object.assign({},s,ot.headers),data:a}),f=Br(c),h=f?`site: ${f}`:"",m=Ur(new Date().getTime()-l.getTime());if(Ot(`${t} (fetch) ${h} ${i} - ${m}s ${n}`),Fd(p,c),O.GRIDDO_ALERT_FEATURE){let x=Number.parseInt(u["content-length"]);x>O.GRIDDO_API_MAX_RESPONSE_SIZE&&ni.insert("API_RESPONSE_TOO_BIG",{endpoint:i,responseSize:x,duration:m})}return c}catch(l){let c=l;return c.response?.status===404?null:(r>parseInt(Ld)&&(console.log(`
|
|
@@ -66,13 +66,13 @@ ${f}
|
|
|
66
66
|
=============
|
|
67
67
|
`))}async function qd(){return await Oe({endpoint:ee.GET_ALL})}async function Ud(e,t){return await Oe({endpoint:`${ee.GET_PAGE}/${e}`,cacheKey:t})}async function Bd(e,t=""){let[n,i]=ee.INFO;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:t})}async function Gr(e,t=""){let[n,i]=ee.LANGUAGES;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:t})}async function zr(e){let[t,n]=ee.BUILD_START;return await Oe({endpoint:`${t}${e}${n}`})}async function Md(e,t){let[n,i]=ee.BUILD_END;return await pa({endpoint:`${n}${e}${i}`,body:t})}async function $d(e,t,n,i,a){let[o,r]=ee.GET_REFERENCE_FIELD_DATA,s=i||e.site,p=a||e.language;return await pa({endpoint:`${o}${s}${r}`,body:t,headers:{lang:p},cacheKey:n})}async function Gd(e){let[t,n]=ee.GET_SITEMAP;return await Oe({endpoint:`${t}${e}${n}`})}async function zd(e,t=""){let[n,i]=ee.SOCIALS;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:t})}var la=V();async function Hd(e){console.info(`API URL ${O.GRIDDO_API_URL}`),await ot.login();let t=await qd(),n=O.GRIDDO_RENDER_ALL_SITES?t.filter(r=>!O.GRIDDO_RENDER_SITE||r.id===O.GRIDDO_RENDER_SITE):t.filter(r=>O.GRIDDO_RENDER_SITE?r.id===O.GRIDDO_RENDER_SITE:!!r.shouldBeUpdated);if(n.length)for(let r of n){let{items:s}=await Gr(r.id);r.domains=s.filter(p=>p.domain&&(p.domain.slug===e||p.domain.slug===`/${e}`)).map(p=>({[p.id]:`${p.domain.slug}${p.path}`}))}let i=n.filter(r=>r.domains.length>0),a=i.filter(r=>O.GRIDDO_RENDER_SITE?r.id===O.GRIDDO_RENDER_SITE:!!r.isPublished),o=i.filter(r=>!r.isPublished&&r.shouldBeUpdated);return{sitesToPublish:a,sitesToUnpublish:o}}async function Wd(e){let{__cx:t}=la.paths();for(let n of e){let i=await zr(n.id),{siteHash:a}=i,o={siteHash:a,publishHashes:[],unpublishHashes:[]};await Md(n.id,o),yn.default.rmSync(wt.default.join(t,"store",n.id.toString()),{force:!0,recursive:!0})}}async function Vd(e){let t=await zr(e),n=await Bd(e),i=await Gr(e),a=await zd(e),o=i.items,r=o.find(m=>m.isDefault),{siteHash:s,unpublishHashes:p,publishIds:l}=t,{headers:c,footers:u}=n,f=O.GRIDDO_RENDER_PAGES.length?O.GRIDDO_RENDER_PAGES.filter(m=>l.includes(m)):l;return{siteInfo:n,validPagesIds:f,siteHash:s,unpublishHashes:p,siteLangs:o,defaultLang:r,headers:c,footers:u,socials:a}}async function Jd(){let{__cx:e}=la.paths(),{buildReportFileName:t}=la,{buildProcessData:n}=await Ao(),i=await ot.login(),a=Object.keys(n).map(s=>({...n[s],siteId:Number.parseInt(s)})),o={authControl:i,sites:a},r=wt.default.join(e,"dist",t);yn.default.writeFileSync(r,JSON.stringify(o)),U(`build report saved in ${r}`),Ot(`Build report saved for ${a.length} site(s)`)}async function Yd(){let{sitesToPublish:e}=await Ao(),{__cx:t}=la.paths(),n=wt.default.join(t,"dist");for(let i of e){let{id:a,languages:o}=i;for(let r of o){ot.headers&&(ot.headers.lang=r.id.toString());let s=await Gd(a);if(!s)continue;let{items:p,url:{home:l,domain:c}}=s;if(!l)continue;let u=i.domains.find(E=>Object.keys(E)[0]===r.id.toString());if(!u)continue;let f=Object.values(u)[0],h=[],m=Object.keys(p),x=wt.default.join(n,f.replace(c,""));for(let E of m){let _=p[E];if(!_.length)continue;let T=(0,Xr.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=`/sitemap-${E.toLowerCase()}.xml`,z=wt.default.join(x,P);Xd(z,T),h.push(`${l.endsWith("/")?l.slice(0,-1):l}${P}`)}if(!h.length)continue;let v=(0,Xr.parse)("sitemapindex",{"@":{xmlns:"http://www.sitemaps.org/schemas/sitemap/0.9"},sitemap:h.map(E=>({loc:E}))}),b=wt.default.join(x,"sitemap.xml");Xd(b,v),U(`sitemap generated in ${b}`)}}}function Xd(e,t){try{let n=wt.default.dirname(e);yn.default.existsSync(n)||yn.default.mkdirSync(n,{recursive:!0}),yn.default.writeFileSync(e,t)}catch(n){throw console.log(n),new Error("Error saving a file")}}at();var Hr=R(require("node:fs")),Wr=R(require("node:path"));var m_=V(),Vr=class{robots;settings;constructor(){this.robots=[],this.settings={}}async getRobots(){try{let t=await Oe({endpoint:ee.ROBOTS});this.robots=t?.filter(n=>!!n.path).map(({path:n,content:i})=>({path:n,content:i||`User-agent: *
|
|
68
68
|
\r
|
|
69
|
-
\rAllow: /`}))||[]}catch(t){console.warn(`${this.constructor.name}: ${t.message}`)}}async writeFiles(t){let{__cx:n}=m_.paths(t),i=Wr.default.join(n,"dist");await this.getRobots();let a=this.robots.find(({path:o})=>o===`/${t}`);if(!a){console.log(`Robots not found for ${t}`);return}if(Hr.default.existsSync(i)){let o=Wr.default.join(i,"robots.txt");Hr.default.writeFileSync(o,a?.content),U(`wrote robots.txt to ${o}`)}else console.log(`${i} not found`)}},Kd=new Vr;var am=V(),oT=im.default.sync();function V(){try{return(nm(),us(tm)).default}catch(e){throw console.log(e),new Error("Error while reading configuration file")}}function Me(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=Number.parseInt(e,10);return Number.isNaN(t)?!1:t>0}function ko(e){let t=[],n=
|
|
69
|
+
\rAllow: /`}))||[]}catch(t){console.warn(`${this.constructor.name}: ${t.message}`)}}async writeFiles(t){let{__cx:n}=m_.paths(t),i=Wr.default.join(n,"dist");await this.getRobots();let a=this.robots.find(({path:o})=>o===`/${t}`);if(!a){console.log(`Robots not found for ${t}`);return}if(Hr.default.existsSync(i)){let o=Wr.default.join(i,"robots.txt");Hr.default.writeFileSync(o,a?.content),U(`wrote robots.txt to ${o}`)}else console.log(`${i} not found`)}},Kd=new Vr;var am=V(),oT=im.default.sync();function V(){try{return(nm(),us(tm)).default}catch(e){throw console.log(e),new Error("Error while reading configuration file")}}function Me(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=Number.parseInt(e,10);return Number.isNaN(t)?!1:t>0}function ko(e){let t=[],n=Ze.default.readdirSync(e).filter(i=>{let a=Mt.default.join(e,i);return Ze.default.statSync(a).isDirectory()&&i!=="metadata"});for(let i of n){let a=Mt.default.join(e,i),o=Ze.default.readdirSync(a).filter(r=>r.endsWith(".json"));for(let r of o)t.push(Mt.default.join(a,r))}return t}function $r(e){return new Promise(t=>setTimeout(t,e))}function Ur(e,t=3){return(e/1e3).toFixed(t)}function Br(e){if(typeof e!="string")return"site"in e&&e.site?e?.site:void 0}function jo(e,t){for(let n in e)t.includes(n)?delete e[n]:typeof e[n]=="object"&&jo(e[n],t)}function om(){let{__cx:e}=am.paths(),t=Mt.default.join(e,"apiCache"),n=Ze.default.readdirSync(t),i={},a=n.filter(r=>{let s=`${t}/${r}`,p=ma.default.readJSONSync(s,"utf-8"),{id:l,entity:c,fullUrl:u}=p;return!!(l&&c&&u)});for(let r of a){let s=`${t}/${r}`,p=ma.default.readJSONSync(s,"utf-8"),l=Ze.default.statSync(s).mtimeMs,{id:c}=p;(!i[c]||l>Ze.default.statSync(`${t}/${i[c]}`).mtimeMs)&&(i[c]=r)}let o=0;for(let r of a){let s=`${t}/${r}`,p=ma.default.readJSONSync(s,"utf-8"),{id:l}=p;r!==i[l]&&(Ze.default.unlinkSync(s),o++)}console.log(`Sanitize apiCache dir for ${o} files`)}async function Qr(e,t=0){let n=process.hrtime();for(let r of e)await r(),t>0&&await $r(t);let[i,a]=process.hrtime(n);return+(i+a/1e9).toFixed(3)}function S_(e){if(O.GRIDDO_RENDER_BREAKPOINTS_FEATURE)return new Promise(n=>{console.log(`
|
|
70
70
|
`),Qt(`\u231B\uFE0F ${e}`,"",1,0),process.stdin.once("data",()=>{n()})})}async function $e(e,t){let{steps:n,bypass:i,delay:a}=t;if(i)return;let o={Archive:O.GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS,Data:O.GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS,Meta:O.GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS,Relocation:O.GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS,Clean:O.GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS,Restore:O.GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS,Prepare:O.GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS,Close:O.GRIDDO_CLOSE_LIFECYCLE_MAX_ATTEMPTS,SSG:O.GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS,HealthCheck:1,__DEBUG__:1},r=0,s=o[e]||1;for(;r<s;)try{Zt(`start ${e} life-cycle`);let p=await Qr(n,a);Np(`${e} - ${p}s
|
|
71
71
|
`),await S_(`${e} LifeCycle`);break}catch(p){let l=bp(gp(` Error in ${e} LifeCycle `)),c=Y.yellow(`Attempt (${r+1})`);console.log(`
|
|
72
72
|
${l} ${c}
|
|
73
|
-
`),console.log(p),console.log(),r++}r===s&&K(ul(s,e))}async function rm(e){await Jd(),await Yd(),await Kd.writeFiles(e)}function sm(){let{__cx:e}=am.paths(),t=Mt.default.join(e,"store"),a=Qe.default.readdirSync(t).filter(o=>o!=="metadata").map(o=>Mt.default.join(t,o));for(let o of a)Qe.default.rmSync(o,{recursive:!0,force:!0})}cm.default.config();var Fe=process.env.GRIDDO_API_URL||process.env.API_URL,fa=process.env.GRIDDO_PUBLIC_API_URL||process.env.PUBLIC_API_URL,pm=process.env.botEmail,lm=process.env.botPassword,um=Number.parseInt(process.env.GRIDDO_API_CONCURRENCY_COUNT||"10"),dm=Me(process.env.GRIDDO_RENDER_ALL_SITES||process.env.updateAllSites),mm=Number.parseInt(process.env.GRIDDO_RENDER_SITE||""),fm=(process.env.GRIDDO_RENDER_PAGES||"").split(",").map(e=>Number.parseInt(e)).filter(Boolean),hm=Me(process.env.GRIDDO_SKIP_BUILD_CHECKS),xm=Me(process.env.GRIDDO_DEBUG_LOGS),vm=Me(process.env.GRIDDO_BUILD_LOGS),gm=Me(process.env.GRIDDO_RENDER_BREAKPOINTS_FEATURE),bm=Me(process.env.GRIDDO_SSG_VERBOSE_LOGS),ym=Me(process.env.GRIDGRIDDO_SEARCH_FEATURE_FEATURE),wm=process.env.GRIDDO_ASSET_PREFIX||process.env.ASSET_PREFIX,_m=process.env.GRIDDO_REACT_APP_INSTANCE||process.env.REACT_APP_INSTANCE,Sm=Me(process.env.GRIDDO_AI_EMBEDDINGS),Em=Me(process.env.GRIDDO_VERBOSE_LOGS),Dm=Me(process.env.GRIDDO_ALERT_FEATURE),Rm=Number.parseInt(process.env.GRIDDO_API_MAX_RESPONSE_SIZE||"81920"),Om=Number.parseInt(process.env.GRIDDO_SSG_MAX_PAGE_SIZE||"524288"),Cm=Number.parseInt(process.env.GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS||"1"),Tm=Number.parseInt(process.env.GRIDDO_CLOSE_LIFECYCLE_MAX_ATTEMPTS||"1"),Im=Number.parseInt(process.env.GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS||"1"),Pm=Number.parseInt(process.env.GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS||"1"),Am=Number.parseInt(process.env.GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS||"1"),Fm=Number.parseInt(process.env.GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS||"2"),km=Number.parseInt(process.env.GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS||"1"),jm=Number.parseInt(process.env.GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS||"4"),Lm=Number.parseInt(process.env.GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS||"1"),Nm=process.env.GRIDDO_CX_FIXTURES_DOMAIN_NAMES,qm=process.env.GRIDDO_CX_FIXTURES_SITE_NAMES;var _t=`${Fe}/site/`,Um=`${Fe}/ai/embeddings`,Bm=`${fa}/alert`,Mm=`${Fe}/domains`,$m=`${Fe}/sites/all`,Gm=`${Fe}/page`,zm=`${Fe}/login_check`,Xm=`${Fe}/debug/reset-render`,Hm=`${Fe}/domains/robots`,Wm=`${Fe}/search`,Vm=`${Fe}/settings`,Jm=[_t,"/build/end"],Ym=[_t,"/build/start"],Km=[_t,"/pages?pagination=false"],Qm=[_t,"/distributor"],Zm=[_t,"/sitemap"],ef=[_t,"/all"],tf=[_t,"/languages"],nf=[_t,"/socials"];var ee={ALERT:Bm,AI_EMBEDDINGS:Um,BUILD_END:Jm,BUILD_START:Ym,DOMAINS:Mm,GET_ALL:$m,GET_PAGE:Gm,GET_PAGES:Km,GET_REFERENCE_FIELD_DATA:Qm,GET_SITEMAP:Zm,INFO:ef,LANGUAGES:tf,LOGIN:zm,RESET_RENDER:Xm,ROBOTS:Hm,SEARCH:Wm,SETTINGS:Vm,SOCIALS:nf},O={GRIDDO_AI_EMBEDDINGS:Sm,GRIDDO_ALERT_FEATURE:Dm,GRIDDO_API_CONCURRENCY_COUNT:um,GRIDDO_API_MAX_RESPONSE_SIZE:Rm,GRIDDO_API_URL:Fe,GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS:Lm,GRIDDO_ASSET_PREFIX:wm,GRIDDO_BOT_PASSWORD:lm,GRIDDO_BOT_USER:pm,GRIDDO_BUILD_LOGS:vm,GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS:Cm,GRIDDO_CLOSE_LIFECYCLE_MAX_ATTEMPTS:Tm,GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS:Am,GRIDDO_DEBUG_LOGS:xm,GRIDDO_FIXTURES_DOMAIN_NAMES:Nm,GRIDDO_FIXTURES_SITE_NAMES:qm,GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS:jm,GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS:Im,GRIDDO_PUBLIC_API_URL:fa,GRIDDO_REACT_APP_INSTANCE:_m,GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS:km,GRIDDO_RENDER_ALL_SITES:dm,GRIDDO_RENDER_BREAKPOINTS_FEATURE:gm,GRIDDO_RENDER_PAGES:fm,GRIDDO_RENDER_SITE:mm,GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS:Pm,GRIDDO_SEARCH_FEATURE:ym,GRIDDO_SKIP_BUILD_CHECKS:hm,GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS:Fm,GRIDDO_SSG_MAX_PAGE_SIZE:Om,GRIDDO_SSG_VERBOSE_LOGS:bm,GRIDDO_VERBOSE_LOGS:Em};Ve();at();of.default.config();var rf=V();function sf(e){let{proDomain:t}=V();if(!O.GRIDDO_ASSET_PREFIX||!e||!e.startsWith(t))return"";let n=`${O.GRIDDO_ASSET_PREFIX}/${e}`;return U(`Reading process.env.GRIDDO_ASSET_PREFIX, ${O.GRIDDO_ASSET_PREFIX}`),U(`Setting the asset prefix with the domain concatenated, ${n}`),n}function cf(e){U(`read assetPrefixWithDomain, ${e}`),U(`using this NODE_OPTIONS in gatsby command: ${process.env.NODE_OPTIONS}`);let{__ssg:t}=rf.paths(),n=process.env.NODE_OPTIONS?process.env.NODE_OPTIONS.replace(/--openssl-legacy-provider\s*/g,"").trim():"",i=(0,af.spawnSync)("yarn",["gatsby-build",O.GRIDDO_SSG_VERBOSE_LOGS?"--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,NODE_OPTIONS:n})});i.status!==0&&K(ll(i))}async function pf(e,t){let{__cx:n,__ssg:i}=rf.paths(e),a=ct.default.join(n,"dist"),o=ct.default.join(n,"assets"),r=ct.default.join(n,"dist",e),s=ct.default.join(i,"public"),p=Ge.default.readdirSync(s).filter(x=>ct.default.extname(x)===".js"||ct.default.extname(x)===".json"||ct.default.extname(x)===".css"),l=`${s}/page-data`,c=`${o}/page-data`,u=ct.default.join(i,"static"),f=o,h=`${a}/static`,m=`${o}/static`;try{Ge.default.mkdirSync(o,{recursive:!0}),Ge.default.copySync(s,a,{preserveTimestamps:!0}),t&&(Ge.default.copySync(l,c,{preserveTimestamps:!0}),Ge.default.existsSync(u)&&Ge.default.copySync(u,f,{overwrite:!1,preserveTimestamps:!0}),Ge.default.copySync(h,m,{overwrite:!1,preserveTimestamps:!0}),Ge.default.existsSync(u)&&Ge.default.copySync(u,r,{overwrite:!1,preserveTimestamps:!0}),p.map(async x=>{let v=`${s}/${x}`,b=`${o}/${x}`;Ge.default.copySync(v,b,{preserveTimestamps:!0})}))}catch(x){console.error(x)}}var $t=R(require("node:path"));function E_(e){let{__cx:t,__exports:n,__cache:i}=e;return{initials:[n,i,$t.default.join(t,"store"),$t.default.join(t,"apiCache")],disposables:[$t.default.join(t,"store"),$t.default.join(t,"apiCache"),$t.default.join(t,"render-metadata.json"),$t.default.join(t,"dist")],cacheables:["apiCache","store"],archivables:["dist","assets"]}}var ha=E_;var xa=R(require("node:path"));function D_(e){let{__ssg:t}=e;return{disposables:[xa.default.join(t,"public"),xa.default.join(t,"static"),xa.default.join(t,".cache")],cacheables:[".cache"],initials:[],archivables:[]}}var lf=D_;function uf(e,t){let{cxPaths:n}=t,i={gatsby:lf(n)};return{cx:ha(n),[e]:i[e],all:{initials:[...ha(n).initials,...i[e].initials],disposables:[...ha(n).disposables,...i[e].disposables]}}}async function df({area:e,description:t,fullData:n,instantNotification:i=!1,level:a}){let o=ee.ALERT,r={level:a,area:e,description:t,fullData:n,instantNotification:i};try{await xn.post(o,r,{headers:{"Content-Type":"application/json",Connection:"close"}})}catch(s){console.error("Error creating Griddo alert:",s)}}var Ef=R(require("node:fs")),ns=R(require("node:path")),Df=R(za());var va=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(){let n=[...this.navigations.footers].filter(a=>a.setAsDefault),i={};for(let a of n)i[a.language]=a;return i}getDefaultHeaders(){let n=[...this.navigations.headers].filter(a=>a.setAsDefault),i={};for(let a of n)i[a.language]=a;return i}getRightLanguage(t,n,i){if(!t||!n)return null;let o=t.find(r=>r.language===i&&r.navigationLanguages?.find(s=>s.navigationId===n))||t.find(r=>r.id===n);return o?{...o}:null}getPageHeader(t,n){return this.getRightLanguage(this.navigations.headers,t,n)}getPageFooter(t,n){return this.getRightLanguage(this.navigations.footers,t,n)}getPageNavigations(t){let{header:n,footer:i,language:a,template:{templateType:o},templateConfig:{defaultHeader:r,defaultFooter:s,templates:p}}=t,l=m=>{let x=m.find(v=>typeof v=="number");return typeof x=="number"?x:null},c=l([n,p?.[o]?.defaultHeader,r]),u=l([i,p?.[o]?.defaultFooter,s]),f=c?this.getPageHeader(c,a):c===0?null:this._defaultHeaders[a],h=u?this.getPageFooter(u,a):u===0?null:this._defaultFooters[a];return{header:f,footer:h}}};function R_(e,t){let{order:n,sources:i,quantity:a,mode:o,fixed:r,fullRelations:s=!1,allLanguages:p=!1,preferenceLanguage:l=!1,referenceId:c,fields:u}=e;return o==="auto"?{mode:o,order:n,sources:i,quantity:a,fullRelations:s,allLanguages:p,preferenceLanguage:l,fields:u}:o==="manual"?{mode:o,fixed:r,fullRelations:s,fields:u}:o==="navigation"?{mode:o,order:n,quantity:a,fullRelations:s,referenceId:c||t?.structuredDataContent?.id,fields:u}:(console.log(`Error: ReferenceField mode: ${o} is not recognized on page ${t?.id}.`),e)}async function O_(e){let{page:t,component:{data:n},cacheKey:i}=e;if(!n)return Qt(`Error: Page ${t.id} has \`hasDistributorData: true\` or \`getStaticData: true\` but it doesn't have a \`data\` property.`,"No `data` in `ReferenceField`"),[];if(Array.isArray(n.sources)&&n.sources.length<1)return Qt(`Warning: Page with id: ${t.id} has a ReferenceField with empty \`data.sources\``,"Empty data.sources in ReferenceField"),[];let{site:a,lang:o}=n;!n.sources&&n.mode==="auto"&&Qt(`Warning: Page with id: ${t.id} has a ReferenceField with \`undefined\` \`data.sources\``,"undefined data.sources in ReferenceField");let r=R_(n,t);return await $d(t,r,i,a,o)}async function mf({page:e,cacheKey:t=""}){try{let{template:n}=e,i=async(r,s=1)=>{if(!(!r||typeof r!="object"||!(JSON.stringify(r).includes('"hasDistributorData":true')||JSON.stringify(r).includes('"getStaticData":true'))))for(let l in r){if(l==="queriedItems")continue;let u=r[l];if(!u||typeof u!="object")continue;(u.hasDistributorData||u.getStaticData)&&(u.queriedItems=await O_({page:e,cacheKey:t,component:u})),await i(u,s+1)}};return await(async r=>(await i([r]),r))(n)}catch(n){console.error(`Error in getReferenceFieldData ${n}`),process.exit(1)}}async function ff(){return await Oe({endpoint:ee.SETTINGS})}var vf=R(En());function Zr(e,t,n,i="jpg"){let a=typeof e=="string"?e:e?.url;return a?a.split("/")[2].includes("cloudinary.com")?T_(a,`c_fill,w_${t},h_${n}`):C_(a,`f/${i}/w/${t}/h/${n}`):null}function C_(e,t){let n=e.split("/"),i=n.slice(0,-1).join("/"),a=n.slice(-1)[0];return`${i}/${t}/${a}`}function T_(e,t){let n=e.replace("https://",""),i=n.split("/").slice(0,4).join("/"),a=n.replace(i,"");return`https://${i}/${t}${a}`}vf.default.config();var I_=25;function P_({socialTitle:e,socialDescription:t,socialImage:n}){return{type:"website",title:e,description:t,image:n?Zr(n,1280,768):"",twitterImage:n?Zr(n,1280,768):""}}function A_(e){let{title:t,metaTitle:n,metaDescription:i,canonicalURL:a,locale:o,url:r,isIndexed:s,follow:p,metasAdvanced:l,pageLanguages:c,fullUrl:u,metaKeywords:f}=e,h=l?.split(",").filter(Boolean).map(m=>m.trim().toLowerCase())||[];return{title:(n||t||"").trim(),description:i,canonical:a?.trim()&&a!==u?a.trim():s?u:void 0,locale:o,url:r,index:s?"index":"noindex",follow:p?"follow":"nofollow",translate:h.includes("notranslate")?"notranslate":"",metasAdvanced:h.filter(m=>m!=="notranslate").join(),pageLanguages:c,metaKeywords:f?.filter(Boolean).map(m=>m.replace(/"/g,"'")).join(", ")}}async function ts(e,t){let{id:n,title:i,fullPath:a,language:o,breadcrumb:r,socialDescription:s,socialImage:p,socialTitle:l}=e,{baseUrl:c,cloudinaryName:u,griddoVersion:f,siteLangs:h,siteMetadata:m,siteOptions:x,siteScript:v,siteSlug:b,socials:E,theme:_,navigations:{header:T,footer:P}}=t;e.breadcrumb=r,e.siteSlug=b,e.apiUrl=c,e.publicApiUrl=t.publicBaseUrl,e.instance=t.instance;let ne=h.find(({id:X})=>X===e?.language)?.locale.replace(/_/g,"-"),Q=A_(e),D=P_({socialDescription:s,socialImage:p,socialTitle:l}),A=a.compose,F=new Date().toString();return{path:A,size:void 0,context:{id:n,title:i,fullPath:a,locale:ne,languageId:o,theme:_,siteMetadata:m,pageMetadata:Q,openGraph:D,socials:E,siteLangs:h,cloudinaryName:u,siteOptions:x,griddoVersion:f,renderDate:F,siteScript:v,header:T,footer:P,page:e}}}async function gf(e,t){return await ts(e,t)}async function bf({page:e,pages:t,isRoot:n=!1,defaultLang:i,template:a,totalQueriedItems:o},r){let s=t.map(async(p,l)=>{let c=l===0,u=l+1,{domainUrl:f,compose:h}=e.fullPath,m={...e,id:Number.parseInt(`-${e.id}${l}`),fullPath:{...e.fullPath,compose:es(h,u,{addEndingSlash:!0})},fullUrl:es(e.fullUrl,u,{addEndingSlash:!0}),slug:es(e.slug,u),title:xf(e.title,u),metaTitle:xf(e.metaTitle||"",u),disableHrefLangs:u>1,template:{...a,isFirstPage:c,pageNumber:u,totalPages:t.length,baseLink:`${f}${h}`,queriedItems:p,totalQueriedItems:o?.length},isRoot:n,defaultLang:i};return await ts(m,r)});return Promise.all(s)}function yf(e,t){let{multiPageElements:n,...i}=e,a=JSON.parse(JSON.stringify(n));a.find(({sectionSlug:r})=>r==="/")||a.push({});let o=a.map(async(r,s)=>{let p=JSON.parse(JSON.stringify(i)),{sectionSlug:l="/",title:c="",metaTitle:u="",metaDescription:f=""}=r,h=typeof c=="string"?c:c.content,m=p.fullPath.compose||"",x=p.fullUrl.endsWith("/")?p.fullUrl.slice(0,-1):p.fullUrl,v=l?.replace(/\//g,""),E=l==="/"?v:`${v}/`,_=m.endsWith("/")?"":"/",T=`${m}${_}${E}`;return h.trim()&&(p.title=h),f.trim()&&(p.metaDescription=f),p.id=Number.parseInt(`-${p.id}${s}`),p.fullUrl=`${x}/${E}`,p.fullPath.compose=T,p.slug=T,p.template.activeSectionSlug=l,p.template.activeSectionBase=x,p.metaTitle=u.trim()||h.trim()||p.metaTitle,await ts(p,t)});return Promise.all(o)}function wf(e){return new Promise(n=>{let i=(a,o=0)=>{if(!(!a||typeof a!="object")){for(let r in a){let s=a[r],p=s||typeof s=="object",l=JSON.stringify(s).includes('"hasGriddoMultiPage":true');if(!p||!l)continue;let{component:c,hasGriddoMultiPage:u,elements:f}=s;c&&u&&n(f||[]),i(s,o+1)}o||n(null)}};i([e])})}function F_(e,t,n){return t?.slice(e*(n-1),e*n)}function k_(e,t){let n=Math.ceil(t.length/e)||1;return Array.from({length:n},(a,o)=>o+1)?.map(a=>F_(e,t,a))}function _f(e){let t=e.queriedItems||[],n=e?.itemsPerPage||I_;return k_(n,t)}function hf(e){return e.replace(/\/+$/,"/")}function es(e,t,n){let i=e.endsWith("/")?"":"/",a=n?.addEndingSlash?"/":"";return t<=1?hf(`${e}${a}`):hf(`${e}${i}${t}${a}`)}function xf(e,t){return!e||t<=1?e:`${e} - ${t}`}var Sf=V(),j_=new Date().valueOf().toString();async function Rf(e){vl(),console.info(`API calls with ${O.GRIDDO_API_CONCURRENCY_COUNT} threads`);let{__cx:t}=Sf.paths(),{griddoVersion:n}=Sf,i=ns.default.join(t,"store");try{let a=[],o={},{sitesToPublish:r,sitesToUnpublish:s}=await Hd(e),p=r.length>0||s.length>0;p||console.warn(`There are no sites to update in the domain ${e}`),Ya("Sites to publish:",r),Ya("Sites to unpublish:",s),await Wd(s);for(let l of r){let{id:c,slug:u,theme:f,favicon:h,changedPages:m=[]}=l,{siteInfo:x,validPagesIds:v,siteHash:b,unpublishHashes:E,siteLangs:_,defaultLang:T,headers:P,footers:z,socials:ne}=await Vd(c),{cloudinaryName:Q,useMetaTitle:D,useMetaKeywords:A,showBasicMetaRobots:F,avoidHrefLangsOnCanonicals:M,avoidSelfReferenceCanonicals:X,avoidHrefLangXDefault:k,avoidDebugMetas:L}=await ff();o[c]={siteHash:b,unpublishHashes:E,publishHashes:[]};let N=new va;N.navigations={headers:P,footers:z},l.languages=_;let w=jd(c,b),S=x.siteScript,C={siteUrl:x.slug,title:x.name,favicon:h},ze={baseUrl:O.GRIDDO_API_URL,publicBaseUrl:O.GRIDDO_PUBLIC_API_URL,instance:O.GRIDDO_REACT_APP_INSTANCE,siteSlug:u,theme:f,siteMetadata:C,socials:ne,siteLangs:_,cloudinaryName:Q,griddoVersion:n,siteOptions:{useMetaTitle:D,useMetaKeywords:A,showBasicMetaRobots:F,avoidHrefLangsOnCanonicals:M,avoidSelfReferenceCanonicals:X,avoidHrefLangXDefault:k,avoidDebugMetas:L},siteScript:S};Ot(`${l.name} site`),Ef.default.mkdirSync(ns.default.join(i,c.toString()),{recursive:!0});let ie=async(St,re)=>{let ai=[],et=await Ud(re,w);if(!et)return;a.push(re);let oi=JSON.parse(JSON.stringify(ze));oi.navigations=N.getPageNavigations(et);let zt=await mf({page:et,cacheKey:j_}),cs=await wf(zt),wa=et?.mode==="list",ps=!wa&&cs,Uf=!ps&&!wa;if(wa){let He={page:et,pages:_f(zt),isRoot:!1,defaultLang:T,template:zt,totalQueriedItems:zt.queriedItems};ai=await bf(He,oi)}if(ps){let He=et;He.template=zt,He.multiPageElements=cs,He.defaultLang=T,ai=await yf(He,oi)}if(Uf){let He=et;He.template=zt,He.defaultLang=T,ai=[await gf(He,oi)]}et.hash!==null&&o[c].publishHashes.push(et.hash),gl(St,ai)},{pagesMissingInStore:Xe,pagesToDeleteFromStore:Gt,pagesToWriteToStore:Te}=await yl({sitesToPublish:r,validPagesIds:v,changedPages:m,siteDirName:c.toString()});bl(c.toString(),Gt);let we=(0,Df.default)(O.GRIDDO_API_CONCURRENCY_COUNT),ii=Te.map(St=>we(()=>ie(c.toString(),St)));U(`Store site: ${l.name}`),U(`${v.length} valid pages from API`),U(`changed ${m.length} pages from API`),U(`deleted ${Gt.length} pages from store`),U(`missing ${Xe.length} pages in store`),U(`write ${Te.length} pages to store`),await Promise.all(ii)}p?Fo({buildProcessData:o,createdPages:a,sitesToPublish:r}):(sm(),Fo({buildProcessData:o,createdPages:[],sitesToPublish:[]}))}catch(a){console.error(a.message),process.exit(1)}}async function Of(e){Pd(),await Rf(e),om()}Ve();at();async function Cf(){return await Oe({endpoint:ee.DOMAINS})}async function Tf(){await ot.login();let e=await Cf();return e.length||K(ml),U(`getting domains names (${e.length})`),L_(e)}function L_(e){let t=e.filter(({slug:n})=>!!n).map(({slug:n})=>n.replace("/",""));return[...new Set(t)]}var Ce=R(require("node:fs")),Ze=R(require("node:path")),ye=R(Rt());Ve();at();var N_=V(),is=e=>{if(!ye.default.statSync(e).isDirectory())return;let n=ye.default.readdirSync(e);if(n.length>0){let a=n.length,o=n.filter(r=>Ze.default.extname(r).toLowerCase()===".xml").length;if(a===o){for(let r of n){let s=Ze.default.join(e,r);ye.default.rmSync(s)}n=ye.default.readdirSync(e)}for(let r of n){let s=Ze.default.join(e,r);is(s)}n=ye.default.readdirSync(e)}if(n.length===0){ye.default.rmdirSync(e);return}};function If(e,t){for(let n of e)try{Ce.default.existsSync(n)||(Ce.default.mkdirSync(n,{recursive:!0,...t}),U(`create directory: ${n}`))}catch(i){K(Pt,i)}}function Pf(e,t){try{Ce.default.existsSync(e)&&(Ce.default.renameSync(e,t),U(`rename ${e} to ${t}`))}catch(n){K(Pt,n)}}function as(e,t,n,i={withBackup:!1}){let{withBackup:a}=i;for(let o of n){let r=Ze.default.join(e,o),s=Ze.default.join(t,o);if(!ye.default.existsSync(r)){console.log(`(Maybe first render) Source directory does not exist: ${r}`);continue}a&&(kf(s),U(`create backup: ${s}`));try{ye.default.existsSync(s)&&(Ce.default.rmSync(s,{recursive:!0,force:!0}),U(`clean destination: ${s}`)),Ce.default.cpSync(r,s,{recursive:!0,preserveTimestamps:!0}),U(`copy: ${r} to ${s}`),a&&(Ff(s),U(`delete backup: ${s}`))}catch(p){a&&(Af(s),console.log("Backup has been restored.")),K(Pt,p)}}}function _n(e,t,n,i){let{override:a,withBackup:o}=i||{};for(let r of n){let s=Ze.default.join(e,r),p=Ze.default.join(t,r);if(ye.default.existsSync(s)){o&&kf(p);try{a&&ye.default.existsSync(p)&&Ce.default.rmSync(p,{recursive:!0,force:!0}),Ce.default.renameSync(s,p),U(`moved: ${s} to ${p}`),o&&Ff(p)}catch(l){o&&(Af(p),console.log("Backup has been restored.")),K(Pt,l)}}}}function os(e){for(let t of e)if(t)try{ye.default.existsSync(t)&&(Ce.default.rmSync(t,{recursive:!0,force:!0}),U(`removed directory: ${t}`))}catch(n){K(Pt,n)}}function Af(e,t="-BACKUP"){let n=e+t;try{Ce.default.renameSync(n,e),console.log(`Backup ${n} has been restored`)}catch(i){throw console.log(i),new Error(`Error while delete ${n} backup`)}}function Ff(e,t="-BACKUP"){let n=e+t;if(ye.default.existsSync(n))try{Ce.default.rmSync(n,{recursive:!0,force:!0}),console.log(`Backup ${n} has been deleted`)}catch(i){throw console.log(i),new Error(`Error while delete ${n} backup`)}}function kf(e,t="-BACKUP"){let n=e+t;if(ye.default.existsSync(e)){if(ye.default.existsSync(n)){console.log(`Destination ${n} already exists`);return}try{Ce.default.renameSync(e,n),console.log(`Backup of ${e} has been created in ${n}`)}catch(i){console.log(`Error while coping ${e} to ${n} backup`),K(Pt,i)}}}async function jf(){let{__cx:e}=N_.paths(),t=Ze.default.join(e,"store");try{let n=ko(t);for(let i of n)Ze.default.basename(i).startsWith("-")&&Ce.default.unlinkSync(i)}catch{console.info("`store` folder does not exist. Skipping multipage or static list template cleaning.")}}var ga=R(require("node:fs")),ba=R(require("node:path"));Ve();at();var rs=V();function Lf(){let{__cx:e}=rs.paths(),t=ba.default.join(e,".render-sentinel");ga.default.writeFileSync(t,new Date().toISOString())}function Nf(){let{__cx:e}=rs.paths(),t=ba.default.join(e,".render-sentinel");ga.default.unlinkSync(t)}function qf(){let{__cx:e}=rs.paths(),t=ba.default.join(e,".render-sentinel");ga.default.existsSync(t)||K(hl)}var q_=V();async function U_(){qp();let e=await Tf();for(let t of e)await B_(t);if(O.GRIDDO_ALERT_FEATURE){let t=ni.get("API_RESPONSE_TOO_BIG");if(t.entries.length<1)return;_i(`
|
|
73
|
+
`),console.log(p),console.log(),r++}r===s&&K(ul(s,e))}async function rm(e){await Jd(),await Yd(),await Kd.writeFiles(e)}function sm(){let{__cx:e}=am.paths(),t=Mt.default.join(e,"store"),a=Ze.default.readdirSync(t).filter(o=>o!=="metadata").map(o=>Mt.default.join(t,o));for(let o of a)Ze.default.rmSync(o,{recursive:!0,force:!0})}cm.default.config();var Fe=process.env.GRIDDO_API_URL||process.env.API_URL,fa=process.env.GRIDDO_PUBLIC_API_URL||process.env.PUBLIC_API_URL,pm=process.env.botEmail,lm=process.env.botPassword,um=Number.parseInt(process.env.GRIDDO_API_CONCURRENCY_COUNT||"10"),dm=Me(process.env.GRIDDO_RENDER_ALL_SITES||process.env.updateAllSites),mm=Number.parseInt(process.env.GRIDDO_RENDER_SITE||""),fm=(process.env.GRIDDO_RENDER_PAGES||"").split(",").map(e=>Number.parseInt(e)).filter(Boolean),hm=Me(process.env.GRIDDO_SKIP_BUILD_CHECKS),xm=Me(process.env.GRIDDO_DEBUG_LOGS),vm=Me(process.env.GRIDDO_BUILD_LOGS),gm=Me(process.env.GRIDDO_RENDER_BREAKPOINTS_FEATURE),bm=Me(process.env.GRIDDO_SSG_VERBOSE_LOGS),ym=Me(process.env.GRIDGRIDDO_SEARCH_FEATURE_FEATURE),wm=process.env.GRIDDO_ASSET_PREFIX||process.env.ASSET_PREFIX,_m=process.env.GRIDDO_REACT_APP_INSTANCE||process.env.REACT_APP_INSTANCE,Sm=Me(process.env.GRIDDO_AI_EMBEDDINGS),Em=Me(process.env.GRIDDO_VERBOSE_LOGS),Dm=Me(process.env.GRIDDO_ALERT_FEATURE),Rm=Number.parseInt(process.env.GRIDDO_API_MAX_RESPONSE_SIZE||"81920"),Om=Number.parseInt(process.env.GRIDDO_SSG_MAX_PAGE_SIZE||"524288"),Cm=Number.parseInt(process.env.GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS||"1"),Tm=Number.parseInt(process.env.GRIDDO_CLOSE_LIFECYCLE_MAX_ATTEMPTS||"1"),Im=Number.parseInt(process.env.GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS||"1"),Pm=Number.parseInt(process.env.GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS||"1"),Am=Number.parseInt(process.env.GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS||"1"),Fm=Number.parseInt(process.env.GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS||"2"),km=Number.parseInt(process.env.GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS||"1"),jm=Number.parseInt(process.env.GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS||"4"),Lm=Number.parseInt(process.env.GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS||"1"),Nm=process.env.GRIDDO_CX_FIXTURES_DOMAIN_NAMES,qm=process.env.GRIDDO_CX_FIXTURES_SITE_NAMES;var _t=`${Fe}/site/`,Um=`${Fe}/ai/embeddings`,Bm=`${fa}/alert`,Mm=`${Fe}/domains`,$m=`${Fe}/sites/all`,Gm=`${Fe}/page`,zm=`${Fe}/login_check`,Xm=`${Fe}/debug/reset-render`,Hm=`${Fe}/domains/robots`,Wm=`${Fe}/search`,Vm=`${Fe}/settings`,Jm=[_t,"/build/end"],Ym=[_t,"/build/start"],Km=[_t,"/pages?pagination=false"],Qm=[_t,"/distributor"],Zm=[_t,"/sitemap"],ef=[_t,"/all"],tf=[_t,"/languages"],nf=[_t,"/socials"];var ee={ALERT:Bm,AI_EMBEDDINGS:Um,BUILD_END:Jm,BUILD_START:Ym,DOMAINS:Mm,GET_ALL:$m,GET_PAGE:Gm,GET_PAGES:Km,GET_REFERENCE_FIELD_DATA:Qm,GET_SITEMAP:Zm,INFO:ef,LANGUAGES:tf,LOGIN:zm,RESET_RENDER:Xm,ROBOTS:Hm,SEARCH:Wm,SETTINGS:Vm,SOCIALS:nf},O={GRIDDO_AI_EMBEDDINGS:Sm,GRIDDO_ALERT_FEATURE:Dm,GRIDDO_API_CONCURRENCY_COUNT:um,GRIDDO_API_MAX_RESPONSE_SIZE:Rm,GRIDDO_API_URL:Fe,GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS:Lm,GRIDDO_ASSET_PREFIX:wm,GRIDDO_BOT_PASSWORD:lm,GRIDDO_BOT_USER:pm,GRIDDO_BUILD_LOGS:vm,GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS:Cm,GRIDDO_CLOSE_LIFECYCLE_MAX_ATTEMPTS:Tm,GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS:Am,GRIDDO_DEBUG_LOGS:xm,GRIDDO_FIXTURES_DOMAIN_NAMES:Nm,GRIDDO_FIXTURES_SITE_NAMES:qm,GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS:jm,GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS:Im,GRIDDO_PUBLIC_API_URL:fa,GRIDDO_REACT_APP_INSTANCE:_m,GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS:km,GRIDDO_RENDER_ALL_SITES:dm,GRIDDO_RENDER_BREAKPOINTS_FEATURE:gm,GRIDDO_RENDER_PAGES:fm,GRIDDO_RENDER_SITE:mm,GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS:Pm,GRIDDO_SEARCH_FEATURE:ym,GRIDDO_SKIP_BUILD_CHECKS:hm,GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS:Fm,GRIDDO_SSG_MAX_PAGE_SIZE:Om,GRIDDO_SSG_VERBOSE_LOGS:bm,GRIDDO_VERBOSE_LOGS:Em};Je();at();of.default.config();var rf=V();function sf(e){let{proDomain:t}=V();if(!O.GRIDDO_ASSET_PREFIX||!e||!e.startsWith(t))return"";let n=`${O.GRIDDO_ASSET_PREFIX}/${e}`;return U(`Reading process.env.GRIDDO_ASSET_PREFIX, ${O.GRIDDO_ASSET_PREFIX}`),U(`Setting the asset prefix with the domain concatenated, ${n}`),n}function cf(e){U(`read assetPrefixWithDomain, ${e}`),U(`using this NODE_OPTIONS in gatsby command: ${process.env.NODE_OPTIONS}`);let{__ssg:t}=rf.paths(),n=process.env.NODE_OPTIONS?process.env.NODE_OPTIONS.replace(/--openssl-legacy-provider\s*/g,"").trim():"",i=(0,af.spawnSync)("yarn",["gatsby-build",O.GRIDDO_SSG_VERBOSE_LOGS?"--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,NODE_OPTIONS:n})});i.status!==0&&K(ll(i))}async function pf(e,t){let{__cx:n,__ssg:i}=rf.paths(e),a=ct.default.join(n,"dist"),o=ct.default.join(n,"assets"),r=ct.default.join(n,"dist",e),s=ct.default.join(i,"public"),p=Ge.default.readdirSync(s).filter(x=>ct.default.extname(x)===".js"||ct.default.extname(x)===".json"||ct.default.extname(x)===".css"),l=`${s}/page-data`,c=`${o}/page-data`,u=ct.default.join(i,"static"),f=o,h=`${a}/static`,m=`${o}/static`;try{Ge.default.mkdirSync(o,{recursive:!0}),Ge.default.copySync(s,a,{preserveTimestamps:!0}),t&&(Ge.default.copySync(l,c,{preserveTimestamps:!0}),Ge.default.existsSync(u)&&Ge.default.copySync(u,f,{overwrite:!1,preserveTimestamps:!0}),Ge.default.copySync(h,m,{overwrite:!1,preserveTimestamps:!0}),Ge.default.existsSync(u)&&Ge.default.copySync(u,r,{overwrite:!1,preserveTimestamps:!0}),p.map(async x=>{let v=`${s}/${x}`,b=`${o}/${x}`;Ge.default.copySync(v,b,{preserveTimestamps:!0})}))}catch(x){console.error(x)}}var $t=R(require("node:path"));function E_(e){let{__cx:t,__exports:n,__cache:i}=e;return{initials:[n,i,$t.default.join(t,"store"),$t.default.join(t,"apiCache")],disposables:[$t.default.join(t,"store"),$t.default.join(t,"apiCache"),$t.default.join(t,"render-metadata.json"),$t.default.join(t,"dist")],cacheables:["apiCache","store"],archivables:["dist","assets"]}}var ha=E_;var xa=R(require("node:path"));function D_(e){let{__ssg:t}=e;return{disposables:[xa.default.join(t,"public"),xa.default.join(t,"static"),xa.default.join(t,".cache")],cacheables:[".cache"],initials:[],archivables:[]}}var lf=D_;function uf(e,t){let{cxPaths:n}=t,i={gatsby:lf(n)};return{cx:ha(n),[e]:i[e],all:{initials:[...ha(n).initials,...i[e].initials],disposables:[...ha(n).disposables,...i[e].disposables]}}}async function df({area:e,description:t,fullData:n,instantNotification:i=!1,level:a}){let o=ee.ALERT,r={level:a,area:e,description:t,fullData:n,instantNotification:i};try{await xn.post(o,r,{headers:{"Content-Type":"application/json",Connection:"close"}})}catch(s){console.error("Error creating Griddo alert:",s)}}var Ef=R(require("node:fs")),ns=R(require("node:path")),Df=R(za());var va=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(){let n=[...this.navigations.footers].filter(a=>a.setAsDefault),i={};for(let a of n)i[a.language]=a;return i}getDefaultHeaders(){let n=[...this.navigations.headers].filter(a=>a.setAsDefault),i={};for(let a of n)i[a.language]=a;return i}getRightLanguage(t,n,i){if(!t||!n)return null;let o=t.find(r=>r.language===i&&r.navigationLanguages?.find(s=>s.navigationId===n))||t.find(r=>r.id===n);return o?{...o}:null}getPageHeader(t,n){return this.getRightLanguage(this.navigations.headers,t,n)}getPageFooter(t,n){return this.getRightLanguage(this.navigations.footers,t,n)}getPageNavigations(t){let{header:n,footer:i,language:a,template:{templateType:o},templateConfig:{defaultHeader:r,defaultFooter:s,templates:p}}=t,l=m=>{let x=m.find(v=>typeof v=="number");return typeof x=="number"?x:null},c=l([n,p?.[o]?.defaultHeader,r]),u=l([i,p?.[o]?.defaultFooter,s]),f=c?this.getPageHeader(c,a):c===0?null:this._defaultHeaders[a],h=u?this.getPageFooter(u,a):u===0?null:this._defaultFooters[a];return{header:f,footer:h}}};function R_(e,t){let{order:n,sources:i,quantity:a,mode:o,fixed:r,fullRelations:s=!1,allLanguages:p=!1,preferenceLanguage:l=!1,referenceId:c,fields:u}=e;return o==="auto"?{mode:o,order:n,sources:i,quantity:a,fullRelations:s,allLanguages:p,preferenceLanguage:l,fields:u}:o==="manual"?{mode:o,fixed:r,fullRelations:s,fields:u}:o==="navigation"?{mode:o,order:n,quantity:a,fullRelations:s,referenceId:c||t?.structuredDataContent?.id,fields:u}:(console.log(`Error: ReferenceField mode: ${o} is not recognized on page ${t?.id}.`),e)}async function O_(e){let{page:t,component:{data:n},cacheKey:i}=e;if(!n)return Qt(`Error: Page ${t.id} has \`hasDistributorData: true\` or \`getStaticData: true\` but it doesn't have a \`data\` property.`,"No `data` in `ReferenceField`"),[];if(Array.isArray(n.sources)&&n.sources.length<1)return Qt(`Warning: Page with id: ${t.id} has a ReferenceField with empty \`data.sources\``,"Empty data.sources in ReferenceField"),[];let{site:a,lang:o}=n;!n.sources&&n.mode==="auto"&&Qt(`Warning: Page with id: ${t.id} has a ReferenceField with \`undefined\` \`data.sources\``,"undefined data.sources in ReferenceField");let r=R_(n,t);return await $d(t,r,i,a,o)}async function mf({page:e,cacheKey:t=""}){try{let{template:n}=e,i=async(r,s=1)=>{if(!(!r||typeof r!="object"||!(JSON.stringify(r).includes('"hasDistributorData":true')||JSON.stringify(r).includes('"getStaticData":true'))))for(let l in r){if(l==="queriedItems")continue;let u=r[l];if(!u||typeof u!="object")continue;(u.hasDistributorData||u.getStaticData)&&(u.queriedItems=await O_({page:e,cacheKey:t,component:u})),await i(u,s+1)}};return await(async r=>(await i([r]),r))(n)}catch(n){console.error(`Error in getReferenceFieldData ${n}`),process.exit(1)}}async function ff(){return await Oe({endpoint:ee.SETTINGS})}var vf=R(En());function Zr(e,t,n,i="jpg"){let a=typeof e=="string"?e:e?.url;return a?a.split("/")[2].includes("cloudinary.com")?T_(a,`c_fill,w_${t},h_${n}`):C_(a,`f/${i}/w/${t}/h/${n}`):null}function C_(e,t){let n=e.split("/"),i=n.slice(0,-1).join("/"),a=n.slice(-1)[0];return`${i}/${t}/${a}`}function T_(e,t){let n=e.replace("https://",""),i=n.split("/").slice(0,4).join("/"),a=n.replace(i,"");return`https://${i}/${t}${a}`}vf.default.config();var I_=25;function P_({socialTitle:e,socialDescription:t,socialImage:n}){return{type:"website",title:e,description:t,image:n?Zr(n,1280,768):"",twitterImage:n?Zr(n,1280,768):""}}function A_(e){let{title:t,metaTitle:n,metaDescription:i,canonicalURL:a,locale:o,url:r,isIndexed:s,follow:p,metasAdvanced:l,pageLanguages:c,fullUrl:u,metaKeywords:f}=e,h=l?.split(",").filter(Boolean).map(m=>m.trim().toLowerCase())||[];return{title:(n||t||"").trim(),description:i,canonical:a?.trim()&&a!==u?a.trim():s?u:void 0,locale:o,url:r,index:s?"index":"noindex",follow:p?"follow":"nofollow",translate:h.includes("notranslate")?"notranslate":"",metasAdvanced:h.filter(m=>m!=="notranslate").join(),pageLanguages:c,metaKeywords:f?.filter(Boolean).map(m=>m.replace(/"/g,"'")).join(", ")}}async function ts(e,t){let{id:n,title:i,fullPath:a,language:o,breadcrumb:r,socialDescription:s,socialImage:p,socialTitle:l}=e,{baseUrl:c,cloudinaryName:u,griddoVersion:f,siteLangs:h,siteMetadata:m,siteOptions:x,siteScript:v,siteSlug:b,socials:E,theme:_,navigations:{header:T,footer:P}}=t;e.breadcrumb=r,e.siteSlug=b,e.apiUrl=c,e.publicApiUrl=t.publicBaseUrl,e.instance=t.instance;let ne=h.find(({id:X})=>X===e?.language)?.locale.replace(/_/g,"-"),Q=A_(e),D=P_({socialDescription:s,socialImage:p,socialTitle:l}),A=a.compose,F=new Date().toString();return{path:A,size:void 0,context:{id:n,title:i,fullPath:a,locale:ne,languageId:o,theme:_,siteMetadata:m,pageMetadata:Q,openGraph:D,socials:E,siteLangs:h,cloudinaryName:u,siteOptions:x,griddoVersion:f,renderDate:F,siteScript:v,header:T,footer:P,page:e}}}async function gf(e,t){return await ts(e,t)}async function bf({page:e,pages:t,isRoot:n=!1,defaultLang:i,template:a,totalQueriedItems:o},r){let s=t.map(async(p,l)=>{let c=l===0,u=l+1,{domainUrl:f,compose:h}=e.fullPath,m={...e,id:Number.parseInt(`-${e.id}${l}`),fullPath:{...e.fullPath,compose:es(h,u,{addEndingSlash:!0})},fullUrl:es(e.fullUrl,u,{addEndingSlash:!0}),slug:es(e.slug,u),title:xf(e.title,u),metaTitle:xf(e.metaTitle||"",u),disableHrefLangs:u>1,template:{...a,isFirstPage:c,pageNumber:u,totalPages:t.length,baseLink:`${f}${h}`,queriedItems:p,totalQueriedItems:o?.length},isRoot:n,defaultLang:i};return await ts(m,r)});return Promise.all(s)}function yf(e,t){let{multiPageElements:n,...i}=e,a=JSON.parse(JSON.stringify(n));a.find(({sectionSlug:r})=>r==="/")||a.push({});let o=a.map(async(r,s)=>{let p=JSON.parse(JSON.stringify(i)),{sectionSlug:l="/",title:c="",metaTitle:u="",metaDescription:f=""}=r,h=typeof c=="string"?c:c.content,m=p.fullPath.compose||"",x=p.fullUrl.endsWith("/")?p.fullUrl.slice(0,-1):p.fullUrl,v=l?.replace(/\//g,""),E=l==="/"?v:`${v}/`,_=m.endsWith("/")?"":"/",T=`${m}${_}${E}`;return h.trim()&&(p.title=h),f.trim()&&(p.metaDescription=f),p.id=Number.parseInt(`-${p.id}${s}`),p.fullUrl=`${x}/${E}`,p.fullPath.compose=T,p.slug=T,p.template.activeSectionSlug=l,p.template.activeSectionBase=x,p.metaTitle=u.trim()||h.trim()||p.metaTitle,await ts(p,t)});return Promise.all(o)}function wf(e){return new Promise(n=>{let i=(a,o=0)=>{if(!(!a||typeof a!="object")){for(let r in a){let s=a[r],p=s||typeof s=="object",l=JSON.stringify(s).includes('"hasGriddoMultiPage":true');if(!p||!l)continue;let{component:c,hasGriddoMultiPage:u,elements:f}=s;c&&u&&n(f||[]),i(s,o+1)}o||n(null)}};i([e])})}function F_(e,t,n){return t?.slice(e*(n-1),e*n)}function k_(e,t){let n=Math.ceil(t.length/e)||1;return Array.from({length:n},(a,o)=>o+1)?.map(a=>F_(e,t,a))}function _f(e){let t=e.queriedItems||[],n=e?.itemsPerPage||I_;return k_(n,t)}function hf(e){return e.replace(/\/+$/,"/")}function es(e,t,n){let i=e.endsWith("/")?"":"/",a=n?.addEndingSlash?"/":"";return t<=1?hf(`${e}${a}`):hf(`${e}${i}${t}${a}`)}function xf(e,t){return!e||t<=1?e:`${e} - ${t}`}var Sf=V(),j_=new Date().valueOf().toString();async function Rf(e){vl(),console.info(`API calls with ${O.GRIDDO_API_CONCURRENCY_COUNT} threads`);let{__cx:t}=Sf.paths(),{griddoVersion:n}=Sf,i=ns.default.join(t,"store");try{let a=[],o={},{sitesToPublish:r,sitesToUnpublish:s}=await Hd(e),p=r.length>0||s.length>0;p||console.warn(`There are no sites to update in the domain ${e}`),Ya("Sites to publish:",r),Ya("Sites to unpublish:",s),await Wd(s);for(let l of r){let{id:c,slug:u,theme:f,favicon:h,changedPages:m=[]}=l,{siteInfo:x,validPagesIds:v,siteHash:b,unpublishHashes:E,siteLangs:_,defaultLang:T,headers:P,footers:z,socials:ne}=await Vd(c),{cloudinaryName:Q,useMetaTitle:D,useMetaKeywords:A,showBasicMetaRobots:F,avoidHrefLangsOnCanonicals:M,avoidSelfReferenceCanonicals:X,avoidHrefLangXDefault:k,avoidDebugMetas:L}=await ff();o[c]={siteHash:b,unpublishHashes:E,publishHashes:[]};let N=new va;N.navigations={headers:P,footers:z},l.languages=_;let w=jd(c,b),S=x.siteScript,C={siteUrl:x.slug,title:x.name,favicon:h},ze={baseUrl:O.GRIDDO_API_URL,publicBaseUrl:O.GRIDDO_PUBLIC_API_URL,instance:O.GRIDDO_REACT_APP_INSTANCE,siteSlug:u,theme:f,siteMetadata:C,socials:ne,siteLangs:_,cloudinaryName:Q,griddoVersion:n,siteOptions:{useMetaTitle:D,useMetaKeywords:A,showBasicMetaRobots:F,avoidHrefLangsOnCanonicals:M,avoidSelfReferenceCanonicals:X,avoidHrefLangXDefault:k,avoidDebugMetas:L},siteScript:S};Ot(`${l.name} site`),Ef.default.mkdirSync(ns.default.join(i,c.toString()),{recursive:!0});let ie=async(St,re)=>{let ai=[],He=await Ud(re,w);if(!He)return;a.push(re);let oi=JSON.parse(JSON.stringify(ze));oi.navigations=N.getPageNavigations(He);let zt=await mf({page:He,cacheKey:j_}),cs=await wf(zt),wa=He?.mode==="list"||He?.mode==="paginated-data",ps=!wa&&cs,Uf=!ps&&!wa;if(wa){let We={page:He,pages:_f(zt),isRoot:!1,defaultLang:T,template:zt,totalQueriedItems:zt.queriedItems};ai=await bf(We,oi)}if(ps){let We=He;We.template=zt,We.multiPageElements=cs,We.defaultLang=T,ai=await yf(We,oi)}if(Uf){let We=He;We.template=zt,We.defaultLang=T,ai=[await gf(We,oi)]}He.hash!==null&&o[c].publishHashes.push(He.hash),gl(St,ai)},{pagesMissingInStore:Xe,pagesToDeleteFromStore:Gt,pagesToWriteToStore:Te}=await yl({sitesToPublish:r,validPagesIds:v,changedPages:m,siteDirName:c.toString()});bl(c.toString(),Gt);let we=(0,Df.default)(O.GRIDDO_API_CONCURRENCY_COUNT),ii=Te.map(St=>we(()=>ie(c.toString(),St)));U(`Store site: ${l.name}`),U(`${v.length} valid pages from API`),U(`changed ${m.length} pages from API`),U(`deleted ${Gt.length} pages from store`),U(`missing ${Xe.length} pages in store`),U(`write ${Te.length} pages to store`),await Promise.all(ii)}p?Fo({buildProcessData:o,createdPages:a,sitesToPublish:r}):(sm(),Fo({buildProcessData:o,createdPages:[],sitesToPublish:[]}))}catch(a){console.error(a.message),process.exit(1)}}async function Of(e){Pd(),await Rf(e),om()}Je();at();async function Cf(){return await Oe({endpoint:ee.DOMAINS})}async function Tf(){await ot.login();let e=await Cf();return e.length||K(ml),U(`getting domains names (${e.length})`),L_(e)}function L_(e){let t=e.filter(({slug:n})=>!!n).map(({slug:n})=>n.replace("/",""));return[...new Set(t)]}var Ce=R(require("node:fs")),et=R(require("node:path")),ye=R(Rt());Je();at();var N_=V(),is=e=>{if(!ye.default.statSync(e).isDirectory())return;let n=ye.default.readdirSync(e);if(n.length>0){let a=n.length,o=n.filter(r=>et.default.extname(r).toLowerCase()===".xml").length;if(a===o){for(let r of n){let s=et.default.join(e,r);ye.default.rmSync(s)}n=ye.default.readdirSync(e)}for(let r of n){let s=et.default.join(e,r);is(s)}n=ye.default.readdirSync(e)}if(n.length===0){ye.default.rmdirSync(e);return}};function If(e,t){for(let n of e)try{Ce.default.existsSync(n)||(Ce.default.mkdirSync(n,{recursive:!0,...t}),U(`create directory: ${n}`))}catch(i){K(Pt,i)}}function Pf(e,t){try{Ce.default.existsSync(e)&&(Ce.default.renameSync(e,t),U(`rename ${e} to ${t}`))}catch(n){K(Pt,n)}}function as(e,t,n,i={withBackup:!1}){let{withBackup:a}=i;for(let o of n){let r=et.default.join(e,o),s=et.default.join(t,o);if(!ye.default.existsSync(r)){console.log(`(Maybe first render) Source directory does not exist: ${r}`);continue}a&&(kf(s),U(`create backup: ${s}`));try{ye.default.existsSync(s)&&(Ce.default.rmSync(s,{recursive:!0,force:!0}),U(`clean destination: ${s}`)),Ce.default.cpSync(r,s,{recursive:!0,preserveTimestamps:!0}),U(`copy: ${r} to ${s}`),a&&(Ff(s),U(`delete backup: ${s}`))}catch(p){a&&(Af(s),console.log("Backup has been restored.")),K(Pt,p)}}}function _n(e,t,n,i){let{override:a,withBackup:o}=i||{};for(let r of n){let s=et.default.join(e,r),p=et.default.join(t,r);if(ye.default.existsSync(s)){o&&kf(p);try{a&&ye.default.existsSync(p)&&Ce.default.rmSync(p,{recursive:!0,force:!0}),Ce.default.renameSync(s,p),U(`moved: ${s} to ${p}`),o&&Ff(p)}catch(l){o&&(Af(p),console.log("Backup has been restored.")),K(Pt,l)}}}}function os(e){for(let t of e)if(t)try{ye.default.existsSync(t)&&(Ce.default.rmSync(t,{recursive:!0,force:!0}),U(`removed directory: ${t}`))}catch(n){K(Pt,n)}}function Af(e,t="-BACKUP"){let n=e+t;try{Ce.default.renameSync(n,e),console.log(`Backup ${n} has been restored`)}catch(i){throw console.log(i),new Error(`Error while delete ${n} backup`)}}function Ff(e,t="-BACKUP"){let n=e+t;if(ye.default.existsSync(n))try{Ce.default.rmSync(n,{recursive:!0,force:!0}),console.log(`Backup ${n} has been deleted`)}catch(i){throw console.log(i),new Error(`Error while delete ${n} backup`)}}function kf(e,t="-BACKUP"){let n=e+t;if(ye.default.existsSync(e)){if(ye.default.existsSync(n)){console.log(`Destination ${n} already exists`);return}try{Ce.default.renameSync(e,n),console.log(`Backup of ${e} has been created in ${n}`)}catch(i){console.log(`Error while coping ${e} to ${n} backup`),K(Pt,i)}}}async function jf(){let{__cx:e}=N_.paths(),t=et.default.join(e,"store");try{let n=ko(t);for(let i of n)et.default.basename(i).startsWith("-")&&Ce.default.unlinkSync(i)}catch{console.info("`store` folder does not exist. Skipping multipage or static list template cleaning.")}}var ga=R(require("node:fs")),ba=R(require("node:path"));Je();at();var rs=V();function Lf(){let{__cx:e}=rs.paths(),t=ba.default.join(e,".render-sentinel");ga.default.writeFileSync(t,new Date().toISOString())}function Nf(){let{__cx:e}=rs.paths(),t=ba.default.join(e,".render-sentinel");ga.default.unlinkSync(t)}function qf(){let{__cx:e}=rs.paths(),t=ba.default.join(e,".render-sentinel");ga.default.existsSync(t)||K(hl)}var q_=V();async function U_(){qp();let e=await Tf();for(let t of e)await B_(t);if(O.GRIDDO_ALERT_FEATURE){let t=ni.get("API_RESPONSE_TOO_BIG");if(t.entries.length<1)return;_i(`
|
|
74
74
|
Render register report
|
|
75
|
-
`),_i(t),_i(),df({description:`API response size is too large (${O.GRIDDO_API_MAX_RESPONSE_SIZE}KB).`,area:"Griddo",level:"W",fullData:{output:t,date:new Date().toISOString()}})}}async function B_(e){Zt(`Initializing render for the domain ${e}`),Lf();let t=q_.paths(e),{all:n,gatsby:i,cx:a}=uf("gatsby",{cxPaths:t}),{__ssg:o,__exports:r,__cache:s,__cx:p,__components:l}=t,c=sf(e),u=!!c&&c!=="";await $e("Clean",{steps:[()=>os(n.disposables)]}),await $e("Prepare",{steps:[()=>If(n.initials)]}),await $e("Restore",{steps:[()=>as(l,o,["static"]),()=>as(r,p,a.archivables),()=>Pf(ya.default.join(p,"dist"),ya.default.join(o,"public")),()=>_n(s,p,a.cacheables),()=>_n(s,o,i.cacheables)]}),await $e("Data",{steps:[()=>Of(e)]}),await $e("SSG",{steps:[()=>cf(c)]}),await $e("Relocation",{steps:[()=>pf(e,u)]}),await $e("Meta",{steps:[()=>rm(e)]}),await $e("Archive",{steps:[()=>jf(),()=>is(ya.default.join(p,"dist")),()=>_n(p,r,a.archivables,{withBackup:!0}),()=>_n(p,s,a.cacheables),()=>_n(o,s,i.cacheables)]}),await $e("Close",{steps:[()=>os(n.disposables)]}),await $e("HealthCheck",{steps:[()=>qf()]}),Nf()}var ss=U_;
|
|
75
|
+
`),_i(t),_i(),df({description:`API response size is too large (${O.GRIDDO_API_MAX_RESPONSE_SIZE}KB).`,area:"Griddo",level:"W",fullData:{output:t,date:new Date().toISOString()}})}}async function B_(e){Zt(`Initializing render for the domain ${e}`),Lf();let t=q_.paths(e),{all:n,gatsby:i,cx:a}=uf("gatsby",{cxPaths:t}),{__ssg:o,__exports:r,__cache:s,__cx:p,__components:l}=t,c=sf(e),u=!!c&&c!=="";await $e("Clean",{steps:[()=>os(n.disposables)]}),await $e("Prepare",{steps:[()=>If(n.initials)]}),await $e("Restore",{steps:[()=>as(l,o,["static"]),()=>as(r,p,a.archivables),()=>Pf(ya.default.join(p,"dist"),ya.default.join(o,"public")),()=>_n(s,p,a.cacheables),()=>_n(s,o,i.cacheables)]}),await $e("Data",{steps:[()=>Of(e)]}),await $e("SSG",{steps:[()=>cf(c)]}),await $e("Relocation",{steps:[()=>pf(e,u)]}),await $e("Meta",{steps:[()=>rm(e)]}),await $e("Archive",{steps:[()=>jf(),()=>is(ya.default.join(p,"dist")),()=>_n(p,r,a.archivables,{withBackup:!0}),()=>_n(p,s,a.cacheables),()=>_n(o,s,i.cacheables)]}),await $e("Close",{steps:[()=>os(n.disposables)]}),await $e("HealthCheck",{steps:[()=>qf()]}),Nf()}var ss=U_;Je();async function M_(){try{let e=await Qr([()=>ss()]);Zt(`All domains rendered in ${e}s.`),process.exit(0)}catch(e){e instanceof An&&(console.log(),console.log(Y.black().bgRed(" GRIDDO InternalCXError ")),console.log(),process.exit(1)),console.log(),console.log(Y.black().bgRed(" GRIDDO UnknownError ")),console.log(),console.log(e),console.log(),process.exit(1)}}0&&(module.exports={startRender});
|
|
76
76
|
/*! Bundled license information:
|
|
77
77
|
|
|
78
78
|
mime-db/index.js:
|