@griddo/cx 11.0.4-rc.0 → 11.0.4
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 +1 -1
- package/build/index.js.map +2 -2
- package/build/run-start-render.js +8 -8
- package/build/run-start-render.js.map +2 -2
- package/build/start-render.js +8 -8
- package/build/start-render.js.map +2 -2
- package/exporter/adapters/gatsby/utils.ts +3 -1
- package/gatsby-node.ts +3 -0
- package/package.json +3 -3
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";var $v=Object.create;var Hi=Object.defineProperty;var Bv=Object.getOwnPropertyDescriptor;var Mv=Object.getOwnPropertyNames;var Gv=Object.getPrototypeOf,zv=Object.prototype.hasOwnProperty;var ti=(e,t)=>()=>(e&&(t=e(e=0)),t);var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Yc=(e,t)=>{for(var n in t)Hi(e,n,{get:t[n],enumerable:!0})},Jc=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Mv(t))!zv.call(e,a)&&a!==n&&Hi(e,a,{get:()=>t[a],enumerable:!(i=Bv(t,a))||i.enumerable});return e};var F=(e,t,n)=>(n=e!=null?$v(Gv(e)):{},Jc(t||!e||!e.__esModule?Hi(n,"default",{value:e,enumerable:!0}):n,e)),Xv=e=>Jc(Hi({},"__esModule",{value:!0}),e);function Kc(e,t){let n=0,i,a="",r="";for(;n<e.length;n++)i=e[n],a+=i.open,r+=i.close,~t.indexOf(i.close)&&(t=t.replace(i.rgx,i.close+i.open));return a+t+r}function Hv(e,t){let n={has:e,keys:t};return n.reset=K.reset.bind(n),n.bold=K.bold.bind(n),n.dim=K.dim.bind(n),n.italic=K.italic.bind(n),n.underline=K.underline.bind(n),n.inverse=K.inverse.bind(n),n.hidden=K.hidden.bind(n),n.strikethrough=K.strikethrough.bind(n),n.black=K.black.bind(n),n.red=K.red.bind(n),n.green=K.green.bind(n),n.yellow=K.yellow.bind(n),n.blue=K.blue.bind(n),n.magenta=K.magenta.bind(n),n.cyan=K.cyan.bind(n),n.white=K.white.bind(n),n.gray=K.gray.bind(n),n.grey=K.grey.bind(n),n.bgBlack=K.bgBlack.bind(n),n.bgRed=K.bgRed.bind(n),n.bgGreen=K.bgGreen.bind(n),n.bgYellow=K.bgYellow.bind(n),n.bgBlue=K.bgBlue.bind(n),n.bgMagenta=K.bgMagenta.bind(n),n.bgCyan=K.bgCyan.bind(n),n.bgWhite=K.bgWhite.bind(n),n}function ne(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:K.enabled?Kc(this.keys,i+""):i+""):i===void 0?Hv([e],[n]):K.enabled?Kc([n],i+""):i+""}}var Er,Qc,Zc,eu,tu,K,Ne,yn=ti(()=>{"use strict";tu=!0;typeof process<"u"&&({FORCE_COLOR:Er,NODE_DISABLE_COLORS:Qc,NO_COLOR:Zc,TERM:eu}=process.env||{},tu=process.stdout&&process.stdout.isTTY);K={enabled:!Qc&&Zc==null&&eu!=="dumb"&&(Er!=null&&Er!=="0"||tu),reset:ne(0,0),bold:ne(1,22),dim:ne(2,22),italic:ne(3,23),underline:ne(4,24),inverse:ne(7,27),hidden:ne(8,28),strikethrough:ne(9,29),black:ne(30,39),red:ne(31,39),green:ne(32,39),yellow:ne(33,39),blue:ne(34,39),magenta:ne(35,39),cyan:ne(36,39),white:ne(37,39),gray:ne(90,39),grey:ne(90,39),bgBlack:ne(40,49),bgRed:ne(41,49),bgGreen:ne(42,49),bgYellow:ne(43,49),bgBlue:ne(44,49),bgMagenta:ne(45,49),bgCyan:ne(46,49),bgWhite:ne(47,49)};Ne=K});var nu=w((rR,Vv)=>{Vv.exports={name:"dotenv",version:"16.4.5",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec","test:coverage":"tap --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var ni=w((oR,wt)=>{var Rr=require("fs"),Dr=require("path"),Wv=require("os"),Yv=require("crypto"),Jv=nu(),Cr=Jv.version,Kv=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Qv(e){let t={},n=e.toString();n=n.replace(/\r\n?/mg,`
|
|
3
3
|
`);let i;for(;(i=Kv.exec(n))!=null;){let a=i[1],r=i[2]||"";r=r.trim();let o=r[0];r=r.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),o==='"'&&(r=r.replace(/\\n/g,`
|
|
4
4
|
`),r=r.replace(/\\r/g,"\r")),t[a]=r}return t}function Zv(e){let t=ru(e),n=ye.configDotenv({path:t});if(!n.parsed){let o=new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw o.code="MISSING_DATA",o}let i=au(e).split(","),a=i.length,r;for(let o=0;o<a;o++)try{let s=i[o].trim(),u=ng(n,s);r=ye.decrypt(u.ciphertext,u.key);break}catch(s){if(o+1>=a)throw s}return ye.parse(r)}function eg(e){console.log(`[dotenv@${Cr}][INFO] ${e}`)}function tg(e){console.log(`[dotenv@${Cr}][WARN] ${e}`)}function Vi(e){console.log(`[dotenv@${Cr}][DEBUG] ${e}`)}function au(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function ng(e,t){let n;try{n=new URL(t)}catch(s){if(s.code==="ERR_INVALID_URL"){let u=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw u.code="INVALID_DOTENV_KEY",u}throw s}let i=n.password;if(!i){let s=new Error("INVALID_DOTENV_KEY: Missing key part");throw s.code="INVALID_DOTENV_KEY",s}let a=n.searchParams.get("environment");if(!a){let s=new Error("INVALID_DOTENV_KEY: Missing environment part");throw s.code="INVALID_DOTENV_KEY",s}let r=`DOTENV_VAULT_${a.toUpperCase()}`,o=e.parsed[r];if(!o){let s=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${r} in your .env.vault file.`);throw s.code="NOT_FOUND_DOTENV_ENVIRONMENT",s}return{ciphertext:o,key:i}}function ru(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let n of e.path)Rr.existsSync(n)&&(t=n.endsWith(".vault")?n:`${n}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=Dr.resolve(process.cwd(),".env.vault");return Rr.existsSync(t)?t:null}function iu(e){return e[0]==="~"?Dr.join(Wv.homedir(),e.slice(1)):e}function ig(e){eg("Loading env from encrypted .env.vault");let t=ye._parseVault(e),n=process.env;return e&&e.processEnv!=null&&(n=e.processEnv),ye.populate(n,t,e),{parsed:t}}function ag(e){let t=Dr.resolve(process.cwd(),".env"),n="utf8",i=!!(e&&e.debug);e&&e.encoding?n=e.encoding:i&&Vi("No encoding is specified. UTF-8 is used by default");let a=[t];if(e&&e.path)if(!Array.isArray(e.path))a=[iu(e.path)];else{a=[];for(let u of e.path)a.push(iu(u))}let r,o={};for(let u of a)try{let p=ye.parse(Rr.readFileSync(u,{encoding:n}));ye.populate(o,p,e)}catch(p){i&&Vi(`Failed to load ${u} ${p.message}`),r=p}let s=process.env;return e&&e.processEnv!=null&&(s=e.processEnv),ye.populate(s,o,e),r?{parsed:o,error:r}:{parsed:o}}function rg(e){if(au(e).length===0)return ye.configDotenv(e);let t=ru(e);return t?ye._configVault(e):(tg(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),ye.configDotenv(e))}function og(e,t){let n=Buffer.from(t.slice(-64),"hex"),i=Buffer.from(e,"base64"),a=i.subarray(0,12),r=i.subarray(-16);i=i.subarray(12,-16);try{let o=Yv.createDecipheriv("aes-256-gcm",n,a);return o.setAuthTag(r),`${o.update(i)}${o.final()}`}catch(o){let s=o instanceof RangeError,u=o.message==="Invalid key length",p=o.message==="Unsupported state or unable to authenticate data";if(s||u){let l=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw l.code="INVALID_DOTENV_KEY",l}else if(p){let l=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw l.code="DECRYPTION_FAILED",l}else throw o}}function sg(e,t,n={}){let i=!!(n&&n.debug),a=!!(n&&n.override);if(typeof t!="object"){let r=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw r.code="OBJECT_REQUIRED",r}for(let r of Object.keys(t))Object.prototype.hasOwnProperty.call(e,r)?(a===!0&&(e[r]=t[r]),i&&Vi(a===!0?`"${r}" is already defined and WAS overwritten`:`"${r}" is already defined and was NOT overwritten`)):e[r]=t[r]}var ye={configDotenv:ag,_configVault:ig,_parseVault:Zv,config:rg,decrypt:og,parse:Qv,populate:sg};wt.exports.configDotenv=ye.configDotenv;wt.exports._configVault=ye._configVault;wt.exports._parseVault=ye._parseVault;wt.exports.config=ye.config;wt.exports.decrypt=ye.decrypt;wt.exports.parse=ye.parse;wt.exports.populate=ye.populate;wt.exports=ye});var Re=w(Or=>{"use strict";Or.fromCallback=function(e){return Object.defineProperty(function(...t){if(typeof t[t.length-1]=="function")e.apply(this,t);else return new Promise((n,i)=>{e.call(this,...t,(a,r)=>a!=null?i(a):n(r))})},"name",{value:e.name})};Or.fromPromise=function(e){return Object.defineProperty(function(...t){let n=t[t.length-1];if(typeof n!="function")return e.apply(this,t);e.apply(this,t.slice(0,-1)).then(i=>n(null,i),n)},"name",{value:e.name})}});var su=w((cR,ou)=>{var It=require("constants"),cg=process.cwd,Wi=null,ug=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Wi||(Wi=cg.call(process)),Wi};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Tr=process.chdir,process.chdir=function(e){Wi=null,Tr.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Tr));var Tr;ou.exports=lg;function lg(e){It.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||n(e),e.chown=r(e.chown),e.fchown=r(e.fchown),e.lchown=r(e.lchown),e.chmod=i(e.chmod),e.fchmod=i(e.fchmod),e.lchmod=i(e.lchmod),e.chownSync=o(e.chownSync),e.fchownSync=o(e.fchownSync),e.lchownSync=o(e.lchownSync),e.chmodSync=a(e.chmodSync),e.fchmodSync=a(e.fchmodSync),e.lchmodSync=a(e.lchmodSync),e.stat=s(e.stat),e.fstat=s(e.fstat),e.lstat=s(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(l,m,x){x&&process.nextTick(x)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(l,m,x,g){g&&process.nextTick(g)},e.lchownSync=function(){}),ug==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:function(l){function m(x,g,h){var y=Date.now(),_=0;l(x,g,function E(O){if(O&&(O.code==="EACCES"||O.code==="EPERM")&&Date.now()-y<6e4){setTimeout(function(){e.stat(g,function(R,k){R&&R.code==="ENOENT"?l(x,g,E):h(O)})},_),_<100&&(_+=10);return}h&&h(O)})}return Object.setPrototypeOf&&Object.setPrototypeOf(m,l),m}(e.rename)),e.read=typeof e.read!="function"?e.read:function(l){function m(x,g,h,y,_,E){var O;if(E&&typeof E=="function"){var R=0;O=function(k,q,J){if(k&&k.code==="EAGAIN"&&R<10)return R++,l.call(e,x,g,h,y,_,O);E.apply(this,arguments)}}return l.call(e,x,g,h,y,_,O)}return Object.setPrototypeOf&&Object.setPrototypeOf(m,l),m}(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:function(l){return function(m,x,g,h,y){for(var _=0;;)try{return l.call(e,m,x,g,h,y)}catch(E){if(E.code==="EAGAIN"&&_<10){_++;continue}throw E}}}(e.readSync);function t(l){l.lchmod=function(m,x,g){l.open(m,It.O_WRONLY|It.O_SYMLINK,x,function(h,y){if(h){g&&g(h);return}l.fchmod(y,x,function(_){l.close(y,function(E){g&&g(_||E)})})})},l.lchmodSync=function(m,x){var g=l.openSync(m,It.O_WRONLY|It.O_SYMLINK,x),h=!0,y;try{y=l.fchmodSync(g,x),h=!1}finally{if(h)try{l.closeSync(g)}catch{}else l.closeSync(g)}return y}}function n(l){It.hasOwnProperty("O_SYMLINK")&&l.futimes?(l.lutimes=function(m,x,g,h){l.open(m,It.O_SYMLINK,function(y,_){if(y){h&&h(y);return}l.futimes(_,x,g,function(E){l.close(_,function(O){h&&h(E||O)})})})},l.lutimesSync=function(m,x,g){var h=l.openSync(m,It.O_SYMLINK),y,_=!0;try{y=l.futimesSync(h,x,g),_=!1}finally{if(_)try{l.closeSync(h)}catch{}else l.closeSync(h)}return y}):l.futimes&&(l.lutimes=function(m,x,g,h){h&&process.nextTick(h)},l.lutimesSync=function(){})}function i(l){return l&&function(m,x,g){return l.call(e,m,x,function(h){p(h)&&(h=null),g&&g.apply(this,arguments)})}}function a(l){return l&&function(m,x){try{return l.call(e,m,x)}catch(g){if(!p(g))throw g}}}function r(l){return l&&function(m,x,g,h){return l.call(e,m,x,g,function(y){p(y)&&(y=null),h&&h.apply(this,arguments)})}}function o(l){return l&&function(m,x,g){try{return l.call(e,m,x,g)}catch(h){if(!p(h))throw h}}}function s(l){return l&&function(m,x,g){typeof x=="function"&&(g=x,x=null);function h(y,_){_&&(_.uid<0&&(_.uid+=4294967296),_.gid<0&&(_.gid+=4294967296)),g&&g.apply(this,arguments)}return x?l.call(e,m,x,h):l.call(e,m,h)}}function u(l){return l&&function(m,x){var g=x?l.call(e,m,x):l.call(e,m);return g&&(g.uid<0&&(g.uid+=4294967296),g.gid<0&&(g.gid+=4294967296)),g}}function p(l){if(!l||l.code==="ENOSYS")return!0;var m=!process.getuid||process.getuid()!==0;return!!(m&&(l.code==="EINVAL"||l.code==="EPERM"))}}});var lu=w((uR,uu)=>{var cu=require("stream").Stream;uu.exports=pg;function pg(e){return{ReadStream:t,WriteStream:n};function t(i,a){if(!(this instanceof t))return new t(i,a);cu.call(this);var r=this;this.path=i,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,a=a||{};for(var o=Object.keys(a),s=0,u=o.length;s<u;s++){var p=o[s];this[p]=a[p]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){r._read()});return}e.open(this.path,this.flags,this.mode,function(l,m){if(l){r.emit("error",l),r.readable=!1;return}r.fd=m,r.emit("open",m),r._read()})}function n(i,a){if(!(this instanceof n))return new n(i,a);cu.call(this),this.path=i,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,a=a||{};for(var r=Object.keys(a),o=0,s=r.length;o<s;o++){var u=r[o];this[u]=a[u]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var du=w((lR,pu)=>{"use strict";pu.exports=mg;var dg=Object.getPrototypeOf||function(e){return e.__proto__};function mg(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:dg(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}});var wn=w((pR,Ir)=>{var ce=require("fs"),fg=su(),hg=lu(),xg=du(),Yi=require("util"),Ae,Ki;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Ae=Symbol.for("graceful-fs.queue"),Ki=Symbol.for("graceful-fs.previous")):(Ae="___graceful-fs.queue",Ki="___graceful-fs.previous");function vg(){}function hu(e,t){Object.defineProperty(e,Ae,{get:function(){return t}})}var Yt=vg;Yi.debuglog?Yt=Yi.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Yt=function(){var e=Yi.format.apply(Yi,arguments);e="GFS4: "+e.split(/\n/).join(`
|
|
5
|
-
GFS4: `),console.error(e)});ce[Ae]||(mu=global[Ae]||[],hu(ce,mu),ce.close=function(e){function t(n,i){return e.call(ce,n,function(a){a||fu(),typeof i=="function"&&i.apply(this,arguments)})}return Object.defineProperty(t,Ki,{value:e}),t}(ce.close),ce.closeSync=function(e){function t(n){e.apply(ce,arguments),fu()}return Object.defineProperty(t,Ki,{value:e}),t}(ce.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Yt(ce[Ae]),require("assert").equal(ce[Ae].length,0)}));var mu;global[Ae]||hu(global,ce[Ae]);Ir.exports=Pr(xg(ce));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!ce.__patched&&(Ir.exports=Pr(ce),ce.__patched=!0);function Pr(e){fg(e),e.gracefulify=Pr,e.createReadStream=q,e.createWriteStream=J;var t=e.readFile;e.readFile=n;function n(I,B,G){return typeof B=="function"&&(G=B,B=null),Q(I,B,G);function Q(Y,$,P,W){return t(Y,$,function(C){C&&(C.code==="EMFILE"||C.code==="ENFILE")?_n([Q,[Y,$,P],C,W||Date.now(),Date.now()]):typeof P=="function"&&P.apply(this,arguments)})}}var i=e.writeFile;e.writeFile=a;function a(I,B,G,Q){return typeof G=="function"&&(Q=G,G=null),Y(I,B,G,Q);function Y($,P,W,C,T){return i($,P,W,function(L){L&&(L.code==="EMFILE"||L.code==="ENFILE")?_n([Y,[$,P,W,C],L,T||Date.now(),Date.now()]):typeof C=="function"&&C.apply(this,arguments)})}}var r=e.appendFile;r&&(e.appendFile=o);function o(I,B,G,Q){return typeof G=="function"&&(Q=G,G=null),Y(I,B,G,Q);function Y($,P,W,C,T){return r($,P,W,function(L){L&&(L.code==="EMFILE"||L.code==="ENFILE")?_n([Y,[$,P,W,C],L,T||Date.now(),Date.now()]):typeof C=="function"&&C.apply(this,arguments)})}}var s=e.copyFile;s&&(e.copyFile=u);function u(I,B,G,Q){return typeof G=="function"&&(Q=G,G=0),Y(I,B,G,Q);function Y($,P,W,C,T){return s($,P,W,function(L){L&&(L.code==="EMFILE"||L.code==="ENFILE")?_n([Y,[$,P,W,C],L,T||Date.now(),Date.now()]):typeof C=="function"&&C.apply(this,arguments)})}}var p=e.readdir;e.readdir=m;var l=/^v[0-5]\./;function m(I,B,G){typeof B=="function"&&(G=B,B=null);var Q=l.test(process.version)?function(P,W,C,T){return p(P,Y(P,W,C,T))}:function(P,W,C,T){return p(P,W,Y(P,W,C,T))};return Q(I,B,G);function Y($,P,W,C){return function(T,L){T&&(T.code==="EMFILE"||T.code==="ENFILE")?_n([Q,[$,P,W],T,C||Date.now(),Date.now()]):(L&&L.sort&&L.sort(),typeof W=="function"&&W.call(this,T,L))}}}if(process.version.substr(0,4)==="v0.8"){var x=hg(e);E=x.ReadStream,R=x.WriteStream}var g=e.ReadStream;g&&(E.prototype=Object.create(g.prototype),E.prototype.open=O);var h=e.WriteStream;h&&(R.prototype=Object.create(h.prototype),R.prototype.open=k),Object.defineProperty(e,"ReadStream",{get:function(){return E},set:function(I){E=I},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return R},set:function(I){R=I},enumerable:!0,configurable:!0});var y=E;Object.defineProperty(e,"FileReadStream",{get:function(){return y},set:function(I){y=I},enumerable:!0,configurable:!0});var _=R;Object.defineProperty(e,"FileWriteStream",{get:function(){return _},set:function(I){_=I},enumerable:!0,configurable:!0});function E(I,B){return this instanceof E?(g.apply(this,arguments),this):E.apply(Object.create(E.prototype),arguments)}function O(){var I=this;pe(I.path,I.flags,I.mode,function(B,G){B?(I.autoClose&&I.destroy(),I.emit("error",B)):(I.fd=G,I.emit("open",G),I.read())})}function R(I,B){return this instanceof R?(h.apply(this,arguments),this):R.apply(Object.create(R.prototype),arguments)}function k(){var I=this;pe(I.path,I.flags,I.mode,function(B,G){B?(I.destroy(),I.emit("error",B)):(I.fd=G,I.emit("open",G))})}function q(I,B){return new e.ReadStream(I,B)}function J(I,B){return new e.WriteStream(I,B)}var le=e.open;e.open=pe;function pe(I,B,G,Q){return typeof G=="function"&&(Q=G,G=null),Y(I,B,G,Q);function Y($,P,W,C,T){return le($,P,W,function(L,he){L&&(L.code==="EMFILE"||L.code==="ENFILE")?_n([Y,[$,P,W,C],L,T||Date.now(),Date.now()]):typeof C=="function"&&C.apply(this,arguments)})}}return e}function _n(e){Yt("ENQUEUE",e[0].name,e[1]),ce[Ae].push(e),Ar()}var Ji;function fu(){for(var e=Date.now(),t=0;t<ce[Ae].length;++t)ce[Ae][t].length>2&&(ce[Ae][t][3]=e,ce[Ae][t][4]=e);Ar()}function Ar(){if(clearTimeout(Ji),Ji=void 0,ce[Ae].length!==0){var e=ce[Ae].shift(),t=e[0],n=e[1],i=e[2],a=e[3],r=e[4];if(a===void 0)Yt("RETRY",t.name,n),t.apply(null,n);else if(Date.now()-a>=6e4){Yt("TIMEOUT",t.name,n);var o=n.pop();typeof o=="function"&&o.call(null,i)}else{var s=Date.now()-r,u=Math.max(r-a,1),p=Math.min(u*1.2,100);s>=p?(Yt("RETRY",t.name,n),t.apply(null,n.concat([a]))):ce[Ae].push(e)}Ji===void 0&&(Ji=setTimeout(Ar,0))}}});var Ue=w(St=>{"use strict";var xu=Re().fromCallback,qe=wn(),gg=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(e=>typeof qe[e]=="function");Object.assign(St,qe);gg.forEach(e=>{St[e]=xu(qe[e])});St.exists=function(e,t){return typeof t=="function"?qe.exists(e,t):new Promise(n=>qe.exists(e,n))};St.read=function(e,t,n,i,a,r){return typeof r=="function"?qe.read(e,t,n,i,a,r):new Promise((o,s)=>{qe.read(e,t,n,i,a,(u,p,l)=>{if(u)return s(u);o({bytesRead:p,buffer:l})})})};St.write=function(e,t,...n){return typeof n[n.length-1]=="function"?qe.write(e,t,...n):new Promise((i,a)=>{qe.write(e,t,...n,(r,o,s)=>{if(r)return a(r);i({bytesWritten:o,buffer:s})})})};St.readv=function(e,t,...n){return typeof n[n.length-1]=="function"?qe.readv(e,t,...n):new Promise((i,a)=>{qe.readv(e,t,...n,(r,o,s)=>{if(r)return a(r);i({bytesRead:o,buffers:s})})})};St.writev=function(e,t,...n){return typeof n[n.length-1]=="function"?qe.writev(e,t,...n):new Promise((i,a)=>{qe.writev(e,t,...n,(r,o,s)=>{if(r)return a(r);i({bytesWritten:o,buffers:s})})})};typeof qe.realpath.native=="function"?St.realpath.native=xu(qe.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var gu=w((mR,vu)=>{"use strict";var bg=require("path");vu.exports.checkPath=function(t){if(process.platform==="win32"&&/[<>:"|?*]/.test(t.replace(bg.parse(t).root,""))){let i=new Error(`Path contains invalid characters: ${t}`);throw i.code="EINVAL",i}}});var wu=w((fR,kr)=>{"use strict";var bu=Ue(),{checkPath:yu}=gu(),_u=e=>{let t={mode:511};return typeof e=="number"?e:{...t,...e}.mode};kr.exports.makeDir=async(e,t)=>(yu(e),bu.mkdir(e,{mode:_u(t),recursive:!0}));kr.exports.makeDirSync=(e,t)=>(yu(e),bu.mkdirSync(e,{mode:_u(t),recursive:!0}))});var ot=w((hR,Su)=>{"use strict";var yg=Re().fromPromise,{makeDir:_g,makeDirSync:Fr}=wu(),jr=yg(_g);Su.exports={mkdirs:jr,mkdirsSync:Fr,mkdirp:jr,mkdirpSync:Fr,ensureDir:jr,ensureDirSync:Fr}});var kt=w((xR,Ru)=>{"use strict";var wg=Re().fromPromise,Eu=Ue();function Sg(e){return Eu.access(e).then(()=>!0).catch(()=>!1)}Ru.exports={pathExists:wg(Sg),pathExistsSync:Eu.existsSync}});var Lr=w((vR,Du)=>{"use strict";var Sn=Ue(),Eg=Re().fromPromise;async function Rg(e,t,n){let i=await Sn.open(e,"r+"),a=null;try{await Sn.futimes(i,t,n)}finally{try{await Sn.close(i)}catch(r){a=r}}if(a)throw a}function Dg(e,t,n){let i=Sn.openSync(e,"r+");return Sn.futimesSync(i,t,n),Sn.closeSync(i)}Du.exports={utimesMillis:Eg(Rg),utimesMillisSync:Dg}});var Jt=w((gR,Pu)=>{"use strict";var En=Ue(),De=require("path"),Cu=Re().fromPromise;function Cg(e,t,n){let i=n.dereference?a=>En.stat(a,{bigint:!0}):a=>En.lstat(a,{bigint:!0});return Promise.all([i(e),i(t).catch(a=>{if(a.code==="ENOENT")return null;throw a})]).then(([a,r])=>({srcStat:a,destStat:r}))}function Og(e,t,n){let i,a=n.dereference?o=>En.statSync(o,{bigint:!0}):o=>En.lstatSync(o,{bigint:!0}),r=a(e);try{i=a(t)}catch(o){if(o.code==="ENOENT")return{srcStat:r,destStat:null};throw o}return{srcStat:r,destStat:i}}async function Tg(e,t,n,i){let{srcStat:a,destStat:r}=await Cg(e,t,i);if(r){if(ii(a,r)){let o=De.basename(e),s=De.basename(t);if(n==="move"&&o!==s&&o.toLowerCase()===s.toLowerCase())return{srcStat:a,destStat:r,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(a.isDirectory()&&!r.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!a.isDirectory()&&r.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(a.isDirectory()&&Nr(e,t))throw new Error(Qi(e,t,n));return{srcStat:a,destStat:r}}function Pg(e,t,n,i){let{srcStat:a,destStat:r}=Og(e,t,i);if(r){if(ii(a,r)){let o=De.basename(e),s=De.basename(t);if(n==="move"&&o!==s&&o.toLowerCase()===s.toLowerCase())return{srcStat:a,destStat:r,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(a.isDirectory()&&!r.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!a.isDirectory()&&r.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(a.isDirectory()&&Nr(e,t))throw new Error(Qi(e,t,n));return{srcStat:a,destStat:r}}async function Ou(e,t,n,i){let a=De.resolve(De.dirname(e)),r=De.resolve(De.dirname(n));if(r===a||r===De.parse(r).root)return;let o;try{o=await En.stat(r,{bigint:!0})}catch(s){if(s.code==="ENOENT")return;throw s}if(ii(t,o))throw new Error(Qi(e,n,i));return Ou(e,t,r,i)}function Tu(e,t,n,i){let a=De.resolve(De.dirname(e)),r=De.resolve(De.dirname(n));if(r===a||r===De.parse(r).root)return;let o;try{o=En.statSync(r,{bigint:!0})}catch(s){if(s.code==="ENOENT")return;throw s}if(ii(t,o))throw new Error(Qi(e,n,i));return Tu(e,t,r,i)}function ii(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function Nr(e,t){let n=De.resolve(e).split(De.sep).filter(a=>a),i=De.resolve(t).split(De.sep).filter(a=>a);return n.every((a,r)=>i[r]===a)}function Qi(e,t,n){return`Cannot ${n} '${e}' to a subdirectory of itself, '${t}'.`}Pu.exports={checkPaths:Cu(Tg),checkPathsSync:Pg,checkParentPaths:Cu(Ou),checkParentPathsSync:Tu,isSrcSubdir:Nr,areIdentical:ii}});var ju=w((bR,Fu)=>{"use strict";var Fe=Ue(),ai=require("path"),{mkdirs:Ag}=ot(),{pathExists:Ig}=kt(),{utimesMillis:kg}=Lr(),ri=Jt();async function Fg(e,t,n={}){typeof n=="function"&&(n={filter: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;
|
|
5
|
+
GFS4: `),console.error(e)});ce[Ae]||(mu=global[Ae]||[],hu(ce,mu),ce.close=function(e){function t(n,i){return e.call(ce,n,function(a){a||fu(),typeof i=="function"&&i.apply(this,arguments)})}return Object.defineProperty(t,Ki,{value:e}),t}(ce.close),ce.closeSync=function(e){function t(n){e.apply(ce,arguments),fu()}return Object.defineProperty(t,Ki,{value:e}),t}(ce.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Yt(ce[Ae]),require("assert").equal(ce[Ae].length,0)}));var mu;global[Ae]||hu(global,ce[Ae]);Ir.exports=Pr(xg(ce));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!ce.__patched&&(Ir.exports=Pr(ce),ce.__patched=!0);function Pr(e){fg(e),e.gracefulify=Pr,e.createReadStream=q,e.createWriteStream=J;var t=e.readFile;e.readFile=n;function n(I,B,G){return typeof B=="function"&&(G=B,B=null),Z(I,B,G);function Z(Y,$,P,W){return t(Y,$,function(C){C&&(C.code==="EMFILE"||C.code==="ENFILE")?_n([Z,[Y,$,P],C,W||Date.now(),Date.now()]):typeof P=="function"&&P.apply(this,arguments)})}}var i=e.writeFile;e.writeFile=a;function a(I,B,G,Z){return typeof G=="function"&&(Z=G,G=null),Y(I,B,G,Z);function Y($,P,W,C,T){return i($,P,W,function(L){L&&(L.code==="EMFILE"||L.code==="ENFILE")?_n([Y,[$,P,W,C],L,T||Date.now(),Date.now()]):typeof C=="function"&&C.apply(this,arguments)})}}var r=e.appendFile;r&&(e.appendFile=o);function o(I,B,G,Z){return typeof G=="function"&&(Z=G,G=null),Y(I,B,G,Z);function Y($,P,W,C,T){return r($,P,W,function(L){L&&(L.code==="EMFILE"||L.code==="ENFILE")?_n([Y,[$,P,W,C],L,T||Date.now(),Date.now()]):typeof C=="function"&&C.apply(this,arguments)})}}var s=e.copyFile;s&&(e.copyFile=u);function u(I,B,G,Z){return typeof G=="function"&&(Z=G,G=0),Y(I,B,G,Z);function Y($,P,W,C,T){return s($,P,W,function(L){L&&(L.code==="EMFILE"||L.code==="ENFILE")?_n([Y,[$,P,W,C],L,T||Date.now(),Date.now()]):typeof C=="function"&&C.apply(this,arguments)})}}var p=e.readdir;e.readdir=m;var l=/^v[0-5]\./;function m(I,B,G){typeof B=="function"&&(G=B,B=null);var Z=l.test(process.version)?function(P,W,C,T){return p(P,Y(P,W,C,T))}:function(P,W,C,T){return p(P,W,Y(P,W,C,T))};return Z(I,B,G);function Y($,P,W,C){return function(T,L){T&&(T.code==="EMFILE"||T.code==="ENFILE")?_n([Z,[$,P,W],T,C||Date.now(),Date.now()]):(L&&L.sort&&L.sort(),typeof W=="function"&&W.call(this,T,L))}}}if(process.version.substr(0,4)==="v0.8"){var x=hg(e);E=x.ReadStream,R=x.WriteStream}var g=e.ReadStream;g&&(E.prototype=Object.create(g.prototype),E.prototype.open=O);var h=e.WriteStream;h&&(R.prototype=Object.create(h.prototype),R.prototype.open=k),Object.defineProperty(e,"ReadStream",{get:function(){return E},set:function(I){E=I},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return R},set:function(I){R=I},enumerable:!0,configurable:!0});var y=E;Object.defineProperty(e,"FileReadStream",{get:function(){return y},set:function(I){y=I},enumerable:!0,configurable:!0});var _=R;Object.defineProperty(e,"FileWriteStream",{get:function(){return _},set:function(I){_=I},enumerable:!0,configurable:!0});function E(I,B){return this instanceof E?(g.apply(this,arguments),this):E.apply(Object.create(E.prototype),arguments)}function O(){var I=this;pe(I.path,I.flags,I.mode,function(B,G){B?(I.autoClose&&I.destroy(),I.emit("error",B)):(I.fd=G,I.emit("open",G),I.read())})}function R(I,B){return this instanceof R?(h.apply(this,arguments),this):R.apply(Object.create(R.prototype),arguments)}function k(){var I=this;pe(I.path,I.flags,I.mode,function(B,G){B?(I.destroy(),I.emit("error",B)):(I.fd=G,I.emit("open",G))})}function q(I,B){return new e.ReadStream(I,B)}function J(I,B){return new e.WriteStream(I,B)}var le=e.open;e.open=pe;function pe(I,B,G,Z){return typeof G=="function"&&(Z=G,G=null),Y(I,B,G,Z);function Y($,P,W,C,T){return le($,P,W,function(L,he){L&&(L.code==="EMFILE"||L.code==="ENFILE")?_n([Y,[$,P,W,C],L,T||Date.now(),Date.now()]):typeof C=="function"&&C.apply(this,arguments)})}}return e}function _n(e){Yt("ENQUEUE",e[0].name,e[1]),ce[Ae].push(e),Ar()}var Ji;function fu(){for(var e=Date.now(),t=0;t<ce[Ae].length;++t)ce[Ae][t].length>2&&(ce[Ae][t][3]=e,ce[Ae][t][4]=e);Ar()}function Ar(){if(clearTimeout(Ji),Ji=void 0,ce[Ae].length!==0){var e=ce[Ae].shift(),t=e[0],n=e[1],i=e[2],a=e[3],r=e[4];if(a===void 0)Yt("RETRY",t.name,n),t.apply(null,n);else if(Date.now()-a>=6e4){Yt("TIMEOUT",t.name,n);var o=n.pop();typeof o=="function"&&o.call(null,i)}else{var s=Date.now()-r,u=Math.max(r-a,1),p=Math.min(u*1.2,100);s>=p?(Yt("RETRY",t.name,n),t.apply(null,n.concat([a]))):ce[Ae].push(e)}Ji===void 0&&(Ji=setTimeout(Ar,0))}}});var Ue=w(St=>{"use strict";var xu=Re().fromCallback,qe=wn(),gg=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(e=>typeof qe[e]=="function");Object.assign(St,qe);gg.forEach(e=>{St[e]=xu(qe[e])});St.exists=function(e,t){return typeof t=="function"?qe.exists(e,t):new Promise(n=>qe.exists(e,n))};St.read=function(e,t,n,i,a,r){return typeof r=="function"?qe.read(e,t,n,i,a,r):new Promise((o,s)=>{qe.read(e,t,n,i,a,(u,p,l)=>{if(u)return s(u);o({bytesRead:p,buffer:l})})})};St.write=function(e,t,...n){return typeof n[n.length-1]=="function"?qe.write(e,t,...n):new Promise((i,a)=>{qe.write(e,t,...n,(r,o,s)=>{if(r)return a(r);i({bytesWritten:o,buffer:s})})})};St.readv=function(e,t,...n){return typeof n[n.length-1]=="function"?qe.readv(e,t,...n):new Promise((i,a)=>{qe.readv(e,t,...n,(r,o,s)=>{if(r)return a(r);i({bytesRead:o,buffers:s})})})};St.writev=function(e,t,...n){return typeof n[n.length-1]=="function"?qe.writev(e,t,...n):new Promise((i,a)=>{qe.writev(e,t,...n,(r,o,s)=>{if(r)return a(r);i({bytesWritten:o,buffers:s})})})};typeof qe.realpath.native=="function"?St.realpath.native=xu(qe.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var gu=w((mR,vu)=>{"use strict";var bg=require("path");vu.exports.checkPath=function(t){if(process.platform==="win32"&&/[<>:"|?*]/.test(t.replace(bg.parse(t).root,""))){let i=new Error(`Path contains invalid characters: ${t}`);throw i.code="EINVAL",i}}});var wu=w((fR,kr)=>{"use strict";var bu=Ue(),{checkPath:yu}=gu(),_u=e=>{let t={mode:511};return typeof e=="number"?e:{...t,...e}.mode};kr.exports.makeDir=async(e,t)=>(yu(e),bu.mkdir(e,{mode:_u(t),recursive:!0}));kr.exports.makeDirSync=(e,t)=>(yu(e),bu.mkdirSync(e,{mode:_u(t),recursive:!0}))});var ot=w((hR,Su)=>{"use strict";var yg=Re().fromPromise,{makeDir:_g,makeDirSync:Fr}=wu(),jr=yg(_g);Su.exports={mkdirs:jr,mkdirsSync:Fr,mkdirp:jr,mkdirpSync:Fr,ensureDir:jr,ensureDirSync:Fr}});var kt=w((xR,Ru)=>{"use strict";var wg=Re().fromPromise,Eu=Ue();function Sg(e){return Eu.access(e).then(()=>!0).catch(()=>!1)}Ru.exports={pathExists:wg(Sg),pathExistsSync:Eu.existsSync}});var Lr=w((vR,Du)=>{"use strict";var Sn=Ue(),Eg=Re().fromPromise;async function Rg(e,t,n){let i=await Sn.open(e,"r+"),a=null;try{await Sn.futimes(i,t,n)}finally{try{await Sn.close(i)}catch(r){a=r}}if(a)throw a}function Dg(e,t,n){let i=Sn.openSync(e,"r+");return Sn.futimesSync(i,t,n),Sn.closeSync(i)}Du.exports={utimesMillis:Eg(Rg),utimesMillisSync:Dg}});var Jt=w((gR,Pu)=>{"use strict";var En=Ue(),De=require("path"),Cu=Re().fromPromise;function Cg(e,t,n){let i=n.dereference?a=>En.stat(a,{bigint:!0}):a=>En.lstat(a,{bigint:!0});return Promise.all([i(e),i(t).catch(a=>{if(a.code==="ENOENT")return null;throw a})]).then(([a,r])=>({srcStat:a,destStat:r}))}function Og(e,t,n){let i,a=n.dereference?o=>En.statSync(o,{bigint:!0}):o=>En.lstatSync(o,{bigint:!0}),r=a(e);try{i=a(t)}catch(o){if(o.code==="ENOENT")return{srcStat:r,destStat:null};throw o}return{srcStat:r,destStat:i}}async function Tg(e,t,n,i){let{srcStat:a,destStat:r}=await Cg(e,t,i);if(r){if(ii(a,r)){let o=De.basename(e),s=De.basename(t);if(n==="move"&&o!==s&&o.toLowerCase()===s.toLowerCase())return{srcStat:a,destStat:r,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(a.isDirectory()&&!r.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!a.isDirectory()&&r.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(a.isDirectory()&&Nr(e,t))throw new Error(Qi(e,t,n));return{srcStat:a,destStat:r}}function Pg(e,t,n,i){let{srcStat:a,destStat:r}=Og(e,t,i);if(r){if(ii(a,r)){let o=De.basename(e),s=De.basename(t);if(n==="move"&&o!==s&&o.toLowerCase()===s.toLowerCase())return{srcStat:a,destStat:r,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(a.isDirectory()&&!r.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!a.isDirectory()&&r.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(a.isDirectory()&&Nr(e,t))throw new Error(Qi(e,t,n));return{srcStat:a,destStat:r}}async function Ou(e,t,n,i){let a=De.resolve(De.dirname(e)),r=De.resolve(De.dirname(n));if(r===a||r===De.parse(r).root)return;let o;try{o=await En.stat(r,{bigint:!0})}catch(s){if(s.code==="ENOENT")return;throw s}if(ii(t,o))throw new Error(Qi(e,n,i));return Ou(e,t,r,i)}function Tu(e,t,n,i){let a=De.resolve(De.dirname(e)),r=De.resolve(De.dirname(n));if(r===a||r===De.parse(r).root)return;let o;try{o=En.statSync(r,{bigint:!0})}catch(s){if(s.code==="ENOENT")return;throw s}if(ii(t,o))throw new Error(Qi(e,n,i));return Tu(e,t,r,i)}function ii(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function Nr(e,t){let n=De.resolve(e).split(De.sep).filter(a=>a),i=De.resolve(t).split(De.sep).filter(a=>a);return n.every((a,r)=>i[r]===a)}function Qi(e,t,n){return`Cannot ${n} '${e}' to a subdirectory of itself, '${t}'.`}Pu.exports={checkPaths:Cu(Tg),checkPathsSync:Pg,checkParentPaths:Cu(Ou),checkParentPathsSync:Tu,isSrcSubdir:Nr,areIdentical:ii}});var ju=w((bR,Fu)=>{"use strict";var Fe=Ue(),ai=require("path"),{mkdirs:Ag}=ot(),{pathExists:Ig}=kt(),{utimesMillis:kg}=Lr(),ri=Jt();async function Fg(e,t,n={}){typeof n=="function"&&(n={filter: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;
|
|
6
6
|
|
|
7
7
|
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:i,destStat:a}=await ri.checkPaths(e,t,"copy",n);if(await ri.checkParentPaths(e,i,t,"copy"),!await Iu(e,t,n))return;let o=ai.dirname(t);await Ig(o)||await Ag(o),await ku(a,e,t,n)}async function Iu(e,t,n){return n.filter?n.filter(e,t):!0}async function ku(e,t,n,i){let r=await(i.dereference?Fe.stat:Fe.lstat)(t);if(r.isDirectory())return qg(r,e,t,n,i);if(r.isFile()||r.isCharacterDevice()||r.isBlockDevice())return jg(r,e,t,n,i);if(r.isSymbolicLink())return Ug(e,t,n,i);throw r.isSocket()?new Error(`Cannot copy a socket file: ${t}`):r.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${t}`):new Error(`Unknown file: ${t}`)}async function jg(e,t,n,i,a){if(!t)return Au(e,n,i,a);if(a.overwrite)return await Fe.unlink(i),Au(e,n,i,a);if(a.errorOnExist)throw new Error(`'${i}' already exists`)}async function Au(e,t,n,i){if(await Fe.copyFile(t,n),i.preserveTimestamps){Lg(e.mode)&&await Ng(n,e.mode);let a=await Fe.stat(t);await kg(n,a.atime,a.mtime)}return Fe.chmod(n,e.mode)}function Lg(e){return(e&128)===0}function Ng(e,t){return Fe.chmod(e,t|128)}async function qg(e,t,n,i,a){t||await Fe.mkdir(i);let r=await Fe.readdir(n);await Promise.all(r.map(async o=>{let s=ai.join(n,o),u=ai.join(i,o);if(!await Iu(s,u,a))return;let{destStat:l}=await ri.checkPaths(s,u,"copy",a);return ku(l,s,u,a)})),t||await Fe.chmod(i,e.mode)}async function Ug(e,t,n,i){let a=await Fe.readlink(t);if(i.dereference&&(a=ai.resolve(process.cwd(),a)),!e)return Fe.symlink(a,n);let r=null;try{r=await Fe.readlink(n)}catch(o){if(o.code==="EINVAL"||o.code==="UNKNOWN")return Fe.symlink(a,n);throw o}if(i.dereference&&(r=ai.resolve(process.cwd(),r)),ri.isSrcSubdir(a,r))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${r}'.`);if(ri.isSrcSubdir(r,a))throw new Error(`Cannot overwrite '${r}' with '${a}'.`);return await Fe.unlink(n),Fe.symlink(a,n)}Fu.exports=Fg});var $u=w((yR,Uu)=>{"use strict";var $e=wn(),oi=require("path"),$g=ot().mkdirsSync,Bg=Lr().utimesMillisSync,si=Jt();function Mg(e,t,n){typeof n=="function"&&(n={filter:n}),n=n||{},n.clobber="clobber"in n?!!n.clobber:!0,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
8
8
|
|
|
@@ -14,7 +14,7 @@ ${i}
|
|
|
14
14
|
${s}
|
|
15
15
|
|
|
16
16
|
${Ne.red("stack")}
|
|
17
|
-
${JSON.stringify(t,null,2)}`),new li}var li,Rt=ti(()=>{"use strict";yn();li=class extends Error{constructor(){super(),this.name="InternalCXError",this.stack=""}}});var Ip=w(z=>{"use strict";var pi=Symbol.for("react.element"),_y=Symbol.for("react.portal"),wy=Symbol.for("react.fragment"),Sy=Symbol.for("react.strict_mode"),Ey=Symbol.for("react.profiler"),Ry=Symbol.for("react.provider"),Dy=Symbol.for("react.context"),Cy=Symbol.for("react.forward_ref"),Oy=Symbol.for("react.suspense"),Ty=Symbol.for("react.memo"),Py=Symbol.for("react.lazy"),wp=Symbol.iterator;function Ay(e){return e===null||typeof e!="object"?null:(e=wp&&e[wp]||e["@@iterator"],typeof e=="function"?e:null)}var Rp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Dp=Object.assign,Cp={};function Cn(e,t,n){this.props=e,this.context=t,this.refs=Cp,this.updater=n||Rp}Cn.prototype.isReactComponent={};Cn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Cn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Op(){}Op.prototype=Cn.prototype;function Qr(e,t,n){this.props=e,this.context=t,this.refs=Cp,this.updater=n||Rp}var Zr=Qr.prototype=new Op;Zr.constructor=Qr;Dp(Zr,Cn.prototype);Zr.isPureReactComponent=!0;var Sp=Array.isArray,Tp=Object.prototype.hasOwnProperty,eo={current:null},Pp={key:!0,ref:!0,__self:!0,__source:!0};function Ap(e,t,n){var i,a={},r=null,o=null;if(t!=null)for(i in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(r=""+t.key),t)Tp.call(t,i)&&!Pp.hasOwnProperty(i)&&(a[i]=t[i]);var s=arguments.length-2;if(s===1)a.children=n;else if(1<s){for(var u=Array(s),p=0;p<s;p++)u[p]=arguments[p+2];a.children=u}if(e&&e.defaultProps)for(i in s=e.defaultProps,s)a[i]===void 0&&(a[i]=s[i]);return{$$typeof:pi,type:e,key:r,ref:o,props:a,_owner:eo.current}}function Iy(e,t){return{$$typeof:pi,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function to(e){return typeof e=="object"&&e!==null&&e.$$typeof===pi}function ky(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ep=/\/+/g;function Kr(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ky(""+e.key):t.toString(36)}function ua(e,t,n,i,a){var r=typeof e;(r==="undefined"||r==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(r){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case pi:case _y:o=!0}}if(o)return o=e,a=a(o),e=i===""?"."+Kr(o,0):i,Sp(a)?(n="",e!=null&&(n=e.replace(Ep,"$&/")+"/"),ua(a,t,n,"",function(p){return p})):a!=null&&(to(a)&&(a=Iy(a,n+(!a.key||o&&o.key===a.key?"":(""+a.key).replace(Ep,"$&/")+"/")+e)),t.push(a)),1;if(o=0,i=i===""?".":i+":",Sp(e))for(var s=0;s<e.length;s++){r=e[s];var u=i+Kr(r,s);o+=ua(r,t,n,u,a)}else if(u=Ay(e),typeof u=="function")for(e=u.call(e),s=0;!(r=e.next()).done;)r=r.value,u=i+Kr(r,s++),o+=ua(r,t,n,u,a);else if(r==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function ca(e,t,n){if(e==null)return e;var i=[],a=0;return ua(e,i,"","",function(r){return t.call(n,r,a++)}),i}function Fy(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Me={current:null},la={transition:null},jy={ReactCurrentDispatcher:Me,ReactCurrentBatchConfig:la,ReactCurrentOwner:eo};z.Children={map:ca,forEach:function(e,t,n){ca(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ca(e,function(){t++}),t},toArray:function(e){return ca(e,function(t){return t})||[]},only:function(e){if(!to(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};z.Component=Cn;z.Fragment=wy;z.Profiler=Ey;z.PureComponent=Qr;z.StrictMode=Sy;z.Suspense=Oy;z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jy;z.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=Dp({},e.props),a=e.key,r=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(r=t.ref,o=eo.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(u in t)Tp.call(t,u)&&!Pp.hasOwnProperty(u)&&(i[u]=t[u]===void 0&&s!==void 0?s[u]:t[u])}var u=arguments.length-2;if(u===1)i.children=n;else if(1<u){s=Array(u);for(var p=0;p<u;p++)s[p]=arguments[p+2];i.children=s}return{$$typeof:pi,type:e.type,key:a,ref:r,props:i,_owner:o}};z.createContext=function(e){return e={$$typeof:Dy,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Ry,_context:e},e.Consumer=e};z.createElement=Ap;z.createFactory=function(e){var t=Ap.bind(null,e);return t.type=e,t};z.createRef=function(){return{current:null}};z.forwardRef=function(e){return{$$typeof:Cy,render:e}};z.isValidElement=to;z.lazy=function(e){return{$$typeof:Py,_payload:{_status:-1,_result:e},_init:Fy}};z.memo=function(e,t){return{$$typeof:Ty,type:e,compare:t===void 0?null:t}};z.startTransition=function(e){var t=la.transition;la.transition={};try{e()}finally{la.transition=t}};z.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};z.useCallback=function(e,t){return Me.current.useCallback(e,t)};z.useContext=function(e){return Me.current.useContext(e)};z.useDebugValue=function(){};z.useDeferredValue=function(e){return Me.current.useDeferredValue(e)};z.useEffect=function(e,t){return Me.current.useEffect(e,t)};z.useId=function(){return Me.current.useId()};z.useImperativeHandle=function(e,t,n){return Me.current.useImperativeHandle(e,t,n)};z.useInsertionEffect=function(e,t){return Me.current.useInsertionEffect(e,t)};z.useLayoutEffect=function(e,t){return Me.current.useLayoutEffect(e,t)};z.useMemo=function(e,t){return Me.current.useMemo(e,t)};z.useReducer=function(e,t,n){return Me.current.useReducer(e,t,n)};z.useRef=function(e){return Me.current.useRef(e)};z.useState=function(e){return Me.current.useState(e)};z.useSyncExternalStore=function(e,t,n){return Me.current.useSyncExternalStore(e,t,n)};z.useTransition=function(){return Me.current.useTransition()};z.version="18.2.0"});var kp=w((X,pa)=>{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e="18.2.0",t=Symbol.for("react.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),h=Symbol.iterator,y="@@iterator";function _(c){if(c===null||typeof c!="object")return null;var d=h&&c[h]||c[y];return typeof d=="function"?d:null}var E={current:null},O={transition:null},R={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},k={current:null},q={},J=null;function le(c){J=c}q.setExtraStackFrame=function(c){J=c},q.getCurrentStack=null,q.getStackAddendum=function(){var c="";J&&(c+=J);var d=q.getCurrentStack;return d&&(c+=d()||""),c};var pe=!1,I=!1,B=!1,G=!1,Q=!1,Y={ReactCurrentDispatcher:E,ReactCurrentBatchConfig:O,ReactCurrentOwner:k};Y.ReactDebugCurrentFrame=q,Y.ReactCurrentActQueue=R;function $(c){{for(var d=arguments.length,v=new Array(d>1?d-1:0),b=1;b<d;b++)v[b-1]=arguments[b];W("warn",c,v)}}function P(c){{for(var d=arguments.length,v=new Array(d>1?d-1:0),b=1;b<d;b++)v[b-1]=arguments[b];W("error",c,v)}}function W(c,d,v){{var b=Y.ReactDebugCurrentFrame,S=b.getStackAddendum();S!==""&&(d+="%s",v=v.concat([S]));var j=v.map(function(A){return String(A)});j.unshift("Warning: "+d),Function.prototype.apply.call(console[c],console,j)}}var C={};function T(c,d){{var v=c.constructor,b=v&&(v.displayName||v.name)||"ReactClass",S=b+"."+d;if(C[S])return;P("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",d,b),C[S]=!0}}var L={isMounted:function(c){return!1},enqueueForceUpdate:function(c,d,v){T(c,"forceUpdate")},enqueueReplaceState:function(c,d,v,b){T(c,"replaceState")},enqueueSetState:function(c,d,v,b){T(c,"setState")}},he=Object.assign,oe={};Object.freeze(oe);function Se(c,d,v){this.props=c,this.context=d,this.refs=oe,this.updater=v||L}Se.prototype.isReactComponent={},Se.prototype.setState=function(c,d){if(typeof c!="object"&&typeof c!="function"&&c!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,c,d,"setState")},Se.prototype.forceUpdate=function(c){this.updater.enqueueForceUpdate(this,c,"forceUpdate")};{var ft={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},je=function(c,d){Object.defineProperty(Se.prototype,c,{get:function(){$("%s(...) is deprecated in plain JavaScript React classes. %s",d[0],d[1])}})};for(var Ee in ft)ft.hasOwnProperty(Ee)&&je(Ee,ft[Ee])}function Vt(){}Vt.prototype=Se.prototype;function at(c,d,v){this.props=c,this.context=d,this.refs=oe,this.updater=v||L}var de=at.prototype=new Vt;de.constructor=at,he(de,Se.prototype),de.isPureReactComponent=!0;function hn(){var c={current:null};return Object.seal(c),c}var rt=Array.isArray;function _t(c){return rt(c)}function Pt(c){{var d=typeof Symbol=="function"&&Symbol.toStringTag,v=d&&c[Symbol.toStringTag]||c.constructor.name||"Object";return v}}function Li(c){try{return xn(c),!1}catch{return!0}}function xn(c){return""+c}function Wt(c){if(Li(c))return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Pt(c)),xn(c)}function pr(c,d,v){var b=c.displayName;if(b)return b;var S=d.displayName||d.name||"";return S!==""?v+"("+S+")":v}function Ke(c){return c.displayName||"Context"}function At(c){if(c==null)return null;if(typeof c.tag=="number"&&P("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case i:return"Fragment";case n:return"Portal";case r:return"Profiler";case a:return"StrictMode";case p:return"Suspense";case l:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case s:var d=c;return Ke(d)+".Consumer";case o:var v=c;return Ke(v._context)+".Provider";case u:return pr(c,c.render,"ForwardRef");case m:var b=c.displayName||null;return b!==null?b:At(c.type)||"Memo";case x:{var S=c,j=S._payload,A=S._init;try{return At(A(j))}catch{return null}}}return null}var Qn=Object.prototype.hasOwnProperty,hc={key:!0,ref:!0,__self:!0,__source:!0},xc,vc,dr;dr={};function gc(c){if(Qn.call(c,"ref")){var d=Object.getOwnPropertyDescriptor(c,"ref").get;if(d&&d.isReactWarning)return!1}return c.ref!==void 0}function bc(c){if(Qn.call(c,"key")){var d=Object.getOwnPropertyDescriptor(c,"key").get;if(d&&d.isReactWarning)return!1}return c.key!==void 0}function qx(c,d){var v=function(){xc||(xc=!0,P("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",d))};v.isReactWarning=!0,Object.defineProperty(c,"key",{get:v,configurable:!0})}function Ux(c,d){var v=function(){vc||(vc=!0,P("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",d))};v.isReactWarning=!0,Object.defineProperty(c,"ref",{get:v,configurable:!0})}function $x(c){if(typeof c.ref=="string"&&k.current&&c.__self&&k.current.stateNode!==c.__self){var d=At(k.current.type);dr[d]||(P('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',d,c.ref),dr[d]=!0)}}var mr=function(c,d,v,b,S,j,A){var U={$$typeof:t,type:c,key:d,ref:v,props:A,_owner:j};return U._store={},Object.defineProperty(U._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(U,"_self",{configurable:!1,enumerable:!1,writable:!1,value:b}),Object.defineProperty(U,"_source",{configurable:!1,enumerable:!1,writable:!1,value:S}),Object.freeze&&(Object.freeze(U.props),Object.freeze(U)),U};function Bx(c,d,v){var b,S={},j=null,A=null,U=null,H=null;if(d!=null){gc(d)&&(A=d.ref,$x(d)),bc(d)&&(Wt(d.key),j=""+d.key),U=d.__self===void 0?null:d.__self,H=d.__source===void 0?null:d.__source;for(b in d)Qn.call(d,b)&&!hc.hasOwnProperty(b)&&(S[b]=d[b])}var ee=arguments.length-2;if(ee===1)S.children=v;else if(ee>1){for(var ae=Array(ee),re=0;re<ee;re++)ae[re]=arguments[re+2];Object.freeze&&Object.freeze(ae),S.children=ae}if(c&&c.defaultProps){var se=c.defaultProps;for(b in se)S[b]===void 0&&(S[b]=se[b])}if(j||A){var xe=typeof c=="function"?c.displayName||c.name||"Unknown":c;j&&qx(S,xe),A&&Ux(S,xe)}return mr(c,j,A,U,H,k.current,S)}function Mx(c,d){var v=mr(c.type,d,c.ref,c._self,c._source,c._owner,c.props);return v}function Gx(c,d,v){if(c==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+c+".");var b,S=he({},c.props),j=c.key,A=c.ref,U=c._self,H=c._source,ee=c._owner;if(d!=null){gc(d)&&(A=d.ref,ee=k.current),bc(d)&&(Wt(d.key),j=""+d.key);var ae;c.type&&c.type.defaultProps&&(ae=c.type.defaultProps);for(b in d)Qn.call(d,b)&&!hc.hasOwnProperty(b)&&(d[b]===void 0&&ae!==void 0?S[b]=ae[b]:S[b]=d[b])}var re=arguments.length-2;if(re===1)S.children=v;else if(re>1){for(var se=Array(re),xe=0;xe<re;xe++)se[xe]=arguments[xe+2];S.children=se}return mr(c.type,j,A,U,H,ee,S)}function vn(c){return typeof c=="object"&&c!==null&&c.$$typeof===t}var yc=".",zx=":";function Xx(c){var d=/[=:]/g,v={"=":"=0",":":"=2"},b=c.replace(d,function(S){return v[S]});return"$"+b}var _c=!1,Hx=/\/+/g;function wc(c){return c.replace(Hx,"$&/")}function fr(c,d){return typeof c=="object"&&c!==null&&c.key!=null?(Wt(c.key),Xx(""+c.key)):d.toString(36)}function Ni(c,d,v,b,S){var j=typeof c;(j==="undefined"||j==="boolean")&&(c=null);var A=!1;if(c===null)A=!0;else switch(j){case"string":case"number":A=!0;break;case"object":switch(c.$$typeof){case t:case n:A=!0}}if(A){var U=c,H=S(U),ee=b===""?yc+fr(U,0):b;if(_t(H)){var ae="";ee!=null&&(ae=wc(ee)+"/"),Ni(H,d,ae,"",function(Uv){return Uv})}else H!=null&&(vn(H)&&(H.key&&(!U||U.key!==H.key)&&Wt(H.key),H=Mx(H,v+(H.key&&(!U||U.key!==H.key)?wc(""+H.key)+"/":"")+ee)),d.push(H));return 1}var re,se,xe=0,Pe=b===""?yc:b+zx;if(_t(c))for(var Xi=0;Xi<c.length;Xi++)re=c[Xi],se=Pe+fr(re,Xi),xe+=Ni(re,d,v,se,S);else{var Sr=_(c);if(typeof Sr=="function"){var Hc=c;Sr===Hc.entries&&(_c||$("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),_c=!0);for(var Nv=Sr.call(Hc),Vc,qv=0;!(Vc=Nv.next()).done;)re=Vc.value,se=Pe+fr(re,qv++),xe+=Ni(re,d,v,se,S)}else if(j==="object"){var Wc=String(c);throw new Error("Objects are not valid as a React child (found: "+(Wc==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":Wc)+"). If you meant to render a collection of children, use an array instead.")}}return xe}function qi(c,d,v){if(c==null)return c;var b=[],S=0;return Ni(c,b,"","",function(j){return d.call(v,j,S++)}),b}function Vx(c){var d=0;return qi(c,function(){d++}),d}function Wx(c,d,v){qi(c,function(){d.apply(this,arguments)},v)}function Yx(c){return qi(c,function(d){return d})||[]}function Jx(c){if(!vn(c))throw new Error("React.Children.only expected to receive a single React element child.");return c}function Kx(c){var d={$$typeof:s,_currentValue:c,_currentValue2:c,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};d.Provider={$$typeof:o,_context:d};var v=!1,b=!1,S=!1;{var j={$$typeof:s,_context:d};Object.defineProperties(j,{Provider:{get:function(){return b||(b=!0,P("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),d.Provider},set:function(A){d.Provider=A}},_currentValue:{get:function(){return d._currentValue},set:function(A){d._currentValue=A}},_currentValue2:{get:function(){return d._currentValue2},set:function(A){d._currentValue2=A}},_threadCount:{get:function(){return d._threadCount},set:function(A){d._threadCount=A}},Consumer:{get:function(){return v||(v=!0,P("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),d.Consumer}},displayName:{get:function(){return d.displayName},set:function(A){S||($("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",A),S=!0)}}}),d.Consumer=j}return d._currentRenderer=null,d._currentRenderer2=null,d}var Zn=-1,hr=0,Sc=1,Qx=2;function Zx(c){if(c._status===Zn){var d=c._result,v=d();if(v.then(function(j){if(c._status===hr||c._status===Zn){var A=c;A._status=Sc,A._result=j}},function(j){if(c._status===hr||c._status===Zn){var A=c;A._status=Qx,A._result=j}}),c._status===Zn){var b=c;b._status=hr,b._result=v}}if(c._status===Sc){var S=c._result;return S===void 0&&P(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
17
|
+
${JSON.stringify(t,null,2)}`),new li}var li,Rt=ti(()=>{"use strict";yn();li=class extends Error{constructor(){super(),this.name="InternalCXError",this.stack=""}}});var Ip=w(z=>{"use strict";var pi=Symbol.for("react.element"),_y=Symbol.for("react.portal"),wy=Symbol.for("react.fragment"),Sy=Symbol.for("react.strict_mode"),Ey=Symbol.for("react.profiler"),Ry=Symbol.for("react.provider"),Dy=Symbol.for("react.context"),Cy=Symbol.for("react.forward_ref"),Oy=Symbol.for("react.suspense"),Ty=Symbol.for("react.memo"),Py=Symbol.for("react.lazy"),wp=Symbol.iterator;function Ay(e){return e===null||typeof e!="object"?null:(e=wp&&e[wp]||e["@@iterator"],typeof e=="function"?e:null)}var Rp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Dp=Object.assign,Cp={};function Cn(e,t,n){this.props=e,this.context=t,this.refs=Cp,this.updater=n||Rp}Cn.prototype.isReactComponent={};Cn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Cn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Op(){}Op.prototype=Cn.prototype;function Qr(e,t,n){this.props=e,this.context=t,this.refs=Cp,this.updater=n||Rp}var Zr=Qr.prototype=new Op;Zr.constructor=Qr;Dp(Zr,Cn.prototype);Zr.isPureReactComponent=!0;var Sp=Array.isArray,Tp=Object.prototype.hasOwnProperty,eo={current:null},Pp={key:!0,ref:!0,__self:!0,__source:!0};function Ap(e,t,n){var i,a={},r=null,o=null;if(t!=null)for(i in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(r=""+t.key),t)Tp.call(t,i)&&!Pp.hasOwnProperty(i)&&(a[i]=t[i]);var s=arguments.length-2;if(s===1)a.children=n;else if(1<s){for(var u=Array(s),p=0;p<s;p++)u[p]=arguments[p+2];a.children=u}if(e&&e.defaultProps)for(i in s=e.defaultProps,s)a[i]===void 0&&(a[i]=s[i]);return{$$typeof:pi,type:e,key:r,ref:o,props:a,_owner:eo.current}}function Iy(e,t){return{$$typeof:pi,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function to(e){return typeof e=="object"&&e!==null&&e.$$typeof===pi}function ky(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ep=/\/+/g;function Kr(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ky(""+e.key):t.toString(36)}function ua(e,t,n,i,a){var r=typeof e;(r==="undefined"||r==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(r){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case pi:case _y:o=!0}}if(o)return o=e,a=a(o),e=i===""?"."+Kr(o,0):i,Sp(a)?(n="",e!=null&&(n=e.replace(Ep,"$&/")+"/"),ua(a,t,n,"",function(p){return p})):a!=null&&(to(a)&&(a=Iy(a,n+(!a.key||o&&o.key===a.key?"":(""+a.key).replace(Ep,"$&/")+"/")+e)),t.push(a)),1;if(o=0,i=i===""?".":i+":",Sp(e))for(var s=0;s<e.length;s++){r=e[s];var u=i+Kr(r,s);o+=ua(r,t,n,u,a)}else if(u=Ay(e),typeof u=="function")for(e=u.call(e),s=0;!(r=e.next()).done;)r=r.value,u=i+Kr(r,s++),o+=ua(r,t,n,u,a);else if(r==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function ca(e,t,n){if(e==null)return e;var i=[],a=0;return ua(e,i,"","",function(r){return t.call(n,r,a++)}),i}function Fy(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Me={current:null},la={transition:null},jy={ReactCurrentDispatcher:Me,ReactCurrentBatchConfig:la,ReactCurrentOwner:eo};z.Children={map:ca,forEach:function(e,t,n){ca(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ca(e,function(){t++}),t},toArray:function(e){return ca(e,function(t){return t})||[]},only:function(e){if(!to(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};z.Component=Cn;z.Fragment=wy;z.Profiler=Ey;z.PureComponent=Qr;z.StrictMode=Sy;z.Suspense=Oy;z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jy;z.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=Dp({},e.props),a=e.key,r=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(r=t.ref,o=eo.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(u in t)Tp.call(t,u)&&!Pp.hasOwnProperty(u)&&(i[u]=t[u]===void 0&&s!==void 0?s[u]:t[u])}var u=arguments.length-2;if(u===1)i.children=n;else if(1<u){s=Array(u);for(var p=0;p<u;p++)s[p]=arguments[p+2];i.children=s}return{$$typeof:pi,type:e.type,key:a,ref:r,props:i,_owner:o}};z.createContext=function(e){return e={$$typeof:Dy,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Ry,_context:e},e.Consumer=e};z.createElement=Ap;z.createFactory=function(e){var t=Ap.bind(null,e);return t.type=e,t};z.createRef=function(){return{current:null}};z.forwardRef=function(e){return{$$typeof:Cy,render:e}};z.isValidElement=to;z.lazy=function(e){return{$$typeof:Py,_payload:{_status:-1,_result:e},_init:Fy}};z.memo=function(e,t){return{$$typeof:Ty,type:e,compare:t===void 0?null:t}};z.startTransition=function(e){var t=la.transition;la.transition={};try{e()}finally{la.transition=t}};z.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};z.useCallback=function(e,t){return Me.current.useCallback(e,t)};z.useContext=function(e){return Me.current.useContext(e)};z.useDebugValue=function(){};z.useDeferredValue=function(e){return Me.current.useDeferredValue(e)};z.useEffect=function(e,t){return Me.current.useEffect(e,t)};z.useId=function(){return Me.current.useId()};z.useImperativeHandle=function(e,t,n){return Me.current.useImperativeHandle(e,t,n)};z.useInsertionEffect=function(e,t){return Me.current.useInsertionEffect(e,t)};z.useLayoutEffect=function(e,t){return Me.current.useLayoutEffect(e,t)};z.useMemo=function(e,t){return Me.current.useMemo(e,t)};z.useReducer=function(e,t,n){return Me.current.useReducer(e,t,n)};z.useRef=function(e){return Me.current.useRef(e)};z.useState=function(e){return Me.current.useState(e)};z.useSyncExternalStore=function(e,t,n){return Me.current.useSyncExternalStore(e,t,n)};z.useTransition=function(){return Me.current.useTransition()};z.version="18.2.0"});var kp=w((X,pa)=>{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e="18.2.0",t=Symbol.for("react.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),h=Symbol.iterator,y="@@iterator";function _(c){if(c===null||typeof c!="object")return null;var d=h&&c[h]||c[y];return typeof d=="function"?d:null}var E={current:null},O={transition:null},R={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},k={current:null},q={},J=null;function le(c){J=c}q.setExtraStackFrame=function(c){J=c},q.getCurrentStack=null,q.getStackAddendum=function(){var c="";J&&(c+=J);var d=q.getCurrentStack;return d&&(c+=d()||""),c};var pe=!1,I=!1,B=!1,G=!1,Z=!1,Y={ReactCurrentDispatcher:E,ReactCurrentBatchConfig:O,ReactCurrentOwner:k};Y.ReactDebugCurrentFrame=q,Y.ReactCurrentActQueue=R;function $(c){{for(var d=arguments.length,v=new Array(d>1?d-1:0),b=1;b<d;b++)v[b-1]=arguments[b];W("warn",c,v)}}function P(c){{for(var d=arguments.length,v=new Array(d>1?d-1:0),b=1;b<d;b++)v[b-1]=arguments[b];W("error",c,v)}}function W(c,d,v){{var b=Y.ReactDebugCurrentFrame,S=b.getStackAddendum();S!==""&&(d+="%s",v=v.concat([S]));var j=v.map(function(A){return String(A)});j.unshift("Warning: "+d),Function.prototype.apply.call(console[c],console,j)}}var C={};function T(c,d){{var v=c.constructor,b=v&&(v.displayName||v.name)||"ReactClass",S=b+"."+d;if(C[S])return;P("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",d,b),C[S]=!0}}var L={isMounted:function(c){return!1},enqueueForceUpdate:function(c,d,v){T(c,"forceUpdate")},enqueueReplaceState:function(c,d,v,b){T(c,"replaceState")},enqueueSetState:function(c,d,v,b){T(c,"setState")}},he=Object.assign,oe={};Object.freeze(oe);function Se(c,d,v){this.props=c,this.context=d,this.refs=oe,this.updater=v||L}Se.prototype.isReactComponent={},Se.prototype.setState=function(c,d){if(typeof c!="object"&&typeof c!="function"&&c!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,c,d,"setState")},Se.prototype.forceUpdate=function(c){this.updater.enqueueForceUpdate(this,c,"forceUpdate")};{var ft={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},je=function(c,d){Object.defineProperty(Se.prototype,c,{get:function(){$("%s(...) is deprecated in plain JavaScript React classes. %s",d[0],d[1])}})};for(var Ee in ft)ft.hasOwnProperty(Ee)&&je(Ee,ft[Ee])}function Vt(){}Vt.prototype=Se.prototype;function at(c,d,v){this.props=c,this.context=d,this.refs=oe,this.updater=v||L}var de=at.prototype=new Vt;de.constructor=at,he(de,Se.prototype),de.isPureReactComponent=!0;function hn(){var c={current:null};return Object.seal(c),c}var rt=Array.isArray;function _t(c){return rt(c)}function Pt(c){{var d=typeof Symbol=="function"&&Symbol.toStringTag,v=d&&c[Symbol.toStringTag]||c.constructor.name||"Object";return v}}function Li(c){try{return xn(c),!1}catch{return!0}}function xn(c){return""+c}function Wt(c){if(Li(c))return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Pt(c)),xn(c)}function pr(c,d,v){var b=c.displayName;if(b)return b;var S=d.displayName||d.name||"";return S!==""?v+"("+S+")":v}function Ke(c){return c.displayName||"Context"}function At(c){if(c==null)return null;if(typeof c.tag=="number"&&P("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case i:return"Fragment";case n:return"Portal";case r:return"Profiler";case a:return"StrictMode";case p:return"Suspense";case l:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case s:var d=c;return Ke(d)+".Consumer";case o:var v=c;return Ke(v._context)+".Provider";case u:return pr(c,c.render,"ForwardRef");case m:var b=c.displayName||null;return b!==null?b:At(c.type)||"Memo";case x:{var S=c,j=S._payload,A=S._init;try{return At(A(j))}catch{return null}}}return null}var Qn=Object.prototype.hasOwnProperty,hc={key:!0,ref:!0,__self:!0,__source:!0},xc,vc,dr;dr={};function gc(c){if(Qn.call(c,"ref")){var d=Object.getOwnPropertyDescriptor(c,"ref").get;if(d&&d.isReactWarning)return!1}return c.ref!==void 0}function bc(c){if(Qn.call(c,"key")){var d=Object.getOwnPropertyDescriptor(c,"key").get;if(d&&d.isReactWarning)return!1}return c.key!==void 0}function qx(c,d){var v=function(){xc||(xc=!0,P("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",d))};v.isReactWarning=!0,Object.defineProperty(c,"key",{get:v,configurable:!0})}function Ux(c,d){var v=function(){vc||(vc=!0,P("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",d))};v.isReactWarning=!0,Object.defineProperty(c,"ref",{get:v,configurable:!0})}function $x(c){if(typeof c.ref=="string"&&k.current&&c.__self&&k.current.stateNode!==c.__self){var d=At(k.current.type);dr[d]||(P('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',d,c.ref),dr[d]=!0)}}var mr=function(c,d,v,b,S,j,A){var U={$$typeof:t,type:c,key:d,ref:v,props:A,_owner:j};return U._store={},Object.defineProperty(U._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(U,"_self",{configurable:!1,enumerable:!1,writable:!1,value:b}),Object.defineProperty(U,"_source",{configurable:!1,enumerable:!1,writable:!1,value:S}),Object.freeze&&(Object.freeze(U.props),Object.freeze(U)),U};function Bx(c,d,v){var b,S={},j=null,A=null,U=null,H=null;if(d!=null){gc(d)&&(A=d.ref,$x(d)),bc(d)&&(Wt(d.key),j=""+d.key),U=d.__self===void 0?null:d.__self,H=d.__source===void 0?null:d.__source;for(b in d)Qn.call(d,b)&&!hc.hasOwnProperty(b)&&(S[b]=d[b])}var ee=arguments.length-2;if(ee===1)S.children=v;else if(ee>1){for(var ae=Array(ee),re=0;re<ee;re++)ae[re]=arguments[re+2];Object.freeze&&Object.freeze(ae),S.children=ae}if(c&&c.defaultProps){var se=c.defaultProps;for(b in se)S[b]===void 0&&(S[b]=se[b])}if(j||A){var xe=typeof c=="function"?c.displayName||c.name||"Unknown":c;j&&qx(S,xe),A&&Ux(S,xe)}return mr(c,j,A,U,H,k.current,S)}function Mx(c,d){var v=mr(c.type,d,c.ref,c._self,c._source,c._owner,c.props);return v}function Gx(c,d,v){if(c==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+c+".");var b,S=he({},c.props),j=c.key,A=c.ref,U=c._self,H=c._source,ee=c._owner;if(d!=null){gc(d)&&(A=d.ref,ee=k.current),bc(d)&&(Wt(d.key),j=""+d.key);var ae;c.type&&c.type.defaultProps&&(ae=c.type.defaultProps);for(b in d)Qn.call(d,b)&&!hc.hasOwnProperty(b)&&(d[b]===void 0&&ae!==void 0?S[b]=ae[b]:S[b]=d[b])}var re=arguments.length-2;if(re===1)S.children=v;else if(re>1){for(var se=Array(re),xe=0;xe<re;xe++)se[xe]=arguments[xe+2];S.children=se}return mr(c.type,j,A,U,H,ee,S)}function vn(c){return typeof c=="object"&&c!==null&&c.$$typeof===t}var yc=".",zx=":";function Xx(c){var d=/[=:]/g,v={"=":"=0",":":"=2"},b=c.replace(d,function(S){return v[S]});return"$"+b}var _c=!1,Hx=/\/+/g;function wc(c){return c.replace(Hx,"$&/")}function fr(c,d){return typeof c=="object"&&c!==null&&c.key!=null?(Wt(c.key),Xx(""+c.key)):d.toString(36)}function Ni(c,d,v,b,S){var j=typeof c;(j==="undefined"||j==="boolean")&&(c=null);var A=!1;if(c===null)A=!0;else switch(j){case"string":case"number":A=!0;break;case"object":switch(c.$$typeof){case t:case n:A=!0}}if(A){var U=c,H=S(U),ee=b===""?yc+fr(U,0):b;if(_t(H)){var ae="";ee!=null&&(ae=wc(ee)+"/"),Ni(H,d,ae,"",function(Uv){return Uv})}else H!=null&&(vn(H)&&(H.key&&(!U||U.key!==H.key)&&Wt(H.key),H=Mx(H,v+(H.key&&(!U||U.key!==H.key)?wc(""+H.key)+"/":"")+ee)),d.push(H));return 1}var re,se,xe=0,Pe=b===""?yc:b+zx;if(_t(c))for(var Xi=0;Xi<c.length;Xi++)re=c[Xi],se=Pe+fr(re,Xi),xe+=Ni(re,d,v,se,S);else{var Sr=_(c);if(typeof Sr=="function"){var Hc=c;Sr===Hc.entries&&(_c||$("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),_c=!0);for(var Nv=Sr.call(Hc),Vc,qv=0;!(Vc=Nv.next()).done;)re=Vc.value,se=Pe+fr(re,qv++),xe+=Ni(re,d,v,se,S)}else if(j==="object"){var Wc=String(c);throw new Error("Objects are not valid as a React child (found: "+(Wc==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":Wc)+"). If you meant to render a collection of children, use an array instead.")}}return xe}function qi(c,d,v){if(c==null)return c;var b=[],S=0;return Ni(c,b,"","",function(j){return d.call(v,j,S++)}),b}function Vx(c){var d=0;return qi(c,function(){d++}),d}function Wx(c,d,v){qi(c,function(){d.apply(this,arguments)},v)}function Yx(c){return qi(c,function(d){return d})||[]}function Jx(c){if(!vn(c))throw new Error("React.Children.only expected to receive a single React element child.");return c}function Kx(c){var d={$$typeof:s,_currentValue:c,_currentValue2:c,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};d.Provider={$$typeof:o,_context:d};var v=!1,b=!1,S=!1;{var j={$$typeof:s,_context:d};Object.defineProperties(j,{Provider:{get:function(){return b||(b=!0,P("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),d.Provider},set:function(A){d.Provider=A}},_currentValue:{get:function(){return d._currentValue},set:function(A){d._currentValue=A}},_currentValue2:{get:function(){return d._currentValue2},set:function(A){d._currentValue2=A}},_threadCount:{get:function(){return d._threadCount},set:function(A){d._threadCount=A}},Consumer:{get:function(){return v||(v=!0,P("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),d.Consumer}},displayName:{get:function(){return d.displayName},set:function(A){S||($("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",A),S=!0)}}}),d.Consumer=j}return d._currentRenderer=null,d._currentRenderer2=null,d}var Zn=-1,hr=0,Sc=1,Qx=2;function Zx(c){if(c._status===Zn){var d=c._result,v=d();if(v.then(function(j){if(c._status===hr||c._status===Zn){var A=c;A._status=Sc,A._result=j}},function(j){if(c._status===hr||c._status===Zn){var A=c;A._status=Qx,A._result=j}}),c._status===Zn){var b=c;b._status=hr,b._result=v}}if(c._status===Sc){var S=c._result;return S===void 0&&P(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
18
18
|
|
|
19
19
|
Your code should look like:
|
|
20
20
|
const MyComponent = lazy(() => import('./MyComponent'))
|
|
@@ -22,7 +22,7 @@ Your code should look like:
|
|
|
22
22
|
Did you accidentally put curly braces around the import?`,S),"default"in S||P(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
23
23
|
|
|
24
24
|
Your code should look like:
|
|
25
|
-
const MyComponent = lazy(() => import('./MyComponent'))`,S),S.default}else throw c._result}function ev(c){var d={_status:Zn,_result:c},v={$$typeof:x,_payload:d,_init:Zx};{var b,S;Object.defineProperties(v,{defaultProps:{configurable:!0,get:function(){return b},set:function(j){P("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),b=j,Object.defineProperty(v,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return S},set:function(j){P("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),S=j,Object.defineProperty(v,"propTypes",{enumerable:!0})}}})}return v}function tv(c){c!=null&&c.$$typeof===m?P("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof c!="function"?P("forwardRef requires a render function but was given %s.",c===null?"null":typeof c):c.length!==0&&c.length!==2&&P("forwardRef render functions accept exactly two parameters: props and ref. %s",c.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),c!=null&&(c.defaultProps!=null||c.propTypes!=null)&&P("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var d={$$typeof:u,render:c};{var v;Object.defineProperty(d,"displayName",{enumerable:!1,configurable:!0,get:function(){return v},set:function(b){v=b,!c.name&&!c.displayName&&(c.displayName=b)}})}return d}var Ec;Ec=Symbol.for("react.module.reference");function Rc(c){return!!(typeof c=="string"||typeof c=="function"||c===i||c===r||
|
|
25
|
+
const MyComponent = lazy(() => import('./MyComponent'))`,S),S.default}else throw c._result}function ev(c){var d={_status:Zn,_result:c},v={$$typeof:x,_payload:d,_init:Zx};{var b,S;Object.defineProperties(v,{defaultProps:{configurable:!0,get:function(){return b},set:function(j){P("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),b=j,Object.defineProperty(v,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return S},set:function(j){P("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),S=j,Object.defineProperty(v,"propTypes",{enumerable:!0})}}})}return v}function tv(c){c!=null&&c.$$typeof===m?P("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof c!="function"?P("forwardRef requires a render function but was given %s.",c===null?"null":typeof c):c.length!==0&&c.length!==2&&P("forwardRef render functions accept exactly two parameters: props and ref. %s",c.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),c!=null&&(c.defaultProps!=null||c.propTypes!=null)&&P("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var d={$$typeof:u,render:c};{var v;Object.defineProperty(d,"displayName",{enumerable:!1,configurable:!0,get:function(){return v},set:function(b){v=b,!c.name&&!c.displayName&&(c.displayName=b)}})}return d}var Ec;Ec=Symbol.for("react.module.reference");function Rc(c){return!!(typeof c=="string"||typeof c=="function"||c===i||c===r||Z||c===a||c===p||c===l||G||c===g||pe||I||B||typeof c=="object"&&c!==null&&(c.$$typeof===x||c.$$typeof===m||c.$$typeof===o||c.$$typeof===s||c.$$typeof===u||c.$$typeof===Ec||c.getModuleId!==void 0))}function nv(c,d){Rc(c)||P("memo: The first argument must be a component. Instead received: %s",c===null?"null":typeof c);var v={$$typeof:m,type:c,compare:d===void 0?null:d};{var b;Object.defineProperty(v,"displayName",{enumerable:!1,configurable:!0,get:function(){return b},set:function(S){b=S,!c.name&&!c.displayName&&(c.displayName=S)}})}return v}function Le(){var c=E.current;return c===null&&P(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
26
26
|
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
27
27
|
2. You might be breaking the Rules of Hooks
|
|
28
28
|
3. You might have more than one copy of React in the same app
|
|
@@ -46,7 +46,7 @@ The files generated in this render will not be published.`},gd={error:"LoginErro
|
|
|
46
46
|
`).join(`
|
|
47
47
|
`+r),e.push(a+"m+"+za.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=kE()+t+" "+e[0]}function kE(){return ke.inspectOpts.hideDate?"":new Date().toISOString()+" "}function FE(...e){return process.stderr.write(Ga.format(...e)+`
|
|
48
48
|
`)}function jE(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function LE(){return process.env.DEBUG}function NE(e){e.inspectOpts={};let t=Object.keys(ke.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=ke.inspectOpts[t[n]]}za.exports=ms()(ke);var{formatters:jm}=za.exports;jm.o=function(e){return this.inspectOpts.colors=this.useColors,Ga.inspect(e,this.inspectOpts).split(`
|
|
49
|
-
`).map(t=>t.trim()).join(" ")};jm.O=function(e){return this.inspectOpts.colors=this.useColors,Ga.inspect(e,this.inspectOpts)}});var Nm=w((IO,xs)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?xs.exports=Tm():xs.exports=Lm()});var Um=w((kO,qm)=>{var Oi;qm.exports=function(){if(!Oi){try{Oi=Nm()("follow-redirects")}catch{}typeof Oi!="function"&&(Oi=function(){})}Oi.apply(null,arguments)}});var zm=w((FO,Os)=>{var Pi=require("url"),Ti=Pi.URL,qE=require("http"),UE=require("https"),_s=require("stream").Writable,ws=require("assert"),$m=Um();(function(){var t=typeof process<"u",n=typeof window<"u"&&typeof document<"u",i=un(Error.captureStackTrace);!t&&(n||!i)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var Ss=!1;try{ws(new Ti(""))}catch(e){Ss=e.code==="ERR_INVALID_URL"}var $E=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Es=["abort","aborted","connect","error","socket","timeout"],Rs=Object.create(null);Es.forEach(function(e){Rs[e]=function(t,n,i){this._redirectable.emit(e,t,n,i)}});var gs=Ai("ERR_INVALID_URL","Invalid URL",TypeError),bs=Ai("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),BE=Ai("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",bs),ME=Ai("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),GE=Ai("ERR_STREAM_WRITE_AFTER_END","write after end"),zE=_s.prototype.destroy||Mm;function We(e,t){_s.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 bs?a:new bs({cause:a}))}},this._performRequest()}We.prototype=Object.create(_s.prototype);We.prototype.abort=function(){Cs(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};We.prototype.destroy=function(e){return Cs(this._currentRequest,e),zE.call(this,e),this};We.prototype.write=function(e,t,n){if(this._ending)throw new GE;if(!cn(e)&&!VE(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(un(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 ME),this.abort())};We.prototype.end=function(e,t,n){if(un(e)?(n=e,e=t=null):un(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}};We.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};We.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};We.prototype.setTimeout=function(e,t){var n=this;function i(o){o.setTimeout(e),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy)}function a(o){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout(function(){n.emit("timeout"),r()},e),i(o)}function r(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",r),n.removeListener("error",r),n.removeListener("response",r),n.removeListener("close",r),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",r),this.on("error",r),this.on("response",r),this.on("close",r),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){We.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(We.prototype,e,{get:function(){return this._currentRequest[e]}})});We.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))}};We.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 Es)i.on(a,Rs[a]);if(this._currentUrl=/^\//.test(this._options.path)?Pi.format(this._options):this._options.path,this._isRedirect){var r=0,o=this,s=this._requestBodyBuffers;(function u(p){if(i===o._currentRequest)if(p)o.emit("error",p);else if(r<s.length){var l=s[r++];i.finished||i.write(l.data,l.encoding,u)}else o._ended&&i.end()})()}};We.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(Cs(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new BE;var i,a=this._options.beforeRedirect;a&&(i=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var r=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=[],vs(/^content-/i,this._options.headers));var o=vs(/^host$/i,this._options.headers),s=Ds(this._currentUrl),u=o||s.host,p=/^\w+:/.test(n)?this._currentUrl:Pi.format(Object.assign(s,{host:u})),l=XE(n,p);if($m("redirecting to",l.href),this._isRedirect=!0,ys(l,this._options),(l.protocol!==s.protocol&&l.protocol!=="https:"||l.host!==u&&!HE(l.host,u))&&vs(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),un(a)){var m={headers:e.headers,statusCode:t},x={url:p,method:r,headers:i};a(this._options,m,x),this._sanitizeOptions(this._options)}this._performRequest()};function Bm(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach(function(i){var a=i+":",r=n[a]=e[i],o=t[i]=Object.create(r);function s(p,l,m){return WE(p)?p=ys(p):cn(p)?p=ys(Ds(p)):(m=l,l=Gm(p),p={protocol:a}),un(l)&&(m=l,l=null),l=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},p,l),l.nativeProtocols=n,!cn(l.host)&&!cn(l.hostname)&&(l.hostname="::1"),ws.equal(l.protocol,a,"protocol mismatch"),$m("options",l),new We(l,m)}function u(p,l,m){var x=o.request(p,l,m);return x.end(),x}Object.defineProperties(o,{request:{value:s,configurable:!0,enumerable:!0,writable:!0},get:{value:u,configurable:!0,enumerable:!0,writable:!0}})}),t}function Mm(){}function Ds(e){var t;if(Ss)t=new Ti(e);else if(t=Gm(Pi.parse(e)),!cn(t.protocol))throw new gs({input:e});return t}function XE(e,t){return Ss?new Ti(e,t):Ds(Pi.resolve(t,e))}function Gm(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new gs({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new gs({input:e.href||e});return e}function ys(e,t){var n=t||{};for(var i of $E)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 vs(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 Ai(e,t,n){function i(a){un(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 Cs(e,t){for(var n of Es)e.removeListener(n,Rs[n]);e.on("error",Mm),e.destroy(t)}function HE(e,t){ws(cn(e)&&cn(t));var n=e.length-t.length-1;return n>0&&e[n]==="."&&e.endsWith(t)}function cn(e){return typeof e=="string"||e instanceof String}function un(e){return typeof e=="function"}function VE(e){return typeof e=="object"&&"length"in e}function WE(e){return Ti&&e instanceof Ti}Os.exports=Bm({http:qE,https:UE});Os.exports.wrap=Bm});function Jn(e=""){return P0?tc.default.resolve(ic.default.sync(__dirname),"../../../",e):tc.default.resolve(ic.default.sync(__dirname),"../griddo-components",e)}function A0(){let e=nc.default.sync("jsconfig.json",{cwd:Jn()});return nc.default.sync("tsconfig.json",{cwd:Jn()})||e}function I0(){let e=require(A0());return e||_e(md),Object.keys(e.compilerOptions?.paths).reduce((t,n)=>{let[i]=n.split("/"),[a]=e.compilerOptions.paths[n],[r]=a.split("/*"),o=Jn(r);return{...t,[i]:o}},{"@griddo-instance":`${Jn()}/src/index.js`})}var tc,nc,ic,P0,sI,Kf=ti(()=>{"use strict";tc=F(require("node:path")),nc=F(Yr()),ic=F(sa());Rt();$t();P0=__dirname.includes("node_modules"),sI=I0()});var eh={};Yc(eh,{default:()=>q0});var gt,nr,Zf,tr,k0,F0,j0,Qf,L0,N0,q0,th=ti(()=>{"use strict";gt=F(require("node:path")),nr=F(sa());Kf();Zf=nr.default.sync(gt.default.resolve(__dirname,"../..")),tr=nr.default.sync(__dirname),k0=gt.default.resolve(nr.default.sync(__dirname)),F0=gt.default.resolve(tr,".cx-cache"),j0=Jn(),Qf=gt.default.join(Zf,"exports/sites"),{version:L0}=require(gt.default.join(tr,"package.json")),N0={proDomain:"pro-",griddoVersion:L0,buildReportFileName:"build-report.json",paths:e=>({__cache:gt.default.join(F0,e||""),__components:j0,__cx:tr,__exports:gt.default.join(Qf,e||""),__root:Zf,__ssg:k0,__exports_dist:e?gt.default.join(Qf,e,"dist"):"",__cx_dist:gt.default.join(tr,"dist")})},q0=N0});yn();var lr=F(require("node:path"));var nx=require("node:child_process"),Tt=F(require("node:path")),ix=F(ni()),mt=F(Kt());var sh=F(ni());var bt=F(require("node:fs")),mn=F(require("node:path")),ir=F(Kt());yn();var Mr,Zl,ep,tp,np=!0;typeof process<"u"&&({FORCE_COLOR:Mr,NODE_DISABLE_COLORS:Zl,NO_COLOR:ep,TERM:tp}=process.env||{},np=process.stdout&&process.stdout.isTTY);var uy={enabled:!Zl&&ep==null&&tp!=="dumb"&&(Mr!=null&&Mr!=="0"||np)};function ie(e,t){let n=new RegExp(`\\x1b\\[${t}m`,"g"),i=`\x1B[${e}m`,a=`\x1B[${t}m`;return function(r){return!uy.enabled||r==null?r:i+(~(""+r).indexOf(a)?r.replace(n,a+i):r)+a}}var BR=ie(0,0),MR=ie(1,22),GR=ie(2,22),zR=ie(3,23),XR=ie(4,24),HR=ie(7,27),VR=ie(8,28),WR=ie(9,29),ip=ie(30,39),YR=ie(31,39),JR=ie(32,39),KR=ie(33,39),QR=ie(34,39),ZR=ie(35,39),eD=ie(36,39),tD=ie(37,39),nD=ie(90,39),iD=ie(90,39),aD=ie(40,49),ap=ie(41,49),rD=ie(42,49),oD=ie(43,49),sD=ie(44,49),cD=ie(45,49),uD=ie(46,49),lD=ie(47,49);var nh=F(sa());Rt();yn();var jp=F(Fp());function Z(e){N.GRIDDO_VERBOSE_LOGS&&console.log(Ne.yellow("verbose"),Ne.dim(e.replace(/(\s)\s+/g,"$1").trim()))}function On(e,t="",n=1,i=1){let a=e.split(`
|
|
49
|
+
`).map(t=>t.trim()).join(" ")};jm.O=function(e){return this.inspectOpts.colors=this.useColors,Ga.inspect(e,this.inspectOpts)}});var Nm=w((IO,xs)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?xs.exports=Tm():xs.exports=Lm()});var Um=w((kO,qm)=>{var Oi;qm.exports=function(){if(!Oi){try{Oi=Nm()("follow-redirects")}catch{}typeof Oi!="function"&&(Oi=function(){})}Oi.apply(null,arguments)}});var zm=w((FO,Os)=>{var Pi=require("url"),Ti=Pi.URL,qE=require("http"),UE=require("https"),_s=require("stream").Writable,ws=require("assert"),$m=Um();(function(){var t=typeof process<"u",n=typeof window<"u"&&typeof document<"u",i=un(Error.captureStackTrace);!t&&(n||!i)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var Ss=!1;try{ws(new Ti(""))}catch(e){Ss=e.code==="ERR_INVALID_URL"}var $E=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Es=["abort","aborted","connect","error","socket","timeout"],Rs=Object.create(null);Es.forEach(function(e){Rs[e]=function(t,n,i){this._redirectable.emit(e,t,n,i)}});var gs=Ai("ERR_INVALID_URL","Invalid URL",TypeError),bs=Ai("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),BE=Ai("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",bs),ME=Ai("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),GE=Ai("ERR_STREAM_WRITE_AFTER_END","write after end"),zE=_s.prototype.destroy||Mm;function We(e,t){_s.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 bs?a:new bs({cause:a}))}},this._performRequest()}We.prototype=Object.create(_s.prototype);We.prototype.abort=function(){Cs(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};We.prototype.destroy=function(e){return Cs(this._currentRequest,e),zE.call(this,e),this};We.prototype.write=function(e,t,n){if(this._ending)throw new GE;if(!cn(e)&&!VE(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(un(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 ME),this.abort())};We.prototype.end=function(e,t,n){if(un(e)?(n=e,e=t=null):un(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}};We.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};We.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};We.prototype.setTimeout=function(e,t){var n=this;function i(o){o.setTimeout(e),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy)}function a(o){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout(function(){n.emit("timeout"),r()},e),i(o)}function r(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",r),n.removeListener("error",r),n.removeListener("response",r),n.removeListener("close",r),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",r),this.on("error",r),this.on("response",r),this.on("close",r),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){We.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(We.prototype,e,{get:function(){return this._currentRequest[e]}})});We.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))}};We.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 Es)i.on(a,Rs[a]);if(this._currentUrl=/^\//.test(this._options.path)?Pi.format(this._options):this._options.path,this._isRedirect){var r=0,o=this,s=this._requestBodyBuffers;(function u(p){if(i===o._currentRequest)if(p)o.emit("error",p);else if(r<s.length){var l=s[r++];i.finished||i.write(l.data,l.encoding,u)}else o._ended&&i.end()})()}};We.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(Cs(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new BE;var i,a=this._options.beforeRedirect;a&&(i=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var r=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=[],vs(/^content-/i,this._options.headers));var o=vs(/^host$/i,this._options.headers),s=Ds(this._currentUrl),u=o||s.host,p=/^\w+:/.test(n)?this._currentUrl:Pi.format(Object.assign(s,{host:u})),l=XE(n,p);if($m("redirecting to",l.href),this._isRedirect=!0,ys(l,this._options),(l.protocol!==s.protocol&&l.protocol!=="https:"||l.host!==u&&!HE(l.host,u))&&vs(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),un(a)){var m={headers:e.headers,statusCode:t},x={url:p,method:r,headers:i};a(this._options,m,x),this._sanitizeOptions(this._options)}this._performRequest()};function Bm(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach(function(i){var a=i+":",r=n[a]=e[i],o=t[i]=Object.create(r);function s(p,l,m){return WE(p)?p=ys(p):cn(p)?p=ys(Ds(p)):(m=l,l=Gm(p),p={protocol:a}),un(l)&&(m=l,l=null),l=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},p,l),l.nativeProtocols=n,!cn(l.host)&&!cn(l.hostname)&&(l.hostname="::1"),ws.equal(l.protocol,a,"protocol mismatch"),$m("options",l),new We(l,m)}function u(p,l,m){var x=o.request(p,l,m);return x.end(),x}Object.defineProperties(o,{request:{value:s,configurable:!0,enumerable:!0,writable:!0},get:{value:u,configurable:!0,enumerable:!0,writable:!0}})}),t}function Mm(){}function Ds(e){var t;if(Ss)t=new Ti(e);else if(t=Gm(Pi.parse(e)),!cn(t.protocol))throw new gs({input:e});return t}function XE(e,t){return Ss?new Ti(e,t):Ds(Pi.resolve(t,e))}function Gm(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new gs({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new gs({input:e.href||e});return e}function ys(e,t){var n=t||{};for(var i of $E)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 vs(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 Ai(e,t,n){function i(a){un(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 Cs(e,t){for(var n of Es)e.removeListener(n,Rs[n]);e.on("error",Mm),e.destroy(t)}function HE(e,t){ws(cn(e)&&cn(t));var n=e.length-t.length-1;return n>0&&e[n]==="."&&e.endsWith(t)}function cn(e){return typeof e=="string"||e instanceof String}function un(e){return typeof e=="function"}function VE(e){return typeof e=="object"&&"length"in e}function WE(e){return Ti&&e instanceof Ti}Os.exports=Bm({http:qE,https:UE});Os.exports.wrap=Bm});function Jn(e=""){return P0?tc.default.resolve(ic.default.sync(__dirname),"../../../",e):tc.default.resolve(ic.default.sync(__dirname),"../griddo-components",e)}function A0(){let e=nc.default.sync("jsconfig.json",{cwd:Jn()});return nc.default.sync("tsconfig.json",{cwd:Jn()})||e}function I0(){let e=require(A0());return e||_e(md),Object.keys(e.compilerOptions?.paths).reduce((t,n)=>{let[i]=n.split("/"),[a]=e.compilerOptions.paths[n],[r]=a.split("/*"),o=Jn(r);return{...t,[i]:o}},{"@griddo-instance":`${Jn()}/src/index.js`})}var tc,nc,ic,P0,sI,Kf=ti(()=>{"use strict";tc=F(require("node:path")),nc=F(Yr()),ic=F(sa());Rt();$t();P0=__dirname.includes("node_modules"),sI=I0()});var eh={};Yc(eh,{default:()=>q0});var gt,nr,Zf,tr,k0,F0,j0,Qf,L0,N0,q0,th=ti(()=>{"use strict";gt=F(require("node:path")),nr=F(sa());Kf();Zf=nr.default.sync(gt.default.resolve(__dirname,"../..")),tr=nr.default.sync(__dirname),k0=gt.default.resolve(nr.default.sync(__dirname)),F0=gt.default.resolve(tr,".cx-cache"),j0=Jn(),Qf=gt.default.join(Zf,"exports/sites"),{version:L0}=require(gt.default.join(tr,"package.json")),N0={proDomain:"pro-",griddoVersion:L0,buildReportFileName:"build-report.json",paths:e=>({__cache:gt.default.join(F0,e||""),__components:j0,__cx:tr,__exports:gt.default.join(Qf,e||""),__root:Zf,__ssg:k0,__exports_dist:e?gt.default.join(Qf,e,"dist"):"",__cx_dist:gt.default.join(tr,"dist")})},q0=N0});yn();var lr=F(require("node:path"));var nx=require("node:child_process"),Tt=F(require("node:path")),ix=F(ni()),mt=F(Kt());var sh=F(ni());var bt=F(require("node:fs")),mn=F(require("node:path")),ir=F(Kt());yn();var Mr,Zl,ep,tp,np=!0;typeof process<"u"&&({FORCE_COLOR:Mr,NODE_DISABLE_COLORS:Zl,NO_COLOR:ep,TERM:tp}=process.env||{},np=process.stdout&&process.stdout.isTTY);var uy={enabled:!Zl&&ep==null&&tp!=="dumb"&&(Mr!=null&&Mr!=="0"||np)};function ie(e,t){let n=new RegExp(`\\x1b\\[${t}m`,"g"),i=`\x1B[${e}m`,a=`\x1B[${t}m`;return function(r){return!uy.enabled||r==null?r:i+(~(""+r).indexOf(a)?r.replace(n,a+i):r)+a}}var BR=ie(0,0),MR=ie(1,22),GR=ie(2,22),zR=ie(3,23),XR=ie(4,24),HR=ie(7,27),VR=ie(8,28),WR=ie(9,29),ip=ie(30,39),YR=ie(31,39),JR=ie(32,39),KR=ie(33,39),QR=ie(34,39),ZR=ie(35,39),eD=ie(36,39),tD=ie(37,39),nD=ie(90,39),iD=ie(90,39),aD=ie(40,49),ap=ie(41,49),rD=ie(42,49),oD=ie(43,49),sD=ie(44,49),cD=ie(45,49),uD=ie(46,49),lD=ie(47,49);var nh=F(sa());Rt();yn();var jp=F(Fp());function Q(e){N.GRIDDO_VERBOSE_LOGS&&console.log(Ne.yellow("verbose"),Ne.dim(e.replace(/(\s)\s+/g,"$1").trim()))}function On(e,t="",n=1,i=1){let a=e.split(`
|
|
50
50
|
`).map(h=>h.trim()),r=t?` ${t} `:"",o=t?r.length:0,s=Math.max(...a.map(h=>h.length))+n*2,u=Math.max(s,o),p=`\u2502${" ".repeat(u)}\u2502
|
|
51
51
|
`.repeat(i),l=u,m=`\u256D${r}${"\u2500".repeat(l-o)}\u256E
|
|
52
52
|
`,x=`\u2570${"\u2500".repeat(l)}\u256F`,g=a.map(h=>{let y=" ".repeat(u-h.length-n);return`\u2502${" ".repeat(n)}${h}${y}\u2502
|
|
@@ -61,7 +61,7 @@ The files generated in this render will not be published.`},gd={error:"LoginErro
|
|
|
61
61
|
`;console.log(a)}var Xt=F(require("node:path")),Yn=F(Kt()),Ks=F(cd());var Ut=F(require("node:fs")),He=F(require("node:path")),No=F(Kt());var In=me();async function qo(){let{__cx:e}=In.paths(),{sitesToPublish:t,createdPages:n,buildProcessData:i}=No.default.readJSONSync(He.default.join(e,"render-metadata.json"));return{buildProcessData:i,createdPages:n,sitesToPublish:t}}function ud(){let{__cx:e}=In.paths(),t=He.default.join(e,"store");Ut.default.existsSync(t)||(Ut.default.mkdirSync(t),Ut.default.mkdirSync(He.default.join(t,"metadata"))),console.info("Store initialized")}function Uo(e){let{__cx:t}=In.paths();Ut.default.writeFileSync(He.default.join(t,"render-metadata.json"),JSON.stringify(e))}function Cw(e){return Ut.default.readdirSync(e).filter(n=>{let i=`${e}/${n}`;if(Ut.default.statSync(i)?.isDirectory()||He.default.extname(n)!==".json")return!1;let r=He.default.basename(n,He.default.extname(n));return!Number.isNaN(Number.parseInt(r))}).map(n=>{let i=He.default.basename(n,He.default.extname(n));return Number.parseInt(i)})}function ld(e,t){let{__cx:n}=In.paths();try{for(let i of t){Bo(i,["editorID","parentEditorID"]);let a=`${i.context.page.id}.json`,r=He.default.join(n,"store",e,a);No.default.writeJSONSync(r,i)}}catch(i){console.log("ERROR",i)}}function pd(e,t){let{__cx:n}=In.paths();if(t.length!==0)for(let i of t){let a=He.default.join(n,"store",e,`${i}.json`);try{Ut.default.unlinkSync(a)}catch(r){console.log(`Error removing file ${i}`,r.message)}}}async function dd(e){let{__cx:t}=In.paths(),n=He.default.join(t,"store"),{changedPages:i,validPagesIds:a,siteDirName:r}=e,o=He.default.join(n,r),s=Cw(o),u=a.filter(x=>!s.includes(x)),p=u.concat(i),l=s.filter(x=>!a.includes(x)),m=Array.from(new Set(p)).filter(x=>!l.includes(x));return{pagesInStore:s,pagesMissingInStore:u,pagesToDeleteFromStore:[...l],pagesToWriteToStore:m}}Rt();$t();var Mo=class{headers;async login(){try{let t=await fetch(ge.LOGIN,{method:"POST",headers:{"Content-Type":"application/json",Connection:"close"},body:JSON.stringify({username:N.GRIDDO_BOT_USER,password:N.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){_e(gd,t)}}},Dt=new Mo;function wi(e,t){return function(){return e.apply(t,arguments)}}var{toString:Ow}=Object.prototype,{getPrototypeOf:Xo}=Object,ka=(e=>t=>{let n=Ow.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ct=e=>(e=e.toLowerCase(),t=>ka(t)===e),Fa=e=>t=>typeof t===e,{isArray:kn}=Array,Si=Fa("undefined");function Tw(e){return e!==null&&!Si(e)&&e.constructor!==null&&!Si(e.constructor)&&Qe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var _d=ct("ArrayBuffer");function Pw(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&_d(e.buffer),t}var Aw=Fa("string"),Qe=Fa("function"),wd=Fa("number"),ja=e=>e!==null&&typeof e=="object",Iw=e=>e===!0||e===!1,Ia=e=>{if(ka(e)!=="object")return!1;let t=Xo(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},kw=ct("Date"),Fw=ct("File"),jw=ct("Blob"),Lw=ct("FileList"),Nw=e=>ja(e)&&Qe(e.pipe),qw=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Qe(e.append)&&((t=ka(e))==="formdata"||t==="object"&&Qe(e.toString)&&e.toString()==="[object FormData]"))},Uw=ct("URLSearchParams"),[$w,Bw,Mw,Gw]=["ReadableStream","Request","Response","Headers"].map(ct),zw=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ei(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,a;if(typeof e!="object"&&(e=[e]),kn(e))for(i=0,a=e.length;i<a;i++)t.call(null,e[i],i,e);else{let r=n?Object.getOwnPropertyNames(e):Object.keys(e),o=r.length,s;for(i=0;i<o;i++)s=r[i],t.call(null,e[s],s,e)}}function Sd(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 an=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ed=e=>!Si(e)&&e!==an;function zo(){let{caseless:e}=Ed(this)&&this||{},t={},n=(i,a)=>{let r=e&&Sd(t,a)||a;Ia(t[r])&&Ia(i)?t[r]=zo(t[r],i):Ia(i)?t[r]=zo({},i):kn(i)?t[r]=i.slice():t[r]=i};for(let i=0,a=arguments.length;i<a;i++)arguments[i]&&Ei(arguments[i],n);return t}var Xw=(e,t,n,{allOwnKeys:i}={})=>(Ei(t,(a,r)=>{n&&Qe(a)?e[r]=wi(a,n):e[r]=a},{allOwnKeys:i}),e),Hw=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Vw=(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)},Ww=(e,t,n,i)=>{let a,r,o,s={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),r=a.length;r-- >0;)o=a[r],(!i||i(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&Xo(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Yw=(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},Jw=e=>{if(!e)return null;if(kn(e))return e;let t=e.length;if(!wd(t))return null;let n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Kw=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Xo(Uint8Array)),Qw=(e,t)=>{let i=(e&&e[Symbol.iterator]).call(e),a;for(;(a=i.next())&&!a.done;){let r=a.value;t.call(e,r[0],r[1])}},Zw=(e,t)=>{let n,i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},eS=ct("HTMLFormElement"),tS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,a){return i.toUpperCase()+a}),bd=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),nS=ct("RegExp"),Rd=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),i={};Ei(n,(a,r)=>{let o;(o=t(a,r,e))!==!1&&(i[r]=o||a)}),Object.defineProperties(e,i)},iS=e=>{Rd(e,(t,n)=>{if(Qe(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let i=e[n];if(Qe(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+"'")})}})},aS=(e,t)=>{let n={},i=a=>{a.forEach(r=>{n[r]=!0})};return kn(e)?i(e):i(String(e).split(t)),n},rS=()=>{},oS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Go="abcdefghijklmnopqrstuvwxyz",yd="0123456789",Dd={DIGIT:yd,ALPHA:Go,ALPHA_DIGIT:Go+Go.toUpperCase()+yd},sS=(e=16,t=Dd.ALPHA_DIGIT)=>{let n="",{length:i}=t;for(;e--;)n+=t[Math.random()*i|0];return n};function cS(e){return!!(e&&Qe(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var uS=e=>{let t=new Array(10),n=(i,a)=>{if(ja(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[a]=i;let r=kn(i)?[]:{};return Ei(i,(o,s)=>{let u=n(o,a+1);!Si(u)&&(r[s]=u)}),t[a]=void 0,r}}return i};return n(e,0)},lS=ct("AsyncFunction"),pS=e=>e&&(ja(e)||Qe(e))&&Qe(e.then)&&Qe(e.catch),Cd=((e,t)=>e?setImmediate:t?((n,i)=>(an.addEventListener("message",({source:a,data:r})=>{a===an&&r===n&&i.length&&i.shift()()},!1),a=>{i.push(a),an.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Qe(an.postMessage)),dS=typeof queueMicrotask<"u"?queueMicrotask.bind(an):typeof process<"u"&&process.nextTick||Cd,f={isArray:kn,isArrayBuffer:_d,isBuffer:Tw,isFormData:qw,isArrayBufferView:Pw,isString:Aw,isNumber:wd,isBoolean:Iw,isObject:ja,isPlainObject:Ia,isReadableStream:$w,isRequest:Bw,isResponse:Mw,isHeaders:Gw,isUndefined:Si,isDate:kw,isFile:Fw,isBlob:jw,isRegExp:nS,isFunction:Qe,isStream:Nw,isURLSearchParams:Uw,isTypedArray:Kw,isFileList:Lw,forEach:Ei,merge:zo,extend:Xw,trim:zw,stripBOM:Hw,inherits:Vw,toFlatObject:Ww,kindOf:ka,kindOfTest:ct,endsWith:Yw,toArray:Jw,forEachEntry:Qw,matchAll:Zw,isHTMLForm:eS,hasOwnProperty:bd,hasOwnProp:bd,reduceDescriptors:Rd,freezeMethods:iS,toObjectSet:aS,toCamelCase:tS,noop:rS,toFiniteNumber:oS,findKey:Sd,global:an,isContextDefined:Ed,ALPHABET:Dd,generateString:sS,isSpecCompliantForm:cS,toJSONObject:uS,isAsyncFn:lS,isThenable:pS,setImmediate:Cd,asap:dS};function Fn(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)}f.inherits(Fn,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:f.toJSONObject(this.config),code:this.code,status:this.status}}});var Od=Fn.prototype,Td={};["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=>{Td[e]={value:e}});Object.defineProperties(Fn,Td);Object.defineProperty(Od,"isAxiosError",{value:!0});Fn.from=(e,t,n,i,a,r)=>{let o=Object.create(Od);return f.toFlatObject(e,o,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),Fn.call(o,e.message,t,n,i,a),o.cause=e,o.name=e.name,r&&Object.assign(o,r),o};var D=Fn;var pm=F(lm(),1),qa=pm.default;function ns(e){return f.isPlainObject(e)||f.isArray(e)}function mm(e){return f.endsWith(e,"[]")?e.slice(0,-2):e}function dm(e,t,n){return e?e.concat(t).map(function(a,r){return a=mm(a),!n&&r?"["+a+"]":a}).join(n?".":""):t}function YS(e){return f.isArray(e)&&!e.some(ns)}var JS=f.toFlatObject(f,{},null,function(t){return/^is[A-Z]/.test(t)});function KS(e,t,n){if(!f.isObject(e))throw new TypeError("target must be an object");t=t||new(qa||FormData),n=f.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,_){return!f.isUndefined(_[y])});let i=n.metaTokens,a=n.visitor||l,r=n.dots,o=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(t);if(!f.isFunction(a))throw new TypeError("visitor must be a function");function p(h){if(h===null)return"";if(f.isDate(h))return h.toISOString();if(!u&&f.isBlob(h))throw new D("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(h)||f.isTypedArray(h)?u&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function l(h,y,_){let E=h;if(h&&!_&&typeof h=="object"){if(f.endsWith(y,"{}"))y=i?y:y.slice(0,-2),h=JSON.stringify(h);else if(f.isArray(h)&&YS(h)||(f.isFileList(h)||f.endsWith(y,"[]"))&&(E=f.toArray(h)))return y=mm(y),E.forEach(function(R,k){!(f.isUndefined(R)||R===null)&&t.append(o===!0?dm([y],k,r):o===null?y:y+"[]",p(R))}),!1}return ns(h)?!0:(t.append(dm(_,y,r),p(h)),!1)}let m=[],x=Object.assign(JS,{defaultVisitor:l,convertValue:p,isVisitable:ns});function g(h,y){if(!f.isUndefined(h)){if(m.indexOf(h)!==-1)throw Error("Circular reference detected in "+y.join("."));m.push(h),f.forEach(h,function(E,O){(!(f.isUndefined(E)||E===null)&&a.call(t,E,f.isString(O)?O.trim():O,y,x))===!0&&g(E,y?y.concat(O):[O])}),m.pop()}}if(!f.isObject(e))throw new TypeError("data must be an object");return g(e),t}var Bt=KS;function fm(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function hm(e,t){this._pairs=[],e&&Bt(e,this,t)}var xm=hm.prototype;xm.append=function(t,n){this._pairs.push([t,n])};xm.toString=function(t){let n=t?function(i){return t.call(this,i,fm)}:fm;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};var vm=hm;function QS(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function rn(e,t,n){if(!t)return e;let i=n&&n.encode||QS,a=n&&n.serialize,r;if(a?r=a(t,n):r=f.isURLSearchParams(t)?t.toString():new vm(t,n).toString(i),r){let o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+r}return e}var is=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){f.forEach(this.handlers,function(i){i!==null&&t(i)})}},as=is;var jn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var gm=F(require("url"),1),bm=gm.default.URLSearchParams;var ym={isNode:!0,classes:{URLSearchParams:bm,FormData:qa,Blob:typeof Blob<"u"&&Blob||null},protocols:["http","https","file","data"]};var ss={};Yc(ss,{hasBrowserEnv:()=>os,hasStandardBrowserEnv:()=>ZS,hasStandardBrowserWebWorkerEnv:()=>eE,navigator:()=>rs,origin:()=>tE});var os=typeof window<"u"&&typeof document<"u",rs=typeof navigator=="object"&&navigator||void 0,ZS=os&&(!rs||["ReactNative","NativeScript","NS"].indexOf(rs.product)<0),eE=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",tE=os&&window.location.href||"http://localhost";var te={...ss,...ym};function cs(e,t){return Bt(e,new te.classes.URLSearchParams,Object.assign({visitor:function(n,i,a,r){return te.isNode&&f.isBuffer(n)?(this.append(i,n.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}function nE(e){return f.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function iE(e){let t={},n=Object.keys(e),i,a=n.length,r;for(i=0;i<a;i++)r=n[i],t[r]=e[r];return t}function aE(e){function t(n,i,a,r){let o=n[r++];if(o==="__proto__")return!0;let s=Number.isFinite(+o),u=r>=n.length;return o=!o&&f.isArray(a)?a.length:o,u?(f.hasOwnProp(a,o)?a[o]=[a[o],i]:a[o]=i,!s):((!a[o]||!f.isObject(a[o]))&&(a[o]=[]),t(n,i,a[o],r)&&f.isArray(a[o])&&(a[o]=iE(a[o])),!s)}if(f.isFormData(e)&&f.isFunction(e.entries)){let n={};return f.forEachEntry(e,(i,a)=>{t(nE(i),a,n,0)}),n}return null}var Ua=aE;function rE(e,t,n){if(f.isString(e))try{return(t||JSON.parse)(e),f.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(e)}var us={transitional:jn,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){let i=n.getContentType()||"",a=i.indexOf("application/json")>-1,r=f.isObject(t);if(r&&f.isHTMLForm(t)&&(t=new FormData(t)),f.isFormData(t))return a?JSON.stringify(Ua(t)):t;if(f.isArrayBuffer(t)||f.isBuffer(t)||f.isStream(t)||f.isFile(t)||f.isBlob(t)||f.isReadableStream(t))return t;if(f.isArrayBufferView(t))return t.buffer;if(f.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(r){if(i.indexOf("application/x-www-form-urlencoded")>-1)return cs(t,this.formSerializer).toString();if((s=f.isFileList(t))||i.indexOf("multipart/form-data")>-1){let u=this.env&&this.env.FormData;return Bt(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return r||a?(n.setContentType("application/json",!1),rE(t)):t}],transformResponse:[function(t){let n=this.transitional||us.transitional,i=n&&n.forcedJSONParsing,a=this.responseType==="json";if(f.isResponse(t)||f.isReadableStream(t))return t;if(t&&f.isString(t)&&(i&&!this.responseType||a)){let o=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?D.from(s,D.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:te.classes.FormData,Blob:te.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(["delete","get","head","post","put","patch"],e=>{us.headers[e]={}});var Ln=us;var oE=f.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"]),_m=e=>{let t={},n,i,a;return e&&e.split(`
|
|
62
62
|
`).forEach(function(o){a=o.indexOf(":"),n=o.substring(0,a).trim().toLowerCase(),i=o.substring(a+1).trim(),!(!n||t[n]&&oE[n])&&(n==="set-cookie"?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t};var wm=Symbol("internals");function Ri(e){return e&&String(e).trim().toLowerCase()}function $a(e){return e===!1||e==null?e:f.isArray(e)?e.map($a):String(e)}function sE(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 cE=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ls(e,t,n,i,a){if(f.isFunction(i))return i.call(this,t,n);if(a&&(t=n),!!f.isString(t)){if(f.isString(i))return t.indexOf(i)!==-1;if(f.isRegExp(i))return i.test(t)}}function uE(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,i)=>n.toUpperCase()+i)}function lE(e,t){let n=f.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{value:function(a,r,o){return this[i].call(this,t,a,r,o)},configurable:!0})})}var Nn=class{constructor(t){t&&this.set(t)}set(t,n,i){let a=this;function r(s,u,p){let l=Ri(u);if(!l)throw new Error("header name must be a non-empty string");let m=f.findKey(a,l);(!m||a[m]===void 0||p===!0||p===void 0&&a[m]!==!1)&&(a[m||u]=$a(s))}let o=(s,u)=>f.forEach(s,(p,l)=>r(p,l,u));if(f.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(f.isString(t)&&(t=t.trim())&&!cE(t))o(_m(t),n);else if(f.isHeaders(t))for(let[s,u]of t.entries())r(u,s,i);else t!=null&&r(n,t,i);return this}get(t,n){if(t=Ri(t),t){let i=f.findKey(this,t);if(i){let a=this[i];if(!n)return a;if(n===!0)return sE(a);if(f.isFunction(n))return n.call(this,a,i);if(f.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ri(t),t){let i=f.findKey(this,t);return!!(i&&this[i]!==void 0&&(!n||ls(this,this[i],i,n)))}return!1}delete(t,n){let i=this,a=!1;function r(o){if(o=Ri(o),o){let s=f.findKey(i,o);s&&(!n||ls(i,i[s],s,n))&&(delete i[s],a=!0)}}return f.isArray(t)?t.forEach(r):r(t),a}clear(t){let n=Object.keys(this),i=n.length,a=!1;for(;i--;){let r=n[i];(!t||ls(this,this[r],r,t,!0))&&(delete this[r],a=!0)}return a}normalize(t){let n=this,i={};return f.forEach(this,(a,r)=>{let o=f.findKey(i,r);if(o){n[o]=$a(a),delete n[r];return}let s=t?uE(r):String(r).trim();s!==r&&delete n[r],n[s]=$a(a),i[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let n=Object.create(null);return f.forEach(this,(i,a)=>{i!=null&&i!==!1&&(n[a]=t&&f.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(`
|
|
63
63
|
`)}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[wm]=this[wm]={accessors:{}}).accessors,a=this.prototype;function r(o){let s=Ri(o);i[s]||(lE(a,o),i[s]=!0)}return f.isArray(t)?t.forEach(r):r(t),this}};Nn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);f.reduceDescriptors(Nn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}});f.freezeMethods(Nn);var ue=Nn;function Di(e,t){let n=this||Ln,i=t||n,a=ue.from(i.headers),r=i.data;return f.forEach(e,function(s){r=s.call(n,r,a.normalize(),t?t.status:void 0)}),a.normalize(),r}function Ci(e){return!!(e&&e.__CANCEL__)}function Sm(e,t,n){D.call(this,e??"canceled",D.ERR_CANCELED,t,n),this.name="CanceledError"}f.inherits(Sm,D,{__CANCEL__:!0});var Ze=Sm;function vt(e,t,n){let i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new D("Request failed with status code "+n.status,[D.ERR_BAD_REQUEST,D.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ps(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ds(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function on(e,t){return e&&!ps(t)?ds(e,t):t}var sf=F(Rm(),1),cf=F(require("http"),1),uf=F(require("https"),1),lf=F(require("util"),1),pf=F(zm(),1),Ot=F(require("zlib"),1);var ln="1.7.7";function Ii(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var YE=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Ts(e,t,n){let i=n&&n.Blob||te.classes.Blob,a=Ii(e);if(t===void 0&&i&&(t=!0),a==="data"){e=a.length?e.slice(a.length+1):e;let r=YE.exec(e);if(!r)throw new D("Invalid URL",D.ERR_INVALID_URL);let o=r[1],s=r[2],u=r[3],p=Buffer.from(decodeURIComponent(u),s?"base64":"utf8");if(t){if(!i)throw new D("Blob is not supported",D.ERR_NOT_SUPPORT);return new i([p],{type:o})}return p}throw new D("Unsupported protocol "+a,D.ERR_NOT_SUPPORT)}var pn=F(require("stream"),1);var Xm=F(require("stream"),1);var Ps=Symbol("internals"),As=class extends Xm.default.Transform{constructor(t){t=f.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(i,a)=>!f.isUndefined(a[i])),super({readableHighWaterMark:t.chunkSize});let n=this[Ps]={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[Ps];return n.onReadCallback&&n.onReadCallback(),super._read(t)}_transform(t,n,i){let a=this[Ps],r=a.maxRate,o=this.readableHighWaterMark,s=a.timeWindow,u=1e3/s,p=r/u,l=a.minChunkSize!==!1?Math.max(a.minChunkSize,p*.01):0,m=(g,h)=>{let y=Buffer.byteLength(g);a.bytesSeen+=y,a.bytes+=y,a.isCaptured&&this.emit("progress",a.bytesSeen),this.push(g)?process.nextTick(h):a.onReadCallback=()=>{a.onReadCallback=null,process.nextTick(h)}},x=(g,h)=>{let y=Buffer.byteLength(g),_=null,E=o,O,R=0;if(r){let k=Date.now();(!a.ts||(R=k-a.ts)>=s)&&(a.ts=k,O=p-a.bytes,a.bytes=O<0?-O:0,R=0),O=p-a.bytes}if(r){if(O<=0)return setTimeout(()=>{h(null,g)},s-R);O<E&&(E=O)}E&&y>E&&y-E>l&&(_=g.subarray(E),g=g.subarray(0,E)),m(g,_?()=>{process.nextTick(h,null,_)}:h)};x(t,function g(h,y){if(h)return i(h);y?x(y,g):i(null)})}},Is=As;var df=require("events");var Vm=require("util"),Wm=require("stream");var{asyncIterator:Hm}=Symbol,JE=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[Hm]?yield*e[Hm]():yield e},Xa=JE;var KE=f.ALPHABET.ALPHA_DIGIT+"-_",ki=new Vm.TextEncoder,Gt=`\r
|
|
64
|
-
`,QE=ki.encode(Gt),ZE=2,ks=class{constructor(t,n){let{escapeName:i}=this.constructor,a=f.isString(n),r=`Content-Disposition: form-data; name="${i(t)}"${!a&&n.name?`; filename="${i(n.name)}"`:""}${Gt}`;a?n=ki.encode(String(n).replace(/\r?\n|\r\n?/g,Gt)):r+=`Content-Type: ${n.type||"application/octet-stream"}${Gt}`,this.headers=ki.encode(r+Gt),this.contentLength=a?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+ZE,this.name=t,this.value=n}async*encode(){yield this.headers;let{value:t}=this;f.isTypedArray(t)?yield t:yield*Xa(t),yield QE}static escapeName(t){return String(t).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},e0=(e,t,n)=>{let{tag:i="form-data-boundary",size:a=25,boundary:r=i+"-"+f.generateString(a,KE)}=n||{};if(!f.isFormData(e))throw TypeError("FormData instance required");if(r.length<1||r.length>70)throw Error("boundary must be 10-70 characters long");let o=ki.encode("--"+r+Gt),s=ki.encode("--"+r+"--"+Gt+Gt),u=s.byteLength,p=Array.from(e.entries()).map(([m,x])=>{let g=new ks(m,x);return u+=g.size,g});u+=o.byteLength*p.length,u=f.toFiniteNumber(u);let l={"Content-Type":`multipart/form-data; boundary=${r}`};return Number.isFinite(u)&&(l["Content-Length"]=u),t&&t(l),Wm.Readable.from(async function*(){for(let m of p)yield o,yield*m.encode();yield s}())},Ym=e0;var Jm=F(require("stream"),1),Fs=class extends Jm.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)}},Km=Fs;var t0=(e,t)=>f.isAsyncFn(e)?function(...n){let i=n.pop();e.apply(this,n).then(a=>{try{t?i(null,...t(a)):i(null,a)}catch(r){i(r)}},i)}:e,Qm=t0;function n0(e,t){e=e||10;let n=new Array(e),i=new Array(e),a=0,r=0,o;return t=t!==void 0?t:1e3,function(u){let p=Date.now(),l=i[r];o||(o=p),n[a]=u,i[a]=p;let m=r,x=0;for(;m!==a;)x+=n[m++],m=m%e;if(a=(a+1)%e,a===r&&(r=(r+1)%e),p-o<t)return;let g=l&&p-l;return g?Math.round(x*1e3/g):void 0}}var Zm=n0;function i0(e,t){let n=0,i=1e3/t,a,r,o=(p,l=Date.now())=>{n=l,a=null,r&&(clearTimeout(r),r=null),e.apply(null,p)};return[(...p)=>{let l=Date.now(),m=l-n;m>=i?o(p,l):(a=p,r||(r=setTimeout(()=>{r=null,o(a)},i-m)))},()=>a&&o(a)]}var ef=i0;var Ct=(e,t,n=3)=>{let i=0,a=Zm(50,250);return ef(r=>{let o=r.loaded,s=r.lengthComputable?r.total:void 0,u=o-i,p=a(u),l=o<=s;i=o;let m={loaded:o,total:s,progress:s?o/s:void 0,bytes:u,rate:p||void 0,estimated:p&&s&&l?(s-o)/p:void 0,event:r,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(m)},n)},Mn=(e,t)=>{let n=e!=null;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},Gn=e=>(...t)=>f.asap(()=>e(...t));var tf={flush:Ot.default.constants.Z_SYNC_FLUSH,finishFlush:Ot.default.constants.Z_SYNC_FLUSH},a0={flush:Ot.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:Ot.default.constants.BROTLI_OPERATION_FLUSH},nf=f.isFunction(Ot.default.createBrotliDecompress),{http:r0,https:o0}=pf.default,s0=/https:?/,af=te.protocols.map(e=>e+":"),rf=(e,[t,n])=>(e.on("end",n).on("error",n),t);function c0(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function mf(e,t,n){let i=t;if(!i&&i!==!1){let a=(0,sf.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 r=Buffer.from(i.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+r}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(r){mf(r,t,r.href)}}var u0=typeof process<"u"&&f.kindOf(process)==="process",l0=e=>new Promise((t,n)=>{let i,a,r=(u,p)=>{a||(a=!0,i&&i(u,p))},o=u=>{r(u),t(u)},s=u=>{r(u,!0),n(u)};e(o,s,u=>i=u).catch(s)}),p0=({address:e,family:t})=>{if(!f.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},of=(e,t)=>p0(f.isObject(e)?e:{address:e,family:t}),ff=u0&&function(t){return l0(async function(i,a,r){let{data:o,lookup:s,family:u}=t,{responseType:p,responseEncoding:l}=t,m=t.method.toUpperCase(),x,g=!1,h;if(s){let C=Qm(s,T=>f.isArray(T)?T:[T]);s=(T,L,he)=>{C(T,L,(oe,Se,ft)=>{if(oe)return he(oe);let je=f.isArray(Se)?Se.map(Ee=>of(Ee)):[of(Se,ft)];L.all?he(oe,je):he(oe,je[0].address,je[0].family)})}}let y=new df.EventEmitter,_=()=>{t.cancelToken&&t.cancelToken.unsubscribe(E),t.signal&&t.signal.removeEventListener("abort",E),y.removeAllListeners()};r((C,T)=>{x=!0,T&&(g=!0,_())});function E(C){y.emit("abort",!C||C.type?new Ze(null,t,h):C)}y.once("abort",a),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(E),t.signal&&(t.signal.aborted?E():t.signal.addEventListener("abort",E)));let O=on(t.baseURL,t.url),R=new URL(O,te.hasBrowserEnv?te.origin:void 0),k=R.protocol||af[0];if(k==="data:"){let C;if(m!=="GET")return vt(i,a,{status:405,statusText:"method not allowed",headers:{},config:t});try{C=Ts(t.url,p==="blob",{Blob:t.env&&t.env.Blob})}catch(T){throw D.from(T,D.ERR_BAD_REQUEST,t)}return p==="text"?(C=C.toString(l),(!l||l==="utf8")&&(C=f.stripBOM(C))):p==="stream"&&(C=pn.default.Readable.from(C)),vt(i,a,{data:C,status:200,statusText:"OK",headers:new ue,config:t})}if(af.indexOf(k)===-1)return a(new D("Unsupported protocol "+k,D.ERR_BAD_REQUEST,t));let q=ue.from(t.headers).normalize();q.set("User-Agent","axios/"+ln,!1);let{onUploadProgress:J,onDownloadProgress:le}=t,pe=t.maxRate,I,B;if(f.isSpecCompliantForm(o)){let C=q.getContentType(/boundary=([-_\w\d]{10,70})/i);o=Ym(o,T=>{q.set(T)},{tag:`axios-${ln}-boundary`,boundary:C&&C[1]||void 0})}else if(f.isFormData(o)&&f.isFunction(o.getHeaders)){if(q.set(o.getHeaders()),!q.hasContentLength())try{let C=await lf.default.promisify(o.getLength).call(o);Number.isFinite(C)&&C>=0&&q.setContentLength(C)}catch{}}else if(f.isBlob(o))o.size&&q.setContentType(o.type||"application/octet-stream"),q.setContentLength(o.size||0),o=pn.default.Readable.from(Xa(o));else if(o&&!f.isStream(o)){if(!Buffer.isBuffer(o))if(f.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else if(f.isString(o))o=Buffer.from(o,"utf-8");else return a(new D("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",D.ERR_BAD_REQUEST,t));if(q.setContentLength(o.length,!1),t.maxBodyLength>-1&&o.length>t.maxBodyLength)return a(new D("Request body larger than maxBodyLength limit",D.ERR_BAD_REQUEST,t))}let G=f.toFiniteNumber(q.getContentLength());f.isArray(pe)?(I=pe[0],B=pe[1]):I=B=pe,o&&(J||I)&&(f.isStream(o)||(o=pn.default.Readable.from(o,{objectMode:!1})),o=pn.default.pipeline([o,new Is({maxRate:f.toFiniteNumber(I)})],f.noop),J&&o.on("progress",rf(o,Mn(G,Ct(Gn(J),!1,3)))));let Q;if(t.auth){let C=t.auth.username||"",T=t.auth.password||"";Q=C+":"+T}if(!Q&&R.username){let C=R.username,T=R.password;Q=C+":"+T}Q&&q.delete("authorization");let Y;try{Y=rn(R.pathname+R.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(C){let T=new Error(C.message);return T.config=t,T.url=t.url,T.exists=!0,a(T)}q.set("Accept-Encoding","gzip, compress, deflate"+(nf?", br":""),!1);let $={path:Y,method:m,headers:q.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:Q,protocol:k,family:u,beforeRedirect:c0,beforeRedirects:{}};!f.isUndefined(s)&&($.lookup=s),t.socketPath?$.socketPath=t.socketPath:($.hostname=R.hostname.startsWith("[")?R.hostname.slice(1,-1):R.hostname,$.port=R.port,mf($,t.proxy,k+"//"+R.hostname+(R.port?":"+R.port:"")+$.path));let P,W=s0.test($.protocol);if($.agent=W?t.httpsAgent:t.httpAgent,t.transport?P=t.transport:t.maxRedirects===0?P=W?uf.default:cf.default:(t.maxRedirects&&($.maxRedirects=t.maxRedirects),t.beforeRedirect&&($.beforeRedirects.config=t.beforeRedirect),P=W?o0:r0),t.maxBodyLength>-1?$.maxBodyLength=t.maxBodyLength:$.maxBodyLength=1/0,t.insecureHTTPParser&&($.insecureHTTPParser=t.insecureHTTPParser),h=P.request($,function(T){if(h.destroyed)return;let L=[T],he=+T.headers["content-length"];if(le||B){let Ee=new Is({maxRate:f.toFiniteNumber(B)});le&&Ee.on("progress",rf(Ee,Mn(he,Ct(Gn(le),!0,3)))),L.push(Ee)}let oe=T,Se=T.req||h;if(t.decompress!==!1&&T.headers["content-encoding"])switch((m==="HEAD"||T.statusCode===204)&&delete T.headers["content-encoding"],(T.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":L.push(Ot.default.createUnzip(tf)),delete T.headers["content-encoding"];break;case"deflate":L.push(new Km),L.push(Ot.default.createUnzip(tf)),delete T.headers["content-encoding"];break;case"br":nf&&(L.push(Ot.default.createBrotliDecompress(a0)),delete T.headers["content-encoding"])}oe=L.length>1?pn.default.pipeline(L,f.noop):L[0];let ft=pn.default.finished(oe,()=>{ft(),_()}),je={status:T.statusCode,statusText:T.statusMessage,headers:new ue(T.headers),config:t,request:Se};if(p==="stream")je.data=oe,vt(i,a,je);else{let Ee=[],Vt=0;oe.on("data",function(de){Ee.push(de),Vt+=de.length,t.maxContentLength>-1&&Vt>t.maxContentLength&&(g=!0,oe.destroy(),a(new D("maxContentLength size of "+t.maxContentLength+" exceeded",D.ERR_BAD_RESPONSE,t,Se)))}),oe.on("aborted",function(){if(g)return;let de=new D("maxContentLength size of "+t.maxContentLength+" exceeded",D.ERR_BAD_RESPONSE,t,Se);oe.destroy(de),a(de)}),oe.on("error",function(de){h.destroyed||a(D.from(de,null,t,Se))}),oe.on("end",function(){try{let de=Ee.length===1?Ee[0]:Buffer.concat(Ee);p!=="arraybuffer"&&(de=de.toString(l),(!l||l==="utf8")&&(de=f.stripBOM(de))),je.data=de}catch(de){return a(D.from(de,null,t,je.request,je))}vt(i,a,je)})}y.once("abort",Ee=>{oe.destroyed||(oe.emit("error",Ee),oe.destroy())})}),y.once("abort",C=>{a(C),h.destroy(C)}),h.on("error",function(T){a(D.from(T,null,t,h))}),h.on("socket",function(T){T.setKeepAlive(!0,1e3*60)}),t.timeout){let C=parseInt(t.timeout,10);if(Number.isNaN(C)){a(new D("error trying to parse `config.timeout` to int",D.ERR_BAD_OPTION_VALUE,t,h));return}h.setTimeout(C,function(){if(x)return;let L=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",he=t.transitional||jn;t.timeoutErrorMessage&&(L=t.timeoutErrorMessage),a(new D(L,he.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,t,h)),E()})}if(f.isStream(o)){let C=!1,T=!1;o.on("end",()=>{C=!0}),o.once("error",L=>{T=!0,h.destroy(L)}),o.on("close",()=>{!C&&!T&&E(new Ze("Request stream has been aborted",t,h))}),o.pipe(h)}else h.end(o)})};var hf=te.hasStandardBrowserEnv?function(){let t=te.navigator&&/(msie|trident)/i.test(te.navigator.userAgent),n=document.createElement("a"),i;function a(r){let o=r;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{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(o){let s=f.isString(o)?a(o):o;return s.protocol===i.protocol&&s.host===i.host}}():function(){return function(){return!0}}();var xf=te.hasStandardBrowserEnv?{write(e,t,n,i,a,r){let o=[e+"="+encodeURIComponent(t)];f.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),f.isString(i)&&o.push("path="+i),f.isString(a)&&o.push("domain="+a),r===!0&&o.push("secure"),document.cookie=o.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 vf=e=>e instanceof ue?{...e}:e;function lt(e,t){t=t||{};let n={};function i(p,l,m){return f.isPlainObject(p)&&f.isPlainObject(l)?f.merge.call({caseless:m},p,l):f.isPlainObject(l)?f.merge({},l):f.isArray(l)?l.slice():l}function a(p,l,m){if(f.isUndefined(l)){if(!f.isUndefined(p))return i(void 0,p,m)}else return i(p,l,m)}function r(p,l){if(!f.isUndefined(l))return i(void 0,l)}function o(p,l){if(f.isUndefined(l)){if(!f.isUndefined(p))return i(void 0,p)}else return i(void 0,l)}function s(p,l,m){if(m in t)return i(p,l);if(m in e)return i(void 0,p)}let u={url:r,method:r,data:r,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(p,l)=>a(vf(p),vf(l),!0)};return f.forEach(Object.keys(Object.assign({},e,t)),function(l){let m=u[l]||a,x=m(e[l],t[l],l);f.isUndefined(x)&&m!==s||(n[l]=x)}),n}var Ha=e=>{let t=lt({},e),{data:n,withXSRFToken:i,xsrfHeaderName:a,xsrfCookieName:r,headers:o,auth:s}=t;t.headers=o=ue.from(o),t.url=rn(on(t.baseURL,t.url),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let u;if(f.isFormData(n)){if(te.hasStandardBrowserEnv||te.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((u=o.getContentType())!==!1){let[p,...l]=u?u.split(";").map(m=>m.trim()).filter(Boolean):[];o.setContentType([p||"multipart/form-data",...l].join("; "))}}if(te.hasStandardBrowserEnv&&(i&&f.isFunction(i)&&(i=i(t)),i||i!==!1&&hf(t.url))){let p=a&&r&&xf.read(r);p&&o.set(a,p)}return t};var d0=typeof XMLHttpRequest<"u",gf=d0&&function(e){return new Promise(function(n,i){let a=Ha(e),r=a.data,o=ue.from(a.headers).normalize(),{responseType:s,onUploadProgress:u,onDownloadProgress:p}=a,l,m,x,g,h;function y(){g&&g(),h&&h(),a.cancelToken&&a.cancelToken.unsubscribe(l),a.signal&&a.signal.removeEventListener("abort",l)}let _=new XMLHttpRequest;_.open(a.method.toUpperCase(),a.url,!0),_.timeout=a.timeout;function E(){if(!_)return;let R=ue.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),q={data:!s||s==="text"||s==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:R,config:e,request:_};vt(function(le){n(le),y()},function(le){i(le),y()},q),_=null}"onloadend"in _?_.onloadend=E:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(E)},_.onabort=function(){_&&(i(new D("Request aborted",D.ECONNABORTED,e,_)),_=null)},_.onerror=function(){i(new D("Network Error",D.ERR_NETWORK,e,_)),_=null},_.ontimeout=function(){let k=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded",q=a.transitional||jn;a.timeoutErrorMessage&&(k=a.timeoutErrorMessage),i(new D(k,q.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,e,_)),_=null},r===void 0&&o.setContentType(null),"setRequestHeader"in _&&f.forEach(o.toJSON(),function(k,q){_.setRequestHeader(q,k)}),f.isUndefined(a.withCredentials)||(_.withCredentials=!!a.withCredentials),s&&s!=="json"&&(_.responseType=a.responseType),p&&([x,h]=Ct(p,!0),_.addEventListener("progress",x)),u&&_.upload&&([m,g]=Ct(u),_.upload.addEventListener("progress",m),_.upload.addEventListener("loadend",g)),(a.cancelToken||a.signal)&&(l=R=>{_&&(i(!R||R.type?new Ze(null,e,_):R),_.abort(),_=null)},a.cancelToken&&a.cancelToken.subscribe(l),a.signal&&(a.signal.aborted?l():a.signal.addEventListener("abort",l)));let O=Ii(a.url);if(O&&te.protocols.indexOf(O)===-1){i(new D("Unsupported protocol "+O+":",D.ERR_BAD_REQUEST,e));return}_.send(r||null)})};var m0=(e,t)=>{let{length:n}=e=e?e.filter(Boolean):[];if(t||n){let i=new AbortController,a,r=function(p){if(!a){a=!0,s();let l=p instanceof Error?p:this.reason;i.abort(l instanceof D?l:new Ze(l instanceof Error?l.message:l))}},o=t&&setTimeout(()=>{o=null,r(new D(`timeout ${t} of ms exceeded`,D.ETIMEDOUT))},t),s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(p=>{p.unsubscribe?p.unsubscribe(r):p.removeEventListener("abort",r)}),e=null)};e.forEach(p=>p.addEventListener("abort",r));let{signal:u}=i;return u.unsubscribe=()=>f.asap(s),u}},bf=m0;var f0=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},h0=async function*(e,t){for await(let n of x0(e))yield*f0(n,t)},x0=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()}},js=(e,t,n,i)=>{let a=h0(e,t),r=0,o,s=u=>{o||(o=!0,i&&i(u))};return new ReadableStream({async pull(u){try{let{done:p,value:l}=await a.next();if(p){s(),u.close();return}let m=l.byteLength;if(n){let x=r+=m;n(x)}u.enqueue(new Uint8Array(l))}catch(p){throw s(p),p}},cancel(u){return s(u),a.return()}},{highWaterMark:2})};var Wa=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",_f=Wa&&typeof ReadableStream=="function",v0=Wa&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),wf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},g0=_f&&wf(()=>{let e=!1,t=new Request(te.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),yf=64*1024,Ls=_f&&wf(()=>f.isReadableStream(new Response("").body)),Va={stream:Ls&&(e=>e.body)};Wa&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Va[t]&&(Va[t]=f.isFunction(e[t])?n=>n[t]():(n,i)=>{throw new D(`Response type '${t}' is not supported`,D.ERR_NOT_SUPPORT,i)})})})(new Response);var b0=async e=>{if(e==null)return 0;if(f.isBlob(e))return e.size;if(f.isSpecCompliantForm(e))return(await new Request(te.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(f.isArrayBufferView(e)||f.isArrayBuffer(e))return e.byteLength;if(f.isURLSearchParams(e)&&(e=e+""),f.isString(e))return(await v0(e)).byteLength},y0=async(e,t)=>{let n=f.toFiniteNumber(e.getContentLength());return n??b0(t)},Sf=Wa&&(async e=>{let{url:t,method:n,data:i,signal:a,cancelToken:r,timeout:o,onDownloadProgress:s,onUploadProgress:u,responseType:p,headers:l,withCredentials:m="same-origin",fetchOptions:x}=Ha(e);p=p?(p+"").toLowerCase():"text";let g=bf([a,r&&r.toAbortSignal()],o),h,y=g&&g.unsubscribe&&(()=>{g.unsubscribe()}),_;try{if(u&&g0&&n!=="get"&&n!=="head"&&(_=await y0(l,i))!==0){let q=new Request(t,{method:"POST",body:i,duplex:"half"}),J;if(f.isFormData(i)&&(J=q.headers.get("content-type"))&&l.setContentType(J),q.body){let[le,pe]=Mn(_,Ct(Gn(u)));i=js(q.body,yf,le,pe)}}f.isString(m)||(m=m?"include":"omit");let E="credentials"in Request.prototype;h=new Request(t,{...x,signal:g,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:i,duplex:"half",credentials:E?m:void 0});let O=await fetch(h),R=Ls&&(p==="stream"||p==="response");if(Ls&&(s||R&&y)){let q={};["status","statusText","headers"].forEach(I=>{q[I]=O[I]});let J=f.toFiniteNumber(O.headers.get("content-length")),[le,pe]=s&&Mn(J,Ct(Gn(s),!0))||[];O=new Response(js(O.body,yf,le,()=>{pe&&pe(),y&&y()}),q)}p=p||"text";let k=await Va[f.findKey(Va,p)||"text"](O,e);return!R&&y&&y(),await new Promise((q,J)=>{vt(q,J,{data:k,headers:ue.from(O.headers),status:O.status,statusText:O.statusText,config:e,request:h})})}catch(E){throw y&&y(),E&&E.name==="TypeError"&&/fetch/i.test(E.message)?Object.assign(new D("Network Error",D.ERR_NETWORK,e,h),{cause:E.cause||E}):D.from(E,E&&E.code,e,h)}});var Ns={http:ff,xhr:gf,fetch:Sf};f.forEach(Ns,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var Ef=e=>`- ${e}`,_0=e=>f.isFunction(e)||e===null||e===!1,Ya={getAdapter:e=>{e=f.isArray(e)?e:[e];let{length:t}=e,n,i,a={};for(let r=0;r<t;r++){n=e[r];let o;if(i=n,!_0(n)&&(i=Ns[(o=String(n)).toLowerCase()],i===void 0))throw new D(`Unknown adapter '${o}'`);if(i)break;a[o||"#"+r]=i}if(!i){let r=Object.entries(a).map(([s,u])=>`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build")),o=t?r.length>1?`since :
|
|
64
|
+
`,QE=ki.encode(Gt),ZE=2,ks=class{constructor(t,n){let{escapeName:i}=this.constructor,a=f.isString(n),r=`Content-Disposition: form-data; name="${i(t)}"${!a&&n.name?`; filename="${i(n.name)}"`:""}${Gt}`;a?n=ki.encode(String(n).replace(/\r?\n|\r\n?/g,Gt)):r+=`Content-Type: ${n.type||"application/octet-stream"}${Gt}`,this.headers=ki.encode(r+Gt),this.contentLength=a?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+ZE,this.name=t,this.value=n}async*encode(){yield this.headers;let{value:t}=this;f.isTypedArray(t)?yield t:yield*Xa(t),yield QE}static escapeName(t){return String(t).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},e0=(e,t,n)=>{let{tag:i="form-data-boundary",size:a=25,boundary:r=i+"-"+f.generateString(a,KE)}=n||{};if(!f.isFormData(e))throw TypeError("FormData instance required");if(r.length<1||r.length>70)throw Error("boundary must be 10-70 characters long");let o=ki.encode("--"+r+Gt),s=ki.encode("--"+r+"--"+Gt+Gt),u=s.byteLength,p=Array.from(e.entries()).map(([m,x])=>{let g=new ks(m,x);return u+=g.size,g});u+=o.byteLength*p.length,u=f.toFiniteNumber(u);let l={"Content-Type":`multipart/form-data; boundary=${r}`};return Number.isFinite(u)&&(l["Content-Length"]=u),t&&t(l),Wm.Readable.from(async function*(){for(let m of p)yield o,yield*m.encode();yield s}())},Ym=e0;var Jm=F(require("stream"),1),Fs=class extends Jm.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)}},Km=Fs;var t0=(e,t)=>f.isAsyncFn(e)?function(...n){let i=n.pop();e.apply(this,n).then(a=>{try{t?i(null,...t(a)):i(null,a)}catch(r){i(r)}},i)}:e,Qm=t0;function n0(e,t){e=e||10;let n=new Array(e),i=new Array(e),a=0,r=0,o;return t=t!==void 0?t:1e3,function(u){let p=Date.now(),l=i[r];o||(o=p),n[a]=u,i[a]=p;let m=r,x=0;for(;m!==a;)x+=n[m++],m=m%e;if(a=(a+1)%e,a===r&&(r=(r+1)%e),p-o<t)return;let g=l&&p-l;return g?Math.round(x*1e3/g):void 0}}var Zm=n0;function i0(e,t){let n=0,i=1e3/t,a,r,o=(p,l=Date.now())=>{n=l,a=null,r&&(clearTimeout(r),r=null),e.apply(null,p)};return[(...p)=>{let l=Date.now(),m=l-n;m>=i?o(p,l):(a=p,r||(r=setTimeout(()=>{r=null,o(a)},i-m)))},()=>a&&o(a)]}var ef=i0;var Ct=(e,t,n=3)=>{let i=0,a=Zm(50,250);return ef(r=>{let o=r.loaded,s=r.lengthComputable?r.total:void 0,u=o-i,p=a(u),l=o<=s;i=o;let m={loaded:o,total:s,progress:s?o/s:void 0,bytes:u,rate:p||void 0,estimated:p&&s&&l?(s-o)/p:void 0,event:r,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(m)},n)},Mn=(e,t)=>{let n=e!=null;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},Gn=e=>(...t)=>f.asap(()=>e(...t));var tf={flush:Ot.default.constants.Z_SYNC_FLUSH,finishFlush:Ot.default.constants.Z_SYNC_FLUSH},a0={flush:Ot.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:Ot.default.constants.BROTLI_OPERATION_FLUSH},nf=f.isFunction(Ot.default.createBrotliDecompress),{http:r0,https:o0}=pf.default,s0=/https:?/,af=te.protocols.map(e=>e+":"),rf=(e,[t,n])=>(e.on("end",n).on("error",n),t);function c0(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function mf(e,t,n){let i=t;if(!i&&i!==!1){let a=(0,sf.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 r=Buffer.from(i.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+r}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(r){mf(r,t,r.href)}}var u0=typeof process<"u"&&f.kindOf(process)==="process",l0=e=>new Promise((t,n)=>{let i,a,r=(u,p)=>{a||(a=!0,i&&i(u,p))},o=u=>{r(u),t(u)},s=u=>{r(u,!0),n(u)};e(o,s,u=>i=u).catch(s)}),p0=({address:e,family:t})=>{if(!f.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},of=(e,t)=>p0(f.isObject(e)?e:{address:e,family:t}),ff=u0&&function(t){return l0(async function(i,a,r){let{data:o,lookup:s,family:u}=t,{responseType:p,responseEncoding:l}=t,m=t.method.toUpperCase(),x,g=!1,h;if(s){let C=Qm(s,T=>f.isArray(T)?T:[T]);s=(T,L,he)=>{C(T,L,(oe,Se,ft)=>{if(oe)return he(oe);let je=f.isArray(Se)?Se.map(Ee=>of(Ee)):[of(Se,ft)];L.all?he(oe,je):he(oe,je[0].address,je[0].family)})}}let y=new df.EventEmitter,_=()=>{t.cancelToken&&t.cancelToken.unsubscribe(E),t.signal&&t.signal.removeEventListener("abort",E),y.removeAllListeners()};r((C,T)=>{x=!0,T&&(g=!0,_())});function E(C){y.emit("abort",!C||C.type?new Ze(null,t,h):C)}y.once("abort",a),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(E),t.signal&&(t.signal.aborted?E():t.signal.addEventListener("abort",E)));let O=on(t.baseURL,t.url),R=new URL(O,te.hasBrowserEnv?te.origin:void 0),k=R.protocol||af[0];if(k==="data:"){let C;if(m!=="GET")return vt(i,a,{status:405,statusText:"method not allowed",headers:{},config:t});try{C=Ts(t.url,p==="blob",{Blob:t.env&&t.env.Blob})}catch(T){throw D.from(T,D.ERR_BAD_REQUEST,t)}return p==="text"?(C=C.toString(l),(!l||l==="utf8")&&(C=f.stripBOM(C))):p==="stream"&&(C=pn.default.Readable.from(C)),vt(i,a,{data:C,status:200,statusText:"OK",headers:new ue,config:t})}if(af.indexOf(k)===-1)return a(new D("Unsupported protocol "+k,D.ERR_BAD_REQUEST,t));let q=ue.from(t.headers).normalize();q.set("User-Agent","axios/"+ln,!1);let{onUploadProgress:J,onDownloadProgress:le}=t,pe=t.maxRate,I,B;if(f.isSpecCompliantForm(o)){let C=q.getContentType(/boundary=([-_\w\d]{10,70})/i);o=Ym(o,T=>{q.set(T)},{tag:`axios-${ln}-boundary`,boundary:C&&C[1]||void 0})}else if(f.isFormData(o)&&f.isFunction(o.getHeaders)){if(q.set(o.getHeaders()),!q.hasContentLength())try{let C=await lf.default.promisify(o.getLength).call(o);Number.isFinite(C)&&C>=0&&q.setContentLength(C)}catch{}}else if(f.isBlob(o))o.size&&q.setContentType(o.type||"application/octet-stream"),q.setContentLength(o.size||0),o=pn.default.Readable.from(Xa(o));else if(o&&!f.isStream(o)){if(!Buffer.isBuffer(o))if(f.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else if(f.isString(o))o=Buffer.from(o,"utf-8");else return a(new D("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",D.ERR_BAD_REQUEST,t));if(q.setContentLength(o.length,!1),t.maxBodyLength>-1&&o.length>t.maxBodyLength)return a(new D("Request body larger than maxBodyLength limit",D.ERR_BAD_REQUEST,t))}let G=f.toFiniteNumber(q.getContentLength());f.isArray(pe)?(I=pe[0],B=pe[1]):I=B=pe,o&&(J||I)&&(f.isStream(o)||(o=pn.default.Readable.from(o,{objectMode:!1})),o=pn.default.pipeline([o,new Is({maxRate:f.toFiniteNumber(I)})],f.noop),J&&o.on("progress",rf(o,Mn(G,Ct(Gn(J),!1,3)))));let Z;if(t.auth){let C=t.auth.username||"",T=t.auth.password||"";Z=C+":"+T}if(!Z&&R.username){let C=R.username,T=R.password;Z=C+":"+T}Z&&q.delete("authorization");let Y;try{Y=rn(R.pathname+R.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(C){let T=new Error(C.message);return T.config=t,T.url=t.url,T.exists=!0,a(T)}q.set("Accept-Encoding","gzip, compress, deflate"+(nf?", br":""),!1);let $={path:Y,method:m,headers:q.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:Z,protocol:k,family:u,beforeRedirect:c0,beforeRedirects:{}};!f.isUndefined(s)&&($.lookup=s),t.socketPath?$.socketPath=t.socketPath:($.hostname=R.hostname.startsWith("[")?R.hostname.slice(1,-1):R.hostname,$.port=R.port,mf($,t.proxy,k+"//"+R.hostname+(R.port?":"+R.port:"")+$.path));let P,W=s0.test($.protocol);if($.agent=W?t.httpsAgent:t.httpAgent,t.transport?P=t.transport:t.maxRedirects===0?P=W?uf.default:cf.default:(t.maxRedirects&&($.maxRedirects=t.maxRedirects),t.beforeRedirect&&($.beforeRedirects.config=t.beforeRedirect),P=W?o0:r0),t.maxBodyLength>-1?$.maxBodyLength=t.maxBodyLength:$.maxBodyLength=1/0,t.insecureHTTPParser&&($.insecureHTTPParser=t.insecureHTTPParser),h=P.request($,function(T){if(h.destroyed)return;let L=[T],he=+T.headers["content-length"];if(le||B){let Ee=new Is({maxRate:f.toFiniteNumber(B)});le&&Ee.on("progress",rf(Ee,Mn(he,Ct(Gn(le),!0,3)))),L.push(Ee)}let oe=T,Se=T.req||h;if(t.decompress!==!1&&T.headers["content-encoding"])switch((m==="HEAD"||T.statusCode===204)&&delete T.headers["content-encoding"],(T.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":L.push(Ot.default.createUnzip(tf)),delete T.headers["content-encoding"];break;case"deflate":L.push(new Km),L.push(Ot.default.createUnzip(tf)),delete T.headers["content-encoding"];break;case"br":nf&&(L.push(Ot.default.createBrotliDecompress(a0)),delete T.headers["content-encoding"])}oe=L.length>1?pn.default.pipeline(L,f.noop):L[0];let ft=pn.default.finished(oe,()=>{ft(),_()}),je={status:T.statusCode,statusText:T.statusMessage,headers:new ue(T.headers),config:t,request:Se};if(p==="stream")je.data=oe,vt(i,a,je);else{let Ee=[],Vt=0;oe.on("data",function(de){Ee.push(de),Vt+=de.length,t.maxContentLength>-1&&Vt>t.maxContentLength&&(g=!0,oe.destroy(),a(new D("maxContentLength size of "+t.maxContentLength+" exceeded",D.ERR_BAD_RESPONSE,t,Se)))}),oe.on("aborted",function(){if(g)return;let de=new D("maxContentLength size of "+t.maxContentLength+" exceeded",D.ERR_BAD_RESPONSE,t,Se);oe.destroy(de),a(de)}),oe.on("error",function(de){h.destroyed||a(D.from(de,null,t,Se))}),oe.on("end",function(){try{let de=Ee.length===1?Ee[0]:Buffer.concat(Ee);p!=="arraybuffer"&&(de=de.toString(l),(!l||l==="utf8")&&(de=f.stripBOM(de))),je.data=de}catch(de){return a(D.from(de,null,t,je.request,je))}vt(i,a,je)})}y.once("abort",Ee=>{oe.destroyed||(oe.emit("error",Ee),oe.destroy())})}),y.once("abort",C=>{a(C),h.destroy(C)}),h.on("error",function(T){a(D.from(T,null,t,h))}),h.on("socket",function(T){T.setKeepAlive(!0,1e3*60)}),t.timeout){let C=parseInt(t.timeout,10);if(Number.isNaN(C)){a(new D("error trying to parse `config.timeout` to int",D.ERR_BAD_OPTION_VALUE,t,h));return}h.setTimeout(C,function(){if(x)return;let L=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",he=t.transitional||jn;t.timeoutErrorMessage&&(L=t.timeoutErrorMessage),a(new D(L,he.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,t,h)),E()})}if(f.isStream(o)){let C=!1,T=!1;o.on("end",()=>{C=!0}),o.once("error",L=>{T=!0,h.destroy(L)}),o.on("close",()=>{!C&&!T&&E(new Ze("Request stream has been aborted",t,h))}),o.pipe(h)}else h.end(o)})};var hf=te.hasStandardBrowserEnv?function(){let t=te.navigator&&/(msie|trident)/i.test(te.navigator.userAgent),n=document.createElement("a"),i;function a(r){let o=r;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{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(o){let s=f.isString(o)?a(o):o;return s.protocol===i.protocol&&s.host===i.host}}():function(){return function(){return!0}}();var xf=te.hasStandardBrowserEnv?{write(e,t,n,i,a,r){let o=[e+"="+encodeURIComponent(t)];f.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),f.isString(i)&&o.push("path="+i),f.isString(a)&&o.push("domain="+a),r===!0&&o.push("secure"),document.cookie=o.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 vf=e=>e instanceof ue?{...e}:e;function lt(e,t){t=t||{};let n={};function i(p,l,m){return f.isPlainObject(p)&&f.isPlainObject(l)?f.merge.call({caseless:m},p,l):f.isPlainObject(l)?f.merge({},l):f.isArray(l)?l.slice():l}function a(p,l,m){if(f.isUndefined(l)){if(!f.isUndefined(p))return i(void 0,p,m)}else return i(p,l,m)}function r(p,l){if(!f.isUndefined(l))return i(void 0,l)}function o(p,l){if(f.isUndefined(l)){if(!f.isUndefined(p))return i(void 0,p)}else return i(void 0,l)}function s(p,l,m){if(m in t)return i(p,l);if(m in e)return i(void 0,p)}let u={url:r,method:r,data:r,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(p,l)=>a(vf(p),vf(l),!0)};return f.forEach(Object.keys(Object.assign({},e,t)),function(l){let m=u[l]||a,x=m(e[l],t[l],l);f.isUndefined(x)&&m!==s||(n[l]=x)}),n}var Ha=e=>{let t=lt({},e),{data:n,withXSRFToken:i,xsrfHeaderName:a,xsrfCookieName:r,headers:o,auth:s}=t;t.headers=o=ue.from(o),t.url=rn(on(t.baseURL,t.url),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let u;if(f.isFormData(n)){if(te.hasStandardBrowserEnv||te.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((u=o.getContentType())!==!1){let[p,...l]=u?u.split(";").map(m=>m.trim()).filter(Boolean):[];o.setContentType([p||"multipart/form-data",...l].join("; "))}}if(te.hasStandardBrowserEnv&&(i&&f.isFunction(i)&&(i=i(t)),i||i!==!1&&hf(t.url))){let p=a&&r&&xf.read(r);p&&o.set(a,p)}return t};var d0=typeof XMLHttpRequest<"u",gf=d0&&function(e){return new Promise(function(n,i){let a=Ha(e),r=a.data,o=ue.from(a.headers).normalize(),{responseType:s,onUploadProgress:u,onDownloadProgress:p}=a,l,m,x,g,h;function y(){g&&g(),h&&h(),a.cancelToken&&a.cancelToken.unsubscribe(l),a.signal&&a.signal.removeEventListener("abort",l)}let _=new XMLHttpRequest;_.open(a.method.toUpperCase(),a.url,!0),_.timeout=a.timeout;function E(){if(!_)return;let R=ue.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),q={data:!s||s==="text"||s==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:R,config:e,request:_};vt(function(le){n(le),y()},function(le){i(le),y()},q),_=null}"onloadend"in _?_.onloadend=E:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(E)},_.onabort=function(){_&&(i(new D("Request aborted",D.ECONNABORTED,e,_)),_=null)},_.onerror=function(){i(new D("Network Error",D.ERR_NETWORK,e,_)),_=null},_.ontimeout=function(){let k=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded",q=a.transitional||jn;a.timeoutErrorMessage&&(k=a.timeoutErrorMessage),i(new D(k,q.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,e,_)),_=null},r===void 0&&o.setContentType(null),"setRequestHeader"in _&&f.forEach(o.toJSON(),function(k,q){_.setRequestHeader(q,k)}),f.isUndefined(a.withCredentials)||(_.withCredentials=!!a.withCredentials),s&&s!=="json"&&(_.responseType=a.responseType),p&&([x,h]=Ct(p,!0),_.addEventListener("progress",x)),u&&_.upload&&([m,g]=Ct(u),_.upload.addEventListener("progress",m),_.upload.addEventListener("loadend",g)),(a.cancelToken||a.signal)&&(l=R=>{_&&(i(!R||R.type?new Ze(null,e,_):R),_.abort(),_=null)},a.cancelToken&&a.cancelToken.subscribe(l),a.signal&&(a.signal.aborted?l():a.signal.addEventListener("abort",l)));let O=Ii(a.url);if(O&&te.protocols.indexOf(O)===-1){i(new D("Unsupported protocol "+O+":",D.ERR_BAD_REQUEST,e));return}_.send(r||null)})};var m0=(e,t)=>{let{length:n}=e=e?e.filter(Boolean):[];if(t||n){let i=new AbortController,a,r=function(p){if(!a){a=!0,s();let l=p instanceof Error?p:this.reason;i.abort(l instanceof D?l:new Ze(l instanceof Error?l.message:l))}},o=t&&setTimeout(()=>{o=null,r(new D(`timeout ${t} of ms exceeded`,D.ETIMEDOUT))},t),s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(p=>{p.unsubscribe?p.unsubscribe(r):p.removeEventListener("abort",r)}),e=null)};e.forEach(p=>p.addEventListener("abort",r));let{signal:u}=i;return u.unsubscribe=()=>f.asap(s),u}},bf=m0;var f0=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},h0=async function*(e,t){for await(let n of x0(e))yield*f0(n,t)},x0=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()}},js=(e,t,n,i)=>{let a=h0(e,t),r=0,o,s=u=>{o||(o=!0,i&&i(u))};return new ReadableStream({async pull(u){try{let{done:p,value:l}=await a.next();if(p){s(),u.close();return}let m=l.byteLength;if(n){let x=r+=m;n(x)}u.enqueue(new Uint8Array(l))}catch(p){throw s(p),p}},cancel(u){return s(u),a.return()}},{highWaterMark:2})};var Wa=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",_f=Wa&&typeof ReadableStream=="function",v0=Wa&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),wf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},g0=_f&&wf(()=>{let e=!1,t=new Request(te.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),yf=64*1024,Ls=_f&&wf(()=>f.isReadableStream(new Response("").body)),Va={stream:Ls&&(e=>e.body)};Wa&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Va[t]&&(Va[t]=f.isFunction(e[t])?n=>n[t]():(n,i)=>{throw new D(`Response type '${t}' is not supported`,D.ERR_NOT_SUPPORT,i)})})})(new Response);var b0=async e=>{if(e==null)return 0;if(f.isBlob(e))return e.size;if(f.isSpecCompliantForm(e))return(await new Request(te.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(f.isArrayBufferView(e)||f.isArrayBuffer(e))return e.byteLength;if(f.isURLSearchParams(e)&&(e=e+""),f.isString(e))return(await v0(e)).byteLength},y0=async(e,t)=>{let n=f.toFiniteNumber(e.getContentLength());return n??b0(t)},Sf=Wa&&(async e=>{let{url:t,method:n,data:i,signal:a,cancelToken:r,timeout:o,onDownloadProgress:s,onUploadProgress:u,responseType:p,headers:l,withCredentials:m="same-origin",fetchOptions:x}=Ha(e);p=p?(p+"").toLowerCase():"text";let g=bf([a,r&&r.toAbortSignal()],o),h,y=g&&g.unsubscribe&&(()=>{g.unsubscribe()}),_;try{if(u&&g0&&n!=="get"&&n!=="head"&&(_=await y0(l,i))!==0){let q=new Request(t,{method:"POST",body:i,duplex:"half"}),J;if(f.isFormData(i)&&(J=q.headers.get("content-type"))&&l.setContentType(J),q.body){let[le,pe]=Mn(_,Ct(Gn(u)));i=js(q.body,yf,le,pe)}}f.isString(m)||(m=m?"include":"omit");let E="credentials"in Request.prototype;h=new Request(t,{...x,signal:g,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:i,duplex:"half",credentials:E?m:void 0});let O=await fetch(h),R=Ls&&(p==="stream"||p==="response");if(Ls&&(s||R&&y)){let q={};["status","statusText","headers"].forEach(I=>{q[I]=O[I]});let J=f.toFiniteNumber(O.headers.get("content-length")),[le,pe]=s&&Mn(J,Ct(Gn(s),!0))||[];O=new Response(js(O.body,yf,le,()=>{pe&&pe(),y&&y()}),q)}p=p||"text";let k=await Va[f.findKey(Va,p)||"text"](O,e);return!R&&y&&y(),await new Promise((q,J)=>{vt(q,J,{data:k,headers:ue.from(O.headers),status:O.status,statusText:O.statusText,config:e,request:h})})}catch(E){throw y&&y(),E&&E.name==="TypeError"&&/fetch/i.test(E.message)?Object.assign(new D("Network Error",D.ERR_NETWORK,e,h),{cause:E.cause||E}):D.from(E,E&&E.code,e,h)}});var Ns={http:ff,xhr:gf,fetch:Sf};f.forEach(Ns,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var Ef=e=>`- ${e}`,_0=e=>f.isFunction(e)||e===null||e===!1,Ya={getAdapter:e=>{e=f.isArray(e)?e:[e];let{length:t}=e,n,i,a={};for(let r=0;r<t;r++){n=e[r];let o;if(i=n,!_0(n)&&(i=Ns[(o=String(n)).toLowerCase()],i===void 0))throw new D(`Unknown adapter '${o}'`);if(i)break;a[o||"#"+r]=i}if(!i){let r=Object.entries(a).map(([s,u])=>`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build")),o=t?r.length>1?`since :
|
|
65
65
|
`+r.map(Ef).join(`
|
|
66
66
|
`):" "+Ef(r[0]):"as no adapter specified";throw new D("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return i},adapters:Ns};function qs(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ze(null,e)}function Ja(e){return qs(e),e.headers=ue.from(e.headers),e.data=Di.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ya.getAdapter(e.adapter||Ln.adapter)(e).then(function(i){return qs(e),i.data=Di.call(e,e.transformResponse,i),i.headers=ue.from(i.headers),i},function(i){return Ci(i)||(qs(e),i&&i.response&&(i.response.data=Di.call(e,e.transformResponse,i.response),i.response.headers=ue.from(i.response.headers))),Promise.reject(i)})}var Us={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Us[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});var Rf={};Us.transitional=function(t,n,i){function a(r,o){return"[Axios v"+ln+"] Transitional option '"+r+"'"+o+(i?". "+i:"")}return(r,o,s)=>{if(t===!1)throw new D(a(o," has been removed"+(n?" in "+n:"")),D.ERR_DEPRECATED);return n&&!Rf[o]&&(Rf[o]=!0,console.warn(a(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(r,o,s):!0}};function w0(e,t,n){if(typeof e!="object")throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);let i=Object.keys(e),a=i.length;for(;a-- >0;){let r=i[a],o=t[r];if(o){let s=e[r],u=s===void 0||o(s,r,e);if(u!==!0)throw new D("option "+r+" must be "+u,D.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new D("Unknown option "+r,D.ERR_BAD_OPTION)}}var Ka={assertOptions:w0,validators:Us};var zt=Ka.validators,zn=class{constructor(t){this.defaults=t,this.interceptors={request:new as,response:new as}}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 r=a.stack?a.stack.replace(/^.+\n/,""):"";try{i.stack?r&&!String(i.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
|
67
67
|
`+r):i.stack=r}catch{}}throw i}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=lt(this.defaults,n);let{transitional:i,paramsSerializer:a,headers:r}=n;i!==void 0&&Ka.assertOptions(i,{silentJSONParsing:zt.transitional(zt.boolean),forcedJSONParsing:zt.transitional(zt.boolean),clarifyTimeoutError:zt.transitional(zt.boolean)},!1),a!=null&&(f.isFunction(a)?n.paramsSerializer={serialize:a}:Ka.assertOptions(a,{encode:zt.function,serialize:zt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=r&&f.merge(r.common,r[n.method]);r&&f.forEach(["delete","get","head","post","put","patch","common"],h=>{delete r[h]}),n.headers=ue.concat(o,r);let s=[],u=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(u=u&&y.synchronous,s.unshift(y.fulfilled,y.rejected))});let p=[];this.interceptors.response.forEach(function(y){p.push(y.fulfilled,y.rejected)});let l,m=0,x;if(!u){let h=[Ja.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,p),x=h.length,l=Promise.resolve(n);m<x;)l=l.then(h[m++],h[m++]);return l}x=s.length;let g=n;for(m=0;m<x;){let h=s[m++],y=s[m++];try{g=h(g)}catch(_){y.call(this,_);break}}try{l=Ja.call(this,g)}catch(h){return Promise.reject(h)}for(m=0,x=p.length;m<x;)l=l.then(p[m++],p[m++]);return l}getUri(t){t=lt(this.defaults,t);let n=on(t.baseURL,t.url);return rn(n,t.params,t.paramsSerializer)}};f.forEach(["delete","get","head","options"],function(t){zn.prototype[t]=function(n,i){return this.request(lt(i||{},{method:t,url:n,data:(i||{}).data}))}});f.forEach(["post","put","patch"],function(t){function n(i){return function(r,o,s){return this.request(lt(s||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:r,data:o}))}}zn.prototype[t]=n(),zn.prototype[t+"Form"]=n(!0)});var Fi=zn;var $s=class e{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(r){n=r});let i=this;this.promise.then(a=>{if(!i._listeners)return;let r=i._listeners.length;for(;r-- >0;)i._listeners[r](a);i._listeners=null}),this.promise.then=a=>{let r,o=new Promise(s=>{i.subscribe(s),r=s}).then(a);return o.cancel=function(){i.unsubscribe(r)},o},t(function(r,o,s){i.reason||(i.reason=new Ze(r,o,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}}},Df=$s;function Bs(e){return function(n){return e.apply(null,n)}}function Ms(e){return f.isObject(e)&&e.isAxiosError===!0}var Gs={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(Gs).forEach(([e,t])=>{Gs[t]=e});var Cf=Gs;function Of(e){let t=new Fi(e),n=wi(Fi.prototype.request,t);return f.extend(n,Fi.prototype,t,{allOwnKeys:!0}),f.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return Of(lt(e,a))},n}var be=Of(Ln);be.Axios=Fi;be.CanceledError=Ze;be.CancelToken=Df;be.isCancel=Ci;be.VERSION=ln;be.toFormData=Bt;be.AxiosError=D;be.Cancel=be.CanceledError;be.all=function(t){return Promise.all(t)};be.spread=Bs;be.isAxiosError=Ms;be.mergeConfig=lt;be.AxiosHeaders=ue;be.formToJSON=e=>Ua(f.isHTMLForm(e)?new FormData(e):e);be.getAdapter=Ya.getAdapter;be.HttpStatusCode=Cf;be.default=be;var Xn=be;var{Axios:oA,AxiosError:sA,CanceledError:cA,isCancel:uA,CancelToken:lA,VERSION:pA,all:dA,Cancel:mA,isAxiosError:fA,spread:hA,toFormData:xA,AxiosHeaders:vA,HttpStatusCode:gA,formToJSON:bA,getAdapter:yA,mergeConfig:_A}=Xn;var Lf=F(ni());yn();var Tf=F(require("node:crypto")),dn=F(require("node:fs")),Hn=F(require("node:path")),zs=F(Kt());var Qa=me();function Pf(){let{__cx:e}=Qa.paths(),t=Hn.default.join(e,"apiCache");dn.default.existsSync(t)||dn.default.mkdirSync(t),console.info("Cache initialized")}function Af(e){let{__cx:t}=Qa.paths(),n=Hn.default.join(t,"apiCache"),i=Tf.default.createHash("sha256");return i.update(JSON.stringify(e)),`${n}/${i.digest("hex")}`}function If(e,t){let n=typeof t=="string"?t:JSON.stringify(t),i=Af(e),a=Hn.default.dirname(i);dn.default.existsSync(a)||dn.default.mkdirSync(a,{recursive:!0}),dn.default.writeFileSync(i,n,"utf8")}function kf(e){try{let t=Af(e);return zs.default.readJSONSync(t,{encoding:"utf-8"})}catch{return null}}function S0(){let{__cx:e}=Qa.paths(),n=`${Hn.default.join(e,"apiCache")}/siteHash.json`;try{return zs.default.readJSONSync(n,{encoding:"utf-8"})||{}}catch{return{}}}function Ff(e,t){let n=S0(),i=n[e],a=t||i||new Date().valueOf(),{__cx:r}=Qa.paths(),s=`${Hn.default.join(r,"apiCache")}/siteHash.json`;return a!==i&&(n[e]=a,dn.default.writeFileSync(s,JSON.stringify(n),{encoding:"utf-8"})),a.toString()}var Vn=class{entries;constructor(t){this.entries=t}insert(t,n){this.entries[t].entries.push(n)}get(t){return this.entries[t]}getAll(){return this.entries}};var Wn=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 E0={API_RESPONSE_TOO_BIG:{title:"API response size is too large",description:"API response size is too large and may affect rendering performance",entries:[]}},R0=new Wn(new Vn(E0)),ji=R0;var D0={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:[]}},TA=new Wn(new Vn(D0));Lf.default.config();var{env:{RETRY_WAIT_SECONDS:C0="4",RETRY_ATTEMPTS:jf="4"}}=process;async function Vs(e,t,n=""){let{endpoint:i,body:a,cacheKey:r="",attempt:o=1,headers:s}=e,u={endpoint:i,body:a,headers:s,cacheKey:r};if(r){let p=new Date,l=kf(u);if(l){let m=Hs(l),x=m?`site: ${m}`:"",g=Xs(new Date().getTime()-p.getTime());return Qt(`${t} (cache) ${x} ${i} - ${g}s ${n}`),l}}try{let p=new Date,{data:l,headers:m}=await Xn({url:i,method:t,headers:Object.assign({},s,Dt.headers),data:a}),x=Hs(l),g=x?`site: ${x}`:"",h=Xs(new Date().getTime()-p.getTime());if(Qt(`${t} (fetch) ${g} ${i} - ${h}s ${n}`),If(u,l),N.GRIDDO_ALERT_FEATURE){let y=Number.parseInt(m["content-length"]);y>N.GRIDDO_API_MAX_RESPONSE_SIZE&&ji.insert("API_RESPONSE_TOO_BIG",{endpoint:i,responseSize:y,duration:h})}return l}catch(p){let l=p;return l.response?.status===404?null:(o>parseInt(jf)&&(console.log(`
|
|
@@ -88,12 +88,12 @@ ${m}
|
|
|
88
88
|
${x}
|
|
89
89
|
|
|
90
90
|
=============
|
|
91
|
-
`))}async function Nf(){return await Ye({endpoint:ge.GET_ALL})}async function qf(e,t){return await Ye({endpoint:`${ge.GET_PAGE}/${e}`,cacheKey:t})}async function Uf(e,t=""){let[n,i]=ge.INFO;return await Ye({endpoint:`${n}${e}${i}`,cacheKey:t})}async function Ys(e,t=""){let[n,i]=ge.LANGUAGES;return await Ye({endpoint:`${n}${e}${i}`,cacheKey:t})}async function Js(e){let[t,n]=ge.BUILD_START;return await Ye({endpoint:`${t}${e}${n}`})}async function $f(e,t){let[n,i]=ge.BUILD_END;return await Za({endpoint:`${n}${e}${i}`,body:t})}async function Bf(e,t,n,i,a){let[r,o]=ge.GET_REFERENCE_FIELD_DATA,s=i||e.site,u=a||e.language;return await Za({endpoint:`${r}${s}${o}`,body:t,headers:{lang:u},cacheKey:n})}async function Mf(e){let[t,n]=ge.GET_SITEMAP;return await Ye({endpoint:`${t}${e}${n}`})}async function Gf(e,t=""){let[n,i]=ge.SOCIALS;return await Ye({endpoint:`${n}${e}${i}`,cacheKey:t})}var er=me();async function Xf(e){console.info(`API URL ${N.GRIDDO_API_URL}`),await Dt.login();let t=await Nf(),n=N.GRIDDO_RENDER_ALL_SITES?t.filter(o=>!N.GRIDDO_RENDER_SITE||o.id===N.GRIDDO_RENDER_SITE):t.filter(o=>N.GRIDDO_RENDER_SITE?o.id===N.GRIDDO_RENDER_SITE:!!o.shouldBeUpdated);if(n.length)for(let o of n){let{items:s}=await Ys(o.id);o.domains=s.filter(u=>u.domain&&(u.domain.slug===e||u.domain.slug===`/${e}`)).map(u=>({[u.id]:`${u.domain.slug}${u.path}`}))}let i=n.filter(o=>o.domains.length>0),a=i.filter(o=>N.GRIDDO_RENDER_SITE?o.id===N.GRIDDO_RENDER_SITE:!!o.isPublished),r=i.filter(o=>!o.isPublished&&o.shouldBeUpdated);return{sitesToPublish:a,sitesToUnpublish:r}}async function Hf(e){let{__cx:t}=er.paths();for(let n of e){let i=await Js(n.id),{siteHash:a}=i,r={siteHash:a,publishHashes:[],unpublishHashes:[]};await $f(n.id,r),Yn.default.rmSync(Xt.default.join(t,"store",n.id.toString()),{force:!0,recursive:!0})}}async function Vf(e){let t=await Js(e),n=await Uf(e),i=await Ys(e),a=await Gf(e),r=i.items,o=r.find(h=>h.isDefault),{siteHash:s,unpublishHashes:u,publishIds:p}=t,{headers:l,footers:m}=n,x=N.GRIDDO_RENDER_PAGES.length?N.GRIDDO_RENDER_PAGES.filter(h=>p.includes(h)):p;return{siteInfo:n,validPagesIds:x,siteHash:s,unpublishHashes:u,siteLangs:r,defaultLang:o,headers:l,footers:m,socials:a}}async function Wf(){let{__cx:e}=er.paths(),{buildReportFileName:t}=er,{buildProcessData:n}=await qo(),i=await Dt.login(),a=Object.keys(n).map(s=>({...n[s],siteId:Number.parseInt(s)})),r={authControl:i,sites:a},o=Xt.default.join(e,"dist",t);Yn.default.writeFileSync(o,JSON.stringify(r)),
|
|
91
|
+
`))}async function Nf(){return await Ye({endpoint:ge.GET_ALL})}async function qf(e,t){return await Ye({endpoint:`${ge.GET_PAGE}/${e}`,cacheKey:t})}async function Uf(e,t=""){let[n,i]=ge.INFO;return await Ye({endpoint:`${n}${e}${i}`,cacheKey:t})}async function Ys(e,t=""){let[n,i]=ge.LANGUAGES;return await Ye({endpoint:`${n}${e}${i}`,cacheKey:t})}async function Js(e){let[t,n]=ge.BUILD_START;return await Ye({endpoint:`${t}${e}${n}`})}async function $f(e,t){let[n,i]=ge.BUILD_END;return await Za({endpoint:`${n}${e}${i}`,body:t})}async function Bf(e,t,n,i,a){let[r,o]=ge.GET_REFERENCE_FIELD_DATA,s=i||e.site,u=a||e.language;return await Za({endpoint:`${r}${s}${o}`,body:t,headers:{lang:u},cacheKey:n})}async function Mf(e){let[t,n]=ge.GET_SITEMAP;return await Ye({endpoint:`${t}${e}${n}`})}async function Gf(e,t=""){let[n,i]=ge.SOCIALS;return await Ye({endpoint:`${n}${e}${i}`,cacheKey:t})}var er=me();async function Xf(e){console.info(`API URL ${N.GRIDDO_API_URL}`),await Dt.login();let t=await Nf(),n=N.GRIDDO_RENDER_ALL_SITES?t.filter(o=>!N.GRIDDO_RENDER_SITE||o.id===N.GRIDDO_RENDER_SITE):t.filter(o=>N.GRIDDO_RENDER_SITE?o.id===N.GRIDDO_RENDER_SITE:!!o.shouldBeUpdated);if(n.length)for(let o of n){let{items:s}=await Ys(o.id);o.domains=s.filter(u=>u.domain&&(u.domain.slug===e||u.domain.slug===`/${e}`)).map(u=>({[u.id]:`${u.domain.slug}${u.path}`}))}let i=n.filter(o=>o.domains.length>0),a=i.filter(o=>N.GRIDDO_RENDER_SITE?o.id===N.GRIDDO_RENDER_SITE:!!o.isPublished),r=i.filter(o=>!o.isPublished&&o.shouldBeUpdated);return{sitesToPublish:a,sitesToUnpublish:r}}async function Hf(e){let{__cx:t}=er.paths();for(let n of e){let i=await Js(n.id),{siteHash:a}=i,r={siteHash:a,publishHashes:[],unpublishHashes:[]};await $f(n.id,r),Yn.default.rmSync(Xt.default.join(t,"store",n.id.toString()),{force:!0,recursive:!0})}}async function Vf(e){let t=await Js(e),n=await Uf(e),i=await Ys(e),a=await Gf(e),r=i.items,o=r.find(h=>h.isDefault),{siteHash:s,unpublishHashes:u,publishIds:p}=t,{headers:l,footers:m}=n,x=N.GRIDDO_RENDER_PAGES.length?N.GRIDDO_RENDER_PAGES.filter(h=>p.includes(h)):p;return{siteInfo:n,validPagesIds:x,siteHash:s,unpublishHashes:u,siteLangs:r,defaultLang:o,headers:l,footers:m,socials:a}}async function Wf(){let{__cx:e}=er.paths(),{buildReportFileName:t}=er,{buildProcessData:n}=await qo(),i=await Dt.login(),a=Object.keys(n).map(s=>({...n[s],siteId:Number.parseInt(s)})),r={authControl:i,sites:a},o=Xt.default.join(e,"dist",t);Yn.default.writeFileSync(o,JSON.stringify(r)),Q(`build report saved in ${o}`),Qt(`Build report saved for ${a.length} site(s)`)}async function Yf(){let{sitesToPublish:e}=await qo(),{__cx:t}=er.paths(),n=Xt.default.join(t,"dist");for(let i of e){let{id:a,languages:r}=i;for(let o of r){Dt.headers&&(Dt.headers.lang=o.id.toString());let s=await Mf(a);if(!s)continue;let{items:u,url:{home:p,domain:l}}=s;if(!p)continue;let m=i.domains.find(O=>Object.keys(O)[0]===o.id.toString());if(!m)continue;let x=Object.values(m)[0],g=[],h=Object.keys(u),y=Xt.default.join(n,x.replace(l,""));for(let O of h){let R=u[O];if(!R.length)continue;let k=(0,Ks.parse)("urlset",{"@":{xmlns:"http://www.sitemaps.org/schemas/sitemap/0.9","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation":"http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"},url:R}),q=`/sitemap-${O.toLowerCase()}.xml`,J=Xt.default.join(y,q);zf(J,k),g.push(`${p.endsWith("/")?p.slice(0,-1):p}${q}`)}if(!g.length)continue;let _=(0,Ks.parse)("sitemapindex",{"@":{xmlns:"http://www.sitemaps.org/schemas/sitemap/0.9"},sitemap:g.map(O=>({loc:O}))}),E=Xt.default.join(y,"sitemap.xml");zf(E,_),Q(`sitemap generated in ${E}`)}}}function zf(e,t){try{let n=Xt.default.dirname(e);Yn.default.existsSync(n)||Yn.default.mkdirSync(n,{recursive:!0}),Yn.default.writeFileSync(e,t)}catch(n){console.error(`Error saving file: ${n}`)}}$t();var Qs=F(require("node:fs")),Zs=F(require("node:path"));var T0=me(),ec=class{robots;settings;constructor(){this.robots=[],this.settings={}}async getRobots(){try{let t=await Ye({endpoint:ge.ROBOTS});this.robots=t?.filter(n=>!!n.path).map(({path:n,content:i})=>({path:n,content:i||`User-agent: *
|
|
92
92
|
\r
|
|
93
|
-
\rAllow: /`}))||[]}catch(t){console.warn(`${this.constructor.name}: ${t.message}`)}}async writeFiles(t){let{__cx:n}=T0.paths(t),i=Zs.default.join(n,"dist");await this.getRobots();let a=this.robots.find(({path:r})=>r===`/${t}`);if(!a){console.log(`Robots not found for ${t}`);return}if(Qs.default.existsSync(i)){let r=Zs.default.join(i,"robots.txt");Qs.default.writeFileSync(r,a?.content),
|
|
93
|
+
\rAllow: /`}))||[]}catch(t){console.warn(`${this.constructor.name}: ${t.message}`)}}async writeFiles(t){let{__cx:n}=T0.paths(t),i=Zs.default.join(n,"dist");await this.getRobots();let a=this.robots.find(({path:r})=>r===`/${t}`);if(!a){console.log(`Robots not found for ${t}`);return}if(Qs.default.existsSync(i)){let r=Zs.default.join(i,"robots.txt");Qs.default.writeFileSync(r,a?.content),Q(`wrote robots.txt to ${r}`)}else console.log(`${i} not found`)}},Jf=new ec;var ih=me(),gI=nh.default.sync();function me(){try{return(th(),Xv(eh)).default}catch{console.log("Error while reading configuration file"),process.exit(1)}}function pt(e){if(typeof e=="boolean")return e;if(e==null)return!1;if(e.toLowerCase()==="true")return!0;if(e.toLowerCase()==="false")return!1;if(e.toLowerCase()==="on")return!0;if(e.toLowerCase()==="off")return!1;let t=Number.parseInt(e,10);return Number.isNaN(t)?!1:t>0}function $o(e){let t=[],n=bt.default.readdirSync(e).filter(i=>{let a=mn.default.join(e,i);return bt.default.statSync(a).isDirectory()&&i!=="metadata"});for(let i of n){let a=mn.default.join(e,i),r=bt.default.readdirSync(a).filter(o=>o.endsWith(".json"));for(let o of r)t.push(mn.default.join(a,o))}return t}function Ws(e){return new Promise(t=>setTimeout(t,e))}function Xs(e,t=3){return(e/1e3).toFixed(t)}function Hs(e){if(typeof e!="string")return"site"in e&&e.site?e?.site:void 0}function Bo(e,t){for(let n in e)t.includes(n)?delete e[n]:typeof e[n]=="object"&&Bo(e[n],t)}function ac(e){return e.map(({name:t,id:n})=>`${t} (${n})`).join(", ")}function ah(){let{__cx:e}=ih.paths(),t=mn.default.join(e,"apiCache"),n=bt.default.readdirSync(t),i={},a=n.filter(o=>{let s=`${t}/${o}`,u=ir.default.readJSONSync(s,"utf-8"),{id:p,entity:l,fullUrl:m}=u;return!!(p&&l&&m)});for(let o of a){let s=`${t}/${o}`,u=ir.default.readJSONSync(s,"utf-8"),p=bt.default.statSync(s).mtimeMs,{id:l}=u;(!i[l]||p>bt.default.statSync(`${t}/${i[l]}`).mtimeMs)&&(i[l]=o)}let r=0;for(let o of a){let s=`${t}/${o}`,u=ir.default.readJSONSync(s,"utf-8"),{id:p}=u;o!==i[p]&&(bt.default.unlinkSync(s),r++)}console.log(`Sanitize apiCache dir for ${r} files`)}async function rc(e,t=0){let n=process.hrtime();for(let o of e)await o(),t>0&&await Ws(t);let[i,a]=process.hrtime(n);return+(i+a/1e9).toFixed(3)}function U0(e){if(N.GRIDDO_RENDER_BREAKPOINTS_FEATURE)return new Promise(n=>{console.log(`
|
|
94
94
|
`),On(`\u231B\uFE0F ${e}`,"",1,0),process.stdin.once("data",()=>{n()})})}async function dt(e,t){let{steps:n,bypass:i,delay:a}=t;if(i)return;let r={Archive:N.GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS,Data:N.GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS,Meta:N.GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS,Relocation:N.GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS,Clean:N.GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS,Restore:N.GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS,Prepare:N.GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS,Close:N.GRIDDO_CLOSE_LIFECYCLE_MAX_ATTEMPTS,SSG:N.GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS,HealthCheck:1,__DEBUG__:1},o=0,s=r[e]||1;for(;o<s;)try{Tn(`start ${e} life-cycle`);let u=await rc(n,a);Lp(`${e} - ${u}s`),await U0(`${e} LifeCycle`);break}catch(u){let p=ap(ip(` Error in ${e} LifeCycle `)),l=Ne.yellow(`Attempt (${o+1})`);console.log(`
|
|
95
95
|
${p} ${l}
|
|
96
|
-
`),console.log(u),console.log(),o++}o===s&&_e(fd(s,e))}async function rh(e){await Wf(),await Yf(),await Jf.writeFiles(e)}function oh(){let{__cx:e}=ih.paths(),t=mn.default.join(e,"store"),a=bt.default.readdirSync(t).filter(r=>r!=="metadata").map(r=>mn.default.join(t,r));for(let r of a)bt.default.rmSync(r,{recursive:!0,force:!0})}sh.default.config();var tt=process.env.GRIDDO_API_URL||process.env.API_URL,ar=process.env.GRIDDO_PUBLIC_API_URL||process.env.PUBLIC_API_URL,ch=process.env.botEmail,uh=process.env.botPassword,lh=Number.parseInt(process.env.GRIDDO_API_CONCURRENCY_COUNT||"10"),ph=pt(process.env.GRIDDO_RENDER_ALL_SITES||process.env.updateAllSites),dh=Number.parseInt(process.env.GRIDDO_RENDER_SITE||""),mh=(process.env.GRIDDO_RENDER_PAGES||"").split(",").map(e=>Number.parseInt(e)).filter(Boolean),fh=pt(process.env.GRIDDO_SKIP_BUILD_CHECKS),hh=pt(process.env.GRIDDO_DEBUG_LOGS),xh=pt(process.env.GRIDDO_BUILD_LOGS),vh=pt(process.env.GRIDDO_RENDER_BREAKPOINTS_FEATURE),gh=pt(process.env.GRIDDO_SSG_VERBOSE_LOGS),bh=pt(process.env.GRIDGRIDDO_SEARCH_FEATURE_FEATURE),yh=process.env.GRIDDO_ASSET_PREFIX||process.env.ASSET_PREFIX,_h=process.env.GRIDDO_REACT_APP_INSTANCE||process.env.REACT_APP_INSTANCE,wh=pt(process.env.GRIDDO_AI_EMBEDDINGS),Sh=pt(process.env.GRIDDO_VERBOSE_LOGS),Eh=pt(process.env.GRIDDO_ALERT_FEATURE),Rh=Number.parseInt(process.env.GRIDDO_API_MAX_RESPONSE_SIZE||"81920"),Dh=Number.parseInt(process.env.GRIDDO_SSG_MAX_PAGE_SIZE||"524288"),Ch=Number.parseInt(process.env.GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS||"1"),Oh=Number.parseInt(process.env.GRIDDO_CLOSE_LIFECYCLE_MAX_ATTEMPTS||"1"),Th=Number.parseInt(process.env.GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS||"1"),Ph=Number.parseInt(process.env.GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS||"1"),Ah=Number.parseInt(process.env.GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS||"1"),Ih=Number.parseInt(process.env.GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS||"2"),kh=Number.parseInt(process.env.GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS||"1"),Fh=Number.parseInt(process.env.GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS||"4"),jh=Number.parseInt(process.env.GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS||"1"),Lh=process.env.GRIDDO_CX_FIXTURES_DOMAIN_NAMES,Nh=process.env.GRIDDO_CX_FIXTURES_SITE_NAMES;var Ht=`${tt}/site/`,qh=`${tt}/ai/embeddings`,Uh=`${ar}/alert`,$h=`${tt}/domains`,Bh=`${tt}/sites/all`,Mh=`${tt}/page`,Gh=`${tt}/login_check`,zh=`${tt}/debug/reset-render`,Xh=`${tt}/domains/robots`,Hh=`${tt}/search`,Vh=`${tt}/settings`,Wh=[Ht,"/build/end"],Yh=[Ht,"/build/start"],Jh=[Ht,"/pages?pagination=false"],Kh=[Ht,"/distributor"],Qh=[Ht,"/sitemap"],Zh=[Ht,"/all"],ex=[Ht,"/languages"],tx=[Ht,"/socials"];var ge={ALERT:Uh,AI_EMBEDDINGS:qh,BUILD_END:Wh,BUILD_START:Yh,DOMAINS:$h,GET_ALL:Bh,GET_PAGE:Mh,GET_PAGES:Jh,GET_REFERENCE_FIELD_DATA:Kh,GET_SITEMAP:Qh,INFO:Zh,LANGUAGES:ex,LOGIN:Gh,RESET_RENDER:zh,ROBOTS:Xh,SEARCH:Hh,SETTINGS:Vh,SOCIALS:tx},N={GRIDDO_AI_EMBEDDINGS:wh,GRIDDO_ALERT_FEATURE:Eh,GRIDDO_API_CONCURRENCY_COUNT:lh,GRIDDO_API_MAX_RESPONSE_SIZE:Rh,GRIDDO_API_URL:tt,GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS:jh,GRIDDO_ASSET_PREFIX:yh,GRIDDO_BOT_PASSWORD:uh,GRIDDO_BOT_USER:ch,GRIDDO_BUILD_LOGS:xh,GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS:Ch,GRIDDO_CLOSE_LIFECYCLE_MAX_ATTEMPTS:Oh,GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS:Ah,GRIDDO_DEBUG_LOGS:hh,GRIDDO_FIXTURES_DOMAIN_NAMES:Lh,GRIDDO_FIXTURES_SITE_NAMES:Nh,GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS:Fh,GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS:Th,GRIDDO_PUBLIC_API_URL:ar,GRIDDO_REACT_APP_INSTANCE:_h,GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS:kh,GRIDDO_RENDER_ALL_SITES:ph,GRIDDO_RENDER_BREAKPOINTS_FEATURE:vh,GRIDDO_RENDER_PAGES:mh,GRIDDO_RENDER_SITE:dh,GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS:Ph,GRIDDO_SEARCH_FEATURE:bh,GRIDDO_SKIP_BUILD_CHECKS:fh,GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS:Ih,GRIDDO_SSG_MAX_PAGE_SIZE:Dh,GRIDDO_SSG_VERBOSE_LOGS:gh,GRIDDO_VERBOSE_LOGS:Sh};Rt();$t();ix.default.config();var ax=me();function rx(e){let{proDomain:t}=me();if(!N.GRIDDO_ASSET_PREFIX||!e||!e.startsWith(t))return"";let n=`${N.GRIDDO_ASSET_PREFIX}/${e}`;return Z(`Reading process.env.GRIDDO_ASSET_PREFIX, ${N.GRIDDO_ASSET_PREFIX}`),Z(`Setting the asset prefix with the domain concatenated, ${n}`),n}function ox(e){Z(`read assetPrefixWithDomain, ${e}`);let{__ssg:t}=ax.paths(),n=(0,nx.spawnSync)("yarn",["gatsby-build",N.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:void 0})});n.status!==0&&_e(hd(n))}async function sx(e,t){let{__cx:n,__ssg:i}=ax.paths(e),a=Tt.default.join(n,"dist"),r=Tt.default.join(n,"assets"),o=Tt.default.join(n,"dist",e),s=Tt.default.join(i,"public"),u=mt.default.readdirSync(s).filter(y=>Tt.default.extname(y)===".js"||Tt.default.extname(y)===".json"||Tt.default.extname(y)===".css"),p=`${s}/page-data`,l=`${r}/page-data`,m=Tt.default.join(i,"static"),x=r,g=`${a}/static`,h=`${r}/static`;try{mt.default.mkdirSync(r,{recursive:!0}),mt.default.copySync(s,a,{preserveTimestamps:!0}),t&&(mt.default.copySync(p,l,{preserveTimestamps:!0}),mt.default.existsSync(m)&&mt.default.copySync(m,x,{overwrite:!1,preserveTimestamps:!0}),mt.default.copySync(g,h,{overwrite:!1,preserveTimestamps:!0}),mt.default.existsSync(m)&&mt.default.copySync(m,o,{overwrite:!1,preserveTimestamps:!0}),u.map(async y=>{let _=`${s}/${y}`,E=`${r}/${y}`;mt.default.copySync(_,E,{preserveTimestamps:!0})}))}catch(y){console.error(y)}}var fn=F(require("node:path"));function $0(e){let{__cx:t,__exports:n,__cache:i}=e;return{initials:[n,i,fn.default.join(t,"store"),fn.default.join(t,"apiCache")],disposables:[fn.default.join(t,"store"),fn.default.join(t,"apiCache"),fn.default.join(t,"render-metadata.json"),fn.default.join(t,"dist")],cacheables:["apiCache","store"],archivables:["dist","assets"]}}var rr=$0;var or=F(require("node:path"));function B0(e){let{__ssg:t}=e;return{disposables:[or.default.join(t,"public"),or.default.join(t,"static"),or.default.join(t,".cache")],cacheables:[".cache"],initials:[],archivables:[]}}var cx=B0;function ux(e,t){let{cxPaths:n}=t,i={gatsby:cx(n)};return{cx:rr(n),[e]:i[e],all:{initials:[...rr(n).initials,...i[e].initials],disposables:[...rr(n).disposables,...i[e].disposables]}}}async function lx({area:e,description:t,fullData:n,instantNotification:i=!1,level:a}){let r=ge.ALERT,o={level:a,area:e,description:t,fullData:n,instantNotification:i};try{await Xn.post(r,o,{headers:{"Content-Type":"application/json",Connection:"close"}})}catch(s){console.error("Error creating Griddo alert:",s)}}var wx=F(require("node:fs")),uc=F(require("node:path")),Sx=F(Xr());var sr=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 r=t.find(o=>o.language===i&&o.navigationLanguages?.find(s=>s.navigationId===n))||t.find(o=>o.id===n);return r?{...r}: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:r},templateConfig:{defaultHeader:o,defaultFooter:s,templates:u}}=t,p=h=>{let y=h.find(_=>typeof _=="number");return typeof y=="number"?y:null},l=p([n,u?.[r]?.defaultHeader,o]),m=p([i,u?.[r]?.defaultFooter,s]),x=l?this.getPageHeader(l,a):l===0?null:this._defaultHeaders[a],g=m?this.getPageFooter(m,a):m===0?null:this._defaultFooters[a];return{header:x,footer:g}}};function M0(e,t){let{order:n,sources:i,quantity:a,mode:r,fixed:o,fullRelations:s=!1,allLanguages:u=!1,preferenceLanguage:p=!1,referenceId:l,fields:m}=e;return r==="auto"?{mode:r,order:n,sources:i,quantity:a,fullRelations:s,allLanguages:u,preferenceLanguage:p,fields:m}:r==="manual"?{mode:r,fixed:o,fullRelations:s,fields:m}:r==="navigation"?{mode:r,order:n,quantity:a,fullRelations:s,referenceId:l||t?.structuredDataContent?.id,fields:m}:(console.log(`Error: ReferenceField mode: ${r} is not recognized on page ${t?.id}.`),e)}async function G0(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:r}=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 o=M0(n,t);return await Bf(t,o,i,a,r)}async function px({page:e,cacheKey:t=""}){try{let{template:n}=e,i=async(o,s=1)=>{if(!(!o||typeof o!="object"||!(JSON.stringify(o).includes('"hasDistributorData":true')||JSON.stringify(o).includes('"getStaticData":true'))))for(let p in o){if(p==="queriedItems")continue;let m=o[p];if(!m||typeof m!="object")continue;(m.hasDistributorData||m.getStaticData)&&(m.queriedItems=await G0({page:e,cacheKey:t,component:m})),await i(m,s+1)}};return await(async o=>(await i([o]),o))(n)}catch(n){console.error(`Error in getReferenceFieldData ${n}`),process.exit(1)}}async function dx(){return await Ye({endpoint:ge.SETTINGS})}var hx=F(ni());function oc(e,t,n,i="jpg"){let a=typeof e=="string"?e:e?.url;return a?a.split("/")[2].includes("cloudinary.com")?X0(a,`c_fill,w_${t},h_${n}`):z0(a,`f/${i}/w/${t}/h/${n}`):null}function z0(e,t){let n=e.split("/"),i=n.slice(0,-1).join("/"),a=n.slice(-1)[0];return`${i}/${t}/${a}`}function X0(e,t){let n=e.replace("https://",""),i=n.split("/").slice(0,4).join("/"),a=n.replace(i,"");return`https://${i}/${t}${a}`}hx.default.config();var H0=25;function V0({socialTitle:e,socialDescription:t,socialImage:n}){return{type:"website",title:e,description:t,image:n?oc(n,1280,768):"",twitterImage:n?oc(n,1280,768):""}}function W0(e){let{title:t,metaTitle:n,metaDescription:i,canonicalURL:a,locale:r,url:o,isIndexed:s,follow:u,metasAdvanced:p,pageLanguages:l,fullUrl:m,metaKeywords:x}=e,g=p?.split(",").filter(Boolean).map(h=>h.trim().toLowerCase())||[];return{title:(n||t||"").trim(),description:i,canonical:a?.trim()&&a!==m?a.trim():s?m:void 0,locale:r,url:o,index:s?"index":"noindex",follow:u?"follow":"nofollow",translate:g.includes("notranslate")?"notranslate":"",metasAdvanced:g.filter(h=>h!=="notranslate").join(),pageLanguages:l,metaKeywords:x?.filter(Boolean).map(h=>h.replace(/"/g,"'")).join(", ")}}async function cc(e,t){let{id:n,title:i,fullPath:a,language:r,breadcrumb:o,socialDescription:s,socialImage:u,socialTitle:p}=e,{baseUrl:l,cloudinaryName:m,griddoVersion:x,siteLangs:g,siteMetadata:h,siteOptions:y,siteScript:_,siteSlug:E,socials:O,theme:R,navigations:{header:k,footer:q}}=t;e.breadcrumb=o,e.siteSlug=E,e.apiUrl=l,e.publicApiUrl=t.publicBaseUrl,e.instance=t.instance;let le=g.find(({id:Y})=>Y===e?.language)?.locale.replace(/_/g,"-"),pe=W0(e),I=V0({socialDescription:s,socialImage:u,socialTitle:p}),B=a.compose,G=new Date().toString();return{path:B,size:void 0,context:{id:n,title:i,fullPath:a,locale:le,languageId:r,theme:R,siteMetadata:h,pageMetadata:pe,openGraph:I,socials:O,siteLangs:g,cloudinaryName:m,siteOptions:y,griddoVersion:x,renderDate:G,siteScript:_,header:k,footer:q,page:e}}}async function xx(e,t){return await cc(e,t)}async function vx({page:e,pages:t,isRoot:n=!1,defaultLang:i,template:a,totalQueriedItems:r},o){let s=t.map(async(u,p)=>{let l=p===0,m=p+1,{domainUrl:x,compose:g}=e.fullPath,h={...e,id:Number.parseInt(`-${e.id}${p}`),fullPath:{...e.fullPath,compose:sc(g,m,{addEndingSlash:!0})},fullUrl:sc(e.fullUrl,m,{addEndingSlash:!0}),slug:sc(e.slug,m),title:fx(e.title,m),metaTitle:fx(e.metaTitle||"",m),disableHrefLangs:m>1,template:{...a,isFirstPage:l,pageNumber:m,totalPages:t.length,baseLink:`${x}${g}`,queriedItems:u,totalQueriedItems:r?.length},isRoot:n,defaultLang:i};return await cc(h,o)});return Promise.all(s)}function gx(e,t){let{multiPageElements:n,...i}=e,a=JSON.parse(JSON.stringify(n));a.find(({sectionSlug:o})=>o==="/")||a.push({});let r=a.map(async(o,s)=>{let u=JSON.parse(JSON.stringify(i)),{sectionSlug:p="/",title:l="",metaTitle:m="",metaDescription:x=""}=o,g=typeof l=="string"?l:l.content,h=u.fullPath.compose||"",y=u.fullUrl.endsWith("/")?u.fullUrl.slice(0,-1):u.fullUrl,_=p?.replace(/\//g,""),O=p==="/"?_:`${_}/`,R=h.endsWith("/")?"":"/",k=`${h}${R}${O}`;return g.trim()&&(u.title=g),x.trim()&&(u.metaDescription=x),u.id=Number.parseInt(`-${u.id}${s}`),u.fullUrl=`${y}/${O}`,u.fullPath.compose=k,u.slug=k,u.template.activeSectionSlug=p,u.template.activeSectionBase=y,u.metaTitle=m.trim()||g.trim()||u.metaTitle,await cc(u,t)});return Promise.all(r)}function bx(e){return new Promise(n=>{let i=(a,r=0)=>{if(!(!a||typeof a!="object")){for(let o in a){let s=a[o],u=s||typeof s=="object",p=JSON.stringify(s).includes('"hasGriddoMultiPage":true');if(!u||!p)continue;let{component:l,hasGriddoMultiPage:m,elements:x}=s;l&&m&&n(x||[]),i(s,r+1)}r||n(null)}};i([e])})}function Y0(e,t,n){return t?.slice(e*(n-1),e*n)}function J0(e,t){let n=Math.ceil(t.length/e)||1;return Array.from({length:n},(a,r)=>r+1)?.map(a=>Y0(e,t,a))}function yx(e){let t=e.queriedItems||[],n=e?.itemsPerPage||H0;return J0(n,t)}function mx(e){return e.replace(/\/+$/,"/")}function sc(e,t,n){let i=e.endsWith("/")?"":"/",a=n?.addEndingSlash?"/":"";return t<=1?mx(`${e}${a}`):mx(`${e}${i}${t}${a}`)}function fx(e,t){return!e||t<=1?e:`${e} - ${t}`}var _x=me(),K0=new Date().valueOf().toString();async function Ex(e){ud(),console.info(`API calls with ${N.GRIDDO_API_CONCURRENCY_COUNT} threads`);let{__cx:t}=_x.paths(),{griddoVersion:n}=_x,i=uc.default.join(t,"store");try{let a=[],r={},{sitesToPublish:o,sitesToUnpublish:s}=await Xf(e),u=o.length>0||s.length>0;u||console.warn(`There are no sites to update in the domain ${e}`),console.info(`Sites to publish: ${ac(o)}`),console.info(`Sites to unpublish: ${ac(s)}`),await Hf(s);for(let p of o){let{id:l,slug:m,theme:x,favicon:g,changedPages:h=[]}=p,{siteInfo:y,validPagesIds:_,siteHash:E,unpublishHashes:O,siteLangs:R,defaultLang:k,headers:q,footers:J,socials:le}=await Vf(l),{cloudinaryName:pe,useMetaTitle:I,useMetaKeywords:B,showBasicMetaRobots:G,avoidHrefLangsOnCanonicals:Q,avoidSelfReferenceCanonicals:Y,avoidHrefLangXDefault:$,avoidDebugMetas:P}=await dx();r[l]={siteHash:E,unpublishHashes:O,publishHashes:[]};let W=new sr;W.navigations={headers:q,footers:J},p.languages=R;let C=Ff(l,E),T=y.siteScript,L={siteUrl:y.slug,title:y.name,favicon:g},he={baseUrl:N.GRIDDO_API_URL,publicBaseUrl:N.GRIDDO_PUBLIC_API_URL,instance:N.GRIDDO_REACT_APP_INSTANCE,siteSlug:m,theme:x,siteMetadata:L,socials:le,siteLangs:R,cloudinaryName:pe,griddoVersion:n,siteOptions:{useMetaTitle:I,useMetaKeywords:B,showBasicMetaRobots:G,avoidHrefLangsOnCanonicals:Q,avoidSelfReferenceCanonicals:Y,avoidHrefLangXDefault:$,avoidDebugMetas:P},siteScript:T};Qt(`${p.name} site`),wx.default.mkdirSync(uc.default.join(i,l.toString()),{recursive:!0});let oe=async(at,de)=>{let hn=[],rt=await qf(de,C);if(!rt)return;a.push(de);let _t=JSON.parse(JSON.stringify(he));_t.navigations=W.getPageNavigations(rt);let Pt=await px({page:rt,cacheKey:K0}),Li=await bx(Pt),xn=rt?.mode==="list",Wt=!xn&&Li,pr=!Wt&&!xn;if(xn){let Ke={page:rt,pages:yx(Pt),isRoot:!1,defaultLang:k,template:Pt,totalQueriedItems:Pt.queriedItems};hn=await vx(Ke,_t)}if(Wt){let Ke=rt;Ke.template=Pt,Ke.multiPageElements=Li,Ke.defaultLang=k,hn=await gx(Ke,_t)}if(pr){let Ke=rt;Ke.template=Pt,Ke.defaultLang=k,hn=[await xx(Ke,_t)]}rt.hash!==null&&r[l].publishHashes.push(rt.hash),ld(at,hn)},{pagesMissingInStore:Se,pagesToDeleteFromStore:ft,pagesToWriteToStore:je}=await dd({sitesToPublish:o,validPagesIds:_,changedPages:h,siteDirName:l.toString()});pd(l.toString(),ft);let Ee=(0,Sx.default)(N.GRIDDO_API_CONCURRENCY_COUNT),Vt=je.map(at=>Ee(()=>oe(l.toString(),at)));Z(`Store site: ${p.name}`),Z(`${_.length} valid pages from API`),Z(`changed ${h.length} pages from API`),Z(`deleted ${ft.length} pages from store`),Z(`missing ${Se.length} pages in store`),Z(`write ${je.length} pages to store`),await Promise.all(Vt)}u?Uo({buildProcessData:r,createdPages:a,sitesToPublish:o}):(oh(),Uo({buildProcessData:r,createdPages:[],sitesToPublish:[]}))}catch(a){console.error(a.message),process.exit(1)}}async function Rx(e){Pf(),await Ex(e),ah()}Rt();$t();async function Dx(){return await Ye({endpoint:ge.DOMAINS})}async function Cx(){await Dt.login();let e=await Dx();return e.length||_e(xd),Z(`getting domains names (${e.length})`),Q0(e)}function Q0(e){let t=e.filter(({slug:n})=>!!n).map(({slug:n})=>n.replace("/",""));return[...new Set(t)]}var Je=F(require("node:fs")),yt=F(require("node:path")),Ge=F(Kt());Rt();$t();var Z0=me(),lc=e=>{if(!Ge.default.statSync(e).isDirectory())return;let n=Ge.default.readdirSync(e);if(n.length>0){let a=n.length,r=n.filter(o=>yt.default.extname(o).toLowerCase()===".xml").length;if(a===r){for(let o of n){let s=yt.default.join(e,o);Ge.default.rmSync(s)}n=Ge.default.readdirSync(e)}for(let o of n){let s=yt.default.join(e,o);lc(s)}n=Ge.default.readdirSync(e)}if(n.length===0){Ge.default.rmdirSync(e);return}Z("remove empty site directories")};function Ox(e,t){for(let n of e)try{Je.default.existsSync(n)||(Je.default.mkdirSync(n,{recursive:!0,...t}),Z(`create directory: ${n}`))}catch(i){_e(nn,i)}}function Tx(e,t){try{Je.default.existsSync(e)&&(Je.default.renameSync(e,t),Z(`rename ${e} to ${t}`))}catch(n){_e(nn,n)}}function pc(e,t,n,i={withBackup:!1}){let{withBackup:a}=i;for(let r of n){let o=yt.default.join(e,r),s=yt.default.join(t,r);if(!Ge.default.existsSync(o)){console.log(`(Maybe first render) Source directory does not exist: ${o}`);continue}a&&(Ix(s),Z(`create backup: ${s}`));try{Ge.default.existsSync(s)&&(Je.default.rmSync(s,{recursive:!0,force:!0}),Z(`clean destination: ${s}`)),Je.default.cpSync(o,s,{recursive:!0,preserveTimestamps:!0}),Z(`copy: ${o} to ${s}`),a&&(Ax(s),Z(`delete backup: ${s}`))}catch(u){a&&(Px(s),console.log("Backup has been restored.")),_e(nn,u)}}}function Kn(e,t,n,i){let{override:a,withBackup:r}=i||{};for(let o of n){let s=yt.default.join(e,o),u=yt.default.join(t,o);if(Ge.default.existsSync(s)){r&&Ix(u);try{a&&Ge.default.existsSync(u)&&Je.default.rmSync(u,{recursive:!0,force:!0}),Je.default.renameSync(s,u),Z(`moved: ${s} to ${u}`),r&&Ax(u)}catch(p){r&&(Px(u),console.log("Backup has been restored.")),_e(nn,p)}}}}function dc(e){for(let t of e)if(t)try{Ge.default.existsSync(t)&&(Je.default.rmSync(t,{recursive:!0,force:!0}),Z(`removed directory: ${t}`))}catch(n){_e(nn,n)}}function Px(e,t="-BACKUP"){let n=e+t;try{Je.default.renameSync(n,e),console.log(`Backup ${n} has been restored`)}catch{console.log(`Error while delete ${n} backup`)}}function Ax(e,t="-BACKUP"){let n=e+t;if(Ge.default.existsSync(n))try{Je.default.rmSync(n,{recursive:!0,force:!0}),console.log(`Backup ${n} has been deleted`)}catch{console.log(`Error while delete ${n} backup`)}}function Ix(e,t="-BACKUP"){let n=e+t;if(Ge.default.existsSync(e)){if(Ge.default.existsSync(n)){console.log(`Destination ${n} already exists`);return}try{Je.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`),_e(nn,i)}}}async function kx(){let{__cx:e}=Z0.paths(),t=yt.default.join(e,"store");try{let n=$o(t);for(let i of n)yt.default.basename(i).startsWith("-")&&Je.default.unlinkSync(i)}catch{console.info("`store` folder does not exist. Skipping multipage or static list template cleaning.")}}var cr=F(require("node:fs")),ur=F(require("node:path"));Rt();$t();var mc=me();function Fx(){let{__cx:e}=mc.paths(),t=ur.default.join(e,".render-sentinel");cr.default.writeFileSync(t,new Date().toISOString())}function jx(){let{__cx:e}=mc.paths(),t=ur.default.join(e,".render-sentinel");cr.default.unlinkSync(t)}function Lx(){let{__cx:e}=mc.paths(),t=ur.default.join(e,".render-sentinel");cr.default.existsSync(t)||_e(vd)}var eR=me();async function tR(){Np("gatsby");let e=await Cx();for(let t of e)await nR(t);if(N.GRIDDO_ALERT_FEATURE){let t=ji.get("API_RESPONSE_TOO_BIG");if(t.entries.length<1)return;da(`
|
|
96
|
+
`),console.log(u),console.log(),o++}o===s&&_e(fd(s,e))}async function rh(e){await Wf(),await Yf(),await Jf.writeFiles(e)}function oh(){let{__cx:e}=ih.paths(),t=mn.default.join(e,"store"),a=bt.default.readdirSync(t).filter(r=>r!=="metadata").map(r=>mn.default.join(t,r));for(let r of a)bt.default.rmSync(r,{recursive:!0,force:!0})}sh.default.config();var tt=process.env.GRIDDO_API_URL||process.env.API_URL,ar=process.env.GRIDDO_PUBLIC_API_URL||process.env.PUBLIC_API_URL,ch=process.env.botEmail,uh=process.env.botPassword,lh=Number.parseInt(process.env.GRIDDO_API_CONCURRENCY_COUNT||"10"),ph=pt(process.env.GRIDDO_RENDER_ALL_SITES||process.env.updateAllSites),dh=Number.parseInt(process.env.GRIDDO_RENDER_SITE||""),mh=(process.env.GRIDDO_RENDER_PAGES||"").split(",").map(e=>Number.parseInt(e)).filter(Boolean),fh=pt(process.env.GRIDDO_SKIP_BUILD_CHECKS),hh=pt(process.env.GRIDDO_DEBUG_LOGS),xh=pt(process.env.GRIDDO_BUILD_LOGS),vh=pt(process.env.GRIDDO_RENDER_BREAKPOINTS_FEATURE),gh=pt(process.env.GRIDDO_SSG_VERBOSE_LOGS),bh=pt(process.env.GRIDGRIDDO_SEARCH_FEATURE_FEATURE),yh=process.env.GRIDDO_ASSET_PREFIX||process.env.ASSET_PREFIX,_h=process.env.GRIDDO_REACT_APP_INSTANCE||process.env.REACT_APP_INSTANCE,wh=pt(process.env.GRIDDO_AI_EMBEDDINGS),Sh=pt(process.env.GRIDDO_VERBOSE_LOGS),Eh=pt(process.env.GRIDDO_ALERT_FEATURE),Rh=Number.parseInt(process.env.GRIDDO_API_MAX_RESPONSE_SIZE||"81920"),Dh=Number.parseInt(process.env.GRIDDO_SSG_MAX_PAGE_SIZE||"524288"),Ch=Number.parseInt(process.env.GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS||"1"),Oh=Number.parseInt(process.env.GRIDDO_CLOSE_LIFECYCLE_MAX_ATTEMPTS||"1"),Th=Number.parseInt(process.env.GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS||"1"),Ph=Number.parseInt(process.env.GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS||"1"),Ah=Number.parseInt(process.env.GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS||"1"),Ih=Number.parseInt(process.env.GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS||"2"),kh=Number.parseInt(process.env.GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS||"1"),Fh=Number.parseInt(process.env.GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS||"4"),jh=Number.parseInt(process.env.GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS||"1"),Lh=process.env.GRIDDO_CX_FIXTURES_DOMAIN_NAMES,Nh=process.env.GRIDDO_CX_FIXTURES_SITE_NAMES;var Ht=`${tt}/site/`,qh=`${tt}/ai/embeddings`,Uh=`${ar}/alert`,$h=`${tt}/domains`,Bh=`${tt}/sites/all`,Mh=`${tt}/page`,Gh=`${tt}/login_check`,zh=`${tt}/debug/reset-render`,Xh=`${tt}/domains/robots`,Hh=`${tt}/search`,Vh=`${tt}/settings`,Wh=[Ht,"/build/end"],Yh=[Ht,"/build/start"],Jh=[Ht,"/pages?pagination=false"],Kh=[Ht,"/distributor"],Qh=[Ht,"/sitemap"],Zh=[Ht,"/all"],ex=[Ht,"/languages"],tx=[Ht,"/socials"];var ge={ALERT:Uh,AI_EMBEDDINGS:qh,BUILD_END:Wh,BUILD_START:Yh,DOMAINS:$h,GET_ALL:Bh,GET_PAGE:Mh,GET_PAGES:Jh,GET_REFERENCE_FIELD_DATA:Kh,GET_SITEMAP:Qh,INFO:Zh,LANGUAGES:ex,LOGIN:Gh,RESET_RENDER:zh,ROBOTS:Xh,SEARCH:Hh,SETTINGS:Vh,SOCIALS:tx},N={GRIDDO_AI_EMBEDDINGS:wh,GRIDDO_ALERT_FEATURE:Eh,GRIDDO_API_CONCURRENCY_COUNT:lh,GRIDDO_API_MAX_RESPONSE_SIZE:Rh,GRIDDO_API_URL:tt,GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS:jh,GRIDDO_ASSET_PREFIX:yh,GRIDDO_BOT_PASSWORD:uh,GRIDDO_BOT_USER:ch,GRIDDO_BUILD_LOGS:xh,GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS:Ch,GRIDDO_CLOSE_LIFECYCLE_MAX_ATTEMPTS:Oh,GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS:Ah,GRIDDO_DEBUG_LOGS:hh,GRIDDO_FIXTURES_DOMAIN_NAMES:Lh,GRIDDO_FIXTURES_SITE_NAMES:Nh,GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS:Fh,GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS:Th,GRIDDO_PUBLIC_API_URL:ar,GRIDDO_REACT_APP_INSTANCE:_h,GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS:kh,GRIDDO_RENDER_ALL_SITES:ph,GRIDDO_RENDER_BREAKPOINTS_FEATURE:vh,GRIDDO_RENDER_PAGES:mh,GRIDDO_RENDER_SITE:dh,GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS:Ph,GRIDDO_SEARCH_FEATURE:bh,GRIDDO_SKIP_BUILD_CHECKS:fh,GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS:Ih,GRIDDO_SSG_MAX_PAGE_SIZE:Dh,GRIDDO_SSG_VERBOSE_LOGS:gh,GRIDDO_VERBOSE_LOGS:Sh};Rt();$t();ix.default.config();var ax=me();function rx(e){let{proDomain:t}=me();if(!N.GRIDDO_ASSET_PREFIX||!e||!e.startsWith(t))return"";let n=`${N.GRIDDO_ASSET_PREFIX}/${e}`;return Q(`Reading process.env.GRIDDO_ASSET_PREFIX, ${N.GRIDDO_ASSET_PREFIX}`),Q(`Setting the asset prefix with the domain concatenated, ${n}`),n}function ox(e){Q(`read assetPrefixWithDomain, ${e}`),Q(`using this NODE_OPTIONS in gatsby command: ${process.env.NODE_OPTIONS}`);let{__ssg:t}=ax.paths(),n=(0,nx.spawnSync)("yarn",["gatsby-build",N.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})});n.status!==0&&_e(hd(n))}async function sx(e,t){let{__cx:n,__ssg:i}=ax.paths(e),a=Tt.default.join(n,"dist"),r=Tt.default.join(n,"assets"),o=Tt.default.join(n,"dist",e),s=Tt.default.join(i,"public"),u=mt.default.readdirSync(s).filter(y=>Tt.default.extname(y)===".js"||Tt.default.extname(y)===".json"||Tt.default.extname(y)===".css"),p=`${s}/page-data`,l=`${r}/page-data`,m=Tt.default.join(i,"static"),x=r,g=`${a}/static`,h=`${r}/static`;try{mt.default.mkdirSync(r,{recursive:!0}),mt.default.copySync(s,a,{preserveTimestamps:!0}),t&&(mt.default.copySync(p,l,{preserveTimestamps:!0}),mt.default.existsSync(m)&&mt.default.copySync(m,x,{overwrite:!1,preserveTimestamps:!0}),mt.default.copySync(g,h,{overwrite:!1,preserveTimestamps:!0}),mt.default.existsSync(m)&&mt.default.copySync(m,o,{overwrite:!1,preserveTimestamps:!0}),u.map(async y=>{let _=`${s}/${y}`,E=`${r}/${y}`;mt.default.copySync(_,E,{preserveTimestamps:!0})}))}catch(y){console.error(y)}}var fn=F(require("node:path"));function $0(e){let{__cx:t,__exports:n,__cache:i}=e;return{initials:[n,i,fn.default.join(t,"store"),fn.default.join(t,"apiCache")],disposables:[fn.default.join(t,"store"),fn.default.join(t,"apiCache"),fn.default.join(t,"render-metadata.json"),fn.default.join(t,"dist")],cacheables:["apiCache","store"],archivables:["dist","assets"]}}var rr=$0;var or=F(require("node:path"));function B0(e){let{__ssg:t}=e;return{disposables:[or.default.join(t,"public"),or.default.join(t,"static"),or.default.join(t,".cache")],cacheables:[".cache"],initials:[],archivables:[]}}var cx=B0;function ux(e,t){let{cxPaths:n}=t,i={gatsby:cx(n)};return{cx:rr(n),[e]:i[e],all:{initials:[...rr(n).initials,...i[e].initials],disposables:[...rr(n).disposables,...i[e].disposables]}}}async function lx({area:e,description:t,fullData:n,instantNotification:i=!1,level:a}){let r=ge.ALERT,o={level:a,area:e,description:t,fullData:n,instantNotification:i};try{await Xn.post(r,o,{headers:{"Content-Type":"application/json",Connection:"close"}})}catch(s){console.error("Error creating Griddo alert:",s)}}var wx=F(require("node:fs")),uc=F(require("node:path")),Sx=F(Xr());var sr=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 r=t.find(o=>o.language===i&&o.navigationLanguages?.find(s=>s.navigationId===n))||t.find(o=>o.id===n);return r?{...r}: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:r},templateConfig:{defaultHeader:o,defaultFooter:s,templates:u}}=t,p=h=>{let y=h.find(_=>typeof _=="number");return typeof y=="number"?y:null},l=p([n,u?.[r]?.defaultHeader,o]),m=p([i,u?.[r]?.defaultFooter,s]),x=l?this.getPageHeader(l,a):l===0?null:this._defaultHeaders[a],g=m?this.getPageFooter(m,a):m===0?null:this._defaultFooters[a];return{header:x,footer:g}}};function M0(e,t){let{order:n,sources:i,quantity:a,mode:r,fixed:o,fullRelations:s=!1,allLanguages:u=!1,preferenceLanguage:p=!1,referenceId:l,fields:m}=e;return r==="auto"?{mode:r,order:n,sources:i,quantity:a,fullRelations:s,allLanguages:u,preferenceLanguage:p,fields:m}:r==="manual"?{mode:r,fixed:o,fullRelations:s,fields:m}:r==="navigation"?{mode:r,order:n,quantity:a,fullRelations:s,referenceId:l||t?.structuredDataContent?.id,fields:m}:(console.log(`Error: ReferenceField mode: ${r} is not recognized on page ${t?.id}.`),e)}async function G0(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:r}=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 o=M0(n,t);return await Bf(t,o,i,a,r)}async function px({page:e,cacheKey:t=""}){try{let{template:n}=e,i=async(o,s=1)=>{if(!(!o||typeof o!="object"||!(JSON.stringify(o).includes('"hasDistributorData":true')||JSON.stringify(o).includes('"getStaticData":true'))))for(let p in o){if(p==="queriedItems")continue;let m=o[p];if(!m||typeof m!="object")continue;(m.hasDistributorData||m.getStaticData)&&(m.queriedItems=await G0({page:e,cacheKey:t,component:m})),await i(m,s+1)}};return await(async o=>(await i([o]),o))(n)}catch(n){console.error(`Error in getReferenceFieldData ${n}`),process.exit(1)}}async function dx(){return await Ye({endpoint:ge.SETTINGS})}var hx=F(ni());function oc(e,t,n,i="jpg"){let a=typeof e=="string"?e:e?.url;return a?a.split("/")[2].includes("cloudinary.com")?X0(a,`c_fill,w_${t},h_${n}`):z0(a,`f/${i}/w/${t}/h/${n}`):null}function z0(e,t){let n=e.split("/"),i=n.slice(0,-1).join("/"),a=n.slice(-1)[0];return`${i}/${t}/${a}`}function X0(e,t){let n=e.replace("https://",""),i=n.split("/").slice(0,4).join("/"),a=n.replace(i,"");return`https://${i}/${t}${a}`}hx.default.config();var H0=25;function V0({socialTitle:e,socialDescription:t,socialImage:n}){return{type:"website",title:e,description:t,image:n?oc(n,1280,768):"",twitterImage:n?oc(n,1280,768):""}}function W0(e){let{title:t,metaTitle:n,metaDescription:i,canonicalURL:a,locale:r,url:o,isIndexed:s,follow:u,metasAdvanced:p,pageLanguages:l,fullUrl:m,metaKeywords:x}=e,g=p?.split(",").filter(Boolean).map(h=>h.trim().toLowerCase())||[];return{title:(n||t||"").trim(),description:i,canonical:a?.trim()&&a!==m?a.trim():s?m:void 0,locale:r,url:o,index:s?"index":"noindex",follow:u?"follow":"nofollow",translate:g.includes("notranslate")?"notranslate":"",metasAdvanced:g.filter(h=>h!=="notranslate").join(),pageLanguages:l,metaKeywords:x?.filter(Boolean).map(h=>h.replace(/"/g,"'")).join(", ")}}async function cc(e,t){let{id:n,title:i,fullPath:a,language:r,breadcrumb:o,socialDescription:s,socialImage:u,socialTitle:p}=e,{baseUrl:l,cloudinaryName:m,griddoVersion:x,siteLangs:g,siteMetadata:h,siteOptions:y,siteScript:_,siteSlug:E,socials:O,theme:R,navigations:{header:k,footer:q}}=t;e.breadcrumb=o,e.siteSlug=E,e.apiUrl=l,e.publicApiUrl=t.publicBaseUrl,e.instance=t.instance;let le=g.find(({id:Y})=>Y===e?.language)?.locale.replace(/_/g,"-"),pe=W0(e),I=V0({socialDescription:s,socialImage:u,socialTitle:p}),B=a.compose,G=new Date().toString();return{path:B,size:void 0,context:{id:n,title:i,fullPath:a,locale:le,languageId:r,theme:R,siteMetadata:h,pageMetadata:pe,openGraph:I,socials:O,siteLangs:g,cloudinaryName:m,siteOptions:y,griddoVersion:x,renderDate:G,siteScript:_,header:k,footer:q,page:e}}}async function xx(e,t){return await cc(e,t)}async function vx({page:e,pages:t,isRoot:n=!1,defaultLang:i,template:a,totalQueriedItems:r},o){let s=t.map(async(u,p)=>{let l=p===0,m=p+1,{domainUrl:x,compose:g}=e.fullPath,h={...e,id:Number.parseInt(`-${e.id}${p}`),fullPath:{...e.fullPath,compose:sc(g,m,{addEndingSlash:!0})},fullUrl:sc(e.fullUrl,m,{addEndingSlash:!0}),slug:sc(e.slug,m),title:fx(e.title,m),metaTitle:fx(e.metaTitle||"",m),disableHrefLangs:m>1,template:{...a,isFirstPage:l,pageNumber:m,totalPages:t.length,baseLink:`${x}${g}`,queriedItems:u,totalQueriedItems:r?.length},isRoot:n,defaultLang:i};return await cc(h,o)});return Promise.all(s)}function gx(e,t){let{multiPageElements:n,...i}=e,a=JSON.parse(JSON.stringify(n));a.find(({sectionSlug:o})=>o==="/")||a.push({});let r=a.map(async(o,s)=>{let u=JSON.parse(JSON.stringify(i)),{sectionSlug:p="/",title:l="",metaTitle:m="",metaDescription:x=""}=o,g=typeof l=="string"?l:l.content,h=u.fullPath.compose||"",y=u.fullUrl.endsWith("/")?u.fullUrl.slice(0,-1):u.fullUrl,_=p?.replace(/\//g,""),O=p==="/"?_:`${_}/`,R=h.endsWith("/")?"":"/",k=`${h}${R}${O}`;return g.trim()&&(u.title=g),x.trim()&&(u.metaDescription=x),u.id=Number.parseInt(`-${u.id}${s}`),u.fullUrl=`${y}/${O}`,u.fullPath.compose=k,u.slug=k,u.template.activeSectionSlug=p,u.template.activeSectionBase=y,u.metaTitle=m.trim()||g.trim()||u.metaTitle,await cc(u,t)});return Promise.all(r)}function bx(e){return new Promise(n=>{let i=(a,r=0)=>{if(!(!a||typeof a!="object")){for(let o in a){let s=a[o],u=s||typeof s=="object",p=JSON.stringify(s).includes('"hasGriddoMultiPage":true');if(!u||!p)continue;let{component:l,hasGriddoMultiPage:m,elements:x}=s;l&&m&&n(x||[]),i(s,r+1)}r||n(null)}};i([e])})}function Y0(e,t,n){return t?.slice(e*(n-1),e*n)}function J0(e,t){let n=Math.ceil(t.length/e)||1;return Array.from({length:n},(a,r)=>r+1)?.map(a=>Y0(e,t,a))}function yx(e){let t=e.queriedItems||[],n=e?.itemsPerPage||H0;return J0(n,t)}function mx(e){return e.replace(/\/+$/,"/")}function sc(e,t,n){let i=e.endsWith("/")?"":"/",a=n?.addEndingSlash?"/":"";return t<=1?mx(`${e}${a}`):mx(`${e}${i}${t}${a}`)}function fx(e,t){return!e||t<=1?e:`${e} - ${t}`}var _x=me(),K0=new Date().valueOf().toString();async function Ex(e){ud(),console.info(`API calls with ${N.GRIDDO_API_CONCURRENCY_COUNT} threads`);let{__cx:t}=_x.paths(),{griddoVersion:n}=_x,i=uc.default.join(t,"store");try{let a=[],r={},{sitesToPublish:o,sitesToUnpublish:s}=await Xf(e),u=o.length>0||s.length>0;u||console.warn(`There are no sites to update in the domain ${e}`),console.info(`Sites to publish: ${ac(o)}`),console.info(`Sites to unpublish: ${ac(s)}`),await Hf(s);for(let p of o){let{id:l,slug:m,theme:x,favicon:g,changedPages:h=[]}=p,{siteInfo:y,validPagesIds:_,siteHash:E,unpublishHashes:O,siteLangs:R,defaultLang:k,headers:q,footers:J,socials:le}=await Vf(l),{cloudinaryName:pe,useMetaTitle:I,useMetaKeywords:B,showBasicMetaRobots:G,avoidHrefLangsOnCanonicals:Z,avoidSelfReferenceCanonicals:Y,avoidHrefLangXDefault:$,avoidDebugMetas:P}=await dx();r[l]={siteHash:E,unpublishHashes:O,publishHashes:[]};let W=new sr;W.navigations={headers:q,footers:J},p.languages=R;let C=Ff(l,E),T=y.siteScript,L={siteUrl:y.slug,title:y.name,favicon:g},he={baseUrl:N.GRIDDO_API_URL,publicBaseUrl:N.GRIDDO_PUBLIC_API_URL,instance:N.GRIDDO_REACT_APP_INSTANCE,siteSlug:m,theme:x,siteMetadata:L,socials:le,siteLangs:R,cloudinaryName:pe,griddoVersion:n,siteOptions:{useMetaTitle:I,useMetaKeywords:B,showBasicMetaRobots:G,avoidHrefLangsOnCanonicals:Z,avoidSelfReferenceCanonicals:Y,avoidHrefLangXDefault:$,avoidDebugMetas:P},siteScript:T};Qt(`${p.name} site`),wx.default.mkdirSync(uc.default.join(i,l.toString()),{recursive:!0});let oe=async(at,de)=>{let hn=[],rt=await qf(de,C);if(!rt)return;a.push(de);let _t=JSON.parse(JSON.stringify(he));_t.navigations=W.getPageNavigations(rt);let Pt=await px({page:rt,cacheKey:K0}),Li=await bx(Pt),xn=rt?.mode==="list",Wt=!xn&&Li,pr=!Wt&&!xn;if(xn){let Ke={page:rt,pages:yx(Pt),isRoot:!1,defaultLang:k,template:Pt,totalQueriedItems:Pt.queriedItems};hn=await vx(Ke,_t)}if(Wt){let Ke=rt;Ke.template=Pt,Ke.multiPageElements=Li,Ke.defaultLang=k,hn=await gx(Ke,_t)}if(pr){let Ke=rt;Ke.template=Pt,Ke.defaultLang=k,hn=[await xx(Ke,_t)]}rt.hash!==null&&r[l].publishHashes.push(rt.hash),ld(at,hn)},{pagesMissingInStore:Se,pagesToDeleteFromStore:ft,pagesToWriteToStore:je}=await dd({sitesToPublish:o,validPagesIds:_,changedPages:h,siteDirName:l.toString()});pd(l.toString(),ft);let Ee=(0,Sx.default)(N.GRIDDO_API_CONCURRENCY_COUNT),Vt=je.map(at=>Ee(()=>oe(l.toString(),at)));Q(`Store site: ${p.name}`),Q(`${_.length} valid pages from API`),Q(`changed ${h.length} pages from API`),Q(`deleted ${ft.length} pages from store`),Q(`missing ${Se.length} pages in store`),Q(`write ${je.length} pages to store`),await Promise.all(Vt)}u?Uo({buildProcessData:r,createdPages:a,sitesToPublish:o}):(oh(),Uo({buildProcessData:r,createdPages:[],sitesToPublish:[]}))}catch(a){console.error(a.message),process.exit(1)}}async function Rx(e){Pf(),await Ex(e),ah()}Rt();$t();async function Dx(){return await Ye({endpoint:ge.DOMAINS})}async function Cx(){await Dt.login();let e=await Dx();return e.length||_e(xd),Q(`getting domains names (${e.length})`),Q0(e)}function Q0(e){let t=e.filter(({slug:n})=>!!n).map(({slug:n})=>n.replace("/",""));return[...new Set(t)]}var Je=F(require("node:fs")),yt=F(require("node:path")),Ge=F(Kt());Rt();$t();var Z0=me(),lc=e=>{if(!Ge.default.statSync(e).isDirectory())return;let n=Ge.default.readdirSync(e);if(n.length>0){let a=n.length,r=n.filter(o=>yt.default.extname(o).toLowerCase()===".xml").length;if(a===r){for(let o of n){let s=yt.default.join(e,o);Ge.default.rmSync(s)}n=Ge.default.readdirSync(e)}for(let o of n){let s=yt.default.join(e,o);lc(s)}n=Ge.default.readdirSync(e)}if(n.length===0){Ge.default.rmdirSync(e);return}Q("remove empty site directories")};function Ox(e,t){for(let n of e)try{Je.default.existsSync(n)||(Je.default.mkdirSync(n,{recursive:!0,...t}),Q(`create directory: ${n}`))}catch(i){_e(nn,i)}}function Tx(e,t){try{Je.default.existsSync(e)&&(Je.default.renameSync(e,t),Q(`rename ${e} to ${t}`))}catch(n){_e(nn,n)}}function pc(e,t,n,i={withBackup:!1}){let{withBackup:a}=i;for(let r of n){let o=yt.default.join(e,r),s=yt.default.join(t,r);if(!Ge.default.existsSync(o)){console.log(`(Maybe first render) Source directory does not exist: ${o}`);continue}a&&(Ix(s),Q(`create backup: ${s}`));try{Ge.default.existsSync(s)&&(Je.default.rmSync(s,{recursive:!0,force:!0}),Q(`clean destination: ${s}`)),Je.default.cpSync(o,s,{recursive:!0,preserveTimestamps:!0}),Q(`copy: ${o} to ${s}`),a&&(Ax(s),Q(`delete backup: ${s}`))}catch(u){a&&(Px(s),console.log("Backup has been restored.")),_e(nn,u)}}}function Kn(e,t,n,i){let{override:a,withBackup:r}=i||{};for(let o of n){let s=yt.default.join(e,o),u=yt.default.join(t,o);if(Ge.default.existsSync(s)){r&&Ix(u);try{a&&Ge.default.existsSync(u)&&Je.default.rmSync(u,{recursive:!0,force:!0}),Je.default.renameSync(s,u),Q(`moved: ${s} to ${u}`),r&&Ax(u)}catch(p){r&&(Px(u),console.log("Backup has been restored.")),_e(nn,p)}}}}function dc(e){for(let t of e)if(t)try{Ge.default.existsSync(t)&&(Je.default.rmSync(t,{recursive:!0,force:!0}),Q(`removed directory: ${t}`))}catch(n){_e(nn,n)}}function Px(e,t="-BACKUP"){let n=e+t;try{Je.default.renameSync(n,e),console.log(`Backup ${n} has been restored`)}catch{console.log(`Error while delete ${n} backup`)}}function Ax(e,t="-BACKUP"){let n=e+t;if(Ge.default.existsSync(n))try{Je.default.rmSync(n,{recursive:!0,force:!0}),console.log(`Backup ${n} has been deleted`)}catch{console.log(`Error while delete ${n} backup`)}}function Ix(e,t="-BACKUP"){let n=e+t;if(Ge.default.existsSync(e)){if(Ge.default.existsSync(n)){console.log(`Destination ${n} already exists`);return}try{Je.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`),_e(nn,i)}}}async function kx(){let{__cx:e}=Z0.paths(),t=yt.default.join(e,"store");try{let n=$o(t);for(let i of n)yt.default.basename(i).startsWith("-")&&Je.default.unlinkSync(i)}catch{console.info("`store` folder does not exist. Skipping multipage or static list template cleaning.")}}var cr=F(require("node:fs")),ur=F(require("node:path"));Rt();$t();var mc=me();function Fx(){let{__cx:e}=mc.paths(),t=ur.default.join(e,".render-sentinel");cr.default.writeFileSync(t,new Date().toISOString())}function jx(){let{__cx:e}=mc.paths(),t=ur.default.join(e,".render-sentinel");cr.default.unlinkSync(t)}function Lx(){let{__cx:e}=mc.paths(),t=ur.default.join(e,".render-sentinel");cr.default.existsSync(t)||_e(vd)}var eR=me();async function tR(){Np("gatsby");let e=await Cx();for(let t of e)await nR(t);if(N.GRIDDO_ALERT_FEATURE){let t=ji.get("API_RESPONSE_TOO_BIG");if(t.entries.length<1)return;da(`
|
|
97
97
|
Render register report
|
|
98
98
|
`),da(t),da(),lx({description:`API response size is too large (${N.GRIDDO_API_MAX_RESPONSE_SIZE}KB).`,area:"Griddo",level:"W",fullData:{output:t,date:new Date().toISOString()}})}}async function nR(e){Tn(`Initializing render for the domain ${e}`),Fx();let t=eR.paths(e),{all:n,gatsby:i,cx:a}=ux("gatsby",{cxPaths:t}),{__ssg:r,__exports:o,__cache:s,__cx:u,__components:p}=t,l=rx(e),m=!!l&&l!=="";await dt("Clean",{steps:[()=>dc(n.disposables)]}),await dt("Prepare",{steps:[()=>Ox(n.initials)]}),await dt("Restore",{steps:[()=>pc(p,r,["static"]),()=>pc(o,u,a.archivables),()=>Tx(lr.default.join(u,"dist"),lr.default.join(r,"public")),()=>Kn(s,u,a.cacheables),()=>Kn(s,r,i.cacheables)]}),await dt("Data",{steps:[()=>Rx(e)]}),await dt("SSG",{steps:[()=>ox(l)]}),await dt("Relocation",{steps:[()=>sx(e,m)]}),await dt("Meta",{steps:[()=>rh(e)]}),await dt("Archive",{steps:[()=>kx(),()=>lc(lr.default.join(u,"dist")),()=>Kn(u,o,a.archivables,{withBackup:!0}),()=>Kn(u,s,a.cacheables),()=>Kn(r,s,i.cacheables)]}),await dt("Close",{steps:[()=>dc(n.disposables)]}),await dt("HealthCheck",{steps:[()=>Lx()]}),jx()}var fc=tR;Rt();async function Nx(){try{let e=await rc([()=>fc()]);Tn(`All domains rendered in ${e}s.`),process.exit(0)}catch(e){e instanceof li&&(console.log(),console.log(Ne.black().bgRed(" GRIDDO InternalCXError ")),console.log(),process.exit(1)),console.log(),console.log(Ne.black().bgRed(" GRIDDO UnknownError ")),console.log(),console.log(e),console.log(),process.exit(1)}}Nx();
|
|
99
99
|
/*! Bundled license information:
|