@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/index.js
CHANGED
|
@@ -5,7 +5,7 @@ GFS4: `),console.error(e)});W[me]||(Ps=global[me]||[],As(W,Ps),W.close=function(
|
|
|
5
5
|
|
|
6
6
|
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:i,destStat:a}=await Pn.checkPaths(e,t,"copy",n);if(await Pn.checkParentPaths(e,i,t,"copy"),!await Js(e,t,n))return;let r=Tn.dirname(t);await Mh(r)||await Bh(r),await Ys(a,e,t,n)}async function Js(e,t,n){return n.filter?n.filter(e,t):!0}async function Ys(e,t,n,i){let o=await(i.dereference?xe.stat:xe.lstat)(t);if(o.isDirectory())return Wh(o,e,t,n,i);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return zh(o,e,t,n,i);if(o.isSymbolicLink())return Vh(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 zh(e,t,n,i,a){if(!t)return Vs(e,n,i,a);if(a.overwrite)return await xe.unlink(i),Vs(e,n,i,a);if(a.errorOnExist)throw new Error(`'${i}' already exists`)}async function Vs(e,t,n,i){if(await xe.copyFile(t,n),i.preserveTimestamps){Xh(e.mode)&&await Hh(n,e.mode);let a=await xe.stat(t);await $h(n,a.atime,a.mtime)}return xe.chmod(n,e.mode)}function Xh(e){return(e&128)===0}function Hh(e,t){return xe.chmod(e,t|128)}async function Wh(e,t,n,i,a){t||await xe.mkdir(i);let o=await xe.readdir(n);await Promise.all(o.map(async r=>{let s=Tn.join(n,r),p=Tn.join(i,r);if(!await Js(s,p,a))return;let{destStat:c}=await Pn.checkPaths(s,p,"copy",a);return Ys(c,s,p,a)})),t||await xe.chmod(i,e.mode)}async function Vh(e,t,n,i){let a=await xe.readlink(t);if(i.dereference&&(a=Tn.resolve(process.cwd(),a)),!e)return xe.symlink(a,n);let o=null;try{o=await xe.readlink(n)}catch(r){if(r.code==="EINVAL"||r.code==="UNKNOWN")return xe.symlink(a,n);throw r}if(i.dereference&&(o=Tn.resolve(process.cwd(),o)),Pn.isSrcSubdir(a,o))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${o}'.`);if(Pn.isSrcSubdir(o,a))throw new Error(`Cannot overwrite '${o}' with '${a}'.`);return await xe.unlink(n),xe.symlink(a,n)}Ks.exports=Gh});var ic=g((fS,nc)=>{"use strict";var be=Qt(),In=require("path"),Jh=Le().mkdirsSync,Yh=Ba().utimesMillisSync,An=Ft();function Kh(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;
|
|
7
7
|
|
|
8
|
-
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:i,destStat:a}=An.checkPathsSync(e,t,"copy",n);if(An.checkParentPathsSync(e,i,t,"copy"),n.filter&&!n.filter(e,t))return;let o=In.dirname(t);return be.existsSync(o)||Jh(o),Zs(a,e,t,n)}function Zs(e,t,n,i){let o=(i.dereference?be.statSync:be.lstatSync)(t);if(o.isDirectory())return ax(o,e,t,n,i);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return Qh(o,e,t,n,i);if(o.isSymbolicLink())return sx(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 Qh(e,t,n,i,a){return t?Zh(e,n,i,a):ec(e,n,i,a)}function Zh(e,t,n,i){if(i.overwrite)return be.unlinkSync(n),ec(e,t,n,i);if(i.errorOnExist)throw new Error(`'${n}' already exists`)}function ec(e,t,n,i){return be.copyFileSync(t,n),i.preserveTimestamps&&ex(e.mode,t,n),$a(n,e.mode)}function ex(e,t,n){return tx(e)&&nx(n,e),ix(t,n)}function tx(e){return(e&128)===0}function nx(e,t){return $a(e,t|128)}function $a(e,t){return be.chmodSync(e,t)}function ix(e,t){let n=be.statSync(e);return Yh(t,n.atime,n.mtime)}function ax(e,t,n,i,a){return t?tc(n,i,a):ox(e.mode,n,i,a)}function ox(e,t,n,i){return be.mkdirSync(n),tc(t,n,i),$a(n,e)}function tc(e,t,n){be.readdirSync(e).forEach(i=>rx(i,e,t,n))}function rx(e,t,n,i){let a=In.join(t,e),o=In.join(n,e);if(i.filter&&!i.filter(a,o))return;let{destStat:r}=An.checkPathsSync(a,o,"copy",i);return Zs(r,a,o,i)}function sx(e,t,n,i){let a=be.readlinkSync(t);if(i.dereference&&(a=In.resolve(process.cwd(),a)),e){let o;try{o=be.readlinkSync(n)}catch(r){if(r.code==="EINVAL"||r.code==="UNKNOWN")return be.symlinkSync(a,n);throw r}if(i.dereference&&(o=In.resolve(process.cwd(),o)),An.isSrcSubdir(a,o))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${o}'.`);if(An.isSrcSubdir(o,a))throw new Error(`Cannot overwrite '${o}' with '${a}'.`);return cx(a,n)}else return be.symlinkSync(a,n)}function cx(e,t){return be.unlinkSync(t),be.symlinkSync(e,t)}nc.exports=Kh});var hi=g((hS,ac)=>{"use strict";var px=ce().fromPromise;ac.exports={copy:px(Qs()),copySync:ic()}});var Fn=g((xS,rc)=>{"use strict";var oc=Qt(),lx=ce().fromCallback;function ux(e,t){oc.rm(e,{recursive:!0,force:!0},t)}function dx(e){oc.rmSync(e,{recursive:!0,force:!0})}rc.exports={remove:lx(ux),removeSync:dx}});var fc=g((vS,mc)=>{"use strict";var mx=ce().fromPromise,pc=ge(),lc=require("path"),uc=Le(),dc=Fn(),sc=mx(async function(t){let n;try{n=await pc.readdir(t)}catch{return uc.mkdirs(t)}return Promise.all(n.map(i=>dc.remove(lc.join(t,i))))});function cc(e){let t;try{t=pc.readdirSync(e)}catch{return uc.mkdirsSync(e)}t.forEach(n=>{n=lc.join(e,n),dc.removeSync(n)})}mc.exports={emptyDirSync:cc,emptydirSync:cc,emptyDir:sc,emptydir:sc}});var gc=g((gS,vc)=>{"use strict";var fx=ce().fromPromise,hc=require("path"),it=ge(),xc=Le();async function hx(e){let t;try{t=await it.stat(e)}catch{}if(t&&t.isFile())return;let n=hc.dirname(e),i=null;try{i=await it.stat(n)}catch(a){if(a.code==="ENOENT"){await xc.mkdirs(n),await it.writeFile(e,"");return}else throw a}i.isDirectory()?await it.writeFile(e,""):await it.readdir(n)}function xx(e){let t;try{t=it.statSync(e)}catch{}if(t&&t.isFile())return;let n=hc.dirname(e);try{it.statSync(n).isDirectory()||it.readdirSync(n)}catch(i){if(i&&i.code==="ENOENT")xc.mkdirsSync(n);else throw i}it.writeFileSync(e,"")}vc.exports={createFile:fx(hx),createFileSync:xx}});var Sc=g((bS,_c)=>{"use strict";var vx=ce().fromPromise,bc=require("path"),mt=ge(),yc=Le(),{pathExists:gx}=dt(),{areIdentical:wc}=Ft();async function bx(e,t){let n;try{n=await mt.lstat(t)}catch{}let i;try{i=await mt.lstat(e)}catch(r){throw r.message=r.message.replace("lstat","ensureLink"),r}if(n&&wc(i,n))return;let a=bc.dirname(t);await gx(a)||await yc.mkdirs(a),await mt.link(e,t)}function yx(e,t){let n;try{n=mt.lstatSync(t)}catch{}try{let o=mt.lstatSync(e);if(n&&wc(o,n))return}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let i=bc.dirname(t);return mt.existsSync(i)||yc.mkdirsSync(i),mt.linkSync(e,t)}_c.exports={createLink:vx(bx),createLinkSync:yx}});var Dc=g((yS,Ec)=>{"use strict";var ft=require("path"),kn=ge(),{pathExists:wx}=dt(),_x=ce().fromPromise;async function Sx(e,t){if(ft.isAbsolute(e)){try{await kn.lstat(e)}catch(o){throw o.message=o.message.replace("lstat","ensureSymlink"),o}return{toCwd:e,toDst:e}}let n=ft.dirname(t),i=ft.join(n,e);if(await wx(i))return{toCwd:i,toDst:e};try{await kn.lstat(e)}catch(o){throw o.message=o.message.replace("lstat","ensureSymlink"),o}return{toCwd:e,toDst:ft.relative(n,e)}}function Ex(e,t){if(ft.isAbsolute(e)){if(!kn.existsSync(e))throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}let n=ft.dirname(t),i=ft.join(n,e);if(kn.existsSync(i))return{toCwd:i,toDst:e};if(!kn.existsSync(e))throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:ft.relative(n,e)}}Ec.exports={symlinkPaths:_x(Sx),symlinkPathsSync:Ex}});var Cc=g((wS,Oc)=>{"use strict";var Rc=ge(),Dx=ce().fromPromise;async function Rx(e,t){if(t)return t;let n;try{n=await Rc.lstat(e)}catch{return"file"}return n&&n.isDirectory()?"dir":"file"}function Ox(e,t){if(t)return t;let n;try{n=Rc.lstatSync(e)}catch{return"file"}return n&&n.isDirectory()?"dir":"file"}Oc.exports={symlinkType:Dx(Rx),symlinkTypeSync:Ox}});var Ac=g((_S,Ic)=>{"use strict";var Cx=ce().fromPromise,Tc=require("path"),
|
|
8
|
+
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:i,destStat:a}=An.checkPathsSync(e,t,"copy",n);if(An.checkParentPathsSync(e,i,t,"copy"),n.filter&&!n.filter(e,t))return;let o=In.dirname(t);return be.existsSync(o)||Jh(o),Zs(a,e,t,n)}function Zs(e,t,n,i){let o=(i.dereference?be.statSync:be.lstatSync)(t);if(o.isDirectory())return ax(o,e,t,n,i);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return Qh(o,e,t,n,i);if(o.isSymbolicLink())return sx(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 Qh(e,t,n,i,a){return t?Zh(e,n,i,a):ec(e,n,i,a)}function Zh(e,t,n,i){if(i.overwrite)return be.unlinkSync(n),ec(e,t,n,i);if(i.errorOnExist)throw new Error(`'${n}' already exists`)}function ec(e,t,n,i){return be.copyFileSync(t,n),i.preserveTimestamps&&ex(e.mode,t,n),$a(n,e.mode)}function ex(e,t,n){return tx(e)&&nx(n,e),ix(t,n)}function tx(e){return(e&128)===0}function nx(e,t){return $a(e,t|128)}function $a(e,t){return be.chmodSync(e,t)}function ix(e,t){let n=be.statSync(e);return Yh(t,n.atime,n.mtime)}function ax(e,t,n,i,a){return t?tc(n,i,a):ox(e.mode,n,i,a)}function ox(e,t,n,i){return be.mkdirSync(n),tc(t,n,i),$a(n,e)}function tc(e,t,n){be.readdirSync(e).forEach(i=>rx(i,e,t,n))}function rx(e,t,n,i){let a=In.join(t,e),o=In.join(n,e);if(i.filter&&!i.filter(a,o))return;let{destStat:r}=An.checkPathsSync(a,o,"copy",i);return Zs(r,a,o,i)}function sx(e,t,n,i){let a=be.readlinkSync(t);if(i.dereference&&(a=In.resolve(process.cwd(),a)),e){let o;try{o=be.readlinkSync(n)}catch(r){if(r.code==="EINVAL"||r.code==="UNKNOWN")return be.symlinkSync(a,n);throw r}if(i.dereference&&(o=In.resolve(process.cwd(),o)),An.isSrcSubdir(a,o))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${o}'.`);if(An.isSrcSubdir(o,a))throw new Error(`Cannot overwrite '${o}' with '${a}'.`);return cx(a,n)}else return be.symlinkSync(a,n)}function cx(e,t){return be.unlinkSync(t),be.symlinkSync(e,t)}nc.exports=Kh});var hi=g((hS,ac)=>{"use strict";var px=ce().fromPromise;ac.exports={copy:px(Qs()),copySync:ic()}});var Fn=g((xS,rc)=>{"use strict";var oc=Qt(),lx=ce().fromCallback;function ux(e,t){oc.rm(e,{recursive:!0,force:!0},t)}function dx(e){oc.rmSync(e,{recursive:!0,force:!0})}rc.exports={remove:lx(ux),removeSync:dx}});var fc=g((vS,mc)=>{"use strict";var mx=ce().fromPromise,pc=ge(),lc=require("path"),uc=Le(),dc=Fn(),sc=mx(async function(t){let n;try{n=await pc.readdir(t)}catch{return uc.mkdirs(t)}return Promise.all(n.map(i=>dc.remove(lc.join(t,i))))});function cc(e){let t;try{t=pc.readdirSync(e)}catch{return uc.mkdirsSync(e)}t.forEach(n=>{n=lc.join(e,n),dc.removeSync(n)})}mc.exports={emptyDirSync:cc,emptydirSync:cc,emptyDir:sc,emptydir:sc}});var gc=g((gS,vc)=>{"use strict";var fx=ce().fromPromise,hc=require("path"),it=ge(),xc=Le();async function hx(e){let t;try{t=await it.stat(e)}catch{}if(t&&t.isFile())return;let n=hc.dirname(e),i=null;try{i=await it.stat(n)}catch(a){if(a.code==="ENOENT"){await xc.mkdirs(n),await it.writeFile(e,"");return}else throw a}i.isDirectory()?await it.writeFile(e,""):await it.readdir(n)}function xx(e){let t;try{t=it.statSync(e)}catch{}if(t&&t.isFile())return;let n=hc.dirname(e);try{it.statSync(n).isDirectory()||it.readdirSync(n)}catch(i){if(i&&i.code==="ENOENT")xc.mkdirsSync(n);else throw i}it.writeFileSync(e,"")}vc.exports={createFile:fx(hx),createFileSync:xx}});var Sc=g((bS,_c)=>{"use strict";var vx=ce().fromPromise,bc=require("path"),mt=ge(),yc=Le(),{pathExists:gx}=dt(),{areIdentical:wc}=Ft();async function bx(e,t){let n;try{n=await mt.lstat(t)}catch{}let i;try{i=await mt.lstat(e)}catch(r){throw r.message=r.message.replace("lstat","ensureLink"),r}if(n&&wc(i,n))return;let a=bc.dirname(t);await gx(a)||await yc.mkdirs(a),await mt.link(e,t)}function yx(e,t){let n;try{n=mt.lstatSync(t)}catch{}try{let o=mt.lstatSync(e);if(n&&wc(o,n))return}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let i=bc.dirname(t);return mt.existsSync(i)||yc.mkdirsSync(i),mt.linkSync(e,t)}_c.exports={createLink:vx(bx),createLinkSync:yx}});var Dc=g((yS,Ec)=>{"use strict";var ft=require("path"),kn=ge(),{pathExists:wx}=dt(),_x=ce().fromPromise;async function Sx(e,t){if(ft.isAbsolute(e)){try{await kn.lstat(e)}catch(o){throw o.message=o.message.replace("lstat","ensureSymlink"),o}return{toCwd:e,toDst:e}}let n=ft.dirname(t),i=ft.join(n,e);if(await wx(i))return{toCwd:i,toDst:e};try{await kn.lstat(e)}catch(o){throw o.message=o.message.replace("lstat","ensureSymlink"),o}return{toCwd:e,toDst:ft.relative(n,e)}}function Ex(e,t){if(ft.isAbsolute(e)){if(!kn.existsSync(e))throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}let n=ft.dirname(t),i=ft.join(n,e);if(kn.existsSync(i))return{toCwd:i,toDst:e};if(!kn.existsSync(e))throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:ft.relative(n,e)}}Ec.exports={symlinkPaths:_x(Sx),symlinkPathsSync:Ex}});var Cc=g((wS,Oc)=>{"use strict";var Rc=ge(),Dx=ce().fromPromise;async function Rx(e,t){if(t)return t;let n;try{n=await Rc.lstat(e)}catch{return"file"}return n&&n.isDirectory()?"dir":"file"}function Ox(e,t){if(t)return t;let n;try{n=Rc.lstatSync(e)}catch{return"file"}return n&&n.isDirectory()?"dir":"file"}Oc.exports={symlinkType:Dx(Rx),symlinkTypeSync:Ox}});var Ac=g((_S,Ic)=>{"use strict";var Cx=ce().fromPromise,Tc=require("path"),Je=ge(),{mkdirs:Tx,mkdirsSync:Px}=Le(),{symlinkPaths:Ix,symlinkPathsSync:Ax}=Dc(),{symlinkType:Fx,symlinkTypeSync:kx}=Cc(),{pathExists:jx}=dt(),{areIdentical:Pc}=Ft();async function Lx(e,t,n){let i;try{i=await Je.lstat(t)}catch{}if(i&&i.isSymbolicLink()){let[s,p]=await Promise.all([Je.stat(e),Je.stat(t)]);if(Pc(s,p))return}let a=await Ix(e,t);e=a.toDst;let o=await Fx(a.toCwd,n),r=Tc.dirname(t);return await jx(r)||await Tx(r),Je.symlink(e,t,o)}function Nx(e,t,n){let i;try{i=Je.lstatSync(t)}catch{}if(i&&i.isSymbolicLink()){let s=Je.statSync(e),p=Je.statSync(t);if(Pc(s,p))return}let a=Ax(e,t);e=a.toDst,n=kx(a.toCwd,n);let o=Tc.dirname(t);return Je.existsSync(o)||Px(o),Je.symlinkSync(e,t,n)}Ic.exports={createSymlink:Cx(Lx),createSymlinkSync:Nx}});var Bc=g((SS,Uc)=>{"use strict";var{createFile:Fc,createFileSync:kc}=gc(),{createLink:jc,createLinkSync:Lc}=Sc(),{createSymlink:Nc,createSymlinkSync:qc}=Ac();Uc.exports={createFile:Fc,createFileSync:kc,ensureFile:Fc,ensureFileSync:kc,createLink:jc,createLinkSync:Lc,ensureLink:jc,ensureLinkSync:Lc,createSymlink:Nc,createSymlinkSync:qc,ensureSymlink:Nc,ensureSymlinkSync:qc}});var xi=g((ES,Mc)=>{function qx(e,{EOL:t=`
|
|
9
9
|
`,finalEOL:n=!0,replacer:i=null,spaces:a}={}){let o=n?t:"";return JSON.stringify(e,i,a).replace(/\n/g,t)+o}function Ux(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}Mc.exports={stringify:qx,stripBom:Ux}});var Xc=g((DS,zc)=>{var tn;try{tn=Qt()}catch{tn=require("fs")}var vi=ce(),{stringify:$c,stripBom:Gc}=xi();async function Bx(e,t={}){typeof t=="string"&&(t={encoding:t});let n=t.fs||tn,i="throws"in t?t.throws:!0,a=await vi.fromCallback(n.readFile)(e,t);a=Gc(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 Mx=vi.fromPromise(Bx);function $x(e,t={}){typeof t=="string"&&(t={encoding:t});let n=t.fs||tn,i="throws"in t?t.throws:!0;try{let a=n.readFileSync(e,t);return a=Gc(a),JSON.parse(a,t.reviver)}catch(a){if(i)throw a.message=`${e}: ${a.message}`,a;return null}}async function Gx(e,t,n={}){let i=n.fs||tn,a=$c(t,n);await vi.fromCallback(i.writeFile)(e,a,n)}var zx=vi.fromPromise(Gx);function Xx(e,t,n={}){let i=n.fs||tn,a=$c(t,n);return i.writeFileSync(e,a,n)}var Hx={readFile:Mx,readFileSync:$x,writeFile:zx,writeFileSync:Xx};zc.exports=Hx});var Wc=g((RS,Hc)=>{"use strict";var gi=Xc();Hc.exports={readJson:gi.readFile,readJsonSync:gi.readFileSync,writeJson:gi.writeFile,writeJsonSync:gi.writeFileSync}});var bi=g((OS,Yc)=>{"use strict";var Wx=ce().fromPromise,Ga=ge(),Vc=require("path"),Jc=Le(),Vx=dt().pathExists;async function Jx(e,t,n="utf-8"){let i=Vc.dirname(e);return await Vx(i)||await Jc.mkdirs(i),Ga.writeFile(e,t,n)}function Yx(e,...t){let n=Vc.dirname(e);Ga.existsSync(n)||Jc.mkdirsSync(n),Ga.writeFileSync(e,...t)}Yc.exports={outputFile:Wx(Jx),outputFileSync:Yx}});var Qc=g((CS,Kc)=>{"use strict";var{stringify:Kx}=xi(),{outputFile:Qx}=bi();async function Zx(e,t,n={}){let i=Kx(t,n);await Qx(e,i,n)}Kc.exports=Zx});var ep=g((TS,Zc)=>{"use strict";var{stringify:ev}=xi(),{outputFileSync:tv}=bi();function nv(e,t,n){let i=ev(t,n);tv(e,i,n)}Zc.exports=nv});var np=g((PS,tp)=>{"use strict";var iv=ce().fromPromise,ye=Wc();ye.outputJson=iv(Qc());ye.outputJsonSync=ep();ye.outputJSON=ye.outputJson;ye.outputJSONSync=ye.outputJsonSync;ye.writeJSON=ye.writeJson;ye.writeJSONSync=ye.writeJsonSync;ye.readJSON=ye.readJson;ye.readJSONSync=ye.readJsonSync;tp.exports=ye});var sp=g((IS,rp)=>{"use strict";var av=ge(),ip=require("path"),{copy:ov}=hi(),{remove:op}=Fn(),{mkdirp:rv}=Le(),{pathExists:sv}=dt(),ap=Ft();async function cv(e,t,n={}){let i=n.overwrite||n.clobber||!1,{srcStat:a,isChangingCase:o=!1}=await ap.checkPaths(e,t,"move",n);await ap.checkParentPaths(e,a,t,"move");let r=ip.dirname(t);return ip.parse(r).root!==r&&await rv(r),pv(e,t,i,o)}async function pv(e,t,n,i){if(!i){if(n)await op(t);else if(await sv(t))throw new Error("dest already exists.")}try{await av.rename(e,t)}catch(a){if(a.code!=="EXDEV")throw a;await lv(e,t,n)}}async function lv(e,t,n){return await ov(e,t,{overwrite:n,errorOnExist:!0,preserveTimestamps:!0}),op(e)}rp.exports=cv});var dp=g((AS,up)=>{"use strict";var pp=Qt(),Xa=require("path"),uv=hi().copySync,lp=Fn().removeSync,dv=Le().mkdirpSync,cp=Ft();function mv(e,t,n){n=n||{};let i=n.overwrite||n.clobber||!1,{srcStat:a,isChangingCase:o=!1}=cp.checkPathsSync(e,t,"move",n);return cp.checkParentPathsSync(e,a,t,"move"),fv(t)||dv(Xa.dirname(t)),hv(e,t,i,o)}function fv(e){let t=Xa.dirname(e);return Xa.parse(t).root===t}function hv(e,t,n,i){if(i)return za(e,t,n);if(n)return lp(t),za(e,t,n);if(pp.existsSync(t))throw new Error("dest already exists.");return za(e,t,n)}function za(e,t,n){try{pp.renameSync(e,t)}catch(i){if(i.code!=="EXDEV")throw i;return xv(e,t,n)}}function xv(e,t,n){return uv(e,t,{overwrite:n,errorOnExist:!0,preserveTimestamps:!0}),lp(e)}up.exports=mv});var fp=g((FS,mp)=>{"use strict";var vv=ce().fromPromise;mp.exports={move:vv(sp()),moveSync:dp()}});var ht=g((kS,hp)=>{"use strict";hp.exports={...ge(),...hi(),...fc(),...Bc(),...np(),...Le(),...fp(),...bi(),...dt(),...Fn()}});function xp(e,t){let n=0,i,a="",o="";for(;n<e.length;n++)i=e[n],a+=i.open,o+=i.close,~t.indexOf(i.close)&&(t=t.replace(i.rgx,i.close+i.open));return a+t+o}function gv(e,t){let n={has:e,keys:t};return n.reset=U.reset.bind(n),n.bold=U.bold.bind(n),n.dim=U.dim.bind(n),n.italic=U.italic.bind(n),n.underline=U.underline.bind(n),n.inverse=U.inverse.bind(n),n.hidden=U.hidden.bind(n),n.strikethrough=U.strikethrough.bind(n),n.black=U.black.bind(n),n.red=U.red.bind(n),n.green=U.green.bind(n),n.yellow=U.yellow.bind(n),n.blue=U.blue.bind(n),n.magenta=U.magenta.bind(n),n.cyan=U.cyan.bind(n),n.white=U.white.bind(n),n.gray=U.gray.bind(n),n.grey=U.grey.bind(n),n.bgBlack=U.bgBlack.bind(n),n.bgRed=U.bgRed.bind(n),n.bgGreen=U.bgGreen.bind(n),n.bgYellow=U.bgYellow.bind(n),n.bgBlue=U.bgBlue.bind(n),n.bgMagenta=U.bgMagenta.bind(n),n.bgCyan=U.bgCyan.bind(n),n.bgWhite=U.bgWhite.bind(n),n}function $(e,t){let n={open:`\x1B[${e}m`,close:`\x1B[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(i){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(e)||(this.has.push(e),this.keys.push(n)),i===void 0?this:U.enabled?xp(this.keys,i+""):i+""):i===void 0?gv([e],[n]):U.enabled?xp([n],i+""):i+""}}var Ha,vp,gp,bp,yp,U,V,nn=Rn(()=>{"use strict";yp=!0;typeof process<"u"&&({FORCE_COLOR:Ha,NODE_DISABLE_COLORS:vp,NO_COLOR:gp,TERM:bp}=process.env||{},yp=process.stdout&&process.stdout.isTTY);U={enabled:!vp&&gp==null&&bp!=="dumb"&&(Ha!=null&&Ha!=="0"||yp),reset:$(0,0),bold:$(1,22),dim:$(2,22),italic:$(3,23),underline:$(4,24),inverse:$(7,27),hidden:$(8,28),strikethrough:$(9,29),black:$(30,39),red:$(31,39),green:$(32,39),yellow:$(33,39),blue:$(34,39),magenta:$(35,39),cyan:$(36,39),white:$(37,39),gray:$(90,39),grey:$(90,39),bgBlack:$(40,49),bgRed:$(41,49),bgGreen:$(42,49),bgYellow:$(43,49),bgBlue:$(44,49),bgMagenta:$(45,49),bgCyan:$(46,49),bgWhite:$(47,49)};V=U});var Cp=g((sE,Op)=>{var Va=class{constructor(t){this.value=t,this.next=void 0}},Ja=class{constructor(){this.clear()}enqueue(t){let n=new Va(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}};Op.exports=Ja});var Ya=g((cE,Tp)=>{"use strict";var yv=Cp(),wv=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 yv,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};Tp.exports=wv});var Ap=g((pE,Ip)=>{"use strict";var Pp=Ya(),yi=class extends Error{constructor(t){super(),this.value=t}},_v=async(e,t)=>t(await e),Sv=async e=>{let t=await Promise.all(e);if(t[1]===!0)throw new yi(t[0]);return!1},Ev=async(e,t,n)=>{n={concurrency:1/0,preserveOrder:!0,...n};let i=Pp(n.concurrency),a=[...e].map(r=>[r,i(_v,r,t)]),o=Pp(n.preserveOrder?1:1/0);try{await Promise.all(a.map(r=>o(Sv,r)))}catch(r){if(r instanceof yi)return r.value;throw r}};Ip.exports=Ev});var qp=g((lE,Ka)=>{"use strict";var Fp=require("path"),wi=require("fs"),{promisify:kp}=require("util"),Dv=Ap(),Rv=kp(wi.stat),Ov=kp(wi.lstat),jp={directory:"isDirectory",file:"isFile"};function Lp({type:e}){if(!(e in jp))throw new Error(`Invalid type specified: ${e}`)}var Np=(e,t)=>e===void 0||t[jp[e]]();Ka.exports=async(e,t)=>{t={cwd:process.cwd(),type:"file",allowSymlinks:!0,...t},Lp(t);let n=t.allowSymlinks?Rv:Ov;return Dv(e,async i=>{try{let a=await n(Fp.resolve(t.cwd,i));return Np(t.type,a)}catch{return!1}},t)};Ka.exports.sync=(e,t)=>{t={cwd:process.cwd(),allowSymlinks:!0,type:"file",...t},Lp(t);let n=t.allowSymlinks?wi.statSync:wi.lstatSync;for(let i of e)try{let a=n(Fp.resolve(t.cwd,i));if(Np(t.type,a))return i}catch{}}});var Bp=g((uE,Qa)=>{"use strict";var Up=require("fs"),{promisify:Cv}=require("util"),Tv=Cv(Up.access);Qa.exports=async e=>{try{return await Tv(e),!0}catch{return!1}};Qa.exports.sync=e=>{try{return Up.accessSync(e),!0}catch{return!1}}});var eo=g((dE,an)=>{"use strict";var xt=require("path"),_i=qp(),Mp=Bp(),Za=Symbol("findUp.stop");an.exports=async(e,t={})=>{let n=xt.resolve(t.cwd||""),{root:i}=xt.parse(n),a=[].concat(e),o=async r=>{if(typeof e!="function")return _i(a,r);let s=await e(r.cwd);return typeof s=="string"?_i([s],r):s};for(;;){let r=await o({...t,cwd:n});if(r===Za)return;if(r)return xt.resolve(n,r);if(n===i)return;n=xt.dirname(n)}};an.exports.sync=(e,t={})=>{let n=xt.resolve(t.cwd||""),{root:i}=xt.parse(n),a=[].concat(e),o=r=>{if(typeof e!="function")return _i.sync(a,r);let s=e(r.cwd);return typeof s=="string"?_i.sync([s],r):s};for(;;){let r=o({...t,cwd:n});if(r===Za)return;if(r)return xt.resolve(n,r);if(n===i)return;n=xt.dirname(n)}};an.exports.exists=Mp;an.exports.sync.exists=Mp.sync;an.exports.stop=Za});var Si=g((mE,to)=>{"use strict";var $p=require("path"),Gp=eo(),Pv=async e=>{let t=await Gp("package.json",{cwd:e});return t&&$p.dirname(t)};to.exports=Pv;to.exports.sync=e=>{let t=Gp.sync("package.json",{cwd:e});return t&&$p.dirname(t)}});function Y(e,t){let{error:n,message:i,expected:a,hint:o}=e,r=V.red("[ "+n+" ]"),s=[a,o].filter(Boolean).join(`
|
|
10
10
|
`);throw console.log(`
|
|
11
11
|
${r}
|
|
@@ -13,8 +13,8 @@ ${i}
|
|
|
13
13
|
${s}
|
|
14
14
|
|
|
15
15
|
${V.red("stack")}
|
|
16
|
-
${JSON.stringify(t,null,2)}`),new jn}var jn,
|
|
17
|
-
`,this.pretty=!0,(0,Ei.isUndefined)(t.doubleQuotes)||(this.doubleQuotes=t.doubleQuotes),(0,Ei.isUndefined)(t.indent)||(this.indent=t.indent),(0,Ei.isUndefined)(t.newline)||(this.newline=t.newline),(0,Ei.isUndefined)(t.pretty)||(this.pretty=t.pretty)}return e}();Di.StringOptions=Nv});var Ri=g(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.escapeDoubleQuotes=ke.escapeSingleQuotes=ke.escapeRightAngleBracketsInCdataTerminator=ke.escapeLeftAngleBrackets=ke.escapeAmpersands=void 0;function qv(e){return e.replace(/&/g,"&")}ke.escapeAmpersands=qv;function Uv(e){return e.replace(/</g,"<")}ke.escapeLeftAngleBrackets=Uv;function Bv(e){return e.replace(/]]>/g,"]]>")}ke.escapeRightAngleBracketsInCdataTerminator=Bv;function Mv(e){return e.replace(/'/g,"'")}ke.escapeSingleQuotes=Mv;function $v(e){return e.replace(/"/g,""")}ke.escapeDoubleQuotes=$v});var oo=g(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});var Gv=fe(),Wp=Ri(),io=oe(),zv=function(){function e(t,n,i){this._validation=n,(0,io.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,io.fixChar)(t);else if(this._validation&&!(0,io.validateChar)(t))throw new Error((0,Gv.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,Wp.escapeAmpersands)(t),t=(0,Wp.escapeLeftAngleBrackets)(t),t},e.prototype.up=function(){return this._parent},e}();ao.default=zv});var Oi=g(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});var Vp=fe(),Jp=oe(),Xv=function(){function e(t,n,i){this._hex=!1,this._validation=n,this._parent=t,this.char=i.char,(0,Jp.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,Jp.validateSingleChar)(t))throw new Error((0,Vp.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,Vp.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}();ro.default=Xv});var Ci=g(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});var Hv=fe(),Wv=oe(),Vv=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,Wv.validateName)(t))throw new Error((0,Hv.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}();so.default=Vv});var Ti=g(Ln=>{"use strict";var lo=Ln&&Ln.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ln,"__esModule",{value:!0});var co=fe(),Yp=Ri(),Jv=sn(),po=oe(),Yv=lo(oo()),Kv=lo(Oi()),Qv=lo(Ci()),Zv=function(){function e(t,n,i){this._validation=n,(0,po.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,po.fixName)(t),t.length===0)throw new Error((0,co.getContext)(this.up())+": attribute name should not be empty")}else if(this._validation&&!(0,po.validateName)(t))throw t.length===0?new Error((0,co.getContext)(this.up())+": attribute name should not be empty"):new Error((0,co.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 Kv.default(this,this._validation,t);return this._children.push(n),n},e.prototype.entityRef=function(t){var n=new Qv.default(this,this._validation,t);return this._children.push(n),n},e.prototype.text=function(t){var n=new Yv.default(this,this._validation,t);return this._children.push(n),n},e.prototype.toString=function(t){t===void 0&&(t={});for(var n=new Jv.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,Yp.escapeDoubleQuotes)(s.toString()):a+=(0,Yp.escapeSingleQuotes)(s.toString())}return a+=i,a},e.prototype.up=function(){return this._parent},e}();Ln.default=Zv});var mo=g(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});var eg=fe(),tg=oe(),ng=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,tg.validateChar)(t))throw new Error((0,eg.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}();uo.default=ng});var ho=g(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});var ig=fe(),ag=oe(),og=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,ag.validateChar)(t))throw new Error((0,ig.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}();fo.default=og});var vo=g(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});var rg=fe(),sg=oe(),cg=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,sg.validateChar)(t))throw new Error((0,rg.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}();xo.default=cg});var bo=g(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});var pg=fe(),lg=oe(),ug=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,lg.validateChar)(t))throw new Error((0,pg.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}();go.default=ug});var wo=g(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});var dg=fe(),mg=oe(),fg=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,mg.validateName)(t))throw new Error((0,dg.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}();yo.default=fg});var Nn=g(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});var Pi=fe(),Ii=oe(),hg=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,Pi.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,Pi.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,Pi.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,Pi.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}();_o.default=hg});var Ai=g(kt=>{"use strict";var jt=kt&&kt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(kt,"__esModule",{value:!0});kt.validatePubId=void 0;var gt=fe(),xg=sn(),Ye=oe(),vg=jt(qn()),gg=jt(mo()),bg=jt(ho()),yg=jt(vo()),wg=jt(bo()),_g=jt(wo()),Sg=jt(Nn()),Eg=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,gt.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&&!Kp(t))throw new Error((0,gt.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,gt.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,gt.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,gt.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 gg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.comment=function(t){var n=new vg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.element=function(t){var n=new bg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.entity=function(t){var n=new yg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.notation=function(t){var n=new wg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.paramEntityRef=function(t){var n=new _g.default(this,this._validation,t);return this._children.push(n),n},e.prototype.procInst=function(t){var n=new Sg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.toString=function(t){t===void 0&&(t={});var n=new xg.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,gt.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,gt.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,gt.getContext)(this)+": doubleQuotes option inconsistent with DTD system identifier or public identifier");i+="'"+n+"'"}return i},e}();kt.default=Eg;function Kp(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}kt.validatePubId=Kp});var Do=g(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});var Qp=fe(),So=oe(),Dg=function(){function e(t,n,i){this._validation=n,(0,So.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,So.fixChar)(t);else if(this._validation&&!(0,So.validateChar)(t))throw new Error((0,Qp.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,Qp.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}();Eo.default=Dg});var To=g(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});var Rg=fe(),Ro=Ri(),Oo=oe(),Og=function(){function e(t,n,i){this._validation=n,(0,Oo.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,Oo.fixChar)(t);else if(this._validation&&!(0,Oo.validateChar)(t))throw new Error((0,Rg.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,Ro.escapeAmpersands)(t),t=(0,Ro.escapeLeftAngleBrackets)(t),t=(0,Ro.escapeRightAngleBracketsInCdataTerminator)(t),t},e.prototype.up=function(){return this._parent},e}();Co.default=Og});var Li=g(Mn=>{"use strict";var Lt=Mn&&Mn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Mn,"__esModule",{value:!0});var Fi=fe(),Cg=sn(),Un=oe(),Zp=Lt(Ti()),Tg=Lt(Do()),Bn=Lt(To()),ki=Lt(Oi()),Pg=Lt(qn()),ji=Lt(Ci()),Ig=Lt(Nn()),Ag=function(){function e(t,n,i){this._validation=n,(0,Un.isUndefined)(i.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=i.replaceInvalidCharsInName,(0,Un.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,Un.fixName)(t),t.length===0)throw new Error((0,Fi.getContext)(this.up())+": element name should not be empty")}else if(this._validation&&!(0,Un.validateName)(t))throw t.length===0?new Error((0,Fi.getContext)(this.up())+": element name should not be empty"):new Error((0,Fi.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,Fi.getContext)(this.up())+': element "'+this.name+'" already contains an attribute with the'+(' name "'+t.name+'"'));var n=new Zp.default(this,this._validation,t);return this._children.push(n),this._attributeNames.push(t.name),n},e.prototype.cdata=function(t){var n=new Tg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.charData=function(t){var n=new Bn.default(this,this._validation,t);return this._children.push(n),n},e.prototype.charRef=function(t){var n=new ki.default(this,this._validation,t);return this._children.push(n),n},e.prototype.comment=function(t){var n=new Pg.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 ji.default(this,this._validation,t);return this._children.push(n),n},e.prototype.procInst=function(t){var n=new Ig.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 Cg.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 Zp.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 Bn.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 ki.default||a instanceof ji.default||a instanceof Bn.default))return!1}return!0},e.prototype.onSameLine=function(t,n){return(t instanceof ki.default||t instanceof ji.default||t instanceof Bn.default)&&!(0,Un.isUndefined)(n)&&(n instanceof ki.default||n instanceof ji.default||n instanceof Bn.default)},e}();Mn.default=Ag});var fe=g(cn=>{"use strict";var qi=cn&&cn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cn,"__esModule",{value:!0});cn.getContext=void 0;var Fg=qi(Ti()),kg=qi(Ui()),jg=qi(Ai()),Lg=qi(Li());function Ni(e){if(e instanceof Fg.default)return Ni(e.up())+(' > attribute "'+e.name+'"');if(e instanceof kg.default)return"in XML document";if(e instanceof jg.default)return Ni(e.up())+" > DTD";if(e instanceof Lg.default)return Ni(e.up())+(' > element "'+e.name+'"');throw new Error("Unrecognized object of type "+Object.prototype.toString.call(e))}cn.getContext=Ni});var qn=g(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});var Po=fe(),Io=oe(),Ng=function(){function e(t,n,i){this._validation=n,(0,Io.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,Io.fixChar)(t);else if(this._validation&&!(0,Io.validateChar)(t))throw new Error((0,Po.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,Po.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,Po.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}();Ao.default=Ng});var jo=g(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});var Fo=fe(),qg=sn(),$n=oe(),Ug=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,$n.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,$n.isUndefined)(t)&&!Bg(t))throw new Error((0,Fo.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,$n.isUndefined)(t)&&t!=="yes"&&t!=="no")throw new Error((0,Fo.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&&!Mg(t))throw new Error((0,Fo.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 qg.StringOptions(t),i=n.doubleQuotes?'"':"'",a="<?xml version="+i+this._version+i;return(0,$n.isUndefined)(this._encoding)||(a+=" encoding="+i+this._encoding+i),(0,$n.isUndefined)(this._standalone)||(a+=" standalone="+i+this._standalone+i),a+="?>",a},e.prototype.up=function(){return this._parent},e}();ko.default=Ug;function Bg(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 Mg(e){for(var t=0;t<=9;t++)if(e==="1."+t)return!0;return!1}});var Ui=g(zn=>{"use strict";var Xn=zn&&zn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zn,"__esModule",{value:!0});var $g=sn(),Gg=oe(),zg=Xn(qn()),el=Xn(jo()),tl=Xn(Ai()),Gn=Xn(Li()),Xg=Xn(Nn()),Hg=function(){function e(t){this._children=[],this._validation=(0,Gg.isUndefined)(t.validation)?!0:t.validation}return e.prototype.comment=function(t){var n=new zg.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 el.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 Gn.default});if(this._validation&&n.length!==0)throw new Error("in XML document: DTD must precede the root element");var i=new tl.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 Gn.default});if(this._validation&&n.length!==0)throw new Error("in XML document: only one root element is permitted");var i=new Gn.default(this,this._validation,t);return this._children.push(i),i},e.prototype.procInst=function(t){var n=new Xg.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 Gn.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 $g.StringOptions(t),a="",o=0,r=this._children;o<r.length;o++){var s=r[o];s instanceof el.default||s instanceof tl.default||s instanceof Gn.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}();zn.default=Hg});var nl=g(P=>{"use strict";var le=P&&P.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(P,"__esModule",{value:!0});P.document=P.XmlProcInst=P.XmlEntityRef=P.XmlElement=P.XmlDtdParamEntityRef=P.XmlDtdNotation=P.XmlDtdEntity=P.XmlDtdElement=P.XmlDtdAttlist=P.XmlDtd=P.XmlDocument=P.XmlDecl=P.XmlComment=P.XmlCharRef=P.XmlCharData=P.XmlCdata=P.XmlAttributeText=P.XmlAttribute=void 0;var Wg=le(Ui()),Vg=Ti();Object.defineProperty(P,"XmlAttribute",{enumerable:!0,get:function(){return le(Vg).default}});var Jg=oo();Object.defineProperty(P,"XmlAttributeText",{enumerable:!0,get:function(){return le(Jg).default}});var Yg=Do();Object.defineProperty(P,"XmlCdata",{enumerable:!0,get:function(){return le(Yg).default}});var Kg=To();Object.defineProperty(P,"XmlCharData",{enumerable:!0,get:function(){return le(Kg).default}});var Qg=Oi();Object.defineProperty(P,"XmlCharRef",{enumerable:!0,get:function(){return le(Qg).default}});var Zg=qn();Object.defineProperty(P,"XmlComment",{enumerable:!0,get:function(){return le(Zg).default}});var eb=jo();Object.defineProperty(P,"XmlDecl",{enumerable:!0,get:function(){return le(eb).default}});var tb=Ui();Object.defineProperty(P,"XmlDocument",{enumerable:!0,get:function(){return le(tb).default}});var nb=Ai();Object.defineProperty(P,"XmlDtd",{enumerable:!0,get:function(){return le(nb).default}});var ib=mo();Object.defineProperty(P,"XmlDtdAttlist",{enumerable:!0,get:function(){return le(ib).default}});var ab=ho();Object.defineProperty(P,"XmlDtdElement",{enumerable:!0,get:function(){return le(ab).default}});var ob=vo();Object.defineProperty(P,"XmlDtdEntity",{enumerable:!0,get:function(){return le(ob).default}});var rb=bo();Object.defineProperty(P,"XmlDtdNotation",{enumerable:!0,get:function(){return le(rb).default}});var sb=wo();Object.defineProperty(P,"XmlDtdParamEntityRef",{enumerable:!0,get:function(){return le(sb).default}});var cb=Li();Object.defineProperty(P,"XmlElement",{enumerable:!0,get:function(){return le(cb).default}});var pb=Ci();Object.defineProperty(P,"XmlEntityRef",{enumerable:!0,get:function(){return le(pb).default}});var lb=Nn();Object.defineProperty(P,"XmlProcInst",{enumerable:!0,get:function(){return le(lb).default}});function ub(e){return e===void 0&&(e={}),new Wg.default(e)}P.document=ub});var Lo=g(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.stringify=ue.isMap=ue.isSet=ue.isFunction=ue.isArray=ue.isObject=ue.isNull=ue.isUndefined=void 0;function il(e){return Object.prototype.toString.call(e)==="[object Undefined]"}ue.isUndefined=il;function al(e){return Object.prototype.toString.call(e)==="[object Null]"}ue.isNull=al;function db(e){return Object.prototype.toString.call(e)==="[object Object]"}ue.isObject=db;function mb(e){return Object.prototype.toString.call(e)==="[object Array]"}ue.isArray=mb;function ol(e){return Object.prototype.toString.call(e)==="[object Function]"}ue.isFunction=ol;function fb(e){return Object.prototype.toString.call(e)==="[object Set]"}ue.isSet=fb;function hb(e){return Object.prototype.toString.call(e)==="[object Map]"}ue.isMap=hb;function xb(e){return!il(e)&&!al(e)&&ol(e?.toString)&&(e=e.toString()),String(e)}ue.stringify=xb});var ul=g(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.WrapHandlers=Ee.TypeHandlers=Ee.FormatOptions=Ee.DtdOptions=Ee.DeclarationOptions=Ee.Options=void 0;var Ne=Lo(),vb=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 rl(t.declaration),this.dtd=new sl(this.validation,t.dtd),this.format=new cl(t.format),(0,Ne.isUndefined)(t.replaceInvalidChars)||(this.replaceInvalidChars=t.replaceInvalidChars),this.typeHandlers=new pl(t.typeHandlers),(0,Ne.isUndefined)(t.useSelfClosingTagIfEmpty)||(this.useSelfClosingTagIfEmpty=t.useSelfClosingTagIfEmpty),(0,Ne.isUndefined)(t.valueString)||(this.valueString=t.valueString),this.wrapHandlers=new ll(t.wrapHandlers)}return e}();Ee.Options=vb;var rl=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}();Ee.DeclarationOptions=rl;var sl=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}();Ee.DtdOptions=sl;var cl=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}();Ee.FormatOptions=cl;var pl=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}();Ee.TypeHandlers=pl;var ll=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}();Ee.WrapHandlers=ll});var vl=g(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.parse=bt.parseToExistingElement=bt.Absent=void 0;var ml=nl(),fl=ul(),ee=Lo(),Bi=function(){function e(){}return Object.defineProperty(e,"instance",{get:function(){return e._instance},enumerable:!1,configurable:!0}),e._instance=new e,e}();bt.Absent=Bi;function Mi(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 hl(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 ml.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 gb(e,t,n,i){var a=n.attribute({name:e,replaceInvalidCharsInName:i.replaceInvalidChars});hl((0,ee.stringify)(t),a,i)}function dl(e,t,n,i){if(e===i.aliasString){n.name=(0,ee.stringify)(t);return}if(e.indexOf(i.attributeString)===0&&(0,ee.isObject)(t)){for(var a=0,o=Object.keys(t);a<o.length;a++){var r=o[a],s=t[r],p=Mi(s,i);!(0,ee.isUndefined)(p)&&(s=p(s),p(t)===Bi.instance)||gb(r,s,n,i)}return}if(e.indexOf(i.valueString)===0){$i(e,t,n,i);return}var l=n;if(!(0,ee.isArray)(t)&&!(0,ee.isSet)(t)){var p=Mi(t,i);if(!(0,ee.isUndefined)(p)&&p(t)===Bi.instance)return;l=n.element({name:e,replaceInvalidCharsInName:i.replaceInvalidChars,useSelfClosingTagIfEmpty:i.useSelfClosingTagIfEmpty})}$i(e,t,l,i)}function bb(e,t,n){if((0,ee.isMap)(e))e.forEach(function(r,s){dl((0,ee.stringify)(s),r,t,n)});else for(var i=0,a=Object.keys(e);i<a.length;i++){var o=a[i];dl(o,e[o],t,n)}}function yb(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,ee.isUndefined)(a)){var s=a(o,t);(0,ee.isNull)(s)||(o=s,r=n.element({name:e,replaceInvalidCharsInName:i.replaceInvalidChars,useSelfClosingTagIfEmpty:i.useSelfClosingTagIfEmpty}))}t.forEach(function(p){var l=r;if(!(0,ee.isArray)(p)&&!(0,ee.isSet)(p)){var c=Mi(p,i);if(!(0,ee.isUndefined)(c)&&c(p)===Bi.instance)return;l=r.element({name:o,replaceInvalidCharsInName:i.replaceInvalidChars,useSelfClosingTagIfEmpty:i.useSelfClosingTagIfEmpty})}$i(o,p,l,i)})}function $i(e,t,n,i){var a=Mi(t,i);if((0,ee.isUndefined)(a)||(t=a(t)),(0,ee.isObject)(t)||(0,ee.isMap)(t)){bb(t,n,i);return}if((0,ee.isArray)(t)||(0,ee.isSet)(t)){yb(e,t,n,i);return}hl((0,ee.stringify)(t),n,i)}function xl(e,t,n){var i=new fl.Options(n);$i(e.name,t,e,i)}bt.parseToExistingElement=xl;function wb(e,t,n){var i=new fl.Options(n),a=new ml.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 xl(o,t,n),a.toString(i.format)}bt.parse=wb});var Nt,gl,bl,yl,wl,_l,Sl,El,Dl,ot=Rn(()=>{"use strict";Nt={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."},gl=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."}),bl=(e,t)=>({error:"LifecycleExecutionError",message:`Exceeded maximum retry attempts (${e}) for ${t} LifeCycle`}),yl={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."},wl={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."},_l={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."},Sl={error:"ReadFromStoreError",message:"There was an error reading a file to the Store directory",hint:"There may be an issue such as permissions preventing the file from being read."},El={error:"RenderUUIDError",message:`Render sentinel file does not exist.
|
|
16
|
+
${JSON.stringify(t,null,2)}`),new jn}var jn,Ye=Rn(()=>{"use strict";nn();jn=class extends Error{constructor(){super(),this.name="InternalCXError",this.stack=""}}});var oe=g(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.isUndefined=Se.fixName=Se.validateName=Se.validateSingleChar=Se.fixChar=Se.validateChar=void 0;function Iv(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}Se.validateChar=Iv;function Av(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}Se.fixChar=Av;function Fv(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}Se.validateSingleChar=Fv;function kv(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}Se.validateName=kv;function jv(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}Se.fixName=jv;function Lv(e){return Object.prototype.toString.call(e)==="[object Undefined]"}Se.isUndefined=Lv});var sn=g(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.StringOptions=void 0;var Ei=oe(),Nv=function(){function e(t){this.doubleQuotes=!1,this.indent=" ",this.newline=`
|
|
17
|
+
`,this.pretty=!0,(0,Ei.isUndefined)(t.doubleQuotes)||(this.doubleQuotes=t.doubleQuotes),(0,Ei.isUndefined)(t.indent)||(this.indent=t.indent),(0,Ei.isUndefined)(t.newline)||(this.newline=t.newline),(0,Ei.isUndefined)(t.pretty)||(this.pretty=t.pretty)}return e}();Di.StringOptions=Nv});var Ri=g(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.escapeDoubleQuotes=ke.escapeSingleQuotes=ke.escapeRightAngleBracketsInCdataTerminator=ke.escapeLeftAngleBrackets=ke.escapeAmpersands=void 0;function qv(e){return e.replace(/&/g,"&")}ke.escapeAmpersands=qv;function Uv(e){return e.replace(/</g,"<")}ke.escapeLeftAngleBrackets=Uv;function Bv(e){return e.replace(/]]>/g,"]]>")}ke.escapeRightAngleBracketsInCdataTerminator=Bv;function Mv(e){return e.replace(/'/g,"'")}ke.escapeSingleQuotes=Mv;function $v(e){return e.replace(/"/g,""")}ke.escapeDoubleQuotes=$v});var oo=g(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});var Gv=fe(),Wp=Ri(),io=oe(),zv=function(){function e(t,n,i){this._validation=n,(0,io.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,io.fixChar)(t);else if(this._validation&&!(0,io.validateChar)(t))throw new Error((0,Gv.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,Wp.escapeAmpersands)(t),t=(0,Wp.escapeLeftAngleBrackets)(t),t},e.prototype.up=function(){return this._parent},e}();ao.default=zv});var Oi=g(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});var Vp=fe(),Jp=oe(),Xv=function(){function e(t,n,i){this._hex=!1,this._validation=n,this._parent=t,this.char=i.char,(0,Jp.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,Jp.validateSingleChar)(t))throw new Error((0,Vp.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,Vp.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}();ro.default=Xv});var Ci=g(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});var Hv=fe(),Wv=oe(),Vv=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,Wv.validateName)(t))throw new Error((0,Hv.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}();so.default=Vv});var Ti=g(Ln=>{"use strict";var lo=Ln&&Ln.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ln,"__esModule",{value:!0});var co=fe(),Yp=Ri(),Jv=sn(),po=oe(),Yv=lo(oo()),Kv=lo(Oi()),Qv=lo(Ci()),Zv=function(){function e(t,n,i){this._validation=n,(0,po.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,po.fixName)(t),t.length===0)throw new Error((0,co.getContext)(this.up())+": attribute name should not be empty")}else if(this._validation&&!(0,po.validateName)(t))throw t.length===0?new Error((0,co.getContext)(this.up())+": attribute name should not be empty"):new Error((0,co.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 Kv.default(this,this._validation,t);return this._children.push(n),n},e.prototype.entityRef=function(t){var n=new Qv.default(this,this._validation,t);return this._children.push(n),n},e.prototype.text=function(t){var n=new Yv.default(this,this._validation,t);return this._children.push(n),n},e.prototype.toString=function(t){t===void 0&&(t={});for(var n=new Jv.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,Yp.escapeDoubleQuotes)(s.toString()):a+=(0,Yp.escapeSingleQuotes)(s.toString())}return a+=i,a},e.prototype.up=function(){return this._parent},e}();Ln.default=Zv});var mo=g(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});var eg=fe(),tg=oe(),ng=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,tg.validateChar)(t))throw new Error((0,eg.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}();uo.default=ng});var ho=g(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});var ig=fe(),ag=oe(),og=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,ag.validateChar)(t))throw new Error((0,ig.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}();fo.default=og});var vo=g(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});var rg=fe(),sg=oe(),cg=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,sg.validateChar)(t))throw new Error((0,rg.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}();xo.default=cg});var bo=g(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});var pg=fe(),lg=oe(),ug=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,lg.validateChar)(t))throw new Error((0,pg.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}();go.default=ug});var wo=g(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});var dg=fe(),mg=oe(),fg=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,mg.validateName)(t))throw new Error((0,dg.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}();yo.default=fg});var Nn=g(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});var Pi=fe(),Ii=oe(),hg=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,Pi.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,Pi.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,Pi.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,Pi.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}();_o.default=hg});var Ai=g(kt=>{"use strict";var jt=kt&&kt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(kt,"__esModule",{value:!0});kt.validatePubId=void 0;var gt=fe(),xg=sn(),Ke=oe(),vg=jt(qn()),gg=jt(mo()),bg=jt(ho()),yg=jt(vo()),wg=jt(bo()),_g=jt(wo()),Sg=jt(Nn()),Eg=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,Ke.isUndefined)(i.sysId)||(this.sysId=i.sysId),(0,Ke.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,Ke.validateName)(t))throw new Error((0,gt.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,Ke.isUndefined)(t)){if(this._validation&&!Kp(t))throw new Error((0,gt.getContext)(this.up())+": DTD public"+(' identifier "'+t+'" should not contain')+" characters not allowed in public identifiers");if(this._validation&&(0,Ke.isUndefined)(this._sysId))throw new Error((0,gt.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,Ke.isUndefined)(t)){if(this._validation&&!(0,Ke.validateChar)(t))throw new Error((0,gt.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,gt.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 gg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.comment=function(t){var n=new vg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.element=function(t){var n=new bg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.entity=function(t){var n=new yg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.notation=function(t){var n=new wg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.paramEntityRef=function(t){var n=new _g.default(this,this._validation,t);return this._children.push(n),n},e.prototype.procInst=function(t){var n=new Sg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.toString=function(t){t===void 0&&(t={});var n=new xg.StringOptions(t),i="<!DOCTYPE "+this._name;if((0,Ke.isUndefined)(this._pubId))(0,Ke.isUndefined)(this._sysId)||(i+=" ",i=this.appendId("SYSTEM",this._sysId,i,n));else{if((0,Ke.isUndefined)(this._sysId))throw new Error((0,gt.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,gt.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,gt.getContext)(this)+": doubleQuotes option inconsistent with DTD system identifier or public identifier");i+="'"+n+"'"}return i},e}();kt.default=Eg;function Kp(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}kt.validatePubId=Kp});var Do=g(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});var Qp=fe(),So=oe(),Dg=function(){function e(t,n,i){this._validation=n,(0,So.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,So.fixChar)(t);else if(this._validation&&!(0,So.validateChar)(t))throw new Error((0,Qp.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,Qp.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}();Eo.default=Dg});var To=g(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});var Rg=fe(),Ro=Ri(),Oo=oe(),Og=function(){function e(t,n,i){this._validation=n,(0,Oo.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,Oo.fixChar)(t);else if(this._validation&&!(0,Oo.validateChar)(t))throw new Error((0,Rg.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,Ro.escapeAmpersands)(t),t=(0,Ro.escapeLeftAngleBrackets)(t),t=(0,Ro.escapeRightAngleBracketsInCdataTerminator)(t),t},e.prototype.up=function(){return this._parent},e}();Co.default=Og});var Li=g(Mn=>{"use strict";var Lt=Mn&&Mn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Mn,"__esModule",{value:!0});var Fi=fe(),Cg=sn(),Un=oe(),Zp=Lt(Ti()),Tg=Lt(Do()),Bn=Lt(To()),ki=Lt(Oi()),Pg=Lt(qn()),ji=Lt(Ci()),Ig=Lt(Nn()),Ag=function(){function e(t,n,i){this._validation=n,(0,Un.isUndefined)(i.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=i.replaceInvalidCharsInName,(0,Un.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,Un.fixName)(t),t.length===0)throw new Error((0,Fi.getContext)(this.up())+": element name should not be empty")}else if(this._validation&&!(0,Un.validateName)(t))throw t.length===0?new Error((0,Fi.getContext)(this.up())+": element name should not be empty"):new Error((0,Fi.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,Fi.getContext)(this.up())+': element "'+this.name+'" already contains an attribute with the'+(' name "'+t.name+'"'));var n=new Zp.default(this,this._validation,t);return this._children.push(n),this._attributeNames.push(t.name),n},e.prototype.cdata=function(t){var n=new Tg.default(this,this._validation,t);return this._children.push(n),n},e.prototype.charData=function(t){var n=new Bn.default(this,this._validation,t);return this._children.push(n),n},e.prototype.charRef=function(t){var n=new ki.default(this,this._validation,t);return this._children.push(n),n},e.prototype.comment=function(t){var n=new Pg.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 ji.default(this,this._validation,t);return this._children.push(n),n},e.prototype.procInst=function(t){var n=new Ig.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 Cg.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 Zp.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 Bn.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 ki.default||a instanceof ji.default||a instanceof Bn.default))return!1}return!0},e.prototype.onSameLine=function(t,n){return(t instanceof ki.default||t instanceof ji.default||t instanceof Bn.default)&&!(0,Un.isUndefined)(n)&&(n instanceof ki.default||n instanceof ji.default||n instanceof Bn.default)},e}();Mn.default=Ag});var fe=g(cn=>{"use strict";var qi=cn&&cn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cn,"__esModule",{value:!0});cn.getContext=void 0;var Fg=qi(Ti()),kg=qi(Ui()),jg=qi(Ai()),Lg=qi(Li());function Ni(e){if(e instanceof Fg.default)return Ni(e.up())+(' > attribute "'+e.name+'"');if(e instanceof kg.default)return"in XML document";if(e instanceof jg.default)return Ni(e.up())+" > DTD";if(e instanceof Lg.default)return Ni(e.up())+(' > element "'+e.name+'"');throw new Error("Unrecognized object of type "+Object.prototype.toString.call(e))}cn.getContext=Ni});var qn=g(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});var Po=fe(),Io=oe(),Ng=function(){function e(t,n,i){this._validation=n,(0,Io.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,Io.fixChar)(t);else if(this._validation&&!(0,Io.validateChar)(t))throw new Error((0,Po.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,Po.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,Po.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}();Ao.default=Ng});var jo=g(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});var Fo=fe(),qg=sn(),$n=oe(),Ug=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,$n.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,$n.isUndefined)(t)&&!Bg(t))throw new Error((0,Fo.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,$n.isUndefined)(t)&&t!=="yes"&&t!=="no")throw new Error((0,Fo.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&&!Mg(t))throw new Error((0,Fo.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 qg.StringOptions(t),i=n.doubleQuotes?'"':"'",a="<?xml version="+i+this._version+i;return(0,$n.isUndefined)(this._encoding)||(a+=" encoding="+i+this._encoding+i),(0,$n.isUndefined)(this._standalone)||(a+=" standalone="+i+this._standalone+i),a+="?>",a},e.prototype.up=function(){return this._parent},e}();ko.default=Ug;function Bg(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 Mg(e){for(var t=0;t<=9;t++)if(e==="1."+t)return!0;return!1}});var Ui=g(zn=>{"use strict";var Xn=zn&&zn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zn,"__esModule",{value:!0});var $g=sn(),Gg=oe(),zg=Xn(qn()),el=Xn(jo()),tl=Xn(Ai()),Gn=Xn(Li()),Xg=Xn(Nn()),Hg=function(){function e(t){this._children=[],this._validation=(0,Gg.isUndefined)(t.validation)?!0:t.validation}return e.prototype.comment=function(t){var n=new zg.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 el.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 Gn.default});if(this._validation&&n.length!==0)throw new Error("in XML document: DTD must precede the root element");var i=new tl.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 Gn.default});if(this._validation&&n.length!==0)throw new Error("in XML document: only one root element is permitted");var i=new Gn.default(this,this._validation,t);return this._children.push(i),i},e.prototype.procInst=function(t){var n=new Xg.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 Gn.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 $g.StringOptions(t),a="",o=0,r=this._children;o<r.length;o++){var s=r[o];s instanceof el.default||s instanceof tl.default||s instanceof Gn.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}();zn.default=Hg});var nl=g(P=>{"use strict";var le=P&&P.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(P,"__esModule",{value:!0});P.document=P.XmlProcInst=P.XmlEntityRef=P.XmlElement=P.XmlDtdParamEntityRef=P.XmlDtdNotation=P.XmlDtdEntity=P.XmlDtdElement=P.XmlDtdAttlist=P.XmlDtd=P.XmlDocument=P.XmlDecl=P.XmlComment=P.XmlCharRef=P.XmlCharData=P.XmlCdata=P.XmlAttributeText=P.XmlAttribute=void 0;var Wg=le(Ui()),Vg=Ti();Object.defineProperty(P,"XmlAttribute",{enumerable:!0,get:function(){return le(Vg).default}});var Jg=oo();Object.defineProperty(P,"XmlAttributeText",{enumerable:!0,get:function(){return le(Jg).default}});var Yg=Do();Object.defineProperty(P,"XmlCdata",{enumerable:!0,get:function(){return le(Yg).default}});var Kg=To();Object.defineProperty(P,"XmlCharData",{enumerable:!0,get:function(){return le(Kg).default}});var Qg=Oi();Object.defineProperty(P,"XmlCharRef",{enumerable:!0,get:function(){return le(Qg).default}});var Zg=qn();Object.defineProperty(P,"XmlComment",{enumerable:!0,get:function(){return le(Zg).default}});var eb=jo();Object.defineProperty(P,"XmlDecl",{enumerable:!0,get:function(){return le(eb).default}});var tb=Ui();Object.defineProperty(P,"XmlDocument",{enumerable:!0,get:function(){return le(tb).default}});var nb=Ai();Object.defineProperty(P,"XmlDtd",{enumerable:!0,get:function(){return le(nb).default}});var ib=mo();Object.defineProperty(P,"XmlDtdAttlist",{enumerable:!0,get:function(){return le(ib).default}});var ab=ho();Object.defineProperty(P,"XmlDtdElement",{enumerable:!0,get:function(){return le(ab).default}});var ob=vo();Object.defineProperty(P,"XmlDtdEntity",{enumerable:!0,get:function(){return le(ob).default}});var rb=bo();Object.defineProperty(P,"XmlDtdNotation",{enumerable:!0,get:function(){return le(rb).default}});var sb=wo();Object.defineProperty(P,"XmlDtdParamEntityRef",{enumerable:!0,get:function(){return le(sb).default}});var cb=Li();Object.defineProperty(P,"XmlElement",{enumerable:!0,get:function(){return le(cb).default}});var pb=Ci();Object.defineProperty(P,"XmlEntityRef",{enumerable:!0,get:function(){return le(pb).default}});var lb=Nn();Object.defineProperty(P,"XmlProcInst",{enumerable:!0,get:function(){return le(lb).default}});function ub(e){return e===void 0&&(e={}),new Wg.default(e)}P.document=ub});var Lo=g(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.stringify=ue.isMap=ue.isSet=ue.isFunction=ue.isArray=ue.isObject=ue.isNull=ue.isUndefined=void 0;function il(e){return Object.prototype.toString.call(e)==="[object Undefined]"}ue.isUndefined=il;function al(e){return Object.prototype.toString.call(e)==="[object Null]"}ue.isNull=al;function db(e){return Object.prototype.toString.call(e)==="[object Object]"}ue.isObject=db;function mb(e){return Object.prototype.toString.call(e)==="[object Array]"}ue.isArray=mb;function ol(e){return Object.prototype.toString.call(e)==="[object Function]"}ue.isFunction=ol;function fb(e){return Object.prototype.toString.call(e)==="[object Set]"}ue.isSet=fb;function hb(e){return Object.prototype.toString.call(e)==="[object Map]"}ue.isMap=hb;function xb(e){return!il(e)&&!al(e)&&ol(e?.toString)&&(e=e.toString()),String(e)}ue.stringify=xb});var ul=g(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.WrapHandlers=Ee.TypeHandlers=Ee.FormatOptions=Ee.DtdOptions=Ee.DeclarationOptions=Ee.Options=void 0;var Ne=Lo(),vb=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 rl(t.declaration),this.dtd=new sl(this.validation,t.dtd),this.format=new cl(t.format),(0,Ne.isUndefined)(t.replaceInvalidChars)||(this.replaceInvalidChars=t.replaceInvalidChars),this.typeHandlers=new pl(t.typeHandlers),(0,Ne.isUndefined)(t.useSelfClosingTagIfEmpty)||(this.useSelfClosingTagIfEmpty=t.useSelfClosingTagIfEmpty),(0,Ne.isUndefined)(t.valueString)||(this.valueString=t.valueString),this.wrapHandlers=new ll(t.wrapHandlers)}return e}();Ee.Options=vb;var rl=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}();Ee.DeclarationOptions=rl;var sl=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}();Ee.DtdOptions=sl;var cl=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}();Ee.FormatOptions=cl;var pl=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}();Ee.TypeHandlers=pl;var ll=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}();Ee.WrapHandlers=ll});var vl=g(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.parse=bt.parseToExistingElement=bt.Absent=void 0;var ml=nl(),fl=ul(),ee=Lo(),Bi=function(){function e(){}return Object.defineProperty(e,"instance",{get:function(){return e._instance},enumerable:!1,configurable:!0}),e._instance=new e,e}();bt.Absent=Bi;function Mi(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 hl(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 ml.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 gb(e,t,n,i){var a=n.attribute({name:e,replaceInvalidCharsInName:i.replaceInvalidChars});hl((0,ee.stringify)(t),a,i)}function dl(e,t,n,i){if(e===i.aliasString){n.name=(0,ee.stringify)(t);return}if(e.indexOf(i.attributeString)===0&&(0,ee.isObject)(t)){for(var a=0,o=Object.keys(t);a<o.length;a++){var r=o[a],s=t[r],p=Mi(s,i);!(0,ee.isUndefined)(p)&&(s=p(s),p(t)===Bi.instance)||gb(r,s,n,i)}return}if(e.indexOf(i.valueString)===0){$i(e,t,n,i);return}var l=n;if(!(0,ee.isArray)(t)&&!(0,ee.isSet)(t)){var p=Mi(t,i);if(!(0,ee.isUndefined)(p)&&p(t)===Bi.instance)return;l=n.element({name:e,replaceInvalidCharsInName:i.replaceInvalidChars,useSelfClosingTagIfEmpty:i.useSelfClosingTagIfEmpty})}$i(e,t,l,i)}function bb(e,t,n){if((0,ee.isMap)(e))e.forEach(function(r,s){dl((0,ee.stringify)(s),r,t,n)});else for(var i=0,a=Object.keys(e);i<a.length;i++){var o=a[i];dl(o,e[o],t,n)}}function yb(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,ee.isUndefined)(a)){var s=a(o,t);(0,ee.isNull)(s)||(o=s,r=n.element({name:e,replaceInvalidCharsInName:i.replaceInvalidChars,useSelfClosingTagIfEmpty:i.useSelfClosingTagIfEmpty}))}t.forEach(function(p){var l=r;if(!(0,ee.isArray)(p)&&!(0,ee.isSet)(p)){var c=Mi(p,i);if(!(0,ee.isUndefined)(c)&&c(p)===Bi.instance)return;l=r.element({name:o,replaceInvalidCharsInName:i.replaceInvalidChars,useSelfClosingTagIfEmpty:i.useSelfClosingTagIfEmpty})}$i(o,p,l,i)})}function $i(e,t,n,i){var a=Mi(t,i);if((0,ee.isUndefined)(a)||(t=a(t)),(0,ee.isObject)(t)||(0,ee.isMap)(t)){bb(t,n,i);return}if((0,ee.isArray)(t)||(0,ee.isSet)(t)){yb(e,t,n,i);return}hl((0,ee.stringify)(t),n,i)}function xl(e,t,n){var i=new fl.Options(n);$i(e.name,t,e,i)}bt.parseToExistingElement=xl;function wb(e,t,n){var i=new fl.Options(n),a=new ml.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 xl(o,t,n),a.toString(i.format)}bt.parse=wb});var Nt,gl,bl,yl,wl,_l,Sl,El,Dl,ot=Rn(()=>{"use strict";Nt={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."},gl=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."}),bl=(e,t)=>({error:"LifecycleExecutionError",message:`Exceeded maximum retry attempts (${e}) for ${t} LifeCycle`}),yl={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."},wl={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."},_l={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."},Sl={error:"ReadFromStoreError",message:"There was an error reading a file to the Store directory",hint:"There may be an issue such as permissions preventing the file from being read."},El={error:"RenderUUIDError",message:`Render sentinel file does not exist.
|
|
18
18
|
The rendering UUID cannot be read safely.
|
|
19
19
|
There was probably an instance deployment during the render, and files were deleted.
|
|
20
20
|
|
|
@@ -23,7 +23,7 @@ The files generated in this render will not be published.`},Dl={error:"WriteToSt
|
|
|
23
23
|
`).join(`
|
|
24
24
|
`+o),e.push(a+"m+"+aa.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=Cw()+t+" "+e[0]}function Cw(){return he.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Tw(...e){return process.stderr.write(ia.format(...e)+`
|
|
25
25
|
`)}function Pw(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function Iw(){return process.env.DEBUG}function Aw(e){e.inspectOpts={};let t=Object.keys(he.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=he.inspectOpts[t[n]]}aa.exports=dr()(he);var{formatters:Vu}=aa.exports;Vu.o=function(e){return this.inspectOpts.colors=this.useColors,ia.inspect(e,this.inspectOpts).split(`
|
|
26
|
-
`).map(t=>t.trim()).join(" ")};Vu.O=function(e){return this.inspectOpts.colors=this.useColors,ia.inspect(e,this.inspectOpts)}});var Yu=g((RD,hr)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?hr.exports=$u():hr.exports=Ju()});var Qu=g((OD,Ku)=>{var Qn;Ku.exports=function(){if(!Qn){try{Qn=Yu()("follow-redirects")}catch{}typeof Qn!="function"&&(Qn=function(){})}Qn.apply(null,arguments)}});var id=g((CD,Or)=>{var ei=require("url"),Zn=ei.URL,Fw=require("http"),kw=require("https"),yr=require("stream").Writable,wr=require("assert"),Zu=Qu();(function(){var t=typeof process<"u",n=typeof window<"u"&&typeof document<"u",i=Gt(Error.captureStackTrace);!t&&(n||!i)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var _r=!1;try{wr(new Zn(""))}catch(e){_r=e.code==="ERR_INVALID_URL"}var jw=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Sr=["abort","aborted","connect","error","socket","timeout"],Er=Object.create(null);Sr.forEach(function(e){Er[e]=function(t,n,i){this._redirectable.emit(e,t,n,i)}});var vr=ti("ERR_INVALID_URL","Invalid URL",TypeError),gr=ti("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Lw=ti("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",gr),Nw=ti("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),qw=ti("ERR_STREAM_WRITE_AFTER_END","write after end"),Uw=yr.prototype.destroy||td;function Re(e,t){yr.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 gr?a:new gr({cause:a}))}},this._performRequest()}Re.prototype=Object.create(yr.prototype);Re.prototype.abort=function(){Rr(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Re.prototype.destroy=function(e){return Rr(this._currentRequest,e),Uw.call(this,e),this};Re.prototype.write=function(e,t,n){if(this._ending)throw new qw;if(!$t(e)&&!$w(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Gt(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 Nw),this.abort())};Re.prototype.end=function(e,t,n){if(Gt(e)?(n=e,e=t=null):Gt(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 Sr)i.on(a,Er[a]);if(this._currentUrl=/^\//.test(this._options.path)?ei.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(Rr(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Lw;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=[],xr(/^content-/i,this._options.headers));var r=xr(/^host$/i,this._options.headers),s=Dr(this._currentUrl),p=r||s.host,l=/^\w+:/.test(n)?this._currentUrl:ei.format(Object.assign(s,{host:p})),c=Bw(n,l);if(Zu("redirecting to",c.href),this._isRedirect=!0,br(c,this._options),(c.protocol!==s.protocol&&c.protocol!=="https:"||c.host!==p&&!Mw(c.host,p))&&xr(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Gt(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 ed(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 Gw(l)?l=br(l):$t(l)?l=br(Dr(l)):(u=c,c=nd(l),l={protocol:a}),Gt(c)&&(u=c,c=null),c=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},l,c),c.nativeProtocols=n,!$t(c.host)&&!$t(c.hostname)&&(c.hostname="::1"),wr.equal(c.protocol,a,"protocol mismatch"),Zu("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 td(){}function Dr(e){var t;if(_r)t=new Zn(e);else if(t=nd(ei.parse(e)),!$t(t.protocol))throw new vr({input:e});return t}function Bw(e,t){return _r?new Zn(e,t):Dr(ei.resolve(t,e))}function nd(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new vr({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new vr({input:e.href||e});return e}function br(e,t){var n=t||{};for(var i of jw)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 xr(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 ti(e,t,n){function i(a){Gt(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 Rr(e,t){for(var n of Sr)e.removeListener(n,Er[n]);e.on("error",td),e.destroy(t)}function Mw(e,t){wr($t(e)&&$t(t));var n=e.length-t.length-1;return n>0&&e[n]==="."&&e.endsWith(t)}function $t(e){return typeof e=="string"||e instanceof String}function Gt(e){return typeof e=="function"}function $w(e){return typeof e=="object"&&"length"in e}function Gw(e){return Zn&&e instanceof Zn}Or.exports=ed({http:Fw,https:kw});Or.exports.wrap=ed});function Ct(e=""){return is?es.default.resolve(ns.default.sync(__dirname),"../../../",e):es.default.resolve(ns.default.sync(__dirname),"../griddo-components",e)}function D_(){let e=ts.default.sync("jsconfig.json",{cwd:Ct()});return ts.default.sync("tsconfig.json",{cwd:Ct()})||e}function R_(){let e=require(D_());return e||Y(_l),Object.keys(e.compilerOptions?.paths).reduce((t,n)=>{let[i]=n.split("/"),[a]=e.compilerOptions.paths[n],[o]=a.split("/*"),r=Ct(o);return{...t,[i]:r}},{"@griddo-instance":`${Ct()}/src/index.js`})}var es,ts,ns,is,pm,as=Rn(()=>{"use strict";es=R(require("node:path")),ts=R(eo()),ns=R(Si());Je();ot();is=__dirname.includes("node_modules"),pm=R_()});var dm={};Ca(dm,{default:()=>A_});var Qe,va,um,xa,O_,C_,T_,lm,P_,I_,A_,mm=Rn(()=>{"use strict";Qe=R(require("node:path")),va=R(Si());as();um=va.default.sync(Qe.default.resolve(__dirname,"../..")),xa=va.default.sync(__dirname),O_=Qe.default.resolve(va.default.sync(__dirname)),C_=Qe.default.resolve(xa,".cx-cache"),T_=Ct(),lm=Qe.default.join(um,"exports/sites"),{version:P_}=require(Qe.default.join(xa,"package.json")),I_={proDomain:"pro-",griddoVersion:P_,buildReportFileName:"build-report.json",paths:e=>({__cache:Qe.default.join(C_,e||""),__components:T_,__cx:xa,__exports:Qe.default.join(lm,e||""),__root:um,__ssg:O_,__exports_dist:e?Qe.default.join(lm,e,"dist"):"",__cx_dist:Qe.default.join(xa,"dist")})},A_=I_});var K_={};Ca(K_,{FileRegister:()=>ma,MemoryRegister:()=>Dt,Register:()=>Rt,apiRegister:()=>Wt,buildLog:()=>at,componentLibraryPathAlias:()=>pm,debugLog:()=>rn,endpoints:()=>K,envs:()=>O,getBuildPagesFromCachedStore:()=>Rl,getBuildPagesFromStore:()=>No,getBuildPagesPath:()=>Ol,getConfig:()=>z,infoLog:()=>vt,insertAlert:()=>_a,isComponentLibrary:()=>is,pageSizeLog:()=>Xp,resolveComponentsPath:()=>Ct,startRender:()=>Jf,verboseLog:()=>N,walk:()=>zi});module.exports=gs(K_);var bm=R(On());var Me=R(require("node:fs")),Tt=R(require("node:path")),ga=R(ht());nn();var Wa,wp,_p,Sp,Ep=!0;typeof process<"u"&&({FORCE_COLOR:Wa,NODE_DISABLE_COLORS:wp,NO_COLOR:_p,TERM:Sp}=process.env||{},Ep=process.stdout&&process.stdout.isTTY);var bv={enabled:!wp&&_p==null&&Sp!=="dumb"&&(Wa!=null&&Wa!=="0"||Ep)};function G(e,t){let n=new RegExp(`\\x1b\\[${t}m`,"g"),i=`\x1B[${e}m`,a=`\x1B[${t}m`;return function(o){return!bv.enabled||o==null?o:i+(~(""+o).indexOf(a)?o.replace(n,a+i):o)+a}}var LS=G(0,0),NS=G(1,22),qS=G(2,22),US=G(3,23),BS=G(4,24),MS=G(7,27),$S=G(8,28),GS=G(9,29),Dp=G(30,39),zS=G(31,39),XS=G(32,39),HS=G(33,39),WS=G(34,39),VS=G(35,39),JS=G(36,39),YS=G(37,39),KS=G(90,39),QS=G(90,39),ZS=G(40,49),Rp=G(41,49),eE=G(42,49),tE=G(43,49),nE=G(44,49),iE=G(45,49),aE=G(46,49),oE=G(47,49);var fm=R(Si());Je();nn();function N(e){O.GRIDDO_VERBOSE_LOGS&&console.log(V.yellow("verbose"),V.dim(e.replace(/(\s)\s+/g,"$1").trim()))}function on(e,t="",n=1,i=1){let a=e.split(`
|
|
26
|
+
`).map(t=>t.trim()).join(" ")};Vu.O=function(e){return this.inspectOpts.colors=this.useColors,ia.inspect(e,this.inspectOpts)}});var Yu=g((RD,hr)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?hr.exports=$u():hr.exports=Ju()});var Qu=g((OD,Ku)=>{var Qn;Ku.exports=function(){if(!Qn){try{Qn=Yu()("follow-redirects")}catch{}typeof Qn!="function"&&(Qn=function(){})}Qn.apply(null,arguments)}});var id=g((CD,Or)=>{var ei=require("url"),Zn=ei.URL,Fw=require("http"),kw=require("https"),yr=require("stream").Writable,wr=require("assert"),Zu=Qu();(function(){var t=typeof process<"u",n=typeof window<"u"&&typeof document<"u",i=Gt(Error.captureStackTrace);!t&&(n||!i)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var _r=!1;try{wr(new Zn(""))}catch(e){_r=e.code==="ERR_INVALID_URL"}var jw=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Sr=["abort","aborted","connect","error","socket","timeout"],Er=Object.create(null);Sr.forEach(function(e){Er[e]=function(t,n,i){this._redirectable.emit(e,t,n,i)}});var vr=ti("ERR_INVALID_URL","Invalid URL",TypeError),gr=ti("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Lw=ti("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",gr),Nw=ti("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),qw=ti("ERR_STREAM_WRITE_AFTER_END","write after end"),Uw=yr.prototype.destroy||td;function Re(e,t){yr.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 gr?a:new gr({cause:a}))}},this._performRequest()}Re.prototype=Object.create(yr.prototype);Re.prototype.abort=function(){Rr(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Re.prototype.destroy=function(e){return Rr(this._currentRequest,e),Uw.call(this,e),this};Re.prototype.write=function(e,t,n){if(this._ending)throw new qw;if(!$t(e)&&!$w(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Gt(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 Nw),this.abort())};Re.prototype.end=function(e,t,n){if(Gt(e)?(n=e,e=t=null):Gt(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 Sr)i.on(a,Er[a]);if(this._currentUrl=/^\//.test(this._options.path)?ei.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(Rr(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Lw;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=[],xr(/^content-/i,this._options.headers));var r=xr(/^host$/i,this._options.headers),s=Dr(this._currentUrl),p=r||s.host,l=/^\w+:/.test(n)?this._currentUrl:ei.format(Object.assign(s,{host:p})),c=Bw(n,l);if(Zu("redirecting to",c.href),this._isRedirect=!0,br(c,this._options),(c.protocol!==s.protocol&&c.protocol!=="https:"||c.host!==p&&!Mw(c.host,p))&&xr(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Gt(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 ed(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 Gw(l)?l=br(l):$t(l)?l=br(Dr(l)):(u=c,c=nd(l),l={protocol:a}),Gt(c)&&(u=c,c=null),c=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},l,c),c.nativeProtocols=n,!$t(c.host)&&!$t(c.hostname)&&(c.hostname="::1"),wr.equal(c.protocol,a,"protocol mismatch"),Zu("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 td(){}function Dr(e){var t;if(_r)t=new Zn(e);else if(t=nd(ei.parse(e)),!$t(t.protocol))throw new vr({input:e});return t}function Bw(e,t){return _r?new Zn(e,t):Dr(ei.resolve(t,e))}function nd(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new vr({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new vr({input:e.href||e});return e}function br(e,t){var n=t||{};for(var i of jw)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 xr(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 ti(e,t,n){function i(a){Gt(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 Rr(e,t){for(var n of Sr)e.removeListener(n,Er[n]);e.on("error",td),e.destroy(t)}function Mw(e,t){wr($t(e)&&$t(t));var n=e.length-t.length-1;return n>0&&e[n]==="."&&e.endsWith(t)}function $t(e){return typeof e=="string"||e instanceof String}function Gt(e){return typeof e=="function"}function $w(e){return typeof e=="object"&&"length"in e}function Gw(e){return Zn&&e instanceof Zn}Or.exports=ed({http:Fw,https:kw});Or.exports.wrap=ed});function Ct(e=""){return is?es.default.resolve(ns.default.sync(__dirname),"../../../",e):es.default.resolve(ns.default.sync(__dirname),"../griddo-components",e)}function D_(){let e=ts.default.sync("jsconfig.json",{cwd:Ct()});return ts.default.sync("tsconfig.json",{cwd:Ct()})||e}function R_(){let e=require(D_());return e||Y(_l),Object.keys(e.compilerOptions?.paths).reduce((t,n)=>{let[i]=n.split("/"),[a]=e.compilerOptions.paths[n],[o]=a.split("/*"),r=Ct(o);return{...t,[i]:r}},{"@griddo-instance":`${Ct()}/src/index.js`})}var es,ts,ns,is,pm,as=Rn(()=>{"use strict";es=R(require("node:path")),ts=R(eo()),ns=R(Si());Ye();ot();is=__dirname.includes("node_modules"),pm=R_()});var dm={};Ca(dm,{default:()=>A_});var Ze,va,um,xa,O_,C_,T_,lm,P_,I_,A_,mm=Rn(()=>{"use strict";Ze=R(require("node:path")),va=R(Si());as();um=va.default.sync(Ze.default.resolve(__dirname,"../..")),xa=va.default.sync(__dirname),O_=Ze.default.resolve(va.default.sync(__dirname)),C_=Ze.default.resolve(xa,".cx-cache"),T_=Ct(),lm=Ze.default.join(um,"exports/sites"),{version:P_}=require(Ze.default.join(xa,"package.json")),I_={proDomain:"pro-",griddoVersion:P_,buildReportFileName:"build-report.json",paths:e=>({__cache:Ze.default.join(C_,e||""),__components:T_,__cx:xa,__exports:Ze.default.join(lm,e||""),__root:um,__ssg:O_,__exports_dist:e?Ze.default.join(lm,e,"dist"):"",__cx_dist:Ze.default.join(xa,"dist")})},A_=I_});var K_={};Ca(K_,{FileRegister:()=>ma,MemoryRegister:()=>Dt,Register:()=>Rt,apiRegister:()=>Wt,buildLog:()=>at,componentLibraryPathAlias:()=>pm,debugLog:()=>rn,endpoints:()=>K,envs:()=>O,getBuildPagesFromCachedStore:()=>Rl,getBuildPagesFromStore:()=>No,getBuildPagesPath:()=>Ol,getConfig:()=>z,infoLog:()=>vt,insertAlert:()=>_a,isComponentLibrary:()=>is,pageSizeLog:()=>Xp,resolveComponentsPath:()=>Ct,startRender:()=>Jf,verboseLog:()=>N,walk:()=>zi});module.exports=gs(K_);var bm=R(On());var Me=R(require("node:fs")),Tt=R(require("node:path")),ga=R(ht());nn();var Wa,wp,_p,Sp,Ep=!0;typeof process<"u"&&({FORCE_COLOR:Wa,NODE_DISABLE_COLORS:wp,NO_COLOR:_p,TERM:Sp}=process.env||{},Ep=process.stdout&&process.stdout.isTTY);var bv={enabled:!wp&&_p==null&&Sp!=="dumb"&&(Wa!=null&&Wa!=="0"||Ep)};function G(e,t){let n=new RegExp(`\\x1b\\[${t}m`,"g"),i=`\x1B[${e}m`,a=`\x1B[${t}m`;return function(o){return!bv.enabled||o==null?o:i+(~(""+o).indexOf(a)?o.replace(n,a+i):o)+a}}var LS=G(0,0),NS=G(1,22),qS=G(2,22),US=G(3,23),BS=G(4,24),MS=G(7,27),$S=G(8,28),GS=G(9,29),Dp=G(30,39),zS=G(31,39),XS=G(32,39),HS=G(33,39),WS=G(34,39),VS=G(35,39),JS=G(36,39),YS=G(37,39),KS=G(90,39),QS=G(90,39),ZS=G(40,49),Rp=G(41,49),eE=G(42,49),tE=G(43,49),nE=G(44,49),iE=G(45,49),aE=G(46,49),oE=G(47,49);var fm=R(Si());Ye();nn();function N(e){O.GRIDDO_VERBOSE_LOGS&&console.log(V.yellow("verbose"),V.dim(e.replace(/(\s)\s+/g,"$1").trim()))}function on(e,t="",n=1,i=1){let a=e.split(`
|
|
27
27
|
`).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
|
|
28
28
|
`.repeat(i),c=p,u=`\u256D${o}${"\u2500".repeat(c-r)}\u256E
|
|
29
29
|
`,f=`\u2570${"\u2500".repeat(c)}\u256F`,h=a.map(m=>{let x=" ".repeat(p-m.length-n);return`\u2502${" ".repeat(n)}${m}${x}\u2502
|
|
@@ -33,10 +33,10 @@ ${V.bold("Griddo Exporter "+n)} ${V.dim("~ node "+t)}
|
|
|
33
33
|
${e}
|
|
34
34
|
|
|
35
35
|
${i.join(`
|
|
36
|
-
`)||"---"}`)}var Ot=R(require("node:path")),En=R(ht()),Yr=R(vl());var rt=R(require("node:fs")),re=R(require("node:path")),Gi=R(ht());Je();ot();var yt=z();function Rl(e){let{__cache:t}=yt.paths(e);return No({basePath:re.default.join(t,"store"),withSizeProp:!1})}function*No(e){let{basePath:t,withSizeProp:n}=e||{},{__cx:i}=yt.paths(),a=t||re.default.join(i,"store"),o=Xi(a).filter(r=>re.default.extname(r)===".json");for(let r of o)try{let s=Gi.default.readJsonSync(r,{encoding:"utf-8"});if(n){let p=rt.default.statSync(r);s.size=p.size/1024}s.path&&(yield s)}catch(s){Y(Sl,s)}}function Ol(){let e=z(),{__cx:t}=e.paths(),n=re.default.join(t,"store");return zi(n).filter(a=>re.default.extname(a)===".json")}async function qo(){let{__cx:e}=yt.paths(),{sitesToPublish:t,createdPages:n,buildProcessData:i}=Gi.default.readJSONSync(re.default.join(e,"render-metadata.json"));return{buildProcessData:i,createdPages:n,sitesToPublish:t}}function Cl(){let{__cx:e}=yt.paths(),t=re.default.join(e,"store");rt.default.existsSync(t)||(rt.default.mkdirSync(t),rt.default.mkdirSync(re.default.join(t,"metadata"))),console.info("Store initialized")}function Uo(e){let{__cx:t}=yt.paths();rt.default.writeFileSync(re.default.join(t,"render-metadata.json"),JSON.stringify(e))}function _b(e){return rt.default.readdirSync(e).filter(n=>{let i=`${e}/${n}`;if(rt.default.statSync(i)?.isDirectory()||re.default.extname(n)!==".json")return!1;let o=re.default.basename(n,re.default.extname(n));return!Number.isNaN(Number.parseInt(o))}).map(n=>{let i=re.default.basename(n,re.default.extname(n));return Number.parseInt(i)})}function Tl(e,t){let{__cx:n}=yt.paths();try{for(let i of t){Bo(i,["editorID","parentEditorID"]);let a=`${i.context.page.id}.json`,o=re.default.join(n,"store",e,a);Gi.default.writeJSONSync(o,i)}}catch(i){Y(Dl,i)}}function Pl(e,t){let{__cx:n}=yt.paths();if(t.length!==0)for(let i of t){let a=re.default.join(n,"store",e,`${i}.json`);try{rt.default.unlinkSync(a)}catch(o){throw console.log(o),new Error(`Error removing file ${i}`)}}}async function Il(e){let{__cx:t}=yt.paths(),n=re.default.join(t,"store"),{changedPages:i,validPagesIds:a,siteDirName:o}=e,r=re.default.join(n,o),s=_b(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();ot();var Mo=class{headers;async login(){try{let t=await fetch(K.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){Y(yl,t)}}},st=new Mo;function Hn(e,t){return function(){return e.apply(t,arguments)}}var{toString:Sb}=Object.prototype,{getPrototypeOf:zo}=Object,Wi=(e=>t=>{let n=Sb.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),qe=e=>(e=e.toLowerCase(),t=>Wi(t)===e),Vi=e=>t=>typeof t===e,{isArray:pn}=Array,Wn=Vi("undefined");function Eb(e){return e!==null&&!Wn(e)&&e.constructor!==null&&!Wn(e.constructor)&&Pe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var kl=qe("ArrayBuffer");function Db(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&kl(e.buffer),t}var Rb=Vi("string"),Pe=Vi("function"),jl=Vi("number"),Ji=e=>e!==null&&typeof e=="object",Ob=e=>e===!0||e===!1,Hi=e=>{if(Wi(e)!=="object")return!1;let t=zo(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Cb=qe("Date"),Tb=qe("File"),Pb=qe("Blob"),Ib=qe("FileList"),Ab=e=>Ji(e)&&Pe(e.pipe),Fb=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Pe(e.append)&&((t=Wi(e))==="formdata"||t==="object"&&Pe(e.toString)&&e.toString()==="[object FormData]"))},kb=qe("URLSearchParams"),[jb,Lb,Nb,qb]=["ReadableStream","Request","Response","Headers"].map(qe),Ub=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Vn(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,a;if(typeof e!="object"&&(e=[e]),pn(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 Ll(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 qt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Nl=e=>!Wn(e)&&e!==qt;function Go(){let{caseless:e}=Nl(this)&&this||{},t={},n=(i,a)=>{let o=e&&Ll(t,a)||a;Hi(t[o])&&Hi(i)?t[o]=Go(t[o],i):Hi(i)?t[o]=Go({},i):pn(i)?t[o]=i.slice():t[o]=i};for(let i=0,a=arguments.length;i<a;i++)arguments[i]&&Vn(arguments[i],n);return t}var Bb=(e,t,n,{allOwnKeys:i}={})=>(Vn(t,(a,o)=>{n&&Pe(a)?e[o]=Hn(a,n):e[o]=a},{allOwnKeys:i}),e),Mb=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),$b=(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)},Gb=(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&&zo(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},zb=(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},Xb=e=>{if(!e)return null;if(pn(e))return e;let t=e.length;if(!jl(t))return null;let n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Hb=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&zo(Uint8Array)),Wb=(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])}},Vb=(e,t)=>{let n,i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},Jb=qe("HTMLFormElement"),Yb=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,a){return i.toUpperCase()+a}),Al=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Kb=qe("RegExp"),ql=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),i={};Vn(n,(a,o)=>{let r;(r=t(a,o,e))!==!1&&(i[o]=r||a)}),Object.defineProperties(e,i)},Qb=e=>{ql(e,(t,n)=>{if(Pe(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let i=e[n];if(Pe(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+"'")})}})},Zb=(e,t)=>{let n={},i=a=>{a.forEach(o=>{n[o]=!0})};return pn(e)?i(e):i(String(e).split(t)),n},ey=()=>{},ty=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,$o="abcdefghijklmnopqrstuvwxyz",Fl="0123456789",Ul={DIGIT:Fl,ALPHA:$o,ALPHA_DIGIT:$o+$o.toUpperCase()+Fl},ny=(e=16,t=Ul.ALPHA_DIGIT)=>{let n="",{length:i}=t;for(;e--;)n+=t[Math.random()*i|0];return n};function iy(e){return!!(e&&Pe(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var ay=e=>{let t=new Array(10),n=(i,a)=>{if(Ji(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[a]=i;let o=pn(i)?[]:{};return Vn(i,(r,s)=>{let p=n(r,a+1);!Wn(p)&&(o[s]=p)}),t[a]=void 0,o}}return i};return n(e,0)},oy=qe("AsyncFunction"),ry=e=>e&&(Ji(e)||Pe(e))&&Pe(e.then)&&Pe(e.catch),Bl=((e,t)=>e?setImmediate:t?((n,i)=>(qt.addEventListener("message",({source:a,data:o})=>{a===qt&&o===n&&i.length&&i.shift()()},!1),a=>{i.push(a),qt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Pe(qt.postMessage)),sy=typeof queueMicrotask<"u"?queueMicrotask.bind(qt):typeof process<"u"&&process.nextTick||Bl,d={isArray:pn,isArrayBuffer:kl,isBuffer:Eb,isFormData:Fb,isArrayBufferView:Db,isString:Rb,isNumber:jl,isBoolean:Ob,isObject:Ji,isPlainObject:Hi,isReadableStream:jb,isRequest:Lb,isResponse:Nb,isHeaders:qb,isUndefined:Wn,isDate:Cb,isFile:Tb,isBlob:Pb,isRegExp:Kb,isFunction:Pe,isStream:Ab,isURLSearchParams:kb,isTypedArray:Hb,isFileList:Ib,forEach:Vn,merge:Go,extend:Bb,trim:Ub,stripBOM:Mb,inherits:$b,toFlatObject:Gb,kindOf:Wi,kindOfTest:qe,endsWith:zb,toArray:Xb,forEachEntry:Wb,matchAll:Vb,isHTMLForm:Jb,hasOwnProperty:Al,hasOwnProp:Al,reduceDescriptors:ql,freezeMethods:Qb,toObjectSet:Zb,toCamelCase:Yb,noop:ey,toFiniteNumber:ty,findKey:Ll,global:qt,isContextDefined:Nl,ALPHABET:Ul,generateString:ny,isSpecCompliantForm:iy,toJSONObject:ay,isAsyncFn:oy,isThenable:ry,setImmediate:Bl,asap:sy};function ln(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(ln,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 Ml=ln.prototype,$l={};["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=>{$l[e]={value:e}});Object.defineProperties(ln,$l);Object.defineProperty(Ml,"isAxiosError",{value:!0});ln.from=(e,t,n,i,a,o)=>{let r=Object.create(Ml);return d.toFlatObject(e,r,function(p){return p!==Error.prototype},s=>s!=="isAxiosError"),ln.call(r,e.message,t,n,i,a),r.cause=e,r.name=e.name,o&&Object.assign(r,o),r};var y=ln;var Eu=R(Su(),1),Qi=Eu.default;function tr(e){return d.isPlainObject(e)||d.isArray(e)}function Ru(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function Du(e,t,n){return e?e.concat(t).map(function(a,o){return a=Ru(a),!n&&o?"["+a+"]":a}).join(n?".":""):t}function zy(e){return d.isArray(e)&&!e.some(tr)}var Xy=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function Hy(e,t,n){if(!d.isObject(e))throw new TypeError("target must be an object");t=t||new(Qi||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)&&zy(m)||(d.isFileList(m)||d.endsWith(x,"[]"))&&(b=d.toArray(m)))return x=Ru(x),b.forEach(function(_,T){!(d.isUndefined(_)||_===null)&&t.append(r===!0?Du([x],T,o):r===null?x:x+"[]",l(_))}),!1}return tr(m)?!0:(t.append(Du(v,x,o),l(m)),!1)}let u=[],f=Object.assign(Xy,{defaultVisitor:c,convertValue:l,isVisitable:tr});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 wt=Hy;function Ou(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function Cu(e,t){this._pairs=[],e&&wt(e,this,t)}var Tu=Cu.prototype;Tu.append=function(t,n){this._pairs.push([t,n])};Tu.toString=function(t){let n=t?function(i){return t.call(this,i,Ou)}:Ou;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};var Pu=Cu;function Wy(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ut(e,t,n){if(!t)return e;let i=n&&n.encode||Wy,a=n&&n.serialize,o;if(a?o=a(t,n):o=d.isURLSearchParams(t)?t.toString():new Pu(t,n).toString(i),o){let r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var nr=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)})}},ir=nr;var un={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Iu=R(require("url"),1),Au=Iu.default.URLSearchParams;var Fu={isNode:!0,classes:{URLSearchParams:Au,FormData:Qi,Blob:typeof Blob<"u"&&Blob||null},protocols:["http","https","file","data"]};var rr={};Ca(rr,{hasBrowserEnv:()=>or,hasStandardBrowserEnv:()=>Vy,hasStandardBrowserWebWorkerEnv:()=>Jy,navigator:()=>ar,origin:()=>Yy});var or=typeof window<"u"&&typeof document<"u",ar=typeof navigator=="object"&&navigator||void 0,Vy=or&&(!ar||["ReactNative","NativeScript","NS"].indexOf(ar.product)<0),Jy=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Yy=or&&window.location.href||"http://localhost";var B={...rr,...Fu};function sr(e,t){return wt(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 Ky(e){return d.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Qy(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 Zy(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]=Qy(a[r])),!s)}if(d.isFormData(e)&&d.isFunction(e.entries)){let n={};return d.forEachEntry(e,(i,a)=>{t(Ky(i),a,n,0)}),n}return null}var Zi=Zy;function ew(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 cr={transitional:un,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(Zi(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 sr(t,this.formSerializer).toString();if((s=d.isFileList(t))||i.indexOf("multipart/form-data")>-1){let p=this.env&&this.env.FormData;return wt(s?{"files[]":t}:t,p&&new p,this.formSerializer)}}return o||a?(n.setContentType("application/json",!1),ew(t)):t}],transformResponse:[function(t){let n=this.transitional||cr.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=>{cr.headers[e]={}});var dn=cr;var tw=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"]),ku=e=>{let t={},n,i,a;return e&&e.split(`
|
|
36
|
+
`)||"---"}`)}var Ot=R(require("node:path")),En=R(ht()),Yr=R(vl());var rt=R(require("node:fs")),re=R(require("node:path")),Gi=R(ht());Ye();ot();var yt=z();function Rl(e){let{__cache:t}=yt.paths(e);return No({basePath:re.default.join(t,"store"),withSizeProp:!1})}function*No(e){let{basePath:t,withSizeProp:n}=e||{},{__cx:i}=yt.paths(),a=t||re.default.join(i,"store"),o=Xi(a).filter(r=>re.default.extname(r)===".json");for(let r of o)try{let s=Gi.default.readJsonSync(r,{encoding:"utf-8"});if(n){let p=rt.default.statSync(r);s.size=p.size/1024}s.path&&(yield s)}catch(s){Y(Sl,s)}}function Ol(){let e=z(),{__cx:t}=e.paths(),n=re.default.join(t,"store");return zi(n).filter(a=>re.default.extname(a)===".json")}async function qo(){let{__cx:e}=yt.paths(),{sitesToPublish:t,createdPages:n,buildProcessData:i}=Gi.default.readJSONSync(re.default.join(e,"render-metadata.json"));return{buildProcessData:i,createdPages:n,sitesToPublish:t}}function Cl(){let{__cx:e}=yt.paths(),t=re.default.join(e,"store");rt.default.existsSync(t)||(rt.default.mkdirSync(t),rt.default.mkdirSync(re.default.join(t,"metadata"))),console.info("Store initialized")}function Uo(e){let{__cx:t}=yt.paths();rt.default.writeFileSync(re.default.join(t,"render-metadata.json"),JSON.stringify(e))}function _b(e){return rt.default.readdirSync(e).filter(n=>{let i=`${e}/${n}`;if(rt.default.statSync(i)?.isDirectory()||re.default.extname(n)!==".json")return!1;let o=re.default.basename(n,re.default.extname(n));return!Number.isNaN(Number.parseInt(o))}).map(n=>{let i=re.default.basename(n,re.default.extname(n));return Number.parseInt(i)})}function Tl(e,t){let{__cx:n}=yt.paths();try{for(let i of t){Bo(i,["editorID","parentEditorID"]);let a=`${i.context.page.id}.json`,o=re.default.join(n,"store",e,a);Gi.default.writeJSONSync(o,i)}}catch(i){Y(Dl,i)}}function Pl(e,t){let{__cx:n}=yt.paths();if(t.length!==0)for(let i of t){let a=re.default.join(n,"store",e,`${i}.json`);try{rt.default.unlinkSync(a)}catch(o){throw console.log(o),new Error(`Error removing file ${i}`)}}}async function Il(e){let{__cx:t}=yt.paths(),n=re.default.join(t,"store"),{changedPages:i,validPagesIds:a,siteDirName:o}=e,r=re.default.join(n,o),s=_b(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}}Ye();ot();var Mo=class{headers;async login(){try{let t=await fetch(K.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){Y(yl,t)}}},st=new Mo;function Hn(e,t){return function(){return e.apply(t,arguments)}}var{toString:Sb}=Object.prototype,{getPrototypeOf:zo}=Object,Wi=(e=>t=>{let n=Sb.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),qe=e=>(e=e.toLowerCase(),t=>Wi(t)===e),Vi=e=>t=>typeof t===e,{isArray:pn}=Array,Wn=Vi("undefined");function Eb(e){return e!==null&&!Wn(e)&&e.constructor!==null&&!Wn(e.constructor)&&Pe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var kl=qe("ArrayBuffer");function Db(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&kl(e.buffer),t}var Rb=Vi("string"),Pe=Vi("function"),jl=Vi("number"),Ji=e=>e!==null&&typeof e=="object",Ob=e=>e===!0||e===!1,Hi=e=>{if(Wi(e)!=="object")return!1;let t=zo(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Cb=qe("Date"),Tb=qe("File"),Pb=qe("Blob"),Ib=qe("FileList"),Ab=e=>Ji(e)&&Pe(e.pipe),Fb=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Pe(e.append)&&((t=Wi(e))==="formdata"||t==="object"&&Pe(e.toString)&&e.toString()==="[object FormData]"))},kb=qe("URLSearchParams"),[jb,Lb,Nb,qb]=["ReadableStream","Request","Response","Headers"].map(qe),Ub=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Vn(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,a;if(typeof e!="object"&&(e=[e]),pn(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 Ll(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 qt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Nl=e=>!Wn(e)&&e!==qt;function Go(){let{caseless:e}=Nl(this)&&this||{},t={},n=(i,a)=>{let o=e&&Ll(t,a)||a;Hi(t[o])&&Hi(i)?t[o]=Go(t[o],i):Hi(i)?t[o]=Go({},i):pn(i)?t[o]=i.slice():t[o]=i};for(let i=0,a=arguments.length;i<a;i++)arguments[i]&&Vn(arguments[i],n);return t}var Bb=(e,t,n,{allOwnKeys:i}={})=>(Vn(t,(a,o)=>{n&&Pe(a)?e[o]=Hn(a,n):e[o]=a},{allOwnKeys:i}),e),Mb=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),$b=(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)},Gb=(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&&zo(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},zb=(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},Xb=e=>{if(!e)return null;if(pn(e))return e;let t=e.length;if(!jl(t))return null;let n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Hb=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&zo(Uint8Array)),Wb=(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])}},Vb=(e,t)=>{let n,i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},Jb=qe("HTMLFormElement"),Yb=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,a){return i.toUpperCase()+a}),Al=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Kb=qe("RegExp"),ql=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),i={};Vn(n,(a,o)=>{let r;(r=t(a,o,e))!==!1&&(i[o]=r||a)}),Object.defineProperties(e,i)},Qb=e=>{ql(e,(t,n)=>{if(Pe(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let i=e[n];if(Pe(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+"'")})}})},Zb=(e,t)=>{let n={},i=a=>{a.forEach(o=>{n[o]=!0})};return pn(e)?i(e):i(String(e).split(t)),n},ey=()=>{},ty=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,$o="abcdefghijklmnopqrstuvwxyz",Fl="0123456789",Ul={DIGIT:Fl,ALPHA:$o,ALPHA_DIGIT:$o+$o.toUpperCase()+Fl},ny=(e=16,t=Ul.ALPHA_DIGIT)=>{let n="",{length:i}=t;for(;e--;)n+=t[Math.random()*i|0];return n};function iy(e){return!!(e&&Pe(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var ay=e=>{let t=new Array(10),n=(i,a)=>{if(Ji(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[a]=i;let o=pn(i)?[]:{};return Vn(i,(r,s)=>{let p=n(r,a+1);!Wn(p)&&(o[s]=p)}),t[a]=void 0,o}}return i};return n(e,0)},oy=qe("AsyncFunction"),ry=e=>e&&(Ji(e)||Pe(e))&&Pe(e.then)&&Pe(e.catch),Bl=((e,t)=>e?setImmediate:t?((n,i)=>(qt.addEventListener("message",({source:a,data:o})=>{a===qt&&o===n&&i.length&&i.shift()()},!1),a=>{i.push(a),qt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Pe(qt.postMessage)),sy=typeof queueMicrotask<"u"?queueMicrotask.bind(qt):typeof process<"u"&&process.nextTick||Bl,d={isArray:pn,isArrayBuffer:kl,isBuffer:Eb,isFormData:Fb,isArrayBufferView:Db,isString:Rb,isNumber:jl,isBoolean:Ob,isObject:Ji,isPlainObject:Hi,isReadableStream:jb,isRequest:Lb,isResponse:Nb,isHeaders:qb,isUndefined:Wn,isDate:Cb,isFile:Tb,isBlob:Pb,isRegExp:Kb,isFunction:Pe,isStream:Ab,isURLSearchParams:kb,isTypedArray:Hb,isFileList:Ib,forEach:Vn,merge:Go,extend:Bb,trim:Ub,stripBOM:Mb,inherits:$b,toFlatObject:Gb,kindOf:Wi,kindOfTest:qe,endsWith:zb,toArray:Xb,forEachEntry:Wb,matchAll:Vb,isHTMLForm:Jb,hasOwnProperty:Al,hasOwnProp:Al,reduceDescriptors:ql,freezeMethods:Qb,toObjectSet:Zb,toCamelCase:Yb,noop:ey,toFiniteNumber:ty,findKey:Ll,global:qt,isContextDefined:Nl,ALPHABET:Ul,generateString:ny,isSpecCompliantForm:iy,toJSONObject:ay,isAsyncFn:oy,isThenable:ry,setImmediate:Bl,asap:sy};function ln(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(ln,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 Ml=ln.prototype,$l={};["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=>{$l[e]={value:e}});Object.defineProperties(ln,$l);Object.defineProperty(Ml,"isAxiosError",{value:!0});ln.from=(e,t,n,i,a,o)=>{let r=Object.create(Ml);return d.toFlatObject(e,r,function(p){return p!==Error.prototype},s=>s!=="isAxiosError"),ln.call(r,e.message,t,n,i,a),r.cause=e,r.name=e.name,o&&Object.assign(r,o),r};var y=ln;var Eu=R(Su(),1),Qi=Eu.default;function tr(e){return d.isPlainObject(e)||d.isArray(e)}function Ru(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function Du(e,t,n){return e?e.concat(t).map(function(a,o){return a=Ru(a),!n&&o?"["+a+"]":a}).join(n?".":""):t}function zy(e){return d.isArray(e)&&!e.some(tr)}var Xy=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function Hy(e,t,n){if(!d.isObject(e))throw new TypeError("target must be an object");t=t||new(Qi||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)&&zy(m)||(d.isFileList(m)||d.endsWith(x,"[]"))&&(b=d.toArray(m)))return x=Ru(x),b.forEach(function(_,T){!(d.isUndefined(_)||_===null)&&t.append(r===!0?Du([x],T,o):r===null?x:x+"[]",l(_))}),!1}return tr(m)?!0:(t.append(Du(v,x,o),l(m)),!1)}let u=[],f=Object.assign(Xy,{defaultVisitor:c,convertValue:l,isVisitable:tr});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 wt=Hy;function Ou(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function Cu(e,t){this._pairs=[],e&&wt(e,this,t)}var Tu=Cu.prototype;Tu.append=function(t,n){this._pairs.push([t,n])};Tu.toString=function(t){let n=t?function(i){return t.call(this,i,Ou)}:Ou;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};var Pu=Cu;function Wy(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ut(e,t,n){if(!t)return e;let i=n&&n.encode||Wy,a=n&&n.serialize,o;if(a?o=a(t,n):o=d.isURLSearchParams(t)?t.toString():new Pu(t,n).toString(i),o){let r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var nr=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)})}},ir=nr;var un={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Iu=R(require("url"),1),Au=Iu.default.URLSearchParams;var Fu={isNode:!0,classes:{URLSearchParams:Au,FormData:Qi,Blob:typeof Blob<"u"&&Blob||null},protocols:["http","https","file","data"]};var rr={};Ca(rr,{hasBrowserEnv:()=>or,hasStandardBrowserEnv:()=>Vy,hasStandardBrowserWebWorkerEnv:()=>Jy,navigator:()=>ar,origin:()=>Yy});var or=typeof window<"u"&&typeof document<"u",ar=typeof navigator=="object"&&navigator||void 0,Vy=or&&(!ar||["ReactNative","NativeScript","NS"].indexOf(ar.product)<0),Jy=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Yy=or&&window.location.href||"http://localhost";var B={...rr,...Fu};function sr(e,t){return wt(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 Ky(e){return d.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Qy(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 Zy(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]=Qy(a[r])),!s)}if(d.isFormData(e)&&d.isFunction(e.entries)){let n={};return d.forEachEntry(e,(i,a)=>{t(Ky(i),a,n,0)}),n}return null}var Zi=Zy;function ew(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 cr={transitional:un,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(Zi(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 sr(t,this.formSerializer).toString();if((s=d.isFileList(t))||i.indexOf("multipart/form-data")>-1){let p=this.env&&this.env.FormData;return wt(s?{"files[]":t}:t,p&&new p,this.formSerializer)}}return o||a?(n.setContentType("application/json",!1),ew(t)):t}],transformResponse:[function(t){let n=this.transitional||cr.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=>{cr.headers[e]={}});var dn=cr;var tw=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"]),ku=e=>{let t={},n,i,a;return e&&e.split(`
|
|
37
37
|
`).forEach(function(r){a=r.indexOf(":"),n=r.substring(0,a).trim().toLowerCase(),i=r.substring(a+1).trim(),!(!n||t[n]&&tw[n])&&(n==="set-cookie"?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t};var ju=Symbol("internals");function Jn(e){return e&&String(e).trim().toLowerCase()}function ea(e){return e===!1||e==null?e:d.isArray(e)?e.map(ea):String(e)}function nw(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 iw=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function pr(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 aw(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,i)=>n.toUpperCase()+i)}function ow(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 mn=class{constructor(t){t&&this.set(t)}set(t,n,i){let a=this;function o(s,p,l){let c=Jn(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]=ea(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())&&!iw(t))r(ku(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=Jn(t),t){let i=d.findKey(this,t);if(i){let a=this[i];if(!n)return a;if(n===!0)return nw(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=Jn(t),t){let i=d.findKey(this,t);return!!(i&&this[i]!==void 0&&(!n||pr(this,this[i],i,n)))}return!1}delete(t,n){let i=this,a=!1;function o(r){if(r=Jn(r),r){let s=d.findKey(i,r);s&&(!n||pr(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||pr(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]=ea(a),delete n[o];return}let s=t?aw(o):String(o).trim();s!==o&&delete n[o],n[s]=ea(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(`
|
|
38
|
-
`)}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[ju]=this[ju]={accessors:{}}).accessors,a=this.prototype;function o(r){let s=Jn(r);i[s]||(ow(a,r),i[s]=!0)}return d.isArray(t)?t.forEach(o):o(t),this}};mn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(mn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}});d.freezeMethods(mn);var J=mn;function Yn(e,t){let n=this||dn,i=t||n,a=J.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 Kn(e){return!!(e&&e.__CANCEL__)}function Lu(e,t,n){y.call(this,e??"canceled",y.ERR_CANCELED,t,n),this.name="CanceledError"}d.inherits(Lu,y,{__CANCEL__:!0});var Ie=Lu;function
|
|
39
|
-
`,Ww=ii.encode(St),Vw=2,Ar=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)}"`:""}${St}`;a?n=ii.encode(String(n).replace(/\r?\n|\r\n?/g,St)):o+=`Content-Type: ${n.type||"application/octet-stream"}${St}`,this.headers=ii.encode(o+St),this.contentLength=a?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+Vw,this.name=t,this.value=n}async*encode(){yield this.headers;let{value:t}=this;d.isTypedArray(t)?yield t:yield*oa(t),yield Ww}static escapeName(t){return String(t).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},Jw=(e,t,n)=>{let{tag:i="form-data-boundary",size:a=25,boundary:o=i+"-"+d.generateString(a,Hw)}=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=ii.encode("--"+o+St),s=ii.encode("--"+o+"--"+St+St),p=s.byteLength,l=Array.from(e.entries()).map(([u,f])=>{let h=new Ar(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),sd.Readable.from(async function*(){for(let u of l)yield r,yield*u.encode();yield s}())},cd=Jw;var pd=R(require("stream"),1),Fr=class extends pd.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)}},ld=Fr;var Yw=(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,ud=Yw;function Kw(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 dd=Kw;function Qw(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 md=Qw;var ct=(e,t,n=3)=>{let i=0,a=dd(50,250);return md(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)},gn=(e,t)=>{let n=e!=null;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},bn=e=>(...t)=>d.asap(()=>e(...t));var fd={flush:pt.default.constants.Z_SYNC_FLUSH,finishFlush:pt.default.constants.Z_SYNC_FLUSH},Zw={flush:pt.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:pt.default.constants.BROTLI_OPERATION_FLUSH},hd=d.isFunction(pt.default.createBrotliDecompress),{http:e_,https:t_}=Sd.default,n_=/https:?/,xd=B.protocols.map(e=>e+":"),vd=(e,[t,n])=>(e.on("end",n).on("error",n),t);function i_(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function Dd(e,t,n){let i=t;if(!i&&i!==!1){let a=(0,bd.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){Dd(o,t,o.href)}}var a_=typeof process<"u"&&d.kindOf(process)==="process",o_=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)}),r_=({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)}},gd=(e,t)=>r_(d.isObject(e)?e:{address:e,family:t}),Rd=a_&&function(t){return o_(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=ud(s,S=>d.isArray(S)?S:[S]);s=(S,C,Xe)=>{w(S,C,(ie,He,Jt)=>{if(ie)return Xe(ie);let Te=d.isArray(He)?He.map(_e=>gd(_e)):[gd(He,Jt)];C.all?Xe(ie,Te):Xe(ie,Te[0].address,Te[0].family)})}}let x=new Ed.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 Ie(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=Bt(t.baseURL,t.url),_=new URL(E,B.hasBrowserEnv?B.origin:void 0),T=_.protocol||xd[0];if(T==="data:"){let w;if(u!=="GET")return Ke(i,a,{status:405,statusText:"method not allowed",headers:{},config:t});try{w=Cr(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=Xt.default.Readable.from(w)),Ke(i,a,{data:w,status:200,statusText:"OK",headers:new J,config:t})}if(xd.indexOf(T)===-1)return a(new y("Unsupported protocol "+T,y.ERR_BAD_REQUEST,t));let I=J.from(t.headers).normalize();I.set("User-Agent","axios/"+zt,!1);let{onUploadProgress:X,onDownloadProgress:ne}=t,Z=t.maxRate,D,A;if(d.isSpecCompliantForm(r)){let w=I.getContentType(/boundary=([-_\w\d]{10,70})/i);r=cd(r,S=>{I.set(S)},{tag:`axios-${zt}-boundary`,boundary:w&&w[1]||void 0})}else if(d.isFormData(r)&&d.isFunction(r.getHeaders)){if(I.set(r.getHeaders()),!I.hasContentLength())try{let w=await _d.default.promisify(r.getLength).call(r);Number.isFinite(w)&&w>=0&&I.setContentLength(w)}catch{}}else if(d.isBlob(r))r.size&&I.setContentType(r.type||"application/octet-stream"),I.setContentLength(r.size||0),r=Xt.default.Readable.from(oa(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(I.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(I.getContentLength());d.isArray(Z)?(D=Z[0],A=Z[1]):D=A=Z,r&&(X||D)&&(d.isStream(r)||(r=Xt.default.Readable.from(r,{objectMode:!1})),r=Xt.default.pipeline([r,new Ir({maxRate:d.toFiniteNumber(D)})],d.noop),X&&r.on("progress",vd(r,gn(F,ct(bn(X),!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&&I.delete("authorization");let H;try{H=Ut(_.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)}I.set("Accept-Encoding","gzip, compress, deflate"+(hd?", br":""),!1);let k={path:H,method:u,headers:I.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:M,protocol:T,family:p,beforeRedirect:i_,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,Dd(k,t.proxy,T+"//"+_.hostname+(_.port?":"+_.port:"")+k.path));let L,q=n_.test(k.protocol);if(k.agent=q?t.httpsAgent:t.httpAgent,t.transport?L=t.transport:t.maxRedirects===0?L=q?wd.default:yd.default:(t.maxRedirects&&(k.maxRedirects=t.maxRedirects),t.beforeRedirect&&(k.beforeRedirects.config=t.beforeRedirect),L=q?t_:e_),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],Xe=+S.headers["content-length"];if(ne||A){let _e=new Ir({maxRate:d.toFiniteNumber(A)});ne&&_e.on("progress",vd(_e,gn(Xe,ct(bn(ne),!0,3)))),C.push(_e)}let ie=S,He=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(pt.default.createUnzip(fd)),delete S.headers["content-encoding"];break;case"deflate":C.push(new ld),C.push(pt.default.createUnzip(fd)),delete S.headers["content-encoding"];break;case"br":hd&&(C.push(pt.default.createBrotliDecompress(Zw)),delete S.headers["content-encoding"])}ie=C.length>1?Xt.default.pipeline(C,d.noop):C[0];let Jt=Xt.default.finished(ie,()=>{Jt(),v()}),Te={status:S.statusCode,statusText:S.statusMessage,headers:new J(S.headers),config:t,request:He};if(l==="stream")Te.data=ie,Ke(i,a,Te);else{let _e=[],oi=0;ie.on("data",function(se){_e.push(se),oi+=se.length,t.maxContentLength>-1&&oi>t.maxContentLength&&(h=!0,ie.destroy(),a(new y("maxContentLength size of "+t.maxContentLength+" exceeded",y.ERR_BAD_RESPONSE,t,He)))}),ie.on("aborted",function(){if(h)return;let se=new y("maxContentLength size of "+t.maxContentLength+" exceeded",y.ERR_BAD_RESPONSE,t,He);ie.destroy(se),a(se)}),ie.on("error",function(se){m.destroyed||a(y.from(se,null,t,He))}),ie.on("end",function(){try{let se=_e.length===1?_e[0]:Buffer.concat(_e);l!=="arraybuffer"&&(se=se.toString(c),(!c||c==="utf8")&&(se=d.stripBOM(se))),Te.data=se}catch(se){return a(y.from(se,null,t,Te.request,Te))}Ke(i,a,Te)})}x.once("abort",_e=>{ie.destroyed||(ie.emit("error",_e),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",Xe=t.transitional||un;t.timeoutErrorMessage&&(C=t.timeoutErrorMessage),a(new y(C,Xe.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 Ie("Request stream has been aborted",t,m))}),r.pipe(m)}else m.end(r)})};var Od=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 Cd=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 Td=e=>e instanceof J?{...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(Td(l),Td(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 ra=e=>{let t=Be({},e),{data:n,withXSRFToken:i,xsrfHeaderName:a,xsrfCookieName:o,headers:r,auth:s}=t;t.headers=r=J.from(r),t.url=Ut(Bt(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&&Od(t.url))){let l=a&&o&&Cd.read(o);l&&r.set(a,l)}return t};var s_=typeof XMLHttpRequest<"u",Pd=s_&&function(e){return new Promise(function(n,i){let a=ra(e),o=a.data,r=J.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 _=J.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),I={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()},I),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",I=a.transitional||un;a.timeoutErrorMessage&&(T=a.timeoutErrorMessage),i(new y(T,I.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,v)),v=null},o===void 0&&r.setContentType(null),"setRequestHeader"in v&&d.forEach(r.toJSON(),function(T,I){v.setRequestHeader(I,T)}),d.isUndefined(a.withCredentials)||(v.withCredentials=!!a.withCredentials),s&&s!=="json"&&(v.responseType=a.responseType),l&&([f,m]=ct(l,!0),v.addEventListener("progress",f)),p&&v.upload&&([u,h]=ct(p),v.upload.addEventListener("progress",u),v.upload.addEventListener("loadend",h)),(a.cancelToken||a.signal)&&(c=_=>{v&&(i(!_||_.type?new Ie(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=ni(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 c_=(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 Ie(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}},Id=c_;var p_=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},l_=async function*(e,t){for await(let n of u_(e))yield*p_(n,t)},u_=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()}},kr=(e,t,n,i)=>{let a=l_(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 ca=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Fd=ca&&typeof ReadableStream=="function",d_=ca&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),kd=(e,...t)=>{try{return!!e(...t)}catch{return!1}},m_=Fd&&kd(()=>{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}),Ad=64*1024,jr=Fd&&kd(()=>d.isReadableStream(new Response("").body)),sa={stream:jr&&(e=>e.body)};ca&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!sa[t]&&(sa[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 f_=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 d_(e)).byteLength},h_=async(e,t)=>{let n=d.toFiniteNumber(e.getContentLength());return n??f_(t)},jd=ca&&(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}=ra(e);l=l?(l+"").toLowerCase():"text";let h=Id([a,o&&o.toAbortSignal()],r),m,x=h&&h.unsubscribe&&(()=>{h.unsubscribe()}),v;try{if(p&&m_&&n!=="get"&&n!=="head"&&(v=await h_(c,i))!==0){let I=new Request(t,{method:"POST",body:i,duplex:"half"}),X;if(d.isFormData(i)&&(X=I.headers.get("content-type"))&&c.setContentType(X),I.body){let[ne,Z]=gn(v,ct(bn(p)));i=kr(I.body,Ad,ne,Z)}}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),_=jr&&(l==="stream"||l==="response");if(jr&&(s||_&&x)){let I={};["status","statusText","headers"].forEach(D=>{I[D]=E[D]});let X=d.toFiniteNumber(E.headers.get("content-length")),[ne,Z]=s&&gn(X,ct(bn(s),!0))||[];E=new Response(kr(E.body,Ad,ne,()=>{Z&&Z(),x&&x()}),I)}l=l||"text";let T=await sa[d.findKey(sa,l)||"text"](E,e);return!_&&x&&x(),await new Promise((I,X)=>{Ke(I,X,{data:T,headers:J.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 Lr={http:Rd,xhr:Pd,fetch:jd};d.forEach(Lr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var Ld=e=>`- ${e}`,x_=e=>d.isFunction(e)||e===null||e===!1,pa={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,!x_(n)&&(i=Lr[(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 :
|
|
38
|
+
`)}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[ju]=this[ju]={accessors:{}}).accessors,a=this.prototype;function o(r){let s=Jn(r);i[s]||(ow(a,r),i[s]=!0)}return d.isArray(t)?t.forEach(o):o(t),this}};mn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(mn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}});d.freezeMethods(mn);var J=mn;function Yn(e,t){let n=this||dn,i=t||n,a=J.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 Kn(e){return!!(e&&e.__CANCEL__)}function Lu(e,t,n){y.call(this,e??"canceled",y.ERR_CANCELED,t,n),this.name="CanceledError"}d.inherits(Lu,y,{__CANCEL__:!0});var Ie=Lu;function Qe(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 lr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ur(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Bt(e,t){return e&&!lr(t)?ur(e,t):t}var bd=R(qu(),1),yd=R(require("http"),1),wd=R(require("https"),1),_d=R(require("util"),1),Sd=R(id(),1),pt=R(require("zlib"),1);var zt="1.7.7";function ni(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var zw=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Cr(e,t,n){let i=n&&n.Blob||B.classes.Blob,a=ni(e);if(t===void 0&&i&&(t=!0),a==="data"){e=a.length?e.slice(a.length+1):e;let o=zw.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 Xt=R(require("stream"),1);var ad=R(require("stream"),1);var Tr=Symbol("internals"),Pr=class extends ad.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[Tr]={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[Tr];return n.onReadCallback&&n.onReadCallback(),super._read(t)}_transform(t,n,i){let a=this[Tr],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)})}},Ir=Pr;var Ed=require("events");var rd=require("util"),sd=require("stream");var{asyncIterator:od}=Symbol,Xw=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[od]?yield*e[od]():yield e},oa=Xw;var Hw=d.ALPHABET.ALPHA_DIGIT+"-_",ii=new rd.TextEncoder,St=`\r
|
|
39
|
+
`,Ww=ii.encode(St),Vw=2,Ar=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)}"`:""}${St}`;a?n=ii.encode(String(n).replace(/\r?\n|\r\n?/g,St)):o+=`Content-Type: ${n.type||"application/octet-stream"}${St}`,this.headers=ii.encode(o+St),this.contentLength=a?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+Vw,this.name=t,this.value=n}async*encode(){yield this.headers;let{value:t}=this;d.isTypedArray(t)?yield t:yield*oa(t),yield Ww}static escapeName(t){return String(t).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},Jw=(e,t,n)=>{let{tag:i="form-data-boundary",size:a=25,boundary:o=i+"-"+d.generateString(a,Hw)}=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=ii.encode("--"+o+St),s=ii.encode("--"+o+"--"+St+St),p=s.byteLength,l=Array.from(e.entries()).map(([u,f])=>{let h=new Ar(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),sd.Readable.from(async function*(){for(let u of l)yield r,yield*u.encode();yield s}())},cd=Jw;var pd=R(require("stream"),1),Fr=class extends pd.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)}},ld=Fr;var Yw=(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,ud=Yw;function Kw(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 dd=Kw;function Qw(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 md=Qw;var ct=(e,t,n=3)=>{let i=0,a=dd(50,250);return md(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)},gn=(e,t)=>{let n=e!=null;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},bn=e=>(...t)=>d.asap(()=>e(...t));var fd={flush:pt.default.constants.Z_SYNC_FLUSH,finishFlush:pt.default.constants.Z_SYNC_FLUSH},Zw={flush:pt.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:pt.default.constants.BROTLI_OPERATION_FLUSH},hd=d.isFunction(pt.default.createBrotliDecompress),{http:e_,https:t_}=Sd.default,n_=/https:?/,xd=B.protocols.map(e=>e+":"),vd=(e,[t,n])=>(e.on("end",n).on("error",n),t);function i_(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function Dd(e,t,n){let i=t;if(!i&&i!==!1){let a=(0,bd.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){Dd(o,t,o.href)}}var a_=typeof process<"u"&&d.kindOf(process)==="process",o_=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)}),r_=({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)}},gd=(e,t)=>r_(d.isObject(e)?e:{address:e,family:t}),Rd=a_&&function(t){return o_(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=ud(s,S=>d.isArray(S)?S:[S]);s=(S,C,Xe)=>{w(S,C,(ie,He,Jt)=>{if(ie)return Xe(ie);let Te=d.isArray(He)?He.map(_e=>gd(_e)):[gd(He,Jt)];C.all?Xe(ie,Te):Xe(ie,Te[0].address,Te[0].family)})}}let x=new Ed.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 Ie(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=Bt(t.baseURL,t.url),_=new URL(E,B.hasBrowserEnv?B.origin:void 0),T=_.protocol||xd[0];if(T==="data:"){let w;if(u!=="GET")return Qe(i,a,{status:405,statusText:"method not allowed",headers:{},config:t});try{w=Cr(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=Xt.default.Readable.from(w)),Qe(i,a,{data:w,status:200,statusText:"OK",headers:new J,config:t})}if(xd.indexOf(T)===-1)return a(new y("Unsupported protocol "+T,y.ERR_BAD_REQUEST,t));let I=J.from(t.headers).normalize();I.set("User-Agent","axios/"+zt,!1);let{onUploadProgress:X,onDownloadProgress:ne}=t,Z=t.maxRate,D,A;if(d.isSpecCompliantForm(r)){let w=I.getContentType(/boundary=([-_\w\d]{10,70})/i);r=cd(r,S=>{I.set(S)},{tag:`axios-${zt}-boundary`,boundary:w&&w[1]||void 0})}else if(d.isFormData(r)&&d.isFunction(r.getHeaders)){if(I.set(r.getHeaders()),!I.hasContentLength())try{let w=await _d.default.promisify(r.getLength).call(r);Number.isFinite(w)&&w>=0&&I.setContentLength(w)}catch{}}else if(d.isBlob(r))r.size&&I.setContentType(r.type||"application/octet-stream"),I.setContentLength(r.size||0),r=Xt.default.Readable.from(oa(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(I.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(I.getContentLength());d.isArray(Z)?(D=Z[0],A=Z[1]):D=A=Z,r&&(X||D)&&(d.isStream(r)||(r=Xt.default.Readable.from(r,{objectMode:!1})),r=Xt.default.pipeline([r,new Ir({maxRate:d.toFiniteNumber(D)})],d.noop),X&&r.on("progress",vd(r,gn(F,ct(bn(X),!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&&I.delete("authorization");let H;try{H=Ut(_.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)}I.set("Accept-Encoding","gzip, compress, deflate"+(hd?", br":""),!1);let k={path:H,method:u,headers:I.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:M,protocol:T,family:p,beforeRedirect:i_,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,Dd(k,t.proxy,T+"//"+_.hostname+(_.port?":"+_.port:"")+k.path));let L,q=n_.test(k.protocol);if(k.agent=q?t.httpsAgent:t.httpAgent,t.transport?L=t.transport:t.maxRedirects===0?L=q?wd.default:yd.default:(t.maxRedirects&&(k.maxRedirects=t.maxRedirects),t.beforeRedirect&&(k.beforeRedirects.config=t.beforeRedirect),L=q?t_:e_),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],Xe=+S.headers["content-length"];if(ne||A){let _e=new Ir({maxRate:d.toFiniteNumber(A)});ne&&_e.on("progress",vd(_e,gn(Xe,ct(bn(ne),!0,3)))),C.push(_e)}let ie=S,He=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(pt.default.createUnzip(fd)),delete S.headers["content-encoding"];break;case"deflate":C.push(new ld),C.push(pt.default.createUnzip(fd)),delete S.headers["content-encoding"];break;case"br":hd&&(C.push(pt.default.createBrotliDecompress(Zw)),delete S.headers["content-encoding"])}ie=C.length>1?Xt.default.pipeline(C,d.noop):C[0];let Jt=Xt.default.finished(ie,()=>{Jt(),v()}),Te={status:S.statusCode,statusText:S.statusMessage,headers:new J(S.headers),config:t,request:He};if(l==="stream")Te.data=ie,Qe(i,a,Te);else{let _e=[],oi=0;ie.on("data",function(se){_e.push(se),oi+=se.length,t.maxContentLength>-1&&oi>t.maxContentLength&&(h=!0,ie.destroy(),a(new y("maxContentLength size of "+t.maxContentLength+" exceeded",y.ERR_BAD_RESPONSE,t,He)))}),ie.on("aborted",function(){if(h)return;let se=new y("maxContentLength size of "+t.maxContentLength+" exceeded",y.ERR_BAD_RESPONSE,t,He);ie.destroy(se),a(se)}),ie.on("error",function(se){m.destroyed||a(y.from(se,null,t,He))}),ie.on("end",function(){try{let se=_e.length===1?_e[0]:Buffer.concat(_e);l!=="arraybuffer"&&(se=se.toString(c),(!c||c==="utf8")&&(se=d.stripBOM(se))),Te.data=se}catch(se){return a(y.from(se,null,t,Te.request,Te))}Qe(i,a,Te)})}x.once("abort",_e=>{ie.destroyed||(ie.emit("error",_e),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",Xe=t.transitional||un;t.timeoutErrorMessage&&(C=t.timeoutErrorMessage),a(new y(C,Xe.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 Ie("Request stream has been aborted",t,m))}),r.pipe(m)}else m.end(r)})};var Od=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 Cd=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 Td=e=>e instanceof J?{...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(Td(l),Td(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 ra=e=>{let t=Be({},e),{data:n,withXSRFToken:i,xsrfHeaderName:a,xsrfCookieName:o,headers:r,auth:s}=t;t.headers=r=J.from(r),t.url=Ut(Bt(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&&Od(t.url))){let l=a&&o&&Cd.read(o);l&&r.set(a,l)}return t};var s_=typeof XMLHttpRequest<"u",Pd=s_&&function(e){return new Promise(function(n,i){let a=ra(e),o=a.data,r=J.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 _=J.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),I={data:!s||s==="text"||s==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:_,config:e,request:v};Qe(function(ne){n(ne),x()},function(ne){i(ne),x()},I),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",I=a.transitional||un;a.timeoutErrorMessage&&(T=a.timeoutErrorMessage),i(new y(T,I.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,v)),v=null},o===void 0&&r.setContentType(null),"setRequestHeader"in v&&d.forEach(r.toJSON(),function(T,I){v.setRequestHeader(I,T)}),d.isUndefined(a.withCredentials)||(v.withCredentials=!!a.withCredentials),s&&s!=="json"&&(v.responseType=a.responseType),l&&([f,m]=ct(l,!0),v.addEventListener("progress",f)),p&&v.upload&&([u,h]=ct(p),v.upload.addEventListener("progress",u),v.upload.addEventListener("loadend",h)),(a.cancelToken||a.signal)&&(c=_=>{v&&(i(!_||_.type?new Ie(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=ni(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 c_=(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 Ie(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}},Id=c_;var p_=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},l_=async function*(e,t){for await(let n of u_(e))yield*p_(n,t)},u_=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()}},kr=(e,t,n,i)=>{let a=l_(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 ca=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Fd=ca&&typeof ReadableStream=="function",d_=ca&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),kd=(e,...t)=>{try{return!!e(...t)}catch{return!1}},m_=Fd&&kd(()=>{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}),Ad=64*1024,jr=Fd&&kd(()=>d.isReadableStream(new Response("").body)),sa={stream:jr&&(e=>e.body)};ca&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!sa[t]&&(sa[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 f_=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 d_(e)).byteLength},h_=async(e,t)=>{let n=d.toFiniteNumber(e.getContentLength());return n??f_(t)},jd=ca&&(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}=ra(e);l=l?(l+"").toLowerCase():"text";let h=Id([a,o&&o.toAbortSignal()],r),m,x=h&&h.unsubscribe&&(()=>{h.unsubscribe()}),v;try{if(p&&m_&&n!=="get"&&n!=="head"&&(v=await h_(c,i))!==0){let I=new Request(t,{method:"POST",body:i,duplex:"half"}),X;if(d.isFormData(i)&&(X=I.headers.get("content-type"))&&c.setContentType(X),I.body){let[ne,Z]=gn(v,ct(bn(p)));i=kr(I.body,Ad,ne,Z)}}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),_=jr&&(l==="stream"||l==="response");if(jr&&(s||_&&x)){let I={};["status","statusText","headers"].forEach(D=>{I[D]=E[D]});let X=d.toFiniteNumber(E.headers.get("content-length")),[ne,Z]=s&&gn(X,ct(bn(s),!0))||[];E=new Response(kr(E.body,Ad,ne,()=>{Z&&Z(),x&&x()}),I)}l=l||"text";let T=await sa[d.findKey(sa,l)||"text"](E,e);return!_&&x&&x(),await new Promise((I,X)=>{Qe(I,X,{data:T,headers:J.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 Lr={http:Rd,xhr:Pd,fetch:jd};d.forEach(Lr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var Ld=e=>`- ${e}`,x_=e=>d.isFunction(e)||e===null||e===!1,pa={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,!x_(n)&&(i=Lr[(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 :
|
|
40
40
|
`+o.map(Ld).join(`
|
|
41
41
|
`):" "+Ld(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:Lr};function Nr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ie(null,e)}function la(e){return Nr(e),e.headers=J.from(e.headers),e.data=Yn.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),pa.getAdapter(e.adapter||dn.adapter)(e).then(function(i){return Nr(e),i.data=Yn.call(e,e.transformResponse,i),i.headers=J.from(i.headers),i},function(i){return Kn(i)||(Nr(e),i&&i.response&&(i.response.data=Yn.call(e,e.transformResponse,i.response),i.response.headers=J.from(i.response.headers))),Promise.reject(i)})}var qr={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{qr[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});var Nd={};qr.transitional=function(t,n,i){function a(o,r){return"[Axios v"+zt+"] 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&&!Nd[r]&&(Nd[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 v_(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 ua={assertOptions:v_,validators:qr};var Et=ua.validators,yn=class{constructor(t){this.defaults=t,this.interceptors={request:new ir,response:new ir}}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+=`
|
|
42
42
|
`+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&&ua.assertOptions(i,{silentJSONParsing:Et.transitional(Et.boolean),forcedJSONParsing:Et.transitional(Et.boolean),clarifyTimeoutError:Et.transitional(Et.boolean)},!1),a!=null&&(d.isFunction(a)?n.paramsSerializer={serialize:a}:ua.assertOptions(a,{encode:Et.function,serialize:Et.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=J.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=[la.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=la.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=Bt(t.baseURL,t.url);return Ut(n,t.params,t.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(t){yn.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}))}}yn.prototype[t]=n(),yn.prototype[t+"Form"]=n(!0)});var ai=yn;var Ur=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 Ie(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}}},qd=Ur;function Br(e){return function(n){return e.apply(null,n)}}function Mr(e){return d.isObject(e)&&e.isAxiosError===!0}var $r={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($r).forEach(([e,t])=>{$r[t]=e});var Ud=$r;function Bd(e){let t=new ai(e),n=Hn(ai.prototype.request,t);return d.extend(n,ai.prototype,t,{allOwnKeys:!0}),d.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return Bd(Be(e,a))},n}var te=Bd(dn);te.Axios=ai;te.CanceledError=Ie;te.CancelToken=qd;te.isCancel=Kn;te.VERSION=zt;te.toFormData=wt;te.AxiosError=y;te.Cancel=te.CanceledError;te.all=function(t){return Promise.all(t)};te.spread=Br;te.isAxiosError=Mr;te.mergeConfig=Be;te.AxiosHeaders=J;te.formToJSON=e=>Zi(d.isHTMLForm(e)?new FormData(e):e);te.getAdapter=pa.getAdapter;te.HttpStatusCode=Ud;te.default=te;var wn=te;var{Axios:eC,AxiosError:tC,CanceledError:nC,isCancel:iC,CancelToken:aC,VERSION:oC,all:rC,Cancel:sC,isAxiosError:cC,spread:pC,toFormData:lC,AxiosHeaders:uC,HttpStatusCode:dC,formToJSON:mC,getAdapter:fC,mergeConfig:hC}=wn;var Vd=R(On());nn();var Md=R(require("node:crypto")),Ht=R(require("node:fs")),_n=R(require("node:path")),Gr=R(ht());var da=z();function $d(){let{__cx:e}=da.paths(),t=_n.default.join(e,"apiCache");Ht.default.existsSync(t)||Ht.default.mkdirSync(t),console.info("Cache initialized")}function Gd(e){let{__cx:t}=da.paths(),n=_n.default.join(t,"apiCache"),i=Md.default.createHash("sha256");return i.update(JSON.stringify(e)),`${n}/${i.digest("hex")}`}function zd(e,t){let n=typeof t=="string"?t:JSON.stringify(t),i=Gd(e),a=_n.default.dirname(i);Ht.default.existsSync(a)||Ht.default.mkdirSync(a,{recursive:!0}),Ht.default.writeFileSync(i,n,"utf8")}function Xd(e){try{let t=Gd(e);return Gr.default.readJSONSync(t,{encoding:"utf-8"})}catch{return null}}function g_(){let{__cx:e}=da.paths(),n=`${_n.default.join(e,"apiCache")}/siteHash.json`;try{return Gr.default.readJSONSync(n,{encoding:"utf-8"})||{}}catch{return{}}}function Hd(e,t){let n=g_(),i=n[e],a=t||i||new Date().valueOf(),{__cx:o}=da.paths(),s=`${_n.default.join(o,"apiCache")}/siteHash.json`;return a!==i&&(n[e]=a,Ht.default.writeFileSync(s,JSON.stringify(n),{encoding:"utf-8"})),a.toString()}var Sn=R(ht()),Dt=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}},ma=class{filePath;entries;constructor(t,n){this.entries=n,this.filePath=t;try{Sn.default.writeJSONSync(this.filePath,this.entries)}catch(i){console.error(`Error writing ${this.filePath}`,i)}}getCurrentEntries(){return Sn.default.readJSONSync(this.filePath,"utf8")}insert(t,n){try{let i=this.getCurrentEntries();i[t].entries.push(n),Sn.default.writeJSONSync(this.filePath,i)}catch(i){console.error(i)}}get(t){try{return Sn.default.readJSONSync(this.filePath,"utf8")[t]}catch{throw new Error(`Error reading ${this.filePath}`)}}getAll(){try{return Sn.default.readJSONSync(this.filePath,"utf8")}catch{throw new Error(`Error reading ${this.filePath}`)}}},Rt=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 b_={API_RESPONSE_TOO_BIG:{title:"API response size is too large",description:"API response size is too large and may affect rendering performance",entries:[]}},y_=new Rt(new Dt(b_)),Wt=y_;var w_={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:[]}},SC=new Rt(new Dt(w_));Vd.default.config();var{env:{RETRY_WAIT_SECONDS:__="4",RETRY_ATTEMPTS:Wd="4"}}=process;async function Hr(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=Xd(p);if(c){let u=Xr(c),f=u?`site: ${u}`:"",h=zr(new Date().getTime()-l.getTime());return at(`${t} (cache) ${f} ${i} - ${h}s ${n}`),c}}try{let l=new Date,{data:c,headers:u}=await wn({url:i,method:t,headers:Object.assign({},s,st.headers),data:a}),f=Xr(c),h=f?`site: ${f}`:"",m=zr(new Date().getTime()-l.getTime());if(at(`${t} (fetch) ${h} ${i} - ${m}s ${n}`),zd(p,c),O.GRIDDO_ALERT_FEATURE){let x=Number.parseInt(u["content-length"]);x>O.GRIDDO_API_MAX_RESPONSE_SIZE&&Wt.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(Wd)&&(console.log(`
|
|
@@ -69,9 +69,9 @@ ${f}
|
|
|
69
69
|
`),on(`\u231B\uFE0F ${e}`,"",1,0),process.stdin.once("data",()=>{n()})})}async function Ge(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{vt(`start ${e} life-cycle`);let p=await os(n,a);zp(`${e} - ${p}s
|
|
70
70
|
`),await F_(`${e} LifeCycle`);break}catch(p){let l=Rp(Dp(` Error in ${e} LifeCycle `)),c=V.yellow(`Attempt (${r+1})`);console.log(`
|
|
71
71
|
${l} ${c}
|
|
72
|
-
`),console.log(p),console.log(),r++}r===s&&Y(bl(s,e))}async function vm(e){await rm(),await sm(),await cm.writeFiles(e)}function gm(){let{__cx:e}=hm.paths(),t=Tt.default.join(e,"store"),a=Me.default.readdirSync(t).filter(o=>o!=="metadata").map(o=>Tt.default.join(t,o));for(let o of a)Me.default.rmSync(o,{recursive:!0,force:!0})}bm.default.config();var Fe=process.env.GRIDDO_API_URL||process.env.API_URL,ba=process.env.GRIDDO_PUBLIC_API_URL||process.env.PUBLIC_API_URL,ym=process.env.botEmail,wm=process.env.botPassword,_m=Number.parseInt(process.env.GRIDDO_API_CONCURRENCY_COUNT||"10"),Sm=$e(process.env.GRIDDO_RENDER_ALL_SITES||process.env.updateAllSites),Em=Number.parseInt(process.env.GRIDDO_RENDER_SITE||""),Dm=(process.env.GRIDDO_RENDER_PAGES||"").split(",").map(e=>Number.parseInt(e)).filter(Boolean),Rm=$e(process.env.GRIDDO_SKIP_BUILD_CHECKS),Om=$e(process.env.GRIDDO_DEBUG_LOGS),Cm=$e(process.env.GRIDDO_BUILD_LOGS),Tm=$e(process.env.GRIDDO_RENDER_BREAKPOINTS_FEATURE),Pm=$e(process.env.GRIDDO_SSG_VERBOSE_LOGS),Im=$e(process.env.GRIDGRIDDO_SEARCH_FEATURE_FEATURE),Am=process.env.GRIDDO_ASSET_PREFIX||process.env.ASSET_PREFIX,Fm=process.env.GRIDDO_REACT_APP_INSTANCE||process.env.REACT_APP_INSTANCE,km=$e(process.env.GRIDDO_AI_EMBEDDINGS),jm=$e(process.env.GRIDDO_VERBOSE_LOGS),Lm=$e(process.env.GRIDDO_ALERT_FEATURE),Nm=Number.parseInt(process.env.GRIDDO_API_MAX_RESPONSE_SIZE||"81920"),qm=Number.parseInt(process.env.GRIDDO_SSG_MAX_PAGE_SIZE||"524288"),Um=Number.parseInt(process.env.GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS||"1"),Bm=Number.parseInt(process.env.GRIDDO_CLOSE_LIFECYCLE_MAX_ATTEMPTS||"1"),Mm=Number.parseInt(process.env.GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS||"1"),$m=Number.parseInt(process.env.GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS||"1"),Gm=Number.parseInt(process.env.GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS||"1"),zm=Number.parseInt(process.env.GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS||"2"),Xm=Number.parseInt(process.env.GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS||"1"),Hm=Number.parseInt(process.env.GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS||"4"),Wm=Number.parseInt(process.env.GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS||"1"),Vm=process.env.GRIDDO_CX_FIXTURES_DOMAIN_NAMES,Jm=process.env.GRIDDO_CX_FIXTURES_SITE_NAMES;var Pt=`${Fe}/site/`,Ym=`${Fe}/ai/embeddings`,Km=`${ba}/alert`,Qm=`${Fe}/domains`,Zm=`${Fe}/sites/all`,ef=`${Fe}/page`,tf=`${Fe}/login_check`,nf=`${Fe}/debug/reset-render`,af=`${Fe}/domains/robots`,of=`${Fe}/search`,rf=`${Fe}/settings`,sf=[Pt,"/build/end"],cf=[Pt,"/build/start"],pf=[Pt,"/pages?pagination=false"],lf=[Pt,"/distributor"],uf=[Pt,"/sitemap"],df=[Pt,"/all"],mf=[Pt,"/languages"],ff=[Pt,"/socials"];var K={ALERT:Km,AI_EMBEDDINGS:Ym,BUILD_END:sf,BUILD_START:cf,DOMAINS:Qm,GET_ALL:Zm,GET_PAGE:ef,GET_PAGES:pf,GET_REFERENCE_FIELD_DATA:lf,GET_SITEMAP:uf,INFO:df,LANGUAGES:mf,LOGIN:tf,RESET_RENDER:nf,ROBOTS:af,SEARCH:of,SETTINGS:rf,SOCIALS:ff},O={GRIDDO_AI_EMBEDDINGS:km,GRIDDO_ALERT_FEATURE:Lm,GRIDDO_API_CONCURRENCY_COUNT:_m,GRIDDO_API_MAX_RESPONSE_SIZE:Nm,GRIDDO_API_URL:Fe,GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS:Wm,GRIDDO_ASSET_PREFIX:Am,GRIDDO_BOT_PASSWORD:wm,GRIDDO_BOT_USER:ym,GRIDDO_BUILD_LOGS:Cm,GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS:Um,GRIDDO_CLOSE_LIFECYCLE_MAX_ATTEMPTS:Bm,GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS:Gm,GRIDDO_DEBUG_LOGS:Om,GRIDDO_FIXTURES_DOMAIN_NAMES:Vm,GRIDDO_FIXTURES_SITE_NAMES:Jm,GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS:Hm,GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS:Mm,GRIDDO_PUBLIC_API_URL:ba,GRIDDO_REACT_APP_INSTANCE:Fm,GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS:Xm,GRIDDO_RENDER_ALL_SITES:Sm,GRIDDO_RENDER_BREAKPOINTS_FEATURE:Tm,GRIDDO_RENDER_PAGES:Dm,GRIDDO_RENDER_SITE:Em,GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS:$m,GRIDDO_SEARCH_FEATURE:Im,GRIDDO_SKIP_BUILD_CHECKS:Rm,GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS:zm,GRIDDO_SSG_MAX_PAGE_SIZE:qm,GRIDDO_SSG_VERBOSE_LOGS:Pm,GRIDDO_VERBOSE_LOGS:jm};nn();var Ra=R(require("node:path"));var hf=require("node:child_process"),lt=R(require("node:path")),xf=R(On()),ze=R(ht());Je();ot();xf.default.config();var vf=z();function gf(e){let{proDomain:t}=z();if(!O.GRIDDO_ASSET_PREFIX||!e||!e.startsWith(t))return"";let n=`${O.GRIDDO_ASSET_PREFIX}/${e}`;return N(`Reading process.env.GRIDDO_ASSET_PREFIX, ${O.GRIDDO_ASSET_PREFIX}`),N(`Setting the asset prefix with the domain concatenated, ${n}`),n}function bf(e){N(`read assetPrefixWithDomain, ${e}`),N(`using this NODE_OPTIONS in gatsby command: ${process.env.NODE_OPTIONS}`);let{__ssg:t}=vf.paths(),n=process.env.NODE_OPTIONS?process.env.NODE_OPTIONS.replace(/--openssl-legacy-provider\s*/g,"").trim():"",i=(0,hf.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&&Y(gl(i))}async function yf(e,t){let{__cx:n,__ssg:i}=vf.paths(e),a=lt.default.join(n,"dist"),o=lt.default.join(n,"assets"),r=lt.default.join(n,"dist",e),s=lt.default.join(i,"public"),p=ze.default.readdirSync(s).filter(x=>lt.default.extname(x)===".js"||lt.default.extname(x)===".json"||lt.default.extname(x)===".css"),l=`${s}/page-data`,c=`${o}/page-data`,u=lt.default.join(i,"static"),f=o,h=`${a}/static`,m=`${o}/static`;try{ze.default.mkdirSync(o,{recursive:!0}),ze.default.copySync(s,a,{preserveTimestamps:!0}),t&&(ze.default.copySync(l,c,{preserveTimestamps:!0}),ze.default.existsSync(u)&&ze.default.copySync(u,f,{overwrite:!1,preserveTimestamps:!0}),ze.default.copySync(h,m,{overwrite:!1,preserveTimestamps:!0}),ze.default.existsSync(u)&&ze.default.copySync(u,r,{overwrite:!1,preserveTimestamps:!0}),p.map(async x=>{let v=`${s}/${x}`,b=`${o}/${x}`;ze.default.copySync(v,b,{preserveTimestamps:!0})}))}catch(x){console.error(x)}}var Vt=R(require("node:path"));function k_(e){let{__cx:t,__exports:n,__cache:i}=e;return{initials:[n,i,Vt.default.join(t,"store"),Vt.default.join(t,"apiCache")],disposables:[Vt.default.join(t,"store"),Vt.default.join(t,"apiCache"),Vt.default.join(t,"render-metadata.json"),Vt.default.join(t,"dist")],cacheables:["apiCache","store"],archivables:["dist","assets"]}}var ya=k_;var wa=R(require("node:path"));function j_(e){let{__ssg:t}=e;return{disposables:[wa.default.join(t,"public"),wa.default.join(t,"static"),wa.default.join(t,".cache")],cacheables:[".cache"],initials:[],archivables:[]}}var wf=j_;function _f(e,t){let{cxPaths:n}=t,i={gatsby:wf(n)};return{cx:ya(n),[e]:i[e],all:{initials:[...ya(n).initials,...i[e].initials],disposables:[...ya(n).disposables,...i[e].disposables]}}}async function _a({area:e,description:t,fullData:n,instantNotification:i=!1,level:a}){let o=K.ALERT,r={level:a,area:e,description:t,fullData:n,instantNotification:i};try{await wn.post(o,r,{headers:{"Content-Type":"application/json",Connection:"close"}})}catch(s){console.error("Error creating Griddo alert:",s)}}var kf=R(require("node:fs")),ps=R(require("node:path")),jf=R(Ya());var Sa=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 L_(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 N_(e){let{page:t,component:{data:n},cacheKey:i}=e;if(!n)return on(`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 on(`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"&&on(`Warning: Page with id: ${t.id} has a ReferenceField with \`undefined\` \`data.sources\``,"undefined data.sources in ReferenceField");let r=L_(n,t);return await Zd(t,r,i,a,o)}async function Sf({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 N_({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 Ef(){return await Oe({endpoint:K.SETTINGS})}var Of=R(On());function rs(e,t,n,i="jpg"){let a=typeof e=="string"?e:e?.url;return a?a.split("/")[2].includes("cloudinary.com")?U_(a,`c_fill,w_${t},h_${n}`):q_(a,`f/${i}/w/${t}/h/${n}`):null}function q_(e,t){let n=e.split("/"),i=n.slice(0,-1).join("/"),a=n.slice(-1)[0];return`${i}/${t}/${a}`}function U_(e,t){let n=e.replace("https://",""),i=n.split("/").slice(0,4).join("/"),a=n.replace(i,"");return`https://${i}/${t}${a}`}Of.default.config();var B_=25;function M_({socialTitle:e,socialDescription:t,socialImage:n}){return{type:"website",title:e,description:t,image:n?rs(n,1280,768):"",twitterImage:n?rs(n,1280,768):""}}function $_(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 cs(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:I}}=t;e.breadcrumb=r,e.siteSlug=b,e.apiUrl=c,e.publicApiUrl=t.publicBaseUrl,e.instance=t.instance;let ne=h.find(({id:H})=>H===e?.language)?.locale.replace(/_/g,"-"),Z=$_(e),D=M_({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:Z,openGraph:D,socials:E,siteLangs:h,cloudinaryName:u,siteOptions:x,griddoVersion:f,renderDate:F,siteScript:v,header:T,footer:I,page:e}}}async function Cf(e,t){return await cs(e,t)}async function Tf({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:ss(h,u,{addEndingSlash:!0})},fullUrl:ss(e.fullUrl,u,{addEndingSlash:!0}),slug:ss(e.slug,u),title:Rf(e.title,u),metaTitle:Rf(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 cs(m,r)});return Promise.all(s)}function Pf(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 cs(p,t)});return Promise.all(o)}function If(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 G_(e,t,n){return t?.slice(e*(n-1),e*n)}function z_(e,t){let n=Math.ceil(t.length/e)||1;return Array.from({length:n},(a,o)=>o+1)?.map(a=>G_(e,t,a))}function Af(e){let t=e.queriedItems||[],n=e?.itemsPerPage||B_;return z_(n,t)}function Df(e){return e.replace(/\/+$/,"/")}function ss(e,t,n){let i=e.endsWith("/")?"":"/",a=n?.addEndingSlash?"/":"";return t<=1?Df(`${e}${a}`):Df(`${e}${i}${t}${a}`)}function Rf(e,t){return!e||t<=1?e:`${e} - ${t}`}var Ff=z(),X_=new Date().valueOf().toString();async function Lf(e){Cl(),console.info(`API calls with ${O.GRIDDO_API_CONCURRENCY_COUNT} threads`);let{__cx:t}=Ff.paths(),{griddoVersion:n}=Ff,i=ps.default.join(t,"store");try{let a=[],o={},{sitesToPublish:r,sitesToUnpublish:s}=await im(e),p=r.length>0||s.length>0;p||console.warn(`There are no sites to update in the domain ${e}`),no("Sites to publish:",r),no("Sites to unpublish:",s),await am(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:I,footers:X,socials:ne}=await om(c),{cloudinaryName:Z,useMetaTitle:D,useMetaKeywords:A,showBasicMetaRobots:F,avoidHrefLangsOnCanonicals:M,avoidSelfReferenceCanonicals:H,avoidHrefLangXDefault:k,avoidDebugMetas:L}=await Ef();o[c]={siteHash:b,unpublishHashes:E,publishHashes:[]};let q=new Sa;q.navigations={headers:I,footers:X},l.languages=_;let w=Hd(c,b),S=x.siteScript,C={siteUrl:x.slug,title:x.name,favicon:h},Xe={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:Z,griddoVersion:n,siteOptions:{useMetaTitle:D,useMetaKeywords:A,showBasicMetaRobots:F,avoidHrefLangsOnCanonicals:M,avoidSelfReferenceCanonicals:H,avoidHrefLangXDefault:k,avoidDebugMetas:L},siteScript:S};at(`${l.name} site`),kf.default.mkdirSync(ps.default.join(i,c.toString()),{recursive:!0});let ie=async(It,se)=>{let ri=[],et=await Yd(se,w);if(!et)return;a.push(se);let si=JSON.parse(JSON.stringify(Xe));si.navigations=q.getPageNavigations(et);let Yt=await Sf({page:et,cacheKey:X_}),hs=await If(Yt),Oa=et?.mode==="list",xs=!Oa&&hs,Yf=!xs&&!Oa;if(Oa){let We={page:et,pages:Af(Yt),isRoot:!1,defaultLang:T,template:Yt,totalQueriedItems:Yt.queriedItems};ri=await Tf(We,si)}if(xs){let We=et;We.template=Yt,We.multiPageElements=hs,We.defaultLang=T,ri=await Pf(We,si)}if(Yf){let We=et;We.template=Yt,We.defaultLang=T,ri=[await Cf(We,si)]}et.hash!==null&&o[c].publishHashes.push(et.hash),Tl(It,ri)},{pagesMissingInStore:He,pagesToDeleteFromStore:Jt,pagesToWriteToStore:Te}=await Il({sitesToPublish:r,validPagesIds:v,changedPages:m,siteDirName:c.toString()});Pl(c.toString(),Jt);let _e=(0,jf.default)(O.GRIDDO_API_CONCURRENCY_COUNT),oi=Te.map(It=>_e(()=>ie(c.toString(),It)));N(`Store site: ${l.name}`),N(`${v.length} valid pages from API`),N(`changed ${m.length} pages from API`),N(`deleted ${Jt.length} pages from store`),N(`missing ${He.length} pages in store`),N(`write ${Te.length} pages to store`),await Promise.all(oi)}p?Uo({buildProcessData:o,createdPages:a,sitesToPublish:r}):(gm(),Uo({buildProcessData:o,createdPages:[],sitesToPublish:[]}))}catch(a){console.error(a.message),process.exit(1)}}async function Nf(e){$d(),await Lf(e),xm()}Je();ot();async function qf(){return await Oe({endpoint:K.DOMAINS})}async function Uf(){await st.login();let e=await qf();return e.length||Y(wl),N(`getting domains names (${e.length})`),H_(e)}function H_(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")),we=R(ht());Je();ot();var W_=z(),ls=e=>{if(!we.default.statSync(e).isDirectory())return;let n=we.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);we.default.rmSync(s)}n=we.default.readdirSync(e)}for(let r of n){let s=Ze.default.join(e,r);ls(s)}n=we.default.readdirSync(e)}if(n.length===0){we.default.rmdirSync(e);return}};function Bf(e,t){for(let n of e)try{Ce.default.existsSync(n)||(Ce.default.mkdirSync(n,{recursive:!0,...t}),N(`create directory: ${n}`))}catch(i){Y(Nt,i)}}function Mf(e,t){try{Ce.default.existsSync(e)&&(Ce.default.renameSync(e,t),N(`rename ${e} to ${t}`))}catch(n){Y(Nt,n)}}function us(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(!we.default.existsSync(r)){console.log(`(Maybe first render) Source directory does not exist: ${r}`);continue}a&&(zf(s),N(`create backup: ${s}`));try{we.default.existsSync(s)&&(Ce.default.rmSync(s,{recursive:!0,force:!0}),N(`clean destination: ${s}`)),Ce.default.cpSync(r,s,{recursive:!0,preserveTimestamps:!0}),N(`copy: ${r} to ${s}`),a&&(Gf(s),N(`delete backup: ${s}`))}catch(p){a&&($f(s),console.log("Backup has been restored.")),Y(Nt,p)}}}function Dn(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(we.default.existsSync(s)){o&&zf(p);try{a&&we.default.existsSync(p)&&Ce.default.rmSync(p,{recursive:!0,force:!0}),Ce.default.renameSync(s,p),N(`moved: ${s} to ${p}`),o&&Gf(p)}catch(l){o&&($f(p),console.log("Backup has been restored.")),Y(Nt,l)}}}}function ds(e){for(let t of e)if(t)try{we.default.existsSync(t)&&(Ce.default.rmSync(t,{recursive:!0,force:!0}),N(`removed directory: ${t}`))}catch(n){Y(Nt,n)}}function $f(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 Gf(e,t="-BACKUP"){let n=e+t;if(we.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 zf(e,t="-BACKUP"){let n=e+t;if(we.default.existsSync(e)){if(we.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`),Y(Nt,i)}}}async function Xf(){let{__cx:e}=W_.paths(),t=Ze.default.join(e,"store");try{let n=Xi(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 Ea=R(require("node:fs")),Da=R(require("node:path"));Je();ot();var ms=z();function Hf(){let{__cx:e}=ms.paths(),t=Da.default.join(e,".render-sentinel");Ea.default.writeFileSync(t,new Date().toISOString())}function Wf(){let{__cx:e}=ms.paths(),t=Da.default.join(e,".render-sentinel");Ea.default.unlinkSync(t)}function Vf(){let{__cx:e}=ms.paths(),t=Da.default.join(e,".render-sentinel");Ea.default.existsSync(t)||Y(El)}var V_=z();async function J_(){Hp();let e=await Uf();for(let t of e)await Y_(t);if(O.GRIDDO_ALERT_FEATURE){let t=Wt.get("API_RESPONSE_TOO_BIG");if(t.entries.length<1)return;rn(`
|
|
72
|
+
`),console.log(p),console.log(),r++}r===s&&Y(bl(s,e))}async function vm(e){await rm(),await sm(),await cm.writeFiles(e)}function gm(){let{__cx:e}=hm.paths(),t=Tt.default.join(e,"store"),a=Me.default.readdirSync(t).filter(o=>o!=="metadata").map(o=>Tt.default.join(t,o));for(let o of a)Me.default.rmSync(o,{recursive:!0,force:!0})}bm.default.config();var Fe=process.env.GRIDDO_API_URL||process.env.API_URL,ba=process.env.GRIDDO_PUBLIC_API_URL||process.env.PUBLIC_API_URL,ym=process.env.botEmail,wm=process.env.botPassword,_m=Number.parseInt(process.env.GRIDDO_API_CONCURRENCY_COUNT||"10"),Sm=$e(process.env.GRIDDO_RENDER_ALL_SITES||process.env.updateAllSites),Em=Number.parseInt(process.env.GRIDDO_RENDER_SITE||""),Dm=(process.env.GRIDDO_RENDER_PAGES||"").split(",").map(e=>Number.parseInt(e)).filter(Boolean),Rm=$e(process.env.GRIDDO_SKIP_BUILD_CHECKS),Om=$e(process.env.GRIDDO_DEBUG_LOGS),Cm=$e(process.env.GRIDDO_BUILD_LOGS),Tm=$e(process.env.GRIDDO_RENDER_BREAKPOINTS_FEATURE),Pm=$e(process.env.GRIDDO_SSG_VERBOSE_LOGS),Im=$e(process.env.GRIDGRIDDO_SEARCH_FEATURE_FEATURE),Am=process.env.GRIDDO_ASSET_PREFIX||process.env.ASSET_PREFIX,Fm=process.env.GRIDDO_REACT_APP_INSTANCE||process.env.REACT_APP_INSTANCE,km=$e(process.env.GRIDDO_AI_EMBEDDINGS),jm=$e(process.env.GRIDDO_VERBOSE_LOGS),Lm=$e(process.env.GRIDDO_ALERT_FEATURE),Nm=Number.parseInt(process.env.GRIDDO_API_MAX_RESPONSE_SIZE||"81920"),qm=Number.parseInt(process.env.GRIDDO_SSG_MAX_PAGE_SIZE||"524288"),Um=Number.parseInt(process.env.GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS||"1"),Bm=Number.parseInt(process.env.GRIDDO_CLOSE_LIFECYCLE_MAX_ATTEMPTS||"1"),Mm=Number.parseInt(process.env.GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS||"1"),$m=Number.parseInt(process.env.GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS||"1"),Gm=Number.parseInt(process.env.GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS||"1"),zm=Number.parseInt(process.env.GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS||"2"),Xm=Number.parseInt(process.env.GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS||"1"),Hm=Number.parseInt(process.env.GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS||"4"),Wm=Number.parseInt(process.env.GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS||"1"),Vm=process.env.GRIDDO_CX_FIXTURES_DOMAIN_NAMES,Jm=process.env.GRIDDO_CX_FIXTURES_SITE_NAMES;var Pt=`${Fe}/site/`,Ym=`${Fe}/ai/embeddings`,Km=`${ba}/alert`,Qm=`${Fe}/domains`,Zm=`${Fe}/sites/all`,ef=`${Fe}/page`,tf=`${Fe}/login_check`,nf=`${Fe}/debug/reset-render`,af=`${Fe}/domains/robots`,of=`${Fe}/search`,rf=`${Fe}/settings`,sf=[Pt,"/build/end"],cf=[Pt,"/build/start"],pf=[Pt,"/pages?pagination=false"],lf=[Pt,"/distributor"],uf=[Pt,"/sitemap"],df=[Pt,"/all"],mf=[Pt,"/languages"],ff=[Pt,"/socials"];var K={ALERT:Km,AI_EMBEDDINGS:Ym,BUILD_END:sf,BUILD_START:cf,DOMAINS:Qm,GET_ALL:Zm,GET_PAGE:ef,GET_PAGES:pf,GET_REFERENCE_FIELD_DATA:lf,GET_SITEMAP:uf,INFO:df,LANGUAGES:mf,LOGIN:tf,RESET_RENDER:nf,ROBOTS:af,SEARCH:of,SETTINGS:rf,SOCIALS:ff},O={GRIDDO_AI_EMBEDDINGS:km,GRIDDO_ALERT_FEATURE:Lm,GRIDDO_API_CONCURRENCY_COUNT:_m,GRIDDO_API_MAX_RESPONSE_SIZE:Nm,GRIDDO_API_URL:Fe,GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS:Wm,GRIDDO_ASSET_PREFIX:Am,GRIDDO_BOT_PASSWORD:wm,GRIDDO_BOT_USER:ym,GRIDDO_BUILD_LOGS:Cm,GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS:Um,GRIDDO_CLOSE_LIFECYCLE_MAX_ATTEMPTS:Bm,GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS:Gm,GRIDDO_DEBUG_LOGS:Om,GRIDDO_FIXTURES_DOMAIN_NAMES:Vm,GRIDDO_FIXTURES_SITE_NAMES:Jm,GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS:Hm,GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS:Mm,GRIDDO_PUBLIC_API_URL:ba,GRIDDO_REACT_APP_INSTANCE:Fm,GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS:Xm,GRIDDO_RENDER_ALL_SITES:Sm,GRIDDO_RENDER_BREAKPOINTS_FEATURE:Tm,GRIDDO_RENDER_PAGES:Dm,GRIDDO_RENDER_SITE:Em,GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS:$m,GRIDDO_SEARCH_FEATURE:Im,GRIDDO_SKIP_BUILD_CHECKS:Rm,GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS:zm,GRIDDO_SSG_MAX_PAGE_SIZE:qm,GRIDDO_SSG_VERBOSE_LOGS:Pm,GRIDDO_VERBOSE_LOGS:jm};nn();var Ra=R(require("node:path"));var hf=require("node:child_process"),lt=R(require("node:path")),xf=R(On()),ze=R(ht());Ye();ot();xf.default.config();var vf=z();function gf(e){let{proDomain:t}=z();if(!O.GRIDDO_ASSET_PREFIX||!e||!e.startsWith(t))return"";let n=`${O.GRIDDO_ASSET_PREFIX}/${e}`;return N(`Reading process.env.GRIDDO_ASSET_PREFIX, ${O.GRIDDO_ASSET_PREFIX}`),N(`Setting the asset prefix with the domain concatenated, ${n}`),n}function bf(e){N(`read assetPrefixWithDomain, ${e}`),N(`using this NODE_OPTIONS in gatsby command: ${process.env.NODE_OPTIONS}`);let{__ssg:t}=vf.paths(),n=process.env.NODE_OPTIONS?process.env.NODE_OPTIONS.replace(/--openssl-legacy-provider\s*/g,"").trim():"",i=(0,hf.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&&Y(gl(i))}async function yf(e,t){let{__cx:n,__ssg:i}=vf.paths(e),a=lt.default.join(n,"dist"),o=lt.default.join(n,"assets"),r=lt.default.join(n,"dist",e),s=lt.default.join(i,"public"),p=ze.default.readdirSync(s).filter(x=>lt.default.extname(x)===".js"||lt.default.extname(x)===".json"||lt.default.extname(x)===".css"),l=`${s}/page-data`,c=`${o}/page-data`,u=lt.default.join(i,"static"),f=o,h=`${a}/static`,m=`${o}/static`;try{ze.default.mkdirSync(o,{recursive:!0}),ze.default.copySync(s,a,{preserveTimestamps:!0}),t&&(ze.default.copySync(l,c,{preserveTimestamps:!0}),ze.default.existsSync(u)&&ze.default.copySync(u,f,{overwrite:!1,preserveTimestamps:!0}),ze.default.copySync(h,m,{overwrite:!1,preserveTimestamps:!0}),ze.default.existsSync(u)&&ze.default.copySync(u,r,{overwrite:!1,preserveTimestamps:!0}),p.map(async x=>{let v=`${s}/${x}`,b=`${o}/${x}`;ze.default.copySync(v,b,{preserveTimestamps:!0})}))}catch(x){console.error(x)}}var Vt=R(require("node:path"));function k_(e){let{__cx:t,__exports:n,__cache:i}=e;return{initials:[n,i,Vt.default.join(t,"store"),Vt.default.join(t,"apiCache")],disposables:[Vt.default.join(t,"store"),Vt.default.join(t,"apiCache"),Vt.default.join(t,"render-metadata.json"),Vt.default.join(t,"dist")],cacheables:["apiCache","store"],archivables:["dist","assets"]}}var ya=k_;var wa=R(require("node:path"));function j_(e){let{__ssg:t}=e;return{disposables:[wa.default.join(t,"public"),wa.default.join(t,"static"),wa.default.join(t,".cache")],cacheables:[".cache"],initials:[],archivables:[]}}var wf=j_;function _f(e,t){let{cxPaths:n}=t,i={gatsby:wf(n)};return{cx:ya(n),[e]:i[e],all:{initials:[...ya(n).initials,...i[e].initials],disposables:[...ya(n).disposables,...i[e].disposables]}}}async function _a({area:e,description:t,fullData:n,instantNotification:i=!1,level:a}){let o=K.ALERT,r={level:a,area:e,description:t,fullData:n,instantNotification:i};try{await wn.post(o,r,{headers:{"Content-Type":"application/json",Connection:"close"}})}catch(s){console.error("Error creating Griddo alert:",s)}}var kf=R(require("node:fs")),ps=R(require("node:path")),jf=R(Ya());var Sa=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 L_(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 N_(e){let{page:t,component:{data:n},cacheKey:i}=e;if(!n)return on(`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 on(`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"&&on(`Warning: Page with id: ${t.id} has a ReferenceField with \`undefined\` \`data.sources\``,"undefined data.sources in ReferenceField");let r=L_(n,t);return await Zd(t,r,i,a,o)}async function Sf({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 N_({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 Ef(){return await Oe({endpoint:K.SETTINGS})}var Of=R(On());function rs(e,t,n,i="jpg"){let a=typeof e=="string"?e:e?.url;return a?a.split("/")[2].includes("cloudinary.com")?U_(a,`c_fill,w_${t},h_${n}`):q_(a,`f/${i}/w/${t}/h/${n}`):null}function q_(e,t){let n=e.split("/"),i=n.slice(0,-1).join("/"),a=n.slice(-1)[0];return`${i}/${t}/${a}`}function U_(e,t){let n=e.replace("https://",""),i=n.split("/").slice(0,4).join("/"),a=n.replace(i,"");return`https://${i}/${t}${a}`}Of.default.config();var B_=25;function M_({socialTitle:e,socialDescription:t,socialImage:n}){return{type:"website",title:e,description:t,image:n?rs(n,1280,768):"",twitterImage:n?rs(n,1280,768):""}}function $_(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 cs(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:I}}=t;e.breadcrumb=r,e.siteSlug=b,e.apiUrl=c,e.publicApiUrl=t.publicBaseUrl,e.instance=t.instance;let ne=h.find(({id:H})=>H===e?.language)?.locale.replace(/_/g,"-"),Z=$_(e),D=M_({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:Z,openGraph:D,socials:E,siteLangs:h,cloudinaryName:u,siteOptions:x,griddoVersion:f,renderDate:F,siteScript:v,header:T,footer:I,page:e}}}async function Cf(e,t){return await cs(e,t)}async function Tf({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:ss(h,u,{addEndingSlash:!0})},fullUrl:ss(e.fullUrl,u,{addEndingSlash:!0}),slug:ss(e.slug,u),title:Rf(e.title,u),metaTitle:Rf(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 cs(m,r)});return Promise.all(s)}function Pf(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 cs(p,t)});return Promise.all(o)}function If(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 G_(e,t,n){return t?.slice(e*(n-1),e*n)}function z_(e,t){let n=Math.ceil(t.length/e)||1;return Array.from({length:n},(a,o)=>o+1)?.map(a=>G_(e,t,a))}function Af(e){let t=e.queriedItems||[],n=e?.itemsPerPage||B_;return z_(n,t)}function Df(e){return e.replace(/\/+$/,"/")}function ss(e,t,n){let i=e.endsWith("/")?"":"/",a=n?.addEndingSlash?"/":"";return t<=1?Df(`${e}${a}`):Df(`${e}${i}${t}${a}`)}function Rf(e,t){return!e||t<=1?e:`${e} - ${t}`}var Ff=z(),X_=new Date().valueOf().toString();async function Lf(e){Cl(),console.info(`API calls with ${O.GRIDDO_API_CONCURRENCY_COUNT} threads`);let{__cx:t}=Ff.paths(),{griddoVersion:n}=Ff,i=ps.default.join(t,"store");try{let a=[],o={},{sitesToPublish:r,sitesToUnpublish:s}=await im(e),p=r.length>0||s.length>0;p||console.warn(`There are no sites to update in the domain ${e}`),no("Sites to publish:",r),no("Sites to unpublish:",s),await am(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:I,footers:X,socials:ne}=await om(c),{cloudinaryName:Z,useMetaTitle:D,useMetaKeywords:A,showBasicMetaRobots:F,avoidHrefLangsOnCanonicals:M,avoidSelfReferenceCanonicals:H,avoidHrefLangXDefault:k,avoidDebugMetas:L}=await Ef();o[c]={siteHash:b,unpublishHashes:E,publishHashes:[]};let q=new Sa;q.navigations={headers:I,footers:X},l.languages=_;let w=Hd(c,b),S=x.siteScript,C={siteUrl:x.slug,title:x.name,favicon:h},Xe={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:Z,griddoVersion:n,siteOptions:{useMetaTitle:D,useMetaKeywords:A,showBasicMetaRobots:F,avoidHrefLangsOnCanonicals:M,avoidSelfReferenceCanonicals:H,avoidHrefLangXDefault:k,avoidDebugMetas:L},siteScript:S};at(`${l.name} site`),kf.default.mkdirSync(ps.default.join(i,c.toString()),{recursive:!0});let ie=async(It,se)=>{let ri=[],We=await Yd(se,w);if(!We)return;a.push(se);let si=JSON.parse(JSON.stringify(Xe));si.navigations=q.getPageNavigations(We);let Yt=await Sf({page:We,cacheKey:X_}),hs=await If(Yt),Oa=We?.mode==="list"||We?.mode==="paginated-data",xs=!Oa&&hs,Yf=!xs&&!Oa;if(Oa){let Ve={page:We,pages:Af(Yt),isRoot:!1,defaultLang:T,template:Yt,totalQueriedItems:Yt.queriedItems};ri=await Tf(Ve,si)}if(xs){let Ve=We;Ve.template=Yt,Ve.multiPageElements=hs,Ve.defaultLang=T,ri=await Pf(Ve,si)}if(Yf){let Ve=We;Ve.template=Yt,Ve.defaultLang=T,ri=[await Cf(Ve,si)]}We.hash!==null&&o[c].publishHashes.push(We.hash),Tl(It,ri)},{pagesMissingInStore:He,pagesToDeleteFromStore:Jt,pagesToWriteToStore:Te}=await Il({sitesToPublish:r,validPagesIds:v,changedPages:m,siteDirName:c.toString()});Pl(c.toString(),Jt);let _e=(0,jf.default)(O.GRIDDO_API_CONCURRENCY_COUNT),oi=Te.map(It=>_e(()=>ie(c.toString(),It)));N(`Store site: ${l.name}`),N(`${v.length} valid pages from API`),N(`changed ${m.length} pages from API`),N(`deleted ${Jt.length} pages from store`),N(`missing ${He.length} pages in store`),N(`write ${Te.length} pages to store`),await Promise.all(oi)}p?Uo({buildProcessData:o,createdPages:a,sitesToPublish:r}):(gm(),Uo({buildProcessData:o,createdPages:[],sitesToPublish:[]}))}catch(a){console.error(a.message),process.exit(1)}}async function Nf(e){$d(),await Lf(e),xm()}Ye();ot();async function qf(){return await Oe({endpoint:K.DOMAINS})}async function Uf(){await st.login();let e=await qf();return e.length||Y(wl),N(`getting domains names (${e.length})`),H_(e)}function H_(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")),we=R(ht());Ye();ot();var W_=z(),ls=e=>{if(!we.default.statSync(e).isDirectory())return;let n=we.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);we.default.rmSync(s)}n=we.default.readdirSync(e)}for(let r of n){let s=et.default.join(e,r);ls(s)}n=we.default.readdirSync(e)}if(n.length===0){we.default.rmdirSync(e);return}};function Bf(e,t){for(let n of e)try{Ce.default.existsSync(n)||(Ce.default.mkdirSync(n,{recursive:!0,...t}),N(`create directory: ${n}`))}catch(i){Y(Nt,i)}}function Mf(e,t){try{Ce.default.existsSync(e)&&(Ce.default.renameSync(e,t),N(`rename ${e} to ${t}`))}catch(n){Y(Nt,n)}}function us(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(!we.default.existsSync(r)){console.log(`(Maybe first render) Source directory does not exist: ${r}`);continue}a&&(zf(s),N(`create backup: ${s}`));try{we.default.existsSync(s)&&(Ce.default.rmSync(s,{recursive:!0,force:!0}),N(`clean destination: ${s}`)),Ce.default.cpSync(r,s,{recursive:!0,preserveTimestamps:!0}),N(`copy: ${r} to ${s}`),a&&(Gf(s),N(`delete backup: ${s}`))}catch(p){a&&($f(s),console.log("Backup has been restored.")),Y(Nt,p)}}}function Dn(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(we.default.existsSync(s)){o&&zf(p);try{a&&we.default.existsSync(p)&&Ce.default.rmSync(p,{recursive:!0,force:!0}),Ce.default.renameSync(s,p),N(`moved: ${s} to ${p}`),o&&Gf(p)}catch(l){o&&($f(p),console.log("Backup has been restored.")),Y(Nt,l)}}}}function ds(e){for(let t of e)if(t)try{we.default.existsSync(t)&&(Ce.default.rmSync(t,{recursive:!0,force:!0}),N(`removed directory: ${t}`))}catch(n){Y(Nt,n)}}function $f(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 Gf(e,t="-BACKUP"){let n=e+t;if(we.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 zf(e,t="-BACKUP"){let n=e+t;if(we.default.existsSync(e)){if(we.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`),Y(Nt,i)}}}async function Xf(){let{__cx:e}=W_.paths(),t=et.default.join(e,"store");try{let n=Xi(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 Ea=R(require("node:fs")),Da=R(require("node:path"));Ye();ot();var ms=z();function Hf(){let{__cx:e}=ms.paths(),t=Da.default.join(e,".render-sentinel");Ea.default.writeFileSync(t,new Date().toISOString())}function Wf(){let{__cx:e}=ms.paths(),t=Da.default.join(e,".render-sentinel");Ea.default.unlinkSync(t)}function Vf(){let{__cx:e}=ms.paths(),t=Da.default.join(e,".render-sentinel");Ea.default.existsSync(t)||Y(El)}var V_=z();async function J_(){Hp();let e=await Uf();for(let t of e)await Y_(t);if(O.GRIDDO_ALERT_FEATURE){let t=Wt.get("API_RESPONSE_TOO_BIG");if(t.entries.length<1)return;rn(`
|
|
73
73
|
Render register report
|
|
74
|
-
`),rn(t),rn(),_a({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 Y_(e){vt(`Initializing render for the domain ${e}`),Hf();let t=V_.paths(e),{all:n,gatsby:i,cx:a}=_f("gatsby",{cxPaths:t}),{__ssg:o,__exports:r,__cache:s,__cx:p,__components:l}=t,c=gf(e),u=!!c&&c!=="";await Ge("Clean",{steps:[()=>ds(n.disposables)]}),await Ge("Prepare",{steps:[()=>Bf(n.initials)]}),await Ge("Restore",{steps:[()=>us(l,o,["static"]),()=>us(r,p,a.archivables),()=>Mf(Ra.default.join(p,"dist"),Ra.default.join(o,"public")),()=>Dn(s,p,a.cacheables),()=>Dn(s,o,i.cacheables)]}),await Ge("Data",{steps:[()=>Nf(e)]}),await Ge("SSG",{steps:[()=>bf(c)]}),await Ge("Relocation",{steps:[()=>yf(e,u)]}),await Ge("Meta",{steps:[()=>vm(e)]}),await Ge("Archive",{steps:[()=>Xf(),()=>ls(Ra.default.join(p,"dist")),()=>Dn(p,r,a.archivables,{withBackup:!0}),()=>Dn(p,s,a.cacheables),()=>Dn(o,s,i.cacheables)]}),await Ge("Close",{steps:[()=>ds(n.disposables)]}),await Ge("HealthCheck",{steps:[()=>Vf()]}),Wf()}var fs=J_;
|
|
74
|
+
`),rn(t),rn(),_a({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 Y_(e){vt(`Initializing render for the domain ${e}`),Hf();let t=V_.paths(e),{all:n,gatsby:i,cx:a}=_f("gatsby",{cxPaths:t}),{__ssg:o,__exports:r,__cache:s,__cx:p,__components:l}=t,c=gf(e),u=!!c&&c!=="";await Ge("Clean",{steps:[()=>ds(n.disposables)]}),await Ge("Prepare",{steps:[()=>Bf(n.initials)]}),await Ge("Restore",{steps:[()=>us(l,o,["static"]),()=>us(r,p,a.archivables),()=>Mf(Ra.default.join(p,"dist"),Ra.default.join(o,"public")),()=>Dn(s,p,a.cacheables),()=>Dn(s,o,i.cacheables)]}),await Ge("Data",{steps:[()=>Nf(e)]}),await Ge("SSG",{steps:[()=>bf(c)]}),await Ge("Relocation",{steps:[()=>yf(e,u)]}),await Ge("Meta",{steps:[()=>vm(e)]}),await Ge("Archive",{steps:[()=>Xf(),()=>ls(Ra.default.join(p,"dist")),()=>Dn(p,r,a.archivables,{withBackup:!0}),()=>Dn(p,s,a.cacheables),()=>Dn(o,s,i.cacheables)]}),await Ge("Close",{steps:[()=>ds(n.disposables)]}),await Ge("HealthCheck",{steps:[()=>Vf()]}),Wf()}var fs=J_;Ye();async function Jf(){try{let e=await os([()=>fs()]);vt(`All domains rendered in ${e}s.`),process.exit(0)}catch(e){e instanceof jn&&(console.log(),console.log(V.black().bgRed(" GRIDDO InternalCXError ")),console.log(),process.exit(1)),console.log(),console.log(V.black().bgRed(" GRIDDO UnknownError ")),console.log(),console.log(e),console.log(),process.exit(1)}}as();0&&(module.exports={FileRegister,MemoryRegister,Register,apiRegister,buildLog,componentLibraryPathAlias,debugLog,endpoints,envs,getBuildPagesFromCachedStore,getBuildPagesFromStore,getBuildPagesPath,getConfig,infoLog,insertAlert,isComponentLibrary,pageSizeLog,resolveComponentsPath,startRender,verboseLog,walk});
|
|
75
75
|
/*! Bundled license information:
|
|
76
76
|
|
|
77
77
|
mime-db/index.js:
|