@goldskycom/cli 9.8.1 → 9.8.2

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
@@ -418,12 +418,12 @@ ${C.join(`
418
418
  `,"f"),ju(this,Kg,G(this,Kg,"f")+t.join(" "),"f")}}}[RX](t){eD(G(this,ld,"f")).forEach(r=>{if((i=>i==="configObjects")(r))return;let n=G(this,ld,"f")[r];Array.isArray(n)?n.includes(t)&&n.splice(n.indexOf(t),1):typeof n=="object"&&delete n[t]}),delete G(this,Jp,"f").getDescriptions()[t]}[kde](t,r,n){G(this,zq,"f")[n]||(G(this,Xd,"f").process.emitWarning(t,r),G(this,zq,"f")[n]=!0)}[Pde](){G(this,Gq,"f").push({options:G(this,ld,"f"),configObjects:G(this,ld,"f").configObjects.slice(0),exitProcess:G(this,S0,"f"),groups:G(this,MS,"f"),strict:G(this,mx,"f"),strictCommands:G(this,fx,"f"),strictOptions:G(this,hx,"f"),completionCommand:G(this,jb,"f"),output:G(this,Kg,"f"),exitError:G(this,yw,"f"),hasOutput:G(this,Mb,"f"),parsed:this.parsed,parseFn:G(this,$b,"f"),parseContext:G(this,dx,"f")}),G(this,Jp,"f").freeze(),G(this,cg,"f").freeze(),G(this,hg,"f").freeze(),G(this,v0,"f").freeze()}[Ide](){let t="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(G(this,Xd,"f").process.argv()[0])?r=G(this,Xd,"f").process.argv().slice(1,2):r=G(this,Xd,"f").process.argv().slice(0,1),t=r.map(n=>{let i=this[zde](G(this,lx,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&i.length<n.length?i:n}).join(" ").trim(),G(this,Xd,"f").getEnv("_")&&G(this,Xd,"f").getProcessArgvBin()===G(this,Xd,"f").getEnv("_")&&(t=G(this,Xd,"f").getEnv("_").replace(`${G(this,Xd,"f").path.dirname(G(this,Xd,"f").process.execPath())}/`,"")),t}[gx](){return G(this,Wq,"f")}[Rde](){return G(this,Kq,"f")}[OX](){if(!G(this,ux,"f"))return;let t=G(this,Xd,"f").getEnv("LC_ALL")||G(this,Xd,"f").getEnv("LC_MESSAGES")||G(this,Xd,"f").getEnv("LANG")||G(this,Xd,"f").getEnv("LANGUAGE")||"en_US";this.locale(t.replace(/[.:].*/,""))}[Ode](){return this[FX]().version||"unknown"}[Fde](t){let r=t["--"]?t["--"]:t._;for(let n=0,i;(i=r[n])!==void 0;n++)G(this,Xd,"f").Parser.looksLikeNumber(i)&&Number.isSafeInteger(Math.floor(parseFloat(`${i}`)))&&(r[n]=Number(i));return t}[FX](t){let r=t||"*";if(G(this,nD,"f")[r])return G(this,nD,"f")[r];let n={};try{let i=t||G(this,Xd,"f").mainFilename;!t&&G(this,Xd,"f").path.extname(i)&&(i=G(this,Xd,"f").path.dirname(i));let s=G(this,Xd,"f").findUp(i,(o,a)=>{if(a.includes("package.json"))return"package.json"});Vy(s,void 0,G(this,Xd,"f")),n=JSON.parse(G(this,Xd,"f").readFileSync(s,"utf8"))}catch{}return G(this,nD,"f")[r]=n||{},G(this,nD,"f")[r]}[Sw](t,r){r=[].concat(r),r.forEach(n=>{n=this[qX](n),G(this,ld,"f")[t].push(n)})}[iD](t,r,n,i){this[NX](t,r,n,i,(s,o,a)=>{G(this,ld,"f")[s][o]=a})}[TX](t,r,n,i){this[NX](t,r,n,i,(s,o,a)=>{G(this,ld,"f")[s][o]=(G(this,ld,"f")[s][o]||[]).concat(a)})}[NX](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 eD(n))t(o,n[o]);else s(r,this[qX](n),i)}[qX](t){return t==="__proto__"?"___proto___":t}[BX](t,r){return this[iD](this[BX].bind(this),"key",t,r),this}[LX](){var t,r,n,i,s,o,a,c,l,u,m,f;let y=G(this,Gq,"f").pop();Vy(y,void 0,G(this,Xd,"f"));let C;t=this,r=this,n=this,i=this,s=this,o=this,a=this,c=this,l=this,u=this,m=this,f=this,{options:{set value(x){ju(t,ld,x,"f")}}.value,configObjects:C,exitProcess:{set value(x){ju(r,S0,x,"f")}}.value,groups:{set value(x){ju(n,MS,x,"f")}}.value,output:{set value(x){ju(i,Kg,x,"f")}}.value,exitError:{set value(x){ju(s,yw,x,"f")}}.value,hasOutput:{set value(x){ju(o,Mb,x,"f")}}.value,parsed:this.parsed,strict:{set value(x){ju(a,mx,x,"f")}}.value,strictCommands:{set value(x){ju(c,fx,x,"f")}}.value,strictOptions:{set value(x){ju(l,hx,x,"f")}}.value,completionCommand:{set value(x){ju(u,jb,x,"f")}}.value,parseFn:{set value(x){ju(m,$b,x,"f")}}.value,parseContext:{set value(x){ju(f,dx,x,"f")}}.value}=y,G(this,ld,"f").configObjects=C,G(this,Jp,"f").unfreeze(),G(this,cg,"f").unfreeze(),G(this,hg,"f").unfreeze(),G(this,v0,"f").unfreeze()}[Tde](t,r){return cx(r,n=>(t(n),n))}getInternalMethods(){return{getCommandInstance:this[Nde].bind(this),getContext:this[qde].bind(this),getHasOutput:this[Bde].bind(this),getLoggerInstance:this[Lde].bind(this),getParseContext:this[jde].bind(this),getParserConfiguration:this[gx].bind(this),getUsageConfiguration:this[Rde].bind(this),getUsageInstance:this[Mde].bind(this),getValidationInstance:this[$de].bind(this),hasParseCallback:this[Zq].bind(this),isGlobalContext:this[Ude].bind(this),postProcess:this[yx].bind(this),reset:this[jX].bind(this),runValidation:this[MX].bind(this),runYargsParserAndExecuteCommands:this[LI].bind(this),setHasOutput:this[Gde].bind(this)}}[Nde](){return G(this,hg,"f")}[qde](){return G(this,BI,"f")}[Bde](){return G(this,Mb,"f")}[Lde](){return G(this,rD,"f")}[jde](){return G(this,dx,"f")||{}}[Mde](){return G(this,Jp,"f")}[$de](){return G(this,cg,"f")}[Zq](){return!!G(this,$b,"f")}[Ude](){return G(this,Vq,"f")}[yx](t,r,n,i){return n||Th(t)||(r||(t=this[Ade](t)),(this[gx]()["parse-positional-numbers"]||this[gx]()["parse-positional-numbers"]===void 0)&&(t=this[Fde](t)),i&&(t=ax(t,this,G(this,v0,"f").getMiddleware(),!1))),t}[jX](t={}){ju(this,ld,G(this,ld,"f")||{},"f");let r={};r.local=G(this,ld,"f").local||[],r.configObjects=G(this,ld,"f").configObjects||[];let n={};r.local.forEach(o=>{n[o]=!0,(t[o]||[]).forEach(a=>{n[a]=!0})}),Object.assign(G(this,px,"f"),Object.keys(G(this,MS,"f")).reduce((o,a)=>{let c=G(this,MS,"f")[a].filter(l=>!(l in n));return c.length>0&&(o[a]=c),o},{})),ju(this,MS,{},"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]=(G(this,ld,"f")[o]||[]).filter(a=>!n[a])}),s.forEach(o=>{r[o]=hw(G(this,ld,"f")[o],a=>!n[a])}),r.envPrefix=G(this,ld,"f").envPrefix,ju(this,ld,r,"f"),ju(this,Jp,G(this,Jp,"f")?G(this,Jp,"f").reset(n):bde(this,G(this,Xd,"f")),"f"),ju(this,cg,G(this,cg,"f")?G(this,cg,"f").reset(n):xde(this,G(this,Jp,"f"),G(this,Xd,"f")),"f"),ju(this,hg,G(this,hg,"f")?G(this,hg,"f").reset():hde(G(this,Jp,"f"),G(this,cg,"f"),G(this,v0,"f"),G(this,Xd,"f")),"f"),G(this,b0,"f")||ju(this,b0,_de(this,G(this,Jp,"f"),G(this,hg,"f"),G(this,Xd,"f")),"f"),G(this,v0,"f").reset(),ju(this,jb,null,"f"),ju(this,Kg,"","f"),ju(this,yw,null,"f"),ju(this,Mb,!1,"f"),this.parsed=!1,this}[zde](t,r){return G(this,Xd,"f").path.relative(t,r)}[LI](t,r,n,i=0,s=!1){let o=!!n||s;t=t||G(this,bw,"f"),G(this,ld,"f").__=G(this,Xd,"f").y18n.__,G(this,ld,"f").configuration=this[gx]();let a=!!G(this,ld,"f").configuration["populate--"],c=Object.assign({},G(this,ld,"f").configuration,{"populate--":!0}),l=G(this,Xd,"f").Parser.detailed(t,Object.assign({},G(this,ld,"f"),{configuration:{"parse-positional-numbers":!1,...c}})),u=Object.assign(l.argv,G(this,dx,"f")),m,f=l.aliases,y=!1,C=!1;Object.keys(u).forEach(x=>{x===G(this,_0,"f")&&u[x]?y=!0:x===G(this,$S,"f")&&u[x]&&(C=!0)}),u.$0=this.$0,this.parsed=l,i===0&&G(this,Jp,"f").clearCachedHelpMessage();try{if(this[OX](),r)return this[yx](u,a,!!n,!1);G(this,_0,"f")&&[G(this,_0,"f")].concat(f[G(this,_0,"f")]||[]).filter(M=>M.length>1).includes(""+u._[u._.length-1])&&(u._.pop(),y=!0),ju(this,Vq,!1,"f");let x=G(this,hg,"f").getCommands(),I=G(this,b0,"f").completionKey in u,F=y||I||s;if(u._.length){if(x.length){let T;for(let M=i||0,Y;u._[M]!==void 0;M++)if(Y=String(u._[M]),x.includes(Y)&&Y!==G(this,jb,"f")){let de=G(this,hg,"f").runCommand(Y,this,l,M+1,s,y||C||s);return this[yx](de,a,!!n,!1)}else if(!T&&Y!==G(this,jb,"f")){T=Y;break}!G(this,hg,"f").hasDefaultCommand()&&G(this,Hq,"f")&&T&&!F&&G(this,cg,"f").recommendCommands(T,x)}G(this,jb,"f")&&u._.includes(G(this,jb,"f"))&&!I&&(G(this,S0,"f")&&gw(!0),this.showCompletionScript(),this.exit(0))}if(G(this,hg,"f").hasDefaultCommand()&&!F){let T=G(this,hg,"f").runCommand(null,this,l,0,s,y||C||s);return this[yx](T,a,!!n,!1)}if(I){G(this,S0,"f")&&gw(!0),t=[].concat(t);let T=t.slice(t.indexOf(`--${G(this,b0,"f").completionKey}`)+1);return G(this,b0,"f").getCompletion(T,(M,Y)=>{if(M)throw new yh(M.message);(Y||[]).forEach(de=>{G(this,rD,"f").log(de)}),this.exit(0)}),this[yx](u,!a,!!n,!1)}if(G(this,Mb,"f")||(y?(G(this,S0,"f")&&gw(!0),o=!0,this.showHelp("log"),this.exit(0)):C&&(G(this,S0,"f")&&gw(!0),o=!0,G(this,Jp,"f").showVersion("log"),this.exit(0))),!o&&G(this,ld,"f").skipValidation.length>0&&(o=Object.keys(u).some(T=>G(this,ld,"f").skipValidation.indexOf(T)>=0&&u[T]===!0)),!o){if(l.error)throw new yh(l.error.message);if(!I){let T=this[MX](f,{},l.error);n||(m=ax(u,this,G(this,v0,"f").getMiddleware(),!0)),m=this[Tde](T,m??u),Th(m)&&!n&&(m=m.then(()=>ax(u,this,G(this,v0,"f").getMiddleware(),!1)))}}}catch(x){if(x instanceof yh)G(this,Jp,"f").fail(x.message,x);else throw x}return this[yx](m??u,a,!!n,!0)}[MX](t,r,n,i){let s={...this.getDemandedOptions()};return o=>{if(n)throw new yh(n.message);G(this,cg,"f").nonOptionCount(o),G(this,cg,"f").requiredArguments(o,s);let a=!1;G(this,fx,"f")&&(a=G(this,cg,"f").unknownCommands(o)),G(this,mx,"f")&&!a?G(this,cg,"f").unknownArguments(o,t,r,!!i):G(this,hx,"f")&&G(this,cg,"f").unknownArguments(o,t,{},!1,!1),G(this,cg,"f").limitedChoices(o),G(this,cg,"f").implications(o),G(this,cg,"f").conflicting(o)}}[Gde](){ju(this,Mb,!0,"f")}[bx](t){if(typeof t=="string")G(this,ld,"f").key[t]=!0;else for(let r of t)G(this,ld,"f").key[r]=!0}};function gde(e){return!!e&&typeof e.getInternalMethods=="function"}var B4e=Vde(xX),Xde=B4e;var Vhr=process.env.SENDGRID_API_KEY,Xhr=process.env.COMMUNITY_PROJECT_ID||"",Whr=process.env.CLICKHOUSE_URL||"http://127.0.0.1:8123",Hhr=process.env.CLICKHOUSE_USER,Khr=process.env.CLICKHOUSE_PASSWORD,Zhr=process.env.CLICKHOUSE_DATABASE||"default",Yhr=process.env.CLICKHOUSE_SUBGRAPH_ENTITIES_WRITTEN_TABLE||"subgraph_entities_written",Jhr=process.env.CLICKHOUSE_SUBGRAPH_REQUESTS_TABLE||"subgraph_requests",Qhr=process.env.CLICKHOUSE_SUBGRAPH_LATENCY_TABLE||"subgraph_latency",egr=process.env.CLICKHOUSE_STREAM_ENTITIES_WRITTEN_TABLE||"stream_entities_written",tgr=process.env.CLICKHOUSE_SUBGRAPH_ENTITY_COUNTS_TABLE||"subgraph_entity_counts",rgr=process.env.CLICKHOUSE_STREAM_STATUS_TABLE||"stream_status",ngr=process.env.CLICKHOUSE_STREAM_ERRORS_TABLE||"stream_errors",igr=process.env.CLICKHOUSE_PIPELINE_LOGS_TABLE||"pipeline_logs",sgr=process.env.GDB_CLICKHOUSE_URL||"http://127.0.0.1:8123",ogr=process.env.GDB_CLICKHOUSE_USER,agr=process.env.GDB_CLICKHOUSE_PASSWORD,cgr=process.env.GDB_DOPPLER_ENV||"gdb",lgr=process.env.GDB_CLICKHOUSE_SHARED_DATABASE||"community",ugr=process.env.STRIPE_PUBLISHABLE_KEY||"",dgr=process.env.STRIPE_SECRET_KEY||"",pgr=process.env.STRIPE_WEBHOOK_SECRET||"",mgr=process.env.STRIPE_SCALE_PRODUCT_ID||"",fgr=process.env.STRIPE_GOLDSKY_EMPLOYEE_COUPON||"",jI=!0,Yq=!1,hgr=process.env.STRIPE_FREE_TRIAL_PRODUCT_ID||"",ggr=Number(process.env.FREE_TRIAL_BILLING_THRESHOLD_CENTS||50),ygr=process.env.HUBSPOT_BCC_EMAIL||"",bgr=process.env.API_URL||"",Sgr=process.env.WORKOS_CLIENT_ID||"",vgr=process.env.WORKFLOW_DATABASE_URL||"postgresql://graph-node:let-me-in@127.0.0.1:5432/goldsky?schema=workflows";var ww={};eu(ww,{AbiDeploySchema:()=>f7e,CreateOneClickDeploymentMessageSchema:()=>u7e,CreateTagMessageSchema:()=>ZHe,DeployMessageSchema:()=>GHe,GenerateMessageSchema:()=>XHe,GetAllSubgraphsMessageSchema:()=>a7e,GetOneClickDeploymentsMessageSchema:()=>c7e,GetSubgraphLogsMessageSchema:()=>o7e,GetSubgraphMessageSchema:()=>n7e,GetSubgraphVersionsMessageSchema:()=>t7e,PauseStartDeploymentBody:()=>Fme,PauseStartDeploymentSchema:()=>d7e,RemoveMessageSchema:()=>YHe,ShowGeneratedMessageSchema:()=>HHe,SubgraphLogLevels:()=>Ome,UpdateSubgraphDeploymentBody:()=>Tme,UpdateSubgraphDeploymentSchema:()=>h7e});var fb={};eu(fb,{IsArray:()=>mb,IsAsyncIterator:()=>UX,IsBigInt:()=>MI,IsBoolean:()=>vw,IsDate:()=>$I,IsFunction:()=>zX,IsIterator:()=>GX,IsNull:()=>VX,IsNumber:()=>oS,IsObject:()=>Dh,IsRegExp:()=>XX,IsString:()=>kh,IsSymbol:()=>WX,IsUint8Array:()=>Sx,IsUndefined:()=>tg});function UX(e){return Dh(e)&&!mb(e)&&!Sx(e)&&Symbol.asyncIterator in e}function mb(e){return Array.isArray(e)}function MI(e){return typeof e=="bigint"}function vw(e){return typeof e=="boolean"}function $I(e){return e instanceof globalThis.Date}function zX(e){return typeof e=="function"}function GX(e){return Dh(e)&&!mb(e)&&!Sx(e)&&Symbol.iterator in e}function VX(e){return e===null}function oS(e){return typeof e=="number"}function Dh(e){return typeof e=="object"&&e!==null}function XX(e){return e instanceof globalThis.RegExp}function kh(e){return typeof e=="string"}function WX(e){return typeof e=="symbol"}function Sx(e){return e instanceof globalThis.Uint8Array}function tg(e){return e===void 0}function L4e(e){return e.map(t=>Jq(t))}function j4e(e){return new Date(e.getTime())}function M4e(e){return new Uint8Array(e)}function $4e(e){return new RegExp(e.source,e.flags)}function U4e(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=Jq(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=Jq(e[r]);return t}function Jq(e){return mb(e)?L4e(e):$I(e)?j4e(e):Sx(e)?M4e(e):XX(e)?$4e(e):Dh(e)?U4e(e):e}function Wde(e){return Jq(e)}function lg(e){return e.map(t=>nu(t))}function nu(e,t={}){return{...Wde(e),...t}}var wf=class extends Error{constructor(t){super(t)}};var gg=Symbol.for("TypeBox.Transform"),Qv=Symbol.for("TypeBox.Readonly"),Xy=Symbol.for("TypeBox.Optional"),w0=Symbol.for("TypeBox.Hint"),Tn=Symbol.for("TypeBox.Kind");function Hde(e){return Dh(e)&&e[Qv]==="Readonly"}function US(e){return Dh(e)&&e[Xy]==="Optional"}function z4e(e){return xf(e,"Any")}function e_(e){return xf(e,"Array")}function UI(e){return xf(e,"AsyncIterator")}function HX(e){return xf(e,"BigInt")}function KX(e){return xf(e,"Boolean")}function zI(e){return xf(e,"Constructor")}function G4e(e){return xf(e,"Date")}function GI(e){return xf(e,"Function")}function vx(e){return xf(e,"Integer")}function yg(e){return xf(e,"Intersect")}function VI(e){return xf(e,"Iterator")}function xf(e,t){return Dh(e)&&Tn in e&&e[Tn]===t}function t_(e){return xf(e,"Literal")}function Ub(e){return xf(e,"MappedKey")}function Nh(e){return xf(e,"MappedResult")}function sD(e){return xf(e,"Never")}function V4e(e){return xf(e,"Not")}function X4e(e){return xf(e,"Null")}function _x(e){return xf(e,"Number")}function Ug(e){return xf(e,"Object")}function wx(e){return xf(e,"Promise")}function ZX(e){return xf(e,"Record")}function YX(e){return xf(e,"Ref")}function JX(e){return xf(e,"RegExp")}function XI(e){return xf(e,"String")}function W4e(e){return xf(e,"Symbol")}function zb(e){return xf(e,"TemplateLiteral")}function H4e(e){return xf(e,"This")}function oD(e){return Dh(e)&&gg in e}function aS(e){return xf(e,"Tuple")}function K4e(e){return xf(e,"Undefined")}function Rf(e){return xf(e,"Union")}function Z4e(e){return xf(e,"Uint8Array")}function Y4e(e){return xf(e,"Unknown")}function J4e(e){return xf(e,"Unsafe")}function Q4e(e){return xf(e,"Void")}function e9e(e){return Dh(e)&&Tn in e&&kh(e[Tn])}function Gb(e){return z4e(e)||e_(e)||KX(e)||HX(e)||UI(e)||zI(e)||G4e(e)||GI(e)||vx(e)||yg(e)||VI(e)||t_(e)||Ub(e)||Nh(e)||sD(e)||V4e(e)||X4e(e)||_x(e)||Ug(e)||wx(e)||ZX(e)||YX(e)||JX(e)||XI(e)||W4e(e)||zb(e)||H4e(e)||aS(e)||K4e(e)||Rf(e)||Z4e(e)||Y4e(e)||J4e(e)||Q4e(e)||e9e(e)}var tt={};eu(tt,{IsAny:()=>Jde,IsArray:()=>Qde,IsAsyncIterator:()=>epe,IsBigInt:()=>tpe,IsBoolean:()=>rpe,IsConstructor:()=>npe,IsDate:()=>ipe,IsFunction:()=>spe,IsInteger:()=>ope,IsIntersect:()=>ape,IsIterator:()=>cpe,IsKind:()=>Fpe,IsKindOf:()=>hf,IsLiteral:()=>HI,IsLiteralBoolean:()=>a9e,IsLiteralNumber:()=>upe,IsLiteralString:()=>lpe,IsLiteralValue:()=>dpe,IsMappedKey:()=>ppe,IsMappedResult:()=>mpe,IsNever:()=>fpe,IsNot:()=>hpe,IsNull:()=>gpe,IsNumber:()=>ype,IsObject:()=>bpe,IsOptional:()=>o9e,IsPromise:()=>Spe,IsProperties:()=>rW,IsReadonly:()=>s9e,IsRecord:()=>vpe,IsRecursive:()=>c9e,IsRef:()=>_pe,IsRegExp:()=>wpe,IsSchema:()=>ff,IsString:()=>Cpe,IsSymbol:()=>xpe,IsTemplateLiteral:()=>Epe,IsThis:()=>Ape,IsTransform:()=>Ph,IsTuple:()=>Dpe,IsUint8Array:()=>Ppe,IsUndefined:()=>kpe,IsUnion:()=>nW,IsUnionLiteral:()=>l9e,IsUnknown:()=>Ipe,IsUnsafe:()=>Rpe,IsVoid:()=>Ope,TypeGuardUnknownTypeError:()=>QX});var QX=class extends wf{},r9e=["Any","Array","AsyncIterator","BigInt","Boolean","Constructor","Date","Enum","Function","Integer","Intersect","Iterator","Literal","MappedKey","MappedResult","Not","Null","Number","Object","Promise","Record","Ref","RegExp","String","Symbol","TemplateLiteral","This","Tuple","Undefined","Union","Uint8Array","Unknown","Void"];function Kde(e){try{return new RegExp(e),!0}catch{return!1}}function eW(e){if(!kh(e))return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>=7&&r<=13||r===27||r===127)return!1}return!0}function Zde(e){return tW(e)||ff(e)}function WI(e){return tg(e)||MI(e)}function bh(e){return tg(e)||oS(e)}function tW(e){return tg(e)||vw(e)}function rh(e){return tg(e)||kh(e)}function n9e(e){return tg(e)||kh(e)&&eW(e)&&Kde(e)}function i9e(e){return tg(e)||kh(e)&&eW(e)}function Yde(e){return tg(e)||ff(e)}function s9e(e){return Dh(e)&&e[Qv]==="Readonly"}function o9e(e){return Dh(e)&&e[Xy]==="Optional"}function Jde(e){return hf(e,"Any")&&rh(e.$id)}function Qde(e){return hf(e,"Array")&&e.type==="array"&&rh(e.$id)&&ff(e.items)&&bh(e.minItems)&&bh(e.maxItems)&&tW(e.uniqueItems)&&Yde(e.contains)&&bh(e.minContains)&&bh(e.maxContains)}function epe(e){return hf(e,"AsyncIterator")&&e.type==="AsyncIterator"&&rh(e.$id)&&ff(e.items)}function tpe(e){return hf(e,"BigInt")&&e.type==="bigint"&&rh(e.$id)&&WI(e.exclusiveMaximum)&&WI(e.exclusiveMinimum)&&WI(e.maximum)&&WI(e.minimum)&&WI(e.multipleOf)}function rpe(e){return hf(e,"Boolean")&&e.type==="boolean"&&rh(e.$id)}function npe(e){return hf(e,"Constructor")&&e.type==="Constructor"&&rh(e.$id)&&mb(e.parameters)&&e.parameters.every(t=>ff(t))&&ff(e.returns)}function ipe(e){return hf(e,"Date")&&e.type==="Date"&&rh(e.$id)&&bh(e.exclusiveMaximumTimestamp)&&bh(e.exclusiveMinimumTimestamp)&&bh(e.maximumTimestamp)&&bh(e.minimumTimestamp)&&bh(e.multipleOfTimestamp)}function spe(e){return hf(e,"Function")&&e.type==="Function"&&rh(e.$id)&&mb(e.parameters)&&e.parameters.every(t=>ff(t))&&ff(e.returns)}function ope(e){return hf(e,"Integer")&&e.type==="integer"&&rh(e.$id)&&bh(e.exclusiveMaximum)&&bh(e.exclusiveMinimum)&&bh(e.maximum)&&bh(e.minimum)&&bh(e.multipleOf)}function rW(e){return Dh(e)&&Object.entries(e).every(([t,r])=>eW(t)&&ff(r))}function ape(e){return hf(e,"Intersect")&&!(kh(e.type)&&e.type!=="object")&&mb(e.allOf)&&e.allOf.every(t=>ff(t)&&!Ph(t))&&rh(e.type)&&(tW(e.unevaluatedProperties)||Yde(e.unevaluatedProperties))&&rh(e.$id)}function cpe(e){return hf(e,"Iterator")&&e.type==="Iterator"&&rh(e.$id)&&ff(e.items)}function hf(e,t){return Dh(e)&&Tn in e&&e[Tn]===t}function lpe(e){return HI(e)&&kh(e.const)}function upe(e){return HI(e)&&oS(e.const)}function a9e(e){return HI(e)&&vw(e.const)}function HI(e){return hf(e,"Literal")&&rh(e.$id)&&dpe(e.const)}function dpe(e){return vw(e)||oS(e)||kh(e)}function ppe(e){return hf(e,"MappedKey")&&mb(e.keys)&&e.keys.every(t=>oS(t)||kh(t))}function mpe(e){return hf(e,"MappedResult")&&rW(e.properties)}function fpe(e){return hf(e,"Never")&&Dh(e.not)&&Object.getOwnPropertyNames(e.not).length===0}function hpe(e){return hf(e,"Not")&&ff(e.not)}function gpe(e){return hf(e,"Null")&&e.type==="null"&&rh(e.$id)}function ype(e){return hf(e,"Number")&&e.type==="number"&&rh(e.$id)&&bh(e.exclusiveMaximum)&&bh(e.exclusiveMinimum)&&bh(e.maximum)&&bh(e.minimum)&&bh(e.multipleOf)}function bpe(e){return hf(e,"Object")&&e.type==="object"&&rh(e.$id)&&rW(e.properties)&&Zde(e.additionalProperties)&&bh(e.minProperties)&&bh(e.maxProperties)}function Spe(e){return hf(e,"Promise")&&e.type==="Promise"&&rh(e.$id)&&ff(e.item)}function vpe(e){return hf(e,"Record")&&e.type==="object"&&rh(e.$id)&&Zde(e.additionalProperties)&&Dh(e.patternProperties)&&(t=>{let r=Object.getOwnPropertyNames(t.patternProperties);return r.length===1&&Kde(r[0])&&Dh(t.patternProperties)&&ff(t.patternProperties[r[0]])})(e)}function c9e(e){return Dh(e)&&w0 in e&&e[w0]==="Recursive"}function _pe(e){return hf(e,"Ref")&&rh(e.$id)&&kh(e.$ref)}function wpe(e){return hf(e,"RegExp")&&rh(e.$id)&&kh(e.source)&&kh(e.flags)&&bh(e.maxLength)&&bh(e.minLength)}function Cpe(e){return hf(e,"String")&&e.type==="string"&&rh(e.$id)&&bh(e.minLength)&&bh(e.maxLength)&&n9e(e.pattern)&&i9e(e.format)}function xpe(e){return hf(e,"Symbol")&&e.type==="symbol"&&rh(e.$id)}function Epe(e){return hf(e,"TemplateLiteral")&&e.type==="string"&&kh(e.pattern)&&e.pattern[0]==="^"&&e.pattern[e.pattern.length-1]==="$"}function Ape(e){return hf(e,"This")&&rh(e.$id)&&kh(e.$ref)}function Ph(e){return Dh(e)&&gg in e}function Dpe(e){return hf(e,"Tuple")&&e.type==="array"&&rh(e.$id)&&oS(e.minItems)&&oS(e.maxItems)&&e.minItems===e.maxItems&&(tg(e.items)&&tg(e.additionalItems)&&e.minItems===0||mb(e.items)&&e.items.every(t=>ff(t)))}function kpe(e){return hf(e,"Undefined")&&e.type==="undefined"&&rh(e.$id)}function l9e(e){return nW(e)&&e.anyOf.every(t=>lpe(t)||upe(t))}function nW(e){return hf(e,"Union")&&rh(e.$id)&&Dh(e)&&mb(e.anyOf)&&e.anyOf.every(t=>ff(t))}function Ppe(e){return hf(e,"Uint8Array")&&e.type==="Uint8Array"&&rh(e.$id)&&bh(e.minByteLength)&&bh(e.maxByteLength)}function Ipe(e){return hf(e,"Unknown")&&rh(e.$id)}function Rpe(e){return hf(e,"Unsafe")}function Ope(e){return hf(e,"Void")&&e.type==="void"&&rh(e.$id)}function Fpe(e){return Dh(e)&&Tn in e&&kh(e[Tn])&&!r9e.includes(e[Tn])}function ff(e){return Dh(e)&&(Jde(e)||Qde(e)||rpe(e)||tpe(e)||epe(e)||npe(e)||ipe(e)||spe(e)||ope(e)||ape(e)||cpe(e)||HI(e)||ppe(e)||mpe(e)||fpe(e)||hpe(e)||gpe(e)||ype(e)||bpe(e)||Spe(e)||vpe(e)||_pe(e)||wpe(e)||Cpe(e)||xpe(e)||Epe(e)||Ape(e)||Dpe(e)||kpe(e)||nW(e)||Ppe(e)||Ipe(e)||Rpe(e)||Ope(e)||Fpe(e))}var iW="(true|false)",KI="(0|[1-9][0-9]*)",sW="(.*)",$gr=`^${iW}$`,Cx=`^${KI}$`,aD=`^${sW}$`;var hb={};eu(hb,{Clear:()=>d9e,Delete:()=>p9e,Entries:()=>u9e,Get:()=>h9e,Has:()=>m9e,Set:()=>f9e});var cD=new Map;function u9e(){return new Map(cD)}function d9e(){return cD.clear()}function p9e(e){return cD.delete(e)}function m9e(e){return cD.has(e)}function f9e(e,t){cD.set(e,t)}function h9e(e){return cD.get(e)}var Dy={};eu(Dy,{Clear:()=>y9e,Delete:()=>b9e,Entries:()=>g9e,Get:()=>_9e,Has:()=>S9e,Set:()=>v9e});var lD=new Map;function g9e(){return new Map(lD)}function y9e(){return lD.clear()}function b9e(e){return lD.delete(e)}function S9e(e){return lD.has(e)}function v9e(e,t){lD.set(e,t)}function _9e(e){return lD.get(e)}function Tpe(e,t){return e.includes(t)}function Npe(e){return[...new Set(e)]}function w9e(e,t){return e.filter(r=>t.includes(r))}function C9e(e,t){return e.reduce((r,n)=>w9e(r,n),t)}function qpe(e){return e.length===1?e[0]:e.length>1?C9e(e.slice(1),e[0]):[]}function Bpe(e){let t=[];for(let r of e)t.push(...r);return t}function r_(e={}){return{...e,[Tn]:"Any"}}function ZI(e,t={}){return{...t,[Tn]:"Array",type:"array",items:nu(e)}}function YI(e,t={}){return{...t,[Tn]:"AsyncIterator",type:"AsyncIterator",items:nu(e)}}function x9e(e,t){let{[t]:r,...n}=e;return n}function ug(e,t){return t.reduce((r,n)=>x9e(r,n),e)}function Jf(e={}){return{...e,[Tn]:"Never",not:{}}}function Ef(e){return{[Tn]:"MappedResult",properties:e}}function JI(e,t,r){return{...r,[Tn]:"Constructor",type:"Constructor",parameters:lg(e),returns:nu(t)}}function n_(e,t,r){return{...r,[Tn]:"Function",type:"Function",parameters:lg(e),returns:nu(t)}}function QI(e,t){return{...t,[Tn]:"Union",anyOf:lg(e)}}function E9e(e){return e.some(t=>US(t))}function Lpe(e){return e.map(t=>US(t)?A9e(t):t)}function A9e(e){return ug(e,[Xy])}function D9e(e,t){return E9e(e)?Wy(QI(Lpe(e),t)):QI(Lpe(e),t)}function zS(e,t={}){return e.length===0?Jf(t):e.length===1?nu(e[0],t):D9e(e,t)}function uh(e,t={}){return e.length===0?Jf(t):e.length===1?nu(e[0],t):QI(e,t)}var Qq=class extends wf{};function k9e(e){return e.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}function oW(e,t,r){return e[t]===r&&e.charCodeAt(t-1)!==92}function i_(e,t){return oW(e,t,"(")}function e1(e,t){return oW(e,t,")")}function jpe(e,t){return oW(e,t,"|")}function P9e(e){if(!(i_(e,0)&&e1(e,e.length-1)))return!1;let t=0;for(let r=0;r<e.length;r++)if(i_(e,r)&&(t+=1),e1(e,r)&&(t-=1),t===0&&r!==e.length-1)return!1;return!0}function I9e(e){return e.slice(1,e.length-1)}function R9e(e){let t=0;for(let r=0;r<e.length;r++)if(i_(e,r)&&(t+=1),e1(e,r)&&(t-=1),jpe(e,r)&&t===0)return!0;return!1}function O9e(e){for(let t=0;t<e.length;t++)if(i_(e,t))return!0;return!1}function F9e(e){let[t,r]=[0,0],n=[];for(let s=0;s<e.length;s++)if(i_(e,s)&&(t+=1),e1(e,s)&&(t-=1),jpe(e,s)&&t===0){let o=e.slice(r,s);o.length>0&&n.push(uD(o)),r=s+1}let i=e.slice(r);return i.length>0&&n.push(uD(i)),n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"or",expr:n}}function T9e(e){function t(i,s){if(!i_(i,s))throw new Qq("TemplateLiteralParser: Index must point to open parens");let o=0;for(let a=s;a<i.length;a++)if(i_(i,a)&&(o+=1),e1(i,a)&&(o-=1),o===0)return[s,a];throw new Qq("TemplateLiteralParser: Unclosed group parens in expression")}function r(i,s){for(let o=s;o<i.length;o++)if(i_(i,o))return[s,o];return[s,i.length]}let n=[];for(let i=0;i<e.length;i++)if(i_(e,i)){let[s,o]=t(e,i),a=e.slice(s,o+1);n.push(uD(a)),i=o}else{let[s,o]=r(e,i),a=e.slice(s,o);a.length>0&&n.push(uD(a)),i=o-1}return n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"and",expr:n}}function uD(e){return P9e(e)?uD(I9e(e)):R9e(e)?F9e(e):O9e(e)?T9e(e):{type:"const",const:k9e(e)}}function dD(e){return uD(e.slice(1,e.length-1))}var aW=class extends wf{};function N9e(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="0"&&e.expr[1].type==="const"&&e.expr[1].const==="[1-9][0-9]*"}function q9e(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="true"&&e.expr[1].type==="const"&&e.expr[1].const==="false"}function B9e(e){return e.type==="const"&&e.const===".*"}function xx(e){return N9e(e)||B9e(e)?!1:q9e(e)?!0:e.type==="and"?e.expr.every(t=>xx(t)):e.type==="or"?e.expr.every(t=>xx(t)):e.type==="const"?!0:(()=>{throw new aW("Unknown expression type")})()}function Mpe(e){let t=dD(e.pattern);return xx(t)}var cW=class extends wf{};function*$pe(e){if(e.length===1)return yield*e[0];for(let t of e[0])for(let r of $pe(e.slice(1)))yield`${t}${r}`}function*L9e(e){return yield*$pe(e.expr.map(t=>[...t1(t)]))}function*j9e(e){for(let t of e.expr)yield*t1(t)}function*M9e(e){return yield e.const}function*t1(e){return e.type==="and"?yield*L9e(e):e.type==="or"?yield*j9e(e):e.type==="const"?yield*M9e(e):(()=>{throw new cW("Unknown expression")})()}function eB(e){let t=dD(e.pattern);return xx(t)?[...t1(t)]:[]}function nh(e,t={}){return{...t,[Tn]:"Literal",const:e,type:typeof e}}function r1(e={}){return{...e,[Tn]:"Boolean",type:"boolean"}}function Ex(e={}){return{...e,[Tn]:"BigInt",type:"bigint"}}function cS(e={}){return{...e,[Tn]:"Number",type:"number"}}function s_(e={}){return{...e,[Tn]:"String",type:"string"}}function*$9e(e){let t=e.trim().replace(/"|'/g,"");return t==="boolean"?yield r1():t==="number"?yield cS():t==="bigint"?yield Ex():t==="string"?yield s_():yield(()=>{let r=t.split("|").map(n=>nh(n.trim()));return r.length===0?Jf():r.length===1?r[0]:zS(r)})()}function*U9e(e){if(e[1]!=="{"){let t=nh("$"),r=lW(e.slice(1));return yield*[t,...r]}for(let t=2;t<e.length;t++)if(e[t]==="}"){let r=$9e(e.slice(2,t)),n=lW(e.slice(t+1));return yield*[...r,...n]}yield nh(e)}function*lW(e){for(let t=0;t<e.length;t++)if(e[t]==="$"){let r=nh(e.slice(0,t)),n=U9e(e.slice(t));return yield*[r,...n]}yield nh(e)}function Upe(e){return[...lW(e)]}var uW=class extends wf{};function z9e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function zpe(e,t){return zb(e)?e.pattern.slice(1,e.pattern.length-1):Rf(e)?`(${e.anyOf.map(r=>zpe(r,t)).join("|")})`:_x(e)?`${t}${KI}`:vx(e)?`${t}${KI}`:HX(e)?`${t}${KI}`:XI(e)?`${t}${sW}`:t_(e)?`${t}${z9e(e.const.toString())}`:KX(e)?`${t}${iW}`:(()=>{throw new uW(`Unexpected Kind '${e[Tn]}'`)})()}function dW(e){return`^${e.map(t=>zpe(t,"")).join("")}$`}function Ax(e){let r=eB(e).map(n=>nh(n));return zS(r)}function n1(e,t={}){let r=kh(e)?dW(Upe(e)):dW(e);return{...t,[Tn]:"TemplateLiteral",type:"string",pattern:r}}function G9e(e){return eB(e).map(r=>r.toString())}function V9e(e){let t=[];for(let r of e)t.push(...gb(r));return t}function X9e(e){return[e.toString()]}function gb(e){return[...new Set(zb(e)?G9e(e):Rf(e)?V9e(e.anyOf):t_(e)?X9e(e.const):_x(e)?["[number]"]:vx(e)?["[number]"]:[])]}function W9e(e,t,r){let n={};for(let i of Object.getOwnPropertyNames(t))n[i]=Dx(e,gb(t[i]),r);return n}function H9e(e,t,r){return W9e(e,t.properties,r)}function Gpe(e,t,r){let n=H9e(e,t,r);return Ef(n)}function Xpe(e,t){return e.map(r=>Wpe(r,t))}function K9e(e){return e.filter(t=>!sD(t))}function Z9e(e,t){return tB(K9e(Xpe(e,t)))}function Y9e(e){return e.some(t=>sD(t))?[]:e}function J9e(e,t){return zS(Y9e(Xpe(e,t)))}function Q9e(e,t){return t in e?e[t]:t==="[number]"?zS(e):Jf()}function eXe(e,t){return t==="[number]"?e:Jf()}function tXe(e,t){return t in e?e[t]:Jf()}function Wpe(e,t){return yg(e)?Z9e(e.allOf,t):Rf(e)?J9e(e.anyOf,t):aS(e)?Q9e(e.items??[],t):e_(e)?eXe(e.items,t):Ug(e)?tXe(e.properties,t):Jf()}function i1(e,t){return t.map(r=>Wpe(e,r))}function Vpe(e,t){return zS(i1(e,t))}function Dx(e,t,r={}){return Nh(t)?nu(Gpe(e,t,r)):Ub(t)?nu(Hpe(e,t,r)):Gb(t)?nu(Vpe(e,gb(t)),r):nu(Vpe(e,t),r)}function rXe(e,t,r){return{[t]:Dx(e,[t],r)}}function nXe(e,t,r){return t.reduce((n,i)=>({...n,...rXe(e,i,r)}),{})}function iXe(e,t,r){return nXe(e,t.keys,r)}function Hpe(e,t,r){let n=iXe(e,t,r);return Ef(n)}function s1(e,t={}){return{...t,[Tn]:"Iterator",type:"Iterator",items:nu(e)}}function sXe(e,t={}){let r=globalThis.Object.getOwnPropertyNames(e),n=r.filter(a=>US(e[a])),i=r.filter(a=>!n.includes(a)),s=Gb(t.additionalProperties)?{additionalProperties:nu(t.additionalProperties)}:{},o={};for(let a of r)o[a]=nu(e[a]);return i.length>0?{...t,...s,[Tn]:"Object",type:"object",properties:o,required:i}:{...t,...s,[Tn]:"Object",type:"object",properties:o}}var qh=sXe;function o1(e,t={}){return{...t,[Tn]:"Promise",type:"Promise",item:nu(e)}}function oXe(e){return ug(nu(e),[Qv])}function aXe(e){return{...nu(e),[Qv]:"Readonly"}}function cXe(e,t){return t===!1?oXe(e):aXe(e)}function Vb(e,t){let r=t??!0;return Nh(e)?Kpe(e,r):cXe(e,r)}function lXe(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Vb(e[n],t);return r}function uXe(e,t){return lXe(e.properties,t)}function Kpe(e,t){let r=uXe(e,t);return Ef(r)}function lS(e,t={}){let[r,n,i]=[!1,e.length,e.length];return e.length>0?{...t,[Tn]:"Tuple",type:"array",items:lg(e),additionalItems:r,minItems:n,maxItems:i}:{...t,[Tn]:"Tuple",type:"array",minItems:n,maxItems:i}}function Zpe(e,t){return e in t?C0(e,t[e]):Ef(t)}function dXe(e){return{[e]:nh(e)}}function pXe(e){let t={};for(let r of e)t[r]=nh(r);return t}function mXe(e,t){return Tpe(t,e)?dXe(e):pXe(t)}function fXe(e,t){let r=mXe(e,t);return Zpe(e,r)}function a1(e,t){return t.map(r=>C0(e,r))}function hXe(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=C0(e,t[n]);return r}function C0(e,t){return US(t)?Wy(C0(e,ug(t,[Xy]))):Hde(t)?Vb(C0(e,ug(t,[Qv]))):Nh(t)?Zpe(e,t.properties):Ub(t)?fXe(e,t.keys):zI(t)?JI(a1(e,t.parameters),C0(e,t.returns)):GI(t)?n_(a1(e,t.parameters),C0(e,t.returns)):UI(t)?YI(C0(e,t.items)):VI(t)?s1(C0(e,t.items)):yg(t)?Hy(a1(e,t.allOf)):Rf(t)?uh(a1(e,t.anyOf)):aS(t)?lS(a1(e,t.items??[])):Ug(t)?qh(hXe(e,t.properties)):e_(t)?ZI(C0(e,t.items)):wx(t)?o1(C0(e,t.item)):t}function gXe(e,t){let r={};for(let n of e)r[n]=C0(n,t);return r}function pW(e,t,r={}){let n=Gb(e)?gb(e):e,i=t({[Tn]:"MappedKey",keys:n}),s=gXe(n,i);return nu(qh(s),r)}function yXe(e){return ug(nu(e),[Xy])}function bXe(e){return{...nu(e),[Xy]:"Optional"}}function SXe(e,t){return t===!1?yXe(e):bXe(e)}function Wy(e,t){let r=t??!0;return Nh(e)?Ype(e,r):SXe(e,r)}function vXe(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Wy(e[n],t);return r}function _Xe(e,t){return vXe(e.properties,t)}function Ype(e,t){let r=_Xe(e,t);return Ef(r)}function c1(e,t){let r=e.every(i=>Ug(i)),n=Gb(t.unevaluatedProperties)?{unevaluatedProperties:nu(t.unevaluatedProperties)}:{};return t.unevaluatedProperties===!1||Gb(t.unevaluatedProperties)||r?{...t,...n,[Tn]:"Intersect",type:"object",allOf:lg(e)}:{...t,...n,[Tn]:"Intersect",allOf:lg(e)}}function wXe(e){return e.every(t=>US(t))}function CXe(e){return ug(e,[Xy])}function Jpe(e){return e.map(t=>US(t)?CXe(t):t)}function xXe(e,t){return wXe(e)?Wy(c1(Jpe(e),t)):c1(Jpe(e),t)}function tB(e,t={}){if(e.length===0)return Jf(t);if(e.length===1)return nu(e[0],t);if(e.some(r=>oD(r)))throw new Error("Cannot intersect transform types");return xXe(e,t)}function Hy(e,t={}){if(e.length===0)return Jf(t);if(e.length===1)return nu(e[0],t);if(e.some(r=>oD(r)))throw new Error("Cannot intersect transform types");return c1(e,t)}function Qpe(e){return e.map(t=>mW(t))}function EXe(e){return Hy(Qpe(e))}function AXe(e){return uh(Qpe(e))}function DXe(e){return mW(e)}function mW(e){return yg(e)?EXe(e.allOf):Rf(e)?AXe(e.anyOf):wx(e)?DXe(e.item):e}function fW(e,t={}){return nu(mW(e),t)}function eme(e){let t=[];for(let r of e)t.push(x0(r));return t}function kXe(e){let t=eme(e);return Bpe(t)}function PXe(e){let t=eme(e);return qpe(t)}function IXe(e){return e.map((t,r)=>r.toString())}function RXe(e){return["[number]"]}function OXe(e){return globalThis.Object.getOwnPropertyNames(e)}function FXe(e){return hW?globalThis.Object.getOwnPropertyNames(e).map(r=>r[0]==="^"&&r[r.length-1]==="$"?r.slice(1,r.length-1):r):[]}function x0(e){return yg(e)?kXe(e.allOf):Rf(e)?PXe(e.anyOf):aS(e)?IXe(e.items??[]):e_(e)?RXe(e.items):Ug(e)?OXe(e.properties):ZX(e)?FXe(e.patternProperties):[]}var hW=!1;function o_(e){hW=!0;let t=x0(e);return hW=!1,`^(${t.map(n=>`(${n})`).join("|")})$`}function TXe(e){return e.map(t=>t==="[number]"?cS():nh(t))}function l1(e,t={}){if(Nh(e))return tme(e,t);{let r=x0(e),n=TXe(r),i=zS(n);return nu(i,t)}}function NXe(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=l1(e[n],t);return r}function qXe(e,t){return NXe(e.properties,t)}function tme(e,t){let r=qXe(e,t);return Ef(r)}function rB(e){let t=x0(e),r=i1(e,t);return t.map((n,i)=>[t[i],r[i]])}function BXe(e){let t=[];for(let r of e)t.push(...x0(r));return Npe(t)}function LXe(e){return e.filter(t=>!sD(t))}function jXe(e,t){let r=[];for(let n of e)r.push(...i1(n,[t]));return LXe(r)}function MXe(e,t){let r={};for(let n of t)r[n]=tB(jXe(e,n));return r}function gW(e,t={}){let r=BXe(e),n=MXe(e,r);return qh(n,t)}function u1(e={}){return{...e,[Tn]:"Date",type:"Date"}}function d1(e={}){return{...e,[Tn]:"Null",type:"null"}}function p1(e){return{...e,[Tn]:"Symbol",type:"symbol"}}function m1(e={}){return{...e,[Tn]:"Undefined",type:"undefined"}}function f1(e={}){return{...e,[Tn]:"Uint8Array",type:"Uint8Array"}}function kx(e={}){return{...e,[Tn]:"Unknown"}}function $Xe(e){return e.map(t=>yW(t,!1))}function UXe(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=Vb(yW(e[r],!1));return t}function nB(e,t){return t===!0?e:Vb(e)}function yW(e,t){return UX(e)?nB(r_(),t):GX(e)?nB(r_(),t):mb(e)?Vb(lS($Xe(e))):Sx(e)?f1():$I(e)?u1():Dh(e)?nB(qh(UXe(e)),t):zX(e)?nB(n_([],kx()),t):tg(e)?m1():VX(e)?d1():WX(e)?p1():MI(e)?Ex():oS(e)?nh(e):vw(e)?nh(e):kh(e)?nh(e):qh({})}function bW(e,t={}){return nu(yW(e,!0),t)}function SW(e,t={}){return lS(lg(e.parameters),{...t})}function h1(e,t){return e.map(r=>E0(r,t))}function zXe(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=E0(e[n],t);return r}function GXe(e,t){return e.parameters=h1(e.parameters,t),e.returns=E0(e.returns,t),e}function VXe(e,t){return e.parameters=h1(e.parameters,t),e.returns=E0(e.returns,t),e}function XXe(e,t){return e.allOf=h1(e.allOf,t),e}function WXe(e,t){return e.anyOf=h1(e.anyOf,t),e}function HXe(e,t){return tg(e.items)||(e.items=h1(e.items,t)),e}function KXe(e,t){return e.items=E0(e.items,t),e}function ZXe(e,t){return e.properties=zXe(e.properties,t),e}function YXe(e,t){return e.item=E0(e.item,t),e}function JXe(e,t){return e.items=E0(e.items,t),e}function QXe(e,t){return e.items=E0(e.items,t),e}function eWe(e,t){let r=t.find(i=>i.$id===e.$ref);if(r===void 0)throw Error(`Unable to dereference schema with $id ${e.$ref}`);let n=ug(r,["$id"]);return E0(n,t)}function tWe(e,t){return zI(e)?GXe(e,t):GI(e)?VXe(e,t):yg(e)?XXe(e,t):Rf(e)?WXe(e,t):aS(e)?HXe(e,t):e_(e)?KXe(e,t):Ug(e)?ZXe(e,t):wx(e)?YXe(e,t):UI(e)?JXe(e,t):VI(e)?QXe(e,t):YX(e)?eWe(e,t):e}function E0(e,t){return tWe(nu(e),lg(t))}function vW(e,t={}){if(tg(e))throw new Error("Enum undefined or empty");let r=globalThis.Object.getOwnPropertyNames(e).filter(s=>isNaN(s)).map(s=>e[s]),i=[...new Set(r)].map(s=>nh(s));return uh(i,{...t,[w0]:"Enum"})}var wW=class extends wf{},Nr;(function(e){e[e.Union=0]="Union",e[e.True=1]="True",e[e.False=2]="False"})(Nr||(Nr={}));function A0(e){return e===Nr.False?e:Nr.True}function pD(e){throw new wW(e)}function Ag(e){return tt.IsNever(e)||tt.IsIntersect(e)||tt.IsUnion(e)||tt.IsUnknown(e)||tt.IsAny(e)}function Dg(e,t){return tt.IsNever(t)?cme(e,t):tt.IsIntersect(t)?iB(e,t):tt.IsUnion(t)?AW(e,t):tt.IsUnknown(t)?pme(e,t):tt.IsAny(t)?EW(e,t):pD("StructuralRight")}function EW(e,t){return Nr.True}function rWe(e,t){return tt.IsIntersect(t)?iB(e,t):tt.IsUnion(t)&&t.anyOf.some(r=>tt.IsAny(r)||tt.IsUnknown(r))?Nr.True:tt.IsUnion(t)?Nr.Union:tt.IsUnknown(t)||tt.IsAny(t)?Nr.True:Nr.Union}function nWe(e,t){return tt.IsUnknown(e)?Nr.False:tt.IsAny(e)?Nr.Union:tt.IsNever(e)?Nr.True:Nr.False}function iWe(e,t){return tt.IsObject(t)&&sB(t)?Nr.True:Ag(t)?Dg(e,t):tt.IsArray(t)?A0(ih(e.items,t.items)):Nr.False}function sWe(e,t){return Ag(t)?Dg(e,t):tt.IsAsyncIterator(t)?A0(ih(e.items,t.items)):Nr.False}function oWe(e,t){return Ag(t)?Dg(e,t):tt.IsObject(t)?ky(e,t):tt.IsRecord(t)?D0(e,t):tt.IsBigInt(t)?Nr.True:Nr.False}function ome(e,t){return tt.IsLiteralBoolean(e)||tt.IsBoolean(e)?Nr.True:Nr.False}function aWe(e,t){return Ag(t)?Dg(e,t):tt.IsObject(t)?ky(e,t):tt.IsRecord(t)?D0(e,t):tt.IsBoolean(t)?Nr.True:Nr.False}function cWe(e,t){return Ag(t)?Dg(e,t):tt.IsObject(t)?ky(e,t):tt.IsConstructor(t)?e.parameters.length>t.parameters.length?Nr.False:e.parameters.every((r,n)=>A0(ih(t.parameters[n],r))===Nr.True)?A0(ih(e.returns,t.returns)):Nr.False:Nr.False}function lWe(e,t){return Ag(t)?Dg(e,t):tt.IsObject(t)?ky(e,t):tt.IsRecord(t)?D0(e,t):tt.IsDate(t)?Nr.True:Nr.False}function uWe(e,t){return Ag(t)?Dg(e,t):tt.IsObject(t)?ky(e,t):tt.IsFunction(t)?e.parameters.length>t.parameters.length?Nr.False:e.parameters.every((r,n)=>A0(ih(t.parameters[n],r))===Nr.True)?A0(ih(e.returns,t.returns)):Nr.False:Nr.False}function ame(e,t){return tt.IsLiteral(e)&&fb.IsNumber(e.const)||tt.IsNumber(e)||tt.IsInteger(e)?Nr.True:Nr.False}function dWe(e,t){return tt.IsInteger(t)||tt.IsNumber(t)?Nr.True:Ag(t)?Dg(e,t):tt.IsObject(t)?ky(e,t):tt.IsRecord(t)?D0(e,t):Nr.False}function iB(e,t){return t.allOf.every(r=>ih(e,r)===Nr.True)?Nr.True:Nr.False}function pWe(e,t){return e.allOf.some(r=>ih(r,t)===Nr.True)?Nr.True:Nr.False}function mWe(e,t){return Ag(t)?Dg(e,t):tt.IsIterator(t)?A0(ih(e.items,t.items)):Nr.False}function fWe(e,t){return tt.IsLiteral(t)&&t.const===e.const?Nr.True:Ag(t)?Dg(e,t):tt.IsObject(t)?ky(e,t):tt.IsRecord(t)?D0(e,t):tt.IsString(t)?dme(e,t):tt.IsNumber(t)?lme(e,t):tt.IsInteger(t)?ame(e,t):tt.IsBoolean(t)?ome(e,t):Nr.False}function cme(e,t){return Nr.False}function hWe(e,t){return Nr.True}function rme(e){let[t,r]=[e,0];for(;tt.IsNot(t);)t=t.not,r+=1;return r%2===0?t:kx()}function gWe(e,t){return tt.IsNot(e)?ih(rme(e),t):tt.IsNot(t)?ih(e,rme(t)):pD("Invalid fallthrough for Not")}function yWe(e,t){return Ag(t)?Dg(e,t):tt.IsObject(t)?ky(e,t):tt.IsRecord(t)?D0(e,t):tt.IsNull(t)?Nr.True:Nr.False}function lme(e,t){return tt.IsLiteralNumber(e)||tt.IsNumber(e)||tt.IsInteger(e)?Nr.True:Nr.False}function bWe(e,t){return Ag(t)?Dg(e,t):tt.IsObject(t)?ky(e,t):tt.IsRecord(t)?D0(e,t):tt.IsInteger(t)||tt.IsNumber(t)?Nr.True:Nr.False}function yb(e,t){return Object.getOwnPropertyNames(e.properties).length===t}function nme(e){return sB(e)}function ime(e){return yb(e,0)||yb(e,1)&&"description"in e.properties&&tt.IsUnion(e.properties.description)&&e.properties.description.anyOf.length===2&&(tt.IsString(e.properties.description.anyOf[0])&&tt.IsUndefined(e.properties.description.anyOf[1])||tt.IsString(e.properties.description.anyOf[1])&&tt.IsUndefined(e.properties.description.anyOf[0]))}function _W(e){return yb(e,0)}function sme(e){return yb(e,0)}function SWe(e){return yb(e,0)}function vWe(e){return yb(e,0)}function _We(e){return sB(e)}function wWe(e){let t=cS();return yb(e,0)||yb(e,1)&&"length"in e.properties&&A0(ih(e.properties.length,t))===Nr.True}function CWe(e){return yb(e,0)}function sB(e){let t=cS();return yb(e,0)||yb(e,1)&&"length"in e.properties&&A0(ih(e.properties.length,t))===Nr.True}function xWe(e){let t=n_([r_()],r_());return yb(e,0)||yb(e,1)&&"then"in e.properties&&A0(ih(e.properties.then,t))===Nr.True}function ume(e,t){return ih(e,t)===Nr.False||tt.IsOptional(e)&&!tt.IsOptional(t)?Nr.False:Nr.True}function ky(e,t){return tt.IsUnknown(e)?Nr.False:tt.IsAny(e)?Nr.Union:tt.IsNever(e)||tt.IsLiteralString(e)&&nme(t)||tt.IsLiteralNumber(e)&&_W(t)||tt.IsLiteralBoolean(e)&&sme(t)||tt.IsSymbol(e)&&ime(t)||tt.IsBigInt(e)&&SWe(t)||tt.IsString(e)&&nme(t)||tt.IsSymbol(e)&&ime(t)||tt.IsNumber(e)&&_W(t)||tt.IsInteger(e)&&_W(t)||tt.IsBoolean(e)&&sme(t)||tt.IsUint8Array(e)&&_We(t)||tt.IsDate(e)&&vWe(t)||tt.IsConstructor(e)&&CWe(t)||tt.IsFunction(e)&&wWe(t)?Nr.True:tt.IsRecord(e)&&tt.IsString(CW(e))?(()=>t[w0]==="Record"?Nr.True:Nr.False)():tt.IsRecord(e)&&tt.IsNumber(CW(e))?(()=>yb(t,0)?Nr.True:Nr.False)():Nr.False}function EWe(e,t){return Ag(t)?Dg(e,t):tt.IsRecord(t)?D0(e,t):tt.IsObject(t)?(()=>{for(let r of Object.getOwnPropertyNames(t.properties)){if(!(r in e.properties)&&!tt.IsOptional(t.properties[r]))return Nr.False;if(tt.IsOptional(t.properties[r]))return Nr.True;if(ume(e.properties[r],t.properties[r])===Nr.False)return Nr.False}return Nr.True})():Nr.False}function AWe(e,t){return Ag(t)?Dg(e,t):tt.IsObject(t)&&xWe(t)?Nr.True:tt.IsPromise(t)?A0(ih(e.item,t.item)):Nr.False}function CW(e){return Cx in e.patternProperties?cS():aD in e.patternProperties?s_():pD("Unknown record key pattern")}function xW(e){return Cx in e.patternProperties?e.patternProperties[Cx]:aD in e.patternProperties?e.patternProperties[aD]:pD("Unable to get record value schema")}function D0(e,t){let[r,n]=[CW(t),xW(t)];return tt.IsLiteralString(e)&&tt.IsNumber(r)&&A0(ih(e,n))===Nr.True?Nr.True:tt.IsUint8Array(e)&&tt.IsNumber(r)||tt.IsString(e)&&tt.IsNumber(r)||tt.IsArray(e)&&tt.IsNumber(r)?ih(e,n):tt.IsObject(e)?(()=>{for(let i of Object.getOwnPropertyNames(e.properties))if(ume(n,e.properties[i])===Nr.False)return Nr.False;return Nr.True})():Nr.False}function DWe(e,t){return Ag(t)?Dg(e,t):tt.IsObject(t)?ky(e,t):tt.IsRecord(t)?ih(xW(e),xW(t)):Nr.False}function kWe(e,t){let r=tt.IsRegExp(e)?s_():e,n=tt.IsRegExp(t)?s_():t;return ih(r,n)}function dme(e,t){return tt.IsLiteral(e)&&fb.IsString(e.const)||tt.IsString(e)?Nr.True:Nr.False}function PWe(e,t){return Ag(t)?Dg(e,t):tt.IsObject(t)?ky(e,t):tt.IsRecord(t)?D0(e,t):tt.IsString(t)?Nr.True:Nr.False}function IWe(e,t){return Ag(t)?Dg(e,t):tt.IsObject(t)?ky(e,t):tt.IsRecord(t)?D0(e,t):tt.IsSymbol(t)?Nr.True:Nr.False}function RWe(e,t){return tt.IsTemplateLiteral(e)?ih(Ax(e),t):tt.IsTemplateLiteral(t)?ih(e,Ax(t)):pD("Invalid fallthrough for TemplateLiteral")}function OWe(e,t){return tt.IsArray(t)&&e.items!==void 0&&e.items.every(r=>ih(r,t.items)===Nr.True)}function FWe(e,t){return tt.IsNever(e)?Nr.True:tt.IsUnknown(e)?Nr.False:tt.IsAny(e)?Nr.Union:Nr.False}function TWe(e,t){return Ag(t)?Dg(e,t):tt.IsObject(t)&&sB(t)||tt.IsArray(t)&&OWe(e,t)?Nr.True:tt.IsTuple(t)?fb.IsUndefined(e.items)&&!fb.IsUndefined(t.items)||!fb.IsUndefined(e.items)&&fb.IsUndefined(t.items)?Nr.False:fb.IsUndefined(e.items)&&!fb.IsUndefined(t.items)||e.items.every((r,n)=>ih(r,t.items[n])===Nr.True)?Nr.True:Nr.False:Nr.False}function NWe(e,t){return Ag(t)?Dg(e,t):tt.IsObject(t)?ky(e,t):tt.IsRecord(t)?D0(e,t):tt.IsUint8Array(t)?Nr.True:Nr.False}function qWe(e,t){return Ag(t)?Dg(e,t):tt.IsObject(t)?ky(e,t):tt.IsRecord(t)?D0(e,t):tt.IsVoid(t)?jWe(e,t):tt.IsUndefined(t)?Nr.True:Nr.False}function AW(e,t){return t.anyOf.some(r=>ih(e,r)===Nr.True)?Nr.True:Nr.False}function BWe(e,t){return e.anyOf.every(r=>ih(r,t)===Nr.True)?Nr.True:Nr.False}function pme(e,t){return Nr.True}function LWe(e,t){return tt.IsNever(t)?cme(e,t):tt.IsIntersect(t)?iB(e,t):tt.IsUnion(t)?AW(e,t):tt.IsAny(t)?EW(e,t):tt.IsString(t)?dme(e,t):tt.IsNumber(t)?lme(e,t):tt.IsInteger(t)?ame(e,t):tt.IsBoolean(t)?ome(e,t):tt.IsArray(t)?nWe(e,t):tt.IsTuple(t)?FWe(e,t):tt.IsObject(t)?ky(e,t):tt.IsUnknown(t)?Nr.True:Nr.False}function jWe(e,t){return tt.IsUndefined(e)||tt.IsUndefined(e)?Nr.True:Nr.False}function MWe(e,t){return tt.IsIntersect(t)?iB(e,t):tt.IsUnion(t)?AW(e,t):tt.IsUnknown(t)?pme(e,t):tt.IsAny(t)?EW(e,t):tt.IsObject(t)?ky(e,t):tt.IsVoid(t)?Nr.True:Nr.False}function ih(e,t){return tt.IsTemplateLiteral(e)||tt.IsTemplateLiteral(t)?RWe(e,t):tt.IsRegExp(e)||tt.IsRegExp(t)?kWe(e,t):tt.IsNot(e)||tt.IsNot(t)?gWe(e,t):tt.IsAny(e)?rWe(e,t):tt.IsArray(e)?iWe(e,t):tt.IsBigInt(e)?oWe(e,t):tt.IsBoolean(e)?aWe(e,t):tt.IsAsyncIterator(e)?sWe(e,t):tt.IsConstructor(e)?cWe(e,t):tt.IsDate(e)?lWe(e,t):tt.IsFunction(e)?uWe(e,t):tt.IsInteger(e)?dWe(e,t):tt.IsIntersect(e)?pWe(e,t):tt.IsIterator(e)?mWe(e,t):tt.IsLiteral(e)?fWe(e,t):tt.IsNever(e)?hWe(e,t):tt.IsNull(e)?yWe(e,t):tt.IsNumber(e)?bWe(e,t):tt.IsObject(e)?EWe(e,t):tt.IsRecord(e)?DWe(e,t):tt.IsString(e)?PWe(e,t):tt.IsSymbol(e)?IWe(e,t):tt.IsTuple(e)?TWe(e,t):tt.IsPromise(e)?AWe(e,t):tt.IsUint8Array(e)?NWe(e,t):tt.IsUndefined(e)?qWe(e,t):tt.IsUnion(e)?BWe(e,t):tt.IsUnknown(e)?LWe(e,t):tt.IsVoid(e)?MWe(e,t):pD(`Unknown left type operand '${e[Tn]}'`)}function _w(e,t){return ih(e,t)}function $We(e,t,r,n,i){let s={};for(let o of globalThis.Object.getOwnPropertyNames(e))s[o]=Px(e[o],t,r,n,i);return s}function UWe(e,t,r,n,i){return $We(e.properties,t,r,n,i)}function mme(e,t,r,n,i){let s=UWe(e,t,r,n,i);return Ef(s)}function zWe(e,t,r,n){let i=_w(e,t);return i===Nr.Union?uh([r,n]):i===Nr.True?r:n}function Px(e,t,r,n,i={}){return Nh(e)?mme(e,t,r,n,i):Ub(e)?nu(fme(e,t,r,n,i)):nu(zWe(e,t,r,n),i)}function GWe(e,t,r,n,i){return{[e]:Px(nh(e),t,r,n,i)}}function VWe(e,t,r,n,i){return e.reduce((s,o)=>({...s,...GWe(o,t,r,n,i)}),{})}function XWe(e,t,r,n,i){return VWe(e.keys,t,r,n,i)}function fme(e,t,r,n,i){let s=XWe(e,t,r,n,i);return Ef(s)}function WWe(e){return e.allOf.every(t=>a_(t))}function HWe(e){return e.anyOf.some(t=>a_(t))}function KWe(e){return!a_(e.not)}function a_(e){return e[Tn]==="Intersect"?WWe(e):e[Tn]==="Union"?HWe(e):e[Tn]==="Not"?KWe(e):e[Tn]==="Undefined"}function hme(e,t){return Ix(Ax(e),t)}function ZWe(e,t){let r=e.filter(n=>_w(n,t)===Nr.False);return r.length===1?r[0]:uh(r)}function Ix(e,t,r={}){return zb(e)?nu(hme(e,t),r):Nh(e)?nu(gme(e,t),r):nu(Rf(e)?ZWe(e.anyOf,t):_w(e,t)!==Nr.False?Jf():e,r)}function YWe(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Ix(e[n],t);return r}function JWe(e,t){return YWe(e.properties,t)}function gme(e,t){let r=JWe(e,t);return Ef(r)}function yme(e,t){return Rx(Ax(e),t)}function QWe(e,t){let r=e.filter(n=>_w(n,t)!==Nr.False);return r.length===1?r[0]:uh(r)}function Rx(e,t,r={}){return zb(e)?nu(yme(e,t),r):Nh(e)?nu(bme(e,t),r):nu(Rf(e)?QWe(e.anyOf,t):_w(e,t)!==Nr.False?e:Jf(),r)}function eHe(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Rx(e[n],t);return r}function tHe(e,t){return eHe(e.properties,t)}function bme(e,t){let r=tHe(e,t);return Ef(r)}function DW(e,t={}){return nu(e.returns,t)}function kW(e={}){return{...e,[Tn]:"Integer",type:"integer"}}function rHe(e,t,r){return{[e]:uS(nh(e),t,r)}}function nHe(e,t,r){return e.reduce((n,i)=>({...n,...rHe(i,t,r)}),{})}function iHe(e,t,r){return nHe(e.keys,t,r)}function Sme(e,t,r){let n=iHe(e,t,r);return Ef(n)}function sHe(e){let[t,r]=[e.slice(0,1),e.slice(1)];return[t.toLowerCase(),r].join("")}function oHe(e){let[t,r]=[e.slice(0,1),e.slice(1)];return[t.toUpperCase(),r].join("")}function aHe(e){return e.toUpperCase()}function cHe(e){return e.toLowerCase()}function lHe(e,t,r){let n=dD(e.pattern);if(!xx(n))return{...e,pattern:vme(e.pattern,t)};let o=[...t1(n)].map(l=>nh(l)),a=_me(o,t),c=uh(a);return n1([c],r)}function vme(e,t){return typeof e=="string"?t==="Uncapitalize"?sHe(e):t==="Capitalize"?oHe(e):t==="Uppercase"?aHe(e):t==="Lowercase"?cHe(e):e:e.toString()}function _me(e,t){return e.map(r=>uS(r,t))}function uS(e,t,r={}){return Ub(e)?Sme(e,t,r):zb(e)?lHe(e,t,e):Rf(e)?uh(_me(e.anyOf,t),r):t_(e)?nh(vme(e.const,t),r):e}function PW(e,t={}){return uS(e,"Capitalize",t)}function IW(e,t={}){return uS(e,"Lowercase",t)}function RW(e,t={}){return uS(e,"Uncapitalize",t)}function OW(e,t={}){return uS(e,"Uppercase",t)}function FW(e,t){return{...t,[Tn]:"Not",not:nu(e)}}function uHe(e,t,r){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=Ox(e[i],t,r);return n}function dHe(e,t,r){return uHe(e.properties,t,r)}function wme(e,t,r){let n=dHe(e,t,r);return Ef(n)}function pHe(e,t){return e.map(r=>TW(r,t))}function mHe(e,t){return e.map(r=>TW(r,t))}function fHe(e,t){let{[t]:r,...n}=e;return n}function hHe(e,t){return t.reduce((r,n)=>fHe(r,n),e)}function TW(e,t){return yg(e)?Hy(pHe(e.allOf,t)):Rf(e)?uh(mHe(e.anyOf,t)):Ug(e)?qh(hHe(e.properties,t)):qh({})}function Ox(e,t,r={}){if(Ub(t))return Cme(e,t,r);if(Nh(e))return wme(e,t,r);let n=Gb(t)?gb(t):t,i=ug(e,[gg,"$id","required"]),s=nu(TW(e,n),r);return{...i,...s}}function gHe(e,t,r){return{[t]:Ox(e,[t],r)}}function yHe(e,t,r){return t.reduce((n,i)=>({...n,...gHe(e,i,r)}),{})}function bHe(e,t,r){return yHe(e,t.keys,r)}function Cme(e,t,r){let n=bHe(e,t,r);return Ef(n)}function NW(e,t={}){return lS(lg(e.parameters),{...t})}function xme(e){return e.map(t=>Eme(t))}function SHe(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=Wy(e[r]);return t}function Eme(e){return yg(e)?Hy(xme(e.allOf)):Rf(e)?uh(xme(e.anyOf)):Ug(e)?qh(SHe(e.properties)):qh({})}function g1(e,t={}){if(Nh(e))return Ame(e,t);let r=ug(e,[gg,"$id","required"]),n=nu(Eme(e),t);return{...r,...n}}function vHe(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=g1(e[n],t);return r}function _He(e,t){return vHe(e.properties,t)}function Ame(e,t){let r=_He(e,t);return Ef(r)}function wHe(e,t,r){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=Fx(e[i],t,r);return n}function CHe(e,t,r){return wHe(e.properties,t,r)}function Dme(e,t,r){let n=CHe(e,t,r);return Ef(n)}function xHe(e,t){return e.map(r=>qW(r,t))}function EHe(e,t){return e.map(r=>qW(r,t))}function AHe(e,t){let r={};for(let n of t)n in e&&(r[n]=e[n]);return r}function qW(e,t){return yg(e)?Hy(xHe(e.allOf,t)):Rf(e)?uh(EHe(e.anyOf,t)):Ug(e)?qh(AHe(e.properties,t)):qh({})}function Fx(e,t,r={}){if(Ub(t))return kme(e,t,r);if(Nh(e))return Dme(e,t,r);let n=Gb(t)?gb(t):t,i=ug(e,[gg,"$id","required"]),s=nu(qW(e,n),r);return{...i,...s}}function DHe(e,t,r){return{[t]:Fx(e,[t],r)}}function kHe(e,t,r){return t.reduce((n,i)=>({...n,...DHe(e,i,r)}),{})}function PHe(e,t,r){return kHe(e,t.keys,r)}function kme(e,t,r){let n=PHe(e,t,r);return Ef(n)}function BW(e){return Vb(Wy(e))}function y1(e,t,r){return{...r,[Tn]:"Record",type:"object",patternProperties:{[e]:nu(t)}}}function LW(e,t,r){let n={};for(let i of e)n[i]=nu(t);return qh(n,{...r,[w0]:"Record"})}function IHe(e,t,r){return Mpe(e)?LW(gb(e),t,r):y1(e.pattern,t,r)}function RHe(e,t,r){return LW(gb(uh(e)),t,r)}function OHe(e,t,r){return LW([e.toString()],t,r)}function FHe(e,t,r){return y1(e.source,t,r)}function THe(e,t,r){let n=tg(e.pattern)?aD:e.pattern;return y1(n,t,r)}function NHe(e,t,r){return y1(Cx,t,r)}function qHe(e,t,r){return y1(Cx,t,r)}function jW(e,t,r={}){return Rf(e)?RHe(e.anyOf,t,r):zb(e)?IHe(e,t,r):t_(e)?OHe(e.const,t,r):vx(e)?NHe(e,t,r):_x(e)?qHe(e,t,r):JX(e)?FHe(e,t,r):XI(e)?THe(e,t,r):Jf(r)}var BHe=0;function MW(e,t={}){tg(t.$id)&&(t.$id=`T${BHe++}`);let r=e({[Tn]:"This",$ref:`${t.$id}`});return r.$id=t.$id,nu({...t,[w0]:"Recursive",...r})}function $W(e,t={}){if(kh(e))return{...t,[Tn]:"Ref",$ref:e};if(tg(e.$id))throw new Error("Reference target type must specify an $id");return{...t,[Tn]:"Ref",$ref:e.$id}}function UW(e,t={}){let r=kh(e)?new globalThis.RegExp(e):e;return{...t,[Tn]:"RegExp",type:"RegExp",source:r.source,flags:r.flags}}function Pme(e){return e.map(t=>Ime(t))}function LHe(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=ug(e[r],[Xy]);return t}function Ime(e){return yg(e)?Hy(Pme(e.allOf)):Rf(e)?uh(Pme(e.anyOf)):Ug(e)?qh(LHe(e.properties)):qh({})}function b1(e,t={}){if(Nh(e))return Rme(e,t);{let r=ug(e,[gg,"$id","required"]),n=nu(Ime(e),t);return{...r,...n}}}function jHe(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=b1(e[n],t);return r}function MHe(e,t){return jHe(e.properties,t)}function Rme(e,t){let r=MHe(e,t);return Ef(r)}function $He(e){return yg(e)?lg(e.allOf):Rf(e)?lg(e.anyOf):aS(e)?lg(e.items??[]):[]}function zW(e){return lg($He(e))}function GW(e,t={}){return nu(e.returns,t)}function VW(e){return JSON.parse(JSON.stringify(e))}var XW=class{constructor(t){this.schema=t}Decode(t){return new WW(this.schema,t)}},WW=class{constructor(t,r){this.schema=t,this.decode=r}EncodeTransform(t,r){let s={Encode:o=>r[gg].Encode(t(o)),Decode:o=>this.decode(r[gg].Decode(o))};return{...r,[gg]:s}}EncodeSchema(t,r){let n={Decode:this.decode,Encode:t};return{...r,[gg]:n}}Encode(t){let r=nu(this.schema);return oD(r)?this.EncodeTransform(t,r):this.EncodeSchema(t,r)}};function HW(e){return new XW(e)}function S1(e={}){return{...e,[Tn]:e[Tn]??"Unsafe"}}function KW(e={}){return{...e,[Tn]:"Void",type:"void"}}var ZW={};eu(ZW,{Any:()=>r_,Array:()=>ZI,AsyncIterator:()=>YI,Awaited:()=>fW,BigInt:()=>Ex,Boolean:()=>r1,Capitalize:()=>PW,Composite:()=>gW,Const:()=>bW,Constructor:()=>JI,ConstructorParameters:()=>SW,Date:()=>u1,Deref:()=>E0,Enum:()=>vW,Exclude:()=>Ix,Extends:()=>Px,Extract:()=>Rx,Function:()=>n_,Index:()=>Dx,InstanceType:()=>DW,Integer:()=>kW,Intersect:()=>Hy,Iterator:()=>s1,KeyOf:()=>l1,Literal:()=>nh,Lowercase:()=>IW,Mapped:()=>pW,Never:()=>Jf,Not:()=>FW,Null:()=>d1,Number:()=>cS,Object:()=>qh,Omit:()=>Ox,Optional:()=>Wy,Parameters:()=>NW,Partial:()=>g1,Pick:()=>Fx,Promise:()=>o1,Readonly:()=>Vb,ReadonlyOptional:()=>BW,Record:()=>jW,Recursive:()=>MW,Ref:()=>$W,RegExp:()=>UW,Required:()=>b1,Rest:()=>zW,ReturnType:()=>GW,Strict:()=>VW,String:()=>s_,Symbol:()=>p1,TemplateLiteral:()=>n1,Transform:()=>HW,Tuple:()=>lS,Uint8Array:()=>f1,Uncapitalize:()=>RW,Undefined:()=>m1,Union:()=>uh,Unknown:()=>kx,Unsafe:()=>S1,Uppercase:()=>OW,Void:()=>KW});var p=ZW;var zHe=p.Object({bundle:p.Optional(p.Object({encoding:p.String(),filename:p.String(),mimetype:p.String()})),generated_bundle_id:p.Optional(p.Object({value:p.String()})),overwrite:p.Object({value:p.String()}),remove_graft:p.Optional(p.Object({value:p.String()})),start_block:p.Optional(p.Object({value:p.String()})),graft_from:p.Optional(p.Object({value:p.String()})),description:p.Optional(p.Object({value:p.String({maxLength:500})}))}),v1=p.Object({name:p.String({pattern:/^[a-zA-Z][\w-]*$/.source,errorMessage:"Subgraph name must begin with a letter and contain only letters, numbers, hyphens, and underscores"}),version_label:p.String({pattern:/^[a-zA-Z0-9][\w+.-]*$/.source,errorMessage:"Subgraph version must begin with a letter or number and contain only letters, numbers, hyphens, underscores, and periods"})}),GHe={params:v1,body:zHe},VHe=p.Object({bundle:p.String()}),XHe={body:VHe},WHe=p.Object({cursor:p.String()}),HHe={body:WHe},KHe=p.Object({target_version:p.Optional(p.String())}),ZHe={body:KHe,params:v1},YHe={params:v1},JHe=p.Object({id:p.String(),created_at:p.Number(),deployment_id:p.String(),health:p.String(),synced:p.Boolean(),fatal_error:p.Optional(p.String()),non_fatal_errors:p.Optional(p.Array(p.String())),indexing_progress:p.Optional(p.Object({network:p.String(),progress_percent:p.Number(),chain_head_block:p.Number(),deployment_head_block:p.Number(),deployment_start_block:p.Number(),synced:p.Boolean()}))}),QHe=p.Object({name:p.String(),version:p.String(),tag:p.Optional(p.Object({target_version:p.Optional(p.String())})),health:p.String(),synced:p.Boolean(),graphql_endpoint:p.String(),private_graphql_endpoint:p.String(),deployments:p.Array(JHe),network:p.String(),status:p.Enum({Active:"Active",Paused:"Paused"}),private_endpoint_enabled:p.Boolean(),public_endpoint_enabled:p.Boolean(),description:p.Optional(p.String())}),e7e=p.Object({name:p.String()}),t7e={params:e7e},r7e=p.Object({name:p.String(),version_label:p.String()}),n7e={params:r7e},Ome=["error","warn","info","debug"],i7e=p.Object({name:p.String(),version_label:p.String()}),s7e=p.Object({cursor:p.Optional(p.Number()),after:p.Optional(p.Number()),direction:p.Optional(p.Union([p.Literal("asc"),p.Literal("desc")])),log_level:p.Optional(p.String({enum:Ome})),log_levels:p.Optional(p.String())}),o7e={params:i7e,querystring:s7e},a7e={},c7e={},l7e=p.Object({name:p.String(),description:p.String(),version:p.String(),ipfsHash:p.String(),url:p.String(),network:p.String()}),u7e={body:l7e},Fme=p.Object({}),d7e={params:v1,body:Fme},p7e=p.Object({generated_bundle_id:p.String(),name:p.String(),version:p.String()}),m7e=p.Object({data:QHe}),f7e={body:p7e,response:{200:m7e}},Tme=p.Object({public_endpoint_enabled:p.Optional(p.Boolean()),private_endpoint_enabled:p.Optional(p.Boolean()),description:p.Optional(p.String({maxLength:500}))}),h7e={params:v1,body:Tme};var io={};eu(io,{ApiFetch:()=>NH,FormData:()=>HZe,delete_:()=>qhe,get:()=>Nhe,getPath:()=>The,hasAuth:()=>GZe,post:()=>Lhe,put:()=>Bhe,setApiClientAndVersion:()=>XZe,setApiHost:()=>WZe,setAuth:()=>VZe});function _1(e,t){return function(){return e.apply(t,arguments)}}var{toString:g7e}=Object.prototype,{getPrototypeOf:QW}=Object,aB=(e=>t=>{let r=g7e.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),GS=e=>(e=e.toLowerCase(),t=>aB(t)===e),cB=e=>t=>typeof t===e,{isArray:mD}=Array,w1=cB("undefined");function y7e(e){return e!==null&&!w1(e)&&e.constructor!==null&&!w1(e.constructor)&&k0(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Bme=GS("ArrayBuffer");function b7e(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Bme(e.buffer),t}var S7e=cB("string"),k0=cB("function"),Lme=cB("number"),lB=e=>e!==null&&typeof e=="object",v7e=e=>e===!0||e===!1,oB=e=>{if(aB(e)!=="object")return!1;let t=QW(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},_7e=GS("Date"),w7e=GS("File"),C7e=GS("Blob"),x7e=GS("FileList"),E7e=e=>lB(e)&&k0(e.pipe),A7e=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||k0(e.append)&&((t=aB(e))==="formdata"||t==="object"&&k0(e.toString)&&e.toString()==="[object FormData]"))},D7e=GS("URLSearchParams"),k7e=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function C1(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),mD(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 jme(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 Mme=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),$me=e=>!w1(e)&&e!==Mme;function JW(){let{caseless:e}=$me(this)&&this||{},t={},r=(n,i)=>{let s=e&&jme(t,i)||i;oB(t[s])&&oB(n)?t[s]=JW(t[s],n):oB(n)?t[s]=JW({},n):mD(n)?t[s]=n.slice():t[s]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&C1(arguments[n],r);return t}var P7e=(e,t,r,{allOwnKeys:n}={})=>(C1(t,(i,s)=>{r&&k0(i)?e[s]=_1(i,r):e[s]=i},{allOwnKeys:n}),e),I7e=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),R7e=(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)},O7e=(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&&QW(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},F7e=(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},T7e=e=>{if(!e)return null;if(mD(e))return e;let t=e.length;if(!Lme(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},N7e=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&QW(Uint8Array)),q7e=(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])}},B7e=(e,t)=>{let r,n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},L7e=GS("HTMLFormElement"),j7e=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),Nme=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),M7e=GS("RegExp"),Ume=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};C1(r,(i,s)=>{t(i,s,e)!==!1&&(n[s]=i)}),Object.defineProperties(e,n)},$7e=e=>{Ume(e,(t,r)=>{if(k0(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=e[r];if(!!k0(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+"'")})}})},U7e=(e,t)=>{let r={},n=i=>{i.forEach(s=>{r[s]=!0})};return mD(e)?n(e):n(String(e).split(t)),r},z7e=()=>{},G7e=(e,t)=>(e=+e,Number.isFinite(e)?e:t),YW="abcdefghijklmnopqrstuvwxyz",qme="0123456789",zme={DIGIT:qme,ALPHA:YW,ALPHA_DIGIT:YW+YW.toUpperCase()+qme},V7e=(e=16,t=zme.ALPHA_DIGIT)=>{let r="",{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function X7e(e){return!!(e&&k0(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var W7e=e=>{let t=new Array(10),r=(n,i)=>{if(lB(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[i]=n;let s=mD(n)?[]:{};return C1(n,(o,a)=>{let c=r(o,i+1);!w1(c)&&(s[a]=c)}),t[i]=void 0,s}}return n};return r(e,0)},H7e=GS("AsyncFunction"),K7e=e=>e&&(lB(e)||k0(e))&&k0(e.then)&&k0(e.catch),at={isArray:mD,isArrayBuffer:Bme,isBuffer:y7e,isFormData:A7e,isArrayBufferView:b7e,isString:S7e,isNumber:Lme,isBoolean:v7e,isObject:lB,isPlainObject:oB,isUndefined:w1,isDate:_7e,isFile:w7e,isBlob:C7e,isRegExp:M7e,isFunction:k0,isStream:E7e,isURLSearchParams:D7e,isTypedArray:N7e,isFileList:x7e,forEach:C1,merge:JW,extend:P7e,trim:k7e,stripBOM:I7e,inherits:R7e,toFlatObject:O7e,kindOf:aB,kindOfTest:GS,endsWith:F7e,toArray:T7e,forEachEntry:q7e,matchAll:B7e,isHTMLForm:L7e,hasOwnProperty:Nme,hasOwnProp:Nme,reduceDescriptors:Ume,freezeMethods:$7e,toObjectSet:U7e,toCamelCase:j7e,noop:z7e,toFiniteNumber:G7e,findKey:jme,global:Mme,isContextDefined:$me,ALPHABET:zme,generateString:V7e,isSpecCompliantForm:X7e,toJSONObject:W7e,isAsyncFn:H7e,isThenable:K7e};function fD(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)}at.inherits(fD,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:at.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Gme=fD.prototype,Vme={};["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=>{Vme[e]={value:e}});Object.defineProperties(fD,Vme);Object.defineProperty(Gme,"isAxiosError",{value:!0});fD.from=(e,t,r,n,i,s)=>{let o=Object.create(Gme);return at.toFlatObject(e,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),fD.call(o,e.message,t,r,n,i),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};var Vu=fD;var Afe=Kl(uH(),1),pB=Afe.default;function dH(e){return at.isPlainObject(e)||at.isArray(e)}function kfe(e){return at.endsWith(e,"[]")?e.slice(0,-2):e}function Dfe(e,t,r){return e?e.concat(t).map(function(i,s){return i=kfe(i),!r&&s?"["+i+"]":i}).join(r?".":""):t}function OKe(e){return at.isArray(e)&&!e.some(dH)}var FKe=at.toFlatObject(at,{},null,function(t){return/^is[A-Z]/.test(t)});function TKe(e,t,r){if(!at.isObject(e))throw new TypeError("target must be an object");t=t||new(pB||FormData),r=at.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,I){return!at.isUndefined(I[x])});let n=r.metaTokens,i=r.visitor||u,s=r.dots,o=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&at.isSpecCompliantForm(t);if(!at.isFunction(i))throw new TypeError("visitor must be a function");function l(C){if(C===null)return"";if(at.isDate(C))return C.toISOString();if(!c&&at.isBlob(C))throw new Vu("Blob is not supported. Use a Buffer instead.");return at.isArrayBuffer(C)||at.isTypedArray(C)?c&&typeof Blob=="function"?new Blob([C]):Buffer.from(C):C}function u(C,x,I){let F=C;if(C&&!I&&typeof C=="object"){if(at.endsWith(x,"{}"))x=n?x:x.slice(0,-2),C=JSON.stringify(C);else if(at.isArray(C)&&OKe(C)||(at.isFileList(C)||at.endsWith(x,"[]"))&&(F=at.toArray(C)))return x=kfe(x),F.forEach(function(M,Y){!(at.isUndefined(M)||M===null)&&t.append(o===!0?Dfe([x],Y,s):o===null?x:x+"[]",l(M))}),!1}return dH(C)?!0:(t.append(Dfe(I,x,s),l(C)),!1)}let m=[],f=Object.assign(FKe,{defaultVisitor:u,convertValue:l,isVisitable:dH});function y(C,x){if(!at.isUndefined(C)){if(m.indexOf(C)!==-1)throw Error("Circular reference detected in "+x.join("."));m.push(C),at.forEach(C,function(F,T){(!(at.isUndefined(F)||F===null)&&i.call(t,F,at.isString(T)?T.trim():T,x,f))===!0&&y(F,x?x.concat(T):[T])}),m.pop()}}if(!at.isObject(e))throw new TypeError("data must be an object");return y(e),t}var Cw=TKe;function Pfe(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Ife(e,t){this._pairs=[],e&&Cw(e,this,t)}var Rfe=Ife.prototype;Rfe.append=function(t,r){this._pairs.push([t,r])};Rfe.toString=function(t){let r=t?function(n){return t.call(this,n,Pfe)}:Pfe;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};var Ofe=Ife;function NKe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Tx(e,t,r){if(!t)return e;let n=r&&r.encode||NKe,i=r&&r.serialize,s;if(i?s=i(t,r):s=at.isURLSearchParams(t)?t.toString():new Ofe(t,r).toString(n),s){let o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}var pH=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){at.forEach(this.handlers,function(n){n!==null&&t(n)})}},mH=pH;var hD={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Ffe=Kl(require("url"),1),Tfe=Ffe.default.URLSearchParams;var kg={isNode:!0,classes:{URLSearchParams:Tfe,FormData:pB,Blob:typeof Blob<"u"&&Blob||null},protocols:["http","https","file","data"]};function fH(e,t){return Cw(e,new kg.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,s){return kg.isNode&&at.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function qKe(e){return at.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function BKe(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 LKe(e){function t(r,n,i,s){let o=r[s++],a=Number.isFinite(+o),c=s>=r.length;return o=!o&&at.isArray(i)?i.length:o,c?(at.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!a):((!i[o]||!at.isObject(i[o]))&&(i[o]=[]),t(r,n,i[o],s)&&at.isArray(i[o])&&(i[o]=BKe(i[o])),!a)}if(at.isFormData(e)&&at.isFunction(e.entries)){let r={};return at.forEachEntry(e,(n,i)=>{t(qKe(n),i,r,0)}),r}return null}var mB=LKe;var jKe={"Content-Type":void 0};function MKe(e,t,r){if(at.isString(e))try{return(t||JSON.parse)(e),at.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var fB={transitional:hD,adapter:["xhr","http"],transformRequest:[function(t,r){let n=r.getContentType()||"",i=n.indexOf("application/json")>-1,s=at.isObject(t);if(s&&at.isHTMLForm(t)&&(t=new FormData(t)),at.isFormData(t))return i&&i?JSON.stringify(mB(t)):t;if(at.isArrayBuffer(t)||at.isBuffer(t)||at.isStream(t)||at.isFile(t)||at.isBlob(t))return t;if(at.isArrayBufferView(t))return t.buffer;if(at.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 fH(t,this.formSerializer).toString();if((a=at.isFileList(t))||n.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return Cw(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||i?(r.setContentType("application/json",!1),MKe(t)):t}],transformResponse:[function(t){let r=this.transitional||fB.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(t&&at.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"?Vu.from(a,Vu.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:kg.classes.FormData,Blob:kg.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};at.forEach(["delete","get","head"],function(t){fB.headers[t]={}});at.forEach(["post","put","patch"],function(t){fB.headers[t]=at.merge(jKe)});var gD=fB;var $Ke=at.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"]),Nfe=e=>{let t={},r,n,i;return e&&e.split(`
419
419
  `).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||t[r]&&$Ke[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t};var qfe=Symbol("internals");function x1(e){return e&&String(e).trim().toLowerCase()}function hB(e){return e===!1||e==null?e:at.isArray(e)?e.map(hB):String(e)}function UKe(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 zKe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function hH(e,t,r,n,i){if(at.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!at.isString(t)){if(at.isString(n))return t.indexOf(n)!==-1;if(at.isRegExp(n))return n.test(t)}}function GKe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function VKe(e,t){let r=at.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 yD=class{constructor(t){t&&this.set(t)}set(t,r,n){let i=this;function s(a,c,l){let u=x1(c);if(!u)throw new Error("header name must be a non-empty string");let m=at.findKey(i,u);(!m||i[m]===void 0||l===!0||l===void 0&&i[m]!==!1)&&(i[m||c]=hB(a))}let o=(a,c)=>at.forEach(a,(l,u)=>s(l,u,c));return at.isPlainObject(t)||t instanceof this.constructor?o(t,r):at.isString(t)&&(t=t.trim())&&!zKe(t)?o(Nfe(t),r):t!=null&&s(r,t,n),this}get(t,r){if(t=x1(t),t){let n=at.findKey(this,t);if(n){let i=this[n];if(!r)return i;if(r===!0)return UKe(i);if(at.isFunction(r))return r.call(this,i,n);if(at.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=x1(t),t){let n=at.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||hH(this,this[n],n,r)))}return!1}delete(t,r){let n=this,i=!1;function s(o){if(o=x1(o),o){let a=at.findKey(n,o);a&&(!r||hH(n,n[a],a,r))&&(delete n[a],i=!0)}}return at.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||hH(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){let r=this,n={};return at.forEach(this,(i,s)=>{let o=at.findKey(n,s);if(o){r[o]=hB(i),delete r[s];return}let a=t?GKe(s):String(s).trim();a!==s&&delete r[s],r[a]=hB(i),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return at.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&at.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(`
420
420
  `)}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[qfe]=this[qfe]={accessors:{}}).accessors,i=this.prototype;function s(o){let a=x1(o);n[a]||(VKe(i,o),n[a]=!0)}return at.isArray(t)?t.forEach(s):s(t),this}};yD.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);at.freezeMethods(yD.prototype);at.freezeMethods(yD);var zg=yD;function E1(e,t){let r=this||gD,n=t||r,i=zg.from(n.headers),s=n.data;return at.forEach(e,function(a){s=a.call(r,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function A1(e){return!!(e&&e.__CANCEL__)}function Bfe(e,t,r){Vu.call(this,e??"canceled",Vu.ERR_CANCELED,t,r),this.name="CanceledError"}at.inherits(Bfe,Vu,{__CANCEL__:!0});var pS=Bfe;function xw(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Vu("Request failed with status code "+r.status,[Vu.ERR_BAD_REQUEST,Vu.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function gH(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function yH(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Nx(e,t){return e&&!gH(t)?yH(e,t):t}var hhe=Kl(jfe(),1),ghe=Kl(require("http"),1),yhe=Kl(require("https"),1),bhe=Kl(require("util"),1),She=Kl(rhe(),1),c_=Kl(require("zlib"),1);var jx="1.4.0";function I1(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var AZe=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function EH(e,t,r){let n=r&&r.Blob||kg.classes.Blob,i=I1(e);if(t===void 0&&n&&(t=!0),i==="data"){e=i.length?e.slice(i.length+1):e;let s=AZe.exec(e);if(!s)throw new Vu("Invalid URL",Vu.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 Vu("Blob is not supported",Vu.ERR_NOT_SUPPORT);return new n([l],{type:o})}return l}throw new Vu("Unsupported protocol "+i,Vu.ERR_NOT_SUPPORT)}var Mx=Kl(require("stream"),1);var ihe=Kl(require("stream"),1);function DZe(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 nhe=DZe;function kZe(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 m=s,f=0;for(;m!==i;)f+=r[m++],m=m%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),l-o<t)return;let y=u&&l-u;return y?Math.round(f*1e3/y):void 0}}var vB=kZe;var _B=Symbol("internals"),AH=class extends ihe.default.Transform{constructor(t){t=at.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(a,c)=>!at.isUndefined(c[a])),super({readableHighWaterMark:t.chunkSize});let r=this,n=this[_B]={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=vB(n.ticksRate*t.samplesCount,n.timeWindow);this.on("newListener",a=>{a==="progress"&&(n.isCaptured||(n.isCaptured=!0))});let s=0;n.updateProgress=nhe(function(){let c=n.length,l=n.bytesSeen,u=l-s;if(!u||r.destroyed)return;let m=i(u);s=l,process.nextTick(()=>{r.emit("progress",{loaded:l,total:c,progress:c?l/c:void 0,bytes:u,rate:m||void 0,estimated:m&&c&&l<=c?(c-l)/m:void 0})})},n.ticksRate);let o=()=>{n.updateProgress(!0)};this.once("end",o),this.once("error",o)}_read(t){let r=this[_B];return r.onReadCallback&&r.onReadCallback(),super._read(t)}_transform(t,r,n){let i=this,s=this[_B],o=s.maxRate,a=this.readableHighWaterMark,c=s.timeWindow,l=1e3/c,u=o/l,m=s.minChunkSize!==!1?Math.max(s.minChunkSize,u*.01):0;function f(C,x){let I=Buffer.byteLength(C);s.bytesSeen+=I,s.bytes+=I,s.isCaptured&&s.updateProgress(),i.push(C)?process.nextTick(x):s.onReadCallback=()=>{s.onReadCallback=null,process.nextTick(x)}}let y=(C,x)=>{let I=Buffer.byteLength(C),F=null,T=a,M,Y=0;if(o){let de=Date.now();(!s.ts||(Y=de-s.ts)>=c)&&(s.ts=de,M=u-s.bytes,s.bytes=M<0?-M:0,Y=0),M=u-s.bytes}if(o){if(M<=0)return setTimeout(()=>{x(null,C)},c-Y);M<T&&(T=M)}T&&I>T&&I-T>m&&(F=C.subarray(T),C=C.subarray(0,T)),f(C,F?()=>{process.nextTick(x,null,F)}:x)};y(t,function C(x,I){if(x)return n(x);I?y(I,C):n(null)})}setLength(t){return this[_B].length=+t,this}},DH=AH;var vhe=Kl(require("events"),1);var ohe=require("util"),ahe=require("stream");var{asyncIterator:she}=Symbol,PZe=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[she]?yield*e[she]():yield e},wB=PZe;var IZe=at.ALPHABET.ALPHA_DIGIT+"-_",R1=new ohe.TextEncoder,Ew=`\r
421
- `,RZe=R1.encode(Ew),OZe=2,kH=class{constructor(t,r){let{escapeName:n}=this.constructor,i=at.isString(r),s=`Content-Disposition: form-data; name="${n(t)}"${!i&&r.name?`; filename="${n(r.name)}"`:""}${Ew}`;i?r=R1.encode(String(r).replace(/\r?\n|\r\n?/g,Ew)):s+=`Content-Type: ${r.type||"application/octet-stream"}${Ew}`,this.headers=R1.encode(s+Ew),this.contentLength=i?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+OZe,this.name=t,this.value=r}async*encode(){yield this.headers;let{value:t}=this;at.isTypedArray(t)?yield t:yield*wB(t),yield RZe}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},FZe=(e,t,r)=>{let{tag:n="form-data-boundary",size:i=25,boundary:s=n+"-"+at.generateString(i,IZe)}=r||{};if(!at.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=R1.encode("--"+s+Ew),a=R1.encode("--"+s+"--"+Ew+Ew),c=a.byteLength,l=Array.from(e.entries()).map(([m,f])=>{let y=new kH(m,f);return c+=y.size,y});c+=o.byteLength*l.length,c=at.toFiniteNumber(c);let u={"Content-Type":`multipart/form-data; boundary=${s}`};return Number.isFinite(c)&&(u["Content-Length"]=c),t&&t(u),ahe.Readable.from(async function*(){for(let m of l)yield o,yield*m.encode();yield a}())},che=FZe;var lhe=Kl(require("stream"),1),PH=class extends lhe.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)}},uhe=PH;var TZe=(e,t)=>at.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,dhe=TZe;var phe={flush:c_.default.constants.Z_SYNC_FLUSH,finishFlush:c_.default.constants.Z_SYNC_FLUSH},NZe={flush:c_.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:c_.default.constants.BROTLI_OPERATION_FLUSH},mhe=at.isFunction(c_.default.createBrotliDecompress),{http:qZe,https:BZe}=She.default,LZe=/https:?/,fhe=kg.protocols.map(e=>e+":");function jZe(e){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e)}function _he(e,t,r){let n=t;if(!n&&n!==!1){let i=(0,hhe.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){_he(s,t,s.href)}}var MZe=typeof process<"u"&&at.kindOf(process)==="process",$Ze=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)}),whe=MZe&&function(t){return $Ze(async function(n,i,s){let{data:o,lookup:a,family:c}=t,{responseType:l,responseEncoding:u}=t,m=t.method.toUpperCase(),f,y=!1,C;a&&at.isAsyncFn(a)&&(a=dhe(a,Bl=>{if(at.isString(Bl))Bl=[Bl,Bl.indexOf(".")<0?6:4];else if(!at.isArray(Bl))throw new TypeError("lookup async function must return an array [ip: string, family: number]]");return Bl}));let x=new vhe.default,I=()=>{t.cancelToken&&t.cancelToken.unsubscribe(F),t.signal&&t.signal.removeEventListener("abort",F),x.removeAllListeners()};s((Bl,Su)=>{f=!0,Su&&(y=!0,I())});function F(Bl){x.emit("abort",!Bl||Bl.type?new pS(null,t,C):Bl)}x.once("abort",i),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(F),t.signal&&(t.signal.aborted?F():t.signal.addEventListener("abort",F)));let T=Nx(t.baseURL,t.url),M=new URL(T,"http://localhost"),Y=M.protocol||fhe[0];if(Y==="data:"){let Bl;if(m!=="GET")return xw(n,i,{status:405,statusText:"method not allowed",headers:{},config:t});try{Bl=EH(t.url,l==="blob",{Blob:t.env&&t.env.Blob})}catch(Su){throw Vu.from(Su,Vu.ERR_BAD_REQUEST,t)}return l==="text"?(Bl=Bl.toString(u),(!u||u==="utf8")&&(Bl=at.stripBOM(Bl))):l==="stream"&&(Bl=Mx.default.Readable.from(Bl)),xw(n,i,{data:Bl,status:200,statusText:"OK",headers:new zg,config:t})}if(fhe.indexOf(Y)===-1)return i(new Vu("Unsupported protocol "+Y,Vu.ERR_BAD_REQUEST,t));let de=zg.from(t.headers).normalize();de.set("User-Agent","axios/"+jx,!1);let Fn=t.onDownloadProgress,ql=t.onUploadProgress,To=t.maxRate,Jl,Go;if(at.isSpecCompliantForm(o)){let Bl=de.getContentType(/boundary=([-_\w\d]{10,70})/i);o=che(o,Su=>{de.set(Su)},{tag:`axios-${jx}-boundary`,boundary:Bl&&Bl[1]||void 0})}else if(at.isFormData(o)&&at.isFunction(o.getHeaders)){if(de.set(o.getHeaders()),!de.hasContentLength())try{let Bl=await bhe.default.promisify(o.getLength).call(o);Number.isFinite(Bl)&&Bl>=0&&de.setContentLength(Bl)}catch{}}else if(at.isBlob(o))o.size&&de.setContentType(o.type||"application/octet-stream"),de.setContentLength(o.size||0),o=Mx.default.Readable.from(wB(o));else if(o&&!at.isStream(o)){if(!Buffer.isBuffer(o))if(at.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else if(at.isString(o))o=Buffer.from(o,"utf-8");else return i(new Vu("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Vu.ERR_BAD_REQUEST,t));if(de.setContentLength(o.length,!1),t.maxBodyLength>-1&&o.length>t.maxBodyLength)return i(new Vu("Request body larger than maxBodyLength limit",Vu.ERR_BAD_REQUEST,t))}let vr=at.toFiniteNumber(de.getContentLength());at.isArray(To)?(Jl=To[0],Go=To[1]):Jl=Go=To,o&&(ql||Jl)&&(at.isStream(o)||(o=Mx.default.Readable.from(o,{objectMode:!1})),o=Mx.default.pipeline([o,new DH({length:vr,maxRate:at.toFiniteNumber(Jl)})],at.noop),ql&&o.on("progress",Bl=>{ql(Object.assign(Bl,{upload:!0}))}));let ns;if(t.auth){let Bl=t.auth.username||"",Su=t.auth.password||"";ns=Bl+":"+Su}if(!ns&&M.username){let Bl=M.username,Su=M.password;ns=Bl+":"+Su}ns&&de.delete("authorization");let Yl;try{Yl=Tx(M.pathname+M.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(Bl){let Su=new Error(Bl.message);return Su.config=t,Su.url=t.url,Su.exists=!0,i(Su)}de.set("Accept-Encoding","gzip, compress, deflate"+(mhe?", br":""),!1);let Ql={path:Yl,method:m,headers:de.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:ns,protocol:Y,family:c,lookup:a,beforeRedirect:jZe,beforeRedirects:{}};t.socketPath?Ql.socketPath=t.socketPath:(Ql.hostname=M.hostname,Ql.port=M.port,_he(Ql,t.proxy,Y+"//"+M.hostname+(M.port?":"+M.port:"")+Ql.path));let Nu,nd=LZe.test(Ql.protocol);if(Ql.agent=nd?t.httpsAgent:t.httpAgent,t.transport?Nu=t.transport:t.maxRedirects===0?Nu=nd?yhe.default:ghe.default:(t.maxRedirects&&(Ql.maxRedirects=t.maxRedirects),t.beforeRedirect&&(Ql.beforeRedirects.config=t.beforeRedirect),Nu=nd?BZe:qZe),t.maxBodyLength>-1?Ql.maxBodyLength=t.maxBodyLength:Ql.maxBodyLength=1/0,t.insecureHTTPParser&&(Ql.insecureHTTPParser=t.insecureHTTPParser),C=Nu.request(Ql,function(Su){if(C.destroyed)return;let Ym=[Su],ap=+Su.headers["content-length"];if(Fn){let Dd=new DH({length:at.toFiniteNumber(ap),maxRate:at.toFiniteNumber(Go)});Fn&&Dd.on("progress",Xl=>{Fn(Object.assign(Xl,{download:!0}))}),Ym.push(Dd)}let vf=Su,Ah=Su.req||C;if(t.decompress!==!1&&Su.headers["content-encoding"])switch((m==="HEAD"||Su.statusCode===204)&&delete Su.headers["content-encoding"],Su.headers["content-encoding"]){case"gzip":case"x-gzip":case"compress":case"x-compress":Ym.push(c_.default.createUnzip(phe)),delete Su.headers["content-encoding"];break;case"deflate":Ym.push(new uhe),Ym.push(c_.default.createUnzip(phe)),delete Su.headers["content-encoding"];break;case"br":mhe&&(Ym.push(c_.default.createBrotliDecompress(NZe)),delete Su.headers["content-encoding"])}vf=Ym.length>1?Mx.default.pipeline(Ym,at.noop):Ym[0];let lo=Mx.default.finished(vf,()=>{lo(),I()}),uo={status:Su.statusCode,statusText:Su.statusMessage,headers:new zg(Su.headers),config:t,request:Ah};if(l==="stream")uo.data=vf,xw(n,i,uo);else{let Dd=[],Xl=0;vf.on("data",function(pd){Dd.push(pd),Xl+=pd.length,t.maxContentLength>-1&&Xl>t.maxContentLength&&(y=!0,vf.destroy(),i(new Vu("maxContentLength size of "+t.maxContentLength+" exceeded",Vu.ERR_BAD_RESPONSE,t,Ah)))}),vf.on("aborted",function(){if(y)return;let pd=new Vu("maxContentLength size of "+t.maxContentLength+" exceeded",Vu.ERR_BAD_RESPONSE,t,Ah);vf.destroy(pd),i(pd)}),vf.on("error",function(pd){C.destroyed||i(Vu.from(pd,null,t,Ah))}),vf.on("end",function(){try{let pd=Dd.length===1?Dd[0]:Buffer.concat(Dd);l!=="arraybuffer"&&(pd=pd.toString(u),(!u||u==="utf8")&&(pd=at.stripBOM(pd))),uo.data=pd}catch(pd){i(Vu.from(pd,null,t,uo.request,uo))}xw(n,i,uo)})}x.once("abort",Dd=>{vf.destroyed||(vf.emit("error",Dd),vf.destroy())})}),x.once("abort",Bl=>{i(Bl),C.destroy(Bl)}),C.on("error",function(Su){i(Vu.from(Su,null,t,C))}),C.on("socket",function(Su){Su.setKeepAlive(!0,1e3*60)}),t.timeout){let Bl=parseInt(t.timeout,10);if(isNaN(Bl)){i(new Vu("error trying to parse `config.timeout` to int",Vu.ERR_BAD_OPTION_VALUE,t,C));return}C.setTimeout(Bl,function(){if(f)return;let Ym=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",ap=t.transitional||hD;t.timeoutErrorMessage&&(Ym=t.timeoutErrorMessage),i(new Vu(Ym,ap.clarifyTimeoutError?Vu.ETIMEDOUT:Vu.ECONNABORTED,t,C)),F()})}if(at.isStream(o)){let Bl=!1,Su=!1;o.on("end",()=>{Bl=!0}),o.once("error",Ym=>{Su=!0,C.destroy(Ym)}),o.on("close",()=>{!Bl&&!Su&&F(new pS("Request stream has been aborted",t,C))}),o.pipe(C)}else C.end(o)})};var Che=kg.isStandardBrowserEnv?function(){return{write:function(r,n,i,s,o,a){let c=[];c.push(r+"="+encodeURIComponent(n)),at.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),at.isString(s)&&c.push("path="+s),at.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 xhe=kg.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=at.isString(o)?i(o):o;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}();function Ehe(e,t){let r=0,n=vB(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 UZe=typeof XMLHttpRequest<"u",Ahe=UZe&&function(e){return new Promise(function(r,n){let i=e.data,s=zg.from(e.headers).normalize(),o=e.responseType,a;function c(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}at.isFormData(i)&&(kg.isStandardBrowserEnv||kg.isStandardBrowserWebWorkerEnv?s.setContentType(!1):s.setContentType("multipart/form-data;",!1));let l=new XMLHttpRequest;if(e.auth){let y=e.auth.username||"",C=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(y+":"+C))}let u=Nx(e.baseURL,e.url);l.open(e.method.toUpperCase(),Tx(u,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function m(){if(!l)return;let y=zg.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),x={data:!o||o==="text"||o==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:y,config:e,request:l};xw(function(F){r(F),c()},function(F){n(F),c()},x),l=null}if("onloadend"in l?l.onloadend=m:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(m)},l.onabort=function(){!l||(n(new Vu("Request aborted",Vu.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new Vu("Network Error",Vu.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let C=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",x=e.transitional||hD;e.timeoutErrorMessage&&(C=e.timeoutErrorMessage),n(new Vu(C,x.clarifyTimeoutError?Vu.ETIMEDOUT:Vu.ECONNABORTED,e,l)),l=null},kg.isStandardBrowserEnv){let y=(e.withCredentials||xhe(u))&&e.xsrfCookieName&&Che.read(e.xsrfCookieName);y&&s.set(e.xsrfHeaderName,y)}i===void 0&&s.setContentType(null),"setRequestHeader"in l&&at.forEach(s.toJSON(),function(C,x){l.setRequestHeader(x,C)}),at.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),o&&o!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",Ehe(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",Ehe(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=y=>{!l||(n(!y||y.type?new pS(null,e,l):y),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));let f=I1(u);if(f&&kg.protocols.indexOf(f)===-1){n(new Vu("Unsupported protocol "+f+":",Vu.ERR_BAD_REQUEST,e));return}l.send(i||null)})};var CB={http:whe,xhr:Ahe};at.forEach(CB,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var Dhe={getAdapter:e=>{e=at.isArray(e)?e:[e];let{length:t}=e,r,n;for(let i=0;i<t&&(r=e[i],!(n=at.isString(r)?CB[r.toLowerCase()]:r));i++);if(!n)throw n===!1?new Vu(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(at.hasOwnProp(CB,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`);if(!at.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:CB};function IH(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pS(null,e)}function xB(e){return IH(e),e.headers=zg.from(e.headers),e.data=E1.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Dhe.getAdapter(e.adapter||gD.adapter)(e).then(function(n){return IH(e),n.data=E1.call(e,e.transformResponse,n),n.headers=zg.from(n.headers),n},function(n){return A1(n)||(IH(e),n&&n.response&&(n.response.data=E1.call(e,e.transformResponse,n.response),n.response.headers=zg.from(n.response.headers))),Promise.reject(n)})}var khe=e=>e instanceof zg?e.toJSON():e;function l_(e,t){t=t||{};let r={};function n(l,u,m){return at.isPlainObject(l)&&at.isPlainObject(u)?at.merge.call({caseless:m},l,u):at.isPlainObject(u)?at.merge({},u):at.isArray(u)?u.slice():u}function i(l,u,m){if(at.isUndefined(u)){if(!at.isUndefined(l))return n(void 0,l,m)}else return n(l,u,m)}function s(l,u){if(!at.isUndefined(u))return n(void 0,u)}function o(l,u){if(at.isUndefined(u)){if(!at.isUndefined(l))return n(void 0,l)}else return n(void 0,u)}function a(l,u,m){if(m in t)return n(l,u);if(m 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(khe(l),khe(u),!0)};return at.forEach(Object.keys(Object.assign({},e,t)),function(u){let m=c[u]||i,f=m(e[u],t[u],u);at.isUndefined(f)&&m!==a||(r[u]=f)}),r}var RH={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{RH[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var Phe={};RH.transitional=function(t,r,n){function i(s,o){return"[Axios v"+jx+"] Transitional option '"+s+"'"+o+(n?". "+n:"")}return(s,o,a)=>{if(t===!1)throw new Vu(i(o," has been removed"+(r?" in "+r:"")),Vu.ERR_DEPRECATED);return r&&!Phe[o]&&(Phe[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 zZe(e,t,r){if(typeof e!="object")throw new Vu("options must be an object",Vu.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 Vu("option "+s+" must be "+c,Vu.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Vu("Unknown option "+s,Vu.ERR_BAD_OPTION)}}var EB={assertOptions:zZe,validators:RH};var Aw=EB.validators,wD=class{constructor(t){this.defaults=t,this.interceptors={request:new mH,response:new mH}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=l_(this.defaults,r);let{transitional:n,paramsSerializer:i,headers:s}=r;n!==void 0&&EB.assertOptions(n,{silentJSONParsing:Aw.transitional(Aw.boolean),forcedJSONParsing:Aw.transitional(Aw.boolean),clarifyTimeoutError:Aw.transitional(Aw.boolean)},!1),i!=null&&(at.isFunction(i)?r.paramsSerializer={serialize:i}:EB.assertOptions(i,{encode:Aw.function,serialize:Aw.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o;o=s&&at.merge(s.common,s[r.method]),o&&at.forEach(["delete","get","head","post","put","patch","common"],C=>{delete s[C]}),r.headers=zg.concat(o,s);let a=[],c=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(r)===!1||(c=c&&x.synchronous,a.unshift(x.fulfilled,x.rejected))});let l=[];this.interceptors.response.forEach(function(x){l.push(x.fulfilled,x.rejected)});let u,m=0,f;if(!c){let C=[xB.bind(this),void 0];for(C.unshift.apply(C,a),C.push.apply(C,l),f=C.length,u=Promise.resolve(r);m<f;)u=u.then(C[m++],C[m++]);return u}f=a.length;let y=r;for(m=0;m<f;){let C=a[m++],x=a[m++];try{y=C(y)}catch(I){x.call(this,I);break}}try{u=xB.call(this,y)}catch(C){return Promise.reject(C)}for(m=0,f=l.length;m<f;)u=u.then(l[m++],l[m++]);return u}getUri(t){t=l_(this.defaults,t);let r=Nx(t.baseURL,t.url);return Tx(r,t.params,t.paramsSerializer)}};at.forEach(["delete","get","head","options"],function(t){wD.prototype[t]=function(r,n){return this.request(l_(n||{},{method:t,url:r,data:(n||{}).data}))}});at.forEach(["post","put","patch"],function(t){function r(n){return function(s,o,a){return this.request(l_(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}wD.prototype[t]=r(),wD.prototype[t+"Form"]=r(!0)});var O1=wD;var F1=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 pS(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 F1(function(i){t=i}),cancel:t}}},Ihe=F1;function OH(e){return function(r){return e.apply(null,r)}}function FH(e){return at.isObject(e)&&e.isAxiosError===!0}var TH={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(TH).forEach(([e,t])=>{TH[t]=e});var Rhe=TH;function Ohe(e){let t=new O1(e),r=_1(O1.prototype.request,t);return at.extend(r,O1.prototype,t,{allOwnKeys:!0}),at.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return Ohe(l_(e,i))},r}var Gg=Ohe(gD);Gg.Axios=O1;Gg.CanceledError=pS;Gg.CancelToken=Ihe;Gg.isCancel=A1;Gg.VERSION=jx;Gg.toFormData=Cw;Gg.AxiosError=Vu;Gg.Cancel=Gg.CanceledError;Gg.all=function(t){return Promise.all(t)};Gg.spread=OH;Gg.isAxiosError=FH;Gg.mergeConfig=l_;Gg.AxiosHeaders=zg;Gg.formToJSON=e=>mB(at.isHTMLForm(e)?new FormData(e):e);Gg.HttpStatusCode=Rhe;Gg.default=Gg;var my=Gg;var{Axios:GOr,AxiosError:VOr,CanceledError:XOr,isCancel:WOr,CancelToken:HOr,VERSION:KOr,all:ZOr,Cancel:YOr,isAxiosError:JOr,spread:QOr,toFormData:eFr,AxiosHeaders:tFr,HttpStatusCode:rFr,formToJSON:nFr,mergeConfig:iFr}=my;var Fhe=Kl(uH());function GZe(){return Boolean(my.defaults.headers.common.Authorization)}function VZe(e){my.defaults.headers.common.Authorization=e}function XZe(e,t){my.defaults.headers.common["x-api-client"]=e,my.defaults.headers.common["x-api-client-version"]=t}var $x="https://goldsky.com";function WZe(e){$x=e}function The(e,t,r=$x){return`${r}${typeof e=="string"?e:e(t)}`}function HZe(){return new Fhe.default}async function Nhe(e,t,r=$x){return AB(e,"get",t||{},r)}async function qhe(e,t,r=$x){return AB(e,"delete",t||{},r)}async function Bhe(e,t,r=$x){return AB(e,"put",t||{},r)}async function Lhe(e,t,r=$x){return AB(e,"post",t||{},r)}async function AB(e,t,r,n=$x){var s;let i=Od(po(po(po({url:The(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 my.request(i);return o.status<200||o.status>=300?o.status>500?[{statusCode:o.status,error:o.statusText,message:o.data instanceof Error?o.data.toString():JSON.stringify(o.data)},{},null]:"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,null]:[{statusCode:o.data.statusCode||o.status,error:o.data.error||o.statusText,message:o.data instanceof Error?o.data.toString():o.data.message||JSON.stringify(o.data)},o.data,null]:[null,o.data||{},{statusCode:o.status,message:o.data.message||""}]}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},{},null]}}var NH=class{constructor(t){due(this,"host");this.host=t}async get(t,r){return Nhe(t,r,this.host)}async delete(t,r){return qhe(t,r,this.host)}async put(t,r){return Bhe(t,r,this.host)}async post(t,r){return Lhe(t,r,this.host)}};var cFr=p.Object({name:p.String(),webhookUrl:p.String(),entity:p.String(),secret:p.Optional(p.String()),numRetries:p.Optional(p.Number()),retryIntervalSeconds:p.Optional(p.Number()),retryTimeoutSeconds:p.Optional(p.Number())}),lFr=p.Object({subgraphName:p.String(),subgraphVersion:p.String()});var uFr=p.Object({data:p.Object({webhookSecret:p.String(),id:p.String(),name:p.String()})}),dFr=p.Object({name:p.String()});var pFr=p.Object({data:p.Object({})}),KZe=p.Object({id:p.String(),name:p.String(),webhookUrl:p.String(),entity:p.String(),subgraphName:p.String(),subgraphVersion:p.String(),created_at:p.Number()}),mFr=p.Object({data:p.Array(KZe)}),ZZe=p.Object({name:p.String(),rows:p.String(),columns:p.Array(p.Object({name:p.String(),dataType:p.String()}))}),fFr=p.Object({data:p.Array(ZZe)}),hFr=p.Object({subgraphName:p.String(),subgraphVersion:p.String()});var yFr=p.Object({id:p.String(),name:p.String(),description:p.String(),base_price_decimal:p.String(),features:p.Array(p.String()),isHidden:p.Boolean()}),bFr=p.Object({id:p.String(),latestInvoice:p.Union([p.String(),p.Null()]),cancelAtPeriodEnd:p.Boolean(),product:p.Object({id:p.String(),name:p.String(),description:p.Union([p.String(),p.Null()]),basePrice:p.Object({amount:p.Union([p.String(),p.Null()]),interval:p.String()}),metadata:p.Record(p.String(),p.String())})}),SFr=p.Object({productId:p.String(),subscriptionId:p.Optional(p.String())}),vFr=p.Object({clientSecret:p.String(),customerId:p.String(),stripePublicKey:p.String()});var _Fr=p.Object({productId:p.String(),customerId:p.String(),paymentMethod:p.String(),promoCode:p.Optional(p.String())}),wFr=p.Object({subscriptionId:p.String()});var CFr=p.Object({newPaymentMethodId:p.String()});var xFr=p.Object({});var EFr=p.Object({});var JZe=p.Object({id:p.String(),number:p.String(),pdf:p.Optional(p.String()),total:p.Number(),period:p.Object({start:p.Number(),end:p.Optional(p.Number())})}),AFr=p.Object({invoices:p.Array(JZe)});var DFr=p.Object({usageInCents:p.Number(),totalCreditsInCents:p.Optional(p.Number())}),jhe=p.Object({subgraphsLimit:p.Number(),webhooksLimit:p.Number(),mirrorStreamsLimit:p.Number(),fusionStreamsLimit:p.Number(),enterprise:p.Boolean(),starterPlanPaused:p.Boolean()}),QZe=p.Object({period:p.Object({start:p.Number(),end:p.Optional(p.Number())}),totalUsage:p.Number(),usagePrice:p.Number()}),eYe=p.Object({usageRecords:p.Array(QZe),priceName:p.String()}),tYe=p.Object({latestUsage:p.Number(),maxFreeUsage:p.Number(),remainingFreeUsage:p.Number(),priceName:p.String()}),kFr=p.Object({priceSummaries:p.Array(tYe),billingPeriodEnd:p.Number(),starterPlanPaused:p.Boolean()});var PFr=p.Object({priceSummaries:p.Array(eYe),billingPeriodEnd:p.Number()});var nYe=p.Union([p.Literal("1d"),p.Literal("6h"),p.Literal("1h")]),RFr=p.Object({from:p.String(),to:p.String(),bucketSize:nYe,timeZone:p.String()}),OFr=p.Object({id:p.String()}),FFr=p.Object({deployment_id:p.String()}),TFr=p.Object({referenceName:p.String(),streamName:p.String(),streamVersion:p.String()}),NFr=p.Object({data:p.Array(p.Object({time:p.Number(),value:p.Number()}))});var iYe=p.Object({handler:p.String(),data:p.Array(p.Object({time:p.Number(),averageHandlerTime:p.Number(),handlerCount:p.Number()}))}),qFr=p.Object({data:p.Array(iYe)});var oYe=p.Union([p.Literal("sales"),p.Literal("support")]),LFr=p.Object({message:p.String(),recipient:oYe}),jFr=p.Object({success:p.Boolean()});var Qn={};eu(Qn,{AllResourceSizes:()=>s7,AllSinksRootTypebox:()=>i7,AllSinksTypebox:()=>Gx,AllSinksTypeboxV3:()=>Wx,AllSourcesRootTypebox:()=>MH,AllSourcesTypebox:()=>N1,AllSourcesTypeboxV3:()=>Vx,AllStreamCliOuputFormats:()=>uYe,AllStreamStatusValidAtCreate:()=>dYe,AllStreamStatuses:()=>uL,AllTransformsRootTypebox:()=>zH,AllTransformsTypebox:()=>zx,AllTransformsTypeboxV3:()=>Xx,BlackholeSinkRootTypebox:()=>r7,BlackholeSinkTypebox:()=>UB,BlackholeSinkTypeboxV3:()=>cL,ClickHouseArchiveStorageRootTypebox:()=>$he,ClickHouseArchiveStorageRootTypeboxV3:()=>lYe,ClickHouseSinkRootTypebox:()=>JH,ClickHouseSinkTypebox:()=>LB,ClickHouseSinkTypeboxV3:()=>iL,ConfigOverridesTypebox:()=>pL,CreateSnapshotInternalSchema:()=>FQe,DatasetGroupRootTypebox:()=>CD,DatasetSchema:()=>Ux,DatasetSchemaV3:()=>zhe,DatasetSourceRootTypebox:()=>kw,DatasetSourceTypebox:()=>xD,DatasetSourceTypeboxV3:()=>GB,DefinitionInputTypebox:()=>xL,DefinitionInputTypeboxV3:()=>tge,DefinitionInputValidator:()=>cet,DefinitionOutputTypebox:()=>Vhe,DefinitionRootTypebox:()=>Ghe,DefinitionRootTypeboxV3:()=>kD,DeleteStreamDraftSchema:()=>QQe,DeleteStreamSchema:()=>DQe,ElasticSearchRootTypebox:()=>XH,ElasticSearchSinkTypebox:()=>OB,ElasticSearchSinkTypeboxV3:()=>JB,ExternalHandlerTransformRootTypebox:()=>UH,ExternalHandlerTransformTypebox:()=>kB,ExternalHandlerTransformTypeboxV3:()=>KB,FileSinkFormat:()=>Uhe,FileSinkFormatTypebox:()=>PB,FileSinkRootTypebox:()=>ZH,FileSinkTypebox:()=>qB,FileSinkTypeboxV3:()=>rL,FileSourceRootTypebox:()=>jH,FileSourceTypebox:()=>AD,FileSourceTypeboxV3:()=>WB,GetLagSchema:()=>UQe,GetLogsSchema:()=>XQe,GetStreamDraftSchema:()=>ZQe,GetStreamDraftsSchema:()=>KQe,GetStreamSchema:()=>fYe,GoldskyClickHouseSinkRootTypebox:()=>QH,GoldskyClickHouseSinkTypebox:()=>jB,GoldskyClickHouseSinkTypeboxV3:()=>sL,HypertableSinkRootTypebox:()=>KH,HypertableSinkTypebox:()=>NB,HypertableSinkTypeboxV3:()=>tL,JobErrorTypebox:()=>S7,KafkaPoweredSources:()=>cYe,KafkaSinkRootTypebox:()=>HH,KafkaSinkTypebox:()=>TB,KafkaSinkTypeboxV3:()=>eL,KafkaSourceRootTypebox:()=>LH,KafkaSourceTypebox:()=>Pw,KafkaSourceTypeboxV3:()=>XB,KafkaStorageRootTypebox:()=>Mhe,LagParams:()=>oge,LagResponse:()=>age,LagResponseBody:()=>cge,ListStreamsSchema:()=>LQe,LogLevels:()=>zQe,MysqlSinkRootTypebox:()=>GH,MysqlSinkTypebox:()=>IB,MysqlSinkTypeboxV3:()=>ZB,OpenSearchRootTypebox:()=>WH,OpenSearchSinkTypebox:()=>FB,OpenSearchSinkTypeboxV3:()=>QB,PostgresSinkRootTypebox:()=>VH,PostgresSinkTypebox:()=>RB,PostgresSinkTypeboxV3:()=>YB,PrintSinkRootTypebox:()=>t7,PrintSinkTypebox:()=>$B,PrintSinkTypeboxV3:()=>aL,QueryStreamRuntimeDetailsInputTypebox:()=>$Qe,ResourceSizeTypebox:()=>DD,RestartStreamInternalSchema:()=>qQe,RocksetSinkRootTypebox:()=>YH,RocksetSinkTypebox:()=>BB,RocksetSinkTypeboxV3:()=>nL,RuntimeDetails:()=>jQe,RuntimeDetailsWithMetrics:()=>sge,SQLParseInputBody:()=>lge,SQLParseSchema:()=>tet,SQLTransformRootTypebox:()=>$H,SQLTransformTypebox:()=>DB,SQLTransformTypeboxV3:()=>HB,SinkSchemaValidatorByType:()=>pet,SinkSchemaValidatorByTypeV3:()=>het,SinkTypes:()=>Uf,SinkTypesV3:()=>Qf,SourceSchemaValidatorByType:()=>uet,SourceSchemaValidatorByTypeV3:()=>met,SourceTypes:()=>Hb,SourceTypesV3:()=>VS,SqsSinkRootTypebox:()=>e7,SqsSinkTypebox:()=>MB,SqsSinkTypeboxV3:()=>oL,StartAtOptionsTypebox:()=>Dw,StatTypebox:()=>ige,StatelessCheckSchema:()=>BQe,StorageTypes:()=>T1,StreamDraftInputTypebox:()=>YQe,StreamDraftOutputTypebox:()=>AL,StreamDraftRootTypebox:()=>EL,StreamInputTypeValidator:()=>xQe,StreamInputTypeValidatorV3:()=>EQe,StreamInputTypebox:()=>L1,StreamInputTypeboxV3:()=>rge,StreamInputValidator:()=>aet,StreamNameAndVersion:()=>nge,StreamNameVersionRuntimeDetailsTypebox:()=>MQe,StreamOutputArrayTypeValidator:()=>iet,StreamOutputMapTypeValidatorV3:()=>set,StreamOutputTypeValidator:()=>oet,StreamOutputTypebox:()=>XS,StreamOutputTypeboxV3:()=>v7,StreamRootRunnableTypebox:()=>IQe,StreamRootTypebox:()=>PD,StreamStatusTypebox:()=>dL,StreamStatusWithoutPauseTypebox:()=>pYe,SubgraphEntitySourceRootTypebox:()=>BH,SubgraphEntitySourceTypebox:()=>ED,SubgraphEntitySourceTypeboxV3:()=>VB,SubgraphSourceEntityRootTypebox:()=>qH,TransformSchemaValidatorByType:()=>det,TransformSchemaValidatorByTypeV3:()=>fet,TransformationTypes:()=>mS,ValidateNewStreamSchema:()=>PQe,WebhookSinkRootTypebox:()=>n7,WebhookSinkTypebox:()=>zB,WebhookSinkTypeboxV3:()=>lL});var Hb={SubgraphEntity:"subgraphEntity",Kafka:"kafka",File:"file",Dataset:"dataset"},cYe=[Hb.Dataset,Hb.Kafka,Hb.SubgraphEntity],Dw=p.Union([p.Literal("earliest"),p.Literal("latest"),p.String({pattern:"^[0-9]{13}$"})],{errorMessage:"Expected either 'earliest', 'latest', or '^[0-9]{13}$'"}),CD=p.Object({name:p.String(),displayName:p.String(),description:p.Optional(p.String())}),Ux=p.Object({name:p.String(),datatype:p.String(),description:p.Optional(p.String())}),T1={Kafka:"kafka",ClickHouseArchive:"clickHouseArchive"},Mhe=p.Object({type:p.Literal(T1.Kafka),topic:p.String(),secretName:p.String(),schema:p.Array(Ux)}),$he=p.Object({type:p.Literal(T1.ClickHouseArchive),tableName:p.String(),relatedKafkaTopic:p.String(),schema:p.Optional(p.Array(Ux)),supportedIndexes:p.Array(p.Array(p.String()))}),kw=p.Object({id:p.String(),type:p.Literal(Hb.Dataset),version:p.String(),displayName:p.String(),referenceName:p.String(),datasetName:p.Optional(p.String()),description:p.Optional(p.String()),changelog:p.Optional(p.String()),schema:p.Array(Ux),isDeprecated:p.Optional(p.Boolean()),isInternal:p.Optional(p.Boolean()),storages:p.Array(p.Union([Mhe,$he])),groups:p.Array(p.String()),startAt:p.Optional(Dw),filter:p.Optional(p.String()),transformSql:p.Optional(p.String()),transformSqlPrimaryKey:p.Optional(p.String()),sourceDatasets:p.Optional(p.Array(p.Object({datasetName:p.String(),version:p.String(),filter:p.Optional(p.String())})))}),xD=p.Pick(kw,["version","startAt","type","description","referenceName","datasetName","filter"]),qH=p.Object({name:p.String(),kafkaTopic:p.Optional(p.String())},{additionalProperties:!1}),BH=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),schema:p.Array(Ux),type:p.Literal(Hb.SubgraphEntity),deployments:p.Array(p.Object({id:p.String()},{additionalProperties:!1})),entity:qH,secretName:p.String(),filter:p.Optional(p.String()),startAt:p.Optional(Dw)},{additionalProperties:!1}),ED=p.Composite([p.Omit(BH,["secretName","entity","id","schema"],{additionalProperties:!1}),p.Object({entity:p.Omit(qH,["kafkaTopic"],{additionalProperties:!1})},{additionalProperties:!1})],{additionalProperties:!1}),LH=p.Object({id:p.String(),description:p.Optional(p.String()),referenceName:p.String(),type:p.Literal(Hb.Kafka),topic:p.String({maxLength:255}),startingOffsets:p.Optional(p.String()),secretName:p.String(),filter:p.Optional(p.String())},{additionalProperties:!1}),Pw=p.Omit(LH,["secretName","id"],{additionalProperties:!1}),jH=p.Object({id:p.String(),description:p.Optional(p.String()),referenceName:p.String(),secretName:p.String(),type:p.Literal(Hb.File),path:p.String(),format:p.String(),tableDefinitionPath:p.String(),monitorInterval:p.Optional(p.String())},{additionalProperties:!1}),AD=p.Omit(jH,["secretName","id"],{additionalProperties:!1}),MH=p.Union([BH,LH,jH,kw],{additionalProperties:!1}),N1=p.Union([ED,Pw,AD,xD]);var mS={SQL:"sql",HANDLER:"handler"},$H=p.Object({id:p.String(),description:p.Optional(p.String()),type:p.Literal(mS.SQL),referenceName:p.String(),sql:p.String({maxLength:5e3}),primaryKey:p.String({maxLength:50})},{additionalProperties:!1}),UH=p.Object({id:p.String(),description:p.Optional(p.String()),type:p.Literal(mS.HANDLER),referenceName:p.String(),url:p.String(),from:p.String(),primaryKey:p.String({maxLength:50}),payloadColumns:p.Optional(p.Array(p.String({maxLength:50}))),schemaOverride:p.Optional(p.Object({})),headers:p.Optional(p.Object({})),secretName:p.Optional(p.String()),oneRowPerRequest:p.Optional(p.Boolean())},{additionalProperties:!1}),zH=p.Union([$H,UH]),DB=p.Omit($H,["id"],{additionalProperties:!1}),kB=p.Omit(UH,["id"],{additionalProperties:!1}),zx=p.Union([DB,kB],{additionalProperties:!1});var Uf={Mysql:"mysql",Postgres:"postgres",ElasticSearch:"elasticSearch",OpenSearch:"opensearch",Kafka:"kafka",TimescaleHypertable:"timescaleHypertable",File:"file",Rockset:"rockset",ClickHouse:"clickHouse",Print:"print",Blackhole:"blackhole",GoldskyClickHouse:"goldskyclickhouse",Sqs:"sqs",Webhook:"webhook"},GH=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.Mysql),sourceStreamName:p.String(),schema:p.String(),table:p.String(),secretName:p.String(),sinkBufferMaxRows:p.Optional(p.Integer()),sinkBufferInterval:p.Optional(p.String()),scanAutocommit:p.Optional(p.Boolean()),rewriteBatchedInserts:p.Optional(p.Boolean()),conditionalUpsertColumn:p.Optional(p.String())},{additionalProperties:!1}),VH=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.Postgres),sourceStreamName:p.String(),schema:p.String(),table:p.String(),secretName:p.String(),sinkBufferMaxRows:p.Optional(p.Integer()),sinkBufferInterval:p.Optional(p.String()),scanAutocommit:p.Optional(p.Boolean()),rewriteBatchedInserts:p.Optional(p.Boolean()),conditionalUpsertColumn:p.Optional(p.String())},{additionalProperties:!1}),XH=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.ElasticSearch),sourceStreamName:p.String(),index:p.String(),secretName:p.String()},{additionalProperties:!1}),WH=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.OpenSearch),sourceStreamName:p.String(),index:p.String(),secretName:p.String()},{additionalProperties:!1}),HH=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.Kafka),sourceStreamName:p.String(),topic:p.String({maxLength:255}),secretName:p.String(),topicPartitions:p.Optional(p.Integer()),upsertMode:p.Optional(p.Boolean()),dataFormat:p.Optional(p.Union([p.Literal("avro"),p.Literal("json")]))},{additionalProperties:!1}),KH=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.TimescaleHypertable),sourceStreamName:p.String(),schema:p.String(),table:p.String(),timestampColumn:p.String(),primaryKey:p.String(),timestampDataTypeAdapterFuncName:p.Optional(p.String()),secretName:p.String(),sinkBufferMaxRows:p.Optional(p.Integer()),sinkBufferInterval:p.Optional(p.String()),scanAutocommit:p.Optional(p.Boolean()),rewriteBatchedInserts:p.Optional(p.Boolean())},{additionalProperties:!1}),Uhe=["csv","parquet"],PB=p.Union(Uhe.map(e=>p.Literal(e))),ZH=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.File),sourceStreamName:p.String(),secretName:p.String(),path:p.String(),format:p.String(PB),autoCompaction:p.Optional(p.Boolean()),partitionColumns:p.Optional(p.String()),shuffleByPartition:p.Optional(p.Boolean()),dedupColumn:p.Optional(p.String()),dedupTTLMinutes:p.Optional(p.Integer()),lwwColumn:p.Optional(p.String()),lwwTTLMinutes:p.Optional(p.Integer()),rollingPolicyFileSize:p.Optional(p.String()),rollingPolicyRolloverInterval:p.Optional(p.String()),rollingPolicyCheckInterval:p.Optional(p.String())},{additionalProperties:!1}),YH=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.Rockset),sourceStreamName:p.String(),secretName:p.String(),workspace:p.String(),collection:p.String(),ingestTransformationSql:p.Optional(p.String()),flushSize:p.Optional(p.Integer()),flushIntervalMs:p.Optional(p.Integer()),retryCount:p.Optional(p.Integer())},{additionalProperties:!1}),JH=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.ClickHouse),sourceStreamName:p.String(),secretName:p.String(),table:p.String(),batchSize:p.Optional(p.Integer()),flushInterval:p.Optional(p.String()),appendOnlyMode:p.Optional(p.Boolean()),versionColumnName:p.Optional(p.String()),primaryKeyOverride:p.Optional(p.String()),schemaOverride:p.Optional(p.Record(p.String(),p.String()))},{additionalProperties:!1}),QH=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.GoldskyClickHouse),secretName:p.String({default:"goldskyclickhouse"}),sourceStreamName:p.String(),table:p.String(),versionColumnName:p.Optional(p.String()),primaryKeyOverride:p.Optional(p.String()),schemaOverride:p.Optional(p.Record(p.String(),p.String()))},{additionalProperties:!1}),e7=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.Sqs),sourceStreamName:p.String(),secretName:p.String(),url:p.String(),failOnError:p.Optional(p.Boolean())},{additionalProperties:!1}),t7=p.Object({id:p.String(),referenceName:p.String(),type:p.Literal(Uf.Print),sourceStreamName:p.String(),secretName:p.String()},{additionalProperties:!1}),r7=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.Blackhole),sourceStreamName:p.String(),secretName:p.String()},{additionalProperties:!1}),n7=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.Webhook),sourceStreamName:p.String(),secretName:p.String({default:"not_supplied"}),url:p.String(),headers:p.Optional(p.Record(p.String(),p.String())),oneRowPerRequest:p.Optional(p.Boolean())},{additionalProperties:!1}),i7=p.Union([GH,VH,XH,WH,HH,KH,ZH,YH,JH,QH,e7,t7,r7,n7],{additionalProperties:!1}),IB=p.Omit(GH,["id"],{additionalProperties:!1}),RB=p.Omit(VH,["id"],{additionalProperties:!1}),OB=p.Omit(XH,["id"],{additionalProperties:!1}),FB=p.Omit(WH,["id"],{additionalProperties:!1}),TB=p.Omit(HH,["id"],{additionalProperties:!1}),NB=p.Omit(KH,["id"],{additionalProperties:!1}),qB=p.Omit(ZH,["id"],{additionalProperties:!1}),BB=p.Omit(YH,["id"],{additionalProperties:!1}),LB=p.Omit(JH,["id"],{additionalProperties:!1}),jB=p.Composite([p.Omit(QH,["id","secretName"],{additionalProperties:!1}),p.Object({secretName:p.Optional(p.String())})]),MB=p.Omit(e7,["id"],{additionalProperties:!1}),$B=p.Omit(t7,["id"],{additionalProperties:!1}),UB=p.Omit(r7,["id"],{additionalProperties:!1}),zB=p.Composite([p.Omit(n7,["id","secretName"],{additionalProperties:!1}),p.Object({secretName:p.Optional(p.String())})]),Gx=p.Union([IB,RB,OB,FB,TB,NB,qB,BB,LB,jB,MB,$B,UB,zB]);var VS={SubgraphEntity:"subgraph_entity",Kafka:"kafka",File:"file",Dataset:"dataset"},zhe=p.Object({name:p.String(),datatype:p.String(),description:p.Optional(p.String())}),lYe=p.Object({type:p.Literal(T1.ClickHouseArchive),table_name:p.String(),related_kafka_topic:p.String(),schema:p.Optional(p.Array(zhe))}),GB=p.Object({dataset_name:p.String(),type:p.Literal(VS.Dataset),version:p.String(),display_name:p.Optional(p.String()),description:p.Optional(p.String()),start_at:p.Optional(Dw),filter:p.Optional(p.String())},{additionalProperties:!1}),VB=p.Object({description:p.Optional(p.String()),type:p.Literal(VS.SubgraphEntity),subgraphs:p.Array(p.Object({name:p.String(),version:p.String()},{additionalProperties:!1})),filter:p.Optional(p.String()),name:p.String(),start_at:p.Optional(Dw)},{additionalProperties:!1}),XB=p.Object({description:p.Optional(p.String()),type:p.Literal(VS.Kafka),topic:p.String({max_length:255}),starting_offsets:p.Optional(p.String()),filter:p.Optional(p.String())},{additionalProperties:!1}),WB=p.Object({description:p.Optional(p.String()),type:p.Literal(VS.File),path:p.String(),format:p.String(),table_definition_path:p.String(),monitor_interval:p.Optional(p.String())},{additionalProperties:!1}),Vx=p.Union([VB,XB,WB,GB]);var HB=p.Object({description:p.Optional(p.String()),type:p.Optional(p.Literal(mS.SQL)),sql:p.String({maxLength:5e3}),primary_key:p.String({maxLength:50})},{additionalProperties:!1}),KB=p.Object({description:p.Optional(p.String()),type:p.Literal(mS.HANDLER),url:p.String(),from:p.String(),primary_key:p.String({maxLength:50}),payload_columns:p.Optional(p.Array(p.String({maxLength:50}))),schema_override:p.Optional(p.Object({})),headers:p.Optional(p.Object({})),secret_name:p.Optional(p.String()),one_row_per_request:p.Optional(p.Boolean())},{additionalProperties:!1}),Xx=p.Union([HB,KB],{additionalProperties:!1});var Qf={Mysql:"mysql",Postgres:"postgres",ElasticSearch:"elasticsearch",OpenSearch:"opensearch",Kafka:"kafka",TimescaleHypertable:"timescalehypertable",File:"file",Rockset:"rockset",ClickHouse:"clickhouse",Print:"print",Blackhole:"blackhole",GoldskyClickHouse:"goldskyclickhouse",Sqs:"sqs",Webhook:"webhook"},ZB=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.Mysql),from:p.String(),schema:p.String(),table:p.String(),secret_name:p.String(),batch_size:p.Optional(p.Integer()),batch_flush_interval:p.Optional(p.String()),scan_autocommit:p.Optional(p.Boolean()),rewrite_batched_inserts:p.Optional(p.Boolean()),conditional_upsert_column:p.Optional(p.String())},{additionalProperties:!1}),YB=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.Postgres),from:p.String(),schema:p.String(),table:p.String(),secret_name:p.String(),batch_size:p.Optional(p.Integer()),batch_flush_interval:p.Optional(p.String()),scan_autocommit:p.Optional(p.Boolean()),rewrite_batched_inserts:p.Optional(p.Boolean()),conditional_upsert_column:p.Optional(p.String())},{additionalProperties:!1}),JB=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.ElasticSearch),from:p.String(),index:p.String(),secret_name:p.String()},{additionalProperties:!1}),QB=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.OpenSearch),from:p.String(),index:p.String(),secret_name:p.String()},{additionalProperties:!1}),eL=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.Kafka),from:p.String(),topic:p.String({max_length:255}),secret_name:p.String(),topic_partitions:p.Optional(p.Integer()),upsert_mode:p.Optional(p.Boolean()),data_format:p.Optional(p.Union([p.Literal("avro"),p.Literal("json")]))},{additionalProperties:!1}),tL=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.TimescaleHypertable),from:p.String(),schema:p.String(),table:p.String(),timestamp_column:p.String(),primary_key:p.String(),timestamp_data_type_adapter_func_name:p.Optional(p.String()),secret_name:p.String(),batch_size:p.Optional(p.Integer()),batch_flush_interval:p.Optional(p.String()),scan_autocommit:p.Optional(p.Boolean()),rewrite_batched_inserts:p.Optional(p.Boolean())},{additionalProperties:!1}),rL=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.File),from:p.String(),secret_name:p.String(),path:p.String(),format:p.String(PB),auto_compaction:p.Optional(p.Boolean()),partition_columns:p.Optional(p.String()),shuffle_by_partition:p.Optional(p.Boolean()),dedup_column:p.Optional(p.String()),dedup_ttl_minutes:p.Optional(p.Integer()),lww_column:p.Optional(p.String()),lww_ttl_minutes:p.Optional(p.Integer()),batch_size:p.Optional(p.String()),batch_flush_interval:p.Optional(p.String()),rolling_policy_check_interval:p.Optional(p.String())},{additionalProperties:!1}),nL=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.Rockset),from:p.String(),secret_name:p.String(),workspace:p.String(),collection:p.String(),ingest_transformation_sql:p.Optional(p.String()),batch_size:p.Optional(p.Integer()),batch_flush_interval:p.Optional(p.Integer()),retry_count:p.Optional(p.Integer())},{additionalProperties:!1}),iL=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.ClickHouse),from:p.String(),secret_name:p.String(),table:p.String(),batch_size:p.Optional(p.Integer()),batch_flush_interval:p.Optional(p.String()),append_only_mode:p.Optional(p.Boolean()),version_column_name:p.Optional(p.String()),primary_key_override:p.Optional(p.String()),schema_override:p.Optional(p.Record(p.String(),p.String()))},{additionalProperties:!1}),sL=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.GoldskyClickHouse),from:p.String(),table:p.String(),version_column_name:p.Optional(p.String()),primary_key_override:p.Optional(p.String()),schema_override:p.Optional(p.Record(p.String(),p.String()))},{additionalProperties:!1}),oL=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.Sqs),from:p.String(),secret_name:p.String(),url:p.String(),fail_on_error:p.Optional(p.Boolean())},{additionalProperties:!1}),aL=p.Object({type:p.Literal(Qf.Print),description:p.Optional(p.String()),from:p.String(),secret_name:p.String()},{additionalProperties:!1}),cL=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.Blackhole),from:p.String(),secret_name:p.String()},{additionalProperties:!1}),lL=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.Webhook),from:p.String(),secret_name:p.Optional(p.String({default:"not_supplied"})),url:p.String(),headers:p.Optional(p.Record(p.String(),p.String())),one_row_per_request:p.Optional(p.Boolean())},{additionalProperties:!1}),Wx=p.Union([ZB,YB,JB,QB,eL,tL,rL,nL,iL,sL,oL,aL,cL,lL]);var uYe=["json","table","yaml"],s7=["s","m","l","xl","xxl","mem.l","mem.xl","mem.xxl"],DD=p.Union(s7.map(e=>p.Literal(e)),{errorMessage:`Invalid resource size. Must be one of: ${s7.join(", ")}`}),uL=["ACTIVE","INACTIVE","PAUSED"],dYe=uL.filter(e=>e!=="PAUSED"),dL=p.Union(uL.map(e=>p.Literal(e))),pYe=p.Union(uL.filter(e=>e!=="PAUSED").map(e=>p.Literal(e))),Ghe=p.Object({sources:p.Array(MH,{minItems:1}),transforms:p.Array(zH),sinks:p.Array(i7)},{additionalProperties:!1}),kD=p.Object({sources:p.Record(p.String(),Vx),transforms:p.Record(p.String(),Xx),sinks:p.Record(p.String(),Wx)},{additionalProperties:!1}),Vhe=p.Object({sources:p.Array(N1,{minItems:1}),transforms:p.Array(zx),sinks:p.Array(Gx)},{additionalProperties:!1}),pL=p.Object({imageTag:p.Optional(p.String()),flinkConf:p.Optional(p.Object({})),env:p.Optional(p.Object({}))},{additionalProperties:!1}),PD=p.Object({id:p.String(),name:p.String(),description:p.Optional(p.String()),version:p.Integer(),definition:Ghe,definition_v3:p.Optional(kD),status:dL,project_id:p.String(),created_at:p.Number(),updated_at:p.Number(),resource_size:DD,latest_snapshot_id:p.Optional(p.String()),from_snapshot_id:p.Optional(p.String()),is_deleted:p.Boolean(),audit_log:p.Optional(p.String()),support_tier:p.Optional(p.Integer()),config_overrides:p.Optional(pL),updated_by_user_id:p.Optional(p.String()),dedicated_ips:p.Optional(p.Boolean())},{additionalProperties:!1}),XS=p.Composite([p.Omit(PD,["definition","audit_log","from_snapshot_id","latest_snapshot_id","is_deleted","config_overrides","dedicated_ips","id"],{additionalProperties:!1}),p.Object({definition:Vhe,is_deleted:p.Optional(p.Boolean())},{additionalProperties:!1})],{additionalProperties:!1});var mYe=p.Object({name:p.String(),version:p.Optional(p.String())},{additionalProperties:!1}),fYe={params:mYe,response:{200:p.Array(XS)}};function mL(e){return q1(e)&&Symbol.asyncIterator in e}function fL(e){return q1(e)&&Symbol.iterator in e}function WS(e){return q1(e)&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null)}function hL(e){return e instanceof Promise}function ID(e){return e instanceof Date&&Number.isFinite(e.getTime())}function RD(e){return e instanceof globalThis.Uint8Array}function q1(e){return e!==null&&typeof e=="object"}function Pg(e){return Array.isArray(e)&&!ArrayBuffer.isView(e)}function fS(e){return e===void 0}function Hx(e){return e===null}function Kx(e){return typeof e=="boolean"}function zm(e){return typeof e=="number"}function gL(e){return Number.isInteger(e)}function Kb(e){return typeof e=="bigint"}function Zg(e){return typeof e=="string"}function yL(e){return typeof e=="function"}function Zx(e){return typeof e=="symbol"}function bL(e){return Kb(e)||Kx(e)||Hx(e)||zm(e)||Zg(e)||Zx(e)||fS(e)}var Ig;(function(e){e.ExactOptionalPropertyTypes=!1,e.AllowArrayObject=!1,e.AllowNaN=!1,e.AllowNullVoid=!1;function t(o,a){return e.ExactOptionalPropertyTypes?a in o:o[a]!==void 0}e.IsExactOptionalProperty=t;function r(o){let a=q1(o);return e.AllowArrayObject?a:a&&!Pg(o)}e.IsObjectLike=r;function n(o){return r(o)&&!(o instanceof Date)&&!(o instanceof Uint8Array)}e.IsRecordLike=n;function i(o){return e.AllowNaN?zm(o):Number.isFinite(o)}e.IsNumberLike=i;function s(o){let a=fS(o);return e.AllowNullVoid?a||o===null:a}e.IsVoidLike=s})(Ig||(Ig={}));var o7=class extends wf{constructor(t){super(`Duplicate type kind '${t}' detected`)}},a7=class extends wf{constructor(t){super(`Duplicate string format '${t}' detected`)}},Xhe;(function(e){function t(n,i){if(Dy.Has(n))throw new o7(n);return Dy.Set(n,i),(s={})=>S1({...s,[Tn]:n})}e.Type=t;function r(n,i){if(hb.Has(n))throw new a7(n);return hb.Set(n,i),n}e.Format=r})(Xhe||(Xhe={}));function hYe(e){switch(e.errorType){case Er.ArrayContains:return"Expected array to contain at least one matching value";case Er.ArrayMaxContains:return`Expected array to contain no more than ${e.schema.maxContains} matching values`;case Er.ArrayMinContains:return`Expected array to contain at least ${e.schema.minContains} matching values`;case Er.ArrayMaxItems:return`Expected array length to be less or equal to ${e.schema.maxItems}`;case Er.ArrayMinItems:return`Expected array length to be greater or equal to ${e.schema.minItems}`;case Er.ArrayUniqueItems:return"Expected array elements to be unique";case Er.Array:return"Expected array";case Er.AsyncIterator:return"Expected AsyncIterator";case Er.BigIntExclusiveMaximum:return`Expected bigint to be less than ${e.schema.exclusiveMaximum}`;case Er.BigIntExclusiveMinimum:return`Expected bigint to be greater than ${e.schema.exclusiveMinimum}`;case Er.BigIntMaximum:return`Expected bigint to be less or equal to ${e.schema.maximum}`;case Er.BigIntMinimum:return`Expected bigint to be greater or equal to ${e.schema.minimum}`;case Er.BigIntMultipleOf:return`Expected bigint to be a multiple of ${e.schema.multipleOf}`;case Er.BigInt:return"Expected bigint";case Er.Boolean:return"Expected boolean";case Er.DateExclusiveMinimumTimestamp:return`Expected Date timestamp to be greater than ${e.schema.exclusiveMinimumTimestamp}`;case Er.DateExclusiveMaximumTimestamp:return`Expected Date timestamp to be less than ${e.schema.exclusiveMaximumTimestamp}`;case Er.DateMinimumTimestamp:return`Expected Date timestamp to be greater or equal to ${e.schema.minimumTimestamp}`;case Er.DateMaximumTimestamp:return`Expected Date timestamp to be less or equal to ${e.schema.maximumTimestamp}`;case Er.DateMultipleOfTimestamp:return`Expected Date timestamp to be a multiple of ${e.schema.multipleOfTimestamp}`;case Er.Date:return"Expected Date";case Er.Function:return"Expected function";case Er.IntegerExclusiveMaximum:return`Expected integer to be less than ${e.schema.exclusiveMaximum}`;case Er.IntegerExclusiveMinimum:return`Expected integer to be greater than ${e.schema.exclusiveMinimum}`;case Er.IntegerMaximum:return`Expected integer to be less or equal to ${e.schema.maximum}`;case Er.IntegerMinimum:return`Expected integer to be greater or equal to ${e.schema.minimum}`;case Er.IntegerMultipleOf:return`Expected integer to be a multiple of ${e.schema.multipleOf}`;case Er.Integer:return"Expected integer";case Er.IntersectUnevaluatedProperties:return"Unexpected property";case Er.Intersect:return"Expected all values to match";case Er.Iterator:return"Expected Iterator";case Er.Literal:return`Expected ${typeof e.schema.const=="string"?`'${e.schema.const}'`:e.schema.const}`;case Er.Never:return"Never";case Er.Not:return"Value should not match";case Er.Null:return"Expected null";case Er.NumberExclusiveMaximum:return`Expected number to be less than ${e.schema.exclusiveMaximum}`;case Er.NumberExclusiveMinimum:return`Expected number to be greater than ${e.schema.exclusiveMinimum}`;case Er.NumberMaximum:return`Expected number to be less or equal to ${e.schema.maximum}`;case Er.NumberMinimum:return`Expected number to be greater or equal to ${e.schema.minimum}`;case Er.NumberMultipleOf:return`Expected number to be a multiple of ${e.schema.multipleOf}`;case Er.Number:return"Expected number";case Er.Object:return"Expected object";case Er.ObjectAdditionalProperties:return"Unexpected property";case Er.ObjectMaxProperties:return`Expected object to have no more than ${e.schema.maxProperties} properties`;case Er.ObjectMinProperties:return`Expected object to have at least ${e.schema.minProperties} properties`;case Er.ObjectRequiredProperty:return"Required property";case Er.Promise:return"Expected Promise";case Er.RegExp:return"Expected string to match regular expression";case Er.StringFormatUnknown:return`Unknown format '${e.schema.format}'`;case Er.StringFormat:return`Expected string to match '${e.schema.format}' format`;case Er.StringMaxLength:return`Expected string length less or equal to ${e.schema.maxLength}`;case Er.StringMinLength:return`Expected string length greater or equal to ${e.schema.minLength}`;case Er.StringPattern:return`Expected string to match '${e.schema.pattern}'`;case Er.String:return"Expected string";case Er.Symbol:return"Expected symbol";case Er.TupleLength:return`Expected tuple to have ${e.schema.maxItems||0} elements`;case Er.Tuple:return"Expected tuple";case Er.Uint8ArrayMaxByteLength:return`Expected byte length less or equal to ${e.schema.maxByteLength}`;case Er.Uint8ArrayMinByteLength:return`Expected byte length greater or equal to ${e.schema.minByteLength}`;case Er.Uint8Array:return"Expected Uint8Array";case Er.Undefined:return"Expected undefined";case Er.Union:return"Expected union value";case Er.Void:return"Expected void";case Er.Kind:return`Expected kind '${e.schema[Tn]}'`;default:return"Unknown error type"}}var gYe=hYe;function Whe(){return gYe}var c7=class extends wf{constructor(t){super(`Unable to dereference schema with $id '${t.$id}'`),this.schema=t}};function yYe(e,t){let r=t.find(n=>n.$id===e.$ref);if(r===void 0)throw new c7(e);return Yg(r,t)}function Yg(e,t){return e[Tn]==="This"||e[Tn]==="Ref"?yYe(e,t):e}var l7=class extends wf{constructor(t){super("Unable to hash value"),this.value=t}},Zb;(function(e){e[e.Undefined=0]="Undefined",e[e.Null=1]="Null",e[e.Boolean=2]="Boolean",e[e.Number=3]="Number",e[e.String=4]="String",e[e.Object=5]="Object",e[e.Array=6]="Array",e[e.Date=7]="Date",e[e.Uint8Array=8]="Uint8Array",e[e.Symbol=9]="Symbol",e[e.BigInt=10]="BigInt"})(Zb||(Zb={}));var OD=BigInt("14695981039346656037"),[bYe,SYe]=[BigInt("1099511628211"),BigInt("2")**BigInt("64")],vYe=Array.from({length:256}).map((e,t)=>BigInt(t)),Hhe=new Float64Array(1),Khe=new DataView(Hhe.buffer),Zhe=new Uint8Array(Hhe.buffer);function*_Ye(e){let t=e===0?1:Math.ceil(Math.floor(Math.log2(e)+1)/8);for(let r=0;r<t;r++)yield e>>8*(t-1-r)&255}function wYe(e){Py(Zb.Array);for(let t of e)FD(t)}function CYe(e){Py(Zb.Boolean),Py(e?1:0)}function xYe(e){Py(Zb.BigInt),Khe.setBigInt64(0,e);for(let t of Zhe)Py(t)}function EYe(e){Py(Zb.Date),FD(e.getTime())}function AYe(e){Py(Zb.Null)}function DYe(e){Py(Zb.Number),Khe.setFloat64(0,e);for(let t of Zhe)Py(t)}function kYe(e){Py(Zb.Object);for(let t of globalThis.Object.getOwnPropertyNames(e).sort())FD(t),FD(e[t])}function PYe(e){Py(Zb.String);for(let t=0;t<e.length;t++)for(let r of _Ye(e.charCodeAt(t)))Py(r)}function IYe(e){Py(Zb.Symbol),FD(e.description)}function RYe(e){Py(Zb.Uint8Array);for(let t=0;t<e.length;t++)Py(e[t])}function OYe(e){return Py(Zb.Undefined)}function FD(e){if(Pg(e))return wYe(e);if(Kx(e))return CYe(e);if(Kb(e))return xYe(e);if(ID(e))return EYe(e);if(Hx(e))return AYe(e);if(zm(e))return DYe(e);if(WS(e))return kYe(e);if(Zg(e))return PYe(e);if(Zx(e))return IYe(e);if(RD(e))return RYe(e);if(fS(e))return OYe(e);throw new l7(e)}function Py(e){OD=OD^vYe[e],OD=OD*bYe%SYe}function TD(e){return OD=BigInt("14695981039346656037"),FD(e),OD}var Er;(function(e){e[e.ArrayContains=0]="ArrayContains",e[e.ArrayMaxContains=1]="ArrayMaxContains",e[e.ArrayMaxItems=2]="ArrayMaxItems",e[e.ArrayMinContains=3]="ArrayMinContains",e[e.ArrayMinItems=4]="ArrayMinItems",e[e.ArrayUniqueItems=5]="ArrayUniqueItems",e[e.Array=6]="Array",e[e.AsyncIterator=7]="AsyncIterator",e[e.BigIntExclusiveMaximum=8]="BigIntExclusiveMaximum",e[e.BigIntExclusiveMinimum=9]="BigIntExclusiveMinimum",e[e.BigIntMaximum=10]="BigIntMaximum",e[e.BigIntMinimum=11]="BigIntMinimum",e[e.BigIntMultipleOf=12]="BigIntMultipleOf",e[e.BigInt=13]="BigInt",e[e.Boolean=14]="Boolean",e[e.DateExclusiveMaximumTimestamp=15]="DateExclusiveMaximumTimestamp",e[e.DateExclusiveMinimumTimestamp=16]="DateExclusiveMinimumTimestamp",e[e.DateMaximumTimestamp=17]="DateMaximumTimestamp",e[e.DateMinimumTimestamp=18]="DateMinimumTimestamp",e[e.DateMultipleOfTimestamp=19]="DateMultipleOfTimestamp",e[e.Date=20]="Date",e[e.Function=21]="Function",e[e.IntegerExclusiveMaximum=22]="IntegerExclusiveMaximum",e[e.IntegerExclusiveMinimum=23]="IntegerExclusiveMinimum",e[e.IntegerMaximum=24]="IntegerMaximum",e[e.IntegerMinimum=25]="IntegerMinimum",e[e.IntegerMultipleOf=26]="IntegerMultipleOf",e[e.Integer=27]="Integer",e[e.IntersectUnevaluatedProperties=28]="IntersectUnevaluatedProperties",e[e.Intersect=29]="Intersect",e[e.Iterator=30]="Iterator",e[e.Kind=31]="Kind",e[e.Literal=32]="Literal",e[e.Never=33]="Never",e[e.Not=34]="Not",e[e.Null=35]="Null",e[e.NumberExclusiveMaximum=36]="NumberExclusiveMaximum",e[e.NumberExclusiveMinimum=37]="NumberExclusiveMinimum",e[e.NumberMaximum=38]="NumberMaximum",e[e.NumberMinimum=39]="NumberMinimum",e[e.NumberMultipleOf=40]="NumberMultipleOf",e[e.Number=41]="Number",e[e.ObjectAdditionalProperties=42]="ObjectAdditionalProperties",e[e.ObjectMaxProperties=43]="ObjectMaxProperties",e[e.ObjectMinProperties=44]="ObjectMinProperties",e[e.ObjectRequiredProperty=45]="ObjectRequiredProperty",e[e.Object=46]="Object",e[e.Promise=47]="Promise",e[e.RegExp=48]="RegExp",e[e.StringFormatUnknown=49]="StringFormatUnknown",e[e.StringFormat=50]="StringFormat",e[e.StringMaxLength=51]="StringMaxLength",e[e.StringMinLength=52]="StringMinLength",e[e.StringPattern=53]="StringPattern",e[e.String=54]="String",e[e.Symbol=55]="Symbol",e[e.TupleLength=56]="TupleLength",e[e.Tuple=57]="Tuple",e[e.Uint8ArrayMaxByteLength=58]="Uint8ArrayMaxByteLength",e[e.Uint8ArrayMinByteLength=59]="Uint8ArrayMinByteLength",e[e.Uint8Array=60]="Uint8Array",e[e.Undefined=61]="Undefined",e[e.Union=62]="Union",e[e.Void=63]="Void"})(Er||(Er={}));var u7=class extends wf{constructor(t){super("Unknown type"),this.schema=t}};function u_(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function df(e){return e!==void 0}var SL=class{constructor(t){this.iterator=t}[Symbol.iterator](){return this.iterator}First(){let t=this.iterator.next();return t.done?void 0:t.value}};function _u(e,t,r,n){return{type:e,schema:t,path:r,value:n,message:Whe()({errorType:e,path:r,schema:t,value:n})}}function*FYe(e,t,r,n){}function*TYe(e,t,r,n){if(!Pg(n))return yield _u(Er.Array,e,r,n);df(e.minItems)&&!(n.length>=e.minItems)&&(yield _u(Er.ArrayMinItems,e,r,n)),df(e.maxItems)&&!(n.length<=e.maxItems)&&(yield _u(Er.ArrayMaxItems,e,r,n));for(let o=0;o<n.length;o++)yield*fy(e.items,t,`${r}/${o}`,n[o]);if(e.uniqueItems===!0&&!function(){let o=new Set;for(let a of n){let c=TD(a);if(o.has(c))return!1;o.add(c)}return!0}()&&(yield _u(Er.ArrayUniqueItems,e,r,n)),!(df(e.contains)||df(e.minContains)||df(e.maxContains)))return;let i=df(e.contains)?e.contains:Jf(),s=n.reduce((o,a,c)=>fy(i,t,`${r}${c}`,a).next().done===!0?o+1:o,0);s===0&&(yield _u(Er.ArrayContains,e,r,n)),zm(e.minContains)&&s<e.minContains&&(yield _u(Er.ArrayMinContains,e,r,n)),zm(e.maxContains)&&s>e.maxContains&&(yield _u(Er.ArrayMaxContains,e,r,n))}function*NYe(e,t,r,n){mL(n)||(yield _u(Er.AsyncIterator,e,r,n))}function*qYe(e,t,r,n){if(!Kb(n))return yield _u(Er.BigInt,e,r,n);df(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield _u(Er.BigIntExclusiveMaximum,e,r,n)),df(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield _u(Er.BigIntExclusiveMinimum,e,r,n)),df(e.maximum)&&!(n<=e.maximum)&&(yield _u(Er.BigIntMaximum,e,r,n)),df(e.minimum)&&!(n>=e.minimum)&&(yield _u(Er.BigIntMinimum,e,r,n)),df(e.multipleOf)&&n%e.multipleOf!==BigInt(0)&&(yield _u(Er.BigIntMultipleOf,e,r,n))}function*BYe(e,t,r,n){Kx(n)||(yield _u(Er.Boolean,e,r,n))}function*LYe(e,t,r,n){yield*fy(e.returns,t,r,n.prototype)}function*jYe(e,t,r,n){if(!ID(n))return yield _u(Er.Date,e,r,n);df(e.exclusiveMaximumTimestamp)&&!(n.getTime()<e.exclusiveMaximumTimestamp)&&(yield _u(Er.DateExclusiveMaximumTimestamp,e,r,n)),df(e.exclusiveMinimumTimestamp)&&!(n.getTime()>e.exclusiveMinimumTimestamp)&&(yield _u(Er.DateExclusiveMinimumTimestamp,e,r,n)),df(e.maximumTimestamp)&&!(n.getTime()<=e.maximumTimestamp)&&(yield _u(Er.DateMaximumTimestamp,e,r,n)),df(e.minimumTimestamp)&&!(n.getTime()>=e.minimumTimestamp)&&(yield _u(Er.DateMinimumTimestamp,e,r,n)),df(e.multipleOfTimestamp)&&n.getTime()%e.multipleOfTimestamp!==0&&(yield _u(Er.DateMultipleOfTimestamp,e,r,n))}function*MYe(e,t,r,n){yL(n)||(yield _u(Er.Function,e,r,n))}function*$Ye(e,t,r,n){if(!gL(n))return yield _u(Er.Integer,e,r,n);df(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield _u(Er.IntegerExclusiveMaximum,e,r,n)),df(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield _u(Er.IntegerExclusiveMinimum,e,r,n)),df(e.maximum)&&!(n<=e.maximum)&&(yield _u(Er.IntegerMaximum,e,r,n)),df(e.minimum)&&!(n>=e.minimum)&&(yield _u(Er.IntegerMinimum,e,r,n)),df(e.multipleOf)&&n%e.multipleOf!==0&&(yield _u(Er.IntegerMultipleOf,e,r,n))}function*UYe(e,t,r,n){for(let i of e.allOf){let s=fy(i,t,r,n).next();s.done||(yield _u(Er.Intersect,e,r,n),yield s.value)}if(e.unevaluatedProperties===!1){let i=new RegExp(o_(e));for(let s of Object.getOwnPropertyNames(n))i.test(s)||(yield _u(Er.IntersectUnevaluatedProperties,e,`${r}/${s}`,n))}if(typeof e.unevaluatedProperties=="object"){let i=new RegExp(o_(e));for(let s of Object.getOwnPropertyNames(n))if(!i.test(s)){let o=fy(e.unevaluatedProperties,t,`${r}/${s}`,n[s]).next();o.done||(yield o.value)}}}function*zYe(e,t,r,n){fL(n)||(yield _u(Er.Iterator,e,r,n))}function*GYe(e,t,r,n){n!==e.const&&(yield _u(Er.Literal,e,r,n))}function*VYe(e,t,r,n){yield _u(Er.Never,e,r,n)}function*XYe(e,t,r,n){fy(e.not,t,r,n).next().done===!0&&(yield _u(Er.Not,e,r,n))}function*WYe(e,t,r,n){Hx(n)||(yield _u(Er.Null,e,r,n))}function*HYe(e,t,r,n){if(!Ig.IsNumberLike(n))return yield _u(Er.Number,e,r,n);df(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield _u(Er.NumberExclusiveMaximum,e,r,n)),df(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield _u(Er.NumberExclusiveMinimum,e,r,n)),df(e.maximum)&&!(n<=e.maximum)&&(yield _u(Er.NumberMaximum,e,r,n)),df(e.minimum)&&!(n>=e.minimum)&&(yield _u(Er.NumberMinimum,e,r,n)),df(e.multipleOf)&&n%e.multipleOf!==0&&(yield _u(Er.NumberMultipleOf,e,r,n))}function*KYe(e,t,r,n){if(!Ig.IsObjectLike(n))return yield _u(Er.Object,e,r,n);df(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield _u(Er.ObjectMinProperties,e,r,n)),df(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield _u(Er.ObjectMaxProperties,e,r,n));let i=Array.isArray(e.required)?e.required:[],s=Object.getOwnPropertyNames(e.properties),o=Object.getOwnPropertyNames(n);for(let a of i)o.includes(a)||(yield _u(Er.ObjectRequiredProperty,e.properties[a],`${r}/${u_(a)}`,void 0));if(e.additionalProperties===!1)for(let a of o)s.includes(a)||(yield _u(Er.ObjectAdditionalProperties,e,`${r}/${u_(a)}`,n[a]));if(typeof e.additionalProperties=="object")for(let a of o)s.includes(a)||(yield*fy(e.additionalProperties,t,`${r}/${u_(a)}`,n[a]));for(let a of s){let c=e.properties[a];e.required&&e.required.includes(a)?(yield*fy(c,t,`${r}/${u_(a)}`,n[a]),a_(e)&&!(a in n)&&(yield _u(Er.ObjectRequiredProperty,c,`${r}/${u_(a)}`,void 0))):Ig.IsExactOptionalProperty(n,a)&&(yield*fy(c,t,`${r}/${u_(a)}`,n[a]))}}function*ZYe(e,t,r,n){hL(n)||(yield _u(Er.Promise,e,r,n))}function*YYe(e,t,r,n){if(!Ig.IsRecordLike(n))return yield _u(Er.Object,e,r,n);df(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield _u(Er.ObjectMinProperties,e,r,n)),df(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield _u(Er.ObjectMaxProperties,e,r,n));let[i,s]=Object.entries(e.patternProperties)[0],o=new RegExp(i);for(let[a,c]of Object.entries(n))o.test(a)&&(yield*fy(s,t,`${r}/${u_(a)}`,c));if(typeof e.additionalProperties=="object")for(let[a,c]of Object.entries(n))o.test(a)||(yield*fy(e.additionalProperties,t,`${r}/${u_(a)}`,c));if(e.additionalProperties===!1){for(let[a,c]of Object.entries(n))if(!o.test(a))return yield _u(Er.ObjectAdditionalProperties,e,`${r}/${u_(a)}`,c)}}function*JYe(e,t,r,n){yield*fy(Yg(e,t),t,r,n)}function*QYe(e,t,r,n){if(!Zg(n))return yield _u(Er.String,e,r,n);if(df(e.minLength)&&!(n.length>=e.minLength)&&(yield _u(Er.StringMinLength,e,r,n)),df(e.maxLength)&&!(n.length<=e.maxLength)&&(yield _u(Er.StringMaxLength,e,r,n)),!new RegExp(e.source,e.flags).test(n))return yield _u(Er.RegExp,e,r,n)}function*eJe(e,t,r,n){if(!Zg(n))return yield _u(Er.String,e,r,n);df(e.minLength)&&!(n.length>=e.minLength)&&(yield _u(Er.StringMinLength,e,r,n)),df(e.maxLength)&&!(n.length<=e.maxLength)&&(yield _u(Er.StringMaxLength,e,r,n)),Zg(e.pattern)&&(new RegExp(e.pattern).test(n)||(yield _u(Er.StringPattern,e,r,n))),Zg(e.format)&&(hb.Has(e.format)?hb.Get(e.format)(n)||(yield _u(Er.StringFormat,e,r,n)):yield _u(Er.StringFormatUnknown,e,r,n))}function*tJe(e,t,r,n){Zx(n)||(yield _u(Er.Symbol,e,r,n))}function*rJe(e,t,r,n){if(!Zg(n))return yield _u(Er.String,e,r,n);new RegExp(e.pattern).test(n)||(yield _u(Er.StringPattern,e,r,n))}function*nJe(e,t,r,n){yield*fy(Yg(e,t),t,r,n)}function*iJe(e,t,r,n){if(!Pg(n))return yield _u(Er.Tuple,e,r,n);if(e.items===void 0&&n.length!==0)return yield _u(Er.TupleLength,e,r,n);if(n.length!==e.maxItems)return yield _u(Er.TupleLength,e,r,n);if(!!e.items)for(let i=0;i<e.items.length;i++)yield*fy(e.items[i],t,`${r}/${i}`,n[i])}function*sJe(e,t,r,n){fS(n)||(yield _u(Er.Undefined,e,r,n))}function*oJe(e,t,r,n){let i=0;for(let s of e.anyOf){let o=[...fy(s,t,r,n)];if(o.length===0)return;i+=o.length}i>0&&(yield _u(Er.Union,e,r,n))}function*aJe(e,t,r,n){if(!RD(n))return yield _u(Er.Uint8Array,e,r,n);df(e.maxByteLength)&&!(n.length<=e.maxByteLength)&&(yield _u(Er.Uint8ArrayMaxByteLength,e,r,n)),df(e.minByteLength)&&!(n.length>=e.minByteLength)&&(yield _u(Er.Uint8ArrayMinByteLength,e,r,n))}function*cJe(e,t,r,n){}function*lJe(e,t,r,n){Ig.IsVoidLike(n)||(yield _u(Er.Void,e,r,n))}function*uJe(e,t,r,n){Dy.Get(e[Tn])(e,n)||(yield _u(Er.Kind,e,r,n))}function*fy(e,t,r,n){let i=df(e.$id)?[...t,e]:t,s=e;switch(s[Tn]){case"Any":return yield*FYe(s,i,r,n);case"Array":return yield*TYe(s,i,r,n);case"AsyncIterator":return yield*NYe(s,i,r,n);case"BigInt":return yield*qYe(s,i,r,n);case"Boolean":return yield*BYe(s,i,r,n);case"Constructor":return yield*LYe(s,i,r,n);case"Date":return yield*jYe(s,i,r,n);case"Function":return yield*MYe(s,i,r,n);case"Integer":return yield*$Ye(s,i,r,n);case"Intersect":return yield*UYe(s,i,r,n);case"Iterator":return yield*zYe(s,i,r,n);case"Literal":return yield*GYe(s,i,r,n);case"Never":return yield*VYe(s,i,r,n);case"Not":return yield*XYe(s,i,r,n);case"Null":return yield*WYe(s,i,r,n);case"Number":return yield*HYe(s,i,r,n);case"Object":return yield*KYe(s,i,r,n);case"Promise":return yield*ZYe(s,i,r,n);case"Record":return yield*YYe(s,i,r,n);case"Ref":return yield*JYe(s,i,r,n);case"RegExp":return yield*QYe(s,i,r,n);case"String":return yield*eJe(s,i,r,n);case"Symbol":return yield*tJe(s,i,r,n);case"TemplateLiteral":return yield*rJe(s,i,r,n);case"This":return yield*nJe(s,i,r,n);case"Tuple":return yield*iJe(s,i,r,n);case"Undefined":return yield*sJe(s,i,r,n);case"Union":return yield*oJe(s,i,r,n);case"Uint8Array":return yield*aJe(s,i,r,n);case"Unknown":return yield*cJe(s,i,r,n);case"Void":return yield*lJe(s,i,r,n);default:if(!Dy.Has(s[Tn]))throw new u7(e);return yield*uJe(s,i,r,n)}}function Yhe(...e){let t=e.length===3?fy(e[0],e[1],"",e[2]):fy(e[0],[],"",e[1]);return new SL(t)}var d7=class extends wf{constructor(t){super("Unknown type"),this.schema=t}};function dJe(e){return e[Tn]==="Any"||e[Tn]==="Unknown"}function pf(e){return e!==void 0}function pJe(e,t,r){return!0}function mJe(e,t,r){if(!Pg(r)||pf(e.minItems)&&!(r.length>=e.minItems)||pf(e.maxItems)&&!(r.length<=e.maxItems)||!r.every(s=>hy(e.items,t,s))||e.uniqueItems===!0&&!function(){let s=new Set;for(let o of r){let a=TD(o);if(s.has(a))return!1;s.add(a)}return!0}())return!1;if(!(pf(e.contains)||zm(e.minContains)||zm(e.maxContains)))return!0;let n=pf(e.contains)?e.contains:Jf(),i=r.reduce((s,o)=>hy(n,t,o)?s+1:s,0);return!(i===0||zm(e.minContains)&&i<e.minContains||zm(e.maxContains)&&i>e.maxContains)}function fJe(e,t,r){return mL(r)}function hJe(e,t,r){return!(!Kb(r)||pf(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||pf(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||pf(e.maximum)&&!(r<=e.maximum)||pf(e.minimum)&&!(r>=e.minimum)||pf(e.multipleOf)&&r%e.multipleOf!==BigInt(0))}function gJe(e,t,r){return Kx(r)}function yJe(e,t,r){return hy(e.returns,t,r.prototype)}function bJe(e,t,r){return!(!ID(r)||pf(e.exclusiveMaximumTimestamp)&&!(r.getTime()<e.exclusiveMaximumTimestamp)||pf(e.exclusiveMinimumTimestamp)&&!(r.getTime()>e.exclusiveMinimumTimestamp)||pf(e.maximumTimestamp)&&!(r.getTime()<=e.maximumTimestamp)||pf(e.minimumTimestamp)&&!(r.getTime()>=e.minimumTimestamp)||pf(e.multipleOfTimestamp)&&r.getTime()%e.multipleOfTimestamp!==0)}function SJe(e,t,r){return yL(r)}function vJe(e,t,r){return!(!gL(r)||pf(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||pf(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||pf(e.maximum)&&!(r<=e.maximum)||pf(e.minimum)&&!(r>=e.minimum)||pf(e.multipleOf)&&r%e.multipleOf!==0)}function _Je(e,t,r){let n=e.allOf.every(i=>hy(i,t,r));if(e.unevaluatedProperties===!1){let i=new RegExp(o_(e)),s=Object.getOwnPropertyNames(r).every(o=>i.test(o));return n&&s}else if(ff(e.unevaluatedProperties)){let i=new RegExp(o_(e)),s=Object.getOwnPropertyNames(r).every(o=>i.test(o)||hy(e.unevaluatedProperties,t,r[o]));return n&&s}else return n}function wJe(e,t,r){return fL(r)}function CJe(e,t,r){return r===e.const}function xJe(e,t,r){return!1}function EJe(e,t,r){return!hy(e.not,t,r)}function AJe(e,t,r){return Hx(r)}function DJe(e,t,r){return!(!Ig.IsNumberLike(r)||pf(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||pf(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||pf(e.minimum)&&!(r>=e.minimum)||pf(e.maximum)&&!(r<=e.maximum)||pf(e.multipleOf)&&r%e.multipleOf!==0)}function kJe(e,t,r){if(!Ig.IsObjectLike(r)||pf(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)||pf(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties))return!1;let n=Object.getOwnPropertyNames(e.properties);for(let i of n){let s=e.properties[i];if(e.required&&e.required.includes(i)){if(!hy(s,t,r[i])||(a_(s)||dJe(s))&&!(i in r))return!1}else if(Ig.IsExactOptionalProperty(r,i)&&!hy(s,t,r[i]))return!1}if(e.additionalProperties===!1){let i=Object.getOwnPropertyNames(r);return e.required&&e.required.length===n.length&&i.length===n.length?!0:i.every(s=>n.includes(s))}else return typeof e.additionalProperties=="object"?Object.getOwnPropertyNames(r).every(s=>n.includes(s)||hy(e.additionalProperties,t,r[s])):!0}function PJe(e,t,r){return hL(r)}function IJe(e,t,r){if(!Ig.IsRecordLike(r)||pf(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)||pf(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties))return!1;let[n,i]=Object.entries(e.patternProperties)[0],s=new RegExp(n),o=Object.entries(r).every(([l,u])=>s.test(l)?hy(i,t,u):!0),a=typeof e.additionalProperties=="object"?Object.entries(r).every(([l,u])=>s.test(l)?!0:hy(e.additionalProperties,t,u)):!0,c=e.additionalProperties===!1?Object.getOwnPropertyNames(r).every(l=>s.test(l)):!0;return o&&a&&c}function RJe(e,t,r){return hy(Yg(e,t),t,r)}function OJe(e,t,r){let n=new RegExp(e.source,e.flags);return pf(e.minLength)&&!(r.length>=e.minLength)||pf(e.maxLength)&&!(r.length<=e.maxLength)?!1:n.test(r)}function FJe(e,t,r){return!Zg(r)||pf(e.minLength)&&!(r.length>=e.minLength)||pf(e.maxLength)&&!(r.length<=e.maxLength)||pf(e.pattern)&&!new RegExp(e.pattern).test(r)?!1:pf(e.format)?hb.Has(e.format)?hb.Get(e.format)(r):!1:!0}function TJe(e,t,r){return Zx(r)}function NJe(e,t,r){return Zg(r)&&new RegExp(e.pattern).test(r)}function qJe(e,t,r){return hy(Yg(e,t),t,r)}function BJe(e,t,r){if(!Pg(r)||e.items===void 0&&r.length!==0||r.length!==e.maxItems)return!1;if(!e.items)return!0;for(let n=0;n<e.items.length;n++)if(!hy(e.items[n],t,r[n]))return!1;return!0}function LJe(e,t,r){return fS(r)}function jJe(e,t,r){return e.anyOf.some(n=>hy(n,t,r))}function MJe(e,t,r){return!(!RD(r)||pf(e.maxByteLength)&&!(r.length<=e.maxByteLength)||pf(e.minByteLength)&&!(r.length>=e.minByteLength))}function $Je(e,t,r){return!0}function UJe(e,t,r){return Ig.IsVoidLike(r)}function zJe(e,t,r){return Dy.Has(e[Tn])?Dy.Get(e[Tn])(e,r):!1}function hy(e,t,r){let n=pf(e.$id)?[...t,e]:t,i=e;switch(i[Tn]){case"Any":return pJe(i,n,r);case"Array":return mJe(i,n,r);case"AsyncIterator":return fJe(i,n,r);case"BigInt":return hJe(i,n,r);case"Boolean":return gJe(i,n,r);case"Constructor":return yJe(i,n,r);case"Date":return bJe(i,n,r);case"Function":return SJe(i,n,r);case"Integer":return vJe(i,n,r);case"Intersect":return _Je(i,n,r);case"Iterator":return wJe(i,n,r);case"Literal":return CJe(i,n,r);case"Never":return xJe(i,n,r);case"Not":return EJe(i,n,r);case"Null":return AJe(i,n,r);case"Number":return DJe(i,n,r);case"Object":return kJe(i,n,r);case"Promise":return PJe(i,n,r);case"Record":return IJe(i,n,r);case"Ref":return RJe(i,n,r);case"RegExp":return OJe(i,n,r);case"String":return FJe(i,n,r);case"Symbol":return TJe(i,n,r);case"TemplateLiteral":return NJe(i,n,r);case"This":return qJe(i,n,r);case"Tuple":return BJe(i,n,r);case"Undefined":return LJe(i,n,r);case"Union":return jJe(i,n,r);case"Uint8Array":return MJe(i,n,r);case"Unknown":return $Je(i,n,r);case"Void":return UJe(i,n,r);default:if(!Dy.Has(i[Tn]))throw new d7(i);return zJe(i,n,r)}}function B1(...e){return e.length===3?hy(e[0],e[1],e[2]):hy(e[0],[],e[1])}var vL=class extends wf{constructor(t,r,n){super("Unable to decode value as it does not match the expected schema"),this.schema=t,this.value=r,this.error=n}},p7=class extends wf{constructor(t,r,n,i){super(i instanceof Error?i.message:"Unknown error"),this.schema=t,this.path=r,this.value=n,this.error=i}};function rg(e,t,r){try{return Ph(e)?e[gg].Decode(r):r}catch(n){throw new p7(e,t,r,n)}}function GJe(e,t,r,n){return Pg(n)?rg(e,r,n.map((i,s)=>HS(e.items,t,`${r}/${s}`,i))):rg(e,r,n)}function VJe(e,t,r,n){if(!WS(n)||bL(n))return rg(e,r,n);let i=rB(e),s=i.map(u=>u[0]),o={...n};for(let[u,m]of i)u in o&&(o[u]=HS(m,t,`${r}/${u}`,o[u]));if(!Ph(e.unevaluatedProperties))return rg(e,r,o);let a=Object.getOwnPropertyNames(o),c=e.unevaluatedProperties,l={...o};for(let u of a)s.includes(u)||(l[u]=rg(c,`${r}/${u}`,l[u]));return rg(e,r,l)}function XJe(e,t,r,n){return rg(e,r,HS(e.not,t,r,n))}function WJe(e,t,r,n){if(!WS(n))return rg(e,r,n);let i=x0(e),s={...n};for(let l of i)l in s&&(s[l]=HS(e.properties[l],t,`${r}/${l}`,s[l]));if(!ff(e.additionalProperties))return rg(e,r,s);let o=Object.getOwnPropertyNames(s),a=e.additionalProperties,c={...s};for(let l of o)i.includes(l)||(c[l]=rg(a,`${r}/${l}`,c[l]));return rg(e,r,c)}function HJe(e,t,r,n){if(!WS(n))return rg(e,r,n);let i=Object.getOwnPropertyNames(e.patternProperties)[0],s=new RegExp(i),o={...n};for(let u of Object.getOwnPropertyNames(n))s.test(u)&&(o[u]=HS(e.patternProperties[i],t,`${r}/${u}`,o[u]));if(!ff(e.additionalProperties))return rg(e,r,o);let a=Object.getOwnPropertyNames(o),c=e.additionalProperties,l={...o};for(let u of a)s.test(u)||(l[u]=rg(c,`${r}/${u}`,l[u]));return rg(e,r,l)}function KJe(e,t,r,n){let i=Yg(e,t);return rg(e,r,HS(i,t,r,n))}function ZJe(e,t,r,n){let i=Yg(e,t);return rg(e,r,HS(i,t,r,n))}function YJe(e,t,r,n){return Pg(n)&&Pg(e.items)?rg(e,r,e.items.map((i,s)=>HS(i,t,`${r}/${s}`,n[s]))):rg(e,r,n)}function JJe(e,t,r,n){for(let i of e.anyOf){if(!B1(i,t,n))continue;let s=HS(i,t,r,n);return rg(e,r,s)}return rg(e,r,n)}function HS(e,t,r,n){let i=typeof e.$id=="string"?[...t,e]:t,s=e;switch(e[Tn]){case"Array":return GJe(s,i,r,n);case"Intersect":return VJe(s,i,r,n);case"Not":return XJe(s,i,r,n);case"Object":return WJe(s,i,r,n);case"Record":return HJe(s,i,r,n);case"Ref":return KJe(s,i,r,n);case"Symbol":return rg(s,r,n);case"This":return ZJe(s,i,r,n);case"Tuple":return YJe(s,i,r,n);case"Union":return JJe(s,i,r,n);default:return rg(s,r,n)}}function Jhe(e,t,r){return HS(e,t,"",r)}var _L=class extends wf{constructor(t,r,n){super("The encoded value does not match the expected schema"),this.schema=t,this.value=r,this.error=n}},m7=class extends wf{constructor(t,r,n,i){super(`${i instanceof Error?i.message:"Unknown error"}`),this.schema=t,this.path=r,this.value=n,this.error=i}};function Jg(e,t,r){try{return Ph(e)?e[gg].Encode(r):r}catch(n){throw new m7(e,t,r,n)}}function QJe(e,t,r,n){let i=Jg(e,r,n);return Pg(i)?i.map((s,o)=>KS(e.items,t,`${r}/${o}`,s)):i}function eQe(e,t,r,n){let i=Jg(e,r,n);if(!WS(n)||bL(n))return i;let s=rB(e),o=s.map(m=>m[0]),a={...i};for(let[m,f]of s)m in a&&(a[m]=KS(f,t,`${r}/${m}`,a[m]));if(!Ph(e.unevaluatedProperties))return Jg(e,r,a);let c=Object.getOwnPropertyNames(a),l=e.unevaluatedProperties,u={...a};for(let m of c)o.includes(m)||(u[m]=Jg(l,`${r}/${m}`,u[m]));return u}function tQe(e,t,r,n){return Jg(e.not,r,Jg(e,r,n))}function rQe(e,t,r,n){let i=Jg(e,r,n);if(!WS(i))return i;let s=x0(e),o={...i};for(let u of s)u in o&&(o[u]=KS(e.properties[u],t,`${r}/${u}`,o[u]));if(!ff(e.additionalProperties))return o;let a=Object.getOwnPropertyNames(o),c=e.additionalProperties,l={...o};for(let u of a)s.includes(u)||(l[u]=Jg(c,`${r}/${u}`,l[u]));return l}function nQe(e,t,r,n){let i=Jg(e,r,n);if(!WS(n))return i;let s=Object.getOwnPropertyNames(e.patternProperties)[0],o=new RegExp(s),a={...i};for(let m of Object.getOwnPropertyNames(n))o.test(m)&&(a[m]=KS(e.patternProperties[s],t,`${r}/${m}`,a[m]));if(!ff(e.additionalProperties))return Jg(e,r,a);let c=Object.getOwnPropertyNames(a),l=e.additionalProperties,u={...a};for(let m of c)o.test(m)||(u[m]=Jg(l,`${r}/${m}`,u[m]));return u}function iQe(e,t,r,n){let i=Yg(e,t),s=KS(i,t,r,n);return Jg(e,r,s)}function sQe(e,t,r,n){let i=Yg(e,t),s=KS(i,t,r,n);return Jg(e,r,s)}function oQe(e,t,r,n){let i=Jg(e,r,n);return Pg(e.items)?e.items.map((s,o)=>KS(s,t,`${r}/${o}`,i[o])):[]}function aQe(e,t,r,n){for(let i of e.anyOf){if(!B1(i,t,n))continue;let s=KS(i,t,r,n);return Jg(e,r,s)}for(let i of e.anyOf){let s=KS(i,t,r,n);if(!!B1(e,t,s))return Jg(e,r,s)}return Jg(e,r,n)}function KS(e,t,r,n){let i=typeof e.$id=="string"?[...t,e]:t,s=e;switch(e[Tn]){case"Array":return QJe(s,i,r,n);case"Intersect":return eQe(s,i,r,n);case"Not":return tQe(s,i,r,n);case"Object":return rQe(s,i,r,n);case"Record":return nQe(s,i,r,n);case"Ref":return iQe(s,i,r,n);case"This":return sQe(s,i,r,n);case"Tuple":return oQe(s,i,r,n);case"Union":return aQe(s,i,r,n);default:return Jg(s,r,n)}}function Qhe(e,t,r){return KS(e,t,"",r)}function cQe(e,t){return Ph(e)||Qg(e.items,t)}function lQe(e,t){return Ph(e)||Qg(e.items,t)}function uQe(e,t){return Ph(e)||Qg(e.returns,t)||e.parameters.some(r=>Qg(r,t))}function dQe(e,t){return Ph(e)||Qg(e.returns,t)||e.parameters.some(r=>Qg(r,t))}function pQe(e,t){return Ph(e)||Ph(e.unevaluatedProperties)||e.allOf.some(r=>Qg(r,t))}function mQe(e,t){return Ph(e)||Qg(e.items,t)}function fQe(e,t){return Ph(e)||Qg(e.not,t)}function hQe(e,t){return Ph(e)||Object.values(e.properties).some(r=>Qg(r,t))||ff(e.additionalProperties)&&Qg(e.additionalProperties,t)}function gQe(e,t){return Ph(e)||Qg(e.item,t)}function yQe(e,t){let r=Object.getOwnPropertyNames(e.patternProperties)[0],n=e.patternProperties[r];return Ph(e)||Qg(n,t)||ff(e.additionalProperties)&&Ph(e.additionalProperties)}function bQe(e,t){return Ph(e)?!0:Qg(Yg(e,t),t)}function SQe(e,t){return Ph(e)?!0:Qg(Yg(e,t),t)}function vQe(e,t){return Ph(e)||!fS(e.items)&&e.items.some(r=>Qg(r,t))}function _Qe(e,t){return Ph(e)||e.anyOf.some(r=>Qg(r,t))}function Qg(e,t){let r=Zg(e.$id)?[...t,e]:t,n=e;if(e.$id&&f7.has(e.$id))return!1;switch(e.$id&&f7.add(e.$id),e[Tn]){case"Array":return cQe(n,r);case"AsyncIterator":return lQe(n,r);case"Constructor":return uQe(n,r);case"Function":return dQe(n,r);case"Intersect":return pQe(n,r);case"Iterator":return mQe(n,r);case"Not":return fQe(n,r);case"Object":return hQe(n,r);case"Promise":return gQe(n,r);case"Record":return yQe(n,r);case"Ref":return bQe(n,r);case"This":return SQe(n,r);case"Tuple":return vQe(n,r);case"Union":return _Qe(n,r);default:return Ph(e)}}var f7=new Set;function ege(e,t){return f7.clear(),Qg(e,t)}var h7=class{constructor(t,r,n,i){this.schema=t,this.references=r,this.checkFunc=n,this.code=i,this.hasTransform=ege(t,r)}Code(){return this.code}Errors(t){return Yhe(this.schema,this.references,t)}Check(t){return this.checkFunc(t)}Decode(t){if(!this.checkFunc(t))throw new vL(this.schema,t,this.Errors(t).First());return this.hasTransform?Jhe(this.schema,this.references,t):t}Encode(t){let r=this.hasTransform?Qhe(this.schema,this.references,t):t;if(!this.checkFunc(r))throw new _L(this.schema,t,this.Errors(t).First());return r}},d_;(function(e){function t(s){return s===36}e.DollarSign=t;function r(s){return s===95}e.IsUnderscore=r;function n(s){return s>=65&&s<=90||s>=97&&s<=122}e.IsAlpha=n;function i(s){return s>=48&&s<=57}e.IsNumeric=i})(d_||(d_={}));var wL;(function(e){function t(s){return s.length===0?!1:d_.IsNumeric(s.charCodeAt(0))}function r(s){if(t(s))return!1;for(let o=0;o<s.length;o++){let a=s.charCodeAt(o);if(!(d_.IsAlpha(a)||d_.IsNumeric(a)||d_.DollarSign(a)||d_.IsUnderscore(a)))return!1}return!0}function n(s){return s.replace(/'/g,"\\'")}function i(s,o){return r(o)?`${s}.${o}`:`${s}['${n(o)}']`}e.Encode=i})(wL||(wL={}));var g7;(function(e){function t(r){let n=[];for(let i=0;i<r.length;i++){let s=r.charCodeAt(i);d_.IsNumeric(s)||d_.IsAlpha(s)?n.push(r.charAt(i)):n.push(`_${s}_`)}return n.join("").replace(/__/g,"_")}e.Encode=t})(g7||(g7={}));var y7;(function(e){function t(r){return r.replace(/'/g,"\\'")}e.Escape=t})(y7||(y7={}));var b7=class extends wf{constructor(t){super("Unknown type"),this.schema=t}},CL=class extends wf{constructor(t){super("Preflight validation check failed to guard for the given schema"),this.schema=t}},Yx;(function(e){function t(o,a,c){return Ig.ExactOptionalPropertyTypes?`('${a}' in ${o} ? ${c} : true)`:`(${wL.Encode(o,a)} !== undefined ? ${c} : true)`}e.IsExactOptionalProperty=t;function r(o){return Ig.AllowArrayObject?`(typeof ${o} === 'object' && ${o} !== null)`:`(typeof ${o} === 'object' && ${o} !== null && !Array.isArray(${o}))`}e.IsObjectLike=r;function n(o){return Ig.AllowArrayObject?`(typeof ${o} === 'object' && ${o} !== null && !(${o} instanceof Date) && !(${o} instanceof Uint8Array))`:`(typeof ${o} === 'object' && ${o} !== null && !Array.isArray(${o}) && !(${o} instanceof Date) && !(${o} instanceof Uint8Array))`}e.IsRecordLike=n;function i(o){return Ig.AllowNaN?`typeof ${o} === 'number'`:`Number.isFinite(${o})`}e.IsNumberLike=i;function s(o){return Ig.AllowNullVoid?`(${o} === undefined || ${o} === null)`:`${o} === undefined`}e.IsVoidLike=s})(Yx||(Yx={}));var fd;(function(e){function t(ue){return ue[Tn]==="Any"||ue[Tn]==="Unknown"}function*r(ue,co,et){yield"true"}function*n(ue,co,et){yield`Array.isArray(${et})`;let[ru,Wl]=[uo("value","any"),uo("acc","number")];zm(ue.maxItems)&&(yield`${et}.length <= ${ue.maxItems}`),zm(ue.minItems)&&(yield`${et}.length >= ${ue.minItems}`);let Vl=ap(ue.items,co,"value");if(yield`${et}.every((${ru}) => ${Vl})`,ff(ue.contains)||zm(ue.minContains)||zm(ue.maxContains)){let pe=ff(ue.contains)?ue.contains:Jf(),Ue=ap(pe,co,"value"),In=zm(ue.minContains)?[`(count >= ${ue.minContains})`]:[],wr=zm(ue.maxContains)?[`(count <= ${ue.maxContains})`]:[],nt=`const count = value.reduce((${Wl}, ${ru}) => ${Ue} ? acc + 1 : acc, 0)`,Wo=["(count > 0)",...In,...wr].join(" && ");yield`((${ru}) => { ${nt}; return ${Wo}})(${et})`}ue.uniqueItems===!0&&(yield`((${ru}) => { const set = new Set(); for(const element of value) { const hashed = hash(element); if(set.has(hashed)) { return false } else { set.add(hashed) } } return true } )(${et})`)}function*i(ue,co,et){yield`(typeof value === 'object' && Symbol.asyncIterator in ${et})`}function*s(ue,co,et){yield`(typeof ${et} === 'bigint')`,Kb(ue.exclusiveMaximum)&&(yield`${et} < BigInt(${ue.exclusiveMaximum})`),Kb(ue.exclusiveMinimum)&&(yield`${et} > BigInt(${ue.exclusiveMinimum})`),Kb(ue.maximum)&&(yield`${et} <= BigInt(${ue.maximum})`),Kb(ue.minimum)&&(yield`${et} >= BigInt(${ue.minimum})`),Kb(ue.multipleOf)&&(yield`(${et} % BigInt(${ue.multipleOf})) === 0`)}function*o(ue,co,et){yield`(typeof ${et} === 'boolean')`}function*a(ue,co,et){yield*Su(ue.returns,co,`${et}.prototype`)}function*c(ue,co,et){yield`(${et} instanceof Date) && Number.isFinite(${et}.getTime())`,zm(ue.exclusiveMaximumTimestamp)&&(yield`${et}.getTime() < ${ue.exclusiveMaximumTimestamp}`),zm(ue.exclusiveMinimumTimestamp)&&(yield`${et}.getTime() > ${ue.exclusiveMinimumTimestamp}`),zm(ue.maximumTimestamp)&&(yield`${et}.getTime() <= ${ue.maximumTimestamp}`),zm(ue.minimumTimestamp)&&(yield`${et}.getTime() >= ${ue.minimumTimestamp}`),zm(ue.multipleOfTimestamp)&&(yield`(${et}.getTime() % ${ue.multipleOfTimestamp}) === 0`)}function*l(ue,co,et){yield`(typeof ${et} === 'function')`}function*u(ue,co,et){yield`Number.isInteger(${et})`,zm(ue.exclusiveMaximum)&&(yield`${et} < ${ue.exclusiveMaximum}`),zm(ue.exclusiveMinimum)&&(yield`${et} > ${ue.exclusiveMinimum}`),zm(ue.maximum)&&(yield`${et} <= ${ue.maximum}`),zm(ue.minimum)&&(yield`${et} >= ${ue.minimum}`),zm(ue.multipleOf)&&(yield`(${et} % ${ue.multipleOf}) === 0`)}function*m(ue,co,et){let ru=ue.allOf.map(Wl=>ap(Wl,co,et)).join(" && ");if(ue.unevaluatedProperties===!1){let Wl=Ah(`${new RegExp(o_(ue))};`),Vl=`Object.getOwnPropertyNames(${et}).every(key => ${Wl}.test(key))`;yield`(${ru} && ${Vl})`}else if(ff(ue.unevaluatedProperties)){let Wl=Ah(`${new RegExp(o_(ue))};`),Vl=`Object.getOwnPropertyNames(${et}).every(key => ${Wl}.test(key) || ${ap(ue.unevaluatedProperties,co,`${et}[key]`)})`;yield`(${ru} && ${Vl})`}else yield`(${ru})`}function*f(ue,co,et){yield`(typeof value === 'object' && Symbol.iterator in ${et})`}function*y(ue,co,et){typeof ue.const=="number"||typeof ue.const=="boolean"?yield`(${et} === ${ue.const})`:yield`(${et} === '${y7.Escape(ue.const)}')`}function*C(ue,co,et){yield"false"}function*x(ue,co,et){yield`(!${ap(ue.not,co,et)})`}function*I(ue,co,et){yield`(${et} === null)`}function*F(ue,co,et){yield Yx.IsNumberLike(et),zm(ue.exclusiveMaximum)&&(yield`${et} < ${ue.exclusiveMaximum}`),zm(ue.exclusiveMinimum)&&(yield`${et} > ${ue.exclusiveMinimum}`),zm(ue.maximum)&&(yield`${et} <= ${ue.maximum}`),zm(ue.minimum)&&(yield`${et} >= ${ue.minimum}`),zm(ue.multipleOf)&&(yield`(${et} % ${ue.multipleOf}) === 0`)}function*T(ue,co,et){yield Yx.IsObjectLike(et),zm(ue.minProperties)&&(yield`Object.getOwnPropertyNames(${et}).length >= ${ue.minProperties}`),zm(ue.maxProperties)&&(yield`Object.getOwnPropertyNames(${et}).length <= ${ue.maxProperties}`);let ru=Object.getOwnPropertyNames(ue.properties);for(let Wl of ru){let Vl=wL.Encode(et,Wl),pe=ue.properties[Wl];if(ue.required&&ue.required.includes(Wl))yield*Su(pe,co,Vl),(a_(pe)||t(pe))&&(yield`('${Wl}' in ${et})`);else{let Ue=ap(pe,co,Vl);yield Yx.IsExactOptionalProperty(et,Wl,Ue)}}if(ue.additionalProperties===!1)if(ue.required&&ue.required.length===ru.length)yield`Object.getOwnPropertyNames(${et}).length === ${ru.length}`;else{let Wl=`[${ru.map(Vl=>`'${Vl}'`).join(", ")}]`;yield`Object.getOwnPropertyNames(${et}).every(key => ${Wl}.includes(key))`}if(typeof ue.additionalProperties=="object"){let Wl=ap(ue.additionalProperties,co,`${et}[key]`),Vl=`[${ru.map(pe=>`'${pe}'`).join(", ")}]`;yield`(Object.getOwnPropertyNames(${et}).every(key => ${Vl}.includes(key) || ${Wl}))`}}function*M(ue,co,et){yield`(typeof value === 'object' && typeof ${et}.then === 'function')`}function*Y(ue,co,et){yield Yx.IsRecordLike(et),zm(ue.minProperties)&&(yield`Object.getOwnPropertyNames(${et}).length >= ${ue.minProperties}`),zm(ue.maxProperties)&&(yield`Object.getOwnPropertyNames(${et}).length <= ${ue.maxProperties}`);let[ru,Wl]=Object.entries(ue.patternProperties)[0],Vl=Ah(`${new RegExp(ru)}`),pe=ap(Wl,co,"value"),Ue=ff(ue.additionalProperties)?ap(ue.additionalProperties,co,et):ue.additionalProperties===!1?"false":"true",In=`(${Vl}.test(key) ? ${pe} : ${Ue})`;yield`(Object.entries(${et}).every(([key, value]) => ${In}))`}function*de(ue,co,et){let ru=Yg(ue,co);if(Ym.functions.has(ue.$ref))return yield`${vf(ue.$ref)}(${et})`;yield*Su(ru,co,et)}function*Fn(ue,co,et){let ru=Ah(`${new RegExp(ue.source,ue.flags)};`);yield`(typeof ${et} === 'string')`,zm(ue.maxLength)&&(yield`${et}.length <= ${ue.maxLength}`),zm(ue.minLength)&&(yield`${et}.length >= ${ue.minLength}`),yield`${ru}.test(${et})`}function*ql(ue,co,et){yield`(typeof ${et} === 'string')`,zm(ue.maxLength)&&(yield`${et}.length <= ${ue.maxLength}`),zm(ue.minLength)&&(yield`${et}.length >= ${ue.minLength}`),ue.pattern!==void 0&&(yield`${Ah(`${new RegExp(ue.pattern)};`)}.test(${et})`),ue.format!==void 0&&(yield`format('${ue.format}', ${et})`)}function*To(ue,co,et){yield`(typeof ${et} === 'symbol')`}function*Jl(ue,co,et){yield`(typeof ${et} === 'string')`,yield`${Ah(`${new RegExp(ue.pattern)};`)}.test(${et})`}function*Go(ue,co,et){yield`${vf(ue.$ref)}(${et})`}function*vr(ue,co,et){if(yield`Array.isArray(${et})`,ue.items===void 0)return yield`${et}.length === 0`;yield`(${et}.length === ${ue.maxItems})`;for(let ru=0;ru<ue.items.length;ru++)yield`${ap(ue.items[ru],co,`${et}[${ru}]`)}`}function*ns(ue,co,et){yield`${et} === undefined`}function*Yl(ue,co,et){yield`(${ue.anyOf.map(Wl=>ap(Wl,co,et)).join(" || ")})`}function*Ql(ue,co,et){yield`${et} instanceof Uint8Array`,zm(ue.maxByteLength)&&(yield`(${et}.length <= ${ue.maxByteLength})`),zm(ue.minByteLength)&&(yield`(${et}.length >= ${ue.minByteLength})`)}function*Nu(ue,co,et){yield"true"}function*nd(ue,co,et){yield Yx.IsVoidLike(et)}function*Bl(ue,co,et){let ru=Ym.instances.size;Ym.instances.set(ru,ue),yield`kind('${ue[Tn]}', ${ru}, ${et})`}function*Su(ue,co,et,ru=!0){let Wl=Zg(ue.$id)?[...co,ue]:co,Vl=ue;if(ru&&Zg(ue.$id)){let pe=vf(ue.$id);if(Ym.functions.has(pe))return yield`${pe}(${et})`;{let Ue=lo(pe,ue,co,"value",!1);return Ym.functions.set(pe,Ue),yield`${pe}(${et})`}}switch(Vl[Tn]){case"Any":return yield*r(Vl,Wl,et);case"Array":return yield*n(Vl,Wl,et);case"AsyncIterator":return yield*i(Vl,Wl,et);case"BigInt":return yield*s(Vl,Wl,et);case"Boolean":return yield*o(Vl,Wl,et);case"Constructor":return yield*a(Vl,Wl,et);case"Date":return yield*c(Vl,Wl,et);case"Function":return yield*l(Vl,Wl,et);case"Integer":return yield*u(Vl,Wl,et);case"Intersect":return yield*m(Vl,Wl,et);case"Iterator":return yield*f(Vl,Wl,et);case"Literal":return yield*y(Vl,Wl,et);case"Never":return yield*C(Vl,Wl,et);case"Not":return yield*x(Vl,Wl,et);case"Null":return yield*I(Vl,Wl,et);case"Number":return yield*F(Vl,Wl,et);case"Object":return yield*T(Vl,Wl,et);case"Promise":return yield*M(Vl,Wl,et);case"Record":return yield*Y(Vl,Wl,et);case"Ref":return yield*de(Vl,Wl,et);case"RegExp":return yield*Fn(Vl,Wl,et);case"String":return yield*ql(Vl,Wl,et);case"Symbol":return yield*To(Vl,Wl,et);case"TemplateLiteral":return yield*Jl(Vl,Wl,et);case"This":return yield*Go(Vl,Wl,et);case"Tuple":return yield*vr(Vl,Wl,et);case"Undefined":return yield*ns(Vl,Wl,et);case"Union":return yield*Yl(Vl,Wl,et);case"Uint8Array":return yield*Ql(Vl,Wl,et);case"Unknown":return yield*Nu(Vl,Wl,et);case"Void":return yield*nd(Vl,Wl,et);default:if(!Dy.Has(Vl[Tn]))throw new b7(ue);return yield*Bl(Vl,Wl,et)}}let Ym={language:"javascript",functions:new Map,variables:new Map,instances:new Map};function ap(ue,co,et,ru=!0){return`(${[...Su(ue,co,et,ru)].join(" && ")})`}function vf(ue){return`check_${g7.Encode(ue)}`}function Ah(ue){let co=`local_${Ym.variables.size}`;return Ym.variables.set(co,`const ${co} = ${ue}`),co}function lo(ue,co,et,ru,Wl=!0){let[Vl,pe]=[`
421
+ `,RZe=R1.encode(Ew),OZe=2,kH=class{constructor(t,r){let{escapeName:n}=this.constructor,i=at.isString(r),s=`Content-Disposition: form-data; name="${n(t)}"${!i&&r.name?`; filename="${n(r.name)}"`:""}${Ew}`;i?r=R1.encode(String(r).replace(/\r?\n|\r\n?/g,Ew)):s+=`Content-Type: ${r.type||"application/octet-stream"}${Ew}`,this.headers=R1.encode(s+Ew),this.contentLength=i?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+OZe,this.name=t,this.value=r}async*encode(){yield this.headers;let{value:t}=this;at.isTypedArray(t)?yield t:yield*wB(t),yield RZe}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},FZe=(e,t,r)=>{let{tag:n="form-data-boundary",size:i=25,boundary:s=n+"-"+at.generateString(i,IZe)}=r||{};if(!at.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=R1.encode("--"+s+Ew),a=R1.encode("--"+s+"--"+Ew+Ew),c=a.byteLength,l=Array.from(e.entries()).map(([m,f])=>{let y=new kH(m,f);return c+=y.size,y});c+=o.byteLength*l.length,c=at.toFiniteNumber(c);let u={"Content-Type":`multipart/form-data; boundary=${s}`};return Number.isFinite(c)&&(u["Content-Length"]=c),t&&t(u),ahe.Readable.from(async function*(){for(let m of l)yield o,yield*m.encode();yield a}())},che=FZe;var lhe=Kl(require("stream"),1),PH=class extends lhe.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)}},uhe=PH;var TZe=(e,t)=>at.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,dhe=TZe;var phe={flush:c_.default.constants.Z_SYNC_FLUSH,finishFlush:c_.default.constants.Z_SYNC_FLUSH},NZe={flush:c_.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:c_.default.constants.BROTLI_OPERATION_FLUSH},mhe=at.isFunction(c_.default.createBrotliDecompress),{http:qZe,https:BZe}=She.default,LZe=/https:?/,fhe=kg.protocols.map(e=>e+":");function jZe(e){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e)}function _he(e,t,r){let n=t;if(!n&&n!==!1){let i=(0,hhe.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){_he(s,t,s.href)}}var MZe=typeof process<"u"&&at.kindOf(process)==="process",$Ze=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)}),whe=MZe&&function(t){return $Ze(async function(n,i,s){let{data:o,lookup:a,family:c}=t,{responseType:l,responseEncoding:u}=t,m=t.method.toUpperCase(),f,y=!1,C;a&&at.isAsyncFn(a)&&(a=dhe(a,Bl=>{if(at.isString(Bl))Bl=[Bl,Bl.indexOf(".")<0?6:4];else if(!at.isArray(Bl))throw new TypeError("lookup async function must return an array [ip: string, family: number]]");return Bl}));let x=new vhe.default,I=()=>{t.cancelToken&&t.cancelToken.unsubscribe(F),t.signal&&t.signal.removeEventListener("abort",F),x.removeAllListeners()};s((Bl,Su)=>{f=!0,Su&&(y=!0,I())});function F(Bl){x.emit("abort",!Bl||Bl.type?new pS(null,t,C):Bl)}x.once("abort",i),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(F),t.signal&&(t.signal.aborted?F():t.signal.addEventListener("abort",F)));let T=Nx(t.baseURL,t.url),M=new URL(T,"http://localhost"),Y=M.protocol||fhe[0];if(Y==="data:"){let Bl;if(m!=="GET")return xw(n,i,{status:405,statusText:"method not allowed",headers:{},config:t});try{Bl=EH(t.url,l==="blob",{Blob:t.env&&t.env.Blob})}catch(Su){throw Vu.from(Su,Vu.ERR_BAD_REQUEST,t)}return l==="text"?(Bl=Bl.toString(u),(!u||u==="utf8")&&(Bl=at.stripBOM(Bl))):l==="stream"&&(Bl=Mx.default.Readable.from(Bl)),xw(n,i,{data:Bl,status:200,statusText:"OK",headers:new zg,config:t})}if(fhe.indexOf(Y)===-1)return i(new Vu("Unsupported protocol "+Y,Vu.ERR_BAD_REQUEST,t));let de=zg.from(t.headers).normalize();de.set("User-Agent","axios/"+jx,!1);let Fn=t.onDownloadProgress,ql=t.onUploadProgress,To=t.maxRate,Jl,Go;if(at.isSpecCompliantForm(o)){let Bl=de.getContentType(/boundary=([-_\w\d]{10,70})/i);o=che(o,Su=>{de.set(Su)},{tag:`axios-${jx}-boundary`,boundary:Bl&&Bl[1]||void 0})}else if(at.isFormData(o)&&at.isFunction(o.getHeaders)){if(de.set(o.getHeaders()),!de.hasContentLength())try{let Bl=await bhe.default.promisify(o.getLength).call(o);Number.isFinite(Bl)&&Bl>=0&&de.setContentLength(Bl)}catch{}}else if(at.isBlob(o))o.size&&de.setContentType(o.type||"application/octet-stream"),de.setContentLength(o.size||0),o=Mx.default.Readable.from(wB(o));else if(o&&!at.isStream(o)){if(!Buffer.isBuffer(o))if(at.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else if(at.isString(o))o=Buffer.from(o,"utf-8");else return i(new Vu("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Vu.ERR_BAD_REQUEST,t));if(de.setContentLength(o.length,!1),t.maxBodyLength>-1&&o.length>t.maxBodyLength)return i(new Vu("Request body larger than maxBodyLength limit",Vu.ERR_BAD_REQUEST,t))}let vr=at.toFiniteNumber(de.getContentLength());at.isArray(To)?(Jl=To[0],Go=To[1]):Jl=Go=To,o&&(ql||Jl)&&(at.isStream(o)||(o=Mx.default.Readable.from(o,{objectMode:!1})),o=Mx.default.pipeline([o,new DH({length:vr,maxRate:at.toFiniteNumber(Jl)})],at.noop),ql&&o.on("progress",Bl=>{ql(Object.assign(Bl,{upload:!0}))}));let ns;if(t.auth){let Bl=t.auth.username||"",Su=t.auth.password||"";ns=Bl+":"+Su}if(!ns&&M.username){let Bl=M.username,Su=M.password;ns=Bl+":"+Su}ns&&de.delete("authorization");let Yl;try{Yl=Tx(M.pathname+M.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(Bl){let Su=new Error(Bl.message);return Su.config=t,Su.url=t.url,Su.exists=!0,i(Su)}de.set("Accept-Encoding","gzip, compress, deflate"+(mhe?", br":""),!1);let Ql={path:Yl,method:m,headers:de.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:ns,protocol:Y,family:c,lookup:a,beforeRedirect:jZe,beforeRedirects:{}};t.socketPath?Ql.socketPath=t.socketPath:(Ql.hostname=M.hostname,Ql.port=M.port,_he(Ql,t.proxy,Y+"//"+M.hostname+(M.port?":"+M.port:"")+Ql.path));let Nu,nd=LZe.test(Ql.protocol);if(Ql.agent=nd?t.httpsAgent:t.httpAgent,t.transport?Nu=t.transport:t.maxRedirects===0?Nu=nd?yhe.default:ghe.default:(t.maxRedirects&&(Ql.maxRedirects=t.maxRedirects),t.beforeRedirect&&(Ql.beforeRedirects.config=t.beforeRedirect),Nu=nd?BZe:qZe),t.maxBodyLength>-1?Ql.maxBodyLength=t.maxBodyLength:Ql.maxBodyLength=1/0,t.insecureHTTPParser&&(Ql.insecureHTTPParser=t.insecureHTTPParser),C=Nu.request(Ql,function(Su){if(C.destroyed)return;let Ym=[Su],ap=+Su.headers["content-length"];if(Fn){let Dd=new DH({length:at.toFiniteNumber(ap),maxRate:at.toFiniteNumber(Go)});Fn&&Dd.on("progress",Xl=>{Fn(Object.assign(Xl,{download:!0}))}),Ym.push(Dd)}let vf=Su,Ah=Su.req||C;if(t.decompress!==!1&&Su.headers["content-encoding"])switch((m==="HEAD"||Su.statusCode===204)&&delete Su.headers["content-encoding"],Su.headers["content-encoding"]){case"gzip":case"x-gzip":case"compress":case"x-compress":Ym.push(c_.default.createUnzip(phe)),delete Su.headers["content-encoding"];break;case"deflate":Ym.push(new uhe),Ym.push(c_.default.createUnzip(phe)),delete Su.headers["content-encoding"];break;case"br":mhe&&(Ym.push(c_.default.createBrotliDecompress(NZe)),delete Su.headers["content-encoding"])}vf=Ym.length>1?Mx.default.pipeline(Ym,at.noop):Ym[0];let lo=Mx.default.finished(vf,()=>{lo(),I()}),uo={status:Su.statusCode,statusText:Su.statusMessage,headers:new zg(Su.headers),config:t,request:Ah};if(l==="stream")uo.data=vf,xw(n,i,uo);else{let Dd=[],Xl=0;vf.on("data",function(pd){Dd.push(pd),Xl+=pd.length,t.maxContentLength>-1&&Xl>t.maxContentLength&&(y=!0,vf.destroy(),i(new Vu("maxContentLength size of "+t.maxContentLength+" exceeded",Vu.ERR_BAD_RESPONSE,t,Ah)))}),vf.on("aborted",function(){if(y)return;let pd=new Vu("maxContentLength size of "+t.maxContentLength+" exceeded",Vu.ERR_BAD_RESPONSE,t,Ah);vf.destroy(pd),i(pd)}),vf.on("error",function(pd){C.destroyed||i(Vu.from(pd,null,t,Ah))}),vf.on("end",function(){try{let pd=Dd.length===1?Dd[0]:Buffer.concat(Dd);l!=="arraybuffer"&&(pd=pd.toString(u),(!u||u==="utf8")&&(pd=at.stripBOM(pd))),uo.data=pd}catch(pd){i(Vu.from(pd,null,t,uo.request,uo))}xw(n,i,uo)})}x.once("abort",Dd=>{vf.destroyed||(vf.emit("error",Dd),vf.destroy())})}),x.once("abort",Bl=>{i(Bl),C.destroy(Bl)}),C.on("error",function(Su){i(Vu.from(Su,null,t,C))}),C.on("socket",function(Su){Su.setKeepAlive(!0,1e3*60)}),t.timeout){let Bl=parseInt(t.timeout,10);if(isNaN(Bl)){i(new Vu("error trying to parse `config.timeout` to int",Vu.ERR_BAD_OPTION_VALUE,t,C));return}C.setTimeout(Bl,function(){if(f)return;let Ym=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",ap=t.transitional||hD;t.timeoutErrorMessage&&(Ym=t.timeoutErrorMessage),i(new Vu(Ym,ap.clarifyTimeoutError?Vu.ETIMEDOUT:Vu.ECONNABORTED,t,C)),F()})}if(at.isStream(o)){let Bl=!1,Su=!1;o.on("end",()=>{Bl=!0}),o.once("error",Ym=>{Su=!0,C.destroy(Ym)}),o.on("close",()=>{!Bl&&!Su&&F(new pS("Request stream has been aborted",t,C))}),o.pipe(C)}else C.end(o)})};var Che=kg.isStandardBrowserEnv?function(){return{write:function(r,n,i,s,o,a){let c=[];c.push(r+"="+encodeURIComponent(n)),at.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),at.isString(s)&&c.push("path="+s),at.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 xhe=kg.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=at.isString(o)?i(o):o;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}();function Ehe(e,t){let r=0,n=vB(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 UZe=typeof XMLHttpRequest<"u",Ahe=UZe&&function(e){return new Promise(function(r,n){let i=e.data,s=zg.from(e.headers).normalize(),o=e.responseType,a;function c(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}at.isFormData(i)&&(kg.isStandardBrowserEnv||kg.isStandardBrowserWebWorkerEnv?s.setContentType(!1):s.setContentType("multipart/form-data;",!1));let l=new XMLHttpRequest;if(e.auth){let y=e.auth.username||"",C=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(y+":"+C))}let u=Nx(e.baseURL,e.url);l.open(e.method.toUpperCase(),Tx(u,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function m(){if(!l)return;let y=zg.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),x={data:!o||o==="text"||o==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:y,config:e,request:l};xw(function(F){r(F),c()},function(F){n(F),c()},x),l=null}if("onloadend"in l?l.onloadend=m:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(m)},l.onabort=function(){!l||(n(new Vu("Request aborted",Vu.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new Vu("Network Error",Vu.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let C=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",x=e.transitional||hD;e.timeoutErrorMessage&&(C=e.timeoutErrorMessage),n(new Vu(C,x.clarifyTimeoutError?Vu.ETIMEDOUT:Vu.ECONNABORTED,e,l)),l=null},kg.isStandardBrowserEnv){let y=(e.withCredentials||xhe(u))&&e.xsrfCookieName&&Che.read(e.xsrfCookieName);y&&s.set(e.xsrfHeaderName,y)}i===void 0&&s.setContentType(null),"setRequestHeader"in l&&at.forEach(s.toJSON(),function(C,x){l.setRequestHeader(x,C)}),at.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),o&&o!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",Ehe(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",Ehe(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=y=>{!l||(n(!y||y.type?new pS(null,e,l):y),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));let f=I1(u);if(f&&kg.protocols.indexOf(f)===-1){n(new Vu("Unsupported protocol "+f+":",Vu.ERR_BAD_REQUEST,e));return}l.send(i||null)})};var CB={http:whe,xhr:Ahe};at.forEach(CB,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var Dhe={getAdapter:e=>{e=at.isArray(e)?e:[e];let{length:t}=e,r,n;for(let i=0;i<t&&(r=e[i],!(n=at.isString(r)?CB[r.toLowerCase()]:r));i++);if(!n)throw n===!1?new Vu(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(at.hasOwnProp(CB,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`);if(!at.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:CB};function IH(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pS(null,e)}function xB(e){return IH(e),e.headers=zg.from(e.headers),e.data=E1.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Dhe.getAdapter(e.adapter||gD.adapter)(e).then(function(n){return IH(e),n.data=E1.call(e,e.transformResponse,n),n.headers=zg.from(n.headers),n},function(n){return A1(n)||(IH(e),n&&n.response&&(n.response.data=E1.call(e,e.transformResponse,n.response),n.response.headers=zg.from(n.response.headers))),Promise.reject(n)})}var khe=e=>e instanceof zg?e.toJSON():e;function l_(e,t){t=t||{};let r={};function n(l,u,m){return at.isPlainObject(l)&&at.isPlainObject(u)?at.merge.call({caseless:m},l,u):at.isPlainObject(u)?at.merge({},u):at.isArray(u)?u.slice():u}function i(l,u,m){if(at.isUndefined(u)){if(!at.isUndefined(l))return n(void 0,l,m)}else return n(l,u,m)}function s(l,u){if(!at.isUndefined(u))return n(void 0,u)}function o(l,u){if(at.isUndefined(u)){if(!at.isUndefined(l))return n(void 0,l)}else return n(void 0,u)}function a(l,u,m){if(m in t)return n(l,u);if(m 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(khe(l),khe(u),!0)};return at.forEach(Object.keys(Object.assign({},e,t)),function(u){let m=c[u]||i,f=m(e[u],t[u],u);at.isUndefined(f)&&m!==a||(r[u]=f)}),r}var RH={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{RH[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var Phe={};RH.transitional=function(t,r,n){function i(s,o){return"[Axios v"+jx+"] Transitional option '"+s+"'"+o+(n?". "+n:"")}return(s,o,a)=>{if(t===!1)throw new Vu(i(o," has been removed"+(r?" in "+r:"")),Vu.ERR_DEPRECATED);return r&&!Phe[o]&&(Phe[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 zZe(e,t,r){if(typeof e!="object")throw new Vu("options must be an object",Vu.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 Vu("option "+s+" must be "+c,Vu.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Vu("Unknown option "+s,Vu.ERR_BAD_OPTION)}}var EB={assertOptions:zZe,validators:RH};var Aw=EB.validators,wD=class{constructor(t){this.defaults=t,this.interceptors={request:new mH,response:new mH}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=l_(this.defaults,r);let{transitional:n,paramsSerializer:i,headers:s}=r;n!==void 0&&EB.assertOptions(n,{silentJSONParsing:Aw.transitional(Aw.boolean),forcedJSONParsing:Aw.transitional(Aw.boolean),clarifyTimeoutError:Aw.transitional(Aw.boolean)},!1),i!=null&&(at.isFunction(i)?r.paramsSerializer={serialize:i}:EB.assertOptions(i,{encode:Aw.function,serialize:Aw.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o;o=s&&at.merge(s.common,s[r.method]),o&&at.forEach(["delete","get","head","post","put","patch","common"],C=>{delete s[C]}),r.headers=zg.concat(o,s);let a=[],c=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(r)===!1||(c=c&&x.synchronous,a.unshift(x.fulfilled,x.rejected))});let l=[];this.interceptors.response.forEach(function(x){l.push(x.fulfilled,x.rejected)});let u,m=0,f;if(!c){let C=[xB.bind(this),void 0];for(C.unshift.apply(C,a),C.push.apply(C,l),f=C.length,u=Promise.resolve(r);m<f;)u=u.then(C[m++],C[m++]);return u}f=a.length;let y=r;for(m=0;m<f;){let C=a[m++],x=a[m++];try{y=C(y)}catch(I){x.call(this,I);break}}try{u=xB.call(this,y)}catch(C){return Promise.reject(C)}for(m=0,f=l.length;m<f;)u=u.then(l[m++],l[m++]);return u}getUri(t){t=l_(this.defaults,t);let r=Nx(t.baseURL,t.url);return Tx(r,t.params,t.paramsSerializer)}};at.forEach(["delete","get","head","options"],function(t){wD.prototype[t]=function(r,n){return this.request(l_(n||{},{method:t,url:r,data:(n||{}).data}))}});at.forEach(["post","put","patch"],function(t){function r(n){return function(s,o,a){return this.request(l_(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}wD.prototype[t]=r(),wD.prototype[t+"Form"]=r(!0)});var O1=wD;var F1=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 pS(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 F1(function(i){t=i}),cancel:t}}},Ihe=F1;function OH(e){return function(r){return e.apply(null,r)}}function FH(e){return at.isObject(e)&&e.isAxiosError===!0}var TH={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(TH).forEach(([e,t])=>{TH[t]=e});var Rhe=TH;function Ohe(e){let t=new O1(e),r=_1(O1.prototype.request,t);return at.extend(r,O1.prototype,t,{allOwnKeys:!0}),at.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return Ohe(l_(e,i))},r}var Gg=Ohe(gD);Gg.Axios=O1;Gg.CanceledError=pS;Gg.CancelToken=Ihe;Gg.isCancel=A1;Gg.VERSION=jx;Gg.toFormData=Cw;Gg.AxiosError=Vu;Gg.Cancel=Gg.CanceledError;Gg.all=function(t){return Promise.all(t)};Gg.spread=OH;Gg.isAxiosError=FH;Gg.mergeConfig=l_;Gg.AxiosHeaders=zg;Gg.formToJSON=e=>mB(at.isHTMLForm(e)?new FormData(e):e);Gg.HttpStatusCode=Rhe;Gg.default=Gg;var my=Gg;var{Axios:GOr,AxiosError:VOr,CanceledError:XOr,isCancel:WOr,CancelToken:HOr,VERSION:KOr,all:ZOr,Cancel:YOr,isAxiosError:JOr,spread:QOr,toFormData:eFr,AxiosHeaders:tFr,HttpStatusCode:rFr,formToJSON:nFr,mergeConfig:iFr}=my;var Fhe=Kl(uH());function GZe(){return Boolean(my.defaults.headers.common.Authorization)}function VZe(e){my.defaults.headers.common.Authorization=e}function XZe(e,t){my.defaults.headers.common["x-api-client"]=e,my.defaults.headers.common["x-api-client-version"]=t}var $x="https://goldsky.com";function WZe(e){$x=e}function The(e,t,r=$x){return`${r}${typeof e=="string"?e:e(t)}`}function HZe(){return new Fhe.default}async function Nhe(e,t,r=$x){return AB(e,"get",t||{},r)}async function qhe(e,t,r=$x){return AB(e,"delete",t||{},r)}async function Bhe(e,t,r=$x){return AB(e,"put",t||{},r)}async function Lhe(e,t,r=$x){return AB(e,"post",t||{},r)}async function AB(e,t,r,n=$x){var s;let i=Od(po(po(po({url:The(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 my.request(i);return o.status<200||o.status>=300?o.status>500?[{statusCode:o.status,error:o.statusText,message:o.data instanceof Error?o.data.toString():JSON.stringify(o.data)},{},null]:"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,null]:[{statusCode:o.data.statusCode||o.status,error:o.data.error||o.statusText,message:o.data instanceof Error?o.data.toString():o.data.message||JSON.stringify(o.data)},o.data,null]:[null,o.data||{},{statusCode:o.status,message:o.data.message||""}]}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},{},null]}}var NH=class{constructor(t){due(this,"host");this.host=t}async get(t,r){return Nhe(t,r,this.host)}async delete(t,r){return qhe(t,r,this.host)}async put(t,r){return Bhe(t,r,this.host)}async post(t,r){return Lhe(t,r,this.host)}};var cFr=p.Object({name:p.String(),webhookUrl:p.String(),entity:p.String(),secret:p.Optional(p.String()),numRetries:p.Optional(p.Number()),retryIntervalSeconds:p.Optional(p.Number()),retryTimeoutSeconds:p.Optional(p.Number())}),lFr=p.Object({subgraphName:p.String(),subgraphVersion:p.String()});var uFr=p.Object({data:p.Object({webhookSecret:p.String(),id:p.String(),name:p.String()})}),dFr=p.Object({name:p.String()});var pFr=p.Object({data:p.Object({})}),KZe=p.Object({id:p.String(),name:p.String(),webhookUrl:p.String(),entity:p.String(),subgraphName:p.String(),subgraphVersion:p.String(),created_at:p.Number()}),mFr=p.Object({data:p.Array(KZe)}),ZZe=p.Object({name:p.String(),rows:p.String(),columns:p.Array(p.Object({name:p.String(),dataType:p.String()}))}),fFr=p.Object({data:p.Array(ZZe)}),hFr=p.Object({subgraphName:p.String(),subgraphVersion:p.String()});var yFr=p.Object({id:p.String(),name:p.String(),description:p.String(),base_price_decimal:p.String(),features:p.Array(p.String()),isHidden:p.Boolean()}),bFr=p.Object({id:p.String(),latestInvoice:p.Union([p.String(),p.Null()]),cancelAtPeriodEnd:p.Boolean(),product:p.Object({id:p.String(),name:p.String(),description:p.Union([p.String(),p.Null()]),basePrice:p.Object({amount:p.Union([p.String(),p.Null()]),interval:p.String()}),metadata:p.Record(p.String(),p.String())})}),SFr=p.Object({productId:p.String(),subscriptionId:p.Optional(p.String())}),vFr=p.Object({clientSecret:p.String(),customerId:p.String(),stripePublicKey:p.String()});var _Fr=p.Object({productId:p.String(),customerId:p.String(),paymentMethod:p.String(),promoCode:p.Optional(p.String())}),wFr=p.Object({subscriptionId:p.String()});var CFr=p.Object({newPaymentMethodId:p.String()});var xFr=p.Object({});var EFr=p.Object({});var JZe=p.Object({id:p.String(),number:p.String(),pdf:p.Optional(p.String()),total:p.Number(),period:p.Object({start:p.Number(),end:p.Optional(p.Number())})}),AFr=p.Object({invoices:p.Array(JZe)});var DFr=p.Object({usageInCents:p.Number(),totalCreditsInCents:p.Optional(p.Number())}),jhe=p.Object({subgraphsLimit:p.Number(),webhooksLimit:p.Number(),mirrorStreamsLimit:p.Number(),fusionStreamsLimit:p.Number(),dedicatedIpMirrorStreamsLimit:p.Number(),enterprise:p.Boolean(),starterPlanPaused:p.Boolean()}),QZe=p.Object({period:p.Object({start:p.Number(),end:p.Optional(p.Number())}),totalUsage:p.Number(),usagePrice:p.Number()}),eYe=p.Object({usageRecords:p.Array(QZe),priceName:p.String()}),tYe=p.Object({latestUsage:p.Number(),maxFreeUsage:p.Number(),remainingFreeUsage:p.Number(),priceName:p.String()}),kFr=p.Object({priceSummaries:p.Array(tYe),billingPeriodEnd:p.Number(),starterPlanPaused:p.Boolean()});var PFr=p.Object({priceSummaries:p.Array(eYe),billingPeriodEnd:p.Number()});var nYe=p.Union([p.Literal("1d"),p.Literal("6h"),p.Literal("1h")]),RFr=p.Object({from:p.String(),to:p.String(),bucketSize:nYe,timeZone:p.String()}),OFr=p.Object({id:p.String()}),FFr=p.Object({deployment_id:p.String()}),TFr=p.Object({referenceName:p.String(),streamName:p.String(),streamVersion:p.String()}),NFr=p.Object({data:p.Array(p.Object({time:p.Number(),value:p.Number()}))});var iYe=p.Object({handler:p.String(),data:p.Array(p.Object({time:p.Number(),averageHandlerTime:p.Number(),handlerCount:p.Number()}))}),qFr=p.Object({data:p.Array(iYe)});var oYe=p.Union([p.Literal("sales"),p.Literal("support")]),LFr=p.Object({message:p.String(),recipient:oYe}),jFr=p.Object({success:p.Boolean()});var Qn={};eu(Qn,{AllResourceSizes:()=>s7,AllSinksRootTypebox:()=>i7,AllSinksTypebox:()=>Gx,AllSinksTypeboxV3:()=>Wx,AllSourcesRootTypebox:()=>MH,AllSourcesTypebox:()=>N1,AllSourcesTypeboxV3:()=>Vx,AllStreamCliOuputFormats:()=>uYe,AllStreamStatusValidAtCreate:()=>dYe,AllStreamStatuses:()=>uL,AllTransformsRootTypebox:()=>zH,AllTransformsTypebox:()=>zx,AllTransformsTypeboxV3:()=>Xx,BlackholeSinkRootTypebox:()=>r7,BlackholeSinkTypebox:()=>UB,BlackholeSinkTypeboxV3:()=>cL,ClickHouseArchiveStorageRootTypebox:()=>$he,ClickHouseArchiveStorageRootTypeboxV3:()=>lYe,ClickHouseSinkRootTypebox:()=>JH,ClickHouseSinkTypebox:()=>LB,ClickHouseSinkTypeboxV3:()=>iL,ConfigOverridesTypebox:()=>pL,CreateSnapshotInternalSchema:()=>FQe,DatasetGroupRootTypebox:()=>CD,DatasetSchema:()=>Ux,DatasetSchemaV3:()=>zhe,DatasetSourceRootTypebox:()=>kw,DatasetSourceTypebox:()=>xD,DatasetSourceTypeboxV3:()=>GB,DefinitionInputTypebox:()=>xL,DefinitionInputTypeboxV3:()=>tge,DefinitionInputValidator:()=>cet,DefinitionOutputTypebox:()=>Vhe,DefinitionRootTypebox:()=>Ghe,DefinitionRootTypeboxV3:()=>kD,DeleteStreamDraftSchema:()=>QQe,DeleteStreamSchema:()=>DQe,ElasticSearchRootTypebox:()=>XH,ElasticSearchSinkTypebox:()=>OB,ElasticSearchSinkTypeboxV3:()=>JB,ExternalHandlerTransformRootTypebox:()=>UH,ExternalHandlerTransformTypebox:()=>kB,ExternalHandlerTransformTypeboxV3:()=>KB,FileSinkFormat:()=>Uhe,FileSinkFormatTypebox:()=>PB,FileSinkRootTypebox:()=>ZH,FileSinkTypebox:()=>qB,FileSinkTypeboxV3:()=>rL,FileSourceRootTypebox:()=>jH,FileSourceTypebox:()=>AD,FileSourceTypeboxV3:()=>WB,GetLagSchema:()=>UQe,GetLogsSchema:()=>XQe,GetStreamDraftSchema:()=>ZQe,GetStreamDraftsSchema:()=>KQe,GetStreamSchema:()=>fYe,GoldskyClickHouseSinkRootTypebox:()=>QH,GoldskyClickHouseSinkTypebox:()=>jB,GoldskyClickHouseSinkTypeboxV3:()=>sL,HypertableSinkRootTypebox:()=>KH,HypertableSinkTypebox:()=>NB,HypertableSinkTypeboxV3:()=>tL,JobErrorTypebox:()=>S7,KafkaPoweredSources:()=>cYe,KafkaSinkRootTypebox:()=>HH,KafkaSinkTypebox:()=>TB,KafkaSinkTypeboxV3:()=>eL,KafkaSourceRootTypebox:()=>LH,KafkaSourceTypebox:()=>Pw,KafkaSourceTypeboxV3:()=>XB,KafkaStorageRootTypebox:()=>Mhe,LagParams:()=>oge,LagResponse:()=>age,LagResponseBody:()=>cge,ListStreamsSchema:()=>LQe,LogLevels:()=>zQe,MysqlSinkRootTypebox:()=>GH,MysqlSinkTypebox:()=>IB,MysqlSinkTypeboxV3:()=>ZB,OpenSearchRootTypebox:()=>WH,OpenSearchSinkTypebox:()=>FB,OpenSearchSinkTypeboxV3:()=>QB,PostgresSinkRootTypebox:()=>VH,PostgresSinkTypebox:()=>RB,PostgresSinkTypeboxV3:()=>YB,PrintSinkRootTypebox:()=>t7,PrintSinkTypebox:()=>$B,PrintSinkTypeboxV3:()=>aL,QueryStreamRuntimeDetailsInputTypebox:()=>$Qe,ResourceSizeTypebox:()=>DD,RestartStreamInternalSchema:()=>qQe,RocksetSinkRootTypebox:()=>YH,RocksetSinkTypebox:()=>BB,RocksetSinkTypeboxV3:()=>nL,RuntimeDetails:()=>jQe,RuntimeDetailsWithMetrics:()=>sge,SQLParseInputBody:()=>lge,SQLParseSchema:()=>tet,SQLTransformRootTypebox:()=>$H,SQLTransformTypebox:()=>DB,SQLTransformTypeboxV3:()=>HB,SinkSchemaValidatorByType:()=>pet,SinkSchemaValidatorByTypeV3:()=>het,SinkTypes:()=>Uf,SinkTypesV3:()=>Qf,SourceSchemaValidatorByType:()=>uet,SourceSchemaValidatorByTypeV3:()=>met,SourceTypes:()=>Hb,SourceTypesV3:()=>VS,SqsSinkRootTypebox:()=>e7,SqsSinkTypebox:()=>MB,SqsSinkTypeboxV3:()=>oL,StartAtOptionsTypebox:()=>Dw,StatTypebox:()=>ige,StatelessCheckSchema:()=>BQe,StorageTypes:()=>T1,StreamDraftInputTypebox:()=>YQe,StreamDraftOutputTypebox:()=>AL,StreamDraftRootTypebox:()=>EL,StreamInputTypeValidator:()=>xQe,StreamInputTypeValidatorV3:()=>EQe,StreamInputTypebox:()=>L1,StreamInputTypeboxV3:()=>rge,StreamInputValidator:()=>aet,StreamNameAndVersion:()=>nge,StreamNameVersionRuntimeDetailsTypebox:()=>MQe,StreamOutputArrayTypeValidator:()=>iet,StreamOutputMapTypeValidatorV3:()=>set,StreamOutputTypeValidator:()=>oet,StreamOutputTypebox:()=>XS,StreamOutputTypeboxV3:()=>v7,StreamRootRunnableTypebox:()=>IQe,StreamRootTypebox:()=>PD,StreamStatusTypebox:()=>dL,StreamStatusWithoutPauseTypebox:()=>pYe,SubgraphEntitySourceRootTypebox:()=>BH,SubgraphEntitySourceTypebox:()=>ED,SubgraphEntitySourceTypeboxV3:()=>VB,SubgraphSourceEntityRootTypebox:()=>qH,TransformSchemaValidatorByType:()=>det,TransformSchemaValidatorByTypeV3:()=>fet,TransformationTypes:()=>mS,ValidateNewStreamSchema:()=>PQe,WebhookSinkRootTypebox:()=>n7,WebhookSinkTypebox:()=>zB,WebhookSinkTypeboxV3:()=>lL});var Hb={SubgraphEntity:"subgraphEntity",Kafka:"kafka",File:"file",Dataset:"dataset"},cYe=[Hb.Dataset,Hb.Kafka,Hb.SubgraphEntity],Dw=p.Union([p.Literal("earliest"),p.Literal("latest"),p.String({pattern:"^[0-9]{13}$"})],{errorMessage:"Expected either 'earliest', 'latest', or '^[0-9]{13}$'"}),CD=p.Object({name:p.String(),displayName:p.String(),description:p.Optional(p.String())}),Ux=p.Object({name:p.String(),datatype:p.String(),description:p.Optional(p.String())}),T1={Kafka:"kafka",ClickHouseArchive:"clickHouseArchive"},Mhe=p.Object({type:p.Literal(T1.Kafka),topic:p.String(),secretName:p.String(),schema:p.Array(Ux)}),$he=p.Object({type:p.Literal(T1.ClickHouseArchive),tableName:p.String(),relatedKafkaTopic:p.String(),schema:p.Optional(p.Array(Ux)),supportedIndexes:p.Array(p.Array(p.String()))}),kw=p.Object({id:p.String(),type:p.Literal(Hb.Dataset),version:p.String(),displayName:p.String(),referenceName:p.String(),datasetName:p.Optional(p.String()),description:p.Optional(p.String()),changelog:p.Optional(p.String()),schema:p.Array(Ux),isDeprecated:p.Optional(p.Boolean()),isInternal:p.Optional(p.Boolean()),storages:p.Array(p.Union([Mhe,$he])),groups:p.Array(p.String()),startAt:p.Optional(Dw),filter:p.Optional(p.String()),transformSql:p.Optional(p.String()),transformSqlPrimaryKey:p.Optional(p.String()),sourceDatasets:p.Optional(p.Array(p.Object({datasetName:p.String(),version:p.String(),filter:p.Optional(p.String())})))}),xD=p.Pick(kw,["version","startAt","type","description","referenceName","datasetName","filter"]),qH=p.Object({name:p.String(),kafkaTopic:p.Optional(p.String())},{additionalProperties:!1}),BH=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),schema:p.Array(Ux),type:p.Literal(Hb.SubgraphEntity),deployments:p.Array(p.Object({id:p.String()},{additionalProperties:!1})),entity:qH,secretName:p.String(),filter:p.Optional(p.String()),startAt:p.Optional(Dw)},{additionalProperties:!1}),ED=p.Composite([p.Omit(BH,["secretName","entity","id","schema"],{additionalProperties:!1}),p.Object({entity:p.Omit(qH,["kafkaTopic"],{additionalProperties:!1})},{additionalProperties:!1})],{additionalProperties:!1}),LH=p.Object({id:p.String(),description:p.Optional(p.String()),referenceName:p.String(),type:p.Literal(Hb.Kafka),topic:p.String({maxLength:255}),startingOffsets:p.Optional(p.String()),secretName:p.String(),filter:p.Optional(p.String())},{additionalProperties:!1}),Pw=p.Omit(LH,["secretName","id"],{additionalProperties:!1}),jH=p.Object({id:p.String(),description:p.Optional(p.String()),referenceName:p.String(),secretName:p.String(),type:p.Literal(Hb.File),path:p.String(),format:p.String(),tableDefinitionPath:p.String(),monitorInterval:p.Optional(p.String())},{additionalProperties:!1}),AD=p.Omit(jH,["secretName","id"],{additionalProperties:!1}),MH=p.Union([BH,LH,jH,kw],{additionalProperties:!1}),N1=p.Union([ED,Pw,AD,xD]);var mS={SQL:"sql",HANDLER:"handler"},$H=p.Object({id:p.String(),description:p.Optional(p.String()),type:p.Literal(mS.SQL),referenceName:p.String(),sql:p.String({maxLength:5e3}),primaryKey:p.String({maxLength:50})},{additionalProperties:!1}),UH=p.Object({id:p.String(),description:p.Optional(p.String()),type:p.Literal(mS.HANDLER),referenceName:p.String(),url:p.String(),from:p.String(),primaryKey:p.String({maxLength:50}),payloadColumns:p.Optional(p.Array(p.String({maxLength:50}))),schemaOverride:p.Optional(p.Object({})),headers:p.Optional(p.Object({})),secretName:p.Optional(p.String()),oneRowPerRequest:p.Optional(p.Boolean())},{additionalProperties:!1}),zH=p.Union([$H,UH]),DB=p.Omit($H,["id"],{additionalProperties:!1}),kB=p.Omit(UH,["id"],{additionalProperties:!1}),zx=p.Union([DB,kB],{additionalProperties:!1});var Uf={Mysql:"mysql",Postgres:"postgres",ElasticSearch:"elasticSearch",OpenSearch:"opensearch",Kafka:"kafka",TimescaleHypertable:"timescaleHypertable",File:"file",Rockset:"rockset",ClickHouse:"clickHouse",Print:"print",Blackhole:"blackhole",GoldskyClickHouse:"goldskyclickhouse",Sqs:"sqs",Webhook:"webhook"},GH=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.Mysql),sourceStreamName:p.String(),schema:p.String(),table:p.String(),secretName:p.String(),sinkBufferMaxRows:p.Optional(p.Integer()),sinkBufferInterval:p.Optional(p.String()),scanAutocommit:p.Optional(p.Boolean()),rewriteBatchedInserts:p.Optional(p.Boolean()),conditionalUpsertColumn:p.Optional(p.String())},{additionalProperties:!1}),VH=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.Postgres),sourceStreamName:p.String(),schema:p.String(),table:p.String(),secretName:p.String(),sinkBufferMaxRows:p.Optional(p.Integer()),sinkBufferInterval:p.Optional(p.String()),scanAutocommit:p.Optional(p.Boolean()),rewriteBatchedInserts:p.Optional(p.Boolean()),conditionalUpsertColumn:p.Optional(p.String())},{additionalProperties:!1}),XH=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.ElasticSearch),sourceStreamName:p.String(),index:p.String(),secretName:p.String()},{additionalProperties:!1}),WH=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.OpenSearch),sourceStreamName:p.String(),index:p.String(),secretName:p.String()},{additionalProperties:!1}),HH=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.Kafka),sourceStreamName:p.String(),topic:p.String({maxLength:255}),secretName:p.String(),topicPartitions:p.Optional(p.Integer()),upsertMode:p.Optional(p.Boolean()),dataFormat:p.Optional(p.Union([p.Literal("avro"),p.Literal("json")]))},{additionalProperties:!1}),KH=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.TimescaleHypertable),sourceStreamName:p.String(),schema:p.String(),table:p.String(),timestampColumn:p.String(),primaryKey:p.String(),timestampDataTypeAdapterFuncName:p.Optional(p.String()),secretName:p.String(),sinkBufferMaxRows:p.Optional(p.Integer()),sinkBufferInterval:p.Optional(p.String()),scanAutocommit:p.Optional(p.Boolean()),rewriteBatchedInserts:p.Optional(p.Boolean())},{additionalProperties:!1}),Uhe=["csv","parquet"],PB=p.Union(Uhe.map(e=>p.Literal(e))),ZH=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.File),sourceStreamName:p.String(),secretName:p.String(),path:p.String(),format:p.String(PB),autoCompaction:p.Optional(p.Boolean()),partitionColumns:p.Optional(p.String()),shuffleByPartition:p.Optional(p.Boolean()),dedupColumn:p.Optional(p.String()),dedupTTLMinutes:p.Optional(p.Integer()),lwwColumn:p.Optional(p.String()),lwwTTLMinutes:p.Optional(p.Integer()),rollingPolicyFileSize:p.Optional(p.String()),rollingPolicyRolloverInterval:p.Optional(p.String()),rollingPolicyCheckInterval:p.Optional(p.String())},{additionalProperties:!1}),YH=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.Rockset),sourceStreamName:p.String(),secretName:p.String(),workspace:p.String(),collection:p.String(),ingestTransformationSql:p.Optional(p.String()),flushSize:p.Optional(p.Integer()),flushIntervalMs:p.Optional(p.Integer()),retryCount:p.Optional(p.Integer())},{additionalProperties:!1}),JH=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.ClickHouse),sourceStreamName:p.String(),secretName:p.String(),table:p.String(),batchSize:p.Optional(p.Integer()),flushInterval:p.Optional(p.String()),appendOnlyMode:p.Optional(p.Boolean()),versionColumnName:p.Optional(p.String()),primaryKeyOverride:p.Optional(p.String()),schemaOverride:p.Optional(p.Record(p.String(),p.String()))},{additionalProperties:!1}),QH=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.GoldskyClickHouse),secretName:p.String({default:"goldskyclickhouse"}),sourceStreamName:p.String(),table:p.String(),versionColumnName:p.Optional(p.String()),primaryKeyOverride:p.Optional(p.String()),schemaOverride:p.Optional(p.Record(p.String(),p.String()))},{additionalProperties:!1}),e7=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.Sqs),sourceStreamName:p.String(),secretName:p.String(),url:p.String(),failOnError:p.Optional(p.Boolean())},{additionalProperties:!1}),t7=p.Object({id:p.String(),referenceName:p.String(),type:p.Literal(Uf.Print),sourceStreamName:p.String(),secretName:p.String()},{additionalProperties:!1}),r7=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.Blackhole),sourceStreamName:p.String(),secretName:p.String()},{additionalProperties:!1}),n7=p.Object({id:p.String(),referenceName:p.String(),description:p.Optional(p.String()),type:p.Literal(Uf.Webhook),sourceStreamName:p.String(),secretName:p.String({default:"not_supplied"}),url:p.String(),headers:p.Optional(p.Record(p.String(),p.String())),oneRowPerRequest:p.Optional(p.Boolean())},{additionalProperties:!1}),i7=p.Union([GH,VH,XH,WH,HH,KH,ZH,YH,JH,QH,e7,t7,r7,n7],{additionalProperties:!1}),IB=p.Omit(GH,["id"],{additionalProperties:!1}),RB=p.Omit(VH,["id"],{additionalProperties:!1}),OB=p.Omit(XH,["id"],{additionalProperties:!1}),FB=p.Omit(WH,["id"],{additionalProperties:!1}),TB=p.Omit(HH,["id"],{additionalProperties:!1}),NB=p.Omit(KH,["id"],{additionalProperties:!1}),qB=p.Omit(ZH,["id"],{additionalProperties:!1}),BB=p.Omit(YH,["id"],{additionalProperties:!1}),LB=p.Omit(JH,["id"],{additionalProperties:!1}),jB=p.Composite([p.Omit(QH,["id","secretName"],{additionalProperties:!1}),p.Object({secretName:p.Optional(p.String())})]),MB=p.Omit(e7,["id"],{additionalProperties:!1}),$B=p.Omit(t7,["id"],{additionalProperties:!1}),UB=p.Omit(r7,["id"],{additionalProperties:!1}),zB=p.Composite([p.Omit(n7,["id","secretName"],{additionalProperties:!1}),p.Object({secretName:p.Optional(p.String())})]),Gx=p.Union([IB,RB,OB,FB,TB,NB,qB,BB,LB,jB,MB,$B,UB,zB]);var VS={SubgraphEntity:"subgraph_entity",Kafka:"kafka",File:"file",Dataset:"dataset"},zhe=p.Object({name:p.String(),datatype:p.String(),description:p.Optional(p.String())}),lYe=p.Object({type:p.Literal(T1.ClickHouseArchive),table_name:p.String(),related_kafka_topic:p.String(),schema:p.Optional(p.Array(zhe))}),GB=p.Object({dataset_name:p.String(),type:p.Literal(VS.Dataset),version:p.String(),display_name:p.Optional(p.String()),description:p.Optional(p.String()),start_at:p.Optional(Dw),filter:p.Optional(p.String())},{additionalProperties:!1}),VB=p.Object({description:p.Optional(p.String()),type:p.Literal(VS.SubgraphEntity),subgraphs:p.Array(p.Object({name:p.String(),version:p.String()},{additionalProperties:!1})),filter:p.Optional(p.String()),name:p.String(),start_at:p.Optional(Dw)},{additionalProperties:!1}),XB=p.Object({description:p.Optional(p.String()),type:p.Literal(VS.Kafka),topic:p.String({max_length:255}),starting_offsets:p.Optional(p.String()),filter:p.Optional(p.String())},{additionalProperties:!1}),WB=p.Object({description:p.Optional(p.String()),type:p.Literal(VS.File),path:p.String(),format:p.String(),table_definition_path:p.String(),monitor_interval:p.Optional(p.String())},{additionalProperties:!1}),Vx=p.Union([VB,XB,WB,GB]);var HB=p.Object({description:p.Optional(p.String()),type:p.Optional(p.Literal(mS.SQL)),sql:p.String({maxLength:5e3}),primary_key:p.String({maxLength:50})},{additionalProperties:!1}),KB=p.Object({description:p.Optional(p.String()),type:p.Literal(mS.HANDLER),url:p.String(),from:p.String(),primary_key:p.String({maxLength:50}),payload_columns:p.Optional(p.Array(p.String({maxLength:50}))),schema_override:p.Optional(p.Object({})),headers:p.Optional(p.Object({})),secret_name:p.Optional(p.String()),one_row_per_request:p.Optional(p.Boolean())},{additionalProperties:!1}),Xx=p.Union([HB,KB],{additionalProperties:!1});var Qf={Mysql:"mysql",Postgres:"postgres",ElasticSearch:"elasticsearch",OpenSearch:"opensearch",Kafka:"kafka",TimescaleHypertable:"timescalehypertable",File:"file",Rockset:"rockset",ClickHouse:"clickhouse",Print:"print",Blackhole:"blackhole",GoldskyClickHouse:"goldskyclickhouse",Sqs:"sqs",Webhook:"webhook"},ZB=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.Mysql),from:p.String(),schema:p.String(),table:p.String(),secret_name:p.String(),batch_size:p.Optional(p.Integer()),batch_flush_interval:p.Optional(p.String()),scan_autocommit:p.Optional(p.Boolean()),rewrite_batched_inserts:p.Optional(p.Boolean()),conditional_upsert_column:p.Optional(p.String())},{additionalProperties:!1}),YB=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.Postgres),from:p.String(),schema:p.String(),table:p.String(),secret_name:p.String(),batch_size:p.Optional(p.Integer()),batch_flush_interval:p.Optional(p.String()),scan_autocommit:p.Optional(p.Boolean()),rewrite_batched_inserts:p.Optional(p.Boolean()),conditional_upsert_column:p.Optional(p.String())},{additionalProperties:!1}),JB=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.ElasticSearch),from:p.String(),index:p.String(),secret_name:p.String()},{additionalProperties:!1}),QB=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.OpenSearch),from:p.String(),index:p.String(),secret_name:p.String()},{additionalProperties:!1}),eL=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.Kafka),from:p.String(),topic:p.String({max_length:255}),secret_name:p.String(),topic_partitions:p.Optional(p.Integer()),upsert_mode:p.Optional(p.Boolean()),data_format:p.Optional(p.Union([p.Literal("avro"),p.Literal("json")]))},{additionalProperties:!1}),tL=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.TimescaleHypertable),from:p.String(),schema:p.String(),table:p.String(),timestamp_column:p.String(),primary_key:p.String(),timestamp_data_type_adapter_func_name:p.Optional(p.String()),secret_name:p.String(),batch_size:p.Optional(p.Integer()),batch_flush_interval:p.Optional(p.String()),scan_autocommit:p.Optional(p.Boolean()),rewrite_batched_inserts:p.Optional(p.Boolean())},{additionalProperties:!1}),rL=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.File),from:p.String(),secret_name:p.String(),path:p.String(),format:p.String(PB),auto_compaction:p.Optional(p.Boolean()),partition_columns:p.Optional(p.String()),shuffle_by_partition:p.Optional(p.Boolean()),dedup_column:p.Optional(p.String()),dedup_ttl_minutes:p.Optional(p.Integer()),lww_column:p.Optional(p.String()),lww_ttl_minutes:p.Optional(p.Integer()),batch_size:p.Optional(p.String()),batch_flush_interval:p.Optional(p.String()),rolling_policy_check_interval:p.Optional(p.String())},{additionalProperties:!1}),nL=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.Rockset),from:p.String(),secret_name:p.String(),workspace:p.String(),collection:p.String(),ingest_transformation_sql:p.Optional(p.String()),batch_size:p.Optional(p.Integer()),batch_flush_interval:p.Optional(p.Integer()),retry_count:p.Optional(p.Integer())},{additionalProperties:!1}),iL=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.ClickHouse),from:p.String(),secret_name:p.String(),table:p.String(),batch_size:p.Optional(p.Integer()),batch_flush_interval:p.Optional(p.String()),append_only_mode:p.Optional(p.Boolean()),version_column_name:p.Optional(p.String()),primary_key_override:p.Optional(p.String()),schema_override:p.Optional(p.Record(p.String(),p.String()))},{additionalProperties:!1}),sL=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.GoldskyClickHouse),from:p.String(),table:p.String(),version_column_name:p.Optional(p.String()),primary_key_override:p.Optional(p.String()),schema_override:p.Optional(p.Record(p.String(),p.String()))},{additionalProperties:!1}),oL=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.Sqs),from:p.String(),secret_name:p.String(),url:p.String(),fail_on_error:p.Optional(p.Boolean())},{additionalProperties:!1}),aL=p.Object({type:p.Literal(Qf.Print),description:p.Optional(p.String()),from:p.String(),secret_name:p.String()},{additionalProperties:!1}),cL=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.Blackhole),from:p.String(),secret_name:p.String()},{additionalProperties:!1}),lL=p.Object({description:p.Optional(p.String()),type:p.Literal(Qf.Webhook),from:p.String(),secret_name:p.Optional(p.String({default:"not_supplied"})),url:p.String(),headers:p.Optional(p.Record(p.String(),p.String())),one_row_per_request:p.Optional(p.Boolean())},{additionalProperties:!1}),Wx=p.Union([ZB,YB,JB,QB,eL,tL,rL,nL,iL,sL,oL,aL,cL,lL]);var uYe=["json","table","yaml"],s7=["s","m","l","xl","xxl","mem.l","mem.xl","mem.xxl"],DD=p.Union(s7.map(e=>p.Literal(e)),{errorMessage:`Invalid resource size. Must be one of: ${s7.join(", ")}`}),uL=["ACTIVE","INACTIVE","PAUSED"],dYe=uL.filter(e=>e!=="PAUSED"),dL=p.Union(uL.map(e=>p.Literal(e))),pYe=p.Union(uL.filter(e=>e!=="PAUSED").map(e=>p.Literal(e))),Ghe=p.Object({sources:p.Array(MH,{minItems:1}),transforms:p.Array(zH),sinks:p.Array(i7)},{additionalProperties:!1}),kD=p.Object({sources:p.Record(p.String(),Vx),transforms:p.Record(p.String(),Xx),sinks:p.Record(p.String(),Wx)},{additionalProperties:!1}),Vhe=p.Object({sources:p.Array(N1,{minItems:1}),transforms:p.Array(zx),sinks:p.Array(Gx)},{additionalProperties:!1}),pL=p.Object({imageTag:p.Optional(p.String()),flinkConf:p.Optional(p.Object({})),env:p.Optional(p.Object({}))},{additionalProperties:!1}),PD=p.Object({id:p.String(),name:p.String(),description:p.Optional(p.String()),version:p.Integer(),definition:Ghe,definition_v3:p.Optional(kD),status:dL,project_id:p.String(),created_at:p.Number(),updated_at:p.Number(),resource_size:DD,latest_snapshot_id:p.Optional(p.String()),from_snapshot_id:p.Optional(p.String()),is_deleted:p.Boolean(),audit_log:p.Optional(p.String()),support_tier:p.Optional(p.Integer()),config_overrides:p.Optional(pL),updated_by_user_id:p.Optional(p.String()),dedicated_ips:p.Optional(p.Boolean())},{additionalProperties:!1}),XS=p.Composite([p.Omit(PD,["definition","audit_log","from_snapshot_id","latest_snapshot_id","is_deleted","config_overrides","dedicated_ips","id"],{additionalProperties:!1}),p.Object({definition:Vhe,is_deleted:p.Optional(p.Boolean())},{additionalProperties:!1})],{additionalProperties:!1});var mYe=p.Object({name:p.String(),version:p.Optional(p.String())},{additionalProperties:!1}),fYe={params:mYe,response:{200:p.Array(XS)}};function mL(e){return q1(e)&&Symbol.asyncIterator in e}function fL(e){return q1(e)&&Symbol.iterator in e}function WS(e){return q1(e)&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null)}function hL(e){return e instanceof Promise}function ID(e){return e instanceof Date&&Number.isFinite(e.getTime())}function RD(e){return e instanceof globalThis.Uint8Array}function q1(e){return e!==null&&typeof e=="object"}function Pg(e){return Array.isArray(e)&&!ArrayBuffer.isView(e)}function fS(e){return e===void 0}function Hx(e){return e===null}function Kx(e){return typeof e=="boolean"}function zm(e){return typeof e=="number"}function gL(e){return Number.isInteger(e)}function Kb(e){return typeof e=="bigint"}function Zg(e){return typeof e=="string"}function yL(e){return typeof e=="function"}function Zx(e){return typeof e=="symbol"}function bL(e){return Kb(e)||Kx(e)||Hx(e)||zm(e)||Zg(e)||Zx(e)||fS(e)}var Ig;(function(e){e.ExactOptionalPropertyTypes=!1,e.AllowArrayObject=!1,e.AllowNaN=!1,e.AllowNullVoid=!1;function t(o,a){return e.ExactOptionalPropertyTypes?a in o:o[a]!==void 0}e.IsExactOptionalProperty=t;function r(o){let a=q1(o);return e.AllowArrayObject?a:a&&!Pg(o)}e.IsObjectLike=r;function n(o){return r(o)&&!(o instanceof Date)&&!(o instanceof Uint8Array)}e.IsRecordLike=n;function i(o){return e.AllowNaN?zm(o):Number.isFinite(o)}e.IsNumberLike=i;function s(o){let a=fS(o);return e.AllowNullVoid?a||o===null:a}e.IsVoidLike=s})(Ig||(Ig={}));var o7=class extends wf{constructor(t){super(`Duplicate type kind '${t}' detected`)}},a7=class extends wf{constructor(t){super(`Duplicate string format '${t}' detected`)}},Xhe;(function(e){function t(n,i){if(Dy.Has(n))throw new o7(n);return Dy.Set(n,i),(s={})=>S1({...s,[Tn]:n})}e.Type=t;function r(n,i){if(hb.Has(n))throw new a7(n);return hb.Set(n,i),n}e.Format=r})(Xhe||(Xhe={}));function hYe(e){switch(e.errorType){case Er.ArrayContains:return"Expected array to contain at least one matching value";case Er.ArrayMaxContains:return`Expected array to contain no more than ${e.schema.maxContains} matching values`;case Er.ArrayMinContains:return`Expected array to contain at least ${e.schema.minContains} matching values`;case Er.ArrayMaxItems:return`Expected array length to be less or equal to ${e.schema.maxItems}`;case Er.ArrayMinItems:return`Expected array length to be greater or equal to ${e.schema.minItems}`;case Er.ArrayUniqueItems:return"Expected array elements to be unique";case Er.Array:return"Expected array";case Er.AsyncIterator:return"Expected AsyncIterator";case Er.BigIntExclusiveMaximum:return`Expected bigint to be less than ${e.schema.exclusiveMaximum}`;case Er.BigIntExclusiveMinimum:return`Expected bigint to be greater than ${e.schema.exclusiveMinimum}`;case Er.BigIntMaximum:return`Expected bigint to be less or equal to ${e.schema.maximum}`;case Er.BigIntMinimum:return`Expected bigint to be greater or equal to ${e.schema.minimum}`;case Er.BigIntMultipleOf:return`Expected bigint to be a multiple of ${e.schema.multipleOf}`;case Er.BigInt:return"Expected bigint";case Er.Boolean:return"Expected boolean";case Er.DateExclusiveMinimumTimestamp:return`Expected Date timestamp to be greater than ${e.schema.exclusiveMinimumTimestamp}`;case Er.DateExclusiveMaximumTimestamp:return`Expected Date timestamp to be less than ${e.schema.exclusiveMaximumTimestamp}`;case Er.DateMinimumTimestamp:return`Expected Date timestamp to be greater or equal to ${e.schema.minimumTimestamp}`;case Er.DateMaximumTimestamp:return`Expected Date timestamp to be less or equal to ${e.schema.maximumTimestamp}`;case Er.DateMultipleOfTimestamp:return`Expected Date timestamp to be a multiple of ${e.schema.multipleOfTimestamp}`;case Er.Date:return"Expected Date";case Er.Function:return"Expected function";case Er.IntegerExclusiveMaximum:return`Expected integer to be less than ${e.schema.exclusiveMaximum}`;case Er.IntegerExclusiveMinimum:return`Expected integer to be greater than ${e.schema.exclusiveMinimum}`;case Er.IntegerMaximum:return`Expected integer to be less or equal to ${e.schema.maximum}`;case Er.IntegerMinimum:return`Expected integer to be greater or equal to ${e.schema.minimum}`;case Er.IntegerMultipleOf:return`Expected integer to be a multiple of ${e.schema.multipleOf}`;case Er.Integer:return"Expected integer";case Er.IntersectUnevaluatedProperties:return"Unexpected property";case Er.Intersect:return"Expected all values to match";case Er.Iterator:return"Expected Iterator";case Er.Literal:return`Expected ${typeof e.schema.const=="string"?`'${e.schema.const}'`:e.schema.const}`;case Er.Never:return"Never";case Er.Not:return"Value should not match";case Er.Null:return"Expected null";case Er.NumberExclusiveMaximum:return`Expected number to be less than ${e.schema.exclusiveMaximum}`;case Er.NumberExclusiveMinimum:return`Expected number to be greater than ${e.schema.exclusiveMinimum}`;case Er.NumberMaximum:return`Expected number to be less or equal to ${e.schema.maximum}`;case Er.NumberMinimum:return`Expected number to be greater or equal to ${e.schema.minimum}`;case Er.NumberMultipleOf:return`Expected number to be a multiple of ${e.schema.multipleOf}`;case Er.Number:return"Expected number";case Er.Object:return"Expected object";case Er.ObjectAdditionalProperties:return"Unexpected property";case Er.ObjectMaxProperties:return`Expected object to have no more than ${e.schema.maxProperties} properties`;case Er.ObjectMinProperties:return`Expected object to have at least ${e.schema.minProperties} properties`;case Er.ObjectRequiredProperty:return"Required property";case Er.Promise:return"Expected Promise";case Er.RegExp:return"Expected string to match regular expression";case Er.StringFormatUnknown:return`Unknown format '${e.schema.format}'`;case Er.StringFormat:return`Expected string to match '${e.schema.format}' format`;case Er.StringMaxLength:return`Expected string length less or equal to ${e.schema.maxLength}`;case Er.StringMinLength:return`Expected string length greater or equal to ${e.schema.minLength}`;case Er.StringPattern:return`Expected string to match '${e.schema.pattern}'`;case Er.String:return"Expected string";case Er.Symbol:return"Expected symbol";case Er.TupleLength:return`Expected tuple to have ${e.schema.maxItems||0} elements`;case Er.Tuple:return"Expected tuple";case Er.Uint8ArrayMaxByteLength:return`Expected byte length less or equal to ${e.schema.maxByteLength}`;case Er.Uint8ArrayMinByteLength:return`Expected byte length greater or equal to ${e.schema.minByteLength}`;case Er.Uint8Array:return"Expected Uint8Array";case Er.Undefined:return"Expected undefined";case Er.Union:return"Expected union value";case Er.Void:return"Expected void";case Er.Kind:return`Expected kind '${e.schema[Tn]}'`;default:return"Unknown error type"}}var gYe=hYe;function Whe(){return gYe}var c7=class extends wf{constructor(t){super(`Unable to dereference schema with $id '${t.$id}'`),this.schema=t}};function yYe(e,t){let r=t.find(n=>n.$id===e.$ref);if(r===void 0)throw new c7(e);return Yg(r,t)}function Yg(e,t){return e[Tn]==="This"||e[Tn]==="Ref"?yYe(e,t):e}var l7=class extends wf{constructor(t){super("Unable to hash value"),this.value=t}},Zb;(function(e){e[e.Undefined=0]="Undefined",e[e.Null=1]="Null",e[e.Boolean=2]="Boolean",e[e.Number=3]="Number",e[e.String=4]="String",e[e.Object=5]="Object",e[e.Array=6]="Array",e[e.Date=7]="Date",e[e.Uint8Array=8]="Uint8Array",e[e.Symbol=9]="Symbol",e[e.BigInt=10]="BigInt"})(Zb||(Zb={}));var OD=BigInt("14695981039346656037"),[bYe,SYe]=[BigInt("1099511628211"),BigInt("2")**BigInt("64")],vYe=Array.from({length:256}).map((e,t)=>BigInt(t)),Hhe=new Float64Array(1),Khe=new DataView(Hhe.buffer),Zhe=new Uint8Array(Hhe.buffer);function*_Ye(e){let t=e===0?1:Math.ceil(Math.floor(Math.log2(e)+1)/8);for(let r=0;r<t;r++)yield e>>8*(t-1-r)&255}function wYe(e){Py(Zb.Array);for(let t of e)FD(t)}function CYe(e){Py(Zb.Boolean),Py(e?1:0)}function xYe(e){Py(Zb.BigInt),Khe.setBigInt64(0,e);for(let t of Zhe)Py(t)}function EYe(e){Py(Zb.Date),FD(e.getTime())}function AYe(e){Py(Zb.Null)}function DYe(e){Py(Zb.Number),Khe.setFloat64(0,e);for(let t of Zhe)Py(t)}function kYe(e){Py(Zb.Object);for(let t of globalThis.Object.getOwnPropertyNames(e).sort())FD(t),FD(e[t])}function PYe(e){Py(Zb.String);for(let t=0;t<e.length;t++)for(let r of _Ye(e.charCodeAt(t)))Py(r)}function IYe(e){Py(Zb.Symbol),FD(e.description)}function RYe(e){Py(Zb.Uint8Array);for(let t=0;t<e.length;t++)Py(e[t])}function OYe(e){return Py(Zb.Undefined)}function FD(e){if(Pg(e))return wYe(e);if(Kx(e))return CYe(e);if(Kb(e))return xYe(e);if(ID(e))return EYe(e);if(Hx(e))return AYe(e);if(zm(e))return DYe(e);if(WS(e))return kYe(e);if(Zg(e))return PYe(e);if(Zx(e))return IYe(e);if(RD(e))return RYe(e);if(fS(e))return OYe(e);throw new l7(e)}function Py(e){OD=OD^vYe[e],OD=OD*bYe%SYe}function TD(e){return OD=BigInt("14695981039346656037"),FD(e),OD}var Er;(function(e){e[e.ArrayContains=0]="ArrayContains",e[e.ArrayMaxContains=1]="ArrayMaxContains",e[e.ArrayMaxItems=2]="ArrayMaxItems",e[e.ArrayMinContains=3]="ArrayMinContains",e[e.ArrayMinItems=4]="ArrayMinItems",e[e.ArrayUniqueItems=5]="ArrayUniqueItems",e[e.Array=6]="Array",e[e.AsyncIterator=7]="AsyncIterator",e[e.BigIntExclusiveMaximum=8]="BigIntExclusiveMaximum",e[e.BigIntExclusiveMinimum=9]="BigIntExclusiveMinimum",e[e.BigIntMaximum=10]="BigIntMaximum",e[e.BigIntMinimum=11]="BigIntMinimum",e[e.BigIntMultipleOf=12]="BigIntMultipleOf",e[e.BigInt=13]="BigInt",e[e.Boolean=14]="Boolean",e[e.DateExclusiveMaximumTimestamp=15]="DateExclusiveMaximumTimestamp",e[e.DateExclusiveMinimumTimestamp=16]="DateExclusiveMinimumTimestamp",e[e.DateMaximumTimestamp=17]="DateMaximumTimestamp",e[e.DateMinimumTimestamp=18]="DateMinimumTimestamp",e[e.DateMultipleOfTimestamp=19]="DateMultipleOfTimestamp",e[e.Date=20]="Date",e[e.Function=21]="Function",e[e.IntegerExclusiveMaximum=22]="IntegerExclusiveMaximum",e[e.IntegerExclusiveMinimum=23]="IntegerExclusiveMinimum",e[e.IntegerMaximum=24]="IntegerMaximum",e[e.IntegerMinimum=25]="IntegerMinimum",e[e.IntegerMultipleOf=26]="IntegerMultipleOf",e[e.Integer=27]="Integer",e[e.IntersectUnevaluatedProperties=28]="IntersectUnevaluatedProperties",e[e.Intersect=29]="Intersect",e[e.Iterator=30]="Iterator",e[e.Kind=31]="Kind",e[e.Literal=32]="Literal",e[e.Never=33]="Never",e[e.Not=34]="Not",e[e.Null=35]="Null",e[e.NumberExclusiveMaximum=36]="NumberExclusiveMaximum",e[e.NumberExclusiveMinimum=37]="NumberExclusiveMinimum",e[e.NumberMaximum=38]="NumberMaximum",e[e.NumberMinimum=39]="NumberMinimum",e[e.NumberMultipleOf=40]="NumberMultipleOf",e[e.Number=41]="Number",e[e.ObjectAdditionalProperties=42]="ObjectAdditionalProperties",e[e.ObjectMaxProperties=43]="ObjectMaxProperties",e[e.ObjectMinProperties=44]="ObjectMinProperties",e[e.ObjectRequiredProperty=45]="ObjectRequiredProperty",e[e.Object=46]="Object",e[e.Promise=47]="Promise",e[e.RegExp=48]="RegExp",e[e.StringFormatUnknown=49]="StringFormatUnknown",e[e.StringFormat=50]="StringFormat",e[e.StringMaxLength=51]="StringMaxLength",e[e.StringMinLength=52]="StringMinLength",e[e.StringPattern=53]="StringPattern",e[e.String=54]="String",e[e.Symbol=55]="Symbol",e[e.TupleLength=56]="TupleLength",e[e.Tuple=57]="Tuple",e[e.Uint8ArrayMaxByteLength=58]="Uint8ArrayMaxByteLength",e[e.Uint8ArrayMinByteLength=59]="Uint8ArrayMinByteLength",e[e.Uint8Array=60]="Uint8Array",e[e.Undefined=61]="Undefined",e[e.Union=62]="Union",e[e.Void=63]="Void"})(Er||(Er={}));var u7=class extends wf{constructor(t){super("Unknown type"),this.schema=t}};function u_(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function df(e){return e!==void 0}var SL=class{constructor(t){this.iterator=t}[Symbol.iterator](){return this.iterator}First(){let t=this.iterator.next();return t.done?void 0:t.value}};function _u(e,t,r,n){return{type:e,schema:t,path:r,value:n,message:Whe()({errorType:e,path:r,schema:t,value:n})}}function*FYe(e,t,r,n){}function*TYe(e,t,r,n){if(!Pg(n))return yield _u(Er.Array,e,r,n);df(e.minItems)&&!(n.length>=e.minItems)&&(yield _u(Er.ArrayMinItems,e,r,n)),df(e.maxItems)&&!(n.length<=e.maxItems)&&(yield _u(Er.ArrayMaxItems,e,r,n));for(let o=0;o<n.length;o++)yield*fy(e.items,t,`${r}/${o}`,n[o]);if(e.uniqueItems===!0&&!function(){let o=new Set;for(let a of n){let c=TD(a);if(o.has(c))return!1;o.add(c)}return!0}()&&(yield _u(Er.ArrayUniqueItems,e,r,n)),!(df(e.contains)||df(e.minContains)||df(e.maxContains)))return;let i=df(e.contains)?e.contains:Jf(),s=n.reduce((o,a,c)=>fy(i,t,`${r}${c}`,a).next().done===!0?o+1:o,0);s===0&&(yield _u(Er.ArrayContains,e,r,n)),zm(e.minContains)&&s<e.minContains&&(yield _u(Er.ArrayMinContains,e,r,n)),zm(e.maxContains)&&s>e.maxContains&&(yield _u(Er.ArrayMaxContains,e,r,n))}function*NYe(e,t,r,n){mL(n)||(yield _u(Er.AsyncIterator,e,r,n))}function*qYe(e,t,r,n){if(!Kb(n))return yield _u(Er.BigInt,e,r,n);df(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield _u(Er.BigIntExclusiveMaximum,e,r,n)),df(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield _u(Er.BigIntExclusiveMinimum,e,r,n)),df(e.maximum)&&!(n<=e.maximum)&&(yield _u(Er.BigIntMaximum,e,r,n)),df(e.minimum)&&!(n>=e.minimum)&&(yield _u(Er.BigIntMinimum,e,r,n)),df(e.multipleOf)&&n%e.multipleOf!==BigInt(0)&&(yield _u(Er.BigIntMultipleOf,e,r,n))}function*BYe(e,t,r,n){Kx(n)||(yield _u(Er.Boolean,e,r,n))}function*LYe(e,t,r,n){yield*fy(e.returns,t,r,n.prototype)}function*jYe(e,t,r,n){if(!ID(n))return yield _u(Er.Date,e,r,n);df(e.exclusiveMaximumTimestamp)&&!(n.getTime()<e.exclusiveMaximumTimestamp)&&(yield _u(Er.DateExclusiveMaximumTimestamp,e,r,n)),df(e.exclusiveMinimumTimestamp)&&!(n.getTime()>e.exclusiveMinimumTimestamp)&&(yield _u(Er.DateExclusiveMinimumTimestamp,e,r,n)),df(e.maximumTimestamp)&&!(n.getTime()<=e.maximumTimestamp)&&(yield _u(Er.DateMaximumTimestamp,e,r,n)),df(e.minimumTimestamp)&&!(n.getTime()>=e.minimumTimestamp)&&(yield _u(Er.DateMinimumTimestamp,e,r,n)),df(e.multipleOfTimestamp)&&n.getTime()%e.multipleOfTimestamp!==0&&(yield _u(Er.DateMultipleOfTimestamp,e,r,n))}function*MYe(e,t,r,n){yL(n)||(yield _u(Er.Function,e,r,n))}function*$Ye(e,t,r,n){if(!gL(n))return yield _u(Er.Integer,e,r,n);df(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield _u(Er.IntegerExclusiveMaximum,e,r,n)),df(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield _u(Er.IntegerExclusiveMinimum,e,r,n)),df(e.maximum)&&!(n<=e.maximum)&&(yield _u(Er.IntegerMaximum,e,r,n)),df(e.minimum)&&!(n>=e.minimum)&&(yield _u(Er.IntegerMinimum,e,r,n)),df(e.multipleOf)&&n%e.multipleOf!==0&&(yield _u(Er.IntegerMultipleOf,e,r,n))}function*UYe(e,t,r,n){for(let i of e.allOf){let s=fy(i,t,r,n).next();s.done||(yield _u(Er.Intersect,e,r,n),yield s.value)}if(e.unevaluatedProperties===!1){let i=new RegExp(o_(e));for(let s of Object.getOwnPropertyNames(n))i.test(s)||(yield _u(Er.IntersectUnevaluatedProperties,e,`${r}/${s}`,n))}if(typeof e.unevaluatedProperties=="object"){let i=new RegExp(o_(e));for(let s of Object.getOwnPropertyNames(n))if(!i.test(s)){let o=fy(e.unevaluatedProperties,t,`${r}/${s}`,n[s]).next();o.done||(yield o.value)}}}function*zYe(e,t,r,n){fL(n)||(yield _u(Er.Iterator,e,r,n))}function*GYe(e,t,r,n){n!==e.const&&(yield _u(Er.Literal,e,r,n))}function*VYe(e,t,r,n){yield _u(Er.Never,e,r,n)}function*XYe(e,t,r,n){fy(e.not,t,r,n).next().done===!0&&(yield _u(Er.Not,e,r,n))}function*WYe(e,t,r,n){Hx(n)||(yield _u(Er.Null,e,r,n))}function*HYe(e,t,r,n){if(!Ig.IsNumberLike(n))return yield _u(Er.Number,e,r,n);df(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield _u(Er.NumberExclusiveMaximum,e,r,n)),df(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield _u(Er.NumberExclusiveMinimum,e,r,n)),df(e.maximum)&&!(n<=e.maximum)&&(yield _u(Er.NumberMaximum,e,r,n)),df(e.minimum)&&!(n>=e.minimum)&&(yield _u(Er.NumberMinimum,e,r,n)),df(e.multipleOf)&&n%e.multipleOf!==0&&(yield _u(Er.NumberMultipleOf,e,r,n))}function*KYe(e,t,r,n){if(!Ig.IsObjectLike(n))return yield _u(Er.Object,e,r,n);df(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield _u(Er.ObjectMinProperties,e,r,n)),df(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield _u(Er.ObjectMaxProperties,e,r,n));let i=Array.isArray(e.required)?e.required:[],s=Object.getOwnPropertyNames(e.properties),o=Object.getOwnPropertyNames(n);for(let a of i)o.includes(a)||(yield _u(Er.ObjectRequiredProperty,e.properties[a],`${r}/${u_(a)}`,void 0));if(e.additionalProperties===!1)for(let a of o)s.includes(a)||(yield _u(Er.ObjectAdditionalProperties,e,`${r}/${u_(a)}`,n[a]));if(typeof e.additionalProperties=="object")for(let a of o)s.includes(a)||(yield*fy(e.additionalProperties,t,`${r}/${u_(a)}`,n[a]));for(let a of s){let c=e.properties[a];e.required&&e.required.includes(a)?(yield*fy(c,t,`${r}/${u_(a)}`,n[a]),a_(e)&&!(a in n)&&(yield _u(Er.ObjectRequiredProperty,c,`${r}/${u_(a)}`,void 0))):Ig.IsExactOptionalProperty(n,a)&&(yield*fy(c,t,`${r}/${u_(a)}`,n[a]))}}function*ZYe(e,t,r,n){hL(n)||(yield _u(Er.Promise,e,r,n))}function*YYe(e,t,r,n){if(!Ig.IsRecordLike(n))return yield _u(Er.Object,e,r,n);df(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield _u(Er.ObjectMinProperties,e,r,n)),df(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield _u(Er.ObjectMaxProperties,e,r,n));let[i,s]=Object.entries(e.patternProperties)[0],o=new RegExp(i);for(let[a,c]of Object.entries(n))o.test(a)&&(yield*fy(s,t,`${r}/${u_(a)}`,c));if(typeof e.additionalProperties=="object")for(let[a,c]of Object.entries(n))o.test(a)||(yield*fy(e.additionalProperties,t,`${r}/${u_(a)}`,c));if(e.additionalProperties===!1){for(let[a,c]of Object.entries(n))if(!o.test(a))return yield _u(Er.ObjectAdditionalProperties,e,`${r}/${u_(a)}`,c)}}function*JYe(e,t,r,n){yield*fy(Yg(e,t),t,r,n)}function*QYe(e,t,r,n){if(!Zg(n))return yield _u(Er.String,e,r,n);if(df(e.minLength)&&!(n.length>=e.minLength)&&(yield _u(Er.StringMinLength,e,r,n)),df(e.maxLength)&&!(n.length<=e.maxLength)&&(yield _u(Er.StringMaxLength,e,r,n)),!new RegExp(e.source,e.flags).test(n))return yield _u(Er.RegExp,e,r,n)}function*eJe(e,t,r,n){if(!Zg(n))return yield _u(Er.String,e,r,n);df(e.minLength)&&!(n.length>=e.minLength)&&(yield _u(Er.StringMinLength,e,r,n)),df(e.maxLength)&&!(n.length<=e.maxLength)&&(yield _u(Er.StringMaxLength,e,r,n)),Zg(e.pattern)&&(new RegExp(e.pattern).test(n)||(yield _u(Er.StringPattern,e,r,n))),Zg(e.format)&&(hb.Has(e.format)?hb.Get(e.format)(n)||(yield _u(Er.StringFormat,e,r,n)):yield _u(Er.StringFormatUnknown,e,r,n))}function*tJe(e,t,r,n){Zx(n)||(yield _u(Er.Symbol,e,r,n))}function*rJe(e,t,r,n){if(!Zg(n))return yield _u(Er.String,e,r,n);new RegExp(e.pattern).test(n)||(yield _u(Er.StringPattern,e,r,n))}function*nJe(e,t,r,n){yield*fy(Yg(e,t),t,r,n)}function*iJe(e,t,r,n){if(!Pg(n))return yield _u(Er.Tuple,e,r,n);if(e.items===void 0&&n.length!==0)return yield _u(Er.TupleLength,e,r,n);if(n.length!==e.maxItems)return yield _u(Er.TupleLength,e,r,n);if(!!e.items)for(let i=0;i<e.items.length;i++)yield*fy(e.items[i],t,`${r}/${i}`,n[i])}function*sJe(e,t,r,n){fS(n)||(yield _u(Er.Undefined,e,r,n))}function*oJe(e,t,r,n){let i=0;for(let s of e.anyOf){let o=[...fy(s,t,r,n)];if(o.length===0)return;i+=o.length}i>0&&(yield _u(Er.Union,e,r,n))}function*aJe(e,t,r,n){if(!RD(n))return yield _u(Er.Uint8Array,e,r,n);df(e.maxByteLength)&&!(n.length<=e.maxByteLength)&&(yield _u(Er.Uint8ArrayMaxByteLength,e,r,n)),df(e.minByteLength)&&!(n.length>=e.minByteLength)&&(yield _u(Er.Uint8ArrayMinByteLength,e,r,n))}function*cJe(e,t,r,n){}function*lJe(e,t,r,n){Ig.IsVoidLike(n)||(yield _u(Er.Void,e,r,n))}function*uJe(e,t,r,n){Dy.Get(e[Tn])(e,n)||(yield _u(Er.Kind,e,r,n))}function*fy(e,t,r,n){let i=df(e.$id)?[...t,e]:t,s=e;switch(s[Tn]){case"Any":return yield*FYe(s,i,r,n);case"Array":return yield*TYe(s,i,r,n);case"AsyncIterator":return yield*NYe(s,i,r,n);case"BigInt":return yield*qYe(s,i,r,n);case"Boolean":return yield*BYe(s,i,r,n);case"Constructor":return yield*LYe(s,i,r,n);case"Date":return yield*jYe(s,i,r,n);case"Function":return yield*MYe(s,i,r,n);case"Integer":return yield*$Ye(s,i,r,n);case"Intersect":return yield*UYe(s,i,r,n);case"Iterator":return yield*zYe(s,i,r,n);case"Literal":return yield*GYe(s,i,r,n);case"Never":return yield*VYe(s,i,r,n);case"Not":return yield*XYe(s,i,r,n);case"Null":return yield*WYe(s,i,r,n);case"Number":return yield*HYe(s,i,r,n);case"Object":return yield*KYe(s,i,r,n);case"Promise":return yield*ZYe(s,i,r,n);case"Record":return yield*YYe(s,i,r,n);case"Ref":return yield*JYe(s,i,r,n);case"RegExp":return yield*QYe(s,i,r,n);case"String":return yield*eJe(s,i,r,n);case"Symbol":return yield*tJe(s,i,r,n);case"TemplateLiteral":return yield*rJe(s,i,r,n);case"This":return yield*nJe(s,i,r,n);case"Tuple":return yield*iJe(s,i,r,n);case"Undefined":return yield*sJe(s,i,r,n);case"Union":return yield*oJe(s,i,r,n);case"Uint8Array":return yield*aJe(s,i,r,n);case"Unknown":return yield*cJe(s,i,r,n);case"Void":return yield*lJe(s,i,r,n);default:if(!Dy.Has(s[Tn]))throw new u7(e);return yield*uJe(s,i,r,n)}}function Yhe(...e){let t=e.length===3?fy(e[0],e[1],"",e[2]):fy(e[0],[],"",e[1]);return new SL(t)}var d7=class extends wf{constructor(t){super("Unknown type"),this.schema=t}};function dJe(e){return e[Tn]==="Any"||e[Tn]==="Unknown"}function pf(e){return e!==void 0}function pJe(e,t,r){return!0}function mJe(e,t,r){if(!Pg(r)||pf(e.minItems)&&!(r.length>=e.minItems)||pf(e.maxItems)&&!(r.length<=e.maxItems)||!r.every(s=>hy(e.items,t,s))||e.uniqueItems===!0&&!function(){let s=new Set;for(let o of r){let a=TD(o);if(s.has(a))return!1;s.add(a)}return!0}())return!1;if(!(pf(e.contains)||zm(e.minContains)||zm(e.maxContains)))return!0;let n=pf(e.contains)?e.contains:Jf(),i=r.reduce((s,o)=>hy(n,t,o)?s+1:s,0);return!(i===0||zm(e.minContains)&&i<e.minContains||zm(e.maxContains)&&i>e.maxContains)}function fJe(e,t,r){return mL(r)}function hJe(e,t,r){return!(!Kb(r)||pf(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||pf(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||pf(e.maximum)&&!(r<=e.maximum)||pf(e.minimum)&&!(r>=e.minimum)||pf(e.multipleOf)&&r%e.multipleOf!==BigInt(0))}function gJe(e,t,r){return Kx(r)}function yJe(e,t,r){return hy(e.returns,t,r.prototype)}function bJe(e,t,r){return!(!ID(r)||pf(e.exclusiveMaximumTimestamp)&&!(r.getTime()<e.exclusiveMaximumTimestamp)||pf(e.exclusiveMinimumTimestamp)&&!(r.getTime()>e.exclusiveMinimumTimestamp)||pf(e.maximumTimestamp)&&!(r.getTime()<=e.maximumTimestamp)||pf(e.minimumTimestamp)&&!(r.getTime()>=e.minimumTimestamp)||pf(e.multipleOfTimestamp)&&r.getTime()%e.multipleOfTimestamp!==0)}function SJe(e,t,r){return yL(r)}function vJe(e,t,r){return!(!gL(r)||pf(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||pf(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||pf(e.maximum)&&!(r<=e.maximum)||pf(e.minimum)&&!(r>=e.minimum)||pf(e.multipleOf)&&r%e.multipleOf!==0)}function _Je(e,t,r){let n=e.allOf.every(i=>hy(i,t,r));if(e.unevaluatedProperties===!1){let i=new RegExp(o_(e)),s=Object.getOwnPropertyNames(r).every(o=>i.test(o));return n&&s}else if(ff(e.unevaluatedProperties)){let i=new RegExp(o_(e)),s=Object.getOwnPropertyNames(r).every(o=>i.test(o)||hy(e.unevaluatedProperties,t,r[o]));return n&&s}else return n}function wJe(e,t,r){return fL(r)}function CJe(e,t,r){return r===e.const}function xJe(e,t,r){return!1}function EJe(e,t,r){return!hy(e.not,t,r)}function AJe(e,t,r){return Hx(r)}function DJe(e,t,r){return!(!Ig.IsNumberLike(r)||pf(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||pf(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||pf(e.minimum)&&!(r>=e.minimum)||pf(e.maximum)&&!(r<=e.maximum)||pf(e.multipleOf)&&r%e.multipleOf!==0)}function kJe(e,t,r){if(!Ig.IsObjectLike(r)||pf(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)||pf(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties))return!1;let n=Object.getOwnPropertyNames(e.properties);for(let i of n){let s=e.properties[i];if(e.required&&e.required.includes(i)){if(!hy(s,t,r[i])||(a_(s)||dJe(s))&&!(i in r))return!1}else if(Ig.IsExactOptionalProperty(r,i)&&!hy(s,t,r[i]))return!1}if(e.additionalProperties===!1){let i=Object.getOwnPropertyNames(r);return e.required&&e.required.length===n.length&&i.length===n.length?!0:i.every(s=>n.includes(s))}else return typeof e.additionalProperties=="object"?Object.getOwnPropertyNames(r).every(s=>n.includes(s)||hy(e.additionalProperties,t,r[s])):!0}function PJe(e,t,r){return hL(r)}function IJe(e,t,r){if(!Ig.IsRecordLike(r)||pf(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)||pf(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties))return!1;let[n,i]=Object.entries(e.patternProperties)[0],s=new RegExp(n),o=Object.entries(r).every(([l,u])=>s.test(l)?hy(i,t,u):!0),a=typeof e.additionalProperties=="object"?Object.entries(r).every(([l,u])=>s.test(l)?!0:hy(e.additionalProperties,t,u)):!0,c=e.additionalProperties===!1?Object.getOwnPropertyNames(r).every(l=>s.test(l)):!0;return o&&a&&c}function RJe(e,t,r){return hy(Yg(e,t),t,r)}function OJe(e,t,r){let n=new RegExp(e.source,e.flags);return pf(e.minLength)&&!(r.length>=e.minLength)||pf(e.maxLength)&&!(r.length<=e.maxLength)?!1:n.test(r)}function FJe(e,t,r){return!Zg(r)||pf(e.minLength)&&!(r.length>=e.minLength)||pf(e.maxLength)&&!(r.length<=e.maxLength)||pf(e.pattern)&&!new RegExp(e.pattern).test(r)?!1:pf(e.format)?hb.Has(e.format)?hb.Get(e.format)(r):!1:!0}function TJe(e,t,r){return Zx(r)}function NJe(e,t,r){return Zg(r)&&new RegExp(e.pattern).test(r)}function qJe(e,t,r){return hy(Yg(e,t),t,r)}function BJe(e,t,r){if(!Pg(r)||e.items===void 0&&r.length!==0||r.length!==e.maxItems)return!1;if(!e.items)return!0;for(let n=0;n<e.items.length;n++)if(!hy(e.items[n],t,r[n]))return!1;return!0}function LJe(e,t,r){return fS(r)}function jJe(e,t,r){return e.anyOf.some(n=>hy(n,t,r))}function MJe(e,t,r){return!(!RD(r)||pf(e.maxByteLength)&&!(r.length<=e.maxByteLength)||pf(e.minByteLength)&&!(r.length>=e.minByteLength))}function $Je(e,t,r){return!0}function UJe(e,t,r){return Ig.IsVoidLike(r)}function zJe(e,t,r){return Dy.Has(e[Tn])?Dy.Get(e[Tn])(e,r):!1}function hy(e,t,r){let n=pf(e.$id)?[...t,e]:t,i=e;switch(i[Tn]){case"Any":return pJe(i,n,r);case"Array":return mJe(i,n,r);case"AsyncIterator":return fJe(i,n,r);case"BigInt":return hJe(i,n,r);case"Boolean":return gJe(i,n,r);case"Constructor":return yJe(i,n,r);case"Date":return bJe(i,n,r);case"Function":return SJe(i,n,r);case"Integer":return vJe(i,n,r);case"Intersect":return _Je(i,n,r);case"Iterator":return wJe(i,n,r);case"Literal":return CJe(i,n,r);case"Never":return xJe(i,n,r);case"Not":return EJe(i,n,r);case"Null":return AJe(i,n,r);case"Number":return DJe(i,n,r);case"Object":return kJe(i,n,r);case"Promise":return PJe(i,n,r);case"Record":return IJe(i,n,r);case"Ref":return RJe(i,n,r);case"RegExp":return OJe(i,n,r);case"String":return FJe(i,n,r);case"Symbol":return TJe(i,n,r);case"TemplateLiteral":return NJe(i,n,r);case"This":return qJe(i,n,r);case"Tuple":return BJe(i,n,r);case"Undefined":return LJe(i,n,r);case"Union":return jJe(i,n,r);case"Uint8Array":return MJe(i,n,r);case"Unknown":return $Je(i,n,r);case"Void":return UJe(i,n,r);default:if(!Dy.Has(i[Tn]))throw new d7(i);return zJe(i,n,r)}}function B1(...e){return e.length===3?hy(e[0],e[1],e[2]):hy(e[0],[],e[1])}var vL=class extends wf{constructor(t,r,n){super("Unable to decode value as it does not match the expected schema"),this.schema=t,this.value=r,this.error=n}},p7=class extends wf{constructor(t,r,n,i){super(i instanceof Error?i.message:"Unknown error"),this.schema=t,this.path=r,this.value=n,this.error=i}};function rg(e,t,r){try{return Ph(e)?e[gg].Decode(r):r}catch(n){throw new p7(e,t,r,n)}}function GJe(e,t,r,n){return Pg(n)?rg(e,r,n.map((i,s)=>HS(e.items,t,`${r}/${s}`,i))):rg(e,r,n)}function VJe(e,t,r,n){if(!WS(n)||bL(n))return rg(e,r,n);let i=rB(e),s=i.map(u=>u[0]),o={...n};for(let[u,m]of i)u in o&&(o[u]=HS(m,t,`${r}/${u}`,o[u]));if(!Ph(e.unevaluatedProperties))return rg(e,r,o);let a=Object.getOwnPropertyNames(o),c=e.unevaluatedProperties,l={...o};for(let u of a)s.includes(u)||(l[u]=rg(c,`${r}/${u}`,l[u]));return rg(e,r,l)}function XJe(e,t,r,n){return rg(e,r,HS(e.not,t,r,n))}function WJe(e,t,r,n){if(!WS(n))return rg(e,r,n);let i=x0(e),s={...n};for(let l of i)l in s&&(s[l]=HS(e.properties[l],t,`${r}/${l}`,s[l]));if(!ff(e.additionalProperties))return rg(e,r,s);let o=Object.getOwnPropertyNames(s),a=e.additionalProperties,c={...s};for(let l of o)i.includes(l)||(c[l]=rg(a,`${r}/${l}`,c[l]));return rg(e,r,c)}function HJe(e,t,r,n){if(!WS(n))return rg(e,r,n);let i=Object.getOwnPropertyNames(e.patternProperties)[0],s=new RegExp(i),o={...n};for(let u of Object.getOwnPropertyNames(n))s.test(u)&&(o[u]=HS(e.patternProperties[i],t,`${r}/${u}`,o[u]));if(!ff(e.additionalProperties))return rg(e,r,o);let a=Object.getOwnPropertyNames(o),c=e.additionalProperties,l={...o};for(let u of a)s.test(u)||(l[u]=rg(c,`${r}/${u}`,l[u]));return rg(e,r,l)}function KJe(e,t,r,n){let i=Yg(e,t);return rg(e,r,HS(i,t,r,n))}function ZJe(e,t,r,n){let i=Yg(e,t);return rg(e,r,HS(i,t,r,n))}function YJe(e,t,r,n){return Pg(n)&&Pg(e.items)?rg(e,r,e.items.map((i,s)=>HS(i,t,`${r}/${s}`,n[s]))):rg(e,r,n)}function JJe(e,t,r,n){for(let i of e.anyOf){if(!B1(i,t,n))continue;let s=HS(i,t,r,n);return rg(e,r,s)}return rg(e,r,n)}function HS(e,t,r,n){let i=typeof e.$id=="string"?[...t,e]:t,s=e;switch(e[Tn]){case"Array":return GJe(s,i,r,n);case"Intersect":return VJe(s,i,r,n);case"Not":return XJe(s,i,r,n);case"Object":return WJe(s,i,r,n);case"Record":return HJe(s,i,r,n);case"Ref":return KJe(s,i,r,n);case"Symbol":return rg(s,r,n);case"This":return ZJe(s,i,r,n);case"Tuple":return YJe(s,i,r,n);case"Union":return JJe(s,i,r,n);default:return rg(s,r,n)}}function Jhe(e,t,r){return HS(e,t,"",r)}var _L=class extends wf{constructor(t,r,n){super("The encoded value does not match the expected schema"),this.schema=t,this.value=r,this.error=n}},m7=class extends wf{constructor(t,r,n,i){super(`${i instanceof Error?i.message:"Unknown error"}`),this.schema=t,this.path=r,this.value=n,this.error=i}};function Jg(e,t,r){try{return Ph(e)?e[gg].Encode(r):r}catch(n){throw new m7(e,t,r,n)}}function QJe(e,t,r,n){let i=Jg(e,r,n);return Pg(i)?i.map((s,o)=>KS(e.items,t,`${r}/${o}`,s)):i}function eQe(e,t,r,n){let i=Jg(e,r,n);if(!WS(n)||bL(n))return i;let s=rB(e),o=s.map(m=>m[0]),a={...i};for(let[m,f]of s)m in a&&(a[m]=KS(f,t,`${r}/${m}`,a[m]));if(!Ph(e.unevaluatedProperties))return Jg(e,r,a);let c=Object.getOwnPropertyNames(a),l=e.unevaluatedProperties,u={...a};for(let m of c)o.includes(m)||(u[m]=Jg(l,`${r}/${m}`,u[m]));return u}function tQe(e,t,r,n){return Jg(e.not,r,Jg(e,r,n))}function rQe(e,t,r,n){let i=Jg(e,r,n);if(!WS(i))return i;let s=x0(e),o={...i};for(let u of s)u in o&&(o[u]=KS(e.properties[u],t,`${r}/${u}`,o[u]));if(!ff(e.additionalProperties))return o;let a=Object.getOwnPropertyNames(o),c=e.additionalProperties,l={...o};for(let u of a)s.includes(u)||(l[u]=Jg(c,`${r}/${u}`,l[u]));return l}function nQe(e,t,r,n){let i=Jg(e,r,n);if(!WS(n))return i;let s=Object.getOwnPropertyNames(e.patternProperties)[0],o=new RegExp(s),a={...i};for(let m of Object.getOwnPropertyNames(n))o.test(m)&&(a[m]=KS(e.patternProperties[s],t,`${r}/${m}`,a[m]));if(!ff(e.additionalProperties))return Jg(e,r,a);let c=Object.getOwnPropertyNames(a),l=e.additionalProperties,u={...a};for(let m of c)o.test(m)||(u[m]=Jg(l,`${r}/${m}`,u[m]));return u}function iQe(e,t,r,n){let i=Yg(e,t),s=KS(i,t,r,n);return Jg(e,r,s)}function sQe(e,t,r,n){let i=Yg(e,t),s=KS(i,t,r,n);return Jg(e,r,s)}function oQe(e,t,r,n){let i=Jg(e,r,n);return Pg(e.items)?e.items.map((s,o)=>KS(s,t,`${r}/${o}`,i[o])):[]}function aQe(e,t,r,n){for(let i of e.anyOf){if(!B1(i,t,n))continue;let s=KS(i,t,r,n);return Jg(e,r,s)}for(let i of e.anyOf){let s=KS(i,t,r,n);if(!!B1(e,t,s))return Jg(e,r,s)}return Jg(e,r,n)}function KS(e,t,r,n){let i=typeof e.$id=="string"?[...t,e]:t,s=e;switch(e[Tn]){case"Array":return QJe(s,i,r,n);case"Intersect":return eQe(s,i,r,n);case"Not":return tQe(s,i,r,n);case"Object":return rQe(s,i,r,n);case"Record":return nQe(s,i,r,n);case"Ref":return iQe(s,i,r,n);case"This":return sQe(s,i,r,n);case"Tuple":return oQe(s,i,r,n);case"Union":return aQe(s,i,r,n);default:return Jg(s,r,n)}}function Qhe(e,t,r){return KS(e,t,"",r)}function cQe(e,t){return Ph(e)||Qg(e.items,t)}function lQe(e,t){return Ph(e)||Qg(e.items,t)}function uQe(e,t){return Ph(e)||Qg(e.returns,t)||e.parameters.some(r=>Qg(r,t))}function dQe(e,t){return Ph(e)||Qg(e.returns,t)||e.parameters.some(r=>Qg(r,t))}function pQe(e,t){return Ph(e)||Ph(e.unevaluatedProperties)||e.allOf.some(r=>Qg(r,t))}function mQe(e,t){return Ph(e)||Qg(e.items,t)}function fQe(e,t){return Ph(e)||Qg(e.not,t)}function hQe(e,t){return Ph(e)||Object.values(e.properties).some(r=>Qg(r,t))||ff(e.additionalProperties)&&Qg(e.additionalProperties,t)}function gQe(e,t){return Ph(e)||Qg(e.item,t)}function yQe(e,t){let r=Object.getOwnPropertyNames(e.patternProperties)[0],n=e.patternProperties[r];return Ph(e)||Qg(n,t)||ff(e.additionalProperties)&&Ph(e.additionalProperties)}function bQe(e,t){return Ph(e)?!0:Qg(Yg(e,t),t)}function SQe(e,t){return Ph(e)?!0:Qg(Yg(e,t),t)}function vQe(e,t){return Ph(e)||!fS(e.items)&&e.items.some(r=>Qg(r,t))}function _Qe(e,t){return Ph(e)||e.anyOf.some(r=>Qg(r,t))}function Qg(e,t){let r=Zg(e.$id)?[...t,e]:t,n=e;if(e.$id&&f7.has(e.$id))return!1;switch(e.$id&&f7.add(e.$id),e[Tn]){case"Array":return cQe(n,r);case"AsyncIterator":return lQe(n,r);case"Constructor":return uQe(n,r);case"Function":return dQe(n,r);case"Intersect":return pQe(n,r);case"Iterator":return mQe(n,r);case"Not":return fQe(n,r);case"Object":return hQe(n,r);case"Promise":return gQe(n,r);case"Record":return yQe(n,r);case"Ref":return bQe(n,r);case"This":return SQe(n,r);case"Tuple":return vQe(n,r);case"Union":return _Qe(n,r);default:return Ph(e)}}var f7=new Set;function ege(e,t){return f7.clear(),Qg(e,t)}var h7=class{constructor(t,r,n,i){this.schema=t,this.references=r,this.checkFunc=n,this.code=i,this.hasTransform=ege(t,r)}Code(){return this.code}Errors(t){return Yhe(this.schema,this.references,t)}Check(t){return this.checkFunc(t)}Decode(t){if(!this.checkFunc(t))throw new vL(this.schema,t,this.Errors(t).First());return this.hasTransform?Jhe(this.schema,this.references,t):t}Encode(t){let r=this.hasTransform?Qhe(this.schema,this.references,t):t;if(!this.checkFunc(r))throw new _L(this.schema,t,this.Errors(t).First());return r}},d_;(function(e){function t(s){return s===36}e.DollarSign=t;function r(s){return s===95}e.IsUnderscore=r;function n(s){return s>=65&&s<=90||s>=97&&s<=122}e.IsAlpha=n;function i(s){return s>=48&&s<=57}e.IsNumeric=i})(d_||(d_={}));var wL;(function(e){function t(s){return s.length===0?!1:d_.IsNumeric(s.charCodeAt(0))}function r(s){if(t(s))return!1;for(let o=0;o<s.length;o++){let a=s.charCodeAt(o);if(!(d_.IsAlpha(a)||d_.IsNumeric(a)||d_.DollarSign(a)||d_.IsUnderscore(a)))return!1}return!0}function n(s){return s.replace(/'/g,"\\'")}function i(s,o){return r(o)?`${s}.${o}`:`${s}['${n(o)}']`}e.Encode=i})(wL||(wL={}));var g7;(function(e){function t(r){let n=[];for(let i=0;i<r.length;i++){let s=r.charCodeAt(i);d_.IsNumeric(s)||d_.IsAlpha(s)?n.push(r.charAt(i)):n.push(`_${s}_`)}return n.join("").replace(/__/g,"_")}e.Encode=t})(g7||(g7={}));var y7;(function(e){function t(r){return r.replace(/'/g,"\\'")}e.Escape=t})(y7||(y7={}));var b7=class extends wf{constructor(t){super("Unknown type"),this.schema=t}},CL=class extends wf{constructor(t){super("Preflight validation check failed to guard for the given schema"),this.schema=t}},Yx;(function(e){function t(o,a,c){return Ig.ExactOptionalPropertyTypes?`('${a}' in ${o} ? ${c} : true)`:`(${wL.Encode(o,a)} !== undefined ? ${c} : true)`}e.IsExactOptionalProperty=t;function r(o){return Ig.AllowArrayObject?`(typeof ${o} === 'object' && ${o} !== null)`:`(typeof ${o} === 'object' && ${o} !== null && !Array.isArray(${o}))`}e.IsObjectLike=r;function n(o){return Ig.AllowArrayObject?`(typeof ${o} === 'object' && ${o} !== null && !(${o} instanceof Date) && !(${o} instanceof Uint8Array))`:`(typeof ${o} === 'object' && ${o} !== null && !Array.isArray(${o}) && !(${o} instanceof Date) && !(${o} instanceof Uint8Array))`}e.IsRecordLike=n;function i(o){return Ig.AllowNaN?`typeof ${o} === 'number'`:`Number.isFinite(${o})`}e.IsNumberLike=i;function s(o){return Ig.AllowNullVoid?`(${o} === undefined || ${o} === null)`:`${o} === undefined`}e.IsVoidLike=s})(Yx||(Yx={}));var fd;(function(e){function t(ue){return ue[Tn]==="Any"||ue[Tn]==="Unknown"}function*r(ue,co,et){yield"true"}function*n(ue,co,et){yield`Array.isArray(${et})`;let[ru,Wl]=[uo("value","any"),uo("acc","number")];zm(ue.maxItems)&&(yield`${et}.length <= ${ue.maxItems}`),zm(ue.minItems)&&(yield`${et}.length >= ${ue.minItems}`);let Vl=ap(ue.items,co,"value");if(yield`${et}.every((${ru}) => ${Vl})`,ff(ue.contains)||zm(ue.minContains)||zm(ue.maxContains)){let pe=ff(ue.contains)?ue.contains:Jf(),Ue=ap(pe,co,"value"),In=zm(ue.minContains)?[`(count >= ${ue.minContains})`]:[],wr=zm(ue.maxContains)?[`(count <= ${ue.maxContains})`]:[],nt=`const count = value.reduce((${Wl}, ${ru}) => ${Ue} ? acc + 1 : acc, 0)`,Wo=["(count > 0)",...In,...wr].join(" && ");yield`((${ru}) => { ${nt}; return ${Wo}})(${et})`}ue.uniqueItems===!0&&(yield`((${ru}) => { const set = new Set(); for(const element of value) { const hashed = hash(element); if(set.has(hashed)) { return false } else { set.add(hashed) } } return true } )(${et})`)}function*i(ue,co,et){yield`(typeof value === 'object' && Symbol.asyncIterator in ${et})`}function*s(ue,co,et){yield`(typeof ${et} === 'bigint')`,Kb(ue.exclusiveMaximum)&&(yield`${et} < BigInt(${ue.exclusiveMaximum})`),Kb(ue.exclusiveMinimum)&&(yield`${et} > BigInt(${ue.exclusiveMinimum})`),Kb(ue.maximum)&&(yield`${et} <= BigInt(${ue.maximum})`),Kb(ue.minimum)&&(yield`${et} >= BigInt(${ue.minimum})`),Kb(ue.multipleOf)&&(yield`(${et} % BigInt(${ue.multipleOf})) === 0`)}function*o(ue,co,et){yield`(typeof ${et} === 'boolean')`}function*a(ue,co,et){yield*Su(ue.returns,co,`${et}.prototype`)}function*c(ue,co,et){yield`(${et} instanceof Date) && Number.isFinite(${et}.getTime())`,zm(ue.exclusiveMaximumTimestamp)&&(yield`${et}.getTime() < ${ue.exclusiveMaximumTimestamp}`),zm(ue.exclusiveMinimumTimestamp)&&(yield`${et}.getTime() > ${ue.exclusiveMinimumTimestamp}`),zm(ue.maximumTimestamp)&&(yield`${et}.getTime() <= ${ue.maximumTimestamp}`),zm(ue.minimumTimestamp)&&(yield`${et}.getTime() >= ${ue.minimumTimestamp}`),zm(ue.multipleOfTimestamp)&&(yield`(${et}.getTime() % ${ue.multipleOfTimestamp}) === 0`)}function*l(ue,co,et){yield`(typeof ${et} === 'function')`}function*u(ue,co,et){yield`Number.isInteger(${et})`,zm(ue.exclusiveMaximum)&&(yield`${et} < ${ue.exclusiveMaximum}`),zm(ue.exclusiveMinimum)&&(yield`${et} > ${ue.exclusiveMinimum}`),zm(ue.maximum)&&(yield`${et} <= ${ue.maximum}`),zm(ue.minimum)&&(yield`${et} >= ${ue.minimum}`),zm(ue.multipleOf)&&(yield`(${et} % ${ue.multipleOf}) === 0`)}function*m(ue,co,et){let ru=ue.allOf.map(Wl=>ap(Wl,co,et)).join(" && ");if(ue.unevaluatedProperties===!1){let Wl=Ah(`${new RegExp(o_(ue))};`),Vl=`Object.getOwnPropertyNames(${et}).every(key => ${Wl}.test(key))`;yield`(${ru} && ${Vl})`}else if(ff(ue.unevaluatedProperties)){let Wl=Ah(`${new RegExp(o_(ue))};`),Vl=`Object.getOwnPropertyNames(${et}).every(key => ${Wl}.test(key) || ${ap(ue.unevaluatedProperties,co,`${et}[key]`)})`;yield`(${ru} && ${Vl})`}else yield`(${ru})`}function*f(ue,co,et){yield`(typeof value === 'object' && Symbol.iterator in ${et})`}function*y(ue,co,et){typeof ue.const=="number"||typeof ue.const=="boolean"?yield`(${et} === ${ue.const})`:yield`(${et} === '${y7.Escape(ue.const)}')`}function*C(ue,co,et){yield"false"}function*x(ue,co,et){yield`(!${ap(ue.not,co,et)})`}function*I(ue,co,et){yield`(${et} === null)`}function*F(ue,co,et){yield Yx.IsNumberLike(et),zm(ue.exclusiveMaximum)&&(yield`${et} < ${ue.exclusiveMaximum}`),zm(ue.exclusiveMinimum)&&(yield`${et} > ${ue.exclusiveMinimum}`),zm(ue.maximum)&&(yield`${et} <= ${ue.maximum}`),zm(ue.minimum)&&(yield`${et} >= ${ue.minimum}`),zm(ue.multipleOf)&&(yield`(${et} % ${ue.multipleOf}) === 0`)}function*T(ue,co,et){yield Yx.IsObjectLike(et),zm(ue.minProperties)&&(yield`Object.getOwnPropertyNames(${et}).length >= ${ue.minProperties}`),zm(ue.maxProperties)&&(yield`Object.getOwnPropertyNames(${et}).length <= ${ue.maxProperties}`);let ru=Object.getOwnPropertyNames(ue.properties);for(let Wl of ru){let Vl=wL.Encode(et,Wl),pe=ue.properties[Wl];if(ue.required&&ue.required.includes(Wl))yield*Su(pe,co,Vl),(a_(pe)||t(pe))&&(yield`('${Wl}' in ${et})`);else{let Ue=ap(pe,co,Vl);yield Yx.IsExactOptionalProperty(et,Wl,Ue)}}if(ue.additionalProperties===!1)if(ue.required&&ue.required.length===ru.length)yield`Object.getOwnPropertyNames(${et}).length === ${ru.length}`;else{let Wl=`[${ru.map(Vl=>`'${Vl}'`).join(", ")}]`;yield`Object.getOwnPropertyNames(${et}).every(key => ${Wl}.includes(key))`}if(typeof ue.additionalProperties=="object"){let Wl=ap(ue.additionalProperties,co,`${et}[key]`),Vl=`[${ru.map(pe=>`'${pe}'`).join(", ")}]`;yield`(Object.getOwnPropertyNames(${et}).every(key => ${Vl}.includes(key) || ${Wl}))`}}function*M(ue,co,et){yield`(typeof value === 'object' && typeof ${et}.then === 'function')`}function*Y(ue,co,et){yield Yx.IsRecordLike(et),zm(ue.minProperties)&&(yield`Object.getOwnPropertyNames(${et}).length >= ${ue.minProperties}`),zm(ue.maxProperties)&&(yield`Object.getOwnPropertyNames(${et}).length <= ${ue.maxProperties}`);let[ru,Wl]=Object.entries(ue.patternProperties)[0],Vl=Ah(`${new RegExp(ru)}`),pe=ap(Wl,co,"value"),Ue=ff(ue.additionalProperties)?ap(ue.additionalProperties,co,et):ue.additionalProperties===!1?"false":"true",In=`(${Vl}.test(key) ? ${pe} : ${Ue})`;yield`(Object.entries(${et}).every(([key, value]) => ${In}))`}function*de(ue,co,et){let ru=Yg(ue,co);if(Ym.functions.has(ue.$ref))return yield`${vf(ue.$ref)}(${et})`;yield*Su(ru,co,et)}function*Fn(ue,co,et){let ru=Ah(`${new RegExp(ue.source,ue.flags)};`);yield`(typeof ${et} === 'string')`,zm(ue.maxLength)&&(yield`${et}.length <= ${ue.maxLength}`),zm(ue.minLength)&&(yield`${et}.length >= ${ue.minLength}`),yield`${ru}.test(${et})`}function*ql(ue,co,et){yield`(typeof ${et} === 'string')`,zm(ue.maxLength)&&(yield`${et}.length <= ${ue.maxLength}`),zm(ue.minLength)&&(yield`${et}.length >= ${ue.minLength}`),ue.pattern!==void 0&&(yield`${Ah(`${new RegExp(ue.pattern)};`)}.test(${et})`),ue.format!==void 0&&(yield`format('${ue.format}', ${et})`)}function*To(ue,co,et){yield`(typeof ${et} === 'symbol')`}function*Jl(ue,co,et){yield`(typeof ${et} === 'string')`,yield`${Ah(`${new RegExp(ue.pattern)};`)}.test(${et})`}function*Go(ue,co,et){yield`${vf(ue.$ref)}(${et})`}function*vr(ue,co,et){if(yield`Array.isArray(${et})`,ue.items===void 0)return yield`${et}.length === 0`;yield`(${et}.length === ${ue.maxItems})`;for(let ru=0;ru<ue.items.length;ru++)yield`${ap(ue.items[ru],co,`${et}[${ru}]`)}`}function*ns(ue,co,et){yield`${et} === undefined`}function*Yl(ue,co,et){yield`(${ue.anyOf.map(Wl=>ap(Wl,co,et)).join(" || ")})`}function*Ql(ue,co,et){yield`${et} instanceof Uint8Array`,zm(ue.maxByteLength)&&(yield`(${et}.length <= ${ue.maxByteLength})`),zm(ue.minByteLength)&&(yield`(${et}.length >= ${ue.minByteLength})`)}function*Nu(ue,co,et){yield"true"}function*nd(ue,co,et){yield Yx.IsVoidLike(et)}function*Bl(ue,co,et){let ru=Ym.instances.size;Ym.instances.set(ru,ue),yield`kind('${ue[Tn]}', ${ru}, ${et})`}function*Su(ue,co,et,ru=!0){let Wl=Zg(ue.$id)?[...co,ue]:co,Vl=ue;if(ru&&Zg(ue.$id)){let pe=vf(ue.$id);if(Ym.functions.has(pe))return yield`${pe}(${et})`;{let Ue=lo(pe,ue,co,"value",!1);return Ym.functions.set(pe,Ue),yield`${pe}(${et})`}}switch(Vl[Tn]){case"Any":return yield*r(Vl,Wl,et);case"Array":return yield*n(Vl,Wl,et);case"AsyncIterator":return yield*i(Vl,Wl,et);case"BigInt":return yield*s(Vl,Wl,et);case"Boolean":return yield*o(Vl,Wl,et);case"Constructor":return yield*a(Vl,Wl,et);case"Date":return yield*c(Vl,Wl,et);case"Function":return yield*l(Vl,Wl,et);case"Integer":return yield*u(Vl,Wl,et);case"Intersect":return yield*m(Vl,Wl,et);case"Iterator":return yield*f(Vl,Wl,et);case"Literal":return yield*y(Vl,Wl,et);case"Never":return yield*C(Vl,Wl,et);case"Not":return yield*x(Vl,Wl,et);case"Null":return yield*I(Vl,Wl,et);case"Number":return yield*F(Vl,Wl,et);case"Object":return yield*T(Vl,Wl,et);case"Promise":return yield*M(Vl,Wl,et);case"Record":return yield*Y(Vl,Wl,et);case"Ref":return yield*de(Vl,Wl,et);case"RegExp":return yield*Fn(Vl,Wl,et);case"String":return yield*ql(Vl,Wl,et);case"Symbol":return yield*To(Vl,Wl,et);case"TemplateLiteral":return yield*Jl(Vl,Wl,et);case"This":return yield*Go(Vl,Wl,et);case"Tuple":return yield*vr(Vl,Wl,et);case"Undefined":return yield*ns(Vl,Wl,et);case"Union":return yield*Yl(Vl,Wl,et);case"Uint8Array":return yield*Ql(Vl,Wl,et);case"Unknown":return yield*Nu(Vl,Wl,et);case"Void":return yield*nd(Vl,Wl,et);default:if(!Dy.Has(Vl[Tn]))throw new b7(ue);return yield*Bl(Vl,Wl,et)}}let Ym={language:"javascript",functions:new Map,variables:new Map,instances:new Map};function ap(ue,co,et,ru=!0){return`(${[...Su(ue,co,et,ru)].join(" && ")})`}function vf(ue){return`check_${g7.Encode(ue)}`}function Ah(ue){let co=`local_${Ym.variables.size}`;return Ym.variables.set(co,`const ${co} = ${ue}`),co}function lo(ue,co,et,ru,Wl=!0){let[Vl,pe]=[`
422
422
  `,nt=>"".padStart(nt," ")],Ue=uo("value","any"),In=Dd("boolean"),wr=[...Su(co,et,ru,Wl)].map(nt=>`${pe(4)}${nt}`).join(` &&${Vl}`);return`function ${ue}(${Ue})${In} {${Vl}${pe(2)}return (${Vl}${wr}${Vl}${pe(2)})
423
423
  }`}function uo(ue,co){let et=Ym.language==="typescript"?`: ${co}`:"";return`${ue}${et}`}function Dd(ue){return Ym.language==="typescript"?`: ${ue}`:""}function Xl(ue,co,et){let ru=lo("check",ue,co,"value"),Wl=uo("value","any"),Vl=Dd("boolean"),pe=[...Ym.functions.values()],Ue=[...Ym.variables.values()],In=Zg(ue.$id)?`return function check(${Wl})${Vl} {
424
424
  return ${vf(ue.$id)}(value)
425
425
  }`:`return ${ru}`;return[...Ue,...pe,In].join(`
426
- `)}function md(...ue){let co={language:"javascript"},[et,ru,Wl]=ue.length===2&&Pg(ue[1])?[ue[0],ue[1],co]:ue.length===2&&!Pg(ue[1])?[ue[0],[],ue[1]]:ue.length===3?[ue[0],ue[1],ue[2]]:ue.length===1?[ue[0],[],co]:[null,[],co];if(Ym.language=Wl.language,Ym.variables.clear(),Ym.functions.clear(),Ym.instances.clear(),!ff(et))throw new CL(et);for(let Vl of ru)if(!ff(Vl))throw new CL(Vl);return Xl(et,ru,Wl)}e.Code=md;function pd(ue,co=[]){let et=md(ue,co,{language:"javascript"}),ru=globalThis.Function("kind","format","hash",et),Wl=new Map(Ym.instances);function Vl(wr,nt,Wo){if(!Dy.Has(wr)||!Wl.has(nt))return!1;let So=Dy.Get(wr),Hl=Wl.get(nt);return So(Hl,Wo)}function pe(wr,nt){return hb.Has(wr)?hb.Get(wr)(nt):!1}function Ue(wr){return TD(wr)}let In=ru(Vl,pe,Ue);return new h7(ue,co,In,et)}e.Compile=pd})(fd||(fd={}));var wQe=p.Union([ED,Pw,AD,xD],{additionalProperties:!1}),CQe=zx,xL=p.Object({sources:p.Array(wQe,{minItems:1}),transforms:p.Array(CQe),sinks:p.Array(Gx,{minItems:1})},{additionalProperties:!1}),tge=p.Object({sources:p.Record(p.String(),Vx,{minProperties:1}),transforms:p.Record(p.String(),Xx),sinks:p.Record(p.String(),Wx,{minProperties:1})},{additionalProperties:!1}),L1=p.Composite([p.Omit(PD,["id","definition","project_id","version","created_at","updated_at","is_deleted","status","resource_size","dedicated_ips"]),p.Object({definition:p.Optional(xL),status:p.Optional(p.String()),resource_size:p.Optional(DD),save_progress:p.Optional(p.Boolean()),skip_transform_validation:p.Optional(p.Boolean()),use_latest_snapshot:p.Optional(p.Boolean()),restart:p.Optional(p.Boolean()),update_only:p.Optional(p.Boolean()),dedicated_ips:p.Optional(p.Boolean())})]),xQe=fd.Compile(L1),rge=p.Composite([p.Omit(L1,["definition"]),p.Object({apiVersion:p.Literal(3)}),tge]),EQe=fd.Compile(rge),u2r=p.Object({name:p.String()},{additionalProperties:!1});var AQe=p.Object({name:p.String()},{additionalProperties:!1}),DQe={params:AQe,response:{204:{}}};var kQe=p.Object({name:p.String()}),PQe={body:kQe,response:{204:{}}};var b2r=p.Object({version:p.Optional(p.String())}),IQe=p.Object(Od(po({},PD.properties),{snapshot_location:p.Optional(p.String())})),RQe=p.Object({streamId:p.String()}),OQe=p.Object({userEmail:p.String(),fromSnapshotLocation:p.Optional(p.String())}),FQe={params:RQe,body:OQe,response:{204:{}}},TQe=p.Object({streamId:p.String()}),NQe=p.Object({userEmail:p.String(),takeSnapshot:p.Optional(p.Boolean()),fromSnapshotLocation:p.Optional(p.String()),configOverrides:p.Optional(pL)}),qQe={params:TQe,body:NQe,response:{204:{}}},S2r=p.Object({requestId:p.String()}),v2r=p.Object({snapshotTriggerAt:p.Number()}),BQe={response:{200:p.Object({stateless:p.Boolean()})}},_2r=p.Object({isDryrun:p.Optional(p.Boolean()),logFullReport:p.Optional(p.Boolean()),onlyProcessStreamIds:p.Optional(p.Array(p.String()))});var LQe={response:{200:p.Array(XS)}};var nge=p.Object({name:p.String(),version:p.Optional(p.Union([p.Integer(),p.String()]))},{additionalProperties:!1}),ige=p.Object({key:p.String(),value:p.Number()}),S7=p.Object({message:p.String(),definitionId:p.Optional(p.String()),source:p.Optional(N1),transform:p.Optional(zx),sink:p.Optional(Gx)}),jQe=p.Object({status:p.String(),errors:p.Array(S7)},{additionalProperties:!1}),sge=p.Object({status:p.String(),errors:p.Array(S7),jobStats:p.Optional(p.Array(ige))},{additionalProperties:!1}),MQe=p.Object({name:p.String(),version:p.Integer(),runtimeDetails:sge},{additionalProperties:!1}),$Qe=p.Object({namesAndVersions:p.Array(nge)},{additionalProperties:!1}),oge=p.Object({name:p.String(),version:p.String()}),age=p.Object({lagMs:p.Number(),latestBlockNumber:p.Number(),latestBlockTime:p.Number(),sourceReferenceName:p.String(),measuredAt:p.Number(),estimatedCompletionTime:p.Optional(p.Number())}),cge=p.Object({lags:p.Array(age)}),UQe={response:{200:cge},params:oge};var zQe=["error","warn","info","debug"],GQe=p.Object({name:p.String(),version:p.String()}),VQe=p.Object({cursor:p.Optional(p.Number()),after:p.Optional(p.Number()),direction:p.Optional(p.Union([p.Literal("asc"),p.Literal("desc")])),log_levels:p.Optional(p.String())}),XQe={params:GQe,querystring:VQe};var WQe=p.Record(p.String(),p.Object({x:p.Integer(),y:p.Integer()})),EL=p.Object({id:p.String(),name:p.String(),definition_v3:p.Partial(kD),positions:WQe,stream_id:p.Optional(p.String()),stream_version:p.Optional(p.Integer()),project_id:p.String(),updated_by_user_id:p.Optional(p.String()),created_at:p.Number(),updated_at:p.Number()},{additionalProperties:!1}),AL=p.Omit(EL,["updated_by_user_id"]);var HQe=p.Object({results:p.Array(AL)}),KQe={response:{200:HQe}},L2r=p.Object({id:p.String()},{additionalProperties:!1}),ZQe={response:{200:AL}},YQe=p.Composite([p.Omit(EL,["id","project_id","updated_by_user_id","created_at","updated_at"]),p.Object({id:p.Optional(p.String())})]),j2r=p.Object({name:p.String()},{additionalProperties:!1}),M2r=p.Object({id:p.String()},{additionalProperties:!1}),JQe=p.Object({id:p.String()},{additionalProperties:!1}),QQe={params:JQe,response:{204:{}}};var lge=p.Object({pipelineConfig:p.Partial(kD),sql:p.String()}),eet=p.Object({referenceNames:p.Array(p.String())}),tet={body:lge,response:{200:eet}};var ret=p.Recursive(e=>p.Union([p.String(),p.Number(),p.Boolean(),p.Null(),p.Record(p.String(),e),p.Array(e)])),net=p.Object({kind:p.Union([p.Literal("INSERT"),p.Literal("DELETE"),p.Literal("UPDATE_BEFORE"),p.Literal("UPDATE_AFTER")]),fields:p.Array(ret)}),uge=p.Object({referenceName:p.String(),status:p.Union([p.Literal("SUCCEEDED"),p.Literal("FAILED")]),error:p.Optional(p.String()),columns:p.Array(p.Object({name:p.String(),type:p.String(),nullable:p.Boolean()})),data:p.Array(net)}),X2r=p.Object({sources:p.Array(uge),transforms:p.Array(uge)});var v7=p.Object({name:p.String(),description:p.Optional(p.String()),version:p.Integer(),apiVersion:p.Integer({default:3,minimum:3,maximum:3}),sources:p.Record(p.String(),Vx,{minProperties:1}),transforms:p.Record(p.String(),Xx),sinks:p.Record(p.String(),Wx),status:dL,project_id:p.String(),created_at:p.Number(),updated_at:p.Number(),resource_size:p.String(DD),support_tier:p.Optional(p.Integer()),updated_by_user_id:p.Optional(p.String()),is_deleted:p.Optional(p.Boolean())},{additionalProperties:!1});var iet=fd.Compile(p.Array(XS)),set=fd.Compile(p.Array(v7)),oet=fd.Compile(XS),aet=fd.Compile(L1),cet=fd.Compile(xL),uet={[Hb.File]:fd.Compile(AD),[Hb.Kafka]:fd.Compile(Pw),[Hb.SubgraphEntity]:fd.Compile(ED),[Hb.Dataset]:fd.Compile(xD)},det={[mS.SQL]:fd.Compile(DB),[mS.HANDLER]:fd.Compile(kB)},pet={[Uf.File]:fd.Compile(qB),[Uf.Kafka]:fd.Compile(TB),[Uf.Mysql]:fd.Compile(IB),[Uf.Postgres]:fd.Compile(RB),[Uf.ElasticSearch]:fd.Compile(OB),[Uf.OpenSearch]:fd.Compile(FB),[Uf.TimescaleHypertable]:fd.Compile(NB),[Uf.Rockset]:fd.Compile(BB),[Uf.ClickHouse]:fd.Compile(LB),[Uf.GoldskyClickHouse]:fd.Compile(jB),[Uf.Sqs]:fd.Compile(MB),[Uf.Print]:fd.Compile($B),[Uf.Blackhole]:fd.Compile(UB),[Uf.Webhook]:fd.Compile(zB)},met={[VS.File]:fd.Compile(WB),[VS.Kafka]:fd.Compile(XB),[VS.SubgraphEntity]:fd.Compile(VB),[VS.Dataset]:fd.Compile(GB)},fet={[mS.SQL]:fd.Compile(HB),[mS.HANDLER]:fd.Compile(KB)},het={[Qf.File]:fd.Compile(rL),[Qf.Kafka]:fd.Compile(eL),[Qf.Mysql]:fd.Compile(ZB),[Qf.Postgres]:fd.Compile(YB),[Qf.ElasticSearch]:fd.Compile(JB),[Qf.OpenSearch]:fd.Compile(QB),[Qf.TimescaleHypertable]:fd.Compile(tL),[Qf.Rockset]:fd.Compile(nL),[Qf.ClickHouse]:fd.Compile(iL),[Qf.GoldskyClickHouse]:fd.Compile(sL),[Qf.Sqs]:fd.Compile(oL),[Qf.Print]:fd.Compile(aL),[Qf.Blackhole]:fd.Compile(cL),[Qf.Webhook]:fd.Compile(lL)};var pqr=p.Object({status:p.String(),progressPercent:p.Optional(p.Number()),latestCompletedSnapshot:p.Optional(p.Object({startedAt:p.Number()}))});var Lqr=p.Object({groups:p.Array(CD),datasets:p.Array(kw)}),_7=p.Array(p.Object({name:p.String(),value:p.String()})),DL=p.Composite([kw,p.Object({sampleData:p.Array(_7)})]),jqr=p.Object({groups:p.Array(CD),datasets:p.Array(DL)},{additionalProperties:!1});var Mqr=p.Object({datasetType:p.String()}),$qr=p.Object({data:p.Array(DL)});var yet=p.Object({displayName:p.String(),description:p.String(),source:Pw}),mge=p.Object({label:p.String(),value:Dw}),fge=p.Object({name:p.String(),schema:p.Array(Ux)}),bet=p.Composite([fge,p.Object({sampleData:p.Array(_7)})]),hge=p.Object({name:p.String(),version:p.String(),displayName:p.String(),description:p.Optional(p.String()),deploymentId:p.String(),network:p.String(),entities:p.Array(fge),tags:p.Optional(p.Array(p.String()))}),vet=p.Composite([p.Omit(hge,["entities"]),p.Object({entities:p.Array(bet),id:p.String()})]),dge=p.Object({sinkType:p.Enum(Uf),displayName:p.String(),description:p.String()}),pge=p.Object({label:p.String(),options:p.Array(hge)}),_et=p.Object({label:p.String(),options:p.Array(yet),startingOffsets:p.Array(mge)}),gge=p.Object({publicBlockchainDatasets:_et,communitySubgraphs:pge,projectSubgraphs:pge}),wet=p.Omit(kw,["storages"],{additionalProperties:!1}),Cet=p.Object({sources:gge,datasetGroups:p.Array(CD),datasets:p.Object({blockchain:p.Array(wet),cliUxStartAtOptions:p.Array(mge)}),sinks:p.Object({eligibleUserProvidedSinks:p.Array(dge),eligibleGoldskyProvidedSinks:p.Array(dge)})});var Vqr=p.Composite([p.Omit(Cet,["sources"]),p.Object({sources:p.Omit(gge,["projectSubgraphs"])})]);var Xqr=p.Object({referenceName:p.String()}),Wqr=p.Object({data:p.Omit(DL,["storages"])});var Hqr=p.Object({deploymentId:p.String()}),Kqr=p.Object({data:vet});var Eet=p.Object({id:p.String(),name:p.String(),org_id:p.Union([p.String(),p.Null()]),billing_subscription_id:p.Union([p.String(),p.Null()]),billing_customer_id:p.Union([p.String(),p.Null()]),created_at:p.Number()}),Aet=p.Object(Od(po({},Eet.properties),{capabilities:p.Partial(jhe)})),Jqr=p.Object({data:Aet});var j1=p.Object({projectId:p.String(),name:p.String(),createdAt:p.Number(),currentlyAuthenticated:p.Boolean()}),tBr=p.Object({data:p.Array(j1)});var sBr=p.Object({data:j1}),oBr=p.Object({name:p.String()});var lBr=p.Object({data:p.Boolean()}),uBr=p.Object({projectId:p.String()});var Cge=Kl(E7()),BD=p.Enum(Cge.Role);var ELr=p.Object({data:p.Array(p.Object({email:p.String(),id:p.String(),firstName:p.Optional(p.String()),lastName:p.Optional(p.String()),role:BD,pending:p.Boolean()}))});var Get=p.Object({name:p.String(),subgraphs:p.Object({activeCount:p.Number(),pausedCount:p.Number()}),pipelines:p.Object({activeCount:p.Number(),pausedCount:p.Number(),inactiveCount:p.Number()})}),kLr=p.Object({data:Get});var RLr=p.Object({data:p.Boolean()}),OLr=p.Object({email:p.String()});var qLr=p.Object({data:j1}),BLr=p.Object({name:p.Optional(p.String())}),LLr=p.Object({projectId:p.String()});var ULr=p.Object({data:p.Boolean()}),zLr=p.Object({email:p.String(),role:BD});var njr=p.Object({data:p.Boolean()}),ijr=p.Object({emails:p.Array(p.String()),role:p.Optional(BD)});var D7={Subgraph:"Subgraph",Stream:"Stream"},A7={CustomSubgraph:"CustomSubgraph",CommunitySubgraph:"CommunitySubgraph"},k7={SubgraphApi:"SubgraphApi",Webhook:"Webhook"},PL=p.Object({id:p.String(),type:p.Literal(D7.Subgraph),project_id:p.String(),name:p.String(),version:p.Optional(p.String()),description:p.Optional(p.String()),created_at:p.Number(),updated_at:p.Number()}),xge=p.Object({type:p.Union([p.Literal(A7.CustomSubgraph),p.Literal(A7.CommunitySubgraph)]),id:p.String(),name:p.String(),referenceName:p.String(),version:p.String(),created_at:p.Number(),indexing_status:p.Object({fatal_error:p.Optional(p.String()),synced:p.Boolean(),entity_count:p.String(),chains:p.Array(p.Object({head_block:p.String(),earliest_block:p.String(),latest_block:p.String(),network:p.String(),progress_percent:p.String()}))}),status:p.Enum({Active:"Active",Paused:"Paused"})}),ajr=p.Union([xge]),Wet=p.Object({type:p.Literal(k7.SubgraphApi),id:p.String(),name:p.String(),referenceName:p.String(),url:p.String(),subgraphDeploymentId:p.String()}),Het=p.Object({type:p.Literal(k7.Webhook),id:p.String(),name:p.String(),referenceName:p.String(),entity:p.String(),url:p.String()}),Ket=p.Union([Wet,Het]),IL=p.Composite([PL,p.Object({definition:p.Object({sources:p.Array(xge),sinks:p.Array(Ket)})})]),RL=p.Composite([p.Omit(XS,["status"]),p.Object({type:p.Literal(D7.Stream)})]),Ege=p.Object({status:p.Optional(p.String()),errors:p.Array(p.Object({message:p.String(),referenceName:p.Optional(p.String())}))});var Zet=p.Union([IL,RL]),djr=p.Object({data:p.Array(Zet)});var hjr=p.Composite([p.Omit(PL,["id","created_at","updated_at","project_id"]),p.Object({subgraph_deployment_id:p.String()})]),gjr=p.Composite([PL,p.Object({subgraph_deployment_id:p.String()})]);var vjr=p.Object({data:IL}),_jr=p.Object({name:p.String()});var wjr=p.Object({data:RL}),Cjr=p.Object({name:p.String()});var xjr=p.Object({version:p.Optional(p.String())}),Ejr=p.Object({data:Ege});var kjr=p.Object({name:p.String()},{additionalProperties:!1});var qjr=p.Object({token:p.String(),email:p.Optional(p.String())});var Bjr=p.Object({bot:p.Boolean()});var kd={};eu(kd,{AnySecretValueTypebox:()=>p_,AnySecretValueValidator:()=>Qet,ClickHouseSecretTypebox:()=>Nge,CreateSecretBody:()=>P7,CreateSecretSchema:()=>Lge,DeleteSecretParams:()=>I7,DeleteSecretSchema:()=>jge,ElasticSearchSecretTypebox:()=>Ige,HttpAuthSecretTypebox:()=>Bge,InternalCreateSecretBody:()=>R7,InternalCreateSecretSchema:()=>$ge,InternalGetSecretSchema:()=>Mge,JdbcProtocols:()=>Age,JdbcSecretTypebox:()=>Dge,KafkaSecretTypebox:()=>Tge,ListSecretsSchema:()=>Uge,OpenSearchSecretTypebox:()=>Rge,RevealSecretSchema:()=>zge,RocksetSecretTypebox:()=>kge,S3SecretTypebox:()=>Pge,SaslMechanisms:()=>Fge,SecretTypebox:()=>Iw,SecretTypes:()=>hS,SecretWithoutValueTypebox:()=>m_,SecurityProtocols:()=>Oge,SqsSecretTypebox:()=>qge,UpdateSecretBody:()=>O7,UpdateSecretSchema:()=>Gge});var hS={jdbc:"jdbc",kafka:"kafka",rockset:"rockset",elasticSearch:"elasticSearch",opensearch:"opensearch",s3:"s3",clickHouse:"clickHouse",sqs:"sqs",httpauth:"httpauth"},Age={mysql:"mysql",postgres:"postgres",postgresql:"postgresql"},Dge=p.Object({type:p.Literal(hS.jdbc),protocol:p.Enum(Age),host:p.String(),port:p.Optional(p.Integer()),databaseName:p.String(),user:p.String(),password:p.String(),ssl:p.Optional(p.Boolean())}),kge=p.Object({type:p.Literal(hS.rockset),apiKey:p.String(),endpoint:p.String()}),Pge=p.Object({type:p.Literal(hS.s3),accessKeyId:p.String(),secretAccessKey:p.String(),region:p.String()}),Ige=p.Object({type:p.Literal(hS.elasticSearch),host:p.String(),username:p.String(),password:p.String()}),Rge=p.Object({type:p.Literal(hS.opensearch),host:p.String(),username:p.String(),password:p.String()}),Oge={PLAINTEXT:"PLAINTEXT",SASL_SSL:"SASL_SSL",SASL_PLAINTEXT:"SASL_PLAINTEXT"},Fge={PLAIN:"PLAIN",SCRAM_SHA_256:"SCRAM-SHA-256",SCRAM_SHA_512:"SCRAM-SHA-512"},Tge=p.Object({type:p.Literal(hS.kafka),bootstrapServers:p.String(),securityProtocol:p.Enum(Oge),saslMechanism:p.Optional(p.Enum(Fge)),saslJaasUsername:p.Optional(p.String()),saslJaasPassword:p.Optional(p.String()),schemaRegistryUrl:p.Optional(p.String()),schemaRegistryUsername:p.Optional(p.String()),schemaRegistryPassword:p.Optional(p.String()),schemaRegistryKeyPassword:p.Optional(p.String()),schemaRegistryKeystore:p.Optional(p.String())}),Nge=p.Object({type:p.Literal(hS.clickHouse),url:p.String(),username:p.String(),password:p.String(),databaseName:p.String()}),qge=p.Object({type:p.Literal(hS.sqs),accessKey:p.String(),secretAccessKey:p.String(),region:p.String()}),Bge=p.Object({type:p.Literal(hS.httpauth),secretKey:p.String(),secretValue:p.String()}),p_=p.Union([Dge,Tge,kge,Ige,Rge,Pge,Nge,qge,Bge]),Qet=fd.Compile(p_),Iw=p.Object({id:p.String(),name:p.String(),type:p.Enum(hS),variant:p.Optional(p.String()),value:p_,description:p.Optional(p.String()),created_at:p.Number()}),m_=p.Omit(Iw,["value"]);var zjr=p.Object({data:m_}),P7=p.Object({name:p.String(),value:p_,description:p.Optional(p.String())}),Lge={body:P7};var Xjr=p.Object({success:p.Boolean(),referencedStreams:p.Optional(p.Array(p.Object({streamName:p.String(),version:p.Number()})))}),I7=p.Object({secretName:p.String()}),jge={params:I7};var Zjr=p.Object({data:Iw}),Yjr=p.Object({projectId:p.String(),secretName:p.String()}),Mge={};var tMr=p.Object({data:m_}),R7=p.Object({projectId:p.String(),name:p.String(),value:p_,description:p.Optional(p.String()),dopplerEnv:p.Optional(p.String())}),$ge={body:R7};var sMr=p.Object({data:p.Array(m_)}),oMr=p.Object({data:p.Array(Iw)}),Uge={};var uMr=p.Object({data:Iw}),dMr=p.Object({secretName:p.String()}),zge={};var hMr=p.Object({data:m_}),O7=p.Object({value:p.Optional(p_),description:p.Optional(p.String())}),ett=p.Object({secretName:p.String()}),Gge={body:O7,params:ett};var ttt=p.Object({ipfs_hash:p.String(),db_name:p.String(),synced:p.Boolean(),failed:p.Boolean()}),AMr=p.Object({subgraphs:p.Array(ttt)}),DMr=p.Object({success:p.Boolean()});var RMr=p.Object({data:p.Array(p.Object({chain:p.String(),shard:p.String(),database:p.String(),schema:p.String(),table:p.String(),partitions:p.Number(),subgraph_ipfs_hash:p.String()}))});var itt=p.Object({id:p.String(),name:p.String(),channel:p.String(),enabled:p.Boolean(),group:p.String(),description:p.String()}),FMr=p.Object({preferences:p.Array(itt)});var TMr=p.Object({id:p.String()}),NMr=p.Object({enabled:p.Boolean()});var ott=p.Object({event_type:p.String(),name:p.String(),group:p.String(),description:p.String()}),BMr=p.Object({data:ott});var LMr=p.Object({event_type:p.String(),enabled:p.Boolean(),email_pattern:p.String(),channel:p.String()}),jMr=p.Object({data:p.Array(p.Object({email:p.String()}))});var $Mr=p.Object({project_id:p.String()}),UMr=p.Object({success:p.Boolean()});var zMr=p.Object({project_id:p.String()}),GMr=p.Object({success:p.Boolean()});var XMr=p.Object({subgraphs:p.Integer(),pipelines:p.Integer()});var ltt=p.Object({anonymousId:p.String(),sessionId:p.String()}),utt=p.Object({systemPlatform:p.String(),systemRelease:p.String(),systemArchitecture:p.String(),cpuCount:p.Number(),cpuModel:p.Union([p.String(),p.Null()]),cpuSpeed:p.Union([p.Number(),p.Null()]),memoryInMb:p.Number(),isCI:p.Boolean(),cliVersion:p.String()}),dtt=p.Object({name:p.String(),properties:p.Any()}),HMr=p.Object({context:ltt,environment:utt,events:p.Array(dtt)}),KMr=p.Object({success:p.Boolean()});var mtt=jI?80:3080,OL=jI?"https://api.goldsky.com":`http://127.0.0.1:${mtt}`;var $Z={};eu($Z,{builder:()=>jdt,command:()=>Bdt,describe:()=>Ldt,handler:()=>Mdt});var Ky=Kl(N7(),1),LD=require("node:process"),Rw=Kl(require("node:readline"),1),M7=Kl(require("node:readline"),1),tye=require("node:tty"),Qx=Kl(B7(),1);function vtt({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 rye(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(vtt(),"")}var $7={},_tt={get exports(){return $7},set exports(e){$7=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],m=t.length(u);if(a>=i-(m==2?1:0))if(a+m<=s)o+=u;else break;a+=m}return o}})(_tt);var wtt=$7,Ctt=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 M1(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=rye(e),e.length===0))return 0;e=e.replace(Ctt()," ");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(wtt.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}var L7=10,Hge=(e=0)=>t=>`\x1B[${t+e}m`,Kge=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Zge=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,Vh={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(Vh.modifier);var xtt=Object.keys(Vh.color),Ett=Object.keys(Vh.bgColor);[...xtt,...Ett];function Att(){let e=new Map;for(let[t,r]of Object.entries(Vh)){for(let[n,i]of Object.entries(r))Vh[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=Vh[n],e.set(i[0],i[1]);Object.defineProperty(Vh,t,{value:r,enumerable:!1})}return Object.defineProperty(Vh,"codes",{value:e,enumerable:!1}),Vh.color.close="\x1B[39m",Vh.bgColor.close="\x1B[49m",Vh.color.ansi=Hge(),Vh.color.ansi256=Kge(),Vh.color.ansi16m=Zge(),Vh.bgColor.ansi=Hge(L7),Vh.bgColor.ansi256=Kge(L7),Vh.bgColor.ansi16m=Zge(L7),Object.defineProperties(Vh,{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=>Vh.rgbToAnsi256(...Vh.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)=>Vh.ansi256ToAnsi(Vh.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>Vh.ansi256ToAnsi(Vh.hexToAnsi256(t)),enumerable:!1}}),Vh}var Dtt=Att(),ML=new Set(["\x1B","\x9B"]),ktt=39,U7="\x07",nye="[",Ptt="]",iye="m",z7=`${Ptt}8;;`,Yge=e=>`${ML.values().next().value}${nye}${e}${iye}`,Jge=e=>`${ML.values().next().value}${z7}${e}${U7}`,Itt=e=>e.split(" ").map(t=>M1(t)),j7=(e,t,r)=>{let n=[...t],i=!1,s=!1,o=M1(rye(e[e.length-1]));for(let[a,c]of n.entries()){let l=M1(c);if(o+l<=r?e[e.length-1]+=c:(e.push(c),o=0),ML.has(c)&&(i=!0,s=n.slice(a+1).join("").startsWith(z7)),i){s?c===U7&&(i=!1,s=!1):c===iye&&(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())},Rtt=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(M1(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Ott=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",i,s,o=Itt(e),a=[""];for(let[l,u]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let m=M1(a[a.length-1]);if(l!==0&&(m>=t&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),m=0),(m>0||r.trim===!1)&&(a[a.length-1]+=" ",m++)),r.hard&&o[l]>t){let f=t-m,y=1+Math.floor((o[l]-f-1)/t);Math.floor((o[l]-1)/t)<y&&a.push(""),j7(a,u,t);continue}if(m+o[l]>t&&m>0&&o[l]>0){if(r.wordWrap===!1&&m<t){j7(a,u,t);continue}a.push("")}if(m+o[l]>t&&r.wordWrap===!1){j7(a,u,t);continue}a[a.length-1]+=u}r.trim!==!1&&(a=a.map(l=>Rtt(l)));let c=[...a.join(`
426
+ `)}function md(...ue){let co={language:"javascript"},[et,ru,Wl]=ue.length===2&&Pg(ue[1])?[ue[0],ue[1],co]:ue.length===2&&!Pg(ue[1])?[ue[0],[],ue[1]]:ue.length===3?[ue[0],ue[1],ue[2]]:ue.length===1?[ue[0],[],co]:[null,[],co];if(Ym.language=Wl.language,Ym.variables.clear(),Ym.functions.clear(),Ym.instances.clear(),!ff(et))throw new CL(et);for(let Vl of ru)if(!ff(Vl))throw new CL(Vl);return Xl(et,ru,Wl)}e.Code=md;function pd(ue,co=[]){let et=md(ue,co,{language:"javascript"}),ru=globalThis.Function("kind","format","hash",et),Wl=new Map(Ym.instances);function Vl(wr,nt,Wo){if(!Dy.Has(wr)||!Wl.has(nt))return!1;let So=Dy.Get(wr),Hl=Wl.get(nt);return So(Hl,Wo)}function pe(wr,nt){return hb.Has(wr)?hb.Get(wr)(nt):!1}function Ue(wr){return TD(wr)}let In=ru(Vl,pe,Ue);return new h7(ue,co,In,et)}e.Compile=pd})(fd||(fd={}));var wQe=p.Union([ED,Pw,AD,xD],{additionalProperties:!1}),CQe=zx,xL=p.Object({sources:p.Array(wQe,{minItems:1}),transforms:p.Array(CQe),sinks:p.Array(Gx,{minItems:1})},{additionalProperties:!1}),tge=p.Object({sources:p.Record(p.String(),Vx,{minProperties:1}),transforms:p.Record(p.String(),Xx),sinks:p.Record(p.String(),Wx,{minProperties:1})},{additionalProperties:!1}),L1=p.Composite([p.Omit(PD,["id","definition","project_id","version","created_at","updated_at","is_deleted","status","resource_size","dedicated_ips"]),p.Object({definition:p.Optional(xL),status:p.Optional(p.String()),resource_size:p.Optional(DD),save_progress:p.Optional(p.Boolean()),skip_transform_validation:p.Optional(p.Boolean()),use_latest_snapshot:p.Optional(p.Boolean()),restart:p.Optional(p.Boolean()),update_only:p.Optional(p.Boolean()),use_dedicated_ip:p.Optional(p.Boolean())})]),xQe=fd.Compile(L1),rge=p.Composite([p.Omit(L1,["definition"]),p.Object({apiVersion:p.Literal(3)}),tge]),EQe=fd.Compile(rge),u2r=p.Object({name:p.String()},{additionalProperties:!1});var AQe=p.Object({name:p.String()},{additionalProperties:!1}),DQe={params:AQe,response:{204:{}}};var kQe=p.Object({name:p.String()}),PQe={body:kQe,response:{204:{}}};var b2r=p.Object({version:p.Optional(p.String())}),IQe=p.Object(Od(po({},PD.properties),{snapshot_location:p.Optional(p.String())})),RQe=p.Object({streamId:p.String()}),OQe=p.Object({userEmail:p.String(),fromSnapshotLocation:p.Optional(p.String())}),FQe={params:RQe,body:OQe,response:{204:{}}},TQe=p.Object({streamId:p.String()}),NQe=p.Object({userEmail:p.String(),takeSnapshot:p.Optional(p.Boolean()),fromSnapshotLocation:p.Optional(p.String()),configOverrides:p.Optional(pL)}),qQe={params:TQe,body:NQe,response:{204:{}}},S2r=p.Object({requestId:p.String()}),v2r=p.Object({snapshotTriggerAt:p.Number()}),BQe={response:{200:p.Object({stateless:p.Boolean()})}},_2r=p.Object({isDryrun:p.Optional(p.Boolean()),logFullReport:p.Optional(p.Boolean()),onlyProcessStreamIds:p.Optional(p.Array(p.String()))});var LQe={response:{200:p.Array(XS)}};var nge=p.Object({name:p.String(),version:p.Optional(p.Union([p.Integer(),p.String()]))},{additionalProperties:!1}),ige=p.Object({key:p.String(),value:p.Number()}),S7=p.Object({message:p.String(),definitionId:p.Optional(p.String()),source:p.Optional(N1),transform:p.Optional(zx),sink:p.Optional(Gx)}),jQe=p.Object({status:p.String(),errors:p.Array(S7)},{additionalProperties:!1}),sge=p.Object({status:p.String(),errors:p.Array(S7),jobStats:p.Optional(p.Array(ige))},{additionalProperties:!1}),MQe=p.Object({name:p.String(),version:p.Integer(),runtimeDetails:sge},{additionalProperties:!1}),$Qe=p.Object({namesAndVersions:p.Array(nge)},{additionalProperties:!1}),oge=p.Object({name:p.String(),version:p.String()}),age=p.Object({lagMs:p.Number(),latestBlockNumber:p.Number(),latestBlockTime:p.Number(),sourceReferenceName:p.String(),measuredAt:p.Number(),estimatedCompletionTime:p.Optional(p.Number())}),cge=p.Object({lags:p.Array(age)}),UQe={response:{200:cge},params:oge};var zQe=["error","warn","info","debug"],GQe=p.Object({name:p.String(),version:p.String()}),VQe=p.Object({cursor:p.Optional(p.Number()),after:p.Optional(p.Number()),direction:p.Optional(p.Union([p.Literal("asc"),p.Literal("desc")])),log_levels:p.Optional(p.String())}),XQe={params:GQe,querystring:VQe};var WQe=p.Record(p.String(),p.Object({x:p.Integer(),y:p.Integer()})),EL=p.Object({id:p.String(),name:p.String(),definition_v3:p.Partial(kD),positions:WQe,stream_id:p.Optional(p.String()),stream_version:p.Optional(p.Integer()),project_id:p.String(),updated_by_user_id:p.Optional(p.String()),created_at:p.Number(),updated_at:p.Number()},{additionalProperties:!1}),AL=p.Omit(EL,["updated_by_user_id"]);var HQe=p.Object({results:p.Array(AL)}),KQe={response:{200:HQe}},L2r=p.Object({id:p.String()},{additionalProperties:!1}),ZQe={response:{200:AL}},YQe=p.Composite([p.Omit(EL,["id","project_id","updated_by_user_id","created_at","updated_at"]),p.Object({id:p.Optional(p.String())})]),j2r=p.Object({name:p.String()},{additionalProperties:!1}),M2r=p.Object({id:p.String()},{additionalProperties:!1}),JQe=p.Object({id:p.String()},{additionalProperties:!1}),QQe={params:JQe,response:{204:{}}};var lge=p.Object({pipelineConfig:p.Partial(kD),sql:p.String()}),eet=p.Object({referenceNames:p.Array(p.String())}),tet={body:lge,response:{200:eet}};var ret=p.Recursive(e=>p.Union([p.String(),p.Number(),p.Boolean(),p.Null(),p.Record(p.String(),e),p.Array(e)])),net=p.Object({kind:p.Union([p.Literal("INSERT"),p.Literal("DELETE"),p.Literal("UPDATE_BEFORE"),p.Literal("UPDATE_AFTER")]),fields:p.Array(ret)}),uge=p.Object({referenceName:p.String(),status:p.Union([p.Literal("SUCCEEDED"),p.Literal("FAILED")]),error:p.Optional(p.String()),columns:p.Array(p.Object({name:p.String(),type:p.String(),nullable:p.Boolean()})),data:p.Array(net)}),X2r=p.Object({sources:p.Array(uge),transforms:p.Array(uge)});var v7=p.Object({name:p.String(),description:p.Optional(p.String()),version:p.Integer(),apiVersion:p.Integer({default:3,minimum:3,maximum:3}),sources:p.Record(p.String(),Vx,{minProperties:1}),transforms:p.Record(p.String(),Xx),sinks:p.Record(p.String(),Wx),status:dL,project_id:p.String(),created_at:p.Number(),updated_at:p.Number(),resource_size:p.String(DD),support_tier:p.Optional(p.Integer()),updated_by_user_id:p.Optional(p.String()),is_deleted:p.Optional(p.Boolean())},{additionalProperties:!1});var iet=fd.Compile(p.Array(XS)),set=fd.Compile(p.Array(v7)),oet=fd.Compile(XS),aet=fd.Compile(L1),cet=fd.Compile(xL),uet={[Hb.File]:fd.Compile(AD),[Hb.Kafka]:fd.Compile(Pw),[Hb.SubgraphEntity]:fd.Compile(ED),[Hb.Dataset]:fd.Compile(xD)},det={[mS.SQL]:fd.Compile(DB),[mS.HANDLER]:fd.Compile(kB)},pet={[Uf.File]:fd.Compile(qB),[Uf.Kafka]:fd.Compile(TB),[Uf.Mysql]:fd.Compile(IB),[Uf.Postgres]:fd.Compile(RB),[Uf.ElasticSearch]:fd.Compile(OB),[Uf.OpenSearch]:fd.Compile(FB),[Uf.TimescaleHypertable]:fd.Compile(NB),[Uf.Rockset]:fd.Compile(BB),[Uf.ClickHouse]:fd.Compile(LB),[Uf.GoldskyClickHouse]:fd.Compile(jB),[Uf.Sqs]:fd.Compile(MB),[Uf.Print]:fd.Compile($B),[Uf.Blackhole]:fd.Compile(UB),[Uf.Webhook]:fd.Compile(zB)},met={[VS.File]:fd.Compile(WB),[VS.Kafka]:fd.Compile(XB),[VS.SubgraphEntity]:fd.Compile(VB),[VS.Dataset]:fd.Compile(GB)},fet={[mS.SQL]:fd.Compile(HB),[mS.HANDLER]:fd.Compile(KB)},het={[Qf.File]:fd.Compile(rL),[Qf.Kafka]:fd.Compile(eL),[Qf.Mysql]:fd.Compile(ZB),[Qf.Postgres]:fd.Compile(YB),[Qf.ElasticSearch]:fd.Compile(JB),[Qf.OpenSearch]:fd.Compile(QB),[Qf.TimescaleHypertable]:fd.Compile(tL),[Qf.Rockset]:fd.Compile(nL),[Qf.ClickHouse]:fd.Compile(iL),[Qf.GoldskyClickHouse]:fd.Compile(sL),[Qf.Sqs]:fd.Compile(oL),[Qf.Print]:fd.Compile(aL),[Qf.Blackhole]:fd.Compile(cL),[Qf.Webhook]:fd.Compile(lL)};var pqr=p.Object({status:p.String(),progressPercent:p.Optional(p.Number()),latestCompletedSnapshot:p.Optional(p.Object({startedAt:p.Number()}))});var Lqr=p.Object({groups:p.Array(CD),datasets:p.Array(kw)}),_7=p.Array(p.Object({name:p.String(),value:p.String()})),DL=p.Composite([kw,p.Object({sampleData:p.Array(_7)})]),jqr=p.Object({groups:p.Array(CD),datasets:p.Array(DL)},{additionalProperties:!1});var Mqr=p.Object({datasetType:p.String()}),$qr=p.Object({data:p.Array(DL)});var yet=p.Object({displayName:p.String(),description:p.String(),source:Pw}),mge=p.Object({label:p.String(),value:Dw}),fge=p.Object({name:p.String(),schema:p.Array(Ux)}),bet=p.Composite([fge,p.Object({sampleData:p.Array(_7)})]),hge=p.Object({name:p.String(),version:p.String(),displayName:p.String(),description:p.Optional(p.String()),deploymentId:p.String(),network:p.String(),entities:p.Array(fge),tags:p.Optional(p.Array(p.String()))}),vet=p.Composite([p.Omit(hge,["entities"]),p.Object({entities:p.Array(bet),id:p.String()})]),dge=p.Object({sinkType:p.Enum(Uf),displayName:p.String(),description:p.String()}),pge=p.Object({label:p.String(),options:p.Array(hge)}),_et=p.Object({label:p.String(),options:p.Array(yet),startingOffsets:p.Array(mge)}),gge=p.Object({publicBlockchainDatasets:_et,communitySubgraphs:pge,projectSubgraphs:pge}),wet=p.Omit(kw,["storages"],{additionalProperties:!1}),Cet=p.Object({sources:gge,datasetGroups:p.Array(CD),datasets:p.Object({blockchain:p.Array(wet),cliUxStartAtOptions:p.Array(mge)}),sinks:p.Object({eligibleUserProvidedSinks:p.Array(dge),eligibleGoldskyProvidedSinks:p.Array(dge)})});var Vqr=p.Composite([p.Omit(Cet,["sources"]),p.Object({sources:p.Omit(gge,["projectSubgraphs"])})]);var Xqr=p.Object({referenceName:p.String()}),Wqr=p.Object({data:p.Omit(DL,["storages"])});var Hqr=p.Object({deploymentId:p.String()}),Kqr=p.Object({data:vet});var Eet=p.Object({id:p.String(),name:p.String(),org_id:p.Union([p.String(),p.Null()]),billing_subscription_id:p.Union([p.String(),p.Null()]),billing_customer_id:p.Union([p.String(),p.Null()]),created_at:p.Number()}),Aet=p.Object(Od(po({},Eet.properties),{capabilities:p.Partial(jhe)})),Jqr=p.Object({data:Aet});var j1=p.Object({projectId:p.String(),name:p.String(),createdAt:p.Number(),currentlyAuthenticated:p.Boolean()}),tBr=p.Object({data:p.Array(j1)});var sBr=p.Object({data:j1}),oBr=p.Object({name:p.String()});var lBr=p.Object({data:p.Boolean()}),uBr=p.Object({projectId:p.String()});var Cge=Kl(E7()),BD=p.Enum(Cge.Role);var ELr=p.Object({data:p.Array(p.Object({email:p.String(),id:p.String(),firstName:p.Optional(p.String()),lastName:p.Optional(p.String()),role:BD,pending:p.Boolean()}))});var Get=p.Object({name:p.String(),subgraphs:p.Object({activeCount:p.Number(),pausedCount:p.Number()}),pipelines:p.Object({activeCount:p.Number(),pausedCount:p.Number(),inactiveCount:p.Number()})}),kLr=p.Object({data:Get});var RLr=p.Object({data:p.Boolean()}),OLr=p.Object({email:p.String()});var qLr=p.Object({data:j1}),BLr=p.Object({name:p.Optional(p.String())}),LLr=p.Object({projectId:p.String()});var ULr=p.Object({data:p.Boolean()}),zLr=p.Object({email:p.String(),role:BD});var njr=p.Object({data:p.Boolean()}),ijr=p.Object({emails:p.Array(p.String()),role:p.Optional(BD)});var D7={Subgraph:"Subgraph",Stream:"Stream"},A7={CustomSubgraph:"CustomSubgraph",CommunitySubgraph:"CommunitySubgraph"},k7={SubgraphApi:"SubgraphApi",Webhook:"Webhook"},PL=p.Object({id:p.String(),type:p.Literal(D7.Subgraph),project_id:p.String(),name:p.String(),version:p.Optional(p.String()),description:p.Optional(p.String()),created_at:p.Number(),updated_at:p.Number()}),xge=p.Object({type:p.Union([p.Literal(A7.CustomSubgraph),p.Literal(A7.CommunitySubgraph)]),id:p.String(),name:p.String(),referenceName:p.String(),version:p.String(),created_at:p.Number(),indexing_status:p.Object({fatal_error:p.Optional(p.String()),synced:p.Boolean(),entity_count:p.String(),chains:p.Array(p.Object({head_block:p.String(),earliest_block:p.String(),latest_block:p.String(),network:p.String(),progress_percent:p.String()}))}),status:p.Enum({Active:"Active",Paused:"Paused"})}),ajr=p.Union([xge]),Wet=p.Object({type:p.Literal(k7.SubgraphApi),id:p.String(),name:p.String(),referenceName:p.String(),url:p.String(),subgraphDeploymentId:p.String()}),Het=p.Object({type:p.Literal(k7.Webhook),id:p.String(),name:p.String(),referenceName:p.String(),entity:p.String(),url:p.String()}),Ket=p.Union([Wet,Het]),IL=p.Composite([PL,p.Object({definition:p.Object({sources:p.Array(xge),sinks:p.Array(Ket)})})]),RL=p.Composite([p.Omit(XS,["status"]),p.Object({type:p.Literal(D7.Stream)})]),Ege=p.Object({status:p.Optional(p.String()),errors:p.Array(p.Object({message:p.String(),referenceName:p.Optional(p.String())}))});var Zet=p.Union([IL,RL]),djr=p.Object({data:p.Array(Zet)});var hjr=p.Composite([p.Omit(PL,["id","created_at","updated_at","project_id"]),p.Object({subgraph_deployment_id:p.String()})]),gjr=p.Composite([PL,p.Object({subgraph_deployment_id:p.String()})]);var vjr=p.Object({data:IL}),_jr=p.Object({name:p.String()});var wjr=p.Object({data:RL}),Cjr=p.Object({name:p.String()});var xjr=p.Object({version:p.Optional(p.String())}),Ejr=p.Object({data:Ege});var kjr=p.Object({name:p.String()},{additionalProperties:!1});var qjr=p.Object({token:p.String(),email:p.Optional(p.String())});var Bjr=p.Object({bot:p.Boolean()});var kd={};eu(kd,{AnySecretValueTypebox:()=>p_,AnySecretValueValidator:()=>Qet,ClickHouseSecretTypebox:()=>Nge,CreateSecretBody:()=>P7,CreateSecretSchema:()=>Lge,DeleteSecretParams:()=>I7,DeleteSecretSchema:()=>jge,ElasticSearchSecretTypebox:()=>Ige,HttpAuthSecretTypebox:()=>Bge,InternalCreateSecretBody:()=>R7,InternalCreateSecretSchema:()=>$ge,InternalGetSecretSchema:()=>Mge,JdbcProtocols:()=>Age,JdbcSecretTypebox:()=>Dge,KafkaSecretTypebox:()=>Tge,ListSecretsSchema:()=>Uge,OpenSearchSecretTypebox:()=>Rge,RevealSecretSchema:()=>zge,RocksetSecretTypebox:()=>kge,S3SecretTypebox:()=>Pge,SaslMechanisms:()=>Fge,SecretTypebox:()=>Iw,SecretTypes:()=>hS,SecretWithoutValueTypebox:()=>m_,SecurityProtocols:()=>Oge,SqsSecretTypebox:()=>qge,UpdateSecretBody:()=>O7,UpdateSecretSchema:()=>Gge});var hS={jdbc:"jdbc",kafka:"kafka",rockset:"rockset",elasticSearch:"elasticSearch",opensearch:"opensearch",s3:"s3",clickHouse:"clickHouse",sqs:"sqs",httpauth:"httpauth"},Age={mysql:"mysql",postgres:"postgres",postgresql:"postgresql"},Dge=p.Object({type:p.Literal(hS.jdbc),protocol:p.Enum(Age),host:p.String(),port:p.Optional(p.Integer()),databaseName:p.String(),user:p.String(),password:p.String(),ssl:p.Optional(p.Boolean())}),kge=p.Object({type:p.Literal(hS.rockset),apiKey:p.String(),endpoint:p.String()}),Pge=p.Object({type:p.Literal(hS.s3),accessKeyId:p.String(),secretAccessKey:p.String(),region:p.String()}),Ige=p.Object({type:p.Literal(hS.elasticSearch),host:p.String(),username:p.String(),password:p.String()}),Rge=p.Object({type:p.Literal(hS.opensearch),host:p.String(),username:p.String(),password:p.String()}),Oge={PLAINTEXT:"PLAINTEXT",SASL_SSL:"SASL_SSL",SASL_PLAINTEXT:"SASL_PLAINTEXT"},Fge={PLAIN:"PLAIN",SCRAM_SHA_256:"SCRAM-SHA-256",SCRAM_SHA_512:"SCRAM-SHA-512"},Tge=p.Object({type:p.Literal(hS.kafka),bootstrapServers:p.String(),securityProtocol:p.Enum(Oge),saslMechanism:p.Optional(p.Enum(Fge)),saslJaasUsername:p.Optional(p.String()),saslJaasPassword:p.Optional(p.String()),schemaRegistryUrl:p.Optional(p.String()),schemaRegistryUsername:p.Optional(p.String()),schemaRegistryPassword:p.Optional(p.String()),schemaRegistryKeyPassword:p.Optional(p.String()),schemaRegistryKeystore:p.Optional(p.String())}),Nge=p.Object({type:p.Literal(hS.clickHouse),url:p.String(),username:p.String(),password:p.String(),databaseName:p.String()}),qge=p.Object({type:p.Literal(hS.sqs),accessKey:p.String(),secretAccessKey:p.String(),region:p.String()}),Bge=p.Object({type:p.Literal(hS.httpauth),secretKey:p.String(),secretValue:p.String()}),p_=p.Union([Dge,Tge,kge,Ige,Rge,Pge,Nge,qge,Bge]),Qet=fd.Compile(p_),Iw=p.Object({id:p.String(),name:p.String(),type:p.Enum(hS),variant:p.Optional(p.String()),value:p_,description:p.Optional(p.String()),created_at:p.Number()}),m_=p.Omit(Iw,["value"]);var zjr=p.Object({data:m_}),P7=p.Object({name:p.String(),value:p_,description:p.Optional(p.String())}),Lge={body:P7};var Xjr=p.Object({success:p.Boolean(),referencedStreams:p.Optional(p.Array(p.Object({streamName:p.String(),version:p.Number()})))}),I7=p.Object({secretName:p.String()}),jge={params:I7};var Zjr=p.Object({data:Iw}),Yjr=p.Object({projectId:p.String(),secretName:p.String()}),Mge={};var tMr=p.Object({data:m_}),R7=p.Object({projectId:p.String(),name:p.String(),value:p_,description:p.Optional(p.String()),dopplerEnv:p.Optional(p.String())}),$ge={body:R7};var sMr=p.Object({data:p.Array(m_)}),oMr=p.Object({data:p.Array(Iw)}),Uge={};var uMr=p.Object({data:Iw}),dMr=p.Object({secretName:p.String()}),zge={};var hMr=p.Object({data:m_}),O7=p.Object({value:p.Optional(p_),description:p.Optional(p.String())}),ett=p.Object({secretName:p.String()}),Gge={body:O7,params:ett};var ttt=p.Object({ipfs_hash:p.String(),db_name:p.String(),synced:p.Boolean(),failed:p.Boolean()}),AMr=p.Object({subgraphs:p.Array(ttt)}),DMr=p.Object({success:p.Boolean()});var RMr=p.Object({data:p.Array(p.Object({chain:p.String(),shard:p.String(),database:p.String(),schema:p.String(),table:p.String(),partitions:p.Number(),subgraph_ipfs_hash:p.String()}))});var itt=p.Object({id:p.String(),name:p.String(),channel:p.String(),enabled:p.Boolean(),group:p.String(),description:p.String()}),FMr=p.Object({preferences:p.Array(itt)});var TMr=p.Object({id:p.String()}),NMr=p.Object({enabled:p.Boolean()});var ott=p.Object({event_type:p.String(),name:p.String(),group:p.String(),description:p.String()}),BMr=p.Object({data:ott});var LMr=p.Object({event_type:p.String(),enabled:p.Boolean(),email_pattern:p.String(),channel:p.String()}),jMr=p.Object({data:p.Array(p.Object({email:p.String()}))});var $Mr=p.Object({project_id:p.String()}),UMr=p.Object({success:p.Boolean()});var zMr=p.Object({project_id:p.String()}),GMr=p.Object({success:p.Boolean()});var XMr=p.Object({subgraphs:p.Integer(),pipelines:p.Integer()});var ltt=p.Object({anonymousId:p.String(),sessionId:p.String()}),utt=p.Object({systemPlatform:p.String(),systemRelease:p.String(),systemArchitecture:p.String(),cpuCount:p.Number(),cpuModel:p.Union([p.String(),p.Null()]),cpuSpeed:p.Union([p.Number(),p.Null()]),memoryInMb:p.Number(),isCI:p.Boolean(),cliVersion:p.String()}),dtt=p.Object({name:p.String(),properties:p.Any()}),HMr=p.Object({context:ltt,environment:utt,events:p.Array(dtt)}),KMr=p.Object({success:p.Boolean()});var mtt=jI?80:3080,OL=jI?"https://api.goldsky.com":`http://127.0.0.1:${mtt}`;var $Z={};eu($Z,{builder:()=>jdt,command:()=>Bdt,describe:()=>Ldt,handler:()=>Mdt});var Ky=Kl(N7(),1),LD=require("node:process"),Rw=Kl(require("node:readline"),1),M7=Kl(require("node:readline"),1),tye=require("node:tty"),Qx=Kl(B7(),1);function vtt({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 rye(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(vtt(),"")}var $7={},_tt={get exports(){return $7},set exports(e){$7=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],m=t.length(u);if(a>=i-(m==2?1:0))if(a+m<=s)o+=u;else break;a+=m}return o}})(_tt);var wtt=$7,Ctt=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 M1(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=rye(e),e.length===0))return 0;e=e.replace(Ctt()," ");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(wtt.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}var L7=10,Hge=(e=0)=>t=>`\x1B[${t+e}m`,Kge=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Zge=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,Vh={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(Vh.modifier);var xtt=Object.keys(Vh.color),Ett=Object.keys(Vh.bgColor);[...xtt,...Ett];function Att(){let e=new Map;for(let[t,r]of Object.entries(Vh)){for(let[n,i]of Object.entries(r))Vh[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=Vh[n],e.set(i[0],i[1]);Object.defineProperty(Vh,t,{value:r,enumerable:!1})}return Object.defineProperty(Vh,"codes",{value:e,enumerable:!1}),Vh.color.close="\x1B[39m",Vh.bgColor.close="\x1B[49m",Vh.color.ansi=Hge(),Vh.color.ansi256=Kge(),Vh.color.ansi16m=Zge(),Vh.bgColor.ansi=Hge(L7),Vh.bgColor.ansi256=Kge(L7),Vh.bgColor.ansi16m=Zge(L7),Object.defineProperties(Vh,{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=>Vh.rgbToAnsi256(...Vh.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)=>Vh.ansi256ToAnsi(Vh.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>Vh.ansi256ToAnsi(Vh.hexToAnsi256(t)),enumerable:!1}}),Vh}var Dtt=Att(),ML=new Set(["\x1B","\x9B"]),ktt=39,U7="\x07",nye="[",Ptt="]",iye="m",z7=`${Ptt}8;;`,Yge=e=>`${ML.values().next().value}${nye}${e}${iye}`,Jge=e=>`${ML.values().next().value}${z7}${e}${U7}`,Itt=e=>e.split(" ").map(t=>M1(t)),j7=(e,t,r)=>{let n=[...t],i=!1,s=!1,o=M1(rye(e[e.length-1]));for(let[a,c]of n.entries()){let l=M1(c);if(o+l<=r?e[e.length-1]+=c:(e.push(c),o=0),ML.has(c)&&(i=!0,s=n.slice(a+1).join("").startsWith(z7)),i){s?c===U7&&(i=!1,s=!1):c===iye&&(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())},Rtt=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(M1(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Ott=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",i,s,o=Itt(e),a=[""];for(let[l,u]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let m=M1(a[a.length-1]);if(l!==0&&(m>=t&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),m=0),(m>0||r.trim===!1)&&(a[a.length-1]+=" ",m++)),r.hard&&o[l]>t){let f=t-m,y=1+Math.floor((o[l]-f-1)/t);Math.floor((o[l]-1)/t)<y&&a.push(""),j7(a,u,t);continue}if(m+o[l]>t&&m>0&&o[l]>0){if(r.wordWrap===!1&&m<t){j7(a,u,t);continue}a.push("")}if(m+o[l]>t&&r.wordWrap===!1){j7(a,u,t);continue}a[a.length-1]+=u}r.trim!==!1&&(a=a.map(l=>Rtt(l)));let c=[...a.join(`
427
427
  `)];for(let[l,u]of c.entries()){if(n+=u,ML.has(u)){let{groups:f}=new RegExp(`(?:\\${nye}(?<code>\\d+)m|\\${z7}(?<uri>.*)${U7})`).exec(c.slice(l).join(""))||{groups:{}};if(f.code!==void 0){let y=Number.parseFloat(f.code);i=y===ktt?void 0:y}else f.uri!==void 0&&(s=f.uri.length===0?void 0:f.uri)}let m=Dtt.codes.get(Number(i));c[l+1]===`
428
428
  `?(s&&(n+=Jge("")),i&&m&&(n+=Yge(m))):u===`
429
429
  `&&(i&&m&&(n+=Yge(i)),s&&(n+=Jge(s)))}return n};function Qge(e,t,r){return String(e).normalize().replace(/\r\n/g,`
@@ -568,9 +568,9 @@ Status`));let i=[];e.map(s=>{var c;let o=(c=BZ(s,t))==null?void 0:c.runtimeDetai
568
568
  `)})}function qZ(e,t,r="all"){return e.map(n=>{let i=zwe(n,t),s;switch(r){case"all":{s=JSON.stringify(i);break}case"summary":{s=JSON.stringify(kdt(i,["id","name","resource_size","version","status"]));break}case"usableWithApplyCmd":default:{s=JSON.stringify(Ddt(i,["created_at","is_deleted","project_id","runtime_details","updated_at","updated_by_user_id"]));break}}return jM.default.stringify(JSON.parse(s),{indent:2})})}function Edt(e,t,r="all"){qZ(e,t,r).forEach(n=>console.log(n))}function Uwe(e,t){e.forEach(r=>{let n=Gwe(r);console.log(t==="json"?JSON.stringify(n,void 0,2):jM.default.stringify(n,{indent:2})),console.log(`
569
569
  `)})}function zwe(e,t){let r=BZ(e,t),n=e;return r&&(n=Od(po({},e),{runtime_details:r.runtimeDetails})),n}function BZ(e,t){return t.find(r=>r.name===e.name&&r.version===e.version)}function Adt(e,t){var r;if(e==="")return t;if(e==="runtime_details")return(r=this[e])==null?void 0:r.status;if(["id","name","version","status","resource_size"].includes(e))return t}function Ddt(e,t){let r=po({},e);for(let n of t)delete r[n];return r}function kdt(e,t){let r={};for(let n of t)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function Gwe(e){return"sources"in e&&"transforms"in e&&"sinks"in e?po(po(po({},e.sources),e.transforms),e.sinks):e.definition}var jZ={};eu(jZ,{builder:()=>Rdt,command:()=>Pdt,describe:()=>Idt,handler:()=>Odt,postRequestReceivedMessaging:()=>mk});var LZ=Kl($f()),Pdt="apply <config-path>",Idt="Apply the provided pipeline yaml config. This command creates the pipeline if it doesn't exist or updates the existing pipeline. This command is idempotent.",Rdt=e=>e.positional("config-path",{describe:"path to the yaml pipeline config file.",type:"string",demandOption:!0}).option("save-progress",{describe:"Take a snapshot of the pipeline before applying the update. Only applies if the pipeline already has status: ACTIVE. Defaults to saving progress unless pipeline is being updated to status=INACTIVE.",type:"boolean",demandOption:!1}).option("skip-validation",{describe:"skips the validation of the transforms when updating the pipeline. Defaults to false",type:"boolean",demandOption:!1}).option("use-latest-snapshot",{describe:"attempts to use the latest available snapshot.",type:"boolean",demandOption:!1}),Odt=async e=>{let t=Rj(e.configPath);e.saveProgress!=null&&(t.save_progress=e.saveProgress),e.useLatestSnapshot!=null&&(t.use_latest_snapshot=e.useLatestSnapshot),e.skipTransformValidation!=null&&(t.skip_transform_validation=e.useLatestSnapshot);let r=cd();r.start("Applying pipeline config");let[n,i,s]=await wb(t),o=t.name;if(n)throw ls(r,n.message);if(s&&s.statusCode===202)mk(o,r);else if(i)ls(r,`Successfully applied config to pipeline: ${o}`),i.status!=="INACTIVE"&&console.log(`
570
570
  ${["To monitor the status of your pipeline:","",`Using the CLI: \`goldsky pipeline monitor ${i.name}\``,`Using the dashboard: https://app.goldsky.com/dashboard/pipelines/stream/${i.name}/${i.version}`].join(`
571
- `)}`);else throw ls(r,"Failed to apply pipeline config, please try again")};function mk(e,t){let r=`${LZ.default.bold(`goldsky pipeline monitor ${e} --update-request`)}`,n=`${LZ.default.bold(`goldsky pipeline cancel-update ${e}`)}`;ls(t,"Update request received. It may take some time to complete."),f_(`Please run ${r} to track progress.`),f_(`Or, ${n} to cancel the request.`)}var Fdt=e=>[...e.keys()].find(t=>t.startsWith("public_dataset_")&&t.includes("_logs")),Tdt=e=>[...e.keys()].find(t=>t.startsWith("public_dataset_")&&t.includes("decoded_traces"));function MM(e){let t;return e.definition?t=aR(e.definition):t=Ij(e.definitionPath),{name:e.name,description:e.description,resource_size:e.resourceSize,status:e.status,skip_transform_validation:e.skipTransformValidation,dedicated_ips:e.dedicatedEgressIp,definition:t}}async function $M(e){console.log(""),vg("With Goldsky pipelines, you sync data to your own infrastructure to power your APIs and for data analytics.");let t=await N0e(),r=await Mve(t),n=[];if(Fdt(r)){let a=Array.from(r.entries()).filter(([l])=>l.includes("_logs")).map(([l,u])=>u),c=await Uve(a);n.push(...c)}Tdt(r)&&n.push(...zve([...r.values()]));let i=await y_e(t,[...r.values()],n,e.experimental),s={sources:[...r.values()],transforms:n,sinks:i};return{name:e.name,description:e.description,resource_size:e.resourceSize,status:e.status,skip_transform_validation:e.skipTransformValidation,dedicated_ips:e.dedicatedEgressIp,definition:s}}async function UM(e,t,r){let n=cd();n.start("Creating pipeline");let[i,s,o]=await wb(e);if(i)throw ls(n,i.message);if(s)o&&o.statusCode===202?mk(e.name,n):(ls(n,`Created pipeline: ${s.name}`),r&&!t&&Gw([s],[],r),s.status!=="INACTIVE"&&console.log(`
571
+ `)}`);else throw ls(r,"Failed to apply pipeline config, please try again")};function mk(e,t){let r=`${LZ.default.bold(`goldsky pipeline monitor ${e} --update-request`)}`,n=`${LZ.default.bold(`goldsky pipeline cancel-update ${e}`)}`;ls(t,"Update request received. It may take some time to complete."),f_(`Please run ${r} to track progress.`),f_(`Or, ${n} to cancel the request.`)}var Fdt=e=>[...e.keys()].find(t=>t.startsWith("public_dataset_")&&t.includes("_logs")),Tdt=e=>[...e.keys()].find(t=>t.startsWith("public_dataset_")&&t.includes("decoded_traces"));function MM(e){let t;return e.definition?t=aR(e.definition):t=Ij(e.definitionPath),{name:e.name,description:e.description,resource_size:e.resourceSize,status:e.status,skip_transform_validation:e.skipTransformValidation,use_dedicated_ip:e.useDedicatedIp,definition:t}}async function $M(e){console.log(""),vg("With Goldsky pipelines, you sync data to your own infrastructure to power your APIs and for data analytics.");let t=await N0e(),r=await Mve(t),n=[];if(Fdt(r)){let a=Array.from(r.entries()).filter(([l])=>l.includes("_logs")).map(([l,u])=>u),c=await Uve(a);n.push(...c)}Tdt(r)&&n.push(...zve([...r.values()]));let i=await y_e(t,[...r.values()],n,e.experimental),s={sources:[...r.values()],transforms:n,sinks:i};return{name:e.name,description:e.description,resource_size:e.resourceSize,status:e.status,skip_transform_validation:e.skipTransformValidation,use_dedicated_ip:e.useDedicatedIp,definition:s}}async function UM(e,t,r){let n=cd();n.start("Creating pipeline");let[i,s,o]=await wb(e);if(i)throw ls(n,i.message);if(s)o&&o.statusCode===202?mk(e.name,n):(ls(n,`Created pipeline: ${s.name}`),r&&!t&&Gw([s],[],r),s.status!=="INACTIVE"&&console.log(`
572
572
  ${["To monitor the status of your pipeline:","",`Using the CLI: \`goldsky pipeline monitor ${s.name}\``,`Using the dashboard: https://app.goldsky.com/dashboard/pipelines/stream/${s.name}/${s.version}`].join(`
573
- `)}`));else throw ls(n,"Failed to create pipeline, please try again")}async function zM(e){switch(await dh({message:"What would you like to do?",options:[{value:"direct_indexing",label:"Sync your data with Mirror",hint:"Mirror unrolls data for custom integrations and sends a live stream to your database or warehouse"},{value:"deploy_subgraph",label:"Deploy a subgraph",hint:"Use this if you have your own subgraph"},{value:"see_usage",label:"See all commands",hint:"Displays all available `goldsky` commands"}]})){case"direct_indexing":{let r=await Mo({message:"What's the name of your pipeline?"}),n=await $M({name:r,apiHost:e,resourceSize:"s",status:"ACTIVE",dedicatedEgressIp:!1});await UM(n,!0);break}case"deploy_subgraph":YS(`Please use \`goldsky subgraph deploy --help\` to see available subgraph commands or visit ${C0e} for further instructions.`);break;case"see_usage":throw YS("Below is a list of top-level CLI commands. Run `goldsky <cmd> --help` for details on individual commands."),new Error("showHelp")}}async function Vwe({apiHost:e}){let t=cd();t.start("Fetching project overview...");let[r,n]=await io.get("/api/admin/project/v1/overview");if(r)throw ls(t,"Could not fetch project overview"),gf(vh(r));ls(t,"Fetched project overview"),Ff(`You are currently logged in to project "${n.data.name}".
573
+ `)}`));else throw ls(n,"Failed to create pipeline, please try again")}async function zM(e){switch(await dh({message:"What would you like to do?",options:[{value:"direct_indexing",label:"Sync your data with Mirror",hint:"Mirror unrolls data for custom integrations and sends a live stream to your database or warehouse"},{value:"deploy_subgraph",label:"Deploy a subgraph",hint:"Use this if you have your own subgraph"},{value:"see_usage",label:"See all commands",hint:"Displays all available `goldsky` commands"}]})){case"direct_indexing":{let r=await Mo({message:"What's the name of your pipeline?"}),n=await $M({name:r,apiHost:e,resourceSize:"s",status:"ACTIVE",useDedicatedIp:!1});await UM(n,!0);break}case"deploy_subgraph":YS(`Please use \`goldsky subgraph deploy --help\` to see available subgraph commands or visit ${C0e} for further instructions.`);break;case"see_usage":throw YS("Below is a list of top-level CLI commands. Run `goldsky <cmd> --help` for details on individual commands."),new Error("showHelp")}}async function Vwe({apiHost:e}){let t=cd();t.start("Fetching project overview...");let[r,n]=await io.get("/api/admin/project/v1/overview");if(r)throw ls(t,"Could not fetch project overview"),gf(vh(r));ls(t,"Fetched project overview"),Ff(`You are currently logged in to project "${n.data.name}".
574
574
 
575
575
  ${MZ.default.bold("Subgraphs")}
576
576
  Active: ${n.data.subgraphs.activeCount}
@@ -582,7 +582,7 @@ Paused: ${n.data.pipelines.pausedCount}
582
582
  Inactive: ${n.data.pipelines.inactiveCount}`,"Project overview"),await zM(e)}var Xwe=require("node:child_process"),Wwe=Kl(aZ());async function Hwe({apiHost:e}){await dh({message:"Do you already have a Goldsky account?",options:[{value:!1,label:"No",hint:"Let's create a new account"},{value:!0,label:"Yes",hint:"Let's log in"}]})?await qj({apiHost:e}):await Ndt({apiHost:e}),Ff("Now that you are logged in, here are a few things you can do next.","Authentication successful"),await zM(e)}async function Ndt({apiHost:e}){let t=`cliaccountcreation_${(0,Wwe.default)()}`,n=`${e.includes("localhost")||e.includes("127.0.0.1")?"http://127.0.0.1:3005":e.includes("internal.goldsky.com")?"https://dev.goldsky.com":"https://app.goldsky.com"}/signup?account_creation_id=${t}`;Ff(`Please visit ${n} to create a new account.`,"Account creation");try{(0,Xwe.spawn)("open",[n])}catch(s){}let i=cd();i.start("Please complete the account creation at the link displayed above...");try{let s=await qdt(t);if(!s)throw ls(i,"Account creation timed out. Please run `goldsky` to try again.");ls(i,"Account created"),await Nj(s),gE(s)}catch(s){let o=s;throw(o==null?void 0:o.status)===409?ls(i,"It looks like you already have a Goldsky account. Please visit https://app.goldsky.com/dashboard/settings to create a new API key. You can then use the `goldsky login` CLI command to log in."):(ls(i,"Account creation failed"),gf(vh(s)))}}async function qdt(e){let t=0,r=5,n=5;for(;t<n*60;){let i=await T0e(e);if(i.apiToken)return i.apiToken;if(i.status!==204)throw i;await new Promise(s=>setTimeout(s,r*1e3)),t+=r}}var Bdt="$0",Ldt="Get started with Goldsky",jdt=e=>e,Mdt=async({apiHost:e})=>{let t=O0e();console.log(""),vg("Crypto Data Live-Streamed"),Ff("Goldsky powers hundreds of crypto businesses building rich, instant, data-driven experiences.","Welcome to the Goldsky CLI"),await t?await Vwe({apiHost:e}):await Hwe({apiHost:e})};var pie={};eu(pie,{builder:()=>UZt,command:()=>MZt,describe:()=>$Zt,handler:()=>zZt});var uie={};eu(uie,{builder:()=>TZt,command:()=>OZt,describe:()=>FZt,handler:()=>NZt});var oie={};eu(oie,{builder:()=>bZt,command:()=>gZt,describe:()=>yZt,handler:()=>SZt});var xje=require("fs");var ZZ=Kl(_Ce());var wCe={barCompleteChar:"\u25A0",barIncompleteChar:" ",format:"{bar} {percentage}% | {value}/{total}"},fk=e=>new ZZ.default.SingleBar(po(po({},wCe),e||{})),CCe=()=>new ZZ.default.MultiBar(Od(po({},wCe),{hideCursor:!0,clearOnComplete:!0,stopOnComplete:!0,emptyOnZero:!0,forceRedraw:!0}));var xCe=require("child_process");var Vw=()=>{let e=cd();e.start("Checking prerequisites");try{(0,xCe.execSync)("duckdb --version",{stdio:"ignore"})}catch(t){throw ls(e,"Please install DuckDB. This helps us efficiently process indexed.xyz data. Instructions can be found at https://duckdb.org/docs/installation")}ls(e,"Checked prerequisites")};var Sje=Kl(require("crypto")),SP=require("fs"),MV=Kl(require("path")),vje=Kl(xS());var $V=Kl(yje());var cZt=()=>{var e,t;return new vje.S3Client({credentials:{accessKeyId:(e=process.env.INDEXED_ACCESS_KEY_ID)!=null?e:"27fa1255881f94d1c05b56ba1d47e1fb",secretAccessKey:(t=process.env.INDEXED_SECRET_ACCESS_KEY)!=null?t:"53f7c1e9edbd9f34d82819c8f3707d83a968d813edc4d9d4be127f99b990fc10"},endpoint:"https://ed5d915e0259fcddb2ab1ce5592040c3.r2.cloudflarestorage.com",region:"auto"})},UV=(e,t)=>!e||t==="2.0.0"?"*":Sje.default.createHash("md5").update(e).digest("hex").slice(-2),vP=({version:e})=>{switch(e){case"1.0.0":case"1.2.0":return"indexed-xyz";case"2.0.0":return"indexed-xyz-wnam"}throw new Error(`Unsupported version: ${e}`)},_P=({network:e,datasetType:t,tableName:r,partitionKey:n,version:i})=>{e==="ethereum"&&i==="1.0.0"&&(i="1.2.0");let s=n==="*"?"":`/partition_key=${n}`;return`${e}/${t}/${r}/v${i}${s}`},lZt=e=>{let t=!1;return r=>{t?e.setTotal(r.count.total):(e.start(r.count.total,0),t=!0)}},bje,uZt=(e,t,r)=>n=>{e&&e(n.filePath),t.increment(),t.getProgress()===1&&(t.stop(),r&&!bje&&(bje=ku("Waiting for new data...").start()))},dZt=(e,t,r)=>{let n=new $V.TransferMonitor;return n.on("progress",lZt(t)),n.on("done",uZt(e,t,r)),n},_je=(e,t,r="")=>{(0,SP.readdirSync)(e).forEach(i=>{let s=MV.default.join(e,i),o=(0,SP.statSync)(s);if(o.isDirectory()){let a=MV.default.join(r,i);_je(s,t,a)}else if(o.isFile()){let a=MV.default.join(r,i);t.add(a)}})},CC=e=>{Ff(`1. Open a second terminal in this directory
583
583
  2. Start DuckDB with \`duckdb\`
584
584
  3. Write your DuckDB SQL queries, e.g. \`SELECT COUNT(*) FROM './data/${e}/*.parquet';\``,"Query data (even while syncing)")},wP=async({sourceBucket:e,sourcePath:t,destinationPath:r,processFile:n,relocations:i,syncProgress:s,shouldSyncContinuously:o=!0})=>{let a=cZt(),{sync:c}=new $V.default({client:a});(0,SP.mkdirSync)(r,{recursive:!0});let l=new Set;do _je(r,l),await c(`s3://${e}/${t}`,r,{filters:[{exclude:()=>!0},{include:u=>!l.has(u)}],relocations:i,monitor:dZt(n,s,o)});while(o)};var wje=require("child_process");var zV=async()=>Mo({message:"What is the contract address you are interested in? (leave blank for all logs)"},{required:!1}).then(e=>{var t;return(t=e==null?void 0:e.toLowerCase())!=null?t:""}),GV=(e,t)=>r=>{let n=r.split("/").pop(),i=`./data/${e}/${n}`;if(!t)throw new Error("Contract address is required");try{(0,wje.execSync)(`duckdb -c "COPY (SELECT * FROM '${r}' WHERE lower(address) IN (lower('${t}'))) TO '${i}' (FORMAT 'parquet');"`)}catch(s){}},pZt=e=>{switch(e){case"2.0.0":return["*"]}return Array.from({length:256},(t,r)=>r.toString(16).padStart(2,"0").toLowerCase())},mZt=async(e,t=10)=>{let r=0,n=async()=>{for(;r<e.length;){let s=e[r];r++,s&&(await s(),await n())}},i=e.slice(0,t);await Promise.all(i.map(n))},VV=async({network:e,processedPath:t,tableName:r,version:n})=>{let i=pZt(n),s=CCe(),o=1,a=i.map(c=>async()=>{let l=vP({version:n}),u=_P({datasetType:"raw",network:e,partitionKey:c,tableName:r,version:n}),m=s.create(0,0);await wP({sourceBucket:l,sourcePath:u,destinationPath:"./data",relocations:[f=>{let y=f.split("/").pop();return`${t}/${y}`}],syncProgress:m,shouldSyncContinuously:!1}),s.log(`Processed ${o++} / ${i.length} parts
585
- `),s.remove(m)});await mZt(a),console.log("Sync complete.")},xC=()=>{let e=cd();e.start(),ls(e,'Syncing... data is stored in the "./data" directory. Stop with Ctrl + C.'),console.log("")};function EC(e){return e.toLowerCase()}function AC(e){return e.toLowerCase()}function Cje(e){return e.toLowerCase()}function CP(e){return e.toLowerCase()}function XV(e){return`${e.charAt(0).toUpperCase()}${e.slice(1).toLowerCase()}`}function WV(e){return e.toUpperCase()}var fZt="1.0.0",hZt={ethereum:"1.2.0",zksync:"2.0.0",optimism:"2.0.0"};function DC(e){return hZt[e]||fZt}var gZt="decoded-logs",yZt="Sync decoded logs for a smart contract from a network to this computer",bZt=e=>e.option("contract-address",{describe:"The contract address you are interested in",type:"string",default:""}).option("network",{describe:"The network of indexed.xyz data to synchronize",type:"string",default:"ethereum",coerce:EC}).option("dataVersion",{describe:"The version of indexed.xyz data to synchronize",type:"string",hidden:!0}),SZt=async e=>{try{console.log(""),vg("Sync decoded logs from indexed.xyz to your local computer"),Vw();let t=e.network.toLowerCase(),r=e.dataVersion,n=e.contractAddress.toLowerCase();if(!n&&r!=="2.0.0"&&(n=await zV()),n&&!r&&(r=t==="ethereum"?"1.2.0":"1.0.0"),r||(r=DC(t)),n&&r==="2.0.0"&&!await ny({message:"This dataset is not partitioned for contract address filtering, you will need to download the whole dataset to filter. Do you want to continue?",initialValue:!1})){console.log("Aborting sync.");return}let i=UV(n,r),s=vP({version:r}),o=_P({datasetType:"decoded",network:t,partitionKey:i,tableName:"logs",version:r}),a=`${t}/decoded/logs/${n}`;(0,xje.mkdirSync)(`./data/${a}`,{recursive:!0}),CC(a),xC(),await wP({sourceBucket:s,sourcePath:o,destinationPath:"./data/.tmp",processFile:n?GV(a,n):void 0,syncProgress:fk(),relocations:n?void 0:[c=>{let l=c.split("/").pop();return`${a}/${l}`}]})}catch(t){throw await Fw("Syncing failed.",t),t}};var aie={};eu(aie,{builder:()=>wZt,command:()=>vZt,describe:()=>_Zt,handler:()=>CZt});var Eje=require("fs");var vZt="raw-blocks",_Zt="Sync all blocks from a network",wZt=e=>e.option("network",{describe:"The network of indexed.xyz data to synchronize",type:"string",default:"ethereum",coerce:EC}).option("dataVersion",{describe:"The version of indexed.xyz data to synchronize",type:"string",hidden:!0}),CZt=async e=>{try{console.log(""),vg("Sync raw blocks from indexed.xyz to your local computer"),Vw();let t=e.network.toLowerCase(),r="raw",n="blocks",i=`${t}/${r}/${n}`;(0,Eje.mkdirSync)(`./data/${i}`,{recursive:!0}),CC(i),xC(),await VV({network:t,processedPath:i,tableName:n,version:e.dataVersion||DC(t)})}catch(t){throw await Fw("Syncing failed.",t),t}};var cie={};eu(cie,{builder:()=>AZt,command:()=>xZt,describe:()=>EZt,handler:()=>DZt});var Aje=require("fs");var xZt="raw-logs",EZt="Sync all logs from a network",AZt=e=>e.option("contract-address",{describe:"The contract address you are interested in",type:"string",default:""}).option("network",{describe:"The network of indexed.xyz data to synchronize",type:"string",default:"ethereum",coerce:EC}).option("dataVersion",{describe:"The version of indexed.xyz data to synchronize",type:"string",hidden:!0}),DZt=async e=>{try{console.log(""),vg("Sync raw logs from indexed.xyz to your local computer"),Vw();let t=e.network.toLowerCase(),r=e.dataVersion,n=e.contractAddress.toLowerCase();if(!n&&r!=="2.0.0"&&(n=await zV()),r||(r=DC(t)),n&&r==="2.0.0"&&!await ny({message:"This dataset is not partitioned for contract address filtering, you will need to download the whole dataset to filter. Do you want to continue?",initialValue:!1})){console.log("Aborting sync.");return}let i=UV(n,r),s=vP({version:r}),o=_P({datasetType:"raw",network:t,partitionKey:i,tableName:"logs",version:r}),a=`${t}/raw/logs/${n}`;(0,Aje.mkdirSync)(`./data/${a}`,{recursive:!0}),CC(a),xC(),await wP({sourceBucket:s,sourcePath:o,destinationPath:"./data/.tmp",processFile:n?GV(a,n):void 0,syncProgress:fk(),relocations:n?void 0:[c=>{let l=c.split("/").pop();return`${a}/${l}`}]})}catch(t){throw await Fw("Syncing failed.",t),t}};var lie={};eu(lie,{builder:()=>IZt,command:()=>kZt,describe:()=>PZt,handler:()=>RZt});var Dje=require("fs");var kZt="raw-transactions",PZt="Sync all transactions from a network",IZt=e=>e.option("network",{describe:"The network of indexed.xyz data to synchronize",type:"string",default:"ethereum",coerce:EC}).option("dataVersion",{describe:"The version of indexed.xyz data to synchronize",type:"string",hidden:!0}),RZt=async e=>{try{console.log(""),vg("Sync raw transactions from indexed.xyz to your local computer"),Vw();let t=e.network.toLowerCase(),r="raw",n="transactions",i=`${t}/${r}/${n}`;(0,Dje.mkdirSync)(`./data/${i}`,{recursive:!0}),CC(i),xC(),await VV({network:t,processedPath:i,tableName:n,version:e.dataVersion||DC(t)})}catch(t){throw await Fw("Syncing failed.",t),t}};var OZt="sync",FZt="Commands related to syncing indexed.xyz real-time raw & decoded crypto datasets",TZt=e=>e.command(oie).command(aie).command(cie).command(lie).demandCommand(1),NZt=async()=>{};var die={};eu(die,{builder:()=>LZt,command:()=>qZt,describe:()=>BZt,handler:()=>jZt});var qZt="rill",BZt="Analyze indexed.xyz data with Rill",LZt=e=>e,jZt=e=>{console.log(""),vg("Analyze indexed.xyz data with Rill Data"),Ff("Please refer to https://www.rilldata.com/indexed-xyz for the latest news on analyzing Indexed.xyz data with Rill.")};var MZt="indexed",$Zt="Analyze blockchain data with indexed.xyz",UZt=e=>e.command(uie).command("rill",!1,die).version(!1).demandCommand(1),zZt=async()=>{};var mie={};eu(mie,{builder:()=>XZt,command:()=>GZt,describe:()=>VZt,handler:()=>WZt});var GZt="login",VZt="Log in to Goldsky to enable authenticated CLI commands",XZt=e=>e.version(!1),WZt=async({apiHost:e,token:t})=>{await qj({apiHost:e,token:t})};var fie={};eu(fie,{builder:()=>ZZt,command:()=>HZt,describe:()=>KZt,handler:()=>YZt});var HZt="logout",KZt="Log out of Goldsky on this computer",ZZt=e=>e.version(!1),YZt=async({apiHost:e})=>{await F0e({apiHost:e})};var Gie={};eu(Gie,{builder:()=>FJt,command:()=>RJt,describe:()=>OJt,handler:()=>TJt});var gie={};eu(gie,{builder:()=>eYt,command:()=>JZt,describe:()=>QZt,handler:()=>tYt});var hie=Kl($f());function HV(e,t){return io.get(r=>`/api/admin/streams/v1/${r.name}?version=${r.version||""}&pipelineConfigVersion=${t}`,{params:e})}function kje(e){return io.post("/api/admin/streams/v1/runtime-details",{body:{namesAndVersions:[{name:e.name,version:e.version}]}})}async function KV(e,t,r,n){let i=ku("Fetching pipeline");n||(i=i.start());let[s,o]=await HV(e,r);if(s)throw i.fail(s.message),s;{if(n||i.succeed(),n){Uwe(o instanceof Array?o:[o],t);return}let a=ku("Fetching pipeline runtime details").start(),[c,l]=await kje(e);c?a.warn("Couldn't load pipeline runtime details"):a.succeed(),Gw(o,c?[]:l,t)}}var JZt="get <nameOrConfigPath>",QZt="Get a pipeline",eYt=e=>e.positional("nameOrConfigPath",{describe:"pipeline name or config file path",type:"string",demandOption:!0}).option("outputFormat",{describe:"format of the output. Either json or table. Defaults to json.",alias:["output"],type:"string",choices:Qn.AllStreamCliOuputFormats,default:"yaml",coerce:AC,deprecated:!0}).option("pipelineConfigVersion",{describe:"[BETA] define v3 to see an experimental new pipeline configuration output. Defaults to v2.",type:"string",choices:["v2","v3"],default:"v3",hidden:!0}).option("definition",{describe:"print the pipeline's definition only (sources, transforms, sinks)",type:"boolean"}).option("version",{describe:"pipeline version. Returns latest version of the pipeline if not set. Passing 'all' returns all versions.",type:"string"}),tYt=async e=>{e.outputFormat!=="yaml"&&(console.warn(hie.default.yellow('The "--output" and "--output-format" flags are deprecated and will be removed in a future major release of the CLI. The default output format going forward will be yaml.')),console.warn(""));let t=Fy(e.nameOrConfigPath);await KV({name:t,version:e.version},e.outputFormat,e.pipelineConfigVersion,e.definition),e.pipelineConfigVersion==="v2"&&console.warn(hie.default.yellow(`[deprecated] You requested the legacy v2 pipeline config. See ${Dj} for the latest config documentation.`))};var bie={};eu(bie,{builder:()=>iYt,command:()=>rYt,describe:()=>nYt,handler:()=>sYt});var yie=Kl($f());var rYt="get-definition <name>",nYt=yie.default.yellow('[deprecated] Get a shareable pipeline definition. Use "pipeline get <name> --definition" instead.'),iYt=e=>e.positional("name",{describe:"pipeline name",type:"string",demandOption:!0}).option("outputFormat",{describe:"format of the output. Either json or yaml. Defaults to yaml.",alias:["output"],type:"string",default:"yaml",choices:Qn.AllStreamCliOuputFormats.filter(t=>t!=="table"),demandOption:!1,coerce:AC,deprecated:!0}).option("pipelineConfigVersion",{describe:"[BETA] define v3 to see an experimental new pipeline configuration output. Defaults to v2.",type:"string",choices:["v2","v3"],default:"v2",hidden:!0}),sYt=async e=>{console.warn(yie.default.yellow('[deprecated] Use "pipeline get <name> --definition" instead')),console.warn(""),await KV({name:e.name},e.outputFormat,e.pipelineConfigVersion,!0)};var Sie={};eu(Sie,{builder:()=>cYt,command:()=>oYt,describe:()=>aYt,handler:()=>lYt});var lA=Kl($f());var oYt="create <name>",aYt="Create a pipeline",cYt=e=>e.positional("name",{describe:"name of the new pipeline",type:"string",demandOption:!0}).option("output",{describe:"format of the output. Either json or table. Defaults to table.",alias:["outputFormat"],type:"string",default:"yaml",choices:Qn.AllStreamCliOuputFormats,demandOption:!1}).option("resource-size",{describe:"runtime resource size for when the pipeline runs",alias:["resourceSize"],choices:Qn.AllResourceSizes,default:"s",type:"string",demandOption:!0,coerce:CP,deprecated:lA.default.yellow("Use 'pipeline resize'")}).option("skip-transform-validation",{describe:"skips the validation of the transforms when creating the pipeline.",type:"boolean",demandOption:!1}).option("description",{describe:"the description of the new pipeline",type:"string",demandOption:!1,deprecated:lA.default.yellow("Use 'pipeline apply'")}).option("definition",{describe:"definition of the pipeline that includes sources, transforms, sinks. Provided as json eg: `{sources: [], transforms: [], sinks:[]}`",type:"string",demandOption:!1,deprecated:lA.default.yellow("Use 'pipeline apply'")}).option("definition-path",{describe:"path to a json/yaml file with the definition of the pipeline that includes sources, transforms, sinks.",type:"string",demandOption:!1,deprecated:lA.default.yellow("Use 'pipeline apply'")}).option("status",{describe:"the desired status of the pipeline",type:"string",choices:Qn.AllStreamStatusValidAtCreate,default:"ACTIVE",demandOption:!1,coerce:WV,deprecated:lA.default.yellow("Use 'pipeline start/stop/pause'")}).option("dedicated-egress-ip",{describe:"Whether the pipeline should use dedicated egress IPs",type:"boolean",default:!1,demandOption:!0,hidden:!0}).conflicts("definition","definition-path"),lYt=async e=>{await uYt(e.name);let t,r=!1;e.definition||e.definitionPath?(console.warn(lA.default.yellow('[deprecated] Use "pipeline apply" instead')),console.warn(""),t=MM(e)):(r=!0,t=await $M(e)),await UM(t,r,e.outputFormat)};async function uYt(e){let[t]=await io.post("/api/admin/streams/v1/validate-new-stream",{body:{name:e}});if(t)throw t}var vie={};eu(vie,{builder:()=>mYt,command:()=>dYt,describe:()=>pYt,handler:()=>fYt});var ZV=Kl($f());var dYt="update <name>",pYt=ZV.default.yellow('[deprecated] Update a pipeline. Use "pipeline apply" instead.'),mYt=e=>e.positional("name",{describe:"name of the pipeline to update.",type:"string",demandOption:!0}).option("outputFormat",{describe:"format of the output. Either json or table. Defaults to json.",alias:["output"],type:"string",choices:Qn.AllStreamCliOuputFormats,default:"yaml",demandOption:!0,coerce:AC,deprecated:!0}).option("resource-size",{describe:"runtime resource size for when the pipeline runs ",alias:["resourceSize"],choices:Qn.AllResourceSizes,type:"string",demandOption:!1,coerce:CP}).option("status",{describe:"status of the pipeline",type:"string",choices:Qn.AllStreamStatuses,demandOption:!1,coerce:WV}).option("save-progress",{describe:"takes a snapshot of the pipeline before applying the update. Only applies if the pipeline already has status: ACTIVE. Defaults to saving progress unless pipeline is being updated to status=INACTIVE.",type:"boolean",demandOption:!1}).option("skip-transform-validation",{describe:"skips the validation of the transforms when updating the pipeline.",type:"boolean",demandOption:!1}).option("use-latest-snapshot",{describe:"attempts to use the latest available snapshot.",type:"boolean",demandOption:!1}).option("definition",{describe:"definition of the pipeline that includes sources, transforms, sinks. Provided as json eg: `{sources: [], transforms: [], sinks:[]}`",type:"string",demandOption:!1}).option("definition-path",{describe:"path to a json/yaml file with the definition of the pipeline that includes sources, transforms, sinks.",type:"string",demandOption:!1}).option("description",{describe:"description of the pipeline`",type:"string",demandOption:!1}).conflicts("definition","definition-path"),fYt=async e=>{console.warn(ZV.default.yellow('[deprecated] Use "pipeline apply" instead')),console.warn(""),e.outputFormat!=="yaml"&&(console.warn(ZV.default.yellow('The "--output" and "--output-format" flags are deprecated and will be removed in a future major release of the CLI. The default output format going forward will be yaml.')),console.warn(""));let t={name:e.name,status:e.status,description:e.description,resource_size:e.resourceSize,save_progress:e.saveProgress,skip_transform_validation:e.skipTransformValidation,use_latest_snapshot:e.useLatestSnapshot,update_only:!0},r;e.definition?r=Od(po({},t),{definition:aR(e.definition)}):e.definitionPath&&(r=Od(po({},t),{definition:Ij(e.definitionPath)}));let n=cd();n.start("Updating pipeline");let i=r||t,[s,o,a]=await wb(i);if(s)throw ls(n,s.message);{let c=e.name;if(a&&a.statusCode===202)mk(c,n);else if(o)ls(n,`Updated pipeline: ${c}`),e.outputFormat&&Gw([o],[],e.outputFormat),o.status!=="INACTIVE"&&console.log(`
585
+ `),s.remove(m)});await mZt(a),console.log("Sync complete.")},xC=()=>{let e=cd();e.start(),ls(e,'Syncing... data is stored in the "./data" directory. Stop with Ctrl + C.'),console.log("")};function EC(e){return e.toLowerCase()}function AC(e){return e.toLowerCase()}function Cje(e){return e.toLowerCase()}function CP(e){return e.toLowerCase()}function XV(e){return`${e.charAt(0).toUpperCase()}${e.slice(1).toLowerCase()}`}function WV(e){return e.toUpperCase()}var fZt="1.0.0",hZt={ethereum:"1.2.0",zksync:"2.0.0",optimism:"2.0.0"};function DC(e){return hZt[e]||fZt}var gZt="decoded-logs",yZt="Sync decoded logs for a smart contract from a network to this computer",bZt=e=>e.option("contract-address",{describe:"The contract address you are interested in",type:"string",default:""}).option("network",{describe:"The network of indexed.xyz data to synchronize",type:"string",default:"ethereum",coerce:EC}).option("dataVersion",{describe:"The version of indexed.xyz data to synchronize",type:"string",hidden:!0}),SZt=async e=>{try{console.log(""),vg("Sync decoded logs from indexed.xyz to your local computer"),Vw();let t=e.network.toLowerCase(),r=e.dataVersion,n=e.contractAddress.toLowerCase();if(!n&&r!=="2.0.0"&&(n=await zV()),n&&!r&&(r=t==="ethereum"?"1.2.0":"1.0.0"),r||(r=DC(t)),n&&r==="2.0.0"&&!await ny({message:"This dataset is not partitioned for contract address filtering, you will need to download the whole dataset to filter. Do you want to continue?",initialValue:!1})){console.log("Aborting sync.");return}let i=UV(n,r),s=vP({version:r}),o=_P({datasetType:"decoded",network:t,partitionKey:i,tableName:"logs",version:r}),a=`${t}/decoded/logs/${n}`;(0,xje.mkdirSync)(`./data/${a}`,{recursive:!0}),CC(a),xC(),await wP({sourceBucket:s,sourcePath:o,destinationPath:"./data/.tmp",processFile:n?GV(a,n):void 0,syncProgress:fk(),relocations:n?void 0:[c=>{let l=c.split("/").pop();return`${a}/${l}`}]})}catch(t){throw await Fw("Syncing failed.",t),t}};var aie={};eu(aie,{builder:()=>wZt,command:()=>vZt,describe:()=>_Zt,handler:()=>CZt});var Eje=require("fs");var vZt="raw-blocks",_Zt="Sync all blocks from a network",wZt=e=>e.option("network",{describe:"The network of indexed.xyz data to synchronize",type:"string",default:"ethereum",coerce:EC}).option("dataVersion",{describe:"The version of indexed.xyz data to synchronize",type:"string",hidden:!0}),CZt=async e=>{try{console.log(""),vg("Sync raw blocks from indexed.xyz to your local computer"),Vw();let t=e.network.toLowerCase(),r="raw",n="blocks",i=`${t}/${r}/${n}`;(0,Eje.mkdirSync)(`./data/${i}`,{recursive:!0}),CC(i),xC(),await VV({network:t,processedPath:i,tableName:n,version:e.dataVersion||DC(t)})}catch(t){throw await Fw("Syncing failed.",t),t}};var cie={};eu(cie,{builder:()=>AZt,command:()=>xZt,describe:()=>EZt,handler:()=>DZt});var Aje=require("fs");var xZt="raw-logs",EZt="Sync all logs from a network",AZt=e=>e.option("contract-address",{describe:"The contract address you are interested in",type:"string",default:""}).option("network",{describe:"The network of indexed.xyz data to synchronize",type:"string",default:"ethereum",coerce:EC}).option("dataVersion",{describe:"The version of indexed.xyz data to synchronize",type:"string",hidden:!0}),DZt=async e=>{try{console.log(""),vg("Sync raw logs from indexed.xyz to your local computer"),Vw();let t=e.network.toLowerCase(),r=e.dataVersion,n=e.contractAddress.toLowerCase();if(!n&&r!=="2.0.0"&&(n=await zV()),r||(r=DC(t)),n&&r==="2.0.0"&&!await ny({message:"This dataset is not partitioned for contract address filtering, you will need to download the whole dataset to filter. Do you want to continue?",initialValue:!1})){console.log("Aborting sync.");return}let i=UV(n,r),s=vP({version:r}),o=_P({datasetType:"raw",network:t,partitionKey:i,tableName:"logs",version:r}),a=`${t}/raw/logs/${n}`;(0,Aje.mkdirSync)(`./data/${a}`,{recursive:!0}),CC(a),xC(),await wP({sourceBucket:s,sourcePath:o,destinationPath:"./data/.tmp",processFile:n?GV(a,n):void 0,syncProgress:fk(),relocations:n?void 0:[c=>{let l=c.split("/").pop();return`${a}/${l}`}]})}catch(t){throw await Fw("Syncing failed.",t),t}};var lie={};eu(lie,{builder:()=>IZt,command:()=>kZt,describe:()=>PZt,handler:()=>RZt});var Dje=require("fs");var kZt="raw-transactions",PZt="Sync all transactions from a network",IZt=e=>e.option("network",{describe:"The network of indexed.xyz data to synchronize",type:"string",default:"ethereum",coerce:EC}).option("dataVersion",{describe:"The version of indexed.xyz data to synchronize",type:"string",hidden:!0}),RZt=async e=>{try{console.log(""),vg("Sync raw transactions from indexed.xyz to your local computer"),Vw();let t=e.network.toLowerCase(),r="raw",n="transactions",i=`${t}/${r}/${n}`;(0,Dje.mkdirSync)(`./data/${i}`,{recursive:!0}),CC(i),xC(),await VV({network:t,processedPath:i,tableName:n,version:e.dataVersion||DC(t)})}catch(t){throw await Fw("Syncing failed.",t),t}};var OZt="sync",FZt="Commands related to syncing indexed.xyz real-time raw & decoded crypto datasets",TZt=e=>e.command(oie).command(aie).command(cie).command(lie).demandCommand(1),NZt=async()=>{};var die={};eu(die,{builder:()=>LZt,command:()=>qZt,describe:()=>BZt,handler:()=>jZt});var qZt="rill",BZt="Analyze indexed.xyz data with Rill",LZt=e=>e,jZt=e=>{console.log(""),vg("Analyze indexed.xyz data with Rill Data"),Ff("Please refer to https://www.rilldata.com/indexed-xyz for the latest news on analyzing Indexed.xyz data with Rill.")};var MZt="indexed",$Zt="Analyze blockchain data with indexed.xyz",UZt=e=>e.command(uie).command("rill",!1,die).version(!1).demandCommand(1),zZt=async()=>{};var mie={};eu(mie,{builder:()=>XZt,command:()=>GZt,describe:()=>VZt,handler:()=>WZt});var GZt="login",VZt="Log in to Goldsky to enable authenticated CLI commands",XZt=e=>e.version(!1),WZt=async({apiHost:e,token:t})=>{await qj({apiHost:e,token:t})};var fie={};eu(fie,{builder:()=>ZZt,command:()=>HZt,describe:()=>KZt,handler:()=>YZt});var HZt="logout",KZt="Log out of Goldsky on this computer",ZZt=e=>e.version(!1),YZt=async({apiHost:e})=>{await F0e({apiHost:e})};var Gie={};eu(Gie,{builder:()=>FJt,command:()=>RJt,describe:()=>OJt,handler:()=>TJt});var gie={};eu(gie,{builder:()=>eYt,command:()=>JZt,describe:()=>QZt,handler:()=>tYt});var hie=Kl($f());function HV(e,t){return io.get(r=>`/api/admin/streams/v1/${r.name}?version=${r.version||""}&pipelineConfigVersion=${t}`,{params:e})}function kje(e){return io.post("/api/admin/streams/v1/runtime-details",{body:{namesAndVersions:[{name:e.name,version:e.version}]}})}async function KV(e,t,r,n){let i=ku("Fetching pipeline");n||(i=i.start());let[s,o]=await HV(e,r);if(s)throw i.fail(s.message),s;{if(n||i.succeed(),n){Uwe(o instanceof Array?o:[o],t);return}let a=ku("Fetching pipeline runtime details").start(),[c,l]=await kje(e);c?a.warn("Couldn't load pipeline runtime details"):a.succeed(),Gw(o,c?[]:l,t)}}var JZt="get <nameOrConfigPath>",QZt="Get a pipeline",eYt=e=>e.positional("nameOrConfigPath",{describe:"pipeline name or config file path",type:"string",demandOption:!0}).option("outputFormat",{describe:"format of the output. Either json or table. Defaults to json.",alias:["output"],type:"string",choices:Qn.AllStreamCliOuputFormats,default:"yaml",coerce:AC,deprecated:!0}).option("pipelineConfigVersion",{describe:"[BETA] define v3 to see an experimental new pipeline configuration output. Defaults to v2.",type:"string",choices:["v2","v3"],default:"v3",hidden:!0}).option("definition",{describe:"print the pipeline's definition only (sources, transforms, sinks)",type:"boolean"}).option("version",{describe:"pipeline version. Returns latest version of the pipeline if not set. Passing 'all' returns all versions.",type:"string"}),tYt=async e=>{e.outputFormat!=="yaml"&&(console.warn(hie.default.yellow('The "--output" and "--output-format" flags are deprecated and will be removed in a future major release of the CLI. The default output format going forward will be yaml.')),console.warn(""));let t=Fy(e.nameOrConfigPath);await KV({name:t,version:e.version},e.outputFormat,e.pipelineConfigVersion,e.definition),e.pipelineConfigVersion==="v2"&&console.warn(hie.default.yellow(`[deprecated] You requested the legacy v2 pipeline config. See ${Dj} for the latest config documentation.`))};var bie={};eu(bie,{builder:()=>iYt,command:()=>rYt,describe:()=>nYt,handler:()=>sYt});var yie=Kl($f());var rYt="get-definition <name>",nYt=yie.default.yellow('[deprecated] Get a shareable pipeline definition. Use "pipeline get <name> --definition" instead.'),iYt=e=>e.positional("name",{describe:"pipeline name",type:"string",demandOption:!0}).option("outputFormat",{describe:"format of the output. Either json or yaml. Defaults to yaml.",alias:["output"],type:"string",default:"yaml",choices:Qn.AllStreamCliOuputFormats.filter(t=>t!=="table"),demandOption:!1,coerce:AC,deprecated:!0}).option("pipelineConfigVersion",{describe:"[BETA] define v3 to see an experimental new pipeline configuration output. Defaults to v2.",type:"string",choices:["v2","v3"],default:"v2",hidden:!0}),sYt=async e=>{console.warn(yie.default.yellow('[deprecated] Use "pipeline get <name> --definition" instead')),console.warn(""),await KV({name:e.name},e.outputFormat,e.pipelineConfigVersion,!0)};var Sie={};eu(Sie,{builder:()=>cYt,command:()=>oYt,describe:()=>aYt,handler:()=>lYt});var lA=Kl($f());var oYt="create <name>",aYt="Create a pipeline",cYt=e=>e.positional("name",{describe:"name of the new pipeline",type:"string",demandOption:!0}).option("output",{describe:"format of the output. Either json or table. Defaults to table.",alias:["outputFormat"],type:"string",default:"yaml",choices:Qn.AllStreamCliOuputFormats,demandOption:!1}).option("resource-size",{describe:"runtime resource size for when the pipeline runs",alias:["resourceSize"],choices:Qn.AllResourceSizes,default:"s",type:"string",demandOption:!0,coerce:CP,deprecated:lA.default.yellow("Use 'pipeline resize'")}).option("skip-transform-validation",{describe:"skips the validation of the transforms when creating the pipeline.",type:"boolean",demandOption:!1}).option("description",{describe:"the description of the new pipeline",type:"string",demandOption:!1,deprecated:lA.default.yellow("Use 'pipeline apply'")}).option("definition",{describe:"definition of the pipeline that includes sources, transforms, sinks. Provided as json eg: `{sources: [], transforms: [], sinks:[]}`",type:"string",demandOption:!1,deprecated:lA.default.yellow("Use 'pipeline apply'")}).option("definition-path",{describe:"path to a json/yaml file with the definition of the pipeline that includes sources, transforms, sinks.",type:"string",demandOption:!1,deprecated:lA.default.yellow("Use 'pipeline apply'")}).option("status",{describe:"the desired status of the pipeline",type:"string",choices:Qn.AllStreamStatusValidAtCreate,default:"ACTIVE",demandOption:!1,coerce:WV,deprecated:lA.default.yellow("Use 'pipeline start/stop/pause'")}).option("use-dedicated-ip",{describe:"Whether the pipeline should use dedicated egress IPs",type:"boolean",default:!1,demandOption:!0,hidden:!0}).conflicts("definition","definition-path"),lYt=async e=>{await uYt(e.name);let t,r=!1;e.definition||e.definitionPath?(console.warn(lA.default.yellow('[deprecated] Use "pipeline apply" instead')),console.warn(""),t=MM(e)):(r=!0,t=await $M(e)),await UM(t,r,e.outputFormat)};async function uYt(e){let[t]=await io.post("/api/admin/streams/v1/validate-new-stream",{body:{name:e}});if(t)throw t}var vie={};eu(vie,{builder:()=>mYt,command:()=>dYt,describe:()=>pYt,handler:()=>fYt});var ZV=Kl($f());var dYt="update <name>",pYt=ZV.default.yellow('[deprecated] Update a pipeline. Use "pipeline apply" instead.'),mYt=e=>e.positional("name",{describe:"name of the pipeline to update.",type:"string",demandOption:!0}).option("outputFormat",{describe:"format of the output. Either json or table. Defaults to json.",alias:["output"],type:"string",choices:Qn.AllStreamCliOuputFormats,default:"yaml",demandOption:!0,coerce:AC,deprecated:!0}).option("resource-size",{describe:"runtime resource size for when the pipeline runs ",alias:["resourceSize"],choices:Qn.AllResourceSizes,type:"string",demandOption:!1,coerce:CP}).option("status",{describe:"status of the pipeline",type:"string",choices:Qn.AllStreamStatuses,demandOption:!1,coerce:WV}).option("save-progress",{describe:"takes a snapshot of the pipeline before applying the update. Only applies if the pipeline already has status: ACTIVE. Defaults to saving progress unless pipeline is being updated to status=INACTIVE.",type:"boolean",demandOption:!1}).option("skip-transform-validation",{describe:"skips the validation of the transforms when updating the pipeline.",type:"boolean",demandOption:!1}).option("use-latest-snapshot",{describe:"attempts to use the latest available snapshot.",type:"boolean",demandOption:!1}).option("definition",{describe:"definition of the pipeline that includes sources, transforms, sinks. Provided as json eg: `{sources: [], transforms: [], sinks:[]}`",type:"string",demandOption:!1}).option("definition-path",{describe:"path to a json/yaml file with the definition of the pipeline that includes sources, transforms, sinks.",type:"string",demandOption:!1}).option("description",{describe:"description of the pipeline`",type:"string",demandOption:!1}).conflicts("definition","definition-path"),fYt=async e=>{console.warn(ZV.default.yellow('[deprecated] Use "pipeline apply" instead')),console.warn(""),e.outputFormat!=="yaml"&&(console.warn(ZV.default.yellow('The "--output" and "--output-format" flags are deprecated and will be removed in a future major release of the CLI. The default output format going forward will be yaml.')),console.warn(""));let t={name:e.name,status:e.status,description:e.description,resource_size:e.resourceSize,save_progress:e.saveProgress,skip_transform_validation:e.skipTransformValidation,use_latest_snapshot:e.useLatestSnapshot,update_only:!0},r;e.definition?r=Od(po({},t),{definition:aR(e.definition)}):e.definitionPath&&(r=Od(po({},t),{definition:Ij(e.definitionPath)}));let n=cd();n.start("Updating pipeline");let i=r||t,[s,o,a]=await wb(i);if(s)throw ls(n,s.message);{let c=e.name;if(a&&a.statusCode===202)mk(c,n);else if(o)ls(n,`Updated pipeline: ${c}`),e.outputFormat&&Gw([o],[],e.outputFormat),o.status!=="INACTIVE"&&console.log(`
586
586
  ${["To monitor the status of your pipeline:","",`Using the CLI: \`goldsky pipeline monitor ${o.name}\``,`Using the dashboard: https://app.goldsky.com/dashboard/pipelines/stream/${o.name}/${o.version}`].join(`
587
587
  `)}`);else throw ls(n,"Failed to update pipeline, please try again")}};var _ie={};eu(_ie,{builder:()=>yYt,command:()=>hYt,describe:()=>gYt,handler:()=>bYt});async function Pje(e){let t=ku("Deleting pipeline").start(),[r]=await io.delete_(()=>`/api/admin/streams/v1/${e.name}`);if(r)throw t.fail(r.message),r;t.succeed(`Deleted pipeline with name: ${e.name}`)}var hYt="delete <nameOrConfigPath>",gYt="Delete a pipeline",yYt=e=>e.positional("nameOrConfigPath",{describe:"pipeline name or config file path",type:"string",demandOption:!0}).option("f",{alias:"force",describe:"Force the deletion without prompting for confirmation",type:"boolean",default:!1}),bYt=async e=>{let t=Fy(e.nameOrConfigPath);if(!e.force){let r=await R0({message:"Please enter the pipeline name to confirm you want to delete it",validate(n){if(n!==t)return"Invalid pipeline name. To cancel, use Ctrl + C."}});if(Rg(r)){let n="Pipeline deletion cancelled.";throw Sg(n),gf(n)}}await Pje({name:t})};var wie={};eu(wie,{builder:()=>_Yt,command:()=>SYt,describe:()=>vYt,handler:()=>wYt});var Ije=Kl($f());function YV(){return io.get("/api/admin/streams/v1/")}async function Rje(e,t="all",r=!1){let n=ku("Listing pipelines").start(),[i,s]=await YV();if(i)throw n.fail(i.message),i;if(n.succeed(),s.length>0){let o=s.map(c=>({name:c.name,version:c.version})),a=[];if(r){let c=ku("Fetching pipeline runtime details").start(),[l,u]=await io.post("/api/admin/streams/v1/runtime-details",{body:{namesAndVersions:o}});l?c.warn("Couldn't load pipeline runtime details"):(c.succeed(),a=u)}Gw(s,a,e,t)}else console.log(`No pipelines found. Create one with ${Ije.default.bold("goldsky pipeline create")}.`)}var SYt="list",vYt="List all pipelines",_Yt=e=>e.option("output",{describe:"format of the output. Either json or table. Defaults to json.",alias:["outputFormat"],type:"string",choices:Qn.AllStreamCliOuputFormats,default:"table"}).option("outputVerbosity",{describe:"Either summary or all. Defaults to summary.",type:"string",choices:Mwe,default:"summary",coerce:Cje}).option("include-runtime-details",{describe:"includes runtime details for each pipeline like runtime status and errors. Defaults to false.",type:"boolean",demandOption:!1,default:!1}),wYt=async e=>{await Rje(e.output,e.outputVerbosity,e.includeRuntimeDetails),console.log("Specify `--include-runtime-details true` to include runtime details like pipeline status and errors."),console.log(""),console.log("Use `goldsky pipeline get <pipeline-name>` to load more details for a given pipeline."),console.log("Alternatively, try `goldsky pipeline monitor <pipeline-name>` to continuously monitor an active pipeline."),console.log("")};var Fie={};eu(Fie,{builder:()=>ZYt,command:()=>HYt,describe:()=>KYt,handler:()=>YYt});var JN=Kl($f());var zje=Kl(Uje());var YN=Kl($f());async function Gje(e){let t=cd();t.start("Checking update status");let[r,n]=await Hje(e);if(r)throw ls(t,r.message);let i=`You can monitor the pipeline with ${YN.default.bold(`goldsky pipeline monitor ${e}`)}`;switch(n.status){case"COMPLETED":Vje(t,i);break;case"CANCELED":Xje(t,i);break;case"TIMED_OUT":case"FAILED":{Wje(t,n,i);break}case"IN_PROGRESS":{await MYt(e,t,i);break}}}async function MYt(e,t,r){ls(t,"Monitoring update progress");let n=fk({format:"Snapshot creation in progress: {bar} {percentage}%",hideCursor:!0,clearOnComplete:!0,stopOnComplete:!0,emptyOnZero:!0,forceRedraw:!0});f_(`You may cancel the update request by running ${YN.default.bold(`goldsky pipeline cancel-update ${e}
588
588
  `)}`);let i=100;for(n.start(i,0);;){let[s,o]=await Hje(e);if(s){t.message("Encountered an error while communicating with the API. Will retry..."),await new Promise(a=>setTimeout(a,15e3));continue}else{let a=o.status;if((a==="IN_PROGRESS"||a==="TRIGGERED")&&o.progressPercent)n.update(o.progressPercent);else if(a==="COMPLETED")n.update(i),Vje(t,r),dA();else{if(a==="FAILED"||a==="TIMED_OUT")throw Wje(t,o,r),new Error(`Latest update request has ${a.toLocaleLowerCase().replace("_"," ")}. This may be because the pipeline is having issues.`);a==="CANCELED"&&(Xje(t,r),dA())}}await new Promise(a=>setTimeout(a,5e3))}}function Vje(e,t){ls(e,"Latest update request has successfully completed."),f_(t)}function Xje(e,t){ls(e,"Latest update request was cancelled."),f_(t)}function Wje(e,t,r){let n=t.status;ls(e,`Latest update request has ${n.toLocaleLowerCase().replace("_"," ")}. This may be because the pipeline is having issues.`),f_(r);let i=t.latestCompletedSnapshot;if(i&&i.startedAt){let o=i.startedAt,a=`${YN.default.bold((0,zje.format)(new Date(o),"en_US"))}`;f_(`Or, you may use an older snapshot from ${a} by retrying the update request with the ${YN.default.bold("--use-latest-snapshot")} flag.`)}}async function Hje(e){return io.get(t=>`/api/admin/streams/v1/${t.name}/update-status`,{params:{name:e}})}async function r4(e,t,r){if(r){await Gje(e.name);return}let n=ku("Validating request").start();if(e.version==="all"){let a="Cannot monitor all versions of the pipeline, please provide a specific version or no version to monitor the latest";throw n.fail(a),new Error(a)}n.succeed();let i=ku("Fetching pipeline").start(),[s,o]=await io.get(a=>`/api/admin/streams/v1/${a.name}?version=${a.version||""}`,{params:e});if(s)throw i.fail(s.message),s;{i.succeed();let a=o[0],c=ku("Validating pipeline status");if(a.status==="INACTIVE"){let l=`Stream has status '${a.status}', only 'ACTIVE' pipelines can be monitored`;throw c.fail(l),new Error(l)}c.succeed(),await $Yt(a,t)}}async function $Yt(e,t){let r=new Set(["Timestamp","Status"]),n={"total.records.received":"Total records received","total.records.processed":"Total records written"},i=10,s=5,o=0,a=0,c=ku("Fetching runtime details").start(),l=ku(),u;do{let[y,C]=await UYt(e.name,e.version.toString());if(y)o++,Kje(c,l).warn(`Attempt: ${o}. Encountered error fetching pipeline runtime status. Retrying...`);else if((C==null?void 0:C.length)===0)o++;else{o=0,a++,c.isSpinning?c.succeed():l.isSpinning&&(process.stdout.clearLine(0),process.stdout.moveCursor(0,-1),process.stdout.cursorTo(Number.MAX_SAFE_INTEGER));let{errors:I,status:F,jobStats:T}=C[0].runtimeDetails,M=[Zje(),XYt(F)];if(GYt(T,n,r,M),VYt(I,r,M),!u){let Y=Array.from(r.values());u=WYt(Y),u.write(Y.map(de=>JN.default.green(de)))}u.write(M)}t&&a===t||await zYt(c,l,i)}while(o<=s&&a<(t||Number.MAX_VALUE));let m=Kje(c,l);t&&a===t&&(m.succeed(`Successfully printed ${t} data refreshes!`),dA());let f=`Encountered continuous errors attempting to monitor the pipeline! Either the pipeline has an 'INACTIVE' or 'PAUSED' status, or there might be other issues.
@@ -632,7 +632,7 @@ ${Wg.default.goldsky.pink.underline(w0e)}`,Wg.default.goldsky.orange.bold("Suppo
632
632
  --host ${e.url.substring(8)} \\
633
633
  --user "${e.username}" \\
634
634
  --password "${e.password}"
635
- `)}function $5e(){let e="clickhouse";return dle()==="currentDir"&&(e=`./${e}`),e}var Edr="connect",Adr="Connect to your Goldsky ClickHouse database",Ddr=e=>e,kdr=async()=>{console.log(""),vg("Goldsky ClickHouse - Connect"),Ff("Goldsky ClickHouse is based on ClickHouse (https://clickhouse.com).","Get started"),B5e();let e=await N5e();switch(await dh({message:"How would you like to connect?",options:[{label:"Automatically connect",value:"automatically",hint:"Once you hit Enter, you will be connected to the ClickHouse database."},{label:"Manually connect",value:"manually",hint:"Once you hit Enter, you will see the connection details."}]})){case"automatically":j5e(e);break;case"manually":M5e(e);break}};var Pdr="clickhouse",Idr="Commands related to Goldsky ClickHouse",Rdr=e=>e.command(ple).version(!1).demandCommand(1),Odr=async()=>{};var Fdr="db",Tdr="Commands related to Goldsky DB",Ndr=e=>e.command(mle).version(!1).demandCommand(1),qdr=async()=>{};var Zle={};eu(Zle,{builder:()=>vmr,command:()=>bmr,describe:()=>Smr,handler:()=>_mr});var Wle={};eu(Wle,{builder:()=>lmr,command:()=>amr,describe:()=>cmr,handler:()=>Xle});var Z6e=Kl(X6e()),Ule=require("crypto");var CI=Kl(require("os"));var MA={name:"@goldskycom/cli",version:"9.8.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 --max-warnings 0 .","lint:summary":"pnpm lint --format summary || pnpm lint",typecheck:"tsc --noEmit",clean:"rimraf ./binaries ./dist ./tsconfig.tsbuildinfo",build:"pnpm clean && tsc --noEmit --skipLibCheck && node ./scripts/build.js && chmod a+x bin/goldsky","build:binaries":"pnpm build && rimraf ./binaries && node ./scripts/binaries-build.js","deploy:binaries":"node ./scripts/binaries-deploy.js","dev:debug":"NODE_ENV=development ts-node src/index.ts","dev:dist":"NODE_ENV=development node dist/index.js",prepublishOnly:"pnpm build","test:unit":"pnpm build && tsc --skipLibCheck && NODE_ENV=unit-tests node --test --test-reporter spec dist","docs:reference:generate":"pnpm build && GOLDSKY_PARSE_CLI_OUTPUT_FOR_DOCS=true ts-node ./scripts/reference-docs/index.ts","docs:reference:copy":"test -f ./cli-reference.md && test -f ../../../docs/reference/cli.mdx && cp ./cli-reference.md ../../../docs/reference/cli.mdx","docs:reference:update":"pnpm docs:reference:generate && pnpm docs:reference:copy"},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.32.34","@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/yaml":"^1.9.7","@types/yargs":"^17.0.7",abitype:"0.1.7",ajv:"^8.11.2",axios:"^1.4.0",chalk:"^4.1.2","cli-progress":"^3.12.0",conf:"10.2.0","form-data":"^4.0.0",jszip:"^3.7.1",ora:"4.1.1",pkg:"^5.7.0","s3-sync-client":"^4.3.1",semver:"^7.3.7","simple-update-notifier":"^2.0.0",table:"^6.8.1",typescript:"^5.3.3",yaml:"^1.10.2",yargs:"^17.7.2"},license:"",dependencies:{cuid:"^2.1.8","parse-duration":"^1.0.3","readline-sync":"^1.4.10","timeago.js":"^4.0.2"}};var Z9;function W6e(){if(Z9)return Z9;let e=CI.default.cpus()||[];return Z9={systemPlatform:CI.default.platform(),systemRelease:CI.default.release(),systemArchitecture:CI.default.arch(),cpuCount:e.length,cpuModel:e.length?e[0].model:null,cpuSpeed:e.length?e[0].speed:null,memoryInMb:Math.trunc(CI.default.totalmem()/Math.pow(1024,2)),isCI:!!process.env.CI,cliVersion:MA.version},Z9}var Y6e=Kl($f());var Y9="telemetry.enabled",H6e="telemetry.notifiedAt",K6e="telemetry.anonymousId",Gy=imr(),tmr=(0,Ule.randomBytes)(32).toString("hex"),rmr=omr();smr();function zle(){Gy&&Gy.set(Y9,!0)}function J6e(){Gy&&Gy.set(Y9,!1)}function Q6e(){return!!(Gy!=null&&Gy.get(Y9,!1))}function nmr(){return Gy?Gy.get(Y9,!0)!==!1:!1}function eVe(e){return Gle("CLI_COMMAND",{command:Vle(e)})}function tVe(e){return Gle("CLI_COMMAND_FAILED",Od(po({},e),{command:Vle(e.command)}))}function rVe(e){return Gle("CLI_COMMAND_SUCCEEDED",Od(po({},e),{command:Vle(e.command)}))}function imr(){try{return new Z6e.default({projectName:"goldsky"})}catch(e){return null}}function smr(){!Gy||nVe()||Gy.get(H6e)===void 0&&(Gy.set(H6e,Date.now().toString()),zle(),console.log(`${(0,Y6e.cyan)("Attention")}: Goldsky now collects completely anonymous telemetry regarding usage. This is used to guide Goldsky's CLI roadmap and to provide support.`),console.log("You can learn more, including how to opt-out of this anonymous program, by heading over to:"),console.log(x0e),console.log())}function nVe(){return!nmr()||!!process.env.GOLDSKY_CLI_TELEMETRY_DISABLED}async function Gle(e,t){if(nVe())return Promise.resolve();let r={anonymousId:rmr,sessionId:tmr};try{io.setAuth(""),await io.post("/api/public/telemetry/v1/cli",{body:{context:r,environment:W6e(),events:[{name:e,properties:t}]}})}catch(n){}finally{await Tj()}}function omr(){let e=Gy&&Gy.get(K6e);if(e)return e;let t=(0,Ule.randomBytes)(32).toString("hex");return Gy&&Gy.set(K6e,t),t}function Vle(e){return e.replace(/--token\s+\S+\s?/,"").trim()}var amr="status",cmr="Display the CLI telemetry status",lmr=e=>e,Xle=()=>{console.log(`Anonymous CLI telemetry is ${Q6e()?"enabled":"disabled"}.`)};var Hle={};eu(Hle,{builder:()=>pmr,command:()=>umr,describe:()=>dmr,handler:()=>mmr});var umr="enable",dmr="Enable anonymous CLI telemetry",pmr=e=>e,mmr=()=>{zle(),console.log("Anonymous CLI telemetry enabled.")};var Kle={};eu(Kle,{builder:()=>gmr,command:()=>fmr,describe:()=>hmr,handler:()=>ymr});var fmr="disable",hmr="Disable anonymous CLI telemetry",gmr=e=>e,ymr=()=>{J6e(),console.log("Anonymous CLI telemetry disabled.")};var bmr="telemetry",Smr="Commands related to CLI telemetry",vmr=e=>e.command(Wle).command(Hle).command(Kle).version(!1),_mr=()=>{Xle()};var dw=Kl($f());dw.default.goldsky={red:dw.default.hex("#ff6984"),orange:dw.default.hex("#ffbf60"),yellow:dw.default.hex("#ffe23c"),green:dw.default.hex("#94ffab"),blue:dw.default.hex("#8bc7ff"),purple:dw.default.hex("#ab9fff"),pink:dw.default.hex("#ff9ffb")};var uVe=Kl(lVe()),dVe=async()=>{await(0,uVe.default)({pkg:MA,alwaysRun:!0})};var Lmr=e=>["subgraph init","subgraph list","subgraph tag delete"].includes(e),jmr=wX(process.argv);dVe().then(Tj).then(async()=>{let e=Xde(jmr).scriptName("goldsky").usage("$0 <cmd> args").check(t=>{if(t.nameAndVersion&&typeof t.nameAndVersion=="string"&&!Lmr(t._.join(" "))&&!t.nameAndVersion.match(/^.*\/.*$/))throw new Error(`The provided <nameAndValue> "${t.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:OL,hidden:!0}).option("token",{describe:"CLI Auth Token",type:"string",default:""}).option("color",{describe:"Colorize output",type:"boolean",default:!0}).option("experimental",{describe:"Enable experimental features",type:"boolean",default:!jI,hidden:!0}).command($Z).command(mie).command(fie).command(lle).command(sse).command(Gie).command("db",!1,fle).command(Wie).command(pie).command(pse).command(Zle).version(MA.version).alias("v","version").alias("h","help").strict().demandCommand(1).middleware([({color:t})=>{t||(pVe.default.level=0)},t=>{io.setApiHost(t.apiHost),io.setApiClientAndVersion("cli",MA.version)},t=>{if(t._.length>0)return eVe(t._.join(" "))},t=>{t.token&&gE(t.token)}]).fail(function(t,r,n){if((r==null?void 0:r.message)==="showHelp"&&n.showHelp("log"),r)throw t?console.error(t):r!=null&&r.message&&console.error(r.message),r;n.showHelp("log"),t&&console.error(t),process.exit(1)});process.env.GOLDSKY_PARSE_CLI_OUTPUT_FOR_DOCS&&e.wrap(null);try{await e.parse(),dA()}catch(t){Mmr(t)}});var mVe=Date.now();async function Mmr(e){await tVe({command:process.argv.slice(2).join(" "),duration:Date.now()-mVe,errorName:e instanceof Error?e.name:"ApiError",errorMessage:t()}),process.exit(1);function t(){return e instanceof Error?e.message:typeof e!="string"&&"reason"in e?e.reason:e.message||e.error||JSON.stringify(e)}}function dA(){rVe({command:process.argv.slice(2).join(" "),duration:Date.now()-mVe}).finally(()=>{process.exit(0)})}0&&(module.exports={exit});
635
+ `)}function $5e(){let e="clickhouse";return dle()==="currentDir"&&(e=`./${e}`),e}var Edr="connect",Adr="Connect to your Goldsky ClickHouse database",Ddr=e=>e,kdr=async()=>{console.log(""),vg("Goldsky ClickHouse - Connect"),Ff("Goldsky ClickHouse is based on ClickHouse (https://clickhouse.com).","Get started"),B5e();let e=await N5e();switch(await dh({message:"How would you like to connect?",options:[{label:"Automatically connect",value:"automatically",hint:"Once you hit Enter, you will be connected to the ClickHouse database."},{label:"Manually connect",value:"manually",hint:"Once you hit Enter, you will see the connection details."}]})){case"automatically":j5e(e);break;case"manually":M5e(e);break}};var Pdr="clickhouse",Idr="Commands related to Goldsky ClickHouse",Rdr=e=>e.command(ple).version(!1).demandCommand(1),Odr=async()=>{};var Fdr="db",Tdr="Commands related to Goldsky DB",Ndr=e=>e.command(mle).version(!1).demandCommand(1),qdr=async()=>{};var Zle={};eu(Zle,{builder:()=>vmr,command:()=>bmr,describe:()=>Smr,handler:()=>_mr});var Wle={};eu(Wle,{builder:()=>lmr,command:()=>amr,describe:()=>cmr,handler:()=>Xle});var Z6e=Kl(X6e()),Ule=require("crypto");var CI=Kl(require("os"));var MA={name:"@goldskycom/cli",version:"9.8.2",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 --max-warnings 0 .","lint:summary":"pnpm lint --format summary || pnpm lint",typecheck:"tsc --noEmit",clean:"rimraf ./binaries ./dist ./tsconfig.tsbuildinfo",build:"pnpm clean && tsc --noEmit --skipLibCheck && node ./scripts/build.js && chmod a+x bin/goldsky","build:binaries":"pnpm build && rimraf ./binaries && node ./scripts/binaries-build.js","deploy:binaries":"node ./scripts/binaries-deploy.js","dev:debug":"NODE_ENV=development ts-node src/index.ts","dev:dist":"NODE_ENV=development node dist/index.js",prepublishOnly:"pnpm build","test:unit":"pnpm build && tsc --skipLibCheck && NODE_ENV=unit-tests node --test --test-reporter spec dist","docs:reference:generate":"pnpm build && GOLDSKY_PARSE_CLI_OUTPUT_FOR_DOCS=true ts-node ./scripts/reference-docs/index.ts","docs:reference:copy":"test -f ./cli-reference.md && test -f ../../../docs/reference/cli.mdx && cp ./cli-reference.md ../../../docs/reference/cli.mdx","docs:reference:update":"pnpm docs:reference:generate && pnpm docs:reference:copy"},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.32.34","@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/yaml":"^1.9.7","@types/yargs":"^17.0.7",abitype:"0.1.7",ajv:"^8.11.2",axios:"^1.4.0",chalk:"^4.1.2","cli-progress":"^3.12.0",conf:"10.2.0","form-data":"^4.0.0",jszip:"^3.7.1",ora:"4.1.1",pkg:"^5.7.0","s3-sync-client":"^4.3.1",semver:"^7.3.7","simple-update-notifier":"^2.0.0",table:"^6.8.1",typescript:"^5.3.3",yaml:"^1.10.2",yargs:"^17.7.2"},license:"",dependencies:{cuid:"^2.1.8","parse-duration":"^1.0.3","readline-sync":"^1.4.10","timeago.js":"^4.0.2"}};var Z9;function W6e(){if(Z9)return Z9;let e=CI.default.cpus()||[];return Z9={systemPlatform:CI.default.platform(),systemRelease:CI.default.release(),systemArchitecture:CI.default.arch(),cpuCount:e.length,cpuModel:e.length?e[0].model:null,cpuSpeed:e.length?e[0].speed:null,memoryInMb:Math.trunc(CI.default.totalmem()/Math.pow(1024,2)),isCI:!!process.env.CI,cliVersion:MA.version},Z9}var Y6e=Kl($f());var Y9="telemetry.enabled",H6e="telemetry.notifiedAt",K6e="telemetry.anonymousId",Gy=imr(),tmr=(0,Ule.randomBytes)(32).toString("hex"),rmr=omr();smr();function zle(){Gy&&Gy.set(Y9,!0)}function J6e(){Gy&&Gy.set(Y9,!1)}function Q6e(){return!!(Gy!=null&&Gy.get(Y9,!1))}function nmr(){return Gy?Gy.get(Y9,!0)!==!1:!1}function eVe(e){return Gle("CLI_COMMAND",{command:Vle(e)})}function tVe(e){return Gle("CLI_COMMAND_FAILED",Od(po({},e),{command:Vle(e.command)}))}function rVe(e){return Gle("CLI_COMMAND_SUCCEEDED",Od(po({},e),{command:Vle(e.command)}))}function imr(){try{return new Z6e.default({projectName:"goldsky"})}catch(e){return null}}function smr(){!Gy||nVe()||Gy.get(H6e)===void 0&&(Gy.set(H6e,Date.now().toString()),zle(),console.log(`${(0,Y6e.cyan)("Attention")}: Goldsky now collects completely anonymous telemetry regarding usage. This is used to guide Goldsky's CLI roadmap and to provide support.`),console.log("You can learn more, including how to opt-out of this anonymous program, by heading over to:"),console.log(x0e),console.log())}function nVe(){return!nmr()||!!process.env.GOLDSKY_CLI_TELEMETRY_DISABLED}async function Gle(e,t){if(nVe())return Promise.resolve();let r={anonymousId:rmr,sessionId:tmr};try{io.setAuth(""),await io.post("/api/public/telemetry/v1/cli",{body:{context:r,environment:W6e(),events:[{name:e,properties:t}]}})}catch(n){}finally{await Tj()}}function omr(){let e=Gy&&Gy.get(K6e);if(e)return e;let t=(0,Ule.randomBytes)(32).toString("hex");return Gy&&Gy.set(K6e,t),t}function Vle(e){return e.replace(/--token\s+\S+\s?/,"").trim()}var amr="status",cmr="Display the CLI telemetry status",lmr=e=>e,Xle=()=>{console.log(`Anonymous CLI telemetry is ${Q6e()?"enabled":"disabled"}.`)};var Hle={};eu(Hle,{builder:()=>pmr,command:()=>umr,describe:()=>dmr,handler:()=>mmr});var umr="enable",dmr="Enable anonymous CLI telemetry",pmr=e=>e,mmr=()=>{zle(),console.log("Anonymous CLI telemetry enabled.")};var Kle={};eu(Kle,{builder:()=>gmr,command:()=>fmr,describe:()=>hmr,handler:()=>ymr});var fmr="disable",hmr="Disable anonymous CLI telemetry",gmr=e=>e,ymr=()=>{J6e(),console.log("Anonymous CLI telemetry disabled.")};var bmr="telemetry",Smr="Commands related to CLI telemetry",vmr=e=>e.command(Wle).command(Hle).command(Kle).version(!1),_mr=()=>{Xle()};var dw=Kl($f());dw.default.goldsky={red:dw.default.hex("#ff6984"),orange:dw.default.hex("#ffbf60"),yellow:dw.default.hex("#ffe23c"),green:dw.default.hex("#94ffab"),blue:dw.default.hex("#8bc7ff"),purple:dw.default.hex("#ab9fff"),pink:dw.default.hex("#ff9ffb")};var uVe=Kl(lVe()),dVe=async()=>{await(0,uVe.default)({pkg:MA,alwaysRun:!0})};var Lmr=e=>["subgraph init","subgraph list","subgraph tag delete"].includes(e),jmr=wX(process.argv);dVe().then(Tj).then(async()=>{let e=Xde(jmr).scriptName("goldsky").usage("$0 <cmd> args").check(t=>{if(t.nameAndVersion&&typeof t.nameAndVersion=="string"&&!Lmr(t._.join(" "))&&!t.nameAndVersion.match(/^.*\/.*$/))throw new Error(`The provided <nameAndValue> "${t.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:OL,hidden:!0}).option("token",{describe:"CLI Auth Token",type:"string",default:""}).option("color",{describe:"Colorize output",type:"boolean",default:!0}).option("experimental",{describe:"Enable experimental features",type:"boolean",default:!jI,hidden:!0}).command($Z).command(mie).command(fie).command(lle).command(sse).command(Gie).command("db",!1,fle).command(Wie).command(pie).command(pse).command(Zle).version(MA.version).alias("v","version").alias("h","help").strict().demandCommand(1).middleware([({color:t})=>{t||(pVe.default.level=0)},t=>{io.setApiHost(t.apiHost),io.setApiClientAndVersion("cli",MA.version)},t=>{if(t._.length>0)return eVe(t._.join(" "))},t=>{t.token&&gE(t.token)}]).fail(function(t,r,n){if((r==null?void 0:r.message)==="showHelp"&&n.showHelp("log"),r)throw t?console.error(t):r!=null&&r.message&&console.error(r.message),r;n.showHelp("log"),t&&console.error(t),process.exit(1)});process.env.GOLDSKY_PARSE_CLI_OUTPUT_FOR_DOCS&&e.wrap(null);try{await e.parse(),dA()}catch(t){Mmr(t)}});var mVe=Date.now();async function Mmr(e){await tVe({command:process.argv.slice(2).join(" "),duration:Date.now()-mVe,errorName:e instanceof Error?e.name:"ApiError",errorMessage:t()}),process.exit(1);function t(){return e instanceof Error?e.message:typeof e!="string"&&"reason"in e?e.reason:e.message||e.error||JSON.stringify(e)}}function dA(){rVe({command:process.argv.slice(2).join(" "),duration:Date.now()-mVe}).finally(()=>{process.exit(0)})}0&&(module.exports={exit});
636
636
  /*!
637
637
  * mime-db
638
638
  * Copyright(c) 2014 Jonathan Ong