@goldskycom/cli 2.10.0 → 2.10.1

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/dist/index.js CHANGED
@@ -305,7 +305,7 @@ ${y.join(`
305
305
  `,"f"),Ye(this,Zn,D(this,Zn,"f")+t.join(" "),"f")}}}[V2](t){Dm(D(this,lt,"f")).forEach(r=>{if((i=>i==="configObjects")(r))return;let n=D(this,lt,"f")[r];Array.isArray(n)?n.includes(t)&&n.splice(n.indexOf(t),1):typeof n=="object"&&delete n[t]}),delete D(this,Ot,"f").getDescriptions()[t]}[H9](t,r,n){D(this,hx,"f")[n]||(D(this,wt,"f").process.emitWarning(t,r),D(this,hx,"f")[n]=!0)}[V9](){D(this,gx,"f").push({options:D(this,lt,"f"),configObjects:D(this,lt,"f").configObjects.slice(0),exitProcess:D(this,Vs,"f"),groups:D(this,sa,"f"),strict:D(this,td,"f"),strictCommands:D(this,rd,"f"),strictOptions:D(this,nd,"f"),completionCommand:D(this,xs,"f"),output:D(this,Zn,"f"),exitError:D(this,vl,"f"),hasOutput:D(this,Cs,"f"),parsed:this.parsed,parseFn:D(this,Es,"f"),parseContext:D(this,Zu,"f")}),D(this,Ot,"f").freeze(),D(this,_n,"f").freeze(),D(this,Cn,"f").freeze(),D(this,Ws,"f").freeze()}[W9](){let t="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(D(this,wt,"f").process.argv()[0])?r=D(this,wt,"f").process.argv().slice(1,2):r=D(this,wt,"f").process.argv().slice(0,1),t=r.map(n=>{let i=this[aH](D(this,Ju,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&i.length<n.length?i:n}).join(" ").trim(),D(this,wt,"f").getEnv("_")&&D(this,wt,"f").getProcessArgvBin()===D(this,wt,"f").getEnv("_")&&(t=D(this,wt,"f").getEnv("_").replace(`${D(this,wt,"f").path.dirname(D(this,wt,"f").process.execPath())}/`,"")),t}[id](){return D(this,vx,"f")}[K9](){return D(this,Sx,"f")}[W2](){if(!D(this,Qu,"f"))return;let t=D(this,wt,"f").getEnv("LC_ALL")||D(this,wt,"f").getEnv("LC_MESSAGES")||D(this,wt,"f").getEnv("LANG")||D(this,wt,"f").getEnv("LANGUAGE")||"en_US";this.locale(t.replace(/[.:].*/,""))}[Y9](){return this[K2]().version||"unknown"}[J9](t){let r=t["--"]?t["--"]:t._;for(let n=0,i;(i=r[n])!==void 0;n++)D(this,wt,"f").Parser.looksLikeNumber(i)&&Number.isSafeInteger(Math.floor(parseFloat(`${i}`)))&&(r[n]=Number(i));return t}[K2](t){let r=t||"*";if(D(this,km,"f")[r])return D(this,km,"f")[r];let n={};try{let i=t||D(this,wt,"f").mainFilename;!t&&D(this,wt,"f").path.extname(i)&&(i=D(this,wt,"f").path.dirname(i));let s=D(this,wt,"f").findUp(i,(o,a)=>{if(a.includes("package.json"))return"package.json"});Ui(s,void 0,D(this,wt,"f")),n=JSON.parse(D(this,wt,"f").readFileSync(s,"utf8"))}catch{}return D(this,km,"f")[r]=n||{},D(this,km,"f")[r]}[Sl](t,r){r=[].concat(r),r.forEach(n=>{n=this[Q2](n),D(this,lt,"f")[t].push(n)})}[Om](t,r,n,i){this[J2](t,r,n,i,(s,o,a)=>{D(this,lt,"f")[s][o]=a})}[Y2](t,r,n,i){this[J2](t,r,n,i,(s,o,a)=>{D(this,lt,"f")[s][o]=(D(this,lt,"f")[s][o]||[]).concat(a)})}[J2](t,r,n,i,s){if(Array.isArray(n))n.forEach(o=>{t(o,i)});else if((o=>typeof o=="object")(n))for(let o of Dm(n))t(o,n[o]);else s(r,this[Q2](n),i)}[Q2](t){return t==="__proto__"?"___proto___":t}[Z2](t,r){return this[Om](this[Z2].bind(this),"key",t,r),this}[eq](){var t,r,n,i,s,o,a,c,l,u,d,m;let f=D(this,gx,"f").pop();Ui(f,void 0,D(this,wt,"f"));let y;t=this,r=this,n=this,i=this,s=this,o=this,a=this,c=this,l=this,u=this,d=this,m=this,{options:{set value(b){Ye(t,lt,b,"f")}}.value,configObjects:y,exitProcess:{set value(b){Ye(r,Vs,b,"f")}}.value,groups:{set value(b){Ye(n,sa,b,"f")}}.value,output:{set value(b){Ye(i,Zn,b,"f")}}.value,exitError:{set value(b){Ye(s,vl,b,"f")}}.value,hasOutput:{set value(b){Ye(o,Cs,b,"f")}}.value,parsed:this.parsed,strict:{set value(b){Ye(a,td,b,"f")}}.value,strictCommands:{set value(b){Ye(c,rd,b,"f")}}.value,strictOptions:{set value(b){Ye(l,nd,b,"f")}}.value,completionCommand:{set value(b){Ye(u,xs,b,"f")}}.value,parseFn:{set value(b){Ye(d,Es,b,"f")}}.value,parseContext:{set value(b){Ye(m,Zu,b,"f")}}.value}=f,D(this,lt,"f").configObjects=y,D(this,Ot,"f").unfreeze(),D(this,_n,"f").unfreeze(),D(this,Cn,"f").unfreeze(),D(this,Ws,"f").unfreeze()}[Q9](t,r){return Yu(r,n=>(t(n),n))}getInternalMethods(){return{getCommandInstance:this[Z9].bind(this),getContext:this[eH].bind(this),getHasOutput:this[tH].bind(this),getLoggerInstance:this[rH].bind(this),getParseContext:this[nH].bind(this),getParserConfiguration:this[id].bind(this),getUsageConfiguration:this[K9].bind(this),getUsageInstance:this[iH].bind(this),getValidationInstance:this[sH].bind(this),hasParseCallback:this[wx].bind(this),isGlobalContext:this[oH].bind(this),postProcess:this[sd].bind(this),reset:this[tq].bind(this),runValidation:this[rq].bind(this),runYargsParserAndExecuteCommands:this[Lg].bind(this),setHasOutput:this[cH].bind(this)}}[Z9](){return D(this,Cn,"f")}[eH](){return D(this,Bg,"f")}[tH](){return D(this,Cs,"f")}[rH](){return D(this,Pm,"f")}[nH](){return D(this,Zu,"f")||{}}[iH](){return D(this,Ot,"f")}[sH](){return D(this,_n,"f")}[wx](){return!!D(this,Es,"f")}[oH](){return D(this,yx,"f")}[sd](t,r,n,i){return n||Wr(t)||(r||(t=this[G9](t)),(this[id]()["parse-positional-numbers"]||this[id]()["parse-positional-numbers"]===void 0)&&(t=this[J9](t)),i&&(t=Ku(t,this,D(this,Ws,"f").getMiddleware(),!1))),t}[tq](t={}){Ye(this,lt,D(this,lt,"f")||{},"f");let r={};r.local=D(this,lt,"f").local||[],r.configObjects=D(this,lt,"f").configObjects||[];let n={};r.local.forEach(o=>{n[o]=!0,(t[o]||[]).forEach(a=>{n[a]=!0})}),Object.assign(D(this,ed,"f"),Object.keys(D(this,sa,"f")).reduce((o,a)=>{let c=D(this,sa,"f")[a].filter(l=>!(l in n));return c.length>0&&(o[a]=c),o},{})),Ye(this,sa,{},"f");let i=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],s=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return i.forEach(o=>{r[o]=(D(this,lt,"f")[o]||[]).filter(a=>!n[a])}),s.forEach(o=>{r[o]=yl(D(this,lt,"f")[o],a=>!n[a])}),r.envPrefix=D(this,lt,"f").envPrefix,Ye(this,lt,r,"f"),Ye(this,Ot,D(this,Ot,"f")?D(this,Ot,"f").reset(n):q9(this,D(this,wt,"f")),"f"),Ye(this,_n,D(this,_n,"f")?D(this,_n,"f").reset(n):$9(this,D(this,Ot,"f"),D(this,wt,"f")),"f"),Ye(this,Cn,D(this,Cn,"f")?D(this,Cn,"f").reset():F9(D(this,Ot,"f"),D(this,_n,"f"),D(this,Ws,"f"),D(this,wt,"f")),"f"),D(this,Hs,"f")||Ye(this,Hs,M9(this,D(this,Ot,"f"),D(this,Cn,"f"),D(this,wt,"f")),"f"),D(this,Ws,"f").reset(),Ye(this,xs,null,"f"),Ye(this,Zn,"","f"),Ye(this,vl,null,"f"),Ye(this,Cs,!1,"f"),this.parsed=!1,this}[aH](t,r){return D(this,wt,"f").path.relative(t,r)}[Lg](t,r,n,i=0,s=!1){let o=!!n||s;t=t||D(this,_l,"f"),D(this,lt,"f").__=D(this,wt,"f").y18n.__,D(this,lt,"f").configuration=this[id]();let a=!!D(this,lt,"f").configuration["populate--"],c=Object.assign({},D(this,lt,"f").configuration,{"populate--":!0}),l=D(this,wt,"f").Parser.detailed(t,Object.assign({},D(this,lt,"f"),{configuration:{"parse-positional-numbers":!1,...c}})),u=Object.assign(l.argv,D(this,Zu,"f")),d,m=l.aliases,f=!1,y=!1;Object.keys(u).forEach(b=>{b===D(this,Ks,"f")&&u[b]?f=!0:b===D(this,oa,"f")&&u[b]&&(y=!0)}),u.$0=this.$0,this.parsed=l,i===0&&D(this,Ot,"f").clearCachedHelpMessage();try{if(this[W2](),r)return this[sd](u,a,!!n,!1);D(this,Ks,"f")&&[D(this,Ks,"f")].concat(m[D(this,Ks,"f")]||[]).filter(T=>T.length>1).includes(""+u._[u._.length-1])&&(u._.pop(),f=!0),Ye(this,yx,!1,"f");let b=D(this,Cn,"f").getCommands(),v=D(this,Hs,"f").completionKey in u,S=f||v||s;if(u._.length){if(b.length){let k;for(let T=i||0,N;u._[T]!==void 0;T++)if(N=String(u._[T]),b.includes(N)&&N!==D(this,xs,"f")){let L=D(this,Cn,"f").runCommand(N,this,l,T+1,s,f||y||s);return this[sd](L,a,!!n,!1)}else if(!k&&N!==D(this,xs,"f")){k=N;break}!D(this,Cn,"f").hasDefaultCommand()&&D(this,_x,"f")&&k&&!S&&D(this,_n,"f").recommendCommands(k,b)}D(this,xs,"f")&&u._.includes(D(this,xs,"f"))&&!v&&(D(this,Vs,"f")&&bl(!0),this.showCompletionScript(),this.exit(0))}if(D(this,Cn,"f").hasDefaultCommand()&&!S){let k=D(this,Cn,"f").runCommand(null,this,l,0,s,f||y||s);return this[sd](k,a,!!n,!1)}if(v){D(this,Vs,"f")&&bl(!0),t=[].concat(t);let k=t.slice(t.indexOf(`--${D(this,Hs,"f").completionKey}`)+1);return D(this,Hs,"f").getCompletion(k,(T,N)=>{if(T)throw new Lr(T.message);(N||[]).forEach(L=>{D(this,Pm,"f").log(L)}),this.exit(0)}),this[sd](u,!a,!!n,!1)}if(D(this,Cs,"f")||(f?(D(this,Vs,"f")&&bl(!0),o=!0,this.showHelp("log"),this.exit(0)):y&&(D(this,Vs,"f")&&bl(!0),o=!0,D(this,Ot,"f").showVersion("log"),this.exit(0))),!o&&D(this,lt,"f").skipValidation.length>0&&(o=Object.keys(u).some(k=>D(this,lt,"f").skipValidation.indexOf(k)>=0&&u[k]===!0)),!o){if(l.error)throw new Lr(l.error.message);if(!v){let k=this[rq](m,{},l.error);n||(d=Ku(u,this,D(this,Ws,"f").getMiddleware(),!0)),d=this[Q9](k,d??u),Wr(d)&&!n&&(d=d.then(()=>Ku(u,this,D(this,Ws,"f").getMiddleware(),!1)))}}}catch(b){if(b instanceof Lr)D(this,Ot,"f").fail(b.message,b);else throw b}return this[sd](d??u,a,!!n,!0)}[rq](t,r,n,i){let s={...this.getDemandedOptions()};return o=>{if(n)throw new Lr(n.message);D(this,_n,"f").nonOptionCount(o),D(this,_n,"f").requiredArguments(o,s);let a=!1;D(this,rd,"f")&&(a=D(this,_n,"f").unknownCommands(o)),D(this,td,"f")&&!a?D(this,_n,"f").unknownArguments(o,t,r,!!i):D(this,nd,"f")&&D(this,_n,"f").unknownArguments(o,t,{},!1,!1),D(this,_n,"f").limitedChoices(o),D(this,_n,"f").implications(o),D(this,_n,"f").conflicting(o)}}[cH](){Ye(this,Cs,!0,"f")}[od](t){if(typeof t=="string")D(this,lt,"f").key[t]=!0;else for(let r of t)D(this,lt,"f").key[r]=!0}};function I9(e){return!!e&&typeof e.getInternalMethods=="function"}var Wke=lH(j2),uH=Wke;var Ex={};ft(Ex,{CreateOneClickDeploymentMessageSchema:()=>g1e,CreateTagMessageSchema:()=>n1e,DeployMessageSchema:()=>Jke,GenerateMessageSchema:()=>Zke,GetAllSubgraphsMessageSchema:()=>m1e,GetOneClickDeploymentsMessageSchema:()=>f1e,GetSubgraphLogsMessageSchema:()=>p1e,GetSubgraphMessageSchema:()=>l1e,GetSubgraphVersionsMessageSchema:()=>a1e,PauseStartDeploymentBody:()=>pH,PauseStartDeploymentSchema:()=>y1e,RemoveMessageSchema:()=>i1e,ShowGeneratedMessageSchema:()=>t1e,SubgraphLogLevels:()=>dH});var De=ee(gt()),Yke=De.Type.Object({bundle:De.Type.Optional(De.Type.Object({encoding:De.Type.String(),filename:De.Type.String(),mimetype:De.Type.String()})),generated_bundle_id:De.Type.Optional(De.Type.Object({value:De.Type.String()})),overwrite:De.Type.Object({value:De.Type.String()}),remove_graft:De.Type.Optional(De.Type.Object({value:De.Type.String()})),start_block:De.Type.Optional(De.Type.Object({value:De.Type.String()})),graft_from:De.Type.Optional(De.Type.Object({value:De.Type.String()}))}),Cx=De.Type.Object({name:De.Type.String(),version_label:De.Type.String()}),Jke={params:Cx,body:Yke},Qke=De.Type.Object({bundle:De.Type.String()}),Zke={body:Qke},e1e=De.Type.Object({cursor:De.Type.String()}),t1e={body:e1e},r1e=De.Type.Object({target_version:De.Type.Optional(De.Type.String())}),n1e={body:r1e,params:Cx},i1e={params:Cx},s1e=De.Type.Object({id:De.Type.String(),created_at:De.Type.Number(),deployment_id:De.Type.String(),health:De.Type.String(),synced:De.Type.Boolean(),fatal_error:De.Type.Optional(De.Type.String()),non_fatal_errors:De.Type.Optional(De.Type.Array(De.Type.String())),indexing_progress:De.Type.Optional(De.Type.Object({network:De.Type.String(),progress_percent:De.Type.Number(),chain_head_block:De.Type.Number(),deployment_head_block:De.Type.Number(),deployment_start_block:De.Type.Number(),synced:De.Type.Boolean()}))}),D$t=De.Type.Object({name:De.Type.String(),version:De.Type.String(),tag:De.Type.Optional(De.Type.Object({target_version:De.Type.Optional(De.Type.String())})),health:De.Type.String(),synced:De.Type.Boolean(),graphql_endpoint:De.Type.String(),deployments:De.Type.Array(s1e),network:De.Type.String(),status:De.Type.Enum({Active:"Active",Paused:"Paused"})}),o1e=De.Type.Object({name:De.Type.String()}),a1e={params:o1e},c1e=De.Type.Object({name:De.Type.String(),version_label:De.Type.String()}),l1e={params:c1e},dH=["error","warn","info","debug"],u1e=De.Type.Object({name:De.Type.String(),version_label:De.Type.String()}),d1e=De.Type.Object({cursor:De.Type.Optional(De.Type.Number()),after:De.Type.Optional(De.Type.Number()),direction:De.Type.Optional(De.Type.Union([De.Type.Literal("asc"),De.Type.Literal("desc")])),log_level:De.Type.Optional(De.Type.String({enum:dH}))}),p1e={params:u1e,querystring:d1e},m1e={},f1e={},h1e=De.Type.Object({name:De.Type.String(),description:De.Type.String(),version:De.Type.String(),ipfsHash:De.Type.String(),url:De.Type.String(),network:De.Type.String()}),g1e={body:h1e},pH=De.Type.Object({}),y1e={params:Cx,body:pH};var Ie={};ft(Ie,{ApiFetch:()=>Uq,FormData:()=>ZRe,delete_:()=>yW,get:()=>gW,getPath:()=>hW,post:()=>vW,put:()=>bW,setApiClientAndVersion:()=>JRe,setApiHost:()=>QRe,setAuth:()=>YRe});function Mg(e,t){return function(){return e.apply(t,arguments)}}var{toString:b1e}=Object.prototype,{getPrototypeOf:oq}=Object,Ax=(e=>t=>{let r=b1e.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),aa=e=>(e=e.toLowerCase(),t=>Ax(t)===e),Px=e=>t=>typeof t===e,{isArray:Rm}=Array,jg=Px("undefined");function v1e(e){return e!==null&&!jg(e)&&e.constructor!==null&&!jg(e.constructor)&&Ys(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var hH=aa("ArrayBuffer");function _1e(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&hH(e.buffer),t}var S1e=Px("string"),Ys=Px("function"),gH=Px("number"),kx=e=>e!==null&&typeof e=="object",w1e=e=>e===!0||e===!1,Dx=e=>{if(Ax(e)!=="object")return!1;let t=oq(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},x1e=aa("Date"),C1e=aa("File"),E1e=aa("Blob"),D1e=aa("FileList"),A1e=e=>kx(e)&&Ys(e.pipe),P1e=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ys(e.append)&&((t=Ax(e))==="formdata"||t==="object"&&Ys(e.toString)&&e.toString()==="[object FormData]"))},k1e=aa("URLSearchParams"),O1e=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function zg(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),Rm(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{let s=r?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length,a;for(n=0;n<o;n++)a=s[n],t.call(null,e[a],a,e)}}function yH(e,t){t=t.toLowerCase();let r=Object.keys(e),n=r.length,i;for(;n-- >0;)if(i=r[n],t===i.toLowerCase())return i;return null}var bH=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),vH=e=>!jg(e)&&e!==bH;function sq(){let{caseless:e}=vH(this)&&this||{},t={},r=(n,i)=>{let s=e&&yH(t,i)||i;Dx(t[s])&&Dx(n)?t[s]=sq(t[s],n):Dx(n)?t[s]=sq({},n):Rm(n)?t[s]=n.slice():t[s]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&zg(arguments[n],r);return t}var R1e=(e,t,r,{allOwnKeys:n}={})=>(zg(t,(i,s)=>{r&&Ys(i)?e[s]=Mg(i,r):e[s]=i},{allOwnKeys:n}),e),T1e=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),F1e=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},I1e=(e,t,r,n)=>{let i,s,o,a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!n||n(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=r!==!1&&oq(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},N1e=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return n!==-1&&n===r},q1e=e=>{if(!e)return null;if(Rm(e))return e;let t=e.length;if(!gH(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},B1e=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&oq(Uint8Array)),L1e=(e,t)=>{let n=(e&&e[Symbol.iterator]).call(e),i;for(;(i=n.next())&&!i.done;){let s=i.value;t.call(e,s[0],s[1])}},M1e=(e,t)=>{let r,n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},j1e=aa("HTMLFormElement"),z1e=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),mH=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),$1e=aa("RegExp"),_H=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};zg(r,(i,s)=>{t(i,s,e)!==!1&&(n[s]=i)}),Object.defineProperties(e,n)},U1e=e=>{_H(e,(t,r)=>{if(Ys(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=e[r];if(!!Ys(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},G1e=(e,t)=>{let r={},n=i=>{i.forEach(s=>{r[s]=!0})};return Rm(e)?n(e):n(String(e).split(t)),r},X1e=()=>{},H1e=(e,t)=>(e=+e,Number.isFinite(e)?e:t),iq="abcdefghijklmnopqrstuvwxyz",fH="0123456789",SH={DIGIT:fH,ALPHA:iq,ALPHA_DIGIT:iq+iq.toUpperCase()+fH},V1e=(e=16,t=SH.ALPHA_DIGIT)=>{let r="",{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function W1e(e){return!!(e&&Ys(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var K1e=e=>{let t=new Array(10),r=(n,i)=>{if(kx(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[i]=n;let s=Rm(n)?[]:{};return zg(n,(o,a)=>{let c=r(o,i+1);!jg(c)&&(s[a]=c)}),t[i]=void 0,s}}return n};return r(e,0)},Y1e=aa("AsyncFunction"),J1e=e=>e&&(kx(e)||Ys(e))&&Ys(e.then)&&Ys(e.catch),G={isArray:Rm,isArrayBuffer:hH,isBuffer:v1e,isFormData:P1e,isArrayBufferView:_1e,isString:S1e,isNumber:gH,isBoolean:w1e,isObject:kx,isPlainObject:Dx,isUndefined:jg,isDate:x1e,isFile:C1e,isBlob:E1e,isRegExp:$1e,isFunction:Ys,isStream:A1e,isURLSearchParams:k1e,isTypedArray:B1e,isFileList:D1e,forEach:zg,merge:sq,extend:R1e,trim:O1e,stripBOM:T1e,inherits:F1e,toFlatObject:I1e,kindOf:Ax,kindOfTest:aa,endsWith:N1e,toArray:q1e,forEachEntry:L1e,matchAll:M1e,isHTMLForm:j1e,hasOwnProperty:mH,hasOwnProp:mH,reduceDescriptors:_H,freezeMethods:U1e,toObjectSet:G1e,toCamelCase:z1e,noop:X1e,toFiniteNumber:H1e,findKey:yH,global:bH,isContextDefined:vH,ALPHABET:SH,generateString:V1e,isSpecCompliantForm:W1e,toJSONObject:K1e,isAsyncFn:Y1e,isThenable:J1e};function Tm(e,t,r,n,i){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),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}G.inherits(Tm,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:G.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var wH=Tm.prototype,xH={};["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=>{xH[e]={value:e}});Object.defineProperties(Tm,xH);Object.defineProperty(wH,"isAxiosError",{value:!0});Tm.from=(e,t,r,n,i,s)=>{let o=Object.create(wH);return G.toFlatObject(e,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),Tm.call(o,e.message,t,r,n,i),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};var Je=Tm;var iV=ee(yq(),1),Tx=iV.default;function bq(e){return G.isPlainObject(e)||G.isArray(e)}function oV(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function sV(e,t,r){return e?e.concat(t).map(function(i,s){return i=oV(i),!r&&s?"["+i+"]":i}).join(r?".":""):t}function IOe(e){return G.isArray(e)&&!e.some(bq)}var NOe=G.toFlatObject(G,{},null,function(t){return/^is[A-Z]/.test(t)});function qOe(e,t,r){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new(Tx||FormData),r=G.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,v){return!G.isUndefined(v[b])});let n=r.metaTokens,i=r.visitor||u,s=r.dots,o=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&G.isSpecCompliantForm(t);if(!G.isFunction(i))throw new TypeError("visitor must be a function");function l(y){if(y===null)return"";if(G.isDate(y))return y.toISOString();if(!c&&G.isBlob(y))throw new Je("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(y)||G.isTypedArray(y)?c&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function u(y,b,v){let S=y;if(y&&!v&&typeof y=="object"){if(G.endsWith(b,"{}"))b=n?b:b.slice(0,-2),y=JSON.stringify(y);else if(G.isArray(y)&&IOe(y)||(G.isFileList(y)||G.endsWith(b,"[]"))&&(S=G.toArray(y)))return b=oV(b),S.forEach(function(T,N){!(G.isUndefined(T)||T===null)&&t.append(o===!0?sV([b],N,s):o===null?b:b+"[]",l(T))}),!1}return bq(y)?!0:(t.append(sV(v,b,s),l(y)),!1)}let d=[],m=Object.assign(NOe,{defaultVisitor:u,convertValue:l,isVisitable:bq});function f(y,b){if(!G.isUndefined(y)){if(d.indexOf(y)!==-1)throw Error("Circular reference detected in "+b.join("."));d.push(y),G.forEach(y,function(S,k){(!(G.isUndefined(S)||S===null)&&i.call(t,S,G.isString(k)?k.trim():k,b,m))===!0&&f(S,b?b.concat(k):[k])}),d.pop()}}if(!G.isObject(e))throw new TypeError("data must be an object");return f(e),t}var wl=qOe;function aV(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function cV(e,t){this._pairs=[],e&&wl(e,this,t)}var lV=cV.prototype;lV.append=function(t,r){this._pairs.push([t,r])};lV.toString=function(t){let r=t?function(n){return t.call(this,n,aV)}:aV;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};var uV=cV;function BOe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ad(e,t,r){if(!t)return e;let n=r&&r.encode||BOe,i=r&&r.serialize,s;if(i?s=i(t,r):s=G.isURLSearchParams(t)?t.toString():new uV(t,r).toString(n),s){let o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}var vq=class{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){G.forEach(this.handlers,function(n){n!==null&&t(n)})}},_q=vq;var Fm={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var dV=ee(require("url"),1),pV=dV.default.URLSearchParams;var Fn={isNode:!0,classes:{URLSearchParams:pV,FormData:Tx,Blob:typeof Blob<"u"&&Blob||null},protocols:["http","https","file","data"]};function Sq(e,t){return wl(e,new Fn.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,s){return Fn.isNode&&G.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function LOe(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function MOe(e){let t={},r=Object.keys(e),n,i=r.length,s;for(n=0;n<i;n++)s=r[n],t[s]=e[s];return t}function jOe(e){function t(r,n,i,s){let o=r[s++],a=Number.isFinite(+o),c=s>=r.length;return o=!o&&G.isArray(i)?i.length:o,c?(G.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!a):((!i[o]||!G.isObject(i[o]))&&(i[o]=[]),t(r,n,i[o],s)&&G.isArray(i[o])&&(i[o]=MOe(i[o])),!a)}if(G.isFormData(e)&&G.isFunction(e.entries)){let r={};return G.forEachEntry(e,(n,i)=>{t(LOe(n),i,r,0)}),r}return null}var Fx=jOe;var zOe={"Content-Type":void 0};function $Oe(e,t,r){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var Ix={transitional:Fm,adapter:["xhr","http"],transformRequest:[function(t,r){let n=r.getContentType()||"",i=n.indexOf("application/json")>-1,s=G.isObject(t);if(s&&G.isHTMLForm(t)&&(t=new FormData(t)),G.isFormData(t))return i&&i?JSON.stringify(Fx(t)):t;if(G.isArrayBuffer(t)||G.isBuffer(t)||G.isStream(t)||G.isFile(t)||G.isBlob(t))return t;if(G.isArrayBufferView(t))return t.buffer;if(G.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Sq(t,this.formSerializer).toString();if((a=G.isFileList(t))||n.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return wl(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||i?(r.setContentType("application/json",!1),$Oe(t)):t}],transformResponse:[function(t){let r=this.transitional||Ix.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(t&&G.isString(t)&&(n&&!this.responseType||i)){let o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?Je.from(a,Je.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Fn.classes.FormData,Blob:Fn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};G.forEach(["delete","get","head"],function(t){Ix.headers[t]={}});G.forEach(["post","put","patch"],function(t){Ix.headers[t]=G.merge(zOe)});var Im=Ix;var UOe=G.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"]),mV=e=>{let t={},r,n,i;return e&&e.split(`
306
306
  `).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||t[r]&&UOe[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t};var fV=Symbol("internals");function $g(e){return e&&String(e).trim().toLowerCase()}function Nx(e){return e===!1||e==null?e:G.isArray(e)?e.map(Nx):String(e)}function GOe(e){let t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}var XOe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function wq(e,t,r,n,i){if(G.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!G.isString(t)){if(G.isString(n))return t.indexOf(n)!==-1;if(G.isRegExp(n))return n.test(t)}}function HOe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function VOe(e,t){let r=G.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,s,o){return this[n].call(this,t,i,s,o)},configurable:!0})})}var Nm=class{constructor(t){t&&this.set(t)}set(t,r,n){let i=this;function s(a,c,l){let u=$g(c);if(!u)throw new Error("header name must be a non-empty string");let d=G.findKey(i,u);(!d||i[d]===void 0||l===!0||l===void 0&&i[d]!==!1)&&(i[d||c]=Nx(a))}let o=(a,c)=>G.forEach(a,(l,u)=>s(l,u,c));return G.isPlainObject(t)||t instanceof this.constructor?o(t,r):G.isString(t)&&(t=t.trim())&&!XOe(t)?o(mV(t),r):t!=null&&s(r,t,n),this}get(t,r){if(t=$g(t),t){let n=G.findKey(this,t);if(n){let i=this[n];if(!r)return i;if(r===!0)return GOe(i);if(G.isFunction(r))return r.call(this,i,n);if(G.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=$g(t),t){let n=G.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||wq(this,this[n],n,r)))}return!1}delete(t,r){let n=this,i=!1;function s(o){if(o=$g(o),o){let a=G.findKey(n,o);a&&(!r||wq(n,n[a],a,r))&&(delete n[a],i=!0)}}return G.isArray(t)?t.forEach(s):s(t),i}clear(t){let r=Object.keys(this),n=r.length,i=!1;for(;n--;){let s=r[n];(!t||wq(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){let r=this,n={};return G.forEach(this,(i,s)=>{let o=G.findKey(n,s);if(o){r[o]=Nx(i),delete r[s];return}let a=t?HOe(s):String(s).trim();a!==s&&delete r[s],r[a]=Nx(i),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return G.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&G.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
307
307
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){let n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){let n=(this[fV]=this[fV]={accessors:{}}).accessors,i=this.prototype;function s(o){let a=$g(o);n[a]||(VOe(i,o),n[a]=!0)}return G.isArray(t)?t.forEach(s):s(t),this}};Nm.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);G.freezeMethods(Nm.prototype);G.freezeMethods(Nm);var Hn=Nm;function Ug(e,t){let r=this||Im,n=t||r,i=Hn.from(n.headers),s=n.data;return G.forEach(e,function(a){s=a.call(r,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Gg(e){return!!(e&&e.__CANCEL__)}function hV(e,t,r){Je.call(this,e??"canceled",Je.ERR_CANCELED,t,r),this.name="CanceledError"}G.inherits(hV,Je,{__CANCEL__:!0});var Ro=hV;function xl(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Je("Request failed with status code "+r.status,[Je.ERR_BAD_REQUEST,Je.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function xq(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Cq(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function cd(e,t){return e&&!xq(t)?Cq(e,t):t}var YV=ee(yV(),1),JV=ee(require("http"),1),QV=ee(require("https"),1),ZV=ee(require("util"),1),eW=ee(BV(),1),pc=ee(require("zlib"),1);var pd="1.4.0";function Wg(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var TRe=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Fq(e,t,r){let n=r&&r.Blob||Fn.classes.Blob,i=Wg(e);if(t===void 0&&n&&(t=!0),i==="data"){e=i.length?e.slice(i.length+1):e;let s=TRe.exec(e);if(!s)throw new Je("Invalid URL",Je.ERR_INVALID_URL);let o=s[1],a=s[2],c=s[3],l=Buffer.from(decodeURIComponent(c),a?"base64":"utf8");if(t){if(!n)throw new Je("Blob is not supported",Je.ERR_NOT_SUPPORT);return new n([l],{type:o})}return l}throw new Je("Unsupported protocol "+i,Je.ERR_NOT_SUPPORT)}var md=ee(require("stream"),1);var MV=ee(require("stream"),1);function FRe(e,t){let r=0,n=1e3/t,i=null;return function(o,a){let c=Date.now();if(o||c-r>n)return i&&(clearTimeout(i),i=null),r=c,e.apply(null,a);i||(i=setTimeout(()=>(i=null,r=Date.now(),e.apply(null,a)),n-(c-r)))}}var LV=FRe;function IRe(e,t){e=e||10;let r=new Array(e),n=new Array(e),i=0,s=0,o;return t=t!==void 0?t:1e3,function(c){let l=Date.now(),u=n[s];o||(o=l),r[i]=c,n[i]=l;let d=s,m=0;for(;d!==i;)m+=r[d++],d=d%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),l-o<t)return;let f=u&&l-u;return f?Math.round(m*1e3/f):void 0}}var zx=IRe;var $x=Symbol("internals"),Iq=class extends MV.default.Transform{constructor(t){t=G.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(a,c)=>!G.isUndefined(c[a])),super({readableHighWaterMark:t.chunkSize});let r=this,n=this[$x]={length:t.length,timeWindow:t.timeWindow,ticksRate:t.ticksRate,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},i=zx(n.ticksRate*t.samplesCount,n.timeWindow);this.on("newListener",a=>{a==="progress"&&(n.isCaptured||(n.isCaptured=!0))});let s=0;n.updateProgress=LV(function(){let c=n.length,l=n.bytesSeen,u=l-s;if(!u||r.destroyed)return;let d=i(u);s=l,process.nextTick(()=>{r.emit("progress",{loaded:l,total:c,progress:c?l/c:void 0,bytes:u,rate:d||void 0,estimated:d&&c&&l<=c?(c-l)/d:void 0})})},n.ticksRate);let o=()=>{n.updateProgress(!0)};this.once("end",o),this.once("error",o)}_read(t){let r=this[$x];return r.onReadCallback&&r.onReadCallback(),super._read(t)}_transform(t,r,n){let i=this,s=this[$x],o=s.maxRate,a=this.readableHighWaterMark,c=s.timeWindow,l=1e3/c,u=o/l,d=s.minChunkSize!==!1?Math.max(s.minChunkSize,u*.01):0;function m(y,b){let v=Buffer.byteLength(y);s.bytesSeen+=v,s.bytes+=v,s.isCaptured&&s.updateProgress(),i.push(y)?process.nextTick(b):s.onReadCallback=()=>{s.onReadCallback=null,process.nextTick(b)}}let f=(y,b)=>{let v=Buffer.byteLength(y),S=null,k=a,T,N=0;if(o){let L=Date.now();(!s.ts||(N=L-s.ts)>=c)&&(s.ts=L,T=u-s.bytes,s.bytes=T<0?-T:0,N=0),T=u-s.bytes}if(o){if(T<=0)return setTimeout(()=>{b(null,y)},c-N);T<k&&(k=T)}k&&v>k&&v-k>d&&(S=y.subarray(k),y=y.subarray(0,k)),m(y,S?()=>{process.nextTick(b,null,S)}:b)};f(t,function y(b,v){if(b)return n(b);v?f(v,y):n(null)})}setLength(t){return this[$x].length=+t,this}},Nq=Iq;var tW=ee(require("events"),1);var zV=require("util"),$V=require("stream");var{asyncIterator:jV}=Symbol,NRe=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[jV]?yield*e[jV]():yield e},Ux=NRe;var qRe=G.ALPHABET.ALPHA_DIGIT+"-_",Kg=new zV.TextEncoder,Cl=`\r
308
- `,BRe=Kg.encode(Cl),LRe=2,qq=class{constructor(t,r){let{escapeName:n}=this.constructor,i=G.isString(r),s=`Content-Disposition: form-data; name="${n(t)}"${!i&&r.name?`; filename="${n(r.name)}"`:""}${Cl}`;i?r=Kg.encode(String(r).replace(/\r?\n|\r\n?/g,Cl)):s+=`Content-Type: ${r.type||"application/octet-stream"}${Cl}`,this.headers=Kg.encode(s+Cl),this.contentLength=i?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+LRe,this.name=t,this.value=r}async*encode(){yield this.headers;let{value:t}=this;G.isTypedArray(t)?yield t:yield*Ux(t),yield BRe}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},MRe=(e,t,r)=>{let{tag:n="form-data-boundary",size:i=25,boundary:s=n+"-"+G.generateString(i,qRe)}=r||{};if(!G.isFormData(e))throw TypeError("FormData instance required");if(s.length<1||s.length>70)throw Error("boundary must be 10-70 characters long");let o=Kg.encode("--"+s+Cl),a=Kg.encode("--"+s+"--"+Cl+Cl),c=a.byteLength,l=Array.from(e.entries()).map(([d,m])=>{let f=new qq(d,m);return c+=f.size,f});c+=o.byteLength*l.length,c=G.toFiniteNumber(c);let u={"Content-Type":`multipart/form-data; boundary=${s}`};return Number.isFinite(c)&&(u["Content-Length"]=c),t&&t(u),$V.Readable.from(async function*(){for(let d of l)yield o,yield*d.encode();yield a}())},UV=MRe;var GV=ee(require("stream"),1),Bq=class extends GV.default.Transform{__transform(t,r,n){this.push(t),n()}_transform(t,r,n){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let i=Buffer.alloc(2);i[0]=120,i[1]=156,this.push(i,r)}this.__transform(t,r,n)}},XV=Bq;var jRe=(e,t)=>G.isAsyncFn(e)?function(...r){let n=r.pop();e.apply(this,r).then(i=>{try{t?n(null,...t(i)):n(null,i)}catch(s){n(s)}},n)}:e,HV=jRe;var VV={flush:pc.default.constants.Z_SYNC_FLUSH,finishFlush:pc.default.constants.Z_SYNC_FLUSH},zRe={flush:pc.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:pc.default.constants.BROTLI_OPERATION_FLUSH},WV=G.isFunction(pc.default.createBrotliDecompress),{http:$Re,https:URe}=eW.default,GRe=/https:?/,KV=Fn.protocols.map(e=>e+":");function XRe(e){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e)}function rW(e,t,r){let n=t;if(!n&&n!==!1){let i=(0,YV.getProxyForUrl)(r);i&&(n=new URL(i))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){(n.auth.username||n.auth.password)&&(n.auth=(n.auth.username||"")+":"+(n.auth.password||""));let s=Buffer.from(n.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+s}e.headers.host=e.hostname+(e.port?":"+e.port:"");let i=n.hostname||n.host;e.hostname=i,e.host=i,e.port=n.port,e.path=r,n.protocol&&(e.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}e.beforeRedirects.proxy=function(s){rW(s,t,s.href)}}var HRe=typeof process<"u"&&G.kindOf(process)==="process",VRe=e=>new Promise((t,r)=>{let n,i,s=(c,l)=>{i||(i=!0,n&&n(c,l))},o=c=>{s(c),t(c)},a=c=>{s(c,!0),r(c)};e(o,a,c=>n=c).catch(a)}),nW=HRe&&function(t){return VRe(async function(n,i,s){let{data:o,lookup:a,family:c}=t,{responseType:l,responseEncoding:u}=t,d=t.method.toUpperCase(),m,f=!1,y;a&&G.isAsyncFn(a)&&(a=HV(a,Y=>{if(G.isString(Y))Y=[Y,Y.indexOf(".")<0?6:4];else if(!G.isArray(Y))throw new TypeError("lookup async function must return an array [ip: string, family: number]]");return Y}));let b=new tW.default,v=()=>{t.cancelToken&&t.cancelToken.unsubscribe(S),t.signal&&t.signal.removeEventListener("abort",S),b.removeAllListeners()};s((Y,Pe)=>{m=!0,Pe&&(f=!0,v())});function S(Y){b.emit("abort",!Y||Y.type?new Ro(null,t,y):Y)}b.once("abort",i),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(S),t.signal&&(t.signal.aborted?S():t.signal.addEventListener("abort",S)));let k=cd(t.baseURL,t.url),T=new URL(k,"http://localhost"),N=T.protocol||KV[0];if(N==="data:"){let Y;if(d!=="GET")return xl(n,i,{status:405,statusText:"method not allowed",headers:{},config:t});try{Y=Fq(t.url,l==="blob",{Blob:t.env&&t.env.Blob})}catch(Pe){throw Je.from(Pe,Je.ERR_BAD_REQUEST,t)}return l==="text"?(Y=Y.toString(u),(!u||u==="utf8")&&(Y=G.stripBOM(Y))):l==="stream"&&(Y=md.default.Readable.from(Y)),xl(n,i,{data:Y,status:200,statusText:"OK",headers:new Hn,config:t})}if(KV.indexOf(N)===-1)return i(new Je("Unsupported protocol "+N,Je.ERR_BAD_REQUEST,t));let L=Hn.from(t.headers).normalize();L.set("User-Agent","axios/"+pd,!1);let Ee=t.onDownloadProgress,Re=t.onUploadProgress,Te=t.maxRate,$e,fe;if(G.isSpecCompliantForm(o)){let Y=L.getContentType(/boundary=([-_\w\d]{10,70})/i);o=UV(o,Pe=>{L.set(Pe)},{tag:`axios-${pd}-boundary`,boundary:Y&&Y[1]||void 0})}else if(G.isFormData(o)&&G.isFunction(o.getHeaders)){if(L.set(o.getHeaders()),!L.hasContentLength())try{let Y=await ZV.default.promisify(o.getLength).call(o);Number.isFinite(Y)&&Y>=0&&L.setContentLength(Y)}catch{}}else if(G.isBlob(o))o.size&&L.setContentType(o.type||"application/octet-stream"),L.setContentLength(o.size||0),o=md.default.Readable.from(Ux(o));else if(o&&!G.isStream(o)){if(!Buffer.isBuffer(o))if(G.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else if(G.isString(o))o=Buffer.from(o,"utf-8");else return i(new Je("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Je.ERR_BAD_REQUEST,t));if(L.setContentLength(o.length,!1),t.maxBodyLength>-1&&o.length>t.maxBodyLength)return i(new Je("Request body larger than maxBodyLength limit",Je.ERR_BAD_REQUEST,t))}let Q=G.toFiniteNumber(L.getContentLength());G.isArray(Te)?($e=Te[0],fe=Te[1]):$e=fe=Te,o&&(Re||$e)&&(G.isStream(o)||(o=md.default.Readable.from(o,{objectMode:!1})),o=md.default.pipeline([o,new Nq({length:Q,maxRate:G.toFiniteNumber($e)})],G.noop),Re&&o.on("progress",Y=>{Re(Object.assign(Y,{upload:!0}))}));let x;if(t.auth){let Y=t.auth.username||"",Pe=t.auth.password||"";x=Y+":"+Pe}if(!x&&T.username){let Y=T.username,Pe=T.password;x=Y+":"+Pe}x&&L.delete("authorization");let ie;try{ie=ad(T.pathname+T.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(Y){let Pe=new Error(Y.message);return Pe.config=t,Pe.url=t.url,Pe.exists=!0,i(Pe)}L.set("Accept-Encoding","gzip, compress, deflate"+(WV?", br":""),!1);let P={path:ie,method:d,headers:L.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:x,protocol:N,family:c,lookup:a,beforeRedirect:XRe,beforeRedirects:{}};t.socketPath?P.socketPath=t.socketPath:(P.hostname=T.hostname,P.port=T.port,rW(P,t.proxy,N+"//"+T.hostname+(T.port?":"+T.port:"")+P.path));let R,ge=GRe.test(P.protocol);if(P.agent=ge?t.httpsAgent:t.httpAgent,t.transport?R=t.transport:t.maxRedirects===0?R=ge?QV.default:JV.default:(t.maxRedirects&&(P.maxRedirects=t.maxRedirects),t.beforeRedirect&&(P.beforeRedirects.config=t.beforeRedirect),R=ge?URe:$Re),t.maxBodyLength>-1?P.maxBodyLength=t.maxBodyLength:P.maxBodyLength=1/0,t.insecureHTTPParser&&(P.insecureHTTPParser=t.insecureHTTPParser),y=R.request(P,function(Pe){if(y.destroyed)return;let Yt=[Pe],Xt=+Pe.headers["content-length"];if(Ee){let U=new Nq({length:G.toFiniteNumber(Xt),maxRate:G.toFiniteNumber(fe)});Ee&&U.on("progress",q=>{Ee(Object.assign(q,{download:!0}))}),Yt.push(U)}let yr=Pe,lr=Pe.req||y;if(t.decompress!==!1&&Pe.headers["content-encoding"])switch((d==="HEAD"||Pe.statusCode===204)&&delete Pe.headers["content-encoding"],Pe.headers["content-encoding"]){case"gzip":case"x-gzip":case"compress":case"x-compress":Yt.push(pc.default.createUnzip(VV)),delete Pe.headers["content-encoding"];break;case"deflate":Yt.push(new XV),Yt.push(pc.default.createUnzip(VV)),delete Pe.headers["content-encoding"];break;case"br":WV&&(Yt.push(pc.default.createBrotliDecompress(zRe)),delete Pe.headers["content-encoding"])}yr=Yt.length>1?md.default.pipeline(Yt,G.noop):Yt[0];let $i=md.default.finished(yr,()=>{$i(),v()}),w={status:Pe.statusCode,statusText:Pe.statusMessage,headers:new Hn(Pe.headers),config:t,request:lr};if(l==="stream")w.data=yr,xl(n,i,w);else{let U=[],q=0;yr.on("data",function(He){U.push(He),q+=He.length,t.maxContentLength>-1&&q>t.maxContentLength&&(f=!0,yr.destroy(),i(new Je("maxContentLength size of "+t.maxContentLength+" exceeded",Je.ERR_BAD_RESPONSE,t,lr)))}),yr.on("aborted",function(){if(f)return;let He=new Je("maxContentLength size of "+t.maxContentLength+" exceeded",Je.ERR_BAD_RESPONSE,t,lr);yr.destroy(He),i(He)}),yr.on("error",function(He){y.destroyed||i(Je.from(He,null,t,lr))}),yr.on("end",function(){try{let He=U.length===1?U[0]:Buffer.concat(U);l!=="arraybuffer"&&(He=He.toString(u),(!u||u==="utf8")&&(He=G.stripBOM(He))),w.data=He}catch(He){i(Je.from(He,null,t,w.request,w))}xl(n,i,w)})}b.once("abort",U=>{yr.destroyed||(yr.emit("error",U),yr.destroy())})}),b.once("abort",Y=>{i(Y),y.destroy(Y)}),y.on("error",function(Pe){i(Je.from(Pe,null,t,y))}),y.on("socket",function(Pe){Pe.setKeepAlive(!0,1e3*60)}),t.timeout){let Y=parseInt(t.timeout,10);if(isNaN(Y)){i(new Je("error trying to parse `config.timeout` to int",Je.ERR_BAD_OPTION_VALUE,t,y));return}y.setTimeout(Y,function(){if(m)return;let Yt=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",Xt=t.transitional||Fm;t.timeoutErrorMessage&&(Yt=t.timeoutErrorMessage),i(new Je(Yt,Xt.clarifyTimeoutError?Je.ETIMEDOUT:Je.ECONNABORTED,t,y)),S()})}if(G.isStream(o)){let Y=!1,Pe=!1;o.on("end",()=>{Y=!0}),o.once("error",Yt=>{Pe=!0,y.destroy(Yt)}),o.on("close",()=>{!Y&&!Pe&&S(new Ro("Request stream has been aborted",t,y))}),o.pipe(y)}else y.end(o)})};var iW=Fn.isStandardBrowserEnv?function(){return{write:function(r,n,i,s,o,a){let c=[];c.push(r+"="+encodeURIComponent(n)),G.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),G.isString(s)&&c.push("path="+s),G.isString(o)&&c.push("domain="+o),a===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(r){let n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();var sW=Fn.isStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function i(s){let o=s;return t&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=i(window.location.href),function(o){let a=G.isString(o)?i(o):o;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}();function oW(e,t){let r=0,n=zx(50,250);return i=>{let s=i.loaded,o=i.lengthComputable?i.total:void 0,a=s-r,c=n(a),l=s<=o;r=s;let u={loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:c||void 0,estimated:c&&o&&l?(o-s)/c:void 0,event:i};u[t?"download":"upload"]=!0,e(u)}}var WRe=typeof XMLHttpRequest<"u",aW=WRe&&function(e){return new Promise(function(r,n){let i=e.data,s=Hn.from(e.headers).normalize(),o=e.responseType,a;function c(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}G.isFormData(i)&&(Fn.isStandardBrowserEnv||Fn.isStandardBrowserWebWorkerEnv?s.setContentType(!1):s.setContentType("multipart/form-data;",!1));let l=new XMLHttpRequest;if(e.auth){let f=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(f+":"+y))}let u=cd(e.baseURL,e.url);l.open(e.method.toUpperCase(),ad(u,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function d(){if(!l)return;let f=Hn.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),b={data:!o||o==="text"||o==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:f,config:e,request:l};xl(function(S){r(S),c()},function(S){n(S),c()},b),l=null}if("onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(d)},l.onabort=function(){!l||(n(new Je("Request aborted",Je.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new Je("Network Error",Je.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",b=e.transitional||Fm;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),n(new Je(y,b.clarifyTimeoutError?Je.ETIMEDOUT:Je.ECONNABORTED,e,l)),l=null},Fn.isStandardBrowserEnv){let f=(e.withCredentials||sW(u))&&e.xsrfCookieName&&iW.read(e.xsrfCookieName);f&&s.set(e.xsrfHeaderName,f)}i===void 0&&s.setContentType(null),"setRequestHeader"in l&&G.forEach(s.toJSON(),function(y,b){l.setRequestHeader(b,y)}),G.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),o&&o!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",oW(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",oW(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=f=>{!l||(n(!f||f.type?new Ro(null,e,l):f),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));let m=Wg(u);if(m&&Fn.protocols.indexOf(m)===-1){n(new Je("Unsupported protocol "+m+":",Je.ERR_BAD_REQUEST,e));return}l.send(i||null)})};var Gx={http:nW,xhr:aW};G.forEach(Gx,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var cW={getAdapter:e=>{e=G.isArray(e)?e:[e];let{length:t}=e,r,n;for(let i=0;i<t&&(r=e[i],!(n=G.isString(r)?Gx[r.toLowerCase()]:r));i++);if(!n)throw n===!1?new Je(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(G.hasOwnProp(Gx,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`);if(!G.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:Gx};function Lq(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ro(null,e)}function Xx(e){return Lq(e),e.headers=Hn.from(e.headers),e.data=Ug.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),cW.getAdapter(e.adapter||Im.adapter)(e).then(function(n){return Lq(e),n.data=Ug.call(e,e.transformResponse,n),n.headers=Hn.from(n.headers),n},function(n){return Gg(n)||(Lq(e),n&&n.response&&(n.response.data=Ug.call(e,e.transformResponse,n.response),n.response.headers=Hn.from(n.response.headers))),Promise.reject(n)})}var lW=e=>e instanceof Hn?e.toJSON():e;function mc(e,t){t=t||{};let r={};function n(l,u,d){return G.isPlainObject(l)&&G.isPlainObject(u)?G.merge.call({caseless:d},l,u):G.isPlainObject(u)?G.merge({},u):G.isArray(u)?u.slice():u}function i(l,u,d){if(G.isUndefined(u)){if(!G.isUndefined(l))return n(void 0,l,d)}else return n(l,u,d)}function s(l,u){if(!G.isUndefined(u))return n(void 0,u)}function o(l,u){if(G.isUndefined(u)){if(!G.isUndefined(l))return n(void 0,l)}else return n(void 0,u)}function a(l,u,d){if(d in t)return n(l,u);if(d in e)return n(void 0,l)}let c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials: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:a,headers:(l,u)=>i(lW(l),lW(u),!0)};return G.forEach(Object.keys(Object.assign({},e,t)),function(u){let d=c[u]||i,m=d(e[u],t[u],u);G.isUndefined(m)&&d!==a||(r[u]=m)}),r}var Mq={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Mq[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var uW={};Mq.transitional=function(t,r,n){function i(s,o){return"[Axios v"+pd+"] Transitional option '"+s+"'"+o+(n?". "+n:"")}return(s,o,a)=>{if(t===!1)throw new Je(i(o," has been removed"+(r?" in "+r:"")),Je.ERR_DEPRECATED);return r&&!uW[o]&&(uW[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,o,a):!0}};function KRe(e,t,r){if(typeof e!="object")throw new Je("options must be an object",Je.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),i=n.length;for(;i-- >0;){let s=n[i],o=t[s];if(o){let a=e[s],c=a===void 0||o(a,s,e);if(c!==!0)throw new Je("option "+s+" must be "+c,Je.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Je("Unknown option "+s,Je.ERR_BAD_OPTION)}}var Hx={assertOptions:KRe,validators:Mq};var El=Hx.validators,jm=class{constructor(t){this.defaults=t,this.interceptors={request:new _q,response:new _q}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=mc(this.defaults,r);let{transitional:n,paramsSerializer:i,headers:s}=r;n!==void 0&&Hx.assertOptions(n,{silentJSONParsing:El.transitional(El.boolean),forcedJSONParsing:El.transitional(El.boolean),clarifyTimeoutError:El.transitional(El.boolean)},!1),i!=null&&(G.isFunction(i)?r.paramsSerializer={serialize:i}:Hx.assertOptions(i,{encode:El.function,serialize:El.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o;o=s&&G.merge(s.common,s[r.method]),o&&G.forEach(["delete","get","head","post","put","patch","common"],y=>{delete s[y]}),r.headers=Hn.concat(o,s);let a=[],c=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(r)===!1||(c=c&&b.synchronous,a.unshift(b.fulfilled,b.rejected))});let l=[];this.interceptors.response.forEach(function(b){l.push(b.fulfilled,b.rejected)});let u,d=0,m;if(!c){let y=[Xx.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,l),m=y.length,u=Promise.resolve(r);d<m;)u=u.then(y[d++],y[d++]);return u}m=a.length;let f=r;for(d=0;d<m;){let y=a[d++],b=a[d++];try{f=y(f)}catch(v){b.call(this,v);break}}try{u=Xx.call(this,f)}catch(y){return Promise.reject(y)}for(d=0,m=l.length;d<m;)u=u.then(l[d++],l[d++]);return u}getUri(t){t=mc(this.defaults,t);let r=cd(t.baseURL,t.url);return ad(r,t.params,t.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(t){jm.prototype[t]=function(r,n){return this.request(mc(n||{},{method:t,url:r,data:(n||{}).data}))}});G.forEach(["post","put","patch"],function(t){function r(n){return function(s,o,a){return this.request(mc(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}jm.prototype[t]=r(),jm.prototype[t+"Form"]=r(!0)});var Yg=jm;var Jg=class{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});let n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s,o=new Promise(a=>{n.subscribe(a),s=a}).then(i);return o.cancel=function(){n.unsubscribe(s)},o},t(function(s,o,a){n.reason||(n.reason=new Ro(s,o,a),r(n.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 r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new Jg(function(i){t=i}),cancel:t}}},dW=Jg;function jq(e){return function(r){return e.apply(null,r)}}function zq(e){return G.isObject(e)&&e.isAxiosError===!0}var $q={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($q).forEach(([e,t])=>{$q[t]=e});var pW=$q;function mW(e){let t=new Yg(e),r=Mg(Yg.prototype.request,t);return G.extend(r,Yg.prototype,t,{allOwnKeys:!0}),G.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return mW(mc(e,i))},r}var Vn=mW(Im);Vn.Axios=Yg;Vn.CanceledError=Ro;Vn.CancelToken=dW;Vn.isCancel=Gg;Vn.VERSION=pd;Vn.toFormData=wl;Vn.AxiosError=Je;Vn.Cancel=Vn.CanceledError;Vn.all=function(t){return Promise.all(t)};Vn.spread=jq;Vn.isAxiosError=zq;Vn.mergeConfig=mc;Vn.AxiosHeaders=Hn;Vn.formToJSON=e=>Fx(G.isHTMLForm(e)?new FormData(e):e);Vn.HttpStatusCode=pW;Vn.default=Vn;var Qs=Vn;var{Axios:e5t,AxiosError:t5t,CanceledError:r5t,isCancel:n5t,CancelToken:i5t,VERSION:s5t,all:o5t,Cancel:a5t,isAxiosError:c5t,spread:l5t,toFormData:u5t,AxiosHeaders:d5t,HttpStatusCode:p5t,formToJSON:m5t,mergeConfig:f5t}=Qs;var fW=ee(yq());function YRe(e){Qs.defaults.headers.common.Authorization=e}function JRe(e,t){Qs.defaults.headers.common["x-api-client"]=e,Qs.defaults.headers.common["x-api-client-version"]=t}var fd="https://goldsky.com";function QRe(e){fd=e}function hW(e,t,r=fd){return`${r}${typeof e=="string"?e:e(t)}`}function ZRe(){return new fW.default}async function gW(e,t,r=fd){return Vx(e,"get",t||{},r)}async function yW(e,t,r=fd){return Vx(e,"delete",t||{},r)}async function bW(e,t,r=fd){return Vx(e,"put",t||{},r)}async function vW(e,t,r=fd){return Vx(e,"post",t||{},r)}async function Vx(e,t,r,n=fd){var s;let i=Gr(Qt(Qt(Qt({url:hW(e,r.params,n),method:t},r.querystring?{params:r.querystring}:{}),r.body?{data:r.body}:{}),typeof((s=r.body)==null?void 0:s.getHeaders)=="function"?{headers:r.body.getHeaders()}:{}),{maxBodyLength:1/0,maxContentLength:1/0,validateStatus:()=>!0,onUploadProgress:o=>{!r.onProgress||!o.total||r.onProgress(Math.round(o.loaded*100/o.total))}});try{let o=await Qs.request(i);return o.status<200||o.status>=300?o.status===524?[{statusCode:524,error:"Cloudflare timeout",message:"Cloudflare timeout"},{}]:"statusCode"in o.data&&"error"in o.data&&"message"in o.data&&typeof o.data.statusCode=="number"&&typeof o.data.error=="string"&&typeof o.data.message=="string"?[o.data,o.data]:[{statusCode:o.data.statusCode||o.status,error:o.data.error||o.statusText,message:o.data.message||o.data.toString()},o.data]:[null,o.data||{}]}catch(o){if(!o||typeof o!="object"||!("code"in o)||typeof o.code!="string")throw o;return[{statusCode:0,error:"Request failed",message:o.code},{}]}}var Uq=class{constructor(t){O7(this,"host");this.host=t}async get(t,r){return gW(t,r,this.host)}async delete(t,r){return yW(t,r,this.host)}async put(t,r){return bW(t,r,this.host)}async post(t,r){return vW(t,r,this.host)}};var jt=ee(gt()),y5t=jt.Type.Object({name:jt.Type.String(),webhookUrl:jt.Type.String(),entity:jt.Type.String(),numRetries:jt.Type.Optional(jt.Type.Number()),retryIntervalSeconds:jt.Type.Optional(jt.Type.Number()),retryTimeoutSeconds:jt.Type.Optional(jt.Type.Number())}),b5t=jt.Type.Object({subgraphName:jt.Type.String(),subgraphVersion:jt.Type.String()});var v5t=jt.Type.Object({data:jt.Type.Object({webhookSecret:jt.Type.String(),id:jt.Type.String(),name:jt.Type.String()})}),_5t=jt.Type.Object({name:jt.Type.String()});var S5t=jt.Type.Object({data:jt.Type.Object({})}),eTe=jt.Type.Object({id:jt.Type.String(),name:jt.Type.String(),webhookUrl:jt.Type.String(),entity:jt.Type.String(),subgraphName:jt.Type.String(),subgraphVersion:jt.Type.String(),created_at:jt.Type.Number()}),w5t=jt.Type.Object({data:jt.Type.Array(eTe)}),x5t=jt.Type.Object({data:jt.Type.Array(jt.Type.Object({name:jt.Type.String()}))}),C5t=jt.Type.Object({subgraphName:jt.Type.String(),subgraphVersion:jt.Type.String()});var xt=ee(gt()),E5t=xt.Type.Object({id:xt.Type.String(),name:xt.Type.String(),description:xt.Type.String(),base_price_decimal:xt.Type.String(),features:xt.Type.Array(xt.Type.String()),isHidden:xt.Type.Boolean()}),D5t=xt.Type.Object({id:xt.Type.String(),latestInvoice:xt.Type.Union([xt.Type.String(),xt.Type.Null()]),product:xt.Type.Object({id:xt.Type.String(),name:xt.Type.String(),description:xt.Type.Union([xt.Type.String(),xt.Type.Null()]),basePrice:xt.Type.Object({amount:xt.Type.Union([xt.Type.String(),xt.Type.Null()]),interval:xt.Type.String()}),metadata:xt.Type.Record(xt.Type.String(),xt.Type.String())})}),A5t=xt.Type.Object({usageInCents:xt.Type.Number(),totalCreditsInCents:xt.Type.Optional(xt.Type.Number())}),_W=xt.Type.Object({subgraphsLimit:xt.Type.Number(),webhooksLimit:xt.Type.Number(),mirrorStreamsLimit:xt.Type.Number(),fusionStreamsLimit:xt.Type.Number(),enterprise:xt.Type.Boolean(),starterPlanPaused:xt.Type.Boolean()}),rTe=xt.Type.Object({latestUsage:xt.Type.Number(),maxFreeUsage:xt.Type.Number(),remainingFreeUsage:xt.Type.Number(),priceName:xt.Type.String()}),P5t=xt.Type.Object({priceSummaries:xt.Type.Array(rTe),billingPeriodEnd:xt.Type.Number(),starterPlanPaused:xt.Type.Boolean()});var Wn=ee(gt()),iTe=Wn.Type.Union([Wn.Type.Literal("1d"),Wn.Type.Literal("6h"),Wn.Type.Literal("1h")]),k5t=Wn.Type.Object({from:Wn.Type.String(),to:Wn.Type.String(),bucketSize:iTe,timeZone:Wn.Type.String()}),O5t=Wn.Type.Object({id:Wn.Type.String()}),R5t=Wn.Type.Object({referenceName:Wn.Type.String(),streamName:Wn.Type.String()}),T5t=Wn.Type.Object({data:Wn.Type.Array(Wn.Type.Object({time:Wn.Type.Number(),value:Wn.Type.Number()}))});var Qg=ee(gt()),F5t=Qg.Type.Object({message:Qg.Type.String()}),I5t=Qg.Type.Object({success:Qg.Type.Boolean()});var it={};ft(it,{AllResourceSizes:()=>EW,AllSinksOutputTypebox:()=>gd,AllSinksRootTypebox:()=>Hq,AllSourcesOutputTypebox:()=>iy,AllSourcesRootTypebox:()=>Gq,AllStreamCliOuputFormats:()=>aTe,AllStreamStatusValidAtCreate:()=>cTe,AllStreamStatuses:()=>eC,AllTransformsOutputTypebox:()=>hd,AllTransformsRootTypebox:()=>Xq,BlackholeSinkRootTypebox:()=>fy,ClickHouseSinkRootTypebox:()=>py,CreateSnapshotInternalSchema:()=>QTe,DatasetGroupRootTypebox:()=>Zg,DatasetSchema:()=>SW,DatasetSourceOutputTypebox:()=>Yx,DatasetSourceRootTypebox:()=>fc,DefinitionOutputTypebox:()=>PW,DefinitionRootTypebox:()=>AW,DeleteStreamSchema:()=>HTe,ElasticSearchRootTypebox:()=>ay,FileSinkFormat:()=>xW,FileSinkFormatTypebox:()=>CW,FileSinkRootTypebox:()=>uy,FileSourceOutputTypebox:()=>Zx,FileSourceRootTypebox:()=>ny,GetStreamSchema:()=>mTe,HypertableSinkRootTypebox:()=>ly,JobErrorTypebox:()=>KW,KafkaSinkRootTypebox:()=>cy,KafkaSourceOutputTypebox:()=>Qx,KafkaSourceRootTypebox:()=>ry,KafkaStorageRootTypebox:()=>wW,ListStreamsSchema:()=>rFe,POSTAllSourcesInputTypebox:()=>kW,POSTBlackholeSinkInputTypebox:()=>mC,POSTClickHouseSinkInputTypebox:()=>dC,POSTDatasetSourceInputTypebox:()=>rC,POSTDefinitionInputTypebox:()=>fC,POSTDefinitionInputValidator:()=>lFe,POSTElasticSearchSinkInputTypebox:()=>oC,POSTFileSinkInputTypebox:()=>lC,POSTFileSourceInputTypebox:()=>nC,POSTHypertableSinkInputTypebox:()=>cC,POSTKafkaSinkInputTypebox:()=>aC,POSTKafkaSourceInputTypebox:()=>Um,POSTPostgresSinkInputTypebox:()=>sC,POSTPrintSinkInputTypebox:()=>pC,POSTRocksetSinkInputTypebox:()=>uC,POSTSQLTransformInputTypebox:()=>iC,POSTStreamInputTypebox:()=>Wq,POSTStreamInputValidator:()=>aFe,POSTSubgraphEntitySourceInputTypebox:()=>tC,PUTDefinitionInputTypebox:()=>nB,PUTDefinitionInputValidator:()=>UTe,PUTStreamInputTypeValidator:()=>GTe,PUTStreamInputTypebox:()=>CC,PUTStreamInputValidator:()=>cFe,PostgresSinkRootTypebox:()=>oy,PrintSinkRootTypebox:()=>my,QueryStreamRuntimeDetailsInputTypebox:()=>iFe,ResourceSizeTypebox:()=>$m,RestartStreamInternalSchema:()=>tFe,RocksetSinkRootTypebox:()=>dy,RuntimeDetails:()=>YW,SQLTransformRootTypebox:()=>sy,SinkSchemaValidatorByType:()=>pFe,SinkTypes:()=>sn,SourceSchemaValidatorByType:()=>uFe,SourceTypes:()=>Zs,StartAtOptionsTypebox:()=>Kx,StatTypebox:()=>WW,StorageTypes:()=>Wx,StreamNameAndVersion:()=>VW,StreamNameVersionRuntimeDetailsTypebox:()=>nFe,StreamOutputArrayTypeValidator:()=>sFe,StreamOutputTypeValidator:()=>oFe,StreamOutputTypebox:()=>ca,StreamRootRunnableTypebox:()=>KTe,StreamRootTypebox:()=>Dl,StreamStatusTypebox:()=>DW,StreamStatusWithoutPauseTypebox:()=>Vq,SubgraphEntitySourceOutputTypebox:()=>Jx,SubgraphEntitySourceRootTypebox:()=>ty,SubgraphSourceEntityRootTypebox:()=>ey,TransformSchemaValidatorByType:()=>dFe,TransformationTypes:()=>zm,ValidateNewStreamSchema:()=>WTe});var Rt=ee(gt());var Ce=ee(gt()),Zs;(function(e){e.SubgraphEntity="subgraphEntity",e.Kafka="kafka",e.File="file",e.Dataset="dataset"})(Zs||(Zs={}));var Kx=Ce.Type.Union([Ce.Type.Literal("earliest"),Ce.Type.Literal("latest")]),Zg=Ce.Type.Object({name:Ce.Type.String(),displayName:Ce.Type.String(),description:Ce.Type.Optional(Ce.Type.String())}),SW=Ce.Type.Object({name:Ce.Type.String(),datatype:Ce.Type.String(),description:Ce.Type.Optional(Ce.Type.String())}),Wx;(function(e){e.Kafka="kafka"})(Wx||(Wx={}));var wW=Ce.Type.Object({type:Ce.Type.Literal(Wx.Kafka),topic:Ce.Type.String(),secretName:Ce.Type.String()}),fc=Ce.Type.Object({id:Ce.Type.String(),type:Ce.Type.Literal(Zs.Dataset),name:Ce.Type.String(),version:Ce.Type.String(),displayName:Ce.Type.String(),namespace:Ce.Type.String(),referenceName:Ce.Type.String(),description:Ce.Type.Optional(Ce.Type.String()),changelog:Ce.Type.Optional(Ce.Type.String()),schema:Ce.Type.Array(SW),isDeprecated:Ce.Type.Optional(Ce.Type.Boolean()),storages:Ce.Type.Array(Ce.Type.Union([wW])),groups:Ce.Type.Array(Ce.Type.String()),startAt:Ce.Type.Optional(Kx)}),Yx=Ce.Type.Pick(fc,["name","version","startAt","type","description","referenceName"]),ey=Ce.Type.Object({name:Ce.Type.String(),kafkaTopic:Ce.Type.String()},{additionalProperties:!1}),ty=Ce.Type.Object({id:Ce.Type.String(),description:Ce.Type.Optional(Ce.Type.String()),referenceName:Ce.Type.String(),namespace:Ce.Type.Optional(Ce.Type.String()),type:Ce.Type.Literal(Zs.SubgraphEntity),deployments:Ce.Type.Array(Ce.Type.Object({id:Ce.Type.String()},{additionalProperties:!1})),entity:ey,secretName:Ce.Type.String()},{additionalProperties:!1}),Jx=Ce.Type.Intersect([Ce.Type.Omit(ty,["secretName","entity","id"],{additionalProperties:!1}),Ce.Type.Object({entity:Ce.Type.Omit(ey,["kafkaTopic"],{additionalProperties:!1})},{additionalProperties:!1})],{additionalProperties:!1}),ry=Ce.Type.Object({id:Ce.Type.String(),description:Ce.Type.Optional(Ce.Type.String()),name:Ce.Type.Optional(Ce.Type.String()),namespace:Ce.Type.Optional(Ce.Type.String()),referenceName:Ce.Type.String(),type:Ce.Type.Literal(Zs.Kafka),topic:Ce.Type.String({maxLength:255}),startingOffsets:Ce.Type.Optional(Ce.Type.String()),secretName:Ce.Type.String()},{additionalProperties:!1}),Qx=Ce.Type.Omit(ry,["secretName","id"],{additionalProperties:!1}),ny=Ce.Type.Object({id:Ce.Type.String(),description:Ce.Type.Optional(Ce.Type.String()),name:Ce.Type.Optional(Ce.Type.String()),namespace:Ce.Type.Optional(Ce.Type.String()),referenceName:Ce.Type.String(),secretName:Ce.Type.String(),type:Ce.Type.Literal(Zs.File),path:Ce.Type.String(),format:Ce.Type.String(),tableDefinitionPath:Ce.Type.String(),monitorInterval:Ce.Type.Optional(Ce.Type.String())},{additionalProperties:!1}),Zx=Ce.Type.Omit(ny,["secretName","id"],{additionalProperties:!1}),Gq=Ce.Type.Union([ty,ry,ny,fc],{additionalProperties:!1}),iy=Ce.Type.Union([Jx,Qx,Zx,Yx]);var Ai=ee(gt()),zm;(function(e){e.SQL="sql"})(zm||(zm={}));var sy=Ai.Type.Object({id:Ai.Type.String(),description:Ai.Type.Optional(Ai.Type.String()),type:Ai.Type.Literal(zm.SQL),name:Ai.Type.String(),referenceName:Ai.Type.Optional(Ai.Type.String()),sql:Ai.Type.String({maxLength:5e3}),primaryKey:Ai.Type.String({maxLength:50})},{additionalProperties:!1}),Xq=Ai.Type.Union([sy]),hd=Ai.Type.Intersect([Ai.Type.Omit(sy,["id"]),Ai.Type.Object({referenceName:Ai.Type.String()})]);var j=ee(gt()),sn;(function(e){e.Postgres="postgres",e.ElasticSearch="elasticSearch",e.Kafka="kafka",e.TimescaleHypertable="timescaleHypertable",e.File="file",e.Rockset="rockset",e.ClickHouse="clickHouse",e.Print="print",e.Blackhole="blackhole"})(sn||(sn={}));var oy=j.Type.Object({id:j.Type.String(),referenceName:j.Type.Optional(j.Type.String()),description:j.Type.Optional(j.Type.String()),type:j.Type.Literal(sn.Postgres),sourceStreamName:j.Type.String(),schema:j.Type.String(),table:j.Type.String(),secretName:j.Type.String(),sinkBufferMaxRows:j.Type.Optional(j.Type.Integer()),sinkBufferInterval:j.Type.Optional(j.Type.String()),scanAutocommit:j.Type.Optional(j.Type.Boolean()),rewriteBatchedInserts:j.Type.Optional(j.Type.Boolean())},{additionalProperties:!1}),ay=j.Type.Object({id:j.Type.String(),referenceName:j.Type.Optional(j.Type.String()),description:j.Type.Optional(j.Type.String()),type:j.Type.Literal(sn.ElasticSearch),sourceStreamName:j.Type.String(),index:j.Type.String(),secretName:j.Type.String()},{additionalProperties:!1}),cy=j.Type.Object({id:j.Type.String(),referenceName:j.Type.Optional(j.Type.String()),description:j.Type.Optional(j.Type.String()),type:j.Type.Literal(sn.Kafka),sourceStreamName:j.Type.String(),topic:j.Type.String({maxLength:255}),secretName:j.Type.String(),topicPartitions:j.Type.Optional(j.Type.Integer()),upsertMode:j.Type.Optional(j.Type.Boolean()),dataFormat:j.Type.Optional(j.Type.Union([j.Type.Literal("avro"),j.Type.Literal("json")]))},{additionalProperties:!1}),ly=j.Type.Object({id:j.Type.String(),referenceName:j.Type.Optional(j.Type.String()),description:j.Type.Optional(j.Type.String()),type:j.Type.Literal(sn.TimescaleHypertable),sourceStreamName:j.Type.String(),schema:j.Type.String(),table:j.Type.String(),timestampColumn:j.Type.String(),primaryKey:j.Type.String(),timestampDataTypeAdapterFuncName:j.Type.Optional(j.Type.String()),secretName:j.Type.String(),sinkBufferMaxRows:j.Type.Optional(j.Type.Integer()),sinkBufferInterval:j.Type.Optional(j.Type.String()),scanAutocommit:j.Type.Optional(j.Type.Boolean()),rewriteBatchedInserts:j.Type.Optional(j.Type.Boolean())},{additionalProperties:!1}),xW=["csv","parquet"],CW=j.Type.Union(xW.map(e=>j.Type.Literal(e))),uy=j.Type.Object({id:j.Type.String(),referenceName:j.Type.Optional(j.Type.String()),description:j.Type.Optional(j.Type.String()),type:j.Type.Literal(sn.File),sourceStreamName:j.Type.String(),secretName:j.Type.String(),path:j.Type.String(),format:j.Type.String(CW),autoCompaction:j.Type.Optional(j.Type.Boolean()),partitionColumns:j.Type.Optional(j.Type.String()),shuffleByPartition:j.Type.Optional(j.Type.Boolean()),dedupColumn:j.Type.Optional(j.Type.String()),dedupTTLMinutes:j.Type.Optional(j.Type.Integer()),lwwColumn:j.Type.Optional(j.Type.String()),lwwTTLMinutes:j.Type.Optional(j.Type.String()),rollingPolicyFileSize:j.Type.Optional(j.Type.String()),rollingPolicyRolloverInterval:j.Type.Optional(j.Type.String()),rollingPolicyCheckInterval:j.Type.Optional(j.Type.String())},{additionalProperties:!1}),dy=j.Type.Object({id:j.Type.String(),referenceName:j.Type.Optional(j.Type.String()),description:j.Type.Optional(j.Type.String()),type:j.Type.Literal(sn.Rockset),sourceStreamName:j.Type.String(),secretName:j.Type.String(),workspace:j.Type.String(),collection:j.Type.String(),ingestTransformationSql:j.Type.Optional(j.Type.String()),flushSize:j.Type.Optional(j.Type.Integer()),flushIntervalMs:j.Type.Optional(j.Type.Integer()),retryCount:j.Type.Optional(j.Type.Integer())},{additionalProperties:!1}),py=j.Type.Object({id:j.Type.String(),referenceName:j.Type.Optional(j.Type.String()),description:j.Type.Optional(j.Type.String()),type:j.Type.Literal(sn.ClickHouse),sourceStreamName:j.Type.String(),secretName:j.Type.String(),table:j.Type.String(),batchSize:j.Type.Optional(j.Type.Integer()),flushInterval:j.Type.Optional(j.Type.String()),appendOnlyMode:j.Type.Optional(j.Type.Boolean()),versionColumnName:j.Type.Optional(j.Type.String())},{additionalProperties:!1}),my=j.Type.Object({id:j.Type.String(),referenceName:j.Type.Optional(j.Type.String()),type:j.Type.Literal(sn.Print),sourceStreamName:j.Type.String(),secretName:j.Type.String()},{additionalProperties:!1}),fy=j.Type.Object({id:j.Type.String(),referenceName:j.Type.Optional(j.Type.String()),description:j.Type.Optional(j.Type.String()),type:j.Type.Literal(sn.Blackhole),sourceStreamName:j.Type.String(),secretName:j.Type.String()},{additionalProperties:!1}),Hq=j.Type.Union([oy,ay,cy,ly,uy,dy,py,my,fy],{additionalProperties:!1}),gd=j.Type.Union([j.Type.Intersect([j.Type.Omit(oy,["id"]),j.Type.Object({referenceName:j.Type.String()})]),j.Type.Intersect([j.Type.Omit(ay,["id"]),j.Type.Object({referenceName:j.Type.String()})]),j.Type.Intersect([j.Type.Omit(cy,["id"]),j.Type.Object({referenceName:j.Type.String()})]),j.Type.Intersect([j.Type.Omit(ly,["id"]),j.Type.Object({referenceName:j.Type.String()})]),j.Type.Intersect([j.Type.Omit(uy,["id"]),j.Type.Object({referenceName:j.Type.String()})]),j.Type.Intersect([j.Type.Omit(dy,["id"]),j.Type.Object({referenceName:j.Type.String()})]),j.Type.Intersect([j.Type.Omit(py,["id"]),j.Type.Object({referenceName:j.Type.String()})]),j.Type.Intersect([j.Type.Omit(my,["id"]),j.Type.Object({referenceName:j.Type.String()})]),j.Type.Intersect([j.Type.Omit(fy,["id"]),j.Type.Object({referenceName:j.Type.String()})])]);var yt=ee(gt());var aTe=["json","table","yaml"],EW=["s","m","l","xl","xxl"],$m=yt.Type.Union(EW.map(e=>yt.Type.Literal(e))),eC=["ACTIVE","INACTIVE","PAUSED"],cTe=eC.filter(e=>e!=="PAUSED"),DW=yt.Type.Union(eC.map(e=>yt.Type.Literal(e))),Vq=yt.Type.Union(eC.filter(e=>e!=="PAUSED").map(e=>yt.Type.Literal(e))),AW=yt.Type.Object({sources:yt.Type.Array(Gq,{minItems:1}),transforms:yt.Type.Array(Xq),sinks:yt.Type.Array(Hq)},{additionalProperties:!1}),PW=yt.Type.Object({sources:yt.Type.Array(iy,{minItems:1}),transforms:yt.Type.Array(hd),sinks:yt.Type.Array(gd)},{additionalProperties:!1}),lTe=yt.Type.Object({imageTag:yt.Type.Optional(yt.Type.String()),flinkConf:yt.Type.Optional(yt.Type.Object({})),env:yt.Type.Optional(yt.Type.Object({}))},{additionalProperties:!1}),Dl=yt.Type.Object({id:yt.Type.String(),name:yt.Type.String(),description:yt.Type.Optional(yt.Type.String()),version:yt.Type.Integer(),definition:AW,status:DW,project_id:yt.Type.String(),created_at:yt.Type.Number(),updated_at:yt.Type.Number(),resource_size:yt.Type.String($m),latest_snapshot_id:yt.Type.Optional(yt.Type.String()),from_snapshot_id:yt.Type.Optional(yt.Type.String()),is_deleted:yt.Type.Boolean(),audit_log:yt.Type.Optional(yt.Type.String()),support_tier:yt.Type.Optional(yt.Type.Integer()),config_overrides:yt.Type.Optional(lTe),updated_by_user_id:yt.Type.Optional(yt.Type.String())},{additionalProperties:!1}),ca=yt.Type.Intersect([yt.Type.Omit(Dl,["definition","audit_log","updated_by_user_id","from_snapshot_id","latest_snapshot_id","is_deleted","config_overrides","id"],{additionalProperties:!1}),yt.Type.Object({definition:PW,is_deleted:yt.Type.Optional(yt.Type.Boolean())},{additionalProperties:!1})],{additionalProperties:!1});var tC=Rt.Type.Intersect([Rt.Type.Omit(ty,["id","referenceName","secretName","entity"],{additionalProperties:!1}),Rt.Type.Object({entity:Rt.Type.Omit(ey,["kafkaTopic"]),referenceName:Rt.Type.Optional(Rt.Type.String())},{additionalProperties:!1})],{additionalProperties:!1}),rC=Rt.Type.Intersect([Rt.Type.Pick(fc,["name","version","startAt","type","description"]),Rt.Type.Object({referenceName:Rt.Type.Optional(Rt.Type.String())})]),Um=Rt.Type.Intersect([Rt.Type.Omit(ry,["id","secretName","referenceName"],{additionalProperties:!1}),Rt.Type.Object({referenceName:Rt.Type.Optional(Rt.Type.String())},{additionalProperties:!1})]),nC=Rt.Type.Intersect([Rt.Type.Omit(ny,["id","secretName","referenceName"],{additionalProperties:!1}),Rt.Type.Object({referenceName:Rt.Type.Optional(Rt.Type.String())})]),iC=Rt.Type.Omit(sy,["id"],{additionalProperties:!1}),uTe=Rt.Type.Union([iC],{additionalProperties:!1}),sC=Rt.Type.Omit(oy,["id"],{additionalProperties:!1}),oC=Rt.Type.Omit(ay,["id"],{additionalProperties:!1}),aC=Rt.Type.Omit(cy,["id"],{additionalProperties:!1}),cC=Rt.Type.Omit(ly,["id"],{additionalProperties:!1}),lC=Rt.Type.Omit(uy,["id"],{additionalProperties:!1}),uC=Rt.Type.Omit(dy,["id"],{additionalProperties:!1}),dC=Rt.Type.Omit(py,["id"],{additionalProperties:!1}),pC=Rt.Type.Omit(my,["id"],{additionalProperties:!1}),mC=Rt.Type.Omit(fy,["id"],{additionalProperties:!1}),kW=Rt.Type.Union([tC,Um,nC,rC],{additionalProperties:!1}),dTe=Rt.Type.Union([sC,oC,aC,cC,lC,uC,dC,pC,mC],{additionalProperties:!1}),fC=Rt.Type.Object({sources:Rt.Type.Array(kW,{minItems:1}),transforms:Rt.Type.Array(uTe),sinks:Rt.Type.Array(dTe,{minItems:1})},{additionalProperties:!1}),Wq=Rt.Type.Intersect([Rt.Type.Omit(Dl,["id","status","definition","project_id","version","created_at","updated_at","is_deleted","audit_log","resource_size","config_overrides"],{additionalProperties:!1}),Rt.Type.Object({definition:fC,resource_size:Rt.Type.Optional(Rt.Type.String($m)),status:Rt.Type.Optional(Vq)},{additionalProperties:!1})],{additionalProperties:!1});var Gm=ee(gt());var pTe=Gm.Type.Object({name:Gm.Type.String(),version:Gm.Type.Optional(Gm.Type.String())},{additionalProperties:!1}),mTe={params:pTe,response:{200:Gm.Type.Array(ca)}};var In=ee(gt());var rB=ee(xC());var jTe=In.Type.Union([Jx,Qx,Zx,Yx],{additionalProperties:!1}),zTe=gd,$Te=hd,nB=In.Type.Object({sources:In.Type.Array(jTe,{minItems:1}),transforms:In.Type.Array($Te),sinks:In.Type.Array(zTe)},{additionalProperties:!1}),UTe=rB.TypeCompiler.Compile(nB),CC=In.Type.Intersect([In.Type.Omit(Dl,["id","definition","project_id","version","created_at","updated_at","is_deleted","audit_log","status","resource_size","config_overrides"]),In.Type.Object({id:In.Type.Optional(In.Type.String()),definition:In.Type.Optional(nB),status:In.Type.Optional(In.Type.String()),resource_size:In.Type.Optional(In.Type.String($m)),save_progress:In.Type.Optional(In.Type.Boolean())})]),GTe=rB.TypeCompiler.Compile(CC),m4t=In.Type.Object({name:In.Type.String()},{additionalProperties:!1});var iB=ee(gt()),XTe=iB.Type.Object({name:iB.Type.String()},{additionalProperties:!1}),HTe={params:XTe,response:{204:{}}};var sB=ee(gt()),VTe=sB.Type.Object({name:sB.Type.String()}),WTe={body:VTe,response:{204:{}}};var Nn=ee(gt());var KTe=Nn.Type.Object(Gr(Qt({},Dl.properties),{snapshot_location:Nn.Type.Optional(Nn.Type.String())})),YTe=Nn.Type.Object({streamId:Nn.Type.String()}),JTe=Nn.Type.Object({userEmail:Nn.Type.String(),fromSnapshotLocation:Nn.Type.Optional(Nn.Type.String())}),QTe={params:YTe,body:JTe,response:{204:{}}},ZTe=Nn.Type.Object({streamId:Nn.Type.String()}),eFe=Nn.Type.Object({userEmail:Nn.Type.String(),takeSnapshot:Nn.Type.Optional(Nn.Type.Boolean()),fromSnapshotId:Nn.Type.Optional(Nn.Type.String()),fromSnapshotLocation:Nn.Type.Optional(Nn.Type.String())}),tFe={params:ZTe,body:eFe,response:{204:{}}};var HW=ee(gt());var rFe={response:{200:HW.Type.Array(ca)}};var Xr=ee(gt());var VW=Xr.Type.Object({name:Xr.Type.String(),version:Xr.Type.Optional(Xr.Type.Union([Xr.Type.Integer(),Xr.Type.String()]))},{additionalProperties:!1}),WW=Xr.Type.Object({key:Xr.Type.String(),value:Xr.Type.Number()}),KW=Xr.Type.Object({message:Xr.Type.String(),definitionId:Xr.Type.String(),source:Xr.Type.Optional(iy),transform:Xr.Type.Optional(hd),sink:Xr.Type.Optional(gd)}),YW=Xr.Type.Object({status:Xr.Type.String(),errors:Xr.Type.Array(KW),jobStats:Xr.Type.Optional(Xr.Type.Array(WW))},{additionalProperties:!1}),nFe=Xr.Type.Object({name:Xr.Type.String(),version:Xr.Type.Integer(),runtimeDetails:YW},{additionalProperties:!1}),iFe=Xr.Type.Object({namesAndVersions:Xr.Type.Array(VW)},{additionalProperties:!1});var qn=ee(xC());var JW=ee(gt());var sFe=qn.TypeCompiler.Compile(JW.Type.Array(ca)),oFe=qn.TypeCompiler.Compile(ca),aFe=qn.TypeCompiler.Compile(Wq),cFe=qn.TypeCompiler.Compile(CC),lFe=qn.TypeCompiler.Compile(fC),uFe={[Zs.File]:qn.TypeCompiler.Compile(nC),[Zs.Kafka]:qn.TypeCompiler.Compile(Um),[Zs.SubgraphEntity]:qn.TypeCompiler.Compile(tC),[Zs.Dataset]:qn.TypeCompiler.Compile(rC)},dFe={[zm.SQL]:qn.TypeCompiler.Compile(iC)},pFe={[sn.File]:qn.TypeCompiler.Compile(lC),[sn.Kafka]:qn.TypeCompiler.Compile(aC),[sn.Postgres]:qn.TypeCompiler.Compile(sC),[sn.ElasticSearch]:qn.TypeCompiler.Compile(oC),[sn.TimescaleHypertable]:qn.TypeCompiler.Compile(cC),[sn.Rockset]:qn.TypeCompiler.Compile(uC),[sn.ClickHouse]:qn.TypeCompiler.Compile(dC),[sn.Print]:qn.TypeCompiler.Compile(pC),[sn.Blackhole]:qn.TypeCompiler.Compile(mC)};var Ht=ee(gt());var mFe=Ht.Type.Object({displayName:Ht.Type.String(),description:Ht.Type.String(),source:Um}),eK=Ht.Type.Object({label:Ht.Type.String(),value:Kx}),fFe=Ht.Type.Object({name:Ht.Type.String(),version:Ht.Type.String(),displayName:Ht.Type.String(),description:Ht.Type.Optional(Ht.Type.String()),deploymentId:Ht.Type.String(),network:Ht.Type.String(),entities:Ht.Type.Array(Ht.Type.Object({name:Ht.Type.String()}))}),QW=Ht.Type.Object({sinkType:Ht.Type.Enum(sn),displayName:Ht.Type.String(),description:Ht.Type.String()}),ZW=Ht.Type.Object({label:Ht.Type.String(),options:Ht.Type.Array(fFe)}),hFe=Ht.Type.Object({label:Ht.Type.String(),options:Ht.Type.Array(mFe),startingOffsets:Ht.Type.Array(eK)}),gFe=Ht.Type.Object({publicBlockchainDatasets:hFe,communitySubgraphs:ZW,projectSubgraphs:ZW}),yFe=Ht.Type.Omit(fc,["storages","namespace"],{additionalProperties:!1}),H4t=Ht.Type.Object({sources:gFe,datasetGroups:Ht.Type.Array(Zg),datasets:Ht.Type.Object({blockchain:Ht.Type.Array(yFe),cliUxStartAtOptions:Ht.Type.Array(eK)}),sinks:Ht.Type.Object({eligibleUserProvidedSinks:Ht.Type.Array(QW),eligibleGoldskyProvidedSinks:Ht.Type.Array(QW)})});var EC=ee(gt());var W4t=EC.Type.Object({groups:EC.Type.Array(Zg),datasets:EC.Type.Array(fc)});var fi=ee(gt());var _Fe=fi.Type.Object({id:fi.Type.String(),name:fi.Type.String(),org_id:fi.Type.Union([fi.Type.String(),fi.Type.Null()]),billing_subscription_id:fi.Type.Union([fi.Type.String(),fi.Type.Null()]),billing_customer_id:fi.Type.Union([fi.Type.String(),fi.Type.Null()]),created_at:fi.Type.Number()}),SFe=fi.Type.Object(Gr(Qt({},_Fe.properties),{capabilities:fi.Type.Partial(_W)})),Y4t=fi.Type.Object({data:SFe});var DC=ee(gt());var Al=ee(gt()),vy=Al.Type.Object({projectId:Al.Type.String(),name:Al.Type.String(),createdAt:Al.Type.Number(),currentlyAuthenticated:Al.Type.Boolean()}),Q4t=Al.Type.Object({data:Al.Type.Array(vy)});var tGt=DC.Type.Object({data:vy}),rGt=DC.Type.Object({name:DC.Type.String()});var _y=ee(gt()),iGt=_y.Type.Object({data:_y.Type.Boolean()}),sGt=_y.Type.Object({projectId:_y.Type.String()});var ua=ee(gt()),aGt=ua.Type.Object({data:ua.Type.Array(ua.Type.Object({email:ua.Type.String(),id:ua.Type.String(),firstName:ua.Type.Optional(ua.Type.String()),lastName:ua.Type.Optional(ua.Type.String())}))});var Sy=ee(gt()),lGt=Sy.Type.Object({data:Sy.Type.Boolean()}),uGt=Sy.Type.Object({email:Sy.Type.String()});var Ed=ee(gt());var mGt=Ed.Type.Object({data:vy}),fGt=Ed.Type.Object({name:Ed.Type.Optional(Ed.Type.String())}),hGt=Ed.Type.Object({projectId:Ed.Type.String()});var Xm=ee(gt()),CGt=Xm.Type.Object({data:Xm.Type.Boolean()}),EGt=Xm.Type.Object({emails:Xm.Type.Array(Xm.Type.String())});var OC=ee(gt());var Ve=ee(gt());var wy;(function(e){e.Subgraph="Subgraph",e.Stream="Stream"})(wy||(wy={}));var xy;(function(e){e.CustomSubgraph="CustomSubgraph",e.CommunitySubgraph="CommunitySubgraph"})(xy||(xy={}));var Cy;(function(e){e.SubgraphApi="SubgraphApi",e.Webhook="Webhook"})(Cy||(Cy={}));var AC=Ve.Type.Object({id:Ve.Type.String(),type:Ve.Type.Literal(wy.Subgraph),project_id:Ve.Type.String(),name:Ve.Type.String(),version:Ve.Type.Optional(Ve.Type.String()),description:Ve.Type.Optional(Ve.Type.String()),created_at:Ve.Type.Number(),updated_at:Ve.Type.Number()}),tK=Ve.Type.Object({type:Ve.Type.Union([Ve.Type.Literal(xy.CustomSubgraph),Ve.Type.Literal(xy.CommunitySubgraph)]),id:Ve.Type.String(),name:Ve.Type.String(),referenceName:Ve.Type.String(),version:Ve.Type.String(),created_at:Ve.Type.Number(),indexing_status:Ve.Type.Object({fatal_error:Ve.Type.Optional(Ve.Type.String()),synced:Ve.Type.Boolean(),entity_count:Ve.Type.String(),chains:Ve.Type.Array(Ve.Type.Object({head_block:Ve.Type.String(),earliest_block:Ve.Type.String(),latest_block:Ve.Type.String(),network:Ve.Type.String(),progress_percent:Ve.Type.String()}))}),status:Ve.Type.Enum({Active:"Active",Paused:"Paused"})}),AGt=Ve.Type.Union([tK]),CFe=Ve.Type.Object({type:Ve.Type.Literal(Cy.SubgraphApi),id:Ve.Type.String(),name:Ve.Type.String(),referenceName:Ve.Type.String(),url:Ve.Type.String(),subgraphDeploymentId:Ve.Type.String()}),EFe=Ve.Type.Object({type:Ve.Type.Literal(Cy.Webhook),id:Ve.Type.String(),name:Ve.Type.String(),referenceName:Ve.Type.String(),entity:Ve.Type.String(),url:Ve.Type.String()}),DFe=Ve.Type.Union([CFe,EFe]),PC=Ve.Type.Intersect([AC,Ve.Type.Object({definition:Ve.Type.Object({sources:Ve.Type.Array(tK),sinks:Ve.Type.Array(DFe)})})]),kC=Ve.Type.Intersect([Ve.Type.Omit(ca,["status"]),Ve.Type.Object({type:Ve.Type.Literal(wy.Stream)})]),rK=Ve.Type.Object({status:Ve.Type.String(),errors:Ve.Type.Array(Ve.Type.Object({message:Ve.Type.String(),referenceName:Ve.Type.Optional(Ve.Type.String())}))});var AFe=OC.Type.Union([PC,kC]),OGt=OC.Type.Object({data:OC.Type.Array(AFe)});var Pl=ee(gt());var FGt=Pl.Type.Intersect([Pl.Type.Omit(AC,["id","created_at","updated_at","project_id"]),Pl.Type.Object({subgraph_deployment_id:Pl.Type.String()})]),IGt=Pl.Type.Intersect([AC,Pl.Type.Object({subgraph_deployment_id:Pl.Type.String()})]);var kl=ee(gt());var BGt=kl.Type.Object({data:PC}),LGt=kl.Type.Object({name:kl.Type.String()});var MGt=kl.Type.Object({data:kC}),jGt=kl.Type.Object({name:kl.Type.String()});var zGt=kl.Type.Object({data:rK});var oB=ee(gt()),UGt=oB.Type.Object({name:oB.Type.String()},{additionalProperties:!1});var Dd=ee(gt()),YGt=Dd.Type.Object({token:Dd.Type.String(),email:Dd.Type.Optional(Dd.Type.String())});var JGt=Dd.Type.Object({bot:Dd.Type.Boolean()});var zt={};ft(zt,{AnySecretValueTypebox:()=>Ad,AnySecretValueValidator:()=>OFe,ClickHouseSecretTypebox:()=>lK,CreateSecretBody:()=>aB,CreateSecretSchema:()=>uK,DeleteSecretParams:()=>cB,DeleteSecretSchema:()=>dK,ElasticSearchSecretTypebox:()=>aK,InternalGetSecretSchema:()=>pK,JdbcProtocol:()=>RC,JdbcSecretTypebox:()=>iK,KafkaSecretTypebox:()=>cK,ListSecretsSchema:()=>mK,RevealSecretSchema:()=>fK,RocksetSecretTypebox:()=>sK,S3SecretTypebox:()=>oK,SaslMechanism:()=>FC,SchemaSecretType:()=>da,SecretTypebox:()=>Hm,SecretWithoutValueTypebox:()=>Pd,SecurityProtocol:()=>TC,UpdateSecretBody:()=>uB,UpdateSecretSchema:()=>hK});var Vm=ee(gt());var st=ee(gt()),nK=ee(xC()),da;(function(e){e.jdbc="jdbc",e.kafka="kafka",e.rockset="rockset",e.elasticSearch="elasticSearch",e.s3="s3",e.clickHouse="clickHouse"})(da||(da={}));var RC;(function(e){e.postgres="postgres",e.postgresql="postgresql"})(RC||(RC={}));var iK=st.Type.Object({type:st.Type.Literal(da.jdbc),protocol:st.Type.Enum(RC),host:st.Type.String(),port:st.Type.Optional(st.Type.Integer()),databaseName:st.Type.String(),user:st.Type.String(),password:st.Type.String(),ssl:st.Type.Optional(st.Type.Boolean())}),sK=st.Type.Object({type:st.Type.Literal(da.rockset),apiKey:st.Type.String(),endpoint:st.Type.String()}),oK=st.Type.Object({type:st.Type.Literal(da.s3),accessKeyId:st.Type.String(),secretAccessKey:st.Type.String(),region:st.Type.String()}),aK=st.Type.Object({type:st.Type.Literal(da.elasticSearch),host:st.Type.String(),username:st.Type.String(),password:st.Type.String()}),TC;(function(e){e.PLAINTEXT="PLAINTEXT",e.SASL_SSL="SASL_SSL"})(TC||(TC={}));var FC;(function(e){e.PLAIN="PLAIN",e.SCRAM_SHA_256="SCRAM-SHA-256",e.SCRAM_SHA_512="SCRAM-SHA-512"})(FC||(FC={}));var cK=st.Type.Object({type:st.Type.Literal(da.kafka),bootstrapServers:st.Type.String(),securityProtocol:st.Type.Enum(TC),saslMechanism:st.Type.Optional(st.Type.Enum(FC)),saslJaasUsername:st.Type.Optional(st.Type.String()),saslJaasPassword:st.Type.Optional(st.Type.String()),schemaRegistryUrl:st.Type.Optional(st.Type.String()),schemaRegistryUsername:st.Type.Optional(st.Type.String()),schemaRegistryPassword:st.Type.Optional(st.Type.String()),schemaRegistryKeyPassword:st.Type.Optional(st.Type.String()),schemaRegistryKeystore:st.Type.Optional(st.Type.String())}),lK=st.Type.Object({type:st.Type.Literal(da.clickHouse),url:st.Type.String(),username:st.Type.String(),password:st.Type.String(),databaseName:st.Type.String()}),Ad=st.Type.Union([iK,cK,sK,aK,oK,lK]),OFe=nK.TypeCompiler.Compile(Ad),Hm=st.Type.Object({id:st.Type.String(),name:st.Type.String(),type:st.Type.Enum(da),value:Ad,description:st.Type.Optional(st.Type.String()),created_at:st.Type.Number()}),Pd=st.Type.Omit(Hm,["value"]);var eXt=Vm.Type.Object({data:Pd}),aB=Vm.Type.Object({name:Vm.Type.String(),value:Ad,description:Vm.Type.Optional(Vm.Type.String())}),uK={body:aB};var pa=ee(gt()),rXt=pa.Type.Object({success:pa.Type.Boolean(),referencedStreams:pa.Type.Optional(pa.Type.Array(pa.Type.Object({streamName:pa.Type.String(),version:pa.Type.Number()})))}),cB=pa.Type.Object({secretName:pa.Type.String()}),dK={params:cB};var Ey=ee(gt());var sXt=Ey.Type.Object({data:Hm}),oXt=Ey.Type.Object({projectId:Ey.Type.String(),secretName:Ey.Type.String()}),pK={};var lB=ee(gt());var lXt=lB.Type.Object({data:lB.Type.Array(Pd)}),mK={};var IC=ee(gt());var pXt=IC.Type.Object({data:Hm}),mXt=IC.Type.Object({secretName:IC.Type.String()}),fK={};var Ol=ee(gt());var gXt=Ol.Type.Object({data:Pd}),uB=Ol.Type.Object({value:Ol.Type.Optional(Ad),description:Ol.Type.Optional(Ol.Type.String())}),RFe=Ol.Type.Object({secretName:Ol.Type.String()}),hK={body:uB,params:RFe};var ma=ee(gt()),TFe=ma.Type.Object({ipfs_hash:ma.Type.String(),db_name:ma.Type.String(),synced:ma.Type.Boolean(),failed:ma.Type.Boolean()}),EXt=ma.Type.Object({subgraphs:ma.Type.Array(TFe)}),DXt=ma.Type.Object({success:ma.Type.Boolean()});var To=ee(gt()),kXt=To.Type.Object({data:To.Type.Array(To.Type.Object({chain:To.Type.String(),shard:To.Type.String(),database:To.Type.String(),schema:To.Type.String(),table:To.Type.String(),topic:To.Type.String(),partitions:To.Type.Number()}))});var ss=ee(gt()),NFe=ss.Type.Object({id:ss.Type.String(),name:ss.Type.String(),channel:ss.Type.String(),enabled:ss.Type.Boolean(),group:ss.Type.String(),description:ss.Type.String()}),OXt=ss.Type.Object({preferences:ss.Type.Array(NFe)});var RXt=ss.Type.Object({id:ss.Type.String()}),TXt=ss.Type.Object({enabled:ss.Type.Boolean()});var kd=ee(gt()),BFe=kd.Type.Object({event_type:kd.Type.String(),name:kd.Type.String(),group:kd.Type.String(),description:kd.Type.String()}),FXt=kd.Type.Object({data:BFe});var yc=ee(gt()),IXt=yc.Type.Object({project_id:yc.Type.String()}),NXt=yc.Type.Object({success:yc.Type.Boolean()});var qXt=yc.Type.Object({project_id:yc.Type.String()}),BXt=yc.Type.Object({success:yc.Type.Boolean()});var gK="https://api.goldsky.com";var UU={};ft(UU,{builder:()=>sxt,command:()=>nxt,describe:()=>ixt,handler:()=>oxt});var zU={};ft(zU,{builder:()=>Jwt,command:()=>Kwt,describe:()=>Ywt,handler:()=>Qwt});var BU={};ft(BU,{builder:()=>Pwt,command:()=>Dwt,describe:()=>Awt,handler:()=>kwt});var Gi=ee(mB(),1),Wm=require("node:process"),Rl=ee(require("node:readline"),1),bB=ee(require("node:readline"),1),AK=require("node:tty"),Od=ee(hB(),1);function XFe({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}function PK(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(XFe(),"")}var vB={},HFe={get exports(){return vB},set exports(e){vB=e}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(n){var i=n.charCodeAt(0),s=n.length==2?n.charCodeAt(1):0,o=i;return 55296<=i&&i<=56319&&56320<=s&&s<=57343&&(i&=1023,s&=1023,o=i<<10|s,o+=65536),o==12288||65281<=o&&o<=65376||65504<=o&&o<=65510?"F":o==8361||65377<=o&&o<=65470||65474<=o&&o<=65479||65482<=o&&o<=65487||65490<=o&&o<=65495||65498<=o&&o<=65500||65512<=o&&o<=65518?"H":4352<=o&&o<=4447||4515<=o&&o<=4519||4602<=o&&o<=4607||9001<=o&&o<=9002||11904<=o&&o<=11929||11931<=o&&o<=12019||12032<=o&&o<=12245||12272<=o&&o<=12283||12289<=o&&o<=12350||12353<=o&&o<=12438||12441<=o&&o<=12543||12549<=o&&o<=12589||12593<=o&&o<=12686||12688<=o&&o<=12730||12736<=o&&o<=12771||12784<=o&&o<=12830||12832<=o&&o<=12871||12880<=o&&o<=13054||13056<=o&&o<=19903||19968<=o&&o<=42124||42128<=o&&o<=42182||43360<=o&&o<=43388||44032<=o&&o<=55203||55216<=o&&o<=55238||55243<=o&&o<=55291||63744<=o&&o<=64255||65040<=o&&o<=65049||65072<=o&&o<=65106||65108<=o&&o<=65126||65128<=o&&o<=65131||110592<=o&&o<=110593||127488<=o&&o<=127490||127504<=o&&o<=127546||127552<=o&&o<=127560||127568<=o&&o<=127569||131072<=o&&o<=194367||177984<=o&&o<=196605||196608<=o&&o<=262141?"W":32<=o&&o<=126||162<=o&&o<=163||165<=o&&o<=166||o==172||o==175||10214<=o&&o<=10221||10629<=o&&o<=10630?"Na":o==161||o==164||167<=o&&o<=168||o==170||173<=o&&o<=174||176<=o&&o<=180||182<=o&&o<=186||188<=o&&o<=191||o==198||o==208||215<=o&&o<=216||222<=o&&o<=225||o==230||232<=o&&o<=234||236<=o&&o<=237||o==240||242<=o&&o<=243||247<=o&&o<=250||o==252||o==254||o==257||o==273||o==275||o==283||294<=o&&o<=295||o==299||305<=o&&o<=307||o==312||319<=o&&o<=322||o==324||328<=o&&o<=331||o==333||338<=o&&o<=339||358<=o&&o<=359||o==363||o==462||o==464||o==466||o==468||o==470||o==472||o==474||o==476||o==593||o==609||o==708||o==711||713<=o&&o<=715||o==717||o==720||728<=o&&o<=731||o==733||o==735||768<=o&&o<=879||913<=o&&o<=929||931<=o&&o<=937||945<=o&&o<=961||963<=o&&o<=969||o==1025||1040<=o&&o<=1103||o==1105||o==8208||8211<=o&&o<=8214||8216<=o&&o<=8217||8220<=o&&o<=8221||8224<=o&&o<=8226||8228<=o&&o<=8231||o==8240||8242<=o&&o<=8243||o==8245||o==8251||o==8254||o==8308||o==8319||8321<=o&&o<=8324||o==8364||o==8451||o==8453||o==8457||o==8467||o==8470||8481<=o&&o<=8482||o==8486||o==8491||8531<=o&&o<=8532||8539<=o&&o<=8542||8544<=o&&o<=8555||8560<=o&&o<=8569||o==8585||8592<=o&&o<=8601||8632<=o&&o<=8633||o==8658||o==8660||o==8679||o==8704||8706<=o&&o<=8707||8711<=o&&o<=8712||o==8715||o==8719||o==8721||o==8725||o==8730||8733<=o&&o<=8736||o==8739||o==8741||8743<=o&&o<=8748||o==8750||8756<=o&&o<=8759||8764<=o&&o<=8765||o==8776||o==8780||o==8786||8800<=o&&o<=8801||8804<=o&&o<=8807||8810<=o&&o<=8811||8814<=o&&o<=8815||8834<=o&&o<=8835||8838<=o&&o<=8839||o==8853||o==8857||o==8869||o==8895||o==8978||9312<=o&&o<=9449||9451<=o&&o<=9547||9552<=o&&o<=9587||9600<=o&&o<=9615||9618<=o&&o<=9621||9632<=o&&o<=9633||9635<=o&&o<=9641||9650<=o&&o<=9651||9654<=o&&o<=9655||9660<=o&&o<=9661||9664<=o&&o<=9665||9670<=o&&o<=9672||o==9675||9678<=o&&o<=9681||9698<=o&&o<=9701||o==9711||9733<=o&&o<=9734||o==9737||9742<=o&&o<=9743||9748<=o&&o<=9749||o==9756||o==9758||o==9792||o==9794||9824<=o&&o<=9825||9827<=o&&o<=9829||9831<=o&&o<=9834||9836<=o&&o<=9837||o==9839||9886<=o&&o<=9887||9918<=o&&o<=9919||9924<=o&&o<=9933||9935<=o&&o<=9953||o==9955||9960<=o&&o<=9983||o==10045||o==10071||10102<=o&&o<=10111||11093<=o&&o<=11097||12872<=o&&o<=12879||57344<=o&&o<=63743||65024<=o&&o<=65039||o==65533||127232<=o&&o<=127242||127248<=o&&o<=127277||127280<=o&&o<=127337||127344<=o&&o<=127386||917760<=o&&o<=917999||983040<=o&&o<=1048573||1048576<=o&&o<=1114109?"A":"N"},t.characterLength=function(n){var i=this.eastAsianWidth(n);return i=="F"||i=="W"||i=="A"?2:1};function r(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(n){for(var i=r(n),s=0,o=0;o<i.length;o++)s=s+this.characterLength(i[o]);return s},t.slice=function(n,i,s){textLen=t.length(n),i=i||0,s=s||1,i<0&&(i=textLen+i),s<0&&(s=textLen+s);for(var o="",a=0,c=r(n),l=0;l<c.length;l++){var u=c[l],d=t.length(u);if(a>=i-(d==2?1:0))if(a+d<=s)o+=u;else break;a+=d}return o}})(HFe);var VFe=vB,WFe=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};function Dy(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=PK(e),e.length===0))return 0;e=e.replace(WFe()," ");let r=t.ambiguousIsNarrow?1:2,n=0;for(let i of e){let s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(VFe.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}var gB=10,_K=(e=0)=>t=>`\x1B[${t+e}m`,SK=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,wK=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,an={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(an.modifier);var KFe=Object.keys(an.color),YFe=Object.keys(an.bgColor);[...KFe,...YFe];function JFe(){let e=new Map;for(let[t,r]of Object.entries(an)){for(let[n,i]of Object.entries(r))an[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=an[n],e.set(i[0],i[1]);Object.defineProperty(an,t,{value:r,enumerable:!1})}return Object.defineProperty(an,"codes",{value:e,enumerable:!1}),an.color.close="\x1B[39m",an.bgColor.close="\x1B[49m",an.color.ansi=_K(),an.color.ansi256=SK(),an.color.ansi16m=wK(),an.bgColor.ansi=_K(gB),an.bgColor.ansi256=SK(gB),an.bgColor.ansi16m=wK(gB),Object.defineProperties(an,{rgbToAnsi256:{value:(t,r,n)=>t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:t=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>an.rgbToAnsi256(...an.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,i;if(t>=232)r=((t-232)*10+8)/255,n=r,i=r;else{t-=16;let a=t%36;r=Math.floor(t/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let s=Math.max(r,n,i)*2;if(s===0)return 30;let o=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>an.ansi256ToAnsi(an.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>an.ansi256ToAnsi(an.hexToAnsi256(t)),enumerable:!1}}),an}var QFe=JFe(),zC=new Set(["\x1B","\x9B"]),ZFe=39,_B="\x07",kK="[",eIe="]",OK="m",SB=`${eIe}8;;`,xK=e=>`${zC.values().next().value}${kK}${e}${OK}`,CK=e=>`${zC.values().next().value}${SB}${e}${_B}`,tIe=e=>e.split(" ").map(t=>Dy(t)),yB=(e,t,r)=>{let n=[...t],i=!1,s=!1,o=Dy(PK(e[e.length-1]));for(let[a,c]of n.entries()){let l=Dy(c);if(o+l<=r?e[e.length-1]+=c:(e.push(c),o=0),zC.has(c)&&(i=!0,s=n.slice(a+1).join("").startsWith(SB)),i){s?c===_B&&(i=!1,s=!1):c===OK&&(i=!1);continue}o+=l,o===r&&a<n.length-1&&(e.push(""),o=0)}!o&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},rIe=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(Dy(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},nIe=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",i,s,o=tIe(e),a=[""];for(let[l,u]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let d=Dy(a[a.length-1]);if(l!==0&&(d>=t&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),d=0),(d>0||r.trim===!1)&&(a[a.length-1]+=" ",d++)),r.hard&&o[l]>t){let m=t-d,f=1+Math.floor((o[l]-m-1)/t);Math.floor((o[l]-1)/t)<f&&a.push(""),yB(a,u,t);continue}if(d+o[l]>t&&d>0&&o[l]>0){if(r.wordWrap===!1&&d<t){yB(a,u,t);continue}a.push("")}if(d+o[l]>t&&r.wordWrap===!1){yB(a,u,t);continue}a[a.length-1]+=u}r.trim!==!1&&(a=a.map(l=>rIe(l)));let c=[...a.join(`
308
+ `,BRe=Kg.encode(Cl),LRe=2,qq=class{constructor(t,r){let{escapeName:n}=this.constructor,i=G.isString(r),s=`Content-Disposition: form-data; name="${n(t)}"${!i&&r.name?`; filename="${n(r.name)}"`:""}${Cl}`;i?r=Kg.encode(String(r).replace(/\r?\n|\r\n?/g,Cl)):s+=`Content-Type: ${r.type||"application/octet-stream"}${Cl}`,this.headers=Kg.encode(s+Cl),this.contentLength=i?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+LRe,this.name=t,this.value=r}async*encode(){yield this.headers;let{value:t}=this;G.isTypedArray(t)?yield t:yield*Ux(t),yield BRe}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},MRe=(e,t,r)=>{let{tag:n="form-data-boundary",size:i=25,boundary:s=n+"-"+G.generateString(i,qRe)}=r||{};if(!G.isFormData(e))throw TypeError("FormData instance required");if(s.length<1||s.length>70)throw Error("boundary must be 10-70 characters long");let o=Kg.encode("--"+s+Cl),a=Kg.encode("--"+s+"--"+Cl+Cl),c=a.byteLength,l=Array.from(e.entries()).map(([d,m])=>{let f=new qq(d,m);return c+=f.size,f});c+=o.byteLength*l.length,c=G.toFiniteNumber(c);let u={"Content-Type":`multipart/form-data; boundary=${s}`};return Number.isFinite(c)&&(u["Content-Length"]=c),t&&t(u),$V.Readable.from(async function*(){for(let d of l)yield o,yield*d.encode();yield a}())},UV=MRe;var GV=ee(require("stream"),1),Bq=class extends GV.default.Transform{__transform(t,r,n){this.push(t),n()}_transform(t,r,n){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let i=Buffer.alloc(2);i[0]=120,i[1]=156,this.push(i,r)}this.__transform(t,r,n)}},XV=Bq;var jRe=(e,t)=>G.isAsyncFn(e)?function(...r){let n=r.pop();e.apply(this,r).then(i=>{try{t?n(null,...t(i)):n(null,i)}catch(s){n(s)}},n)}:e,HV=jRe;var VV={flush:pc.default.constants.Z_SYNC_FLUSH,finishFlush:pc.default.constants.Z_SYNC_FLUSH},zRe={flush:pc.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:pc.default.constants.BROTLI_OPERATION_FLUSH},WV=G.isFunction(pc.default.createBrotliDecompress),{http:$Re,https:URe}=eW.default,GRe=/https:?/,KV=Fn.protocols.map(e=>e+":");function XRe(e){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e)}function rW(e,t,r){let n=t;if(!n&&n!==!1){let i=(0,YV.getProxyForUrl)(r);i&&(n=new URL(i))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){(n.auth.username||n.auth.password)&&(n.auth=(n.auth.username||"")+":"+(n.auth.password||""));let s=Buffer.from(n.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+s}e.headers.host=e.hostname+(e.port?":"+e.port:"");let i=n.hostname||n.host;e.hostname=i,e.host=i,e.port=n.port,e.path=r,n.protocol&&(e.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}e.beforeRedirects.proxy=function(s){rW(s,t,s.href)}}var HRe=typeof process<"u"&&G.kindOf(process)==="process",VRe=e=>new Promise((t,r)=>{let n,i,s=(c,l)=>{i||(i=!0,n&&n(c,l))},o=c=>{s(c),t(c)},a=c=>{s(c,!0),r(c)};e(o,a,c=>n=c).catch(a)}),nW=HRe&&function(t){return VRe(async function(n,i,s){let{data:o,lookup:a,family:c}=t,{responseType:l,responseEncoding:u}=t,d=t.method.toUpperCase(),m,f=!1,y;a&&G.isAsyncFn(a)&&(a=HV(a,Y=>{if(G.isString(Y))Y=[Y,Y.indexOf(".")<0?6:4];else if(!G.isArray(Y))throw new TypeError("lookup async function must return an array [ip: string, family: number]]");return Y}));let b=new tW.default,v=()=>{t.cancelToken&&t.cancelToken.unsubscribe(S),t.signal&&t.signal.removeEventListener("abort",S),b.removeAllListeners()};s((Y,Pe)=>{m=!0,Pe&&(f=!0,v())});function S(Y){b.emit("abort",!Y||Y.type?new Ro(null,t,y):Y)}b.once("abort",i),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(S),t.signal&&(t.signal.aborted?S():t.signal.addEventListener("abort",S)));let k=cd(t.baseURL,t.url),T=new URL(k,"http://localhost"),N=T.protocol||KV[0];if(N==="data:"){let Y;if(d!=="GET")return xl(n,i,{status:405,statusText:"method not allowed",headers:{},config:t});try{Y=Fq(t.url,l==="blob",{Blob:t.env&&t.env.Blob})}catch(Pe){throw Je.from(Pe,Je.ERR_BAD_REQUEST,t)}return l==="text"?(Y=Y.toString(u),(!u||u==="utf8")&&(Y=G.stripBOM(Y))):l==="stream"&&(Y=md.default.Readable.from(Y)),xl(n,i,{data:Y,status:200,statusText:"OK",headers:new Hn,config:t})}if(KV.indexOf(N)===-1)return i(new Je("Unsupported protocol "+N,Je.ERR_BAD_REQUEST,t));let L=Hn.from(t.headers).normalize();L.set("User-Agent","axios/"+pd,!1);let Ee=t.onDownloadProgress,Re=t.onUploadProgress,Te=t.maxRate,$e,fe;if(G.isSpecCompliantForm(o)){let Y=L.getContentType(/boundary=([-_\w\d]{10,70})/i);o=UV(o,Pe=>{L.set(Pe)},{tag:`axios-${pd}-boundary`,boundary:Y&&Y[1]||void 0})}else if(G.isFormData(o)&&G.isFunction(o.getHeaders)){if(L.set(o.getHeaders()),!L.hasContentLength())try{let Y=await ZV.default.promisify(o.getLength).call(o);Number.isFinite(Y)&&Y>=0&&L.setContentLength(Y)}catch{}}else if(G.isBlob(o))o.size&&L.setContentType(o.type||"application/octet-stream"),L.setContentLength(o.size||0),o=md.default.Readable.from(Ux(o));else if(o&&!G.isStream(o)){if(!Buffer.isBuffer(o))if(G.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else if(G.isString(o))o=Buffer.from(o,"utf-8");else return i(new Je("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Je.ERR_BAD_REQUEST,t));if(L.setContentLength(o.length,!1),t.maxBodyLength>-1&&o.length>t.maxBodyLength)return i(new Je("Request body larger than maxBodyLength limit",Je.ERR_BAD_REQUEST,t))}let Q=G.toFiniteNumber(L.getContentLength());G.isArray(Te)?($e=Te[0],fe=Te[1]):$e=fe=Te,o&&(Re||$e)&&(G.isStream(o)||(o=md.default.Readable.from(o,{objectMode:!1})),o=md.default.pipeline([o,new Nq({length:Q,maxRate:G.toFiniteNumber($e)})],G.noop),Re&&o.on("progress",Y=>{Re(Object.assign(Y,{upload:!0}))}));let x;if(t.auth){let Y=t.auth.username||"",Pe=t.auth.password||"";x=Y+":"+Pe}if(!x&&T.username){let Y=T.username,Pe=T.password;x=Y+":"+Pe}x&&L.delete("authorization");let ie;try{ie=ad(T.pathname+T.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(Y){let Pe=new Error(Y.message);return Pe.config=t,Pe.url=t.url,Pe.exists=!0,i(Pe)}L.set("Accept-Encoding","gzip, compress, deflate"+(WV?", br":""),!1);let P={path:ie,method:d,headers:L.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:x,protocol:N,family:c,lookup:a,beforeRedirect:XRe,beforeRedirects:{}};t.socketPath?P.socketPath=t.socketPath:(P.hostname=T.hostname,P.port=T.port,rW(P,t.proxy,N+"//"+T.hostname+(T.port?":"+T.port:"")+P.path));let R,ge=GRe.test(P.protocol);if(P.agent=ge?t.httpsAgent:t.httpAgent,t.transport?R=t.transport:t.maxRedirects===0?R=ge?QV.default:JV.default:(t.maxRedirects&&(P.maxRedirects=t.maxRedirects),t.beforeRedirect&&(P.beforeRedirects.config=t.beforeRedirect),R=ge?URe:$Re),t.maxBodyLength>-1?P.maxBodyLength=t.maxBodyLength:P.maxBodyLength=1/0,t.insecureHTTPParser&&(P.insecureHTTPParser=t.insecureHTTPParser),y=R.request(P,function(Pe){if(y.destroyed)return;let Yt=[Pe],Xt=+Pe.headers["content-length"];if(Ee){let U=new Nq({length:G.toFiniteNumber(Xt),maxRate:G.toFiniteNumber(fe)});Ee&&U.on("progress",q=>{Ee(Object.assign(q,{download:!0}))}),Yt.push(U)}let yr=Pe,lr=Pe.req||y;if(t.decompress!==!1&&Pe.headers["content-encoding"])switch((d==="HEAD"||Pe.statusCode===204)&&delete Pe.headers["content-encoding"],Pe.headers["content-encoding"]){case"gzip":case"x-gzip":case"compress":case"x-compress":Yt.push(pc.default.createUnzip(VV)),delete Pe.headers["content-encoding"];break;case"deflate":Yt.push(new XV),Yt.push(pc.default.createUnzip(VV)),delete Pe.headers["content-encoding"];break;case"br":WV&&(Yt.push(pc.default.createBrotliDecompress(zRe)),delete Pe.headers["content-encoding"])}yr=Yt.length>1?md.default.pipeline(Yt,G.noop):Yt[0];let $i=md.default.finished(yr,()=>{$i(),v()}),w={status:Pe.statusCode,statusText:Pe.statusMessage,headers:new Hn(Pe.headers),config:t,request:lr};if(l==="stream")w.data=yr,xl(n,i,w);else{let U=[],q=0;yr.on("data",function(He){U.push(He),q+=He.length,t.maxContentLength>-1&&q>t.maxContentLength&&(f=!0,yr.destroy(),i(new Je("maxContentLength size of "+t.maxContentLength+" exceeded",Je.ERR_BAD_RESPONSE,t,lr)))}),yr.on("aborted",function(){if(f)return;let He=new Je("maxContentLength size of "+t.maxContentLength+" exceeded",Je.ERR_BAD_RESPONSE,t,lr);yr.destroy(He),i(He)}),yr.on("error",function(He){y.destroyed||i(Je.from(He,null,t,lr))}),yr.on("end",function(){try{let He=U.length===1?U[0]:Buffer.concat(U);l!=="arraybuffer"&&(He=He.toString(u),(!u||u==="utf8")&&(He=G.stripBOM(He))),w.data=He}catch(He){i(Je.from(He,null,t,w.request,w))}xl(n,i,w)})}b.once("abort",U=>{yr.destroyed||(yr.emit("error",U),yr.destroy())})}),b.once("abort",Y=>{i(Y),y.destroy(Y)}),y.on("error",function(Pe){i(Je.from(Pe,null,t,y))}),y.on("socket",function(Pe){Pe.setKeepAlive(!0,1e3*60)}),t.timeout){let Y=parseInt(t.timeout,10);if(isNaN(Y)){i(new Je("error trying to parse `config.timeout` to int",Je.ERR_BAD_OPTION_VALUE,t,y));return}y.setTimeout(Y,function(){if(m)return;let Yt=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",Xt=t.transitional||Fm;t.timeoutErrorMessage&&(Yt=t.timeoutErrorMessage),i(new Je(Yt,Xt.clarifyTimeoutError?Je.ETIMEDOUT:Je.ECONNABORTED,t,y)),S()})}if(G.isStream(o)){let Y=!1,Pe=!1;o.on("end",()=>{Y=!0}),o.once("error",Yt=>{Pe=!0,y.destroy(Yt)}),o.on("close",()=>{!Y&&!Pe&&S(new Ro("Request stream has been aborted",t,y))}),o.pipe(y)}else y.end(o)})};var iW=Fn.isStandardBrowserEnv?function(){return{write:function(r,n,i,s,o,a){let c=[];c.push(r+"="+encodeURIComponent(n)),G.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),G.isString(s)&&c.push("path="+s),G.isString(o)&&c.push("domain="+o),a===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(r){let n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();var sW=Fn.isStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function i(s){let o=s;return t&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=i(window.location.href),function(o){let a=G.isString(o)?i(o):o;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}();function oW(e,t){let r=0,n=zx(50,250);return i=>{let s=i.loaded,o=i.lengthComputable?i.total:void 0,a=s-r,c=n(a),l=s<=o;r=s;let u={loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:c||void 0,estimated:c&&o&&l?(o-s)/c:void 0,event:i};u[t?"download":"upload"]=!0,e(u)}}var WRe=typeof XMLHttpRequest<"u",aW=WRe&&function(e){return new Promise(function(r,n){let i=e.data,s=Hn.from(e.headers).normalize(),o=e.responseType,a;function c(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}G.isFormData(i)&&(Fn.isStandardBrowserEnv||Fn.isStandardBrowserWebWorkerEnv?s.setContentType(!1):s.setContentType("multipart/form-data;",!1));let l=new XMLHttpRequest;if(e.auth){let f=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(f+":"+y))}let u=cd(e.baseURL,e.url);l.open(e.method.toUpperCase(),ad(u,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function d(){if(!l)return;let f=Hn.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),b={data:!o||o==="text"||o==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:f,config:e,request:l};xl(function(S){r(S),c()},function(S){n(S),c()},b),l=null}if("onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(d)},l.onabort=function(){!l||(n(new Je("Request aborted",Je.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new Je("Network Error",Je.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",b=e.transitional||Fm;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),n(new Je(y,b.clarifyTimeoutError?Je.ETIMEDOUT:Je.ECONNABORTED,e,l)),l=null},Fn.isStandardBrowserEnv){let f=(e.withCredentials||sW(u))&&e.xsrfCookieName&&iW.read(e.xsrfCookieName);f&&s.set(e.xsrfHeaderName,f)}i===void 0&&s.setContentType(null),"setRequestHeader"in l&&G.forEach(s.toJSON(),function(y,b){l.setRequestHeader(b,y)}),G.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),o&&o!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",oW(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",oW(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=f=>{!l||(n(!f||f.type?new Ro(null,e,l):f),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));let m=Wg(u);if(m&&Fn.protocols.indexOf(m)===-1){n(new Je("Unsupported protocol "+m+":",Je.ERR_BAD_REQUEST,e));return}l.send(i||null)})};var Gx={http:nW,xhr:aW};G.forEach(Gx,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var cW={getAdapter:e=>{e=G.isArray(e)?e:[e];let{length:t}=e,r,n;for(let i=0;i<t&&(r=e[i],!(n=G.isString(r)?Gx[r.toLowerCase()]:r));i++);if(!n)throw n===!1?new Je(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(G.hasOwnProp(Gx,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`);if(!G.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:Gx};function Lq(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ro(null,e)}function Xx(e){return Lq(e),e.headers=Hn.from(e.headers),e.data=Ug.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),cW.getAdapter(e.adapter||Im.adapter)(e).then(function(n){return Lq(e),n.data=Ug.call(e,e.transformResponse,n),n.headers=Hn.from(n.headers),n},function(n){return Gg(n)||(Lq(e),n&&n.response&&(n.response.data=Ug.call(e,e.transformResponse,n.response),n.response.headers=Hn.from(n.response.headers))),Promise.reject(n)})}var lW=e=>e instanceof Hn?e.toJSON():e;function mc(e,t){t=t||{};let r={};function n(l,u,d){return G.isPlainObject(l)&&G.isPlainObject(u)?G.merge.call({caseless:d},l,u):G.isPlainObject(u)?G.merge({},u):G.isArray(u)?u.slice():u}function i(l,u,d){if(G.isUndefined(u)){if(!G.isUndefined(l))return n(void 0,l,d)}else return n(l,u,d)}function s(l,u){if(!G.isUndefined(u))return n(void 0,u)}function o(l,u){if(G.isUndefined(u)){if(!G.isUndefined(l))return n(void 0,l)}else return n(void 0,u)}function a(l,u,d){if(d in t)return n(l,u);if(d in e)return n(void 0,l)}let c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials: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:a,headers:(l,u)=>i(lW(l),lW(u),!0)};return G.forEach(Object.keys(Object.assign({},e,t)),function(u){let d=c[u]||i,m=d(e[u],t[u],u);G.isUndefined(m)&&d!==a||(r[u]=m)}),r}var Mq={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Mq[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var uW={};Mq.transitional=function(t,r,n){function i(s,o){return"[Axios v"+pd+"] Transitional option '"+s+"'"+o+(n?". "+n:"")}return(s,o,a)=>{if(t===!1)throw new Je(i(o," has been removed"+(r?" in "+r:"")),Je.ERR_DEPRECATED);return r&&!uW[o]&&(uW[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,o,a):!0}};function KRe(e,t,r){if(typeof e!="object")throw new Je("options must be an object",Je.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),i=n.length;for(;i-- >0;){let s=n[i],o=t[s];if(o){let a=e[s],c=a===void 0||o(a,s,e);if(c!==!0)throw new Je("option "+s+" must be "+c,Je.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Je("Unknown option "+s,Je.ERR_BAD_OPTION)}}var Hx={assertOptions:KRe,validators:Mq};var El=Hx.validators,jm=class{constructor(t){this.defaults=t,this.interceptors={request:new _q,response:new _q}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=mc(this.defaults,r);let{transitional:n,paramsSerializer:i,headers:s}=r;n!==void 0&&Hx.assertOptions(n,{silentJSONParsing:El.transitional(El.boolean),forcedJSONParsing:El.transitional(El.boolean),clarifyTimeoutError:El.transitional(El.boolean)},!1),i!=null&&(G.isFunction(i)?r.paramsSerializer={serialize:i}:Hx.assertOptions(i,{encode:El.function,serialize:El.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o;o=s&&G.merge(s.common,s[r.method]),o&&G.forEach(["delete","get","head","post","put","patch","common"],y=>{delete s[y]}),r.headers=Hn.concat(o,s);let a=[],c=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(r)===!1||(c=c&&b.synchronous,a.unshift(b.fulfilled,b.rejected))});let l=[];this.interceptors.response.forEach(function(b){l.push(b.fulfilled,b.rejected)});let u,d=0,m;if(!c){let y=[Xx.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,l),m=y.length,u=Promise.resolve(r);d<m;)u=u.then(y[d++],y[d++]);return u}m=a.length;let f=r;for(d=0;d<m;){let y=a[d++],b=a[d++];try{f=y(f)}catch(v){b.call(this,v);break}}try{u=Xx.call(this,f)}catch(y){return Promise.reject(y)}for(d=0,m=l.length;d<m;)u=u.then(l[d++],l[d++]);return u}getUri(t){t=mc(this.defaults,t);let r=cd(t.baseURL,t.url);return ad(r,t.params,t.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(t){jm.prototype[t]=function(r,n){return this.request(mc(n||{},{method:t,url:r,data:(n||{}).data}))}});G.forEach(["post","put","patch"],function(t){function r(n){return function(s,o,a){return this.request(mc(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}jm.prototype[t]=r(),jm.prototype[t+"Form"]=r(!0)});var Yg=jm;var Jg=class{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});let n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s,o=new Promise(a=>{n.subscribe(a),s=a}).then(i);return o.cancel=function(){n.unsubscribe(s)},o},t(function(s,o,a){n.reason||(n.reason=new Ro(s,o,a),r(n.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 r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new Jg(function(i){t=i}),cancel:t}}},dW=Jg;function jq(e){return function(r){return e.apply(null,r)}}function zq(e){return G.isObject(e)&&e.isAxiosError===!0}var $q={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($q).forEach(([e,t])=>{$q[t]=e});var pW=$q;function mW(e){let t=new Yg(e),r=Mg(Yg.prototype.request,t);return G.extend(r,Yg.prototype,t,{allOwnKeys:!0}),G.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return mW(mc(e,i))},r}var Vn=mW(Im);Vn.Axios=Yg;Vn.CanceledError=Ro;Vn.CancelToken=dW;Vn.isCancel=Gg;Vn.VERSION=pd;Vn.toFormData=wl;Vn.AxiosError=Je;Vn.Cancel=Vn.CanceledError;Vn.all=function(t){return Promise.all(t)};Vn.spread=jq;Vn.isAxiosError=zq;Vn.mergeConfig=mc;Vn.AxiosHeaders=Hn;Vn.formToJSON=e=>Fx(G.isHTMLForm(e)?new FormData(e):e);Vn.HttpStatusCode=pW;Vn.default=Vn;var Qs=Vn;var{Axios:e5t,AxiosError:t5t,CanceledError:r5t,isCancel:n5t,CancelToken:i5t,VERSION:s5t,all:o5t,Cancel:a5t,isAxiosError:c5t,spread:l5t,toFormData:u5t,AxiosHeaders:d5t,HttpStatusCode:p5t,formToJSON:m5t,mergeConfig:f5t}=Qs;var fW=ee(yq());function YRe(e){Qs.defaults.headers.common.Authorization=e}function JRe(e,t){Qs.defaults.headers.common["x-api-client"]=e,Qs.defaults.headers.common["x-api-client-version"]=t}var fd="https://goldsky.com";function QRe(e){fd=e}function hW(e,t,r=fd){return`${r}${typeof e=="string"?e:e(t)}`}function ZRe(){return new fW.default}async function gW(e,t,r=fd){return Vx(e,"get",t||{},r)}async function yW(e,t,r=fd){return Vx(e,"delete",t||{},r)}async function bW(e,t,r=fd){return Vx(e,"put",t||{},r)}async function vW(e,t,r=fd){return Vx(e,"post",t||{},r)}async function Vx(e,t,r,n=fd){var s;let i=Gr(Qt(Qt(Qt({url:hW(e,r.params,n),method:t},r.querystring?{params:r.querystring}:{}),r.body?{data:r.body}:{}),typeof((s=r.body)==null?void 0:s.getHeaders)=="function"?{headers:r.body.getHeaders()}:{}),{maxBodyLength:1/0,maxContentLength:1/0,validateStatus:()=>!0,onUploadProgress:o=>{!r.onProgress||!o.total||r.onProgress(Math.round(o.loaded*100/o.total))}});try{let o=await Qs.request(i);return o.status<200||o.status>=300?o.status>500?[{statusCode:o.status,error:o.statusText,message:o.data.toString()},{}]:"statusCode"in o.data&&"error"in o.data&&"message"in o.data&&typeof o.data.statusCode=="number"&&typeof o.data.error=="string"&&typeof o.data.message=="string"?[o.data,o.data]:[{statusCode:o.data.statusCode||o.status,error:o.data.error||o.statusText,message:o.data.message||o.data.toString()},o.data]:[null,o.data||{}]}catch(o){if(!o||typeof o!="object"||!("code"in o)||typeof o.code!="string")throw o;return[{statusCode:0,error:"Request failed",message:o.code},{}]}}var Uq=class{constructor(t){O7(this,"host");this.host=t}async get(t,r){return gW(t,r,this.host)}async delete(t,r){return yW(t,r,this.host)}async put(t,r){return bW(t,r,this.host)}async post(t,r){return vW(t,r,this.host)}};var jt=ee(gt()),y5t=jt.Type.Object({name:jt.Type.String(),webhookUrl:jt.Type.String(),entity:jt.Type.String(),numRetries:jt.Type.Optional(jt.Type.Number()),retryIntervalSeconds:jt.Type.Optional(jt.Type.Number()),retryTimeoutSeconds:jt.Type.Optional(jt.Type.Number())}),b5t=jt.Type.Object({subgraphName:jt.Type.String(),subgraphVersion:jt.Type.String()});var v5t=jt.Type.Object({data:jt.Type.Object({webhookSecret:jt.Type.String(),id:jt.Type.String(),name:jt.Type.String()})}),_5t=jt.Type.Object({name:jt.Type.String()});var S5t=jt.Type.Object({data:jt.Type.Object({})}),eTe=jt.Type.Object({id:jt.Type.String(),name:jt.Type.String(),webhookUrl:jt.Type.String(),entity:jt.Type.String(),subgraphName:jt.Type.String(),subgraphVersion:jt.Type.String(),created_at:jt.Type.Number()}),w5t=jt.Type.Object({data:jt.Type.Array(eTe)}),x5t=jt.Type.Object({data:jt.Type.Array(jt.Type.Object({name:jt.Type.String()}))}),C5t=jt.Type.Object({subgraphName:jt.Type.String(),subgraphVersion:jt.Type.String()});var xt=ee(gt()),E5t=xt.Type.Object({id:xt.Type.String(),name:xt.Type.String(),description:xt.Type.String(),base_price_decimal:xt.Type.String(),features:xt.Type.Array(xt.Type.String()),isHidden:xt.Type.Boolean()}),D5t=xt.Type.Object({id:xt.Type.String(),latestInvoice:xt.Type.Union([xt.Type.String(),xt.Type.Null()]),product:xt.Type.Object({id:xt.Type.String(),name:xt.Type.String(),description:xt.Type.Union([xt.Type.String(),xt.Type.Null()]),basePrice:xt.Type.Object({amount:xt.Type.Union([xt.Type.String(),xt.Type.Null()]),interval:xt.Type.String()}),metadata:xt.Type.Record(xt.Type.String(),xt.Type.String())})}),A5t=xt.Type.Object({usageInCents:xt.Type.Number(),totalCreditsInCents:xt.Type.Optional(xt.Type.Number())}),_W=xt.Type.Object({subgraphsLimit:xt.Type.Number(),webhooksLimit:xt.Type.Number(),mirrorStreamsLimit:xt.Type.Number(),fusionStreamsLimit:xt.Type.Number(),enterprise:xt.Type.Boolean(),starterPlanPaused:xt.Type.Boolean()}),rTe=xt.Type.Object({latestUsage:xt.Type.Number(),maxFreeUsage:xt.Type.Number(),remainingFreeUsage:xt.Type.Number(),priceName:xt.Type.String()}),P5t=xt.Type.Object({priceSummaries:xt.Type.Array(rTe),billingPeriodEnd:xt.Type.Number(),starterPlanPaused:xt.Type.Boolean()});var Wn=ee(gt()),iTe=Wn.Type.Union([Wn.Type.Literal("1d"),Wn.Type.Literal("6h"),Wn.Type.Literal("1h")]),k5t=Wn.Type.Object({from:Wn.Type.String(),to:Wn.Type.String(),bucketSize:iTe,timeZone:Wn.Type.String()}),O5t=Wn.Type.Object({id:Wn.Type.String()}),R5t=Wn.Type.Object({referenceName:Wn.Type.String(),streamName:Wn.Type.String()}),T5t=Wn.Type.Object({data:Wn.Type.Array(Wn.Type.Object({time:Wn.Type.Number(),value:Wn.Type.Number()}))});var Qg=ee(gt()),F5t=Qg.Type.Object({message:Qg.Type.String()}),I5t=Qg.Type.Object({success:Qg.Type.Boolean()});var it={};ft(it,{AllResourceSizes:()=>EW,AllSinksOutputTypebox:()=>gd,AllSinksRootTypebox:()=>Hq,AllSourcesOutputTypebox:()=>iy,AllSourcesRootTypebox:()=>Gq,AllStreamCliOuputFormats:()=>aTe,AllStreamStatusValidAtCreate:()=>cTe,AllStreamStatuses:()=>eC,AllTransformsOutputTypebox:()=>hd,AllTransformsRootTypebox:()=>Xq,BlackholeSinkRootTypebox:()=>fy,ClickHouseSinkRootTypebox:()=>py,CreateSnapshotInternalSchema:()=>QTe,DatasetGroupRootTypebox:()=>Zg,DatasetSchema:()=>SW,DatasetSourceOutputTypebox:()=>Yx,DatasetSourceRootTypebox:()=>fc,DefinitionOutputTypebox:()=>PW,DefinitionRootTypebox:()=>AW,DeleteStreamSchema:()=>HTe,ElasticSearchRootTypebox:()=>ay,FileSinkFormat:()=>xW,FileSinkFormatTypebox:()=>CW,FileSinkRootTypebox:()=>uy,FileSourceOutputTypebox:()=>Zx,FileSourceRootTypebox:()=>ny,GetStreamSchema:()=>mTe,HypertableSinkRootTypebox:()=>ly,JobErrorTypebox:()=>KW,KafkaSinkRootTypebox:()=>cy,KafkaSourceOutputTypebox:()=>Qx,KafkaSourceRootTypebox:()=>ry,KafkaStorageRootTypebox:()=>wW,ListStreamsSchema:()=>rFe,POSTAllSourcesInputTypebox:()=>kW,POSTBlackholeSinkInputTypebox:()=>mC,POSTClickHouseSinkInputTypebox:()=>dC,POSTDatasetSourceInputTypebox:()=>rC,POSTDefinitionInputTypebox:()=>fC,POSTDefinitionInputValidator:()=>lFe,POSTElasticSearchSinkInputTypebox:()=>oC,POSTFileSinkInputTypebox:()=>lC,POSTFileSourceInputTypebox:()=>nC,POSTHypertableSinkInputTypebox:()=>cC,POSTKafkaSinkInputTypebox:()=>aC,POSTKafkaSourceInputTypebox:()=>Um,POSTPostgresSinkInputTypebox:()=>sC,POSTPrintSinkInputTypebox:()=>pC,POSTRocksetSinkInputTypebox:()=>uC,POSTSQLTransformInputTypebox:()=>iC,POSTStreamInputTypebox:()=>Wq,POSTStreamInputValidator:()=>aFe,POSTSubgraphEntitySourceInputTypebox:()=>tC,PUTDefinitionInputTypebox:()=>nB,PUTDefinitionInputValidator:()=>UTe,PUTStreamInputTypeValidator:()=>GTe,PUTStreamInputTypebox:()=>CC,PUTStreamInputValidator:()=>cFe,PostgresSinkRootTypebox:()=>oy,PrintSinkRootTypebox:()=>my,QueryStreamRuntimeDetailsInputTypebox:()=>iFe,ResourceSizeTypebox:()=>$m,RestartStreamInternalSchema:()=>tFe,RocksetSinkRootTypebox:()=>dy,RuntimeDetails:()=>YW,SQLTransformRootTypebox:()=>sy,SinkSchemaValidatorByType:()=>pFe,SinkTypes:()=>sn,SourceSchemaValidatorByType:()=>uFe,SourceTypes:()=>Zs,StartAtOptionsTypebox:()=>Kx,StatTypebox:()=>WW,StorageTypes:()=>Wx,StreamNameAndVersion:()=>VW,StreamNameVersionRuntimeDetailsTypebox:()=>nFe,StreamOutputArrayTypeValidator:()=>sFe,StreamOutputTypeValidator:()=>oFe,StreamOutputTypebox:()=>ca,StreamRootRunnableTypebox:()=>KTe,StreamRootTypebox:()=>Dl,StreamStatusTypebox:()=>DW,StreamStatusWithoutPauseTypebox:()=>Vq,SubgraphEntitySourceOutputTypebox:()=>Jx,SubgraphEntitySourceRootTypebox:()=>ty,SubgraphSourceEntityRootTypebox:()=>ey,TransformSchemaValidatorByType:()=>dFe,TransformationTypes:()=>zm,ValidateNewStreamSchema:()=>WTe});var Rt=ee(gt());var Ce=ee(gt()),Zs;(function(e){e.SubgraphEntity="subgraphEntity",e.Kafka="kafka",e.File="file",e.Dataset="dataset"})(Zs||(Zs={}));var Kx=Ce.Type.Union([Ce.Type.Literal("earliest"),Ce.Type.Literal("latest")]),Zg=Ce.Type.Object({name:Ce.Type.String(),displayName:Ce.Type.String(),description:Ce.Type.Optional(Ce.Type.String())}),SW=Ce.Type.Object({name:Ce.Type.String(),datatype:Ce.Type.String(),description:Ce.Type.Optional(Ce.Type.String())}),Wx;(function(e){e.Kafka="kafka"})(Wx||(Wx={}));var wW=Ce.Type.Object({type:Ce.Type.Literal(Wx.Kafka),topic:Ce.Type.String(),secretName:Ce.Type.String()}),fc=Ce.Type.Object({id:Ce.Type.String(),type:Ce.Type.Literal(Zs.Dataset),name:Ce.Type.String(),version:Ce.Type.String(),displayName:Ce.Type.String(),namespace:Ce.Type.String(),referenceName:Ce.Type.String(),description:Ce.Type.Optional(Ce.Type.String()),changelog:Ce.Type.Optional(Ce.Type.String()),schema:Ce.Type.Array(SW),isDeprecated:Ce.Type.Optional(Ce.Type.Boolean()),storages:Ce.Type.Array(Ce.Type.Union([wW])),groups:Ce.Type.Array(Ce.Type.String()),startAt:Ce.Type.Optional(Kx)}),Yx=Ce.Type.Pick(fc,["name","version","startAt","type","description","referenceName"]),ey=Ce.Type.Object({name:Ce.Type.String(),kafkaTopic:Ce.Type.String()},{additionalProperties:!1}),ty=Ce.Type.Object({id:Ce.Type.String(),description:Ce.Type.Optional(Ce.Type.String()),referenceName:Ce.Type.String(),namespace:Ce.Type.Optional(Ce.Type.String()),type:Ce.Type.Literal(Zs.SubgraphEntity),deployments:Ce.Type.Array(Ce.Type.Object({id:Ce.Type.String()},{additionalProperties:!1})),entity:ey,secretName:Ce.Type.String()},{additionalProperties:!1}),Jx=Ce.Type.Intersect([Ce.Type.Omit(ty,["secretName","entity","id"],{additionalProperties:!1}),Ce.Type.Object({entity:Ce.Type.Omit(ey,["kafkaTopic"],{additionalProperties:!1})},{additionalProperties:!1})],{additionalProperties:!1}),ry=Ce.Type.Object({id:Ce.Type.String(),description:Ce.Type.Optional(Ce.Type.String()),name:Ce.Type.Optional(Ce.Type.String()),namespace:Ce.Type.Optional(Ce.Type.String()),referenceName:Ce.Type.String(),type:Ce.Type.Literal(Zs.Kafka),topic:Ce.Type.String({maxLength:255}),startingOffsets:Ce.Type.Optional(Ce.Type.String()),secretName:Ce.Type.String()},{additionalProperties:!1}),Qx=Ce.Type.Omit(ry,["secretName","id"],{additionalProperties:!1}),ny=Ce.Type.Object({id:Ce.Type.String(),description:Ce.Type.Optional(Ce.Type.String()),name:Ce.Type.Optional(Ce.Type.String()),namespace:Ce.Type.Optional(Ce.Type.String()),referenceName:Ce.Type.String(),secretName:Ce.Type.String(),type:Ce.Type.Literal(Zs.File),path:Ce.Type.String(),format:Ce.Type.String(),tableDefinitionPath:Ce.Type.String(),monitorInterval:Ce.Type.Optional(Ce.Type.String())},{additionalProperties:!1}),Zx=Ce.Type.Omit(ny,["secretName","id"],{additionalProperties:!1}),Gq=Ce.Type.Union([ty,ry,ny,fc],{additionalProperties:!1}),iy=Ce.Type.Union([Jx,Qx,Zx,Yx]);var Ai=ee(gt()),zm;(function(e){e.SQL="sql"})(zm||(zm={}));var sy=Ai.Type.Object({id:Ai.Type.String(),description:Ai.Type.Optional(Ai.Type.String()),type:Ai.Type.Literal(zm.SQL),name:Ai.Type.String(),referenceName:Ai.Type.Optional(Ai.Type.String()),sql:Ai.Type.String({maxLength:5e3}),primaryKey:Ai.Type.String({maxLength:50})},{additionalProperties:!1}),Xq=Ai.Type.Union([sy]),hd=Ai.Type.Intersect([Ai.Type.Omit(sy,["id"]),Ai.Type.Object({referenceName:Ai.Type.String()})]);var j=ee(gt()),sn;(function(e){e.Postgres="postgres",e.ElasticSearch="elasticSearch",e.Kafka="kafka",e.TimescaleHypertable="timescaleHypertable",e.File="file",e.Rockset="rockset",e.ClickHouse="clickHouse",e.Print="print",e.Blackhole="blackhole"})(sn||(sn={}));var oy=j.Type.Object({id:j.Type.String(),referenceName:j.Type.Optional(j.Type.String()),description:j.Type.Optional(j.Type.String()),type:j.Type.Literal(sn.Postgres),sourceStreamName:j.Type.String(),schema:j.Type.String(),table:j.Type.String(),secretName:j.Type.String(),sinkBufferMaxRows:j.Type.Optional(j.Type.Integer()),sinkBufferInterval:j.Type.Optional(j.Type.String()),scanAutocommit:j.Type.Optional(j.Type.Boolean()),rewriteBatchedInserts:j.Type.Optional(j.Type.Boolean())},{additionalProperties:!1}),ay=j.Type.Object({id:j.Type.String(),referenceName:j.Type.Optional(j.Type.String()),description:j.Type.Optional(j.Type.String()),type:j.Type.Literal(sn.ElasticSearch),sourceStreamName:j.Type.String(),index:j.Type.String(),secretName:j.Type.String()},{additionalProperties:!1}),cy=j.Type.Object({id:j.Type.String(),referenceName:j.Type.Optional(j.Type.String()),description:j.Type.Optional(j.Type.String()),type:j.Type.Literal(sn.Kafka),sourceStreamName:j.Type.String(),topic:j.Type.String({maxLength:255}),secretName:j.Type.String(),topicPartitions:j.Type.Optional(j.Type.Integer()),upsertMode:j.Type.Optional(j.Type.Boolean()),dataFormat:j.Type.Optional(j.Type.Union([j.Type.Literal("avro"),j.Type.Literal("json")]))},{additionalProperties:!1}),ly=j.Type.Object({id:j.Type.String(),referenceName:j.Type.Optional(j.Type.String()),description:j.Type.Optional(j.Type.String()),type:j.Type.Literal(sn.TimescaleHypertable),sourceStreamName:j.Type.String(),schema:j.Type.String(),table:j.Type.String(),timestampColumn:j.Type.String(),primaryKey:j.Type.String(),timestampDataTypeAdapterFuncName:j.Type.Optional(j.Type.String()),secretName:j.Type.String(),sinkBufferMaxRows:j.Type.Optional(j.Type.Integer()),sinkBufferInterval:j.Type.Optional(j.Type.String()),scanAutocommit:j.Type.Optional(j.Type.Boolean()),rewriteBatchedInserts:j.Type.Optional(j.Type.Boolean())},{additionalProperties:!1}),xW=["csv","parquet"],CW=j.Type.Union(xW.map(e=>j.Type.Literal(e))),uy=j.Type.Object({id:j.Type.String(),referenceName:j.Type.Optional(j.Type.String()),description:j.Type.Optional(j.Type.String()),type:j.Type.Literal(sn.File),sourceStreamName:j.Type.String(),secretName:j.Type.String(),path:j.Type.String(),format:j.Type.String(CW),autoCompaction:j.Type.Optional(j.Type.Boolean()),partitionColumns:j.Type.Optional(j.Type.String()),shuffleByPartition:j.Type.Optional(j.Type.Boolean()),dedupColumn:j.Type.Optional(j.Type.String()),dedupTTLMinutes:j.Type.Optional(j.Type.Integer()),lwwColumn:j.Type.Optional(j.Type.String()),lwwTTLMinutes:j.Type.Optional(j.Type.String()),rollingPolicyFileSize:j.Type.Optional(j.Type.String()),rollingPolicyRolloverInterval:j.Type.Optional(j.Type.String()),rollingPolicyCheckInterval:j.Type.Optional(j.Type.String())},{additionalProperties:!1}),dy=j.Type.Object({id:j.Type.String(),referenceName:j.Type.Optional(j.Type.String()),description:j.Type.Optional(j.Type.String()),type:j.Type.Literal(sn.Rockset),sourceStreamName:j.Type.String(),secretName:j.Type.String(),workspace:j.Type.String(),collection:j.Type.String(),ingestTransformationSql:j.Type.Optional(j.Type.String()),flushSize:j.Type.Optional(j.Type.Integer()),flushIntervalMs:j.Type.Optional(j.Type.Integer()),retryCount:j.Type.Optional(j.Type.Integer())},{additionalProperties:!1}),py=j.Type.Object({id:j.Type.String(),referenceName:j.Type.Optional(j.Type.String()),description:j.Type.Optional(j.Type.String()),type:j.Type.Literal(sn.ClickHouse),sourceStreamName:j.Type.String(),secretName:j.Type.String(),table:j.Type.String(),batchSize:j.Type.Optional(j.Type.Integer()),flushInterval:j.Type.Optional(j.Type.String()),appendOnlyMode:j.Type.Optional(j.Type.Boolean()),versionColumnName:j.Type.Optional(j.Type.String())},{additionalProperties:!1}),my=j.Type.Object({id:j.Type.String(),referenceName:j.Type.Optional(j.Type.String()),type:j.Type.Literal(sn.Print),sourceStreamName:j.Type.String(),secretName:j.Type.String()},{additionalProperties:!1}),fy=j.Type.Object({id:j.Type.String(),referenceName:j.Type.Optional(j.Type.String()),description:j.Type.Optional(j.Type.String()),type:j.Type.Literal(sn.Blackhole),sourceStreamName:j.Type.String(),secretName:j.Type.String()},{additionalProperties:!1}),Hq=j.Type.Union([oy,ay,cy,ly,uy,dy,py,my,fy],{additionalProperties:!1}),gd=j.Type.Union([j.Type.Intersect([j.Type.Omit(oy,["id"]),j.Type.Object({referenceName:j.Type.String()})]),j.Type.Intersect([j.Type.Omit(ay,["id"]),j.Type.Object({referenceName:j.Type.String()})]),j.Type.Intersect([j.Type.Omit(cy,["id"]),j.Type.Object({referenceName:j.Type.String()})]),j.Type.Intersect([j.Type.Omit(ly,["id"]),j.Type.Object({referenceName:j.Type.String()})]),j.Type.Intersect([j.Type.Omit(uy,["id"]),j.Type.Object({referenceName:j.Type.String()})]),j.Type.Intersect([j.Type.Omit(dy,["id"]),j.Type.Object({referenceName:j.Type.String()})]),j.Type.Intersect([j.Type.Omit(py,["id"]),j.Type.Object({referenceName:j.Type.String()})]),j.Type.Intersect([j.Type.Omit(my,["id"]),j.Type.Object({referenceName:j.Type.String()})]),j.Type.Intersect([j.Type.Omit(fy,["id"]),j.Type.Object({referenceName:j.Type.String()})])]);var yt=ee(gt());var aTe=["json","table","yaml"],EW=["s","m","l","xl","xxl"],$m=yt.Type.Union(EW.map(e=>yt.Type.Literal(e))),eC=["ACTIVE","INACTIVE","PAUSED"],cTe=eC.filter(e=>e!=="PAUSED"),DW=yt.Type.Union(eC.map(e=>yt.Type.Literal(e))),Vq=yt.Type.Union(eC.filter(e=>e!=="PAUSED").map(e=>yt.Type.Literal(e))),AW=yt.Type.Object({sources:yt.Type.Array(Gq,{minItems:1}),transforms:yt.Type.Array(Xq),sinks:yt.Type.Array(Hq)},{additionalProperties:!1}),PW=yt.Type.Object({sources:yt.Type.Array(iy,{minItems:1}),transforms:yt.Type.Array(hd),sinks:yt.Type.Array(gd)},{additionalProperties:!1}),lTe=yt.Type.Object({imageTag:yt.Type.Optional(yt.Type.String()),flinkConf:yt.Type.Optional(yt.Type.Object({})),env:yt.Type.Optional(yt.Type.Object({}))},{additionalProperties:!1}),Dl=yt.Type.Object({id:yt.Type.String(),name:yt.Type.String(),description:yt.Type.Optional(yt.Type.String()),version:yt.Type.Integer(),definition:AW,status:DW,project_id:yt.Type.String(),created_at:yt.Type.Number(),updated_at:yt.Type.Number(),resource_size:yt.Type.String($m),latest_snapshot_id:yt.Type.Optional(yt.Type.String()),from_snapshot_id:yt.Type.Optional(yt.Type.String()),is_deleted:yt.Type.Boolean(),audit_log:yt.Type.Optional(yt.Type.String()),support_tier:yt.Type.Optional(yt.Type.Integer()),config_overrides:yt.Type.Optional(lTe),updated_by_user_id:yt.Type.Optional(yt.Type.String())},{additionalProperties:!1}),ca=yt.Type.Intersect([yt.Type.Omit(Dl,["definition","audit_log","updated_by_user_id","from_snapshot_id","latest_snapshot_id","is_deleted","config_overrides","id"],{additionalProperties:!1}),yt.Type.Object({definition:PW,is_deleted:yt.Type.Optional(yt.Type.Boolean())},{additionalProperties:!1})],{additionalProperties:!1});var tC=Rt.Type.Intersect([Rt.Type.Omit(ty,["id","referenceName","secretName","entity"],{additionalProperties:!1}),Rt.Type.Object({entity:Rt.Type.Omit(ey,["kafkaTopic"]),referenceName:Rt.Type.Optional(Rt.Type.String())},{additionalProperties:!1})],{additionalProperties:!1}),rC=Rt.Type.Intersect([Rt.Type.Pick(fc,["name","version","startAt","type","description"]),Rt.Type.Object({referenceName:Rt.Type.Optional(Rt.Type.String())})]),Um=Rt.Type.Intersect([Rt.Type.Omit(ry,["id","secretName","referenceName"],{additionalProperties:!1}),Rt.Type.Object({referenceName:Rt.Type.Optional(Rt.Type.String())},{additionalProperties:!1})]),nC=Rt.Type.Intersect([Rt.Type.Omit(ny,["id","secretName","referenceName"],{additionalProperties:!1}),Rt.Type.Object({referenceName:Rt.Type.Optional(Rt.Type.String())})]),iC=Rt.Type.Omit(sy,["id"],{additionalProperties:!1}),uTe=Rt.Type.Union([iC],{additionalProperties:!1}),sC=Rt.Type.Omit(oy,["id"],{additionalProperties:!1}),oC=Rt.Type.Omit(ay,["id"],{additionalProperties:!1}),aC=Rt.Type.Omit(cy,["id"],{additionalProperties:!1}),cC=Rt.Type.Omit(ly,["id"],{additionalProperties:!1}),lC=Rt.Type.Omit(uy,["id"],{additionalProperties:!1}),uC=Rt.Type.Omit(dy,["id"],{additionalProperties:!1}),dC=Rt.Type.Omit(py,["id"],{additionalProperties:!1}),pC=Rt.Type.Omit(my,["id"],{additionalProperties:!1}),mC=Rt.Type.Omit(fy,["id"],{additionalProperties:!1}),kW=Rt.Type.Union([tC,Um,nC,rC],{additionalProperties:!1}),dTe=Rt.Type.Union([sC,oC,aC,cC,lC,uC,dC,pC,mC],{additionalProperties:!1}),fC=Rt.Type.Object({sources:Rt.Type.Array(kW,{minItems:1}),transforms:Rt.Type.Array(uTe),sinks:Rt.Type.Array(dTe,{minItems:1})},{additionalProperties:!1}),Wq=Rt.Type.Intersect([Rt.Type.Omit(Dl,["id","status","definition","project_id","version","created_at","updated_at","is_deleted","audit_log","resource_size","config_overrides"],{additionalProperties:!1}),Rt.Type.Object({definition:fC,resource_size:Rt.Type.Optional(Rt.Type.String($m)),status:Rt.Type.Optional(Vq)},{additionalProperties:!1})],{additionalProperties:!1});var Gm=ee(gt());var pTe=Gm.Type.Object({name:Gm.Type.String(),version:Gm.Type.Optional(Gm.Type.String())},{additionalProperties:!1}),mTe={params:pTe,response:{200:Gm.Type.Array(ca)}};var In=ee(gt());var rB=ee(xC());var jTe=In.Type.Union([Jx,Qx,Zx,Yx],{additionalProperties:!1}),zTe=gd,$Te=hd,nB=In.Type.Object({sources:In.Type.Array(jTe,{minItems:1}),transforms:In.Type.Array($Te),sinks:In.Type.Array(zTe)},{additionalProperties:!1}),UTe=rB.TypeCompiler.Compile(nB),CC=In.Type.Intersect([In.Type.Omit(Dl,["id","definition","project_id","version","created_at","updated_at","is_deleted","audit_log","status","resource_size","config_overrides"]),In.Type.Object({id:In.Type.Optional(In.Type.String()),definition:In.Type.Optional(nB),status:In.Type.Optional(In.Type.String()),resource_size:In.Type.Optional(In.Type.String($m)),save_progress:In.Type.Optional(In.Type.Boolean())})]),GTe=rB.TypeCompiler.Compile(CC),m4t=In.Type.Object({name:In.Type.String()},{additionalProperties:!1});var iB=ee(gt()),XTe=iB.Type.Object({name:iB.Type.String()},{additionalProperties:!1}),HTe={params:XTe,response:{204:{}}};var sB=ee(gt()),VTe=sB.Type.Object({name:sB.Type.String()}),WTe={body:VTe,response:{204:{}}};var Nn=ee(gt());var KTe=Nn.Type.Object(Gr(Qt({},Dl.properties),{snapshot_location:Nn.Type.Optional(Nn.Type.String())})),YTe=Nn.Type.Object({streamId:Nn.Type.String()}),JTe=Nn.Type.Object({userEmail:Nn.Type.String(),fromSnapshotLocation:Nn.Type.Optional(Nn.Type.String())}),QTe={params:YTe,body:JTe,response:{204:{}}},ZTe=Nn.Type.Object({streamId:Nn.Type.String()}),eFe=Nn.Type.Object({userEmail:Nn.Type.String(),takeSnapshot:Nn.Type.Optional(Nn.Type.Boolean()),fromSnapshotId:Nn.Type.Optional(Nn.Type.String()),fromSnapshotLocation:Nn.Type.Optional(Nn.Type.String())}),tFe={params:ZTe,body:eFe,response:{204:{}}};var HW=ee(gt());var rFe={response:{200:HW.Type.Array(ca)}};var Xr=ee(gt());var VW=Xr.Type.Object({name:Xr.Type.String(),version:Xr.Type.Optional(Xr.Type.Union([Xr.Type.Integer(),Xr.Type.String()]))},{additionalProperties:!1}),WW=Xr.Type.Object({key:Xr.Type.String(),value:Xr.Type.Number()}),KW=Xr.Type.Object({message:Xr.Type.String(),definitionId:Xr.Type.String(),source:Xr.Type.Optional(iy),transform:Xr.Type.Optional(hd),sink:Xr.Type.Optional(gd)}),YW=Xr.Type.Object({status:Xr.Type.String(),errors:Xr.Type.Array(KW),jobStats:Xr.Type.Optional(Xr.Type.Array(WW))},{additionalProperties:!1}),nFe=Xr.Type.Object({name:Xr.Type.String(),version:Xr.Type.Integer(),runtimeDetails:YW},{additionalProperties:!1}),iFe=Xr.Type.Object({namesAndVersions:Xr.Type.Array(VW)},{additionalProperties:!1});var qn=ee(xC());var JW=ee(gt());var sFe=qn.TypeCompiler.Compile(JW.Type.Array(ca)),oFe=qn.TypeCompiler.Compile(ca),aFe=qn.TypeCompiler.Compile(Wq),cFe=qn.TypeCompiler.Compile(CC),lFe=qn.TypeCompiler.Compile(fC),uFe={[Zs.File]:qn.TypeCompiler.Compile(nC),[Zs.Kafka]:qn.TypeCompiler.Compile(Um),[Zs.SubgraphEntity]:qn.TypeCompiler.Compile(tC),[Zs.Dataset]:qn.TypeCompiler.Compile(rC)},dFe={[zm.SQL]:qn.TypeCompiler.Compile(iC)},pFe={[sn.File]:qn.TypeCompiler.Compile(lC),[sn.Kafka]:qn.TypeCompiler.Compile(aC),[sn.Postgres]:qn.TypeCompiler.Compile(sC),[sn.ElasticSearch]:qn.TypeCompiler.Compile(oC),[sn.TimescaleHypertable]:qn.TypeCompiler.Compile(cC),[sn.Rockset]:qn.TypeCompiler.Compile(uC),[sn.ClickHouse]:qn.TypeCompiler.Compile(dC),[sn.Print]:qn.TypeCompiler.Compile(pC),[sn.Blackhole]:qn.TypeCompiler.Compile(mC)};var Ht=ee(gt());var mFe=Ht.Type.Object({displayName:Ht.Type.String(),description:Ht.Type.String(),source:Um}),eK=Ht.Type.Object({label:Ht.Type.String(),value:Kx}),fFe=Ht.Type.Object({name:Ht.Type.String(),version:Ht.Type.String(),displayName:Ht.Type.String(),description:Ht.Type.Optional(Ht.Type.String()),deploymentId:Ht.Type.String(),network:Ht.Type.String(),entities:Ht.Type.Array(Ht.Type.Object({name:Ht.Type.String()}))}),QW=Ht.Type.Object({sinkType:Ht.Type.Enum(sn),displayName:Ht.Type.String(),description:Ht.Type.String()}),ZW=Ht.Type.Object({label:Ht.Type.String(),options:Ht.Type.Array(fFe)}),hFe=Ht.Type.Object({label:Ht.Type.String(),options:Ht.Type.Array(mFe),startingOffsets:Ht.Type.Array(eK)}),gFe=Ht.Type.Object({publicBlockchainDatasets:hFe,communitySubgraphs:ZW,projectSubgraphs:ZW}),yFe=Ht.Type.Omit(fc,["storages","namespace"],{additionalProperties:!1}),H4t=Ht.Type.Object({sources:gFe,datasetGroups:Ht.Type.Array(Zg),datasets:Ht.Type.Object({blockchain:Ht.Type.Array(yFe),cliUxStartAtOptions:Ht.Type.Array(eK)}),sinks:Ht.Type.Object({eligibleUserProvidedSinks:Ht.Type.Array(QW),eligibleGoldskyProvidedSinks:Ht.Type.Array(QW)})});var EC=ee(gt());var W4t=EC.Type.Object({groups:EC.Type.Array(Zg),datasets:EC.Type.Array(fc)});var fi=ee(gt());var _Fe=fi.Type.Object({id:fi.Type.String(),name:fi.Type.String(),org_id:fi.Type.Union([fi.Type.String(),fi.Type.Null()]),billing_subscription_id:fi.Type.Union([fi.Type.String(),fi.Type.Null()]),billing_customer_id:fi.Type.Union([fi.Type.String(),fi.Type.Null()]),created_at:fi.Type.Number()}),SFe=fi.Type.Object(Gr(Qt({},_Fe.properties),{capabilities:fi.Type.Partial(_W)})),Y4t=fi.Type.Object({data:SFe});var DC=ee(gt());var Al=ee(gt()),vy=Al.Type.Object({projectId:Al.Type.String(),name:Al.Type.String(),createdAt:Al.Type.Number(),currentlyAuthenticated:Al.Type.Boolean()}),Q4t=Al.Type.Object({data:Al.Type.Array(vy)});var tGt=DC.Type.Object({data:vy}),rGt=DC.Type.Object({name:DC.Type.String()});var _y=ee(gt()),iGt=_y.Type.Object({data:_y.Type.Boolean()}),sGt=_y.Type.Object({projectId:_y.Type.String()});var ua=ee(gt()),aGt=ua.Type.Object({data:ua.Type.Array(ua.Type.Object({email:ua.Type.String(),id:ua.Type.String(),firstName:ua.Type.Optional(ua.Type.String()),lastName:ua.Type.Optional(ua.Type.String())}))});var Sy=ee(gt()),lGt=Sy.Type.Object({data:Sy.Type.Boolean()}),uGt=Sy.Type.Object({email:Sy.Type.String()});var Ed=ee(gt());var mGt=Ed.Type.Object({data:vy}),fGt=Ed.Type.Object({name:Ed.Type.Optional(Ed.Type.String())}),hGt=Ed.Type.Object({projectId:Ed.Type.String()});var Xm=ee(gt()),CGt=Xm.Type.Object({data:Xm.Type.Boolean()}),EGt=Xm.Type.Object({emails:Xm.Type.Array(Xm.Type.String())});var OC=ee(gt());var Ve=ee(gt());var wy;(function(e){e.Subgraph="Subgraph",e.Stream="Stream"})(wy||(wy={}));var xy;(function(e){e.CustomSubgraph="CustomSubgraph",e.CommunitySubgraph="CommunitySubgraph"})(xy||(xy={}));var Cy;(function(e){e.SubgraphApi="SubgraphApi",e.Webhook="Webhook"})(Cy||(Cy={}));var AC=Ve.Type.Object({id:Ve.Type.String(),type:Ve.Type.Literal(wy.Subgraph),project_id:Ve.Type.String(),name:Ve.Type.String(),version:Ve.Type.Optional(Ve.Type.String()),description:Ve.Type.Optional(Ve.Type.String()),created_at:Ve.Type.Number(),updated_at:Ve.Type.Number()}),tK=Ve.Type.Object({type:Ve.Type.Union([Ve.Type.Literal(xy.CustomSubgraph),Ve.Type.Literal(xy.CommunitySubgraph)]),id:Ve.Type.String(),name:Ve.Type.String(),referenceName:Ve.Type.String(),version:Ve.Type.String(),created_at:Ve.Type.Number(),indexing_status:Ve.Type.Object({fatal_error:Ve.Type.Optional(Ve.Type.String()),synced:Ve.Type.Boolean(),entity_count:Ve.Type.String(),chains:Ve.Type.Array(Ve.Type.Object({head_block:Ve.Type.String(),earliest_block:Ve.Type.String(),latest_block:Ve.Type.String(),network:Ve.Type.String(),progress_percent:Ve.Type.String()}))}),status:Ve.Type.Enum({Active:"Active",Paused:"Paused"})}),AGt=Ve.Type.Union([tK]),CFe=Ve.Type.Object({type:Ve.Type.Literal(Cy.SubgraphApi),id:Ve.Type.String(),name:Ve.Type.String(),referenceName:Ve.Type.String(),url:Ve.Type.String(),subgraphDeploymentId:Ve.Type.String()}),EFe=Ve.Type.Object({type:Ve.Type.Literal(Cy.Webhook),id:Ve.Type.String(),name:Ve.Type.String(),referenceName:Ve.Type.String(),entity:Ve.Type.String(),url:Ve.Type.String()}),DFe=Ve.Type.Union([CFe,EFe]),PC=Ve.Type.Intersect([AC,Ve.Type.Object({definition:Ve.Type.Object({sources:Ve.Type.Array(tK),sinks:Ve.Type.Array(DFe)})})]),kC=Ve.Type.Intersect([Ve.Type.Omit(ca,["status"]),Ve.Type.Object({type:Ve.Type.Literal(wy.Stream)})]),rK=Ve.Type.Object({status:Ve.Type.String(),errors:Ve.Type.Array(Ve.Type.Object({message:Ve.Type.String(),referenceName:Ve.Type.Optional(Ve.Type.String())}))});var AFe=OC.Type.Union([PC,kC]),OGt=OC.Type.Object({data:OC.Type.Array(AFe)});var Pl=ee(gt());var FGt=Pl.Type.Intersect([Pl.Type.Omit(AC,["id","created_at","updated_at","project_id"]),Pl.Type.Object({subgraph_deployment_id:Pl.Type.String()})]),IGt=Pl.Type.Intersect([AC,Pl.Type.Object({subgraph_deployment_id:Pl.Type.String()})]);var kl=ee(gt());var BGt=kl.Type.Object({data:PC}),LGt=kl.Type.Object({name:kl.Type.String()});var MGt=kl.Type.Object({data:kC}),jGt=kl.Type.Object({name:kl.Type.String()});var zGt=kl.Type.Object({data:rK});var oB=ee(gt()),UGt=oB.Type.Object({name:oB.Type.String()},{additionalProperties:!1});var Dd=ee(gt()),YGt=Dd.Type.Object({token:Dd.Type.String(),email:Dd.Type.Optional(Dd.Type.String())});var JGt=Dd.Type.Object({bot:Dd.Type.Boolean()});var zt={};ft(zt,{AnySecretValueTypebox:()=>Ad,AnySecretValueValidator:()=>OFe,ClickHouseSecretTypebox:()=>lK,CreateSecretBody:()=>aB,CreateSecretSchema:()=>uK,DeleteSecretParams:()=>cB,DeleteSecretSchema:()=>dK,ElasticSearchSecretTypebox:()=>aK,InternalGetSecretSchema:()=>pK,JdbcProtocol:()=>RC,JdbcSecretTypebox:()=>iK,KafkaSecretTypebox:()=>cK,ListSecretsSchema:()=>mK,RevealSecretSchema:()=>fK,RocksetSecretTypebox:()=>sK,S3SecretTypebox:()=>oK,SaslMechanism:()=>FC,SchemaSecretType:()=>da,SecretTypebox:()=>Hm,SecretWithoutValueTypebox:()=>Pd,SecurityProtocol:()=>TC,UpdateSecretBody:()=>uB,UpdateSecretSchema:()=>hK});var Vm=ee(gt());var st=ee(gt()),nK=ee(xC()),da;(function(e){e.jdbc="jdbc",e.kafka="kafka",e.rockset="rockset",e.elasticSearch="elasticSearch",e.s3="s3",e.clickHouse="clickHouse"})(da||(da={}));var RC;(function(e){e.postgres="postgres",e.postgresql="postgresql"})(RC||(RC={}));var iK=st.Type.Object({type:st.Type.Literal(da.jdbc),protocol:st.Type.Enum(RC),host:st.Type.String(),port:st.Type.Optional(st.Type.Integer()),databaseName:st.Type.String(),user:st.Type.String(),password:st.Type.String(),ssl:st.Type.Optional(st.Type.Boolean())}),sK=st.Type.Object({type:st.Type.Literal(da.rockset),apiKey:st.Type.String(),endpoint:st.Type.String()}),oK=st.Type.Object({type:st.Type.Literal(da.s3),accessKeyId:st.Type.String(),secretAccessKey:st.Type.String(),region:st.Type.String()}),aK=st.Type.Object({type:st.Type.Literal(da.elasticSearch),host:st.Type.String(),username:st.Type.String(),password:st.Type.String()}),TC;(function(e){e.PLAINTEXT="PLAINTEXT",e.SASL_SSL="SASL_SSL"})(TC||(TC={}));var FC;(function(e){e.PLAIN="PLAIN",e.SCRAM_SHA_256="SCRAM-SHA-256",e.SCRAM_SHA_512="SCRAM-SHA-512"})(FC||(FC={}));var cK=st.Type.Object({type:st.Type.Literal(da.kafka),bootstrapServers:st.Type.String(),securityProtocol:st.Type.Enum(TC),saslMechanism:st.Type.Optional(st.Type.Enum(FC)),saslJaasUsername:st.Type.Optional(st.Type.String()),saslJaasPassword:st.Type.Optional(st.Type.String()),schemaRegistryUrl:st.Type.Optional(st.Type.String()),schemaRegistryUsername:st.Type.Optional(st.Type.String()),schemaRegistryPassword:st.Type.Optional(st.Type.String()),schemaRegistryKeyPassword:st.Type.Optional(st.Type.String()),schemaRegistryKeystore:st.Type.Optional(st.Type.String())}),lK=st.Type.Object({type:st.Type.Literal(da.clickHouse),url:st.Type.String(),username:st.Type.String(),password:st.Type.String(),databaseName:st.Type.String()}),Ad=st.Type.Union([iK,cK,sK,aK,oK,lK]),OFe=nK.TypeCompiler.Compile(Ad),Hm=st.Type.Object({id:st.Type.String(),name:st.Type.String(),type:st.Type.Enum(da),value:Ad,description:st.Type.Optional(st.Type.String()),created_at:st.Type.Number()}),Pd=st.Type.Omit(Hm,["value"]);var eXt=Vm.Type.Object({data:Pd}),aB=Vm.Type.Object({name:Vm.Type.String(),value:Ad,description:Vm.Type.Optional(Vm.Type.String())}),uK={body:aB};var pa=ee(gt()),rXt=pa.Type.Object({success:pa.Type.Boolean(),referencedStreams:pa.Type.Optional(pa.Type.Array(pa.Type.Object({streamName:pa.Type.String(),version:pa.Type.Number()})))}),cB=pa.Type.Object({secretName:pa.Type.String()}),dK={params:cB};var Ey=ee(gt());var sXt=Ey.Type.Object({data:Hm}),oXt=Ey.Type.Object({projectId:Ey.Type.String(),secretName:Ey.Type.String()}),pK={};var lB=ee(gt());var lXt=lB.Type.Object({data:lB.Type.Array(Pd)}),mK={};var IC=ee(gt());var pXt=IC.Type.Object({data:Hm}),mXt=IC.Type.Object({secretName:IC.Type.String()}),fK={};var Ol=ee(gt());var gXt=Ol.Type.Object({data:Pd}),uB=Ol.Type.Object({value:Ol.Type.Optional(Ad),description:Ol.Type.Optional(Ol.Type.String())}),RFe=Ol.Type.Object({secretName:Ol.Type.String()}),hK={body:uB,params:RFe};var ma=ee(gt()),TFe=ma.Type.Object({ipfs_hash:ma.Type.String(),db_name:ma.Type.String(),synced:ma.Type.Boolean(),failed:ma.Type.Boolean()}),EXt=ma.Type.Object({subgraphs:ma.Type.Array(TFe)}),DXt=ma.Type.Object({success:ma.Type.Boolean()});var To=ee(gt()),kXt=To.Type.Object({data:To.Type.Array(To.Type.Object({chain:To.Type.String(),shard:To.Type.String(),database:To.Type.String(),schema:To.Type.String(),table:To.Type.String(),topic:To.Type.String(),partitions:To.Type.Number()}))});var ss=ee(gt()),NFe=ss.Type.Object({id:ss.Type.String(),name:ss.Type.String(),channel:ss.Type.String(),enabled:ss.Type.Boolean(),group:ss.Type.String(),description:ss.Type.String()}),OXt=ss.Type.Object({preferences:ss.Type.Array(NFe)});var RXt=ss.Type.Object({id:ss.Type.String()}),TXt=ss.Type.Object({enabled:ss.Type.Boolean()});var kd=ee(gt()),BFe=kd.Type.Object({event_type:kd.Type.String(),name:kd.Type.String(),group:kd.Type.String(),description:kd.Type.String()}),FXt=kd.Type.Object({data:BFe});var yc=ee(gt()),IXt=yc.Type.Object({project_id:yc.Type.String()}),NXt=yc.Type.Object({success:yc.Type.Boolean()});var qXt=yc.Type.Object({project_id:yc.Type.String()}),BXt=yc.Type.Object({success:yc.Type.Boolean()});var gK="https://api.goldsky.com";var UU={};ft(UU,{builder:()=>sxt,command:()=>nxt,describe:()=>ixt,handler:()=>oxt});var zU={};ft(zU,{builder:()=>Jwt,command:()=>Kwt,describe:()=>Ywt,handler:()=>Qwt});var BU={};ft(BU,{builder:()=>Pwt,command:()=>Dwt,describe:()=>Awt,handler:()=>kwt});var Gi=ee(mB(),1),Wm=require("node:process"),Rl=ee(require("node:readline"),1),bB=ee(require("node:readline"),1),AK=require("node:tty"),Od=ee(hB(),1);function XFe({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}function PK(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(XFe(),"")}var vB={},HFe={get exports(){return vB},set exports(e){vB=e}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(n){var i=n.charCodeAt(0),s=n.length==2?n.charCodeAt(1):0,o=i;return 55296<=i&&i<=56319&&56320<=s&&s<=57343&&(i&=1023,s&=1023,o=i<<10|s,o+=65536),o==12288||65281<=o&&o<=65376||65504<=o&&o<=65510?"F":o==8361||65377<=o&&o<=65470||65474<=o&&o<=65479||65482<=o&&o<=65487||65490<=o&&o<=65495||65498<=o&&o<=65500||65512<=o&&o<=65518?"H":4352<=o&&o<=4447||4515<=o&&o<=4519||4602<=o&&o<=4607||9001<=o&&o<=9002||11904<=o&&o<=11929||11931<=o&&o<=12019||12032<=o&&o<=12245||12272<=o&&o<=12283||12289<=o&&o<=12350||12353<=o&&o<=12438||12441<=o&&o<=12543||12549<=o&&o<=12589||12593<=o&&o<=12686||12688<=o&&o<=12730||12736<=o&&o<=12771||12784<=o&&o<=12830||12832<=o&&o<=12871||12880<=o&&o<=13054||13056<=o&&o<=19903||19968<=o&&o<=42124||42128<=o&&o<=42182||43360<=o&&o<=43388||44032<=o&&o<=55203||55216<=o&&o<=55238||55243<=o&&o<=55291||63744<=o&&o<=64255||65040<=o&&o<=65049||65072<=o&&o<=65106||65108<=o&&o<=65126||65128<=o&&o<=65131||110592<=o&&o<=110593||127488<=o&&o<=127490||127504<=o&&o<=127546||127552<=o&&o<=127560||127568<=o&&o<=127569||131072<=o&&o<=194367||177984<=o&&o<=196605||196608<=o&&o<=262141?"W":32<=o&&o<=126||162<=o&&o<=163||165<=o&&o<=166||o==172||o==175||10214<=o&&o<=10221||10629<=o&&o<=10630?"Na":o==161||o==164||167<=o&&o<=168||o==170||173<=o&&o<=174||176<=o&&o<=180||182<=o&&o<=186||188<=o&&o<=191||o==198||o==208||215<=o&&o<=216||222<=o&&o<=225||o==230||232<=o&&o<=234||236<=o&&o<=237||o==240||242<=o&&o<=243||247<=o&&o<=250||o==252||o==254||o==257||o==273||o==275||o==283||294<=o&&o<=295||o==299||305<=o&&o<=307||o==312||319<=o&&o<=322||o==324||328<=o&&o<=331||o==333||338<=o&&o<=339||358<=o&&o<=359||o==363||o==462||o==464||o==466||o==468||o==470||o==472||o==474||o==476||o==593||o==609||o==708||o==711||713<=o&&o<=715||o==717||o==720||728<=o&&o<=731||o==733||o==735||768<=o&&o<=879||913<=o&&o<=929||931<=o&&o<=937||945<=o&&o<=961||963<=o&&o<=969||o==1025||1040<=o&&o<=1103||o==1105||o==8208||8211<=o&&o<=8214||8216<=o&&o<=8217||8220<=o&&o<=8221||8224<=o&&o<=8226||8228<=o&&o<=8231||o==8240||8242<=o&&o<=8243||o==8245||o==8251||o==8254||o==8308||o==8319||8321<=o&&o<=8324||o==8364||o==8451||o==8453||o==8457||o==8467||o==8470||8481<=o&&o<=8482||o==8486||o==8491||8531<=o&&o<=8532||8539<=o&&o<=8542||8544<=o&&o<=8555||8560<=o&&o<=8569||o==8585||8592<=o&&o<=8601||8632<=o&&o<=8633||o==8658||o==8660||o==8679||o==8704||8706<=o&&o<=8707||8711<=o&&o<=8712||o==8715||o==8719||o==8721||o==8725||o==8730||8733<=o&&o<=8736||o==8739||o==8741||8743<=o&&o<=8748||o==8750||8756<=o&&o<=8759||8764<=o&&o<=8765||o==8776||o==8780||o==8786||8800<=o&&o<=8801||8804<=o&&o<=8807||8810<=o&&o<=8811||8814<=o&&o<=8815||8834<=o&&o<=8835||8838<=o&&o<=8839||o==8853||o==8857||o==8869||o==8895||o==8978||9312<=o&&o<=9449||9451<=o&&o<=9547||9552<=o&&o<=9587||9600<=o&&o<=9615||9618<=o&&o<=9621||9632<=o&&o<=9633||9635<=o&&o<=9641||9650<=o&&o<=9651||9654<=o&&o<=9655||9660<=o&&o<=9661||9664<=o&&o<=9665||9670<=o&&o<=9672||o==9675||9678<=o&&o<=9681||9698<=o&&o<=9701||o==9711||9733<=o&&o<=9734||o==9737||9742<=o&&o<=9743||9748<=o&&o<=9749||o==9756||o==9758||o==9792||o==9794||9824<=o&&o<=9825||9827<=o&&o<=9829||9831<=o&&o<=9834||9836<=o&&o<=9837||o==9839||9886<=o&&o<=9887||9918<=o&&o<=9919||9924<=o&&o<=9933||9935<=o&&o<=9953||o==9955||9960<=o&&o<=9983||o==10045||o==10071||10102<=o&&o<=10111||11093<=o&&o<=11097||12872<=o&&o<=12879||57344<=o&&o<=63743||65024<=o&&o<=65039||o==65533||127232<=o&&o<=127242||127248<=o&&o<=127277||127280<=o&&o<=127337||127344<=o&&o<=127386||917760<=o&&o<=917999||983040<=o&&o<=1048573||1048576<=o&&o<=1114109?"A":"N"},t.characterLength=function(n){var i=this.eastAsianWidth(n);return i=="F"||i=="W"||i=="A"?2:1};function r(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(n){for(var i=r(n),s=0,o=0;o<i.length;o++)s=s+this.characterLength(i[o]);return s},t.slice=function(n,i,s){textLen=t.length(n),i=i||0,s=s||1,i<0&&(i=textLen+i),s<0&&(s=textLen+s);for(var o="",a=0,c=r(n),l=0;l<c.length;l++){var u=c[l],d=t.length(u);if(a>=i-(d==2?1:0))if(a+d<=s)o+=u;else break;a+=d}return o}})(HFe);var VFe=vB,WFe=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};function Dy(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=PK(e),e.length===0))return 0;e=e.replace(WFe()," ");let r=t.ambiguousIsNarrow?1:2,n=0;for(let i of e){let s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(VFe.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}var gB=10,_K=(e=0)=>t=>`\x1B[${t+e}m`,SK=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,wK=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,an={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(an.modifier);var KFe=Object.keys(an.color),YFe=Object.keys(an.bgColor);[...KFe,...YFe];function JFe(){let e=new Map;for(let[t,r]of Object.entries(an)){for(let[n,i]of Object.entries(r))an[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=an[n],e.set(i[0],i[1]);Object.defineProperty(an,t,{value:r,enumerable:!1})}return Object.defineProperty(an,"codes",{value:e,enumerable:!1}),an.color.close="\x1B[39m",an.bgColor.close="\x1B[49m",an.color.ansi=_K(),an.color.ansi256=SK(),an.color.ansi16m=wK(),an.bgColor.ansi=_K(gB),an.bgColor.ansi256=SK(gB),an.bgColor.ansi16m=wK(gB),Object.defineProperties(an,{rgbToAnsi256:{value:(t,r,n)=>t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:t=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>an.rgbToAnsi256(...an.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,i;if(t>=232)r=((t-232)*10+8)/255,n=r,i=r;else{t-=16;let a=t%36;r=Math.floor(t/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let s=Math.max(r,n,i)*2;if(s===0)return 30;let o=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>an.ansi256ToAnsi(an.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>an.ansi256ToAnsi(an.hexToAnsi256(t)),enumerable:!1}}),an}var QFe=JFe(),zC=new Set(["\x1B","\x9B"]),ZFe=39,_B="\x07",kK="[",eIe="]",OK="m",SB=`${eIe}8;;`,xK=e=>`${zC.values().next().value}${kK}${e}${OK}`,CK=e=>`${zC.values().next().value}${SB}${e}${_B}`,tIe=e=>e.split(" ").map(t=>Dy(t)),yB=(e,t,r)=>{let n=[...t],i=!1,s=!1,o=Dy(PK(e[e.length-1]));for(let[a,c]of n.entries()){let l=Dy(c);if(o+l<=r?e[e.length-1]+=c:(e.push(c),o=0),zC.has(c)&&(i=!0,s=n.slice(a+1).join("").startsWith(SB)),i){s?c===_B&&(i=!1,s=!1):c===OK&&(i=!1);continue}o+=l,o===r&&a<n.length-1&&(e.push(""),o=0)}!o&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},rIe=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(Dy(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},nIe=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",i,s,o=tIe(e),a=[""];for(let[l,u]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let d=Dy(a[a.length-1]);if(l!==0&&(d>=t&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),d=0),(d>0||r.trim===!1)&&(a[a.length-1]+=" ",d++)),r.hard&&o[l]>t){let m=t-d,f=1+Math.floor((o[l]-m-1)/t);Math.floor((o[l]-1)/t)<f&&a.push(""),yB(a,u,t);continue}if(d+o[l]>t&&d>0&&o[l]>0){if(r.wordWrap===!1&&d<t){yB(a,u,t);continue}a.push("")}if(d+o[l]>t&&r.wordWrap===!1){yB(a,u,t);continue}a[a.length-1]+=u}r.trim!==!1&&(a=a.map(l=>rIe(l)));let c=[...a.join(`
309
309
  `)];for(let[l,u]of c.entries()){if(n+=u,zC.has(u)){let{groups:m}=new RegExp(`(?:\\${kK}(?<code>\\d+)m|\\${SB}(?<uri>.*)${_B})`).exec(c.slice(l).join(""))||{groups:{}};if(m.code!==void 0){let f=Number.parseFloat(m.code);i=f===ZFe?void 0:f}else m.uri!==void 0&&(s=m.uri.length===0?void 0:m.uri)}let d=QFe.codes.get(Number(i));c[l+1]===`
310
310
  `?(s&&(n+=CK("")),i&&d&&(n+=xK(d))):u===`
311
311
  `&&(i&&d&&(n+=xK(i)),s&&(n+=CK(s)))}return n};function EK(e,t,r){return String(e).normalize().replace(/\r\n/g,`
@@ -436,12 +436,12 @@ Next, let's set up transformations.`,"Add data transformations");let t=new Map;i
436
436
  raw_trace.error AS raw_trace_error,
437
437
  raw_trace.status AS raw_trace_status,
438
438
  raw_trace.trace_id AS raw_trace_trace_id,
439
- raw_trace.block_timestamp AS raw_trace_block_timestamp`,n),type:it.TransformationTypes.SQL,description:"Unnesting raw_trace"}});var i_e=ee(r_e());async function z6(e){let t=Ue("Creating secret").start(),[r,n]=await Ie.post("/api/admin/secrets/v1/",{body:e});r?(t.fail(r.message),process.exit(1)):n.data?t.succeed("Created secret"):(t.fail("Failed to create secret, try again"),process.exit(1))}var e1t={[zt.SchemaSecretType.jdbc]:"create table, create schema, row write/delete/update",[zt.SchemaSecretType.elasticSearch]:"create index, row write/delete/update",[zt.SchemaSecretType.s3]:"s3:PutObject, s3:PutObjectAcl, s3:GetBucketLocation, s3:ListMultipartUploadParts, s3:AbortMultipartUpload, s3:ListBucketMultipartUploads",[zt.SchemaSecretType.kafka]:"create topic, write message",[zt.SchemaSecretType.rockset]:"create workspace, create collection, read/write records",[zt.SchemaSecretType.clickHouse]:"create table, row write/delete/update"},$6=async e=>{os(`Requires following privileges: ${e1t[e]}.`,`Create a new ${e} secret`);let t=await t1t(e),r=await Qe({message:"What's the secret name? (must only contain uppercase letters, numbers, underscores and be unique)",initialValue:`${e.toString()}_SECRET_${(0,i_e.default)().substring(0,10)}`.toUpperCase()}),n=await Qe({message:"What's the secret description?",initialValue:`${e} secret`},{required:!1});return await z6({name:r,value:t,description:n}),r},t1t=async e=>{switch(e){case zt.SchemaSecretType.jdbc:return a1t();case zt.SchemaSecretType.kafka:return r1t();case zt.SchemaSecretType.rockset:return s1t();case zt.SchemaSecretType.s3:return i1t();case zt.SchemaSecretType.elasticSearch:return n1t();case zt.SchemaSecretType.clickHouse:return o1t()}},r1t=async()=>{let e=await Qe({message:"What's the host url?",placeholder:"eg: kafka-cluster.amazonaws.com:443"}),t=await ti({message:"Please select an authentication protocol",options:Object.values(zt.SecurityProtocol).map(i=>{let s="";switch(i){case zt.SecurityProtocol.PLAINTEXT:s="No TLS/SSL encryption";break;case zt.SecurityProtocol.SASL_SSL:s="Simple Authentication and Security Layer, SSL encryption";break}return{label:i,value:i,hint:s}})}),r={type:zt.SchemaSecretType.kafka,bootstrapServers:e,securityProtocol:t};if(t===zt.SecurityProtocol.SASL_SSL){let i=await ti({message:"What's the SASL (Simple Authentication and Security Layer) mechanism?",options:Object.values(zt.SaslMechanism).map(s=>{let o="";switch(s){case zt.SaslMechanism.PLAIN:o="Username/Password authentication mechanism";break;case zt.SaslMechanism.SCRAM_SHA_256:o="SCRAM-SHA-256 Salted Challenge Response Authentication Mechanism (SCRAM)";break;case zt.SaslMechanism.SCRAM_SHA_512:o="SCRAM-SHA-512 Salted Challenge Response Authentication Mechanism (SCRAM)";break}return{label:s,value:s,hint:o}})});r.saslMechanism=i,r.saslJaasUsername=await Qe({message:"What's the username?"}),r.saslJassPassword=await Qe({message:"What's the password?"})}return await wn(Pi({message:"Is the Kafka schema registry available?",initialValue:!1}))&&(r.schemaRegistryUrl=await Qe({message:"What's the registry url?"}),r.schemaRegistryUsername=await Qe({message:"What's the registry username?"}),r.schemaRegistryPassword=await Qe({message:"What's the registry password?"})),r},n1t=async()=>{let e=await Qe({message:"What's the host url?",placeholder:"eg: https://search-es-jefw.us-west-2.es.amazonaws.com:443"}),t=await Qe({message:"What's the username?"}),r=await Qe({message:"What's the password?"});return{type:zt.SchemaSecretType.elasticSearch,host:e,username:t,password:r}},i1t=async()=>{let t=await Qe({message:"What's the access key id?",placeholder:"Can be created at: https://console.aws.amazon.com/iam/"}),r=await Qe({message:"What's the secret access key?"}),n=await Qe({message:"What's the AWS region of the S3 bucket?",placeholder:"E.g.: us-east-1",validate(i){if(!u1t(i))return"Please enter a valid AWS region!"}});return{type:zt.SchemaSecretType.s3,accessKeyId:t,secretAccessKey:r,region:n}},s1t=async()=>{let e=await Qe({message:"What's the Rockset API key?",placeholder:"You can get one from https://console.rockset.com/apikeys"}),t=await Qe({message:"What's the Rockset endpoint?",initialValue:"api.usw2a1.rockset.com"});return{type:zt.SchemaSecretType.rockset,apiKey:e,endpoint:t}},o1t=async()=>{let e=await Qe({message:"What's the url?",placeholder:"eg: clickhouse://some.clickhouse.cloud:8443?ssl=true"}),t=await Qe({message:"What's the username?"}),r=await Qe({message:"What's the password?"}),n=await Qe({message:"What's the database name?",initialValue:"default"});return{type:zt.SchemaSecretType.clickHouse,url:e,username:t,password:r,databaseName:n}},a1t=async()=>await ti({message:"Please select an input method",options:[{label:"Provide connection string",hint:"eg: postgres://username:password@db.server:5432/my_database",value:"jdbcUrl"},{label:"Type-in specific attributes (host, username, password etc.)",value:"specificAttrs"}]})==="jdbcUrl"?l1t():c1t(),c1t=async()=>{let e=await Qe({message:"What's the db hostname without the port?",placeholder:"eg: my-prod.cluster-2324.us-west-2.rds.amazonaws.com",validate(s){try{s.startsWith("http")?new URL(s):new URL(`http://${s}`)}catch(o){return"Invalid URL"}}}),t=await Qe({message:"What's the port number?",validate(s){if(isNaN(Number(s)))return"Please enter a valid number!"}},{required:!1}),r=await Qe({message:"What's the database name?"}),n=await Qe({message:"What's the username?"}),i=await Qe({message:"What's the password?"});return{type:zt.SchemaSecretType.jdbc,protocol:zt.JdbcProtocol.postgres,host:e,port:Number(t),databaseName:r,user:n,password:i}},l1t=async()=>{let e=await Qe({message:"What's the connection string?",validate(r){let n=n_e(r),i=Object.values(zt.JdbcProtocol).find(s=>s.toString()===(n==null?void 0:n.protocol));if(!n||!i||!n.host||!n.segments||!n.segments[0]||!n.user||!n.password)return"Invalid URL"}}),t=n_e(e);return{type:zt.SchemaSecretType.jdbc,protocol:zt.JdbcProtocol.postgresql,host:t.hostname,port:t.port||5432,databaseName:t.segments[0],user:t.user,password:t.password}};function n_e(e){var r;let t=new URL(e);return{protocol:t.protocol.slice(0,-1),user:t.username,password:decodeURIComponent(t.password),host:t.host,hostname:t.hostname,port:t.port?+t.port:void 0,segments:t.pathname.split("/").filter(Boolean),params:(r=t.search)==null?void 0:r.slice(1).split("&").filter(Boolean).reduce((n,i)=>Gr(Qt({},n),{[i.split("=")[0]]:i.split("=")[1]}),{})}}function u1t(e){return/^[a-z]{2}-[a-z]+-\d{1,2}$/.test(e)}var s_e=async(e,t,r)=>{let n=await Qe({message:"What's the full path? (bucket needs to exist)",placeholder:"E.g.: s3://my-bucket/folder1"}),i=await Qe({message:"What are the partition columns (comma-separated list)?",initialValue:void 0},{required:!1}),s=await Qe({message:"Please describe the sink (optional)",initialValue:`File sink from ${r} to ${n}`},{required:!1});return{type:it.SinkTypes.File,format:"parquet",referenceName:`file.${r}`,path:n,secretName:t,sourceStreamName:r,partitionColumns:i,description:s}};async function o_e(e,t,r){let n=await Qe({message:"What's the index name? (will be created automatically if it doesn't exist)"}),i=await Qe({message:"Please describe the sink (optional)",initialValue:`Elasticsearch sink from ${r} to ${n}`},{required:!1});return{type:it.SinkTypes.ElasticSearch,sourceStreamName:r,referenceName:`elasticsearch.${r}`,index:n,secretName:t,description:i}}var a_e=async(e,t,r)=>{let n=await Qe({message:"What's the Kafka topic? (will be created automatically if it doesn't exist)"}),i=await Qe({message:"What is the number of partitions for the topic (if it doesn't exist)?",initialValue:void 0,validate(a){if(isNaN(+a))return"Value must be a number"}},{required:!1}),s=await wn($C({message:"Select your preferred data format",options:[{label:"Avro",value:"avro",hint:"requires Schema Registry credentials"},{label:"JSON",value:"json"}]})),o=await Qe({message:"Please describe the sink (optional)",initialValue:`Kafka sink from ${r} to ${n}`},{required:!1});return{secretName:t,sourceStreamName:r,topic:n,referenceName:`kafka.${r}`,type:it.SinkTypes.Kafka,dataFormat:s,topicPartitions:i?+i:void 0,description:o}};var c_e=e=>e.replace(/\./g,"_"),l_e=async(e,t,r)=>{let n=await Qe({message:"What's your Postgres database schema? (will be created automatically if it doesn't exist)",initialValue:"public"}),i="";(t==null?void 0:t.length)>0&&(i=t.map(a=>`${a.name} -> ${n}.${a.name}`).join(`
439
+ raw_trace.block_timestamp AS raw_trace_block_timestamp`,n),type:it.TransformationTypes.SQL,description:"Unnesting raw_trace"}});var i_e=ee(r_e());async function z6(e){let t=Ue("Creating secret").start(),[r,n]=await Ie.post("/api/admin/secrets/v1/",{body:e});r?(t.fail(r.message),process.exit(1)):n.data?t.succeed("Created secret"):(t.fail("Failed to create secret, try again"),process.exit(1))}var e1t={[zt.SchemaSecretType.jdbc]:"create table, create schema, row write/delete/update",[zt.SchemaSecretType.elasticSearch]:"create index, row write/delete/update",[zt.SchemaSecretType.s3]:"s3:PutObject, s3:PutObjectAcl, s3:GetBucketLocation, s3:ListMultipartUploadParts, s3:AbortMultipartUpload, s3:ListBucketMultipartUploads",[zt.SchemaSecretType.kafka]:"create topic, write message",[zt.SchemaSecretType.rockset]:"create workspace, create collection, read/write records",[zt.SchemaSecretType.clickHouse]:"create table, row write/delete/update"},$6=async e=>{os(`Requires following privileges: ${e1t[e]}.`,`Create a new ${e} secret`);let t=await t1t(e),r=await Qe({message:"What's the secret name? (must only contain uppercase letters, numbers, underscores and be unique)",initialValue:`${e.toString()}_SECRET_${(0,i_e.default)().substring(0,10)}`.toUpperCase()}),n=await Qe({message:"What's the secret description?",initialValue:`${e} secret`},{required:!1});return await z6({name:r,value:t,description:n}),r},t1t=async e=>{switch(e){case zt.SchemaSecretType.jdbc:return a1t();case zt.SchemaSecretType.kafka:return r1t();case zt.SchemaSecretType.rockset:return s1t();case zt.SchemaSecretType.s3:return i1t();case zt.SchemaSecretType.elasticSearch:return n1t();case zt.SchemaSecretType.clickHouse:return o1t()}},r1t=async()=>{let e=await Qe({message:"What's the host url?",placeholder:"eg: kafka-cluster.amazonaws.com:443"}),t=await ti({message:"Please select an authentication protocol",options:Object.values(zt.SecurityProtocol).map(i=>{let s="";switch(i){case zt.SecurityProtocol.PLAINTEXT:s="No TLS/SSL encryption";break;case zt.SecurityProtocol.SASL_SSL:s="Simple Authentication and Security Layer, SSL encryption";break}return{label:i,value:i,hint:s}})}),r={type:zt.SchemaSecretType.kafka,bootstrapServers:e,securityProtocol:t};if(t===zt.SecurityProtocol.SASL_SSL){let i=await ti({message:"What's the SASL (Simple Authentication and Security Layer) mechanism?",options:Object.values(zt.SaslMechanism).map(s=>{let o="";switch(s){case zt.SaslMechanism.PLAIN:o="Username/Password authentication mechanism";break;case zt.SaslMechanism.SCRAM_SHA_256:o="SCRAM-SHA-256 Salted Challenge Response Authentication Mechanism (SCRAM)";break;case zt.SaslMechanism.SCRAM_SHA_512:o="SCRAM-SHA-512 Salted Challenge Response Authentication Mechanism (SCRAM)";break}return{label:s,value:s,hint:o}})});r.saslMechanism=i,r.saslJaasUsername=await Qe({message:"What's the username?"}),r.saslJassPassword=await Qe({message:"What's the password?"})}return await wn(Pi({message:"Is the Kafka schema registry available?",initialValue:!1}))&&(r.schemaRegistryUrl=await Qe({message:"What's the registry url?"}),r.schemaRegistryUsername=await Qe({message:"What's the registry username?"}),r.schemaRegistryPassword=await Qe({message:"What's the registry password?"})),r},n1t=async()=>{let e=await Qe({message:"What's the host url?",placeholder:"eg: https://search-es-jefw.us-west-2.es.amazonaws.com:443"}),t=await Qe({message:"What's the username?"}),r=await Qe({message:"What's the password?"});return{type:zt.SchemaSecretType.elasticSearch,host:e,username:t,password:r}},i1t=async()=>{let t=await Qe({message:"What's the access key id?",placeholder:"Can be created at: https://console.aws.amazon.com/iam/"}),r=await Qe({message:"What's the secret access key?"}),n=await Qe({message:"What's the AWS region of the S3 bucket?",placeholder:"E.g.: us-east-1",validate(i){if(!u1t(i))return"Please enter a valid AWS region!"}});return{type:zt.SchemaSecretType.s3,accessKeyId:t,secretAccessKey:r,region:n}},s1t=async()=>{let e=await Qe({message:"What's the Rockset API key?",placeholder:"You can get one from https://console.rockset.com/apikeys"}),t=await Qe({message:"What's the Rockset endpoint?",initialValue:"api.usw2a1.rockset.com"});return{type:zt.SchemaSecretType.rockset,apiKey:e,endpoint:t}},o1t=async()=>{let e=await Qe({message:"What's the url?",placeholder:"eg: clickhouse://some.clickhouse.cloud:8443?ssl=true"}),t=await Qe({message:"What's the username?"}),r=await Qe({message:"What's the password?"}),n=await Qe({message:"What's the database name?",initialValue:"default"});return{type:zt.SchemaSecretType.clickHouse,url:e,username:t,password:r,databaseName:n}},a1t=async()=>await ti({message:"Please select an input method",options:[{label:"Provide connection string",hint:"eg: postgres://username:password@db.server:5432/my_database",value:"jdbcUrl"},{label:"Type-in specific attributes (host, username, password etc.)",value:"specificAttrs"}]})==="jdbcUrl"?l1t():c1t(),c1t=async()=>{let e=await Qe({message:"What's the db hostname without the port?",placeholder:"eg: my-prod.cluster-2324.us-west-2.rds.amazonaws.com",validate(s){try{s.startsWith("http")?new URL(s):new URL(`http://${s}`)}catch(o){return"Invalid URL"}}}),t=await Qe({message:"What's the port number?",validate(s){if(isNaN(Number(s)))return"Please enter a valid number!"}},{required:!1}),r=await Qe({message:"What's the database name?"}),n=await Qe({message:"What's the username?"}),i=await Qe({message:"What's the password?"});return{type:zt.SchemaSecretType.jdbc,protocol:zt.JdbcProtocol.postgres,host:e,port:Number(t),databaseName:r,user:n,password:i}},l1t=async()=>{let e=await Qe({message:"What's the connection string?",validate(r){let n=n_e(r),i=Object.values(zt.JdbcProtocol).find(s=>s.toString()===(n==null?void 0:n.protocol));if(!n||!i||!n.host||!n.segments||!n.segments[0]||!n.user||!n.password)return"Invalid URL"}}),t=n_e(e);return{type:zt.SchemaSecretType.jdbc,protocol:zt.JdbcProtocol.postgresql,host:t.hostname,port:t.port||5432,databaseName:t.segments[0],user:t.user,password:t.password}};function n_e(e){var r;let t=new URL(e);return{protocol:t.protocol.slice(0,-1),user:t.username,password:decodeURIComponent(t.password),host:t.host,hostname:t.hostname,port:t.port?+t.port:void 0,segments:t.pathname.split("/").filter(Boolean),params:(r=t.search)==null?void 0:r.slice(1).split("&").filter(Boolean).reduce((n,i)=>Gr(Qt({},n),{[i.split("=")[0]]:i.split("=")[1]}),{})}}function u1t(e){return/^[a-z]{2}-[a-z]+-\d{1,2}$/.test(e)}var s_e=async(e,t,r)=>{let n=await Qe({message:"What's the full path? (bucket needs to exist)",placeholder:"E.g.: s3://my-bucket/folder1"}),i=await Qe({message:"What are the partition columns (comma-separated list)?",initialValue:void 0},{required:!1}),s=await Qe({message:"Please describe the sink (optional)",initialValue:`File sink from ${r} to ${n}`},{required:!1});return{type:it.SinkTypes.File,format:"parquet",referenceName:`file_${r}`,path:n,secretName:t,sourceStreamName:r,partitionColumns:i,description:s}};async function o_e(e,t,r){let n=await Qe({message:"What's the index name? (will be created automatically if it doesn't exist)"}),i=await Qe({message:"Please describe the sink (optional)",initialValue:`Elasticsearch sink from ${r} to ${n}`},{required:!1});return{type:it.SinkTypes.ElasticSearch,sourceStreamName:r,referenceName:`elasticsearch_${r}`,index:n,secretName:t,description:i}}var a_e=async(e,t,r)=>{let n=await Qe({message:"What's the Kafka topic? (will be created automatically if it doesn't exist)"}),i=await Qe({message:"What is the number of partitions for the topic (if it doesn't exist)?",initialValue:void 0,validate(a){if(isNaN(+a))return"Value must be a number"}},{required:!1}),s=await wn($C({message:"Select your preferred data format",options:[{label:"Avro",value:"avro",hint:"requires Schema Registry credentials"},{label:"JSON",value:"json"}]})),o=await Qe({message:"Please describe the sink (optional)",initialValue:`Kafka sink from ${r} to ${n}`},{required:!1});return{secretName:t,sourceStreamName:r,topic:n,referenceName:`kafka_${r}`,type:it.SinkTypes.Kafka,dataFormat:s,topicPartitions:i?+i:void 0,description:o}};var c_e=e=>e.replace(/\./g,"_"),l_e=async(e,t,r)=>{let n=await Qe({message:"What's your Postgres database schema? (will be created automatically if it doesn't exist)",initialValue:"public"}),i="";(t==null?void 0:t.length)>0&&(i=t.map(a=>`${a.name} -> ${n}.${a.name}`).join(`
440
440
  `)),i+=`
441
441
  `+e.map(a=>{switch(a.type){case it.SourceTypes.SubgraphEntity:return`${a.namespace}.${a.entity.name} -> ${n}.${a.namespace}_${a.entity.name}`;case it.SourceTypes.Kafka:return`${a.namespace}.${a.name} -> ${n}.${a.namespace}_${a.name}`;case it.SourceTypes.Dataset:{let c=a.name.replace(/\./g,"_");return t.find(l=>l.name.includes(c))?"":`${a.name} -> ${n}.${c_e(a.name)}`}default:throw new Error(`Unhandled source type: ${a.type}.`)}}).filter(Boolean).join(`
442
442
  `),os(`We recommend the following data mapping:
443
443
 
444
- ${i}`,"Suggested sink tables");let s=await wn(Pi({message:"Do you want to automatically map data to the suggested sink tables as seen above?",initialValue:!0})),o=[];if(s){(t==null?void 0:t.length)>0&&t.forEach(c=>{switch(c.type){case it.TransformationTypes.SQL:o.push({schema:n,secretName:r,sourceStreamName:c.name,referenceName:`postgres.${c.name}`,table:c.name,type:it.SinkTypes.Postgres,description:`Postgres sink for transform: ${c.name}`});break;default:throw new Error(`Unhandled transformation type: ${c.type}.`)}});let a="";e.forEach(c=>{switch(c.type){case it.SourceTypes.SubgraphEntity:a=`${c.namespace}.${c.entity.name}`,o.push({schema:n,secretName:r,sourceStreamName:a,referenceName:`postgres.${a}`,table:`${c.namespace}_${c.entity.name}`,type:it.SinkTypes.Postgres,description:`Postgres sink for subgraph entity: ${a}`});break;case it.SourceTypes.Kafka:a=`${c.namespace}.${c.name}`,o.push({schema:n,secretName:r,sourceStreamName:a,referenceName:`postgres.${a}`,table:`${c.namespace}_${c.name}`,type:it.SinkTypes.Postgres,description:`Postgres sink for Kafka: ${a}`});break;case it.SourceTypes.Dataset:{a=c.name;let l=a.replace(/\./g,"_");t.find(u=>u.name===l||u.name.startsWith(`${l}_address_`))||o.push({schema:n,secretName:r,sourceStreamName:a,referenceName:`postgres.${a}`,table:c_e(c.name),type:it.SinkTypes.Postgres,description:`Postgres sink for Dataset: ${a}`});break}default:throw new Error(`Unhandled source type: ${c.type}.`)}})}else{let a=await yh(e,t,"Select a transform or source for your Postgres sink"),c=await Qe({message:"What's your database table name? (will be created automatically if it doesn't exist)",validate(u){if(!u.match(/^\w+$/))return"Please provide a table name that contains alphanumeric characters and underscores only."}}),l=await Qe({message:"Please describe the sink (optional)",initialValue:`Postgres sink ${n}.${c} for ${a}`},{required:!1});o.push({schema:n,secretName:r,sourceStreamName:a,referenceName:`postgres.${a}`,table:c,type:it.SinkTypes.Postgres,description:l})}return o};var u_e=async(e,t,r)=>{let n=await Qe({message:"What's the name of the workspace? (will be created automatically if it doesn't exist)"}),i=await Qe({message:"What's the name of the collection? (will be created automatically if it doesn't exist)"}),s=await Qe({message:"What's the Rockset ingest transformation?",validate(l){if(l&&!(l!=null&&l.toUpperCase().startsWith("SELECT")))return"Must start with `SELECT`"}},{required:!1}),o=await Qe({message:"What's the flush size? (number of records to batch before writing to Rockset)",initialValue:"1500",validate(l){if(isNaN(+l))return"Value must be a number"}},{required:!1}),a=await Qe({message:"What's the flush interval in milliseconds? (how long to wait before writing batch of records to Rockset)",initialValue:"30000",validate(l){if(isNaN(+l))return"Value must be a number"}},{required:!1}),c=await Qe({message:"Please describe the Rockset sink (optional)",initialValue:`Rockset sink from ${r} to ${n}.${i}`},{required:!1});return{collection:i,secretName:t,sourceStreamName:r,referenceName:`rockset.${r}`,type:it.SinkTypes.Rockset,workspace:n,flushIntervalMs:a?+a:void 0,flushSize:o?+o:void 0,ingestTransformationSql:s,description:c}};async function d_e(e,t,r){let n=await Qe({message:"What's the name of the table? (will be created automatically if it doesn't exist)"}),i=await Qe({message:"What's the batch size? (number of records to batch before writing to ClickHouse)",initialValue:"100000",validate(l){if(isNaN(+l))return"Value must be a number"}},{required:!1}),s=await Qe({message:"What's the flush interval in milliseconds? (how long to wait before writing batch of records to ClickHouse)",initialValue:"10000"},{required:!1}),o=await wn(Pi({message:"Enable append-only mode? (all operations are modelled as INSERTs)",initialValue:!0})),a;o&&(a=await Qe({message:"What's the version number column name? If not specified, 'insert_time' column is automatically added instead."},{required:!1}));let c=await Qe({message:"Please describe the sink (optional)",initialValue:`ClickHouse sink from ${r} to ${n}`},{required:!1});return{type:it.SinkTypes.ClickHouse,sourceStreamName:r,secretName:t,description:c,referenceName:`clickhouse.${r}`,table:n,batchSize:i?+i:void 0,flushInterval:s,appendOnlyMode:o,versionColumnName:a}}var p_e=async(e,t,r)=>{os(`Lastly, let's add sinks.
444
+ ${i}`,"Suggested sink tables");let s=await wn(Pi({message:"Do you want to automatically map data to the suggested sink tables as seen above?",initialValue:!0})),o=[];if(s){(t==null?void 0:t.length)>0&&t.forEach(c=>{switch(c.type){case it.TransformationTypes.SQL:o.push({schema:n,secretName:r,sourceStreamName:c.name,referenceName:`postgres_${c.name}`,table:c.name,type:it.SinkTypes.Postgres,description:`Postgres sink for transform: ${c.name}`});break;default:throw new Error(`Unhandled transformation type: ${c.type}.`)}});let a="";e.forEach(c=>{switch(c.type){case it.SourceTypes.SubgraphEntity:a=`${c.namespace}.${c.entity.name}`,o.push({schema:n,secretName:r,sourceStreamName:a,referenceName:`postgres_${a}`,table:`${c.namespace}_${c.entity.name}`,type:it.SinkTypes.Postgres,description:`Postgres sink for subgraph entity: ${a}`});break;case it.SourceTypes.Kafka:a=`${c.namespace}.${c.name}`,o.push({schema:n,secretName:r,sourceStreamName:a,referenceName:`postgres_${a}`,table:`${c.namespace}_${c.name}`,type:it.SinkTypes.Postgres,description:`Postgres sink for Kafka: ${a}`});break;case it.SourceTypes.Dataset:{a=c.name;let l=a.replace(/\./g,"_");t.find(u=>u.name===l||u.name.startsWith(`${l}_address_`))||o.push({schema:n,secretName:r,sourceStreamName:a,referenceName:`postgres_${a}`,table:c_e(c.name),type:it.SinkTypes.Postgres,description:`Postgres sink for Dataset: ${a}`});break}default:throw new Error(`Unhandled source type: ${c.type}.`)}})}else{let a=await yh(e,t,"Select a transform or source for your Postgres sink"),c=await Qe({message:"What's your database table name? (will be created automatically if it doesn't exist)",validate(u){if(!u.match(/^\w+$/))return"Please provide a table name that contains alphanumeric characters and underscores only."}}),l=await Qe({message:"Please describe the sink (optional)",initialValue:`Postgres sink ${n}.${c} for ${a}`},{required:!1});o.push({schema:n,secretName:r,sourceStreamName:a,referenceName:`postgres_${a}`,table:c,type:it.SinkTypes.Postgres,description:l})}return o};var u_e=async(e,t,r)=>{let n=await Qe({message:"What's the name of the workspace? (will be created automatically if it doesn't exist)"}),i=await Qe({message:"What's the name of the collection? (will be created automatically if it doesn't exist)"}),s=await Qe({message:"What's the Rockset ingest transformation?",validate(l){if(l&&!(l!=null&&l.toUpperCase().startsWith("SELECT")))return"Must start with `SELECT`"}},{required:!1}),o=await Qe({message:"What's the flush size? (number of records to batch before writing to Rockset)",initialValue:"1500",validate(l){if(isNaN(+l))return"Value must be a number"}},{required:!1}),a=await Qe({message:"What's the flush interval in milliseconds? (how long to wait before writing batch of records to Rockset)",initialValue:"30000",validate(l){if(isNaN(+l))return"Value must be a number"}},{required:!1}),c=await Qe({message:"Please describe the Rockset sink (optional)",initialValue:`Rockset sink from ${r} to ${n}.${i}`},{required:!1});return{collection:i,secretName:t,sourceStreamName:r,referenceName:`rockset_${r}`,type:it.SinkTypes.Rockset,workspace:n,flushIntervalMs:a?+a:void 0,flushSize:o?+o:void 0,ingestTransformationSql:s,description:c}};async function d_e(e,t,r){let n=await Qe({message:"What's the name of the table? (will be created automatically if it doesn't exist)"}),i=await Qe({message:"What's the batch size? (number of records to batch before writing to ClickHouse)",initialValue:"100000",validate(l){if(isNaN(+l))return"Value must be a number"}},{required:!1}),s=await Qe({message:"What's the flush interval in milliseconds? (how long to wait before writing batch of records to ClickHouse)",initialValue:"10000"},{required:!1}),o=await wn(Pi({message:"Enable append-only mode? (all operations are modelled as INSERTs)",initialValue:!0})),a;o&&(a=await Qe({message:"What's the version number column name? If not specified, 'insert_time' column is automatically added instead."},{required:!1}));let c=await Qe({message:"Please describe the sink (optional)",initialValue:`ClickHouse sink from ${r} to ${n}`},{required:!1});return{type:it.SinkTypes.ClickHouse,sourceStreamName:r,secretName:t,description:c,referenceName:`clickhouse_${r}`,table:n,batchSize:i?+i:void 0,flushInterval:s,appendOnlyMode:o,versionColumnName:a}}var p_e=async(e,t,r)=>{os(`Lastly, let's add sinks.
445
445
 
446
446
  You can add one or more sinks to define where to persist data.
447
447
 
@@ -451,7 +451,7 @@ Pipeline started. It's safe to exit now (press Ctrl-C). Or you can keep this ter
451
451
  Wait a few minutes and use ${wg.default.bold("goldsky subgraph list")} to check the status of your deployments.`):pm(r,i):(r.succeed(),console.log(),console.log(`${wg.default.bold("Deployed subgraph API:")} ${e.apiHost}${s.data.subgraph.graphql_endpoint}`))}function pm(e,t){e.fail(),console.log(),console.log(`${wg.default.bold("Deployment failed:")} ${wg.default.red(t.message||t.error)}`),process.exit(1)}async function djt(e){let t=Ue(`Packaging deployment bundle from ${e}`).start();try{let r=new ZAe.default;r.generateNodeStream({type:"nodebuffer",streamFiles:!0});let n=await ml.default.promises.readFile(ta.default.join(e,"subgraph.yaml"),{encoding:"utf8"}),i=u2.default.parse(n);r.file("subgraph.yaml",n);let s=i.schema.file,o=await ml.default.promises.readFile(ta.default.join(e,s));r.file(s,o);let a=i.dataSources.concat(i.templates||[]);for(let c of a){let l=c.mapping,u=[l.file,...l.abis.map(d=>d.file)];for(let d of u){let m=await ml.default.promises.readFile(ta.default.join(e,d));r.file(d,m)}}return t.succeed(),r}catch(r){throw t.fail(),r}}var d2=ee(Nt()),nPe=e=>e==null?void 0:e.replace(/\/$/,""),pjt="deploy <nameAndVersion>",mjt="Deploy a subgraph to Goldsky",fjt=e=>e.positional("nameAndVersion",{describe:"Name and version of the subgraph, e.g. 'my-subgraph/1.0.0'",type:"string",demandOption:!0}).option("path",{describe:"Path to subgraph",type:"string"}).option("from-ipfs-hash",{describe:"IPFS hash of a publicly deployed subgraph",type:"string"}).option("ipfs-gateway",{describe:"IPFS gateway to use if downloading the subgraph from IPFS",type:"string",default:"https://ipfs.network.thegraph.com"}).option("from-graphql",{describe:"[Deprecated] Use --from-url instead",type:"string",hidden:!0,coerce(t){return nPe(t)}}).option("from-abi",{describe:`${d2.default.red("[BETA] Generate a subgraph from an ABI ")}`,type:"string"}).option("from-url",{describe:"GraphQL endpoint for a publicly deployed subgraph",type:"string",coerce(t){return nPe(t)}}).option("overwrite",{describe:"Overwrite existing subgraph with the matching name/version",type:"boolean",default:!1}).option("remove-graft",{describe:"Remove grafts from the subgraph prior to deployment",type:"boolean",default:!1}).option("start-block",{describe:"Change start block of your subgraph prior to deployment. If used in conjunction with --graft-from, this will be the graft block as well.",type:"number"}).option("graft-from",{describe:`${d2.default.red("[BETA] Graft from the latest block of an existing subgraph in the format <name>/<version>")}`,demandOption:!1,type:"string"}).option("enable-call-handlers",{describe:`${d2.default.red("[BETA] Generate a subgraph from an ABI with call handlers enabled. Only meaningful when used with --from-abi")}`,type:"boolean",default:!1}).conflicts("path",["from-ipfs-hash","from-graphql","from-url","from-abi"]).conflicts("from-ipfs-hash",["path","from-graphql","from-url","from-abi"]).conflicts("from-graphql",["path","from-ipfs-hash","from-url","from-abi"]).conflicts("from-url",["path","from-ipfs-hash","from-graphql","from-abi"]).conflicts("from-abi",["path","from-ipfs-hash","from-graphql","from-url"]),hjt=async({apiHost:e,nameAndVersion:t,overwrite:r,path:n,fromIpfsHash:i,fromUrl:s,fromGraphql:o,fromAbi:a,ipfsGateway:c,removeGraft:l,startBlock:u,graftFrom:d,enableCallHandlers:m})=>rPe({apiHost:e,name:en(t)[0],overwrite:r,path:n,ipfsHash:i,graphql:s||o,abi:a,ipfsGateway:c,v:en(t)[1],removeGraft:l,startBlock:u,graftFrom:d,enableCallHandlers:m});var r7={};ft(r7,{builder:()=>bjt,command:()=>gjt,describe:()=>yjt,handler:()=>vjt});var ra=ee(Nt());async function iPe(e){var s,o;let t="/api/admin/subgraph/v1/subgraphs";e.name&&(t+=`/${e.name}`),e.filter&&(t+=`/${e.filter}`),e.v&&(t+=`/${e.v}`);let r=Ue("Fetching subgraphs").start(),[n,i]=await Ie.get(t);if(n)r.fail(`${ra.default.bold("Subgraph listing failed:")} ${ra.default.red(n.message)}`),process.exit(1);else if(r.stop(),i.data.length===0)console.log(ra.default.bold("No subgraphs found."),"Run 'goldsky subgraph deploy --help' for information on deploying a subgraph");else{console.log(ra.default.bold("Subgraphs"));for(let a of i.data)if(a.tag?a.tag.target_version?console.log(ra.default.bold(`* ${a.name}/${a.version} -> ${a.name}/${a.tag.target_version}`)):console.log(ra.default.bold(`* ${a.name}/${a.version} -> [no target]`)):console.log(ra.default.bold(`* ${a.name}/${a.version}`)),!e.summary&&a.deployments.length){let c=a.deployments[0];console.log(" ","GraphQL API:",Ie.getPath(a.graphql_endpoint,{})),console.log(" ","Created:",new Date(c.created_at).toLocaleString()),console.log(" ","Status:",`${ra.default[c.health==="healthy"?"green":"red"](c.health)}`,a.status?` (${a.status})`:""),c.fatal_error&&console.log(" ","Fatal error:",ra.default.red(c.fatal_error.replace(/\t/g,`\r
452
452
  `))),console.log(" ","Synced:",`${c.synced?ra.default.green("\u2714"):`${((s=c.indexing_progress)==null?void 0:s.progress_percent.toPrecision(3))||0}%`}`),c.indexing_progress&&(console.log(" ","Blocks indexed:",`${c.indexing_progress.deployment_start_block} -> ${c.indexing_progress.deployment_head_block}`),console.log(" ","Chain:",(o=c.indexing_progress)==null?void 0:o.network))}}}var gjt="list [nameAndVersion]",yjt="View deployed subgraphs and tags",bjt=e=>e.positional("nameAndVersion",{describe:"Name and version of the subgraph, e.g. 'my-subgraph/1.0.0'",type:"string"}).option("filter",{describe:"Limit results to just tags or deployments",choices:["tags","deployments"]}).option("summary",{describe:"Summarize subgraphs & versions without all their details",type:"boolean",default:!1}).implies("version","name").conflicts("filter","version"),vjt=async({apiHost:e,summary:t,filter:r,nameAndVersion:n})=>iPe({apiHost:e,summary:t,filter:r,name:n?en(n)[0]:void 0,v:n?en(n)[1]:void 0});var s7={};ft(s7,{builder:()=>Ojt,command:()=>Pjt,describe:()=>kjt,handler:()=>Rjt});var n7={};ft(n7,{builder:()=>wjt,command:()=>_jt,describe:()=>Sjt,handler:()=>xjt});var Gu=ee(Nt());async function p2(e){let t=r=>`/api/admin/subgraph/v1/subgraphs/${r.name}/tags/${r.version_label}`;if(e.remove){let r=Ue("Removing tag").start(),[n,i]=await Ie.delete_(t,{params:{name:e.name,version_label:e.v}});n?r.fail(`${Gu.default.bold("Tag removal failed:")} ${Gu.default.red(n.message)}`):r.succeed(`${Gu.default.bold("Removed tag.")}`)}else{let r=Ue("Tagging subgraph").start(),[n,i]=await Ie.put(t,{params:{name:e.name,version_label:e.v},body:{target_version:e.t}});n?(r.fail(`${Gu.default.bold("Tagging failed:")} ${Gu.default.red(n.message)}`),process.exit(1)):(r.succeed(`${Gu.default.bold("Tagged subgraph:")}
453
453
  ${t({name:e.name,version_label:e.v})} ->
454
- ${e.t?t({name:e.name,version_label:e.t}):"null"}`),i.data.subgraph.deployments.length&&console.log(`${Gu.default.bold("GraphQL API:")} ${e.apiHost}${i.data.subgraph.graphql_endpoint}`))}}var _jt="create <nameAndVersion>",Sjt="Create a new tag",wjt=e=>e.positional("nameAndVersion",{describe:"Name and version of the subgraph, e.g. 'my-subgraph/1.0.0'",type:"string",demandOption:!0}).option("tag",{alias:"t",describe:"The name of the tag",type:"string",demandOption:!0}),xjt=async({apiHost:e,nameAndVersion:t,tag:r})=>{await p2({apiHost:e,name:en(t)[0],remove:!1,v:r,t:en(t)[1]})};var i7={};ft(i7,{builder:()=>Djt,command:()=>Cjt,describe:()=>Ejt,handler:()=>Ajt});var Cjt="delete <nameAndVersion>",Ejt="Delete a tag",Djt=e=>e.positional("nameAndVersion",{describe:"Name and version of the subgraph, e.g. 'my-subgraph/1.0.0'",type:"string",demandOption:!0}).option("tag",{alias:"t",describe:"The name of the tag to delete",type:"string",demandOption:!0}),Ajt=async({apiHost:e,nameAndVersion:t,tag:r})=>{await p2({apiHost:e,name:en(t)[0],remove:!0,v:r})};var Pjt="tag",kjt="Commands related to tags",Ojt=e=>e.command(n7).command(i7).demandCommand(1),Rjt=async()=>{};var o7={};ft(o7,{builder:()=>Njt,command:()=>Fjt,describe:()=>Ijt,handler:()=>qjt});var fl=ee(Nt());var Tjt=/(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([\p{L}]*)/uig;Kt.nanosecond=Kt.ns=1/1e6;Kt.\u00B5s=Kt.\u03BCs=Kt.us=Kt.microsecond=1/1e3;Kt.millisecond=Kt.ms=Kt[""]=1;Kt.second=Kt.sec=Kt.s=Kt.ms*1e3;Kt.minute=Kt.min=Kt.m=Kt.s*60;Kt.hour=Kt.hr=Kt.h=Kt.m*60;Kt.day=Kt.d=Kt.h*24;Kt.week=Kt.wk=Kt.w=Kt.d*7;Kt.month=Kt.b=Kt.d*(365.25/12);Kt.year=Kt.yr=Kt.y=Kt.d*365.25;function Kt(e="",t="ms"){var r=null;return e=(e+"").replace(/(\d)[,_](\d)/g,"$1$2"),e.replace(Tjt,function(n,i,s){s=sPe(s),s&&(r=(r||0)+parseFloat(i,10)*s)}),r&&r/(sPe(t)||1)}function sPe(e){return Kt[e]||Kt[e.toLowerCase().replace(/s$/,"")]}var oPe=Kt;var Fjt="log <nameAndVersion>",Ijt=`${fl.default.red("[BETA]")} Tail a subgraph's logs`,Njt=e=>e.positional("nameAndVersion",{describe:"Name and version of the subgraph, e.g. 'my-subgraph/1.0.0'",type:"string",demandOption:!0}).option("since",{describe:"Return logs newer than a relative duration like 5s, 2m, or 3h",default:"1m",demandOption:!1}).option("format",{describe:"The format used to output logs, use text or json for easier parsed output, use pretty for more readable console output",choices:["pretty","json","text"],default:"text"}).option("filter",{describe:"The minimum log level to output",choices:Ex.SubgraphLogLevels,default:"info"}).option("interval",{describe:"The time in seconds to wait between checking for new logs",type:"number",default:5}).option("max-queries",{describe:"The maximum number of queries to make. Meant for testing.",type:"number",hidden:!0,demandOption:!1}),qjt=async({since:e,format:t,filter:r,interval:n,nameAndVersion:i,maxQueries:s})=>{let o=Ue("Validating since").start(),a=oPe(e);a||(o.fail(),console.log(fl.default.red(`Invalid value for parameter 'since': ${e}. Make sure the value you provide can be parsed by https://www.npmjs.com/package/parse-duration`)),process.exit(1)),o.stop();let c=Ue("Tailing logs").start(),l=new Date(Date.now()-a).getTime(),[u,d]=en(i),[m,f]=await Ie.get(b=>`/api/admin/subgraph/v1/subgraph_deployments/${b.name}/${b.version_label}/logs`,{params:{name:u,version_label:d},querystring:{after:l,log_level:r}}),y=1;if(m)c.fail(m.message),process.exit(1);else{c.stop();let b;for(;m?(console.log(m.message),process.exit(1)):(b=f.data.cursor,Ljt(t,f.data.results)),!(s&&y>=s);)[m,f]=await Ie.get(v=>`/api/admin/subgraph/v1/subgraph_deployments/${v.name}/${v.version_label}/logs`,{params:{name:u,version_label:d},querystring:{cursor:b,log_level:r}}),y++,await Bjt(Math.max(n,1)*1e3)}};function Bjt(e){return new Promise(t=>setTimeout(t,e))}function Ljt(e,t){t.map(r=>Gr(Qt({},r),{timestamp:new Date(r.timestamp).toLocaleString()})).forEach(r=>{switch(e){case"json":{console.log(r);break}case"pretty":{let n=`[${fl.default.dim(r.timestamp)}]`;n+=`[${(s=>{switch(s){case"error":return fl.default.red;case"warning":return fl.default.yellow;case"info":return fl.default.cyan;case"debug":return fl.default.dim;default:return fl.default.grey}})(r.level)(r.level)}] `,n+=r.text,console.log(n);break}default:{console.log(`[${r.timestamp}][${r.level}] ${r.text}`);break}}})}var d7={};ft(d7,{builder:()=>n3t,command:()=>t3t,describe:()=>r3t,handler:()=>i3t});var hPe=ee(Nt());var a7={};ft(a7,{builder:()=>zjt,command:()=>Mjt,describe:()=>jjt,handler:()=>$jt});var dPe=ee(Nt());var vs=ee(Nt());async function aPe(e){let t=Ue("Creating webhook").start(),[r,n]=await Ie.post(i=>`/api/admin/subgraph/v1/webhooks/${i.subgraphName}/${i.subgraphVersion}`,{params:{subgraphName:e.subgraphName,subgraphVersion:e.subgraphVersion},body:{name:e.name,webhookUrl:e.webhookUrl,entity:e.entity,numRetries:e.numRetries,retryIntervalSeconds:e.retryInterval,retryTimeoutSeconds:e.retryTimeout}});r?(t.fail(),console.log(),console.log(`${vs.default.bold("Webhook creation failed:")} ${vs.default.red(r.message)}`),process.exit(1)):(t.succeed(),console.log(),console.log(`Webhook '${vs.default.bold(n.data.name)}' with ID '${vs.default.bold(n.data.id)}' created.`),console.log(`Make sure calls to your endpoint have the following value for the 'goldsky-webhook-secret' header: ${vs.default.bold(`${n.data.webhookSecret}`)}`))}async function cPe(e){let t=Ue("Deleting webhook").start(),[r]=await Ie.delete_(n=>`/api/admin/subgraph/v1/webhooks/${n.name}`,{params:{name:e.name}});r?(t.fail(),console.log(),console.log(`${vs.default.bold("Webhook deletion failed:")} ${vs.default.red(r.message)}`),process.exit(1)):(t.succeed(),console.log(),console.log(`Webhook '${vs.default.bold(e.name)}' deleted.`))}async function lPe(){let e=Ue("Listing webhooks").start(),t="/api/admin/subgraph/v1/webhooks",[r,n]=await Ie.get(t);if(r)e.fail(),console.log(),console.log(`${vs.default.bold("Could not list webhooks:")} ${vs.default.red(r.message)}`),process.exit(1);else if(e.succeed(),console.log(),n.data.length>0){let i=[];n.data.map(s=>{i.push([s.subgraphName,s.subgraphVersion,s.name,s.id,s.entity,s.webhookUrl])}),Ah(["Subgraph Name","Subgraph Version","Webhook Name","Webhook ID","Entity","URL"],i)}else console.log(`No webhooks found. Create one with ${vs.default.bold("goldsky subgraph webhook create")}.`)}async function uPe({name:e,version:t}){let r=Ue("Listing entities").start(),n=`/api/admin/subgraph/v1/webhooks/entities/${e}/${t}`,[i,s]=await Ie.get(n);if(i)r.fail(),console.log(),console.log(`${vs.default.bold("Could not list entities:")} ${vs.default.red(i.message)}`),process.exit(1);else if(s.data.length===0)r.fail("No entities found. Please reach out to support@goldsky.com"),process.exit(1);else{r.succeed("Possible webhook entities:");for(let o of s.data)console.log(o.name)}}var Mjt="create <nameAndVersion>",jjt=`${dPe.default.red("[BETA]")} Create a webhook`,zjt=e=>e.positional("nameAndVersion",{describe:"Name and version of the subgraph, e.g. 'my-subgraph/1.0.0'",type:"string",demandOption:!0}).option("name",{describe:"Name of the webhook, must be unique",type:"string",demandOption:!0}).option("url",{describe:"URL to send events to",type:"string",demandOption:!0}).option("entity",{describe:"Subgraph entity to send events for",type:"string",demandOption:!0}).option("num-retries",{describe:"Number of times to retry sending an event",type:"number",default:10}).option("retry-interval",{describe:"Number of seconds to wait between retries",type:"number",default:60}).option("retry-timeout",{describe:"Number of seconds to wait for a response before retrying",type:"number",default:30}),$jt=async({entity:e,name:t,nameAndVersion:r,url:n,numRetries:i,retryInterval:s,retryTimeout:o})=>{await aPe({name:t,subgraphName:en(r)[0],subgraphVersion:en(r)[1],webhookUrl:n,entity:e,numRetries:i,retryInterval:s,retryTimeout:o})};var c7={};ft(c7,{builder:()=>Xjt,command:()=>Ujt,describe:()=>Gjt,handler:()=>Hjt});var pPe=ee(Nt());var Ujt="delete",Gjt=`${pPe.default.red("[BETA]")} Delete a webhook`,Xjt=e=>e.option("name",{describe:"Name of the webhook to delete",type:"string",demandOption:!0}),Hjt=async({name:e})=>{await cPe({name:e})};var l7={};ft(l7,{builder:()=>Kjt,command:()=>Vjt,describe:()=>Wjt,handler:()=>Yjt});var mPe=ee(Nt());var Vjt="list",Wjt=`${mPe.default.red("[BETA]")} List webhooks`,Kjt=e=>e,Yjt=async e=>{await lPe()};var u7={};ft(u7,{builder:()=>Zjt,command:()=>Jjt,describe:()=>Qjt,handler:()=>e3t});var fPe=ee(Nt());var Jjt="list-entities <nameAndVersion>",Qjt=`${fPe.default.red("[BETA]")} List possible webhook entities for a subgraph`,Zjt=e=>e.positional("nameAndVersion",{describe:"Name and version of the subgraph, e.g. 'my-subgraph/1.0.0'",type:"string",demandOption:!0}),e3t=async({nameAndVersion:e})=>{let[t,r]=en(e);await uPe({name:t,version:r})};var t3t="webhook",r3t=`${hPe.default.red("[BETA]")} Commands related to webhooks`,n3t=e=>e.command(a7).command(c7).command(l7).command(u7).demandCommand(1),i3t=async()=>{};var p7={};ft(p7,{builder:()=>a3t,command:()=>s3t,describe:()=>o3t,handler:()=>c3t});var gPe=ee(Nt());var s3t="pause <nameAndVersion>",o3t=`${gPe.default.red("[BETA]")} Pause a subgraph`,a3t=e=>e.positional("nameAndVersion",{describe:"Name and version of the subgraph, e.g. 'my-subgraph/1.0.0'",type:"string",demandOption:!0}),c3t=async({nameAndVersion:e})=>{let t=Ue("Pausing").start(),[r,n]=en(e),[i,s]=await Ie.put(o=>`/api/admin/subgraph/v1/subgraph/${o.name}/${o.version_label}/pause`,{params:{name:r,version_label:n},body:{}});i?(t.fail(i.message),process.exit(1)):t.succeed("Paused your subgraph!")};var m7={};ft(m7,{builder:()=>d3t,command:()=>l3t,describe:()=>u3t,handler:()=>p3t});var yPe=ee(fU()),bPe=ee(Nt());var l3t="start <nameAndVersion>",u3t=`${bPe.default.red("[BETA]")} Start a subgraph`,d3t=e=>e.positional("nameAndVersion",{describe:"Name and version of the subgraph, e.g. 'my-subgraph/1.0.0'",type:"string",demandOption:!0}),p3t=async({nameAndVersion:e})=>{let t=(0,yPe.default)("Starting").start(),[r,n]=en(e),[i,s]=await Ie.put(o=>`/api/admin/subgraph/v1/subgraph/${o.name}/${o.version_label}/start`,{params:{name:r,version_label:n},body:{}});i?(t.fail(i.message),process.exit(1)):t.succeed("Started your subgraph!")};var m3t="subgraph",f3t="Commands related to subgraphs",h3t=e=>e.command(t7).command(r7).command(O5).command(s7).command(d7).command(o7).command(p7).command(m7).version(!1).demandCommand(1),g3t=async()=>{};var m2=ee(Nt());var Hw={name:"@goldskycom/cli",version:"2.10.0",description:"The Goldsky CLI to deploy subgraphs, index & transform blockchain data, configure webhooks, and access your data in real-time.",main:"dist/index.js",keywords:["goldsky","web3","blockchain","real-time","data pipelines","streams","webhooks"],author:"Goldsky",scripts:{lint:"eslint .","lint:summary":"pnpm lint --format summary || pnpm lint",typecheck:"tsc --noEmit",clean:"rimraf ./dist && rimraf tsconfig.tsbuildinfo",build:"pnpm clean && tsc --noEmit --skipLibCheck && node ./scripts/build.js && chmod a+x bin/goldsky","build:sdk":"npx pkg -t linux,macos,win . -o sdk/goldsky","dev:debug":"NODE_ENV=development ts-node src/index.ts",prepublishOnly:"pnpm build","test:unit":"pnpm build && tsc --skipLibCheck && node --test --test-reporter spec dist","docs:reference:generate":"ts-node ./scripts/reference-docs/index.ts"},bin:{goldsky:"bin/goldsky"},files:["bin/goldsky","dist"],devDependencies:{"@aws-sdk/abort-controller":"^3.272.0","@aws-sdk/client-s3":"^3.272.0","@clack/prompts":"^0.7.0","@goldskyio/core":"workspace:*","@sinclair/typebox":"^0.25.8","@types/cli-progress":"^3.11.0","@types/form-data":"^2.5.0","@types/jszip":"^3.4.1","@types/node":"^18.15.0","@types/readline-sync":"^1.4.4","@types/semver":"^7.5.1","@types/update-notifier":"^6.0.1","@types/yaml":"^1.9.7","@types/yargs":"^17.0.7",ajv:"^8.11.2",axios:"^1.4.0",chalk:"^4.1.2","cli-progress":"^3.12.0","form-data":"^4.0.0",jszip:"^3.7.1",ora:"4.1.1","s3-sync-client":"^4.3.1",semver:"^7.3.7",table:"^6.8.1",typescript:"^4.7.4",yaml:"^1.10.2",yargs:"^17.7.2"},license:"",dependencies:{cuid:"^2.1.8","parse-duration":"^1.0.3","readline-sync":"^1.4.10","update-notifier":"^6.0.2"}};var b3t=1e3*60*60*24*7,vPe=async()=>{(await Function('return import("update-notifier")')()).default({pkg:Hw,updateCheckInterval:b3t}).notify({message:`\u{1F389} A new version of the Goldsky CLI is available \u{1F389}
454
+ ${e.t?t({name:e.name,version_label:e.t}):"null"}`),i.data.subgraph.deployments.length&&console.log(`${Gu.default.bold("GraphQL API:")} ${e.apiHost}${i.data.subgraph.graphql_endpoint}`))}}var _jt="create <nameAndVersion>",Sjt="Create a new tag",wjt=e=>e.positional("nameAndVersion",{describe:"Name and version of the subgraph, e.g. 'my-subgraph/1.0.0'",type:"string",demandOption:!0}).option("tag",{alias:"t",describe:"The name of the tag",type:"string",demandOption:!0}),xjt=async({apiHost:e,nameAndVersion:t,tag:r})=>{await p2({apiHost:e,name:en(t)[0],remove:!1,v:r,t:en(t)[1]})};var i7={};ft(i7,{builder:()=>Djt,command:()=>Cjt,describe:()=>Ejt,handler:()=>Ajt});var Cjt="delete <nameAndVersion>",Ejt="Delete a tag",Djt=e=>e.positional("nameAndVersion",{describe:"Name and version of the subgraph, e.g. 'my-subgraph/1.0.0'",type:"string",demandOption:!0}).option("tag",{alias:"t",describe:"The name of the tag to delete",type:"string",demandOption:!0}),Ajt=async({apiHost:e,nameAndVersion:t,tag:r})=>{await p2({apiHost:e,name:en(t)[0],remove:!0,v:r})};var Pjt="tag",kjt="Commands related to tags",Ojt=e=>e.command(n7).command(i7).demandCommand(1),Rjt=async()=>{};var o7={};ft(o7,{builder:()=>Njt,command:()=>Fjt,describe:()=>Ijt,handler:()=>qjt});var fl=ee(Nt());var Tjt=/(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([\p{L}]*)/uig;Kt.nanosecond=Kt.ns=1/1e6;Kt.\u00B5s=Kt.\u03BCs=Kt.us=Kt.microsecond=1/1e3;Kt.millisecond=Kt.ms=Kt[""]=1;Kt.second=Kt.sec=Kt.s=Kt.ms*1e3;Kt.minute=Kt.min=Kt.m=Kt.s*60;Kt.hour=Kt.hr=Kt.h=Kt.m*60;Kt.day=Kt.d=Kt.h*24;Kt.week=Kt.wk=Kt.w=Kt.d*7;Kt.month=Kt.b=Kt.d*(365.25/12);Kt.year=Kt.yr=Kt.y=Kt.d*365.25;function Kt(e="",t="ms"){var r=null;return e=(e+"").replace(/(\d)[,_](\d)/g,"$1$2"),e.replace(Tjt,function(n,i,s){s=sPe(s),s&&(r=(r||0)+parseFloat(i,10)*s)}),r&&r/(sPe(t)||1)}function sPe(e){return Kt[e]||Kt[e.toLowerCase().replace(/s$/,"")]}var oPe=Kt;var Fjt="log <nameAndVersion>",Ijt=`${fl.default.red("[BETA]")} Tail a subgraph's logs`,Njt=e=>e.positional("nameAndVersion",{describe:"Name and version of the subgraph, e.g. 'my-subgraph/1.0.0'",type:"string",demandOption:!0}).option("since",{describe:"Return logs newer than a relative duration like 5s, 2m, or 3h",default:"1m",demandOption:!1}).option("format",{describe:"The format used to output logs, use text or json for easier parsed output, use pretty for more readable console output",choices:["pretty","json","text"],default:"text"}).option("filter",{describe:"The minimum log level to output",choices:Ex.SubgraphLogLevels,default:"info"}).option("interval",{describe:"The time in seconds to wait between checking for new logs",type:"number",default:5}).option("max-queries",{describe:"The maximum number of queries to make. Meant for testing.",type:"number",hidden:!0,demandOption:!1}),qjt=async({since:e,format:t,filter:r,interval:n,nameAndVersion:i,maxQueries:s})=>{let o=Ue("Validating since").start(),a=oPe(e);a||(o.fail(),console.log(fl.default.red(`Invalid value for parameter 'since': ${e}. Make sure the value you provide can be parsed by https://www.npmjs.com/package/parse-duration`)),process.exit(1)),o.stop();let c=Ue("Tailing logs").start(),l=new Date(Date.now()-a).getTime(),[u,d]=en(i),[m,f]=await Ie.get(b=>`/api/admin/subgraph/v1/subgraph_deployments/${b.name}/${b.version_label}/logs`,{params:{name:u,version_label:d},querystring:{after:l,log_level:r}}),y=1;if(m)c.fail(m.message),process.exit(1);else{c.stop();let b;for(;m?(console.log(m.message),process.exit(1)):(b=f.data.cursor,Ljt(t,f.data.results)),!(s&&y>=s);)[m,f]=await Ie.get(v=>`/api/admin/subgraph/v1/subgraph_deployments/${v.name}/${v.version_label}/logs`,{params:{name:u,version_label:d},querystring:{cursor:b,log_level:r}}),y++,await Bjt(Math.max(n,1)*1e3)}};function Bjt(e){return new Promise(t=>setTimeout(t,e))}function Ljt(e,t){t.map(r=>Gr(Qt({},r),{timestamp:new Date(r.timestamp).toLocaleString()})).forEach(r=>{switch(e){case"json":{console.log(r);break}case"pretty":{let n=`[${fl.default.dim(r.timestamp)}]`;n+=`[${(s=>{switch(s){case"error":return fl.default.red;case"warning":return fl.default.yellow;case"info":return fl.default.cyan;case"debug":return fl.default.dim;default:return fl.default.grey}})(r.level)(r.level)}] `,n+=r.text,console.log(n);break}default:{console.log(`[${r.timestamp}][${r.level}] ${r.text}`);break}}})}var d7={};ft(d7,{builder:()=>n3t,command:()=>t3t,describe:()=>r3t,handler:()=>i3t});var hPe=ee(Nt());var a7={};ft(a7,{builder:()=>zjt,command:()=>Mjt,describe:()=>jjt,handler:()=>$jt});var dPe=ee(Nt());var vs=ee(Nt());async function aPe(e){let t=Ue("Creating webhook").start(),[r,n]=await Ie.post(i=>`/api/admin/subgraph/v1/webhooks/${i.subgraphName}/${i.subgraphVersion}`,{params:{subgraphName:e.subgraphName,subgraphVersion:e.subgraphVersion},body:{name:e.name,webhookUrl:e.webhookUrl,entity:e.entity,numRetries:e.numRetries,retryIntervalSeconds:e.retryInterval,retryTimeoutSeconds:e.retryTimeout}});r?(t.fail(),console.log(),console.log(`${vs.default.bold("Webhook creation failed:")} ${vs.default.red(r.message)}`),process.exit(1)):(t.succeed(),console.log(),console.log(`Webhook '${vs.default.bold(n.data.name)}' with ID '${vs.default.bold(n.data.id)}' created.`),console.log(`Make sure calls to your endpoint have the following value for the 'goldsky-webhook-secret' header: ${vs.default.bold(`${n.data.webhookSecret}`)}`))}async function cPe(e){let t=Ue("Deleting webhook").start(),[r]=await Ie.delete_(n=>`/api/admin/subgraph/v1/webhooks/${n.name}`,{params:{name:e.name}});r?(t.fail(),console.log(),console.log(`${vs.default.bold("Webhook deletion failed:")} ${vs.default.red(r.message)}`),process.exit(1)):(t.succeed(),console.log(),console.log(`Webhook '${vs.default.bold(e.name)}' deleted.`))}async function lPe(){let e=Ue("Listing webhooks").start(),t="/api/admin/subgraph/v1/webhooks",[r,n]=await Ie.get(t);if(r)e.fail(),console.log(),console.log(`${vs.default.bold("Could not list webhooks:")} ${vs.default.red(r.message)}`),process.exit(1);else if(e.succeed(),console.log(),n.data.length>0){let i=[];n.data.map(s=>{i.push([s.subgraphName,s.subgraphVersion,s.name,s.id,s.entity,s.webhookUrl])}),Ah(["Subgraph Name","Subgraph Version","Webhook Name","Webhook ID","Entity","URL"],i)}else console.log(`No webhooks found. Create one with ${vs.default.bold("goldsky subgraph webhook create")}.`)}async function uPe({name:e,version:t}){let r=Ue("Listing entities").start(),n=`/api/admin/subgraph/v1/webhooks/entities/${e}/${t}`,[i,s]=await Ie.get(n);if(i)r.fail(),console.log(),console.log(`${vs.default.bold("Could not list entities:")} ${vs.default.red(i.message)}`),process.exit(1);else if(s.data.length===0)r.fail("No entities found. Please reach out to support@goldsky.com"),process.exit(1);else{r.succeed("Possible webhook entities:");for(let o of s.data)console.log(o.name)}}var Mjt="create <nameAndVersion>",jjt=`${dPe.default.red("[BETA]")} Create a webhook`,zjt=e=>e.positional("nameAndVersion",{describe:"Name and version of the subgraph, e.g. 'my-subgraph/1.0.0'",type:"string",demandOption:!0}).option("name",{describe:"Name of the webhook, must be unique",type:"string",demandOption:!0}).option("url",{describe:"URL to send events to",type:"string",demandOption:!0}).option("entity",{describe:"Subgraph entity to send events for",type:"string",demandOption:!0}).option("num-retries",{describe:"Number of times to retry sending an event",type:"number",default:10}).option("retry-interval",{describe:"Number of seconds to wait between retries",type:"number",default:60}).option("retry-timeout",{describe:"Number of seconds to wait for a response before retrying",type:"number",default:30}),$jt=async({entity:e,name:t,nameAndVersion:r,url:n,numRetries:i,retryInterval:s,retryTimeout:o})=>{await aPe({name:t,subgraphName:en(r)[0],subgraphVersion:en(r)[1],webhookUrl:n,entity:e,numRetries:i,retryInterval:s,retryTimeout:o})};var c7={};ft(c7,{builder:()=>Xjt,command:()=>Ujt,describe:()=>Gjt,handler:()=>Hjt});var pPe=ee(Nt());var Ujt="delete",Gjt=`${pPe.default.red("[BETA]")} Delete a webhook`,Xjt=e=>e.option("name",{describe:"Name of the webhook to delete",type:"string",demandOption:!0}),Hjt=async({name:e})=>{await cPe({name:e})};var l7={};ft(l7,{builder:()=>Kjt,command:()=>Vjt,describe:()=>Wjt,handler:()=>Yjt});var mPe=ee(Nt());var Vjt="list",Wjt=`${mPe.default.red("[BETA]")} List webhooks`,Kjt=e=>e,Yjt=async e=>{await lPe()};var u7={};ft(u7,{builder:()=>Zjt,command:()=>Jjt,describe:()=>Qjt,handler:()=>e3t});var fPe=ee(Nt());var Jjt="list-entities <nameAndVersion>",Qjt=`${fPe.default.red("[BETA]")} List possible webhook entities for a subgraph`,Zjt=e=>e.positional("nameAndVersion",{describe:"Name and version of the subgraph, e.g. 'my-subgraph/1.0.0'",type:"string",demandOption:!0}),e3t=async({nameAndVersion:e})=>{let[t,r]=en(e);await uPe({name:t,version:r})};var t3t="webhook",r3t=`${hPe.default.red("[BETA]")} Commands related to webhooks`,n3t=e=>e.command(a7).command(c7).command(l7).command(u7).demandCommand(1),i3t=async()=>{};var p7={};ft(p7,{builder:()=>a3t,command:()=>s3t,describe:()=>o3t,handler:()=>c3t});var gPe=ee(Nt());var s3t="pause <nameAndVersion>",o3t=`${gPe.default.red("[BETA]")} Pause a subgraph`,a3t=e=>e.positional("nameAndVersion",{describe:"Name and version of the subgraph, e.g. 'my-subgraph/1.0.0'",type:"string",demandOption:!0}),c3t=async({nameAndVersion:e})=>{let t=Ue("Pausing").start(),[r,n]=en(e),[i,s]=await Ie.put(o=>`/api/admin/subgraph/v1/subgraph/${o.name}/${o.version_label}/pause`,{params:{name:r,version_label:n},body:{}});i?(t.fail(i.message),process.exit(1)):t.succeed("Paused your subgraph!")};var m7={};ft(m7,{builder:()=>d3t,command:()=>l3t,describe:()=>u3t,handler:()=>p3t});var yPe=ee(fU()),bPe=ee(Nt());var l3t="start <nameAndVersion>",u3t=`${bPe.default.red("[BETA]")} Start a subgraph`,d3t=e=>e.positional("nameAndVersion",{describe:"Name and version of the subgraph, e.g. 'my-subgraph/1.0.0'",type:"string",demandOption:!0}),p3t=async({nameAndVersion:e})=>{let t=(0,yPe.default)("Starting").start(),[r,n]=en(e),[i,s]=await Ie.put(o=>`/api/admin/subgraph/v1/subgraph/${o.name}/${o.version_label}/start`,{params:{name:r,version_label:n},body:{}});i?(t.fail(i.message),process.exit(1)):t.succeed("Started your subgraph!")};var m3t="subgraph",f3t="Commands related to subgraphs",h3t=e=>e.command(t7).command(r7).command(O5).command(s7).command(d7).command(o7).command(p7).command(m7).version(!1).demandCommand(1),g3t=async()=>{};var m2=ee(Nt());var Hw={name:"@goldskycom/cli",version:"2.10.1",description:"The Goldsky CLI to deploy subgraphs, index & transform blockchain data, configure webhooks, and access your data in real-time.",main:"dist/index.js",keywords:["goldsky","web3","blockchain","real-time","data pipelines","streams","webhooks"],author:"Goldsky",scripts:{lint:"eslint .","lint:summary":"pnpm lint --format summary || pnpm lint",typecheck:"tsc --noEmit",clean:"rimraf ./dist && rimraf tsconfig.tsbuildinfo",build:"pnpm clean && tsc --noEmit --skipLibCheck && node ./scripts/build.js && chmod a+x bin/goldsky","build:sdk":"npx pkg -t linux,macos,win . -o sdk/goldsky","dev:debug":"NODE_ENV=development ts-node src/index.ts",prepublishOnly:"pnpm build","test:unit":"pnpm build && tsc --skipLibCheck && node --test --test-reporter spec dist","docs:reference:generate":"ts-node ./scripts/reference-docs/index.ts"},bin:{goldsky:"bin/goldsky"},files:["bin/goldsky","dist"],devDependencies:{"@aws-sdk/abort-controller":"^3.272.0","@aws-sdk/client-s3":"^3.272.0","@clack/prompts":"^0.7.0","@goldskyio/core":"workspace:*","@sinclair/typebox":"^0.25.8","@types/cli-progress":"^3.11.0","@types/form-data":"^2.5.0","@types/jszip":"^3.4.1","@types/node":"^18.15.0","@types/readline-sync":"^1.4.4","@types/semver":"^7.5.1","@types/update-notifier":"^6.0.1","@types/yaml":"^1.9.7","@types/yargs":"^17.0.7",ajv:"^8.11.2",axios:"^1.4.0",chalk:"^4.1.2","cli-progress":"^3.12.0","form-data":"^4.0.0",jszip:"^3.7.1",ora:"4.1.1","s3-sync-client":"^4.3.1",semver:"^7.3.7",table:"^6.8.1",typescript:"^4.7.4",yaml:"^1.10.2",yargs:"^17.7.2"},license:"",dependencies:{cuid:"^2.1.8","parse-duration":"^1.0.3","readline-sync":"^1.4.10","update-notifier":"^6.0.2"}};var b3t=1e3*60*60*24*7,vPe=async()=>{(await Function('return import("update-notifier")')()).default({pkg:Hw,updateCheckInterval:b3t}).notify({message:`\u{1F389} A new version of the Goldsky CLI is available \u{1F389}
455
455
 
456
456
  Run {updateCommand} to update (${m2.default.dim("{currentVersion}")}${m2.default.reset(" \u2192 ")}${m2.default.green("{latestVersion}")})`})};var v3t=e=>["subgraph list","subgraph tag delete"].includes(e),_3t=L2(process.argv);vPe().then(uye).then(()=>{uH(_3t).scriptName("goldsky").usage("$0 <cmd> args").check(e=>{if(e.nameAndVersion&&!v3t(e._.join(" "))&&!e.nameAndVersion.match(/^.*\/.*$/))throw new Error(`The provided <nameAndValue> "${e.nameAndVersion}" does not match the "name/version" pattern, such as "my-subgraph/1.0.0".`);return!0}).option("apiHost",{alias:"api-host",describe:"Goldsky API host path",type:"string",default:gK,hidden:!0}).option("token",{describe:"CLI Auth Token",type:"string",default:""}).option("color",{describe:"Colorize output",type:"boolean",default:!0}).command(XU).command(HU).command(f7).command(S5).command(Z6).command(UU).command(P5).version(Hw.version).alias("v","version").alias("h","help").strict().demandCommand(1).middleware([({color:e})=>{e||(_Pe.default.level=0)},e=>{Ie.setApiHost(e.apiHost),Ie.setApiClientAndVersion("cli",Hw.version),e.token&&vS(e.token)}]).showHelpOnFail(!0).argv});
457
457
  /*!